From 3a45ceee6412db103cf9ec276e76142bb9e7d90f Mon Sep 17 00:00:00 2001 From: Hubblenaut Date: Wed, 30 Mar 2016 19:27:50 +0200 Subject: [PATCH 1/2] Full fertilizer bottles of type glass/bottle --- code/game/machinery/biogenerator.dm | 42 ++++++++--------- code/game/machinery/vending.dm | 2 +- code/modules/clothing/suits/jobs.dm | 2 +- .../hydroponics/trays/tray_reagents.dm | 45 +------------------ .../reagent_containers/glass/bottle.dm | 35 ++++++++++++++- html/changelogs/Hubblenaut-hydro.yml | 36 +++++++++++++++ 6 files changed, 94 insertions(+), 68 deletions(-) create mode 100644 html/changelogs/Hubblenaut-hydro.yml diff --git a/code/game/machinery/biogenerator.dm b/code/game/machinery/biogenerator.dm index f2500f0afa..04a0e87c34 100644 --- a/code/game/machinery/biogenerator.dm +++ b/code/game/machinery/biogenerator.dm @@ -108,9 +108,9 @@ dat += "10 milk ([round(20/build_eff)])
" dat += "Slab of meat ([round(50/build_eff)])
" dat += "Nutrient
" - dat += "E-Z-Nutrient ([round(10/build_eff)]) | x5
" - dat += "Left 4 Zed ([round(20/build_eff)]) | x5
" - dat += "Robust Harvest ([round(25/build_eff)]) | x5
" + dat += "E-Z-Nutrient ([round(10/build_eff)]) | x5
" + dat += "Left 4 Zed ([round(20/build_eff)]) | x5
" + dat += "Robust Harvest ([round(25/build_eff)]) | x5
" dat += "Leather
" dat += "Wallet ([round(100/build_eff)])
" dat += "Botanical gloves ([round(250/build_eff)])
" @@ -181,29 +181,29 @@ if("meat") new/obj/item/weapon/reagent_containers/food/snacks/meat(loc) if("ez") - new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc) + new/obj/item/weapon/reagent_containers/glass/bottle/eznutrient(loc) if("l4z") - new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc) + new/obj/item/weapon/reagent_containers/glass/bottle/left4zed(loc) if("rh") - new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc) + new/obj/item/weapon/reagent_containers/glass/bottle/robustharvest(loc) if("ez5") //It's not an elegant method, but it's safe and easy. -Cheridan - new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc) - new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc) - new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc) - new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc) - new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(loc) + new/obj/item/weapon/reagent_containers/glass/bottle/eznutrient(loc) + new/obj/item/weapon/reagent_containers/glass/bottle/eznutrient(loc) + new/obj/item/weapon/reagent_containers/glass/bottle/eznutrient(loc) + new/obj/item/weapon/reagent_containers/glass/bottle/eznutrient(loc) + new/obj/item/weapon/reagent_containers/glass/bottle/eznutrient(loc) if("l4z5") - new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc) - new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc) - new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc) - new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc) - new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(loc) + new/obj/item/weapon/reagent_containers/glass/bottle/left4zed(loc) + new/obj/item/weapon/reagent_containers/glass/bottle/left4zed(loc) + new/obj/item/weapon/reagent_containers/glass/bottle/left4zed(loc) + new/obj/item/weapon/reagent_containers/glass/bottle/left4zed(loc) + new/obj/item/weapon/reagent_containers/glass/bottle/left4zed(loc) if("rh5") - new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc) - new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc) - new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc) - new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc) - new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(loc) + new/obj/item/weapon/reagent_containers/glass/bottle/robustharvest(loc) + new/obj/item/weapon/reagent_containers/glass/bottle/robustharvest(loc) + new/obj/item/weapon/reagent_containers/glass/bottle/robustharvest(loc) + new/obj/item/weapon/reagent_containers/glass/bottle/robustharvest(loc) + new/obj/item/weapon/reagent_containers/glass/bottle/robustharvest(loc) if("wallet") new/obj/item/weapon/storage/wallet(loc) if("gloves") diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 8099103d8a..fdc5786a49 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -842,7 +842,7 @@ product_ads = "We like plants!;Don't you want some?;The greenest thumbs ever.;We like big plants.;Soft soil..." icon_state = "nutri" icon_deny = "nutri-deny" - products = list(/obj/item/weapon/reagent_containers/glass/fertilizer/ez = 35,/obj/item/weapon/reagent_containers/glass/fertilizer/l4z = 25,/obj/item/weapon/reagent_containers/glass/fertilizer/rh = 15,/obj/item/weapon/plantspray/pests = 20, + products = list(/obj/item/weapon/reagent_containers/glass/bottle/eznutrient = 6,/obj/item/weapon/reagent_containers/glass/bottle/left4zed = 4,/obj/item/weapon/reagent_containers/glass/bottle/robustharvest = 3,/obj/item/weapon/plantspray/pests = 20, /obj/item/weapon/reagent_containers/syringe = 5,/obj/item/weapon/storage/bag/plants = 5) premium = list(/obj/item/weapon/reagent_containers/glass/bottle/ammonia = 10,/obj/item/weapon/reagent_containers/glass/bottle/diethylamine = 5) idle_power_usage = 211 //refrigerator - believe it or not, this is actually the average power consumption of a refrigerated vending machine according to NRCan. diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm index 8a3daf68ff..0c5f09e5af 100644 --- a/code/modules/clothing/suits/jobs.dm +++ b/code/modules/clothing/suits/jobs.dm @@ -10,7 +10,7 @@ item_state = "apron" blood_overlay_type = "armor" body_parts_covered = 0 - allowed = list (/obj/item/weapon/reagent_containers/spray/plantbgone,/obj/item/device/analyzer/plant_analyzer,/obj/item/seeds,/obj/item/weapon/reagent_containers/glass/fertilizer,/obj/item/weapon/material/minihoe) + allowed = list (/obj/item/weapon/reagent_containers/spray/plantbgone,/obj/item/device/analyzer/plant_analyzer,/obj/item/seeds,/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/material/minihoe) //Captain /obj/item/clothing/suit/captunic diff --git a/code/modules/hydroponics/trays/tray_reagents.dm b/code/modules/hydroponics/trays/tray_reagents.dm index 7583deae41..818bbd3b15 100644 --- a/code/modules/hydroponics/trays/tray_reagents.dm +++ b/code/modules/hydroponics/trays/tray_reagents.dm @@ -92,47 +92,4 @@ icon = 'icons/obj/chemical.dmi' icon_state = "bottle15" toxicity = 8 - weed_kill_str = 7 - -// ************************************* -// Nutrient defines for hydroponics -// ************************************* - -/obj/item/weapon/reagent_containers/glass/fertilizer - name = "fertilizer bottle" - desc = "A small glass bottle. Can hold up to 10 units." - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle16" - flags = OPENCONTAINER - possible_transfer_amounts = null - w_class = 2.0 - - var/fertilizer //Reagent contained, if any. - - //Like a shot glass! - amount_per_transfer_from_this = 10 - volume = 10 - -/obj/item/weapon/reagent_containers/glass/fertilizer/New() - ..() - - src.pixel_x = rand(-5.0, 5) - src.pixel_y = rand(-5.0, 5) - - if(fertilizer) - reagents.add_reagent(fertilizer,10) - -/obj/item/weapon/reagent_containers/glass/fertilizer/ez - name = "bottle of E-Z-Nutrient" - icon_state = "bottle16" - fertilizer = "eznutrient" - -/obj/item/weapon/reagent_containers/glass/fertilizer/l4z - name = "bottle of Left 4 Zed" - icon_state = "bottle18" - fertilizer = "left4zed" - -/obj/item/weapon/reagent_containers/glass/fertilizer/rh - name = "bottle of Robust Harvest" - icon_state = "bottle15" - fertilizer = "robustharvest" + weed_kill_str = 7 \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/glass/bottle.dm b/code/modules/reagents/reagent_containers/glass/bottle.dm index d05e2d23b7..4888484cd9 100644 --- a/code/modules/reagents/reagent_containers/glass/bottle.dm +++ b/code/modules/reagents/reagent_containers/glass/bottle.dm @@ -143,6 +143,39 @@ reagents.add_reagent("ammonia", 60) update_icon() +/obj/item/weapon/reagent_containers/glass/bottle/eznutrient + name = "\improper EZ NUtrient bottle" + desc = "A small bottle." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle-4" + + New() + ..() + reagents.add_reagent("eznutrient", 60) + update_icon() + +/obj/item/weapon/reagent_containers/glass/bottle/left4zed + name = "\improper Left-4-Zed bottle" + desc = "A small bottle." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle-4" + + New() + ..() + reagents.add_reagent("left4zed", 60) + update_icon() + +/obj/item/weapon/reagent_containers/glass/bottle/robustharvest + name = "\improper Robust Harvest" + desc = "A small bottle." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle-4" + + New() + ..() + reagents.add_reagent("robustharvest", 60) + update_icon() + /obj/item/weapon/reagent_containers/glass/bottle/diethylamine name = "diethylamine bottle" desc = "A small bottle." @@ -192,4 +225,4 @@ New() ..() reagents.add_reagent("frostoil", 60) - update_icon() + update_icon() diff --git a/html/changelogs/Hubblenaut-hydro.yml b/html/changelogs/Hubblenaut-hydro.yml new file mode 100644 index 0000000000..dd0bb9fac6 --- /dev/null +++ b/html/changelogs/Hubblenaut-hydro.yml @@ -0,0 +1,36 @@ +################################ +# 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 + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - tweak: "Hydroponics vendor and biogenerator offer full bottles of fertilizer. Prices and amount available adjusted to accomodate." \ No newline at end of file From 2b44de88b1d769be03c8528e1a8dbc57db72c7b3 Mon Sep 17 00:00:00 2001 From: Hubblenaut Date: Wed, 20 Apr 2016 13:21:35 +0200 Subject: [PATCH 2/2] Change to absolute pathing --- .../reagent_containers/glass/bottle.dm | 149 ++++++++++-------- 1 file changed, 85 insertions(+), 64 deletions(-) diff --git a/code/modules/reagents/reagent_containers/glass/bottle.dm b/code/modules/reagents/reagent_containers/glass/bottle.dm index 4888484cd9..55dfcc7745 100644 --- a/code/modules/reagents/reagent_containers/glass/bottle.dm +++ b/code/modules/reagents/reagent_containers/glass/bottle.dm @@ -55,16 +55,18 @@ var/image/lid = image(icon, src, "lid_bottle") overlays += lid + /obj/item/weapon/reagent_containers/glass/bottle/inaprovaline name = "inaprovaline bottle" desc = "A small bottle. Contains inaprovaline - used to stabilize patients." icon = 'icons/obj/chemical.dmi' icon_state = "bottle-4" - New() - ..() - reagents.add_reagent("inaprovaline", 60) - update_icon() +/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline/New() + ..() + reagents.add_reagent("inaprovaline", 60) + update_icon() + /obj/item/weapon/reagent_containers/glass/bottle/toxin name = "toxin bottle" @@ -72,10 +74,11 @@ icon = 'icons/obj/chemical.dmi' icon_state = "bottle-3" - New() - ..() - reagents.add_reagent("toxin", 60) - update_icon() +/obj/item/weapon/reagent_containers/glass/bottle/toxin/New() + ..() + reagents.add_reagent("toxin", 60) + update_icon() + /obj/item/weapon/reagent_containers/glass/bottle/cyanide name = "cyanide bottle" @@ -83,10 +86,11 @@ icon = 'icons/obj/chemical.dmi' icon_state = "bottle-3" - New() - ..() - reagents.add_reagent("cyanide", 30) //volume changed to match chloral - update_icon() +/obj/item/weapon/reagent_containers/glass/bottle/cyanide/New() + ..() + reagents.add_reagent("cyanide", 30) //volume changed to match chloral + update_icon() + /obj/item/weapon/reagent_containers/glass/bottle/stoxin name = "soporific bottle" @@ -94,10 +98,11 @@ icon = 'icons/obj/chemical.dmi' icon_state = "bottle-3" - New() - ..() - reagents.add_reagent("stoxin", 60) - update_icon() +/obj/item/weapon/reagent_containers/glass/bottle/stoxin/New() + ..() + reagents.add_reagent("stoxin", 60) + update_icon() + /obj/item/weapon/reagent_containers/glass/bottle/chloralhydrate name = "Chloral Hydrate Bottle" @@ -105,10 +110,11 @@ icon = 'icons/obj/chemical.dmi' icon_state = "bottle-3" - New() - ..() - reagents.add_reagent("chloralhydrate", 30) //Intentionally low since it is so strong. Still enough to knock someone out. - update_icon() +/obj/item/weapon/reagent_containers/glass/bottle/chloralhydrate/New() + ..() + reagents.add_reagent("chloralhydrate", 30) //Intentionally low since it is so strong. Still enough to knock someone out. + update_icon() + /obj/item/weapon/reagent_containers/glass/bottle/antitoxin name = "dylovene bottle" @@ -116,10 +122,11 @@ icon = 'icons/obj/chemical.dmi' icon_state = "bottle-4" - New() - ..() - reagents.add_reagent("anti_toxin", 60) - update_icon() +/obj/item/weapon/reagent_containers/glass/bottle/antitoxin/New() + ..() + reagents.add_reagent("anti_toxin", 60) + update_icon() + /obj/item/weapon/reagent_containers/glass/bottle/mutagen name = "unstable mutagen bottle" @@ -127,10 +134,11 @@ icon = 'icons/obj/chemical.dmi' icon_state = "bottle-1" - New() - ..() - reagents.add_reagent("mutagen", 60) - update_icon() +/obj/item/weapon/reagent_containers/glass/bottle/mutagen/New() + ..() + reagents.add_reagent("mutagen", 60) + update_icon() + /obj/item/weapon/reagent_containers/glass/bottle/ammonia name = "ammonia bottle" @@ -138,10 +146,11 @@ icon = 'icons/obj/chemical.dmi' icon_state = "bottle-1" - New() - ..() - reagents.add_reagent("ammonia", 60) - update_icon() +/obj/item/weapon/reagent_containers/glass/bottle/ammonia/New() + ..() + reagents.add_reagent("ammonia", 60) + update_icon() + /obj/item/weapon/reagent_containers/glass/bottle/eznutrient name = "\improper EZ NUtrient bottle" @@ -149,10 +158,11 @@ icon = 'icons/obj/chemical.dmi' icon_state = "bottle-4" - New() - ..() - reagents.add_reagent("eznutrient", 60) - update_icon() +/obj/item/weapon/reagent_containers/glass/bottle/eznutrient/New() + ..() + reagents.add_reagent("eznutrient", 60) + update_icon() + /obj/item/weapon/reagent_containers/glass/bottle/left4zed name = "\improper Left-4-Zed bottle" @@ -160,10 +170,11 @@ icon = 'icons/obj/chemical.dmi' icon_state = "bottle-4" - New() - ..() - reagents.add_reagent("left4zed", 60) - update_icon() +/obj/item/weapon/reagent_containers/glass/bottle/left4zed/New() + ..() + reagents.add_reagent("left4zed", 60) + update_icon() + /obj/item/weapon/reagent_containers/glass/bottle/robustharvest name = "\improper Robust Harvest" @@ -171,10 +182,11 @@ icon = 'icons/obj/chemical.dmi' icon_state = "bottle-4" - New() - ..() - reagents.add_reagent("robustharvest", 60) - update_icon() +/obj/item/weapon/reagent_containers/glass/bottle/robustharvest/New() + ..() + reagents.add_reagent("robustharvest", 60) + update_icon() + /obj/item/weapon/reagent_containers/glass/bottle/diethylamine name = "diethylamine bottle" @@ -182,47 +194,56 @@ icon = 'icons/obj/chemical.dmi' icon_state = "bottle-4" - New() - ..() - reagents.add_reagent("diethylamine", 60) - update_icon() +/obj/item/weapon/reagent_containers/glass/bottle/diethylamine/New() + ..() + reagents.add_reagent("diethylamine", 60) + update_icon() + /obj/item/weapon/reagent_containers/glass/bottle/pacid name = "Polytrinic Acid Bottle" desc = "A small bottle. Contains a small amount of Polytrinic Acid" icon = 'icons/obj/chemical.dmi' icon_state = "bottle-4" - New() - ..() - reagents.add_reagent("pacid", 60) - update_icon() + +/obj/item/weapon/reagent_containers/glass/bottle/pacid/New() + ..() + reagents.add_reagent("pacid", 60) + update_icon() + /obj/item/weapon/reagent_containers/glass/bottle/adminordrazine name = "Adminordrazine Bottle" desc = "A small bottle. Contains the liquid essence of the gods." icon = 'icons/obj/drinks.dmi' icon_state = "holyflask" - New() - ..() - reagents.add_reagent("adminordrazine", 60) - update_icon() + + +/obj/item/weapon/reagent_containers/glass/bottle/adminordrazine/New() + ..() + reagents.add_reagent("adminordrazine", 60) + update_icon() + /obj/item/weapon/reagent_containers/glass/bottle/capsaicin name = "Capsaicin Bottle" desc = "A small bottle. Contains hot sauce." icon = 'icons/obj/chemical.dmi' icon_state = "bottle-4" - New() - ..() - reagents.add_reagent("capsaicin", 60) - update_icon() + +/obj/item/weapon/reagent_containers/glass/bottle/capsaicin/New() + ..() + reagents.add_reagent("capsaicin", 60) + update_icon() + /obj/item/weapon/reagent_containers/glass/bottle/frostoil name = "Frost Oil Bottle" desc = "A small bottle. Contains cold sauce." icon = 'icons/obj/chemical.dmi' icon_state = "bottle-4" - New() - ..() - reagents.add_reagent("frostoil", 60) - update_icon() + +/obj/item/weapon/reagent_containers/glass/bottle/frostoil/New() + ..() + reagents.add_reagent("frostoil", 60) + update_icon()