From b85d4d6fb31632403b1aa603305ec08718ad1b7e Mon Sep 17 00:00:00 2001 From: Ghommie Date: Sat, 22 Jun 2019 16:05:03 +0200 Subject: [PATCH 1/5] Sort of porting MRE rations from Yogstation. --- code/_globalvars/lists/maintenance_loot.dm | 1 + code/game/objects/items/storage/boxes.dm | 97 +++++++++++++++++++++ code/modules/cargo/packs.dm | 12 +++ icons/obj/storage.dmi | Bin 65457 -> 66096 bytes 4 files changed, 110 insertions(+) diff --git a/code/_globalvars/lists/maintenance_loot.dm b/code/_globalvars/lists/maintenance_loot.dm index efd405a4dc..0bd99825a2 100644 --- a/code/_globalvars/lists/maintenance_loot.dm +++ b/code/_globalvars/lists/maintenance_loot.dm @@ -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, diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index 43611ee4e1..04d39c000b 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -1126,3 +1126,100 @@ /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 += "\nAn expiry date is listed on it. It reads: [expiration_date]" + 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) + +/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/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 + +/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 + if(M.spawner_chance) + loot += M + loot[M] = M.spawner_chance + return ..() \ No newline at end of file diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index 7042913b0d..5a14ea9876 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -1983,6 +1983,18 @@ considered \[REDACTED\] 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/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/potted_plants name = "Potted Plants Crate" desc = "Spruce up the station with these lovely plants! Contains a random assortment of five potted plants from Nanotrasen's potted plant research division. Warranty void if thrown." diff --git a/icons/obj/storage.dmi b/icons/obj/storage.dmi index 9467e8f81875ccc5e5d2c315be1ff817586444d7..9037bfc0d01c485ed0576b3ea8eedf9bbec00865 100644 GIT binary patch delta 4450 zcmXYy2RzjO|G@8%y(6G#4(cwY&s06(2+RMGYaj_iqjRZTD%4`LGfjpl(^LU?{ zrkN(8`Yv_2cXQK=X_=Sv1OZsT^*ttc>giY9v#pjkrlLhlc~fN-8(PY{gbUh!eORv& zE%{VDO$fkOM=u-JF9CfbHk)fSyH-s_)1Pv7c&IMbRc6#08-*ym&&OdP2sdh+F@8Y< zCVL@h@}|snp}T-8F3`y!1B{2o4{zEb@C$-#=Fig=m+l@R44`!}~-Dd+i$|Hjp&a3U{Tf?Cvw{G71XuG?A zEY4cwSD}TTQ4J&3i1jsy#r2fCpQb8N_|W2CU0Mt3?qY&h*FXS`U?RgR>u)iEBlYJ%53o~_f{v! zlHt`Yp~+Ukd~8UHYgn4r^8Ya*#FM>rOY+ z;+zAPqHqHWNY+0v+f+V_UEC@d!c$RI zTclzP; zv=;0rx99{y=05{mwwgK8Vf~g)O;Lqr;uv+8`lwjX22ts39fRpQKiHju;6=_kP)92= zUOATW}o26r)?|D~q5S z#cO5@M4a9=Nh|Agzz0`1rb)JNtaeDEu|tOg$G{tpxqPT$!>PR9e&}mKLysBML%kBi zm4_vKz0piirqB4v^XDlh(kXY-zC2Qg7Uq6U`7s*ZOE2D8Vpv7T9ZCM6u#=$x=W#SlHVQ;~aYE zkGuh`Wdm_@g6(u^pVo2=`QHN@(#{P33DYvfQr@G795)U?R%Nm^Gi`hn?^+!k<_~?> zwzfLk!>G0cDy$nrGNhdIYingzqtgQqhUjQm;p01@Rf^UDZrW?zdeq14c{ylfE|6^5 zCWQ@`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 17:23:32 +0200 Subject: [PATCH 2/5] Forgot we are dealing with a prototype object. --- code/game/objects/items/storage/boxes.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index 04d39c000b..988e6792ff 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -1219,7 +1219,8 @@ /obj/effect/spawner/lootdrop/mre/Initialize() for(var/A in subtypesof(/obj/item/storage/box/mre)) var/obj/item/storage/box/mre/M = A - if(M.spawner_chance) + var/our_chance = initial(M.spawner_chance) + if(our_chance) loot += M - loot[M] = M.spawner_chance + loot[M] = our_chance return ..() \ No newline at end of file From f97a4b3a785951213e714939b5b22bc36287dba5 Mon Sep 17 00:00:00 2001 From: Ghommie Date: Sat, 22 Jun 2019 19:50:56 +0200 Subject: [PATCH 3/5] changes. --- .../game/objects/effects/spawners/lootdrop.dm | 15 ++++++++++ code/game/objects/items/storage/boxes.dm | 28 ------------------- code/modules/food_and_drinks/drinks/drinks.dm | 8 ++++++ .../food_and_drinks/food/snacks_pizza.dm | 9 ++++++ 4 files changed, 32 insertions(+), 28 deletions(-) diff --git a/code/game/objects/effects/spawners/lootdrop.dm b/code/game/objects/effects/spawners/lootdrop.dm index 4a77274d23..8cfe84f644 100644 --- a/code/game/objects/effects/spawners/lootdrop.dm +++ b/code/game/objects/effects/spawners/lootdrop.dm @@ -214,6 +214,21 @@ /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) + loot += M + loot[M] = our_chance + return ..() + + // Tech storage circuit board spawners // For these, make sure that lootcount equals the number of list items diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index 988e6792ff..4ff63ceeac 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -1196,31 +1196,3 @@ 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) - -/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/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 - -/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) - loot += M - loot[M] = our_chance - return ..() \ No newline at end of file diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index a6b7de0330..64edd69e17 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -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." diff --git a/code/modules/food_and_drinks/food/snacks_pizza.dm b/code/modules/food_and_drinks/food/snacks_pizza.dm index 403636db08..74fd7dda65 100644 --- a/code/modules/food_and_drinks/food/snacks_pizza.dm +++ b/code/modules/food_and_drinks/food/snacks_pizza.dm @@ -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 \ No newline at end of file From e0b97064533736eea67946eb8620d423cae8dfc8 Mon Sep 17 00:00:00 2001 From: Ghommie Date: Mon, 24 Jun 2019 00:38:34 +0200 Subject: [PATCH 4/5] Alphabetic order. --- code/modules/cargo/packs.dm | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index 5a14ea9876..d4a8ed0d07 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -1949,6 +1949,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!" @@ -1983,18 +1994,6 @@ considered \[REDACTED\] 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/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/potted_plants name = "Potted Plants Crate" desc = "Spruce up the station with these lovely plants! Contains a random assortment of five potted plants from Nanotrasen's potted plant research division. Warranty void if thrown." From 71298c084d8d315091b8ed92c4559ca569f5094e Mon Sep 17 00:00:00 2001 From: Ghommie Date: Mon, 24 Jun 2019 03:09:43 +0200 Subject: [PATCH 5/5] didn't init the list, bravo. --- code/game/objects/effects/spawners/lootdrop.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/game/objects/effects/spawners/lootdrop.dm b/code/game/objects/effects/spawners/lootdrop.dm index 8cfe84f644..0e543a3642 100644 --- a/code/game/objects/effects/spawners/lootdrop.dm +++ b/code/game/objects/effects/spawners/lootdrop.dm @@ -224,8 +224,7 @@ var/obj/item/storage/box/mre/M = A var/our_chance = initial(M.spawner_chance) if(our_chance) - loot += M - loot[M] = our_chance + LAZYSET(loot, M, our_chance) return ..()