diff --git a/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_pizzaparty.dmm b/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_pizzaparty.dmm index 38ab7a7b2951..a31a5d9d7580 100644 --- a/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_pizzaparty.dmm +++ b/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_pizzaparty.dmm @@ -33,7 +33,7 @@ /turf/simulated/floor/wood/lavaland_air, /area/ruin/powered/pizza_party) "j" = ( -/obj/item/food/mushroompizzaslice, +/obj/item/food/sliced/mushroom_pizza, /obj/effect/decal/cleanable/dirt, /turf/simulated/floor/plating/lavaland_air, /area/ruin/powered/pizza_party) @@ -144,13 +144,13 @@ /area/ruin/powered/pizza_party) "D" = ( /obj/structure/table/wood, -/obj/item/food/margheritapizzaslice, +/obj/item/food/sliced/margherita_pizza, /obj/item/trash/plate, /turf/simulated/floor/wood/lavaland_air, /area/ruin/powered/pizza_party) "E" = ( /obj/structure/table/wood, -/obj/item/food/meatpizzaslice, +/obj/item/food/sliced/meat_pizza, /turf/simulated/floor/wood/lavaland_air, /area/ruin/powered/pizza_party) "F" = ( diff --git a/_maps/map_files/RandomRuins/SpaceRuins/blowntcommsat.dmm b/_maps/map_files/RandomRuins/SpaceRuins/blowntcommsat.dmm index 57bae163401e..f8be6a5fcccd 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/blowntcommsat.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/blowntcommsat.dmm @@ -593,7 +593,7 @@ /turf/simulated/wall/r_wall, /area/space/nearstation) "Nw" = ( -/obj/item/food/xenomeatbreadslice{ +/obj/item/food/sliced/xeno_meat_bread{ name = "green mold bread slice" }, /turf/simulated/floor/plating/airless, diff --git a/_maps/map_files/RandomRuins/SpaceRuins/moonoutpost19.dmm b/_maps/map_files/RandomRuins/SpaceRuins/moonoutpost19.dmm index 6dd7ac7ae041..9c11b70d1351 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/moonoutpost19.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/moonoutpost19.dmm @@ -2001,7 +2001,7 @@ }, /area/ruin/space/moonbase19) "gy" = ( -/obj/item/food/xenomeatbreadslice{ +/obj/item/food/sliced/xeno_meat_bread{ pixel_y = 5 }, /obj/item/reagent_containers/drinks/coffee{ @@ -6702,12 +6702,12 @@ }, /area/ruin/space/moonbase19) "yR" = ( -/obj/item/food/xenomeatbreadslice, -/obj/item/food/xenomeatbreadslice{ +/obj/item/food/sliced/xeno_meat_bread, +/obj/item/food/sliced/xeno_meat_bread{ pixel_y = 7; pixel_x = 6 }, -/obj/item/food/xenomeatbreadslice{ +/obj/item/food/sliced/xeno_meat_bread{ pixel_y = 9; pixel_x = -5 }, diff --git a/_maps/map_files/RandomRuins/SpaceRuins/syndiecakesfactory.dmm b/_maps/map_files/RandomRuins/SpaceRuins/syndiecakesfactory.dmm index 30e727b81cba..444d04e2a668 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/syndiecakesfactory.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/syndiecakesfactory.dmm @@ -371,11 +371,11 @@ /area/ruin/space/syndicakefactory) "qd" = ( /obj/structure/table/glass/reinforced/plastitanium, -/obj/item/food/breadslice, -/obj/item/food/breadslice{ +/obj/item/food/sliced/bread, +/obj/item/food/sliced/bread{ pixel_y = 4 }, -/obj/item/food/breadslice{ +/obj/item/food/sliced/bread{ pixel_y = 8 }, /obj/machinery/light/small{ @@ -1076,7 +1076,7 @@ pixel_x = 8; pixel_y = 8 }, -/obj/item/food/birthdaycakeslice, +/obj/item/food/sliced/birthday_cake, /turf/simulated/floor/plasteel{ icon_state = "floorgrime" }, diff --git a/_maps/map_files/RandomRuins/SpaceRuins/wreckedcargoship.dmm b/_maps/map_files/RandomRuins/SpaceRuins/wreckedcargoship.dmm index 5f8a7b0b8732..e7a3b1944276 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/wreckedcargoship.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/wreckedcargoship.dmm @@ -224,8 +224,8 @@ /area/ruin/space/wreck_cargoship) "jm" = ( /obj/item/toy/plushie/ipcplushie, -/obj/item/food/breadslice, -/obj/item/food/breadslice, +/obj/item/food/sliced/bread, +/obj/item/food/sliced/bread, /obj/item/paper/crumpled{ name = "unintelligible scribbles"; info = "toast... i must... the plushie..." diff --git a/_maps/map_files/generic/centcomm.dmm b/_maps/map_files/generic/centcomm.dmm index f0648fbd6ca3..d0694546fc91 100644 --- a/_maps/map_files/generic/centcomm.dmm +++ b/_maps/map_files/generic/centcomm.dmm @@ -1870,6 +1870,10 @@ /obj/item/kirbyplants, /turf/simulated/floor/wood, /area/centcom/specops) +"gZ" = ( +/obj/machinery/light, +/turf/simulated/floor/backrooms_carpet, +/area/backrooms) "ha" = ( /obj/structure/chair/comfy/shuttle{ dir = 4 @@ -4244,7 +4248,7 @@ /area/centcom/suppy) "nY" = ( /obj/structure/table/wood, -/obj/item/food/mushroompizzaslice{ +/obj/item/food/sliced/mushroom_pizza{ pixel_x = -5; pixel_y = 5 }, @@ -4350,6 +4354,9 @@ }, /turf/simulated/floor/plasteel/freezer, /area/admin) +"oy" = ( +/turf/simulated/wall/indestructible/backrooms, +/area/backrooms) "oz" = ( /obj/machinery/door/airlock/centcom{ aiControlDisabled = 1; @@ -4516,6 +4523,12 @@ icon_state = "cafeteria" }, /area/tdome/tdomeobserve) +"oZ" = ( +/obj/machinery/light{ + dir = 4 + }, +/turf/simulated/floor/backrooms_carpet, +/area/backrooms) "pa" = ( /turf/simulated/floor/mineral/titanium, /area/shuttle/trade/sol) @@ -5402,6 +5415,9 @@ /obj/effect/landmark/spawner/syndie, /turf/simulated/floor/wood, /area/syndicate_mothership) +"sd" = ( +/turf/simulated/floor/backrooms_carpet, +/area/backrooms) "se" = ( /obj/structure/chair/comfy/shuttle{ dir = 4 @@ -5782,6 +5798,10 @@ /obj/effect/spawner/window/reinforced, /turf/simulated/floor/plating, /area/trader_station/sol) +"tI" = ( +/obj/effect/landmark/spawner/backrooms, +/turf/simulated/floor/backrooms_carpet, +/area/backrooms) "tJ" = ( /obj/machinery/door/poddoor{ density = 0; @@ -7861,6 +7881,12 @@ /obj/effect/landmark/spawner/tdomeobserve, /turf/simulated/floor/plasteel/dark, /area/tdome/tdomeobserve) +"BU" = ( +/obj/machinery/light{ + dir = 8 + }, +/turf/simulated/floor/backrooms_carpet, +/area/backrooms) "BV" = ( /obj/effect/mapping_helpers/airlock/access/all/syndicate, /obj/machinery/door/airlock/external{ @@ -11952,6 +11978,12 @@ /obj/effect/turf_decal/delivery, /turf/simulated/floor/plasteel/dark, /area/centcom/specops) +"PV" = ( +/obj/machinery/light{ + dir = 1 + }, +/turf/simulated/floor/backrooms_carpet, +/area/backrooms) "PW" = ( /obj/structure/chair/comfy/shuttle, /obj/machinery/light{ @@ -54803,39 +54835,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy aN aN aN @@ -55060,39 +55092,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +oy +sd +sd +oy +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +oy +sd +BU +sd +sd +sd +sd +sd +BU +sd +sd +sd +sd +sd +sd +sd +oy aN aN aN @@ -55317,39 +55349,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +oy +sd +sd +oy +oy +oy +sd +oy +sd +sd +sd +sd +oy +sd +oy +sd +oy +sd +sd +sd +sd +sd +sd +sd +oy +oy +oy +oy +oy +oy +oy aN aN aN @@ -55574,39 +55606,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +oy +sd +sd +oy +sd +sd +sd +oy +sd +sd +tI +gZ +oy +sd +oy +sd +oy +sd +sd +sd +sd +sd +sd +sd +oy +sd +BU +sd +sd +sd +oy aN aN aN @@ -55831,39 +55863,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +oy +sd +sd +BU +sd +sd +sd +oy +sd +sd +sd +sd +oy +sd +oy +sd +oy +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +oy aN aN aN @@ -56088,39 +56120,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +oy +sd +sd +sd +sd +sd +sd +oy +sd +sd +sd +sd +oy +sd +sd +sd +oy +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +oy aN aN aN @@ -56345,39 +56377,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +sd +sd +sd +sd +sd +sd +sd +oy +oy +sd +sd +sd +oy +oy +oy +oy +oy +sd +sd +sd +sd +sd +sd +sd +oy +sd +sd +sd +sd +sd +oy aN aN aN @@ -56602,6 +56634,39 @@ aN aN aN aN +oy +sd +oy +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +sd +sd +sd +sd +sd +tI +sd +sd +sd +sd +oy +sd +sd +oy +oy +oy +oy aN aN aN @@ -56614,58 +56679,25 @@ aN aN aN aN +"} +(164,1,1) = {" +aN +aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -"} -(164,1,1) = {" -aN -aN -aN -aN -aN -aN -aN -aN -fg -cG -cy -cz -cy -cy -eE -fe -fg +aN +aN +aN +fg +cG +cy +cz +cy +cy +eE +fe +fg aN aN aN @@ -56859,39 +56891,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +oy +sd +sd +tI +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +oy +PV +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +sd +oy +sd +sd +oy aN aN aN @@ -57116,39 +57148,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +oy +oy +sd +sd +sd +sd +sd +sd +oy +sd +sd +sd +gZ +oy +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +gZ +oy +sd +sd +oy +sd +sd +oy aN aN aN @@ -57373,39 +57405,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +sd +sd +sd +oy +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +sd +oy +sd +gZ +oy aN aN aN @@ -57630,39 +57662,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +oy +oy +sd +oy +sd +oy +PV +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +sd +oy +sd +sd +oy aN aN aN @@ -57887,39 +57919,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +sd +sd +sd +oZ +sd +sd +sd +oy +sd +sd +sd +sd +oy +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +sd +sd +sd +sd +oy aN aN aN @@ -58144,39 +58176,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +sd +oy +oy +oy aN aN aN @@ -58401,39 +58433,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +sd +sd +sd +BU +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +sd +sd +sd +sd +BU +sd +sd +oy +sd +sd +sd +sd +sd +sd +oy aN aN aN @@ -58658,39 +58690,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +oy +sd +sd +sd +sd +oy aN aN aN @@ -58915,39 +58947,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +PV +sd +sd +sd +sd +sd +sd +sd +sd +oy +oy +oy +oy +oy +oy +oy +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +sd +sd +sd +sd +gZ +oy aN aN aN @@ -59172,39 +59204,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +sd +sd +sd +sd +sd +sd +sd +gZ +oy +sd +sd +BU +sd +sd +oy +sd +sd +oy +oy +oy +sd +sd +sd +oy +PV +sd +sd +sd +sd +sd +oy aN aN aN @@ -59429,39 +59461,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +sd +sd +sd +sd +oy +sd +sd +sd +sd +sd +sd +oy aN aN aN @@ -59686,39 +59718,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +sd +sd +sd +tI +sd +sd +sd +sd +oy +sd +sd +tI +sd +sd +sd +sd +sd +oy +sd +sd +sd +sd +sd +sd +sd +sd +tI +sd +sd +sd +oy aN aN aN @@ -59943,39 +59975,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +sd +oy +oy +oy +PV +sd +sd +sd +sd +sd +sd +sd +sd +sd +oy aN aN aN @@ -60200,39 +60232,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +PV +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +sd +sd +sd +sd +oy +PV +sd +oy +sd +sd +sd +sd +sd +oy +sd +sd +sd +sd +sd +sd +oy aN aN aN @@ -60457,39 +60489,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +sd +sd +sd +sd +sd +sd +sd +gZ +oy +sd +sd +sd +sd +sd +oy +sd +sd +oy +sd +sd +sd +sd +sd +oy +PV +sd +sd +sd +sd +sd +oy aN aN aN @@ -60714,39 +60746,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +sd +sd +sd +oy +oy +sd +sd +oy +oy +oy +sd +sd +sd +oy +sd +sd +sd +sd +sd +gZ +oy aN aN aN @@ -60971,39 +61003,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +oy +oy +oy +sd +sd +sd +oy +oy +oy +oy +PV +sd +sd +oy +sd +sd +sd +oy +sd +sd +sd +sd +sd +oy +sd +oy +sd +sd +sd +sd +oy aN aN aN @@ -61228,39 +61260,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +oy +oy +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +sd +sd +oy +sd +sd +oZ +sd +sd +oy +sd +sd +sd +sd +sd +sd +oy aN aN aN @@ -61485,39 +61517,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +oy +PV +sd +sd +sd +sd +sd +sd +sd +oy +sd +sd +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy aN aN aN @@ -61742,39 +61774,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +oy +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +sd +oy +sd +sd +sd +sd +sd +sd +oy +sd +sd +sd +sd +BU +sd +sd +sd +sd +sd +oy aN aN aN @@ -61999,39 +62031,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +oy +sd +sd +sd +tI +sd +sd +sd +gZ +oy +sd +sd +oy +sd +sd +oy +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +oy aN aN aN @@ -62256,39 +62288,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +sd +oy +sd +gZ +oy +PV +sd +sd +sd +sd +sd +sd +sd +sd +tI +sd +sd +sd +gZ +oy aN aN aN @@ -62513,39 +62545,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +oy +sd +sd +sd +sd +sd +sd +sd +sd +oy +sd +sd +oy +sd +sd +oy +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +sd +oy aN aN aN @@ -62770,39 +62802,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +sd +oy +sd +sd +sd +oZ +sd +sd +sd +sd +oy +sd +sd +sd +sd +sd +oy +sd +sd +sd +oy +sd +sd +sd +sd +oZ +sd +sd +sd +sd +sd +oy aN aN aN @@ -63027,39 +63059,39 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy +oy aN aN aN diff --git a/_maps/map_files/stations/boxstation.dmm b/_maps/map_files/stations/boxstation.dmm index b029b6f90a04..b53650afed0b 100644 --- a/_maps/map_files/stations/boxstation.dmm +++ b/_maps/map_files/stations/boxstation.dmm @@ -79699,9 +79699,9 @@ /area/station/science/test_chamber) "tWD" = ( /obj/structure/closet/crate, -/obj/item/food/breadslice, -/obj/item/food/breadslice, -/obj/item/food/breadslice, +/obj/item/food/sliced/bread, +/obj/item/food/sliced/bread, +/obj/item/food/sliced/bread, /obj/item/food/grown/potato, /obj/item/food/grown/potato, /obj/item/food/grown/onion, diff --git a/_maps/map_files/stations/cerestation.dmm b/_maps/map_files/stations/cerestation.dmm index bb9c3e185534..d17e951acbc4 100644 --- a/_maps/map_files/stations/cerestation.dmm +++ b/_maps/map_files/stations/cerestation.dmm @@ -32622,9 +32622,9 @@ /area/station/security/permabrig) "flp" = ( /obj/structure/closet/crate, -/obj/item/food/breadslice, -/obj/item/food/breadslice, -/obj/item/food/breadslice, +/obj/item/food/sliced/bread, +/obj/item/food/sliced/bread, +/obj/item/food/sliced/bread, /obj/item/food/grown/potato, /obj/item/food/grown/potato, /obj/item/food/grown/onion, diff --git a/_maps/map_files/stations/deltastation.dmm b/_maps/map_files/stations/deltastation.dmm index 7128040b4864..3e1590631007 100644 --- a/_maps/map_files/stations/deltastation.dmm +++ b/_maps/map_files/stations/deltastation.dmm @@ -44976,10 +44976,6 @@ /obj/effect/turf_decal/stripes/line, /turf/simulated/floor/plasteel, /area/station/science/xenobiology) -"cVr" = ( -/obj/structure/sign/nosmoking_2, -/turf/simulated/wall, -/area/station/science/rnd) "cVs" = ( /obj/machinery/atmospherics/pipe/simple/hidden/supply, /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, @@ -60236,6 +60232,12 @@ }, /turf/simulated/floor/plating, /area/station/science/test_chamber) +"geq" = ( +/obj/machinery/firealarm/directional/east, +/turf/simulated/floor/plasteel{ + icon_state = "whitepurplecorner" + }, +/area/station/science/research) "get" = ( /obj/effect/turf_decal/stripes/white/line, /turf/simulated/floor/plasteel, @@ -64365,6 +64367,7 @@ name = "Toxins Launcher Bay Door"; protected = 0 }, +/obj/structure/fans/tiny, /turf/simulated/floor/plating, /area/station/science/toxins/launch) "ixF" = ( @@ -72060,6 +72063,13 @@ icon_state = "vault" }, /area/station/command/bridge) +"mXh" = ( +/obj/machinery/firealarm/directional/west, +/turf/simulated/floor/plasteel{ + dir = 8; + icon_state = "whitepurplecorner" + }, +/area/station/science/research) "mXA" = ( /turf/simulated/wall, /area/station/medical/sleeper) @@ -82231,9 +82241,6 @@ icon_state = "neutralcorner" }, /area/station/hallway/primary/central/nw) -"ssx" = ( -/turf/simulated/floor/plasteel/dark, -/area/station/science/break_room) "ssy" = ( /obj/structure/table/reinforced, /obj/machinery/cell_charger, @@ -82358,6 +82365,13 @@ icon_state = "whitegreen" }, /area/station/medical/virology) +"svR" = ( +/obj/machinery/firealarm/directional/north, +/turf/simulated/floor/plasteel{ + dir = 1; + icon_state = "whitepurplecorner" + }, +/area/station/science/research) "svX" = ( /obj/machinery/door/firedoor, /obj/structure/disposalpipe/segment{ @@ -82517,10 +82531,10 @@ /obj/machinery/door/firedoor, /obj/machinery/door/airlock/research, /obj/effect/mapping_helpers/airlock/autoname, -/obj/effect/mapping_helpers/airlock/access/all/science/robotics, /obj/effect/turf_decal/stripes/line{ dir = 4 }, +/obj/effect/mapping_helpers/airlock/access/all/science/research, /turf/simulated/floor/plasteel/white, /area/station/science/robotics/chargebay) "sAB" = ( @@ -84884,6 +84898,10 @@ icon_state = "neutralfull" }, /area/station/engineering/atmos) +"tOx" = ( +/obj/machinery/firealarm/directional/west, +/turf/simulated/floor/plasteel/white, +/area/station/science/research) "tOF" = ( /obj/structure/grille, /obj/structure/lattice, @@ -85740,12 +85758,12 @@ /area/station/security/permabrig) "ugy" = ( /obj/machinery/door/firedoor, -/obj/machinery/door/airlock/research, /obj/effect/mapping_helpers/airlock/autoname, -/obj/effect/mapping_helpers/airlock/access/all/science/robotics, /obj/structure/cable{ icon_state = "1-2" }, +/obj/effect/mapping_helpers/airlock/access/all/science/research, +/obj/machinery/door/airlock/research/glass, /turf/simulated/floor/plasteel/white, /area/station/science/robotics/chargebay) "ugz" = ( @@ -86137,9 +86155,9 @@ /area/station/hallway/secondary/entry/south) "urY" = ( /obj/structure/closet/crate, -/obj/item/food/breadslice, -/obj/item/food/breadslice, -/obj/item/food/breadslice, +/obj/item/food/sliced/bread, +/obj/item/food/sliced/bread, +/obj/item/food/sliced/bread, /obj/item/food/grown/potato, /obj/item/food/grown/potato, /obj/item/food/grown/onion, @@ -86901,6 +86919,15 @@ /obj/structure/closet/firecloset, /turf/simulated/floor/plating, /area/station/maintenance/fsmaint) +"uND" = ( +/obj/structure/sign/nosmoking_2{ + pixel_y = 32 + }, +/turf/simulated/floor/plasteel{ + dir = 1; + icon_state = "whitepurplecorner" + }, +/area/station/science/research) "uNJ" = ( /obj/structure/cable{ icon_state = "4-8" @@ -88719,9 +88746,7 @@ /area/station/medical/surgery/observation) "vPd" = ( /obj/machinery/door/firedoor, -/obj/machinery/door/airlock/research, /obj/effect/mapping_helpers/airlock/autoname, -/obj/effect/mapping_helpers/airlock/access/all/science/robotics, /obj/machinery/atmospherics/pipe/simple/hidden/supply{ dir = 4 }, @@ -88731,6 +88756,8 @@ /obj/structure/cable{ icon_state = "4-8" }, +/obj/machinery/door/airlock/research/glass, +/obj/effect/mapping_helpers/airlock/access/all/science/research, /turf/simulated/floor/plasteel/white, /area/station/science/robotics/chargebay) "vPo" = ( @@ -92976,6 +93003,13 @@ /obj/effect/spawner/random/blood/maybe, /turf/simulated/floor/plating, /area/station/maintenance/fsmaint) +"ydD" = ( +/obj/machinery/firealarm/directional/north, +/turf/simulated/floor/plasteel{ + dir = 1; + icon_state = "whitebluecorner" + }, +/area/station/medical/medbay) "ydY" = ( /obj/effect/decal/cleanable/dirt, /obj/machinery/light/small, @@ -124745,7 +124779,7 @@ hdu hnH ojf lSc -cPn +mXh cRd cZt hHk @@ -126791,7 +126825,7 @@ fBk fBk fBk fBk -dau +svR yid cPn dFm @@ -128590,7 +128624,7 @@ aNa qJw vDT fBk -dau +uND yid cPn hkY @@ -128614,7 +128648,7 @@ dBe wJr oKa kxJ -ssx +ykJ ykJ hOr iqc @@ -129101,7 +129135,7 @@ tQM cSm cZt cTU -cMm +tOx cXb cZt dZb @@ -129887,7 +129921,7 @@ cSt cSt dIi dsu -cSt +geq cSt cSt dvj @@ -130385,7 +130419,7 @@ pGk xAc cSp cTQ -cVr +cTR cTR cTR cTR @@ -139899,7 +139933,7 @@ cZN lQs uLc dwG -cKO +ydD hbt cSA cSA diff --git a/_maps/map_files/stations/emeraldstation.dmm b/_maps/map_files/stations/emeraldstation.dmm index a696e6911a66..3ff3234a2dc5 100644 --- a/_maps/map_files/stations/emeraldstation.dmm +++ b/_maps/map_files/stations/emeraldstation.dmm @@ -38788,7 +38788,7 @@ /obj/item/food/grown/pumpkin{ pixel_y = 14 }, -/obj/item/food/pumpkinpieslice, +/obj/item/food/sliced/pumpkinpie, /turf/simulated/floor/plating, /area/station/maintenance/apmaint) "hGX" = ( diff --git a/_maps/map_files/stations/metastation.dmm b/_maps/map_files/stations/metastation.dmm index 8a791462bad9..9bd14a9d8a0c 100644 --- a/_maps/map_files/stations/metastation.dmm +++ b/_maps/map_files/stations/metastation.dmm @@ -58468,7 +58468,7 @@ pixel_x = -4; pixel_y = 8 }, -/obj/item/food/carrotcakeslice{ +/obj/item/food/sliced/carrot_cake{ pixel_x = 8; pixel_y = -2 }, @@ -69866,9 +69866,9 @@ "qvp" = ( /obj/structure/closet/crate, /obj/effect/decal/cleanable/dirt, -/obj/item/food/breadslice, -/obj/item/food/breadslice, -/obj/item/food/breadslice, +/obj/item/food/sliced/bread, +/obj/item/food/sliced/bread, +/obj/item/food/sliced/bread, /obj/item/food/grown/potato, /obj/item/food/grown/potato, /obj/item/food/grown/onion, diff --git a/_maps/map_files/tests/test_attack_chain_machinery.dmm b/_maps/map_files/tests/test_attack_chain_machinery.dmm new file mode 100644 index 000000000000..24a783649a86 --- /dev/null +++ b/_maps/map_files/tests/test_attack_chain_machinery.dmm @@ -0,0 +1,617 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"aE" = ( +/obj/machinery/doppler_array, +/turf/simulated/floor/plasteel, +/area/game_test) +"aZ" = ( +/obj/machinery/chem_heater, +/turf/simulated/floor/plasteel, +/area/game_test) +"cT" = ( +/obj/machinery/biogenerator, +/turf/simulated/floor/plasteel, +/area/game_test) +"dW" = ( +/obj/machinery/fishtank, +/turf/simulated/floor/plasteel, +/area/game_test) +"fc" = ( +/obj/machinery/door/firedoor, +/turf/simulated/floor/plasteel, +/area/game_test) +"fj" = ( +/obj/machinery/chem_dispenser, +/turf/simulated/floor/plasteel, +/area/game_test) +"fU" = ( +/obj/machinery/economy/vending/wallmed/directional/north, +/turf/simulated/floor/plasteel, +/area/game_test) +"gG" = ( +/turf/simulated/floor/mech_bay_recharge_floor, +/area/game_test) +"ht" = ( +/obj/machinery/atmospherics/pipe/simple/hidden/blue{ + dir = 5 + }, +/turf/simulated/floor/plasteel, +/area/game_test) +"hL" = ( +/obj/machinery/bookbinder, +/turf/simulated/floor/plasteel, +/area/game_test) +"hU" = ( +/obj/machinery/economy/vending/atmosdrobe, +/turf/simulated/floor/plasteel, +/area/game_test) +"ic" = ( +/obj/machinery/door/airlock/external, +/turf/simulated/floor/plasteel, +/area/game_test) +"iC" = ( +/obj/machinery/bottler, +/turf/simulated/floor/plasteel, +/area/game_test) +"ja" = ( +/obj/structure/table, +/obj/machinery/cell_charger, +/turf/simulated/floor/plasteel, +/area/game_test) +"jW" = ( +/obj/machinery/optable, +/turf/simulated/floor/plasteel, +/area/game_test) +"kV" = ( +/obj/machinery/computer/emergency_shuttle, +/turf/simulated/floor/plasteel, +/area/game_test) +"lr" = ( +/obj/machinery/computer/aiupload, +/turf/simulated/floor/plasteel, +/area/game_test) +"lM" = ( +/obj/machinery/computer/guestpass{ + pixel_y = 32 + }, +/turf/simulated/floor/plasteel, +/area/game_test) +"lO" = ( +/obj/machinery/atmospherics/pipe/simple/hidden/blue{ + dir = 6 + }, +/turf/simulated/floor/plasteel, +/area/game_test) +"mz" = ( +/obj/machinery/computer/med_data/laptop, +/obj/structure/table, +/turf/simulated/floor/plasteel, +/area/game_test) +"nt" = ( +/obj/machinery/atmospherics/pipe/simple/hidden/blue{ + dir = 10 + }, +/turf/simulated/floor/plasteel, +/area/game_test) +"oh" = ( +/obj/machinery/atmospherics/unary/tank/oxygen, +/turf/simulated/floor/plasteel, +/area/game_test) +"px" = ( +/obj/machinery/atmospherics/portable/scrubber, +/turf/simulated/floor/plasteel, +/area/game_test) +"qc" = ( +/turf/simulated/floor/plasteel, +/area/game_test) +"qN" = ( +/obj/machinery/cryopod{ + dir = 4 + }, +/turf/simulated/floor/plasteel, +/area/game_test) +"sj" = ( +/obj/machinery/sleeper{ + dir = 4 + }, +/turf/simulated/floor/plasteel, +/area/game_test) +"so" = ( +/obj/machinery/dna_scannernew, +/turf/simulated/floor/plasteel, +/area/game_test) +"tn" = ( +/obj/machinery/computer/security/telescreen/rd{ + pixel_y = 32 + }, +/turf/simulated/floor/plasteel, +/area/game_test) +"to" = ( +/obj/machinery/door/airlock, +/turf/simulated/floor/plasteel, +/area/game_test) +"tL" = ( +/obj/machinery/economy/slot_machine, +/turf/simulated/floor/plasteel, +/area/game_test) +"ud" = ( +/obj/machinery/abductor/gland_dispenser, +/turf/simulated/floor/plasteel, +/area/game_test) +"vi" = ( +/obj/effect/landmark/game_test/top_right_corner, +/turf/simulated/floor/plasteel, +/area/game_test) +"vL" = ( +/obj/effect/landmark{ + icon = 'icons/effects/spawner_icons.dmi'; + icon_state = "spooky"; + name = "Observer-Start" + }, +/obj/effect/landmark/spawner/late/crew, +/obj/effect/landmark/game_test/bottom_left_corner, +/turf/simulated/floor/plasteel, +/area/game_test) +"ws" = ( +/obj/machinery/computer/library, +/turf/simulated/floor/plasteel, +/area/game_test) +"ye" = ( +/obj/machinery/computer/card, +/turf/simulated/floor/plasteel, +/area/game_test) +"zA" = ( +/obj/machinery/computer/communications, +/turf/simulated/floor/plasteel, +/area/game_test) +"Au" = ( +/turf/simulated/wall/r_wall, +/area/game_test) +"AM" = ( +/obj/machinery/conveyor_switch, +/turf/simulated/floor/plasteel, +/area/game_test) +"Bi" = ( +/obj/machinery/atmospherics/pipe/simple/hidden/blue{ + dir = 9 + }, +/turf/simulated/floor/plasteel, +/area/game_test) +"Bn" = ( +/obj/machinery/atmospherics/pipe/simple/hidden/blue{ + dir = 4 + }, +/turf/simulated/floor/plasteel, +/area/game_test) +"Bo" = ( +/obj/machinery/r_n_d/circuit_imprinter, +/turf/simulated/floor/plasteel, +/area/game_test) +"CH" = ( +/obj/machinery/clonepod, +/turf/simulated/floor/plasteel, +/area/game_test) +"EK" = ( +/obj/machinery/mech_bay_recharge_port, +/turf/simulated/floor/plasteel, +/area/game_test) +"Fl" = ( +/obj/machinery/compost_bin, +/turf/simulated/floor/plasteel, +/area/game_test) +"Ge" = ( +/obj/machinery/mecha_part_fabricator, +/turf/simulated/floor/plasteel, +/area/game_test) +"KW" = ( +/obj/machinery/nuclearbomb/undeployed, +/turf/simulated/floor/plasteel, +/area/game_test) +"KY" = ( +/obj/machinery/computer/mech_bay_power_console, +/turf/simulated/floor/plasteel, +/area/game_test) +"Lb" = ( +/obj/machinery/atmospherics/portable/pump, +/turf/simulated/floor/plasteel, +/area/game_test) +"LT" = ( +/obj/machinery/computer/cloning, +/turf/simulated/floor/plasteel, +/area/game_test) +"Mh" = ( +/obj/machinery/economy/atm/directional/north, +/turf/simulated/floor/plasteel, +/area/game_test) +"Mr" = ( +/obj/machinery/floodlight, +/turf/simulated/floor/plasteel, +/area/game_test) +"Ng" = ( +/obj/machinery/abductor/console, +/turf/simulated/floor/plasteel, +/area/game_test) +"NE" = ( +/obj/machinery/alarm/directional/north, +/turf/simulated/floor/plasteel, +/area/game_test) +"OG" = ( +/obj/machinery/cryopod/robot, +/turf/simulated/floor/plasteel, +/area/game_test) +"Qx" = ( +/obj/machinery/computer/arcade, +/turf/simulated/floor/plasteel, +/area/game_test) +"RD" = ( +/obj/machinery/r_n_d/protolathe, +/turf/simulated/floor/plasteel, +/area/game_test) +"RO" = ( +/obj/machinery/computer/operating, +/turf/simulated/floor/plasteel, +/area/game_test) +"RP" = ( +/obj/machinery/autolathe, +/turf/simulated/floor/plasteel, +/area/game_test) +"SZ" = ( +/obj/machinery/button/windowtint, +/turf/simulated/wall/r_wall, +/area/game_test) +"TH" = ( +/obj/machinery/computer/scan_consolenew, +/turf/simulated/floor/plasteel, +/area/game_test) +"Ua" = ( +/obj/machinery/conveyor{ + dir = 4 + }, +/turf/simulated/floor/plasteel, +/area/game_test) +"Uk" = ( +/obj/machinery/clonescanner, +/turf/simulated/floor/plasteel, +/area/game_test) +"VL" = ( +/obj/machinery/chem_master, +/turf/simulated/floor/plasteel, +/area/game_test) +"WF" = ( +/obj/machinery/camera, +/turf/simulated/floor/plasteel, +/area/game_test) +"Xs" = ( +/obj/machinery/bodyscanner{ + dir = 4 + }, +/turf/simulated/floor/plasteel, +/area/game_test) +"YO" = ( +/obj/machinery/atmospherics/pipe/simple/hidden/blue, +/turf/simulated/floor/plasteel, +/area/game_test) +"Zk" = ( +/obj/machinery/door/firedoor/closed, +/turf/simulated/floor/plasteel, +/area/game_test) + +(1,1,1) = {" +Au +Au +Au +Au +Au +Au +Au +Au +Au +Au +Au +Au +Au +Au +Au +Au +Au +Au +"} +(2,1,1) = {" +Au +qc +qc +qc +qc +qc +qc +qc +qc +qc +qc +qc +qc +qc +qc +qc +qc +Au +"} +(3,1,1) = {" +Au +qc +qc +qc +oh +qc +SZ +qc +hL +qc +AM +qc +Qx +qc +dW +vL +qc +Au +"} +(4,1,1) = {" +Au +qc +qc +qc +iC +qc +Au +NE +ws +qc +Ua +qc +Fl +qc +Mr +qc +qc +Au +"} +(5,1,1) = {" +Au +qc +qc +mz +qc +qc +Au +tn +fj +qc +Ua +qc +aE +qc +tL +qc +qc +Au +"} +(6,1,1) = {" +Au +qc +qc +ja +qc +qc +Au +Mh +aZ +qc +lr +qc +hU +qc +qN +qc +qc +Au +"} +(7,1,1) = {" +Au +qc +qc +qc +qc +qc +Au +fU +CH +qc +to +qc +Zk +qc +Xs +qc +qc +Au +"} +(8,1,1) = {" +Au +qc +qc +qc +qc +qc +Au +lM +VL +qc +ic +qc +fc +qc +qc +qc +qc +Au +"} +(9,1,1) = {" +Au +qc +qc +qc +qc +qc +Au +qc +RO +qc +RD +qc +OG +qc +sj +qc +qc +Au +"} +(10,1,1) = {" +Au +qc +lO +YO +ht +qc +Au +WF +jW +qc +px +qc +Ge +qc +Ng +qc +qc +Au +"} +(11,1,1) = {" +Au +qc +Bn +qc +Bn +qc +cT +qc +Uk +qc +Lb +qc +KW +qc +ud +qc +qc +Au +"} +(12,1,1) = {" +Au +qc +nt +YO +Bi +qc +qc +qc +LT +qc +so +qc +EK +qc +ye +qc +qc +Au +"} +(13,1,1) = {" +Au +qc +qc +qc +qc +qc +qc +qc +RP +qc +TH +qc +gG +qc +zA +qc +qc +Au +"} +(14,1,1) = {" +Au +qc +vi +qc +qc +qc +qc +qc +Bo +qc +qc +qc +KY +qc +kV +qc +qc +Au +"} +(15,1,1) = {" +Au +qc +qc +qc +qc +qc +qc +qc +qc +qc +qc +qc +qc +qc +qc +qc +qc +Au +"} +(16,1,1) = {" +Au +Au +Au +Au +Au +Au +Au +Au +Au +Au +Au +Au +Au +Au +Au +Au +Au +Au +"} diff --git a/_maps/map_files220/RandomRuins/SpaceRuins/voxraiders_1.dmm b/_maps/map_files220/RandomRuins/SpaceRuins/voxraiders_1.dmm index cc8e771d706c..20912bb34c75 100644 --- a/_maps/map_files220/RandomRuins/SpaceRuins/voxraiders_1.dmm +++ b/_maps/map_files220/RandomRuins/SpaceRuins/voxraiders_1.dmm @@ -532,7 +532,7 @@ pixel_x = 8 }, /obj/item/toy/plushie/voxplushie, -/obj/item/food/cheesepizzaslice{ +/obj/item/food/sliced/cheese_pizza{ pixel_y = -2; pixel_x = -7 }, diff --git a/_maps/map_files220/RandomZLevels/beach.dmm b/_maps/map_files220/RandomZLevels/beach.dmm index 442d49900c7a..d373a0a8b5db 100644 --- a/_maps/map_files220/RandomZLevels/beach.dmm +++ b/_maps/map_files220/RandomZLevels/beach.dmm @@ -3926,7 +3926,7 @@ pixel_y = 6; pixel_x = 6 }, -/obj/item/food/watermelonslice{ +/obj/item/food/sliced/watermelon{ pixel_x = -6 }, /turf/simulated/floor/beach/away/sand_alternative, diff --git a/_maps/map_files220/RandomZLevels/blackmarketpackers.dmm b/_maps/map_files220/RandomZLevels/blackmarketpackers.dmm index c96491483b65..fee272bd6a61 100644 --- a/_maps/map_files220/RandomZLevels/blackmarketpackers.dmm +++ b/_maps/map_files220/RandomZLevels/blackmarketpackers.dmm @@ -3031,7 +3031,7 @@ /area/space) "jF" = ( /obj/structure/table, -/obj/item/food/xenomeatbreadslice{ +/obj/item/food/sliceable/xenomeatbread{ pixel_x = -8 }, /obj/item/trash/plate{ @@ -5531,7 +5531,7 @@ /area/awaymission/bmp_ship/containment) "Gu" = ( /obj/item/assembly/mousetrap/armed, -/obj/item/food/breadslice{ +/obj/item/food/sliced/bread{ pixel_y = 3 }, /obj/effect/decal/cleanable/dirt, diff --git a/_maps/map_files220/RandomZLevels/blackmesa.dmm b/_maps/map_files220/RandomZLevels/blackmesa.dmm index af1b9e7c29c7..ff5f1952466e 100644 --- a/_maps/map_files220/RandomZLevels/blackmesa.dmm +++ b/_maps/map_files220/RandomZLevels/blackmesa.dmm @@ -3677,11 +3677,6 @@ "ewG" = ( /turf/simulated/wall/indestructible/riveted, /area/awaymission/black_mesa/high_security_hallway) -"ewJ" = ( -/obj/structure/table/wood, -/obj/item/food/xenomeatbreadslice, -/turf/simulated/floor/wood/fancy/cherry, -/area/awaymission/black_mesa/xen/vortigaunt_village) "ewP" = ( /obj/machinery/gateway{ dir = 1 @@ -43183,7 +43178,7 @@ qBv qBv hmn cvC -ewJ +cvC qBv xti xti diff --git a/_maps/map_files220/generic/centcomm.dmm b/_maps/map_files220/generic/centcomm.dmm index 9c9809aad514..b512b276c9cc 100644 --- a/_maps/map_files220/generic/centcomm.dmm +++ b/_maps/map_files220/generic/centcomm.dmm @@ -7929,7 +7929,7 @@ /area/syndicate_mothership) "eKK" = ( /obj/structure/table/glass/reinforced/titanium, -/obj/item/food/limecakeslice, +/obj/item/food/sliced/lime_cake, /turf/simulated/floor/mineral/plastitanium, /area/centcom/ss220/general) "eLp" = ( @@ -14586,7 +14586,7 @@ /area/shuttle/syndicate) "iwf" = ( /obj/structure/table/wood, -/obj/item/food/chocolatecakeslice, +/obj/item/food/sliced/chocolate_cake, /turf/simulated/floor/wood/oak, /area/syndicate_mothership/elite_squad) "iwk" = ( @@ -25952,7 +25952,7 @@ /area/syndicate_mothership) "prs" = ( /obj/structure/table/glass, -/obj/item/food/applecakeslice{ +/obj/item/food/sliced/apple_cake{ pixel_y = 4 }, /obj/item/kitchen/utensil/fork{ @@ -28988,7 +28988,7 @@ /area/centcom/ss220/evac) "rjq" = ( /obj/structure/table/wood, -/obj/item/food/watermelonslice, +/obj/item/food/sliced/watermelon, /obj/effect/decal/syndie_logo{ icon_state = "logo11" }, @@ -39207,7 +39207,7 @@ /area/shuttle/syndicate) "xbg" = ( /obj/structure/table/glass, -/obj/item/food/bananacakeslice{ +/obj/item/food/sliced/banana_cake{ pixel_y = 4 }, /obj/item/kitchen/utensil/fork{ @@ -39854,7 +39854,7 @@ color = "#996633" }, /obj/item/food/sliceable/pizza/bacon, -/obj/item/food/lemoncakeslice, +/obj/item/food/sliced/lemon_cake, /turf/simulated/floor/plasteel/dark{ icon_state = "dark_large" }, diff --git a/_maps/map_files220/stations/boxstation.dmm b/_maps/map_files220/stations/boxstation.dmm index 1afbe6bd86a1..56c898f0be28 100644 --- a/_maps/map_files220/stations/boxstation.dmm +++ b/_maps/map_files220/stations/boxstation.dmm @@ -7312,7 +7312,7 @@ "aDq" = ( /obj/effect/decal/cleanable/dust, /obj/structure/table, -/obj/item/food/cheesewedge, +/obj/item/food/sliced/cheesewedge, /turf/simulated/floor/plating, /area/station/maintenance/fsmaint) "aDr" = ( @@ -60555,7 +60555,7 @@ /obj/structure/cable{ icon_state = "2-8" }, -/obj/item/food/tomatoslice, +/obj/item/food/sliced/tomato, /obj/machinery/atmospherics/pipe/simple/hidden/cyan{ dir = 4 }, @@ -67349,7 +67349,7 @@ /area/station/security/prisonershuttle) "mze" = ( /obj/structure/table/reinforced, -/obj/item/food/breadslice, +/obj/item/food/sliced/bread, /obj/item/reagent_containers/condiment/saltshaker{ pixel_x = -8; pixel_y = 11 @@ -87314,9 +87314,9 @@ /area/station/science/test_chamber) "tWD" = ( /obj/structure/closet/crate, -/obj/item/food/breadslice, -/obj/item/food/breadslice, -/obj/item/food/breadslice, +/obj/item/food/sliced/bread, +/obj/item/food/sliced/bread, +/obj/item/food/sliced/bread, /obj/item/food/grown/potato, /obj/item/food/grown/potato, /obj/item/food/grown/onion, diff --git a/_maps/map_files220/stations/deltastation.dmm b/_maps/map_files220/stations/deltastation.dmm index 3dc27e0de972..5b8fe1ce5163 100644 --- a/_maps/map_files220/stations/deltastation.dmm +++ b/_maps/map_files220/stations/deltastation.dmm @@ -72547,9 +72547,9 @@ /area/station/maintenance/starboard2) "lLS" = ( /obj/structure/closet/crate, -/obj/item/food/breadslice, -/obj/item/food/breadslice, -/obj/item/food/breadslice, +/obj/item/food/sliced/bread, +/obj/item/food/sliced/bread, +/obj/item/food/sliced/bread, /obj/item/food/grown/potato, /obj/item/food/grown/potato, /obj/item/food/grown/onion, @@ -105626,7 +105626,7 @@ "weH" = ( /obj/effect/decal/cleanable/dirt, /obj/structure/table/wood, -/obj/item/food/birthdaycakeslice, +/obj/item/food/sliced/birthday_cake, /turf/simulated/floor/plating, /area/station/maintenance/fsmaint) "weO" = ( diff --git a/_maps/map_files220/stations/metastation.dmm b/_maps/map_files220/stations/metastation.dmm index 4739e6e2e1a1..1924b75834f0 100644 --- a/_maps/map_files220/stations/metastation.dmm +++ b/_maps/map_files220/stations/metastation.dmm @@ -57650,7 +57650,7 @@ pixel_x = -4; pixel_y = 8 }, -/obj/item/food/carrotcakeslice{ +/obj/item/food/sliced/carrot_cake{ pixel_x = 8; pixel_y = -2 }, @@ -67816,9 +67816,9 @@ "qvp" = ( /obj/structure/closet/crate, /obj/effect/decal/cleanable/dirt, -/obj/item/food/breadslice, -/obj/item/food/breadslice, -/obj/item/food/breadslice, +/obj/item/food/sliced/bread, +/obj/item/food/sliced/bread, +/obj/item/food/sliced/bread, /obj/item/food/grown/potato, /obj/item/food/grown/potato, /obj/item/food/grown/onion, diff --git a/code/__DEFINES/icon_smoothing_defines.dm b/code/__DEFINES/icon_smoothing_defines.dm index 3f916b25c61b..961c11e3fcba 100644 --- a/code/__DEFINES/icon_smoothing_defines.dm +++ b/code/__DEFINES/icon_smoothing_defines.dm @@ -102,6 +102,7 @@ DEFINE_BITFIELD(smoothing_flags, list( #define SMOOTH_GROUP_REGULAR_WALLS S_OBJ(17) ///turf/simulated/wall, /obj/structure/falsewall #define SMOOTH_GROUP_REINFORCED_WALLS S_OBJ(18) ///turf/simulated/wall/r_wall, /obj/structure/falsewall/reinforced #define SMOOTH_GROUP_CULT_WALLS S_OBJ(19) ///turf/simulated/wall/cult +#define SMOOTH_GROUP_BACKROOMS_WALLS S_OBJ(20) ///turf/simulated/wall/backrooms, /obj/structure/falsewall/backrooms #define SMOOTH_GROUP_WINDOW_FULLTILE S_OBJ(21) ///turf/simulated/indestructible/fakeglass, /obj/structure/window/full/basic, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced, /obj/structure/window/full/reinforced #define SMOOTH_GROUP_WINDOW_FULLTILE_BRASS S_OBJ(22) ///obj/structure/window/brass/fulltile diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index e524369c4455..d15b60f05cdc 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -138,6 +138,7 @@ GLOBAL_LIST_INIT(glass_sheet_types, typecacheof(list( #define ispill(A) istype(A, /obj/item/reagent_containers/pill) #define ispatch(A) istype(A, /obj/item/reagent_containers/patch) #define isfood(A) istype(A, /obj/item/food) +#define is_color_text(thing) (istext(thing) && GLOB.regex_rgb_text.Find(thing)) // Modsuits #define ismodcontrol(A) istype(A, /obj/item/mod/control) diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm index ff56ca0501d8..4b652b5265d8 100644 --- a/code/__DEFINES/status_effects.dm +++ b/code/__DEFINES/status_effects.dm @@ -200,6 +200,7 @@ #define STATUS_EFFECT_HIGHFIVE /datum/status_effect/high_five #define STATUS_EFFECT_DAP /datum/status_effect/high_five/dap +#define STATUS_EFFECT_OFFERING_EFTPOS /datum/status_effect/high_five/offering_eftpos #define STATUS_EFFECT_HANDSHAKE /datum/status_effect/high_five/handshake #define STATUS_EFFECT_RPS /datum/status_effect/high_five/rps diff --git a/code/__DEFINES/tools_defines.dm b/code/__DEFINES/tools_defines.dm index 5cfb9c40ca6f..c2a7efed8bf9 100644 --- a/code/__DEFINES/tools_defines.dm +++ b/code/__DEFINES/tools_defines.dm @@ -6,6 +6,15 @@ #define TOOL_WRENCH "wrench" #define TOOL_WELDER "welder" +GLOBAL_LIST_INIT(construction_tool_behaviors, list( + TOOL_CROWBAR, + TOOL_MULTITOOL, + TOOL_SCREWDRIVER, + TOOL_WIRECUTTER, + TOOL_WRENCH, + TOOL_WELDER +)) + // Surgery tools #define TOOL_RETRACTOR "retractor" #define TOOL_HEMOSTAT "hemostat" diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index e6f5604890cb..490b714bf576 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -145,38 +145,33 @@ turfs += T return turfs - -//GLOBAL_VAR_INIT(debug_mob, 0) - -// Will recursively loop through an atom's contents and check for mobs, then it will loop through every atom in that atom's contents. -// It will keep doing this until it checks every content possible. This will fix any problems with mobs, that are inside objects, -// being unable to hear people due to being in a box within a bag. - -/proc/recursive_mob_check(atom/O, list/L = list(), recursion_limit = 3, client_check = TRUE, sight_check = TRUE) - if(!recursion_limit) - return L - for(var/atom/A in O.contents) - if(ismob(A)) - var/mob/M = A - if(client_check && !M.client) - L |= recursive_mob_check(A, L, recursion_limit - 1, client_check, sight_check) - continue - if(sight_check && !isInSight(A, O)) +/// Recursively loops through the contents of this atom looking for mobs, optionally requiring them to have a client. +/proc/collect_nested_mobs(atom/parent, list/mobs, recursion_limit = 3, client_check = TRUE) + var/list/next_layer = list(parent) + for(var/depth in 1 to recursion_limit) + var/list/layer = next_layer + next_layer = list() + for(var/thing in layer) + if(!ismob(thing)) continue - L |= M - for(var/mob/dead/observer/ghost in M.observers) - L |= ghost - //log_world("[recursion_limit] = [M] - [get_turf(M)] - ([M.x], [M.y], [M.z])") - - if(isobj(A) || ismob(A)) - L |= recursive_mob_check(A, L, recursion_limit - 1, client_check, sight_check) - return L + var/mob/this_mob = thing + if(!client_check || this_mob.client) + mobs += this_mob + for(var/mob/dead/observer/ghost in this_mob.observers) + if(!client_check || ghost.client) + mobs += ghost + if(!length(next_layer)) + return // The old system would loop through lists for a total of 5000 per function call, in an empty server. // This new system will loop at around 1000 in an empty server. /proc/get_mobs_in_view(R, atom/source, include_clientless = FALSE) // Returns a list of mobs in range of R from source. Used in radio and say code. +#ifdef GAME_TESTS + // kind of feels cleaner clobbering here than changing the loop? + include_clientless = TRUE +#endif var/turf/T = get_turf(source) var/list/hear = list() @@ -185,13 +180,8 @@ return hear for(var/atom/A in hear(R, T)) - if(ismob(A)) - var/mob/M = A - if(M.client || include_clientless) - hear += M - if(isobj(A) || ismob(A)) - hear |= recursive_mob_check(A, hear, 3, TRUE, FALSE) + collect_nested_mobs(A, hear, 3, !include_clientless) return hear diff --git a/code/_globalvars/_regexes.dm b/code/_globalvars/_regexes.dm index af98089fe4e4..f81643367593 100644 --- a/code/_globalvars/_regexes.dm +++ b/code/_globalvars/_regexes.dm @@ -1,3 +1,4 @@ GLOBAL_DATUM_INIT(filename_forbidden_chars, /regex, regex(@{""|[\\\n\t/?%*:|<>]|\.\."}, "g")) GLOBAL_DATUM_INIT(is_color, /regex, regex("^#\[0-9a-fA-F]{6}$")) +GLOBAL_DATUM_INIT(regex_rgb_text, /regex, regex(@"^#?(([0-9a-fA-F]{8})|([0-9a-fA-F]{6})|([0-9a-fA-F]{3}))$")) GLOBAL_PROTECT(filename_forbidden_chars) diff --git a/code/_globalvars/mapping_vars.dm b/code/_globalvars/mapping_vars.dm index 82f2d4d3348c..4fe2480d9059 100644 --- a/code/_globalvars/mapping_vars.dm +++ b/code/_globalvars/mapping_vars.dm @@ -22,6 +22,7 @@ GLOBAL_LIST_EMPTY(newplayer_start) GLOBAL_LIST_EMPTY(latejoin) GLOBAL_LIST_EMPTY(prisonwarp) //prisoners go to these GLOBAL_LIST_EMPTY(syndieprisonwarp) //contractor targets go to these +GLOBAL_LIST_EMPTY(backroomswarp) //backrooms hallucinators go to these GLOBAL_LIST_EMPTY(xeno_spawn)//Aliens spawn at these. GLOBAL_LIST_EMPTY(ertdirector) GLOBAL_LIST_EMPTY(emergencyresponseteamspawn) diff --git a/code/_onclick/ai_onclick.dm b/code/_onclick/ai_onclick.dm index a9d63f51c6bb..1068ed1b02dc 100644 --- a/code/_onclick/ai_onclick.dm +++ b/code/_onclick/ai_onclick.dm @@ -15,7 +15,10 @@ // But we return here since we don't want to do regular dblclick handling return - if(control_disabled || stat) return + if(control_disabled || stat) + return + if(ismecha(loc)) + return if(ismob(A)) ai_actual_track(A, TRUE) diff --git a/code/_onclick/observer_onclick.dm b/code/_onclick/observer_onclick.dm index 1b3955b5de94..71cf3b5037ad 100644 --- a/code/_onclick/observer_onclick.dm +++ b/code/_onclick/observer_onclick.dm @@ -83,7 +83,7 @@ if(!istype(user)) // Make sure user is actually an observer. Revenents also use attack_ghost, but do not have the health_scan var. return FALSE if(user.client) - if(user.gas_scan && atmos_scan(user=user, target=src, silent=TRUE)) + if(user.gas_scan && src.return_analyzable_air() && atmos_scan(user=user, target=src, silent=TRUE)) return TRUE // health + machine analyzer for ghosts diff --git a/code/controllers/subsystem/SSgarbage.dm b/code/controllers/subsystem/SSgarbage.dm index b98c3c0bc5ff..2d16a525ad9f 100644 --- a/code/controllers/subsystem/SSgarbage.dm +++ b/code/controllers/subsystem/SSgarbage.dm @@ -251,7 +251,7 @@ SUBSYSTEM_DEF(garbage) var/type = D.type var/refID = text_ref(D) - // del(D) SS220 EDIT - disable hard del (performance tweak) + del(D) tick = (TICK_USAGE - tick + ((world.time - ticktime) / world.tick_lag * 100)) diff --git a/code/controllers/subsystem/SSthrowing.dm b/code/controllers/subsystem/SSthrowing.dm index 16f9b57b9b64..80f5f4940127 100644 --- a/code/controllers/subsystem/SSthrowing.dm +++ b/code/controllers/subsystem/SSthrowing.dm @@ -257,6 +257,9 @@ SUBSYSTEM_DEF(throwing) else thrownthing.newtonian_move(init_dir) + // Attempt to reset glide size once throw ends + thrownthing.set_glide_size(initial(thrownthing.glide_size)) + if(target) thrownthing.throw_impact(target, src) if(QDELETED(thrownthing)) //throw_impact can delete things, such as glasses smashing diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index fa6044d15cc0..862cd1b26b90 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -261,6 +261,15 @@ font-family: "Courier New", monospace; font-size: 8pt; } + .var { + display: none; + } + .var.visible { + display: list-item; + } + .var.selected { + background-color: "#ffee88"; + } @@ -301,13 +310,15 @@ { try{ var li = lis\[i\]; - if(li.style.backgroundColor == "#ffee88") + if(li.className == "var visible" && li.style.backgroundColor == "#ffee88") { - if((i-1) >= 0){ - var li_new = lis\[i-1\]; - li.style.backgroundColor = "white"; - li_new.style.backgroundColor = "#ffee88"; - return + for(var j = i-1; j >= 0; --j) { + var li_new = lis\[j\]; + if(li_new.className == "var visible") { + li.style.backgroundColor = "white"; + li_new.style.backgroundColor = "#ffee88"; + return + } } } }catch(err) { } @@ -321,13 +332,15 @@ { try{ var li = lis\[i\]; - if(li.style.backgroundColor == "#ffee88") + if(li.className == "var visible" && li.style.backgroundColor == "#ffee88") { - if((i+1) < lis.length){ - var li_new = lis\[i+1\]; - li.style.backgroundColor = "white"; - li_new.style.backgroundColor = "#ffee88"; - return + for(var j = i+1; j < lis.length; ++j) { + var li_new = lis\[j\]; + if(li_new.className == "var visible") { + li.style.backgroundColor = "white"; + li_new.style.backgroundColor = "#ffee88"; + return + } } } }catch(err) { } @@ -335,38 +348,26 @@ return } - //This part here resets everything to how it was at the start so the filter is applied to the complete list. Screw efficiency, it's client-side anyway and it only looks through 200 or so variables at maximum anyway (mobs). - if(complete_list != null && complete_list != ""){ - var vars_ol1 = document.getElementById("vars"); - vars_ol1.innerHTML = complete_list - } document.cookie="[refid][cookieoffset]search="+encodeURIComponent(filter); - if(filter == ""){ - return; - }else{ - var vars_ol = document.getElementById('vars'); - var lis = vars_ol.getElementsByTagName("li"); - for(var i = 0; i < lis.length; ++i) - { - try{ - var li = lis\[i\]; - if(li.innerText.toLowerCase().indexOf(filter) == -1) - { - vars_ol.removeChild(li); - i--; - } - }catch(err) { } - } - } - var lis_new = vars_ol.getElementsByTagName("li"); - for(var j = 0; j < lis_new.length; ++j) + var vars_ol = document.getElementById('vars'); + var lis = vars_ol.getElementsByTagName("li"); + var first = true; + for(var i = 0; i < lis.length; ++i) { - var li1 = lis\[j\]; - if(j == 0){ - li1.style.backgroundColor = "#ffee88"; - }else{ - li1.style.backgroundColor = "white"; - } + try{ + var li = lis\[i\]; + li.style.backgroundColor = "white"; + if(li.innerText.toLowerCase().indexOf(filter) == -1) + { + li.className = "var"; + } else { + if(first) { + li.style.backgroundColor = "#ffee88"; + first = false; + } + li.className = "var visible"; + } + }catch(err) { } } } function selectTextField() { @@ -481,9 +482,9 @@ name = debug_list[name] // name is really the index until this line else value = debug_list[name] - header = "
  • (E) (C) (-) " + header = "
  • (E) (C) (-) " else - header = "
  • (E) (C) (M) " + header = "
  • (E) (C) (M) " else header = "
  • " @@ -491,6 +492,9 @@ if(isnull(value)) item = "[VV_HTML_ENCODE(name)] = null" + else if(is_color_text(value)) + item = "[VV_HTML_ENCODE(name)] =   \"[value]\"" + else if(istext(value)) item = "[VV_HTML_ENCODE(name)] = \"[VV_HTML_ENCODE(value)]\"" diff --git a/code/datums/spell_targeting/cone.dm b/code/datums/spell_targeting/cone.dm index 7cc9b7a95610..f8f852da5cf5 100644 --- a/code/datums/spell_targeting/cone.dm +++ b/code/datums/spell_targeting/cone.dm @@ -11,7 +11,7 @@ var/turf/turf_to_use = get_turf(user) var/turf/left_turf var/turf/right_turf - var/dir_to_use = get_dir(user, clicked_atom) + var/dir_to_use = user.dir var/right_dir var/left_dir switch(dir_to_use) diff --git a/code/datums/spells/cones/cone_spell.dm b/code/datums/spells/cones/cone_spell.dm index 11b249c9f0d3..7c5d15dd255c 100644 --- a/code/datums/spells/cones/cone_spell.dm +++ b/code/datums/spells/cones/cone_spell.dm @@ -1,6 +1,5 @@ /datum/spell/cone - /datum/spell/cone/create_new_targeting() return new /datum/spell_targeting/cone diff --git a/code/datums/status_effects/neutral.dm b/code/datums/status_effects/neutral.dm index 3e4235a448b2..35604217d511 100644 --- a/code/datums/status_effects/neutral.dm +++ b/code/datums/status_effects/neutral.dm @@ -140,6 +140,29 @@ /datum/status_effect/high_five/dap/get_missed_message() return "sadly can't find anybody to give daps to, and daps [owner.p_themselves()]. Shameful." +/datum/status_effect/high_five/offering_eftpos + id = "offering_eftpos" + request = "holds out an EFTPOS device." + item_path = /obj/item/eftpos + +/datum/status_effect/high_five/offering_eftpos/get_missed_message() + return "pulls back the EFTPOS device." + +/datum/status_effect/high_five/offering_eftpos/on_apply() + owner.custom_emote(EMOTE_VISIBLE, request) + owner.create_point_bubble_from_path(item_path, FALSE) + RegisterSignal(owner, COMSIG_ATOM_RANGED_ATTACKED, PROC_REF(on_ranged_attack)) + return TRUE + +/datum/status_effect/high_five/offering_eftpos/on_remove() + UnregisterSignal(owner, COMSIG_ATOM_RANGED_ATTACKED) + +/datum/status_effect/high_five/offering_eftpos/proc/on_ranged_attack(mob/living/me, mob/living/carbon/human/attacker) + SIGNAL_HANDLER // COMSIG_ATOM_RANGED_ATTACKED + if(get_dist(me, attacker) <= 2) + to_chat(attacker, "You need to have your ID in hand to scan it!") + return COMPONENT_CANCEL_ATTACK_CHAIN + /datum/status_effect/high_five/handshake id = "handshake" critical_success = "give each other an EPIC handshake!" diff --git a/code/game/area/centcom_areas.dm b/code/game/area/centcom_areas.dm index 98674bf344a8..7feeaf9dee43 100644 --- a/code/game/area/centcom_areas.dm +++ b/code/game/area/centcom_areas.dm @@ -135,3 +135,9 @@ requires_power = FALSE has_gravity = TRUE hide_attacklogs = TRUE + +/area/backrooms + name = "Backrooms" + icon_state = "yellow" + requires_power = FALSE + dynamic_lighting = DYNAMIC_LIGHTING_FORCED diff --git a/code/game/area/misc_areas.dm b/code/game/area/misc_areas.dm index e9bd5f40a6a4..1eda79444595 100644 --- a/code/game/area/misc_areas.dm +++ b/code/game/area/misc_areas.dm @@ -50,6 +50,7 @@ /area/game_test name = "Game Test Area" + requires_power = FALSE //SYNDICATES diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index c85ff6a05c3b..417a8c303ff6 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -190,47 +190,47 @@ QDEL_LIST_CONTENTS(L.grabbed_by) return TRUE -/obj/machinery/dna_scannernew/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/reagent_containers/glass)) +/obj/machinery/dna_scannernew/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/reagent_containers/glass)) if(beaker) to_chat(user, "A beaker is already loaded into the machine.") - return + return ITEM_INTERACT_COMPLETE if(!user.drop_item()) - to_chat(user, "\The [I] is stuck to you!") - return + to_chat(user, "\The [used] is stuck to you!") + return ITEM_INTERACT_COMPLETE - beaker = I + beaker = used SStgui.update_uis(src) - I.forceMove(src) - user.visible_message("[user] adds \a [I] to \the [src]!", "You add \a [I] to \the [src]!") - return + used.forceMove(src) + user.visible_message("[user] adds \a [used] to \the [src]!", "You add \a [used] to \the [src]!") + return ITEM_INTERACT_COMPLETE - if(istype(I, /obj/item/grab)) - var/obj/item/grab/G = I + if(istype(used, /obj/item/grab)) + var/obj/item/grab/G = used if(!ismob(G.affecting)) - return + return ITEM_INTERACT_COMPLETE if(occupant) to_chat(user, "The scanner is already occupied!") - return + return ITEM_INTERACT_COMPLETE if(G.affecting.abiotic()) to_chat(user, "Subject may not hold anything in their hands.") - return + return ITEM_INTERACT_COMPLETE if(G.affecting.has_buckled_mobs()) //mob attached to us to_chat(user, "[G] will not fit into [src] because [G.affecting.p_they()] [G.affecting.p_have()] a slime latched onto [G.affecting.p_their()] head.") - return + return ITEM_INTERACT_COMPLETE if(panel_open) to_chat(usr, "Close the maintenance panel first.") - return + return ITEM_INTERACT_COMPLETE put_in(G.affecting) add_fingerprint(user) qdel(G) - return + return ITEM_INTERACT_COMPLETE return ..() @@ -327,17 +327,18 @@ idle_power_consumption = 10 active_power_consumption = 400 -/obj/machinery/computer/scan_consolenew/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/disk/data)) //INSERT SOME diskS +/obj/machinery/computer/scan_consolenew/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/disk/data)) //INSERT SOME diskS if(!disk) user.drop_item() - I.forceMove(src) - disk = I - to_chat(user, "You insert [I].") + used.forceMove(src) + disk = used + to_chat(user, "You insert [used].") SStgui.update_uis(src) - return - else - return ..() + + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/computer/scan_consolenew/Initialize(mapload) . = ..() diff --git a/code/game/gamemodes/dynamic/antag_rulesets.dm b/code/game/gamemodes/dynamic/antag_rulesets.dm index 500f9aa419f1..9e251becabb5 100644 --- a/code/game/gamemodes/dynamic/antag_rulesets.dm +++ b/code/game/gamemodes/dynamic/antag_rulesets.dm @@ -156,6 +156,8 @@ var/datum/mind/antag = pick_n_take(possible_antags) antag.add_antag_datum(antagonist_type) + log_dynamic("Latespawned [late_antag_amount] [name]s.") + /datum/ruleset/traitor name = "Traitor" ruleset_weight = 11 @@ -228,7 +230,7 @@ banned_species_only = TRUE /datum/ruleset/implied/mindflayer/on_implied(datum/ruleset/implier) - // log_dynamic("Rolled implied [name]: +1 [name], -1 [implier.name].") + log_dynamic("Rolled implied [name]: +1 [name], -1 [implier.name].") implier.antag_amount -= 1 antag_amount += 1 was_triggered = TRUE diff --git a/code/game/gamemodes/dynamic/dynamic.dm b/code/game/gamemodes/dynamic/dynamic.dm index dfff3aa7aae3..d16bea196080 100644 --- a/code/game/gamemodes/dynamic/dynamic.dm +++ b/code/game/gamemodes/dynamic/dynamic.dm @@ -12,6 +12,9 @@ GLOBAL_LIST_EMPTY(dynamic_forced_rulesets) /// How much budget is left after roundstart antagonists roll var/budget_overflow = 0 + /// Log for what happens in a dynamic round + var/list/dynamic_log = list() + /datum/game_mode/dynamic/announce() to_chat(world, "The current game mode is - Dynamic") var/list/possible_rulesets = list() @@ -25,7 +28,7 @@ GLOBAL_LIST_EMPTY(dynamic_forced_rulesets) /datum/game_mode/dynamic/proc/allocate_ruleset_budget() var/ruleset_budget = text2num(GLOB.dynamic_forced_rulesets["budget"] || pickweight(list("0" = 3, "1" = 5, "2" = 12, "3" = 3))) // more likely to or 2 - // log_dynamic("Allocated gamemode budget: [ruleset_budget]") + log_dynamic("Allocated gamemode budget: [ruleset_budget]") var/list/possible_rulesets = list() for(var/datum/ruleset/ruleset as anything in subtypesof(/datum/ruleset)) if(ruleset.ruleset_weight <= 0) @@ -35,7 +38,7 @@ GLOBAL_LIST_EMPTY(dynamic_forced_rulesets) var/datum/ruleset/new_ruleset = new ruleset() possible_rulesets[new_ruleset] = new_ruleset.ruleset_weight - // log_dynamic("Available rulesets: [english_list(possible_rulesets)]") + log_dynamic("Available rulesets: [english_list(possible_rulesets)]") for(var/datum/ruleset/ruleset as anything in GLOB.dynamic_forced_rulesets) if(ruleset == "budget") @@ -45,7 +48,7 @@ GLOBAL_LIST_EMPTY(dynamic_forced_rulesets) if(!ispath(ruleset, /datum/ruleset)) stack_trace("Non-ruleset in GLOB.dynamic_forced_rulesets: \"[ruleset]\" ([ruleset?.type])") continue - // log_dynamic("Forcing ruleset: [ruleset.name]") + log_dynamic("Forcing ruleset: [ruleset.name]") ruleset_budget -= pick_ruleset(new ruleset, ruleset_budget, force = TRUE) for(var/datum/ruleset/old_ruleset in possible_rulesets) if(old_ruleset.type == ruleset) @@ -55,11 +58,11 @@ GLOBAL_LIST_EMPTY(dynamic_forced_rulesets) while(ruleset_budget >= 0) var/datum/ruleset/ruleset = pickweight(possible_rulesets) if(!ruleset) - // log_dynamic("No more available rulesets") + log_dynamic("No more available rulesets") return ruleset_budget -= pick_ruleset(ruleset, ruleset_budget) possible_rulesets -= ruleset - // log_dynamic("No more ruleset budget") + log_dynamic("No more ruleset budget") /datum/game_mode/dynamic/proc/pick_ruleset(datum/ruleset/ruleset, ruleset_budget, force) if(!ruleset) @@ -67,9 +70,9 @@ GLOBAL_LIST_EMPTY(dynamic_forced_rulesets) if(!force) var/failure_reason = ruleset.ruleset_possible(ruleset_budget, rulesets) if(failure_reason) - // log_dynamic("Failed [ruleset.name] ruleset: [failure_reason]") + log_dynamic("Failed [ruleset.name] ruleset: [failure_reason]") return - // log_dynamic("Rolled ruleset: [ruleset.name]") + log_dynamic("Rolled ruleset: [ruleset.name]") rulesets[ruleset] = ruleset.antag_weight . = ruleset.ruleset_cost // return the ruleset cost to be subtracted from the gamemode budget if(!ruleset.implied_ruleset_type) @@ -77,24 +80,24 @@ GLOBAL_LIST_EMPTY(dynamic_forced_rulesets) var/datum/ruleset/implied/implied = locate(ruleset.implied_ruleset_type) in implied_rulesets if(!implied) - // log_dynamic("Adding implied ruleset: [ruleset.implied_ruleset_type.name]") + log_dynamic("Adding implied ruleset: [ruleset.implied_ruleset_type.name]") implied = new ruleset.implied_ruleset_type implied_rulesets += implied implied.RegisterSignal(ruleset, implied.target_signal, TYPE_PROC_REF(/datum/ruleset/implied, on_implied)) /datum/game_mode/dynamic/proc/allocate_antagonist_budget() if(!length(rulesets)) - // log_dynamic("No rulesets in play.") + log_dynamic("No rulesets in play.") return var/budget = num_players() - // log_dynamic("Allocated antagonist budget: [budget].") + log_dynamic("Allocated antagonist budget: [budget].") for(var/datum/ruleset/ruleset in rulesets) ruleset.antag_amount = 1 budget -= ruleset.antag_cost - // log_dynamic("Automatic deduction: +1 [ruleset.name]. Remaining budget: [budget].") + log_dynamic("Automatic deduction: +1 [ruleset.name]. Remaining budget: [budget].") - // log_dynamic("Rulesets in play: [english_list((rulesets + implied_rulesets))]") + log_dynamic("Rulesets in play: [english_list((rulesets + implied_rulesets))]") apply_antag_budget(budget) @@ -103,42 +106,43 @@ GLOBAL_LIST_EMPTY(dynamic_forced_rulesets) while(budget >= 0) var/datum/ruleset/ruleset = pickweight(temp_rulesets) if(!ruleset) - // log_dynamic("No rulesets remaining. Remaining budget: [budget].") + log_dynamic("No rulesets remaining. Remaining budget: [budget].") budget_overflow = budget return if(!ruleset.antagonist_possible(budget)) - // log_dynamic("Rolled [ruleset.name]: failed, removing [ruleset.name] ruleset.") + log_dynamic("Rolled [ruleset.name]: failed, removing [ruleset.name] ruleset.") temp_rulesets -= ruleset continue ruleset.antag_amount++ budget -= ruleset.antag_cost - // log_dynamic("Rolled [ruleset.name]: success, +1 [ruleset.name]. Remaining budget: [budget].") - // log_dynamic("No more antagonist budget remaining.") + log_dynamic("Rolled [ruleset.name]: success, +1 [ruleset.name]. Remaining budget: [budget].") + log_dynamic("No more antagonist budget remaining.") /datum/game_mode/dynamic/pre_setup() - // var/watch = start_watch() - // log_dynamic("Starting dynamic setup.") + var/watch = start_watch() + log_dynamic("Starting dynamic setup.") allocate_ruleset_budget() - // log_dynamic("-=-=-=-=-=-=-=-=-=-=-=-=-") + log_dynamic("-=-=-=-=-=-=-=-=-=-=-=-=-") allocate_antagonist_budget() - // log_dynamic("=-=-=-=-=-=-=-=-=-=-=-=-=") + log_dynamic("=-=-=-=-=-=-=-=-=-=-=-=-=") for(var/datum/ruleset/ruleset in (rulesets + implied_rulesets)) // rulesets first, then implied rulesets - // log_dynamic("Applying [ruleset.antag_amount] [ruleset.name]\s.") + log_dynamic("Applying [ruleset.antag_amount] [ruleset.name]\s.") budget_overflow += ruleset.roundstart_pre_setup() - // log_dynamic("Budget overflow: [budget_overflow].") + log_dynamic("Budget overflow: [budget_overflow].") // for the future, maybe try readding antagonists with apply_antag_budget(budget_overflow) - // log_dynamic("Finished dynamic setup in [stop_watch(watch)]s") + log_dynamic("Finished dynamic setup in [stop_watch(watch)]s.") return TRUE /datum/game_mode/dynamic/post_setup() for(var/datum/ruleset/ruleset in (rulesets + implied_rulesets)) - // if(length(ruleset.pre_antags)) - // log_dynamic("Making antag datums for [ruleset.name] ruleset.") + if(length(ruleset.pre_antags)) + log_dynamic("Making antag datums for [ruleset.name] ruleset.") ruleset.roundstart_post_setup(src) if(ruleset.latespawn_time) addtimer(CALLBACK(ruleset, TYPE_PROC_REF(/datum/ruleset, latespawn), src), ruleset.latespawn_time) + log_dynamic("[ruleset]s will latespawn at [ruleset.latespawn_time / 600].") ..() /datum/game_mode/dynamic/latespawn(mob) @@ -156,6 +160,7 @@ GLOBAL_LIST_EMPTY(dynamic_forced_rulesets) for(var/datum/ruleset/possible_ruleset as anything in subtypesof(/datum/ruleset)) if(istype(antag, possible_ruleset.antagonist_type)) budget_overflow += possible_ruleset.antag_cost + log_dynamic("[possible_ruleset] cryo. +[possible_ruleset.antag_cost] budget.") /datum/game_mode/dynamic/get_webhook_name() var/list/implied_and_used = list() @@ -164,7 +169,9 @@ GLOBAL_LIST_EMPTY(dynamic_forced_rulesets) implied_and_used += implied return "[name] ([english_list(rulesets + implied_and_used, nothing_text = "Extended")])" -// /proc/log_dynamic(text) -// for(var/client/C in GLOB.admins) -// if(check_rights(R_DEBUG, FALSE, C.mob) && (C.prefs.toggles & PREFTOGGLE_CHAT_DEBUGLOGS)) -// to_chat(C, "DYNAMIC: [text]", MESSAGE_TYPE_DEBUG, confidential = TRUE) +/proc/log_dynamic(text) + log_game("Dynamic: [text]") + var/datum/game_mode/dynamic/dynamic = SSticker.mode + if(!istype(dynamic)) + return + dynamic.dynamic_log += text diff --git a/code/game/gamemodes/miniantags/abduction/machinery/console.dm b/code/game/gamemodes/miniantags/abduction/machinery/console.dm index f1539a992917..aaebe3544043 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/console.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/console.dm @@ -218,13 +218,15 @@ vest = V return TRUE -/obj/machinery/abductor/console/attackby__legacy__attackchain(obj/O, mob/user, params) - if(istype(O, /obj/item/abductor/gizmo) && AddGizmo(O)) +/obj/machinery/abductor/console/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/abductor/gizmo) && AddGizmo(used)) to_chat(user, "You link the tool to the console.") - else if(istype(O, /obj/item/clothing/suit/armor/abductor/vest) && AddVest(O)) + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/clothing/suit/armor/abductor/vest) && AddVest(used)) to_chat(user, "You link the vest to the console.") - else - return ..() + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/abductor/console/proc/Dispense(item,cost=1) if(experiment && experiment.credits >= cost) diff --git a/code/game/gamemodes/miniantags/abduction/machinery/dispenser.dm b/code/game/gamemodes/miniantags/abduction/machinery/dispenser.dm index 9d70325835a9..ce8c1ef9a0c2 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/dispenser.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/dispenser.dm @@ -82,16 +82,17 @@ return ui_interact(user) -/obj/machinery/abductor/gland_dispenser/attackby__legacy__attackchain(obj/item/W, mob/user, params) - if(istype(W, /obj/item/organ/internal/heart/gland)) +/obj/machinery/abductor/gland_dispenser/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/organ/internal/heart/gland)) if(!user.drop_item()) - return - W.forceMove(src) + return ITEM_INTERACT_COMPLETE + used.forceMove(src) for(var/i in 1 to length(gland_colors)) - if(gland_types[i] == W.type) + if(gland_types[i] == used.type) amounts[i]++ - else - return ..() + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/abductor/gland_dispenser/proc/Dispense(count) if(amounts[count]>0) diff --git a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm index 2084fdab665e..1d195d25f359 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm @@ -177,19 +177,19 @@ H.clear_restraints() return -/obj/machinery/abductor/experiment/attackby__legacy__attackchain(obj/item/G, mob/user) - if(istype(G, /obj/item/grab)) - var/obj/item/grab/grabbed = G +/obj/machinery/abductor/experiment/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/grab)) + var/obj/item/grab/grabbed = used if(!ishuman(grabbed.affecting)) - return + return ITEM_INTERACT_COMPLETE if(isabductor(grabbed.affecting)) - return + return ITEM_INTERACT_COMPLETE if(occupant) to_chat(user, "[src] is already occupied!") - return + return ITEM_INTERACT_COMPLETE if(grabbed.affecting.has_buckled_mobs()) //mob attached to us to_chat(user, "[grabbed.affecting] will not fit into [src] because [grabbed.affecting.p_they()] [grabbed.affecting.p_have()] a slime latched onto [grabbed.affecting.p_their()] head.") - return + return ITEM_INTERACT_COMPLETE visible_message("[user] puts [grabbed.affecting] into [src].") var/mob/living/carbon/human/H = grabbed.affecting H.forceMove(src) @@ -197,8 +197,9 @@ flash = "Machine ready." update_icon(UPDATE_ICON_STATE) add_fingerprint(user) - qdel(G) - return + qdel(used) + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/abductor/experiment/ex_act(severity) diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index 9baefc703068..df04fae1ac8e 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -168,33 +168,34 @@ GLOBAL_VAR(bomb_set) if(NUKE_CORE_FULLY_EXPOSED) . += core ? "nukecore3" : "nukecore4" -/obj/machinery/nuclearbomb/attackby__legacy__attackchain(obj/item/O as obj, mob/user as mob, params) - if(istype(O, /obj/item/disk/nuclear)) +/obj/machinery/nuclearbomb/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/disk/nuclear)) if(extended) if(auth) to_chat(user, "There's already a disk in the slot!") - return - if((istype(O, /obj/item/disk/nuclear/training) && !training) || (training && !istype(O, /obj/item/disk/nuclear/training))) - to_chat(user, "[O] doesn't fit into [src]!") - return + return ITEM_INTERACT_COMPLETE + if((istype(used, /obj/item/disk/nuclear/training) && !training) || (training && !istype(used, /obj/item/disk/nuclear/training))) + to_chat(user, "[used] doesn't fit into [src]!") + return ITEM_INTERACT_COMPLETE if(!user.drop_item()) - to_chat(user, "[O] is stuck to your hand!") - return - O.forceMove(src) - auth = O + to_chat(user, "[used] is stuck to your hand!") + return ITEM_INTERACT_COMPLETE + used.forceMove(src) + auth = used add_fingerprint(user) - return attack_hand(user) + attack_hand(user) + return ITEM_INTERACT_COMPLETE else to_chat(user, "You need to deploy [src] first.") - return - if(istype(O, /obj/item/stack/sheet/mineral/titanium) && removal_stage == NUKE_CORE_FULLY_EXPOSED) - var/obj/item/stack/S = O + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/stack/sheet/mineral/titanium) && removal_stage == NUKE_CORE_FULLY_EXPOSED) + var/obj/item/stack/S = used if(S.get_amount() < sheets_to_fix) to_chat(user, "You need at least [sheets_to_fix] sheets of titanium to repair [src]'s inner core plate!") - return + return ITEM_INTERACT_COMPLETE if(do_after(user, 2 SECONDS, target = src)) if(!loc || !S || S.get_amount() < sheets_to_fix) - return + return ITEM_INTERACT_COMPLETE S.use(sheets_to_fix) user.visible_message("[user] repairs [src]'s inner core plate.", \ "You repair [src]'s inner core plate. The radiation is contained.") @@ -202,43 +203,43 @@ GLOBAL_VAR(bomb_set) if(core) STOP_PROCESSING(SSobj, core) update_icon(UPDATE_OVERLAYS) - return - if(istype(O, /obj/item/stack/sheet/metal) && removal_stage == NUKE_CORE_PANEL_EXPOSED) - var/obj/item/stack/S = O + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/stack/sheet/metal) && removal_stage == NUKE_CORE_PANEL_EXPOSED) + var/obj/item/stack/S = used if(S.get_amount() < sheets_to_fix) to_chat(user, "You need at least [sheets_to_fix] sheets of metal to repair [src]'s outer core plate!") - return - if(do_after(user, 2 SECONDS, target = src)) + else if(do_after(user, 2 SECONDS, target = src)) if(!loc || !S || S.get_amount() < sheets_to_fix) - return + return ITEM_INTERACT_COMPLETE S.use(sheets_to_fix) user.visible_message("[user] repairs [src]'s outer core plate.", \ "You repair [src]'s outer core plate.") removal_stage = NUKE_CORE_EVERYTHING_FINE update_icon(UPDATE_OVERLAYS) - return - if(istype(O, /obj/item/nuke_core/plutonium) && removal_stage == NUKE_CORE_FULLY_EXPOSED) + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/nuke_core/plutonium) && removal_stage == NUKE_CORE_FULLY_EXPOSED) if(do_after(user, 2 SECONDS, target = src)) - if(!user.drop_item_to_ground(O)) - to_chat(user, "The [O] is stuck to your hand!") + if(!user.drop_item_to_ground(used)) + to_chat(user, "The [used] is stuck to your hand!") return - user.visible_message("[user] puts [O] back in [src].", "You put [O] back in [src].") - O.forceMove(src) - core = O + user.visible_message("[user] puts [used] back in [src].", "You put [used] back in [src].") + used.forceMove(src) + core = used update_icon(UPDATE_OVERLAYS) - return - if(istype(O, /obj/item/disk/plantgene)) + return ITEM_INTERACT_COMPLETE + + if(istype(used, /obj/item/disk/plantgene)) to_chat(user, "You try to plant the disk, but despite rooting around, it won't fit! After you branch out to read the instructions, you find out where the problem stems from. You've been bamboo-zled, this isn't a nuclear disk at all!") - return + return ITEM_INTERACT_COMPLETE - else if(istype(O, /obj/item/disk)) - if(O.icon_state == "datadisk4") //A similar green disk icon + else if(istype(used, /obj/item/disk)) + if(used.icon_state == "datadisk4") //A similar green disk icon to_chat(user, "You try to slot in the disk, but it won't fit! This isn't the NAD! If only you'd read the label...") - return + return ITEM_INTERACT_COMPLETE else to_chat(user, "You try to slot in the disk, but it won't fit. This isn't the NAD! It's not even the right colour...") - return + return ITEM_INTERACT_COMPLETE return ..() @@ -386,20 +387,24 @@ GLOBAL_VAR(bomb_set) /obj/machinery/nuclearbomb/attack_hand(mob/user as mob) if(!panel_open) - return ui_interact(user) + ui_interact(user) + return FINISH_ATTACK if(!Adjacent(user)) return if(removal_stage != NUKE_CORE_FULLY_EXPOSED || !core) - return wires.Interact(user) + wires.Interact(user) + return FINISH_ATTACK if(timing) //removing the core is less risk then cutting wires, and doesnt take long, so we should not let crew do it while the nuke is armed. You can however get to it, without the special screwdriver, if you put the NAD in. to_chat(user, "[core] won't budge, metal clamps keep it in!") - return + return FINISH_ATTACK user.visible_message("[user] starts to pull [core] out of [src]!", "You start to pull [core] out of [src]!") if(do_after(user, 5 SECONDS, target = src)) user.visible_message("[user] pulls [core] out of [src]!", "You pull [core] out of [src]! Might want to put it somewhere safe.") core.forceMove(loc) core = null + update_icon(UPDATE_OVERLAYS) + return FINISH_ATTACK /obj/machinery/nuclearbomb/ui_state(mob/user) return GLOB.physical_state diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm index b2dfdb8679cc..0bac558e2242 100644 --- a/code/game/machinery/PDApainter.dm +++ b/code/game/machinery/PDApainter.dm @@ -71,14 +71,15 @@ storedpda = null update_icon() -/obj/machinery/pdapainter/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(default_unfasten_wrench(user, I)) +/obj/machinery/pdapainter/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(default_unfasten_wrench(user, used)) power_change() - return - if(istype(I, /obj/item/pda)) + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/pda)) insertpda(user) - else - return ..() + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/pdapainter/welder_act(mob/user, obj/item/I) . = TRUE diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index d10068371063..acd184eecd2e 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -300,49 +300,49 @@ return FALSE add_fingerprint(usr) -/obj/machinery/sleeper/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/reagent_containers/glass) && user.a_intent != INTENT_HARM) +/obj/machinery/sleeper/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/reagent_containers/glass) && user.a_intent != INTENT_HARM) if(!beaker) if(!user.drop_item()) - to_chat(user, "[I] is stuck to you!") - return + to_chat(user, "[used] is stuck to you!") + return ITEM_INTERACT_COMPLETE - beaker = I - I.forceMove(src) - user.visible_message("[user] adds \a [I] to [src]!", "You add \a [I] to [src]!") + beaker = used + used.forceMove(src) + user.visible_message("[user] adds \a [used] to [src]!", "You add \a [used] to [src]!") SStgui.update_uis(src) - return + return ITEM_INTERACT_COMPLETE else to_chat(user, "The sleeper has a beaker already.") - return + return ITEM_INTERACT_COMPLETE - if(istype(I, /obj/item/grab)) - var/obj/item/grab/G = I + if(istype(used, /obj/item/grab)) + var/obj/item/grab/G = used if(panel_open) to_chat(user, "Close the maintenance panel first.") - return + return ITEM_INTERACT_COMPLETE if(!ismob(G.affecting)) - return + return ITEM_INTERACT_COMPLETE if(occupant) to_chat(user, "The sleeper is already occupied!") - return + return ITEM_INTERACT_COMPLETE if(G.affecting.has_buckled_mobs()) //mob attached to us to_chat(user, "[G.affecting] will not fit into [src] because [G.affecting.p_they()] [G.affecting.p_have()] a slime latched onto [G.affecting.p_their()] head.") - return + return ITEM_INTERACT_COMPLETE visible_message("[user] starts putting [G.affecting.name] into the sleeper.") if(do_after(user, 20, target = G.affecting)) if(occupant) to_chat(user, "The sleeper is already occupied!") - return + return ITEM_INTERACT_COMPLETE if(!G || !G.affecting) - return + return ITEM_INTERACT_COMPLETE var/mob/M = G.affecting M.forceMove(src) @@ -352,7 +352,7 @@ add_fingerprint(user) qdel(G) SStgui.update_uis(src) - return + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index ab53feea9596..a09c0b900b57 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -64,28 +64,28 @@ else icon_state = "bodyscanner-open" -/obj/machinery/bodyscanner/attackby__legacy__attackchain(obj/item/I, mob/user) - if(istype(I, /obj/item/grab)) - var/obj/item/grab/TYPECAST_YOUR_SHIT = I +/obj/machinery/bodyscanner/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/grab)) + var/obj/item/grab/TYPECAST_YOUR_SHIT = used if(panel_open) to_chat(user, "Close the maintenance panel first.") - return + return ITEM_INTERACT_COMPLETE if(!ishuman(TYPECAST_YOUR_SHIT.affecting)) - return + return ITEM_INTERACT_COMPLETE if(occupant) to_chat(user, "The scanner is already occupied!") - return + return ITEM_INTERACT_COMPLETE if(TYPECAST_YOUR_SHIT.affecting.has_buckled_mobs()) //mob attached to us to_chat(user, "[TYPECAST_YOUR_SHIT.affecting] will not fit into [src] because [TYPECAST_YOUR_SHIT.affecting.p_they()] [TYPECAST_YOUR_SHIT.affecting.p_have()] a fucking slime latched onto [TYPECAST_YOUR_SHIT.affecting.p_their()] head.") - return + return ITEM_INTERACT_COMPLETE var/mob/living/carbon/human/M = TYPECAST_YOUR_SHIT.affecting if(M.abiotic()) to_chat(user, "Subject may not hold anything in their hands.") - return + return ITEM_INTERACT_COMPLETE M.forceMove(src) occupant = M @@ -94,7 +94,7 @@ add_fingerprint(user) qdel(TYPECAST_YOUR_SHIT) SStgui.update_uis(src) - return + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/game/machinery/airlock_control/airlock_button.dm b/code/game/machinery/airlock_control/airlock_button.dm index a4f9ed2c77e7..649cce770091 100644 --- a/code/game/machinery/airlock_control/airlock_button.dm +++ b/code/game/machinery/airlock_control/airlock_button.dm @@ -32,11 +32,12 @@ GLOBAL_LIST_EMPTY(all_airlock_access_buttons) else icon_state = "access_button_off" -/obj/machinery/access_button/attackby__legacy__attackchain(obj/item/I, mob/user, params) - //Swiping ID on the access button - if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda)) +/obj/machinery/access_button/item_interaction(mob/living/user, obj/item/used, list/modifiers) + // Swiping ID on the access button + if(istype(used, /obj/item/card/id) || istype(used, /obj/item/pda)) attack_hand(user) - return + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/access_button/attack_ghost(mob/user) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index b002ff4405cf..091cb5a27b23 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -37,6 +37,7 @@ var/list/categories = list("Tools", "Electronics", "Construction", "Communication", "Security", "Machinery", "Medical", "Miscellaneous", "Dinnerware", "Imported") var/board_type = /obj/item/circuitboard/autolathe + var/disk_design_load_delay = 1.5 SECONDS /obj/machinery/autolathe/Initialize(mapload) . = ..() @@ -263,18 +264,18 @@ data["queue"] = null return data -/obj/machinery/autolathe/attackby__legacy__attackchain(obj/item/O, mob/user, params) +/obj/machinery/autolathe/item_interaction(mob/living/user, obj/item/used, list/modifiers) if(busy) to_chat(user, "The autolathe is busy. Please wait for completion of previous operation.") - return TRUE + return ITEM_INTERACT_COMPLETE if(stat) - return TRUE + return ITEM_INTERACT_COMPLETE // Disks in general - if(istype(O, /obj/item/disk)) - if(istype(O, /obj/item/disk/design_disk)) - var/obj/item/disk/design_disk/D = O + if(istype(used, /obj/item/disk)) + if(istype(used, /obj/item/disk/design_disk)) + var/obj/item/disk/design_disk/D = used if(D.blueprint) var/datum/design/design = D.blueprint // READ ONLY!! @@ -287,13 +288,13 @@ return TRUE user.visible_message( - "[user] begins to load \the [O] in \the [src]...", - "You begin to load a design from \the [O]...", + "[user] begins to load \the [used] in \the [src]...", + "You begin to load a design from \the [used]...", "You hear the chatter of a floppy drive." ) playsound(get_turf(src), 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, 1) busy = TRUE - if(do_after(user, 14.4, target = src)) + if(do_after(user, disk_design_load_delay, target = src)) imported[design.id] = TRUE files.AddDesign2Known(design) recipiecache = list() @@ -301,12 +302,12 @@ busy = FALSE else to_chat(user, "That disk does not have a design on it!") - return TRUE + return ITEM_INTERACT_COMPLETE else // So that people who are bad at computers don't shred their disks to_chat(user, "This is not the correct type of disk for the autolathe!") - return TRUE + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index bc793fadcc35..b0c397130804 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -141,37 +141,40 @@ toggle_cam(null, 0) ..() -/obj/machinery/camera/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) - var/msg = "You attach [I] into the assembly inner circuits." +/obj/machinery/camera/item_interaction(mob/living/user, obj/item/used, list/modifiers) + var/msg = "You attach [used] into the assembly inner circuits." var/msg2 = "The camera already has that upgrade!" - if(istype(I, /obj/item/stack/sheet/mineral/plasma) && panel_open) - if(!user.canUnEquip(I, FALSE)) - to_chat(user, "[I] is stuck to your hand!") - return + if(istype(used, /obj/item/stack/sheet/mineral/plasma) && panel_open) + if(!user.canUnEquip(used, FALSE)) + to_chat(user, "[used] is stuck to your hand!") + return ITEM_INTERACT_COMPLETE if(!isEmpProof()) - var/obj/item/stack/sheet/mineral/plasma/P = I + var/obj/item/stack/sheet/mineral/plasma/P = used upgradeEmpProof() to_chat(user, "[msg]") P.use(1) + return ITEM_INTERACT_COMPLETE else to_chat(user, "[msg2]") - else if(istype(I, /obj/item/assembly/prox_sensor) && panel_open) - if(!user.canUnEquip(I, FALSE)) - to_chat(user, "[I] is stuck to your hand!") - return + else if(istype(used, /obj/item/assembly/prox_sensor) && panel_open) + if(!user.canUnEquip(used, FALSE)) + to_chat(user, "[used] is stuck to your hand!") + return ITEM_INTERACT_COMPLETE if(!isMotion()) upgradeMotion() to_chat(user, "[msg]") - qdel(I) + qdel(used) else to_chat(user, "[msg2]") + return ITEM_INTERACT_COMPLETE + // OTHER - else if((istype(I, /obj/item/paper) || istype(I, /obj/item/pda)) && isliving(user)) + else if((istype(used, /obj/item/paper) || istype(used, /obj/item/pda)) && isliving(user)) if(!can_use()) to_chat(user, "You can't show something to a disabled camera!") - return + return ITEM_INTERACT_COMPLETE var/mob/living/U = user var/obj/item/paper/X = null @@ -179,12 +182,12 @@ var/itemname = "" var/info = "" - if(istype(I, /obj/item/paper)) - X = I + if(istype(used, /obj/item/paper)) + X = used itemname = X.name info = X.info else - PDA = I + PDA = used var/datum/data/pda/app/notekeeper/N = PDA.find_program(/datum/data/pda/app/notekeeper) if(N) itemname = PDA.name @@ -195,7 +198,7 @@ if(is_ai(O)) var/mob/living/silicon/ai/AI = O if(AI.control_disabled || (AI.stat == DEAD)) - return + return ITEM_INTERACT_COMPLETE if(U.name == "Unknown") to_chat(AI, "[U] holds \a [itemname] up to one of your cameras ...") else @@ -204,13 +207,11 @@ else if(O.client && O.client.eye == src) to_chat(O, "[U] holds \a [itemname] up to one of the cameras ...") O << browse("[itemname][info]", "window=[itemname]") - - else if(istype(I, /obj/item/laser_pointer)) - var/obj/item/laser_pointer/L = I + return ITEM_INTERACT_COMPLETE + else if(istype(used, /obj/item/laser_pointer)) + var/obj/item/laser_pointer/L = used L.laser_act(src, user) - else - return ..() - + return ITEM_INTERACT_COMPLETE /obj/machinery/camera/screwdriver_act(mob/user, obj/item/I) . = TRUE diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 3b1f8c908438..b60930e4be31 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -60,34 +60,35 @@ if(charging) . += "Current charge: [round(charging.percent(), 1)]%" -/obj/machinery/cell_charger/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/stock_parts/cell) && !panel_open) +/obj/machinery/cell_charger/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/stock_parts/cell) && !panel_open) if(stat & BROKEN) to_chat(user, "[src] is broken!") - return + return ITEM_INTERACT_COMPLETE if(!anchored) to_chat(user, "[src] isn't attached to the ground!") - return + return ITEM_INTERACT_COMPLETE if(charging) to_chat(user, "There is already a cell in the charger!") - return + return ITEM_INTERACT_COMPLETE else var/area/a = loc.loc // Gets our locations location, like a dream within a dream if(!isarea(a)) - return + return ITEM_INTERACT_COMPLETE if(!a.powernet.has_power(PW_CHANNEL_EQUIPMENT)) // There's no APC in this area, don't try to cheat power! to_chat(user, "[src] blinks red as you try to insert the cell!") - return + return ITEM_INTERACT_COMPLETE if(!user.drop_item()) - return + return ITEM_INTERACT_COMPLETE - I.forceMove(src) - charging = I + used.forceMove(src) + charging = used user.visible_message("[user] inserts a cell into the charger.", "You insert a cell into the charger.") check_level() update_icon(UPDATE_OVERLAYS) - else - return ..() + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/cell_charger/crowbar_act(mob/user, obj/item/I) if(panel_open && !charging && default_deconstruction_crowbar(user, I)) diff --git a/code/game/machinery/clonepod.dm b/code/game/machinery/clonepod.dm index 396f107fe9b1..d9cdc6277ef1 100644 --- a/code/game/machinery/clonepod.dm +++ b/code/game/machinery/clonepod.dm @@ -560,26 +560,25 @@ return RP return FALSE -//Attackby and x_acts -/obj/machinery/clonepod/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(I.is_open_container()) - return +/obj/machinery/clonepod/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(used.is_open_container()) + return ITEM_INTERACT_SKIP_TO_AFTER_ATTACK - if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda)) + if(istype(used, /obj/item/card/id) || istype(used, /obj/item/pda)) if(!allowed(user)) to_chat(user, "Access denied.") - return + return ITEM_INTERACT_COMPLETE switch(tgui_alert(user, "Perform an emergency ejection of [src]?", "Cloning pod", list("Yes", "No"))) if("Yes") eject_clone(TRUE) // GET OUT to_chat(user, "You force [src] to eject its clone!") log_admin("[key_name(user)] has activated a cloning pod's emergency eject at [COORD(src)] (clone: [key_name(clone)])") - return + return ITEM_INTERACT_COMPLETE - if(is_organ(I) || is_type_in_list(I, ALLOWED_ROBOT_PARTS)) //fun fact, robot parts aren't organs! - insert_organ(I, user) - return + if(is_organ(used) || is_type_in_list(used, ALLOWED_ROBOT_PARTS)) //fun fact, robot parts aren't organs! + insert_organ(used, user) + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index 5794a99269b6..a729cc402d45 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -35,6 +35,7 @@ /obj/machinery/computer/holodeck_control/Initialize(mapload) . = ..() linkedholodeck = locate(/area/holodeck/alphadeck) + RegisterSignal(src, COMSIG_ATTACK_BY, TYPE_PROC_REF(/datum, signal_cancel_attack_by)) /obj/machinery/computer/holodeck_control/Destroy() emergency_shutdown() @@ -43,9 +44,6 @@ /obj/machinery/computer/holodeck_control/attack_ai(mob/user) return attack_hand(user) -/obj/machinery/computer/holodeck_control/attackby__legacy__attackchain(obj/item/D, mob/user) - return - /obj/machinery/computer/holodeck_control/attack_ghost(mob/user) ui_interact(user) return ..() @@ -438,8 +436,9 @@ to_chat(user, "The station AI is not to interact with these devices.") return -/obj/machinery/readybutton/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) +/obj/machinery/readybutton/item_interaction(mob/living/user, obj/item/used, list/modifiers) to_chat(user, "The device is a solid button, there's nothing you can do with it!") + return ITEM_INTERACT_COMPLETE /obj/machinery/readybutton/attack_hand(mob/user) if(user.stat || stat & (BROKEN)) diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index dd3c3014f01e..a902fd306dfd 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -152,7 +152,8 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) else to_chat(user, "There is nothing to remove from the console.") -/obj/machinery/computer/card/attackby__legacy__attackchain(obj/item/card/id/id_card, mob/user, params) +/obj/machinery/computer/card/item_interaction(mob/living/user, obj/item/used, list/modifiers) + var/obj/item/card/id/id_card = used if(!istype(id_card)) return ..() if(istype(id_card, /obj/item/card/id/nct_data_chip)) @@ -172,6 +173,8 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) SStgui.update_uis(src) attack_hand(user) + return ITEM_INTERACT_COMPLETE + //Check if you can't touch a job in any way whatsoever /obj/machinery/computer/card/proc/job_blacklisted_full(datum/job/job) return (job.type in blacklisted_full) diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index c858e7668e52..6e4988b97f0a 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -47,42 +47,41 @@ P.console = null return ..() -/obj/machinery/computer/cloning/attackby__legacy__attackchain(obj/item/I, mob/user, params) - - if(!ismultitool(I)) +/obj/machinery/computer/cloning/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(!ismultitool(used)) return ..() - var/obj/item/multitool/M = I + var/obj/item/multitool/M = used if(!M.buffer) to_chat(user, "[M]'[M.p_s()] buffer is empty!") - return + return ITEM_INTERACT_COMPLETE if(istype(M.buffer, /obj/machinery/clonepod)) var/obj/machinery/clonepod/buffer_pod = M.buffer if(buffer_pod.console == src) to_chat(user, "[M.buffer] is already linked!") - return + return ITEM_INTERACT_COMPLETE pods += M.buffer buffer_pod.console = src to_chat(user, "[M.buffer] was successfully added to the cloning pod array.") if(!selected_pod) selected_pod = buffer_pod - return + return ITEM_INTERACT_COMPLETE if(istype(M.buffer, /obj/machinery/clonescanner)) var/obj/machinery/clonescanner/buffer_scanner = M.buffer if(scanner) to_chat(user, "There's already a linked scanner!") - return + return ITEM_INTERACT_COMPLETE scanner = buffer_scanner buffer_scanner.console = src to_chat(user, "[M.buffer] was successfully linked.") - return + return ITEM_INTERACT_COMPLETE to_chat(user, "[M.buffer] cannot be linked to [src].") - return + return ITEM_INTERACT_COMPLETE /obj/machinery/computer/cloning/attack_ai(mob/user) return attack_hand(user) diff --git a/code/game/machinery/computer/law.dm b/code/game/machinery/computer/law.dm index b21fa7102b0b..9da3b2c4e3ad 100644 --- a/code/game/machinery/computer/law.dm +++ b/code/game/machinery/computer/law.dm @@ -28,16 +28,19 @@ circuit = /obj/item/circuitboard/aiupload_broken return TRUE -/obj/machinery/computer/aiupload/attackby__legacy__attackchain(obj/item/O, mob/user, params) - if(!istype(O, /obj/item/ai_module)) +/obj/machinery/computer/aiupload/item_interaction(mob/living/user, obj/item/used, list/modifiers) + var/obj/item/ai_module/module = used + if(!istype(module)) return ..() if(!check_valid_selection(user)) - return + return ITEM_INTERACT_COMPLETE if(!emagged) //non-emag law change - var/obj/item/ai_module/M = O - return M.install(src) + module.install(src) + return ITEM_INTERACT_COMPLETE + apply_emag_laws(user) - return + + return ITEM_INTERACT_COMPLETE /// checks to ensure there is a selected AI, and that it is on the same Z level /obj/machinery/computer/aiupload/proc/check_valid_selection(mob/user) @@ -127,19 +130,20 @@ circuit = /obj/item/circuitboard/borgupload var/mob/living/silicon/robot/current = null -/obj/machinery/computer/borgupload/attackby__legacy__attackchain(obj/item/ai_module/module, mob/user, params) - if(istype(module, /obj/item/ai_module)) +/obj/machinery/computer/borgupload/item_interaction(mob/living/user, obj/item/used, list/modifiers) + var/obj/item/ai_module/module = used + if(istype(module)) if(!current)//no borg selected to_chat(user, "No borg selected. Please chose a target before proceeding with upload.") - return + return ITEM_INTERACT_COMPLETE var/turf/T = get_turf(current) if(!atoms_share_level(T, src)) to_chat(user, "Unable to establish a connection: You're too far away from the target silicon!") - return + return ITEM_INTERACT_COMPLETE module.install(src) - return - return ..() + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/computer/borgupload/attack_hand(mob/user) if(stat & NOPOWER) diff --git a/code/game/machinery/computer/medical_records.dm b/code/game/machinery/computer/medical_records.dm index 377765d49950..811c5c847109 100644 --- a/code/game/machinery/computer/medical_records.dm +++ b/code/game/machinery/computer/medical_records.dm @@ -63,9 +63,10 @@ active2 = null return ..() -/obj/machinery/computer/med_data/attackby__legacy__attackchain(obj/item/O, mob/user, params) - if(ui_login_attackby(O, user)) - return +/obj/machinery/computer/med_data/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(ui_login_attackby(used, user)) + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/computer/med_data/attack_hand(mob/user) diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index 5df576b11705..4778ba8a8233 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -21,16 +21,17 @@ GLOB.prisoncomputer_list -= src return ..() -/obj/machinery/computer/prisoner/attackby__legacy__attackchain(obj/item/O, mob/user, params) +/obj/machinery/computer/prisoner/item_interaction(mob/living/user, obj/item/used, list/modifiers) var/datum/ui_login/state = ui_login_get() if(state.logged_in) - var/obj/item/card/id/prisoner/I = O + var/obj/item/card/id/prisoner/I = used if(istype(I) && user.drop_item()) I.forceMove(src) inserted_id_uid = I.UID() - return - if(ui_login_attackby(O, user)) - return + return ITEM_INTERACT_COMPLETE + if(ui_login_attackby(used, user)) + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/computer/prisoner/attack_ai(mob/user) diff --git a/code/game/machinery/computer/security_records.dm b/code/game/machinery/computer/security_records.dm index bbcb1ad3a71c..8bebd9a7d527 100644 --- a/code/game/machinery/computer/security_records.dm +++ b/code/game/machinery/computer/security_records.dm @@ -57,9 +57,10 @@ record_security = null return ..() -/obj/machinery/computer/secure_data/attackby__legacy__attackchain(obj/item/O, mob/user, params) - if(ui_login_attackby(O, user)) - return +/obj/machinery/computer/secure_data/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(ui_login_attackby(used, user)) + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/computer/secure_data/attack_hand(mob/user) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index fdcfc2518104..765af9c34c68 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -450,64 +450,64 @@ name = initial(name) -/obj/machinery/cryopod/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/grab)) - var/obj/item/grab/G = I +/obj/machinery/cryopod/item_interaction(mob/living/user, obj/item/used, list/modifiers) + var/obj/item/grab/G = used + if(!istype(G)) + return ..() - if(occupant) - to_chat(user, "[src] is in use.") - return + if(occupant) + to_chat(user, "[src] is in use.") + return ITEM_INTERACT_COMPLETE - if(!ismob(G.affecting)) - return + if(!ismob(G.affecting)) + return ITEM_INTERACT_COMPLETE - if(!check_occupant_allowed(G.affecting)) - return + if(!check_occupant_allowed(G.affecting)) + return ITEM_INTERACT_COMPLETE - var/willing = null //We don't want to allow people to be forced into despawning. - var/mob/living/M = G.affecting - time_till_despawn = initial(time_till_despawn) + var/willing = null //We don't want to allow people to be forced into despawning. + var/mob/living/M = G.affecting + time_till_despawn = initial(time_till_despawn) - if(!istype(M) || M.stat == DEAD) - to_chat(user, "Dead people can not be put into cryo.") - return + if(!istype(M) || M.stat == DEAD) + to_chat(user, "Dead people can not be put into cryo.") + return ITEM_INTERACT_COMPLETE - if(M.client) - if(tgui_alert(M, "Would you like to enter long-term storage?", "Cryosleep", list("Yes", "No")) == "Yes") - if(!M || !G || !G.affecting) - return - willing = willing_time_divisor - else - willing = 1 + if(M.client) + if(tgui_alert(M, "Would you like to enter long-term storage?", "Cryosleep", list("Yes", "No")) == "Yes") + if(!M || !G || !G.affecting) + return ITEM_INTERACT_COMPLETE + willing = willing_time_divisor + else + willing = 1 - if(willing) + if(willing) - visible_message("[user] starts putting [G.affecting.name] into [src].") + visible_message("[user] starts putting [G.affecting.name] into [src].") - if(do_after(user, 20, target = G.affecting)) - if(!M || !G || !G.affecting) - return + if(do_after(user, 20, target = G.affecting)) + if(!M || !G || !G.affecting) + return ITEM_INTERACT_COMPLETE - if(occupant) - to_chat(user, "[src] is in use.") - return + if(occupant) + to_chat(user, "[src] is in use.") + return ITEM_INTERACT_COMPLETE - take_occupant(M, willing) + take_occupant(M, willing) - else //because why the fuck would you keep going if the mob isn't in the pod - to_chat(user, "You stop putting [M] into the cryopod.") - return + else //because why the fuck would you keep going if the mob isn't in the pod + to_chat(user, "You stop putting [M] into the cryopod.") + return ITEM_INTERACT_COMPLETE - icon_state = occupied_icon_state + icon_state = occupied_icon_state - M.throw_alert("cryopod", /atom/movable/screen/alert/ghost/cryo) - to_chat(M, "[on_enter_occupant_message]") - to_chat(M, "If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.") + M.throw_alert("cryopod", /atom/movable/screen/alert/ghost/cryo) + to_chat(M, "[on_enter_occupant_message]") + to_chat(M, "If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.") - take_occupant(M, willing) - else - return ..() + take_occupant(M, willing) + return ITEM_INTERACT_COMPLETE /obj/machinery/cryopod/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob) diff --git a/code/game/machinery/defib_mount.dm b/code/game/machinery/defib_mount.dm index ea7e911c2f39..6edc2deb731d 100644 --- a/code/game/machinery/defib_mount.dm +++ b/code/game/machinery/defib_mount.dm @@ -85,35 +85,36 @@ defib.paddles_on_defib = FALSE user.put_in_hands(defib.paddles) -/obj/machinery/defibrillator_mount/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) - if(istype(I, /obj/item/defibrillator)) +/obj/machinery/defibrillator_mount/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/defibrillator)) if(defib) to_chat(user, "There's already a defibrillator in [src]!") - return - if(I.flags & NODROP || !user.drop_item() || !I.forceMove(src)) - to_chat(user, "[I] is stuck to your hand!") - return - user.visible_message("[user] hooks up [I] to [src]!", \ - "You press [I] into the mount, and it clicks into place.") + return ITEM_INTERACT_COMPLETE + if(used.flags & NODROP || !user.drop_item() || !used.forceMove(src)) + to_chat(user, "[used] is stuck to your hand!") + return ITEM_INTERACT_COMPLETE + user.visible_message("[user] hooks up [used] to [src]!", \ + "You press [used] into the mount, and it clicks into place.") playsound(src, 'sound/machines/click.ogg', 50, TRUE) - defib = I + defib = used update_icon(UPDATE_OVERLAYS) - return - else if(defib && I == defib.paddles) + return ITEM_INTERACT_COMPLETE + else if(defib && used == defib.paddles) user.drop_item() - return - var/obj/item/card/id = I.GetID() + return ITEM_INTERACT_COMPLETE + var/obj/item/card/id = used.GetID() if(id) if(check_access(id) || SSsecurity_level.get_current_level_as_number() >= SEC_LEVEL_RED) //anyone can toggle the clamps in red alert! if(!defib) to_chat(user, "You can't engage the clamps on a defibrillator that isn't there.") - return + return ITEM_INTERACT_COMPLETE clamps_locked = !clamps_locked to_chat(user, "Clamps [clamps_locked ? "" : "dis"]engaged.") update_icon(UPDATE_OVERLAYS) else to_chat(user, "Insufficient access.") - return + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/defibrillator_mount/wrench_act(mob/user, obj/item/I) diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm index 427dc4585a6c..4143930ec3cb 100644 --- a/code/game/machinery/door_control.dm +++ b/code/game/machinery/door_control.dm @@ -35,9 +35,9 @@ else to_chat(user, "Error, no route to host.") -/obj/machinery/door_control/attackby__legacy__attackchain(obj/item/W, mob/user as mob, params) - if(istype(W, /obj/item/detective_scanner)) - return +/obj/machinery/door_control/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/detective_scanner)) + return ITEM_INTERACT_COMPLETE return ..() /obj/machinery/door_control/emag_act(user as mob) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 4455b7d26927..a900fd9a63fc 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -986,63 +986,67 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays) else to_chat(user, "The door is now in fast mode.") -/obj/machinery/door/airlock/attackby__legacy__attackchain(obj/item/C, mob/user, params) +/obj/machinery/door/airlock/item_interaction(mob/living/user, obj/item/used, list/modifiers) add_fingerprint(user) if(!headbutt_shock_check(user)) - return + return ITEM_INTERACT_COMPLETE if(panel_open) switch(security_level) if(AIRLOCK_SECURITY_NONE) - if(istype(C, /obj/item/stack/sheet/metal)) - var/obj/item/stack/sheet/metal/S = C + if(istype(used, /obj/item/stack/sheet/metal)) + var/obj/item/stack/sheet/metal/S = used if(S.get_amount() < 2) to_chat(user, "You need at least 2 metal sheets to reinforce [src].") - return + return ITEM_INTERACT_COMPLETE to_chat(user, "You start reinforcing [src]...") if(do_after(user, 20, 1, target = src)) if(!panel_open || !S.use(2)) - return + return ITEM_INTERACT_COMPLETE user.visible_message("[user] reinforces \the [src] with metal.", "You reinforce \the [src] with metal.") security_level = AIRLOCK_SECURITY_METAL update_icon() - return - else if(istype(C, /obj/item/stack/sheet/plasteel)) - var/obj/item/stack/sheet/plasteel/S = C + return ITEM_INTERACT_COMPLETE + else if(istype(used, /obj/item/stack/sheet/plasteel)) + var/obj/item/stack/sheet/plasteel/S = used if(S.get_amount() < 2) to_chat(user, "You need at least 2 plasteel sheets to reinforce [src].") - return + return ITEM_INTERACT_COMPLETE to_chat(user, "You start reinforcing [src]...") if(do_after(user, 20, 1, target = src)) if(!panel_open || !S.use(2)) - return + return ITEM_INTERACT_COMPLETE user.visible_message("[user] reinforces \the [src] with plasteel.", "You reinforce \the [src] with plasteel.") security_level = AIRLOCK_SECURITY_PLASTEEL modify_max_integrity(normal_integrity * AIRLOCK_INTEGRITY_MULTIPLIER) damage_deflection = AIRLOCK_DAMAGE_DEFLECTION_R update_icon() - return + return ITEM_INTERACT_COMPLETE - if(istype(C, /obj/item/assembly/signaler)) - return interact_with_panel(user) - else if(istype(C, /obj/item/pai_cable)) // -- TLE - var/obj/item/pai_cable/cable = C + if(istype(used, /obj/item/assembly/signaler)) + interact_with_panel(used) + return ITEM_INTERACT_COMPLETE + else if(istype(used, /obj/item/pai_cable)) // -- TLE + var/obj/item/pai_cable/cable = used cable.plugin(src, user) - else if(istype(C, /obj/item/paper) || istype(C, /obj/item/photo)) + return ITEM_INTERACT_COMPLETE + else if(istype(used, /obj/item/paper) || istype(used, /obj/item/photo)) if(note) to_chat(user, "There's already something pinned to this airlock! Use wirecutters or your hands to remove it.") - return - if(!user.transfer_item_to(C, src)) - to_chat(user, "For some reason, you can't attach [C]!") - return - C.add_fingerprint(user) - user.create_log(MISC_LOG, "put [C] on", src) - user.visible_message("[user] pins [C] to [src].", "You pin [C] to [src].") - note = C + return ITEM_INTERACT_COMPLETE + if(!user.transfer_item_to(used, src)) + to_chat(user, "For some reason, you can't attach [used]!") + return ITEM_INTERACT_COMPLETE + used.add_fingerprint(user) + user.create_log(MISC_LOG, "put [used] on", src) + user.visible_message("[user] pins [used] to [src].", "You pin [used] to [src].") + note = used update_icon() - else - return ..() + + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/door/airlock/screwdriver_act(mob/user, obj/item/I) if(!headbutt_shock_check(user)) diff --git a/code/game/machinery/doors/airlock_types.dm b/code/game/machinery/doors/airlock_types.dm index 686cf95dc02c..96632e6ce7dc 100644 --- a/code/game/machinery/doors/airlock_types.dm +++ b/code/game/machinery/doors/airlock_types.dm @@ -200,14 +200,15 @@ DA.update_appearance(UPDATE_NAME|UPDATE_ICON) qdel(src) -/obj/machinery/door/airlock/plasma/attackby__legacy__attackchain(obj/item/C, mob/user, params) - if(C.get_heat() > 300) +/obj/machinery/door/airlock/plasma/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(used.get_heat() > 300) message_admins("Plasma airlock ignited by [key_name_admin(user)] in ([x],[y],[z] - JMP)") log_game("Plasma airlock ignited by [key_name(user)] in ([x],[y],[z])") investigate_log("was ignited by [key_name(user)]","atmos") - ignite(C.get_heat()) - else - return ..() + ignite(used.get_heat()) + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/door/airlock/plasma/glass opacity = FALSE @@ -447,16 +448,17 @@ else lock(TRUE) -/obj/machinery/door/airlock/highsecurity/red/attackby__legacy__attackchain(obj/C, mob/user, params) +/obj/machinery/door/airlock/highsecurity/red/item_interaction(mob/living/user, obj/item/used, list/modifiers) if(!issilicon(user)) if(isElectrified()) if(shock(user, 75)) - return - if(istype(C, /obj/item/detective_scanner)) - return + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/detective_scanner)) + return ITEM_INTERACT_COMPLETE add_fingerprint(user) + return ..() /obj/machinery/door/airlock/highsecurity/red/welder_act(mob/user, obj/item/I) if(shock_user(user, 75)) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index c89fff93af6a..3363f4f661fe 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -256,13 +256,14 @@ /obj/machinery/door/proc/try_to_crowbar(mob/user, obj/item/I) return -/obj/machinery/door/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(HAS_TRAIT(src, TRAIT_CMAGGED) && I.can_clean()) //If the cmagged door is being hit with cleaning supplies, don't open it, it's being cleaned! - return +/obj/machinery/door/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(HAS_TRAIT(src, TRAIT_CMAGGED) && used.can_clean()) //If the cmagged door is being hit with cleaning supplies, don't open it, it's being cleaned! + return ITEM_INTERACT_SKIP_TO_AFTER_ATTACK - else if(!(I.flags & NOBLUDGEON) && user.a_intent != INTENT_HARM) + else if(!(used.flags & NOBLUDGEON) && user.a_intent != INTENT_HARM) try_to_activate_door(user) - return TRUE + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/door/crowbar_act(mob/user, obj/item/I) diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 39ff3baf9723..fbfe39d07dd8 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -124,11 +124,12 @@ "You open [src].") open(auto_close = FALSE) -/obj/machinery/door/firedoor/attackby__legacy__attackchain(obj/item/C, mob/user, params) +/obj/machinery/door/firedoor/item_interaction(mob/living/user, obj/item/used, list/modifiers) add_fingerprint(user) if(operating) - return + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/door/firedoor/try_to_activate_door(mob/user) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 09f76188f9c9..6350f640ebc8 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -313,10 +313,10 @@ operating = NONE return TRUE -/obj/machinery/door/window/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) +/obj/machinery/door/window/item_interaction(mob/living/user, obj/item/used, list/modifiers) //If it's in the process of opening/closing, ignore the click if(operating) - return + return ITEM_INTERACT_COMPLETE add_fingerprint(user) return ..() diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index 3c3c9998ee99..fe2ea2e65758 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -35,12 +35,12 @@ UnregisterSignal(SSdcs, COMSIG_GLOB_EXPLOSION) return ..() -/obj/machinery/doppler_array/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/disk/tech_disk)) - var/obj/item/disk/tech_disk/disk = I +/obj/machinery/doppler_array/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/disk/tech_disk)) + var/obj/item/disk/tech_disk/disk = used disk.load_tech(toxins_tech) to_chat(user, "You swipe the disk into [src].") - return + return ITEM_INTERACT_COMPLETE return ..() /obj/machinery/doppler_array/wrench_act(mob/user, obj/item/I) diff --git a/code/game/machinery/dye_generator.dm b/code/game/machinery/dye_generator.dm index 32891a83821d..29da54caf56d 100644 --- a/code/game/machinery/dye_generator.dm +++ b/code/game/machinery/dye_generator.dm @@ -50,17 +50,17 @@ dye_color = temp set_light(2, l_color = temp) -/obj/machinery/dye_generator/attackby__legacy__attackchain(obj/item/I, mob/user, params) +/obj/machinery/dye_generator/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(default_unfasten_wrench(user, used, time = 60)) + return ITEM_INTERACT_COMPLETE - if(default_unfasten_wrench(user, I, time = 60)) - return - - if(istype(I, /obj/item/hair_dye_bottle)) - var/obj/item/hair_dye_bottle/HD = I + if(istype(used, /obj/item/hair_dye_bottle)) + var/obj/item/hair_dye_bottle/HD = used user.visible_message("[user] fills [HD] up with some dye.","You fill [HD] up with some hair dye.") HD.dye_color = dye_color HD.update_icon() - return + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/dye_generator/obj_break(damage_flag) diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index e943b88119ed..e6b8638e5f05 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -125,26 +125,26 @@ FIRE ALARM alarm(rand(30/severity, 60/severity)) ..() -/obj/machinery/firealarm/attackby__legacy__attackchain(obj/item/I, mob/user, params) +/obj/machinery/firealarm/item_interaction(mob/living/user, obj/item/used, list/modifiers) add_fingerprint(user) if(wiresexposed) - if(buildstage == FIRE_ALARM_UNWIRED) - if(istype(I, /obj/item/stack/cable_coil)) - var/obj/item/stack/cable_coil/coil = I - if(!coil.use(5)) - to_chat(user, "You need a total of five cables to wire [src]!") - return - buildstage = FIRE_ALARM_READY - playsound(get_turf(src), I.usesound, 50, 1) - to_chat(user, "You wire [src]!") - update_icon() - if(buildstage == FIRE_ALARM_FRAME) - if(istype(I, /obj/item/firealarm_electronics)) - to_chat(user, "You insert the circuit!") - qdel(I) - buildstage = FIRE_ALARM_UNWIRED - update_icon() - return + if(buildstage == FIRE_ALARM_UNWIRED && istype(used, /obj/item/stack/cable_coil)) + var/obj/item/stack/cable_coil/coil = used + if(!coil.use(5)) + to_chat(user, "You need a total of five cables to wire [src]!") + return ITEM_INTERACT_COMPLETE + + buildstage = FIRE_ALARM_READY + playsound(get_turf(src), used.usesound, 50, 1) + to_chat(user, "You wire [src]!") + update_icon() + else if(buildstage == FIRE_ALARM_FRAME && istype(used, /obj/item/firealarm_electronics)) + to_chat(user, "You insert the circuit!") + qdel(used) + buildstage = FIRE_ALARM_UNWIRED + update_icon() + + return ITEM_INTERACT_COMPLETE return ..() /obj/machinery/firealarm/crowbar_act(mob/user, obj/item/I) diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm index 122dc3f8a625..281d1680205d 100644 --- a/code/game/machinery/floodlight.dm +++ b/code/game/machinery/floodlight.dm @@ -90,19 +90,21 @@ set_light(brightness_on) update_icon(UPDATE_ICON_STATE) -/obj/machinery/floodlight/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) - if(istype(W, /obj/item/stock_parts/cell)) +/obj/machinery/floodlight/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/stock_parts/cell)) if(open) if(cell) to_chat(user, "There is a power cell already installed.") else - playsound(loc, W.usesound, 50, TRUE) + playsound(loc, used.usesound, 50, TRUE) user.drop_item() - W.loc = src - cell = W + used.loc = src + cell = used to_chat(user, "You insert the power cell.") + update_icon(UPDATE_ICON_STATE) - return + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/floodlight/screwdriver_act(mob/living/user, obj/item/I) diff --git a/code/game/machinery/guestpass.dm b/code/game/machinery/guestpass.dm index 3fe784f09c6b..7a51b67bf8d9 100644 --- a/code/game/machinery/guestpass.dm +++ b/code/game/machinery/guestpass.dm @@ -60,19 +60,20 @@ . = ..() my_terminal_id = ++global_terminal_id -/obj/machinery/computer/guestpass/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/card/id/nct_data_chip)) - to_chat(user, "[I] does not seem compatible with this terminal!") - return - if(istype(I, /obj/item/card/id)) +/obj/machinery/computer/guestpass/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/card/id/nct_data_chip)) + to_chat(user, "[used] does not seem compatible with this terminal!") + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/card/id)) if(!scan) if(user.drop_item()) - I.forceMove(src) - scan = I + used.forceMove(src) + scan = used SStgui.update_uis(src) else to_chat(user, "There is already ID card inside.") - return + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/computer/guestpass/proc/get_changeable_accesses() diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index cecc1cf7a4fe..28134a989382 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -316,6 +316,8 @@ GLOBAL_LIST_EMPTY(holopads) return if(istype(robot)) interact(robot) + if(ismecha(ai.loc)) // AIs must exit mechs before activating holopads. + return /*There are pretty much only three ways to interact here. I don't need to check for client since they're clicking on an object. This may change in the future but for now will suffice.*/ diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index de84be7ef08c..3e1dc638f376 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -60,25 +60,27 @@ bag = null update_icon(UPDATE_OVERLAYS) -/obj/machinery/iv_drip/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/reagent_containers/iv_bag)) +/obj/machinery/iv_drip/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/reagent_containers/iv_bag)) if(bag) to_chat(user, "[src] already has an IV bag!") - return + return ITEM_INTERACT_COMPLETE if(!user.drop_item()) - return + return ITEM_INTERACT_COMPLETE - I.forceMove(src) - bag = I - to_chat(user, "You attach [I] to [src].") + used.forceMove(src) + bag = used + to_chat(user, "You attach [used] to [src].") update_icon(UPDATE_OVERLAYS) START_PROCESSING(SSmachines, src) - else if(bag && istype(I, /obj/item/reagent_containers)) - bag.attackby__legacy__attackchain(I) - I.afterattack__legacy__attackchain(bag, usr, TRUE) + return ITEM_INTERACT_COMPLETE + else if(bag && istype(used, /obj/item/reagent_containers)) + bag.attackby__legacy__attackchain(used) + used.afterattack__legacy__attackchain(bag, usr, TRUE) update_icon(UPDATE_OVERLAYS) - else - return ..() + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/iv_drip/deconstruct(disassembled = TRUE) if(!(flags & NODECONSTRUCT)) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 00fc7a172ce9..259b0ec4ab19 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -9,6 +9,7 @@ atom_say_verb = "beeps" flags_ricochet = RICOCHET_HARD receive_ricochet_chance_mod = 0.3 + new_attack_chain = TRUE var/stat = 0 /// How is this machine currently passively consuming power? @@ -33,6 +34,8 @@ /// This is if the machinery is being repaired var/being_repaired = FALSE + new_attack_chain = TRUE + /obj/machinery/Initialize(mapload) . = ..() GLOB.machines += src @@ -354,43 +357,45 @@ reregister_machine() power_change() -/obj/machinery/attackby__legacy__attackchain(obj/item/O, mob/user, params) - if(exchange_parts(user, O)) - return +/obj/machinery/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(exchange_parts(user, used)) + return ITEM_INTERACT_COMPLETE - if(istype(O, /obj/item/stack/nanopaste)) - var/obj/item/stack/nanopaste/N = O + if(istype(used, /obj/item/stack/nanopaste)) + var/obj/item/stack/nanopaste/N = used if(stat & BROKEN) to_chat(user, "[src] is too damaged to be fixed with nanopaste!") - return + return ITEM_INTERACT_COMPLETE if(obj_integrity == max_integrity) to_chat(user, "[src] is fully intact.") - return + return ITEM_INTERACT_COMPLETE if(being_repaired) - return + return ITEM_INTERACT_COMPLETE if(N.get_amount() < 1) to_chat(user, "You don't have enough to complete this task!") - return + return ITEM_INTERACT_COMPLETE - to_chat(user, "You start applying [O] to [src].") + to_chat(user, "You start applying [used] to [src].") being_repaired = TRUE var/result = do_after(user, 3 SECONDS, target = src) being_repaired = FALSE if(!result) - return + return ITEM_INTERACT_COMPLETE if(!N.use(1)) to_chat(user, "You don't have enough to complete this task!") // this is here, as we don't want to use nanopaste until you finish applying - return + return ITEM_INTERACT_COMPLETE obj_integrity = min(obj_integrity + 50, max_integrity) - user.visible_message("[user] applied some [O] at [src]'s damaged areas.",\ - "You apply some [O] at [src]'s damaged areas.") - else - return ..() + user.visible_message("[user] applied some [used] at [src]'s damaged areas.",\ + "You apply some [used] at [src]'s damaged areas.") + + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/proc/exchange_parts(mob/user, obj/item/storage/part_replacer/W) var/shouldplaysound = 0 diff --git a/code/game/machinery/mass_driver.dm b/code/game/machinery/mass_driver.dm index c14d22c3cad9..765a1fcd22c8 100644 --- a/code/game/machinery/mass_driver.dm +++ b/code/game/machinery/mass_driver.dm @@ -83,73 +83,63 @@ anchored = FALSE var/build = 0 -/obj/machinery/mass_driver_frame/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob) +/obj/machinery/mass_driver_frame/item_interaction(mob/living/user, obj/item/used, list/modifiers) switch(build) if(0) // Loose frame - if(iswrench(W)) + if(iswrench(used)) to_chat(user, "You begin to anchor [src] on the floor.") - playsound(get_turf(src), W.usesound, 50, TRUE) - if(do_after(user, 1 SECONDS * W.toolspeed, target = src) && (build == 0)) + playsound(get_turf(src), used.usesound, 50, TRUE) + if(do_after(user, 1 SECONDS * used.toolspeed, target = src) && (build == 0)) to_chat(user, "You anchor \the [src]!") anchored = TRUE build++ - return TRUE - return FALSE - + return ITEM_INTERACT_COMPLETE if(1) // Fixed to the floor - if(iswrench(W)) + if(iswrench(used)) to_chat(user, "You begin to de-anchor [src] from the floor.") - playsound(get_turf(src), W.usesound, 50, TRUE) - if(do_after(user, 1 SECONDS * W.toolspeed, target = src) && (build == 1)) + playsound(get_turf(src), used.usesound, 50, TRUE) + if(do_after(user, 1 SECONDS * used.toolspeed, target = src) && (build == 1)) build-- anchored = FALSE to_chat(user, "You de-anchored \the [src]!") - return TRUE - return FALSE - + return ITEM_INTERACT_COMPLETE if(2) // Welded to the floor - if(iscoil(W)) - var/obj/item/stack/cable_coil/C = W + if(iscoil(used)) + var/obj/item/stack/cable_coil/C = used to_chat(user, "You start adding cables to [src]...") playsound(get_turf(src), C.usesound, 50, TRUE) if(do_after(user, 20 * C.toolspeed, target = src) && (C.get_amount() >= 2) && (build == 2)) C.use(2) to_chat(user, "You've added cables to \the [src].") build++ - return TRUE - return FALSE - + return ITEM_INTERACT_COMPLETE if(3) // Wired - if(iswirecutter(W)) + if(iswirecutter(used)) to_chat(user, "You begin to remove the wiring from [src].") - if(do_after(user, 1 SECONDS * W.toolspeed, target = src) && (build == 3)) + if(do_after(user, 1 SECONDS * used.toolspeed, target = src) && (build == 3)) new /obj/item/stack/cable_coil(loc, 2) - playsound(get_turf(src), W.usesound, 50, 1) + playsound(get_turf(src), used.usesound, 50, 1) to_chat(user, "You've removed the cables from \the [src].") build-- - return TRUE + return ITEM_INTERACT_COMPLETE - if(istype(W, /obj/item/stack/rods)) - var/obj/item/stack/rods/R = W + if(istype(used, /obj/item/stack/rods)) + var/obj/item/stack/rods/R = used to_chat(user, "You begin to complete \the [src]...") playsound(get_turf(src), R.usesound, 50, 1) if(do_after(user, 20 * R.toolspeed, target = src) && (R.get_amount() >= 2) && (build == 3)) R.use(2) to_chat(user, "You've added the grille to \the [src].") build++ - return TRUE - - return FALSE - + return ITEM_INTERACT_COMPLETE if(4) // Grille in place - if(iscrowbar(W)) + if(iscrowbar(used)) to_chat(user, "You begin to pry off the grille from [src]...") - playsound(get_turf(src), W.usesound, 50, TRUE) - if(do_after(user, 3 SECONDS * W.toolspeed, target = src) && (build == 4)) + playsound(get_turf(src), used.usesound, 50, TRUE) + if(do_after(user, 3 SECONDS * used.toolspeed, target = src) && (build == 4)) new /obj/item/stack/rods(loc,2) build-- - return TRUE - return FALSE + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/game/machinery/merch_vendor.dm b/code/game/machinery/merch_vendor.dm index 17333ba48f36..853078c9251e 100644 --- a/code/game/machinery/merch_vendor.dm +++ b/code/game/machinery/merch_vendor.dm @@ -34,10 +34,10 @@ var/pp = replacetext(replacetext("[merch.typepath]", "/obj/item/", ""), "/", "-") imagelist[pp] = "[icon2base64(icon(initial(I.icon), initial(I.icon_state), SOUTH, 1))]" -/obj/machinery/economy/merch/attackby__legacy__attackchain(obj/item/I, mob/user) - if(isspacecash(I)) - insert_cash(I, user) - return TRUE +/obj/machinery/economy/merch/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(isspacecash(used)) + insert_cash(used, user) + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index 5568b941a78f..42c52696eaf1 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -82,12 +82,12 @@ icon_state = "navbeacon[open][invisibility ? "-f" : ""]" // if invisible, set icon to faded version // in case revealed by T-scanner -/obj/machinery/navbeacon/attackby__legacy__attackchain(obj/item/I, mob/user, params) +/obj/machinery/navbeacon/item_interaction(mob/living/user, obj/item/used, list/modifiers) var/turf/T = loc if(T.intact) - return // prevent intraction when T-scanner revealed + return ITEM_INTERACT_COMPLETE // prevent intraction when T-scanner revealed - else if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda)) + else if(istype(used, /obj/item/card/id) || istype(used, /obj/item/pda)) if(open) if(allowed(user)) locked = !locked @@ -97,8 +97,10 @@ updateDialog() else to_chat(user, "You must open the cover first!") - else - return ..() + + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/navbeacon/screwdriver_act(mob/living/user, obj/item/I) open = !open diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index b01568472112..05d5aae37baa 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -393,11 +393,11 @@ GLOBAL_LIST_EMPTY(turret_icons) to_chat(user, "You remove the turret but did not manage to salvage anything.") qdel(src) // qdel -/obj/machinery/porta_turret/attackby__legacy__attackchain(obj/item/I, mob/user) +/obj/machinery/porta_turret/item_interaction(mob/living/user, obj/item/used, list/modifiers) if((stat & BROKEN) && !syndicate) - return + return ITEM_INTERACT_COMPLETE - else if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda)) + else if(istype(used, /obj/item/card/id) || istype(used, /obj/item/pda)) if(HasController()) to_chat(user, "Turrets regulated by a nearby turret controller are not unlockable.") else if(allowed(user)) @@ -407,22 +407,23 @@ GLOBAL_LIST_EMPTY(turret_icons) else to_chat(user, "Access denied.") - return TRUE + return ITEM_INTERACT_COMPLETE if(user.a_intent == INTENT_HELP) return ..() + // otherwise, if the turret was attacked with the intention of harming it: user.changeNext_move(CLICK_CD_MELEE) user.do_item_attack_animation() playsound(src.loc, 'sound/weapons/smash.ogg', 60, 1) - if(I.force * 0.5 > 1) //if the force of impact dealt at least 1 damage, the turret gets pissed off + + //if the force of impact dealt at least 1 damage, the turret gets pissed off + if(used.force * 0.5 > 1) if(!attacked && !emagged) attacked = TRUE addtimer(VARSET_CALLBACK(src, attacked, FALSE), 6 SECONDS) - ..() - - + return ITEM_INTERACT_SKIP_TO_AFTER_ATTACK /obj/machinery/porta_turret/attack_animal(mob/living/simple_animal/M) M.changeNext_move(CLICK_CD_MELEE) @@ -873,66 +874,63 @@ GLOBAL_LIST_EMPTY(turret_icons) var/installation = null //the gun type installed var/gun_charge = 0 //the gun charge of the gun type installed - -/obj/machinery/porta_turret_construct/attackby__legacy__attackchain(obj/item/I, mob/user) +/obj/machinery/porta_turret_construct/item_interaction(mob/living/user, obj/item/used, list/modifiers) //this is a bit unwieldy but self-explanatory switch(build_step) if(0) //first step - if(iswrench(I) && !anchored) - playsound(loc, I.usesound, 100, 1) + if(iswrench(used) && !anchored) + playsound(loc, used.usesound, 100, 1) to_chat(user, "You secure the external bolts.") anchored = TRUE build_step = 1 - return + return ITEM_INTERACT_COMPLETE - else if(I.tool_behaviour == TOOL_CROWBAR && !anchored) - playsound(loc, I.usesound, 75, 1) + else if(used.tool_behaviour == TOOL_CROWBAR && !anchored) + playsound(loc, used.usesound, 75, 1) to_chat(user, "You dismantle the turret construction.") new /obj/item/stack/sheet/metal( loc, 5) qdel(src) // qdel - return + return ITEM_INTERACT_COMPLETE if(1) - if(istype(I, /obj/item/stack/sheet/metal)) - var/obj/item/stack/sheet/metal/M = I + if(istype(used, /obj/item/stack/sheet/metal)) + var/obj/item/stack/sheet/metal/M = used if(M.use(2)) to_chat(user, "You add some metal armor to the interior frame.") build_step = 2 icon_state = "turret_frame2" else to_chat(user, "You need two sheets of metal to continue construction.") - return + return ITEM_INTERACT_COMPLETE - else if(iswrench(I)) - playsound(loc, I.usesound, 75, 1) + else if(iswrench(used)) + playsound(loc, used.usesound, 75, 1) to_chat(user, "You unfasten the external bolts.") anchored = FALSE build_step = 0 - return - + return ITEM_INTERACT_COMPLETE if(2) - if(iswrench(I)) - playsound(loc, I.usesound, 100, 1) + if(iswrench(used)) + playsound(loc, used.usesound, 100, 1) to_chat(user, "You bolt the metal armor into place.") build_step = 3 - return + return ITEM_INTERACT_COMPLETE if(3) - if(istype(I, /obj/item/gun/energy)) //the gun installation part - + if(istype(used, /obj/item/gun/energy)) //the gun installation part if(isrobot(user)) - return - var/obj/item/gun/energy/E = I //typecasts the item to an energy gun - if(!user.unequip(I)) - to_chat(user, "\the [I] is stuck to your hand, you cannot put it in \the [src]") - return + return ITEM_INTERACT_COMPLETE + var/obj/item/gun/energy/E = used //typecasts the item to an energy gun + if(!user.unequip(used)) + to_chat(user, "\the [used] is stuck to your hand, you cannot put it in \the [src]") + return ITEM_INTERACT_COMPLETE if(!E.can_fit_in_turrets) - to_chat(user, "[I] will not operate correctly in [src].") - return - installation = I.type //installation becomes I.type + to_chat(user, "[used] will not operate correctly in [src].") + return ITEM_INTERACT_COMPLETE + installation = used.type //installation becomes used.type gun_charge = E.cell.charge //the gun's charge is stored in gun_charge - to_chat(user, "You add [I] to the turret.") + to_chat(user, "You add [used] to the turret.") if(istype(E, /obj/item/gun/energy/laser/tag/blue)) target_type = /obj/machinery/porta_turret/tag/blue @@ -942,51 +940,51 @@ GLOBAL_LIST_EMPTY(turret_icons) target_type = /obj/machinery/porta_turret build_step = 4 - qdel(I) //delete the gun :( qdel - return + qdel(used) //delete the gun :( + return ITEM_INTERACT_COMPLETE - else if(iswrench(I)) - playsound(loc, I.usesound, 100, 1) + else if(iswrench(used)) + playsound(loc, used.usesound, 100, 1) to_chat(user, "You remove the turret's metal armor bolts.") build_step = 2 - return + return ITEM_INTERACT_COMPLETE if(4) - if(isprox(I)) - if(!user.unequip(I, src)) - to_chat(user, "\the [I] is stuck to your hand, you cannot put it in \the [src]") - return + if(isprox(used)) + if(!user.unequip(used, src)) + to_chat(user, "\the [used] is stuck to your hand, you cannot put it in \the [src]") + return ITEM_INTERACT_COMPLETE build_step = 5 - qdel(I) // qdel + qdel(used) to_chat(user, "You add the prox sensor to the turret.") - return + return ITEM_INTERACT_COMPLETE //attack_hand() removes the gun if(5) - return + return ITEM_INTERACT_COMPLETE //screwdriver_act() handles screwing the panel closed //attack_hand() removes the prox sensor if(6) - if(istype(I, /obj/item/stack/sheet/metal)) - var/obj/item/stack/sheet/metal/M = I + if(istype(used, /obj/item/stack/sheet/metal)) + var/obj/item/stack/sheet/metal/M = used if(M.use(2)) to_chat(user, "You add some metal armor to the exterior frame.") build_step = 7 else to_chat(user, "You need two sheets of metal to continue construction.") - return + return ITEM_INTERACT_COMPLETE if(7) - if(I.tool_behaviour == TOOL_CROWBAR) - playsound(loc, I.usesound, 75, 1) + if(used.tool_behaviour == TOOL_CROWBAR) + playsound(loc, used.usesound, 75, 1) to_chat(user, "You pry off the turret's exterior armor.") new /obj/item/stack/sheet/metal(loc, 2) build_step = 6 - return + return ITEM_INTERACT_COMPLETE - ..() + return ..() /obj/machinery/porta_turret_construct/screwdriver_act(mob/living/user, obj/item/I) if(build_step != 6 && build_step != 5) diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index 0022fbcf0bc4..f8c301d507bb 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -30,45 +30,45 @@ for(var/obj/item/stock_parts/capacitor/C in component_parts) recharge_coeff = C.rating -/obj/machinery/recharger/attackby__legacy__attackchain(obj/item/G, mob/user, params) - var/allowed = is_type_in_list(G, allowed_devices) +/obj/machinery/recharger/item_interaction(mob/living/user, obj/item/used, list/modifiers) + var/allowed = is_type_in_list(used, allowed_devices) if(!allowed) return ..() - . = TRUE - if(!anchored) to_chat(user, "[src] isn't connected to anything!") - return + return ITEM_INTERACT_COMPLETE if(panel_open) to_chat(user, "Close the maintenance panel first!") - return + return ITEM_INTERACT_COMPLETE if(charging) to_chat(user, "There's \a [charging] inserted in [src] already!") - return + return ITEM_INTERACT_COMPLETE //Checks to make sure he's not in space doing it, and that the area got proper power. var/area/A = get_area(src) if(!istype(A) || !A.powernet.has_power(PW_CHANNEL_EQUIPMENT)) - to_chat(user, "[src] blinks red as you try to insert [G].") - return + to_chat(user, "[src] blinks red as you try to insert [used].") + return ITEM_INTERACT_COMPLETE - if(istype(G, /obj/item/gun/energy)) - var/obj/item/gun/energy/E = G + if(istype(used, /obj/item/gun/energy)) + var/obj/item/gun/energy/E = used if(!E.can_charge) to_chat(user, "Your gun has no external power connector.") - return + return ITEM_INTERACT_COMPLETE if(!user.drop_item()) - return + return ITEM_INTERACT_COMPLETE - G.forceMove(src) - charging = G + used.forceMove(src) + charging = used change_power_mode(ACTIVE_POWER_USE) - using_power = check_cell_needs_recharging(get_cell_from(G)) + using_power = check_cell_needs_recharging(get_cell_from(used)) update_icon() + return ITEM_INTERACT_COMPLETE + /obj/machinery/recharger/crowbar_act(mob/user, obj/item/I) if(panel_open && !charging && default_deconstruction_crowbar(user, I)) return TRUE diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 4dfa173b2a72..5701e7a81c38 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -292,44 +292,48 @@ GLOBAL_LIST_EMPTY(allRequestConsoles) if("toggleSilent") silent = !silent - -/obj/machinery/requests_console/attackby__legacy__attackchain(obj/item/I, mob/user) - if(istype(I, /obj/item/card/id)) - if(inoperable(MAINT)) - return - if(screen == RCS_MESSAUTH) - var/obj/item/card/id/T = I - msgVerified = "Verified by [T.registered_name] ([T.assignment])" - SStgui.update_uis(src) - if(screen == RCS_ANNOUNCE) - var/obj/item/card/id/ID = I - if(ACCESS_RC_ANNOUNCE in ID.GetAccess()) - announceAuth = TRUE - announcer.author = ID.assignment ? "[ID.assignment] [ID.registered_name]" : ID.registered_name - else - reset_message() - to_chat(user, "You are not authorized to send announcements.") - SStgui.update_uis(src) - if(screen == RCS_SECONDARY) - var/obj/item/card/id/ID = I - if(ID) - secondaryGoalAuth = TRUE - goalRequester = ID - has_active_secondary_goal = check_for_active_secondary_goal(goalRequester) - if(screen == RCS_SHIPPING) - var/obj/item/card/id/T = I - msgVerified = "Sender verified as [T.registered_name] ([T.assignment])" - SStgui.update_uis(src) - if(istype(I, /obj/item/stamp)) - if(inoperable(MAINT)) - return - if(screen == RCS_MESSAUTH) - var/obj/item/stamp/T = I - msgStamped = "Stamped with the [T.name]" +/obj/machinery/requests_console/item_interaction(mob/living/user, obj/item/used, list/modifiers) + var/obj/item/stamp/stamp = used + if(istype(stamp)) + if(screen == RCS_MESSAUTH && !inoperable(MAINT)) + msgStamped = "Stamped with the [stamp.name]" SStgui.update_uis(src) - else + + return ITEM_INTERACT_COMPLETE + + var/obj/item/card/id/id_card = used + if(!istype(id_card)) return ..() + if(inoperable(MAINT)) + return ITEM_INTERACT_COMPLETE + if(screen == RCS_MESSAUTH) + msgVerified = "Verified by [id_card.registered_name] ([id_card.assignment])" + SStgui.update_uis(src) + return ITEM_INTERACT_COMPLETE + if(screen == RCS_ANNOUNCE) + if(ACCESS_RC_ANNOUNCE in id_card.GetAccess()) + announceAuth = TRUE + announcer.author = id_card.assignment ? "[id_card.assignment] [id_card.registered_name]" : id_card.registered_name + else + reset_message() + to_chat(user, "You are not authorized to send announcements.") + SStgui.update_uis(src) + return ITEM_INTERACT_COMPLETE + if(screen == RCS_SECONDARY) + secondaryGoalAuth = TRUE + goalRequester = id_card + has_active_secondary_goal = check_for_active_secondary_goal(goalRequester) + + return ITEM_INTERACT_COMPLETE + if(screen == RCS_SHIPPING) + msgVerified = "Sender verified as [id_card.registered_name] ([id_card.assignment])" + SStgui.update_uis(src) + + return ITEM_INTERACT_COMPLETE + + return ..() + /obj/machinery/requests_console/proc/reset_message(mainmenu = FALSE) message = "" recipient = "" diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index 2a8a67c77889..95c512659d38 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -232,17 +232,18 @@ else to_chat(user, "The device must first be secured to the floor.") -/obj/machinery/shieldgen/attackby__legacy__attackchain(obj/item/I as obj, mob/user as mob, params) - if(istype(I, /obj/item/card/emag)) +/obj/machinery/shieldgen/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/card/emag)) malfunction = TRUE update_icon(UPDATE_ICON_STATE) - else if(istype(I, /obj/item/stack/cable_coil) && malfunction && is_open) - var/obj/item/stack/cable_coil/coil = I + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/stack/cable_coil) && malfunction && is_open) + var/obj/item/stack/cable_coil/coil = used to_chat(user, "You begin to replace the wires.") if(do_after(user, 30 * coil.toolspeed, target = src)) if(!src || !coil) - return + return ITEM_INTERACT_COMPLETE coil.use(1) health = max_health malfunction = FALSE @@ -250,15 +251,17 @@ to_chat(user, "You repair [src]!") update_icon(UPDATE_ICON_STATE) - else if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda)) + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/card/id) || istype(used, /obj/item/pda)) if(allowed(user)) locked = !locked to_chat(user, "The controls are now [locked ? "locked." : "unlocked."]") else to_chat(user, "Access denied.") - else - return ..() + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/shieldgen/screwdriver_act(mob/user, obj/item/I) . = TRUE @@ -427,17 +430,18 @@ var/list/L = active_shields["[direction]"] L -= SW -/obj/machinery/shieldwallgen/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/card/id)||istype(I, /obj/item/pda)) +/obj/machinery/shieldwallgen/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/card/id)||istype(used, /obj/item/pda)) if(allowed(user)) locked = !locked to_chat(user, "Controls are now [locked ? "locked." : "unlocked."]") else to_chat(user, "Access denied.") - else - add_fingerprint(user) - ..() + return ITEM_INTERACT_COMPLETE + + add_fingerprint(user) + return ..() /obj/machinery/shieldwallgen/wrench_act(mob/user, obj/item/I) . = TRUE @@ -583,7 +587,7 @@ phaseout() return ..() -/obj/machinery/shieldwall/syndicate/attackby__legacy__attackchain(obj/item/W, mob/user, params) +/obj/machinery/shieldwall/syndicate/item_interaction(mob/living/user, obj/item/used, list/modifiers) phaseout() return ..() diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index ac81b6e71d36..e534e3b47395 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -50,28 +50,25 @@ cell.emp_act(severity) ..(severity) -/obj/machinery/space_heater/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/stock_parts/cell)) - if(open) - if(cell) - to_chat(user, "There is already a power cell inside.") - return - else - // insert cell - var/obj/item/stock_parts/cell/C = user.get_active_hand() - if(istype(C)) - if(user.drop_item()) - cell = C - C.forceMove(src) - C.add_fingerprint(user) +/obj/machinery/space_heater/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(!istype(used, /obj/item/stock_parts/cell)) + return ..() - user.visible_message("[user] inserts a power cell into [src].", "You insert the power cell into [src].") - else - to_chat(user, "The hatch must be open to insert a power cell.") - return + if(!open) + to_chat(user, "The hatch must be open to insert a power cell.") + return ITEM_INTERACT_COMPLETE + if(cell) + to_chat(user, "There is already a power cell inside.") + return ITEM_INTERACT_COMPLETE else - return ..() + // insert cell + var/obj/item/stock_parts/cell/C = user.get_active_hand() + C.add_fingerprint(user) + user.visible_message("[user] inserts a power cell into [src].",\ + "You insert the power cell into [src].") + + return ITEM_INTERACT_COMPLETE /obj/machinery/space_heater/screwdriver_act(mob/user, obj/item/I) . = TRUE diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 630da09c7843..b47552df0ab9 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -135,7 +135,7 @@ /obj/machinery/suit_storage_unit/security/hos name = "Head of Security's suit storage unit" - mask_type = /obj/item/clothing/mask/gas/sechailer/hos + mask_type = /obj/item/clothing/mask/gas/sechailer/swat/hos suit_type = /obj/item/mod/control/pre_equipped/safeguard req_access = list(ACCESS_HOS) @@ -317,10 +317,10 @@ . += "[base_icon_state]_[occupant ? "body" : "ready"]" -/obj/machinery/suit_storage_unit/attackby__legacy__attackchain(obj/item/I, mob/user, params) +/obj/machinery/suit_storage_unit/item_interaction(mob/living/user, obj/item/used, list/modifiers) if(shocked) if(shock(user, 100)) - return + return ITEM_INTERACT_COMPLETE if(!is_operational()) if(user.a_intent != INTENT_HELP) return ..() @@ -328,18 +328,19 @@ to_chat(usr, "Close the maintenance panel first.") else to_chat(usr, "The unit is not operational.") - return + return ITEM_INTERACT_COMPLETE if(panel_open) wires.Interact(user) - return + return ITEM_INTERACT_COMPLETE if(state_open) - if(store_item(I, user)) + if(store_item(used, user)) update_icon(UPDATE_OVERLAYS) SStgui.update_uis(src) - to_chat(user, "You load [I] into the storage compartment.") + to_chat(user, "You load [used] into the storage compartment.") else - to_chat(user, "You can't fit [I] into [src]!") - return + to_chat(user, "You can't fit [used] into [src]!") + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/suit_storage_unit/crowbar_act(mob/living/user, obj/item/I) diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index 0324d2e41d27..d0841d27591f 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -114,21 +114,24 @@ else . = timer_set -/obj/machinery/syndicatebomb/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/assembly/signaler)) +/obj/machinery/syndicatebomb/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/assembly/signaler)) if(open_panel) wires.Interact(user) - else if(istype(I, /obj/item/bombcore)) + + return ITEM_INTERACT_COMPLETE + else if(istype(used, /obj/item/bombcore)) if(!payload) if(!user.drop_item()) - return - payload = I + return ITEM_INTERACT_COMPLETE + payload = used to_chat(user, "You place [payload] into [src].") payload.forceMove(src) else to_chat(user, "[payload] is already loaded into [src], you'll have to remove it first.") - else - return ..() + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/syndicatebomb/wrench_act(mob/user, obj/item/I) if(!can_unanchor) diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index d8b133a3eb2c..b1a030c91b9b 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -47,17 +47,18 @@ power_station = locate(/obj/machinery/teleport/station, orange(1, src)) return power_station -/obj/machinery/computer/teleporter/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) - if(istype(I, /obj/item/gps)) - var/obj/item/gps/L = I +/obj/machinery/computer/teleporter/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/gps)) + var/obj/item/gps/L = used if(L.locked_location && !(stat & (NOPOWER|BROKEN))) if(!user.transfer_item_to(L, src)) - to_chat(user, "[I] is stuck to your hand, you cannot put it in [src]") - return + to_chat(user, "[used] is stuck to your hand, you cannot put it in [src]") + return ITEM_INTERACT_COMPLETE locked = L to_chat(user, "You insert the GPS device into [src]'s slot.") - else - return ..() + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/computer/teleporter/emag_act(mob/user) if(!emagged) @@ -641,16 +642,16 @@ teleporter_console = null return ..() -/obj/machinery/teleport/station/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(panel_open && istype(I, /obj/item/circuitboard/teleporter_perma)) +/obj/machinery/teleport/station/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(panel_open && istype(used, /obj/item/circuitboard/teleporter_perma)) if(!teleporter_console) to_chat(user, "[src] is not linked to a teleporter console.") - return + return ITEM_INTERACT_COMPLETE - var/obj/item/circuitboard/teleporter_perma/C = I + var/obj/item/circuitboard/teleporter_perma/C = used C.target = teleporter_console.target to_chat(user, "You copy the targeting information from [src] to [C].") - return + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm index cbd4bc6bc3f5..70f06f79b0dd 100644 --- a/code/game/machinery/transformer.dm +++ b/code/game/machinery/transformer.dm @@ -313,17 +313,17 @@ domutcheck(H, MUTCHK_FORCED) H.update_mutations() -/obj/machinery/transformer/gene_applier/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) - if(istype(I, /obj/item/disk/data)) +/obj/machinery/transformer/gene_applier/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/disk/data)) if(locked) to_chat(user, "Access Denied.") - return FALSE - var/obj/item/disk/data/D = I + return ITEM_INTERACT_COMPLETE + var/obj/item/disk/data/D = used if(!D.buf) to_chat(user, "Error: No data found.") - return FALSE + return ITEM_INTERACT_COMPLETE template = D.buf.dna.Clone() to_chat(user, "Upload of gene template for '[template.real_name]' complete!") - return TRUE - else - return ..() + return ITEM_INTERACT_COMPLETE + + return ..() diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm index bdc87cd7d9c5..8b8b2b601072 100644 --- a/code/game/machinery/turret_control.dm +++ b/code/game/machinery/turret_control.dm @@ -106,18 +106,19 @@ return FALSE -/obj/machinery/turretid/attackby__legacy__attackchain(obj/item/W, mob/user) +/obj/machinery/turretid/item_interaction(mob/living/user, obj/item/used, list/modifiers) if(stat & BROKEN) - return + return ITEM_INTERACT_COMPLETE - if(istype(W, /obj/item/card/id)||istype(W, /obj/item/pda)) + if(istype(used, /obj/item/card/id)||istype(used, /obj/item/pda)) if(src.allowed(usr)) if(emagged) to_chat(user, "The turret control is unresponsive.") else locked = !locked to_chat(user, "You [ locked ? "lock" : "unlock"] the panel.") - return + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/turretid/emag_act(user as mob) diff --git a/code/game/machinery/vendors/vending.dm b/code/game/machinery/vendors/vending.dm index 079765b8ea5b..83fbf735df64 100644 --- a/code/game/machinery/vendors/vending.dm +++ b/code/game/machinery/vendors/vending.dm @@ -338,25 +338,25 @@ if(user && (!Adjacent(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))) return COMPONENT_BLOCK_UNTILT -/obj/machinery/economy/vending/attackby__legacy__attackchain(obj/item/I, mob/user, params) +/obj/machinery/economy/vending/item_interaction(mob/living/user, obj/item/used, list/modifiers) if(tilted) if(user.a_intent == INTENT_HELP) to_chat(user, "[src] is tipped over and non-functional! You'll need to right it first.") - return + return ITEM_INTERACT_COMPLETE return ..() - if(isspacecash(I)) - insert_cash(I, user) - return - if(istype(I, /obj/item/coin)) + if(isspacecash(used)) + insert_cash(used, user) + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/coin)) to_chat(user, "[src] does not accept coins.") - return - if(refill_canister && istype(I, refill_canister)) + return ITEM_INTERACT_COMPLETE + if(refill_canister && istype(used, refill_canister)) if(stat & (BROKEN|NOPOWER)) to_chat(user, "[src] does not respond.") - return + return ITEM_INTERACT_COMPLETE - var/obj/item/vending_refill/canister = I + var/obj/item/vending_refill/canister = used var/transferred = restock(canister) if(!transferred && !canister.get_part_rating()) // It transferred no products and has no products left, thus it is empty to_chat(user, "[canister] is empty!") @@ -364,13 +364,17 @@ to_chat(user, "You loaded [transferred] items in [src].") else // Nothing transferred, parts are still left, nothing to restock! to_chat(user, "There's nothing to restock!") - return + return ITEM_INTERACT_COMPLETE - if(item_slot_check(user, I)) - insert_item(user, I) - return - . = ..() - if(tiltable && !tilted && I.force) + if(item_slot_check(user, used)) + insert_item(user, used) + return ITEM_INTERACT_COMPLETE + +/obj/machinery/economy/vending/attacked_by(obj/item/attacker, mob/living/user) + if(..()) + return FINISH_ATTACK + + if(tiltable && !tilted && attacker.force) if(resistance_flags & INDESTRUCTIBLE) // no goodies, but also no tilts return diff --git a/code/game/machinery/wall_holosign.dm b/code/game/machinery/wall_holosign.dm index a66a4f98a274..3e89ef7c651d 100644 --- a/code/game/machinery/wall_holosign.dm +++ b/code/game/machinery/wall_holosign.dm @@ -49,9 +49,9 @@ /obj/machinery/holosign_switch/attack_ai(mob/user as mob) return src.attack_hand(user) -/obj/machinery/holosign_switch/attackby__legacy__attackchain(obj/item/W, mob/user as mob, params) - if(istype(W, /obj/item/detective_scanner)) - return +/obj/machinery/holosign_switch/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/detective_scanner)) + return ITEM_INTERACT_COMPLETE return ..() /obj/machinery/holosign_switch/attack_hand(mob/user as mob) diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index 61ebcb67676d..534800a8d103 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -83,28 +83,28 @@ return toggle_door() - -/obj/machinery/washing_machine/attackby__legacy__attackchain(obj/item/W, mob/user, params) +/obj/machinery/washing_machine/item_interaction(mob/living/user, obj/item/used, list/modifiers) if(user.a_intent == INTENT_HARM) return ..() - if(default_unfasten_wrench(user, W)) - return - if(default_deconstruction_screwdriver(user, icon_state, icon_state, W)) + if(default_unfasten_wrench(user, used)) + return ITEM_INTERACT_COMPLETE + if(default_deconstruction_screwdriver(user, icon_state, icon_state, used)) update_appearance(UPDATE_ICON_STATE) - return - if(default_deconstruction_crowbar(user, W, FALSE)) - return - if(istype(W, /obj/item/soap)) + return ITEM_INTERACT_COMPLETE + if(default_deconstruction_crowbar(user, used, FALSE)) + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/soap)) return ..() // need to be able to clean washing machine without putting stuff into the washing machine :D - if(istype(W, /obj/item/grab)) - var/obj/item/grab/G = W + if(istype(used, /obj/item/grab)) + var/obj/item/grab/G = used if(isliving(G.assailant)) if(attempt_insert(user, G.affecting)) qdel(G) - return - if(istype(W)) - if(attempt_insert(user, W)) - return + return ITEM_INTERACT_COMPLETE + if(istype(used)) + if(attempt_insert(user, used)) + return ITEM_INTERACT_COMPLETE + return ..() diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 9ace87b74229..3c481ae663a1 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -310,13 +310,12 @@ return FALSE return TRUE -// Interaction code -/obj/machinery/mecha_part_fabricator/attackby__legacy__attackchain(obj/item/W, mob/user, params) - if(default_deconstruction_screwdriver(user, "fab-o", "fab-idle", W)) - return +/obj/machinery/mecha_part_fabricator/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(default_deconstruction_screwdriver(user, "fab-o", "fab-idle", used)) + return ITEM_INTERACT_COMPLETE - if(default_deconstruction_crowbar(user, W)) - return TRUE + if(default_deconstruction_crowbar(user, used)) + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 4ffdcdd9df4a..57de741faf02 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -1031,6 +1031,10 @@ //Hack and From Card interactions share some code, so leave that here for both to use. /obj/mecha/proc/ai_enter_mech(mob/living/silicon/ai/AI, interaction) + var/mob/camera/eye/hologram/hologram_eye = AI.remote_control + if(istype(hologram_eye)) + hologram_eye.release_control() + qdel(hologram_eye) AI.aiRestorePowerRoutine = 0 AI.forceMove(src) occupant = AI @@ -1315,6 +1319,7 @@ RemoveActions(occupant, 1) mob_container = AI newloc = get_turf(AI.linked_core) + AI.eyeobj?.set_loc(newloc) qdel(AI.linked_core) else return diff --git a/code/game/objects/effects/effect_system/effects_other.dm b/code/game/objects/effects/effect_system/effects_other.dm index fa5464921bf0..076a749af060 100644 --- a/code/game/objects/effects/effect_system/effects_other.dm +++ b/code/game/objects/effects/effect_system/effects_other.dm @@ -4,8 +4,6 @@ var/allow_overlap = FALSE var/auto_process = TRUE var/qdel_in_time = 10 - var/fadetype = "ion_fade" - var/fade = TRUE var/nograv_required = FALSE /datum/effect_system/trail_follow/set_up(atom/atom) @@ -42,9 +40,6 @@ if(!has_gravity(oldposition) || !nograv_required) var/obj/effect/E = new effect_type(oldposition) set_dir(E) - if(fade) - flick(fadetype, E) - E.icon_state = "" if(qdel_in_time) QDEL_IN(E, qdel_in_time) oldposition = get_turf(holder) diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index f03b08668d82..ad651d5f0809 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -118,6 +118,14 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/newplayer_start) //Without this you sp name = "bubblegum_arena_exit" icon_state = "bubblegumjumpscare" +/obj/effect/landmark/spawner/backrooms + name = "backrooms_spawn" + icon_state = "Assistant" + +/obj/effect/landmark/spawner/backrooms/Initialize(mapload) + spawner_list = GLOB.backroomswarp + return ..() + /obj/effect/landmark/spawner/syndie name = "Syndicate-Spawn" icon_state = "Syndie" diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index dc611460f7ec..de9dd64ec94b 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -611,10 +611,13 @@ SLIME SCANNER var/cooldown = FALSE var/cooldown_time = 250 var/accuracy // 0 is the best accuracy. + /// FALSE: Sum gas mixes then present. TRUE: Present each mix individually + var/show_detailed = FALSE /obj/item/analyzer/examine(mob/user) . = ..() . += "Alt-click [src] to activate the barometer function." + . += "Alt-Shift-click [src] to toggle detailed reporting on or off." /obj/item/analyzer/attack_self__legacy__attackchain(mob/user as mob) @@ -625,9 +628,13 @@ SLIME SCANNER if(!isturf(location)) return - atmos_scan(user, location) + atmos_scan(user = user, target = location, detailed = show_detailed) add_fingerprint(user) +/obj/item/analyzer/AltShiftClick(mob/user) + show_detailed = !show_detailed + to_chat(user, "You toggle detailed reporting [show_detailed ? "on" : "off"]") + /obj/item/analyzer/AltClick(mob/user) //Barometer output for measuring when the next storm happens ..() @@ -696,25 +703,30 @@ SLIME SCANNER if(!can_see(user, target, 1)) return if(target.return_analyzable_air()) - atmos_scan(user, target) + atmos_scan(user, target, detailed = show_detailed) else - atmos_scan(user, get_turf(target)) + atmos_scan(user, get_turf(target), detailed = show_detailed) /** * Outputs a message to the user describing the target's gasmixes. * Used in chat-based gas scans. */ -/proc/atmos_scan(mob/user, atom/target, silent = FALSE, print = TRUE, milla_turf_details = FALSE) - var/datum/gas_mixture/air +/proc/atmos_scan(mob/user, atom/target, silent = FALSE, print = TRUE, milla_turf_details = FALSE, detailed = FALSE) + var/datum/gas_mixture/gasmix + var/list/airs var/list/milla = null if(milla_turf_details && istype(target, /turf)) milla = new/list(MILLA_TILE_SIZE) get_tile_atmos(target, milla) - air = new() - air.copy_from_milla(milla) + gasmix = new() + gasmix.copy_from_milla(milla) + airs += gasmix else - air = target.return_analyzable_air() - if(!air) + gasmix = target.return_analyzable_air() + if(!istype(gasmix, /list)) + gasmix = list(gasmix) + airs += gasmix + if(!gasmix) return FALSE var/list/message = list() @@ -724,35 +736,87 @@ SLIME SCANNER if(!print) return TRUE - - var/total_moles = air.total_moles() - var/pressure = air.return_pressure() - var/volume = air.return_volume() //could just do mixture.volume... but safety, I guess? - var/heat_capacity = air.heat_capacity() - var/thermal_energy = air.thermal_energy() - - if(total_moles) - message += "Total: [round(total_moles, 0.01)] moles" - if(air.oxygen() && (milla_turf_details || air.oxygen() / total_moles > 0.01)) - message += " Oxygen: [round(air.oxygen(), 0.01)] moles ([round(air.oxygen() / total_moles * 100, 0.01)] %)" - if(air.nitrogen() && (milla_turf_details || air.nitrogen() / total_moles > 0.01)) - message += " Nitrogen: [round(air.nitrogen(), 0.01)] moles ([round(air.nitrogen() / total_moles * 100, 0.01)] %)" - if(air.carbon_dioxide() && (milla_turf_details || air.carbon_dioxide() / total_moles > 0.01)) - message += " Carbon Dioxide: [round(air.carbon_dioxide(), 0.01)] moles ([round(air.carbon_dioxide() / total_moles * 100, 0.01)] %)" - if(air.toxins() && (milla_turf_details || air.toxins() / total_moles > 0.01)) - message += " Plasma: [round(air.toxins(), 0.01)] moles ([round(air.toxins() / total_moles * 100, 0.01)] %)" - if(air.sleeping_agent() && (milla_turf_details || air.sleeping_agent() / total_moles > 0.01)) - message += " Nitrous Oxide: [round(air.sleeping_agent(), 0.01)] moles ([round(air.sleeping_agent() / total_moles * 100, 0.01)] %)" - if(air.agent_b() && (milla_turf_details || air.agent_b() / total_moles > 0.01)) - message += " Agent B: [round(air.agent_b(), 0.01)] moles ([round(air.agent_b() / total_moles * 100, 0.01)] %)" - message += "Temperature: [round(air.temperature()-T0C)] °C ([round(air.temperature())] K)" - message += "Volume: [round(volume)] Liters" - message += "Pressure: [round(pressure, 0.1)] kPa" - message += "Heat Capacity: [DisplayJoules(heat_capacity)] / K" - message += "Thermal Energy: [DisplayJoules(thermal_energy)]" - else - message += "[target] is empty!" - message += "Volume: [round(volume)] Liters" // don't want to change the order volume appears in, suck it + var/total_moles = 0 + var/pressure = 0 + var/volume = 0 + var/heat_capacity = 0 + var/thermal_energy = 0 + var/oxygen = 0 + var/nitrogen = 0 + var/toxins + var/carbon_dioxide = 0 + var/sleeping_agent = 0 + var/agent_b = 0 + + if(detailed)// Present all mixtures one by one + for(var/datum/gas_mixture/air as anything in airs) + total_moles = air.total_moles() + pressure = air.return_pressure() + volume = air.return_volume() //could just do mixture.volume... but safety, I guess? + heat_capacity = air.heat_capacity() + thermal_energy = air.thermal_energy() + + if(total_moles) + message += "Total: [round(total_moles, 0.01)] moles" + if(air.oxygen() && (milla_turf_details || air.oxygen() / total_moles > 0.01)) + message += " Oxygen: [round(air.oxygen(), 0.01)] moles ([round(air.oxygen() / total_moles * 100, 0.01)] %)" + if(air.nitrogen() && (milla_turf_details || air.nitrogen() / total_moles > 0.01)) + message += " Nitrogen: [round(air.nitrogen(), 0.01)] moles ([round(air.nitrogen() / total_moles * 100, 0.01)] %)" + if(air.carbon_dioxide() && (milla_turf_details || air.carbon_dioxide() / total_moles > 0.01)) + message += " Carbon Dioxide: [round(air.carbon_dioxide(), 0.01)] moles ([round(air.carbon_dioxide() / total_moles * 100, 0.01)] %)" + if(air.toxins() && (milla_turf_details || air.toxins() / total_moles > 0.01)) + message += " Plasma: [round(air.toxins(), 0.01)] moles ([round(air.toxins() / total_moles * 100, 0.01)] %)" + if(air.sleeping_agent() && (milla_turf_details || air.sleeping_agent() / total_moles > 0.01)) + message += " Nitrous Oxide: [round(air.sleeping_agent(), 0.01)] moles ([round(air.sleeping_agent() / total_moles * 100, 0.01)] %)" + if(air.agent_b() && (milla_turf_details || air.agent_b() / total_moles > 0.01)) + message += " Agent B: [round(air.agent_b(), 0.01)] moles ([round(air.agent_b() / total_moles * 100, 0.01)] %)" + message += "Temperature: [round(air.temperature()-T0C)] °C ([round(air.temperature())] K)" + message += "Volume: [round(volume)] Liters" + message += "Pressure: [round(pressure, 0.1)] kPa" + message += "Heat Capacity: [DisplayJoules(heat_capacity)] / K" + message += "Thermal Energy: [DisplayJoules(thermal_energy)]" + else + message += "[target] is empty!" + message += "Volume: [round(volume)] Liters" // don't want to change the order volume appears in, suck it + + else// Sum mixtures then present + for(var/datum/gas_mixture/air as anything in airs) + total_moles += air.total_moles() + pressure += air.return_pressure() + volume += air.return_volume() + heat_capacity += air.heat_capacity() + thermal_energy += air.thermal_energy() + oxygen += air.oxygen() + nitrogen += air.nitrogen() + toxins += air.toxins() + carbon_dioxide += air.carbon_dioxide() + sleeping_agent += air.sleeping_agent() + agent_b += air.agent_b() + + var/temperature = heat_capacity ? thermal_energy / heat_capacity : 0 + + if(total_moles) + message += "Total: [round(total_moles, 0.01)] moles" + if(oxygen && (milla_turf_details || oxygen / total_moles > 0.01)) + message += " Oxygen: [round(oxygen, 0.01)] moles ([round(oxygen / total_moles * 100, 0.01)] %)" + if(nitrogen && (milla_turf_details || nitrogen / total_moles > 0.01)) + message += " Nitrogen: [round(nitrogen, 0.01)] moles ([round(nitrogen / total_moles * 100, 0.01)] %)" + if(carbon_dioxide && (milla_turf_details || carbon_dioxide / total_moles > 0.01)) + message += " Carbon Dioxide: [round(carbon_dioxide, 0.01)] moles ([round(carbon_dioxide / total_moles * 100, 0.01)] %)" + if(toxins && (milla_turf_details || toxins / total_moles > 0.01)) + message += " Plasma: [round(toxins, 0.01)] moles ([round(toxins / total_moles * 100, 0.01)] %)" + if(sleeping_agent && (milla_turf_details || sleeping_agent / total_moles > 0.01)) + message += " Nitrous Oxide: [round(sleeping_agent, 0.01)] moles ([round(sleeping_agent / total_moles * 100, 0.01)] %)" + if(agent_b && (milla_turf_details || agent_b / total_moles > 0.01)) + message += " Agent B: [round(agent_b, 0.01)] moles ([round(agent_b / total_moles * 100, 0.01)] %)" + message += "Temperature: [round(temperature-T0C)] °C ([round(temperature)] K)" + message += "Volume: [round(volume)] Liters" + message += "Pressure: [round(pressure, 0.1)] kPa" + message += "Heat Capacity: [DisplayJoules(heat_capacity)] / K" + message += "Thermal Energy: [DisplayJoules(thermal_energy)]" + else + message += "[target] is empty!" + message += "Volume: [round(volume)] Liters" // don't want to change the order volume appears in, suck it if(milla) // Values from milla/src/lib.rs, +1 due to array indexing difference. diff --git a/code/game/objects/items/granters/action_granters/summon_cheese.dm b/code/game/objects/items/granters/action_granters/summon_cheese.dm index 29209f6479cb..a80e7f0bf141 100644 --- a/code/game/objects/items/granters/action_granters/summon_cheese.dm +++ b/code/game/objects/items/granters/action_granters/summon_cheese.dm @@ -22,7 +22,7 @@ /obj/item/book/granter/spell/summon_cheese/recoil(mob/living/user) to_chat(user, "[src] turns into a wedge of cheese!") - var/obj/item/food/cheesewedge/presliced/book_cheese = new + var/obj/item/food/sliced/cheesewedge/presliced/book_cheese = new user.drop_item() user.put_in_hands(book_cheese) qdel(src) @@ -35,7 +35,7 @@ overlay = null action_icon_state = "cheese_wedge" action_background_icon_state = "bg_spell" - summon_type = list(/obj/item/food/cheesewedge/presliced) + summon_type = list(/obj/item/food/sliced/cheesewedge/presliced) summon_amt = 9 aoe_range = 1 summon_ignore_prev_spawn_points = TRUE diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index f9b0a46abc22..c39f0c5d412d 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -830,7 +830,7 @@ /obj/item/toy/plushie/ipcplushie/attack_by(obj/item/attacking, mob/user, params) if(..()) return FINISH_ATTACK - if(istype(attacking, /obj/item/food/breadslice)) + if(istype(attacking, /obj/item/food/sliced/bread)) new /obj/item/food/toast(get_turf(loc)) to_chat(user, "You insert bread into the toaster.") playsound(loc, 'sound/machines/ding.ogg', 50, 1) diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 0ceb7d17a35e..d1b2605b4b99 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -165,6 +165,27 @@ if(can_id_flash) flash_card(user) +/obj/item/card/id/interact_with_atom(atom/target, mob/living/user, list/modifiers) + if(!isliving(target)) + return NONE + return shared_interact(target, user) + +/obj/item/card/id/ranged_interact_with_atom(atom/target, mob/living/user, list/modifiers) + if(isliving(target) && get_dist(target, user) <= 2) + return shared_interact(target, user) + return NONE + +/obj/item/card/id/proc/shared_interact(mob/living/victim, mob/living/user) + if(victim.has_status_effect(STATUS_EFFECT_OFFERING_EFTPOS)) + var/obj/item/eftpos/eftpos = victim.is_holding_item_of_type(/obj/item/eftpos) + if(!eftpos || !eftpos.can_offer) + to_chat(user, "They don't seem to have it in hand anymore.") + return ITEM_INTERACT_COMPLETE + victim.remove_status_effect(STATUS_EFFECT_OFFERING_EFTPOS) + eftpos.scan_card(src, user) + return ITEM_INTERACT_COMPLETE + return NONE + /obj/item/card/id/proc/UpdateName() name = "[registered_name]'s ID Card ([assignment])" diff --git a/code/game/objects/items/weapons/stock_parts.dm b/code/game/objects/items/weapons/stock_parts.dm index 359802da3d5c..5f8d009af33c 100644 --- a/code/game/objects/items/weapons/stock_parts.dm +++ b/code/game/objects/items/weapons/stock_parts.dm @@ -47,19 +47,31 @@ if(!istype(M)) return ..() - if(!proximity_flag && !works_from_distance) - return - - if(get_dist(src, M) <= (user.client.maxview() + 2)) - if(M.component_parts) - M.exchange_parts(user, src) - if(works_from_distance) - user.Beam(M, icon_state="rped_upgrade", icon='icons/effects/effects.dmi', time=5) + if(!proximity_flag) + if(!works_from_distance) + return + if(get_dist(src, M) > (user.client.maxview() + 2)) + return + + if(M.component_parts) + M.exchange_parts(user, src) + if(works_from_distance) + user.Beam(M, icon_state="rped_upgrade", icon='icons/effects/effects.dmi', time=5) else message_admins("\[EXPLOIT] [key_name_admin(user)] attempted to upgrade machinery with a BRPED via a camera console (attempted range exploit).") playsound(src, 'sound/machines/synth_no.ogg', 15, TRUE) to_chat(user, "ERROR: [M] is out of [src]'s range!") +/obj/item/storage/part_replacer/tier4/populate_contents() + for(var/amount in 1 to 30) + new /obj/item/stock_parts/capacitor/quadratic(src) + new /obj/item/stock_parts/manipulator/femto(src) + new /obj/item/stock_parts/matter_bin/bluespace(src) + new /obj/item/stock_parts/micro_laser/quadultra(src) + new /obj/item/stock_parts/scanning_module/triphasic(src) + new /obj/item/stock_parts/cell/bluespace(src) + new /obj/item/reagent_containers/glass/beaker/bluespace(src) + //////////////////////////////////////// // Bluespace Part Replacer //////////////////////////////////////// diff --git a/code/game/objects/items/weapons/storage/garment.dm b/code/game/objects/items/weapons/storage/garment.dm index 28e0b39d3477..d4794f2fff52 100644 --- a/code/game/objects/items/weapons/storage/garment.dm +++ b/code/game/objects/items/weapons/storage/garment.dm @@ -255,7 +255,7 @@ new /obj/item/clothing/under/rank/security/warden/corporate(src) new /obj/item/clothing/under/rank/security/warden/skirt(src) new /obj/item/clothing/under/rank/security/warden/skirt/corporate(src) - new /obj/item/clothing/mask/gas/sechailer/warden(src) + new /obj/item/clothing/mask/gas/sechailer/swat/warden(src) new /obj/item/clothing/glasses/hud/security/sunglasses(src) new /obj/item/clothing/head/helmet/space/plasmaman/security/warden(src) new /obj/item/clothing/under/plasmaman/security/warden(src) diff --git a/code/game/objects/structures/barsign.dm b/code/game/objects/structures/barsign.dm index d68b48bb0a72..1fc97e43a600 100644 --- a/code/game/objects/structures/barsign.dm +++ b/code/game/objects/structures/barsign.dm @@ -178,12 +178,12 @@ return attack_hand(user) -/obj/machinery/barsign/attackby__legacy__attackchain(obj/item/I, mob/user, params) +/obj/machinery/barsign/item_interaction(mob/living/user, obj/item/used, list/modifiers) switch(build_stage) // Inserting the electronics/circuit if(BARSIGN_FRAME) - if(istype(I, /obj/item/barsign_electronics)) - var/obj/item/barsign_electronics/electronic = I + if(istype(used, /obj/item/barsign_electronics)) + var/obj/item/barsign_electronics/electronic = used if(electronic.destroyed) emagged = TRUE else @@ -196,37 +196,37 @@ qdel(electronic) build_stage = BARSIGN_CIRCUIT update_icon() - playsound(get_turf(src), I.usesound, 50, TRUE) + playsound(get_turf(src), used.usesound, 50, TRUE) add_fingerprint(user) - return + return ITEM_INTERACT_COMPLETE // Wiring the bar sign if(BARSIGN_CIRCUIT) - if(istype(I, /obj/item/stack/cable_coil)) - if(!I.use(5)) + if(istype(used, /obj/item/stack/cable_coil)) + if(!used.use(5)) to_chat(user, "You need a total of five cables to wire [src]!") - return + return ITEM_INTERACT_COMPLETE stat &= ~EMPED build_stage = BARSIGN_WIRED update_icon() - playsound(get_turf(src), I.usesound, 50, TRUE) + playsound(get_turf(src), used.usesound, 50, TRUE) to_chat(user, "You wire [src]!") power_state = IDLE_POWER_USE add_fingerprint(user) - return + return ITEM_INTERACT_COMPLETE // Placing in the glass if(BARSIGN_WIRED) - if(istype(I, /obj/item/stack/sheet/glass)) - if(!I.use(2)) + if(istype(used, /obj/item/stack/sheet/glass)) + if(!used.use(2)) to_chat(user, "You need at least 2 sheets of glass for this!") - return + return ITEM_INTERACT_COMPLETE build_stage = BARSIGN_COMPLETE - playsound(get_turf(src), I.usesound, 50, TRUE) + playsound(get_turf(src), used.usesound, 50, TRUE) obj_integrity = max_integrity if(stat & BROKEN) stat &= ~BROKEN set_sign(new /datum/barsign/hiddensigns/signoff) add_fingerprint(user) - return + return ITEM_INTERACT_COMPLETE return ..() /obj/machinery/barsign/proc/pick_sign(mob/user) diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index 27df94912bdf..a056b9930043 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -405,6 +405,15 @@ smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_PLASTITANIUM_WALLS) canSmoothWith = list(SMOOTH_GROUP_PLASTITANIUM_WALLS, SMOOTH_GROUP_AIRLOCK, SMOOTH_GROUP_SHUTTLE_PARTS) +/obj/structure/falsewall/backrooms + desc = "A strange wall that looks like cheap wallpaper and drywall." + icon = 'icons/turf/walls/backrooms_wall.dmi' + icon_state = "backrooms_wall-0" + base_icon_state = "backrooms_wall" + smoothing_flags = SMOOTH_BITMASK + smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_BACKROOMS_WALLS) + canSmoothWith = list(SMOOTH_GROUP_BACKROOMS_WALLS) + /obj/structure/falsewall/brass name = "clockwork wall" desc = "A huge chunk of warm metal. The clanging of machinery emanates from within." diff --git a/code/game/objects/structures/grey_autocloner.dm b/code/game/objects/structures/grey_autocloner.dm index d11afe9a220c..294197204608 100644 --- a/code/game/objects/structures/grey_autocloner.dm +++ b/code/game/objects/structures/grey_autocloner.dm @@ -24,12 +24,14 @@ clonemind = null return ..() -/obj/machinery/grey_autocloner/attackby__legacy__attackchain(obj/item/bio_chip_implanter/implant, mob/user, params) +/obj/machinery/grey_autocloner/item_interaction(mob/living/user, obj/item/used, list/modifiers) + var/obj/item/bio_chip_implanter/implant = used if(!istype(implant) || !(istype(implant.imp, /obj/item/bio_chip/grey_autocloner))) return ..() var/obj/item/bio_chip/grey_autocloner/autoclone = implant.imp autoclone.linked = src atom_say("Link confirmed!") + return ITEM_INTERACT_COMPLETE /obj/machinery/grey_autocloner/proc/growclone(datum/dna2_record/R) if(attempting || stat & (NOPOWER|BROKEN)) diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 7c47898436d3..e89d15d1defa 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -129,7 +129,7 @@ to_chat(user, "Using the mirror will destroy any non biochip implants in you!") var/list/race_list = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin", "Nian", "Grey", "Drask") if(actually_magical) - race_list = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin", "Nian", "Grey", "Drask", "Vox", "Plasmaman", "Kidan") + race_list = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin", "Nian", "Grey", "Drask", "Vox", "Plasmaman", "Kidan", "Slime People") var/datum/ui_module/appearance_changer/AC = ui_users[user] if(!AC) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 24e67bd26a1c..2bd57402faae 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -346,9 +346,11 @@ if(istype(T) && !T.density) T.MakeSlippery(TURF_WET_WATER, 5 SECONDS) -/obj/machinery/shower/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(I.type == /obj/item/analyzer) +/obj/machinery/shower/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/analyzer)) to_chat(user, "The water temperature seems to be [current_temperature].") + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/shower/wrench_act(mob/user, obj/item/I) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 63916bb036fe..1c0faf3b9463 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -508,16 +508,16 @@ return reinf && fulltile ? real_explosion_block : 0 /obj/structure/window/basic - desc = "It looks thin and flimsy. A few knocks with... anything, really should shatter it." + desc = "It looks thin and flimsy. A few knocks with... anything, really should shatter it. Lacks protection from radiation." /obj/structure/window/reinforced name = "reinforced window" - desc = "It looks rather strong. Might take a few good hits to shatter it." + desc = "It looks rather strong. Might take a few good hits to shatter it. Lacks protection from radiation." icon_state = "rwindow" reinf = TRUE heat_resistance = 1300 armor = list(MELEE = 50, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 25, RAD = 100, FIRE = 80, ACID = 100) - rad_insulation = RAD_HEAVY_INSULATION + rad_insulation = RAD_NO_INSULATION max_integrity = 50 explosion_block = 1 glass_type = /obj/item/stack/sheet/rglass @@ -630,7 +630,7 @@ /obj/structure/window/plasmabasic name = "plasma window" - desc = "A window made out of a plasma-silicate alloy. It looks insanely tough to break and burn through." + desc = "A window made out of a plasma-silicate alloy. It looks insanely tough to break and burn through. Lacks protection from radiation." icon_state = "plasmawindow" glass_decal = /obj/effect/decal/cleanable/glass/plasma shardtype = /obj/item/shard/plasma @@ -644,7 +644,7 @@ /obj/structure/window/plasmareinforced name = "reinforced plasma window" - desc = "A plasma-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic plasma windows are insanely fireproof." + desc = "A plasma-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic plasma windows are insanely fireproof. Lacks protection from radiation." icon_state = "plasmarwindow" glass_decal = /obj/effect/decal/cleanable/glass/plasma shardtype = /obj/item/shard/plasma @@ -673,7 +673,7 @@ canSmoothWith = list(SMOOTH_GROUP_WINDOW_FULLTILE, SMOOTH_GROUP_WALLS) /obj/structure/window/full/basic - desc = "It looks thin and flimsy. A few knocks with... anything, really should shatter it." + desc = "It looks thin and flimsy. A few knocks with... anything, really should shatter it. Has very light protection from radiation" icon = 'icons/obj/smooth_structures/windows/window.dmi' icon_state = "window-0" base_icon_state = "window" @@ -682,7 +682,7 @@ /obj/structure/window/full/plasmabasic name = "plasma window" - desc = "A plasma-glass alloy window. It looks insanely tough to break. It appears it's also insanely tough to burn through." + desc = "A plasma-glass alloy window. It looks insanely tough to break. It appears it's also insanely tough to burn through. Has very light protection from radiation." icon = 'icons/obj/smooth_structures/windows/plasma_window.dmi' icon_state = "plasma_window-0" base_icon_state = "plasma_window" @@ -693,14 +693,13 @@ max_integrity = 300 explosion_block = 1 armor = list(MELEE = 75, BULLET = 5, LASER = 0, ENERGY = 0, BOMB = 45, RAD = 100, FIRE = 99, ACID = 100) - rad_insulation = RAD_NO_INSULATION edge_overlay_file = 'icons/obj/smooth_structures/windows/window_edges.dmi' env_smash_level = ENVIRONMENT_SMASH_WALLS // these windows are a fair bit tougher superconductivity = ZERO_HEAT_TRANSFER_COEFFICIENT /obj/structure/window/full/plasmareinforced name = "reinforced plasma window" - desc = "A plasma-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic plasma windows are insanely fireproof." + desc = "A plasma-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic plasma windows are insanely fireproof. Offers superior protection from radiation." icon = 'icons/obj/smooth_structures/windows/rplasma_window.dmi' icon_state = "rplasma_window-0" base_icon_state = "rplasma_window" @@ -712,7 +711,7 @@ max_integrity = 1000 explosion_block = 2 armor = list(MELEE = 85, BULLET = 20, LASER = 0, ENERGY = 0, BOMB = 60, RAD = 100, FIRE = 99, ACID = 100) - rad_insulation = RAD_NO_INSULATION + rad_insulation = RAD_HEAVY_INSULATION edge_overlay_file = 'icons/obj/smooth_structures/windows/reinforced_window_edges.dmi' env_smash_level = ENVIRONMENT_SMASH_RWALLS // these ones are insanely tough superconductivity = ZERO_HEAT_TRANSFER_COEFFICIENT @@ -722,7 +721,7 @@ /obj/structure/window/full/reinforced name = "reinforced window" - desc = "It looks rather strong. Might take a few good hits to shatter it." + desc = "It looks rather strong. Might take a few good hits to shatter it. Offers superior protection from radiation" icon = 'icons/obj/smooth_structures/windows/reinforced_window.dmi' icon_state = "reinforced_window-0" base_icon_state = "reinforced_window" @@ -783,7 +782,7 @@ reinf = TRUE heat_resistance = 32000 armor = list(MELEE = 85, BULLET = 20, LASER = 0, ENERGY = 0, BOMB = 60, RAD = 100, FIRE = 99, ACID = 100) - rad_insulation = RAD_NO_INSULATION + rad_insulation = RAD_HEAVY_INSULATION explosion_block = 3 glass_type = /obj/item/stack/sheet/plastitaniumglass smoothing_groups = list(SMOOTH_GROUP_SHUTTLE_PARTS, SMOOTH_GROUP_WINDOW_FULLTILE_PLASTITANIUM, SMOOTH_GROUP_PLASTITANIUM_WALLS) diff --git a/code/game/turfs/simulated/floor/misc_floor.dm b/code/game/turfs/simulated/floor/misc_floor.dm index 9e5a4241d59e..3d010e13cbb6 100644 --- a/code/game/turfs/simulated/floor/misc_floor.dm +++ b/code/game/turfs/simulated/floor/misc_floor.dm @@ -308,6 +308,14 @@ break_tile_to_plating() hotspot_expose(1000,CELL_VOLUME) +// Carpet used in the backrooms hallucination +/turf/simulated/floor/backrooms_carpet + name = "backrooms carpet" + desc = "An old, musty carpet. It smells faintly mildewy." + icon = 'icons/turf/floors.dmi' + icon_state = "backrooms_carpet" + baseturf = /turf/simulated/floor/backrooms_carpet + /turf/open/floor/plating/rust //SDMM supports colors, this is simply for easier mapping //and should be removed on initialize diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index 1f75cad5ef91..8538d568f2fe 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -113,6 +113,8 @@ return ITEM_INTERACT_COMPLETE + return ..() + /turf/simulated/floor/plating/screwdriver_act(mob/user, obj/item/I) if(!I.tool_use_check(user, 0)) return diff --git a/code/game/turfs/simulated/walls_indestructible.dm b/code/game/turfs/simulated/walls_indestructible.dm index 6fdf37f2d1e4..07863679a69c 100644 --- a/code/game/turfs/simulated/walls_indestructible.dm +++ b/code/game/turfs/simulated/walls_indestructible.dm @@ -302,3 +302,13 @@ GLOBAL_DATUM(title_splash, /turf/simulated/wall/indestructible/splashscreen) smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_SYNDICATE_WALLS) canSmoothWith = list(SMOOTH_GROUP_SYNDICATE_WALLS, SMOOTH_GROUP_AIRLOCK, SMOOTH_GROUP_SHUTTLE_PARTS) +/turf/simulated/wall/indestructible/backrooms + name = "wall" + desc = "A strange wall that looks like cheap wallpaper and drywall." + icon = 'icons/turf/walls/backrooms_wall.dmi' + icon_state = "backrooms_wall-0" + base_icon_state = "backrooms_wall" + explosion_block = 4 + smoothing_flags = SMOOTH_BITMASK + smoothing_groups = list(SMOOTH_GROUP_BACKROOMS_WALLS) + canSmoothWith = list(SMOOTH_GROUP_BACKROOMS_WALLS, SMOOTH_GROUP_AIRLOCK, SMOOTH_GROUP_SHUTTLE_PARTS) diff --git a/code/game/turfs/space/space_turf.dm b/code/game/turfs/space/space_turf.dm index d0caaaa58b46..355d7ea9216a 100644 --- a/code/game/turfs/space/space_turf.dm +++ b/code/game/turfs/space/space_turf.dm @@ -117,6 +117,8 @@ to_chat(user, "The plating is going to need some support! Place metal rods first.") return ITEM_INTERACT_COMPLETE + return ..() + /turf/space/Entered(atom/movable/A as mob|obj, atom/OL, ignoreRest = 0) ..() if((!(A) || !(src in A.locs))) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index b2c02b58364d..07a9085f4871 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -478,28 +478,28 @@ if(SSticker) GLOB.cameranet.update_visibility(src) -/turf/attack_by(obj/item/attacking, mob/user, params) - if(..()) - return TRUE +/turf/item_interaction(mob/living/user, obj/item/used, list/modifiers) if(can_lay_cable()) - if(istype(attacking, /obj/item/stack/cable_coil)) - var/obj/item/stack/cable_coil/C = attacking + if(istype(used, /obj/item/stack/cable_coil)) + var/obj/item/stack/cable_coil/C = used for(var/obj/structure/cable/LC in src) if(LC.d1 == 0 || LC.d2 == 0) LC.attackby__legacy__attackchain(C, user) - return TRUE + return ITEM_INTERACT_COMPLETE C.place_turf(src, user) - return TRUE - else if(istype(attacking, /obj/item/rcl)) - var/obj/item/rcl/R = attacking + return ITEM_INTERACT_COMPLETE + else if(istype(used, /obj/item/rcl)) + var/obj/item/rcl/R = used if(R.loaded) for(var/obj/structure/cable/LC in src) if(LC.d1 == 0 || LC.d2 == 0) LC.attackby__legacy__attackchain(R, user) - return TRUE + return ITEM_INTERACT_COMPLETE R.loaded.place_turf(src, user) R.is_empty(user) + return ITEM_INTERACT_COMPLETE + /turf/proc/can_have_cabling() return TRUE diff --git a/code/modules/admin/db_ban/functions.dm b/code/modules/admin/db_ban/functions.dm index 7d42d9005781..029b80de4d21 100644 --- a/code/modules/admin/db_ban/functions.dm +++ b/code/modules/admin/db_ban/functions.dm @@ -61,8 +61,8 @@ var/computerid var/ip - if(ismob(banned_mob) && banned_mob.ckey) - ckey = banned_mob.ckey + if(ismob(banned_mob) && banned_mob.last_known_ckey) + ckey = banned_mob.last_known_ckey if(banned_mob.client) computerid = banned_mob.client.computer_id ip = banned_mob.client.address @@ -496,7 +496,7 @@ output += "" output += "" output += "Reason:

    " - output += " Auto populate CID & IP for online players
    " + output += " Auto populate CID & IP for players seen this round
    " output += "" output += "" diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 5781dd6254ad..cc8b859095c1 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -153,10 +153,13 @@ var/mob/playermob if("autopopulate" in href_list) - for(var/mob/M in GLOB.player_list) + for(var/mob/M in GLOB.mob_list) if(M.ckey == banckey) playermob = M break + else if(M.last_known_ckey == banckey) + playermob = M + // ... but do not break, so we prefer current ckeys. banreason = "(MANUAL BAN) "+banreason @@ -166,7 +169,7 @@ if(bancid) banreason = "[banreason] (CUSTOM CID)" else - message_admins("Ban process: A mob matching [playermob.ckey] was found at location [playermob.x], [playermob.y], [playermob.z]. Custom IP and computer id fields replaced with the IP and computer id from the located mob") + message_admins("Ban process: A mob matching [playermob.last_known_ckey] was found at location [playermob.x], [playermob.y], [playermob.z]. Custom IP and computer id fields replaced with the IP and computer id from the located mob") if(job_ban) if(banjob in list("commanddept","securitydept","engineeringdept","medicaldept","sciencedept","servicedept","supplydept","nonhumandept")) @@ -444,7 +447,7 @@ to_chat(usr, "This can only be used on instances of type /mob") return - if(!M.ckey) //sanity + if(!M.last_known_ckey) //sanity to_chat(usr, "This mob has no ckey") return if(!SSjobs) @@ -465,17 +468,17 @@ //Regular jobs //Command (Blue) jobs += "" - jobs += "" + jobs += "" for(var/jobPos in GLOB.command_positions) if(!jobPos) continue var/datum/job/job = SSjobs.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 6) //So things dont get squiiiiished! @@ -486,17 +489,17 @@ //Security (Red) counter = 0 jobs += "
    Command Positions
    Command Positions
    [replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]
    " - jobs += "" + jobs += "" for(var/jobPos in GLOB.security_positions) if(!jobPos) continue var/datum/job/job = SSjobs.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -507,17 +510,17 @@ //Engineering (Yellow) counter = 0 jobs += "
    Security Positions
    Security Positions
    [replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]
    " - jobs += "" + jobs += "" for(var/jobPos in GLOB.engineering_positions) if(!jobPos) continue var/datum/job/job = SSjobs.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -528,17 +531,17 @@ //Medical (White) counter = 0 jobs += "
    Engineering Positions
    Engineering Positions
    [replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]
    " - jobs += "" + jobs += "" for(var/jobPos in GLOB.medical_positions) if(!jobPos) continue var/datum/job/job = SSjobs.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -549,17 +552,17 @@ //Science (Purple) counter = 0 jobs += "
    Medical Positions
    Medical Positions
    [replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]
    " - jobs += "" + jobs += "" for(var/jobPos in GLOB.science_positions) if(!jobPos) continue var/datum/job/job = SSjobs.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -570,17 +573,17 @@ //Service (Grey) counter = 0 jobs += "
    Science Positions
    Science Positions
    [replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]
    " - jobs += "" + jobs += "" for(var/jobPos in GLOB.service_positions) if(!jobPos) continue var/datum/job/job = SSjobs.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -591,17 +594,17 @@ //Supply (Brown) counter = 0 jobs += "
    Service Positions
    Service Positions
    [replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]
    " - jobs += "" + jobs += "" for(var/jobPos in GLOB.supply_positions) if(!jobPos) continue var/datum/job/job = SSjobs.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -612,17 +615,17 @@ //Non-Human (Green) counter = 0 jobs += "
    Supply Positions
    Supply Positions
    [replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]
    " - jobs += "" + jobs += "" for(var/jobPos in GLOB.nonhuman_positions) if(!jobPos) continue var/datum/job/job = SSjobs.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -631,29 +634,29 @@ //Drone if(jobban_isbanned(M, "Drone")) - jobs += "" + jobs += "" else - jobs += "" + jobs += "" //pAI if(jobban_isbanned(M, "pAI")) - jobs += "" + jobs += "" else - jobs += "" + jobs += "" jobs += "
    Non-human Positions
    Non-human Positions
    [replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]DroneDroneDroneDronepAIpAIpAIpAI
    " //Antagonist (Orange) var/isbanned_dept = jobban_isbanned(M, "Syndicate") jobs += "" - jobs += "" + jobs += "" counter = 0 for(var/role in GLOB.antag_roles) if(jobban_isbanned(M, role) || isbanned_dept) - jobs += "" + jobs += "" else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -668,9 +671,9 @@ counter = 0 for(var/role in GLOB.other_roles) if(jobban_isbanned(M, role) || isbanned_dept) - jobs += "" + jobs += "" else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -766,7 +769,7 @@ //Banning comes first if(length(notbannedlist)) //at least 1 unbanned job exists in joblist so we have stuff to ban. - switch(alert("Temporary Ban of [M.ckey]?", null,"Yes","No", "Cancel")) + switch(alert("Temporary Ban of [M.last_known_ckey]?", null,"Yes","No", "Cancel")) if("Yes") var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null if(!mins) @@ -784,7 +787,7 @@ msg = job else msg += ", [job]" - add_note(M.ckey, "Banned from [msg] - [reason]", null, usr.ckey, 0) + add_note(M.last_known_ckey, "Banned from [msg] - [reason]", null, usr.ckey, 0) message_admins("[key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [mins] minutes", 1) // Reload their job ban holder (refresh this round) @@ -807,7 +810,7 @@ msg = job else msg += ", [job]" - add_note(M.ckey, "Banned from [msg] - [reason]", null, usr.ckey, 0) + add_note(M.last_known_ckey, "Banned from [msg] - [reason]", null, usr.ckey, 0) message_admins("[key_name_admin(usr)] banned [key_name_admin(M)] from [msg]", 1) // Reload their job ban holder (refresh this round) @@ -912,7 +915,7 @@ return var/ban_ckey_param = href_list["dbbanaddckey"] - switch(alert("Temporary Ban of [M.ckey] / [ban_ckey_param]?", null,"Yes","No", "Cancel")) + switch(alert("Temporary Ban of [M.last_known_ckey] / [ban_ckey_param]?", null,"Yes","No", "Cancel")) if("Yes") var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null if(!mins) @@ -925,15 +928,15 @@ to_chat(M, "You have been banned by [usr.client.ckey].\nReason: [reason].") to_chat(M, "This is a temporary ban, it will be removed in [mins] minutes.") DB_ban_record(BANTYPE_TEMP, M, mins, reason) - add_note(M.ckey, "Banned for [mins] minutes - [reason]", null, usr.ckey, FALSE) + add_note(M.last_known_ckey, "Banned for [mins] minutes - [reason]", null, usr.ckey, FALSE) if(M.client) M.client.link_forum_account(TRUE) if(GLOB.configuration.url.banappeals_url) to_chat(M, "To try to resolve this matter head to [GLOB.configuration.url.banappeals_url]") else to_chat(M, "No ban appeals URL has been set.") - log_admin("[key_name(usr)] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.") - message_admins("[key_name_admin(usr)] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.") + log_admin("[key_name(usr)] has banned [M.last_known_ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.") + message_admins("[key_name_admin(usr)] has banned [M.last_known_ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.") qdel(M.client) if("No") @@ -948,10 +951,10 @@ to_chat(M, "To try to resolve this matter head to [GLOB.configuration.url.banappeals_url]") else to_chat(M, "No ban appeals URL has been set.") - log_admin("[key_name(usr)] has banned [M.ckey].\nReason: [reason]\nThis ban does not expire automatically and must be appealed.") - message_admins("[key_name_admin(usr)] has banned [M.ckey].\nReason: [reason]\nThis ban does not expire automatically and must be appealed.") + log_admin("[key_name(usr)] has banned [M.last_known_ckey].\nReason: [reason]\nThis ban does not expire automatically and must be appealed.") + message_admins("[key_name_admin(usr)] has banned [M.last_known_ckey].\nReason: [reason]\nThis ban does not expire automatically and must be appealed.") DB_ban_record(BANTYPE_PERMA, M, -1, reason) - add_note(M.ckey, "Permanently banned - [reason]", null, usr.ckey, FALSE) + add_note(M.last_known_ckey, "Permanently banned - [reason]", null, usr.ckey, FALSE) qdel(M.client) if("Cancel") diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index 8fc523e97a40..39ae9cb0e24e 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -72,9 +72,10 @@ H = pick(candidates) H.mind.make_Traitor() candidates.Remove(H) + message_admins("[key_name(owner)] made [key_name_admin(H)] a Traitor with One-Click-Antag") - return 1 - return 0 + return TRUE + return FALSE /datum/admins/proc/makeChangelings() @@ -103,9 +104,10 @@ H = pick(candidates) H.mind.add_antag_datum(/datum/antagonist/changeling) candidates.Remove(H) + message_admins("[key_name(owner)] made [key_name_admin(H)] a Changeling with One-Click-Antag") - return 1 - return 0 + return TRUE + return FALSE /datum/admins/proc/makeRevs() @@ -133,14 +135,15 @@ H = pick(candidates) H?.mind?.add_antag_datum(/datum/antagonist/rev/head) candidates.Remove(H) - return 1 - return 0 + message_admins("[key_name(owner)] made [key_name_admin(H)] a Revolutionary with One-Click-Antag") + return TRUE + return FALSE /datum/admins/proc/makeWizard() var/confirm = alert("Are you sure?", "Confirm creation", "Yes", "No") if(confirm != "Yes") - return 0 + return FALSE var/image/I = new('icons/mob/simple_human.dmi', "wizard") var/list/candidates = SSghost_spawns.poll_candidates("Do you wish to be considered for the position of a Wizard Federation 'diplomat'?", "wizard", source = I) @@ -154,6 +157,7 @@ var/mob/living/carbon/human/new_character = makeBody(selected) new_character.mind.add_antag_datum(/datum/antagonist/wizard) new_character.forceMove(pick(GLOB.wizardstart)) + message_admins("[key_name(owner)] made [key_name_admin(new_character)] a Wizard with One-Click-Antag") dust_if_respawnable(selected) return TRUE return FALSE @@ -187,6 +191,7 @@ var/datum/antagonist/cultist/cultist = H.mind.add_antag_datum(/datum/antagonist/cultist) cultist.equip_roundstart_cultist(H) + message_admins("[key_name(owner)] made [key_name_admin(H)] a Cultist with One-Click-Antag") return TRUE //Abductors @@ -194,13 +199,13 @@ var/confirm = alert("Are you sure?", "Confirm creation", "Yes", "No") if(confirm != "Yes") - return 0 + return FALSE new /datum/event/abductor log_admin("[key_name(owner)] tried making Abductors with One-Click-Antag") message_admins("[key_name_admin(owner)] tried making Abductors with One-Click-Antag") - return 1 + return TRUE /datum/admins/proc/makeAliens() var/antnum = input(owner, "How many aliens you want to create? Enter 0 to cancel.","Amount:", 0) as num @@ -287,10 +292,11 @@ for(var/i = 0, iThe end of [loc.name]\'s hand inflates rapidly, forming a huge shield-like mass!", "We inflate our hand into a strong shield.", "You hear organic matter ripping and tearing!") playsound(loc, 'sound/effects/bone_break_1.ogg', 100, TRUE) -/obj/item/shield/changeling/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) - SEND_SIGNAL(owner, COMSIG_HUMAN_PARRY) - . = ..() - if(!.) - return - if(remaining_uses < 1) - if(ishuman(loc)) - var/mob/living/carbon/human/H = loc - H.visible_message("With a sickening crunch, [H] reforms [H.p_their()] shield into an arm!", "We assimilate our shield into our body", "You hear organic matter ripping and tearing!") - playsound(loc, 'sound/effects/bone_break_2.ogg', 100, TRUE) - H.unequip(src, force = TRUE) - qdel(src) - return FALSE - else - remaining_uses-- - /***************************************\ |*********SPACE SUIT + HELMET***********| \***************************************/ diff --git a/code/modules/antagonists/traitor/contractor/datums/syndicate_contract.dm b/code/modules/antagonists/traitor/contractor/datums/syndicate_contract.dm index 86d432cb229d..38e6eeab71e5 100644 --- a/code/modules/antagonists/traitor/contractor/datums/syndicate_contract.dm +++ b/code/modules/antagonists/traitor/contractor/datums/syndicate_contract.dm @@ -423,7 +423,7 @@ M.update_icons() // Supply them with some chow. How generous is the Syndicate? - var/obj/item/food/breadslice/food = new(get_turf(M)) + var/obj/item/food/sliced/bread/food = new(get_turf(M)) // TODO 545 food.name = "stale bread" food.desc = "Looks like your captors care for their prisoners as much as their bread." food.trash = null diff --git a/code/modules/arcade/arcade_base.dm b/code/modules/arcade/arcade_base.dm index dbf3db54bf48..eaa1db69004a 100644 --- a/code/modules/arcade/arcade_base.dm +++ b/code/modules/arcade/arcade_base.dm @@ -56,18 +56,18 @@ to_chat(user, "Someone else is already playing this machine, please wait your turn!") return -/obj/machinery/economy/arcade/attackby__legacy__attackchain(obj/item/O, mob/user, params) +/obj/machinery/economy/arcade/item_interaction(mob/living/user, obj/item/used, list/modifiers) if(!freeplay) - if(isspacecash(O)) - insert_cash(O, user, token_price) + if(isspacecash(used)) + insert_cash(used, user, token_price) if(pay_with_cash(token_price, "Arcade Token Purchase", "DonkBook Gaming", user, account_database.vendor_account)) tokens += 1 - return + return ITEM_INTERACT_COMPLETE - if(istype(O, /obj/item/card/id)) - if(pay_with_card(O, token_price, "Arcade Token Purchase", "DonkBook Gaming", user, account_database.vendor_account)) + if(istype(used, /obj/item/card/id)) + if(pay_with_card(used, token_price, "Arcade Token Purchase", "DonkBook Gaming", user, account_database.vendor_account)) tokens += 1 - return + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/modules/arcade/prize_counter.dm b/code/modules/arcade/prize_counter.dm index 3bab7848f10a..8c787c3435ce 100644 --- a/code/modules/arcade/prize_counter.dm +++ b/code/modules/arcade/prize_counter.dm @@ -79,18 +79,18 @@ else icon_state = "prize_counter-on" -/obj/machinery/prize_counter/attackby__legacy__attackchain(obj/item/O, mob/user, params) - if(istype(O, /obj/item/stack/tickets)) - var/obj/item/stack/tickets/T = O +/obj/machinery/prize_counter/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/stack/tickets)) + var/obj/item/stack/tickets/T = used if(user.drop_item_to_ground(T)) tickets += T.amount SStgui.update_uis(src) qdel(T) else to_chat(user, "\The [T] seems stuck to your hand!") - return + return ITEM_INTERACT_COMPLETE if(panel_open) - return + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index 795772f5d1a6..5216ac330ebd 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -998,14 +998,14 @@ GLOBAL_LIST_INIT(aalarm_modes, list( playsound(src.loc, 'sound/effects/sparks4.ogg', 50, TRUE) return TRUE -/obj/machinery/alarm/attackby__legacy__attackchain(obj/item/I, mob/user, params) +/obj/machinery/alarm/item_interaction(mob/living/user, obj/item/used, list/modifiers) add_fingerprint(user) switch(buildstage) if(AIR_ALARM_READY) - if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda))// trying to unlock the interface with an ID card + if(istype(used, /obj/item/card/id) || istype(used, /obj/item/pda))// trying to unlock the interface with an ID card if(stat & (NOPOWER|BROKEN)) - return + return ITEM_INTERACT_COMPLETE if(allowed(user) && !wires.is_cut(WIRE_IDSCAN)) locked = !locked @@ -1013,14 +1013,15 @@ GLOBAL_LIST_INIT(aalarm_modes, list( SStgui.update_uis(src) else to_chat(user, "Access denied.") - return + + return ITEM_INTERACT_COMPLETE if(AIR_ALARM_UNWIRED) - if(iscoil(I)) - var/obj/item/stack/cable_coil/coil = I + if(iscoil(used)) + var/obj/item/stack/cable_coil/coil = used if(coil.get_amount() < 5) to_chat(user, "You need more cable for this!") - return + return ITEM_INTERACT_COMPLETE to_chat(user, "You wire [src]!") playsound(get_turf(src), coil.usesound, 50, 1) @@ -1030,15 +1031,15 @@ GLOBAL_LIST_INIT(aalarm_modes, list( wiresexposed = TRUE update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS) first_run() - return + return ITEM_INTERACT_COMPLETE if(AIR_ALARM_FRAME) - if(istype(I, /obj/item/airalarm_electronics)) - to_chat(user, "You insert [I] into [src].") - playsound(get_turf(src), I.usesound, 50, 1) - qdel(I) + if(istype(used, /obj/item/airalarm_electronics)) + to_chat(user, "You insert [used] into [src].") + playsound(get_turf(src), used.usesound, 50, TRUE) + qdel(used) buildstage = 1 update_icon(UPDATE_ICON_STATE) - return + return ITEM_INTERACT_COMPLETE return ..() /obj/machinery/alarm/crowbar_act(mob/user, obj/item/I) diff --git a/code/modules/atmospherics/machinery/atmospherics.dm b/code/modules/atmospherics/machinery/atmospherics.dm index 945b1a6c4daf..988048aaf556 100644 --- a/code/modules/atmospherics/machinery/atmospherics.dm +++ b/code/modules/atmospherics/machinery/atmospherics.dm @@ -256,11 +256,12 @@ Pipelines + Other Objects -> Pipe network return FALSE //(De)construction -/obj/machinery/atmospherics/attackby__legacy__attackchain(obj/item/W, mob/user) +/obj/machinery/atmospherics/item_interaction(mob/living/user, obj/item/used, list/modifiers) var/turf/T = get_turf(src) if(T.transparent_floor) to_chat(user, "You can't interact with something that's under the floor!") - return TRUE + return ITEM_INTERACT_COMPLETE + return ..() //Called when an atmospherics object is unwrenched while having a large pressure difference diff --git a/code/modules/atmospherics/machinery/components/binary_devices/binary_atmos_base.dm b/code/modules/atmospherics/machinery/components/binary_devices/binary_atmos_base.dm index 5120a43c0ab8..7a8d2465e1f6 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/binary_atmos_base.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/binary_atmos_base.dm @@ -15,6 +15,8 @@ var/datum/pipeline/parent1 var/datum/pipeline/parent2 + new_attack_chain = TRUE + /obj/machinery/atmospherics/binary/New() ..() switch(dir) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm index 16f7ff116e73..c6c135990f95 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm @@ -157,8 +157,9 @@ Thus, the two variables affect pump operation are set in New(): return update_icon() -/obj/machinery/atmospherics/binary/pump/attackby__legacy__attackchain(obj/item/W, mob/user, params) - if(is_pen(W)) - rename_interactive(user, W) - return TRUE +/obj/machinery/atmospherics/binary/bump/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(is_pen(used)) + rename_interactive(user, used) + return ITEM_INTERACT_COMPLETE + return ..() diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm index a39e69c38732..0bae5c086d31 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm @@ -153,8 +153,9 @@ Thus, the two variables affect pump operation are set in New(): return update_icon() -/obj/machinery/atmospherics/binary/volume_pump/attackby__legacy__attackchain(obj/item/W, mob/user, params) - if(is_pen(W)) - rename_interactive(user, W) - return TRUE +/obj/machinery/atmospherics/binary/volume_pump/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(is_pen(used)) + rename_interactive(user, used) + return ITEM_INTERACT_COMPLETE + return ..() diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm index 8ac8021ead3e..658862ea7836 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm @@ -227,12 +227,12 @@ if(.) investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", "atmos") -/obj/machinery/atmospherics/trinary/filter/attackby__legacy__attackchain(obj/item/W, mob/user, params) - if(is_pen(W)) - rename_interactive(user, W) - return - else - return ..() +/obj/machinery/atmospherics/trinary/filter/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(is_pen(used)) + rename_interactive(user, used) + return ITEM_INTERACT_COMPLETE + + return ..() #undef FILTER_NOTHING #undef FILTER_TOXINS diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm index 977ce8e4d18a..99d814a82192 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm @@ -201,9 +201,9 @@ if(.) investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", "atmos") -/obj/machinery/atmospherics/trinary/mixer/attackby__legacy__attackchain(obj/item/W, mob/user, params) - if(is_pen(W)) - rename_interactive(user, W) - return - else - return ..() +/obj/machinery/atmospherics/trinary/mixer/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(is_pen(used)) + rename_interactive(user, used) + return ITEM_INTERACT_COMPLETE + + return ..() diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 6ed09eda30bc..3fffb34b925b 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -298,41 +298,42 @@ add_fingerprint(usr) -/obj/machinery/atmospherics/unary/cryo_cell/attackby__legacy__attackchain(obj/item/G, mob/user, params) - if(istype(G, /obj/item/reagent_containers/glass) && user.a_intent != INTENT_HARM) - var/obj/item/reagent_containers/B = G +/obj/machinery/atmospherics/unary/cryo_cell/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/reagent_containers/glass) && user.a_intent != INTENT_HARM) + var/obj/item/reagent_containers/B = used if(beaker) to_chat(user, "A beaker is already loaded into the machine.") - return + return ITEM_INTERACT_COMPLETE if(!user.drop_item()) to_chat(user, "[B] is stuck to you!") - return + return ITEM_INTERACT_COMPLETE B.forceMove(src) beaker = B add_attack_logs(user, null, "Added [B] containing [B.reagents.log_list()] to a cryo cell at [COORD(src)]") user.visible_message("[user] adds \a [B] to [src]!", "You add \a [B] to [src]!") SStgui.update_uis(src) - return + return ITEM_INTERACT_COMPLETE - if(istype(G, /obj/item/grab)) - var/obj/item/grab/GG = G + if(istype(used, /obj/item/grab)) + var/obj/item/grab/GG = used if(panel_open) to_chat(user, "Close the maintenance panel first.") - return + return ITEM_INTERACT_COMPLETE if(!ismob(GG.affecting)) - return + return ITEM_INTERACT_COMPLETE if(GG.affecting.has_buckled_mobs()) //mob attached to us to_chat(user, "[GG.affecting] will not fit into [src] because [GG.affecting.p_they()] [GG.affecting.p_have()] a slime latched onto [GG.affecting.p_their()] head.") - return + return ITEM_INTERACT_COMPLETE var/mob/M = GG.affecting if(put_mob(M)) qdel(GG) - return + + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm index 412bf1b2e24a..630da74b8e63 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm @@ -186,17 +186,17 @@ pipe_image.plane = ABOVE_HUD_PLANE playsound(loc, 'sound/weapons/bladeslice.ogg', 100, TRUE) -/obj/machinery/atmospherics/unary/vent_pump/attackby__legacy__attackchain(obj/item/W, mob/user, params) - if(istype(W, /obj/item/paper)) +/obj/machinery/atmospherics/unary/vent_pump/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/paper)) if(!welded) if(open) - user.drop_item(W) - W.forceMove(src) + user.drop_item(used) + used.forceMove(src) if(!open) to_chat(user, "You can't shove that down there when it is closed") else to_chat(user, "The vent is welded.") - return TRUE + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/modules/atmospherics/machinery/pipes/pipe.dm b/code/modules/atmospherics/machinery/pipes/pipe.dm index 9fcf304fa17f..ef39962d7fc7 100644 --- a/code/modules/atmospherics/machinery/pipes/pipe.dm +++ b/code/modules/atmospherics/machinery/pipes/pipe.dm @@ -64,7 +64,7 @@ /obj/machinery/atmospherics/pipe/return_analyzable_air() if(!parent) return null - return parent.air + return list(parent.air) + parent.other_airs /obj/machinery/atmospherics/pipe/build_network(remove_deferral = FALSE) if(!parent) diff --git a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm index 5fa57bd2e723..9843b487fad9 100644 --- a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm +++ b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm @@ -120,12 +120,12 @@ update_icon() return TRUE -/obj/machinery/atmospherics/portable/attackby__legacy__attackchain(obj/item/W, mob/user, params) - if(istype(W, /obj/item/tank)) +/obj/machinery/atmospherics/portable/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/tank)) if(!(stat & BROKEN)) if(!user.drop_item()) - return - var/obj/item/tank/T = W + return ITEM_INTERACT_COMPLETE + var/obj/item/tank/T = used user.drop_item() if(holding_tank) to_chat(user, "[holding_tank ? "In one smooth motion you pop [holding_tank] out of [src]'s connector and replace it with [T]" : "You insert [T] into [src]"].") @@ -133,7 +133,7 @@ T.loc = src holding_tank = T update_icon() - return + return ITEM_INTERACT_COMPLETE return ..() /obj/machinery/atmospherics/portable/wrench_act(mob/user, obj/item/I) @@ -157,9 +157,9 @@ else to_chat(user, "Nothing happens.") -/obj/machinery/atmospherics/portable/attacked_by__legacy__attackchain(obj/item/I, mob/user) - if(I.force < 10 && !(stat & BROKEN)) +/obj/machinery/atmospherics/portable/attacked_by(obj/item/attacker, mob/living/user) + if(attacker.force < 10 && !(stat & BROKEN)) take_damage(0) else add_fingerprint(user) - ..() + return ..() diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index b31bc40a857c..cd1ad837041b 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -302,7 +302,7 @@ return TRUE /obj/item/clothing/under/proc/set_sensors(mob/user) - if(!user.Adjacent(src)) + if(!Adjacent(user) && !user.Adjacent(src)) to_chat(user, "You are too far away!") return @@ -321,7 +321,7 @@ var/list/modes = list("Off", "Binary sensors", "Vitals tracker", "Tracking beacon") var/switchMode = tgui_input_list(user, "Select a sensor mode:", "Suit Sensor Mode", modes, modes[sensor_mode + 1]) // If they walk away after the menu is already open. - if(!user.Adjacent(src)) + if(!Adjacent(user) && !user.Adjacent(src)) to_chat(user, "You have moved too far away!") return // If your hands get lopped off or cuffed after the menu is open. diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index da306356d125..2b30ef879d83 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -1,6 +1,6 @@ /obj/item/clothing/head/helmet name = "helmet" - desc = "A standard-issue protective helmet used by Nanotrasen corporate security. Provides light protection against most sources of damage." + desc = "A mass-produced protective helmet used by security personnel across the sector. Provides light protection against most sources of damage." icon_state = "helmetmaterials" w_class = WEIGHT_CLASS_NORMAL flags = HEADBANGPROTECT diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 1e3b00c3fea8..8dc10bf62760 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -33,7 +33,6 @@ armor = list(MELEE = 5, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, RAD = 0, FIRE = INFINITY, ACID = 60) origin_tech = "materials=2;engineering=3" actions_types = list(/datum/action/item_action/toggle) - flags_inv = HIDEEARS|HIDEEYES|HIDEFACE flags_cover = MASKCOVERSEYES can_toggle = TRUE visor_flags_inv = HIDEEYES @@ -56,7 +55,6 @@ desc = "A military-grade gas mask that can be connected to an air supply." icon_state = "gas_mining" actions_types = list(/datum/action/item_action/adjust) - flags = BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT armor = list(MELEE = 5, BULLET = 5, LASER = 5, ENERGY = 5, BOMB = 0, RAD = 0, FIRE = 10, ACID = 35) resistance_flags = FIRE_PROOF can_toggle = TRUE @@ -96,17 +94,11 @@ //Bane gas mask -/obj/item/clothing/mask/banemask +/obj/item/clothing/mask/gas/banemask name = "bane mask" desc = "Only when the station is in flames, do you have my permission to robust." icon_state = "bane_mask" - flags = BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT - flags_inv = HIDEEARS|HIDEEYES|HIDEFACE - flags_cover = MASKCOVERSMOUTH | MASKCOVERSEYES - w_class = WEIGHT_CLASS_NORMAL - item_state = "bane_mask" - gas_transfer_coefficient = 0.01 - permeability_coefficient = 0.01 + item_state = "sechailer" //Plague Dr suit can be found in clothing/suits/bio.dm @@ -258,6 +250,7 @@ desc = "A standard issue Security gas mask with integrated 'Compli-o-nator 3000' device, plays over a dozen pre-recorded compliance phrases designed to get scumbags to stand still whilst you taze them. Do not tamper with the device." icon_state = "sechailer" item_state = "sechailer" + flags_inv = HIDEEYES|HIDEFACE var/phrase = 1 var/aggressiveness = 1 var/safety = 1 @@ -284,41 +277,30 @@ "super" = "Face the wrath of the golden bolt.", "dredd" = "I am, the LAW!" ) -/obj/item/clothing/mask/gas/sechailer/hos - name = "head of security's SWAT mask" - desc = "A close-fitting tactical mask with an especially aggressive Compli-o-nator 3000. It has a tan stripe." - icon_state = "hosmask" - can_toggle = FALSE - aggressiveness = 3 - phrase = 12 - actions_types = list(/datum/action/item_action/halt, /datum/action/item_action/selectphrase) - -/obj/item/clothing/mask/gas/sechailer/warden - name = "warden's SWAT mask" - desc = "A close-fitting tactical mask with an especially aggressive Compli-o-nator 3000. It has a blue stripe." - icon_state = "wardenmask" - can_toggle = FALSE - aggressiveness = 3 - phrase = 12 - actions_types = list(/datum/action/item_action/halt, /datum/action/item_action/selectphrase) - /obj/item/clothing/mask/gas/sechailer/swat name = "\improper SWAT mask" desc = "A close-fitting tactical mask with an especially aggressive Compli-o-nator 3000." icon_state = "officermask" + flags_inv = HIDEEARS|HIDEEYES|HIDEFACE aggressiveness = 3 phrase = 12 actions_types = list(/datum/action/item_action/halt, /datum/action/item_action/selectphrase) -/obj/item/clothing/mask/gas/sechailer/blue +/obj/item/clothing/mask/gas/sechailer/swat/hos + name = "head of security's SWAT mask" + desc = "A close-fitting tactical mask with an especially aggressive Compli-o-nator 3000. It has a tan stripe." + icon_state = "hosmask" + +/obj/item/clothing/mask/gas/sechailer/swat/warden + name = "warden's SWAT mask" + desc = "A close-fitting tactical mask with an especially aggressive Compli-o-nator 3000. It has a blue stripe." + icon_state = "wardenmask" + +/obj/item/clothing/mask/gas/sechailer/swat/blue name = "blue SWAT mask" desc = "A neon blue swat mask, used for demoralizing Greytide in the wild." icon_state = "blue_sechailer" - item_state = "blue_sechailer" - aggressiveness = 3 - phrase = 12 - actions_types = list(/datum/action/item_action/halt, /datum/action/item_action/selectphrase) /obj/item/clothing/mask/gas/sechailer/cyborg name = "security hailer" diff --git a/code/modules/clothing/suits/armor_suits.dm b/code/modules/clothing/suits/armor_suits.dm index db8fb8e25717..3ddf3ec98aee 100644 --- a/code/modules/clothing/suits/armor_suits.dm +++ b/code/modules/clothing/suits/armor_suits.dm @@ -16,8 +16,8 @@ w_class = WEIGHT_CLASS_NORMAL /obj/item/clothing/suit/armor/vest - name = "perfectly generic armor vest" - desc = "A perfectly generic armored vest. Every aspect of it is exceptionally boring. If you see this, make an issue report on GitHub." + name = "armor vest" + desc = "A mass-produced Level II soft armor vest that provides light protection against most sources of damage." sprite_sheets = list( "Grey" = 'icons/mob/clothing/species/grey/suit.dmi', "Vox" = 'icons/mob/clothing/species/vox/suit.dmi' diff --git a/code/modules/economy/economy_machinery/account_terminal.dm b/code/modules/economy/economy_machinery/account_terminal.dm index f3576f42edff..f125ade29790 100644 --- a/code/modules/economy/economy_machinery/account_terminal.dm +++ b/code/modules/economy/economy_machinery/account_terminal.dm @@ -24,9 +24,10 @@ /obj/machinery/computer/account_database/proc/reconnect_database() account_db = GLOB.station_money_database -/obj/machinery/computer/account_database/attackby__legacy__attackchain(obj/O, mob/user, params) - if(ui_login_attackby(O, user)) - return +/obj/machinery/computer/account_database/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(ui_login_attackby(used, user)) + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/computer/account_database/attack_hand(mob/user) diff --git a/code/modules/economy/economy_machinery/atm.dm b/code/modules/economy/economy_machinery/atm.dm index b55c28d3d74e..c21ed7772584 100644 --- a/code/modules/economy/economy_machinery/atm.dm +++ b/code/modules/economy/economy_machinery/atm.dm @@ -77,17 +77,15 @@ /obj/machinery/economy/atm/attack_ghost(mob/user) ui_interact(user) -/obj/machinery/economy/atm/attackby__legacy__attackchain(obj/item/I, mob/user) - if(istype(I, /obj/item/card/id)) +/obj/machinery/economy/atm/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/card/id)) if(has_power()) - handle_id_insert(I, user) - return TRUE + handle_id_insert(used, user) + return ITEM_INTERACT_COMPLETE else if(authenticated_account) - if(istype(I, /obj/item/stack/spacecash)) - if(!has_power()) - return - insert_cash(I, user) - return TRUE + if(istype(used, /obj/item/stack/spacecash) && has_power()) + insert_cash(used, user) + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/modules/economy/economy_machinery/eftpos.dm b/code/modules/economy/economy_machinery/eftpos.dm index ef7dd5c83007..0502575529a7 100644 --- a/code/modules/economy/economy_machinery/eftpos.dm +++ b/code/modules/economy/economy_machinery/eftpos.dm @@ -23,6 +23,8 @@ var/datum/money_account_database/main_station/account_database ///Current money account the EFTPOS is depositing to var/datum/money_account/linked_account + ///Is this a portable unit that you can offer with *payme? + var/can_offer = TRUE /obj/item/eftpos/Initialize(mapload) machine_name = "EFTPOS #[rand(101, 999)]" @@ -80,6 +82,7 @@ ) data["available_accounts"] += list(account_data) + data["can_offer"] = can_offer return data @@ -148,21 +151,27 @@ else if(istype(I, /obj/item/card/emag)) access_code = 0 to_chat(user, "[bicon(src)]Access code reset to 0.") + if("offer") + if(can_offer) + offer(user) +/obj/item/eftpos/proc/offer(mob/living/user) + user.apply_status_effect(STATUS_EFFECT_OFFERING_EFTPOS) /obj/item/eftpos/proc/scan_card(obj/item/card/id/C, mob/user, secured = TRUE) - visible_message("[user] swipes a card through [src].") - if(!transaction_locked || transaction_paid || !secured) + visible_message("[user] swipes a card through [src], but nothing happens.") return + visible_message("[user] swipes a card through [src].") + if(!linked_account) - to_chat(user, "[bicon(src)]EFTPOS is not connected to an account.") + visible_message("[bicon(src)][src] buzzes as its display flashes \"EFTPOS is not connected to an account.\"", "You hear something buzz.") return var/datum/money_account/D = GLOB.station_money_database.find_user_account(C.associated_account_number, include_departments = FALSE) if(!D) - to_chat(user, "Your currently in use card is not connected to a money account.") + visible_message("[bicon(src)][src] buzzes as its display flashes \"Card is not connected to an account.\"", "You hear something buzz.") return //if security level high enough, prompt for pin var/attempt_pin @@ -172,19 +181,19 @@ return //given the credentials, can the associated account be accessed right now? if(!GLOB.station_money_database.try_authenticate_login(D, attempt_pin, restricted_bypass = FALSE)) - to_chat(user, "[bicon(src)]Unable to access account, insufficient access.") + visible_message("[bicon(src)][src] buzzes as its display flashes \"Access denied.\"", "You hear something buzz.") return if(tgui_alert(user, "Are you sure you want to pay $[transaction_amount] to: [linked_account.account_name]", "Confirm transaction", list("Yes", "No")) != "Yes") return - if(!Adjacent(user)) + if(!Adjacent(user) && !(can_offer && get_dist(user, src) <= 2)) return //attempt to charge account money if(!GLOB.station_money_database.charge_account(D, transaction_amount, transaction_purpose, machine_name, FALSE, FALSE)) - to_chat(user, "[bicon(src)]Insufficient credits in your account!") + visible_message("[bicon(src)][src] buzzes as its display flashes \"Insufficient funds.\"", "You hear something buzz.") return GLOB.station_money_database.credit_account(linked_account, transaction_amount, transaction_purpose, machine_name, FALSE) playsound(src, transaction_sound, 50, TRUE) - visible_message("[src] chimes!") + visible_message("[bicon(src)][src] chimes as its display reads \"Transaction successful!\"", "You hear something chime.") transaction_paid = TRUE addtimer(VARSET_CALLBACK(src, transaction_paid, FALSE), 5 SECONDS) @@ -232,6 +241,7 @@ pickup_sound = 'sound/items/handling/toolbox_pickup.ogg' transaction_sound = 'sound/machines/checkout.ogg' attack_verb = list("bounced a check off", "checked-out", "tipped") + can_offer = FALSE /obj/item/eftpos/register/examine(mob/user) . = ..() diff --git a/code/modules/events/immovable_rod.dm b/code/modules/events/immovable_rod.dm index 8017f6853640..dd6d39e604bb 100644 --- a/code/modules/events/immovable_rod.dm +++ b/code/modules/events/immovable_rod.dm @@ -39,6 +39,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 /obj/effect/immovablerod/New(atom/_start, atom/_end, delay) . = ..() + ADD_TRAIT(src, TRAIT_NO_EDGE_TRANSITIONS, ROUNDSTART_TRAIT) start = _start end = _end loc = start diff --git a/code/modules/fish/fishtank.dm b/code/modules/fish/fishtank.dm index eaa21b7dc702..36dc425b41ea 100644 --- a/code/modules/fish/fishtank.dm +++ b/code/modules/fish/fishtank.dm @@ -604,22 +604,22 @@ new /obj/item/stack/sheet/glass(get_turf(src), shard_count + 1) //Produce the appropriate number of glass sheets, in a single stack qdel(src) -/obj/machinery/fishtank/attackby__legacy__attackchain(obj/item/O, mob/user) +/obj/machinery/fishtank/item_interaction(mob/living/user, obj/item/used, list/modifiers) //Open reagent containers add and remove water - if(O.is_drainable()) + if(used.is_drainable()) //Containers with any reagents will get dumped in - if(O.reagents.total_volume) + if(used.reagents.total_volume) var/water_value = 0 - water_value += O.reagents.get_reagent_amount("water") //Water is full value - water_value += O.reagents.get_reagent_amount("holywater") *1.1 //Holywater is (somehow) better. Who said religion had to make sense? - water_value += O.reagents.get_reagent_amount("tonic") * 0.25 //Tonic water is 25% value - water_value += O.reagents.get_reagent_amount("sodawater") * 0.50 //Sodawater is 50% value - water_value += O.reagents.get_reagent_amount("fishwater") * 0.75 //Fishwater is 75% value, to account for the fish poo - water_value += O.reagents.get_reagent_amount("ice") * 0.80 //Ice is 80% value + water_value += used.reagents.get_reagent_amount("water") //Water is full value + water_value += used.reagents.get_reagent_amount("holywater") *1.1 //Holywater is (somehow) better. Who said religion had to make sense? + water_value += used.reagents.get_reagent_amount("tonic") * 0.25 //Tonic water is 25% value + water_value += used.reagents.get_reagent_amount("sodawater") * 0.50 //Sodawater is 50% value + water_value += used.reagents.get_reagent_amount("fishwater") * 0.75 //Fishwater is 75% value, to account for the fish poo + water_value += used.reagents.get_reagent_amount("ice") * 0.80 //Ice is 80% value var/message = "" if(!water_value) //The container has no water value, clear everything in it message = "The filtration process removes everything, leaving the water level unchanged." - O.reagents.clear_reagents() + used.reagents.clear_reagents() else if(water_level == water_capacity) to_chat(user, "[src] is already full!") @@ -630,25 +630,27 @@ message += " You filled [src] to the brim!" if((water_level + water_value) > water_capacity) message += " You overfilled [src] and some water runs down the side, wasted." - O.reagents.clear_reagents() + used.reagents.clear_reagents() adjust_water_level(water_value) - user.visible_message("[user.name] pours the contents of [O.name] into [src].", "[message]") + user.visible_message("[user.name] pours the contents of [used.name] into [src].", "[message]") //Empty containers will scoop out water, filling the container as much as possible from the water_level - else if(O.is_refillable()) + else if(used.is_refillable()) if(!water_level) to_chat(user, "[src] is empty!") else - if(water_level >= O.reagents.maximum_volume) //Enough to fill the container completely - O.reagents.add_reagent("fishwater", O.reagents.maximum_volume) - adjust_water_level(-O.reagents.maximum_volume) - user.visible_message("[user.name] scoops out some water from [src].", "You completely fill [O.name] from [src].") + if(water_level >= used.reagents.maximum_volume) //Enough to fill the container completely + used.reagents.add_reagent("fishwater", used.reagents.maximum_volume) + adjust_water_level(-used.reagents.maximum_volume) + user.visible_message("[user.name] scoops out some water from [src].", "You completely fill [used.name] from [src].") else //Fill the container as much as possible with the water_level - O.reagents.add_reagent("fishwater", water_level) + used.reagents.add_reagent("fishwater", water_level) adjust_water_level(-water_level) - user.visible_message("[user.name] scoops out some water from [src].", "You fill [O.name] with the last of the water in [src].") + user.visible_message("[user.name] scoops out some water from [src].", "You fill [used.name] with the last of the water in [src].") + + return ITEM_INTERACT_COMPLETE //Fish eggs - else if(istype(O, /obj/item/fish_eggs)) - var/obj/item/fish_eggs/egg = O + else if(istype(used, /obj/item/fish_eggs)) + var/obj/item/fish_eggs/egg = used //Don't add eggs if there is no water (they kinda need that to live) if(!water_level) to_chat(user, "[src] has no water; [egg.name] won't hatch without water!") @@ -659,8 +661,10 @@ else add_fish(egg.fish_type) qdel(egg) + + return ITEM_INTERACT_COMPLETE //Fish food - else if(istype(O, /obj/item/fishfood)) + else if(istype(used, /obj/item/fishfood)) //Only add food if there is water and it isn't already full of food if(water_level) if(food_level < 10) @@ -673,8 +677,10 @@ to_chat(user, "[src] already has plenty of food in it. You decide to not add more.") else to_chat(user, "[src] doesn't have any water in it. You should fill it with water first.") + + return ITEM_INTERACT_COMPLETE //Fish egg scoop - else if(istype(O, /obj/item/egg_scoop)) + else if(istype(used, /obj/item/egg_scoop)) if(egg_count) // Is the user holding a fish bag? var/obj/item/storage/bag/fish_bag @@ -686,18 +692,22 @@ harvest_eggs(user, fish_bag) else user.visible_message("[user.name] fails to harvest any fish eggs from [src].", "There are no fish eggs in [src] to scoop out.") + + return ITEM_INTERACT_COMPLETE //Fish net - else if(istype(O, /obj/item/fish_net)) + else if(istype(used, /obj/item/fish_net)) harvest_fish(user) + return ITEM_INTERACT_COMPLETE //Tank brush - else if(istype(O, /obj/item/tank_brush)) + else if(istype(used, /obj/item/tank_brush)) if(filth_level == 0) to_chat(user, "[src] is already spotless!") else adjust_filth_level(-filth_level) user.visible_message("[user.name] scrubs the inside of [src], cleaning the filth.", "You scrub the inside of [src], cleaning the filth.") - else - return ..() + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/fishtank/wrench_act(mob/user, obj/item/I) //Wrenches can deconstruct empty tanks, but not tanks with any water. Kills any fish left inside and destroys any unharvested eggs in the process . = TRUE diff --git a/code/modules/food_and_drinks/drinks/bottler/bottler.dm b/code/modules/food_and_drinks/drinks/bottler/bottler.dm index 998a0eba2390..18b702a2a681 100644 --- a/code/modules/food_and_drinks/drinks/bottler/bottler.dm +++ b/code/modules/food_and_drinks/drinks/bottler/bottler.dm @@ -40,49 +40,49 @@ else qdel(recipe) -/obj/machinery/bottler/attackby__legacy__attackchain(obj/item/O, mob/user, params) - if(!user.canUnEquip(O, 0)) - to_chat(user, "[O] is stuck to your hand, you can't seem to put it down!") - return 0 - if(is_type_in_list(O,acceptable_items)) - if(istype(O, /obj/item/food)) - var/obj/item/food/S = O +/obj/machinery/bottler/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(!user.canUnEquip(used, 0)) + to_chat(user, "[used] is stuck to your hand, you can't seem to put it down!") + return ITEM_INTERACT_COMPLETE + if(is_type_in_list(used,acceptable_items)) + if(istype(used, /obj/item/food)) + var/obj/item/food/S = used user.drop_item_to_ground(S) if(S.reagents && !S.reagents.total_volume) //This prevents us from using empty foods, should one occur due to some sort of error to_chat(user, "[S] is gone, oh no!") qdel(S) //Delete the food object because it is useless even as food due to the lack of reagents else insert_item(S, user) - return 1 - else if(istype(O, /obj/item/reagent_containers/drinks/cans)) - var/obj/item/reagent_containers/drinks/cans/C = O + return ITEM_INTERACT_COMPLETE + else if(istype(used, /obj/item/reagent_containers/drinks/cans)) + var/obj/item/reagent_containers/drinks/cans/C = used if(C.reagents) if(C.can_opened && C.reagents.total_volume) //This prevents us from using opened cans that still have something in them to_chat(user, "Only unopened cans and bottles can be processed to ensure product integrity.") - return 0 + return ITEM_INTERACT_COMPLETE user.drop_item_to_ground(C) if(!C.reagents.total_volume) //Empty cans get recycled, even if they have somehow remained unopened due to some sort of error recycle_container(C) else //Full cans that are unopened get inserted for processing as ingredients insert_item(C, user) - return 1 + return ITEM_INTERACT_COMPLETE else - user.drop_item_to_ground(O) - insert_item(O, user) - return 1 - else if(istype(O, /obj/item/trash/can)) //Crushed cans (and bottles) are returnable still - var/obj/item/trash/can/C = O + user.drop_item_to_ground(used) + insert_item(used, user) + return ITEM_INTERACT_COMPLETE + else if(istype(used, /obj/item/trash/can)) //Crushed cans (and bottles) are returnable still + var/obj/item/trash/can/C = used user.drop_item_to_ground(C) recycle_container(C) - return 1 - else if(istype(O, /obj/item/stack/sheet)) //Sheets of materials can replenish the machine's supply of drink containers (when people inevitably don't return them) - var/obj/item/stack/sheet/S = O + return ITEM_INTERACT_COMPLETE + else if(istype(used, /obj/item/stack/sheet)) //Sheets of materials can replenish the machine's supply of drink containers (when people inevitably don't return them) + var/obj/item/stack/sheet/S = used user.drop_item_to_ground(S) process_sheets(S) - return 1 + return ITEM_INTERACT_COMPLETE else //If it doesn't qualify in the above checks, we don't want it. Inform the person so they (ideally) stop trying to put the nuke disc in. to_chat(user, "You aren't sure this is able to be processed by the machine.") - return 0 + return ITEM_INTERACT_COMPLETE /obj/machinery/bottler/wrench_act(mob/user, obj/item/I) . = TRUE diff --git a/code/modules/food_and_drinks/food/customizables.dm b/code/modules/food_and_drinks/food/customizables.dm index 24f3218bd199..5f4199d33309 100644 --- a/code/modules/food_and_drinks/food/customizables.dm +++ b/code/modules/food_and_drinks/food/customizables.dm @@ -6,7 +6,7 @@ do {\ qdel(src);\ } while(FALSE) -/obj/item/food/breadslice/attackby__legacy__attackchain(obj/item/W, mob/user, params) +/obj/item/food/sliced/bread/attackby__legacy__attackchain(obj/item/W, mob/user, params) if(istype(W, /obj/item/food) && !(W.flags & NODROP)) MAKE_CUSTOM_FOOD(W, user, /obj/item/food/customizable/sandwich) return diff --git a/code/modules/food_and_drinks/food/foods/baked_goods.dm b/code/modules/food_and_drinks/food/foods/baked_goods.dm index 1ae2031b7288..d9c3857e654e 100644 --- a/code/modules/food_and_drinks/food/foods/baked_goods.dm +++ b/code/modules/food_and_drinks/food/foods/baked_goods.dm @@ -10,7 +10,7 @@ desc = "A favorite desert of a certain wascally wabbit. Not a lie." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "carrotcake" - slice_path = /obj/item/food/carrotcakeslice + slice_path = /obj/item/food/sliced/carrot_cake slices_num = 5 bitesize = 3 filling_color = "#FFD675" @@ -18,13 +18,14 @@ tastes = list("cake" = 5, "sweetness" = 2, "carrot" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/carrotcakeslice +/obj/item/food/sliced/carrot_cake name = "carrot cake slice" desc = "Carrotty slice of Carrot Cake, carrots are good for your eyes! Also not a lie." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "carrotcake_slice" trash = /obj/item/trash/plate filling_color = "#FFD675" + list_reagents = list("nutriment" = 4, "oculine" = 2, "vitamin" = 1) tastes = list("cake" = 5, "sweetness" = 2, "carrot" = 1) goal_difficulty = FOOD_GOAL_EASY @@ -34,7 +35,7 @@ desc = "A squishy cake-thing." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "braincake" - slice_path = /obj/item/food/braincakeslice + slice_path = /obj/item/food/sliced/brain_cake slices_num = 5 filling_color = "#E6AEDB" bitesize = 3 @@ -42,13 +43,14 @@ tastes = list("cake" = 5, "sweetness" = 2, "brains" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/braincakeslice +/obj/item/food/sliced/brain_cake name = "brain cake slice" desc = "Lemme tell you something about brains. THEY'RE DELICIOUS." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "braincakeslice" trash = /obj/item/trash/plate filling_color = "#E6AEDB" + list_reagents = list("protein" = 2, "nutriment" = 2, "mannitol" = 2, "vitamin" = 1) tastes = list("cake" = 5, "sweetness" = 2, "brains" = 1) goal_difficulty = FOOD_GOAL_NORMAL @@ -57,7 +59,7 @@ desc = "DANGEROUSLY cheesy." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "cheesecake" - slice_path = /obj/item/food/cheesecakeslice + slice_path = /obj/item/food/sliced/cheese_cake slices_num = 5 filling_color = "#FAF7AF" bitesize = 3 @@ -65,13 +67,14 @@ tastes = list("cake" = 4, "cream cheese" = 3) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/cheesecakeslice +/obj/item/food/sliced/cheese_cake name = "cheese cake slice" desc = "Slice of pure cheestisfaction." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "cheesecake_slice" trash = /obj/item/trash/plate filling_color = "#FAF7AF" + list_reagents = list("nutriment" = 4, "vitamin" = 1) tastes = list("cake" = 4, "cream cheese" = 3) goal_difficulty = FOOD_GOAL_EASY @@ -80,7 +83,7 @@ desc = "A plain cake, not a lie." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "plaincake" - slice_path = /obj/item/food/plaincakeslice + slice_path = /obj/item/food/sliced/plain_cake slices_num = 5 bitesize = 3 filling_color = "#F7EDD5" @@ -88,13 +91,14 @@ tastes = list("cake" = 5, "vanilla" = 1, "sweetness" = 2) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/plaincakeslice +/obj/item/food/sliced/plain_cake name = "plain cake slice" desc = "Just a slice of cake, it is enough for everyone." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "plaincake_slice" trash = /obj/item/trash/plate filling_color = "#F7EDD5" + list_reagents = list("nutriment" = 4, "vitamin" = 1) tastes = list("cake" = 5, "vanilla" = 1, "sweetness" = 2) goal_difficulty = FOOD_GOAL_EASY @@ -103,7 +107,7 @@ desc = "A cake with added orange." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "orangecake" - slice_path = /obj/item/food/orangecakeslice + slice_path = /obj/item/food/sliced/orange_cake slices_num = 5 bitesize = 3 filling_color = "#FADA8E" @@ -111,13 +115,14 @@ tastes = list("cake" = 5, "sweetness" = 2, "oranges" = 2) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/orangecakeslice +/obj/item/food/sliced/orange_cake name = "orange cake slice" desc = "Just a slice of cake, it is enough for everyone." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "orangecake_slice" trash = /obj/item/trash/plate filling_color = "#FADA8E" + list_reagents = list("nutriment" = 4, "vitamin" = 1) tastes = list("cake" = 5, "sweetness" = 2, "oranges" = 2) goal_difficulty = FOOD_GOAL_EASY @@ -126,7 +131,7 @@ desc = "A cake with added bananas." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "bananacake" - slice_path = /obj/item/food/bananacakeslice + slice_path = /obj/item/food/sliced/banana_cake slices_num = 5 bitesize = 3 filling_color = "#FADA8E" @@ -134,13 +139,14 @@ tastes = list("cake" = 5, "sweetness" = 2, "banana" = 2) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/bananacakeslice +/obj/item/food/sliced/banana_cake name = "banana cake slice" desc = "Just a slice of cake, it is enough for everyone." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "bananacake_slice" trash = /obj/item/trash/plate filling_color = "#FADA8E" + list_reagents = list("nutriment" = 4, "vitamin" = 1) tastes = list("cake" = 5, "sweetness" = 2, "banana" = 2) goal_difficulty = FOOD_GOAL_EASY @@ -150,20 +156,21 @@ icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "limecake" bitesize = 3 - slice_path = /obj/item/food/limecakeslice + slice_path = /obj/item/food/sliced/lime_cake slices_num = 5 filling_color = "#CBFA8E" list_reagents = list("nutriment" = 20, "vitamin" = 5) tastes = list("cake" = 5, "sweetness" = 2, "unbearable sourness" = 2) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/limecakeslice +/obj/item/food/sliced/lime_cake name = "lime cake slice" desc = "Just a slice of cake, it is enough for everyone." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "limecake_slice" trash = /obj/item/trash/plate filling_color = "#CBFA8E" + list_reagents = list("nutriment" = 4, "vitamin" = 1) tastes = list("cake" = 5, "sweetness" = 2, "unbearable sourness" = 2) goal_difficulty = FOOD_GOAL_EASY @@ -172,7 +179,7 @@ desc = "A cake with added lemon." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "lemoncake" - slice_path = /obj/item/food/lemoncakeslice + slice_path = /obj/item/food/sliced/lemon_cake slices_num = 5 bitesize = 3 filling_color = "#FAFA8E" @@ -180,13 +187,14 @@ tastes = list("cake" = 5, "sweetness" = 2, "sourness" = 2) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/lemoncakeslice +/obj/item/food/sliced/lemon_cake name = "lemon cake slice" desc = "Just a slice of cake, it is enough for everyone." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "lemoncake_slice" trash = /obj/item/trash/plate filling_color = "#FAFA8E" + list_reagents = list("nutriment" = 4, "vitamin" = 1) tastes = list("cake" = 5, "sweetness" = 2, "sourness" = 2) goal_difficulty = FOOD_GOAL_EASY @@ -195,7 +203,7 @@ desc = "A cake with added chocolate." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "chocolatecake" - slice_path = /obj/item/food/chocolatecakeslice + slice_path = /obj/item/food/sliced/chocolate_cake slices_num = 5 bitesize = 3 filling_color = "#805930" @@ -203,13 +211,14 @@ tastes = list("cake" = 5, "sweetness" = 1, "chocolate" = 4) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/chocolatecakeslice +/obj/item/food/sliced/chocolate_cake name = "chocolate cake slice" desc = "Just a slice of cake, it is enough for everyone." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "chocolatecake_slice" trash = /obj/item/trash/plate filling_color = "#805930" + list_reagents = list("nutriment" = 4, "vitamin" = 1) tastes = list("cake" = 5, "sweetness" = 1, "chocolate" = 4) goal_difficulty = FOOD_GOAL_EASY @@ -218,7 +227,7 @@ desc = "Happy Birthday..." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "birthdaycake" - slice_path = /obj/item/food/birthdaycakeslice + slice_path = /obj/item/food/sliced/birthday_cake slices_num = 5 filling_color = "#FFD6D6" bitesize = 3 @@ -226,13 +235,14 @@ tastes = list("cake" = 5, "sweetness" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/birthdaycakeslice +/obj/item/food/sliced/birthday_cake name = "birthday cake slice" desc = "A slice of your birthday!" icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "birthdaycakeslice" trash = /obj/item/trash/plate filling_color = "#FFD6D6" + list_reagents = list("nutriment" = 4, "vitamin" = 1) tastes = list("cake" = 5, "sweetness" = 1) goal_difficulty = FOOD_GOAL_NORMAL @@ -241,7 +251,7 @@ desc = "A cake centered with Apple." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "applecake" - slice_path = /obj/item/food/applecakeslice + slice_path = /obj/item/food/sliced/apple_cake slices_num = 5 bitesize = 3 filling_color = "#EBF5B8" @@ -249,13 +259,14 @@ tastes = list("cake" = 5, "sweetness" = 1, "apple" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/applecakeslice +/obj/item/food/sliced/apple_cake name = "apple cake slice" desc = "A slice of heavenly cake." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "applecakeslice" trash = /obj/item/trash/plate filling_color = "#EBF5B8" + list_reagents = list("nutriment" = 4, "vitamin" = 1) tastes = list("cake" = 5, "sweetness" = 1, "apple" = 1) goal_difficulty = FOOD_GOAL_EASY @@ -264,21 +275,22 @@ desc = "A cake made for angels and chaplains alike! Contains holy water." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "holy_cake" - slice_path = /obj/item/food/holy_cake_slice + slice_path = /obj/item/food/sliced/holy_cake slices_num = 5 bitesize = 3 filling_color = "#ffffff" - list_reagents = list("nutriment" = 1, "vitamin" = 3, "holywater" = 10) + list_reagents = list("nutriment" = 5, "vitamin" = 5, "holywater" = 10) tastes = list("cake" = 5, "sweetness" = 1, "clouds" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/holy_cake_slice +/obj/item/food/sliced/holy_cake name = "holy cake slice" desc = "A slice of heavenly cake." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "holy_cake_slice" trash = /obj/item/trash/plate filling_color = "#ffffff" + list_reagents = list("nutriment" = 1, "vitamin" = 1, "holywater" = 2) tastes = list("cake" = 5, "sweetness" = 1, "clouds" = 1) goal_difficulty = FOOD_GOAL_EASY @@ -287,7 +299,7 @@ desc = "A chocolate cake with five strawberries on top. For some reason, this configuration of cake is particularly aesthetically pleasing to AIs in SELF." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "liars_cake" - slice_path = /obj/item/food/liars_slice + slice_path = /obj/item/food/sliced/liars slices_num = 5 bitesize = 3 filling_color = "#240606c7" @@ -295,7 +307,7 @@ tastes = list("blackberry" = 2, "strawberries" = 2, "chocolate" = 2, "sweetness" = 2, "cake" = 3) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/liars_slice +/obj/item/food/sliced/liars name = "strawberry chocolate cake slice" desc = "Just a slice of cake with five strawberries on top. \ For some reason, this configuration of cake is particularly aesthetically pleasing to AIs in SELF." @@ -303,6 +315,7 @@ icon_state = "liars_slice" trash = /obj/item/trash/plate filling_color = "#ffffff" + list_reagents = list("nutriment" = 4, "vitamin" = 1, "cocoa" = 1) tastes = list("strawberries" = 2, "chocolate" = 2, "sweetness" = 2, "cake" = 3) goal_difficulty = FOOD_GOAL_EASY @@ -311,7 +324,7 @@ desc = "A plain cake, filled with assortment of blackberries and strawberries!" icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "vanilla_berry_cake" - slice_path = /obj/item/food/vanilla_berry_cake_slice + slice_path = /obj/item/food/sliced/vanilla_berry_cake slices_num = 5 bitesize = 3 filling_color = "#f0e3e3c7" @@ -319,13 +332,14 @@ tastes = list("blackberry" = 2, "strawberries" = 2, "vanilla" = 2, "sweetness" = 2, "cake" = 3) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/vanilla_berry_cake_slice +/obj/item/food/sliced/vanilla_berry_cake name = "blackberry and strawberry vanilla cake slice" desc = "Just a slice of cake filled with assortment of blackberries and strawberries!" icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "vanilla_berry_cake_slice" trash = /obj/item/trash/plate filling_color = "#ffffff" + list_reagents = list("nutriment" = 4, "vitamin" = 1, "vanilla" = 1) tastes = list("blackberry" = 2, "strawberries" = 2, "vanilla" = 2, "sweetness" = 2, "cake" = 3) goal_difficulty = FOOD_GOAL_EASY @@ -334,7 +348,7 @@ desc = "A \"cake\" that is made with electronic boards and leaks acid..." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "hardware_cake" - slice_path = /obj/item/food/hardware_cake_slice + slice_path = /obj/item/food/sliced/hardware_cake slices_num = 5 bitesize = 3 filling_color = "#4ac25e" @@ -342,13 +356,14 @@ tastes = list("acid" = 3, "metal" = 4, "glass" = 5) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/hardware_cake_slice +/obj/item/food/sliced/hardware_cake name = "hardware cake slice" desc = "A slice of electronic boards and some acid." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "hardware_cake_slice" trash = /obj/item/trash/plate filling_color = "#4ac25e" + list_reagents = list("nutriment" = 4, "vitamin" = 1, "sacid" = 3, "oil" = 3) tastes = list("acid" = 3, "metal" = 4, "glass" = 5) goal_difficulty = FOOD_GOAL_EASY @@ -357,7 +372,7 @@ desc = "A cake centred with Plums." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "plum_cake" - slice_path = /obj/item/food/plum_cake_slice + slice_path = /obj/item/food/sliced/plum_cake slices_num = 5 bitesize = 3 filling_color = "#a128c5" @@ -365,13 +380,14 @@ tastes = list("cake" = 5, "sweetness" = 1, "plum" = 2) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/plum_cake_slice +/obj/item/food/sliced/plum_cake name = "plum cake slice" desc = "A slice of plum cake." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "plum_cake_slice" trash = /obj/item/trash/plate filling_color = "#a128c5" + list_reagents = list("nutriment" = 4, "vitamin" = 2) tastes = list("cake" = 5, "sweetness" = 1, "plum" = 2) goal_difficulty = FOOD_GOAL_EASY @@ -380,7 +396,7 @@ desc = "A condensed cake made for filling people up quickly." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "pound_cake" - slice_path = /obj/item/food/pound_cake_slice + slice_path = /obj/item/food/sliced/pound_cake slices_num = 5 bitesize = 3 filling_color = "#c4cab7" @@ -388,13 +404,14 @@ tastes = list("cake" = 5, "sweetness" = 5, "batter" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/pound_cake_slice +/obj/item/food/sliced/pound_cake name = "pound cake slice" desc = "A slice of condensed cake made for filling people up quickly." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "pound_cake_slice" trash = /obj/item/trash/plate filling_color = "#ffffff" + list_reagents = list("nutriment" = 12, "vitamin" = 4) tastes = list("cake" = 5, "sweetness" = 5, "batter" = 1) goal_difficulty = FOOD_GOAL_EASY @@ -403,7 +420,7 @@ desc = "A hollow cake with real pumpkin." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "pumpkin_spice_cake" - slice_path = /obj/item/food/pumpkin_spice_cake_slice + slice_path = /obj/item/food/sliced/pumpkin_spice_cake slices_num = 5 bitesize = 3 filling_color = "#ee710a" @@ -411,13 +428,14 @@ tastes = list("cake" = 5, "sweetness" = 1, "pumpkin" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/pumpkin_spice_cake_slice +/obj/item/food/sliced/pumpkin_spice_cake name = "pumpkin spice cake slice" desc = "A spicy slice of pumpkin goodness." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "pumpkin_spice_cake_slice" trash = /obj/item/trash/plate filling_color = "#ee710a" + list_reagents = list("nutriment" = 4, "vitamin" = 2) tastes = list("cake" = 5, "sweetness" = 1, "pumpkin" = 1) goal_difficulty = FOOD_GOAL_EASY @@ -426,7 +444,7 @@ desc = "A cake made of slimes. Probably not electrified." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "slime_cake" - slice_path = /obj/item/food/slime_cake_slice + slice_path = /obj/item/food/sliced/slime_cake slices_num = 5 bitesize = 3 filling_color = "#0adfee" @@ -434,13 +452,14 @@ tastes = list("cake" = 5, "sweetness" = 1, "slime" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/slime_cake_slice +/obj/item/food/sliced/slime_cake name = "slime cake slice" desc = "A slice of slime cake." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "slime_cake_slice" trash = /obj/item/trash/plate filling_color = "#0adfee" + list_reagents = list("nutriment" = 4, "vitamin" = 2) tastes = list("cake" = 5, "sweetness" = 1, "slime" = 1) goal_difficulty = FOOD_GOAL_EASY @@ -449,7 +468,7 @@ desc = "A spaceman's trumpet frosted cake." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "trumpet_cake" - slice_path = /obj/item/food/spaceman_cake_slice + slice_path = /obj/item/food/sliced/spaceman_cake slices_num = 5 bitesize = 3 filling_color = "#610977" @@ -457,13 +476,14 @@ tastes = list("cake" = 4, "violets" = 2, "jam" = 2) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/spaceman_cake_slice +/obj/item/food/sliced/spaceman_cake name = "spaceman's cake slice" desc = "A slice of spaceman's trumpet frosted cake." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "trumpet_cake_slice" trash = /obj/item/trash/plate filling_color = "#610977" + list_reagents = list("nutriment" = 4, "vitamin" = 2, "cream" = 1, "berryjuice" = 1) tastes = list("cake" = 4, "violets" = 2, "jam" = 2) goal_difficulty = FOOD_GOAL_EASY @@ -472,7 +492,7 @@ desc = "A vanilla frosted cake." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "vanilla_cake" - slice_path = /obj/item/food/vanilla_cake_slice + slice_path = /obj/item/food/sliced/vanilla_cake slices_num = 5 bitesize = 3 filling_color = "#ece7ee" @@ -480,12 +500,13 @@ tastes = list("cake" = 1, "sugar" = 1, "vanilla" = 10) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/vanilla_cake_slice +/obj/item/food/sliced/vanilla_cake name = "vanilla cake slice" desc = "A slice of vanilla frosted cake." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "vanilla_cake_slice" filling_color = "#ece7ee" + list_reagents = list("nutriment" = 4, "vitamin" = 1, "sugar" = 3, "vanilla" = 3) tastes = list("cake" = 1, "sugar" = 1, "vanilla" = 10) goal_difficulty = FOOD_GOAL_EASY @@ -494,21 +515,22 @@ desc = "A light and fluffy vegan marshmallow flavoured with vanilla and rum and topped with soft chocolate. These are known to the moths as höllflöfstarkken: cloud squares." //höllflöf = cloud (höll = wind, flöf = cotton), starkken = squares icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "mothmallow_tray" - list_reagents = list("nutriment" = 20, "sugar" = 20) - slice_path = /obj/item/food/mothmallowslice + slice_path = /obj/item/food/sliced/mothmallow slices_num = 5 bitesize = 3 filling_color = "#eebe98" + list_reagents = list("nutriment" = 20, "sugar" = 20) tastes = list("vanilla" = 1, "clouds" = 1, "chocolate" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/mothmallowslice +/obj/item/food/sliced/mothmallow name = "mothmallow" desc = "Fluffy little clouds of joy- in a strangely moth-like colour." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "mothmallow_slice" filling_color = "#ece7ee" filling_color = "#eebe98" + list_reagents = list("nutriment" = 4, "sugar" = 4) tastes = list("vanilla" = 1, "clouds" = 1, "chocolate" = 1) goal_difficulty = FOOD_GOAL_EASY @@ -690,7 +712,7 @@ desc = "A delicious treat for the autumn months." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "pumpkinpie" - slice_path = /obj/item/food/pumpkinpieslice + slice_path = /obj/item/food/sliced/pumpkinpie slices_num = 5 bitesize = 3 filling_color = "#F5B951" @@ -698,13 +720,14 @@ tastes = list("pie" = 1, "pumpkin" = 1) goal_difficulty = FOOD_GOAL_NORMAL -/obj/item/food/pumpkinpieslice +/obj/item/food/sliced/pumpkinpie name = "pumpkin pie slice" desc = "A slice of pumpkin pie, with whipped cream on top. Perfection." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "pumpkinpieslice" trash = /obj/item/trash/plate filling_color = "#F5B951" + list_reagents = list("nutriment" = 4, "vitamin" = 1) tastes = list("pie" = 1, "pumpkin" = 1) goal_difficulty = FOOD_GOAL_NORMAL @@ -723,21 +746,22 @@ desc = "An odd blue pie made with toxic blumpkin." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "blumpkin_pie" - slice_path = /obj/item/food/blumpkin_pie_slice + slice_path = /obj/item/food/sliced/blumpkin_pie slices_num = 5 bitesize = 3 filling_color = "#102d8b" - list_reagents = list("nutriment" = 13, "vitamin" = 6, "blumpkinjuice" = 5) + list_reagents = list("nutriment" = 20, "vitamin" = 5, "blumpkinjuice" = 5) tastes = list("pie" = 1, "a mouthful of pool water" = 1) goal_difficulty = FOOD_GOAL_NORMAL -/obj/item/food/blumpkin_pie_slice +/obj/item/food/sliced/blumpkin_pie name = "blumpkin pie slice" desc = "A slice of blumpkin pie, with whipped cream on top. Is this edible?" icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "blumpkin_pie_slice" trash = /obj/item/trash/plate filling_color = "#102d8b" + list_reagents = list("nutriment" = 4, "vitamin" = 1, "blumpkinjuice" = 1) tastes = list("pie" = 1, "a mouthful of pool water" = 1) goal_difficulty = FOOD_GOAL_NORMAL @@ -746,21 +770,22 @@ desc = "A decadent pie made of a creamy chocolate mousse filling topped with a layer of whipped cream and chocolate shavings. Sliceable." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "french_silk_pie" - slice_path = /obj/item/food/french_silk_pie_slice + slice_path = /obj/item/food/sliced/french_silk_pie slices_num = 5 bitesize = 3 filling_color = "#5e4337" - list_reagents = list("nutriment" = 12, "vitamin" = 4) + list_reagents = list("nutriment" = 15, "vitamin" = 5) tastes = list("pie" = 1, "smooth chocolate" = 1, "whipped cream" = 1) goal_difficulty = FOOD_GOAL_NORMAL -/obj/item/food/french_silk_pie_slice +/obj/item/food/sliced/french_silk_pie name = "french silk pie slice" desc = "A slice of french silk pie, filled with a chocolate mousse and topped with a layer of whipped cream and chocolate shavings. Delicious enough to make you cry." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "french_silk_pie_slice" trash = /obj/item/trash/plate filling_color = "#5e4337" + list_reagents = list("nutriment" = 3, "vitamin" = 1) tastes = list("pie" = 1, "smooth chocolate" = 1, "whipped cream" = 1) goal_difficulty = FOOD_GOAL_NORMAL @@ -769,21 +794,22 @@ desc = "Tastes like blue and cold." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "frosty_pie" - slice_path = /obj/item/food/frosty_pie_slice + slice_path = /obj/item/food/sliced/frosty_pie slices_num = 5 bitesize = 3 filling_color = "#5e4337" - list_reagents = list("nutriment" = 14, "vitamin" = 6) + list_reagents = list("nutriment" = 15, "vitamin" = 5) tastes = list("mint" = 1, "pie" = 1) goal_difficulty = FOOD_GOAL_NORMAL -/obj/item/food/frosty_pie_slice +/obj/item/food/sliced/frosty_pie name = "frosty pie slice" desc = "Tasty blue, like my favourite crayon!" icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "frosty_pie_slice" trash = /obj/item/trash/plate filling_color = "#338cb6" + list_reagents = list("nutriment" = 3, "vitamin" = 1) tastes = list("mint" = 1, "pie" = 1) goal_difficulty = FOOD_GOAL_NORMAL @@ -1325,21 +1351,22 @@ desc = "A delicious jelly made with sweet potatoes." icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "dulce_de_batata" - slice_path = /obj/item/food/dulce_de_batata_slice + slice_path = /obj/item/food/sliced/dulce_de_batata slices_num = 5 bitesize = 3 filling_color = "#411b02" - list_reagents = list("nutriment" = 14, "vitamin" = 8) + list_reagents = list("nutriment" = 15, "vitamin" = 10) tastes = list("jelly" = 1, "sweet potato" = 1) goal_difficulty = FOOD_GOAL_NORMAL -/obj/item/food/dulce_de_batata_slice +/obj/item/food/sliced/dulce_de_batata name = "dulce de batata slice" desc = "Tasty blue, like my favourite crayon!" icon = 'icons/obj/food/bakedgoods.dmi' icon_state = "dulce_de_batata_slice" trash = /obj/item/trash/plate filling_color = "#411b02" + list_reagents = list("nutriment" = 3, "vitamin" = 2) tastes = list("jelly" = 1, "sweet potato" = 1) goal_difficulty = FOOD_GOAL_NORMAL diff --git a/code/modules/food_and_drinks/food/foods/bread.dm b/code/modules/food_and_drinks/food/foods/bread.dm index 31eb3b340960..c18ab05c686f 100644 --- a/code/modules/food_and_drinks/food/foods/bread.dm +++ b/code/modules/food_and_drinks/food/foods/bread.dm @@ -8,19 +8,21 @@ desc = "The culinary base of every self-respecting eloquen/tg/entleman." icon = 'icons/obj/food/burgerbread.dmi' icon_state = "meatbread" - slice_path = /obj/item/food/meatbreadslice + slice_path = /obj/item/food/sliced/meat_bread slices_num = 5 filling_color = "#FF7575" list_reagents = list("protein" = 20, "nutriment" = 10, "vitamin" = 5) tastes = list("bread" = 10, "meat" = 10) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/meatbreadslice +/obj/item/food/sliced/meat_bread name = "meatbread slice" desc = "A slice of delicious meatbread." icon = 'icons/obj/food/burgerbread.dmi' icon_state = "meatbreadslice" filling_color = "#FF7575" + list_reagents = list("protein" = 4, "nutriment" = 2, "vitamin" = 1) + tastes = list("bread" = 10, "meat" = 10) goal_difficulty = FOOD_GOAL_EASY /obj/item/food/sliceable/xenomeatbread @@ -28,19 +30,21 @@ desc = "The culinary base of every self-respecting eloquent gentleman. Extra Heretical." icon = 'icons/obj/food/burgerbread.dmi' icon_state = "xenomeatbread" - slice_path = /obj/item/food/xenomeatbreadslice + slice_path = /obj/item/food/sliced/xeno_meat_bread slices_num = 5 filling_color = "#8AFF75" list_reagents = list("protein" = 20, "nutriment" = 10, "vitamin" = 5) tastes = list("bread" = 10, "acid" = 10) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/xenomeatbreadslice +/obj/item/food/sliced/xeno_meat_bread name = "xenomeatbread slice" desc = "A slice of delicious meatbread. Extra Heretical." icon = 'icons/obj/food/burgerbread.dmi' icon_state = "xenobreadslice" filling_color = "#8AFF75" + list_reagents = list("protein" = 4, "nutriment" = 2, "vitamin" = 1) + tastes = list("bread" = 10, "acid" = 10) goal_difficulty = FOOD_GOAL_EXCESSIVE /obj/item/food/sliceable/spidermeatbread @@ -48,17 +52,18 @@ desc = "Reassuringly green meatloaf made from spider meat." icon = 'icons/obj/food/burgerbread.dmi' icon_state = "spidermeatbread" - slice_path = /obj/item/food/spidermeatbreadslice + slice_path = /obj/item/food/sliced/spider_meat_bread slices_num = 5 list_reagents = list("protein" = 20, "nutriment" = 10, "toxin" = 15, "vitamin" = 5) tastes = list("bread" = 10, "cobwebs" = 5) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/spidermeatbreadslice +/obj/item/food/sliced/spider_meat_bread name = "spider meat bread slice" desc = "A slice of meatloaf made from an animal that most likely still wants you dead." icon = 'icons/obj/food/burgerbread.dmi' icon_state = "spidermeatslice" + list_reagents = list("protein" = 4, "nutriment" = 2, "toxin" = 3, "vitamin" = 1) tastes = list("bread" = 10, "cobwebs" = 5) list_reagents = list("toxin" = 2) goal_difficulty = FOOD_GOAL_EXCESSIVE @@ -68,19 +73,20 @@ desc = "A heavenly and filling treat." icon = 'icons/obj/food/burgerbread.dmi' icon_state = "bananabread" - slice_path = /obj/item/food/bananabreadslice + slice_path = /obj/item/food/sliced/banana_bread slices_num = 5 filling_color = "#EDE5AD" list_reagents = list("banana" = 20, "nutriment" = 20) tastes = list("bread" = 10, "banana" = 5) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/bananabreadslice +/obj/item/food/sliced/banana_bread name = "banana-nut bread slice" desc = "A slice of delicious banana bread." icon = 'icons/obj/food/burgerbread.dmi' icon_state = "bananabreadslice" filling_color = "#EDE5AD" + list_reagents = list("banana" = 4, "nutriment" = 4) tastes = list("bread" = 10, "banana" = 5) goal_difficulty = FOOD_GOAL_EASY @@ -89,19 +95,21 @@ desc = "Like meatbread but for vegetarians. Not guaranteed to give superpowers." icon = 'icons/obj/food/burgerbread.dmi' icon_state = "tofubread" - slice_path = /obj/item/food/tofubreadslice + slice_path = /obj/item/food/sliced/tofu_bread slices_num = 5 filling_color = "#F7FFE0" list_reagents = list("nutriment" = 20, "vitamin" = 5) tastes = list("bread" = 10, "tofu" = 10) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/tofubreadslice +/obj/item/food/sliced/tofu_bread name = "tofubread slice" desc = "A slice of delicious tofubread." icon = 'icons/obj/food/burgerbread.dmi' icon_state = "tofubreadslice" filling_color = "#F7FFE0" + list_reagents = list("nutriment" = 4, "vitamin" = 1) + tastes = list("bread" = 10, "tofu" = 10) goal_difficulty = FOOD_GOAL_EASY /obj/item/food/sliceable/bread @@ -109,20 +117,20 @@ desc = "Some plain old Earthen bread." icon = 'icons/obj/food/burgerbread.dmi' icon_state = "bread" - slice_path = /obj/item/food/breadslice + slice_path = /obj/item/food/sliced/bread slices_num = 6 filling_color = "#FFE396" list_reagents = list("nutriment" = 10) tastes = list("bread" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/breadslice +/obj/item/food/sliced/bread name = "bread slice" desc = "A slice of home." icon = 'icons/obj/food/burgerbread.dmi' icon_state = "breadslice" filling_color = "#D27332" - list_reagents = list("nutriment" = 2, "bread" = 5) + list_reagents = list("nutriment" = 2, "bread" = 5) // TODO Why bread? tastes = list("bread" = 1) goal_difficulty = FOOD_GOAL_EASY @@ -131,14 +139,14 @@ desc = "Yum yum yum!" icon = 'icons/obj/food/burgerbread.dmi' icon_state = "creamcheesebread" - slice_path = /obj/item/food/creamcheesebreadslice + slice_path = /obj/item/food/sliced/cream_cheese_bread slices_num = 5 filling_color = "#FFF896" list_reagents = list("nutriment" = 20, "vitamin" = 5) tastes = list("bread" = 10, "cheese" = 10) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/creamcheesebreadslice +/obj/item/food/sliced/cream_cheese_bread name = "cream cheese bread slice" desc = "A slice of yum!" icon = 'icons/obj/food/burgerbread.dmi' @@ -153,14 +161,14 @@ desc = "A loaf of delicious mah'weyh pleggh at e'ntrath!" icon = 'icons/obj/food/burgerbread.dmi' icon_state = "banarnarbread" - slice_path = /obj/item/food/banarnarbreadslice + slice_path = /obj/item/food/sliced/banarnarbread slices_num = 5 filling_color = "#6F0000" list_reagents = list("nutriment" = 20, "vitamin" = 5) tastes = list("heresy" = 10, "banana" = 10) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/banarnarbreadslice +/obj/item/food/sliced/banarnarbread name = "banarnarbread slice" desc = "A slice of delicious mah'weyh pleggh at e'ntrath!" icon = 'icons/obj/food/burgerbread.dmi' diff --git a/code/modules/food_and_drinks/food/foods/frozen.dm b/code/modules/food_and_drinks/food/foods/frozen.dm index 2e546c7aa52a..50a892a0e5c6 100644 --- a/code/modules/food_and_drinks/food/foods/frozen.dm +++ b/code/modules/food_and_drinks/food/foods/frozen.dm @@ -16,7 +16,7 @@ desc = "A funny cake with a clown face on it." icon = 'icons/obj/food/frozen_treats.dmi' icon_state = "clowncake" - slice_path = /obj/item/food/frozen/clowncakeslice + slice_path = /obj/item/food/frozen/clowncakeslice // SS220 TODO: conflict here probably means something is fixed so code\modules\food_and_drinks\food_base.dm:296 is needed again slices_num = 5 bitesize = 3 list_reagents = list("nutriment" = 20, "sugar" = 5, "vitamin" = 5, "banana" = 15) diff --git a/code/modules/food_and_drinks/food/foods/ingredients.dm b/code/modules/food_and_drinks/food/foods/ingredients.dm index da8df590bd88..3edb1bf96773 100644 --- a/code/modules/food_and_drinks/food/foods/ingredients.dm +++ b/code/modules/food_and_drinks/food/foods/ingredients.dm @@ -41,87 +41,92 @@ name = "cheese wheel" desc = "A big wheel of delicious Cheddar." icon_state = "cheesewheel" - slice_path = /obj/item/food/cheesewedge + slice_path = /obj/item/food/sliced/cheesewedge slices_num = 5 filling_color = "#FFF700" - list_reagents = list("nutriment" = 15, "vitamin" = 5, "cheese" = 20) + list_reagents = list("nutriment" = 16, "vitamin" = 4, "cheese" = 20) tastes = list("cheese" = 1) -/obj/item/food/cheesewedge +/obj/item/food/sliced/cheesewedge name = "cheese wedge" desc = "A wedge of delicious Cheddar. The cheese wheel it was cut from can't have gone far." icon_state = "cheesewedge" filling_color = "#FFF700" + list_reagents = list("nutriment" = 4, "vitamin" = 1, "cheese" = 5) tastes = list("cheese" = 1) /obj/item/food/sliceable/cheesewheel/smoked name = "smoked cheese wheel" desc = "A wheel of fancy imported-style smoked cheese." icon_state = "cheesewheel-smoked" - slice_path = /obj/item/food/cheesewedge/smoked + slice_path = /obj/item/food/sliced/cheesewedge/smoked slices_num = 4 - list_reagents = list("nutriment" = 2, "vitamin" = 2, "cheese" = 15) + list_reagents = list("nutriment" = 16, "vitamin" = 4, "cheese" = 20) tastes = list("cheese" = 1, "smoke" = 2) -/obj/item/food/cheesewedge/smoked +/obj/item/food/sliced/cheesewedge/smoked name = "smoked cheese wedge" desc = "A wedge of fancy smoked cheese." icon_state = "cheesewedge-smoked" + list_reagents = list("nutriment" = 4, "vitamin" = 1, "cheese" = 5) tastes = list("cheese" = 1, "smoke" = 2) /obj/item/food/sliceable/cheesewheel/edam name = "edam cheese wheel" desc = "A wheel of mild edam cheese." icon_state = "cheesewheel-edam" - slice_path = /obj/item/food/cheesewedge/edam + slice_path = /obj/item/food/sliced/cheesewedge/edam slices_num = 4 - list_reagents = list("nutriment" = 2, "vitamin" = 2, "cheese" = 15) + list_reagents = list("nutriment" = 16, "vitamin" = 4, "cheese" = 20) tastes = list("cheese" = 1, "salt" = 2, "almonds" = 2) -/obj/item/food/cheesewedge/edam +/obj/item/food/sliced/cheesewedge/edam name = "edam cheese wedge" desc = "A wedge of mild edam cheese. It's said to have a nutty flavor." icon_state = "cheesewedge-edam" + list_reagents = list("nutriment" = 4, "vitamin" = 1, "cheese" = 5) tastes = list("cheese" = 1, "salt" = 2, "almonds" = 2) /obj/item/food/sliceable/cheesewheel/blue name = "blue cheese wheel" desc = "A wheel of pungent blue cheese. It's an acquired taste..." icon_state = "cheesewheel-blue" - slice_path = /obj/item/food/cheesewedge/blue - slices_num = 5 - list_reagents = list("nutriment" = 2, "vitamin" = 2, "cheese" = 10) + slice_path = /obj/item/food/sliced/cheesewedge/blue + slices_num = 4 + list_reagents = list("nutriment" = 4, "vitamin" = 4, "cheese" = 12) tastes = list("strong cheese" = 2, "salt" = 1, "bitter mold" = 1) -/obj/item/food/cheesewedge/blue +/obj/item/food/sliced/cheesewedge/blue name = "blue cheese wedge" desc = "A wedge of pungent blue cheese. The flavor is... intense." icon_state = "cheesewedge-blue" bitesize = 2 + list_reagents = list("nutriment" = 1, "vitamin" = 1, "cheese" = 3) tastes = list("strong cheese" = 2, "salt" = 1, "bitter mold" = 1) /obj/item/food/sliceable/cheesewheel/camembert name = "camembert cheese wheel" desc = "A miniature wheel of gooey camembert. Yum..." icon_state = "cheesewheel-camembert" - slice_path = /obj/item/food/cheesewedge/camembert + slice_path = /obj/item/food/sliced/cheesewedge/camembert slices_num = 2 - list_reagents = list("nutriment" = 1, "vitamin" = 2, "cheese" = 6) + list_reagents = list("nutriment" = 4, "vitamin" = 4, "cheese" = 8) tastes = list("mild cheese" = 3, "gooeyness" = 1) -/obj/item/food/cheesewedge/camembert +/obj/item/food/sliced/cheesewedge/camembert name = "camembert cheese slice" desc = "A piece of camembert. It's soft and gooey." icon_state = "cheesewedge-camembert" bitesize = 2 + list_reagents = list("nutriment" = 2, "vitamin" = 2, "cheese" = 4) tastes = list("mild cheese" = 3, "gooeyness" = 1) -/obj/item/food/cheesewedge/checkpass(passflag) +/obj/item/food/sliced/cheesewedge/checkpass(passflag) if((passflag & PASSDOOR) && ismouse(pulledby)) return TRUE return ..() -/obj/item/food/cheesewedge/presliced +/obj/item/food/sliced/cheesewedge/presliced list_reagents = list("nutriment" = 3, "vitamin" = 1, "cheese" = 4) /obj/item/food/weirdcheesewedge @@ -151,14 +156,15 @@ list_reagents = list("plantmatter" = 3, "vitamin" = 1) tastes = list("mushroom" = 1) -/obj/item/food/watermelonslice +/obj/item/food/sliced/watermelon name = "watermelon slice" desc = "A slice of watery goodness." icon_state = "watermelonslice" // Sprite created by https://github.com/binarysudoku for Goonstation, They have relicensed it for our use. filling_color = "#FF3867" + list_reagents = list("plantmatter" = 1) tastes = list("watermelon" = 1) -/obj/item/food/tomatoslice +/obj/item/food/sliced/tomato name = "tomato slice" desc = "A fresh slice of tomato." icon_state = "tomatoslice" @@ -166,11 +172,12 @@ list_reagents = list("plantmatter" = 2) tastes = list("tomato" = 1) -/obj/item/food/pineappleslice +/obj/item/food/sliced/pineapple name = "pineapple slices" desc = "Rings of pineapple." icon_state = "pineappleslice" // Sprite created by https://github.com/binarysudoku for Goonstation, They have relicensed it for our use. filling_color = "#e5b437" + list_reagents = list("plantmatter" = 1, "vitamin" = 1) tastes = list("pineapple" = 1) @@ -204,18 +211,18 @@ desc = "Some flattened dough." icon = 'icons/obj/food/food_ingredients.dmi' icon_state = "flat dough" - slice_path = /obj/item/food/doughslice + slice_path = /obj/item/food/sliced/dough slices_num = 3 list_reagents = list("nutriment" = 6) tastes = list("dough" = 1) -/obj/item/food/doughslice +/obj/item/food/sliced/dough name = "dough slice" desc = "The building block of an impressive dish." icon = 'icons/obj/food/food_ingredients.dmi' icon_state = "doughslice" - list_reagents = list("nutriment" = 1) + list_reagents = list("nutriment" = 2) tastes = list("dough" = 1) diff --git a/code/modules/food_and_drinks/food/foods/meat.dm b/code/modules/food_and_drinks/food/foods/meat.dm index 022d0dc6fa09..9c0f7b8a94b1 100644 --- a/code/modules/food_and_drinks/food/foods/meat.dm +++ b/code/modules/food_and_drinks/food/foods/meat.dm @@ -564,19 +564,20 @@ desc = "A traditional turkey served with stuffing." icon = 'icons/obj/food/meat.dmi' icon_state = "turkey" - slice_path = /obj/item/food/turkeyslice + slice_path = /obj/item/food/sliced/turkey slices_num = 6 - list_reagents = list("protein" = 24, "nutriment" = 18, "vitamin" = 5) + list_reagents = list("protein" = 24, "nutriment" = 18, "vitamin" = 6) tastes = list("turkey" = 2, "stuffing" = 2) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/turkeyslice +/obj/item/food/sliced/turkey name = "turkey serving" desc = "A serving of some tender and delicious turkey." icon = 'icons/obj/food/meat.dmi' icon_state = "turkeyslice" trash = /obj/item/trash/plate filling_color = "#B97A57" + list_reagents = list("protein" = 4, "nutriment" = 3, "vitamin" = 1) tastes = list("turkey" = 1) goal_difficulty = FOOD_GOAL_EASY diff --git a/code/modules/food_and_drinks/food/foods/pizza.dm b/code/modules/food_and_drinks/food/foods/pizza.dm index dc3b01f9ae53..f742ea21e081 100644 --- a/code/modules/food_and_drinks/food/foods/pizza.dm +++ b/code/modules/food_and_drinks/food/foods/pizza.dm @@ -14,16 +14,17 @@ name = "margherita pizza" desc = "The golden standard of pizzas." icon_state = "margheritapizza" - slice_path = /obj/item/food/margheritapizzaslice - list_reagents = list("nutriment" = 30, "tomatojuice" = 6, "vitamin" = 5) + slice_path = /obj/item/food/sliced/margherita_pizza + list_reagents = list("nutriment" = 30, "tomatojuice" = 6, "vitamin" = 6) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/margheritapizzaslice +/obj/item/food/sliced/margherita_pizza name = "margherita slice" desc = "A slice of the classic pizza." icon = 'icons/obj/food/pizza.dmi' icon_state = "margheritapizzaslice" filling_color = "#BAA14C" + list_reagents = list("nutriment" = 5, "tomatojuice" = 1, "vitamin" = 1) tastes = list("crust" = 1, "tomato" = 1, "cheese" = 1) goal_difficulty = FOOD_GOAL_EASY @@ -32,17 +33,18 @@ name = "meat pizza" desc = "A pizza with meat topping." icon_state = "meatpizza" - slice_path = /obj/item/food/meatpizzaslice - list_reagents = list("protein" = 30, "tomatojuice" = 6, "vitamin" = 8) + slice_path = /obj/item/food/sliced/meat_pizza + list_reagents = list("protein" = 30, "tomatojuice" = 6, "vitamin" = 6) tastes = list("crust" = 1, "cheese" = 1, "meat" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/meatpizzaslice +/obj/item/food/sliced/meat_pizza name = "meat pizza slice" desc = "A slice of a meaty pizza." icon = 'icons/obj/food/pizza.dmi' icon_state = "meatpizzaslice" filling_color = "#BAA14C" + list_reagents = list("protein" = 5, "tomatojuice" = 1, "vitamin" = 1) tastes = list("crust" = 1, "cheese" = 1, "meat" = 1) goal_difficulty = FOOD_GOAL_EASY @@ -51,17 +53,18 @@ name = "mushroom pizza" desc = "Very special pizza." icon_state = "mushroompizza" - slice_path = /obj/item/food/mushroompizzaslice - list_reagents = list("plantmatter" = 30, "vitamin" = 5) + slice_path = /obj/item/food/sliced/mushroom_pizza + list_reagents = list("plantmatter" = 30, "vitamin" = 6) tastes = list("crust" = 1, "cheese" = 1, "mushroom" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/mushroompizzaslice +/obj/item/food/sliced/mushroom_pizza name = "mushroom pizza slice" desc = "Maybe it is the last slice of pizza in your life." icon = 'icons/obj/food/pizza.dmi' icon_state = "mushroompizzaslice" filling_color = "#BAA14C" + list_reagents = list("plantmatter" = 5, "vitamin" = 1) tastes = list("crust" = 1, "cheese" = 1, "mushroom" = 1) goal_difficulty = FOOD_GOAL_EASY @@ -70,17 +73,18 @@ name = "vegetable pizza" desc = "No Tomato Sapiens were harmed during the making of this pizza." icon_state = "vegetablepizza" - slice_path = /obj/item/food/vegetablepizzaslice - list_reagents = list("plantmatter" = 25, "tomatojuice" = 6, "oculine" = 12, "vitamin" = 5) + slice_path = /obj/item/food/sliced/vegetable_pizza + list_reagents = list("plantmatter" = 24, "tomatojuice" = 6, "oculine" = 12, "vitamin" = 6) tastes = list("crust" = 1, "tomato" = 1, "carrot" = 1, "vegetables" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/vegetablepizzaslice +/obj/item/food/sliced/vegetable_pizza name = "vegetable pizza slice" desc = "A slice of the most green pizza of all pizzas not containing green ingredients." icon = 'icons/obj/food/pizza.dmi' icon_state = "vegetablepizzaslice" filling_color = "#BAA14C" + list_reagents = list("plantmatter" = 4, "tomatojuice" = 1, "oculine" = 2, "vitamin" = 1) tastes = list("crust" = 1, "tomato" = 1, "carrot" = 1, "vegetables" = 1) goal_difficulty = FOOD_GOAL_EASY @@ -89,17 +93,18 @@ name = "hawaiian pizza" desc = "Love it or hate it, this pizza divides opinions. Complete with juicy pineapple." icon_state = "hawaiianpizza" - slice_path = /obj/item/food/hawaiianpizzaslice - list_reagents = list("protein" = 15, "tomatojuice" = 6, "plantmatter" = 20, "pineapplejuice" = 6, "vitamin" = 5) + slice_path = /obj/item/food/sliced/hawaiian_pizza + list_reagents = list("protein" = 18, "tomatojuice" = 6, "plantmatter" = 24, "pineapplejuice" = 6, "vitamin" = 6) tastes = list("crust" = 1, "cheese" = 1, "pineapple" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/hawaiianpizzaslice +/obj/item/food/sliced/hawaiian_pizza name = "hawaiian pizza slice" desc = "A slice of polarising pizza." icon = 'icons/obj/food/pizza.dmi' icon_state = "hawaiianpizzaslice" filling_color = "#e5b437" + list_reagents = list("protein" = 3, "tomatojuice" = 1, "plantmatter" = 4, "pineapplejuice" = 1, "vitamin" = 1) tastes = list("crust" = 1, "cheese" = 1, "pineapple" = 1) goal_difficulty = FOOD_GOAL_EASY @@ -108,18 +113,19 @@ name = "mac 'n' cheese pizza" desc = "Gastronomists have yet to classify this dish as 'pizza'." icon_state = "macpizza" - slice_path = /obj/item/food/macpizzaslice - list_reagents = list("nutriment" = 40, "vitamin" = 5) //More nutriment because carbs, but it's not any more vitaminicious + slice_path = /obj/item/food/sliced/mac_pizza filling_color = "#ffe45d" + list_reagents = list("nutriment" = 42, "vitamin" = 6) //More nutriment because carbs, but it's not any more vitaminicious tastes = list("crust" = 1, "cheese" = 2, "pasta" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/macpizzaslice +/obj/item/food/sliced/mac_pizza name = "mac 'n' cheese pizza slice" desc = "A delicious slice of pizza topped with macaroni & cheese... wait, what the hell? Who would do this?!" icon = 'icons/obj/food/pizza.dmi' icon_state = "macpizzaslice" filling_color = "#ffe45d" + list_reagents = list("nutriment" = 7, "vitamin" = 1) tastes = list("crust" = 1, "tomato" = 1, "cheese" = 2, "pasta" = 1) goal_difficulty = FOOD_GOAL_EASY @@ -128,18 +134,19 @@ name = "pepperoni pizza" desc = "What did the pepperoni say to the pizza?" icon_state = "pepperonipizza" - slice_path = /obj/item/food/pepperonipizzaslice - list_reagents = list("protein" = 30, "tomatojuice" = 6, "vitamin" = 8) + slice_path = /obj/item/food/sliced/pepperoni_pizza + list_reagents = list("protein" = 30, "tomatojuice" = 6, "vitamin" = 9) filling_color = "#ffe45d" tastes = list("cheese" = 3, "pepperoni" = 3, "grease" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/pepperonipizzaslice +/obj/item/food/sliced/pepperoni_pizza name = "pepperoni pizza slice" desc = "Nice to meat you!" icon = 'icons/obj/food/pizza.dmi' icon_state = "pepperonipizzaslice" filling_color = "#ffe45d" + list_reagents = list("protein" = 5, "tomatojuice" = 1, "vitamin" = 1.5) tastes = list("cheese" = 3, "pepperoni" = 3, "grease" = 1) goal_difficulty = FOOD_GOAL_EASY @@ -148,16 +155,17 @@ name = "cheese pizza" desc = "Cheese, bread, cheese, tomato, and cheese." icon_state = "cheesepizza" - slice_path = /obj/item/food/cheesepizzaslice - list_reagents = list("nutriment" = 40, "tomatojuice" = 6, "vitamin" = 5) + slice_path = /obj/item/food/sliced/cheese_pizza + list_reagents = list("nutriment" = 42, "tomatojuice" = 6, "vitamin" = 6) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/cheesepizzaslice +/obj/item/food/sliced/cheese_pizza name = "cheese pizza slice" desc = "Dangerously cheesy?" icon = 'icons/obj/food/pizza.dmi' icon_state = "cheesepizzaslice" filling_color = "#BAA14C" + list_reagents = list("nutriment" = 7, "tomatojuice" = 1, "vitamin" = 1) tastes = list("crust" = 1, "tomato" = 1, "cheese" = 3) goal_difficulty = FOOD_GOAL_EASY @@ -166,17 +174,18 @@ name = "donk-pocket pizza" desc = "Who thought this would be a good idea?" icon_state = "donkpocketpizza" - slice_path = /obj/item/food/donkpocketpizzaslice - list_reagents = list("nutriment" = 35, "tomatojuice" = 6, "vitamin" = 2, "weak_omnizine" = 6) + slice_path = /obj/item/food/sliced/donk_pocket_pizza + list_reagents = list("nutriment" = 36, "tomatojuice" = 6, "vitamin" = 2, "weak_omnizine" = 6) tastes = list("crust" = 1, "meat" = 1, "laziness" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/donkpocketpizzaslice +/obj/item/food/sliced/donk_pocket_pizza name = "donk-pocket pizza slice" desc = "Smells like lukewarm donk-pocket." icon = 'icons/obj/food/pizza.dmi' icon_state = "donkpocketpizzaslice" filling_color = "#BAA14C" + list_reagents = list("nutriment" = 6, "tomatojuice" = 1, "vitamin" = 2/6, "weak_omnizine" = 1) tastes = list("crust" = 1, "meat" = 1, "laziness" = 1) goal_difficulty = FOOD_GOAL_EASY @@ -185,17 +194,18 @@ name = "dank pizza" desc = "The hippie's pizza of choice." icon_state = "dankpizza" - slice_path = /obj/item/food/dankpizzaslice - list_reagents = list("nutriment" = 30, "tomatojuice" = 6, "vitamin" = 5, "cbd" = 6, "thc" = 6) + slice_path = /obj/item/food/sliced/dank_pizza + list_reagents = list("nutriment" = 30, "tomatojuice" = 6, "vitamin" = 6, "cbd" = 6, "thc" = 6) tastes = list("crust" = 1, "cheese" = 1, "special herbs" = 2) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/dankpizzaslice +/obj/item/food/sliced/dank_pizza name = "dank pizza slice" desc = "So good, man..." icon = 'icons/obj/food/pizza.dmi' icon_state = "dankpizzaslice" filling_color = "#BAA14C" + list_reagents = list("nutriment" = 5, "tomatojuice" = 1, "vitamin" = 1, "cbd" = 1, "thc" = 1) tastes = list("crust" = 1, "cheese" = 1, "special herbs" = 2) goal_difficulty = FOOD_GOAL_EASY @@ -204,17 +214,18 @@ name = "firecracker pizza" desc = "Tastes HOT HOT HOT!" icon_state = "firecrackerpizza" - slice_path = /obj/item/food/firecrackerpizzaslice - list_reagents = list("nutriment" = 30, "vitamin" = 5, "capsaicin" = 12) + slice_path = /obj/item/food/sliced/fire_cracker_pizza + list_reagents = list("nutriment" = 30, "vitamin" = 6, "capsaicin" = 12) tastes = list("crust" = 1, "cheese" = 1, "HOTNESS" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/firecrackerpizzaslice +/obj/item/food/sliced/fire_cracker_pizza name = "firecracker pizza slice" desc = "A spicy slice of something quite nice." icon = 'icons/obj/food/pizza.dmi' icon_state = "firecrackerpizzaslice" filling_color = "#BAA14C" + list_reagents = list("nutriment" = 5, "vitamin" = 1, "capsaicin" = 2) tastes = list("crust" = 1, "cheese" = 1, "HOTNESS" = 1) goal_difficulty = FOOD_GOAL_EASY @@ -223,17 +234,18 @@ name = "\"pesto\" pizza" desc = "Wait a second...this doesn't taste like pesto!" icon_state = "pestopizza" - slice_path = /obj/item/food/pestopizzaslice - list_reagents = list("nutriment" = 30, "tomatojuice" = 12, "vitamin" = 5, "wasabi" = 12) + slice_path = /obj/item/food/sliced/pesto_pizza + list_reagents = list("nutriment" = 30, "tomatojuice" = 12, "vitamin" = 6, "wasabi" = 12) tastes = list("tomato" = 1, "cheese" = 1, "wasabi" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/pestopizzaslice +/obj/item/food/sliced/pesto_pizza name = "\"pesto\" pizza slice" desc = "Delicious and suspicious(ly green)." icon = 'icons/obj/food/pizza.dmi' icon_state = "pestopizzaslice" filling_color = "#BAA14C" + list_reagents = list("nutriment" = 5, "tomatojuice" = 2, "vitamin" = 1, "wasabi" = 2) tastes = list("tomato" = 1, "cheese" = 1, "wasabi" = 1) goal_difficulty = FOOD_GOAL_EASY @@ -242,12 +254,12 @@ name = "garlic pizza" desc = "Ahh, garlic. A universally loved ingredient, except possibly by vampires." icon_state = "garlicpizza" - slice_path = /obj/item/food/garlicpizzaslice + slice_path = /obj/item/food/garlic_pizza list_reagents = list("plantmatter" = 30, "vitamin" = 5, "garlic" = 12) tastes = list("crust" = 1, "cheese" = 1, "garlic" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/garlicpizzaslice +/obj/item/food/garlic_pizza name = "garlic pizza slice" desc = "What's not to love?" icon = 'icons/obj/food/pizza.dmi' diff --git a/code/modules/food_and_drinks/food/foods/seafood.dm b/code/modules/food_and_drinks/food/foods/seafood.dm index a381e3ae20be..e5e09a54ef3f 100644 --- a/code/modules/food_and_drinks/food/foods/seafood.dm +++ b/code/modules/food_and_drinks/food/foods/seafood.dm @@ -188,14 +188,14 @@ desc = "A large unsliced roll of Sake Sushi." icon = 'icons/obj/food/seafood.dmi' icon_state = "Sake_maki" - slice_path = /obj/item/food/sushi_sake + slice_path = /obj/item/food/sliced/sushi_sake slices_num = 4 bitesize = 3 list_reagents = list("nutriment" = 8) tastes = list("raw salmon" = 1, "rice" = 1, "seaweed" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/sushi_sake +/obj/item/food/sliced/sushi_sake name = "sake sushi" desc = "A simple sushi consisting of raw salmon and rice." icon = 'icons/obj/food/seafood.dmi' @@ -210,14 +210,14 @@ desc = "A large unsliced roll of Smoked Salmon Sushi." icon = 'icons/obj/food/seafood.dmi' icon_state = "SmokedSalmon_maki" - slice_path = /obj/item/food/sushi_smoked_salmon + slice_path = /obj/item/food/sliced/sushi_smoked_salmon slices_num = 4 bitesize = 3 list_reagents = list("nutriment" = 8) tastes = list("smoked salmon" = 1, "rice" = 1, "seaweed" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/sushi_smoked_salmon +/obj/item/food/sliced/sushi_smoked_salmon name = "smoked salmon sushi" desc = "A simple sushi consisting of cooked salmon and rice." icon = 'icons/obj/food/seafood.dmi' @@ -232,14 +232,14 @@ desc = "A large unsliced roll of Tamago Sushi." icon = 'icons/obj/food/seafood.dmi' icon_state = "Tamago_maki" - slice_path = /obj/item/food/sushi_tamago + slice_path = /obj/item/food/sliced/sushi_tamago slices_num = 4 bitesize = 3 list_reagents = list("nutriment" = 8) tastes = list("egg" = 1, "rice" = 1, "seaweed" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/sushi_tamago +/obj/item/food/sliced/sushi_tamago name = "tamago sushi" desc = "A simple sushi consisting of egg and rice." icon = 'icons/obj/food/seafood.dmi' @@ -254,14 +254,14 @@ desc = "A large unsliced roll of Inari Sushi." icon = 'icons/obj/food/seafood.dmi' icon_state = "Inari_maki" - slice_path = /obj/item/food/sushi_inari + slice_path = /obj/item/food/sliced/sushi_inari slices_num = 4 bitesize = 3 list_reagents = list("nutriment" = 8) tastes = list("fried tofu" = 1, "rice" = 1, "seaweed" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/sushi_inari +/obj/item/food/sliced/sushi_inari name = "inari sushi" desc = "A piece of fried tofu stuffed with rice." icon = 'icons/obj/food/seafood.dmi' @@ -276,14 +276,14 @@ desc = "A large unsliced roll of Masago Sushi." icon = 'icons/obj/food/seafood.dmi' icon_state = "Masago_maki" - slice_path = /obj/item/food/sushi_masago + slice_path = /obj/item/food/sliced/sushi_masago slices_num = 4 bitesize = 3 list_reagents = list("nutriment" = 8, "protein" = 4) tastes = list("goldfish roe" = 1, "rice" = 1, "seaweed" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/sushi_masago +/obj/item/food/sliced/sushi_masago name = "masago sushi" desc = "A simple sushi consisting of goldfish roe." icon = 'icons/obj/food/seafood.dmi' @@ -298,14 +298,14 @@ desc = "A large unsliced roll of Tobkio Sushi." icon = 'icons/obj/food/seafood.dmi' icon_state = "Tobiko_maki" - slice_path = /obj/item/food/sushi_tobiko + slice_path = /obj/item/food/sliced/sushi_tobiko slices_num = 4 bitesize = 3 list_reagents = list("nutriment" = 8, "protein" = 4) tastes = list("shark roe" = 1, "rice" = 1, "seaweed" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/sushi_tobiko +/obj/item/food/sliced/sushi_tobiko name = "tobiko sushi" desc = "A simple sushi consisting of shark roe." icon = 'icons/obj/food/seafood.dmi' @@ -320,14 +320,14 @@ desc = "A large unsliced roll of Tobkio and Egg Sushi." icon = 'icons/obj/food/seafood.dmi' icon_state = "TobikoEgg_maki" - slice_path = /obj/item/food/sushi_tobiko_egg + slice_path = /obj/item/food/sliced/sushi_tobiko_egg slices_num = 4 bitesize = 3 list_reagents = list("nutriment" = 8, "protein" = 4) tastes = list("shark roe" = 1, "rice" = 1, "egg" = 1, "seaweed" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/sushi_tobiko_egg +/obj/item/food/sliced/sushi_tobiko_egg name = "tobiko and egg sushi" desc = "A sushi consisting of shark roe and an egg." icon = 'icons/obj/food/seafood.dmi' @@ -342,14 +342,14 @@ desc = "A large unsliced roll of Tai Sushi." icon = 'icons/obj/food/seafood.dmi' icon_state = "Tai_maki" - slice_path = /obj/item/food/sushi_tai + slice_path = /obj/item/food/sliced/sushi_tai slices_num = 4 bitesize = 3 list_reagents = list("nutriment" = 8) tastes = list("catfish" = 1, "rice" = 1, "seaweed" = 1) goal_difficulty = FOOD_GOAL_DUPLICATE -/obj/item/food/sushi_tai +/obj/item/food/sliced/sushi_tai name = "tai sushi" desc = "A simple sushi consisting of catfish and rice." icon = 'icons/obj/food/seafood.dmi' diff --git a/code/modules/food_and_drinks/food_base.dm b/code/modules/food_and_drinks/food_base.dm index a03e2a1f8fc8..126b85a2d676 100644 --- a/code/modules/food_and_drinks/food_base.dm +++ b/code/modules/food_and_drinks/food_base.dm @@ -4,6 +4,7 @@ #define MAX_WEIGHT_CLASS WEIGHT_CLASS_SMALL +//MARK: FOOD /obj/item/food name = "snack" desc = "yummy!" @@ -40,13 +41,13 @@ var/goal_difficulty = FOOD_GOAL_SKIP var/bitecount = 0 - var/trash = null + var/trash var/slice_path var/slices_num - var/dried_type = null + var/dried_type var/dry = FALSE var/cooktype[0] - var/cooked_type = null //for microwave cooking. path of the resulting item after microwaving + var/cooked_type //for microwave cooking. path of the resulting item after microwaving var/total_w_class = 0 //for the total weight an item of food can carry var/list/tastes // for example list("crisps" = 2, "salt" = 1) @@ -273,9 +274,30 @@ W.taste(reagents) W.consume(src) +//MARK: SLICE +/obj/item/food/sliced + +/obj/item/food/sliced/Initialize(mapload, made_by_sliceable = FALSE) + if(made_by_sliceable) + return ..() + if(length(list_reagents)) + return ..() + + // We don't have any reagents, let's add someting + list_reagents = list("nutriment" = 5) + + return ..() + +//MARK: SLICEABLE /obj/item/food/sliceable slices_num = 2 +/obj/item/food/sliceable/Initialize(mapload) + // SS220 TODO: uncomment this when needed + // if(!ispath(slice_path, /obj/item/food/sliced)) + // CRASH("Invalid type assigned to slice_path: [slice_path]") + return ..() + /obj/item/food/sliceable/examine(mob/user) . = ..() . += "Alt-click to put something small inside." @@ -333,7 +355,7 @@ slices_lost = rand(1, min(1, round(slices_num / 2))) var/reagents_per_slice = reagents.total_volume/slices_num for(var/i in 1 to (slices_num - slices_lost)) - var/obj/slice = new slice_path (loc) + var/obj/slice = new slice_path (loc, TRUE) reagents.trans_to(slice,reagents_per_slice) slice.scatter_atom() qdel(src) @@ -352,8 +374,7 @@ cooktype["grilled"] = TRUE cooktype["deep fried"] = TRUE -// MISC - +//MARK: MISC /obj/item/food/cereal name = "box of cereal" desc = "A box of cereal." diff --git a/code/modules/food_and_drinks/kitchen_machinery/cooker.dm b/code/modules/food_and_drinks/kitchen_machinery/cooker.dm index 17d86d656afd..5b4988bbcfb7 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/cooker.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/cooker.dm @@ -179,29 +179,30 @@ var/obj/item/food/type = new(get_turf(src)) return type -/obj/machinery/cooker/attackby__legacy__attackchain(obj/item/I, mob/user, params) +/obj/machinery/cooker/item_interaction(mob/living/user, obj/item/used, list/modifiers) if(upgradeable) //Not all cooker types currently support build/upgrade stuff, so not all of it will work well with this //Until we decide whether or not we want to bring back the cereal maker or old grill/oven in some form, this initial check will have to suffice - if(istype(I, /obj/item/storage/part_replacer)) - exchange_parts(user, I) - return + if(istype(used, /obj/item/storage/part_replacer)) + exchange_parts(user, used) + return ITEM_INTERACT_COMPLETE if(stat & (NOPOWER|BROKEN)) - return + return ITEM_INTERACT_COMPLETE if(panel_open) to_chat(user, "Close the panel first!") - return - if(istype(I, /obj/item/grab)) - return special_attack_grab(I, user) - if(!checkValid(I, user)) - return + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/grab)) + if(special_attack_grab(used, user)) + return ITEM_INTERACT_COMPLETE + if(!checkValid(used, user)) + return ITEM_INTERACT_COMPLETE if(!burns) - if(istype(I, /obj/item/food)) - if(checkCooked(I)) + if(istype(used, /obj/item/food)) + if(checkCooked(used)) to_chat(user, "That is already [thiscooktype], it would do nothing!") - return - putIn(I, user) - for(var/mob/living/L in I.contents) //Emagged cookers - Any mob put in will not survive the trip + return ITEM_INTERACT_COMPLETE + putIn(used, user) + for(var/mob/living/L in used.contents) //Emagged cookers - Any mob put in will not survive the trip if(L.stat != DEAD) if(ispAI(L)) //Snowflake check because pAIs are weird var/mob/living/silicon/pai/P = L @@ -210,7 +211,8 @@ L.death() break - addtimer(CALLBACK(src, PROC_REF(finish_cook), I, user), cooktime) + addtimer(CALLBACK(src, PROC_REF(finish_cook), used, user), cooktime) + return ITEM_INTERACT_COMPLETE /obj/machinery/cooker/proc/finish_cook(obj/item/I, mob/user, params) if(QDELETED(I)) //For situations where the item being cooked gets deleted mid-cook (primed grenades) diff --git a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm index f070d09d2905..f3d1fff923d0 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm @@ -43,15 +43,15 @@ var/obj/item/food/deepfryholder/type = new(get_turf(src)) return type -/obj/machinery/cooker/deepfryer/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/reagent_containers/glass) || istype(I, /obj/item/reagent_containers/drinks/ice)) - var/ice_amount = I.reagents.get_reagent_amount("ice") +/obj/machinery/cooker/deepfryer/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/reagent_containers/glass) || istype(used, /obj/item/reagent_containers/drinks/ice)) + var/ice_amount = used.reagents.get_reagent_amount("ice") if(ice_amount) - I.reagents.remove_all(I.reagents.total_volume) + used.reagents.remove_all(used.reagents.total_volume) add_attack_logs(user, src, "poured [ice_amount]u ice into") user.visible_message( - "[user] pours [I] into [src], and it seems to fizz a bit.", - "You pour [I] into [src], and it seems to fizz a bit.", + "[user] pours [used] into [src], and it seems to fizz a bit.", + "You pour [used] into [src], and it seems to fizz a bit.", "You hear a splash, and a sizzle." ) @@ -59,7 +59,7 @@ addtimer(CALLBACK(src, PROC_REF(boil_leadup), user), 4 SECONDS) addtimer(CALLBACK(src, PROC_REF(make_foam), ice_amount), 5 SECONDS) - return TRUE + return ITEM_INTERACT_COMPLETE return ..() @@ -189,7 +189,7 @@ output = /obj/item/food/carrotfries /datum/deepfryer_special/onionrings - input = /obj/item/food/onion_slice + input = /obj/item/food/sliced/onion_slice output = /obj/item/food/onionrings /datum/deepfryer_special/fried_vox diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index a321b64f8406..35f1bd89078b 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -93,24 +93,24 @@ startgibbing(user) -/obj/machinery/gibber/attackby__legacy__attackchain(obj/item/P, mob/user, params) - if(istype(P, /obj/item/grab)) - var/obj/item/grab/G = P +/obj/machinery/gibber/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/grab)) + var/obj/item/grab/G = used if(G.state < 2) to_chat(user, "You need a better grip to do that!") - return + return ITEM_INTERACT_COMPLETE move_into_gibber(user,G.affecting) qdel(G) - return + return ITEM_INTERACT_COMPLETE - if(default_deconstruction_screwdriver(user, "grinder_open", "grinder", P)) - return + if(default_deconstruction_screwdriver(user, "grinder_open", "grinder", used)) + return ITEM_INTERACT_COMPLETE - if(default_unfasten_wrench(user, P, time = 4 SECONDS)) - return + if(default_unfasten_wrench(user, used, time = 4 SECONDS)) + return ITEM_INTERACT_COMPLETE - if(default_deconstruction_crowbar(user, P)) - return + if(default_deconstruction_crowbar(user, used)) + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm index 672781e46dcc..d99d8389ce72 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm @@ -29,31 +29,32 @@ . = ..() create_reagents(500) -/obj/machinery/icemachine/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/reagent_containers/glass)) +/obj/machinery/icemachine/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/reagent_containers/glass)) if(beaker) to_chat(user, "A container is already inside [src].") - return + return ITEM_INTERACT_COMPLETE if(!user.drop_item()) - to_chat(user, "\The [I] is stuck to you!") - return - beaker = I - I.forceMove(src) - to_chat(user, "You add [I] to [src]") + to_chat(user, "\The [used] is stuck to you!") + return ITEM_INTERACT_COMPLETE + beaker = used + used.forceMove(src) + to_chat(user, "You add [used] to [src].") updateUsrDialog() - return - if(istype(I, /obj/item/food/frozen/icecream)) - if(!I.reagents.has_reagent("sprinkles")) - if(I.reagents.total_volume > 29) - I.reagents.remove_any(1) - I.reagents.add_reagent("sprinkles", 1) - I.name += " with sprinkles" - I.desc += ". This also has sprinkles." + return ITEM_INTERACT_COMPLETE + + if(istype(used, /obj/item/food/frozen/icecream)) + if(!used.reagents.has_reagent("sprinkles")) + if(used.reagents.total_volume > 29) + used.reagents.remove_any(1) + used.reagents.add_reagent("sprinkles", 1) + used.name += " with sprinkles" + used.desc += ". This also has sprinkles." else - to_chat(user, "This [I] already has sprinkles.") - return - return ..() + to_chat(user, "This [used] already has sprinkles.") + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/icemachine/Topic(href, href_list) if(..()) return diff --git a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm index eb860683b17f..4f6910352dc9 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm @@ -71,40 +71,40 @@ * Item Adding ********************/ -/obj/machinery/kitchen_machine/attackby__legacy__attackchain(obj/item/O, mob/user, params) +/obj/machinery/kitchen_machine/item_interaction(mob/living/user, obj/item/used, list/modifiers) if(operating) - return + return ITEM_INTERACT_COMPLETE if(dirty < MAX_DIRT) - if(default_deconstruction_screwdriver(user, open_icon, off_icon, O)) - return + if(default_deconstruction_screwdriver(user, open_icon, off_icon, used)) + return ITEM_INTERACT_COMPLETE - if(istype(O, /obj/item/storage/part_replacer)) + if(istype(used, /obj/item/storage/part_replacer)) return ..() - default_deconstruction_crowbar(user, O) + default_deconstruction_crowbar(user, used) if(dirty == MAX_DIRT) // The machine is all dirty so can't be used! - if(istype(O, /obj/item/reagent_containers/spray/cleaner) || istype(O, /obj/item/soap) || istype(O, /obj/item/reagent_containers/glass/rag)) // If they're trying to clean it then let them + if(istype(used, /obj/item/reagent_containers/spray/cleaner) || istype(used, /obj/item/soap) || istype(used, /obj/item/reagent_containers/glass/rag)) // If they're trying to clean it then let them user.visible_message("[user] starts to clean [src].", "You start to clean [src].") - if(do_after(user, 20 * O.toolspeed, target = src)) + if(do_after(user, 20 * used.toolspeed, target = src)) user.visible_message("[user] has cleaned [src].", "You have cleaned [src].") dirty = NO_DIRT update_icon(UPDATE_ICON_STATE) container_type = OPENCONTAINER - return TRUE + return ITEM_INTERACT_COMPLETE else //Otherwise bad luck!! to_chat(user, "It's dirty!") - return TRUE + return ITEM_INTERACT_COMPLETE - if(is_type_in_list(O, GLOB.cooking_ingredients[recipe_type]) || istype(O, /obj/item/mixing_bowl)) + if(is_type_in_list(used, GLOB.cooking_ingredients[recipe_type]) || istype(used, /obj/item/mixing_bowl)) if(length(contents) >= max_n_of_items) to_chat(user, "This [src] is full of ingredients, you cannot put more.") - return TRUE + return ITEM_INTERACT_COMPLETE - if(istype(O,/obj/item/stack)) - var/obj/item/stack/S = O + if(istype(used,/obj/item/stack)) + var/obj/item/stack/S = used if(S.get_amount() > 1) var/obj/item/stack/to_add = S.split(user, 1) to_add.forceMove(src) @@ -112,48 +112,49 @@ else add_item(S, user) else - add_item(O, user) - else if(is_type_in_list(O, list(/obj/item/reagent_containers/glass, /obj/item/reagent_containers/drinks, /obj/item/reagent_containers/condiment))) - if(!O.reagents) - return TRUE + add_item(used, user) + else if(is_type_in_list(used, list(/obj/item/reagent_containers/glass, /obj/item/reagent_containers/drinks, /obj/item/reagent_containers/condiment))) + if(!used.reagents) + return ITEM_INTERACT_COMPLETE - for(var/datum/reagent/R in O.reagents.reagent_list) + for(var/datum/reagent/R in used.reagents.reagent_list) if(!(R.id in GLOB.cooking_reagents[recipe_type])) - to_chat(user, "Your [O.name] contains components unsuitable for cookery.") - return TRUE - else if(istype(O, /obj/item/storage)) - var/obj/item/storage/S = O + to_chat(user, "Your [used.name] contains components unsuitable for cookery.") + return ITEM_INTERACT_COMPLETE + else if(istype(used, /obj/item/storage)) + var/obj/item/storage/S = used if(!S.allow_quick_empty) - to_chat(user, "[O] is too awkward a shape to dump into [src].") - return TRUE + to_chat(user, "[used] is too awkward a shape to dump into [src].") + return ITEM_INTERACT_COMPLETE if(length(S.contents) + length(contents) >= max_n_of_items) - to_chat(user, "You can't fit everything from [O] into [src].") - return TRUE + to_chat(user, "You can't fit everything from [used] into [src].") + return ITEM_INTERACT_COMPLETE if(length(S.contents) == 0) - to_chat(user, "[O] is empty!") - return TRUE - for(var/obj/item/ingredient in O.contents) + to_chat(user, "[used] is empty!") + return ITEM_INTERACT_COMPLETE + for(var/obj/item/ingredient in used.contents) if(!is_type_in_list(ingredient, GLOB.cooking_ingredients[recipe_type]) && !istype(ingredient, /obj/item/mixing_bowl)) - to_chat(user, "Your [O.name] contains contents unsuitable for cookery.") - return TRUE + to_chat(user, "Your [used.name] contains contents unsuitable for cookery.") + return ITEM_INTERACT_COMPLETE S.hide_from(user) - user.visible_message("[user] dumps [O] into [src].", "You dump [O] into [src].") - for(var/obj/item/ingredient in O.contents) + user.visible_message("[user] dumps [used] into [src].", "You dump [used] into [src].") + for(var/obj/item/ingredient in used.contents) S.remove_from_storage(ingredient, src) CHECK_TICK SStgui.update_uis(src) - - else if(istype(O, /obj/item/grab)) - var/obj/item/grab/G = O + else if(istype(used, /obj/item/grab)) + var/obj/item/grab/G = used if(HAS_TRAIT(user, TRAIT_PACIFISM)) to_chat(user, "Slamming [G.affecting] into [src] might hurt them!") - return - return special_attack_grab(G, user) - + return ITEM_INTERACT_COMPLETE + special_attack_grab(G, user) + return ITEM_INTERACT_COMPLETE else - to_chat(user, "You have no idea what you can cook with [O].") - return TRUE + to_chat(user, "You have no idea what you can cook with [used].") + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/kitchen_machine/wrench_act(mob/living/user, obj/item/I) if(operating) diff --git a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm index a5079e4ffde8..6c8c512f58bb 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm @@ -54,21 +54,21 @@ GLOBAL_LIST_EMPTY(monkey_recyclers) cube_production = cubes_made required_grind = req_grind -/obj/machinery/monkey_recycler/attackby__legacy__attackchain(obj/item/O, mob/user, params) - if(default_deconstruction_screwdriver(user, "grinder_open", "grinder", O)) - return +/obj/machinery/monkey_recycler/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(default_deconstruction_screwdriver(user, "grinder_open", "grinder", used)) + return ITEM_INTERACT_COMPLETE - if(istype(O, /obj/item/storage/part_replacer)) + if(istype(used, /obj/item/storage/part_replacer)) return ..() - if(default_unfasten_wrench(user, O, time = 4 SECONDS)) + if(default_unfasten_wrench(user, used, time = 4 SECONDS)) power_change() - return + return ITEM_INTERACT_COMPLETE - if(default_deconstruction_crowbar(user, O)) - return + if(default_deconstruction_crowbar(user, used)) + return ITEM_INTERACT_COMPLETE - if(istype(O, /obj/item/multitool)) + if(istype(used, /obj/item/multitool)) if(!panel_open) cycle_through++ switch(cycle_through) @@ -87,14 +87,14 @@ GLOBAL_LIST_EMPTY(monkey_recyclers) cycle_through = 0 to_chat(user, "You change the monkeycube type to [initial(cube_type.name)].") else - var/obj/item/multitool/M = O + var/obj/item/multitool/M = used M.buffer = src to_chat(user, "You log [src] in [M]'s buffer.") - return + return ITEM_INTERACT_COMPLETE if(stat != 0) //NOPOWER etc - return - if(istype(O, /obj/item/grab)) - var/obj/item/grab/G = O + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/grab)) + var/obj/item/grab/G = used var/grabbed = G.affecting if(ishuman(grabbed)) var/mob/living/carbon/human/target = grabbed @@ -117,7 +117,7 @@ GLOBAL_LIST_EMPTY(monkey_recyclers) to_chat(user, "The machine only accepts monkeys!") else to_chat(user, "The machine only accepts monkeys!") - return + return ITEM_INTERACT_COMPLETE return ..() /obj/machinery/monkey_recycler/attack_hand(mob/user) diff --git a/code/modules/food_and_drinks/kitchen_machinery/processor.dm b/code/modules/food_and_drinks/kitchen_machinery/processor.dm index 63608f5fe394..7926e2edf5a0 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/processor.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/processor.dm @@ -105,7 +105,7 @@ output = /obj/item/food/soydope /datum/food_processor_process/spaghetti - input = /obj/item/food/doughslice + input = /obj/item/food/sliced/dough output = /obj/item/food/spaghetti /datum/food_processor_process/macaroni @@ -188,33 +188,33 @@ return P return 0 -/obj/machinery/processor/attackby__legacy__attackchain(obj/item/O, mob/user, params) +/obj/machinery/processor/item_interaction(mob/living/user, obj/item/used, list/modifiers) if(processing) to_chat(user, "\the [src] is already processing something!") - return TRUE + return ITEM_INTERACT_COMPLETE - if(default_deconstruction_screwdriver(user, "processor_open", "processor", O)) - return + if(default_deconstruction_screwdriver(user, "processor_open", "processor", used)) + return ITEM_INTERACT_COMPLETE - if(istype(O, /obj/item/storage/part_replacer)) + if(istype(used, /obj/item/storage/part_replacer)) return ..() - if(default_unfasten_wrench(user, O, time = 4 SECONDS)) - return + if(default_unfasten_wrench(user, used, time = 4 SECONDS)) + return ITEM_INTERACT_COMPLETE - default_deconstruction_crowbar(user, O) + default_deconstruction_crowbar(user, used) - var/obj/item/what = O + var/obj/item/what = used - if(istype(O, /obj/item/grab)) - var/obj/item/grab/G = O + if(istype(used, /obj/item/grab)) + var/obj/item/grab/G = used what = G.affecting var/datum/food_processor_process/P = select_recipe(what) if(!P) to_chat(user, "That probably won't blend.") - return 1 + return ITEM_INTERACT_COMPLETE user.visible_message("\the [user] puts \the [what] into \the [src].", \ "You put \the [what] into \the [src].") @@ -222,7 +222,7 @@ user.drop_item() what.loc = src - return + return ITEM_INTERACT_COMPLETE /obj/machinery/processor/attack_hand(mob/user) if(stat & (NOPOWER|BROKEN)) //no power or broken diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index 89e838074fe4..17cac16a67f2 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -177,27 +177,27 @@ return TRUE return ..() -/obj/machinery/smartfridge/attackby__legacy__attackchain(obj/item/O, mob/user) - if(istype(O, /obj/item/storage/part_replacer)) +/obj/machinery/smartfridge/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/storage/part_replacer)) . = ..() SStgui.update_uis(src) return if(stat & (BROKEN|NOPOWER)) to_chat(user, "[src] is unpowered and useless.") - return + return ITEM_INTERACT_COMPLETE - if(load(O, user)) + if(load(used, user)) user.visible_message( - "[user] has added [O] to [src].", - "You add [O] to [src]." + "[user] has added [used] to [src].", + "You add [used] to [src]." ) SStgui.update_uis(src) update_icon(UPDATE_OVERLAYS) - return + return ITEM_INTERACT_COMPLETE - if(istype(O, /obj/item/storage/bag) || istype(O, /obj/item/storage/box)) - var/obj/item/storage/P = O + if(istype(used, /obj/item/storage/bag) || istype(used, /obj/item/storage/box)) + var/obj/item/storage/P = used var/items_loaded = 0 for(var/obj/G in P.contents) if(load(G, user)) @@ -212,11 +212,13 @@ var/failed = length(P.contents) if(failed) to_chat(user, "[failed] item\s [failed == 1 ? "is" : "are"] refused.") - return + return ITEM_INTERACT_COMPLETE - if(!istype(O, /obj/item/card/emag)) - to_chat(user, "\The [src] smartly refuses [O].") - return TRUE + if(!istype(used, /obj/item/card/emag)) + to_chat(user, "\The [src] smartly refuses [used].") + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/smartfridge/attack_ai(mob/user) if(!silicon_controllable) diff --git a/code/modules/food_and_drinks/recipes/recipes_candy.dm b/code/modules/food_and_drinks/recipes/recipes_candy.dm index e3ab57ad8ab9..03d1e7ba02f0 100644 --- a/code/modules/food_and_drinks/recipes/recipes_candy.dm +++ b/code/modules/food_and_drinks/recipes/recipes_candy.dm @@ -90,7 +90,7 @@ /datum/recipe/candy/candied_pineapple reagents = list("sugar" = 2, "water" = 2) items = list( - /obj/item/food/pineappleslice + /obj/item/food/sliced/pineapple ) result = /obj/item/food/candy/candied_pineapple diff --git a/code/modules/food_and_drinks/recipes/recipes_grill.dm b/code/modules/food_and_drinks/recipes/recipes_grill.dm index d984f12eb9b5..2b432889fc74 100644 --- a/code/modules/food_and_drinks/recipes/recipes_grill.dm +++ b/code/modules/food_and_drinks/recipes/recipes_grill.dm @@ -75,9 +75,9 @@ /datum/recipe/grill/grilledcheese items = list( - /obj/item/food/breadslice, - /obj/item/food/breadslice, - /obj/item/food/cheesewedge + /obj/item/food/sliced/bread, + /obj/item/food/sliced/bread, + /obj/item/food/sliced/cheesewedge ) result = /obj/item/food/grilledcheese @@ -112,8 +112,8 @@ items = list( /obj/item/food/egg, /obj/item/food/egg, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge ) result = /obj/item/food/omelette @@ -179,7 +179,7 @@ /obj/item/food/boiledrice, /obj/item/stack/seaweed ) - result = /obj/item/food/sushi_tamago + result = /obj/item/food/sliced/sushi_tamago /datum/recipe/grill/sushi_unagi reagents = list("sake" = 5) @@ -212,7 +212,7 @@ /obj/item/food/fried_tofu, /obj/item/stack/seaweed ) - result = /obj/item/food/sushi_inari + result = /obj/item/food/sliced/sushi_inari /datum/recipe/grill/sushi_sake items = list( @@ -220,7 +220,7 @@ /obj/item/food/salmonmeat, /obj/item/stack/seaweed ) - result = /obj/item/food/sushi_sake + result = /obj/item/food/sliced/sushi_sake /datum/recipe/grill/sushi_smoked_salmon items = list( @@ -228,7 +228,7 @@ /obj/item/food/salmonsteak, /obj/item/stack/seaweed ) - result = /obj/item/food/sushi_smoked_salmon + result = /obj/item/food/sliced/sushi_smoked_salmon /datum/recipe/grill/sushi_masago items = list( @@ -236,7 +236,7 @@ /obj/item/fish_eggs/goldfish, /obj/item/stack/seaweed ) - result = /obj/item/food/sushi_masago + result = /obj/item/food/sliced/sushi_masago /datum/recipe/grill/sushi_tobiko items = list( @@ -244,15 +244,15 @@ /obj/item/fish_eggs/shark, /obj/item/stack/seaweed ) - result = /obj/item/food/sushi_tobiko + result = /obj/item/food/sliced/sushi_tobiko /datum/recipe/grill/sushi_tobiko_egg items = list( - /obj/item/food/sushi_tobiko, + /obj/item/food/sliced/sushi_tobiko, /obj/item/food/egg, /obj/item/stack/seaweed ) - result = /obj/item/food/sushi_tobiko_egg + result = /obj/item/food/sliced/sushi_tobiko_egg /datum/recipe/grill/sushi_tai items = list( @@ -260,7 +260,7 @@ /obj/item/food/catfishmeat, /obj/item/stack/seaweed ) - result = /obj/item/food/sushi_tai + result = /obj/item/food/sliced/sushi_tai /datum/recipe/grill/goliath items = list(/obj/item/food/monstermeat/goliath) diff --git a/code/modules/food_and_drinks/recipes/recipes_microwave.dm b/code/modules/food_and_drinks/recipes/recipes_microwave.dm index b97d66f76192..433cf5e8341a 100644 --- a/code/modules/food_and_drinks/recipes/recipes_microwave.dm +++ b/code/modules/food_and_drinks/recipes/recipes_microwave.dm @@ -330,7 +330,7 @@ /obj/item/food/meat, /obj/item/food/meat, /obj/item/food/meat, - /obj/item/food/cheesewedge + /obj/item/food/sliced/cheesewedge ) result = /obj/item/food/burger/bigbite @@ -340,9 +340,9 @@ /obj/item/food/burger/bigbite, /obj/item/food/dough, /obj/item/food/meat, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, /obj/item/food/bacon, - /obj/item/food/tomatoslice + /obj/item/food/sliced/tomato ) result = /obj/item/food/burger/superbite @@ -419,7 +419,7 @@ /obj/item/food/bun, /obj/item/food/meat, /obj/item/food/grown/lettuce, - /obj/item/food/cheesewedge + /obj/item/food/sliced/cheesewedge ) result = /obj/item/food/burger/cheese @@ -459,7 +459,7 @@ /obj/item/food/bacon, /obj/item/food/bacon, /obj/item/food/grown/lettuce, - /obj/item/food/cheesewedge + /obj/item/food/sliced/cheesewedge ) result = /obj/item/food/burger/bacon @@ -467,7 +467,7 @@ items = list( /obj/item/food/bun, /obj/item/food/bbqribs, - /obj/item/food/onion_slice + /obj/item/food/sliced/onion_slice ) result = /obj/item/food/burger/mcrib @@ -510,8 +510,8 @@ /datum/recipe/microwave/eggplantparm items = list( - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge, /obj/item/food/grown/eggplant ) result = /obj/item/food/eggplantparm @@ -541,7 +541,7 @@ /datum/recipe/microwave/cheesyfries items = list( /obj/item/food/fries, - /obj/item/food/cheesewedge + /obj/item/food/sliced/cheesewedge ) result = /obj/item/food/cheesyfries @@ -656,7 +656,7 @@ items = list( /obj/item/food/cutlet, /obj/item/food/beans, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, /obj/item/food/sliceable/flatdough ) result = /obj/item/food/burrito @@ -684,9 +684,9 @@ /datum/recipe/microwave/sandwich items = list( /obj/item/food/meatsteak, - /obj/item/food/breadslice, - /obj/item/food/breadslice, - /obj/item/food/cheesewedge + /obj/item/food/sliced/bread, + /obj/item/food/sliced/bread, + /obj/item/food/sliced/cheesewedge ) result = /obj/item/food/sandwich @@ -713,14 +713,14 @@ /datum/recipe/microwave/slimetoast reagents = list("slimejelly" = 5) items = list( - /obj/item/food/breadslice, + /obj/item/food/sliced/bread, ) result = /obj/item/food/jelliedtoast/slime /datum/recipe/microwave/jelliedtoast reagents = list("cherryjelly" = 5) items = list( - /obj/item/food/breadslice + /obj/item/food/sliced/bread ) result = /obj/item/food/jelliedtoast/cherry @@ -797,7 +797,7 @@ /datum/recipe/microwave/macncheese reagents = list("water" = 5, "milk" = 5) items = list( - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, /obj/item/food/macaroni, ) result = /obj/item/food/macncheese @@ -808,8 +808,8 @@ /obj/item/food/bun, /obj/item/food/meat, /obj/item/food/meat, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge, /obj/item/food/grown/lettuce, /obj/item/food/grown/chili, /obj/item/toy/crayon/green, @@ -819,10 +819,10 @@ /datum/recipe/microwave/blt items = list( - /obj/item/food/breadslice, - /obj/item/food/breadslice, + /obj/item/food/sliced/bread, + /obj/item/food/sliced/bread, /obj/item/food/grown/lettuce, - /obj/item/food/tomatoslice, + /obj/item/food/sliced/tomato, /obj/item/food/bacon ) result = /obj/item/food/blt @@ -830,34 +830,34 @@ /datum/recipe/microwave/peanut_butter_jelly/cherry reagents = list("cherryjelly" = 5, "peanutbutter" = 5) items = list( - /obj/item/food/breadslice, - /obj/item/food/breadslice + /obj/item/food/sliced/bread, + /obj/item/food/sliced/bread ) result = /obj/item/food/peanut_butter_jelly/cherry /datum/recipe/microwave/peanut_butter_jelly/slime reagents = list("slimejelly" = 5, "peanutbutter" = 5) items = list( - /obj/item/food/breadslice, - /obj/item/food/breadslice + /obj/item/food/sliced/bread, + /obj/item/food/sliced/bread ) result = /obj/item/food/peanut_butter_jelly/slime /datum/recipe/microwave/peanut_butter_banana reagents = list("peanutbutter" = 5) items = list( - /obj/item/food/breadslice, - /obj/item/food/breadslice, + /obj/item/food/sliced/bread, + /obj/item/food/sliced/bread, /obj/item/food/grown/banana ) result = /obj/item/food/peanut_butter_banana /datum/recipe/microwave/philly_cheesesteak items = list( - /obj/item/food/breadslice, - /obj/item/food/breadslice, + /obj/item/food/sliced/bread, + /obj/item/food/sliced/bread, /obj/item/food/cutlet, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, /obj/item/food/grown/onion ) result = /obj/item/food/philly_cheesesteak @@ -967,24 +967,24 @@ /datum/recipe/microwave/twobread reagents = list("wine" = 5) items = list( - /obj/item/food/breadslice, - /obj/item/food/breadslice + /obj/item/food/sliced/bread, + /obj/item/food/sliced/bread ) result = /obj/item/food/twobread /datum/recipe/microwave/slimesandwich reagents = list("slimejelly" = 5) items = list( - /obj/item/food/breadslice, - /obj/item/food/breadslice + /obj/item/food/sliced/bread, + /obj/item/food/sliced/bread ) result = /obj/item/food/jellysandwich/slime /datum/recipe/microwave/cherrysandwich reagents = list("cherryjelly" = 5) items = list( - /obj/item/food/breadslice, - /obj/item/food/breadslice + /obj/item/food/sliced/bread, + /obj/item/food/sliced/bread ) result = /obj/item/food/jellysandwich/cherry @@ -1049,7 +1049,7 @@ reagents = list("water" = 10) items = list( /obj/item/food/grown/onion, - /obj/item/food/cheesewedge + /obj/item/food/sliced/cheesewedge ) result = /obj/item/food/soup/frenchonionsoup @@ -1179,7 +1179,7 @@ /obj/item/food/badrecipe, /obj/item/food/tofu, /obj/item/food/egg, - /obj/item/food/cheesewedge + /obj/item/food/sliced/cheesewedge ) result = /obj/item/food/soup/mysterysoup @@ -1220,7 +1220,7 @@ /obj/item/food/grown/olive, /obj/item/food/grown/tomato, /obj/item/food/cutlet, - /obj/item/food/cheesewedge + /obj/item/food/sliced/cheesewedge ) result = /obj/item/food/salad/antipasto @@ -1228,9 +1228,9 @@ reagents = list("oliveoil" = 5) items = list( /obj/item/food/grown/lettuce, - /obj/item/food/onion_slice/red, - /obj/item/food/cheesewedge, - /obj/item/food/breadslice + /obj/item/food/sliced/onion_slice/red, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/bread ) result = /obj/item/food/salad/caesar @@ -1247,7 +1247,7 @@ /obj/item/food/grown/citrus/orange, /obj/item/food/grown/apple, /obj/item/food/grown/grapes, - /obj/item/food/watermelonslice + /obj/item/food/sliced/watermelon ) result = /obj/item/food/salad/fruit @@ -1256,10 +1256,10 @@ items = list( /obj/item/food/grown/olive, /obj/item/food/grown/tomato, - /obj/item/food/onion_slice/red, - /obj/item/food/onion_slice/red, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge + /obj/item/food/sliced/onion_slice/red, + /obj/item/food/sliced/onion_slice/red, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge ) result = /obj/item/food/salad/greek @@ -1269,8 +1269,8 @@ /obj/item/food/grown/grapes, /obj/item/food/grown/banana, /obj/item/food/grown/banana, - /obj/item/food/watermelonslice, - /obj/item/food/watermelonslice + /obj/item/food/sliced/watermelon, + /obj/item/food/sliced/watermelon ) result = /obj/item/food/salad/jungle @@ -1279,8 +1279,8 @@ items = list( /obj/item/food/grown/carrot, /obj/item/food/grown/lettuce, - /obj/item/food/onion_slice/red, - /obj/item/food/onion_slice/red + /obj/item/food/sliced/onion_slice/red, + /obj/item/food/sliced/onion_slice/red ) result = /obj/item/food/salad/kale @@ -1365,7 +1365,7 @@ items = list( /obj/item/food/friedegg, /obj/item/food/meatsteak, - /obj/item/food/breadslice + /obj/item/food/sliced/bread ) result = /obj/item/food/benedict @@ -1474,7 +1474,7 @@ /datum/recipe/microwave/frozenpineapplepop items = list( /obj/item/popsicle_stick, - /obj/item/food/pineappleslice, + /obj/item/food/sliced/pineapple, /obj/item/food/chocolatebar ) result = /obj/item/food/frozen/popsicle/frozenpineapple @@ -1647,8 +1647,8 @@ /datum/recipe/microwave/notasandwich items = list( - /obj/item/food/breadslice, - /obj/item/food/breadslice, + /obj/item/food/sliced/bread, + /obj/item/food/sliced/bread, /obj/item/clothing/mask/fakemoustache ) result = /obj/item/food/notasandwich @@ -1720,9 +1720,9 @@ /datum/recipe/microwave/taco items = list( - /obj/item/food/doughslice, + /obj/item/food/sliced/dough, /obj/item/food/cutlet, - /obj/item/food/cheesewedge + /obj/item/food/sliced/cheesewedge ) result = /obj/item/food/taco diff --git a/code/modules/food_and_drinks/recipes/recipes_oven.dm b/code/modules/food_and_drinks/recipes/recipes_oven.dm index 9012cba58c60..8dacef0d42d3 100644 --- a/code/modules/food_and_drinks/recipes/recipes_oven.dm +++ b/code/modules/food_and_drinks/recipes/recipes_oven.dm @@ -16,9 +16,9 @@ /obj/item/food/meat, /obj/item/food/meat, /obj/item/food/meat, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge, ) result = /obj/item/food/sliceable/meatbread @@ -30,9 +30,9 @@ /obj/item/food/meat/syntiflesh, /obj/item/food/meat/syntiflesh, /obj/item/food/meat/syntiflesh, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge, ) result = /obj/item/food/sliceable/meatbread @@ -44,9 +44,9 @@ /obj/item/food/monstermeat/xenomeat, /obj/item/food/monstermeat/xenomeat, /obj/item/food/monstermeat/xenomeat, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge, ) result = /obj/item/food/sliceable/xenomeatbread @@ -241,8 +241,8 @@ /obj/item/food/dough, /obj/item/food/dough, /obj/item/food/dough, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge, ) result = /obj/item/food/sliceable/cheesecake @@ -444,15 +444,15 @@ /obj/item/food/tofu, /obj/item/food/tofu, /obj/item/food/tofu, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge, ) result = /obj/item/food/sliceable/tofubread /datum/recipe/oven/loadedbakedpotato items = list( - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, /obj/item/food/grown/potato ) result = /obj/item/food/loadedbakedpotato @@ -483,7 +483,7 @@ /datum/recipe/oven/fortunecookie reagents = list("sugar" = 5) items = list( - /obj/item/food/doughslice, + /obj/item/food/sliced/dough, /obj/item/paper, ) result = /obj/item/food/fortunecookie @@ -505,8 +505,8 @@ /obj/item/food/sliceable/flatdough, /obj/item/food/grown/tomato, /obj/item/food/grown/tomato, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge ) result = /obj/item/food/sliceable/pizza/margheritapizza @@ -516,7 +516,7 @@ /obj/item/food/meat, /obj/item/food/meat, /obj/item/food/meat, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, /obj/item/food/grown/tomato ) result = /obj/item/food/sliceable/pizza/meatpizza @@ -524,7 +524,7 @@ /datum/recipe/oven/mushroompizza items = list( /obj/item/food/sliceable/flatdough, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, /obj/item/food/grown/mushroom, /obj/item/food/grown/mushroom, /obj/item/food/grown/mushroom, @@ -537,7 +537,7 @@ /datum/recipe/oven/vegetablepizza items = list( /obj/item/food/sliceable/flatdough, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, /obj/item/food/grown/eggplant, /obj/item/food/grown/carrot, /obj/item/food/grown/corn, @@ -549,9 +549,9 @@ items = list( /obj/item/food/sliceable/flatdough, /obj/item/food/grown/tomato, - /obj/item/food/cheesewedge, - /obj/item/food/pineappleslice, - /obj/item/food/pineappleslice, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/pineapple, + /obj/item/food/sliced/pineapple, /obj/item/food/meat, ) result = /obj/item/food/sliceable/pizza/hawaiianpizza @@ -559,8 +559,8 @@ /datum/recipe/oven/macncheesepizza items = list( /obj/item/food/sliceable/flatdough, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge, /obj/item/food/macncheese, ) result = /obj/item/food/sliceable/pizza/macpizza @@ -569,10 +569,10 @@ items = list( /obj/item/food/sliceable/flatdough, /obj/item/food/grown/tomato, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge ) result = /obj/item/food/sliceable/pizza/cheesepizza @@ -580,7 +580,7 @@ items = list( /obj/item/food/sliceable/flatdough, /obj/item/food/grown/tomato, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, /obj/item/food/sausage ) result = /obj/item/food/sliceable/pizza/pepperonipizza @@ -589,7 +589,7 @@ items = list( /obj/item/food/sliceable/flatdough, /obj/item/food/grown/tomato, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, /obj/item/food/donkpocket, /obj/item/food/donkpocket ) @@ -599,7 +599,7 @@ items = list( /obj/item/food/sliceable/flatdough, /obj/item/food/grown/tomato, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, /obj/item/food/grown/cannabis, /obj/item/food/grown/cannabis, /obj/item/food/grown/cannabis, @@ -611,7 +611,7 @@ reagents = list("capsaicin" = 5) items = list( /obj/item/food/sliceable/flatdough, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, /obj/item/food/grown/chili, /obj/item/food/grown/chili ) @@ -623,7 +623,7 @@ /obj/item/food/sliceable/flatdough, /obj/item/food/grown/tomato, /obj/item/food/grown/tomato, - /obj/item/food/cheesewedge + /obj/item/food/sliced/cheesewedge ) result = /obj/item/food/sliceable/pizza/pestopizza @@ -633,7 +633,7 @@ /obj/item/food/sliceable/flatdough, /obj/item/food/grown/garlic, /obj/item/food/grown/garlic, - /obj/item/food/cheesewedge + /obj/item/food/sliced/cheesewedge ) result = /obj/item/food/sliceable/pizza/garlicpizza @@ -662,8 +662,8 @@ items = list( /obj/item/food/dough, /obj/item/food/dough, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge, ) result = /obj/item/food/sliceable/creamcheesebread @@ -814,7 +814,7 @@ /datum/recipe/oven/cracker reagents = list("sodiumchloride" = 1) items = list( - /obj/item/food/doughslice + /obj/item/food/sliced/dough ) result = /obj/item/food/cracker @@ -859,9 +859,9 @@ items = list( /obj/item/food/meat, /obj/item/food/meat, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge, /obj/item/food/grown/tomato, /obj/item/food/grown/tomato, /obj/item/food/dough diff --git a/code/modules/food_and_drinks/recipes/tablecraft/recipes_table.dm b/code/modules/food_and_drinks/recipes/tablecraft/recipes_table.dm index 1fe1c90adec0..ef01ec7db2ac 100644 --- a/code/modules/food_and_drinks/recipes/tablecraft/recipes_table.dm +++ b/code/modules/food_and_drinks/recipes/tablecraft/recipes_table.dm @@ -2,8 +2,8 @@ name = "Sandwich" reqs = list( /obj/item/food/meatsteak = 1, - /obj/item/food/breadslice = 2, - /obj/item/food/cheesewedge = 1, + /obj/item/food/sliced/bread = 2, + /obj/item/food/sliced/cheesewedge = 1, ) result = list(/obj/item/food/sandwich) category = CAT_FOOD @@ -13,7 +13,7 @@ name = "Slime Jelly Sandwich" reqs = list( /datum/reagent/slimejelly = 5, - /obj/item/food/breadslice = 2, + /obj/item/food/sliced/bread = 2, ) result = list(/obj/item/food/jellysandwich/slime) category = CAT_FOOD @@ -23,7 +23,7 @@ name = "Cherry Jelly Sandwich" reqs = list( /datum/reagent/consumable/cherryjelly = 5, - /obj/item/food/breadslice = 2, + /obj/item/food/sliced/bread = 2, ) result = list(/obj/item/food/jellysandwich/cherry) category = CAT_FOOD @@ -62,7 +62,7 @@ /datum/crafting_recipe/notasandwich name = "not-a-sandwich" reqs = list( - /obj/item/food/breadslice = 2, + /obj/item/food/sliced/bread = 2, /obj/item/clothing/mask/fakemoustache = 1, ) result = list(/obj/item/food/notasandwich) @@ -122,7 +122,7 @@ /obj/item/food/fried_tofu = 1, /obj/item/stack/seaweed = 1, ) - result = list(/obj/item/food/sushi_inari) + result = list(/obj/item/food/sliced/sushi_inari) category = CAT_FOOD subcategory = CAT_SUSHI @@ -145,7 +145,7 @@ /obj/item/food/salmonmeat = 1, /obj/item/stack/seaweed = 1, ) - result = list(/obj/item/food/sushi_sake) + result = list(/obj/item/food/sliced/sushi_sake) category = CAT_FOOD subcategory = CAT_SUSHI @@ -168,7 +168,7 @@ /obj/item/food/salmonsteak = 1, /obj/item/stack/seaweed = 1, ) - result = list(/obj/item/food/sushi_smoked_salmon) + result = list(/obj/item/food/sliced/sushi_smoked_salmon) category = CAT_FOOD subcategory = CAT_SUSHI @@ -191,7 +191,7 @@ /obj/item/fish_eggs/goldfish = 1, /obj/item/stack/seaweed = 1, ) - result = list(/obj/item/food/sushi_masago) + result = list(/obj/item/food/sliced/sushi_masago) category = CAT_FOOD subcategory = CAT_SUSHI @@ -214,7 +214,7 @@ /obj/item/fish_eggs/shark = 1, /obj/item/stack/seaweed = 1, ) - result = list(/obj/item/food/sushi_tobiko) + result = list(/obj/item/food/sliced/sushi_tobiko) category = CAT_FOOD subcategory = CAT_SUSHI @@ -233,18 +233,18 @@ /datum/crafting_recipe/sushi_tobiko_egg name = "Tobiko and Egg Sushi" reqs = list( - /obj/item/food/sushi_tobiko = 1, + /obj/item/food/sliced/sushi_tobiko = 1, /obj/item/food/egg = 1, /obj/item/stack/seaweed = 1, ) - result = list(/obj/item/food/sushi_tobiko_egg) + result = list(/obj/item/food/sliced/sushi_tobiko_egg) category = CAT_FOOD subcategory = CAT_SUSHI /datum/crafting_recipe/tobiko_egg_maki name = "Tobiko and Egg Maki Roll" reqs = list( - /obj/item/food/sushi_tobiko = 4, + /obj/item/food/sliced/sushi_tobiko = 4, /obj/item/food/egg = 4, /obj/item/stack/seaweed = 1, ) @@ -260,7 +260,7 @@ /obj/item/food/catfishmeat = 1, /obj/item/stack/seaweed = 1, ) - result = list(/obj/item/food/sushi_tai) + result = list(/obj/item/food/sliced/sushi_tai) category = CAT_FOOD subcategory = CAT_SUSHI diff --git a/code/modules/hallucinations/effects/backrooms.dm b/code/modules/hallucinations/effects/backrooms.dm new file mode 100644 index 000000000000..ef34b3957fc8 --- /dev/null +++ b/code/modules/hallucinations/effects/backrooms.dm @@ -0,0 +1,58 @@ +GLOBAL_VAR_INIT(backrooms_occupied, FALSE) + +/** + * # Hallucination - Backrooms + * + * Temporarily sends the target to the backrooms. Their body's movement matches their movement in the backrooms. + */ + +/datum/hallucination_manager/backrooms + // this is the total length of the hallucination, if it's too short it cuts off the end + trigger_time = 14 SECONDS + // Human that will see the hallucination + var/mob/living/carbon/human/human_owner + // Item that will copy the owner's visible contents + var/obj/item/clone_base + +/datum/hallucination_manager/backrooms/on_spawn() + if(!ishuman(owner)) + return + human_owner = owner + // One person at a time in the backrooms, no backroom brawls allowed. + if(GLOB.backrooms_occupied) + return + GLOB.backrooms_occupied = TRUE + fade_out_trigger() + +/datum/hallucination_manager/backrooms/proc/fade_out_trigger() + human_owner.overlay_fullscreen("sleepblind", /atom/movable/screen/fullscreen/center/blind/sleeping, animated = 1 SECONDS) + trigger_timer = addtimer(CALLBACK(src, PROC_REF(do_hallucination_trigger)), 1 SECONDS, TIMER_STOPPABLE) + +/datum/hallucination_manager/backrooms/proc/do_hallucination_trigger() + human_owner.clear_fullscreen("sleepblind") + RegisterSignal(human_owner, COMSIG_MOVABLE_MOVED, PROC_REF(follow_movement)) + var/obj/spawn_location = pick(GLOB.backroomswarp) + clone_base = new(spawn_location) + clone_base.vis_contents += human_owner + human_owner.reset_perspective(clone_base) + trigger_timer = addtimer(CALLBACK(src, PROC_REF(fade_in_trigger)), 12 SECONDS, TIMER_STOPPABLE) + +/datum/hallucination_manager/backrooms/proc/fade_in_trigger() + human_owner.overlay_fullscreen("sleepblind", /atom/movable/screen/fullscreen/center/blind/sleeping, animated = 1 SECONDS) + trigger_timer = addtimer(CALLBACK(src, PROC_REF(end_fade_trigger)), 1 SECONDS, TIMER_STOPPABLE) + +/datum/hallucination_manager/backrooms/proc/end_fade_trigger() + human_owner.clear_fullscreen("sleepblind") + +/datum/hallucination_manager/backrooms/Destroy(force) + GLOB.backrooms_occupied = FALSE + UnregisterSignal(human_owner, COMSIG_MOVABLE_MOVED) + human_owner.reset_perspective(human_owner) + human_owner = null + QDEL_NULL(clone_base) + return ..() + +/datum/hallucination_manager/backrooms/proc/follow_movement(source, atom/old_loc, dir, forced) + // signal is called above in on_spawn so that whenever our human moves, we also move the clone + SIGNAL_HANDLER // COMSIG_MOVABLE_MOVED + step_towards(clone_base, get_step(get_turf(clone_base), dir)) diff --git a/code/modules/hallucinations/hallucination_manager.dm b/code/modules/hallucinations/hallucination_manager.dm index d8fb12d4ee06..60c7ad6c77df 100644 --- a/code/modules/hallucinations/hallucination_manager.dm +++ b/code/modules/hallucinations/hallucination_manager.dm @@ -28,7 +28,7 @@ RegisterSignal(owner, COMSIG_PARENT_QDELETING, PROC_REF(signal_qdel)) spawn_hallucination() -/datum/hallucination_manager/Destroy(force, ...) +/datum/hallucination_manager/Destroy(force) . = ..() owner = null QDEL_NULL(hallucination_list) @@ -38,8 +38,9 @@ var/turf/spawn_location = get_spawn_location() if(!spawn_location) return - initial_hallucination = new initial_hallucination(spawn_location, owner) - hallucination_list |= initial_hallucination + if(initial_hallucination) + initial_hallucination = new initial_hallucination(spawn_location, owner) + hallucination_list |= initial_hallucination on_spawn() trigger_timer = addtimer(CALLBACK(src, PROC_REF(on_trigger)), trigger_time, TIMER_DELETE_ME) diff --git a/code/modules/hallucinations/hallucinations.dm b/code/modules/hallucinations/hallucinations.dm index 9849594fbeff..59172b6a1b99 100644 --- a/code/modules/hallucinations/hallucinations.dm +++ b/code/modules/hallucinations/hallucinations.dm @@ -27,8 +27,9 @@ GLOBAL_LIST_INIT(hallucinations, list( /obj/effect/hallucination/assault = 10, /obj/effect/hallucination/fake_grenade/spawner = 10, /obj/effect/hallucination/loose_energy_ball = 10, - /datum/hallucination_manager/blind_rush = 1, /datum/hallucination_manager/xeno_pounce = 10, + /datum/hallucination_manager/backrooms = 1, + /datum/hallucination_manager/blind_rush = 1, /datum/hallucination_manager/waves = 2, /obj/effect/hallucination/blob = 10, ) diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm index d37b07d3fbb3..a426e51ad241 100644 --- a/code/modules/hydroponics/biogenerator.dm +++ b/code/modules/hydroponics/biogenerator.dm @@ -102,42 +102,46 @@ /obj/machinery/biogenerator/crowbar_act(mob/living/user, obj/item/I) return default_deconstruction_crowbar(user, I) -/obj/machinery/biogenerator/attackby__legacy__attackchain(obj/item/O, mob/user, params) +/obj/machinery/biogenerator/item_interaction(mob/living/user, obj/item/used, list/modifiers) + // TODO: This feels off, no where else do we have a blanket "print a + // message for any other kind of item interaction attempt" that's keyed to intent + // See if this can be made more sensible after everything's been migrated + // to the new attack chain if(user.a_intent == INTENT_HARM) return ..() - if(istype(O, /obj/item/storage/part_replacer)) + if(istype(used, /obj/item/storage/part_replacer)) return ..() if(processing) to_chat(user, "[src] is currently processing.") - return + return ITEM_INTERACT_COMPLETE - if(istype(O, /obj/item/reagent_containers/glass)) + if(istype(used, /obj/item/reagent_containers/glass)) if(panel_open) to_chat(user, "Close the maintenance panel first.") - return + return ITEM_INTERACT_COMPLETE if(container) to_chat(user, "A container is already loaded into [src].") - return + return ITEM_INTERACT_COMPLETE if(!user.drop_item()) - return + return ITEM_INTERACT_COMPLETE - O.forceMove(src) - container = O + used.forceMove(src) + container = used to_chat(user, "You add the [container] to [src].") update_icon(UPDATE_ICON_STATE) SStgui.update_uis(src) - return TRUE + return ITEM_INTERACT_COMPLETE - if(istype(O, /obj/item/storage/bag/plants)) + else if(istype(used, /obj/item/storage/bag/plants)) if(length(stored_plants) >= max_storable_plants) to_chat(user, "[src] can't hold any more plants!") - return + return ITEM_INTERACT_COMPLETE - var/obj/item/storage/bag/plants/PB = O + var/obj/item/storage/bag/plants/PB = used for(var/obj/item/P in PB.contents) // No need to filter here, because plant bags should have the same list of acceptable items we do. if(length(stored_plants) >= max_storable_plants) @@ -151,37 +155,38 @@ to_chat(user, "You fill [src] to its capacity.") SStgui.update_uis(src) - return TRUE + return ITEM_INTERACT_COMPLETE - if(is_type_in_typecache(O, acceptable_items)) + else if(is_type_in_typecache(used, acceptable_items)) if(length(stored_plants) >= max_storable_plants) to_chat(user, "[src] can't hold any more plants!") - return - if(!user.drop_item_to_ground(O)) - return + return ITEM_INTERACT_COMPLETE + if(!user.drop_item_to_ground(used)) + return ITEM_INTERACT_COMPLETE - O.forceMove(src) - stored_plants += O - to_chat(user, "You put [O] in [src].") + used.forceMove(src) + stored_plants += used + to_chat(user, "You put [used] in [src].") SStgui.update_uis(src) - return TRUE + return ITEM_INTERACT_COMPLETE - if(istype(O, /obj/item/disk/design_disk)) - user.visible_message("[user] begins to load [O] in [src]...", - "You begin to load a design from [O]...", + else if(istype(used, /obj/item/disk/design_disk)) + user.visible_message("[user] begins to load [used] in [src]...", + "You begin to load a design from [used]...", "You hear the chatter of a floppy drive.") processing = TRUE SStgui.update_uis(src) - var/obj/item/disk/design_disk/D = O + var/obj/item/disk/design_disk/D = used if(do_after(user, 1 SECONDS, target = src)) files.AddDesign2Known(D.blueprint) processing = FALSE update_ui_product_list(user) - return TRUE + return ITEM_INTERACT_COMPLETE to_chat(user, "You cannot put [src] in [name]!") + return ITEM_INTERACT_COMPLETE /** * Builds/Updates the `product_list` used by the UI. diff --git a/code/modules/hydroponics/compost_bin.dm b/code/modules/hydroponics/compost_bin.dm index 152ed33fa1c4..fb1c95d63a01 100644 --- a/code/modules/hydroponics/compost_bin.dm +++ b/code/modules/hydroponics/compost_bin.dm @@ -66,16 +66,20 @@ qdel(O) // takes care of plant insertion and conversion to biomass, and start composting what was inserted -/obj/machinery/compost_bin/attackby__legacy__attackchain(obj/item/O, mob/user, params) +/obj/machinery/compost_bin/item_interaction(mob/living/user, obj/item/used, list/modifiers) + // TODO: This feels off, no where else do we have a blanket "print a + // message for any other kind of item interaction attempt" that's keyed to intent + // See if this can be made more sensible after everything's been migrated + // to the new attack chain if(user.a_intent == INTENT_HARM) return ..() - if(istype(O, /obj/item/storage/bag/plants)) + if(istype(used, /obj/item/storage/bag/plants)) if(biomass >= biomass_capacity && potassium >= potassium_capacity) to_chat(user, "[src] can't hold any more biomass, and it's contents are saturated with potassium!") - return + return ITEM_INTERACT_COMPLETE - var/obj/item/storage/bag/plants/PB = O + var/obj/item/storage/bag/plants/PB = used for(var/obj/item/food/grown/G in PB.contents) // if the plant contains either potassium, plantmatter and nutriment and the compost bin has space for any of those. if((G.reagents.get_reagent_amount("potassium") && potassium <= potassium_capacity) || ((G.reagents.get_reagent_amount("plantmatter") || G.reagents.get_reagent_amount("nutriment")) && biomass <= biomass_capacity)) @@ -97,30 +101,30 @@ SStgui.update_uis(src) update_icon(UPDATE_ICON_STATE) - return TRUE + return ITEM_INTERACT_COMPLETE - if(istype(O, /obj/item/food/grown)) + if(istype(used, /obj/item/food/grown)) if(biomass >= biomass_capacity && potassium >= potassium_capacity) to_chat(user, "[src] can't hold any more biomass, and its contents are saturated with potassium!") - return - if(!user.drop_item_to_ground(O)) - return + return ITEM_INTERACT_COMPLETE + if(!user.drop_item_to_ground(used)) + return ITEM_INTERACT_COMPLETE - O.forceMove(src) - make_biomass(O) - to_chat(user, "You put [O] in [src].") + used.forceMove(src) + make_biomass(used) + to_chat(user, "You put [used] in [src].") SStgui.update_uis(src) update_icon(UPDATE_ICON_STATE) - return TRUE - if(istype(O, /obj/item/reagent_containers)) + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/reagent_containers)) var/proportion = 0 - var/obj/item/reagent_containers/B = O + var/obj/item/reagent_containers/B = used if(B.reagents.total_volume <= 0) to_chat(user, "[B] is empty!") - return + return ITEM_INTERACT_COMPLETE if(potassium >= potassium_capacity && potash >= potash_capacity) to_chat(user, "The contents of [src] are saturated with potassium and it cannot hold more potash!") - return + return ITEM_INTERACT_COMPLETE // Won't pour in more than the amount of potassium that can be accepted, even if the beaker is not filled with pure potassium. proportion = min(min(B.reagents.total_volume, B.amount_per_transfer_from_this), potassium_capacity - potassium) / B.reagents.total_volume @@ -156,9 +160,10 @@ SStgui.update_uis(src) update_icon(UPDATE_ICON_STATE) - return TRUE + return ITEM_INTERACT_COMPLETE to_chat(user, "You cannot put this in [src]!") + return ITEM_INTERACT_COMPLETE //Compost compostable material if there is any /obj/machinery/compost_bin/process() diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index fbbb0238fda7..54fa10e4018e 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -130,25 +130,25 @@ if(panel_open) . += "dnamod-open" -/obj/machinery/plantgenes/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(default_deconstruction_screwdriver(user, "dnamod", "dnamod", I)) +/obj/machinery/plantgenes/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(default_deconstruction_screwdriver(user, "dnamod", "dnamod", used)) update_icon(UPDATE_OVERLAYS) - return + return ITEM_INTERACT_COMPLETE - if(default_deconstruction_crowbar(user, I)) - return + if(default_deconstruction_crowbar(user, used)) + return ITEM_INTERACT_COMPLETE - if(istype(I, /obj/item/unsorted_seeds)) - to_chat(user, "You need to sort [I] first!") - return + if(istype(used, /obj/item/unsorted_seeds)) + to_chat(user, "You need to sort [used] first!") + return ITEM_INTERACT_COMPLETE - if(istype(I, /obj/item/seeds)) - add_seed(I, user) - return + if(istype(used, /obj/item/seeds)) + add_seed(used, user) + return ITEM_INTERACT_COMPLETE - if(istype(I, /obj/item/disk/plantgene) || istype(I, /obj/item/storage/box)) - add_disk(I, user) - return + if(istype(used, /obj/item/disk/plantgene) || istype(used, /obj/item/storage/box)) + add_disk(used, user) + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/modules/hydroponics/grown/melon.dm b/code/modules/hydroponics/grown/melon.dm index 9d6ef0044708..e4bc12e46b1c 100644 --- a/code/modules/hydroponics/grown/melon.dm +++ b/code/modules/hydroponics/grown/melon.dm @@ -26,7 +26,7 @@ name = "watermelon" desc = "It's full of watery goodness." icon_state = "watermelon" // Sprite created by https://github.com/binarysudoku for Goonstation, They have relicensed it for our use. - slice_path = /obj/item/food/watermelonslice + slice_path = /obj/item/food/sliced/watermelon slices_num = 5 dried_type = null w_class = WEIGHT_CLASS_NORMAL diff --git a/code/modules/hydroponics/grown/onion.dm b/code/modules/hydroponics/grown/onion.dm index 3e4532713ea9..ac2f8653b3b8 100644 --- a/code/modules/hydroponics/grown/onion.dm +++ b/code/modules/hydroponics/grown/onion.dm @@ -23,7 +23,7 @@ icon_state = "onion" filling_color = "#C0C9A0" bitesize_mod = 2 - slice_path = /obj/item/food/onion_slice + slice_path = /obj/item/food/sliced/onion_slice tastes = list("onion" = 1, "pungentness" = 1) slices_num = 2 wine_power = 0.3 @@ -46,12 +46,12 @@ desc = "Purple despite the name." icon_state = "onion_red" filling_color = "#C29ACF" - slice_path = /obj/item/food/onion_slice/red + slice_path = /obj/item/food/sliced/onion_slice/red tastes = list("red onion" = 1, "pungentness" = 3) wine_power = 0.6 wine_flavor = "powerful pungentness" -/obj/item/food/onion_slice +/obj/item/food/sliced/onion_slice name = "onion slices" desc = "Rings, not for wearing." icon_state = "onionslice" @@ -61,7 +61,7 @@ gender = PLURAL cooked_type = /obj/item/food/onionrings -/obj/item/food/onion_slice/red +/obj/item/food/sliced/onion_slice/red name = "red onion slices" desc = "They shine like exceptionally low quality amethyst." icon_state = "onionslice_red" diff --git a/code/modules/hydroponics/grown/pineapple.dm b/code/modules/hydroponics/grown/pineapple.dm index 3935ae7ae7e6..97aa3e54189c 100644 --- a/code/modules/hydroponics/grown/pineapple.dm +++ b/code/modules/hydroponics/grown/pineapple.dm @@ -25,7 +25,7 @@ attack_verb = list("stung", "pined") throw_speed = 1 throw_range = 5 - slice_path = /obj/item/food/pineappleslice + slice_path = /obj/item/food/sliced/pineapple slices_num = 3 filling_color = "#F6CB0B" w_class = WEIGHT_CLASS_NORMAL diff --git a/code/modules/hydroponics/grown/tomato.dm b/code/modules/hydroponics/grown/tomato.dm index 6934b92fba3f..041b6c748986 100644 --- a/code/modules/hydroponics/grown/tomato.dm +++ b/code/modules/hydroponics/grown/tomato.dm @@ -19,7 +19,7 @@ name = "tomato" desc = "I say to-mah-to, you say tom-mae-to." icon_state = "tomato" - slice_path = /obj/item/food/tomatoslice + slice_path = /obj/item/food/sliced/tomato slices_num = 4 splat_type = /obj/effect/decal/cleanable/tomato_smudge filling_color = "#FF6347" diff --git a/code/modules/hydroponics/hydroponics_tray.dm b/code/modules/hydroponics/hydroponics_tray.dm index 3174a1a4d625..09c0b3c7f0f5 100644 --- a/code/modules/hydroponics/hydroponics_tray.dm +++ b/code/modules/hydroponics/hydroponics_tray.dm @@ -123,9 +123,10 @@ QDEL_NULL(myseed) return ..() -/obj/machinery/hydroponics/constructable/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(default_deconstruction_screwdriver(user, "hydrotray3", "hydrotray3", I)) - return +/obj/machinery/hydroponics/constructable/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(default_deconstruction_screwdriver(user, "hydrotray3", "hydrotray3", used)) + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/hydroponics/constructable/crowbar_act(mob/user, obj/item/I) @@ -493,8 +494,6 @@ plant_hud_set_health() plant_hud_set_status() - - /obj/machinery/hydroponics/proc/mutatepest(mob/user) if(pestlevel > 5) message_admins("[ADMIN_LOOKUPFLW(user)] caused spiderling pests to spawn in a hydro tray") @@ -770,25 +769,25 @@ to_chat(user, message.Join("")) doping_chem = new_chem -/obj/machinery/hydroponics/attackby__legacy__attackchain(obj/item/O, mob/user, params) - //Called when mob user "attacks" it with object O - if(istype(O, /obj/item/reagent_containers)) // Syringe stuff (and other reagent containers now too) - var/obj/item/reagent_containers/reagent_source = O +/obj/machinery/hydroponics/item_interaction(mob/living/user, obj/item/used, list/modifiers) + //Called when mob user "attacks" it with object `used` + if(istype(used, /obj/item/reagent_containers)) // Syringe stuff (and other reagent containers now too) + var/obj/item/reagent_containers/reagent_source = used var/target = myseed ? myseed.plantname : src if(istype(reagent_source, /obj/item/reagent_containers/syringe)) var/obj/item/reagent_containers/syringe/syr = reagent_source if(syr.mode != SYRINGE_INJECT) to_chat(user, "You can't get any extract out of this plant.") //That. Gives me an idea... - return TRUE + return ITEM_INTERACT_COMPLETE if(!reagent_source.reagents.total_volume) to_chat(user, "[reagent_source] is empty.") - return TRUE + return ITEM_INTERACT_COMPLETE if(reagent_source.has_lid && !reagent_source.is_drainable()) //if theres a LID then cannot transfer reagents. - to_chat(user, "You need to open [O] first!") - return TRUE + to_chat(user, "You need to open [used] first!") + return ITEM_INTERACT_COMPLETE var/visi_msg = "" var/transfer_amount = reagent_source.amount_per_transfer_from_this @@ -814,65 +813,71 @@ playsound(loc, 'sound/effects/slosh.ogg', 25, TRUE) add_compost(reagent_source, user, transfer_amount, visi_msg, irrigate) - return TRUE + return ITEM_INTERACT_COMPLETE - else if(isfood(O) || istype(O, /obj/item/grown)) + else if(isfood(used) || istype(used, /obj/item/grown)) var/target = myseed ? myseed.plantname : src - var/transfer = O.reagents.total_volume - var/message = "[user] composts [O], spreading it through [target]" - add_compost(O, user, transfer, message) - return TRUE + var/transfer = used.reagents.total_volume + var/message = "[user] composts [used], spreading it through [target]" + add_compost(used, user, transfer, message) + return ITEM_INTERACT_COMPLETE - else if(istype(O, /obj/item/unsorted_seeds)) - to_chat(user, "You need to sort [O] first!") - return ..() + else if(istype(used, /obj/item/unsorted_seeds)) + to_chat(user, "You need to sort [used] first!") + return ITEM_INTERACT_COMPLETE - else if(istype(O, /obj/item/seeds) && !istype(O, /obj/item/seeds/sample)) + else if(istype(used, /obj/item/seeds) && !istype(used, /obj/item/seeds/sample)) if(!myseed) - if(istype(O, /obj/item/seeds/kudzu)) + if(istype(used, /obj/item/seeds/kudzu)) investigate_log("had Kudzu planted in it by [key_name(user)] at ([x],[y],[z])","kudzu") - user.unequip(O) - to_chat(user, "You plant [O].") + user.unequip(used) + to_chat(user, "You plant [used].") dead = FALSE - myseed = O + myseed = used age = 1 plant_health = myseed.endurance plant_hud_set_health() plant_hud_set_status() lastcycle = world.time - O.forceMove(src) + used.forceMove(src) update_state() else to_chat(user, "[src] already has seeds in it!") - else if(istype(O, /obj/item/plant_analyzer)) + return ITEM_INTERACT_COMPLETE + + else if(istype(used, /obj/item/plant_analyzer)) send_plant_details(user) + return ITEM_INTERACT_COMPLETE - else if(istype(O, /obj/item/cultivator)) + else if(istype(used, /obj/item/cultivator)) if(weedlevel > 0) user.visible_message("[user] uproots the weeds.", "You remove the weeds from [src].") adjustWeeds(-10) update_state() else to_chat(user, "This plot is completely devoid of weeds! It doesn't need uprooting.") + return ITEM_INTERACT_COMPLETE - else if(istype(O, /obj/item/storage/bag/plants)) + else if(istype(used, /obj/item/storage/bag/plants)) if(!harvest) attack_hand(user) - return + return ITEM_INTERACT_COMPLETE + + myseed.harvest(user, used) - myseed.harvest(user, O) + return ITEM_INTERACT_COMPLETE - else if(istype(O, /obj/item/shovel/spade)) + else if(istype(used, /obj/item/shovel/spade)) if(!myseed && !weedlevel) to_chat(user, "[src] doesn't have any plants or weeds!") - return + return ITEM_INTERACT_COMPLETE user.visible_message("[user] starts digging out [src]'s plants...", "You start digging out [src]'s plants...") - playsound(src, O.usesound, 50, 1) - if(!do_after(user, 25 * O.toolspeed, target = src) || (!myseed && !weedlevel)) - return + playsound(src, used.usesound, 50, 1) + if(!do_after(user, 25 * used.toolspeed, target = src) || (!myseed && !weedlevel)) + return ITEM_INTERACT_COMPLETE user.visible_message("[user] digs out the plants in [src]!", "You dig out all of [src]'s plants!") - playsound(src, O.usesound, 50, 1) + playsound(src, used.usesound, 50, 1) if(myseed) //Could be that they're just using it as a de-weeder age = 0 plant_health = 0 @@ -886,8 +891,10 @@ plant_hud_set_status() adjustWeeds(-10) //Has a side effect of cleaning up those nasty weeds update_state() - else if(is_pen(O) && myseed) + return ITEM_INTERACT_COMPLETE + else if(is_pen(used) && myseed) myseed.variant_prompt(user, src) + return ITEM_INTERACT_COMPLETE else return ..() @@ -1028,12 +1035,13 @@ /obj/machinery/hydroponics/soil/update_icon_lights() return // Has no lights -/obj/machinery/hydroponics/soil/attackby__legacy__attackchain(obj/item/O, mob/user, params) - if(istype(O, /obj/item/shovel) && !istype(O, /obj/item/shovel/spade)) //Doesn't include spades because of uprooting plants +/obj/machinery/hydroponics/soil/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/shovel) && !istype(used, /obj/item/shovel/spade)) //Doesn't include spades because of uprooting plants to_chat(user, "You clear up [src]!") qdel(src) - else - return ..() + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/hydroponics/proc/add_compost(obj/item/reagent_source, mob/user, transfer_amount, visi_msg, irrigate = FALSE) var/list/trays = list(src)//makes the list just this in cases of syringes and compost etc diff --git a/code/modules/hydroponics/seed_extractor.dm b/code/modules/hydroponics/seed_extractor.dm index 1f9d9feb17e3..e3a76b98994c 100644 --- a/code/modules/hydroponics/seed_extractor.dm +++ b/code/modules/hydroponics/seed_extractor.dm @@ -74,23 +74,23 @@ for(var/obj/item/stock_parts/manipulator/M in component_parts) seed_multiplier = M.rating -/obj/machinery/seed_extractor/attackby__legacy__attackchain(obj/item/O, mob/user, params) - if(default_deconstruction_screwdriver(user, "sextractor_open", "sextractor", O)) - return +/obj/machinery/seed_extractor/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(default_deconstruction_screwdriver(user, "sextractor_open", "sextractor", used)) + return ITEM_INTERACT_COMPLETE - if(default_unfasten_wrench(user, O, time = 4 SECONDS)) - return + if(default_unfasten_wrench(user, used, time = 4 SECONDS)) + return ITEM_INTERACT_COMPLETE - if(default_deconstruction_crowbar(user, O)) - return + if(default_deconstruction_crowbar(user, used)) + return ITEM_INTERACT_COMPLETE - if(istype(O, /obj/item/storage/part_replacer)) + if(istype(used, /obj/item/storage/part_replacer)) . = ..() SStgui.update_uis(src) - return + return ITEM_INTERACT_COMPLETE - if(istype(O, /obj/item/storage/bag/plants)) - var/obj/item/storage/P = O + if(istype(used, /obj/item/storage/bag/plants)) + var/obj/item/storage/P = used var/loaded = 0 for(var/obj/item/seeds/G in P) if(length(contents) >= max_seeds) @@ -99,7 +99,7 @@ add_seed(G, user) if(loaded) - to_chat(user, "You transfer [loaded] seeds from [O] into [src].") + to_chat(user, "You transfer [loaded] seeds from [used] into [src].") SStgui.update_uis(src) else var/seedable = 0 @@ -108,33 +108,34 @@ for(var/obj/item/grown/ignored in P) seedable++ if(!seedable) - to_chat(user, "There are no seeds or plants in [O].") - return + to_chat(user, "There are no seeds or plants in [used].") + return ITEM_INTERACT_COMPLETE - to_chat(user, "You dump the plants in [O] into [src].") - if(!O.use_tool(src, user, min(5, seedable/2) SECONDS)) - return + to_chat(user, "You dump the plants in [used] into [src].") + if(!used.use_tool(src, user, min(5, seedable/2) SECONDS)) + return ITEM_INTERACT_COMPLETE for(var/thing in P) seedify(thing,-1, src, user) - return + return ITEM_INTERACT_COMPLETE - if(istype(O, /obj/item/unsorted_seeds)) - to_chat(user, "You need to sort [O] first!") - return ..() + if(istype(used, /obj/item/unsorted_seeds)) + to_chat(user, "You need to sort [used] first!") + return ITEM_INTERACT_COMPLETE - if(istype(O, /obj/item/seeds)) - add_seed(O, user) - to_chat(user, "You add [O] to [name].") + if(istype(used, /obj/item/seeds)) + add_seed(used, user) + to_chat(user, "You add [used] to [name].") SStgui.update_uis(src) - return + return ITEM_INTERACT_COMPLETE - if(seedify(O,-1, src, user)) + if(seedify(used,-1, src, user)) to_chat(user, "You extract some seeds.") - return + return ITEM_INTERACT_COMPLETE if(user.a_intent != INTENT_HARM) - to_chat(user, "You can't extract any seeds from \the [O.name]!") + to_chat(user, "You can't extract any seeds from \the [used.name]!") + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/modules/library/library_computer.dm b/code/modules/library/library_computer.dm index 56cbb2c9539b..54c6f3a900ce 100644 --- a/code/modules/library/library_computer.dm +++ b/code/modules/library/library_computer.dm @@ -65,22 +65,22 @@ /obj/machinery/computer/library/attack_ghost(mob/user) ui_interact(user) -/obj/machinery/computer/library/attackby__legacy__attackchain(obj/item/O, mob/user, params) - if(istype(O, /obj/item/book)) - select_book(O) - return - if(istype(O, /obj/item/barcodescanner)) - var/obj/item/barcodescanner/B = O +/obj/machinery/computer/library/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/book)) + select_book(used) + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/barcodescanner)) + var/obj/item/barcodescanner/B = used if(!B.connect(src)) playsound(src, 'sound/machines/synth_no.ogg', 15, TRUE) to_chat(user, "ERROR: No Connection Established!") - return + return ITEM_INTERACT_COMPLETE to_chat(user, "Barcode Scanner Successfully Connected to Computer.") audible_message("[src] lets out a low, short blip.", hearing_distance = 2) playsound(B, 'sound/machines/terminal_select.ogg', 10, TRUE) - return - if(istype(O, /obj/item/card/id)) - var/obj/item/card/id/ID = O //at some point, this should be moved over to its own proc (select_patron()???) + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/card/id)) + var/obj/item/card/id/ID = used //at some point, this should be moved over to its own proc (select_patron()???) if(ID.registered_name) user_data.patron_name = ID.registered_name else @@ -88,17 +88,17 @@ user_data.patron_account = null //account number should reset every scan so we don't accidently have an account number but no name playsound(src, 'sound/machines/synth_no.ogg', 15, TRUE) to_chat(user, "ERROR: No name detected!") - return //no point in continuing if the ID card has no associated name! + return ITEM_INTERACT_COMPLETE //no point in continuing if the ID card has no associated name! playsound(src, 'sound/items/scannerbeep.ogg', 15, TRUE) if(ID.associated_account_number) user_data.patron_account = ID.associated_account_number else user_data.patron_account = null to_chat(user, "[src]'s screen flashes: 'WARNING! Patron without associated account number Selected'") - return + return ITEM_INTERACT_COMPLETE - if(default_unfasten_wrench(user, O, time = 60)) - return + if(default_unfasten_wrench(user, used, time = 60)) + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/modules/library/library_equipment.dm b/code/modules/library/library_equipment.dm index 33f2180b308e..4453dcabc498 100644 --- a/code/modules/library/library_equipment.dm +++ b/code/modules/library/library_equipment.dm @@ -199,15 +199,18 @@ ui_interact(user) -/obj/machinery/bookbinder/attackby__legacy__attackchain(obj/item/I, mob/user) - if(istype(I, /obj/item/paper)) - select_paper(I) - if(istype(I, /obj/item/paper_bundle)) - select_paper_stack(I) - if(istype(I, /obj/item/book)) - select_book(I) - if(default_unfasten_wrench(user, I, time = 60)) - return +/obj/machinery/bookbinder/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/paper)) + select_paper(used) + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/paper_bundle)) + select_paper_stack(used) + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/book)) + select_book(used) + return ITEM_INTERACT_COMPLETE + if(default_unfasten_wrench(user, used, time = 60)) + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/modules/mining/laborcamp/laborshuttle.dm b/code/modules/mining/laborcamp/laborshuttle.dm index afe662bb5a7f..4e64315478b8 100644 --- a/code/modules/mining/laborcamp/laborshuttle.dm +++ b/code/modules/mining/laborcamp/laborshuttle.dm @@ -46,20 +46,21 @@ QDEL_NULL(announcer) return ..() -/obj/machinery/mineral/labor_prisoner_shuttle_console/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/card/id/prisoner)) +/obj/machinery/mineral/labor_prisoner_shuttle_console/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/card/id/prisoner)) if(inserted_id_uid) to_chat(user, "There's an ID inserted already.") - return + return ITEM_INTERACT_COMPLETE - if(!user.drop_item_to_ground(I)) - return + if(!user.drop_item_to_ground(used)) + return ITEM_INTERACT_COMPLETE - I.forceMove(src) - inserted_id_uid = I.UID() - to_chat(user, "You insert [I].") + used.forceMove(src) + inserted_id_uid = used.UID() + to_chat(user, "You insert [used].") SStgui.update_uis(src) - return + + return ITEM_INTERACT_COMPLETE return ..() @@ -172,18 +173,19 @@ return user.examinate(src) -/obj/machinery/mineral/labor_points_checker/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/card/id/prisoner)) - var/obj/item/card/id/prisoner/prisoner_id = I +/obj/machinery/mineral/labor_points_checker/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/card/id/prisoner)) + var/obj/item/card/id/prisoner/prisoner_id = used if(!prisoner_id.goal) to_chat(user, "Error: No point quota assigned by security, exiting.") - return + return ITEM_INTERACT_COMPLETE to_chat(user, "ID: [prisoner_id.registered_name]") to_chat(user, "Points Collected:[prisoner_id.mining_points]") to_chat(user, "Point Quota: [prisoner_id.goal]") to_chat(user, "Collect points by bringing ore to the labor camp ore redemption machine. Reach your quota to earn your release.") - return - if(istype(I, /obj/item/card/id)) + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/card/id)) to_chat(user, "Error: Invalid ID") - return + return ITEM_INTERACT_COMPLETE + return ..() diff --git a/code/modules/mining/lavaland/loot/colossus_loot.dm b/code/modules/mining/lavaland/loot/colossus_loot.dm index 740a502eab19..a67f1adf036e 100644 --- a/code/modules/mining/lavaland/loot/colossus_loot.dm +++ b/code/modules/mining/lavaland/loot/colossus_loot.dm @@ -49,8 +49,8 @@ ..() ActivationReaction(user,"touch") -/obj/machinery/anomalous_crystal/attackby__legacy__attackchain(obj/item/I, mob/user, params) - ActivationReaction(user,"weapon") +/obj/machinery/anomalous_crystal/item_interaction(mob/living/user, obj/item/used, list/modifiers) + ActivationReaction(user, "weapon") return ..() /obj/machinery/anomalous_crystal/bullet_act(obj/item/projectile/P, def_zone) diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index dbb770a72c7d..60eeca60d177 100644 --- a/code/modules/mining/machine_redemption.dm +++ b/code/modules/mining/machine_redemption.dm @@ -180,18 +180,18 @@ message_sent = TRUE // Interactions -/obj/machinery/mineral/ore_redemption/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/storage/part_replacer)) +/obj/machinery/mineral/ore_redemption/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/storage/part_replacer)) return ..() if(!has_power()) return ..() - if(istype(I, /obj/item/card/id)) - var/obj/item/card/id/ID = I + if(istype(used, /obj/item/card/id)) + var/obj/item/card/id/ID = used if(!points) to_chat(usr, "There are no points to claim."); - return + return ITEM_INTERACT_COMPLETE if(anyone_claim || (req_access_claim in ID.access)) ID.mining_points += points ID.total_mining_points += points @@ -201,25 +201,25 @@ else to_chat(usr, "Required access not found.") add_fingerprint(usr) - return + return ITEM_INTERACT_COMPLETE - if(istype(I, /obj/item/disk/design_disk)) + if(istype(used, /obj/item/disk/design_disk)) if(!user.drop_item()) - return - I.forceMove(src) - inserted_disk = I + return ITEM_INTERACT_COMPLETE + used.forceMove(src) + inserted_disk = used SStgui.update_uis(src) interact(user) user.visible_message( - "[user] inserts [I] into [src].", - "You insert [I] into [src]." + "[user] inserts [used] into [src].", + "You insert [used] into [src]." ) - return + return ITEM_INTERACT_COMPLETE - if(istype(I, /obj/item/gripper)) + if(istype(used, /obj/item/gripper)) if(!try_refill_storage(user)) to_chat(user, "You fail to retrieve any sheets from [src].") - return + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm index f068ace4aa94..bc02fe6212b9 100644 --- a/code/modules/mining/machine_vending.dm +++ b/code/modules/mining/machine_vending.dm @@ -220,25 +220,25 @@ return FALSE add_fingerprint() -/obj/machinery/mineral/equipment_vendor/attackby__legacy__attackchain(obj/item/I, mob/user, params) +/obj/machinery/mineral/equipment_vendor/item_interaction(mob/living/user, obj/item/used, list/modifiers) if(panel_open) - return TRUE - if(istype(I, /obj/item/mining_voucher)) + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/mining_voucher)) if(!has_power()) - return - redeem_voucher(I, user) - return - if(istype(I, /obj/item/card/id)) + return ITEM_INTERACT_COMPLETE + redeem_voucher(used, user) + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/card/id)) if(!has_power()) - return + return ITEM_INTERACT_COMPLETE var/obj/item/card/id/C = user.get_active_hand() if(istype(C) && !istype(inserted_id)) if(!user.drop_item()) - return + return ITEM_INTERACT_COMPLETE C.forceMove(src) inserted_id = C ui_interact(user) - return + return ITEM_INTERACT_COMPLETE return ..() /obj/machinery/mineral/equipment_vendor/crowbar_act(mob/living/user, obj/item/I) @@ -446,30 +446,30 @@ EQUIPMENT("Point Transfer Card", /obj/item/card/mining_point_card, 500), ) -/obj/machinery/mineral/equipment_vendor/explorer/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(default_deconstruction_screwdriver(user, "explorer-open", "explorer", I)) - return +/obj/machinery/mineral/equipment_vendor/explorer/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(default_deconstruction_screwdriver(user, "explorer-open", "explorer", used)) + return ITEM_INTERACT_COMPLETE if(panel_open) - if(istype(I, /obj/item/crowbar)) + if(istype(used, /obj/item/crowbar)) remove_id() - default_deconstruction_crowbar(user, I) - return TRUE - if(istype(I, /obj/item/mining_voucher)) + default_deconstruction_crowbar(user, used) + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/mining_voucher)) if(!has_power()) - return - redeem_voucher(I, user) - return - if(istype(I, /obj/item/card/id)) + return ITEM_INTERACT_COMPLETE + redeem_voucher(used, user) + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/card/id)) if(!has_power()) - return + return ITEM_INTERACT_COMPLETE var/obj/item/card/id/C = user.get_active_hand() if(istype(C) && !istype(inserted_id)) if(!user.drop_item()) - return + return ITEM_INTERACT_COMPLETE C.forceMove(src) inserted_id = C ui_interact(user) - return + return ITEM_INTERACT_COMPLETE return ..() /**********************Mining Equipment Datum**************************/ diff --git a/code/modules/mining/mint.dm b/code/modules/mining/mint.dm index 099d937ccd46..b9953b6d6391 100644 --- a/code/modules/mining/mint.dm +++ b/code/modules/mining/mint.dm @@ -122,18 +122,19 @@ if("ejectBag") eject_bag(usr) -/obj/machinery/mineral/mint/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/storage/bag/money)) +/obj/machinery/mineral/mint/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/storage/bag/money)) if(money_bag) to_chat(user, "There is already a [money_bag.name] inside!") - return + return ITEM_INTERACT_COMPLETE if(!user.drop_item()) - return - to_chat(user, "You put a [I.name] into a [src].") - I.forceMove(src) - money_bag = I + return ITEM_INTERACT_COMPLETE + to_chat(user, "You put a [used.name] into a [src].") + used.forceMove(src) + money_bag = used SStgui.update_uis(src) - return + + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/modules/mob/camera/eye/hologram_eye.dm b/code/modules/mob/camera/eye/hologram_eye.dm index a30c63827a9d..9eb9d1f43524 100644 --- a/code/modules/mob/camera/eye/hologram_eye.dm +++ b/code/modules/mob/camera/eye/hologram_eye.dm @@ -2,7 +2,6 @@ name = "Inactive Hologram Eye" ai_detector_visible = FALSE acceleration = FALSE - relay_speech = TRUE var/obj/machinery/hologram/holopad/holopad /mob/camera/eye/hologram/Initialize(mapload, owner_name, camera_origin, mob/living/user) diff --git a/code/modules/mob/living/carbon/carbon_procs.dm b/code/modules/mob/living/carbon/carbon_procs.dm index 77befc9ebd47..bb2965afd50c 100644 --- a/code/modules/mob/living/carbon/carbon_procs.dm +++ b/code/modules/mob/living/carbon/carbon_procs.dm @@ -239,7 +239,10 @@ return // If it has any of the highfive statuses, dap, handshake, etc var/datum/status_effect/effect = has_status_effect_type(STATUS_EFFECT_HIGHFIVE) - if(effect) + if(istype(effect, STATUS_EFFECT_OFFERING_EFTPOS)) + to_chat(M, "You need to have your ID in hand to scan it!") + return + else if(effect) M.apply_status_effect(effect.type) return // BEGIN HUGCODE - N3X @@ -1377,3 +1380,33 @@ so that different stomachs can handle things in different ways VB*/ /// Returns TRUE if a breathing tube is equipped. /mob/living/carbon/proc/can_breathe_tube() return get_organ_slot("breathing_tube") + +/mob/living/carbon/proc/lazrevival(mob/living/carbon/M) + if(M.get_ghost()) // ghosted after the timer expires. + M.visible_message("[M]'s body stops twitching as the Lazarus Reagent loses potency.") + return + + // If the ghost has re-entered the body, perform the revival! + M.visible_message("[M] gasps as they return to life!") + M.adjustCloneLoss(50) + M.setOxyLoss(0) + M.adjustBruteLoss(rand(0, 15)) + M.adjustToxLoss(rand(0, 15)) + M.adjustFireLoss(rand(0, 15)) + M.do_jitter_animation(200) + + if(ishuman(M)) + var/mob/living/carbon/human/H = M + var/necrosis_prob = 15 * H.decaylevel + H.decaylevel = 0 + for(var/obj/item/organ/O in (H.bodyparts | H.internal_organs)) + if(prob(necrosis_prob) && !O.is_robotic() && !O.vital) + O.necrotize(FALSE) + if(O.status & ORGAN_DEAD) + O.germ_level = INFECTION_LEVEL_THREE + H.update_body() + + M.grab_ghost() + M.update_revive() + add_attack_logs(M, M, "Revived with Lazarus Reagent") + SSblackbox.record_feedback("tally", "players_revived", 1, "lazarus_reagent") diff --git a/code/modules/mob/living/carbon/human/human_emote.dm b/code/modules/mob/living/carbon/human/human_emote.dm index 3d89e7c0f22b..8d85ec818445 100644 --- a/code/modules/mob/living/carbon/human/human_emote.dm +++ b/code/modules/mob/living/carbon/human/human_emote.dm @@ -404,6 +404,31 @@ status = STATUS_EFFECT_DAP key_third_person = "daps" +/datum/emote/living/carbon/human/highfive/payme + key = "payme" + status = STATUS_EFFECT_OFFERING_EFTPOS + +/datum/emote/living/carbon/human/highfive/payme/run_emote(mob/living/user, params, type_override, intentional) + var/obj/item/eftpos/eftpos = user.is_holding_item_of_type(/obj/item/eftpos) + if(!eftpos) + to_chat(user, "You must be holding an EFTPOS to do that!") + return TRUE + if(!eftpos.can_offer) + to_chat(user, "[eftpos] is too bulky to hold out to someone!") + return TRUE + if(!eftpos.transaction_locked) + to_chat(user, "You must lock [eftpos] before it can accept payments.") + return TRUE + if(user.has_status_effect(status)) + user.visible_message("[user.name] shakes [eftpos] around slightly, impatiently waiting for someone to scan their card.") + return TRUE + + var/datum/result = set_status(user) + if(QDELETED(result)) + return TRUE + + return TRUE + /datum/emote/living/carbon/human/highfive/handshake key = "handshake" key_third_person = "handshakes" diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm index b4ce532e5bd6..83696196b72e 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -235,7 +235,7 @@ butcher_results = list( /obj/item/organ/internal/brain = 1, /obj/item/organ/internal/heart = 1, - /obj/item/food/birthdaycakeslice = 3, + /obj/item/food/sliced/birthday_cake = 3, /obj/item/food/meat/slab = 2 ) response_harm = "takes a bite out of" diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index ec8c6b06ee1d..b4b33ee76544 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -100,7 +100,7 @@ ..() /mob/living/simple_animal/mouse/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE)//Prevents mouse from pulling things - if(istype(AM, /obj/item/food/cheesewedge)) + if(istype(AM, /obj/item/food/sliced/cheesewedge)) return ..() // Get dem if(show_message) to_chat(src, "You are too small to pull anything except cheese.") diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 04cce099cb2f..d7bfbbb0c03f 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -467,6 +467,8 @@ /mob/living/simple_animal/hostile/proc/EscapeConfinement() if(buckled) buckled.attack_animal(src) + if(!targets_from) + return if(!isturf(targets_from.loc) && targets_from.loc != null)//Did someone put us in something? var/atom/A = targets_from.loc A.attack_animal(src)//Bang on it till we get out diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm index 26037a60fb36..1e08fbd06551 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm @@ -738,42 +738,64 @@ Difficulty: Hard bursting = FALSE //we no longer damage crossers /obj/effect/temp_visual/hierophant/blast/proc/on_atom_entered(datum/source, atom/movable/entered) - if(bursting) - do_damage(get_turf(src)) + if(!bursting) + return + + if(ismecha(entered)) + damage_mech(entered) + else if(isliving(entered)) + damage_living(entered) + +/obj/effect/temp_visual/hierophant/blast/proc/damage_living(mob/living/target) + if(!istype(target)) + return + if(target in hit_things) + return + + hit_things |= target + if((friendly_fire_check && caster && target.faction_check_mob(caster)) || target.stat == DEAD) + return + + target.flash_screen_color("#660099", 1) + playsound(target,'sound/weapons/sear.ogg', 50, TRUE, -4) + to_chat(target, "You're struck by \a [name]!") + var/limb_to_hit = target.get_organ(pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG)) + var/armor = target.run_armor_check(limb_to_hit, MELEE, "Your armor absorbs [src]!", "Your armor blocks part of [src]!", 50, "Your armor was penetrated by [src]!") + target.apply_damage(damage, BURN, limb_to_hit, armor) + if(ishostile(target)) + var/mob/living/simple_animal/hostile/H = target //mobs find and damage you... + if(H.stat == CONSCIOUS && !H.target && H.AIStatus != AI_OFF && !H.client) + if(!QDELETED(caster)) + if(get_dist(H, caster) <= H.aggro_vision_range) + H.FindTarget(list(caster), 1) + else + H.Goto(get_turf(caster), H.move_to_delay, 3) + if(monster_damage_boost && (ismegafauna(target) || istype(target, /mob/living/simple_animal/hostile/asteroid))) + target.adjustBruteLoss(damage) + if(caster) + add_attack_logs(caster, target, "Struck with a [name]") + +/obj/effect/temp_visual/hierophant/blast/proc/damage_mech(obj/mecha/target) + if(!istype(target)) + return + if(target in hit_things) + return + + hit_things |= target + if(target.occupant) + if(friendly_fire_check && caster && caster.faction_check_mob(target.occupant)) + return + to_chat(target.occupant, "Your [target.name] is struck by \a [name]!") + playsound(target, 'sound/weapons/sear.ogg', 50, TRUE, -4) + target.take_damage(damage, BURN, 0, 0) /obj/effect/temp_visual/hierophant/blast/proc/do_damage(turf/T) if(!damage) return for(var/mob/living/L in T.contents - hit_things) //find and damage mobs... - hit_things += L - if((friendly_fire_check && caster && L.faction_check_mob(caster)) || L.stat == DEAD) - continue - L.flash_screen_color("#660099", 1) - playsound(L,'sound/weapons/sear.ogg', 50, TRUE, -4) - to_chat(L, "You're struck by a [name]!") - var/limb_to_hit = L.get_organ(pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG)) - var/armor = L.run_armor_check(limb_to_hit, MELEE, "Your armor absorbs [src]!", "Your armor blocks part of [src]!", 50, "Your armor was penetrated by [src]!") - L.apply_damage(damage, BURN, limb_to_hit, armor) - if(ishostile(L)) - var/mob/living/simple_animal/hostile/H = L //mobs find and damage you... - if(H.stat == CONSCIOUS && !H.target && H.AIStatus != AI_OFF && !H.client) - if(!QDELETED(caster)) - if(get_dist(H, caster) <= H.aggro_vision_range) - H.FindTarget(list(caster), 1) - else - H.Goto(get_turf(caster), H.move_to_delay, 3) - if(monster_damage_boost && (ismegafauna(L) || istype(L, /mob/living/simple_animal/hostile/asteroid))) - L.adjustBruteLoss(damage) - if(caster) - add_attack_logs(caster, L, "Struck with a [name]") + damage_living(L) for(var/obj/mecha/M in T.contents - hit_things) //also damage mechs. - hit_things += M - if(M.occupant) - if(friendly_fire_check && caster && caster.faction_check_mob(M.occupant)) - continue - to_chat(M.occupant, "Your [M.name] is struck by a [name]!") - playsound(M,'sound/weapons/sear.ogg', 50, TRUE, -4) - M.take_damage(damage, BURN, 0, 0) + damage_mech(M) /obj/effect/hierophant name = "hierophant beacon" diff --git a/code/modules/mob/living/simple_animal/slime/slime_mob.dm b/code/modules/mob/living/simple_animal/slime/slime_mob.dm index a8d58bc31919..5ac5ae2d1833 100644 --- a/code/modules/mob/living/simple_animal/slime/slime_mob.dm +++ b/code/modules/mob/living/simple_animal/slime/slime_mob.dm @@ -226,6 +226,10 @@ /mob/living/simple_animal/slime/Process_Spacemove(movement_dir = 0, continuous_move = FALSE) return 2 +/mob/living/simple_animal/slime/resist_buckle() + ..() + Feedstop() + /mob/living/simple_animal/slime/get_status_tab_items() var/list/status_tab_data = ..() . = status_tab_data diff --git a/code/modules/mob/living/simple_animal/slime/slime_powers.dm b/code/modules/mob/living/simple_animal/slime/slime_powers.dm index cb536acb6bba..d61574cc4ee0 100644 --- a/code/modules/mob/living/simple_animal/slime/slime_powers.dm +++ b/code/modules/mob/living/simple_animal/slime/slime_powers.dm @@ -29,6 +29,10 @@ if(C!=src && Adjacent(C)) choices += C + if(!length(choices)) + to_chat(src, "No subjects nearby to feed on!") + return + var/mob/living/M = tgui_input_list(src, "Who do you wish to feed on?", "Feeding Selection", choices) if(!M) return FALSE diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 0d33bcfa9d6a..612e6385fa36 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -114,8 +114,10 @@ usr.show_message(t, EMOTE_VISIBLE) /mob/proc/show_message(msg, type, alt, alt_type, chat_message_type) // Message, type of message (1 or 2), alternative message, alt message type (1 or 2) +#ifndef GAME_TESTS if(!client) return +#endif if(type) if(type & EMOTE_VISIBLE && !has_vision(information_only = TRUE)) // Vision related diff --git a/code/modules/mob/mob_login_base.dm b/code/modules/mob/mob_login_base.dm index 326108cf97bb..7c2a6354fa9b 100644 --- a/code/modules/mob/mob_login_base.dm +++ b/code/modules/mob/mob_login_base.dm @@ -1,6 +1,7 @@ -//handles setting lastKnownIP and computer_id for use by the ban systems as well as checking for multikeying +//handles setting last_known_ckey, lastKnownIP, and computer_id for use by the ban systems as well as checking for multikeying /mob/proc/update_Login_details() //Multikey checks and logging + last_known_ckey = ckey lastKnownIP = client.address computer_id = client.computer_id log_access_in(client) @@ -31,7 +32,6 @@ /mob/Login() GLOB.player_list |= src - last_known_ckey = ckey update_Login_details() world.update_status() diff --git a/code/modules/mob/new_player/new_player_login.dm b/code/modules/mob/new_player/new_player_login.dm index ffd7902f7c00..95225af0d008 100644 --- a/code/modules/mob/new_player/new_player_login.dm +++ b/code/modules/mob/new_player/new_player_login.dm @@ -1,5 +1,5 @@ /mob/new_player/Login() - update_Login_details() //handles setting lastKnownIP and computer_id for use by the ban systems as well as checking for multikeying + update_Login_details() //handles setting last_known_ckey, lastKnownIP, and computer_id for use by the ban systems as well as checking for multikeying if(GLOB.join_motd) to_chat(src, "
    [GLOB.join_motd]
    ") diff --git a/code/modules/mod/modules/modules_medical.dm b/code/modules/mod/modules/modules_medical.dm index cd54b9b0550b..925d48fa7e34 100644 --- a/code/modules/mod/modules/modules_medical.dm +++ b/code/modules/mod/modules/modules_medical.dm @@ -115,19 +115,22 @@ toolspeed = 2 defib_cooldown = 2.5 SECONDS -///Crew Monitor - Deploys or retracts a built-in handheld crew monitor /obj/item/mod/module/monitor name = "MOD crew monitor module" desc = "A module installed into the wrist of the suit, this presents a display of crew sensor data." icon_state = "scanner" - module_type = MODULE_ACTIVE + module_type = MODULE_USABLE complexity = 1 - active_power_cost = DEFAULT_CHARGE_DRAIN * 0.3 - device = /obj/item/sensor_device/mod + use_power_cost = DEFAULT_CHARGE_DRAIN * 0.3 incompatible_modules = list(/obj/item/mod/module/monitor) cooldown_time = 0.5 SECONDS + allow_flags = MODULE_ALLOW_INACTIVE + var/datum/ui_module/crew_monitor/mod/crew_monitor -/obj/item/sensor_device/mod - name = "MOD crew monitor" - desc = "A miniature machine built into a modsuit that tracks suit sensors across the station." - flags = NODROP + +/obj/item/mod/module/monitor/Initialize(mapload) + . = ..() + crew_monitor = new(src) + +/obj/item/mod/module/monitor/on_use() + crew_monitor.ui_interact(mod.wearer) diff --git a/code/modules/mod/modules/modules_supply.dm b/code/modules/mod/modules/modules_supply.dm index e6696f395494..3b098aefc586 100644 --- a/code/modules/mod/modules/modules_supply.dm +++ b/code/modules/mod/modules/modules_supply.dm @@ -7,12 +7,20 @@ down to the exact coordinates. This information is fed to a central database viewable from the device itself, \ though using it to help people is up to you." icon_state = "gps" - module_type = MODULE_ACTIVE + module_type = MODULE_USABLE complexity = 1 use_power_cost = DEFAULT_CHARGE_DRAIN * 0.2 incompatible_modules = list(/obj/item/mod/module/gps) cooldown_time = 0.5 SECONDS - device = /obj/item/gps/mod + allow_flags = MODULE_ALLOW_INACTIVE + var/obj/item/gps/mod/gps + +/obj/item/mod/module/gps/Initialize(mapload) + . = ..() + gps = new(src) + +/obj/item/mod/module/gps/on_use() + gps.attack_self__legacy__attackchain(mod.wearer) ///Hydraulic Clamp - Lets you pick up and drop crates. /obj/item/mod/module/clamp diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index c2aa0c5330e6..de9b34236f53 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -90,15 +90,17 @@ GLOBAL_LIST_EMPTY(fax_blacklist) /obj/machinery/photocopier/faxmachine/attack_ghost(mob/user) ui_interact(user) -/obj/machinery/photocopier/faxmachine/attackby__legacy__attackchain(obj/item/item, mob/user, params) - if(istype(item,/obj/item/card/id) && !scan) - scan(item) - else if(istype(item, /obj/item/paper) || istype(item, /obj/item/photo) || istype(item, /obj/item/paper_bundle)) - ..() +/obj/machinery/photocopier/faxmachine/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/card/id) && !scan) + scan(used) + return ITEM_INTERACT_COMPLETE + else if(istype(used, /obj/item/paper) || istype(used, /obj/item/photo) || istype(used, /obj/item/paper_bundle)) + . = ..() SStgui.update_uis(src) - else if(istype(item, /obj/item/folder)) + return ITEM_INTERACT_COMPLETE + else if(istype(used, /obj/item/folder)) to_chat(user, "The [src] can't accept folders!") - return //early return so the parent proc doesn't suck up and items that a photocopier would take + return ITEM_INTERACT_COMPLETE //early return so the parent proc doesn't suck up and items that a photocopier would take else return ..() diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 04d168a11581..25388de878f3 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -474,35 +474,41 @@ use_power(active_power_consumption) COOLDOWN_START(src, copying_cooldown, PHOTOCOPIER_DELAY) -/obj/machinery/photocopier/attackby__legacy__attackchain(obj/item/O, mob/user, params) - if(istype(O, /obj/item/paper) || istype(O, /obj/item/photo) || istype(O, /obj/item/paper_bundle)) +/obj/machinery/photocopier/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/paper) || istype(used, /obj/item/photo) || istype(used, /obj/item/paper_bundle)) if(!copyitem) user.drop_item() - copyitem = O - O.forceMove(src) - to_chat(user, "You insert \the [O] into \the [src].") + copyitem = used + used.forceMove(src) + to_chat(user, "You insert \the [used] into \the [src].") flick(insert_anim, src) else to_chat(user, "There is already something in \the [src].") - else if(istype(O, /obj/item/toner)) + + return ITEM_INTERACT_COMPLETE + else if(istype(used, /obj/item/toner)) if(toner <= 10) //allow replacing when low toner is affecting the print darkness user.drop_item() to_chat(user, "You insert the toner cartridge into \the [src].") - var/obj/item/toner/T = O + var/obj/item/toner/T = used toner += T.toner_amount - qdel(O) + qdel(used) else to_chat(user, "This cartridge is not yet ready for replacement! Use up the rest of the toner.") - else if(istype(O, /obj/item/folder)) + + return ITEM_INTERACT_COMPLETE + else if(istype(used, /obj/item/folder)) if(!folder) //allow replacing when low toner is affecting the print darkness user.drop_item() - to_chat(user, "You slide the [O] into \the [src].") - folder = O - O.forceMove(src) + to_chat(user, "You slide the [used] into \the [src].") + folder = used + used.forceMove(src) else to_chat(user, "This cartridge is not yet ready for replacement! Use up the rest of the toner.") - else if(istype(O, /obj/item/grab)) //For ass-copying. - var/obj/item/grab/G = O + + return ITEM_INTERACT_COMPLETE + else if(istype(used, /obj/item/grab)) //For ass-copying. + var/obj/item/grab/G = used if(ismob(G.affecting) && G.affecting != copymob) var/mob/GM = G.affecting visible_message("[usr] drags [GM.name] onto the photocopier!") @@ -511,6 +517,8 @@ if(copyitem) copyitem.forceMove(get_turf(src)) copyitem = null + + return ITEM_INTERACT_COMPLETE else return ..() diff --git a/code/modules/paperwork/ticketmachine.dm b/code/modules/paperwork/ticketmachine.dm index b6b3fd5cf404..7c96f931faea 100644 --- a/code/modules/paperwork/ticketmachine.dm +++ b/code/modules/paperwork/ticketmachine.dm @@ -118,16 +118,16 @@ maptext_x = 8 maptext = "[ticket_number]" -/obj/machinery/ticket_machine/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/hand_labeler_refill)) +/obj/machinery/ticket_machine/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/hand_labeler_refill)) if(!(ticket_number >= max_number)) - to_chat(user, "[src] refuses [I]! There [max_number-ticket_number==1 ? "is" : "are"] still [max_number-ticket_number] ticket\s left!") - return + to_chat(user, "[src] refuses [used]! There [max_number-ticket_number==1 ? "is" : "are"] still [max_number-ticket_number] ticket\s left!") + return ITEM_INTERACT_COMPLETE to_chat(user, "You start to refill [src]'s ticket holder (doing this will reset its ticket count!).") if(do_after(user, 30, target = src)) - to_chat(user, "You insert [I] into [src] as it whirs nondescriptly.") + to_chat(user, "You insert [used] into [src] as it whirs nondescriptly.") user.drop_item() - qdel(I) + qdel(used) ticket_number = 0 current_number = 0 for(var/obj/item/ticket_machine_ticket/ticket in tickets) @@ -136,16 +136,18 @@ tickets.Cut() max_number = initial(max_number) update_icon() - return - else if(istype(I, /obj/item/card/id)) - var/obj/item/card/id/heldID = I + + return ITEM_INTERACT_COMPLETE + else if(istype(used, /obj/item/card/id)) + var/obj/item/card/id/heldID = used if(ACCESS_HOP in heldID.access) dispense_enabled = !dispense_enabled to_chat(user, "You [dispense_enabled ? "enable" : "disable"] [src], it will [dispense_enabled ? "now" : "no longer"] dispense tickets!") handle_maptext() - return + return ITEM_INTERACT_COMPLETE to_chat(user, "You do not have the required access to [dispense_enabled ? "disable" : "enable"] the ticket machine.") - return + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/ticket_machine/proc/reset_cooldown() diff --git a/code/modules/power/apc/apc.dm b/code/modules/power/apc/apc.dm index ffb063c52d4e..1930d516bf74 100644 --- a/code/modules/power/apc/apc.dm +++ b/code/modules/power/apc/apc.dm @@ -237,24 +237,23 @@ if(isAntag(user)) . += "An APC can be emagged to unlock it, this will keep it in it's refresh state, making very obvious something is wrong." -//attack with an item - open/close cover, insert cell, or (un)lock interface -/obj/machinery/power/apc/attackby__legacy__attackchain(obj/item/W, mob/living/user, params) - +/obj/machinery/power/apc/item_interaction(mob/living/user, obj/item/used, list/modifiers) if(issilicon(user) && get_dist(src, user) > 1) - return attack_hand(user) + attack_hand(user) + return ITEM_INTERACT_COMPLETE - else if(istype(W, /obj/item/stock_parts/cell) && opened) // trying to put a cell inside + else if(istype(used, /obj/item/stock_parts/cell) && opened) // trying to put a cell inside if(cell) to_chat(user, "There is a power cell already installed!") - return + return ITEM_INTERACT_COMPLETE else if(stat & MAINT) to_chat(user, "There is no connector for your power cell!") - return + return ITEM_INTERACT_COMPLETE if(!user.drop_item()) - return - W.forceMove(src) - cell = W + return ITEM_INTERACT_COMPLETE + used.forceMove(src) + cell = used for(var/mob/living/simple_animal/demon/pulse_demon/demon in cell) demon.forceMove(src) @@ -270,90 +269,96 @@ chargecount = 0 update_icon() - else if(W.GetID()) // trying to unlock the interface with an ID card + return ITEM_INTERACT_COMPLETE + else if(used.GetID()) // trying to unlock the interface with an ID card togglelock(user) + return ITEM_INTERACT_COMPLETE - else if(istype(W, /obj/item/stack/cable_coil) && opened) + else if(istype(used, /obj/item/stack/cable_coil) && opened) var/turf/host_turf = get_turf(src) if(!host_turf) throw EXCEPTION("attackby on APC when it's not on a turf") - return + return ITEM_INTERACT_COMPLETE if(host_turf.intact) to_chat(user, "You must remove the floor plating in front of the APC first!") - return + return ITEM_INTERACT_COMPLETE else if(terminal) // it already have terminal to_chat(user, "This APC is already wired!") - return + return ITEM_INTERACT_COMPLETE else if(!has_electronics()) to_chat(user, "There is nothing to wire!") - return + return ITEM_INTERACT_COMPLETE - var/obj/item/stack/cable_coil/C = W + var/obj/item/stack/cable_coil/C = used if(C.get_amount() < 10) to_chat(user, "You need ten lengths of cable for APC!") - return + return ITEM_INTERACT_COMPLETE user.visible_message("[user.name] adds cables to the APC frame.", \ "You start adding cables to the APC frame...") playsound(loc, 'sound/items/deconstruct.ogg', 50, TRUE) if(do_after(user, 20, target = src)) if(C.get_amount() < 10 || !C) - return + return ITEM_INTERACT_COMPLETE if(C.get_amount() >= 10 && !terminal && opened && has_electronics()) var/turf/T = get_turf(src) var/obj/structure/cable/N = T.get_cable_node() if(prob(50) && electrocute_mob(usr, N, N, 1, TRUE)) do_sparks(5, TRUE, src) - return + return ITEM_INTERACT_COMPLETE C.use(10) to_chat(user, "You add cables to the APC frame.") make_terminal() terminal.connect_to_network() - else if(istype(W, /obj/item/apc_electronics) && opened) + return ITEM_INTERACT_COMPLETE + + else if(istype(used, /obj/item/apc_electronics) && opened) if(has_electronics()) // there are already electronicks inside to_chat(user, "You cannot put the board inside, there already is one!") - return + return ITEM_INTERACT_COMPLETE else if(stat & BROKEN) to_chat(user, "You cannot put the board inside, the frame is damaged!") - return + return ITEM_INTERACT_COMPLETE - user.visible_message("[user.name] inserts [W] into [src].", \ - "You start to insert [W] into the frame...") + user.visible_message("[user.name] inserts [used] into [src].", \ + "You start to insert [used] into the frame...") playsound(loc, 'sound/items/deconstruct.ogg', 50, TRUE) if(do_after(user, 10, target = src)) if(!has_electronics()) electronics_state = APC_ELECTRONICS_INSTALLED locked = FALSE - to_chat(user, "You place [W] inside the frame.") - qdel(W) + to_chat(user, "You place [used] inside the frame.") + qdel(used) - else if(istype(W, /obj/item/mounted/frame/apc_frame) && opened) + return ITEM_INTERACT_COMPLETE + + else if(istype(used, /obj/item/mounted/frame/apc_frame) && opened) if(!(stat & BROKEN || opened == APC_COVER_OFF || obj_integrity < max_integrity)) // There is nothing to repair to_chat(user, "You found no reason for repairing this APC.") - return + return ITEM_INTERACT_COMPLETE if(!(stat & BROKEN) && opened == APC_COVER_OFF) // Cover is the only thing broken, we do not need to remove elctronicks to replace cover user.visible_message("[user.name] replaces missing APC's cover.",\ "You begin to replace APC's cover...") if(do_after(user, 20, target = src)) // replacing cover is quicker than replacing whole frame to_chat(user, "You replace missing APC's cover.") - qdel(W) + qdel(used) opened = APC_OPENED update_icon() - return + return ITEM_INTERACT_COMPLETE if(has_electronics()) to_chat(user, "You cannot repair this APC until you remove the electronics still inside!") - return + return ITEM_INTERACT_COMPLETE user.visible_message("[user.name] replaces the damaged APC frame with a new one.",\ "You begin to replace the damaged APC frame...") if(do_after(user, 50, target = src)) to_chat(user, "You replace the damaged APC frame with a new one.") - qdel(W) + qdel(used) stat &= ~BROKEN obj_integrity = max_integrity if(opened == APC_COVER_OFF) opened = APC_OPENED update_icon() - return + return ITEM_INTERACT_COMPLETE else return ..() diff --git a/code/modules/power/cables/terminal.dm b/code/modules/power/cables/terminal.dm index c459f7864ead..23ab1950d556 100644 --- a/code/modules/power/cables/terminal.dm +++ b/code/modules/power/cables/terminal.dm @@ -77,8 +77,9 @@ qdel(src) -/obj/machinery/power/terminal/attackby__legacy__attackchain(obj/item/W, mob/living/user, params) - if(istype(W, /obj/item/wirecutters)) - dismantle(user, W) +/obj/machinery/power/terminal/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/wirecutters)) + dismantle(user, used) + return ITEM_INTERACT_COMPLETE else return ..() diff --git a/code/modules/power/engines/singularity/collector.dm b/code/modules/power/engines/singularity/collector.dm index 4dd7d9110cbe..971b11ff0edd 100644 --- a/code/modules/power/engines/singularity/collector.dm +++ b/code/modules/power/engines/singularity/collector.dm @@ -65,24 +65,23 @@ else disconnect_from_network() - -/obj/machinery/power/rad_collector/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/tank/internals/plasma)) +/obj/machinery/power/rad_collector/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/tank/internals/plasma)) if(!anchored) to_chat(user, "[src] needs to be secured to the floor first.") - return TRUE + return ITEM_INTERACT_COMPLETE if(loaded_tank) to_chat(user, "There's already a plasma tank loaded.") - return TRUE + return ITEM_INTERACT_COMPLETE if(user.drop_item()) - loaded_tank = I - I.forceMove(src) + loaded_tank = used + used.forceMove(src) update_icons() - else if(I.tool_behaviour == TOOL_CROWBAR) + else if(used.tool_behaviour == TOOL_CROWBAR) if(loaded_tank && !locked) eject() - return TRUE - else if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda)) + return ITEM_INTERACT_COMPLETE + else if(istype(used, /obj/item/card/id) || istype(used, /obj/item/pda)) if(allowed(user)) if(active) locked = !locked @@ -92,7 +91,8 @@ to_chat(user, "The controls can only be locked when [src] is active") else to_chat(user, "Access denied!") - return TRUE + + return ITEM_INTERACT_COMPLETE else return ..() diff --git a/code/modules/power/engines/singularity/containment_field.dm b/code/modules/power/engines/singularity/containment_field.dm index cfec3f374779..6fdb50dfb3a8 100644 --- a/code/modules/power/engines/singularity/containment_field.dm +++ b/code/modules/power/engines/singularity/containment_field.dm @@ -35,9 +35,9 @@ shock_field(user) return 1 -/obj/machinery/field/containment/attackby__legacy__attackchain(obj/item/W, mob/user, params) +/obj/machinery/field/containment/item_interaction(mob/living/user, obj/item/used, list/modifiers) shock(user) - return TRUE + return ITEM_INTERACT_COMPLETE /obj/machinery/field/containment/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) diff --git a/code/modules/power/engines/singularity/emitter.dm b/code/modules/power/engines/singularity/emitter.dm index 1e1af0ed3ecb..0e3d79c6f7f3 100644 --- a/code/modules/power/engines/singularity/emitter.dm +++ b/code/modules/power/engines/singularity/emitter.dm @@ -146,17 +146,17 @@ if(!anchored) step(src, get_dir(M, src)) -/obj/machinery/power/emitter/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(!istype(I, /obj/item/card/id) && !istype(I, /obj/item/pda)) +/obj/machinery/power/emitter/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(!istype(used, /obj/item/card/id) && !istype(used, /obj/item/pda)) return ..() if(emagged) to_chat(user, "The lock seems to be broken.") - return + return ITEM_INTERACT_COMPLETE if(!allowed(user)) to_chat(user, "Access denied.") - return + return ITEM_INTERACT_COMPLETE if(active) locked = !locked @@ -165,6 +165,8 @@ locked = FALSE //just in case it somehow gets locked to_chat(user, "The controls can only be locked when [src] is online!") + return ITEM_INTERACT_COMPLETE + /obj/machinery/power/emitter/wrench_act(mob/living/user, obj/item/I) . = TRUE if(active) diff --git a/code/modules/power/engines/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/engines/singularity/particle_accelerator/particle_accelerator.dm index a64c70fd5362..e86ef93bc538 100644 --- a/code/modules/power/engines/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/engines/singularity/particle_accelerator/particle_accelerator.dm @@ -241,18 +241,19 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin return dir = turn(dir, 270) -/obj/machinery/particle_accelerator/attackby__legacy__attackchain(obj/item/W, mob/user, params) - if(!iscoil(W)) +/obj/machinery/particle_accelerator/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(!iscoil(used)) return ..() if(construction_state == ACCELERATOR_WRENCHED) - var/obj/item/stack/cable_coil/C = W + var/obj/item/stack/cable_coil/C = used if(C.use(1)) playsound(loc, C.usesound, 50, 1) - user.visible_message("[user] adds wires to [src].", \ - "You add some wires.") + user.visible_message("[user] adds wires to [src].", "You add some wires.") construction_state = ACCELERATOR_WIRED update_icon() + return ITEM_INTERACT_COMPLETE + /obj/machinery/particle_accelerator/screwdriver_act(mob/user, obj/item/I) if(construction_state != ACCELERATOR_WIRED && construction_state != ACCELERATOR_READY) return diff --git a/code/modules/power/engines/supermatter/supermatter.dm b/code/modules/power/engines/supermatter/supermatter.dm index 211be3cdf4d2..7fdd380583bd 100644 --- a/code/modules/power/engines/supermatter/supermatter.dm +++ b/code/modules/power/engines/supermatter/supermatter.dm @@ -787,22 +787,22 @@ playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, TRUE) Consume(nom) -/obj/machinery/atmospherics/supermatter_crystal/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) - if(!istype(I) || (I.flags & ABSTRACT) || !istype(user)) - return - if(moveable && default_unfasten_wrench(user, I, time = 20)) - return +/obj/machinery/atmospherics/supermatter_crystal/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(!istype(used) || (used.flags & ABSTRACT) || !istype(user)) + return ITEM_INTERACT_COMPLETE + if(moveable && default_unfasten_wrench(user, used, time = 20)) + return ITEM_INTERACT_COMPLETE - if(istype(I, /obj/item/scalpel/supermatter)) + if(istype(used, /obj/item/scalpel/supermatter)) if(!ishuman(user)) - return + return ITEM_INTERACT_COMPLETE var/mob/living/carbon/human/H = user - var/obj/item/scalpel/supermatter/scalpel = I + var/obj/item/scalpel/supermatter/scalpel = used if(!scalpel.uses_left) to_chat(H, "[scalpel] isn't sharp enough to carve a sliver off of [src]!") - return + return ITEM_INTERACT_COMPLETE var/obj/item/nuke_core/supermatter_sliver/sliver = carve_sliver(H) if(sliver) @@ -819,20 +819,20 @@ tongs.item_state = "supermatter_tongs_loaded" to_chat(H, "You pick up [sliver] with [tongs]!") - return + return ITEM_INTERACT_COMPLETE - if(istype(I, /obj/item/supermatter_halberd)) + if(istype(used, /obj/item/supermatter_halberd)) carve_sliver(user) - return + return ITEM_INTERACT_COMPLETE - if(istype(I, /obj/item/retractor/supermatter)) - to_chat(user, "[I] bounces off [src], you need to cut a sliver off first!") + if(istype(used, /obj/item/retractor/supermatter)) + to_chat(user, "[used] bounces off [src], you need to cut a sliver off first!") else if(user.drop_item()) - user.visible_message("As [user] touches [src] with \a [I], silence fills the room...",\ - "You touch [src] with [I], and everything suddenly goes silent.\n[I] flashes into dust as you flinch away from [src].",\ + user.visible_message("As [user] touches [src] with \a [used], silence fills the room...",\ + "You touch [src] with [used], and everything suddenly goes silent.\n[used] flashes into dust as you flinch away from [src].",\ "Everything suddenly goes silent.") - investigate_log("has been attacked ([I]) by [key_name(user)]", "supermatter") - Consume(I) + investigate_log("has been attacked ([used]) by [key_name(user)]", "supermatter") + Consume(used) playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, TRUE) radiation_pulse(src, 150, 4) diff --git a/code/modules/power/engines/tesla/coil.dm b/code/modules/power/engines/tesla/coil.dm index 93078385b0bc..5bf6cf406a94 100644 --- a/code/modules/power/engines/tesla/coil.dm +++ b/code/modules/power/engines/tesla/coil.dm @@ -43,11 +43,12 @@ if(in_range(user, src) || isobserver(user)) . += "The status display reads: Power generation at [input_power_multiplier*100]%.
    Shock interval at [zap_cooldown*0.1] seconds.
    " -/obj/machinery/power/tesla_coil/attackby__legacy__attackchain(obj/item/W, mob/user, params) - if(istype(W, /obj/item/assembly/signaler) && panel_open) +/obj/machinery/power/tesla_coil/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/assembly/signaler) && panel_open) wires.Interact(user) - else - return ..() + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/power/tesla_coil/crowbar_act(mob/user, obj/item/I) . = TRUE @@ -129,9 +130,11 @@ component_parts += new /obj/item/stock_parts/capacitor(null) RefreshParts() -/obj/machinery/power/grounding_rod/attackby__legacy__attackchain(obj/item/W, mob/user, params) - if(exchange_parts(user, W)) - return +/obj/machinery/power/grounding_rod/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(exchange_parts(user, used)) + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/power/grounding_rod/screwdriver_act(mob/user, obj/item/I) . = TRUE diff --git a/code/modules/power/generators/portable generators/pacman.dm b/code/modules/power/generators/portable generators/pacman.dm index 12705003760b..ee7a0c89c8af 100644 --- a/code/modules/power/generators/portable generators/pacman.dm +++ b/code/modules/power/generators/portable generators/pacman.dm @@ -191,19 +191,19 @@ emagged = TRUE return TRUE -/obj/machinery/power/port_gen/pacman/attackby__legacy__attackchain(obj/item/O as obj, mob/user as mob) - if(istype(O, sheet_path)) - var/obj/item/stack/addstack = O +/obj/machinery/power/port_gen/pacman/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, sheet_path)) + var/obj/item/stack/addstack = used var/amount = min((max_sheets - sheets), addstack.amount) if(amount < 1) to_chat(user, "[src] is full!") - return + return ITEM_INTERACT_COMPLETE to_chat(user, "You add [amount] sheet\s to [src].") sheets += amount addstack.use(amount) SStgui.update_uis(src) - return + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/modules/power/generators/treadmill.dm b/code/modules/power/generators/treadmill.dm index f57b6ee3b4f3..1fe399551f04 100644 --- a/code/modules/power/generators/treadmill.dm +++ b/code/modules/power/generators/treadmill.dm @@ -110,12 +110,13 @@ spawn(100) stat &= ~BROKEN -/obj/machinery/power/treadmill/attackby__legacy__attackchain(obj/item/W, mob/user) - if(default_unfasten_wrench(user, W, time = 60)) +/obj/machinery/power/treadmill/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(default_unfasten_wrench(user, used, time = 60)) on_anchor_changed() speed = 0 update_icon() - return + return ITEM_INTERACT_COMPLETE + return ..() #undef BASE_MOVE_DELAY diff --git a/code/modules/power/generators/turbine.dm b/code/modules/power/generators/turbine.dm index 0b15beb5fbc6..6c74a82fbab4 100644 --- a/code/modules/power/generators/turbine.dm +++ b/code/modules/power/generators/turbine.dm @@ -126,8 +126,8 @@ E += M.rating efficiency = E / 6 -/obj/machinery/power/compressor/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(default_change_direction_wrench(user, I)) +/obj/machinery/power/compressor/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(default_change_direction_wrench(user, used)) turbine = null inturf = get_step(src, dir) locate_machinery() @@ -137,7 +137,8 @@ else to_chat(user, "Turbine not connected.") stat |= BROKEN - return + + return ITEM_INTERACT_COMPLETE return ..() @@ -328,11 +329,11 @@ return . += image(icon, "turb-o", FLY_LAYER) -/obj/machinery/power/turbine/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(default_deconstruction_screwdriver(user, initial(icon_state), initial(icon_state), I)) - return +/obj/machinery/power/turbine/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(default_deconstruction_screwdriver(user, initial(icon_state), initial(icon_state), used)) + return ITEM_INTERACT_COMPLETE - if(default_change_direction_wrench(user, I)) + if(default_change_direction_wrench(user, used)) compressor = null outturf = get_step(src, dir) locate_machinery() @@ -342,10 +343,10 @@ else to_chat(user, "Compressor not connected.") stat |= BROKEN - return + return ITEM_INTERACT_COMPLETE - if(default_deconstruction_crowbar(user, I)) - return + if(default_deconstruction_crowbar(user, used)) + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 7a21e52a42b7..22fd1e4aa4d9 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -152,18 +152,22 @@ GLOBAL_LIST_EMPTY(gravity_generators) update_icon() // Step 2 -/obj/machinery/gravity_generator/main/attackby__legacy__attackchain(obj/item/I, mob/user, params) +/obj/machinery/gravity_generator/main/item_interaction(mob/living/user, obj/item/used, list/modifiers) if(construction_state != GRAV_NEEDS_PLASTEEL) return ..() - if(istype(I, /obj/item/stack/sheet/plasteel)) - var/obj/item/stack/sheet/plasteel/PS = I + + if(istype(used, /obj/item/stack/sheet/plasteel)) + var/obj/item/stack/sheet/plasteel/PS = used if(PS.amount < 10) to_chat(user, "You need 10 sheets of plasteel.") - return + return ITEM_INTERACT_COMPLETE to_chat(user, "You add new plating to the framework.") construction_state = GRAV_NEEDS_WRENCH update_icon() + return ITEM_INTERACT_COMPLETE + + return ..() // Step 3 /obj/machinery/gravity_generator/main/wrench_act(mob/living/user, obj/item/I) diff --git a/code/modules/power/lights.dm b/code/modules/power/lights.dm index b87ba144a7b7..a253d77d6d83 100644 --- a/code/modules/power/lights.dm +++ b/code/modules/power/lights.dm @@ -96,19 +96,19 @@ transfer_fingerprints_to(newlight) qdel(src) -/obj/machinery/light_construct/attackby__legacy__attackchain(obj/item/W, mob/living/user, params) +/obj/machinery/light_construct/item_interaction(mob/living/user, obj/item/used, list/modifiers) add_fingerprint(user) - if(istype(W, /obj/item/stack/cable_coil)) + if(istype(used, /obj/item/stack/cable_coil)) if(stage != LIGHT_CONSTRUCT_EMPTY_FRAME) - return - var/obj/item/stack/cable_coil/coil = W + return ITEM_INTERACT_COMPLETE + var/obj/item/stack/cable_coil/coil = used coil.use(1) stage = LIGHT_CONSTRUCT_WIRED update_icon(UPDATE_ICON_STATE) playsound(loc, coil.usesound, 50, 1) user.visible_message("[user.name] adds wires to [src].", \ "You add wires to [src].", "You hear a noise.") - return + return ITEM_INTERACT_COMPLETE return ..() @@ -593,22 +593,22 @@ // attack with item - insert light (if right type), otherwise try to break the light -/obj/machinery/light/attackby__legacy__attackchain(obj/item/W, mob/living/user, params) +/obj/machinery/light/item_interaction(mob/living/user, obj/item/used, list/modifiers) user.changeNext_move(CLICK_CD_MELEE) // This is an ugly hack and I hate it forever //Light replacer code - if(istype(W, /obj/item/lightreplacer)) - var/obj/item/lightreplacer/LR = W + if(istype(used, /obj/item/lightreplacer)) + var/obj/item/lightreplacer/LR = used LR.ReplaceLight(src, user) - return + return ITEM_INTERACT_COMPLETE // Attack with Spray Can! Coloring time. - if(istype(W, /obj/item/toy/crayon/spraycan)) - var/obj/item/toy/crayon/spraycan/spraycan = W + if(istype(used, /obj/item/toy/crayon/spraycan)) + var/obj/item/toy/crayon/spraycan/spraycan = used // quick check to disable capped spraypainting, aesthetic reasons if(spraycan.capped) to_chat(user, "You can't spraypaint [src] with the cap still on!") - return + return ITEM_INTERACT_COMPLETE var/list/hsl = rgb2hsl(hex2num(copytext(spraycan.colour, 2, 4)), hex2num(copytext(spraycan.colour, 4, 6)), hex2num(copytext(spraycan.colour, 6, 8))) hsl[3] = max(hsl[3], 0.4) var/list/rgb = hsl2rgb(arglist(hsl)) @@ -617,15 +617,15 @@ to_chat(user, "You change [src]'s light bulb color.") brightness_color = new_color update(TRUE, TRUE, FALSE) - return + return ITEM_INTERACT_COMPLETE // attempt to insert light - if(istype(W, /obj/item/light)) + if(istype(used, /obj/item/light)) if(status != LIGHT_EMPTY) to_chat(user, "There is a [fitting] already inserted.") else add_fingerprint(user) - var/obj/item/light/L = W + var/obj/item/light/L = used if(istype(L, light_type)) status = L.status to_chat(user, "You insert [L].") @@ -649,18 +649,18 @@ explode() else to_chat(user, "This type of light requires a [fitting].") - return + return ITEM_INTERACT_COMPLETE // attempt to break the light //If xenos decide they want to smash a light bulb with a toolbox, who am I to stop them? /N if(status != LIGHT_BROKEN && status != LIGHT_EMPTY) user.do_attack_animation(src) - if(prob(1 + W.force * 5)) + if(prob(1 + used.force * 5)) user.visible_message("[user] smashed the light!", "You hit the light, and it smashes!", \ "You hear the tinkle of breaking glass.") - if(on && (W.flags & CONDUCT)) + if(on && (used.flags & CONDUCT)) if(prob(12)) electrocute_mob(user, get_area(src), src, 0.3, TRUE) break_light_tube() @@ -668,18 +668,20 @@ user.visible_message("[user] hits the light.", "You hit the light.", \ "You hear someone hitting a light.") playsound(loc, 'sound/effects/glasshit.ogg', 75, 1) - return + + return ITEM_INTERACT_COMPLETE // attempt to stick weapon into light socket if(status == LIGHT_EMPTY) - if(has_power() && (W.flags & CONDUCT)) + if(has_power() && (used.flags & CONDUCT)) do_sparks(3, 1, src) if(prob(75)) // If electrocuted electrocute_mob(user, get_area(src), src, rand(0.7, 1), TRUE) to_chat(user, "You are electrocuted by [src]!") else // If not electrocuted - to_chat(user, "You stick [W] into the light socket!") - return + to_chat(user, "You stick [used] into the light socket!") + + return ITEM_INTERACT_COMPLETE return ..() @@ -712,12 +714,14 @@ transfer_fingerprints_to(newlight) qdel(src) -/obj/machinery/light/attacked_by__legacy__attackchain(obj/item/I, mob/living/user) - ..() +/obj/machinery/light/item_interaction(mob/living/user, obj/item/used, list/modifiers) if(status == LIGHT_BROKEN || status == LIGHT_EMPTY) - if(on && (I.flags & CONDUCT)) + if(on && (used.flags & CONDUCT)) if(prob(12)) electrocute_mob(user, get_area(src), src, 0.3, TRUE) + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/light/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) . = ..() diff --git a/code/modules/power/power_machine.dm b/code/modules/power/power_machine.dm index 4f3903da067a..76f7bf4139a4 100644 --- a/code/modules/power/power_machine.dm +++ b/code/modules/power/power_machine.dm @@ -76,17 +76,18 @@ // attach a wire to a power machine - leads from the turf you are standing on //almost never called, overwritten by all power machines but terminal and generator -/obj/machinery/power/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/stack/cable_coil)) - var/obj/item/stack/cable_coil/coil = I +/obj/machinery/power/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/stack/cable_coil)) + var/obj/item/stack/cable_coil/coil = used var/turf/T = user.loc if(T.intact || !isfloorturf(T)) - return + return ITEM_INTERACT_COMPLETE if(get_dist(src, user) > 1) - return + return ITEM_INTERACT_COMPLETE coil.place_turf(T, user) - else - return ..() + return ITEM_INTERACT_COMPLETE + + return ..() //////////////////////////////////////////////// diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index fd247fe44eaf..b9583b065bdc 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -102,14 +102,14 @@ if(charge_level > 0) . += "smes-og[charge_level]" -/obj/machinery/power/smes/attackby__legacy__attackchain(obj/item/I, mob/user, params) +/obj/machinery/power/smes/item_interaction(mob/living/user, obj/item/used, list/modifiers) // Opening using screwdriver - if(default_deconstruction_screwdriver(user, "[initial(icon_state)]-o", initial(icon_state), I)) + if(default_deconstruction_screwdriver(user, "[initial(icon_state)]-o", initial(icon_state), used)) update_icon() - return + return ITEM_INTERACT_COMPLETE // Changing direction using wrench - if(default_change_direction_wrench(user, I)) + if(default_change_direction_wrench(user, used)) terminal = null var/turf/T = get_step(src, dir) for(var/obj/machinery/power/terminal/term in T) @@ -120,38 +120,38 @@ break if(!terminal) to_chat(user, "No power source found.") - return + return ITEM_INTERACT_COMPLETE stat &= ~BROKEN update_icon() - return + return ITEM_INTERACT_COMPLETE // Building and linking a terminal - if(istype(I, /obj/item/stack/cable_coil)) + if(istype(used, /obj/item/stack/cable_coil)) var/dir = get_dir(user, src) if(dir & (dir - 1)) // Checks for diagonal interaction - return + return ITEM_INTERACT_COMPLETE if(terminal) // Checks for an existing terminal to_chat(user, "This SMES already has a power terminal!") - return + return ITEM_INTERACT_COMPLETE if(!panel_open) // Checks to see if the panel is closed to_chat(user, "You must open the maintenance panel first!") - return + return ITEM_INTERACT_COMPLETE var/turf/T = get_turf(user) if(T.intact) // Checks to see if floor plating is present to_chat(user, "You must first remove the floor plating!") - return + return ITEM_INTERACT_COMPLETE - var/obj/item/stack/cable_coil/C = I + var/obj/item/stack/cable_coil/C = used if(C.get_amount() < 10) to_chat(user, "You need more wires.") - return + return ITEM_INTERACT_COMPLETE if(user.loc == loc) to_chat(user, "You must not be on the same tile as [src].") - return + return ITEM_INTERACT_COMPLETE // Direction the terminal will face to var/temporary_direction = get_dir(user, src) @@ -164,12 +164,12 @@ if(isspaceturf(temporary_location)) to_chat(user, "You can't build a terminal on space.") - return + return ITEM_INTERACT_COMPLETE else if(istype(temporary_location)) if(temporary_location.intact) to_chat(user, "You must remove the floor plating first.") - return + return ITEM_INTERACT_COMPLETE to_chat(user, "You start adding cable to [src].") playsound(loc, C.usesound, 50, TRUE) @@ -190,23 +190,23 @@ make_terminal(user, temporary_direction, temporary_location) terminal.connect_to_network() stat &= ~BROKEN - return + return ITEM_INTERACT_COMPLETE // Disassembling the terminal - if(istype(I, /obj/item/wirecutters) && terminal && panel_open) + if(istype(used, /obj/item/wirecutters) && terminal && panel_open) var/turf/T = get_turf(terminal) if(T.intact) //is the floor plating removed ? to_chat(user, "You must first expose the power terminal!") - return + return ITEM_INTERACT_COMPLETE to_chat(user, "You begin to dismantle the power terminal...") - playsound(src.loc, I.usesound, 50, TRUE) + playsound(src.loc, used.usesound, 50, TRUE) - if(do_after(user, 5 SECONDS * I.toolspeed, target = src)) + if(do_after(user, 5 SECONDS * used.toolspeed, target = src)) if(terminal && panel_open) if(prob(50) && electrocute_mob(usr, terminal.powernet, terminal, 1, TRUE)) // Animate the electrocution if uncautious and unlucky do_sparks(5, TRUE, src) - return + return ITEM_INTERACT_COMPLETE // Returns wires on deletion of the terminal new /obj/item/stack/cable_coil(T, 10) @@ -215,11 +215,11 @@ "You cut the cables and dismantle the power terminal.") inputting = FALSE // Set input FALSE when the terminal no longer exists qdel(terminal) - return + return ITEM_INTERACT_COMPLETE // Crowbarring it ! - if(default_deconstruction_crowbar(user, I)) - return + if(default_deconstruction_crowbar(user, used)) + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/modules/projectiles/guns/chaos_bolt.dm b/code/modules/projectiles/guns/chaos_bolt.dm index e53e3510adaf..6f56dacd7d0a 100644 --- a/code/modules/projectiles/guns/chaos_bolt.dm +++ b/code/modules/projectiles/guns/chaos_bolt.dm @@ -148,7 +148,7 @@ explosion(get_turf(H), 1, 1, 1, cause = "staff of chaos lethal explosion effect") if("cheese morphed") H.visible_message("[H] transforms into cheese!", "You've been transformed into cheese!") - new /obj/item/food/cheesewedge(get_turf(H)) + new /obj/item/food/sliced/cheesewedge(get_turf(H)) qdel(H) if("supermattered") var/obj/machinery/atmospherics/supermatter_crystal/supercrystal = GLOB.main_supermatter_engine @@ -323,7 +323,7 @@ if("toy revolver") item_to_summon = /obj/item/gun/projectile/revolver/capgun/chaosprank if("cheese") - item_to_summon = /obj/item/food/cheesewedge + item_to_summon = /obj/item/food/sliced/cheesewedge explosion_amount = rand(5, 10) if("food") target.visible_message("Food scatters around [target]!", "A bunch of food scatters around you!") diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index c96ea19803e3..d5c6664fa692 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -234,35 +234,35 @@ add_fingerprint(usr) -/obj/machinery/chem_dispenser/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/storage/part_replacer)) +/obj/machinery/chem_dispenser/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/storage/part_replacer)) . = ..() SStgui.update_uis(src) - return + return ITEM_INTERACT_COMPLETE - if((istype(I, /obj/item/reagent_containers/glass) || istype(I, /obj/item/reagent_containers/drinks)) && user.a_intent != INTENT_HARM) + if((istype(used, /obj/item/reagent_containers/glass) || istype(used, /obj/item/reagent_containers/drinks)) && user.a_intent != INTENT_HARM) if(panel_open) to_chat(user, "Close the maintenance panel first.") - return + return ITEM_INTERACT_COMPLETE if(!user.drop_item()) - to_chat(user, "[I] is stuck to you!") - return + to_chat(user, "[used] is stuck to you!") + return ITEM_INTERACT_COMPLETE - I.forceMove(src) + used.forceMove(src) if(beaker) - to_chat(usr, "You swap [I] with [beaker].") + to_chat(usr, "You swap [used] with [beaker].") if(Adjacent(usr) && !issilicon(usr)) //Prevents telekinesis from putting in hand user.put_in_hands(beaker) else beaker.forceMove(loc) else - to_chat(user, "You set [I] on the machine.") - beaker = I + to_chat(user, "You set [used] on the machine.") + beaker = used SStgui.update_uis(src) // update all UIs attached to src update_icon(UPDATE_ICON_STATE) - return + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm index ecfb026025bf..e70641c9b119 100644 --- a/code/modules/reagents/chemistry/machinery/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -62,22 +62,22 @@ else stat |= NOPOWER -/obj/machinery/chem_heater/attackby__legacy__attackchain(obj/item/I, mob/user) - if(istype(I, /obj/item/reagent_containers/glass) && user.a_intent != INTENT_HARM) +/obj/machinery/chem_heater/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/reagent_containers/glass) && user.a_intent != INTENT_HARM) if(beaker) to_chat(user, "A beaker is already loaded into the machine.") - return + return ITEM_INTERACT_COMPLETE if(!user.drop_item()) - to_chat(user, "[I] is stuck to you!") - return + to_chat(user, "[used] is stuck to you!") + return ITEM_INTERACT_COMPLETE - beaker = I - I.forceMove(src) + beaker = used + used.forceMove(src) to_chat(user, "You add the beaker to the machine!") icon_state = "mixer1b" SStgui.update_uis(src) - return + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 8aba2a20252f..8c138aec169e 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -114,45 +114,49 @@ return update_icon() -/obj/machinery/chem_master/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/storage/part_replacer)) +/obj/machinery/chem_master/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/storage/part_replacer)) return ..() if(panel_open) to_chat(user, "You can't use [src] while it's panel is opened!") - return TRUE + return ITEM_INTERACT_COMPLETE - if((istype(I, /obj/item/reagent_containers/glass) || istype(I, /obj/item/reagent_containers/drinks/drinkingglass)) && user.a_intent != INTENT_HARM) + if((istype(used, /obj/item/reagent_containers/glass) || istype(used, /obj/item/reagent_containers/drinks/drinkingglass)) && user.a_intent != INTENT_HARM) if(!user.drop_item()) - to_chat(user, "[I] is stuck to you!") - return + to_chat(user, "[used] is stuck to you!") + return ITEM_INTERACT_COMPLETE - I.forceMove(src) + used.forceMove(src) if(beaker) - to_chat(usr, "You swap [I] with [beaker] inside.") + to_chat(usr, "You swap [used] with [beaker] inside.") if(Adjacent(usr) && !issilicon(usr)) //Prevents telekinesis from putting in hand user.put_in_hands(beaker) else beaker.forceMove(loc) else - to_chat(user, "You add [I] to the machine.") - beaker = I + to_chat(user, "You add [used] to the machine.") + beaker = used SStgui.update_uis(src) update_icon() - else if(istype(I, /obj/item/storage/pill_bottle)) + return ITEM_INTERACT_COMPLETE + + else if(istype(used, /obj/item/storage/pill_bottle)) if(loaded_pill_bottle) to_chat(user, "A [loaded_pill_bottle] is already loaded into the machine.") - return + return ITEM_INTERACT_COMPLETE if(!user.drop_item()) - to_chat(user, "[I] is stuck to you!") - return + to_chat(user, "[used] is stuck to you!") + return ITEM_INTERACT_COMPLETE - loaded_pill_bottle = I - I.forceMove(src) - to_chat(user, "You add [I] into the dispenser slot!") + loaded_pill_bottle = used + used.forceMove(src) + to_chat(user, "You add [used] into the dispenser slot!") SStgui.update_uis(src) + return ITEM_INTERACT_COMPLETE + else return ..() diff --git a/code/modules/reagents/chemistry/machinery/pandemic.dm b/code/modules/reagents/chemistry/machinery/pandemic.dm index 6c48a64024e3..1151e4e24648 100644 --- a/code/modules/reagents/chemistry/machinery/pandemic.dm +++ b/code/modules/reagents/chemistry/machinery/pandemic.dm @@ -383,24 +383,26 @@ /obj/machinery/computer/pandemic/attack_ghost(mob/user) ui_interact(user) -/obj/machinery/computer/pandemic/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(default_unfasten_wrench(user, I, time = 4 SECONDS)) +/obj/machinery/computer/pandemic/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(default_unfasten_wrench(user, used, time = 4 SECONDS)) power_change() return - if((istype(I, /obj/item/reagent_containers) && (I.container_type & OPENCONTAINER)) && user.a_intent != INTENT_HARM) + if((istype(used, /obj/item/reagent_containers) && (used.container_type & OPENCONTAINER)) && user.a_intent != INTENT_HARM) if(stat & (NOPOWER|BROKEN)) - return + return ITEM_INTERACT_COMPLETE if(beaker) to_chat(user, "A beaker is already loaded into the machine!") - return + return ITEM_INTERACT_COMPLETE if(!user.drop_item()) - return + return ITEM_INTERACT_COMPLETE - beaker = I + beaker = used beaker.loc = src to_chat(user, "You add the beaker to the machine.") SStgui.update_uis(src, TRUE) icon_state = "pandemic1" + + return ITEM_INTERACT_COMPLETE else return ..() diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm index 77cbb7b36112..47081c7aca9b 100644 --- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm +++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm @@ -70,7 +70,7 @@ /obj/item/food/grown/citrus/orange = list("orangejuice" = 0), /obj/item/food/grown/citrus/lime = list("limejuice" = 0), /obj/item/food/grown/watermelon = list("watermelonjuice" = 0), - /obj/item/food/watermelonslice = list("watermelonjuice" = 0), + /obj/item/food/sliced/watermelon = list("watermelonjuice" = 0), /obj/item/food/grown/berries/poison = list("poisonberryjuice" = 0), /obj/item/food/grown/pumpkin/blumpkin = list("blumpkinjuice" = 0), // Order is important here as blumpkin is a subtype of pumpkin, if switched blumpkins will produce pumpkin juice /obj/item/food/grown/pumpkin = list("pumpkinjuice" = 0), @@ -157,44 +157,44 @@ return default_unfasten_wrench(user, I) -/obj/machinery/reagentgrinder/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/storage/part_replacer)) - ..() +/obj/machinery/reagentgrinder/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/storage/part_replacer)) + . = ..() SStgui.update_uis(src) - return + return ITEM_INTERACT_COMPLETE - if((istype(I, /obj/item/reagent_containers) && (I.container_type & OPENCONTAINER)) && user.a_intent != INTENT_HARM) + if((istype(used, /obj/item/reagent_containers) && (used.container_type & OPENCONTAINER)) && user.a_intent != INTENT_HARM) if(beaker) to_chat(user, "There's already a container inside.") else if(panel_open) to_chat(user, "Close the maintenance panel first.") else if(!user.drop_item()) - return FALSE + return ITEM_INTERACT_COMPLETE - beaker = I + beaker = used beaker.loc = src update_icon(UPDATE_ICON_STATE) SStgui.update_uis(src) - return TRUE // No afterattack + return ITEM_INTERACT_COMPLETE - if(is_type_in_list(I, dried_items)) - if(istype(I, /obj/item/food/grown)) - var/obj/item/food/grown/G = I + if(is_type_in_list(used, dried_items)) + if(istype(used, /obj/item/food/grown)) + var/obj/item/food/grown/G = used if(!G.dry) to_chat(user, "You must dry that first!") - return FALSE + return ITEM_INTERACT_COMPLETE if(length(holdingitems) >= limit) to_chat(usr, "The machine cannot hold anymore items.") - return FALSE + return ITEM_INTERACT_COMPLETE // Fill machine with a bag! - if(istype(I, /obj/item/storage/bag)) - var/obj/item/storage/bag/B = I + if(istype(used, /obj/item/storage/bag)) + var/obj/item/storage/bag/B = used if(!length(B.contents)) to_chat(user, "[B] is empty.") - return FALSE + return ITEM_INTERACT_COMPLETE var/original_contents_len = length(B.contents) @@ -208,7 +208,7 @@ if(length(B.contents) == original_contents_len) to_chat(user, "Nothing in [B] can be put into the All-In-One grinder.") - return FALSE + return ITEM_INTERACT_COMPLETE else if(!length(B.contents)) to_chat(user, "You empty all of [B]'s contents into the All-In-One grinder.") @@ -216,20 +216,22 @@ to_chat(user, "You empty some of [B]'s contents into the All-In-One grinder.") SStgui.update_uis(src) - return TRUE + return ITEM_INTERACT_COMPLETE - if(!is_type_in_list(I, blend_items) && !is_type_in_list(I, juice_items)) + if(!is_type_in_list(used, blend_items) && !is_type_in_list(used, juice_items)) if(user.a_intent == INTENT_HARM) return ..() else to_chat(user, "Cannot refine into a reagent!") - return TRUE + return ITEM_INTERACT_COMPLETE if(user.drop_item()) - I.loc = src - holdingitems += I + used.loc = src + holdingitems += used SStgui.update_uis(src) - return FALSE + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/reagentgrinder/attack_ai(mob/user) return FALSE diff --git a/code/modules/reagents/chemistry/reagents/food_reagents.dm b/code/modules/reagents/chemistry/reagents/food_reagents.dm index f97531602bdc..0e3ca91f16e3 100644 --- a/code/modules/reagents/chemistry/reagents/food_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/food_reagents.dm @@ -635,7 +635,7 @@ /datum/reagent/consumable/cheese/reaction_turf(turf/T, volume) if(volume >= 5 && !isspaceturf(T)) - new /obj/item/food/cheesewedge/presliced(T) + new /obj/item/food/sliced/cheesewedge/presliced(T) /datum/reagent/consumable/fake_cheese name = "Cheese substitute" @@ -925,7 +925,7 @@ /datum/reagent/consumable/bread/reaction_turf(turf/T, volume) if(volume >= 5 && !isspaceturf(T)) - new /obj/item/food/breadslice(T) + new /obj/item/food/sliced/bread(T) /datum/reagent/soap name = "Soap" diff --git a/code/modules/reagents/chemistry/reagents/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm index 1c7dfebce304..8c166fc97695 100644 --- a/code/modules/reagents/chemistry/reagents/medicine.dm +++ b/code/modules/reagents/chemistry/reagents/medicine.dm @@ -969,41 +969,27 @@ if(iscarbon(M)) if(method == REAGENT_INGEST || (method == REAGENT_TOUCH && prob(25))) if(M.stat == DEAD) + if(M.suiciding) // Feedback if the player suicided. + M.visible_message("[M] twitches slightly, but appears to have no will to live!") + return + if(HAS_TRAIT(M, TRAIT_HUSK) || HAS_TRAIT(M, TRAIT_BADDNA)) // Feedback if the body is husked or has bad DNA. + M.visible_message("[M] twitches slightly, but is otherwise unresponsive!") + return if(M.getBruteLoss() + M.getFireLoss() + M.getCloneLoss() >= 150) - if(IS_CHANGELING(M) || HAS_TRAIT(M, TRAIT_I_WANT_BRAINS)) + if(IS_CHANGELING(M) || HAS_TRAIT(M, TRAIT_I_WANT_BRAINS) || !M.ghost_can_reenter()) + M.visible_message("[M] twitches slightly, but nothing happens.") return M.delayed_gib(TRUE) return - if(!M.ghost_can_reenter()) - M.visible_message("[M] twitches slightly, but is otherwise unresponsive!") - return + M.visible_message("[M]'s body begins to twitch as the Lazarus Reagent takes effect!") + M.do_jitter_animation(300) // Visual feedback of lazarus working. + var/mob/dead/observer/G = M.get_ghost() + if(G) + to_chat(G, "Lazarus Reagent is attempting to revive your body. Re-enter your body to be revived! (Verbs -> Ghost -> Re-enter corpse)") + window_flash(G.client) + SEND_SOUND(G, sound('sound/effects/genetics.ogg')) + addtimer(CALLBACK(M, TYPE_PROC_REF(/mob/living/carbon, lazrevival), M), 5 SECONDS) // same time as the defib to keep things consistant. - if(!M.suiciding && !HAS_TRAIT(M, TRAIT_HUSK) && !HAS_TRAIT(M, TRAIT_BADDNA)) - M.visible_message("[M] seems to rise from the dead!") - M.adjustCloneLoss(50) - M.setOxyLoss(0) - M.adjustBruteLoss(rand(0, 15)) - M.adjustToxLoss(rand(0, 15)) - M.adjustFireLoss(rand(0, 15)) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - var/necrosis_prob = 15 * H.decaylevel - H.decaylevel = 0 - for(var/obj/item/organ/O in (H.bodyparts | H.internal_organs)) - // Per non-vital body part: - // 15% * H.decaylevel (1 to 4) - // Min of 0%, Max of 60% - if(prob(necrosis_prob) && !O.is_robotic() && !O.vital) - // side effects may include: Organ failure - O.necrotize(FALSE) - if(O.status & ORGAN_DEAD) - O.germ_level = INFECTION_LEVEL_THREE - H.update_body() - - M.grab_ghost() - M.update_revive() - add_attack_logs(M, M, "Revived with lazarus reagent") //Yes, the logs say you revived yourself. - SSblackbox.record_feedback("tally", "players_revived", 1, "lazarus_reagent") ..() /datum/reagent/medicine/sanguine_reagent diff --git a/code/modules/reagents/chemistry/recipes/slime_extracts.dm b/code/modules/reagents/chemistry/recipes/slime_extracts.dm index b2f83faccacf..d290eba573c5 100644 --- a/code/modules/reagents/chemistry/recipes/slime_extracts.dm +++ b/code/modules/reagents/chemistry/recipes/slime_extracts.dm @@ -150,21 +150,21 @@ var/list/blocked = list( /obj/item/food, - /obj/item/food/breadslice, + /obj/item/food/sliced/bread, /obj/item/food/sliceable, /obj/item/food/sliceable/pizza, - /obj/item/food/margheritapizzaslice, - /obj/item/food/meatpizzaslice, - /obj/item/food/mushroompizzaslice, - /obj/item/food/vegetablepizzaslice, - /obj/item/food/cheesepizzaslice, - /obj/item/food/garlicpizzaslice, - /obj/item/food/donkpocketpizzaslice, - /obj/item/food/dankpizzaslice, - /obj/item/food/macpizzaslice, - /obj/item/food/firecrackerpizzaslice, - /obj/item/food/pestopizzaslice, - /obj/item/food/pepperonipizzaslice, + /obj/item/food/sliced/margherita_pizza, + /obj/item/food/sliced/meat_pizza, + /obj/item/food/sliced/mushroom_pizza, + /obj/item/food/sliced/vegetable_pizza, + /obj/item/food/sliced/cheese_pizza, + /obj/item/food/garlic_pizza, + /obj/item/food/sliced/donk_pocket_pizza, + /obj/item/food/sliced/dank_pizza, + /obj/item/food/sliced/mac_pizza, + /obj/item/food/sliced/fire_cracker_pizza, + /obj/item/food/sliced/pesto_pizza, + /obj/item/food/sliced/pepperoni_pizza, /obj/item/food/meat, /obj/item/food/meat/slab, /obj/item/food/grown, diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 03755059d7c7..d7b27718888e 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -57,29 +57,28 @@ GLOBAL_LIST_EMPTY(conveyor_switches) update_move_direction() // attack with item, place item on conveyor -/obj/machinery/conveyor/attackby__legacy__attackchain(obj/item/I, mob/user) +/obj/machinery/conveyor/item_interaction(mob/living/user, obj/item/used, list/modifiers) if(stat & BROKEN) return ..() - if(istype(I, /obj/item/conveyor_switch_construct)) - var/obj/item/conveyor_switch_construct/S = I + if(istype(used, /obj/item/conveyor_switch_construct)) + var/obj/item/conveyor_switch_construct/S = used if(S.id == id) return ..() for(var/obj/machinery/conveyor_switch/CS in GLOB.conveyor_switches) if(CS.id == id) CS.conveyors -= src id = S.id - to_chat(user, "You link [I] with [src].") - return + to_chat(user, "You link [used] with [src].") + return ITEM_INTERACT_COMPLETE if(user.a_intent == INTENT_HELP) if(user.drop_item()) - I.forceMove(loc) - return + used.forceMove(loc) + return ITEM_INTERACT_COMPLETE return ..() - /obj/machinery/conveyor/crowbar_act(mob/user, obj/item/I) . = TRUE if(!I.use_tool(src, user, 0, volume = I.tool_volume)) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 33a01ea0c848..072a0750826b 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -123,23 +123,23 @@ disposal.update() // attack by item places it in to disposal -/obj/machinery/disposal/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(stat & BROKEN || !user || I.flags & ABSTRACT) - return +/obj/machinery/disposal/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(stat & BROKEN || !user || used.flags & ABSTRACT) + return ITEM_INTERACT_COMPLETE if(user.a_intent != INTENT_HELP) return ..() src.add_fingerprint(user) - if(istype(I, /obj/item/melee/energy/blade)) + if(istype(used, /obj/item/melee/energy/blade)) to_chat(user, "You can't place that item inside the disposal unit.") - return + return ITEM_INTERACT_COMPLETE - if(isstorage(I)) - var/obj/item/storage/S = I + if(isstorage(used)) + var/obj/item/storage/S = used if(!S.removal_allowed_check(user)) - return + return ITEM_INTERACT_COMPLETE if((S.allow_quick_empty || S.allow_quick_gather) && length(S.contents)) S.hide_from(user) @@ -152,15 +152,15 @@ S.remove_from_storage(O, src) S.update_icon() // For content-sensitive icons update() - return + return ITEM_INTERACT_COMPLETE // Borg using their gripper to throw stuff away. - if(istype(I, /obj/item/gripper/)) - var/obj/item/gripper/gripper = I + if(istype(used, /obj/item/gripper)) + var/obj/item/gripper/gripper = used // Gripper is empty. if(!gripper.gripped_item) to_chat(user, "There's nothing in your gripper to throw away!") - return + return ITEM_INTERACT_COMPLETE gripper.gripped_item.forceMove(src) user.visible_message( @@ -168,14 +168,14 @@ "You place [gripper.gripped_item] into the disposal unit.", "You hear someone dropping something into a disposal unit." ) - return + return ITEM_INTERACT_COMPLETE // Someone has a mob in a grab. - var/obj/item/grab/G = I + var/obj/item/grab/G = used if(istype(G)) // If there's not actually a mob in the grab, stop it. Get some help. if(!ismob(G.affecting)) - return + return ITEM_INTERACT_COMPLETE var/mob/GM = G.affecting user.visible_message( @@ -186,7 +186,7 @@ // Abort if the target manages to scurry away. if(!do_after(user, 2 SECONDS, target = GM)) - return + return ITEM_INTERACT_COMPLETE GM.forceMove(src) user.visible_message( @@ -197,20 +197,22 @@ qdel(G) update() add_attack_logs(user, GM, "Disposal'ed", !GM.ckey ? null : ATKLOG_ALL) - return + return ITEM_INTERACT_COMPLETE - if(!user.drop_item() || QDELETED(I)) - return + if(!user.drop_item() || QDELETED(used)) + return ITEM_INTERACT_COMPLETE // If we're here, it's an item without any special interactions, drop it in the bin without any further delay. - I.forceMove(src) + used.forceMove(src) user.visible_message( - "[user] places [I] into the disposal unit.", - "You place [I] into the disposal unit.", + "[user] places [used] into the disposal unit.", + "You place [used] into the disposal unit.", "You hear someone dropping something into a disposal unit." ) update() + return ITEM_INTERACT_COMPLETE + /obj/machinery/disposal/screwdriver_act(mob/user, obj/item/I) if(mode != DISPOSALS_OFF) // It's on to_chat(user, "You need to turn the disposal unit off first!") diff --git a/code/modules/research/backup_console.dm b/code/modules/research/backup_console.dm index 8a14054b344f..b65126c16a59 100644 --- a/code/modules/research/backup_console.dm +++ b/code/modules/research/backup_console.dm @@ -38,21 +38,20 @@ SStgui.update_uis(src) -/obj/machinery/computer/rnd_backup/attackby__legacy__attackchain(obj/item/O, mob/user, params) - if(istype(O, /obj/item/disk/rnd_backup_disk) && istype(user, /mob/living/carbon/human)) +/obj/machinery/computer/rnd_backup/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/disk/rnd_backup_disk) && istype(user, /mob/living/carbon/human)) var/mob/living/carbon/human/H = user - if(!H.drop_item_to_ground(O)) - return TRUE + if(!H.drop_item_to_ground(used)) + return ITEM_INTERACT_COMPLETE - O.forceMove(src) - inserted_disk = O - to_chat(user, "You insert [O] into [src].") + used.forceMove(src) + inserted_disk = used + to_chat(user, "You insert [used] into [src].") SStgui.update_uis(src) - return TRUE + return ITEM_INTERACT_COMPLETE return ..() - /obj/machinery/computer/rnd_backup/proc/eject_disk() if(!inserted_disk) return diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index 1b07264d9e9f..40d0a9e4433a 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -74,16 +74,16 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). return round(A / max(1, (all_materials[M] * efficiency_coeff))) -/obj/machinery/r_n_d/circuit_imprinter/attackby__legacy__attackchain(obj/item/O as obj, mob/user as mob, params) - if(istype(O, /obj/item/storage/part_replacer)) +/obj/machinery/r_n_d/circuit_imprinter/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/storage/part_replacer)) return ..() if(panel_open) to_chat(user, "You can't load [src] while it's opened.") - return + return ITEM_INTERACT_COMPLETE - if(O.is_open_container()) - return FALSE + if(used.is_open_container()) + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index ad5848af1257..65d6d3c5fd45 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -76,22 +76,22 @@ Note: Must be placed west/left of and R&D console to function. A = A / max(1, (being_built.materials[M] * efficiency_coeff)) return A -/obj/machinery/r_n_d/protolathe/attackby__legacy__attackchain(obj/item/O as obj, mob/user as mob, params) - if(istype(O, /obj/item/storage/part_replacer)) +/obj/machinery/r_n_d/protolathe/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/storage/part_replacer)) return ..() - if(default_deconstruction_screwdriver(user, "protolathe_t", "protolathe", O)) + if(default_deconstruction_screwdriver(user, "protolathe_t", "protolathe", used)) if(linked_console) linked_console.linked_lathe = null linked_console = null - return FALSE + return ITEM_INTERACT_COMPLETE if(panel_open) to_chat(user, "You can't load [src] while it's opened.") - return TRUE + return ITEM_INTERACT_COMPLETE - if(O.is_open_container()) - return FALSE + if(used.is_open_container()) + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index db9a789b5313..da32688bf523 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -179,27 +179,26 @@ won't update every console in existence) but it's more of a hassle to do. Also, wait_message_timer = 0 return ..() -/obj/machinery/computer/rdconsole/attackby__legacy__attackchain(obj/item/D as obj, mob/user as mob, params) - +/obj/machinery/computer/rdconsole/item_interaction(mob/living/user, obj/item/used, list/modifiers) //Loading a disk into it. - if(istype(D, /obj/item/disk)) + if(istype(used, /obj/item/disk)) if(t_disk || d_disk) to_chat(user, "A disk is already loaded into the machine.") - return + return ITEM_INTERACT_COMPLETE - if(istype(D, /obj/item/disk/tech_disk)) t_disk = D - else if(istype(D, /obj/item/disk/design_disk)) d_disk = D + if(istype(used, /obj/item/disk/tech_disk)) t_disk = used + else if(istype(used, /obj/item/disk/design_disk)) d_disk = used else to_chat(user, "Machine cannot accept disks in that format.") - return + return ITEM_INTERACT_COMPLETE if(!user.drop_item()) - return - D.loc = src + return ITEM_INTERACT_COMPLETE + used.loc = src to_chat(user, "You add the disk to the machine!") else if(!(linked_analyzer && linked_analyzer.busy) && !(linked_lathe && linked_lathe.busy) && !(linked_imprinter && linked_imprinter.busy)) - ..() + return ..() + SStgui.update_uis(src) - return /obj/machinery/computer/rdconsole/emag_act(user as mob) if(!emagged) @@ -496,6 +495,19 @@ won't update every console in existence) but it's more of a hassle to do. Also, return TRUE + if("maxresearch") + if(!check_rights(R_ADMIN)) + return + if(!network_manager_uid) + return + var/choice = tgui_alert(ui.user, "Are you sure you want to maximize research levels?", "Confirmation", list("Yes", "No")) + if(choice == "Yes") + log_admin("[key_name(ui.user)] has maximized the research levels at network [network_manager_uid].") + message_admins("[key_name_admin(ui.user)] has maximized the research levels at network [network_manager_uid].") + maximize() + + return TRUE + // You should only be able to link if its not linked, to prevent weirdness if("linktonetworkcontroller") if(network_manager_uid) @@ -746,6 +758,14 @@ won't update every console in existence) but it's more of a hassle to do. Also, network_manager_uid = null SStgui.update_uis(src) +/obj/machinery/computer/rdconsole/proc/maximize() + var/datum/research/files = get_files() + if(!files) + return + for(var/T in files.known_tech) + files.UpdateTech(T, 8) + SStgui.update_uis(src) + /obj/machinery/computer/rdconsole/attack_hand(mob/user) if(..()) return 1 @@ -874,6 +894,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, data["linked"] = TRUE files.RefreshResearch() + data["admin"] = check_rights(R_ADMIN, FALSE, user) data["menu"] = menu data["submenu_protolathe"] = submenu_protolathe data["submenu_imprinter"] = submenu_imprinter diff --git a/code/modules/research/scientific_analyzer.dm b/code/modules/research/scientific_analyzer.dm index 333cd5d0a3d6..694a4e00ce28 100644 --- a/code/modules/research/scientific_analyzer.dm +++ b/code/modules/research/scientific_analyzer.dm @@ -48,50 +48,53 @@ Note: Must be placed within 3 tiles of the R&D Console return temp_list -/obj/machinery/r_n_d/scientific_analyzer/attackby__legacy__attackchain(obj/item/O as obj, mob/user as mob, params) - if(istype(O, /obj/item/storage/part_replacer)) +/obj/machinery/r_n_d/scientific_analyzer/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/storage/part_replacer)) return ..() - if(default_deconstruction_screwdriver(user, "s_analyzer_t", "s_analyzer", O)) + if(default_deconstruction_screwdriver(user, "s_analyzer_t", "s_analyzer", used)) if(linked_console) linked_console.linked_analyzer = null linked_console = null - return + return ITEM_INTERACT_COMPLETE - if(exchange_parts(user, O)) - return + // TODO: Almost positive this doesn't need to do the same exchange parts shit as /obj/machinery + if(exchange_parts(user, used)) + return ITEM_INTERACT_COMPLETE - if(default_deconstruction_crowbar(user, O)) - return + if(default_deconstruction_crowbar(user, used)) + return ITEM_INTERACT_COMPLETE if(!linked_console) to_chat(user, "[src] must be linked to an R&D console first!") - return + return ITEM_INTERACT_COMPLETE if(busy) to_chat(user, "[src] is busy right now.") - return + return ITEM_INTERACT_COMPLETE - if(isitem(O) && !loaded_item) - if(!O.origin_tech) + if(isitem(used) && !loaded_item) + if(!used.origin_tech) to_chat(user, "This doesn't seem to have a tech origin!") - return + return ITEM_INTERACT_COMPLETE - var/list/temp_tech = ConvertReqString2List(O.origin_tech) + var/list/temp_tech = ConvertReqString2List(used.origin_tech) if(length(temp_tech) == 0) to_chat(user, "You cannot deconstruct this item!") - return + return ITEM_INTERACT_COMPLETE if(!user.drop_item()) - to_chat(user, "[O] is stuck to your hand, you cannot put it in [src]!") - return + to_chat(user, "[used] is stuck to your hand, you cannot put it in [src]!") + return ITEM_INTERACT_COMPLETE busy = TRUE - loaded_item = O - O.loc = src - to_chat(user, "You add [O] to [src]!") + loaded_item = used + used.loc = src + to_chat(user, "You add [used] to [src]!") SStgui.update_uis(linked_console) flick("s_analyzer_la", src) spawn(10) icon_state = "s_analyzer_l" busy = FALSE + + return ITEM_INTERACT_COMPLETE diff --git a/code/modules/research/xenobiology/xenobio_camera.dm b/code/modules/research/xenobiology/xenobio_camera.dm index 84a60c49cf08..e33810f4398f 100644 --- a/code/modules/research/xenobiology/xenobio_camera.dm +++ b/code/modules/research/xenobiology/xenobio_camera.dm @@ -149,21 +149,21 @@ return return ..() -/obj/machinery/computer/camera_advanced/xenobio/attackby__legacy__attackchain(obj/item/O, mob/user, params) - if(istype(O, /obj/item/food/monkeycube)) +/obj/machinery/computer/camera_advanced/xenobio/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/food/monkeycube)) if(user.drop_item()) monkeys++ - to_chat(user, "You feed [O] to [src]. It now has [monkeys] monkey cubes stored.") - qdel(O) - return - else if(istype(O, /obj/item/slimepotion/slime)) + to_chat(user, "You feed [used] to [src]. It now has [monkeys] monkey cubes stored.") + qdel(used) + return ITEM_INTERACT_COMPLETE + else if(istype(used, /obj/item/slimepotion/slime)) if(!user.drop_item()) - return - to_chat(user, "You load [O] in the console's potion slot[current_potion ? ", replacing the one that was there before" : ""].") - insert_potion(O, user) - return - else if(istype(O, /obj/item/storage/bag) || istype(O, /obj/item/storage/box)) - var/obj/item/storage/P = O + return ITEM_INTERACT_COMPLETE + to_chat(user, "You load [used] in the console's potion slot[current_potion ? ", replacing the one that was there before" : ""].") + insert_potion(used, user) + return ITEM_INTERACT_COMPLETE + else if(istype(used, /obj/item/storage/bag) || istype(used, /obj/item/storage/box)) + var/obj/item/storage/P = used var/loaded = 0 for(var/obj/item/food/monkeycube/MC in P.contents) loaded = 1 @@ -171,8 +171,9 @@ P.remove_from_storage(MC) qdel(MC) if(loaded) - to_chat(user, "You fill [src] with the monkey cubes stored in [O]. [src] now has [monkeys] monkey cubes stored.") - return + to_chat(user, "You fill [src] with the monkey cubes stored in [used]. [src] now has [monkeys] monkey cubes stored.") + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/computer/camera_advanced/xenobio/multitool_act(mob/user, obj/item/I) diff --git a/code/modules/ruins/objects_and_mobs/id_upgrader.dm b/code/modules/ruins/objects_and_mobs/id_upgrader.dm index af4fa2906ba8..3e83f63434f2 100644 --- a/code/modules/ruins/objects_and_mobs/id_upgrader.dm +++ b/code/modules/ruins/objects_and_mobs/id_upgrader.dm @@ -8,12 +8,12 @@ /// Have we been used? var/used = FALSE -/obj/machinery/computer/id_upgrader/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/card/id)) - var/obj/item/card/id/D = I +/obj/machinery/computer/id_upgrader/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/card/id)) + var/obj/item/card/id/D = used if(!length(access_to_give)) to_chat(user, "This machine appears to be configured incorrectly.") - return + return ITEM_INTERACT_COMPLETE var/did_upgrade = FALSE var/list/id_access = D.GetAccess() @@ -29,6 +29,6 @@ else to_chat(user, "Your ID card already has all the access this machine can give.") - return + return ITEM_INTERACT_COMPLETE return ..() diff --git a/code/modules/security_levels/keycard_authentication.dm b/code/modules/security_levels/keycard_authentication.dm index 2a761a0ea1f5..d2c8a3901edc 100644 --- a/code/modules/security_levels/keycard_authentication.dm +++ b/code/modules/security_levels/keycard_authentication.dm @@ -43,34 +43,35 @@ to_chat(user, "The station AI is not to interact with these devices.") return -/obj/machinery/keycard_auth/attackby__legacy__attackchain(obj/item/W, mob/user, params) +/obj/machinery/keycard_auth/item_interaction(mob/living/user, obj/item/used, list/modifiers) if(stat & (NOPOWER|BROKEN)) to_chat(user, "This device is not powered.") - return - if(istype(W, /obj/item/card/id) || istype(W, /obj/item/pda)) - if(!check_access(W)) + return ITEM_INTERACT_COMPLETE + if(istype(used, /obj/item/card/id) || istype(used, /obj/item/pda)) + if(!check_access(used)) to_chat(user, "Access denied.") - return + return ITEM_INTERACT_COMPLETE if(user == event_source?.triggered_by) to_chat(user, "Identical body-signature detected. Access denied.") - return + return ITEM_INTERACT_COMPLETE if(active) //This is not the device that made the initial request. It is the device confirming the request. if(!event_source) - return + return ITEM_INTERACT_COMPLETE event_source.confirmed_by = user SStgui.update_uis(event_source) SStgui.update_uis(src) event_source.confirm_and_trigger() reset() - return + return ITEM_INTERACT_COMPLETE if(swiping) if(event == "Emergency Response Team" && !ert_reason) to_chat(user, "Supply a reason for calling the ERT first!") - return + return ITEM_INTERACT_COMPLETE triggered_by = user SStgui.update_uis(src) broadcast_request() //This is the device making the initial event request. It needs to broadcast to other devices + return ..() /obj/machinery/keycard_auth/power_change() diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index 9c3c2b4ac48c..bcb1d6bbca44 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -36,93 +36,103 @@ if(hijack_announce) . += "It is probably best to fortify your position as to be uninterrupted during the attempt, given the automatic announcements..." -/obj/machinery/computer/emergency_shuttle/attackby__legacy__attackchain(obj/item/card/id/W, mob/user, params) +/obj/machinery/computer/emergency_shuttle/item_interaction(mob/living/user, obj/item/used, list/modifiers) if(stat & (BROKEN|NOPOWER)) return - if(!istype(W, /obj/item/card/id)) + + var/obj/item/card/id/id_card + if(istype(used, /obj/item/card/id)) + id_card = used + else if(istype(used, /obj/item/pda)) + var/obj/item/pda/pda = used + id_card = pda.id + else return + if(SSshuttle.emergency.mode != SHUTTLE_DOCKED && !SSshuttle.emergency.aihacked) return if(!user) return if(SSshuttle.emergency.timeLeft() < 11) return - if(istype(W, /obj/item/card/id)||istype(W, /obj/item/pda)) - if(istype(W, /obj/item/pda)) - var/obj/item/pda/pda = W - W = pda.id - if(!W.access) //no access - to_chat(user, "The access level of [W.registered_name]\'s card is not high enough. ") - return - var/list/cardaccess = W.access - if(!istype(cardaccess, /list) || !length(cardaccess)) //no access - to_chat(user, "The access level of [W.registered_name]\'s card is not high enough. ") - return + if(!id_card.access) //no access + to_chat(user, "The access level of [id_card.registered_name]\'s card is not high enough. ") + return ITEM_INTERACT_COMPLETE + + var/list/cardaccess = id_card.access + if(!istype(cardaccess, /list) || !length(cardaccess)) //no access + to_chat(user, "The access level of [id_card.registered_name]\'s card is not high enough. ") + return ITEM_INTERACT_COMPLETE + + if(!(ACCESS_HEADS in id_card.access)) //doesn't have this access + to_chat(user, "The access level of [id_card.registered_name]\'s card is not high enough. ") + return ITEM_INTERACT_COMPLETE + if(!SSshuttle.emergency.aihacked) + var/choice = tgui_alert(user, "Would you like to (un)authorize a shortened launch time? [auth_need - length(authorized)] authorization\s are still needed. Use abort to cancel all authorizations.", "Shuttle Launch", list("Authorize", "Repeal", "Abort")) + if(SSshuttle.emergency.mode != SHUTTLE_DOCKED || user.get_active_hand() != id_card) + return ITEM_INTERACT_COMPLETE + + var/seconds = SSshuttle.emergency.timeLeft() + if(seconds <= 10) + return ITEM_INTERACT_COMPLETE - if(!(ACCESS_HEADS in W.access)) //doesn't have this access - to_chat(user, "The access level of [W.registered_name]\'s card is not high enough. ") - return 0 - if(!SSshuttle.emergency.aihacked) - var/choice = tgui_alert(user, "Would you like to (un)authorize a shortened launch time? [auth_need - length(authorized)] authorization\s are still needed. Use abort to cancel all authorizations.", "Shuttle Launch", list("Authorize", "Repeal", "Abort")) - if(SSshuttle.emergency.mode != SHUTTLE_DOCKED || user.get_active_hand() != W) - return 0 - - var/seconds = SSshuttle.emergency.timeLeft() - if(seconds <= 10) - return 0 - - switch(choice) - if("Authorize") - if(!authorized.Find(W.registered_name)) - authorized += W.registered_name - if(auth_need - length(authorized) > 0) - message_admins("[key_name_admin(user)] has authorized early shuttle launch.") - log_game("[key_name(user)] has authorized early shuttle launch in ([x], [y], [z]).") - GLOB.minor_announcement.Announce("[auth_need - length(authorized)] more authorization(s) needed until shuttle is launched early") - else - message_admins("[key_name_admin(user)] has launched the emergency shuttle [seconds] seconds before launch.") - log_game("[key_name(user)] has launched the emergency shuttle in ([x], [y], [z]) [seconds] seconds before launch.") - GLOB.minor_announcement.Announce("The emergency shuttle will launch in 10 seconds") - SSshuttle.emergency.setTimer(10 SECONDS) - - if("Repeal") - if(authorized.Remove(W.registered_name)) - GLOB.minor_announcement.Announce("[auth_need - length(authorized)] authorizations needed until shuttle is launched early") - - if("Abort") - if(length(authorized)) - GLOB.minor_announcement.Announce("All authorizations to launch the shuttle early have been revoked.") - authorized.Cut() - return FALSE - var/choice = tgui_alert(user, "\[ERROR] HOSTILE AI DETECTED IN SHUTTLE CONTROL. RESTORE SHUTTLE CONSOLE TO BACKUP SYSTEM? [auth_need - length(authorized)] AUTHORIZATIONS\s REQUIRED TO RESTORE. ABORT TO REMOVE ALL AUTHORIZATION OF BACKUP RESTORAL, P-P--PLEASE...", "HOSTILE VIRAL AI INTRUSION", list("Authorize", "Repeal", "Abort")) - if(user.get_active_hand() != W) - return FALSE switch(choice) if("Authorize") - if(!authorized.Find(W.registered_name)) - authorized += W.registered_name + if(!authorized.Find(id_card.registered_name)) + authorized += id_card.registered_name if(auth_need - length(authorized) > 0) - message_admins("[key_name_admin(user)] has authorized restoring shuttle AI backup.") - log_game("[key_name(user)] has authorized restoring shuttle AI backup in ([x], [y], [z]).") - GLOB.minor_announcement.Announce("[auth_need - length(authorized)] more authorization(s) needed until sh-tt- STOP STOP STOP STOP!") + message_admins("[key_name_admin(user)] has authorized early shuttle launch.") + log_game("[key_name(user)] has authorized early shuttle launch in ([x], [y], [z]).") + GLOB.minor_announcement.Announce("[auth_need - length(authorized)] more authorization(s) needed until shuttle is launched early") else - message_admins("[key_name_admin(user)] has wiped the AI in the shuttle computer.") - log_game("[key_name(user)] has wiped the AI in the shuttle computer in ([x], [y], [z])") - GLOB.minor_announcement.Announce("NO NO NO N---\[[Gibberish("###########", 100, 90)]\]...") - GLOB.minor_announcement.Announce("Shuttle AI restored to emergency backup. Avoiding toll hyperlanes. Recalculating route. Recalculating. Recalculating. Please stand by...") - SSshuttle.emergency.setTimer(60 SECONDS) - kill_the_ai() + message_admins("[key_name_admin(user)] has launched the emergency shuttle [seconds] seconds before launch.") + log_game("[key_name(user)] has launched the emergency shuttle in ([x], [y], [z]) [seconds] seconds before launch.") + GLOB.minor_announcement.Announce("The emergency shuttle will launch in 10 seconds") + SSshuttle.emergency.setTimer(10 SECONDS) if("Repeal") - if(authorized.Remove(W.registered_name)) - GLOB.minor_announcement.Announce("[auth_need - length(authorized)] authorizations needed unti- THE SHUTTLE EXPLODES. PLEASE REVO-KE ALL AUTHORIZATIONS.") + if(authorized.Remove(id_card.registered_name)) + GLOB.minor_announcement.Announce("[auth_need - length(authorized)] authorizations needed until shuttle is launched early") if("Abort") if(length(authorized)) - GLOB.minor_announcement.Announce("All authorizations to restore shuttle AI backup have been re-- Really applied. The AI is gone. There is no reason to worry. Enjoy your flight.") + GLOB.minor_announcement.Announce("All authorizations to launch the shuttle early have been revoked.") authorized.Cut() + return ITEM_INTERACT_COMPLETE + + var/choice = tgui_alert(user, "\[ERROR] HOSTILE AI DETECTED IN SHUTTLE CONTROL. RESTORE SHUTTLE CONSOLE TO BACKUP SYSTEM? [auth_need - length(authorized)] AUTHORIZATIONS\s REQUIRED TO RESTORE. ABORT TO REMOVE ALL AUTHORIZATION OF BACKUP RESTORAL, P-P--PLEASE...", "HOSTILE VIRAL AI INTRUSION", list("Authorize", "Repeal", "Abort")) + if(user.get_active_hand() != id_card) + return ITEM_INTERACT_COMPLETE + + switch(choice) + if("Authorize") + if(!authorized.Find(id_card.registered_name)) + authorized += id_card.registered_name + if(auth_need - length(authorized) > 0) + message_admins("[key_name_admin(user)] has authorized restoring shuttle AI backup.") + log_game("[key_name(user)] has authorized restoring shuttle AI backup in ([x], [y], [z]).") + GLOB.minor_announcement.Announce("[auth_need - length(authorized)] more authorization(s) needed until sh-tt- STOP STOP STOP STOP!") + else + message_admins("[key_name_admin(user)] has wiped the AI in the shuttle computer.") + log_game("[key_name(user)] has wiped the AI in the shuttle computer in ([x], [y], [z])") + GLOB.minor_announcement.Announce("NO NO NO N---\[[Gibberish("###########", 100, 90)]\]...") + GLOB.minor_announcement.Announce("Shuttle AI restored to emergency backup. Avoiding toll hyperlanes. Recalculating route. Recalculating. Recalculating. Please stand by...") + SSshuttle.emergency.setTimer(60 SECONDS) + kill_the_ai() + + if("Repeal") + if(authorized.Remove(id_card.registered_name)) + GLOB.minor_announcement.Announce("[auth_need - length(authorized)] authorizations needed unti- THE SHUTTLE EXPLODES. PLEASE REVO-KE ALL AUTHORIZATIONS.") + + if("Abort") + if(length(authorized)) + GLOB.minor_announcement.Announce("All authorizations to restore shuttle AI backup have been re-- Really applied. The AI is gone. There is no reason to worry. Enjoy your flight.") + authorized.Cut() + + return ITEM_INTERACT_COMPLETE + /obj/machinery/computer/emergency_shuttle/emag_act(mob/user) if(!emagged && SSshuttle.emergency.mode == SHUTTLE_DOCKED) var/time = SSshuttle.emergency.timeLeft() diff --git a/code/modules/shuttle/shuttle_manipulator.dm b/code/modules/shuttle/shuttle_manipulator.dm index 36d822cbdf41..1abd93268124 100644 --- a/code/modules/shuttle/shuttle_manipulator.dm +++ b/code/modules/shuttle/shuttle_manipulator.dm @@ -194,7 +194,7 @@ intact for round sanity.") else if(S) // If successful, returns the mobile docking port - var/obj/docking_port/mobile/mdp = action_load_old(S) + var/obj/docking_port/mobile/mdp = action_load(S) if(mdp) usr.forceMove(get_turf(mdp)) message_admins("[key_name_admin(usr)] loaded [mdp] with the shuttle manipulator.") @@ -207,27 +207,6 @@ message_admins("The emergency shuttle has been locked in. You can not load another shuttle.") return - if(preview_shuttle && (loading_template != preview_template)) - preview_shuttle.jumpToNullSpace() - preview_shuttle = null - preview_template = null - - if(!preview_shuttle) - preview_shuttle = SSshuttle.load_template(loading_template) - preview_template = loading_template - - SSshuttle.replace_shuttle(preview_shuttle) - - existing_shuttle = null - preview_shuttle = null - preview_template = null - selected = null - -/obj/machinery/shuttle_manipulator/proc/action_load_old(datum/map_template/shuttle/loading_template) - if(istype(loading_template, /datum/map_template/shuttle/emergency) && SSshuttle.emergency_locked_in) - message_admins("The emergency shuttle has been locked in. You can not load another shuttle.") - return - // Check for an existing preview if(preview_shuttle && (loading_template != preview_template)) preview_shuttle.jumpToNullSpace() diff --git a/code/modules/station_goals/dna_vault.dm b/code/modules/station_goals/dna_vault.dm index 5e6477acf1d1..0f2627476bee 100644 --- a/code/modules/station_goals/dna_vault.dm +++ b/code/modules/station_goals/dna_vault.dm @@ -252,9 +252,9 @@ GLOBAL_LIST_INIT(non_simple_animals, typecacheof(list(/mob/living/carbon/human/m if(length(plants) >= plants_max && length(animals) >= animals_max && length(dna) >= dna_max) completed = TRUE -/obj/machinery/dna_vault/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/dna_probe)) - var/obj/item/dna_probe/P = I +/obj/machinery/dna_vault/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/dna_probe)) + var/obj/item/dna_probe/P = used var/uploaded = 0 for(var/plant in P.plants) if(!plants[plant]) @@ -270,8 +270,9 @@ GLOBAL_LIST_INIT(non_simple_animals, typecacheof(list(/mob/living/carbon/human/m dna[ui] = 1 check_goal() to_chat(user, "[uploaded] new datapoints uploaded.") - else - return ..() + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/dna_vault/proc/upgrade(mob/living/carbon/human/H, upgrade_type) if(!(upgrade_type in power_lottery[H])) diff --git a/code/modules/station_goals/secondary/kitchen/random_bulk_food.dm b/code/modules/station_goals/secondary/kitchen/random_bulk_food.dm index 6b5c74975559..b243fa6a127e 100644 --- a/code/modules/station_goals/secondary/kitchen/random_bulk_food.dm +++ b/code/modules/station_goals/secondary/kitchen/random_bulk_food.dm @@ -18,7 +18,7 @@ valid_food += candidate if(!valid_food) - food_type = /obj/item/food/cheesewedge + food_type = /obj/item/food/sliced/cheesewedge amount = 50 return diff --git a/code/modules/station_goals/shield.dm b/code/modules/station_goals/shield.dm index 5165a186b387..b4cf11f17c3b 100644 --- a/code/modules/station_goals/shield.dm +++ b/code/modules/station_goals/shield.dm @@ -250,11 +250,8 @@ /obj/machinery/satellite/update_icon_state() icon_state = active ? "sat_active" : "sat_inactive" -/obj/machinery/satellite/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/multitool)) - to_chat(user, "// NTSAT-[id] // Mode : [active ? "PRIMARY" : "STANDBY"] //[emagged ? "DEBUG_MODE //" : ""]") - else - return ..() +/obj/machinery/satellite/multitool_act(mob/living/user, obj/item/I) + to_chat(user, "// NTSAT-[id] // Mode : [active ? "PRIMARY" : "STANDBY"] //[emagged ? "DEBUG_MODE //" : ""]") /obj/machinery/satellite/meteor_shield name = "Meteor Shield Satellite" diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index 80fcef082bb8..972a0449f092 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -425,10 +425,6 @@ to_chat(user, "[I] is in no state to be transplanted.") return SURGERY_BEGINSTEP_SKIP - if(target.get_int_organ(I)) - to_chat(user, "[target] already has [I].") - return SURGERY_BEGINSTEP_SKIP - if(affected) user.visible_message( "[user] starts transplanting [tool] into [target]'s [affected.name].", diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index 0e3f4a12a293..ab38b16f36ff 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -444,10 +444,6 @@ to_chat(user, "[I] is in no state to be transplanted.") return SURGERY_BEGINSTEP_SKIP - if(target.get_int_organ(I)) - to_chat(user, "[target] already has [I].") - return SURGERY_BEGINSTEP_SKIP - user.visible_message( "[user] begins reattaching [target]'s [tool].", "You start reattaching [target]'s [tool]." diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index 9eb5313d57aa..2ee8ddfb8ea1 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -500,15 +500,15 @@ var/list/tools = list() for(var/tool in allowed_tools) // only list main surgery tools. you can figure out the improvised version by trying (or reading the wiki lul) - if(tool in GLOB.surgery_tool_behaviors) + if((tool in GLOB.surgery_tool_behaviors) || ((tool in GLOB.construction_tool_behaviors) && allowed_tools[tool] == 100)) tools |= tool if(!length(tools)) // if nothing else, just pick the first in the list. var/atom/tool = allowed_tools[1] - tools |= tool.name + tools |= (ispath(tool)) ? tool::name : "[tool]" - return "[name] ([english_list(tools, and_text="or")])" + return "[name] ([english_list(tools, and_text=" or ")])" /** * Spread some nasty germs to an organ. diff --git a/code/modules/telesci/gps.dm b/code/modules/telesci/gps.dm index e057f7352764..7a05b81c2842 100644 --- a/code/modules/telesci/gps.dm +++ b/code/modules/telesci/gps.dm @@ -62,8 +62,8 @@ GLOBAL_LIST_EMPTY(GPS_list) update_icon(UPDATE_OVERLAYS) addtimer(CALLBACK(src, PROC_REF(reboot)), EMP_DISABLE_TIME) -/obj/item/gps/AltClick(mob/user) - if(ui_status(user, GLOB.inventory_state) != UI_INTERACTIVE) +/obj/item/gps/AltClick(mob/user, state) + if(ui_status(user, state) != UI_INTERACTIVE) return //user not valid to use gps if(emped) to_chat(user, "It's busted!") @@ -130,7 +130,7 @@ GLOBAL_LIST_EMPTY(GPS_list) ui = new(user, src, "GPS", "GPS") ui.open() -/obj/item/gps/ui_act(action, list/params) +/obj/item/gps/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) if(..()) return @@ -144,7 +144,7 @@ GLOBAL_LIST_EMPTY(GPS_list) gpstag = newtag name = "global positioning system ([gpstag])" if("toggle") - AltClick(usr) + AltClick(usr, state) return FALSE if("same_z") same_z = !same_z @@ -181,7 +181,10 @@ GLOBAL_LIST_EMPTY(GPS_list) icon_state = "gps-m" gpstag = "MOD0" desc = "A positioning system helpful for rescuing trapped or injured miners, after you have become lost from rolling around at the speed of sound." - flags = NODROP + tracking = FALSE + +/obj/item/gps/mod/ui_state() + return GLOB.deep_inventory_state /obj/item/gps/cyborg icon_state = "gps-b" diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index 587054430860..3249f197860b 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -60,27 +60,29 @@ . = ..() . += "There are [crystals ? crystals : "no"] bluespace crystal\s in the crystal slots." -/obj/machinery/computer/telescience/attackby__legacy__attackchain(obj/item/W, mob/user, params) - if(istype(W, /obj/item/stack/ore/bluespace_crystal)) - var/obj/item/stack/ore/bluespace_crystal/B = W +/obj/machinery/computer/telescience/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/stack/ore/bluespace_crystal)) + var/obj/item/stack/ore/bluespace_crystal/B = used if(crystals >= MAX_CRYSTALS) to_chat(user, "There are not enough crystal slots.") - return - + return ITEM_INTERACT_COMPLETE crystals += 1 user.visible_message("[user] inserts a [B.singular_name] into [src]'s crystal slot.") B.use(1) SStgui.update_uis(src) - - else if(istype(W, /obj/item/gps)) + return ITEM_INTERACT_COMPLETE + else if(istype(used, /obj/item/gps)) + // TODO: Provide some kind of message if there's already an inserted GPS. + // For now, just do nothing. if(!inserted_gps) - inserted_gps = W - user.transfer_item_to(W, src) - user.visible_message("[user] inserts [W] into [src]'s GPS device slot.") + inserted_gps = used + user.transfer_item_to(used, src) + user.visible_message("[user] inserts [used] into [src]'s GPS device slot.") SStgui.update_uis(src) - else - return ..() + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/computer/telescience/multitool_act(mob/living/user, obj/item/I) diff --git a/code/modules/tgui/modules/crew_monitor.dm b/code/modules/tgui/modules/crew_monitor.dm index f10b8ac3b59b..db1f93d6d0b6 100644 --- a/code/modules/tgui/modules/crew_monitor.dm +++ b/code/modules/tgui/modules/crew_monitor.dm @@ -124,6 +124,12 @@ return data +/datum/ui_module/crew_monitor/mod + name = "Crew monitor (Modsuit)" + +/datum/ui_module/crew_monitor/mod/ui_state(mob/user) + return GLOB.deep_inventory_state + /datum/ui_module/crew_monitor/ghost name = "Crew monitor (Observer)" is_advanced = TRUE diff --git a/code/tests/_game_test.dm b/code/tests/_game_test.dm index 32c2c3bc661e..e94e10d85e65 100644 --- a/code/tests/_game_test.dm +++ b/code/tests/_game_test.dm @@ -15,6 +15,8 @@ GLOBAL_LIST_EMPTY(game_test_chats) /// Asserts that a parameter is null #define TEST_ASSERT_NULL(a, reason) if(!isnull(a)) { return Fail("Expected null value but received [a]: [reason || "No reason"]", __FILE__, __LINE__) } +#define TEST_ASSERT_LAST_CHATLOG(puppet, text) if(!puppet.last_chatlog_has_text(text)) { return Fail("Expected `[text]` in last chatlog but got `[puppet.get_last_chatlog()]`", __FILE__, __LINE__) } + /// Asserts that the two parameters passed are equal, fails otherwise /// Optionally allows an additional message in the case of a failure #define TEST_ASSERT_EQUAL(a, b, message) do { \ @@ -49,12 +51,15 @@ GLOBAL_LIST_EMPTY(game_test_chats) var/list/procs_tested //usable vars - var/static/list/available_turfs + var/list/available_turfs //internal shit var/succeeded = TRUE var/list/allocated var/list/fail_reasons + var/testing_area_name = "test_generic.dmm" + var/obj/effect/landmark/bottom_left + var/obj/effect/landmark/top_right /datum/game_test/New() if(!length(available_turfs)) @@ -66,7 +71,7 @@ GLOBAL_LIST_EMPTY(game_test_chats) if(!length(testing_levels)) Fail("Could not find appropriate z-level for spawning test areas") var/testing_z_level = pick(testing_levels) - var/datum/map_template/generic_test_area = GLOB.map_templates["test_generic.dmm"] + var/datum/map_template/generic_test_area = GLOB.map_templates[testing_area_name] if(!generic_test_area.load(locate(TRANSITIONEDGE + 1, TRANSITIONEDGE + 1, testing_z_level))) Fail("Could not place generic testing area on z-level [testing_z_level]") @@ -76,6 +81,12 @@ GLOBAL_LIST_EMPTY(game_test_chats) for(var/turf/T in get_area_turfs(/area/game_test)) for(var/atom/movable/AM in T) qdel(AM) + + // Gotta destroy these landmarks so the next test + // doesn't end up seeing them if it tries to load a new map + qdel(bottom_left) + qdel(top_right) + return ..() /datum/game_test/proc/Run() @@ -91,8 +102,6 @@ GLOBAL_LIST_EMPTY(game_test_chats) /datum/game_test/proc/get_test_turfs() var/list/result = list() - var/obj/effect/landmark/bottom_left - var/obj/effect/landmark/top_right for(var/obj/effect/landmark in GLOB.landmarks_list) if(istype(landmark, /obj/effect/landmark/game_test/bottom_left_corner)) bottom_left = landmark diff --git a/code/tests/_game_test_puppeteer.dm b/code/tests/_game_test_puppeteer.dm index 8f93d158f78c..b201f9d3ac1d 100644 --- a/code/tests/_game_test_puppeteer.dm +++ b/code/tests/_game_test_puppeteer.dm @@ -50,12 +50,13 @@ /datum/test_puppeteer/proc/click_on(target, params) var/datum/test_puppeteer/puppet_target = target - sleep(max(puppet.next_click, puppet.next_move) - world.time + 1) if(istype(puppet_target)) puppet.ClickOn(puppet_target.puppet, params) return puppet.ClickOn(target, params) + puppet.next_click = world.time + puppet.next_move = world.time /datum/test_puppeteer/proc/spawn_mob_nearby(mob_type) for(var/turf/T in RANGE_TURFS(1, puppet)) @@ -65,12 +66,13 @@ /datum/test_puppeteer/proc/change_turf_nearby(turf_type, direction = -1) var/turf/T + var/turf/center = get_turf(puppet) if(direction >= 0) T = get_step(puppet, direction) else // just check for any contents, not blocked_turf which includes turf density // (which we don't really care about) - for(var/turf/nearby in RANGE_TURFS(1, puppet)) + for(var/turf/nearby in RANGE_TURFS(1, center)) if(!length(nearby.contents)) T = nearby @@ -91,9 +93,39 @@ /datum/test_puppeteer/proc/rejuvenate() puppet.rejuvenate() -/datum/test_puppeteer/proc/last_chatlog_has_text(snippet) +/datum/test_puppeteer/proc/get_last_chatlog() if(!(puppet.mind.key in GLOB.game_test_chats)) return FALSE var/list/puppet_chat_list = GLOB.game_test_chats[puppet.mind.key] - var/last_chat_html = puppet_chat_list[length(puppet_chat_list)] - return findtextEx(last_chat_html, snippet) + return puppet_chat_list[length(puppet_chat_list)] + +/datum/test_puppeteer/proc/last_chatlog_has_text(snippet) + return findtextEx(get_last_chatlog(), snippet) + +/datum/test_puppeteer/proc/find_nearby(atom_type) + for(var/turf/T in RANGE_TURFS(1, puppet)) + for(var/atom/A in T.contents) + if(istype(A, atom_type)) + return A + +// No we don't technically need to put these things into an actual backpack and +// so forth, we could just leave them lying around and teleport them to the +// player but this keeps things realistic and may surface issues we wouldn't +// think to test for. +/datum/test_puppeteer/proc/put_away(obj/object) + if(!puppet.back) + puppet.equip_to_appropriate_slot(new/obj/item/storage/backpack) + + var/obj/item/storage/backpack = puppet.back + backpack.handle_item_insertion(object, puppet) + +/datum/test_puppeteer/proc/retrieve(obj/object) + if(!puppet.back) + return + + var/obj/item/storage/backpack = puppet.back + if(!(object in backpack.contents)) + return + + backpack.remove_item_from_storage(object) + puppet.put_in_active_hand(object) diff --git a/code/tests/attack_chain/test_attack_chain_machinery.dm b/code/tests/attack_chain/test_attack_chain_machinery.dm new file mode 100644 index 000000000000..873dc14b614a --- /dev/null +++ b/code/tests/attack_chain/test_attack_chain_machinery.dm @@ -0,0 +1,160 @@ +/datum/game_test/attack_chain_machinery + testing_area_name = "test_attack_chain_machinery.dmm" + var/list/machine_instances_by_type = list() + +/datum/game_test/attack_chain_machinery/proc/teleport_to_first(datum/test_puppeteer/player, obj_type, dir=EAST) + if(length(machine_instances_by_type[obj_type])) + var/machine = machine_instances_by_type[obj_type][1] + player.puppet.forceMove(get_step(machine, dir)) + return machine + TEST_FAIL("could not find [obj_type] to teleport puppet to") + +/datum/game_test/attack_chain_machinery/New() + . = ..() + for(var/turf/T in available_turfs) + for(var/obj/machinery/machine in T) + LAZYOR(machine_instances_by_type[machine.type], machine) + +/datum/game_test/attack_chain_machinery/Run() + var/datum/test_puppeteer/player = new(src) + + // Here we fucking go. There's a lot of machines and interactions to test + // here. The basic plan is to test one or two things within the subtype + // interaction, And then test one or two things that should be handled by + // the parent And possibly combat attacks if necessary. + + // DNA Scanner + var/obj/scanner = teleport_to_first(player, /obj/machinery/dna_scannernew) + var/area/admin_area = get_area(player.puppet) + player.spawn_obj_in_hand(/obj/item/reagent_containers/glass/beaker) + player.click_on(scanner) + TEST_ASSERT_LAST_CHATLOG(player, "You add a beaker") + var/obj/screwdriver = player.spawn_obj_in_hand(/obj/item/screwdriver) + player.click_on(scanner) + TEST_ASSERT_LAST_CHATLOG(player, "You open the maintenance hatch") + player.put_away(screwdriver) + + // Abductor console + var/obj/abductor_console = teleport_to_first(player, /obj/machinery/abductor/console) + var/obj/gizmo = player.spawn_obj_in_hand(/obj/item/abductor/gizmo) + player.click_on(abductor_console) + TEST_ASSERT_LAST_CHATLOG(player, "You link the tool") + qdel(gizmo) + var/obj/welder = player.spawn_obj_in_hand(/obj/item/weldingtool) + player.set_intent("harm") + player.click_on(abductor_console) + TEST_ASSERT_LAST_CHATLOG(player, "You hit Abductor console with the welding tool!") + player.set_intent("help") + player.put_away(welder) + + // Abductor replacement organ storage + var/obj/machinery/abductor/gland_dispenser/dispenser = teleport_to_first(player, /obj/machinery/abductor/gland_dispenser) + var/obj/gland = player.spawn_obj_in_hand(/obj/item/organ/internal/heart/gland) + player.click_on(dispenser) + TEST_ASSERT(gland in dispenser.contents, "did not place gland in dispenser") + + // Autolathe + var/obj/machinery/autolathe/autolathe = teleport_to_first(player, /obj/machinery/autolathe) + autolathe.disk_design_load_delay = 0 + var/obj/design_disk = player.spawn_obj_in_hand(/obj/item/disk/design_disk/golem_shell) + player.click_on(autolathe) + TEST_ASSERT_LAST_CHATLOG(player, "You begin to load a design") + qdel(design_disk) + player.retrieve(screwdriver) + player.click_on(autolathe) + TEST_ASSERT_LAST_CHATLOG(player, "You open the maintenance hatch") + player.put_away(screwdriver) + var/obj/rped = player.spawn_obj_in_hand(/obj/item/storage/part_replacer/tier4) + player.click_on(autolathe) + TEST_ASSERT_LAST_CHATLOG(player, "micro-manipulator replaced with femto-manipulator") + qdel(rped) + + var/obj/machinery/nuclearbomb/nuke = teleport_to_first(player, /obj/machinery/nuclearbomb/undeployed) + var/obj/disk = player.spawn_obj_in_hand(/obj/item/disk/nuclear/unrestricted) + player.click_on(nuke) + TEST_ASSERT_LAST_CHATLOG(player, "You need to deploy") + nuke.extended = TRUE + player.click_on(nuke) + TEST_ASSERT(disk in nuke.contents, "Disk not inserted into nuke") + player.retrieve(screwdriver) + player.click_on(nuke) + TEST_ASSERT_LAST_CHATLOG(player, "You unscrew the control panel") + player.put_away(screwdriver) + + var/obj/camera = teleport_to_first(player, /obj/machinery/camera) + player.retrieve(screwdriver) + player.click_on(camera) // with screwdriver + TEST_ASSERT_LAST_CHATLOG(player, "panel open") + player.put_away(screwdriver) + player.spawn_obj_in_hand(/obj/item/stack/sheet/mineral/plasma) + player.click_on(camera) + TEST_ASSERT_LAST_CHATLOG(player, "You attach the solid plasma") + var/obj/knife = player.spawn_obj_in_hand(/obj/item/kitchen/knife) + player.set_intent("harm") + player.click_on(camera) + TEST_ASSERT_LAST_CHATLOG(player, "You hit the security camera with the kitchen knife") + player.set_intent("help") + player.put_away(knife) + + var/obj/chem_dispenser = teleport_to_first(player, /obj/machinery/chem_dispenser) + player.retrieve(screwdriver) + player.click_on(chem_dispenser) + TEST_ASSERT_LAST_CHATLOG(player, "You open the maintenance hatch") + player.puppet.swap_hand() + player.spawn_obj_in_hand(/obj/item/reagent_containers/glass/beaker) + player.click_on(chem_dispenser) + TEST_ASSERT_LAST_CHATLOG(player, "Close the maintenance panel first") + player.puppet.swap_hand() + player.click_on(chem_dispenser) + player.puppet.swap_hand() + player.click_on(chem_dispenser) + TEST_ASSERT_LAST_CHATLOG(player, "You set the beaker on the machine") + player.put_away(screwdriver) + + var/obj/upload_console = teleport_to_first(player, /obj/machinery/computer/aiupload) + var/obj/ai_module = player.spawn_obj_in_hand(/obj/item/ai_module/asimov) + player.click_on(upload_console) + TEST_ASSERT_LAST_CHATLOG(player, "No AI selected") + qdel(ai_module) + player.retrieve(knife) + player.set_intent("harm") + player.click_on(upload_console) + TEST_ASSERT_LAST_CHATLOG(player, "AI upload console with the kitchen knife") + player.put_away(knife) + + var/obj/machinery/cell_charger/cell_charger = teleport_to_first(player, /obj/machinery/cell_charger) + var/obj/cell = player.spawn_obj_in_hand(/obj/item/stock_parts/cell) + player.click_on(cell_charger) + TEST_ASSERT_LAST_CHATLOG(player, "You insert a cell into the charger") + var/obj/cell2 = player.spawn_obj_in_hand(/obj/item/stock_parts/cell) + player.click_on(cell_charger) + TEST_ASSERT_LAST_CHATLOG(player, "already a cell in the charger") + qdel(cell2) + player.click_on(cell_charger) + TEST_ASSERT_NULL(cell_charger.charging, "cell charger still charging") + qdel(cell) + player.retrieve(screwdriver) + player.click_on(cell_charger) + player.put_away(screwdriver) + rped = player.spawn_obj_in_hand(/obj/item/storage/part_replacer/tier4) + player.click_on(cell_charger) + TEST_ASSERT_LAST_CHATLOG(player, "replaced with quadratic capacitor") + qdel(rped) + + player.puppet.forceMove(top_right.loc) + var/turf/wall = player.change_turf_nearby(/turf/simulated/wall, EAST) + player.spawn_obj_in_hand(/obj/item/mounted/frame/firealarm) + admin_area.requires_power = TRUE + player.click_on(wall) + admin_area.requires_power = FALSE + player.spawn_obj_in_hand(/obj/item/firealarm_electronics) + var/obj/firealarm_frame = player.find_nearby(/obj/machinery/firealarm) + player.click_on(firealarm_frame) + TEST_ASSERT_LAST_CHATLOG(player, "You insert the circuit") + var/obj/cables = player.spawn_obj_in_hand(/obj/item/stack/cable_coil/ten) + player.click_on(firealarm_frame) + TEST_ASSERT_LAST_CHATLOG(player, "You wire") + qdel(cables) + player.retrieve(screwdriver) + player.click_on(firealarm_frame) + TEST_ASSERT_LAST_CHATLOG(player, "You close the panel") diff --git a/code/tests/game_tests.dm b/code/tests/game_tests.dm index 0bbe3fff14c8..d482918253ff 100644 --- a/code/tests/game_tests.dm +++ b/code/tests/game_tests.dm @@ -6,6 +6,7 @@ #include "_game_test.dm" #include "atmos\test_ventcrawl.dm" #include "attack_chain\test_attack_chain_cult_dagger.dm" +#include "attack_chain\test_attack_chain_machinery.dm" #include "attack_chain\test_attack_chain_turf.dm" #include "attack_chain\test_attack_chain_vehicles.dm" #include "games\test_cards.dm" diff --git a/icons/mob/clothing/species/tajaran/mask.dmi b/icons/mob/clothing/species/tajaran/mask.dmi index 995c54a7c8f7..67d8ff62498f 100644 Binary files a/icons/mob/clothing/species/tajaran/mask.dmi and b/icons/mob/clothing/species/tajaran/mask.dmi differ diff --git a/icons/mob/robots.dmi b/icons/mob/robots.dmi index add3bd451903..f9a134556312 100644 Binary files a/icons/mob/robots.dmi and b/icons/mob/robots.dmi differ diff --git a/icons/obj/robot_parts.dmi b/icons/obj/robot_parts.dmi index d243eed6ef63..83545e4d75d2 100644 Binary files a/icons/obj/robot_parts.dmi and b/icons/obj/robot_parts.dmi differ diff --git a/icons/turf/floors.dmi b/icons/turf/floors.dmi index 720c03b1c500..8d0bc1d7b9b9 100644 Binary files a/icons/turf/floors.dmi and b/icons/turf/floors.dmi differ diff --git a/icons/turf/walls/backrooms_wall.dmi b/icons/turf/walls/backrooms_wall.dmi new file mode 100644 index 000000000000..af01ff0a0140 Binary files /dev/null and b/icons/turf/walls/backrooms_wall.dmi differ diff --git a/modular_ss220/antagonists/code/vox_raider/objects/vox_shop.dm b/modular_ss220/antagonists/code/vox_raider/objects/vox_shop.dm index 64a7e22ee851..b91022bd53d6 100644 --- a/modular_ss220/antagonists/code/vox_raider/objects/vox_shop.dm +++ b/modular_ss220/antagonists/code/vox_raider/objects/vox_shop.dm @@ -81,12 +81,12 @@ /obj/machinery/vox_shop/attack_ai(mob/user) return FALSE -/obj/machinery/vox_shop/attackby__legacy__attackchain(obj/item/O, mob/user, params) - if(isvoxcash(O)) +/obj/machinery/vox_shop/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(isvoxcash(used)) user.do_attack_animation(src) - insert_cash(O, user) - return TRUE - . = ..() + insert_cash(used, user) + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/vox_shop/proc/insert_cash(obj/item/stack/vox_cash, mob/user) visible_message("[user] загрузил [vox_cash] в [src].") diff --git a/modular_ss220/balance/code/species/machine.dm b/modular_ss220/balance/code/species/machine.dm index cd73b7616515..2bc41b26fee3 100644 --- a/modular_ss220/balance/code/species/machine.dm +++ b/modular_ss220/balance/code/species/machine.dm @@ -11,8 +11,8 @@ new /obj/item/stack/cable_coil/five(src) new /obj/item/flashlight/flare/glowstick/emergency(src) -/obj/machinery/recharger/attackby__legacy__attackchain(obj/item/G, mob/user, params) - if(istype(G, /obj/item/melee/baton/electrostaff)) - to_chat(user, span_notice("[G] не имеет внешних разъемов для подзарядки.")) - return - . = ..() +/obj/machinery/recharger/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/melee/baton/electrostaff)) + to_chat(user, span_notice("[used] не имеет внешних разъемов для подзарядки.")) + return ITEM_INTERACT_COMPLETE + return ..() diff --git a/modular_ss220/detective_rework/code/machines.dm b/modular_ss220/detective_rework/code/machines.dm index a73ccf129c03..54c1ce1ba145 100644 --- a/modular_ss220/detective_rework/code/machines.dm +++ b/modular_ss220/detective_rework/code/machines.dm @@ -60,20 +60,19 @@ component_parts += new /obj/item/stock_parts/micro_laser(null) RefreshParts() -/obj/machinery/dnaforensics/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob) - +/obj/machinery/dnaforensics/item_interaction(mob/living/user, obj/item/used, list/modifiers) if(swab) to_chat(user, span_warning("Внутри сканера уже есть пробирка.")) - return + return ITEM_INTERACT_COMPLETE - if(istype(W, /obj/item/forensics/swab)) - to_chat(user, span_notice("Вы вставляете [W] в ДНК анализатор.")) - user.unequip(W) - W.forceMove(src) - swab = W + if(istype(used, /obj/item/forensics/swab)) + to_chat(user, span_notice("Вы вставляете [used] в ДНК анализатор.")) + user.unequip(used) + used.forceMove(src) + swab = used update_icon() - return - ..() + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/dnaforensics/attack_hand(mob/user) @@ -183,22 +182,20 @@ component_parts += new /obj/item/stack/sheet/glass(null) RefreshParts() -/obj/machinery/microscope/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob) - +/obj/machinery/microscope/item_interaction(mob/living/user, obj/item/used, list/modifiers) if(sample) to_chat(user, span_warning("В микроскопе уже есть образец!")) - return + return ITEM_INTERACT_COMPLETE - if(istype(W, /obj/item/forensics/swab)|| istype(W, /obj/item/sample/fibers) || istype(W, /obj/item/sample/print)) + if(istype(used, /obj/item/forensics/swab)|| istype(used, /obj/item/sample/fibers) || istype(used, /obj/item/sample/print)) add_fingerprint(user) - to_chat(user, span_notice("Вы вставили [W] в микроскоп.")) - user.unequip(W) - W.forceMove(src) - sample = W + to_chat(user, span_notice("Вы вставили [used] в микроскоп.")) + user.unequip(used) + used.forceMove(src) + sample = used update_icon() - - return - ..() + return ITEM_INTERACT_COMPLETE + return ..() /obj/machinery/microscope/attack_hand(mob/user) diff --git a/modular_ss220/food_and_drinks/code/food/food.dm b/modular_ss220/food_and_drinks/code/food/food.dm index 1c5e6b79efce..3c08ee0152a3 100644 --- a/modular_ss220/food_and_drinks/code/food/food.dm +++ b/modular_ss220/food_and_drinks/code/food/food.dm @@ -183,7 +183,7 @@ /obj/item/food/meatsteak, /obj/item/food/meatsteak, /obj/item/food/grown/cabbage, - /obj/item/food/onion_slice, + /obj/item/food/sliced/onion_slice, /obj/item/food/grown/tomato, /obj/item/food/grown/carrot, /obj/item/food/sliceable/flatdough) @@ -204,8 +204,8 @@ items = list( /obj/item/food/meatsteak, /obj/item/food/meatsteak, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge, /obj/item/food/grown/cabbage, /obj/item/food/grown/tomato, /obj/item/food/sliceable/flatdough) @@ -229,7 +229,7 @@ /obj/item/food/grown/mushroom, /obj/item/food/grown/mushroom, /obj/item/food/grown/cabbage, - /obj/item/food/onion_slice, + /obj/item/food/sliced/onion_slice, /obj/item/food/grown/tomato, /obj/item/food/grown/carrot, /obj/item/food/sliceable/flatdough) @@ -249,8 +249,8 @@ reagents = list("sodiumchloride" = 1, "blackpepper" = 1) items = list( /obj/item/food/grown/cabbage, - /obj/item/food/onion_slice, - /obj/item/food/onion_slice, + /obj/item/food/sliced/onion_slice, + /obj/item/food/sliced/onion_slice, /obj/item/food/grown/tomato, /obj/item/food/grown/tomato, /obj/item/food/grown/carrot, @@ -386,7 +386,7 @@ /obj/item/food/dough, /obj/item/food/meat, /obj/item/organ/internal/liver/vulpkanin, - /obj/item/food/cheesewedge) + /obj/item/food/sliced/cheesewedge) result = /obj/item/food/vulpix/cheese // Bacon Vulpixes @@ -449,7 +449,7 @@ reagents = list("herbsmix" = 1, "garlic_sauce" = 1) items = list( /obj/item/food/sliceable/flatdough, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, /obj/item/food/salmonmeat, /obj/item/food/salmonmeat, /obj/item/food/boiled_shrimp, @@ -479,7 +479,7 @@ reagents = list("mushroom_sauce" = 1) items = list( /obj/item/food/sliceable/flatdough, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, /obj/item/food/grown/mushroom, /obj/item/food/grown/mushroom, /obj/item/food/raw_bacon, @@ -509,8 +509,8 @@ reagents = list("herbsmix" = 1, "tomato_sauce" = 1, "blackpepper" = 1) items = list( /obj/item/food/sliceable/flatdough, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge, /obj/item/food/tajaroni, /obj/item/food/grown/olive,) result = /obj/item/food/sliceable/pizza/tajaroni @@ -538,7 +538,7 @@ reagents = list("herbsmix" = 1, "diablo_sauce" = 1) items = list( /obj/item/food/sliceable/flatdough, - /obj/item/food/cheesewedge, + /obj/item/food/sliced/cheesewedge, /obj/item/food/grown/tomato, /obj/item/food/grown/chili, /obj/item/food/meatball, @@ -695,7 +695,7 @@ reagents = list("sodiumchloride" = 1) items = list( /obj/item/food/tortilla, - /obj/item/food/cheesewedge) + /obj/item/food/sliced/cheesewedge) result = /obj/item/food/cheesenachos // Cuban Nachos @@ -750,8 +750,8 @@ /datum/recipe/microwave/cheeseburrito items = list( /obj/item/food/tortilla, - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge) + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge) result = /obj/item/food/cheeseburrito // Plasma Buritto diff --git a/modular_ss220/food_and_drinks/code/food/ingredients.dm b/modular_ss220/food_and_drinks/code/food/ingredients.dm index d1f16bdfef1b..eaf58aa9cd43 100644 --- a/modular_ss220/food_and_drinks/code/food/ingredients.dm +++ b/modular_ss220/food_and_drinks/code/food/ingredients.dm @@ -125,8 +125,8 @@ /datum/recipe/microwave/cheese_sauce reagents = list("milk" = 15, "cream" = 5) items = list( - /obj/item/food/cheesewedge, - /obj/item/food/cheesewedge) + /obj/item/food/sliced/cheesewedge, + /obj/item/food/sliced/cheesewedge) result = /obj/item/reagent_containers/condiment/cheese_sauce // Mushroom Sauce diff --git a/modular_ss220/gateway/code/gateway.dm b/modular_ss220/gateway/code/gateway.dm index a77b56f8bf5c..2e2419ca5c31 100644 --- a/modular_ss220/gateway/code/gateway.dm +++ b/modular_ss220/gateway/code/gateway.dm @@ -165,10 +165,10 @@ GLOBAL_DATUM_INIT(the_gateway, /obj/machinery/gateway/centerstation, null) return -/obj/machinery/gateway/centerstation/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) - if(istype(W,/obj/item/multitool)) +/obj/machinery/gateway/centerstation/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/multitool)) to_chat(user, "The gate is already calibrated, there is no work for you to do here.") - return + return ITEM_INTERACT_COMPLETE return ..() /////////////////////////////////////Away//////////////////////// @@ -288,13 +288,12 @@ GLOBAL_DATUM_INIT(the_gateway, /obj/machinery/gateway/centerstation, null) return TRUE return FALSE -/obj/machinery/gateway/centeraway/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) - if(istype(W,/obj/item/multitool)) +/obj/machinery/gateway/centeraway/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/multitool)) if(calibrated) to_chat(user, span_notice("The gate is already calibrated, there is no work for you to do here.")) - return else to_chat(user, span_boldannounce("Recalibration successful!") + span_notice(": This gate's systems have been fine tuned. Travel to this gate will now be on target.")) calibrated = TRUE - return + return ITEM_INTERACT_COMPLETE return ..() diff --git a/modular_ss220/jukebox/code/jukebox.dm b/modular_ss220/jukebox/code/jukebox.dm index e660c80940fd..77604897882f 100644 --- a/modular_ss220/jukebox/code/jukebox.dm +++ b/modular_ss220/jukebox/code/jukebox.dm @@ -80,27 +80,33 @@ if(anchored) return ui_interact(user) -/obj/machinery/jukebox/attackby__legacy__attackchain(obj/item/item, mob/user, params) - if(istype(item, /obj/item/coin)) +/obj/machinery/jukebox/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/coin)) if(payment) to_chat(user, span_info("Монетка уже вставлена.")) - return + return ITEM_INTERACT_COMPLETE + if(!user.drop_item()) to_chat(user, span_warning("Монетка выскользнула с вашей руки!")) - return - item.forceMove(src) - payment = item - to_chat(user, span_notice("Вы вставили [item] в музыкальный автомат.")) + return ITEM_INTERACT_COMPLETE + + used.forceMove(src) + payment = used + to_chat(user, span_notice("Вы вставили [used] в музыкальный автомат.")) playsound(src, 'modular_ss220/aesthetics_sounds/sound/coin_accept.ogg', 50, TRUE) ui_interact(user) add_fingerprint(user) - if(item.GetID()) + return ITEM_INTERACT_COMPLETE + + if(used.GetID()) if(allowed(user)) need_coin = !need_coin to_chat(user, span_notice("Вы [need_coin ? "вернули" : "сняли"] ограничения [need_coin ? "в" : "с"] [src].")) else to_chat(user, span_warning("Access denied.")) - return + return ITEM_INTERACT_COMPLETE + + return ..() /obj/machinery/jukebox/ui_state(mob/user) diff --git a/modular_ss220/maps220/code/spawners.dm b/modular_ss220/maps220/code/spawners.dm index f5c97f091793..b957eb71bc3f 100644 --- a/modular_ss220/maps220/code/spawners.dm +++ b/modular_ss220/maps220/code/spawners.dm @@ -7,9 +7,9 @@ loot = list( /obj/item/food/baguette, /obj/item/food/applepie, - /obj/item/food/bananabreadslice, - /obj/item/food/bananacakeslice, - /obj/item/food/carrotcakeslice, + /obj/item/food/sliced/banana_bread, + /obj/item/food/sliced/banana_cake, + /obj/item/food/sliced/carrot_cake, /obj/item/food/croissant, /obj/item/reagent_containers/drinks/cans/cola, ) diff --git a/modular_ss220/objects/code/papershredder.dm b/modular_ss220/objects/code/papershredder.dm index 50d5f0bad793..e6648e1b5266 100644 --- a/modular_ss220/objects/code/papershredder.dm +++ b/modular_ss220/objects/code/papershredder.dm @@ -18,22 +18,21 @@ /obj/item/book = 5 ) -/obj/machinery/papershredder/attackby__legacy__attackchain(obj/item/item, mob/user, params) - if(istype(item, /obj/item/storage)) +/obj/machinery/papershredder/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/storage)) add_fingerprint(user) - empty_bin(user, item) - return + empty_bin(user, used) + return ITEM_INTERACT_COMPLETE var/paper_result - if(item.type in shred_amounts) - paper_result = shred_amounts[item.type] + if(used.type in shred_amounts) + paper_result = shred_amounts[used.type] if(!paper_result) - . = ..() - return + return ..() if(paperamount == max_paper) to_chat(user, span_warning("[src] is full; please empty it before you continue.")) - return + return ITEM_INTERACT_COMPLETE paperamount += paper_result - qdel(item) + qdel(used) playsound(loc, 'modular_ss220/objects/sound/pshred.ogg', 75, 1) if(paperamount > max_paper) to_chat(user, span_danger("[src] was too full, and shredded paper goes everywhere!")) @@ -44,6 +43,7 @@ paperamount = max_paper update_icon() add_fingerprint(user) + return ITEM_INTERACT_COMPLETE /obj/machinery/papershredder/wrench_act(mob/user, obj/item/tool) . = TRUE diff --git a/paradise.dme b/paradise.dme index dc24365e61ef..469b612bd4be 100644 --- a/paradise.dme +++ b/paradise.dme @@ -2008,6 +2008,7 @@ #include "code\modules\games\unum.dm" #include "code\modules\hallucinations\hallucination_manager.dm" #include "code\modules\hallucinations\hallucinations.dm" +#include "code\modules\hallucinations\effects\backrooms.dm" #include "code\modules\hallucinations\effects\blind_rush_hallucination.dm" #include "code\modules\hallucinations\effects\common.dm" #include "code\modules\hallucinations\effects\grenades.dm" diff --git a/tgui/packages/tgui/interfaces/EFTPOS.js b/tgui/packages/tgui/interfaces/EFTPOS.js index d72cb52bf190..2c32259dde4a 100644 --- a/tgui/packages/tgui/interfaces/EFTPOS.js +++ b/tgui/packages/tgui/interfaces/EFTPOS.js @@ -37,7 +37,7 @@ export const EFTPOS = (props, context) => { const LockedView = (props, context) => { const { act, data } = useBackend(context); - const { transaction_amount, transaction_paid } = data; + const { transaction_amount, transaction_paid, can_offer } = data; return ( <> { ? 'This transaction has been processed successfully ' : 'Swipe your card to finish this transaction.'} + {(can_offer && ( + +
    Antagonist Positions
    Antagonist Positions
    [replacetext(role, " ", " ")][replacetext(role, " ", " ")][replacetext(role, " ", " ")][replacetext(role, " ", " ")][replacetext(role, " ", " ")][replacetext(role, " ", " ")][replacetext(role, " ", " ")][replacetext(role, " ", " ")]