From 30f3076d617d2cd493eb1a1232ee3a2b8f65aede Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 18 Jan 2024 20:25:15 +0100 Subject: [PATCH 1/2] added simple detection for disabled physics --- config.json | 4 +-- objects/PhysicsDetector.b300d8.json | 45 +++++++++++++++++++++++++++++ src/core/PhysicsDetector.ttslua | 7 +++++ 3 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 objects/PhysicsDetector.b300d8.json create mode 100644 src/core/PhysicsDetector.ttslua diff --git a/config.json b/config.json index c563d5a8..bf72041a 100644 --- a/config.json +++ b/config.json @@ -3,7 +3,6 @@ "ComponentTags_path": "ComponentTags.json", "CustomUIAssets_path": "CustomUIAssets.json", "DecalPallet_path": "DecalPallet.json", - "Decals": [], "GameComplexity": "", "GameMode": "Arkham Horror LCG - Super Complete Edition", "GameType": "", @@ -222,7 +221,8 @@ "Tokencache_ElderSign.0b1aca", "Tokencache_Bless.8e3aab", "Tokencache_Curse.16a9a7", - "Tokencache_Frost.b2b7be" + "Tokencache_Frost.b2b7be", + "PhysicsDetector.b300d8" ], "PlayArea": 1, "PlayerCounts": [ diff --git a/objects/PhysicsDetector.b300d8.json b/objects/PhysicsDetector.b300d8.json new file mode 100644 index 00000000..a4251aa1 --- /dev/null +++ b/objects/PhysicsDetector.b300d8.json @@ -0,0 +1,45 @@ +{ + "AltLookAngle": { + "x": 0, + "y": 0, + "z": 0 + }, + "Autoraise": true, + "ColorDiffuse": { + "b": 0, + "g": 0, + "r": 0.92647 + }, + "Description": "", + "DragSelectable": true, + "GMNotes": "", + "GUID": "b300d8", + "Grid": true, + "GridProjection": false, + "Hands": false, + "HideWhenFaceDown": false, + "IgnoreFoW": false, + "LayoutGroupSortIndex": 0, + "Locked": false, + "LuaScript": "require(\"core/PhysicsDetector\")", + "LuaScriptState": "", + "MeasureMovement": false, + "Name": "BlockSquare", + "Nickname": "Physics Detector", + "Snap": true, + "Sticky": true, + "Tooltip": true, + "Transform": { + "posX": 78, + "posY": 1.645, + "posZ": 16, + "rotX": 0, + "rotY": 0, + "rotZ": 0, + "scaleX": 1, + "scaleY": 1, + "scaleZ": 1 + }, + "Value": 0, + "XmlUI": "" +} \ No newline at end of file diff --git a/src/core/PhysicsDetector.ttslua b/src/core/PhysicsDetector.ttslua new file mode 100644 index 00000000..171db1df --- /dev/null +++ b/src/core/PhysicsDetector.ttslua @@ -0,0 +1,7 @@ +-- will notify the user to enable physics if it appears to not be fully enabled + +-- this event should only fire if physics aren't fully enabled +function onCollisionExit() + broadcastToAll("Physics disabled?", "Orange") + printToAll("It seems like you don't have 'Physics' fully enabled. From the top menu bar, open Options > Physics and select 'Full' to experience this mod with all features.") +end From 962afcaf6ac369c7e25abe936ad4f24d612f3f67 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sun, 21 Jan 2024 13:48:22 +0100 Subject: [PATCH 2/2] updated message --- src/core/PhysicsDetector.ttslua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/PhysicsDetector.ttslua b/src/core/PhysicsDetector.ttslua index 171db1df..96e28cbf 100644 --- a/src/core/PhysicsDetector.ttslua +++ b/src/core/PhysicsDetector.ttslua @@ -2,6 +2,6 @@ -- this event should only fire if physics aren't fully enabled function onCollisionExit() - broadcastToAll("Physics disabled?", "Orange") + broadcastToAll("Physics disabled? Check chat log", "Orange") printToAll("It seems like you don't have 'Physics' fully enabled. From the top menu bar, open Options > Physics and select 'Full' to experience this mod with all features.") end