Compare commits

...

2 commits

Author SHA1 Message Date
40a80801e7 Debug Cam 2025-10-22 13:22:15 +02:00
b2aa7b2907 Fixed a crash on building destruction 2025-10-22 13:09:12 +02:00
2 changed files with 5 additions and 5 deletions

View file

@ -21,6 +21,10 @@
[node name="Earth" parent="." instance=ExtResource("3_lquwl")]
unique_name_in_owner = true
[node name="Debug_Camera" type="Camera2D" parent="."]
scale = Vector2(41.02, 41.02)
zoom = Vector2(0.12, 0.12)
[node name="Player" parent="." instance=ExtResource("2_1bvp3")]
unique_name_in_owner = true
position = Vector2(578, -3017)
@ -30,10 +34,6 @@ scale = Vector2(3, 3)
position = Vector2(0, -50)
ignore_rotation = false
[node name="Debug_Camera" type="Camera2D" parent="."]
scale = Vector2(41.02, 41.02)
zoom = Vector2(0.12, 0.12)
[node name="Building Generator" type="Node" parent="."]
script = ExtResource("4_1bvp3")
initial_buildings = 10

View file

@ -56,7 +56,7 @@ func place_object_list(obj_list : Node2D, building):
# The building remembers these objects: If it is destroyed, so are they.
if object is Platform or object is Trap or object is Item:
building.objects.append(object)
if "building" in object: object.building = self
if "building" in object: object.building = building
# This scales platforms hoizontally to make sure they still form a floor without gaps.
if(object.has_method("init_at_horizontal_distortion")):
object.init_at_horizontal_distortion(object.position.length() / Grid.ground_radius)