Refactored: NPCType#examine

Refactored: ObjType#examine
Renamed: LocType#examine
This commit is contained in:
thedaneeffect committed 2023-01-08 13:29:15 -05:00
1 parent 83acc98eac
commit 54deb95c29
4 files changed
+15 -15

No files matched your search

+6 -6
View File
@@ -5440,8 +5440,8 @@ public class Game extends GameShell {
}
String message;
if (type.desc != null) {
message = new String(type.desc);
if (type.examine != null) {
message = type.examine;
} else {
message = "It's a " + type.name + ".";
}
@@ -5688,7 +5688,7 @@ public class Game extends GameShell {
if ((iface != null) && (iface.inventorySlotObjCount[slot] >= 0x186a0)) {
message = iface.inventorySlotObjCount[slot] + " x " + type.name;
} else if (type.examine != null) {
message = new String(type.examine);
message = type.examine;
} else {
message = "It's a " + type.name + ".";
}
@@ -5722,8 +5722,8 @@ public class Game extends GameShell {
int locID = (bitset >> 14) & 0x7fff;
LocType type = LocType.get(locID);
String message;
if (type.description != null) {
message = type.description;
if (type.examine != null) {
message = type.examine;
} else {
message = "It's a " + type.name + ".";
}
@@ -5749,7 +5749,7 @@ public class Game extends GameShell {
ObjType obj = ObjType.get(objID);
String message;
if (obj.examine != null) {
message = new String(obj.examine);
message = obj.examine;
} else {
message = "It's a " + obj.name + ".";
}
+3 -3
View File
@@ -127,7 +127,7 @@ public class LocType {
public int varbit;
public int decorOffset;
public int[] modelKinds;
public String description;
public String examine;
public boolean interactable;
public boolean castShadow;
public int seqID;
@@ -142,7 +142,7 @@ public class LocType {
modelIDs = null;
modelKinds = null;
name = null;
description = null;
examine = null;
srcColor = null;
dstColor = null;
sizeX = 1;
@@ -430,7 +430,7 @@ public class LocType {
} else if (j == 2) {
name = buffer.readString();
} else if (j == 3) {
description = buffer.readString();
examine = buffer.readString();
} else if (j == 5) {
int l = buffer.read8U();
if (l > 0) {
+2 -2
View File
@@ -78,7 +78,7 @@ public class NPCType {
public int scaleZ = 128;
public boolean showOnMinimap = true;
public int[] overrides;
public byte[] desc;
public String examine;
public int scaleXY = 128;
public int lightAttenuation;
/**
@@ -246,7 +246,7 @@ public class NPCType {
} else if (code == 2) {
name = buffer.readString();
} else if (code == 3) {
desc = buffer.readStringRaw();
examine = buffer.readString();
} else if (code == 12) {
size = buffer.read();
} else if (code == 13) {
+4 -4
View File
@@ -57,7 +57,7 @@ public class ObjType {
}
if (!Game.members && type.members) {
type.name = "Members Object";
type.examine = "Login to a members' server to use this object.".getBytes();
type.examine = "Login to a members' server to use this object.";
type.options = null;
type.inventoryOptions = null;
type.team = 0;
@@ -247,7 +247,7 @@ public class ObjType {
public int modelID;
public int maleHeadModelID0;
public boolean stackable;
public byte[] examine;
public String examine;
public int linkedID;
public int iconZoom;
public int lightAttenuation;
@@ -461,7 +461,7 @@ public class ObjType {
s = "an";
}
examine = ("Swap this note at any bank for " + s + " " + linked.name + ".").getBytes();
examine = "Swap this note at any bank for " + s + " " + linked.name + ".";
stackable = true;
}
@@ -560,7 +560,7 @@ public class ObjType {
} else if (code == 2) {
name = buffer.readString();
} else if (code == 3) {
examine = buffer.readStringRaw();
examine = buffer.readString();
} else if (code == 4) {
iconZoom = buffer.read16U();
} else if (code == 5) {