From 21330ec1ce1f2c13a95da582fcf14f15a622eb97 Mon Sep 17 00:00:00 2001 From: Guti <32563288+TheCaramelion@users.noreply.github.com> Date: Sat, 22 Aug 2026 17:52:20 +0200 Subject: [PATCH] Adds maintenance pills (#19673) * Maint pills * Vitamins! * Pills here! * funny * Lowers the chance of alcohol to happen --- code/datums/elements/lootable/maint.dm | 9 ++-- code/datums/elements/lootable/misc.dm | 4 +- code/datums/elements/lootable/trash.dm | 6 ++- .../items/weapons/storage/pill_bottle.dm | 4 ++ code/game/objects/random/_random.dm | 1 + .../reagents/reagent_containers/pill.dm | 42 +++++++++++++++++++ vorestation.dme | 1 + 7 files changed, 61 insertions(+), 6 deletions(-) create mode 100644 code/game/objects/items/weapons/storage/pill_bottle.dm diff --git a/code/datums/elements/lootable/maint.dm b/code/datums/elements/lootable/maint.dm index 4f54f626dad..1bbc00b62ba 100644 --- a/code/datums/elements/lootable/maint.dm +++ b/code/datums/elements/lootable/maint.dm @@ -109,7 +109,8 @@ /obj/item/radio/headset, /obj/item/paicard, /obj/item/reagent_containers/hypospray/autoinjector/biginjector/glucose, - /obj/item/reagent_containers/syringe/old + /obj/item/reagent_containers/syringe/old, + /obj/item/reagent_containers/pill/maintenance ) uncommon_loot = list( @@ -203,14 +204,16 @@ /obj/item/newspaper, /obj/item/paper/crumpled, /obj/item/paper/crumpled/bloody, - /obj/item/reagent_containers/syringe/old + /obj/item/reagent_containers/syringe/old, + /obj/item/reagent_containers/pill/maintenance ) uncommon_loot = list( /obj/item/reagent_containers/syringe/steroid, /obj/item/storage/pill_bottle/zoom, /obj/item/storage/pill_bottle/happy, - /obj/item/storage/pill_bottle/paracetamol + /obj/item/storage/pill_bottle/paracetamol, + /obj/item/storage/pill_bottle/maintenance ) diff --git a/code/datums/elements/lootable/misc.dm b/code/datums/elements/lootable/misc.dm index eda416f4d19..d4535962b42 100644 --- a/code/datums/elements/lootable/misc.dm +++ b/code/datums/elements/lootable/misc.dm @@ -4,7 +4,9 @@ chance_uncommon = 0 chance_rare = 0 common_loot = list( - /obj/random/unidentified_medicine/old_medicine + /obj/random/unidentified_medicine/old_medicine, + /obj/item/storage/pill_bottle/maintenance, + /obj/item/reagent_containers/pill/maintenance ) // Like the above but has way better odds, in exchange for being in a place still inhabited (or was recently). diff --git a/code/datums/elements/lootable/trash.dm b/code/datums/elements/lootable/trash.dm index 9393807ce15..24576604655 100644 --- a/code/datums/elements/lootable/trash.dm +++ b/code/datums/elements/lootable/trash.dm @@ -92,7 +92,8 @@ /obj/item/storage/box/mousetraps, /obj/item/toy/baseball, /obj/item/storage/box/cups, - /obj/item/storage/wallet) + /obj/item/storage/wallet, + /obj/item/reagent_containers/pill/maintenance) uncommon_loot = list( /obj/item/pen/chameleon, @@ -132,7 +133,8 @@ /obj/item/clothing/mask/gas/voice, /obj/item/spacecash/random_value, /obj/item/clothing/gloves/bluespace/deluxe, - /obj/item/storage/backpack/dufflebag/syndie) + /obj/item/storage/backpack/dufflebag/syndie, + /obj/item/storage/pill_bottle/maintenance) rare_loot = list( /obj/item/pizzavoucher, diff --git a/code/game/objects/items/weapons/storage/pill_bottle.dm b/code/game/objects/items/weapons/storage/pill_bottle.dm new file mode 100644 index 00000000000..afac13a18a0 --- /dev/null +++ b/code/game/objects/items/weapons/storage/pill_bottle.dm @@ -0,0 +1,4 @@ +/obj/item/storage/pill_bottle/maintenance + name = "bottle of maintenance pills" + desc = "An old pill bottle. It smells musty." + starts_with = list(/obj/item/reagent_containers/pill/maintenance = 7) diff --git a/code/game/objects/random/_random.dm b/code/game/objects/random/_random.dm index 65190b035ce..2e1a92e944a 100644 --- a/code/game/objects/random/_random.dm +++ b/code/game/objects/random/_random.dm @@ -66,6 +66,7 @@ GLOB.random_junk_ += /obj/item/inflatable/torn GLOB.random_junk_ += /obj/effect/decal/cleanable/molten_item GLOB.random_junk_ += /obj/item/material/shard + GLOB.random_junk_ += /obj/item/reagent_containers/pill/maintenance GLOB.random_junk_ -= /obj/item/trash/plate GLOB.random_junk_ -= /obj/item/trash/snack_bowl diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index 44fb5b325cc..de75703962b 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -422,3 +422,45 @@ . = ..() reagents.add_reagent(REAGENT_ID_ANTITOXIN, 5) color = reagents.get_color() + +/obj/item/reagent_containers/pill/maintenance + name = "maintenance pill" + desc = "A strange pill found in the depths of maintenance" + icon_state = "pill24" + var/random_reagent = REAGENT_ID_WATER + var/static/list/names = list( + "maintenance pill", + "floor pill", + "mystery pill", + "suspicious pill", + "strange pill", + "lucky pill", + "ominous pill", + "eerie pill", + "gas station vitamin pill" + ) + + var/static/list/descs = list( + "Your feeling is telling you no, but...", + "Drugs are expensive, you can't afford not to eat any pills that you find.", + "Surely, there's no way this could go bad.", + "Winners don't do dr- oh what the heck!", + "Free pills? At no cost, how could I lose?", + "Make sure to take your vitamins!" + ) + +/obj/item/reagent_containers/pill/maintenance/Initialize(mapload) + . = ..() + pick_reagent() + if(istype(SSchemistry.chemical_reagents[random_reagent], /datum/reagent/ethanol) && prob(75)) // REROLL + pick_reagent() + name = pick(names) + if(prob(30)) + desc = pick(descs) + reagents.add_reagent(random_reagent, rand(5, 20)) + icon_state = "pill[rand(5, 24)]" + +/obj/item/reagent_containers/pill/maintenance/proc/pick_reagent() + random_reagent = pick(SSchemistry.chemical_reagents) + if(random_reagent in GLOB.obtainable_chemical_blacklist) + random_reagent = REAGENT_ID_WATER // You get WATER diff --git a/vorestation.dme b/vorestation.dme index b481b10e209..766150b4f32 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1963,6 +1963,7 @@ #include "code\game\objects\items\weapons\storage\misc.dm" #include "code\game\objects\items\weapons\storage\mre.dm" #include "code\game\objects\items\weapons\storage\ore_bag.dm" +#include "code\game\objects\items\weapons\storage\pill_bottle.dm" #include "code\game\objects\items\weapons\storage\pouches.dm" #include "code\game\objects\items\weapons\storage\quickdraw.dm" #include "code\game\objects\items\weapons\storage\secure.dm"