code:
/datum/holiday
	var/name = "Bugsgiving"
	//Right now, only holidays that take place on a certain day or within a time period are supported
	//It would be nice to support things like "the second monday in march" or "the first sunday after the second sunday in june"
	var/begin_day = 1
	var/begin_month = 0
	var/end_day = 0 // Default of 0 means the holiday lasts a single day
	var/end_month = 0

// This proc gets run before the game starts when the holiday is activated. Do festive shit here.
/datum/holiday/proc/celebrate()

// When the round starts, this proc is ran to get a text message to display to everyone to wish them a happy holiday
/datum/holiday/proc/greet()
	return "Have a happy [name]!"

// Returns special prefixes for the station name on certain days. You wind up with names like "Christmas Object Epsilon". See new_station_name()
/datum/holiday/proc/getStationPrefix()
	//get the first word of the Holiday and use that
	var/i = findtext(name," ",1,0)
	return copytext(name,1,i)

// Return 1 if this holidy should be celebrated today
/datum/holiday/proc/shouldCelebrate(dd, mm, yy)
	if(!end_day)
		end_day = begin_day
	if(!end_month)
		end_month = begin_month

	if(end_month > begin_month) //holiday spans multiple months in one year
		if(mm == end_month) //in final month
			if(dd <= end_day)
				return 1

		else if(mm == begin_month)//in first month
			if(dd >= begin_day)
				return 1

		else if(mm in begin_month to end_month) //holiday spans 3+ months and we're in the middle, day doesn't matter at all
			return 1

	else if(end_month == begin_month) // starts and stops in same month, simplest case
		if(mm == begin_month && (dd in begin_day to end_day))
			return 1

	else // starts in one year, ends in the next
		if(mm >= begin_month && dd >= begin_day) // Holiday ends next year
			return 1
		if(mm <= end_month && dd <= end_day) // Holiday started last year
			return 1

	return 0

// The actual holidays

/datum/holiday/new_year
	name = NEW_YEAR
	begin_day = 30 // 1 day early
	begin_month = DECEMBER
	end_day = 5 //4 days extra
	end_month = JANUARY

/datum/holiday/groundhog
	name = "Groundhog Day"
	begin_day = 2
	begin_month = FEBRUARY

/datum/holiday/valentines
	name = VALENTINES
	begin_day = 9 //6 days early
	begin_month = FEBRUARY
	end_day = 15 //1 day extra

/datum/holiday/birthday
	name = "Birthday of Space Station 13"
	begin_day = 16
	begin_month = FEBRUARY

/datum/holiday/birthday/greet()
	return "Say 'Happy Birthday' to Space Station 13, first publicly playable on February 16th, 2003!"

/datum/holiday/random_kindness
	name = "Random Acts of Kindness Day"
	begin_day = 17
	begin_month = FEBRUARY

/datum/holiday/random_kindness/greet()
	return "Go do some random acts of kindness for a stranger!" //haha yeah right

/datum/holiday/pi
	name = "Pi Day"
	begin_day = 14
	begin_month = MARCH

/datum/holiday/no_this_is_patrick
	name = "St. Patrick's Day"
	begin_day = 17
	begin_month = MARCH

/datum/holiday/april_fools
	name = APRIL_FOOLS
	begin_day = 1
	begin_month = APRIL
	end_day = 2 //1 day extra only because this shit just gets annoying fast

/datum/holiday/fourtwenty
	name = "Four-Twenty"
	begin_day = 20
	begin_month = APRIL

/datum/holiday/earth
	name = "Earth Day"
	begin_day = 22
	begin_month = APRIL

/datum/holiday/labor
	name = "Labor Day"
	begin_day = 1
	begin_month = MAY

/datum/holiday/firefighter
	name = "Firefighter's Day"
	begin_day = 4
	begin_month = MAY

// No holidays in June :'(

/datum/holiday/doctor
	name = "Doctor's Day"
	begin_day = 1
	begin_month = JULY

/datum/holiday/UFO
	name = "UFO Day"
	begin_day = 2
	begin_month = JULY

/datum/holiday/writer
	name = "Writer's Day"
	begin_day = 8
	begin_month = JULY

/datum/holiday/friendship
	name = "Friendship Day"
	begin_day = 30
	begin_month = JULY

/datum/holiday/friendship/greet()
	return "Have a magical [name]!"

/datum/holiday/beer
	name = "Beer Day"
	begin_day = 5
	begin_month = AUGUST

/datum/holiday/pirate
	name = "Talk-Like-a-Pirate Day"
	begin_day = 19
	begin_month = SEPTEMBER

/datum/holiday/pirate/greet()
	return "Ye be talkin' like a pirate today or else ye'r walkin' tha plank, matey!"

/datum/holiday/questions
	name = "Stupid-Questions Day"
	begin_day = 28
	begin_month = SEPTEMBER

/datum/holiday/questions/greet()
	return "Are you having a happy [name]?"

/datum/holiday/animal
	name = "Animal's Day"
	begin_day = 4
	begin_month = OCTOBER

/datum/holiday/smile
	name = "Smiling Day"
	begin_day = 7
	begin_month = OCTOBER

/datum/holiday/boss
	name = "Boss' Day"
	begin_day = 16
	begin_month = OCTOBER

/datum/holiday/halloween
	name = HALLOWEEN
	begin_day = 24 //7 days early
	begin_month = OCTOBER
	end_day = 7 //7 days extra
	end_month = NOVEMBER

/datum/holiday/halloween/greet()
	return "Have a spooky Halloween!"

/datum/holiday/vegan
	name = "Vegan Day"
	begin_day = 1
	begin_month = NOVEMBER

/datum/holiday/kindness
	name = "Kindness Day"
	begin_day = 13
	begin_month = NOVEMBER

/datum/holiday/flowers
	name = "Flowers Day"
	begin_day = 19
	begin_month = NOVEMBER

/datum/holiday/hello
	name = "Saying-'Hello' Day"
	begin_day = 21
	begin_month = NOVEMBER

/datum/holiday/hello/greet()
	return "[pick(list("Aloha", "Bonjour", "Hello", "Hi", "Greetings", "Salutations", "Bienvenidos", "Hola", "Howdy"))]! " + ..()

/datum/holiday/human_rights
	name = "Human-Rights Day"
	begin_day = 10
	begin_month = DECEMBER

/datum/holiday/monkey
	name = "Monkey Day"
	begin_day = 14
	begin_month = DECEMBER

/datum/holiday/xmas
	name = CHRISTMAS
	begin_day = 18 //7 days early
	begin_month = DECEMBER
	end_day = 8 //14 days extra, christmas is important
	end_month = JANUARY

/datum/holiday/xmas/greet()
	return "Have a merry Christmas!"

/datum/holiday/boxing
	name = "Boxing Day"
	begin_day = 26
	begin_month = DECEMBER

/datum/holiday/friday_thirteenth
	name = "Friday the 13th"

/datum/holiday/friday_thirteenth/shouldCelebrate(dd, mm, yy)
	if(dd == 13)
		if(time2text(world.timeofday, "DDD") == "Fri")
			return 1
	return 0

/datum/holiday/friday_thirteenth/getStationPrefix()
	return pick("Mike","Friday","Evil","Myers","Murder","Deathly","Stabby")

/datum/holiday/easter
	name = EASTER
	var/const/days_early = 1 //to make editing the holiday easier
	var/const/days_extra = 6

/datum/holiday/easter/shouldCelebrate(dd, mm, yy)
// Easter's celebration day is as snowflakey as Uhangi's code

	if(!begin_month)

		var/yy_string = "[yy]"
// year = days after March 22that Easter falls on that year.
// For 2015 Easter is on April 5th, so 2015 = 14 since the 5th is 14 days past the 22nd
// If it's 2040 and this is still in use, invent a time machine and teach me a better way to do this. Also tell us about HL3.
		var/list/easters = list(
		"15" = 14,\
		"16" = 6,\
		"17" = 25,\
		"18" = 10,\
		"19" = 30,\
		"20" = 22,\
		"21" = 13,\
		"22" = 26,\
		"23" = 18,\
		"24" = 9,\
		"25" = 29,\
		"26" = 14,\
		"27" = 6,\
		"28" = 25,\
		"29" = 10,\
		"30" = 30,\
		"31" = 23,\
		"32" = 6,\
		"33" = 26,\
		"34" = 18,\
		"35" = 3,\
		"36" = 22,\
		"37" = 14,\
		"38" = 34,\
		"39" = 19,\
		"40" = 9,\
		)

		begin_day = easters[yy_string]
		if(begin_day <= 9)
			begin_day += 22
			begin_month = MARCH
		else
			begin_day -= 9
			begin_month = APRIL

		end_day = begin_day + days_extra
		end_month = begin_month
		if(end_day >= 32 && end_month == MARCH) //begins in march, ends in april
			end_day -= 31
			end_month++
		if(end_day >= 31 && end_month == APRIL) //begins in april, ends in june
			end_day -= 30
			end_month++

		begin_day -= days_early
		if(begin_day <= 0)
			if(begin_month == APRIL)
				begin_day += 31
				begin_month-- //begins in march, ends in april

//	world << "Easter calculates to be on [begin_day] of [begin_month] ([days_early] early) to [end_day] of [end_month] ([days_extra] extra) for 20[yy]"
	return ..()


code:
/obj/machinery/biogenerator
	name = "Biogenerator"
	desc = "Converts plants into biomass, which can be used to construct useful items."
	icon = 'icons/obj/biogenerator.dmi'
	icon_state = "biogen-empty"
	density = 1
	anchored = 1
	use_power = 1
	idle_power_usage = 40
	var/processing = 0
	var/obj/item/weapon/reagent_containers/glass/beaker = null
	var/points = 0
	var/menustat = "menu"
	var/efficiency = 0
	var/productivity = 0
	var/max_items = 40

/obj/machinery/biogenerator/New()
		..()
		create_reagents(1000)
		component_parts = list()
		component_parts += new /obj/item/weapon/circuitboard/biogenerator(null)
		component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
		component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
		component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
		component_parts += new /obj/item/stack/cable_coil(null, 1)
		RefreshParts()

/obj/machinery/biogenerator/RefreshParts()
	var/E = 0
	var/P = 0
	var/max_storage = 40
	for(var/obj/item/weapon/stock_parts/matter_bin/B in component_parts)
		P += B.rating
		max_storage = 40 * B.rating
	for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
		E += M.rating
	efficiency = E
	productivity = P
	max_items = max_storage

/obj/machinery/biogenerator/on_reagent_change()			//When the reagents change, change the icon as well.
	update_icon()

/obj/machinery/biogenerator/update_icon()
	if(panel_open)
		icon_state = "biogen-empty-o"
	else if(!src.beaker)
		icon_state = "biogen-empty"
	else if(!src.processing)
		icon_state = "biogen-stand"
	else
		icon_state = "biogen-work"
	return

/obj/machinery/biogenerator/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
	if(istype(O, /obj/item/weapon/reagent_containers/glass) && !panel_open)
		if(beaker)
			user << "A container is already loaded into the machine."
		else
			user.unEquip(O)
			O.loc = src
			beaker = O
			user << "You add the container to the machine."
			updateUsrDialog()
	else if(processing)
		user << "The biogenerator is currently processing."
	else if(istype(O, /obj/item/weapon/storage/bag/plants))
		var/i = 0
		for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
			i++
		if(i >= max_items)
			user << "The biogenerator is already full! Activate it."
		else
			for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
				if(i >= max_items)
					break
				G.loc = src
				i++
			if(i<max_items)
				user << "You empty the plant bag into the biogenerator."
			else if(O.contents.len == 0)
				user << "You empty the plant bag into the biogenerator, filling it to its capacity."
			else
				user << "You fill the biogenerator to its capacity."

	else if(!istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown))
		user << "You cannot put this in [src.name]!"
	else
		var/i = 0
		for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
			i++
		if(i >= max_items)
			user << "The biogenerator is full! Activate it."
		else
			user.unEquip(O)
			O.loc = src
			user << "You put [O.name] in [src.name]"

	if(!processing)
		if(default_deconstruction_screwdriver(user, "biogen-empty-o", "biogen-empty", O))
			if(beaker)
				var/obj/item/weapon/reagent_containers/glass/B = beaker
				B.loc = loc
				beaker = null

	if(exchange_parts(user, O))
		return

	default_deconstruction_crowbar(O)

	update_icon()
	return

/obj/machinery/biogenerator/interact(mob/user as mob)
	if(stat & BROKEN || panel_open)
		return
	user.set_machine(src)
	var/dat
	if(processing)
		dat += "
Biogenerator is processing! Please wait...

"
	else
		switch(menustat)
			if("nopoints")
				dat += "
You do not have biomass to create products.
Please, put growns into reactor and activate it.
"
				menustat = "menu"
			if("complete")
				dat += "
Operation complete.
"
				menustat = "menu"
			if("void")
				dat += "
Error: No growns inside.
Please, put growns into reactor.
"
				menustat = "menu"
			if("nobeakerspace")
				dat += "
Not enough space left in container. Unable to create product.
"
				menustat = "menu"
		if(beaker)
			dat += "
Biomass: [points] units.

"
			dat += "ActivateDetach Container"
			dat += "
Food:
"
			dat += "
"
			dat += "10 milk: Makex5 ([20/efficiency])
"
			dat += "10 cream: Makex5 ([30/efficiency])
"
			dat += "Milk Carton: Makex5 ([100/efficiency])
"
			dat += "Cream Carton: Makex5 ([300/efficiency])
"
			dat += "Monkey cube: Makex5 ([250/efficiency])"
			dat += "
"
			dat += "
Botany Chemicals:
"
			dat += "
"
			dat += "E-Z-Nutrient: Makex5 ([10/efficiency])
"
			dat += "Left 4 Zed: Makex5 ([20/efficiency])
"
			dat += "Robust Harvest: Makex5 ([25/efficiency])
"
			dat += "Weed Killer: Makex5 ([50/efficiency])
"
			dat += "Pest Killer: Makex5 ([50/efficiency])
"
			dat += "
"
			dat += "
Leather:
"
			dat += "
"
			dat += "Wallet: Make ([100/efficiency])
"
			dat += "Book bag: Make ([200/efficiency])
"
			dat += "Plant bag: Make ([200/efficiency])
"
			dat += "Mining satchel: Make ([200/efficiency])
"
			dat += "Botanical gloves: Make ([250/efficiency])
"
			dat += "Utility belt: Make ([300/efficiency])
"
			dat += "Security belt: Make ([300/efficiency])
"
			dat += "Medical belt: Make ([300/efficiency])
"
			dat += "Janitorial belt: Make ([300/efficiency])
"
			dat += "Bandolier belt: Make ([300/efficiency])
"
			dat += "Shoulder holster: Make ([400/efficiency])
"
			dat += "Leather Satchel: Make ([400/efficiency])
"
			dat += "Leather Jacket: Make ([500/efficiency])
"
			dat += "
"
		else
			dat += "
No container inside, please insert container.
"

	var/datum/browser/popup = new(user, "biogen", name, 350, 520)
	popup.set_content(dat)
	popup.open()
	return

/obj/machinery/biogenerator/attack_hand(mob/user as mob)
	interact(user)

/obj/machinery/biogenerator/proc/activate()
	if (usr.stat != 0)
		return
	if (src.stat != 0) //NOPOWER etc
		return
	if(src.processing)
		usr << "The biogenerator is in the process of working."
		return
	var/S = 0
	for(var/obj/item/weapon/reagent_containers/food/snacks/grown/I in contents)
		S += 5
		if(I.reagents.get_reagent_amount("nutriment") < 0.1)
			points += 1*productivity
		else points += I.reagents.get_reagent_amount("nutriment")*10*productivity
		qdel(I)
	if(S)
		processing = 1
		update_icon()
		updateUsrDialog()
		playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
		use_power(S*30)
		sleep(S+15/productivity)
		processing = 0
		update_icon()
	else
		menustat = "void"
	return

/obj/machinery/biogenerator/proc/check_cost(var/cost)
	if (cost > points)
		menustat = "nopoints"
		return 1
	else
		points -= cost
		processing = 1
		update_icon()
		updateUsrDialog()
		return 0

/obj/machinery/biogenerator/proc/check_container_volume(var/reagent_amount)
	if(beaker.reagents.total_volume + reagent_amount > beaker.reagents.maximum_volume)
		menustat = "nobeakerspace"
		return 1

/obj/machinery/biogenerator/proc/create_product(var/create)
	switch(create)
		if("milk")
			if(check_container_volume(10)) return 0
			else if (check_cost(20/efficiency)) return 0
			else beaker.reagents.add_reagent("milk",10)
		if("cream")
			if(check_container_volume(10)) return 0
			else if (check_cost(30/efficiency)) return 0
			else beaker.reagents.add_reagent("cream",10)
		if("cmilk")
			if (check_cost(100/efficiency)) return 0
			else new/obj/item/weapon/reagent_containers/food/condiment/milk(src.loc)
		if("ccream")
			if (check_cost(300/efficiency)) return 0
			else new/obj/item/weapon/reagent_containers/food/drinks/bottle/cream(src.loc)
		if("meat")
			if (check_cost(250/efficiency)) return 0
			else new/obj/item/weapon/reagent_containers/food/snacks/monkeycube(src.loc)
		if("ez")
			if (check_cost(10/efficiency)) return 0
			else new/obj/item/weapon/reagent_containers/glass/bottle/nutrient/ez(src.loc)
		if("l4z")
			if (check_cost(20/efficiency)) return 0
			else new/obj/item/weapon/reagent_containers/glass/bottle/nutrient/l4z(src.loc)
		if("rh")
			if (check_cost(25/efficiency)) return 0
			else new/obj/item/weapon/reagent_containers/glass/bottle/nutrient/rh(src.loc)
		if("wk")
			if (check_cost(50/efficiency)) return 0
			else new/obj/item/weapon/reagent_containers/glass/bottle/weedkiller(src.loc)
		if("pk")
			if (check_cost(50/efficiency)) return 0
			else new/obj/item/weapon/reagent_containers/glass/bottle/pestkiller(src.loc)
		if("wallet")
			if (check_cost(100/efficiency)) return 0
			else new/obj/item/weapon/storage/wallet(src.loc)
		if("bkbag")
			if (check_cost(200/efficiency)) return 0
			else new/obj/item/weapon/storage/bag/books(src.loc)
		if("ptbag")
			if (check_cost(200/efficiency)) return 0
			else new/obj/item/weapon/storage/bag/plants(src.loc)
		if("mnbag")
			if (check_cost(200/efficiency)) return 0
			else new/obj/item/weapon/storage/bag/ore(src.loc)
		if("gloves")
			if (check_cost(250/efficiency)) return 0
			else new/obj/item/clothing/gloves/botanic_leather(src.loc)
		if("tbelt")
			if (check_cost(300/efficiency)) return 0
			else new/obj/item/weapon/storage/belt/utility(src.loc)
		if("sbelt")
			if (check_cost(300/efficiency)) return 0
			else new/obj/item/weapon/storage/belt/security(src.loc)
		if("mbelt")
			if (check_cost(300/efficiency)) return 0
			else new/obj/item/weapon/storage/belt/medical(src.loc)
		if("jbelt")
			if (check_cost(300/efficiency)) return 0
			else new/obj/item/weapon/storage/belt/janitor(src.loc)
		if("bbelt")
			if (check_cost(300/efficiency)) return 0
			else new/obj/item/weapon/storage/belt/bandolier(src.loc)
		if("sholster")
			if (check_cost(400/efficiency)) return 0
			else new/obj/item/weapon/storage/belt/holster(src.loc)
		if("satchel")
			if (check_cost(400/efficiency)) return 0
			else new/obj/item/weapon/storage/backpack/satchel(src.loc)
		if("jacket")
			if (check_cost(500/efficiency)) return 0
			else new/obj/item/clothing/suit/jacket/leather(src.loc)
		//if("monkey")
		//	if (check_cost(500)) return 0
		//	else new/mob/living/carbon/monkey(src.loc)
	processing = 0
	menustat = "complete"
	update_icon()
	return 1

/obj/machinery/biogenerator/proc/detach()
	if(beaker)
		beaker.loc = src.loc
		beaker = null
		update_icon()

/obj/machinery/biogenerator/Topic(href, href_list)
	if(..() || panel_open)
		return

	usr.set_machine(src)

	if(href_list["activate"])
		activate()
		updateUsrDialog()

	else if(href_list["detach"])
		detach()
		updateUsrDialog()

	else if(href_list["create"])
		var/amount = (text2num(href_list["amount"]))
		var/i = amount
		var/C = href_list["create"]
		if(i <= 0)
			return
		while(i >= 1)
			create_product(C)
			i--
		updateUsrDialog()

	else if(href_list["menu"])
		menustat = "menu"
		updateUsrDialog()

license: mit


code:
// ***********************************************************
// Foods that are produced from hydroponics ~~~~~~~~~~
// Data from the seeds carry over to these grown foods
// ***********************************************************

//Grown foods
//Subclass so we can pass on values
/obj/item/weapon/reagent_containers/food/snacks/grown/
	var/seed = null
	var/plantname = ""
	var/product	//a type path
	var/lifespan = 0
	var/endurance = 0
	var/maturation = 0
	var/production = 0
	var/yield = 0
	var/plant_type = 0
	icon = 'icons/obj/hydroponics/harvest.dmi'
	potency = -1
	dried_type = -1 //bit different. 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.

/obj/item/weapon/reagent_containers/food/snacks/grown/New(newloc, new_potency = 50)
	..()
	potency = new_potency
	pixel_x = rand(-5, 5)
	pixel_y = rand(-5, 5)

	if(dried_type == -1)
		dried_type = src.type

	if(seed && lifespan == 0) //This is for adminspawn or map-placed growns. They get the default stats of their seed type. This feels like a hack but people insist on putting these things on the map...
		var/obj/item/seeds/S = new seed(src)
		lifespan = S.lifespan
		endurance = S.endurance
		maturation = S.maturation
		production = S.production
		yield = S.yield
		qdel(S) //Foods drop their contents when eaten, so delete the default seed.

	add_juice()
	transform *= TransformUsingVariable(potency, 100, 0.5) //Makes the resulting produce's sprite larger or smaller based on potency!

/obj/item/weapon/reagent_containers/food/snacks/grown/proc/add_juice()
	if(reagents)
		return 1
	return 0

/obj/item/weapon/reagent_containers/food/snacks/grown/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
	..()
	if (istype(O, /obj/item/device/analyzer/plant_analyzer))
		var/msg
		msg = "*---------*\n This is \a [src]\n"
		switch(plant_type)
			if(0)
				msg += "- Plant type: Normal plant\n"
			if(1)
				msg += "- Plant type: Weed.  Can grow in nutrient-poor soil.\n"
			if(2)
				msg += "- Plant type: Mushroom.  Can grow in dry soil.\n"
		msg += "- Potency: [potency]\n"
		msg += "- Yield: [yield]\n"
		msg += "- Maturation speed: [maturation]\n"
		msg += "- Production speed: [production]\n"
		msg += "- Endurance: [endurance]\n"
		msg += "- Nutritional value: [reagents.get_reagent_amount("nutriment")]\n"
		msg += "- Other substances: [reagents.total_volume-reagents.get_reagent_amount("nutriment")]\n"
		msg += "*---------*"
		usr << msg
		return
	return

/obj/item/weapon/grown/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
	..()
	if (istype(O, /obj/item/device/analyzer/plant_analyzer))
		var/msg
		msg = "*---------*\n This is \a [src]\n"
		switch(plant_type)
			if(0)
				msg += "- Plant type: Normal plant\n"
			if(1)
				msg += "- Plant type: Weed.  Can grow in nutrient-poor soil.\n"
			if(2)
				msg += "- Plant type: Mushroom.  Can grow in dry soil.\n"
		msg += "- Potency: [potency]\n"
		msg += "- Yield: [yield]\n"
		msg += "- Maturation speed: [maturation]\n"
		msg += "- Production speed: [production]\n"
		msg += "- Endurance: [endurance]\n"
		msg += "*---------*"
		usr << msg
		return

/obj/item/weapon/reagent_containers/food/snacks/grown/corn
	seed = /obj/item/seeds/cornseed
	name = "ear of corn"
	desc = "Needs some butter!"
	icon_state = "corn"
	cooked_type = /obj/item/weapon/reagent_containers/food/snacks/popcorn
	filling_color = "#FFFF00"
	trash = /obj/item/weapon/grown/corncob

/obj/item/weapon/reagent_containers/food/snacks/grown/corn/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 10), 1))
		reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/cherries
	seed = /obj/item/seeds/cherryseed
	name = "cherries"
	desc = "Great for toppings!"
	icon_state = "cherry"
	gender = PLURAL
	filling_color = "#FF0000"

/obj/item/weapon/reagent_containers/food/snacks/grown/cherries/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 15), 1))
		reagents.add_reagent("sugar", 1 + round((potency / 15), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/bluecherries
	seed = /obj/item/seeds/bluecherryseed
	name = "blue cherries"
	desc = "They're cherries that are blue."
	icon_state = "bluecherry"
	filling_color = "#6495ED"

/obj/item/weapon/reagent_containers/food/snacks/grown/bluecherries/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 15), 1))
		reagents.add_reagent("sugar", 1 + round((potency / 50), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/poppy
	seed = /obj/item/seeds/poppyseed
	name = "poppy"
	desc = "Long-used as a symbol of rest, peace, and death."
	icon_state = "poppy"
	slot_flags = SLOT_HEAD
	filling_color = "#FF6347"

/obj/item/weapon/reagent_containers/food/snacks/grown/poppy/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 20), 1))
		reagents.add_reagent("hotline", 3 + round((potency / 10), 1))
		bitesize = 1 + round(reagents.total_volume / 3, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/poppy/lily
	seed = /obj/item/seeds/lilyseed
	name = "lily"
	desc = "A beautiful orange flower"
	icon_state = "lily"
	filling_color = "#FFA500"

/obj/item/weapon/reagent_containers/food/snacks/grown/poppy/geranium
	seed = /obj/item/seeds/geraniumseed
	name = "geranium"
	desc = "A beautiful blue flower"
	icon_state = "geranium"
	filling_color = "#008B8B"

/obj/item/weapon/reagent_containers/food/snacks/grown/harebell
	seed = /obj/item/seeds/harebell
	name = "harebell"
	desc = "\"I'll sweeten thy sad grave: thou shalt not lack the flower that's like thy face, pale primrose, nor the azured hare-bell, like thy veins; no, nor the leaf of eglantine, whom not to slander, out-sweeten'd not thy breath.\""
	icon_state = "harebell"
	slot_flags = SLOT_HEAD
	filling_color = "#E6E6FA"

/obj/item/weapon/reagent_containers/food/snacks/grown/harebell/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 20), 1))
		bitesize = 1 + round(reagents.total_volume / 3, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/potato
	seed = /obj/item/seeds/potatoseed
	name = "potato"
	desc = "Boil 'em! Mash 'em! Stick 'em in a stew!"
	icon_state = "potato"
	filling_color = "#E9967A"

/obj/item/weapon/reagent_containers/food/snacks/grown/potato/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 10), 1))
		reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))
		bitesize = reagents.total_volume

/obj/item/weapon/reagent_containers/food/snacks/grown/potato/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
	..()
	if(istype(W, /obj/item/stack/cable_coil))
		var/obj/item/stack/cable_coil/C = W
		if (C.use(5))
			user << "You add some cable to the potato and slide it inside the battery encasing."
			var/obj/item/weapon/stock_parts/cell/potato/pocell = new /obj/item/weapon/stock_parts/cell/potato(user.loc)
			pocell.maxcharge = src.potency * 10
			pocell.charge = pocell.maxcharge
			qdel(src)
			return
		else
			user << "You need five lengths of cable to make a potato battery."
			return

/obj/item/weapon/reagent_containers/food/snacks/grown/grapes
	seed = /obj/item/seeds/grapeseed
	name = "bunch of grapes"
	desc = "Nutritious!"
	icon_state = "grapes"
	dried_type = /obj/item/weapon/reagent_containers/food/snacks/no_raisin
	filling_color = "#FF1493"

/obj/item/weapon/reagent_containers/food/snacks/grown/grapes/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 10), 1))
		reagents.add_reagent("sugar", 1 + round((potency / 10), 1))
		reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/grapes/green
	seed = /obj/item/seeds/greengrapeseed
	name = "bunch of green grapes"
	desc = "Nutritious!"
	icon_state = "greengrapes"
	dried_type = /obj/item/weapon/reagent_containers/food/snacks/no_raisin
	filling_color = "#7FFF00"

/obj/item/weapon/reagent_containers/food/snacks/grown/grapes/green/add_juice()
	..()
	reagents.add_reagent("salglu_solution", 3 + round((potency / 5), 1))

/obj/item/weapon/reagent_containers/food/snacks/grown/cabbage
	seed = /obj/item/seeds/cabbageseed
	name = "cabbage"
	desc = "Ewwwwwwwwww. Cabbage."
	icon_state = "cabbage"
	filling_color = "#90EE90"

/obj/item/weapon/reagent_containers/food/snacks/grown/cabbage/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 10), 1))
		reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/berries
	seed = /obj/item/seeds/berryseed
	name = "bunch of berries"
	desc = "Nutritious!"
	icon_state = "berrypile"
	gender = PLURAL
	filling_color = "#FF00FF"

/obj/item/weapon/reagent_containers/food/snacks/grown/berries/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 10), 1))
		reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/berries/poison
	seed = /obj/item/seeds/poisonberryseed
	name = "bunch of poison-berries"
	desc = "Taste so good, you could die!"
	icon_state = "poisonberrypile"
	filling_color = "#C71585"

/obj/item/weapon/reagent_containers/food/snacks/grown/berries/poison/add_juice()
	..()
	reagents.add_reagent("toxin", 3 + round(potency / 5, 1))

/obj/item/weapon/reagent_containers/food/snacks/grown/berries/death
	seed = /obj/item/seeds/deathberryseed
	name = "bunch of death-berries"
	desc = "Taste so good, you could die!"
	icon_state = "deathberrypile"
	filling_color = "#708090"

/obj/item/weapon/reagent_containers/food/snacks/grown/berries/death/add_juice()
	..()
	reagents.add_reagent("toxin", 3 + round(potency / 3, 1))
	reagents.add_reagent("lexorin", 1 + round(potency / 5, 1))

/obj/item/weapon/reagent_containers/food/snacks/grown/berries/glow
	seed = /obj/item/seeds/glowberryseed
	name = "bunch of glow-berries"
	desc = "Nutritious!"
	var/on = 1
	var/brightness_on = 3 //luminosity when on
	icon_state = "glowberrypile"
	filling_color = "#7CFC00"

/obj/item/weapon/reagent_containers/food/snacks/grown/berries/glow/New()
	set_light(round(potency / 5,1))
	..()

/obj/item/weapon/reagent_containers/food/snacks/grown/berries/glow/add_juice()
	..()
	reagents.add_reagent("uranium", 3 + round(potency / 5, 1))
	bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/cocoapod
	seed = /obj/item/seeds/cocoapodseed
	name = "cocoa pod"
	desc = "Fattening... Mmmmm... chucklate."
	icon_state = "cocoapod"
	filling_color = "#FFD700"

/obj/item/weapon/reagent_containers/food/snacks/grown/cocoapod/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 10), 1))
		reagents.add_reagent("cocoa", 4 + round((potency / 5), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/vanillapod
	seed = /obj/item/seeds/vanillapodseed
	name = "vanilla pod"
	desc = "Fattening... Mmmmm... vanilla."
	icon_state = "vanillapod"
	filling_color = "#FFD700"

/obj/item/weapon/reagent_containers/food/snacks/grown/vanillapod/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 10), 1))
		reagents.add_reagent("vanilla", 4 + round((potency / 5), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/sugarcane
	seed = /obj/item/seeds/sugarcaneseed
	name = "sugarcane"
	desc = "Sickly sweet."
	icon_state = "sugarcane"
	filling_color = "#FFD700"

/obj/item/weapon/reagent_containers/food/snacks/grown/sugarcane/add_juice()
	if(..())
		reagents.add_reagent("sugar", 4 + round((potency / 5), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia //abstract type
	name = "ambrosia branch"
	desc = "This is a plant."
	icon_state = "ambrosiavulgaris"
	slot_flags = SLOT_HEAD
	filling_color = "#008000"

/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1)
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/vulgaris
	seed = /obj/item/seeds/ambrosiavulgarisseed
	name = "ambrosia vulgaris branch"
	desc = "This is a plant containing various healing chemicals."

/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/vulgaris/add_juice()
	..()
	reagents.add_reagent("space_drugs", 1 + round(potency / 8, 1))
	reagents.add_reagent("salglu_solution", 1 + round(potency / 8, 1))
	reagents.add_reagent("salglu_solution", 1 + round(potency / 10, 1))
	reagents.add_reagent("toxin", 1 + round(potency / 10, 1))
	reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))

/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/deus
	seed = /obj/item/seeds/ambrosiadeusseed
	name = "ambrosia deus branch"
	desc = "Eating this makes you feel immortal!"
	icon_state = "ambrosiadeus"
	filling_color = "#008B8B"

/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/deus/add_juice()
	..()
	reagents.add_reagent("omnizine", 1 + round(potency / 8, 1))
	reagents.add_reagent("synaptizine", 1 + round(potency / 8, 1))
	reagents.add_reagent("space_drugs", 1 + round(potency / 10, 1))
	reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))

/obj/item/weapon/reagent_containers/food/snacks/grown/apple
	seed = /obj/item/seeds/appleseed
	name = "apple"
	desc = "It's a little piece of Eden."
	icon_state = "apple"
	filling_color = "#FF4500"

/obj/item/weapon/reagent_containers/food/snacks/grown/apple/add_juice()
	if(..())
		reagents.maximum_volume = 20
		reagents.add_reagent("nutriment", 1 + round((potency / 10), 1))
		reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))
		bitesize = reagents.maximum_volume // Always eat the apple in one

/obj/item/weapon/reagent_containers/food/snacks/grown/apple/poisoned
	seed = /obj/item/seeds/poisonedappleseed
	name = "apple"
	desc = "It's a little piece of Eden."
	icon_state = "apple"

/obj/item/weapon/reagent_containers/food/snacks/grown/apple/poisoned/add_juice()
	..()
	reagents.add_reagent("cyanide", 1 + round((potency / 5), 1))

/obj/item/weapon/reagent_containers/food/snacks/grown/apple/gold
	seed = /obj/item/seeds/goldappleseed
	name = "golden apple"
	desc = "Emblazoned upon the apple is the word 'Kallisti'."
	icon_state = "goldapple"
	filling_color = "#FFD700"

/obj/item/weapon/reagent_containers/food/snacks/grown/apple/gold/add_juice()
	..()
	reagents.add_reagent("gold", 1 + round((potency / 5), 1))

/obj/item/weapon/reagent_containers/food/snacks/grown/apple/gold/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
	. = ..()
	if (istype(O, /obj/item/device/analyzer/plant_analyzer))
		user << "- Mineral Content: [reagents.get_reagent_amount("gold")]%"

/obj/item/weapon/reagent_containers/food/snacks/grown/watermelon
	seed = /obj/item/seeds/watermelonseed
	name = "watermelon"
	desc = "It's full of watery goodness."
	icon_state = "watermelon"
	slice_path = /obj/item/weapon/reagent_containers/food/snacks/watermelonslice
	slices_num = 5
	dried_type = null
	w_class = 3
	filling_color = "#008000"

/obj/item/weapon/reagent_containers/food/snacks/grown/watermelon/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 6), 1))
		reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/holymelon
	seed = /obj/item/seeds/holymelonseed
	name = "holymelon"
	desc = "The water within this melon has been blessed by some deity that's particularly fond of watermelon."
	icon_state = "holymelon"
	filling_color = "#FFD700"
	dried_type = null

/obj/item/weapon/reagent_containers/food/snacks/grown/holymelon/add_juice()
	if(..())
		reagents.add_reagent("holywater", 1 + round((potency / 6), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin
	seed = /obj/item/seeds/pumpkinseed
	name = "pumpkin"
	desc = "It's large and scary."
	icon_state = "pumpkin"
	filling_color = "#FFA500"

/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 6), 1))
		reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
	..()
	if(is_sharp(W))
		user.show_message("You carve a face into [src]!", 1)
		new /obj/item/clothing/head/hardhat/pumpkinhead (user.loc)
		qdel(src)
		return

/obj/item/weapon/reagent_containers/food/snacks/grown/blumpkin
	seed = /obj/item/seeds/blumpkinseed
	name = "blumpkin"
	desc = "When you're making a mess this blumpkin's there to clean you up."
	icon_state = "blumpkin"
	filling_color = "#87CEFA"

/obj/item/weapon/reagent_containers/food/snacks/grown/blumpkin/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 6), 1))
		reagents.add_reagent("ammonia", 1 + round((potency / 6), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/citrus/ //abstract type
	seed = /obj/item/seeds/limeseed
	name = "citrus"
	desc = "It's so sour, your face will twist."
	icon_state = "lime"

/obj/item/weapon/reagent_containers/food/snacks/grown/citrus/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 20), 1))
		reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/citrus/lime
	seed = /obj/item/seeds/limeseed
	name = "lime"
	desc = "It's so sour, your face will twist."
	icon_state = "lime"
	filling_color = "#00FF00"

/obj/item/weapon/reagent_containers/food/snacks/grown/citrus/lemon
	seed = /obj/item/seeds/lemonseed
	name = "lemon"
	desc = "When life gives you lemons, be grateful they aren't limes."
	icon_state = "lemon"
	filling_color = "#FFD700"

/obj/item/weapon/reagent_containers/food/snacks/grown/citrus/orange
	seed = /obj/item/seeds/orangeseed
	name = "orange"
	desc = "It's an tangy fruit."
	icon_state = "orange"
	filling_color = "#FFA500"

/obj/item/weapon/reagent_containers/food/snacks/grown/whitebeet
	seed = /obj/item/seeds/whitebeetseed
	name = "white-beet"
	desc = "You can't beat white-beet."
	icon_state = "whitebeet"
	filling_color = "#F4A460"

/obj/item/weapon/reagent_containers/food/snacks/grown/whitebeet/add_juice()
	if(..())
		reagents.add_reagent("nutriment", round((potency / 20), 1))
		reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))
		reagents.add_reagent("sugar", 1 + round((potency / 5), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/sweetpotato
	seed = /obj/item/seeds/sweetpotatoseed
	name = "sweet potato"
	desc = "It's sweet."
	icon_state = "sweetpotato"

/obj/item/weapon/reagent_containers/food/snacks/grown/sweetpotato/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 10), 1))
		reagents.add_reagent("vitamin", 1 + round((potency / 10), 1))
		reagents.add_reagent("sugar", 1 + round((potency / 10), 1))
		bitesize = reagents.total_volume

/obj/item/weapon/reagent_containers/food/snacks/grown/parsnip
	seed = /obj/item/seeds/parsnipseed
	name = "parsnip"
	desc = "Closely related to carrots."
	icon_state = "parsnip"

/obj/item/weapon/reagent_containers/food/snacks/grown/parsnip/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 20), 1))
		reagents.add_reagent("vitamin", 1 + round((potency / 20), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/redbeet
	seed = /obj/item/seeds/redbeetseed
	name = "red beet"
	desc = "You can't beat red beet."
	icon_state = "redbeet"

/obj/item/weapon/reagent_containers/food/snacks/grown/redbeet/add_juice()
	if(..())
		reagents.add_reagent("nutriment", round((potency / 20), 1))
		reagents.add_reagent("vitamin", 1 + round((potency / 20), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/banana
	seed = /obj/item/seeds/bananaseed
	name = "banana"
	desc = "It's an excellent prop for a clown."
	icon = 'icons/obj/items.dmi'
	icon_state = "banana"
	item_state = "banana"
	trash = /obj/item/weapon/grown/bananapeel
	filling_color = "#FFFF00"

/obj/item/weapon/reagent_containers/food/snacks/grown/banana/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 50), 1))
		reagents.add_reagent("banana", 1 + round((potency / 10), 1))
		reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))
		bitesize = 5

/obj/item/weapon/reagent_containers/food/snacks/grown/banana/suicide_act(mob/user)
	user.visible_message("[user] is aiming the [src.name] at themself! It looks like \he's trying to commit suicide.")
	playsound(loc, 'sound/items/bikehorn.ogg', 50, 1, -1)
	sleep(25)
	user.say("BANG!")
	sleep(25)
	user.visible_message("[user] laughs so hard they begin to suffocate!")
	return (OXYLOSS)

/obj/item/weapon/reagent_containers/food/snacks/grown/mimana
	seed = /obj/item/seeds/mimanaseed
	name = "mimana"
	desc = "It's an excellent prop for a mime."
	icon_state = "mimana"
	filling_color = "#FFFFEE"

/obj/item/weapon/reagent_containers/food/snacks/grown/mimana/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 50), 1))
		reagents.add_reagent("nothing", 2 + round((potency / 10), 1))
		reagents.add_reagent("mutetoxin", 2 + round((potency / 10), 1))
		bitesize = 5

/obj/item/weapon/reagent_containers/food/snacks/grown/chili
	seed = /obj/item/seeds/chiliseed
	name = "chili"
	desc = "It's spicy! Wait... IT'S BURNING ME!!"
	icon_state = "chilipepper"
	filling_color = "#FF0000"

/obj/item/weapon/reagent_containers/food/snacks/grown/chili/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 25), 1))
		reagents.add_reagent("capsaicin", 3+round(potency / 5, 1))
		reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/chili/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
	. = ..()
	if (istype(O, /obj/item/device/analyzer/plant_analyzer))
		user << "- Capsaicin: [reagents.get_reagent_amount("capsaicin")]%"

/obj/item/weapon/reagent_containers/food/snacks/grown/icepepper
	seed = /obj/item/seeds/icepepperseed
	name = "ice-pepper"
	desc = "It's a mutant strain of chili"
	icon_state = "icepepper"
	filling_color = "#0000CD"

/obj/item/weapon/reagent_containers/food/snacks/grown/icepepper/add_juice()
	..()
	reagents.add_reagent("nutriment", 1 + round((potency / 50), 1))
	reagents.add_reagent("vitamin", 1 + round((potency / 50), 1))
	reagents.add_reagent("frostoil", 3+round(potency / 5, 1))
	bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/icepepper/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
	. = ..()
	if (istype(O, /obj/item/device/analyzer/plant_analyzer))
		user << "- Frostoil: [reagents.get_reagent_amount("frostoil")]%"

/obj/item/weapon/reagent_containers/food/snacks/grown/ghost_chili
	seed = /obj/item/seeds/chilighost
	name = "ghost chili"
	desc = "It seems to be vibrating gently."
	icon_state = "ghostchilipepper"
	var/mob/held_mob
	filling_color = "#F8F8FF"

/obj/item/weapon/reagent_containers/food/snacks/grown/ghost_chili/add_juice()
	..()
	reagents.add_reagent("nutriment", 1 + round((potency / 25), 1))
	reagents.add_reagent("capsaicin", 8+round(potency / 2, 1))
	reagents.add_reagent("condensedcapsaicin", 4+round(potency / 4, 1))
	bitesize = 1 + round(reagents.total_volume / 4, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/ghost_chili/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
	. = ..()
	if (istype(O, /obj/item/device/analyzer/plant_analyzer))
		user << "- Capsaicin: [reagents.get_reagent_amount("capsaicin")]%"

/obj/item/weapon/reagent_containers/food/snacks/grown/ghost_chili/attack_hand(mob/user as mob)
	..()
	if( istype(src.loc, /mob) )
		held_mob = src.loc
		SSobj.processing |= src

/obj/item/weapon/reagent_containers/food/snacks/grown/ghost_chili/process()
	if(held_mob && src.loc == held_mob)
		if( (held_mob.l_hand == src) || (held_mob.r_hand == src))
			if(hasvar(held_mob,"gloves") && held_mob:gloves)
				return
			held_mob.bodytemperature += 20 * TEMPERATURE_DAMAGE_COEFFICIENT
			if(prob(10))
				held_mob << "Your hand holding [src] burns!"
	else
		held_mob = null
		..()

/obj/item/weapon/reagent_containers/food/snacks/grown/eggplant
	seed = /obj/item/seeds/eggplantseed
	name = "eggplant"
	desc = "Maybe there's a chicken inside?"
	icon_state = "eggplant"
	filling_color = "#800080"

/obj/item/weapon/reagent_containers/food/snacks/grown/eggplant/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 10), 1))
		reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/shell/
	var/inside_type = null

/obj/item/weapon/reagent_containers/food/snacks/grown/shell/attack_self(mob/user as mob)
	if(inside_type)
		new inside_type(user.loc)
	user.unEquip(src)
	qdel(src)

obj/item/weapon/reagent_containers/food/snacks/grown/shell/eggy
	seed = /obj/item/seeds/eggyseed
	name = "Egg-plant"
	desc = "There MUST be a chicken inside."
	icon_state = "eggyplant"
	inside_type = /obj/item/weapon/reagent_containers/food/snacks/egg
	filling_color = "#F8F8FF"

obj/item/weapon/reagent_containers/food/snacks/grown/shell/eggy/add_juice()
	..()
	reagents.add_reagent("nutriment", 1 + round((potency / 10), 1))
	bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/soybeans
	seed = /obj/item/seeds/soyaseed
	name = "soybeans"
	desc = "It's pretty bland, but oh the possibilities..."
	gender = PLURAL
	icon_state = "soybeans"
	filling_color = "#F0E68C"

/obj/item/weapon/reagent_containers/food/snacks/grown/soybeans/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 20), 1))
		reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/koibeans
	seed = /obj/item/seeds/koiseed
	name = "koibean"
	desc = "Something about these seems fishy."
	icon_state = "koibeans"
	filling_color = "#F0E68C"

/obj/item/weapon/reagent_containers/food/snacks/grown/koibeans/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 30), 1))
		reagents.add_reagent("carpotoxin", 1 + round((potency / 20), 1))
		reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/moonflower
	seed = /obj/item/seeds/moonflowerseed
	name = "moonflower"
	desc = "Store in a location at least 50 yards away from werewolves."
	icon_state = "moonflower"
	slot_flags = SLOT_HEAD
	filling_color = "#E6E6FA"

/obj/item/weapon/reagent_containers/food/snacks/grown/moonflower/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 50), 1))
		reagents.add_reagent("moonshine", 1 + round((potency / 10), 1))
		reagents.add_reagent("vitamin", 1 + round((potency / 50), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

//tomaters
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato
	seed = /obj/item/seeds/tomatoseed
	name = "tomato"
	desc = "I say to-mah-to, you say tom-mae-to."
	icon_state = "tomato"
	var/splat = /obj/effect/decal/cleanable/tomato_smudge
	filling_color = "#FF6347"

/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 10), 1))
		reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/proc/squish(atom/target)
	new splat(src.loc)
	src.visible_message("The [src.name] has been squashed.","You hear a smack.")
	for(var/atom/A in get_turf(target))
		src.reagents.reaction(A)

/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/throw_impact(atom/hit_atom)
	..()
	squish(hit_atom)
	del(src) // Not qdel, because it'll hit other mobs then the floor for runtimes.
	return

/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/killer
	seed = /obj/item/seeds/killertomatoseed
	name = "killer-tomato"
	desc = "I say to-mah-to, you say tom-mae-to... OH GOD IT'S EATING MY LEGS!!"
	icon_state = "killertomato"
	var/awakening = 0
	filling_color = "#FF0000"

/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/killer/attack(mob/M, mob/user, def_zone)
	if(awakening)
		user << "The tomato is twitching and shaking, preventing you from eating it."
		return
	..()

/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/killer/attack_self(mob/user as mob)
	if(awakening || istype(user.loc,/turf/space))
		return
	user << "You begin to awaken the Killer Tomato."
	awakening = 1

	spawn(30)
		if(!gc_destroyed)
			var/mob/living/simple_animal/hostile/killertomato/K = new /mob/living/simple_animal/hostile/killertomato(get_turf(src.loc))
			K.maxHealth += round(endurance / 3)
			K.melee_damage_lower += round(potency / 10)
			K.melee_damage_upper += round(potency / 10)
			K.move_to_delay -= round(production / 50)
			K.health = K.maxHealth
			K.visible_message("The Killer Tomato growls as it suddenly awakens.")
			if(user)
				user.unEquip(src)
			qdel(src)

/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/blood
	seed = /obj/item/seeds/bloodtomatoseed
	name = "blood-tomato"
	desc = "So bloody...so...very...bloody....AHHHH!!!!"
	icon_state = "bloodtomato"
	splat = /obj/effect/gibspawner/generic
	filling_color = "#FF0000"

/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/blood/add_juice(var/loc, var/potency = 10)
	..()
	reagents.add_reagent("blood", 1 + round((potency / 5), 1))

/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/blue
	seed = /obj/item/seeds/bluetomatoseed
	name = "blue-tomato"
	desc = "I say blue-mah-to, you say blue-mae-to."
	icon_state = "bluetomato"
	splat = /obj/effect/decal/cleanable/oil
	filling_color = "#0000FF"

/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/blue/add_juice()
	..()
	reagents.add_reagent("lube", 1 + round((potency / 5), 1))

/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/blue/Crossed(AM as mob|obj)
	if (istype(AM, /mob/living/carbon))
		var/mob/living/carbon/M = AM
		var/stun = Clamp(potency / 10, 1, 10)
		var/weaken = Clamp(potency / 20, 0.5, 5)
		M.slip(stun, weaken, src)

/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/blue/bluespace
	seed = /obj/item/seeds/bluespacetomatoseed
	name = "blue-space tomato"
	desc = "So lubricated, you might slip through space-time."
	icon_state = "bluespacetomato"
	origin_tech = "bluespace=3"

/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/blue/bluespace/add_juice()
	..()
	reagents.add_reagent("singulo", 1 + round((potency / 5), 1))

/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/blue/bluespace/attack_self(var/mob/user)
	squish(user)
	user.drop_item()
	src.visible_message("[user] squashes the [src.name].","You hear a smack.")
	qdel(src)

/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/blue/bluespace/squish(atom/squishee)
	..()
	var/teleport_radius = potency / 10
	if(isliving(squishee))
		new /obj/effect/decal/cleanable/molten_item(squishee.loc) //Leave a pile of goo behind for dramatic effect...
		do_teleport(squishee, get_turf(squishee), teleport_radius)

/obj/item/weapon/reagent_containers/food/snacks/grown/wheat
	seed = /obj/item/seeds/wheatseed
	name = "wheat"
	desc = "Sigh... wheat... a-grain?"
	gender = PLURAL
	icon_state = "wheat"
	filling_color = "#F0E68C"

/obj/item/weapon/reagent_containers/food/snacks/grown/wheat/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 25), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/oat
	seed = /obj/item/seeds/oatseed
	name = "oat"
	desc = "Eat oats, do squats."
	gender = PLURAL
	icon_state = "oat"
	filling_color = "#556B2F"

/obj/item/weapon/reagent_containers/food/snacks/grown/oat/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 25), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/rice
	seed = /obj/item/seeds/riceseed
	name = "rice"
	desc = "Rice to meet you."
	gender = PLURAL
	icon_state = "rice"
	filling_color = "#FAFAD2"

/obj/item/weapon/reagent_containers/food/snacks/grown/rice/add_juice()
	if(..())
		reagents.add_reagent("rice", 1 + round((potency / 6), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/grass
	seed = /obj/item/seeds/grassseed
	name = "grass"
	desc = "Green and lush."
	icon_state = "grassclump"
	filling_color = "#32CD32"

/obj/item/weapon/reagent_containers/food/snacks/grown/grass/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 50), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/grass/attack_self(mob/user as mob)
	user << "You prepare the astroturf."
	var/grassAmt = 1 + round(potency / 50) // The grass we're holding
	for(var/obj/item/weapon/reagent_containers/food/snacks/grown/grass/G in user.loc) // The grass on the floor
		grassAmt += 1 + round(G.potency / 50)
		qdel(G)
	while(grassAmt > 0)
		var/obj/item/stack/tile/GT = new /obj/item/stack/tile/grass(user.loc)
		if(grassAmt >= GT.max_amount)
			GT.amount = GT.max_amount
		else
			GT.amount = grassAmt
			for(var/obj/item/stack/tile/grass/GR in user.loc)
				if(GR != GT && GR.amount < GR.max_amount)
					GR.attackby(GT, user) //we try to transfer all old unfinished stacks to the new stack we created.
		grassAmt -= GT.max_amount
	qdel(src)
	return

/obj/item/weapon/reagent_containers/food/snacks/grown/carpet
	seed = /obj/item/seeds/carpetseed
	name = "carpet"
	desc = "The textile industry's dark secret."
	icon_state = "carpetclump"

/obj/item/weapon/reagent_containers/food/snacks/grown/carpet/attack_self(mob/user as mob)
	user << "You roll out the red carpet."
	var/carpetAmt = 1 + round(potency / 50) // The carpet we're holding
	for(var/obj/item/weapon/reagent_containers/food/snacks/grown/carpet/C in user.loc) // The carpet on the floor
		carpetAmt += 1 + round(C.potency / 50)
		qdel(C)
	while(carpetAmt > 0)
		var/obj/item/stack/tile/CT = new /obj/item/stack/tile/carpet(user.loc)
		if(carpetAmt >= CT.max_amount)
			CT.amount = CT.max_amount
		else
			CT.amount = carpetAmt
			for(var/obj/item/stack/tile/carpet/CA in user.loc)
				if(CA != CT && CA.amount < CA.max_amount)
					CA.attackby(CT, user) //we try to transfer all old unfinished stacks to the new stack we created.
		carpetAmt -= CT.max_amount
	qdel(src)
	return

/obj/item/weapon/reagent_containers/food/snacks/grown/kudzupod
	seed = /obj/item/seeds/kudzuseed
	name = "kudzu pod"
	desc = "Pueraria Virallis: An invasive species with vines that rapidly creep and wrap around whatever they contact."
	icon_state = "kudzupod"
	var/list/mutations = list()
	filling_color = "#6B8E23"

/obj/item/weapon/reagent_containers/food/snacks/grown/kudzupod/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 50), 1))
		reagents.add_reagent("anti_toxin", 1 + round((potency / 25), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/carrot
	seed = /obj/item/seeds/carrotseed
	name = "carrot"
	desc = "It's good for the eyes!"
	icon_state = "carrot"
	filling_color = "#FFA500"

/obj/item/weapon/reagent_containers/food/snacks/grown/carrot/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 20), 1))
		reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))
		reagents.add_reagent("imidazoline", 3+round(potency / 5, 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom
	name="mushroom"

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/reishi
	seed = /obj/item/seeds/reishimycelium
	name = "reishi"
	desc = "Ganoderma lucidum: A special fungus known for its medicinal and stress relieving properties."
	icon_state = "reishi"
	filling_color = "#FF4500"

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/reishi/add_juice()
	..()
	reagents.add_reagent("nutriment", 1)
	reagents.add_reagent("anti_toxin", 3+round(potency / 3, 1))
	reagents.add_reagent("morphine", 3+round(potency / 3, 1))
	bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/reishi/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
	. = ..()
	if (istype(O, /obj/item/device/analyzer/plant_analyzer))
		user << "- Anti-Toxin: [reagents.get_reagent_amount("anti_toxin")]%"
		user << "- Morphine: [reagents.get_reagent_amount("morphine")]%"

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/amanita
	seed = /obj/item/seeds/amanitamycelium
	name = "fly amanita"
	desc = "Amanita Muscaria: Learn poisonous mushrooms by heart. Only pick mushrooms you know."
	icon_state = "amanita"
	filling_color = "#FF0000"

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/amanita/add_juice()
	..()
	reagents.add_reagent("nutriment", 1)
	reagents.add_reagent("amatoxin", 3+round(potency / 3, 1))
	reagents.add_reagent("mushroomhallucinogen", 1 + round(potency / 25, 1))
	bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/amanita/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
	. = ..()
	if (istype(O, /obj/item/device/analyzer/plant_analyzer))
		user << "- Amatoxins: [reagents.get_reagent_amount("amatoxin")]%"
		user << "- Mushroom Hallucinogen: [reagents.get_reagent_amount("mushroomhallucinogen")]%"

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/angel
	seed = /obj/item/seeds/angelmycelium
	name = "destroying angel"
	desc = "Amanita Virosa: Deadly poisonous basidiomycete fungus filled with alpha amatoxins."
	icon_state = "angel"
	filling_color = "#C0C0C0"

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/angel/add_juice()
	..()
	reagents.add_reagent("nutriment", 1 + round((potency / 50), 1))
	reagents.add_reagent("amatoxin", 13+round(potency / 3, 1))
	reagents.add_reagent("mushroomhallucinogen", 1 + round(potency / 25, 1))
	bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/angel/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
	. = ..()
	if (istype(O, /obj/item/device/analyzer/plant_analyzer))
		user << "- Amatoxins: [reagents.get_reagent_amount("amatoxin")]%"
		user << "- Mushroom Hallucinogen: [reagents.get_reagent_amount("mushroomhallucinogen")]%"

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap
	seed = /obj/item/seeds/libertymycelium
	name = "liberty-cap"
	desc = "Psilocybe Semilanceata: Liberate yourself!"
	icon_state = "libertycap"
	filling_color = "#DAA520"

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap/add_juice(var/loc, var/potency = 15)
	..()
	reagents.add_reagent("nutriment", 1 + round((potency / 50), 1))
	reagents.add_reagent("mushroomhallucinogen", 3+round(potency / 5, 1))
	bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
	. = ..()
	if (istype(O, /obj/item/device/analyzer/plant_analyzer))
		user << "- Mushroom Hallucinogen: [reagents.get_reagent_amount("mushroomhallucinogen")]%"

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/plumphelmet
	seed = /obj/item/seeds/plumpmycelium
	name = "plump-helmet"
	desc = "Plumus Hellmus: Plump, soft and s-so inviting~"
	icon_state = "plumphelmet"
	filling_color = "#9370DB"

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/plumphelmet/add_juice()
	..()
	reagents.add_reagent("nutriment", 2+round((potency / 10), 1))
	reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))
	bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom
	seed = /obj/item/seeds/walkingmushroommycelium
	name = "walking mushroom"
	desc = "Plumus Locomotus: The beginning of the great walk."
	icon_state = "walkingmushroom"
	filling_color = "#9370DB"

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom/add_juice()
	..()
	reagents.add_reagent("nutriment", 2+round((potency / 10), 1))
	bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom/attack_self(mob/user as mob)
	if(istype(user.loc,/turf/space))
		return
	var/mob/living/simple_animal/hostile/mushroom/M = new /mob/living/simple_animal/hostile/mushroom(user.loc)
	M.maxHealth += round(endurance / 4)
	M.melee_damage_lower += round(potency / 20)
	M.melee_damage_upper += round(potency / 20)
	M.move_to_delay -= round(production / 50)
	M.health = M.maxHealth
	qdel(src)
	user << "You plant the walking mushroom."

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/chanterelle
	seed = /obj/item/seeds/chantermycelium
	name = "chanterelle cluster"
	desc = "Cantharellus Cibarius: These jolly yellow little shrooms sure look tasty!"
	icon_state = "chanterelle"
	filling_color = "#FFA500"

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/chanterelle/add_juice()
	..()
	reagents.add_reagent("nutriment", 1 + round((potency / 25), 1))
	bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom
	seed = /obj/item/seeds/glowshroom
	name = "glowshroom cluster"
	desc = "Mycena Bregprox: This species of mushroom glows in the dark."
	icon_state = "glowshroom"
	filling_color = "#00FA9A"

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/New(var/loc, var/new_potency = 10)
	..()
	if(lifespan == 0) //basically, if you're spawning these via admin or on the map, then set up some default stats.
		lifespan = 120
		endurance = 30
		maturation = 15
		production = 1
		yield = 3
		potency = 30
		plant_type = 2
	src.set_light(round(potency / 10,1))

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/add_juice()
	..()
	reagents.add_reagent("nutriment", 1 + round((potency / 25), 1))
	reagents.add_reagent("radium", 1 + round((potency / 20), 1))
	bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/attack_self(mob/user as mob)
	if(istype(user.loc,/turf/space))
		return
	var/obj/effect/glowshroom/planted = new /obj/effect/glowshroom(user.loc)
	planted.delay = planted.delay - production * 100 //So the delay goes DOWN with better stats instead of up. :I
	planted.endurance = endurance
	planted.yield = yield
	planted.potency = potency
	qdel(src)
	user << "You plant the glowshroom."

/obj/item/weapon/reagent_containers/food/snacks/grown/shell/moneyfruit
	seed = /obj/item/seeds/cashseed
	name = "Money Fruit"
	desc = "Looks like a lemon with someone buldging from the inside."
	icon_state = "moneyfruit"
	inside_type = null

/obj/item/weapon/reagent_containers/food/snacks/grown/shell/moneyfruit/add_juice()
	..()
	reagents.add_reagent("nutriment", 1 + round((potency / 20), 1))
	bitesize = 1 + round(reagents.total_volume / 2, 1)
	switch(potency)
		if(0 to 10)
			inside_type = /obj/item/weapon/spacecash/
		if(11 to 20)
			inside_type = /obj/item/weapon/spacecash/c10
		if(21 to 30)
			inside_type = /obj/item/weapon/spacecash/c20
		if(31 to 40)
			inside_type = /obj/item/weapon/spacecash/c50
		if(41 to 50)
			inside_type = /obj/item/weapon/spacecash/c100
		if(51 to 60)
			inside_type = /obj/item/weapon/spacecash/c200
		if(61 to 80)
			inside_type = /obj/item/weapon/spacecash/c500
		else
			inside_type = /obj/item/weapon/spacecash/c1000

/obj/item/weapon/reagent_containers/food/snacks/grown/gatfruit
	seed = /obj/item/seeds/gatfruit
	name = "gatfruit"
	desc = "It smells like burning."
	icon_state = "gatfruit"
	origin_tech = "combat=3"
	trash = /obj/item/weapon/gun/projectile/revolver

/obj/item/weapon/reagent_containers/food/snacks/grown/gatfruit/add_juice()
	if(..())
		reagents.add_reagent("sulfur", 1 + round((potency / 10), 1))
		reagents.add_reagent("carbon", 1 + round((potency / 10), 1))
		reagents.add_reagent("nitrogen", 1 + round((potency / 15), 1))
		reagents.add_reagent("potassium", 1 + round((potency / 20), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/coffee //abstract type
	seed = /obj/item/seeds/coffee_arabica_seed
	name = "coffee beans"
	desc = "Dry them out to make coffee."
	icon_state = "coffee_arabica"
	filling_color = "#DC143C"

/obj/item/weapon/reagent_containers/food/snacks/grown/coffee/add_juice()
	if(..())
		reagents.add_reagent("coffeepowder", 1 + round((potency / 10), 2))
		reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))
		bitesize = 1 + round(reagents.total_volume / 2, 1)

/obj/item/weapon/reagent_containers/food/snacks/grown/coffee/arabica
	seed = /obj/item/seeds/coffee_arabica_seed
	name = "coffee arabica beans"
	desc = "Dry them out to make coffee."
	icon_state = "coffee_arabica"

/obj/item/weapon/reagent_containers/food/snacks/grown/coffee/robusta
	seed = /obj/item/seeds/coffee_robusta_seed
	name = "coffee robusta beans"
	desc = "Dry them out to make coffee."
	icon_state = "coffee_robusta"

/obj/item/weapon/reagent_containers/food/snacks/grown/coffee/robusta/add_juice(var/loc, var/potency = 20)
	..()
	reagents.add_reagent("morphine", 1 + round((potency / 20), 1))

/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco
	seed = /obj/item/seeds/tobacco_seed
	name = "tobacco leaves"
	desc = "Dry them out to make some smokes."
	icon_state = "tobacco_leaves"
	filling_color = "#008000"

/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1 + round((potency / 40), 1))
		reagents.add_reagent("nicotine", 1 + round((potency / 40), 1))

/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco/space
	seed = /obj/item/seeds/tobacco_space_seed
	name = "space tobacco leaves"
	desc = "Dry them out to make some space-smokes."
	icon_state = "stobacco_leaves"
	filling_color = "#008000"

/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco/space/add_juice()
	..()
	reagents.add_reagent("dexalin", 1 + round((potency / 20), 1))
	reagents.add_reagent("nicotine", 1 + round((potency / 20), 1))

/obj/item/weapon/reagent_containers/food/snacks/grown/tea //abstract type
	seed = /obj/item/seeds/tea_aspera_seed
	name = "Tea tips"
	desc = "These aromatic tips of the tea plant can be dried to make tea."
	icon_state = "tea_aspera_leaves"

/obj/item/weapon/reagent_containers/food/snacks/grown/tea/add_juice()
	if(..())
		reagents.add_reagent("teapowder", 1 + round((potency / 10), 2))
		reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))

/obj/item/weapon/reagent_containers/food/snacks/grown/tea/aspera
	seed = /obj/item/seeds/tea_aspera_seed
	name = "Tea Aspera tips"
	filling_color = "#008000"

/obj/item/weapon/reagent_containers/food/snacks/grown/tea/astra
	seed = /obj/item/seeds/tea_astra_seed
	name = "Tea Astra tips"
	desc = "These aromatic tips of the tea plant can be dried to make tea."
	icon_state = "tea_astra_leaves"
	filling_color = "#4582B4"

/obj/item/weapon/reagent_containers/food/snacks/grown/tea/astra/add_juice()
	..()
	reagents.add_reagent("tricordrazine", 1 + round((potency / 20), 1))


code:
// **********************
// Other harvested materials from plants (that are not food)
// **********************

/obj/item/weapon/grown // Grown weapons
	name = "grown_weapon"
	icon = 'icons/obj/hydroponics/harvest.dmi'
	var/seed = null
	var/plantname = ""
	var/product	//a type path
	var/lifespan = 0
	var/endurance = 15
	var/maturation = 7
	var/production = 7
	var/yield = 2
	var/potency = 20
	var/plant_type = 0

/obj/item/weapon/grown/New(newloc, new_potency = 50)
	..()
	potency = new_potency
	pixel_x = rand(-5, 5)
	pixel_y = rand(-5, 5)

	transform *= TransformUsingVariable(potency, 100, 0.5)

	if(seed && lifespan == 0) //This is for adminspawn or map-placed growns. They get the default stats of their seed type. This feels like a hack but people insist on putting these things on the map...
		var/obj/item/seeds/S = new seed(src)
		lifespan = S.lifespan
		endurance = S.endurance
		maturation = S.maturation
		production = S.production
		yield = S.yield
		qdel(S) //Foods drop their contents when eaten, so delete the default seed.

	create_reagents(50)
	add_juice()

/obj/item/weapon/grown/proc/add_juice()
	if(reagents)
		return 1
	return 0

/obj/item/weapon/grown/log
	seed = /obj/item/seeds/towermycelium
	name = "tower-cap log"
	desc = "It's better than bad, it's good!"
	icon_state = "logs"
	force = 5
	throwforce = 5
	w_class = 3.0
	throw_speed = 2
	throw_range = 3
	plant_type = 2
	origin_tech = "materials=1"
	attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
	var/plank_type = /obj/item/stack/sheet/mineral/wood
	var/plank_name = "wooden planks"
	var/list/accepted = list(/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco,
	/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco/space,
	/obj/item/weapon/reagent_containers/food/snacks/grown/tea/aspera,
	/obj/item/weapon/reagent_containers/food/snacks/grown/tea/astra,
	/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/vulgaris,
	/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/deus,
	/obj/item/weapon/reagent_containers/food/snacks/grown/wheat)

/obj/item/weapon/grown/log/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
	..()
	if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || (istype(W, /obj/item/weapon/twohanded/fireaxe) && W:wielded) || istype(W, /obj/item/weapon/melee/energy))
		user.show_message("You make [plank_name] out of \the [src]!", 1)
		var/obj/item/stack/plank = new plank_type(user.loc, 1 + round(potency / 25))
		var/old_plank_amount = plank.amount
		for(var/obj/item/stack/ST in user.loc)
			if(ST != plank && istype(ST, plank_type) && ST.amount < ST.max_amount)
				ST.attackby(plank, user) //we try to transfer all old unfinished stacks to the new stack we created.
		if(plank.amount > old_plank_amount)
			user << "You add the newly-formed [plank_name] to the stack. It now contains [plank.amount] [plank_name]."
		qdel(src)

	if(is_type_in_list(W,accepted))
		var/obj/item/weapon/reagent_containers/food/snacks/grown/leaf = W
		if(leaf.dry)
			user.show_message("You wrap \the [W] around the log, turning it into a torch!")
			var/obj/item/device/flashlight/flare/torch/T = new /obj/item/device/flashlight/flare/torch(user.loc)
			usr.unEquip(W)
			usr.put_in_active_hand(T)
			qdel(leaf)
			qdel(src)
			return
		else
			usr << " You must dry this first."

/obj/item/weapon/grown/log/steel
	seed = /obj/item/seeds/steelmycelium
	name = "steel-cap log"
	desc = "It's made of metal."
	icon_state = "steellogs"
	accepted = list()
	plank_type = /obj/item/stack/rods
	plank_name = "rods"

/obj/item/weapon/grown/sunflower // FLOWER POWER!
	seed = /obj/item/seeds/sunflowerseed
	name = "sunflower"
	desc = "It's beautiful! A certain person might beat you to death if you trample these."
	icon_state = "sunflower"
	damtype = "fire"
	force = 0
	slot_flags = SLOT_HEAD
	throwforce = 0
	w_class = 1.0
	throw_speed = 1
	throw_range = 3

/obj/item/weapon/grown/sunflower/attack(mob/M as mob, mob/user as mob)
	M << " [user] smacks you with a sunflower!FLOWER POWER"
	user << " Your sunflower's FLOWER POWER strikes [M]"

/obj/item/weapon/grown/novaflower
	seed = /obj/item/seeds/novaflowerseed
	name = "novaflower"
	desc = "These beautiful flowers have a crisp smokey scent, like a summer bonfire."
	icon_state = "novaflower"
	damtype = "fire"
	force = 0
	slot_flags = SLOT_HEAD
	throwforce = 0
	w_class = 1.0
	throw_speed = 1
	throw_range = 3
	plant_type = 0
	attack_verb = list("roasted", "scorched", "burned")

/obj/item/weapon/grown/novaflower/add_juice()
	if(..())
		reagents.add_reagent("nutriment", 1)
		reagents.add_reagent("capsaicin", round((potency / 3.5), 1))
		reagents.add_reagent("condensedcapsaicin", round((potency / 4), 1))
	force = round((5 + potency / 5), 1)

/obj/item/weapon/grown/novaflower/attack(mob/living/carbon/M as mob, mob/user as mob)
	if(!..()) return
	if(istype(M, /mob/living))
		M << "You are lit on fire from the intense heat of the [name]!"
		M.adjust_fire_stacks(potency / 20)
		M.IgniteMob()

/obj/item/weapon/grown/novaflower/afterattack(atom/A as mob|obj, mob/user as mob,proximity)
	if(!proximity) return
	if(endurance > 0)
		endurance -= rand(1, (endurance / 3) + 1)
	else
		usr << "All the petals have fallen off the [name] from violent whacking."
		usr.unEquip(src)
		qdel(src)

/obj/item/weapon/grown/novaflower/pickup(mob/living/carbon/human/user as mob)
	if(!user.gloves)
		user << "The [name] burns your bare hand!"
		user.adjustFireLoss(rand(1, 5))

/obj/item/weapon/grown/nettle //abstract type
	name = "nettle"
	desc = "It's probably not wise to touch it with bare hands..."
	icon = 'icons/obj/weapons.dmi'
	icon_state = "nettle"
	damtype = "fire"
	force = 15
	hitsound = 'sound/weapons/bladeslice.ogg'
	throwforce = 5
	w_class = 1.0
	throw_speed = 1
	throw_range = 3
	plant_type = 1
	origin_tech = "combat=1"
	attack_verb = list("stung")

/obj/item/weapon/grown/nettle/suicide_act(mob/user)
	user.visible_message("[user] is eating some of the [src.name]! It looks like \he's trying to commit suicide.")
	return (BRUTELOSS|TOXLOSS)

/obj/item/weapon/grown/nettle/pickup(mob/living/user as mob)
	if(!iscarbon(user))
		return 0
	var/mob/living/carbon/C = user
	if(ishuman(user))
		var/mob/living/carbon/human/H = C
		if(H.gloves)
			return 0
		var/organ = ((H.hand ? "l_":"r_") + "arm")
		var/obj/item/organ/limb/affecting = H.get_organ(organ)
		if(affecting.take_damage(0, force))
			H.update_damage_overlays(0)
	else
		C.take_organ_damage(0,force)
	C << "The nettle burns your bare hand!"
	return 1

/obj/item/weapon/grown/nettle/afterattack(atom/A as mob|obj, mob/user as mob,proximity)
	if(!proximity) return
	if(force > 0)
		force -= rand(1, (force / 3) + 1) // When you whack someone with it, leaves fall off
	else
		usr << "All the leaves have fallen off the nettle from violent whacking."
		usr.unEquip(src)
		qdel(src)

/obj/item/weapon/grown/nettle/basic
	seed = /obj/item/seeds/nettleseed

/obj/item/weapon/grown/nettle/basic/add_juice()
	..()
	reagents.add_reagent("sacid", round((potency / 2), 1))
	force = round((5 + potency / 5), 1)

/obj/item/weapon/grown/nettle/death
	seed = /obj/item/seeds/deathnettleseed
	name = "deathnettle"
	desc = "The glowing \black nettle incites rage\black in you just from looking at it!"
	icon_state = "deathnettle"
	force = 30
	throwforce = 15
	origin_tech = "combat=3"

/obj/item/weapon/grown/nettle/death/add_juice()
	..()
	reagents.add_reagent("pacid", round((potency / 2), 1))
	force = round((5 + potency / 2.5), 1)

/obj/item/weapon/grown/nettle/death/pickup(mob/living/carbon/user as mob)
	if(..())
		if(prob(50))
			user.Paralyse(5)
			user << "You are stunned by the Deathnettle when you try picking it up!"

/obj/item/weapon/grown/nettle/death/attack(mob/living/carbon/M as mob, mob/user as mob)
	if(!..()) return
	if(istype(M, /mob/living))
		M << "You are stunned by the powerful acid of the Deathnettle!"
		add_logs(user, M, "attacked", object= "[src.name]")

		M.eye_blurry += force/7
		if(prob(20))
			M.Paralyse(force / 6)
			M.Weaken(force / 15)
		M.drop_item()

/obj/item/weapon/grown/bananapeel
	name = "banana peel"
	desc = "A peel from a banana."
	icon = 'icons/obj/items.dmi'
	icon_state = "banana_peel"
	item_state = "banana_peel"
	w_class = 1.0
	throwforce = 0
	throw_speed = 3
	throw_range = 7

/obj/item/weapon/grown/bananapeel/suicide_act(mob/user)
	user.visible_message("[user] is deliberately slipping on the [src.name]! It looks like \he's trying to commit suicide.")
	playsound(loc, 'sound/misc/slip.ogg', 50, 1, -1)
	return (BRUTELOSS)

/obj/item/weapon/grown/bananapeel/Crossed(AM as mob|obj)
	if (istype(AM, /mob/living/carbon))
		var/mob/living/carbon/M = AM
		var/stun = Clamp(potency / 10, 1, 10)
		var/weaken = Clamp(potency / 20, 0.5, 5)
		M.slip(stun, weaken, src)
		return 1

/obj/item/weapon/grown/bananapeel/specialpeel     //used by /obj/item/clothing/shoes/clown_shoes/banana_shoes
	name = "synthesized banana peel"
	desc = "A synthetic banana peel."

/obj/item/weapon/grown/bananapeel/specialpeel/Crossed(AM)
	if(..())	qdel(src)

/obj/item/weapon/grown/bananapeel/mimanapeel
	name = "mimana peel"
	desc = "A mimana peel."
	icon = 'icons/obj/hydroponics/harvest.dmi'
	icon_state = "mimana_peel"

/obj/item/weapon/grown/corncob
	name = "corn cob"
	desc = "A reminder of meals gone by."
	icon_state = "corncob"
	item_state = "corncob"
	w_class = 1.0
	throwforce = 0
	throw_speed = 3
	throw_range = 7

/obj/item/weapon/grown/corncob/attackby(obj/item/weapon/grown/W as obj, mob/user as mob, params)
	..()
	if(is_sharp(W))
		user << "You use [W] to fashion a pipe out of the corn cob!"
		new /obj/item/clothing/mask/cigarette/pipe/cobpipe (user.loc)
		user.unEquip(src)
		qdel(src)
		return

/obj/item/weapon/grown/snapcorn
	name = "snap corn"
	desc = "A cob with snap pops"
	icon_state = "snapcorn"
	item_state = "corncob"
	w_class = 1.0
	throwforce = 0
	throw_speed = 3
	throw_range = 7
	var/snap_pops = 1

/obj/item/weapon/grown/snapcorn/add_juice()
	..()
	snap_pops = max(round(potency/8), 1)

/obj/item/weapon/grown/snapcorn/attack_self(mob/user as mob)
	..()
	user << "You pick up a snap pops from the cob."
	var/obj/item/toy/snappop/S = new /obj/item/toy/snappop(user.loc)
	if(ishuman(user))
		user.put_in_hands(S)
	snap_pops -= 1
	if(!snap_pops)
		new /obj/item/weapon/grown/corncob(user.loc)
		qdel(src)


code:
// Plant analyzer
/obj/item/device/analyzer/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"
	origin_tech = "magnets=1;biotech=1"

/obj/item/device/analyzer/plant_analyzer/attack_self(mob/user as mob)
	return 0

// *************************************
// Hydroponics Tools
// *************************************

/obj/item/weapon/reagent_containers/spray/weedspray // -- Skie
	desc = "It's a toxic mixture, in spray form, to kill small weeds."
	icon = 'icons/obj/hydroponics/equipment.dmi'
	name = "weed spray"
	icon_state = "weedspray"
	item_state = "spray"
	volume = 100
	flags = OPENCONTAINER
	slot_flags = SLOT_BELT
	throwforce = 0
	w_class = 2.0
	throw_speed = 3
	throw_range = 10

/obj/item/weapon/reagent_containers/spray/weedspray/New()
	..()
	reagents.add_reagent("weedkiller", 100)

/obj/item/weapon/reagent_containers/spray/weedspray/suicide_act(mob/user)
	user.visible_message("[user] is huffing the [src.name]! It looks like \he's trying to commit suicide.")
	return (TOXLOSS)

/obj/item/weapon/reagent_containers/spray/pestspray // -- Skie
	desc = "It's some pest eliminator spray! Do not inhale!"
	icon = 'icons/obj/hydroponics/equipment.dmi'
	name = "pest spray"
	icon_state = "pestspray"
	item_state = "spray"
	volume = 100
	flags = OPENCONTAINER
	slot_flags = SLOT_BELT
	throwforce = 0
	w_class = 2.0
	throw_speed = 3
	throw_range = 10

/obj/item/weapon/reagent_containers/spray/pestspray/New()
	..()
	reagents.add_reagent("pestkiller", 100)

/obj/item/weapon/reagent_containers/spray/pestspray/suicide_act(mob/user)
	viewers(user) << "[user] is huffing the [src.name]! It looks like \he's trying to commit suicide."
	return (TOXLOSS)

/obj/item/weapon/minihoe // -- Numbers
	name = "mini hoe"
	desc = "It's used for removing weeds or scratching your back."
	icon = 'icons/obj/weapons.dmi'
	icon_state = "hoe"
	item_state = "hoe"
	flags = CONDUCT
	force = 5.0
	throwforce = 7.0
	w_class = 2.0
	m_amt = 50
	attack_verb = list("slashed", "sliced", "cut", "clawed")
	hitsound = 'sound/weapons/bladeslice.ogg'

// *************************************
// Nutrient defines for hydroponics
// *************************************

/obj/item/weapon/reagent_containers/glass/bottle/nutrient
	name = "bottle of nutrient"
	icon = 'icons/obj/chemical.dmi'
	icon_state = "bottle16"
	volume = 50
	w_class = 1.0
	amount_per_transfer_from_this = 10
	possible_transfer_amounts = list(1,2,5,10,15,25,50)

/obj/item/weapon/reagent_containers/glass/bottle/nutrient/New()
	..()
	src.pixel_x = rand(-5.0, 5)
	src.pixel_y = rand(-5.0, 5)

/obj/item/weapon/reagent_containers/glass/bottle/nutrient/ez
	name = "bottle of E-Z-Nutrient"
	icon = 'icons/obj/chemical.dmi'
	icon_state = "bottle16"

/obj/item/weapon/reagent_containers/glass/bottle/nutrient/ez/New()
	..()
	reagents.add_reagent("eznutriment", 50)

/obj/item/weapon/reagent_containers/glass/bottle/nutrient/l4z
	name = "bottle of Left 4 Zed"
	icon = 'icons/obj/chemical.dmi'
	icon_state = "bottle18"

/obj/item/weapon/reagent_containers/glass/bottle/nutrient/l4z/New()
	..()
	reagents.add_reagent("left4zednutriment", 50)

/obj/item/weapon/reagent_containers/glass/bottle/nutrient/rh
	name = "bottle of Robust Harvest"
	icon = 'icons/obj/chemical.dmi'
	icon_state = "bottle15"

/obj/item/weapon/reagent_containers/glass/bottle/nutrient/rh/New()
	..()
	reagents.add_reagent("robustharvestnutriment", 50)

/obj/item/weapon/reagent_containers/glass/bottle/weedkiller
	name = "bottle of weed killer"
	icon = 'icons/obj/chemical.dmi'
	icon_state = "bottle19"

/obj/item/weapon/reagent_containers/glass/bottle/weedkiller/New()
	..()
	reagents.add_reagent("weedkiller", 50)

/obj/item/weapon/reagent_containers/glass/bottle/pestkiller
	name = "bottle of pest spray"
	icon = 'icons/obj/chemical.dmi'
	icon_state = "bottle20"

/obj/item/weapon/reagent_containers/glass/bottle/pestkiller/New()
	..()
	reagents.add_reagent("pestkiller", 50)