Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for Currency update #290

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions COGITO/DemoScenes/COGITO_3_Lobby.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -7918,10 +7918,10 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.71305, 1.67676, -0.0526435
shape = SubResource("BoxShape3D_4k13h")

[node name="Coins" parent="." instance=ExtResource("93_phwoo")]
transform = Transform3D(0.225393, 0, -0.974268, 0, 1, 0, 0.974268, 0, 0.225393, -1.03416, 0.843447, -11.2766)
transform = Transform3D(0.225393, 0, -0.974268, 0, 1, 0, 0.974268, 0, 0.225393, -1.03416, 0.88054, -11.2766)

[node name="Coins2" parent="." instance=ExtResource("93_phwoo")]
transform = Transform3D(-0.821508, 0, -0.570197, 0, 1, 0, 0.570197, 0, -0.821508, -1.33015, 0.843447, -11.3396)
transform = Transform3D(-0.821508, 0, -0.570197, 0, 1, 0, 0.570197, 0, -0.821508, -1.33015, 0.86935, -11.3396)

[connection signal="body_entered" from="QUESTS/Archive_QuestStarter" to="QUESTS/Archive_QuestStarter" method="_on_body_entered"]
[connection signal="body_entered" from="QUESTS/Laptop_QuestStarter" to="QUESTS/Laptop_QuestStarter" method="_on_body_entered"]
Expand Down
5 changes: 5 additions & 0 deletions COGITO/InventoryPD/CustomResources/cogito_currency.gd
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ func set_attribute(_value_current:float, _value_max:float):
value_max = _value_max


# Used when loading/setting a currency
func set_currency(_value_current:float, _value_max:float):
value_current = _value_current
value_max = _value_max

func add(amount):
if is_locked:
currency_changed.emit(currency_name,value_current,value_max,true)
Expand Down
14 changes: 6 additions & 8 deletions COGITO/PackedScenes/Pickups/pickup_coins.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ height = 0.01
radial_segments = 8
rings = 1

[sub_resource type="CylinderShape3D" id="CylinderShape3D_4mxs4"]
margin = 0.01
height = 0.05
radius = 0.1
[sub_resource type="BoxShape3D" id="BoxShape3D_k343l"]
size = Vector3(0.205469, 0.0422119, 0.170801)

[sub_resource type="Resource" id="Resource_pb4mu"]
[sub_resource type="Resource" id="Resource_iq4sy"]
resource_local_to_scene = true
script = ExtResource("4_wdnhm")
inventory_item = ExtResource("3_q3la1")
Expand Down Expand Up @@ -57,8 +55,8 @@ transform = Transform3D(0.906256, 0, -0.422729, 0, 1, 0, 0.422729, 0, 0.906256,
mesh = SubResource("CylinderMesh_u08uv")

[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0529228, 0.0252476, 0.00999682)
shape = SubResource("CylinderShape3D_4mxs4")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0501884, 0.0155918, 0.0245964)
shape = SubResource("BoxShape3D_k343l")

[node name="PickupComponent" parent="." instance=ExtResource("2_028c2")]
slot_data = SubResource("Resource_pb4mu")
slot_data = SubResource("Resource_iq4sy")