Update all code styles

This commit is contained in:
Cooldude2606
2024-09-28 01:56:54 +01:00
parent 5e2a62ab27
commit 292c1a1b68
194 changed files with 9817 additions and 9703 deletions

View File

@@ -9,26 +9,25 @@ require("modules.exp_legacy.config.expcore.command_general_parse")
--- Toggles spectator mode for the caller
-- @command spectate
Commands.new_command('spectate', {'expcom-spectate.description-spectate'}, 'Toggles spectator mode')
:register(function(player)
if Spectate.is_spectating(player) then
Spectate.stop_spectate(player)
else
Spectate.start_spectate(player)
end
end)
Commands.new_command("spectate", { "expcom-spectate.description-spectate" }, "Toggles spectator mode")
:register(function(player)
if Spectate.is_spectating(player) then
Spectate.stop_spectate(player)
else
Spectate.start_spectate(player)
end
end)
--- Enters follow mode for the caller, following the given player.
-- @command follow
-- @tparam LuaPlayer player The player that will be followed
Commands.new_command('follow', {'expcom-spectate.description-follow'}, 'Start following a player in spectator')
:add_alias('f')
:add_param('player', false, 'player-online')
:register(function(player, action_player)
if player == action_player then
return Commands.error{'expcom-spectate.follow-self'}
else
Spectate.start_follow(player, action_player)
end
end)
Commands.new_command("follow", { "expcom-spectate.description-follow" }, "Start following a player in spectator")
:add_alias("f")
:add_param("player", false, "player-online")
:register(function(player, action_player)
if player == action_player then
return Commands.error{ "expcom-spectate.follow-self" }
else
Spectate.start_follow(player, action_player)
end
end)