Gridarta Editor
net.sf.gridarta.var.crossfire.model.archetype.DefaultArchetype Class Reference

An Atrinik Archetype. More...

+ Inheritance diagram for net.sf.gridarta.var.crossfire.model.archetype.DefaultArchetype:
+ Collaboration diagram for net.sf.gridarta.var.crossfire.model.archetype.DefaultArchetype:

Public Member Functions

DefaultArchetype clone ()
 
 DefaultArchetype (@NotNull final String archetypeName, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final AnimationObjects animationObjects)
 Creates a new instance. More...
 
boolean isUndefinedArchetype ()
 
boolean usesDirection ()
 
- Public Member Functions inherited from net.sf.gridarta.model.archetype.AbstractArchetype< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >
asGameObject ()
 
getArchetype ()
 
String getArchetypeName ()
 
String getAttributeString (@NotNull final String attributeName, final boolean queryArchetype)
 
String getEditorFolder ()
 
MapSquare< G, A, R > getMapSquare ()
 
MapSquare< G, A, R > getMapSquareOptional ()
 
int getMultiPartNr ()
 
int getMultiShapeID ()
 
int getMultiX ()
 
int getMultiY ()
 
boolean isArtifact ()
 
boolean isLowestPart ()
 
newInstance (@NotNull final GameObjectFactory< G, A, R > gameObjectFactory)
 
void notifyBeginChange ()
 @noinspection NoopMethodInAbstractClass More...
 
void notifyEndChange ()
 @noinspection NoopMethodInAbstractClass More...
 
void notifyTransientChange ()
 @noinspection NoopMethodInAbstractClass More...
 
void setArchetypeName (@NotNull final String archetypeName)
 
void setArtifact ()
 
void setEditorFolder (@Nullable final String editorFolder)
 
void setLowestPart (final boolean isLowestPart)
 
void setMultiPartNr (final int multiPartNr)
 
void setMultiShapeID (final int multiShapeID)
 
void setMultiX (final int multiX)
 
void setMultiY (final int multiY)
 
void visit (@NotNull final BaseObjectVisitor< G, A, R > baseObjectVisitor)
 
- Public Member Functions inherited from net.sf.gridarta.model.baseobject.AbstractBaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >
void addMsgTextLine (@NotNull final String text)
 
void addObjectText (@NotNull final String line)
 
void addTailPart (@NotNull final T tail)
 
int countInvObjects ()
 
void facesReloaded ()
 
String getAnimName ()
 
double getAttributeDouble (@NotNull final String attributeName)
 
double getAttributeDouble (@NotNull final String attributeName, final boolean queryArchetype)
 
int getAttributeInt (@NotNull final String attributeName)
 
int getAttributeInt (@NotNull final String attributeName, final boolean queryArchetype)
 
Collection< String > getAttributeKeys ()
 Returns all attribute keys of this object. More...
 
long getAttributeLong (@NotNull final String attributeName)
 
long getAttributeLong (@NotNull final String attributeName, final boolean queryArchetype)
 
String getAttributeString (@NotNull final String attributeName)
 
String getBestName ()
 
int getDirection ()
 
int getEditType ()
 
String getFaceName ()
 
String getFaceObjName ()
 
FaceSource getFaceObjSource ()
 
getHead ()
 
String getLoreText ()
 
Point getMapLocation ()
 
int getMapX ()
 
int getMapY ()
 
int getMaxX ()
 
int getMaxY ()
 
int getMinX ()
 
int getMinY ()
 
String getMsgText (final boolean queryArchetype)
 
getMultiNext ()
 
int getMultiRefCount ()
 
ImageIcon getNormalImage ()
 
String getObjectText ()
 
String getObjName ()
 
int getSizeX ()
 
int getSizeY ()
 
int getTypeNo ()
 
boolean hasAttribute (@NotNull final String attributeName)
 
boolean hasAttribute (@NotNull final String attributeName, final boolean queryArchetype)
 
boolean isDefaultGameObject ()
 
boolean isEqual (@NotNull final BaseObject<?, ?, ?, ?> gameObject)
 
boolean isHead ()
 
boolean isMulti ()
 
boolean isTail ()
 
void removeAttribute (@NotNull final String attributeName)
 
void removeTailParts ()
 
void setAttributeInt (@NotNull final String attributeName, final int value)
 
void setAttributeString (@NotNull final String attributeName, @NotNull final String value)
 
void setEditType (final int editType)
 
void setLoreText (@NotNull final CharSequence loreText)
 
void setMapX (final int mapX)
 
void setMapY (final int mapY)
 
void setMsgText (@Nullable final String msgText)
 
void setMulti (@NotNull final MultiArchData< G, A, R, T > multi)
 
void setObjectFace ()
 
void setObjectText (@NotNull final String objectText)
 
String toString (@NotNull final String format)
 
- Public Member Functions inherited from net.sf.gridarta.model.baseobject.GameObjectContainer< G, A, R >
void addFirst ( @NotNull final G gameObject)
 Adds the given game object at the end of this container. More...
 
void addLast ( @NotNull final G gameObject)
 Adds the given game object at the end of this container. More...
 
abstract G asGameObject ()
 Returns this instance as a GameObject or. More...
 
getFirst ()
 Returns the first GameObject contained in this container. More...
 
getLast ()
 Returns the last GameObject contained in this container. More...
 
abstract MapSquare< G, A, R > getMapSquare ()
 Returns the MapSquare this game object is part of. More...
 
abstract MapSquare< G, A, R > getMapSquareOptional ()
 Returns the MapSquare this game object is part of. More...
 
getNext ( @NotNull final G gameObject)
 Returns the GameObject succeeding a given game object. More...
 
getPrev ( @NotNull final G gameObject)
 Returns the GameObject preceding a given game object. More...
 
void insertAfter ( @Nullable final G previousGameObject, @NotNull final G gameObject)
 Adds a game object after another. More...
 
void insertBefore ( @NotNull final G gameObject, @Nullable final G nextGameObject)
 Adds a game object before another. More...
 
boolean isBottom ( @NotNull final G gameObject)
 Returns whether this game object is the bottom-most one. More...
 
boolean isEmpty ()
 Check whether this square is empty. More...
 
boolean isTop ( @NotNull final G gameObject)
 Returns whether this game object is the top-most one. More...
 
Iterator< G > iterator ()
 The Iterator returned does not recurse, it only contains objects on the first level. More...
 
void moveBottom ( @NotNull final G gameObject)
 Moves a game object to bottom. More...
 
void moveDown ( @NotNull final G gameObject)
 Moves a game object down. More...
 
void moveTop ( @NotNull final G gameObject)
 Moves a game object to top. More...
 
void moveUp ( @NotNull final G gameObject)
 Moves a game object up. More...
 
Iterable< G > recursive ()
 Returns an object that is a recursive representation. More...
 
void remove ( @NotNull final G gameObject)
 Removes a game object from this container. More...
 
void removeAll ()
 Removes all game objects from this container. More...
 
void replace ( @NotNull final G oldGameObject, @NotNull final G newGameObject)
 Replaces a game object with another one. More...
 
Iterable< G > reverse ()
 Returns an object that is the reverse representation. More...
 
String toString ()
 
- Public Member Functions inherited from net.sf.gridarta.model.baseobject.BaseObject< G, A, R, T >
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 {}. 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 (boolean queryArchetype)
 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.archetype.Archetype< G, A, R >
void addFirst ( @NotNull G gameObject)
 Adds the given GameObject at the beginning of this Container. More...
 
void addLast ( @NotNull G gameObject)
 Adds the given GameObject at the end of this Container. More...
 
String getArchetypeName ()
 Returns the name of this archetype. More...
 
Collection< String > getAttributeKeys ()
 Returns all attribute keys of this archetype. More...
 
String getEditorFolder ()
 Returns the editor folder. More...
 
int getMultiPartNr ()
 Returns the multi part id. More...
 
int getMultiShapeID ()
 Returns the multi shape id. More...
 
int getMultiX ()
 Returns the x-distance of this part to the head part. More...
 
int getMultiY ()
 Returns the y-distance of this part to the head part. More...
 
boolean isArtifact ()
 Returns whether this GameObject is an Artifact. More...
 
boolean isLowestPart ()
 Returns whether this part has the smallest y coordinate when painting the image. More...
 
boolean isUndefinedArchetype ()
 Return whether this archetype denotes an undefined archetype. More...
 
Iterator< G > iterator ()
 Returns all inventory objects. More...
 
void setArchetypeName ( @NotNull String archetypeName)
 Sets the name of this archetype. More...
 
void setArtifact ()
 Converts this game object into an artifact. More...
 
void setEditorFolder ( @Nullable String editorFolder)
 Set the editor folder. More...
 
void setLowestPart (boolean isLowestPart)
 Sets whether this part has the smallest y coordinate when painting the image. More...
 
void setMultiPartNr (int multiPartNr)
 Sets the multi part id. More...
 
void setMultiShapeID (int multiShapeID)
 Sets the multi shape id. More...
 
void setMultiX (int multiX)
 Sets the x-position of this part of a multi-part object. More...
 
void setMultiY (int multiY)
 Sets the y-position of this part of a multi-part object. More...
 
- Public Member Functions inherited from net.sf.gridarta.model.archetype.Archetype< GameObject, MapArchObject, Archetype >
void addFirst ( @NotNull G gameObject)
 Adds the given GameObject at the beginning of this Container. More...
 
void addLast ( @NotNull G gameObject)
 Adds the given GameObject at the end of this Container. More...
 
String getArchetypeName ()
 Returns the name of this archetype. More...
 
Collection< String > getAttributeKeys ()
 Returns all attribute keys of this archetype. More...
 
String getEditorFolder ()
 Returns the editor folder. More...
 
int getMultiPartNr ()
 Returns the multi part id. More...
 
int getMultiShapeID ()
 Returns the multi shape id. More...
 
int getMultiX ()
 Returns the x-distance of this part to the head part. More...
 
int getMultiY ()
 Returns the y-distance of this part to the head part. More...
 
boolean isArtifact ()
 Returns whether this GameObject is an Artifact. More...
 
boolean isLowestPart ()
 Returns whether this part has the smallest y coordinate when painting the image. More...
 
boolean isUndefinedArchetype ()
 Return whether this archetype denotes an undefined archetype. More...
 
Iterator< G > iterator ()
 Returns all inventory objects. More...
 
void setArchetypeName ( @NotNull String archetypeName)
 Sets the name of this archetype. More...
 
void setArtifact ()
 Converts this game object into an artifact. More...
 
void setEditorFolder ( @Nullable String editorFolder)
 Set the editor folder. More...
 
void setLowestPart (boolean isLowestPart)
 Sets whether this part has the smallest y coordinate when painting the image. More...
 
void setMultiPartNr (int multiPartNr)
 Sets the multi part id. More...
 
void setMultiShapeID (int multiShapeID)
 Sets the multi shape id. More...
 
void setMultiX (int multiX)
 Sets the x-position of this part of a multi-part object. More...
 
void setMultiY (int multiY)
 Sets the y-position of this part of a multi-part object. More...
 

Protected Member Functions

Archetype getThis ()
 Returns. More...
 
- Protected Member Functions inherited from net.sf.gridarta.model.archetype.AbstractArchetype< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >
 AbstractArchetype (@NotNull final String archetypeName, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final AnimationObjects animationObjects)
 Creates a new instance. More...
 
String getEffectiveFaceName (@NotNull final String faceName)
 Returns the effective face name for faceName for a given real face name. More...
 
- Protected Member Functions inherited from net.sf.gridarta.model.baseobject.AbstractBaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >
 AbstractBaseObject (@NotNull final FaceObjectProviders faceObjectProviders, @NotNull final AnimationObjects animationObjects)
 Creates a new instance. More...
 
void beginGameObjectChange ()
 Records that this game object is about to change. More...
 
void endGameObjectChange ()
 Records that this game object has changed. More...
 
String getAttributeValue (@NotNull final String attributeName)
 Returns an attribute value by attribute name. More...
 
MultiArchData< G, A, R, T > getMulti ()
 Returns the MultiArchData for this base object. More...
 
void setThisContainer (@NotNull final G gameObject)
 
void updateArchetype ()
 Called whenever getArchetype() has changed. More...
 
- Protected Member Functions inherited from net.sf.gridarta.model.baseobject.GameObjectContainer< G, A, R >
Object clone ()
 
 GameObjectContainer ()
 Creates a new instance. More...
 
boolean hasSameContents ( @NotNull final GameObjectContainer<?, ?, ?> gameObjectContainer)
 Compares this object to another game object container. More...
 
abstract void notifyBeginChange ()
 Notifies the map model that this container is about to change. More...
 
abstract void notifyEndChange ()
 Notifies the map model that this container has changed. More...
 
abstract void setThisContainer ( @NotNull G gameObject)
 Sets a GameObject's container to this container. More...
 

Static Private Attributes

static final long serialVersionUID = 1L
 The serial version UID. More...
 

Additional Inherited Members

- Public Attributes inherited from net.sf.gridarta.model.baseobject.BaseObject< G, A, R, T >
String ANIM_SPEED
 The name of the "anim_speed" attribute. More...
 
String ANIMATION
 The attribute name of the object's animation. More...
 
String BLOCKSVIEW
 The name of the "blocksview" attribute. More...
 
String DIRECTION
 The attribute name of the object's direction. More...
 
int EDIT_TYPE_NONE
 
String FACE
 The attribute name of the object's face. More...
 
String HP
 The attribute name of the "hp" attribute. More...
 
String IS_ANIMATED
 The attribute name of the "is_animated" flag. More...
 
String IS_TURNABLE
 The name of the "is_turnable" attribute. More...
 
String LAST_HEAL
 The name of the "last_heal" attribute. More...
 
String LEVEL
 The name of the "level" attribute. More...
 
String NAME
 The attribute name of the object's name. More...
 
String NO_PASS
 The name of the "no_pass" attribute. More...
 
String NO_PICK
 The name of the "no_pick" attribute. More...
 
String SLAYING
 The name of the "slaying" attribute. More...
 
String SP
 The attribute name of the "sp" attribute. More...
 
String TITLE
 The attribute name of the object's title. More...
 
String TYPE
 The attribute name of the object's type. More...
 
- Public Attributes inherited from net.sf.gridarta.var.crossfire.model.archetype.Archetype
int SUBTYPE_EVENT_CONNECTOR_TRIGGER = 10
 
int TYPE_ALTAR = 18
 
int TYPE_AMULET = 39
 
int TYPE_BOOTS = 99
 
int TYPE_BRACERS = 104
 
int TYPE_BREASTPLATE_ARMOR = 16
 
int TYPE_BUTTON = 92
 
int TYPE_CLOAK = 87
 
int TYPE_CONTAINER = 122
 
int TYPE_CREATOR = 42
 
int TYPE_DETECTOR = 51
 
int TYPE_DIRECTOR = 112
 
int TYPE_DUPLICATOR = 83
 
int TYPE_EVENT_CONNECTOR = 116
 
int TYPE_EXIT = 66
 
int TYPE_FLOOR = 71
 
int TYPE_GATE = 91
 
int TYPE_GIRDLE = 113
 
int TYPE_GLOVES = 100
 
int TYPE_HANDLE = 93
 
int TYPE_HELMET = 34
 
int TYPE_INVENTORY_CHECKER = 64
 
int TYPE_LOCKED_DOOR = 20
 
int TYPE_MAGIC_EAR = 29
 
int TYPE_MAGIC_MOUTH = 98
 
int TYPE_MAGIC_WALL = 62
 
int TYPE_MARKER = 55
 
int TYPE_MISC = 0
 
int TYPE_MOOD_FLOOR = 65
 
int TYPE_PEDESTAL = 17
 
int TYPE_PEDESTAL_TRIGGER = 32
 
int TYPE_PIT = 94
 
int TYPE_RING = 70
 
int TYPE_SHIELD = 33
 
int TYPE_SPECIAL_KEY = 21
 
int TYPE_SPELL = 101
 
int TYPE_TELEPORTER = 41
 
int TYPE_TIMED_GATE = 26
 
int TYPE_TRAP = 155
 
int TYPE_TRIGGER = 27
 
int TYPE_TRIGGER_ALTAR = 31
 
int TYPE_TRIGGER_BUTTON = 30
 
int TYPE_TRIGGER_MARKER = 52
 
int TYPE_WALL = 77
 
int TYPE_WEAPON = 15
 

Detailed Description

An Atrinik Archetype.

Author
Andreas Kirschbaum

Definition at line 33 of file DefaultArchetype.java.

Constructor & Destructor Documentation

◆ DefaultArchetype()

net.sf.gridarta.var.crossfire.model.archetype.DefaultArchetype.DefaultArchetype ( @NotNull final String  archetypeName,
@NotNull final FaceObjectProviders  faceObjectProviders,
@NotNull final AnimationObjects  animationObjects 
)

Member Function Documentation

◆ clone()

DefaultArchetype net.sf.gridarta.var.crossfire.model.archetype.DefaultArchetype.clone ( )

Implements net.sf.gridarta.var.crossfire.model.archetype.Archetype.

Definition at line 53 of file DefaultArchetype.java.

References net.sf.gridarta.var.crossfire.model.archetype.DefaultArchetype.clone().

Referenced by net.sf.gridarta.var.crossfire.model.archetype.DefaultArchetype.clone().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getThis()

Archetype net.sf.gridarta.var.crossfire.model.archetype.DefaultArchetype.getThis ( )
protected

◆ isUndefinedArchetype()

boolean net.sf.gridarta.var.crossfire.model.archetype.DefaultArchetype.isUndefinedArchetype ( )

Definition at line 69 of file DefaultArchetype.java.

◆ usesDirection()

boolean net.sf.gridarta.var.crossfire.model.archetype.DefaultArchetype.usesDirection ( )

Definition at line 58 of file DefaultArchetype.java.

Member Data Documentation

◆ serialVersionUID

final long net.sf.gridarta.var.crossfire.model.archetype.DefaultArchetype.serialVersionUID = 1L
staticprivate

The serial version UID.

Definition at line 38 of file DefaultArchetype.java.


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