#3894 closed defect (fixed)
[PATCH] We should be able to set a trade-route with a miraged market
Reported by: | mimo | Owned by: | mimo |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 21 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | Itms | Patch: |
Description
Currently, the gui does not allow to set a route with a miraged market, which is a problem when trading with neutrals, or with allies before the shared los tech. The mirage should be extended to contain the market info, and this be used by the gui when setting a route.
Once done, UnitAI should be able to use this info to take the proper action when a market is destroyed or captured.
see also some discussion in #3277
Attachments (5)
Change History (14)
by , 8 years ago
Attachment: | marketVisibility.patch added |
---|
comment:1 by , 8 years ago
Keywords: | review patch added |
---|---|
Summary: | We should be able to set a trade-route with a miraged market → [PATCH] We should be able to set a trade-route with a miraged market |
comment:2 by , 8 years ago
Cc: | added |
---|
by , 8 years ago
Attachment: | marketVisibility-v2.1.patch added |
---|
comment:3 by , 8 years ago
Mirages have no obstructions, so the previous patch may not give the best path when targeting a mirage. So here a is a modified version which recomputes the path as soon as the market becomes visible when approaching to it.
comment:4 by , 8 years ago
I noticed the exact same behavior when telling units to construct a miraged foundation. They will first walk to the center of the foundation, then go back to the edge of the foundation and try to construct it. But since the other units following the first have the same behavior, the units have to wait until all units had reached the middle of the foundation, so there is quite a delay. Notice this happens when issuing a repair command, but not when issuing a build command.
comment:5 by , 8 years ago
r18145 has fixed the obstruction problems of mirages, so the hack in version 2.1 is no more needed and the right patch is marketVisibility-v2.patch
comment:6 by , 8 years ago
I've just uploaded v3 which improves the UnitAI behaviour. When a market is destroyed or captured, the trader returns back to the other market if the lost one is visible, otherwise it continues its route up to the point where the market would have been visible and then returns back.
by , 8 years ago
Attachment: | marketVisibility-v3.patch added |
---|
comment:7 by , 8 years ago
Syntax check only:
cmpTrader ? cmpTrader.GetFirstMarket() : undefined
->cmpTrader && cmpTrader.GetFirstMarket()
- duplicate parenthesis
(msg.to == -1)
(like * and +) |
comment:9 by , 8 years ago
Keywords: | review removed |
---|
patch to allow making a trade route with a miraged market