mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 14:00:18 +01:00
Cooking Fixes Pass 2 (#2024)
This PR is a package of fixes for a few cooking issues, and also (largely unrelated but its been annoying me for weeks) more fixing on the Flash issue. Fixes the cooking sound not being set on cookers Very thoroughly re-examines all interactions with cooking machines and their verbs, adds safety checks, alters contexts as intended. This gets rid of all the problems with mouse/ghost/AI fuckery. Note that AIs can toggle the oven door and the power on cooking machines, this is by design. Animals can remove food from exposed cooking containers, this is also by design. Sets cooking containers to NOREACT, to prevent some issues with recipes being unmakeable because ingredients would become dough. Tweaks oven heat loss a little more Adjusts the mix flag on several potentially problematic recipes to prevent certain undesireable things ending up in finished products (like flour and eggs causing a lump of dough to be ejected from a finished cake) Alters quite a few recipes which used a whole egg as an ingredient, to use egg yolk instead. Partly becase it makes more sense in context, and partly because cooking containers don't support adding whole eggs. There are now no fryer/oven recipes that need an intact egg. Scales up plain bread to be a little closer to the other specialised breads in terms of reagent quantity. Removes a redundant spellburger recipe because item checks use istype And the flash issue: For those who missed it, several months ago we had an issue with an object named "flash" appearing in the rightclick menu anywhere, for anyone with admin/dev powers. It was constantly annoying. After enduring the mysterious thing for months i found the cause, it's a hud element. Setting mouse opacity fixed it. Anyways my fix wasn't comprehensive enough. Several other huds for non human mobs duplicate this thing. So ive set mouse opacity on them too
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
mymob.flash.name = "flash"
|
||||
mymob.flash.screen_loc = ui_entire_screen
|
||||
mymob.flash.layer = 17
|
||||
mymob.flash.mouse_opacity = 0
|
||||
|
||||
mymob.fire = new /obj/screen()
|
||||
mymob.fire.icon = 'icons/mob/screen1_alien.dmi'
|
||||
|
||||
@@ -132,6 +132,7 @@
|
||||
mymob.flash.name = "flash"
|
||||
mymob.flash.screen_loc = ui_entire_screen
|
||||
mymob.flash.layer = 17
|
||||
mymob.flash.mouse_opacity = 0
|
||||
|
||||
if(constructtype)
|
||||
mymob.fire = new /obj/screen()
|
||||
|
||||
@@ -147,6 +147,7 @@ var/obj/screen/robot_inventory
|
||||
mymob.flash.name = "flash"
|
||||
mymob.flash.screen_loc = ui_entire_screen
|
||||
mymob.flash.layer = 17
|
||||
mymob.flash.mouse_opacity = 0
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel()
|
||||
mymob.zone_sel.icon = 'icons/mob/screen1_robot.dmi'
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
var/can_cook_mobs // Whether or not this machine accepts grabbed mobs.
|
||||
var/mobdamagetype = BRUTE // Burn damage for cooking appliances, brute for cereal/candy
|
||||
var/food_color // Colour of resulting food item.
|
||||
var/cooked_sound // Sound played when cooking completes.
|
||||
var/cooked_sound = 'sound/machines/ding.ogg' // Sound played when cooking completes.
|
||||
var/can_burn_food // Can the object burn food that is left inside?
|
||||
var/burn_chance = 10 // How likely is the food to burn?
|
||||
var/list/cooking_objs = list() // List of things being cooked
|
||||
@@ -110,14 +110,18 @@
|
||||
icon_state = off_icon
|
||||
|
||||
/obj/machinery/appliance/verb/toggle_power()
|
||||
set src in view()
|
||||
set name = "Toggle Power"
|
||||
set category = "Object"
|
||||
set category = null
|
||||
set src in view() //So that AI can operate it remotely
|
||||
|
||||
if (!isliving(usr))
|
||||
usr << "Ghosts aren't allowed to toggle power switches"
|
||||
return
|
||||
|
||||
if (isanimal(usr))
|
||||
usr << "You lack the dexterity to do that!"
|
||||
return
|
||||
|
||||
if (usr.stat || usr.restrained() || usr.incapacitated())
|
||||
return
|
||||
|
||||
@@ -140,15 +144,22 @@
|
||||
playsound(src, 'sound/machines/click.ogg', 40, 1)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/appliance/AICtrlClick()
|
||||
toggle_power()
|
||||
|
||||
/obj/machinery/appliance/proc/choose_output()
|
||||
set src in view()
|
||||
set name = "Choose output"
|
||||
set category = "Object"
|
||||
set category = null
|
||||
|
||||
if (!isliving(usr))
|
||||
usr << "Ghosts aren't allowed to mess with cooking machines!"
|
||||
return
|
||||
|
||||
if (isanimal(usr))
|
||||
usr << "You lack the dexterity to do that!"
|
||||
return
|
||||
|
||||
if (usr.stat || usr.restrained() || usr.incapacitated())
|
||||
return
|
||||
|
||||
@@ -558,6 +569,12 @@
|
||||
return 0
|
||||
|
||||
/obj/machinery/appliance/proc/can_remove_items(var/mob/user)
|
||||
if (!Adjacent(user))
|
||||
return 0
|
||||
|
||||
if (isanimal(user))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/appliance/proc/eject(var/datum/cooking_item/CI, var/mob/user = null)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
var/shortname
|
||||
var/max_space = 20//Maximum sum of w-classes of foods in this container at once
|
||||
var/max_reagents = 80//Maximum units of reagents
|
||||
|
||||
flags = OPENCONTAINER | NOREACT
|
||||
var/list/insertable = list(/obj/item/weapon/reagent_containers/food/snacks,
|
||||
/obj/item/weapon/holder,
|
||||
/obj/item/weapon/paper)
|
||||
@@ -48,13 +48,23 @@
|
||||
set category = "Object"
|
||||
set desc = "Removes items from the container. does not remove reagents."
|
||||
|
||||
if (!isliving(usr))
|
||||
usr << "Ghosts can't mess with cooking containers"
|
||||
//Here we only check for ghosts. Animals are intentionally allowed to remove things from oven trays so they can eat it
|
||||
return
|
||||
|
||||
if (!Adjacent(usr))
|
||||
usr << "You can't reach the [src] from there, get closer!"
|
||||
return
|
||||
|
||||
if (!contents.len)
|
||||
usr << span("warning", "Theres nothing in the [src] you can remove!")
|
||||
|
||||
for (var/atom/movable/A in contents)
|
||||
A.forceMove(get_turf(src))
|
||||
|
||||
usr << span("notice", "You remove all the solid items from the [src].")
|
||||
|
||||
/obj/item/weapon/reagent_containers/cooking_container/proc/check_contents()
|
||||
if (contents.len == 0)
|
||||
if (!reagents || reagents.total_volume == 0)
|
||||
@@ -64,6 +74,10 @@
|
||||
return 1//Contains only a single object which can be extracted alone
|
||||
return 2//Contains multiple objects and/or reagents
|
||||
|
||||
/obj/item/weapon/reagent_containers/cooking_container/AltClick(var/mob/user)
|
||||
.=1
|
||||
if(user.stat || user.restrained()) return
|
||||
empty()
|
||||
|
||||
|
||||
//Deletes contents of container.
|
||||
|
||||
@@ -50,24 +50,38 @@
|
||||
|
||||
|
||||
/obj/machinery/appliance/cooker/oven/AltClick(var/mob/user)
|
||||
.=1
|
||||
if(user.stat || user.restrained()) return
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)//No spamming the door, it makes a sound
|
||||
toggle_door()
|
||||
|
||||
|
||||
/obj/machinery/appliance/cooker/oven/verb/toggle_door()
|
||||
set src in view()
|
||||
set name = "Open/close oven door"
|
||||
set category = "Object"
|
||||
if (!Adjacent(usr))
|
||||
usr << "You can't reach the [src] from there, get closer!"
|
||||
set category = null
|
||||
|
||||
|
||||
if (!isliving(usr))
|
||||
usr << "Ghosts can't mess with ovens."
|
||||
return
|
||||
|
||||
if (isanimal(usr))
|
||||
usr << "You lack the dexterity to do that."
|
||||
return
|
||||
|
||||
|
||||
if (!Adjacent(usr))
|
||||
if (!issilicon(usr))
|
||||
usr << "You can't reach the [src] from there, get closer!"
|
||||
return
|
||||
|
||||
if (open)
|
||||
open = 0
|
||||
loss = (active_power_usage / resistance)*0.5
|
||||
else
|
||||
open = 1
|
||||
loss = (active_power_usage / resistance)*6
|
||||
loss = (active_power_usage / resistance)*4
|
||||
//When the oven door is opened, heat is lost MUCH faster
|
||||
|
||||
playsound(src, 'sound/machines/hatch_open.ogg', 20, 1)
|
||||
|
||||
@@ -99,6 +99,7 @@
|
||||
/datum/recipe/chaosdonut
|
||||
appliance = FRYER
|
||||
reagents = list("frostoil" = 10, "capsaicin" = 10, "sugar" = 10)
|
||||
reagent_mix = RECIPE_REAGENT_REPLACE //This creates its own reagents
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/dough
|
||||
)
|
||||
|
||||
@@ -28,6 +28,7 @@ I said no!
|
||||
|
||||
/datum/recipe/boiledegg
|
||||
reagents = list("water" = 5)
|
||||
reagent_mix = RECIPE_REAGENT_REPLACE
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg
|
||||
)
|
||||
@@ -162,15 +163,16 @@ I said no!
|
||||
|
||||
/datum/recipe/omelette
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cheesewedge,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cheesewedge
|
||||
)
|
||||
reagents = list("egg" = 6)
|
||||
reagent_mix = RECIPE_REAGENT_REPLACE
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/omelette
|
||||
|
||||
/datum/recipe/muffin
|
||||
reagents = list("milk" = 5, "sugar" = 5)
|
||||
reagent_mix = RECIPE_REAGENT_REPLACE
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/dough
|
||||
)
|
||||
@@ -187,10 +189,12 @@ I said no!
|
||||
/datum/recipe/soylenviridians
|
||||
fruit = list("soybeans" = 1)
|
||||
reagents = list("flour" = 10)
|
||||
reagent_mix = RECIPE_REAGENT_REPLACE
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/soylenviridians
|
||||
|
||||
/datum/recipe/soylentgreen
|
||||
reagents = list("flour" = 10)
|
||||
reagent_mix = RECIPE_REAGENT_REPLACE
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat/human,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat/human
|
||||
@@ -313,11 +317,8 @@ I said no!
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/vegetablesoup
|
||||
|
||||
/datum/recipe/nettlesoup
|
||||
fruit = list("nettle" = 1, "potato" = 1)
|
||||
reagents = list("water" = 10)
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg
|
||||
)
|
||||
fruit = list("nettle" = 1, "potato" = 1, )
|
||||
reagents = list("water" = 10, "egg" = 3)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/nettlesoup
|
||||
|
||||
/datum/recipe/wishsoup
|
||||
@@ -336,13 +337,6 @@ I said no!
|
||||
|
||||
|
||||
|
||||
/datum/recipe/spellburger
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/monkeyburger,
|
||||
/obj/item/clothing/head/wizard/fake
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/spellburger
|
||||
|
||||
/datum/recipe/spellburger
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/monkeyburger,
|
||||
@@ -355,9 +349,10 @@ I said no!
|
||||
/obj/item/weapon/reagent_containers/food/snacks/monkeyburger,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat
|
||||
)
|
||||
reagents = list("egg" = 3)
|
||||
reagent_mix = RECIPE_REAGENT_REPLACE
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/bigbiteburger
|
||||
|
||||
|
||||
@@ -593,21 +588,21 @@ I said no!
|
||||
result_quantity = 2
|
||||
|
||||
/datum/recipe/fishfingers
|
||||
reagents = list("flour" = 10)
|
||||
reagents = list("flour" = 10,"egg" = 3)
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/carpmeat
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/fishfingers
|
||||
reagent_mix = RECIPE_REAGENT_REPLACE
|
||||
|
||||
/datum/recipe/mysterysoup
|
||||
reagents = list("water" = 10)
|
||||
reagents = list("water" = 10, "egg" = 3)
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/badrecipe,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/tofu,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cheesewedge
|
||||
)
|
||||
reagent_mix = RECIPE_REAGENT_REPLACE
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/mysterysoup
|
||||
|
||||
|
||||
@@ -624,11 +619,7 @@ I said no!
|
||||
|
||||
/datum/recipe/chawanmushi
|
||||
fruit = list("mushroom" = 1)
|
||||
reagents = list("water" = 5, "soysauce" = 5)
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg
|
||||
)
|
||||
reagents = list("water" = 5, "soysauce" = 5, "egg" = 6)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/chawanmushi
|
||||
|
||||
/datum/recipe/beetsoup
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
reagents = list("pacid" = 5) //It dissolves the carapace. Still poisonous, though.
|
||||
items = list(/obj/item/weapon/holder/diona)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/dionaroast
|
||||
reagent_mix = RECIPE_REAGENT_REPLACE //No eating polyacid
|
||||
|
||||
|
||||
//Predesigned breads
|
||||
@@ -21,8 +22,11 @@
|
||||
appliance = OVEN
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/dough,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg
|
||||
/obj/item/weapon/reagent_containers/food/snacks/dough,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/dough,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/dough
|
||||
)
|
||||
reagents = list("sodiumchloride" = 1)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/sliceable/bread
|
||||
|
||||
/datum/recipe/baguette
|
||||
@@ -194,15 +198,14 @@
|
||||
fruit = list("pumpkin" = 1)
|
||||
reagents = list("milk" = 5, "sugar" = 5, "egg" = 3, "flour" = 10)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/sliceable/pumpkinpie
|
||||
reagent_mix = RECIPE_REAGENT_REPLACE //We dont want raw egg in the result
|
||||
|
||||
/datum/recipe/appletart
|
||||
appliance = OVEN
|
||||
fruit = list("goldapple" = 1)
|
||||
reagents = list("sugar" = 5, "milk" = 5, "flour" = 10)
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg
|
||||
)
|
||||
reagents = list("sugar" = 5, "milk" = 5, "flour" = 10, "egg" = 3)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/appletart
|
||||
reagent_mix = RECIPE_REAGENT_REPLACE
|
||||
|
||||
//Baked sweets:
|
||||
//---------------
|
||||
@@ -216,6 +219,7 @@
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/cookie
|
||||
result_quantity = 4
|
||||
reagent_mix = RECIPE_REAGENT_REPLACE
|
||||
|
||||
/datum/recipe/fortunecookie
|
||||
appliance = OVEN
|
||||
@@ -362,7 +366,7 @@
|
||||
/obj/item/weapon/reagent_containers/food/snacks/monkeycube
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/monkeysdelight
|
||||
|
||||
reagent_mix = RECIPE_REAGENT_REPLACE
|
||||
|
||||
|
||||
|
||||
@@ -374,6 +378,7 @@
|
||||
appliance = OVEN
|
||||
reagents = list("milk" = 5, "flour" = 15, "sugar" = 15, "egg" = 9)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/sliceable/plaincake
|
||||
reagent_mix = RECIPE_REAGENT_REPLACE
|
||||
|
||||
/datum/recipe/cake/carrot
|
||||
appliance = OVEN
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
flash.name = "flash"
|
||||
flash.screen_loc = ui_entire_screen
|
||||
flash.layer = 17
|
||||
flash.mouse_opacity = 0
|
||||
blind = new /obj/screen()
|
||||
blind.icon_state = "black"
|
||||
blind.name = " "
|
||||
|
||||
@@ -3002,14 +3002,15 @@
|
||||
icon_state = "Some plain old Earthen bread."
|
||||
icon_state = "bread"
|
||||
slice_path = /obj/item/weapon/reagent_containers/food/snacks/breadslice
|
||||
slices_num = 5
|
||||
slices_num = 8
|
||||
filling_color = "#FFE396"
|
||||
center_of_mass = list("x"=16, "y"=9)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/sliceable/bread/New()
|
||||
..()
|
||||
reagents.add_reagent("nutriment", 6)
|
||||
bitesize = 2
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("protein", 5)
|
||||
reagents.add_reagent("nutriment", 15)
|
||||
bitesize = 2
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/breadslice
|
||||
name = "bread slice"
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: Nanako
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- bugfix: "Fixed a lot of missing safety checks in the kitchen that were allowing mice, ghosts and AIs to do things they shouldnt."
|
||||
- bugfix: "Fixed reagents combining in cooking container that made certain recipes un-creatable. Chemical reactions will no longer happen in cooking containers."
|
||||
- bugfix: "Changed whole eggs to egg yolk instead for a couple of recipes. Also adjusted bread recipe."
|
||||
- tweak: "AI can now turn cooking appliances on/off with a ctrl+click"
|
||||
Reference in New Issue
Block a user