Skip to content

Commit

Permalink
Move list of player inputs to base class, add some additional ones.
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSpen210 committed Jan 8, 2023
1 parent 5c28f05 commit 8f1add9
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 36 deletions.
52 changes: 52 additions & 0 deletions fgd/point/logic/PlayerInputs.fgd
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
@BaseClass = PlayerInputs: "The inputs that can be fired on the player, for entities that pass through those."
[
input IgnoreFallDamage[HL2](float) : "Prevent the player from taking fall damage for [n] seconds, but reset back to taking fall damage after the first impact (so players will be hurt if they bounce off what they hit)."
input IgnoreFallDamageWithoutReset[HL2](float) : "Absolutely prevent the player from taking fall damage for [n] seconds. "

input SetHUDVisibility(bool) : "Set if the player's HUD is visible or not."
input SetFogController(target_destination) : "Set the current env_fog_controller entity."
input SetPostProcessController[MBase](target_destination) : "Set the current postprocess_controller entity."
input SetColorCorrectionController[since_L4D, MBase](target_destination) : "Set the current color_correction entity."

input HandleMapEvent(string) : "Generic hook for triggering game/mod-specific events like achievements for a player."
input SetSuppressAttacks(bool) : "Prevent or re-allow the player from being able to use weapons."

input DisableFlashlight[HL2](void) : "Disable the player's flashlight."
input EnableFlashlight[HL2](void) : "Disable the player's flashlight."
input ForceDropPhysObjects[HL2](void) : "Force the player to drop any physics objects they're carrying"

input SetBodyGroup(integer) : "HACK: Sets this player's body group (from 0 - n). You'd better know what you are doing!"
input Ignite(void) : "Ignite, burst into flames"
input IgniteLifetime(float) : "Ignite, with a parameter lifetime."
input IgniteNumHitboxFires(integer) : "Ignite, with a parameter number of hitbox fires."
input IgniteHitboxFireScalev(float) : "Ignite, with a parameter hitbox fire scale."

input GiveWeapon[HL2](string) : "Gives the player a weapon of the specified class name."
input DropWeapon[HL2](string) : "Causes the player to drop its current weapon in front of them."

input AddArmor[MBase](integer) : "Adds to the player's current armor value. " +
"Total armor cannot exceed 100 unless a different value is set in logic_playerproxy."
input RemoveArmor[MBase](integer) : "Removes from the player's current armor value."
input SetArmor[MBase](integer) : "Sets the player's current armor value. " +
"Cannot exceed 100 unless a different value is set in logic_playerproxy."

input AddAuxPower[MBase](float) : "Adds to the player's current aux power. Total power cannot exceed 100."
input RemoveAuxPower[MBase](float) : "Removes from the player's current aux power. Total power cannot exceed 100."
input SetAuxPower[MBase](float) : "Sets the player's current aux power. Total power cannot exceed 100."

input TurnFlashlightOn[MBase](void) : "Turns the player's flashlight on."
input TurnFlashlightOff[MBase](void) : "Turns the player's flashlight off."

input SquadForceSummon[MBase](void) : "Forces the player's squad to be resummoned."
input SquadForceGoTo[MBase](target_destination) : "Forces the player's squad to go to a specific point or entity."

input EnableGeigerCounter[MBase](void) : "Allows the player's geiger counter to respond to radiation if it was prevented before."
input DisableGeigerCounter[MBase](void) : "Prevents the player's geiger counter from responding to radiation."

input ShowSquadHUD[MBase](void) : "Shows the player's squad status HUD if it was hidden before."
input HideSquadHUD[MBase](void) : "Hides the player's squad status HUD."

input SetHUDVisibility[MBase](bool) : "Sets whether the HUD should be disabled. Also disables most forms of weapon switching."
input SetSuppressAttacks[MBase](bool) : "Sets whether attacks should be suppressed."
]

39 changes: 3 additions & 36 deletions fgd/point/logic/logic_playerproxy.fgd
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@PointClass base(BaseEntityPoint, DamageFilter)
@BaseClass base(PlayerInputs) appliesto(MBase) = _playerproxy_inputs: "Unknown inputs and KV are passed throught to the player." []

@PointClass base(BaseEntityPoint, DamageFilter, _playerproxy_inputs)
color(200 0 0)
iconsprite("editor/logic_playerproxy.vmt")
autovis(Point Entities, Globals, Player Proxy)
Expand Down Expand Up @@ -80,40 +82,5 @@
output OnUnDuck[since_P2](void) : "Fired when a player releases the duck button."
output OnJump[since_P2](void) : "Fired when a player jumps."

// These are I/O/KV on the player itself. They're exposed through logic_playerproxy in Mapbase as it now passes unknown inputs and KV to the player.
input SetBodyGroup[MBase](integer) : "HACK: Sets this player's body group (from 0 - n). You'd better know what you are doing!"
input Ignite[MBase](void) : "Ignite, burst into flames"
input IgniteLifetime[MBase](float) : "Ignite, with a parameter lifetime."
input IgniteNumHitboxFires[MBase](integer) : "Ignite, with a parameter number of hitbox fires."
input IgniteHitboxFireScalev[MBase](float) : "Ignite, with a parameter hitbox fire scale."

input GiveWeapon[MBase](string) : "Gives the player a weapon of the specified class name."
input DropWeapon[MBase](string) : "Causes the player to drop its current weapon in front of it."

input AddArmor[MBase](integer) : "Adds to the player's current armor value. " +
"Total armor cannot exceed 100 unless a different value is set in logic_playerproxy."
input RemoveArmor[MBase](integer) : "Removes from the player's current armor value."
input SetArmor[MBase](integer) : "Sets the player's current armor value. " +
"Cannot exceed 100 unless a different value is set in logic_playerproxy."

input AddAuxPower[MBase](float) : "Adds to the player's current aux power. Total power cannot exceed 100."
input RemoveAuxPower[MBase](float) : "Removes from the player's current aux power. Total power cannot exceed 100."
input SetAuxPower[MBase](float) : "Sets the player's current aux power. Total power cannot exceed 100."

input TurnFlashlightOn[MBase](void) : "Turns the player's flashlight on."
input TurnFlashlightOff[MBase](void) : "Turns the player's flashlight off."

input SquadForceSummon[MBase](void) : "Forces the player's squad to be resummoned."
input SquadForceGoTo[MBase](target_destination) : "Forces the player's squad to go to a specific point or entity."

input EnableGeigerCounter[MBase](void) : "Allows the player's geiger counter to respond to radiation if it was prevented before."
input DisableGeigerCounter[MBase](void) : "Prevents the player's geiger counter from responding to radiation."

input ShowSquadHUD[MBase](void) : "Shows the player's squad status HUD if it was hidden before."
input HideSquadHUD[MBase](void) : "Hides the player's squad status HUD."

input SetHUDVisibility[MBase](bool) : "Sets whether the HUD should be disabled. Also disables most forms of weapon switching."
input SetSuppressAttacks[MBase](bool) : "Sets whether attacks should be suppressed."

@resources []
]

0 comments on commit 8f1add9

Please sign in to comment.