Skip to content

Add a defining for AutoDeath on whether it can trigger when in Limbo state or as a passenger#2284

Open
DeathFishAtEase wants to merge 8 commits into
Phobos-developers:developfrom
DeathFishAtEase:AD.AllowLimboed
Open

Add a defining for AutoDeath on whether it can trigger when in Limbo state or as a passenger#2284
DeathFishAtEase wants to merge 8 commits into
Phobos-developers:developfrom
DeathFishAtEase:AD.AllowLimboed

Conversation

@DeathFishAtEase

@DeathFishAtEase DeathFishAtEase commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

https://www.phoboscn.top/t/topic/609

A unit designed with AutoDeath.OnOwnerChange, when serving as a passenger of a transport with OpenTopped=true, happens to need Passengers.SyncOwner to sync the passenger's owner change to prevent them from continuing to attack the transport's new owner, but they do not want this handling to trigger the passenger's self-destruction.

  • AutoDeath.AllowLimboed can be used to define whether AutoDeath is triggered when the unit is in limbo state.
  • AutoDeath.AllowPassenger can be used to define whether the unit triggers AutoDeath when it is a passenger.

In rulesmd.ini:

[SOMETECHNO]                                   ; TechnoType
AutoDeath.AllowLimboed=true                    ; boolean
AutoDeath.AllowPassenger=true                  ; boolean

Tip

If the unit is a passenger in a transport with OpenTopped=false, then self-destruction will only be triggered when both AutoDeath.AllowLimboed and AutoDeath.AllowPassenger are true.

@DeathFishAtEase DeathFishAtEase self-assigned this Jul 6, 2026
@DeathFishAtEase DeathFishAtEase added the ⚙️T1 T1 maintainer review is sufficient label Jul 6, 2026
@phoboscn-bot

Copy link
Copy Markdown

To Chinese users:
This pull request has been mentioned on Phobos CN. There might be relevant details there:

致中文用户:
此拉取请求已在 Phobos CN 上被提及。那里可能有相关详细信息:

https://www.phoboscn.top/t/topic/647/1

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

The technos in OpenTopped transport units do not have their InLimbo set to true
@DeathFishAtEase DeathFishAtEase changed the title Add a definition flag for whether AutoDeath can trigger in Limbo state Add a defining for AutoDeath on whether it can trigger when in Limbo state or as a passenger Jul 6, 2026
@DeathFishAtEase

Copy link
Copy Markdown
Collaborator Author

After more exploration, it was found that the original handling's support for objects in Limbo state was not complete (I previously thought #830 had handled this part, but it was actually support for LimboDelivery) and this leads to the fact that even if the implementation is completed, the two flags cannot be set to true by default, otherwise it will break existing behavior; this PR is shelved for now.

@DeathFishAtEase DeathFishAtEase marked this pull request as draft July 7, 2026 04:40
@DeathFishAtEase

Copy link
Copy Markdown
Collaborator Author

In any case, supporting Limbo scenarios for more AutoDeath conditions is something that should have been done but has not been completed. This PR effectively fulfills the corresponding feature request, and passengers inside OpenTopped=true transports are also not affected by the original defects. This PR only provides the toggle statements; how the toggles should behave when on or off should be addressed outside of this PR.

@DeathFishAtEase DeathFishAtEase marked this pull request as ready for review July 7, 2026 08:05
@DeathFishAtEase

Copy link
Copy Markdown
Collaborator Author

Tested by: https://www.phoboscn.top/t/topic/647/4?u=noble_fish

image

[DRON]
AutoDeath.Behavior=kill
AutoDeath.AfterDelay=200
AutoDeath.AllowLimboed=no

[SQD]
AutoDeath.Behavior=kill
AutoDeath.AfterDelay=200
AutoDeath.AllowLimboed=no

image

[E1]
AutoDeath.Behavior=kill
AutoDeath.OnOwnerChange=yes
AutoDeath.AllowLimboed=no
AutoDeath.AllowPassenger=no

[BFRT]
InitialPayload.Types=E1
InitialPayload.Nums=5
Passengers.SyncOwner=yes

@DeathFishAtEase DeathFishAtEase added Tested Will be merged in 24h This PR will be merged in 24 hours if no one has further instructions. and removed Needs testing labels Jul 7, 2026
// Self-destruction must be enabled
const auto howToDie = pTypeExt->AutoDeath_Behavior.Get();

// You're already dead

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should comment specific design rationale

@TaranDahl

Copy link
Copy Markdown
Contributor

Should check if AutoDeath can still work when technos are in non-opentopped vehicles before merging.
Also, the comment issue mentioned above should be addressed.

@TaranDahl TaranDahl removed the Will be merged in 24h This PR will be merged in 24 hours if no one has further instructions. label Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚙️T1 T1 maintainer review is sufficient Tested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants