[Feature] Restocking Vending machines - Printable Version +- Goonstation Forums (https://forum.ss13.co) +-- Forum: Discussion (https://forum.ss13.co/forumdisplay.php?fid=6) +--- Forum: Patches (https://forum.ss13.co/forumdisplay.php?fid=30) +---- Forum: Implemented (https://forum.ss13.co/forumdisplay.php?fid=31) +---- Thread: [Feature] Restocking Vending machines (/showthread.php?tid=10570) |
[Feature] Restocking Vending machines - kyle2143 - 05-29-2018 Created a whole bunch of vending machine restocking cartridges that can be ordered from the QM. A lot of people have suggested something similar, I was looking through old threads and came across one about this, but I forget where it is now, most recently I saw that Frank Stein suggested something like this, well here it is. Not much to it, use the cartridge on the corresponding vending machine and it will set all of the items in it back to default amounts. It's completely functional, the only thing is that it might need QM prices/amounts tweaking and I don't have any individual sprites for it. Was going to make a sprite request for it, but I'll do it after this post. https://github.com/goonstation/goonstation-2016/pull/62 RE: [Feature] Restocking Vending machines - Noah Buttes - 05-29-2018 I don't think the all-purpose refill unit would be compatible with any vending machine right now since you don't have any code to handle the special situation where W:vendingType is "all". Also, just a suggestion based on what I've been told and have experienced while making patches. You might want to change Code: if (istype(W, /obj/item/vending/restock_cartridge)) to something like Code: if (istype(W, /obj/item/vending/restock_cartridge)) Or something along those lines. In general, avoid using : unless you absolutely have to. RE: [Feature] Restocking Vending machines - kyle2143 - 05-29-2018 Thanks for the reply. You're right the 'All-Purpose Cartridge" didn't work. I actually never wanted it to, and was just using it as a parent type for all the varieties so after I made it I forgot about it. An all purpose cartridge really flies in the face of making all the varieties to begin with so I didn't want one. I've just changed the name to be an empty cartridge now so it's clear that it has no interaction with vending machines. Also about not using ':', I made that change as well. I just don't like having to do that extra initialization for a temp variable only used once, I personally like ':'. RE: [Feature] Restocking Vending machines - ZeWaka - 06-02-2018 (05-29-2018, 06:05 PM)kyle2143 Wrote: Also about not using ':', I made that change as well. I just don't like having to do that extra initialization for a temp variable only used once, I personally like ':'. please no : thank RE: [Feature] Restocking Vending machines - kyle2143 - 07-04-2018 LovelyMimic made some fantastic sprites for all the usable cartridges and I just added them to the patch. Everything is good to go now. https://forum.ss13.co/showthread.php?tid=10582 https://github.com/goonstation/goonstation-2016/pull/62/commits |