Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_determine_item_stealable

(view raw script w/o annotations or w/e)
1
function 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; } }
() //gml_Script_scr_determine_item_stealable
2
{
3
    var selection = argument[0]
4
    switch selection
5
    {
6
        case "Wild Revolver":
7
        case "Silver Ammo":
8
        case "Fancy Holster":
9
        case "Honeydew Pin":
10
            if ds_list_empty(global.steal_list)
11
                return true;
12
            for (var i = 0; i < ds_list_size(global.steal_list); i++)
13
            {
14
                if (ds_list_find_value(global.steal_list, i) == selection)
15
                    return false;
16
                else if (i == (ds_list_size(global.steal_list) - 1))
17
                    return true;
18
            }
19
            break
20
        default:
21
            return true;
22
    }
23
24
}