mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-17 20:03:47 +00:00
Updated func_godot
This commit is contained in:
parent
d8d348640c
commit
01a852de9b
170 changed files with 1705 additions and 2296 deletions
|
|
@ -38,6 +38,6 @@ func _import(source_file, save_path, options, r_platform_variants, r_gen_files)
|
|||
map_resource.revision += 1
|
||||
else:
|
||||
map_resource = QuakeMapFile.new()
|
||||
map_resource.map_data = FileAccess.open(source_file, FileAccess.READ).get_as_text(true)
|
||||
map_resource.map_data = FileAccess.open(source_file, FileAccess.READ).get_as_text()
|
||||
|
||||
return ResourceSaver.save(map_resource, save_path_str)
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ func _import(source_file, save_path, options, r_platform_variants, r_gen_files)
|
|||
var file = FileAccess.open(source_file, FileAccess.READ)
|
||||
if file == null:
|
||||
var err = FileAccess.get_open_error()
|
||||
print(['Error opening super.lmp file: ', err])
|
||||
printerr(['Error opening super.lmp file: ', err])
|
||||
return err
|
||||
|
||||
var colors := PackedColorArray()
|
||||
|
|
|
|||
|
|
@ -10,5 +10,5 @@ class_name QuakeWadFile extends Resource
|
|||
## Collection of [ImageTexture] imported from the WAD file.
|
||||
@export var textures: Dictionary[String, ImageTexture]
|
||||
|
||||
func _init(textures: Dictionary = Dictionary()):
|
||||
func _init(textures: Dictionary[String, ImageTexture] = {}):
|
||||
self.textures = textures
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ func _import(source_file, save_path, options, r_platform_variants, r_gen_files)
|
|||
var file = FileAccess.open(source_file, FileAccess.READ)
|
||||
if file == null:
|
||||
var err = FileAccess.get_open_error()
|
||||
print(['Error opening super.wad file: ', err])
|
||||
printerr(['Error opening super.wad file: ', err])
|
||||
return err
|
||||
|
||||
# Read WAD header
|
||||
|
|
@ -81,13 +81,13 @@ func _import(source_file, save_path, options, r_platform_variants, r_gen_files)
|
|||
if magic_string == 'WAD3':
|
||||
wad_format = WadFormat.HalfLife
|
||||
elif magic_string != 'WAD2':
|
||||
print('Error: Invalid WAD magic')
|
||||
printerr('Error: Invalid WAD magic')
|
||||
return ERR_INVALID_DATA
|
||||
|
||||
var palette_path : String = options['palette_file']
|
||||
var palette_file : QuakePaletteFile = load(palette_path) as QuakePaletteFile
|
||||
if wad_format == WadFormat.Quake and not palette_file:
|
||||
print('Error: Invalid Quake palette file')
|
||||
printerr('Error: Invalid Quake palette file')
|
||||
file.close()
|
||||
return ERR_CANT_ACQUIRE_RESOURCE
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue