Skip to content

Update Factory Stop Que behavior#7858

Closed
26Projects wants to merge 3 commits into
beyond-all-reason:masterfrom
26Projects:Factory_Stop
Closed

Update Factory Stop Que behavior#7858
26Projects wants to merge 3 commits into
beyond-all-reason:masterfrom
26Projects:Factory_Stop

Conversation

@26Projects

Copy link
Copy Markdown

Update Factory Stop Que behavior

Work done

Updated factory stop-production queue clearing so factories/labs on repeat fully clear their production queue.

Previously, the stop-production command preserved one copy of the currently building unit whenever the queue had more than one item. That behavior is still useful for manual production mode, where it avoids accidentally cancelling the current unit. However, on repeat mode, preserving one item means the factory can continue producing after the player expected the queue to be cleared.

This change checks the factory repeat state before preserving the current build order:

Manual mode: keeps the existing “leave current unit” behavior.
Repeat mode: removes all queued build orders, including the current repeated item.

Addresses Issue(s)

https://discord.com/channels/549281623154229250/1508850740473368748

Test steps

In game testing on local dev

AI / LLM usage statement:

Developed with Codex

@TheChronographer

Copy link
Copy Markdown
Collaborator

This is reversed of the standard behaviour in which:

Repeat - alt inserts after the current unit
Not repeat - alt inserts immediately cancelling the current build progress.

@26Projects

26Projects commented Jun 5, 2026

Copy link
Copy Markdown
Author

Repeat on + current build is options.internal:
Stop Production removes the rest of the build queue but leaves one copy of that current build command.

Because it stays internal, FactoryCAI::DecreaseQueueCount() treats it like a one-shot priority/current build, so it should not keep repeating after completion.

Repeat off, or repeat on but first command is not internal:
Stop Production clears everything, including current production.

That matches the intended “finish current unit, then stop” behavior for repeat factories while preserving normal non-repeat cancellation behavior.

@26Projects 26Projects marked this pull request as draft June 8, 2026 13:02
@26Projects 26Projects closed this Jun 22, 2026
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