Merge remote-tracking branch 'citadel/master' into mobility_flags
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
var/datum/reagent/R = null
|
||||
if(random_reagent)
|
||||
R = pick(subtypesof(/datum/reagent))
|
||||
R = GLOB.chemical_reagents_list[initial(R.id)]
|
||||
R = GLOB.chemical_reagents_list[R]
|
||||
|
||||
queen_bee = new(src)
|
||||
queen_bee.beehome = src
|
||||
@@ -95,7 +95,7 @@
|
||||
bee_resources = max(bee_resources-BEE_RESOURCE_HONEYCOMB_COST, 0)
|
||||
var/obj/item/reagent_containers/honeycomb/HC = new(src)
|
||||
if(queen_bee.beegent)
|
||||
HC.set_reagent(queen_bee.beegent.id)
|
||||
HC.set_reagent(queen_bee.beegent.type)
|
||||
honeycombs += HC
|
||||
|
||||
if(bees.len < get_max_bees())
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
disease_amount = 0
|
||||
volume = 10
|
||||
amount_per_transfer_from_this = 0
|
||||
list_reagents = list("honey" = 5)
|
||||
list_reagents = list(/datum/reagent/consumable/honey = 5)
|
||||
grind_results = list()
|
||||
var/honey_color = ""
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
|
||||
/obj/item/reagent_containers/honeycomb/proc/set_reagent(reagent)
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[reagent]
|
||||
if(istype(R))
|
||||
if(R)
|
||||
name = "honeycomb ([R.name])"
|
||||
honey_color = R.color
|
||||
reagents.add_reagent(R.id,5)
|
||||
reagents.add_reagent(reagent,5)
|
||||
else
|
||||
honey_color = ""
|
||||
update_icon()
|
||||
@@ -1,327 +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()
|
||||
/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(/datum/reagent/consumable/nutriment) < 0.1)
|
||||
points += 1*productivity
|
||||
else points += I.reagents.get_reagent_amount(/datum/reagent/consumable/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()
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
data["tastes"] = list(fruit.wine_flavor = 1)
|
||||
else
|
||||
data["tastes"] = list(fruit.tastes[1] = 1)
|
||||
reagents.add_reagent("fruit_wine", amount, data)
|
||||
reagents.add_reagent(/datum/reagent/consumable/ethanol/fruit_wine, amount, data)
|
||||
qdel(fruit)
|
||||
playsound(src, 'sound/effects/bubbles.ogg', 50, TRUE)
|
||||
|
||||
|
||||
@@ -234,8 +234,8 @@
|
||||
dat += "<tr><td width='260px'>[G.get_name()]</td><td>"
|
||||
if(can_extract && G.mutability_flags & PLANT_GENE_EXTRACTABLE)
|
||||
dat += "<a href='?src=[REF(src)];gene=[REF(G)];op=extract'>Extract</a>"
|
||||
if(G.mutability_flags & PLANT_GENE_REMOVABLE)
|
||||
dat += "<a href='?src=[REF(src)];gene=[REF(G)];op=remove'>Remove</a>"
|
||||
if(G.mutability_flags & PLANT_GENE_REMOVABLE)
|
||||
dat += "<a href='?src=[REF(src)];gene=[REF(G)];op=remove'>Remove</a>"
|
||||
dat += "</td></tr>"
|
||||
dat += "</table>"
|
||||
else
|
||||
|
||||
+169
-169
@@ -1,169 +1,169 @@
|
||||
// ***********************************************************
|
||||
// Foods that are produced from hydroponics ~~~~~~~~~~
|
||||
// Data from the seeds carry over to these grown foods
|
||||
// ***********************************************************
|
||||
|
||||
// Base type. Subtypes are found in /grown dir.
|
||||
/obj/item/reagent_containers/food/snacks/grown
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
var/obj/item/seeds/seed = null // type path, gets converted to item on New(). It's safe to assume it's always a seed item.
|
||||
var/plantname = ""
|
||||
var/bitesize_mod = 0
|
||||
var/splat_type = /obj/effect/decal/cleanable/plant_smudge
|
||||
// If set, bitesize = 1 + round(reagents.total_volume / bitesize_mod)
|
||||
dried_type = -1
|
||||
// Saves us from having to define each stupid grown's dried_type as itself.
|
||||
// If you don't want a plant to be driable (watermelons) set this to null in the time definition.
|
||||
resistance_flags = FLAMMABLE
|
||||
var/dry_grind = FALSE //If TRUE, this object needs to be dry to be ground up
|
||||
var/can_distill = TRUE //If FALSE, this object cannot be distilled into an alcohol.
|
||||
var/distill_reagent //If NULL and this object can be distilled, it uses a generic fruit_wine reagent and adjusts its variables.
|
||||
var/wine_flavor //If NULL, this is automatically set to the fruit's flavor. Determines the flavor of the wine if distill_reagent is NULL.
|
||||
var/wine_power = 10 //Determines the boozepwr of the wine if distill_reagent is NULL.
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/Initialize(mapload, obj/item/seeds/new_seed)
|
||||
. = ..()
|
||||
if(!tastes)
|
||||
tastes = list("[name]" = 1)
|
||||
|
||||
if(new_seed)
|
||||
seed = new_seed.Copy()
|
||||
else if(ispath(seed))
|
||||
// This is for adminspawn or map-placed growns. They get the default stats of their seed type.
|
||||
seed = new seed()
|
||||
seed.adjust_potency(50-seed.potency)
|
||||
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
if(dried_type == -1)
|
||||
dried_type = src.type
|
||||
|
||||
if(seed)
|
||||
for(var/datum/plant_gene/trait/T in seed.genes)
|
||||
T.on_new(src, loc)
|
||||
seed.prepare_result(src)
|
||||
transform *= TRANSFORM_USING_VARIABLE(seed.potency, 100) + 0.5 //Makes the resulting produce's sprite larger or smaller based on potency!
|
||||
add_juice()
|
||||
|
||||
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/proc/add_juice()
|
||||
if(reagents)
|
||||
if(bitesize_mod)
|
||||
bitesize = 1 + round(reagents.total_volume / bitesize_mod)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/examine(user)
|
||||
. = ..()
|
||||
if(seed)
|
||||
for(var/datum/plant_gene/trait/T in seed.genes)
|
||||
if(T.examine_line)
|
||||
. += T.examine_line
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/attackby(obj/item/O, mob/user, params)
|
||||
..()
|
||||
if (istype(O, /obj/item/plant_analyzer))
|
||||
var/msg = "<span class='info'>*---------*\n This is \a <span class='name'>[src]</span>.\n"
|
||||
if(seed)
|
||||
msg += seed.get_analyzer_text()
|
||||
var/reag_txt = ""
|
||||
if(seed)
|
||||
for(var/reagent_id in seed.reagents_add)
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[reagent_id]
|
||||
var/amt = reagents.get_reagent_amount(reagent_id)
|
||||
reag_txt += "\n<span class='info'>- [R.name]: [amt]</span>"
|
||||
|
||||
if(reag_txt)
|
||||
msg += reag_txt
|
||||
msg += "<br><span class='info'>*---------*</span>"
|
||||
to_chat(user, msg)
|
||||
else
|
||||
if(seed)
|
||||
for(var/datum/plant_gene/trait/T in seed.genes)
|
||||
T.on_attackby(src, O, user)
|
||||
|
||||
|
||||
// Various gene procs
|
||||
/obj/item/reagent_containers/food/snacks/grown/attack_self(mob/user)
|
||||
if(seed && seed.get_gene(/datum/plant_gene/trait/squash))
|
||||
squash(user)
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/throw_impact(atom/hit_atom)
|
||||
if(!..()) //was it caught by a mob?
|
||||
if(seed)
|
||||
for(var/datum/plant_gene/trait/T in seed.genes)
|
||||
T.on_throw_impact(src, hit_atom)
|
||||
if(seed.get_gene(/datum/plant_gene/trait/squash))
|
||||
squash(hit_atom)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/proc/squash(atom/target)
|
||||
var/turf/T = get_turf(target)
|
||||
if(ispath(splat_type, /obj/effect/decal/cleanable/plant_smudge))
|
||||
if(filling_color)
|
||||
var/obj/O = new splat_type(T)
|
||||
O.color = filling_color
|
||||
O.name = "[name] smudge"
|
||||
else if(splat_type)
|
||||
new splat_type(T)
|
||||
|
||||
if(trash)
|
||||
generate_trash(T)
|
||||
|
||||
visible_message("<span class='warning'>[src] has been squashed.</span>","<span class='italics'>You hear a smack.</span>")
|
||||
if(seed)
|
||||
for(var/datum/plant_gene/trait/trait in seed.genes)
|
||||
trait.on_squash(src, target)
|
||||
|
||||
reagents.reaction(T)
|
||||
for(var/A in T)
|
||||
reagents.reaction(A)
|
||||
|
||||
qdel(src)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/On_Consume()
|
||||
if(iscarbon(usr))
|
||||
if(seed)
|
||||
for(var/datum/plant_gene/trait/T in seed.genes)
|
||||
T.on_consume(src, usr)
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/generate_trash(atom/location)
|
||||
if(trash && (ispath(trash, /obj/item/grown) || ispath(trash, /obj/item/reagent_containers/food/snacks/grown)))
|
||||
. = new trash(location, seed)
|
||||
trash = null
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/grind_requirements()
|
||||
if(dry_grind && !dry)
|
||||
to_chat(usr, "<span class='warning'>[src] needs to be dry before it can be ground up!</span>")
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/on_grind()
|
||||
var/nutriment = reagents.get_reagent_amount("nutriment")
|
||||
if(grind_results&&grind_results.len)
|
||||
for(var/i in 1 to grind_results.len)
|
||||
grind_results[grind_results[i]] = nutriment
|
||||
reagents.del_reagent("nutriment")
|
||||
reagents.del_reagent("vitamin")
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/on_juice()
|
||||
var/nutriment = reagents.get_reagent_amount("nutriment")
|
||||
if(juice_results&&juice_results.len)
|
||||
for(var/i in 1 to juice_results.len)
|
||||
juice_results[juice_results[i]] = nutriment
|
||||
reagents.del_reagent("nutriment")
|
||||
reagents.del_reagent("vitamin")
|
||||
|
||||
// For item-containing growns such as eggy or gatfruit
|
||||
/obj/item/reagent_containers/food/snacks/grown/shell/attack_self(mob/user)
|
||||
var/obj/item/T
|
||||
if(trash)
|
||||
T = generate_trash()
|
||||
qdel(src)
|
||||
user.putItemFromInventoryInHandIfPossible(T, user.active_hand_index, TRUE)
|
||||
to_chat(user, "<span class='notice'>You open [src]\'s shell, revealing \a [T].</span>")
|
||||
// ***********************************************************
|
||||
// Foods that are produced from hydroponics ~~~~~~~~~~
|
||||
// Data from the seeds carry over to these grown foods
|
||||
// ***********************************************************
|
||||
|
||||
// Base type. Subtypes are found in /grown dir.
|
||||
/obj/item/reagent_containers/food/snacks/grown
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
var/obj/item/seeds/seed = null // type path, gets converted to item on New(). It's safe to assume it's always a seed item.
|
||||
var/plantname = ""
|
||||
var/bitesize_mod = 0
|
||||
var/splat_type = /obj/effect/decal/cleanable/plant_smudge
|
||||
// If set, bitesize = 1 + round(reagents.total_volume / bitesize_mod)
|
||||
dried_type = -1
|
||||
// Saves us from having to define each stupid grown's dried_type as itself.
|
||||
// If you don't want a plant to be driable (watermelons) set this to null in the time definition.
|
||||
resistance_flags = FLAMMABLE
|
||||
var/dry_grind = FALSE //If TRUE, this object needs to be dry to be ground up
|
||||
var/can_distill = TRUE //If FALSE, this object cannot be distilled into an alcohol.
|
||||
var/distill_reagent //If NULL and this object can be distilled, it uses a generic fruit_wine reagent and adjusts its variables.
|
||||
var/wine_flavor //If NULL, this is automatically set to the fruit's flavor. Determines the flavor of the wine if distill_reagent is NULL.
|
||||
var/wine_power = 10 //Determines the boozepwr of the wine if distill_reagent is NULL.
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/Initialize(mapload, obj/item/seeds/new_seed)
|
||||
. = ..()
|
||||
if(!tastes)
|
||||
tastes = list("[name]" = 1)
|
||||
|
||||
if(new_seed)
|
||||
seed = new_seed.Copy()
|
||||
else if(ispath(seed))
|
||||
// This is for adminspawn or map-placed growns. They get the default stats of their seed type.
|
||||
seed = new seed()
|
||||
seed.adjust_potency(50-seed.potency)
|
||||
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
if(dried_type == -1)
|
||||
dried_type = src.type
|
||||
|
||||
if(seed)
|
||||
for(var/datum/plant_gene/trait/T in seed.genes)
|
||||
T.on_new(src, loc)
|
||||
seed.prepare_result(src)
|
||||
transform *= TRANSFORM_USING_VARIABLE(seed.potency, 100) + 0.5 //Makes the resulting produce's sprite larger or smaller based on potency!
|
||||
add_juice()
|
||||
|
||||
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/proc/add_juice()
|
||||
if(reagents)
|
||||
if(bitesize_mod)
|
||||
bitesize = 1 + round(reagents.total_volume / bitesize_mod)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/examine(user)
|
||||
. = ..()
|
||||
if(seed)
|
||||
for(var/datum/plant_gene/trait/T in seed.genes)
|
||||
if(T.examine_line)
|
||||
. += T.examine_line
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/attackby(obj/item/O, mob/user, params)
|
||||
..()
|
||||
if (istype(O, /obj/item/plant_analyzer))
|
||||
var/msg = "<span class='info'>*---------*\n This is \a <span class='name'>[src]</span>.\n"
|
||||
if(seed)
|
||||
msg += seed.get_analyzer_text()
|
||||
var/reag_txt = ""
|
||||
if(seed)
|
||||
for(var/reagent_id in seed.reagents_add)
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[reagent_id]
|
||||
var/amt = reagents.get_reagent_amount(reagent_id)
|
||||
reag_txt += "\n<span class='info'>- [R.name]: [amt]</span>"
|
||||
|
||||
if(reag_txt)
|
||||
msg += reag_txt
|
||||
msg += "<br><span class='info'>*---------*</span>"
|
||||
to_chat(user, msg)
|
||||
else
|
||||
if(seed)
|
||||
for(var/datum/plant_gene/trait/T in seed.genes)
|
||||
T.on_attackby(src, O, user)
|
||||
|
||||
|
||||
// Various gene procs
|
||||
/obj/item/reagent_containers/food/snacks/grown/attack_self(mob/user)
|
||||
if(seed && seed.get_gene(/datum/plant_gene/trait/squash))
|
||||
squash(user)
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/throw_impact(atom/hit_atom)
|
||||
if(!..()) //was it caught by a mob?
|
||||
if(seed)
|
||||
for(var/datum/plant_gene/trait/T in seed.genes)
|
||||
T.on_throw_impact(src, hit_atom)
|
||||
if(seed.get_gene(/datum/plant_gene/trait/squash))
|
||||
squash(hit_atom)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/proc/squash(atom/target)
|
||||
var/turf/T = get_turf(target)
|
||||
if(ispath(splat_type, /obj/effect/decal/cleanable/plant_smudge))
|
||||
if(filling_color)
|
||||
var/obj/O = new splat_type(T)
|
||||
O.color = filling_color
|
||||
O.name = "[name] smudge"
|
||||
else if(splat_type)
|
||||
new splat_type(T)
|
||||
|
||||
if(trash)
|
||||
generate_trash(T)
|
||||
|
||||
visible_message("<span class='warning'>[src] has been squashed.</span>","<span class='italics'>You hear a smack.</span>")
|
||||
if(seed)
|
||||
for(var/datum/plant_gene/trait/trait in seed.genes)
|
||||
trait.on_squash(src, target)
|
||||
|
||||
reagents.reaction(T)
|
||||
for(var/A in T)
|
||||
reagents.reaction(A)
|
||||
|
||||
qdel(src)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/On_Consume()
|
||||
if(iscarbon(usr))
|
||||
if(seed)
|
||||
for(var/datum/plant_gene/trait/T in seed.genes)
|
||||
T.on_consume(src, usr)
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/generate_trash(atom/location)
|
||||
if(trash && (ispath(trash, /obj/item/grown) || ispath(trash, /obj/item/reagent_containers/food/snacks/grown)))
|
||||
. = new trash(location, seed)
|
||||
trash = null
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/grind_requirements()
|
||||
if(dry_grind && !dry)
|
||||
to_chat(usr, "<span class='warning'>[src] needs to be dry before it can be ground up!</span>")
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/on_grind()
|
||||
var/nutriment = reagents.get_reagent_amount(/datum/reagent/consumable/nutriment)
|
||||
if(grind_results&&grind_results.len)
|
||||
for(var/i in 1 to grind_results.len)
|
||||
grind_results[grind_results[i]] = nutriment
|
||||
reagents.del_reagent(/datum/reagent/consumable/nutriment)
|
||||
reagents.del_reagent(/datum/reagent/consumable/nutriment/vitamin)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/on_juice()
|
||||
var/nutriment = reagents.get_reagent_amount(/datum/reagent/consumable/nutriment)
|
||||
if(juice_results&&juice_results.len)
|
||||
for(var/i in 1 to juice_results.len)
|
||||
juice_results[juice_results[i]] = nutriment
|
||||
reagents.del_reagent(/datum/reagent/consumable/nutriment)
|
||||
reagents.del_reagent(/datum/reagent/consumable/nutriment/vitamin)
|
||||
|
||||
// For item-containing growns such as eggy or gatfruit
|
||||
/obj/item/reagent_containers/food/snacks/grown/shell/attack_self(mob/user)
|
||||
var/obj/item/T
|
||||
if(trash)
|
||||
T = generate_trash()
|
||||
qdel(src)
|
||||
user.putItemFromInventoryInHandIfPossible(T, user.active_hand_index, TRUE)
|
||||
to_chat(user, "<span class='notice'>You open [src]\'s shell, revealing \a [T].</span>")
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
icon_dead = "ambrosia-dead"
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/ambrosia/deus)
|
||||
reagents_add = list("space_drugs" = 0.15, "bicaridine" = 0.1, "kelotane" = 0.1, "vitamin" = 0.04, "nutriment" = 0.05, "toxin" = 0.1)
|
||||
reagents_add = list(/datum/reagent/drug/space_drugs = 0.15, /datum/reagent/medicine/bicaridine = 0.1, /datum/reagent/medicine/kelotane = 0.1, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.05, /datum/reagent/toxin = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/ambrosia/vulgaris
|
||||
seed = /obj/item/seeds/ambrosia
|
||||
@@ -42,7 +42,7 @@
|
||||
plantname = "Ambrosia Deus"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/ambrosia/deus
|
||||
mutatelist = list(/obj/item/seeds/ambrosia/gaia)
|
||||
reagents_add = list("omnizine" = 0.15, "synaptizine" = 0.15, "space_drugs" = 0.1, "vitamin" = 0.04, "nutriment" = 0.05)
|
||||
reagents_add = list(/datum/reagent/medicine/omnizine = 0.15, /datum/reagent/medicine/synaptizine = 0.15, /datum/reagent/drug/space_drugs = 0.1, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.05)
|
||||
rarity = 40
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/ambrosia/deus
|
||||
@@ -62,7 +62,7 @@
|
||||
plantname = "Ambrosia Gaia"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/ambrosia/gaia
|
||||
mutatelist = list(/obj/item/seeds/ambrosia/deus)
|
||||
reagents_add = list("earthsblood" = 0.05, "nutriment" = 0.06, "vitamin" = 0.05)
|
||||
reagents_add = list(/datum/reagent/medicine/earthsblood = 0.05, /datum/reagent/consumable/nutriment = 0.06, /datum/reagent/consumable/nutriment/vitamin = 0.05)
|
||||
rarity = 30 //These are some pretty good plants right here
|
||||
genes = list()
|
||||
weed_rate = 4
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
icon_dead = "apple-dead"
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/apple/gold)
|
||||
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/apple
|
||||
seed = /obj/item/seeds/apple
|
||||
@@ -24,9 +24,9 @@
|
||||
filling_color = "#FF4500"
|
||||
bitesize = 100 // Always eat the apple in one bite
|
||||
foodtype = FRUIT
|
||||
juice_results = list("applejuice" = 0)
|
||||
juice_results = list(/datum/reagent/consumable/applejuice = 0)
|
||||
tastes = list("apple" = 1)
|
||||
distill_reagent = "hcider"
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/hcider
|
||||
|
||||
// Gold Apple
|
||||
/obj/item/seeds/apple/gold
|
||||
@@ -39,7 +39,7 @@
|
||||
maturation = 10
|
||||
production = 10
|
||||
mutatelist = list()
|
||||
reagents_add = list("gold" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/gold = 0.2, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1)
|
||||
rarity = 40 // Alchemy!
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/apple/gold
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
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)
|
||||
reagents_add = list(/datum/reagent/consumable/banana = 0.1, /datum/reagent/potassium = 0.1, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.02)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/banana
|
||||
seed = /obj/item/seeds/banana
|
||||
@@ -24,8 +24,8 @@
|
||||
filling_color = "#FFFF00"
|
||||
bitesize = 5
|
||||
foodtype = FRUIT
|
||||
juice_results = list("banana" = 0)
|
||||
distill_reagent = "bananahonk"
|
||||
juice_results = list(/datum/reagent/consumable/banana = 0)
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/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>")
|
||||
@@ -70,7 +70,7 @@
|
||||
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)
|
||||
reagents_add = list(/datum/reagent/consumable/nothing = 0.1, /datum/reagent/toxin/mutetoxin = 0.1, /datum/reagent/consumable/nutriment = 0.02)
|
||||
rarity = 15
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/banana/mime
|
||||
@@ -80,7 +80,7 @@
|
||||
icon_state = "mimana"
|
||||
trash = /obj/item/grown/bananapeel/mimanapeel
|
||||
filling_color = "#FFFFEE"
|
||||
distill_reagent = "silencer"
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/silencer
|
||||
|
||||
/obj/item/grown/bananapeel/mimanapeel
|
||||
seed = /obj/item/seeds/banana/mime
|
||||
@@ -100,7 +100,7 @@
|
||||
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)
|
||||
reagents_add = list(/datum/reagent/bluespace = 0.2, /datum/reagent/consumable/banana = 0.1, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.02)
|
||||
rarity = 30
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/banana/bluespace
|
||||
@@ -137,9 +137,9 @@
|
||||
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)
|
||||
list_reagents = list(/datum/reagent/consumable/nutriment = 3, /datum/reagent/consumable/nutriment/vitamin = 2)
|
||||
foodtype = GROSS | MEAT | RAW | FRUIT
|
||||
grind_results = list("blood" = 20, "liquidgibs" = 5)
|
||||
grind_results = list(/datum/reagent/blood = 20, /datum/reagent/liquidgibs = 5)
|
||||
var/awakening = 0
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/banana/banana_spider_spawnable/attack_self(mob/user)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
icon_dead = "soybean-dead"
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/soya/koi)
|
||||
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.05, "cooking_oil" = 0.03) //Vegetable oil!
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.05, /datum/reagent/consumable/cooking_oil = 0.03) //Vegetable oil!
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/soybeans
|
||||
seed = /obj/item/seeds/soya
|
||||
@@ -26,7 +26,7 @@
|
||||
filling_color = "#F0E68C"
|
||||
bitesize_mod = 2
|
||||
foodtype = VEGETABLES
|
||||
grind_results = list("soymilk" = 0)
|
||||
grind_results = list(/datum/reagent/consumable/soymilk = 0)
|
||||
tastes = list("soy" = 1)
|
||||
wine_power = 20
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/koibeans
|
||||
potency = 10
|
||||
mutatelist = list()
|
||||
reagents_add = list("carpotoxin" = 0.1, "vitamin" = 0.04, "nutriment" = 0.05)
|
||||
reagents_add = list(/datum/reagent/toxin/carpotoxin = 0.1, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.05)
|
||||
rarity = 20
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/koibeans
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
icon_dead = "berry-dead" // Same for the dead icon
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/berry/glow, /obj/item/seeds/berry/poison)
|
||||
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/berries
|
||||
seed = /obj/item/seeds/berry
|
||||
@@ -26,9 +26,9 @@
|
||||
filling_color = "#FF00FF"
|
||||
bitesize_mod = 2
|
||||
foodtype = FRUIT
|
||||
juice_results = list("berryjuice" = 0)
|
||||
juice_results = list(/datum/reagent/consumable/berryjuice = 0)
|
||||
tastes = list("berry" = 1)
|
||||
distill_reagent = "gin"
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/gin
|
||||
|
||||
// Poison Berries
|
||||
/obj/item/seeds/berry/poison
|
||||
@@ -39,7 +39,7 @@
|
||||
plantname = "Poison-Berry Bush"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/berries/poison
|
||||
mutatelist = list(/obj/item/seeds/berry/death)
|
||||
reagents_add = list("cyanide" = 0.15, "tirizene" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/toxin/cyanide = 0.15, /datum/reagent/toxin/staminatoxin = 0.2, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1)
|
||||
rarity = 10 // Mildly poisonous berries are common in reality
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/berries/poison
|
||||
@@ -49,7 +49,7 @@
|
||||
icon_state = "poisonberrypile"
|
||||
filling_color = "#C71585"
|
||||
foodtype = FRUIT | TOXIC
|
||||
juice_results = list("poisonberryjuice" = 0)
|
||||
juice_results = list(/datum/reagent/consumable/poisonberryjuice = 0)
|
||||
tastes = list("poison-berry" = 1)
|
||||
distill_reagent = null
|
||||
wine_power = 35
|
||||
@@ -65,7 +65,7 @@
|
||||
lifespan = 30
|
||||
potency = 50
|
||||
mutatelist = list()
|
||||
reagents_add = list("coniine" = 0.08, "tirizene" = 0.1, "vitamin" = 0.04, "nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/toxin/coniine = 0.08, /datum/reagent/toxin/staminatoxin = 0.1, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1)
|
||||
rarity = 30
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/berries/death
|
||||
@@ -91,7 +91,7 @@
|
||||
endurance = 25
|
||||
mutatelist = list()
|
||||
genes = list(/datum/plant_gene/trait/glow/white, /datum/plant_gene/trait/noreact, /datum/plant_gene/trait/repeated_harvest)
|
||||
reagents_add = list("uranium" = 0.25, "iodine" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/uranium = 0.25, /datum/reagent/iodine = 0.2, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1)
|
||||
rarity = 20
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/berries/glow
|
||||
@@ -124,7 +124,7 @@
|
||||
icon_harvest = "cherry-harvest"
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/cherry/blue, /obj/item/seeds/cherry/bulb)
|
||||
reagents_add = list("nutriment" = 0.07, "sugar" = 0.07)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment = 0.07, /datum/reagent/consumable/sugar = 0.07)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/cherries
|
||||
seed = /obj/item/seeds/cherry
|
||||
@@ -135,7 +135,7 @@
|
||||
filling_color = "#FF0000"
|
||||
bitesize_mod = 2
|
||||
foodtype = FRUIT
|
||||
grind_results = list("cherryjelly" = 0)
|
||||
grind_results = list(/datum/reagent/consumable/cherryjelly = 0)
|
||||
tastes = list("cherry" = 1)
|
||||
wine_power = 30
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
plantname = "Blue Cherry Tree"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/bluecherries
|
||||
mutatelist = list()
|
||||
reagents_add = list("nutriment" = 0.07, "sugar" = 0.07)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment = 0.07, /datum/reagent/consumable/sugar = 0.07)
|
||||
rarity = 10
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/bluecherries
|
||||
@@ -159,7 +159,7 @@
|
||||
filling_color = "#6495ED"
|
||||
bitesize_mod = 2
|
||||
foodtype = FRUIT
|
||||
grind_results = list("bluecherryjelly" = 0)
|
||||
grind_results = list(/datum/reagent/consumable/bluecherryjelly = 0)
|
||||
tastes = list("blue cherry" = 1)
|
||||
wine_power = 50
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/cherrybulbs
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest, /datum/plant_gene/trait/glow/pink)
|
||||
mutatelist = list()
|
||||
reagents_add = list("nutriment" = 0.07, "sugar" = 0.07)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment = 0.07, /datum/reagent/consumable/sugar = 0.07)
|
||||
rarity = 10
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/cherrybulbs
|
||||
@@ -184,7 +184,7 @@
|
||||
filling_color = "#FF0000"
|
||||
bitesize_mod = 2
|
||||
foodtype = FRUIT
|
||||
grind_results = list("cherryjelly" = 0)
|
||||
grind_results = list(/datum/reagent/consumable/cherryjelly = 0)
|
||||
tastes = list("cherry" = 1)
|
||||
wine_power = 50
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
icon_dead = "grape-dead"
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/grape/green)
|
||||
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1, "sugar" = 0.1)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1, /datum/reagent/consumable/sugar = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/grapes
|
||||
seed = /obj/item/seeds/grape
|
||||
@@ -218,9 +218,9 @@
|
||||
filling_color = "#FF1493"
|
||||
bitesize_mod = 2
|
||||
foodtype = FRUIT
|
||||
juice_results = list("grapejuice" = 0)
|
||||
juice_results = list(/datum/reagent/consumable/grapejuice = 0)
|
||||
tastes = list("grape" = 1)
|
||||
distill_reagent = "wine"
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/wine
|
||||
|
||||
// Green Grapes
|
||||
/obj/item/seeds/grape/green
|
||||
@@ -230,7 +230,7 @@
|
||||
species = "greengrape"
|
||||
plantname = "Green-Grape Vine"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/grapes/green
|
||||
reagents_add = list("kelotane" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1, "sugar" = 0.1)
|
||||
reagents_add = list(/datum/reagent/medicine/kelotane = 0.2, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1, /datum/reagent/consumable/sugar = 0.1)
|
||||
// No rarity: technically it's a beneficial mutant, but it's not exactly "new"...
|
||||
mutatelist = list()
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
icon_state = "greengrapes"
|
||||
filling_color = "#7FFF00"
|
||||
tastes = list("green grape" = 1)
|
||||
distill_reagent = "cognac"
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/cognac
|
||||
|
||||
// Strawberry
|
||||
/obj/item/seeds/strawberry
|
||||
@@ -254,7 +254,7 @@
|
||||
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
|
||||
icon_grow = "strawberry-grow"
|
||||
icon_dead = "berry-dead"
|
||||
reagents_add = list("vitamin" = 0.07, "nutriment" = 0.1, "sugar" = 0.2)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.07, /datum/reagent/consumable/nutriment = 0.1, /datum/reagent/consumable/sugar = 0.2)
|
||||
mutatelist = list()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/strawberry
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/obj/item/seeds/cannabis/death,
|
||||
/obj/item/seeds/cannabis/white,
|
||||
/obj/item/seeds/cannabis/ultimate)
|
||||
reagents_add = list("space_drugs" = 0.15, "lipolicide" = 0.35) // gives u the munchies
|
||||
reagents_add = list(/datum/reagent/drug/space_drugs = 0.15, /datum/reagent/toxin/lipolicide = 0.35) // gives u the munchies
|
||||
|
||||
|
||||
/obj/item/seeds/cannabis/rainbow
|
||||
@@ -28,7 +28,7 @@
|
||||
plantname = "Rainbow Weed"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/cannabis/rainbow
|
||||
mutatelist = list()
|
||||
reagents_add = list("mindbreaker" = 0.15, "lipolicide" = 0.35)
|
||||
reagents_add = list(/datum/reagent/toxin/mindbreaker = 0.15, /datum/reagent/toxin/lipolicide = 0.35)
|
||||
rarity = 40
|
||||
|
||||
/obj/item/seeds/cannabis/death
|
||||
@@ -39,7 +39,7 @@
|
||||
plantname = "Deathweed"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/cannabis/death
|
||||
mutatelist = list()
|
||||
reagents_add = list("cyanide" = 0.35, "space_drugs" = 0.15, "lipolicide" = 0.15)
|
||||
reagents_add = list(/datum/reagent/toxin/cyanide = 0.35, /datum/reagent/drug/space_drugs = 0.15, /datum/reagent/toxin/lipolicide = 0.15)
|
||||
rarity = 40
|
||||
|
||||
/obj/item/seeds/cannabis/white
|
||||
@@ -50,7 +50,7 @@
|
||||
plantname = "Lifeweed"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/cannabis/white
|
||||
mutatelist = list()
|
||||
reagents_add = list("omnizine" = 0.35, "space_drugs" = 0.15, "lipolicide" = 0.15)
|
||||
reagents_add = list(/datum/reagent/medicine/omnizine = 0.35, /datum/reagent/drug/space_drugs = 0.15, /datum/reagent/toxin/lipolicide = 0.15)
|
||||
rarity = 40
|
||||
|
||||
|
||||
@@ -63,21 +63,21 @@
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/cannabis/ultimate
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest, /datum/plant_gene/trait/glow/green)
|
||||
mutatelist = list()
|
||||
reagents_add = list("space_drugs" = 0.3,
|
||||
"mindbreaker" = 0.3,
|
||||
"mercury" = 0.15,
|
||||
"lithium" = 0.15,
|
||||
"atropine" = 0.15,
|
||||
"haloperidol" = 0.15,
|
||||
"methamphetamine" = 0.15,
|
||||
"capsaicin" = 0.15,
|
||||
"barbers_aid" = 0.15,
|
||||
"bath_salts" = 0.15,
|
||||
"itching_powder" = 0.15,
|
||||
"crank" = 0.15,
|
||||
"krokodil" = 0.15,
|
||||
"histamine" = 0.15,
|
||||
"lipolicide" = 0.15)
|
||||
reagents_add = list(/datum/reagent/drug/space_drugs = 0.3,
|
||||
/datum/reagent/toxin/mindbreaker = 0.3,
|
||||
/datum/reagent/mercury = 0.15,
|
||||
/datum/reagent/lithium = 0.15,
|
||||
/datum/reagent/medicine/atropine = 0.15,
|
||||
/datum/reagent/medicine/haloperidol = 0.15,
|
||||
/datum/reagent/drug/methamphetamine = 0.15,
|
||||
/datum/reagent/consumable/capsaicin = 0.15,
|
||||
/datum/reagent/barbers_aid = 0.15,
|
||||
/datum/reagent/drug/bath_salts = 0.15,
|
||||
/datum/reagent/toxin/itching_powder = 0.15,
|
||||
/datum/reagent/drug/crank = 0.15,
|
||||
/datum/reagent/drug/krokodil = 0.15,
|
||||
/datum/reagent/toxin/histamine = 0.15,
|
||||
/datum/reagent/toxin/lipolicide = 0.15)
|
||||
rarity = 69
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
potency = 15
|
||||
icon_dead = "wheat-dead"
|
||||
mutatelist = list(/obj/item/seeds/wheat/oat, /obj/item/seeds/wheat/meat)
|
||||
reagents_add = list("nutriment" = 0.04)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment = 0.04)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/wheat
|
||||
seed = /obj/item/seeds/wheat
|
||||
@@ -22,9 +22,9 @@
|
||||
filling_color = "#F0E68C"
|
||||
bitesize_mod = 2
|
||||
foodtype = GRAIN
|
||||
grind_results = list("flour" = 0)
|
||||
grind_results = list(/datum/reagent/consumable/flour = 0)
|
||||
tastes = list("wheat" = 1)
|
||||
distill_reagent = "beer"
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/beer
|
||||
|
||||
// Oat
|
||||
/obj/item/seeds/wheat/oat
|
||||
@@ -45,9 +45,9 @@
|
||||
filling_color = "#556B2F"
|
||||
bitesize_mod = 2
|
||||
foodtype = GRAIN
|
||||
grind_results = list("flour" = 0)
|
||||
grind_results = list(/datum/reagent/consumable/flour = 0)
|
||||
tastes = list("oat" = 1)
|
||||
distill_reagent = "ale"
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/ale
|
||||
|
||||
// Rice
|
||||
/obj/item/seeds/wheat/rice
|
||||
@@ -69,9 +69,9 @@
|
||||
filling_color = "#FAFAD2"
|
||||
bitesize_mod = 2
|
||||
foodtype = GRAIN
|
||||
grind_results = list("rice" = 0)
|
||||
grind_results = list(/datum/reagent/consumable/rice = 0)
|
||||
tastes = list("rice" = 1)
|
||||
distill_reagent = "sake"
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/sake
|
||||
|
||||
//Meatwheat - grows into synthetic meat
|
||||
/obj/item/seeds/wheat/meat
|
||||
@@ -92,7 +92,7 @@
|
||||
bitesize_mod = 2
|
||||
seed = /obj/item/seeds/wheat/meat
|
||||
foodtype = MEAT | GRAIN
|
||||
grind_results = list("flour" = 0, "blood" = 0)
|
||||
grind_results = list(/datum/reagent/consumable/flour = 0, /datum/reagent/blood = 0)
|
||||
tastes = list("meatwheat" = 1)
|
||||
can_distill = FALSE
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
icon_dead = "chili-dead" // Same for the dead icon
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/chili/ice, /obj/item/seeds/chili/ghost)
|
||||
reagents_add = list("capsaicin" = 0.25, "vitamin" = 0.04, "nutriment" = 0.04)
|
||||
reagents_add = list(/datum/reagent/consumable/capsaicin = 0.25, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.04)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/chili
|
||||
seed = /obj/item/seeds/chili
|
||||
@@ -41,7 +41,7 @@
|
||||
production = 4
|
||||
rarity = 20
|
||||
mutatelist = list()
|
||||
reagents_add = list("frostoil" = 0.25, "vitamin" = 0.02, "nutriment" = 0.02)
|
||||
reagents_add = list(/datum/reagent/consumable/frostoil = 0.25, /datum/reagent/consumable/nutriment/vitamin = 0.02, /datum/reagent/consumable/nutriment = 0.02)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/icepepper
|
||||
seed = /obj/item/seeds/chili/ice
|
||||
@@ -67,7 +67,7 @@
|
||||
yield = 3
|
||||
rarity = 20
|
||||
mutatelist = list()
|
||||
reagents_add = list("condensedcapsaicin" = 0.3, "capsaicin" = 0.55, "nutriment" = 0.04)
|
||||
reagents_add = list(/datum/reagent/consumable/condensedcapsaicin = 0.3, /datum/reagent/consumable/capsaicin = 0.55, /datum/reagent/consumable/nutriment = 0.04)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/ghost_chili
|
||||
seed = /obj/item/seeds/chili/ghost
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/orange)
|
||||
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.05)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.05)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/citrus/lime
|
||||
seed = /obj/item/seeds/lime
|
||||
@@ -31,7 +31,7 @@
|
||||
desc = "It's so sour, your face will twist."
|
||||
icon_state = "lime"
|
||||
filling_color = "#00FF00"
|
||||
juice_results = list("limejuice" = 0)
|
||||
juice_results = list(/datum/reagent/consumable/limejuice = 0)
|
||||
|
||||
// Electric Lime
|
||||
/obj/item/seeds/lime/electric
|
||||
@@ -70,7 +70,7 @@
|
||||
icon_dead = "lime-dead"
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/lime, /obj/item/seeds/orange_3d)
|
||||
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.05)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.05)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/citrus/orange
|
||||
seed = /obj/item/seeds/orange
|
||||
@@ -78,8 +78,8 @@
|
||||
desc = "It's a tangy fruit."
|
||||
icon_state = "orange"
|
||||
filling_color = "#FFA500"
|
||||
juice_results = list("orangejuice" = 0)
|
||||
distill_reagent = "triple_sec"
|
||||
juice_results = list(/datum/reagent/consumable/orangejuice = 0)
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/triple_sec
|
||||
|
||||
|
||||
//3D Orange
|
||||
@@ -98,7 +98,7 @@
|
||||
icon_grow = "lime-grow"
|
||||
icon_dead = "lime-dead"
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.05, "haloperidol" = 0.15)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.05, /datum/reagent/medicine/haloperidol = 0.15)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/citrus/orange_3d
|
||||
seed = /obj/item/seeds/orange_3d
|
||||
@@ -106,8 +106,8 @@
|
||||
desc = "You can hardly wrap your head around this thing."
|
||||
icon_state = "orang"
|
||||
filling_color = "#FFA500"
|
||||
juice_results = list("orangejuice" = 0)
|
||||
distill_reagent = "triple_sec"
|
||||
juice_results = list(/datum/reagent/consumable/orangejuice = 0)
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/triple_sec
|
||||
tastes = list("polygons" = 1, "oranges" = 1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/citrus/orange_3d/pickup(mob/user)
|
||||
@@ -134,7 +134,7 @@
|
||||
icon_dead = "lime-dead"
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/firelemon)
|
||||
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.05)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.05)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/citrus/lemon
|
||||
seed = /obj/item/seeds/lemon
|
||||
@@ -142,7 +142,7 @@
|
||||
desc = "When life gives you lemons, make lemonade."
|
||||
icon_state = "lemon"
|
||||
filling_color = "#FFD700"
|
||||
juice_results = list("lemonjuice" = 0)
|
||||
juice_results = list(/datum/reagent/consumable/lemonjuice = 0)
|
||||
|
||||
// Combustible lemon
|
||||
/obj/item/seeds/firelemon //combustible lemon is too long so firelemon
|
||||
@@ -159,7 +159,7 @@
|
||||
lifespan = 55
|
||||
endurance = 45
|
||||
yield = 4
|
||||
reagents_add = list("nutriment" = 0.05)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment = 0.05)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/firelemon
|
||||
seed = /obj/item/seeds/firelemon
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
icon_dead = "cocoapod-dead"
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/cocoapod/vanillapod, /obj/item/seeds/cocoapod/bungotree)
|
||||
reagents_add = list("cocoa" = 0.25, "nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/consumable/coco = 0.25, /datum/reagent/consumable/nutriment = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/cocoapod
|
||||
seed = /obj/item/seeds/cocoapod
|
||||
@@ -27,7 +27,7 @@
|
||||
bitesize_mod = 2
|
||||
foodtype = FRUIT
|
||||
tastes = list("cocoa" = 1)
|
||||
distill_reagent = "creme_de_cacao"
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/creme_de_cacao
|
||||
|
||||
// Vanilla Pod
|
||||
/obj/item/seeds/cocoapod/vanillapod
|
||||
@@ -39,7 +39,7 @@
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/vanillapod
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list()
|
||||
reagents_add = list("vanilla" = 0.25, "nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/consumable/vanilla = 0.25, /datum/reagent/consumable/nutriment = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/vanillapod
|
||||
seed = /obj/item/seeds/cocoapod/vanillapod
|
||||
@@ -49,7 +49,7 @@
|
||||
filling_color = "#FFD700"
|
||||
foodtype = FRUIT
|
||||
tastes = list("vanilla" = 1)
|
||||
distill_reagent = "vanilla" //Takes longer, but you can get even more vanilla from it.
|
||||
distill_reagent = /datum/reagent/consumable/vanilla //Takes longer, but you can get even more vanilla from it.
|
||||
|
||||
/obj/item/seeds/cocoapod/bungotree
|
||||
name = "pack of bungo tree seeds"
|
||||
@@ -64,7 +64,7 @@
|
||||
production = 7
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list()
|
||||
reagents_add = list("enzyme" = 0.1, "nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/consumable/enzyme = 0.1, /datum/reagent/consumable/nutriment = 0.1)
|
||||
growthstages = 4
|
||||
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
|
||||
icon_grow = "bungotree-grow"
|
||||
@@ -79,6 +79,7 @@
|
||||
trash = /obj/item/reagent_containers/food/snacks/grown/bungopit
|
||||
filling_color = "#E8C22F"
|
||||
foodtype = FRUIT
|
||||
juice_results = list(/datum/reagent/consumable/bungojuice = 0)
|
||||
tastes = list("bungo" = 2, "tropical fruitiness" = 1)
|
||||
distill_reagent = null
|
||||
|
||||
@@ -97,7 +98,7 @@
|
||||
/obj/item/reagent_containers/food/snacks/grown/bungopit/Initialize()
|
||||
. =..()
|
||||
reagents.clear_reagents()
|
||||
reagents.add_reagent("bungotoxin", seed.potency * 0.10) //More than this will kill at too low potency
|
||||
reagents.add_reagent("nutriment", seed.potency * 0.04)
|
||||
reagents.add_reagent(/datum/reagent/toxin/bungotoxin, seed.potency * 0.10) //More than this will kill at too low potency
|
||||
reagents.add_reagent(/datum/reagent/consumable/nutriment, seed.potency * 0.04)
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
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)
|
||||
reagents_add = list(/datum/reagent/consumable/cornoil = 0.2, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/corn
|
||||
seed = /obj/item/seeds/corn
|
||||
@@ -25,9 +25,9 @@
|
||||
trash = /obj/item/grown/corncob
|
||||
bitesize_mod = 2
|
||||
foodtype = VEGETABLES
|
||||
juice_results = list("corn_starch" = 0)
|
||||
juice_results = list(/datum/reagent/consumable/corn_starch = 0)
|
||||
tastes = list("corn" = 1)
|
||||
distill_reagent = "whiskey"
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/whiskey
|
||||
|
||||
/obj/item/grown/corncob
|
||||
name = "corn cob"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
icon_dead = "eggplant-dead"
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/eggplant/eggy)
|
||||
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/eggplant
|
||||
seed = /obj/item/seeds/eggplant
|
||||
@@ -36,7 +36,7 @@
|
||||
lifespan = 75
|
||||
production = 12
|
||||
mutatelist = list()
|
||||
reagents_add = list("nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/shell/eggy
|
||||
seed = /obj/item/seeds/eggplant/eggy
|
||||
@@ -47,4 +47,4 @@
|
||||
filling_color = "#F8F8FF"
|
||||
bitesize_mod = 2
|
||||
foodtype = MEAT
|
||||
distill_reagent = "eggnog"
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/eggnog
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
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)
|
||||
reagents_add = list(/datum/reagent/medicine/bicaridine = 0.2, /datum/reagent/consumable/nutriment = 0.05)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/poppy
|
||||
seed = /obj/item/seeds/poppy
|
||||
@@ -27,7 +27,7 @@
|
||||
bitesize_mod = 3
|
||||
tastes = list("sesame seeds" = 1)
|
||||
foodtype = VEGETABLES | GROSS
|
||||
distill_reagent = "vermouth"
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/vermouth
|
||||
|
||||
// Lily
|
||||
/obj/item/seeds/poppy/lily
|
||||
@@ -68,7 +68,7 @@
|
||||
icon_dead = "spacemanstrumpet-dead"
|
||||
mutatelist = list()
|
||||
genes = list(/datum/plant_gene/reagent/polypyr)
|
||||
reagents_add = list("nutriment" = 0.05)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment = 0.05)
|
||||
rarity = 30
|
||||
|
||||
/obj/item/seeds/poppy/lily/trumpet/Initialize()
|
||||
@@ -119,7 +119,7 @@
|
||||
growthstages = 4
|
||||
genes = list(/datum/plant_gene/trait/plant_type/weed_hardy)
|
||||
growing_icon = 'icons/obj/hydroponics/growing_flowers.dmi'
|
||||
reagents_add = list("nutriment" = 0.04)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment = 0.04)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/harebell
|
||||
seed = /obj/item/seeds/harebell
|
||||
@@ -130,7 +130,7 @@
|
||||
slot_flags = ITEM_SLOT_HEAD
|
||||
filling_color = "#E6E6FA"
|
||||
bitesize_mod = 3
|
||||
distill_reagent = "vermouth"
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/vermouth
|
||||
|
||||
// Sunflower
|
||||
/obj/item/seeds/sunflower
|
||||
@@ -148,7 +148,7 @@
|
||||
icon_grow = "sunflower-grow"
|
||||
icon_dead = "sunflower-dead"
|
||||
mutatelist = list(/obj/item/seeds/sunflower/moonflower, /obj/item/seeds/sunflower/novaflower)
|
||||
reagents_add = list("cooking_oil" = 0.08, "nutriment" = 0.04)
|
||||
reagents_add = list(/datum/reagent/consumable/cooking_oil = 0.08, /datum/reagent/consumable/nutriment = 0.04)
|
||||
|
||||
/obj/item/grown/sunflower // FLOWER POWER!
|
||||
seed = /obj/item/seeds/sunflower
|
||||
@@ -184,7 +184,7 @@
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/moonflower
|
||||
genes = list(/datum/plant_gene/trait/glow/purple)
|
||||
mutatelist = list()
|
||||
reagents_add = list("moonshine" = 0.2, "vitamin" = 0.02, "nutriment" = 0.02)
|
||||
reagents_add = list(/datum/reagent/consumable/ethanol/moonshine = 0.2, /datum/reagent/consumable/nutriment/vitamin = 0.02, /datum/reagent/consumable/nutriment = 0.02)
|
||||
rarity = 15
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/moonflower
|
||||
@@ -195,7 +195,7 @@
|
||||
slot_flags = ITEM_SLOT_HEAD
|
||||
filling_color = "#E6E6FA"
|
||||
bitesize_mod = 2
|
||||
distill_reagent = "absinthe" //It's made from flowers.
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/absinthe //It's made from flowers.
|
||||
tastes = list("glowbugs" = 1)
|
||||
|
||||
// Novaflower
|
||||
@@ -209,7 +209,7 @@
|
||||
icon_dead = "sunflower-dead"
|
||||
product = /obj/item/grown/novaflower
|
||||
mutatelist = list()
|
||||
reagents_add = list("condensedcapsaicin" = 0.25, "capsaicin" = 0.3, "nutriment" = 0)
|
||||
reagents_add = list(/datum/reagent/consumable/condensedcapsaicin = 0.25, /datum/reagent/consumable/capsaicin = 0.3, /datum/reagent/consumable/nutriment = 0)
|
||||
rarity = 20
|
||||
|
||||
/obj/item/grown/novaflower
|
||||
@@ -227,7 +227,7 @@
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
attack_verb = list("roasted", "scorched", "burned")
|
||||
grind_results = list("capsaicin" = 0, "condensedcapsaicin" = 0)
|
||||
grind_results = list(/datum/reagent/consumable/capsaicin = 0, /datum/reagent/consumable/condensedcapsaicin = 0)
|
||||
tastes = list("cooked sunflower" = 1)
|
||||
|
||||
/obj/item/grown/novaflower/add_juice()
|
||||
@@ -277,7 +277,7 @@
|
||||
icon_grow = "bee_balm-grow"
|
||||
icon_dead = "bee_balm-dead"
|
||||
mutatelist = list(/obj/item/seeds/poppy/geranium, /obj/item/seeds/bee_balm/honey) //Lower odds of becoming honey
|
||||
reagents_add = list("spaceacillin" = 0.1, "sterilizine" = 0.05)
|
||||
reagents_add = list(/datum/reagent/medicine/spaceacillin = 0.1, /datum/reagent/space_cleaner/sterilizine = 0.05)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/bee_balm
|
||||
seed = /obj/item/seeds/bee_balm
|
||||
@@ -305,7 +305,7 @@
|
||||
growing_icon = 'icons/obj/hydroponics/growing_flowers.dmi'
|
||||
icon_grow = "bee_balmalt-grow"
|
||||
icon_dead = "bee_balmalt-dead"
|
||||
reagents_add = list("honey" = 0.1, "lye" = 0.3) //To make wax
|
||||
reagents_add = list(/datum/reagent/consumable/honey = 0.1, /datum/reagent/lye = 0.3) //To make wax
|
||||
rarity = 30
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/bee_balm/honey
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
icon_dead = "grass-dead"
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/grass/carpet, /obj/item/seeds/grass/fairy)
|
||||
reagents_add = list("nutriment" = 0.02, "hydrogen" = 0.05)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment = 0.02, /datum/reagent/hydrogen = 0.05)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/grass
|
||||
seed = /obj/item/seeds/grass
|
||||
@@ -51,7 +51,7 @@
|
||||
icon_grow = "fairygrass-grow"
|
||||
icon_dead = "fairygrass-dead"
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest, /datum/plant_gene/trait/glow/blue)
|
||||
reagents_add = list("nutriment" = 0.02, "hydrogen" = 0.05, "space_drugs" = 0.15)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment = 0.02, /datum/reagent/hydrogen = 0.05, /datum/reagent/drug/space_drugs = 0.15)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/grass/fairy
|
||||
seed = /obj/item/seeds/grass/fairy
|
||||
@@ -66,9 +66,9 @@
|
||||
for(var/datum/plant_gene/trait/glow/gene in seed.genes)
|
||||
G = gene
|
||||
break
|
||||
|
||||
|
||||
stacktype = initial(stacktype)
|
||||
|
||||
|
||||
if(G)
|
||||
switch(G.type)
|
||||
if(/datum/plant_gene/trait/glow/white)
|
||||
@@ -85,10 +85,10 @@
|
||||
stacktype = /obj/item/stack/tile/fairygrass/purple
|
||||
if(/datum/plant_gene/trait/glow/pink)
|
||||
stacktype = /obj/item/stack/tile/fairygrass/pink
|
||||
|
||||
|
||||
. = ..()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Carpet
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
growthstages = 4
|
||||
rarity = 30
|
||||
var/list/mutations = list()
|
||||
reagents_add = list("charcoal" = 0.04, "nutriment" = 0.02)
|
||||
reagents_add = list(/datum/reagent/medicine/charcoal = 0.04, /datum/reagent/consumable/nutriment = 0.02)
|
||||
|
||||
/obj/item/seeds/kudzu/Copy()
|
||||
var/obj/item/seeds/kudzu/S = ..()
|
||||
@@ -58,7 +58,7 @@
|
||||
/obj/item/seeds/kudzu/on_chem_reaction(datum/reagents/S)
|
||||
var/list/temp_mut_list = list()
|
||||
|
||||
if(S.has_reagent("sterilizine", 5))
|
||||
if(S.has_reagent(/datum/reagent/space_cleaner/sterilizine, 5))
|
||||
for(var/datum/spacevine_mutation/SM in mutations)
|
||||
if(SM.quality == NEGATIVE)
|
||||
temp_mut_list += SM
|
||||
@@ -66,7 +66,7 @@
|
||||
mutations.Remove(pick(temp_mut_list))
|
||||
temp_mut_list.Cut()
|
||||
|
||||
if(S.has_reagent("welding_fuel", 5))
|
||||
if(S.has_reagent(/datum/reagent/fuel, 5))
|
||||
for(var/datum/spacevine_mutation/SM in mutations)
|
||||
if(SM.quality == POSITIVE)
|
||||
temp_mut_list += SM
|
||||
@@ -74,7 +74,7 @@
|
||||
mutations.Remove(pick(temp_mut_list))
|
||||
temp_mut_list.Cut()
|
||||
|
||||
if(S.has_reagent("phenol", 5))
|
||||
if(S.has_reagent(/datum/reagent/phenol, 5))
|
||||
for(var/datum/spacevine_mutation/SM in mutations)
|
||||
if(SM.quality == MINOR_NEGATIVE)
|
||||
temp_mut_list += SM
|
||||
@@ -82,16 +82,16 @@
|
||||
mutations.Remove(pick(temp_mut_list))
|
||||
temp_mut_list.Cut()
|
||||
|
||||
if(S.has_reagent("blood", 15))
|
||||
if(S.has_reagent(/datum/reagent/blood, 15))
|
||||
adjust_production(rand(15, -5))
|
||||
|
||||
if(S.has_reagent("amatoxin", 5))
|
||||
if(S.has_reagent(/datum/reagent/toxin/amatoxin, 5))
|
||||
adjust_production(rand(5, -15))
|
||||
|
||||
if(S.has_reagent("plasma", 5))
|
||||
if(S.has_reagent(/datum/reagent/toxin/plasma, 5))
|
||||
adjust_potency(rand(5, -15))
|
||||
|
||||
if(S.has_reagent("holywater", 10))
|
||||
if(S.has_reagent(/datum/reagent/water/holywater, 10))
|
||||
adjust_potency(rand(15, -5))
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
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)
|
||||
reagents_add = list(/datum/reagent/water = 0.2, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/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>")
|
||||
@@ -33,7 +33,7 @@
|
||||
filling_color = "#008000"
|
||||
bitesize_mod = 3
|
||||
foodtype = FRUIT
|
||||
juice_results = list("watermelonjuice" = 0)
|
||||
juice_results = list(/datum/reagent/consumable/watermelonjuice = 0)
|
||||
wine_power = 40
|
||||
|
||||
// Holymelon
|
||||
@@ -46,7 +46,7 @@
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/holymelon
|
||||
genes = list(/datum/plant_gene/trait/glow/yellow)
|
||||
mutatelist = list()
|
||||
reagents_add = list("holywater" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/water/holywater = 0.2, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1)
|
||||
rarity = 20
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/holymelon
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
yield = 6
|
||||
potency = 10
|
||||
growthstages = 3
|
||||
grind_results = list("mustardgrind" = 1)
|
||||
grind_results = list(/datum/reagent/mustardgrind = 1)
|
||||
growing_icon = 'icons/obj/hydroponics/growing_flowers.dmi'
|
||||
genes = list(/datum/plant_gene/trait/plant_type/weed_hardy)
|
||||
mutatelist = list(/obj/item/seeds/starthistle/corpse_flower, /obj/item/seeds/galaxythistle)
|
||||
@@ -80,7 +80,7 @@
|
||||
growing_icon = 'icons/obj/hydroponics/growing_flowers.dmi'
|
||||
genes = list(/datum/plant_gene/trait/plant_type/weed_hardy, /datum/plant_gene/trait/invasive)
|
||||
mutatelist = list()
|
||||
reagents_add = list("nutriment" = 0.05, "silibinin" = 0.1)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment = 0.05, /datum/reagent/medicine/silibinin = 0.1)
|
||||
|
||||
/obj/item/seeds/galaxythistle/Initialize()
|
||||
..()
|
||||
@@ -116,7 +116,7 @@
|
||||
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/replicapod)
|
||||
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/cabbage
|
||||
seed = /obj/item/seeds/cabbage
|
||||
@@ -142,7 +142,7 @@
|
||||
maturation = 3
|
||||
yield = 4
|
||||
growthstages = 2
|
||||
reagents_add = list("sugar" = 0.25)
|
||||
reagents_add = list(/datum/reagent/consumable/sugar = 0.25)
|
||||
mutatelist = list(/obj/item/seeds/bamboo)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/sugarcane
|
||||
@@ -153,7 +153,7 @@
|
||||
filling_color = "#FFD700"
|
||||
bitesize_mod = 2
|
||||
foodtype = VEGETABLES | SUGAR
|
||||
distill_reagent = "rum"
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/rum
|
||||
|
||||
// Gatfruit
|
||||
/obj/item/seeds/gatfruit
|
||||
@@ -173,7 +173,7 @@
|
||||
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)
|
||||
reagents_add = list(/datum/reagent/sulfur = 0.1, /datum/reagent/carbon = 0.1, /datum/reagent/nitrogen = 0.07, /datum/reagent/potassium = 0.05)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/shell/gatfruit
|
||||
seed = /obj/item/seeds/gatfruit
|
||||
@@ -195,7 +195,7 @@
|
||||
plantname = "Cherry Bomb Tree"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/cherry_bomb
|
||||
mutatelist = list()
|
||||
reagents_add = list("nutriment" = 0.1, "sugar" = 0.1, "blackpowder" = 0.7)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment = 0.1, /datum/reagent/consumable/sugar = 0.1, /datum/reagent/blackpowder = 0.7)
|
||||
rarity = 60 //See above
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/cherry_bomb
|
||||
@@ -261,7 +261,7 @@
|
||||
icon_dead = "coconut-dead"
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
forbiddengenes = list(/datum/plant_gene/trait/squash, /datum/plant_gene/trait/stinging)
|
||||
reagents_add = list("coconutmilk" = 0.3)
|
||||
reagents_add = list(/datum/reagent/consumable/coconutmilk = 0.3)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/coconut
|
||||
seed = /obj/item/seeds/coconut
|
||||
@@ -432,7 +432,7 @@
|
||||
"<span class='userdanger'>[user] splashes the contents of [src] onto [M]!</span>")
|
||||
if(reagents)
|
||||
for(var/datum/reagent/A in reagents.reagent_list)
|
||||
R += A.id + " ("
|
||||
R += A.type + " ("
|
||||
R += num2text(A.volume) + "),"
|
||||
if(isturf(target) && reagents.reagent_list.len && thrownby)
|
||||
log_combat(thrownby, target, "splashed (thrown) [english_list(reagents.reagent_list)]")
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
growthstages = 4
|
||||
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism)
|
||||
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
|
||||
reagents_add = list("morphine" = 0.35, "charcoal" = 0.35, "nutriment" = 0)
|
||||
reagents_add = list(/datum/reagent/medicine/morphine = 0.35, /datum/reagent/medicine/charcoal = 0.35, /datum/reagent/consumable/nutriment = 0)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/mushroom/reishi
|
||||
seed = /obj/item/seeds/reishi
|
||||
@@ -47,7 +47,7 @@
|
||||
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism)
|
||||
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
|
||||
mutatelist = list(/obj/item/seeds/angel)
|
||||
reagents_add = list("mushroomhallucinogen" = 0.04, "amatoxin" = 0.35, "nutriment" = 0, "growthserum" = 0.1)
|
||||
reagents_add = list(/datum/reagent/drug/mushroomhallucinogen = 0.04, /datum/reagent/toxin/amatoxin = 0.35, /datum/reagent/consumable/nutriment = 0, /datum/reagent/growthserum = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/mushroom/amanita
|
||||
seed = /obj/item/seeds/amanita
|
||||
@@ -73,7 +73,7 @@
|
||||
growthstages = 3
|
||||
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism)
|
||||
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
|
||||
reagents_add = list("mushroomhallucinogen" = 0.04, "amatoxin" = 0.1, "nutriment" = 0, "amanitin" = 0.2)
|
||||
reagents_add = list(/datum/reagent/drug/mushroomhallucinogen = 0.04, /datum/reagent/toxin/amatoxin = 0.1, /datum/reagent/consumable/nutriment = 0, /datum/reagent/toxin/amanitin = 0.2)
|
||||
rarity = 30
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/mushroom/angel
|
||||
@@ -99,7 +99,7 @@
|
||||
growthstages = 3
|
||||
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism)
|
||||
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
|
||||
reagents_add = list("mushroomhallucinogen" = 0.25, "nutriment" = 0.02)
|
||||
reagents_add = list(/datum/reagent/drug/mushroomhallucinogen = 0.25, /datum/reagent/consumable/nutriment = 0.02)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/mushroom/libertycap
|
||||
seed = /obj/item/seeds/liberty
|
||||
@@ -125,7 +125,7 @@
|
||||
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism)
|
||||
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
|
||||
mutatelist = list(/obj/item/seeds/plump/walkingmushroom)
|
||||
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/mushroom/plumphelmet
|
||||
seed = /obj/item/seeds/plump
|
||||
@@ -133,7 +133,7 @@
|
||||
desc = "<I>Plumus Hellmus</I>: Plump, soft and s-so inviting~"
|
||||
icon_state = "plumphelmet"
|
||||
filling_color = "#9370DB"
|
||||
distill_reagent = "manlydorf"
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/manly_dorf
|
||||
|
||||
// Walking Mushroom
|
||||
/obj/item/seeds/plump/walkingmushroom
|
||||
@@ -149,7 +149,7 @@
|
||||
yield = 1
|
||||
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
|
||||
mutatelist = list()
|
||||
reagents_add = list("vitamin" = 0.05, "nutriment" = 0.15)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.05, /datum/reagent/consumable/nutriment = 0.15)
|
||||
rarity = 30
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/mushroom/walkingmushroom
|
||||
@@ -190,7 +190,7 @@
|
||||
growthstages = 3
|
||||
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism)
|
||||
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
|
||||
reagents_add = list("nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment = 0.1)
|
||||
mutatelist = list(/obj/item/seeds/chanterelle/jupitercup)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/mushroom/chanterelle
|
||||
@@ -215,7 +215,7 @@
|
||||
growthstages = 2
|
||||
genes = list(/datum/plant_gene/trait/plant_type/fungal_metabolism, /datum/plant_gene/reagent/liquidelectricity, /datum/plant_gene/trait/plant_type/carnivory)
|
||||
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
|
||||
reagents_add = list("nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment = 0.1)
|
||||
|
||||
/obj/item/seeds/chanterelle/jupitercup/Initialize()
|
||||
..()
|
||||
@@ -248,7 +248,7 @@
|
||||
genes = list(/datum/plant_gene/trait/glow, /datum/plant_gene/trait/plant_type/fungal_metabolism)
|
||||
growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi'
|
||||
mutatelist = list(/obj/item/seeds/glowshroom/glowcap, /obj/item/seeds/glowshroom/shadowshroom)
|
||||
reagents_add = list("radium" = 0.1, "phosphorus" = 0.1, "nutriment" = 0.04)
|
||||
reagents_add = list(/datum/reagent/radium = 0.1, /datum/reagent/phosphorus = 0.1, /datum/reagent/consumable/nutriment = 0.04)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/mushroom/glowshroom
|
||||
seed = /obj/item/seeds/glowshroom
|
||||
@@ -293,7 +293,7 @@
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/mushroom/glowshroom/glowcap
|
||||
genes = list(/datum/plant_gene/trait/glow/red, /datum/plant_gene/trait/cell_charge, /datum/plant_gene/trait/plant_type/fungal_metabolism)
|
||||
mutatelist = list()
|
||||
reagents_add = list("teslium" = 0.1, "nutriment" = 0.04)
|
||||
reagents_add = list(/datum/reagent/teslium = 0.1, /datum/reagent/consumable/nutriment = 0.04)
|
||||
rarity = 30
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/mushroom/glowshroom/glowcap
|
||||
@@ -318,7 +318,7 @@
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/mushroom/glowshroom/shadowshroom
|
||||
genes = list(/datum/plant_gene/trait/glow/shadow, /datum/plant_gene/trait/plant_type/fungal_metabolism)
|
||||
mutatelist = list()
|
||||
reagents_add = list("radium" = 0.2, "nutriment" = 0.04)
|
||||
reagents_add = list(/datum/reagent/radium = 0.2, /datum/reagent/consumable/nutriment = 0.04)
|
||||
rarity = 30
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/mushroom/glowshroom/shadowshroom
|
||||
@@ -350,7 +350,7 @@
|
||||
potency = 15
|
||||
growthstages = 3
|
||||
rarity = 20
|
||||
reagents_add = list("nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment = 0.1)
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
/obj/item/seeds/lavaland/polypore
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
growthstages = 5
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest, /datum/plant_gene/trait/plant_type/weed_hardy)
|
||||
mutatelist = list(/obj/item/seeds/nettle/death)
|
||||
reagents_add = list("sacid" = 0.5)
|
||||
reagents_add = list(/datum/reagent/toxin/acid = 0.5)
|
||||
|
||||
/obj/item/seeds/nettle/death
|
||||
name = "pack of death-nettle seeds"
|
||||
@@ -25,7 +25,7 @@
|
||||
yield = 2
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest, /datum/plant_gene/trait/plant_type/weed_hardy, /datum/plant_gene/trait/stinging)
|
||||
mutatelist = list()
|
||||
reagents_add = list("facid" = 0.5, "sacid" = 0.5)
|
||||
reagents_add = list(/datum/reagent/toxin/acid/fluacid = 0.5, /datum/reagent/toxin/acid = 0.5)
|
||||
rarity = 20
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/nettle // "snack"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
growthstages = 3
|
||||
weed_chance = 3
|
||||
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
|
||||
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1)
|
||||
mutatelist = list(/obj/item/seeds/onion/red)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/onion
|
||||
@@ -36,7 +36,7 @@
|
||||
plantname = "Red Onion Sprouts"
|
||||
weed_chance = 1
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/onion/red
|
||||
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1, "tearjuice" = 0.05)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1, /datum/reagent/consumable/tearjuice = 0.05)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/onion/red
|
||||
seed = /obj/item/seeds/onion/red
|
||||
@@ -61,7 +61,7 @@
|
||||
name = "onion slices"
|
||||
desc = "Rings, not for wearing."
|
||||
icon_state = "onionslice"
|
||||
list_reagents = list("nutriment" = 5, "vitamin" = 2)
|
||||
list_reagents = list(/datum/reagent/consumable/nutriment = 5, /datum/reagent/consumable/nutriment/vitamin = 2)
|
||||
filling_color = "#C0C9A0"
|
||||
gender = PLURAL
|
||||
cooked_type = /obj/item/reagent_containers/food/snacks/onionrings
|
||||
@@ -71,4 +71,4 @@
|
||||
desc = "They shine like exceptionally low quality amethyst."
|
||||
icon_state = "onionslice_red"
|
||||
filling_color = "#C29ACF"
|
||||
list_reagents = list("nutriment" = 5, "vitamin" = 2, "tearjuice" = 2.5)
|
||||
list_reagents = list(/datum/reagent/consumable/nutriment = 5, /datum/reagent/consumable/nutriment/vitamin = 2, /datum/reagent/consumable/tearjuice = 2.5)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
icon_grow = "peach-grow"
|
||||
icon_dead = "peach-dead"
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/peach
|
||||
seed = /obj/item/seeds/peach
|
||||
@@ -23,5 +23,5 @@
|
||||
filling_color = "#FF4500"
|
||||
bitesize = 25
|
||||
foodtype = FRUIT
|
||||
juice_results = list("peachjuice" = 0)
|
||||
juice_results = list(/datum/reagent/consumable/peachjuice = 0)
|
||||
tastes = list("peach" = 1)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
yield = 6
|
||||
growthstages = 4
|
||||
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
|
||||
reagents_add = list("vitamin" = 0.02, "nutriment" = 0.15, "cooking_oil" = 0.03)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.02, /datum/reagent/consumable/nutriment = 0.15, /datum/reagent/consumable/cooking_oil = 0.03)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/peanut
|
||||
seed = /obj/item/seeds/peanutseed
|
||||
@@ -26,5 +26,5 @@
|
||||
desc = "A handful of roasted peanuts, with or without salt."
|
||||
icon_state = "roasted_peanuts"
|
||||
foodtype = VEGETABLES
|
||||
list_reagents = list("nutriment" = 6, "vitamin" = 1)
|
||||
juice_results = list("peanut_butter" = 3)
|
||||
list_reagents = list(/datum/reagent/consumable/nutriment = 6, /datum/reagent/consumable/nutriment/vitamin = 1)
|
||||
juice_results = list(/datum/reagent/consumable/peanut_butter = 3)
|
||||
@@ -12,7 +12,7 @@
|
||||
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/apple)
|
||||
reagents_add = list("vitamin" = 0.02, "nutriment" = 0.2, "water" = 0.04)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.02, /datum/reagent/consumable/nutriment = 0.2, /datum/reagent/water = 0.04)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/pineapple
|
||||
seed = /obj/item/seeds/pineapple
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
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)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/potato
|
||||
seed = /obj/item/seeds/potato
|
||||
@@ -26,8 +26,8 @@
|
||||
filling_color = "#E9967A"
|
||||
bitesize = 100
|
||||
foodtype = VEGETABLES
|
||||
juice_results = list("potato" = 0)
|
||||
distill_reagent = "vodka"
|
||||
juice_results = list(/datum/reagent/consumable/potato_juice = 0)
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/vodka
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/potato/wedges
|
||||
name = "potato wedges"
|
||||
@@ -57,11 +57,11 @@
|
||||
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)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.1, /datum/reagent/consumable/sugar = 0.1, /datum/reagent/consumable/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"
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/sbiten
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
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)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.2)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/pumpkin
|
||||
seed = /obj/item/seeds/pumpkin
|
||||
@@ -24,7 +24,7 @@
|
||||
filling_color = "#FFA500"
|
||||
bitesize_mod = 2
|
||||
foodtype = FRUIT
|
||||
juice_results = list("pumpkinjuice" = 0)
|
||||
juice_results = list(/datum/reagent/consumable/pumpkinjuice = 0)
|
||||
wine_power = 20
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/pumpkin/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
@@ -45,7 +45,7 @@
|
||||
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)
|
||||
reagents_add = list(/datum/reagent/ammonia = 0.2, /datum/reagent/chlorine = 0.1, /datum/reagent/consumable/nutriment = 0.2)
|
||||
rarity = 20
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/blumpkin
|
||||
@@ -56,5 +56,5 @@
|
||||
filling_color = "#87CEFA"
|
||||
bitesize_mod = 2
|
||||
foodtype = FRUIT
|
||||
juice_results = list("blumpkinjuice" = 0)
|
||||
juice_results = list(/datum/reagent/consumable/blumpkinjuice = 0)
|
||||
wine_power = 50
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
/obj/item/seeds/replicapod/on_reagent_change(changetype)
|
||||
if(changetype == ADD_REAGENT)
|
||||
var/datum/reagent/blood/B = reagents.has_reagent("blood")
|
||||
var/datum/reagent/blood/B = reagents.has_reagent(/datum/reagent/blood)
|
||||
if(B)
|
||||
if(B.data["mind"] && B.data["cloneable"])
|
||||
mind = B.data["mind"]
|
||||
@@ -47,7 +47,7 @@
|
||||
else
|
||||
visible_message("<span class='warning'>The [src] rejects the sample!</span>")
|
||||
|
||||
if(!reagents.has_reagent("blood"))
|
||||
if(!reagents.has_reagent(/datum/reagent/blood))
|
||||
mind = null
|
||||
ckey = null
|
||||
realName = null
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
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)
|
||||
reagents_add = list(/datum/reagent/medicine/oculine = 0.25, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.05)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/carrot
|
||||
seed = /obj/item/seeds/carrot
|
||||
@@ -22,7 +22,7 @@
|
||||
filling_color = "#FFA500"
|
||||
bitesize_mod = 2
|
||||
foodtype = VEGETABLES
|
||||
juice_results = list("carrotjuice" = 0)
|
||||
juice_results = list(/datum/reagent/consumable/carrotjuice = 0)
|
||||
wine_power = 30
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/carrot/attackby(obj/item/I, mob/user, params)
|
||||
@@ -45,7 +45,7 @@
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/parsnip
|
||||
icon_dead = "carrot-dead"
|
||||
mutatelist = list()
|
||||
reagents_add = list("vitamin" = 0.05, "nutriment" = 0.05)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.05, /datum/reagent/consumable/nutriment = 0.05)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/parsnip
|
||||
seed = /obj/item/seeds/carrot/parsnip
|
||||
@@ -54,7 +54,7 @@
|
||||
icon_state = "parsnip"
|
||||
bitesize_mod = 2
|
||||
foodtype = VEGETABLES
|
||||
juice_results = list("parsnipjuice" = 0)
|
||||
juice_results = list(/datum/reagent/consumable/parsnipjuice = 0)
|
||||
wine_power = 35
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
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)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/sugar = 0.2, /datum/reagent/consumable/nutriment = 0.05)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/whitebeet
|
||||
seed = /obj/item/seeds/whitebeet
|
||||
@@ -98,7 +98,7 @@
|
||||
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)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.05, /datum/reagent/consumable/nutriment = 0.05)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/redbeet
|
||||
seed = /obj/item/seeds/redbeet
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
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)
|
||||
reagents_add = list(/datum/reagent/toxin/teapowder = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/tea
|
||||
seed = /obj/item/seeds/tea
|
||||
@@ -22,7 +22,7 @@
|
||||
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)
|
||||
grind_results = list(/datum/reagent/toxin/teapowder = 0)
|
||||
dry_grind = TRUE
|
||||
can_distill = FALSE
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
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)
|
||||
reagents_add = list(/datum/reagent/medicine/synaptizine = 0.1, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/toxin/teapowder = 0.1)
|
||||
rarity = 20
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/tea/astra
|
||||
@@ -42,7 +42,7 @@
|
||||
name = "Tea Astra tips"
|
||||
icon_state = "tea_astra_leaves"
|
||||
filling_color = "#4582B4"
|
||||
grind_results = list("teapowder" = 0, "salglu_solution" = 0)
|
||||
grind_results = list(/datum/reagent/toxin/teapowder = 0, /datum/reagent/medicine/salglu_solution = 0)
|
||||
|
||||
// Kitty drugs
|
||||
/obj/item/seeds/tea/catnip
|
||||
@@ -52,7 +52,7 @@
|
||||
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)
|
||||
reagents_add = list(/datum/reagent/pax/catnip = 0.1, /datum/reagent/consumable/nutriment/vitamin = 0.06, /datum/reagent/toxin/teapowder = 0.3)
|
||||
rarity = 50
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/tea/catnip
|
||||
@@ -60,7 +60,7 @@
|
||||
name = "Catnip buds"
|
||||
icon_state = "catnip"
|
||||
filling_color = "#4582B4"
|
||||
grind_results = list("catnp" = 2, "water" = 1)
|
||||
grind_results = list(/datum/reagent/pax/catnip = 2, /datum/reagent/water = 1)
|
||||
|
||||
// Coffee
|
||||
/obj/item/seeds/coffee
|
||||
@@ -79,7 +79,7 @@
|
||||
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)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/toxin/coffeepowder = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/coffee
|
||||
seed = /obj/item/seeds/coffee
|
||||
@@ -89,8 +89,8 @@
|
||||
filling_color = "#DC143C"
|
||||
bitesize_mod = 2
|
||||
dry_grind = TRUE
|
||||
grind_results = list("coffeepowder" = 0)
|
||||
distill_reagent = "kahlua"
|
||||
grind_results = list(/datum/reagent/toxin/coffeepowder = 0)
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/kahlua
|
||||
|
||||
// Coffee Robusta
|
||||
/obj/item/seeds/coffee/robusta
|
||||
@@ -101,7 +101,7 @@
|
||||
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)
|
||||
reagents_add = list(/datum/reagent/medicine/ephedrine = 0.1, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/toxin/coffeepowder = 0.1)
|
||||
rarity = 20
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/coffee/robusta
|
||||
@@ -109,4 +109,4 @@
|
||||
name = "coffee robusta beans"
|
||||
desc = "Increases robustness by 37 percent!"
|
||||
icon_state = "coffee_robusta"
|
||||
grind_results = list("coffeepowder" = 0, "morphine" = 0)
|
||||
grind_results = list(/datum/reagent/toxin/coffeepowder = 0, /datum/reagent/medicine/morphine = 0)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
growthstages = 3
|
||||
icon_dead = "tobacco-dead"
|
||||
mutatelist = list(/obj/item/seeds/tobacco/space)
|
||||
reagents_add = list("nicotine" = 0.03, "nutriment" = 0.03)
|
||||
reagents_add = list(/datum/reagent/drug/nicotine = 0.03, /datum/reagent/consumable/nutriment = 0.03)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/tobacco
|
||||
seed = /obj/item/seeds/tobacco
|
||||
@@ -21,7 +21,7 @@
|
||||
desc = "Dry them out to make some smokes."
|
||||
icon_state = "tobacco_leaves"
|
||||
filling_color = "#008000"
|
||||
distill_reagent = "creme_de_menthe" //Menthol, I guess.
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/creme_de_menthe //Menthol, I guess.
|
||||
|
||||
// Space Tobacco
|
||||
/obj/item/seeds/tobacco/space
|
||||
@@ -32,7 +32,7 @@
|
||||
plantname = "Space Tobacco Plant"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/tobacco/space
|
||||
mutatelist = list()
|
||||
reagents_add = list("salbutamol" = 0.05, "nicotine" = 0.08, "nutriment" = 0.03)
|
||||
reagents_add = list(/datum/reagent/medicine/salbutamol = 0.05, /datum/reagent/drug/nicotine = 0.08, /datum/reagent/consumable/nutriment = 0.03)
|
||||
rarity = 20
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/tobacco/space
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
icon_dead = "tomato-dead"
|
||||
genes = list(/datum/plant_gene/trait/squash, /datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/tomato/blue, /obj/item/seeds/tomato/blood, /obj/item/seeds/tomato/killer)
|
||||
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/tomato
|
||||
seed = /obj/item/seeds/tomato
|
||||
@@ -23,9 +23,9 @@
|
||||
filling_color = "#FF6347"
|
||||
bitesize_mod = 2
|
||||
foodtype = FRUIT
|
||||
grind_results = list("ketchup" = 0)
|
||||
juice_results = list("tomatojuice" = 0)
|
||||
distill_reagent = "enzyme"
|
||||
grind_results = list(/datum/reagent/consumable/ketchup = 0)
|
||||
juice_results = list(/datum/reagent/consumable/tomatojuice = 0)
|
||||
distill_reagent = /datum/reagent/consumable/enzyme
|
||||
|
||||
// Blood Tomato
|
||||
/obj/item/seeds/tomato/blood
|
||||
@@ -36,7 +36,7 @@
|
||||
plantname = "Blood-Tomato Plants"
|
||||
product = /obj/item/reagent_containers/food/snacks/grown/tomato/blood
|
||||
mutatelist = list()
|
||||
reagents_add = list("blood" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/blood = 0.2, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1)
|
||||
rarity = 20
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/tomato/blood
|
||||
@@ -47,8 +47,8 @@
|
||||
splat_type = /obj/effect/gibspawner/generic
|
||||
filling_color = "#FF0000"
|
||||
foodtype = FRUIT | GROSS
|
||||
grind_results = list("ketchup" = 0, "blood" = 0)
|
||||
distill_reagent = "bloodymary"
|
||||
grind_results = list(/datum/reagent/consumable/ketchup = 0, /datum/reagent/blood = 0)
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/bloody_mary
|
||||
|
||||
// Blue Tomato
|
||||
/obj/item/seeds/tomato/blue
|
||||
@@ -62,7 +62,7 @@
|
||||
icon_grow = "bluetomato-grow"
|
||||
mutatelist = list(/obj/item/seeds/tomato/blue/bluespace)
|
||||
genes = list(/datum/plant_gene/trait/slip, /datum/plant_gene/trait/repeated_harvest)
|
||||
reagents_add = list("lube" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/lube = 0.2, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1)
|
||||
rarity = 20
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/tomato/blue
|
||||
@@ -72,7 +72,7 @@
|
||||
icon_state = "bluetomato"
|
||||
splat_type = /obj/effect/decal/cleanable/oil
|
||||
filling_color = "#0000FF"
|
||||
distill_reagent = "laughter"
|
||||
distill_reagent = /datum/reagent/consumable/laughter
|
||||
|
||||
// Bluespace Tomato
|
||||
/obj/item/seeds/tomato/blue/bluespace
|
||||
@@ -85,7 +85,7 @@
|
||||
yield = 2
|
||||
mutatelist = list()
|
||||
genes = list(/datum/plant_gene/trait/squash, /datum/plant_gene/trait/slip, /datum/plant_gene/trait/teleport, /datum/plant_gene/trait/repeated_harvest)
|
||||
reagents_add = list("lube" = 0.2, "bluespace" = 0.2, "vitamin" = 0.04, "nutriment" = 0.1)
|
||||
reagents_add = list(/datum/reagent/lube = 0.2, /datum/reagent/bluespace = 0.2, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1)
|
||||
rarity = 50
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/tomato/blue/bluespace
|
||||
@@ -120,7 +120,7 @@
|
||||
icon_state = "killertomato"
|
||||
var/awakening = 0
|
||||
filling_color = "#FF0000"
|
||||
distill_reagent = "demonsblood"
|
||||
distill_reagent = /datum/reagent/consumable/ethanol/demonsblood
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/tomato/killer/attack(mob/M, mob/user, def_zone)
|
||||
if(awakening)
|
||||
|
||||
@@ -1,62 +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)
|
||||
// **********************
|
||||
// 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)
|
||||
|
||||
@@ -1,195 +1,195 @@
|
||||
// Plant analyzer
|
||||
/obj/item/plant_analyzer
|
||||
name = "plant analyzer"
|
||||
desc = "A scanner used to evaluate a plant's various areas of growth."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "hydro"
|
||||
item_state = "analyzer"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
materials = list(MAT_METAL=30, MAT_GLASS=20)
|
||||
|
||||
// *************************************
|
||||
// Hydroponics Tools
|
||||
// *************************************
|
||||
|
||||
/obj/item/reagent_containers/spray/weedspray // -- Skie
|
||||
desc = "It's a toxic mixture, in spray form, to kill small weeds."
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
name = "weed spray"
|
||||
icon_state = "weedspray"
|
||||
item_state = "spraycan"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
|
||||
volume = 100
|
||||
list_reagents = list("weedkiller" = 100)
|
||||
|
||||
/obj/item/reagent_containers/spray/weedspray/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is huffing [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (TOXLOSS)
|
||||
|
||||
/obj/item/reagent_containers/spray/pestspray // -- Skie
|
||||
desc = "It's some pest eliminator spray! <I>Do not inhale!</I>"
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
name = "pest spray"
|
||||
icon_state = "pestspray"
|
||||
item_state = "plantbgone"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
|
||||
volume = 100
|
||||
list_reagents = list("pestkiller" = 100)
|
||||
|
||||
/obj/item/reagent_containers/spray/pestspray/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is huffing [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (TOXLOSS)
|
||||
|
||||
/obj/item/cultivator
|
||||
name = "cultivator"
|
||||
desc = "It's used for removing weeds or scratching your back."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "cultivator"
|
||||
item_state = "cultivator"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
force = 5
|
||||
throwforce = 7
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=50)
|
||||
attack_verb = list("slashed", "sliced", "cut", "clawed")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
|
||||
/obj/item/cultivator/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is scratching [user.p_their()] back as hard as [user.p_they()] can with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/hatchet
|
||||
name = "hatchet"
|
||||
desc = "A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "hatchet"
|
||||
item_state = "hatchet"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
force = 12
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 15
|
||||
throw_speed = 3
|
||||
throw_range = 4
|
||||
materials = list(MAT_METAL = 15000)
|
||||
attack_verb = list("chopped", "torn", "cut")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
sharpness = IS_SHARP
|
||||
|
||||
/obj/item/hatchet/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 70, 100)
|
||||
|
||||
/obj/item/hatchet/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is chopping at [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(src, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/scythe
|
||||
icon_state = "scythe0"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/polearms_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/polearms_righthand.dmi'
|
||||
name = "scythe"
|
||||
desc = "A sharp and curved blade on a long fibremetal handle, this tool makes it easy to reap what you sow."
|
||||
force = 13
|
||||
throwforce = 5
|
||||
throw_speed = 2
|
||||
throw_range = 3
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
flags_1 = CONDUCT_1
|
||||
armour_penetration = 20
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
attack_verb = list("chopped", "sliced", "cut", "reaped")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
var/swiping = FALSE
|
||||
|
||||
/obj/item/scythe/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 90, 105)
|
||||
|
||||
/obj/item/scythe/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is beheading [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
var/obj/item/bodypart/BP = C.get_bodypart(BODY_ZONE_HEAD)
|
||||
if(BP)
|
||||
BP.drop_limb()
|
||||
playsound(src,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/scythe/pre_attack(atom/A, mob/living/user, params)
|
||||
if(swiping || !istype(A, /obj/structure/spacevine) || get_turf(A) == get_turf(user))
|
||||
return ..()
|
||||
else
|
||||
var/turf/user_turf = get_turf(user)
|
||||
var/dir_to_target = get_dir(user_turf, get_turf(A))
|
||||
var/stam_gain = 0
|
||||
swiping = TRUE
|
||||
var/static/list/scythe_slash_angles = list(0, 45, 90, -45, -90)
|
||||
for(var/i in scythe_slash_angles)
|
||||
var/turf/T = get_step(user_turf, turn(dir_to_target, i))
|
||||
for(var/obj/structure/spacevine/V in T)
|
||||
if(user.Adjacent(V))
|
||||
melee_attack_chain(user, V)
|
||||
stam_gain += 5 //should be hitcost
|
||||
swiping = FALSE
|
||||
stam_gain += 2 //Initial hitcost
|
||||
user.adjustStaminaLoss(-stam_gain)
|
||||
|
||||
// *************************************
|
||||
// Nutrient defines for hydroponics
|
||||
// *************************************
|
||||
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient
|
||||
name = "bottle of nutrient"
|
||||
volume = 50
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(1,2,5,10,15,25,50)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/Initialize()
|
||||
. = ..()
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/ez
|
||||
name = "bottle of E-Z-Nutrient"
|
||||
desc = "Contains a fertilizer that causes mild mutations with each harvest."
|
||||
list_reagents = list("eznutriment" = 50)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/l4z
|
||||
name = "bottle of Left 4 Zed"
|
||||
desc = "Contains a fertilizer that limits plant yields to no more than one and causes significant mutations in plants."
|
||||
list_reagents = list("left4zednutriment" = 50)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/rh
|
||||
name = "bottle of Robust Harvest"
|
||||
desc = "Contains a fertilizer that increases the yield of a plant by 30% while causing no mutations."
|
||||
list_reagents = list("robustharvestnutriment" = 50)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/empty
|
||||
name = "bottle"
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/killer
|
||||
volume = 50
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(1,2,5,10,15,25,50)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/killer/weedkiller
|
||||
name = "bottle of weed killer"
|
||||
desc = "Contains a herbicide."
|
||||
list_reagents = list("weedkiller" = 50)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/killer/pestkiller
|
||||
name = "bottle of pest spray"
|
||||
desc = "Contains a pesticide."
|
||||
list_reagents = list("pestkiller" = 50)
|
||||
// Plant analyzer
|
||||
/obj/item/plant_analyzer
|
||||
name = "plant analyzer"
|
||||
desc = "A scanner used to evaluate a plant's various areas of growth."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "hydro"
|
||||
item_state = "analyzer"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
materials = list(MAT_METAL=30, MAT_GLASS=20)
|
||||
|
||||
// *************************************
|
||||
// Hydroponics Tools
|
||||
// *************************************
|
||||
|
||||
/obj/item/reagent_containers/spray/weedspray // -- Skie
|
||||
desc = "It's a toxic mixture, in spray form, to kill small weeds."
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
name = "weed spray"
|
||||
icon_state = "weedspray"
|
||||
item_state = "spraycan"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
|
||||
volume = 100
|
||||
list_reagents = list(/datum/reagent/toxin/plantbgone/weedkiller = 100)
|
||||
|
||||
/obj/item/reagent_containers/spray/weedspray/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is huffing [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (TOXLOSS)
|
||||
|
||||
/obj/item/reagent_containers/spray/pestspray // -- Skie
|
||||
desc = "It's some pest eliminator spray! <I>Do not inhale!</I>"
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
name = "pest spray"
|
||||
icon_state = "pestspray"
|
||||
item_state = "plantbgone"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
|
||||
volume = 100
|
||||
list_reagents = list(/datum/reagent/toxin/pestkiller = 100)
|
||||
|
||||
/obj/item/reagent_containers/spray/pestspray/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is huffing [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (TOXLOSS)
|
||||
|
||||
/obj/item/cultivator
|
||||
name = "cultivator"
|
||||
desc = "It's used for removing weeds or scratching your back."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "cultivator"
|
||||
item_state = "cultivator"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
force = 5
|
||||
throwforce = 7
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=50)
|
||||
attack_verb = list("slashed", "sliced", "cut", "clawed")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
|
||||
/obj/item/cultivator/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is scratching [user.p_their()] back as hard as [user.p_they()] can with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/hatchet
|
||||
name = "hatchet"
|
||||
desc = "A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "hatchet"
|
||||
item_state = "hatchet"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
force = 12
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 15
|
||||
throw_speed = 3
|
||||
throw_range = 4
|
||||
materials = list(MAT_METAL = 15000)
|
||||
attack_verb = list("chopped", "torn", "cut")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
sharpness = IS_SHARP
|
||||
|
||||
/obj/item/hatchet/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 70, 100)
|
||||
|
||||
/obj/item/hatchet/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is chopping at [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(src, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/scythe
|
||||
icon_state = "scythe0"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/polearms_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/polearms_righthand.dmi'
|
||||
name = "scythe"
|
||||
desc = "A sharp and curved blade on a long fibremetal handle, this tool makes it easy to reap what you sow."
|
||||
force = 13
|
||||
throwforce = 5
|
||||
throw_speed = 2
|
||||
throw_range = 3
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
flags_1 = CONDUCT_1
|
||||
armour_penetration = 20
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
attack_verb = list("chopped", "sliced", "cut", "reaped")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
var/swiping = FALSE
|
||||
|
||||
/obj/item/scythe/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 90, 105)
|
||||
|
||||
/obj/item/scythe/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is beheading [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
var/obj/item/bodypart/BP = C.get_bodypart(BODY_ZONE_HEAD)
|
||||
if(BP)
|
||||
BP.drop_limb()
|
||||
playsound(src,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/scythe/pre_attack(atom/A, mob/living/user, params)
|
||||
if(swiping || !istype(A, /obj/structure/spacevine) || get_turf(A) == get_turf(user))
|
||||
return ..()
|
||||
else
|
||||
var/turf/user_turf = get_turf(user)
|
||||
var/dir_to_target = get_dir(user_turf, get_turf(A))
|
||||
var/stam_gain = 0
|
||||
swiping = TRUE
|
||||
var/static/list/scythe_slash_angles = list(0, 45, 90, -45, -90)
|
||||
for(var/i in scythe_slash_angles)
|
||||
var/turf/T = get_step(user_turf, turn(dir_to_target, i))
|
||||
for(var/obj/structure/spacevine/V in T)
|
||||
if(user.Adjacent(V))
|
||||
melee_attack_chain(user, V)
|
||||
stam_gain += 5 //should be hitcost
|
||||
swiping = FALSE
|
||||
stam_gain += 2 //Initial hitcost
|
||||
user.adjustStaminaLoss(-stam_gain)
|
||||
|
||||
// *************************************
|
||||
// Nutrient defines for hydroponics
|
||||
// *************************************
|
||||
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient
|
||||
name = "bottle of nutrient"
|
||||
volume = 50
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(1,2,5,10,15,25,50)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/Initialize()
|
||||
. = ..()
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/ez
|
||||
name = "bottle of E-Z-Nutrient"
|
||||
desc = "Contains a fertilizer that causes mild mutations with each harvest."
|
||||
list_reagents = list(/datum/reagent/plantnutriment/eznutriment = 50)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/l4z
|
||||
name = "bottle of Left 4 Zed"
|
||||
desc = "Contains a fertilizer that limits plant yields to no more than one and causes significant mutations in plants."
|
||||
list_reagents = list(/datum/reagent/plantnutriment/left4zednutriment = 50)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/rh
|
||||
name = "bottle of Robust Harvest"
|
||||
desc = "Contains a fertilizer that increases the yield of a plant by 30% while causing no mutations."
|
||||
list_reagents = list(/datum/reagent/plantnutriment/robustharvestnutriment = 50)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nutrient/empty
|
||||
name = "bottle"
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/killer
|
||||
volume = 50
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(1,2,5,10,15,25,50)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/killer/weedkiller
|
||||
name = "bottle of weed killer"
|
||||
desc = "Contains a herbicide."
|
||||
list_reagents = list(/datum/reagent/toxin/plantbgone/weedkiller = 50)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/killer/pestkiller
|
||||
name = "bottle of pest spray"
|
||||
desc = "Contains a pesticide."
|
||||
list_reagents = list(/datum/reagent/toxin/pestkiller = 50)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -129,7 +129,7 @@
|
||||
name = "UNKNOWN"
|
||||
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[reag_id]
|
||||
if(R && R.id == reagent_id)
|
||||
if(R && R.type == reagent_id)
|
||||
name = R.name
|
||||
|
||||
/datum/plant_gene/reagent/New(reag_id = null, reag_rate = 0)
|
||||
@@ -228,7 +228,7 @@
|
||||
var/obj/item/seeds/seed = G.seed
|
||||
var/stun_len = seed.potency * rate
|
||||
|
||||
if(!istype(G, /obj/item/grown/bananapeel) && (!G.reagents || !G.reagents.has_reagent("lube")))
|
||||
if(!istype(G, /obj/item/grown/bananapeel) && (!G.reagents || !G.reagents.has_reagent(/datum/reagent/lube)))
|
||||
stun_len /= 3
|
||||
|
||||
G.AddComponent(/datum/component/slippery, min(stun_len,140), NONE, CALLBACK(src, .proc/handle_slip, G))
|
||||
@@ -412,7 +412,7 @@
|
||||
pocell.name = "[G.name] battery"
|
||||
pocell.desc = "A rechargeable plant-based power cell. This one has a rating of [DisplayEnergy(pocell.maxcharge)], and you should not swallow it."
|
||||
|
||||
if(G.reagents.has_reagent("plasma", 2))
|
||||
if(G.reagents.has_reagent(/datum/reagent/toxin/plasma, 2))
|
||||
pocell.rigged = TRUE
|
||||
|
||||
qdel(G)
|
||||
|
||||
@@ -1,192 +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)
|
||||
/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)
|
||||
|
||||
+468
-468
@@ -1,468 +1,468 @@
|
||||
// ********************************************************
|
||||
// Here's all the seeds (plants) that can be used in hydro
|
||||
// ********************************************************
|
||||
|
||||
/obj/item/seeds
|
||||
icon = 'icons/obj/hydroponics/seeds.dmi'
|
||||
icon_state = "seed" // Unknown plant seed - these shouldn't exist in-game.
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
resistance_flags = FLAMMABLE
|
||||
var/plantname = "Plants" // Name of plant when planted.
|
||||
var/obj/item/product // A type path. The thing that is created when the plant is harvested.
|
||||
var/productdesc
|
||||
var/species = "" // Used to update icons. Should match the name in the sprites unless all icon_* are overridden.
|
||||
|
||||
var/growing_icon = 'icons/obj/hydroponics/growing.dmi' //the file that stores the sprites of the growing plant from this seed.
|
||||
var/icon_grow // Used to override grow icon (default is "[species]-grow"). You can use one grow icon for multiple closely related plants with it.
|
||||
var/icon_dead // Used to override dead icon (default is "[species]-dead"). You can use one dead icon for multiple closely related plants with it.
|
||||
var/icon_harvest // Used to override harvest icon (default is "[species]-harvest"). If null, plant will use [icon_grow][growthstages].
|
||||
|
||||
var/lifespan = 25 // How long before the plant begins to take damage from age.
|
||||
var/endurance = 15 // Amount of health the plant has.
|
||||
var/maturation = 6 // Used to determine which sprite to switch to when growing.
|
||||
var/production = 6 // Changes the amount of time needed for a plant to become harvestable.
|
||||
var/yield = 3 // Amount of growns created per harvest. If is -1, the plant/shroom/weed is never meant to be harvested.
|
||||
var/potency = 10 // The 'power' of a plant. Generally effects the amount of reagent in a plant, also used in other ways.
|
||||
var/growthstages = 6 // Amount of growth sprites the plant has.
|
||||
var/rarity = 0 // How rare the plant is. Used for giving points to cargo when shipping off to CentCom.
|
||||
var/list/mutatelist = list() // The type of plants that this plant can mutate into.
|
||||
var/list/genes = list() // Plant genes are stored here, see plant_genes.dm for more info.
|
||||
var/list/forbiddengenes = list()
|
||||
var/list/reagents_add = list()
|
||||
// A list of reagents to add to product.
|
||||
// Format: "reagent_id" = potency multiplier
|
||||
// Stronger reagents must always come first to avoid being displaced by weaker ones.
|
||||
// Total amount of any reagent in plant is calculated by formula: 1 + round(potency * multiplier)
|
||||
|
||||
var/weed_rate = 1 //If the chance below passes, then this many weeds sprout during growth
|
||||
var/weed_chance = 5 //Percentage chance per tray update to grow weeds
|
||||
|
||||
/obj/item/seeds/Initialize(loc, nogenes = 0)
|
||||
. = ..()
|
||||
pixel_x = rand(-8, 8)
|
||||
pixel_y = rand(-8, 8)
|
||||
|
||||
if(!icon_grow)
|
||||
icon_grow = "[species]-grow"
|
||||
|
||||
if(!icon_dead)
|
||||
icon_dead = "[species]-dead"
|
||||
|
||||
if(!icon_harvest && !get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism) && yield != -1)
|
||||
icon_harvest = "[species]-harvest"
|
||||
|
||||
if(!nogenes) // not used on Copy()
|
||||
genes += new /datum/plant_gene/core/lifespan(lifespan)
|
||||
genes += new /datum/plant_gene/core/endurance(endurance)
|
||||
genes += new /datum/plant_gene/core/weed_rate(weed_rate)
|
||||
genes += new /datum/plant_gene/core/weed_chance(weed_chance)
|
||||
if(yield != -1)
|
||||
genes += new /datum/plant_gene/core/yield(yield)
|
||||
genes += new /datum/plant_gene/core/production(production)
|
||||
if(potency != -1)
|
||||
genes += new /datum/plant_gene/core/potency(potency)
|
||||
|
||||
for(var/p in genes)
|
||||
if(ispath(p))
|
||||
genes -= p
|
||||
genes += new p
|
||||
|
||||
for(var/reag_id in reagents_add)
|
||||
genes += new /datum/plant_gene/reagent(reag_id, reagents_add[reag_id])
|
||||
reagents_from_genes() //quality coding
|
||||
|
||||
/obj/item/seeds/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>Use a pen on it to rename it or change its description.</span>"
|
||||
|
||||
/obj/item/seeds/proc/Copy()
|
||||
var/obj/item/seeds/S = new type(null, 1)
|
||||
// Copy all the stats
|
||||
S.lifespan = lifespan
|
||||
S.endurance = endurance
|
||||
S.maturation = maturation
|
||||
S.production = production
|
||||
S.yield = yield
|
||||
S.potency = potency
|
||||
S.weed_rate = weed_rate
|
||||
S.weed_chance = weed_chance
|
||||
S.name = name
|
||||
S.plantname = plantname
|
||||
S.desc = desc
|
||||
S.productdesc = productdesc
|
||||
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/is_gene_forbidden(typepath)
|
||||
return (typepath in forbiddengenes)
|
||||
|
||||
|
||||
/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
|
||||
|
||||
///This proc adds a mutability_flag to a gene
|
||||
/obj/item/seeds/proc/set_mutability(typepath, mutability)
|
||||
var/datum/plant_gene/g = get_gene(typepath)
|
||||
if(g)
|
||||
g.mutability_flags |= mutability
|
||||
|
||||
///This proc removes a mutability_flag from a gene
|
||||
/obj/item/seeds/proc/unset_mutability(typepath, mutability)
|
||||
var/datum/plant_gene/g = get_gene(typepath)
|
||||
if(g)
|
||||
g.mutability_flags &= ~mutability
|
||||
|
||||
/obj/item/seeds/proc/mutate(lifemut = 2, endmut = 5, productmut = 1, yieldmut = 2, potmut = 25, wrmut = 2, wcmut = 5, traitmut = 0)
|
||||
adjust_lifespan(rand(-lifemut,lifemut))
|
||||
adjust_endurance(rand(-endmut,endmut))
|
||||
adjust_production(rand(-productmut,productmut))
|
||||
adjust_yield(rand(-yieldmut,yieldmut))
|
||||
adjust_potency(rand(-potmut,potmut))
|
||||
adjust_weed_rate(rand(-wrmut, wrmut))
|
||||
adjust_weed_chance(rand(-wcmut, wcmut))
|
||||
if(prob(traitmut))
|
||||
add_random_traits(1, 1)
|
||||
|
||||
|
||||
|
||||
/obj/item/seeds/bullet_act(obj/item/projectile/Proj) //Works with the Somatoray to modify plant variables.
|
||||
if(istype(Proj, /obj/item/projectile/energy/florayield))
|
||||
var/rating = 1
|
||||
if(istype(loc, /obj/machinery/hydroponics))
|
||||
var/obj/machinery/hydroponics/H = loc
|
||||
rating = H.rating
|
||||
|
||||
if(yield == 0)//Oh god don't divide by zero you'll doom us all.
|
||||
adjust_yield(1 * rating)
|
||||
else if(prob(1/(yield * yield) * 100))//This formula gives you diminishing returns based on yield. 100% with 1 yield, decreasing to 25%, 11%, 6, 4, 2...
|
||||
adjust_yield(1 * rating)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
// Harvest procs
|
||||
/obj/item/seeds/proc/getYield()
|
||||
var/return_yield = yield
|
||||
|
||||
var/obj/machinery/hydroponics/parent = loc
|
||||
if(istype(loc, /obj/machinery/hydroponics))
|
||||
if(parent.yieldmod == 0)
|
||||
return_yield = min(return_yield, 1)//1 if above zero, 0 otherwise
|
||||
else
|
||||
return_yield *= (parent.yieldmod)
|
||||
|
||||
return return_yield
|
||||
|
||||
|
||||
/obj/item/seeds/proc/harvest(mob/user)
|
||||
var/obj/machinery/hydroponics/parent = loc //for ease of access
|
||||
var/t_amount = 0
|
||||
var/list/result = list()
|
||||
var/output_loc = parent.Adjacent(user) ? user.loc : parent.loc //needed for TK
|
||||
var/product_name
|
||||
while(t_amount < getYield())
|
||||
var/obj/item/reagent_containers/food/snacks/grown/t_prod = new product(output_loc, src)
|
||||
if(parent.myseed.plantname != initial(parent.myseed.plantname))
|
||||
t_prod.name = lowertext(parent.myseed.plantname)
|
||||
if(productdesc)
|
||||
t_prod.desc = productdesc
|
||||
t_prod.seed.name = parent.myseed.name
|
||||
t_prod.seed.desc = parent.myseed.desc
|
||||
t_prod.seed.plantname = parent.myseed.plantname
|
||||
result.Add(t_prod) // User gets a consumable
|
||||
if(!t_prod)
|
||||
return
|
||||
t_amount++
|
||||
product_name = parent.myseed.plantname
|
||||
if(getYield() >= 1)
|
||||
SSblackbox.record_feedback("tally", "food_harvested", getYield(), product_name)
|
||||
parent.update_tray(user)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
/obj/item/seeds/proc/prepare_result(var/obj/item/reagent_containers/food/snacks/grown/T)
|
||||
if(!T.reagents)
|
||||
CRASH("[T] has no reagents.")
|
||||
|
||||
for(var/rid in reagents_add)
|
||||
var/amount = 1 + round(potency * reagents_add[rid], 1)
|
||||
|
||||
var/list/data = null
|
||||
if(rid == "blood") // Hack to make blood in plants always O-
|
||||
data = list("blood_type" = "O-")
|
||||
if(rid == "nutriment" || rid == "vitamin")
|
||||
// apple tastes of apple.
|
||||
data = T.tastes
|
||||
|
||||
T.reagents.add_reagent(rid, amount, data)
|
||||
|
||||
|
||||
/// Setters procs ///
|
||||
/obj/item/seeds/proc/adjust_yield(adjustamt)
|
||||
if(yield != -1) // Unharvestable shouldn't suddenly turn harvestable
|
||||
yield = CLAMP(yield + adjustamt, 0, 10)
|
||||
|
||||
if(yield <= 0 && get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism))
|
||||
yield = 1 // Mushrooms always have a minimum yield of 1.
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/yield)
|
||||
if(C)
|
||||
C.value = yield
|
||||
|
||||
/obj/item/seeds/proc/adjust_lifespan(adjustamt)
|
||||
lifespan = CLAMP(lifespan + adjustamt, 10, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/lifespan)
|
||||
if(C)
|
||||
C.value = lifespan
|
||||
|
||||
/obj/item/seeds/proc/adjust_endurance(adjustamt)
|
||||
endurance = CLAMP(endurance + adjustamt, 10, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/endurance)
|
||||
if(C)
|
||||
C.value = endurance
|
||||
|
||||
/obj/item/seeds/proc/adjust_production(adjustamt)
|
||||
if(yield != -1)
|
||||
production = CLAMP(production + adjustamt, 1, 10)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/production)
|
||||
if(C)
|
||||
C.value = production
|
||||
|
||||
/obj/item/seeds/proc/adjust_potency(adjustamt)
|
||||
if(potency != -1)
|
||||
potency = CLAMP(potency + adjustamt, 0, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/potency)
|
||||
if(C)
|
||||
C.value = potency
|
||||
|
||||
/obj/item/seeds/proc/adjust_weed_rate(adjustamt)
|
||||
weed_rate = CLAMP(weed_rate + adjustamt, 0, 10)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_rate)
|
||||
if(C)
|
||||
C.value = weed_rate
|
||||
|
||||
/obj/item/seeds/proc/adjust_weed_chance(adjustamt)
|
||||
weed_chance = CLAMP(weed_chance + adjustamt, 0, 67)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_chance)
|
||||
if(C)
|
||||
C.value = weed_chance
|
||||
|
||||
//Directly setting stats
|
||||
|
||||
/obj/item/seeds/proc/set_yield(adjustamt)
|
||||
if(yield != -1) // Unharvestable shouldn't suddenly turn harvestable
|
||||
yield = CLAMP(adjustamt, 0, 10)
|
||||
|
||||
if(yield <= 0 && get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism))
|
||||
yield = 1 // Mushrooms always have a minimum yield of 1.
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/yield)
|
||||
if(C)
|
||||
C.value = yield
|
||||
|
||||
/obj/item/seeds/proc/set_lifespan(adjustamt)
|
||||
lifespan = CLAMP(adjustamt, 10, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/lifespan)
|
||||
if(C)
|
||||
C.value = lifespan
|
||||
|
||||
/obj/item/seeds/proc/set_endurance(adjustamt)
|
||||
endurance = CLAMP(adjustamt, 10, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/endurance)
|
||||
if(C)
|
||||
C.value = endurance
|
||||
|
||||
/obj/item/seeds/proc/set_production(adjustamt)
|
||||
if(yield != -1)
|
||||
production = CLAMP(adjustamt, 1, 10)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/production)
|
||||
if(C)
|
||||
C.value = production
|
||||
|
||||
/obj/item/seeds/proc/set_potency(adjustamt)
|
||||
if(potency != -1)
|
||||
potency = CLAMP(adjustamt, 0, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/potency)
|
||||
if(C)
|
||||
C.value = potency
|
||||
|
||||
/obj/item/seeds/proc/set_weed_rate(adjustamt)
|
||||
weed_rate = CLAMP(adjustamt, 0, 10)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_rate)
|
||||
if(C)
|
||||
C.value = weed_rate
|
||||
|
||||
/obj/item/seeds/proc/set_weed_chance(adjustamt)
|
||||
weed_chance = CLAMP(adjustamt, 0, 67)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_chance)
|
||||
if(C)
|
||||
C.value = weed_chance
|
||||
|
||||
|
||||
/obj/item/seeds/proc/get_analyzer_text() //in case seeds have something special to tell to the analyzer
|
||||
var/text = ""
|
||||
if(!get_gene(/datum/plant_gene/trait/plant_type/weed_hardy) && !get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism) && !get_gene(/datum/plant_gene/trait/plant_type/alien_properties))
|
||||
text += "- Plant type: Normal plant\n"
|
||||
if(get_gene(/datum/plant_gene/trait/plant_type/weed_hardy))
|
||||
text += "- Plant type: Weed. Can grow in nutrient-poor soil.\n"
|
||||
if(get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism))
|
||||
text += "- Plant type: Mushroom. Can grow in dry soil.\n"
|
||||
if(get_gene(/datum/plant_gene/trait/plant_type/alien_properties))
|
||||
text += "- Plant type: <span class='warning'>UNKNOWN</span> \n"
|
||||
if(potency != -1)
|
||||
text += "- Potency: [potency]\n"
|
||||
if(yield != -1)
|
||||
text += "- Yield: [yield]\n"
|
||||
text += "- Maturation speed: [maturation]\n"
|
||||
if(yield != -1)
|
||||
text += "- Production speed: [production]\n"
|
||||
text += "- Endurance: [endurance]\n"
|
||||
text += "- Lifespan: [lifespan]\n"
|
||||
text += "- Weed Growth Rate: [weed_rate]\n"
|
||||
text += "- Weed Vulnerability: [weed_chance]\n"
|
||||
if(rarity)
|
||||
text += "- Species Discovery Value: [rarity]\n"
|
||||
var/all_traits = ""
|
||||
for(var/datum/plant_gene/trait/traits in genes)
|
||||
if(istype(traits, /datum/plant_gene/trait/plant_type))
|
||||
continue
|
||||
all_traits += " [traits.get_name()]"
|
||||
text += "- Plant Traits:[all_traits]\n"
|
||||
|
||||
text += "*---------*"
|
||||
|
||||
return text
|
||||
|
||||
/obj/item/seeds/proc/on_chem_reaction(datum/reagents/S) //in case seeds have some special interaction with special chems
|
||||
return
|
||||
|
||||
/obj/item/seeds/attackby(obj/item/O, mob/user, params)
|
||||
if (istype(O, /obj/item/plant_analyzer))
|
||||
to_chat(user, "<span class='info'>*---------*\n This is \a <span class='name'>[src]</span>.</span>")
|
||||
var/text = get_analyzer_text()
|
||||
if(text)
|
||||
to_chat(user, "<span class='notice'>[text]</span>")
|
||||
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/pen))
|
||||
var/choice = input("What would you like to change?") in list("Plant Name", "Seed Description", "Product Description", "Cancel")
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
switch(choice)
|
||||
if("Plant Name")
|
||||
var/newplantname = reject_bad_text(stripped_input(user, "Write a new plant name:", name, plantname))
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if (length(newplantname) > 20)
|
||||
to_chat(user, "That name is too long!")
|
||||
return
|
||||
if(!newplantname)
|
||||
to_chat(user, "That name is invalid.")
|
||||
return
|
||||
else
|
||||
name = "[lowertext(newplantname)]"
|
||||
plantname = newplantname
|
||||
if("Seed Description")
|
||||
var/newdesc = stripped_input(user, "Write a new description:", name, desc)
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if (length(newdesc) > 180)
|
||||
to_chat(user, "That description is too long!")
|
||||
return
|
||||
if(!newdesc)
|
||||
to_chat(user, "That description is invalid.")
|
||||
return
|
||||
else
|
||||
desc = newdesc
|
||||
if("Product Description")
|
||||
if(product && !productdesc)
|
||||
productdesc = initial(product.desc)
|
||||
var/newproductdesc = stripped_input(user, "Write a new description:", name, productdesc)
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if (length(newproductdesc) > 180)
|
||||
to_chat(user, "That description is too long!")
|
||||
return
|
||||
if(!newproductdesc)
|
||||
to_chat(user, "That description is invalid.")
|
||||
return
|
||||
else
|
||||
productdesc = newproductdesc
|
||||
else
|
||||
return
|
||||
|
||||
..() // Fallthrough to item/attackby() so that bags can pick seeds up
|
||||
|
||||
// Checks plants for broken tray icons. Use Advanced Proc Call to activate.
|
||||
// Maybe some day it would be used as unit test.
|
||||
/proc/check_plants_growth_stages_icons()
|
||||
var/list/states = icon_states('icons/obj/hydroponics/growing.dmi')
|
||||
states |= icon_states('icons/obj/hydroponics/growing_fruits.dmi')
|
||||
states |= icon_states('icons/obj/hydroponics/growing_flowers.dmi')
|
||||
states |= icon_states('icons/obj/hydroponics/growing_mushrooms.dmi')
|
||||
states |= icon_states('icons/obj/hydroponics/growing_vegetables.dmi')
|
||||
var/list/paths = typesof(/obj/item/seeds) - /obj/item/seeds - typesof(/obj/item/seeds/sample)
|
||||
|
||||
for(var/seedpath in paths)
|
||||
var/obj/item/seeds/seed = new seedpath
|
||||
|
||||
for(var/i in 1 to seed.growthstages)
|
||||
if("[seed.icon_grow][i]" in states)
|
||||
continue
|
||||
to_chat(world, "[seed.name] ([seed.type]) lacks the [seed.icon_grow][i] icon!")
|
||||
|
||||
if(!(seed.icon_dead in states))
|
||||
to_chat(world, "[seed.name] ([seed.type]) lacks the [seed.icon_dead] icon!")
|
||||
|
||||
if(seed.icon_harvest) // mushrooms have no grown sprites, same for items with no product
|
||||
if(!(seed.icon_harvest in states))
|
||||
to_chat(world, "[seed.name] ([seed.type]) lacks the [seed.icon_harvest] icon!")
|
||||
|
||||
/obj/item/seeds/proc/randomize_stats()
|
||||
set_lifespan(rand(25, 60))
|
||||
set_endurance(rand(15, 35))
|
||||
set_production(rand(2, 10))
|
||||
set_yield(rand(1, 10))
|
||||
set_potency(rand(10, 35))
|
||||
set_weed_rate(rand(1, 10))
|
||||
set_weed_chance(rand(5, 100))
|
||||
maturation = rand(6, 12)
|
||||
|
||||
/obj/item/seeds/proc/add_random_reagents(lower = 0, upper = 2)
|
||||
var/amount_random_reagents = rand(lower, upper)
|
||||
for(var/i in 1 to amount_random_reagents)
|
||||
var/random_amount = rand(4, 15) * 0.01 // this must be multiplied by 0.01, otherwise, it will not properly associate
|
||||
var/datum/plant_gene/reagent/R = new(get_random_reagent_id(), random_amount)
|
||||
if(R.can_add(src))
|
||||
genes += R
|
||||
else
|
||||
qdel(R)
|
||||
reagents_from_genes()
|
||||
|
||||
/obj/item/seeds/proc/add_random_traits(lower = 0, upper = 2)
|
||||
var/amount_random_traits = rand(lower, upper)
|
||||
for(var/i in 1 to amount_random_traits)
|
||||
var/random_trait = pick((subtypesof(/datum/plant_gene/trait)-typesof(/datum/plant_gene/trait/plant_type)))
|
||||
var/datum/plant_gene/trait/T = new random_trait
|
||||
if(T.can_add(src) && !is_gene_forbidden(random_trait))
|
||||
genes += T
|
||||
else
|
||||
qdel(T)
|
||||
|
||||
/obj/item/seeds/proc/add_random_plant_type(normal_plant_chance = 75)
|
||||
if(prob(normal_plant_chance))
|
||||
var/random_plant_type = pick(subtypesof(/datum/plant_gene/trait/plant_type))
|
||||
var/datum/plant_gene/trait/plant_type/P = new random_plant_type
|
||||
if(P.can_add(src))
|
||||
genes += P
|
||||
else
|
||||
qdel(P)
|
||||
// ********************************************************
|
||||
// Here's all the seeds (plants) that can be used in hydro
|
||||
// ********************************************************
|
||||
|
||||
/obj/item/seeds
|
||||
icon = 'icons/obj/hydroponics/seeds.dmi'
|
||||
icon_state = "seed" // Unknown plant seed - these shouldn't exist in-game.
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
resistance_flags = FLAMMABLE
|
||||
var/plantname = "Plants" // Name of plant when planted.
|
||||
var/obj/item/product // A type path. The thing that is created when the plant is harvested.
|
||||
var/productdesc
|
||||
var/species = "" // Used to update icons. Should match the name in the sprites unless all icon_* are overridden.
|
||||
|
||||
var/growing_icon = 'icons/obj/hydroponics/growing.dmi' //the file that stores the sprites of the growing plant from this seed.
|
||||
var/icon_grow // Used to override grow icon (default is "[species]-grow"). You can use one grow icon for multiple closely related plants with it.
|
||||
var/icon_dead // Used to override dead icon (default is "[species]-dead"). You can use one dead icon for multiple closely related plants with it.
|
||||
var/icon_harvest // Used to override harvest icon (default is "[species]-harvest"). If null, plant will use [icon_grow][growthstages].
|
||||
|
||||
var/lifespan = 25 // How long before the plant begins to take damage from age.
|
||||
var/endurance = 15 // Amount of health the plant has.
|
||||
var/maturation = 6 // Used to determine which sprite to switch to when growing.
|
||||
var/production = 6 // Changes the amount of time needed for a plant to become harvestable.
|
||||
var/yield = 3 // Amount of growns created per harvest. If is -1, the plant/shroom/weed is never meant to be harvested.
|
||||
var/potency = 10 // The 'power' of a plant. Generally effects the amount of reagent in a plant, also used in other ways.
|
||||
var/growthstages = 6 // Amount of growth sprites the plant has.
|
||||
var/rarity = 0 // How rare the plant is. Used for giving points to cargo when shipping off to CentCom.
|
||||
var/list/mutatelist = list() // The type of plants that this plant can mutate into.
|
||||
var/list/genes = list() // Plant genes are stored here, see plant_genes.dm for more info.
|
||||
var/list/forbiddengenes = list()
|
||||
var/list/reagents_add = list()
|
||||
// A list of reagents to add to product.
|
||||
// Format: "reagent_id" = potency multiplier
|
||||
// Stronger reagents must always come first to avoid being displaced by weaker ones.
|
||||
// Total amount of any reagent in plant is calculated by formula: 1 + round(potency * multiplier)
|
||||
|
||||
var/weed_rate = 1 //If the chance below passes, then this many weeds sprout during growth
|
||||
var/weed_chance = 5 //Percentage chance per tray update to grow weeds
|
||||
|
||||
/obj/item/seeds/Initialize(loc, nogenes = 0)
|
||||
. = ..()
|
||||
pixel_x = rand(-8, 8)
|
||||
pixel_y = rand(-8, 8)
|
||||
|
||||
if(!icon_grow)
|
||||
icon_grow = "[species]-grow"
|
||||
|
||||
if(!icon_dead)
|
||||
icon_dead = "[species]-dead"
|
||||
|
||||
if(!icon_harvest && !get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism) && yield != -1)
|
||||
icon_harvest = "[species]-harvest"
|
||||
|
||||
if(!nogenes) // not used on Copy()
|
||||
genes += new /datum/plant_gene/core/lifespan(lifespan)
|
||||
genes += new /datum/plant_gene/core/endurance(endurance)
|
||||
genes += new /datum/plant_gene/core/weed_rate(weed_rate)
|
||||
genes += new /datum/plant_gene/core/weed_chance(weed_chance)
|
||||
if(yield != -1)
|
||||
genes += new /datum/plant_gene/core/yield(yield)
|
||||
genes += new /datum/plant_gene/core/production(production)
|
||||
if(potency != -1)
|
||||
genes += new /datum/plant_gene/core/potency(potency)
|
||||
|
||||
for(var/p in genes)
|
||||
if(ispath(p))
|
||||
genes -= p
|
||||
genes += new p
|
||||
|
||||
for(var/reag_id in reagents_add)
|
||||
genes += new /datum/plant_gene/reagent(reag_id, reagents_add[reag_id])
|
||||
reagents_from_genes() //quality coding
|
||||
|
||||
/obj/item/seeds/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>Use a pen on it to rename it or change its description.</span>"
|
||||
|
||||
/obj/item/seeds/proc/Copy()
|
||||
var/obj/item/seeds/S = new type(null, 1)
|
||||
// Copy all the stats
|
||||
S.lifespan = lifespan
|
||||
S.endurance = endurance
|
||||
S.maturation = maturation
|
||||
S.production = production
|
||||
S.yield = yield
|
||||
S.potency = potency
|
||||
S.weed_rate = weed_rate
|
||||
S.weed_chance = weed_chance
|
||||
S.name = name
|
||||
S.plantname = plantname
|
||||
S.desc = desc
|
||||
S.productdesc = productdesc
|
||||
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/is_gene_forbidden(typepath)
|
||||
return (typepath in forbiddengenes)
|
||||
|
||||
|
||||
/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
|
||||
|
||||
///This proc adds a mutability_flag to a gene
|
||||
/obj/item/seeds/proc/set_mutability(typepath, mutability)
|
||||
var/datum/plant_gene/g = get_gene(typepath)
|
||||
if(g)
|
||||
g.mutability_flags |= mutability
|
||||
|
||||
///This proc removes a mutability_flag from a gene
|
||||
/obj/item/seeds/proc/unset_mutability(typepath, mutability)
|
||||
var/datum/plant_gene/g = get_gene(typepath)
|
||||
if(g)
|
||||
g.mutability_flags &= ~mutability
|
||||
|
||||
/obj/item/seeds/proc/mutate(lifemut = 2, endmut = 5, productmut = 1, yieldmut = 2, potmut = 25, wrmut = 2, wcmut = 5, traitmut = 0)
|
||||
adjust_lifespan(rand(-lifemut,lifemut))
|
||||
adjust_endurance(rand(-endmut,endmut))
|
||||
adjust_production(rand(-productmut,productmut))
|
||||
adjust_yield(rand(-yieldmut,yieldmut))
|
||||
adjust_potency(rand(-potmut,potmut))
|
||||
adjust_weed_rate(rand(-wrmut, wrmut))
|
||||
adjust_weed_chance(rand(-wcmut, wcmut))
|
||||
if(prob(traitmut))
|
||||
add_random_traits(1, 1)
|
||||
|
||||
|
||||
|
||||
/obj/item/seeds/bullet_act(obj/item/projectile/Proj) //Works with the Somatoray to modify plant variables.
|
||||
if(istype(Proj, /obj/item/projectile/energy/florayield))
|
||||
var/rating = 1
|
||||
if(istype(loc, /obj/machinery/hydroponics))
|
||||
var/obj/machinery/hydroponics/H = loc
|
||||
rating = H.rating
|
||||
|
||||
if(yield == 0)//Oh god don't divide by zero you'll doom us all.
|
||||
adjust_yield(1 * rating)
|
||||
else if(prob(1/(yield * yield) * 100))//This formula gives you diminishing returns based on yield. 100% with 1 yield, decreasing to 25%, 11%, 6, 4, 2...
|
||||
adjust_yield(1 * rating)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
// Harvest procs
|
||||
/obj/item/seeds/proc/getYield()
|
||||
var/return_yield = yield
|
||||
|
||||
var/obj/machinery/hydroponics/parent = loc
|
||||
if(istype(loc, /obj/machinery/hydroponics))
|
||||
if(parent.yieldmod == 0)
|
||||
return_yield = min(return_yield, 1)//1 if above zero, 0 otherwise
|
||||
else
|
||||
return_yield *= (parent.yieldmod)
|
||||
|
||||
return return_yield
|
||||
|
||||
|
||||
/obj/item/seeds/proc/harvest(mob/user)
|
||||
var/obj/machinery/hydroponics/parent = loc //for ease of access
|
||||
var/t_amount = 0
|
||||
var/list/result = list()
|
||||
var/output_loc = parent.Adjacent(user) ? user.loc : parent.loc //needed for TK
|
||||
var/product_name
|
||||
while(t_amount < getYield())
|
||||
var/obj/item/reagent_containers/food/snacks/grown/t_prod = new product(output_loc, src)
|
||||
if(parent.myseed.plantname != initial(parent.myseed.plantname))
|
||||
t_prod.name = lowertext(parent.myseed.plantname)
|
||||
if(productdesc)
|
||||
t_prod.desc = productdesc
|
||||
t_prod.seed.name = parent.myseed.name
|
||||
t_prod.seed.desc = parent.myseed.desc
|
||||
t_prod.seed.plantname = parent.myseed.plantname
|
||||
result.Add(t_prod) // User gets a consumable
|
||||
if(!t_prod)
|
||||
return
|
||||
t_amount++
|
||||
product_name = parent.myseed.plantname
|
||||
if(getYield() >= 1)
|
||||
SSblackbox.record_feedback("tally", "food_harvested", getYield(), product_name)
|
||||
parent.update_tray(user)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
/obj/item/seeds/proc/prepare_result(var/obj/item/reagent_containers/food/snacks/grown/T)
|
||||
if(!T.reagents)
|
||||
CRASH("[T] has no reagents.")
|
||||
|
||||
for(var/rid in reagents_add)
|
||||
var/amount = 1 + round(potency * reagents_add[rid], 1)
|
||||
|
||||
var/list/data = null
|
||||
if(rid == "blood") // Hack to make blood in plants always O-
|
||||
data = list("blood_type" = "O-")
|
||||
if(rid == /datum/reagent/consumable/nutriment || rid == /datum/reagent/consumable/nutriment/vitamin)
|
||||
// apple tastes of apple.
|
||||
data = T.tastes
|
||||
|
||||
T.reagents.add_reagent(rid, amount, data)
|
||||
|
||||
|
||||
/// Setters procs ///
|
||||
/obj/item/seeds/proc/adjust_yield(adjustamt)
|
||||
if(yield != -1) // Unharvestable shouldn't suddenly turn harvestable
|
||||
yield = CLAMP(yield + adjustamt, 0, 10)
|
||||
|
||||
if(yield <= 0 && get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism))
|
||||
yield = 1 // Mushrooms always have a minimum yield of 1.
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/yield)
|
||||
if(C)
|
||||
C.value = yield
|
||||
|
||||
/obj/item/seeds/proc/adjust_lifespan(adjustamt)
|
||||
lifespan = CLAMP(lifespan + adjustamt, 10, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/lifespan)
|
||||
if(C)
|
||||
C.value = lifespan
|
||||
|
||||
/obj/item/seeds/proc/adjust_endurance(adjustamt)
|
||||
endurance = CLAMP(endurance + adjustamt, 10, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/endurance)
|
||||
if(C)
|
||||
C.value = endurance
|
||||
|
||||
/obj/item/seeds/proc/adjust_production(adjustamt)
|
||||
if(yield != -1)
|
||||
production = CLAMP(production + adjustamt, 1, 10)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/production)
|
||||
if(C)
|
||||
C.value = production
|
||||
|
||||
/obj/item/seeds/proc/adjust_potency(adjustamt)
|
||||
if(potency != -1)
|
||||
potency = CLAMP(potency + adjustamt, 0, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/potency)
|
||||
if(C)
|
||||
C.value = potency
|
||||
|
||||
/obj/item/seeds/proc/adjust_weed_rate(adjustamt)
|
||||
weed_rate = CLAMP(weed_rate + adjustamt, 0, 10)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_rate)
|
||||
if(C)
|
||||
C.value = weed_rate
|
||||
|
||||
/obj/item/seeds/proc/adjust_weed_chance(adjustamt)
|
||||
weed_chance = CLAMP(weed_chance + adjustamt, 0, 67)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_chance)
|
||||
if(C)
|
||||
C.value = weed_chance
|
||||
|
||||
//Directly setting stats
|
||||
|
||||
/obj/item/seeds/proc/set_yield(adjustamt)
|
||||
if(yield != -1) // Unharvestable shouldn't suddenly turn harvestable
|
||||
yield = CLAMP(adjustamt, 0, 10)
|
||||
|
||||
if(yield <= 0 && get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism))
|
||||
yield = 1 // Mushrooms always have a minimum yield of 1.
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/yield)
|
||||
if(C)
|
||||
C.value = yield
|
||||
|
||||
/obj/item/seeds/proc/set_lifespan(adjustamt)
|
||||
lifespan = CLAMP(adjustamt, 10, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/lifespan)
|
||||
if(C)
|
||||
C.value = lifespan
|
||||
|
||||
/obj/item/seeds/proc/set_endurance(adjustamt)
|
||||
endurance = CLAMP(adjustamt, 10, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/endurance)
|
||||
if(C)
|
||||
C.value = endurance
|
||||
|
||||
/obj/item/seeds/proc/set_production(adjustamt)
|
||||
if(yield != -1)
|
||||
production = CLAMP(adjustamt, 1, 10)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/production)
|
||||
if(C)
|
||||
C.value = production
|
||||
|
||||
/obj/item/seeds/proc/set_potency(adjustamt)
|
||||
if(potency != -1)
|
||||
potency = CLAMP(adjustamt, 0, 100)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/potency)
|
||||
if(C)
|
||||
C.value = potency
|
||||
|
||||
/obj/item/seeds/proc/set_weed_rate(adjustamt)
|
||||
weed_rate = CLAMP(adjustamt, 0, 10)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_rate)
|
||||
if(C)
|
||||
C.value = weed_rate
|
||||
|
||||
/obj/item/seeds/proc/set_weed_chance(adjustamt)
|
||||
weed_chance = CLAMP(adjustamt, 0, 67)
|
||||
var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_chance)
|
||||
if(C)
|
||||
C.value = weed_chance
|
||||
|
||||
|
||||
/obj/item/seeds/proc/get_analyzer_text() //in case seeds have something special to tell to the analyzer
|
||||
var/text = ""
|
||||
if(!get_gene(/datum/plant_gene/trait/plant_type/weed_hardy) && !get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism) && !get_gene(/datum/plant_gene/trait/plant_type/alien_properties))
|
||||
text += "- Plant type: Normal plant\n"
|
||||
if(get_gene(/datum/plant_gene/trait/plant_type/weed_hardy))
|
||||
text += "- Plant type: Weed. Can grow in nutrient-poor soil.\n"
|
||||
if(get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism))
|
||||
text += "- Plant type: Mushroom. Can grow in dry soil.\n"
|
||||
if(get_gene(/datum/plant_gene/trait/plant_type/alien_properties))
|
||||
text += "- Plant type: <span class='warning'>UNKNOWN</span> \n"
|
||||
if(potency != -1)
|
||||
text += "- Potency: [potency]\n"
|
||||
if(yield != -1)
|
||||
text += "- Yield: [yield]\n"
|
||||
text += "- Maturation speed: [maturation]\n"
|
||||
if(yield != -1)
|
||||
text += "- Production speed: [production]\n"
|
||||
text += "- Endurance: [endurance]\n"
|
||||
text += "- Lifespan: [lifespan]\n"
|
||||
text += "- Weed Growth Rate: [weed_rate]\n"
|
||||
text += "- Weed Vulnerability: [weed_chance]\n"
|
||||
if(rarity)
|
||||
text += "- Species Discovery Value: [rarity]\n"
|
||||
var/all_traits = ""
|
||||
for(var/datum/plant_gene/trait/traits in genes)
|
||||
if(istype(traits, /datum/plant_gene/trait/plant_type))
|
||||
continue
|
||||
all_traits += " [traits.get_name()]"
|
||||
text += "- Plant Traits:[all_traits]\n"
|
||||
|
||||
text += "*---------*"
|
||||
|
||||
return text
|
||||
|
||||
/obj/item/seeds/proc/on_chem_reaction(datum/reagents/S) //in case seeds have some special interaction with special chems
|
||||
return
|
||||
|
||||
/obj/item/seeds/attackby(obj/item/O, mob/user, params)
|
||||
if (istype(O, /obj/item/plant_analyzer))
|
||||
to_chat(user, "<span class='info'>*---------*\n This is \a <span class='name'>[src]</span>.</span>")
|
||||
var/text = get_analyzer_text()
|
||||
if(text)
|
||||
to_chat(user, "<span class='notice'>[text]</span>")
|
||||
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/pen))
|
||||
var/choice = input("What would you like to change?") in list("Plant Name", "Seed Description", "Product Description", "Cancel")
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
switch(choice)
|
||||
if("Plant Name")
|
||||
var/newplantname = reject_bad_text(stripped_input(user, "Write a new plant name:", name, plantname))
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if (length(newplantname) > 20)
|
||||
to_chat(user, "That name is too long!")
|
||||
return
|
||||
if(!newplantname)
|
||||
to_chat(user, "That name is invalid.")
|
||||
return
|
||||
else
|
||||
name = "[lowertext(newplantname)]"
|
||||
plantname = newplantname
|
||||
if("Seed Description")
|
||||
var/newdesc = stripped_input(user, "Write a new description:", name, desc)
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if (length(newdesc) > 180)
|
||||
to_chat(user, "That description is too long!")
|
||||
return
|
||||
if(!newdesc)
|
||||
to_chat(user, "That description is invalid.")
|
||||
return
|
||||
else
|
||||
desc = newdesc
|
||||
if("Product Description")
|
||||
if(product && !productdesc)
|
||||
productdesc = initial(product.desc)
|
||||
var/newproductdesc = stripped_input(user, "Write a new description:", name, productdesc)
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if (length(newproductdesc) > 180)
|
||||
to_chat(user, "That description is too long!")
|
||||
return
|
||||
if(!newproductdesc)
|
||||
to_chat(user, "That description is invalid.")
|
||||
return
|
||||
else
|
||||
productdesc = newproductdesc
|
||||
else
|
||||
return
|
||||
|
||||
..() // Fallthrough to item/attackby() so that bags can pick seeds up
|
||||
|
||||
// Checks plants for broken tray icons. Use Advanced Proc Call to activate.
|
||||
// Maybe some day it would be used as unit test.
|
||||
/proc/check_plants_growth_stages_icons()
|
||||
var/list/states = icon_states('icons/obj/hydroponics/growing.dmi')
|
||||
states |= icon_states('icons/obj/hydroponics/growing_fruits.dmi')
|
||||
states |= icon_states('icons/obj/hydroponics/growing_flowers.dmi')
|
||||
states |= icon_states('icons/obj/hydroponics/growing_mushrooms.dmi')
|
||||
states |= icon_states('icons/obj/hydroponics/growing_vegetables.dmi')
|
||||
var/list/paths = typesof(/obj/item/seeds) - /obj/item/seeds - typesof(/obj/item/seeds/sample)
|
||||
|
||||
for(var/seedpath in paths)
|
||||
var/obj/item/seeds/seed = new seedpath
|
||||
|
||||
for(var/i in 1 to seed.growthstages)
|
||||
if("[seed.icon_grow][i]" in states)
|
||||
continue
|
||||
to_chat(world, "[seed.name] ([seed.type]) lacks the [seed.icon_grow][i] icon!")
|
||||
|
||||
if(!(seed.icon_dead in states))
|
||||
to_chat(world, "[seed.name] ([seed.type]) lacks the [seed.icon_dead] icon!")
|
||||
|
||||
if(seed.icon_harvest) // mushrooms have no grown sprites, same for items with no product
|
||||
if(!(seed.icon_harvest in states))
|
||||
to_chat(world, "[seed.name] ([seed.type]) lacks the [seed.icon_harvest] icon!")
|
||||
|
||||
/obj/item/seeds/proc/randomize_stats()
|
||||
set_lifespan(rand(25, 60))
|
||||
set_endurance(rand(15, 35))
|
||||
set_production(rand(2, 10))
|
||||
set_yield(rand(1, 10))
|
||||
set_potency(rand(10, 35))
|
||||
set_weed_rate(rand(1, 10))
|
||||
set_weed_chance(rand(5, 100))
|
||||
maturation = rand(6, 12)
|
||||
|
||||
/obj/item/seeds/proc/add_random_reagents(lower = 0, upper = 2)
|
||||
var/amount_random_reagents = rand(lower, upper)
|
||||
for(var/i in 1 to amount_random_reagents)
|
||||
var/random_amount = rand(4, 15) * 0.01 // this must be multiplied by 0.01, otherwise, it will not properly associate
|
||||
var/datum/plant_gene/reagent/R = new(get_random_reagent_id(), random_amount)
|
||||
if(R.can_add(src))
|
||||
genes += R
|
||||
else
|
||||
qdel(R)
|
||||
reagents_from_genes()
|
||||
|
||||
/obj/item/seeds/proc/add_random_traits(lower = 0, upper = 2)
|
||||
var/amount_random_traits = rand(lower, upper)
|
||||
for(var/i in 1 to amount_random_traits)
|
||||
var/random_trait = pick((subtypesof(/datum/plant_gene/trait)-typesof(/datum/plant_gene/trait/plant_type)))
|
||||
var/datum/plant_gene/trait/T = new random_trait
|
||||
if(T.can_add(src) && !is_gene_forbidden(random_trait))
|
||||
genes += T
|
||||
else
|
||||
qdel(T)
|
||||
|
||||
/obj/item/seeds/proc/add_random_plant_type(normal_plant_chance = 75)
|
||||
if(prob(normal_plant_chance))
|
||||
var/random_plant_type = pick(subtypesof(/datum/plant_gene/trait/plant_type))
|
||||
var/datum/plant_gene/trait/plant_type/P = new random_plant_type
|
||||
if(P.can_add(src))
|
||||
genes += P
|
||||
else
|
||||
qdel(P)
|
||||
|
||||
Reference in New Issue
Block a user