Options
All
  • Public
  • Public/Protected
  • All
Menu

Wayward Modding Guide

Index

Modules

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

ActionArgumentEntryType

ActionArgumentEntryType: ActionArgumentEntryType<X>

ActionArgumentTupleTypes

ActionArgumentTupleTypes: ActionArgumentTupleTypes<X>

ActionArgumentType

ActionArgumentType: ActionArgumentType<X>

ActionArguments

ActionArguments: ActionArguments<A>

AdaptionFunction

AdaptionFunction: function

Takes an x, y, and z coordinate and a randomly-generated "variation index", and returns an ITileAdaptation object for the tile. How the variation index is used to generate the ITileAdaptation will be implementation-specific.

param

A random integer between 1 (inclusive) and 65536 (exclusive)

Type declaration

CharacterPreviewRotation

CharacterPreviewRotation: 0 | 1 | 2 | 3

CheckIfAllPresent

CheckIfAllPresent: CheckIfAllPresent2<object>

The following code is for compile-time typechecking to make sure all QuestTypes have Quests. The reason we don't just make the quests variable have the Descriptions type is so that users of that variable can know the exact type of each quest. The following code is for compile-time typechecking to make sure all Dictionarys have a corresponding enum. The reason we don't just make the dictionaries variable have the Descriptions type is so that users of that variable can know the exact type of each dictionary.

CheckIfAllPresent2

CheckIfAllPresent2: never

Checker

Checker: function

Type declaration

ClientDataMap

ClientDataMap: IClientData[T]

CommandCallback

CommandCallback: function

Type declaration

    • (player: IPlayer, args: string): void
    • Parameters

      Returns void

ConcreteType

ConcreteType: IConcerteRegistrar | any

ContainerReference

ContextMenuOptionKeyValuePair

ContextMenuOptionKeyValuePair: [O, IOptionDescription]

CountMatcher

CountMatcher: number | object | null

DirectionalBindStates

DirectionalBindStates: object

Type declaration

EntityPlayerCreatureNpc

EntityPlayerCreatureNpc: IPlayer | ICreature | INPC

EntityTypeTupleType

EntityTypeTupleType: EntityTypeTupleType<E>

EntityTypeType

EntityTypeType: EntityTypeType<E>

Enum

Enum: object & object

ExtendsMenu

ExtendsMenu: object

Type declaration

ExtendsScreen

ExtendsScreen: object

Type declaration

ExtractActionArgumentArray

ExtractActionArgumentArray: ExtractActionArgumentArray<X>

ExtractEnum

ExtractEnum: ExtractEnum<E>

HeldDirections

HeldDirections: [Direction, Direction]

HighlightSelector

HighlightSelector: [HighlightType, string | number]

HighscoreFilter

HighscoreFilter: "all" | Difficulty

ICachedHooks

ICachedHooks: object

A list of all cached hooks indexed by Hook

Type declaration

ICreditProperty

ICreditProperty: Map<string, number | undefined>

IDialogStates

IDialogStates: object

Type declaration

IDoodadOld

IDoodadOld: Partial<IDoodad> & object

IDropdownOption

IDropdownOption: [OptionId, function]

IEdges

IEdges: [[Left | Right, number], [Top | Bottom, number]]

IGameOld

IGameOld: Partial<IGame> & object

IHighscoreOld

IHighscoreOld: Partial<IHighscore> & object

IImageOverrides

IImageOverrides: Array<string | IImageOverrideDescription>

IItemArray

IItemArray: IItem[]

IMusicDescription

IMusicDescription: IModdable

IOptionDescription

IOptionDescription: object & object | object

IOptionsOld

IOptionsOld: Partial<IOptions> & object

IPlayerOld

IPlayerOld: Partial<IPlayer> & object

IProperties

IProperties: Map<Property, any>

IReduceStrategy

IReduceStrategy: ReduceStrategy | function

IReject

IReject: function

Type declaration

    • (reason?: any): void
    • Parameters

      • Optional reason: any

      Returns void

IRenderFunction

IRenderFunction: function

Type declaration

IRenderLayerImplementation

IRenderLayerImplementation: function

Type declaration

IResolve

IResolve: function

Type declaration

    • (value?: T | PromiseLike<T> | undefined): void
    • Parameters

      • Optional value: T | PromiseLike<T> | undefined

      Returns void

IResourceMap

IResourceMap: IResourceData | PathType

IStat

IStats

IStats: object

Type declaration

IStatus

IStatus: Writable<object, keyof StatusType>

ITalkedProperty

ITalkedProperty: Map<string, boolean | undefined>

ITileContainer

ITileContainer: IContainer & IVector3

ITileDataOld

ITileDataOld: Partial<ITileData> & object

InspectionResult

InspectionResult: IterableOf<IInspectionSection | (Translation | IInspection)[] | IterableIterator<Translation | IInspection> | undefined> | undefined

IrregularRule

IrregularRule: [string, string]

MatchmakingMessageData

ModOptionSectionInitializer

ModOptionSectionInitializer: function

Type declaration

ModRegistration

MovementIntent

MovementIntent: Direction | "idle" | undefined

NameRule

NameRule: [CountMatcher, RegExp, string]

PacketTarget

PacketTarget: Array<IPlayer | IConnection> | IPlayer | IConnection

PluralRule

PluralRule: [RegExp, string]

RemoveProperties

RemoveProperties: object

Type declaration

RequirementApi

RequirementApi: RequirementApi<R>

RequirementArgs

RequirementArgs: RequirementArgs<R>

ServerInfo

ServerInfo: string | IMatchmakingInfo

SingularRule

SingularRule: [RegExp, string]

SpriteLineOrRenderLayerImpl

SpriteLineOrRenderLayerImpl: number | IRenderLayerImplementation

Subscribers

Subscribers: Array<function>

TerrainData

TerrainData: number

TextOrTranslationData

TextOrTranslationData: string | UiTranslation | TranslationData

Time

Time: PartOfDay | string

TranslationData

TranslationData: IBaseTranslationData | object & object

TranslationGenerator

TranslationGenerator: Translation | UiTranslation | ISerializedTranslation | function

TranslationProvider

TranslationProvider: function

Type declaration

    • (dictionary: Dictionary, entry: number | string, ignoreInvalid?: boolean): string[] | undefined
    • Parameters

      • dictionary: Dictionary
      • entry: number | string
      • Optional ignoreInvalid: boolean

      Returns string[] | undefined

Tuple1

Tuple1: Tuple1<X1>

Tuple2

Tuple2: Tuple2<X1, X2>

Tuple3

Tuple3: Tuple3<X1, X2, X3>

Tuple4

Tuple4: Tuple4<X1, X2, X3, X4>

Tuple5

Tuple5: Tuple5<X1, X2, X3, X4, X5>

UncountableRule

UncountableRule: RegExp

Writable

Writable: object

Type declaration

onDoodadUpdateDelegate

onDoodadUpdateDelegate: function

Type declaration

    • (x: number, y: number, doodadType: DoodadType | undefined, doodadInfo: DoodadInfo | undefined, doodadVariation: number, hasGraphicVariation: boolean, flushImmediate: boolean): void
    • Parameters

      • x: number
      • y: number
      • doodadType: DoodadType | undefined
      • doodadInfo: DoodadInfo | undefined
      • doodadVariation: number
      • hasGraphicVariation: boolean
      • flushImmediate: boolean

      Returns void

onTileUpdateDelegate

onTileUpdateDelegate: function

Type declaration

    • (x: number, y: number, flushImmediate: boolean): void
    • Parameters

      • x: number
      • y: number
      • flushImmediate: boolean

      Returns void

Variables

Const ALL

ALL: "all" = "all"

Const CHALLENGE_MODIFIERS_MIN

CHALLENGE_MODIFIERS_MIN: 300 = 300

Const DEFAULT_MAX_MESSAGES

DEFAULT_MAX_MESSAGES: 30 = 30

Const DIALOG_OPACITY_DEFAULT

DIALOG_OPACITY_DEFAULT: 80 = 80

Const DIALOG_OPACITY_MIN

DIALOG_OPACITY_MIN: 0 = 0

Const EPSILON

EPSILON: 0.000001 = 0.000001

Const EXCLUSIVE_MODIFIERS

EXCLUSIVE_MODIFIERS: ChallengeModifier[][] = [[ChallengeModifier.PermanentlyBleeding, ChallengeModifier.PermanentlyBurning, ChallengeModifier.PermanentlyPoisoned]]

Const FLEE_DISTANCE_SQ

FLEE_DISTANCE_SQ: number = Math.pow(10, 2)

Const INHERIT

INHERIT: any = undefined

Let INVALID

This exists as a workaround for a declaration bug https://github.com/Microsoft/TypeScript/issues/27962

Const MAX_PINNED

MAX_PINNED: 3 = 3

Const MULTIPLAYER_HOOK_PRIORITY

MULTIPLAYER_HOOK_PRIORITY: -999999999999 = -999999999999

Const NEWUI_HOOK_PRIORITY

NEWUI_HOOK_PRIORITY: -99999999999 = -99999999999

Const PERMANENT_STATUS_EFFECT_MULTIPLIER

PERMANENT_STATUS_EFFECT_MULTIPLIER: 0.5 = 0.5

Const PERMANENT_STATUS_EFFECT_MULTIPLIER_RATE

PERMANENT_STATUS_EFFECT_MULTIPLIER_RATE: 4 = 4

Const REPUTATION_MAX

REPUTATION_MAX: 64000 = 64000

Let SLOT_CHALLENGE

SLOT_CHALLENGE: number = -1

Let SLOT_COUNT_MAX

SLOT_COUNT_MAX: number = 20

Let SLOT_GLOBAL

SLOT_GLOBAL: number = 26

Let SLOT_MULTIPLAYER

SLOT_MULTIPLAYER: number = 27

Const SOUND_MAX_DISTANCE_SQ

SOUND_MAX_DISTANCE_SQ: number = Math.pow(75, 2)

Const STRENGTH_BONUS

STRENGTH_BONUS: 25 = 25

The amount of extra weight the player can hold (added to max health)

Const SYMBOL_ANY_DICTIONARY

SYMBOL_ANY_DICTIONARY: unique symbol = Symbol("SYMBOL_ANY_DICTIONARY")

Const SYMBOL_DATA

SYMBOL_DATA: unique symbol = Symbol("data")

Const SYMBOL_DELAY

SYMBOL_DELAY: unique symbol = Symbol("DELAY")

Const SYMBOL_EDIT_MESSAGES

SYMBOL_EDIT_MESSAGES: unique symbol = Symbol("EditMessages")

Const SYMBOL_HOOKS

SYMBOL_HOOKS: unique symbol = Symbol("hooks")

Const SYMBOL_HOST_NAME

SYMBOL_HOST_NAME: unique symbol = Symbol("name")

Const SYMBOL_KEY_MAP

SYMBOL_KEY_MAP: Map<symbol, WeakSymbolKey> = new Map<symbol, WeakSymbolKey>()

Const SYMBOL_MOD_REGISTRATIONS

SYMBOL_MOD_REGISTRATIONS: unique symbol = Symbol("SYMBOL_MOD_REGISTRATIONS")

Const SYMBOL_NEXT_PROCESS_INPUT

SYMBOL_NEXT_PROCESS_INPUT: unique symbol = Symbol("NEXT_PROCESS_INPUT")

Const SYMBOL_PASS_TURN

SYMBOL_PASS_TURN: unique symbol = Symbol("PASS_TURN")

Const SYMBOL_REGISTRATION_ID

SYMBOL_REGISTRATION_ID: unique symbol = Symbol("SYMBOL_REGISTRATION_ID")

Const SpawnableTiles

SpawnableTiles: TileGroup = TileGroup

Const TIME_ETERNAL_NIGHT

TIME_ETERNAL_NIGHT: 0.7 = 0.7

WebAssembly

WebAssembly: any

Const _electron

_electron: IElectron = typeof (electron) !== "undefined" ? electron : undefined

Let absentPlayers

absentPlayers: IPlayer[]

Const actionEntries

actionEntries: [ActionType, IActionDescription<(Undefined | Null | Boolean | Number | String | Array | Object | ActionType | AttackType | Container | Corpse | Creature | Direction | Doodad | DoodadType | Entity | EquipType | Human | Item | ItemArray | ItemArrayInventory | ItemArrayNearby | ItemInventory | ItemNearby | ItemQuality | ItemType | NPC | Player | RestType | TileEvent | Vector2 | Vector3 | ActionArgument[])[], IPlayer | ICreature | INPC, void>][] = Stream.entries<ActionType, IActionDescription>(actionDescriptions).toArray()

Const basicInterpolator

basicInterpolator: Interpolator = new Interpolator(escapedSegment, argumentSegment, conditionalSegment)

Const bindingManager

bindingManager: BindingManager = new BindingManager()

Const blockedPenalty

blockedPenalty: 11 = 11

Const changelogListRegExp

changelogListRegExp: RegExp = /^\s*(Beta|Release)\s+(\d+)\.(\d+)(?:\.(\d+))?(?:\s+"(.*?)")?(\s+\((January|February|March|April|May|June|July|August|September|October|November|December) (\d+(?:st|nd|rd|th)), (\d+)\))?\s*$/

Const concreteTypeMap

concreteTypeMap: Map<number, any> = new Map<number, ConcreteType>()

Const concreteTypes

concreteTypes: IConcreteTypeItem[] = [{ type: Types.Item, value: Item },{ type: Types.Creature, value: Creature },{ type: Types.TimeManager, value: TimeManager },{ type: Types.Player, value: Player },{ type: Types.NPC, value: { baseClass: BaseNPC, registrar: NPCS } as IConcerteRegistrar },{ type: Types.DoodadV2, value: { baseType: Types.Doodad, baseClass: Doodad, registrar: Doodads } as IConcerteRegistrar },{ type: Types.Doodad, value: Doodad },{ type: Types.MessageManager, value: MessageManager },{ type: Types.ClientStore, value: ClientStore },{ type: Types.Vector3, value: Vector3 },{ type: Types.Vector2, value: Vector2 }]

Don't add anything to this list - Spacetech

Const connectionTimeout

connectionTimeout: 120000 = 120000

Const consecutivePacks

consecutivePacks: 20 = isFirefox ? undefined : 20

Let corpseDescriptions

corpseDescriptions: ICorpseDescription[] = Array<ICorpseDescription | undefined>()

Let corpseManager

corpseManager: ICorpseManager

Const creatureDescriptions

creatureDescriptions: OptionalDescriptions<CreatureType, ICreatureDescription>

Let creatureManager

creatureManager: ICreatureManager

Const damageTypeToMessage

damageTypeToMessage: Message[] = Array<Message>()

Const debounces

debounces: object

Type declaration

  • [index: string]: number

Const debugGetDirection

debugGetDirection: false = false

Let defaultBackground

defaultBackground: TerrainTileInfo

Const defaultServerPort

defaultServerPort: 38740 = 38740

Const defaultTimeManager

defaultTimeManager: TimeManager = new TimeManager(0)

Const defaultTurnDelay

defaultTurnDelay: number = 200 / interval

Const doodadDescriptions

doodadDescriptions: OptionalDescriptions<DoodadType, IDoodadDescription>

Let doodadManager

doodadManager: IDoodadManager

Const emptyUint8Array

emptyUint8Array: Uint8Array | null = isEdge ? new Uint8Array(0) : null

Let english

english: Language = new Language("English", false)

Const equipTypeToMessage

equipTypeToMessage: Message[] = Array<Message>()

Let fieldOfView

fieldOfView: IFieldOfView

Let finishedLoading

finishedLoading: boolean = false

Let flowFieldManager

flowFieldManager: IFlowFieldManager

Let game

game: IGame

Const gameMovement

gameMovement: IInputMovement[] = [{moveBind: Direction.East,direction: Direction.East,x: 1,y: 0},{moveBind: Direction.West,direction: Direction.West,x: -1,y: 0},{moveBind: Direction.North,direction: Direction.North,x: 0,y: -1},{moveBind: Direction.South,direction: Direction.South,x: 0,y: 1}]

Const generalRandom

generalRandom: Random<object> = new Random({ get: () => Math.random() })

Const ghostColor

ghostColor: IRGB = Color(50, 100, 255)

Const global

global: any = (window as any)

Const globalChannel

globalChannel: "!!2d666328-0502-4118-8aec-52b5ade5d8d6!!" = "!!2d666328-0502-4118-8aec-52b5ade5d8d6!!"

Const globalHooks

globalHooks: Hook[] = [Hook.OnQueueSoundEffect,Hook.OnGetTranslation]

Let globalTooltipId

globalTooltipId: number = 0

Const hairColorDescriptions

hairColorDescriptions: object = createColorDescriptions(HairColor)

Type declaration

Const hairstyleDescriptions

hairstyleDescriptions: OptionalDescriptions<HairStyle, IHairstyleDescription>

Const hostMatchmakingIdentifier

hostMatchmakingIdentifier: "host" = "host"

Const hotKeyNumbers

hotKeyNumbers: Bindable[] = [Bindable.GameContextMenu1,Bindable.GameContextMenu2,Bindable.GameContextMenu3,Bindable.GameContextMenu4,Bindable.GameContextMenu5,Bindable.GameContextMenu6,Bindable.GameContextMenu7,Bindable.GameContextMenu8,Bindable.GameContextMenu9,Bindable.GameContextMenu10,Bindable.GameContextMenu11,Bindable.GameContextMenu12,Bindable.GameContextMenu13,Bindable.GameContextMenu14,Bindable.GameContextMenu15,Bindable.GameContextMenu16,Bindable.GameContextMenu17,Bindable.GameContextMenu18,Bindable.GameContextMenu19,Bindable.GameContextMenu20,Bindable.GameContextMenu21,Bindable.GameContextMenu22,Bindable.GameContextMenu23,Bindable.GameContextMenu24]

Const interval

interval: 16.6666 = 16.6666

Const itemDescriptions

itemDescriptions: Descriptions<ItemType, IItemDescription> = {} as any

Const itemGroupDescriptions

itemGroupDescriptions: Descriptions<ItemTypeGroup, IItemGroupDescription> = {} as any

Let itemManager

itemManager: IItemManager

Const itemQualitySortOrder

itemQualitySortOrder: object

Type declaration

  • [index: number]: number

Const joinServerTimeout

joinServerTimeout: 15000 = 15000

Const keepAliveInterval

keepAliveInterval: 4000 = 4000

Const keepAliveTimeout

keepAliveTimeout: 15000 = 15000

Const keyCatchWhitelist

keyCatchWhitelist: string[] = [// autosort"ArrowLeft","ArrowRight","Backquote","Backslash","Backspace","BracketLeft","BracketRight","CapsLock","Comma","Delete","Equal","Minus","Period","Quote","Semicolon","Slash","Space"]

Const keyCodes

keyCodes: string[] = ["", // 0"", // 1"", // 2"CANCEL", // 3"", // 4"", // 5"HELP", // 6"", // 7"BACKSPACE", // 8"TAB", // 9"", // 10"", // 11"CLEAR", // 12"ENTER", // 13"ENTER SPECIAL", // 14"", // 15"SHIFT", // 16"CONTROL", // 17"ALT", // 18"PAUSE", // 19"CAPS LOCK", // 20"KANA", // 21"EISU", // 22"JUNJA", // 23"FINAL", // 24"HANJA", // 25"", // 26"ESC", // 27"CONVERT", // 28"NON CONVERT", // 29"ACCEPT", // 30"MODE CHANGE", // 31"SPACE", // 32"PAGE UP", // 33"PAGE DOWN", // 34"END", // 35"HOME", // 36"LEFT", // 37"UP", // 38"RIGHT", // 39"DOWN", // 40"SELECT", // 41"PRINT", // 42"EXECUTE", // 43"PRINT SCREEN", // 44"INSERT", // 45"DELETE", // 46"", // 47"0", // 48"1", // 49"2", // 50"3", // 51"4", // 52"5", // 53"6", // 54"7", // 55"8", // 56"9", // 57":", // 58";", // 59"<", // 60"=", // 61">", // 62"?", // 63"@", // 64"A", // 65"B", // 66"C", // 67"D", // 68"E", // 69"F", // 70"G", // 71"H", // 72"I", // 73"J", // 74"K", // 75"L", // 76"M", // 77"N", // 78"O", // 79"P", // 80"Q", // 81"R", // 82"S", // 83"T", // 84"U", // 85"V", // 86"W", // 87"X", // 88"Y", // 89"Z", // 90"WINDOWS", // 91"", // 92"CONTEXT MENU", // 93"", // 94"SLEEP", // 95"NUMPAD0", // 96"NUMPAD1", // 97"NUMPAD2", // 98"NUMPAD3", // 99"NUMPAD4", // 100"NUMPAD5", // 101"NUMPAD6", // 102"NUMPAD7", // 103"NUMPAD8", // 104"NUMPAD9", // 105"MULTIPLY", // 106"ADD", // 107"SEPARATOR", // 108"SUBTRACT", // 109"DECIMAL", // 110"DIVIDE", // 111"F1", // 112"F2", // 113"F3", // 114"F4", // 115"F5", // 116"F6", // 117"F7", // 118"F8", // 119"F9", // 120"F10", // 121"F11", // 122"F12", // 123"F13", // 124"F14", // 125"F15", // 126"F16", // 127"F17", // 128"F18", // 129"F19", // 130"F20", // 131"F21", // 132"F22", // 133"F23", // 134"F24", // 135"", // 136"", // 137"", // 138"", // 139"", // 140"", // 141"", // 142"", // 143"NUM LOCK", // 144"SCROLL LOCK", // 145"WIN OEM FJ JISHO", // 146"WIN OEM FJ MASSHOU", // 147"WIN OEM FJ TOUROKU", // 148"WIN OEM FJ LOYA", // 149"WIN OEM FJ ROYA", // 150"", // 151"", // 152"", // 153"", // 154"", // 155"", // 156"", // 157"", // 158"", // 159"LEFT SHIFT", // 160"RIGHT SHIFT", // 161"LEFT CONTROL", // 162"RIGHT CONTROL", // 163"LEFT MENU", // 164"RIGHT MENU", // 165"BACK", // 166"FORWARD", // 167"REFRESH", // 168"STOP", // 169"SEARCH", // 170"FAVORITES", // 171"BROWSER/HOME", // 172"VOLUME MUTE", // 173"VOLUME DOWN", // 174"VOLUME UP", // 175"NEXT", // 176"PREVIOUS", // 177"STOP", // 178"PLAY/PAUSE", // 179"MAIL", // 180"MEDIA", // 181"START APP", // 182"START APP 2", // 183"", // 184"", // 185";", // 186"=", // 187",", // 188"-", // 189".", // 190"/", // 191"`", // 192"", // 193"", // 194"", // 195"", // 196"", // 197"", // 198"", // 199"", // 200"", // 201"", // 202"", // 203"", // 204"", // 205"", // 206"", // 207"", // 208"", // 209"", // 210"", // 211"", // 212"", // 213"", // 214"", // 215"", // 216"", // 217"", // 218"[", // 219"\\", // 220"]", // 221"'", // 222"", // 223"META", // 224"ALTGR", // 225"", // 226"WIN ICO HELP", // 227"WIN ICO 00", // 228"", // 229"WIN ICO CLEAR", // 230"", // 231"", // 232"WIN OEM RESET", // 233"WIN OEM JUMP", // 234"WIN OEM PA1", // 235"WIN OEM PA2", // 236"WIN OEM PA3", // 237"WIN OEM WSCTRL", // 238"WIN OEM CUSEL", // 239"WIN OEM ATTN", // 240"WIN OEM FINISH", // 241"WIN OEM COPY", // 242"WIN OEM AUTO", // 243"WIN OEM ENLW", // 244"WIN OEM BACKTAB", // 245"ATTN", // 246"CRSEL", // 247"EXSEL", // 248"EREOF", // 249"PLAY", // 250"ZOOM", // 251"", // 252"PA1", // 253"WIN OEM CLEAR", // 254"" // 255]

Const languageLetters

languageLetters: "\-_0-9\x41-\x5A\x61-\x7A\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC" = "\-_0-9\x41-\x5A\x61-\x7A\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC"

Let languageManager

languageManager: LanguageManager

Const libraries

libraries: string[] = ["Greenworks","Electron","TypeScript","Node.js","jQuery","jQueryUI","lz-string","jQuery contextMenu","jQuery UI Touch Punch","Fixedsys Excelsior"]

Const lineOfSightDetail

lineOfSightDetail: 4 = 4

Const lineOfSightMaxRadius

lineOfSightMaxRadius: 20 = 20

Const lineOfSightRadius

lineOfSightRadius: 15 = 15

Const lobbyDataName

lobbyDataName: "mmi" = "mmi"

Let localPlayer

localPlayer: IPlayer

Const log

log: Log = new Log(LogSource.Game)

Const logInstances

logInstances: Log[] = []

Const logMatchmaking

logMatchmaking: Log = new Log(LogSource.Matchmaking)

Const logSerializer

logSerializer: Log = new Log(LogSource.Serializer)

Const lootGroup

lootGroup: ItemType[][] = Array<ItemType[] | undefined>()

Const map

  • map<T, X>(this: IterableIterator<T>, mapper: function): IterableIterator<X>
  • Type parameters

    • T

    • X

    Parameters

    • this: IterableIterator<T>
    • mapper: function
        • (val: T, index: number): X
        • Parameters

          • val: T
          • index: number

          Returns X

    Returns IterableIterator<X>

Const matchInvalidPathLettersUnix

matchInvalidPathLettersUnix: RegExp = new RegExp("[\/]", "g")

Const matchInvalidPathLettersWindows

matchInvalidPathLettersWindows: RegExp = new RegExp("[\<\>\:\"\/\\\|\?\*]", "g")

Const matchLanguageLetters

matchLanguageLetters: RegExp = new RegExp(`[${languageLetters}]`, "g")

Const matchNotLanguageLetters

matchNotLanguageLetters: RegExp = new RegExp(`[^${languageLetters}]`, "g")

Const maxFileSize

maxFileSize: number = 5 * 1048576

Const maxLogFiles

maxLogFiles: 10 = 10

Const maxPlayers

maxPlayers: 32 = 32

Const maximumTurnDelay

maximumTurnDelay: number = 500 / interval

Let modManager

modManager: IModManager

Const movementIntents

movementIntents: (None | East | North | West | South | "idle")[] = Enums.values(Direction).include(["idle", undefined]).collect(Collectors.toArray).sort() as MovementIntent[]

Let multiplayer

multiplayer: IMultiplayer

Let multiplayerNetworkingOptions

multiplayerNetworkingOptions: IMultiplayerNetworkingOptions

Const musicDescriptions

musicDescriptions: OptionalDescriptions<Music, IMusicDescription>

Let newui

newui: NewUi

Const noOpNoteManager

noOpNoteManager: NoteManager = {notes: [],getNote: () => undefined,wasWritten: () => false,write() { }} as any as NoteManager

Let npcManager

npcManager: INPCManager

Let nullLog

nullLog: NullLog = new NullLog()

Const onEquipTypes

onEquipTypes: IOnEquipType = []

Const overlayDescriptions

overlayDescriptions: OptionalDescriptions<OverlayType, IOverlayDescription>

Const particles

particles: IRGB[] = Array<IRGB>()

Let players

players: IPlayer[]

Const programs

programs: object

Type declaration

Let propertiesToSerialize

propertiesToSerialize: ISerializeProperty[] = [// classes{key: "game",property: ["game"]},{key: "player",property: ["localPlayer"]},{key: "absentPlayers",property: ["absentPlayers"]},{key: "ui",property: ["ui"]},{key: "world",property: ["world"],skipCompression: true},{key: "gameSlotName",property: ["saveData", "gameSlotName"]},{key: "gameState",property: ["saveData", "gameState"]},{key: "gameBaseSeed",property: ["saveData", "gameBaseSeed"]},{key: "gameCreationTime",property: ["saveData", "gameCreationTime"]},{key: "saveManagerOriginalVersion",property: ["saveData", "saveManagerOriginalVersion"]},{key: "gameThumbnail",property: ["saveData", "gameThumbnail"]},{key: "saveTime",property: ["saveData", "saveManagerSaveTime"]},{key: "saveManagerTicks",property: ["saveData", "saveManagerTicks"]},{key: "saveManagerScore",property: ["saveData", "saveManagerScore"]},{key: "saveManagerDifficulty",property: ["saveData", "saveManagerDifficulty"]},{key: "saveManagerDeathBy",property: ["saveData", "saveManagerDeathBy"]},{key: "modsSaveData",property: ["saveData", "modManagerSaveData"]},{key: "modsUnloadable",property: ["saveData", "modManagerUnloadable"]},{key: "allocatedEnums",property: ["saveData", "utilitiesEnumsAllocated"]},{key: "newui",property: ["saveData", "newui"]},{key: "clientStore",property: ["saveData", "clientStore"]},{key: "multiplayerState",property: ["saveData", "multiplayerState"]}]

Let propertiesToSerializeGlobal

propertiesToSerializeGlobal: ISerializeProperty[] = [{key: "lastPlayedVersion",property: ["saveDataGlobal", "gameLastPlayedVersion"]},{key: "gamesPlayed",property: ["saveDataGlobal", "gamePlayedCount"]},{key: "crafted",property: ["saveDataGlobal", "gameCrafted"]},{key: "highscores",property: ["saveDataGlobal", "gameHighscores"]},{key: "options",property: ["saveDataGlobal", "options"]},{key: "milestoneData",property: ["saveDataGlobal", "playerMilestoneData"]},{key: "modState",property: ["saveDataGlobal", "modManagerModState"]},{key: "modsSaveDataGlobal",property: ["saveDataGlobal", "modManagerSaveData"]},{key: "languagesSaveData",property: ["saveDataGlobal", "languageManagerSaveData"]},{key: "savedDialogInfo",property: ["saveDataGlobal", "savedDialogInfo"]},{key: "multiplayerBannedPlayers",property: ["saveDataGlobal", "multiplayerBannedPlayers"]},{key: "multiplayerPreviousGames",property: ["saveDataGlobal", "multiplayerPreviousGames"]},{key: "characters",property: ["saveDataGlobal", "characters"]},{key: "allocatedEnums",property: ["saveDataGlobal", "utilitiesEnumsAllocated"]},{key: "newui",property: ["saveDataGlobal", "newui"]},{key: "lastServerJoined",property: ["saveDataGlobal", "lastServerJoined"]}]

Const prototypes

prototypes: any[] = [Object.getPrototypeOf(function* (): any { }).prototype,Object.getPrototypeOf([][Symbol.iterator]()),Object.getPrototypeOf(new Map().keys()),Object.getPrototypeOf(new Set().values())]

One quirk with the Iterator support is that ones created from generator functions, ArrayIterators, and MapIterators are all different. We want this support to be available on each, so we make a list of everything that is an IterableIterator and then add all our methods to each in a loop.

Const recipeLevelToMessage

recipeLevelToMessage: Message[] = Array<Message>()

Const registrar

registrar: Registrar<IDoodadClass> = new Registrar<IDoodadClass>()

Let renderer

renderer: IWorldRenderer

Const requireJs

requireJs: IRequire | undefined = typeof (requirejs) !== "undefined" ? requirejs : undefined

Const reservedBytes

reservedBytes: 5 = 5

Const resource

resource: OptionalDescriptions<TerrainType, ITerrainResource>

Let saveData

saveData: ISaveData

Let saveDataGlobal

saveDataGlobal: ISaveDataGlobal

Const saveDataVersionUnknown

saveDataVersionUnknown: "Unknown" = "Unknown"

Let saveManager

saveManager: ISaveManager

Const seededRandom

seededRandom: Random<SeededGenerator> = new Random(new SeededGenerator())

Const serverDirectory

serverDirectory: ServerDirectory = new ServerDirectory()

Const setupBookItems

setupBookItems: ItemType[] = [ItemType.GildedRedBook, ItemType.MossCoveredBook, ItemType.OrnateBlueBook, ItemType.Journal]

Const setupHealthItems

setupHealthItems: ItemType[] = [ItemType.Tourniquet, ItemType.Suture, ItemType.Bandage, ItemType.CharcoalBandage, ItemType.PeatBandage]

Const setupLightItems

setupLightItems: ItemType[] = [ItemType.LitAnimalFatTorch, ItemType.LitBarkTorch, ItemType.LitBarkTorch, ItemType.LitPoleTorch, ItemType.LitPoleTorch, ItemType.LitPoleTorch]

Const setupMiscItems

setupMiscItems: ItemType[] = [ItemType.WoodenMortarAndPestle, ItemType.Bandage, ItemType.Waterskin, ItemType.GlassBottle, ItemType.ClayJug, ItemType.FishingRod, ItemType.BarkTorch, ItemType.Bow, ItemType.CordedSling, ItemType.SmallBag]

Const setupSpawnItems

setupSpawnItems: ItemType[] = [ItemType.Raspberries, ItemType.ButtonMushrooms, ItemType.StrippedBark, ItemType.Branch, ItemType.LargeRock, ItemType.TreeBark, ItemType.String, ItemType.Twigs, ItemType.LargeRock, ItemType.Bone, ItemType.AnimalSkull, ItemType.Shale, ItemType.PlantRoots, ItemType.SharpRock, ItemType.SheafOfHay, ItemType.AnimalClaw, ItemType.MilkThistleSeeds, ItemType.CottonSeeds, ItemType.BeggartickSeeds, ItemType.ChiveSeeds, ItemType.PotatoSeeds]

Const setupToolItems

setupToolItems: ItemType[] = [ItemType.StoneAxe, ItemType.StoneKnife, ItemType.StoneShovel, ItemType.StonePickaxe, ItemType.StoneHoe, ItemType.StoneHammer, ItemType.StonePickaxe]

Const setupWaterItems

setupWaterItems: ItemType[] = [ItemType.GlassBottleOfUnpurifiedFreshWater, ItemType.GlassBottleOfPurifiedFreshWater, ItemType.GlassBottleOfDesalinatedWater, ItemType.WaterskinOfUnpurifiedFreshWater, ItemType.WaterskinOfPurifiedFreshWater, ItemType.WaterskinOfDesalinatedWater, ItemType.ClayJugOfUnpurifiedFreshWater, ItemType.ClayJugOfPurifiedFreshWater, ItemType.ClayJugOfDesalinatedWater]

Const skill

skill: Camping = SkillType.Camping

Const skillDescriptions

skillDescriptions: OptionalDescriptions<SkillType, ISkillDescription>

Const skinColorDescriptions

skinColorDescriptions: object = createColorDescriptions(SkinColor)

Type declaration

Const soundEffectDescriptions

soundEffectDescriptions: OptionalDescriptions<SfxType, ISoundEffectDescription>

Const sourceColors

sourceColors: string[] = ["color:lightskyblue","color:plum","color:lightgreen"]

Const specialThanks

specialThanks: IPerson[] = [{firstName: "Richard",nickname: "Orillian",lastName: "Hobson"},{firstName: "Vlad",nickname: "vlsd",lastName: "Seghete"},{firstName: "Unstoppable Carl",lastName: "Olsen"},{firstName: "Justin",nickname: "boxofrox",lastName: "Charette"},{firstName: "Frank",lastName: "Orechio"},{firstName: "Drachlen"},{firstName: "Joshua",nickname: "jday",lastName: "Day"},{firstName: "Oddmund",nickname: "oddmunds",lastName: "Strømme"}]

Let spriteAtlas

spriteAtlas: ISpriteAtlas

Const spriteMap

spriteMap: object = Objects.create([[spriteId(Direction.South, Direction.North), Vector2.ZERO],[spriteId(Direction.West, Direction.East), new Vector2(16, 0)],[spriteId(Direction.North, Direction.South), new Vector2(32, 0)],[spriteId(Direction.East, Direction.West), new Vector2(48, 0)],[spriteId(Direction.South, Direction.East), new Vector2(0, 16)],[spriteId(Direction.South, Direction.West), new Vector2(16, 16)],[spriteId(Direction.North, Direction.East), new Vector2(32, 16)],[spriteId(Direction.North, Direction.West), new Vector2(48, 16)],[spriteId(Direction.West, Direction.North), new Vector2(0, 32)],[spriteId(Direction.West, Direction.South), new Vector2(16, 32)],[spriteId(Direction.East, Direction.North), new Vector2(32, 32)],[spriteId(Direction.East, Direction.South), new Vector2(48, 32)]])

Type declaration

Const statColors

statColors: IStatColorLookup = []

Const statDisplayDescriptions

statDisplayDescriptions: OptionalDescriptions<Stat, IStatDisplayDescription>

Const statusEffectDescriptions

statusEffectDescriptions: OptionalDescriptions<StatusType, IStatusEffectDescription>

Const steamLobbyPrefix

steamLobbyPrefix: "steam:" = "steam:"

Let steamworks

steamworks: ISteamworks

Const subTileSize

subTileSize: 8 = 8

Const suppressions

suppressions: any[] = []

An array of 'stats' that were attempted to be retrieved and resulted in an error. We store this so it doesn't spam the console. This code is bad but I can't think of a better way to do it

Const teamMembers

teamMembers: ITeamMember[] = [{firstName: "Vaughn",lastName: "Royko",nickname: "Drathy",fileName: "drathy",responsibilities: [Responsibility.Programming,Responsibility.Design,Responsibility.Web,Responsibility.PR],isCurrentMember: true},{firstName: "Gary",lastName: "Wilber",nickname: "Spacetech",fileName: "spacetech",responsibilities: [Responsibility.Programming],isCurrentMember: true},{firstName: "Dusty",lastName: "Melling",nickname: "Goaticide",fileName: "goaticide",responsibilities: [Responsibility.Art,Responsibility.Design],isCurrentMember: true},{firstName: "Mackenzie",lastName: "McClane",nickname: "Yuudaari",fileName: "yuudaari",responsibilities: [Responsibility.Programming,Responsibility.UX],isCurrentMember: true},{firstName: "Austin",lastName: "Dhillon",fileName: "austin",responsibilities: [Responsibility.Music],isCurrentMember: true},{firstName: "Frank",lastName: "Sasto",nickname: "Sassafrass",responsibilities: [Responsibility.Programming]}]

Const templates

templates: object

Type declaration

  • [id: number]: object

Const terrainDescriptions

terrainDescriptions: OptionalDescriptions<TerrainType, ITerrainDescription>

Let tileAtlas

tileAtlas: ITileAtlas

Const tileEventDescriptions

tileEventDescriptions: OptionalDescriptions<TileEventType, ITileEventDescription>

Let tileEventManager

tileEventManager: ITileEventManager

Const tileGroups

tileGroups: TerrainType[][] = Array<TerrainType[]>()

Const tooltips

tooltips: object

Type declaration

  • [index: number]: ITooltip

Const tooltipsMap

tooltipsMap: object

Type declaration

  • [index: string]: number

Const trello

trello: Trello = new Trello()

Let ui

ui: IUi

Const walkDotsMap

walkDotsMap: object = Objects.create([[spriteId(Direction.South), Vector2.ZERO],[spriteId(Direction.East, Direction.South), new Vector2(16, 0)],[spriteId(Direction.West, Direction.South), new Vector2(32, 0)],[spriteId(Direction.North, Direction.South), new Vector2(0, 16)],[spriteId(Direction.East, Direction.North), new Vector2(16, 16)],[spriteId(Direction.West, Direction.North), new Vector2(32, 16)],[spriteId(Direction.North), new Vector2(0, 32)],[spriteId(Direction.East), new Vector2(16, 32)],[spriteId(Direction.West, Direction.East), new Vector2(32, 32)],[spriteId(Direction.West), new Vector2(32, 32)]])

Type declaration

Const waywardBoard

waywardBoard: "PWX1Hpjn" = "PWX1Hpjn"

Const webRTCTimeout

webRTCTimeout: 6000 = 6000

Let world

world: IWorld

Const π

π: number = Math.PI

Const τ

τ: number = Math.PI * 2

Functions

Bound

  • Bound<T>(target: any, key: string, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T> | void
  • Type parameters

    • T: function

    Parameters

    • target: any
    • key: string
    • descriptor: TypedPropertyDescriptor<T>

    Returns TypedPropertyDescriptor<T> | void

Final

  • Final<T>(target: any, key: string, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T> | void
  • Type parameters

    • T: function

    Parameters

    • target: any
    • key: string
    • descriptor: TypedPropertyDescriptor<T>

    Returns TypedPropertyDescriptor<T> | void

HookMethod

  • HookMethod(priority: number): function
  • HookMethod<K>(host: IHookHost, property: K, descriptor: TypedPropertyDescriptor<Exclude<IHookHost[K], undefined>>): void
  • A decorator for registering a hook method on an IHookHost.

    Parameters

    • priority: number

      The priority of this hook method. Defaults to HookPriority.Normal

      Example Usage:

      @HookMethod(HookPriority.High)
      public onGameStart(isLoadingSave: boolean) {
          console.log("hello world!");
      }

    Returns function

      • <K>(hook: IHookHost, property: K, descriptor: TypedPropertyDescriptor<Exclude<IHookHost[K], undefined>>): void
      • Type parameters

        • K: keyof IHookHost

        Parameters

        • hook: IHookHost
        • property: K
        • descriptor: TypedPropertyDescriptor<Exclude<IHookHost[K], undefined>>

        Returns void

  • A decorator for registering a hook method on a IHookHost. Uses HookPriority.Normal

    Example Usage:

    @HookMethod
    public onGameStart(isLoadingSave: boolean) {
        console.log("hello world!");
    }

    Type parameters

    • K: keyof IHookHost

    Parameters

    • host: IHookHost
    • property: K
    • descriptor: TypedPropertyDescriptor<Exclude<IHookHost[K], undefined>>

    Returns void

InternalNetworkProperty

  • Parameters

    Returns PropertyDecorator

NetworkProperty

  • Parameters

    Returns PropertyDecorator

OptionalNetworkProperty

  • Parameters

    Returns PropertyDecorator

RecipeComponent

  • Parameters

    • type: ItemType | ItemTypeGroup
    • requiredAmount: number
    • consumedAmount: number
    • Default value disassembleAmount: number = 0
    • Default value ignoreWeight: boolean = false

    Returns IRecipeComponent

Save

  • Used to mark a field to be saved to either saveData or saveDataGlobal. Used in conjunction with IGameScreenApi.registerDataHost(<id>, <the instance that contains fields marked with this decorator>)

    Parameters

    Returns any

SaveAllProperties

  • SaveAllProperties(): ClassDecorator
  • Returns ClassDecorator

SaveProperty

  • SaveProperty(): PropertyDecorator
  • Returns PropertyDecorator

Const _saveData

  • Returns ISaveData

addDecoration

  • Parameters

    Returns (Anonymous function)

addToGroups

any

  • any(this: IterableIterator<any>, predicate: function): boolean
  • Parameters

    • this: IterableIterator<any>
    • predicate: function
        • (val: any, index: number): boolean
        • Parameters

          • val: any
          • index: number

          Returns boolean

    Returns boolean

anyOf

  • anyOf<A>(...actions: A): A
  • Type parameters

    Parameters

    • Rest ...actions: A

    Returns A

applyChallengeModifiers

banCommand

  • banCommand(player: IPlayer, args: string): void
  • Parameters

    Returns void

bannedCommand

  • bannedCommand(player: IPlayer, args: string): void
  • Parameters

    Returns void

blockMove

  • Parameters

    Returns void

cancelEvent

  • cancelEvent(event: Event): boolean
  • Parameters

    • event: Event

    Returns boolean

clamp

  • clamp(n: number): any
  • Used to guarantee the result of Color is valid.

    Parameters

    • n: number

    Returns any

clearFinishedLoading

  • clearFinishedLoading(): void
  • Returns void

collect

  • collect(this: IterableOf<any>, iterable: boolean | function, collector: any, ...args: any[]): any
  • Parameters

    • this: IterableOf<any>
    • iterable: boolean | function
    • collector: any
    • Rest ...args: any[]

    Returns any

compileShader

  • compileShader(gl: WebGL2RenderingContext, src: string, type: number): WebGLShader
  • Parameters

    • gl: WebGL2RenderingContext
    • src: string
    • type: number

    Returns WebGLShader

compileShaders

  • compileShaders(): void
  • Returns void

consumeItemType

convertRateModifierActualToRange

  • convertRateModifierActualToRange(actual: number): number
  • Parameters

    • actual: number

    Returns number

convertRateModifierRangeToActual

  • convertRateModifierRangeToActual(range: number): number
  • Parameters

    • range: number

    Returns number

convertStringToSeed

  • convertStringToSeed(seed: string | number): number
  • Parameters

    • seed: string | number

    Returns number

createColorDescriptions

  • createColorDescriptions(e: any): object
  • Parameters

    • e: any

    Returns object

createMessageSourceId

  • createMessageSourceId(sources: Array<Source | false | undefined>): ("Combat" | "Equipment" | "Skill" | "All" | "Action" | "Chat" | "Command" | "Creature" | "Game" | "Item" | "Meta" | "Milestone" | "Multiplayer" | "Stat" | "Allies" | "Resource" | "Wellbeing")[]
  • Parameters

    • sources: Array<Source | false | undefined>

    Returns ("Combat" | "Equipment" | "Skill" | "All" | "Action" | "Chat" | "Command" | "Creature" | "Game" | "Item" | "Meta" | "Milestone" | "Multiplayer" | "Stat" | "Allies" | "Resource" | "Wellbeing")[]

customizationsEqual

debounce

  • debounce(id: string, callback: function, timeout: number): void
  • Parameters

    • id: string
    • callback: function
        • (): void
        • Returns void

    • timeout: number

    Returns void

default

  • Parameters

    Returns IOverlayInfo

dissassemblyBurn

  • Parameters

    Returns void

elementContains

  • elementContains(a: Element, b: Element): boolean
  • Parameters

    • a: Element
    • b: Element

    Returns boolean

entries

  • entries(this: IterableIterator<any>): IterableIterator<any[]>
  • Parameters

    • this: IterableIterator<any>

    Returns IterableIterator<any[]>

every

  • every(this: IterableIterator<any>, predicate: function): boolean
  • Parameters

    • this: IterableIterator<any>
    • predicate: function
        • (val: any, index: number): boolean
        • Parameters

          • val: any
          • index: number

          Returns boolean

    Returns boolean

filter

  • filter(this: IterableIterator<any>, filterer: function): IterableIterator<any>
  • Parameters

    • this: IterableIterator<any>
    • filterer: function
        • (val: any): boolean
        • Parameters

          • val: any

          Returns boolean

    Returns IterableIterator<any>

filter2

  • filter2(this: IterableIterator<any>, filterer: function): IterableIterator<any>
  • Parameters

    • this: IterableIterator<any>
    • filterer: function
        • (val: any): boolean
        • Parameters

          • val: any

          Returns boolean

    Returns IterableIterator<any>

findPath

  • findPath(start: IVector2, end: IVector2, z: number, isTileBlocked: function, getTilePenalty?: function, maxNodesChecked?: number): IVector2[] | undefined
  • Parameters

    Returns IVector2[] | undefined

findUnusedId

  • findUnusedId<T>(source: LogSource, things: T[]): number
  • Type parameters

    • T

    Parameters

    Returns number

flatMap

  • flatMap(this: IterableOf<any>, mapper?: function): IterableIterator<any>
  • Parameters

    • this: IterableOf<any>
    • Optional mapper: function
        • (value: any): any
        • Parameters

          • value: any

          Returns any

    Returns IterableIterator<any>

forEach

  • forEach(this: IterableIterator<any>, user: function, continueGeneration: boolean): IterableIterator<any>
  • Parameters

    • this: IterableIterator<any>
    • user: function
        • (val: any, index: number): boolean | undefined
        • Parameters

          • val: any
          • index: number

          Returns boolean | undefined

    • continueGeneration: boolean

    Returns IterableIterator<any>

forEachContinue

  • forEachContinue(iterator: IterableIterator<any>, user: function): IterableIterator<any>
  • Parameters

    • iterator: IterableIterator<any>
    • user: function
        • (val: any, index: number): boolean | undefined
        • Parameters

          • val: any
          • index: number

          Returns boolean | undefined

    Returns IterableIterator<any>

fullDamageType

  • Damage types are bit flags, so multiple can be stored in one DamageType. This method returns a translated list of damage types.

    Parameters

    Returns Translation

generateDictionarySchema

generateRandomCharacter

  • Returns ICharacter

generateRandomCustomization

generateSchema

  • generateSchema(): object
  • Returns object

    • allOf: (object | object)[]
    • description: string
    • title: string
    • type: string

generateWorld

  • generateWorld(generateNewWorld: boolean): Promise<Object>
  • Parameters

    • generateNewWorld: boolean

    Returns Promise<Object>

getArgumentType

getCartographyDirection

getCartographyDistance

  • Parameters

    • skill: number
    • distance: number

    Returns Translation | Message

getColorDescription

getCommandEntryTranslation

  • Parameters

    • __namedParameters: [string, Command]

    Returns Translation

getDecorations

  • Parameters

    Returns IterableIterator<[TextDecoration, number]>

getDefaultDifficultyOptions

getDefaultMultiplayerOptions

getDictionaryId

  • getDictionaryId(dictionaryName: string): Dictionary
  • Parameters

    • dictionaryName: string

    Returns Dictionary

getDirectionFromAngle

  • Returns a direction from its angle in radians. (Value between 0 and τ)

    Parameters

    • radians: number

    Returns East | North | West | South

getDirectionFromMovement

  • Parameters

    • x: number
    • y: number

    Returns East | North | West | South

getDirectionHeldOnAxis

  • Gets which direction is held on a given axis, or undefined if no direction (or both) are held.

    Parameters

    Returns Direction

getDirectionsFromAngle

  • Returns one or two directions from its angle in radians. (Value between 0 and τ)

    The cardinal directions each have 60°, while the ordinal directions have 30°

    Parameters

    • radians: number

    Returns HeldDirections

getEffectTooltip

  • getEffectTooltip(effect: StatusType): (Anonymous function)
  • Parameters

    Returns (Anonymous function)

getEntryId

  • getEntryId(dictionaryName: string, entryName: string): string | number
  • Parameters

    • dictionaryName: string
    • entryName: string

    Returns string | number

getHeldDirections

  • Returns the currently held directions.

    Parameters

    Returns [Direction, Direction]

getHoursAndMinutes

  • getHoursAndMinutes(time: number): object
  • Parameters

    • time: number

    Returns object

    • hour: number
    • minute: number

getItemQuantity

  • Parameters

    Returns number

getKillableCount

  • getKillableCount(): number
  • Returns number

getManhattanDistance

  • Parameters

    Returns number

getMultiplierValue

  • getMultiplierValue(multiplier: number, value?: number): number
  • Parameters

    • multiplier: number
    • Default value value: number = 25

    Returns number

getNoteBodyTranslation

  • getNoteBodyTranslation(noteId: function): (Anonymous function)
  • Parameters

    • noteId: function
        • (): number
        • Returns number

    Returns (Anonymous function)

getNoteTimeTranslation

  • getNoteTimeTranslation(noteId: function): (Anonymous function)
  • Parameters

    • noteId: function
        • (): number
        • Returns number

    Returns (Anonymous function)

getNoteTitleTranslation

  • getNoteTitleTranslation(noteId: function): (Anonymous function)
  • Parameters

    • noteId: function
        • (): number
        • Returns number

    Returns (Anonymous function)

getPercentageFromPixels

  • getPercentageFromPixels(axis: Axis, pixels: number): number
  • Returns a percentage of the screen based on the given number of pixels on the given Axis.

    Parameters

    • axis: Axis
    • pixels: number

    Returns number

getPixelsFromPercentage

  • getPixelsFromPercentage(axis: Axis, percentage: number): number
  • Returns a number of pixels based on the given percentage of the screen on the given Axis.

    Parameters

    • axis: Axis
    • percentage: number

    Returns number

getPressName

  • Parameters

    Returns string

getReputationDifficultyTranslation

getResourceData

getScreenCenter

  • Returns a vector representing the center of the screen.

    Returns Vector2

getSlotType

getSource

  • getSource(sources: Array<LogSource | string>, toConsole?: boolean): any[]
  • Parameters

    • sources: Array<LogSource | string>
    • Default value toConsole: boolean = false

    Returns any[]

getSources

  • getSources(sources: string[]): Source[]
  • Parameters

    • sources: string[]

    Returns Source[]

getStatTooltip

  • getStatTooltip(stat: Stat): (Anonymous function)
  • Parameters

    Returns (Anonymous function)

getSymbolKey

  • Parameters

    • symbol: symbol

    Returns WeakSymbolKey

getTamableCount

  • getTamableCount(): number
  • Returns number

getTileId

  • getTileId(x: number, y: number, z: number): number
  • Parameters

    • x: number
    • y: number
    • z: number

    Returns number

getTileLoc

  • Parameters

    Returns Vec2

getTilePosition

  • getTilePosition(id: number): [number, number, number]
  • Parameters

    • id: number

    Returns [number, number, number]

getTranslationId

  • getTranslationId(dictionary: Dictionary | string, entry?: number | string, index?: string | number): string
  • Parameters

    • dictionary: Dictionary | string
    • Optional entry: number | string
    • Optional index: string | number

    Returns string

getTypedPropertyDescriptor

  • getTypedPropertyDescriptor<T>(target: any, key: string, descriptor: TypedPropertyDescriptor<T>, configurable?: boolean): TypedPropertyDescriptor<T> | void
  • Type parameters

    • T: function

    Parameters

    • target: any
    • key: string
    • descriptor: TypedPropertyDescriptor<T>
    • Default value configurable: boolean = true

    Returns TypedPropertyDescriptor<T> | void

getUniqueOr

  • getUniqueOr<T>(a: [T, boolean], b: [T, boolean], or: T): T
  • Returns a[0] if only a[1] is true, b[0] if only b[1] is true, and or otherwise.

    Type parameters

    • T

    Parameters

    • a: [T, boolean]
    • b: [T, boolean]
    • or: T

    Returns T

getWaterType

  • Parameters

    Returns number

harvestGatherBurn

hasArticle

  • hasArticle(match: undefined | string, api: ISegmentApi, args: any[]): undefined | boolean
  • Parameters

    • match: undefined | string
    • api: ISegmentApi
    • args: any[]

    Returns undefined | boolean

hasEffect

  • Parameters

    Returns boolean

hasFinishedLoading

  • hasFinishedLoading(): boolean
  • Returns boolean

hasStat

  • Parameters

    Returns boolean

include

  • include(this: IterableIterator<any>, ...iterables: Array<IterableOf<any>>): IterableIterator<any>
  • Parameters

    • this: IterableIterator<any>
    • Rest ...iterables: Array<IterableOf<any>>

    Returns IterableIterator<any>

initializePrivateStore

  • initializePrivateStore(target: any, initializer?: Array<[symbol, any]>): void
  • Parameters

    • target: any
    • Optional initializer: Array<[symbol, any]>

    Returns void

interpolate

  • interpolate(str: string, ...args: any[]): string
  • Parameters

    • str: string
    • Rest ...args: any[]

    Returns string

interpolateSectioned

  • Parameters

    • str: string
    • Rest ...args: any[]

    Returns IStringSection[]

isCreatureKilledByHost

  • Parameters

    Returns boolean

isDefined

  • isDefined<T>(x: T): boolean
  • Type parameters

    • T

    Parameters

    • x: T

    Returns boolean

isDoor

  • isDoor(doodad?: IDoodad): boolean
  • Parameters

    Returns boolean

isEternalNight

  • Parameters

    Returns boolean

isItemMatch

isIterable

  • isIterable(obj: any): boolean
  • Parameters

    • obj: any

    Returns boolean

isJQuery

  • isJQuery(obj: any): boolean
  • Parameters

    • obj: any

    Returns boolean

isModLoadable

  • Parameters

    • Optional publishId: string

    Returns [string, ModLoadability]

isNodeEqual

  • Parameters

    Returns boolean

isPermanentEffect

  • Parameters

    Returns boolean

isPinOfIncompleteQuestRequirement

  • Parameters

    Returns boolean

isRGB

  • isRGB(x: unknown): boolean
  • Parameters

    • x: unknown

    Returns boolean

isSameBinding

  • Parameters

    Returns boolean

isValidItem

  • Parameters

    Returns boolean

isWalkToTileBlocked

  • Returns whether the tile is blocked (completely impassible)

    Parameters

    Returns boolean

keyOf

  • keyOf(obj: any, val: any): string
  • Parameters

    • obj: any
    • val: any

    Returns string

kickCommand

  • kickCommand(player: IPlayer, args: string): void
  • Parameters

    Returns void

length

  • length(this: IterableIterator<any>): number
  • Parameters

    • this: IterableIterator<any>

    Returns number

linkProgram

  • linkProgram(gl: WebGL2RenderingContext, vs: WebGLShader, fs: WebGLShader): WebGLProgram
  • Parameters

    • gl: WebGL2RenderingContext
    • vs: WebGLShader
    • fs: WebGLShader

    Returns WebGLProgram

loadDifferences

  • loadDifferences(): void
  • Returns void

loadShaders

  • loadShaders(): Promise<void>
  • Returns Promise<void>

manipulateTemplates

  • Type parameters

    • T: Array<string[] | undefined>

    Parameters

    Returns T

markSaved

  • markSaved(target: any, property: string, saveLocation?: SaveLocation): void
  • Parameters

    • target: any
    • property: string
    • Default value saveLocation: SaveLocation = SaveLocation.Local

    Returns void

menuSwitcher

  • menuSwitcher<M>(menu: MenuId | M | function, then?: function): function
  • Type parameters

    Parameters

    • menu: MenuId | M | function
    • Optional then: function
        • (menu: M, ...args: any[]): any
        • Parameters

          • menu: M
          • Rest ...args: any[]

          Returns any

    Returns function

      • (...args: any[]): void
      • Parameters

        • Rest ...args: any[]

        Returns void

mirrorTemplate

  • mirrorTemplate(templateArray: string[]): string[]
  • Parameters

    • templateArray: string[]

    Returns string[]

nevery

  • nevery(this: IterableIterator<any>, predicate: function): boolean
  • Parameters

    • this: IterableIterator<any>
    • predicate: function
        • (val: any, index: number): boolean
        • Parameters

          • val: any
          • index: number

          Returns boolean

    Returns boolean

none

  • none(this: IterableIterator<any>, predicate: function): boolean
  • Parameters

    • this: IterableIterator<any>
    • predicate: function
        • (val: any, index: number): boolean
        • Parameters

          • val: any
          • index: number

          Returns boolean

    Returns boolean

noop

  • noop(): void
  • Returns void

Const onLoad

  • onLoad(): Promise<void>
  • Returns Promise<void>

parseCommandLineArgument

  • parseCommandLineArgument(name: string, args: string): string | undefined
  • Parameters

    • name: string
    • args: string

    Returns string | undefined

parseTimeFormat

  • parseTimeFormat(time: string): object
  • Parameters

    • time: string

    Returns object

    • hour: number
    • minute: number

parseTranslationId

  • parseTranslationId(translationId: string): [Dictionary, string | number, number | "random"]
  • Parameters

    • translationId: string

    Returns [Dictionary, string | number, number | "random"]

pauseCommand

  • pauseCommand(player: IPlayer, args: string): void
  • Parameters

    Returns void

pingCommand

  • pingCommand(player: IPlayer, args: string): void
  • Parameters

    Returns void

pipe

  • pipe<A>(...args: A): IterableIterator<A[number]>
  • Type parameters

    • A: any[]

    Parameters

    • Rest ...args: A

    Returns IterableIterator<A[number]>

playersCommand

  • playersCommand(player: IPlayer, args: string): void
  • Parameters

    Returns void

prettyJsonStringify

  • prettyJsonStringify(data: any): string
  • Parameters

    • data: any

    Returns string

range

  • range(end: number): IterableIterator<number>
  • range(start: number, end: number): IterableIterator<number>
  • A generator for numbers from 0 through end (exclusive)

    Parameters

    • end: number

    Returns IterableIterator<number>

  • A generator for numbers from start (inclusive) through end (exclusive)

    Parameters

    • start: number
    • end: number

    Returns IterableIterator<number>

reduce

  • reduce(this: IterableIterator<any>, reducer: function, defaultValue?: any): any
  • Parameters

    • this: IterableIterator<any>
    • reducer: function
        • (oldValue: any | undefined, entry: any): any
        • Parameters

          • oldValue: any | undefined
          • entry: any

          Returns any

    • Optional defaultValue: any

    Returns any

regexOf

  • regexOf(thing: RegExp | string): RegExp
  • Parameters

    • thing: RegExp | string

    Returns RegExp

registerHook

  • registerHook(host: IHookHost, hook: Hook, priority?: number): void
  • Parameters

    Returns void

replaceNullsWithUndefined

  • replaceNullsWithUndefined<T>(arr: Array<T | undefined>): void
  • Type parameters

    • T

    Parameters

    • arr: Array<T | undefined>

    Returns void

rotateTemplate

  • rotateTemplate(templateArray: string[]): string[]
  • Parameters

    • templateArray: string[]

    Returns string[]

rotateTileType90Deg

  • Parameters

    Returns TileType

sailToCivilization

  • Parameters

    Returns Promise<void>

saveCommand

  • saveCommand(player: IPlayer, args: string): void
  • Parameters

    Returns void

savedProperties

  • Parameters

    • target: any

    Returns Map<string, SaveLocation>

serializePluralizationRules

  • Parameters

    Returns object

    • Optional articleRules?: Array<[number | object | null, string, string]>
    • Optional irregularRules?: Array<[string, string]>
    • Optional pluralRules?: object
      • [key: string]: string
    • Optional singularRules?: object
      • [key: string]: string
    • Optional uncountables?: string[]

serializeRegex

  • serializeRegex(regex: RegExp): string
  • Parameters

    • regex: RegExp

    Returns string

serializeRegexRule

  • serializeRegexRule(__namedParameters: [RegExp, string]): [string, string]
  • Parameters

    • __namedParameters: [RegExp, string]

    Returns [string, string]

setDefaultBackground

  • Parameters

    Returns void

setFinishedLoading

  • setFinishedLoading(): void
  • Returns void

setTileUnderDoodad

  • setTileUnderDoodad(tile: ITile, x: number, y: number, doodadType: DoodadType, addTileData?: boolean): void
  • Parameters

    • tile: ITile
    • x: number
    • y: number
    • doodadType: DoodadType
    • Optional addTileData: boolean

    Returns void

setup

setupTiles

  • setupTiles(tileGenArray: Uint16Array): void
  • Parameters

    • tileGenArray: Uint16Array

    Returns void

shake

  • shake(shouldShake: boolean, statElement: Component): Promise<void>
  • Shakes the stat element if shouldShake is true, otherwise removes the shake class.

    When adding the shake class, removes it after 250 ms.

    Parameters

    • shouldShake: boolean
    • statElement: Component

    Returns Promise<void>

skillChance

  • skillChance(level: number): number
  • Parameters

    • level: number

    Returns number

skillSet

  • Returns ISkillSet

sleep

  • sleep(ms: number): Promise<Object>
  • Parameters

    • ms: number

    Returns Promise<Object>

slice

  • slice(this: IterableIterator<any>, startIndex: number, endIndex?: number): IterableIterator<any>
  • Parameters

    • this: IterableIterator<any>
    • startIndex: number
    • Default value endIndex: number = Infinity

    Returns IterableIterator<any>

sortVersionInfo

  • Parameters

    Returns number

spawnDoodad

  • spawnDoodad(tileType: TerrainType, x: number, y: number, z: number, afterMapGen?: boolean): void
  • Parameters

    • tileType: TerrainType
    • x: number
    • y: number
    • z: number
    • Optional afterMapGen: boolean

    Returns void

spawnHouseItem

  • spawnHouseItem(x: number, y: number, z: number): void
  • Parameters

    • x: number
    • y: number
    • z: number

    Returns void

spawnShoreItem

  • spawnShoreItem(x: number, y: number, z: number): void
  • Parameters

    • x: number
    • y: number
    • z: number

    Returns void

spawnTemplate

  • Parameters

    Returns void

spawnTileEvent

  • spawnTileEvent(x: number, y: number, z: number): void
  • Parameters

    • x: number
    • y: number
    • z: number

    Returns void

spriteId

  • spriteId(...directions: Direction[]): string
  • Parameters

    Returns string

startGame

  • startGame(gameOptions: function): function
  • startGame(gameOptions: IPlayOptions): void
  • Parameters

    Returns function

      • (): void
      • Returns void

  • Parameters

    Returns void

statDisplayType

  • statDisplayType(displayType: StatDisplayType): "None" | "Auto" | "Attribute" | "Statbar"
  • Parameters

    Returns "None" | "Auto" | "Attribute" | "Statbar"

stubF

  • stubF<T>(ret?: T): function
  • Type parameters

    • T

    Parameters

    • Optional ret: T

    Returns function

      • (): T
      • Returns T

stubV

  • stubV<T>(ret?: T): T
  • Type parameters

    • T

    Parameters

    • Optional ret: T

    Returns T

switchMenu

  • switchMenu<M>(menu: MenuId | M | function, then?: function, ...args: any[]): void
  • Type parameters

    Parameters

    • menu: MenuId | M | function
    • Optional then: function
        • (menu: M, ...args: any[]): any
        • Parameters

          • menu: M
          • Rest ...args: any[]

          Returns any

    • Rest ...args: any[]

    Returns void

switchToJoinServer

  • switchToJoinServer(serverToJoin: ServerInfo): void
  • Parameters

    Returns void

toggleClasses

  • toggleClasses(...classes: string[]): (Anonymous function)
  • Returns a when() handler that will toggle classes on a statElement based on whether the predicate matched.

    Parameters

    • Rest ...classes: string[]

    Returns (Anonymous function)

travelAway

  • travelAway(): Promise<void>
  • Returns Promise<void>

tuple

  • tuple<T>(...items: T): T
  • Type parameters

    • T: any[]

    Parameters

    • Rest ...items: T

    Returns T

unbanCommand

  • unbanCommand(player: IPlayer, args: string): void
  • Parameters

    Returns void

updateCase

  • Changes the case of an array of string sections based on their context.

    Parameters

    Returns IStringSection[]

validate

validateArgument

values

  • values(this: IterableIterator<any>): IterableIterator<any>
  • Parameters

    • this: IterableIterator<any>

    Returns IterableIterator<any>

when

  • when(predicate: function, handler: function): (Anonymous function)
  • Returns a IStatDescription["onChange"] handler that will check a predicate and run the handler with the result of that predicate.

    Parameters

    • predicate: function

      A function that takes an IStatInfo object and returns whether it "matches".

    • handler: function

      A function that takes whether the info matches, the statElement, the entity, and the IStatInfo object and "handles" it.

    Returns (Anonymous function)

writeCorpseNote

  • Parameters

    Returns void

Object literals

Const actionDescriptions

actionDescriptions: object

__computed

__computed: Action<[ItemNearby, ActionType], IPlayer | INPC, void> = UseItem

Const actions

actions: object

__computed

__computed: string[] = ["Use Item", ""]

Const argumentSegment

argumentSegment: object

Prints values from the arguments passed to the interpolator. If the keys don't map to a provided argument, an empty string is returned.

  • "{0}" => args[0]
  • "{test}" => args[0]["test"]
  • "{3.test.4.wow}" => args[3]["test"][4]["wow"]

regex

regex: RegExp = /^[a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9_-]+)*$/

handle

  • Parameters

    • _: RegExpMatchArray
    • segment: string
    • api: ISegmentApi
    • Rest ...args: any[]

    Returns string | IStringSection[] | IterableIterator<IStringSection>

Const articles

articles: object

__computed

__computed: [string, string, string, string] = ["Bugs and Errors","Did you get an error? Please report it!","Learn how to report bugs and debug Wayward.",`Please report all the issues you spot! While we try to ensure Wayward is very stable, some things fall through the cracks. Wayward is still in beta status and our development team is very small. Therefore, without players reporting issues, they may stay unresolved. If you do report your bugs, we cannot express just how much we appreciate them!With that being said, {link(https://steamcommunity.com/sharedfiles/filedetails/?id=798938225):here is a guide on how to report and debug issues you have with Wayward}.Report bugs and issues at:1. {link(http://steamcommunity.com/app/379210/discussions/1/):Steam Discussions Bug Reports forum} OR2. {link(https://discord.gg/wayward):Discord}`]

Const attack

attack: object

color

color: string = "#FFF22E"

displayOrder

displayOrder: number = 2

displayType

displayType: Attribute = StatDisplayType.Attribute

getFormatted

tooltip

Let audio

audio: object

getMusicHandler

getMusicHandler: function = stubF()

Type declaration

    • (): T
    • Returns T

playMusic

playMusic: function = stubF()

Type declaration

    • (): T
    • Returns T

processEffects

processEffects: function = stubF()

Type declaration

    • (): T
    • Returns T

queueEffect

queueEffect: function = stubF()

Type declaration

    • (): T
    • Returns T

resetMusicHandler

resetMusicHandler: function = stubF()

Type declaration

    • (): T
    • Returns T

setMusicHandler

setMusicHandler: function = stubF()

Type declaration

    • (): T
    • Returns T

stopMusic

stopMusic: function = stubF()

Type declaration

    • (): T
    • Returns T

updateMusicSpeed

updateMusicSpeed: function = stubF()

Type declaration

    • (): T
    • Returns T

updatePosition

updatePosition: function = stubF()

Type declaration

    • (): T
    • Returns T

updateVolume

updateVolume: function = stubF()

Type declaration

    • (): T
    • Returns T

Const axisDirections

axisDirections: object