The wreck in dark weathered oak; the map's key lists only this land's places
This commit is contained in:
@@ -34,6 +34,7 @@ var _marks: Control
|
||||
var _title: Label
|
||||
var _facing: Label
|
||||
var _others_key: Label
|
||||
var _key: Dictionary = {} ## mark kind -> its line in the key
|
||||
|
||||
func setup(w: Node3D, p: Node3D) -> void:
|
||||
world = w
|
||||
@@ -85,6 +86,7 @@ func setup(w: Node3D, p: Node3D) -> void:
|
||||
var l := UITheme.label("■ %s" % MARKS[k][1], 14)
|
||||
l.add_theme_color_override("font_color", MARKS[k][0])
|
||||
legend.add_child(l)
|
||||
_key[k] = l
|
||||
_facing = UITheme.label("", 15, UITheme.TEXT_DIM)
|
||||
_facing.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
box.add_child(_facing)
|
||||
@@ -99,6 +101,13 @@ func open() -> void:
|
||||
_tex.texture = ImageTexture.create_from_image(render(world))
|
||||
_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))
|
||||
# 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
|
||||
player.ui_open = true
|
||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||
|
||||
Reference in New Issue
Block a user