Unix compatible, you heard of it?

This commit is contained in:
dginovker
2019-06-19 09:15:27 -04:00
parent ea51313125
commit c2559bf62f
16 changed files with 306 additions and 45 deletions
@@ -38,7 +38,7 @@ public class GlobalDropsHandler {
BufferedReader Checker;
try {
Checker = new BufferedReader(new FileReader(
"./Data/cfg/globaldrops.txt"));
"./data/cfg/globaldrops.txt"));
while ((Data = Checker.readLine()) != null) {
if (Data.startsWith("#")) {
continue;
@@ -369,7 +369,7 @@ public int itemAmount(String name, int itemId, int itemX, int itemY) {
boolean EndOfFile = false;
BufferedReader characterfile = null;
try {
characterfile = new BufferedReader(new FileReader("./Data/cfg/"
characterfile = new BufferedReader(new FileReader("./data/cfg/"
+ FileName));
} catch (FileNotFoundException fileex) {
Misc.println(FileName + ": file not found.");
@@ -28,8 +28,8 @@ public class ObjectHandler {
public static List<Objects> removedObjects = new ArrayList<Objects>();
public ObjectHandler() {
loadGlobalObjects("./Data/cfg/global-objects.cfg");
// Ladders.loadGlobalLadders("./Data/Ladders/AdvancedLadders.cfg");
loadGlobalObjects("./data/cfg/global-objects.cfg");
// Ladders.loadGlobalLadders("./data/Ladders/AdvancedLadders.cfg");
}
public Objects getObjectByPosition(int x, int y) {
@@ -59,7 +59,7 @@ public final class ObjectDef {
public static byte[] getBuffer(String s) {
try {
java.io.File f = new java.io.File("./Data/world/object/" + s);
java.io.File f = new java.io.File("./data/world/object/" + s);
if (!f.exists()) {
return null;
}
@@ -394,7 +394,7 @@ public class Region {
public static void load() {
try {
File f = new File("./Data/world/map_index");
File f = new File("./data/world/map_index");
byte[] buffer = new byte[(int) f.length()];
DataInputStream dis = new DataInputStream(new FileInputStream(f));
dis.readFully(buffer);
@@ -416,9 +416,9 @@ public class Region {
regions[i] = new Region(regionIds[i], isMembers[i]);
}
for (int i = 0; i < size; i++) {
byte[] file1 = getBuffer(new File("./Data/world/map/"
byte[] file1 = getBuffer(new File("./data/world/map/"
+ mapObjectsFileIds[i] + ".gz"));
byte[] file2 = getBuffer(new File("./Data/world/map/"
byte[] file2 = getBuffer(new File("./data/world/map/"
+ mapGroundFileIds[i] + ".gz"));
if (file1 == null || file2 == null) {
continue;