@korial29/tiny-fps 0.229.2 → 0.230.1
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-DUpusYYH.js → room-DVyCaIW2.js} +556 -183
- 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/hulk.d.ts +18 -3
- package/dist/types/client/jungle.d.ts +3 -1
- package/dist/types/client/shore.d.ts +2 -0
- package/dist/types/shared/beach.d.ts +76 -29
- package/package.json +1 -1
|
@@ -4166,7 +4166,7 @@ var HOLLOW = [
|
|
|
4166
4166
|
* across and lands on its back.
|
|
4167
4167
|
*/
|
|
4168
4168
|
var MOUNDS = [48, 144];
|
|
4169
|
-
var [MOUND, RISE] = [3, 8];
|
|
4169
|
+
var [MOUND, RISE$1] = [3, 8];
|
|
4170
4170
|
/**
|
|
4171
4171
|
* Where the field stays flat at y 0, x0, z0, x1, z1 with z from the centre line: the landing pad,
|
|
4172
4172
|
* the dome and the spawns, the modules and tubes, the two rovers, the packs on the
|
|
@@ -4500,7 +4500,7 @@ var at$3 = (x, z) => {
|
|
|
4500
4500
|
h = m * Math.min(Math.max(4.8 * noise(x / 15, z / 15, 21) - .9, 0) + Math.max(3 * noise(x / 31, z / 31, 23) - .6, 0), 2.6);
|
|
4501
4501
|
const s = sm$1((10 - far$1(x - HOLLOW[0], z - (HOLLOW[1] - 140))) / 8);
|
|
4502
4502
|
h = h * (1 - s) - HOLLOW[2] * s;
|
|
4503
|
-
for (const cx of MOUNDS) h += MOUND * c1$1((8 + RISE - z) / RISE) * across(cx, x);
|
|
4503
|
+
for (const cx of MOUNDS) h += MOUND * c1$1((8 + RISE$1 - z) / RISE$1) * across(cx, x);
|
|
4504
4504
|
h = z < 8 ? 0 : h;
|
|
4505
4505
|
}
|
|
4506
4506
|
h = (out < 0 ? h : h * (1 - dug[1])) + dug[0] + rough(x, z, out) * (1 - dug[1]) * (1 - sm$1(t));
|
|
@@ -4988,7 +4988,7 @@ var half$1 = [
|
|
|
4988
4988
|
].map((a) => [a, a + (a === -4 ? 8 : 2)]).map(([a, b]) => [
|
|
4989
4989
|
x + a,
|
|
4990
4990
|
x + b,
|
|
4991
|
-
MOUND * Math.min(across(x, x + a), across(x, x + b)) * (1 - .5 / RISE) - .12
|
|
4991
|
+
MOUND * Math.min(across(x, x + a), across(x, x + b)) * (1 - .5 / RISE$1) - .12
|
|
4992
4992
|
]).filter((r) => r[2] > .3).map(([a, b, y]) => box$2(a, 0, 148, b, y, 148.5, STONE$1)))
|
|
4993
4993
|
].map((b) => ({
|
|
4994
4994
|
...b,
|
|
@@ -5330,9 +5330,10 @@ var EDGE$1 = {
|
|
|
5330
5330
|
/**
|
|
5331
5331
|
* The wreck, a hull along x on the centre line, broken in three: each section's x0 and x1. The
|
|
5332
5332
|
* tail is in the water, the middle on the sand, the nose in the trees; the two gaps are crossed on
|
|
5333
|
-
* foot. `r` is the hull's
|
|
5334
|
-
* 2 r - sunk over the sand. `axis` is the height of each section's axis: each lies level,
|
|
5335
|
-
* the ground it came to rest on.
|
|
5333
|
+
* foot. `r` is the hull's half width at the belt and `sunk` how deep its axis sits under r, so its
|
|
5334
|
+
* back is at 2 r - sunk over the sand. `axis` is the height of each section's axis: each lies level,
|
|
5335
|
+
* 2 m in the ground it came to rest on. The back is flat for `spine` either side of the line and
|
|
5336
|
+
* the skin is `skin` thick: the hull is hollow.
|
|
5336
5337
|
*/
|
|
5337
5338
|
var HULL = {
|
|
5338
5339
|
r: 7,
|
|
@@ -5346,102 +5347,353 @@ var HULL = {
|
|
|
5346
5347
|
4,
|
|
5347
5348
|
6.25,
|
|
5348
5349
|
7.5
|
|
5349
|
-
]
|
|
5350
|
+
],
|
|
5351
|
+
spine: 2.5,
|
|
5352
|
+
skin: .85
|
|
5350
5353
|
};
|
|
5351
5354
|
/**
|
|
5352
|
-
* The hull's
|
|
5353
|
-
*
|
|
5354
|
-
*
|
|
5355
|
+
* The hull's section: its half width at the height h over a section's axis. Round, 7 m at the
|
|
5356
|
+
* belt, a keel 7 m under it and a flat back 7 m over it. Only + - * / and Math.sqrt: the host and
|
|
5357
|
+
* the clients build the same boxes from it.
|
|
5355
5358
|
*/
|
|
5356
|
-
var
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5359
|
+
var section$1 = (h) => {
|
|
5360
|
+
const q = Math.max(1 - h * h / (HULL.r * HULL.r), 0);
|
|
5361
|
+
return Math.max(HULL.r * Math.sqrt(Math.sqrt(q * Math.sqrt(q))), h > 0 ? HULL.spine : 0);
|
|
5362
|
+
};
|
|
5363
|
+
/**
|
|
5364
|
+
* The heights over the axis the skin is cut at, above a section's floor: a box of skin on each
|
|
5365
|
+
* flank from one to the next, as wide as the section half way up it. Where a line is one of DECKS
|
|
5366
|
+
* the row under it is a floor across the hull instead.
|
|
5367
|
+
*/
|
|
5368
|
+
var LINES = [
|
|
5369
|
+
-4,
|
|
5370
|
+
-2.05,
|
|
5371
|
+
-1.75,
|
|
5372
|
+
0,
|
|
5373
|
+
1.95,
|
|
5374
|
+
2.25,
|
|
5375
|
+
3.6,
|
|
5376
|
+
5,
|
|
5377
|
+
5.5,
|
|
5378
|
+
6,
|
|
5379
|
+
6.5,
|
|
5380
|
+
7
|
|
5381
|
+
];
|
|
5382
|
+
/** The floors over the axis: the lower deck, the upper one (the middle section's gallery) and the back. */
|
|
5383
|
+
var DECKS = [
|
|
5384
|
+
-1.75,
|
|
5385
|
+
2.25,
|
|
5386
|
+
HULL.r
|
|
5387
|
+
];
|
|
5388
|
+
LINES.map((h) => [h, section$1(h)]);
|
|
5389
|
+
/**
|
|
5390
|
+
* The three sections, tail first. `cut`: the lengths it is built in (x0, x1, the share of the
|
|
5391
|
+
* section's width there, and a skin so thick that it is solid: the stern). `floor`: the lowest
|
|
5392
|
+
* floor over the axis, solid down to the keel (the tail's is awash, the middle's is the hold).
|
|
5393
|
+
* `holes`: in the floors, each the index in DECKS, x0, x1 and the half width (9: from skin to
|
|
5394
|
+
* skin). `tears`: in both flanks, x0, x1 and the heights over the axis, from one of LINES to
|
|
5395
|
+
* another. `fair`: the fairing along each flank from the belt up to the upper deck, x0, x1 and how
|
|
5396
|
+
* far out past r; its top is a ledge. `crates`: a crate under the edge of a hole, to climb to the
|
|
5397
|
+
* floor above: its x0 and the index of the deck it stands on (-1: the floor). It is 1 m high on
|
|
5398
|
+
* the floor, 1.4 m on the lower deck and 2 m on the upper one: the hands reach the edge from it
|
|
5399
|
+
* before the head is under the floor above, and the hanging body clears it.
|
|
5400
|
+
*/
|
|
5401
|
+
var SHIP$1 = [
|
|
5402
|
+
{
|
|
5403
|
+
cut: [
|
|
5404
|
+
[
|
|
5405
|
+
6,
|
|
5406
|
+
7,
|
|
5407
|
+
.7,
|
|
5408
|
+
9
|
|
5409
|
+
],
|
|
5410
|
+
[
|
|
5411
|
+
7,
|
|
5412
|
+
13,
|
|
5413
|
+
.76
|
|
5414
|
+
],
|
|
5415
|
+
[
|
|
5416
|
+
13,
|
|
5417
|
+
20,
|
|
5418
|
+
.9
|
|
5419
|
+
],
|
|
5420
|
+
[
|
|
5421
|
+
20,
|
|
5422
|
+
36,
|
|
5423
|
+
1
|
|
5424
|
+
]
|
|
5425
|
+
],
|
|
5426
|
+
floor: -4.75,
|
|
5427
|
+
holes: [
|
|
5428
|
+
[
|
|
5429
|
+
0,
|
|
5430
|
+
14,
|
|
5431
|
+
20,
|
|
5432
|
+
3
|
|
5433
|
+
],
|
|
5434
|
+
[
|
|
5435
|
+
1,
|
|
5436
|
+
24,
|
|
5437
|
+
29,
|
|
5438
|
+
9
|
|
5439
|
+
],
|
|
5440
|
+
[
|
|
5441
|
+
2,
|
|
5442
|
+
13,
|
|
5443
|
+
18.5,
|
|
5444
|
+
2.3
|
|
5445
|
+
]
|
|
5446
|
+
],
|
|
5447
|
+
tears: [[
|
|
5448
|
+
21,
|
|
5449
|
+
30,
|
|
5450
|
+
-1.75,
|
|
5451
|
+
1.95
|
|
5452
|
+
], [
|
|
5453
|
+
31,
|
|
5454
|
+
36,
|
|
5455
|
+
2.25,
|
|
5456
|
+
5
|
|
5457
|
+
]],
|
|
5458
|
+
fair: [[
|
|
5459
|
+
30,
|
|
5460
|
+
36,
|
|
5461
|
+
3
|
|
5462
|
+
]],
|
|
5463
|
+
crates: [
|
|
5464
|
+
[18.3, -1],
|
|
5465
|
+
[24.2, 0],
|
|
5466
|
+
[16.8, 1]
|
|
5467
|
+
]
|
|
5468
|
+
},
|
|
5469
|
+
{
|
|
5470
|
+
cut: [[
|
|
5471
|
+
44,
|
|
5472
|
+
74,
|
|
5473
|
+
1
|
|
5474
|
+
]],
|
|
5475
|
+
floor: -5,
|
|
5476
|
+
holes: [
|
|
5477
|
+
[
|
|
5478
|
+
0,
|
|
5479
|
+
51.5,
|
|
5480
|
+
56,
|
|
5481
|
+
3.2
|
|
5482
|
+
],
|
|
5483
|
+
[
|
|
5484
|
+
0,
|
|
5485
|
+
67,
|
|
5486
|
+
70.5,
|
|
5487
|
+
9
|
|
5488
|
+
],
|
|
5489
|
+
[
|
|
5490
|
+
1,
|
|
5491
|
+
44,
|
|
5492
|
+
48,
|
|
5493
|
+
9
|
|
5494
|
+
],
|
|
5495
|
+
[
|
|
5496
|
+
1,
|
|
5497
|
+
60.5,
|
|
5498
|
+
65.5,
|
|
5499
|
+
3
|
|
5500
|
+
],
|
|
5501
|
+
[
|
|
5502
|
+
2,
|
|
5503
|
+
44,
|
|
5504
|
+
47,
|
|
5505
|
+
9
|
|
5506
|
+
],
|
|
5507
|
+
[
|
|
5508
|
+
2,
|
|
5509
|
+
53,
|
|
5510
|
+
58,
|
|
5511
|
+
2.2
|
|
5512
|
+
]
|
|
5513
|
+
],
|
|
5514
|
+
tears: [
|
|
5515
|
+
[
|
|
5516
|
+
57.5,
|
|
5517
|
+
60.5,
|
|
5518
|
+
-5,
|
|
5519
|
+
-2.05
|
|
5520
|
+
],
|
|
5521
|
+
[
|
|
5522
|
+
47.5,
|
|
5523
|
+
55,
|
|
5524
|
+
-1.75,
|
|
5525
|
+
1.95
|
|
5526
|
+
],
|
|
5527
|
+
[
|
|
5528
|
+
64,
|
|
5529
|
+
71,
|
|
5530
|
+
2.25,
|
|
5531
|
+
5
|
|
5532
|
+
]
|
|
5533
|
+
],
|
|
5534
|
+
fair: [
|
|
5535
|
+
[
|
|
5536
|
+
44,
|
|
5537
|
+
47.5,
|
|
5538
|
+
3.2
|
|
5539
|
+
],
|
|
5540
|
+
[
|
|
5541
|
+
55,
|
|
5542
|
+
71,
|
|
5543
|
+
4.4
|
|
5544
|
+
],
|
|
5545
|
+
[
|
|
5546
|
+
71,
|
|
5547
|
+
74,
|
|
5548
|
+
3
|
|
5549
|
+
]
|
|
5550
|
+
],
|
|
5551
|
+
crates: [
|
|
5552
|
+
[54.3, -1],
|
|
5553
|
+
[60.7, 0],
|
|
5554
|
+
[56.3, 1]
|
|
5555
|
+
]
|
|
5556
|
+
},
|
|
5557
|
+
{
|
|
5558
|
+
cut: [[
|
|
5559
|
+
82,
|
|
5560
|
+
90,
|
|
5561
|
+
1
|
|
5562
|
+
], [
|
|
5563
|
+
90,
|
|
5564
|
+
97,
|
|
5565
|
+
.85
|
|
5566
|
+
]],
|
|
5567
|
+
floor: -5,
|
|
5568
|
+
holes: [
|
|
5569
|
+
[
|
|
5570
|
+
0,
|
|
5571
|
+
86.5,
|
|
5572
|
+
90,
|
|
5573
|
+
3
|
|
5574
|
+
],
|
|
5575
|
+
[
|
|
5576
|
+
1,
|
|
5577
|
+
82,
|
|
5578
|
+
85,
|
|
5579
|
+
9
|
|
5580
|
+
],
|
|
5581
|
+
[
|
|
5582
|
+
2,
|
|
5583
|
+
87.5,
|
|
5584
|
+
91.5,
|
|
5585
|
+
2
|
|
5586
|
+
]
|
|
5587
|
+
],
|
|
5588
|
+
tears: [[
|
|
5589
|
+
84.5,
|
|
5590
|
+
91,
|
|
5591
|
+
-1.75,
|
|
5592
|
+
1.95
|
|
5593
|
+
]],
|
|
5594
|
+
fair: [[
|
|
5595
|
+
82,
|
|
5596
|
+
84.5,
|
|
5597
|
+
2.7
|
|
5598
|
+
], [
|
|
5599
|
+
91,
|
|
5600
|
+
95,
|
|
5601
|
+
1.5
|
|
5602
|
+
]],
|
|
5603
|
+
crates: [
|
|
5604
|
+
[88.3, -1],
|
|
5605
|
+
[83.3, 0],
|
|
5606
|
+
[87.7, 1]
|
|
5607
|
+
]
|
|
5608
|
+
}
|
|
5362
5609
|
];
|
|
5363
|
-
/** The middle section's hold: its floor and ceiling, the half width inside,
|
|
5610
|
+
/** The middle section's hold: its floor and ceiling, the half width inside, its ends, the doors' x0 and x1 and their height. No bulkhead is left in it. */
|
|
5364
5611
|
var HOLD = {
|
|
5365
|
-
floor: HULL.axis[1]
|
|
5366
|
-
ceil: HULL.axis[1]
|
|
5367
|
-
half: 4.
|
|
5368
|
-
x: [
|
|
5369
|
-
door: [
|
|
5370
|
-
lintel:
|
|
5371
|
-
|
|
5372
|
-
walls: [[54.5, 55], [63, 63.5]],
|
|
5612
|
+
floor: HULL.axis[1] + SHIP$1[1].floor,
|
|
5613
|
+
ceil: HULL.axis[1] + LINES[1],
|
|
5614
|
+
half: 4.525,
|
|
5615
|
+
x: HULL.sections[1],
|
|
5616
|
+
door: SHIP$1[1].tears[0],
|
|
5617
|
+
lintel: LINES[1] - SHIP$1[1].floor,
|
|
5618
|
+
walls: [],
|
|
5373
5619
|
way: 2.4
|
|
5374
5620
|
};
|
|
5375
5621
|
/**
|
|
5376
|
-
* Red's wing,
|
|
5377
|
-
*
|
|
5378
|
-
*
|
|
5622
|
+
* Red's wing, lying from the fairing's ledge down to the sand, broken in three. `lead` and `trail`
|
|
5623
|
+
* are its outline, x by span from the root (swept, notched, a raked tip); a metre of span is `span`
|
|
5624
|
+
* metres on the ground. `root` is x0 and x1 at the hull. `pieces`: the span each runs from and to,
|
|
5625
|
+
* how far it was pushed out, its top at its inner and its outer end, and how far its outline is
|
|
5626
|
+
* sheared along x for each 1.4 m of it on the ground (it lies turned in the wing's plane). The first is
|
|
5627
|
+
* still attached; the breaks are 3.6 m wide. `rails`: the x of the two beams that run through the
|
|
5628
|
+
* breaks and hold the pieces, 0.45 m wide. Blue's is its twin.
|
|
5379
5629
|
*/
|
|
5380
5630
|
var WING$1 = {
|
|
5381
|
-
root: [
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5631
|
+
root: [45, 71],
|
|
5632
|
+
lead: [
|
|
5633
|
+
[71, 0],
|
|
5634
|
+
[69, 8],
|
|
5635
|
+
[64, 18],
|
|
5636
|
+
[61.5, 26],
|
|
5637
|
+
[60, 26],
|
|
5638
|
+
[59, 38],
|
|
5639
|
+
[60.5, 38],
|
|
5640
|
+
[59, 42],
|
|
5641
|
+
[57.5, 46.5],
|
|
5642
|
+
[54, 47.5]
|
|
5643
|
+
],
|
|
5644
|
+
trail: [
|
|
5645
|
+
[45, 0],
|
|
5646
|
+
[46.5, 10],
|
|
5647
|
+
[50, 30],
|
|
5648
|
+
[52.5, 44],
|
|
5649
|
+
[54, 47.5]
|
|
5650
|
+
],
|
|
5651
|
+
span: .78,
|
|
5652
|
+
pieces: [
|
|
5653
|
+
[
|
|
5654
|
+
0,
|
|
5655
|
+
14,
|
|
5656
|
+
0,
|
|
5657
|
+
8.5,
|
|
5658
|
+
6.4,
|
|
5659
|
+
0
|
|
5660
|
+
],
|
|
5661
|
+
[
|
|
5662
|
+
16,
|
|
5663
|
+
30,
|
|
5664
|
+
2,
|
|
5665
|
+
6.8,
|
|
5666
|
+
3.6,
|
|
5667
|
+
.17
|
|
5668
|
+
],
|
|
5669
|
+
[
|
|
5670
|
+
32,
|
|
5671
|
+
47.5,
|
|
5672
|
+
4,
|
|
5673
|
+
3.3,
|
|
5674
|
+
1.6,
|
|
5675
|
+
-.2
|
|
5676
|
+
]
|
|
5677
|
+
],
|
|
5678
|
+
rails: [53.5, 58]
|
|
5387
5679
|
};
|
|
5388
|
-
/** The wing's steps, each under what a runner walks up, and how thick it is where one walks under it. */
|
|
5389
|
-
var [STEPS, THICK] = [26, .8];
|
|
5390
5680
|
/**
|
|
5391
|
-
* Red's engines, torn off: the middle of each
|
|
5392
|
-
*
|
|
5681
|
+
* Red's engines, torn off: the middle of each (x, z), its radius and length. The first lies on the
|
|
5682
|
+
* sand beside the wreck near the waterline, askew (z by x along it), burning: nobody walks through
|
|
5683
|
+
* it. The second lies along z in the lagoon off the tail's end, awash, stood on.
|
|
5393
5684
|
*/
|
|
5394
5685
|
var ENGINES = [[
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
2.
|
|
5398
|
-
|
|
5686
|
+
38.5,
|
|
5687
|
+
125.3,
|
|
5688
|
+
2.7,
|
|
5689
|
+
19,
|
|
5690
|
+
.78
|
|
5399
5691
|
], [
|
|
5400
5692
|
4.5,
|
|
5401
5693
|
112,
|
|
5402
5694
|
2.5,
|
|
5403
5695
|
9
|
|
5404
5696
|
]];
|
|
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];
|
|
5445
5697
|
/** Red's camp: the escape pod its flag stands by (x, z, radius). */
|
|
5446
5698
|
var POD = [
|
|
5447
5699
|
60,
|
|
@@ -5549,7 +5801,7 @@ var sm = (t) => c1(t) * c1(t) * (3 - 2 * c1(t));
|
|
|
5549
5801
|
var far = (a, b) => Math.sqrt(a * a + b * b);
|
|
5550
5802
|
/**
|
|
5551
5803
|
* Where the ground is level, x0, z0, x1, z1 (z in red's half) and the height: the way in to the
|
|
5552
|
-
* hold's door through the bank, the tip of the wing, the camp. Level for 6 m round each, so that
|
|
5804
|
+
* hold's door through the bank, the sand under the tip of the wing, the camp. Level for 6 m round each, so that
|
|
5553
5805
|
* the lattice's triangles are, and back to the sand 6 m further; none within 12 m of the next.
|
|
5554
5806
|
*/
|
|
5555
5807
|
var FLATS = [
|
|
@@ -5561,10 +5813,10 @@ var FLATS = [
|
|
|
5561
5813
|
HOLD.floor - .25
|
|
5562
5814
|
],
|
|
5563
5815
|
[
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5816
|
+
56,
|
|
5817
|
+
146,
|
|
5818
|
+
66,
|
|
5819
|
+
150,
|
|
5568
5820
|
1.3
|
|
5569
5821
|
],
|
|
5570
5822
|
[
|
|
@@ -5691,36 +5943,61 @@ var on = (b) => [
|
|
|
5691
5943
|
b.max[1],
|
|
5692
5944
|
(b.min[2] + b.max[2]) / 2
|
|
5693
5945
|
];
|
|
5694
|
-
/**
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5946
|
+
/**
|
|
5947
|
+
* A row of the hull from x0 to x1 between two heights: a slab `w` either side of the line, less
|
|
5948
|
+
* its `holes` (x0, x1 and the half width left open, in order along x) and, between them, less
|
|
5949
|
+
* `inner` either side of the line: a floor with its holes, or a box of skin on each flank with its
|
|
5950
|
+
* tears.
|
|
5951
|
+
*/
|
|
5952
|
+
var slab = (kind, x0, x1, y0, y1, w, holes, inner = 0) => {
|
|
5953
|
+
const out = [];
|
|
5954
|
+
let x = x0;
|
|
5955
|
+
const cut = (a, b, half) => {
|
|
5956
|
+
const [p, q] = [Math.max(a, x0), Math.min(b, x1)];
|
|
5957
|
+
if (q > p && half < w) for (const [u, v] of half > 0 ? [[-w, -half], [half, w]] : [[-w, w]]) out.push(note(line, kind, box(p, y0, MID$1 + u, q, y1, MID$1 + v, kind == "deck" ? GRATE : METAL)));
|
|
5958
|
+
};
|
|
5959
|
+
for (const [a, b, half] of [...holes, [
|
|
5960
|
+
x1,
|
|
5961
|
+
x1,
|
|
5962
|
+
0
|
|
5963
|
+
]]) {
|
|
5964
|
+
cut(x, a, inner);
|
|
5965
|
+
cut(a, b, half);
|
|
5966
|
+
x = Math.max(x, b);
|
|
5967
|
+
}
|
|
5968
|
+
return out;
|
|
5699
5969
|
};
|
|
5970
|
+
/** The hull: each section's floor down to the keel, then a row from each line to the next (a floor under a deck's line, skin elsewhere), the fairings and the crates. */
|
|
5971
|
+
var hull$1 = () => SHIP$1.flatMap(({ cut, floor, holes, tears, fair, crates }, n) => {
|
|
5972
|
+
const c = HULL.axis[n];
|
|
5973
|
+
const lines = [floor, ...LINES.filter((h) => h > floor + .5)];
|
|
5974
|
+
return [...cut.flatMap(([x0, x1, s, t = HULL.skin]) => {
|
|
5975
|
+
const w = (h) => Math.round(16 * s * section$1(h)) / 16;
|
|
5976
|
+
return [...slab("deck", x0, x1, c - HULL.r, c + floor, w(floor), []), ...lines.slice(1).flatMap((b, k) => {
|
|
5977
|
+
const a = lines[k];
|
|
5978
|
+
const deck = DECKS.indexOf(b);
|
|
5979
|
+
const out = b < HULL.r ? w(deck < 0 ? (a + b) / 2 : b) : s * HULL.spine;
|
|
5980
|
+
const low = a < DECKS[0] ? floor : a < DECKS[1] ? DECKS[0] : DECKS[1];
|
|
5981
|
+
return [...deck < 0 ? slab("skin", x0, x1, c + a, c + b, out, tears.filter((e) => e[2] <= a && e[3] >= b).map(([p, q]) => [
|
|
5982
|
+
p,
|
|
5983
|
+
q,
|
|
5984
|
+
99
|
|
5985
|
+
]), Math.min(w(b), w(low)) - t) : slab("deck", x0, x1, c + a, c + b, out, holes.filter((e) => e[0] == deck).map(([, p, q, half]) => [
|
|
5986
|
+
p,
|
|
5987
|
+
q,
|
|
5988
|
+
Math.min(half, out - t)
|
|
5989
|
+
])), ...a >= 0 && b <= DECKS[1] ? fair.flatMap(([p, q, e]) => slab("fairing", Math.max(p, x0), Math.min(q, x1), c + a, c + b, HULL.r + e, [], out)) : []];
|
|
5990
|
+
})];
|
|
5991
|
+
}), ...crates.map(([x, deck]) => {
|
|
5992
|
+
const y = c + (DECKS[deck] ?? floor);
|
|
5993
|
+
return note(line, "crate", box(x, y, 99.25, x + 1.5, y + [
|
|
5994
|
+
1,
|
|
5995
|
+
1.4,
|
|
5996
|
+
2
|
|
5997
|
+
][deck + 1], 100.75, WOOD));
|
|
5998
|
+
})];
|
|
5999
|
+
});
|
|
5700
6000
|
var BACK$2 = HULL.axis.map((c) => c + HULL.r);
|
|
5701
|
-
/** The middle section, hollow under its axis: the hold's floor, its ends, its flanks with a door each, two bulkheads. */
|
|
5702
|
-
var hold = () => {
|
|
5703
|
-
const [x0, x1] = HULL.sections[1];
|
|
5704
|
-
const { floor, ceil, half, x, door, lintel, walls, way } = HOLD;
|
|
5705
|
-
const out = RINGS[0][1];
|
|
5706
|
-
const wall = (z0, z1) => [
|
|
5707
|
-
box(x[0], floor, z0, door[0], ceil, z1, METAL),
|
|
5708
|
-
box(door[1], floor, z0, x[1], ceil, z1, METAL),
|
|
5709
|
-
box(door[0], floor + lintel, z0, door[1], ceil, z1, STEEL)
|
|
5710
|
-
];
|
|
5711
|
-
return [
|
|
5712
|
-
box(x0, HULL.axis[1] + RINGS[0][0], MID$1 - out, x1, floor, MID$1 + out, GRATE),
|
|
5713
|
-
box(x0, floor, MID$1 - out, x[0], ceil, MID$1 + out, METAL),
|
|
5714
|
-
box(x[1], floor, MID$1 - out, x1, ceil, MID$1 + out, METAL),
|
|
5715
|
-
...wall(MID$1 + half, MID$1 + out),
|
|
5716
|
-
...wall(MID$1 - out, MID$1 - half),
|
|
5717
|
-
...walls.flatMap(([a, b]) => [
|
|
5718
|
-
box(a, floor, MID$1 - half, b, ceil, MID$1 - way / 2, STEEL),
|
|
5719
|
-
box(a, floor, MID$1 + way / 2, b, ceil, MID$1 + half, STEEL),
|
|
5720
|
-
box(a, floor + lintel, MID$1 - way / 2, b, ceil, MID$1 + way / 2, STEEL)
|
|
5721
|
-
])
|
|
5722
|
-
].map((b) => note(line, "hold", b));
|
|
5723
|
-
};
|
|
5724
6001
|
/** A heap of ribs in the middle of each gap, a pack on it, and a fallen frame leaning on each broken end. */
|
|
5725
6002
|
var GAPS = [40, 78].map((x) => {
|
|
5726
6003
|
const [hi, lo] = under$1(x - 1.5, 98.5, x + 1.5, 101.5);
|
|
@@ -5740,53 +6017,104 @@ var FRAMES = [36, 74].flatMap((x) => {
|
|
|
5740
6017
|
/** The raft of the tail's skin afloat off its end, on the line: the middle of the way round. */
|
|
5741
6018
|
var RAFT = box(.5, -.3, 96, 5, .4, 104, METAL);
|
|
5742
6019
|
var centre = [
|
|
5743
|
-
...
|
|
5744
|
-
...hold(),
|
|
5745
|
-
...rings(1, 1),
|
|
5746
|
-
...rings(2),
|
|
6020
|
+
...hull$1(),
|
|
5747
6021
|
...GAPS.map((g) => note(line, "heap", g.heap)),
|
|
5748
6022
|
...FRAMES.map((b) => note(line, "frame", b)),
|
|
5749
6023
|
note(line, "raft", RAFT),
|
|
5750
6024
|
ghost(box(EDGE$1.east, -10, 0, EDGE$1.east + 2, 40, 200, STONE))
|
|
5751
6025
|
];
|
|
5752
|
-
/**
|
|
5753
|
-
var
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
}
|
|
5782
|
-
|
|
6026
|
+
/** How much a row of the wing stands over the next at most, metres. */
|
|
6027
|
+
var RISE = .15;
|
|
6028
|
+
/** How thick the wing is at a span, drawn and collided with: a thin aerofoil, 0.6 m at the root and 0.15 m at the tip. */
|
|
6029
|
+
var thick = (v) => .6 - .45 * v / 47.5;
|
|
6030
|
+
/** An edge of the wing's outline at a span. */
|
|
6031
|
+
var edge$1 = (l, v) => {
|
|
6032
|
+
const k = l.findIndex((p) => p[1] > v);
|
|
6033
|
+
const [a, b] = [l[k - 1], l[k]];
|
|
6034
|
+
return a[0] + (b[0] - a[0]) * (v - a[1]) / (b[1] - a[1]);
|
|
6035
|
+
};
|
|
6036
|
+
/**
|
|
6037
|
+
* The wing: each piece in rows across the span, a step down from one to the next, as wide as the
|
|
6038
|
+
* outline there and as thin as the wing (thick()); solid to the sand where a runner would not fit under it. Then the two rails
|
|
6039
|
+
* across the break before it, level with the lower of its two lips.
|
|
6040
|
+
*/
|
|
6041
|
+
var wing = () => WING$1.pieces.flatMap(([v0, v1, push, y0, y1, shear], n) => {
|
|
6042
|
+
const z = (v, out = push) => MID$1 + HULL.r + SHIP$1[1].fair[1][2] + WING$1.span * v + out;
|
|
6043
|
+
const coarse = Math.ceil((z(v1) - z(v0)) / 1.4);
|
|
6044
|
+
const rows = Math.max(coarse, Math.ceil((y0 - y1) / RISE - 1e-9) + 1);
|
|
6045
|
+
const last = WING$1.pieces[n - 1];
|
|
6046
|
+
return [...Array.from({ length: rows }, (_, k) => {
|
|
6047
|
+
const v = v0 + (v1 - v0) * (k + .5) / rows;
|
|
6048
|
+
const dx = shear * coarse * ((k + .5) / rows - .5);
|
|
6049
|
+
const [xa, xb] = [WING$1.trail, WING$1.lead].map((l) => Math.round(8 * (edge$1(l, v) + dx)) / 8);
|
|
6050
|
+
const [za, zb] = [k, k + 1].map((i) => z(v0 + (v1 - v0) * i / rows));
|
|
6051
|
+
const y = y0 + (y1 - y0) * k / (rows - 1);
|
|
6052
|
+
const low = y - thick(v);
|
|
6053
|
+
const [hi, lo] = under$1(xa, za, xb, zb);
|
|
6054
|
+
return note(mine, "wingpiece", box(xa, low - hi < 2.2 ? lo - .5 : low, za, xb, y, zb, METAL));
|
|
6055
|
+
}), ...last ? WING$1.rails.map((x) => {
|
|
6056
|
+
const y = Math.min(last[4], y0);
|
|
6057
|
+
return note(mine, "rail", box(x - .225, y - .45, z(last[1], last[2]), x + .225, y, z(v0), STEEL));
|
|
6058
|
+
}) : []];
|
|
6059
|
+
});
|
|
6060
|
+
/** The engine on the sand, askew: strips across x, each as long as its body is wide there. */
|
|
6061
|
+
var FALLEN = Array.from({ length: 6 }, (_, k) => {
|
|
6062
|
+
const [x, z, r, , skew] = ENGINES[0];
|
|
6063
|
+
const x0 = x - 7.5 + 2.5 * k;
|
|
6064
|
+
const mid = z + skew * (x0 + 1.25 - x);
|
|
6065
|
+
return lay("fallen", x0, mid - r - .2, x0 + 2.5, mid + r + .2, 3.5, METAL, k ? void 0 : ORANGE);
|
|
6066
|
+
});
|
|
6067
|
+
/**
|
|
6068
|
+
* Where it burns, both halves: the foot of each column of smoke (x, y, z), how high it rises, and
|
|
6069
|
+
* its radius at the foot and at the top (client/smoke.ts draws them). Their flames burn (FLAME), so
|
|
6070
|
+
* none stands on a way across (the user, 2026-11-25): on the back of the fallen engine, which
|
|
6071
|
+
* burns; on the south-west corner of each engine in the lagoon, clear of the jumps over its north
|
|
6072
|
+
* half (routes.ts LAGOON); and against each of the hull's four broken ends, thinner, 4.2 m over
|
|
6073
|
+
* its axis: over the heads of those on the upper deck (DECKS) and under the back.
|
|
6074
|
+
*/
|
|
6075
|
+
var FIRES = [...[on(FALLEN[3]), [
|
|
6076
|
+
ENGINES[1][0] - 1.5,
|
|
6077
|
+
1.3,
|
|
6078
|
+
ENGINES[1][1] + 3.5
|
|
6079
|
+
]].flatMap(([x, y, z]) => [[
|
|
6080
|
+
x,
|
|
6081
|
+
y,
|
|
6082
|
+
z,
|
|
6083
|
+
42,
|
|
6084
|
+
1.3,
|
|
6085
|
+
7
|
|
6086
|
+
], [
|
|
6087
|
+
x,
|
|
6088
|
+
y,
|
|
6089
|
+
200 - z,
|
|
6090
|
+
42,
|
|
6091
|
+
1.3,
|
|
6092
|
+
7
|
|
6093
|
+
]]), ...HULL.sections.flatMap(([x0, x1], n) => [n && x0 - .6, n < 2 && x1 + .6].filter((x) => x).map((x) => [
|
|
6094
|
+
+x,
|
|
6095
|
+
HULL.axis[n] + 4.2,
|
|
6096
|
+
100,
|
|
6097
|
+
28,
|
|
6098
|
+
.9,
|
|
6099
|
+
4
|
|
6100
|
+
]))];
|
|
6101
|
+
/** 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. */
|
|
6102
|
+
var FLAME = [.55, 2.3];
|
|
5783
6103
|
/** The engine in the lagoon off the tail's end, awash: its back 1.4 m over the water. */
|
|
5784
6104
|
var ENGINE = (() => {
|
|
5785
6105
|
const [x, z, r, l] = ENGINES[1];
|
|
5786
6106
|
return note(mine, "engine", box(x - r, -5, z - l / 2, x + r, 1.4, z + l / 2, METAL, ORANGE));
|
|
5787
6107
|
})();
|
|
5788
|
-
/**
|
|
5789
|
-
|
|
6108
|
+
/**
|
|
6109
|
+
* Skin afloat between the shallows and that engine: the first runs aground where the water is knee
|
|
6110
|
+
* deep. A third lies aground under the tear in the tail's flank, 2.05 m under its lower deck: the
|
|
6111
|
+
* hands reach the deck from it and the hanging body clears it.
|
|
6112
|
+
*/
|
|
6113
|
+
var FLOATS$2 = [
|
|
6114
|
+
note(mine, "float", box(16, -1.6, 116, 22, .35, 119, METAL)),
|
|
6115
|
+
note(mine, "float", box(10, -.2, 113, 13, .5, 116, METAL)),
|
|
6116
|
+
note(mine, "float", box(23, -1.6, 107.6, 26, .2, 110, METAL))
|
|
6117
|
+
];
|
|
5790
6118
|
/** The camp: the pod, the flag's step by it, a crate under each rack with a tarpaulin over it. */
|
|
5791
6119
|
var POD_BOX = note(mine, "pod", box(POD[0] - 3, .75, POD[1] - 3, POD[0] + 3, 4.25, POD[1] + 3, METAL));
|
|
5792
6120
|
var DAIS = note(mine, "dais", box(POD[0] - 2, .75, POD[1] - 10, POD[0] + 2, 1.3, POD[1] - 6, PAINT, RED));
|
|
@@ -5795,10 +6123,12 @@ var crate = (x, z, h = .4, tint) => lay("crate", x - 1.5, z - 1.5, x + 1.5, z +
|
|
|
5795
6123
|
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));
|
|
5796
6124
|
var [GUNS$1, BLADES] = [crate(49, 176), crate(71, 176)];
|
|
5797
6125
|
var [RIFLES, RAILS] = [crate(84, 150, .4, RED), crate(33, 128, .4, RED)];
|
|
5798
|
-
/** The debris between the camp and the wing, a line to run: a panel, a container, the landing gear,
|
|
6126
|
+
/** The debris between the camp and the wing, a line to run: a panel, a container, the landing gear, a second container, the wing. */
|
|
5799
6127
|
var PANEL = lay("panel", 67, 159.5, 70.5, 163, .9, METAL);
|
|
5800
6128
|
var CONTAINER = lay("container", 68.5, 151, 71.1, 157, 2, METAL, ORANGE);
|
|
5801
6129
|
var GEAR = lay("gear", 68.6, 145.6, 71, 148, 2.9, STEEL, YELLOW);
|
|
6130
|
+
/** A second container, between the landing gear and the wing's second break. */
|
|
6131
|
+
var LAST = lay("container", 64, 139.5, 67.5, 143, 2.6, METAL, ORANGE);
|
|
5802
6132
|
var BOGIE = lay("gear", 67.6, 144.6, 72, 145.6, 1.2, STEEL);
|
|
5803
6133
|
/** What else lies about red's half, most with a pack on it. */
|
|
5804
6134
|
var SCRAP = {
|
|
@@ -5806,9 +6136,10 @@ var SCRAP = {
|
|
|
5806
6136
|
west: [
|
|
5807
6137
|
lay("panel", 44.5, 156.5, 47.5, 159.5, .5, METAL),
|
|
5808
6138
|
lay("container", 33, 148.7, 39, 151.3, 2.2, METAL, ORANGE),
|
|
5809
|
-
lay("panel",
|
|
6139
|
+
lay("panel", 41, 138.5, 44, 141.5, .4, METAL),
|
|
5810
6140
|
lay("panel", 25.5, 134.5, 28.5, 137.5, .5, METAL),
|
|
5811
|
-
lay("panel", 50.5, 114.5, 53.5, 117.5, .4, METAL)
|
|
6141
|
+
lay("panel", 50.5, 114.5, 53.5, 117.5, .4, METAL),
|
|
6142
|
+
lay("container", 49.5, 107.4, 52.5, 110, 2.6, METAL, ORANGE)
|
|
5812
6143
|
],
|
|
5813
6144
|
east: [
|
|
5814
6145
|
lay("panel", 62.5, 120.5, 65.5, 123.5, .4, METAL),
|
|
@@ -5818,8 +6149,6 @@ var SCRAP = {
|
|
|
5818
6149
|
lay("panel", 84.5, 110.5, 87.5, 113.5, .4, METAL)
|
|
5819
6150
|
],
|
|
5820
6151
|
cover: [
|
|
5821
|
-
lay("panel", 43.6, 131, 44, 137, 2.6, METAL),
|
|
5822
|
-
lay("panel", 48.5, 146.6, 53.5, 147, 2.4, METAL),
|
|
5823
6152
|
lay("panel", 78, 131.6, 83, 132, 2.6, METAL),
|
|
5824
6153
|
lay("panel", 30, 141.6, 35, 142, 2.2, METAL),
|
|
5825
6154
|
lay("container", 76, 155, 82, 157.6, 2.6, METAL, ORANGE)
|
|
@@ -5905,7 +6234,7 @@ var CRAGS = ROCKS.map(([x, z, R, H, s]) => ({
|
|
|
5905
6234
|
}));
|
|
5906
6235
|
var half = [
|
|
5907
6236
|
...wing(),
|
|
5908
|
-
...
|
|
6237
|
+
...FALLEN,
|
|
5909
6238
|
ENGINE,
|
|
5910
6239
|
...FLOATS$2,
|
|
5911
6240
|
POD_BOX,
|
|
@@ -5920,6 +6249,7 @@ var half = [
|
|
|
5920
6249
|
CONTAINER,
|
|
5921
6250
|
GEAR,
|
|
5922
6251
|
BOGIE,
|
|
6252
|
+
LAST,
|
|
5923
6253
|
...Object.values(SCRAP).flat(),
|
|
5924
6254
|
...TRUNKS.map(([x, z, r]) => {
|
|
5925
6255
|
const y = walked(x, z);
|
|
@@ -5997,11 +6327,11 @@ var team = (red) => {
|
|
|
5997
6327
|
rail: side(on(RAILS))
|
|
5998
6328
|
};
|
|
5999
6329
|
};
|
|
6000
|
-
/**
|
|
6001
|
-
var
|
|
6002
|
-
|
|
6003
|
-
HULL.axis[1] +
|
|
6004
|
-
103
|
|
6330
|
+
/** In the gallery, inside red's tear. */
|
|
6331
|
+
var GALLERY = [
|
|
6332
|
+
70.5,
|
|
6333
|
+
HULL.axis[1] + DECKS[1],
|
|
6334
|
+
103
|
|
6005
6335
|
];
|
|
6006
6336
|
var BEACH = {
|
|
6007
6337
|
armor: true,
|
|
@@ -6046,17 +6376,17 @@ var BEACH = {
|
|
|
6046
6376
|
]),
|
|
6047
6377
|
cells: both([
|
|
6048
6378
|
on(SCRAP.camp[1]),
|
|
6049
|
-
on(
|
|
6379
|
+
on(LAST),
|
|
6050
6380
|
on(FLOATS$2[1]),
|
|
6051
6381
|
on(SCRAP.east[2]),
|
|
6052
|
-
|
|
6382
|
+
GALLERY
|
|
6053
6383
|
], [
|
|
6054
6384
|
59,
|
|
6055
6385
|
HOLD.floor,
|
|
6056
6386
|
MID$1
|
|
6057
6387
|
]),
|
|
6058
6388
|
vests: both([on(ENGINE)], [
|
|
6059
|
-
|
|
6389
|
+
63,
|
|
6060
6390
|
BACK$2[1],
|
|
6061
6391
|
MID$1
|
|
6062
6392
|
]),
|
|
@@ -6358,6 +6688,18 @@ var HOP_COST = 1;
|
|
|
6358
6688
|
/** The highest box a body jumps onto standing (a standing jump lands on 1.7 m), and the floor it wants behind the edge. */
|
|
6359
6689
|
var HOP$1 = 1.6;
|
|
6360
6690
|
var HOP_DEPTH$1 = 2.5;
|
|
6691
|
+
/**
|
|
6692
|
+
* The highest edge a body pulls itself up onto from a jump (Landfall's crates under the holes of
|
|
6693
|
+
* its decks: 2.75 m), how far past the edge it comes to stand, the metres short of the edge it
|
|
6694
|
+
* jumps from (its head clear of the floor it climbs to) and the seconds it takes.
|
|
6695
|
+
*/
|
|
6696
|
+
var PULL = 2.8;
|
|
6697
|
+
var ONTO = .75;
|
|
6698
|
+
var PULL_COST = 2;
|
|
6699
|
+
/** Metres past an edge a drop's point is, on the lower floor. */
|
|
6700
|
+
var OVER = .6;
|
|
6701
|
+
/** Metres inside a lower floor's edge where what is over it is looked at. */
|
|
6702
|
+
var INSIDE = .3;
|
|
6361
6703
|
/** The most a body drops onto any floor; past it, it wants SPAN metres of floor ahead to come down on at a run. */
|
|
6362
6704
|
var DROP$1 = 2;
|
|
6363
6705
|
var SPAN = 4;
|
|
@@ -6379,6 +6721,8 @@ var MERGE = 8;
|
|
|
6379
6721
|
var CELL = 4;
|
|
6380
6722
|
/** A link of a route the bot does not prefer costs this many times more, one of its own as many times less. */
|
|
6381
6723
|
var OTHER = 3;
|
|
6724
|
+
/** Landfall's floors on the wreck's line higher than this are the high road's: the deck over the hold, the gallery, the backs. */
|
|
6725
|
+
var HIGH_ROAD = 4;
|
|
6382
6726
|
/** The routes, fastest first: the Spine, Midtown, the Lowline. */
|
|
6383
6727
|
var ROUTES = [
|
|
6384
6728
|
HIGH,
|
|
@@ -6659,8 +7003,10 @@ var portals = (w, polys, grid) => {
|
|
|
6659
7003
|
const [s0, s1] = alongZ ? [Math.max(a[1], b[1]), Math.min(a[3], b[3])] : [Math.max(a[0], b[0]), Math.min(a[2], b[2])];
|
|
6660
7004
|
const m = (s0 + s1) / 2;
|
|
6661
7005
|
const at = (s) => alongZ ? [c, s] : [s, c];
|
|
7006
|
+
const at2 = (v) => alongZ ? [v, m] : [m, v];
|
|
6662
7007
|
const [mx, mz] = at(m);
|
|
6663
|
-
const
|
|
7008
|
+
const [ha, hb] = [pa, polys[j]].map((p) => heightAt(w, p, mx, mz));
|
|
7009
|
+
const dy = hb - ha;
|
|
6664
7010
|
const [pa0, pa1] = [at(s0), at(s1)];
|
|
6665
7011
|
const join = (from, to, pass) => out[from].push({
|
|
6666
7012
|
to,
|
|
@@ -6674,12 +7020,36 @@ var portals = (w, polys, grid) => {
|
|
|
6674
7020
|
join(j, i, PASS.WALK);
|
|
6675
7021
|
} else {
|
|
6676
7022
|
const [up, down] = dy > 0 ? [j, i] : [i, j];
|
|
6677
|
-
const
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
if (
|
|
6682
|
-
|
|
7023
|
+
const [hi, lo] = dy > 0 ? [hb, ha] : [ha, hb];
|
|
7024
|
+
const h = hi - lo;
|
|
7025
|
+
const [u, d] = [polys[up].q, polys[down].q];
|
|
7026
|
+
const [lx, lz] = [0, 1].map((n) => Math.min(Math.max(n ? mz : mx, d[n] + INSIDE), d[n + 2] - INSIDE));
|
|
7027
|
+
if (floorAt(w, lx, lz, hi + .5 + .1) > lo + .5) continue;
|
|
7028
|
+
const n = alongZ ? 0 : 1;
|
|
7029
|
+
const depth = (q) => q[n + 2] - q[n];
|
|
7030
|
+
const hop = h <= HOP$1 && depth(u) >= HOP_DEPTH$1;
|
|
7031
|
+
const s = u[n] > d[n] ? 1 : -1;
|
|
7032
|
+
const e = u[s > 0 ? n : n + 2];
|
|
7033
|
+
const [f, t] = [-.9, ONTO].map((k) => at2(e + s * k));
|
|
7034
|
+
const pull = !hop && h <= PULL && Math.abs(floorAt(w, t[0], t[1], hi + 1.8) - hi) < .1;
|
|
7035
|
+
if (pull || h <= DROP$1 || h <= deep && depth(d) >= SPAN) join(up, down, PASS.DROP);
|
|
7036
|
+
if (hop) join(down, up, PASS.HOP);
|
|
7037
|
+
else if (pull) out[down].push({
|
|
7038
|
+
to: up,
|
|
7039
|
+
from: [
|
|
7040
|
+
f[0],
|
|
7041
|
+
lo,
|
|
7042
|
+
f[1]
|
|
7043
|
+
],
|
|
7044
|
+
end: [
|
|
7045
|
+
t[0],
|
|
7046
|
+
hi,
|
|
7047
|
+
t[1]
|
|
7048
|
+
],
|
|
7049
|
+
legs: [leap(f, t, hi, { sprint: false })],
|
|
7050
|
+
route: -1,
|
|
7051
|
+
cost: PULL_COST
|
|
7052
|
+
});
|
|
6683
7053
|
}
|
|
6684
7054
|
}
|
|
6685
7055
|
});
|
|
@@ -6846,12 +7216,12 @@ var build = (w) => {
|
|
|
6846
7216
|
}
|
|
6847
7217
|
}
|
|
6848
7218
|
if (w.def === BEACH) {
|
|
6849
|
-
const [[
|
|
7219
|
+
const [[tail], [west, east]] = HULL.sections;
|
|
6850
7220
|
nav.ways = 5;
|
|
6851
7221
|
polys.forEach(({ q, y, r }, i) => {
|
|
6852
7222
|
if (q[1] <= 100 && q[3] >= 100) {
|
|
6853
7223
|
const x = (q[0] + q[2]) / 2;
|
|
6854
|
-
route[i] = !r && y >
|
|
7224
|
+
route[i] = !r && y > HIGH_ROAD ? 0 : x < tail ? 4 : x < west ? 2 : x < east ? 1 : 3;
|
|
6855
7225
|
}
|
|
6856
7226
|
});
|
|
6857
7227
|
const [x, z] = LAGOON.start;
|
|
@@ -7005,9 +7375,10 @@ var path = (nav, w, a, b, prefer = -1) => {
|
|
|
7005
7375
|
p = [e.end[0], e.end[2]];
|
|
7006
7376
|
} else {
|
|
7007
7377
|
p = nearest(e.a, e.b, x, z);
|
|
7008
|
-
|
|
7009
|
-
c = flat$2(x, z, p[0], p[1]) / PACE + (e.pass === PASS.HOP ? HOP_COST : e.pass ? DOWN : 0) + (r >= 0 && prefer >= 0 && r !== prefer && nav.route[i] !== r ? AREA : 0);
|
|
7378
|
+
c = flat$2(x, z, p[0], p[1]) / PACE + (e.pass === PASS.HOP ? HOP_COST : e.pass ? DOWN : 0);
|
|
7010
7379
|
}
|
|
7380
|
+
const r = nav.route[e.to];
|
|
7381
|
+
c += r >= 0 && prefer >= 0 && r !== prefer && nav.route[i] !== r ? AREA : 0;
|
|
7011
7382
|
if (g[i] + c < g[e.to]) {
|
|
7012
7383
|
g[e.to] = g[i] + c;
|
|
7013
7384
|
prev[e.to] = e;
|
|
@@ -7079,8 +7450,8 @@ var path = (nav, w, a, b, prefer = -1) => {
|
|
|
7079
7450
|
} else {
|
|
7080
7451
|
const [p, q] = [nav.polys[polyAt].q, nav.polys[e.to].q];
|
|
7081
7452
|
const [dx, dz] = [(q[0] + q[2] - p[0] - p[2]) / 2, (q[1] + q[3] - p[1] - p[3]) / 2];
|
|
7082
|
-
const [
|
|
7083
|
-
const [bx, bz] = e.b;
|
|
7453
|
+
const c = (v, n) => e.pass === PASS.DROP ? Math.min(Math.max(v, q[n] + OVER), q[n + 2] - OVER) : v;
|
|
7454
|
+
const [ax, az, bx, bz] = [...e.a, ...e.b].map((v, n) => c(v, n % 2));
|
|
7084
7455
|
const len = flat$2(ax, az, bx, bz);
|
|
7085
7456
|
const k = Math.min(EDGE, len * .4) / (len || 1);
|
|
7086
7457
|
const ea = [ax + (bx - ax) * k, az + (bz - az) * k];
|
|
@@ -9842,7 +10213,7 @@ var Bot = class {
|
|
|
9842
10213
|
};
|
|
9843
10214
|
const last = this.step === this.steps.length - 1;
|
|
9844
10215
|
const near = d < 2 && this.ticks - this.better > STUCK_JUMP;
|
|
9845
|
-
if (d < (last ? 1 : .5) || near && !last) {
|
|
10216
|
+
if (d < (last ? 1 : p.y < y + 1 ? .5 : 0) || near && !last) {
|
|
9846
10217
|
if (!last) {
|
|
9847
10218
|
this.next();
|
|
9848
10219
|
return this.pilot(p);
|
|
@@ -9884,8 +10255,10 @@ var Bot = class {
|
|
|
9884
10255
|
exact: false
|
|
9885
10256
|
};
|
|
9886
10257
|
let keys = FORWARD | SPRINT;
|
|
9887
|
-
if (
|
|
9888
|
-
|
|
10258
|
+
if (!this.steps[this.step + 1]?.leg) {
|
|
10259
|
+
if (p.ground && hop && !(p.held & JUMP)) keys |= JUMP;
|
|
10260
|
+
if (Math.abs(turn(this.look, yaw)) < .15) keys |= this.dash(w, p, yaw, d);
|
|
10261
|
+
}
|
|
9889
10262
|
return {
|
|
9890
10263
|
keys,
|
|
9891
10264
|
yaw,
|
|
@@ -9932,7 +10305,7 @@ var Bot = class {
|
|
|
9932
10305
|
], reach) < reach) return false;
|
|
9933
10306
|
if (ray(w, [
|
|
9934
10307
|
p.x,
|
|
9935
|
-
p.y + .5 + .
|
|
10308
|
+
p.y + .5 + .01,
|
|
9936
10309
|
p.z
|
|
9937
10310
|
], [
|
|
9938
10311
|
fx,
|