Skip to content

Commit

Permalink
Harvestable Bushes (#2090)
Browse files Browse the repository at this point in the history
A port from Shiptest. Its a very simple mechanic where you just click a nice bright plant and then watch as it becomes dull and grey like you just sucked the life from it. And then you get a tomato!
  • Loading branch information
InsightfulParasite authored May 1, 2024
1 parent bfcd177 commit b0a2d52
Show file tree
Hide file tree
Showing 6 changed files with 200 additions and 8 deletions.
2 changes: 2 additions & 0 deletions ModularTegustation/fishing/code/turfs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
/obj/item/jammer/self_activated,
/obj/structure/lattice,
/obj/projectile,
/obj/item/food/seaweed,
/obj/structure/flora/ash/garden/seaweed
))

var/safe = FALSE
Expand Down
165 changes: 165 additions & 0 deletions ModularTegustation/harvestable_gardens.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
//Gardens//
//these guys spawn a variety of seeds at random, slightly weighted. Intended as a stopgap until we can add more custom flora.
/obj/structure/flora/ash/garden
name = "lush garden"
gender = NEUTER
desc = "In the soil and shade, something softly grows."
icon_state = "garden"
harvested_name = "lush garden"
harvested_desc = "In the soil and shade, something softly grew. It seems some industrious scavenger already passed by."
harvest = /obj/effect/spawner/lootdrop/garden
harvest_amount_high = 1
harvest_amount_low = 1
harvest_message_low = "You discover something nestled away in the growing bough."
harvest_message_med = "You discover something nestled away in the growing bough."
harvest_message_high = "You discover something nestled away in the growing bough."
regrowth_time_low = 20 MINUTES
regrowth_time_high = 40 MINUTES
num_sprites = 1
light_power = 0.5
light_range = 1
needs_sharp_harvest = FALSE

/obj/structure/flora/ash/garden/arid
name = "sandy garden"
desc = "Beneath a bluff of soft silicate, a sheltered grove slumbers."
icon_state = "gardenarid"
harvested_name = "sandy garden"
harvested_desc = "Beneath a bluff of soft silicate, a sheltered grove slumbered. Some desert wanderer seems to have picked it clean."
harvest = /obj/effect/spawner/lootdrop/garden/arid
harvest_amount_high = 1
harvest_amount_low = 1
harvest_message_low = "You brush sand away from a verdant prize, nestled in the leaves."
harvest_message_med = "You brush sand away from a verdant prize, nestled in the leaves."
harvest_message_high = "You brush sand away from a verdant prize, nestled in the leaves."

/obj/structure/flora/ash/garden/frigid
name = "chilly garden"
desc = "A delicate layer of frost covers hardy brush."
icon_state = "gardencold"
harvested_name = "chilly garden"
harvested_desc = "A delicate layer of frost covers hardy brush. Someone came with the blizzard, and left with any prize this might contain."
harvest = /obj/effect/spawner/lootdrop/garden/cold
harvest_amount_high = 1
harvest_amount_low = 1
harvest_message_low = "You unearth a snow-covered treat."
harvest_message_med = "You unearth a snow-covered treat."
harvest_message_high = "You unearth a snow-covered treat."

/obj/structure/flora/ash/garden/waste
name = "sickly garden"
desc = "Polluted water wells up from the cracked earth, feeding a patch of something curious."
icon_state = "gardensick"
harvested_name = "sickly garden"
harvested_desc = "Polluted water wells up from the cracked earth, where it once fed a patch of something curious. Now only wilted leaves remain."
harvest = /obj/effect/spawner/lootdrop/garden/sick
harvest_amount_high = 1
harvest_amount_low = 1
harvest_message_low = "You pry something odd from the poisoned soil."
harvest_message_med = "You pry something odd from the poisoned soil."
harvest_message_high = "You pry something odd from the poisoned soil."

/obj/structure/flora/ash/garden/seaweed //yea, i code :)
name = "seaweed patch"
gender = NEUTER
desc = "A patch of seaweed, floating on the surface of the water"
icon_state = "seaweed"
harvested_name = "seaweed patch"
harvested_desc = "A patch of seaweed, floating on the surface of the water. It seems someone has already searched through this"
harvest = /obj/item/food/seaweed
harvest_amount_high = 2
harvest_amount_low = 1
harvest_message_low = "You discover some edible weeds within the patch."
harvest_message_med = "You discover some edible weeds within the patch."
harvest_message_high = "You discover some edible weeds within the patch."

/obj/effect/spawner/lootdrop/garden
name = "lush garden seeder"
lootcount = 3
var/list/plant = list(
/obj/item/food/grown/citrus/lemon = 2,
/obj/item/food/grown/citrus/lime = 2,
/obj/item/food/grown/vanillapod = 2,
/obj/item/food/grown/cocoapod = 2,
/obj/item/food/grown/pineapple = 2,
/obj/item/food/grown/poppy/lily = 2,
/obj/item/food/grown/poppy/geranium = 2,
/obj/item/food/grown/sugarcane = 2,
/obj/item/food/grown/tea = 2,
/obj/item/food/grown/tobacco = 2,
/obj/item/food/grown/watermelon = 4,
/obj/item/grown/sunflower = 4,
/obj/item/food/grown/banana = 4,
/obj/item/food/grown/apple = 4,
/obj/item/food/grown/berries = 5,
/obj/item/food/grown/cherries = 4,
/obj/item/food/grown/garlic = 4,
/obj/item/food/grown/grapes = 4,
/obj/item/food/grown/grass = 5,
/obj/item/food/grown/pumpkin = 4,
/obj/item/food/grown/rainbow_flower = 4,
/obj/item/food/grown/wheat = 4,
/obj/item/food/grown/parsnip = 4,
/obj/item/food/grown/peas = 4,
/obj/item/food/grown/rice = 4,
/obj/item/food/grown/soybeans = 4,
/obj/item/food/grown/tomato = 4,
/obj/item/food/grown/cabbage = 4,
/obj/item/food/grown/onion = 4,
/obj/item/food/grown/carrot = 4,
)

/obj/effect/spawner/lootdrop/garden/Initialize(mapload)
loot = plant
return ..()

/obj/effect/spawner/lootdrop/garden/arid
name = "arid garden seeder"
lootcount = 2
plant = list(
/obj/item/food/grown/nettle = 1,
/obj/item/seeds/random = 1,
/obj/item/food/grown/redbeet = 1,
/obj/item/food/grown/aloe = 2,
/obj/item/grown/cotton = 2,
/obj/item/food/grown/chili = 2,
/obj/item/food/grown/whitebeet = 5,
/obj/item/food/grown/potato = 4,
/obj/item/food/grown/potato/sweet = 4,
/obj/item/food/grown/mushroom/chanterelle = 4,
/obj/item/food/grown/mushroom/plumphelmet = 4,
/obj/item/food/grown/corn = 4,
)

/obj/effect/spawner/lootdrop/garden/cold
name = "frigid garden seeder"
lootcount = 2
plant = list(
/obj/item/food/grown/bluecherries = 1,
/obj/item/food/grown/poppy = 2,
/obj/item/food/grown/berries = 4,
/obj/item/food/grown/mushroom/chanterelle = 4,
/obj/item/food/grown/oat = 4,
/obj/item/food/grown/grapes/green = 4,
/obj/item/food/grown/grass = 4,
/obj/item/food/grown/harebell = 5,
/obj/item/seeds/starthistle = 5,
)

/obj/effect/spawner/lootdrop/garden/sick
name = "sickly garden seeder"
lootcount = 1
plant = list(
/obj/item/food/grown/mushroom/amanita = 4,
/obj/item/food/grown/mushroom/reishi = 4,
/obj/item/stack/sheet/cardboard = 4,
/obj/item/stack/sheet/bone = 1,
)

/obj/item/food/seaweed
name = "seaweed"
desc = "It's so rubbery... is this safe to eat?"
icon = 'icons/obj/hydroponics/harvest.dmi'
icon_state = "seaweed"
foodtypes = VEGETABLES
food_reagents = list(/datum/reagent/water = 0.5, /datum/reagent/consumable/salt = 0.4, /datum/reagent/consumable/nutriment = 2)
40 changes: 32 additions & 8 deletions code/modules/mining/lavaland/ash_flora.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@
var/base_icon
var/regrowth_time_low = 8 MINUTES
var/regrowth_time_high = 16 MINUTES
var/number_of_variants = 4
var/num_sprites = 4 // WS edit - WS

/obj/structure/flora/ash/Initialize()
. = ..()
base_icon = "[icon_state][rand(1, number_of_variants)]"
icon_state = base_icon
if(num_sprites == 1) //stops unnecessary randomization of harvestable flora icons with only one variation. Remember to set num_sprites on your flora!
base_icon = "[icon_state]"
icon_state = base_icon
else
base_icon = "[icon_state][rand(1, num_sprites)]" //randomizing icons like this prevents the icon of the structure from loading properly in mapping tools. Works fine ingame.
icon_state = base_icon

/obj/structure/flora/ash/proc/harvest(user)
if(harvested)
Expand Down Expand Up @@ -162,7 +166,22 @@
harvest_message_high = "You pluck quite a lot of curved fruit."
regrowth_time_low = 2400
regrowth_time_high = 5500
number_of_variants = 2
num_sprites = 2

/obj/structure/flora/ash/fern
name = "cave fern"
desc = "A species of fern with highly fibrous leaves."
icon_state = "cavefern" //needs new sprites.
harvested_name = "cave fern stems"
harvested_desc = "A few cave fern stems, missing their leaves."
harvest = /obj/item/food/grown/ash_flora/fern
harvest_amount_high = 4
harvest_message_low = "You clip a single, suitable leaf."
harvest_message_med = "You clip a number of leaves, leaving a few unsuitable ones."
harvest_message_high = "You clip quite a lot of suitable leaves."
regrowth_time_low = 3000
regrowth_time_high = 5400
num_sprites = 1

//SNACKS

Expand Down Expand Up @@ -212,6 +231,12 @@
seed = /obj/item/seeds/lavaland/cactus
wine_power = 50

/obj/item/food/grown/ash_flora/fern
name = "fern leaf"
desc = "A leaf from a cave fern."
icon_state = "fern"
wine_power = 10

//SEEDS

/obj/item/seeds/lavaland
Expand All @@ -238,7 +263,6 @@
species = "cactus"
plantname = "Fruiting Cactus"
product = /obj/item/food/grown/ash_flora/cactus_fruit
mutatelist = list(/obj/item/seeds/star_cactus)
genes = list(/datum/plant_gene/trait/fire_resistance)
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
growthstages = 2
Expand Down Expand Up @@ -283,7 +307,7 @@
product = /obj/item/food/grown/ash_flora/shavings
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism, /datum/plant_gene/trait/fire_resistance)
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
reagents_add = list(/datum/reagent/consumable/sugar = 0.06, /datum/reagent/consumable/ethanol = 0.04, /datum/reagent/stabilizing_agent = 0.06, /datum/reagent/toxin/minttoxin = 0.02)
reagents_add = list(/datum/reagent/consumable/ethanol = 0.04, /datum/reagent/stabilizing_agent = 0.06, /datum/reagent/toxin/minttoxin = 0.02)

/obj/item/seeds/lavaland/porcini
name = "pack of porcini mycelium"
Expand All @@ -294,8 +318,7 @@
product = /obj/item/food/grown/ash_flora/mushroom_leaf
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism, /datum/plant_gene/trait/fire_resistance)
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
reagents_add = list(/datum/reagent/consumable/nutriment = 0.06, /datum/reagent/consumable/vitfro = 0.04, /datum/reagent/drug/nicotine = 0.04)

reagents_add = list(/datum/reagent/consumable/nutriment = 0.06, /datum/reagent/consumable/vitfro = 0.04, /datum/reagent/drug/nicotine = 0.04, /datum/reagent/consumable/sugar = 0.04)

/obj/item/seeds/lavaland/inocybe
name = "pack of inocybe mycelium"
Expand Down Expand Up @@ -327,6 +350,7 @@
reqs = list(/obj/item/food/grown/ash_flora/shavings = 5)
time = 30
category = CAT_PRIMAL

/obj/item/reagent_containers/glass/bowl/mushroom_bowl
name = "mushroom bowl"
desc = "A bowl made out of mushrooms. Not food, though it might have contained some at some point."
Expand Down
Binary file modified icons/obj/hydroponics/harvest.dmi
Binary file not shown.
Binary file modified icons/obj/lavaland/ash_flora.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions lobotomy-corp13.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3904,6 +3904,7 @@
#include "interface\stylesheet.dm"
#include "interface\skin.dmf"
#include "ModularTegustation\engineering_bounties.dm"
#include "ModularTegustation\harvestable_gardens.dm"
#include "ModularTegustation\languagebooks.dm"
#include "ModularTegustation\lc13_effects.dm"
#include "ModularTegustation\lc13_machinery.dm"
Expand Down

0 comments on commit b0a2d52

Please sign in to comment.