From 59ef5bbcf16049d735e2a66dadf94e0268647f5e Mon Sep 17 00:00:00 2001 From: shellspeed1 Date: Sat, 17 Sep 2022 01:55:55 -0700 Subject: [PATCH] port of the positronic alert console --- _maps/map_files/BoxStation/BoxStation.dmm | 9 ++- code/game/machinery/posi_alert.dm | 55 ++++++++++++++++++ .../autolathe_designs_construction.dm | 8 +++ icons/obj/machines/terminals.dmi | Bin 0 -> 769 bytes tgstation.dme | 1 + 5 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 code/game/machinery/posi_alert.dm create mode 100644 icons/obj/machines/terminals.dmi diff --git a/_maps/map_files/BoxStation/BoxStation.dmm b/_maps/map_files/BoxStation/BoxStation.dmm index f1c58be502..1fe39b9717 100644 --- a/_maps/map_files/BoxStation/BoxStation.dmm +++ b/_maps/map_files/BoxStation/BoxStation.dmm @@ -16129,11 +16129,11 @@ /area/service/bar) "aMw" = ( /obj/machinery/vending/dinnerware{ - contraband = list(/obj/item/reagent_containers/food/condiment/flour = 4); + contraband = list(/obj/item/reagent_containers/food/condiment/flour=4); desc = "This vendor is full of condiments to put on food."; name = "\improper Condiments Vendor"; product_ads = "Get your sauces here!;No slave labour was used to make these products!;Nanotrasen Approved?!"; - products = list(/obj/item/storage/bag/tray = 8, /obj/item/reagent_containers/food/drinks/drinkingglass = 10, /obj/item/storage/box/cups = 5, /obj/item/reagent_containers/food/condiment/pack/ketchup = 20, /obj/item/reagent_containers/food/condiment/pack/mustard = 20, /obj/item/reagent_containers/food/condiment/pack/hotsauce = 20, /obj/item/reagent_containers/food/condiment/pack/astrotame = 20, /obj/item/reagent_containers/food/condiment/saltshaker = 20, /obj/item/reagent_containers/food/condiment/peppermill = 20) + products = list(/obj/item/storage/bag/tray=8,/obj/item/reagent_containers/food/drinks/drinkingglass=10,/obj/item/storage/box/cups=5,/obj/item/reagent_containers/food/condiment/pack/ketchup=20,/obj/item/reagent_containers/food/condiment/pack/mustard=20,/obj/item/reagent_containers/food/condiment/pack/hotsauce=20,/obj/item/reagent_containers/food/condiment/pack/astrotame=20,/obj/item/reagent_containers/food/condiment/saltshaker=20,/obj/item/reagent_containers/food/condiment/peppermill=20) }, /turf/open/floor/wood, /area/service/bar) @@ -17889,7 +17889,7 @@ /area/service/bar) "aRA" = ( /obj/machinery/vending/dinnerware{ - contraband = list(/obj/item/kitchen/rollingpin = 2, /obj/item/kitchen/knife/butcher = 2, /obj/item/reagent_containers/food/condiment/flour = 4) + contraband = list(/obj/item/kitchen/rollingpin=2,/obj/item/kitchen/knife/butcher=2,/obj/item/reagent_containers/food/condiment/flour=4) }, /turf/open/floor/plasteel/cafeteria, /area/service/kitchen) @@ -24597,6 +24597,9 @@ /obj/effect/turf_decal/tile/red{ dir = 4 }, +/obj/machinery/posialert{ + pixel_x = 32 + }, /turf/open/floor/plasteel/white, /area/science/robotics/lab) "biQ" = ( diff --git a/code/game/machinery/posi_alert.dm b/code/game/machinery/posi_alert.dm new file mode 100644 index 0000000000..a2a67f22f9 --- /dev/null +++ b/code/game/machinery/posi_alert.dm @@ -0,0 +1,55 @@ +/obj/machinery/posialert + name = "automated positronic alert console" + desc = "A console that will ping when a positronic personality is available for download." + icon = 'icons/obj/machines/terminals.dmi' + icon_state = "posialert" + var/inuse = FALSE + var/online = TRUE + + var/obj/item/radio/radio + var/radio_key = /obj/item/encryptionkey/headset_sci + var/science_channel = "Science" + +/obj/machinery/posialert/Initialize(mapload, ndir, building) + . = ..() + radio = new(src) + radio.keyslot = new radio_key + radio.listening = 0 + radio.recalculateChannels() + if(building) + setDir(ndir) + pixel_x = (dir & 3)? 0 : (dir == 4 ? -32 : 32) + pixel_y = (dir & 3)? (dir ==1 ? -32 : 32) : 0 + + +/obj/machinery/posialert/Destroy() + QDEL_NULL(radio) + return ..() + +/obj/item/wallframe/posialert + name = "automated positronic alert console frame" + desc = "Used to build positronic alert consoles, just secure to the wall." + icon_state = "newscaster" + custom_materials = list(/datum/material/iron=14000, /datum/material/glass=8000) + result_path = /obj/machinery/posialert + +/obj/machinery/posialert/attack_hand(mob/living/user) + online = !online + to_chat(user, "You turn the posi-alert system [online ? "on" : "off"]!") + return + +/obj/machinery/posialert/attack_ghost(mob/user) + . = ..() + if(!online) + return + if(inuse) + return + inuse = TRUE + flick("posialertflash",src) + visible_message("There are positronic personalities available!") + radio.talk_into(src, "There are positronic personalities available!", science_channel) + playsound(loc, 'sound/machines/ping.ogg', 50) + addtimer(CALLBACK(src, .proc/liftcooldown), 300) + +/obj/machinery/posialert/proc/liftcooldown() + inuse = FALSE diff --git a/code/modules/research/designs/autolathe_desings/autolathe_designs_construction.dm b/code/modules/research/designs/autolathe_desings/autolathe_designs_construction.dm index 0fdef4819e..cd77cc77ab 100644 --- a/code/modules/research/designs/autolathe_desings/autolathe_designs_construction.dm +++ b/code/modules/research/designs/autolathe_desings/autolathe_designs_construction.dm @@ -72,6 +72,14 @@ id = "newscaster_frame" build_type = AUTOLATHE materials = list(/datum/material/iron = 14000, /datum/material/glass = 8000) + build_path = /obj/item/wallframe/posialert + category = list("initial", "Construction") + +/datum/design/posialert + name = "Posialert Frame" + id = "posialert_frame" + build_type = AUTOLATHE + materials = list(/datum/material/iron = 14000, /datum/material/glass = 8000) build_path = /obj/item/wallframe/newscaster category = list("initial", "Construction") diff --git a/icons/obj/machines/terminals.dmi b/icons/obj/machines/terminals.dmi new file mode 100644 index 0000000000000000000000000000000000000000..e504b35abbba4bb9d416de1c3965125d2acbf5fb GIT binary patch literal 769 zcmV+c1OEJpP)004jp0{{R3ySR(Z7#J94|CyQp%)r3Fu5@_n00001 zbW%=J06^y0W&i*Hj(SvBbVOxyV{&P5bZKvH004NLQ&wh@oI5ROPwWvgii!&v&s2C__ z$i_lPX=7aFemuDZf;<^!Ipak zoZfYu-d$PIy9KTEin9&AM>jX{2MoHO2feQ(_G_)6?}L6Ko=!1N-`@0oR-5|gGmq*0 z=#yO6{X%c%-@PCGIwTT>`RT?;!w}P_Y^~4Fb0GRUCK{?LJ%Ou5>$1Cd~bQ~^Ei&v71nhU^oRNv;<4oZ&LeXHNhjJ`uWUfjCx7JzJMIvZ$C zwf=Jk>F#f-qe#IKR`af7FZfJJov5U~Yb=RllYe=XYB5qQTt! zPOV-vn3>;|*Yo+~4(37cD~bJDE9m