inventory bug fixes, multiplayer pickup sync
This commit is contained in:
parent
04a9a299d7
commit
000269875a
14 changed files with 88 additions and 43 deletions
1
Scripts/Resources/entity_resource.gd
Normal file
1
Scripts/Resources/entity_resource.gd
Normal file
|
|
@ -0,0 +1 @@
|
|||
extends Node
|
||||
1
Scripts/Resources/entity_resource.gd.uid
Normal file
1
Scripts/Resources/entity_resource.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cd0o5lwehj6cl
|
||||
|
|
@ -10,6 +10,7 @@ func get_current_slot(index : int) -> RigidBody3D:
|
|||
|
||||
func add_item(item : RigidBody3D) -> void:
|
||||
items.append(item)
|
||||
print(item.item.id, " added id")
|
||||
|
||||
func remove_items(item : RigidBody3D) -> void:
|
||||
items.erase(item)
|
||||
|
|
@ -2,8 +2,17 @@ extends Resource
|
|||
|
||||
class_name Item
|
||||
|
||||
@export var id : int
|
||||
@export var value : int
|
||||
@export var name : String
|
||||
@export var weight : int
|
||||
@export var primary_objective : bool
|
||||
@export var secondary_objective : bool
|
||||
var controller : Marker3D
|
||||
|
||||
|
||||
func set_controller(new_controller : Marker3D):
|
||||
controller = new_controller
|
||||
|
||||
func get_controller() -> Marker3D:
|
||||
return controller
|
||||
Loading…
Add table
Add a link
Reference in a new issue