Skip to content

Latest commit

 

History

History

docs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

foxhole-warapi

foxhole-warapi

Table of contents

Enumerations

Interfaces

Type Aliases

Functions

Type Aliases

MapMarkerType

Ƭ MapMarkerType: "Major" | "Minor"

Defined in

types.ts:99


TeamId

Ƭ TeamId: "WARDENS" | "COLONIALS" | "NONE"

Defined in

types.ts:1

Functions

combineDynamicWithStaticData

combineDynamicWithStaticData(mapItems, mapTextItems): CombinedMapData[]

Matches each MapItem with the closest MapTextItem.

Parameters

Name Type
mapItems MapItem[]
mapTextItems MapTextItem[]

Returns

CombinedMapData[]

Defined in

war-api.ts:24


determineEventStatusType

determineEventStatusType(data): Event | undefined

Parameters

Name Type
data DiffedMapData

Returns

Event | undefined

Defined in

war-api.ts:74


diffCombinedMapData

diffCombinedMapData(data1, data2): DiffedMapData[]

Returns a list of CombinedMapData where the map flags or team id from the two arguments is different. Assumes that the order of the two lists is the same.

Parameters

Name Type
data1 CombinedMapData[]
data2 CombinedMapData[]

Returns

DiffedMapData[]

Defined in

war-api.ts:60


findNearestTextItem

findNearestTextItem(mapItem, mapTextItems): MapTextItem

Given a MapItem and a list of MapTextItems, finds the nearest MapTextItem. This is useful for determining which town a MapItem belongs to.

Parameters

Name Type
mapItem MapItem
mapTextItems MapTextItem[]

Returns

MapTextItem

Defined in

war-api.ts:15


getMapFlags

getMapFlags(flags): MapFlags[]

Returns a list of each MapFlag that the flags contain.

Parameters

Name Type
flags number

Returns

MapFlags[]

Defined in

war-api.ts:50


hasMapFlag

hasMapFlag(flags, flag): boolean

Returns true if the flags number contains the given MapFlag.

Parameters

Name Type
flags number
flag MapFlags

Returns

boolean

Defined in

war-api.ts:42