Skip to content

Commit

Permalink
yea
Browse files Browse the repository at this point in the history
  • Loading branch information
FalloutFalcon committed Jun 4, 2024
1 parent 030c155 commit 709613b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 55 deletions.
5 changes: 5 additions & 0 deletions code/__DEFINES/botany.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@
#define REAGENT_TRANSFER_ID (1<<5)
/// Plants that have a unique effect on attack_self.
#define ATTACK_SELF_ID (1<<6)

#define HYDROTRAY_NO_PLANT "missing"
#define HYDROTRAY_PLANT_DEAD "dead"
#define HYDROTRAY_PLANT_GROWING "growing"
#define HYDROTRAY_PLANT_HARVESTABLE "harvestable"
4 changes: 2 additions & 2 deletions code/modules/hydroponics/grown/mushrooms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
endurance = 8
yield = 4
growthstages = 2
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism, /datum/plant_gene/reagent/liquidelectricity, /datum/plant_gene/trait/plant_type/carnivory)
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism, /datum/plant_gene/reagent/liquidelectricity, /datum/plant_gene/trait/carnivory)
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
reagents_add = list(/datum/reagent/consumable/nutriment = 0.1)
research = PLANT_RESEARCH_TIER_3
Expand All @@ -229,7 +229,7 @@
. = ..()
if(!nogenes)
unset_mutability(/datum/plant_gene/reagent/liquidelectricity, PLANT_GENE_EXTRACTABLE)
unset_mutability(/datum/plant_gene/trait/plant_type/carnivory, PLANT_GENE_REMOVABLE)
unset_mutability(/datum/plant_gene/trait/carnivory, PLANT_GENE_REMOVABLE)

/obj/item/reagent_containers/food/snacks/grown/mushroom/jupitercup
seed = /obj/item/seeds/chanter/jupitercup
Expand Down
4 changes: 2 additions & 2 deletions code/modules/hydroponics/hydroponics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
//Pests & Weeds//////////////////////////////////////////////////////////

if(pestlevel >= 8)
if(!myseed.get_gene(/datum/plant_gene/trait/plant_type/carnivory))
if(!myseed.get_gene(/datum/plant_gene/trait/carnivory))
adjustHealth(-2 / rating)

else
Expand All @@ -207,7 +207,7 @@
if(prob(50))
adjustPests(-1 / rating)

else if(pestlevel < 4 && myseed.get_gene(/datum/plant_gene/trait/plant_type/carnivory))
else if(pestlevel < 4 && myseed.get_gene(/datum/plant_gene/trait/carnivory))
adjustHealth(-2 / rating)
if(prob(5))
adjustPests(-1 / rating)
Expand Down
56 changes: 5 additions & 51 deletions code/modules/hydroponics/plant_genes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -729,59 +729,13 @@
SIGNAL_HANDLER

our_plant.investigate_log("made smoke at [AREACOORD(target)]. Last touched by: [our_plant.fingerprintslast].", INVESTIGATE_BOTANY)
var/datum/effect_system/fluid_spread/smoke/chem/smoke = new ()
var/obj/item/seeds/our_seed = our_plant.get_plant_seed()
var/splat_location = get_turf(target)
var/range = sqrt(our_seed.potency * 0.1)
smoke.attach(splat_location)
smoke.set_up(round(range), holder = our_plant, location = splat_location, carry = our_plant.reagents, silent = FALSE)
smoke.start(log = TRUE)
our_plant.reagents.clear_reagents()

/// Makes the plant and its seeds fireproof. From lavaland plants.
/datum/plant_gene/trait/fire_resistance
name = "Fire Resistance"
description = "Makes the seeds, plant and produce fireproof."
icon = "fire"
mutability_flags = PLANT_GENE_REMOVABLE | PLANT_GENE_MUTATABLE | PLANT_GENE_EXTRACTABLE

/datum/plant_gene/trait/fire_resistance // Lavaland
name = "Fire Resistance"

/datum/plant_gene/trait/fire_resistance/on_new_seed(obj/item/seeds/new_seed)
if(!(new_seed.resistance_flags & FIRE_PROOF))
new_seed.resistance_flags |= FIRE_PROOF

/datum/plant_gene/trait/fire_resistance/on_removed(obj/item/seeds/old_seed)
if(old_seed.resistance_flags & FIRE_PROOF)
old_seed.resistance_flags &= ~FIRE_PROOF

/datum/plant_gene/trait/fire_resistance/on_new_plant(obj/item/our_plant, newloc)
. = ..()
if(!.)
return

if(!(our_plant.resistance_flags & FIRE_PROOF))
our_plant.resistance_flags |= FIRE_PROOF

/*
* Makes a cloud of reagent smoke.
*
* our_plant - our plant being squashed and smoked
* target - the atom the plant was squashed on
*/
/datum/plant_gene/trait/smoke/proc/make_smoke(obj/item/our_plant, atom/target)
SIGNAL_HANDLER

our_plant.investigate_log("made smoke at [AREACOORD(target)]. Last touched by: [our_plant.fingerprintslast].", INVESTIGATE_BOTANY)
var/datum/effect_system/fluid_spread/smoke/chem/smoke = new ()
var/obj/item/seeds/our_seed = our_plant.get_plant_seed()
var/datum/effect_system/smoke_spread/chem/smoke = new
var/splat_location = get_turf(target)
var/range = sqrt(our_seed.potency * 0.1)
var/smoke_amount = round(sqrt(our_plant.seed.potency * 0.1), 1)
smoke.attach(splat_location)
smoke.set_up(round(range), holder = our_plant, location = splat_location, carry = our_plant.reagents, silent = FALSE)
smoke.start(log = TRUE)
our_plant.reagents.clear_reagents()
smoke.set_up(our_plant.reagents, smoke_amount, splat_location, 0)
smoke.start()
smoke.reagents.clear_reagents()

/// Makes the plant and its seeds fireproof. From lavaland plants.
/datum/plant_gene/trait/fire_resistance
Expand Down

0 comments on commit 709613b

Please sign in to comment.