@korial29/tiny-fps 0.229.0 → 0.229.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{room-mXBznA8G.js → room-DUpusYYH.js} +62 -1
- package/dist/index.js +5 -5
- package/dist/local.js +1 -1
- package/dist/room.js +1 -1
- package/dist/server.js +1 -1
- package/dist/types/client/smoke.d.ts +6 -8
- package/dist/types/shared/beach.d.ts +11 -0
- package/dist/types/shared/constants.d.ts +5 -0
- package/dist/types/shared/room.d.ts +2 -0
- package/dist/types/shared/world.d.ts +2 -0
- package/package.json +1 -1
|
@@ -398,6 +398,11 @@ var [RING_COST, RING_R, RING_H] = [
|
|
|
398
398
|
4,
|
|
399
399
|
2.5
|
|
400
400
|
];
|
|
401
|
+
/**
|
|
402
|
+
* Landfall's fires (WorldDef.fires, the user, 2026-11-25): a body in the flames takes FIRE_HP at
|
|
403
|
+
* once, then again each FIRE_TICKS while it stays in them. Nobody's hit, as a hard landing.
|
|
404
|
+
*/
|
|
405
|
+
var [FIRE_HP, FIRE_TICKS] = [1, 20];
|
|
401
406
|
var RIFLE_DRIFT = .012;
|
|
402
407
|
var RULES = {
|
|
403
408
|
maxPlayers: 16,
|
|
@@ -5397,6 +5402,46 @@ var ENGINES = [[
|
|
|
5397
5402
|
2.5,
|
|
5398
5403
|
9
|
|
5399
5404
|
]];
|
|
5405
|
+
/**
|
|
5406
|
+
* Where it burns, both halves: the foot of each column of smoke (x, y, z), how high it rises, and
|
|
5407
|
+
* its radius at the foot and at the top (client/smoke.ts draws them). Their flames burn (FLAME), so
|
|
5408
|
+
* none stands on a way across (the user, 2026-11-25): on the sand east of the rear of each nacelle,
|
|
5409
|
+
* clear of its roof and of the way through it; on the south-west corner of each engine in the
|
|
5410
|
+
* lagoon, clear of the jumps over its north half (routes.ts LAGOON); and high against each of the
|
|
5411
|
+
* hull's four broken ends, thinner, over the heads of those who cross the gaps.
|
|
5412
|
+
*/
|
|
5413
|
+
var FIRES = [...[[
|
|
5414
|
+
ENGINES[0][0] + 4,
|
|
5415
|
+
1.7,
|
|
5416
|
+
ENGINES[0][1] + 3
|
|
5417
|
+
], [
|
|
5418
|
+
ENGINES[1][0] - 1.5,
|
|
5419
|
+
1.3,
|
|
5420
|
+
ENGINES[1][1] + 3.5
|
|
5421
|
+
]].flatMap(([x, y, z]) => [[
|
|
5422
|
+
x,
|
|
5423
|
+
y,
|
|
5424
|
+
z,
|
|
5425
|
+
42,
|
|
5426
|
+
1.3,
|
|
5427
|
+
7
|
|
5428
|
+
], [
|
|
5429
|
+
x,
|
|
5430
|
+
y,
|
|
5431
|
+
200 - z,
|
|
5432
|
+
42,
|
|
5433
|
+
1.3,
|
|
5434
|
+
7
|
|
5435
|
+
]]), ...HULL.sections.flatMap(([x0, x1], n) => [n && x0 - .6, n < 2 && x1 + .6].filter((x) => x).map((x) => [
|
|
5436
|
+
+x,
|
|
5437
|
+
HULL.axis[n] + 3,
|
|
5438
|
+
100,
|
|
5439
|
+
28,
|
|
5440
|
+
.9,
|
|
5441
|
+
4
|
|
5442
|
+
]))];
|
|
5443
|
+
/** Metres the flames at a fire's foot reach out from its middle and up from it: smoke.ts stands three balls of 0.55 m within 0.6 of the foot's radius, up to 2.3 m. */
|
|
5444
|
+
var FLAME = [.55, 2.3];
|
|
5400
5445
|
/** Red's camp: the escape pod its flag stands by (x, z, radius). */
|
|
5401
5446
|
var POD = [
|
|
5402
5447
|
60,
|
|
@@ -5744,7 +5789,7 @@ var ENGINE = (() => {
|
|
|
5744
5789
|
var FLOATS$2 = [note(mine, "float", box(16, -1.6, 116, 22, .35, 119, METAL)), note(mine, "float", box(10, -.2, 113, 13, .5, 116, METAL))];
|
|
5745
5790
|
/** The camp: the pod, the flag's step by it, a crate under each rack with a tarpaulin over it. */
|
|
5746
5791
|
var POD_BOX = note(mine, "pod", box(POD[0] - 3, .75, POD[1] - 3, POD[0] + 3, 4.25, POD[1] + 3, METAL));
|
|
5747
|
-
var DAIS = note(mine, "dais", box(POD[0] - 2, .75, POD[1] - 10, POD[0] + 2, 1.
|
|
5792
|
+
var DAIS = note(mine, "dais", box(POD[0] - 2, .75, POD[1] - 10, POD[0] + 2, 1.3, POD[1] - 6, PAINT, RED));
|
|
5748
5793
|
var crate = (x, z, h = .4, tint) => lay("crate", x - 1.5, z - 1.5, x + 1.5, z + 1.5, h, WOOD, tint);
|
|
5749
5794
|
/** A tarpaulin on four poles, wider than deep: no pole on a diagonal of the crate under it, where it would hide the rack from a spawn. */
|
|
5750
5795
|
var shelter = (x, z) => [box(x - 2.6, 3.85, z - 2.1, x + 2.6, 4, z + 2.1, PAINT, RED), ...[-1, 1].flatMap((a) => [-1, 1].map((b) => box(x + 2.5 * a - .1, .75, z + 2 * b - .1, x + 2.5 * a + .1, 3.85, z + 2 * b + .1, STEEL)))].map((b) => note(mine, "shelter", b));
|
|
@@ -5959,6 +6004,7 @@ var SHOULDER = [
|
|
|
5959
6004
|
103.7
|
|
5960
6005
|
];
|
|
5961
6006
|
var BEACH = {
|
|
6007
|
+
armor: true,
|
|
5962
6008
|
name: "Landfall",
|
|
5963
6009
|
tag: "Beach · wreck",
|
|
5964
6010
|
lore: "A ship came down across a Caribbean beach, its tail in the lagoon and its nose in the trees. The survivors camp at either end of the sand and fight over the wreck between them.",
|
|
@@ -6015,6 +6061,13 @@ var BEACH = {
|
|
|
6015
6061
|
MID$1
|
|
6016
6062
|
]),
|
|
6017
6063
|
floor: DEPTH,
|
|
6064
|
+
fires: FIRES.map(([x, y, z, , r]) => [
|
|
6065
|
+
x,
|
|
6066
|
+
y,
|
|
6067
|
+
z,
|
|
6068
|
+
.6 * r + FLAME[0],
|
|
6069
|
+
FLAME[1]
|
|
6070
|
+
]),
|
|
6018
6071
|
relief: {
|
|
6019
6072
|
hole: [
|
|
6020
6073
|
0,
|
|
@@ -10697,6 +10750,7 @@ var Room = class {
|
|
|
10697
10750
|
}
|
|
10698
10751
|
p.burn = slow ? (p.burn ?? 0) + 1 : 0;
|
|
10699
10752
|
if (slow && !(p.burn % 60)) this.fry(p);
|
|
10753
|
+
this.scorch(p);
|
|
10700
10754
|
this.duel(p);
|
|
10701
10755
|
p.ack = input.seq;
|
|
10702
10756
|
this.seats();
|
|
@@ -11478,6 +11532,13 @@ var Room = class {
|
|
|
11478
11532
|
if (hit) me.hits = me.hits + 1 & 255;
|
|
11479
11533
|
}
|
|
11480
11534
|
/** 1 hp of the bolt's drain to `foe`, as his railer deals it; if it puts him down he is disintegrated (`fried`). */
|
|
11535
|
+
/** The map's flames (WorldDef.fires) burn a body in them: FIRE_HP on the first tick, then each FIRE_TICKS, nobody's hit. */
|
|
11536
|
+
scorch(p) {
|
|
11537
|
+
const { x, y, z, hp } = p.state;
|
|
11538
|
+
const fires = this.world.def.fires;
|
|
11539
|
+
p.scorch = hp > 0 && fires?.some(([fx, fy, fz, r, h]) => Math.hypot(x - fx, z - fz) < r + .4 && y < fy + h && y + 1.8 > fy) ? (p.scorch ?? 0) + 1 : 0;
|
|
11540
|
+
if (p.scorch % FIRE_TICKS === 1) this.harm(p, FIRE_HP);
|
|
11541
|
+
}
|
|
11481
11542
|
fry(foe) {
|
|
11482
11543
|
const r = foe.railer?.state ?? foe.state;
|
|
11483
11544
|
foe.state.fried = this.shot(foe, 1, foe.railer, foe.state.x - r.x, foe.state.z - r.z, FRAG.RAIL);
|