Skip to content

Commit

Permalink
Merge pull request #211 from Gboster-0/botany-fixes
Browse files Browse the repository at this point in the history
Botany QoL, fixes and re-balance
  • Loading branch information
dwasint authored Jul 24, 2023
2 parents db28601 + cdee2b2 commit 2d20e69
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 7 deletions.
14 changes: 10 additions & 4 deletions code/modules/reagents/chemistry/reagents/other_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1679,17 +1679,21 @@

/datum/reagent/plantnutriment/eznutriment
name = "E-Z Nutrient"
description = "Contains electrolytes. It's what plants crave."
description = "Contains electrolytes. It's what plants crave. It makes plants slowly gain potency and yield"
color = "#376400" // RBG: 50, 100, 0
tox_prob = 5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED

// gives half the potency of saltpetre, and half the yield of diethylamine
/datum/reagent/plantnutriment/eznutriment/on_hydroponics_apply(obj/item/seeds/myseed, datum/reagents/chems, obj/machinery/hydroponics/mytray)
. = ..()
if(chems.has_reagent(src.type, 1))
mytray.yieldmod = 1
mytray.mutmod = 1
myseed.adjust_lifespan(round(chems.get_reagent_amount(type) * 0.15))
if(myseed)
myseed.adjust_potency(round(chems.get_reagent_amount(src.type) * 0.1))
myseed.adjust_yield(round(chems.get_reagent_amount(src.type) * 0.1))


/datum/reagent/plantnutriment/left4zednutriment
name = "Left 4 Zed"
Expand All @@ -1706,7 +1710,7 @@

/datum/reagent/plantnutriment/robustharvestnutriment
name = "Robust Harvest"
description = "Very potent nutriment that slows plants from mutating."
description = "Very potent nutriment that slows plants from mutating whilst also making them grow faster."
color = "#9D9D00" // RBG: 157, 157, 0
tox_prob = 8
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
Expand All @@ -1729,6 +1733,8 @@
if(chems.has_reagent(src.type, 1))
mytray.yieldmod = 1.3
mytray.mutmod = 0
myseed.adjust_maturation(round(chems.get_reagent_amount(src.type) * 0.1))
myseed.adjust_production(round(chems.get_reagent_amount(src.type) * 0.05))

/datum/reagent/plantnutriment/endurogrow
name = "Enduro Grow"
Expand Down Expand Up @@ -2260,7 +2266,7 @@
generated_values["yield_change"] = (amount * (rand(0,2) * 0.2))
return generated_values

// Saltpetre is used for gardening IRL, to simplify highly, it speeds up growth and strengthens plants
// Saltpetre is used for gardening IRL, to simplify highly, it raises potency and lowers production
/datum/reagent/saltpetre/on_hydroponics_apply(obj/item/seeds/myseed, datum/reagents/chems, obj/machinery/hydroponics/mytray, mob/user)
. = ..()
if(chems.has_reagent(src.type, 1))
Expand Down
21 changes: 18 additions & 3 deletions monkestation/code/modules/hydroponics/machines/composter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,21 @@
if(istype(attacking_item, /obj/item/food/grown))
compost(attacking_item)

if(istype(attacking_item, /obj/item/storage/bag)) // covers any kind of bag that has a compostible item
var/obj/item/storage/bag/bag = attacking_item
for(var/obj/item/food/grown/item in bag.contents)
if(bag.atom_storage.attempt_remove(item, src))
compost(item)

for(var/obj/item/seeds/item in bag.contents)
if(bag.atom_storage.attempt_remove(item, src))
compost(item)
to_chat(user, span_info("You empty \the [bag] into \the [src]."))

/obj/machinery/composters/attack_hand(mob/living/user, list/modifiers)
. = ..()
if(biomatter < 40)
to_chat(user, span_notice("No enough biomatter to produce Bio-Cube"))
to_chat(user, span_notice("Not enough biomatter to produce Bio-Cube"))
return
new /obj/item/bio_cube(get_turf(src))
biomatter -= 40
Expand Down Expand Up @@ -60,10 +71,14 @@
icon_state = "bio_cube"

var/total_duration = 60 SECONDS
var/scale_multiplier = 1
var/scale_multiplier = 0.6


/obj/item/bio_cube/attacked_by(obj/item/attacking_item, mob/living/user)
/obj/item/bio_cube/update_desc()
. = ..()
desc = "A cube made of pure biomatter, it seems to be bigger than normal making it last [total_duration / 600] minutes. Does wonders on plant trays."

/obj/item/bio_cube/attackby(obj/item/attacking_item, mob/living/user)
. = ..()
if(istype(attacking_item, /obj/item/bio_cube))
var/obj/item/bio_cube/attacking_cube = attacking_item
Expand Down

0 comments on commit 2d20e69

Please sign in to comment.