Adds the dish drive, obtainable through techwebs and with circuit boards in the chef and bartender's lockers (#35759)

* Adds the dish drive

* a e s t h e t i c

* Puts a dish drive circuit in the chef locker

* wardrobes, better control

* shiz!

* shiz! (x2)
This commit is contained in:
Ashe Higgs
2018-02-20 18:09:59 -05:00
committed by CitadelStationBot
parent 2ac71b3647
commit 08bc84d3db
7 changed files with 157 additions and 1 deletions
+121
View File
@@ -0,0 +1,121 @@
/obj/machinery/dish_drive
name = "dish drive"
desc = "A culinary marvel that uses matter-to-energy conversion to store dishes and shards. Convenient! \
Additional features include a vacuum function to suck in nearby dishes, and an automatic transfer beam that empties its contents into nearby disposal bins every now and then. \
Or you can just drop your plates on the floor, like civilized folk."
icon = 'goon/icons/obj/kitchen.dmi'
icon_state = "synthesizer"
idle_power_usage = 8 //5 with default parts
active_power_usage = 13 //10 with default parts
anchored = TRUE
density = FALSE
circuit = /obj/item/circuitboard/machine/dish_drive
var/static/list/item_types = list(/obj/item/trash/waffles,
/obj/item/trash/plate,
/obj/item/trash/tray,
/obj/item/reagent_containers/glass/bowl,
/obj/item/reagent_containers/food/drinks/drinkingglass,
/obj/item/kitchen/fork,
/obj/item/shard,
/obj/item/broken_bottle)
var/time_since_dishes = 0
var/suction_enabled = TRUE
var/transmit_enabled = TRUE
/obj/machinery/dish_drive/Initialize()
. = ..()
RefreshParts()
/obj/machinery/dish_drive/examine(mob/user)
..()
if(user.Adjacent(src))
to_chat(user, "<span class='notice'>Alt-click it to beam its contents to any nearby disposal bins.</span>")
/obj/machinery/dish_drive/attack_hand(mob/living/user)
if(!contents.len)
to_chat(user, "<span class='warning'>There's nothing in [src]!</span>")
return
var/obj/item/I = contents[contents.len] //the most recently-added item
user.put_in_hands(I)
to_chat(user, "<span class='notice'>You take out [I] from [src].</span>")
playsound(src, 'sound/items/pshoom.ogg', 50, TRUE)
flick("synthesizer_beam", src)
/obj/machinery/dish_drive/attackby(obj/item/I, mob/living/user, params)
if(is_type_in_list(I, item_types) && user.a_intent != INTENT_HARM)
if(!user.transferItemToLoc(I, src))
return
to_chat(user, "<span class='notice'>You put [I] in [src], and it's beamed into energy!</span>")
playsound(src, 'sound/items/pshoom.ogg', 50, TRUE)
flick("synthesizer_beam", src)
return
else if(default_deconstruction_screwdriver(user, "[initial(icon_state)]-o", initial(icon_state), I))
return
else if(default_unfasten_wrench(user, I))
return
else if(default_deconstruction_crowbar(I, FALSE))
return
..()
/obj/machinery/dish_drive/RefreshParts()
idle_power_usage = initial(idle_power_usage)
active_power_usage = initial(active_power_usage)
use_power = initial(use_power)
var/total_rating = 0
for(var/obj/item/stock_parts/S in component_parts)
total_rating += S.rating
if(total_rating >= 9)
active_power_usage = 0
use_power = NO_POWER_USE
else
idle_power_usage = max(0, idle_power_usage - total_rating)
active_power_usage = max(0, active_power_usage - total_rating)
var/obj/item/circuitboard/machine/dish_drive/board = locate() in component_parts
if(board)
suction_enabled = board.suction
transmit_enabled = board.transmit
/obj/machinery/dish_drive/process()
if(time_since_dishes <= world.time && transmit_enabled)
do_the_dishes()
if(!suction_enabled)
return
for(var/obj/item/I in view(4, src))
if(is_type_in_list(I, item_types) && I.loc != src && (!I.reagents || !I.reagents.total_volume))
if(I.Adjacent(src))
visible_message("<span class='notice'>[src] beams up [I]!</span>")
I.forceMove(src)
playsound(src, 'sound/items/pshoom.ogg', 50, TRUE)
flick("synthesizer_beam", src)
else
step_towards(I, src)
/obj/machinery/dish_drive/attack_ai(mob/living/user)
if(stat)
return
to_chat(user, "<span class='notice'>You send a disposal transmission signal to [src].</span>")
do_the_dishes(TRUE)
/obj/machinery/dish_drive/AltClick(mob/living/user)
if(user.canUseTopic(src, !issilicon(user)))
do_the_dishes(TRUE)
/obj/machinery/dish_drive/proc/do_the_dishes(manual)
if(!contents.len)
return
var/obj/machinery/disposal/bin/bin = locate() in view(7, src)
if(!bin)
if(manual)
visible_message("<span class='warning'>[src] buzzes. There are no disposal bins in range!</span>")
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, TRUE)
return
for(var/obj/item/I in contents)
I.forceMove(bin)
use_power(active_power_usage)
visible_message("<span class='notice'>[src] [pick("whooshes", "bwooms", "fwooms", "pshooms")] and beams its stored dishes into the nearby [bin.name].</span>")
playsound(src, 'sound/items/pshoom.ogg', 50, TRUE)
playsound(bin, 'sound/items/pshoom.ogg', 50, TRUE)
Beam(bin, icon_state = "rped_upgrade", time = 5)
bin.update_icon()
flick("synthesizer_beam", src)
time_since_dishes = world.time + 600
@@ -718,3 +718,28 @@
req_components = list(
/obj/item/stack/sheet/glass = 1,
/obj/item/vending_refill/donksoft = 3)
/obj/item/circuitboard/machine/dish_drive
name = "Dish Drive (Machine Board)"
build_path = /obj/machinery/dish_drive
req_components = list(
/obj/item/stack/sheet/glass = 1,
/obj/item/stock_parts/manipulator = 1,
/obj/item/stock_parts/matter_bin = 2)
var/suction = TRUE
var/transmit = TRUE
/obj/item/circuitboard/machine/dish_drive/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Its suction function is [suction ? "enabled" : "disabled"]. Use it in-hand to switch.</span>")
to_chat(user, "<span class='notice'>Its disposal auto-transmit function is [transmit ? "enabled" : "disabled"]. Alt-click it to switch.</span>")
/obj/item/circuitboard/machine/dish_drive/attack_self(mob/living/user)
suction = !suction
to_chat(user, "<span class='notice'>You [suction ? "enable" : "disable"] the board's suction function.</span>")
/obj/item/circuitboard/machine/dish_drive/AltClick(mob/living/user)
if(!user.Adjacent(src))
return
transmit = !transmit
to_chat(user, "<span class='notice'>You [transmit ? "enable" : "disable"] the board's automatic disposal transmission.</span>")
@@ -25,6 +25,7 @@
new /obj/item/reagent_containers/glass/rag(src)
new /obj/item/storage/box/beanbag(src)
new /obj/item/clothing/suit/armor/vest/alt(src)
new /obj/item/circuitboard/machine/dish_drive(src)
new /obj/item/clothing/glasses/sunglasses/reagent(src)
new /obj/item/clothing/neck/petcollar(src)
new /obj/item/storage/belt/bandolier(src)
@@ -48,6 +49,7 @@
new /obj/item/clothing/head/soft/mime(src)
new /obj/item/storage/box/mousetraps(src)
new /obj/item/storage/box/mousetraps(src)
new /obj/item/circuitboard/machine/dish_drive(src)
new /obj/item/clothing/suit/toggle/chef(src)
new /obj/item/clothing/under/rank/chef(src)
new /obj/item/clothing/head/chefhat(src)
@@ -426,3 +426,10 @@
id = "cell_charger"
build_path = /obj/item/circuitboard/machine/cell_charger
category = list ("Misc. Machinery")
/datum/design/board/dish_drive
name = "Machine Design (Dish Drive)"
desc = "The circuit board for a dish drive."
id = "dish_drive"
build_path = /obj/item/circuitboard/machine/dish_drive
category = list ("Misc. Machinery")
+1 -1
View File
@@ -35,7 +35,7 @@
display_name = "Biological Processing"
description = "From slimes to kitchens."
prereq_ids = list("biotech")
design_ids = list("smartfridge", "gibber", "deepfryer", "monkey_recycler", "processor", "gibber", "microwave", "reagentgrinder")
design_ids = list("smartfridge", "gibber", "deepfryer", "monkey_recycler", "processor", "gibber", "microwave", "reagentgrinder", "dish_drive")
research_cost = 2500
export_price = 5000
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

+1
View File
@@ -529,6 +529,7 @@
#include "code\game\machinery\dance_machine.dm"
#include "code\game\machinery\defibrillator_mount.dm"
#include "code\game\machinery\deployable.dm"
#include "code\game\machinery\dish_drive.dm"
#include "code\game\machinery\dna_scanner.dm"
#include "code\game\machinery\doppler_array.dm"
#include "code\game\machinery\droneDispenser.dm"