Skip to content

five-on-it / packages/protocol/src/messages / encodeDebugCommand

Function: encodeDebugCommand() ​

encodeDebugCommand(command): string

Defined in: packages/protocol/src/messages.ts:558

Serializes a debug command as a text frame.

Parameters ​

command ​

ahead? ​

number = ...

carClass? ​

number = ...

climate? ​

"none" | "temperate" | "meadow" | "forest" | "alpine" | "farmland" | "steppe" | "desert" | "autumn" | "coast" = ...

cmd ​

"police" | "clock" | "give" | "invincible" | "maxHealth" | "chaos" | "weather" | "budget" | "tech" | "spawnChaser" | "clearChasers" | "teleport" | "wanted" | "pedestrian" | "carHealth" | "rtcDrop" | "fit" | "ignite" = ...

crew? ​

number = ...

event? ​

"riot" | "bridge" | "blackout" | "petrol" = ...

chaos: a chaos event set off now where the player stands (@foi/ai's chaos.ts, the simulation's bascules, substations and pumps): a riot round them, the nearest bridge raised, the nearest district blacked out, the nearest pumps lit.

health? ​

number = ...

heat? ​

number = ...

hours? ​

number = ...

intensity? ​

number = ...

items? ​

object[] = ...

give: items put in the player's inventory (the room's item ids, how many of each).

kind? ​

"clear" | "overcast" | "rain" | "storm" | "fog" | "snow" = ...

minutes? ​

number = ...

mode? ​

"foot" | "car" = ...

mods? ​

("smoke" | "runFlats" | "caltrops" | "oil" | "bullBar" | "plating" | "hardened" | "nitro")[] = ...

fit: the upgrades fitted to the player's car (the simulation's MOD_SHOP ids).

night? ​

boolean = ...

on? ​

boolean = ...

pace? ​

number = ...

points? ​

number = ...

budget: the room's public safety budget set outright (@foi/ai's BUDGET, points; none runs it dry).

profile? ​

string = ...

road? ​

string = ...

stars? ​

number = ...

tune? ​

Record<string, number | boolean> = ...

type ​

"debug" = ...

unit? ​

"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).

Returns ​

string