Skip to content

Commit

Permalink
fix command system (#1234)
Browse files Browse the repository at this point in the history
* make command server or client

* move console to game scene

* fix kill command to work with client and host

* allow command to know about connection calling them

* some cleanup

* replace tabs with space

* add offline commands

* apply safety checks and fix indentation

* fix null ref

* removed client active connection check

* rename to online process

* Update Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/KillCommand.cs

Co-authored-by: Iamteapot <[email protected]>

* Update Assets/Scripts/SS3D/Systems/IngameConsoleSystem/CommandsController.cs

Co-authored-by: Iamteapot <[email protected]>

* Update Assets/Scripts/SS3D/Systems/IngameConsoleSystem/ConsolePanelView.cs

Co-authored-by: Iamteapot <[email protected]>

* rename console to _console

* Update Assets/Scripts/SS3D/Systems/IngameConsoleSystem/CommandsController.cs

Co-authored-by: Iamteapot <[email protected]>

---------

Co-authored-by: Iamteapot <[email protected]>
  • Loading branch information
stilnat and iamteapot422 authored Aug 10, 2023
1 parent 6b3594e commit a3f5b90
Show file tree
Hide file tree
Showing 22 changed files with 630 additions and 262 deletions.
16 changes: 16 additions & 0 deletions Assets/Content/Data/DefaultPrefabObjects.asset
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ MonoBehaviour:
m_Name: DefaultPrefabObjects
m_EditorClassIdentifier:
_prefabs:
- {fileID: 6020083413388562179, guid: dfcd83503e242c843a6bc43cc5040fc9, type: 3}
- {fileID: 5177941338532333075, guid: 6deac385bf663034fa7d8dece88c07bb, type: 3}
- {fileID: 7875182825432581152, guid: ad573dedc3cb2d74fa42bedc463ffd75, type: 3}
- {fileID: 1962741444460096580, guid: 14b8b7b37cbe54a44a994f9d927bf213, type: 3}
- {fileID: 562230263738288595, guid: 06a27ffa07c1c754c9590607a5a80030, type: 3}
- {fileID: 562230263738288595, guid: 59f05e8a3a1d4b94eb5222aed605e260, type: 3}
- {fileID: 8203177977882359099, guid: 6ab4ce7059d374a4498481e1385c222e, type: 3}
- {fileID: 6636680625000353110, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
- {fileID: 3227132888119106738, guid: 7bbb74a7ffc8cae44baa886de43c586b, type: 3}
- {fileID: 1871071288925904272, guid: add4d1bc2d874d94782d6b8c912af5e2, type: 3}
- {fileID: 6115335805774105745, guid: bf177f8bab26bc84b87fd9a971004418, type: 3}
Expand Down Expand Up @@ -62,6 +66,7 @@ MonoBehaviour:
- {fileID: -7727686409064562107, guid: 05582ec649a27b64c85729877d9e344d, type: 3}
- {fileID: -7727686409064562107, guid: d211f90919bc28a4e8def76cb07197ba, type: 3}
- {fileID: 3206407796921847736, guid: 3335d001fdfff824aa859b98f2fe564e, type: 3}
- {fileID: 4302234173120300195, guid: 313c7a6f7eaaf4f4cb80cbe0fe77005d, type: 3}
- {fileID: 9154675693299657064, guid: af039f84b4a245049b5b62799af01384, type: 3}
- {fileID: 2930813178971533500, guid: 1c3eed1ea37ecc1448e41270cdc63486, type: 3}
- {fileID: 1019513474262773944, guid: 06c946c7c639138488b814e4448b82e4, type: 3}
Expand All @@ -75,6 +80,11 @@ MonoBehaviour:
- {fileID: 3258417366846669140, guid: 330d85a67a5891145bd8037dde90f37b, type: 3}
- {fileID: 3258417366846669140, guid: dd3ce5340ed4aba4babae7020f737084, type: 3}
- {fileID: 4819234911439508660, guid: 11f824c472e04854e95065dda095e8f4, type: 3}
- {fileID: 6348062478285535548, guid: 1d2cf546d53e3fe4c9103007427aaec7, type: 3}
- {fileID: 8767567404870203102, guid: 404443f7c306fc8469698745624fa3bf, type: 3}
- {fileID: 1491149956516498634, guid: b044d7bdb55405046a9055726a779eb1, type: 3}
- {fileID: 4037338737721612837, guid: f88a398ad3d01454f955de9c337d9b99, type: 3}
- {fileID: 1773710978803455870, guid: 4cb99cf2fee96f944abbacc51b0b701c, type: 3}
- {fileID: -1308347259443233487, guid: 821d0946be816bb42a0eed24631d57ee, type: 3}
- {fileID: 3815592008771065855, guid: 8686fbdb413e33b4395a775c4f2ba990, type: 3}
- {fileID: -7727686409064562107, guid: de6f06ad18d50134295959f438ba9c5d, type: 3}
Expand Down Expand Up @@ -111,6 +121,7 @@ MonoBehaviour:
- {fileID: 8635336608555116780, guid: 6caa99f8281726e40a793826d5c047db, type: 3}
- {fileID: 9015187684533357890, guid: 5e8a02c5ce0073644ac01bdb55d72a70, type: 3}
- {fileID: -2900402353996906960, guid: b5be0a52925e2674193d081d2deb68cb, type: 3}
- {fileID: 885347571389710399, guid: 162e188d33a82b440a239f20901c716a, type: 3}
- {fileID: 881130758709618923, guid: 2332a158259900e4f8a237fa8daff266, type: 3}
- {fileID: 7958861831329766982, guid: d8b0c8d1ddcdeb24d9763054c103c9fe, type: 3}
- {fileID: 7958861831329766982, guid: 79260483ae5d3e04fa272e092b49abac, type: 3}
Expand All @@ -119,6 +130,11 @@ MonoBehaviour:
- {fileID: 2090837846029440516, guid: 3520c433beff78a478401074d2ca95a3, type: 3}
- {fileID: 7958861831329766982, guid: d9aabfd5d726a7f499b8e360d919eba4, type: 3}
- {fileID: 4819234911439508660, guid: 1ae18785d74e9fa4699b6f6de889c243, type: 3}
- {fileID: 6294647206769462932, guid: 7becfab153276864f9fc7636a839d837, type: 3}
- {fileID: 1602098408367427586, guid: 9c8363ee7f934bd4b8ee5a2e30da1269, type: 3}
- {fileID: 4052990814619214022, guid: 772da386eb7b01745913050fee544c32, type: 3}
- {fileID: 7970185317444620997, guid: 781dd9024aaa53444bc3deeaa9708fbb, type: 3}
- {fileID: 261983550380735922, guid: 411b513efc8f06a40aecfc47d0c5fc5a, type: 3}
- {fileID: 6999522401175031449, guid: 9b8a1328991fc2846bc55a3d9a82e5c0, type: 3}
- {fileID: 1330758276423851772, guid: 0ef9cea3bb74e6c4788f77e711f92d4d, type: 3}
- {fileID: -7180308641962958576, guid: 501391c27a7f94c4d8c937f00a9ceb9f, type: 3}
Expand Down
155 changes: 5 additions & 150 deletions Assets/Content/Scenes/Boot.unity
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Transform:
- {fileID: 1628220426}
- {fileID: 1966326254}
m_Father: {fileID: 0}
m_RootOrder: 2
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &193002073
MonoBehaviour:
Expand Down Expand Up @@ -205,7 +205,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &340427413
MonoBehaviour:
Expand Down Expand Up @@ -366,7 +366,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 6
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &528567226
MonoBehaviour:
Expand Down Expand Up @@ -877,7 +877,7 @@ Transform:
m_Children:
- {fileID: 1425655011}
m_Father: {fileID: 0}
m_RootOrder: 5
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1382736864
MonoBehaviour:
Expand Down Expand Up @@ -969,151 +969,6 @@ Transform:
m_CorrespondingSourceObject: {fileID: 4722110630841134587, guid: c658ba6426888e2448d7c7f8e5df81fb, type: 3}
m_PrefabInstance: {fileID: 1425655008}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1498465984
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4468402020486027511, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402020486027511, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402020486027511, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993860, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_Name
value: Console
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993860, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993886, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_Pivot.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993886, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_Pivot.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993886, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993886, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993886, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993886, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993886, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993886, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993886, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993886, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993886, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993886, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993886, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993886, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993886, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993886, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993886, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993886, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993886, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993886, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402020721993886, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402021075485018, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_AnchoredPosition.y
value: -229.99995
objectReference: {fileID: 0}
- target: {fileID: 4468402021573311568, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_OnFocusSelectAll
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402021573311568, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_ResetOnDeActivation
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402021573311568, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.size
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402022019791616, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_ScrollSensitivity
value: 32
objectReference: {fileID: 0}
- target: {fileID: 4468402022117316798, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402022117316798, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4468402022117316798, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3}
--- !u!1 &1576023603
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1144,7 +999,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1576023605
MonoBehaviour:
Expand Down
Loading

0 comments on commit a3f5b90

Please sign in to comment.