Fixed bug with item generator crying when item is removed while its broken

This commit is contained in:
akshay 2022-08-18 21:03:23 -04:00
parent ef4b8bd7cf
commit b10ad40552
2 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=8 format=2]
[gd_scene load_steps=9 format=2]
[ext_resource path="res://scenes/coin_machine.tscn" type="PackedScene" id=1]
[ext_resource path="res://scenes/item_holder.tscn" type="PackedScene" id=2]
@ -6,6 +6,7 @@
[ext_resource path="res://scenes/item_dump.tscn" type="PackedScene" id=4]
[ext_resource path="res://scenes/status_light.tscn" type="PackedScene" id=5]
[ext_resource path="res://item_types/repair_kit.tres" type="Resource" id=6]
[ext_resource path="res://item_types/ore.tres" type="Resource" id=7]
[sub_resource type="CylinderMesh" id=1]
@ -24,9 +25,11 @@ text = "Progress: 20%"
[node name="item_slot_1" parent="." groups=["conveyor_item_slots"] instance=ExtResource( 2 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.5, 0, 0 )
start_with_item = ExtResource( 7 )
[node name="item_slot_2" parent="." groups=["conveyor_item_slots"] instance=ExtResource( 2 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 0, 0 )
start_with_item = ExtResource( 7 )
[node name="coin_machine" parent="." instance=ExtResource( 1 )]
unique_name_in_owner = true

View File

@ -30,7 +30,7 @@ func on_gen_timer_timeout():
assert(false, "gen timer should be disabled while broken")
func on_item_slot_item_changed(item):
assert(false, "item dump should be disabled while broken")
assert(item == null, "item dump adds should be disabled while broken")
func on_item_dump_item_dump_completed():
ctx.full_heal()