Upgraded func_godot to 2025.8.2

This commit is contained in:
Marco 2025-09-11 15:02:08 +02:00
commit 5f4b8c5b4b
82 changed files with 3227 additions and 1939 deletions

View file

@ -1,6 +1,14 @@
@icon("res://addons/func_godot/icons/icon_quake_file.svg")
class_name QuakeMapFile
extends Resource
class_name QuakeMapFile extends Resource
## Map file that can be built by [FuncGodotMap].
##
## Map file that can be built by a [FuncGodotMap]. Supports the Quake and Valve map formats.
##
## @tutorial(Quake Wiki Map Format Article): https://quakewiki.org/wiki/Quake_Map_Format
## @tutorial(Valve Developer Wiki VMF Article): https://developer.valvesoftware.com/wiki/VMF_(Valve_Map_Format)
## Number of times this map file has been imported.
@export var revision: int = 0
@export_multiline var map_data: String = ""
## Raw map data.
@export_multiline var map_data: String = ""

View file

@ -1 +1 @@
uid://she01epxy7i3
uid://cxvwf50mehesf

View file

@ -1,8 +1,5 @@
@tool
class_name QuakeMapImportPlugin
extends EditorImportPlugin
# Quake super.map import plugin
class_name QuakeMapImportPlugin extends EditorImportPlugin
func _get_importer_name() -> String:
return 'func_godot.map'
@ -14,7 +11,7 @@ func _get_resource_type() -> String:
return 'Resource'
func _get_recognized_extensions() -> PackedStringArray:
return PackedStringArray(['map'])
return PackedStringArray(['map','vmf'])
func _get_priority():
return 1.0
@ -36,12 +33,11 @@ func _import(source_file, save_path, options, r_platform_variants, r_gen_files)
var map_resource : QuakeMapFile = null
var existing_resource := load(save_path_str) as QuakeMapFile
if(existing_resource != null):
map_resource = existing_resource
if ResourceLoader.exists(save_path_str):
map_resource = load(save_path_str) as QuakeMapFile
map_resource.revision += 1
else:
map_resource = QuakeMapFile.new()
map_resource.map_data = FileAccess.open(source_file, FileAccess.READ).get_as_text(true)
return ResourceSaver.save(map_resource, save_path_str)
return ResourceSaver.save(map_resource, save_path_str)

View file

@ -1 +1 @@
uid://cfpjdmglygjlv
uid://dnsj08ot32vpc

View file

@ -1,7 +1,13 @@
@icon("res://addons/func_godot/icons/icon_quake_file.svg")
class_name QuakePaletteFile
extends Resource
class_name QuakePaletteFile extends Resource
## Quake LMP palette format file used with [QuakeWadFile].
##
## Quake LMP palette format file used in conjunction with a Quake WAD2 format [QuakeWadFile].
## Not required for the Valve WAD3 format.
##
## @tutorial(Quake Wiki Palette Article): https://quakewiki.org/wiki/Quake_palette#palette.lmp
## Collection of [Color]s retrieved from the LMP palette file.
@export var colors: PackedColorArray
func _init(colors):

View file

@ -1 +1 @@
uid://b8dfwqf5k3175
uid://dqhjx7jjbif5d

View file

@ -1,8 +1,5 @@
@tool
class_name QuakePaletteImportPlugin
extends EditorImportPlugin
# Quake super.map import plugin
class_name QuakePaletteImportPlugin extends EditorImportPlugin
func _get_importer_name() -> String:
return 'func_godot.palette'
@ -58,4 +55,4 @@ func _import(source_file, save_path, options, r_platform_variants, r_gen_files)
var palette_resource := QuakePaletteFile.new(colors)
return ResourceSaver.save(palette_resource, save_path_str)
return ResourceSaver.save(palette_resource, save_path_str)

View file

@ -1 +1 @@
uid://chtjgd2rk34s3
uid://c6k7hftart3u3

View file

@ -1,8 +1,14 @@
@icon("res://addons/func_godot/icons/icon_quake_file.svg")
class_name QuakeWadFile
extends Resource
class_name QuakeWadFile extends Resource
## Texture container in the WAD2 or WAD3 format.
##
## Texture container in the Quake WAD2 or Valve WAD3 format.
##
## @tutorial(Quake Wiki WAD Article): https://quakewiki.org/wiki/Texture_Wad
## @tutorial(Valve Developer Wiki WAD3 Article): https://developer.valvesoftware.com/wiki/WAD
@export var textures: Dictionary
## Collection of [ImageTexture] imported from the WAD file.
@export var textures: Dictionary[String, ImageTexture]
func _init(textures: Dictionary = Dictionary()):
self.textures = textures

View file

@ -1 +1 @@
uid://b5qusdr1oqgud
uid://cij36hpqc46c

View file

@ -160,7 +160,7 @@ func _import(source_file, save_path, options, r_platform_variants, r_gen_files)
texture_data_array.append([name_string, width, height, pixels, palette_colors])
# Create texture resources
var textures : Dictionary = {}
var textures : Dictionary[String, ImageTexture] = {}
for texture_data in texture_data_array:
var name : String = texture_data[0]
@ -202,7 +202,7 @@ func _import(source_file, save_path, options, r_platform_variants, r_gen_files)
texture_image.generate_mipmaps()
var texture := ImageTexture.create_from_image(texture_image) #,Texture2D.FLAG_MIPMAPS | Texture2D.FLAG_REPEAT | Texture2D.FLAG_ANISOTROPIC_FILTER
textures[name] = texture
textures[name.to_lower()] = texture
# Save WAD resource
var wad_resource := QuakeWadFile.new(textures)

View file

@ -1 +1 @@
uid://dibj4yksw28jb
uid://ridgf32rxg6s