Make commands display in game chat (#297)

* Update friendly-fire.lua

* Update research.lua

* Update friendly-fire.lua

* Update speed.lua

* Update cheat-mode.lua

* Update bot-queue.lua

* Update train.lua

* Update pollution.lua

* Update commands.cfg

* Update commands.cfg

* Update commands.cfg

* Update cheat-mode.lua

* Update research.lua

* Update commands.cfg

* Update commands.cfg

* Update commands.cfg
This commit is contained in:
2024-06-06 03:33:56 +09:00
committed by GitHub
parent 8638504550
commit 779adff212
10 changed files with 48 additions and 36 deletions

View File

@@ -26,8 +26,9 @@ Commands.new_command('research-all', 'Set all research for your force.')
:set_defaults{force=function(player)
return player.force
end}
:register(function(_, force)
:register(function(player, force)
force.research_all_technologies()
game.print{'expcom-cheat.res', player.name}
return Commands.success
end)
@@ -37,7 +38,8 @@ Commands.new_command('toggle-always-day', 'Toggles always day in surface')
:set_defaults{surface=function(player)
return player.surface
end}
:register(function(_, surface)
:register(function(player, surface)
surface.always_day = not surface.always_day
return Commands.success{'expcom-cheat.day', surface.always_day}
game.print{'expcom-cheat.day', player.name, surface.always_day}
return Commands.success
end)