Merge pull request #5348 from Citadel-Station-13/upstream-merge-35194
[MIRROR] Adds anomalous, infinitely-regenerating pizza boxes as a very rare item from pizza crates
This commit is contained in:
@@ -991,6 +991,29 @@
|
||||
/obj/item/pizzabox/vegetable,
|
||||
/obj/item/pizzabox/pineapple)
|
||||
crate_name = "pizza crate"
|
||||
var/static/anomalous_box_provided = FALSE
|
||||
|
||||
/datum/supply_pack/organic/pizza/fill(obj/structure/closet/crate/C)
|
||||
. = ..()
|
||||
if(!anomalous_box_provided)
|
||||
for(var/obj/item/pizzabox/P in C)
|
||||
if(prob(1)) //1% chance for each box, so 4% total chance per order
|
||||
var/obj/item/pizzabox/infinite/fourfiveeight = new(C)
|
||||
fourfiveeight.boxtag = P.boxtag
|
||||
qdel(P)
|
||||
anomalous_box_provided = TRUE
|
||||
log_game("An anomalous pizza box was provided in a pizza crate at during cargo delivery")
|
||||
if(prob(50))
|
||||
addtimer(CALLBACK(src, .proc/anomalous_pizza_report), rand(300, 1800))
|
||||
else
|
||||
message_admins("An anomalous pizza box was silently created with no command report in a pizza crate delivery.")
|
||||
break
|
||||
|
||||
/datum/supply_pack/organic/pizza/proc/anomalous_pizza_report()
|
||||
print_command_report("[station_name()], our anomalous materials divison has reported a missing object that is highly likely to have been sent to your station during a routine cargo \
|
||||
delivery. Please search all crates and manifests provided with the delivery and return the object if is located. The object resembles a standard <b>\[DATA EXPUNGED\]</b> and is to be \
|
||||
considered <b>\[REDACTED\]</b> and returned at your leisure. Note that objects the anomaly produces are specifically attuned exactly to the individual opening the anomaly; regardless \
|
||||
of species, the individual will find the object edible and it will taste great according to their personal definitions, which vary significantly based on person and species.")
|
||||
|
||||
/datum/supply_pack/organic/cream_piee
|
||||
name = "High-yield Clown-grade Cream Pie Crate"
|
||||
|
||||
@@ -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