Skip to content

Commit 075b544

Browse files
committed
Implement TeamSpen210#210: Add OnFinished output to comp_numeric_transition.
1 parent ba8d856 commit 075b544

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* Prevent automatically packing models specified only as Hammer previews in various entities.
99
* Fix propcombine sometimes removing collisions entirely from component props.
1010
* Add an option to allow the sources for compiled models to be preserved.
11+
* #210: Add `OnFinished` output to `comp_numeric_transition`.
1112

1213
--------------------
1314

fgd/point/comp/comp_numeric_transition.fgd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,6 @@
5959
"sine" : "Sinusoidal"
6060
// "overshoot" : "Overshoot"
6161
]
62+
63+
output OnFinished(void) : "Fired once the transition has completed."
6264
]

transforms/comp_numeric_transition.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,12 @@ def compute_point(x: float) -> float:
172172
# Directly sets the location at every point.
173173
result = map(compute_point, points)
174174

175+
# Add the duration so the output fires after the transition finishes.
176+
for out in ent.outputs:
177+
if out.output.casefold() == 'onfinished':
178+
out.output = 'OnTrigger'
179+
out.delay += duration
180+
175181
last_inp = None
176182
for i, point in enumerate(result):
177183
if io_type == 'kv':

0 commit comments

Comments
 (0)