#3891 closed defect (fixed)
[PATCH] Territory isn't updated when diplomacy changes
Reported by: | sanderd17 | Owned by: | sanderd17 |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 21 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | Patch: |
Description
Unconnected territory that's connected to allied territory shouldn't blink.
So when diplomacy changes, the territory has to be updated.
Currently, territory keeps blinking and decay keeps happening until some actual territory change happens (building constructed or demolished).
I see two possibilities to fix this, but I doubt which is the best:
- The
DiplomacyChanged
message could be defined in C++, and then theTerritoryManager
could listen for it. But that would be a bit awkward since the C++ side doesn't know anything about diplomacy so far. - The
MakeDirty
method of theTerritoryManager
could be exposed to the JS side, and the player component could call it every time diplomacy changes.
Attachments (2)
Change History (6)
by , 8 years ago
Attachment: | territoryBlinking.diff added |
---|
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Keywords: | patch review added |
---|---|
Milestone: | Backlog → Alpha 21 |
Summary: | Territory isn't updated when diplomacy changes → [PATCH] Territory isn't updated when diplomacy changes |
by , 8 years ago
Attachment: | territoryBlinking.2.diff added |
---|
comment:4 by , 8 years ago
Keywords: | review removed |
---|
Note:
See TracTickets
for help on using tickets.
This patch is a bit different from the two described options: it lets the Decay component listen to DiplomacyChanged message, and allows the decay component to disable the blinking of a certain territory again.
The advantage is that it costs a lot less calculations: calculating the blinkingness is only one FloodFill (of that unconnected territory), while recalculating the entire territory will cause a lot more FloodFills.