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.
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
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,
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
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
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
URL: http://bugs.freeciv.org/Ticket/Display.html?id=39450
Make rule names available in the scripting api.
Right now, in a callback in lua; for example:
hut_entered_callback(punit)
there is no way to get the rule name of punit, only the reverse by
find.unit_type('Settlers') and similar.