flora 
Vars | |
| can_uproot | If the user is allowed to uproot the flora |
|---|---|
| flora_flags | Flags for the flora to determine what kind of sound to play when it gets hit |
| harvest_amount_high | The high end of how many harvested items you get |
| harvest_amount_low | The low end of how many harvested items you get |
| harvest_message_true_thresholds | See proc/harvest() and where this is used for an explaination on how this works |
| harvest_time | How long it takes to harvest the flora with the correct tool |
| harvest_verb | The "verb" to use when the user harvests the flora |
| harvest_verb_suffix | What should be added to harvest_verb depending on the context ("user harvest(s) the tree" / "user chop(s down) the tree") |
| harvest_with_hands | If the user is able to harvest this with their hands |
| harvestable | If false, the flora won't be able to be harvested at all. If it's true, go through checks normally to determine if the flora is able to be harvested |
| harvested_desc | If set, the flora will have this as its description after being harvested. When the flora becomes harvestable again, it regerts to its initial(desc) |
| harvested_name | If set, the flora will have this as its name after being harvested. When the flora becomes harvestable again, it reverts to its initial(name) |
| regrowth_time_high | Stops the flora from regrowing if this is set to 0 |
| regrowth_time_low | Variables for determining the low/high ends of how long it takes for the flora takes to grow. |
Procs | |
| can_harvest | A helper proc that determines if a user can currently harvest this flora with whatever tool they're trying to use. Returns: TRUE if they can harvest, FALSE if not. Null if it's not harvestable at all. |
| get_potential_products | A helper proc for getting the products that could be created when harvesting this flora, list syntax is (type = weight) Because of how this works, it can spawn in anomalies if you want it to. Or wall girders Returns: An assoc list of obj typepaths and their weights e.g. list(/obj/item/food/grass = 1), or null |
| get_products_list | A helper proc for getting a random amount of products, associated with the flora's product list. Returns: A list where each value is (harvested_item_typepath = amount_of_products) |
| harvest | This gets called after a mob tries to harvest this flora with the correct tool. It displays a flavor message to whoever's harvesting this flora, then creates new products depending on the flora's product list. Also renames the flora if harvested_name or harvested_desc is set in the variables Returns: FALSE if nothing was made, otherwise a list of created products |
| replant | Called after the user plants the flora back into the ground after uprooted |
| uproot | Called after the user uproots the flora with a shovel. |
Var Details
can_uproot 
If the user is allowed to uproot the flora
flora_flags 
Flags for the flora to determine what kind of sound to play when it gets hit
harvest_amount_high 
The high end of how many harvested items you get
harvest_amount_low 
The low end of how many harvested items you get
harvest_message_true_thresholds 
See proc/harvest() and where this is used for an explaination on how this works
harvest_time 
How long it takes to harvest the flora with the correct tool
harvest_verb 
The "verb" to use when the user harvests the flora
harvest_verb_suffix 
What should be added to harvest_verb depending on the context ("user harvest(s) the tree" / "user chop(s down) the tree")
harvest_with_hands 
If the user is able to harvest this with their hands
harvestable 
If false, the flora won't be able to be harvested at all. If it's true, go through checks normally to determine if the flora is able to be harvested
harvested_desc 
If set, the flora will have this as its description after being harvested. When the flora becomes harvestable again, it regerts to its initial(desc)
harvested_name 
If set, the flora will have this as its name after being harvested. When the flora becomes harvestable again, it reverts to its initial(name)
regrowth_time_high 
Stops the flora from regrowing if this is set to 0
regrowth_time_low 
Variables for determining the low/high ends of how long it takes for the flora takes to grow.
Proc Details
can_harvest
A helper proc that determines if a user can currently harvest this flora with whatever tool they're trying to use. Returns: TRUE if they can harvest, FALSE if not. Null if it's not harvestable at all.
get_potential_products
A helper proc for getting the products that could be created when harvesting this flora, list syntax is (type = weight) Because of how this works, it can spawn in anomalies if you want it to. Or wall girders Returns: An assoc list of obj typepaths and their weights e.g. list(/obj/item/food/grass = 1), or null
get_products_list
A helper proc for getting a random amount of products, associated with the flora's product list. Returns: A list where each value is (harvested_item_typepath = amount_of_products)
harvest
This gets called after a mob tries to harvest this flora with the correct tool. It displays a flavor message to whoever's harvesting this flora, then creates new products depending on the flora's product list. Also renames the flora if harvested_name or harvested_desc is set in the variables Returns: FALSE if nothing was made, otherwise a list of created products
replant
Called after the user plants the flora back into the ground after uprooted
uproot
Called after the user uproots the flora with a shovel.