diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 8ac413b605..a14b5d2e9a 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -176,7 +176,7 @@ return return - + /obj/machinery/vending/emag_act(var/remaining_charges, var/mob/user) if (!emagged) src.emagged = 1 @@ -235,26 +235,25 @@ nanomanager.update_uis(src) return else if(istype(W, /obj/item/weapon/wrench)) + playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) + if(anchored) + user.visible_message("[user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.") + else + user.visible_message("[user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.") + if(do_after(user, 20)) if(!src) return - playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) - switch (anchored) - if (0) - anchored = 1 - user.visible_message("\The [user] tightens the bolts securing \the [src] to the floor.", "You tighten the bolts securing \the [src] to the floor.") - if (1) - user.visible_message("\The [user] unfastens the bolts securing \the [src] to the floor.", "You unfasten the bolts securing \the [src] to the floor.") - anchored = 0 + user << "You [anchored? "un" : ""]secured \the [src]!" + anchored = !anchored return - else if(src.panel_open) + else for(var/datum/data/vending_product/R in product_records) if(istype(W, R.product_path)) stock(R, user) qdel(W) - - else + return ..() /** @@ -560,7 +559,7 @@ /obj/machinery/vending/proc/stock(var/datum/data/vending_product/R, var/mob/user) if(src.panel_open) - user << "You stock \the [src] with \a [R.product_name]" + user << "You insert \the [src] in the product receptor." R.amount++ nanomanager.update_uis(src) @@ -692,7 +691,8 @@ /obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale = 6,/obj/item/weapon/reagent_containers/food/drinks/bottle/orangejuice = 4, /obj/item/weapon/reagent_containers/food/drinks/bottle/tomatojuice = 4,/obj/item/weapon/reagent_containers/food/drinks/bottle/limejuice = 4, /obj/item/weapon/reagent_containers/food/drinks/bottle/cream = 4,/obj/item/weapon/reagent_containers/food/drinks/cans/tonic = 8, - /obj/item/weapon/reagent_containers/food/drinks/cans/cola = 8, /obj/item/weapon/reagent_containers/food/drinks/cans/sodawater = 15, + /obj/item/weapon/reagent_containers/food/drinks/bottle/cola = 5, /obj/item/weapon/reagent_containers/food/drinks/bottle/space_up = 5, + /obj/item/weapon/reagent_containers/food/drinks/bottle/space_mountain_wind = 5, /obj/item/weapon/reagent_containers/food/drinks/cans/sodawater = 15, /obj/item/weapon/reagent_containers/food/drinks/flask/barflask = 2, /obj/item/weapon/reagent_containers/food/drinks/flask/vacuumflask = 2, /obj/item/weapon/reagent_containers/food/drinks/drinkingglass = 30,/obj/item/weapon/reagent_containers/food/drinks/ice = 9, /obj/item/weapon/reagent_containers/food/drinks/bottle/melonliquor = 2,/obj/item/weapon/reagent_containers/food/drinks/bottle/bluecuracao = 2, diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index 31f6295987..d10c09ecb1 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -41,7 +41,7 @@ //how far the reaction proceeds each time it is processed. Used with either REACTION_RATE or HALF_LIFE macros. var/reaction_rate = HALF_LIFE(0) - //if less than 1, the reaction will be inhibited if the ratio of products/reagents is too high. + //if less than 1, the reaction will be inhibited if the ratio of products/reagents is too high. //0.5 = 50% yield -> reaction will only proceed halfway until products are removed. var/yield = 1.0 @@ -70,22 +70,22 @@ /datum/chemical_reaction/proc/calc_reaction_progress(var/datum/reagents/holder, var/reaction_limit) var/progress = reaction_limit * reaction_rate //simple exponential progression - + //calculate yield if(1-yield > 0.001) //if yield ratio is big enough just assume it goes to completion /* Determine the max amount of product by applying the yield condition: (max_product/result_amount) / reaction_limit == yield/(1-yield) - + We make use of the fact that: reaction_limit = (holder.get_reagent_amount(reactant) / required_reagents[reactant]) of the limiting reagent. */ var/yield_ratio = yield/(1-yield) var/max_product = yield_ratio * reaction_limit * result_amount //rearrange to obtain max_product var/yield_limit = max(0, max_product - holder.get_reagent_amount(result))/result_amount - + progress = min(progress, yield_limit) //apply yield limit - + //apply min reaction progress - wasn't sure if this should go before or after applying yield //I guess people can just have their miniscule reactions go to completion regardless of yield. for(var/reactant in required_reagents) @@ -93,7 +93,7 @@ if(remainder <= min_reaction*required_reagents[reactant]) progress = reaction_limit break - + return progress /datum/chemical_reaction/proc/process(var/datum/reagents/holder) @@ -101,28 +101,28 @@ var/list/reaction_limits = list() for(var/reactant in required_reagents) reaction_limits += holder.get_reagent_amount(reactant) / required_reagents[reactant] - + //determine how far the reaction proceeds var/reaction_limit = min(reaction_limits) var/progress_limit = calc_reaction_progress(holder, reaction_limit) - + var/reaction_progress = min(reaction_limit, progress_limit) //no matter what, the reaction progress cannot exceed the stoichiometric limit. - + //need to obtain the new reagent's data before anything is altered var/data = send_data(holder, reaction_progress) - + //remove the reactants for(var/reactant in required_reagents) var/amt_used = required_reagents[reactant] * reaction_progress holder.remove_reagent(reactant, amt_used, safety = 1) - + //add the product var/amt_produced = result_amount * reaction_progress if(result) holder.add_reagent(result, amt_produced, data, safety = 1) - + on_reaction(holder, amt_produced) - + return reaction_progress //called when a reaction processes @@ -314,9 +314,9 @@ /datum/chemical_reaction/dexalin name = "Dexalin" id = "dexalin" - result = "dexalin" + result = "dexalin" required_reagents = list("acetone" = 2, "phoron" = 0.1) - catalysts = list("phoron" = 1) + catalysts = list("phoron" = 1) inhibitors = list("water" = 1) // Messes with cryox result_amount = 1 @@ -1470,22 +1470,22 @@ name = "Iced Tea" id = "icetea" result = "icetea" - required_reagents = list("ice" = 1, "tea" = 3) + required_reagents = list("ice" = 1, "tea" = 4) result_amount = 4 /datum/chemical_reaction/icecoffee name = "Iced Coffee" id = "icecoffee" result = "icecoffee" - required_reagents = list("ice" = 1, "coffee" = 3) + required_reagents = list("ice" = 1, "coffee" = 4) result_amount = 4 /datum/chemical_reaction/nuka_cola name = "Nuka Cola" id = "nuka_cola" result = "nuka_cola" - required_reagents = list("uranium" = 1, "cola" = 6) - result_amount = 6 + required_reagents = list("uranium" = 1, "cola" = 5) + result_amount = 5 /datum/chemical_reaction/moonshine name = "Moonshine" @@ -1599,8 +1599,8 @@ name = "White Russian" id = "whiterussian" result = "whiterussian" - required_reagents = list("blackrussian" = 3, "cream" = 2) - result_amount = 5 + required_reagents = list("blackrussian" = 2, "cream" = 1) + result_amount = 3 /datum/chemical_reaction/whiskey_cola name = "Whiskey Cola" @@ -1620,8 +1620,8 @@ name = "Bloody Mary" id = "bloodymary" result = "bloodymary" - required_reagents = list("vodka" = 1, "tomatojuice" = 2, "limejuice" = 1) - result_amount = 4 + required_reagents = list("vodka" = 2, "tomatojuice" = 3, "limejuice" = 1) + result_amount = 6 /datum/chemical_reaction/gargle_blaster name = "Pan-Galactic Gargle Blaster" @@ -1648,22 +1648,22 @@ name = "Toxins Special" id = "phoronspecial" result = "phoronspecial" - required_reagents = list("rum" = 2, "vermouth" = 1, "phoron" = 2) - result_amount = 5 + required_reagents = list("rum" = 2, "vermouth" = 2, "phoron" = 2) + result_amount = 6 /datum/chemical_reaction/beepsky_smash name = "Beepksy Smash" id = "beepksysmash" result = "beepskysmash" - required_reagents = list("limejuice" = 2, "whiskey" = 2, "iron" = 1) - result_amount = 4 + required_reagents = list("limejuice" = 1, "whiskey" = 1, "iron" = 1) + result_amount = 2 /datum/chemical_reaction/doctor_delight name = "The Doctor's Delight" id = "doctordelight" result = "doctorsdelight" - required_reagents = list("limejuice" = 1, "tomatojuice" = 1, "orangejuice" = 1, "cream" = 1, "tricordrazine" = 1) - result_amount = 5 + required_reagents = list("limejuice" = 1, "tomatojuice" = 1, "orangejuice" = 1, "cream" = 2, "tricordrazine" = 1) + result_amount = 6 /datum/chemical_reaction/irish_cream name = "Irish Cream" @@ -1718,15 +1718,15 @@ name = "Long Island Iced Tea" id = "longislandicedtea" result = "longislandicedtea" - required_reagents = list("vodka" = 1, "gin" = 1, "tequilla" = 1, "cubalibre" = 1) - result_amount = 4 + required_reagents = list("vodka" = 1, "gin" = 1, "tequilla" = 1, "cubalibre" = 3) + result_amount = 6 /datum/chemical_reaction/icedtea name = "Long Island Iced Tea" id = "longislandicedtea" result = "longislandicedtea" - required_reagents = list("vodka" = 1, "gin" = 1, "tequilla" = 1, "cubalibre" = 1) - result_amount = 4 + required_reagents = list("vodka" = 1, "gin" = 1, "tequilla" = 1, "cubalibre" = 3) + result_amount = 6 /datum/chemical_reaction/threemileisland name = "Three Mile Island Iced Tea" @@ -1746,8 +1746,8 @@ name = "Black Russian" id = "blackrussian" result = "blackrussian" - required_reagents = list("vodka" = 3, "kahlua" = 2) - result_amount = 5 + required_reagents = list("vodka" = 2, "kahlua" = 1) + result_amount = 3 /datum/chemical_reaction/manhattan name = "Manhattan" @@ -1774,8 +1774,8 @@ name = "Gin Fizz" id = "ginfizz" result = "ginfizz" - required_reagents = list("gin" = 2, "sodawater" = 1, "limejuice" = 1) - result_amount = 4 + required_reagents = list("gin" = 1, "sodawater" = 1, "limejuice" = 1) + result_amount = 3 /datum/chemical_reaction/bahama_mama name = "Bahama mama" @@ -1802,22 +1802,22 @@ name = "Demons Blood" id = "demonsblood" result = "demonsblood" - required_reagents = list("rum" = 1, "spacemountainwind" = 1, "blood" = 1, "dr_gibb" = 1) - result_amount = 4 + required_reagents = list("rum" = 3, "spacemountainwind" = 1, "blood" = 1, "dr_gibb" = 1) + result_amount = 6 /datum/chemical_reaction/booger name = "Booger" id = "booger" result = "booger" - required_reagents = list("cream" = 1, "banana" = 1, "rum" = 1, "watermelonjuice" = 1) - result_amount = 4 + required_reagents = list("cream" = 2, "banana" = 1, "rum" = 1, "watermelonjuice" = 1) + result_amount = 5 /datum/chemical_reaction/antifreeze name = "Anti-freeze" id = "antifreeze" result = "antifreeze" - required_reagents = list("vodka" = 2, "cream" = 1, "ice" = 1) - result_amount = 4 + required_reagents = list("vodka" = 1, "cream" = 1, "ice" = 1) + result_amount = 3 /datum/chemical_reaction/barefoot name = "Barefoot" @@ -1909,14 +1909,14 @@ id = "changelingsting" result = "changelingsting" required_reagents = list("screwdrivercocktail" = 1, "limejuice" = 1, "lemonjuice" = 1) - result_amount = 5 + result_amount = 3 /datum/chemical_reaction/aloe name = "Aloe" id = "aloe" result = "aloe" required_reagents = list("cream" = 1, "whiskey" = 1, "watermelonjuice" = 1) - result_amount = 2 + result_amount = 3 /datum/chemical_reaction/andalusia name = "Andalusia" @@ -1957,8 +1957,8 @@ name = "Erika Surprise" id = "erikasurprise" result = "erikasurprise" - required_reagents = list("ale" = 1, "limejuice" = 1, "whiskey" = 1, "banana" = 1, "ice" = 1) - result_amount = 5 + required_reagents = list("ale" = 2, "limejuice" = 1, "whiskey" = 1, "banana" = 1, "ice" = 1) + result_amount = 6 /datum/chemical_reaction/devilskiss name = "Devils Kiss" @@ -2007,14 +2007,14 @@ id = "kiraspecial" result = "kiraspecial" required_reagents = list("orangejuice" = 1, "limejuice" = 1, "sodawater" = 1) - result_amount = 2 + result_amount = 3 /datum/chemical_reaction/brownstar name = "Brown Star" id = "brownstar" result = "brownstar" required_reagents = list("orangejuice" = 2, "cola" = 1) - result_amount = 2 + result_amount = 3 /datum/chemical_reaction/milkshake name = "Milkshake" @@ -2034,8 +2034,8 @@ name = "Sui Dream" id = "suidream" result = "suidream" - required_reagents = list("space_up" = 2, "bluecuracao" = 1, "melonliquor" = 1) - result_amount = 4 + required_reagents = list("space_up" = 1, "bluecuracao" = 1, "melonliquor" = 1) + result_amount = 3 /* Removed xenoarcheology stuff datum diff --git a/code/modules/reagents/reagent_containers/food.dm b/code/modules/reagents/reagent_containers/food.dm index 1b94dfcdae..1e797d6040 100644 --- a/code/modules/reagents/reagent_containers/food.dm +++ b/code/modules/reagents/reagent_containers/food.dm @@ -1,4 +1,4 @@ -#define CELLS 4 +#define CELLS 8 #define CELLSIZE (32/CELLS) //////////////////////////////////////////////////////////////////////////////// diff --git a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm index 5c557ce950..fdaf407fa3 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm +++ b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm @@ -347,6 +347,33 @@ ..() reagents.add_reagent("grenadine", 100) +/obj/item/weapon/reagent_containers/food/drinks/bottle/cola + name = "\improper Space Cola" + desc = "Cola. in space" + icon_state = "colabottle" + center_of_mass = list("x"=16, "y"=6) + New() + ..() + reagents.add_reagent("cola", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/space_up + name = "\improper Space-Up" + desc = "Tastes like a hull breach in your mouth." + icon_state = "space-up_bottle" + center_of_mass = list("x"=16, "y"=6) + New() + ..() + reagents.add_reagent("space_up", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/space_mountain_wind + name = "\improper Space Mountain Wind" + desc = "Blows right through you like a space wind." + icon_state = "space_mountain_wind_bottle" + center_of_mass = list("x"=16, "y"=6) + New() + ..() + reagents.add_reagent("spacemountainwind", 100) + /obj/item/weapon/reagent_containers/food/drinks/bottle/pwine name = "Warlock's Velvet" desc = "What a delightful packaging for a surely high quality wine! The vintage must be amazing!" diff --git a/html/changelogs/Hubblenaut-dev.yml b/html/changelogs/Hubblenaut-dev.yml new file mode 100644 index 0000000000..dd90f083d3 --- /dev/null +++ b/html/changelogs/Hubblenaut-dev.yml @@ -0,0 +1,35 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: Hubblenaut + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +changes: + - rscadd: "Adds glass bottles for Cola, Space Up and Space Mountain Wind to Booze-O-Mat." + - tweak: "Some bar drink recipes have been amended to easily sum to 30 units for drinking glasses." + - tweak: "Vendors now have a product receptor for accepting goods. Opening the maintenance painel is no longer required." + - tweak: "Wrenching a vending machine is no longer a silent action." + - tweak: "Stepup: Item placement on 4x4 grids seemed to work great. Now we'll try 8x8." \ No newline at end of file diff --git a/icons/obj/drinks.dmi b/icons/obj/drinks.dmi index 5d3b01eb1f..2c353b0afc 100644 Binary files a/icons/obj/drinks.dmi and b/icons/obj/drinks.dmi differ