Add a way for mods to change how dropped bags look
Documentation: How to change how dropped bags look with a mod
onBeforeCreateBag
event in your mod:
Listen to the this.events.on('onBeforeCreateBag', this.onBeforeCreateBag.bind(this));
Define the listener method:
onBeforeCreateBag: msg => {
//Change how the bag looks
msg.sprite.sheetName = 'path to new spritesheet';
msg.sprite.cell = 72;
//Change where the bag spawns
msg.x = 10;
msg.y = 12;
};
Edited by Big Bad Waffle