Skip to content

Commit 035ab32

Browse files
committed
Fixed spellicons
1 parent 0559712 commit 035ab32

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

Scenes/CfgLoader.gd

+27-2
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,32 @@ func start(mapPath):
9494

9595
oCustomSlabSystem.load_unearth_custom_slabs_file()
9696

97+
var LIST_OF_OBJECTS_WITH_HARDCODED_SPRITES = [
98+
"SPELLBOOK_HOE",
99+
"SPELLBOOK_IMP",
100+
"SPELLBOOK_OBEY",
101+
"SPELLBOOK_SLAP",
102+
"SPELLBOOK_SOE",
103+
"SPELLBOOK_CTA",
104+
"SPELLBOOK_CAVI",
105+
"SPELLBOOK_HEAL",
106+
"SPELLBOOK_HLDAUD",
107+
"SPELLBOOK_LIGHTN",
108+
"SPELLBOOK_SPDC",
109+
"SPELLBOOK_PROT",
110+
"SPELLBOOK_CONCL",
111+
"SPELLBOOK_DISEASE",
112+
"SPELLBOOK_CHKN",
113+
"SPELLBOOK_DWAL",
114+
"SPELLBOOK_TBMB",
115+
"SPELLBOOK_ARMG",
116+
"SPELLBOOK_POSS",
117+
"SPELLBOOK_RBND",
118+
"SPELLBOOK_FRZ",
119+
"SPELLBOOK_SLOW",
120+
"SPELLBOOK_FLGT",
121+
"SPELLBOOK_VSN",
122+
]
97123

98124
func load_objects_data(cfg): # 10ms
99125
for section in cfg:
@@ -112,7 +138,7 @@ func load_objects_data(cfg): # 10ms
112138

113139
animID = objSection.get("AnimationID")
114140
newSprite = get_sprite(animID, newName)
115-
if newSprite == null:
141+
if newSprite == null or newName in LIST_OF_OBJECTS_WITH_HARDCODED_SPRITES:
116142
newSprite = Things.DATA_OBJECT[id][Things.SPRITE]
117143

118144
newGenre = objSection.get("Genre")
@@ -123,7 +149,6 @@ func load_objects_data(cfg): # 10ms
123149
Things.LIST_OF_HEROGATES.append(id)
124150
else:
125151
newName = objSection.get("Name", "UNDEFINED_NAME")
126-
127152
animID = objSection.get("AnimationID")
128153
newSprite = get_sprite(animID, newName)
129154

0 commit comments

Comments
 (0)