initial commit - cross reference with 5th port - obviously has compile errors

This commit is contained in:
LetterJay
2016-07-03 02:17:19 -05:00
commit 35a1723e98
4355 changed files with 2221257 additions and 0 deletions
@@ -0,0 +1,246 @@
#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 && (wear_suit.flags & THICKMATERIAL)) && (head && (head.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 = 1
density = 1
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/New()
..()
START_PROCESSING(SSobj, src)
/obj/structure/beebox/Destroy()
STOP_PROCESSING(SSobj, src)
bees.Cut()
bees = null
honeycombs.Cut()
honeycombs = null
queen_bee = null
return ..()
//Premade apiaries can spawn with a random reagent
/obj/structure/beebox/premade
var/random_reagent = FALSE
/obj/structure/beebox/premade/New()
..()
var/datum/reagent/R = null
if(random_reagent)
R = pick(subtypesof(/datum/reagent))
R = 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
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/weapon/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(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)
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))
user << "<span class='notice'>This place is a BUZZ with activity... there are lots of bees!</span>"
user << "<span class='notice'>[bee_resources]/100 resource supply.</span>"
user << "<span class='notice'>[bee_resources]% towards a new honeycomb.</span>"
user << "<span class='notice'>[bee_resources*2]% towards a new bee.</span>"
if(honeycombs.len)
var/plural = honeycombs.len > 1
user << "<span class='notice'>There [plural? "are" : "is"] [honeycombs.len] uncollected honeycomb[plural ? "s":""] in the apiary.</span>"
if(honeycombs.len >= get_max_honeycomb())
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>")
user.unEquip(HF)
HF.loc = src
honey_frames += HF
else
user << "<span class='warning'>There's no room for anymore frames in the apiary!</span>"
if(istype(I, /obj/item/weapon/wrench))
if(default_unfasten_wrench(user, I, time = 20))
return
if(istype(I, /obj/item/queen_bee))
if(queen_bee)
user << "<span class='warning'>This hive already has a queen!</span>"
return
var/obj/item/queen_bee/qb = I
user.unEquip(qb)
qb.queen.loc = 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.loc = get_turf(src)
relocated++
if(relocated)
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
user << "<span class='warning'>The queen bee disappeared! bees disappearing has been in the news lately...</span>"
qdel(qb)
/obj/structure/beebox/attack_hand(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.loc = get_turf(src)
B.target = user
bees = TRUE
if(bees)
visible_message("<span class='danger'>[user] disturbs the bees!</span>")
else
var/option = alert(user, "What Action do you wish to perform?","Apiary","Remove a Honey Frame","Remove the Queen Bee")
if(!Adjacent(user))
return
switch(option)
if("Remove a Honey Frame")
if(!honey_frames.len)
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.loc = get_turf(src)
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/weapon/reagent_containers/honeycomb/HC = pick_n_take(honeycombs)
if(HC)
HC.loc = get_turf(user)
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)
user << "<span class='warning'>There is no queen bee to remove!</span>"
return
var/obj/item/queen_bee/QB = new()
queen_bee.loc = QB
bees -= queen_bee
QB.queen = queen_bee
QB.name = queen_bee.name
if(!user.put_in_active_hand(QB))
QB.loc = get_turf(src)
visible_message("<span class='notice'>[user] removes the queen from the apiary.</span>")
queen_bee = null
@@ -0,0 +1,16 @@
/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"
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"
flags = THICKMATERIAL
@@ -0,0 +1,12 @@
/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/New()
pixel_x = rand(8,-8)
pixel_y = rand(8,-8)
@@ -0,0 +1,41 @@
/obj/item/weapon/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 = 0
disease_amount = 0
volume = 10
amount_per_transfer_from_this = 0
list_reagents = list("honey" = 5)
var/honey_color = ""
/obj/item/weapon/reagent_containers/honeycomb/New()
..()
pixel_x = rand(8,-8)
pixel_y = rand(8,-8)
update_icon()
/obj/item/weapon/reagent_containers/honeycomb/update_icon()
cut_overlays()
var/image/honey
if(honey_color)
honey = image(icon = 'icons/obj/hydroponics/harvest.dmi', icon_state = "greyscale_honey")
honey.color = honey_color
else
honey = image(icon = 'icons/obj/hydroponics/harvest.dmi', icon_state = "honey")
add_overlay(honey)
/obj/item/weapon/reagent_containers/honeycomb/proc/set_reagent(reagent)
var/datum/reagent/R = 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()
+403
View File
@@ -0,0 +1,403 @@
/obj/machinery/biogenerator
name = "Biogenerator"
desc = "Converts plants into biomass, which can be used to construct useful items."
icon = 'icons/obj/biogenerator.dmi'
icon_state = "biogen-empty"
density = 1
anchored = 1
use_power = 1
idle_power_usage = 40
var/processing = 0
var/obj/item/weapon/reagent_containers/glass/beaker = null
var/points = 0
var/menustat = "menu"
var/efficiency = 0
var/productivity = 0
var/max_items = 40
/obj/machinery/biogenerator/New()
..()
create_reagents(1000)
var/obj/item/weapon/circuitboard/machine/B = new /obj/item/weapon/circuitboard/machine/biogenerator(null)
B.apply_default_parts(src)
/obj/item/weapon/circuitboard/machine/biogenerator
name = "circuit board (Biogenerator)"
build_path = /obj/machinery/biogenerator
origin_tech = "programming=2;biotech=3;materials=3"
req_components = list(
/obj/item/weapon/stock_parts/matter_bin = 1,
/obj/item/weapon/stock_parts/manipulator = 1,
/obj/item/stack/cable_coil = 1,
/obj/item/weapon/stock_parts/console_screen = 1)
/obj/machinery/biogenerator/RefreshParts()
var/E = 0
var/P = 0
var/max_storage = 40
for(var/obj/item/weapon/stock_parts/matter_bin/B in component_parts)
P += B.rating
max_storage = 40 * B.rating
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
E += M.rating
efficiency = E
productivity = P
max_items = max_storage
/obj/machinery/biogenerator/on_reagent_change() //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(processing)
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/weapon/reagent_containers/glass/B = beaker
B.loc = loc
beaker = null
update_icon()
return
if(exchange_parts(user, O))
return
if(default_deconstruction_crowbar(O))
return
if(istype(O, /obj/item/weapon/reagent_containers/glass))
. = 1 //no afterattack
if(!panel_open)
if(beaker)
user << "<span class='warning'>A container is already loaded into the machine.</span>"
else
if(!user.drop_item())
return
O.loc = src
beaker = O
user << "<span class='notice'>You add the container to the machine.</span>"
update_icon()
updateUsrDialog()
else
user << "<span class='warning'>Close the maintenance panel first.</span>"
return
else if(istype(O, /obj/item/weapon/storage/bag/plants))
var/obj/item/weapon/storage/bag/plants/PB = O
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
i++
if(i >= max_items)
user << "<span class='warning'>The biogenerator is already full! Activate it.</span>"
else
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in PB.contents)
if(i >= max_items)
break
PB.remove_from_storage(G, src)
i++
if(i<max_items)
user << "<span class='info'>You empty the plant bag into the biogenerator.</span>"
else if(PB.contents.len == 0)
user << "<span class='info'>You empty the plant bag into the biogenerator, filling it to its capacity.</span>"
else
user << "<span class='info'>You fill the biogenerator to its capacity.</span>"
return 1 //no afterattack
else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown))
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
i++
if(i >= max_items)
user << "<span class='warning'>The biogenerator is full! Activate it.</span>"
else
user.unEquip(O)
O.loc = src
user << "<span class='info'>You put [O.name] in [src.name]</span>"
return 1 //no afterattack
else if(user.a_intent != "harm")
user << "<span class='warning'>You cannot put this in [src.name]!</span>"
else
return ..()
/obj/machinery/biogenerator/interact(mob/user)
if(stat & BROKEN || panel_open)
return
user.set_machine(src)
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 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)
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>"
dat += "<h3>Food:</h3>"
dat += "<div class='statusDisplay'>"
dat += "10 milk: <A href='?src=\ref[src];create=milk;amount=1'>Make</A><A href='?src=\ref[src];create=milk;amount=5'>x5</A> ([20/efficiency])<BR>"
dat += "10 cream: <A href='?src=\ref[src];create=cream;amount=1'>Make</A><A href='?src=\ref[src];create=cream;amount=5'>x5</A> ([30/efficiency])<BR>"
dat += "Milk carton: <A href='?src=\ref[src];create=cmilk;amount=1'>Make</A><A href='?src=\ref[src];create=cmilk;amount=5'>x5</A> ([100/efficiency])<BR>"
dat += "Cream carton: <A href='?src=\ref[src];create=ccream;amount=1'>Make</A><A href='?src=\ref[src];create=ccream;amount=5'>x5</A> ([300/efficiency])<BR>"
dat += "10u black pepper: <A href='?src=\ref[src];create=bpepper;amount=1'>Make</A><A href='?src=\ref[src];create=bpepper;amount=5'>x5</A> ([25/efficiency])<BR>"
dat += "Pepper mill: <A href='?src=\ref[src];create=mpepper;amount=1'>Make</A><A href='?src=\ref[src];create=mpepper;amount=5'>x5</A> ([50/efficiency])<BR>"
dat += "Monkey cube: <A href='?src=\ref[src];create=meat;amount=1'>Make</A><A href='?src=\ref[src];create=meat;amount=5'>x5</A> ([250/efficiency])"
dat += "</div>"
dat += "<h3>Botany Chemicals:</h3>"
dat += "<div class='statusDisplay'>"
dat += "E-Z-Nutrient: <A href='?src=\ref[src];create=ez;amount=1'>Make</A><A href='?src=\ref[src];create=ez;amount=5'>x5</A> ([10/efficiency])<BR>"
dat += "Left 4 Zed: <A href='?src=\ref[src];create=l4z;amount=1'>Make</A><A href='?src=\ref[src];create=l4z;amount=5'>x5</A> ([20/efficiency])<BR>"
dat += "Robust Harvest: <A href='?src=\ref[src];create=rh;amount=1'>Make</A><A href='?src=\ref[src];create=rh;amount=5'>x5</A> ([25/efficiency])<BR>"
dat += "Weed Killer: <A href='?src=\ref[src];create=wk;amount=1'>Make</A><A href='?src=\ref[src];create=wk;amount=5'>x5</A> ([50/efficiency])<BR>"
dat += "Pest Killer: <A href='?src=\ref[src];create=pk;amount=1'>Make</A><A href='?src=\ref[src];create=pk;amount=5'>x5</A> ([50/efficiency])<BR>"
dat += "Empty bottle: <A href='?src=\ref[src];create=empty;amount=1'>Make</A><A href='?src=\ref[src];create=empty;amount=5'>x5</A> ([5/efficiency])<BR>"
dat += "</div>"
dat += "<h3>Leather and Cloth:</h3>"
dat += "<div class='statusDisplay'>"
dat += "Roll of cloth: <A href='?src=\ref[src];create=cloth;amount=1'>Make</A><A href='?src=\ref[src];create=tencloth;amount=1'>x10</A> ([50/efficiency])<BR>"
dat += "Wallet: <A href='?src=\ref[src];create=wallet;amount=1'>Make</A> ([100/efficiency])<BR>"
dat += "Botanical gloves: <A href='?src=\ref[src];create=gloves;amount=1'>Make</A> ([250/efficiency])<BR>"
dat += "Utility belt: <A href='?src=\ref[src];create=tbelt;amount=1'>Make</A> ([300/efficiency])<BR>"
dat += "Security belt: <A href='?src=\ref[src];create=sbelt;amount=1'>Make</A> ([300/efficiency])<BR>"
dat += "Medical belt: <A href='?src=\ref[src];create=mbelt;amount=1'>Make</A> ([300/efficiency])<BR>"
dat += "Janitorial belt: <A href='?src=\ref[src];create=jbelt;amount=1'>Make</A> ([300/efficiency])<BR>"
dat += "Bandolier belt: <A href='?src=\ref[src];create=bbelt;amount=1'>Make</A> ([300/efficiency])<BR>"
dat += "Shoulder holster: <A href='?src=\ref[src];create=sholster;amount=1'>Make</A> ([400/efficiency])<BR>"
dat += "Leather satchel: <A href='?src=\ref[src];create=satchel;amount=1'>Make</A> ([400/efficiency])<BR>"
dat += "Leather jacket: <A href='?src=\ref[src];create=jacket;amount=1'>Make</A> ([500/efficiency])<BR>"
dat += "Leather overcoat: <A href='?src=\ref[src];create=overcoat;amount=1'>Make</A> ([1000/efficiency])<BR>"
dat += "Rice hat: <A href='?src=\ref[src];create=rice_hat;amount=1'>Make</A> ([300/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()
return
/obj/machinery/biogenerator/attack_hand(mob/user)
interact(user)
/obj/machinery/biogenerator/proc/activate()
if (usr.stat != 0)
return
if (src.stat != 0) //NOPOWER etc
return
if(src.processing)
usr << "<span class='warning'>The biogenerator is in the process of working.</span>"
return
var/S = 0
for(var/obj/item/weapon/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 = 1
update_icon()
updateUsrDialog()
playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
use_power(S*30)
sleep(S+15/productivity)
processing = 0
update_icon()
else
menustat = "void"
return
/obj/machinery/biogenerator/proc/check_cost(cost)
if (cost > points)
menustat = "nopoints"
return 1
else
points -= cost
processing = 1
update_icon()
updateUsrDialog()
return 0
/obj/machinery/biogenerator/proc/check_container_volume(reagent_amount)
if(beaker.reagents.total_volume + reagent_amount > beaker.reagents.maximum_volume)
menustat = "nobeakerspace"
return 1
/obj/machinery/biogenerator/proc/create_product(create)
switch(create)
if("milk")
if(check_container_volume(10))
return 0
else if (check_cost(20/efficiency))
return 0
else beaker.reagents.add_reagent("milk",10)
if("bpepper")
if(check_container_volume(10))
return 0
else if (check_cost(25/efficiency))
return 0
else beaker.reagents.add_reagent("blackpepper",10)
if("cream")
if(check_container_volume(10))
return 0
else if (check_cost(30/efficiency))
return 0
else beaker.reagents.add_reagent("cream",10)
if("cmilk")
if (check_cost(100/efficiency))
return 0
else new/obj/item/weapon/reagent_containers/food/condiment/milk(src.loc)
if("mpepper")
if (check_cost(50/efficiency))
return 0
else new/obj/item/weapon/reagent_containers/food/condiment/peppermill(src.loc)
if("ccream")
if (check_cost(300/efficiency))
return 0
else new/obj/item/weapon/reagent_containers/food/drinks/bottle/cream(src.loc)
if("meat")
if (check_cost(250/efficiency))
return 0
else new/obj/item/weapon/reagent_containers/food/snacks/monkeycube(src.loc)
if("ez")
if (check_cost(10/efficiency))
return 0
else new/obj/item/weapon/reagent_containers/glass/bottle/nutrient/ez(src.loc)
if("l4z")
if (check_cost(20/efficiency))
return 0
else new/obj/item/weapon/reagent_containers/glass/bottle/nutrient/l4z(src.loc)
if("rh")
if (check_cost(25/efficiency))
return 0
else new/obj/item/weapon/reagent_containers/glass/bottle/nutrient/rh(src.loc)
if("wk")
if (check_cost(50/efficiency))
return 0
else new/obj/item/weapon/reagent_containers/glass/bottle/killer/weedkiller(src.loc)
if("pk")
if (check_cost(50/efficiency))
return 0
else new/obj/item/weapon/reagent_containers/glass/bottle/killer/pestkiller(src.loc)
if("empty")
if (check_cost(5/efficiency))
return 0
else new/obj/item/weapon/reagent_containers/glass/bottle/nutrient/empty(src.loc)
if("cloth")
if (check_cost(50/efficiency))
return 0
else new/obj/item/stack/sheet/cloth(src.loc)
if("tencloth")
if (check_cost(500/efficiency))
return 0
else new/obj/item/stack/sheet/cloth/ten(src.loc)
if("wallet")
if (check_cost(100/efficiency))
return 0
else new/obj/item/weapon/storage/wallet(src.loc)
if("gloves")
if (check_cost(250/efficiency))
return 0
else new/obj/item/clothing/gloves/botanic_leather(src.loc)
if("tbelt")
if (check_cost(300/efficiency))
return 0
else new/obj/item/weapon/storage/belt/utility(src.loc)
if("sbelt")
if (check_cost(300/efficiency))
return 0
else new/obj/item/weapon/storage/belt/security(src.loc)
if("mbelt")
if (check_cost(300/efficiency))
return 0
else new/obj/item/weapon/storage/belt/medical(src.loc)
if("jbelt")
if (check_cost(300/efficiency))
return 0
else new/obj/item/weapon/storage/belt/janitor(src.loc)
if("bbelt")
if (check_cost(300/efficiency))
return 0
else new/obj/item/weapon/storage/belt/bandolier(src.loc)
if("sholster")
if (check_cost(400/efficiency))
return 0
else new/obj/item/weapon/storage/belt/holster(src.loc)
if("satchel")
if (check_cost(400/efficiency))
return 0
else new/obj/item/weapon/storage/backpack/satchel(src.loc)
if("jacket")
if (check_cost(500/efficiency))
return 0
else new/obj/item/clothing/suit/jacket/leather(src.loc)
if("overcoat")
if (check_cost(1000/efficiency))
return 0
else new/obj/item/clothing/suit/jacket/leather/overcoat(src.loc)
if("rice_hat")
if (check_cost(300/efficiency))
return 0
else new/obj/item/clothing/head/rice_hat(src.loc)
processing = 0
menustat = "complete"
update_icon()
return 1
/obj/machinery/biogenerator/proc/detach()
if(beaker)
beaker.loc = src.loc
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"]))
var/i = amount
var/C = href_list["create"]
if(i <= 0)
return
while(i >= 1)
create_product(C)
i--
updateUsrDialog()
else if(href_list["menu"])
menustat = "menu"
updateUsrDialog()
+433
View File
@@ -0,0 +1,433 @@
/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 = 1
anchored = 1
var/obj/item/seeds/seed
var/obj/item/weapon/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/rating = 0
var/max_extract_pot = 50
// The cap on potency gene extraction.
// This number is for T1, each upgraded part adds 5% for a tech level above T1.
// At T4, it reaches 95%.
/obj/machinery/plantgenes/New()
..()
var/obj/item/weapon/circuitboard/machine/B = new /obj/item/weapon/circuitboard/machine/plantgenes(null)
B.apply_default_parts(src)
/obj/item/weapon/circuitboard/machine/plantgenes
name = "circuit board (Plant DNA Manipulator)"
build_path = /obj/machinery/plantgenes
origin_tech = "programming=3;biotech=3"
req_components = list(
/obj/item/weapon/stock_parts/manipulator = 1,
/obj/item/weapon/stock_parts/micro_laser = 1,
/obj/item/weapon/stock_parts/console_screen = 1,
/obj/item/weapon/stock_parts/scanning_module = 1)
/obj/machinery/plantgenes/RefreshParts()
rating = 0
for(var/I in component_parts)
if(istype(I, /obj/item/weapon/stock_parts))
var/obj/item/weapon/stock_parts/S = I
rating += S.rating-1
else if(istype(I, /obj/item/weapon/circuitboard/machine/plantgenes/vault))
rating += 5 // Having original alien board is +25%
max_extract_pot = initial(max_extract_pot) + rating*5
/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
if(exchange_parts(user, I))
return
if(default_deconstruction_crowbar(I))
return
if(isrobot(user))
return
if(istype(I, /obj/item/seeds))
if(seed)
user << "<span class='warning'>A sample is already loaded into the machine!</span>"
else
if(!user.drop_item())
return
insert_seed(I)
user << "<span class='notice'>You add [I] to the machine.</span>"
interact(user)
return
else if(istype(I, /obj/item/weapon/disk/plantgene))
if(disk)
user << "<span class='warning'>A data disk is already loaded into the machine!</span>"
else
if(!user.drop_item())
return
disk = I
disk.loc = src
user << "<span class='notice'>You add [I] to the machine.</span>"
interact(user)
else
..()
/obj/machinery/plantgenes/attack_hand(mob/user)
if(..())
return
interact(user)
/obj/machinery/plantgenes/interact(mob/user)
user.set_machine(src)
if(!user)
return
var/datum/browser/popup = new(user, "plantdna", "Plant DNA Manipulator", 450, 600)
if(!( in_range(src, user) || istype(user, /mob/living/silicon) ))
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/potency))
var/datum/plant_gene/core/gene = target
if(gene.value > max_extract_pot)
dat += "<br><br>This device's extraction capabilities are currently limited to [max_extract_pot] potency. "
dat += "Target gene will be degraded to [max_extract_pot] potency 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.loc = src.loc
seed.verb_pickup()
seed = null
update_genes()
update_icon()
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/seeds))
if(!usr.drop_item())
return
insert_seed(I)
usr << "<span class='notice'>You add [I] to the machine.</span>"
update_icon()
else if(href_list["eject_disk"] && !operation)
if (disk)
disk.loc = src.loc
disk.verb_pickup()
disk = null
update_genes()
else
var/obj/item/I = usr.get_active_hand()
if(istype(I, /obj/item/weapon/disk/plantgene))
if(!usr.drop_item())
return
disk = I
disk.loc = src
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/potency))
var/datum/plant_gene/core/gene = G
gene.value = min(gene.value, max_extract_pot)
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()
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.loc = src
seed = S
update_genes()
update_icon()
/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
)
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/New()
..()
var/obj/item/weapon/circuitboard/machine/B = new /obj/item/weapon/circuitboard/machine/plantgenes/vault(null)
B.apply_default_parts(src)
/obj/item/weapon/circuitboard/machine/plantgenes/vault
name = "alien board (Plant DNA Manipulator)"
icon_state = "abductor_mod"
origin_tech = "programming=5;biotech=5"
// It wasn't made by actual abductors race, so no abductor tech here.
def_components = list(
/obj/item/weapon/stock_parts/manipulator = /obj/item/weapon/stock_parts/manipulator/femto,
/obj/item/weapon/stock_parts/micro_laser = /obj/item/weapon/stock_parts/micro_laser/quadultra,
/obj/item/weapon/stock_parts/scanning_module = /obj/item/weapon/stock_parts/scanning_module/triphasic)
/*
* Plant DNA disk
*/
/obj/item/weapon/disk/plantgene
name = "plant data disk"
desc = "A disk for storing plant genetic data."
icon_state = "datadisk2"
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/item/weapon/disk/plantgene/New()
..()
add_overlay("datadisk_gene")
src.pixel_x = rand(-5, 5)
src.pixel_y = rand(-5, 5)
/obj/item/weapon/disk/plantgene/attackby(obj/item/weapon/W, mob/user, params)
..()
if(istype(W, /obj/item/weapon/pen))
var/t = stripped_input(user, "What would you like the label to be?", name, null)
if(user.get_active_hand() != W)
return
if(!in_range(src, user) && loc != user)
return
if(t)
name = "plant data disk - '[t]'"
else
name = "plant data disk"
/obj/item/weapon/disk/plantgene/proc/update_name()
if(gene)
name = "plant data disk - '[gene.get_name()]'"
else
name = "plant data disk"
/obj/item/weapon/disk/plantgene/attack_self(mob/user)
read_only = !read_only
user << "<span class='notice'>You flip the write-protect tab to [src.read_only ? "protected" : "unprotected"].</span>"
/obj/item/weapon/disk/plantgene/examine(mob/user)
..()
user << "The write-protect tab is set to [src.read_only ? "protected" : "unprotected"]."
/*
* Plant DNA Disks Box
*/
/obj/item/weapon/storage/box/disks_plantgene
name = "plant data disks box"
icon_state = "disk_kit"
/obj/item/weapon/storage/box/disks_plantgene/New()
..()
for(var/i in 1 to 7)
new /obj/item/weapon/disk/plantgene(src)
+175
View File
@@ -0,0 +1,175 @@
// ***********************************************************
// 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/weapon/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.
burn_state = FLAMMABLE
origin_tech = "biotech=1"
/obj/item/weapon/reagent_containers/food/snacks/grown/New(newloc, var/obj/item/seeds/new_seed = null)
..()
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, newloc)
seed.prepare_result(src)
transform *= TransformUsingVariable(seed.potency, 100, 0.5) //Makes the resulting produce's sprite larger or smaller based on potency!
add_juice()
/obj/item/weapon/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/weapon/reagent_containers/food/snacks/grown/examine(user)
..()
if(seed)
for(var/datum/plant_gene/trait/T in seed.genes)
if(T.examine_line)
user << T.examine_line
/obj/item/weapon/reagent_containers/food/snacks/grown/attackby(obj/item/O, mob/user, params)
..()
if (istype(O, /obj/item/device/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 += "\n- Nutritional value: [reagents.get_reagent_amount("nutriment")]\n"
msg += "- Other substances: [reagents.total_volume-reagents.get_reagent_amount("nutriment")]\n"
msg += "*---------*</span>"
var/list/scannable_reagents = list("charcoal" = "Anti-Toxin", "morphine" = "Morphine", "amatoxin" = "Amatoxins",
"toxin" = "Toxins", "mushroomhallucinogen" = "Mushroom Hallucinogen", "condensedcapsaicin" = "Condensed Capsaicin",
"capsaicin" = "Capsaicin", "frostoil" = "Frost Oil", "gold" = "Mineral Content", "glycerol" = "Glycerol",
"radium" = "Highly Radioactive Material", "uranium" = "Radioactive Material")
var/reag_txt = ""
if(seed)
for(var/reagent_id in scannable_reagents)
if(reagent_id in seed.reagents_add)
var/amt = reagents.get_reagent_amount(reagent_id)
reag_txt += "\n<span class='info'>- [scannable_reagents[reagent_id]]: [amt*100/reagents.maximum_volume]%</span>"
if(reag_txt)
msg += reag_txt
msg += "<br><span class='info'>*---------*</span>"
user << msg
return
return
// Various gene procs
/obj/item/weapon/reagent_containers/food/snacks/grown/attack_self(mob/user)
if(seed && seed.get_gene(/datum/plant_gene/trait/squash))
squash(user)
..()
/obj/item/weapon/reagent_containers/food/snacks/grown/throw_impact(atom/hit_atom)
if(!..()) //was it caught by a mob?
if(seed && seed.get_gene(/datum/plant_gene/trait/squash))
squash(hit_atom)
/obj/item/weapon/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)
if(ispath(trash, /obj/item/weapon/grown) || ispath(trash, /obj/item/weapon/reagent_containers/food/snacks/grown))
new trash(T, seed)
else
new 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)
for(var/A in T)
reagents.reaction(A)
qdel(src)
/obj/item/weapon/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/weapon/reagent_containers/food/snacks/grown/Crossed(atom/movable/AM)
if(seed)
for(var/datum/plant_gene/trait/T in seed.genes)
T.on_cross(src, AM)
..()
// Glow gene procs
/obj/item/weapon/reagent_containers/food/snacks/grown/Destroy()
if(seed)
var/datum/plant_gene/trait/glow/G = seed.get_gene(/datum/plant_gene/trait/glow)
if(G && ismob(loc))
loc.AddLuminosity(-G.get_lum(seed))
return ..()
/obj/item/weapon/reagent_containers/food/snacks/grown/pickup(mob/user)
..()
if(seed)
var/datum/plant_gene/trait/glow/G = seed.get_gene(/datum/plant_gene/trait/glow)
if(G)
SetLuminosity(0)
user.AddLuminosity(G.get_lum(seed))
/obj/item/weapon/reagent_containers/food/snacks/grown/dropped(mob/user)
..()
if(seed)
var/datum/plant_gene/trait/glow/G = seed.get_gene(/datum/plant_gene/trait/glow)
if(G)
user.AddLuminosity(-G.get_lum(seed))
SetLuminosity(G.get_lum(seed))
// For item-containing growns such as eggy or gatfruit
/obj/item/weapon/reagent_containers/food/snacks/grown/shell/attack_self(mob/user as mob)
user.unEquip(src)
if(trash)
var/obj/item/weapon/T
if(ispath(trash, /obj/item/weapon/grown) || ispath(trash, /obj/item/weapon/reagent_containers/food/snacks/grown))
T = new trash(user.loc, seed)
else
T = new trash(user.loc)
user.put_in_hands(T)
user << "<span class='notice'>You open [src]\'s shell, revealing \a [T].</span>"
qdel(src)
@@ -0,0 +1,75 @@
// Ambrosia - base type
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia
seed = /obj/item/seeds/ambrosia
name = "ambrosia branch"
desc = "This is a plant."
icon_state = "ambrosiavulgaris"
slot_flags = SLOT_HEAD
filling_color = "#008000"
bitesize_mod = 2
// 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/weapon/reagent_containers/food/snacks/grown/ambrosia/vulgaris
lifespan = 60
endurance = 25
yield = 6
potency = 5
icon_dead = "ambrosia-dead"
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/weapon/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."
origin_tech = "biotech=2"
// 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/weapon/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/weapon/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"
origin_tech = "biotech=4;materials=3"
//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/weapon/reagent_containers/food/snacks/grown/ambrosia/gaia
mutatelist = list()
reagents_add = list("earthsblood" = 0.05, "nutriment" = 0.06, "vitamin" = 0.05)
rarity = 30 //These are some pretty good plants right here
oneharvest = TRUE
weed_rate = 4
weed_chance = 100
/obj/item/weapon/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)
origin_tech = "biotech=6;materials=5"
luminosity = 3
seed = /obj/item/seeds/ambrosia/gaia
+56
View File
@@ -0,0 +1,56 @@
// 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/weapon/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"
mutatelist = list(/obj/item/seeds/apple/gold)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/weapon/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
// Posioned Apple
/obj/item/seeds/apple/poisoned
product = /obj/item/weapon/reagent_containers/food/snacks/grown/apple/poisoned
mutatelist = list()
reagents_add = list("zombiepowder" = 0.5, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 50 // Source of cyanide, and hard (almost impossible) to obtain normally.
/obj/item/weapon/reagent_containers/food/snacks/grown/apple/poisoned
seed = /obj/item/seeds/apple/poisoned
// 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/weapon/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/weapon/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"
origin_tech = "biotech=4;materials=5"
+121
View File
@@ -0,0 +1,121 @@
// 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/weapon/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)
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/weapon/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/weapon/grown/bananapeel
filling_color = "#FFFF00"
bitesize = 5
/obj/item/weapon/reagent_containers/food/snacks/grown/banana/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is aiming the [src.name] at themself! It looks like \he's trying to commit suicide.</span>")
playsound(loc, 'sound/items/bikehorn.ogg', 50, 1, -1)
sleep(25)
if(!user)
return (OXYLOSS)
user.say("BANG!")
sleep(25)
if(!user)
return (OXYLOSS)
user.visible_message("<B>[user]</B> laughs so hard they begin to suffocate!")
return (OXYLOSS)
/obj/item/weapon/grown/bananapeel
seed = /obj/item/seeds/banana
name = "banana peel"
desc = "A peel from a banana."
icon_state = "banana_peel"
item_state = "banana_peel"
w_class = 1
throwforce = 0
throw_speed = 3
throw_range = 7
/obj/item/weapon/grown/bananapeel/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is deliberately slipping on the [src.name]! It looks like \he's 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/weapon/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/weapon/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/weapon/grown/bananapeel/mimanapeel
filling_color = "#FFFFEE"
/obj/item/weapon/grown/bananapeel/mimanapeel
seed = /obj/item/seeds/banana/mime
name = "mimana peel"
desc = "A mimana peel."
icon_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/weapon/reagent_containers/food/snacks/grown/banana/bluespace
mutatelist = list()
genes = list(/datum/plant_gene/trait/slip, /datum/plant_gene/trait/teleport)
reagents_add = list("singulo" = 0.2, "banana" = 0.1, "vitamin" = 0.04, "nutriment" = 0.02)
rarity = 30
/obj/item/weapon/reagent_containers/food/snacks/grown/banana/bluespace
seed = /obj/item/seeds/banana/bluespace
name = "bluespace banana"
icon_state = "banana_blue"
trash = /obj/item/weapon/grown/bananapeel/bluespace
filling_color = "#0000FF"
origin_tech = "biotech=3;bluespace=5"
/obj/item/weapon/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/weapon/grown/bananapeel/specialpeel //used by /obj/item/clothing/shoes/clown_shoes/banana_shoes
name = "synthesized banana peel"
desc = "A synthetic banana peel."
/obj/item/weapon/grown/bananapeel/specialpeel/Crossed(AM)
if(iscarbon(AM))
var/mob/living/carbon/carbon = AM
if(carbon.slip(2, 2, src, FALSE))
qdel(src)
+47
View File
@@ -0,0 +1,47 @@
// 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/weapon/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"
mutatelist = list(/obj/item/seeds/soya/koi)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.05)
/obj/item/weapon/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
// 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/weapon/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/weapon/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
+184
View File
@@ -0,0 +1,184 @@
// 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/weapon/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
mutatelist = list(/obj/item/seeds/berry/glow, /obj/item/seeds/berry/poison)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/weapon/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
// 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/weapon/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/weapon/reagent_containers/food/snacks/grown/berries/poison
seed = /obj/item/seeds/berry/poison
name = "bunch of poison-berries"
desc = "Taste so good, you could die!"
icon_state = "poisonberrypile"
filling_color = "#C71585"
// 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/weapon/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/weapon/reagent_containers/food/snacks/grown/berries/death
seed = /obj/item/seeds/berry/death
name = "bunch of death-berries"
desc = "Taste so good, you could die!"
icon_state = "deathberrypile"
filling_color = "#708090"
// 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/weapon/reagent_containers/food/snacks/grown/berries/glow
lifespan = 30
endurance = 25
mutatelist = list()
genes = list(/datum/plant_gene/trait/glow/berry)
reagents_add = list("uranium" = 0.25, "iodine" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 20
/obj/item/weapon/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"
origin_tech = "plasmatech=6"
// 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/weapon/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"
mutatelist = list(/obj/item/seeds/cherry/blue)
reagents_add = list("nutriment" = 0.07, "sugar" = 0.07)
/obj/item/weapon/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
// 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/weapon/reagent_containers/food/snacks/grown/bluecherries
mutatelist = list()
reagents_add = list("nutriment" = 0.07, "sugar" = 0.07)
rarity = 10
/obj/item/weapon/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
// 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/weapon/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"
mutatelist = list(/obj/item/seeds/grape/green)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1, "sugar" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/grapes
seed = /obj/item/seeds/grape
name = "bunch of grapes"
desc = "Nutritious!"
icon_state = "grapes"
dried_type = /obj/item/weapon/reagent_containers/food/snacks/no_raisin
filling_color = "#FF1493"
bitesize_mod = 2
// 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/weapon/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/weapon/reagent_containers/food/snacks/grown/grapes/green
seed = /obj/item/seeds/grape/green
name = "bunch of green grapes"
icon_state = "greengrapes"
filling_color = "#7FFF00"
+91
View File
@@ -0,0 +1,91 @@
// 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/weapon/reagent_containers/food/snacks/grown/wheat
production = 1
yield = 4
potency = 15
oneharvest = 1
icon_dead = "wheat-dead"
mutatelist = list(/obj/item/seeds/wheat/oat, /obj/item/seeds/wheat/meat)
reagents_add = list("nutriment" = 0.04)
/obj/item/weapon/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
// 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/weapon/reagent_containers/food/snacks/grown/oat
mutatelist = list()
/obj/item/weapon/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
// 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/weapon/reagent_containers/food/snacks/grown/rice
mutatelist = list()
growthstages = 3
/obj/item/weapon/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
//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/weapon/reagent_containers/food/snacks/grown/meatwheat
mutatelist = list()
/obj/item/weapon/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
/obj/item/weapon/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/weapon/reagent_containers/food/snacks/meat/slab/meatwheat/M = new(get_turf(user))
user.drop_item()
qdel(src)
user.put_in_hands(M)
return 1
+94
View File
@@ -0,0 +1,94 @@
// 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/weapon/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
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/weapon/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
// 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/weapon/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/weapon/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
origin_tech = "biotech=4"
// 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 = "chilighost"
product = /obj/item/weapon/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/weapon/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/held_mob
filling_color = "#F8F8FF"
bitesize_mod = 4
origin_tech = "biotech=4;magnets=5"
/obj/item/weapon/reagent_containers/food/snacks/grown/ghost_chili/attack_hand(mob/user)
..()
if( istype(src.loc, /mob) )
held_mob = src.loc
START_PROCESSING(SSobj, src)
/obj/item/weapon/reagent_containers/food/snacks/grown/ghost_chili/process()
if(held_mob && src.loc == held_mob)
if( (held_mob.l_hand == src) || (held_mob.r_hand == src))
if(hasvar(held_mob,"gloves") && held_mob:gloves)
return
held_mob.bodytemperature += 15 * TEMPERATURE_DAMAGE_COEFFICIENT
if(prob(10))
held_mob << "<span class='warning'>Your hand holding [src] burns!</span>"
else
held_mob = null
..()
+123
View File
@@ -0,0 +1,123 @@
// Citrus - base type
/obj/item/weapon/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
// 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/weapon/reagent_containers/food/snacks/grown/citrus/lime
lifespan = 55
endurance = 50
yield = 4
potency = 15
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
mutatelist = list(/obj/item/seeds/orange)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.05)
/obj/item/weapon/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"
// 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/weapon/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"
mutatelist = list(/obj/item/seeds/lime)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.05)
/obj/item/weapon/reagent_containers/food/snacks/grown/citrus/orange
seed = /obj/item/seeds/orange
name = "orange"
desc = "It's an tangy fruit."
icon_state = "orange"
filling_color = "#FFA500"
// 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/weapon/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"
mutatelist = list(/obj/item/seeds/cash)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.05)
/obj/item/weapon/reagent_containers/food/snacks/grown/citrus/lemon
seed = /obj/item/seeds/lemon
name = "lemon"
desc = "When life gives you lemons, be grateful they aren't limes."
icon_state = "lemon"
filling_color = "#FFD700"
// Money Lemon
/obj/item/seeds/cash
name = "pack of money seeds"
desc = "When life gives you lemons, mutate them into cash."
icon_state = "seed-cash"
species = "cashtree"
plantname = "Money Tree"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/shell/moneyfruit
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
icon_grow = "lime-grow"
icon_dead = "lime-dead"
lifespan = 55
endurance = 45
yield = 4
reagents_add = list("nutriment" = 0.05)
rarity = 50 // Nanotrasen approves...
/obj/item/weapon/reagent_containers/food/snacks/grown/shell/moneyfruit
seed = /obj/item/seeds/cash
name = "Money Fruit"
desc = "Looks like a lemon with something bulging from the inside."
icon_state = "moneyfruit"
bitesize_mod = 2
/obj/item/weapon/reagent_containers/food/snacks/grown/shell/moneyfruit/add_juice()
..()
switch(seed.potency)
if(0 to 10)
trash = /obj/item/stack/spacecash
if(11 to 20)
trash = /obj/item/stack/spacecash/c10
if(21 to 30)
trash = /obj/item/stack/spacecash/c20
if(31 to 40)
trash = /obj/item/stack/spacecash/c50
if(41 to 50)
trash = /obj/item/stack/spacecash/c100
if(51 to 60)
trash = /obj/item/stack/spacecash/c200
if(61 to 80)
trash = /obj/item/stack/spacecash/c500
else
trash = /obj/item/stack/spacecash/c1000
@@ -0,0 +1,44 @@
// 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/weapon/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"
mutatelist = list(/obj/item/seeds/cocoapod/vanillapod)
reagents_add = list("cocoa" = 0.25, "nutriment" = 0.1)
/obj/item/weapon/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
// 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/weapon/reagent_containers/food/snacks/grown/vanillapod
mutatelist = list()
reagents_add = list("vanilla" = 0.25, "nutriment" = 0.1)
/obj/item/weapon/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"
+84
View File
@@ -0,0 +1,84 @@
// 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/weapon/reagent_containers/food/snacks/grown/corn
maturation = 8
oneharvest = 1
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/weapon/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/weapon/reagent_containers/food/snacks/popcorn
filling_color = "#FFFF00"
trash = /obj/item/weapon/grown/corncob
bitesize_mod = 2
/obj/item/weapon/grown/corncob
name = "corn cob"
desc = "A reminder of meals gone by."
icon_state = "corncob"
item_state = "corncob"
w_class = 1
throwforce = 0
throw_speed = 3
throw_range = 7
/obj/item/weapon/grown/corncob/attackby(obj/item/weapon/grown/W, mob/user, params)
..()
if(W.is_sharp())
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)
user.unEquip(src)
qdel(src)
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/weapon/grown/snapcorn
mutatelist = list()
rarity = 10
/obj/item/weapon/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 = 1
throwforce = 0
throw_speed = 3
throw_range = 7
var/snap_pops = 1
/obj/item/weapon/grown/snapcorn/add_juice()
..()
snap_pops = max(round(seed.potency/8), 1)
/obj/item/weapon/grown/snapcorn/attack_self(mob/user)
..()
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/weapon/grown/corncob(user.loc)
qdel(src)
@@ -0,0 +1,43 @@
// 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/weapon/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"
mutatelist = list(/obj/item/seeds/eggplant/eggy)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/weapon/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
// Egg-Plant
/obj/item/seeds/eggplant/eggy
desc = "These seeds grow to produce berries that look a lot like eggs."
icon_state = "seed-eggy"
species = "eggy"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/shell/eggy
lifespan = 75
production = 12
mutatelist = list()
reagents_add = list("nutriment" = 0.1)
/obj/item/weapon/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/weapon/reagent_containers/food/snacks/egg
filling_color = "#F8F8FF"
bitesize_mod = 2
+204
View File
@@ -0,0 +1,204 @@
// 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/weapon/reagent_containers/food/snacks/grown/poppy
endurance = 10
maturation = 8
yield = 6
potency = 20
oneharvest = 1
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/weapon/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 = SLOT_HEAD
filling_color = "#FF6347"
bitesize_mod = 3
// 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/weapon/reagent_containers/food/snacks/grown/poppy/lily
mutatelist = list()
/obj/item/weapon/reagent_containers/food/snacks/grown/poppy/lily
seed = /obj/item/seeds/poppy/lily
name = "lily"
desc = "A beautiful orange flower"
icon_state = "lily"
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/weapon/reagent_containers/food/snacks/grown/poppy/geranium
mutatelist = list()
/obj/item/weapon/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"
// 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/weapon/reagent_containers/food/snacks/grown/harebell
lifespan = 100
endurance = 20
maturation = 7
production = 1
yield = 2
potency = 30
oneharvest = 1
growthstages = 4
plant_type = PLANT_WEED
growing_icon = 'icons/obj/hydroponics/growing_flowers.dmi'
reagents_add = list("nutriment" = 0.04)
/obj/item/weapon/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"
slot_flags = SLOT_HEAD
filling_color = "#E6E6FA"
bitesize_mod = 3
// 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/weapon/grown/sunflower
endurance = 20
production = 2
yield = 2
oneharvest = 1
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/weapon/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"
damtype = "fire"
force = 0
slot_flags = SLOT_HEAD
throwforce = 0
w_class = 1
throw_speed = 1
throw_range = 3
/obj/item/weapon/grown/sunflower/attack(mob/M, mob/user)
M << "<font color='green'><b> [user] smacks you with a sunflower!</font><font color='yellow'><b>FLOWER POWER<b></font>"
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"
species = "moonflower"
plantname = "Moonflowers"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/moonflower
mutatelist = list()
reagents_add = list("moonshine" = 0.2, "vitamin" = 0.02, "nutriment" = 0.02)
rarity = 15
/obj/item/weapon/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 = SLOT_HEAD
filling_color = "#E6E6FA"
bitesize_mod = 2
// 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"
product = /obj/item/weapon/grown/novaflower
mutatelist = list()
reagents_add = list("condensedcapsaicin" = 0.25, "capsaicin" = 0.3, "nutriment" = 0)
rarity = 20
/obj/item/weapon/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"
damtype = "fire"
force = 0
slot_flags = SLOT_HEAD
throwforce = 0
w_class = 1
throw_speed = 1
throw_range = 3
attack_verb = list("roasted", "scorched", "burned")
/obj/item/weapon/grown/novaflower/add_juice()
..()
force = round((5 + seed.potency / 5), 1)
/obj/item/weapon/grown/novaflower/attack(mob/living/carbon/M, mob/user)
if(!..()) return
if(istype(M, /mob/living))
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("[key_name_admin(user)] set [key_name_admin(M)] on fire")
log_game("[key_name(user)] set [key_name(M)] on fire")
/obj/item/weapon/grown/novaflower/afterattack(atom/A as mob|obj, mob/user,proximity)
if(!proximity) return
if(force > 0)
force -= rand(1, (force / 3) + 1)
else
usr << "<span class='warning'>All the petals have fallen off the [name] from violent whacking!</span>"
usr.unEquip(src)
qdel(src)
/obj/item/weapon/grown/novaflower/pickup(mob/living/carbon/human/user)
..()
if(!user.gloves)
user << "<span class='danger'>The [name] burns your bare hand!</span>"
user.adjustFireLoss(rand(1, 5))
@@ -0,0 +1,81 @@
// 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/weapon/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"
mutatelist = list(/obj/item/seeds/grass/carpet)
reagents_add = list("nutriment" = 0.02, "hydrogen" = 0.05)
/obj/item/weapon/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
/obj/item/weapon/reagent_containers/food/snacks/grown/grass/attack_self(mob/user)
user << "<span class='notice'>You prepare the astroturf.</span>"
var/grassAmt = 1 + round(seed.potency / 50) // The grass we're holding
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/grass/G in user.loc) // The grass on the floor
grassAmt += 1 + round(G.seed.potency)
qdel(G)
while(grassAmt > 0)
var/obj/item/stack/tile/GT = new /obj/item/stack/tile/grass(user.loc)
if(grassAmt >= GT.max_amount)
GT.amount = GT.max_amount
else
GT.amount = grassAmt
for(var/obj/item/stack/tile/grass/GR in user.loc)
if(GR != GT && GR.amount < GR.max_amount)
GR.attackby(GT, user) //we try to transfer all old unfinished stacks to the new stack we created.
grassAmt -= GT.max_amount
qdel(src)
return
// 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/weapon/reagent_containers/food/snacks/grown/carpet
mutatelist = list(/obj/item/seeds/grass/carpet)
rarity = 10
/obj/item/weapon/reagent_containers/food/snacks/grown/carpet
seed = /obj/item/seeds/grass/carpet
name = "carpet"
desc = "The textile industry's dark secret."
icon_state = "carpetclump"
/obj/item/weapon/reagent_containers/food/snacks/grown/carpet/attack_self(mob/user)
user << "<span class='notice'>You roll out the red carpet.</span>"
var/carpetAmt = 1 + round(seed.potency / 50) // The carpet we're holding
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/carpet/C in user.loc) // The carpet on the floor
carpetAmt += 1 + round(C.seed.potency / 50)
qdel(C)
while(carpetAmt > 0)
var/obj/item/stack/tile/CT = new /obj/item/stack/tile/carpet(user.loc)
if(carpetAmt >= CT.max_amount)
CT.amount = CT.max_amount
else
CT.amount = carpetAmt
for(var/obj/item/stack/tile/carpet/CA in user.loc)
if(CA != CT && CA.amount < CA.max_amount)
CA.attackby(CT, user) //we try to transfer all old unfinished stacks to the new stack we created.
carpetAmt -= CT.max_amount
qdel(src)
return
+89
View File
@@ -0,0 +1,89 @@
// 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/weapon/reagent_containers/food/snacks/grown/kudzupod
lifespan = 20
endurance = 10
yield = 4
growthstages = 4
plant_type = PLANT_WEED
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 \he's trying to commit suicide..</span>")
plant(user)
return (BRUTELOSS)
/obj/item/seeds/kudzu/proc/plant(mob/user)
if(istype(user.loc,/turf/open/space))
return
var/turf/T = get_turf(src)
message_admins("Kudzu planted by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) at ([T.x],[T.y],[T.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>(JMP)</a>)",0,1)
investigate_log("was planted by [key_name(user)] at ([T.x],[T.y],[T.z])","kudzu")
new /obj/effect/spacevine_controller(user.loc, mutations, potency, production)
qdel(src)
/obj/item/seeds/kudzu/attack_self(mob/user)
plant(user)
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))
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))
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))
mutations.Remove(pick(temp_mut_list))
if(S.has_reagent("blood", 15))
production += rand(15, -5)
if(S.has_reagent("amatoxin", 5))
production += rand(5, -15)
if(S.has_reagent("plasma", 5))
potency += rand(5, -15)
if(S.has_reagent("holywater", 10))
potency += rand(15, -5)
/obj/item/weapon/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
+46
View File
@@ -0,0 +1,46 @@
// 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/weapon/reagent_containers/food/snacks/grown/watermelon
lifespan = 50
endurance = 40
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
icon_dead = "watermelon-dead"
mutatelist = list(/obj/item/seeds/watermelon/holy)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.2)
/obj/item/weapon/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/weapon/reagent_containers/food/snacks/watermelonslice
slices_num = 5
dried_type = null
w_class = 3
filling_color = "#008000"
bitesize_mod = 3
// 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/weapon/reagent_containers/food/snacks/grown/holymelon
mutatelist = list()
reagents_add = list("holywater" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 20
/obj/item/weapon/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
+137
View File
@@ -0,0 +1,137 @@
// Weeds
/obj/item/seeds/weeds
name = "pack of weed seeds"
desc = "Yo mang, want some weeds?"
icon_state = "seed"
species = "weeds"
plantname = "Starthistle"
lifespan = 100
endurance = 50 // damm pesky weeds
maturation = 5
production = 1
yield = -1
potency = -1
oneharvest = 1
growthstages = 4
plant_type = PLANT_WEED
// 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/weapon/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'
mutatelist = list(/obj/item/seeds/replicapod)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/weapon/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
// 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/weapon/reagent_containers/food/snacks/grown/sugarcane
lifespan = 60
endurance = 50
maturation = 3
yield = 4
growthstages = 3
reagents_add = list("sugar" = 0.25)
/obj/item/weapon/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
// 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"
product = /obj/item/weapon/reagent_containers/food/snacks/grown/shell/gatfruit
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/weapon/reagent_containers/food/snacks/grown/shell/gatfruit
seed = /obj/item/seeds/gatfruit
name = "gatfruit"
desc = "It smells like burning."
icon_state = "gatfruit"
origin_tech = "combat=6"
trash = /obj/item/weapon/gun/projectile/revolver
bitesize_mod = 2
//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/weapon/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/weapon/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
/obj/item/weapon/reagent_containers/food/snacks/grown/cherry_bomb/attack_self(mob/living/user)
var/area/A = get_area(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("[user] ([user.key ? user.key : "no key"]) primed a cherry bomb for detonation at [A] ([user.x], [user.y], [user.z]) <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>(JMP)</a>")
log_game("[user] ([user.key ? user.key : "no key"]) primed a cherry bomb for detonation at [A] ([user.x],[user.y],[user.z]).")
prime()
/obj/item/weapon/reagent_containers/food/snacks/grown/cherry_bomb/burn()
prime()
..()
/obj/item/weapon/reagent_containers/food/snacks/grown/cherry_bomb/ex_act(severity)
qdel(src) //Ensuring that it's deleted by its own explosion
/obj/item/weapon/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()
+278
View File
@@ -0,0 +1,278 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom
name = "mushroom"
bitesize_mod = 2
// 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/weapon/reagent_containers/food/snacks/grown/mushroom/reishi
lifespan = 35
endurance = 35
maturation = 10
production = 5
yield = 4
potency = 15
oneharvest = 1
growthstages = 4
plant_type = PLANT_MUSHROOM
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
reagents_add = list("morphine" = 0.35, "charcoal" = 0.35, "nutriment" = 0)
/obj/item/weapon/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/weapon/reagent_containers/food/snacks/grown/mushroom/amanita
lifespan = 50
endurance = 35
maturation = 10
production = 5
yield = 4
oneharvest = 1
growthstages = 3
plant_type = PLANT_MUSHROOM
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)
/obj/item/weapon/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/weapon/reagent_containers/food/snacks/grown/mushroom/angel
lifespan = 50
endurance = 35
maturation = 12
production = 5
yield = 2
potency = 35
oneharvest = 1
growthstages = 3
plant_type = PLANT_MUSHROOM
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
reagents_add = list("mushroomhallucinogen" = 0.04, "amatoxin" = 0.1, "nutriment" = 0, "amanitin" = 0.2)
rarity = 30
origin_tech = "biotech=5"
/obj/item/weapon/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"
// 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/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap
maturation = 7
production = 1
yield = 5
potency = 15
oneharvest = 1
growthstages = 3
plant_type = PLANT_MUSHROOM
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
reagents_add = list("mushroomhallucinogen" = 0.25, "nutriment" = 0.02)
/obj/item/weapon/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"
// 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/weapon/reagent_containers/food/snacks/grown/mushroom/plumphelmet
maturation = 8
production = 1
yield = 4
potency = 15
oneharvest = 1
growthstages = 3
plant_type = PLANT_MUSHROOM
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/weapon/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"
// 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/weapon/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/weapon/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"
origin_tech = "biotech=4;programming=5"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom/attack_self(mob/user)
if(istype(user.loc,/turf/open/space))
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)
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/weapon/reagent_containers/food/snacks/grown/mushroom/chanterelle
lifespan = 35
endurance = 20
maturation = 7
production = 1
yield = 5
potency = 15
oneharvest = 1
growthstages = 3
plant_type = PLANT_MUSHROOM
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
reagents_add = list("nutriment" = 0.1)
/obj/item/weapon/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/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom
lifespan = 120 //ten times that is the delay
endurance = 30
maturation = 15
production = 1
yield = 3 //-> spread
potency = 30 //-> brightness
oneharvest = 1
growthstages = 4
plant_type = PLANT_MUSHROOM
rarity = 20
genes = list(/datum/plant_gene/trait/glow)
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
mutatelist = list(/obj/item/seeds/glowshroom/glowcap)
reagents_add = list("radium" = 0.1, "phosphorus" = 0.1, "nutriment" = 0.04)
/obj/item/weapon/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/effect/glowshroom
origin_tech = "biotech=4;plasmatech=6"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/attack_self(mob/user)
if(istype(user.loc,/turf/open/space))
return
var/obj/effect/glowshroom/planted = new effect_path(user.loc)
planted.delay = planted.delay - seed.production * 100 //So the delay goes DOWN with better stats instead of up. :I
planted.endurance = seed.endurance
planted.yield = seed.yield
planted.potency = seed.potency
user << "<span class='notice'>You plant [src].</span>"
qdel(src)
// Glowcap
/obj/item/seeds/glowshroom/glowcap
name = "pack of glowcap mycelium"
desc = "This mycelium -powers- into mushrooms!"
icon_state = "mycelium-glowcap"
species = "glowcap"
icon_grow = "glowshroom-grow"
icon_dead = "glowshroom-dead"
plantname = "Glowcaps"
plant_type = PLANT_MUSHROOM
product = /obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/glowcap
genes = list(/datum/plant_gene/trait/glow, /datum/plant_gene/trait/cell_charge)
mutatelist = list()
reagents_add = list("teslium" = 0.1, "nutriment" = 0.04)
rarity = 30
/obj/item/weapon/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 aren't bioluminescent. They're warm to the touch..."
icon_state = "glowcap"
filling_color = "#00FA9A"
effect_path = /obj/effect/glowshroom/glowcap
origin_tech = "biotech=4;powerstorage=6;plasmatech=4"
+113
View File
@@ -0,0 +1,113 @@
/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/weapon/grown/nettle/basic
lifespan = 30
endurance = 40 // tuff like a toiger
yield = 4
growthstages = 5
plant_type = PLANT_WEED
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/weapon/grown/nettle/death
endurance = 25
maturation = 8
yield = 2
mutatelist = list()
reagents_add = list("facid" = 0.5, "sacid" = 0.5)
rarity = 20
/obj/item/weapon/grown/nettle //abstract type
name = "nettle"
desc = "It's probably <B>not</B> wise to touch it with bare hands..."
icon = 'icons/obj/weapons.dmi'
icon_state = "nettle"
damtype = "fire"
force = 15
hitsound = 'sound/weapons/bladeslice.ogg'
throwforce = 5
w_class = 1
throw_speed = 1
throw_range = 3
origin_tech = "combat=3"
attack_verb = list("stung")
/obj/item/weapon/grown/nettle/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is eating some of the [src.name]! It looks like \he's trying to commit suicide.</span>")
return (BRUTELOSS|TOXLOSS)
/obj/item/weapon/grown/nettle/pickup(mob/living/user)
..()
if(!iscarbon(user))
return 0
var/mob/living/carbon/C = user
if(ishuman(user))
var/mob/living/carbon/human/H = C
if(H.gloves)
return 0
var/organ = ((H.hand ? "l_":"r_") + "arm")
var/obj/item/bodypart/affecting = H.get_bodypart(organ)
if(affecting && affecting.take_damage(0, force))
H.update_damage_overlays(0)
else
C.take_organ_damage(0,force)
C << "<span class='userdanger'>The nettle burns your bare hand!</span>"
return 1
/obj/item/weapon/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
usr << "All the leaves have fallen off the nettle from violent whacking."
usr.unEquip(src)
qdel(src)
/obj/item/weapon/grown/nettle/basic
seed = /obj/item/seeds/nettle
/obj/item/weapon/grown/nettle/basic/add_juice()
..()
force = round((5 + seed.potency / 5), 1)
/obj/item/weapon/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
origin_tech = "combat=5"
/obj/item/weapon/grown/nettle/death/add_juice()
..()
force = round((5 + seed.potency / 2.5), 1)
/obj/item/weapon/grown/nettle/death/pickup(mob/living/carbon/user)
..()
if(..())
if(prob(50))
user.Paralyse(5)
user << "<span class='userdanger'>You are stunned by the Deathnettle when you try picking it up!</span>"
/obj/item/weapon/grown/nettle/death/attack(mob/living/carbon/M, mob/user)
if(!..()) return
if(istype(M, /mob/living))
M << "<span class='danger'>You are stunned by the powerful acid of the Deathnettle!</span>"
add_logs(user, M, "attacked", src)
M.adjust_blurriness(force/7)
if(prob(20))
M.Paralyse(force / 6)
M.Weaken(force / 15)
M.drop_item()
+69
View File
@@ -0,0 +1,69 @@
// 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/weapon/reagent_containers/food/snacks/grown/potato
lifespan = 30
maturation = 10
production = 1
yield = 4
oneharvest = 1
growthstages = 4
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
icon_grow = "potato-grow"
icon_dead = "potato-dead"
mutatelist = list(/obj/item/seeds/potato/sweet)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/weapon/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
/obj/item/weapon/reagent_containers/food/snacks/grown/potato/attackby(obj/item/weapon/W, mob/user, params)
..()
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if (C.use(5))
user << "<span class='notice'>You add some cable to the potato and slide it inside the battery encasing.</span>"
var/obj/item/weapon/stock_parts/cell/potato/pocell = new /obj/item/weapon/stock_parts/cell/potato(user.loc)
pocell.maxcharge = seed.potency * 20
// The secret of potato supercells!
var/datum/plant_gene/trait/cell_charge/G = seed.get_gene(/datum/plant_gene/trait/cell_charge)
if(G) // 10x charge for deafult cell charge gene - 20 000 with 100 potency.
pocell.maxcharge *= G.rate*1000
pocell.charge = pocell.maxcharge
pocell.desc = "A rechargable starch based power cell. This one has a power rating of [pocell.maxcharge], and you should not swallow it."
if(reagents.has_reagent("plasma", 2))
pocell.rigged = 1
qdel(src)
return
else
user << "<span class='warning'>You need five lengths of cable to make a potato battery!</span>"
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/weapon/reagent_containers/food/snacks/grown/potato/sweet
mutatelist = list()
reagents_add = list("vitamin" = 0.1, "sugar" = 0.1, "nutriment" = 0.1)
/obj/item/weapon/reagent_containers/food/snacks/grown/potato/sweet
seed = /obj/item/seeds/potato/sweet
name = "sweet potato"
desc = "It's sweet."
icon_state = "sweetpotato"
+52
View File
@@ -0,0 +1,52 @@
// 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/weapon/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"
mutatelist = list(/obj/item/seeds/pumpkin/blumpkin)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.2)
/obj/item/weapon/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
/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin/attackby(obj/item/weapon/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
// 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/weapon/reagent_containers/food/snacks/grown/blumpkin
mutatelist = list()
reagents_add = list("ammonia" = 0.2, "chlorine" = 0.2, "nutriment" = 0.2)
rarity = 20
/obj/item/weapon/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
@@ -0,0 +1,113 @@
// 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
oneharvest = 1
potency = 30
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/contains_sample = 0
/obj/item/seeds/replicapod/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W,/obj/item/weapon/reagent_containers/syringe))
if(!contains_sample)
for(var/datum/reagent/blood/bloodSample in W.reagents.reagent_list)
if(bloodSample.data["mind"] && bloodSample.data["cloneable"] == 1)
mind = bloodSample.data["mind"]
ckey = bloodSample.data["ckey"]
realName = bloodSample.data["real_name"]
blood_gender = bloodSample.data["gender"]
blood_type = bloodSample.data["blood_type"]
features = bloodSample.data["features"]
factions = bloodSample.data["factions"]
W.reagents.clear_reagents()
user << "<span class='notice'>You inject the contents of the syringe into the seeds.</span>"
contains_sample = 1
else
user << "<span class='warning'>The seeds reject the sample!</span>"
else
user << "<span class='warning'>The seeds already contain a genetic sample!</span>"
..()
/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 = usr) //now that one is fun -- Urist
var/obj/machinery/hydroponics/parent = loc
var/make_podman = 0
var/ckey_holder = null
if(config.revival_pod_plants)
if(ckey)
for(var/mob/M in player_list)
if(istype(M, /mob/dead/observer))
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(istype(M, /mob/living))
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 player_list)
if(mind && M.mind && ckey(M.mind.key) == ckey(mind.key) && M.ckey && M.client && M.stat == 2 && !M.suiciding)
if(istype(M, /mob/dead/observer))
var/mob/dead/observer/O = M
if(!O.can_reenter_corpse)
break
make_podman = 1
if(istype(M, /mob/living))
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(0,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"
podman.hardset_dna(null,null,podman.real_name,blood_type,/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++
for(var/i=0,i<seed_count,i++)
var/obj/item/seeds/replicapod/harvestseeds = src.Copy()
harvestseeds.forceMove(parent.loc)
parent.update_tray()
+103
View File
@@ -0,0 +1,103 @@
// 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/weapon/reagent_containers/food/snacks/grown/carrot
maturation = 10
production = 1
yield = 5
oneharvest = 1
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/weapon/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
/obj/item/weapon/reagent_containers/food/snacks/grown/carrot/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/kitchen/knife) || istype(I, /obj/item/weapon/hatchet))
user << "<span class='notice'>You sharpen the carrot into a shiv with [I].</span>"
var/obj/item/weapon/kitchen/knife/carrotshiv/Shiv = new /obj/item/weapon/kitchen/knife/carrotshiv
if(!remove_item_from_storage(user))
user.unEquip(src)
user.put_in_hands(Shiv)
qdel(src)
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/weapon/reagent_containers/food/snacks/grown/parsnip
icon_dead = "carrot-dead"
mutatelist = list()
reagents_add = list("vitamin" = 0.05, "nutriment" = 0.05)
/obj/item/weapon/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
// 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/weapon/reagent_containers/food/snacks/grown/whitebeet
lifespan = 60
endurance = 50
yield = 6
oneharvest = 1
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/weapon/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
// 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/weapon/reagent_containers/food/snacks/grown/redbeet
lifespan = 60
endurance = 50
yield = 6
oneharvest = 1
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
icon_dead = "whitebeet-dead"
reagents_add = list("vitamin" = 0.05, "nutriment" = 0.05)
/obj/item/weapon/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
@@ -0,0 +1,85 @@
// 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/weapon/reagent_containers/food/snacks/grown/tea
lifespan = 20
maturation = 5
production = 5
yield = 5
growthstages = 5
icon_dead = "tea-dead"
mutatelist = list(/obj/item/seeds/tea/astra)
reagents_add = list("vitamin" = 0.04, "teapowder" = 0.1)
/obj/item/weapon/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"
// 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/weapon/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/weapon/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"
// 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/weapon/reagent_containers/food/snacks/grown/coffee
lifespan = 30
endurance = 20
maturation = 5
production = 5
yield = 5
growthstages = 5
icon_dead = "coffee-dead"
mutatelist = list(/obj/item/seeds/coffee/robusta)
reagents_add = list("vitamin" = 0.04, "coffeepowder" = 0.1)
/obj/item/weapon/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
// 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/weapon/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/weapon/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"
+42
View File
@@ -0,0 +1,42 @@
// 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/weapon/reagent_containers/food/snacks/grown/tobacco
lifespan = 20
maturation = 5
production = 5
oneharvest = 1
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/weapon/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"
// 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/weapon/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/weapon/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"
+143
View File
@@ -0,0 +1,143 @@
// 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/weapon/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)
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/weapon/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
// 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/weapon/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/weapon/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"
origin_tech = "biotech=5"
// 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/weapon/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)
reagents_add = list("lube" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 20
/obj/item/weapon/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"
// 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/weapon/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)
reagents_add = list("lube" = 0.2, "singulo" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
rarity = 50
/obj/item/weapon/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"
origin_tech = "biotech=4;bluespace=5"
// 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/weapon/reagent_containers/food/snacks/grown/tomato/killer
yield = 2
oneharvest = 1
growthstages = 2
icon_grow = "killertomato-grow"
icon_harvest = "killertomato-harvest"
icon_dead = "killertomato-dead"
mutatelist = list()
rarity = 30
/obj/item/weapon/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"
origin_tech = "biotech=4;combat=5"
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/killer/attack(mob/M, mob/user, def_zone)
if(awakening)
user << "<span class='warning'>The tomato is twitching and shaking, preventing you from eating it.</span>"
return
..()
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/killer/attack_self(mob/user)
if(awakening || istype(user.loc,/turf/open/space))
return
user << "<span class='notice'>You begin to awaken the Killer Tomato...</span>"
awakening = 1
spawn(30)
if(!qdeleted(src))
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>")
if(user)
user.unEquip(src)
qdel(src)
@@ -0,0 +1,93 @@
/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/weapon/grown/log
lifespan = 80
endurance = 50
maturation = 15
production = 1
yield = 5
potency = 50
oneharvest = 1
growthstages = 3
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
icon_dead = "towercap-dead"
plant_type = PLANT_MUSHROOM
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/weapon/grown/log/steel
mutatelist = list()
rarity = 20
/obj/item/weapon/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 = 3
throw_speed = 2
throw_range = 3
origin_tech = "materials=1"
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
var/plank_type = /obj/item/stack/sheet/mineral/wood
var/plank_name = "wooden planks"
var/list/accepted = list(/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco,
/obj/item/weapon/reagent_containers/food/snacks/grown/tea,
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/vulgaris,
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/deus,
/obj/item/weapon/reagent_containers/food/snacks/grown/wheat)
/obj/item/weapon/grown/log/attackby(obj/item/weapon/W, mob/user, params)
..()
if(W.sharpness)
user.show_message("<span class='notice'>You make [plank_name] out of \the [src]!</span>", 1)
var/obj/item/stack/plank = new plank_type(user.loc, 1 + round(seed.potency / 25))
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)
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(is_type_in_list(W,accepted))
var/obj/item/weapon/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/device/flashlight/flare/torch/T = new /obj/item/device/flashlight/flare/torch(user.loc)
usr.unEquip(W)
usr.put_in_active_hand(T)
qdel(leaf)
qdel(src)
return
else
usr << "<span class ='warning'>You must dry this first!</span>"
/obj/item/weapon/grown/log/tree
seed = null
name = "wood log"
desc = "TIMMMMM-BERRRRRRRRRRR!"
/obj/item/weapon/grown/log/steel
seed = /obj/item/seeds/tower/steel
name = "steel-cap log"
desc = "It's made of metal."
icon_state = "steellogs"
accepted = list()
plank_type = /obj/item/stack/rods
plank_name = "rods"
+80
View File
@@ -0,0 +1,80 @@
// **********************
// Other harvested materials from plants (that are not food)
// **********************
/obj/item/weapon/grown // Grown weapons
name = "grown_weapon"
icon = 'icons/obj/hydroponics/harvest.dmi'
burn_state = 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.
/obj/item/weapon/grown/New(newloc, var/obj/item/seeds/new_seed = null)
..()
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 *= TransformUsingVariable(seed.potency, 100, 0.5)
add_juice()
/obj/item/weapon/grown/attackby(obj/item/O, mob/user, params)
..()
if (istype(O, /obj/item/device/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>"
usr << msg
return
/obj/item/weapon/grown/proc/add_juice()
if(reagents)
return 1
return 0
/obj/item/weapon/grown/Crossed(atom/movable/AM)
if(seed)
for(var/datum/plant_gene/trait/T in seed.genes)
T.on_cross(src, AM)
..()
// Glow gene procs
/obj/item/weapon/grown/Destroy()
if(seed)
var/datum/plant_gene/trait/glow/G = seed.get_gene(/datum/plant_gene/trait/glow)
if(G && ismob(loc))
loc.AddLuminosity(-G.get_lum(seed))
return ..()
/obj/item/weapon/grown/pickup(mob/user)
..()
if(seed)
var/datum/plant_gene/trait/glow/G = seed.get_gene(/datum/plant_gene/trait/glow)
if(G)
SetLuminosity(0)
user.AddLuminosity(G.get_lum(seed))
/obj/item/weapon/grown/dropped(mob/user)
..()
if(seed)
var/datum/plant_gene/trait/glow/G = seed.get_gene(/datum/plant_gene/trait/glow)
if(G)
user.AddLuminosity(-G.get_lum(seed))
SetLuminosity(G.get_lum(seed))
@@ -0,0 +1,201 @@
// Plant analyzer
/obj/item/device/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"
w_class = 1
slot_flags = SLOT_BELT
origin_tech = "magnets=2;biotech=2"
materials = list(MAT_METAL=30, MAT_GLASS=20)
// *************************************
// Hydroponics Tools
// *************************************
/obj/item/weapon/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 = "spray"
volume = 100
flags = OPENCONTAINER
slot_flags = SLOT_BELT
throwforce = 0
w_class = 2
throw_speed = 3
throw_range = 10
/obj/item/weapon/reagent_containers/spray/weedspray/New()
..()
reagents.add_reagent("weedkiller", 100)
/obj/item/weapon/reagent_containers/spray/weedspray/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is huffing the [src.name]! It looks like \he's trying to commit suicide.</span>")
return (TOXLOSS)
/obj/item/weapon/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"
volume = 100
flags = OPENCONTAINER
slot_flags = SLOT_BELT
throwforce = 0
w_class = 2
throw_speed = 3
throw_range = 10
/obj/item/weapon/reagent_containers/spray/pestspray/New()
..()
reagents.add_reagent("pestkiller", 100)
/obj/item/weapon/reagent_containers/spray/pestspray/suicide_act(mob/user)
viewers(user) << "<span class='suicide'>[user] is huffing the [src.name]! It looks like \he's trying to commit suicide.</span>"
return (TOXLOSS)
/obj/item/weapon/cultivator
name = "cultivator"
desc = "It's used for removing weeds or scratching your back."
icon = 'icons/obj/weapons.dmi'
icon_state = "cultivator"
item_state = "cultivator"
origin_tech = "engineering=2;biotech=2"
flags = CONDUCT
force = 5
throwforce = 7
w_class = 2
materials = list(MAT_METAL=50)
attack_verb = list("slashed", "sliced", "cut", "clawed")
hitsound = 'sound/weapons/bladeslice.ogg'
/obj/item/weapon/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/weapons.dmi'
icon_state = "hatchet"
flags = CONDUCT
force = 12
w_class = 1
throwforce = 15
throw_speed = 3
throw_range = 4
materials = list(MAT_METAL = 15000)
origin_tech = "materials=2;combat=2"
attack_verb = list("chopped", "torn", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
sharpness = IS_SHARP
/obj/item/weapon/hatchet/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is chopping at \himself with the [src.name]! It looks like \he's trying to commit suicide.</span>")
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return (BRUTELOSS)
/obj/item/weapon/scythe
icon_state = "scythe0"
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 = 4
flags = CONDUCT
armour_penetration = 20
slot_flags = SLOT_BACK
origin_tech = "materials=3;combat=2"
attack_verb = list("chopped", "sliced", "cut", "reaped")
hitsound = 'sound/weapons/bladeslice.ogg'
/obj/item/weapon/scythe/suicide_act(mob/user) // maybe later i'll actually figure out how to make it behead them
user.visible_message("<span class='suicide'>[user] is beheading \himself with the [src.name]! It looks like \he's trying to commit suicide.</span>")
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return (BRUTELOSS)
// *************************************
// Nutrient defines for hydroponics
// *************************************
/obj/item/weapon/reagent_containers/glass/bottle/nutrient
name = "bottle of nutrient"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
volume = 50
w_class = 1
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(1,2,5,10,15,25,50)
/obj/item/weapon/reagent_containers/glass/bottle/nutrient/New()
..()
src.pixel_x = rand(-5, 5)
src.pixel_y = rand(-5, 5)
/obj/item/weapon/reagent_containers/glass/bottle/nutrient/ez
name = "bottle of E-Z-Nutrient"
desc = "Contains a fertilizer that causes mild mutations with each harvest."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
/obj/item/weapon/reagent_containers/glass/bottle/nutrient/ez/New()
..()
reagents.add_reagent("eznutriment", 50)
/obj/item/weapon/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."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle18"
/obj/item/weapon/reagent_containers/glass/bottle/nutrient/l4z/New()
..()
reagents.add_reagent("left4zednutriment", 50)
/obj/item/weapon/reagent_containers/glass/bottle/nutrient/rh
name = "bottle of Robust Harvest"
desc = "Contains a fertilizer that doubles the yield of a plant while causing no mutations."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle15"
/obj/item/weapon/reagent_containers/glass/bottle/nutrient/rh/New()
..()
reagents.add_reagent("robustharvestnutriment", 50)
/obj/item/weapon/reagent_containers/glass/bottle/nutrient/empty
name = "bottle"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
/obj/item/weapon/reagent_containers/glass/bottle/killer
name = "bottle"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
volume = 50
w_class = 1
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(1,2,5,10,15,25,50)
/obj/item/weapon/reagent_containers/glass/bottle/killer/weedkiller
name = "bottle of weed killer"
desc = "Contains a herbicide."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle19"
/obj/item/weapon/reagent_containers/glass/bottle/killer/weedkiller/New()
..()
reagents.add_reagent("weedkiller", 50)
/obj/item/weapon/reagent_containers/glass/bottle/killer/pestkiller
name = "bottle of pest spray"
desc = "Contains a pesticide."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle20"
/obj/item/weapon/reagent_containers/glass/bottle/killer/pestkiller/New()
..()
reagents.add_reagent("pestkiller", 50)
+938
View File
@@ -0,0 +1,938 @@
/obj/machinery/hydroponics
name = "hydroponics tray"
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "hydrotray"
density = 1
anchored = 1
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/health = 0 //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 overpolinate one plant
var/using_irrigation = FALSE //If the tray is connected to other trays via irrigation hoses
var/self_sustaining = FALSE //If the tray generates nutrients and water on its own
pixel_y=8
/obj/machinery/hydroponics/constructable
name = "hydroponics tray"
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "hydrotray3"
/obj/machinery/hydroponics/constructable/New()
..()
var/obj/item/weapon/circuitboard/machine/B = new /obj/item/weapon/circuitboard/machine/hydroponics(null)
B.apply_default_parts(src)
/obj/item/weapon/circuitboard/machine/hydroponics
name = "circuit board (Hydroponics Tray)"
build_path = /obj/machinery/hydroponics/constructable
origin_tech = "programming=1;biotech=2"
req_components = list(
/obj/item/weapon/stock_parts/matter_bin = 2,
/obj/item/weapon/stock_parts/manipulator = 1,
/obj/item/weapon/stock_parts/console_screen = 1)
/obj/machinery/hydroponics/constructable/RefreshParts()
var/tmp_capacity = 0
for (var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
tmp_capacity += M.rating
for (var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
rating = M.rating
maxwater = tmp_capacity * 50 // Up to 300
maxnutri = tmp_capacity * 5 // Up to 30
waterlevel = maxwater
nutrilevel = 3
/obj/machinery/hydroponics/Destroy()
if(myseed)
qdel(myseed)
myseed = null
return ..()
/obj/machinery/hydroponics/constructable/attackby(obj/item/I, mob/user, params)
if(default_deconstruction_screwdriver(user, "hydrotray3", "hydrotray3", I))
return
if(exchange_parts(user, I))
return
if(default_pry_open(I))
return
if(default_unfasten_wrench(user, I))
return
if(istype(I, /obj/item/weapon/crowbar))
if(using_irrigation)
user << "<span class='warning'>Disconnect the hoses first!</span>"
else if(default_deconstruction_crowbar(I, 1))
return
else
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 cardinal)
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.loc = src
if(self_sustaining)
adjustNutri(2 / rating)
adjustWater(rand(8, 10) / rating)
adjustWeeds(-5 / rating)
adjustPests(-5 / rating)
adjustToxic(-5 / rating)
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.plant_type != PLANT_WEED)
adjustHealth(-rand(1,3))
//Photosynthesis/////////////////////////////////////////////////////////
// Lack of light hurts non-mushrooms
if(isturf(loc))
var/turf/currentTurf = loc
var/lightAmt = currentTurf.lighting_lumcount
if(myseed.plant_type == PLANT_MUSHROOM)
if(lightAmt < 2)
adjustHealth(-1 / rating)
else // Non-mushroom
if(lightAmt < 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.plant_type != PLANT_MUSHROOM)
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.plant_type != PLANT_WEED)
adjustHealth(-1 / rating)
//Health & Age///////////////////////////////////////////////////////////
// Plant dies if health <= 0
if(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.plant_type == PLANT_NORMAL) // 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))
color = rgb(255, 175, 0)
else
overlays += image('icons/obj/hydroponics/equipment.dmi', icon_state = "gaia_blessing")
SetLuminosity(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)
SetLuminosity(G.get_lum(myseed))
else
SetLuminosity(0)
return
/obj/machinery/hydroponics/proc/update_icon_hoses()
var/n = 0
for(var/Dir in cardinal)
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/image/I
if(dead)
I = image(icon = myseed.growing_icon, icon_state = myseed.icon_dead)
else if(harvest)
if(!myseed.icon_harvest)
I = image(icon = myseed.growing_icon, icon_state = "[myseed.icon_grow][myseed.growthstages]")
else
I = image(icon = myseed.growing_icon, icon_state = myseed.icon_harvest)
else
var/t_growthstate = min(round((age / myseed.maturation) * myseed.growthstages), myseed.growthstages)
I = image(icon = myseed.growing_icon, icon_state = "[myseed.icon_grow][t_growthstate]")
I.layer = OBJ_LAYER + 0.01
add_overlay(I)
/obj/machinery/hydroponics/proc/update_icon_lights()
if(waterlevel <= 10)
add_overlay(image('icons/obj/hydroponics/equipment.dmi', icon_state = "over_lowwater3"))
if(nutrilevel <= 2)
add_overlay(image('icons/obj/hydroponics/equipment.dmi', icon_state = "over_lownutri3"))
if(health <= (myseed.endurance / 2))
add_overlay(image('icons/obj/hydroponics/equipment.dmi', icon_state = "over_lowhealth3"))
if(weedlevel >= 5 || pestlevel >= 5 || toxic >= 40)
add_overlay(image('icons/obj/hydroponics/equipment.dmi', icon_state = "over_alert3"))
if(harvest)
add_overlay(image('icons/obj/hydroponics/equipment.dmi', icon_state = "over_harvest3"))
/obj/machinery/hydroponics/examine(user)
..()
if(myseed)
user << "<span class='info'>It has <span class='name'>[myseed.plantname]</span> planted.</span>"
if (dead)
user << "<span class='warning'>It's dead!</span>"
else if (harvest)
user << "<span class='info'>It's ready to harvest.</span>"
else if (health <= (myseed.endurance / 2))
user << "<span class='warning'>It looks unhealthy.</span>"
else
user << "<span class='info'>[src] is empty.</span>"
if(!self_sustaining)
user << "<span class='info'>Water: [waterlevel]/[maxwater]</span>"
user << "<span class='info'>Nutrient: [nutrilevel]/[maxnutri]</span>"
else
user << "<span class='info'>It doesn't require any water or nutrients.</span>"
if(weedlevel >= 5)
user << "<span class='warning'>[src] is filled with weeds!</span>"
if(pestlevel >= 5)
user << "<span class='warning'>[src] is filled with tiny worms!</span>"
user << "" // Empty line for readability.
/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/weeds(src)
age = 0
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) // Mutates the current seed
if(!myseed)
return
myseed.mutate(lifemut, endmut, productmut, yieldmut, potmut)
/obj/machinery/hydroponics/proc/hardmutate()
mutate(4, 10, 2, 4, 50)
/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
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
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
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
health = 0
harvest = 0
pestlevel = 0 // Pests die
if(!dead)
update_icon()
dead = 1
/obj/machinery/hydroponics/proc/mutatepest()
if(pestlevel > 5)
visible_message("<span class='warning'>The pests seem to behave oddly...</span>")
for(var/i=0, i<3, i++)
var/obj/effect/spider/spiderling/S = new(src.loc)
S.grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/hunter
else
usr << "<span class='warning'>The pests seem to behave oddly, but quickly settle down...</span>"
/obj/machinery/hydroponics/proc/applyChemicals(datum/reagents/S)
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)
plantdies()
if(81 to 90)
mutatespecie()
if(66 to 80)
hardmutate()
if(41 to 65)
mutate()
if(21 to 41)
usr << "<span class='warning'>The plants don't seem to react...</span>"
if(11 to 20)
mutateweed()
if(1 to 10)
mutatepest()
else
usr << "<span class='warning'>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 * rating
mutmod = 1 * rating
adjustNutri(round(S.get_reagent_amount("eznutriment") * 1))
if(S.has_reagent("left4zednutriment", 1))
yieldmod = 0 * rating
mutmod = 2 * rating
adjustNutri(round(S.get_reagent_amount("left4zednutriment") * 1))
if(S.has_reagent("robustharvestnutriment", 1))
yieldmod = 2 * rating
mutmod = 0 * rating
adjustNutri(round(S.get_reagent_amount("robustharvestnutriment") *1 ))
// 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("flourine") * 2.5))
adjustWater(-round(S.get_reagent_amount("flourine") * 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))
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))
adjustHealth(round(S.get_reagent_amount("saltpetre") * 0.25))
if(myseed)
myseed.adjust_production(-round(S.get_reagent_amount("saltpetre") * 0.02))
myseed.adjust_potency(round(S.get_reagent_amount("saltpetre") * 0.01))
// 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()
else
usr << "<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/weapon/reagent_containers/food/snacks/grown/ambrosia/gaia)) //Checked early on so it doesn't have to deal with composting checks
if(self_sustaining)
user << "<span class='warning'>This [name] is already self-sustaining!</span>"
return
if(myseed || weedlevel)
user << "<span class='warning'>[src] needs to be clear of plants and weeds!</span>"
return
if(alert(user, "This will make [src] self-sustaining but consume [O] forever. Are you sure?", "[name]", "I'm Sure", "Abort") == "Abort" || !user)
return
user.visible_message("<span class='notice'>[user] gently pulls open the soil for [O] and places it inside.</span>", "<span class='notice'>You tenderly root [O] into [src].</span>")
user.drop_item()
qdel(O)
visible_message("<span class='boldnotice'>[src] begins to glow with a beautiful light!</span>")
self_sustaining = TRUE
update_icon()
else if(istype(O, /obj/item/weapon/reagent_containers) ) // Syringe stuff (and other reagent containers now too)
var/obj/item/weapon/reagent_containers/reagent_source = O
if(istype(reagent_source, /obj/item/weapon/reagent_containers/syringe))
var/obj/item/weapon/reagent_containers/syringe/syr = reagent_source
if(syr.mode != 1)
user << "<span class='warning'>You can't get any extract out of this plant.</span>" //That. Gives me an idea...
return
if(!reagent_source.reagents.total_volume)
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?
if(istype(reagent_source, /obj/item/weapon/reagent_containers/food/snacks) || istype(reagent_source, /obj/item/weapon/reagent_containers/pill))
visi_msg="[user] composts [reagent_source], spreading it through [target]"
else
if(istype(reagent_source, /obj/item/weapon/reagent_containers/syringe/))
var/obj/item/weapon/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/weapon/reagent_containers/spray/))
visi_msg="[user] sprays [target] with [reagent_source]"
playsound(loc, 'sound/effects/spray3.ogg', 50, 1, -6)
irrigate = 1
else if(reagent_source.amount_per_transfer_from_this) // Droppers, cans, beakers, what have you.
visi_msg="[user] uses [reagent_source] on [target]"
irrigate = 1
// Beakers, bottles, buckets, etc. Can't use is_open_container though.
if(istype(reagent_source, /obj/item/weapon/reagent_containers/glass/))
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
if(irrigate && reagent_source.amount_per_transfer_from_this > 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(reagent_source.amount_per_transfer_from_this/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/weapon/reagent_containers/food/snacks) || istype(reagent_source, /obj/item/weapon/reagent_containers/pill))
qdel(reagent_source)
H.applyChemicals(S)
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 [user.ckey]([user]) at ([x],[y],[z])","kudzu")
user.unEquip(O)
user << "<span class='notice'>You plant [O].</span>"
dead = 0
myseed = O
age = 1
health = myseed.endurance
lastcycle = world.time
O.loc = src
update_icon()
else
user << "<span class='warning'>[src] already has seeds in it!</span>"
else if(istype(O, /obj/item/device/plant_analyzer))
if(myseed)
user << "*** <B>[myseed.plantname]</B> ***" //Carn: now reports the plants growing, not the seeds.
user << "- Plant Age: <span class='notice'>[age]</span>"
var/list/text_string = myseed.get_analyzer_text()
if(text_string)
user << text_string
else
user << "<B>No plant found.</B>"
user << "- Weed level: <span class='notice'>[weedlevel] / 10</span>"
user << "- Pest level: <span class='notice'>[pestlevel] / 10</span>"
user << "- Toxicity level: <span class='notice'>[toxic] / 100</span>"
user << "- Water level: <span class='notice'>[waterlevel] / [maxwater]</span>"
user << "- Nutrition level: <span class='notice'>[nutrilevel] / [maxnutri]</span>"
user << ""
else if(istype(O, /obj/item/weapon/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
user << "<span class='warning'>This plot is completely devoid of weeds! It doesn't need uprooting.</span>"
else if(istype(O, /obj/item/weapon/storage/bag/plants))
attack_hand(user)
var/obj/item/weapon/storage/bag/plants/S = O
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in locate(user.x,user.y,user.z))
if(!S.can_be_inserted(G))
return
S.handle_item_insertion(G, 1)
else if(istype(O, /obj/item/weapon/wrench) && unwrenchable)
if(using_irrigation)
user << "<span class='warning'>Disconnect the hoses first!</span>"
return
if(!anchored && !isinspace())
user.visible_message("[user] begins to wrench [src] into place.", \
"<span class='notice'>You begin to wrench [src] in place...</span>")
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
if (do_after(user, 20/O.toolspeed, target = src))
if(anchored)
return
anchored = 1
user.visible_message("[user] wrenches [src] into place.", \
"<span class='notice'>You wrench [src] in place.</span>")
else if(anchored)
user.visible_message("[user] begins to unwrench [src].", \
"<span class='notice'>You begin to unwrench [src]...</span>")
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
if (do_after(user, 20/O.toolspeed, target = src))
if(!anchored)
return
anchored = 0
user.visible_message("[user] unwrenches [src].", \
"<span class='notice'>You unwrench [src].</span>")
else if(istype(O, /obj/item/weapon/wirecutters) && unwrenchable)
using_irrigation = !using_irrigation
playsound(src, 'sound/items/Wirecutter.ogg', 50, 1)
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/weapon/shovel/spade) && unwrenchable)
if(!myseed && !weedlevel)
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>")
playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1)
if(!do_after(user, 50, target = src) || (!myseed && !weedlevel))
return
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>")
playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1)
if(myseed) //Could be that they're just using it as a de-weeder
qdel(myseed)
myseed = null
weedlevel = 0 //Has a side effect of cleaning up those nasty weeds
update_icon()
else
return ..()
/obj/machinery/hydroponics/attack_hand(mob/user)
if(istype(user, /mob/living/silicon)) //How does AI know what plant is?
return
if(harvest)
myseed.harvest(user)
else if(dead)
dead = 0
user << "<span class='notice'>You remove the dead plant from [src].</span>"
qdel(myseed)
myseed = null
update_icon()
else
examine(user)
/obj/machinery/hydroponics/proc/update_tray(mob/user = usr)
harvest = 0
lastproduce = age
if(istype(myseed,/obj/item/seeds/replicapod))
user << "<span class='notice'>You harvest from the [myseed.plantname].</span>"
else if(myseed.getYield() <= 0)
user << "<span class='warning'>You fail to harvest anything useful!</span>"
else
user << "<span class='notice'>You harvest [myseed.getYield()] items from the [myseed.plantname].</span>"
if(myseed.oneharvest)
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)
health = Clamp(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/soil //Not actually hydroponics at all! Honk!
name = "soil"
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "soil"
density = 0
use_power = 0
unwrenchable = 0
/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/weapon/shovel) && !istype(O, /obj/item/weapon/shovel/spade)) //Doesn't include spades because of uprooting plants
user << "<span class='notice'>You clear up [src]!</span>"
qdel(src)
else
return ..()
+314
View File
@@ -0,0 +1,314 @@
/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
// 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
// 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 = 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/list/origin_tech = null
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/weapon/reagent_containers/food/snacks/grown/G, newloc)
if(!origin_tech) // This ugly code segment adds RnD tech levels to resulting plants.
return
if(G.origin_tech)
var/list/tech = params2list(G.origin_tech)
for(var/t in origin_tech)
if(t in tech)
tech[t] = max(text2num(tech[t]), origin_tech[t])
else
tech[t] = origin_tech[t]
G.origin_tech = list2params(tech)
else
G.origin_tech = list2params(origin_tech)
/datum/plant_gene/trait/proc/on_consume(obj/item/weapon/reagent_containers/food/snacks/grown/G, mob/living/carbon/target)
return
/datum/plant_gene/trait/proc/on_cross(obj/item/weapon/reagent_containers/food/snacks/grown/G, atom/target)
return
/datum/plant_gene/trait/proc/on_slip(obj/item/weapon/reagent_containers/food/snacks/grown/G, mob/living/carbon/target)
return
/datum/plant_gene/trait/proc/on_squash(obj/item/weapon/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>"
origin_tech = list("biotech" = 5)
/*/datum/plant_gene/trait/squash/on_slip(obj/item/weapon/reagent_containers/food/snacks/grown/G, mob/living/carbon/target)
G.squash(target)*/
/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 = 0.1
examine_line = "<span class='info'>It has a very slippery skin.</span>"
/datum/plant_gene/trait/slip/on_cross(obj/item/weapon/reagent_containers/food/snacks/grown/G, atom/target)
if(iscarbon(target))
var/obj/item/seeds/seed = G.seed
var/mob/living/carbon/M = target
var/stun_len = seed.potency * rate * 0.8
if(istype(G) && ispath(G.trash, /obj/item/weapon/grown))
return
if(!istype(G, /obj/item/weapon/grown/bananapeel) && (!G.reagents || !G.reagents.has_reagent("lube")))
stun_len /= 3
var/stun = min(stun_len, 7)
var/weaken = min(stun_len, 7)
if(M.slip(stun, weaken, G))
for(var/datum/plant_gene/trait/T in 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.
// Multiplies max charge by (rate*1000) when used in potato power cells.
name = "Electrical Activity"
rate = 0.2
origin_tech = list("powerstorage" = 5)
/datum/plant_gene/trait/cell_charge/on_slip(obj/item/weapon/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/weapon/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/weapon/reagent_containers/food/snacks/grown/G, mob/living/carbon/target)
if(!G.reagents.total_volume)
var/batteries_recharged = 0
for(var/obj/item/weapon/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)
target << "<span class='notice'>Your batteries are recharged!</span>"
/datum/plant_gene/trait/glow
// Makes plant glow. Makes plant in tray glow too.
// Adds potency*rate luminosity to products.
name = "Bioluminescence"
rate = 0.1
examine_line = "<span class='info'>It emits a soft glow.</span>"
trait_id = "glow"
/datum/plant_gene/trait/glow/proc/get_lum(obj/item/seeds/S)
return round(S.potency*rate)
/datum/plant_gene/trait/glow/on_new(obj/item/weapon/reagent_containers/food/snacks/grown/G, newloc)
..()
if(ismob(newloc))
G.pickup(newloc)//adjusts the lighting on the mob
else
G.SetLuminosity(get_lum(G.seed))
/datum/plant_gene/trait/glow/berry
name = "Strong Bioluminescence"
rate = 0.2
/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
origin_tech = list("bluespace" = 5)
/datum/plant_gene/trait/teleport/on_squash(obj/item/weapon/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_item(T) //Leave a pile of goo behind for dramatic effect...
do_teleport(target, T, teleport_radius)
/datum/plant_gene/trait/teleport/on_slip(obj/item/weapon/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)
C << "<span class='warning'>You slip through spacetime!</span>"
do_teleport(C, T, teleport_radius)
if(prob(50))
do_teleport(G, T, teleport_radius)
else
new /obj/effect/decal/cleanable/molten_item(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/weapon/reagent_containers/food/snacks/grown/G, newloc)
..()
G.reagents.set_reacting(FALSE)
/datum/plant_gene/trait/noreact/on_squash(obj/item/weapon/reagent_containers/food/snacks/grown/G, atom/target)
G.reagents.set_reacting(TRUE)
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/weapon/reagent_containers/food/snacks/grown/G, newloc)
..()
G.reagents.maximum_volume *= rate
+44
View File
@@ -0,0 +1,44 @@
var/list/chem_t1_reagents = list(
"hydrogen", "oxygen", "silicon",
"phosphorus", "sulfur", "carbon",
"nitrogen", "water"
)
var/list/chem_t2_reagents = list(
"lithium", "copper", "mercury",
"sodium", "iodine", "bromine"
) // "sugar", "sacid" removed because they are already in roundstart plants
var/list/chem_t3_reagents = list(
"ethanol", "chlorine", "potassium",
"aluminium", "radium", "fluorine",
"iron", "welding_fuel", "silver",
"stable_plasma"
)
var/list/chem_t4_reagents = list(
"oil", "ash", "acetone",
"saltpetre", "ammonia", "diethylamine"
)
/obj/item/seeds/sample
name = "plant sample"
icon_state = "sample-empty"
potency = -1
yield = -1
var/sample_color = "#FFFFFF"
/obj/item/seeds/sample/New()
..()
if(sample_color)
var/image/I = image(icon, icon_state = "sample-filling")
I.color = sample_color
add_overlay(I)
/obj/item/seeds/sample/get_analyzer_text()
return " The DNA of this sample is damaged beyond recovery, it can't support life on it's own.\n*---------*"
/obj/item/seeds/sample/alienweed
name = "alien weed sample"
icon_state = "alienweed"
sample_color = null
+210
View File
@@ -0,0 +1,210 @@
/proc/seedify(obj/item/O, t_max, obj/machinery/seed_extractor/extractor, mob/living/user)
var/t_amount = 0
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/weapon/reagent_containers/food/snacks/grown/))
var/obj/item/weapon/reagent_containers/food/snacks/grown/F = O
if(F.seed)
if(user && !user.drop_item()) //couldn't drop the item
return
while(t_amount < t_max)
var/obj/item/seeds/t_prod = F.seed.Copy()
t_prod.loc = seedloc
t_amount++
qdel(O)
return 1
else if(istype(O, /obj/item/weapon/grown))
var/obj/item/weapon/grown/F = O
if(F.seed)
if(user && !user.drop_item())
return
while(t_amount < t_max)
var/obj/item/seeds/t_prod = F.seed.Copy()
t_prod.loc = 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 = 1
anchored = 1
var/piles = list()
var/max_seeds = 1000
var/seed_multiplier = 1
/obj/machinery/seed_extractor/New()
..()
var/obj/item/weapon/circuitboard/machine/B = new /obj/item/weapon/circuitboard/machine/seed_extractor(null)
B.apply_default_parts(src)
/obj/item/weapon/circuitboard/machine/seed_extractor
name = "circuit board (Seed Extractor)"
build_path = /obj/machinery/seed_extractor
origin_tech = "programming=1"
req_components = list(
/obj/item/weapon/stock_parts/matter_bin = 1,
/obj/item/weapon/stock_parts/manipulator = 1)
/obj/machinery/seed_extractor/RefreshParts()
for(var/obj/item/weapon/stock_parts/matter_bin/B in component_parts)
max_seeds = 1000 * B.rating
for(var/obj/item/weapon/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(exchange_parts(user, 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/weapon/storage/bag/plants))
var/obj/item/weapon/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)
user << "<span class='notice'>You put the seeds from \the [O.name] into [src].</span>"
else
user << "<span class='notice'>There are no seeds in \the [O.name].</span>"
return
else if(seedify(O,-1, src, user))
user << "<span class='notice'>You extract some seeds.</span>"
return
else if (istype(O,/obj/item/seeds))
if(add_seed(O))
user << "<span class='notice'>You add [O] to [src.name].</span>"
updateUsrDialog()
return
else if(user.a_intent != "harm")
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/attack_hand(mob/user)
user.set_machine(src)
interact(user)
/obj/machinery/seed_extractor/interact(mob/user)
if (stat)
return 0
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.loc = src.loc
break
src.updateUsrDialog()
return
/obj/machinery/seed_extractor/proc/add_seed(obj/item/seeds/O)
if(contents.len >= 999)
usr << "<span class='notice'>\The [src] is full.</span>"
return 0
if(istype(O.loc,/mob))
var/mob/M = O.loc
if(!M.drop_item())
return 0
else if(istype(O.loc,/obj/item/weapon/storage))
var/obj/item/weapon/storage/S = O.loc
S.remove_from_storage(O,src)
O.loc = src
. = 1
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)
return
+272
View File
@@ -0,0 +1,272 @@
// ********************************************************
// 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 = 1
burn_state = 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 overriden.
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/oneharvest = 0 // If a plant is cleared from the tray after harvesting, e.g. a carrot.
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/plant_type = PLANT_NORMAL // 0 = PLANT_NORMAL; 1 = PLANT_WEED; 2 = PLANT_MUSHROOM; 3 = PLANT_ALIEN
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/innate_yieldmod = 1 //modifier for yield, seperate to the one in Hydro trays, as that one is SPECIFICALLY for nutriment/chems (which means it's constantly reset)
//This is added onto the yield mod of the hydro tray, yield *= (parent.yieldmod+innate_yieldmod)
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/New(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 && plant_type != PLANT_MUSHROOM && 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)
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.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)
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))
/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+innate_yieldmod)
return return_yield
/obj/item/seeds/proc/harvest(mob/user = usr)
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/weapon/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)
feedback_add_details("food_harvested","[product_name]|[getYield()]")
parent.update_tray()
return result
/obj/item/seeds/proc/prepare_result(var/obj/item/weapon/reagent_containers/food/snacks/grown/T)
if(T.reagents)
for(var/reagent_id in reagents_add)
if(reagent_id == "blood") // Hack to make blood in plants always O-
T.reagents.add_reagent(reagent_id, 1 + round(potency * reagents_add[reagent_id], 1), list("blood_type"="O-"))
continue
T.reagents.add_reagent(reagent_id, 1 + round(potency * reagents_add[reagent_id]), 1)
return 1
/// 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 && plant_type == PLANT_MUSHROOM)
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, 2, 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/get_analyzer_text() //in case seeds have something special to tell to the analyzer
var/text = ""
switch(plant_type)
if(PLANT_NORMAL)
text += "- Plant type: Normal plant\n"
if(PLANT_WEED)
text += "- Plant type: Weed. Can grow in nutrient-poor soil.\n"
if(PLANT_MUSHROOM)
text += "- Plant type: Mushroom. Can grow in dry soil.\n"
else
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"
if(rarity)
text += "- Species Discovery Value: [rarity]\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/device/plant_analyzer))
user << "<span class='info'>*---------*\n This is \a <span class='name'>[src]</span>.</span>"
var/text = get_analyzer_text()
if(text)
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
world << "[seed.name] ([seed.type]) lacks the [seed.icon_grow][i] icon!"
if(!(seed.icon_dead in states))
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))
world << "[seed.name] ([seed.type]) lacks the [seed.icon_harvest] icon!"