change collision condition
This commit is contained in:
parent
515f48b94d
commit
c9cd3f70a1
@ -26,7 +26,6 @@ local SHIFT_EXCLUSION = {
|
||||
local tokenManager = require("core/token/TokenManager")
|
||||
local INVESTIGATOR_COUNTER_GUID = "f182ee"
|
||||
local PLAY_AREA_ZONE_GUID = "a2f932"
|
||||
local lastCollisionObject
|
||||
local currentScenario
|
||||
|
||||
---------------------------------------------------------
|
||||
@ -64,12 +63,10 @@ end
|
||||
|
||||
function onCollisionEnter(collision_info)
|
||||
local obj = collision_info.collision_object
|
||||
local objType = obj.name
|
||||
|
||||
-- only trigger the following once every 0.1s for each object
|
||||
-- (otherwise TTS fires this event 20 times and that causes 20 JSON decodes)
|
||||
if not COLLISION_ENABLED or lastCollisionObject == obj then return end
|
||||
lastCollisionObject = obj
|
||||
Wait.time(function() lastCollisionObject = nil end, 0.1)
|
||||
-- only continue for cards
|
||||
if not COLLISION_ENABLED or (objType ~= "Card" and objType ~= "CardCustom") then return end
|
||||
|
||||
-- check if we should spawn clues here and do so according to playercount
|
||||
if shouldSpawnTokens(obj) then
|
||||
|
Loading…
Reference in New Issue
Block a user