//=============================================================================
//
// SourceForts Classic 1.0 (Source SDK 2013) FGD
//
//=============================================================================

@include "base.fgd"

//-------------------------------------------------------------------------
//
// Specific game data for SourceForts
//
//-------------------------------------------------------------------------

//-------------------------------------------------------------------------
//
// Auxiliary Entities
//
//-------------------------------------------------------------------------

@BaseClass = TeamSelection
[
	TeamNum(choices) : "Team" : 2 : "Select the team whom this entity belongs to" =
	[
		2 : "Blue Team"
		3 : "Red Team"
	]
]

@BaseClass = BlockShape
[
	shape(choices) : "Type" : 6 : "Select the type of the block shape" =
	[
		1 : "Flat 2x3"
		2 : "Flat 1x2"
		3 : "Flat 1x5"
		4 : "Cube 1x1x1 (Auto-replaced as Flat 2x2 for compatibility)"
		5 : "Cuboid 1x1x2"
		6 : "Flat 2x2"
		7 : "Flat 1.5x4"
	]
]

// Zoc (2019-02-18): This exists only - and only for - compatibility with previous versions of SourceForts maps.
// Sadly, this isn't something that can easily be changed to TeamSelection :(
@BaseClass = teamskin
[
	skin(choices) : "Team" : 2 : "Select the team whom this entity belongs to" =
	[
		2 : "Blue Team"
		3 : "Red Team"
	]
]


//-------------------------------------------------------------------------
//
// Solid Entities
//
//-------------------------------------------------------------------------

@SolidClass base(EnableDisable, Parentname, Origin, Global) = func_healthcharger: "Wall health recharger"
[
	// dmdelay(integer) : "Deathmatch recharge delay" : 0
	_minlight(string) : "Minimum light level"

	// Outputs
	output OutRemainingHealth(float) : "Remaining Health."
	output OnPlayerUse(void) : "Fired when the player +USEs the charger."
]

@SolidClass base(Targetname, Parentname, Origin) = func_recharge: "Battery recharger"
[
	// dmdelay(integer) : "Deathmatch recharge delay" : 0
	_minlight(string) : "Minimum light level"

	spawnflags(flags) =
	[
		8192  : "Citadel recharger" : 0
	]

	// Inputs
	input Recharge(void) : "Recharge to full"

	// Outputs
	output OutRemainingCharge(float) : "Remaining Charge."
	output OnHalfEmpty(void) : "Half-Empty"
	output OnEmpty(void) : "Empty"
	output OnFull(void) : "Recharged to full."
	output OnPlayerUse(void) : "Fired when the player +USEs the charger."
]

@SolidClass base(Parentname, Targetname, Global) = func_vehicleclip: "Vehicle Clip"
[
	input Kill( void ) : "Removes this entity from the world"
]

@SolidClass base(func_movelinear) = func_lookdoor : "A door that moves either when looked by a targeted object or when " +
	"a target object comes near the door.  Behavior can be either based on viewing direction or proximity " +
	"alone, or on a combination of both.  If inverted the doors behavior will be the opposite."
[
	spawnflags(flags) =
	[
		8192  : "LookDoor Threshold" : 0
		16384 : "LookDoor Invert" : 0
		32768 : "LookDoor From Open" : 0
	]

	ProximityDistance(string) : "Proximity Distance" : "0.0"  : "If non-zero, proximity range over which door will move"
	ProximityOffset(string) : "Proximity Offset" : "0.0" : "Offset from the target object"
	FieldOfView(string) : "FieldOfView" : "0.0"  : "If non-zero, field of view over which door will move"

	// Input
	input InvertOn(void) : "InvertOn - when set behavior of door is inverted."
	input InvertOff(void) : "InvertOff - when set behavior of door is normal."
]

@SolidClass base(Trigger) = trigger_waterydeath:
	"A trigger volume that spawns leeches around entities inside it, and does damage to them until they die. "+
	"Used to prevent players entering deep water."
[
]

//-------------------------------------------------------------------------
//
// Point Entities
//
//-------------------------------------------------------------------------

@PointClass base(EnvGlobal) size(-8 -8 -8, 8 8 8) = env_global :
	"An entity to control a game-specific global states."
[
	globalstate(choices) : "Global State to Set" =
	[
		"gordon_precriminal" : "Gordon pre-criminal"
		"antlion_allied" : "Antlions are player allies"
//		"player_stealth" : "Player in APC is disguised as combine"
		"suit_no_sprint" : "Suit sprint function not yet enabled"
		"super_phys_gun" : "Super phys gun is enabled"
		"friendly_encounter" : "Friendly encounter sequence (lower weapons, etc.)"
//		"citizens_passive" : "Citizens are *not* player allies (cannot be commanded)"
		"gordon_invulnerable" : "Gordon is invulnerable"
		"no_seagulls_on_jeep" : "Don't spawn seagulls on the jeep"
	]
]

//-------------------------------------------------------------------------
//
// Tanks
//
//-------------------------------------------------------------------------
@BaseClass base(Targetname, Parentname, Origin, Angles, RenderFields, Global, Shadow) = BaseTank
[
	spawnflags(flags) =
	[
		1 : "Active" : 0
		16: "Only Direct" : 0
		32: "Controllable" : 0
		64: "Damage Kick" : 0
		1024: "NPC Controllable" : 0
		2048: "NPC Set Controller" : 0
		4096: "Allow friendlies to hit player" : 0
		32768: "Non-solid." : 0
	]

	control_volume(target_destination) : "Control Volume" : "" : "Name of a trigger the specifies the volume in which a player must be to control this tank."

	// Mainly for use with 1009 team settings (game_team_master)
	master(string) : "(Team) Master"

	yawrate(string) : "Yaw rate" : "30"
	yawrange(string) : "Yaw range" : "180"
	yawtolerance(string) : "Yaw tolerance" : "15"
	pitchrate(string) : "Pitch rate" : "0"
	pitchrange(string) : "Pitch range" : "0"
	pitchtolerance(string) : "Pitch tolerance" : "5"
	barrel(string) : "Barrel Length" : "0"
	barrely(string) : "Barrel Horizontal" : "0"
	barrelz(string) : "Barrel Vertical" : "0"
	spritesmoke(sprite) : "Smoke Sprite" : ""
	spriteflash(sprite) : "Flash Sprite" : ""
	spritescale(string) : "Sprite scale" : "1"
	rotatestartsound(sound) : "Rotate Start Sound" : ""
	rotatesound(sound) : "Rotate Loop Sound" : ""
	rotatestopsound(sound) : "Rotate Stop Sound" : ""
	firerate(string) : "Rate of Fire" : "1"
	bullet_damage(string) : "Damage Per Bullet" : "0" : "If set to 0, it'll use the base weapon bullet's damage."
	bullet_damage_vs_player(string) : "Damage Per Bullet Vs Player" : "0" : "If set to 0, it'll use the Damage Per Bullet value."
	persistence(string) : "Firing persistence" : "1" : "(Seconds) How long to keep firing at last known position after lose sight of target"
	persistence2(string) : "Firing persistence2" : "0" : "(Seconds) After lost enemy and persistence time has passed, how long to occasionally fire at enemy's last known position"
	firespread(choices) : "Bullet accuracy" : 0 =
	[
		0: "Perfect Shot"
		1: "Small cone"
		2: "Medium cone"
		3: "Large cone"
		4: "Extra-large cone"
	]
	minRange(string) : "Minmum target range" : "0"
	maxRange(string) : "Maximum target range" : "0"
	_minlight(string) : "Minimum light level"

	gun_base_attach(string) : "Gun Base Attachment" : "" : "If Parent is specified, this is the attachment point on the parent to aim from."
	gun_barrel_attach(string) : "Gun Barrel Attachment" : "" : "If Parent is specified, this is the attachment point on the parent to fire from. If you specify this, you'll want to specify the Gun Base Attachment too."
	gun_yaw_pose_param(string) : "Gun Yaw Pose Param" : "" : "If Parent + the Gun Pitch Pose Param is specified, then the gun itself will be invisible and the func_tank will steer a gun on the parent using the pose parameters."
	gun_yaw_pose_center(float) : "Gun Yaw Pose Center" : "0" : "The center yaw pose parameter of the gun on the parent"
	gun_pitch_pose_param(string) : "Gun Pitch Pose Param" : "" : "If Parent + the Gun Yaw Pose Param is specified, then the gun itself will be invisible and the func_tank will steer a gun on the parent using the pose parameters."
	gun_pitch_pose_center(float) : "Gun Pitch Pose Center" : "0" : "The center pitch pose parameter of the gun on the parent"

	ammo_count(integer) : "Ammunition Count" : -1 : "Only applies to player use. -1 = unlimited ammo."

	LeadTarget(choices) : "Lead Target" : "No" =
	[
		0 : "No"
		1 : "Yes"
	]

	npc_man_point(target_destination) : "NPC Man Point" : "" : "Point where NPC must stand to man this func_tank."
	playergraceperiod(float) : "Post-NPC Attack Grace Period" : "0" : "If specified, NPC's manning this func tank won't fire at the player, after firing at a non-player, for this amount of time."
	ignoregraceupto(float) : "Ignore Grace Upto" : "768" : "The player grace period is ignored if the player's under this distance from the func_tank."
	playerlocktimebeforefire(float) : "Player Lock Time" : "0" : "The tank must have the player as a target for this amount of time before it's allowed to fire."

	effecthandling(choices) : "Effect Handling" : 0 =
	[
		0 : "Use Individual Settings."
		1 : "AR2"
	]

	// Inputs
	input Activate(void) : "Turn the tank on"
	input Deactivate(void) : "Turn the tank off (go dormant)"
	input SetFireRate(string) : "How fast to fire (0 = don't fire)"
	input SetDamage(string) : "Set the Damage Per Bullet"
	input SetTargetPosition(string) : "World position that I should aim at"
	input SetTargetDir(vector) : "Direction to aim at."
	input SetTargetEntityName(string) : "Name of entity I should follow/attack"
	input SetTargetEntity(string) : "Entity I should follow/attack (output from other entity only)"
	input ClearTargetEntity(void) : "Clear the entity I should be attacking."
	input FindNPCToManTank(string) : "Find a nearby NPC to man this func_tank."
	input StartFindingNPCs(void) : "Start searching for NPCs to man this func_tank."
	input StopFindingNPCs(void) : "Stop searching for NPCs to man this func_tank."
	input ForceNPCOff(void) : "Force the NPC manning this func_tank (if any) to leave."
	input SetMaxRange(float) : "Set the max range of the func_tank."

	// Outputs
	output OnFire(void) : "Fires when the tank fires its bullets"
	output OnAquireTarget(void) : "Fires when target is newly in range and can be shot"
	output OnLoseTarget(void) : "Fires when when target goes out of range"
	output OnAmmoDepleted(void) : "Fires when tank runs out of ammo"
	output OnGotController(void) : "Fires when an NPC starts to control this tank. Players do NOT fire this input."
	output OnLostController(void) : "Fires when the NPC controller of the tank stops controlling it. Players do NOT fire this input."
	output OnGotPlayerController(void) : "Fires when a Player starts to control this tank. NPCs do NOT fire this input."
	output OnLostPlayerController(void) : "Fires when the Player controller of the tank stops controlling it. NPCs do NOT fire this input."
	output OnReadyToFire(void) : "Fires once when the tank is done waiting to fire between rounds"
]


@SolidClass base(BaseTank) = func_tank : "Brush Gun Turret"
[
	bullet(choices) : "Bullets" : 0 =
	[
		0: "None"
		1: "Pistol"
		2: "SMG1"
		3: "AR2"
		4: "Laser"
	]

	spawnflags(flags) =
	[
		8192: "Ignore range when making viewcone checks" : 0
		256 : "Aiming Assistance (Player Only)" : 0
	]
]


@SolidClass base(BaseTank) = func_tankpulselaser : "Brush Pulse Laser"
[
	PulseSpeed(float) : "Pulse Speed" : 1000 : "How fast does pulse travel"
	PulseColor(color255) : "Pulse Color" : "255 0 0" : "Color of the pulse"
	PulseWidth(float) : "Pulse Width" : "20" : "Width of the pulse"
	PulseLife(float) : "Pulse Life" : 2 : "(Seconds)  How long the pulse lasts"
	PulseLag(float) : "Pulse Lag" : "0.05" : "(Seconds)  How far behind is pulse tail"
	PulseFireSound(sound)   : "Pulse Fire Sound" : "" : "Sound played when pulse fires"
]


@SolidClass base(BaseTank) = func_tanklaser : "Brush Laser Turret"
[
	laserentity(target_destination) : "env_laser Entity"
]


@SolidClass base(BaseTank) = func_tankrocket : "Brush Rocket Turret"
[
	rocketspeed(float) : "Projectile speed" : 800 : "Speed the rocket will travel at."
]

@SolidClass base(BaseTank) = func_tankairboatgun : "Airboat Gun Turret"
[
	airboat_gun_model(target_destination) : "Name of a prop_dynamic which is the airboat gun model"
]

@SolidClass base(BaseTank) = func_tankapcrocket : "APC Rocket Turret"
[
	rocketspeed(float) : "Projectile speed" : 800 : "Speed the rocket will travel at."
	burstcount(integer) : "Burst shot count" : 10 : "Number of missiles to shoot in a burst"

	input DeathVolley(void) : "Fire a burst of rockets cause we're dying."
]


@SolidClass base(BaseTank) = func_tankmortar : "Brush Mortar Turret"
[
	iMagnitude(Integer) : "Explosion Magnitude" : 100
	firedelay(string) : "Shell travel time" : 2 : "How long after the turret fires before the shell impacts"
	firestartsound(sound) : "Firing start sound" : "" : "Sound of the mortar firing"
	fireendsound(sound) : "Firing end sound" : ""
	incomingsound(sound) : "Incoming Shell Sound" : "" : "Sound of the shell falling on the target"
	warningtime(float) : "Incoming warning time" : "1" : "How long before the shell impacts to play the warning sound"
	firevariance(float) : "Fire time variance" : "0" : "How much variability to add to fire rate (time +-)"

	input FireAtWill(void) : "Allow tank to fire next shot as soon as ready."
]

@SolidClass base(BaseTank) = func_tankphyscannister : "PhysCannister Turret"
[
	barrel_volume(target_destination) : "Barrel Volume" : "" : "Name of a trigger the specifies the volume in which cannisters must be placed."
]

//-------------------------------------------------------------------------
//
// Items
//
//-------------------------------------------------------------------------
@BaseClass color(0 0 200) base(Targetname, Angles, Shadow) sphere(fademindist) sphere(fademaxdist) = Item
[
	output OnPlayerTouch(void) : "Fires when the player touches this object"

	output OnCacheInteraction(void) : "This output fires when the player proves they have 'found' this item. Fires on: Player Touch (whether or not player actually acquires the item), Picked up by +USE, Picked up by Physcannon, Punted by Physcannon."

	fademindist(float) : "Start Fade Dist/Pixels" : -1 : "Distance at which the prop starts to fade (<0 = use fademaxdist). If 'Screen Space Fade' is selected, this represents the number of pixels wide covered by the prop when it starts to fade."
	fademaxdist(float) : "End Fade Dist/Pixels" : 0 : "Maximum distance at which the prop is visible (0 = don't fade out). If 'Screen Space Fade' is selected, this represents the *minimum* number of pixels wide covered by the prop when it fades."
	fadescale(float) : "Fade Scale" : 1 : "If you specify a fade in the worldspawn, or if the engine is running under dx7, then the engine will forcibly fade out props even if fademindist/fademaxdist isn't specified." +
						" This scale factor gives you some control over the fade. Using 0 here turns off the forcible fades."

	spawnflags(Flags) =
	[
		1 : "Start Constrained" : 0
	]
]

@PointClass base(Item) studio("models/items/battery.mdl") = item_battery : "HEV battery" []
@PointClass base(Item) studio("models/items/healthkit.mdl") = item_healthkit : "Small Health Kit" []
@PointClass base(Item) studio("models/healthvial.mdl") = item_healthvial : "Personal Health Kit" []

@PointClass base(Targetname, Parentname, Angles) studio("models/crate/crate.mdl") = item_ammo_crate : "Ammo Crate"
[
	skin(choices) : "Team" : 1 =
	[
		1 : "Both"
		2 : "Blue"
		3 : "Red"
	]
	ammotype(choices) : "Custom Ammo Crate" : 1 =
	[
		1 : "yes"
	]
	// Inputs
	input Kill(void) : "Remove the ammo crate"
	output OnUsed(void) : "Fires when +used by the player."
]

@PointClass base(Targetname, Parentname, Angles) studio( "models/props_combine/health_charger001.mdl" ) = item_healthcharger : "Health Charger"
[	
	TeamNum(choices) : "Team" : 1 =
	[
		1 : "Both"
		2 : "Blue"
		3 : "Red"
	]
	
	// dmdelay(integer) : "Deathmatch recharge delay" : 0
	_minlight(string) : "Minimum light level"

	// Outputs
	output OutRemainingHealth(float) : "Remaining Health."
	output OnPlayerUse(void) : "Fired when the player +USEs the charger."
]

@PointClass base(Targetname, Parentname, Angles) studio( "models/props_combine/suit_charger001.mdl" ) = item_suitcharger : "Battery recharger"
[
	TeamNum(choices) : "Team" : 1 =
	[
		1 : "Both"
		2 : "Blue"
		3 : "Red"
	]
	
	// dmdelay(integer) : "Deathmatch recharge delay" : 0
	_minlight(string) : "Minimum light level"

	spawnflags(flags) =
	[
		8192  : "Citadel recharger" : 0
		16384 : "Kleiner's recharger" : 0
	]

	// Inputs
	input Recharge(void) : "Recharge to full"

	// Outputs
	output OutRemainingCharge(float) : "Remaining Charge."
	output OnHalfEmpty(void) : "Half-Empty"
	output OnEmpty(void) : "Empty"
	output OnFull(void) : "Recharged to full."
	output OnPlayerUse(void) : "Fired when the player +USEs the charger."
]

//-------------------------------------------------------------------------
//
// Weapons
//
//-------------------------------------------------------------------------
@BaseClass color(0 0 200) base(Targetname, Angles) = Weapon
[
	spawnflags(Flags) =
	[
		1 : "Start constrained" : 0
	]

	output OnPlayerUse(void) : "Fires when the player +uses this weapon"
	output OnPlayerPickup(void) : "Fires when the player picks up this weapon"
	output OnNPCPickup(void) : "Fires when an NPC picks up this weapon"
]

@SolidClass base(Trigger) = trigger_rpgfire :
	"A volumetric trigger that triggers whenever an RPG is fired within it."
[
	// Outputs
	output OnTrigger(void) : "Fires while the trigger is activated"
]

@SolidClass base(Trigger) = trigger_vphysics_motion :
	"A volumetric trigger that affects the motion of vphysics objects that touch it."
[
	spawnflags(Flags) =
	[
		4096 : "Can move (through hierarchical attachment)" : 0
	]

	StartDisabled(choices) : "Start Disabled" : 0 =
	[
		0 : "No"
		1 : "Yes"
	]
	filtername(filterclass) : "Filter Name" : : "Filter to use to see if activator triggers me. See filter_activator_name for more explanation."

	SetGravityScale(float) : "Scale gravity of objects in the field." : "1.0"
	input SetGravityScale(float) : "Scale gravity of objects in the field."

	SetAdditionalAirDensity(float) : "Additional air density for drag" : "0"
	input SetAdditionalAirDensity(float) : "Additional air density for drag"

	SetVelocityLimit(float) : "Max velocity in field (0 disables)" : "0.0"
	input SetVelocityLimit(float) : "Max velocity in field."

	SetVelocityLimitDelta(float) : "Max amount to reduce velocity per second when it exceeds the velocity limit (0 disables)" : "0.0"
	input SetVelocityLimitDelta(float) : "Max amount to reduce velocity per second"

	input SetVelocityLimitTime(string) : "Accepts two arguments: the first is the new velocity limit, the second is the time it takes to ramp to that value"

	SetVelocityScale(float) : "Velocity scale/drag" : "1.0"
	input SetVelocityScale(float) : "Velocity scale/drag"

	SetAngVelocityLimit(float) : "Max angular velocity in field (degrees/s, 0 disables)" : "0.0"
	input SetAngVelocityLimit(float) : "Max angular velocity in field."

	SetAngVelocityScale(float) : "Angular Velocity scale/drag" : "1.0"
	input SetAngVelocityScale(float) : "Angular Velocity scale/drag"

	SetLinearForce(float) : "Linear force (0 disables)" : "0.0"
	input SetLinearForce(float) : "Linear force (0 disables)"

	SetLinearForceAngles(angle) : "Direction of linear force (Pitch Yaw Roll (Y Z X))" : "0 0 0"
//	input SetLinearForceAngles(angle) : "Direction of linear force (Pitch Yaw Roll (Y Z X))"

	ParticleTrailMaterial(string) : "Particle Trail Material" : : "Name of a material to use for the particle trail, no name means no particle trail"
	ParticleTrailLifetime(float) : "Particle Trail Lifetime" : 4 : "Lifetime of the particles to emit"
	ParticleTrailStartSize(float) : "Particle Trail Starting Sprite Size" : 2 : "Starting size of the sprite to emit"
	ParticleTrailEndSize(float) : "Particle Trail Ending Sprite Size" : 3 : "Ending size of the sprite to emit"

	// Inputs
	input	Enable(void) : "Enable the trigger."
	input	Disable(void): "Disable the trigger."
	input	Toggle(void) : "Toggle enable/disable."
]

@PointClass base(Targetname) size( 16 16 16) sphere() color( 255 255 0 ) = point_bugbait : "Bugbait sensor point"
[
	Enabled(choices) : "Start Enabled" : 1 =
	[
		0 : "No"
		1 : "Yes"
	]

	spawnflags(Flags) =
	[
		1: "Do not call antlions to position" : 0
		2: "Don't activate on thrown bugbait splashes" : 0
		4: "Don't activate on squeezed bugbait" : 0
	]

	radius(integer) : "Sensor Radius" : 512

	// Inputs
	input	Enable(void) : "Enable the sensor."
	input	Disable(void): "Disable the sensor."
	input	Toggle(void) : "Toggle the sensor."

	// Outputs
	output OnBaited(void) : "Fires when bugbait lands within a radius of the sensor"
]

@PointClass base(Targetname, Angles) size(16 16 16) line(255 255 255, targetname, target) color(247 181 82) = path_corner : "Generic path point"
[
	spawnflags(Flags) =
	[
		1: "Wait for retrigger" : 0
		2: "Teleport to THIS path_corner" : 0
	]
	target(target_destination) : "Next stop target"
	wait(integer) : "Wait here (secs)" : 0
	speed(integer) : "New Train Speed" : 0
	yaw_speed(integer) : "New Train rot. Speed" : 0

	// Inputs
	input SetNextPathCorner(string) : "Sets next pathcorner"

	// Outputs
	output OnPass(void) : "Fires when a path follower passes this point"
]

@PointClass base(Targetname) size(16 16 16) color(255 0 0) = path_corner_crash : "Helicopter Crash Path"
[
	target(target_destination) : "Next stop target"
]

//-------------------------------------------------------------------------
//
// Logic Entities
//
//-------------------------------------------------------------------------
@PointClass size( -4 -4 -4, 4 4 4 ) base(Targetname, Parentname) = env_rotorwash : "Rotorwash Effect"
[
	spawnflags(Flags) =
	[
		1 : "Ignore solid" : 0
	]

	input DoEffect(Void) : "Make a rotor puff"
]



@PointClass size( -4 -4 -4, 4 4 4 ) base(Targetname) = env_starfield : "Starfield effect"
[
	input TurnOn(void) : "Turn on"
	input TurnOff(void) : "Turn off"
	input SetDensity(float) : "Set the density of the starfield. It's a multiplier, so 1 is the default."
]

@PointClass size( -4 -4 -4, 4 4 4 ) base(Targetname, Parentname, Angles) = env_flare : "Flare"
[
	scale(float) : "Scale" : 1
	duration(float) : "Duration" : 30

	spawnflags(Flags) =
	[
		1 : "No DLight" : 0
		2 : "No Smoke" : 0
		4 : "Infinite" : 0
		8 : "Start off" : 0
	]

	input Start(float) : "Start"
	input Die(float) : "Die"
	input Launch(float) : "Launch the flare forward with the specified speed."
]


@PointClass base(Targetname, Parentname, Angles) = env_muzzleflash : "Muzzle Flash"
[
	parentattachment(string) : "Parent Attachment" : "" : "The name of an attachment on the parent to hierarchically attach to."
	scale(float) : "Scale" : "1" : "Size of the muzzle flash."

	input Fire(void) : "Fires the effect once."
]


@PointClass base(Targetname, Parentname) size(-4 -4 -4, 4 4 4) color(0 180 0) = env_terrainmorph :
	"Morphs terrain by pulling vertices along a normal.\n\n" +
	"Place this entity the desired distance from a terrain surface and set ANGLES " +
	"to the normal along which you want to pull the surface's vertices. If you set the INSTANT spawnflag, " +
	"the morph will take place instantly instead of over time.\n"
[
	startradius( integer ) : "Start Radius" : 500 : "Radius of the effect when morphing begins. Only this value is used" +
													"if the effect is flagged to occur instantly."
	goalradius( integer ) : "Goal Radius" : 100 : "Radius of the effect at the end of morphing. The radius of this effect will change from "+
												  "Start Radius to Goal Radius over the duration of this effect. This value is ignored if the effect is flagged to occur instantly."

	duration( integer ) : "Duration" : 3 : "The morph will take place over this period of time (seconds). Ignored if flagged to occur instantly"

	fraction( integer ) : "Displacement Fraction" : 1 : "If set to 1, the terrain surface will be pulled exactly to this entity's position." +
														" If set to 0.5, the surface will be pulled exactly half way to this entity's position. " +
														"If set to 2, the surface will be pulled to an imaginary point twice as far away as this entity. " +
														"(Any Displacement Fraction greater than 1.0 will result in clipping. The surface cannot be pulled beyond " +
														"This entity's position and any vertices attemping will clip to this entity's position. You may use this feature to create mesas.)"

	// Inputs
	input BeginMorph(void) : "Begin Morph"

	spawnflags(flags) =
	[
		1: "Instant" : 0
	]
]


//-------------------------------------------------------------------------
//
// Camera/monitor entities
//
//-------------------------------------------------------------------------
@PointClass base(Parentname, Angles) studioprop("models/editor/camera.mdl") = point_camera : "Camera"
[
	spawnflags(Flags) =
	[
		1 : "Start Off" : 0
	]

	targetname(target_source) : "Name" : : "The name that other entities refer to this entity by."
	FOV(float) : "FOV" : 90 : "Field of view in degrees"
//	resolution(float) : "resolution" : 256 : "width/height of the render target for the camera"
	UseScreenAspectRatio(choices) : "Screen Aspect Ratio" : 0 =
	[
		0 : "No"
		1 : "Yes"
	]
	fogEnable(choices) : "Fog Enable" : 0 =
	[
		0 : "No"
		1 : "Yes"
	]
	fogColor(color255) : "Fog Color" : "0 0 0"
	fogStart(float) : "Fog Start" : 2048 : "The near fog plane."
	fogEnd(float) : "Fog End" : 4096 : "The far fog/clipping plane."

	// Inputs
	input ChangeFOV(string) : "Changes camera's FOV over time"
	input SetOnAndTurnOthersOff(void) : "Turn the camera on, and turn all other cameras off."
	input SetOn(void) : "Turn the camera on."
	input SetOff(void) : "Turn the camera off."
]

@SolidClass base(func_brush) = func_monitor :
	"A monitor that renders the view from a given point_camera entity."
[
	target(target_destination) : "Camera name"

	// Inputs
	input Toggle(void) : "Toggle - If on, turn off, if off, turn on."
	input Enable(void) : "Enable."
	input Disable(void) : "Disable."
	input SetCamera(string) : "Sets the camera to use for this monitor. Takes the name of a point_camera entity in the map."
]


//-------------------------------------------------------------------------
//
// Vehicles.
//
//-------------------------------------------------------------------------
@BaseClass base(Targetname, Origin, Global, prop_static_base) = BaseVehicle
[
	vehiclescript(string) : "Vehicle Script File" : "scripts/vehicles/jeep_test.txt"
	actionScale(float) : "Scale of action input / framerate" : "1"

	// Inputs
	input Action(float) : "Set the speed of the action animation"

	input TurnOn(void) : "Turn on: Start engine & enable throttle"
	input TurnOff(void) : "Turn off: Stop engine, disable throttle, engage brakes."

	input Lock(void) : "Prevent the player from entering or exiting the vehicle."
	input Unlock(void) : "Re-allow the player to enter or exit the vehicle."
]


@BaseClass base(BaseVehicle) = BaseDriveableVehicle
[
	VehicleLocked(choices) : "Start locked" : 0 =
	[
		0 : "No"
		1 : "Yes"
	]

	// Outputs
	output PlayerOn(void) : "Player entered the vehicle"
	output PlayerOff(void) : "Player exited the vehicle"

	output PressedAttack(void) : "Player Pressed attack key"
	output PressedAttack2(void) : "Player Pressed attack2 key"

	output AttackAxis(string) : "State of attack button [0,1]"
	output Attack2Axis(string) : "State of attack2 button [0,1]"

	// Inputs
	input HandBrakeOn(void) : "Turns the handbrake on"
	input HandBrakeOff(void): "Releases the handbrake"
]

@PointClass base(BaseVehicle) studioprop() = prop_vehicle :
	"Studiomodel vehicle that can be driven via inputs."
[
	// Inputs
	input Steer(float) : "Steer the vehicle +/-1"
	input Throttle(float) : "Throttle +/-1"
]


@PointClass base(BaseDriveableVehicle) studioprop() = prop_vehicle_driveable :
	"Generic driveable studiomodel vehicle."
[
]

@PointClass base(Targetname, Angles) studio() = point_apc_controller : "APC Controller"
[
	spawnflags(flags) =
	[
		1 : "Active" : 0
	]

	yawrate(string) : "Yaw rate" : "30"
	yawtolerance(string) : "Yaw tolerance" : "15"
	pitchrate(string) : "Pitch rate" : "0"
	pitchtolerance(string) : "Pitch tolerance" : "20"
	rotatestartsound(sound) : "Rotate Start Sound" : ""
	rotatesound(sound) : "Rotate Loop Sound" : ""
	rotatestopsound(sound) : "Rotate Stop Sound" : ""
	minRange(string) : "Minmum target range" : "0"
	maxRange(string) : "Maximum target range" : "0"
	targetentityname(string) : "Name of entity I should follow/attack" : ""

	// Inputs
	input Activate(void) : "Turn the APC rockets on"
	input Deactivate(void) : "Turn the APC rockets off (go dormant)"

	// Outputs
	output OnFireAtTarget(void) : "Fires when a valid target is found and the APC should shoot rockets"
]

@PointClass base(BaseDriveableVehicle) studioprop() = prop_vehicle_apc :
	"APC with mounted guns, can only be driven by a vehicle driver or a npc_apcdriver."
[
	missilehint(target_destination) : "Missile Hint Target" : "" : "Name of one or more info_apc_missile_hint entities to use to determine what to hit."
	input FireMissileAt(target_destination) : "A target to fire a missile at"
	input Destroy(void) : "Causes the APC to blow up."
	output OnFiredMissile(void) : "Fired when the APC shoots a missile."
	output OnDeath(void) : "Fired when the APC is killed."
]

@SolidClass base(Targetname, Origin, Angles, EnableDisable) = info_apc_missile_hint :
	"Something that helps APC missiles guide. If the missile can hit the associated target entity"+
	"between the time it takes the current enemy to enter + leave the hint, then the missile will guide to the entity."
[
	target(target_destination) : "Target Entity" : "" : "The entity that the missile will guide towards if the conditions are met."
]

@PointClass base(BaseDriveableVehicle) studioprop() = prop_vehicle_jeep :
	"Driveable studiomodel jeep."
[
	input StartRemoveTauCannon(void) : "Start the tau removal sequence."
	input FinishRemoveTauCannon(void) : "Finish the tau removal sequence."
]

@PointClass base(BaseDriveableVehicle) studioprop() = vehicle_viewcontroller :
	"Vehicle hack to control player view"
[
	input ForcePlayerIn(string) : "Force the player into the vehicle. The animation to use can be specified in the parameter. Without a parameter, the player just teleports."
	input ForcePlayerOut(void) : "Force the player out of the vehicle."
]

@PointClass base(BaseDriveableVehicle) studioprop() = prop_vehicle_airboat :
	"Driveable studiomodel airboat."
[
	model(studio) : "World model" : "models/airboat.mdl"
	vehiclescript(string) : "Vehicle Script File" : "scripts/vehicles/airboat.txt"
	EnableGun(choices) : "Has Gun" : 0 : "Whether the airboat's gun is enabled or disabled." =
	[
		0 : "No"
		1 : "Yes"
	]
	input EnableGun(bool) : "Enables or disables the airboat gun and associated crosshair."
	input InputStartRotorWashForces(void) : "The airboat will start to be blown around by the helicopter rotor wash."
	input InputStopRotorWashForces(void) : "The airboat will no longer be blown around by the helicopter rotor wash."
]

@PointClass base(BaseDriveableVehicle) studioprop() = prop_vehicle_cannon :
	"Driveable studiomodel cannon."
[

]

@PointClass base(BaseDriveableVehicle) studioprop() = prop_vehicle_crane :
	"Driveable studiomodel crane."
[
	magnetname(target_destination) : "Magnet entity" : ""

	input ForcePlayerIn(void) : "Force the player to get into the crane. Only works in singleplayer."
]

@PointClass base(BaseDriveableVehicle, Parentname) studioprop() = prop_vehicle_prisoner_pod :
	"Combine prisoner pod that the player can ride in."
[
	model(studio) : "World model" : "models/vehicles/prisoner_pod.mdl"
	vehiclescript(string) : "Vehicle Script File" : "scripts/vehicles/prisoner_pod.txt"

	input Open(void) : "Plays the pod's open animation and unlocks the pod for entry or exit."
	input Close(void) : "Plays the pod's close animation and locks the pod for entry or exit."
	input EnterVehicle(void) : "Forces the activator (or player) into the pod."
	input EnterVehicleImmediate(void) : "Forces the activator (or player) into the pod without enter/exit animations."
	input ExitVehicle(void) : "Boots the prisoner out of the pod."

	output OnOpen(void) : "Fired when the pod is open enough to enter."
	output OnClose(void) : "Fired when the pod too closed to enter."
]


@PointClass base(Targetname) = phys_constraintsystem : "Used to manage a group of interacting constraints and keep them stable."
[
]

@PointClass base(BaseSpeaker) iconsprite("editor/ambient_generic.vmt") = env_speaker : "Announcement Speaker"
[
]

// @FilterClass base(BaseFilter) size(-8 -8 -8, 8 8 8) = filter_activator_team :
@FilterClass base(BaseFilter)  iconsprite("editor/filter_team.vmt") = filter_activator_team :
	"A filter that filters by the team of the activator."
[
	filterteam(choices) : "Filter Team Number" : 2 :
		"The team number to filter by.  If the filter mode is Allow, only entities whose "+
		"team number matches the given team will pass the filter. If the filter mode is Disallow, "+
		"all entities EXCEPT those whose team number matches the given team will pass the filter." =
	[
		2 : "Blue"
		3 : "Red"
	]
]

@PointClass base(prop_physics) studioprop() sphere(fademindist) sphere(fademaxdist) = prop_physics_respawnable :
	"This class is the same as prop_physics, except it respawns after it breaks"
[
	RespawnTime(float) : "Respawn Time" : 60 : "Amount in seconds this prop will respawn after it breaks."
]


@PointClass base(BlockShape,Angles,teamskin,Targetname,Parentname,RenderFields) studioprop() = prop_block : "Block"
[

]

@PointClass base(Angles,teamskin,Targetname,Parentname,RenderFields) studio("models/sf/2d_2x3.mdl") = prop_block_2d_2x3 [ ]
@PointClass base(Angles,teamskin,Targetname,Parentname,RenderFields) studio("models/sf/2d_1x2.mdl") = prop_block_2d_1x2 [ ]
@PointClass base(Angles,teamskin,Targetname,Parentname,RenderFields) studio("models/sf/2d_1x5.mdl") = prop_block_2d_1x5 [ ]
@PointClass base(Angles,teamskin,Targetname,Parentname,RenderFields) studio("models/sf/block_3d_1x1.mdl") = prop_block_3d_1x1 :  "Deprecated" [ ]
@PointClass base(Angles,teamskin,Targetname,Parentname,RenderFields) studio("models/sf/3d_1x2.mdl") = prop_block_3d_1x2 [ ]
@PointClass base(Angles,teamskin,Targetname,Parentname,RenderFields) studio("models/sf/2d_2x2.mdl") = prop_block_2d_2x2 [ ]
@PointClass base(Angles,teamskin,Targetname,Parentname,RenderFields) studio("models/sf/2d_1o5x4.mdl") = prop_block_2d_5x4 [ ]

@BaseClass base(Targetname,teamskin,Angles) = blockspawner
[
	input Spawn(void) : "Spawn"
]

@PointClass base(blockspawner,Parentname,BlockShape) iconsprite("editor/blockspawner.vmt") = env_block_spawner : "Block Spawner" [ ]
@PointClass base(blockspawner,Parentname) studio("models/sf/2d_2x3.mdl") = env_block_spawner_2d_2x3 [ ]
@PointClass base(blockspawner,Parentname) studio("models/sf/2d_1x2.mdl") = env_block_spawner_2d_1x2 [ ]
@PointClass base(blockspawner,Parentname) studio("models/sf/2d_1x5.mdl") = env_block_spawner_2d_1x5 [ ]
@PointClass base(blockspawner,Parentname) studio("models/sf/block_3d_1x1.mdl") = env_block_spawner_3d_1x1 : "Disabled by default" [ ]
@PointClass base(blockspawner,Parentname) studio("models/sf/3d_1x2.mdl") = env_block_spawner_3d_1x2 [ ]
@PointClass base(blockspawner,Parentname) studio("models/sf/2d_2x2.mdl") = env_block_spawner_2d_2x2 [ ]
@PointClass base(blockspawner,Parentname) studio("models/sf/2d_1o5x4.mdl") = env_block_spawner_2d_5x4 [ ]

@PointClass base(PlayerClass, Angles, teamskin) studio("models/editor/playerstart.mdl") = info_player_team_spawn :
	"This entity indicates the position and facing direction at which the player will spawn in a map. Any number of "+
	"info_player_team_spawn entities may be placed in a map."

[
]

@PointClass base(Targetname, Parentname, Angles, TeamSelection) studio("models/roller_spikes.mdl") color(255 0 0)  = prop_flag :
	"Flag"
[

	input Return(void) : "Force flag return"

	output OnGrab(void) : "Fired when this flag is taken"
	output OnScore(void) : "Fired when this flag is captured"
	output OnReturn(void) : "Fired when this flag is returned"
	output OnDrop(void) : "Fired when this flag is dropped"
]

@SolidClass base(TeamSelection) = func_flagzone : "Flag Capture Zone" []

@SolidClass = func_nofreeze :
	"No-freeze Area"
[
	TeamNum(choices) : "Team" : 1 =
	[
		1 : "Neither team can freeze"
		2 : "Blue can't freeze"
		3 : "Red can't freeze"
	]
]

@PointClass base(Targetname) iconsprite("editor/gamecontrol.vmt") color(0 255 255) = game_phase_control :
	"Entity to control game phase events."
[
	input ToBuildPhase(void) : "Force change to build"
	input ToCombatPhase(void) : "Force change to fight"

	output OnBuildPhase(void) : "Fired when switched to combat phase"
	output OnCombatPhase(void) : "Fired when switched to combat phase"
	output OnSwitchPhase(void) : "Fired on any mode switch"
]

@SolidClass = func_disposer : "Disposer" []

@SolidClass = func_disposer_selective : "Disposer Selective" 
[
	KillRed(choices) : "Dispose Red Team" : "Yes" =
	[
		0 : "No"
		1 : "Yes"
	]
	KillBlue(choices) : "Dispose Blue Team" : "Yes" =
	[
		0 : "No"
		1 : "Yes"
	]
	KillBlocks(choices) : "Dispose Blocks" : "Yes" =
	[
		0 : "No"
		1 : "Yes"
	]
	KillFlag(choices) : "Dispose Flag" : "Yes" =
	[
		0 : "No"
		1 : "Yes"
	]
]

@SolidClass base(Targetname, TeamSelection) = func_teamwall :
	"This entity defines an area where only one team can pass by, while the other team is repelled."
[
	FlagCarrierBlock(choices) : "Prevent players carrying the flag to pass through" : "Yes" =
	[
		0 : "No"
		1 : "Yes"
	]

	output OnTouch(void)						: "Fired when the door is touched by a player, friendly or enemy."
	output OnTouchFriendly(void)				: "Fired when the door is touched by a friendly player."
	output OnTouchFriendlyFlagHolder(void)		: "Fired when the door is touched by a friendly player holding the flag."
	output OnTouchEnemy(void)					: "Fired when the door is touched by an enemy player."
]