diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index fe65e44ddec..4b468d81ccc 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -1083,6 +1083,14 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine cost = 10 containername = "beekeeper suits" +//Bottler +/datum/supply_packs/organic/bottler + name = "Brewing Buddy Bottler Unit" + contains = list(/obj/machinery/bottler, + /obj/item/weapon/wrench) + cost = 35 + containername = "bottler crate" + ////////////////////////////////////////////////////////////////////////////// //////////////////////////// Materials /////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm index f96f0c7ee36..928eba59a6a 100644 --- a/code/game/objects/items/trash.dm +++ b/code/game/objects/items/trash.dm @@ -8,84 +8,86 @@ desc = "This is rubbish." /obj/item/trash/raisins - name = "4no raisins" - icon_state= "4no_raisins" + name = "4no raisins" + icon_state= "4no_raisins" /obj/item/trash/candy - name = "Candy" - icon_state= "candy" + name = "Candy" + icon_state= "candy" /obj/item/trash/cheesie - name = "Cheesie honkers" - icon_state = "cheesie_honkers" + name = "Cheesie honkers" + icon_state = "cheesie_honkers" /obj/item/trash/chips - name = "Chips" - icon_state = "chips" + name = "Chips" + icon_state = "chips" /obj/item/trash/popcorn - name = "Popcorn" - icon_state = "popcorn" + name = "Popcorn" + icon_state = "popcorn" /obj/item/trash/sosjerky - name = "Scaredy's Private Reserve Beef Jerky" - icon_state = "sosjerky" + name = "Scaredy's Private Reserve Beef Jerky" + icon_state = "sosjerky" /obj/item/trash/syndi_cakes - name = "Syndi cakes" - icon_state = "syndi_cakes" + name = "Syndi cakes" + icon_state = "syndi_cakes" /obj/item/trash/waffles - name = "Waffles" - icon_state = "waffles" + name = "Waffles" + icon_state = "waffles" /obj/item/trash/plate - name = "Plate" - icon_state = "plate" + name = "Plate" + icon_state = "plate" /obj/item/trash/snack_bowl - name = "Snack bowl" - icon_state = "snack_bowl" + name = "Snack bowl" + icon_state = "snack_bowl" /obj/item/trash/pistachios - name = "Pistachios pack" - icon_state = "pistachios_pack" + name = "Pistachios pack" + icon_state = "pistachios_pack" /obj/item/trash/semki - name = "Semki pack" - icon_state = "semki_pack" + name = "Semki pack" + icon_state = "semki_pack" /obj/item/trash/tray - name = "Tray" - icon_state = "tray" + name = "Tray" + icon_state = "tray" /obj/item/trash/candle - name = "candle" - icon = 'icons/obj/candle.dmi' - icon_state = "candle4" + name = "candle" + icon = 'icons/obj/candle.dmi' + icon_state = "candle4" /obj/item/trash/liquidfood - name = "\improper \"LiquidFood\" ration" - icon_state = "liquidfood" + name = "\improper \"LiquidFood\" ration" + icon_state = "liquidfood" /obj/item/trash/can - name = "crushed can" - icon_state = "cola" + name = "crushed can" + icon_state = "cola" + var/is_glass = 0 + var/is_plastic = 0 /obj/item/trash/gum - name = "chewed gum" - desc = "NOT free candy." - icon_state = "gum" + name = "chewed gum" + desc = "NOT free candy." + icon_state = "gum" /obj/item/trash/tastybread - name = "bread tube" - icon_state = "tastybread" + name = "bread tube" + icon_state = "tastybread" /obj/item/trash/tapetrash - name = "old duct tape" - icon_state = "tape" - desc = "Not sticky anymore." - throw_range = 1 + name = "old duct tape" + icon_state = "tape" + desc = "Not sticky anymore." + throw_range = 1 /obj/item/trash/attack(mob/M as mob, mob/living/user as mob) return diff --git a/code/modules/food/beverages/bottler.dm b/code/modules/food/beverages/bottler.dm new file mode 100644 index 00000000000..7e764595fd5 --- /dev/null +++ b/code/modules/food/beverages/bottler.dm @@ -0,0 +1,414 @@ + +//adjust these to change the maximum capacity of the bottler for each container type +#define MAX_GLASS 10 +#define MAX_PLAST 20 +#define MAX_METAL 25 + +//adjust these to change the number of containers the bottler will make per sheet +#define RATIO_GLASS 1 +#define RATIO_PLAST 2 +#define RATIO_METAL 5 + +/obj/machinery/bottler + name = "bottler unit" + desc = "A machine that combines ingredients and bottles the resulting beverages." + icon = 'icons/obj/kitchen.dmi' + icon_state = "bottler_off" + density = 1 + anchored = 1 + var/list/slots[3] + var/list/datum/bottler_recipe/available_recipes + var/list/acceptable_items + var/list/containers = list("glass bottle" = 10, "plastic bottle" = 20, "metal can" = 25) + var/bottling = 0 + +/obj/machinery/bottler/New() + if(!available_recipes) + available_recipes = list() + acceptable_items = list() + //These are going to be acceptable even if they aren't in a recipe + acceptable_items |= /obj/item/weapon/reagent_containers/food/snacks + acceptable_items |= /obj/item/weapon/reagent_containers/food/drinks/cans + //the rest is based on what is used in recipes so we don't have people destroying the nuke disc + for(var/type in subtypesof(/datum/bottler_recipe)) + var/datum/bottler_recipe/recipe = new type + if(recipe.result) // Ignore recipe subtypes that lack a result + available_recipes += recipe + for(var/i = 1, i <= recipe.ingredients.len, i++) + acceptable_items |= recipe.ingredients[i] + else + qdel(recipe) + +/obj/machinery/bottler/attackby(obj/item/O, mob/user, params) + if(iswrench(O)) //This being before the canUnequip check allows borgs to (un)wrench bottlers in case they need move them to fix stuff + playsound(src, 'sound/items/Ratchet.ogg', 50, 1) + if(anchored) + anchored = 0 + to_chat(user, "[src] can now be moved.") + else + anchored = 1 + to_chat(user, "[src] is now secured.") + return 1 + if(!user.canUnEquip(O, 0)) + to_chat(user, "[O] is stuck to your hand, you can't seem to put it down!") + return 0 + if(is_type_in_list(O,acceptable_items)) + if(istype(O, /obj/item/weapon/reagent_containers/food/snacks)) + var/obj/item/weapon/reagent_containers/food/snacks/S = O + user.unEquip(S) + if(S.reagents && !S.reagents.total_volume) //This prevents us from using empty foods, should one occur due to some sort of error + to_chat(user, "[S] is gone, oh no!") + qdel(S) //Delete the food object because it is useless even as food due to the lack of reagents + else + insert_item(S, user) + return 1 + else if(istype(O, /obj/item/weapon/reagent_containers/food/drinks/cans)) + var/obj/item/weapon/reagent_containers/food/drinks/cans/C = O + if(C.reagents) + if(C.canopened && C.reagents.total_volume) //This prevents us from using opened cans that still have something in them + to_chat(user, "Only unopened cans and bottles can be processed to ensure product integrity.") + return 0 + user.unEquip(C) + if(!C.reagents.total_volume) //Empty cans get recycled, even if they have somehow remained unopened due to some sort of error + recycle_container(C) + else //Full cans that are unopened get inserted for processing as ingredients + insert_item(C, user) + return 1 + else + user.unEquip(O) + insert_item(O, user) + return 1 + else if(istype(O, /obj/item/trash/can)) //Crushed cans (and bottles) are returnable still + var/obj/item/trash/can/C = O + user.unEquip(C) + recycle_container(C) + return 1 + else if(istype(O, /obj/item/stack/sheet)) //Sheets of materials can replenish the machine's supply of drink containers (when people inevitably don't return them) + var/obj/item/stack/sheet/S = O + user.unEquip(S) + process_sheets(S) + return 1 + else //If it doesn't qualify in the above checks, we don't want it. Inform the person so they (ideally) stop trying to put the nuke disc in. + to_chat(user, "You aren't sure this is able to be processed by the machine.") + return 0 + //..() + +/obj/machinery/bottler/proc/insert_item(obj/item/O, mob/user) + if(!O || !user) + return + if(slots[1] && slots[2] && slots[3]) + to_chat(user, "[src] is full, please remove or process the contents first.") + return + var/slot_inserted = 0 + for(var/i = 1, i <= slots.len, i++) + if(!slots[i]) + slots[i] = O + slot_inserted = i + break + if(!slot_inserted) + to_chat(user, "Something went wrong and the machine spits out [O].") + O.forceMove(loc) + else + to_chat(user, "You load [O] into the [slot_inserted]\th ingredient tray.") + O.forceMove(src) + updateUsrDialog() + +/obj/machinery/bottler/proc/eject_items(var/slot) + var/obj/item/O = null + if(!slot) + for(var/i = 1, i <= slots.len, i++) + if(slots[i]) + O = slots[i] + O.forceMove(loc) + slots[i] = null + visible_message("[src] beeps as it ejects the contents of all the ingredient trays.") + else + if(slots[slot]) //ensures the tray actually has something to eject so we don't runtime on trying to reference null + O = slots[slot] + O.forceMove(loc) + slots[slot] = null + visible_message("[src] beeps as it ejects [O.name] from the [slot]\th ingredient tray.") + updateUsrDialog() + +/obj/machinery/bottler/proc/recycle_container(obj/item/O) + if(!O) + return + var/con_type + var/max_define + if(istype(O, /obj/item/trash/can)) + var/obj/item/trash/can/C = O + if(C.is_glass) + con_type = "glass bottle" + max_define = MAX_GLASS + else if(C.is_plastic) + con_type = "plastic bottle" + max_define = MAX_PLAST + else + con_type = "metal can" + max_define = MAX_METAL + else if(istype(O, /obj/item/weapon/reagent_containers/food/drinks/cans)) + var/obj/item/weapon/reagent_containers/food/drinks/cans/C = O + if(C.is_glass) + con_type = "glass bottle" + max_define = MAX_GLASS + else if(C.is_plastic) + con_type = "plastic bottle" + max_define = MAX_PLAST + else + con_type = "metal can" + max_define = MAX_METAL + if(con_type) + if(containers[con_type] < max_define) + containers[con_type]++ + visible_message("[src] whirs briefly as it prepares the container for reuse.") + qdel(O) + updateUsrDialog() + else + visible_message("[src] cannot store any more cans at this time. Please fill some before recycling more.") + O.forceMove(loc) + +/obj/machinery/bottler/proc/process_sheets(obj/item/stack/sheet/S) + if(!S) + return + S.forceMove(loc) + var/con_type + var/max_define + var/mat_ratio + //Glass sheets for glass bottles (1 bottle per sheet) + if(istype(S, /obj/item/stack/sheet/glass)) + con_type = "glass bottle" + max_define = MAX_GLASS + mat_ratio = RATIO_GLASS + else if(istype(S, /obj/item/stack/sheet/mineral/plastic)) + con_type = "plastic bottle" + max_define = MAX_PLAST + mat_ratio = RATIO_PLAST + else if(istype(S, /obj/item/stack/sheet/metal)) + con_type = "metal can" + max_define = MAX_METAL + mat_ratio = RATIO_METAL + else + visible_message("[src] rejects the unusable materials.") + return + var/missing + var/sheets_needed + var/sheets_to_use + if(con_type) + missing = max_define - containers[con_type] + sheets_needed = round(missing / mat_ratio, 1) + if(missing % mat_ratio) + sheets_needed += 1 + sheets_to_use = min(sheets_needed, S.amount) + if(missing) + visible_message("[src] shudders as it converts [sheets_to_use] [S.singular_name]\s into new [con_type]s.") + containers[con_type] += sheets_to_use * mat_ratio + containers[con_type] = min(containers[con_type], max_define) + S.use(sheets_to_use) + else + visible_message("[src] rejects the [S] because it already is fully stocked with [con_type]s.") + +/obj/machinery/bottler/proc/select_recipe() + for(var/datum/bottler_recipe/recipe in available_recipes) + var/number_matches = 0 + for(var/i = 1, i <= slots.len, i++) + var/obj/item/O = slots[i] + if(istype(O, recipe.ingredients[i])) + if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown)) + var/obj/item/weapon/reagent_containers/food/snacks/grown/G = O + if(G.seed && G.seed.kitchen_tag == recipe.tags[i]) + number_matches++ + else + number_matches++ + if(number_matches == 3) + return recipe + return null + +/obj/machinery/bottler/proc/dispense_empty_container(container) + var/con_type + var/obj/item/weapon/reagent_containers/food/drinks/cans/bottler/drink_container + switch(container) + if(1) //glass bottle + con_type = "glass bottle" + drink_container = /obj/item/weapon/reagent_containers/food/drinks/cans/bottler/glass_bottle + if(2) //plastic bottle + con_type = "plastic bottle" + drink_container = /obj/item/weapon/reagent_containers/food/drinks/cans/bottler/plastic_bottle + if(3) //metal can + con_type = "metal can" + drink_container = /obj/item/weapon/reagent_containers/food/drinks/cans/bottler/metal_can + if(containers[con_type]) + //empties aren't sealed, so let's open it quietly + drink_container = new drink_container() + drink_container.canopened = 1 + drink_container.flags |= OPENCONTAINER + drink_container.forceMove(loc) + containers[con_type]-- + +/obj/machinery/bottler/proc/process_ingredients(container) + //stop if we have ZERO ingredients (what would you process?) + if(!slots[1] && !slots[2] && !slots[3]) + visible_message("There are no ingredients to process! Please insert some first.") + return + //prep a container + var/obj/item/weapon/reagent_containers/food/drinks/cans/bottler/drink_container + var/con_type + switch(container) + if(1) //glass bottle + con_type = "glass bottle" + drink_container = /obj/item/weapon/reagent_containers/food/drinks/cans/bottler/glass_bottle + if(2) //plastic bottle + con_type = "plastic bottle" + drink_container = /obj/item/weapon/reagent_containers/food/drinks/cans/bottler/plastic_bottle + if(3) //metal can + con_type = "metal can" + drink_container = /obj/item/weapon/reagent_containers/food/drinks/cans/bottler/metal_can + + if(!con_type) + visible_message("Error 404: Drink Container Not Found.") + return + if(!containers[con_type]) + visible_message("Error 503: Out of [con_type]s.") + return + else + drink_container = new drink_container() + containers[con_type]-- + //select and process a recipe based on inserted ingredients + visible_message("[src] hums as it processes the ingredients...") + bottling = 1 + var/datum/bottler_recipe/recipe_to_use = select_recipe() + if(!recipe_to_use) + //bad recipe, ruins the drink + var/contents = pick("thick goop", "pungent sludge", "unspeakable slurry", "gross-looking concoction", "eldritch abomination of liquids") + visible_message("The [con_type] fills with \an [contents]...") + drink_container.reagents.add_reagent(pick("????", "toxic_slurry", "meatslurry", "glowing_slury", "fishwater"), pick(30, 50)) + drink_container.name = "Liquid Mistakes" + drink_container.desc = "WARNING: CONTENTS MAY BE AWFUL, DRINK AT OWN RISK." + else + //good recipe, make it + visible_message("The [con_type] fills with a delicious-looking beverage!") + drink_container.reagents.add_reagent(recipe_to_use.result, 50) + drink_container.name = "[recipe_to_use.name]" + drink_container.desc = "[recipe_to_use.description]" + flick("bottler_on", src) + spawn(45) + for(var/i = 1, i <= slots.len, i++) + qdel(slots[i]) + slots[i] = null + bottling = 0 + drink_container.forceMove(loc) + updateUsrDialog() + +/obj/machinery/bottler/attack_ai(mob/user) + attack_hand(user) + +/obj/machinery/bottler/attack_ghost(mob/user) + attack_hand(user) + +/obj/machinery/bottler/attack_hand(mob/user) + if(stat & BROKEN) + return + interact(user) + +/obj/machinery/bottler/interact(mob/user) + user.set_machine(src) + //html ahoy + var/dat = "" + if(bottling) + dat = "
| Containers: | " + dat += "|||||
|---|---|---|---|---|---|
| Glass Bottles: [containers["glass bottle"]] | " + dat += "Plastic Bottles: [containers["plastic bottle"]] | " + dat += "Metal Cans: [containers["metal can"]] | " + dat += "|||
| Dispense | " + else + dat += "Out of stock | " + if(containers["plastic bottle"]) + dat += "Dispense | " + else + dat += "Out of stock | " + if(containers["metal can"]) + dat += "Dispense | " + else + dat += "Out of stock | " + dat += "
| Ingredient Tray Contents: | " + dat += "|||
|---|---|---|---|
| [bicon(O)] [O.name] | "
+ else
+ dat += "Tray Empty | " + + if(slots[1] && slots[2] && slots[3]) + dat += "Process Ingredients | " + else + dat += "Insufficient Ingredients | " + dat += "
| Eject | " + else + dat += "N/A | " + dat += "Eject All | " + dat += "|
Insert three ingredients and press process to create a beverage. You will be able to select a container for the beverage before processing begins.
" + dat += "Inserting empty bottles and cans, as well as sheets of glass, plastic, or metal will restock the appropriate container supply.
" + var/datum/browser/popup = new(user, "bottler", "Bottler Menu", 575, 400) + popup.set_content(dat) + popup.open() + +/obj/machinery/bottler/Topic(href, href_list) + if(..()) + return 1 + if(bottling) + return + + add_fingerprint(usr) + usr.set_machine(src) + + if(href_list["process"]) + var/list/choices = list("Glass Bottle" = 1, "Plastic Bottle" = 2, "Metal Can" = 3) + var/selection = input("Select a container for your beverage.", "Container") as null|anything in choices + if(!selection) + return + else + selection = choices[selection] + process_ingredients(selection) + + if(href_list["eject"]) + var/slot = text2num(href_list["eject"]) + eject_items(slot) + + if(href_list["dispense"]) + var/container = text2num(href_list["dispense"]) + dispense_empty_container(container) + + updateUsrDialog() + return + +/obj/machinery/bottler/update_icon() + if(stat & BROKEN) + icon_state = "bottler_broken" + else if(bottling) + icon_state = "bottler_on" + else + icon_state = "bottler_off" \ No newline at end of file diff --git a/code/modules/food/beverages/bottler_recipes.dm b/code/modules/food/beverages/bottler_recipes.dm new file mode 100644 index 00000000000..be7504afade --- /dev/null +++ b/code/modules/food/beverages/bottler_recipes.dm @@ -0,0 +1,86 @@ + +/datum/bottler_recipe + var/name = "" + var/description = "" + var/list/ingredients[3] + var/list/tags[3] + var/datum/reagent/result = null + + +/* Example of how a bottler_recipe should look: +/datum/bottler_recipe/example + name = "Example" + description = "This is an example." + ingredients = list(thing_1, thing_2, thing_3) + tags = list(null, "tag_2", null) + result = "water" + +The ingredients list must have 3 non-null entries. +The tags list must have 3 entries, using null where a tag is unused. +Failing to ensure both lists have EXACTLY 3 entries (unless the system is updated in the future to use a different number) will result in runtimes. +There is no excuse to do this wrong now that there is an example for you. --FalseIncarnate +*/ + + +/datum/bottler_recipe/Paradise_Punch + name = "Paradise Punch" + description = "Tastes just how you'd think Paradise would if you could bottle it." + ingredients = list(/obj/item/weapon/reagent_containers/food/snacks/grown, + /obj/item/weapon/reagent_containers/food/snacks/grown, + /obj/item/weapon/reagent_containers/food/snacks/grown) + tags = list("grapes", "banana", "cherries") + result = "paradise_punch" + +/datum/bottler_recipe/Applepocalypse + name = "Apple-pocalypse" + description = "If doomsday came in fruit form, it'd probably be apples." + ingredients = list(/obj/item/weapon/reagent_containers/food/snacks/grown, + /obj/item/weapon/reagent_containers/food/snacks/grown, + /obj/item/weapon/reagent_containers/food/snacks/grown) + tags = list("apple", "apple", "apple") + result = "apple-pocalypse" + +/datum/bottler_recipe/Berry_Banned + name = "Berry Banned" + description = "Reason for ban: Excessive Flavor." + ingredients = list(/obj/item/weapon/reagent_containers/food/snacks/grown, + /obj/item/weapon/reagent_containers/food/snacks/grown, + /obj/item/weapon/reagent_containers/food/snacks/grown) + tags = list("berries", "berries", "berries") + result = "berry_banned" + +/datum/bottler_recipe/Berry_Banned2 + name = "Berry Banned" + description = "Reason for ban: Excessive Flavor." + ingredients = list(/obj/item/weapon/reagent_containers/food/snacks/grown, + /obj/item/weapon/reagent_containers/food/snacks/grown, + /obj/item/weapon/reagent_containers/food/snacks/grown) + tags = list("poisonberries", "poisonberries", "poisonberries") + result = "berry_banned2" + +/datum/bottler_recipe/Blackeye_Brew + name = "Blackeye Brew" + description = "Creamy, smooth flavor, just like the bald heads of the masses. Supposedly aged for 30 years." + ingredients = list(/obj/item/weapon/reagent_containers/food/drinks/cans/cola, + /obj/item/weapon/reagent_containers/food/snacks/grown, + /obj/item/weapon/reagent_containers/food/snacks/icecream) + tags = list(null, "sugarcane", null) + result = "blackeye_brew" + +/datum/bottler_recipe/Grape_Granade + name = "Grape Granade" + description = "Exploding with grape flavor and a favorite among ERT members system-wide." + ingredients = list(/obj/item/weapon/reagent_containers/food/drinks/cans/grape_juice, + /obj/item/weapon/reagent_containers/food/snacks/grown, + /obj/item/device/flash) + tags = list(null, "grapes", null) + result = "grape_granade" + +/datum/bottler_recipe/Meteor_Malt + name = "Meteor Malt" + description = "Soft drinks have been detected on collision course with your tastebuds." + ingredients = list(/obj/item/weapon/ore, + /obj/item/weapon/reagent_containers/food/snacks/grown, + /obj/item/weapon/ore) + tags = list(null, "wheat", null) + result = "meteor_malt" diff --git a/code/modules/hydroponics/seed_datums.dm b/code/modules/hydroponics/seed_datums.dm index a028fa66727..7d646b23cc3 100644 --- a/code/modules/hydroponics/seed_datums.dm +++ b/code/modules/hydroponics/seed_datums.dm @@ -825,6 +825,7 @@ display_name = "grapevines" mutants = list("greengrapes") chems = list("plantmatter" = list(1,10), "sugar" = list(1,5)) + kitchen_tag = "grapes" preset_icon = "grapes" /datum/seed/grapes/New() @@ -1089,6 +1090,7 @@ seed_name = "sugarcane" display_name = "sugarcanes" chems = list("sugar" = list(4,5)) + kitchen_tag = "sugarcane" preset_icon = "sugarcane" /datum/seed/sugarcane/New() diff --git a/code/modules/reagents/newchem/paradise_pop.dm b/code/modules/reagents/newchem/paradise_pop.dm new file mode 100644 index 00000000000..4ba859c430e --- /dev/null +++ b/code/modules/reagents/newchem/paradise_pop.dm @@ -0,0 +1,66 @@ + +/* + Paradise Pop reagents + Created through the bottler machine via bottler_recipes, not through standard reactions + Eventually will have special effects (minor mostly) tied to their reagents, but for now are purely for flavor + + Make sure to yell at me to finish giving them effects later + -FalseIncarnate +*/ + + +//Paradise Punch: No effect, aside from maybe messages about how tasty it is or something +/datum/reagent/paradise_punch + name = "Paradise Punch" + id = "paradise_punch" + description = "Tastes just how you'd think Paradise would if you could bottle it." + reagent_state = LIQUID + color = "#cc0044" + +//Apple-pocalypse: Low chance to cause a goonchem vortex that pulls things within a very small radius (2 tiles?) towards the drinker +/datum/reagent/apple_pocalypse + name = "Apple-pocalypse" + id = "apple-pocalypse" + description = "If doomsday came in fruit form, it'd probably be apples." + reagent_state = LIQUID + color = "#44FF44" + +//Berry Banned: This one is tasty and safe to drink, might have a low chance of healing a random damage type? +/datum/reagent/berry_banned + name = "Berry Banned" + id = "berry_banned" + description = "Reason for ban: Excessive Flavor." + reagent_state = LIQUID + color = "#FF44FF" + +//Berry Banned 2: This one is tasty and toxic. Deals toxin damage and MAYBE plays the "BWOINK!" sound if it kills someone? +/datum/reagent/berry_banned2 + name = "Berry Banned" + id = "berry_banned2" + description = "Reason for ban: Excessive Flavor." + reagent_state = LIQUID + color = "#FF44FF" + +//Blackeye Brew: Chance to make the drinker say greytider-themed things like "I thought clown was valid!" +/datum/reagent/blackeye_brew + name = "Blackeye Brew" + id = "blackeye_brew" + description = "Creamy, smooth flavor, just like the bald heads of the masses. Supposedly aged for 30 years." + reagent_state = LIQUID + color = "#4d2600" + +//Grape Granade: causes the drinker to sometimes burp, has a low chance to cause a goonchem vortex that pushes things within a very small radius (1-2 tiles) away from the drinker +/datum/reagent/grape_granade + name = "Grape Granade" + id = "grape_granade" + description = "Exploding with grape flavor and a favorite among ERT members system-wide." + reagent_state = LIQUID + color = "#9933ff" + +//Meteor Malt: Sometimes causes screen shakes for the drinker like a meteor impact, low chance to add 1-5 units of a random mineral reagent to the drinker's blood (iron, copper, silver, gold, uranium, carbon, etc) +/datum/reagent/meteor_malt + name = "Meteor Malt" + id = "meteor_malt" + description = "Soft drinks have been detected on collision course with your tastebuds." + reagent_state = LIQUID + color = "#cc9900" diff --git a/code/modules/reagents/reagent_containers/food/cans.dm b/code/modules/reagents/reagent_containers/food/cans.dm index 611649dcf80..d114460b244 100644 --- a/code/modules/reagents/reagent_containers/food/cans.dm +++ b/code/modules/reagents/reagent_containers/food/cans.dm @@ -1,6 +1,7 @@ /obj/item/weapon/reagent_containers/food/drinks/cans - var canopened = 0 - var is_glass = 0 + var/canopened = 0 + var/is_glass = 0 + var/is_plastic = 0 /obj/item/weapon/reagent_containers/food/drinks/cans/New() ..() @@ -16,6 +17,9 @@ /obj/item/weapon/reagent_containers/food/drinks/cans/proc/crush(mob/user) var/obj/item/trash/can/crushed_can = new /obj/item/trash/can(user.loc) crushed_can.icon_state = icon_state + //inherit material vars for recycling purposes + crushed_can.is_glass = is_glass + crushed_can.is_plastic = is_plastic if(is_glass) playsound(user.loc, 'sound/effects/Glassbr3.ogg', rand(10, 50), 1) crushed_can.name = "broken bottle" @@ -85,6 +89,7 @@ name = "Bottled Water" desc = "Introduced to the vending machines by Skrellian request, this water comes straight from the Martian poles." icon_state = "waterbottle" + is_plastic = 1 New() ..() reagents.add_reagent("water", 30) @@ -259,3 +264,62 @@ New() ..() reagents.add_reagent("synthanol", 50) + +/obj/item/weapon/reagent_containers/food/drinks/cans/bottler + name = "generic beverage container" + desc = "this shouldn't ever be spawned. shame on you" + icon_state = "glass_bottle" + +/obj/item/weapon/reagent_containers/food/drinks/cans/bottler/on_reagent_change() + update_icon() + +/obj/item/weapon/reagent_containers/food/drinks/cans/bottler/pickup(mob/user) + ..() + update_icon() + +/obj/item/weapon/reagent_containers/food/drinks/cans/bottler/dropped(mob/user) + ..() + update_icon() + +/obj/item/weapon/reagent_containers/food/drinks/cans/bottler/attack_hand() + ..() + update_icon() + +/obj/item/weapon/reagent_containers/food/drinks/cans/bottler/update_icon() + overlays.Cut() + + if(reagents.total_volume) + var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]10") + + switch(round(reagents.total_volume)) + if(0 to 9) + filling.icon_state = "[icon_state]-10" + if(10 to 19) + filling.icon_state = "[icon_state]10" + if(20 to 29) + filling.icon_state = "[icon_state]20" + if(30 to 39) + filling.icon_state = "[icon_state]30" + if(40 to 49) + filling.icon_state = "[icon_state]40" + if(50 to INFINITY) + filling.icon_state = "[icon_state]50" + + filling.icon += mix_color_from_reagents(reagents.reagent_list) + overlays += filling + +/obj/item/weapon/reagent_containers/food/drinks/cans/bottler/glass_bottle + name = "glass bottle" + desc = "A glass bottle suitable for beverages." + icon_state = "glass_bottle" + is_glass = 1 +/obj/item/weapon/reagent_containers/food/drinks/cans/bottler/plastic_bottle + name = "plastic bottle" + desc = "A plastic bottle suitable for beverages." + icon_state = "plastic_bottle" + is_plastic = 1 + +/obj/item/weapon/reagent_containers/food/drinks/cans/bottler/metal_can + name = "metal can" + desc = "A metal can suitable for beverages." + icon_state = "metal_can" diff --git a/code/modules/reagents/reagent_containers/glass_containers.dm b/code/modules/reagents/reagent_containers/glass_containers.dm index 3e23348881f..686c4234bc2 100644 --- a/code/modules/reagents/reagent_containers/glass_containers.dm +++ b/code/modules/reagents/reagent_containers/glass_containers.dm @@ -205,13 +205,20 @@ var/percent = round((reagents.total_volume / volume) * 100) switch(percent) - if(0 to 9) filling.icon_state = "[icon_state]-10" - if(10 to 24) filling.icon_state = "[icon_state]10" - if(25 to 49) filling.icon_state = "[icon_state]25" - if(50 to 74) filling.icon_state = "[icon_state]50" - if(75 to 79) filling.icon_state = "[icon_state]75" - if(80 to 90) filling.icon_state = "[icon_state]80" - if(91 to INFINITY) filling.icon_state = "[icon_state]100" + if(0 to 9) + filling.icon_state = "[icon_state]-10" + if(10 to 24) + filling.icon_state = "[icon_state]10" + if(25 to 49) + filling.icon_state = "[icon_state]25" + if(50 to 74) + filling.icon_state = "[icon_state]50" + if(75 to 79) + filling.icon_state = "[icon_state]75" + if(80 to 90) + filling.icon_state = "[icon_state]80" + if(91 to INFINITY) + filling.icon_state = "[icon_state]100" filling.icon += mix_color_from_reagents(reagents.reagent_list) overlays += filling diff --git a/icons/obj/drinks.dmi b/icons/obj/drinks.dmi index 36ba65a32e3..dd3633784a5 100644 Binary files a/icons/obj/drinks.dmi and b/icons/obj/drinks.dmi differ diff --git a/icons/obj/kitchen.dmi b/icons/obj/kitchen.dmi index bf752f1ca21..301a990639e 100644 Binary files a/icons/obj/kitchen.dmi and b/icons/obj/kitchen.dmi differ diff --git a/icons/obj/reagentfillings.dmi b/icons/obj/reagentfillings.dmi index 42ba9cf7f29..b82dcb47f3c 100644 Binary files a/icons/obj/reagentfillings.dmi and b/icons/obj/reagentfillings.dmi differ diff --git a/icons/obj/trash.dmi b/icons/obj/trash.dmi index faea5fe4180..6edd905c554 100644 Binary files a/icons/obj/trash.dmi and b/icons/obj/trash.dmi differ diff --git a/paradise.dme b/paradise.dme index fbbf5394196..a4d08db7b91 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1323,6 +1323,8 @@ #include "code\modules\food\recipes_microwave.dm" #include "code\modules\food\recipes_oven.dm" #include "code\modules\food\recipes_table.dm" +#include "code\modules\food\beverages\bottler.dm" +#include "code\modules\food\beverages\bottler_recipes.dm" #include "code\modules\garbage_collection\garbage_collector.dm" #include "code\modules\garbage_collection\gc_testing.dm" #include "code\modules\holiday\christmas.dm" @@ -1821,6 +1823,7 @@ #include "code\modules\reagents\newchem\medicine.dm" #include "code\modules\reagents\newchem\newchem_procs.dm" #include "code\modules\reagents\newchem\other.dm" +#include "code\modules\reagents\newchem\paradise_pop.dm" #include "code\modules\reagents\newchem\patch.dm" #include "code\modules\reagents\newchem\pyro.dm" #include "code\modules\reagents\newchem\toxins.dm"