@@ -0,0 +1,15 @@
|
||||
|
||||
/obj/item/clothing/head/beekeeper_head
|
||||
name = "beekeeper hat"
|
||||
desc = "Keeps the lil buzzing buggers out of your eyes."
|
||||
icon_state = "beekeeper"
|
||||
item_state = "beekeeper"
|
||||
clothing_flags = THICKMATERIAL | SNUG_FIT
|
||||
|
||||
|
||||
/obj/item/clothing/suit/beekeeper_suit
|
||||
name = "beekeeper suit"
|
||||
desc = "Keeps the lil buzzing buggers away from your squishy bits."
|
||||
icon_state = "beekeeper"
|
||||
item_state = "beekeeper"
|
||||
clothing_flags = THICKMATERIAL
|
||||
@@ -0,0 +1,327 @@
|
||||
/obj/machinery/biogenerator
|
||||
name = "biogenerator"
|
||||
desc = "Converts plants into biomass, which can be used to construct useful items."
|
||||
icon = 'icons/obj/machines/biogenerator.dmi'
|
||||
icon_state = "biogen-empty"
|
||||
density = TRUE
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 40
|
||||
circuit = /obj/item/circuitboard/machine/biogenerator
|
||||
var/processing = FALSE
|
||||
var/obj/item/reagent_containers/glass/beaker = null
|
||||
var/points = 0
|
||||
var/menustat = "menu"
|
||||
var/efficiency = 0
|
||||
var/productivity = 0
|
||||
var/max_items = 40
|
||||
var/datum/techweb/stored_research
|
||||
var/list/show_categories = list("Food", "Botany Chemicals", "Organic Materials")
|
||||
var/list/timesFiveCategories = list("Food", "Botany Chemicals")
|
||||
|
||||
/obj/machinery/biogenerator/Initialize()
|
||||
. = ..()
|
||||
stored_research = new /datum/techweb/specialized/autounlocking/biogenerator
|
||||
create_reagents(1000)
|
||||
|
||||
/obj/machinery/biogenerator/Destroy()
|
||||
QDEL_NULL(beaker)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/biogenerator/contents_explosion(severity, target)
|
||||
..()
|
||||
if(beaker)
|
||||
beaker.ex_act(severity, target)
|
||||
|
||||
/obj/machinery/biogenerator/handle_atom_del(atom/A)
|
||||
..()
|
||||
if(A == beaker)
|
||||
beaker = null
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/biogenerator/RefreshParts()
|
||||
var/E = 0
|
||||
var/P = 0
|
||||
var/max_storage = 40
|
||||
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
|
||||
P += B.rating
|
||||
max_storage = 40 * B.rating
|
||||
for(var/obj/item/stock_parts/manipulator/M in component_parts)
|
||||
E += M.rating
|
||||
efficiency = E
|
||||
productivity = P
|
||||
max_items = max_storage
|
||||
|
||||
/obj/machinery/biogenerator/on_reagent_change(changetype) //When the reagents change, change the icon as well.
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/biogenerator/update_icon()
|
||||
if(panel_open)
|
||||
icon_state = "biogen-empty-o"
|
||||
else if(!src.beaker)
|
||||
icon_state = "biogen-empty"
|
||||
else if(!src.processing)
|
||||
icon_state = "biogen-stand"
|
||||
else
|
||||
icon_state = "biogen-work"
|
||||
return
|
||||
|
||||
/obj/machinery/biogenerator/attackby(obj/item/O, mob/user, params)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
|
||||
if(processing)
|
||||
to_chat(user, "<span class='warning'>The biogenerator is currently processing.</span>")
|
||||
return
|
||||
|
||||
if(default_deconstruction_screwdriver(user, "biogen-empty-o", "biogen-empty", O))
|
||||
if(beaker)
|
||||
var/obj/item/reagent_containers/glass/B = beaker
|
||||
B.forceMove(drop_location())
|
||||
beaker = null
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(default_deconstruction_crowbar(O))
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/reagent_containers/glass))
|
||||
. = 1 //no afterattack
|
||||
if(!panel_open)
|
||||
if(beaker)
|
||||
to_chat(user, "<span class='warning'>A container is already loaded into the machine.</span>")
|
||||
else
|
||||
if(!user.transferItemToLoc(O, src))
|
||||
return
|
||||
beaker = O
|
||||
to_chat(user, "<span class='notice'>You add the container to the machine.</span>")
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Close the maintenance panel first.</span>")
|
||||
return
|
||||
|
||||
else if(istype(O, /obj/item/storage/bag/plants))
|
||||
var/obj/item/storage/bag/plants/PB = O
|
||||
var/i = 0
|
||||
for(var/obj/item/reagent_containers/food/snacks/grown/G in contents)
|
||||
i++
|
||||
if(i >= max_items)
|
||||
to_chat(user, "<span class='warning'>The biogenerator is already full! Activate it.</span>")
|
||||
else
|
||||
for(var/obj/item/reagent_containers/food/snacks/grown/G in PB.contents)
|
||||
if(i >= max_items)
|
||||
break
|
||||
if(SEND_SIGNAL(PB, COMSIG_TRY_STORAGE_TAKE, G, src))
|
||||
i++
|
||||
if(i<max_items)
|
||||
to_chat(user, "<span class='info'>You empty the plant bag into the biogenerator.</span>")
|
||||
else if(PB.contents.len == 0)
|
||||
to_chat(user, "<span class='info'>You empty the plant bag into the biogenerator, filling it to its capacity.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='info'>You fill the biogenerator to its capacity.</span>")
|
||||
return TRUE //no afterattack
|
||||
|
||||
else if(istype(O, /obj/item/reagent_containers/food/snacks/grown))
|
||||
var/i = 0
|
||||
for(var/obj/item/reagent_containers/food/snacks/grown/G in contents)
|
||||
i++
|
||||
if(i >= max_items)
|
||||
to_chat(user, "<span class='warning'>The biogenerator is full! Activate it.</span>")
|
||||
else
|
||||
if(user.transferItemToLoc(O, src))
|
||||
to_chat(user, "<span class='info'>You put [O.name] in [src.name]</span>")
|
||||
return TRUE //no afterattack
|
||||
else if (istype(O, /obj/item/disk/design_disk))
|
||||
user.visible_message("[user] begins to load \the [O] in \the [src]...",
|
||||
"You begin to load a design from \the [O]...",
|
||||
"You hear the chatter of a floppy drive.")
|
||||
processing = TRUE
|
||||
var/obj/item/disk/design_disk/D = O
|
||||
if(do_after(user, 10, target = src))
|
||||
for(var/B in D.blueprints)
|
||||
if(B)
|
||||
stored_research.add_design(B)
|
||||
processing = FALSE
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You cannot put this in [src.name]!</span>")
|
||||
|
||||
/obj/machinery/biogenerator/ui_interact(mob/user)
|
||||
if(stat & BROKEN || panel_open)
|
||||
return
|
||||
. = ..()
|
||||
var/dat
|
||||
if(processing)
|
||||
dat += "<div class='statusDisplay'>Biogenerator is processing! Please wait...</div><BR>"
|
||||
else
|
||||
switch(menustat)
|
||||
if("nopoints")
|
||||
dat += "<div class='statusDisplay'>You do not have enough biomass to create products.<BR>Please, put growns into reactor and activate it.</div>"
|
||||
menustat = "menu"
|
||||
if("complete")
|
||||
dat += "<div class='statusDisplay'>Operation complete.</div>"
|
||||
menustat = "menu"
|
||||
if("void")
|
||||
dat += "<div class='statusDisplay'>Error: No growns inside.<BR>Please, put growns into reactor.</div>"
|
||||
menustat = "menu"
|
||||
if("nobeakerspace")
|
||||
dat += "<div class='statusDisplay'>Not enough space left in container. Unable to create product.</div>"
|
||||
menustat = "menu"
|
||||
if(beaker)
|
||||
var/categories = show_categories.Copy()
|
||||
for(var/V in categories)
|
||||
categories[V] = list()
|
||||
for(var/V in stored_research.researched_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(V)
|
||||
for(var/C in categories)
|
||||
if(C in D.category)
|
||||
categories[C] += D
|
||||
|
||||
dat += "<div class='statusDisplay'>Biomass: [points] units.</div><BR>"
|
||||
dat += "<A href='?src=[REF(src)];activate=1'>Activate</A><A href='?src=[REF(src)];detach=1'>Detach Container</A>"
|
||||
for(var/cat in categories)
|
||||
dat += "<h3>[cat]:</h3>"
|
||||
dat += "<div class='statusDisplay'>"
|
||||
for(var/V in categories[cat])
|
||||
var/datum/design/D = V
|
||||
dat += "[D.name]: <A href='?src=[REF(src)];create=[D.id];amount=1'>Make</A>"
|
||||
if(cat in timesFiveCategories)
|
||||
dat += "<A href='?src=[REF(src)];create=[D.id];amount=5'>x5</A>"
|
||||
if(ispath(D.build_path, /obj/item/stack))
|
||||
dat += "<A href='?src=[REF(src)];create=[D.id];amount=10'>x10</A>"
|
||||
dat += "([D.materials[MAT_BIOMASS]/efficiency])<br>"
|
||||
dat += "</div>"
|
||||
else
|
||||
dat += "<div class='statusDisplay'>No container inside, please insert container.</div>"
|
||||
|
||||
var/datum/browser/popup = new(user, "biogen", name, 350, 520)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/biogenerator/proc/activate()
|
||||
if (usr.stat != CONSCIOUS)
|
||||
return
|
||||
if (src.stat != NONE) //NOPOWER etc
|
||||
return
|
||||
if(processing)
|
||||
to_chat(usr, "<span class='warning'>The biogenerator is in the process of working.</span>")
|
||||
return
|
||||
var/S = 0
|
||||
for(var/obj/item/reagent_containers/food/snacks/grown/I in contents)
|
||||
S += 5
|
||||
if(I.reagents.get_reagent_amount("nutriment") < 0.1)
|
||||
points += 1*productivity
|
||||
else points += I.reagents.get_reagent_amount("nutriment")*10*productivity
|
||||
qdel(I)
|
||||
if(S)
|
||||
processing = TRUE
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
|
||||
use_power(S*30)
|
||||
sleep(S+15/productivity)
|
||||
processing = FALSE
|
||||
update_icon()
|
||||
else
|
||||
menustat = "void"
|
||||
|
||||
/obj/machinery/biogenerator/proc/check_cost(list/materials, multiplier = 1, remove_points = 1)
|
||||
if(materials.len != 1 || materials[1] != MAT_BIOMASS)
|
||||
return FALSE
|
||||
if (materials[MAT_BIOMASS]*multiplier/efficiency > points)
|
||||
menustat = "nopoints"
|
||||
return FALSE
|
||||
else
|
||||
if(remove_points)
|
||||
points -= materials[MAT_BIOMASS]*multiplier/efficiency
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/biogenerator/proc/check_container_volume(list/reagents, multiplier = 1)
|
||||
var/sum_reagents = 0
|
||||
for(var/R in reagents)
|
||||
sum_reagents += reagents[R]
|
||||
sum_reagents *= multiplier
|
||||
|
||||
if(beaker.reagents.total_volume + sum_reagents > beaker.reagents.maximum_volume)
|
||||
menustat = "nobeakerspace"
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/biogenerator/proc/create_product(datum/design/D, amount)
|
||||
if(!beaker || !loc)
|
||||
return FALSE
|
||||
|
||||
if(ispath(D.build_path, /obj/item/stack))
|
||||
if(!check_container_volume(D.make_reagents, amount))
|
||||
return FALSE
|
||||
if(!check_cost(D.materials, amount))
|
||||
return FALSE
|
||||
|
||||
new D.build_path(drop_location(), amount)
|
||||
for(var/R in D.make_reagents)
|
||||
beaker.reagents.add_reagent(R, D.make_reagents[R]*amount)
|
||||
else
|
||||
var/i = amount
|
||||
while(i > 0)
|
||||
if(!check_container_volume(D.make_reagents))
|
||||
return .
|
||||
if(!check_cost(D.materials))
|
||||
return .
|
||||
if(D.build_path)
|
||||
new D.build_path(loc)
|
||||
for(var/R in D.make_reagents)
|
||||
beaker.reagents.add_reagent(R, D.make_reagents[R])
|
||||
. = 1
|
||||
--i
|
||||
|
||||
menustat = "complete"
|
||||
update_icon()
|
||||
return .
|
||||
|
||||
/obj/machinery/biogenerator/proc/detach()
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
beaker = null
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/biogenerator/Topic(href, href_list)
|
||||
if(..() || panel_open)
|
||||
return
|
||||
|
||||
usr.set_machine(src)
|
||||
|
||||
if(href_list["activate"])
|
||||
activate()
|
||||
updateUsrDialog()
|
||||
|
||||
else if(href_list["detach"])
|
||||
detach()
|
||||
updateUsrDialog()
|
||||
|
||||
else if(href_list["create"])
|
||||
var/amount = (text2num(href_list["amount"]))
|
||||
//Can't be outside these (if you change this keep a sane limit)
|
||||
amount = CLAMP(amount, 1, 50)
|
||||
var/id = href_list["create"]
|
||||
if(!stored_research.researched_designs.Find(id))
|
||||
//naughty naughty
|
||||
stack_trace("ID did not map to a researched datum [id]")
|
||||
return
|
||||
|
||||
//Get design by id (or may return error design)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(id)
|
||||
//Valid design datum, amount and the datum is not the error design, lets proceed
|
||||
if(D && amount && !istype(D, /datum/design/error_design))
|
||||
create_product(D, amount)
|
||||
//This shouldnt happen normally but href forgery is real
|
||||
else
|
||||
stack_trace("ID could not be turned into a valid techweb design datum [id]")
|
||||
updateUsrDialog()
|
||||
|
||||
else if(href_list["menu"])
|
||||
menustat = "menu"
|
||||
updateUsrDialog()
|
||||
@@ -0,0 +1,71 @@
|
||||
/obj/structure/fermenting_barrel
|
||||
name = "wooden barrel"
|
||||
desc = "A large wooden barrel. You can ferment fruits and such inside it, or just use it to hold liquid."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "barrel"
|
||||
density = TRUE
|
||||
anchored = FALSE
|
||||
pressure_resistance = 2 * ONE_ATMOSPHERE
|
||||
max_integrity = 300
|
||||
var/open = FALSE
|
||||
var/speed_multiplier = 1 //How fast it distills. Defaults to 100% (1.0). Lower is better.
|
||||
|
||||
/obj/structure/fermenting_barrel/Initialize()
|
||||
create_reagents(300, DRAINABLE | AMOUNT_VISIBLE) //Bluespace beakers, but without the portability or efficiency in circuits.
|
||||
. = ..()
|
||||
|
||||
/obj/structure/fermenting_barrel/examine(mob/user)
|
||||
. = ..()
|
||||
to_chat(user, "<span class='notice'>It is currently [open?"open, letting you pour liquids in.":"closed, letting you draw liquids from the tap."]</span>")
|
||||
|
||||
/obj/structure/fermenting_barrel/proc/makeWine(obj/item/reagent_containers/food/snacks/grown/fruit)
|
||||
if(fruit.reagents)
|
||||
fruit.reagents.trans_to(src, fruit.reagents.total_volume)
|
||||
var/amount = fruit.seed.potency / 4
|
||||
if(fruit.distill_reagent)
|
||||
reagents.add_reagent(fruit.distill_reagent, amount)
|
||||
else
|
||||
var/data = list()
|
||||
data["names"] = list("[initial(fruit.name)]" = 1)
|
||||
data["color"] = fruit.filling_color
|
||||
data["boozepwr"] = fruit.wine_power
|
||||
if(fruit.wine_flavor)
|
||||
data["tastes"] = list(fruit.wine_flavor = 1)
|
||||
else
|
||||
data["tastes"] = list(fruit.tastes[1] = 1)
|
||||
reagents.add_reagent("fruit_wine", amount, data)
|
||||
qdel(fruit)
|
||||
playsound(src, 'sound/effects/bubbles.ogg', 50, TRUE)
|
||||
|
||||
/obj/structure/fermenting_barrel/attackby(obj/item/I, mob/user, params)
|
||||
var/obj/item/reagent_containers/food/snacks/grown/fruit = I
|
||||
if(istype(fruit))
|
||||
if(!fruit.can_distill)
|
||||
to_chat(user, "<span class='warning'>You can't distill this into anything...</span>")
|
||||
return TRUE
|
||||
else if(!user.transferItemToLoc(I,src))
|
||||
to_chat(user, "<span class='warning'>[I] is stuck to your hand!</span>")
|
||||
return TRUE
|
||||
to_chat(user, "<span class='notice'>You place [I] into [src] to start the fermentation process.</span>")
|
||||
addtimer(CALLBACK(src, .proc/makeWine, fruit), rand(80, 120) * speed_multiplier)
|
||||
return TRUE
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/fermenting_barrel/attack_hand(mob/user)
|
||||
open = !open
|
||||
if(open)
|
||||
DISABLE_BITFIELD(reagents.reagents_holder_flags, DRAINABLE)
|
||||
ENABLE_BITFIELD(reagents.reagents_holder_flags, REFILLABLE)
|
||||
to_chat(user, "<span class='notice'>You open [src], letting you fill it.</span>")
|
||||
else
|
||||
DISABLE_BITFIELD(reagents.reagents_holder_flags, REFILLABLE)
|
||||
ENABLE_BITFIELD(reagents.reagents_holder_flags, DRAINABLE)
|
||||
to_chat(user, "<span class='notice'>You close [src], letting you draw from its tap.</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/structure/fermenting_barrel/update_icon()
|
||||
if(open)
|
||||
icon_state = "barrel_open"
|
||||
else
|
||||
icon_state = "barrel"
|
||||
@@ -0,0 +1,165 @@
|
||||
// Banana
|
||||
/obj/item/seeds/banana
|
||||
name = "pack of banana seeds"
|
||||
desc = "They're seeds that grow into banana trees. When grown, keep away from clown."
|
||||
icon_state = "seed-banana"
|
||||
species = "banana"
|
||||
plantname = "Banana Tree"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/banana
|
||||
lifespan = 50
|
||||
endurance = 30
|
||||
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
|
||||
icon_dead = "banana-dead"
|
||||
genes = list(/datum/plant_gene/trait/slip, /datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/banana/mime, /obj/item/seeds/banana/bluespace, /obj/item/seeds/banana/exotic_banana)
|
||||
reagents_add = list("banana" = 0.1, "potassium" = 0.1, "vitamin" = 0.04, "nutriment" = 0.02)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/banana
|
||||
seed = /obj/item/seeds/banana
|
||||
name = "banana"
|
||||
desc = "It's an excellent prop for a clown."
|
||||
icon_state = "banana"
|
||||
item_state = "banana"
|
||||
trash = /obj/item/grown/bananapeel
|
||||
filling_color = "#FFFF00"
|
||||
bitesize = 5
|
||||
foodtype = FRUIT
|
||||
juice_results = list("banana" = 0)
|
||||
distill_reagent = "bananahonk"
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/banana/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is aiming [src] at [user.p_them()]self! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, 'sound/items/bikehorn.ogg', 50, 1, -1)
|
||||
sleep(25)
|
||||
if(!user)
|
||||
return (OXYLOSS)
|
||||
user.say("BANG!", forced = "banana")
|
||||
sleep(25)
|
||||
if(!user)
|
||||
return (OXYLOSS)
|
||||
user.visible_message("<B>[user]</B> laughs so hard they begin to suffocate!")
|
||||
return (OXYLOSS)
|
||||
|
||||
//Banana Peel
|
||||
/obj/item/grown/bananapeel
|
||||
seed = /obj/item/seeds/banana
|
||||
name = "banana peel"
|
||||
desc = "A peel from a banana."
|
||||
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
|
||||
icon_state = "banana_peel"
|
||||
item_state = "banana_peel"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
|
||||
/obj/item/grown/bananapeel/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is deliberately slipping on [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, 'sound/misc/slip.ogg', 50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
|
||||
// Mimana - invisible sprites are totally a feature!
|
||||
/obj/item/seeds/banana/mime
|
||||
name = "pack of mimana seeds"
|
||||
desc = "They're seeds that grow into mimana trees. When grown, keep away from mime."
|
||||
icon_state = "seed-mimana"
|
||||
species = "mimana"
|
||||
plantname = "Mimana Tree"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/banana/mime
|
||||
growthstages = 4
|
||||
mutatelist = list()
|
||||
reagents_add = list("nothing" = 0.1, "mutetoxin" = 0.1, "nutriment" = 0.02)
|
||||
rarity = 15
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/banana/mime
|
||||
seed = /obj/item/seeds/banana/mime
|
||||
name = "mimana"
|
||||
desc = "It's an excellent prop for a mime."
|
||||
icon_state = "mimana"
|
||||
trash = /obj/item/grown/bananapeel/mimanapeel
|
||||
filling_color = "#FFFFEE"
|
||||
distill_reagent = "silencer"
|
||||
|
||||
/obj/item/grown/bananapeel/mimanapeel
|
||||
seed = /obj/item/seeds/banana/mime
|
||||
name = "mimana peel"
|
||||
desc = "A mimana peel."
|
||||
icon_state = "mimana_peel"
|
||||
item_state = "mimana_peel"
|
||||
|
||||
// Bluespace Banana
|
||||
/obj/item/seeds/banana/bluespace
|
||||
name = "pack of bluespace banana seeds"
|
||||
desc = "They're seeds that grow into bluespace banana trees. When grown, keep away from bluespace clown."
|
||||
icon_state = "seed-banana-blue"
|
||||
species = "bluespacebanana"
|
||||
icon_grow = "banana-grow"
|
||||
plantname = "Bluespace Banana Tree"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/banana/bluespace
|
||||
mutatelist = list()
|
||||
genes = list(/datum/plant_gene/trait/slip, /datum/plant_gene/trait/teleport, /datum/plant_gene/trait/repeated_harvest)
|
||||
reagents_add = list("bluespace" = 0.2, "banana" = 0.1, "vitamin" = 0.04, "nutriment" = 0.02)
|
||||
rarity = 30
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/banana/bluespace
|
||||
seed = /obj/item/seeds/banana/bluespace
|
||||
name = "bluespace banana"
|
||||
icon_state = "banana_blue"
|
||||
item_state = "bluespace_peel"
|
||||
trash = /obj/item/grown/bananapeel/bluespace
|
||||
filling_color = "#0000FF"
|
||||
tastes = list("banana" = 1)
|
||||
wine_power = 60
|
||||
wine_flavor = "slippery hypercubes"
|
||||
|
||||
/obj/item/grown/bananapeel/bluespace
|
||||
seed = /obj/item/seeds/banana/bluespace
|
||||
name = "bluespace banana peel"
|
||||
desc = "A peel from a bluespace banana."
|
||||
icon_state = "banana_peel_blue"
|
||||
|
||||
//Banana Spider.
|
||||
/obj/item/seeds/banana/exotic_banana
|
||||
name = "pack of exotic banana seeds"
|
||||
desc = "They're seeds that grow into banana trees. However, those bananas might be alive."
|
||||
icon_state = "seed_exoticbanana"
|
||||
species = "exoticbanana"
|
||||
icon_grow = "banana-grow"
|
||||
plantname = "Exotic Banana Tree"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/banana/banana_spider_spawnable
|
||||
mutatelist = list()
|
||||
genes = list(/datum/plant_gene/trait/slip)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/banana/banana_spider_spawnable
|
||||
seed = /obj/item/seeds/banana/exotic_banana
|
||||
name = "banana spider"
|
||||
desc = "You do not know what it is, but you can bet the clown would love it."
|
||||
icon_state = "exoticbanana"
|
||||
list_reagents = list("nutriment" = 3, "vitamin" = 2)
|
||||
foodtype = GROSS | MEAT | RAW | FRUIT
|
||||
grind_results = list("blood" = 20, "liquidgibs" = 5)
|
||||
var/awakening = 0
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/banana/banana_spider_spawnable/attack_self(mob/user)
|
||||
if(awakening || isspaceturf(user.loc))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You decide to wake up the banana spider...</span>")
|
||||
awakening = 1
|
||||
|
||||
spawn(30)
|
||||
if(!QDELETED(src))
|
||||
var/mob/living/simple_animal/banana_spider/S = new /mob/living/simple_animal/banana_spider(get_turf(src.loc))
|
||||
S.speed += round(10 / seed.potency)
|
||||
S.visible_message("<span class='notice'>The banana spider chitters as it stretches its legs.</span>")
|
||||
qdel(src)
|
||||
|
||||
// Other
|
||||
/obj/item/grown/bananapeel/specialpeel //used by /obj/item/clothing/shoes/clown_shoes/banana_shoes
|
||||
name = "synthesized banana peel"
|
||||
desc = "A synthetic banana peel."
|
||||
|
||||
/obj/item/grown/bananapeel/specialpeel/Initialize(AM)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/slippery, 40)
|
||||
@@ -0,0 +1,86 @@
|
||||
// Corn
|
||||
/obj/item/seeds/corn
|
||||
name = "pack of corn seeds"
|
||||
desc = "I don't mean to sound corny..."
|
||||
icon_state = "seed-corn"
|
||||
species = "corn"
|
||||
plantname = "Corn Stalks"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/corn
|
||||
maturation = 8
|
||||
potency = 20
|
||||
growthstages = 3
|
||||
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
|
||||
icon_grow = "corn-grow" // Uses one growth icons set for all the subtypes
|
||||
icon_dead = "corn-dead" // Same for the dead icon
|
||||
mutatelist = list(/obj/item/seeds/corn/snapcorn)
|
||||
reagents_add = list("cornoil" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/corn
|
||||
seed = /obj/item/seeds/corn
|
||||
name = "ear of corn"
|
||||
desc = "Needs some butter!"
|
||||
icon_state = "corn"
|
||||
cooked_type = /obj/item/reagent_containers/food/snacks/popcorn
|
||||
filling_color = "#FFFF00"
|
||||
trash = /obj/item/grown/corncob
|
||||
bitesize_mod = 2
|
||||
foodtype = VEGETABLES
|
||||
juice_results = list("corn_starch" = 0)
|
||||
tastes = list("corn" = 1)
|
||||
distill_reagent = "whiskey"
|
||||
|
||||
/obj/item/grown/corncob
|
||||
name = "corn cob"
|
||||
desc = "A reminder of meals gone by."
|
||||
icon_state = "corncob"
|
||||
item_state = "corncob"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
|
||||
/obj/item/grown/corncob/attackby(obj/item/grown/W, mob/user, params)
|
||||
if(W.get_sharpness())
|
||||
to_chat(user, "<span class='notice'>You use [W] to fashion a pipe out of the corn cob!</span>")
|
||||
new /obj/item/clothing/mask/cigarette/pipe/cobpipe (user.loc)
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
// Snapcorn
|
||||
/obj/item/seeds/corn/snapcorn
|
||||
name = "pack of snapcorn seeds"
|
||||
desc = "Oh snap!"
|
||||
icon_state = "seed-snapcorn"
|
||||
species = "snapcorn"
|
||||
plantname = "Snapcorn Stalks"
|
||||
product = /obj/item/grown/snapcorn
|
||||
mutatelist = list()
|
||||
rarity = 10
|
||||
|
||||
/obj/item/grown/snapcorn
|
||||
seed = /obj/item/seeds/corn/snapcorn
|
||||
name = "snap corn"
|
||||
desc = "A cob with snap pops."
|
||||
icon_state = "snapcorn"
|
||||
item_state = "corncob"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
var/snap_pops = 1
|
||||
|
||||
/obj/item/grown/snapcorn/add_juice()
|
||||
..()
|
||||
snap_pops = max(round(seed.potency/8), 1)
|
||||
|
||||
/obj/item/grown/snapcorn/attack_self(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>You pick a snap pop from the cob.</span>")
|
||||
var/obj/item/toy/snappop/S = new /obj/item/toy/snappop(user.loc)
|
||||
if(ishuman(user))
|
||||
user.put_in_hands(S)
|
||||
snap_pops -= 1
|
||||
if(!snap_pops)
|
||||
new /obj/item/grown/corncob(user.loc)
|
||||
qdel(src)
|
||||
@@ -76,4 +76,4 @@
|
||||
throw_range = 3
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
|
||||
cotton_type = /obj/item/stack/sheet/cotton/durathread
|
||||
cotton_name = "raw durathread"
|
||||
cotton_name = "raw durathread"
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
// Watermelon
|
||||
/obj/item/seeds/watermelon
|
||||
name = "pack of watermelon seeds"
|
||||
desc = "These seeds grow into watermelon plants."
|
||||
icon_state = "seed-watermelon"
|
||||
species = "watermelon"
|
||||
plantname = "Watermelon Vines"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/watermelon
|
||||
lifespan = 50
|
||||
endurance = 40
|
||||
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
|
||||
icon_dead = "watermelon-dead"
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/watermelon/holy)
|
||||
reagents_add = list("water" = 0.2, "vitamin" = 0.04, "nutriment" = 0.2)
|
||||
|
||||
/obj/item/seeds/watermelon/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is swallowing [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
user.gib()
|
||||
new product(drop_location())
|
||||
qdel(src)
|
||||
return MANUAL_SUICIDE
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/watermelon
|
||||
seed = /obj/item/seeds/watermelon
|
||||
name = "watermelon"
|
||||
desc = "It's full of watery goodness."
|
||||
icon_state = "watermelon"
|
||||
slice_path = /obj/item/reagent_containers/food/snacks/watermelonslice
|
||||
slices_num = 5
|
||||
dried_type = null
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
filling_color = "#008000"
|
||||
bitesize_mod = 3
|
||||
foodtype = FRUIT
|
||||
juice_results = list("watermelonjuice" = 0)
|
||||
wine_power = 40
|
||||
|
||||
// Holymelon
|
||||
/obj/item/seeds/watermelon/holy
|
||||
name = "pack of holymelon seeds"
|
||||
desc = "These seeds grow into holymelon plants."
|
||||
icon_state = "seed-holymelon"
|
||||
species = "holymelon"
|
||||
plantname = "Holy Melon Vines"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/holymelon
|
||||
mutatelist = list()
|
||||
reagents_add = list("holywater" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
|
||||
rarity = 20
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/holymelon
|
||||
seed = /obj/item/seeds/watermelon/holy
|
||||
name = "holymelon"
|
||||
desc = "The water within this melon has been blessed by some deity that's particularly fond of watermelon."
|
||||
icon_state = "holymelon"
|
||||
filling_color = "#FFD700"
|
||||
dried_type = null
|
||||
wine_power = 70 //Water to wine, baby.
|
||||
wine_flavor = "divinity"
|
||||
|
||||
/*
|
||||
/obj/item/reagent_containers/food/snacks/grown/holymelon/Initialize()
|
||||
. = ..()
|
||||
var/uses = 1
|
||||
if(seed)
|
||||
uses = round(seed.potency / 20)
|
||||
AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, ITEM_SLOT_HANDS, uses, TRUE, CALLBACK(src, .proc/block_magic), CALLBACK(src, .proc/expire)) //deliver us from evil o melon god
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/holymelon/proc/block_magic(mob/user, major)
|
||||
if(major)
|
||||
to_chat(user, "<span class='warning'>[src] hums slightly, and seems to decay a bit.</span>")
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/holymelon/proc/expire(mob/user)
|
||||
to_chat(user, "<span class='warning'>[src] rapidly turns into ash!</span>")
|
||||
qdel(src)
|
||||
new /obj/effect/decal/cleanable/ash(drop_location())
|
||||
*/
|
||||
@@ -0,0 +1,67 @@
|
||||
// Potato
|
||||
/obj/item/seeds/potato
|
||||
name = "pack of potato seeds"
|
||||
desc = "Boil 'em! Mash 'em! Stick 'em in a stew!"
|
||||
icon_state = "seed-potato"
|
||||
species = "potato"
|
||||
plantname = "Potato Plants"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/potato
|
||||
lifespan = 30
|
||||
maturation = 10
|
||||
production = 1
|
||||
yield = 4
|
||||
growthstages = 4
|
||||
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
|
||||
icon_grow = "potato-grow"
|
||||
icon_dead = "potato-dead"
|
||||
genes = list(/datum/plant_gene/trait/battery)
|
||||
mutatelist = list(/obj/item/seeds/potato/sweet)
|
||||
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/potato
|
||||
seed = /obj/item/seeds/potato
|
||||
name = "potato"
|
||||
desc = "Boil 'em! Mash 'em! Stick 'em in a stew!"
|
||||
icon_state = "potato"
|
||||
filling_color = "#E9967A"
|
||||
bitesize = 100
|
||||
foodtype = VEGETABLES
|
||||
juice_results = list("potato" = 0)
|
||||
distill_reagent = "vodka"
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/potato/wedges
|
||||
name = "potato wedges"
|
||||
desc = "Slices of neatly cut potato."
|
||||
icon_state = "potato_wedges"
|
||||
filling_color = "#E9967A"
|
||||
bitesize = 100
|
||||
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/potato/attackby(obj/item/W, mob/user, params)
|
||||
if(W.get_sharpness())
|
||||
to_chat(user, "<span class='notice'>You cut the potato into wedges with [W].</span>")
|
||||
var/obj/item/reagent_containers/food/snacks/grown/potato/wedges/Wedges = new /obj/item/reagent_containers/food/snacks/grown/potato/wedges
|
||||
remove_item_from_storage(user)
|
||||
qdel(src)
|
||||
user.put_in_hands(Wedges)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
// Sweet Potato
|
||||
/obj/item/seeds/potato/sweet
|
||||
name = "pack of sweet potato seeds"
|
||||
desc = "These seeds grow into sweet potato plants."
|
||||
icon_state = "seed-sweetpotato"
|
||||
species = "sweetpotato"
|
||||
plantname = "Sweet Potato Plants"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/potato/sweet
|
||||
mutatelist = list()
|
||||
reagents_add = list("vitamin" = 0.1, "sugar" = 0.1, "nutriment" = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/potato/sweet
|
||||
seed = /obj/item/seeds/potato/sweet
|
||||
name = "sweet potato"
|
||||
desc = "It's sweet."
|
||||
icon_state = "sweetpotato"
|
||||
distill_reagent = "sbiten"
|
||||
@@ -0,0 +1,60 @@
|
||||
// Pumpkin
|
||||
/obj/item/seeds/pumpkin
|
||||
name = "pack of pumpkin seeds"
|
||||
desc = "These seeds grow into pumpkin vines."
|
||||
icon_state = "seed-pumpkin"
|
||||
species = "pumpkin"
|
||||
plantname = "Pumpkin Vines"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/pumpkin
|
||||
lifespan = 50
|
||||
endurance = 40
|
||||
growthstages = 3
|
||||
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
|
||||
icon_grow = "pumpkin-grow"
|
||||
icon_dead = "pumpkin-dead"
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/pumpkin/blumpkin)
|
||||
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.2)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/pumpkin
|
||||
seed = /obj/item/seeds/pumpkin
|
||||
name = "pumpkin"
|
||||
desc = "It's large and scary."
|
||||
icon_state = "pumpkin"
|
||||
filling_color = "#FFA500"
|
||||
bitesize_mod = 2
|
||||
foodtype = FRUIT
|
||||
juice_results = list("pumpkinjuice" = 0)
|
||||
wine_power = 20
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/pumpkin/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(W.get_sharpness())
|
||||
user.show_message("<span class='notice'>You carve a face into [src]!</span>", 1)
|
||||
new /obj/item/clothing/head/hardhat/pumpkinhead(user.loc)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
// Blumpkin
|
||||
/obj/item/seeds/pumpkin/blumpkin
|
||||
name = "pack of blumpkin seeds"
|
||||
desc = "These seeds grow into blumpkin vines."
|
||||
icon_state = "seed-blumpkin"
|
||||
species = "blumpkin"
|
||||
plantname = "Blumpkin Vines"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/blumpkin
|
||||
mutatelist = list()
|
||||
reagents_add = list("ammonia" = 0.2, "chlorine" = 0.1, "nutriment" = 0.2)
|
||||
rarity = 20
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/blumpkin
|
||||
seed = /obj/item/seeds/pumpkin/blumpkin
|
||||
name = "blumpkin"
|
||||
desc = "The pumpkin's toxic sibling."
|
||||
icon_state = "blumpkin"
|
||||
filling_color = "#87CEFA"
|
||||
bitesize_mod = 2
|
||||
foodtype = FRUIT
|
||||
juice_results = list("blumpkinjuice" = 0)
|
||||
wine_power = 50
|
||||
@@ -0,0 +1,110 @@
|
||||
// Carrot
|
||||
/obj/item/seeds/carrot
|
||||
name = "pack of carrot seeds"
|
||||
desc = "These seeds grow into carrots."
|
||||
icon_state = "seed-carrot"
|
||||
species = "carrot"
|
||||
plantname = "Carrots"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/carrot
|
||||
maturation = 10
|
||||
production = 1
|
||||
yield = 5
|
||||
growthstages = 3
|
||||
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
|
||||
mutatelist = list(/obj/item/seeds/carrot/parsnip)
|
||||
reagents_add = list("oculine" = 0.25, "vitamin" = 0.04, "nutriment" = 0.05)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/carrot
|
||||
seed = /obj/item/seeds/carrot
|
||||
name = "carrot"
|
||||
desc = "It's good for the eyes!"
|
||||
icon_state = "carrot"
|
||||
filling_color = "#FFA500"
|
||||
bitesize_mod = 2
|
||||
foodtype = VEGETABLES
|
||||
juice_results = list("carrotjuice" = 0)
|
||||
wine_power = 30
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/carrot/attackby(obj/item/I, mob/user, params)
|
||||
if(I.get_sharpness())
|
||||
to_chat(user, "<span class='notice'>You sharpen the carrot into a shiv with [I].</span>")
|
||||
var/obj/item/kitchen/knife/carrotshiv/Shiv = new /obj/item/kitchen/knife/carrotshiv
|
||||
remove_item_from_storage(user)
|
||||
qdel(src)
|
||||
user.put_in_hands(Shiv)
|
||||
else
|
||||
return ..()
|
||||
|
||||
// Parsnip
|
||||
/obj/item/seeds/carrot/parsnip
|
||||
name = "pack of parsnip seeds"
|
||||
desc = "These seeds grow into parsnips."
|
||||
icon_state = "seed-parsnip"
|
||||
species = "parsnip"
|
||||
plantname = "Parsnip"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/parsnip
|
||||
icon_dead = "carrot-dead"
|
||||
mutatelist = list()
|
||||
reagents_add = list("vitamin" = 0.05, "nutriment" = 0.05)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/parsnip
|
||||
seed = /obj/item/seeds/carrot/parsnip
|
||||
name = "parsnip"
|
||||
desc = "Closely related to carrots."
|
||||
icon_state = "parsnip"
|
||||
bitesize_mod = 2
|
||||
foodtype = VEGETABLES
|
||||
juice_results = list("parsnipjuice" = 0)
|
||||
wine_power = 35
|
||||
|
||||
|
||||
// White-Beet
|
||||
/obj/item/seeds/whitebeet
|
||||
name = "pack of white-beet seeds"
|
||||
desc = "These seeds grow into sugary beet producing plants."
|
||||
icon_state = "seed-whitebeet"
|
||||
species = "whitebeet"
|
||||
plantname = "White-Beet Plants"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/whitebeet
|
||||
lifespan = 60
|
||||
endurance = 50
|
||||
yield = 6
|
||||
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
|
||||
icon_dead = "whitebeet-dead"
|
||||
mutatelist = list(/obj/item/seeds/redbeet)
|
||||
reagents_add = list("vitamin" = 0.04, "sugar" = 0.2, "nutriment" = 0.05)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/whitebeet
|
||||
seed = /obj/item/seeds/whitebeet
|
||||
name = "white-beet"
|
||||
desc = "You can't beat white-beet."
|
||||
icon_state = "whitebeet"
|
||||
filling_color = "#F4A460"
|
||||
bitesize_mod = 2
|
||||
foodtype = VEGETABLES
|
||||
wine_power = 40
|
||||
|
||||
// Red Beet
|
||||
/obj/item/seeds/redbeet
|
||||
name = "pack of redbeet seeds"
|
||||
desc = "These seeds grow into red beet producing plants."
|
||||
icon_state = "seed-redbeet"
|
||||
species = "redbeet"
|
||||
plantname = "Red-Beet Plants"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/redbeet
|
||||
lifespan = 60
|
||||
endurance = 50
|
||||
yield = 6
|
||||
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
|
||||
icon_dead = "whitebeet-dead"
|
||||
genes = list(/datum/plant_gene/trait/maxchem)
|
||||
reagents_add = list("vitamin" = 0.05, "nutriment" = 0.05)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/redbeet
|
||||
seed = /obj/item/seeds/redbeet
|
||||
name = "red beet"
|
||||
desc = "You can't beat red beet."
|
||||
icon_state = "redbeet"
|
||||
bitesize_mod = 2
|
||||
foodtype = VEGETABLES
|
||||
wine_power = 60
|
||||
@@ -0,0 +1,112 @@
|
||||
// Tea
|
||||
/obj/item/seeds/tea
|
||||
name = "pack of tea aspera seeds"
|
||||
desc = "These seeds grow into tea plants."
|
||||
icon_state = "seed-teaaspera"
|
||||
species = "teaaspera"
|
||||
plantname = "Tea Aspera Plant"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/tea
|
||||
lifespan = 20
|
||||
maturation = 5
|
||||
production = 5
|
||||
yield = 5
|
||||
growthstages = 5
|
||||
icon_dead = "tea-dead"
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/tea/astra)
|
||||
reagents_add = list("teapowder" = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/tea
|
||||
seed = /obj/item/seeds/tea
|
||||
name = "Tea Aspera tips"
|
||||
desc = "These aromatic tips of the tea plant can be dried to make tea."
|
||||
icon_state = "tea_aspera_leaves"
|
||||
filling_color = "#008000"
|
||||
grind_results = list("teapowder" = 0)
|
||||
dry_grind = TRUE
|
||||
can_distill = FALSE
|
||||
|
||||
// Tea Astra
|
||||
/obj/item/seeds/tea/astra
|
||||
name = "pack of tea astra seeds"
|
||||
icon_state = "seed-teaastra"
|
||||
species = "teaastra"
|
||||
plantname = "Tea Astra Plant"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/tea/astra
|
||||
mutatelist = list(/obj/item/seeds/tea/catnip)
|
||||
reagents_add = list("synaptizine" = 0.1, "vitamin" = 0.04, "teapowder" = 0.1)
|
||||
rarity = 20
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/tea/astra
|
||||
seed = /obj/item/seeds/tea/astra
|
||||
name = "Tea Astra tips"
|
||||
icon_state = "tea_astra_leaves"
|
||||
filling_color = "#4582B4"
|
||||
grind_results = list("teapowder" = 0, "salglu_solution" = 0)
|
||||
|
||||
// Kitty drugs
|
||||
/obj/item/seeds/tea/catnip
|
||||
name = "pack of catnip seeds"
|
||||
icon_state = "seed-catnip"
|
||||
desc = "Long stocks with flowering tips that has a chemical to make feline attracted to it."
|
||||
species = "catnip"
|
||||
plantname = "Catnip Plant"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/tea/catnip
|
||||
reagents_add = list("catnip" = 0.1, "vitamin" = 0.06, "teapowder" = 0.3)
|
||||
rarity = 50
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/tea/catnip
|
||||
seed = /obj/item/seeds/tea/catnip
|
||||
name = "Catnip buds"
|
||||
icon_state = "catnip"
|
||||
filling_color = "#4582B4"
|
||||
grind_results = list("catnp" = 2, "water" = 1)
|
||||
|
||||
// Coffee
|
||||
/obj/item/seeds/coffee
|
||||
name = "pack of coffee arabica seeds"
|
||||
desc = "These seeds grow into coffee arabica bushes."
|
||||
icon_state = "seed-coffeea"
|
||||
species = "coffeea"
|
||||
plantname = "Coffee Arabica Bush"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/coffee
|
||||
lifespan = 30
|
||||
endurance = 20
|
||||
maturation = 5
|
||||
production = 5
|
||||
yield = 5
|
||||
growthstages = 5
|
||||
icon_dead = "coffee-dead"
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/coffee/robusta)
|
||||
reagents_add = list("vitamin" = 0.04, "coffeepowder" = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/coffee
|
||||
seed = /obj/item/seeds/coffee
|
||||
name = "coffee arabica beans"
|
||||
desc = "Dry them out to make coffee."
|
||||
icon_state = "coffee_arabica"
|
||||
filling_color = "#DC143C"
|
||||
bitesize_mod = 2
|
||||
dry_grind = TRUE
|
||||
grind_results = list("coffeepowder" = 0)
|
||||
distill_reagent = "kahlua"
|
||||
|
||||
// Coffee Robusta
|
||||
/obj/item/seeds/coffee/robusta
|
||||
name = "pack of coffee robusta seeds"
|
||||
desc = "These seeds grow into coffee robusta bushes."
|
||||
icon_state = "seed-coffeer"
|
||||
species = "coffeer"
|
||||
plantname = "Coffee Robusta Bush"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/coffee/robusta
|
||||
mutatelist = list()
|
||||
reagents_add = list("ephedrine" = 0.1, "vitamin" = 0.04, "coffeepowder" = 0.1)
|
||||
rarity = 20
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/coffee/robusta
|
||||
seed = /obj/item/seeds/coffee/robusta
|
||||
name = "coffee robusta beans"
|
||||
desc = "Increases robustness by 37 percent!"
|
||||
icon_state = "coffee_robusta"
|
||||
grind_results = list("coffeepowder" = 0, "morphine" = 0)
|
||||
@@ -0,0 +1,258 @@
|
||||
/obj/item/seeds/tower
|
||||
name = "pack of tower-cap mycelium"
|
||||
desc = "This mycelium grows into tower-cap mushrooms."
|
||||
icon_state = "mycelium-tower"
|
||||
species = "towercap"
|
||||
plantname = "Tower Caps"
|
||||
product = /obj/item/grown/log
|
||||
lifespan = 80
|
||||
endurance = 50
|
||||
maturation = 15
|
||||
production = 1
|
||||
yield = 5
|
||||
potency = 50
|
||||
growthstages = 3
|
||||
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
|
||||
icon_dead = "towercap-dead"
|
||||
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism)
|
||||
mutatelist = list(/obj/item/seeds/tower/steel)
|
||||
|
||||
/obj/item/seeds/tower/steel
|
||||
name = "pack of steel-cap mycelium"
|
||||
desc = "This mycelium grows into steel logs."
|
||||
icon_state = "mycelium-steelcap"
|
||||
species = "steelcap"
|
||||
plantname = "Steel Caps"
|
||||
product = /obj/item/grown/log/steel
|
||||
mutatelist = list()
|
||||
rarity = 20
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/grown/log
|
||||
seed = /obj/item/seeds/tower
|
||||
name = "tower-cap log"
|
||||
desc = "It's better than bad, it's good!"
|
||||
icon_state = "logs"
|
||||
force = 5
|
||||
throwforce = 5
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
throw_speed = 2
|
||||
throw_range = 3
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
|
||||
var/plank_type = /obj/item/stack/sheet/mineral/wood
|
||||
var/plank_name = "wooden planks"
|
||||
var/static/list/accepted = typecacheof(list(/obj/item/reagent_containers/food/snacks/grown/tobacco,
|
||||
/obj/item/reagent_containers/food/snacks/grown/tea,
|
||||
/obj/item/reagent_containers/food/snacks/grown/ambrosia/vulgaris,
|
||||
/obj/item/reagent_containers/food/snacks/grown/ambrosia/deus,
|
||||
/obj/item/reagent_containers/food/snacks/grown/wheat))
|
||||
|
||||
/obj/item/grown/log/attackby(obj/item/W, mob/user, params)
|
||||
if(W.sharpness)
|
||||
user.show_message("<span class='notice'>You make [plank_name] out of \the [src]!</span>", 1)
|
||||
var/seed_modifier = 0
|
||||
if(seed)
|
||||
seed_modifier = round(seed.potency / 25)
|
||||
var/obj/item/stack/plank = new plank_type(user.loc, 1 + seed_modifier)
|
||||
var/old_plank_amount = plank.amount
|
||||
for(var/obj/item/stack/ST in user.loc)
|
||||
if(ST != plank && istype(ST, plank_type) && ST.amount < ST.max_amount)
|
||||
ST.attackby(plank, user) //we try to transfer all old unfinished stacks to the new stack we created.
|
||||
if(plank.amount > old_plank_amount)
|
||||
to_chat(user, "<span class='notice'>You add the newly-formed [plank_name] to the stack. It now contains [plank.amount] [plank_name].</span>")
|
||||
qdel(src)
|
||||
|
||||
if(CheckAccepted(W))
|
||||
var/obj/item/reagent_containers/food/snacks/grown/leaf = W
|
||||
if(leaf.dry)
|
||||
user.show_message("<span class='notice'>You wrap \the [W] around the log, turning it into a torch!</span>")
|
||||
var/obj/item/flashlight/flare/torch/T = new /obj/item/flashlight/flare/torch(user.loc)
|
||||
usr.dropItemToGround(W)
|
||||
usr.put_in_active_hand(T)
|
||||
qdel(leaf)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
to_chat(usr, "<span class ='warning'>You must dry this first!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/grown/log/proc/CheckAccepted(obj/item/I)
|
||||
return is_type_in_typecache(I, accepted)
|
||||
|
||||
/obj/item/grown/log/tree
|
||||
seed = null
|
||||
name = "wood log"
|
||||
desc = "TIMMMMM-BERRRRRRRRRRR!"
|
||||
|
||||
/obj/item/grown/log/steel
|
||||
seed = /obj/item/seeds/tower/steel
|
||||
name = "steel-cap log"
|
||||
desc = "It's made of metal."
|
||||
icon_state = "steellogs"
|
||||
plank_type = /obj/item/stack/rods
|
||||
plank_name = "rods"
|
||||
|
||||
/obj/item/grown/log/steel/CheckAccepted(obj/item/I)
|
||||
return FALSE
|
||||
|
||||
/////////BONFIRES//////////
|
||||
|
||||
/obj/structure/bonfire
|
||||
name = "bonfire"
|
||||
desc = "For grilling, broiling, charring, smoking, heating, roasting, toasting, simmering, searing, melting, and occasionally burning things."
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "bonfire"
|
||||
light_color = LIGHT_COLOR_FIRE
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
buckle_lying = 0
|
||||
var/burning = 0
|
||||
var/burn_icon = "bonfire_on_fire" //for a softer more burning embers icon, use "bonfire_warm"
|
||||
var/grill = FALSE
|
||||
var/fire_stack_strength = 5
|
||||
|
||||
/obj/structure/bonfire/dense
|
||||
density = TRUE
|
||||
|
||||
/obj/structure/bonfire/prelit/Initialize()
|
||||
. = ..()
|
||||
StartBurning()
|
||||
|
||||
/obj/structure/bonfire/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && (mover.pass_flags & PASSTABLE))
|
||||
return TRUE
|
||||
if(mover.throwing)
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/structure/bonfire/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/stack/rods) && !can_buckle && !grill)
|
||||
var/obj/item/stack/rods/R = W
|
||||
var/choice = input(user, "What would you like to construct?", "Bonfire") as null|anything in list("Stake","Grill")
|
||||
switch(choice)
|
||||
if("Stake")
|
||||
R.use(1)
|
||||
can_buckle = TRUE
|
||||
buckle_requires_restraints = TRUE
|
||||
to_chat(user, "<span class='italics'>You add a rod to \the [src].")
|
||||
var/mutable_appearance/rod_underlay = mutable_appearance('icons/obj/hydroponics/equipment.dmi', "bonfire_rod")
|
||||
rod_underlay.pixel_y = 16
|
||||
underlays += rod_underlay
|
||||
if("Grill")
|
||||
R.use(1)
|
||||
grill = TRUE
|
||||
to_chat(user, "<span class='italics'>You add a grill to \the [src].")
|
||||
add_overlay("bonfire_grill")
|
||||
else
|
||||
return ..()
|
||||
if(W.get_temperature())
|
||||
StartBurning()
|
||||
if(grill)
|
||||
if(user.a_intent != INTENT_HARM && !(W.item_flags & ABSTRACT))
|
||||
if(user.temporarilyRemoveItemFromInventory(W))
|
||||
W.forceMove(get_turf(src))
|
||||
var/list/click_params = params2list(params)
|
||||
//Center the icon where the user clicked.
|
||||
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
|
||||
return
|
||||
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
|
||||
W.pixel_x = CLAMP(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
W.pixel_y = CLAMP(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/bonfire/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(burning)
|
||||
to_chat(user, "<span class='warning'>You need to extinguish [src] before removing the logs!</span>")
|
||||
return
|
||||
if(!has_buckled_mobs() && do_after(user, 50, target = src))
|
||||
for(var/I in 1 to 5)
|
||||
var/obj/item/grown/log/L = new /obj/item/grown/log(src.loc)
|
||||
L.pixel_x += rand(1,4)
|
||||
L.pixel_y += rand(1,4)
|
||||
if(can_buckle || grill)
|
||||
new /obj/item/stack/rods(loc, 1)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/structure/bonfire/proc/CheckOxygen()
|
||||
if(isopenturf(loc))
|
||||
var/turf/open/O = loc
|
||||
if(O.air)
|
||||
var/loc_gases = O.air.gases
|
||||
if(loc_gases[/datum/gas/oxygen] > 13)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/bonfire/proc/StartBurning()
|
||||
if(!burning && CheckOxygen())
|
||||
icon_state = burn_icon
|
||||
burning = TRUE
|
||||
set_light(6)
|
||||
Burn()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/bonfire/fire_act(exposed_temperature, exposed_volume)
|
||||
StartBurning()
|
||||
|
||||
/obj/structure/bonfire/Crossed(atom/movable/AM)
|
||||
if(burning & !grill)
|
||||
Burn()
|
||||
|
||||
/obj/structure/bonfire/proc/Burn()
|
||||
var/turf/current_location = get_turf(src)
|
||||
current_location.hotspot_expose(1000,100,1)
|
||||
for(var/A in current_location)
|
||||
if(A == src)
|
||||
continue
|
||||
if(isobj(A))
|
||||
var/obj/O = A
|
||||
O.fire_act(1000, 500)
|
||||
else if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
L.adjust_fire_stacks(fire_stack_strength)
|
||||
L.IgniteMob()
|
||||
|
||||
/obj/structure/bonfire/proc/Cook()
|
||||
var/turf/current_location = get_turf(src)
|
||||
for(var/A in current_location)
|
||||
if(A == src)
|
||||
continue
|
||||
else if(isliving(A)) //It's still a fire, idiot.
|
||||
var/mob/living/L = A
|
||||
L.adjust_fire_stacks(fire_stack_strength)
|
||||
L.IgniteMob()
|
||||
else if(istype(A, /obj/item) && prob(20))
|
||||
var/obj/item/O = A
|
||||
O.microwave_act()
|
||||
|
||||
/obj/structure/bonfire/process()
|
||||
if(!CheckOxygen())
|
||||
extinguish()
|
||||
return
|
||||
if(!grill)
|
||||
Burn()
|
||||
else
|
||||
Cook()
|
||||
|
||||
/obj/structure/bonfire/extinguish()
|
||||
if(burning)
|
||||
icon_state = "bonfire"
|
||||
burning = 0
|
||||
set_light(0)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/bonfire/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
|
||||
if(..())
|
||||
M.pixel_y += 13
|
||||
|
||||
/obj/structure/bonfire/unbuckle_mob(mob/living/buckled_mob, force=FALSE)
|
||||
if(..())
|
||||
buckled_mob.pixel_y -= 13
|
||||
@@ -0,0 +1,62 @@
|
||||
// **********************
|
||||
// Other harvested materials from plants (that are not food)
|
||||
// **********************
|
||||
|
||||
/obj/item/grown // Grown weapons
|
||||
name = "grown_weapon"
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
resistance_flags = FLAMMABLE
|
||||
var/obj/item/seeds/seed = null // type path, gets converted to item on New(). It's safe to assume it's always a seed item.
|
||||
var/tastes = list("indescribable" = 1) //Stops runtimes. Grown are un-eatable anyways so if you do then its a bug
|
||||
|
||||
/obj/item/grown/Initialize(newloc, obj/item/seeds/new_seed)
|
||||
. = ..()
|
||||
create_reagents(50)
|
||||
|
||||
if(new_seed)
|
||||
seed = new_seed.Copy()
|
||||
else if(ispath(seed))
|
||||
// This is for adminspawn or map-placed growns. They get the default stats of their seed type.
|
||||
seed = new seed()
|
||||
seed.adjust_potency(50-seed.potency)
|
||||
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
if(seed)
|
||||
for(var/datum/plant_gene/trait/T in seed.genes)
|
||||
T.on_new(src, newloc)
|
||||
|
||||
if(istype(src, seed.product)) // no adding reagents if it is just a trash item
|
||||
seed.prepare_result(src)
|
||||
transform *= TRANSFORM_USING_VARIABLE(seed.potency, 100) + 0.5
|
||||
add_juice()
|
||||
|
||||
|
||||
/obj/item/grown/attackby(obj/item/O, mob/user, params)
|
||||
..()
|
||||
if (istype(O, /obj/item/plant_analyzer))
|
||||
var/msg = "<span class='info'>*---------*\n This is \a <span class='name'>[src]</span>\n"
|
||||
if(seed)
|
||||
msg += seed.get_analyzer_text()
|
||||
msg += "</span>"
|
||||
to_chat(usr, msg)
|
||||
return
|
||||
|
||||
/obj/item/grown/proc/add_juice()
|
||||
if(reagents)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/grown/throw_impact(atom/hit_atom)
|
||||
if(!..()) //was it caught by a mob?
|
||||
if(seed)
|
||||
for(var/datum/plant_gene/trait/T in seed.genes)
|
||||
T.on_throw_impact(src, hit_atom)
|
||||
|
||||
/obj/item/grown/microwave_act(obj/machinery/microwave/M)
|
||||
return
|
||||
|
||||
/obj/item/grown/on_grind()
|
||||
for(var/i in 1 to grind_results.len)
|
||||
grind_results[grind_results[i]] = round(seed.potency)
|
||||
@@ -0,0 +1,192 @@
|
||||
/proc/seedify(obj/item/O, t_max, obj/machinery/seed_extractor/extractor, mob/living/user)
|
||||
var/t_amount = 0
|
||||
var/list/seeds = list()
|
||||
if(t_max == -1)
|
||||
if(extractor)
|
||||
t_max = rand(1,4) * extractor.seed_multiplier
|
||||
else
|
||||
t_max = rand(1,4)
|
||||
|
||||
var/seedloc = O.loc
|
||||
if(extractor)
|
||||
seedloc = extractor.loc
|
||||
|
||||
if(istype(O, /obj/item/reagent_containers/food/snacks/grown/))
|
||||
var/obj/item/reagent_containers/food/snacks/grown/F = O
|
||||
if(F.seed)
|
||||
if(user && !user.temporarilyRemoveItemFromInventory(O)) //couldn't drop the item
|
||||
return
|
||||
while(t_amount < t_max)
|
||||
var/obj/item/seeds/t_prod = F.seed.Copy()
|
||||
seeds.Add(t_prod)
|
||||
t_prod.forceMove(seedloc)
|
||||
t_amount++
|
||||
qdel(O)
|
||||
return seeds
|
||||
|
||||
else if(istype(O, /obj/item/grown))
|
||||
var/obj/item/grown/F = O
|
||||
if(F.seed)
|
||||
if(user && !user.temporarilyRemoveItemFromInventory(O))
|
||||
return
|
||||
while(t_amount < t_max)
|
||||
var/obj/item/seeds/t_prod = F.seed.Copy()
|
||||
t_prod.forceMove(seedloc)
|
||||
t_amount++
|
||||
qdel(O)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
/obj/machinery/seed_extractor
|
||||
name = "seed extractor"
|
||||
desc = "Extracts and bags seeds from produce."
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "sextractor"
|
||||
density = TRUE
|
||||
circuit = /obj/item/circuitboard/machine/seed_extractor
|
||||
var/piles = list()
|
||||
var/max_seeds = 1000
|
||||
var/seed_multiplier = 1
|
||||
|
||||
/obj/machinery/seed_extractor/RefreshParts()
|
||||
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
|
||||
max_seeds = 1000 * B.rating
|
||||
for(var/obj/item/stock_parts/manipulator/M in component_parts)
|
||||
seed_multiplier = M.rating
|
||||
|
||||
/obj/machinery/seed_extractor/attackby(obj/item/O, mob/user, params)
|
||||
|
||||
if(default_deconstruction_screwdriver(user, "sextractor_open", "sextractor", O))
|
||||
return
|
||||
|
||||
if(default_pry_open(O))
|
||||
return
|
||||
|
||||
if(default_unfasten_wrench(user, O))
|
||||
return
|
||||
|
||||
if(default_deconstruction_crowbar(O))
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/storage/bag/plants))
|
||||
var/obj/item/storage/P = O
|
||||
var/loaded = 0
|
||||
for(var/obj/item/seeds/G in P.contents)
|
||||
if(contents.len >= max_seeds)
|
||||
break
|
||||
++loaded
|
||||
add_seed(G)
|
||||
if (loaded)
|
||||
to_chat(user, "<span class='notice'>You put as many seeds from \the [O.name] into [src] as you can.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There are no seeds in \the [O.name].</span>")
|
||||
return
|
||||
|
||||
else if(seedify(O,-1, src, user))
|
||||
to_chat(user, "<span class='notice'>You extract some seeds.</span>")
|
||||
return
|
||||
else if (istype(O, /obj/item/seeds))
|
||||
if(add_seed(O))
|
||||
to_chat(user, "<span class='notice'>You add [O] to [src.name].</span>")
|
||||
updateUsrDialog()
|
||||
return
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
to_chat(user, "<span class='warning'>You can't extract any seeds from \the [O.name]!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/datum/seed_pile
|
||||
var/name = ""
|
||||
var/lifespan = 0 //Saved stats
|
||||
var/endurance = 0
|
||||
var/maturation = 0
|
||||
var/production = 0
|
||||
var/yield = 0
|
||||
var/potency = 0
|
||||
var/amount = 0
|
||||
|
||||
/datum/seed_pile/New(var/name, var/life, var/endur, var/matur, var/prod, var/yie, var/poten, var/am = 1)
|
||||
src.name = name
|
||||
src.lifespan = life
|
||||
src.endurance = endur
|
||||
src.maturation = matur
|
||||
src.production = prod
|
||||
src.yield = yie
|
||||
src.potency = poten
|
||||
src.amount = am
|
||||
|
||||
/obj/machinery/seed_extractor/ui_interact(mob/user)
|
||||
. = ..()
|
||||
if (stat)
|
||||
return FALSE
|
||||
|
||||
var/dat = "<b>Stored seeds:</b><br>"
|
||||
|
||||
if (contents.len == 0)
|
||||
dat += "<font color='red'>No seeds</font>"
|
||||
else
|
||||
dat += "<table cellpadding='3' style='text-align:center;'><tr><td>Name</td><td>Lifespan</td><td>Endurance</td><td>Maturation</td><td>Production</td><td>Yield</td><td>Potency</td><td>Stock</td></tr>"
|
||||
for (var/datum/seed_pile/O in piles)
|
||||
dat += "<tr><td>[O.name]</td><td>[O.lifespan]</td><td>[O.endurance]</td><td>[O.maturation]</td>"
|
||||
dat += "<td>[O.production]</td><td>[O.yield]</td><td>[O.potency]</td><td>"
|
||||
dat += "<a href='byond://?src=[REF(src)];name=[O.name];li=[O.lifespan];en=[O.endurance];ma=[O.maturation];pr=[O.production];yi=[O.yield];pot=[O.potency]'>Vend</a> ([O.amount] left)</td></tr>"
|
||||
dat += "</table>"
|
||||
var/datum/browser/popup = new(user, "seed_ext", name, 700, 400)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
return
|
||||
|
||||
/obj/machinery/seed_extractor/Topic(var/href, var/list/href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
|
||||
href_list["li"] = text2num(href_list["li"])
|
||||
href_list["en"] = text2num(href_list["en"])
|
||||
href_list["ma"] = text2num(href_list["ma"])
|
||||
href_list["pr"] = text2num(href_list["pr"])
|
||||
href_list["yi"] = text2num(href_list["yi"])
|
||||
href_list["pot"] = text2num(href_list["pot"])
|
||||
|
||||
for (var/datum/seed_pile/N in piles)//Find the pile we need to reduce...
|
||||
if (href_list["name"] == N.name && href_list["li"] == N.lifespan && href_list["en"] == N.endurance && href_list["ma"] == N.maturation && href_list["pr"] == N.production && href_list["yi"] == N.yield && href_list["pot"] == N.potency)
|
||||
if(N.amount <= 0)
|
||||
return
|
||||
N.amount = max(N.amount - 1, 0)
|
||||
if (N.amount <= 0)
|
||||
piles -= N
|
||||
qdel(N)
|
||||
break
|
||||
|
||||
for (var/obj/T in contents)//Now we find the seed we need to vend
|
||||
var/obj/item/seeds/O = T
|
||||
if (O.plantname == href_list["name"] && O.lifespan == href_list["li"] && O.endurance == href_list["en"] && O.maturation == href_list["ma"] && O.production == href_list["pr"] && O.yield == href_list["yi"] && O.potency == href_list["pot"])
|
||||
O.forceMove(drop_location())
|
||||
break
|
||||
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/seed_extractor/proc/add_seed(obj/item/seeds/O)
|
||||
if(contents.len >= 999)
|
||||
to_chat(usr, "<span class='notice'>\The [src] is full.</span>")
|
||||
return FALSE
|
||||
|
||||
var/datum/component/storage/STR = O.loc.GetComponent(/datum/component/storage)
|
||||
if(STR)
|
||||
if(!STR.remove_from_storage(O,src))
|
||||
return FALSE
|
||||
else if(ismob(O.loc))
|
||||
var/mob/M = O.loc
|
||||
if(!M.transferItemToLoc(O, src))
|
||||
return FALSE
|
||||
|
||||
. = TRUE
|
||||
for (var/datum/seed_pile/N in piles)
|
||||
if (O.plantname == N.name && O.lifespan == N.lifespan && O.endurance == N.endurance && O.maturation == N.maturation && O.production == N.production && O.yield == N.yield && O.potency == N.potency)
|
||||
++N.amount
|
||||
return
|
||||
|
||||
piles += new /datum/seed_pile(O.plantname, O.lifespan, O.endurance, O.maturation, O.production, O.yield, O.potency)
|
||||
Reference in New Issue
Block a user