Skip to content

Commit

Permalink
added option to show non-human gob path
Browse files Browse the repository at this point in the history
  • Loading branch information
EnderWiggin committed Apr 6, 2012
1 parent 9dc3748 commit 2b3cd38
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/haven/Config.java
Expand Up @@ -128,6 +128,7 @@ public class Config {
public static boolean hearthred;
public static boolean muteChat = false;
public static boolean showgobpath;
public static boolean showothergobpath = true;

static {
try {
Expand Down Expand Up @@ -559,6 +560,7 @@ private static void loadOptions() {
showq = options.getProperty("showq", "true").equals("true");
showpath = options.getProperty("showpath", "false").equals("true");
showgobpath = options.getProperty("showgobpath", "false").equals("true");
showothergobpath = options.getProperty("showothergobpath", "false").equals("true");
highlightSkills = options.getProperty("highlightSkills", "false").equals("true");
dontScaleMMIcons = options.getProperty("dontScaleMMIcons", "false").equals("true");
radar = options.getProperty("radar", "true").equals("true");
Expand Down Expand Up @@ -661,6 +663,7 @@ public static void saveOptions() {
options.setProperty("showq", showq?"true":"false");
options.setProperty("showpath", showpath?"true":"false");
options.setProperty("showgobpath", showgobpath?"true":"false");
options.setProperty("showothergobpath", showothergobpath?"true":"false");
options.setProperty("highlightSkills", highlightSkills?"true":"false");
options.setProperty("dontScaleMMIcons", dontScaleMMIcons?"true":"false");
options.setProperty("radar", radar?"true":"false");
Expand Down
4 changes: 2 additions & 2 deletions src/haven/MapView.java
Expand Up @@ -1427,7 +1427,7 @@ public void draw(GOut og) {
drawmap(g);

//movement highlight
if(Config.showgobpath){
if(Config.showgobpath||Config.showothergobpath){
drawGobPath(g);
}
if(Config.showpath){
Expand Down Expand Up @@ -1493,7 +1493,7 @@ private void drawGobPath(GOut g) {
g.chcolor(Color.ORANGE);
synchronized (glob.oc) {
for (Gob gob : glob.oc){
if (gob.isHuman()) {
if ((Config.showgobpath && gob.isHuman()) || (Config.showothergobpath && !gob.isHuman())) {
if(gob.sc == null){continue;}
m = gob.getattr(Moving.class);
if((m!=null)&&(m instanceof LinMove)){
Expand Down
9 changes: 8 additions & 1 deletion src/haven/OptWnd.java
Expand Up @@ -222,12 +222,19 @@ public void changed(boolean val) {
}
}).a = Config.highlightSkills;

(new CheckBox(new Coord(220, 410), tab, "Show gob path") {
(new CheckBox(new Coord(220, 375), tab, "Show human gob path") {
public void changed(boolean val) {
Config.showgobpath = val;
Config.saveOptions();
}
}).a = Config.showgobpath;

(new CheckBox(new Coord(220, 410), tab, "Show other gob path") {
public void changed(boolean val) {
Config.showothergobpath = val;
Config.saveOptions();
}
}).a = Config.showothergobpath;

(new CheckBox(new Coord(440, 130), tab, "Auto-hearth") {
public void changed(boolean val) {
Expand Down

0 comments on commit 2b3cd38

Please sign in to comment.