Revert/Convert ff_palermo.lua to take advantage of the old base_id.lua

This commit is contained in:
alaswell 2015-01-10 17:07:57 -07:00
parent d4eccc6d50
commit 9dcff94c02

View file

@ -1,20 +1,69 @@
-- ff_palermo.lua
-----------------------------------------------------------------------------
-- includes
-----------------------------------------------------------------------------
IncludeScript("base_id_new");
IncludeScript("base_id");
IncludeScript("base_respawnturret");
IncludeScript("base_location");
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
function startup()
id_startup()
SetGameDescription( "Invade Defend" )
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
-- set up team limits
local team = GetTeam( Team.kBlue )
team:SetPlayerLimit( 0 )
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 )
-- lower trigger_hurt damage in water
OutputEvent( "trigger_hurt", "SetDamage", "42" )
@ -103,8 +152,6 @@ function onroundreset()
attackers_palammotypeone.team = attackers
attackers_palgrenadepackone.team = attackers
end
bellbutton = func_button:new({})