diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index ba1717485e..3fe719c9f2 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -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) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 95d3a7993b..5ab7f62d65 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -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, "You cannot slice [src] here! You need a table or at least a tray.") - 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) diff --git a/code/modules/food_and_drinks/food/snacks_other.dm b/code/modules/food_and_drinks/food/snacks_other.dm index 7cfce5419d..3cce0f46c9 100644 --- a/code/modules/food_and_drinks/food/snacks_other.dm +++ b/code/modules/food_and_drinks/food/snacks_other.dm @@ -475,4 +475,13 @@ icon_state = "butter" list_reagents = list("nutriment" = 5) filling_color = "#FFD700" - tastes = list("butter" = 1) \ No newline at end of file + 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) \ No newline at end of file diff --git a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm index aa60840cd0..168dc120e0 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm @@ -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 diff --git a/code/modules/food_and_drinks/kitchen_machinery/processor.dm b/code/modules/food_and_drinks/kitchen_machinery/processor.dm index 4a2f0948d9..14486a867e 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/processor.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/processor.dm @@ -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) ..() diff --git a/code/modules/hydroponics/grown/onion.dm b/code/modules/hydroponics/grown/onion.dm new file mode 100644 index 0000000000..07b7deea38 --- /dev/null +++ b/code/modules/hydroponics/grown/onion.dm @@ -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) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 1a7c33a4ab..e72c8a10a1 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -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 diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 57caa35c42..b282d9894a 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -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)) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 839535f6c7..a05eb7b9d3 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -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 diff --git a/code/modules/reagents/chemistry/reagents/food_reagents.dm b/code/modules/reagents/chemistry/reagents/food_reagents.dm index 550b27cd11..f0db6e5dba 100644 --- a/code/modules/reagents/chemistry/reagents/food_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/food_reagents.dm @@ -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, "Your eye sockets feel wet.") + else + if(!M.eye_blurry) + to_chat(M, "Tears well up in your eyes!") + 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, "Your eyes sting!") + M.blind_eyes(2) + + ////Lavaland Flora Reagents//// diff --git a/icons/obj/food/food.dmi b/icons/obj/food/food.dmi index e7c0e8d263..863f447e93 100644 Binary files a/icons/obj/food/food.dmi and b/icons/obj/food/food.dmi differ diff --git a/icons/obj/hydroponics/growing_vegetables.dmi b/icons/obj/hydroponics/growing_vegetables.dmi index 070d3531a2..9fc1520175 100644 Binary files a/icons/obj/hydroponics/growing_vegetables.dmi and b/icons/obj/hydroponics/growing_vegetables.dmi differ diff --git a/icons/obj/hydroponics/harvest.dmi b/icons/obj/hydroponics/harvest.dmi index 55a06a36fa..0aff0a2cbd 100644 Binary files a/icons/obj/hydroponics/harvest.dmi and b/icons/obj/hydroponics/harvest.dmi differ diff --git a/icons/obj/hydroponics/seeds.dmi b/icons/obj/hydroponics/seeds.dmi index 34c2c270a8..18bd0cc4e9 100644 Binary files a/icons/obj/hydroponics/seeds.dmi and b/icons/obj/hydroponics/seeds.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 11a60bddb3..46bee1eb18 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -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"