From e3e60f05ea4380b1dc85e1b458ff7107b33534ea Mon Sep 17 00:00:00 2001 From: rainlizard <15337628+rainlizard@users.noreply.github.com> Date: Sun, 7 Apr 2024 09:03:52 +1000 Subject: [PATCH] 'Use slab ownership' defaults to checked, clicking ownership icon now unchecks 'Use slab ownership' --- Scenes/Main.tscn | 1 + Scenes/OwnerSelection.gd | 3 ++- Scenes/Selector.gd | 8 +------- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Scenes/Main.tscn b/Scenes/Main.tscn index d7155c24..2e473046 100644 --- a/Scenes/Main.tscn +++ b/Scenes/Main.tscn @@ -1378,6 +1378,7 @@ margin_right = 276.0 margin_bottom = 38.0 hint_tooltip = "The ownership of placed Things will be set to the ownership of the underlying slab" focus_mode = 0 +pressed = true text = "Use slab ownership" script = ExtResource( 93 ) __meta__ = { diff --git a/Scenes/OwnerSelection.gd b/Scenes/OwnerSelection.gd index b62913ac..7ba2f49f 100644 --- a/Scenes/OwnerSelection.gd +++ b/Scenes/OwnerSelection.gd @@ -47,7 +47,8 @@ func add_child_to_grid(id, set_text): func pressed(id): var setValue = id.get_meta("grid_value") if oUseSlabOwnerCheckBox.pressed == true and oUseSlabOwnerCheckBox.visible == true: - setValue = 5 + #setValue = 5 + oUseSlabOwnerCheckBox.pressed = false oSelection.paintOwnership = setValue set_selection(setValue) oOnlyOwnership.select_appropriate_button() diff --git a/Scenes/Selector.gd b/Scenes/Selector.gd index fc2baa07..1661e6d2 100644 --- a/Scenes/Selector.gd +++ b/Scenes/Selector.gd @@ -298,13 +298,7 @@ func moved_to_new_subtile(): if mode == MODE_SUBTILE: canPlace = true if oUseSlabOwnerCheckBox.pressed == true and visible == true: - if oUseSlabOwnerCheckBox.pressed == true: - oSelection.paintOwnership = oDataOwnership.get_cellv(cursorTile) - #oSelection.newOwnership(oDataOwnership.get_cellv(cursorTile)) - #oUi.update_theme_colour(oDataOwnership.get_cellv(cursorTile)) -# var realPos = Vector2((cursorSubtile.x*SUBTILE_SIZE)+(SUBTILE_SIZE/2),(cursorSubtile.y*SUBTILE_SIZE)+(SUBTILE_SIZE/2)) -# var instanceAtCursorSubtile = instance_position(realPos, "Instance") -# print(instanceAtCursorSubtile) + oSelection.paintOwnership = oDataOwnership.get_cellv(cursorTile) #func fadeOutWalls(delta): # if Slabs.array[oSelection.cursorOverSlab][Slabs.SIDE_OF] == Slabs.SIDE_SLAB: