@@ -126,6 +126,7 @@ func variation_changed(variation):
126
126
constructString += " Near water"
127
127
128
128
oVariationInfoLabel.text = constructString
129
+ update_slabthings()
129
130
130
131
# enum dir {
131
132
# s = 0
@@ -184,7 +185,7 @@ func _on_SlabsetHelpButton_pressed():
184
185
var helptxt = " "
185
186
helptxt += " Slabset is loaded from /data/slabs.dat \n "
186
187
helptxt += " Columnset is loaded from /data/slabs.clm \n "
187
- helptxt += " Objectset is loaded from /data/slabs.tng \n "
188
+ helptxt += " The attached objects are loaded from /data/slabs.tng \n "
188
189
helptxt += " These sets determine the slab's appearance when placed. \n "
189
190
helptxt += " To mod the slabs that are placed in-game you'll need to export .cfg files and use them in a mappack/campaign."
190
191
@@ -274,6 +275,42 @@ func _on_ExportSlabsetClmDialog_file_selected(filePath):
274
275
else :
275
276
oMessage.big(" Error" , " Couldn't save file, maybe try saving to another directory." )
276
277
278
+ # [0] IsLight [0-1]
279
+ # [1] Variation
280
+ # [2] Subtile [0-9]
281
+ # [3] RelativeX
282
+ # [4] RelativeY
283
+ # [5] RelativeZ
284
+ # [6] Thing type
285
+ # [7] Thing subtype
286
+ # [8] Effect range
287
+
288
+ func update_slabthings():
289
+ var slabID = int(oSlabsetIDSpinBox.value)
290
+ var variation = (slabID * 28 ) + int(oVariationNumberSpinBox.value)
291
+ if variation >= Slabset.tng.size():
292
+ print(" Hide the section" )
293
+ return
294
+ var listOfObjectsOnThisVariation = Slabset.tng[ variation]
295
+ if listOfObjectsOnThisVariation.size() == 0 :
296
+ print(" Hide the section" )
297
+ return
298
+ print(" -------------------" )
299
+ print(slabID)
300
+ print(listOfObjectsOnThisVariation)
301
+ var obj = listOfObjectsOnThisVariation[ 0 ] # Get first object on variation
302
+
303
+ oObjObjectIndexSpinBox.value = 0
304
+ # oObjAddButton.value = 0
305
+ # oObjDeleteButton.value = 0
306
+ oObjThingTypeSpinBox.value = obj[ 6 ]
307
+ oObjSubtypeSpinBox.value = obj[ 7 ]
308
+ oObjIsLightSpinBox.value = obj[ 0 ]
309
+ oObjEffectRangeSpinBox.value = obj[ 8 ]
310
+ oObjSubtileSpinBox.value = obj[ 2 ]
311
+ oObjRelativeXSpinBox.value = obj[ 3 ]
312
+ oObjRelativeYSpinBox.value = obj[ 4 ]
313
+ oObjRelativeZSpinBox.value = obj[ 5 ]
277
314
278
315
func _on_ObjAddButton_pressed():
279
316
pass # Replace with function body.
0 commit comments