From e1902e6f36cc90650840283448d0697951f4381c Mon Sep 17 00:00:00 2001 From: alaswell Date: Tue, 20 Jan 2015 19:12:31 -0700 Subject: [PATCH] better custom startup() than simply overwriting; see http://forums.fortress-forever.com/showthread.php?t=23070 --- maps/ff_palermo.lua | 56 ++++----------------------------------------- 1 file changed, 5 insertions(+), 51 deletions(-) diff --git a/maps/ff_palermo.lua b/maps/ff_palermo.lua index 61cb4c4..e4828e9 100644 --- a/maps/ff_palermo.lua +++ b/maps/ff_palermo.lua @@ -16,59 +16,13 @@ DEFENDERS_OBJECTIVE_ONCAP = true DEFENDERS_OBJECTIVE_ONCARRIER = false --set to true to follow flag when carried DEFENDERS_OBJECTIVE_ONFLAG = false --set to true to follow flag ALWAYS +-- custom startup +local startup_base = startup + function startup() - SetGameDescription( "Invade Defend" ) - - -- set up team limits - local team = GetTeam( Team.kBlue ) - team:SetPlayerLimit( 0 ) + startup_base() - team = GetTeam( Team.kRed ) - team:SetPlayerLimit( 0 ) - - team = GetTeam( Team.kYellow ) - team:SetPlayerLimit( -1 ) - - team = GetTeam( Team.kGreen ) - team:SetPlayerLimit( -1 ) - - -- CTF maps generally don't have civilians, - -- so override in map LUA file if you want 'em - local team = GetTeam(Team.kBlue) - team:SetClassLimit(Player.kCivilian, -1) - - team = GetTeam(Team.kRed) - team:SetClassLimit(Player.kCivilian, -1) - - -- set them team names - SetTeamName( attackers, "Attackers" ) - SetTeamName( defenders, "Defenders" ) - - -- start the timer for the points - AddScheduleRepeating("addpoints", PERIOD_TIME, addpoints) - - setup_door_timer("start_gate", INITIAL_ROUND_DELAY) - - cp1_flag.enabled = true - for i,v in ipairs({"cp1_flag", "cp2_flag", "cp3_flag", "cp4_flag", "cp5_flag", "cp6_flag", "cp7_flag", "cp8_flag"}) do - local flag = GetInfoScriptByName(v) - if flag then - flag:SetModel(_G[v].model) - flag:SetSkin(teamskins[attackers]) - if i == 1 then - flag:Restore() - else - flag:Remove() - end - end - end - - flags_set_team( attackers ) - - ATTACKERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) - UpdateDefendersObjective() - UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY ) - + -- palermo specific stuff -- lower trigger_hurt damage in water OutputEvent( "trigger_hurt", "SetDamage", "42" ) end