Fields of Mistria — Vanilla GML Reference FoM v1.0.8

obj_wheedle_stall.gml

object_create(
    "obj_wheedle_stall",
    object_reserve("par_ledger"),
    {
        sprite_index: spr_town_stall_wheedle_sign_main,
        create: function() {
            if SATURDAY_MARKET.stalls[NpcId.Wheedle] == false {
                instance_destroy();
                return;
            }

            depth = get_instance_depth(y, -10);
            event_inherit(ObjectEvent.Create);

            self.set_darkness_animation(spr_town_stall_wheedle_sign_darkness);
            self.setup_offsets("wheedles_stall");

            self.bubble_icon_small = spr_ui_bark_icon_coin_small;
            self.bubble_icon_big = spr_ui_bark_icon_coin;

            self.register_interaction(
                InputId.Interact,
                "misc_local/shop",
                function() {
                    ANCHOR.spawn_menu(Menu.Store, Store.Wheedle);
                },
            );
        },
    }
);