fix dots not updating position
This commit is contained in:
parent
0793dd44f9
commit
d645ed7e9a
|
@ -251,4 +251,5 @@ func save_all_entities():
|
||||||
|
|
||||||
Store.house.state.entities.append(entity_data)
|
Store.house.state.entities.append(entity_data)
|
||||||
|
|
||||||
|
Store.house.state.entities = Store.house.state.entities
|
||||||
Store.house.save_local()
|
Store.house.save_local()
|
||||||
|
|
|
@ -19,9 +19,11 @@ func _ready():
|
||||||
group_entity.queue_free()
|
group_entity.queue_free()
|
||||||
group_entity=null
|
group_entity=null
|
||||||
elif 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))
|
var id=HomeApi.groups.create(editing.value.map(func(entity): return entity.entity_id))
|
||||||
group_entity=EntityFactory.create_entity(id, active_type)
|
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)
|
add_child(group_entity)
|
||||||
else:
|
else:
|
||||||
HomeApi.groups.update_entities(group_entity.entity_id, editing.value.map(func(entity): return entity.entity_id))
|
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:
|
if Store.house.state.entities.size() == 0:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
print("Updating Dots")
|
||||||
|
|
||||||
for old_dot in dots.get_children():
|
for old_dot in dots.get_children():
|
||||||
dots.remove_child(old_dot)
|
dots.remove_child(old_dot)
|
||||||
old_dot.free()
|
old_dot.free()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user