#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)
Change History (13)
by , 8 years ago
Attachment: | sharedDropsites.patch added |
---|
by , 8 years ago
Attachment: | coinage.png added |
---|
by , 8 years ago
Attachment: | sharedDropsites-v2.patch added |
---|
comment:1 by , 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 , 8 years ago
Attachment: | sharedDropsites-v3.patch added |
---|
by , 8 years ago
Attachment: | diaspora.png added |
---|
comment:3 by , 8 years ago
Keywords: | review removed |
---|
comment:5 by , 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.
comment:7 by , 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) ..........................................................................................................................................................
the player can now choose which dropsites can be used by its allies