definitions

package
v0.0.0-...-b6f29c3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2020 License: ISC Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OverlayBlank = iota
	//OverlayGravel Used for roads, ID 1
	OverlayGravel
	//OverlayWater Used for regular water, ID 2
	OverlayWater
	//OverlayWoodFloor Used for the floors of buildings, ID 3
	OverlayWoodFloor
	//OverlayBridge Used for bridges, suspends wood floor over water, ID 4
	OverlayBridge
	//OverlayStoneFloor Used for the floors of buildings, ID 5
	OverlayStoneFloor
	//OverlayRedCarpet Used for the floors of buildings, ID 6
	OverlayRedCarpet
	//OverlayDarkWater Used for dark, swampy water, ID 7
	OverlayDarkWater
	//OverlayBlack Used for empty parts of upper planes, ID 8
	OverlayBlack
	//OverlayWhite Used as a separator, e.g for edge of water, mountains, etc.  ID 9
	OverlayWhite
	//OverlayBlack2 Not sure where it is used, ID 10
	OverlayBlack2
	//OverlayLava Used in dungeons and on Karamja/Crandor as lava, ID 11
	OverlayLava
	//OverlayBridge2 Used for a specific type of bridge, ID 12
	OverlayBridge2
	//OverlayBlueCarpet Used for the floors of buildings, ID 13
	OverlayBlueCarpet
	//OverlayPentagram Used for certain questing purposes, ID 14
	OverlayPentagram
	//OverlayPurpleCarpet Used for the floors of buildings, ID 15
	OverlayPurpleCarpet
	//OverlayBlack3 Not sure what it is used for, ID 16, traversable
	OverlayBlack3
	//OverlayStoneFloorLight Used for the entrance to temple of ikov, ID 17
	OverlayStoneFloorLight
	//OverlayUnknown Not sure what this is yet, ID 18
	OverlayUnknown
	//OverlayBlack4 Not sure what it is used for, ID 19
	OverlayBlack4
	//OverlayAgilityLog Blank suspended tile over blackness for agility challenged, ID 20
	OverlayAgilityLog
	//OverlayAgilityLog Blank suspended tile over blackness for agility challenged, ID 21
	OverlayAgilityLog2
	//OverlayUnknown2 Not sure what this is yet, ID 22
	OverlayUnknown2
	//OverlaySandFloor Used for sand floor, ID 23
	OverlaySandFloor
	//OverlayMudFloor Used for mud floor, ID 24
	OverlayMudFloor
	//OverlaySandFloor Used for water floor, ID 25
	OverlayWaterFloor
)
View Source
const DefaultDrop = 20

DefaultDrop returns the default item ID all mobs should drop on death

Variables

Equipment contains all of the equipment related data for the game

Items This holds the defining characteristics for all of the game's items, ordered by ID.

Npcs This is used to cache the persistent NPC data in RAM for quick access when needed.

View Source
var TileOverlays []TileDefinition

TileOverlays Cache for tile overlays.

Functions

This section is empty.

Types

type BoundaryDefinition

type BoundaryDefinition struct {
	ID          int
	Name        string
	Commands    [2]string
	Description string
	Dynamic     bool
	Barrier     bool
}

BoundaryDefinition This represents a single definition for a single boundary object in the game.

func Boundary

func Boundary(id int) BoundaryDefinition

func (BoundaryDefinition) Defined

func (d BoundaryDefinition) Defined() bool

func (BoundaryDefinition) Door

func (d BoundaryDefinition) Door() bool

func (BoundaryDefinition) Height

func (d BoundaryDefinition) Height() int

func (BoundaryDefinition) Passable

func (d BoundaryDefinition) Passable() bool

func (BoundaryDefinition) Solid

func (d BoundaryDefinition) Solid() bool

func (BoundaryDefinition) Width

func (d BoundaryDefinition) Width() int

type BoundaryDefinitions

type BoundaryDefinitions []BoundaryDefinition
var BoundaryObjects BoundaryDefinitions

BoundaryObjectss This holds the defining characteristics for all of the game's boundary scene objects, ordered by ID.

func (BoundaryDefinitions) Size

func (b BoundaryDefinitions) Size() int

type EquipmentDefinition

type EquipmentDefinition struct {
	ID       int
	Sprite   int
	Type     int
	Armour   int
	Magic    int
	Prayer   int
	Ranged   int
	Aim      int
	Power    int
	Position int
	Female   bool
}

EquipmentDefinition a container for the equipment items in the game

func Equip

func Equip(id int) *EquipmentDefinition

Equip returns the associated equipment definition or nil if none.

type ItemDefinition

type ItemDefinition struct {
	ID           int
	Name         string
	Description  string
	Command      string
	BasePrice    int
	Stackable    bool
	Quest        bool
	Members      bool
	Requirements map[int]int
}

ItemDefinition This represents a single definition for a single item in the game.

func Item

func Item(id int) ItemDefinition

Item returns the associated item definition or nil if none.

type NpcDefinition

type NpcDefinition struct {
	ID          int
	Name        string
	Description string
	Command     string
	Hits        int
	Attack      int
	Strength    int
	Defense     int
	Hostility   int
}

NpcDefinition This is a representation of a single NPC in the game.

func Npc

func Npc(id int) NpcDefinition

Npc returns the associated NPC definition or nil if none.

type ScenaryDefinition

type ScenaryDefinition struct {
	ID           int
	Name         string
	Commands     [2]string
	Description  string
	SolidityType int
	W, H         int
	ModelHeight  int
}

ObjectDefinition This represents a single definition for a single object in the game.

func Scenary

func Scenary(id int) ScenaryDefinition

func (ScenaryDefinition) Defined

func (d ScenaryDefinition) Defined() bool

func (ScenaryDefinition) Door

func (d ScenaryDefinition) Door() bool

func (ScenaryDefinition) Height

func (d ScenaryDefinition) Height() int

func (ScenaryDefinition) Passable

func (d ScenaryDefinition) Passable() bool

func (ScenaryDefinition) Solid

func (d ScenaryDefinition) Solid() bool

func (ScenaryDefinition) Width

func (d ScenaryDefinition) Width() int

type ScenaryDefinitions

type ScenaryDefinitions []ScenaryDefinition
var ScenaryObjects ScenaryDefinitions

ScenaryObjects This is used to cache the persistent scenary object data in RAM for quick access when needed.

func (ScenaryDefinitions) Size

func (s ScenaryDefinitions) Size() int

type TileDefinition

type TileDefinition struct {
	Color   int
	Visible int
	Blocked int
}

TileDefinition Representation of a tile overlay.

func TileOverlay

func TileOverlay(id int) TileDefinition

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL