Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anti-Assistant Food Carts (E.A.T.) #26021

Closed
Closed
2 changes: 1 addition & 1 deletion _maps/map_files/stations/boxstation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -21962,7 +21962,7 @@
},
/area/station/service/chapel)
"bpL" = (
/obj/machinery/smartfridge/foodcart,
/obj/machinery/smartfridge/secure/foodcart,
/turf/simulated/floor/plasteel{
icon_state = "cafeteria"
},
Expand Down
2 changes: 1 addition & 1 deletion _maps/map_files/stations/cerestation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -81569,7 +81569,7 @@
/turf/simulated/floor/plating,
/area/station/maintenance/disposal/southwest)
"tgc" = (
/obj/machinery/smartfridge/foodcart{
/obj/machinery/smartfridge/secure/foodcart{
dir = 4
},
/turf/simulated/floor/plasteel{
Expand Down
102 changes: 51 additions & 51 deletions _maps/map_files/stations/deltastation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -20473,12 +20473,6 @@
icon_state = "darkredcorners"
},
/area/station/security/permabrig)
"blf" = (
/obj/machinery/smartfridge/foodcart,
/obj/machinery/firealarm/directional/south,
/obj/effect/turf_decal/delivery,
/turf/simulated/floor/plasteel,
/area/station/service/kitchen)
"blh" = (
/obj/machinery/icemachine,
/obj/machinery/status_display{
Expand Down Expand Up @@ -62666,6 +62660,21 @@
},
/turf/simulated/floor/plasteel/dark,
/area/station/maintenance/apmaint)
"dRt" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 9
},
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
dir = 9
},
/obj/structure/cable{
d1 = 1;
d2 = 8;
icon_state = "1-8"
},
/obj/structure/disposalpipe/segment,
/turf/simulated/floor/plasteel/grimy,
/area/station/service/chapel/office)
"dRu" = (
/obj/machinery/hologram/holopad,
/turf/simulated/floor/plasteel/grimy,
Expand Down Expand Up @@ -62868,6 +62877,12 @@
icon_state = "chapel"
},
/area/station/service/chapel)
"dSm" = (
/obj/structure/sign/kiddieplaque/remembrance{
pixel_x = 32
},
/turf/simulated/floor/carpet/black,
/area/station/service/chapel)
"dSn" = (
/obj/structure/closet,
/obj/effect/spawner/lootdrop/maintenance/three,
Expand Down Expand Up @@ -63160,6 +63175,17 @@
icon_state = "cult"
},
/area/station/service/chapel/office)
"dTq" = (
/obj/machinery/light/small{
dir = 1
},
/obj/structure/morgue{
dir = 2
},
/turf/simulated/floor/plasteel{
icon_state = "cult"
},
/area/station/service/chapel/office)
"dTs" = (
/obj/structure/table/wood,
/obj/item/storage/bible,
Expand Down Expand Up @@ -63521,6 +63547,14 @@
icon_state = "cult"
},
/area/station/service/chapel/office)
"dUO" = (
/obj/effect/mapping_helpers/airlock/access/any/service/crematorium,
/obj/machinery/door/firedoor,
/obj/machinery/door/airlock,
/turf/simulated/floor/plasteel{
icon_state = "cult"
},
/area/station/service/chapel/office)
"dUQ" = (
/obj/machinery/mass_driver{
id_tag = "chapelgun"
Expand Down Expand Up @@ -73982,6 +74016,12 @@
icon_state = "whitebluecorner"
},
/area/station/medical/medbay)
"jHC" = (
/obj/machinery/smartfridge/secure/foodcart,
/obj/machinery/firealarm/directional/south,
/obj/effect/turf_decal/delivery,
/turf/simulated/floor/plasteel,
/area/station/service/kitchen)
"jIs" = (
/turf/simulated/wall/r_wall,
/area/station/security/evidence)
Expand Down Expand Up @@ -76219,12 +76259,6 @@
icon_state = "whitegreen"
},
/area/station/medical/virology)
"kVb" = (
/obj/structure/sign/kiddieplaque/remembrance{
pixel_x = 32
},
/turf/simulated/floor/carpet/black,
/area/station/service/chapel)
"kWF" = (
/obj/machinery/light,
/turf/simulated/floor/engine,
Expand Down Expand Up @@ -83833,21 +83867,6 @@
},
/turf/simulated/floor/engine,
/area/station/engineering/controlroom)
"pmX" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 9
},
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
dir = 9
},
/obj/structure/cable{
d1 = 1;
d2 = 8;
icon_state = "1-8"
},
/obj/structure/disposalpipe/segment,
/turf/simulated/floor/plasteel/grimy,
/area/station/service/chapel/office)
"pnr" = (
/obj/item/radio/intercom{
name = "south bump";
Expand Down Expand Up @@ -87495,14 +87514,6 @@
icon_state = "neutral"
},
/area/station/maintenance/fore)
"rsC" = (
/obj/effect/mapping_helpers/airlock/access/any/service/crematorium,
/obj/machinery/door/firedoor,
/obj/machinery/door/airlock,
/turf/simulated/floor/plasteel{
icon_state = "cult"
},
/area/station/service/chapel/office)
"rsK" = (
/obj/machinery/computer/security/telescreen/research{
pixel_y = -32
Expand Down Expand Up @@ -99115,17 +99126,6 @@
},
/turf/simulated/floor/plasteel/white,
/area/station/medical/chemistry)
"xOp" = (
/obj/machinery/light/small{
dir = 1
},
/obj/structure/morgue{
dir = 2
},
/turf/simulated/floor/plasteel{
icon_state = "cult"
},
/area/station/service/chapel/office)
"xOG" = (
/obj/structure/table/glass,
/obj/item/toy/figure/crew/virologist,
Expand Down Expand Up @@ -133652,7 +133652,7 @@ dJx
dPD
dQh
dQT
pmX
dRt
yhA
dXV
dIx
Expand Down Expand Up @@ -134684,7 +134684,7 @@ djB
xGn
wRb
dIx
xOp
dTq
dUc
dUN
dIx
Expand Down Expand Up @@ -135200,7 +135200,7 @@ dIx
dIx
dIx
dIx
rsC
dUO
dIx
abj
aaa
Expand Down Expand Up @@ -135606,7 +135606,7 @@ bfe
aYZ
bhI
bjq
blf
jHC
aYZ
lKV
nGk
Expand Down Expand Up @@ -136481,7 +136481,7 @@ dRv
dRa
dRA
sBk
kVb
dSm
lKc
dJx
dUQ
Expand Down
2 changes: 1 addition & 1 deletion _maps/map_files/stations/metastation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -79312,8 +79312,8 @@
},
/area/station/hallway/primary/aft/north)
"sgk" = (
/obj/machinery/smartfridge/foodcart,
/obj/machinery/alarm/directional/north,
/obj/machinery/smartfridge/secure/foodcart,
/turf/simulated/floor/plasteel{
icon_state = "showroomfloor"
},
Expand Down
88 changes: 87 additions & 1 deletion code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,6 @@
face_while_pulling = FALSE
silicon_controllable = FALSE


/obj/machinery/smartfridge/foodcart/Initialize(mapload)
. = ..()
accepted_items_typecache = typecacheof(list(
Expand All @@ -506,6 +505,93 @@
new /obj/item/stack/sheet/metal(loc, 4)
qdel(src)

/**
* # Food and Drink Cart
*
* Secure variant of the [Food Cart][/obj/machinery/smartfridge/foodcart].
*/
/obj/machinery/smartfridge/secure/foodcart
name = "E.A.T."
desc = "Short for the Entrée Armored Transport, this technological marvel by Donk Co. allows Chefs to hawk their food and drink wares around the station, just with a bit more security. Swipe an authorized ID to engage the bluespace-plastitanium anchors."
icon = 'icons/obj/kitchen.dmi'
icon_state = "foodcart"
anchored = FALSE
interact_offline = TRUE
power_state = NO_POWER_USE
visible_contents = FALSE
face_while_pulling = FALSE
silicon_controllable = FALSE

/obj/machinery/smartfridge/secure/foodcart/Initialize(mapload)
. = ..()
req_one_access_txt = "[ACCESS_KITCHEN], [ACCESS_BAR]"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check that this works? req_one_access_txt seems to only split ;, and the accesses might have to have no spaces between

accepted_items_typecache = typecacheof(list(
/obj/item/food,
/obj/item/reagent_containers/drinks,
/obj/item/reagent_containers/condiment,
))

/obj/machinery/smartfridge/secure/foodcart/attackby(obj/item/O, mob/user, params) // Anti-theft technology, inspired by the station nuke
if(istype(O, /obj/item/card/id))
if(!allowed(user))
to_chat(user, "<span class='warning'>Access denied.</span>")
return
if(emagged)
to_chat(user, "<span class='warning'>The cart is silent as a brief puff of black smoke rises from the ID scanner.</span>")
return
if(anchored)
to_chat(user, "<span class='warning'>You release the locking mechanism, unanchoring the cart.</span>")
anchored = FALSE
playsound(loc, 'sound/machines/boltsup.ogg', 30, FALSE, 3)
return
to_chat(user, "<span class='warning'>You swipe your ID over the scanner, and with a steely snap, bolts slide out from underneath the cart securely anchoring the cart to the floor.</span>")
anchored = TRUE
playsound(loc, 'sound/machines/boltsdown.ogg', 30, FALSE, 3)
return TRUE
if(istype(O, /obj/item/airlock_electronics) && !istype(O, /obj/item/airlock_electronics/destroyed))
var/obj/item/airlock_electronics/new_electronics = O
if(!emagged)
to_chat(user, "<span class='warning'>The cart is working fine and doesn't needs repairs!</span>")
return
if(!user.unEquip())
to_chat(user, "<span class='warning'>[O] is stuck to you!</span>")
return FALSE
new_electronics.forceMove(src)
new /obj/item/airlock_electronics/destroyed(get_turf(user))
emagged = FALSE
to_chat(user, "<span class='notice'>You swap out the burnt out electronics in the ID scanner.</span>")
return TRUE
return ..()

/obj/machinery/smartfridge/secure/foodcart/emag_act(mob/user)
. = ..()
if(anchored)
anchored = FALSE
playsound(loc, 'sound/machines/boltsup.ogg', 30, FALSE, 3)

/obj/machinery/smartfridge/secure/foodcart/emp_act(severity)
. = ..()
if(anchored)
anchored = FALSE
playsound(loc, 'sound/machines/boltsup.ogg', 30, FALSE, 3)

/obj/machinery/smartfridge/secure/foodcart/screwdriver_act(mob/living/user, obj/item/I)
return

/obj/machinery/smartfridge/secure/foodcart/wrench_act(mob/living/user, obj/item/I)
return

/obj/machinery/smartfridge/secure/foodcart/crowbar_act(mob/living/user, obj/item/I)
return

/obj/machinery/smartfridge/secure/foodcart/exchange_parts()
return

/obj/machinery/smartfridge/secure/foodcart/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
new /obj/item/stack/sheet/metal(loc, 4)
qdel(src)

/**
* # Circuit Boards Storage
*
Expand Down