Remove AI multiplayer

This commit is contained in:
JonShard
2026-07-29 10:57:35 +02:00
parent ea492f914b
commit 0f1f0c6a93
102 changed files with 1146 additions and 960 deletions
+7 -5
View File
@@ -1,6 +1,8 @@
class_name ItemContainer
extends Node3D
const RECIPE_MANAGER = preload("res://scripts/recipe_Manager.gd")
@export var enabled: bool = true
@export var target_group : String # Items with this tag can be added to the container
@export var meal_positions: Array[Node3D] = []
@@ -27,8 +29,8 @@ func _ready() -> void:
# Absorbing items is a server decision (the container's holder is server-
# snapped into a station, matching table.gd/hob.gd's convention).
func _on_body_entered(body: Node3D) -> void:
if not NetworkManager.owns_world():
return
#if not NetworkManager.owns_world():
#return
print("Container enabled: ", enabled)
if not enabled:
print("Container disabled in _on_body_entered body")
@@ -90,7 +92,7 @@ func _add_item(item: Node3D) -> void:
updated.append(food_node.id)
plate_controller.contained_ids = updated
NetworkManager.despawn_item(item)
item.queue_free()
func erase_item(item: FoodItem) -> void:
@@ -122,7 +124,7 @@ func refresh_visuals(ids: Array[String]) -> void:
var meal_idx := 0
var side_idx := 0
for id in ids:
var scene := RecipeManager.get_item_scene(id)
var scene := RECIPE_MANAGER.get_item_scene(id)
if not scene:
continue
var visual := scene.instantiate()
@@ -195,7 +197,7 @@ func _remove_from_physics(visual: Node3D) -> void:
PhysicsServer3D.body_set_space((visual as RigidBody3D).get_rid(), RID())
var despawning_item = visual.get_node_or_null("DespawningItem")
if despawning_item:
NetworkManager.despawn_item(despawning_item)
despawning_item.queue_free()
#plate (Pickalbe)
+1 -1
View File
@@ -1,6 +1,6 @@
[gd_scene format=3 uid="uid://du31pqeytu8as"]
[ext_resource type="Script" uid="uid://6lyhyial1fh5" path="res://Containers/container.gd" id="1_r4cle"]
[ext_resource type="Script" uid="uid://6lyhyial1fh5" path="res://containers/container.gd" id="1_r4cle"]
[sub_resource type="SphereShape3D" id="SphereShape3D_vlqg6"]
radius = 0.3
+2 -2
View File
@@ -1,8 +1,8 @@
[gd_scene format=3 uid="uid://bp3v1jl8pctro"]
[ext_resource type="Script" uid="uid://bfrlpbsqg5lqr" path="res://addons/godot-xr-tools/objects/pickable.gd" id="1_nq5sa"]
[ext_resource type="PackedScene" uid="uid://du31pqeytu8as" path="res://Containers/container.tscn" id="1_s5yhh"]
[ext_resource type="Script" uid="uid://iqjqsk4v6qfh" path="res://Containers/plate_controller.gd" id="1_vjsmi"]
[ext_resource type="PackedScene" uid="uid://du31pqeytu8as" path="res://containers/container.tscn" id="1_s5yhh"]
[ext_resource type="Script" uid="uid://iqjqsk4v6qfh" path="res://containers/plate_controller.gd" id="1_vjsmi"]
[ext_resource type="PackedScene" uid="uid://c25yxb0vt53vc" path="res://addons/godot-xr-tools/objects/grab_points/grab_point_hand_left.tscn" id="2_3bkoa"]
[ext_resource type="Animation" uid="uid://db62hs5s4n2b3" path="res://addons/godot-xr-tools/hands/animations/left/Grip 4.res" id="3_6v47p"]
[ext_resource type="Script" uid="uid://dvobm6vcfnqe8" path="res://addons/godot-xr-tools/hands/poses/hand_pose_settings.gd" id="4_dhtvl"]