Skip to content

Commit

Permalink
Add missing hot_potato keyvalues, other changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vrad-exe committed Aug 31, 2023
1 parent 61e41c7 commit b697a92
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 18 deletions.
23 changes: 17 additions & 6 deletions fgd/point/hot/hot_potato.fgd
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
@PointClass base(BasePropPhysics, SRCModel)
appliesto(P2)
studioprop()
line(255 255 0, targetname, spawnername)
= hot_potato: "A glass futbol variant which explodes and can't be thrown. Spawning this from a hot_potato_spawner allows it to have a timer set."
[
model[-srctools](studio) : "[H] Model" : "models/props/futbol.mdl" : "The model to display in Hammer. VScript must be used to set the in-game model."
model[+srctools](studio) : "[HA] Custom Model" : "models/props/futbol.mdl" : "The model to display in Hammer, and the custom model to use if Override Model is enabled."
skin(integer) : "Skin" : 0 : "Skin on the model to use."

@PointClass base(prop_glass_futbol, prop_exploding_futbol)
appliesto(P2)
studioprop("models/props/futbol.mdl")
line(255 255 0, targetname, spawnername) = hot_potato: "This uses the futbol model. It can be carried around, but on impact it explodes, similar to prop_exploding_futbols."
[
]
explodeontouch(boolean) : "Explode on touch" : 1 : "If the hot potato should explode when it touches something."
ShouldRespawn(boolean) : "Should respawn" : 1 : "If the hot potato should respawn at the specified spawner when destroyed. Not specifying a spawner is functionally identical to turning this off, but causes extra console spam."
spawnername(target_destination) : "Spawner Name" : : "Name of a hot_potato_spawner for this hot potato to respawn in once broken."

// Inputs
input Explode(void) : "Explodes the hot potato."
input Dissolve(void) : "Fizzles the hot potato. Doesn't fire the OnFizzled output."
]
4 changes: 2 additions & 2 deletions fgd/point/hot/hot_potato_catcher.fgd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

@PointClass base(prop_glass_futbol_socket)
@PointClass base(hot_potato_socket)
appliesto(P2)
studio("models/editor/axis_helper.mdl") = hot_potato_catcher: "Catches 'hot potatos' and fires an output."
= hot_potato_catcher: "Invisible entity that holds 'hot potatos' and fires an output. Identical to hot_potato_socket, except it doesn't play any sounds when a hot potato is inserted."
[
]
10 changes: 7 additions & 3 deletions fgd/point/hot/hot_potato_socket.fgd
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

@PointClass base(prop_glass_futbol_socket)
@PointClass base(BaseEntityPoint)
appliesto(P2)
studio("models/editor/axis_helper.mdl") = hot_potato_socket: "Catches (bombs?) and fires an output."
studio("models/editor/angle_helper.mdl")
= hot_potato_socket: "Invisible entity that holds 'hot potatos' and fires an output. When a hot potato comes close it will snap into place."
[

// Outputs
output OnHotPotatoReleased(void) : "Player has taken the hot potato out of this socket."
output OnHotPotatoCaught(void) : "This socket has captured a hot potato."
]
20 changes: 17 additions & 3 deletions fgd/point/hot/hot_potato_spawner.fgd
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@

@PointClass base(prop_glass_futbol_spawner)
@PointClass base(BaseEntityAnimating)
appliesto(P2)
studioprop("models/props/futbol_dispenser.mdl") = hot_potato_spawner: "Catches 'hot potatos' and fires an output."
studioprop("models/props/futbol_dispenser.mdl")
= hot_potato_spawner: "Spawns 'hot potatos'. Will re-create a hot potato when its created hot potato breaks."
[
startwithhotpotato(boolean) : "Start with Hot Potato" : 1 : "Set true if this spawner starts with a hot potato in it. " +
"Set to false if this spawner's hot potato will be manually placed in the map."
IsTimed(boolean) : "Is Timed" : 0 : "If enabled, the hot potatos created from this spawner will automatically explode after a set amount of time."
Timer(float) : "Timer" : "10" : "Length of the timer, in seconds."
TimerIndicatorName(target_destination) : "Timer Indicator Name" : : "Name of a prop_indicator_panel that should show the time remaining."

// Inputs
input ForceSpawn(void) : "Spawns a new hot potato. Usually isn't necessary, because hot potatos respawn automatically if broken."

// Outputs
output OnHotPotatoSpawned(void) : "Created a new hot potato."
output OnHotPotatoGrabbed(void) : "Player has taken the hot potato out of this spawner."
output OnHotPotatoCaught(void) : "Player has put the hot potato back into this spawner."
output OnHotPotatoReleased(void) : "Player has grabbed a hot potato from or put a hot potato back into this spawner."
]
4 changes: 3 additions & 1 deletion fgd/point/prop/prop_exploding_futbol.fgd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@PointClass base(BaseEntityPhysics, SRCModel)
@PointClass base(BasePropPhysics, SRCModel)
appliesto(P2)
studioprop()
= prop_exploding_futbol: "The bombs used by Wheatley."
Expand All @@ -8,9 +8,11 @@
skin(integer) : "Skin" : 0 : "Skin on the model to use."

explodeontouch(boolean) : "Explode on touch" : 1 : "If the bomb should explode when it touches something."
// Keyvalues dump includes ShouldRespawn and SpawnerName keyvalues but they don't seem to work

// Inputs
input Explode(void) : "Explodes the bomb."
input Dissolve(void) : "Fizzles the bomb. Doesn't fire the OnFizzled output."

@resources // Assumed
[
Expand Down
5 changes: 3 additions & 2 deletions fgd/point/prop/prop_glass_futbol.fgd
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
@PointClass base(BasePropPhysics, SRCModel)
appliesto(P2)
studioprop()
line(255 255 0, targetname, spawnername) = prop_glass_futbol: "A fragile glass ball that the player can pick up and toss. On contact with surfaces it will shatter, and it can be put into holders to power them. It is affected by gel, but the shattering means this has little effect."
line(255 255 0, targetname, spawnername)
= prop_glass_futbol: "A fragile glass ball that the player can pick up and toss. On contact with surfaces it will shatter, and it can be put into holders to power them. It is affected by gel, but the shattering means this has little effect."
[
model[-srctools](studio) : "[H] Model" : "models/props/futbol.mdl" : "The model to display in Hammer. VScript must be used to set the in-game model."
model[+srctools](studio) : "[HA] Custom Model" : "models/props/futbol.mdl" : "The model to display in Hammer, and the custom model to use if Override Model is enabled."
skin(integer) : "Skin" : 0 : "Skin on the model to use."

spawnername(target_destination) : "Spawner Name" : : "Name of prop_glass_futbol_spawner for this futbol to respawn in once broken."
spawnername(target_destination) : "Spawner Name" : : "Name of a prop_glass_futbol_spawner for this futbol to respawn in once broken."



Expand Down
2 changes: 1 addition & 1 deletion fgd/point/prop/prop_glass_futbol_spawner.fgd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@PointClass base(BaseEntityPoint)
@PointClass base(BaseEntityAnimating)
appliesto(P2)
studioprop("models/props/futbol_dispenser.mdl") = prop_glass_futbol_spawner: "Spawns futbols. Will re-create a futbol when its created futbol breaks."
[
Expand Down
11 changes: 11 additions & 0 deletions transforms/p2_custom_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,23 @@
"npc_personality_core",
"prop_exploding_futbol",
"prop_glass_futbol",
"hot_potato",

# Not supported:
# prop_testchamber_door - reverses animations
# prop_tractor_beam - breaks animations
# prop_linked_portal_door - breaks animations
# prop_monster_box - swaps models dynamically

# Not tested:
# prop_glass_futbol_spawner
# hot_potato_spawner
# prop_portal_stats_display
# prop_rocket_tripwire
# prop_telescopic_arm
# prop_scaled_cube (Sixense)
# prop_contraption_cube (Edu)
# prop_contraption_cube_button (Edu)
]

@trans('Portal 2 Custom Models')
Expand Down

0 comments on commit b697a92

Please sign in to comment.