Merge pull request #1634 from Citadel-Station-13/upstream-merge-28414
[MIRROR] Adds onions
@@ -960,7 +960,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
|
||||
/obj/item/seeds/cabbage = 3,/obj/item/seeds/carrot = 3,/obj/item/seeds/cherry = 3,/obj/item/seeds/chanter = 3,
|
||||
/obj/item/seeds/chili = 3,/obj/item/seeds/cocoapod = 3,/obj/item/seeds/coffee = 3,/obj/item/seeds/corn = 3,
|
||||
/obj/item/seeds/eggplant = 3,/obj/item/seeds/grape = 3,/obj/item/seeds/grass = 3,/obj/item/seeds/lemon = 3,
|
||||
/obj/item/seeds/lime = 3,/obj/item/seeds/orange = 3,/obj/item/seeds/potato = 3,/obj/item/seeds/poppy = 3,
|
||||
/obj/item/seeds/lime = 3,/obj/item/seeds/onion = 3,/obj/item/seeds/orange = 3,/obj/item/seeds/potato = 3,/obj/item/seeds/poppy = 3,
|
||||
/obj/item/seeds/pumpkin = 3,/obj/item/seeds/replicapod = 3,/obj/item/seeds/wheat/rice = 3,/obj/item/seeds/soya = 3,/obj/item/seeds/sunflower = 3,
|
||||
/obj/item/seeds/tea = 3,/obj/item/seeds/tobacco = 3,/obj/item/seeds/tomato = 3,
|
||||
/obj/item/seeds/tower = 3,/obj/item/seeds/watermelon = 3,/obj/item/seeds/wheat = 3,/obj/item/seeds/whitebeet = 3)
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/proc/slice(accuracy, obj/item/weapon/W, mob/user)
|
||||
if((slices_num <= 0 || !slices_num) || !slice_path) //is the food sliceable?
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if ( \
|
||||
!isturf(src.loc) || \
|
||||
@@ -191,7 +191,7 @@
|
||||
!(locate(/obj/item/weapon/storage/bag/tray) in src.loc) \
|
||||
)
|
||||
to_chat(user, "<span class='warning'>You cannot slice [src] here! You need a table or at least a tray.</span>")
|
||||
return 1
|
||||
return FALSE
|
||||
|
||||
var/slices_lost = 0
|
||||
if (accuracy >= IS_SHARP_ACCURATE)
|
||||
@@ -211,6 +211,7 @@
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/slice = new slice_path (loc)
|
||||
initialize_slice(slice, reagents_per_slice)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/proc/initialize_slice(obj/item/weapon/reagent_containers/food/snacks/slice, reagents_per_slice)
|
||||
slice.create_reagents(slice.volume)
|
||||
|
||||
@@ -475,4 +475,13 @@
|
||||
icon_state = "butter"
|
||||
list_reagents = list("nutriment" = 5)
|
||||
filling_color = "#FFD700"
|
||||
tastes = list("butter" = 1)
|
||||
tastes = list("butter" = 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/onionrings
|
||||
name = "onion rings"
|
||||
desc = "Onion slices coated in batter."
|
||||
icon_state = "onionrings"
|
||||
list_reagents = list("nutriment" = 3)
|
||||
filling_color = "#C0C9A0"
|
||||
gender = PLURAL
|
||||
tastes = list("batter" = 3, "onion" = 1)
|
||||
@@ -15,8 +15,7 @@
|
||||
var/max_n_of_items = 10 // whatever fat fuck made this a global var needs to look at themselves in the mirror sometime
|
||||
var/efficiency = 0
|
||||
|
||||
|
||||
// see code/modules/food/recipes_microwave.dm for recipes
|
||||
//Microwaving doesn't use recipes, instead it calls the microwave_act of the objects. For food, this creates something based on the food's cooked_type
|
||||
|
||||
/*******************
|
||||
* Initialising
|
||||
|
||||
@@ -126,8 +126,6 @@
|
||||
input = /obj/item/weapon/reagent_containers/food/snacks/grown/parsnip
|
||||
output = /obj/item/weapon/reagent_containers/food/snacks/roastparsnip
|
||||
|
||||
|
||||
|
||||
/* mobs */
|
||||
/datum/food_processor_process/mob/process_food(loc, what, processor)
|
||||
..()
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/obj/item/seeds/onion
|
||||
name = "pack of onion seeds"
|
||||
desc = "These seeds grow into onions."
|
||||
icon_state = "seed-onion"
|
||||
species = "onion"
|
||||
plantname = "Onion Sprouts"
|
||||
product = /obj/item/weapon/reagent_containers/food/snacks/grown/onion
|
||||
lifespan = 20
|
||||
maturation = 3
|
||||
production = 4
|
||||
yield = 6
|
||||
endurance = 25
|
||||
growthstages = 3
|
||||
weed_chance = 3
|
||||
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
|
||||
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
|
||||
mutatelist = list(/obj/item/seeds/onion/red)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/onion
|
||||
seed = /obj/item/seeds/onion
|
||||
name = "onion"
|
||||
desc = "Nothing to cry over."
|
||||
icon_state = "onion"
|
||||
filling_color = "#C0C9A0"
|
||||
bitesize_mod = 2
|
||||
tastes = list("onions" = 1)
|
||||
slice_path = /obj/item/weapon/reagent_containers/food/snacks/onion_slice
|
||||
slices_num = 2
|
||||
|
||||
/obj/item/seeds/onion/red
|
||||
name = "pack of red onion seeds"
|
||||
desc = "For growing exceptionally potent onions."
|
||||
icon_state = "seed-onionred"
|
||||
species = "onion_red"
|
||||
plantname = "Red Onion Sprouts"
|
||||
weed_chance = 1
|
||||
product = /obj/item/weapon/reagent_containers/food/snacks/grown/onion/red
|
||||
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1, "tearjuice" = 0.05)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/onion/red
|
||||
seed = /obj/item/seeds/onion/red
|
||||
name = "red onion"
|
||||
desc = "Purple despite the name."
|
||||
icon_state = "onion_red"
|
||||
filling_color = "#C29ACF"
|
||||
slice_path = /obj/item/weapon/reagent_containers/food/snacks/onion_slice/red
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/onion/slice(accuracy, obj/item/weapon/W, mob/user)
|
||||
var/datum/effect_system/smoke_spread/chem/S = new //Since the onion is destroyed when it's sliced,
|
||||
var/splat_location = get_turf(src) //we need to set up the smoke beforehand
|
||||
S.attach(splat_location)
|
||||
S.set_up(reagents, 0, splat_location, 0)
|
||||
if(..())
|
||||
S.start()
|
||||
return TRUE
|
||||
qdel(S)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/onion_slice
|
||||
name = "onion slices"
|
||||
desc = "Rings, not for wearing."
|
||||
icon_state = "onionslice"
|
||||
list_reagents = list("nutriment" = 5, "vitamin" = 2)
|
||||
filling_color = "#C0C9A0"
|
||||
gender = PLURAL
|
||||
cooked_type = /obj/item/weapon/reagent_containers/food/snacks/onionrings
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/onion_slice/red
|
||||
name = "red onion slices"
|
||||
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)
|
||||
@@ -379,10 +379,6 @@
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/proc/is_mouth_covered(head_only = 0, mask_only = 0)
|
||||
if( (!mask_only && head && (head.flags_cover & HEADCOVERSMOUTH)) || (!head_only && wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH)) )
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/get_standard_pixel_y_offset(lying = 0)
|
||||
if(lying)
|
||||
return -6
|
||||
|
||||
@@ -35,6 +35,18 @@
|
||||
number += E.bang_protect
|
||||
return number
|
||||
|
||||
/mob/living/carbon/is_mouth_covered(head_only = 0, mask_only = 0)
|
||||
if( (!mask_only && head && (head.flags_cover & HEADCOVERSMOUTH)) || (!head_only && wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH)) )
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/is_eyes_covered(check_glasses = 1, check_head = 1, check_mask = 1)
|
||||
if(check_glasses && glasses && (glasses.flags_cover & GLASSESCOVERSEYES))
|
||||
return TRUE
|
||||
if(check_head && head && (head.flags_cover & HEADCOVERSEYES))
|
||||
return TRUE
|
||||
if(check_mask && wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH))
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/check_projectile_dismemberment(obj/item/projectile/P, def_zone)
|
||||
var/obj/item/bodypart/affecting = get_bodypart(def_zone)
|
||||
if(affecting && affecting.dismemberable && affecting.get_damage() >= (affecting.max_damage - P.dismemberment))
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
/mob/living/proc/getarmor(def_zone, type)
|
||||
return 0
|
||||
|
||||
//this returns the mob's protection against eye damage (number between -1 and 2)
|
||||
//this returns the mob's protection against eye damage (number between -1 and 2) from bright lights
|
||||
/mob/living/proc/get_eye_protection()
|
||||
return 0
|
||||
|
||||
@@ -33,6 +33,12 @@
|
||||
/mob/living/proc/get_ear_protection()
|
||||
return 0
|
||||
|
||||
/mob/living/proc/is_mouth_covered(head_only = 0, mask_only = 0)
|
||||
return FALSE
|
||||
|
||||
/mob/living/proc/is_eyes_covered(check_glasses = 1, check_head = 1, check_mask = 1)
|
||||
return FALSE
|
||||
|
||||
/mob/living/proc/on_hit(obj/item/projectile/P)
|
||||
return
|
||||
|
||||
|
||||
@@ -532,6 +532,44 @@
|
||||
color = "#DFDFDF"
|
||||
taste_description = "mayonnaise"
|
||||
|
||||
/datum/reagent/consumable/tearjuice
|
||||
name = "Tear Juice"
|
||||
id = "tearjuice"
|
||||
description = "A blinding substance extracted from certain onions."
|
||||
color = "#c0c9a0"
|
||||
taste_description = "bitterness"
|
||||
|
||||
/datum/reagent/consumable/tearjuice/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
if(!istype(M))
|
||||
return
|
||||
var/unprotected = FALSE
|
||||
switch(method)
|
||||
if(INGEST)
|
||||
unprotected = TRUE
|
||||
if(INJECT)
|
||||
unprotected = FALSE
|
||||
else //Touch or vapor
|
||||
if(!M.is_mouth_covered() && !M.is_eyes_covered())
|
||||
unprotected = TRUE
|
||||
if(unprotected)
|
||||
if(!M.getorganslot("eye_sight")) //can't blind somebody with no eyes
|
||||
to_chat(M, "<span class = 'notice'>Your eye sockets feel wet.</span>")
|
||||
else
|
||||
if(!M.eye_blurry)
|
||||
to_chat(M, "<span class = 'warning'>Tears well up in your eyes!</span>")
|
||||
M.blind_eyes(2)
|
||||
M.blur_eyes(5)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/tearjuice/on_mob_life(mob/living/M)
|
||||
..()
|
||||
if(M.eye_blurry) //Don't worsen vision if it was otherwise fine
|
||||
M.blur_eyes(4)
|
||||
if(prob(10))
|
||||
to_chat(M, "<span class = 'warning'>Your eyes sting!</span>")
|
||||
M.blind_eyes(2)
|
||||
|
||||
|
||||
////Lavaland Flora Reagents////
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
@@ -1423,6 +1423,7 @@
|
||||
#include "code\modules\hydroponics\grown\misc.dm"
|
||||
#include "code\modules\hydroponics\grown\mushrooms.dm"
|
||||
#include "code\modules\hydroponics\grown\nettle.dm"
|
||||
#include "code\modules\hydroponics\grown\onion.dm"
|
||||
#include "code\modules\hydroponics\grown\potato.dm"
|
||||
#include "code\modules\hydroponics\grown\pumpkin.dm"
|
||||
#include "code\modules\hydroponics\grown\random.dm"
|
||||
|
||||