This commit is contained in:
ThisIsALegitUsername 2023-03-04 20:04:18 +00:00
parent fb7e6cf827
commit a255143e01
4 changed files with 60671 additions and 60651 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,7 @@ import java.io.PrintWriter;
import dev.resent.module.base.RenderMod; import dev.resent.module.base.RenderMod;
import dev.resent.module.base.setting.BooleanSetting; import dev.resent.module.base.setting.BooleanSetting;
import dev.resent.module.base.setting.ModeSetting; import dev.resent.module.base.setting.ModeSetting;
import dev.resent.module.base.setting.NumberSetting;
public class SaveUtil { public class SaveUtil {
@ -28,6 +29,10 @@ public class SaveUtil {
if (s instanceof BooleanSetting) { if (s instanceof BooleanSetting) {
printwriter.println(m.getName() + "_boolsetting_" + s.name + ":" + ((BooleanSetting) s).getValue()); printwriter.println(m.getName() + "_boolsetting_" + s.name + ":" + ((BooleanSetting) s).getValue());
} }
if(s instanceof NumberSetting){
NumberSetting ss = ((NumberSetting)s);
printwriter.println(m.getName() + "_numsetting_" + s.name + ":" + String.valueOf(ss.getValue()).substring(0, (String.valueOf(ss.getValue()).length())-2));
}
}); });
}); });
} }
@ -68,6 +73,11 @@ public class SaveUtil {
((BooleanSetting) se).setValue(astring[1].equals("true")); ((BooleanSetting) se).setValue(astring[1].equals("true"));
} }
} }
if(se instanceof NumberSetting){
if(astring[0].equals(m.getName()+"_numsetting_"+se.name)){
((NumberSetting)se).value = Integer.parseInt(astring[1]);
}
}
}); });
}); });
} }