cryptixman / tzmud

Automatically exported from code.google.com/p/tzmud
GNU General Public License v3.0
1 stars 0 forks source link

Separate messages from code #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

1. Currently messages are hard coded inside the functions:

if obj is not None and player.can_see(obj):
        s.message('You look at', obj, '.')

2. It is recommended that all messages remain centralized in a separate 
location, to enable support for custom messages and/or localization:

if obj is not None and player.can_see(obj):
        s.message( get_message('YOU_LOOK_AT') , obj, '.')

Original issue reported on code.google.com by hello.ja...@gmail.com on 7 Jan 2009 at 9:07

GoogleCodeExporter commented 9 years ago
In addition to the messages, all of the command words are hard-coded also.

This is a worthy goal, but it is going to take a lot of work to get there...

Original comment by miss...@hotmail.com on 11 Jan 2009 at 3:40

GoogleCodeExporter commented 9 years ago
Changing the command words is only needed for localization, which should be 
more time 
consuming to implement.

In my personal opinion, the main goal here is to allow authors some flexibility 
on 
the response strings, such as using the word 'Matey' in a Pirate-themed game.

That I believe is easier to implement and more on demand then true localization.

Original comment by hello.ja...@gmail.com on 11 Jan 2009 at 5:59