Class: GameCache#

Hierarchy#

  • Handle<gamecache>

    ↳ GameCache

Constructors#

constructor#

new GameCache(campaignFile: string): GameCache

note You cannot create more than 255 gamecaches

Parameters:#

NameType
campaignFilestring

Returns: GameCache

Defined in: handles/gamecache.ts:7

Properties#

filename#

• Readonly filename: string

Defined in: handles/gamecache.ts:7


handle#

• Readonly handle: gamecache

Inherited from: Handle.handle

Defined in: handles/handle.ts:6

Accessors#

id#

id(): number

Get the unique ID of the handle. The ID is recycled once you destroy the object.

Returns: number

The unique ID of a handle object.

Defined in: handles/handle.ts:18

Methods#

flush#

flush(): void

Returns: void

Defined in: handles/gamecache.ts:22


flushBoolean#

flushBoolean(missionKey: string, key: string): void

Parameters:#

NameType
missionKeystring
keystring

Returns: void

Defined in: handles/gamecache.ts:26


flushInteger#

flushInteger(missionKey: string, key: string): void

Parameters:#

NameType
missionKeystring
keystring

Returns: void

Defined in: handles/gamecache.ts:30


flushMission#

flushMission(missionKey: string): void

Parameters:#

NameType
missionKeystring

Returns: void

Defined in: handles/gamecache.ts:34


flushNumber#

flushNumber(missionKey: string, key: string): void

Parameters:#

NameType
missionKeystring
keystring

Returns: void

Defined in: handles/gamecache.ts:38


flushString#

flushString(missionKey: string, key: string): void

Parameters:#

NameType
missionKeystring
keystring

Returns: void

Defined in: handles/gamecache.ts:42


flushUnit#

flushUnit(missionKey: string, key: string): void

Parameters:#

NameType
missionKeystring
keystring

Returns: void

Defined in: handles/gamecache.ts:46


getBoolean#

getBoolean(missionKey: string, key: string): boolean

Returns false if the specified value's data is not found in the cache.

Parameters:#

NameType
missionKeystring
keystring

Returns: boolean

Defined in: handles/gamecache.ts:53


getInteger#

getInteger(missionKey: string, key: string): number

Returns 0 if the specified value's data is not found in the cache.

Parameters:#

NameType
missionKeystring
keystring

Returns: number

Defined in: handles/gamecache.ts:60


getNumber#

getNumber(missionKey: string, key: string): number

Returns 0 if the specified value's data is not found in the cache.

Parameters:#

NameType
missionKeystring
keystring

Returns: number

Defined in: handles/gamecache.ts:67


getString#

getString(missionKey: string, key: string): string

Returns "" if the specified value's data is not found in the cache.

Parameters:#

NameType
missionKeystring
keystring

Returns: string

Defined in: handles/gamecache.ts:74


hasBoolean#

hasBoolean(missionKey: string, key: string): boolean

Parameters:#

NameType
missionKeystring
keystring

Returns: boolean

Defined in: handles/gamecache.ts:78


hasInteger#

hasInteger(missionKey: string, key: string): boolean

Parameters:#

NameType
missionKeystring
keystring

Returns: boolean

Defined in: handles/gamecache.ts:82


hasNumber#

hasNumber(missionKey: string, key: string): boolean

Parameters:#

NameType
missionKeystring
keystring

Returns: boolean

Defined in: handles/gamecache.ts:86


hasString#

hasString(missionKey: string, key: string): boolean

Parameters:#

NameType
missionKeystring
keystring

Returns: boolean

Defined in: handles/gamecache.ts:90


restoreUnit#

restoreUnit(missionKey: string, key: string, forWhichPlayer: MapPlayer, x: number, y: number, face: number): unit

Returns null if the specified value's data is not found in the cache.

Parameters:#

NameType
missionKeystring
keystring
forWhichPlayerMapPlayer
xnumber
ynumber
facenumber

Returns: unit

Defined in: handles/gamecache.ts:97


save#

save(): boolean

Returns: boolean

Defined in: handles/gamecache.ts:101


store#

store(missionKey: string, key: string, value: string | number | boolean | unit): void

Parameters:#

NameType
missionKeystring
keystring
valuestring | number | boolean | unit

Returns: void

Defined in: handles/gamecache.ts:105


syncBoolean#

syncBoolean(missionKey: string, key: string): void

Parameters:#

NameType
missionKeystring
keystring

Returns: void

Defined in: handles/gamecache.ts:117


syncInteger#

syncInteger(missionKey: string, key: string): void

Parameters:#

NameType
missionKeystring
keystring

Returns: void

Defined in: handles/gamecache.ts:121


syncNumber#

syncNumber(missionKey: string, key: string): void

Parameters:#

NameType
missionKeystring
keystring

Returns: void

Defined in: handles/gamecache.ts:125


syncString#

syncString(missionKey: string, key: string): void

Parameters:#

NameType
missionKeystring
keystring

Returns: void

Defined in: handles/gamecache.ts:129


syncUnit#

syncUnit(missionKey: string, key: string): void

Parameters:#

NameType
missionKeystring
keystring

Returns: void

Defined in: handles/gamecache.ts:133


fromHandle#

static fromHandle(handle: gamecache): GameCache

Parameters:#

NameType
handlegamecache

Returns: GameCache

Defined in: handles/gamecache.ts:137


reloadFromDisk#

static reloadFromDisk(): boolean

Returns: boolean

Defined in: handles/gamecache.ts:141