diff --git a/app/content/entities/button/button.tscn b/app/content/entities/button/button.tscn index fe04a15..02be446 100644 --- a/app/content/entities/button/button.tscn +++ b/app/content/entities/button/button.tscn @@ -8,7 +8,7 @@ [sub_resource type="BoxShape3D" id="BoxShape3D_um5pa"] size = Vector3(0.0700684, 0.011734, 0.0703125) -[node name="Button" type="StaticBody3D" ] +[node name="Button" type="StaticBody3D"] script = ExtResource("1_ja7lt") [node name="Button" parent="." instance=ExtResource("1_r4tef")] diff --git a/app/content/system/house/house.gd b/app/content/system/house/house.gd index 92d1053..1d6135c 100644 --- a/app/content/system/house/house.gd +++ b/app/content/system/house/house.gd @@ -250,5 +250,6 @@ func save_all_entities(): entity_data["interface"] = entity.get_interface() Store.house.state.entities.append(entity_data) - + + Store.house.state.entities = Store.house.state.entities Store.house.save_local() diff --git a/app/content/system/house/mini/Entity.gd b/app/content/system/house/mini/Entity.gd index d7341f6..5c6915a 100644 --- a/app/content/system/house/mini/Entity.gd +++ b/app/content/system/house/mini/Entity.gd @@ -19,9 +19,11 @@ func _ready(): group_entity.queue_free() group_entity=null elif group_entity == null: - print(editing.value.map(func(entity): return entity.entity_id)) var id=HomeApi.groups.create(editing.value.map(func(entity): return entity.entity_id)) group_entity=EntityFactory.create_entity(id, active_type) + for entity_node in group_entity.get_children(): + if entity_node is Movable: + group_entity.remove_child(entity_node) add_child(group_entity) else: HomeApi.groups.update_entities(group_entity.entity_id, editing.value.map(func(entity): return entity.entity_id)) @@ -39,6 +41,8 @@ func _ready(): if Store.house.state.entities.size() == 0: return + print("Updating Dots") + for old_dot in dots.get_children(): dots.remove_child(old_dot) old_dot.free()