Re: [Freeciv-Dev] (PR#39450) Make rule names available in the scripting api

2007-07-14 Thread William Allen Simpson
URL: http://bugs.freeciv.org/Ticket/Display.html?id=39450 Ulrik Sverdrup wrote: But we could go for consistency the other way around and change our mind and use: :rule_name() :name_translation() :plural_translation() to follow the C function names yes. follow the C function names.

Re: [Freeciv-Dev] (PR#39450) Make rule names available in the scripting api

2007-07-13 Thread Ulrik Sverdrup
URL: http://bugs.freeciv.org/Ticket/Display.html?id=39450 If we only make the translated name available, it should be clear that it is not the rule name, so it should be name_translated() No, it should be translated_name() Consistency, always consistency. You don't want to have to

Re: [Freeciv-Dev] (PR#39450) Make rule names available in the scripting api

2007-07-13 Thread Ulrik Sverdrup
URL: http://bugs.freeciv.org/Ticket/Display.html?id=39450 Attached patch v1. Also attached test .sav file, that should work by just loading it with the server, no need to even start the game. Using suggested :rule_name() :translated_name() Sorted everything in the order the types are defined,

Re: [Freeciv-Dev] (PR#39450) Make rule names available in the scripting api

2007-07-12 Thread William Allen Simpson
URL: http://bugs.freeciv.org/Ticket/Display.html?id=39450 Ulrik Sverdrup wrote: So we would have Unit_Type:rule_name() Unit_Type:name() etc. No, that would be rule_name() and translated_name() It seems a good idea, as it would cache the *_name pointers, but are there high

Re: [Freeciv-Dev] (PR#39450) Make rule names available in the scripting api

2007-07-12 Thread Ulrik Sverdrup
URL: http://bugs.freeciv.org/Ticket/Display.html?id=39450 Thanks for replying to this, you are the one who knows the related code well. 2007/7/13, William Allen Simpson [EMAIL PROTECTED]: URL: http://bugs.freeciv.org/Ticket/Display.html?id=39450 Ulrik Sverdrup wrote: So we would have

Re: [Freeciv-Dev] (PR#39450) Make rule names available in the scripting api

2007-07-12 Thread William Allen Simpson
URL: http://bugs.freeciv.org/Ticket/Display.html?id=39450 Ulrik Sverdrup wrote: 2007/7/13, William Allen Simpson [EMAIL PROTECTED]: No, that would be rule_name() and translated_name() I understand. I just try to think of that others who are not freeciv coders should eventually use the