Opened 3 years ago

Last modified 3 years ago

#6081 closed enhancement

Clean Garrison-related code. — at Version 6

Reported by: Freagarach Owned by:
Priority: Should Have Milestone: Alpha 25
Component: Simulation Keywords:
Cc: Patch: Phab:D3627 Phab:D3628 Phab:D3648

Description (last modified by Freagarach)

There has been a significant effort in cleaning garrisoning-related code, yet more needs to be done.

As discussed on IRC today, the ticket is created to not forget when the person currently working on it disappears suddenly.

A list of possible things:

  • Ungarrison using cmpGarrisonable instead on cmpGarrisonHolder (refs. Phab:D3280). Phab:D3628
  • Don't listen to OnGlobalEntityRenamed messages when the only use case is Skirmish Replacements (one can use a new message for those). Phab:D3627

Change History (6)

comment:1 by Freagarach, 3 years ago

Patch: Phab:D3627,Phab:D3628

comment:2 by Freagarach, 3 years ago

Keywords: simple removed
Patch: Phab:D3627,Phab:D3628Phab:D3627 Phab:D3628

comment:3 by Freagarach, 3 years ago

Again discussed today on IRC.

  • UnitAI shouldn't probably care about garrisoning.
  • Garrisonable sets UnitAI IDLE.
  • Orders/States in UnitAI just check for being able to move.

comment:4 by Freagarach, 3 years ago

In 25019:

Ungarrison entities using cmpGarrisonable.

Follow-up to r24977 / rP24977.
This moves responsibilities even further to the garrisoning entity.

Fixes the garrison flag when renaming entities cannot garrison (#5906).
Allows easy fixing of #6087.

Ticket: #6081
Differential revision: D3628
Comments by: @Stan, @wraitii (also in length on IRC)

comment:5 by Freagarach, 3 years ago

Patch: Phab:D3627 Phab:D3628Phab:D3627 Phab:D3628 Phab:D3648
Priority: Nice to HaveShould Have

comment:6 by Freagarach, 3 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.