@@ -224,37 +224,37 @@ func _on_SlabsetCopyValues_pressed():
224
224
oPickSlabWindow._on_pressed_add_new_custom_slab()
225
225
226
226
227
- func _on_ExportSlabsDat_pressed():
228
- Utils.popup_centered(oExportSlabsetDatDialog)
229
- oExportSlabsetDatDialog.current_dir = oGame.DK_DATA_DIRECTORY .plus_file(" " )
230
- oExportSlabsetDatDialog.current_path = oGame.DK_DATA_DIRECTORY .plus_file(" " )
231
- oExportSlabsetDatDialog.current_file = " slabs.dat"
232
- func _on_ExportSlabsClm_pressed():
233
- Utils.popup_centered(oExportSlabsetClmDialog)
234
- oExportSlabsetClmDialog.current_dir = oGame.DK_DATA_DIRECTORY .plus_file(" " )
235
- oExportSlabsetClmDialog.current_path = oGame.DK_DATA_DIRECTORY .plus_file(" " )
236
- oExportSlabsetClmDialog.current_file = " slabs.clm"
227
+ # func _on_ExportSlabsDat_pressed():
228
+ # Utils.popup_centered(oExportSlabsetDatDialog)
229
+ # oExportSlabsetDatDialog.current_dir = oGame.GAME_DIRECTORY .plus_file("")
230
+ # oExportSlabsetDatDialog.current_path = oGame.GAME_DIRECTORY .plus_file("")
231
+ # oExportSlabsetDatDialog.current_file = "slabs.dat"
232
+ # func _on_ExportSlabsClm_pressed():
233
+ # Utils.popup_centered(oExportSlabsetClmDialog)
234
+ # oExportSlabsetClmDialog.current_dir = oGame.GAME_DIRECTORY .plus_file("")
235
+ # oExportSlabsetClmDialog.current_path = oGame.GAME_DIRECTORY .plus_file("")
236
+ # oExportSlabsetClmDialog.current_file = "slabs.clm"
237
237
238
238
func _on_ExportSlabsCfg_pressed():
239
239
Utils.popup_centered(oExportSlabsetCfgDialog)
240
- # oExportSlabsetCfgDialog.current_dir = oGame.DK_DATA_DIRECTORY .plus_file("")
241
- # oExportSlabsetCfgDialog.current_path = oGame.DK_DATA_DIRECTORY .plus_file("")
240
+ oExportSlabsetCfgDialog.current_dir = oGame.GAME_DIRECTORY .plus_file(" " )
241
+ oExportSlabsetCfgDialog.current_path = oGame.GAME_DIRECTORY .plus_file(" " )
242
242
oExportSlabsetCfgDialog.current_file = " slabset.cfg"
243
243
func _on_ImportSlabsCfg_pressed():
244
244
Utils.popup_centered(oImportSlabsetCfgDialog)
245
- # oExportSlabsetCfgDialog .current_dir = oGame.DK_DATA_DIRECTORY .plus_file("")
246
- # oExportSlabsetCfgDialog .current_path = oGame.DK_DATA_DIRECTORY .plus_file("")
245
+ oImportSlabsetCfgDialog .current_dir = oGame.GAME_DIRECTORY .plus_file(" " )
246
+ oImportSlabsetCfgDialog .current_path = oGame.GAME_DIRECTORY .plus_file(" " )
247
247
oImportSlabsetCfgDialog.current_file = " slabset.cfg"
248
248
249
249
func _on_ExportColumnsCfg_pressed():
250
250
Utils.popup_centered(oExportColumnsetCfgDialog)
251
- # oExportColumnsetCfgDialog.current_dir = oGame.DK_DATA_DIRECTORY .plus_file("")
252
- # oExportColumnsetCfgDialog.current_path = oGame.DK_DATA_DIRECTORY .plus_file("")
251
+ oExportColumnsetCfgDialog.current_dir = oGame.GAME_DIRECTORY .plus_file(" " )
252
+ oExportColumnsetCfgDialog.current_path = oGame.GAME_DIRECTORY .plus_file(" " )
253
253
oExportColumnsetCfgDialog.current_file = " columnset.cfg"
254
254
func _on_ImportColumnsCfg_pressed():
255
255
Utils.popup_centered(oImportColumnsetCfgDialog)
256
- # oExportSlabsetCfgDialog .current_dir = oGame.DK_DATA_DIRECTORY .plus_file("")
257
- # oExportSlabsetCfgDialog .current_path = oGame.DK_DATA_DIRECTORY .plus_file("")
256
+ oImportColumnsetCfgDialog .current_dir = oGame.GAME_DIRECTORY .plus_file(" " )
257
+ oImportColumnsetCfgDialog .current_path = oGame.GAME_DIRECTORY .plus_file(" " )
258
258
oImportColumnsetCfgDialog.current_file = " columnset.cfg"
259
259
260
260
@@ -297,34 +297,34 @@ func _on_ExportSlabsetDatDialog_file_selected(filePath):
297
297
oMessage.big(" Error" , " Couldn't save file, maybe try saving to another directory." )
298
298
299
299
300
- func _on_ExportSlabsetClmDialog_file_selected(filePath):
301
- var buffer = StreamPeerBuffer.new()
302
-
303
- var numberOfClmEntries = 2048
304
- buffer.put_16(numberOfClmEntries)
305
- buffer.put_16(0 )
300
+ # func _on_ExportSlabsetClmDialog_file_selected(filePath):
301
+ # var buffer = StreamPeerBuffer.new()
302
+ #
303
+ # var numberOfClmEntries = 2048
306
304
# buffer.put_16(numberOfClmEntries)
307
- # buffer.put_data([0,0])
308
305
# buffer.put_16(0)
309
- # buffer.put_data([0,0])
310
-
311
- for entry in numberOfClmEntries:
312
- buffer.put_16(Columnset.utilized[ entry] ) # 0-1
313
- buffer.put_8((Columnset.permanent[ entry] & 1 ) + ((Columnset.lintel[ entry] & 7 ) << 1 ) + ((Columnset.height[ entry] & 15 ) << 4 ))
314
- buffer.put_16(Columnset.solidMask[ entry] ) # 3-4
315
- buffer.put_16(Columnset.floorTexture[ entry] ) # 5-6
316
- buffer.put_8(Columnset.orientation[ entry] ) # 7
317
-
318
- for cubeNumber in 8 :
319
- buffer.put_16(Columnset.cubes[ entry][ cubeNumber] ) # 8-23
320
-
321
- var file = File.new()
322
- if file.open(filePath,File.WRITE) == OK:
323
- file.store_buffer(buffer.data_array)
324
- file.close()
325
- oMessage.quick(" Saved: " + filePath)
326
- else :
327
- oMessage.big(" Error" , " Couldn't save file, maybe try saving to another directory." )
306
+ # # buffer.put_16(numberOfClmEntries)
307
+ # # buffer.put_data([0,0])
308
+ # # buffer.put_16(0)
309
+ # # buffer.put_data([0,0])
310
+ #
311
+ # for entry in numberOfClmEntries:
312
+ # buffer.put_16(Columnset.utilized[entry]) # 0-1
313
+ # buffer.put_8((Columnset.permanent[entry] & 1) + ((Columnset.lintel[entry] & 7) << 1) + ((Columnset.height[entry] & 15) << 4))
314
+ # buffer.put_16(Columnset.solidMask[entry]) # 3-4
315
+ # buffer.put_16(Columnset.floorTexture[entry]) # 5-6
316
+ # buffer.put_8(Columnset.orientation[entry]) # 7
317
+ #
318
+ # for cubeNumber in 8:
319
+ # buffer.put_16(Columnset.cubes[entry][cubeNumber]) # 8-23
320
+ #
321
+ # var file = File.new()
322
+ # if file.open(filePath,File.WRITE) == OK:
323
+ # file.store_buffer(buffer.data_array)
324
+ # file.close()
325
+ # oMessage.quick("Saved: " + filePath)
326
+ # else:
327
+ # oMessage.big("Error", "Couldn't save file, maybe try saving to another directory.")
328
328
329
329
func get_current_variation():
330
330
return (int(oSlabsetIDSpinBox.value) * 28 ) + int(oVariationNumberSpinBox.value)
0 commit comments