From c874da076f38e6c320e000b121931c36b9d6fbee Mon Sep 17 00:00:00 2001 From: rainlizard <15337628+rainlizard@users.noreply.github.com> Date: Thu, 18 Apr 2024 21:14:37 +1000 Subject: [PATCH] Removed 'unknown data' setting --- Autoload/Settings.gd | 5 -- Scenes/Main.tscn | 7 --- Scenes/SettingsWindow.gd | 6 -- Scenes/ThingDetails.gd | 116 +++++---------------------------------- 4 files changed, 13 insertions(+), 121 deletions(-) diff --git a/Autoload/Settings.gd b/Autoload/Settings.gd index 09d68d7f..9c34cf5e 100644 --- a/Autoload/Settings.gd +++ b/Autoload/Settings.gd @@ -54,7 +54,6 @@ var listOfSettings = [ "details_viewer_window_position", "slab_style_window_size", "slab_style_window_position", - "hide_unknown_data", "ownable_natural_terrain", "editable_borders", "bridges_only_on_liquid", @@ -308,10 +307,6 @@ func game_setting(doWhat,string,value): # var oPropertiesWindow = $'../Main/Ui/UiTools/PropertiesWindow' # if doWhat == SET: oPropertiesWindow.display_details = value # if doWhat == GET: return oPropertiesWindow.display_details - "hide_unknown_data": - var oThingDetails = $'../Main/Ui/UiTools/PropertiesWindow/VBoxContainer/PropertiesTabs/ThingDetails' - if doWhat == SET: oThingDetails.HIDE_UNKNOWN_DATA = value - if doWhat == GET: return oThingDetails.HIDE_UNKNOWN_DATA "ownable_natural_terrain": var oOwnableNaturalTerrain = $'../Main/Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements/MarginContainer/VBoxContainer/OwnableNaturalTerrain' if doWhat == SET: oOwnableNaturalTerrain.pressed = value diff --git a/Scenes/Main.tscn b/Scenes/Main.tscn index 0d51c034..8b028b31 100644 --- a/Scenes/Main.tscn +++ b/Scenes/Main.tscn @@ -2702,12 +2702,6 @@ margin_right = 532.0 margin_bottom = 406.0 settingText = "Ownership alpha" -[node name="CheckBoxHideUnknown" type="CheckBox" parent="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabUI/VBoxContainer"] -margin_top = 410.0 -margin_right = 532.0 -margin_bottom = 439.0 -text = "Hide unknown data (thing details)" - [node name="CheckBoxNewMapAutoOpensMapSettings" type="CheckBox" parent="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabUI/VBoxContainer"] margin_top = 410.0 margin_right = 532.0 @@ -7332,7 +7326,6 @@ script = SubResource( 20 ) [connection signal="toggled" from="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements/MarginContainer/VBoxContainer/AutomaticTorchSlabsCheckbox" to="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements" method="_on_AutomaticTorchSlabsCheckbox_toggled"] [connection signal="pressed" from="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements/MarginContainer/VBoxContainer/GridContainer/AutoWallArtButton" to="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements" method="_on_AutoWallArtButton_pressed"] [connection signal="focus_exited" from="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements/MarginContainer/VBoxContainer/GridContainer/DamagedWallLineEdit" to="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements" method="_on_DamagedWallLineEdit_focus_exited"] -[connection signal="toggled" from="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabUI/VBoxContainer/CheckBoxHideUnknown" to="Ui/UiSystem/PreferencesWindow" method="_on_CheckBoxHideUnknown_toggled"] [connection signal="toggled" from="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabUI/VBoxContainer/CheckBoxNewMapAutoOpensMapSettings" to="Ui/UiSystem/PreferencesWindow" method="_on_CheckBoxNewMapAutoOpensMapSettings_toggled"] [connection signal="toggled" from="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabCamera/VBoxContainer/CheckBoxSmoothPan" to="Ui/UiSystem/PreferencesWindow" method="_on_CheckBoxSmoothPan_toggled"] [connection signal="toggled" from="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabCamera/VBoxContainer/CheckBoxMouseEdgePanning" to="Ui/UiSystem/PreferencesWindow" method="_on_CheckBoxMouseEdgePanning_toggled"] diff --git a/Scenes/SettingsWindow.gd b/Scenes/SettingsWindow.gd index 08539770..6ea1b891 100644 --- a/Scenes/SettingsWindow.gd +++ b/Scenes/SettingsWindow.gd @@ -37,8 +37,6 @@ onready var oCheckBoxNewMapAutoOpensMapSettings = Nodelist.list["oCheckBoxNewMap #onready var oTab2DView = Nodelist.list["oTab2DView"] #onready var oTab3DView = Nodelist.list["oTab3DView"] -onready var oCheckBoxHideUnknown = Nodelist.list["oCheckBoxHideUnknown"] - func _ready(): oTabSettings.set_tab_title(0,"Files") oTabSettings.set_tab_title(1,"Placements") @@ -76,7 +74,6 @@ func _on_SettingsWindow_about_to_show(): oUiScale.update_appearance(Settings.get_setting("ui_scale")) oSlabWindowScale.update_appearance(Settings.get_setting("slab_window_scale")) oThingWindowScale.update_appearance(Settings.get_setting("thing_window_scale")) - oCheckBoxHideUnknown.pressed = Settings.get_setting("hide_unknown_data") oOwnerAlpha.update_appearance(Settings.get_setting("graphics_ownership_alpha")) oCreatureLevelFontSizeScale.update_appearance(Settings.get_setting("font_size_creature_level_scale")) oCreatureLevelFontSizeMaxZoom.update_appearance(Settings.get_setting("font_size_creature_level_max")) @@ -179,8 +176,5 @@ func edited_OwnerAlpha(new_text): func _on_CheckBoxDisplay3dInfo_toggled(button_pressed): Settings.set_setting("display_3d_info", button_pressed) -func _on_CheckBoxHideUnknown_toggled(button_pressed): - Settings.set_setting("hide_unknown_data", button_pressed) - func _on_CheckBoxNewMapAutoOpensMapSettings_toggled(button_pressed): Settings.set_setting("auto_open_map_settings", button_pressed) diff --git a/Scenes/ThingDetails.gd b/Scenes/ThingDetails.gd index 89920e68..479a8c31 100644 --- a/Scenes/ThingDetails.gd +++ b/Scenes/ThingDetails.gd @@ -10,8 +10,6 @@ onready var oDataSlab = Nodelist.list["oDataSlab"] onready var oCurrentFormat = Nodelist.list["oCurrentFormat"] -var HIDE_UNKNOWN_DATA = true - #var rememberInstance = null func _ready(): @@ -37,7 +35,7 @@ func get_selected_or_hovered_instance(): return null func actionpoint_details(id): - for i in 5: + for i in 4: var description = null var value = null match i: @@ -53,10 +51,6 @@ func actionpoint_details(id): 3: description = "Point #" value = id.pointNumber - 4: - description = "Unknown 7" - value = id.data7 - if HIDE_UNKNOWN_DATA == true: value = null if value != null: oThingListData.add_item(description, str(value)) @@ -73,7 +67,7 @@ var data17 = null var data18_19 = null func light_details(id): - for i in 15: + for i in 5: var description = null var value = null match i: @@ -103,53 +97,13 @@ func light_details(id): value += ' (' + str(parentX) + ','+str(parentY) + ')' if id.parentTile == 65535: value = "Manually placed" - 5: - description = "Unknown 3" - value = id.data3 - if HIDE_UNKNOWN_DATA == true: value = null - 6: - description = "Unknown 4" - value = id.data4 - if HIDE_UNKNOWN_DATA == true: value = null - 7: - description = "Unknown 5" - value = id.data5 - if HIDE_UNKNOWN_DATA == true: value = null - 8: - description = "Unknown 6" - value = id.data6 - if HIDE_UNKNOWN_DATA == true: value = null - 9: - description = "Unknown 7" - value = id.data7 - if HIDE_UNKNOWN_DATA == true: value = null - 10: - description = "Unknown 8" - value = id.data8 - if HIDE_UNKNOWN_DATA == true: value = null - 11: - description = "Unknown 9" - value = id.data9 - if HIDE_UNKNOWN_DATA == true: value = null - 12: - description = "Unknown 16" - value = id.data16 - if HIDE_UNKNOWN_DATA == true: value = null - 13: - description = "Unknown 17" - value = id.data17 - if HIDE_UNKNOWN_DATA == true: value = null - 14: - description = "Unknown 18_19" - value = id.data18_19 - if HIDE_UNKNOWN_DATA == true: value = null if value != null: oThingListData.add_item(description, str(value)) func thing_details(id): - for i in 27: + for i in 16: var description = null var value = null match i: @@ -169,14 +123,6 @@ func thing_details(id): description = "Effect range" # 9-10 value = id.effectRange 5: - description = "Unknown 9" - value = id.data9 - if HIDE_UNKNOWN_DATA == true: value = null - 6: - description = "Unknown 10" - value = id.data10 - if HIDE_UNKNOWN_DATA == true: value = null - 7: description = "Attached to" # 11-12 if id.parentTile != null: var parentY = int(id.parentTile/M.ySize) @@ -190,77 +136,41 @@ func thing_details(id): value += ' (' + str(parentX) + ','+str(parentY) + ')' if id.parentTile == 65535: value = "Manually placed" - 8: - #description = "Index" # 11-12 - #value = id.index - value = null # skip - 9: - description = "Unknown 11-12" - value = id.data11_12 - if HIDE_UNKNOWN_DATA == true: value = null - 10: + 6: description = "Door orientation" # 13 match id.doorOrientation: 0: value = "E/W" 1: value = "N/S" - 11: - description = "Unknown 13" - value = id.data13 - if HIDE_UNKNOWN_DATA == true: value = null - 12: + 7: description = "Level" # 14 value = id.creatureLevel - 13: + 8: description = "Gate #" # 14 value = id.herogateNumber - 14: + 9: description = "Custom box" # 14 value = id.boxNumber - 15: + 10: description = "Door locked" # 14 value = id.doorLocked - 16: - description = "Unknown 14" - value = id.data14 - if HIDE_UNKNOWN_DATA == true: value = null - 17: - description = "Unknown 15" - value = id.data15 - if HIDE_UNKNOWN_DATA == true: value = null - 18: - description = "Unknown 16" - value = id.data16 - if HIDE_UNKNOWN_DATA == true: value = null - 19: - description = "Unknown 17" - value = id.data17 - if HIDE_UNKNOWN_DATA == true: value = null - 20: - description = "Unknown 18_19" - value = id.data18_19 - if HIDE_UNKNOWN_DATA == true: value = null - 21: - description = "Unknown 20" - value = id.data20 - if HIDE_UNKNOWN_DATA == true: value = null # FX extended fields - 22: + 11: description = "Health %" value = id.creatureInitialHealth if oCurrentFormat.selected == 0: value = null # Classic format - 23: + 12: description = "Gold held" value = id.creatureGold if oCurrentFormat.selected == 0: value = null # Classic format - 24: + 13: description = "Name" # Creature name value = id.creatureName if oCurrentFormat.selected == 0: value = null # Classic format - 25: + 14: description = "Gold value" value = id.goldValue if oCurrentFormat.selected == 0: value = null # Classic format - 26: + 15: description = "Orientation" value = id.orientation if oCurrentFormat.selected == 0: value = null # Classic format