mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-29 12:16:37 +09:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user