URL:
<http://gna.org/patch/?3888>
Summary: Command 'lua wesnoth.debug_ai([side]).ai' gives now
access to lua's ai-table
Project: Battle for Wesnoth
Submitted by: None
Submitted on: Mon 29 Apr 2013 11:05:11 AM UTC
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
I added something to this command:
http://wiki.wesnoth.org/LuaAI#Debug_access_to_the_AI_tree
The functionality for get_ai() was not implemented yet. I implemented it not
by using a function (like the wikipage describes) but by injecting the ai
table directly.
So "lua wesnoth.debug_ai([side]).ai" will now give access to the ai-table
(this is the same table a lua developers use by writing "local ai = ..." at
the top of a lua-ai)
- The ai-table doesn't need to be defined global for this.
- The command will also work before a ai had it's first turn.
- When the ai is not a lua ai, a dummy-engine will be set up.
When this patch is accepted I will edit the wiki page above.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon 29 Apr 2013 11:05:11 AM UTC Name: debug_ai.patch Size: 11kB By:
None
<http://gna.org/patch/download.php?file_id=17857>
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?3888>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs