#13 configurable game actions


This patch is a follow up to the eco command patch.
bergo suggested that he would be interested in
configurable actions for the game context menu and this
is exactly what this patch does.

How it works: Instead of using hardcoded command
strings, the actions (both for players and game) are
loaded from configuration files in the user's home
directories. In the case of fics protocol (which is
what it is really handled right now :) two action files
are read, fics-player.actions and fics-game.actions.
The files are autogenerated if they don't exist, and
contain the action name and the action string.

What it touches:
global.h,cc: Adds an ensureActions method to Global.
This is called on initialization to ensure that the
fics actions exist and generate them if they don't
protocol.h,cc: Adds an actions class that handles the
creation of action lists
proto_fics.h,cc: Replaces doGameAction/doPlayerAction
implementations to use the new action class

The patch applies to the 0.9.0 release tree


  • Dimitris Vyzovitis


  • Felipe Bergo

    Felipe Bergo - 2004-03-13

    Logged In: YES

    I'll take a look and try to put it in the currect code. I
    apologize for the long delay, but I've been busy lately.

  • Felipe Bergo

    Felipe Bergo - 2004-03-13
    • assigned_to: nobody --> bergo
    • status: open --> closed-accepted

Log in to post a comment.