URL:
  <http://gna.org/patch/?3486>

                 Summary: def_ai_xxx_data() callers to pass ai type.
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Wed 08 Aug 2012 05:21:24 PM EEST
                Category: ai
                Priority: 5 - Normal
                  Status: Ready For Test
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 2.5.0

    _______________________________________________________

Details:

Instead of def_ai_xxx_data() to lookup for default ai type itself, it takes ai
type as parameter.

This might seems like step backward (every caller needing to make identical
lookup operation instead of it being centralized), but it moves the bad lookup
upwards so one can search codebase for the lookups to get rid of.
Matthias wanted to implement luaai, that would fallback to default ai code. I
think threaded AI could also in first phase reuse at least some of the default
ai code. Similar situation can come up with further ai type projects. Such
default ai reuse is currently impossible because these default ai type
lookups. If one calls default ai functions, they access data in default ai
context, not in that of calling ai type.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 08 Aug 2012 05:21:24 PM EEST  Name: DefAiCallerType.patch.bz2  Size:
9kB   By: cazfi

<http://gna.org/patch/download.php?file_id=16346>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?3486>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to