0
0
mirror of https://gitlab.com/YuukiPS/GC-Resources.git synced 2025-04-29 09:35:48 +00:00
GC-Resources/Resources/Scripts/Gadget/Chest_Interact_Test.lua
KingRainbow44 b8cde25332
Revert "The Great De-Local'ifying of Lua Scripts (pt. 3)"
This reverts commit aa45c07369da944f31842aaadf87884dc319c8b1.
2023-08-29 21:28:58 -04:00

38 lines
1.2 KiB
Lua

-- abilityRequest
function OnClientExecuteReq(context, param1, param2, param3)
local this_target = ScriptLib.GetContextGadgetConfigId(context)
--ScriptLib.PrintLog("##config="..this_target)
local this_group = ScriptLib.GetContextGroupId(context)
--ScriptLib.PrintLog("##config="..this_group)
-- 获取机关当前状态
if param1 == 0 then
--[[local this_config = ScriptLib.GetGadgetConfigId(context, {gadget_eid = source_entity_id})
local this_group = ScriptLib.GetContextGroupId(context)
ScriptLib.SetGroupGadgetStateByConfigId(context, this_group, this_config, GadgetState.Default)]]
if this_target == 7 then
ScriptLib.SetGroupGadgetStateByConfigId(context, this_group, 9, GadgetState.chestOpened)
end
if this_target == 9 then
ScriptLib.SetGroupGadgetStateByConfigId(context, this_group, 10, GadgetState.chestOpened)
end
if this_target == 10 then
ScriptLib.SetGroupGadgetStateByConfigId(context, this_group, 11, GadgetState.chestOpened)
end
if this_target == 11 then
ScriptLib.SetGroupGadgetStateByConfigId(context, this_group, 7, GadgetState.chestOpened)
end
ScriptLib.ChangeGroupVariableValue(context,"count",1)
end
end