Skip to content

Improved factory manufacture#4153

Open
Monsterovich wants to merge 9 commits intoWarzone2100:masterfrom
Monsterovich:fix-production-in-factories2
Open

Improved factory manufacture#4153
Monsterovich wants to merge 9 commits intoWarzone2100:masterfrom
Monsterovich:fix-production-in-factories2

Conversation

@Monsterovich
Copy link
Copy Markdown
Contributor

When a droid template is modified and queued, we save the pointer to the new template in the old one, so that we can switch to it later.

2024-12-14.05-01-45.mp4

@Monsterovich Monsterovich force-pushed the fix-production-in-factories2 branch from 0c34ad5 to c2e40cd Compare December 14, 2024 12:53
@Monsterovich Monsterovich force-pushed the fix-production-in-factories2 branch from 4c9de79 to 20f3cbc Compare December 14, 2024 13:18
@maxsupermanhd
Copy link
Copy Markdown
Member

This looks way more correct to me, I assume infinite repeat with 1 ordered would result in same behaviour, right? (and with +1 being rendered)

What about client-side setting to optionally cancel or retain queue? I would personally probably not use it but bet there are some people who would be into that kind of stuff.

@Monsterovich
Copy link
Copy Markdown
Contributor Author

@maxsupermanhd

This looks way more correct to me, I assume infinite repeat with 1 ordered would result in same behaviour, right? (and with +1 being rendered)

Yeah, it'll finish that remaining droid and then it'll start making a new template (with count 4 on my screenshot).

pic

What about client-side setting to optionally cancel or retain queue?

Later. May be even in the next PR.

@vaut
Copy link
Copy Markdown
Contributor

vaut commented Dec 14, 2024

tested

@maxsupermanhd
Copy link
Copy Markdown
Member

maxsupermanhd commented Dec 19, 2024

Found edge case:

When you have infinite order (or any complex order) and you have unit currently ordered and producing but you want to force-drop production progress, previously I just cancelled the queue with right click and it would switch to next in queue, currently no matter if I cancel the order it still finishes producing the unit and the only way to cancel it is to drop all orders with double right click on factory.

This is very annoying and has to be addressed in some way.

Example: I want to stop producing incendiary mortar immediately and forgot to dequeue it and end up completely wiping factory queues instead of specifically cancelling currently producing unit.

@Tuupertunut
Copy link
Copy Markdown

This is a welcome improvement. I often make a factory produce something infinitely (like mortar) and when an upgrade is available (like pepperpot) I update the design template and add it back to production, but come back later to find out the factory has continued producing infinite mortars.

@Monsterovich
Copy link
Copy Markdown
Contributor Author

I want to stop producing incendiary mortar immediately and forgot to dequeue it and end up completely wiping factory queues instead of specifically cancelling currently producing unit.

@maxsupermanhd @past-due I can offer this solution to the issue. Although it will require double-clicking to cancel the current non-existent template and then the entire queue.

https://www.youtube.com/watch?v=MS0jlq13Nwo

@maxsupermanhd
Copy link
Copy Markdown
Member

I quit the game, I don't think my suggestions nor my work is of any value to this community. Feel free to disregard my nit.

@Monsterovich
Copy link
Copy Markdown
Contributor Author

Monsterovich commented Jan 25, 2026

I quit the game, I don't think my suggestions nor my work is of any value to this community. Feel free to disregard my nit.

That's a shame. Your feedback was very helpful.

@past-due
Copy link
Copy Markdown
Member

past-due commented Jan 28, 2026

@vaut Reports a desync testing the latest commit on this branch. It appears to be related syncDebugEconomy / player power updates.

(I haven't had a chance to dig into this fully yet.)

@Monsterovich
Copy link
Copy Markdown
Contributor Author

@vaut Reports a desync testing the latest commit on this branch. It appears to be related syncDebugEconomy / player power updates.

(I haven't had a chance to dig into this fully yet.)

How can I properly refund energy to a player without desyncs?

@vaut
Copy link
Copy Markdown
Contributor

vaut commented Jan 28, 2026

I should clarify: I applied the patch and went into battle against players without the patch. (Because I thought the patches wouldn't affect synchronization.)

@Monsterovich Monsterovich marked this pull request as draft April 28, 2026 21:18
@Monsterovich Monsterovich marked this pull request as ready for review April 28, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants