Merge pull request #8720 from Ghommie/Ghommie-cit76

Sort of porting MRE rations from Yogstation.
This commit is contained in:
kevinz000
2019-06-28 05:28:35 -07:00
committed by GitHub
7 changed files with 113 additions and 0 deletions
@@ -44,6 +44,7 @@ GLOBAL_LIST_INIT(maintenance_loot, list(
/obj/item/flashlight = 4,
/obj/item/flashlight/pen = 1,
/obj/item/flashlight/glowstick/random = 4,
/obj/effect/spawner/lootdrop/mre = 3,
/obj/item/multitool = 2,
/obj/item/radio/off = 2,
/obj/item/t_scanner = 5,
@@ -214,6 +214,20 @@
/obj/item/aiModule/core/full/damaged
)
/obj/effect/spawner/lootdrop/mre
name = "random MRE"
icon = 'icons/obj/storage.dmi'
icon_state = "mre"
/obj/effect/spawner/lootdrop/mre/Initialize()
for(var/A in subtypesof(/obj/item/storage/box/mre))
var/obj/item/storage/box/mre/M = A
var/our_chance = initial(M.spawner_chance)
if(our_chance)
LAZYSET(loot, M, our_chance)
return ..()
// Tech storage circuit board spawners
// For these, make sure that lootcount equals the number of list items
+70
View File
@@ -1126,3 +1126,73 @@
/obj/item/storage/box/pink
icon_state = "box_pink"
illustration = null
/obj/item/storage/box/mre //base MRE type.
name = "Nanotrasen MRE Ration Kit Menu 0"
desc = "A package containing food suspended in an outdated bluespace pocket which lasts for centuries. If you're lucky you may even be able to enjoy the meal without getting food poisoning."
icon_state = "mre"
var/can_expire = TRUE
var/spawner_chance = 2
var/expiration_date
var/expiration_date_min = 2300
var/expiration_date_max = 2700
/obj/item/storage/box/mre/Initialize()
. = ..()
if(can_expire)
expiration_date = rand(expiration_date_min, expiration_date_max)
desc += "\n<span_clas='notice'>An expiry date is listed on it. It reads: [expiration_date]</span>"
var/spess_current_year = GLOB.year_integer + 540
if(expiration_date < spess_current_year)
var/gross_risk = min(round(spess_current_year - expiration_date * 0.1), 1)
var/toxic_risk = min(round(spess_current_year - expiration_date * 0.01), 1)
for(var/obj/item/reagent_containers/food/snacks/S in contents)
if(prob(gross_risk))
ENABLE_BITFIELD(S.foodtype, GROSS)
if(prob(toxic_risk))
ENABLE_BITFIELD(S.foodtype, TOXIC)
/obj/item/storage/box/mre/menu1
name = "\improper Nanotrasen MRE Ration Kit Menu 1"
/obj/item/storage/box/mre/menu1/safe
desc = "A package containing food suspended in a bluespace pocket capable of lasting till the end of time."
spawner_chance = 0
can_expire = FALSE
/obj/item/storage/box/mre/menu1/PopulateContents()
new /obj/item/reagent_containers/food/snacks/breadslice/plain(src)
new /obj/item/reagent_containers/food/snacks/breadslice/creamcheese(src)
new /obj/item/reagent_containers/food/condiment/pack/ketchup(src)
new /obj/item/reagent_containers/food/snacks/chocolatebar(src)
new /obj/item/tank/internals/emergency_oxygen(src)
/obj/item/storage/box/mre/menu2
name = "\improper Nanotrasen MRE Ration Kit Menu 2"
/obj/item/storage/box/mre/menu2/safe
spawner_chance = 0
desc = "A package containing food suspended in a bluespace pocket capable of lasting till the end of time."
can_expire = FALSE
/obj/item/storage/box/mre/menu2/PopulateContents()
new /obj/item/reagent_containers/food/snacks/omelette(src)
new /obj/item/reagent_containers/food/snacks/meat/cutlet/plain(src)
new /obj/item/reagent_containers/food/snacks/fries(src)
new /obj/item/reagent_containers/food/snacks/chocolatebar(src)
new /obj/item/tank/internals/emergency_oxygen(src)
/obj/item/storage/box/mre/menu3
name = "\improper Nanotrasen MRE Ration Kit Menu 3"
desc = "The holy grail of MREs. This item contains the fabled MRE pizza and a sample of coffee instant type 2. Any NT employee lucky enough to get their hands on one of these is truly blessed."
icon_state = "menu3"
can_expire = FALSE //always fresh, never expired.
spawner_chance = 1
/obj/item/storage/box/mre/menu3/PopulateContents()
new /obj/item/reagent_containers/food/snacks/pizzaslice/pepperoni(src)
new /obj/item/reagent_containers/food/snacks/breadslice/plain(src)
new /obj/item/reagent_containers/food/snacks/cheesewedge(src)
new /obj/item/reagent_containers/food/snacks/grown/chili(src)
new /obj/item/reagent_containers/food/drinks/coffee/type2(src)
new /obj/item/tank/internals/emergency_oxygen(src)
+11
View File
@@ -1960,6 +1960,17 @@
crate_name = "hydroponics backpack crate"
crate_type = /obj/structure/closet/crate/secure
/datum/supply_pack/organic/mre
name = "MRE supply kit (emergency rations)"
desc = "The lights are out. Oxygen's running low. You've run out of food except space weevils. Don't let this be you! Order our NT branded MRE kits today! This pack contains 5 MRE packs with a randomized menu and an oxygen tank."
cost = 2000
contains = list(/obj/item/storage/box/mre/menu1/safe,
/obj/item/storage/box/mre/menu1/safe,
/obj/item/storage/box/mre/menu2/safe,
/obj/item/storage/box/mre/menu2/safe,
/obj/item/storage/box/mre/menu3)
crate_name = "MRE crate (emergency rations)"
/datum/supply_pack/organic/pizza
name = "Pizza Crate"
desc = "Best prices on this side of the galaxy. All deliveries are guaranteed to be 99% anomaly-free!"
@@ -204,6 +204,14 @@
resistance_flags = FREEZE_PROOF
isGlass = FALSE
//Used by MREs
/obj/item/reagent_containers/food/drinks/coffee/type2
name = "\improper Coffee, instant (type 2)"
desc = "Coffee that's been blow dried into a granulated powder. This packet includes self heating water for your nutritional pleasure."
icon = 'icons/obj/food/containers.dmi'
icon_state = "condi_cornoil"
/obj/item/reagent_containers/food/drinks/ice
name = "ice cup"
desc = "Careful, cold ice, do not chew."
@@ -225,3 +225,12 @@
filling_color = "#FFFFFF"
foodtype = GRAIN | VEGETABLES
// Used by MREs
/obj/item/reagent_containers/food/snacks/pizzaslice/pepperoni
name = "\improper MRE pepperoni pizza slice"
desc = "A freeze dried, dehydrated slice of bread with tomato sauce, pepperoni and cheese."
icon_state = "meatpizzaslice"
filling_color = "#A52A2A"
tastes = list("cardboard" = 1, "tomato" = 1, "cheese" = 1, "pepperoni" = 2)
foodtype = GRAIN | VEGETABLES | DAIRY | MEAT