mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 19:44:58 +01:00
Grep for space indentation (#54850)
#54604 atomizing Since a lot of the space indents are in lists ill atomize those later
This commit is contained in:
@@ -161,11 +161,11 @@
|
||||
detach(user)
|
||||
|
||||
/**
|
||||
* activate: Activates biomass processing and converts all inserted grown products into biomass
|
||||
*
|
||||
* Arguments:
|
||||
* * user The mob starting the biomass processing
|
||||
*/
|
||||
* activate: Activates biomass processing and converts all inserted grown products into biomass
|
||||
*
|
||||
* Arguments:
|
||||
* * user The mob starting the biomass processing
|
||||
*/
|
||||
/obj/machinery/biogenerator/proc/activate(mob/user)
|
||||
if(user.stat != CONSCIOUS)
|
||||
return
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
*A new subsystem for hydroponics, as a way to share specific traits into plants, as a way to phase out the DNA manipulator.
|
||||
*/
|
||||
*A new subsystem for hydroponics, as a way to share specific traits into plants, as a way to phase out the DNA manipulator.
|
||||
*/
|
||||
/obj/item/graft
|
||||
name = "plant graft"
|
||||
desc = "A carefully cut graft off of a freshly grown plant. Can be grafted onto a plant in order to share unique plant traits onto a plant."
|
||||
@@ -55,8 +55,8 @@
|
||||
return ..()
|
||||
|
||||
/**
|
||||
*Adds text to the plant analyzer which describes the graft's parent plant and any stored trait it has, if any.
|
||||
*/
|
||||
*Adds text to the plant analyzer which describes the graft's parent plant and any stored trait it has, if any.
|
||||
*/
|
||||
/obj/item/graft/proc/get_graft_text()
|
||||
var/text = "- Plant Graft -\n"
|
||||
if(parent_name)
|
||||
|
||||
@@ -370,9 +370,9 @@
|
||||
to_chat(user, "" )
|
||||
|
||||
/**
|
||||
* What happens when a tray's weeds grow too large.
|
||||
* Plants a new weed in an empty tray, then resets the tray.
|
||||
*/
|
||||
* What happens when a tray's weeds grow too large.
|
||||
* Plants a new weed in an empty tray, then resets the tray.
|
||||
*/
|
||||
/obj/machinery/hydroponics/proc/weedinvasion()
|
||||
dead = FALSE
|
||||
var/oldPlantName
|
||||
@@ -466,9 +466,9 @@
|
||||
to_chat(usr, "<span class='warning'>The few weeds in [src] seem to react, but only for a moment...</span>")
|
||||
|
||||
/**
|
||||
* Plant Death Proc.
|
||||
* Cleans up various stats for the plant upon death, including pests, harvestability, and plant health.
|
||||
*/
|
||||
* Plant Death Proc.
|
||||
* Cleans up various stats for the plant upon death, including pests, harvestability, and plant health.
|
||||
*/
|
||||
/obj/machinery/hydroponics/proc/plantdies()
|
||||
plant_health = 0
|
||||
harvest = FALSE
|
||||
@@ -479,11 +479,11 @@
|
||||
dead = TRUE
|
||||
|
||||
/**
|
||||
* Plant Cross-Pollination.
|
||||
* Checks all plants in the tray's oview range, then averages out the seed's potency, instability, and yield values.
|
||||
* If the seed's instability is >= 20, the seed donates one of it's reagents to that nearby plant.
|
||||
* * Range - The Oview range of trays to which to look for plants to donate reagents.
|
||||
*/
|
||||
* Plant Cross-Pollination.
|
||||
* Checks all plants in the tray's oview range, then averages out the seed's potency, instability, and yield values.
|
||||
* If the seed's instability is >= 20, the seed donates one of it's reagents to that nearby plant.
|
||||
* * Range - The Oview range of trays to which to look for plants to donate reagents.
|
||||
*/
|
||||
/obj/machinery/hydroponics/proc/pollinate(range = 1)
|
||||
for(var/obj/machinery/hydroponics/T in oview(src, range))
|
||||
//Here is where we check for window blocking.
|
||||
@@ -505,10 +505,10 @@
|
||||
continue
|
||||
|
||||
/**
|
||||
* Pest Mutation Proc.
|
||||
* When a tray is mutated with high pest values, it will spawn spiders.
|
||||
* * User - Person who last added chemicals to the tray for logging purposes.
|
||||
*/
|
||||
* Pest Mutation Proc.
|
||||
* When a tray is mutated with high pest values, it will spawn spiders.
|
||||
* * User - Person who last added chemicals to the tray for logging purposes.
|
||||
*/
|
||||
/obj/machinery/hydroponics/proc/mutatepest(mob/user)
|
||||
if(pestlevel > 5)
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] last altered a hydro tray's contents which spawned spiderlings")
|
||||
@@ -815,12 +815,12 @@
|
||||
to_chat(user, "<span class='warning'>You empty [src]'s nutrient tank.</span>")
|
||||
|
||||
/**
|
||||
* Update Tray Proc
|
||||
* Handles plant harvesting on the tray side, by clearing the sead, names, description, and dead stat.
|
||||
* Shuts off autogrow if enabled.
|
||||
* Sends messages to the cleaer about plants harvested, or if nothing was harvested at all.
|
||||
* * User - The mob who clears the tray.
|
||||
*/
|
||||
* Update Tray Proc
|
||||
* Handles plant harvesting on the tray side, by clearing the sead, names, description, and dead stat.
|
||||
* Shuts off autogrow if enabled.
|
||||
* Sends messages to the cleaer about plants harvested, or if nothing was harvested at all.
|
||||
* * User - The mob who clears the tray.
|
||||
*/
|
||||
/obj/machinery/hydroponics/proc/update_tray(mob/user)
|
||||
harvest = FALSE
|
||||
lastproduce = age
|
||||
@@ -844,10 +844,10 @@
|
||||
|
||||
/// Tray Setters - The following procs adjust the tray or plants variables, and make sure that the stat doesn't go out of bounds.
|
||||
/**
|
||||
* Adjust water.
|
||||
* Raises or lowers tray water values by a set value. Adding water will dillute toxicity from the tray.
|
||||
* * adjustamt - determines how much water the tray will be adjusted upwards or downwards.
|
||||
*/
|
||||
* Adjust water.
|
||||
* Raises or lowers tray water values by a set value. Adding water will dillute toxicity from the tray.
|
||||
* * adjustamt - determines how much water the tray will be adjusted upwards or downwards.
|
||||
*/
|
||||
/obj/machinery/hydroponics/proc/adjustWater(adjustamt)
|
||||
waterlevel = clamp(waterlevel + adjustamt, 0, maxwater)
|
||||
|
||||
@@ -855,42 +855,42 @@
|
||||
adjustToxic(-round(adjustamt/4))//Toxicity dilutation code. The more water you put in, the lesser the toxin concentration.
|
||||
|
||||
/**
|
||||
* Adjust Health.
|
||||
* Raises the tray's plant_health stat by a given amount, with total health determined by the seed's endurance.
|
||||
* * adjustamt - Determines how much the plant_health will be adjusted upwards or downwards.
|
||||
*/
|
||||
* Adjust Health.
|
||||
* Raises the tray's plant_health stat by a given amount, with total health determined by the seed's endurance.
|
||||
* * adjustamt - Determines how much the plant_health will be adjusted upwards or downwards.
|
||||
*/
|
||||
/obj/machinery/hydroponics/proc/adjustHealth(adjustamt)
|
||||
if(myseed && !dead)
|
||||
plant_health = clamp(plant_health + adjustamt, 0, myseed.endurance)
|
||||
|
||||
/**
|
||||
* Adjust Health.
|
||||
* Raises the plant's plant_health stat by a given amount, with total health determined by the seed's endurance.
|
||||
* * adjustamt - Determines how much the plant_health will be adjusted upwards or downwards.
|
||||
*/
|
||||
* Adjust Health.
|
||||
* Raises the plant's plant_health stat by a given amount, with total health determined by the seed's endurance.
|
||||
* * adjustamt - Determines how much the plant_health will be adjusted upwards or downwards.
|
||||
*/
|
||||
/obj/machinery/hydroponics/proc/adjustToxic(adjustamt)
|
||||
toxic = clamp(toxic + adjustamt, 0, 100)
|
||||
|
||||
/**
|
||||
* Adjust Pests.
|
||||
* Raises the tray's pest level stat by a given amount.
|
||||
* * adjustamt - Determines how much the pest level will be adjusted upwards or downwards.
|
||||
*/
|
||||
* Adjust Pests.
|
||||
* Raises the tray's pest level stat by a given amount.
|
||||
* * adjustamt - Determines how much the pest level will be adjusted upwards or downwards.
|
||||
*/
|
||||
/obj/machinery/hydroponics/proc/adjustPests(adjustamt)
|
||||
pestlevel = clamp(pestlevel + adjustamt, 0, 10)
|
||||
|
||||
/**
|
||||
* Adjust Weeds.
|
||||
* Raises the plant's weed level stat by a given amount.
|
||||
* * adjustamt - Determines how much the weed level will be adjusted upwards or downwards.
|
||||
*/
|
||||
* Adjust Weeds.
|
||||
* Raises the plant's weed level stat by a given amount.
|
||||
* * adjustamt - Determines how much the weed level will be adjusted upwards or downwards.
|
||||
*/
|
||||
/obj/machinery/hydroponics/proc/adjustWeeds(adjustamt)
|
||||
weedlevel = clamp(weedlevel + adjustamt, 0, 10)
|
||||
|
||||
/**
|
||||
* Spawn Plant.
|
||||
* Upon using strange reagent on a tray, it will spawn a killer tomato or killer tree at random.
|
||||
*/
|
||||
* Spawn Plant.
|
||||
* Upon using strange reagent on a tray, it will spawn a killer tomato or killer tree at random.
|
||||
*/
|
||||
/obj/machinery/hydroponics/proc/spawnplant() // why would you put strange reagent in a hydro tray you monster I bet you also feed them blood
|
||||
var/list/livingplants = list(/mob/living/simple_animal/hostile/tree, /mob/living/simple_animal/hostile/killertomato)
|
||||
var/chosen = pick(livingplants)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
*This is NOW the gradual affects that each chemical applies on every process() proc. Nutrients now use a more robust reagent holder in order to apply less insane
|
||||
* stat changes as opposed to 271 lines of individual statline effects. Shoutout to the original comments on chems, I just cleaned a few up.
|
||||
*/
|
||||
*This is NOW the gradual affects that each chemical applies on every process() proc. Nutrients now use a more robust reagent holder in order to apply less insane
|
||||
* stat changes as opposed to 271 lines of individual statline effects. Shoutout to the original comments on chems, I just cleaned a few up.
|
||||
*/
|
||||
/obj/machinery/hydroponics/proc/apply_chemicals(mob/user)
|
||||
///Contains the reagents within the tray.
|
||||
if(myseed)
|
||||
|
||||
@@ -160,10 +160,10 @@
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* Intends to compare a reagent gene with a set of seeds, and if the seeds contain the same gene, with more production rate, upgrades the rate to the highest of the two.
|
||||
*
|
||||
* Called when plants are crossbreeding, this looks for two matching reagent_ids, where the rates are greater, in order to upgrade.
|
||||
*/
|
||||
* Intends to compare a reagent gene with a set of seeds, and if the seeds contain the same gene, with more production rate, upgrades the rate to the highest of the two.
|
||||
*
|
||||
* Called when plants are crossbreeding, this looks for two matching reagent_ids, where the rates are greater, in order to upgrade.
|
||||
*/
|
||||
|
||||
/datum/plant_gene/reagent/proc/try_upgrade_gene(obj/item/seeds/seed)
|
||||
for(var/datum/plant_gene/reagent/reagent in seed.genes)
|
||||
@@ -394,11 +394,11 @@
|
||||
qdel(G)
|
||||
|
||||
/**
|
||||
* A plant trait that causes the plant's capacity to double.
|
||||
*
|
||||
* When harvested, the plant's individual capacity is set to double it's default.
|
||||
* However, the plant is also going to be limited to half as many products from yield, so 2 yield will only produce 1 plant as a result.
|
||||
*/
|
||||
* A plant trait that causes the plant's capacity to double.
|
||||
*
|
||||
* When harvested, the plant's individual capacity is set to double it's default.
|
||||
* However, the plant is also going to be limited to half as many products from yield, so 2 yield will only produce 1 plant as a result.
|
||||
*/
|
||||
/datum/plant_gene/trait/maxchem
|
||||
// 2x to max reagents volume.
|
||||
name = "Densified Chemicals"
|
||||
@@ -513,19 +513,19 @@
|
||||
HY.name = initial(HY.name)
|
||||
|
||||
/**
|
||||
* A plant trait that causes the plant's food reagents to ferment instead.
|
||||
*
|
||||
* In practice, it replaces the plant's nutriment and vitamins with half as much of it's fermented reagent.
|
||||
* This exception is executed in seeds.dm under 'prepare_result'.
|
||||
*/
|
||||
* A plant trait that causes the plant's food reagents to ferment instead.
|
||||
*
|
||||
* In practice, it replaces the plant's nutriment and vitamins with half as much of it's fermented reagent.
|
||||
* This exception is executed in seeds.dm under 'prepare_result'.
|
||||
*/
|
||||
/datum/plant_gene/trait/brewing
|
||||
name = "Auto-Distilling Composition"
|
||||
|
||||
/**
|
||||
* A plant trait that causes the plant to gain aesthetic googly eyes.
|
||||
*
|
||||
* Has no functional purpose outside of causing japes, adds eyes over the plant's sprite, which are adjusted for size by potency.
|
||||
*/
|
||||
* A plant trait that causes the plant to gain aesthetic googly eyes.
|
||||
*
|
||||
* Has no functional purpose outside of causing japes, adds eyes over the plant's sprite, which are adjusted for size by potency.
|
||||
*/
|
||||
/datum/plant_gene/trait/eyes
|
||||
name = "Oculary Mimicry"
|
||||
var/mutable_appearance/googly
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/**
|
||||
* Finds and extracts seeds from an object
|
||||
*
|
||||
* Checks if the object is such that creates a seed when extracted. Used by seed
|
||||
* extractors or posably anything that would create seeds in some way. The seeds
|
||||
* are dropped either at the extractor, if it exists, or where the original object
|
||||
* was and it qdel's the object
|
||||
*
|
||||
* Arguments:
|
||||
* * O - Object containing the seed, can be the loc of the dumping of seeds
|
||||
* * t_max - Amount of seed copies to dump, -1 is ranomized
|
||||
* * extractor - Seed Extractor, used as the dumping loc for the seeds and seed multiplier
|
||||
* * user - checks if we can remove the object from the inventory
|
||||
* *
|
||||
*/
|
||||
* Finds and extracts seeds from an object
|
||||
*
|
||||
* Checks if the object is such that creates a seed when extracted. Used by seed
|
||||
* extractors or posably anything that would create seeds in some way. The seeds
|
||||
* are dropped either at the extractor, if it exists, or where the original object
|
||||
* was and it qdel's the object
|
||||
*
|
||||
* Arguments:
|
||||
* * O - Object containing the seed, can be the loc of the dumping of seeds
|
||||
* * t_max - Amount of seed copies to dump, -1 is ranomized
|
||||
* * extractor - Seed Extractor, used as the dumping loc for the seeds and seed multiplier
|
||||
* * user - checks if we can remove the object from the inventory
|
||||
* *
|
||||
*/
|
||||
/proc/seedify(obj/item/O, t_max, obj/machinery/seed_extractor/extractor, mob/living/user)
|
||||
var/t_amount = 0
|
||||
var/list/seeds = list()
|
||||
@@ -120,24 +120,24 @@
|
||||
return ..()
|
||||
|
||||
/**
|
||||
* Generate seed string
|
||||
*
|
||||
* Creates a string based of the traits of a seed. We use this string as a bucket for all
|
||||
* seeds that match as well as the key the ui uses to get the seed. We also use the key
|
||||
* for the data shown in the ui. Javascript parses this string to display
|
||||
*
|
||||
* Arguments:
|
||||
* * O - seed to generate the string from
|
||||
*/
|
||||
* Generate seed string
|
||||
*
|
||||
* Creates a string based of the traits of a seed. We use this string as a bucket for all
|
||||
* seeds that match as well as the key the ui uses to get the seed. We also use the key
|
||||
* for the data shown in the ui. Javascript parses this string to display
|
||||
*
|
||||
* Arguments:
|
||||
* * O - seed to generate the string from
|
||||
*/
|
||||
/obj/machinery/seed_extractor/proc/generate_seed_string(obj/item/seeds/O)
|
||||
return "name=[O.name];lifespan=[O.lifespan];endurance=[O.endurance];maturation=[O.maturation];production=[O.production];yield=[O.yield];potency=[O.potency];instability=[O.instability]"
|
||||
|
||||
|
||||
/** Add Seeds Proc.
|
||||
*
|
||||
* Adds the seeds to the contents and to an associated list that pregenerates the data
|
||||
* needed to go to the ui handler
|
||||
*
|
||||
*
|
||||
* Adds the seeds to the contents and to an associated list that pregenerates the data
|
||||
* needed to go to the ui handler
|
||||
*
|
||||
**/
|
||||
/obj/machinery/seed_extractor/proc/add_seed(obj/item/seeds/O)
|
||||
if(contents.len >= 999)
|
||||
|
||||
@@ -251,11 +251,11 @@
|
||||
return result
|
||||
|
||||
/**
|
||||
* This is where plant chemical products are handled.
|
||||
*
|
||||
* Individually, the formula for individual amounts of chemicals is Potency * the chemical production %, rounded to the fullest 1.
|
||||
* Specific chem handling is also handled here, like bloodtype, food taste within nutriment, and the auto-distilling trait.
|
||||
*/
|
||||
* This is where plant chemical products are handled.
|
||||
*
|
||||
* Individually, the formula for individual amounts of chemicals is Potency * the chemical production %, rounded to the fullest 1.
|
||||
* Specific chem handling is also handled here, like bloodtype, food taste within nutriment, and the auto-distilling trait.
|
||||
*/
|
||||
/obj/item/seeds/proc/prepare_result(obj/item/T)
|
||||
if(!T.reagents)
|
||||
CRASH("[T] has no reagents.")
|
||||
@@ -285,8 +285,8 @@
|
||||
/// Setters procs ///
|
||||
|
||||
/**
|
||||
* Adjusts seed yield up or down according to adjustamt. (Max 10)
|
||||
*/
|
||||
* Adjusts seed yield up or down according to adjustamt. (Max 10)
|
||||
*/
|
||||
/obj/item/seeds/proc/adjust_yield(adjustamt)
|
||||
if(yield != -1) // Unharvestable shouldn't suddenly turn harvestable
|
||||
yield = clamp(yield + adjustamt, 0, 10)
|
||||
@@ -298,8 +298,8 @@
|
||||
C.value = yield
|
||||
|
||||
/**
|
||||
* Adjusts seed lifespan up or down according to adjustamt. (Max 100)
|
||||
*/
|
||||
* Adjusts seed lifespan up or down according to adjustamt. (Max 100)
|
||||
*/
|
||||
/obj/item/seeds/proc/adjust_lifespan(adjustamt)
|
||||
lifespan = clamp(lifespan + adjustamt, 10, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/lifespan)
|
||||
@@ -307,8 +307,8 @@
|
||||
C.value = lifespan
|
||||
|
||||
/**
|
||||
* Adjusts seed endurance up or down according to adjustamt. (Max 100)
|
||||
*/
|
||||
* Adjusts seed endurance up or down according to adjustamt. (Max 100)
|
||||
*/
|
||||
/obj/item/seeds/proc/adjust_endurance(adjustamt)
|
||||
endurance = clamp(endurance + adjustamt, 10, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/endurance)
|
||||
@@ -316,8 +316,8 @@
|
||||
C.value = endurance
|
||||
|
||||
/**
|
||||
* Adjusts seed production seed up or down according to adjustamt. (Max 10)
|
||||
*/
|
||||
* Adjusts seed production seed up or down according to adjustamt. (Max 10)
|
||||
*/
|
||||
/obj/item/seeds/proc/adjust_production(adjustamt)
|
||||
if(yield != -1)
|
||||
production = clamp(production + adjustamt, 1, 10)
|
||||
@@ -326,8 +326,8 @@
|
||||
C.value = production
|
||||
|
||||
/**
|
||||
* Adjusts seed potency up or down according to adjustamt. (Max 100)
|
||||
*/
|
||||
* Adjusts seed potency up or down according to adjustamt. (Max 100)
|
||||
*/
|
||||
/obj/item/seeds/proc/adjust_potency(adjustamt)
|
||||
if(potency != -1)
|
||||
potency = clamp(potency + adjustamt, 0, 100)
|
||||
@@ -336,8 +336,8 @@
|
||||
C.value = potency
|
||||
|
||||
/**
|
||||
* Adjusts seed instability up or down according to adjustamt. (Max 100)
|
||||
*/
|
||||
* Adjusts seed instability up or down according to adjustamt. (Max 100)
|
||||
*/
|
||||
/obj/item/seeds/proc/adjust_instability(adjustamt)
|
||||
if(instability == -1)
|
||||
return
|
||||
@@ -347,8 +347,8 @@
|
||||
C.value = instability
|
||||
|
||||
/**
|
||||
* Adjusts seed weed grwoth speed up or down according to adjustamt. (Max 10)
|
||||
*/
|
||||
* Adjusts seed weed grwoth speed up or down according to adjustamt. (Max 10)
|
||||
*/
|
||||
/obj/item/seeds/proc/adjust_weed_rate(adjustamt)
|
||||
weed_rate = clamp(weed_rate + adjustamt, 0, 10)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_rate)
|
||||
@@ -356,8 +356,8 @@
|
||||
C.value = weed_rate
|
||||
|
||||
/**
|
||||
* Adjusts seed weed chance up or down according to adjustamt. (Max 67%)
|
||||
*/
|
||||
* Adjusts seed weed chance up or down according to adjustamt. (Max 67%)
|
||||
*/
|
||||
/obj/item/seeds/proc/adjust_weed_chance(adjustamt)
|
||||
weed_chance = clamp(weed_chance + adjustamt, 0, 67)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_chance)
|
||||
@@ -367,8 +367,8 @@
|
||||
//Directly setting stats
|
||||
|
||||
/**
|
||||
* Sets the plant's yield stat to the value of adjustamt. (Max 10)
|
||||
*/
|
||||
* Sets the plant's yield stat to the value of adjustamt. (Max 10)
|
||||
*/
|
||||
/obj/item/seeds/proc/set_yield(adjustamt)
|
||||
if(yield != -1) // Unharvestable shouldn't suddenly turn harvestable
|
||||
yield = clamp(adjustamt, 0, 10)
|
||||
@@ -380,8 +380,8 @@
|
||||
C.value = yield
|
||||
|
||||
/**
|
||||
* Sets the plant's lifespan stat to the value of adjustamt. (Max 100)
|
||||
*/
|
||||
* Sets the plant's lifespan stat to the value of adjustamt. (Max 100)
|
||||
*/
|
||||
/obj/item/seeds/proc/set_lifespan(adjustamt)
|
||||
lifespan = clamp(adjustamt, 10, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/lifespan)
|
||||
@@ -389,8 +389,8 @@
|
||||
C.value = lifespan
|
||||
|
||||
/**
|
||||
* Sets the plant's endurance stat to the value of adjustamt. (Max 100)
|
||||
*/
|
||||
* Sets the plant's endurance stat to the value of adjustamt. (Max 100)
|
||||
*/
|
||||
/obj/item/seeds/proc/set_endurance(adjustamt)
|
||||
endurance = clamp(adjustamt, 10, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/endurance)
|
||||
@@ -398,8 +398,8 @@
|
||||
C.value = endurance
|
||||
|
||||
/**
|
||||
* Sets the plant's production stat to the value of adjustamt. (Max 10)
|
||||
*/
|
||||
* Sets the plant's production stat to the value of adjustamt. (Max 10)
|
||||
*/
|
||||
/obj/item/seeds/proc/set_production(adjustamt)
|
||||
if(yield != -1)
|
||||
production = clamp(adjustamt, 1, 10)
|
||||
@@ -408,8 +408,8 @@
|
||||
C.value = production
|
||||
|
||||
/**
|
||||
* Sets the plant's potency stat to the value of adjustamt. (Max 100)
|
||||
*/
|
||||
* Sets the plant's potency stat to the value of adjustamt. (Max 100)
|
||||
*/
|
||||
/obj/item/seeds/proc/set_potency(adjustamt)
|
||||
if(potency != -1)
|
||||
potency = clamp(adjustamt, 0, 100)
|
||||
@@ -418,8 +418,8 @@
|
||||
C.value = potency
|
||||
|
||||
/**
|
||||
* Sets the plant's instability stat to the value of adjustamt. (Max 100)
|
||||
*/
|
||||
* Sets the plant's instability stat to the value of adjustamt. (Max 100)
|
||||
*/
|
||||
/obj/item/seeds/proc/set_instability(adjustamt)
|
||||
if(instability == -1)
|
||||
return
|
||||
@@ -429,8 +429,8 @@
|
||||
C.value = instability
|
||||
|
||||
/**
|
||||
* Sets the plant's weed production rate to the value of adjustamt. (Max 10)
|
||||
*/
|
||||
* Sets the plant's weed production rate to the value of adjustamt. (Max 10)
|
||||
*/
|
||||
/obj/item/seeds/proc/set_weed_rate(adjustamt)
|
||||
weed_rate = clamp(adjustamt, 0, 10)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_rate)
|
||||
@@ -438,8 +438,8 @@
|
||||
C.value = weed_rate
|
||||
|
||||
/**
|
||||
* Sets the plant's weed growth percentage to the value of adjustamt. (Max 67%)
|
||||
*/
|
||||
* Sets the plant's weed growth percentage to the value of adjustamt. (Max 67%)
|
||||
*/
|
||||
/obj/item/seeds/proc/set_weed_chance(adjustamt)
|
||||
weed_chance = clamp(adjustamt, 0, 67)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_chance)
|
||||
@@ -599,14 +599,14 @@
|
||||
qdel(chemical)
|
||||
|
||||
/**
|
||||
* Creates a graft from this plant.
|
||||
*
|
||||
* Creates a new graft from this plant.
|
||||
* Sets the grafts trait to this plants graftable trait.
|
||||
* Gives the graft a reference to this plant.
|
||||
* Copies all the relevant stats from this plant to the graft.
|
||||
* Returns the created graft.
|
||||
*/
|
||||
* Creates a graft from this plant.
|
||||
*
|
||||
* Creates a new graft from this plant.
|
||||
* Sets the grafts trait to this plants graftable trait.
|
||||
* Gives the graft a reference to this plant.
|
||||
* Copies all the relevant stats from this plant to the graft.
|
||||
* Returns the created graft.
|
||||
*/
|
||||
/obj/item/seeds/proc/create_graft()
|
||||
var/obj/item/graft/snip = new(loc, graft_gene)
|
||||
snip.parent_seed = src
|
||||
@@ -624,15 +624,15 @@
|
||||
return snip
|
||||
|
||||
/**
|
||||
* Applies a graft to this plant.
|
||||
*
|
||||
* Adds the graft trait to this plant if possible.
|
||||
* Increases plant stats by 2/3 of the grafts stats to a maximum of 100 (10 for yield).
|
||||
* Returns [TRUE]
|
||||
*
|
||||
* Arguments:
|
||||
* - [snip][/obj/item/graft]: The graft being used applied to this plant.
|
||||
*/
|
||||
* Applies a graft to this plant.
|
||||
*
|
||||
* Adds the graft trait to this plant if possible.
|
||||
* Increases plant stats by 2/3 of the grafts stats to a maximum of 100 (10 for yield).
|
||||
* Returns [TRUE]
|
||||
*
|
||||
* Arguments:
|
||||
* - [snip][/obj/item/graft]: The graft being used applied to this plant.
|
||||
*/
|
||||
/obj/item/seeds/proc/apply_graft(obj/item/graft/snip)
|
||||
var/datum/plant_gene/trait/new_trait = snip.stored_trait
|
||||
if(new_trait?.can_add(src))
|
||||
|
||||
Reference in New Issue
Block a user