feat: let the player live as a citizen with needs and carried inventory

This commit is contained in:
Rijad Zuzo
2026-08-11 00:18:39 +02:00
parent f72aa659d2
commit 37f262fb84
20 changed files with 746 additions and 90 deletions
+37 -1
View File
@@ -15,6 +15,7 @@
[ext_resource type="Script" uid="uid://dwwxux24jc6yq" path="res://world/ui/village_whisper_hud.gd" id="15_whisper"]
[ext_resource type="Script" path="res://world/ui/player_interaction_hud.gd" id="16_interaction"]
[ext_resource type="Script" path="res://world/ui/villager_field_note_hud.gd" id="17_villager_note"]
[ext_resource type="Script" path="res://world/ui/player_status_hud.gd" id="18_status"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_o5qli"]
radius = 0.4
@@ -24,13 +25,14 @@ height = 1.7
[node name="JajceWorld" parent="." unique_id=1023795383 instance=ExtResource("11_jajce")]
[node name="Player" type="CharacterBody3D" parent="." unique_id=2022843760 node_paths=PackedStringArray("camera_rig", "simulation_manager", "world_view_manager", "pantry_storage", "guard_site", "study_site")]
[node name="Player" type="CharacterBody3D" parent="." unique_id=2022843760 node_paths=PackedStringArray("camera_rig", "simulation_manager", "world_view_manager", "pantry_storage", "woodpile_storage", "guard_site", "study_site")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.05, 0)
script = ExtResource("1_h2yge")
camera_rig = NodePath("../CameraRig")
simulation_manager = NodePath("../SimulationManager")
world_view_manager = NodePath("../WorldViewManager")
pantry_storage = NodePath("../JajceWorld/WorldObjects/StorageSites/VillagePantry")
woodpile_storage = NodePath("../JajceWorld/WorldObjects/StorageSites/VillageWoodpile")
guard_site = NodePath("../JajceWorld/WorldObjects/ActivitySites/GuardPost")
study_site = NodePath("../JajceWorld/WorldObjects/ActivitySites/StudyDesk")
stomach_capacity_for_food = 10
@@ -195,6 +197,40 @@ theme_override_font_sizes/font_size = 13
text = "Context"
horizontal_alignment = 1
[node name="PlayerStatusLayer" type="CanvasLayer" parent="."]
layer = 2
[node name="PlayerStatusHud" type="Control" parent="PlayerStatusLayer" node_paths=PackedStringArray("simulation_manager")]
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -240.0
offset_top = -170.0
offset_right = 240.0
offset_bottom = -134.0
grow_horizontal = 2
grow_vertical = 0
mouse_filter = 2
script = ExtResource("18_status")
simulation_manager = NodePath("../../SimulationManager")
[node name="StatusLabel" type="Label" parent="PlayerStatusLayer/PlayerStatusHud"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
theme_override_colors/font_color = Color(0.95, 0.88, 0.74, 1)
theme_override_colors/font_outline_color = Color(0.07, 0.045, 0.025, 0.92)
theme_override_constants/outline_size = 5
theme_override_font_sizes/font_size = 14
text = "Hunger 40 · Energy 100 · Carrying nothing"
horizontal_alignment = 1
[node name="VillagerInspectionLayer" type="CanvasLayer" parent="."]
layer = 2