diff --git a/Containers/plate_controller.gd b/Containers/plate_controller.gd index 653669a..16bc10c 100644 --- a/Containers/plate_controller.gd +++ b/Containers/plate_controller.gd @@ -4,26 +4,30 @@ extends Node @onready var dirty_node: Node3D = $"../Dirty" @onready var container: ItemContainer = $"../Container" -@export var is_dirty: bool = false - ## Synced summary of the plate's contents (item ids). The contents themselves ## are the real item nodes ItemContainer reparents under the plate; this is only ## what other systems read to ask "what is on this plate" without walking them. @export var contained_ids: Array[String] = [] +@export var is_dirty: bool = false: + get: + return is_dirty + set(value): + if NetworkManager.owns_world(): + clients_set_dirty.rpc(value) + is_dirty = value + container.enabled = not value + dirty_node.visible = value + SweetLogger.info("Set plate dirty: {0}", [value]) + +@rpc("authority", "call_remote", "reliable") +func clients_set_dirty(value: bool) -> void: + is_dirty = value + + func get_food_items() -> Array[FoodItem]: return container.contained_items func _ready() -> void: if not dirty_node: - SweetLogger.warning("{0} missing dirty_node reference", [name]) - dirty_node.visible = is_dirty - - -func _process(_delta: float) -> void: - if is_dirty: - container.enabled = false - dirty_node.visible = true - else: - container.enabled = true - dirty_node.visible = false + SweetLogger.warning("{0} missing dirty_node reference", [name]) \ No newline at end of file diff --git a/Net/net_pickable.gd b/Net/net_pickable.gd index 62a9b06..d527d21 100644 --- a/Net/net_pickable.gd +++ b/Net/net_pickable.gd @@ -179,8 +179,6 @@ func apply_held_state() -> void: and _pickable.collision_mask == 0 \ and _pickable.enabled == want_enabled: return - if NetworkManager.is_online(): # This was spamming that Knife was frozen every frame. - SweetLogger.debug("{0}: freezing (non-authority, owner=peer {1})", [_pickable.name, net_held_by]) _pickable.freeze = true _pickable.freeze_mode = RigidBody3D.FREEZE_MODE_KINEMATIC _pickable.collision_mask = 0 diff --git a/addons/yaml/bin/~libgdyaml.windows.debug.x86_64.dll b/addons/yaml/bin/~libgdyaml.windows.debug.x86_64.dll new file mode 100644 index 0000000..e0bf381 Binary files /dev/null and b/addons/yaml/bin/~libgdyaml.windows.debug.x86_64.dll differ diff --git a/recipes.yaml.uid b/recipes.yaml.uid deleted file mode 100644 index 26c7014..0000000 --- a/recipes.yaml.uid +++ /dev/null @@ -1 +0,0 @@ -uid://be8o8m6xpp3kc