Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#3791 closed defect (fixed)

[PATCH] Share dropsites between allies

Reported by: mimo Owned by: mimo
Priority: Nice to Have Milestone: Alpha 20
Component: UI & Simulation Keywords:
Cc: Patch:

Description

To favor cooperative play between allies, it would be nice to be able to keep soldiers in allied territory, but that means they can't improve the player's economy by gathering resources. To overcome this difficulty, we could allow the sharing of dropsites between allies. Here is a patch to do that, the sharing being unlocked after a tech is researched. The provided icon should be put in the art/textures/ui/session/portraits/technologies/ directory. It is just a placeHolder and should be improved later.

Attachments (5)

sharedDropsites.patch (5.7 KB) - added by mimo 2 years ago.
coinage.png (32.2 KB) - added by mimo 2 years ago.
sharedDropsites-v2.patch (17.7 KB) - added by mimo 2 years ago.
the player can now choose which dropsites can be used by its allies
sharedDropsites-v3.patch (19.1 KB) - added by mimo 2 years ago.
diaspora.png (32.5 KB) - added by mimo 2 years ago.

Download all attachments as: .zip

Change History (13)

Changed 2 years ago by mimo

Attachment: sharedDropsites.patch added

Changed 2 years ago by mimo

Attachment: coinage.png added

Changed 2 years ago by mimo

Attachment: sharedDropsites-v2.patch added

the player can now choose which dropsites can be used by its allies

comment:1 Changed 2 years ago by mimo

As there was some discussion on irc about the tech used in previous versions, it is now changed to a "diaspora" one, and an icon symbolizing the emigration would be nice. I've just attached here one placeholder which should be put in art/textures/ui/session/portraits/technologies/

Changed 2 years ago by mimo

Attachment: sharedDropsites-v3.patch added

Changed 2 years ago by mimo

Attachment: diaspora.png added

comment:2 Changed 2 years ago by mimo

Owner: set to mimo
Resolution: fixed
Status: newclosed

In 17875:

allow the use of allied dropsites using tech, fixes #3791

comment:3 Changed 2 years ago by mimo

Keywords: review removed

comment:4 Changed 2 years ago by mimo

In 17884:

better icon from niektb, refs #3791

comment:5 Changed 2 years ago by elexis

In observermode I get this error:

TypeError: GetSimState(...).players[Engine.GetPlayerID(...)] is undefined
  g_AllyEntityCommands["share-dropsite"].getInfo@gui/session/unit_actions.js:964:8
  g_SelectionPanels.AllyCommand.getItems@gui/session/selection_panels.js:277:8
  setupUnitPanel@gui/session/unit_commands.js:42:6
  updateUnitCommands@gui/session/unit_commands.js:176:4
  updateSelectionDetails@gui/session/selection_details.js:422:2
  updateGUIObjects@gui/session/session.js:697:2
  onSimulationUpdate@gui/session/session.js:679:2
  __eventhandler360 (simulationupdate)@sn simulationupdate:0:1

Didn't have time to check it further, nor can I provide a recipe to reproduce it right now. But looking at the code there is only an appropriate observercheck missing (g_IsObserver and g_ViewedPlayer should likely be used). Can be fixed after FF, but has to be done.


Update: Looks like it happens when selecting gaia :D

Last edited 2 years ago by elexis (previous) (diff)

comment:6 Changed 2 years ago by elexis

In 17887:

Observer fix for shared-dropsites, refs #3791.

comment:7 Changed 2 years ago by elexis

Tests also failing :P

Running cxxtest tests (299 tests)................................................................................................................................................
ERROR: JavaScript error: simulation/components/GuiInterface.js line 109
TypeError: cmpPlayer.HasSharedDropsites is not a function
  GuiInterface.prototype.GetSimulationState@simulation/components/GuiInterface.js:109:4
  @simulation/components/tests/test_GuiInterface.js:235:1

In TestComponentScripts::test_scripts:
/.../trunk/source/simulation2/components/tests/test_scripts.h:44: Error: Test failed: L"Running script simulation/components/tests/test_GuiInterface.js"
/.../trunk/source/simulation2/components/tests/test_scripts.h:44: Error: Assertion failed: scriptInterface.LoadScript(pathname, content)
..........................................................................................................................................................

comment:8 Changed 2 years ago by Itms

In 18047:

Fix the shared dropsites unit action icon. Refs #3791

Note: See TracTickets for help on using tickets.