Update snacks_bread.dm

This commit is contained in:
kevinz000
2019-01-03 07:32:39 -08:00
committed by GitHub
parent 4c904ee5e6
commit e9ce54e397
@@ -185,6 +185,13 @@
icon_state = ""
bitesize = 2
GLOBAL_VAR_INIT(frying_hardmode, TRUE)
GLOBAL_LIST_INIT(frying_bad_chems, list(
"bad_food" = 10,
"clf3" = 2,
"aranesp" = 2
))
/obj/item/reagent_containers/food/snacks/deepfryholder/Initialize(mapload, obj/item/fried)
. = ..()
name = fried.name //We'll determine the other stuff when it's actually removed
@@ -210,6 +217,11 @@
else
fried.forceMove(src)
trash = fried
if(!istype(fried, /obj/item/reagent_containers/food) && GLOB.frying_hardmode && GLOB.frying_bad_chems.len)
var/R = rand(1, GLOB.frying_bad_chems.len)
var/bad_chem = GLOB.frying_bad_chems[R]
var/bad_chem_amount = GLOB.frying_bad_chems[bad_chem]
add_reagent(bad_chem, bad_chem_amount)
/obj/item/reagent_containers/food/snacks/deepfryholder/Destroy()
if(trash)