1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-11-23 22:22:34 +02:00

Mtn: Fix many bugs

This commit is contained in:
Gerkiz
2024-10-26 13:05:31 +02:00
parent 32cb1f0ff9
commit c74f3db7c4
14 changed files with 101 additions and 43 deletions

View File

@@ -523,6 +523,14 @@ function Public:set_default(defaults)
return self
end
--- Restores the command_activated state for each command
function Public.restore_states()
for _, command in pairs(this.commands) do
command.validated_command = false
command.command_activated = false
end
end
--- Registers the command to the game. Will return the player/server and the args as separate arguments.
---@param func function
function Public:callback(func)