Skip to content

Commit

Permalink
'Use slab ownership' defaults to checked, clicking ownership icon now…
Browse files Browse the repository at this point in the history
… unchecks 'Use slab ownership'
  • Loading branch information
rainlizard committed Apr 6, 2024
1 parent c28f209 commit e3e60f0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
1 change: 1 addition & 0 deletions Scenes/Main.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -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__ = {
Expand Down
3 changes: 2 additions & 1 deletion Scenes/OwnerSelection.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
8 changes: 1 addition & 7 deletions Scenes/Selector.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e3e60f0

Please sign in to comment.