added onPlayerAction
This commit is contained in:
parent
b15072642c
commit
c15ccf1a18
@ -249,6 +249,15 @@ function onPlayerConnect()
|
||||
Wait.time(function() playermatApi.redrawSlotSymbols("All") end, 0.2)
|
||||
end
|
||||
|
||||
function onPlayerAction(player, action, targets)
|
||||
if action == Player.Action.Delete and player.admin == false then
|
||||
for _, target in ipairs(targets) do
|
||||
local matColor = playermatApi.getMatColorByPosition(target.getPosition())
|
||||
local trash = guidReferenceApi.getObjectByOwnerAndType(matColor, "Trash")
|
||||
trash.putObject(target)
|
||||
end
|
||||
end
|
||||
end
|
||||
---------------------------------------------------------
|
||||
-- chaos token drawing
|
||||
---------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user