; FUCK YA'LL GOTTA KNOW WHEN YOU LOST REEEEE!
modify:
{
	match:
	{
		"model" "*47"
		"targetname" "nuke_button"
		"classname" "func_button"
	}
	delete:
	{
		"OnPressed" "nuke_door,Close,,17,1"
	}
	insert:
	{
		"OnPressed" "nuke_door,FireUser1,,17,1"
	}
}
modify:
{
	match:
	{
		"model" "*48"
		"targetname" "nuke_door"
		"classname" "func_door"
	}
	insert:
	{
		"OnUser1" "!self,Close,,0.00,1"
		"OnUser1" "!self,Lock,,0.01,1"
	}
}

;----------------------------
; Edits on the Left way path
;----------------------------

;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Add a box so zombies can still pass if ct break the physic boxes
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

add:
{
	"model" "*57"
	"origin" "9724.91 3883.84 64"
	"physdamagescale" "1.0"
	"minhealthdmg" "0"
	"disablereceiveshadows" "0"
	"rendercolor" "255 255 255"
	"renderamt" "255"
	"rendermode" "0"
	"renderfx" "0"
	"pressuredelay" "0"
	"explodemagnitude" "0"
	"spawnobject" "0"
	"nodamageforces" "0"
	"gibdir" "0 0 0"
	"explosion" "0"
	"material" "1"
	"health" "0"
	"propdata" "0"
	"PerformanceMode" "0"
	"ExplodeRadius" "0"
	"ExplodeDamage" "0"
	"disableshadows" "0"
	"targetname" "AltWayZombies"
	"classname" "func_breakable"
}

;++++++++++++++++++++++++++++++++
; Armory Door not closed forever
;++++++++++++++++++++++++++++++++


modify:
{
	match:
	{
		"origin" "10928 2594 124"
		"classname" "trigger_once"
	}
	insert:
	{
		"OnStartTouch" "armory_door,Open,,10,1"
	}
}

;-----------------------------
; Edits on the Right way path
;-----------------------------

;++++++++++++++++++++++++++++++++++++++++++++
; Trainstation Door wont close automatically
;++++++++++++++++++++++++++++++++++++++++++++

modify:
{
	match:
	{
		"targetname" "warehouse_door_out"
		"classname" "func_door"
	}
	replace:
	{
		"wait" "-1"
	}
}

;+++++++++++++++++++++++++++++++++++++++++++++++
; It closes when zombies come, but reopen later
;+++++++++++++++++++++++++++++++++++++++++++++++

modify:
{
	match:
	{
		"origin" "12816 6400 384.5"
		"classname" "trigger_once"
	}
	insert:
	{
		"OnStartTouch" "warehouse_door_out,AddOutput,dmg 100,0,1"
		"OnStartTouch" "warehouse_door_out,Close,,0.02,1"
		"OnStartTouch" "warehouse_door_out,Open,,10,1"
		"OnStartTouch" "command,Command,say *** Zombie detected ! Train station gate closing ***,0,1"
		"OnStartTouch" "command,Command,say ...Train station gate opening in 5 seconds!!,5,1"
	}
}

;+++++++++++++++++++++++++++++++++++++++++++++++++++++
; The button that close the Warehouse reopen it later 
;+++++++++++++++++++++++++++++++++++++++++++++++++++++

modify:
{
	match:
	{
		"targetname" "warehouse_button_in_in"
		"classname" "func_button"
	}
	delete:
	{
		"OnPressed" "command,Command,say .. Train station gate close in 10 seconds!!,0,0"
	}
	insert:
	{
		"OnPressed" "warehouse_door_in,Open,,20,1"
		"OnPressed" "command,Command,say *** Generator room will open again in 15s. ***,5,1"
	}
}


;---------------
; Other changes
;---------------

;+++++++++++++++++++++++++++++++
; Give a name to func_breakable
;+++++++++++++++++++++++++++++++

modify:
{
	match:
	{
		"origin" "10234.9 2289.12 128"
		"classname" "func_breakable"
	}
	insert:
	{
		"targetname" "LeftBreakable"
	}
}

modify:
{
	match:
	{
		"origin" "10928 2576 122"
		"classname" "func_breakable"
	}
	insert:
	{
		"targetname" "LeftBreakable"
	}
}

modify:
{
	match:
	{
		"origin" "10939 5503 256"
		"classname" "func_breakable"
	}
	insert:
	{
		"targetname" "MiddleBreakable"
	}
}

modify:
{
	match:
	{
		"origin" "12292 3680 128"
		"classname" "trigger_once"
	}
	insert:
	{
		"targetname" "MiddleFence"
	}
}

modify:
{
	match:
	{
		"origin" "12924 3680 128"
		"classname" "trigger_once"
	}
	insert:
	{
		"targetname" "MiddleFence"
	}
}

;+++++++++++++++++++++++++++++++++++++++++++++++++++++
; Small Health change to the fence in the Middle Path
;+++++++++++++++++++++++++++++++++++++++++++++++++++++

modify:
{
	match:
	{
		"origin" "12376 3680 128"
		"classname" "trigger_once"
	}
	insert:
	{
		"OnStartTouch" "MiddleFence,RemoveHealth,750,0,1"
	}
}


;+++++++++++++++++++++++++++++++++++++++++++++++++++++
; Break obstacles for zombies when train is triggered
;+++++++++++++++++++++++++++++++++++++++++++++++++++++

modify:
{
	match:
	{
		"targetname" "trainstation_trains"
		"classname" "trigger_once"
	}
	insert:
	{
		"OnStartTouch" "LeftBreakable,Break,,10,1"
		"OnStartTouch" "MiddleBreakable,Break,,10,1"
		"OnStartTouch" "MiddleFence,Break,,10,1"
	}
}



;; _

;; increase nuke damage

modify:
{
	match:
	{
		"targetname" "nuke"
		"classname" "trigger_hurt"
	}
	replace:
	{
		"damage" "100000"
	}
}


