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