Skip to content

Commit

Permalink
Merge pull request #5886 from Trilbyspaceclone/hydro_buffs
Browse files Browse the repository at this point in the history
hydro additions
  • Loading branch information
Trilbyspaceclone authored Dec 3, 2024
2 parents e73212b + 4751823 commit 0f10e1c
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 8 deletions.
28 changes: 28 additions & 0 deletions code/datums/craft/recipes/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,32 @@
list(CRAFT_MATERIAL, 10, MATERIAL_WOOD),
list(CRAFT_MATERIAL, 10, MATERIAL_GLASS),
list(/obj/item/circuitboard/autolathe, 1)
)

/datum/craft_recipe/consumer/cement_bag
name = "Quick-Cement Bag"
result = /obj/item/cement_bag
steps = list(
list(/obj/item/stack/ore/glass, 2),
list(/obj/item/stack/rods, 2),
list(/obj/item/stack/ore, 3),
list(QUALITY_HAMMERING, 1, 12),
list(QUALITY_SHOVELING, 1, 15)
)

/datum/craft_recipe/consumer/hydro_tray_plant_bag_water
name = "Woodchips Bag"
result = /obj/item/hydro_tray_plant_bag_water
steps = list(
list(CRAFT_MATERIAL, 10, MATERIAL_WOOD),
list(QUALITY_CUTTING, 10, 10)
)

/datum/craft_recipe/consumer/hydro_tray_plant_bag_nutrient
name = "Mealworms Bag"
result = /obj/item/hydro_tray_plant_bag_nutrient
steps = list(
list(/obj/item/stack/ore, 2),
list(/obj/item/reagent_containers/food/snacks/meat, 2), // 10u oil per meat
list(QUALITY_CUTTING, 10, 10)
)
34 changes: 28 additions & 6 deletions code/modules/hydroponics/trays/tray.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
var/base_name = "tray"

// Plant maintenance vars.
var/waterlevel = 100 // Water (max 100)
var/nutrilevel = 10 // Nutrient (max 10)
var/waterlevel = 100 // Water
var/waterlevel_max = 100 // Water Cap
var/nutrilevel = 10 // Nutrient
var/nutrilevel_max = 10 // Nutrient Cap
var/pestlevel = 0 // Pests (max 10)
var/weedlevel = 0 // Weeds (max 10)

Expand Down Expand Up @@ -415,8 +417,8 @@
dead = 0

mutation_level = max(0,min(mutation_level,100))
nutrilevel = max(0,min(nutrilevel,10))
waterlevel = max(0,min(waterlevel,100))
nutrilevel = max(0,min(nutrilevel,nutrilevel_max))
waterlevel = max(0,min(waterlevel,waterlevel_max))
pestlevel = max(0,min(pestlevel,10))
weedlevel = max(0,min(weedlevel,10))
toxins = max(0,min(toxins,10))
Expand Down Expand Up @@ -638,6 +640,24 @@
qdel(I)
check_health()

else if (istype(I, /obj/item/hydro_tray_plant_bag_water))
var/obj/item/hydro_tray_plant_bag_water/htpbw = I
user.remove_from_mob(htpbw)
waterlevel_max += htpbw.max_water_give

to_chat(user, "You add [htpbw] to [src].")
qdel(htpbw)
check_health()

else if (istype(I, /obj/item/hydro_tray_plant_bag_nutrient))
var/obj/item/hydro_tray_plant_bag_nutrient/htpbn = I
user.remove_from_mob(htpbn)
nutrilevel_max += htpbn.max_nutrient_give

to_chat(user, "You add [htpbn] to [src].")
qdel(htpbn)
check_health()

else if(I.force && seed)
if(user.a_intent == I_HURT)
if(!dead)
Expand Down Expand Up @@ -682,15 +702,17 @@

if(!seed)
to_chat(usr, "[src] is empty.")
to_chat(usr, "Water: [round(waterlevel,0.1)]/[waterlevel_max]")
to_chat(usr, "Nutrient: [round(nutrilevel,0.1)]/[nutrilevel_max]")
return

to_chat(usr, SPAN_NOTICE("[seed.display_name] are growing here."))

if(!Adjacent(usr))
return

to_chat(usr, "Water: [round(waterlevel,0.1)]/100")
to_chat(usr, "Nutrient: [round(nutrilevel,0.1)]/10")
to_chat(usr, "Water: [round(waterlevel,0.1)]/[waterlevel_max]")
to_chat(usr, "Nutrient: [round(nutrilevel,0.1)]/[nutrilevel_max]")

if(weedlevel >= 5)
to_chat(usr, "\The [src] is <span class='danger'>infested with weeds</span>!")
Expand Down
17 changes: 15 additions & 2 deletions modular_sojourn/cement_bag.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
/obj/item/cement_bag
name = "Quick-Cement Bag"
desc = "A bag of fast acting cement, used for making underplating nice and flat"

icon = 'modular_sojourn/misc_stuff.dmi'
icon_state = "cementbag"
var/inuse = FALSE
var/inuse = FALSE

/obj/item/hydro_tray_plant_bag_water
name = "Woodchips Bag"
desc = "A bag of woodchips and broken down gravel to aid in holding water in hydrotrays or on dirt fields."
icon = 'modular_sojourn/misc_stuff.dmi'
icon_state = "plant_bag"
var/max_water_give = 25

/obj/item/hydro_tray_plant_bag_nutrient
name = "Mealworms Bag"
desc = "A bag of meat and dirt mixed with worms that help plant trays and fields hold nutrients."
icon = 'modular_sojourn/misc_stuff.dmi'
icon_state = "meat_bag"
var/max_nutrient_give = 2
Binary file modified modular_sojourn/misc_stuff.dmi
Binary file not shown.

0 comments on commit 0f10e1c

Please sign in to comment.