Opened 8 years ago

Closed 8 years ago

Last modified 8 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 8 years ago.
coinage.png (32.2 KB ) - added by mimo 8 years ago.
sharedDropsites-v2.patch (17.7 KB ) - added by mimo 8 years ago.
the player can now choose which dropsites can be used by its allies
sharedDropsites-v3.patch (19.1 KB ) - added by mimo 8 years ago.
diaspora.png (32.5 KB ) - added by mimo 8 years ago.

Download all attachments as: .zip

Change History (13)

by mimo, 8 years ago

Attachment: sharedDropsites.patch added

by mimo, 8 years ago

Attachment: coinage.png added

by mimo, 8 years ago

Attachment: sharedDropsites-v2.patch added

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

comment:1 by mimo, 8 years ago

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/

by mimo, 8 years ago

Attachment: sharedDropsites-v3.patch added

by mimo, 8 years ago

Attachment: diaspora.png added

comment:2 by mimo, 8 years ago

Owner: set to mimo
Resolution: fixed
Status: newclosed

In 17875:

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

comment:3 by mimo, 8 years ago

Keywords: review removed

comment:4 by mimo, 8 years ago

In 17884:

better icon from niektb, refs #3791

comment:5 by elexis, 8 years ago

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.

Version 0, edited 8 years ago by elexis (next)

comment:6 by elexis, 8 years ago

In 17887:

Observer fix for shared-dropsites, refs #3791.

comment:7 by elexis, 8 years ago

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 by Itms, 8 years ago

In 18047:

Fix the shared dropsites unit action icon. Refs #3791

Note: See TracTickets for help on using tickets.