Skip to content

Commit

Permalink
Removed 'unknown data' setting
Browse files Browse the repository at this point in the history
  • Loading branch information
rainlizard committed Apr 18, 2024
1 parent 1a57d83 commit c874da0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 121 deletions.
5 changes: 0 additions & 5 deletions Autoload/Settings.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions Scenes/Main.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]
Expand Down
6 changes: 0 additions & 6 deletions Scenes/SettingsWindow.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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"))
Expand Down Expand Up @@ -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)
116 changes: 13 additions & 103 deletions Scenes/ThingDetails.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand All @@ -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:
Expand All @@ -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))
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit c874da0

Please sign in to comment.