Adds anomalous, infinitely-regenerating pizza boxes as a very rare item from pizza crates
This commit is contained in:
committed by
CitadelStationBot
parent
d6f916f37b
commit
cf66c8c79c
File diff suppressed because it is too large
Load Diff
@@ -223,6 +223,8 @@
|
||||
slice.name = "slice of [name]"
|
||||
if(desc != initial(desc))
|
||||
slice.desc = "[desc]"
|
||||
if(foodtype != initial(foodtype))
|
||||
slice.foodtype = foodtype //if something happens that overrode our food type, make sure the slice carries that over
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/proc/generate_trash(atom/location)
|
||||
if(trash)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
foodtype = GRAIN | DAIRY | VEGETABLES
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/pizza/margherita
|
||||
name = "margherita"
|
||||
name = "pizza margherita"
|
||||
desc = "The most cheezy pizza in galaxy."
|
||||
icon_state = "pizzamargherita"
|
||||
slice_path = /obj/item/reagent_containers/food/snacks/pizzaslice/margherita
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
|
||||
|
||||
var/open = FALSE
|
||||
var/can_open_on_fall = TRUE //if FALSE, this pizza box will never open if it falls from a stack
|
||||
var/boxtag = ""
|
||||
var/list/boxes = list()
|
||||
|
||||
@@ -239,7 +240,7 @@
|
||||
var/obj/item/pizzabox/P = V
|
||||
var/fall_dir = pick(GLOB.alldirs)
|
||||
step(P, fall_dir)
|
||||
if(P.pizza && prob(50)) //rip pizza
|
||||
if(P.pizza && P.can_open_on_fall && prob(50)) //rip pizza
|
||||
P.open = TRUE
|
||||
P.pizza.forceMove(get_turf(P))
|
||||
fall_dir = pick(GLOB.alldirs)
|
||||
@@ -290,3 +291,44 @@
|
||||
. = ..()
|
||||
pizza = new /obj/item/reagent_containers/food/snacks/pizza/pineapple(src)
|
||||
boxtag = "Honolulu Chew"
|
||||
|
||||
//An anomalous pizza box that, when opened, produces the opener's favorite kind of pizza.
|
||||
/obj/item/pizzabox/infinite
|
||||
resistance_flags = FIRE_PROOF | LAVA_PROOF | ACID_PROOF //hard to destroy
|
||||
can_open_on_fall = FALSE
|
||||
var/list/pizza_types = list(
|
||||
/obj/item/reagent_containers/food/snacks/pizza/meat = 1,
|
||||
/obj/item/reagent_containers/food/snacks/pizza/mushroom = 1,
|
||||
/obj/item/reagent_containers/food/snacks/pizza/margherita = 1,
|
||||
/obj/item/reagent_containers/food/snacks/pizza/sassysage = 0.8,
|
||||
/obj/item/reagent_containers/food/snacks/pizza/vegetable = 0.8,
|
||||
/obj/item/reagent_containers/food/snacks/pizza/pineapple = 0.5,
|
||||
/obj/item/reagent_containers/food/snacks/pizza/donkpocket = 0.3,
|
||||
/obj/item/reagent_containers/food/snacks/pizza/dank = 0.1) //pizzas here are weighted by chance to be someone's favorite
|
||||
var/static/list/pizza_preferences
|
||||
|
||||
/obj/item/pizzabox/infinite/Initialize()
|
||||
. = ..()
|
||||
if(!pizza_preferences)
|
||||
pizza_preferences = list()
|
||||
|
||||
/obj/item/pizzabox/infinite/examine(mob/user)
|
||||
..()
|
||||
if(isobserver(user))
|
||||
to_chat(user, "<span class='deadsay'>This pizza box is anomalous, and will produce infinite pizza.</span>")
|
||||
|
||||
/obj/item/pizzabox/infinite/attack_self(mob/living/user)
|
||||
QDEL_NULL(pizza)
|
||||
if(ishuman(user))
|
||||
attune_pizza(user)
|
||||
. = ..()
|
||||
|
||||
/obj/item/pizzabox/infinite/proc/attune_pizza(mob/living/carbon/human/noms) //tonight on "proc names I never thought I'd type"
|
||||
if(!pizza_preferences[noms.ckey])
|
||||
pizza_preferences[noms.ckey] = pickweight(pizza_types)
|
||||
if(noms.mind && noms.mind.assigned_role == "Botanist")
|
||||
pizza_preferences[noms.ckey] = /obj/item/reagent_containers/food/snacks/pizza/dank
|
||||
|
||||
var/obj/item/pizza_type = pizza_preferences[noms.ckey]
|
||||
pizza = new pizza_type (src)
|
||||
pizza.foodtype = noms.dna.species.liked_food //it's our favorite!
|
||||
|
||||
Reference in New Issue
Block a user