widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #02940
Re: ships + notifications
-
To:
widelands-dev@xxxxxxxxxxxxxxxxxxx
-
From:
Fòram na Gàidhlig <fios@xxxxxxxxxxxxxxxxxxx>
-
Date:
Mon, 20 Oct 2014 15:36:46 +0100
-
In-reply-to:
<CAGCtC0C1FtsGE_eYF3z+m6m_OmKd3F94jr8X6zQes=T24McVBg@mail.gmail.com>
-
User-agent:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
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