← Back to team overview

widelands-dev team mailing list archive

Re: ships + notifications

 

I can have a look at this next week and create some notifications for you.

You should be able to create one for the "Expedition ready" and "Port
Space found"  messages wihtout too much trouble though. Just send it
when the message is sent to the user. You can steal the code from the
notification I created for the "out of resources" messages. Copy the
code into a new Notification class and then create one when the message
is sent.otification classes themselves aren't complicated if you
Frankenstein them.



20/10/2014 13:15, sgrìobh Tibor Bamhor:
> Hi,
> 
> I started some works on seafaring in AI, so far AI can build port,
> shipyards and keeps building ships.
> 
> But AI just is not informed when new ship is created. 
> 
> What I need should be very similar to notifications about immovables,
> typically buildings, when they are acquired, or lost; the code is here: 
> 
> http://bazaar.launchpad.net/~widelands-dev/widelands/trunk/view/head:/src/logic/immovable.cc#L1387
> 
> 
> AI should receive not only information, but the object itself and store
> it in own list (vector).
> 
> So can somebody help me with creating such notifications?
> 
> I am not familiar with seafaring, but I wonder are there messages for a
> player when new ship is built or lost? It seems to me there are none.
> 
> Other thoughts on seafaring: Ship "remembers" found port spots, so AI
> will not need immediate notification when such spot is found, probably....
> 
> Also I read about "expedition ready" notification, probably this one
> would be useful for AI too.
> 
> Any feedback is welcomed... :)
> 
> Tibor
> 
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~widelands-dev
> Post to     : widelands-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~widelands-dev
> More help   : https://help.launchpad.net/ListHelp
> 
> 
> 
> No virus found in this message.
> Checked by AVG - www.avg.com <http://www.avg.com>
> Version: 2014.0.4765 / Virus Database: 4040/8420 - Release Date: 10/20/14
> 


Follow ups

References