Skip to content

Destroy ships when player is defeated #1883

Open
Flamefire wants to merge 15 commits intoReturn-To-The-Roots:masterfrom
Flamefire:sinkShipsOnDefeat
Open

Destroy ships when player is defeated #1883
Flamefire wants to merge 15 commits intoReturn-To-The-Roots:masterfrom
Flamefire:sinkShipsOnDefeat

Conversation

@Flamefire
Copy link
Member

As suggested in #183 ships will now be destroyed when a player is defeated or surrenders.

Requires:

Flamefire and others added 15 commits February 2, 2026 11:30
Unify uses of soldier checks in one place.
It is never used and can cause confusion.
`nofPassiveWorker` should be used for transfers to a warehouse.
…ove not used code where goal is nullptr because this can never happen
When the "Collect" option in a warehouse for a job is set the actual job
subclass will be created which expects its workplace as the goal, i.e. a
`nobUsual` for most.
In this situtation the goal is the warehouse to which the figure should
go. So check that in `OrderJob` and create a `nofPassiveWorker` instead
similar to the `Send` option handler.
This is run for every gameframe in "real mode" and required for some
tests simulating e.g. a single step.
This is a corner case when destroying the harbor leads to defeat which
leads to sinking ships potentially with wares to this building.
@Spikeone
Copy link
Member

Spikeone commented Feb 2, 2026

Juast asking - this is not an addon, is it? I'm actually not sure if it should or not. Also if it should depend on if a player is defeated with destroying buildings or without. Guess this is just always which should be fine I guess, although this might stop ongoing sea attacks opposed to a normal attack which would still be going on.

@Flamefire
Copy link
Member Author

Flamefire commented Feb 3, 2026

This is not an addon. When a player is defeated (no more military, warehouses/HQs) or he surrenders his ships are destroyed/removed.

I don't see any issue with that and it's what I got out of #183

Thats also kinda important when you defeat an enemy and there are only ships left all over the coast(s).

For people etc. they will wander around and eventually die, so why not do the same for ships as everything else will be gone too.

@Flamefire Flamefire requested a review from Flow86 February 3, 2026 08:16
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.

3 participants