Turbotany version 1.2 (#50513)

* EVERYTHING. Check the changelog.

* Minor species change, spade fits on plant belt.

* Local man blind, news at 11.

* Longrange pollenation, and fixes pill composting.
This commit is contained in:
ArcaneMusic
2020-04-21 02:12:49 -07:00
committed by GitHub
parent 0c3d4e85dd
commit dc89ef0239
24 changed files with 180 additions and 45 deletions
+1
View File
@@ -200,6 +200,7 @@
/obj/item/seeds,
/obj/item/grown,
/obj/item/reagent_containers/honeycomb,
/obj/item/graft,
))
////////
+27
View File
@@ -672,3 +672,30 @@
/obj/item/storage/belt/sabre/PopulateContents()
new /obj/item/melee/sabre(src)
update_icon()
/obj/item/storage/belt/plant
name = "botanical belt"
desc = "A belt used to hold most hydroponics supplies. Suprisingly, not green."
icon_state = "plantbelt"
item_state = "plantbelt"
content_overlays = TRUE
/obj/item/storage/belt/plant/ComponentInitialize()
. = ..()
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 6
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.set_holdable(list(
/obj/item/reagent_containers/spray/plantbgone,
/obj/item/plant_analyzer,
/obj/item/seeds,
/obj/item/reagent_containers/glass/bottle,
/obj/item/reagent_containers/glass/beaker,
/obj/item/cultivator,
/obj/item/reagent_containers/spray/pestspray,
/obj/item/hatchet,
/obj/item/graft,
/obj/item/secateurs,
/obj/item/geneshears,
/obj/item/shovel/spade
))
+1 -1
View File
@@ -10,7 +10,7 @@
item_state = "apron"
blood_overlay_type = "armor"
body_parts_covered = CHEST|GROIN
allowed = list(/obj/item/reagent_containers/spray/plantbgone, /obj/item/plant_analyzer, /obj/item/seeds, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/cultivator, /obj/item/reagent_containers/spray/pestspray, /obj/item/hatchet, /obj/item/storage/bag/plants)
allowed = list(/obj/item/reagent_containers/spray/plantbgone, /obj/item/plant_analyzer, /obj/item/seeds, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/cultivator, /obj/item/reagent_containers/spray/pestspray, /obj/item/hatchet, /obj/item/storage/bag/plants, /obj/item/graft, /obj/item/secateurs, /obj/item/geneshears)
/obj/item/clothing/suit/apron/waders
name = "horticultural waders"
@@ -136,7 +136,7 @@
/obj/machinery/smartfridge/proc/accept_check(obj/item/O)
if(istype(O, /obj/item/reagent_containers/food/snacks/grown/) || istype(O, /obj/item/seeds/) || istype(O, /obj/item/grown/))
if(istype(O, /obj/item/reagent_containers/food/snacks/grown/) || istype(O, /obj/item/seeds/) || istype(O, /obj/item/grown/) || istype(O, /obj/item/graft/))
return TRUE
return FALSE
+2 -2
View File
@@ -35,7 +35,7 @@
/obj/item/graft/proc/get_graft_text()
var/text = "- Plant Graft -\n"
if(parent_seed)
text += "- Parent Plant Name:[parent_seed.plantname] -\n"
text += "- Parent Plant: [parent_seed.plantname] -\n"
if(stored_trait)
text += "- Graftable Traits:[stored_trait.get_name()] -\n"
text += "- Graftable Traits: [stored_trait.get_name()] -\n"
return text
+5 -2
View File
@@ -66,17 +66,20 @@
/obj/item/reagent_containers/food/snacks/grown/attackby(obj/item/O, mob/user, params)
..()
if (istype(O, /obj/item/plant_analyzer))
var/obj/item/plant_analyzer/P_analyzer = O
var/msg = "<span class='info'>*---------*\n This is \a <span class='name'>[src]</span>.\n"
if(seed)
if(seed && P_analyzer.scan_mode == 0)
msg += seed.get_analyzer_text()
var/reag_txt = ""
if(seed)
if(seed && P_analyzer.scan_mode == 1)
msg += "<br><span class='info'>*Plant Reagents:*</span>"
for(var/reagent_id in seed.reagents_add)
var/datum/reagent/R = GLOB.chemical_reagents_list[reagent_id]
var/amt = reagents.get_reagent_amount(reagent_id)
reag_txt += "\n<span class='info'>- [R.name]: [amt]</span>"
if(reag_txt)
msg += "<br><span class='info'>*---------*</span>"
msg += reag_txt
msg += "<br><span class='info'>*---------*</span>"
to_chat(user, msg)
+11 -1
View File
@@ -1,7 +1,11 @@
//Both available scanning modes for the plant analyzer.
#define SCANMODE_STATS 0
#define SCANMODE_CHEMICALS 1
// Plant analyzer
/obj/item/plant_analyzer
name = "plant analyzer"
desc = "A scanner used to evaluate a plant's various areas of growth."
desc = "A scanner used to evaluate a plant's various areas of growth, and genetic traits."
icon = 'icons/obj/device.dmi'
icon_state = "hydro"
item_state = "analyzer"
@@ -10,6 +14,12 @@
w_class = WEIGHT_CLASS_TINY
slot_flags = ITEM_SLOT_BELT
custom_materials = list(/datum/material/iron=30, /datum/material/glass=20)
var/scan_mode = SCANMODE_STATS
/obj/item/plant_analyzer/attack_self(mob/user)
. = ..()
scan_mode = !scan_mode
to_chat(user, "<span class='notice'>You switch [src] to [scan_mode == SCANMODE_CHEMICALS ? "scan for chemical reagents and traits" : "scan for plant growth statistics"].</span>")
// *************************************
// Hydroponics Tools
+77 -28
View File
@@ -64,6 +64,7 @@
//ALRIGHT YOU DEGENERATES. YOU HAD REAGENT HOLDERS FOR AT LEAST 4 YEARS AND NONE OF YOU MADE HYDROPONICS TRAYS HOLD NUTRIENT CHEMS INSTEAD OF USING "Points".
//SO HERE LIES THE "nutrilevel" VAR. IT'S DEAD AND I PUT IT OUT OF IT'S MISERY. USE "reagents" INSTEAD. ~ArcaneMusic, accept no substitutes.
create_reagents(20)
reagents.add_reagent(/datum/reagent/plantnutriment/eznutriment, 10) //Half filled nutrient trays for dirt trays to have more to grow with in prison/lavaland.
. = ..()
@@ -135,6 +136,11 @@
mutate()
else if(istype(Proj , /obj/projectile/energy/florayield))
return myseed.bullet_act(Proj)
else if(istype(Proj , /obj/projectile/energy/florarevolution))
if(myseed)
if(myseed.mutatelist.len > 0)
myseed.instability = (myseed.instability/2)
mutatespecie()
else
return ..()
@@ -213,10 +219,10 @@
// Too much toxins cause harm, but when the plant drinks the contaiminated water, the toxins disappear slowly
if(toxic >= 40 && toxic < 80)
adjustHealth(-1 / rating)
adjustToxic(-rand(1,10) / rating)
adjustToxic(-rating * 2)
else if(toxic >= 80) // I don't think it ever gets here tbh unless above is commented out
adjustHealth(-3)
adjustToxic(-rand(1,10) / rating)
adjustToxic(-rating *3)
//Pests & Weeds//////////////////////////////////////////////////////////
@@ -254,19 +260,18 @@
pollinate()
//This is where stability mutations exist now.
switch(myseed.instability)
if(100 to 80)
mutate(0, 0, 0, 0, 0, 0, 0, 2, 0) //Exceedingly low odds of gaining a trait.
if(79 to 60)
if(prob((myseed.instability)/2) && !self_sustaining)
mutatespecie()
myseed.instability = myseed.instability/2
if(40 to 59)
if(prob(40))
hardmutate()
if(20 to 39)
if(prob(40))
mutate()
if(myseed.instability >= 80)
mutate(0, 0, 0, 0, 0, 0, 0, 5, 0) //Exceedingly low odds of gaining a trait.
if(myseed.instability >= 60)
if(prob((myseed.instability)/2) && !self_sustaining) //Minimum 30%, Maximum 50% chance of mutating every age tick when not on autogrow.
mutatespecie()
myseed.instability = myseed.instability/2
if(myseed.instability >= 40)
if(prob(myseed.instability))
hardmutate()
if(myseed.instability >= 20 )
if(prob(myseed.instability))
mutate()
//Health & Age///////////////////////////////////////////////////////////
@@ -512,13 +517,18 @@
*/
/obj/machinery/hydroponics/proc/pollinate(var/range = 1)
for(var/obj/machinery/hydroponics/T in oview(src, range))
//Here is where we check for window blocking.
if(!Adjacent(T) && range <= 1)
continue
if(T.myseed && !T.dead)
T.myseed.potency = round(clamp((T.myseed.potency+(1/10)*(myseed.potency-T.myseed.potency)),0,100))
T.myseed.instability = round(clamp((T.myseed.instability+(1/10)*(myseed.instability-T.myseed.instability)),0,100))
T.myseed.yield = round(clamp((T.myseed.yield+(1/2)*(myseed.yield-T.myseed.yield)),0,10))
if(myseed.instability >= 20 && prob(70) && T.myseed.reagents_add)
var/datum/reagent/picked_reagent = (pick(T.myseed.reagents_add))
var/datum/plant_gene/reagent/reagent_gene = new /datum/plant_gene/reagent(picked_reagent, 0.05) //I cannot figure out how to copy over the keyed value from the reagents_add list so for now this works, skog you'll want to fix this before merge
var/list/datum/plant_gene/reagent/possible_reagents = list()
for(var/datum/plant_gene/reagent/reag in T.myseed.genes)
possible_reagents += reag
var/datum/plant_gene/reagent/reagent_gene = pick(possible_reagents) //Let this serve as a lession to delete your WIP comments before merge.
if(reagent_gene.can_add(myseed))
myseed.genes += reagent_gene
myseed.reagents_from_genes()
@@ -553,7 +563,7 @@
to_chat(user, "<span class='warning'>[reagent_source] is empty!</span>")
return 1
if(reagents.total_volume >= reagents.maximum_volume)
if(reagents.total_volume >= reagents.maximum_volume && !reagent_source.reagents.has_reagent(/datum/reagent/water, 1))
to_chat(user, "<span class='notice'>[src] is full.</span>")
return
@@ -602,13 +612,14 @@
//cause I don't want to feel like im juggling 15 tamagotchis and I can get to my real work of ripping flooring apart in hopes of validating my life choices of becoming a space-gardener
//This was originally in apply_chemicals, but due to apply_chemicals only holding nutrients, we handle it here now.
if(reagent_source.reagents.has_reagent(/datum/reagent/water, 1))
adjustWater(round(reagent_source.reagents.get_reagent_amount(/datum/reagent/water)/trays.len))
reagent_source.reagents.remove_reagent(/datum/reagent/water, reagent_source.reagents.get_reagent_amount(/datum/reagent/water)/trays.len)
else
reagent_source.reagents.trans_to(reagents, split, transfered_by = user)
H.adjustWater(round(reagent_source.reagents.get_reagent_amount(/datum/reagent/water)/(trays.len)))
reagent_source.reagents.remove_reagent(/datum/reagent/water, reagent_source.reagents.get_reagent_amount(/datum/reagent/water)/(trays.len))
reagent_source.reagents.trans_to(H.reagents, split, transfered_by = user)
if(istype(reagent_source, /obj/item/reagent_containers/food/snacks) || istype(reagent_source, /obj/item/reagent_containers/pill))
qdel(reagent_source)
lastuser = user
H.update_icon()
return 1
H.update_icon()
if(reagent_source) // If the source wasn't composted and destroyed
reagent_source.update_icon()
@@ -634,12 +645,21 @@
return
else if(istype(O, /obj/item/plant_analyzer))
var/obj/item/plant_analyzer/P_analyzer = O
if(myseed)
to_chat(user, "*** <B>[myseed.plantname]</B> ***" )
to_chat(user, "- Plant Age: <span class='notice'>[age]</span>")
var/list/text_string = myseed.get_analyzer_text()
if(text_string)
to_chat(user, text_string)
if(P_analyzer.scan_mode == 0)
to_chat(user, "*** <B>[myseed.plantname]</B> ***" )
to_chat(user, "- Plant Age: <span class='notice'>[age]</span>")
var/list/text_string = myseed.get_analyzer_text()
if(text_string)
to_chat(user, text_string)
to_chat(user, "*---------*")
if(myseed.reagents_add && P_analyzer.scan_mode == 1)
to_chat(user, "- <B>Plant Reagents</B> -")
to_chat(user, "*---------*")
for(var/datum/plant_gene/reagent/G in myseed.genes)
to_chat(user, "<span class='notice'>- [G.get_name()] -</span>")
to_chat(user, "*---------*")
else
to_chat(user, "<B>No plant found.</B>")
to_chat(user, "- Weed level: <span class='notice'>[weedlevel] / 10</span>")
@@ -678,6 +698,7 @@
snip.parent_seed = myseed
myseed.grafted = TRUE
adjustHealth(-5)
snip.name += " ([snip.parent_seed.plantname])"
return
else if(istype(O, /obj/item/geneshears))
@@ -707,7 +728,7 @@
break
myseed.reagents_from_genes()
adjustHealth(-15)
to_chat(user, "<span class='notice'>You carefully shear the genes off of the [myseed.plantname], but leaving the plant looking a bit weak.</span>")
to_chat(user, "<span class='notice'>You carefully shear the genes off of the [myseed.plantname], leaving the plant looking weaker.</span>")
update_icon()
return
@@ -775,6 +796,34 @@
else if(istype(O, /obj/item/storage/part_replacer))
RefreshParts()
return
else if(istype(O, /obj/item/gun/energy/floragun))
var/obj/item/gun/energy/floragun/flowergun = O
if(flowergun.cell.charge < flowergun.cell.maxcharge)
to_chat(user, "<span class='notice'>[flowergun] must be fully charged to lock in a mutation!</span>")
return
if(!myseed)
to_chat(user, "<span class='warning'>[src] is empty!</span>")
return
if(myseed.endurance <= 20)
to_chat(user, "<span class='warning'>[myseed.plantname] isn't hardy enough to sequence it's mutation!</span>")
return
if(!myseed.mutatelist)
to_chat(user, "<span class='warning'>[myseed.plantname] has nothing else to mutate into!</span>")
return
else
var/list/fresh_mut_list = list()
for(var/muties in myseed.mutatelist)
var/obj/item/seeds/another_mut = new muties
fresh_mut_list[another_mut.plantname] = muties
var/locked_mutation = (input(user, "Select a mutation to lock.", "Plant Mutation Locks") as null|anything in sortList(fresh_mut_list))
if(!user.canUseTopic(src, BE_CLOSE) || !locked_mutation)
return
myseed.mutatelist = list(fresh_mut_list[locked_mutation])
myseed.endurance = (myseed.endurance/2)
flowergun.cell.use(flowergun.cell.charge)
flowergun.update_overlays()
to_chat(user, "<span class='notice'>[myseed.plantname]'s mutation was set to [locked_mutation], depleting [flowergun]'s cell!</span>")
return
else
return ..()
+21 -4
View File
@@ -97,6 +97,10 @@
/obj/item/seeds/examine(mob/user)
. = ..()
. += "<span class='notice'>Use a pen on it to rename it or change its description.</span>"
if(reagents_add && user.can_see_reagents())
. += "<span class='notice'>- Plant Reagents -</span>"
for(var/datum/plant_gene/reagent/G in genes)
. += "<span class='notice'>- [G.get_name()] -</span>"
/obj/item/seeds/proc/Copy()
var/obj/item/seeds/S = new type(null, 1)
@@ -151,7 +155,10 @@
adjust_weed_rate(rand(-wrmut, wrmut))
adjust_weed_chance(rand(-wcmut, wcmut))
if(prob(traitmut))
add_random_traits(1, 1)
if(prob(50))
add_random_traits(1, 1)
else
add_random_reagents(1, 1)
@@ -436,9 +443,19 @@
/obj/item/seeds/attackby(obj/item/O, mob/user, params)
if (istype(O, /obj/item/plant_analyzer))
to_chat(user, "<span class='info'>*---------*\n This is \a <span class='name'>[src]</span>.</span>")
var/text = get_analyzer_text()
if(text)
to_chat(user, "<span class='notice'>[text]</span>")
var/text
var/obj/item/plant_analyzer/P_analyzer = O
if(P_analyzer.scan_mode == 0)
text = get_analyzer_text()
if(text)
to_chat(user, "<span class='notice'>[text]</span>")
if(reagents_add && P_analyzer.scan_mode == 1)
to_chat(user, "<span class='notice'>- Plant Reagents -</span>")
to_chat(user, "<span class='notice'>*---------*</span>")
for(var/datum/plant_gene/reagent/G in genes)
to_chat(user, "<span class='notice'>- [G.get_name()] -</span>")
to_chat(user, "<span class='notice'>*---------*</span>")
return
@@ -1694,6 +1694,8 @@ GLOBAL_LIST_EMPTY(roundstart_races)
H.show_message("<span class='notice'>The radiation beam dissipates harmlessly through your body.</span>")
if(/obj/projectile/energy/florayield)
H.show_message("<span class='notice'>The radiation beam dissipates harmlessly through your body.</span>")
if(/obj/projectile/energy/florarevolution)
H.show_message("<span class='notice'>The radiation beam dissipates harmlessly through your body.</span>")
/datum/species/proc/bullet_act(obj/projectile/P, mob/living/carbon/human/H)
// called before a projectile hit
@@ -59,3 +59,8 @@
H.show_message("<span class='userdanger'>The radiation beam singes you!</span>")
if(/obj/projectile/energy/florayield)
H.set_nutrition(min(H.nutrition+30, NUTRITION_LEVEL_FULL))
if(/obj/projectile/energy/florarevolution)
H.show_message("<span class='notice'>The radiation beam leaves you feeling disoriented!</span>")
H.Dizzy(15)
H.emote("flip")
H.emote("spin")
@@ -27,6 +27,11 @@
projectile_type = /obj/projectile/energy/floramut
select_name = "mutation"
/obj/item/ammo_casing/energy/flora/revolution
projectile_type = /obj/projectile/energy/florarevolution
select_name = "revolution"
e_cost = 250
/obj/item/ammo_casing/energy/temp
projectile_type = /obj/projectile/temp
select_name = "freeze"
@@ -48,7 +48,7 @@
desc = "A tool that discharges controlled radiation which induces mutation in plant cells."
icon_state = "flora"
item_state = "gun"
ammo_type = list(/obj/item/ammo_casing/energy/flora/yield, /obj/item/ammo_casing/energy/flora/mut)
ammo_type = list(/obj/item/ammo_casing/energy/flora/yield, /obj/item/ammo_casing/energy/flora/mut, /obj/item/ammo_casing/energy/flora/revolution)
modifystate = 1
ammo_x_offset = 1
selfcharge = 1
@@ -13,3 +13,11 @@
damage_type = TOX
nodamage = TRUE
flag = "energy"
/obj/projectile/energy/florarevolution
name = "gamma somatoray"
icon_state = "energy3"
damage = 0
damage_type = TOX
nodamage = TRUE
flag = "energy"
@@ -569,7 +569,7 @@
. = ..()
if(chems.has_reagent(type, 1))
if(myseed && prob(20))
mytray.pollinate(rand(1,3))
mytray.pollinate(1)
else
mytray.adjustWeeds(rand(1,2))
mytray.adjustPests(rand(1,2))
@@ -210,7 +210,7 @@
glass_desc = "A glass of holy water."
self_consuming = TRUE //divine intervention won't be limited by the lack of a liver
// Holy water. Mostly the same as water, it also heals the plant a little with the power of the spirits. Also ALSO increases stability.
// Holy water. Mostly the same as water, it also heals the plant a little with the power of the spirits. Also ALSO increases instability.
/datum/reagent/water/holywater/on_hydroponics_apply(obj/item/seeds/myseed, datum/reagents/chems, obj/machinery/hydroponics/mytray)
. = ..()
if(chems.has_reagent(src.type, 1))
@@ -59,7 +59,8 @@
/datum/reagent/toxin/mutagen/on_hydroponics_apply(obj/item/seeds/myseed, datum/reagents/chems, obj/machinery/hydroponics/mytray, mob/user)
mytray.mutation_roll(user)
. = ..()
if(chems.has_reagent(type, 1))
mytray.adjustToxic(3) //It is still toxic, mind you, but not to the same degree.
#define LIQUID_PLASMA_BP (50+T0C)
@@ -154,6 +154,14 @@
build_path = /obj/item/storage/belt/janitor
category = list("initial","Organic Materials")
/datum/design/plantbelt
name = "Botanical Belt"
id = "plantbelt"
build_type = BIOGENERATOR
materials = list(/datum/material/biomass= 300)
build_path = /obj/item/storage/belt/plant
category = list("initial","Organic Materials")
/datum/design/s_holster
name = "Shoulder Holster"
id = "s_holster"
@@ -180,8 +180,7 @@
desc = "A tool that discharges controlled radiation which induces mutation in plant cells. Harmless to other organic life."
id = "flora_gun"
build_type = PROTOLATHE
materials = list(/datum/material/iron = 2000, /datum/material/glass = 500)
reagents_list = list(/datum/reagent/uranium/radium = 20)
materials = list(/datum/material/iron = 2000, /datum/material/glass = 500, /datum/material/uranium = 2000)
build_path = /obj/item/gun/energy/floragun
category = list("Weapons")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 119 KiB