Skip to content

Add ability to remove all orders when RejectOrders is activated#21233

Merged
PunkPun merged 1 commit into
OpenRA:bleedfrom
Porenutak:Add-RemoveQueuedOrders-into-RejectOrders
Dec 27, 2023
Merged

Add ability to remove all orders when RejectOrders is activated#21233
PunkPun merged 1 commit into
OpenRA:bleedfrom
Porenutak:Add-RemoveQueuedOrders-into-RejectOrders

Conversation

@Porenutak

Copy link
Copy Markdown
Contributor

Behaves as Stop command when RejectOrders is activated. This is something I need for my Enhanced maps.

Testcase: use chaosBomb on Infantry while it have some queued activities.

@abcdefg30 abcdefg30 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems simple enough, but this also cancels the current activity. Maybe we should rename the property and change the description? Otherwise you'll need something like self.CurrentActivity?.NextActivity?.Cancel(self).

Comment thread OpenRA.Mods.Common/Traits/RejectsOrders.cs Outdated
Comment thread OpenRA.Mods.Common/Traits/RejectsOrders.cs
@Porenutak Porenutak force-pushed the Add-RemoveQueuedOrders-into-RejectOrders branch 2 times, most recently from 51063c2 to 73011d5 Compare November 29, 2023 08:38
@Porenutak

Porenutak commented Nov 29, 2023

Copy link
Copy Markdown
Contributor Author

I need current activity also to be canceled. I rename variable to RemoveOrders is its clear that all activities are canceled. Otherwise updated according to your suggestions.

Off topic:
When I try open test map in map editor, game crash with translation error. I guess ist related to LUA script messages are not translated. Shouldnt translation be optional for custom maps?
exception-2023-11-29T083131Z.log

@PunkPun

PunkPun commented Dec 2, 2023

Copy link
Copy Markdown
Member

If you add a tooltip Name is required to have a value

@Porenutak Porenutak changed the title Add ability to remove queued orders when RejectOrders is activated Add ability to remove all orders when RejectOrders is activated Dec 8, 2023
Comment thread OpenRA.Mods.Common/Traits/RejectsOrders.cs
@Porenutak Porenutak force-pushed the Add-RemoveQueuedOrders-into-RejectOrders branch from 3d3a2f4 to 7243314 Compare December 9, 2023 07:54
@abcdefg30

Copy link
Copy Markdown
Member

Can you remove the testcase, please?

@Porenutak Porenutak force-pushed the Add-RemoveQueuedOrders-into-RejectOrders branch from 7243314 to 6ff359a Compare December 18, 2023 08:10
@Porenutak

Copy link
Copy Markdown
Contributor Author

Testcase removed

@PunkPun PunkPun force-pushed the Add-RemoveQueuedOrders-into-RejectOrders branch from 6ff359a to 0a82efb Compare December 27, 2023 15:24
@PunkPun PunkPun merged commit d83a871 into OpenRA:bleed Dec 27, 2023
@PunkPun

PunkPun commented Dec 27, 2023

Copy link
Copy Markdown
Member

Changelog

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