Gridarta Editor
net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T > Interface Template Reference
+ Inheritance diagram for net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >:
+ Collaboration diagram for net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >:

Public Member Functions

void addMsgTextLine (@NotNull String text)
 Adds a line of message text. More...
 
void addObjectText (@NotNull String line)
 Appends. More...
 
void addTailPart (@NotNull T tail)
 Appends a tail to this GameObject. More...
 
clone ()
 Creates a clone of this base object. More...
 
int countInvObjects ()
 Counts the number of all inventory items (recursively). More...
 
void facesReloaded ()
 Will be called whenever the archetype faces have been reloaded. More...
 
String getAnimName ()
 DaiEditor only: Returns the name of the animation. More...
 
getArchetype ()
 Returns the Archetype this GameObject is based on. More...
 
double getAttributeDouble (@NotNull String attributeName, boolean queryArchetype)
 Returns the requested attribute value of this GameObject as. More...
 
int getAttributeInt (@NotNull String attributeName, boolean queryArchetype)
 Returns the requested attribute value of this GameObject as. More...
 
long getAttributeLong (@NotNull String attributeName, boolean queryArchetype)
 Returns the requested attribute value of this GameObject as. More...
 
String getAttributeString (@NotNull String attributeName, boolean queryArchetype)
 Returns the requested attribute value of this GameObject as String. More...
 
String getBestName ()
 Returns the name which is best appropriate to describe this GameObject. More...
 
int getDirection ()
 Returns the direction of this Archetype or GameObject. More...
 
int getEditType ()
 Returns the edit type. More...
 
String getFaceName ()
 Returns the name of the face of this Archetype or GameObject. More...
 
String getFaceObjName ()
 Returns the face name, can be from animation or face. More...
 
FaceSource getFaceObjSource ()
 Returns the FaceSource of this base object. More...
 
getHead ()
 Return the head part of a multi-part object. More...
 
String getLoreText ()
 Returns the map lore. More...
 
Point getMapLocation ()
 Returns the coordinate of this GameObject on its map. More...
 
int getMapX ()
 Returns the X coordinate of this GameObject on its map. More...
 
int getMapY ()
 Returns the Y coordinate of this GameObject on its map. More...
 
int getMaxX ()
 Determines the maximum x-coordinate of any part relative to the head part. More...
 
int getMaxY ()
 Determines the maximum y-coordinate of any part relative to the head part. More...
 
int getMinX ()
 Determines the minimum x-coordinate of any part relative to the head part. More...
 
int getMinY ()
 Determines the minimum y-coordinate of any part relative to the head part. More...
 
String getMsgText ()
 Returns the message bound to this object. More...
 
getMultiNext ()
 Returns the next of this multi-part object. More...
 
int getMultiRefCount ()
 Returns the number of parts for multi-part heads. More...
 
ImageIcon getNormalImage ()
 Returns the normal face for this GameObject. More...
 
String getObjectText ()
 Returns the object text of this GameObject as String. More...
 
String getObjName ()
 Returns the name of the object as shown to the player. More...
 
int getSizeX ()
 Determines the horizontal extent in squares. More...
 
int getSizeY ()
 Determines the vertical extent in squares. More...
 
int getTypeNo ()
 Returns the type number of this Archetype. More...
 
boolean hasAttribute (@NotNull String attributeName, boolean queryArchetype)
 Returns whether an attribute name exists. More...
 
boolean isDefaultGameObject ()
 Returns whether this game object is unmodified from its underlying archetype. More...
 
boolean isEqual (@NotNull BaseObject<?, ?, ?, ?> gameObject)
 Compares this object to another game object. More...
 
boolean isHead ()
 Returns whether this object is a single-part object or the head of the multi-part object. More...
 
boolean isMulti ()
 Returns whether this Archetype is a multi-part object. More...
 
boolean isTail ()
 Determines if this part is a tail part. More...
 
newInstance (@NotNull GameObjectFactory< G, A, R > gameObjectFactory)
 Creates a new GameObject instance: an Archetype is instantiated, a GameObject is cloned. More...
 
void notifyBeginChange ()
 Notifies the map model that this container is about to change. More...
 
void notifyEndChange ()
 Notifies the map model that this container has changed. More...
 
void notifyTransientChange ()
 Notifies the map model that this container has changed but need not be restored by undo/redo. More...
 
void removeTailParts ()
 Removes all tail parts of this game object. More...
 
void setAttributeString (@NotNull String attributeName, @NotNull String value)
 Sets the String of an archetype attribute in the objectText. More...
 
void setEditType (int editType)
 Sets the edit type. More...
 
void setLoreText (@NotNull CharSequence loreText)
 Sets the map lore. More...
 
void setMapX (int mapX)
 Sets the X coordinate of this GameObject on its map. More...
 
void setMapY (int mapY)
 Sets the Y coordinate of this GameObject on its map. More...
 
void setMsgText (@Nullable String msgText)
 Sets the message text. More...
 
void setMulti (@NotNull MultiArchData< G, A, R, T > multi)
 
void setObjectFace ()
 We set here the real face of the objects, depending on the set face and the set animation. More...
 
void setObjectText (@NotNull String objectText)
 Sets. More...
 
String toString (@NotNull String format)
 Returns a string representation of this game object. More...
 
boolean usesDirection ()
 Return whether this base object uses the "direction" attribute. More...
 
void visit (@NotNull BaseObjectVisitor< G, A, R > baseObjectVisitor)
 Calls the appropriate. More...
 
- Public Member Functions inherited from net.sf.gridarta.model.baseobject.Attributes
double getAttributeDouble (@NotNull String attributeName)
 Returns an attribute value of this Archetype as double. More...
 
int getAttributeInt (@NotNull String attributeName)
 Returns an attribute value of this Archetype as int. More...
 
long getAttributeLong (@NotNull String attributeName)
 Returns an attribute value of this Archetype as long. More...
 
String getAttributeString (@NotNull String attributeName)
 Returns the requested attribute value of this GameObject as String. More...
 
boolean hasAttribute (@NotNull String attributeName)
 Returns whether an attribute name exists. More...
 
void removeAttribute (@NotNull String attributeName)
 Removes the String of an archetype attribute from the objectText. More...
 
void setAttributeInt (@NotNull String attributeName, int value)
 Sets an int value attribute. More...
 

Public Attributes

String ANIM_SPEED = "anim_speed"
 The name of the "anim_speed" attribute. More...
 
String ANIMATION = "animation"
 The attribute name of the object's animation. More...
 
String BLOCKSVIEW = "blocksview"
 The name of the "blocksview" attribute. More...
 
String DIRECTION = "direction"
 The attribute name of the object's direction. More...
 
int EDIT_TYPE_NONE = 0x10000
 
String FACE = "face"
 The attribute name of the object's face. More...
 
String HP = "hp"
 The attribute name of the "hp" attribute. More...
 
String IS_ANIMATED = "is_animated"
 The attribute name of the "is_animated" flag. More...
 
String IS_TURNABLE = "is_turnable"
 The name of the "is_turnable" attribute. More...
 
String LAST_HEAL = "last_heal"
 The name of the "last_heal" attribute. More...
 
String LEVEL = "level"
 The name of the "level" attribute. More...
 
String NAME = "name"
 The attribute name of the object's name. More...
 
String NO_PASS = "no_pass"
 The name of the "no_pass" attribute. More...
 
String NO_PICK = "no_pick"
 The name of the "no_pick" attribute. More...
 
String SLAYING = "slaying"
 The name of the "slaying" attribute. More...
 
String SP = "sp"
 The attribute name of the "sp" attribute. More...
 
String TITLE = "title"
 The attribute name of the object's title. More...
 
String TYPE = "type"
 The attribute name of the object's type. More...
 

Detailed Description

Definition at line 34 of file BaseObject.java.

Member Function Documentation

◆ addMsgTextLine()

void net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.addMsgTextLine ( @NotNull String  text)

Adds a line of message text.

This is used when creating the GameObject from the ArchetypeParser.

Parameters
textthe text to append to message text

◆ addObjectText()

void net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.addObjectText ( @NotNull String  line)

Appends.

text

to the object text of this GameObject.

Parameters
linea line of text to append, may contain '
' for appending multiple lines

◆ addTailPart()

void net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.addTailPart ( @NotNull T  tail)

Appends a tail to this GameObject.

Parameters
tailthe tail to append

Referenced by net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testGetAllGameObjects1().

+ Here is the caller graph for this function:

◆ clone()

T net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.clone ( )

Creates a clone of this base object.

◆ countInvObjects()

int net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.countInvObjects ( )

Counts the number of all inventory items (recursively).

The returned value does not include this GameObject.

Returns
the number of objects in the inventory (recursively)

Referenced by net.sf.gridarta.model.baseobject.AbstractBaseObject< G, A, R, G >.countInvObjects().

+ Here is the caller graph for this function:

◆ facesReloaded()

void net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.facesReloaded ( )

Will be called whenever the archetype faces have been reloaded.

◆ getAnimName()

String net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getAnimName ( )

DaiEditor only: Returns the name of the animation.

Returns
the name of the animation

◆ getArchetype()

R net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getArchetype ( )

Returns the Archetype this GameObject is based on.

Returns
the archetype this game object is based on
Note
For Archetypes, this method returns
this
.

Referenced by net.sf.gridarta.model.autojoin.AutojoinLists< net.sf.gridarta.model.gameobject.TestGameObject, net.sf.gridarta.model.maparchobject.TestMapArchObject, net.sf.gridarta.model.archetype.TestArchetype >.addAutojoinList(), net.sf.gridarta.model.io.AbstractGameObjectParser< TestGameObject, TestMapArchObject, TestArchetype >.addModifiedFields(), net.sf.gridarta.gui.dialog.plugin.parameter.archetype.ArchComboBoxEditor< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.ArchComboBoxEditor(), net.sf.gridarta.model.io.AbstractGameObjectParser< TestGameObject, TestMapArchObject, TestArchetype >.expandMulti(), net.sf.gridarta.gui.dialog.gameobjectattributes.GameObjectAttributesDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.GameObjectAttributesDialog(), net.sf.gridarta.gui.dialog.plugin.parameter.archetype.ArchComboBoxCellRenderer.getListCellRendererComponent(), net.sf.gridarta.gui.panel.gameobjectattributes.MsgTextTab< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMsgText(), net.sf.gridarta.model.spells.GameObjectSpell< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getName(), net.sf.gridarta.gui.dialog.gameobjectattributes.DialogAttributeInvSpell< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getObjectText(), net.sf.gridarta.model.mapmodel.DefaultMapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.joinDelete(), net.sf.gridarta.model.mapmodel.DefaultMapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.joinInsert(), net.sf.gridarta.gui.map.renderer.SimpleIsoMapRenderer< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.paint(), net.sf.gridarta.gui.panel.gameobjectattributes.ArchTab< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.refresh(), net.sf.gridarta.gui.dialog.plugin.parameter.archetype.ArchComboBoxEditor< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setItem(), and net.sf.gridarta.gui.panel.objectchoicedisplay.ObjectChoiceDisplay.showObjectChooserQuickObject().

+ Here is the caller graph for this function:

◆ getAttributeDouble()

double net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getAttributeDouble ( @NotNull String  attributeName,
boolean  queryArchetype 
)

Returns the requested attribute value of this GameObject as.

double

.

Parameters
attributeNamethe name of the attribute to search
queryArchetypewhether to query the archetype of this game object
Returns
the attribute value or zero if not found
See also
#getAttributeDouble(String)
#getAttributeString(String, boolean)

◆ getAttributeInt()

int net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getAttributeInt ( @NotNull String  attributeName,
boolean  queryArchetype 
)

Returns the requested attribute value of this GameObject as.

int

.

Parameters
attributeNamethe name of the attribute to search
queryArchetypewhether to query the archetype of this game object
Returns
attribute the value or zero if not found
See also
#getAttributeInt(String)
#getAttributeString(String, boolean)

Referenced by net.sf.gridarta.model.validation.checks.BlockedSpawnPointChecker< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.checkSpawnPoint(), net.sf.gridarta.model.validation.checks.SysObjectNotOnLayerZeroChecker< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.validateGameObject(), and net.sf.gridarta.model.validation.checks.ConnectedPickableChecker< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.validateGameObject().

+ Here is the caller graph for this function:

◆ getAttributeLong()

long net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getAttributeLong ( @NotNull String  attributeName,
boolean  queryArchetype 
)

Returns the requested attribute value of this GameObject as.

long

.

Parameters
attributeNamethe name of the attribute to search
queryArchetypewhether to query the archetype of this game object
Returns
the attribute value or zero if not found
See also
#getAttributeLong(String)
#getAttributeString(String, boolean)

◆ getAttributeString()

String net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getAttributeString ( @NotNull String  attributeName,
boolean  queryArchetype 
)

Returns the requested attribute value of this GameObject as String.

The attribute value is first searched in this GameObject. If

queryArchetype == true

, additional search is done: if the attribute value is not found and this GameObject is not an Archetype itself, the attribute value is searched in this GameObject's Archetype as well.

Parameters
attributeNamethe name of the attribute to search; this will be
"attributeName value"
in the object text
queryArchetypewhether to query the Archetype of this GameObject:
true
if the Archetype should be queried as well,
false
to ignore it
Returns
the attribute value or an empty String ("") if no such attribute
See also
#getAttributeString(String)

Referenced by net.sf.gridarta.gui.dialog.gameobjectattributes.GameObjectAttributesDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.applySettings2(), net.sf.gridarta.gui.dialog.browsearchetypes.BrowseArchetypesTableModel< G, A, R >.getValueAt(), net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.testSetAttributeInt1(), net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.testSetAttributeString(), and net.sf.gridarta.model.validation.checks.ConnectedPickableChecker< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.validateGameObject().

+ Here is the caller graph for this function:

◆ getBestName()

◆ getDirection()

int net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getDirection ( )

Returns the direction of this Archetype or GameObject.

Returns
the direction of this archetype or game object

◆ getEditType()

int net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getEditType ( )

Returns the edit type.

Returns
the edit type

◆ getFaceName()

String net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getFaceName ( )

Returns the name of the face of this Archetype or GameObject.

Returns
the name of the face of this archetype or game object

Referenced by net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.testSetFaceName1(), and net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.testSetFaceName2().

+ Here is the caller graph for this function:

◆ getFaceObjName()

String net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getFaceObjName ( )

Returns the face name, can be from animation or face.

Returns
the face name

Referenced by net.sf.gridarta.gui.map.renderer.SimpleIsoMapRenderer< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.paint().

+ Here is the caller graph for this function:

◆ getFaceObjSource()

FaceSource net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getFaceObjSource ( )

Returns the FaceSource of this base object.

Returns
the face source

◆ getHead()

T net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getHead ( )

Return the head part of a multi-part object.

For single-part objects it is the object itself.

Returns
the head of the object

Referenced by net.sf.gridarta.model.validation.checks.BlockedSpawnPointChecker< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.checkSpawnPoint(), net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.decodeMapFile(), net.sf.gridarta.gui.panel.tools.DeletionTool< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.deleteArch(), net.sf.gridarta.action.MoveSquareInvAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAction(), net.sf.gridarta.gui.panel.gameobjectattributes.EventsTab< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAddNewEvent(), net.sf.gridarta.gui.panel.gameobjectattributes.EventsTab< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doEditEvent(), net.sf.gridarta.gui.panel.tools.InsertionTool< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doInsert(), net.sf.gridarta.gui.panel.selectedsquare.CellRenderer< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getListCellRendererComponent(), net.sf.gridarta.model.exitconnector.ExitMatcher< net.sf.gridarta.model.gameobject.TestGameObject, net.sf.gridarta.model.maparchobject.TestMapArchObject, net.sf.gridarta.model.archetype.TestArchetype >.getValidExit(), net.sf.gridarta.gui.map.renderer.SimpleIsoMapRenderer< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.paint(), net.sf.gridarta.gui.panel.objectchoicedisplay.ObjectChoiceDisplay.showObjectChooserQuickObject(), net.sf.gridarta.model.validation.checks.SysObjectNotOnLayerZeroChecker< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.validateGameObject(), and net.sf.gridarta.model.validation.checks.ConnectedPickableChecker< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.validateGameObject().

+ Here is the caller graph for this function:

◆ getLoreText()

String net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getLoreText ( )

Returns the map lore.

Returns
the map lore

◆ getMapLocation()

Point net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getMapLocation ( )

Returns the coordinate of this GameObject on its map.

This method only guarantees a reasonable value for GameObjects that are directly bound to a map. Implementations may also return reasonable values for GameObjects inside containers, but they are not required to do so.

Returns
the coordinate on map

Referenced by net.sf.gridarta.gui.dialog.replace.ReplaceDialog< G, A, R >.doReplace().

+ Here is the caller graph for this function:

◆ getMapX()

int net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getMapX ( )

Returns the X coordinate of this GameObject on its map.

This method only guarantees a reasonable value for GameObjects that are directly bound to a map. Implementations may also return reasonable values for GameObjects inside containers, but they are not required to do so.

Returns
the x coordinate on map
See also
getMapY()

Referenced by net.sf.gridarta.model.mapmodel.TestMapModelHelper.checkContentsString(), net.sf.gridarta.gui.map.mapview.ErroneousMapSquares< G, A, R >.errorsChanged(), and net.sf.gridarta.gui.panel.connectionview.Control< Integer, G, A, R >.highlightSelectedEntries().

+ Here is the caller graph for this function:

◆ getMapY()

int net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getMapY ( )

Returns the Y coordinate of this GameObject on its map.

This method only guarantees a reasonable value for GameObjects that are directly bound to a map. Implementations may also return reasonable values for GameObjects inside containers, but they are not required to do so.

Returns
the y coordinate on map
See also
getMapX()

Referenced by net.sf.gridarta.model.mapmodel.TestMapModelHelper.checkContentsString(), net.sf.gridarta.gui.map.mapview.ErroneousMapSquares< G, A, R >.errorsChanged(), and net.sf.gridarta.gui.panel.connectionview.Control< Integer, G, A, R >.highlightSelectedEntries().

+ Here is the caller graph for this function:

◆ getMaxX()

int net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getMaxX ( )

Determines the maximum x-coordinate of any part relative to the head part.

For single-part objects 0 is returned.

Returns
the maximum x-coordinate

Referenced by net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.decodeMapFile().

+ Here is the caller graph for this function:

◆ getMaxY()

int net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getMaxY ( )

Determines the maximum y-coordinate of any part relative to the head part.

For single-part objects 0 is returned.

Returns
the maximum y-coordinate

Referenced by net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.decodeMapFile().

+ Here is the caller graph for this function:

◆ getMinX()

int net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getMinX ( )

Determines the minimum x-coordinate of any part relative to the head part.

For single-part objects 0 is returned.

Returns
the minimum x-coordinate

Referenced by net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.decodeMapFile().

+ Here is the caller graph for this function:

◆ getMinY()

int net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getMinY ( )

Determines the minimum y-coordinate of any part relative to the head part.

For single-part objects 0 is returned.

Returns
the minimum y-coordinate

Referenced by net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.decodeMapFile().

+ Here is the caller graph for this function:

◆ getMsgText()

String net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getMsgText ( )

◆ getMultiNext()

T net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getMultiNext ( )

◆ getMultiRefCount()

int net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getMultiRefCount ( )

Returns the number of parts for multi-part heads.

(*.getMultiRefCount() > 0) is often used as way to find multi-parts.

Returns
the number of parts
Todo:
rename me, "Ref" is a term in Java short for "Reference" and this is not about "References" but about multi-square arches.

Referenced by net.sf.gridarta.gui.map.renderer.SimpleIsoMapRenderer< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.paint(), and net.sf.gridarta.gui.panel.objectchoicedisplay.ObjectChoiceDisplay.showObjectChooserQuickObject().

+ Here is the caller graph for this function:

◆ getNormalImage()

ImageIcon net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getNormalImage ( )

Returns the normal face for this GameObject.

Returns
the normal face for this GameObject

Referenced by net.sf.gridarta.gui.map.renderer.SimpleIsoMapRenderer< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.paint().

+ Here is the caller graph for this function:

◆ getObjectText()

String net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getObjectText ( )

Returns the object text of this GameObject as String.

Returns
the object text

Referenced by net.sf.gridarta.model.artifact.ArtifactParserTest.testMissingObject(), and net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.testSetAttributeString().

+ Here is the caller graph for this function:

◆ getObjName()

◆ getSizeX()

int net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getSizeX ( )

Determines the horizontal extent in squares.

For single-part objects 1 is returned.

Returns
the horizontal extent

Referenced by net.sf.gridarta.gui.panel.objectchoicedisplay.ObjectChoiceDisplay.showObjectChooserQuickObject().

+ Here is the caller graph for this function:

◆ getSizeY()

int net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getSizeY ( )

Determines the vertical extent in squares.

For single-part objects 1 is returned.

Returns
the vertical extent

Referenced by net.sf.gridarta.gui.panel.objectchoicedisplay.ObjectChoiceDisplay.showObjectChooserQuickObject().

+ Here is the caller graph for this function:

◆ getTypeNo()

◆ hasAttribute()

boolean net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.hasAttribute ( @NotNull String  attributeName,
boolean  queryArchetype 
)

Returns whether an attribute name exists.

Parameters
attributeNamethe attribute name
queryArchetypewhether to query the Archetype of this GameObject:
true
if the Archetype should be queried as well,
false
to ignore it.
Returns
whether the attribute name exists

◆ isDefaultGameObject()

boolean net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.isDefaultGameObject ( )

Returns whether this game object is unmodified from its underlying archetype.

Returns
whether this game object is unmodified

Referenced by net.sf.gridarta.gui.dialog.gameobjectattributes.DialogAttributeInvSpell< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getObjectText().

+ Here is the caller graph for this function:

◆ isEqual()

boolean net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.isEqual ( @NotNull BaseObject<?, ?, ?, ?>  gameObject)

Compares this object to another game object.

Parameters
gameObjectthe other game object
Returns
true
if this object equals the other object

◆ isHead()

boolean net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.isHead ( )

Returns whether this object is a single-part object or the head of the multi-part object.

Returns
true
if single-part or head of multi-part, otherwise
false

Referenced by net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.decodeMapFile().

+ Here is the caller graph for this function:

◆ isMulti()

◆ isTail()

boolean net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.isTail ( )

Determines if this part is a tail part.

For single-part objects this is never true.

Returns
true
iff this part if a tail part

◆ newInstance()

G net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.newInstance ( @NotNull GameObjectFactory< G, A, R >  gameObjectFactory)

Creates a new GameObject instance: an Archetype is instantiated, a GameObject is cloned.

Parameters
gameObjectFactorythe game object factory for creating new game objects
Returns
the new game object instance

Referenced by net.sf.gridarta.gui.panel.gameobjectattributes.GameObjectAttributesControl< G, A, R >.mapArchAddInv().

+ Here is the caller graph for this function:

◆ notifyBeginChange()

void net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.notifyBeginChange ( )

Notifies the map model that this container is about to change.

◆ notifyEndChange()

void net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.notifyEndChange ( )

Notifies the map model that this container has changed.

◆ notifyTransientChange()

void net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.notifyTransientChange ( )

Notifies the map model that this container has changed but need not be restored by undo/redo.

◆ removeTailParts()

void net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.removeTailParts ( )

Removes all tail parts of this game object.

Afterwards isMulti() will return

false

.

◆ setAttributeString()

◆ setEditType()

void net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.setEditType ( int  editType)

Sets the edit type.

Parameters
editTypethe edit type

◆ setLoreText()

void net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.setLoreText ( @NotNull CharSequence  loreText)

Sets the map lore.

Parameters
loreTextthe map lore

◆ setMapX()

void net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.setMapX ( int  mapX)

Sets the X coordinate of this GameObject on its map.

Parameters
mapXthe x coordinate
Warning
Only use this method during the load process.

◆ setMapY()

void net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.setMapY ( int  mapY)

Sets the Y coordinate of this GameObject on its map.

Parameters
mapYthe y coordinate
Warning
Only use this method during the load process.

◆ setMsgText()

void net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.setMsgText ( @Nullable String  msgText)

Sets the message text.

Parameters
msgTextthe message text

◆ setMulti()

void net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.setMulti ( @NotNull MultiArchData< G, A, R, T >  multi)

◆ setObjectFace()

void net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.setObjectFace ( )

We set here the real face of the objects, depending on the set face and the set animation.

The rule is, that a active animation will overrule the default face. We will catch it here. This method should always be invoked after the face or animation has changed and no other change is expected right now, so the changes to animation / face should be applied.

◆ setObjectText()

◆ toString()

String net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.toString ( @NotNull String  format)

Returns a string representation of this game object.

The string representation is the given

format

string which supports the following replacements:

  • $$ - a string $ character
  • ${NAME} - the in-game object name
  • ${name} - the value of attribute "name"
  • ${name:text} - text if the attribute name exists; empty otherwise. replacements within "text" are processed
Parameters
formatthe format to use
Returns
the string representation

Referenced by net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.testToString1().

+ Here is the caller graph for this function:

◆ usesDirection()

boolean net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.usesDirection ( )

Return whether this base object uses the "direction" attribute.

Returns
whether this base object uses the "direction" attribute

Referenced by net.sf.gridarta.gui.panel.gameobjectattributes.ArchTab< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.refresh(), and net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testUpdateDirectionOnInsert().

+ Here is the caller graph for this function:

◆ visit()

void net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.visit ( @NotNull BaseObjectVisitor< G, A, R >  baseObjectVisitor)

Calls the appropriate.

function of a BaseObjectVisitor.

Parameters
baseObjectVisitorthe base object visitor

Member Data Documentation

◆ ANIM_SPEED

◆ ANIMATION

String net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.ANIMATION = "animation"

◆ BLOCKSVIEW

String net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.BLOCKSVIEW = "blocksview"

◆ DIRECTION

◆ EDIT_TYPE_NONE

◆ FACE

◆ HP

String net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.HP = "hp"

◆ IS_ANIMATED

◆ IS_TURNABLE

String net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.IS_TURNABLE = "is_turnable"

The name of the "is_turnable" attribute.

Definition at line 84 of file BaseObject.java.

◆ LAST_HEAL

String net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.LAST_HEAL = "last_heal"

◆ LEVEL

◆ NAME

String net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.NAME = "name"

◆ NO_PASS

◆ NO_PICK

String net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.NO_PICK = "no_pick"

◆ SLAYING

String net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.SLAYING = "slaying"

◆ SP

String net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.SP = "sp"

◆ TITLE

String net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.TITLE = "title"

The attribute name of the object's title.

Definition at line 72 of file BaseObject.java.

◆ TYPE


The documentation for this interface was generated from the following file: