Skip to content

Restore onExpiration() hook for lifetime system - #2955

Merged
daid merged 1 commit into
daid:masterfrom
dkapell:lifetimeOnExpire
Nov 25, 2026
Merged

daid merged 1 commit into
daid:masterfrom
dkapell:lifetimeOnExpire

Conversation

@dkapell

@dkapell dkapell commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Legacy implemented an onExpiration() hook for probes, but that functionality was never finished in ECS, so this adds the call to the the hook on lifetime expiration.

tested with:

testEntity = createEntity();
testEntity:setCallSign('Testing');
testEntity.components.lifetime = {maximum=3}
testEntity:onExpiration(function(entity)
    print(entity:getCallSign())
end)

which prints "Testing" to the console 3 seconds after the scenario starts.

@dkapell
dkapell marked this pull request as ready for review November 23, 2026 23:36
@dkapell dkapell changed the title Restore on_expire hook for lifetime system Restore onExpiration() hook for lifetime system Nov 24, 2026
@daid
daid merged commit 0f30242 into daid:master Nov 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants