;------------------------------------------------------------
;Add a parentname to zm trigger detector on 1999 ending boat
;------------------------------------------------------------

modify:
{
	match:
	{
		"classname"	"trigger_multiple"
		"targetname" "columbia_boat_zm_detector"
	}
	insert:
	{
		"parentname" "columbia_boat_train"
	}
}

;-------------
;Extend Warmup
;-------------

modify:
{
	match:
	{
		"classname"		"logic_case"
		"targetname"	"level_case"
	}
	delete:
	{
		"OnCase05"		"console,Command,say >>>Warmup ends in 60 seconds<<<,2,-1"
		"OnCase05"		"console,Command,say >>>Introduction Complete<<<,59,-1"
		"OnCase05"		"console,Command,mp_restartgame 1,62,-1"
	}
	insert:
	{
		"OnCase05"		"console,Command,say >>>Warmup ends in 80 seconds<<<,2,-1"
		"OnCase05"		"console,Command,say >>>Introduction Complete<<<,79,-1"
		"OnCase05"		"console,Command,mp_restartgame 1,82,-1"
	}
}

;--------------------------------------------------------------------
;STRIPPER CFG BY MOLTARD http://steamcommunity.com/id/0123456789ABC/
;--------------------------------------------------------------------
;CANT TAKE ZOMBIE ITEM AS CT (and vice-versa)
;---------------------------------------------

; CT Item Trigger push. Only Zombies and only CT not named plasmid_user get pushed

add:
{
	"origin" "-11520 -192 9096"
	"targetname" "filter_no_item_and_zombie"
	"Filter01" "filter_only_t"
	"Filter02" "filter_no_item"
	"filtertype" "1"
	"Negated" "0"
	"classname" "filter_multi"
}
modify:
{
	match:
	{
		"origin" "-3080 -13088 9112"
		"classname" "trigger_push"
		"hammerid" "2227273"
	}
	replace:
	{
		"filtername" "filter_no_item_and_zombie"
	}
}

; Zombie Item Trigger push. Only CT and only Zombies not named plasmid_user get pushed

add:
{
	"origin" "-11520 -192 9096"
	"targetname" "filter_no_item_and_human"
	"Filter01" "filter_only_ct"
	"Filter02" "filter_no_item"
	"filtertype" "1"
	"Negated" "0"
	"classname" "filter_multi"
}
modify:
{
	match:
	{
		"origin" "-4248 -13088 9112"
		"classname" "trigger_push"
		"hammerid" "2230208"
	}
	replace:
	{
		"filtername" "filter_no_item_and_human"
	}
}

;No telehop on 1999 stage last hold
modify:
{
	match:
	{
		"classname"	"trigger_multiple"
		"targetname"	"columbia_end_trigger"
	}
	insert:
	{
		"OnStartTouch"	"!activator,AddOutput,absvelocity 0 0 0,0,-1"
	}
}

;-----------------------------------------------------
; Fixes stage 4 hitbox being spawned multiple times
;-----------------------------------------------------
modify:
{
	match:
	{
		"targetname" "fontaine_2_targeter"
		"classname" "trigger_multiple"
	}
	insert:
	{
		"OnUser1" "fontaine_2_breakable,Kill,,5,-1"
	}
}

;-----------------------------------------------------
; Hides the zombie when the big daddy is picked up
;-----------------------------------------------------
modify:
{
	match:
	{
		"targetname" "big_daddy_wep"
		"classname" "weapon_knife"
	}
	insert:
	{
		"OnPlayerPickup" "!activator,AddOutput,rendermode 10,0,-1"
	}
}

;------------------------
;DYNAMIC ENTWATCH CONFIG
;------------------------
; Items levels
modify:
{
	match:
	{
		"classname" "logic_case"
		"targetname" "plasmid_electro_level_case"
	}
	insert:
	{
		"OnCase01" "console,Command,sm_ewsetshortname 20244 Electro (Lvl 1),0,-1"
		"OnCase02" "console,Command,sm_ewsetshortname 20244 Electro (Lvl 2),0,-1"
		"OnCase03" "console,Command,sm_ewsetshortname 20244 Electro (Lvl 3),0,-1"
	}
}
modify:
{
	match:
	{
		"classname" "logic_case"
		"targetname" "plasmid_incinerate_level_case"
	}
	insert:
	{
		"OnCase01" "console,Command,sm_ewsetshortname 20392 Incinerate (Lvl 1),0,-1"
		"OnCase02" "console,Command,sm_ewsetshortname 20392 Incinerate (Lvl 2),0,-1"
		"OnCase03" "console,Command,sm_ewsetshortname 20392 Incinerate (Lvl 3),0,-1"
	}
}
modify:
{
	match:
	{
		"classname" "logic_case"
		"targetname" "plasmid_cyclone_level_case"
	}
	insert:
	{
		"OnCase01" "console,Command,sm_ewsetshortname 20538 Sonic (Lvl 1),0,-1"
		"OnCase02" "console,Command,sm_ewsetshortname 20538 Sonic (Lvl 2),0,-1"
		"OnCase03" "console,Command,sm_ewsetshortname 20538 Sonic (Lvl 3),0,-1"
	}
}
modify:
{
	match:
	{
		"classname" "logic_case"
		"targetname" "plasmid_gravity_level_case"
	}
	insert:
	{
		"OnCase01" "console,Command,sm_ewsetshortname 5063227 Gravity (Lvl 1),0,-1"
		"OnCase02" "console,Command,sm_ewsetshortname 5063227 Gravity (Lvl 2),0,-1"
		"OnCase03" "console,Command,sm_ewsetshortname 5063227 Gravity (Lvl 3),0,-1"
	}
}
modify:
{
	match:
	{
		"classname" "logic_case"
		"targetname" "plasmid_frost_level_case"
	}
	insert:
	{
		"OnCase01" "console,Command,sm_ewsetshortname 5082173 Winter (Lvl 1),0,-1"
		"OnCase02" "console,Command,sm_ewsetshortname 5082173 Winter (Lvl 2),0,-1"
		"OnCase03" "console,Command,sm_ewsetshortname 5082173 Winter (Lvl 3),0,-1"
	}
}
modify:
{
	match:
	{
		"classname" "logic_case"
		"targetname" "plasmid_insect_level_case"
	}
	insert:
	{
		"OnCase01" "console,Command,sm_ewsetshortname 24222 Insect (Lvl 1),0,-1"
		"OnCase02" "console,Command,sm_ewsetshortname 24222 Insect (Lvl 2),0,-1"
		"OnCase03" "console,Command,sm_ewsetshortname 24222 Insect (Lvl 3),0,-1"
	}
}

;Max uses based on the current level
modify:
{
	match:
	{
		"classname" "logic_case"
		"targetname" "level_case"
	}
	insert:
	{
		; Electro - Only this one is initialized in it, added it to be safe
		"OnCase06" "console,Command,sm_setmaxuses 20244 4,10.1,-1"
	}
}
modify:
{
	match:
	{
		"classname" "logic_case"
		"targetname" "difficulty_case" ;Handling from stage 1 to 4 + special level 1999
	}
	insert:
	{
		; Electro
		"OnCase01"  "console,Command,sm_setmaxuses 20244 4,10.1,-1"
		"OnCase02" "console,Command,sm_setmaxuses 20244 5,10.1,-1"
		"OnCase03" "console,Command,sm_setmaxuses 20244 6,10.1,-1"
		"OnCase04" "console,Command,sm_setmaxuses 20244 6,10.1,-1"

		;Incinerate
		"OnCase01"  "console,Command,sm_setmaxuses 20392 5,10.1,-1"
		"OnCase02" "console,Command,sm_setmaxuses 20392 6,10.1,-1"
		"OnCase03" "console,Command,sm_setmaxuses 20392 6,10.1,-1"
		"OnCase04" "console,Command,sm_setmaxuses 20392 8,10.1,-1"

		;Sonic
		"OnCase01"  "console,Command,sm_setmaxuses 20538 3,10.1,-1"
		"OnCase02" "console,Command,sm_setmaxuses 20538 5,10.1,-1"
		"OnCase03" "console,Command,sm_setmaxuses 20538 5,10.1,-1"
		"OnCase04" "console,Command,sm_setmaxuses 20538 6,10.1,-1"

		;Gravity
		"OnCase01"  "console,Command,sm_setmaxuses 5063227 3,10.1,-1"
		"OnCase02" "console,Command,sm_setmaxuses 5063227 4,10.1,-1"
		"OnCase03" "console,Command,sm_setmaxuses 5063227 4,10.1,-1"
		"OnCase04" "console,Command,sm_setmaxuses 5063227 5,10.1,-1"

		;Winter
		"OnCase01"  "console,Command,sm_setmaxuses 5082173 3,10.1,-1"
		"OnCase02" "console,Command,sm_setmaxuses 5082173 4,10.1,-1"
		"OnCase03" "console,Command,sm_setmaxuses 5082173 4,10.1,-1"
		"OnCase04" "console,Command,sm_setmaxuses 5082173 5,10.1,-1"

		;Insect
		"OnCase01"  "console,Command,sm_setmaxuses 24222 3,10.1,-1"
		"OnCase02" "console,Command,sm_setmaxuses 24222 5,10.1,-1"
		"OnCase03" "console,Command,sm_setmaxuses 24222 6,10.1,-1"
		"OnCase04" "console,Command,sm_setmaxuses 24222 5,10.1,-1"
	}
}
;ADMIN Room: Plasmids set to max level
modify:
{
	match:
	{
		"classname" "func_button"
		"targetname" "admin_set_plasmids_max_level"
	}
	insert:
	{
		; Electro
		"OnPressed" "console,Command,sm_setmaxuses 20244 6,1.1,-1"
		;Incinerate
		"OnPressed" "console,Command,sm_setmaxuses 20392 8,1.1,-1"
		;Sonic
		"OnPressed" "console,Command,sm_setmaxuses 20538 6,1.1,-1"
		;Gravity
		"OnPressed" "console,Command,sm_setmaxuses 5063227 5,1.1,-1"
		;Winter
		"OnPressed" "console,Command,sm_setmaxuses 5082173 5,1.1,-1"
		;Insect
		"OnPressed" "console,Command,sm_setmaxuses 24222 5,1.1,-1"
	}
}



;; _

;; stage 4 - fix trigger

modify:
{
	match:
	{
		"model" "*261"
		"origin" "6784 -11444 940"
		"classname" "trigger_multiple"
		"hammerid" "5617899"
	}
	replace:
	{
		"model" "*298"
		"origin" "6784 -11324 936"
	}
}

;; stage 1999 - fix falling tower

modify:
{
	match:
	{
		"targetname" "columbia_lighthouse"
		"classname" "func_tracktrain"
	}
	replace:
	{
		"spawnflags" "3"
	}
}
modify:
{
	match:
	{
		"targetname" "columbia_lighthouse_path3"
		"classname" "path_track"
	}
	delete:
	{
		"OnPass" "columbia_lighthouse,AddOutput,spawnflags 128,0,-1"
	}
	insert:
	{
		"OnPass" "columbia_lighthouse,AddOutput,spawnflags 130,0,-1"
	}
}


