On 31.07.2014, at 13:00, Tibor Bamhor <[email protected]> wrote: > Hi, > > I was thinking about seafaring under AI, but on the begining some technical > details should be made clear. > > For barbarians two buildings are relevant in this regard: > > shipyard - from standpoint of AI it is PRODUCTIONSITE, no problem here > port - Here I dont know what it is.
A port is a Warehouse with an associated PortDock. The PortDock is a PlayerImmovable that sits in the water on a field close to its Warehouse). The PortDock should not be touched by the AI, it will need to do all of its interaction with the associated warehouse (the Port). > ..I wonder, why the PORTDOCK is not listed together with other buildings? It is no building. > > I would say portdock would be on the same level as > productionsite,militarysite,mine, warehouse and training site. Or does it > belong under "warehouses”? No, neither :). But as said, the AI should only ever deal with the Warehouse, the PortDock is only important for the economy an ships. > AI currently keeps information about buildings in two std::vectors: > productionsites and militarysites. Perhaps third one, named f.e. 'portsites' > is good idea? At least from the standpoing of 'management of buildings’. You can just ask every warehouse::get_portdock(). If this returns nullptr, it is a plain Warehouse, otherwise it is a Port. > > What do you think? > _______________________________________________ > Mailing list: https://launchpad.net/~widelands-dev > Post to : [email protected] > Unsubscribe : https://launchpad.net/~widelands-dev > More help : https://help.launchpad.net/ListHelp
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Mailing list: https://launchpad.net/~widelands-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp

