The wreck in dark weathered oak; the map's key lists only this land's places

This commit is contained in:
Paul Bailey
2026-11-07 02:04:48 +00:00
parent 419c71e638
commit 74bd8f5898
2 changed files with 10 additions and 0 deletions

View File

@@ -34,6 +34,7 @@ var _marks: Control
var _title: Label var _title: Label
var _facing: Label var _facing: Label
var _others_key: Label var _others_key: Label
var _key: Dictionary = {} ## mark kind -> its line in the key
func setup(w: Node3D, p: Node3D) -> void: func setup(w: Node3D, p: Node3D) -> void:
world = w world = w
@@ -85,6 +86,7 @@ func setup(w: Node3D, p: Node3D) -> void:
var l := UITheme.label("■ %s" % MARKS[k][1], 14) var l := UITheme.label("■ %s" % MARKS[k][1], 14)
l.add_theme_color_override("font_color", MARKS[k][0]) l.add_theme_color_override("font_color", MARKS[k][0])
legend.add_child(l) legend.add_child(l)
_key[k] = l
_facing = UITheme.label("", 15, UITheme.TEXT_DIM) _facing = UITheme.label("", 15, UITheme.TEXT_DIM)
_facing.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER _facing.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
box.add_child(_facing) box.add_child(_facing)
@@ -99,6 +101,13 @@ func open() -> void:
_tex.texture = ImageTexture.create_from_image(render(world)) _tex.texture = ImageTexture.create_from_image(render(world))
_title.text = "The %s" % preload("res://scripts/world/terrain.gd").worldlet_name(world.worldlet_id()) _title.text = "The %s" % preload("res://scripts/world/terrain.gd").worldlet_name(world.worldlet_id())
_others_key.visible = world.is_online() and not bool(Net.server_info.get("pvp", true)) _others_key.visible = world.is_online() and not bool(Net.server_info.get("pvp", true))
# The key lists this land's places only (the Cove has no barrow...).
var here := {"den": world.den != null and world.den.found, "barrow": world.barrow != null,
"stones": world.stones != null, "seam": world.tunnel != null, "pier": world.pier != null,
"cave": world.sea_cave != null, "wreck": world.wreck != null,
"treasure": world.wreck != null and player.inventory.count("treasure_map") > 0}
for k in _key:
_key[k].visible = bool(here.get(k, true))
visible = true visible = true
player.ui_open = true player.ui_open = true
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE Input.mouse_mode = Input.MOUSE_MODE_VISIBLE

View File

@@ -85,6 +85,7 @@ func _build() -> void:
mi.mesh = st.commit() mi.mesh = st.commit()
var mat := StandardMaterial3D.new() var mat := StandardMaterial3D.new()
mat.vertex_color_use_as_albedo = true mat.vertex_color_use_as_albedo = true
mat.vertex_color_is_srgb = true # (the colours above are picked by eye: dark, weathered oak)
mat.roughness = 0.95 mat.roughness = 0.95
mi.material_override = mat mi.material_override = mat
add_child(mi) add_child(mi)