Skip to content

Commit

Permalink
Fix monster loading on export
Browse files Browse the repository at this point in the history
  • Loading branch information
dkonar committed Feb 13, 2025
1 parent e3c7a21 commit 4b34dee
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 52 deletions.
20 changes: 16 additions & 4 deletions src/scripts/Resources.gd
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,13 @@ func load_bestiary_resources( path : String ) -> void:

var n_crea_img_pack : Dictionary = {}
n_crea_img_pack = Utils.FileHandler.read_json_dictionary_from_txt(Utils.FileHandler.read_txt_from_file(path + "img_pack.json"))
var texture_atlas: Image = load(path+"textureAtlas.png")
var texture_atlas_path : String = path+"textureAtlas.png"
var texture_atlas : Image
if (texture_atlas_path.begins_with("res://")) :
texture_atlas = load(texture_atlas_path)
else :
texture_atlas = Image.new()
var _err = texture_atlas.load(texture_atlas_path)

#load images to images_book
for i in n_crea_img_pack :
Expand Down Expand Up @@ -784,9 +790,15 @@ func load_creature_ai_resources(path : String) :
# var n_creascripts_book = Utils.FileHandler.read_json_dic_from_file(path +"spells_book.json")
# print("n_spells_book : ", n_spells_book)
for sn in scriptfilenames :
# print("adding " +sn)
var newcreascript = load(path+sn)
creascripts_book[sn] = newcreascript
if sn.ends_with(".gd") :
print("adding " +sn)
var newcreascript : GDScript
if path.begins_with("res://") :
newcreascript = load(path+sn)
else :
newcreascript = GDScript.new()
var _err = newcreascript.load(path+sn)



""" Accessible resources """
Expand Down
28 changes: 4 additions & 24 deletions src/shared_assets/Bestiary/textureAtlas.png.import
Original file line number Diff line number Diff line change
@@ -1,34 +1,14 @@
[remap]

importer="texture"
type="CompressedTexture2D"
importer="image"
type="Image"
uid="uid://dhxhyf20guprq"
path="res://.godot/imported/textureAtlas.png-8c3834379c2fff2d4215c85382b85638.ctex"
metadata={
"vram_texture": false
}
path="res://.godot/imported/textureAtlas.png-8c3834379c2fff2d4215c85382b85638.image"

[deps]

source_file="res://shared_assets/Bestiary/textureAtlas.png"
dest_files=["res://.godot/imported/textureAtlas.png-8c3834379c2fff2d4215c85382b85638.ctex"]
dest_files=["res://.godot/imported/textureAtlas.png-8c3834379c2fff2d4215c85382b85638.image"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
28 changes: 4 additions & 24 deletions src/shared_assets/items/textureAtlas.png.import
Original file line number Diff line number Diff line change
@@ -1,34 +1,14 @@
[remap]

importer="texture"
type="CompressedTexture2D"
importer="image"
type="Image"
uid="uid://brcbpvryivkpp"
path="res://.godot/imported/textureAtlas.png-5ea3a5cff70597b59f6eaeb63dfc9a35.ctex"
metadata={
"vram_texture": false
}
path="res://.godot/imported/textureAtlas.png-5ea3a5cff70597b59f6eaeb63dfc9a35.image"

[deps]

source_file="res://shared_assets/items/textureAtlas.png"
dest_files=["res://.godot/imported/textureAtlas.png-5ea3a5cff70597b59f6eaeb63dfc9a35.ctex"]
dest_files=["res://.godot/imported/textureAtlas.png-5ea3a5cff70597b59f6eaeb63dfc9a35.image"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

0 comments on commit 4b34dee

Please sign in to comment.