mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 16:49:11 +00:00
Add object obstruction to object definitions.
This commit is contained in:
@@ -120,6 +120,8 @@ public final class ObjectDefinitionDecoder {
|
||||
data.get();
|
||||
} else if (opcode >= 70 && opcode <= 72) {
|
||||
data.getShort();
|
||||
} else if (opcode == 73) {
|
||||
definition.setObstructive(true);
|
||||
} else if (opcode == 75) {
|
||||
data.get();
|
||||
} else {
|
||||
|
||||
@@ -82,6 +82,11 @@ public final class ObjectDefinition {
|
||||
*/
|
||||
private boolean interactive;
|
||||
|
||||
/**
|
||||
* Denotes whether or not this object obstructs the ground.
|
||||
*/
|
||||
private boolean obstructive;
|
||||
|
||||
/**
|
||||
* This object's length.
|
||||
*/
|
||||
@@ -173,7 +178,8 @@ public final class ObjectDefinition {
|
||||
/**
|
||||
* Indicates the impenetrability of this object.
|
||||
*
|
||||
* @return {@code true} if this object is impenetrable, otherwise {@code false}.
|
||||
* @return {@code true} if this object is impenetrable, otherwise
|
||||
* {@code false}.
|
||||
*/
|
||||
public boolean isImpenetrable() {
|
||||
return impenetrable;
|
||||
@@ -182,12 +188,23 @@ public final class ObjectDefinition {
|
||||
/**
|
||||
* Indicates the interactivity of this object.
|
||||
*
|
||||
* @return {@code true} if the object is interactive, otherwise {@code false}.
|
||||
* @return {@code true} if the object is interactive, otherwise
|
||||
* {@code false}.
|
||||
*/
|
||||
public boolean isInteractive() {
|
||||
return interactive;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether or not this object obstructs the ground.
|
||||
*
|
||||
* @return {@code true} if the object obstructs the ground otherwise
|
||||
* {@code false}.
|
||||
*/
|
||||
public boolean isObstructive() {
|
||||
return obstructive;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates the solidity of this object.
|
||||
*
|
||||
@@ -269,4 +286,13 @@ public final class ObjectDefinition {
|
||||
this.width = width;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether or not this object is obstructive to the ground.
|
||||
*
|
||||
* @param obstructive Whether or not this object obstructs the ground.
|
||||
*/
|
||||
public void setObstructive(boolean obstructive) {
|
||||
this.obstructive = obstructive;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user