forked from RE-SS3D/SS3D
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Early work to create runtime test framework, and basics of input dependency injection. * Created a movement play mode test. * Divided Playmode Test organisation into Server, Client and Host. Created separate test proxies and helpers to be used by all types. * Created initial host game test. * Added server tests, and added stub methods to ReadyPlayersSystem and RoundSystem to imitate Broadcasts. * Restructured test scripts, and created tests for late join issue. * Initial work on pocket tests. * Finalized tests for Propagating Pocket Problem. * Streamlining Server creation of Clients. * Gave player prefab the player tag, for convenience in finding multiple. * Server-side test for remaining above station level. * Refactored server side "PlayersRemainAboveStationLevelAfterSpawn" test to set up in UnityTest rather than SetUp. * Attempt at placing client windows properly. Not yet functional. * Created FreePlayMultiplayer test to set up and display eight clients. * Restructured tests folder to include "Asset Audit" assembly and separate out "Known Issue Reproduction" * Replace Input Manager with Input Action * Add InputSystem to ToggleInternalClothingUI.cs and NetworkPhysicsDebug.cs * Delete redundant Update() in ToggleInternalClothingUI.cs and change mouse position read in ItemGrid.cs * Add checks if scripts are enabled * Remove Debug.Log(1) in InputSystem.cs * Add UnityEngine.InputSystem reference to SS3D.Networking.asmdef * Replace InputInput.GetButtonDown("Drop") in Hands.cs * Work in progress: Parameterizing scene and prefab tests. * More work on SceneTests. * OnDisable()s unsubscribe from controls * remove if (!enabled) * Fixed scene loading in SceneTests. * Completed merge from develop. - AssetDataTests moved to Asset Audit. - Assembly definitions updated. * Moved relevant TilemapTests to Asset Audit assembly, refactored a bit. * Rationalized EditMode TileMapTests. * Set up CI pipeline to run Edit Mode tests only. * Move controls intializations to OnStart() * Rearrange Swap Hands to X, add summary to InputSystem, add try catch to OnEnable in InteractionController * Lower InputSystem execution order and remove try catch blocks * fix conficlt issue * Moved OnEnable code to OnStart, OnDisable to OnDestroyed, .inputactions to Content/Input * Make .inputaction file * Added discrete PlayMode test runner. * Commence conversion to InputSystem. * Still trying to get TestInputFixture working * Working on getting InputTestFixture going... No luck yet. * Mock input actually working!! * Commented out most UnityTests. * Changed build to Linux. * Changed build back to Windows. * Changed how the filepath is checked. * Trying Linux64 now. * update station level to 0 * uncomment unityTest * add toEnum utility on string * add tryget method for assets database * add utility for item command * add spawn item command * remove helper method already present in testHelper * remove old test * remove move from testhelper * uncomment unity test attributes * Add moveInDirection test helper * remove useless namespaces * remove itemcommandUtilities remove itemcommandUtilities and add methods in entity and item system. Update command accordingly * partial working tests * try to fix itemdrop test * failed attempt at implementing mouse mockup * some progress : now the item get dropped at real cursor position * update mouse read position with new input system * fix last commit * make playerCanDropItem test functional and clean up * add a parameter to helper function * remove useless unworking test * add interaction controller as field * move set up inputaction to set up method * some cleanup * edit back edit mode test * Update editmodetestrunner.yml * remove play mode test runner * small fix for some tests * partial fix for server tests * put back issue reproduction tests * fix station test height * bandaid fix * fix late join tests * some doc and move kill to unityTearDown * move controllers to SpessPlayModeTests * remove some inputAction, put left mouse click in SpessPlayModeTest * add pick up item to late join tests * add some doc * running only edit mode tests * update editmodetestrunner * edit workflow * edit workflow * edit workflow * update workflow * update workflow * fix test failing in host game action * fix late join fails * move stuff to play mode repository * complete host game action * simplify hierarchy and clean up redundant stuff * small fix attribute forgotten * fixing built staying open at end of tests * update to fix exceptions * fixing build * fix play mode tests * fix overflow * Add logAssert ignore fail messages everywhere needed * Revert "Merge branch 'Fix-container-stack-overflow' into PlayModeTests" This reverts commit e7d7620, reversing changes made to 83db4da. * renaming tests classes --------- Co-authored-by: Ryan <[email protected]> Co-authored-by: Mechar418 <[email protected]>
- Loading branch information
1 parent
b7bbc2c
commit 35876e4
Showing
74 changed files
with
2,498 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!29 &1 | ||
OcclusionCullingSettings: | ||
m_ObjectHideFlags: 0 | ||
serializedVersion: 2 | ||
m_OcclusionBakeSettings: | ||
smallestOccluder: 5 | ||
smallestHole: 0.25 | ||
backfaceThreshold: 100 | ||
m_SceneGUID: 00000000000000000000000000000000 | ||
m_OcclusionCullingData: {fileID: 0} | ||
--- !u!104 &2 | ||
RenderSettings: | ||
m_ObjectHideFlags: 0 | ||
serializedVersion: 9 | ||
m_Fog: 0 | ||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} | ||
m_FogMode: 3 | ||
m_FogDensity: 0.01 | ||
m_LinearFogStart: 0 | ||
m_LinearFogEnd: 300 | ||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} | ||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} | ||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} | ||
m_AmbientIntensity: 1 | ||
m_AmbientMode: 0 | ||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} | ||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} | ||
m_HaloStrength: 0.5 | ||
m_FlareStrength: 1 | ||
m_FlareFadeSpeed: 3 | ||
m_HaloTexture: {fileID: 0} | ||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} | ||
m_DefaultReflectionMode: 0 | ||
m_DefaultReflectionResolution: 128 | ||
m_ReflectionBounces: 1 | ||
m_ReflectionIntensity: 1 | ||
m_CustomReflection: {fileID: 0} | ||
m_Sun: {fileID: 0} | ||
m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1} | ||
m_UseRadianceAmbientProbe: 0 | ||
--- !u!157 &3 | ||
LightmapSettings: | ||
m_ObjectHideFlags: 0 | ||
serializedVersion: 12 | ||
m_GIWorkflowMode: 1 | ||
m_GISettings: | ||
serializedVersion: 2 | ||
m_BounceScale: 1 | ||
m_IndirectOutputScale: 1 | ||
m_AlbedoBoost: 1 | ||
m_EnvironmentLightingMode: 0 | ||
m_EnableBakedLightmaps: 1 | ||
m_EnableRealtimeLightmaps: 0 | ||
m_LightmapEditorSettings: | ||
serializedVersion: 12 | ||
m_Resolution: 2 | ||
m_BakeResolution: 40 | ||
m_AtlasSize: 1024 | ||
m_AO: 0 | ||
m_AOMaxDistance: 1 | ||
m_CompAOExponent: 1 | ||
m_CompAOExponentDirect: 0 | ||
m_ExtractAmbientOcclusion: 0 | ||
m_Padding: 2 | ||
m_LightmapParameters: {fileID: 0} | ||
m_LightmapsBakeMode: 1 | ||
m_TextureCompression: 1 | ||
m_FinalGather: 0 | ||
m_FinalGatherFiltering: 1 | ||
m_FinalGatherRayCount: 256 | ||
m_ReflectionCompression: 2 | ||
m_MixedBakeMode: 2 | ||
m_BakeBackend: 1 | ||
m_PVRSampling: 1 | ||
m_PVRDirectSampleCount: 32 | ||
m_PVRSampleCount: 512 | ||
m_PVRBounces: 2 | ||
m_PVREnvironmentSampleCount: 256 | ||
m_PVREnvironmentReferencePointCount: 2048 | ||
m_PVRFilteringMode: 1 | ||
m_PVRDenoiserTypeDirect: 1 | ||
m_PVRDenoiserTypeIndirect: 1 | ||
m_PVRDenoiserTypeAO: 1 | ||
m_PVRFilterTypeDirect: 0 | ||
m_PVRFilterTypeIndirect: 0 | ||
m_PVRFilterTypeAO: 0 | ||
m_PVREnvironmentMIS: 1 | ||
m_PVRCulling: 1 | ||
m_PVRFilteringGaussRadiusDirect: 1 | ||
m_PVRFilteringGaussRadiusIndirect: 5 | ||
m_PVRFilteringGaussRadiusAO: 2 | ||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5 | ||
m_PVRFilteringAtrousPositionSigmaIndirect: 2 | ||
m_PVRFilteringAtrousPositionSigmaAO: 1 | ||
m_ExportTrainingData: 0 | ||
m_TrainingDataDestination: TrainingData | ||
m_LightProbeSampleCountMultiplier: 4 | ||
m_LightingDataAsset: {fileID: 0} | ||
m_LightingSettings: {fileID: 0} | ||
--- !u!196 &4 | ||
NavMeshSettings: | ||
serializedVersion: 2 | ||
m_ObjectHideFlags: 0 | ||
m_BuildSettings: | ||
serializedVersion: 2 | ||
agentTypeID: 0 | ||
agentRadius: 0.5 | ||
agentHeight: 2 | ||
agentSlope: 45 | ||
agentClimb: 0.4 | ||
ledgeDropHeight: 0 | ||
maxJumpAcrossDistance: 0 | ||
minRegionArea: 2 | ||
manualCellSize: 0 | ||
cellSize: 0.16666667 | ||
manualTileSize: 0 | ||
tileSize: 256 | ||
accuratePlacement: 0 | ||
maxJobWorkers: 0 | ||
preserveTilesOutsideBounds: 0 | ||
debug: | ||
m_Flags: 0 | ||
m_NavMeshData: {fileID: 0} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/ItemCommands/SpawnItemCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
using SS3D.Core; | ||
using SS3D.Systems.Entities; | ||
using SS3D.Systems.Permissions; | ||
using SS3D.Systems.PlayerControl; | ||
using SS3D.Systems; | ||
using SS3D.Data; | ||
using SS3D.Data.AssetDatabases; | ||
using SS3D.Data.Enums; | ||
using SS3D.Systems.Inventory.Items; | ||
using SS3D.Utils; | ||
using SS3D.Core.Settings; | ||
using UnityEngine; | ||
using UnityEngine.UIElements; | ||
using FishNet.Managing.Server; | ||
using FishNet; | ||
using FishNet.Connection; | ||
using UnityEngine.InputSystem; | ||
|
||
namespace SS3D.Systems.IngameConsoleSystem.Commands | ||
{ | ||
public class SpawnItemCommand : Command | ||
{ | ||
public override string LongDescription => "Spawn item using item name at the same position as human or at position x,z"; | ||
public override string ShortDescription => "Spawn item"; | ||
public override ServerRoleTypes AccessLevel => ServerRoleTypes.User; | ||
|
||
public override CommandType Type => CommandType.Server; | ||
|
||
public override string Perform(string[] args, NetworkConnection conn) | ||
{ | ||
CheckArgsResponse checkArgsResponse = CheckArgs(args); | ||
if (checkArgsResponse.IsValid == false) | ||
return checkArgsResponse.InvalidArgs; | ||
string itemName = args[0]; | ||
if(!Subsystems.Get<EntitySystem>().TryGetOwnedEntity(conn, out Entity entity)) | ||
{ | ||
return "Connection does not own any entity registered in entity system."; | ||
}; | ||
|
||
ItemSystem itemSystem = Subsystems.Get<ItemSystem>(); | ||
itemSystem.CmdSpawnItem(itemName.ToEnum<ItemId>(), entity.transform.position, Quaternion.identity); | ||
return $"item {itemName} spawned at position {entity.transform.position}"; | ||
} | ||
|
||
protected override CheckArgsResponse CheckArgs(string[] args) | ||
{ | ||
CheckArgsResponse response = new CheckArgsResponse(); | ||
if (args.Length != 1 && args.Length != 3) | ||
{ | ||
response.IsValid = false; | ||
response.InvalidArgs = "Invalid number of arguments"; | ||
return response; | ||
} | ||
string itemName = args[0]; | ||
if(!Assets.TryGet((int) AssetDatabases.Items, (int) itemName.ToEnum<ItemId>(), out Item item)) | ||
{ | ||
response.IsValid = false; | ||
response.InvalidArgs = $"item with name {itemName} not found"; | ||
return response; | ||
} | ||
|
||
response.IsValid = true; | ||
return response; | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...s/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/ItemCommands/SpawnItemCommand.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.