Skip to content

Commit

Permalink
custom->fake
Browse files Browse the repository at this point in the history
  • Loading branch information
rainlizard committed Jun 3, 2024
1 parent a2427ff commit 23c9124
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Scenes/CustomSlabSystem.gd
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func attempt_to_remove_custom_slab(header_id):

func remove_custom_slab(header_id):
if Slabs.data.has(header_id) == false:
oMessage.quick("Tried to remove a custom slab that wasn't present in the data")
oMessage.quick("Tried to remove a fake slab that wasn't present in the data")
return

Slabs.data.erase(header_id)
Expand All @@ -133,7 +133,7 @@ func remove_custom_slab(header_id):

cfg.save(Settings.unearthdata.plus_file("custom_slabs.cfg"))

oMessage.quick("Removed custom slab: " + str(header_id))
oMessage.quick("Removed fake slab: " + str(header_id))

func get_top_fake_cube_face(indexIn3x3, slabID):
var cubesArray = Slabs.fake_extra_data[slabID][Slabs.FAKE_CUBE_DATA][indexIn3x3]
Expand Down
6 changes: 3 additions & 3 deletions Scenes/Main.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -2153,7 +2153,7 @@ dialog_text = "Are you sure you want to exit?"
dialog_autowrap = true
script = ExtResource( 61 )

[node name="ConfirmDeleteCustomSlab" type="ConfirmationDialog" parent="Ui/UiSystem"]
[node name="ConfirmDeleteFakeSlab" type="ConfirmationDialog" parent="Ui/UiSystem"]
visible = true
margin_left = 916.0
margin_top = -181.0
Expand All @@ -2162,7 +2162,7 @@ margin_bottom = -76.0
rect_min_size = Vector2( 300, 105 )
popup_exclusive = true
window_title = "Confirm remove"
dialog_text = "Remove this Custom Slab?"
dialog_text = "Remove this Fake Slab?"
dialog_autowrap = true
script = ExtResource( 61 )

Expand Down Expand Up @@ -7479,7 +7479,7 @@ script = SubResource( 20 )
[connection signal="confirmed" from="Ui/UiSystem/ConfirmDelete" to="Ui/UiSystem/MapBrowser" method="_on_ConfirmDelete_confirmed"]
[connection signal="confirmed" from="Ui/UiSystem/ConfirmDiscardChanges" to="Ui/UiSystem/Menu" method="_on_ConfirmDiscardChanges_confirmed"]
[connection signal="confirmed" from="Ui/UiSystem/ConfirmQuit" to="Editor" method="_on_ConfirmQuit_confirmed"]
[connection signal="confirmed" from="Ui/UiSystem/ConfirmDeleteCustomSlab" to="Ui/UiTools/PickSlabWindow" method="_on_ConfirmDeleteCustomSlab_confirmed"]
[connection signal="confirmed" from="Ui/UiSystem/ConfirmDeleteFakeSlab" to="Ui/UiTools/PickSlabWindow" method="_on_ConfirmDeleteCustomSlab_confirmed"]
[connection signal="pressed" from="Ui/UiSystem/ConfirmSaveBeforeQuit/VBoxContainer/HBoxContainer/ButtonConfirmExitSave" to="Ui/UiSystem/ConfirmSaveBeforeQuit" method="_on_ButtonConfirmExitSave_pressed"]
[connection signal="pressed" from="Ui/UiSystem/ConfirmSaveBeforeQuit/VBoxContainer/HBoxContainer/ButtonConfirmExitDontSave" to="Ui/UiSystem/ConfirmSaveBeforeQuit" method="_on_ButtonConfirmExitDontSave_pressed"]
[connection signal="pressed" from="Ui/UiSystem/ConfirmSaveBeforeQuit/VBoxContainer/HBoxContainer/ButtonConfirmExitCancel" to="Ui/UiSystem/ConfirmSaveBeforeQuit" method="_on_ButtonConfirmExitCancel_pressed"]
Expand Down
10 changes: 5 additions & 5 deletions Scenes/PickSlabWindow.gd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ onready var oDisplaySlxNumbers = Nodelist.list["oDisplaySlxNumbers"]
onready var oCustomSlabSystem = Nodelist.list["oCustomSlabSystem"]
onready var oColumnEditor = Nodelist.list["oColumnEditor"]
onready var oPlaceLockedCheckBox = Nodelist.list["oPlaceLockedCheckBox"]
onready var oConfirmDeleteCustomSlab = Nodelist.list["oConfirmDeleteCustomSlab"]
onready var oConfirmDeleteFakeSlab = Nodelist.list["oConfirmDeleteFakeSlab"]
onready var oAddCustomSlabWindow = Nodelist.list["oAddCustomSlabWindow"]
onready var oOverheadGraphics = Nodelist.list["oOverheadGraphics"]
onready var oSlabNameDisplay = Nodelist.list["oSlabNameDisplay"]
Expand Down Expand Up @@ -251,14 +251,14 @@ func _on_slab_portrait_gui_input(event, id):
var oGridContainer = current_grid_container()
if oGridContainer != tabs[Slabs.TAB_CUSTOM][GRIDCON_PATH]:
return
Utils.popup_centered(oConfirmDeleteCustomSlab)
Utils.popup_centered(oConfirmDeleteFakeSlab)
var slabID = id.get_meta("ID_of_slab")
oConfirmDeleteCustomSlab.set_meta("ID_TO_DELETE", slabID)
oConfirmDeleteFakeSlab.set_meta("ID_TO_DELETE", slabID)
_on_hovered_none()


func _on_ConfirmDeleteCustomSlab_confirmed():
var slabID = oConfirmDeleteCustomSlab.get_meta("ID_TO_DELETE")
func _on_ConfirmDeleteFakeSlab_confirmed():
var slabID = oConfirmDeleteFakeSlab.get_meta("ID_TO_DELETE")
var gridContainer = tabs[Slabs.TAB_CUSTOM][GRIDCON_PATH]
for child in gridContainer.get_children():
if child.has_meta("ID_of_slab") and child.get_meta("ID_of_slab") == slabID:
Expand Down

0 comments on commit 23c9124

Please sign in to comment.