The pirate treasure: each player's own mound at their X, dug with a pickaxe; the drowned crew rise at night or when the chest comes up; the ship's compass, a spyglass, a cutlass and pirate gold; online too

This commit is contained in:
Paul Bailey
2026-11-07 09:54:51 +00:00
parent 74bd8f5898
commit 5bcfa23710
18 changed files with 594 additions and 11 deletions

View File

@@ -38,6 +38,10 @@ static func build(key: String) -> ArrayMesh:
"stick": m = _stick()
"driftwood": m = _driftwood()
"treasure_map": m = _treasure_map()
"ship_compass": m = _ship_compass()
"spyglass": m = _spyglass()
"pirate_gold": m = _pirate_gold()
"cutlass": m = _cutlass()
"stone": m = _pebble(11, STONE, Vector3(0.14, 0.10, 0.12))
"flint": m = _pebble(23, FLINT, Vector3(0.12, 0.07, 0.15), 0.5)
"wood": m = _wood()
@@ -206,6 +210,50 @@ static func _treasure_map() -> ArrayMesh:
P._cylinder(st, Vector3(-0.01, 0.04, 0), Vector3(0.01, 0.04, 0), 0.043, 0.043, 8, Color(0.45, 0.12, 0.08), r)
return P._commit(st)
const BRASS := Color(0.78, 0.6, 0.25)
const GOLD := Color(0.95, 0.75, 0.2)
## A brass sea compass: a flat round case, a glass face, a red needle.
static func _ship_compass() -> ArrayMesh:
var st := P._begin()
var r := _rng(47)
P._cylinder(st, Vector3(0, 0.0, 0), Vector3(0, 0.05, 0), 0.11, 0.11, 12, BRASS, r, -1.0, BRASS)
P._cylinder(st, Vector3(0, 0.05, 0), Vector3(0, 0.056, 0), 0.095, 0.095, 12, Color(0.9, 0.88, 0.8), r, -1.0, Color(0.9, 0.88, 0.8))
P._cylinder(st, Vector3(0, 0.06, 0.07), Vector3(0, 0.06, -0.07), 0.012, 0.004, 4, Color(0.75, 0.1, 0.08), r)
return P._commit(st)
## A brass telescope, drawn out: three tubes, the big end forward.
static func _spyglass() -> ArrayMesh:
var st := P._begin()
var r := _rng(49)
P._cylinder(st, Vector3(0, 0.04, 0.22), Vector3(0, 0.04, 0.06), 0.03, 0.03, 8, BRASS, r, -1.0, BRASS)
P._cylinder(st, Vector3(0, 0.04, 0.06), Vector3(0, 0.04, -0.1), 0.036, 0.036, 8, Color(0.3, 0.2, 0.12), r, -1.0, BRASS)
P._cylinder(st, Vector3(0, 0.04, -0.1), Vector3(0, 0.04, -0.26), 0.044, 0.048, 8, BRASS, r, -1.0, Color(0.6, 0.7, 0.8))
return P._commit(st)
## A heap of old gold coins, and a few spilled.
static func _pirate_gold() -> ArrayMesh:
var st := P._begin()
var r := _rng(53)
var n := FastNoiseLite.new()
n.seed = 53
P._blob(st, Vector3(0, 0.06, 0), Vector3(0.2, 0.09, 0.18), n, 0.25, GOLD, r, 1)
for i in range(7):
var a := i * 0.9
var c := Vector3(cos(a) * (0.16 + 0.05 * (i % 3)), 0.01, sin(a) * (0.16 + 0.05 * (i % 3)))
P._cylinder(st, c, c + Vector3(0, 0.012, 0), 0.03, 0.03, 8, GOLD.darkened(0.1 * (i % 3)), r, -1.0, GOLD)
return P._commit(st)
## A cutlass: a curved, broad blade, a brass basket guard, a dark grip.
static func _cutlass() -> ArrayMesh:
var st := P._begin()
var r := _rng(59)
_handle(st, 0.14, r)
P._cylinder(st, Vector3(-0.06, 0.15, 0), Vector3(0.06, 0.15, 0), 0.025, 0.025, 5, BRASS, r)
P._cylinder(st, Vector3(0, 0.16, 0), Vector3(0.02, 0.45, 0), 0.03, 0.028, 4, Color(0.72, 0.74, 0.78), r)
P._cylinder(st, Vector3(0.02, 0.45, 0), Vector3(0.08, 0.72, 0), 0.028, 0.006, 4, Color(0.72, 0.74, 0.78), r)
return P._commit(st)
static func _wood() -> ArrayMesh:
var st := P._begin()
var r := _rng(9)