Botany Tweaks (#389)

Watering hydroponics trays with a bucket of water will no longer waste
the excess water.
Fertilizer bottles now contain 60u. Amounts in vendors and biogenerator
cost adjusted appropriately
This commit is contained in:
NanakoAC
2016-06-20 15:34:30 +01:00
committed by skull132
parent ea0e6114c8
commit e70157ebfc
6 changed files with 77 additions and 7 deletions

View File

@@ -110,9 +110,9 @@
dat += "<A href='?src=\ref[src];action=create;item=milk;cost=20'>10 milk</A> <FONT COLOR=blue>([round(20/build_eff)])</FONT><BR>"
dat += "<A href='?src=\ref[src];action=create;item=meat;cost=50'>Slab of meat</A> <FONT COLOR=blue>([round(50/build_eff)])</FONT><BR>"
dat += "Nutrient<BR>"
dat += "<A href='?src=\ref[src];action=create;item=ez;cost=10'>E-Z-Nutrient</A> <FONT COLOR=blue>([round(10/build_eff)])</FONT> | <A href='?src=\ref[src];action=create;item=ez5;cost=50'>x5</A><BR>"
dat += "<A href='?src=\ref[src];action=create;item=l4z;cost=20'>Left 4 Zed</A> <FONT COLOR=blue>([round(20/build_eff)])</FONT> | <A href='?src=\ref[src];action=create;item=l4z5;cost=100'>x5</A><BR>"
dat += "<A href='?src=\ref[src];action=create;item=rh;cost=25'>Robust Harvest</A> <FONT COLOR=blue>([round(25/build_eff)])</FONT> | <A href='?src=\ref[src];action=create;item=rh5;cost=125'>x5</A><BR>"
dat += "<A href='?src=\ref[src];action=create;item=ez;cost=60'>E-Z-Nutrient</A> <FONT COLOR=blue>([round(60/build_eff)])</FONT> | <A href='?src=\ref[src];action=create;item=ez5;cost=300'>x5</A><BR>"
dat += "<A href='?src=\ref[src];action=create;item=l4z;cost=120'>Left 4 Zed</A> <FONT COLOR=blue>([round(120/build_eff)])</FONT> | <A href='?src=\ref[src];action=create;item=l4z5;cost=600'>x5</A><BR>"
dat += "<A href='?src=\ref[src];action=create;item=rh;cost=150'>Robust Harvest</A> <FONT COLOR=blue>([round(150/build_eff)])</FONT> | <A href='?src=\ref[src];action=create;item=rh5;cost=750'>x5</A><BR>"
dat += "Leather<BR>"
dat += "<A href='?src=\ref[src];action=create;item=wallet;cost=100'>Wallet</A> <FONT COLOR=blue>([round(100/build_eff)])</FONT><BR>"
dat += "<A href='?src=\ref[src];action=create;item=gloves;cost=250'>Botanical gloves</A> <FONT COLOR=blue>([round(250/build_eff)])</FONT><BR>"

View File

@@ -846,7 +846,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/fertilizer/ez = 6,/obj/item/weapon/reagent_containers/glass/fertilizer/l4z = 5,/obj/item/weapon/reagent_containers/glass/fertilizer/rh = 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.

View File

@@ -16,6 +16,11 @@
var/pestlevel = 0 // Pests (max 10)
var/weedlevel = 0 // Weeds (max 10)
var/maxWaterLevel = 100
var/maxNutriLevel = 10
var/maxPestLevel = 10
var/maxWeedLevel = 10
// Tray state vars.
var/dead = 0 // Is it dead?
var/harvest = 0 // Is it ready to harvest?
@@ -407,6 +412,20 @@
/obj/machinery/portable_atmospherics/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
//A special case for if the container has only water, for manual watering with buckets
if (istype(O,/obj/item/weapon/reagent_containers))
var/obj/item/weapon/reagent_containers/RC = O
if (RC.reagents.reagent_list.len == 1)
if (RC.reagents.has_reagent("water", 1))
if (waterlevel < maxWaterLevel)
var/amountToRemove = min((maxWaterLevel - waterlevel), RC.reagents.total_volume)
RC.reagents.remove_reagent("water", amountToRemove, 1)
waterlevel += amountToRemove
user.visible_message("[user] transfers [amountToRemove]u of water to the tray."," You transfer [amountToRemove]u of water to the tray.")
else
user << "This tray is full of water already."
return 1
if (O.is_open_container())
return 0

View File

@@ -100,7 +100,7 @@
/obj/item/weapon/reagent_containers/glass/fertilizer
name = "fertilizer bottle"
desc = "A small glass bottle. Can hold up to 10 units."
desc = "A small glass bottle. Can hold up to 60 units."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
flags = OPENCONTAINER
@@ -111,7 +111,7 @@
//Like a shot glass!
amount_per_transfer_from_this = 10
volume = 10
volume = 60
/obj/item/weapon/reagent_containers/glass/fertilizer/New()
..()
@@ -120,7 +120,7 @@
src.pixel_y = rand(-5.0, 5)
if(fertilizer)
reagents.add_reagent(fertilizer,10)
reagents.add_reagent(fertilizer,60)
/obj/item/weapon/reagent_containers/glass/fertilizer/ez
name = "bottle of E-Z-Nutrient"

View File

@@ -7,6 +7,20 @@
tray_light = 0
/obj/machinery/portable_atmospherics/hydroponics/soil/attackby(var/obj/item/O as obj, var/mob/user as mob)
//A special case for if the container has only water, for manual watering with buckets
if (istype(O,/obj/item/weapon/reagent_containers))
var/obj/item/weapon/reagent_containers/RC = O
if (RC.reagents.reagent_list.len == 1)
if (RC.reagents.has_reagent("water", 1))
if (waterlevel < maxWaterLevel)
var/amountToRemove = min((maxWaterLevel - waterlevel), RC.reagents.total_volume)
RC.reagents.remove_reagent("water", amountToRemove, 1)
waterlevel += amountToRemove
user.visible_message("[user] pours [amountToRemove]u of water into the soil."," You pour [amountToRemove]u of water into the soil.")
else
user << "The soil is saturated with water already."
return 1
if(istype(O,/obj/item/weapon/tank))
return
else

View File

@@ -0,0 +1,37 @@
################################
# 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: Nanako
# 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:
- rscadd: "Watering hydroponics trays with a bucket of water will no longer waste the excess water."
- rscadd: "Fertilizer bottles now contain 60u. Amounts in vendors and biogenerator cost adjusted appropriately"