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

+18
View File
@@ -0,0 +1,18 @@
--[[-- Commands Module - Toggle Friendly Fire
- Adds a command that toggle all friendly fire
@commands Toggle Friendly Fire
]]
local Commands = require 'expcore.commands' --- @dep expcore.commands
require 'config.expcore.command_general_parse'
-- For Modded Server Use
Commands.new_command('toggle-friendly-fire', 'Toggle Friendly Fire')
:add_param('force', true, 'force')
:set_defaults{force=function(player)
return player.force
end}
:register(function(_, force)
force.friendly_fire = not force.friendly_fire
return Commands.success{'expcom-ff.ff', force.friendly_fire}
end)