Open tbertels opened 2 years ago
The repair toggle mechanic seems pretty straightforward: https://github.com/henricj/dunelegacy/blob/2b959e8498bf0c51ca0019153f6d7f75e3781a81/src/structures/StructureBase.cpp#L260
But about the interface button toggle, how can we set bToggleState to false?
A command to stop the repair would need to be added:
https://github.com/henricj/dunelegacy/blob/06acb1ef6061018f8e82fbbfa79dddbc0a15ef5c/include/Command.h#L29-L56
If a new move/attack command doesn't abort a pending CMD_UNIT_SENDTOREPAIR
, then that should probably be looked at too.
The original Dune 2 allowed to stop a building repair by just clicking again on the button.