mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 15:42:35 +00:00
* Makes grass auto-stack when harvested * Allows seeds to be extracted from grass * Allows the smart-fridge and plant bags to accept seeds. * Lays the groundwork for a seeds-only version of the smart fridge, to eventually replace the existing seed vender (not yet hackable, though) -Fixed window doors not opening when you click on them. -Added a reset button for the job selection screen. -Fixed a bug with the traitor panel which leaves ex-changelings with the evolution menu. -I re-added the variables for the intercept report but commented them out. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5276 316c924e-a436-60f5-8080-3fe189b3f50e
54 lines
1.7 KiB
Plaintext
54 lines
1.7 KiB
Plaintext
/obj/machinery/seed_extractor
|
|
name = "seed extractor"
|
|
desc = "Extracts and bags seeds from produce."
|
|
icon = 'icons/obj/hydroponics.dmi'
|
|
icon_state = "sextractor"
|
|
density = 1
|
|
anchored = 1
|
|
|
|
obj/machinery/seed_extractor/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
|
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/))
|
|
var/obj/item/weapon/reagent_containers/food/snacks/grown/F = O
|
|
user.drop_item()
|
|
user << "<span class='notice'>You extract some seeds from the [F.name].</span>"
|
|
var/seed = text2path(F.seed)
|
|
var/t_amount = 0
|
|
var/t_max = rand(1,4)
|
|
while(t_amount < t_max)
|
|
var/obj/item/seeds/t_prod = new seed(loc)
|
|
t_prod.species = F.species
|
|
t_prod.lifespan = F.lifespan
|
|
t_prod.endurance = F.endurance
|
|
t_prod.maturation = F.maturation
|
|
t_prod.production = F.production
|
|
t_prod.yield = F.yield
|
|
t_prod.potency = F.potency
|
|
t_amount++
|
|
del(O)
|
|
|
|
else if(istype(O, /obj/item/weapon/grown/))
|
|
var/obj/item/weapon/grown/F = O
|
|
user.drop_item()
|
|
user << "<span class='notice'>You extract some seeds from the [F.name].</span>"
|
|
var/seed = text2path(F.seed)
|
|
var/t_amount = 0
|
|
var/t_max = rand(1,4)
|
|
while(t_amount < t_max)
|
|
var/obj/item/seeds/t_prod = new seed(loc)
|
|
t_prod.species = F.species
|
|
t_prod.lifespan = F.lifespan
|
|
t_prod.endurance = F.endurance
|
|
t_prod.maturation = F.maturation
|
|
t_prod.production = F.production
|
|
t_prod.yield = F.yield
|
|
t_prod.potency = F.potency
|
|
t_amount++
|
|
del(O)
|
|
|
|
else if(istype(O, /obj/item/stack/tile/grass))
|
|
var/obj/item/stack/tile/grass/S = O
|
|
user << "<span class='notice'>You extract some seeds from the [S.name].</span>"
|
|
S.use(1)
|
|
new /obj/item/seeds/grassseed(loc)
|
|
|
|
return |