#1209 closed enhancement (fixed)
[PATCH] Set the traded goods for every Trader in a selected group of Traders
Reported by: | michael | Owned by: | O.Davoodi |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 10 |
Component: | UI & Simulation | Keywords: | trade, patch |
Cc: | Patch: |
Description
Set the traded goods for every Trader in a selected group of Traders. Eliminates having to do it one at a time.
Currently, you can only set the trade goods on one trader at a time. It would be best if this could be done with multiple selected traders at once.
Attachments (4)
Change History (13)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Component: | Game engine → Simulation |
---|---|
Keywords: | Trading trader goods multiple selection removed |
comment:3 by , 12 years ago
Keywords: | review added |
---|---|
Summary: | Set the traded goods for every Trader in a selected group of Traders → [PATCH] Set the traded goods for every Trader in a selected group of Traders |
Patch submitted. Works for land traders, ships and a combination of both.
comment:4 by , 12 years ago
Keywords: | patch added |
---|---|
Owner: | set to |
comment:5 by , 12 years ago
GetEntityState(selection[j]).id
is equivalent to selection[j]
(since the argument to GetEntityState
is the ID), so you can simplify that. Then you can simplify the entire loop to "selectionUnitIDs = selection
". And then you can just pass selection
directly into selectTradingPreferredGoodsData
instead of adding any new variables at all :-)
The "trader"
in the command data (and in the command in selectTradingPreferredGoods
and in Commands.js
) should be renamed to "traders"
since it's now an array of IDs. But actually it should probably be renamed to "entities"
instead, for consistency with all the other commands.
by , 12 years ago
Attachment: | input.js.patch added |
---|
by , 12 years ago
Attachment: | Commands.js.patch added |
---|
by , 12 years ago
Attachment: | unit_commands.js.patch added |
---|
comment:6 by , 12 years ago
Sorry input.js is not related to this. Updated the patch with Philip's instructions.
comment:7 by , 12 years ago
Hey Spahbod. Thanks for your work. To help the patch reviewers, can you please combine patches into a single file, and timestamp them. Something like "1209_2012-03-22.patch". This helps find exactly which patches are the newest ones to review, and how old they are. Thanks.
comment:9 by , 12 years ago
Keywords: | review removed |
---|
Thanks for the patch. As k776 said it would be great if you could provide a single patch file instead of multiple files.
Currently, if you attempt to do this for multiple traders, it will only happen to one of them.