Working on building removal

This commit is contained in:
2024-09-08 17:25:57 +03:00
parent 4468c839ec
commit eac265642e
4 changed files with 82 additions and 5 deletions

View File

@@ -146,11 +146,12 @@ func select_building(xform, id, mid):
selected_building = id
selected_building_xform = xform
print("selected id: ", id)
for h in range($"%building_type".get_item_count()):
var item = $"%building_type".get_item_text(h)
if item == mid:
$"%building_type".select(h)
break
$WorldEditor.select_building(xform, id, mid)
# for h in range($"%building_type".get_item_count()):
# var item = $"%building_type".get_item_text(h)
# if item == mid:
# $"%building_type".select(h)
# break
if !$building_cursor.visible:
$building_cursor.show()
$building_cursor.global_transform.origin = xform.origin