v0.3.4: removed unnecessary utils call in wandmaker, added comments to messages

This commit is contained in:
Evan Debenham 2015-12-30 16:37:11 -05:00 committed by Evan Debenham
parent 36cfd31fde
commit 7860a77789
2 changed files with 8 additions and 1 deletions

View File

@ -111,7 +111,7 @@ public class Wandmaker extends NPC {
msg = Messages.get(this, "reminder_berry", Dungeon.hero.givenName()); msg = Messages.get(this, "reminder_berry", Dungeon.hero.givenName());
break; break;
} }
GameScene.show(new WndQuest(this, Utils.format(msg, Dungeon.hero.givenName()))); GameScene.show(new WndQuest(this, msg));
} }
} else { } else {

View File

@ -24,6 +24,13 @@ import java.util.Locale;
import java.util.MissingResourceException; import java.util.MissingResourceException;
import java.util.ResourceBundle; import java.util.ResourceBundle;
/*
Simple wrapper class for java resource bundles.
The core idea here is that each string resource's key is a combination of the class definition and a local value.
An object or static method would usually call this with an object/class reference (usually its own) and a local key.
This means that an object can just ask for "name" rather than, say, "items.weapon.enchantments.death.name"
*/
public class Messages { public class Messages {
private static ResourceBundle strings = private static ResourceBundle strings =