GroundItem

class GroundItem(tile: Tile, node: IItemNode?, itemPile: IItemPile?) : GenericItem, Nameable, Interactable, Identifiable, Validatable, Actionable, Locatable, InteractableEntity, Nillable<GroundItem?> , Modelable<GroundItem>

GroundItem

Constructors

GroundItem
Link copied to clipboard
fun GroundItem(tile: Tile, node: IItemNode?, itemPile: IItemPile?)

Types

Companion
Link copied to clipboard
object Companion

Functions

actions
Link copied to clipboard
open override fun actions(): List<String>

The current actions for the entity.

basePoint
Link copied to clipboard
open override fun basePoint(): Point

{@inheritDoc}

boundingModel
Link copied to clipboard
fun boundingModel(): BoundingModel?

Gets the current bounding model

fun boundingModel(boundingModel: BoundingModel?)

Sets the bounding model

fun boundingModel(expectedModel: BoundingModel?, boundingModel: BoundingModel?)

Compares and sets the bounding model

bounds
Link copied to clipboard
open override fun bounds(arr: IntArray?)

Sets the boundaries of this entity utilizing an array.

open override fun bounds(x1: Int, x2: Int, y1: Int, y2: Int, z1: Int, z2: Int)

Sets the boundaries of this entity.

calculateScreenPosition
Link copied to clipboard
open override fun calculateScreenPosition(): Callable<Point>
centerPoint
Link copied to clipboard
open override fun centerPoint(): Point

{@inheritDoc}

click
Link copied to clipboard
open override fun click(): Boolean
open override fun click(action: String?): Boolean
open override fun click(action: String?, option: String?): Boolean
open override fun click(f: Filter<MenuCommand>, useMenu: Boolean): Boolean

{@inheritDoc}

open override fun click(f: (MenuCommand) -> Boolean): Boolean
contains
Link copied to clipboard
open operator override fun contains(point: Point?): Boolean

Whether or not the entity contains the point.

cosmetic
Link copied to clipboard
fun cosmetic(): Boolean

Whether or not the item is a cosmetic.

doSetBounds
Link copied to clipboard
fun doSetBounds(arr: IntArray?): Filter<Interactable?>
downscale
Link copied to clipboard
open fun downscale(downscale: Boolean): GroundItem
draw
Link copied to clipboard
open override fun draw(g: Graphics)

Renders the entity within the viewport at alpha = 255

equals
Link copied to clipboard
open operator override fun equals(o: Any?): Boolean
groundActions
Link copied to clipboard
fun groundActions(): List<String>

An array of the possible actions if the item were on the ground.

hashCode
Link copied to clipboard
open override fun hashCode(): Int
height
Link copied to clipboard
fun height(): Int
hull
Link copied to clipboard
open fun hull(): Polygon
id
Link copied to clipboard
open override fun id(): Int

The identifier of this entity

interact
Link copied to clipboard
open override fun interact(action: String?): Boolean
open override fun interact(f: (MenuCommand) -> Boolean): Boolean
open override fun interact(f: Filter<MenuCommand>): Boolean
open override fun interact(action: String?, hasMenu: Boolean): Boolean
open override fun interact(action: String?, option: String?): Boolean
open override fun interact(f: (MenuCommand) -> Boolean, useMenu: Boolean): Boolean
open override fun interact(f: Filter<MenuCommand>, useMenu: Boolean): Boolean
open override fun interact(action: String?, option: String?, hasMenu: Boolean): Boolean

{@inheritDoc}

inventoryActions
Link copied to clipboard
fun inventoryActions(): List<String>

An array of the possible actions if the item were in the inventory.

inViewport
Link copied to clipboard
open override fun inViewport(): Boolean

{@inheritDoc}

open override fun inViewport(checkIfObstructed: Boolean): Boolean

Returns true if the object is currently rendered in the viewport.

isRendered
Link copied to clipboard
open fun isRendered(): Boolean
localX
Link copied to clipboard
open override fun localX(): Int

The local X position of the entity

localY
Link copied to clipboard
open override fun localY(): Int

The local Y position of the entity

members
Link copied to clipboard
fun members(): Boolean

Whether or not the item is a members' item.

model
Link copied to clipboard
open fun model(): Model?

Load the model from the cache

modelCenterPoint
Link copied to clipboard
open fun modelCenterPoint(): Point

Get the center point of the model

modelHeight
Link copied to clipboard
open override fun modelHeight(): Int
modelId
Link copied to clipboard
fun modelId(): Int

The model ID of the item.

modelOrientations
Link copied to clipboard
open override fun modelOrientations(): IntArray

The orientations of the entity

name
Link copied to clipboard
open override fun name(): String
nextPoint
Link copied to clipboard
open override fun nextPoint(): Point

The next game screen point of the entity.

nil
Link copied to clipboard
open override fun nil(): GroundItem

A "null" instance. An object with no function. All methods will not evaluate to anything.

noted
Link copied to clipboard
fun noted(): Boolean

Whether or not the item is in banknote form.

price
Link copied to clipboard
fun price(): Int
reachable
Link copied to clipboard
open fun reachable(): Boolean

Whether or not the Locatable can be reached. If the tile is blocked, the nearest unblocked tile will be used.

renderables
Link copied to clipboard
open override fun renderables(): Array<IRenderable>
stackable
Link copied to clipboard
fun stackable(): Boolean

Whether or not the item is stackable.

stackSize
Link copied to clipboard
fun stackSize(): Int

The stack size of the ItemNode.

tile
Link copied to clipboard
open override fun tile(): Tile

The current location of the entity.

tileHeight
Link copied to clipboard
open override fun tileHeight(): Int
toString
Link copied to clipboard
open override fun toString(): String
tradeable
Link copied to clipboard
fun tradeable(): Boolean

Whether or not the item is tradeable.

triangles
Link copied to clipboard
open override fun triangles(): Array<Polygon>

The translated model triangles.

useHull
Link copied to clipboard
open fun useHull(useHull: Boolean): GroundItem
valid
Link copied to clipboard
open override fun valid(): Boolean
value
Link copied to clipboard
fun value(): Int

The value of the item which would appear in most shops. This may be used to also grab the high/low alchemy value, as well.

Properties

boundingModel
Link copied to clipboard
var boundingModel: AtomicReference<BoundingModel?>
cachedConfig
Link copied to clipboard
val cachedConfig: IItemConfig?
config
Link copied to clipboard
val config: CacheItemConfig
downscale
Link copied to clipboard
open override var downscale: Boolean = true
matrix
Link copied to clipboard
val matrix: TileMatrix
tile
Link copied to clipboard
val tile: Tile
useHull
Link copied to clipboard
open override var useHull: Boolean = true