Uploading all files.

This commit is contained in:
Quotefox
2019-09-23 18:26:34 +02:00
commit 7091cdbe8c
7779 changed files with 2601004 additions and 0 deletions
@@ -0,0 +1,268 @@
#define BEEBOX_MAX_FRAMES 3 //Max frames per box
#define BEES_RATIO 0.5 //Multiplied by the max number of honeycombs to find the max number of bees
#define BEE_PROB_NEW_BEE 20 //The chance for spare bee_resources to be turned into new bees
#define BEE_RESOURCE_HONEYCOMB_COST 100 //The amount of bee_resources for a new honeycomb to be produced, percentage cost 1-100
#define BEE_RESOURCE_NEW_BEE_COST 50 //The amount of bee_resources for a new bee to be produced, percentage cost 1-100
/mob/proc/bee_friendly()
return 0
/mob/living/simple_animal/hostile/poison/bees/bee_friendly()
return 1
/mob/living/carbon/human/bee_friendly()
if(dna && dna.species && dna.species.id == "pod") //bees pollinate plants, duh.
return 1
if (wear_suit && head && istype(wear_suit, /obj/item/clothing) && istype(head, /obj/item/clothing))
var/obj/item/clothing/CS = wear_suit
var/obj/item/clothing/CH = head
if (CS.clothing_flags & CH.clothing_flags & THICKMATERIAL)
return 1
return 0
/obj/structure/beebox
name = "apiary"
desc = "Dr. Miles Manners is just your average wasp-themed super hero by day, but by night he becomes DR. BEES!"
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "beebox"
anchored = TRUE
density = TRUE
var/mob/living/simple_animal/hostile/poison/bees/queen/queen_bee = null
var/list/bees = list() //bees owned by the box, not those inside it
var/list/honeycombs = list()
var/list/honey_frames = list()
var/bee_resources = 0
/obj/structure/beebox/Initialize()
. = ..()
START_PROCESSING(SSobj, src)
/obj/structure/beebox/Destroy()
STOP_PROCESSING(SSobj, src)
bees.Cut()
honeycombs.Cut()
queen_bee = null
return ..()
//Premade apiaries can spawn with a random reagent
/obj/structure/beebox/premade
var/random_reagent = FALSE
/obj/structure/beebox/premade/Initialize()
. = ..()
icon_state = "beebox"
var/datum/reagent/R = null
if(random_reagent)
R = pick(subtypesof(/datum/reagent))
R = GLOB.chemical_reagents_list[initial(R.id)]
queen_bee = new(src)
queen_bee.beehome = src
bees += queen_bee
queen_bee.assign_reagent(R)
for(var/i in 1 to BEEBOX_MAX_FRAMES)
var/obj/item/honey_frame/HF = new(src)
honey_frames += HF
for(var/i in 1 to get_max_bees())
var/mob/living/simple_animal/hostile/poison/bees/B = new(src)
bees += B
B.beehome = src
B.assign_reagent(R)
/obj/structure/beebox/premade/random
icon_state = "random_beebox"
random_reagent = TRUE
/obj/structure/beebox/process()
if(queen_bee)
if(bee_resources >= BEE_RESOURCE_HONEYCOMB_COST)
if(honeycombs.len < get_max_honeycomb())
bee_resources = max(bee_resources-BEE_RESOURCE_HONEYCOMB_COST, 0)
var/obj/item/reagent_containers/honeycomb/HC = new(src)
if(queen_bee.beegent)
HC.set_reagent(queen_bee.beegent.id)
honeycombs += HC
if(bees.len < get_max_bees())
var/freebee = FALSE //a freebee, geddit?, hahaha HAHAHAHA
if(bees.len <= 1) //there's always one set of worker bees, this isn't colony collapse disorder its 2d spessmen
freebee = TRUE
if((bee_resources >= BEE_RESOURCE_NEW_BEE_COST && prob(BEE_PROB_NEW_BEE)) || freebee)
if(!freebee)
bee_resources = max(bee_resources - BEE_RESOURCE_NEW_BEE_COST, 0)
var/mob/living/simple_animal/hostile/poison/bees/B = new(get_turf(src))
B.beehome = src
B.assign_reagent(queen_bee.beegent)
bees += B
/obj/structure/beebox/proc/get_max_honeycomb()
. = 0
for(var/hf in honey_frames)
var/obj/item/honey_frame/HF = hf
. += HF.honeycomb_capacity
/obj/structure/beebox/proc/get_max_bees()
. = get_max_honeycomb() * BEES_RATIO
/obj/structure/beebox/examine(mob/user)
..()
if(!queen_bee)
to_chat(user, "<span class='warning'>There is no queen bee! There won't bee any honeycomb without a queen!</span>")
var/half_bee = get_max_bees()*0.5
if(half_bee && (bees.len >= half_bee))
to_chat(user, "<span class='notice'>This place is aBUZZ with activity... there are lots of bees!</span>")
to_chat(user, "<span class='notice'>[bee_resources]/100 resource supply.</span>")
to_chat(user, "<span class='notice'>[bee_resources]% towards a new honeycomb.</span>")
to_chat(user, "<span class='notice'>[bee_resources*2]% towards a new bee.</span>")
if(honeycombs.len)
var/plural = honeycombs.len > 1
to_chat(user, "<span class='notice'>There [plural? "are" : "is"] [honeycombs.len] uncollected honeycomb[plural ? "s":""] in the apiary.</span>")
if(honeycombs.len >= get_max_honeycomb())
to_chat(user, "<span class='warning'>There's no room for more honeycomb!</span>")
/obj/structure/beebox/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/honey_frame))
var/obj/item/honey_frame/HF = I
if(honey_frames.len < BEEBOX_MAX_FRAMES)
visible_message("<span class='notice'>[user] adds a frame to the apiary.</span>")
if(!user.transferItemToLoc(HF, src))
return
honey_frames += HF
else
to_chat(user, "<span class='warning'>There's no room for any more frames in the apiary!</span>")
return
if(istype(I, /obj/item/wrench))
if(default_unfasten_wrench(user, I, time = 20))
return
if(istype(I, /obj/item/queen_bee))
if(queen_bee)
to_chat(user, "<span class='warning'>This hive already has a queen!</span>")
return
var/obj/item/queen_bee/qb = I
user.temporarilyRemoveItemFromInventory(qb)
qb.queen.forceMove(src)
bees += qb.queen
queen_bee = qb.queen
qb.queen = null
if(queen_bee)
visible_message("<span class='notice'>[user] sets [qb] down inside the apiary, making it their new home.</span>")
var/relocated = 0
for(var/b in bees)
var/mob/living/simple_animal/hostile/poison/bees/B = b
if(B.reagent_incompatible(queen_bee))
bees -= B
B.beehome = null
if(B.loc == src)
B.forceMove(drop_location())
relocated++
if(relocated)
to_chat(user, "<span class='warning'>This queen has a different reagent to some of the bees who live here, those bees will not return to this apiary!</span>")
else
to_chat(user, "<span class='warning'>The queen bee disappeared! Disappearing bees have been in the news lately...</span>")
qdel(qb)
return
..()
/obj/structure/beebox/interact(mob/user)
. = ..()
if(!user.bee_friendly())
//Time to get stung!
var/bees = FALSE
for(var/b in bees) //everyone who's ever lived here now instantly hates you, suck it assistant!
var/mob/living/simple_animal/hostile/poison/bees/B = b
if(B.isqueen)
continue
if(B.loc == src)
B.forceMove(drop_location())
B.target = user
bees = TRUE
if(bees)
visible_message("<span class='danger'>[user] disturbs the bees!</span>")
else
visible_message("<span class='danger'>[user] disturbs the [name] to no effect!</span>")
else
var/option = alert(user, "What action do you wish to perform?","Apiary","Remove a Honey Frame","Remove the Queen Bee", "Cancel")
if(!Adjacent(user))
return
switch(option)
if("Remove a Honey Frame")
if(!honey_frames.len)
to_chat(user, "<span class='warning'>There are no honey frames to remove!</span>")
return
var/obj/item/honey_frame/HF = pick_n_take(honey_frames)
if(HF)
if(!user.put_in_active_hand(HF))
HF.forceMove(drop_location())
visible_message("<span class='notice'>[user] removes a frame from the apiary.</span>")
var/amtH = HF.honeycomb_capacity
var/fallen = 0
while(honeycombs.len && amtH) //let's pretend you always grab the frame with the most honeycomb on it
var/obj/item/reagent_containers/honeycomb/HC = pick_n_take(honeycombs)
if(HC)
HC.forceMove(drop_location())
amtH--
fallen++
if(fallen)
var/multiple = fallen > 1
visible_message("<span class='notice'>[user] scrapes [multiple ? "[fallen]" : "a"] honeycomb[multiple ? "s" : ""] off of the frame.</span>")
if("Remove the Queen Bee")
if(!queen_bee || queen_bee.loc != src)
to_chat(user, "<span class='warning'>There is no queen bee to remove!</span>")
return
var/obj/item/queen_bee/QB = new()
queen_bee.forceMove(QB)
bees -= queen_bee
QB.queen = queen_bee
QB.name = queen_bee.name
if(!user.put_in_active_hand(QB))
QB.forceMove(drop_location())
visible_message("<span class='notice'>[user] removes the queen from the apiary.</span>")
queen_bee = null
/obj/structure/beebox/deconstruct(disassembled = TRUE)
new /obj/item/stack/sheet/mineral/wood (loc, 20)
for(var/mob/living/simple_animal/hostile/poison/bees/B in bees)
if(B.loc == src)
B.forceMove(drop_location())
for(var/obj/item/honey_frame/HF in honey_frames)
if(HF.loc == src)
HF.forceMove(drop_location())
qdel(src)
/obj/structure/beebox/unwrenched
anchored = FALSE
@@ -0,0 +1,15 @@
/obj/item/clothing/head/beekeeper_head
name = "beekeeper hat"
desc = "Keeps the lil buzzing buggers out of your eyes."
icon_state = "beekeeper"
item_state = "beekeeper"
clothing_flags = THICKMATERIAL
/obj/item/clothing/suit/beekeeper_suit
name = "beekeeper suit"
desc = "Keeps the lil buzzing buggers away from your squishy bits."
icon_state = "beekeeper"
item_state = "beekeeper"
clothing_flags = THICKMATERIAL
@@ -0,0 +1,13 @@
/obj/item/honey_frame
name = "honey frame"
desc = "A scaffold for bees to build honeycomb on."
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "honey_frame"
var/honeycomb_capacity = 10 //10 Honeycomb per frame by default, researchable frames perhaps?
/obj/item/honey_frame/Initialize()
. = ..()
pixel_x = rand(8,-8)
pixel_y = rand(8,-8)
@@ -0,0 +1,40 @@
/obj/item/reagent_containers/honeycomb
name = "honeycomb"
desc = "A hexagonal mesh of honeycomb."
icon = 'icons/obj/hydroponics/harvest.dmi'
icon_state = "honeycomb"
possible_transfer_amounts = list()
spillable = FALSE
disease_amount = 0
volume = 10
amount_per_transfer_from_this = 0
list_reagents = list("honey" = 5)
grind_results = list()
var/honey_color = ""
/obj/item/reagent_containers/honeycomb/Initialize()
. = ..()
pixel_x = rand(8,-8)
pixel_y = rand(8,-8)
update_icon()
/obj/item/reagent_containers/honeycomb/update_icon()
cut_overlays()
var/mutable_appearance/honey_overlay = mutable_appearance(icon, "honey")
if(honey_color)
honey_overlay.icon_state = "greyscale_honey"
honey_overlay.color = honey_color
add_overlay(honey_overlay)
/obj/item/reagent_containers/honeycomb/proc/set_reagent(reagent)
var/datum/reagent/R = GLOB.chemical_reagents_list[reagent]
if(istype(R))
name = "honeycomb ([R.name])"
honey_color = R.color
reagents.add_reagent(R.id,5)
else
honey_color = ""
update_icon()
+315
View File
@@ -0,0 +1,315 @@
/obj/machinery/biogenerator
name = "biogenerator"
desc = "Converts plants into biomass, which can be used to construct useful items."
icon = 'icons/obj/machines/biogenerator.dmi'
icon_state = "biogen-empty"
density = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 40
circuit = /obj/item/circuitboard/machine/biogenerator
var/processing = FALSE
var/obj/item/reagent_containers/glass/beaker = null
var/points = 0
var/menustat = "menu"
var/efficiency = 0
var/productivity = 0
var/max_items = 40
var/datum/techweb/stored_research
var/list/show_categories = list("Food", "Botany Chemicals", "Organic Materials")
var/list/timesFiveCategories = list("Food", "Botany Chemicals")
/obj/machinery/biogenerator/Initialize()
. = ..()
stored_research = new /datum/techweb/specialized/autounlocking/biogenerator
create_reagents(1000)
/obj/machinery/biogenerator/Destroy()
QDEL_NULL(beaker)
return ..()
/obj/machinery/biogenerator/contents_explosion(severity, target)
..()
if(beaker)
beaker.ex_act(severity, target)
/obj/machinery/biogenerator/handle_atom_del(atom/A)
..()
if(A == beaker)
beaker = null
update_icon()
updateUsrDialog()
/obj/machinery/biogenerator/RefreshParts()
var/E = 0
var/P = 0
var/max_storage = 40
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
P += B.rating
max_storage = 40 * B.rating
for(var/obj/item/stock_parts/manipulator/M in component_parts)
E += M.rating
efficiency = E
productivity = P
max_items = max_storage
/obj/machinery/biogenerator/on_reagent_change(changetype) //When the reagents change, change the icon as well.
update_icon()
/obj/machinery/biogenerator/update_icon()
if(panel_open)
icon_state = "biogen-empty-o"
else if(!src.beaker)
icon_state = "biogen-empty"
else if(!src.processing)
icon_state = "biogen-stand"
else
icon_state = "biogen-work"
return
/obj/machinery/biogenerator/attackby(obj/item/O, mob/user, params)
if(user.a_intent == INTENT_HARM)
return ..()
if(processing)
to_chat(user, "<span class='warning'>The biogenerator is currently processing.</span>")
return
if(default_deconstruction_screwdriver(user, "biogen-empty-o", "biogen-empty", O))
if(beaker)
var/obj/item/reagent_containers/glass/B = beaker
B.forceMove(drop_location())
beaker = null
update_icon()
return
if(default_deconstruction_crowbar(O))
return
if(istype(O, /obj/item/reagent_containers/glass))
. = 1 //no afterattack
if(!panel_open)
if(beaker)
to_chat(user, "<span class='warning'>A container is already loaded into the machine.</span>")
else
if(!user.transferItemToLoc(O, src))
return
beaker = O
to_chat(user, "<span class='notice'>You add the container to the machine.</span>")
update_icon()
updateUsrDialog()
else
to_chat(user, "<span class='warning'>Close the maintenance panel first.</span>")
return
else if(istype(O, /obj/item/storage/bag/plants))
var/obj/item/storage/bag/plants/PB = O
var/i = 0
for(var/obj/item/reagent_containers/food/snacks/grown/G in contents)
i++
if(i >= max_items)
to_chat(user, "<span class='warning'>The biogenerator is already full! Activate it.</span>")
else
for(var/obj/item/reagent_containers/food/snacks/grown/G in PB.contents)
if(i >= max_items)
break
if(SEND_SIGNAL(PB, COMSIG_TRY_STORAGE_TAKE, G, src))
i++
if(i<max_items)
to_chat(user, "<span class='info'>You empty the plant bag into the biogenerator.</span>")
else if(PB.contents.len == 0)
to_chat(user, "<span class='info'>You empty the plant bag into the biogenerator, filling it to its capacity.</span>")
else
to_chat(user, "<span class='info'>You fill the biogenerator to its capacity.</span>")
return TRUE //no afterattack
else if(istype(O, /obj/item/reagent_containers/food/snacks/grown))
var/i = 0
for(var/obj/item/reagent_containers/food/snacks/grown/G in contents)
i++
if(i >= max_items)
to_chat(user, "<span class='warning'>The biogenerator is full! Activate it.</span>")
else
if(user.transferItemToLoc(O, src))
to_chat(user, "<span class='info'>You put [O.name] in [src.name]</span>")
return TRUE //no afterattack
else if (istype(O, /obj/item/disk/design_disk))
user.visible_message("[user] begins to load \the [O] in \the [src]...",
"You begin to load a design from \the [O]...",
"You hear the chatter of a floppy drive.")
processing = TRUE
var/obj/item/disk/design_disk/D = O
if(do_after(user, 10, target = src))
for(var/B in D.blueprints)
if(B)
stored_research.add_design(B)
processing = FALSE
return TRUE
else
to_chat(user, "<span class='warning'>You cannot put this in [src.name]!</span>")
/obj/machinery/biogenerator/ui_interact(mob/user)
if(stat & BROKEN || panel_open)
return
. = ..()
var/dat
if(processing)
dat += "<div class='statusDisplay'>Biogenerator is processing! Please wait...</div><BR>"
else
switch(menustat)
if("nopoints")
dat += "<div class='statusDisplay'>You do not have enough biomass to create products.<BR>Please, put growns into reactor and activate it.</div>"
menustat = "menu"
if("complete")
dat += "<div class='statusDisplay'>Operation complete.</div>"
menustat = "menu"
if("void")
dat += "<div class='statusDisplay'>Error: No growns inside.<BR>Please, put growns into reactor.</div>"
menustat = "menu"
if("nobeakerspace")
dat += "<div class='statusDisplay'>Not enough space left in container. Unable to create product.</div>"
menustat = "menu"
if(beaker)
var/categories = show_categories.Copy()
for(var/V in categories)
categories[V] = list()
for(var/V in stored_research.researched_designs)
var/datum/design/D = stored_research.researched_designs[V]
for(var/C in categories)
if(C in D.category)
categories[C] += D
dat += "<div class='statusDisplay'>Biomass: [points] units.</div><BR>"
dat += "<A href='?src=[REF(src)];activate=1'>Activate</A><A href='?src=[REF(src)];detach=1'>Detach Container</A>"
for(var/cat in categories)
dat += "<h3>[cat]:</h3>"
dat += "<div class='statusDisplay'>"
for(var/V in categories[cat])
var/datum/design/D = V
dat += "[D.name]: <A href='?src=[REF(src)];create=[REF(D)];amount=1'>Make</A>"
if(cat in timesFiveCategories)
dat += "<A href='?src=[REF(src)];create=[REF(D)];amount=5'>x5</A>"
if(ispath(D.build_path, /obj/item/stack))
dat += "<A href='?src=[REF(src)];create=[REF(D)];amount=10'>x10</A>"
dat += "([D.materials[MAT_BIOMASS]/efficiency])<br>"
dat += "</div>"
else
dat += "<div class='statusDisplay'>No container inside, please insert container.</div>"
var/datum/browser/popup = new(user, "biogen", name, 350, 520)
popup.set_content(dat)
popup.open()
/obj/machinery/biogenerator/proc/activate()
if (usr.stat != CONSCIOUS)
return
if (src.stat != NONE) //NOPOWER etc
return
if(processing)
to_chat(usr, "<span class='warning'>The biogenerator is in the process of working.</span>")
return
var/S = 0
for(var/obj/item/reagent_containers/food/snacks/grown/I in contents)
S += 5
if(I.reagents.get_reagent_amount("nutriment") < 0.1)
points += 1*productivity
else points += I.reagents.get_reagent_amount("nutriment")*10*productivity
qdel(I)
if(S)
processing = TRUE
update_icon()
updateUsrDialog()
playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
use_power(S*30)
sleep(S+15/productivity)
processing = FALSE
update_icon()
else
menustat = "void"
/obj/machinery/biogenerator/proc/check_cost(list/materials, multiplier = 1, remove_points = 1)
if(materials.len != 1 || materials[1] != MAT_BIOMASS)
return FALSE
if (materials[MAT_BIOMASS]*multiplier/efficiency > points)
menustat = "nopoints"
return FALSE
else
if(remove_points)
points -= materials[MAT_BIOMASS]*multiplier/efficiency
update_icon()
updateUsrDialog()
return TRUE
/obj/machinery/biogenerator/proc/check_container_volume(list/reagents, multiplier = 1)
var/sum_reagents = 0
for(var/R in reagents)
sum_reagents += reagents[R]
sum_reagents *= multiplier
if(beaker.reagents.total_volume + sum_reagents > beaker.reagents.maximum_volume)
menustat = "nobeakerspace"
return FALSE
return TRUE
/obj/machinery/biogenerator/proc/create_product(datum/design/D, amount)
if(!beaker || !loc)
return FALSE
if(ispath(D.build_path, /obj/item/stack))
if(!check_container_volume(D.make_reagents, amount))
return FALSE
if(!check_cost(D.materials, amount))
return FALSE
new D.build_path(drop_location(), amount)
for(var/R in D.make_reagents)
beaker.reagents.add_reagent(R, D.make_reagents[R]*amount)
else
var/i = amount
while(i > 0)
if(!check_container_volume(D.make_reagents))
return .
if(!check_cost(D.materials))
return .
if(D.build_path)
new D.build_path(loc)
for(var/R in D.make_reagents)
beaker.reagents.add_reagent(R, D.make_reagents[R])
. = 1
--i
menustat = "complete"
update_icon()
return .
/obj/machinery/biogenerator/proc/detach()
if(beaker)
beaker.forceMove(drop_location())
beaker = null
update_icon()
/obj/machinery/biogenerator/Topic(href, href_list)
if(..() || panel_open)
return
usr.set_machine(src)
if(href_list["activate"])
activate()
updateUsrDialog()
else if(href_list["detach"])
detach()
updateUsrDialog()
else if(href_list["create"])
var/amount = (text2num(href_list["amount"]))
//Can't be outside these (if you change this keep a sane limit)
amount = CLAMP(amount, 1, 50)
var/datum/design/D = locate(href_list["create"])
create_product(D, amount)
updateUsrDialog()
else if(href_list["menu"])
menustat = "menu"
updateUsrDialog()
@@ -0,0 +1,78 @@
/obj/structure/fermenting_barrel
name = "wooden barrel"
desc = "A large wooden barrel. You can ferment fruits and such inside it, or just use it to hold liquid."
icon = 'icons/obj/objects.dmi'
icon_state = "barrel"
density = TRUE
anchored = FALSE
pressure_resistance = 2 * ONE_ATMOSPHERE
max_integrity = 300
var/open = FALSE
var/speed_multiplier = 1 //How fast it distills. Defaults to 100% (1.0). Lower is better.
/obj/structure/fermenting_barrel/Initialize()
create_reagents(300, DRAINABLE | AMOUNT_VISIBLE) //Bluespace beakers, but without the portability or efficiency in circuits.
. = ..()
/obj/structure/fermenting_barrel/examine(mob/user)
. = ..()
to_chat(user, "<span class='notice'>It is currently [open?"open, letting you pour liquids in.":"closed, letting you draw liquids from the tap."]</span>")
/obj/structure/fermenting_barrel/proc/makeWine(obj/item/reagent_containers/food/snacks/grown/fruit)
if(fruit.reagents)
fruit.reagents.trans_to(src, fruit.reagents.total_volume)
var/amount = fruit.seed.potency / 4
if(fruit.distill_reagent)
reagents.add_reagent(fruit.distill_reagent, amount)
else
var/data = list()
data["names"] = list("[initial(fruit.name)]" = 1)
data["color"] = fruit.filling_color
data["boozepwr"] = fruit.wine_power
if(fruit.wine_flavor)
data["tastes"] = list(fruit.wine_flavor = 1)
else
data["tastes"] = list(fruit.tastes[1] = 1)
reagents.add_reagent("fruit_wine", amount, data)
qdel(fruit)
playsound(src, 'sound/effects/bubbles.ogg', 50, TRUE)
/obj/structure/fermenting_barrel/attackby(obj/item/I, mob/user, params)
var/obj/item/reagent_containers/food/snacks/grown/fruit = I
if(istype(fruit))
if(!fruit.can_distill)
to_chat(user, "<span class='warning'>You can't distill this into anything...</span>")
return TRUE
else if(!user.transferItemToLoc(I,src))
to_chat(user, "<span class='warning'>[I] is stuck to your hand!</span>")
return TRUE
to_chat(user, "<span class='notice'>You place [I] into [src] to start the fermentation process.</span>")
addtimer(CALLBACK(src, .proc/makeWine, fruit), rand(80, 120) * speed_multiplier)
return TRUE
else
return ..()
/obj/structure/fermenting_barrel/attack_hand(mob/user)
open = !open
if(open)
DISABLE_BITFIELD(reagents.reagents_holder_flags, DRAINABLE)
ENABLE_BITFIELD(reagents.reagents_holder_flags, REFILLABLE)
to_chat(user, "<span class='notice'>You open [src], letting you fill it.</span>")
else
DISABLE_BITFIELD(reagents.reagents_holder_flags, REFILLABLE)
ENABLE_BITFIELD(reagents.reagents_holder_flags, DRAINABLE)
to_chat(user, "<span class='notice'>You close [src], letting you draw from its tap.</span>")
update_icon()
/obj/structure/fermenting_barrel/update_icon()
if(open)
icon_state = "barrel_open"
else
icon_state = "barrel"
/datum/crafting_recipe/fermenting_barrel
name = "Wooden Barrel"
result = /obj/structure/fermenting_barrel
reqs = list(/obj/item/stack/sheet/mineral/wood = 30)
time = 50
category = CAT_PRIMAL
+445
View File
@@ -0,0 +1,445 @@
/obj/machinery/plantgenes
name = "plant DNA manipulator"
desc = "An advanced device designed to manipulate plant genetic makeup."
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "dnamod"
density = TRUE
circuit = /obj/item/circuitboard/machine/plantgenes
pass_flags = PASSTABLE
var/obj/item/seeds/seed
var/obj/item/disk/plantgene/disk
var/list/core_genes = list()
var/list/reagent_genes = list()
var/list/trait_genes = list()
var/datum/plant_gene/target
var/operation = ""
var/max_potency = 50 // See RefreshParts() for how these work
var/max_yield = 2
var/min_production = 12
var/max_endurance = 10 // IMPT: ALSO AFFECTS LIFESPAN
var/min_wchance = 67
var/min_wrate = 10
/obj/machinery/plantgenes/RefreshParts() // Comments represent the max you can set per tier, respectively. seeds.dm [219] clamps these for us but we don't want to mislead the viewer.
for(var/obj/item/stock_parts/manipulator/M in component_parts)
if(M.rating > 3)
max_potency = 95
else
max_potency = initial(max_potency) + (M.rating**3) // 53,59,77,95 Clamps at 100
max_yield = initial(max_yield) + (M.rating*2) // 4,6,8,10 Clamps at 10
for(var/obj/item/stock_parts/scanning_module/SM in component_parts)
if(SM.rating > 3) //If you create t5 parts I'm a step ahead mwahahaha!
min_production = 1
else
min_production = 12 - (SM.rating * 3) //9,6,3,1. Requires if to avoid going below clamp [1]
max_endurance = initial(max_endurance) + (SM.rating * 25) // 35,60,85,100 Clamps at 10min 100max
for(var/obj/item/stock_parts/micro_laser/ML in component_parts)
var/wratemod = ML.rating * 2.5
min_wrate = FLOOR(10-wratemod,1) // 7,5,2,0 Clamps at 0 and 10 You want this low
min_wchance = 67-(ML.rating*16) // 48,35,19,3 Clamps at 0 and 67 You want this low
for(var/obj/item/circuitboard/machine/plantgenes/vaultcheck in component_parts)
if(istype(vaultcheck, /obj/item/circuitboard/machine/plantgenes/vault)) // TRAIT_DUMB BOTANY TUTS
max_potency = 100
max_yield = 10
min_production = 1
max_endurance = 100
min_wchance = 0
min_wrate = 0
/obj/machinery/plantgenes/update_icon()
..()
cut_overlays()
if((stat & (BROKEN|NOPOWER)))
icon_state = "dnamod-off"
else
icon_state = "dnamod"
if(seed)
add_overlay("dnamod-dna")
if(panel_open)
add_overlay("dnamod-open")
/obj/machinery/plantgenes/attackby(obj/item/I, mob/user, params)
if(default_deconstruction_screwdriver(user, "dnamod", "dnamod", I))
update_icon()
return
else if(default_unfasten_wrench(user, I))
return
if(default_deconstruction_crowbar(I))
return
if(iscyborg(user))
return
if(istype(I, /obj/item/seeds))
if(seed)
to_chat(user, "<span class='warning'>A sample is already loaded into the machine!</span>")
else
if(!user.temporarilyRemoveItemFromInventory(I))
return
insert_seed(I)
to_chat(user, "<span class='notice'>You add [I] to the machine.</span>")
interact(user)
return
else if(istype(I, /obj/item/disk/plantgene))
if (operation)
to_chat(user, "<span class='notice'>Please complete current operation.</span>")
return
eject_disk()
if(!user.transferItemToLoc(I, src))
return
disk = I
to_chat(user, "<span class='notice'>You add [I] to the machine.</span>")
interact(user)
else
..()
/obj/machinery/plantgenes/ui_interact(mob/user)
. = ..()
if(!user)
return
var/datum/browser/popup = new(user, "plantdna", "Plant DNA Manipulator", 450, 600)
if(!(in_range(src, user) || issilicon(user)))
popup.close()
return
var/dat = ""
if(operation)
if(!seed || (!target && operation != "insert"))
operation = ""
target = null
interact(user)
return
if((operation == "replace" || operation == "insert") && (!disk || !disk.gene))
operation = ""
target = null
interact(user)
return
dat += "<div class='line'><h3>Confirm Operation</h3></div>"
dat += "<div class='statusDisplay'>Are you sure you want to [operation] "
switch(operation)
if("remove")
dat += "<span class='highlight'>[target.get_name()]</span> gene from \the <span class='highlight'>[seed]</span>?<br>"
if("extract")
dat += "<span class='highlight'>[target.get_name()]</span> gene from \the <span class='highlight'>[seed]</span>?<br>"
dat += "<span class='bad'>The sample will be destroyed in process!</span>"
if(istype(target, /datum/plant_gene/core))
var/datum/plant_gene/core/gene = target
if(istype(target, /datum/plant_gene/core/potency))
if(gene.value > max_potency)
dat += "<br><br>This device's extraction capabilities are currently limited to <span class='highlight'>[max_potency]</span> potency. "
dat += "Target gene will be degraded to <span class='highlight'>[max_potency]</span> potency on extraction."
else if(istype(target, /datum/plant_gene/core/lifespan))
if(gene.value > max_endurance)
dat += "<br><br>This device's extraction capabilities are currently limited to <span class='highlight'>[max_endurance]</span> lifespan. "
dat += "Target gene will be degraded to <span class='highlight'>[max_endurance]</span> Lifespan on extraction."
else if(istype(target, /datum/plant_gene/core/endurance))
if(gene.value > max_endurance)
dat += "<br><br>This device's extraction capabilities are currently limited to <span class='highlight'>[max_endurance]</span> endurance. "
dat += "Target gene will be degraded to <span class='highlight'>[max_endurance]</span> endurance on extraction."
else if(istype(target, /datum/plant_gene/core/yield))
if(gene.value > max_yield)
dat += "<br><br>This device's extraction capabilities are currently limited to <span class='highlight'>[max_yield]</span> yield. "
dat += "Target gene will be degraded to <span class='highlight'>[max_yield]</span> yield on extraction."
else if(istype(target, /datum/plant_gene/core/production))
if(gene.value < min_production)
dat += "<br><br>This device's extraction capabilities are currently limited to <span class='highlight'>[min_production]</span> production. "
dat += "Target gene will be degraded to <span class='highlight'>[min_production]</span> production on extraction."
else if(istype(target, /datum/plant_gene/core/weed_rate))
if(gene.value < min_wrate)
dat += "<br><br>This device's extraction capabilities are currently limited to <span class='highlight'>[min_wrate]</span> weed rate. "
dat += "Target gene will be degraded to <span class='highlight'>[min_wrate]</span> weed rate on extraction."
else if(istype(target, /datum/plant_gene/core/weed_chance))
if(gene.value < min_wchance)
dat += "<br><br>This device's extraction capabilities are currently limited to <span class='highlight'>[min_wchance]</span> weed chance. "
dat += "Target gene will be degraded to <span class='highlight'>[min_wchance]</span> weed chance on extraction."
if("replace")
dat += "<span class='highlight'>[target.get_name()]</span> gene with <span class='highlight'>[disk.gene.get_name()]</span>?<br>"
if("insert")
dat += "<span class='highlight'>[disk.gene.get_name()]</span> gene into \the <span class='highlight'>[seed]</span>?<br>"
dat += "</div><div class='line'><a href='?src=[REF(src)];gene=[REF(target)];op=[operation]'>Confirm</a> "
dat += "<a href='?src=[REF(src)];abort=1'>Abort</a></div>"
popup.set_content(dat)
popup.open()
return
dat+= "<div class='statusDisplay'>"
dat += "<div class='line'><div class='statusLabel'>Plant Sample:</div><div class='statusValue'><a href='?src=[REF(src)];eject_seed=1'>"
dat += seed ? seed.name : "None"
dat += "</a></div></div>"
dat += "<div class='line'><div class='statusLabel'>Data Disk:</div><div class='statusValue'><a href='?src=[REF(src)];eject_disk=1'>"
if(!disk)
dat += "None"
else if(!disk.gene)
dat += "Empty Disk"
else
dat += disk.gene.get_name()
if(disk && disk.read_only)
dat += " (RO)"
dat += "</a></div></div>"
dat += "<br></div>"
if(seed)
var/can_insert = disk && disk.gene && disk.gene.can_add(seed)
var/can_extract = disk && !disk.read_only
dat += "<div class='line'><h3>Core Genes</h3></div><div class='statusDisplay'><table>"
for(var/a in core_genes)
var/datum/plant_gene/G = a
if(!G)
continue
dat += "<tr><td width='260px'>[G.get_name()]</td><td>"
if(can_extract)
dat += "<a href='?src=[REF(src)];gene=[REF(G)];op=extract'>Extract</a>"
if(can_insert && istype(disk.gene, G.type))
dat += "<a href='?src=[REF(src)];gene=[REF(G)];op=replace'>Replace</a>"
dat += "</td></tr>"
dat += "</table></div>"
if(seed.yield != -1)
dat += "<div class='line'><h3>Content Genes</h3></div><div class='statusDisplay'>"
if(reagent_genes.len)
dat += "<table>"
for(var/a in reagent_genes)
var/datum/plant_gene/G = a
dat += "<tr><td width='260px'>[G.get_name()]</td><td>"
if(can_extract)
dat += "<a href='?src=[REF(src)];gene=[REF(G)];op=extract'>Extract</a>"
dat += "<a href='?src=[REF(src)];gene=[REF(G)];op=remove'>Remove</a>"
dat += "</td></tr>"
dat += "</table>"
else
dat += "No content-related genes detected in sample.<br>"
dat += "</div>"
if(can_insert && istype(disk.gene, /datum/plant_gene/reagent))
dat += "<a href='?src=[REF(src)];op=insert'>Insert: [disk.gene.get_name()]</a>"
dat += "<div class='line'><h3>Trait Genes</h3></div><div class='statusDisplay'>"
if(trait_genes.len)
dat += "<table>"
for(var/a in trait_genes)
var/datum/plant_gene/G = a
dat += "<tr><td width='260px'>[G.get_name()]</td><td>"
if(can_extract)
dat += "<a href='?src=[REF(src)];gene=[REF(G)];op=extract'>Extract</a>"
dat += "<a href='?src=[REF(src)];gene=[REF(G)];op=remove'>Remove</a>"
dat += "</td></tr>"
dat += "</table>"
else
dat += "No trait-related genes detected in sample.<br>"
if(can_insert && istype(disk.gene, /datum/plant_gene/trait))
dat += "<a href='?src=[REF(src)];op=insert'>Insert: [disk.gene.get_name()]</a>"
dat += "</div>"
else
dat += "<br>No sample found.<br><span class='highlight'>Please, insert a plant sample to use this device.</span>"
popup.set_content(dat)
popup.open()
/obj/machinery/plantgenes/Topic(var/href, var/list/href_list)
if(..())
return
usr.set_machine(src)
if(href_list["eject_seed"] && !operation)
if (seed)
seed.forceMove(drop_location())
seed.verb_pickup()
seed = null
update_genes()
update_icon()
else
var/obj/item/I = usr.get_active_held_item()
if (istype(I, /obj/item/seeds))
if(!usr.temporarilyRemoveItemFromInventory(I))
return
insert_seed(I)
to_chat(usr, "<span class='notice'>You add [I] to the machine.</span>")
update_icon()
else if(href_list["eject_disk"] && !operation)
var/obj/item/I = usr.get_active_held_item()
eject_disk()
if(istype(I, /obj/item/disk/plantgene))
if(!usr.transferItemToLoc(I, src))
return
disk = I
to_chat(usr, "<span class='notice'>You add [I] to the machine.</span>")
else if(href_list["op"] == "insert" && disk && disk.gene && seed)
if(!operation) // Wait for confirmation
operation = "insert"
else
if(!istype(disk.gene, /datum/plant_gene/core) && disk.gene.can_add(seed))
seed.genes += disk.gene.Copy()
if(istype(disk.gene, /datum/plant_gene/reagent))
seed.reagents_from_genes()
update_genes()
repaint_seed()
operation = ""
target = null
else if(href_list["gene"] && seed)
var/datum/plant_gene/G = seed.get_gene(href_list["gene"])
if(!G || !href_list["op"] || !(href_list["op"] in list("remove", "extract", "replace")))
interact(usr)
return
if(!operation || target != G) // Wait for confirmation
target = G
operation = href_list["op"]
else if(operation == href_list["op"] && target == G)
switch(href_list["op"])
if("remove")
if(!istype(G, /datum/plant_gene/core))
seed.genes -= G
if(istype(G, /datum/plant_gene/reagent))
seed.reagents_from_genes()
repaint_seed()
if("extract")
if(disk && !disk.read_only)
disk.gene = G
if(istype(G, /datum/plant_gene/core))
var/datum/plant_gene/core/gene = G
if(istype(G, /datum/plant_gene/core/potency))
gene.value = min(gene.value, max_potency)
else if(istype(G, /datum/plant_gene/core/lifespan))
gene.value = min(gene.value, max_endurance) //INTENDED
else if(istype(G, /datum/plant_gene/core/endurance))
gene.value = min(gene.value, max_endurance)
else if(istype(G, /datum/plant_gene/core/production))
gene.value = max(gene.value, min_production)
else if(istype(G, /datum/plant_gene/core/yield))
gene.value = min(gene.value, max_yield)
else if(istype(G, /datum/plant_gene/core/weed_rate))
gene.value = max(gene.value, min_wrate)
else if(istype(G, /datum/plant_gene/core/weed_chance))
gene.value = max(gene.value, min_wchance)
disk.update_name()
qdel(seed)
seed = null
update_icon()
if("replace")
if(disk && disk.gene && istype(disk.gene, G.type) && istype(G, /datum/plant_gene/core))
seed.genes -= G
var/datum/plant_gene/core/C = disk.gene.Copy()
seed.genes += C
C.apply_stat(seed)
repaint_seed()
if("insert")
if(disk && disk.gene && !istype(disk.gene, /datum/plant_gene/core) && disk.gene.can_add(seed))
seed.genes += disk.gene.Copy()
if(istype(disk.gene, /datum/plant_gene/reagent))
seed.reagents_from_genes()
disk.gene.apply_vars(seed)
repaint_seed()
update_genes()
operation = ""
target = null
else if(href_list["abort"])
operation = ""
target = null
interact(usr)
/obj/machinery/plantgenes/proc/insert_seed(obj/item/seeds/S)
if(!istype(S) || seed)
return
S.forceMove(src)
seed = S
update_genes()
update_icon()
/obj/machinery/plantgenes/proc/eject_disk()
if (disk && !operation)
if(Adjacent(usr) && !issilicon(usr))
if (!usr.put_in_hands(disk))
disk.forceMove(drop_location())
else
disk.forceMove(drop_location())
disk = null
update_genes()
/obj/machinery/plantgenes/proc/update_genes()
core_genes = list()
reagent_genes = list()
trait_genes = list()
if(seed)
var/gene_paths = list(
/datum/plant_gene/core/potency,
/datum/plant_gene/core/yield,
/datum/plant_gene/core/production,
/datum/plant_gene/core/endurance,
/datum/plant_gene/core/lifespan,
/datum/plant_gene/core/weed_rate,
/datum/plant_gene/core/weed_chance
)
for(var/a in gene_paths)
core_genes += seed.get_gene(a)
for(var/datum/plant_gene/reagent/G in seed.genes)
reagent_genes += G
for(var/datum/plant_gene/trait/G in seed.genes)
trait_genes += G
/obj/machinery/plantgenes/proc/repaint_seed()
if(!seed)
return
if(copytext(seed.name, 1, 13) == "experimental")
return // Already modded name and icon
seed.name = "experimental " + seed.name
seed.icon_state = "seed-x"
// Gene modder for seed vault ship, built with high tech alien parts.
/obj/machinery/plantgenes/seedvault
circuit = /obj/item/circuitboard/machine/plantgenes/vault
/*
* Plant DNA disk
*/
/obj/item/disk/plantgene
name = "plant data disk"
desc = "A disk for storing plant genetic data."
icon_state = "datadisk_hydro"
materials = list(MAT_METAL=30, MAT_GLASS=10)
var/datum/plant_gene/gene
var/read_only = 0 //Well, it's still a floppy disk
obj_flags = UNIQUE_RENAME
/obj/item/disk/plantgene/Initialize()
. = ..()
add_overlay("datadisk_gene")
src.pixel_x = rand(-5, 5)
src.pixel_y = rand(-5, 5)
/obj/item/disk/plantgene/proc/update_name()
if(gene)
name = "[gene.get_name()] (plant data disk)"
else
name = "plant data disk"
/obj/item/disk/plantgene/attack_self(mob/user)
read_only = !read_only
to_chat(user, "<span class='notice'>You flip the write-protect tab to [src.read_only ? "protected" : "unprotected"].</span>")
/obj/item/disk/plantgene/examine(mob/user)
..()
if(gene && (istype(gene, /datum/plant_gene/core/potency)))
to_chat(user,"<span class='notice'>Percent is relative to potency, not maximum volume of the plant.</span>")
to_chat(user, "The write-protect tab is set to [src.read_only ? "protected" : "unprotected"].")
+169
View File
@@ -0,0 +1,169 @@
// ***********************************************************
// Foods that are produced from hydroponics ~~~~~~~~~~
// Data from the seeds carry over to these grown foods
// ***********************************************************
// Base type. Subtypes are found in /grown dir.
/obj/item/reagent_containers/food/snacks/grown
icon = 'icons/obj/hydroponics/harvest.dmi'
var/obj/item/seeds/seed = null // type path, gets converted to item on New(). It's safe to assume it's always a seed item.
var/plantname = ""
var/bitesize_mod = 0
var/splat_type = /obj/effect/decal/cleanable/plant_smudge
// If set, bitesize = 1 + round(reagents.total_volume / bitesize_mod)
dried_type = -1
// Saves us from having to define each stupid grown's dried_type as itself.
// If you don't want a plant to be driable (watermelons) set this to null in the time definition.
resistance_flags = FLAMMABLE
var/dry_grind = FALSE //If TRUE, this object needs to be dry to be ground up
var/can_distill = TRUE //If FALSE, this object cannot be distilled into an alcohol.
var/distill_reagent //If NULL and this object can be distilled, it uses a generic fruit_wine reagent and adjusts its variables.
var/wine_flavor //If NULL, this is automatically set to the fruit's flavor. Determines the flavor of the wine if distill_reagent is NULL.
var/wine_power = 10 //Determines the boozepwr of the wine if distill_reagent is NULL.
/obj/item/reagent_containers/food/snacks/grown/Initialize(mapload, obj/item/seeds/new_seed)
. = ..()
if(!tastes)
tastes = list("[name]" = 1)
if(new_seed)
seed = new_seed.Copy()
else if(ispath(seed))
// This is for adminspawn or map-placed growns. They get the default stats of their seed type.
seed = new seed()
seed.adjust_potency(50-seed.potency)
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
if(dried_type == -1)
dried_type = src.type
if(seed)
for(var/datum/plant_gene/trait/T in seed.genes)
T.on_new(src, loc)
seed.prepare_result(src)
transform *= TRANSFORM_USING_VARIABLE(seed.potency, 100) + 0.5 //Makes the resulting produce's sprite larger or smaller based on potency!
add_juice()
/obj/item/reagent_containers/food/snacks/grown/proc/add_juice()
if(reagents)
if(bitesize_mod)
bitesize = 1 + round(reagents.total_volume / bitesize_mod)
return 1
return 0
/obj/item/reagent_containers/food/snacks/grown/examine(user)
..()
if(seed)
for(var/datum/plant_gene/trait/T in seed.genes)
if(T.examine_line)
to_chat(user, T.examine_line)
/obj/item/reagent_containers/food/snacks/grown/attackby(obj/item/O, mob/user, params)
..()
if (istype(O, /obj/item/plant_analyzer))
var/msg = "<span class='info'>*---------*\n This is \a <span class='name'>[src]</span>.\n"
if(seed)
msg += seed.get_analyzer_text()
var/reag_txt = ""
if(seed)
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 += reag_txt
msg += "<br><span class='info'>*---------*</span>"
to_chat(user, msg)
else
if(seed)
for(var/datum/plant_gene/trait/T in seed.genes)
T.on_attackby(src, O, user)
// Various gene procs
/obj/item/reagent_containers/food/snacks/grown/attack_self(mob/user)
if(seed && seed.get_gene(/datum/plant_gene/trait/squash))
squash(user)
..()
/obj/item/reagent_containers/food/snacks/grown/throw_impact(atom/hit_atom)
if(!..()) //was it caught by a mob?
if(seed)
for(var/datum/plant_gene/trait/T in seed.genes)
T.on_throw_impact(src, hit_atom)
if(seed.get_gene(/datum/plant_gene/trait/squash))
squash(hit_atom)
/obj/item/reagent_containers/food/snacks/grown/proc/squash(atom/target)
var/turf/T = get_turf(target)
if(ispath(splat_type, /obj/effect/decal/cleanable/plant_smudge))
if(filling_color)
var/obj/O = new splat_type(T)
O.color = filling_color
O.name = "[name] smudge"
else if(splat_type)
new splat_type(T)
if(trash)
generate_trash(T)
visible_message("<span class='warning'>[src] has been squashed.</span>","<span class='italics'>You hear a smack.</span>")
if(seed)
for(var/datum/plant_gene/trait/trait in seed.genes)
trait.on_squash(src, target)
reagents.reaction(T)
for(var/A in T)
reagents.reaction(A)
qdel(src)
/obj/item/reagent_containers/food/snacks/grown/On_Consume()
if(iscarbon(usr))
if(seed)
for(var/datum/plant_gene/trait/T in seed.genes)
T.on_consume(src, usr)
..()
/obj/item/reagent_containers/food/snacks/grown/generate_trash(atom/location)
if(trash && ispath(trash, /obj/item/grown))
. = new trash(location, seed)
trash = null
return
return ..()
/obj/item/reagent_containers/food/snacks/grown/grind_requirements()
if(dry_grind && !dry)
to_chat(usr, "<span class='warning'>[src] needs to be dry before it can be ground up!</span>")
return
return TRUE
/obj/item/reagent_containers/food/snacks/grown/on_grind()
var/nutriment = reagents.get_reagent_amount("nutriment")
if(grind_results&&grind_results.len)
for(var/i in 1 to grind_results.len)
grind_results[grind_results[i]] = nutriment
reagents.del_reagent("nutriment")
reagents.del_reagent("vitamin")
/obj/item/reagent_containers/food/snacks/grown/on_juice()
var/nutriment = reagents.get_reagent_amount("nutriment")
if(juice_results&&juice_results.len)
for(var/i in 1 to juice_results.len)
juice_results[juice_results[i]] = nutriment
reagents.del_reagent("nutriment")
reagents.del_reagent("vitamin")
// For item-containing growns such as eggy or gatfruit
/obj/item/reagent_containers/food/snacks/grown/shell/attack_self(mob/user)
var/obj/item/T
if(trash)
T = generate_trash()
qdel(src)
user.putItemFromInventoryInHandIfPossible(T, user.active_hand_index, TRUE)
to_chat(user, "<span class='notice'>You open [src]\'s shell, revealing \a [T].</span>")
@@ -0,0 +1,79 @@
// Ambrosia - base type
/obj/item/reagent_containers/food/snacks/grown/ambrosia
seed = /obj/item/seeds/ambrosia
name = "ambrosia branch"
desc = "This is a plant."
icon_state = "ambrosiavulgaris"
slot_flags = ITEM_SLOT_HEAD
filling_color = "#008000"
bitesize_mod = 2
foodtype = VEGETABLES
tastes = list("ambrosia" = 1)
// Ambrosia Vulgaris
/obj/item/seeds/ambrosia
name = "pack of ambrosia vulgaris seeds"
desc = "These seeds grow into common ambrosia, a plant grown by and from medicine."
icon_state = "seed-ambrosiavulgaris"
species = "ambrosiavulgaris"
plantname = "Ambrosia Vulgaris"
product = /obj/item/reagent_containers/food/snacks/grown/ambrosia/vulgaris
lifespan = 60
endurance = 25
yield = 6
potency = 5
icon_dead = "ambrosia-dead"
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/ambrosia/deus)
reagents_add = list("space_drugs" = 0.15, "bicaridine" = 0.1, "kelotane" = 0.1, "vitamin" = 0.04, "nutriment" = 0.05, "toxin" = 0.1)
/obj/item/reagent_containers/food/snacks/grown/ambrosia/vulgaris
seed = /obj/item/seeds/ambrosia
name = "ambrosia vulgaris branch"
desc = "This is a plant containing various healing chemicals."
wine_power = 30
// Ambrosia Deus
/obj/item/seeds/ambrosia/deus
name = "pack of ambrosia deus seeds"
desc = "These seeds grow into ambrosia deus. Could it be the food of the gods..?"
icon_state = "seed-ambrosiadeus"
species = "ambrosiadeus"
plantname = "Ambrosia Deus"
product = /obj/item/reagent_containers/food/snacks/grown/ambrosia/deus
mutatelist = list(/obj/item/seeds/ambrosia/gaia)
reagents_add = list("omnizine" = 0.15, "synaptizine" = 0.15, "space_drugs" = 0.1, "vitamin" = 0.04, "nutriment" = 0.05)
rarity = 40
/obj/item/reagent_containers/food/snacks/grown/ambrosia/deus
seed = /obj/item/seeds/ambrosia/deus
name = "ambrosia deus branch"
desc = "Eating this makes you feel immortal!"
icon_state = "ambrosiadeus"
filling_color = "#008B8B"
wine_power = 50
//Ambrosia Gaia
/obj/item/seeds/ambrosia/gaia
name = "pack of ambrosia gaia seeds"
desc = "These seeds grow into ambrosia gaia, filled with infinite potential."
icon_state = "seed-ambrosia_gaia"
species = "ambrosia_gaia"
plantname = "Ambrosia Gaia"
product = /obj/item/reagent_containers/food/snacks/grown/ambrosia/gaia
mutatelist = list(/obj/item/seeds/ambrosia/deus)
reagents_add = list("earthsblood" = 0.05, "nutriment" = 0.06, "vitamin" = 0.05)
rarity = 30 //These are some pretty good plants right here
genes = list()
weed_rate = 4
weed_chance = 100
/obj/item/reagent_containers/food/snacks/grown/ambrosia/gaia
name = "ambrosia gaia branch"
desc = "Eating this <i>makes</i> you immortal."
icon_state = "ambrosia_gaia"
filling_color = rgb(255, 175, 0)
light_range = 3
seed = /obj/item/seeds/ambrosia/gaia
wine_power = 70
wine_flavor = "the earthmother's blessing"
+52
View File
@@ -0,0 +1,52 @@
// Apple
/obj/item/seeds/apple
name = "pack of apple seeds"
desc = "These seeds grow into apple trees."
icon_state = "seed-apple"
species = "apple"
plantname = "Apple Tree"
product = /obj/item/reagent_containers/food/snacks/grown/apple
lifespan = 55
endurance = 35
yield = 5
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
icon_grow = "apple-grow"
icon_dead = "apple-dead"
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/apple/gold)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/reagent_containers/food/snacks/grown/apple
seed = /obj/item/seeds/apple
name = "apple"
desc = "It's a little piece of Eden."
icon_state = "apple"
filling_color = "#FF4500"
bitesize = 100 // Always eat the apple in one bite
foodtype = FRUIT
juice_results = list("applejuice" = 0)
tastes = list("apple" = 1)
distill_reagent = "hcider"
// Gold Apple
/obj/item/seeds/apple/gold
name = "pack of golden apple seeds"
desc = "These seeds grow into golden apple trees. Good thing there are no firebirds in space."
icon_state = "seed-goldapple"
species = "goldapple"
plantname = "Golden Apple Tree"
product = /obj/item/reagent_containers/food/snacks/grown/apple/gold
maturation = 10
production = 10
mutatelist = list()
reagents_add = list("gold" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 40 // Alchemy!
/obj/item/reagent_containers/food/snacks/grown/apple/gold
seed = /obj/item/seeds/apple/gold
name = "golden apple"
desc = "Emblazoned upon the apple is the word 'Kallisti'."
icon_state = "goldapple"
filling_color = "#FFD700"
distill_reagent = null
wine_power = 50
+130
View File
@@ -0,0 +1,130 @@
// Banana
/obj/item/seeds/banana
name = "pack of banana seeds"
desc = "They're seeds that grow into banana trees. When grown, keep away from clown."
icon_state = "seed-banana"
species = "banana"
plantname = "Banana Tree"
product = /obj/item/reagent_containers/food/snacks/grown/banana
lifespan = 50
endurance = 30
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
icon_dead = "banana-dead"
genes = list(/datum/plant_gene/trait/slip, /datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/banana/mime, /obj/item/seeds/banana/bluespace)
reagents_add = list("banana" = 0.1, "potassium" = 0.1, "vitamin" = 0.04, "nutriment" = 0.02)
/obj/item/reagent_containers/food/snacks/grown/banana
seed = /obj/item/seeds/banana
name = "banana"
desc = "It's an excellent prop for a clown."
icon_state = "banana"
item_state = "banana"
trash = /obj/item/grown/bananapeel
filling_color = "#FFFF00"
bitesize = 5
foodtype = FRUIT
juice_results = list("banana" = 0)
distill_reagent = "bananahonk"
/obj/item/reagent_containers/food/snacks/grown/banana/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is aiming [src] at [user.p_them()]self! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(loc, 'sound/items/bikehorn.ogg', 50, 1, -1)
sleep(25)
if(!user)
return (OXYLOSS)
user.say("BANG!", forced = "banana")
sleep(25)
if(!user)
return (OXYLOSS)
user.visible_message("<B>[user]</B> laughs so hard they begin to suffocate!")
return (OXYLOSS)
//Banana Peel
/obj/item/grown/bananapeel
seed = /obj/item/seeds/banana
name = "banana peel"
desc = "A peel from a banana."
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
icon_state = "banana_peel"
item_state = "banana_peel"
w_class = WEIGHT_CLASS_TINY
throwforce = 0
throw_speed = 3
throw_range = 7
/obj/item/grown/bananapeel/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is deliberately slipping on [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(loc, 'sound/misc/slip.ogg', 50, 1, -1)
return (BRUTELOSS)
// Mimana - invisible sprites are totally a feature!
/obj/item/seeds/banana/mime
name = "pack of mimana seeds"
desc = "They're seeds that grow into mimana trees. When grown, keep away from mime."
icon_state = "seed-mimana"
species = "mimana"
plantname = "Mimana Tree"
product = /obj/item/reagent_containers/food/snacks/grown/banana/mime
growthstages = 4
mutatelist = list()
reagents_add = list("nothing" = 0.1, "mutetoxin" = 0.1, "nutriment" = 0.02)
rarity = 15
/obj/item/reagent_containers/food/snacks/grown/banana/mime
seed = /obj/item/seeds/banana/mime
name = "mimana"
desc = "It's an excellent prop for a mime."
icon_state = "mimana"
trash = /obj/item/grown/bananapeel/mimanapeel
filling_color = "#FFFFEE"
distill_reagent = "silencer"
/obj/item/grown/bananapeel/mimanapeel
seed = /obj/item/seeds/banana/mime
name = "mimana peel"
desc = "A mimana peel."
icon_state = "mimana_peel"
item_state = "mimana_peel"
// Bluespace Banana
/obj/item/seeds/banana/bluespace
name = "pack of bluespace banana seeds"
desc = "They're seeds that grow into bluespace banana trees. When grown, keep away from bluespace clown."
icon_state = "seed-banana-blue"
species = "bluespacebanana"
icon_grow = "banana-grow"
plantname = "Bluespace Banana Tree"
product = /obj/item/reagent_containers/food/snacks/grown/banana/bluespace
mutatelist = list()
genes = list(/datum/plant_gene/trait/slip, /datum/plant_gene/trait/teleport, /datum/plant_gene/trait/repeated_harvest)
reagents_add = list("bluespace" = 0.2, "banana" = 0.1, "vitamin" = 0.04, "nutriment" = 0.02)
rarity = 30
/obj/item/reagent_containers/food/snacks/grown/banana/bluespace
seed = /obj/item/seeds/banana/bluespace
name = "bluespace banana"
icon_state = "banana_blue"
item_state = "bluespace_peel"
trash = /obj/item/grown/bananapeel/bluespace
filling_color = "#0000FF"
tastes = list("banana" = 1)
wine_power = 60
wine_flavor = "slippery hypercubes"
/obj/item/grown/bananapeel/bluespace
seed = /obj/item/seeds/banana/bluespace
name = "bluespace banana peel"
desc = "A peel from a bluespace banana."
icon_state = "banana_peel_blue"
// Other
/obj/item/grown/bananapeel/specialpeel //used by /obj/item/clothing/shoes/clown_shoes/banana_shoes
name = "synthesized banana peel"
desc = "A synthetic banana peel."
/obj/item/grown/bananapeel/specialpeel/Initialize(AM)
. = ..()
AddComponent(/datum/component/slippery, 40)
+55
View File
@@ -0,0 +1,55 @@
// Soybeans
/obj/item/seeds/soya
name = "pack of soybean seeds"
desc = "These seeds grow into soybean plants."
icon_state = "seed-soybean"
species = "soybean"
plantname = "Soybean Plants"
product = /obj/item/reagent_containers/food/snacks/grown/soybeans
maturation = 4
production = 4
potency = 15
growthstages = 4
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
icon_grow = "soybean-grow"
icon_dead = "soybean-dead"
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/soya/koi)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.05, "cooking_oil" = 0.03) //Vegetable oil!
/obj/item/reagent_containers/food/snacks/grown/soybeans
seed = /obj/item/seeds/soya
name = "soybeans"
desc = "It's pretty bland, but oh the possibilities..."
gender = PLURAL
icon_state = "soybeans"
filling_color = "#F0E68C"
bitesize_mod = 2
foodtype = VEGETABLES
grind_results = list("soymilk" = 0)
tastes = list("soy" = 1)
wine_power = 20
// Koibean
/obj/item/seeds/soya/koi
name = "pack of koibean seeds"
desc = "These seeds grow into koibean plants."
icon_state = "seed-koibean"
species = "koibean"
plantname = "Koibean Plants"
product = /obj/item/reagent_containers/food/snacks/grown/koibeans
potency = 10
mutatelist = list()
reagents_add = list("carpotoxin" = 0.1, "vitamin" = 0.04, "nutriment" = 0.05)
rarity = 20
/obj/item/reagent_containers/food/snacks/grown/koibeans
seed = /obj/item/seeds/soya/koi
name = "koibean"
desc = "Something about these seems fishy."
icon_state = "koibeans"
filling_color = "#F0E68C"
bitesize_mod = 2
foodtype = VEGETABLES
tastes = list("koi" = 1)
wine_power = 40
+236
View File
@@ -0,0 +1,236 @@
// Berries
/obj/item/seeds/berry
name = "pack of berry seeds"
desc = "These seeds grow into berry bushes."
icon_state = "seed-berry"
species = "berry"
plantname = "Berry Bush"
product = /obj/item/reagent_containers/food/snacks/grown/berries
lifespan = 20
maturation = 5
production = 5
yield = 2
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
icon_grow = "berry-grow" // Uses one growth icons set for all the subtypes
icon_dead = "berry-dead" // Same for the dead icon
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/berry/glow, /obj/item/seeds/berry/poison)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/reagent_containers/food/snacks/grown/berries
seed = /obj/item/seeds/berry
name = "bunch of berries"
desc = "Nutritious!"
icon_state = "berrypile"
gender = PLURAL
filling_color = "#FF00FF"
bitesize_mod = 2
foodtype = FRUIT
juice_results = list("berryjuice" = 0)
tastes = list("berry" = 1)
distill_reagent = "gin"
// Poison Berries
/obj/item/seeds/berry/poison
name = "pack of poison-berry seeds"
desc = "These seeds grow into poison-berry bushes."
icon_state = "seed-poisonberry"
species = "poisonberry"
plantname = "Poison-Berry Bush"
product = /obj/item/reagent_containers/food/snacks/grown/berries/poison
mutatelist = list(/obj/item/seeds/berry/death)
reagents_add = list("cyanide" = 0.15, "tirizene" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 10 // Mildly poisonous berries are common in reality
/obj/item/reagent_containers/food/snacks/grown/berries/poison
seed = /obj/item/seeds/berry/poison
name = "bunch of poison-berries"
desc = "Taste so good, you might die!"
icon_state = "poisonberrypile"
filling_color = "#C71585"
foodtype = FRUIT | TOXIC
juice_results = list("poisonberryjuice" = 0)
tastes = list("poison-berry" = 1)
distill_reagent = null
wine_power = 35
// Death Berries
/obj/item/seeds/berry/death
name = "pack of death-berry seeds"
desc = "These seeds grow into death berries."
icon_state = "seed-deathberry"
species = "deathberry"
plantname = "Death Berry Bush"
product = /obj/item/reagent_containers/food/snacks/grown/berries/death
lifespan = 30
potency = 50
mutatelist = list()
reagents_add = list("coniine" = 0.08, "tirizene" = 0.1, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 30
/obj/item/reagent_containers/food/snacks/grown/berries/death
seed = /obj/item/seeds/berry/death
name = "bunch of death-berries"
desc = "Taste so good, you will die!"
icon_state = "deathberrypile"
filling_color = "#708090"
foodtype = FRUIT | TOXIC
tastes = list("death-berry" = 1)
distill_reagent = null
wine_power = 50
// Glow Berries
/obj/item/seeds/berry/glow
name = "pack of glow-berry seeds"
desc = "These seeds grow into glow-berry bushes."
icon_state = "seed-glowberry"
species = "glowberry"
plantname = "Glow-Berry Bush"
product = /obj/item/reagent_containers/food/snacks/grown/berries/glow
lifespan = 30
endurance = 25
mutatelist = list()
genes = list(/datum/plant_gene/trait/glow/berry , /datum/plant_gene/trait/noreact, /datum/plant_gene/trait/repeated_harvest)
reagents_add = list("uranium" = 0.25, "iodine" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 20
/obj/item/reagent_containers/food/snacks/grown/berries/glow
seed = /obj/item/seeds/berry/glow
name = "bunch of glow-berries"
desc = "Nutritious!"
icon_state = "glowberrypile"
filling_color = "#7CFC00"
foodtype = FRUIT
tastes = list("glow-berry" = 1)
distill_reagent = null
wine_power = 60
// Cherries
/obj/item/seeds/cherry
name = "pack of cherry pits"
desc = "Careful not to crack a tooth on one... That'd be the pits."
icon_state = "seed-cherry"
species = "cherry"
plantname = "Cherry Tree"
product = /obj/item/reagent_containers/food/snacks/grown/cherries
lifespan = 35
endurance = 35
maturation = 5
production = 5
growthstages = 5
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
icon_grow = "cherry-grow"
icon_dead = "cherry-dead"
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/cherry/blue)
reagents_add = list("nutriment" = 0.07, "sugar" = 0.07)
/obj/item/reagent_containers/food/snacks/grown/cherries
seed = /obj/item/seeds/cherry
name = "cherries"
desc = "Great for toppings!"
icon_state = "cherry"
gender = PLURAL
filling_color = "#FF0000"
bitesize_mod = 2
foodtype = FRUIT
grind_results = list("cherryjelly" = 0)
tastes = list("cherry" = 1)
wine_power = 30
// Blue Cherries
/obj/item/seeds/cherry/blue
name = "pack of blue cherry pits"
desc = "The blue kind of cherries."
icon_state = "seed-bluecherry"
species = "bluecherry"
plantname = "Blue Cherry Tree"
product = /obj/item/reagent_containers/food/snacks/grown/bluecherries
mutatelist = list()
reagents_add = list("nutriment" = 0.07, "sugar" = 0.07)
rarity = 10
/obj/item/reagent_containers/food/snacks/grown/bluecherries
seed = /obj/item/seeds/cherry/blue
name = "blue cherries"
desc = "They're cherries that are blue."
icon_state = "bluecherry"
filling_color = "#6495ED"
bitesize_mod = 2
foodtype = FRUIT
grind_results = list("bluecherryjelly" = 0)
tastes = list("blue cherry" = 1)
wine_power = 50
// Grapes
/obj/item/seeds/grape
name = "pack of grape seeds"
desc = "These seeds grow into grape vines."
icon_state = "seed-grapes"
species = "grape"
plantname = "Grape Vine"
product = /obj/item/reagent_containers/food/snacks/grown/grapes
lifespan = 50
endurance = 25
maturation = 3
production = 5
yield = 4
growthstages = 2
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
icon_grow = "grape-grow"
icon_dead = "grape-dead"
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/grape/green)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1, "sugar" = 0.1)
/obj/item/reagent_containers/food/snacks/grown/grapes
seed = /obj/item/seeds/grape
name = "bunch of grapes"
desc = "Nutritious!"
icon_state = "grapes"
dried_type = /obj/item/reagent_containers/food/snacks/no_raisin/healthy
filling_color = "#FF1493"
bitesize_mod = 2
foodtype = FRUIT
juice_results = list("grapejuice" = 0)
tastes = list("grape" = 1)
distill_reagent = "wine"
// Green Grapes
/obj/item/seeds/grape/green
name = "pack of green grape seeds"
desc = "These seeds grow into green-grape vines."
icon_state = "seed-greengrapes"
species = "greengrape"
plantname = "Green-Grape Vine"
product = /obj/item/reagent_containers/food/snacks/grown/grapes/green
reagents_add = list("kelotane" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1, "sugar" = 0.1)
// No rarity: technically it's a beneficial mutant, but it's not exactly "new"...
mutatelist = list()
/obj/item/reagent_containers/food/snacks/grown/grapes/green
seed = /obj/item/seeds/grape/green
name = "bunch of green grapes"
icon_state = "greengrapes"
filling_color = "#7FFF00"
tastes = list("green grape" = 1)
distill_reagent = "cognac"
// Strawberry
/obj/item/seeds/strawberry
name = "pack of strawberry seeds"
desc = "These seeds grow into strawberry vines."
icon_state = "seed-strawberry"
species = "strawberry"
plantname = "Strawberry Vine"
product = /obj/item/reagent_containers/food/snacks/grown/strawberry
reagents_add = list("vitamin" = 0.07, "nutriment" = 0.1, "sugar" = 0.2)
mutatelist = list()
/obj/item/reagent_containers/food/snacks/grown/strawberry
seed = /obj/item/seeds/strawberry
name = "strawberry"
icon_state = "strawberry"
filling_color = "#7FFF00"
tastes = list("strawberries" = 1)
wine_power = 20
+124
View File
@@ -0,0 +1,124 @@
// Cannabis
/obj/item/seeds/cannabis
name = "pack of cannabis seeds"
desc = "Taxable."
icon_state = "seed-cannabis"
species = "cannabis"
plantname = "Cannabis Plant"
product = /obj/item/reagent_containers/food/snacks/grown/cannabis
maturation = 8
potency = 20
growthstages = 1
growing_icon = 'goon/icons/obj/hydroponics.dmi'
icon_grow = "cannabis-grow" // Uses one growth icons set for all the subtypes
icon_dead = "cannabis-dead" // Same for the dead icon
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/cannabis/rainbow,
/obj/item/seeds/cannabis/death,
/obj/item/seeds/cannabis/white,
/obj/item/seeds/cannabis/ultimate)
reagents_add = list("space_drugs" = 0.15, "lipolicide" = 0.35) // gives u the munchies
/obj/item/seeds/cannabis/rainbow
name = "pack of rainbow weed seeds"
desc = "These seeds grow into rainbow weed. Groovy."
icon_state = "seed-megacannabis"
species = "megacannabis"
plantname = "Rainbow Weed"
product = /obj/item/reagent_containers/food/snacks/grown/cannabis/rainbow
mutatelist = list()
reagents_add = list("mindbreaker" = 0.15, "lipolicide" = 0.35)
rarity = 40
/obj/item/seeds/cannabis/death
name = "pack of deathweed seeds"
desc = "These seeds grow into deathweed. Not groovy."
icon_state = "seed-blackcannabis"
species = "blackcannabis"
plantname = "Deathweed"
product = /obj/item/reagent_containers/food/snacks/grown/cannabis/death
mutatelist = list()
reagents_add = list("cyanide" = 0.35, "space_drugs" = 0.15, "lipolicide" = 0.15)
rarity = 40
/obj/item/seeds/cannabis/white
name = "pack of lifeweed seeds"
desc = "I will give unto him that is munchies of the fountain of the cravings of life, freely."
icon_state = "seed-whitecannabis"
species = "whitecannabis"
plantname = "Lifeweed"
product = /obj/item/reagent_containers/food/snacks/grown/cannabis/white
mutatelist = list()
reagents_add = list("omnizine" = 0.35, "space_drugs" = 0.15, "lipolicide" = 0.15)
rarity = 40
/obj/item/seeds/cannabis/ultimate
name = "pack of omega weed seeds"
desc = "These seeds grow into omega weed."
icon_state = "seed-ocannabis"
species = "ocannabis"
plantname = "Omega Weed"
product = /obj/item/reagent_containers/food/snacks/grown/cannabis/ultimate
mutatelist = list()
reagents_add = list("space_drugs" = 0.3,
"mindbreaker" = 0.3,
"mercury" = 0.15,
"lithium" = 0.15,
"atropine" = 0.15,
"haloperidol" = 0.15,
"methamphetamine" = 0.15,
"capsaicin" = 0.15,
"barbers_aid" = 0.15,
"bath_salts" = 0.15,
"itching_powder" = 0.15,
"crank" = 0.15,
"krokodil" = 0.15,
"histamine" = 0.15,
"lipolicide" = 0.15)
rarity = 69
// ---------------------------------------------------------------
/obj/item/reagent_containers/food/snacks/grown/cannabis
seed = /obj/item/seeds/cannabis
icon = 'goon/icons/obj/hydroponics.dmi'
name = "cannabis leaf"
desc = "Recently legalized in most galaxies."
icon_state = "cannabis"
filling_color = "#00FF00"
bitesize_mod = 2
foodtype = VEGETABLES //i dont really know what else weed could be to be honest
tastes = list("cannabis" = 1)
wine_power = 20
/obj/item/reagent_containers/food/snacks/grown/cannabis/rainbow
seed = /obj/item/seeds/cannabis/rainbow
name = "rainbow cannabis leaf"
desc = "Is it supposed to be glowing like that...?"
icon_state = "megacannabis"
wine_power = 60
/obj/item/reagent_containers/food/snacks/grown/cannabis/death
seed = /obj/item/seeds/cannabis/death
name = "death cannabis leaf"
desc = "Looks a bit dark. Oh well."
icon_state = "blackcannabis"
wine_power = 40
/obj/item/reagent_containers/food/snacks/grown/cannabis/white
seed = /obj/item/seeds/cannabis/white
name = "white cannabis leaf"
desc = "It feels smooth and nice to the touch."
icon_state = "whitecannabis"
wine_power = 10
/obj/item/reagent_containers/food/snacks/grown/cannabis/ultimate
seed = /obj/item/seeds/cannabis/ultimate
name = "omega cannabis leaf"
desc = "You feel dizzy looking at it. What the fuck?"
icon_state = "ocannabis"
volume = 420
wine_power = 90
+105
View File
@@ -0,0 +1,105 @@
// Wheat
/obj/item/seeds/wheat
name = "pack of wheat seeds"
desc = "These may, or may not, grow into wheat."
icon_state = "seed-wheat"
species = "wheat"
plantname = "Wheat Stalks"
product = /obj/item/reagent_containers/food/snacks/grown/wheat
production = 1
yield = 4
potency = 15
icon_dead = "wheat-dead"
mutatelist = list(/obj/item/seeds/wheat/oat, /obj/item/seeds/wheat/meat)
reagents_add = list("nutriment" = 0.04)
/obj/item/reagent_containers/food/snacks/grown/wheat
seed = /obj/item/seeds/wheat
name = "wheat"
desc = "Sigh... wheat... a-grain?"
gender = PLURAL
icon_state = "wheat"
filling_color = "#F0E68C"
bitesize_mod = 2
foodtype = GRAIN
grind_results = list("flour" = 0)
tastes = list("wheat" = 1)
distill_reagent = "beer"
// Oat
/obj/item/seeds/wheat/oat
name = "pack of oat seeds"
desc = "These may, or may not, grow into oat."
icon_state = "seed-oat"
species = "oat"
plantname = "Oat Stalks"
product = /obj/item/reagent_containers/food/snacks/grown/oat
mutatelist = list()
/obj/item/reagent_containers/food/snacks/grown/oat
seed = /obj/item/seeds/wheat/oat
name = "oat"
desc = "Eat oats, do squats."
gender = PLURAL
icon_state = "oat"
filling_color = "#556B2F"
bitesize_mod = 2
foodtype = GRAIN
grind_results = list("flour" = 0)
tastes = list("oat" = 1)
distill_reagent = "ale"
// Rice
/obj/item/seeds/wheat/rice
name = "pack of rice seeds"
desc = "These may, or may not, grow into rice."
icon_state = "seed-rice"
species = "rice"
plantname = "Rice Stalks"
product = /obj/item/reagent_containers/food/snacks/grown/rice
mutatelist = list()
growthstages = 3
/obj/item/reagent_containers/food/snacks/grown/rice
seed = /obj/item/seeds/wheat/rice
name = "rice"
desc = "Rice to meet you."
gender = PLURAL
icon_state = "rice"
filling_color = "#FAFAD2"
bitesize_mod = 2
foodtype = GRAIN
grind_results = list("rice" = 0)
tastes = list("rice" = 1)
distill_reagent = "sake"
//Meatwheat - grows into synthetic meat
/obj/item/seeds/wheat/meat
name = "pack of meatwheat seeds"
desc = "If you ever wanted to drive a vegetarian to insanity, here's how."
icon_state = "seed-meatwheat"
species = "meatwheat"
plantname = "Meatwheat"
product = /obj/item/reagent_containers/food/snacks/grown/meatwheat
mutatelist = list()
/obj/item/reagent_containers/food/snacks/grown/meatwheat
name = "meatwheat"
desc = "Some blood-drenched wheat stalks. You can crush them into what passes for meat if you squint hard enough."
icon_state = "meatwheat"
gender = PLURAL
filling_color = rgb(150, 0, 0)
bitesize_mod = 2
seed = /obj/item/seeds/wheat/meat
foodtype = MEAT | GRAIN
grind_results = list("flour" = 0, "blood" = 0)
tastes = list("meatwheat" = 1)
can_distill = FALSE
/obj/item/reagent_containers/food/snacks/grown/meatwheat/attack_self(mob/living/user)
user.visible_message("<span class='notice'>[user] crushes [src] into meat.</span>", "<span class='notice'>You crush [src] into something that resembles meat.</span>")
playsound(user, 'sound/effects/blobattack.ogg', 50, 1)
var/obj/item/reagent_containers/food/snacks/meat/slab/meatwheat/M = new
qdel(src)
user.put_in_hands(M)
return 1
+101
View File
@@ -0,0 +1,101 @@
// Chili
/obj/item/seeds/chili
name = "pack of chili seeds"
desc = "These seeds grow into chili plants. HOT! HOT! HOT!"
icon_state = "seed-chili"
species = "chili"
plantname = "Chili Plants"
product = /obj/item/reagent_containers/food/snacks/grown/chili
lifespan = 20
maturation = 5
production = 5
yield = 4
potency = 20
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
icon_grow = "chili-grow" // Uses one growth icons set for all the subtypes
icon_dead = "chili-dead" // Same for the dead icon
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/chili/ice, /obj/item/seeds/chili/ghost)
reagents_add = list("capsaicin" = 0.25, "vitamin" = 0.04, "nutriment" = 0.04)
/obj/item/reagent_containers/food/snacks/grown/chili
seed = /obj/item/seeds/chili
name = "chili"
desc = "It's spicy! Wait... IT'S BURNING ME!!"
icon_state = "chilipepper"
filling_color = "#FF0000"
bitesize_mod = 2
foodtype = FRUIT
wine_power = 20
// Ice Chili
/obj/item/seeds/chili/ice
name = "pack of ice pepper seeds"
desc = "These seeds grow into ice pepper plants."
icon_state = "seed-icepepper"
species = "chiliice"
plantname = "Ice Pepper Plants"
product = /obj/item/reagent_containers/food/snacks/grown/icepepper
lifespan = 25
maturation = 4
production = 4
rarity = 20
mutatelist = list()
reagents_add = list("frostoil" = 0.25, "vitamin" = 0.02, "nutriment" = 0.02)
/obj/item/reagent_containers/food/snacks/grown/icepepper
seed = /obj/item/seeds/chili/ice
name = "ice pepper"
desc = "It's a mutant strain of chili."
icon_state = "icepepper"
filling_color = "#0000CD"
bitesize_mod = 2
foodtype = FRUIT
wine_power = 30
// Ghost Chili
/obj/item/seeds/chili/ghost
name = "pack of ghost chili seeds"
desc = "These seeds grow into a chili said to be the hottest in the galaxy."
icon_state = "seed-chilighost"
species = "chilighost"
plantname = "Ghost Chili Plants"
product = /obj/item/reagent_containers/food/snacks/grown/ghost_chili
endurance = 10
maturation = 10
production = 10
yield = 3
rarity = 20
mutatelist = list()
reagents_add = list("condensedcapsaicin" = 0.3, "capsaicin" = 0.55, "nutriment" = 0.04)
/obj/item/reagent_containers/food/snacks/grown/ghost_chili
seed = /obj/item/seeds/chili/ghost
name = "ghost chili"
desc = "It seems to be vibrating gently."
icon_state = "ghostchilipepper"
var/mob/living/carbon/human/held_mob
filling_color = "#F8F8FF"
bitesize_mod = 4
foodtype = FRUIT
wine_power = 50
/obj/item/reagent_containers/food/snacks/grown/ghost_chili/attack_hand(mob/user)
. = ..()
if(.)
return
if( ismob(loc) )
held_mob = loc
START_PROCESSING(SSobj, src)
/obj/item/reagent_containers/food/snacks/grown/ghost_chili/process()
if(held_mob && loc == held_mob)
if(held_mob.is_holding(src))
if(istype(held_mob) && held_mob.gloves)
return
held_mob.adjust_bodytemperature(15 * TEMPERATURE_DAMAGE_COEFFICIENT)
if(prob(10))
to_chat(held_mob, "<span class='warning'>Your hand holding [src] burns!</span>")
else
held_mob = null
..()
+162
View File
@@ -0,0 +1,162 @@
// Citrus - base type
/obj/item/reagent_containers/food/snacks/grown/citrus
seed = /obj/item/seeds/lime
name = "citrus"
desc = "It's so sour, your face will twist."
icon_state = "lime"
bitesize_mod = 2
foodtype = FRUIT
wine_power = 30
// Lime
/obj/item/seeds/lime
name = "pack of lime seeds"
desc = "These are very sour seeds."
icon_state = "seed-lime"
species = "lime"
plantname = "Lime Tree"
product = /obj/item/reagent_containers/food/snacks/grown/citrus/lime
lifespan = 55
endurance = 50
yield = 4
potency = 15
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/orange)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.05)
/obj/item/reagent_containers/food/snacks/grown/citrus/lime
seed = /obj/item/seeds/lime
name = "lime"
desc = "It's so sour, your face will twist."
icon_state = "lime"
filling_color = "#00FF00"
juice_results = list("limejuice" = 0)
// Orange
/obj/item/seeds/orange
name = "pack of orange seeds"
desc = "Sour seeds."
icon_state = "seed-orange"
species = "orange"
plantname = "Orange Tree"
product = /obj/item/reagent_containers/food/snacks/grown/citrus/orange
lifespan = 60
endurance = 50
yield = 5
potency = 20
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
icon_grow = "lime-grow"
icon_dead = "lime-dead"
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/lime)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.05)
/obj/item/reagent_containers/food/snacks/grown/citrus/orange
seed = /obj/item/seeds/orange
name = "orange"
desc = "It's a tangy fruit."
icon_state = "orange"
filling_color = "#FFA500"
juice_results = list("orangejuice" = 0)
distill_reagent = "triple_sec"
// Lemon
/obj/item/seeds/lemon
name = "pack of lemon seeds"
desc = "These are sour seeds."
icon_state = "seed-lemon"
species = "lemon"
plantname = "Lemon Tree"
product = /obj/item/reagent_containers/food/snacks/grown/citrus/lemon
lifespan = 55
endurance = 45
yield = 4
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
icon_grow = "lime-grow"
icon_dead = "lime-dead"
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/firelemon)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.05)
/obj/item/reagent_containers/food/snacks/grown/citrus/lemon
seed = /obj/item/seeds/lemon
name = "lemon"
desc = "When life gives you lemons, make lemonade."
icon_state = "lemon"
filling_color = "#FFD700"
juice_results = list("lemonjuice" = 0)
// Combustible lemon
/obj/item/seeds/firelemon //combustible lemon is too long so firelemon
name = "pack of combustible lemon seeds"
desc = "When life gives you lemons, don't make lemonade. Make life take the lemons back! Get mad! I don't want your damn lemons!"
icon_state = "seed-firelemon"
species = "firelemon"
plantname = "Combustible Lemon Tree"
product = /obj/item/reagent_containers/food/snacks/grown/firelemon
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
icon_grow = "lime-grow"
icon_dead = "lime-dead"
genes = list(/datum/plant_gene/trait/repeated_harvest)
lifespan = 55
endurance = 45
yield = 4
reagents_add = list("nutriment" = 0.05)
/obj/item/reagent_containers/food/snacks/grown/firelemon
seed = /obj/item/seeds/firelemon
name = "Combustible Lemon"
desc = "Made for burning houses down."
icon_state = "firelemon"
bitesize_mod = 2
foodtype = FRUIT
wine_power = 70
/obj/item/reagent_containers/food/snacks/grown/firelemon/attack_self(mob/living/user)
user.visible_message("<span class='warning'>[user] primes [src]!</span>", "<span class='userdanger'>You prime [src]!</span>")
var/message = "[ADMIN_LOOKUPFLW(user)] primed a combustible lemon for detonation at [ADMIN_VERBOSEJMP(user)]"
GLOB.bombers += message
message_admins(message)
log_game("[key_name(user)] primed a combustible lemon for detonation at [AREACOORD(user)].")
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
icon_state = "firelemon_active"
playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
addtimer(CALLBACK(src, .proc/prime), rand(10, 60))
/obj/item/reagent_containers/food/snacks/grown/firelemon/burn()
prime()
..()
/obj/item/reagent_containers/food/snacks/grown/firelemon/proc/update_mob()
if(ismob(loc))
var/mob/M = loc
M.dropItemToGround(src)
/obj/item/reagent_containers/food/snacks/grown/firelemon/ex_act(severity)
qdel(src) //Ensuring that it's deleted by its own explosion
/obj/item/reagent_containers/food/snacks/grown/firelemon/proc/prime()
switch(seed.potency) //Combustible lemons are alot like IEDs, lots of flame, very little bang.
if(0 to 30)
update_mob()
explosion(src.loc,-1,-1,2, flame_range = 1)
qdel(src)
if(31 to 50)
update_mob()
explosion(src.loc,-1,-1,2, flame_range = 2)
qdel(src)
if(51 to 70)
update_mob()
explosion(src.loc,-1,-1,2, flame_range = 3)
qdel(src)
if(71 to 90)
update_mob()
explosion(src.loc,-1,-1,2, flame_range = 4)
qdel(src)
else
update_mob()
explosion(src.loc,-1,-1,2, flame_range = 5)
qdel(src)
@@ -0,0 +1,52 @@
// Cocoa Pod
/obj/item/seeds/cocoapod
name = "pack of cocoa pod seeds"
desc = "These seeds grow into cacao trees. They look fattening." //SIC: cocoa is the seeds. The trees are spelled cacao.
icon_state = "seed-cocoapod"
species = "cocoapod"
plantname = "Cocao Tree"
product = /obj/item/reagent_containers/food/snacks/grown/cocoapod
lifespan = 20
maturation = 5
production = 5
yield = 2
growthstages = 5
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
icon_grow = "cocoapod-grow"
icon_dead = "cocoapod-dead"
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/cocoapod/vanillapod)
reagents_add = list("cocoa" = 0.25, "nutriment" = 0.1)
/obj/item/reagent_containers/food/snacks/grown/cocoapod
seed = /obj/item/seeds/cocoapod
name = "cocoa pod"
desc = "Fattening... Mmmmm... chucklate."
icon_state = "cocoapod"
filling_color = "#FFD700"
bitesize_mod = 2
foodtype = FRUIT
tastes = list("cocoa" = 1)
distill_reagent = "creme_de_cacao"
// Vanilla Pod
/obj/item/seeds/cocoapod/vanillapod
name = "pack of vanilla pod seeds"
desc = "These seeds grow into vanilla trees. They look fattening."
icon_state = "seed-vanillapod"
species = "vanillapod"
plantname = "Vanilla Tree"
product = /obj/item/reagent_containers/food/snacks/grown/vanillapod
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list()
reagents_add = list("vanilla" = 0.25, "nutriment" = 0.1)
/obj/item/reagent_containers/food/snacks/grown/vanillapod
seed = /obj/item/seeds/cocoapod/vanillapod
name = "vanilla pod"
desc = "Fattening... Mmmmm... vanilla."
icon_state = "vanillapod"
filling_color = "#FFD700"
foodtype = FRUIT
tastes = list("vanilla" = 1)
distill_reagent = "vanilla" //Takes longer, but you can get even more vanilla from it.
+86
View File
@@ -0,0 +1,86 @@
// Corn
/obj/item/seeds/corn
name = "pack of corn seeds"
desc = "I don't mean to sound corny..."
icon_state = "seed-corn"
species = "corn"
plantname = "Corn Stalks"
product = /obj/item/reagent_containers/food/snacks/grown/corn
maturation = 8
potency = 20
growthstages = 3
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
icon_grow = "corn-grow" // Uses one growth icons set for all the subtypes
icon_dead = "corn-dead" // Same for the dead icon
mutatelist = list(/obj/item/seeds/corn/snapcorn)
reagents_add = list("cornoil" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/reagent_containers/food/snacks/grown/corn
seed = /obj/item/seeds/corn
name = "ear of corn"
desc = "Needs some butter!"
icon_state = "corn"
cooked_type = /obj/item/reagent_containers/food/snacks/popcorn
filling_color = "#FFFF00"
trash = /obj/item/grown/corncob
bitesize_mod = 2
foodtype = VEGETABLES
juice_results = list("corn_starch" = 0)
tastes = list("corn" = 1)
distill_reagent = "whiskey"
/obj/item/grown/corncob
name = "corn cob"
desc = "A reminder of meals gone by."
icon_state = "corncob"
item_state = "corncob"
w_class = WEIGHT_CLASS_TINY
throwforce = 0
throw_speed = 3
throw_range = 7
/obj/item/grown/corncob/attackby(obj/item/grown/W, mob/user, params)
if(W.is_sharp())
to_chat(user, "<span class='notice'>You use [W] to fashion a pipe out of the corn cob!</span>")
new /obj/item/clothing/mask/cigarette/pipe/cobpipe (user.loc)
qdel(src)
else
return ..()
// Snapcorn
/obj/item/seeds/corn/snapcorn
name = "pack of snapcorn seeds"
desc = "Oh snap!"
icon_state = "seed-snapcorn"
species = "snapcorn"
plantname = "Snapcorn Stalks"
product = /obj/item/grown/snapcorn
mutatelist = list()
rarity = 10
/obj/item/grown/snapcorn
seed = /obj/item/seeds/corn/snapcorn
name = "snap corn"
desc = "A cob with snap pops."
icon_state = "snapcorn"
item_state = "corncob"
w_class = WEIGHT_CLASS_TINY
throwforce = 0
throw_speed = 3
throw_range = 7
var/snap_pops = 1
/obj/item/grown/snapcorn/add_juice()
..()
snap_pops = max(round(seed.potency/8), 1)
/obj/item/grown/snapcorn/attack_self(mob/user)
..()
to_chat(user, "<span class='notice'>You pick a snap pop from the cob.</span>")
var/obj/item/toy/snappop/S = new /obj/item/toy/snappop(user.loc)
if(ishuman(user))
user.put_in_hands(S)
snap_pops -= 1
if(!snap_pops)
new /obj/item/grown/corncob(user.loc)
qdel(src)
+79
View File
@@ -0,0 +1,79 @@
/obj/item/seeds/cotton
name = "pack of cotton seeds"
desc = "A pack of seeds that'll grow into a cotton plant. Assistants make good free labor if neccesary."
icon_state = "seed-cotton"
species = "cotton"
plantname = "Cotton"
icon_harvest = "cotton-harvest"
product = /obj/item/grown/cotton
lifespan = 35
endurance = 25
maturation = 15
production = 1
yield = 2
potency = 50
growthstages = 3
growing_icon = 'icons/obj/hydroponics/growing.dmi'
icon_dead = "cotton-dead"
mutatelist = list(/obj/item/seeds/cotton/durathread)
/obj/item/grown/cotton
seed = /obj/item/seeds/cotton
name = "cotton bundle"
desc = "A fluffy bundle of cotton."
icon_state = "cotton"
force = 0
throwforce = 0
w_class = WEIGHT_CLASS_TINY
throw_speed = 2
throw_range = 3
attack_verb = list("pomfed")
var/cotton_type = /obj/item/stack/sheet/cotton
var/cotton_name = "raw cotton"
/obj/item/grown/cotton/attack_self(mob/user)
user.show_message("<span class='notice'>You pull some [cotton_name] out of the [name]!</span>", 1)
var/seed_modifier = 0
if(seed)
seed_modifier = round(seed.potency / 25)
var/obj/item/stack/cotton = new cotton_type(user.loc, 1 + seed_modifier)
var/old_cotton_amount = cotton.amount
for(var/obj/item/stack/ST in user.loc)
if(ST != cotton && istype(ST, cotton_type) && ST.amount < ST.max_amount)
ST.attackby(cotton, user)
if(cotton.amount > old_cotton_amount)
to_chat(user, "<span class='notice'>You add the newly-formed [cotton_name] to the stack. It now contains [cotton.amount] [cotton_name].</span>")
qdel(src)
//reinforced mutated variant
/obj/item/seeds/cotton/durathread
name = "pack of durathread seeds"
desc = "A pack of seeds that'll grow into an extremely durable thread that could easily rival plasteel if woven properly."
icon_state = "seed-durathread"
species = "durathread"
plantname = "Durathread"
icon_harvest = "durathread-harvest"
product = /obj/item/grown/cotton/durathread
lifespan = 80
endurance = 50
maturation = 15
production = 1
yield = 2
potency = 50
growthstages = 3
growing_icon = 'icons/obj/hydroponics/growing.dmi'
icon_dead = "cotton-dead"
/obj/item/grown/cotton/durathread
seed = /obj/item/seeds/cotton/durathread
name = "durathread bundle"
desc = "A tough bundle of durathread, good luck unraveling this."
icon_state = "durathread"
force = 5
throwforce = 5
w_class = WEIGHT_CLASS_NORMAL
throw_speed = 2
throw_range = 3
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
cotton_type = /obj/item/stack/sheet/cotton/durathread
cotton_name = "raw durathread"
@@ -0,0 +1,50 @@
// Eggplant
/obj/item/seeds/eggplant
name = "pack of eggplant seeds"
desc = "These seeds grow to produce berries that look nothing like eggs."
icon_state = "seed-eggplant"
species = "eggplant"
plantname = "Eggplants"
product = /obj/item/reagent_containers/food/snacks/grown/eggplant
yield = 2
potency = 20
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
icon_grow = "eggplant-grow"
icon_dead = "eggplant-dead"
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/eggplant/eggy)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/reagent_containers/food/snacks/grown/eggplant
seed = /obj/item/seeds/eggplant
name = "eggplant"
desc = "Maybe there's a chicken inside?"
icon_state = "eggplant"
filling_color = "#800080"
bitesize_mod = 2
foodtype = FRUIT
wine_power = 20
// Egg-Plant
/obj/item/seeds/eggplant/eggy
name = "pack of egg-plant seeds"
desc = "These seeds grow to produce berries that look a lot like eggs."
icon_state = "seed-eggy"
species = "eggy"
plantname = "Egg-Plants"
product = /obj/item/reagent_containers/food/snacks/grown/shell/eggy
lifespan = 75
production = 12
mutatelist = list()
reagents_add = list("nutriment" = 0.1)
/obj/item/reagent_containers/food/snacks/grown/shell/eggy
seed = /obj/item/seeds/eggplant/eggy
name = "egg-plant"
desc = "There MUST be a chicken inside."
icon_state = "eggyplant"
trash = /obj/item/reagent_containers/food/snacks/egg
filling_color = "#F8F8FF"
bitesize_mod = 2
foodtype = MEAT
distill_reagent = "eggnog"
+223
View File
@@ -0,0 +1,223 @@
// Poppy
/obj/item/seeds/poppy
name = "pack of poppy seeds"
desc = "These seeds grow into poppies."
icon_state = "seed-poppy"
species = "poppy"
plantname = "Poppy Plants"
product = /obj/item/reagent_containers/food/snacks/grown/poppy
endurance = 10
maturation = 8
yield = 6
potency = 20
growthstages = 3
growing_icon = 'icons/obj/hydroponics/growing_flowers.dmi'
icon_grow = "poppy-grow"
icon_dead = "poppy-dead"
mutatelist = list(/obj/item/seeds/poppy/geranium, /obj/item/seeds/poppy/lily)
reagents_add = list("bicaridine" = 0.2, "nutriment" = 0.05)
/obj/item/reagent_containers/food/snacks/grown/poppy
seed = /obj/item/seeds/poppy
name = "poppy"
desc = "Long-used as a symbol of rest, peace, and death."
icon_state = "poppy"
slot_flags = ITEM_SLOT_HEAD
filling_color = "#FF6347"
bitesize_mod = 3
tastes = list("sesame seeds" = 1)
foodtype = VEGETABLES | GROSS
distill_reagent = "vermouth"
// Lily
/obj/item/seeds/poppy/lily
name = "pack of lily seeds"
desc = "These seeds grow into lilies."
icon_state = "seed-lily"
species = "lily"
plantname = "Lily Plants"
product = /obj/item/reagent_containers/food/snacks/grown/poppy/lily
mutatelist = list()
/obj/item/reagent_containers/food/snacks/grown/poppy/lily
seed = /obj/item/seeds/poppy/lily
name = "lily"
desc = "A beautiful orange flower."
icon_state = "lily"
tastes = list("pelts " = 1)
filling_color = "#FFA500"
// Geranium
/obj/item/seeds/poppy/geranium
name = "pack of geranium seeds"
desc = "These seeds grow into geranium."
icon_state = "seed-geranium"
species = "geranium"
plantname = "Geranium Plants"
product = /obj/item/reagent_containers/food/snacks/grown/poppy/geranium
mutatelist = list()
/obj/item/reagent_containers/food/snacks/grown/poppy/geranium
seed = /obj/item/seeds/poppy/geranium
name = "geranium"
desc = "A beautiful blue flower."
icon_state = "geranium"
filling_color = "#008B8B"
tastes = list("pelts " = 1)
// Harebell
/obj/item/seeds/harebell
name = "pack of harebell seeds"
desc = "These seeds grow into pretty little flowers."
icon_state = "seed-harebell"
species = "harebell"
plantname = "Harebells"
product = /obj/item/reagent_containers/food/snacks/grown/harebell
lifespan = 100
endurance = 20
maturation = 7
production = 1
yield = 2
potency = 30
growthstages = 4
genes = list(/datum/plant_gene/trait/plant_type/weed_hardy)
growing_icon = 'icons/obj/hydroponics/growing_flowers.dmi'
reagents_add = list("nutriment" = 0.04)
/obj/item/reagent_containers/food/snacks/grown/harebell
seed = /obj/item/seeds/harebell
name = "harebell"
desc = "\"I'll sweeten thy sad grave: thou shalt not lack the flower that's like thy face, pale primrose, nor the azured hare-bell, like thy veins; no, nor the leaf of eglantine, whom not to slander, out-sweeten'd not thy breath.\""
icon_state = "harebell"
tastes = list("salt" = 1)
slot_flags = ITEM_SLOT_HEAD
filling_color = "#E6E6FA"
bitesize_mod = 3
distill_reagent = "vermouth"
// Sunflower
/obj/item/seeds/sunflower
name = "pack of sunflower seeds"
desc = "These seeds grow into sunflowers."
icon_state = "seed-sunflower"
species = "sunflower"
plantname = "Sunflowers"
product = /obj/item/grown/sunflower
endurance = 20
production = 2
yield = 2
growthstages = 3
growing_icon = 'icons/obj/hydroponics/growing_flowers.dmi'
icon_grow = "sunflower-grow"
icon_dead = "sunflower-dead"
mutatelist = list(/obj/item/seeds/sunflower/moonflower, /obj/item/seeds/sunflower/novaflower)
reagents_add = list("cornoil" = 0.08, "nutriment" = 0.04)
/obj/item/grown/sunflower // FLOWER POWER!
seed = /obj/item/seeds/sunflower
name = "sunflower"
desc = "It's beautiful! A certain person might beat you to death if you trample these."
icon_state = "sunflower"
lefthand_file = 'icons/mob/inhands/weapons/plants_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/plants_righthand.dmi'
damtype = "fire"
force = 0
slot_flags = ITEM_SLOT_HEAD
throwforce = 0
w_class = WEIGHT_CLASS_TINY
throw_speed = 1
throw_range = 3
tastes = list("seeds" = 1)
/obj/item/grown/sunflower/attack(mob/M, mob/user)
to_chat(M, "<font color='green'><b> [user] smacks you with a sunflower!</font><font color='yellow'><b>FLOWER POWER<b></font>")
to_chat(user, "<font color='green'>Your sunflower's </font><font color='yellow'><b>FLOWER POWER</b></font><font color='green'>strikes [M]</font>")
// Moonflower
/obj/item/seeds/sunflower/moonflower
name = "pack of moonflower seeds"
desc = "These seeds grow into moonflowers."
icon_state = "seed-moonflower"
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
species = "moonflower"
plantname = "Moonflowers"
icon_grow = "moonflower-grow"
icon_dead = "sunflower-dead"
product = /obj/item/reagent_containers/food/snacks/grown/moonflower
mutatelist = list()
reagents_add = list("moonshine" = 0.2, "vitamin" = 0.02, "nutriment" = 0.02)
rarity = 15
/obj/item/reagent_containers/food/snacks/grown/moonflower
seed = /obj/item/seeds/sunflower/moonflower
name = "moonflower"
desc = "Store in a location at least 50 yards away from werewolves."
icon_state = "moonflower"
slot_flags = ITEM_SLOT_HEAD
filling_color = "#E6E6FA"
bitesize_mod = 2
distill_reagent = "absinthe" //It's made from flowers.
tastes = list("glowbugs" = 1)
// Novaflower
/obj/item/seeds/sunflower/novaflower
name = "pack of novaflower seeds"
desc = "These seeds grow into novaflowers."
icon_state = "seed-novaflower"
species = "novaflower"
plantname = "Novaflowers"
icon_grow = "novaflower-grow"
icon_dead = "sunflower-dead"
product = /obj/item/grown/novaflower
mutatelist = list()
reagents_add = list("condensedcapsaicin" = 0.25, "capsaicin" = 0.3, "nutriment" = 0)
rarity = 20
/obj/item/grown/novaflower
seed = /obj/item/seeds/sunflower/novaflower
name = "novaflower"
desc = "These beautiful flowers have a crisp smokey scent, like a summer bonfire."
icon_state = "novaflower"
lefthand_file = 'icons/mob/inhands/weapons/plants_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/plants_righthand.dmi'
damtype = "fire"
force = 0
slot_flags = ITEM_SLOT_HEAD
throwforce = 0
w_class = WEIGHT_CLASS_TINY
throw_speed = 1
throw_range = 3
attack_verb = list("roasted", "scorched", "burned")
grind_results = list("capsaicin" = 0, "condensedcapsaicin" = 0)
tastes = list("cooked sunflower" = 1)
/obj/item/grown/novaflower/add_juice()
..()
force = round((5 + seed.potency / 5), 1)
/obj/item/grown/novaflower/attack(mob/living/carbon/M, mob/user)
if(!..())
return
if(isliving(M))
to_chat(M, "<span class='danger'>You are lit on fire from the intense heat of the [name]!</span>")
M.adjust_fire_stacks(seed.potency / 20)
if(M.IgniteMob())
message_admins("[ADMIN_LOOKUPFLW(user)] set [ADMIN_LOOKUPFLW(M)] on fire with [src] at [AREACOORD(user)]")
log_game("[key_name(user)] set [key_name(M)] on fire with [src] at [AREACOORD(user)]")
/obj/item/grown/novaflower/afterattack(atom/A as mob|obj, mob/user,proximity)
. = ..()
if(!proximity)
return
if(force > 0)
force -= rand(1, (force / 3) + 1)
else
to_chat(usr, "<span class='warning'>All the petals have fallen off the [name] from violent whacking!</span>")
qdel(src)
/obj/item/grown/novaflower/pickup(mob/living/carbon/human/user)
..()
if(!user.gloves)
to_chat(user, "<span class='danger'>The [name] burns your bare hand!</span>")
user.adjustFireLoss(rand(1, 5))
@@ -0,0 +1,60 @@
// Grass
/obj/item/seeds/grass
name = "pack of grass seeds"
desc = "These seeds grow into grass. Yummy!"
icon_state = "seed-grass"
species = "grass"
plantname = "Grass"
product = /obj/item/reagent_containers/food/snacks/grown/grass
lifespan = 40
endurance = 40
maturation = 2
production = 5
yield = 5
growthstages = 2
icon_grow = "grass-grow"
icon_dead = "grass-dead"
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/grass/carpet)
reagents_add = list("nutriment" = 0.02, "hydrogen" = 0.05)
/obj/item/reagent_containers/food/snacks/grown/grass
seed = /obj/item/seeds/grass
name = "grass"
desc = "Green and lush."
icon_state = "grassclump"
filling_color = "#32CD32"
bitesize_mod = 2
var/stacktype = /obj/item/stack/tile/grass
var/tile_coefficient = 0.02 // 1/50
wine_power = 15
/obj/item/reagent_containers/food/snacks/grown/grass/attack_self(mob/user)
to_chat(user, "<span class='notice'>You prepare the astroturf.</span>")
var/grassAmt = 1 + round(seed.potency * tile_coefficient) // The grass we're holding
for(var/obj/item/reagent_containers/food/snacks/grown/grass/G in user.loc) // The grass on the floor
if(G.type != type)
continue
grassAmt += 1 + round(G.seed.potency * tile_coefficient)
qdel(G)
new stacktype(user.drop_location(), grassAmt)
qdel(src)
// Carpet
/obj/item/seeds/grass/carpet
name = "pack of carpet seeds"
desc = "These seeds grow into stylish carpet samples."
icon_state = "seed-carpet"
species = "carpet"
plantname = "Carpet"
product = /obj/item/reagent_containers/food/snacks/grown/grass/carpet
mutatelist = list()
rarity = 10
/obj/item/reagent_containers/food/snacks/grown/grass/carpet
seed = /obj/item/seeds/grass/carpet
name = "carpet"
desc = "The textile industry's dark secret."
icon_state = "carpetclump"
stacktype = /obj/item/stack/tile/carpet
can_distill = FALSE
+107
View File
@@ -0,0 +1,107 @@
// A very special plant, deserving it's own file.
/obj/item/seeds/kudzu
name = "pack of kudzu seeds"
desc = "These seeds grow into a weed that grows incredibly fast."
icon_state = "seed-kudzu"
species = "kudzu"
plantname = "Kudzu"
product = /obj/item/reagent_containers/food/snacks/grown/kudzupod
genes = list(/datum/plant_gene/trait/repeated_harvest, /datum/plant_gene/trait/plant_type/weed_hardy)
lifespan = 20
endurance = 10
yield = 4
growthstages = 4
rarity = 30
var/list/mutations = list()
reagents_add = list("charcoal" = 0.04, "nutriment" = 0.02)
/obj/item/seeds/kudzu/Copy()
var/obj/item/seeds/kudzu/S = ..()
S.mutations = mutations.Copy()
return S
/obj/item/seeds/kudzu/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] swallows the pack of kudzu seeds! It looks like [user.p_theyre()] trying to commit suicide!</span>")
plant(user)
return (BRUTELOSS)
/obj/item/seeds/kudzu/proc/plant(mob/user)
if(isspaceturf(user.loc))
return
if(!isturf(user.loc))
to_chat(user, "<span class='warning'>You need more space to plant [src].</span>")
return FALSE
if(locate(/obj/structure/spacevine) in user.loc)
to_chat(user, "<span class='warning'>There is too much kudzu here to plant [src].</span>")
return FALSE
to_chat(user, "<span class='notice'>You plant [src].</span>")
message_admins("Kudzu planted by [ADMIN_LOOKUPFLW(user)] at [ADMIN_VERBOSEJMP(user)]")
investigate_log("was planted by [key_name(user)] at [AREACOORD(user)]", INVESTIGATE_BOTANY)
new /datum/spacevine_controller(get_turf(user), mutations, potency, production)
qdel(src)
/obj/item/seeds/kudzu/attack_self(mob/user)
user.visible_message("<span class='danger'>[user] begins throwing seeds on the ground...</span>")
if(do_after(user, 50, needhand = TRUE, target = user.drop_location(), progress = TRUE))
plant(user)
to_chat(user, "<span class='notice'>You plant the kudzu. You monster.</span>")
/obj/item/seeds/kudzu/get_analyzer_text()
var/text = ..()
var/text_string = ""
for(var/datum/spacevine_mutation/SM in mutations)
text_string += "[(text_string == "") ? "" : ", "][SM.name]"
text += "\n- Plant Mutations: [(text_string == "") ? "None" : text_string]"
return text
/obj/item/seeds/kudzu/on_chem_reaction(datum/reagents/S)
var/list/temp_mut_list = list()
if(S.has_reagent("sterilizine", 5))
for(var/datum/spacevine_mutation/SM in mutations)
if(SM.quality == NEGATIVE)
temp_mut_list += SM
if(prob(20) && temp_mut_list.len)
mutations.Remove(pick(temp_mut_list))
temp_mut_list.Cut()
if(S.has_reagent("welding_fuel", 5))
for(var/datum/spacevine_mutation/SM in mutations)
if(SM.quality == POSITIVE)
temp_mut_list += SM
if(prob(20) && temp_mut_list.len)
mutations.Remove(pick(temp_mut_list))
temp_mut_list.Cut()
if(S.has_reagent("phenol", 5))
for(var/datum/spacevine_mutation/SM in mutations)
if(SM.quality == MINOR_NEGATIVE)
temp_mut_list += SM
if(prob(20) && temp_mut_list.len)
mutations.Remove(pick(temp_mut_list))
temp_mut_list.Cut()
if(S.has_reagent("blood", 15))
adjust_production(rand(15, -5))
if(S.has_reagent("amatoxin", 5))
adjust_production(rand(5, -15))
if(S.has_reagent("plasma", 5))
adjust_potency(rand(5, -15))
if(S.has_reagent("holywater", 10))
adjust_potency(rand(15, -5))
/obj/item/reagent_containers/food/snacks/grown/kudzupod
seed = /obj/item/seeds/kudzu
name = "kudzu pod"
desc = "<I>Pueraria Virallis</I>: An invasive species with vines that rapidly creep and wrap around whatever they contact."
icon_state = "kudzupod"
filling_color = "#6B8E23"
bitesize_mod = 2
foodtype = VEGETABLES | GROSS
tastes = list("kudzu" = 1)
wine_power = 20
+63
View File
@@ -0,0 +1,63 @@
// Watermelon
/obj/item/seeds/watermelon
name = "pack of watermelon seeds"
desc = "These seeds grow into watermelon plants."
icon_state = "seed-watermelon"
species = "watermelon"
plantname = "Watermelon Vines"
product = /obj/item/reagent_containers/food/snacks/grown/watermelon
lifespan = 50
endurance = 40
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
icon_dead = "watermelon-dead"
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/watermelon/holy)
reagents_add = list("water" = 0.2, "vitamin" = 0.04, "nutriment" = 0.2)
/obj/item/seeds/watermelon/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is swallowing [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.gib()
new product(drop_location())
qdel(src)
return MANUAL_SUICIDE
/obj/item/reagent_containers/food/snacks/grown/watermelon
seed = /obj/item/seeds/watermelon
name = "watermelon"
desc = "It's full of watery goodness."
icon_state = "watermelon"
slice_path = /obj/item/reagent_containers/food/snacks/watermelonslice
slices_num = 5
dried_type = null
w_class = WEIGHT_CLASS_NORMAL
filling_color = "#008000"
bitesize_mod = 3
foodtype = FRUIT
juice_results = list("watermelonjuice" = 0)
wine_power = 40
// Holymelon
/obj/item/seeds/watermelon/holy
name = "pack of holymelon seeds"
desc = "These seeds grow into holymelon plants."
icon_state = "seed-holymelon"
species = "holymelon"
plantname = "Holy Melon Vines"
product = /obj/item/reagent_containers/food/snacks/grown/holymelon
mutatelist = list()
reagents_add = list("holywater" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 20
/obj/item/reagent_containers/food/snacks/grown/holymelon
seed = /obj/item/seeds/watermelon/holy
name = "holymelon"
desc = "The water within this melon has been blessed by some deity that's particularly fond of watermelon."
icon_state = "holymelon"
filling_color = "#FFD700"
dried_type = null
wine_power = 70 //Water to wine, baby.
wine_flavor = "divinity"
/obj/item/reagent_containers/food/snacks/grown/holymelon/Initialize()
. = ..()
AddComponent(/datum/component/anti_magic, TRUE, TRUE) //deliver us from evil o melon god
+171
View File
@@ -0,0 +1,171 @@
// Starthistle
/obj/item/seeds/starthistle
name = "pack of starthistle seeds"
desc = "A robust species of weed that often springs up in-between the cracks of spaceship parking lots."
icon_state = "seed-starthistle"
species = "starthistle"
plantname = "Starthistle"
lifespan = 70
endurance = 50 // damm pesky weeds
maturation = 5
production = 1
yield = 2
potency = 10
growthstages = 3
growing_icon = 'icons/obj/hydroponics/growing_flowers.dmi'
genes = list(/datum/plant_gene/trait/plant_type/weed_hardy)
mutatelist = list(/obj/item/seeds/harebell)
/obj/item/seeds/starthistle/harvest(mob/user)
var/obj/machinery/hydroponics/parent = loc
var/seed_count = yield
if(prob(getYield() * 20))
seed_count++
var/output_loc = parent.Adjacent(user) ? user.loc : parent.loc
for(var/i in 1 to seed_count)
var/obj/item/seeds/starthistle/harvestseeds = Copy()
harvestseeds.forceMove(output_loc)
parent.update_tray()
// Cabbage
/obj/item/seeds/cabbage
name = "pack of cabbage seeds"
desc = "These seeds grow into cabbages."
icon_state = "seed-cabbage"
species = "cabbage"
plantname = "Cabbages"
product = /obj/item/reagent_containers/food/snacks/grown/cabbage
lifespan = 50
endurance = 25
maturation = 3
production = 5
yield = 4
growthstages = 1
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/replicapod)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/reagent_containers/food/snacks/grown/cabbage
seed = /obj/item/seeds/cabbage
name = "cabbage"
desc = "Ewwwwwwwwww. Cabbage."
icon_state = "cabbage"
filling_color = "#90EE90"
bitesize_mod = 2
foodtype = VEGETABLES
wine_power = 20
// Sugarcane
/obj/item/seeds/sugarcane
name = "pack of sugarcane seeds"
desc = "These seeds grow into sugarcane."
icon_state = "seed-sugarcane"
species = "sugarcane"
plantname = "Sugarcane"
product = /obj/item/reagent_containers/food/snacks/grown/sugarcane
genes = list(/datum/plant_gene/trait/repeated_harvest)
lifespan = 60
endurance = 50
maturation = 3
yield = 4
growthstages = 3
reagents_add = list("sugar" = 0.25)
/obj/item/reagent_containers/food/snacks/grown/sugarcane
seed = /obj/item/seeds/sugarcane
name = "sugarcane"
desc = "Sickly sweet."
icon_state = "sugarcane"
filling_color = "#FFD700"
bitesize_mod = 2
foodtype = VEGETABLES | SUGAR
distill_reagent = "rum"
// Gatfruit
/obj/item/seeds/gatfruit
name = "pack of gatfruit seeds"
desc = "These seeds grow into .357 revolvers."
icon_state = "seed-gatfruit"
species = "gatfruit"
plantname = "Gatfruit Tree"
product = /obj/item/reagent_containers/food/snacks/grown/shell/gatfruit
genes = list(/datum/plant_gene/trait/repeated_harvest)
lifespan = 20
endurance = 20
maturation = 40
production = 10
yield = 2
potency = 60
growthstages = 2
rarity = 60 // Obtainable only with xenobio+superluck.
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
reagents_add = list("sulfur" = 0.1, "carbon" = 0.1, "nitrogen" = 0.07, "potassium" = 0.05)
/obj/item/reagent_containers/food/snacks/grown/shell/gatfruit
seed = /obj/item/seeds/gatfruit
name = "gatfruit"
desc = "It smells like burning."
icon_state = "gatfruit"
trash = /obj/item/gun/ballistic/revolver
bitesize_mod = 2
foodtype = FRUIT
tastes = list("gunpowder" = 1)
wine_power = 90 //It burns going down, too.
//Cherry Bombs
/obj/item/seeds/cherry/bomb
name = "pack of cherry bomb pits"
desc = "They give you vibes of dread and frustration."
icon_state = "seed-cherry_bomb"
species = "cherry_bomb"
plantname = "Cherry Bomb Tree"
product = /obj/item/reagent_containers/food/snacks/grown/cherry_bomb
mutatelist = list()
reagents_add = list("nutriment" = 0.1, "sugar" = 0.1, "blackpowder" = 0.7)
rarity = 60 //See above
/obj/item/reagent_containers/food/snacks/grown/cherry_bomb
name = "cherry bombs"
desc = "You think you can hear the hissing of a tiny fuse."
icon_state = "cherry_bomb"
filling_color = rgb(20, 20, 20)
seed = /obj/item/seeds/cherry/bomb
bitesize_mod = 2
volume = 125 //Gives enough room for the black powder at max potency
max_integrity = 40
wine_power = 80
/obj/item/reagent_containers/food/snacks/grown/cherry_bomb/attack_self(mob/living/user)
user.visible_message("<span class='warning'>[user] plucks the stem from [src]!</span>", "<span class='userdanger'>You pluck the stem from [src], which begins to hiss loudly!</span>")
message_admins("[ADMIN_LOOKUPFLW(user)] primed a cherry bomb for detonation at [ADMIN_VERBOSEJMP(user)]")
log_game("[key_name(user)] primed a cherry bomb for detonation at [AREACOORD(user)].")
prime()
/obj/item/reagent_containers/food/snacks/grown/cherry_bomb/deconstruct(disassembled = TRUE)
if(!disassembled)
prime()
if(!QDELETED(src))
qdel(src)
/obj/item/reagent_containers/food/snacks/grown/cherry_bomb/ex_act(severity)
qdel(src) //Ensuring that it's deleted by its own explosion. Also prevents mass chain reaction with piles of cherry bombs
/obj/item/reagent_containers/food/snacks/grown/cherry_bomb/proc/prime()
icon_state = "cherry_bomb_lit"
playsound(src, 'sound/effects/fuse.ogg', seed.potency, 0)
reagents.chem_temp = 1000 //Sets off the black powder
reagents.handle_reactions()
// Lavaland cactus
/obj/item/seeds/lavaland/cactus
name = "pack of fruiting cactus seeds"
desc = "These seeds grow into fruiting cacti."
icon_state = "seed-cactus"
species = "cactus"
plantname = "Fruiting Cactus"
product = /obj/item/reagent_containers/food/snacks/grown/ash_flora/cactus_fruit
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
growthstages = 2
+371
View File
@@ -0,0 +1,371 @@
/obj/item/reagent_containers/food/snacks/grown/mushroom
name = "mushroom"
bitesize_mod = 2
foodtype = VEGETABLES
wine_power = 40
// Reishi
/obj/item/seeds/reishi
name = "pack of reishi mycelium"
desc = "This mycelium grows into something medicinal and relaxing."
icon_state = "mycelium-reishi"
species = "reishi"
plantname = "Reishi"
product = /obj/item/reagent_containers/food/snacks/grown/mushroom/reishi
lifespan = 35
endurance = 35
maturation = 10
production = 5
yield = 4
potency = 15
growthstages = 4
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism)
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
reagents_add = list("morphine" = 0.35, "charcoal" = 0.35, "nutriment" = 0)
/obj/item/reagent_containers/food/snacks/grown/mushroom/reishi
seed = /obj/item/seeds/reishi
name = "reishi"
desc = "<I>Ganoderma lucidum</I>: A special fungus known for its medicinal and stress relieving properties."
icon_state = "reishi"
filling_color = "#FF4500"
// Fly Amanita
/obj/item/seeds/amanita
name = "pack of fly amanita mycelium"
desc = "This mycelium grows into something horrible."
icon_state = "mycelium-amanita"
species = "amanita"
plantname = "Fly Amanitas"
product = /obj/item/reagent_containers/food/snacks/grown/mushroom/amanita
lifespan = 50
endurance = 35
maturation = 10
production = 5
yield = 4
growthstages = 3
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism)
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
mutatelist = list(/obj/item/seeds/angel)
reagents_add = list("mushroomhallucinogen" = 0.04, "amatoxin" = 0.35, "nutriment" = 0, "growthserum" = 0.1)
/obj/item/reagent_containers/food/snacks/grown/mushroom/amanita
seed = /obj/item/seeds/amanita
name = "fly amanita"
desc = "<I>Amanita Muscaria</I>: Learn poisonous mushrooms by heart. Only pick mushrooms you know."
icon_state = "amanita"
filling_color = "#FF0000"
// Destroying Angel
/obj/item/seeds/angel
name = "pack of destroying angel mycelium"
desc = "This mycelium grows into something devastating."
icon_state = "mycelium-angel"
species = "angel"
plantname = "Destroying Angels"
product = /obj/item/reagent_containers/food/snacks/grown/mushroom/angel
lifespan = 50
endurance = 35
maturation = 12
production = 5
yield = 2
potency = 35
growthstages = 3
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism)
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
reagents_add = list("mushroomhallucinogen" = 0.04, "amatoxin" = 0.1, "nutriment" = 0, "amanitin" = 0.2)
rarity = 30
/obj/item/reagent_containers/food/snacks/grown/mushroom/angel
seed = /obj/item/seeds/angel
name = "destroying angel"
desc = "<I>Amanita Virosa</I>: Deadly poisonous basidiomycete fungus filled with alpha amatoxins."
icon_state = "angel"
filling_color = "#C0C0C0"
wine_power = 60
// Liberty Cap
/obj/item/seeds/liberty
name = "pack of liberty-cap mycelium"
desc = "This mycelium grows into liberty-cap mushrooms."
icon_state = "mycelium-liberty"
species = "liberty"
plantname = "Liberty-Caps"
product = /obj/item/reagent_containers/food/snacks/grown/mushroom/libertycap
maturation = 7
production = 1
yield = 5
potency = 15
growthstages = 3
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism)
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
reagents_add = list("mushroomhallucinogen" = 0.25, "nutriment" = 0.02)
/obj/item/reagent_containers/food/snacks/grown/mushroom/libertycap
seed = /obj/item/seeds/liberty
name = "liberty-cap"
desc = "<I>Psilocybe Semilanceata</I>: Liberate yourself!"
icon_state = "libertycap"
filling_color = "#DAA520"
wine_power = 80
// Plump Helmet
/obj/item/seeds/plump
name = "pack of plump-helmet mycelium"
desc = "This mycelium grows into helmets... maybe."
icon_state = "mycelium-plump"
species = "plump"
plantname = "Plump-Helmet Mushrooms"
product = /obj/item/reagent_containers/food/snacks/grown/mushroom/plumphelmet
maturation = 8
production = 1
yield = 4
potency = 15
growthstages = 3
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism)
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
mutatelist = list(/obj/item/seeds/plump/walkingmushroom)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/reagent_containers/food/snacks/grown/mushroom/plumphelmet
seed = /obj/item/seeds/plump
name = "plump-helmet"
desc = "<I>Plumus Hellmus</I>: Plump, soft and s-so inviting~"
icon_state = "plumphelmet"
filling_color = "#9370DB"
distill_reagent = "manlydorf"
// Walking Mushroom
/obj/item/seeds/plump/walkingmushroom
name = "pack of walking mushroom mycelium"
desc = "This mycelium will grow into huge stuff!"
icon_state = "mycelium-walkingmushroom"
species = "walkingmushroom"
plantname = "Walking Mushrooms"
product = /obj/item/reagent_containers/food/snacks/grown/mushroom/walkingmushroom
lifespan = 30
endurance = 30
maturation = 5
yield = 1
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
mutatelist = list()
reagents_add = list("vitamin" = 0.05, "nutriment" = 0.15)
rarity = 30
/obj/item/reagent_containers/food/snacks/grown/mushroom/walkingmushroom
seed = /obj/item/seeds/plump/walkingmushroom
name = "walking mushroom"
desc = "<I>Plumus Locomotus</I>: The beginning of the great walk."
icon_state = "walkingmushroom"
filling_color = "#9370DB"
can_distill = FALSE
/obj/item/reagent_containers/food/snacks/grown/mushroom/walkingmushroom/attack_self(mob/user)
if(isspaceturf(user.loc))
return
var/mob/living/simple_animal/hostile/mushroom/M = new /mob/living/simple_animal/hostile/mushroom(user.loc)
M.maxHealth += round(seed.endurance / 4)
M.melee_damage_lower += round(seed.potency / 20)
M.melee_damage_upper += round(seed.potency / 20)
M.move_to_delay -= round(seed.production / 50)
M.health = M.maxHealth
qdel(src)
to_chat(user, "<span class='notice'>You plant the walking mushroom.</span>")
// Chanterelle
/obj/item/seeds/chanter
name = "pack of chanterelle mycelium"
desc = "This mycelium grows into chanterelle mushrooms."
icon_state = "mycelium-chanter"
species = "chanter"
plantname = "Chanterelle Mushrooms"
product = /obj/item/reagent_containers/food/snacks/grown/mushroom/chanterelle
lifespan = 35
endurance = 20
maturation = 7
production = 1
yield = 5
potency = 15
growthstages = 3
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism)
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
reagents_add = list("nutriment" = 0.1)
/obj/item/reagent_containers/food/snacks/grown/mushroom/chanterelle
seed = /obj/item/seeds/chanter
name = "chanterelle cluster"
desc = "<I>Cantharellus Cibarius</I>: These jolly yellow little shrooms sure look tasty!"
icon_state = "chanterelle"
filling_color = "#FFA500"
// Glowshroom
/obj/item/seeds/glowshroom
name = "pack of glowshroom mycelium"
desc = "This mycelium -glows- into mushrooms!"
icon_state = "mycelium-glowshroom"
species = "glowshroom"
plantname = "Glowshrooms"
product = /obj/item/reagent_containers/food/snacks/grown/mushroom/glowshroom
lifespan = 100 //ten times that is the delay
endurance = 30
maturation = 15
production = 1
yield = 3 //-> spread
potency = 30 //-> brightness
growthstages = 4
rarity = 20
genes = list(/datum/plant_gene/trait/glow, /datum/plant_gene/trait/plant_type/fungal_metabolism)
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
mutatelist = list(/obj/item/seeds/glowshroom/glowcap, /obj/item/seeds/glowshroom/shadowshroom)
reagents_add = list("radium" = 0.1, "phosphorus" = 0.1, "nutriment" = 0.04)
/obj/item/reagent_containers/food/snacks/grown/mushroom/glowshroom
seed = /obj/item/seeds/glowshroom
name = "glowshroom cluster"
desc = "<I>Mycena Bregprox</I>: This species of mushroom glows in the dark."
icon_state = "glowshroom"
filling_color = "#00FA9A"
var/effect_path = /obj/structure/glowshroom
wine_power = 50
/obj/item/reagent_containers/food/snacks/grown/mushroom/glowshroom/attack_self(mob/user)
if(isspaceturf(user.loc))
return FALSE
if(!isturf(user.loc))
to_chat(user, "<span class='warning'>You need more space to plant [src].</span>")
return FALSE
var/count = 0
var/maxcount = 1
for(var/tempdir in GLOB.cardinals)
var/turf/closed/wall = get_step(user.loc, tempdir)
if(istype(wall))
maxcount++
for(var/obj/structure/glowshroom/G in user.loc)
count++
if(count >= maxcount)
to_chat(user, "<span class='warning'>There are too many shrooms here to plant [src].</span>")
return FALSE
new effect_path(user.loc, seed)
to_chat(user, "<span class='notice'>You plant [src].</span>")
qdel(src)
return TRUE
// Glowcap
/obj/item/seeds/glowshroom/glowcap
name = "pack of glowcap mycelium"
desc = "This mycelium -powers- into mushrooms!"
icon_state = "mycelium-glowcap"
species = "glowcap"
icon_harvest = "glowcap-harvest"
plantname = "Glowcaps"
product = /obj/item/reagent_containers/food/snacks/grown/mushroom/glowshroom/glowcap
genes = list(/datum/plant_gene/trait/glow/red, /datum/plant_gene/trait/cell_charge, /datum/plant_gene/trait/plant_type/fungal_metabolism)
mutatelist = list()
reagents_add = list("teslium" = 0.1, "nutriment" = 0.04)
rarity = 30
/obj/item/reagent_containers/food/snacks/grown/mushroom/glowshroom/glowcap
seed = /obj/item/seeds/glowshroom/glowcap
name = "glowcap cluster"
desc = "<I>Mycena Ruthenia</I>: This species of mushroom glows in the dark, but isn't actually bioluminescent. They're warm to the touch..."
icon_state = "glowcap"
filling_color = "#00FA9A"
effect_path = /obj/structure/glowshroom/glowcap
tastes = list("glowcap" = 1)
//Shadowshroom
/obj/item/seeds/glowshroom/shadowshroom
name = "pack of shadowshroom mycelium"
desc = "This mycelium will grow into something shadowy."
icon_state = "mycelium-shadowshroom"
species = "shadowshroom"
icon_grow = "shadowshroom-grow"
icon_dead = "shadowshroom-dead"
plantname = "Shadowshrooms"
product = /obj/item/reagent_containers/food/snacks/grown/mushroom/glowshroom/shadowshroom
genes = list(/datum/plant_gene/trait/glow/shadow, /datum/plant_gene/trait/plant_type/fungal_metabolism)
mutatelist = list()
reagents_add = list("radium" = 0.2, "nutriment" = 0.04)
rarity = 30
/obj/item/reagent_containers/food/snacks/grown/mushroom/glowshroom/shadowshroom
seed = /obj/item/seeds/glowshroom/shadowshroom
name = "shadowshroom cluster"
desc = "<I>Mycena Umbra</I>: This species of mushroom emits shadow instead of light."
icon_state = "shadowshroom"
effect_path = /obj/structure/glowshroom/shadowshroom
tastes = list("shadow" = 1, "mushroom" = 1)
wine_power = 60
/obj/item/reagent_containers/food/snacks/grown/mushroom/glowshroom/shadowshroom/attack_self(mob/user)
. = ..()
if(.)
investigate_log("was planted by [key_name(user)] at [AREACOORD(user)]", INVESTIGATE_BOTANY)
//// LAVALAND MUSHROOMS ////
// Bracket (Shaving mushroom)
/obj/item/seeds/lavaland
name = "lavaland seeds"
desc = "You should never see this."
lifespan = 50
endurance = 25
maturation = 7
production = 4
yield = 4
potency = 15
growthstages = 3
rarity = 20
reagents_add = list("nutriment" = 0.1)
resistance_flags = FIRE_PROOF
/obj/item/seeds/lavaland/polypore
name = "pack of polypore mycelium"
desc = "This mycelium grows into bracket mushrooms, also known as polypores. Woody and firm, shaft miners often use them for makeshift crafts."
icon_state = "mycelium-polypore"
species = "polypore"
plantname = "Polypore Mushrooms"
product = /obj/item/reagent_containers/food/snacks/grown/ash_flora/shavings
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism)
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
// Porcini (Leafy mushroom)
/obj/item/seeds/lavaland/porcini
name = "pack of porcini mycelium"
desc = "This mycelium grows into Boletus edulus, also known as porcini. Native to the late Earth, but discovered on Lavaland. Has culinary, medicinal and relaxant effects."
icon_state = "mycelium-porcini"
species = "porcini"
plantname = "Porcini Mushrooms"
product = /obj/item/reagent_containers/food/snacks/grown/ash_flora/mushroom_leaf
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism)
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
// Inocybe (Mushroom caps)
/obj/item/seeds/lavaland/inocybe
name = "pack of inocybe mycelium"
desc = "This mycelium grows into an inocybe mushroom, a species of Lavaland origin with hallucinatory and toxic effects."
icon_state = "mycelium-inocybe"
species = "inocybe"
plantname = "Inocybe Mushrooms"
product = /obj/item/reagent_containers/food/snacks/grown/ash_flora/mushroom_cap
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism)
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
// Embershroom (Mushroom stem)
/obj/item/seeds/lavaland/ember
name = "pack of embershroom mycelium"
desc = "This mycelium grows into embershrooms, a species of bioluminescent mushrooms native to Lavaland."
icon_state = "mycelium-ember"
species = "ember"
plantname = "Embershroom Mushrooms"
product = /obj/item/reagent_containers/food/snacks/grown/ash_flora/mushroom_stem
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism, /datum/plant_gene/trait/glow)
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
+115
View File
@@ -0,0 +1,115 @@
/obj/item/seeds/nettle
name = "pack of nettle seeds"
desc = "These seeds grow into nettles."
icon_state = "seed-nettle"
species = "nettle"
plantname = "Nettles"
product = /obj/item/reagent_containers/food/snacks/grown/nettle
lifespan = 30
endurance = 40 // tuff like a toiger
yield = 4
growthstages = 5
genes = list(/datum/plant_gene/trait/repeated_harvest, /datum/plant_gene/trait/plant_type/weed_hardy)
mutatelist = list(/obj/item/seeds/nettle/death)
reagents_add = list("sacid" = 0.5)
/obj/item/seeds/nettle/death
name = "pack of death-nettle seeds"
desc = "These seeds grow into death-nettles."
icon_state = "seed-deathnettle"
species = "deathnettle"
plantname = "Death Nettles"
product = /obj/item/reagent_containers/food/snacks/grown/nettle/death
endurance = 25
maturation = 8
yield = 2
genes = list(/datum/plant_gene/trait/repeated_harvest, /datum/plant_gene/trait/plant_type/weed_hardy, /datum/plant_gene/trait/stinging)
mutatelist = list()
reagents_add = list("facid" = 0.5, "sacid" = 0.5)
rarity = 20
/obj/item/reagent_containers/food/snacks/grown/nettle // "snack"
seed = /obj/item/seeds/nettle
name = "nettle"
desc = "It's probably <B>not</B> wise to touch it with bare hands..."
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "nettle"
lefthand_file = 'icons/mob/inhands/weapons/plants_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/plants_righthand.dmi'
damtype = "fire"
force = 15
hitsound = 'sound/weapons/bladeslice.ogg'
throwforce = 5
w_class = WEIGHT_CLASS_TINY
throw_speed = 1
throw_range = 3
attack_verb = list("stung")
/obj/item/reagent_containers/food/snacks/grown/nettle/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is eating some of [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (BRUTELOSS|TOXLOSS)
/obj/item/reagent_containers/food/snacks/grown/nettle/pickup(mob/living/user)
..()
if(!iscarbon(user))
return FALSE
var/mob/living/carbon/C = user
if(C.gloves)
return FALSE
if(HAS_TRAIT(C, TRAIT_PIERCEIMMUNE))
return FALSE
var/hit_zone = (C.held_index_to_dir(C.active_hand_index) == "l" ? "l_":"r_") + "arm"
var/obj/item/bodypart/affecting = C.get_bodypart(hit_zone)
if(affecting)
if(affecting.receive_damage(0, force))
C.update_damage_overlays()
to_chat(C, "<span class='userdanger'>The nettle burns your bare hand!</span>")
return TRUE
/obj/item/reagent_containers/food/snacks/grown/nettle/afterattack(atom/A as mob|obj, mob/user,proximity)
. = ..()
if(!proximity)
return
if(force > 0)
force -= rand(1, (force / 3) + 1) // When you whack someone with it, leaves fall off
else
to_chat(usr, "All the leaves have fallen off the nettle from violent whacking.")
qdel(src)
/obj/item/reagent_containers/food/snacks/grown/nettle/basic
seed = /obj/item/seeds/nettle
/obj/item/reagent_containers/food/snacks/grown/nettle/basic/add_juice()
..()
force = round((5 + seed.potency / 5), 1)
/obj/item/reagent_containers/food/snacks/grown/nettle/death
seed = /obj/item/seeds/nettle/death
name = "deathnettle"
desc = "The <span class='danger'>glowing</span> nettle incites <span class='boldannounce'>rage</span> in you just from looking at it!"
icon_state = "deathnettle"
force = 30
throwforce = 15
/obj/item/reagent_containers/food/snacks/grown/nettle/death/add_juice()
..()
force = round((5 + seed.potency / 2.5), 1)
/obj/item/reagent_containers/food/snacks/grown/nettle/death/pickup(mob/living/carbon/user)
if(..())
if(prob(50))
user.Knockdown(100)
to_chat(user, "<span class='userdanger'>You are stunned by the Deathnettle as you try picking it up!</span>")
/obj/item/reagent_containers/food/snacks/grown/nettle/death/attack(mob/living/carbon/M, mob/user)
if(!..())
return
if(isliving(M))
to_chat(M, "<span class='danger'>You are stunned by the powerful acid of the Deathnettle!</span>")
log_combat(user, M, "attacked", src)
M.adjust_blurriness(force/7)
if(prob(20))
M.Unconscious(force / 0.3)
M.Knockdown(force / 0.75)
M.drop_all_held_items()
+74
View File
@@ -0,0 +1,74 @@
/obj/item/seeds/onion
name = "pack of onion seeds"
desc = "These seeds grow into onions."
icon_state = "seed-onion"
species = "onion"
plantname = "Onion Sprouts"
product = /obj/item/reagent_containers/food/snacks/grown/onion
lifespan = 20
maturation = 3
production = 4
yield = 6
endurance = 25
growthstages = 3
weed_chance = 3
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
mutatelist = list(/obj/item/seeds/onion/red)
/obj/item/reagent_containers/food/snacks/grown/onion
seed = /obj/item/seeds/onion
name = "onion"
desc = "Nothing to cry over."
icon_state = "onion"
filling_color = "#C0C9A0"
bitesize_mod = 2
tastes = list("onions" = 1)
slice_path = /obj/item/reagent_containers/food/snacks/onion_slice
slices_num = 2
wine_power = 30
/obj/item/seeds/onion/red
name = "pack of red onion seeds"
desc = "For growing exceptionally potent onions."
icon_state = "seed-onionred"
species = "onion_red"
plantname = "Red Onion Sprouts"
weed_chance = 1
product = /obj/item/reagent_containers/food/snacks/grown/onion/red
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1, "tearjuice" = 0.05)
/obj/item/reagent_containers/food/snacks/grown/onion/red
seed = /obj/item/seeds/onion/red
name = "red onion"
desc = "Purple despite the name."
icon_state = "onion_red"
filling_color = "#C29ACF"
slice_path = /obj/item/reagent_containers/food/snacks/onion_slice/red
wine_power = 60
/obj/item/reagent_containers/food/snacks/grown/onion/slice(accuracy, obj/item/W, mob/user)
var/datum/effect_system/smoke_spread/chem/S = new //Since the onion is destroyed when it's sliced,
var/splat_location = get_turf(src) //we need to set up the smoke beforehand
S.attach(splat_location)
S.set_up(reagents, 0, splat_location, 0)
if(..())
S.start()
return TRUE
qdel(S)
/obj/item/reagent_containers/food/snacks/onion_slice
name = "onion slices"
desc = "Rings, not for wearing."
icon_state = "onionslice"
list_reagents = list("nutriment" = 5, "vitamin" = 2)
filling_color = "#C0C9A0"
gender = PLURAL
cooked_type = /obj/item/reagent_containers/food/snacks/onionrings
/obj/item/reagent_containers/food/snacks/onion_slice/red
name = "red onion slices"
desc = "They shine like exceptionally low quality amethyst."
icon_state = "onionslice_red"
filling_color = "#C29ACF"
list_reagents = list("nutriment" = 5, "vitamin" = 2, "tearjuice" = 2.5)
+30
View File
@@ -0,0 +1,30 @@
/obj/item/seeds/peanutseed
name = "pack of peanut seeds"
desc = "These seeds grow to produce fruits botanically classified as legumes, but mundanely referred as nuts."
icon_state = "seed-peanut"
species = "peanut"
plantname = "Peanut Vines"
product = /obj/item/reagent_containers/food/snacks/grown/peanut
yield = 6
growthstages = 4
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
reagents_add = list("vitamin" = 0.02, "nutriment" = 0.15, "cooking_oil" = 0.03)
/obj/item/reagent_containers/food/snacks/grown/peanut
seed = /obj/item/seeds/peanutseed
name = "peanut"
desc = "Peanuts for the peanut gallery!" //get me a better description, boys.
icon_state = "peanut"
filling_color = "#C4AE7A"
bitesize = 100
foodtype = VEGETABLES
dried_type = /obj/item/reagent_containers/food/snacks/roasted_peanuts
cooked_type = /obj/item/reagent_containers/food/snacks/roasted_peanuts
/obj/item/reagent_containers/food/snacks/roasted_peanuts
name = "roasted peanuts"
desc = "A handful of roasted peanuts, with or without salt."
icon_state = "roasted_peanuts"
foodtype = VEGETABLES
list_reagents = list("nutriment" = 6, "vitamin" = 1)
juice_results = list("peanut_butter" = 3)
@@ -0,0 +1,34 @@
// Pineapple!
/obj/item/seeds/pineapple
name = "pack of pineapple seeds"
desc = "Oooooooooooooh!"
icon_state = "seed-pineapple"
species = "pineapple"
plantname = "Pineapple Plant"
product = /obj/item/reagent_containers/food/snacks/grown/pineapple
lifespan = 40
endurance = 30
growthstages = 3
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/apple)
reagents_add = list("vitamin" = 0.02, "nutriment" = 0.2, "water" = 0.04)
/obj/item/reagent_containers/food/snacks/grown/pineapple
seed = /obj/item/seeds/pineapple
name = "pineapples"
desc = "Blorble."
icon_state = "pineapple"
force = 4
throwforce = 8
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("stung", "pined")
throw_speed = 1
throw_range = 5
slice_path = /obj/item/reagent_containers/food/snacks/pineappleslice
slices_num = 3
filling_color = "#F6CB0B"
w_class = WEIGHT_CLASS_NORMAL
foodtype = FRUIT | PINEAPPLE
tastes = list("pineapple" = 1)
wine_power = 40
+67
View File
@@ -0,0 +1,67 @@
// Potato
/obj/item/seeds/potato
name = "pack of potato seeds"
desc = "Boil 'em! Mash 'em! Stick 'em in a stew!"
icon_state = "seed-potato"
species = "potato"
plantname = "Potato Plants"
product = /obj/item/reagent_containers/food/snacks/grown/potato
lifespan = 30
maturation = 10
production = 1
yield = 4
growthstages = 4
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
icon_grow = "potato-grow"
icon_dead = "potato-dead"
genes = list(/datum/plant_gene/trait/battery)
mutatelist = list(/obj/item/seeds/potato/sweet)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/reagent_containers/food/snacks/grown/potato
seed = /obj/item/seeds/potato
name = "potato"
desc = "Boil 'em! Mash 'em! Stick 'em in a stew!"
icon_state = "potato"
filling_color = "#E9967A"
bitesize = 100
foodtype = VEGETABLES
juice_results = list("potato" = 0)
distill_reagent = "vodka"
/obj/item/reagent_containers/food/snacks/grown/potato/wedges
name = "potato wedges"
desc = "Slices of neatly cut potato."
icon_state = "potato_wedges"
filling_color = "#E9967A"
bitesize = 100
/obj/item/reagent_containers/food/snacks/grown/potato/attackby(obj/item/W, mob/user, params)
if(W.is_sharp())
to_chat(user, "<span class='notice'>You cut the potato into wedges with [W].</span>")
var/obj/item/reagent_containers/food/snacks/grown/potato/wedges/Wedges = new /obj/item/reagent_containers/food/snacks/grown/potato/wedges
remove_item_from_storage(user)
qdel(src)
user.put_in_hands(Wedges)
else
return ..()
// Sweet Potato
/obj/item/seeds/potato/sweet
name = "pack of sweet potato seeds"
desc = "These seeds grow into sweet potato plants."
icon_state = "seed-sweetpotato"
species = "sweetpotato"
plantname = "Sweet Potato Plants"
product = /obj/item/reagent_containers/food/snacks/grown/potato/sweet
mutatelist = list()
reagents_add = list("vitamin" = 0.1, "sugar" = 0.1, "nutriment" = 0.1)
/obj/item/reagent_containers/food/snacks/grown/potato/sweet
seed = /obj/item/seeds/potato/sweet
name = "sweet potato"
desc = "It's sweet."
icon_state = "sweetpotato"
distill_reagent = "sbiten"
+60
View File
@@ -0,0 +1,60 @@
// Pumpkin
/obj/item/seeds/pumpkin
name = "pack of pumpkin seeds"
desc = "These seeds grow into pumpkin vines."
icon_state = "seed-pumpkin"
species = "pumpkin"
plantname = "Pumpkin Vines"
product = /obj/item/reagent_containers/food/snacks/grown/pumpkin
lifespan = 50
endurance = 40
growthstages = 3
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
icon_grow = "pumpkin-grow"
icon_dead = "pumpkin-dead"
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/pumpkin/blumpkin)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.2)
/obj/item/reagent_containers/food/snacks/grown/pumpkin
seed = /obj/item/seeds/pumpkin
name = "pumpkin"
desc = "It's large and scary."
icon_state = "pumpkin"
filling_color = "#FFA500"
bitesize_mod = 2
foodtype = FRUIT
juice_results = list("pumpkinjuice" = 0)
wine_power = 20
/obj/item/reagent_containers/food/snacks/grown/pumpkin/attackby(obj/item/W as obj, mob/user as mob, params)
if(W.is_sharp())
user.show_message("<span class='notice'>You carve a face into [src]!</span>", 1)
new /obj/item/clothing/head/hardhat/pumpkinhead(user.loc)
qdel(src)
return
else
return ..()
// Blumpkin
/obj/item/seeds/pumpkin/blumpkin
name = "pack of blumpkin seeds"
desc = "These seeds grow into blumpkin vines."
icon_state = "seed-blumpkin"
species = "blumpkin"
plantname = "Blumpkin Vines"
product = /obj/item/reagent_containers/food/snacks/grown/blumpkin
mutatelist = list()
reagents_add = list("ammonia" = 0.2, "chlorine" = 0.1, "nutriment" = 0.2)
rarity = 20
/obj/item/reagent_containers/food/snacks/grown/blumpkin
seed = /obj/item/seeds/pumpkin/blumpkin
name = "blumpkin"
desc = "The pumpkin's toxic sibling."
icon_state = "blumpkin"
filling_color = "#87CEFA"
bitesize_mod = 2
foodtype = FRUIT
juice_results = list("blumpkinjuice" = 0)
wine_power = 50
+35
View File
@@ -0,0 +1,35 @@
//Random seeds; stats, traits, and plant type are randomized for each seed.
/obj/item/seeds/random
name = "pack of strange seeds"
desc = "Mysterious seeds as strange as their name implies. Spooky."
icon_state = "seed-x"
species = "?????"
plantname = "strange plant"
product = /obj/item/reagent_containers/food/snacks/grown/random
icon_grow = "xpod-grow"
icon_dead = "xpod-dead"
icon_harvest = "xpod-harvest"
growthstages = 4
/obj/item/seeds/random/Initialize()
. = ..()
randomize_stats()
if(prob(60))
add_random_reagents(1, 3)
if(prob(50))
add_random_traits(1, 2)
add_random_plant_type(35)
/obj/item/reagent_containers/food/snacks/grown/random
seed = /obj/item/seeds/random
name = "strange plant"
desc = "What could this even be?"
icon_state = "crunchy"
bitesize_mod = 2
/obj/item/reagent_containers/food/snacks/grown/random/Initialize()
. = ..()
wine_power = rand(10,150)
if(prob(1))
wine_power = 200
@@ -0,0 +1,132 @@
// A very special plant, deserving it's own file.
/obj/item/seeds/replicapod
name = "pack of replica pod seeds"
desc = "These seeds grow into replica pods. They say these are used to harvest humans."
icon_state = "seed-replicapod"
species = "replicapod"
plantname = "Replica Pod"
product = /mob/living/carbon/human //verrry special -- Urist
lifespan = 50
endurance = 8
maturation = 10
production = 1
yield = 1 //seeds if there isn't a dna inside
potency = 30
var/volume = 5
var/ckey = null
var/realName = null
var/datum/mind/mind = null
var/blood_gender = null
var/blood_type = null
var/list/features = null
var/factions = null
var/list/quirks = null
var/contains_sample = 0
/obj/item/seeds/replicapod/Initialize()
. = ..()
create_reagents(volume, INJECTABLE | DRAWABLE)
/obj/item/seeds/replicapod/on_reagent_change(changetype)
if(changetype == ADD_REAGENT)
var/datum/reagent/blood/B = reagents.has_reagent("blood")
if(B)
if(B.data["mind"] && B.data["cloneable"])
mind = B.data["mind"]
ckey = B.data["ckey"]
realName = B.data["real_name"]
blood_gender = B.data["gender"]
blood_type = B.data["blood_type"]
features = B.data["features"]
factions = B.data["factions"]
factions = B.data["quirks"]
contains_sample = TRUE
visible_message("<span class='notice'>The [src] is injected with a fresh blood sample.</span>")
else
visible_message("<span class='warning'>The [src] rejects the sample!</span>")
if(!reagents.has_reagent("blood"))
mind = null
ckey = null
realName = null
blood_gender = null
blood_type = null
features = null
factions = null
contains_sample = FALSE
/obj/item/seeds/replicapod/get_analyzer_text()
var/text = ..()
if(contains_sample)
text += "\n It contains a blood sample!"
return text
/obj/item/seeds/replicapod/harvest(mob/user) //now that one is fun -- Urist
var/obj/machinery/hydroponics/parent = loc
var/make_podman = 0
var/ckey_holder = null
var/list/result = list()
if(CONFIG_GET(flag/revival_pod_plants))
if(ckey)
for(var/mob/M in GLOB.player_list)
if(isobserver(M))
var/mob/dead/observer/O = M
if(O.ckey == ckey && O.can_reenter_corpse)
make_podman = 1
break
else
if(M.ckey == ckey && M.stat == DEAD && !M.suiciding)
make_podman = 1
if(isliving(M))
var/mob/living/L = M
make_podman = !L.hellbound
break
else //If the player has ghosted from his corpse before blood was drawn, his ckey is no longer attached to the mob, so we need to match up the cloned player through the mind key
for(var/mob/M in GLOB.player_list)
if(mind && M.mind && ckey(M.mind.key) == ckey(mind.key) && M.ckey && M.client && M.stat == DEAD && !M.suiciding)
if(isobserver(M))
var/mob/dead/observer/O = M
if(!O.can_reenter_corpse)
break
make_podman = 1
if(isliving(M))
var/mob/living/L = M
make_podman = !L.hellbound
ckey_holder = M.ckey
break
if(make_podman) //all conditions met!
var/mob/living/carbon/human/podman = new /mob/living/carbon/human(parent.loc)
if(realName)
podman.real_name = realName
else
podman.real_name = "Pod Person ([rand(1,999)])"
mind.transfer_to(podman)
if(ckey)
podman.ckey = ckey
else
podman.ckey = ckey_holder
podman.gender = blood_gender
podman.faction |= factions
if(!features["mcolor"])
features["mcolor"] = "#59CE00"
for(var/V in quirks)
new V(podman)
podman.hardset_dna(null,null,podman.real_name,blood_type, new /datum/species/pod,features)//Discard SE's and UI's, podman cloning is inaccurate, and always make them a podman
podman.set_cloned_appearance()
else //else, one packet of seeds. maybe two
var/seed_count = 1
if(prob(getYield() * 20))
seed_count++
var/output_loc = parent.Adjacent(user) ? user.loc : parent.loc //needed for TK
for(var/i=0,i<seed_count,i++)
var/obj/item/seeds/replicapod/harvestseeds = src.Copy()
result.Add(harvestseeds)
harvestseeds.forceMove(output_loc)
parent.update_tray()
return result
+110
View File
@@ -0,0 +1,110 @@
// Carrot
/obj/item/seeds/carrot
name = "pack of carrot seeds"
desc = "These seeds grow into carrots."
icon_state = "seed-carrot"
species = "carrot"
plantname = "Carrots"
product = /obj/item/reagent_containers/food/snacks/grown/carrot
maturation = 10
production = 1
yield = 5
growthstages = 3
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
mutatelist = list(/obj/item/seeds/carrot/parsnip)
reagents_add = list("oculine" = 0.25, "vitamin" = 0.04, "nutriment" = 0.05)
/obj/item/reagent_containers/food/snacks/grown/carrot
seed = /obj/item/seeds/carrot
name = "carrot"
desc = "It's good for the eyes!"
icon_state = "carrot"
filling_color = "#FFA500"
bitesize_mod = 2
foodtype = VEGETABLES
juice_results = list("carrotjuice" = 0)
wine_power = 30
/obj/item/reagent_containers/food/snacks/grown/carrot/attackby(obj/item/I, mob/user, params)
if(I.is_sharp())
to_chat(user, "<span class='notice'>You sharpen the carrot into a shiv with [I].</span>")
var/obj/item/kitchen/knife/carrotshiv/Shiv = new /obj/item/kitchen/knife/carrotshiv
remove_item_from_storage(user)
qdel(src)
user.put_in_hands(Shiv)
else
return ..()
// Parsnip
/obj/item/seeds/carrot/parsnip
name = "pack of parsnip seeds"
desc = "These seeds grow into parsnips."
icon_state = "seed-parsnip"
species = "parsnip"
plantname = "Parsnip"
product = /obj/item/reagent_containers/food/snacks/grown/parsnip
icon_dead = "carrot-dead"
mutatelist = list()
reagents_add = list("vitamin" = 0.05, "nutriment" = 0.05)
/obj/item/reagent_containers/food/snacks/grown/parsnip
seed = /obj/item/seeds/carrot/parsnip
name = "parsnip"
desc = "Closely related to carrots."
icon_state = "parsnip"
bitesize_mod = 2
foodtype = VEGETABLES
juice_results = list("parsnipjuice" = 0)
wine_power = 35
// White-Beet
/obj/item/seeds/whitebeet
name = "pack of white-beet seeds"
desc = "These seeds grow into sugary beet producing plants."
icon_state = "seed-whitebeet"
species = "whitebeet"
plantname = "White-Beet Plants"
product = /obj/item/reagent_containers/food/snacks/grown/whitebeet
lifespan = 60
endurance = 50
yield = 6
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
icon_dead = "whitebeet-dead"
mutatelist = list(/obj/item/seeds/redbeet)
reagents_add = list("vitamin" = 0.04, "sugar" = 0.2, "nutriment" = 0.05)
/obj/item/reagent_containers/food/snacks/grown/whitebeet
seed = /obj/item/seeds/whitebeet
name = "white-beet"
desc = "You can't beat white-beet."
icon_state = "whitebeet"
filling_color = "#F4A460"
bitesize_mod = 2
foodtype = VEGETABLES
wine_power = 40
// Red Beet
/obj/item/seeds/redbeet
name = "pack of redbeet seeds"
desc = "These seeds grow into red beet producing plants."
icon_state = "seed-redbeet"
species = "redbeet"
plantname = "Red-Beet Plants"
product = /obj/item/reagent_containers/food/snacks/grown/redbeet
lifespan = 60
endurance = 50
yield = 6
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
icon_dead = "whitebeet-dead"
genes = list(/datum/plant_gene/trait/maxchem)
reagents_add = list("vitamin" = 0.05, "nutriment" = 0.05)
/obj/item/reagent_containers/food/snacks/grown/redbeet
seed = /obj/item/seeds/redbeet
name = "red beet"
desc = "You can't beat red beet."
icon_state = "redbeet"
bitesize_mod = 2
foodtype = VEGETABLES
wine_power = 60
@@ -0,0 +1,95 @@
// Tea
/obj/item/seeds/tea
name = "pack of tea aspera seeds"
desc = "These seeds grow into tea plants."
icon_state = "seed-teaaspera"
species = "teaaspera"
plantname = "Tea Aspera Plant"
product = /obj/item/reagent_containers/food/snacks/grown/tea
lifespan = 20
maturation = 5
production = 5
yield = 5
growthstages = 5
icon_dead = "tea-dead"
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/tea/astra)
reagents_add = list("teapowder" = 0.1)
/obj/item/reagent_containers/food/snacks/grown/tea
seed = /obj/item/seeds/tea
name = "Tea Aspera tips"
desc = "These aromatic tips of the tea plant can be dried to make tea."
icon_state = "tea_aspera_leaves"
filling_color = "#008000"
grind_results = list("teapowder" = 0)
dry_grind = TRUE
can_distill = FALSE
// Tea Astra
/obj/item/seeds/tea/astra
name = "pack of tea astra seeds"
icon_state = "seed-teaastra"
species = "teaastra"
plantname = "Tea Astra Plant"
product = /obj/item/reagent_containers/food/snacks/grown/tea/astra
mutatelist = list()
reagents_add = list("synaptizine" = 0.1, "vitamin" = 0.04, "teapowder" = 0.1)
rarity = 20
/obj/item/reagent_containers/food/snacks/grown/tea/astra
seed = /obj/item/seeds/tea/astra
name = "Tea Astra tips"
icon_state = "tea_astra_leaves"
filling_color = "#4582B4"
grind_results = list("teapowder" = 0, "salglu_solution" = 0)
// Coffee
/obj/item/seeds/coffee
name = "pack of coffee arabica seeds"
desc = "These seeds grow into coffee arabica bushes."
icon_state = "seed-coffeea"
species = "coffeea"
plantname = "Coffee Arabica Bush"
product = /obj/item/reagent_containers/food/snacks/grown/coffee
lifespan = 30
endurance = 20
maturation = 5
production = 5
yield = 5
growthstages = 5
icon_dead = "coffee-dead"
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/coffee/robusta)
reagents_add = list("vitamin" = 0.04, "coffeepowder" = 0.1)
/obj/item/reagent_containers/food/snacks/grown/coffee
seed = /obj/item/seeds/coffee
name = "coffee arabica beans"
desc = "Dry them out to make coffee."
icon_state = "coffee_arabica"
filling_color = "#DC143C"
bitesize_mod = 2
dry_grind = TRUE
grind_results = list("coffeepowder" = 0)
distill_reagent = "kahlua"
// Coffee Robusta
/obj/item/seeds/coffee/robusta
name = "pack of coffee robusta seeds"
desc = "These seeds grow into coffee robusta bushes."
icon_state = "seed-coffeer"
species = "coffeer"
plantname = "Coffee Robusta Bush"
product = /obj/item/reagent_containers/food/snacks/grown/coffee/robusta
mutatelist = list()
reagents_add = list("ephedrine" = 0.1, "vitamin" = 0.04, "coffeepowder" = 0.1)
rarity = 20
/obj/item/reagent_containers/food/snacks/grown/coffee/robusta
seed = /obj/item/seeds/coffee/robusta
name = "coffee robusta beans"
desc = "Increases robustness by 37 percent!"
icon_state = "coffee_robusta"
grind_results = list("coffeepowder" = 0, "morphine" = 0)
+44
View File
@@ -0,0 +1,44 @@
// Tobacco
/obj/item/seeds/tobacco
name = "pack of tobacco seeds"
desc = "These seeds grow into tobacco plants."
icon_state = "seed-tobacco"
species = "tobacco"
plantname = "Tobacco Plant"
product = /obj/item/reagent_containers/food/snacks/grown/tobacco
lifespan = 20
maturation = 5
production = 5
yield = 10
growthstages = 3
icon_dead = "tobacco-dead"
mutatelist = list(/obj/item/seeds/tobacco/space)
reagents_add = list("nicotine" = 0.03, "nutriment" = 0.03)
/obj/item/reagent_containers/food/snacks/grown/tobacco
seed = /obj/item/seeds/tobacco
name = "tobacco leaves"
desc = "Dry them out to make some smokes."
icon_state = "tobacco_leaves"
filling_color = "#008000"
distill_reagent = "creme_de_menthe" //Menthol, I guess.
// Space Tobacco
/obj/item/seeds/tobacco/space
name = "pack of space tobacco seeds"
desc = "These seeds grow into space tobacco plants."
icon_state = "seed-stobacco"
species = "stobacco"
plantname = "Space Tobacco Plant"
product = /obj/item/reagent_containers/food/snacks/grown/tobacco/space
mutatelist = list()
reagents_add = list("salbutamol" = 0.05, "nicotine" = 0.08, "nutriment" = 0.03)
rarity = 20
/obj/item/reagent_containers/food/snacks/grown/tobacco/space
seed = /obj/item/seeds/tobacco/space
name = "space tobacco leaves"
desc = "Dry them out to make some space-smokes."
icon_state = "stobacco_leaves"
distill_reagent = null
wine_power = 50
+147
View File
@@ -0,0 +1,147 @@
// Tomato
/obj/item/seeds/tomato
name = "pack of tomato seeds"
desc = "These seeds grow into tomato plants."
icon_state = "seed-tomato"
species = "tomato"
plantname = "Tomato Plants"
product = /obj/item/reagent_containers/food/snacks/grown/tomato
maturation = 8
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
icon_grow = "tomato-grow"
icon_dead = "tomato-dead"
genes = list(/datum/plant_gene/trait/squash, /datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/tomato/blue, /obj/item/seeds/tomato/blood, /obj/item/seeds/tomato/killer)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/reagent_containers/food/snacks/grown/tomato
seed = /obj/item/seeds/tomato
name = "tomato"
desc = "I say to-mah-to, you say tom-mae-to."
icon_state = "tomato"
splat_type = /obj/effect/decal/cleanable/tomato_smudge
filling_color = "#FF6347"
bitesize_mod = 2
foodtype = FRUIT
grind_results = list("ketchup" = 0)
juice_results = list("tomatojuice" = 0)
distill_reagent = "enzyme"
// Blood Tomato
/obj/item/seeds/tomato/blood
name = "pack of blood-tomato seeds"
desc = "These seeds grow into blood-tomato plants."
icon_state = "seed-bloodtomato"
species = "bloodtomato"
plantname = "Blood-Tomato Plants"
product = /obj/item/reagent_containers/food/snacks/grown/tomato/blood
mutatelist = list()
reagents_add = list("blood" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 20
/obj/item/reagent_containers/food/snacks/grown/tomato/blood
seed = /obj/item/seeds/tomato/blood
name = "blood-tomato"
desc = "So bloody...so...very...bloody....AHHHH!!!!"
icon_state = "bloodtomato"
splat_type = /obj/effect/gibspawner/generic
filling_color = "#FF0000"
foodtype = FRUIT | GROSS
grind_results = list("ketchup" = 0, "blood" = 0)
distill_reagent = "bloodymary"
// Blue Tomato
/obj/item/seeds/tomato/blue
name = "pack of blue-tomato seeds"
desc = "These seeds grow into blue-tomato plants."
icon_state = "seed-bluetomato"
species = "bluetomato"
plantname = "Blue-Tomato Plants"
product = /obj/item/reagent_containers/food/snacks/grown/tomato/blue
yield = 2
icon_grow = "bluetomato-grow"
mutatelist = list(/obj/item/seeds/tomato/blue/bluespace)
genes = list(/datum/plant_gene/trait/slip, /datum/plant_gene/trait/repeated_harvest)
reagents_add = list("lube" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 20
/obj/item/reagent_containers/food/snacks/grown/tomato/blue
seed = /obj/item/seeds/tomato/blue
name = "blue-tomato"
desc = "I say blue-mah-to, you say blue-mae-to."
icon_state = "bluetomato"
splat_type = /obj/effect/decal/cleanable/oil
filling_color = "#0000FF"
distill_reagent = "laughter"
// Bluespace Tomato
/obj/item/seeds/tomato/blue/bluespace
name = "pack of bluespace tomato seeds"
desc = "These seeds grow into bluespace tomato plants."
icon_state = "seed-bluespacetomato"
species = "bluespacetomato"
plantname = "Bluespace Tomato Plants"
product = /obj/item/reagent_containers/food/snacks/grown/tomato/blue/bluespace
yield = 2
mutatelist = list()
genes = list(/datum/plant_gene/trait/squash, /datum/plant_gene/trait/slip, /datum/plant_gene/trait/teleport, /datum/plant_gene/trait/repeated_harvest)
reagents_add = list("lube" = 0.2, "bluespace" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 50
/obj/item/reagent_containers/food/snacks/grown/tomato/blue/bluespace
seed = /obj/item/seeds/tomato/blue/bluespace
name = "bluespace tomato"
desc = "So lubricated, you might slip through space-time."
icon_state = "bluespacetomato"
distill_reagent = null
wine_power = 80
// Killer Tomato
/obj/item/seeds/tomato/killer
name = "pack of killer-tomato seeds"
desc = "These seeds grow into killer-tomato plants."
icon_state = "seed-killertomato"
species = "killertomato"
plantname = "Killer-Tomato Plants"
product = /obj/item/reagent_containers/food/snacks/grown/tomato/killer
yield = 2
genes = list(/datum/plant_gene/trait/squash)
growthstages = 2
icon_grow = "killertomato-grow"
icon_harvest = "killertomato-harvest"
icon_dead = "killertomato-dead"
mutatelist = list()
rarity = 30
/obj/item/reagent_containers/food/snacks/grown/tomato/killer
seed = /obj/item/seeds/tomato/killer
name = "killer-tomato"
desc = "I say to-mah-to, you say tom-mae-to... OH GOD IT'S EATING MY LEGS!!"
icon_state = "killertomato"
var/awakening = 0
filling_color = "#FF0000"
distill_reagent = "demonsblood"
/obj/item/reagent_containers/food/snacks/grown/tomato/killer/attack(mob/M, mob/user, def_zone)
if(awakening)
to_chat(user, "<span class='warning'>The tomato is twitching and shaking, preventing you from eating it.</span>")
return
..()
/obj/item/reagent_containers/food/snacks/grown/tomato/killer/attack_self(mob/user)
if(awakening || isspaceturf(user.loc))
return
to_chat(user, "<span class='notice'>You begin to awaken the Killer Tomato...</span>")
awakening = 1
spawn(30)
if(!QDELETED(src))
investigate_log("[key_name(user)] released a killer tomato at [COORD(src)]", INVESTIGATE_BOTANY)
var/mob/living/simple_animal/hostile/killertomato/K = new /mob/living/simple_animal/hostile/killertomato(get_turf(src.loc))
K.maxHealth += round(seed.endurance / 3)
K.melee_damage_lower += round(seed.potency / 10)
K.melee_damage_upper += round(seed.potency / 10)
K.move_to_delay -= round(seed.production / 50)
K.health = K.maxHealth
K.visible_message("<span class='notice'>The Killer Tomato growls as it suddenly awakens.</span>")
qdel(src)
+258
View File
@@ -0,0 +1,258 @@
/obj/item/seeds/tower
name = "pack of tower-cap mycelium"
desc = "This mycelium grows into tower-cap mushrooms."
icon_state = "mycelium-tower"
species = "towercap"
plantname = "Tower Caps"
product = /obj/item/grown/log
lifespan = 80
endurance = 50
maturation = 15
production = 1
yield = 5
potency = 50
growthstages = 3
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
icon_dead = "towercap-dead"
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism)
mutatelist = list(/obj/item/seeds/tower/steel)
/obj/item/seeds/tower/steel
name = "pack of steel-cap mycelium"
desc = "This mycelium grows into steel logs."
icon_state = "mycelium-steelcap"
species = "steelcap"
plantname = "Steel Caps"
product = /obj/item/grown/log/steel
mutatelist = list()
rarity = 20
/obj/item/grown/log
seed = /obj/item/seeds/tower
name = "tower-cap log"
desc = "It's better than bad, it's good!"
icon_state = "logs"
force = 5
throwforce = 5
w_class = WEIGHT_CLASS_NORMAL
throw_speed = 2
throw_range = 3
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
var/plank_type = /obj/item/stack/sheet/mineral/wood
var/plank_name = "wooden planks"
var/static/list/accepted = typecacheof(list(/obj/item/reagent_containers/food/snacks/grown/tobacco,
/obj/item/reagent_containers/food/snacks/grown/tea,
/obj/item/reagent_containers/food/snacks/grown/ambrosia/vulgaris,
/obj/item/reagent_containers/food/snacks/grown/ambrosia/deus,
/obj/item/reagent_containers/food/snacks/grown/wheat))
/obj/item/grown/log/attackby(obj/item/W, mob/user, params)
if(W.sharpness)
user.show_message("<span class='notice'>You make [plank_name] out of \the [src]!</span>", 1)
var/seed_modifier = 0
if(seed)
seed_modifier = round(seed.potency / 25)
var/obj/item/stack/plank = new plank_type(user.loc, 1 + seed_modifier)
var/old_plank_amount = plank.amount
for(var/obj/item/stack/ST in user.loc)
if(ST != plank && istype(ST, plank_type) && ST.amount < ST.max_amount)
ST.attackby(plank, user) //we try to transfer all old unfinished stacks to the new stack we created.
if(plank.amount > old_plank_amount)
to_chat(user, "<span class='notice'>You add the newly-formed [plank_name] to the stack. It now contains [plank.amount] [plank_name].</span>")
qdel(src)
if(CheckAccepted(W))
var/obj/item/reagent_containers/food/snacks/grown/leaf = W
if(leaf.dry)
user.show_message("<span class='notice'>You wrap \the [W] around the log, turning it into a torch!</span>")
var/obj/item/flashlight/flare/torch/T = new /obj/item/flashlight/flare/torch(user.loc)
usr.dropItemToGround(W)
usr.put_in_active_hand(T)
qdel(leaf)
qdel(src)
return
else
to_chat(usr, "<span class ='warning'>You must dry this first!</span>")
else
return ..()
/obj/item/grown/log/proc/CheckAccepted(obj/item/I)
return is_type_in_typecache(I, accepted)
/obj/item/grown/log/tree
seed = null
name = "wood log"
desc = "TIMMMMM-BERRRRRRRRRRR!"
/obj/item/grown/log/steel
seed = /obj/item/seeds/tower/steel
name = "steel-cap log"
desc = "It's made of metal."
icon_state = "steellogs"
plank_type = /obj/item/stack/rods
plank_name = "rods"
/obj/item/grown/log/steel/CheckAccepted(obj/item/I)
return FALSE
/////////BONFIRES//////////
/obj/structure/bonfire
name = "bonfire"
desc = "For grilling, broiling, charring, smoking, heating, roasting, toasting, simmering, searing, melting, and occasionally burning things."
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "bonfire"
light_color = LIGHT_COLOR_FIRE
density = FALSE
anchored = TRUE
buckle_lying = 0
var/burning = 0
var/burn_icon = "bonfire_on_fire" //for a softer more burning embers icon, use "bonfire_warm"
var/grill = FALSE
var/fire_stack_strength = 5
/obj/structure/bonfire/dense
density = TRUE
/obj/structure/bonfire/prelit/Initialize()
. = ..()
StartBurning()
/obj/structure/bonfire/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && (mover.pass_flags & PASSTABLE))
return TRUE
if(mover.throwing)
return TRUE
return ..()
/obj/structure/bonfire/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stack/rods) && !can_buckle && !grill)
var/obj/item/stack/rods/R = W
var/choice = input(user, "What would you like to construct?", "Bonfire") as null|anything in list("Stake","Grill")
switch(choice)
if("Stake")
R.use(1)
can_buckle = TRUE
buckle_requires_restraints = TRUE
to_chat(user, "<span class='italics'>You add a rod to \the [src].")
var/mutable_appearance/rod_underlay = mutable_appearance('icons/obj/hydroponics/equipment.dmi', "bonfire_rod")
rod_underlay.pixel_y = 16
underlays += rod_underlay
if("Grill")
R.use(1)
grill = TRUE
to_chat(user, "<span class='italics'>You add a grill to \the [src].")
add_overlay("bonfire_grill")
else
return ..()
if(W.is_hot())
StartBurning()
if(grill)
if(user.a_intent != INTENT_HARM && !(W.item_flags & ABSTRACT))
if(user.temporarilyRemoveItemFromInventory(W))
W.forceMove(get_turf(src))
var/list/click_params = params2list(params)
//Center the icon where the user clicked.
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
return
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
W.pixel_x = CLAMP(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
W.pixel_y = CLAMP(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
else
return ..()
/obj/structure/bonfire/attack_hand(mob/user)
. = ..()
if(.)
return
if(burning)
to_chat(user, "<span class='warning'>You need to extinguish [src] before removing the logs!</span>")
return
if(!has_buckled_mobs() && do_after(user, 50, target = src))
for(var/I in 1 to 5)
var/obj/item/grown/log/L = new /obj/item/grown/log(src.loc)
L.pixel_x += rand(1,4)
L.pixel_y += rand(1,4)
if(can_buckle || grill)
new /obj/item/stack/rods(loc, 1)
qdel(src)
return
/obj/structure/bonfire/proc/CheckOxygen()
if(isopenturf(loc))
var/turf/open/O = loc
if(O.air)
var/loc_gases = O.air.gases
if(loc_gases[/datum/gas/oxygen] > 13)
return TRUE
return FALSE
/obj/structure/bonfire/proc/StartBurning()
if(!burning && CheckOxygen())
icon_state = burn_icon
burning = TRUE
set_light(6)
Burn()
START_PROCESSING(SSobj, src)
/obj/structure/bonfire/fire_act(exposed_temperature, exposed_volume)
StartBurning()
/obj/structure/bonfire/Crossed(atom/movable/AM)
if(burning & !grill)
Burn()
/obj/structure/bonfire/proc/Burn()
var/turf/current_location = get_turf(src)
current_location.hotspot_expose(1000,100,1)
for(var/A in current_location)
if(A == src)
continue
if(isobj(A))
var/obj/O = A
O.fire_act(1000, 500)
else if(isliving(A))
var/mob/living/L = A
L.adjust_fire_stacks(fire_stack_strength)
L.IgniteMob()
/obj/structure/bonfire/proc/Cook()
var/turf/current_location = get_turf(src)
for(var/A in current_location)
if(A == src)
continue
else if(isliving(A)) //It's still a fire, idiot.
var/mob/living/L = A
L.adjust_fire_stacks(fire_stack_strength)
L.IgniteMob()
else if(istype(A, /obj/item) && prob(20))
var/obj/item/O = A
O.microwave_act()
/obj/structure/bonfire/process()
if(!CheckOxygen())
extinguish()
return
if(!grill)
Burn()
else
Cook()
/obj/structure/bonfire/extinguish()
if(burning)
icon_state = "bonfire"
burning = 0
set_light(0)
STOP_PROCESSING(SSobj, src)
/obj/structure/bonfire/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
if(..())
M.pixel_y += 13
/obj/structure/bonfire/unbuckle_mob(mob/living/buckled_mob, force=FALSE)
if(..())
buckled_mob.pixel_y -= 13
+62
View File
@@ -0,0 +1,62 @@
// **********************
// Other harvested materials from plants (that are not food)
// **********************
/obj/item/grown // Grown weapons
name = "grown_weapon"
icon = 'icons/obj/hydroponics/harvest.dmi'
resistance_flags = FLAMMABLE
var/obj/item/seeds/seed = null // type path, gets converted to item on New(). It's safe to assume it's always a seed item.
var/tastes = list("indescribable" = 1) //Stops runtimes. Grown are un-eatable anyways so if you do then its a bug
/obj/item/grown/Initialize(newloc, obj/item/seeds/new_seed)
. = ..()
create_reagents(50)
if(new_seed)
seed = new_seed.Copy()
else if(ispath(seed))
// This is for adminspawn or map-placed growns. They get the default stats of their seed type.
seed = new seed()
seed.adjust_potency(50-seed.potency)
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
if(seed)
for(var/datum/plant_gene/trait/T in seed.genes)
T.on_new(src, newloc)
if(istype(src, seed.product)) // no adding reagents if it is just a trash item
seed.prepare_result(src)
transform *= TRANSFORM_USING_VARIABLE(seed.potency, 100) + 0.5
add_juice()
/obj/item/grown/attackby(obj/item/O, mob/user, params)
..()
if (istype(O, /obj/item/plant_analyzer))
var/msg = "<span class='info'>*---------*\n This is \a <span class='name'>[src]</span>\n"
if(seed)
msg += seed.get_analyzer_text()
msg += "</span>"
to_chat(usr, msg)
return
/obj/item/grown/proc/add_juice()
if(reagents)
return 1
return 0
/obj/item/grown/throw_impact(atom/hit_atom)
if(!..()) //was it caught by a mob?
if(seed)
for(var/datum/plant_gene/trait/T in seed.genes)
T.on_throw_impact(src, hit_atom)
/obj/item/grown/microwave_act(obj/machine/microwave/M)
return
/obj/item/grown/on_grind()
for(var/i in 1 to grind_results.len)
grind_results[grind_results[i]] = round(seed.potency)
@@ -0,0 +1,195 @@
// Plant analyzer
/obj/item/plant_analyzer
name = "plant analyzer"
desc = "A scanner used to evaluate a plant's various areas of growth."
icon = 'icons/obj/device.dmi'
icon_state = "hydro"
item_state = "analyzer"
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
w_class = WEIGHT_CLASS_TINY
slot_flags = ITEM_SLOT_BELT
materials = list(MAT_METAL=30, MAT_GLASS=20)
// *************************************
// Hydroponics Tools
// *************************************
/obj/item/reagent_containers/spray/weedspray // -- Skie
desc = "It's a toxic mixture, in spray form, to kill small weeds."
icon = 'icons/obj/hydroponics/equipment.dmi'
name = "weed spray"
icon_state = "weedspray"
item_state = "spraycan"
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
volume = 100
list_reagents = list("weedkiller" = 100)
/obj/item/reagent_containers/spray/weedspray/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is huffing [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (TOXLOSS)
/obj/item/reagent_containers/spray/pestspray // -- Skie
desc = "It's some pest eliminator spray! <I>Do not inhale!</I>"
icon = 'icons/obj/hydroponics/equipment.dmi'
name = "pest spray"
icon_state = "pestspray"
item_state = "plantbgone"
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
volume = 100
list_reagents = list("pestkiller" = 100)
/obj/item/reagent_containers/spray/pestspray/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is huffing [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (TOXLOSS)
/obj/item/cultivator
name = "cultivator"
desc = "It's used for removing weeds or scratching your back."
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "cultivator"
item_state = "cultivator"
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
flags_1 = CONDUCT_1
force = 5
throwforce = 7
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=50)
attack_verb = list("slashed", "sliced", "cut", "clawed")
hitsound = 'sound/weapons/bladeslice.ogg'
/obj/item/cultivator/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is scratching [user.p_their()] back as hard as [user.p_they()] can with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (BRUTELOSS)
/obj/item/hatchet
name = "hatchet"
desc = "A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood."
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "hatchet"
item_state = "hatchet"
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
flags_1 = CONDUCT_1
force = 12
w_class = WEIGHT_CLASS_SMALL
throwforce = 15
throw_speed = 3
throw_range = 4
materials = list(MAT_METAL = 15000)
attack_verb = list("chopped", "torn", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
sharpness = IS_SHARP
/obj/item/hatchet/Initialize()
. = ..()
AddComponent(/datum/component/butchering, 70, 100)
/obj/item/hatchet/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is chopping at [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(src, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return (BRUTELOSS)
/obj/item/scythe
icon_state = "scythe0"
lefthand_file = 'icons/mob/inhands/weapons/polearms_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/polearms_righthand.dmi'
name = "scythe"
desc = "A sharp and curved blade on a long fibremetal handle, this tool makes it easy to reap what you sow."
force = 13
throwforce = 5
throw_speed = 2
throw_range = 3
w_class = WEIGHT_CLASS_BULKY
flags_1 = CONDUCT_1
armour_penetration = 20
slot_flags = ITEM_SLOT_BACK
attack_verb = list("chopped", "sliced", "cut", "reaped")
hitsound = 'sound/weapons/bladeslice.ogg'
var/swiping = FALSE
/obj/item/scythe/Initialize()
. = ..()
AddComponent(/datum/component/butchering, 90, 105)
/obj/item/scythe/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is beheading [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
if(iscarbon(user))
var/mob/living/carbon/C = user
var/obj/item/bodypart/BP = C.get_bodypart(BODY_ZONE_HEAD)
if(BP)
BP.drop_limb()
playsound(src,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
return (BRUTELOSS)
/obj/item/scythe/pre_attack(atom/A, mob/living/user, params)
if(swiping || !istype(A, /obj/structure/spacevine) || get_turf(A) == get_turf(user))
return ..()
else
var/turf/user_turf = get_turf(user)
var/dir_to_target = get_dir(user_turf, get_turf(A))
var/stam_gain = 0
swiping = TRUE
var/static/list/scythe_slash_angles = list(0, 45, 90, -45, -90)
for(var/i in scythe_slash_angles)
var/turf/T = get_step(user_turf, turn(dir_to_target, i))
for(var/obj/structure/spacevine/V in T)
if(user.Adjacent(V))
melee_attack_chain(user, V)
stam_gain += 5 //should be hitcost
swiping = FALSE
stam_gain += 2 //Initial hitcost
user.adjustStaminaLoss(-stam_gain)
// *************************************
// Nutrient defines for hydroponics
// *************************************
/obj/item/reagent_containers/glass/bottle/nutrient
name = "bottle of nutrient"
volume = 50
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(1,2,5,10,15,25,50)
/obj/item/reagent_containers/glass/bottle/nutrient/Initialize()
. = ..()
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
/obj/item/reagent_containers/glass/bottle/nutrient/ez
name = "bottle of E-Z-Nutrient"
desc = "Contains a fertilizer that causes mild mutations with each harvest."
list_reagents = list("eznutriment" = 50)
/obj/item/reagent_containers/glass/bottle/nutrient/l4z
name = "bottle of Left 4 Zed"
desc = "Contains a fertilizer that limits plant yields to no more than one and causes significant mutations in plants."
list_reagents = list("left4zednutriment" = 50)
/obj/item/reagent_containers/glass/bottle/nutrient/rh
name = "bottle of Robust Harvest"
desc = "Contains a fertilizer that increases the yield of a plant by 30% while causing no mutations."
list_reagents = list("robustharvestnutriment" = 50)
/obj/item/reagent_containers/glass/bottle/nutrient/empty
name = "bottle"
/obj/item/reagent_containers/glass/bottle/killer
volume = 50
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(1,2,5,10,15,25,50)
/obj/item/reagent_containers/glass/bottle/killer/weedkiller
name = "bottle of weed killer"
desc = "Contains a herbicide."
list_reagents = list("weedkiller" = 50)
/obj/item/reagent_containers/glass/bottle/killer/pestkiller
name = "bottle of pest spray"
desc = "Contains a pesticide."
list_reagents = list("pestkiller" = 50)
+921
View File
@@ -0,0 +1,921 @@
/obj/machinery/hydroponics
name = "hydroponics tray"
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "hydrotray"
density = TRUE
pixel_z = 8
obj_flags = CAN_BE_HIT | UNIQUE_RENAME
circuit = /obj/item/circuitboard/machine/hydroponics
var/waterlevel = 100 //The amount of water in the tray (max 100)
var/maxwater = 100 //The maximum amount of water in the tray
var/nutrilevel = 10 //The amount of nutrient in the tray (max 10)
var/maxnutri = 10 //The maximum nutrient of water in the tray
var/pestlevel = 0 //The amount of pests in the tray (max 10)
var/weedlevel = 0 //The amount of weeds in the tray (max 10)
var/yieldmod = 1 //Nutriment's effect on yield
var/mutmod = 1 //Nutriment's effect on mutations
var/toxic = 0 //Toxicity in the tray?
var/age = 0 //Current age
var/dead = 0 //Is it dead?
var/plant_health //Its health
var/lastproduce = 0 //Last time it was harvested
var/lastcycle = 0 //Used for timing of cycles.
var/cycledelay = 200 //About 10 seconds / cycle
var/harvest = 0 //Ready to harvest?
var/obj/item/seeds/myseed = null //The currently planted seed
var/rating = 1
var/unwrenchable = 1
var/recent_bee_visit = FALSE //Have we been visited by a bee recently, so bees dont overpollinate one plant
var/using_irrigation = FALSE //If the tray is connected to other trays via irrigation hoses
var/self_sufficiency_req = 20 //Required total dose to make a self-sufficient hydro tray. 1:1 with earthsblood.
var/self_sufficiency_progress = 0
var/self_sustaining = FALSE //If the tray generates nutrients and water on its own
/obj/machinery/hydroponics/constructable
name = "hydroponics tray"
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "hydrotray3"
/obj/machinery/hydroponics/constructable/RefreshParts()
var/tmp_capacity = 0
for (var/obj/item/stock_parts/matter_bin/M in component_parts)
tmp_capacity += M.rating
for (var/obj/item/stock_parts/manipulator/M in component_parts)
rating = M.rating
maxwater = tmp_capacity * 50 // Up to 300
maxnutri = tmp_capacity * 5 // Up to 30
/obj/machinery/hydroponics/Destroy()
if(myseed)
qdel(myseed)
myseed = null
return ..()
/obj/machinery/hydroponics/constructable/attackby(obj/item/I, mob/user, params)
if (user.a_intent != INTENT_HARM)
// handle opening the panel
if(default_deconstruction_screwdriver(user, icon_state, icon_state, I))
return
// handle deconstructing the machine, if permissible
if (I.tool_behaviour == TOOL_CROWBAR && using_irrigation)
to_chat(user, "<span class='warning'>Disconnect the hoses first!</span>")
return
else if(default_deconstruction_crowbar(I))
return
return ..()
/obj/machinery/hydroponics/proc/FindConnected()
var/list/connected = list()
var/list/processing_atoms = list(src)
while(processing_atoms.len)
var/atom/a = processing_atoms[1]
for(var/step_dir in GLOB.cardinals)
var/obj/machinery/hydroponics/h = locate() in get_step(a, step_dir)
// Soil plots aren't dense
if(h && h.using_irrigation && h.density && !(h in connected) && !(h in processing_atoms))
processing_atoms += h
processing_atoms -= a
connected += a
return connected
/obj/machinery/hydroponics/bullet_act(obj/item/projectile/Proj) //Works with the Somatoray to modify plant variables.
if(!myseed)
return ..()
if(istype(Proj , /obj/item/projectile/energy/floramut))
mutate()
else if(istype(Proj , /obj/item/projectile/energy/florayield))
return myseed.bullet_act(Proj)
else
return ..()
/obj/machinery/hydroponics/process()
var/needs_update = 0 // Checks if the icon needs updating so we don't redraw empty trays every time
if(myseed && (myseed.loc != src))
myseed.forceMove(src)
if(self_sustaining)
adjustNutri(1)
adjustWater(rand(3,5))
adjustWeeds(-2)
adjustPests(-2)
adjustToxic(-2)
if(world.time > (lastcycle + cycledelay))
lastcycle = world.time
if(myseed && !dead)
// Advance age
age++
if(age < myseed.maturation)
lastproduce = age
needs_update = 1
//Nutrients//////////////////////////////////////////////////////////////
// Nutrients deplete slowly
if(prob(50))
adjustNutri(-1 / rating)
// Lack of nutrients hurts non-weeds
if(nutrilevel <= 0 && !myseed.get_gene(/datum/plant_gene/trait/plant_type/weed_hardy))
adjustHealth(-rand(1,3))
//Photosynthesis/////////////////////////////////////////////////////////
// Lack of light hurts non-mushrooms
if(isturf(loc))
var/turf/currentTurf = loc
var/lightAmt = currentTurf.get_lumcount()
if(myseed.get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism))
if(lightAmt < 0.2)
adjustHealth(-1 / rating)
else // Non-mushroom
if(lightAmt < 0.4)
adjustHealth(-2 / rating)
//Water//////////////////////////////////////////////////////////////////
// Drink random amount of water
adjustWater(-rand(1,6) / rating)
// If the plant is dry, it loses health pretty fast, unless mushroom
if(waterlevel <= 10 && !myseed.get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism))
adjustHealth(-rand(0,1) / rating)
if(waterlevel <= 0)
adjustHealth(-rand(0,2) / rating)
// Sufficient water level and nutrient level = plant healthy but also spawns weeds
else if(waterlevel > 10 && nutrilevel > 0)
adjustHealth(rand(1,2) / rating)
if(myseed && prob(myseed.weed_chance))
adjustWeeds(myseed.weed_rate)
else if(prob(5)) //5 percent chance the weed population will increase
adjustWeeds(1 / rating)
//Toxins/////////////////////////////////////////////////////////////////
// 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)
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)
//Pests & Weeds//////////////////////////////////////////////////////////
else if(pestlevel >= 5)
adjustHealth(-1 / rating)
// If it's a weed, it doesn't stunt the growth
if(weedlevel >= 5 && !myseed.get_gene(/datum/plant_gene/trait/plant_type/weed_hardy))
adjustHealth(-1 / rating)
//Health & Age///////////////////////////////////////////////////////////
// Plant dies if plant_health <= 0
if(plant_health <= 0)
plantdies()
adjustWeeds(1 / rating) // Weeds flourish
// If the plant is too old, lose health fast
if(age > myseed.lifespan)
adjustHealth(-rand(1,5) / rating)
// Harvest code
if(age > myseed.production && (age - lastproduce) > myseed.production && (!harvest && !dead))
nutrimentMutation()
if(myseed && myseed.yield != -1) // Unharvestable shouldn't be harvested
harvest = 1
else
lastproduce = age
if(prob(5)) // On each tick, there's a 5 percent chance the pest population will increase
adjustPests(1 / rating)
else
if(waterlevel > 10 && nutrilevel > 0 && prob(10)) // If there's no plant, the percentage chance is 10%
adjustWeeds(1 / rating)
// Weeeeeeeeeeeeeeedddssss
if(weedlevel >= 10 && prob(50)) // At this point the plant is kind of fucked. Weeds can overtake the plant spot.
if(myseed)
if(!myseed.get_gene(/datum/plant_gene/trait/plant_type/weed_hardy) && !myseed.get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism)) // If a normal plant
weedinvasion()
else
weedinvasion() // Weed invasion into empty tray
needs_update = 1
if (needs_update)
update_icon()
return
/obj/machinery/hydroponics/proc/nutrimentMutation()
if (mutmod == 0)
return
if (mutmod == 1)
if(prob(80)) //80%
mutate()
else if(prob(75)) //15%
hardmutate()
return
if (mutmod == 2)
if(prob(50)) //50%
mutate()
else if(prob(50)) //25%
hardmutate()
else if(prob(50)) //12.5%
mutatespecie()
return
return
/obj/machinery/hydroponics/update_icon()
//Refreshes the icon and sets the luminosity
cut_overlays()
if(self_sustaining)
if(istype(src, /obj/machinery/hydroponics/soil))
add_atom_colour(rgb(255, 175, 0), FIXED_COLOUR_PRIORITY)
else
add_overlay(mutable_appearance('icons/obj/hydroponics/equipment.dmi', "gaia_blessing"))
set_light(3)
update_icon_hoses()
if(myseed)
update_icon_plant()
update_icon_lights()
if(!self_sustaining)
if(myseed && myseed.get_gene(/datum/plant_gene/trait/glow))
var/datum/plant_gene/trait/glow/G = myseed.get_gene(/datum/plant_gene/trait/glow)
set_light(G.glow_range(myseed), G.glow_power(myseed), G.glow_color)
else
set_light(0)
return
/obj/machinery/hydroponics/proc/update_icon_hoses()
var/n = 0
for(var/Dir in GLOB.cardinals)
var/obj/machinery/hydroponics/t = locate() in get_step(src,Dir)
if(t && t.using_irrigation && using_irrigation)
n += Dir
icon_state = "hoses-[n]"
/obj/machinery/hydroponics/proc/update_icon_plant()
var/mutable_appearance/plant_overlay = mutable_appearance(myseed.growing_icon, layer = OBJ_LAYER + 0.01)
if(dead)
plant_overlay.icon_state = myseed.icon_dead
else if(harvest)
if(!myseed.icon_harvest)
plant_overlay.icon_state = "[myseed.icon_grow][myseed.growthstages]"
else
plant_overlay.icon_state = myseed.icon_harvest
else
var/t_growthstate = min(round((age / myseed.maturation) * myseed.growthstages), myseed.growthstages)
plant_overlay.icon_state = "[myseed.icon_grow][t_growthstate]"
add_overlay(plant_overlay)
/obj/machinery/hydroponics/proc/update_icon_lights()
if(waterlevel <= 10)
add_overlay(mutable_appearance('icons/obj/hydroponics/equipment.dmi', "over_lowwater3"))
if(nutrilevel <= 2)
add_overlay(mutable_appearance('icons/obj/hydroponics/equipment.dmi', "over_lownutri3"))
if(plant_health <= (myseed.endurance / 2))
add_overlay(mutable_appearance('icons/obj/hydroponics/equipment.dmi', "over_lowhealth3"))
if(weedlevel >= 5 || pestlevel >= 5 || toxic >= 40)
add_overlay(mutable_appearance('icons/obj/hydroponics/equipment.dmi', "over_alert3"))
if(harvest)
add_overlay(mutable_appearance('icons/obj/hydroponics/equipment.dmi', "over_harvest3"))
/obj/machinery/hydroponics/examine(user)
..()
if(myseed)
to_chat(user, "<span class='info'>It has <span class='name'>[myseed.plantname]</span> planted.</span>")
if (dead)
to_chat(user, "<span class='warning'>It's dead!</span>")
else if (harvest)
to_chat(user, "<span class='info'>It's ready to harvest.</span>")
else if (plant_health <= (myseed.endurance / 2))
to_chat(user, "<span class='warning'>It looks unhealthy.</span>")
else
to_chat(user, "<span class='info'>It's empty.</span>")
if(!self_sustaining)
to_chat(user, "<span class='info'>Water: [waterlevel]/[maxwater].</span>")
to_chat(user, "<span class='info'>Nutrient: [nutrilevel]/[maxnutri].</span>")
if(self_sufficiency_progress > 0)
var/percent_progress = round(self_sufficiency_progress * 100 / self_sufficiency_req)
to_chat(user, "<span class='info'>Treatment for self-sustenance are [percent_progress]% complete.</span>")
else
to_chat(user, "<span class='info'>It doesn't require any water or nutrients.</span>")
if(weedlevel >= 5)
to_chat(user, "<span class='warning'>It's filled with weeds!</span>")
if(pestlevel >= 5)
to_chat(user, "<span class='warning'>It's filled with tiny worms!</span>")
to_chat(user, "" )
/obj/machinery/hydroponics/proc/weedinvasion() // If a weed growth is sufficient, this happens.
dead = 0
var/oldPlantName
if(myseed) // In case there's nothing in the tray beforehand
oldPlantName = myseed.plantname
qdel(myseed)
myseed = null
else
oldPlantName = "empty tray"
switch(rand(1,18)) // randomly pick predominative weed
if(16 to 18)
myseed = new /obj/item/seeds/reishi(src)
if(14 to 15)
myseed = new /obj/item/seeds/nettle(src)
if(12 to 13)
myseed = new /obj/item/seeds/harebell(src)
if(10 to 11)
myseed = new /obj/item/seeds/amanita(src)
if(8 to 9)
myseed = new /obj/item/seeds/chanter(src)
if(6 to 7)
myseed = new /obj/item/seeds/tower(src)
if(4 to 5)
myseed = new /obj/item/seeds/plump(src)
else
myseed = new /obj/item/seeds/starthistle(src)
age = 0
plant_health = myseed.endurance
lastcycle = world.time
harvest = 0
weedlevel = 0 // Reset
pestlevel = 0 // Reset
update_icon()
visible_message("<span class='warning'>The [oldPlantName] is overtaken by some [myseed.plantname]!</span>")
/obj/machinery/hydroponics/proc/mutate(lifemut = 2, endmut = 5, productmut = 1, yieldmut = 2, potmut = 25, wrmut = 2, wcmut = 5, traitmut = 0) // Mutates the current seed
if(!myseed)
return
myseed.mutate(lifemut, endmut, productmut, yieldmut, potmut, wrmut, wcmut, traitmut)
/obj/machinery/hydroponics/proc/hardmutate()
mutate(4, 10, 2, 4, 50, 4, 10, 3)
/obj/machinery/hydroponics/proc/mutatespecie() // Mutagent produced a new plant!
if(!myseed || dead)
return
var/oldPlantName = myseed.plantname
if(myseed.mutatelist.len > 0)
var/mutantseed = pick(myseed.mutatelist)
qdel(myseed)
myseed = null
myseed = new mutantseed
else
return
hardmutate()
age = 0
plant_health = myseed.endurance
lastcycle = world.time
harvest = 0
weedlevel = 0 // Reset
sleep(5) // Wait a while
update_icon()
visible_message("<span class='warning'>[oldPlantName] suddenly mutates into [myseed.plantname]!</span>")
/obj/machinery/hydroponics/proc/mutateweed() // If the weeds gets the mutagent instead. Mind you, this pretty much destroys the old plant
if( weedlevel > 5 )
if(myseed)
qdel(myseed)
myseed = null
var/newWeed = pick(/obj/item/seeds/liberty, /obj/item/seeds/angel, /obj/item/seeds/nettle/death, /obj/item/seeds/kudzu)
myseed = new newWeed
dead = 0
hardmutate()
age = 0
plant_health = myseed.endurance
lastcycle = world.time
harvest = 0
weedlevel = 0 // Reset
sleep(5) // Wait a while
update_icon()
visible_message("<span class='warning'>The mutated weeds in [src] spawn some [myseed.plantname]!</span>")
else
to_chat(usr, "<span class='warning'>The few weeds in [src] seem to react, but only for a moment...</span>")
/obj/machinery/hydroponics/proc/plantdies() // OH NOES!!!!! I put this all in one function to make things easier
plant_health = 0
harvest = 0
pestlevel = 0 // Pests die
if(!dead)
update_icon()
dead = 1
/obj/machinery/hydroponics/proc/mutatepest(mob/user)
if(pestlevel > 5)
message_admins("[ADMIN_LOOKUPFLW(user)] caused spiderling pests to spawn in a hydro tray")
log_game("[key_name(user)] caused spiderling pests to spawn in a hydro tray")
visible_message("<span class='warning'>The pests seem to behave oddly...</span>")
spawn_atom_to_turf(/obj/structure/spider/spiderling/hunter, src, 3, FALSE)
else
to_chat(user, "<span class='warning'>The pests seem to behave oddly, but quickly settle down...</span>")
/obj/machinery/hydroponics/proc/applyChemicals(datum/reagents/S, mob/user)
if(myseed)
myseed.on_chem_reaction(S) //In case seeds have some special interactions with special chems, currently only used by vines
// Requires 5 mutagen to possibly change species.// Poor man's mutagen.
if(S.has_reagent("mutagen", 5) || S.has_reagent("radium", 10) || S.has_reagent("uranium", 10))
switch(rand(100))
if(91 to 100)
adjustHealth(-10)
to_chat(user, "<span class='warning'>The plant shrivels and burns.</span>")
if(81 to 90)
mutatespecie()
if(66 to 80)
hardmutate()
if(41 to 65)
mutate()
if(21 to 41)
to_chat(user, "<span class='notice'>The plants don't seem to react...</span>")
if(11 to 20)
mutateweed()
if(1 to 10)
mutatepest(user)
else
to_chat(user, "<span class='notice'>Nothing happens...</span>")
// 2 or 1 units is enough to change the yield and other stats.// Can change the yield and other stats, but requires more than mutagen
else if(S.has_reagent("mutagen", 2) || S.has_reagent("radium", 5) || S.has_reagent("uranium", 5))
hardmutate()
else if(S.has_reagent("mutagen", 1) || S.has_reagent("radium", 2) || S.has_reagent("uranium", 2))
mutate()
// After handling the mutating, we now handle the damage from adding crude radioactives...
if(S.has_reagent("uranium", 1))
adjustHealth(-round(S.get_reagent_amount("uranium") * 1))
adjustToxic(round(S.get_reagent_amount("uranium") * 2))
if(S.has_reagent("radium", 1))
adjustHealth(-round(S.get_reagent_amount("radium") * 1))
adjustToxic(round(S.get_reagent_amount("radium") * 3)) // Radium is harsher (OOC: also easier to produce)
// Nutriments
if(S.has_reagent("eznutriment", 1))
yieldmod = 1
mutmod = 1
adjustNutri(round(S.get_reagent_amount("eznutriment") * 1))
if(S.has_reagent("left4zednutriment", 1))
yieldmod = 0
mutmod = 2
adjustNutri(round(S.get_reagent_amount("left4zednutriment") * 1))
if(S.has_reagent("robustharvestnutriment", 1))
yieldmod = 1.3
mutmod = 0
adjustNutri(round(S.get_reagent_amount("robustharvestnutriment") *1 ))
// Ambrosia Gaia produces earthsblood.
if(S.has_reagent("earthsblood"))
self_sufficiency_progress += S.get_reagent_amount("earthsblood")
if(self_sufficiency_progress >= self_sufficiency_req)
become_self_sufficient()
else if(!self_sustaining)
to_chat(user, "<span class='notice'>[src] warms as it might on a spring day under a genuine Sun.</span>")
// Antitoxin binds shit pretty well. So the tox goes significantly down
if(S.has_reagent("charcoal", 1))
adjustToxic(-round(S.get_reagent_amount("charcoal") * 2))
// NIGGA, YOU JUST WENT ON FULL RETARD.
if(S.has_reagent("toxin", 1))
adjustToxic(round(S.get_reagent_amount("toxin") * 2))
// Milk is good for humans, but bad for plants. The sugars canot be used by plants, and the milk fat fucks up growth. Not shrooms though. I can't deal with this now...
if(S.has_reagent("milk", 1))
adjustNutri(round(S.get_reagent_amount("milk") * 0.1))
adjustWater(round(S.get_reagent_amount("milk") * 0.9))
// Beer is a chemical composition of alcohol and various other things. It's a shitty nutrient but hey, it's still one. Also alcohol is bad, mmmkay?
if(S.has_reagent("beer", 1))
adjustHealth(-round(S.get_reagent_amount("beer") * 0.05))
adjustNutri(round(S.get_reagent_amount("beer") * 0.25))
adjustWater(round(S.get_reagent_amount("beer") * 0.7))
// You're an idiot for thinking that one of the most corrosive and deadly gasses would be beneficial
if(S.has_reagent("fluorine", 1))
adjustHealth(-round(S.get_reagent_amount("fluorine") * 2))
adjustToxic(round(S.get_reagent_amount("fluorine") * 2.5))
adjustWater(-round(S.get_reagent_amount("fluorine") * 0.5))
adjustWeeds(-rand(1,4))
// You're an idiot for thinking that one of the most corrosive and deadly gasses would be beneficial
if(S.has_reagent("chlorine", 1))
adjustHealth(-round(S.get_reagent_amount("chlorine") * 1))
adjustToxic(round(S.get_reagent_amount("chlorine") * 1.5))
adjustWater(-round(S.get_reagent_amount("chlorine") * 0.5))
adjustWeeds(-rand(1,3))
// White Phosphorous + water -> phosphoric acid. That's not a good thing really.
// Phosphoric salts are beneficial though. And even if the plant suffers, in the long run the tray gets some nutrients. The benefit isn't worth that much.
if(S.has_reagent("phosphorus", 1))
adjustHealth(-round(S.get_reagent_amount("phosphorus") * 0.75))
adjustNutri(round(S.get_reagent_amount("phosphorus") * 0.1))
adjustWater(-round(S.get_reagent_amount("phosphorus") * 0.5))
adjustWeeds(-rand(1,2))
// Plants should not have sugar, they can't use it and it prevents them getting water/ nutients, it is good for mold though...
if(S.has_reagent("sugar", 1))
adjustWeeds(rand(1,2))
adjustPests(rand(1,2))
adjustNutri(round(S.get_reagent_amount("sugar") * 0.1))
// It is water!
if(S.has_reagent("water", 1))
adjustWater(round(S.get_reagent_amount("water") * 1))
// Holy water. Mostly the same as water, it also heals the plant a little with the power of the spirits~
if(S.has_reagent("holywater", 1))
adjustWater(round(S.get_reagent_amount("holywater") * 1))
adjustHealth(round(S.get_reagent_amount("holywater") * 0.1))
// A variety of nutrients are dissolved in club soda, without sugar.
// These nutrients include carbon, oxygen, hydrogen, phosphorous, potassium, sulfur and sodium, all of which are needed for healthy plant growth.
if(S.has_reagent("sodawater", 1))
adjustWater(round(S.get_reagent_amount("sodawater") * 1))
adjustHealth(round(S.get_reagent_amount("sodawater") * 0.1))
adjustNutri(round(S.get_reagent_amount("sodawater") * 0.1))
// Man, you guys are retards
if(S.has_reagent("sacid", 1))
adjustHealth(-round(S.get_reagent_amount("sacid") * 1))
adjustToxic(round(S.get_reagent_amount("sacid") * 1.5))
adjustWeeds(-rand(1,2))
// SERIOUSLY
if(S.has_reagent("facid", 1))
adjustHealth(-round(S.get_reagent_amount("facid") * 2))
adjustToxic(round(S.get_reagent_amount("facid") * 3))
adjustWeeds(-rand(1,4))
// Plant-B-Gone is just as bad
if(S.has_reagent("plantbgone", 1))
adjustHealth(-round(S.get_reagent_amount("plantbgone") * 5))
adjustToxic(round(S.get_reagent_amount("plantbgone") * 6))
adjustWeeds(-rand(4,8))
// why, just why
if(S.has_reagent("napalm", 1))
if(!(myseed.resistance_flags & FIRE_PROOF))
adjustHealth(-round(S.get_reagent_amount("napalm") * 6))
adjustToxic(round(S.get_reagent_amount("napalm") * 7))
adjustWeeds(-rand(5,9))
//Weed Spray
if(S.has_reagent("weedkiller", 1))
adjustToxic(round(S.get_reagent_amount("weedkiller") * 0.5))
//old toxicity was 4, each spray is default 10 (minimal of 5) so 5 and 2.5 are the new ammounts
adjustWeeds(-rand(1,2))
//Pest Spray
if(S.has_reagent("pestkiller", 1))
adjustToxic(round(S.get_reagent_amount("pestkiller") * 0.5))
adjustPests(-rand(1,2))
// Healing
if(S.has_reagent("cryoxadone", 1))
adjustHealth(round(S.get_reagent_amount("cryoxadone") * 3))
adjustToxic(-round(S.get_reagent_amount("cryoxadone") * 3))
// Ammonia is bad ass.
if(S.has_reagent("ammonia", 1))
adjustHealth(round(S.get_reagent_amount("ammonia") * 0.5))
adjustNutri(round(S.get_reagent_amount("ammonia") * 1))
if(myseed)
myseed.adjust_yield(round(S.get_reagent_amount("ammonia") * 0.01))
// Saltpetre is used for gardening IRL, to simplify highly, it speeds up growth and strengthens plants
if(S.has_reagent("saltpetre", 1))
var/salt = S.get_reagent_amount("saltpetre")
adjustHealth(round(salt * 0.25))
if (myseed)
myseed.adjust_production(-round(salt/100)-prob(salt%100))
myseed.adjust_potency(round(salt*0.5))
// Ash is also used IRL in gardening, as a fertilizer enhancer and weed killer
if(S.has_reagent("ash", 1))
adjustHealth(round(S.get_reagent_amount("ash") * 0.25))
adjustNutri(round(S.get_reagent_amount("ash") * 0.5))
adjustWeeds(-1)
// This is more bad ass, and pests get hurt by the corrosive nature of it, not the plant.
if(S.has_reagent("diethylamine", 1))
adjustHealth(round(S.get_reagent_amount("diethylamine") * 1))
adjustNutri(round(S.get_reagent_amount("diethylamine") * 2))
if(myseed)
myseed.adjust_yield(round(S.get_reagent_amount("diethylamine") * 0.02))
adjustPests(-rand(1,2))
// Compost, effectively
if(S.has_reagent("nutriment", 1))
adjustHealth(round(S.get_reagent_amount("nutriment") * 0.5))
adjustNutri(round(S.get_reagent_amount("nutriment") * 1))
// Compost for EVERYTHING
if(S.has_reagent("virusfood", 1))
adjustNutri(round(S.get_reagent_amount("virusfood") * 0.5))
adjustHealth(-round(S.get_reagent_amount("virusfood") * 0.5))
// FEED ME
if(S.has_reagent("blood", 1))
adjustNutri(round(S.get_reagent_amount("blood") * 1))
adjustPests(rand(2,4))
// FEED ME SEYMOUR
if(S.has_reagent("strangereagent", 1))
spawnplant()
// The best stuff there is. For testing/debugging.
if(S.has_reagent("adminordrazine", 1))
adjustWater(round(S.get_reagent_amount("adminordrazine") * 1))
adjustHealth(round(S.get_reagent_amount("adminordrazine") * 1))
adjustNutri(round(S.get_reagent_amount("adminordrazine") * 1))
adjustPests(-rand(1,5))
adjustWeeds(-rand(1,5))
if(S.has_reagent("adminordrazine", 5))
switch(rand(100))
if(66 to 100)
mutatespecie()
if(33 to 65)
mutateweed()
if(1 to 32)
mutatepest(user)
else
to_chat(user, "<span class='warning'>Nothing happens...</span>")
/obj/machinery/hydroponics/attackby(obj/item/O, mob/user, params)
//Called when mob user "attacks" it with object O
if(istype(O, /obj/item/reagent_containers) ) // Syringe stuff (and other reagent containers now too)
var/obj/item/reagent_containers/reagent_source = O
if(istype(reagent_source, /obj/item/reagent_containers/syringe))
var/obj/item/reagent_containers/syringe/syr = reagent_source
if(syr.mode != 1)
to_chat(user, "<span class='warning'>You can't get any extract out of this plant.</span>" )
return
if(!reagent_source.reagents.total_volume)
to_chat(user, "<span class='notice'>[reagent_source] is empty.</span>")
return 1
var/list/trays = list(src)//makes the list just this in cases of syringes and compost etc
var/target = myseed ? myseed.plantname : src
var/visi_msg = ""
var/irrigate = 0 //How am I supposed to irrigate pill contents?
var/transfer_amount
if(istype(reagent_source, /obj/item/reagent_containers/food/snacks) || istype(reagent_source, /obj/item/reagent_containers/pill))
visi_msg="[user] composts [reagent_source], spreading it through [target]"
transfer_amount = reagent_source.reagents.total_volume
else
transfer_amount = reagent_source.amount_per_transfer_from_this
if(istype(reagent_source, /obj/item/reagent_containers/syringe/))
var/obj/item/reagent_containers/syringe/syr = reagent_source
visi_msg="[user] injects [target] with [syr]"
if(syr.reagents.total_volume <= syr.amount_per_transfer_from_this)
syr.mode = 0
else if(istype(reagent_source, /obj/item/reagent_containers/spray/))
visi_msg="[user] sprays [target] with [reagent_source]"
playsound(loc, 'sound/effects/spray3.ogg', 50, 1, -6)
irrigate = 1
else if(transfer_amount) // Droppers, cans, beakers, what have you.
visi_msg="[user] uses [reagent_source] on [target]"
irrigate = 1
// Beakers, bottles, buckets, etc.
if(reagent_source.is_drainable())
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
if(irrigate && transfer_amount > 30 && reagent_source.reagents.total_volume >= 30 && using_irrigation)
trays = FindConnected()
if (trays.len > 1)
visi_msg += ", setting off the irrigation system"
if(visi_msg)
visible_message("<span class='notice'>[visi_msg].</span>")
var/split = round(transfer_amount/trays.len)
for(var/obj/machinery/hydroponics/H in trays)
//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
var/datum/reagents/S = new /datum/reagents() //This is a strange way, but I don't know of a better one so I can't fix it at the moment...
S.my_atom = H
reagent_source.reagents.trans_to(S,split)
if(istype(reagent_source, /obj/item/reagent_containers/food/snacks) || istype(reagent_source, /obj/item/reagent_containers/pill))
qdel(reagent_source)
H.applyChemicals(S, user)
S.clear_reagents()
qdel(S)
H.update_icon()
if(reagent_source) // If the source wasn't composted and destroyed
reagent_source.update_icon()
return 1
else if(istype(O, /obj/item/seeds) && !istype(O, /obj/item/seeds/sample))
if(!myseed)
if(istype(O, /obj/item/seeds/kudzu))
investigate_log("had Kudzu planted in it by [key_name(user)] at [AREACOORD(src)]","kudzu")
if(!user.transferItemToLoc(O, src))
return
to_chat(user, "<span class='notice'>You plant [O].</span>")
dead = 0
myseed = O
age = 1
plant_health = myseed.endurance
lastcycle = world.time
update_icon()
else
to_chat(user, "<span class='warning'>[src] already has seeds in it!</span>")
else if(istype(O, /obj/item/plant_analyzer))
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)
else
to_chat(user, "<B>No plant found.</B>")
to_chat(user, "- Weed level: <span class='notice'>[weedlevel] / 10</span>")
to_chat(user, "- Pest level: <span class='notice'>[pestlevel] / 10</span>")
to_chat(user, "- Toxicity level: <span class='notice'>[toxic] / 100</span>")
to_chat(user, "- Water level: <span class='notice'>[waterlevel] / [maxwater]</span>")
to_chat(user, "- Nutrition level: <span class='notice'>[nutrilevel] / [maxnutri]</span>")
to_chat(user, "")
else if(istype(O, /obj/item/cultivator))
if(weedlevel > 0)
user.visible_message("[user] uproots the weeds.", "<span class='notice'>You remove the weeds from [src].</span>")
weedlevel = 0
update_icon()
else
to_chat(user, "<span class='warning'>This plot is completely devoid of weeds! It doesn't need uprooting.</span>")
else if(istype(O, /obj/item/storage/bag/plants))
attack_hand(user)
for(var/obj/item/reagent_containers/food/snacks/grown/G in locate(user.x,user.y,user.z))
SEND_SIGNAL(O, COMSIG_TRY_STORAGE_INSERT, G, user, TRUE)
else if(default_unfasten_wrench(user, O))
return
else if(istype(O, /obj/item/wirecutters) && unwrenchable)
if (!anchored)
to_chat(user, "<span class='warning'>Anchor the tray first!</span>")
return
using_irrigation = !using_irrigation
O.play_tool_sound(src)
user.visible_message("<span class='notice'>[user] [using_irrigation ? "" : "dis"]connects [src]'s irrigation hoses.</span>", \
"<span class='notice'>You [using_irrigation ? "" : "dis"]connect [src]'s irrigation hoses.</span>")
for(var/obj/machinery/hydroponics/h in range(1,src))
h.update_icon()
else if(istype(O, /obj/item/shovel/spade))
if(!myseed && !weedlevel)
to_chat(user, "<span class='warning'>[src] doesn't have any plants or weeds!</span>")
return
user.visible_message("<span class='notice'>[user] starts digging out [src]'s plants...</span>",
"<span class='notice'>You start digging out [src]'s plants...</span>")
if(O.use_tool(src, user, 50, volume=50) || (!myseed && !weedlevel))
user.visible_message("<span class='notice'>[user] digs out the plants in [src]!</span>", "<span class='notice'>You dig out all of [src]'s plants!</span>")
if(myseed) //Could be that they're just using it as a de-weeder
age = 0
plant_health = 0
if(harvest)
harvest = FALSE //To make sure they can't just put in another seed and insta-harvest it
qdel(myseed)
myseed = null
weedlevel = 0 //Has a side effect of cleaning up those nasty weeds
update_icon()
else
return ..()
/obj/machinery/hydroponics/can_be_unfasten_wrench(mob/user, silent)
if (!unwrenchable) // case also covered by NODECONSTRUCT checks in default_unfasten_wrench
return CANT_UNFASTEN
if (using_irrigation)
if (!silent)
to_chat(user, "<span class='warning'>Disconnect the hoses first!</span>")
return FAILED_UNFASTEN
return ..()
/obj/machinery/hydroponics/attack_hand(mob/user)
. = ..()
if(.)
return
if(issilicon(user)) //How does AI know what plant is?
return
if(harvest)
return myseed.harvest(user)
else if(dead)
dead = 0
to_chat(user, "<span class='notice'>You remove the dead plant from [src].</span>")
qdel(myseed)
myseed = null
update_icon()
else
if(user)
examine(user)
/obj/machinery/hydroponics/proc/update_tray(mob/user)
harvest = 0
lastproduce = age
if(istype(myseed, /obj/item/seeds/replicapod))
to_chat(user, "<span class='notice'>You harvest from the [myseed.plantname].</span>")
else if(myseed.getYield() <= 0)
to_chat(user, "<span class='warning'>You fail to harvest anything useful!</span>")
else
to_chat(user, "<span class='notice'>You harvest [myseed.getYield()] items from the [myseed.plantname].</span>")
if(!myseed.get_gene(/datum/plant_gene/trait/repeated_harvest))
qdel(myseed)
myseed = null
dead = 0
update_icon()
/// Tray Setters - The following procs adjust the tray or plants variables, and make sure that the stat doesn't go out of bounds.///
/obj/machinery/hydroponics/proc/adjustNutri(adjustamt)
nutrilevel = CLAMP(nutrilevel + adjustamt, 0, maxnutri)
/obj/machinery/hydroponics/proc/adjustWater(adjustamt)
waterlevel = CLAMP(waterlevel + adjustamt, 0, maxwater)
if(adjustamt>0)
adjustToxic(-round(adjustamt/4))//Toxicity dilutation code. The more water you put in, the lesser the toxin concentration.
/obj/machinery/hydroponics/proc/adjustHealth(adjustamt)
if(myseed && !dead)
plant_health = CLAMP(plant_health + adjustamt, 0, myseed.endurance)
/obj/machinery/hydroponics/proc/adjustToxic(adjustamt)
toxic = CLAMP(toxic + adjustamt, 0, 100)
/obj/machinery/hydroponics/proc/adjustPests(adjustamt)
pestlevel = CLAMP(pestlevel + adjustamt, 0, 10)
/obj/machinery/hydroponics/proc/adjustWeeds(adjustamt)
weedlevel = CLAMP(weedlevel + adjustamt, 0, 10)
/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)
var/mob/living/simple_animal/hostile/C = new chosen
C.faction = list("plants")
/obj/machinery/hydroponics/proc/become_self_sufficient() // Ambrosia Gaia effect
visible_message("<span class='boldnotice'>[src] begins to glow with a beautiful light!</span>")
self_sustaining = TRUE
update_icon()
///////////////////////////////////////////////////////////////////////////////
/obj/machinery/hydroponics/soil //Not actually hydroponics at all! Honk!
name = "soil"
desc = "A patch of dirt."
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "soil"
circuit = null
density = FALSE
use_power = NO_POWER_USE
flags_1 = NODECONSTRUCT_1
unwrenchable = FALSE
/obj/machinery/hydroponics/soil/update_icon_hoses()
return // Has no hoses
/obj/machinery/hydroponics/soil/update_icon_lights()
return // Has no lights
/obj/machinery/hydroponics/soil/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/shovel) && !istype(O, /obj/item/shovel/spade)) //Doesn't include spades because of uprooting plants
to_chat(user, "<span class='notice'>You clear up [src]!</span>")
qdel(src)
else
return ..()
+414
View File
@@ -0,0 +1,414 @@
/datum/plant_gene
var/name
/datum/plant_gene/proc/get_name() // Used for manipulator display and gene disk name.
return name
/datum/plant_gene/proc/can_add(obj/item/seeds/S)
return !istype(S, /obj/item/seeds/sample) // Samples can't accept new genes
/datum/plant_gene/proc/Copy()
return new type
/datum/plant_gene/proc/apply_vars(obj/item/seeds/S) // currently used for fire resist, can prob. be further refactored
return
// Core plant genes store 5 main variables: lifespan, endurance, production, yield, potency
/datum/plant_gene/core
var/value
/datum/plant_gene/core/get_name()
return "[name] [value]"
/datum/plant_gene/core/proc/apply_stat(obj/item/seeds/S)
return
/datum/plant_gene/core/New(var/i = null)
..()
if(!isnull(i))
value = i
/datum/plant_gene/core/Copy()
var/datum/plant_gene/core/C = ..()
C.value = value
return C
/datum/plant_gene/core/can_add(obj/item/seeds/S)
if(!..())
return FALSE
return S.get_gene(src.type)
/datum/plant_gene/core/lifespan
name = "Lifespan"
value = 25
/datum/plant_gene/core/lifespan/apply_stat(obj/item/seeds/S)
S.lifespan = value
/datum/plant_gene/core/endurance
name = "Endurance"
value = 15
/datum/plant_gene/core/endurance/apply_stat(obj/item/seeds/S)
S.endurance = value
/datum/plant_gene/core/production
name = "Production Speed"
value = 6
/datum/plant_gene/core/production/apply_stat(obj/item/seeds/S)
S.production = value
/datum/plant_gene/core/yield
name = "Yield"
value = 3
/datum/plant_gene/core/yield/apply_stat(obj/item/seeds/S)
S.yield = value
/datum/plant_gene/core/potency
name = "Potency"
value = 10
/datum/plant_gene/core/potency/apply_stat(obj/item/seeds/S)
S.potency = value
/datum/plant_gene/core/weed_rate
name = "Weed Growth Rate"
value = 1
/datum/plant_gene/core/weed_rate/apply_stat(obj/item/seeds/S)
S.weed_rate = value
/datum/plant_gene/core/weed_chance
name = "Weed Vulnerability"
value = 5
/datum/plant_gene/core/weed_chance/apply_stat(obj/item/seeds/S)
S.weed_chance = value
// Reagent genes store reagent ID and reagent ratio. Amount of reagent in the plant = 1 + (potency * rate)
/datum/plant_gene/reagent
name = "Nutriment"
var/reagent_id = "nutriment"
var/rate = 0.04
/datum/plant_gene/reagent/get_name()
return "[name] production [rate*100]%"
/datum/plant_gene/reagent/proc/set_reagent(reag_id)
reagent_id = reag_id
name = "UNKNOWN"
var/datum/reagent/R = GLOB.chemical_reagents_list[reag_id]
if(R && R.id == reagent_id)
name = R.name
/datum/plant_gene/reagent/New(reag_id = null, reag_rate = 0)
..()
if(reag_id && reag_rate)
set_reagent(reag_id)
rate = reag_rate
/datum/plant_gene/reagent/Copy()
var/datum/plant_gene/reagent/G = ..()
G.name = name
G.reagent_id = reagent_id
G.rate = rate
return G
/datum/plant_gene/reagent/can_add(obj/item/seeds/S)
if(!..())
return FALSE
for(var/datum/plant_gene/reagent/R in S.genes)
if(R.reagent_id == reagent_id)
return FALSE
return TRUE
// Various traits affecting the product. Each must be somehow useful.
/datum/plant_gene/trait
var/rate = 0.05
var/examine_line = ""
var/trait_id // must be set and equal for any two traits of the same type
/datum/plant_gene/trait/Copy()
var/datum/plant_gene/trait/G = ..()
G.rate = rate
return G
/datum/plant_gene/trait/can_add(obj/item/seeds/S)
if(!..())
return FALSE
for(var/datum/plant_gene/trait/R in S.genes)
if(trait_id && R.trait_id == trait_id)
return FALSE
if(type == R.type)
return FALSE
return TRUE
/datum/plant_gene/trait/proc/on_new(obj/item/reagent_containers/food/snacks/grown/G, newloc)
return
/datum/plant_gene/trait/proc/on_consume(obj/item/reagent_containers/food/snacks/grown/G, mob/living/carbon/target)
return
/datum/plant_gene/trait/proc/on_slip(obj/item/reagent_containers/food/snacks/grown/G, mob/living/carbon/target)
return
/datum/plant_gene/trait/proc/on_squash(obj/item/reagent_containers/food/snacks/grown/G, atom/target)
return
/datum/plant_gene/trait/proc/on_attackby(obj/item/reagent_containers/food/snacks/grown/G, obj/item/I, mob/user)
return
/datum/plant_gene/trait/proc/on_throw_impact(obj/item/reagent_containers/food/snacks/grown/G, atom/target)
return
/datum/plant_gene/trait/squash
// Allows the plant to be squashed when thrown or slipped on, leaving a colored mess and trash type item behind.
// Also splashes everything in target turf with reagents and applies other trait effects (teleporting, etc) to the target by on_squash.
// For code, see grown.dm
name = "Liquid Contents"
examine_line = "<span class='info'>It has a lot of liquid contents inside.</span>"
/datum/plant_gene/trait/slip
// Makes plant slippery, unless it has a grown-type trash. Then the trash gets slippery.
// Applies other trait effects (teleporting, etc) to the target by on_slip.
name = "Slippery Skin"
rate = 1.6
examine_line = "<span class='info'>It has a very slippery skin.</span>"
/datum/plant_gene/trait/slip/on_new(obj/item/reagent_containers/food/snacks/grown/G, newloc)
..()
if(istype(G) && ispath(G.trash, /obj/item/grown))
return
var/obj/item/seeds/seed = G.seed
var/stun_len = seed.potency * rate
if(!istype(G, /obj/item/grown/bananapeel) && (!G.reagents || !G.reagents.has_reagent("lube")))
stun_len /= 3
G.AddComponent(/datum/component/slippery, min(stun_len,140), NONE, CALLBACK(src, .proc/handle_slip, G))
/datum/plant_gene/trait/slip/proc/handle_slip(obj/item/reagent_containers/food/snacks/grown/G, mob/M)
for(var/datum/plant_gene/trait/T in G.seed.genes)
T.on_slip(G, M)
/datum/plant_gene/trait/cell_charge
// Cell recharging trait. Charges all mob's power cells to (potency*rate)% mark when eaten.
// Generates sparks on squash.
// Small (potency*rate*5) chance to shock squish or slip target for (potency*rate*5) damage.
// Also affects plant batteries see capatative cell production datum
name = "Electrical Activity"
rate = 0.2
/datum/plant_gene/trait/cell_charge/on_slip(obj/item/reagent_containers/food/snacks/grown/G, mob/living/carbon/C)
var/power = G.seed.potency*rate
if(prob(power))
C.electrocute_act(round(power), G, 1, 1)
/datum/plant_gene/trait/cell_charge/on_squash(obj/item/reagent_containers/food/snacks/grown/G, atom/target)
if(iscarbon(target))
var/mob/living/carbon/C = target
var/power = G.seed.potency*rate
if(prob(power))
C.electrocute_act(round(power), G, 1, 1)
/datum/plant_gene/trait/cell_charge/on_consume(obj/item/reagent_containers/food/snacks/grown/G, mob/living/carbon/target)
if(!G.reagents.total_volume)
var/batteries_recharged = 0
for(var/obj/item/stock_parts/cell/C in target.GetAllContents())
var/newcharge = min(G.seed.potency*0.01*C.maxcharge, C.maxcharge)
if(C.charge < newcharge)
C.charge = newcharge
if(isobj(C.loc))
var/obj/O = C.loc
O.update_icon() //update power meters and such
C.update_icon()
batteries_recharged = 1
if(batteries_recharged)
to_chat(target, "<span class='notice'>Your batteries are recharged!</span>")
/datum/plant_gene/trait/glow
// Makes plant glow. Makes plant in tray glow too.
// Adds 1 + potency*rate light range and potency*(rate + 0.01) light_power to products.
name = "Bioluminescence"
rate = 0.03
examine_line = "<span class='info'>It emits a soft glow.</span>"
trait_id = "glow"
var/glow_color = "#C3E381"
/datum/plant_gene/trait/glow/proc/glow_range(obj/item/seeds/S)
return 1.4 + S.potency*rate
/datum/plant_gene/trait/glow/proc/glow_power(obj/item/seeds/S)
return max(S.potency*(rate + 0.01), 0.1)
/datum/plant_gene/trait/glow/on_new(obj/item/reagent_containers/food/snacks/grown/G, newloc)
..()
G.set_light(glow_range(G.seed), glow_power(G.seed), glow_color)
/datum/plant_gene/trait/glow/shadow
//makes plant emit slightly purple shadows
//adds -potency*(rate*0.2) light power to products
name = "Shadow Emission"
rate = 0.04
glow_color = "#AAD84B"
/datum/plant_gene/trait/glow/shadow/glow_power(obj/item/seeds/S)
return -max(S.potency*(rate*0.2), 0.2)
/datum/plant_gene/trait/glow/red
name = "Red Electrical Glow"
glow_color = LIGHT_COLOR_RED
/datum/plant_gene/trait/glow/berry
name = "Strong Bioluminescence"
rate = 0.05
glow_color = null
/datum/plant_gene/trait/teleport
// Makes plant teleport people when squashed or slipped on.
// Teleport radius is calculated as max(round(potency*rate), 1)
name = "Bluespace Activity"
rate = 0.1
/datum/plant_gene/trait/teleport/on_squash(obj/item/reagent_containers/food/snacks/grown/G, atom/target)
if(isliving(target))
var/teleport_radius = max(round(G.seed.potency / 10), 1)
var/turf/T = get_turf(target)
new /obj/effect/decal/cleanable/molten_object(T) //Leave a pile of goo behind for dramatic effect...
do_teleport(target, T, teleport_radius, channel = TELEPORT_CHANNEL_BLUESPACE)
/datum/plant_gene/trait/teleport/on_slip(obj/item/reagent_containers/food/snacks/grown/G, mob/living/carbon/C)
var/teleport_radius = max(round(G.seed.potency / 10), 1)
var/turf/T = get_turf(C)
to_chat(C, "<span class='warning'>You slip through spacetime!</span>")
do_teleport(C, T, teleport_radius, channel = TELEPORT_CHANNEL_BLUESPACE)
if(prob(50))
do_teleport(G, T, teleport_radius, channel = TELEPORT_CHANNEL_BLUESPACE)
else
new /obj/effect/decal/cleanable/molten_object(T) //Leave a pile of goo behind for dramatic effect...
qdel(G)
/datum/plant_gene/trait/noreact
// Makes plant reagents not react until squashed.
name = "Separated Chemicals"
/datum/plant_gene/trait/noreact/on_new(obj/item/reagent_containers/food/snacks/grown/G, newloc)
..()
ENABLE_BITFIELD(G.reagents.reagents_holder_flags, NO_REACT)
/datum/plant_gene/trait/noreact/on_squash(obj/item/reagent_containers/food/snacks/grown/G, atom/target)
DISABLE_BITFIELD(G.reagents.reagents_holder_flags, NO_REACT)
G.reagents.handle_reactions()
/datum/plant_gene/trait/maxchem
// 2x to max reagents volume.
name = "Densified Chemicals"
rate = 2
/datum/plant_gene/trait/maxchem/on_new(obj/item/reagent_containers/food/snacks/grown/G, newloc)
..()
G.reagents.maximum_volume *= rate
/datum/plant_gene/trait/repeated_harvest
name = "Perennial Growth"
/datum/plant_gene/trait/repeated_harvest/can_add(obj/item/seeds/S)
if(!..())
return FALSE
if(istype(S, /obj/item/seeds/replicapod))
return FALSE
return TRUE
/datum/plant_gene/trait/battery
name = "Capacitive Cell Production"
/datum/plant_gene/trait/battery/on_attackby(obj/item/reagent_containers/food/snacks/grown/G, obj/item/I, mob/user)
if(istype(I, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = I
if(C.use(5))
to_chat(user, "<span class='notice'>You add some cable to [G] and slide it inside the battery encasing.</span>")
var/obj/item/stock_parts/cell/potato/pocell = new /obj/item/stock_parts/cell/potato(user.loc)
pocell.icon_state = G.icon_state
pocell.maxcharge = G.seed.potency * 20
// The secret of potato supercells!
var/datum/plant_gene/trait/cell_charge/CG = G.seed.get_gene(/datum/plant_gene/trait/cell_charge)
if(CG) // Cell charge max is now 40MJ or otherwise known as 400KJ (Same as bluespace powercells)
pocell.maxcharge *= CG.rate*100
pocell.charge = pocell.maxcharge
pocell.name = "[G.name] battery"
pocell.desc = "A rechargeable plant-based power cell. This one has a rating of [DisplayEnergy(pocell.maxcharge)], and you should not swallow it."
if(G.reagents.has_reagent("plasma", 2))
pocell.rigged = TRUE
qdel(G)
else
to_chat(user, "<span class='warning'>You need five lengths of cable to make a [G] battery!</span>")
/datum/plant_gene/trait/stinging
name = "Hypodermic Prickles"
/datum/plant_gene/trait/stinging/on_throw_impact(obj/item/reagent_containers/food/snacks/grown/G, atom/target)
if(isliving(target) && G.reagents && G.reagents.total_volume)
var/mob/living/L = target
if(L.reagents && L.can_inject(null, 0))
var/injecting_amount = max(1, G.seed.potency*0.2) // Minimum of 1, max of 20
var/fraction = min(injecting_amount/G.reagents.total_volume, 1)
G.reagents.reaction(L, INJECT, fraction)
G.reagents.trans_to(L, injecting_amount)
to_chat(target, "<span class='danger'>You are pricked by [G]!</span>")
/datum/plant_gene/trait/smoke
name = "gaseous decomposition"
/datum/plant_gene/trait/smoke/on_squash(obj/item/reagent_containers/food/snacks/grown/G, atom/target)
var/datum/effect_system/smoke_spread/chem/S = new
var/splat_location = get_turf(target)
var/smoke_amount = round(sqrt(G.seed.potency * 0.1), 1)
S.attach(splat_location)
S.set_up(G.reagents, smoke_amount, splat_location, 0)
S.start()
G.reagents.clear_reagents()
/datum/plant_gene/trait/fire_resistance // Lavaland
name = "Fire Resistance"
/datum/plant_gene/trait/fire_resistance/apply_vars(obj/item/seeds/S)
if(!(S.resistance_flags & FIRE_PROOF))
S.resistance_flags |= FIRE_PROOF
/datum/plant_gene/trait/fire_resistance/on_new(obj/item/reagent_containers/food/snacks/grown/G, newloc)
if(!(G.resistance_flags & FIRE_PROOF))
G.resistance_flags |= FIRE_PROOF
/datum/plant_gene/trait/plant_type // Parent type
name = "you shouldn't see this"
trait_id = "plant_type"
/datum/plant_gene/trait/plant_type/weed_hardy
name = "Weed Adaptation"
/datum/plant_gene/trait/plant_type/fungal_metabolism
name = "Fungal Vitality"
/datum/plant_gene/trait/plant_type/alien_properties
name ="?????"
+21
View File
@@ -0,0 +1,21 @@
/obj/item/seeds/sample
name = "plant sample"
icon_state = "sample-empty"
potency = -1
yield = -1
var/sample_color = "#FFFFFF"
/obj/item/seeds/sample/Initialize()
. = ..()
if(sample_color)
var/mutable_appearance/filling = mutable_appearance(icon, "sample-filling")
filling.color = sample_color
add_overlay(filling)
/obj/item/seeds/sample/get_analyzer_text()
return " The DNA of this sample is damaged beyond recovery, it can't support life on its own.\n*---------*"
/obj/item/seeds/sample/alienweed
name = "alien weed sample"
icon_state = "alienweed"
sample_color = null
+192
View File
@@ -0,0 +1,192 @@
/proc/seedify(obj/item/O, t_max, obj/machinery/seed_extractor/extractor, mob/living/user)
var/t_amount = 0
var/list/seeds = list()
if(t_max == -1)
if(extractor)
t_max = rand(1,4) * extractor.seed_multiplier
else
t_max = rand(1,4)
var/seedloc = O.loc
if(extractor)
seedloc = extractor.loc
if(istype(O, /obj/item/reagent_containers/food/snacks/grown/))
var/obj/item/reagent_containers/food/snacks/grown/F = O
if(F.seed)
if(user && !user.temporarilyRemoveItemFromInventory(O)) //couldn't drop the item
return
while(t_amount < t_max)
var/obj/item/seeds/t_prod = F.seed.Copy()
seeds.Add(t_prod)
t_prod.forceMove(seedloc)
t_amount++
qdel(O)
return seeds
else if(istype(O, /obj/item/grown))
var/obj/item/grown/F = O
if(F.seed)
if(user && !user.temporarilyRemoveItemFromInventory(O))
return
while(t_amount < t_max)
var/obj/item/seeds/t_prod = F.seed.Copy()
t_prod.forceMove(seedloc)
t_amount++
qdel(O)
return 1
return 0
/obj/machinery/seed_extractor
name = "seed extractor"
desc = "Extracts and bags seeds from produce."
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "sextractor"
density = TRUE
circuit = /obj/item/circuitboard/machine/seed_extractor
var/piles = list()
var/max_seeds = 1000
var/seed_multiplier = 1
/obj/machinery/seed_extractor/RefreshParts()
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
max_seeds = 1000 * B.rating
for(var/obj/item/stock_parts/manipulator/M in component_parts)
seed_multiplier = M.rating
/obj/machinery/seed_extractor/attackby(obj/item/O, mob/user, params)
if(default_deconstruction_screwdriver(user, "sextractor_open", "sextractor", O))
return
if(default_pry_open(O))
return
if(default_unfasten_wrench(user, O))
return
if(default_deconstruction_crowbar(O))
return
if(istype(O, /obj/item/storage/bag/plants))
var/obj/item/storage/P = O
var/loaded = 0
for(var/obj/item/seeds/G in P.contents)
if(contents.len >= max_seeds)
break
++loaded
add_seed(G)
if (loaded)
to_chat(user, "<span class='notice'>You put as many seeds from \the [O.name] into [src] as you can.</span>")
else
to_chat(user, "<span class='notice'>There are no seeds in \the [O.name].</span>")
return
else if(seedify(O,-1, src, user))
to_chat(user, "<span class='notice'>You extract some seeds.</span>")
return
else if (istype(O, /obj/item/seeds))
if(add_seed(O))
to_chat(user, "<span class='notice'>You add [O] to [src.name].</span>")
updateUsrDialog()
return
else if(user.a_intent != INTENT_HARM)
to_chat(user, "<span class='warning'>You can't extract any seeds from \the [O.name]!</span>")
else
return ..()
/datum/seed_pile
var/name = ""
var/lifespan = 0 //Saved stats
var/endurance = 0
var/maturation = 0
var/production = 0
var/yield = 0
var/potency = 0
var/amount = 0
/datum/seed_pile/New(var/name, var/life, var/endur, var/matur, var/prod, var/yie, var/poten, var/am = 1)
src.name = name
src.lifespan = life
src.endurance = endur
src.maturation = matur
src.production = prod
src.yield = yie
src.potency = poten
src.amount = am
/obj/machinery/seed_extractor/ui_interact(mob/user)
. = ..()
if (stat)
return FALSE
var/dat = "<b>Stored seeds:</b><br>"
if (contents.len == 0)
dat += "<font color='red'>No seeds</font>"
else
dat += "<table cellpadding='3' style='text-align:center;'><tr><td>Name</td><td>Lifespan</td><td>Endurance</td><td>Maturation</td><td>Production</td><td>Yield</td><td>Potency</td><td>Stock</td></tr>"
for (var/datum/seed_pile/O in piles)
dat += "<tr><td>[O.name]</td><td>[O.lifespan]</td><td>[O.endurance]</td><td>[O.maturation]</td>"
dat += "<td>[O.production]</td><td>[O.yield]</td><td>[O.potency]</td><td>"
dat += "<a href='byond://?src=[REF(src)];name=[O.name];li=[O.lifespan];en=[O.endurance];ma=[O.maturation];pr=[O.production];yi=[O.yield];pot=[O.potency]'>Vend</a> ([O.amount] left)</td></tr>"
dat += "</table>"
var/datum/browser/popup = new(user, "seed_ext", name, 700, 400)
popup.set_content(dat)
popup.open()
return
/obj/machinery/seed_extractor/Topic(var/href, var/list/href_list)
if(..())
return
usr.set_machine(src)
href_list["li"] = text2num(href_list["li"])
href_list["en"] = text2num(href_list["en"])
href_list["ma"] = text2num(href_list["ma"])
href_list["pr"] = text2num(href_list["pr"])
href_list["yi"] = text2num(href_list["yi"])
href_list["pot"] = text2num(href_list["pot"])
for (var/datum/seed_pile/N in piles)//Find the pile we need to reduce...
if (href_list["name"] == N.name && href_list["li"] == N.lifespan && href_list["en"] == N.endurance && href_list["ma"] == N.maturation && href_list["pr"] == N.production && href_list["yi"] == N.yield && href_list["pot"] == N.potency)
if(N.amount <= 0)
return
N.amount = max(N.amount - 1, 0)
if (N.amount <= 0)
piles -= N
qdel(N)
break
for (var/obj/T in contents)//Now we find the seed we need to vend
var/obj/item/seeds/O = T
if (O.plantname == href_list["name"] && O.lifespan == href_list["li"] && O.endurance == href_list["en"] && O.maturation == href_list["ma"] && O.production == href_list["pr"] && O.yield == href_list["yi"] && O.potency == href_list["pot"])
O.forceMove(drop_location())
break
src.updateUsrDialog()
return
/obj/machinery/seed_extractor/proc/add_seed(obj/item/seeds/O)
if(contents.len >= 999)
to_chat(usr, "<span class='notice'>\The [src] is full.</span>")
return FALSE
GET_COMPONENT_FROM(STR, /datum/component/storage, O.loc)
if(STR)
if(!STR.remove_from_storage(O,src))
return FALSE
else if(ismob(O.loc))
var/mob/M = O.loc
if(!M.transferItemToLoc(O, src))
return FALSE
. = TRUE
for (var/datum/seed_pile/N in piles)
if (O.plantname == N.name && O.lifespan == N.lifespan && O.endurance == N.endurance && O.maturation == N.maturation && O.production == N.production && O.yield == N.yield && O.potency == N.potency)
++N.amount
return
piles += new /datum/seed_pile(O.plantname, O.lifespan, O.endurance, O.maturation, O.production, O.yield, O.potency)
+392
View File
@@ -0,0 +1,392 @@
// ********************************************************
// Here's all the seeds (plants) that can be used in hydro
// ********************************************************
/obj/item/seeds
icon = 'icons/obj/hydroponics/seeds.dmi'
icon_state = "seed" // Unknown plant seed - these shouldn't exist in-game.
w_class = WEIGHT_CLASS_TINY
resistance_flags = FLAMMABLE
var/plantname = "Plants" // Name of plant when planted.
var/product // A type path. The thing that is created when the plant is harvested.
var/species = "" // Used to update icons. Should match the name in the sprites unless all icon_* are overridden.
var/growing_icon = 'icons/obj/hydroponics/growing.dmi' //the file that stores the sprites of the growing plant from this seed.
var/icon_grow // Used to override grow icon (default is "[species]-grow"). You can use one grow icon for multiple closely related plants with it.
var/icon_dead // Used to override dead icon (default is "[species]-dead"). You can use one dead icon for multiple closely related plants with it.
var/icon_harvest // Used to override harvest icon (default is "[species]-harvest"). If null, plant will use [icon_grow][growthstages].
var/lifespan = 25 // How long before the plant begins to take damage from age.
var/endurance = 15 // Amount of health the plant has.
var/maturation = 6 // Used to determine which sprite to switch to when growing.
var/production = 6 // Changes the amount of time needed for a plant to become harvestable.
var/yield = 3 // Amount of growns created per harvest. If is -1, the plant/shroom/weed is never meant to be harvested.
var/potency = 10 // The 'power' of a plant. Generally effects the amount of reagent in a plant, also used in other ways.
var/growthstages = 6 // Amount of growth sprites the plant has.
var/rarity = 0 // How rare the plant is. Used for giving points to cargo when shipping off to CentCom.
var/list/mutatelist = list() // The type of plants that this plant can mutate into.
var/list/genes = list() // Plant genes are stored here, see plant_genes.dm for more info.
var/list/reagents_add = list()
// A list of reagents to add to product.
// Format: "reagent_id" = potency multiplier
// Stronger reagents must always come first to avoid being displaced by weaker ones.
// Total amount of any reagent in plant is calculated by formula: 1 + round(potency * multiplier)
var/weed_rate = 1 //If the chance below passes, then this many weeds sprout during growth
var/weed_chance = 5 //Percentage chance per tray update to grow weeds
/obj/item/seeds/Initialize(loc, nogenes = 0)
. = ..()
pixel_x = rand(-8, 8)
pixel_y = rand(-8, 8)
if(!icon_grow)
icon_grow = "[species]-grow"
if(!icon_dead)
icon_dead = "[species]-dead"
if(!icon_harvest && !get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism) && yield != -1)
icon_harvest = "[species]-harvest"
if(!nogenes) // not used on Copy()
genes += new /datum/plant_gene/core/lifespan(lifespan)
genes += new /datum/plant_gene/core/endurance(endurance)
genes += new /datum/plant_gene/core/weed_rate(weed_rate)
genes += new /datum/plant_gene/core/weed_chance(weed_chance)
if(yield != -1)
genes += new /datum/plant_gene/core/yield(yield)
genes += new /datum/plant_gene/core/production(production)
if(potency != -1)
genes += new /datum/plant_gene/core/potency(potency)
for(var/p in genes)
if(ispath(p))
genes -= p
genes += new p
for(var/reag_id in reagents_add)
genes += new /datum/plant_gene/reagent(reag_id, reagents_add[reag_id])
/obj/item/seeds/proc/Copy()
var/obj/item/seeds/S = new type(null, 1)
// Copy all the stats
S.lifespan = lifespan
S.endurance = endurance
S.maturation = maturation
S.production = production
S.yield = yield
S.potency = potency
S.weed_rate = weed_rate
S.weed_chance = weed_chance
S.genes = list()
for(var/g in genes)
var/datum/plant_gene/G = g
S.genes += G.Copy()
S.reagents_add = reagents_add.Copy() // Faster than grabbing the list from genes.
return S
/obj/item/seeds/proc/get_gene(typepath)
return (locate(typepath) in genes)
/obj/item/seeds/proc/reagents_from_genes()
reagents_add = list()
for(var/datum/plant_gene/reagent/R in genes)
reagents_add[R.reagent_id] = R.rate
/obj/item/seeds/proc/mutate(lifemut = 2, endmut = 5, productmut = 1, yieldmut = 2, potmut = 25, wrmut = 2, wcmut = 5, traitmut = 0)
adjust_lifespan(rand(-lifemut,lifemut))
adjust_endurance(rand(-endmut,endmut))
adjust_production(rand(-productmut,productmut))
adjust_yield(rand(-yieldmut,yieldmut))
adjust_potency(rand(-potmut,potmut))
adjust_weed_rate(rand(-wrmut, wrmut))
adjust_weed_chance(rand(-wcmut, wcmut))
if(prob(traitmut))
add_random_traits(1, 1)
/obj/item/seeds/bullet_act(obj/item/projectile/Proj) //Works with the Somatoray to modify plant variables.
if(istype(Proj, /obj/item/projectile/energy/florayield))
var/rating = 1
if(istype(loc, /obj/machinery/hydroponics))
var/obj/machinery/hydroponics/H = loc
rating = H.rating
if(yield == 0)//Oh god don't divide by zero you'll doom us all.
adjust_yield(1 * rating)
else if(prob(1/(yield * yield) * 100))//This formula gives you diminishing returns based on yield. 100% with 1 yield, decreasing to 25%, 11%, 6, 4, 2...
adjust_yield(1 * rating)
else
return ..()
// Harvest procs
/obj/item/seeds/proc/getYield()
var/return_yield = yield
var/obj/machinery/hydroponics/parent = loc
if(istype(loc, /obj/machinery/hydroponics))
if(parent.yieldmod == 0)
return_yield = min(return_yield, 1)//1 if above zero, 0 otherwise
else
return_yield *= (parent.yieldmod)
return return_yield
/obj/item/seeds/proc/harvest(mob/user)
var/obj/machinery/hydroponics/parent = loc //for ease of access
var/t_amount = 0
var/list/result = list()
var/output_loc = parent.Adjacent(user) ? user.loc : parent.loc //needed for TK
var/product_name
while(t_amount < getYield())
var/obj/item/reagent_containers/food/snacks/grown/t_prod = new product(output_loc, src)
result.Add(t_prod) // User gets a consumable
if(!t_prod)
return
t_amount++
product_name = t_prod.name
if(getYield() >= 1)
SSblackbox.record_feedback("tally", "food_harvested", getYield(), product_name)
parent.update_tray(user)
return result
/obj/item/seeds/proc/prepare_result(var/obj/item/reagent_containers/food/snacks/grown/T)
if(!T.reagents)
CRASH("[T] has no reagents.")
for(var/rid in reagents_add)
var/amount = 1 + round(potency * reagents_add[rid], 1)
var/list/data = null
if(rid == "blood") // Hack to make blood in plants always O-
data = list("blood_type" = "O-")
if(rid == "nutriment" || rid == "vitamin")
// apple tastes of apple.
data = T.tastes
T.reagents.add_reagent(rid, amount, data)
/// Setters procs ///
/obj/item/seeds/proc/adjust_yield(adjustamt)
if(yield != -1) // Unharvestable shouldn't suddenly turn harvestable
yield = CLAMP(yield + adjustamt, 0, 10)
if(yield <= 0 && get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism))
yield = 1 // Mushrooms always have a minimum yield of 1.
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/yield)
if(C)
C.value = yield
/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)
if(C)
C.value = lifespan
/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)
if(C)
C.value = endurance
/obj/item/seeds/proc/adjust_production(adjustamt)
if(yield != -1)
production = CLAMP(production + adjustamt, 1, 10)
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/production)
if(C)
C.value = production
/obj/item/seeds/proc/adjust_potency(adjustamt)
if(potency != -1)
potency = CLAMP(potency + adjustamt, 0, 100)
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/potency)
if(C)
C.value = potency
/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)
if(C)
C.value = weed_rate
/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)
if(C)
C.value = weed_chance
//Directly setting stats
/obj/item/seeds/proc/set_yield(adjustamt)
if(yield != -1) // Unharvestable shouldn't suddenly turn harvestable
yield = CLAMP(adjustamt, 0, 10)
if(yield <= 0 && get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism))
yield = 1 // Mushrooms always have a minimum yield of 1.
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/yield)
if(C)
C.value = yield
/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)
if(C)
C.value = lifespan
/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)
if(C)
C.value = endurance
/obj/item/seeds/proc/set_production(adjustamt)
if(yield != -1)
production = CLAMP(adjustamt, 1, 10)
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/production)
if(C)
C.value = production
/obj/item/seeds/proc/set_potency(adjustamt)
if(potency != -1)
potency = CLAMP(adjustamt, 0, 100)
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/potency)
if(C)
C.value = potency
/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)
if(C)
C.value = weed_rate
/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)
if(C)
C.value = weed_chance
/obj/item/seeds/proc/get_analyzer_text() //in case seeds have something special to tell to the analyzer
var/text = ""
if(!get_gene(/datum/plant_gene/trait/plant_type/weed_hardy) && !get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism) && !get_gene(/datum/plant_gene/trait/plant_type/alien_properties))
text += "- Plant type: Normal plant\n"
if(get_gene(/datum/plant_gene/trait/plant_type/weed_hardy))
text += "- Plant type: Weed. Can grow in nutrient-poor soil.\n"
if(get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism))
text += "- Plant type: Mushroom. Can grow in dry soil.\n"
if(get_gene(/datum/plant_gene/trait/plant_type/alien_properties))
text += "- Plant type: <span class='warning'>UNKNOWN</span> \n"
if(potency != -1)
text += "- Potency: [potency]\n"
if(yield != -1)
text += "- Yield: [yield]\n"
text += "- Maturation speed: [maturation]\n"
if(yield != -1)
text += "- Production speed: [production]\n"
text += "- Endurance: [endurance]\n"
text += "- Lifespan: [lifespan]\n"
text += "- Weed Growth Rate: [weed_rate]\n"
text += "- Weed Vulnerability: [weed_chance]\n"
if(rarity)
text += "- Species Discovery Value: [rarity]\n"
var/all_traits = ""
for(var/datum/plant_gene/trait/traits in genes)
if(istype(traits, /datum/plant_gene/trait/plant_type))
continue
all_traits += " [traits.get_name()]"
text += "- Plant Traits:[all_traits]\n"
text += "*---------*"
return text
/obj/item/seeds/proc/on_chem_reaction(datum/reagents/S) //in case seeds have some special interaction with special chems
return
/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>")
return
..() // Fallthrough to item/attackby() so that bags can pick seeds up
// Checks plants for broken tray icons. Use Advanced Proc Call to activate.
// Maybe some day it would be used as unit test.
/proc/check_plants_growth_stages_icons()
var/list/states = icon_states('icons/obj/hydroponics/growing.dmi')
states |= icon_states('icons/obj/hydroponics/growing_fruits.dmi')
states |= icon_states('icons/obj/hydroponics/growing_flowers.dmi')
states |= icon_states('icons/obj/hydroponics/growing_mushrooms.dmi')
states |= icon_states('icons/obj/hydroponics/growing_vegetables.dmi')
var/list/paths = typesof(/obj/item/seeds) - /obj/item/seeds - typesof(/obj/item/seeds/sample)
for(var/seedpath in paths)
var/obj/item/seeds/seed = new seedpath
for(var/i in 1 to seed.growthstages)
if("[seed.icon_grow][i]" in states)
continue
to_chat(world, "[seed.name] ([seed.type]) lacks the [seed.icon_grow][i] icon!")
if(!(seed.icon_dead in states))
to_chat(world, "[seed.name] ([seed.type]) lacks the [seed.icon_dead] icon!")
if(seed.icon_harvest) // mushrooms have no grown sprites, same for items with no product
if(!(seed.icon_harvest in states))
to_chat(world, "[seed.name] ([seed.type]) lacks the [seed.icon_harvest] icon!")
/obj/item/seeds/proc/randomize_stats()
set_lifespan(rand(25, 60))
set_endurance(rand(15, 35))
set_production(rand(2, 10))
set_yield(rand(1, 10))
set_potency(rand(10, 35))
set_weed_rate(rand(1, 10))
set_weed_chance(rand(5, 100))
maturation = rand(6, 12)
/obj/item/seeds/proc/add_random_reagents(lower = 0, upper = 2)
var/amount_random_reagents = rand(lower, upper)
for(var/i in 1 to amount_random_reagents)
var/random_amount = rand(4, 15) * 0.01 // this must be multiplied by 0.01, otherwise, it will not properly associate
var/datum/plant_gene/reagent/R = new(get_random_reagent_id(), random_amount)
if(R.can_add(src))
genes += R
else
qdel(R)
reagents_from_genes()
/obj/item/seeds/proc/add_random_traits(lower = 0, upper = 2)
var/amount_random_traits = rand(lower, upper)
for(var/i in 1 to amount_random_traits)
var/random_trait = pick((subtypesof(/datum/plant_gene/trait)-typesof(/datum/plant_gene/trait/plant_type)))
var/datum/plant_gene/trait/T = new random_trait
if(T.can_add(src))
genes += T
else
qdel(T)
/obj/item/seeds/proc/add_random_plant_type(normal_plant_chance = 75)
if(prob(normal_plant_chance))
var/random_plant_type = pick(subtypesof(/datum/plant_gene/trait/plant_type))
var/datum/plant_gene/trait/plant_type/P = new random_plant_type
if(P.can_add(src))
genes += P
else
qdel(P)