five-on-it / packages/protocol/src/messages / parseDebugCommand
Function: parseDebugCommand()
parseDebugCommand(
text): {ahead?:number;carClass?:number;climate?:"none"|"temperate"|"meadow"|"forest"|"alpine"|"farmland"|"steppe"|"desert"|"autumn"|"coast";cmd:"police"|"clock"|"invincible"|"maxHealth"|"weather"|"spawnChaser"|"clearChasers"|"teleport"|"wanted"|"pedestrian"|"carHealth"|"rtcDrop"|"fit"|"ignite";crew?:number;health?:number;heat?:number;hours?:number;intensity?:number;kind?:"clear"|"overcast"|"rain"|"storm"|"fog"|"snow";minutes?:number;mode?:"foot"|"car";mods?: ("runFlats"|"caltrops"|"oil"|"bullBar"|"plating"|"nitro")[];night?:boolean;on?:boolean;pace?:number;profile?:string;road?:string;stars?:number;tune?:Record<string,number|boolean>;type:"debug";unit?:"boat"|"apc"|"dart"|"grappler"|"helicopter"|"sniper"|"cannon"|"bike"; } |undefined
Defined in: packages/protocol/src/messages.ts:526
Parses a text frame as a debug command; undefined when it is not one.
Parameters
text
string
Returns
Type Literal
{ ahead?: number; carClass?: number; climate?: "none" | "temperate" | "meadow" | "forest" | "alpine" | "farmland" | "steppe" | "desert" | "autumn" | "coast"; cmd: "police" | "clock" | "invincible" | "maxHealth" | "weather" | "spawnChaser" | "clearChasers" | "teleport" | "wanted" | "pedestrian" | "carHealth" | "rtcDrop" | "fit" | "ignite"; crew?: number; health?: number; heat?: number; hours?: number; intensity?: number; kind?: "clear" | "overcast" | "rain" | "storm" | "fog" | "snow"; minutes?: number; mode?: "foot" | "car"; mods?: ("runFlats" | "caltrops" | "oil" | "bullBar" | "plating" | "nitro")[]; night?: boolean; on?: boolean; pace?: number; profile?: string; road?: string; stars?: number; tune?: Record<string, number | boolean>; type: "debug"; unit?: "boat" | "apc" | "dart" | "grappler" | "helicopter" | "sniper" | "cannon" | "bike"; }
ahead?
optionalahead?:number
carClass?
optionalcarClass?:number
climate?
optionalclimate?:"none"|"temperate"|"meadow"|"forest"|"alpine"|"farmland"|"steppe"|"desert"|"autumn"|"coast"
cmd
cmd:
"police"|"clock"|"invincible"|"maxHealth"|"weather"|"spawnChaser"|"clearChasers"|"teleport"|"wanted"|"pedestrian"|"carHealth"|"rtcDrop"|"fit"|"ignite"
crew?
optionalcrew?:number
health?
optionalhealth?:number
heat?
optionalheat?:number
hours?
optionalhours?:number
intensity?
optionalintensity?:number
kind?
optionalkind?:"clear"|"overcast"|"rain"|"storm"|"fog"|"snow"
minutes?
optionalminutes?:number
mode?
optionalmode?:"foot"|"car"
mods?
optionalmods?: ("runFlats"|"caltrops"|"oil"|"bullBar"|"plating"|"nitro")[]
fit: the upgrades fitted to the player's car (the simulation's MOD_SHOP ids).
night?
optionalnight?:boolean
on?
optionalon?:boolean
pace?
optionalpace?:number
profile?
optionalprofile?:string
road?
optionalroad?:string
stars?
optionalstars?:number
tune?
optionaltune?:Record<string,number|boolean>
type
type:
"debug"
unit?
optionalunit?:"boat"|"apc"|"dart"|"grappler"|"helicopter"|"sniper"|"cannon"|"bike"
police: a unit of the heavy response sent after the player now (@foi/ai's HEAVY_UNITS), at stars first when given; on, alone (the police send them nothing else).
undefined