Rogue: Savage Rats, a retro-themed dungeon crawler
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
rogue-savage-rats/src/mightypork/gamecore/Config.java

54 lines
694 B

package mightypork.gamecore;
import java.io.File;
import mightypork.gamecore.util.files.config.PropertyManager;
/**
* Static application config file accessor
*
* @author MightyPork
*/
public class Config {
private static PropertyManager cfg;
public static void init(File file, String comment)
{
cfg = new PropertyManager(file, comment);
}
public static PropertyManager getProp()
{
return cfg;
}
public static void load()
{
cfg.load();
}
public static void save()
{
cfg.save();
}
public static <T> T get(String key)
{
return cfg.getValue(key);
}
public static <T> void set(String key, T value)
{
cfg.setValue(key, value);
}
}