patchBattle for Wesnoth - Patches: patch #3240, See EasyCoding chatting action for...

Show feedback again

patch #3240: See EasyCoding chatting action for AI

Submitted by:  Tilo Fischer <tyrannodogg>
Submitted on:  Fri Apr 6 00:25:25 2012  
Priority: 3 - LowStatus: In Progress
Privacy: PublicAssigned to: Iurii Chernyi <crab>
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Sat Apr 7 15:26:03 2012, comment #2:

I've come to the conclusion that I can remove the comment but I cannot remove that restriction since it comes from lua's handling of unused parameters and the way that wesnoth currently passes arguments to the lua code snippets.
It is the same restriction that forbids writing any code before the "ai = ..." line at the beginning of luaAI scripts.

Tilo Fischer <tyrannodogg>
Fri Apr 6 13:13:51 2012, comment #1:

please add yourself to data/core/about.cfg, to Misc.contributors section

please add a function to readwrite_context and readwrite_context_impl, to issue the chat message (same as with other actions)

please use spaces around = i.e. cfg["side"] = side_number;

please keep indentation good, especially don't mix tabs and spaces if it can be avoided.

(if you manage to do this) Do not do it via menu_events, or at least make sure it works even if there is no GUI.

remove the need for '//do not use this function directly before any (...):xxx_execute() call since it modifies the stack' restriction'

be sure that you don't leak const char* message.

Iurii Chernyi <crab>
Project MemberIn charge of this item.
Fri Apr 6 00:25:25 2012, original submission:

The GSoC wiki suggested implementing a feature listed in EasyCoding to get to learn a bit about the code base.
This patch will provides an action which only sends a chat message and a binding for the luaAI.

Tilo Fischer <tyrannodogg>


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #15613:  patch-3240.patch added by tyrannodogg (8kB - application/octet-stream - added preferences::set_gui(true) call for more consistency)
file #15612:  patch-3240.patch added by tyrannodogg (8kB - application/octet-stream - alternate way of checking if game is in nogui mode)
file #15589:  patch-3240.patch added by tyrannodogg (7kB - application/octet-stream - chat messages are no longer added to the screen in --nogui mode)
file #15556:  patch-3240.patch added by tyrannodogg (6kB - application/octet-stream - current version of the patch, still testing without GUI)
file #15521:  wesnoth.patch added by tyrannodogg (4kB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by crab (Posted a comment)
  • -unavailable- added by tyrannodogg (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Apr 23 22:21:24 2012tyrannodoggAttached File-=>Added patch-3240.patch, #15613
    Mon Apr 23 12:49:14 2012tyrannodoggAttached File-=>Added patch-3240.patch, #15612
    Mon Apr 16 22:57:08 2012tyrannodoggAttached File-=>Added patch-3240.patch, #15589
    Wed Apr 11 21:00:41 2012tyrannodoggAttached File-=>Added patch-3240.patch, #15556
    Fri Apr 6 22:15:31 2012crabStatusNone=>In Progress
      Assigned toNone=>crab
    Fri Apr 6 00:25:25 2012tyrannodoggAttached File-=>Added wesnoth.patch, #15521
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup