Skip to content

Conversation

lL1l1
Copy link
Contributor

@lL1l1 lL1l1 commented Aug 22, 2025

Description of the proposed changes

  • Only run code for the edge case when the build does not fail but the unit is incomplete.
  • Use proper callbacks instead of relying on the normal finish build behavior to stop build fx and destroying the unit manually

Testing done on the proposed changes

Same as in #6700:

An unfinished unit no longer remains in the factory after the mobile build order is cancelled.
Copy-paste command for testing:

CreateUnitAtMouse('urb0301', 0,    0.00,    0.00, -0.00000)
ForkThread(function() 
WaitTicks(10) 
ConExecute('UI_SelectByCategory +nearest FACTORY CYBRAN TECH3')
import('/lua/ui/game/commandmode.lua').StartCommandMode('build', {name = 'url0303'}) 
end)

Checklist

lL1l1 added 3 commits August 22, 2025 04:07
- Only call for the edge case when the build does not fail but the unit is incomplete.
- Use proper callbacks instead of relying on the normal finish build behavior to stop build fx and destroying the unit manually
@lL1l1 lL1l1 requested review from Garanas and speed2CZ August 22, 2025 11:37
@lL1l1 lL1l1 added the area: sim Area that is affected by the Simulation of the Game label Aug 22, 2025
@lL1l1 lL1l1 changed the title Improve implementation of #6700's edge case fix Improve implementation of fix for unbuilt units not being destroyed in factories when mobile build orders are cancelled Sep 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: sim Area that is affected by the Simulation of the Game

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant