mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 16:10:02 +01:00
Food Cart (#20544)
- rscadd: "Adds a new food cart to the kitchen." - bugfix: "Fixes grill and oven to play their loop sounds only when turned on." - bugfix: "Fixes update_icon() of grill and oven so they actually look turned on when turned on." - <img width="708" alt="dreamseeker_XCNVO4o3GC" src="https://github.com/user-attachments/assets/081a8d8b-5fb6-40e2-adf8-05ffad91432b" /> --------- Signed-off-by: Wowzewow (Wezzy) <42310821+alsoandanswer@users.noreply.github.com> Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> Co-authored-by: hazelrat <83198434+hazelrat@users.noreply.github.com>
This commit is contained in:
co-authored by
Fluffy
hazelrat
parent
2ee9c74186
commit
a0445aa04e
@@ -2098,6 +2098,7 @@
|
||||
#include "code\modules\cooking\plasticbag.dm"
|
||||
#include "code\modules\cooking\plates.dm"
|
||||
#include "code\modules\cooking\trays.dm"
|
||||
#include "code\modules\cooking\machinery\foodcart.dm"
|
||||
#include "code\modules\cooking\machinery\gibber.dm"
|
||||
#include "code\modules\cooking\machinery\icecream.dm"
|
||||
#include "code\modules\cooking\machinery\smartfridge.dm"
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/// Called after the atom takes damage and integrity is below integrity_failure level
|
||||
/atom/proc/atom_break(damage_flag)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
// SEND_SIGNAL(src, COMSIG_ATOM_BREAK, damage_flag)
|
||||
|
||||
/// A cut-out proc for [/atom/proc/bullet_act] so living mobs can have their own armor behavior checks without causing issues with needing their own on_hit call
|
||||
/atom/proc/check_projectile_armor(def_zone, obj/projectile/impacting_projectile, is_silent)
|
||||
// if(uses_integrity)
|
||||
|
||||
@@ -38,6 +38,14 @@
|
||||
/proc/shadow(atom/movable/target)
|
||||
new /atom/movable/afterimage(get_turf(target), target)
|
||||
|
||||
/obj/effect/temp_visual/cart_space
|
||||
icon_state = "launchpad_launch"
|
||||
duration = 2 SECONDS
|
||||
|
||||
/obj/effect/temp_visual/cart_space/bad
|
||||
icon_state = "launchpad_pull"
|
||||
duration = 2 SECONDS
|
||||
|
||||
/obj/effect/constructing_effect
|
||||
icon = 'icons/effects/effects_rfd.dmi'
|
||||
icon_state = ""
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
/obj/machinery/appliance/cooker/grill/Initialize()
|
||||
. = ..()
|
||||
grill_loop = new(src, FALSE)
|
||||
grill_loop = new(src)
|
||||
|
||||
/obj/machinery/appliance/cooker/grill/Destroy()
|
||||
QDEL_NULL(grill_loop)
|
||||
@@ -64,16 +64,26 @@
|
||||
return CI
|
||||
return FALSE
|
||||
|
||||
/// Grills do not require power to work.
|
||||
/obj/machinery/appliance/cooker/grill/powered()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/appliance/cooker/grill/proc/update_grilling_audio()
|
||||
if(!grill_loop)
|
||||
return
|
||||
if(use_power)
|
||||
grill_loop.start()
|
||||
else
|
||||
grill_loop.stop()
|
||||
|
||||
/obj/machinery/appliance/cooker/grill/update_icon()
|
||||
. = ..()
|
||||
ClearOverlays()
|
||||
update_grilling_audio()
|
||||
if(!stat)
|
||||
icon_state = on_icon
|
||||
else
|
||||
icon_state = off_icon
|
||||
grill_loop?.stop()
|
||||
if(length(cooking_objs))
|
||||
grill_loop.start()
|
||||
var/datum/cooking_item/CI = cooking_objs[1]
|
||||
var/obj/item/reagent_containers/cooking_container/grill_grate/G = CI.container
|
||||
if(G)
|
||||
@@ -103,3 +113,16 @@
|
||||
food.transform = M
|
||||
AddOverlays(food)
|
||||
counter++
|
||||
..()
|
||||
|
||||
/obj/machinery/appliance/cooker/grill/stand
|
||||
name = "grill stand"
|
||||
icon_state = "grill_cart_off"
|
||||
on_icon = "grill_cart_on"
|
||||
off_icon = "grill_cart_off"
|
||||
desc = "A more commercialized version of your traditional grill. What happened to the good old days where people grilled with passion?"
|
||||
use_power = POWER_USE_OFF
|
||||
|
||||
/obj/machinery/appliance/cooker/grill/stand/update_icon()
|
||||
..()
|
||||
AddOverlays(image('icons/obj/machinery/cooking_machines.dmi', "front_bar"))
|
||||
|
||||
@@ -51,15 +51,20 @@
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/appliance/cooker/oven/update_icon()
|
||||
if (!open)
|
||||
ClearOverlays()
|
||||
update_baking_audio()
|
||||
if(!open)
|
||||
icon_state = "ovenclosed"
|
||||
if(!stat)
|
||||
var/image/ovenclosed_on = image('icons/obj/machinery/cooking_machines.dmi', "ovenclosed_on")
|
||||
ovenclosed_on.plane = EFFECTS_ABOVE_LIGHTING_PLANE
|
||||
AddOverlays(ovenclosed_on)
|
||||
else
|
||||
icon_state = "ovenopen"
|
||||
ClearOverlays()
|
||||
if (!stat)
|
||||
var/image/glow = image('icons/obj/machinery/cooking_machines.dmi', "oven_on")
|
||||
glow.plane = EFFECTS_ABOVE_LIGHTING_PLANE
|
||||
AddOverlays(glow)
|
||||
if(!stat)
|
||||
var/image/ovenopen_on = image('icons/obj/machinery/cooking_machines.dmi', "ovenopen_on")
|
||||
ovenopen_on.plane = EFFECTS_ABOVE_LIGHTING_PLANE
|
||||
AddOverlays(ovenopen_on)
|
||||
..()
|
||||
|
||||
/obj/machinery/appliance/cooker/oven/AltClick(var/mob/user)
|
||||
@@ -84,13 +89,12 @@
|
||||
else
|
||||
playsound(src, 'sound/machines/oven/oven_open.ogg', 75, TRUE)
|
||||
update_icon()
|
||||
update_baking_audio()
|
||||
|
||||
|
||||
/obj/machinery/appliance/cooker/oven/proc/update_baking_audio()
|
||||
if(!oven_loop)
|
||||
return
|
||||
var/obj/item/reagent_containers/cooking_container/C
|
||||
if(!open && C?.contents.len)
|
||||
if(use_power)
|
||||
oven_loop.start()
|
||||
else
|
||||
oven_loop.stop()
|
||||
@@ -126,7 +130,7 @@
|
||||
|
||||
/obj/machinery/appliance/cooker/oven/adhomai
|
||||
name = "adhomian oven"
|
||||
desc = "A heavy and rustic adhomian oven. Perfect for a Tajaran grandma"
|
||||
desc = "A heavy and rustic adhomian oven. Perfect for a Tajaran grandma."
|
||||
icon_state = "adhomai_oven_open"
|
||||
|
||||
/obj/machinery/appliance/cooker/oven/adhomai/update_icon()
|
||||
|
||||
@@ -0,0 +1,167 @@
|
||||
/obj/machinery/food_cart
|
||||
name = "food cart"
|
||||
desc = "A compact unpackable mobile cooking stand. Wow! When unpacked, it reminds you of those greasy gamer setups some people on NTNet have."
|
||||
icon = 'icons/obj/machinery/cooking_machines.dmi'
|
||||
icon_state = "foodcart"
|
||||
density = TRUE
|
||||
anchored = FALSE
|
||||
stat = POWEROFF
|
||||
use_power = POWER_USE_OFF
|
||||
req_access = list(ACCESS_KITCHEN)
|
||||
var/unpacked = FALSE
|
||||
/// When it's anchored and has all it's things outside
|
||||
var/obj/machinery/appliance/cooker/grill/stand/cart_griddle
|
||||
/// Griddle inside of the foodcart
|
||||
var/obj/machinery/smartfridge/foodheater/stand/cart_smartfridge
|
||||
/// Smartfridge inside of foodcart
|
||||
var/obj/structure/table/reinforced/wood/cart_table
|
||||
/// Table inside of foodcart
|
||||
var/obj/effect/food_cart_stand/cart_tent
|
||||
/// Overlay that spawns once foodcart is setup
|
||||
var/list/packed_things
|
||||
/// Contains cart_griddle, cart_smartfridge, cart_table, cart_cent
|
||||
|
||||
/obj/machinery/food_cart/Initialize(mapload)
|
||||
. = ..()
|
||||
cart_griddle = new(src)
|
||||
cart_smartfridge = new(src)
|
||||
cart_table = new(src)
|
||||
cart_tent = new(src)
|
||||
packed_things = list(cart_table, cart_smartfridge, cart_tent, cart_griddle) //middle, left, left, right
|
||||
RegisterSignal(cart_griddle, COMSIG_QDELETING, PROC_REF(lost_part))
|
||||
RegisterSignal(cart_smartfridge, COMSIG_QDELETING, PROC_REF(lost_part))
|
||||
RegisterSignal(cart_table, COMSIG_QDELETING, PROC_REF(lost_part))
|
||||
RegisterSignal(cart_tent, COMSIG_QDELETING, PROC_REF(lost_part))
|
||||
|
||||
/obj/machinery/food_cart/Destroy()
|
||||
QDEL_NULL(cart_griddle)
|
||||
QDEL_NULL(cart_smartfridge)
|
||||
QDEL_NULL(cart_table)
|
||||
QDEL_NULL(cart_tent)
|
||||
packed_things.Cut()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/food_cart/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
if(cart_griddle.stat & BROKEN)
|
||||
. += SPAN_WARNING("The stand's [SPAN_BOLD("grill")] is completely broken!")
|
||||
else
|
||||
. += SPAN_NOTICE("The stand's [SPAN_BOLD("grill")] is intact.")
|
||||
. += SPAN_NOTICE("The stand's [SPAN_BOLD("fridge")] seems fine.") //weirdly enough, these fridges don't break
|
||||
. += SPAN_NOTICE("The stand's [SPAN_BOLD("table")] seems fine.")
|
||||
|
||||
/**
|
||||
* Retract the structures into the food cart
|
||||
*/
|
||||
/obj/machinery/food_cart/proc/pack_up()
|
||||
if(!unpacked)
|
||||
return
|
||||
visible_message(SPAN_NOTICE("[src] retracts all of it's unpacked components."))
|
||||
for(var/obj/object as anything in packed_things)
|
||||
UnregisterSignal(object, COMSIG_MOVABLE_MOVED)
|
||||
object.forceMove(src)
|
||||
if(!(cart_griddle?.stat & BROKEN)) // Don't draw power if it's packed inside
|
||||
cart_griddle.stat = POWEROFF
|
||||
cart_griddle.use_power = POWER_USE_OFF
|
||||
cart_griddle.update_icon()
|
||||
if(!(cart_smartfridge?.stat & BROKEN))
|
||||
cart_smartfridge.use_power = POWER_USE_OFF
|
||||
anchored = FALSE
|
||||
unpacked = FALSE
|
||||
|
||||
/**
|
||||
* Deploy the structures inside the food cart
|
||||
*/
|
||||
/obj/machinery/food_cart/proc/unpack(mob/user)
|
||||
if(unpacked)
|
||||
return
|
||||
if(!check_setup_place())
|
||||
to_chat(user, SPAN_WARNING("There isn't enough room to unpack here! Bad spaces were marked in red."))
|
||||
return
|
||||
visible_message(SPAN_NOTICE("[src] expands into a full stand."))
|
||||
anchored = TRUE
|
||||
if(!(cart_griddle?.stat & BROKEN))
|
||||
cart_griddle.stat = POWEROFF
|
||||
if(!(cart_smartfridge?.stat & BROKEN)) // Unpacked, draw power
|
||||
cart_smartfridge.use_power = POWER_USE_IDLE
|
||||
var/iteration = 1
|
||||
var/turf/grabbed_turf = get_step(get_turf(src), EAST)
|
||||
for(var/angle in list(0, -45, -45, 45))
|
||||
var/turf/T = get_step(grabbed_turf, turn(SOUTH, angle))
|
||||
var/obj/thing = packed_things[iteration]
|
||||
thing.forceMove(T)
|
||||
RegisterSignal(thing, COMSIG_MOVABLE_MOVED, PROC_REF(lost_part))
|
||||
iteration++
|
||||
unpacked = TRUE
|
||||
|
||||
/obj/machinery/food_cart/attack_hand(mob/living/user, list/modifiers)
|
||||
. = ..()
|
||||
if(stat & BROKEN)
|
||||
to_chat(user, SPAN_WARNING("[src] is completely busted."))
|
||||
return
|
||||
var/obj/item/card/id/id_card = user.GetIdCard()
|
||||
if(!check_access(id_card))
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 30, TRUE)
|
||||
to_chat(usr, SPAN_WARNING("Access denied."))
|
||||
return
|
||||
playsound(get_turf(src), 'sound/items/rfd_start.ogg', 50, FALSE)
|
||||
to_chat(user, SPAN_NOTICE("You attempt to [unpacked ? "pack up" :"unpack"] [src]..."))
|
||||
if(!do_after(user, 5 SECONDS, src))
|
||||
playsound(get_turf(src), 'sound/items/rfd_interrupt.ogg', 50, FALSE)
|
||||
return
|
||||
playsound(get_turf(src), 'sound/items/rfd_end.ogg', 50, FALSE)
|
||||
if(unpacked)
|
||||
pack_up()
|
||||
else
|
||||
unpack(user)
|
||||
|
||||
/**
|
||||
* Step and check whether cart structures have non-dense space to placed onto
|
||||
*
|
||||
* Returns a boolean
|
||||
*/
|
||||
/obj/machinery/food_cart/proc/check_setup_place()
|
||||
var/has_space = TRUE
|
||||
var/turf/grabbed_turf = get_step(get_turf(src), EAST)
|
||||
for(var/angle in list(0, -45, 45))
|
||||
var/turf/T = get_step(grabbed_turf, turn(SOUTH, angle))
|
||||
if(T.density || T.contains_dense_objects())
|
||||
has_space = FALSE
|
||||
new /obj/effect/temp_visual/cart_space/bad(T)
|
||||
else
|
||||
new /obj/effect/temp_visual/cart_space(T)
|
||||
return has_space
|
||||
|
||||
/**
|
||||
* Some part of the food cart went missing
|
||||
*/
|
||||
/obj/machinery/food_cart/proc/lost_part(atom/movable/source, force)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
//okay, so it's deleting the fridge or griddle which are more important. We're gonna break the machine then
|
||||
UnregisterSignal(cart_griddle, list(COMSIG_QDELETING, COMSIG_MOVABLE_MOVED))
|
||||
UnregisterSignal(cart_smartfridge, list(COMSIG_QDELETING, COMSIG_MOVABLE_MOVED))
|
||||
UnregisterSignal(cart_table, list(COMSIG_QDELETING, COMSIG_MOVABLE_MOVED))
|
||||
UnregisterSignal(cart_tent, list(COMSIG_QDELETING, COMSIG_MOVABLE_MOVED))
|
||||
atom_break()
|
||||
|
||||
/obj/machinery/food_cart/atom_break()
|
||||
. = ..()
|
||||
pack_up()
|
||||
if(!QDELETED(cart_griddle))
|
||||
QDEL_NULL(cart_griddle)
|
||||
if(!QDELETED(cart_smartfridge))
|
||||
QDEL_NULL(cart_smartfridge)
|
||||
if(!QDELETED(cart_table))
|
||||
QDEL_NULL(cart_table)
|
||||
if(!QDELETED(cart_tent))
|
||||
QDEL_NULL(cart_tent)
|
||||
|
||||
/obj/effect/food_cart_stand
|
||||
name = "food cart tent"
|
||||
desc = "Something to battle the sun, for there are no breaks for the burger flippers."
|
||||
icon = 'icons/obj/fluff/3x3.dmi'
|
||||
icon_state = "stand"
|
||||
layer = ABOVE_HUMAN_LAYER //big mobs will still go over the tent, this is fine and cool
|
||||
@@ -11,11 +11,11 @@
|
||||
|
||||
/obj/machinery/icecream_vat
|
||||
name = "icecream vat"
|
||||
desc = "Ding-aling ding dong. Get your SCC-approved ice cream!"
|
||||
desc = "Ding-aling ding dong. Get your corporate-approved ice cream!"
|
||||
icon = 'icons/obj/machinery/cooking_machines.dmi'
|
||||
icon_state = "icecream_vat"
|
||||
density = 1
|
||||
anchored = 0
|
||||
density = TRUE
|
||||
anchored = FALSE
|
||||
use_power = POWER_USE_OFF
|
||||
atom_flags = ATOM_FLAG_OPEN_CONTAINER | ATOM_FLAG_NO_REACT
|
||||
|
||||
|
||||
@@ -118,10 +118,19 @@
|
||||
contents_path = "-food"
|
||||
accepted_items = list(/obj/item/reagent_containers/food/snacks)
|
||||
|
||||
/obj/machinery/smartfridge/foodheater/stand
|
||||
desc = "A more commercialized version of your traditional SmartHeater. Nothing like stale, heat-lamp warmed food."
|
||||
use_power = POWER_USE_OFF
|
||||
idle_power_usage = 0
|
||||
active_power_usage = 0
|
||||
|
||||
/obj/machinery/smartfridge/foodheater/stand/powered()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/smartfridge/foodheater/abandoned
|
||||
// badly stocked, with trash, junk, etc
|
||||
desc = "Used to keep food nice and warm in the past, now it is all dirty, and doesn't look like it'll ever run again."
|
||||
use_power = 0
|
||||
use_power = POWER_USE_OFF
|
||||
|
||||
/obj/machinery/smartfridge/seeds
|
||||
name = "\improper MegaSeed Storage"
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
################################
|
||||
# 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
|
||||
# - (fixes bugs)
|
||||
# wip
|
||||
# - (work in progress)
|
||||
# qol
|
||||
# - (quality of life)
|
||||
# soundadd
|
||||
# - (adds a sound)
|
||||
# sounddel
|
||||
# - (removes a sound)
|
||||
# rscadd
|
||||
# - (adds a feature)
|
||||
# rscdel
|
||||
# - (removes a feature)
|
||||
# imageadd
|
||||
# - (adds an image or sprite)
|
||||
# imagedel
|
||||
# - (removes an image or sprite)
|
||||
# spellcheck
|
||||
# - (fixes spelling or grammar)
|
||||
# experiment
|
||||
# - (experimental change)
|
||||
# balance
|
||||
# - (balance changes)
|
||||
# code_imp
|
||||
# - (misc internal code change)
|
||||
# refactor
|
||||
# - (refactors code)
|
||||
# config
|
||||
# - (makes a change to the config files)
|
||||
# admin
|
||||
# - (makes changes to administrator tools)
|
||||
# server
|
||||
# - (miscellaneous changes to server)
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: Wowzewow (Wezzy)
|
||||
|
||||
# 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, this gets changed to [] after reading. Just remove the brackets when you add new shit.
|
||||
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- rscadd: "Adds a new food cart to the kitchen."
|
||||
- bugfix: "Fixes grill and oven to play their loop sounds only when turned on."
|
||||
- bugfix: "Fixes update_icon() of grill and oven so they actually look turned on when turned on."
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 340 KiB After Width: | Height: | Size: 341 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 721 B |
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 20 KiB |
@@ -49148,6 +49148,7 @@
|
||||
name = "sink";
|
||||
pixel_x = -21
|
||||
},
|
||||
/obj/machinery/food_cart,
|
||||
/turf/simulated/floor/tiled/freezer{
|
||||
name = "cooled tiles";
|
||||
temperature = 253.15
|
||||
|
||||
Reference in New Issue
Block a user