Skip to content

five-on-it / packages/sim/src/gear

packages/sim/src/gear ​

What a character wears and takes (GAME_DESIGN §7.4): body armour, the gas mask, the juggernaut suit and the adrenaline shot, each an item used from the inventory.

  • Armour (Character.armour, 0 to ARMOUR.max) is spent before health: all of a bullet's or a blow's damage until it runs out, half of a blast's, none of a fall's, a gas's or a fire's (armourShare; damage.ts' hurt is the one place it happens). A vest adds to it; more than ARMOUR.heavy slows its wearer.
  • The gas mask is worn or not, a toggle of the item, as long as the item is carried: no tear gas reaches its wearer (zones.ts), and the player hears the world dulled.
  • The juggernaut suit is the most armour, a gas mask of its own, and its wearer is never knocked down (a car, a punch, a flashbang, a dart) until it dies; it walks at SUIT.pace. It comes off when its armour is gone.
  • The adrenaline shot gives back some health and, for ADRENALINE.seconds, a faster run and no stun (status.ts) nor gas's blur and sway.

gearPace is what all of it and the weapon in hand (a minigun's weight) leave of a character's pace, zones.ts' zonePace what the foam underfoot leaves; the character system moves by both, the same on the server and in a client's prediction (the snapshots carry the armour, the suit and the rush). The timers run in gearSystem, once a tick, hashed with the rest.

Interfaces ​

Type Aliases ​

Variables ​

Functions ​