Files
Bubberstation/code/game/objects/items/trash.dm
Ashe Higgs d447acdc6e All-In-One grinder results are now defined by type, not by huge lists (#33181)
I had some time free, and noticed how awful the reagent grinder code was - it used huge static lists containing types and their associated reagents from grinding.

This is now split into two new vars on /obj/item - var/list/grind_results and var/list/juice_results, as well as two new helper procs, on_grind() and on_juice() to allow those to change based on conditions like plant potency. Such checks and the like have been moved to that. If any of these procs return -1, the operation is canceled.

I also fixed some of the recipes that didn't work. The reagent IDs for them didn't exist, leading me to believe that they weren't tested. I corrected that! (I've tested every single recipe in this PR, with the exception of a few juicing-related ones.)
2017-12-15 10:48:25 +13:00

84 lines
1.9 KiB
Plaintext

//Added by Jack Rost
/obj/item/trash
icon = 'icons/obj/janitor.dmi'
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
desc = "This is rubbish."
w_class = WEIGHT_CLASS_TINY
resistance_flags = FLAMMABLE
/obj/item/trash/raisins
name = "\improper 4no raisins"
icon_state= "4no_raisins"
/obj/item/trash/candy
name = "candy"
icon_state= "candy"
/obj/item/trash/cheesie
name = "cheesie honkers"
icon_state = "cheesie_honkers"
/obj/item/trash/chips
name = "chips"
icon_state = "chips"
/obj/item/trash/popcorn
name = "popcorn"
icon_state = "popcorn"
/obj/item/trash/sosjerky
name = "\improper Scaredy's Private Reserve Beef Jerky"
icon_state = "sosjerky"
/obj/item/trash/syndi_cakes
name = "syndi-cakes"
icon_state = "syndi_cakes"
/obj/item/trash/waffles
name = "waffles tray"
icon_state = "waffles"
/obj/item/trash/plate
name = "plate"
icon_state = "plate"
resistance_flags = NONE
/obj/item/trash/pistachios
name = "pistachios pack"
icon_state = "pistachios_pack"
/obj/item/trash/semki
name = "semki pack"
icon_state = "semki_pack"
/obj/item/trash/tray
name = "tray"
icon_state = "tray"
resistance_flags = NONE
/obj/item/trash/candle
name = "candle"
icon = 'icons/obj/candle.dmi'
icon_state = "candle4"
/obj/item/trash/can
name = "crushed can"
icon_state = "cola"
resistance_flags = NONE
grind_results = list("aluminum" = 10)
/obj/item/trash/attack(mob/M, mob/living/user)
return
/obj/item/trash/coal
name = "lump of coal"
icon = 'icons/obj/mining.dmi'
icon_state = "slag"
desc = "Someone's gotten on the naughty list."
grind_results = list("carbon" = 20)
/obj/item/trash/coal/burn()
visible_message("[src] fuses into a diamond! Someone wasn't so naughty after all...")
new /obj/item/ore/diamond(loc)
qdel(src)