Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Waselon committed Sep 8, 2024
1 parent 24e42ba commit 51c3586
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 188 deletions.
153 changes: 0 additions & 153 deletions code/modules/hydroponics/hydro_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,158 +9,6 @@
icon_state = "hydro"
item_state = "analyzer"

/obj/item/tool/analyzer/plant_analyzer/attack_self(mob/user as mob)
return 0

/obj/item/tool/analyzer/plant_analyzer/afterattack(obj/target, mob/user, flag)
if(!flag) return

var/datum/seed/grown_seed
var/datum/reagents/grown_reagents
if(istype(target,/obj/structure/rack) || istype(target,/obj/structure/table))
return ..()
else if(istype(target,/obj/item/reagent_containers/food/snacks/grown))

var/obj/item/reagent_containers/food/snacks/grown/G = target
grown_seed = GLOB.seed_types[G.plantname]
grown_reagents = G.reagents

else if(istype(target,/obj/item/grown))

var/obj/item/grown/G = target
grown_seed = GLOB.seed_types[G.plantname]
grown_reagents = G.reagents

else if(istype(target,/obj/item/seeds))

var/obj/item/seeds/S = target
grown_seed = S.seed

else if(istype(target,/obj/machinery/hydroponics))

var/obj/machinery/hydroponics/H = target
grown_seed = H.seed
grown_reagents = H.reagents

if(!grown_seed)
to_chat(user, span_warning("[src] can tell you nothing about [target]."))
return

var/dat
user.visible_message(span_notice(" [user] runs the scanner over [target]."))

dat += "<h2>General Data</h2>"

dat += "<table>"
dat += "<tr><td><b>Endurance</b></td><td>[grown_seed.endurance]</td></tr>"
dat += "<tr><td><b>Yield</b></td><td>[grown_seed.yield]</td></tr>"
dat += "<tr><td><b>Lifespan</b></td><td>[grown_seed.lifespan]</td></tr>"
dat += "<tr><td><b>Maturation time</b></td><td>[grown_seed.maturation]</td></tr>"
dat += "<tr><td><b>Production time</b></td><td>[grown_seed.production]</td></tr>"
dat += "<tr><td><b>Potency</b></td><td>[grown_seed.potency]</td></tr>"
dat += "</table>"

if(length(grown_reagents.reagent_list))
dat += "<h2>Reagent Data</h2>"

dat += "<br>This sample contains: "
for(var/datum/reagent/R in grown_reagents.reagent_list)
dat += "<br>- [R.name], [grown_reagents.get_reagent_amount(R.type)] unit(s)"

dat += "<h2>Other Data</h2>"

if(grown_seed.harvest_repeat)
dat += "This plant can be harvested repeatedly.<br>"

if(grown_seed.immutable == -1)
dat += "This plant is highly mutable.<br>"
else if(grown_seed.immutable > 0)
dat += "This plant does not possess genetics that are alterable.<br>"

if(grown_seed.products && length(grown_seed.products))
dat += "The mature plant will produce [length(grown_seed.products) == 1 ? "fruit" : "[length(grown_seed.products)] varieties of fruit"].<br>"

if(grown_seed.requires_nutrients)
if(grown_seed.nutrient_consumption < 0.05)
dat += "It consumes a small amount of nutrient fluid.<br>"
else if(grown_seed.nutrient_consumption > 0.2)
dat += "It requires a heavy supply of nutrient fluid.<br>"
else
dat += "It requires a supply of nutrient fluid.<br>"

if(grown_seed.requires_water)
if(grown_seed.water_consumption < 1)
dat += "It requires very little water.<br>"
else if(grown_seed.water_consumption > 5)
dat += "It requires a large amount of water.<br>"
else
dat += "It requires a stable supply of water.<br>"

if(grown_seed.mutants && length(grown_seed.mutants))
dat += "It exhibits a high degree of potential subspecies shift.<br>"

dat += "It thrives in a temperature of [grown_seed.ideal_heat] Kelvin."

if(grown_seed.lowkpa_tolerance < 20)
dat += "<br>It is well adapted to low pressure levels."
if(grown_seed.highkpa_tolerance > 220)
dat += "<br>It is well adapted to high pressure levels."

if(grown_seed.heat_tolerance > 30)
dat += "<br>It is well adapted to a range of temperatures."
else if(grown_seed.heat_tolerance < 10)
dat += "<br>It is very sensitive to temperature shifts."

dat += "<br>It thrives in a light level of [grown_seed.ideal_light] lumen[grown_seed.ideal_light == 1 ? "" : "s"]."

if(grown_seed.light_tolerance > 10)
dat += "<br>It is well adapted to a range of light levels."
else if(grown_seed.light_tolerance < 3)
dat += "<br>It is very sensitive to light level shifts."

if(grown_seed.toxins_tolerance < 3)
dat += "<br>It is highly sensitive to toxins."
else if(grown_seed.toxins_tolerance > 6)
dat += "<br>It is remarkably resistant to toxins."

if(grown_seed.pest_tolerance < 3)
dat += "<br>It is highly sensitive to pests."
else if(grown_seed.pest_tolerance > 6)
dat += "<br>It is remarkably resistant to pests."

if(grown_seed.weed_tolerance < 3)
dat += "<br>It is highly sensitive to weeds."
else if(grown_seed.weed_tolerance > 6)
dat += "<br>It is remarkably resistant to weeds."

switch(grown_seed.spread)
if(1)
dat += "<br>It is capable of growing beyond the confines of a tray."
if(2)
dat += "<br>It is a robust and vigorous vine that will spread rapidly."

switch(grown_seed.carnivorous)
if(1)
dat += "<br>It is carniovorous and will eat tray pests for sustenance."
if(2)
dat += "<br>It is carnivorous and poses a significant threat to living things around it."

if(grown_seed.parasite)
dat += "<br>It is capable of parisitizing and gaining sustenance from tray weeds."
if(grown_seed.alter_temp)
dat += "<br>It will periodically alter the local temperature by [grown_seed.alter_temp] degrees Kelvin."

if(grown_seed.biolum)
dat += "<br>It is [grown_seed.biolum_colour ? "<font color='[grown_seed.biolum_colour]'>bio-luminescent</font>" : "bio-luminescent"]."
if(grown_seed.flowers)
dat += "<br>It has [grown_seed.flower_colour ? "<font color='[grown_seed.flower_colour]'>flowers</font>" : "flowers"]."

var/datum/browser/popup = new(user, "plant_analyzer", "<div align='center'>Plant data for [target]</div>")
popup.set_content(dat)
popup.open()



// *************************************
// Nutrient defines for hydroponics
// *************************************
Expand All @@ -179,7 +27,6 @@
amount_per_transfer_from_this = 10
volume = 10


/obj/item/reagent_containers/glass/fertilizer/Initialize(mapload)
. = ..()

Expand Down
23 changes: 0 additions & 23 deletions code/modules/hydroponics/hydro_tray.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,13 @@
)
AddElement(/datum/element/connect_loc, connections)

/obj/machinery/hydroponics/verb/close_lid()
set name = "Toggle Tray Lid"
set category = "Object"
set src in view(1)

if(!usr || usr.stat || usr.restrained())
return

closed_system = !closed_system
to_chat(usr, "You [closed_system ? "close" : "open"] the tray's lid.")
update_icon()

/obj/machinery/hydroponics/soil
name = "soil"
icon = 'icons/obj/machines/hydroponics.dmi'
icon_state = "soil"
density = FALSE
use_power = 0

/obj/machinery/hydroponics/soil/attackby(obj/item/I, mob/user, params)
. = ..()

if(istype(I, /obj/item/tool/shovel))
to_chat(user, "You clear up [src]!")
qdel(src)

/obj/machinery/hydroponics/soil/Initialize(mapload)
. = ..()
verbs -= /obj/machinery/hydroponics/verb/close_lid

/obj/machinery/hydroponics/slashable
resistance_flags = XENO_DAMAGEABLE
max_integrity = 80
Expand Down
12 changes: 0 additions & 12 deletions code/modules/reagents/reagents/toxin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -197,18 +197,6 @@
qdel(O)
else if(istype(O,/obj/effect/plantsegment))
if(prob(50)) qdel(O) //Kills kudzu too.
else if(istype(O,/obj/machinery/hydroponics))
var/obj/machinery/hydroponics/tray = O

if(tray.seed)
tray.health -= rand(30,50)
if(tray.pestlevel > 0)
tray.pestlevel -= 2
if(tray.weedlevel > 0)
tray.weedlevel -= 3
tray.toxins += 4
tray.check_level_sanity()
tray.update_icon()

/datum/reagent/toxin/sleeptoxin
name = "Soporific"
Expand Down

0 comments on commit 51c3586

Please sign in to comment.