Uses for every material (clay jar, bedroll, pelt rug, fang necklace, bear cloak, pemmican, bait), Q to drop, K/M bag rows on 1-8, help pages; protocol 14

This commit is contained in:
Paul Bailey
2026-11-06 11:49:42 +00:00
parent 5778d61763
commit 4b2e687188
29 changed files with 1457 additions and 40 deletions

View File

@@ -12,6 +12,7 @@ var player: CharacterBody3D
var _prompt: Label
var _held_name: Label
var _hotbar: Array = []
var _row_label: Label
var _toasts: VBoxContainer
var _screen: Control
var _menu: Control
@@ -66,6 +67,16 @@ func bind(p: CharacterBody3D) -> void:
bar.add_child(s)
_hotbar.append(s)
root.add_child(bar)
# Which bag row the hotbar is showing (K / M change it), beside the bar.
_row_label = UITheme.label("", 14, UITheme.TEXT_DIM)
_row_label.set_anchors_and_offsets_preset(Control.PRESET_CENTER_BOTTOM)
_row_label.grow_horizontal = Control.GROW_DIRECTION_BOTH
_row_label.grow_vertical = Control.GROW_DIRECTION_BEGIN
_row_label.offset_left = 300
_row_label.offset_right = 420
_row_label.offset_bottom = -40
_row_label.mouse_filter = Control.MOUSE_FILTER_IGNORE
root.add_child(_row_label)
_held_name = UITheme.label("", 15, UITheme.TEXT_DIM)
_held_name.set_anchors_and_offsets_preset(Control.PRESET_CENTER_BOTTOM)
@@ -392,9 +403,11 @@ func _unhandled_input(event: InputEvent) -> void:
get_viewport().set_input_as_handled()
func _refresh() -> void:
var first: int = player.row() * _hotbar.size()
for i in range(_hotbar.size()):
_hotbar[i].set_stack(player.inventory.get_slot(i))
_hotbar[i].set_selected(i == player.selected)
_hotbar[i].set_stack(player.inventory.get_slot(first + i))
_hotbar[i].set_selected(first + i == player.selected)
_row_label.text = "Row %d of %d\nK / M" % [player.row() + 1, player.rows()]
var id: String = player.held_item_id()
_held_name.text = ItemDB.item_name(id) if not id.is_empty() else ""

View File

@@ -74,7 +74,7 @@ func bind(p: CharacterBody3D) -> void:
if i == 7:
pass
pv.add_child(grid)
pv.add_child(UITheme.label("Row 1 is your hotbar. Shift-click moves stacks to/from a chest.", 13, UITheme.TEXT_DIM))
pv.add_child(UITheme.label("1-8 pick from the row you're on; K / M change row. Shift-click moves stacks to/from a chest. Q drops what you hold.", 13, UITheme.TEXT_DIM))
var wr := HBoxContainer.new()
wr.add_theme_constant_override("separation", 10)
_worn_label = UITheme.label("", 15)

View File

@@ -13,7 +13,8 @@ const CONTROLS := [
["Left click (fishing rod)", "Cast / reel in when the float dips"],
["R", "Rotate piece (building pieces: quarter turns)"], ["X", "Dismantle the piece you're looking at"],
["E on a bed", "Set spawn point / sleep (night, under a roof)"],
["1 - 8, wheel", "Hotbar"], ["Tab", "Inventory & crafting (shift-click Craft for 5)"],
["1 - 8, wheel", "Hotbar (the bag row you're on)"], ["K / M", "Hotbar shows the bag row above / below"],
["Q (shift+Q)", "Drop what you're holding (just one)"], ["Tab", "Inventory & crafting (shift-click Craft for 5)"],
["Shift + click", "Move stack to/from a chest"], ["Right click", "Split stack"],
["Esc", "This menu (game autosaves every 2 min)"],
]