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 06 Apr 2012 12:25:25 AM UTC  
 
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 07 Apr 2012 03:26:03 PM UTC, 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 06 Apr 2012 01:13:51 PM UTC, 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 06 Apr 2012 12:25:25 AM UTC, 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):
   
   
Comment:
   

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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

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

    Back to the top


    Powered by Savane 3.1-cleanup