 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.model.baseobject;
22 import java.awt.Point;
23 import java.io.Serializable;
24 import javax.swing.ImageIcon;
31 import org.jetbrains.annotations.NotNull;
32 import org.jetbrains.annotations.Nullable;
34 public interface BaseObject<G
extends GameObject<G, A, R>, A extends
MapArchObject<A>, R extends
Archetype<G, A, R>, T extends
BaseObject<G, A, R, T>> extends
Attributes, Cloneable, Iterable<G>, Serializable {
168 boolean hasAttribute(@NotNull String attributeName,
boolean queryArchetype);
197 int getAttributeInt(@NotNull String attributeName,
boolean queryArchetype);
208 long getAttributeLong(@NotNull String attributeName,
boolean queryArchetype);
589 String
toString(@NotNull String format);
String getLoreText()
Returns the map lore.
int getDirection()
Returns the direction of this Archetype or GameObject.
Abstract factory for creating GameObject instances.
boolean isMulti()
Returns whether this Archetype is a multi-part object.
Enumeration describing the state of the face.
Base package of all Gridarta classes.
void addObjectText(@NotNull String line)
Appends.
int getMapX()
Returns the X coordinate of this GameObject on its map.
String SP
The attribute name of the "sp" attribute.
String getMsgText(boolean queryArchetype)
Returns the message bound to this object.
int getEditType()
Returns the edit type.
Class related to GameObject to store multi-part information.
void setEditType(int editType)
Sets the edit type.
int getAttributeInt(@NotNull String attributeName, boolean queryArchetype)
Returns the requested attribute value of this GameObject as.
int getMinY()
Determines the minimum y-coordinate of any part relative to the head part.
String getObjectText()
Returns the object text of this GameObject as String.
int getSizeX()
Determines the horizontal extent in squares.
int getMinX()
Determines the minimum x-coordinate of any part relative to the head part.
String BLOCKSVIEW
The name of the "blocksview" attribute.
String TITLE
The attribute name of the object's title.
G newInstance(@NotNull GameObjectFactory< G, A, R > gameObjectFactory)
Creates a new GameObject instance: an Archetype is instantiated, a GameObject is cloned.
Point getMapLocation()
Returns the coordinate of this GameObject on its map.
boolean isEqual(@NotNull BaseObject<?, ?, ?, ?> gameObject)
Compares this object to another game object.
void notifyBeginChange()
Notifies the map model that this container is about to change.
Reflects a game object (object on a map).
String getBestName()
Returns the name which is best appropriate to describe this GameObject.
void setObjectFace()
We set here the real face of the objects, depending on the set face and the set animation.
String NAME
The attribute name of the object's name.
boolean isTail()
Determines if this part is a tail part.
String IS_TURNABLE
The name of the "is_turnable" attribute.
String IS_ANIMATED
The attribute name of the "is_animated" flag.
boolean isHead()
Returns whether this object is a single-part object or the head of the multi-part object.
void setMulti(@NotNull MultiArchData< G, A, R, T > multi)
R getArchetype()
Returns the Archetype this GameObject is based on.
boolean usesDirection()
Return whether this base object uses the "direction" attribute.
A set of key/value pairs.
GameObjects are the objects based on Archetypes found on maps.
int getMaxX()
Determines the maximum x-coordinate of any part relative to the head part.
FaceSource getFaceObjSource()
Returns the FaceSource of this base object.
String FACE
The attribute name of the object's face.
ImageIcon getNormalImage()
Returns the normal face for this GameObject.
Interface for MapArchObjects.
double getAttributeDouble(@NotNull String attributeName, boolean queryArchetype)
Returns the requested attribute value of this GameObject as.
void setMsgText(@Nullable String msgText)
Sets the message text.
String NO_PASS
The name of the "no_pass" attribute.
String toString(@NotNull String format)
Returns a string representation of this game object.
String SLAYING
The name of the "slaying" attribute.
String NO_PICK
The name of the "no_pick" attribute.
String LAST_HEAL
The name of the "last_heal" attribute.
void setMapX(int mapX)
Sets the X coordinate of this GameObject on its map.
int getSizeY()
Determines the vertical extent in squares.
void setAttributeString(@NotNull String attributeName, @NotNull String value)
Sets the String of an archetype attribute in the objectText.
void visit(@NotNull BaseObjectVisitor< G, A, R > baseObjectVisitor)
Calls the appropriate.
T getHead()
Return the head part of a multi-part object.
int getMapY()
Returns the Y coordinate of this GameObject on its map.
void removeTailParts()
Removes all tail parts of this game object.
String LEVEL
The name of the "level" attribute.
String getObjName()
Returns the name of the object as shown to the player.
String getFaceName()
Returns the name of the face of this Archetype or GameObject.
String getAnimName()
DaiEditor only: Returns the name of the animation.
boolean hasAttribute(@NotNull String attributeName, boolean queryArchetype)
Returns whether an attribute name exists.
void facesReloaded()
Will be called whenever the archetype faces have been reloaded.
String getFaceObjName()
Returns the face name, can be from animation or face.
long getAttributeLong(@NotNull String attributeName, boolean queryArchetype)
Returns the requested attribute value of this GameObject as.
int getMaxY()
Determines the maximum y-coordinate of any part relative to the head part.
void setLoreText(@NotNull CharSequence loreText)
Sets the map lore.
int getTypeNo()
Returns the type number of this Archetype.
T getMultiNext()
Returns the next of this multi-part object.
String HP
The attribute name of the "hp" attribute.
String getAttributeString(@NotNull String attributeName, boolean queryArchetype)
Returns the requested attribute value of this GameObject as {}.
void setMapY(int mapY)
Sets the Y coordinate of this GameObject on its map.
String TYPE
The attribute name of the object's type.
String ANIM_SPEED
The name of the "anim_speed" attribute.
int getMultiRefCount()
Returns the number of parts for multi-part heads.
void notifyTransientChange()
Notifies the map model that this container has changed but need not be restored by undo/redo.
void addTailPart(@NotNull T tail)
Appends a tail to this GameObject.
int countInvObjects()
Counts the number of all inventory items (recursively).
void setObjectText(@NotNull String objectText)
Sets.
T clone()
Creates a clone of this base object.
boolean isDefaultGameObject()
Returns whether this game object is unmodified from its underlying archetype.
String ANIMATION
The attribute name of the object's animation.
void addMsgTextLine(@NotNull String text)
Adds a line of message text.
void notifyEndChange()
Notifies the map model that this container has changed.
String DIRECTION
The attribute name of the object's direction.