Files

23 lines
908 B
Lua

-- coop_abducted_4 is a legacy map made for the old "coopgamemode" addon.
-- Its logic_auto runs this command during OnMapSpawn:
-- kickall "Use the CO-OP Gamemode!"
-- feedc0de_coop is the compatible replacement, so suppress only that exact
-- map-enforced kick. All other server and administrator kick commands retain
-- their normal behavior.
if SERVER then
CustomCoopOriginalRunConsoleCommand =
CustomCoopOriginalRunConsoleCommand or RunConsoleCommand
RunConsoleCommand = function(command, ...)
if command == "kickall" and game.GetMap() == "coop_abducted_4" then
local reason = select(1, ...)
if reason == "Use the CO-OP Gamemode!" then
print("[feedc0de_coop] Ignoring coop_abducted_4 legacy gamemode kick")
return
end
end
return CustomCoopOriginalRunConsoleCommand(command, ...)
end
end