Rename height field of ObjectDefinition to length.

This commit is contained in:
Major-
2014-09-11 21:29:52 +01:00
parent 5ab6d749b5
commit c8cc7a5cd2
3 changed files with 13 additions and 14 deletions
+1 -1
View File
@@ -60,5 +60,5 @@ on :command, :objectinfo, RIGHTS_ADMIN do |player, command|
id = args[0].to_i id = args[0].to_i
definition = ObjectDefinition.lookup(id) definition = ObjectDefinition.lookup(id)
player.send_message("Object #{id} is called #{definition.name} and its description is \"#{definition.description}\".") player.send_message("Object #{id} is called #{definition.name} and its description is \"#{definition.description}\".")
player.send_message("Its width is #{definition.width} and its height is #{definition.height}.") player.send_message("Its width is #{definition.width} and its length is #{definition.length}.")
end end
@@ -87,7 +87,7 @@ public final class ObjectDefinitionDecoder {
} else if (opcode == 14) { } else if (opcode == 14) {
definition.setWidth(data.get() & 0xFF); definition.setWidth(data.get() & 0xFF);
} else if (opcode == 15) { } else if (opcode == 15) {
definition.setHeight(data.get() & 0xFF); definition.setLength(data.get() & 0xFF);
} else if (opcode == 17) { } else if (opcode == 17) {
definition.setSolid(false); definition.setSolid(false);
} else if (opcode == 18) { } else if (opcode == 18) {
@@ -57,8 +57,7 @@ public final class ObjectDefinition {
*/ */
public static ObjectDefinition lookup(int id) { public static ObjectDefinition lookup(int id) {
if (id < 0 || id > definitions.length) { if (id < 0 || id > definitions.length) {
throw new IndexOutOfBoundsException(ObjectDefinition.class.getName() + " lookup index " + id throw new IndexOutOfBoundsException(ObjectDefinition.class.getName() + " lookup index " + id + " out of bounds.");
+ " out of bounds.");
} }
return definitions[id]; return definitions[id];
} }
@@ -69,9 +68,9 @@ public final class ObjectDefinition {
private String description; private String description;
/** /**
* This object's height. * This object's length.
*/ */
private int height; private int length;
/** /**
* The object's id. * The object's id.
@@ -127,12 +126,12 @@ public final class ObjectDefinition {
} }
/** /**
* Gets the height of this object. * Gets the length of this object.
* *
* @return The height. * @return The length.
*/ */
public int getHeight() { public int getLength() {
return height; return length;
} }
/** /**
@@ -208,12 +207,12 @@ public final class ObjectDefinition {
} }
/** /**
* Sets the height of this object. * Sets the length of this object.
* *
* @param height The height. * @param length The length.
*/ */
public void setHeight(int height) { public void setLength(int length) {
this.height = height; this.length = length;
} }
/** /**