Class: GameCache#
Hierarchy#
Handle<gamecache>
↳ GameCache
Constructors#
constructor#
new GameCache(campaignFile: string): GameCachenote You cannot create more than 255 gamecaches
Parameters:#
| Name | Type |
|---|---|
campaignFile | string |
Returns: GameCache
Defined in: handles/gamecache.ts:7
Properties#
filename#
• Readonly filename: string
Defined in: handles/gamecache.ts:7
handle#
• Readonly handle: gamecache
Defined in: handles/handle.ts:6
Accessors#
id#
id(): numberGet 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(): voidReturns: void
Defined in: handles/gamecache.ts:22
flushBoolean#
flushBoolean(missionKey: string, key: string): voidParameters:#
| Name | Type |
|---|---|
missionKey | string |
key | string |
Returns: void
Defined in: handles/gamecache.ts:26
flushInteger#
flushInteger(missionKey: string, key: string): voidParameters:#
| Name | Type |
|---|---|
missionKey | string |
key | string |
Returns: void
Defined in: handles/gamecache.ts:30
flushMission#
flushMission(missionKey: string): voidParameters:#
| Name | Type |
|---|---|
missionKey | string |
Returns: void
Defined in: handles/gamecache.ts:34
flushNumber#
flushNumber(missionKey: string, key: string): voidParameters:#
| Name | Type |
|---|---|
missionKey | string |
key | string |
Returns: void
Defined in: handles/gamecache.ts:38
flushString#
flushString(missionKey: string, key: string): voidParameters:#
| Name | Type |
|---|---|
missionKey | string |
key | string |
Returns: void
Defined in: handles/gamecache.ts:42
flushUnit#
flushUnit(missionKey: string, key: string): voidParameters:#
| Name | Type |
|---|---|
missionKey | string |
key | string |
Returns: void
Defined in: handles/gamecache.ts:46
getBoolean#
getBoolean(missionKey: string, key: string): booleanReturns false if the specified value's data is not found in the cache.
Parameters:#
| Name | Type |
|---|---|
missionKey | string |
key | string |
Returns: boolean
Defined in: handles/gamecache.ts:53
getInteger#
getInteger(missionKey: string, key: string): numberReturns 0 if the specified value's data is not found in the cache.
Parameters:#
| Name | Type |
|---|---|
missionKey | string |
key | string |
Returns: number
Defined in: handles/gamecache.ts:60
getNumber#
getNumber(missionKey: string, key: string): numberReturns 0 if the specified value's data is not found in the cache.
Parameters:#
| Name | Type |
|---|---|
missionKey | string |
key | string |
Returns: number
Defined in: handles/gamecache.ts:67
getString#
getString(missionKey: string, key: string): stringReturns "" if the specified value's data is not found in the cache.
Parameters:#
| Name | Type |
|---|---|
missionKey | string |
key | string |
Returns: string
Defined in: handles/gamecache.ts:74
hasBoolean#
hasBoolean(missionKey: string, key: string): booleanParameters:#
| Name | Type |
|---|---|
missionKey | string |
key | string |
Returns: boolean
Defined in: handles/gamecache.ts:78
hasInteger#
hasInteger(missionKey: string, key: string): booleanParameters:#
| Name | Type |
|---|---|
missionKey | string |
key | string |
Returns: boolean
Defined in: handles/gamecache.ts:82
hasNumber#
hasNumber(missionKey: string, key: string): booleanParameters:#
| Name | Type |
|---|---|
missionKey | string |
key | string |
Returns: boolean
Defined in: handles/gamecache.ts:86
hasString#
hasString(missionKey: string, key: string): booleanParameters:#
| Name | Type |
|---|---|
missionKey | string |
key | string |
Returns: boolean
Defined in: handles/gamecache.ts:90
restoreUnit#
restoreUnit(missionKey: string, key: string, forWhichPlayer: MapPlayer, x: number, y: number, face: number): unitReturns null if the specified value's data is not found in the cache.
Parameters:#
| Name | Type |
|---|---|
missionKey | string |
key | string |
forWhichPlayer | MapPlayer |
x | number |
y | number |
face | number |
Returns: unit
Defined in: handles/gamecache.ts:97
save#
save(): booleanReturns: boolean
Defined in: handles/gamecache.ts:101
store#
store(missionKey: string, key: string, value: string | number | boolean | unit): voidParameters:#
| Name | Type |
|---|---|
missionKey | string |
key | string |
value | string | number | boolean | unit |
Returns: void
Defined in: handles/gamecache.ts:105
syncBoolean#
syncBoolean(missionKey: string, key: string): voidParameters:#
| Name | Type |
|---|---|
missionKey | string |
key | string |
Returns: void
Defined in: handles/gamecache.ts:117
syncInteger#
syncInteger(missionKey: string, key: string): voidParameters:#
| Name | Type |
|---|---|
missionKey | string |
key | string |
Returns: void
Defined in: handles/gamecache.ts:121
syncNumber#
syncNumber(missionKey: string, key: string): voidParameters:#
| Name | Type |
|---|---|
missionKey | string |
key | string |
Returns: void
Defined in: handles/gamecache.ts:125
syncString#
syncString(missionKey: string, key: string): voidParameters:#
| Name | Type |
|---|---|
missionKey | string |
key | string |
Returns: void
Defined in: handles/gamecache.ts:129
syncUnit#
syncUnit(missionKey: string, key: string): voidParameters:#
| Name | Type |
|---|---|
missionKey | string |
key | string |
Returns: void
Defined in: handles/gamecache.ts:133
fromHandle#
static fromHandle(handle: gamecache): GameCacheParameters:#
| Name | Type |
|---|---|
handle | gamecache |
Returns: GameCache
Defined in: handles/gamecache.ts:137
reloadFromDisk#
static reloadFromDisk(): booleanReturns: boolean
Defined in: handles/gamecache.ts:141