Changes between Version 2 and Version 3 of Ticket #1717, comment 11


Ignore:
Timestamp:
Nov 20, 2012, 8:51:35 AM (11 years ago)
Author:
zoot

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1717, comment 11

    v2 v3  
    11Replying to [comment:10 leper]:
    22
    3 > (The result of some irc discussion) Add a !GetBatchTimeFactor   (or something like that, there is probably a better name for it) to !ProductionQueue   that for the moment returns 0.7 and use the function instead of the 0.7 at line 188. In !GuiInterface   add this value to ret.production and use that in the GUI. The new !ProductionQueue   function could even be extended (though I'd say that this is out of the scope of this ticket, but it wouldn't harm to do it) to read that value from the template and/or be modifiable by technologies (e.g. !ProductionQueue/BatchTime  ).
     3> (The result of some irc discussion) Add a !GetBatchTimeFactor    (or something like that, there is probably a better name for it) to !ProductionQueue    that for the moment returns 0.7 and use the function instead of the 0.7 at line 188. In !GuiInterface    add this value to ret.production and use that in the GUI.
    44
    55That's a lot like what I tried initially:
     
    77https://github.com/zootzoot/0ad/commit/0c281e69d9531751d667e347ef51c074b909999f
    88
    9 My problem is that I don't see a good way to pass the ret.production.batchtimefactor value into setupUnitPanel() in gui/session/unit_commands.js. Just slapping on a new batchtimefactor parameter on setupUnitPanel's signature seems nasty.
     9My problem is that I don't see a good way to pass the ret.production.batchtimefactor value into setupUnitPanel() in gui/session/unit_commands.js. Just slapping on a new batchtimefactor parameter on setupUnitPanel's signature seems nasty.
    1010
    1111Should I do that or is there a better way?