Skip to content

Commit 3e29fd9

Browse files
authored
fix: crash from non-equip-able artefacts (#951)
1 parent 020dbe8 commit 3e29fd9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/scr_librarium/scr_librarium.gml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function scr_librarium_gui(){
103103
set_chapter_arti_data();
104104
}
105105
var base_type = cur_arti.determine_base_type();
106-
if (arti_data && base_type!="device"){
106+
if (base_type!="device" && is_struct(arti_data)){
107107
if (arti_data.armour_value != 0) {
108108
tip2 += $"{arti_data.armour_value} Armour#";
109109
}
@@ -173,7 +173,7 @@ function scr_librarium(){
173173
draw_set_halign(fa_left);
174174
draw_set_color(c_gray);
175175
draw_set_font(fnt_40k_30b);
176-
draw_text_transformed(xx + 336 + 16, yy + 66, string_hash_to_newline("Librarium"), 1, 1, 0);
176+
draw_text_transformed(xx + 336 + 16, yy + 66, "Librarium", 1, 1, 0);
177177
draw_text_transformed(xx + 336 + 16, yy + 100, string_hash_to_newline("Chief " + string(obj_ini.role[100, 17]) + " " + string(obj_ini.name[0, 4])), 0.6, 0.6, 0);
178178
draw_set_font(fnt_40k_14);
179179
}
@@ -183,7 +183,7 @@ function scr_librarium(){
183183
draw_set_halign(fa_left);
184184
draw_set_color(c_gray);
185185
draw_set_font(fnt_large);
186-
draw_text_transformed(xx + 336 + 16, yy + 66, string_hash_to_newline("Librarium"), 1, 1, 0);
186+
draw_text_transformed(xx + 336 + 16, yy + 66, "Librarium", 1, 1, 0);
187187
draw_text_transformed(xx + 336 + 16, yy + 100, string_hash_to_newline("Adept " + string(obj_controller.adept_name)), 0.6, 0.6, 0);
188188
draw_set_font(fnt_40k_14);
189189
}

0 commit comments

Comments
 (0)