Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_text_item_buy_shop_Draw_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
draw_set_font(fnt_battle)
4
draw_set_halign(fa_left)
5
draw_set_valign(fa_top)
6
var buy_shop_screen_number = clamp(global.buy_shop_screen_number, 1, 4)
7
for (i = 1; i < array_length(global.shop_item); i += 1)
8
{
9
    draw_set_color(c_white)
10
    var item_check = global.shop_item[i]
11
    if ((!scr_determine_item_stealable
scr_determine_item_stealable

function scr_determine_item_stealable() //gml_Script_scr_determine_item_stealable { var selection = argument[0] switch selection { case "Wild Revolver": case "Silver Ammo": case "Fancy Holster": case "Honeydew Pin": if ds_list_empty(global.steal_list) return true; for (var i = 0; i < ds_list_size(global.steal_list); i++) { if (ds_list_find_value(global.steal_list, i) == selection) return false; else if (i == (ds_list_size(global.steal_list) - 1)) return true; } break default: return true; } }
(item_check)) || global.item_stock[global.shop_stock[i]] <= 0)
12
        draw_set_color(c_gray)
13
    else if (!scr_determine_item_purchasable
scr_determine_item_purchasable

function scr_determine_item_purchasable() //gml_Script_scr_determine_item_purchasable { switch argument[0] { case "Adult Soda": case "Wild Revolver": return false; default: return true; } }
(item_check))
14
        draw_set_color(c_red)
15
    draw_text((obj_main_screen_shop.x + 30), (obj_main_screen_shop.y + 10 + (i - 1) * 20), string_hash_to_newline(string(global.shop_gold_requirement[i]) + "G - " + string(global.shop_item[i])))
16
}
17
draw_set_color(c_white)
18
draw_text((obj_main_screen_shop.x + 30), (obj_main_screen_shop.y + 90), string_hash_to_newline("Exit"))