From 68e1c85288bf0f369875993122db29813755ac89 Mon Sep 17 00:00:00 2001 From: Steelpoint Date: Tue, 20 Feb 2024 16:55:50 +0800 Subject: [PATCH 1/6] MRECommit --- .../vendor_types/squad_prep/squad_prep.dm | 2 +- code/game/objects/items/storage/boxes.dm | 17 +++++++++++++++++ .../projectiles/ammo_boxes/misc_boxes.dm | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm index 2736de3a981d..cf57d9d7cfaa 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm @@ -305,7 +305,7 @@ /obj/structure/machinery/cm_vending/sorted/cargo_guns/squad/populate_product_list(scale) listed_products = list( list("FOOD", -1, null, null), - list("MRE", round(scale * 5), /obj/item/storage/box/MRE, VENDOR_ITEM_REGULAR), + list("MRE", round(scale * 5), /obj/item/storage/box/MRE/nofluff, VENDOR_ITEM_REGULAR), list("MRE Box", round(scale * 1), /obj/item/ammo_box/magazine/misc/mre, VENDOR_ITEM_REGULAR), list("TOOLS", -1, null, null), diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index 8e4ffb90d2bd..b96d58f251a5 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -762,6 +762,23 @@ isopened = 1 icon_state = "mealpackopened" +/obj/item/storage/box/MRE/nofluff + +/obj/item/storage/box/MRE/nofluff/fill_preset_inventory() + pickfluffflavor() + +/obj/item/storage/box/MRE/nofluff/proc/pickfluffflavor() + var/main = pick("boneless pork ribs", "grilled chicken", "pizza square", "spaghetti chunks", "chicken tender") + var/second = pick("cracker", "cheese spread", "rice onigiri", "mashed potatoes", "risotto") + var/side = pick("biscuit", "meatballs", "pretzels", "peanuts", "sushi") + var/desert = pick("spiced apples", "chocolate brownie", "sugar cookie", "coco bar", "flan", "honey flan") + name = "[initial(name)] ([main])" + //1 in 3 chance of getting a fortune cookie + new /obj/item/reagent_container/food/snacks/packaged_meal(src, main) + new /obj/item/reagent_container/food/snacks/packaged_meal(src, second) + new /obj/item/reagent_container/food/snacks/packaged_meal(src, side) + new /obj/item/reagent_container/food/snacks/packaged_meal(src, desert) + //food boxes for storage in bulk //meat diff --git a/code/modules/projectiles/ammo_boxes/misc_boxes.dm b/code/modules/projectiles/ammo_boxes/misc_boxes.dm index 7b19555f4de5..9706fd5eec68 100644 --- a/code/modules/projectiles/ammo_boxes/misc_boxes.dm +++ b/code/modules/projectiles/ammo_boxes/misc_boxes.dm @@ -58,7 +58,7 @@ /obj/item/ammo_box/magazine/misc/mre name = "\improper box of MREs" desc = "A box of MREs. Nutritious, but not delicious." - magazine_type = /obj/item/storage/box/MRE + magazine_type = /obj/item/storage/box/MRE/nofluff num_of_magazines = 12 overlay_content = "_mre" From ff6379709609bc212670627491d7e8bf1337a222 Mon Sep 17 00:00:00 2001 From: Steelpoint <6595389+Steelpoint@users.noreply.github.com> Date: Sat, 6 Apr 2024 13:54:54 +0800 Subject: [PATCH 2/6] Update boxes.dm --- code/game/objects/items/storage/boxes.dm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index b96d58f251a5..9a239783b7b5 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -754,6 +754,18 @@ . = ..() isopened = 0 icon_state = "mealpack" + RegisterSignal(src, COMSIG_ITEM_DROPPED, PROC_REF(try_forced_folding)) + +/obj/item/storage/box/MRE/proc/try_forced_folding(datum/source, mob/user) + SIGNAL_HANDLER + + for(var/obj/item/reagent_container/food/snacks/packaged_meal/meal in src) + return + + UnregisterSignal(src, COMSIG_ITEM_DROPPED) + storage_close(user) + to_chat(user, SPAN_NOTICE("You throw away [src].")) + qdel(src) /obj/item/storage/box/MRE/update_icon() if(!contents.len) From c593f4f126499d9ae63cada6bd494fdd6944591c Mon Sep 17 00:00:00 2001 From: Steelpoint <6595389+Steelpoint@users.noreply.github.com> Date: Sat, 6 Apr 2024 14:01:27 +0800 Subject: [PATCH 3/6] Update squad_prep.dm --- .../machinery/vending/vendor_types/squad_prep/squad_prep.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm index cf57d9d7cfaa..2736de3a981d 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm @@ -305,7 +305,7 @@ /obj/structure/machinery/cm_vending/sorted/cargo_guns/squad/populate_product_list(scale) listed_products = list( list("FOOD", -1, null, null), - list("MRE", round(scale * 5), /obj/item/storage/box/MRE/nofluff, VENDOR_ITEM_REGULAR), + list("MRE", round(scale * 5), /obj/item/storage/box/MRE, VENDOR_ITEM_REGULAR), list("MRE Box", round(scale * 1), /obj/item/ammo_box/magazine/misc/mre, VENDOR_ITEM_REGULAR), list("TOOLS", -1, null, null), From ed43c76ddb2e289b6e20abac95455b6635d348dc Mon Sep 17 00:00:00 2001 From: Steelpoint <6595389+Steelpoint@users.noreply.github.com> Date: Sat, 6 Apr 2024 14:02:20 +0800 Subject: [PATCH 4/6] Update boxes.dm --- code/game/objects/items/storage/boxes.dm | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index 9a239783b7b5..142dfc5d0dc0 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -774,23 +774,6 @@ isopened = 1 icon_state = "mealpackopened" -/obj/item/storage/box/MRE/nofluff - -/obj/item/storage/box/MRE/nofluff/fill_preset_inventory() - pickfluffflavor() - -/obj/item/storage/box/MRE/nofluff/proc/pickfluffflavor() - var/main = pick("boneless pork ribs", "grilled chicken", "pizza square", "spaghetti chunks", "chicken tender") - var/second = pick("cracker", "cheese spread", "rice onigiri", "mashed potatoes", "risotto") - var/side = pick("biscuit", "meatballs", "pretzels", "peanuts", "sushi") - var/desert = pick("spiced apples", "chocolate brownie", "sugar cookie", "coco bar", "flan", "honey flan") - name = "[initial(name)] ([main])" - //1 in 3 chance of getting a fortune cookie - new /obj/item/reagent_container/food/snacks/packaged_meal(src, main) - new /obj/item/reagent_container/food/snacks/packaged_meal(src, second) - new /obj/item/reagent_container/food/snacks/packaged_meal(src, side) - new /obj/item/reagent_container/food/snacks/packaged_meal(src, desert) - //food boxes for storage in bulk //meat From 97591409c453ddc0ec04bcec2e443eebc9578a6a Mon Sep 17 00:00:00 2001 From: Steelpoint <6595389+Steelpoint@users.noreply.github.com> Date: Sat, 6 Apr 2024 14:02:45 +0800 Subject: [PATCH 5/6] Update misc_boxes.dm --- code/modules/projectiles/ammo_boxes/misc_boxes.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/projectiles/ammo_boxes/misc_boxes.dm b/code/modules/projectiles/ammo_boxes/misc_boxes.dm index 9706fd5eec68..7b19555f4de5 100644 --- a/code/modules/projectiles/ammo_boxes/misc_boxes.dm +++ b/code/modules/projectiles/ammo_boxes/misc_boxes.dm @@ -58,7 +58,7 @@ /obj/item/ammo_box/magazine/misc/mre name = "\improper box of MREs" desc = "A box of MREs. Nutritious, but not delicious." - magazine_type = /obj/item/storage/box/MRE/nofluff + magazine_type = /obj/item/storage/box/MRE num_of_magazines = 12 overlay_content = "_mre" From 1fc8846137dbe4d2f9ebf422e26967ba8d20c022 Mon Sep 17 00:00:00 2001 From: Steelpoint <6595389+Steelpoint@users.noreply.github.com> Date: Sat, 6 Apr 2024 15:02:32 +0800 Subject: [PATCH 6/6] Update code/game/objects/items/storage/boxes.dm Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- code/game/objects/items/storage/boxes.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index 142dfc5d0dc0..4b7ecc4c5599 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -759,7 +759,7 @@ /obj/item/storage/box/MRE/proc/try_forced_folding(datum/source, mob/user) SIGNAL_HANDLER - for(var/obj/item/reagent_container/food/snacks/packaged_meal/meal in src) + if(locate(/obj/item/reagent_container/food/snacks/packaged_meal) in src) return UnregisterSignal(src, COMSIG_ITEM_DROPPED)