Skip to content

Commit 7b1420a

Browse files
committed
torch slabs, wall side cursor hover
1 parent 1a48c70 commit 7b1420a

11 files changed

+132
-276
lines changed

Autoload/Settings.gd

+5
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ var listOfSettings = [
7575
"chance_effect_lava",
7676
"auto_open_map_settings",
7777
"fortify",
78+
"automatic_torch_slabs",
7879
# These four are read inside Viewport script
7980
# "editor_window_position",
8081
# "editor_window_size",
@@ -358,6 +359,10 @@ func game_setting(doWhat,string,value):
358359
var oPlaceThingsAnywhere = $'../Main/Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements/MarginContainer/VBoxContainer/PlaceThingsAnywhere'
359360
if doWhat == SET: oPlaceThingsAnywhere.pressed = value
360361
if doWhat == GET: return oPlaceThingsAnywhere.pressed
362+
"automatic_torch_slabs":
363+
var oAutomaticTorchSlabsCheckbox = $'../Main/Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements/MarginContainer/VBoxContainer/AutomaticTorchSlabsCheckbox'
364+
if doWhat == SET: oAutomaticTorchSlabsCheckbox.pressed = value
365+
if doWhat == GET: return oAutomaticTorchSlabsCheckbox.pressed
361366
"wallauto_art":
362367
var oAutoWallArtButton = $'../Main/Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements/MarginContainer/VBoxContainer/GridContainer/AutoWallArtButton'
363368
if doWhat == SET: oAutoWallArtButton.text = value

Autoload/Slabs.gd

+2-3
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ var auto_wall_updates_these = {
5959
WALL_WITH_WOMAN:null,
6060
WALL_WITH_PAIR:null,
6161
WALL_DAMAGED:null,
62-
WALL_AUTOMATIC:null,
6362
}
6463

6564
var rooms_with_middle_slab = {
@@ -158,9 +157,9 @@ var data = {
158157
ROCK: ["Impenetrable Rock", BLOCK_SLAB, BITMASK_TALL, PANEL_TOP_VIEW, 0, TAB_MAINSLAB, WIBBLE_ON, REMEMBER_PATH, NOT_OWNABLE], # 0
159158
GOLD: ["Gold Seam", BLOCK_SLAB, BITMASK_TALL, PANEL_TOP_VIEW, 0, TAB_MAINSLAB, WIBBLE_ON, REMEMBER_PATH, NOT_OWNABLE], # 1
160159
EARTH: ["Earth", BLOCK_SLAB, BITMASK_TALL, PANEL_TOP_VIEW, 0, TAB_MAINSLAB, WIBBLE_ON, REMEMBER_PATH, NOT_OWNABLE], # 2
161-
EARTH_WITH_TORCH: ["Torch Earth", BLOCK_SLAB, BITMASK_TALL, PANEL_SIDE_VIEW, 4, TAB_OTHER, WIBBLE_ON, REMEMBER_PATH, NOT_OWNABLE], # 3
160+
EARTH_WITH_TORCH: ["Torch Earth", BLOCK_SLAB, BITMASK_TALL, PANEL_SIDE_VIEW, 4, TAB_MAINSLAB, WIBBLE_ON, REMEMBER_PATH, NOT_OWNABLE], # 3
162161
WALL_WITH_BANNER: ["Banner Wall", BLOCK_SLAB, BITMASK_WALL, PANEL_SIDE_VIEW, 4, TAB_OTHER, WIBBLE_ON, REMEMBER_PATH, OWNABLE], # 4
163-
WALL_WITH_TORCH: ["Torch Wall", BLOCK_SLAB, BITMASK_WALL, PANEL_SIDE_VIEW, 4, TAB_OTHER, WIBBLE_ON, REMEMBER_PATH, OWNABLE], # 5
162+
WALL_WITH_TORCH: ["Torch Wall", BLOCK_SLAB, BITMASK_WALL, PANEL_SIDE_VIEW, 4, TAB_MAINSLAB, WIBBLE_ON, REMEMBER_PATH, OWNABLE], # 5
164163
WALL_WITH_TWINS: ["Twins Wall", BLOCK_SLAB, BITMASK_WALL, PANEL_SIDE_VIEW, 4, TAB_OTHER, WIBBLE_ON, REMEMBER_PATH, OWNABLE], # 6
165164
WALL_WITH_WOMAN: ["Woman Wall", BLOCK_SLAB, BITMASK_WALL, PANEL_SIDE_VIEW, 4, TAB_OTHER, WIBBLE_ON, REMEMBER_PATH, OWNABLE], # 7
166165
WALL_WITH_PAIR: ["Pair Wall", BLOCK_SLAB, BITMASK_WALL, PANEL_SIDE_VIEW, 4, TAB_OTHER, WIBBLE_ON, REMEMBER_PATH, OWNABLE], # 8

Scenes/Main.tscn

+19-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[gd_scene load_steps=174 format=2]
1+
[gd_scene load_steps=175 format=2]
22

33
[ext_resource path="res://Scenes/SlabStyle.gd" type="Script" id=1]
44
[ext_resource path="res://Scenes/SlabPlacement.gd" type="Script" id=2]
@@ -33,6 +33,7 @@
3333
[ext_resource path="res://Scenes/SaveMap.gd" type="Script" id=31]
3434
[ext_resource path="res://Scenes/WriteData.gd" type="Script" id=32]
3535
[ext_resource path="res://Scenes/Message.gd" type="Script" id=33]
36+
[ext_resource path="res://Scenes/SlabSideViewer.gd" type="Script" id=34]
3637
[ext_resource path="res://Scenes/ConfirmDecompression.gd" type="Script" id=35]
3738
[ext_resource path="res://Shaders/FlashNeutralRooms.gdshader" type="Shader" id=36]
3839
[ext_resource path="res://Scenes/Editor.gd" type="Script" id=37]
@@ -546,6 +547,13 @@ texture = ExtResource( 24 )
546547
centered = false
547548
script = ExtResource( 18 )
548549
550+
[node name="SlabSideViewer" type="Control" parent="Game2D/Selector/TileSelector"]
551+
show_behind_parent = true
552+
margin_right = 40.0
553+
margin_bottom = 40.0
554+
mouse_filter = 2
555+
script = ExtResource( 34 )
556+
549557
[node name="Centerer" type="Control" parent="Game2D/Selector/TileSelector"]
550558
margin_right = 96.0
551559
margin_bottom = 96.0
@@ -2403,13 +2411,13 @@ script = ExtResource( 103 )
24032411

24042412
[node name="MarginContainer" type="MarginContainer" parent="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements"]
24052413
margin_right = 544.0
2406-
margin_bottom = 593.0
2414+
margin_bottom = 626.0
24072415
size_flags_horizontal = 3
24082416
size_flags_vertical = 3
24092417

24102418
[node name="VBoxContainer" type="VBoxContainer" parent="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements/MarginContainer"]
24112419
margin_right = 544.0
2412-
margin_bottom = 593.0
2420+
margin_bottom = 626.0
24132421
mouse_filter = 2
24142422
__meta__ = {
24152423
"_edit_use_anchors_": false
@@ -2481,6 +2489,13 @@ margin_right = 532.0
24812489
margin_bottom = 198.0
24822490
text = "Place things anywhere"
24832491

2492+
[node name="AutomaticTorchSlabsCheckbox" type="CheckBox" parent="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements/MarginContainer/VBoxContainer"]
2493+
margin_top = 169.0
2494+
margin_right = 532.0
2495+
margin_bottom = 198.0
2496+
pressed = true
2497+
text = "Automatic torch slabs"
2498+
24842499
[node name="GridContainer" type="GridContainer" parent="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements/MarginContainer/VBoxContainer"]
24852500
margin_top = 202.0
24862501
margin_right = 532.0
@@ -6659,6 +6674,7 @@ script = SubResource( 20 )
66596674
[connection signal="toggled" from="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements/MarginContainer/VBoxContainer/OwnableNaturalTerrain" to="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements" method="_on_OwnableNaturalTerrain_toggled"]
66606675
[connection signal="toggled" from="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements/MarginContainer/VBoxContainer/EditableBordersCheckbox" to="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements" method="_on_EditableBordersCheckbox_toggled"]
66616676
[connection signal="toggled" from="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements/MarginContainer/VBoxContainer/PlaceThingsAnywhere" to="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements" method="_on_PlaceThingsAnywhere_toggled"]
6677+
[connection signal="toggled" from="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements/MarginContainer/VBoxContainer/AutomaticTorchSlabsCheckbox" to="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabPlacements" method="_on_AutomaticTorchSlabsCheckbox_toggled"]
66626678
[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"]
66636679
[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"]
66646680
[connection signal="toggled" from="Ui/UiSystem/PreferencesWindow/VBoxContainer/TabSettings/TabUI/VBoxContainer/CheckBoxHideUnknown" to="Ui/UiSystem/PreferencesWindow" method="_on_CheckBoxHideUnknown_toggled"]

Scenes/OnlyOwnership.gd

+6-6
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ func initialize_grid_items():
2626

2727
var keeperColourIconPic = id.get_node("TextureRect")
2828
match i:
29-
0: keeperColourIconPic.texture = load("res://edited_images/plyrsym_32/symbol_player_red_std.png")
30-
1: keeperColourIconPic.texture = load("res://edited_images/plyrsym_32/symbol_player_blue_std.png")
31-
2: keeperColourIconPic.texture = load("res://edited_images/plyrsym_32/symbol_player_green_std.png")
32-
3: keeperColourIconPic.texture = load("res://edited_images/plyrsym_32/symbol_player_yellow_std.png")
33-
4: keeperColourIconPic.texture = load("res://edited_images/plyrsym_32/symbol_player_white_2.png")
34-
5: keeperColourIconPic.texture = load("res://edited_images/plyrsym_32/symbol_player_any_dis.png")
29+
0: keeperColourIconPic.texture = preload("res://edited_images/plyrsym_32/symbol_player_red_std.png")
30+
1: keeperColourIconPic.texture = preload("res://edited_images/plyrsym_32/symbol_player_blue_std.png")
31+
2: keeperColourIconPic.texture = preload("res://edited_images/plyrsym_32/symbol_player_green_std.png")
32+
3: keeperColourIconPic.texture = preload("res://edited_images/plyrsym_32/symbol_player_yellow_std.png")
33+
4: keeperColourIconPic.texture = preload("res://edited_images/plyrsym_32/symbol_player_white_2.png")
34+
5: keeperColourIconPic.texture = preload("res://edited_images/plyrsym_32/symbol_player_any_dis.png")
3535

3636
oGridContainer.add_child(id)
3737

Scenes/OwnerSelection.gd

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ func _ready():
2323

2424
var setText = ""
2525
match i:
26-
0: id.texture_normal = load("res://edited_images/plyrsym_32/symbol_player_red_std.png")
27-
1: id.texture_normal = load("res://edited_images/plyrsym_32/symbol_player_blue_std.png")
28-
2: id.texture_normal = load("res://edited_images/plyrsym_32/symbol_player_green_std.png")
29-
3: id.texture_normal = load("res://edited_images/plyrsym_32/symbol_player_yellow_std.png")
30-
4: id.texture_normal = load("res://edited_images/plyrsym_32/symbol_player_white_2.png")
31-
5: id.texture_normal = load("res://edited_images/plyrsym_32/symbol_player_any_dis.png")
26+
0: id.texture_normal = preload("res://edited_images/plyrsym_32/symbol_player_red_std.png")
27+
1: id.texture_normal = preload("res://edited_images/plyrsym_32/symbol_player_blue_std.png")
28+
2: id.texture_normal = preload("res://edited_images/plyrsym_32/symbol_player_green_std.png")
29+
3: id.texture_normal = preload("res://edited_images/plyrsym_32/symbol_player_yellow_std.png")
30+
4: id.texture_normal = preload("res://edited_images/plyrsym_32/symbol_player_white_2.png")
31+
5: id.texture_normal = preload("res://edited_images/plyrsym_32/symbol_player_any_dis.png")
3232
setText = Constants.ownershipNames[i]
3333

3434
add_child_to_grid(id, setText)

Scenes/PickSlabWindow.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func add_slabs():
8383
for slabID in allSlabIDs:
8484
var putIntoTab = Slabs.data[slabID][Slabs.EDITOR_TAB]
8585
if putIntoTab != Slabs.TAB_NONE:
86-
var scene = load("res://Scenes/SlabDisplay.tscn")
86+
var scene = preload("res://Scenes/SlabDisplay.tscn")
8787
var id = scene.instance()
8888
var slabVariation
8989

Scenes/Selection.gd

+4-3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ onready var oMirrorPlacementCheckBox = Nodelist.list["oMirrorPlacementCheckBox"]
2929
onready var oLoadingBar = Nodelist.list["oLoadingBar"]
3030
onready var oBrushPreview = Nodelist.list["oBrushPreview"]
3131
onready var oPlaceThingsAnywhere = Nodelist.list["oPlaceThingsAnywhere"]
32+
onready var oSlabSideViewer = Nodelist.list["oSlabSideViewer"]
3233

3334
enum {
3435
CONSTRUCT_BRUSH
@@ -52,8 +53,7 @@ var paintSubtype = null setget newPaintSubtype
5253
var paintOwnership = 0 setget newOwnership
5354

5455
func _process(delta):
55-
get_slab_under_cursor()
56-
56+
update_under_cursor()
5757
clean_up_cursor_array()
5858

5959
if oSelector.mode == oSelector.MODE_SUBTILE:
@@ -92,9 +92,10 @@ func newPaintSlab(value):
9292
oPickThingWindow.set_selection(null, null) # Deselect anything in thing window
9393
paintSlab = value
9494

95-
func get_slab_under_cursor():
95+
func update_under_cursor():
9696
cursorOverSlab = oSelector.get_slabID_at_pos(oSelector.cursorTile)
9797
cursorOverSlabOwner = oDataOwnership.get_cellv(oSelector.cursorTile)
98+
oSlabSideViewer.update_side()
9899

99100
func update_paint():
100101
match oSelector.mode:

Scenes/Selector.gd

+1-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ onready var oLoadingBar = Nodelist.list["oLoadingBar"]
3535
onready var oBrushPreview = Nodelist.list["oBrushPreview"]
3636
onready var oDataClm = Nodelist.list["oDataClm"]
3737
onready var oDataClmPos = Nodelist.list["oDataClmPos"]
38-
38+
onready var oSlabSideViewer = Nodelist.list["oSlabSideViewer"]
3939

4040
onready var TILE_SIZE = Constants.TILE_SIZE
4141
onready var SUBTILE_SIZE = Constants.SUBTILE_SIZE
@@ -135,8 +135,6 @@ func mouse_button_on_field():
135135
oInspector.inspect_something(oSelection.cursorOnInstancesArray[0])
136136
else:
137137
oInspector.deselect()
138-
139-
140138

141139
# Holding down button
142140
if Input.is_action_pressed("mouse_left"):

0 commit comments

Comments
 (0)