Feature Update (#237)

See PR for details, there are too many to be included here.
This commit is contained in:
phidias authored and GitHub committed 2023-08-15 18:47:34 +01:00
1 parent cdd34ebaea
commit 46f6215d94
64 files changed
+4417 -289

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
--[[-- Commands Module - Set game speed
- Adds a command that allows changing game speed
@commands Set game speed
]]
local Commands = require 'expcore.commands' --- @dep expcore.commands
require 'config.expcore.command_general_parse'
Commands.new_command('game-speed', 'Set game speed')
:add_param('amount', 'number-range', 0.2, 1)
:set_flag('admin_only')
:register(function(_, amount)
game.speed = math.round(amount, 3)
return Commands.success{'expcom-speed.result', string.format('%.3f', amount)}
end)