Skip to content

Recursive conversion for spawners - #2396

Open
FS-21 wants to merge 3 commits into
Phobos-developers:developfrom
FS-21:feature/spawns-recursive-upgrade
Open

Recursive conversion for spawners#2396
FS-21 wants to merge 3 commits into
Phobos-developers:developfrom
FS-21:feature/spawns-recursive-upgrade

Conversation

@FS-21

@FS-21 FS-21 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Currently, when a spawner is converted into a type with a different Spawns, all spawned aircraft are destroyed and the manager is recreated from scratch.

Now spawned aircrafts are preserved across conversions and recursively converts existing spawned units (both in-flight and docked) to the new Spawns type instead of killing them.
In addition, if the spawner is actively attacking a target, newly ready or regenerated spawns will now automatically launch towards it instead of staying docked in cooldown.

spawners_improvement_01

…ed spawns

- Convert existing spawned units in-flight and docked instead of destroying them when spawner converts to a type with different Spawns.

- Preserve SpawnManagerClass and update SpawnType/rates smoothly across conversions.

- Initialize IsSpawnMissile based on MissileSpawn.

- Allow docked and newly regenerated spawns to launch when spawner is actively attacking an existing target.
@github-actions

github-actions Bot commented Sep 8, 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.

@Coronia

Coronia commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

if a missile spawn is converting to a jet during taking off it'll behave weirdly. But if it's already cruising on the sky then it'll behave normally
8108e17828bacafaf4372ba4566171b6

on the other hand, if a spawn unit is converting into a missile spawn one during taking off, the missile will stop on the sky and don't move, and it cannot regen missile either. They'll move again when converting back
18e2c73f8b6cd66e57d3d4322c84dc3e

either we should do more compatibility here or just kill all spawns like we did before

@Coronia

Coronia commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

funnier thing, if a spawn unit is converting into a missile spawn one during the jet is returning, it'll change into missile and hit itself
613e4be7c9b6e04ee36e29d0fafc018a

and idk how to explain this. It's missile spawn to missile spawn this time
ce2f7ea87e08f24e4b14e5fcf3a7dd77

@Coronia Coronia added ❓Phobos bug Something isn't working properly Needs improvement ⚙️T1 T1 maintainer review is sufficient labels Sep 8, 2026
@Coronia

Coronia commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

one more thing, if a spawn jet with Strafing weapon converts into another spawn jet without it, it might still perform a Strafing attack with the new spawn jet's weapon. This is more like a problem of conversion itself tho, but it would need to be more compatible to cooperate with this feature

@TaranDahl

Copy link
Copy Markdown
Contributor

Suggestion: Ignore all MissileSpawn. Do nothing when the from or to is MissileSpawn.

@Fly-Star-him

Copy link
Copy Markdown
Contributor

Perhaps you could add a Convert.SpawnsConversion tag to allow users to customize what can be converted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs improvement ❓Phobos bug Something isn't working properly ⚙️T1 T1 maintainer review is sufficient

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants