Files
smack-a-brother/web/web_pre.js
T
shweet e9d8cac926 Weapons built from traits, fashion, Hourglass, About tab, and Ithaca
- Every attack is now assembled from traits on its definition instead
  of per-weapon code: an anchor and path (thrusts, out-and-back, arcs),
  shared flight physics (gravity, drag, acceleration, homing, and one
  wall response: end, burst, stick, crawl, bounce, stop, pass, return,
  latch), and flags like bouncy, drifting, tethered, orbiting, instant
  and arming. Melee are projectiles too.
- Shots have a lifetime and a fade (when damage bottoms out). Range is
  speed times lifetime. Ricochets and the Vacuum wind lifetime back.
- The Vacuum pulls anyone's shots, and its airblast flips them out
  along the aim, claiming enemies' (fading into your colour).
- New trinket: Hourglass, longer projectile lifetime and range. Ropes
  and chains lengthen with it and the Accelerator.
- Fashion: 23 items worn on the head, face or torso, chosen in Profile.
- Flamethrower flames hit continuously, the whip coils and sweeps,
  bouncing shots roll over ramps, and Ricochet relights grenade fuses.
- Profile tab, colour tooltips, option hints on every setting, an
  About tab with credits and links, and the Ithaca font.
- Loadouts lock once readied, tomatoes clear with the match, and the
  round-over pause is 4 seconds.
- CC0 license. Tools and CLAUDE.md are no longer tracked, and the web
  shell moves to web/.
2026-11-10 15:27:12 -05:00

10 lines
443 B
JavaScript

// The browser build: keeps the prefs folder (/libsdl, where SDL puts it on the web) in IndexedDB, loading it before
// the game starts so saved settings are there when it reads them. The game writes it back after every save.
Module.preRun = Module.preRun || [];
Module.preRun.push(() => {
FS.mkdir("/libsdl");
FS.mount(IDBFS, {}, "/libsdl");
addRunDependency("prefs");
FS.syncfs(true, () => removeRunDependency("prefs"));
});