diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm index 556bc6d0..9afecf1d 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_syndicate_base1.dmm @@ -715,6 +715,7 @@ "EZ" = (/obj/machinery/door/airlock/external{req_access_txt = "150"},/obj/structure/fans/tiny,/obj/effect/mapping_helpers/airlock/cyclelink_helper,/turf/open/floor/plating,/area/ruin/unpowered/syndicate_lava_base/arrivals) "IJ" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer3{dir = 1},/turf/closed/wall/mineral/plastitanium/nodiagonal,/area/ruin/unpowered/syndicate_lava_base/engineering) "Pa" = (/turf/closed/wall/mineral/plastitanium/nodiagonal,/area/ruin/unpowered/syndicate_lava_base/circuits) +"Rs" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer3{dir = 4},/obj/structure/cable/yellow{icon_state = "4-8"},/obj/effect/turf_decal/tile/red{dir = 1},/obj/effect/turf_decal/tile/red{dir = 4},/obj/machinery/vending/kink,/turf/open/floor/plasteel,/area/ruin/unpowered/syndicate_lava_base/arrivals) "RE" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 9},/turf/closed/wall/mineral/plastitanium/nodiagonal,/area/ruin/unpowered/syndicate_lava_base/engineering) "RV" = (/obj/structure/sign/warning/fire,/obj/machinery/atmospherics/pipe/simple/supply/hidden,/turf/closed/wall/mineral/plastitanium/nodiagonal,/area/ruin/unpowered/syndicate_lava_base/engineering) @@ -755,7 +756,7 @@ abababababababababababdGlvlwjylxjZjNlylzlAlBlCaklElFjyjpkQlGlHlIlJlKIJlLlMlNlOlt abababababababababababhalTlTjyjylUjZlVlWlXlYlZmambmcjyjpkQmdmelImfkQkUmgmhmimjmkmllbmmldjuababab ababababmnmnmnmpmpmpmpmnmqmrmsjymtknmumvmwlAmxjymyjyjymzkQmAmBmCmDmEIJmFmGmHmImJmKjujujujuababab abababadmnmMmnmPmPmQmRmnmSmSmTjymUjzmUjyahaijyjyjyjymXmYkTmZnalIlInbIJncndneRVngkDjuabababababab -abababmnmMmMmNaEnknlnmmonnnnnonpnpamnrjyjyjPjynsntnufDnwhWnynzaVaVcDIJjunDnEtWnFnGjuabababababab +abababmnmMmMmNaEnknlnmmonnnnnonpnpamnrjyjyjPjynsntRsfDnwhWnynzaVaVcDIJjunDnEtWnFnGjuabababababab abababmnnhninjninInJnKnLnOnPnQnNfPanaoarnunTnUnVnWnXfKauhXoaobfknBfBuBodoeofREldogjuabababababab abababmnmMmMmnohoiojokmnmTEZmTololcycCPacIopfXfXfXgVgWgXPaoralkQkQkQjujuotnEjujujuaqabababababab abababaymnmMmnaIouovmnmnmTaSPaPaPaPacJcKPamTgYgYgYgYcLmTmTmTmTmTgaiymTozoAoBoCababababababababab diff --git a/_maps/RandomRuins/SpaceRuins/spacehotel.dmm b/_maps/RandomRuins/SpaceRuins/spacehotel.dmm index 814364c6..800a595b 100644 --- a/_maps/RandomRuins/SpaceRuins/spacehotel.dmm +++ b/_maps/RandomRuins/SpaceRuins/spacehotel.dmm @@ -701,7 +701,7 @@ "ny" = (/obj/structure/table,/obj/item/reagent_containers/rag/towel{pixel_x = 4; pixel_y = 4},/turf/open/floor/plasteel,/area/ruin/space/has_grav/hotel/pool) "nz" = (/obj/structure/table,/obj/item/reagent_containers/rag/towel,/obj/item/reagent_containers/rag/towel{pixel_y = 3},/turf/open/floor/plasteel,/area/ruin/space/has_grav/hotel/pool) "nA" = (/obj/machinery/light,/obj/structure/table,/obj/item/reagent_containers/rag/towel,/turf/open/floor/plasteel,/area/ruin/space/has_grav/hotel/pool) -"nB" = (/turf/template_noop,/area/space) +"nB" = (/obj/machinery/vending/clothing,/turf/open/floor/wood,/area/ruin/space/has_grav/hotel/dock) "nC" = (/obj/effect/turf_decal/tile/neutral{dir = 8},/obj/effect/turf_decal/tile/neutral{dir = 1},/turf/open/floor/plasteel/dark,/area/ruin/space/has_grav/hotel/dock) "nD" = (/obj/effect/turf_decal/tile/neutral,/turf/open/floor/plasteel/dark,/area/ruin/space/has_grav/hotel/dock) "nE" = (/obj/effect/turf_decal/tile/neutral{dir = 1},/obj/effect/turf_decal/tile/neutral{dir = 4},/obj/effect/turf_decal/tile/red{dir = 8},/obj/effect/turf_decal/tile/red,/turf/open/floor/plasteel/dark,/area/ruin/space/has_grav/hotel/dock) @@ -715,9 +715,12 @@ "nM" = (/obj/machinery/door/airlock/maintenance{dir = 4; name = "Hotel Maintenance"; req_access_txt = "201"},/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/turf/open/floor/plating,/area/ruin/space/has_grav/hotel/pool) "nN" = (/obj/structure/chair/stool/bar,/obj/effect/turf_decal/tile/bar,/obj/effect/turf_decal/tile/bar{dir = 1},/obj/machinery/light{dir = 8},/turf/open/floor/plasteel,/area/ruin/space/has_grav/hotel/bar) "nO" = (/obj/machinery/light/floor{name = "ceiling light"},/turf/open/pool,/area/ruin/space/has_grav/hotel/pool) +"qs" = (/obj/machinery/vending/autodrobe/all_access,/turf/open/floor/wood,/area/ruin/space/has_grav/hotel/dock) "so" = (/obj/effect/turf_decal/tile/neutral{dir = 1},/obj/effect/turf_decal/tile/neutral,/obj/effect/turf_decal/tile/neutral{dir = 4},/obj/effect/turf_decal/tile/neutral{dir = 8},/turf/open/floor/plasteel/yellowsiding/corner{dir = 1},/area/ruin/space/has_grav/hotel/pool) "sN" = (/obj/machinery/door/airlock/external/glass,/obj/structure/cable/yellow{icon_state = "1-2"},/obj/effect/mapping_helpers/airlock/cyclelink_helper{dir = 1},/turf/open/floor/plating,/area/ruin/space/has_grav/hotel/power) +"ux" = (/obj/machinery/light/floor,/turf/open/pool,/area/ruin/space/has_grav/hotel/pool) "vL" = (/obj/structure/pool/ladder,/turf/open/pool,/area/ruin/space/has_grav/hotel/pool) +"wW" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/obj/machinery/vending/kink,/turf/open/floor/wood,/area/ruin/space/has_grav/hotel/dock) "Ao" = (/obj/effect/turf_decal/tile/neutral{dir = 1},/obj/effect/turf_decal/tile/neutral,/obj/effect/turf_decal/tile/neutral{dir = 4},/obj/effect/turf_decal/tile/neutral{dir = 8},/turf/open/floor/plasteel/yellowsiding,/area/ruin/space/has_grav/hotel/pool) "AM" = (/obj/structure/pool/ladder{dir = 2; pixel_y = 24},/turf/open/pool,/area/ruin/space/has_grav/hotel/pool) "Ek" = (/obj/effect/turf_decal/tile/neutral{dir = 1},/obj/effect/turf_decal/tile/neutral,/obj/effect/turf_decal/tile/neutral{dir = 4},/obj/effect/turf_decal/tile/neutral{dir = 8},/turf/open/floor/plasteel/yellowsiding/corner{dir = 4},/area/ruin/space/has_grav/hotel/pool) @@ -729,9 +732,12 @@ "Nn" = (/obj/effect/turf_decal/tile/neutral{dir = 1},/obj/effect/turf_decal/tile/neutral,/obj/effect/turf_decal/tile/neutral{dir = 4},/obj/effect/turf_decal/tile/neutral{dir = 8},/obj/structure/pool/Rboard,/turf/open/floor/plasteel/yellowsiding{dir = 8},/area/ruin/space/has_grav/hotel/pool) "ON" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/obj/effect/turf_decal/tile/neutral{dir = 1},/obj/effect/turf_decal/tile/neutral,/obj/effect/turf_decal/tile/neutral{dir = 4},/obj/effect/turf_decal/tile/neutral{dir = 8},/turf/open/floor/plasteel/yellowsiding/corner{dir = 8},/area/ruin/space/has_grav/hotel/pool) "Pn" = (/obj/structure/pool/Lboard,/turf/open/pool,/area/ruin/space/has_grav/hotel/pool) +"QK" = (/obj/machinery/vending/kink,/turf/open/floor/wood,/area/ruin/space/has_grav/hotel/dock) +"Tq" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/obj/machinery/vending/autodrobe/all_access,/turf/open/floor/wood,/area/ruin/space/has_grav/hotel/dock) "Vl" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/obj/effect/turf_decal/tile/neutral{dir = 1},/obj/effect/turf_decal/tile/neutral,/obj/effect/turf_decal/tile/neutral{dir = 4},/obj/effect/turf_decal/tile/neutral{dir = 8},/turf/open/floor/plasteel,/area/ruin/space/has_grav/hotel/pool) "Yx" = (/obj/effect/turf_decal/tile/neutral{dir = 1},/obj/effect/turf_decal/tile/neutral,/obj/effect/turf_decal/tile/neutral{dir = 4},/obj/effect/turf_decal/tile/neutral{dir = 8},/turf/open/floor/plasteel/yellowsiding/corner,/area/ruin/space/has_grav/hotel/pool) "Zb" = (/obj/structure/pool/ladder{dir = 8},/turf/open/pool,/area/ruin/space/has_grav/hotel/pool) +"Zx" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/obj/machinery/vending/clothing,/turf/open/floor/wood,/area/ruin/space/has_grav/hotel/dock) "ZS" = (/obj/effect/turf_decal/tile/neutral{dir = 1},/obj/effect/turf_decal/tile/neutral,/obj/effect/turf_decal/tile/neutral{dir = 4},/obj/effect/turf_decal/tile/neutral{dir = 8},/turf/open/floor/plasteel/yellowsiding{dir = 4},/area/ruin/space/has_grav/hotel/pool) (1,1,1) = {" @@ -765,7 +771,7 @@ aaaaaaabaaafagalcHcQawcZcZcZcZcZcZcZcZcZcZcZdcdcdcdcdcdcdcdcdcdccTcGcUdhdidididi aaaaaaabaaajctcweHeIeJeJeJeJeJeKawawaweLawawawawawawawawawaweMebeTeTdSeOgxeQeQgHgIeTeUeGeVeWgKhsgyfcfagLgKhsgyeWeGgfaaaafLabfbaaaaaaaa aaaaaaabaaajcHfdcJfeawckfffgawfhfififjfifififififififififjfictcwfpfpgMflhBhEhEhGhHfpfqfrfsftfufufueWeWeWfufufueWfvgfaaaaaaaafLfbaaaaaa aaaaaaabaaajcHcQfififjfifififififihZfxfxfyfzfiilioiAfEfFfGfHfIfJfMfMiDfMfMfMfMfMfMfNameGiFeWeWeWeWeWeWeWeWeWeWeWfvgfaaaaaaaafLfbaaaaaa -aaaaaaabacajcHcQfifPfQfRfRfSfQfQfTfxfxfxfxfxmYfGfGfGfGfGfGfUeTcFcFcFcFcFcFcFcFcFcFfVfKiGfXfufueWeWeWeWeWeWeWeWeWeGfvfvfvgfaafLfbaaaaaa +aaaaaaabacajcHcQfifPfQfRfRfSfQfQfTfxfxfxfxfxmYfGfGfGfGfGfGfUeTcFcFcFcFcFcFcFcFcFcFfVfKiGfXfufueWeWnBQKqseWeWeWeWeGfvfvfvgfaafLfbaaaaaa aaaaaaabaaajcHcQfifYfQfQfQfQfQfZfigafxgbgcfxfifHfUfHfHgdfHfHeTcFcFcRcFcFgecFcFcFcFcFcFiXfufufueWgheGeGeGgheWeWeWjbfugieGjgacabfbaaaaaa aaaaaaabaaajcHgjfigkglgmgnfQfQgofigafxgpgqfxfinNfGgrfGgrfGgreTcFcFdidigsdidididididididigtgugveWeWegjsggeWeWeWeWjufugyfvgfaafLfbaaaaaa aaaaaaabaaajcHcQfigkgzgAgBfQfQgkfigCfxgDgEfxfAfGfGfGfGfGfGfGeTcFcFdigFgGjwgJjzjUjVjWjXdigNgOgPeWgQgSgRhrnueWeWeWjYfugyfvgfaafLfbaaaaaa @@ -774,7 +780,7 @@ aaaaaaabacajhehfhghhhihjhkfQgAhlfihmhnfxfxfxhofGfGfGfGfGfGfGeTcFhpdihqgGgGgGgGgG aaaaaaabaaajcHcQfihtgzhuhvfQfQhwfigahnhxhyfxhzgrgXgYgZgXgYgZeTcFcFdihAmPhChDllhFlMlQlSdigNgOgPeWnJnGgwnInKeWeWeWjufugyfvgfaafLfbaaaaaa aaaaaaabaaajcHcQfifihIfifififififigahnhJhKfxhzfGfGfGfGfGfGfGeTcFcFdidimQdidididididididihLhMhNeWeWeghOggeWeWeWeWjYfugyfvgfaafLfbaaaaaa aaaaaaabaaajcHhPcJhQhRcJcJcJcJhSfihThngpgpfxhUhVhWhWhWhWhXhYeTcFcFcFcFmRmSmSmTcFcFmncFiXfufufueWgheGeGeGgheWeWeWmxfugieGjgacabfbaaaaaa -aaaaaaabaaajiaibicidiciciciciecQfiifhnfxfxfxhUigihihihihihiieTcFcFcFcFcFcFcFmUcFijikcLmAimininmKmKmKmKmKmKmKmKmMeGfvfvfvgfaafLfbaaaaaa +aaaaaaabaaajiaibicidiciciciciecQfiifhnfxfxfxhUigihihihihihiieTcFcFcFcFcFcFcFmUcFijikcLmAimininmKmKZxwWTqmKmKmKmMeGfvfvfvgfaafLfbaaaaaa aaaaaaabacipiqirisitiuiviwixircQfiiyhnfxizfxmVihihihiBihihiieTeTiCeTeTeTeTeTmWeTmXiEameGiPeWeWeWeWeWeWeWeWeWeWiQfvgfaaaaaaaafLfbaaaaaa aaaaaaaaabaaajiriHiIiJiJiKiLircQfifihIfififihUfififififififiamamamamamamamiMmWeTdSiNiOeGiPeWfufufueWeWeWfufufuiQfvgfaaaaaaaafLfbaaaaaa aaaaaaaaabaaajiriRiIiSiSiKiTirhPcJiUiVcJcJcJiWcJcJcJcJhQcJcJcJcJiYiZcJcJnLjamZjanajcjdeGjeeWgKhsgyeWeWjfgKhsgyjheGgfaaaafLabfbaaaaaaaa @@ -785,11 +791,11 @@ aaaaaaaaabaaajirkqkrksktkukvkwjGkxkykzkAklkBknknkCjPawcQjQjRjRkDkDkEkEkEkDnhnhnh aaaaaaaaabaaajirkHkHkHkIkHkHkJjGkKkkkLkMkNkmkOkPknjPawcQjQkQjRkDYxAoAoAoAoAoAoFhkRkSkSkSkSkSONVlkTkUjQjQjQjQjQjQacacacabaaaaaaaaaaaaaa aaaaaaaaabaaajirkVkWkXkYkZkHlajGlbkklcldkljGlelflgjPawcQjQjRjRlhZSliljIFIFAMIFIFIFAMIFIFIFliKinjjRnkjQlmlnlnlojQaaaaaaabaaaaaaaaaaaaaa aaaaaaabaaaaajirlplplqlplpkHsNjGlrkklskkkljGjGjGjGjPedcQjQjRjRlhZSIFIFIFIFIFIFIFIFIFnlIFIFIFKikDjRltjQlmlululojQaaaaabaaaaaaaaaaaaaaaa -aaaaabaalvaaajirkHkHkHkHkHkHajjGlwlxlxlylzjGjMjNlAjPawcQjQjRjRlhZSvLIFnOIFIFIFIFIFIFIFnOIFZbKinjjRnnjQlmlululojQaaaaabaaaaaaaaaaaaaaaa +aaaaabaalvaaajirkHkHkHkHkHkHajjGlwlxlxlylzjGjMjNlAjPawcQjQjRjRlhZSvLIFnOIFIFuxIFIFuxIFIFuxZbKinjjRnnjQlmlululojQaaaaabaaaaaaaaaaaaaaaa aaabaaaalBlClDlEaaaaaaaaaaaaajjGjGlFjGkxklkmknknknjPawcQjQjRjRkDZSIFIFIFIFIFIFIFIFIFIFIFIFIFKikDjRjRjQlGlHlHlIjQaaaaabaaaaaaaaaaaaaaaa aaabacacacacaclJagagagagagagaljGlKlLjGkxklkBknknkCjPawcQjQjRjRkDZSIFIFIFIFIFIFKoIFIFIFIFIFPnNnnjjRjRnolHlHlHlHjQacacabaaaaaaaaaaaaaaaa aaabaaaaaaaaaaajaaaaaaaaaaaaaajGlNlOjGkxklkmkOkPknjPawcQjQkQjRkDZSIFIFIFIFlPIFIFIFIFIFIFIFIFKikDjRkUjQnplHlHlRjQaaaaabaaaaaaaaaaaaaaaa -abaaaaaaaaaaaaajaaaaaaaaaaaaaajGnqlTjGlwlUjGlelflgjPcIfejQjRjRlhZSvLIFnOIFIFIFIFIFIFIFnOIFZbKinjjRjRjQjQjQjQjQjQaaaaabaaaaaaaaaaaaaaaa +abaaaaaaaaaaaaajaaaaaaaaaaaaaajGnqlTjGlwlUjGlelflgjPcIfejQjRjRlhZSvLIFnOIFIFuxIFIFuxIFIFuxZbKinjjRjRjQjQjQjQjQjQaaaaabaaaaaaaaaaaaaaaa abaclVlWlWlWlWlXlYlYlYlYlZacacjGjGjGjGjGjGjGjGjGjGjPcQmajQjRjRlhZSIFIFIFIFIFIFIFIFIFIFnrIFIFKikDjRjRjQmbmcmclRjQaaaaabaaaaaaaaaaaaaaaa abaaaaaaaaaaaaajaaaaaaaaaaaaaaaamdmemfmgmhmimjmkmlmmcQckjQjRjRlhZSliIFIFIFnmIFIFIFnmIFIFIFliKinjjRjRnslHlHlHlHjQaaaaabaaaaaaaaaaaaaaaa abaaaaaaaaaaaaajaaaaaaaaaaaaaaaamdmlmlmlmlmompmpmpmqhfcvjtmrjRkDEkIQIQIQIQIQIQIQIQIQIQIQIQIQsokDjRjRjQmslHlHmtjQaaaaabaaaaaaaaaaaaaaaa @@ -801,6 +807,6 @@ abaaaaaaaaaaaaajaaaaaaaaaaaaaaaaaaacaaaaaaaaacaaaaaaaaaaaaaaacaaaaaaaaaaacaaaaaa abaaaaaaaaaaaaajaaaaaaaaaaaaaaabababababababababaaaaaaaaaaaaacaaaaaaaaaaacaaaaaaaaaaacaaaaaaaaaaacaaaaaaaaaaaaacaaaaabaaaaaaaaaaaaaaaa abaclVlWlWlWlWajlYlYlYlYlZacabaaaaaaaaaaaaaaaaaaababababababababababababababababababababababababababababababababababaaaaaaaaaaaaaaaaaa abaaaaaaaaaaaamOaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaabababababaaacaaabababababaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaanBnBnBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaabababababaaacaaabababababaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaabababaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "} diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index 91cc89ce..1c05b2e2 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -2,10 +2,6 @@ #define SEND_GLOBAL_SIGNAL(sigtype, arguments...) ( SEND_SIGNAL(SSdcs, sigtype, ##arguments) ) -//shorthand -#define GET_COMPONENT_FROM(varname, path, target) var##path/##varname = ##target.GetComponent(##path) -#define GET_COMPONENT(varname, path) GET_COMPONENT_FROM(varname, path, src) - #define COMPONENT_INCOMPATIBLE 1 #define COMPONENT_NOTRANSFER 2 diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 6fb20a93..a7ff5668 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -40,7 +40,7 @@ return TRUE user.changeNext_move(CLICK_CD_MELEE) if(user.a_intent == INTENT_HARM && stat == DEAD && (butcher_results || guaranteed_butcher_results)) //can we butcher it? - GET_COMPONENT_FROM(butchering, /datum/component/butchering, I) + var/datum/component/butchering/butchering = I.GetComponent(/datum/component/butchering) if(butchering && butchering.butchering_enabled) to_chat(user, "You begin to butcher [src]...") playsound(loc, butchering.butcher_sound, 50, TRUE, -1) diff --git a/code/datums/components/infective.dm b/code/datums/components/infective.dm index cd5df822..ad2b7ded 100644 --- a/code/datums/components/infective.dm +++ b/code/datums/components/infective.dm @@ -6,21 +6,28 @@ /datum/component/infective/Initialize(list/datum/disease/_diseases, expire_in) if(islist(_diseases)) - diseases = diseases + diseases = _diseases else diseases = list(_diseases) if(expire_in) expire_time = world.time + expire_in QDEL_IN(src, expire_in) + + if(!ismovableatom(parent)) + return COMPONENT_INCOMPATIBLE + RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean) RegisterSignal(parent, COMSIG_MOVABLE_BUCKLE, .proc/try_infect_buckle) RegisterSignal(parent, COMSIG_MOVABLE_BUMP, .proc/try_infect_collide) RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, .proc/try_infect_crossed) - RegisterSignal(parent, COMSIG_ITEM_ATTACK_ZONE, .proc/try_infect_attack_zone) - RegisterSignal(parent, COMSIG_ITEM_ATTACK, .proc/try_infect_attack) - RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/try_infect_equipped) RegisterSignal(parent, COMSIG_MOVABLE_IMPACT_ZONE, .proc/try_infect_impact_zone) - RegisterSignal(parent, COMSIG_FOOD_EATEN, .proc/try_infect_eat) - RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean) + if(isitem(parent)) + RegisterSignal(parent, COMSIG_ITEM_ATTACK_ZONE, .proc/try_infect_attack_zone) + RegisterSignal(parent, COMSIG_ITEM_ATTACK, .proc/try_infect_attack) + RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/try_infect_equipped) + if(istype(parent, /obj/item/reagent_containers/food/snacks)) + RegisterSignal(parent, COMSIG_FOOD_EATEN, .proc/try_infect_eat) + else if(istype(parent, /obj/effect/decal/cleanable/blood/gibs)) + RegisterSignal(parent, COMSIG_GIBS_STREAK, .proc/try_infect_streak) /datum/component/infective/proc/try_infect_eat(datum/source, mob/living/eater, mob/living/feeder) for(var/V in diseases) @@ -73,6 +80,9 @@ if(isliving(M)) try_infect(M, BODY_ZONE_PRECISE_L_FOOT) +/datum/component/infective/proc/try_infect_streak(datum/source, list/directions, list/output_diseases) + output_diseases |= diseases + /datum/component/infective/proc/try_infect(mob/living/L, target_zone) for(var/V in diseases) L.ContactContractDisease(V, target_zone) diff --git a/code/datums/components/ntnet_interface.dm b/code/datums/components/ntnet_interface.dm index 62fc19ad..6159c7c2 100644 --- a/code/datums/components/ntnet_interface.dm +++ b/code/datums/components/ntnet_interface.dm @@ -6,7 +6,7 @@ return /datum/proc/ntnet_send(datum/netdata/data, netid) - GET_COMPONENT(NIC, /datum/component/ntnet_interface) + var/datum/component/ntnet_interface/NIC = GetComponent(/datum/component/ntnet_interface) if(!NIC) return FALSE return NIC.__network_send(data, netid) diff --git a/code/datums/components/rotation.dm b/code/datums/components/rotation.dm index 112915a2..4194d6a7 100644 --- a/code/datums/components/rotation.dm +++ b/code/datums/components/rotation.dm @@ -143,7 +143,7 @@ set name = "Rotate Clockwise" set category = "Object" set src in oview(1) - GET_COMPONENT(rotcomp,/datum/component/simple_rotation) + var/datum/component/simple_rotation/rotcomp = GetComponent(/datum/component/simple_rotation) if(rotcomp) rotcomp.HandRot(usr,ROTATION_CLOCKWISE) @@ -151,7 +151,7 @@ set name = "Rotate Counter-Clockwise" set category = "Object" set src in oview(1) - GET_COMPONENT(rotcomp,/datum/component/simple_rotation) + var/datum/component/simple_rotation/rotcomp = GetComponent(/datum/component/simple_rotation) if(rotcomp) rotcomp.HandRot(usr,ROTATION_COUNTERCLOCKWISE) @@ -159,6 +159,6 @@ set name = "Flip" set category = "Object" set src in oview(1) - GET_COMPONENT(rotcomp,/datum/component/simple_rotation) + var/datum/component/simple_rotation/rotcomp = GetComponent(/datum/component/simple_rotation) if(rotcomp) rotcomp.HandRot(usr,ROTATION_FLIP) diff --git a/code/datums/components/storage/storage.dm b/code/datums/components/storage/storage.dm index 04c8f5e3..98af707e 100644 --- a/code/datums/components/storage/storage.dm +++ b/code/datums/components/storage/storage.dm @@ -587,7 +587,7 @@ return FALSE if(isitem(host)) var/obj/item/IP = host - GET_COMPONENT_FROM(STR_I, /datum/component/storage, I) + var/datum/component/storage/STR_I = I.GetComponent(/datum/component/storage) if((I.w_class >= IP.w_class) && STR_I && !allow_big_nesting) if(!stop_messages) to_chat(M, "[IP] cannot hold [I] as it's a storage item of the same size!") diff --git a/code/datums/components/swarming.dm b/code/datums/components/swarming.dm index 17b2178d..64844c4c 100644 --- a/code/datums/components/swarming.dm +++ b/code/datums/components/swarming.dm @@ -12,7 +12,7 @@ RegisterSignal(parent, COMSIG_MOVABLE_UNCROSSED, .proc/leave_swarm) /datum/component/swarming/proc/join_swarm(datum/source, atom/movable/AM) - GET_COMPONENT_FROM(other_swarm, /datum/component/swarming, AM) + var/datum/component/swarming/other_swarm = AM.GetComponent(/datum/component/swarming) if(!other_swarm) return swarm() @@ -21,7 +21,7 @@ other_swarm.swarm_members |= src /datum/component/swarming/proc/leave_swarm(datum/source, atom/movable/AM) - GET_COMPONENT_FROM(other_swarm, /datum/component/swarming, AM) + var/datum/component/swarming/other_swarm = AM.GetComponent(/datum/component/swarming) if(!other_swarm || !(other_swarm in swarm_members)) return swarm_members -= other_swarm diff --git a/code/datums/traits/good.dm b/code/datums/traits/good.dm index 74276f17..e4aa0d9b 100644 --- a/code/datums/traits/good.dm +++ b/code/datums/traits/good.dm @@ -16,13 +16,13 @@ mood_quirk = TRUE /datum/quirk/apathetic/add() - GET_COMPONENT_FROM(mood, /datum/component/mood, quirk_holder) + var/datum/component/mood/mood = quirk_holder.GetComponent(/datum/component/mood) if(mood) mood.mood_modifier = 0.8 /datum/quirk/apathetic/remove() if(quirk_holder) - GET_COMPONENT_FROM(mood, /datum/component/mood, quirk_holder) + var/datum/component/mood/mood = quirk_holder.GetComponent(/datum/component/mood) if(mood) mood.mood_modifier = 1 //Change this once/if species get their own mood modifiers. diff --git a/code/game/atoms.dm b/code/game/atoms.dm index f9ed7a31..7e63ccb3 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -554,7 +554,7 @@ /atom/proc/component_storage_contents_dump_act(datum/component/storage/src_object, mob/user) var/list/things = src_object.contents() var/datum/progressbar/progress = new(user, things.len, src) - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) while (do_after(user, 10, TRUE, src, FALSE, CALLBACK(STR, /datum/component/storage.proc/handle_mass_item_insertion, things, src_object, user, progress))) stoplag(1) qdel(progress) diff --git a/code/game/gamemodes/clown_ops/clown_weapons.dm b/code/game/gamemodes/clown_ops/clown_weapons.dm index 60ae5685..6e409951 100644 --- a/code/game/gamemodes/clown_ops/clown_weapons.dm +++ b/code/game/gamemodes/clown_ops/clown_weapons.dm @@ -39,12 +39,12 @@ /obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/Initialize() . = ..() - GET_COMPONENT(bananium, /datum/component/material_container) + var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container) bananium.insert_amount(max_recharge, MAT_BANANIUM) START_PROCESSING(SSobj, src) /obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/process() - GET_COMPONENT(bananium, /datum/component/material_container) + var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container) var/bananium_amount = bananium.amount(MAT_BANANIUM) if(bananium_amount < max_recharge) bananium.insert_amount(min(recharge_rate, max_recharge - bananium_amount), MAT_BANANIUM) @@ -73,19 +73,19 @@ /obj/item/melee/transforming/energy/sword/bananium/Initialize() . = ..() AddComponent(/datum/component/slippery, 60, GALOSHES_DONT_HELP) - GET_COMPONENT(slipper, /datum/component/slippery) + var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) slipper.signal_enabled = active /obj/item/melee/transforming/energy/sword/bananium/attack(mob/living/M, mob/living/user) ..() if(active) - GET_COMPONENT(slipper, /datum/component/slippery) + var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) slipper.Slip(M) /obj/item/melee/transforming/energy/sword/bananium/throw_impact(atom/hit_atom, throwingdatum) . = ..() if(active) - GET_COMPONENT(slipper, /datum/component/slippery) + var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) slipper.Slip(hit_atom) /obj/item/melee/transforming/energy/sword/bananium/attackby(obj/item/I, mob/living/user, params) @@ -98,7 +98,7 @@ /obj/item/melee/transforming/energy/sword/bananium/transform_weapon(mob/living/user, supress_message_text) ..() - GET_COMPONENT(slipper, /datum/component/slippery) + var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) slipper.signal_enabled = active /obj/item/melee/transforming/energy/sword/bananium/ignition_effect(atom/A, mob/user) @@ -108,7 +108,7 @@ if(!active) transform_weapon(user, TRUE) user.visible_message("[user] is [pick("slitting [user.p_their()] stomach open with", "falling on")] [src]! It looks like [user.p_theyre()] trying to commit seppuku, but the blade slips off of [user.p_them()] harmlessly!") - GET_COMPONENT(slipper, /datum/component/slippery) + var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) slipper.Slip(user) return SHAME @@ -130,12 +130,12 @@ /obj/item/shield/energy/bananium/Initialize() . = ..() AddComponent(/datum/component/slippery, 60, GALOSHES_DONT_HELP) - GET_COMPONENT(slipper, /datum/component/slippery) + var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) slipper.signal_enabled = active /obj/item/shield/energy/bananium/attack_self(mob/living/carbon/human/user) ..() - GET_COMPONENT(slipper, /datum/component/slippery) + var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) slipper.signal_enabled = active /obj/item/shield/energy/bananium/throw_at(atom/target, range, speed, mob/thrower, spin=1) @@ -149,7 +149,7 @@ if(active) var/caught = hit_atom.hitby(src, FALSE, FALSE, throwingdatum=throwingdatum) if(iscarbon(hit_atom) && !caught)//if they are a carbon and they didn't catch it - GET_COMPONENT(slipper, /datum/component/slippery) + var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery) slipper.Slip(hit_atom) if(thrownby && !caught) throw_at(thrownby, throw_range+2, throw_speed, null, 1) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 1cbbdfda..29faa1f7 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -80,7 +80,7 @@ popup.open() /obj/machinery/autolathe/on_deconstruction() - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.retrieve_all() /obj/machinery/autolathe/attackby(obj/item/O, mob/user, params) @@ -164,7 +164,7 @@ var/power = max(2000, (metal_cost+glass_cost)*multiplier/5) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) if((materials.amount(MAT_METAL) >= metal_cost*multiplier*coeff) && (materials.amount(MAT_GLASS) >= glass_cost*multiplier*coeff)) busy = TRUE use_power(power) @@ -188,7 +188,7 @@ return /obj/machinery/autolathe/proc/make_item(power, metal_cost, glass_cost, multiplier, coeff, is_stack) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/atom/A = drop_location() use_power(power) var/list/materials_used = list(MAT_METAL=metal_cost*coeff*multiplier, MAT_GLASS=glass_cost*coeff*multiplier) @@ -213,7 +213,7 @@ var/T = 0 for(var/obj/item/stock_parts/matter_bin/MB in component_parts) T += MB.rating*75000 - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.max_amount = T T=1.2 for(var/obj/item/stock_parts/manipulator/M in component_parts) @@ -262,7 +262,7 @@ dat += "[D.name]" if(ispath(D.build_path, /obj/item/stack)) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/max_multiplier = min(D.maxstack, D.materials[MAT_METAL] ?round(materials.amount(MAT_METAL)/D.materials[MAT_METAL]):INFINITY,D.materials[MAT_GLASS]?round(materials.amount(MAT_GLASS)/D.materials[MAT_GLASS]):INFINITY) if (max_multiplier>10 && !disabled) dat += " x10" @@ -294,7 +294,7 @@ dat += "[D.name]" if(ispath(D.build_path, /obj/item/stack)) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/max_multiplier = min(D.maxstack, D.materials[MAT_METAL] ?round(materials.amount(MAT_METAL)/D.materials[MAT_METAL]):INFINITY,D.materials[MAT_GLASS]?round(materials.amount(MAT_GLASS)/D.materials[MAT_GLASS]):INFINITY) if (max_multiplier>10 && !disabled) dat += " x10" @@ -309,7 +309,7 @@ return dat /obj/machinery/autolathe/proc/materials_printout() - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/dat = "Total amount: [materials.total_amount] / [materials.max_amount] cm3
" for(var/mat_id in materials.materials) var/datum/material/M = materials.materials[mat_id] @@ -322,7 +322,7 @@ var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : prod_coeff) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) if(D.materials[MAT_METAL] && (materials.amount(MAT_METAL) < (D.materials[MAT_METAL] * coeff * amount))) return FALSE if(D.materials[MAT_GLASS] && (materials.amount(MAT_GLASS) < (D.materials[MAT_GLASS] * coeff * amount))) @@ -380,4 +380,4 @@ //Called when the object is constructed by an autolathe //Has a reference to the autolathe so you can do !!FUN!! things with hacked lathes /obj/item/proc/autolathe_crafted(obj/machinery/autolathe/A) - return \ No newline at end of file + return diff --git a/code/game/machinery/computer/telecrystalconsoles.dm b/code/game/machinery/computer/telecrystalconsoles.dm index 1f015d35..f3af0f9b 100644 --- a/code/game/machinery/computer/telecrystalconsoles.dm +++ b/code/game/machinery/computer/telecrystalconsoles.dm @@ -33,7 +33,7 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E if(uplinkholder) to_chat(user, "[src] already has an uplink in it.") return - GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, I) + var/datum/component/uplink/hidden_uplink = I.GetComponent(/datum/component/uplink) if(hidden_uplink) if(!user.transferItemToLoc(I, src)) return @@ -57,7 +57,7 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E /obj/machinery/computer/telecrystals/uplinker/proc/donateTC(amt, addLog = 1) if(uplinkholder && linkedboss) - GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, uplinkholder) + var/datum/component/uplink/hidden_uplink = uplinkholder.GetComponent(/datum/component/uplink) if(amt < 0) linkedboss.storedcrystals += hidden_uplink.telecrystals if(addLog) @@ -71,7 +71,7 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E /obj/machinery/computer/telecrystals/uplinker/proc/giveTC(amt, addLog = 1) if(uplinkholder && linkedboss) - GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, uplinkholder) + var/datum/component/uplink/hidden_uplink = uplinkholder.GetComponent(/datum/component/uplink) if(amt < 0) hidden_uplink.telecrystals += linkedboss.storedcrystals if(addLog) @@ -94,7 +94,7 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E dat += "No linked management consoles detected. Scan for uplink stations using the management console.

" if(uplinkholder) - GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, uplinkholder) + var/datum/component/uplink/hidden_uplink = uplinkholder.GetComponent(/datum/component/uplink) dat += "[hidden_uplink.telecrystals] telecrystals remain in this uplink.
" if(linkedboss) dat += "Donate TC: 1 | 5 | All" @@ -170,7 +170,7 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E for(var/obj/machinery/computer/telecrystals/uplinker/A in TCstations) dat += "[A.name] | " if(A.uplinkholder) - GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, A.uplinkholder) + var/datum/component/uplink/hidden_uplink = A.uplinkholder.GetComponent(/datum/component/uplink) dat += "[hidden_uplink.telecrystals] telecrystals." if(storedcrystals) dat+= "
Add TC: 1 | 5 | 10 | All" diff --git a/code/game/machinery/droneDispenser.dm b/code/game/machinery/droneDispenser.dm index 3e2a6183..96ac8981 100644 --- a/code/game/machinery/droneDispenser.dm +++ b/code/game/machinery/droneDispenser.dm @@ -146,7 +146,7 @@ if((stat & (NOPOWER|BROKEN)) || !anchored) return - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) if(!materials.has_materials(using_materials)) return // We require more minerals @@ -211,7 +211,7 @@ /obj/machinery/droneDispenser/attackby(obj/item/I, mob/living/user) if(istype(I, /obj/item/crowbar)) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.retrieve_all() I.play_tool_sound(src) to_chat(user, "You retrieve the materials from [src].") diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index d6c73ce5..684988a5 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -32,10 +32,10 @@ mat_mod *= 50000 for(var/obj/item/stock_parts/manipulator/M in component_parts) amt_made = 12.5 * M.rating //% of materials salvaged - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.max_amount = mat_mod amount_produced = min(50, amt_made) + 50 - GET_COMPONENT(butchering, /datum/component/butchering) + var/datum/component/butchering/butchering = GetComponent(/datum/component/butchering) butchering.effectiveness = amount_produced butchering.bonus_modifier = amount_produced/5 @@ -142,7 +142,7 @@ qdel(L) return else - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/material_amount = materials.get_item_material_amount(I) if(!material_amount) qdel(I) @@ -193,7 +193,7 @@ L.Unconscious(100) L.adjustBruteLoss(crush_damage) if(L.stat == DEAD && (L.butcher_results || L.guaranteed_butcher_results)) - GET_COMPONENT(butchering, /datum/component/butchering) + var/datum/component/butchering/butchering = GetComponent(/datum/component/butchering) butchering.Butcher(src,L) /obj/machinery/recycler/deathtrap diff --git a/code/game/mecha/equipment/tools/mining_tools.dm b/code/game/mecha/equipment/tools/mining_tools.dm index d539e0a9..94440eb2 100644 --- a/code/game/mecha/equipment/tools/mining_tools.dm +++ b/code/game/mecha/equipment/tools/mining_tools.dm @@ -98,12 +98,12 @@ /obj/item/mecha_parts/mecha_equipment/drill/attach(obj/mecha/M) ..() - GET_COMPONENT_FROM(butchering, /datum/component/butchering, src) + var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering) butchering.butchering_enabled = TRUE /obj/item/mecha_parts/mecha_equipment/drill/detach(atom/moveto) ..() - GET_COMPONENT_FROM(butchering, /datum/component/butchering, src) + var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering) butchering.butchering_enabled = FALSE /obj/item/mecha_parts/mecha_equipment/drill/proc/drill_mob(mob/living/target, mob/user) @@ -113,7 +113,7 @@ if(target.stat == DEAD && target.getBruteLoss() >= 200) log_combat(user, target, "gibbed", name) if(LAZYLEN(target.butcher_results) || LAZYLEN(target.guaranteed_butcher_results)) - GET_COMPONENT_FROM(butchering, /datum/component/butchering, src) + var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering) butchering.Butcher(chassis, target) else target.gib() diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 46beb3a6..1824308a 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -454,4 +454,4 @@ return TRUE /obj/machinery/mecha_part_fabricator/maint - link_on_init = FALSE \ No newline at end of file + link_on_init = FALSE diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index 6b89c920..3c9b0231 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -51,7 +51,7 @@ /obj/mecha/working/ripley/update_icon() ..() - GET_COMPONENT(C,/datum/component/armor_plate) + var/datum/component/armor_plate/C = GetComponent(/datum/component/armor_plate) if (C.amount) cut_overlays() if(C.amount < 3) diff --git a/code/game/objects/effects/decals/cleanable/aliens.dm b/code/game/objects/effects/decals/cleanable/aliens.dm index 4301709f..022cc0ba 100644 --- a/code/game/objects/effects/decals/cleanable/aliens.dm +++ b/code/game/objects/effects/decals/cleanable/aliens.dm @@ -26,15 +26,13 @@ add_overlay(flesh) /obj/effect/decal/cleanable/blood/gibs/xeno/streak(list/directions) - set waitfor = 0 + set waitfor = FALSE + var/list/diseases = list() + SEND_SIGNAL(src, COMSIG_GIBS_STREAK, directions, diseases) var/direction = pick(directions) - for(var/i = 0, i < pick(1, 200; 2, 150; 3, 50), i++) + for(var/i in 0 to pick(0, 200; 1, 150; 2, 50)) sleep(2) if(i > 0) - var/list/datum/disease/diseases - GET_COMPONENT(infective, /datum/component/infective) - if(infective) - diseases = infective.diseases var/obj/effect/decal/cleanable/blood/splatter/xeno/splat = new /obj/effect/decal/cleanable/blood/splatter/xeno(loc, diseases) splat.transfer_blood_dna(blood_DNA, diseases) if(!step_to(src, get_step(src, direction), 0)) diff --git a/code/game/objects/effects/decals/cleanable/gibs.dm b/code/game/objects/effects/decals/cleanable/gibs.dm index dc621f17..287bbd88 100644 --- a/code/game/objects/effects/decals/cleanable/gibs.dm +++ b/code/game/objects/effects/decals/cleanable/gibs.dm @@ -41,15 +41,13 @@ . = ..() /obj/effect/decal/cleanable/blood/gibs/proc/streak(list/directions) - set waitfor = 0 + set waitfor = FALSE + var/list/diseases = list() + SEND_SIGNAL(src, COMSIG_GIBS_STREAK, directions, diseases) var/direction = pick(directions) - for(var/i = 0, i < pick(1, 200; 2, 150; 3, 50), i++) + for(var/i in 0 to pick(0, 200; 1, 150; 2, 50)) sleep(2) if(i > 0) - var/list/datum/disease/diseases - GET_COMPONENT(infective, /datum/component/infective) - if(infective) - diseases = infective.diseases var/obj/effect/decal/cleanable/blood/splatter/splat = new /obj/effect/decal/cleanable/blood/splatter(loc, diseases) splat.transfer_blood_dna(blood_DNA, diseases) if(!step_to(src, get_step(src, direction), 0)) diff --git a/code/game/objects/items/control_wand.dm b/code/game/objects/items/control_wand.dm index fa452452..c98484b8 100644 --- a/code/game/objects/items/control_wand.dm +++ b/code/game/objects/items/control_wand.dm @@ -33,7 +33,7 @@ // Airlock remote works by sending NTNet packets to whatever it's pointed at. /obj/item/door_remote/afterattack(atom/A, mob/user) . = ..() - GET_COMPONENT_FROM(target_interface, /datum/component/ntnet_interface, A) + var/datum/component/ntnet_interface/target_interface = A.GetComponent(/datum/component/ntnet_interface) if(!target_interface) return diff --git a/code/game/objects/items/devices/PDA/virus_cart.dm b/code/game/objects/items/devices/PDA/virus_cart.dm index d85c5d72..28bc559b 100644 --- a/code/game/objects/items/devices/PDA/virus_cart.dm +++ b/code/game/objects/items/devices/PDA/virus_cart.dm @@ -70,7 +70,7 @@ difficulty++ //if cartridge has manifest access it has extra snowflake difficulty else difficulty += 2 - GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, target) + var/datum/component/uplink/hidden_uplink = target.GetComponent(/datum/component/uplink) if(!target.detonatable || prob(difficulty * 15) || (hidden_uplink)) U.show_message("An error flashes on your [src].", 1) else @@ -95,7 +95,7 @@ charges-- var/lock_code = "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]" to_chat(U, "Virus Sent! The unlock code to the target is: [lock_code]") - GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, target) + var/datum/component/uplink/hidden_uplink = target.GetComponent(/datum/component/uplink) if(!hidden_uplink) hidden_uplink = target.AddComponent(/datum/component/uplink) hidden_uplink.unlock_code = lock_code diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index f39d2ba0..dffbb46c 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -116,7 +116,7 @@ appearance = saved_appearance if(istype(M.buckled, /obj/vehicle)) var/obj/vehicle/V = M.buckled - GET_COMPONENT_FROM(VRD, /datum/component/riding, V) + var/datum/component/riding/VRD = V.GetComponent(/datum/component/riding) if(VRD) VRD.force_dismount(M) else diff --git a/code/game/objects/items/implants/implant_storage.dm b/code/game/objects/items/implants/implant_storage.dm index ec6b4d64..2a224e9c 100644 --- a/code/game/objects/items/implants/implant_storage.dm +++ b/code/game/objects/items/implants/implant_storage.dm @@ -19,7 +19,7 @@ for(var/X in target.implants) if(istype(X, type)) var/obj/item/implant/storage/imp_e = X - GET_COMPONENT_FROM(STR, /datum/component/storage, imp_e) + var/datum/component/storage/STR = imp_e.GetComponent(/datum/component/storage) if(!STR || (STR && STR.max_items < max_slot_stacking)) imp_e.AddComponent(/datum/component/storage/concrete/implant) qdel(src) diff --git a/code/game/objects/items/melee/transforming.dm b/code/game/objects/items/melee/transforming.dm index aabb930b..850810bd 100644 --- a/code/game/objects/items/melee/transforming.dm +++ b/code/game/objects/items/melee/transforming.dm @@ -69,7 +69,7 @@ var/datum/component/butchering/BT = LoadComponent(/datum/component/butchering) BT.butchering_enabled = TRUE else - GET_COMPONENT(BT, /datum/component/butchering) + var/datum/component/butchering/BT = GetComponent(/datum/component/butchering) if(BT) BT.butchering_enabled = FALSE transform_messages(user, supress_message_text) diff --git a/code/game/objects/items/religion.dm b/code/game/objects/items/religion.dm index f1f5f4d6..ddc49a45 100644 --- a/code/game/objects/items/religion.dm +++ b/code/game/objects/items/religion.dm @@ -168,7 +168,7 @@ /obj/item/storage/backpack/bannerpack/Initialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 27 //6 more then normal, for the tradeoff of declaring yourself an antag at all times. /obj/item/storage/backpack/bannerpack/red diff --git a/code/game/objects/items/stacks/telecrystal.dm b/code/game/objects/items/stacks/telecrystal.dm index c1fb3965..9b5ca2b0 100644 --- a/code/game/objects/items/stacks/telecrystal.dm +++ b/code/game/objects/items/stacks/telecrystal.dm @@ -9,10 +9,11 @@ item_flags = NOBLUDGEON /obj/item/stack/telecrystal/attack(mob/target, mob/user) - if(target == user) //You can't go around smacking people with crystals to find out if they have an uplink or not. - for(var/obj/item/implant/uplink/I in target) - if(I && I.imp_in) - GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, I) + if(target == user && isliving(user)) //You can't go around smacking people with crystals to find out if they have an uplink or not. + var/mob/living/L = user + for(var/obj/item/implant/uplink/I in L.implants) + if(I?.imp_in) + var/datum/component/uplink/hidden_uplink = I.GetComponent(/datum/component/uplink) if(hidden_uplink) hidden_uplink.telecrystals += amount use(amount) diff --git a/code/game/objects/items/storage/backpack.dm b/code/game/objects/items/storage/backpack.dm index 30e0c7df..95f3abbd 100644 --- a/code/game/objects/items/storage/backpack.dm +++ b/code/game/objects/items/storage/backpack.dm @@ -23,7 +23,7 @@ /obj/item/storage/backpack/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 21 STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_items = 21 @@ -34,7 +34,7 @@ /obj/item/storage/backpack/old/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 12 /obj/item/storage/backpack/holding @@ -56,7 +56,7 @@ /obj/item/storage/backpack/holding/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.allow_big_nesting = TRUE STR.max_w_class = WEIGHT_CLASS_GIGANTIC STR.max_combined_w_class = 35 @@ -84,7 +84,7 @@ /obj/item/storage/backpack/santabag/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_combined_w_class = 60 @@ -252,7 +252,7 @@ /obj/item/storage/backpack/satchel/bone/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 20 STR.max_items = 15 @@ -276,7 +276,7 @@ /obj/item/storage/backpack/satchel/flat/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 6 STR.cant_hold = typecacheof(list(/obj/item/storage/backpack/satchel/flat)) //muh recursive backpacks @@ -328,7 +328,7 @@ /obj/item/storage/backpack/duffelbag/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 30 /obj/item/storage/backpack/duffelbag/captain @@ -430,7 +430,7 @@ /obj/item/storage/backpack/duffelbag/syndie/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.silent = TRUE /obj/item/storage/backpack/duffelbag/syndie/hitman @@ -582,7 +582,7 @@ // For ClownOps. /obj/item/storage/backpack/duffelbag/clown/syndie/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) slowdown = 0 STR.silent = TRUE diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm index c95e93ec..948b9577 100644 --- a/code/game/objects/items/storage/bags.dm +++ b/code/game/objects/items/storage/bags.dm @@ -21,7 +21,7 @@ /obj/item/storage/bag/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.allow_quick_gather = TRUE STR.allow_quick_empty = TRUE STR.display_numerical_stacking = TRUE @@ -44,7 +44,7 @@ /obj/item/storage/bag/trash/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_SMALL STR.max_combined_w_class = 30 STR.max_items = 30 @@ -84,7 +84,7 @@ /obj/item/storage/bag/trash/bluespace/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 60 STR.max_items = 60 @@ -108,7 +108,7 @@ /obj/item/storage/bag/ore/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage/concrete/stack) + var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack) STR.allow_quick_empty = TRUE STR.can_hold = typecacheof(list(/obj/item/stack/ore)) STR.max_w_class = WEIGHT_CLASS_HUGE @@ -134,7 +134,7 @@ return if (istype(user.pulling, /obj/structure/ore_box)) box = user.pulling - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) if(STR) for(var/A in tile) if (!is_type_in_typecache(A, STR.can_hold)) @@ -164,7 +164,7 @@ /obj/item/storage/bag/ore/cyborg/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage/concrete/stack) + var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack) STR.allow_quick_empty = TRUE STR.can_hold = typecacheof(list(/obj/item/stack/ore)) STR.max_w_class = WEIGHT_CLASS_HUGE @@ -176,7 +176,7 @@ /obj/item/storage/bag/ore/large/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage/concrete/stack) + var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack) STR.allow_quick_empty = TRUE STR.can_hold = typecacheof(list(/obj/item/stack/ore)) STR.max_w_class = WEIGHT_CLASS_HUGE @@ -189,7 +189,7 @@ /obj/item/storage/bag/ore/holding/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage/concrete/stack) + var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack) STR.max_items = INFINITY STR.max_combined_w_class = INFINITY STR.max_combined_stack_amount = INFINITY @@ -207,7 +207,7 @@ /obj/item/storage/bag/plants/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_combined_w_class = 100 STR.max_items = 100 @@ -247,7 +247,7 @@ /obj/item/storage/bag/sheetsnatcher/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage/concrete/stack) + var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack) STR.allow_quick_empty = TRUE STR.can_hold = typecacheof(list(/obj/item/stack/sheet)) STR.cant_hold = typecacheof(list(/obj/item/stack/sheet/mineral/sandstone, /obj/item/stack/sheet/mineral/wood)) @@ -264,7 +264,7 @@ /obj/item/storage/bag/sheetsnatcher/borg/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage/concrete/stack) + var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack) STR.max_combined_stack_amount = 500 // ----------------------------- @@ -281,7 +281,7 @@ /obj/item/storage/bag/books/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_combined_w_class = 21 STR.max_items = 7 @@ -306,14 +306,14 @@ /obj/item/storage/bag/tray/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.insert_preposition = "on" /obj/item/storage/bag/tray/attack(mob/living/M, mob/living/user) . = ..() // Drop all the things. All of them. var/list/obj/item/oldContents = contents.Copy() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.quick_empty() // Make each item scatter a bit for(var/obj/item/I in oldContents) @@ -360,7 +360,7 @@ /obj/item/storage/bag/chemistry/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 200 STR.max_items = 50 STR.insert_preposition = "in" @@ -380,7 +380,7 @@ /obj/item/storage/bag/bio/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 200 STR.max_items = 25 STR.insert_preposition = "in" @@ -394,7 +394,7 @@ /obj/item/storage/bag/bio/holding/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = INFINITY STR.max_items = 100 @@ -417,4 +417,4 @@ STR.max_items = 50 STR.max_w_class = WEIGHT_CLASS_SMALL STR.insert_preposition = "in" - STR.can_hold = typecacheof(list(/obj/item/stack/ore/bluespace_crystal, /obj/item/assembly, /obj/item/stock_parts, /obj/item/reagent_containers/glass/beaker, /obj/item/stack/cable_coil, /obj/item/circuitboard, /obj/item/electronics)) \ No newline at end of file + STR.can_hold = typecacheof(list(/obj/item/stack/ore/bluespace_crystal, /obj/item/assembly, /obj/item/stock_parts, /obj/item/reagent_containers/glass/beaker, /obj/item/stack/cable_coil, /obj/item/circuitboard, /obj/item/electronics)) diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index 6397d599..1c3efc23 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -43,7 +43,7 @@ /obj/item/storage/belt/utility/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) var/static/list/can_hold = typecacheof(list( /obj/item/crowbar, /obj/item/screwdriver, @@ -127,7 +127,7 @@ /obj/item/storage/belt/medical/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_BULKY STR.can_hold = typecacheof(list( /obj/item/healthanalyzer, @@ -200,7 +200,7 @@ /obj/item/storage/belt/security/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 5 STR.max_w_class = WEIGHT_CLASS_NORMAL STR.can_hold = typecacheof(list( @@ -238,7 +238,7 @@ obj/item/storage/belt/slut/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 5 STR.max_w_class = WEIGHT_CLASS_NORMAL STR.can_hold = typecacheof(list( @@ -271,7 +271,7 @@ obj/item/storage/belt/slut/ComponentInitialize() /obj/item/storage/belt/mining/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.max_w_class = WEIGHT_CLASS_BULKY STR.max_combined_w_class = 20 @@ -328,7 +328,7 @@ obj/item/storage/belt/slut/ComponentInitialize() /obj/item/storage/belt/mining/primitive/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 5 /obj/item/storage/belt/soulstone @@ -339,7 +339,7 @@ obj/item/storage/belt/slut/ComponentInitialize() /obj/item/storage/belt/soulstone/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.can_hold = typecacheof(list( /obj/item/soulstone @@ -362,7 +362,7 @@ obj/item/storage/belt/slut/ComponentInitialize() /obj/item/storage/belt/champion/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 1 STR.can_hold = list( /obj/item/clothing/mask/luchador @@ -376,7 +376,7 @@ obj/item/storage/belt/slut/ComponentInitialize() /obj/item/storage/belt/military/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_SMALL /obj/item/storage/belt/military/snack @@ -389,7 +389,7 @@ obj/item/storage/belt/slut/ComponentInitialize() /obj/item/storage/belt/military/snack/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.max_w_class = WEIGHT_CLASS_SMALL STR.can_hold = typecacheof(list( @@ -457,7 +457,7 @@ obj/item/storage/belt/slut/ComponentInitialize() /obj/item/storage/belt/military/assault/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 /obj/item/storage/belt/durathread @@ -571,7 +571,7 @@ obj/item/storage/belt/slut/ComponentInitialize() /obj/item/storage/belt/grenade/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 30 STR.display_numerical_stacking = TRUE STR.max_combined_w_class = 60 @@ -623,7 +623,7 @@ obj/item/storage/belt/slut/ComponentInitialize() /obj/item/storage/belt/wands/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.can_hold = typecacheof(list( /obj/item/gun/magic/wand @@ -649,7 +649,7 @@ obj/item/storage/belt/slut/ComponentInitialize() /obj/item/storage/belt/janitor/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.max_w_class = WEIGHT_CLASS_BULKY // Set to this so the light replacer can fit. STR.can_hold = typecacheof(list( @@ -676,7 +676,7 @@ obj/item/storage/belt/slut/ComponentInitialize() /obj/item/storage/belt/bandolier/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 18 STR.display_numerical_stacking = TRUE STR.can_hold = typecacheof(list( @@ -692,7 +692,7 @@ obj/item/storage/belt/slut/ComponentInitialize() /obj/item/storage/belt/bandolier/durathread/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 32 STR.display_numerical_stacking = TRUE STR.can_hold = typecacheof(list( @@ -707,7 +707,7 @@ obj/item/storage/belt/slut/ComponentInitialize() /obj/item/storage/belt/medolier/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 15 STR.display_numerical_stacking = FALSE STR.can_hold = typecacheof(list( @@ -727,7 +727,7 @@ obj/item/storage/belt/slut/ComponentInitialize() /obj/item/storage/belt/holster/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 3 STR.max_w_class = WEIGHT_CLASS_NORMAL STR.can_hold = typecacheof(list( @@ -751,7 +751,7 @@ obj/item/storage/belt/slut/ComponentInitialize() /obj/item/storage/belt/fannypack/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 3 STR.max_w_class = WEIGHT_CLASS_SMALL @@ -818,7 +818,7 @@ obj/item/storage/belt/slut/ComponentInitialize() /obj/item/storage/belt/sabre/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 1 STR.rustle_sound = FALSE STR.max_w_class = WEIGHT_CLASS_BULKY @@ -875,7 +875,7 @@ obj/item/storage/belt/slut/ComponentInitialize() /obj/item/storage/belt/botany/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 8 STR.max_w_class = WEIGHT_CLASS_NORMAL STR.can_hold = typecacheof(list( diff --git a/code/game/objects/items/storage/book.dm b/code/game/objects/items/storage/book.dm index 85a06f0c..c658eee3 100644 --- a/code/game/objects/items/storage/book.dm +++ b/code/game/objects/items/storage/book.dm @@ -11,7 +11,7 @@ /obj/item/storage/book/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 1 /obj/item/storage/book/attack_self(mob/user) diff --git a/code/game/objects/items/storage/briefcase.dm b/code/game/objects/items/storage/briefcase.dm index 81a3d224..a0ec1c23 100644 --- a/code/game/objects/items/storage/briefcase.dm +++ b/code/game/objects/items/storage/briefcase.dm @@ -17,7 +17,7 @@ /obj/item/storage/briefcase/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_combined_w_class = 21 @@ -48,7 +48,7 @@ /obj/item/storage/briefcase/lawyer/family/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_combined_w_class = 14 diff --git a/code/game/objects/items/storage/dakis.dm b/code/game/objects/items/storage/dakis.dm index 08748bf3..2703581a 100644 --- a/code/game/objects/items/storage/dakis.dm +++ b/code/game/objects/items/storage/dakis.dm @@ -13,7 +13,7 @@ /obj/item/storage/daki/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_SMALL STR.max_combined_w_class = 21 STR.max_items = 3 diff --git a/code/game/objects/items/storage/fancy.dm b/code/game/objects/items/storage/fancy.dm index 408d8d55..94d12789 100644 --- a/code/game/objects/items/storage/fancy.dm +++ b/code/game/objects/items/storage/fancy.dm @@ -26,7 +26,7 @@ var/fancy_open = FALSE /obj/item/storage/fancy/PopulateContents() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) for(var/i = 1 to STR.max_items) new spawn_type(src) @@ -73,7 +73,7 @@ /obj/item/storage/fancy/donut_box/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/donut)) @@ -94,7 +94,7 @@ /obj/item/storage/fancy/egg_box/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 12 STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/egg)) @@ -116,7 +116,7 @@ /obj/item/storage/fancy/candle_box/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 5 /obj/item/storage/fancy/candle_box/attack_self(mob_user) @@ -139,7 +139,7 @@ /obj/item/storage/fancy/cigarettes/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.can_hold = typecacheof(list(/obj/item/clothing/mask/cigarette, /obj/item/lighter)) @@ -277,7 +277,7 @@ /obj/item/storage/fancy/rollingpapers/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 10 STR.can_hold = typecacheof(list(/obj/item/rollingpaper)) @@ -301,7 +301,7 @@ /obj/item/storage/fancy/cigarettes/cigars/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 5 STR.can_hold = typecacheof(list(/obj/item/clothing/mask/cigarette/cigar)) @@ -348,7 +348,7 @@ /obj/item/storage/fancy/heart_box/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 8 STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/tinychocolate)) diff --git a/code/game/objects/items/storage/firstaid.dm b/code/game/objects/items/storage/firstaid.dm index 0a866266..dc048e3e 100644 --- a/code/game/objects/items/storage/firstaid.dm +++ b/code/game/objects/items/storage/firstaid.dm @@ -171,7 +171,7 @@ /obj/item/storage/firstaid/tactical/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL /obj/item/storage/firstaid/tactical/PopulateContents() @@ -201,7 +201,7 @@ /obj/item/storage/pill_bottle/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.allow_quick_gather = TRUE STR.click_gather = TRUE STR.can_hold = typecacheof(list(/obj/item/reagent_containers/pill, /obj/item/dice)) @@ -364,7 +364,7 @@ /obj/item/storage/belt/organbox/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 16 STR.max_w_class = WEIGHT_CLASS_BULKY STR.max_combined_w_class = 20 diff --git a/code/game/objects/items/storage/lockbox.dm b/code/game/objects/items/storage/lockbox.dm index b14cd852..bd0a34b5 100644 --- a/code/game/objects/items/storage/lockbox.dm +++ b/code/game/objects/items/storage/lockbox.dm @@ -15,7 +15,7 @@ /obj/item/storage/lockbox/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_combined_w_class = 14 STR.max_items = 4 @@ -99,7 +99,7 @@ /obj/item/storage/lockbox/medal/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_SMALL STR.max_items = 10 STR.max_combined_w_class = 20 diff --git a/code/game/objects/items/storage/secure.dm b/code/game/objects/items/storage/secure.dm index 20e9f0d3..e177a9f9 100644 --- a/code/game/objects/items/storage/secure.dm +++ b/code/game/objects/items/storage/secure.dm @@ -26,7 +26,7 @@ /obj/item/storage/secure/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_SMALL STR.max_combined_w_class = 14 @@ -136,7 +136,7 @@ /obj/item/storage/secure/briefcase/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 21 STR.max_w_class = WEIGHT_CLASS_NORMAL @@ -146,7 +146,7 @@ /obj/item/storage/secure/briefcase/syndie/PopulateContents() ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) for(var/i = 0, i < STR.max_items - 2, i++) new /obj/item/stack/spacecash/c1000(src) @@ -170,7 +170,7 @@ /obj/item/storage/secure/safe/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.cant_hold = typecacheof(list(/obj/item/storage/secure/briefcase)) STR.max_w_class = 8 //?? diff --git a/code/game/objects/items/storage/toolbox.dm b/code/game/objects/items/storage/toolbox.dm index 55f5e061..8f77095d 100644 --- a/code/game/objects/items/storage/toolbox.dm +++ b/code/game/objects/items/storage/toolbox.dm @@ -123,7 +123,7 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons) /obj/item/storage/toolbox/syndicate/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.silent = TRUE /obj/item/storage/toolbox/syndicate/PopulateContents() @@ -164,7 +164,7 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons) /obj/item/storage/toolbox/brass/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_combined_w_class = 28 STR.max_items = 28 @@ -219,7 +219,7 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons) /obj/item/storage/toolbox/artistic/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 20 STR.max_items = 10 @@ -257,7 +257,7 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons) /obj/item/storage/toolbox/gold_real/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 40 STR.max_items = 12 diff --git a/code/game/objects/items/storage/uplink_kits.dm b/code/game/objects/items/storage/uplink_kits.dm index 414dec5a..2bdb7590 100644 --- a/code/game/objects/items/storage/uplink_kits.dm +++ b/code/game/objects/items/storage/uplink_kits.dm @@ -221,7 +221,7 @@ /obj/item/storage/box/syndie_kit/space/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL STR.can_hold = typecacheof(list(/obj/item/clothing/suit/space/syndicate, /obj/item/clothing/head/helmet/space/syndicate)) @@ -245,7 +245,7 @@ /obj/item/storage/box/syndie_kit/chemical/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 14 /obj/item/storage/box/syndie_kit/chemical/PopulateContents() diff --git a/code/game/objects/items/storage/wallets.dm b/code/game/objects/items/storage/wallets.dm index c263c266..0adf4604 100644 --- a/code/game/objects/items/storage/wallets.dm +++ b/code/game/objects/items/storage/wallets.dm @@ -11,7 +11,7 @@ /obj/item/storage/wallet/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 4 STR.cant_hold = typecacheof(list(/obj/item/screwdriver/power)) STR.can_hold = typecacheof(list( diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index 360e9943..af08ac44 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -615,7 +615,7 @@ force = on ? force_on : initial(force) throwforce = on ? force_on : initial(force) icon_state = "chainsaw_[on ? "on" : "off"]" - GET_COMPONENT_FROM(butchering, /datum/component/butchering, src) + var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering) butchering.butchering_enabled = on if(on) diff --git a/code/game/turfs/change_turf.dm b/code/game/turfs/change_turf.dm index fdaecd51..6a055bbd 100644 --- a/code/game/turfs/change_turf.dm +++ b/code/game/turfs/change_turf.dm @@ -41,7 +41,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list( /turf/open/copyTurf(turf/T, copy_air = FALSE) . = ..() if (isopenturf(T)) - GET_COMPONENT(slip, /datum/component/wet_floor) + var/datum/component/wet_floor/slip = GetComponent(/datum/component/wet_floor) if(slip) var/datum/component/wet_floor/WF = T.AddComponent(/datum/component/wet_floor) WF.InheritComponent(slip) diff --git a/code/modules/NTNet/services/_service.dm b/code/modules/NTNet/services/_service.dm index ca623a8c..75059d99 100644 --- a/code/modules/NTNet/services/_service.dm +++ b/code/modules/NTNet/services/_service.dm @@ -17,7 +17,7 @@ /datum/ntnet_service/proc/connect(datum/ntnet/net) if(!istype(net)) return FALSE - GET_COMPONENT(interface, /datum/component/ntnet_interface) + var/datum/component/ntnet_interface/interface = GetComponent(/datum/component/ntnet_interface) if(!interface.register_connection(net)) return FALSE if(!net.register_service(src)) @@ -29,7 +29,7 @@ /datum/ntnet_service/proc/disconnect(datum/ntnet/net, force = FALSE) if(!istype(net) || (!net.unregister_service(src) && !force)) return FALSE - GET_COMPONENT(interface, /datum/component/ntnet_interface) + var/datum/component/ntnet_interface/interface = GetComponent(/datum/component/ntnet_interface) interface.unregister_connection(net) networks_by_id -= net.network_id return TRUE diff --git a/code/modules/antagonists/wizard/equipment/artefact.dm b/code/modules/antagonists/wizard/equipment/artefact.dm index 13a332de..09496339 100644 --- a/code/modules/antagonists/wizard/equipment/artefact.dm +++ b/code/modules/antagonists/wizard/equipment/artefact.dm @@ -122,7 +122,7 @@ /obj/singularity/wizard/attack_tk(mob/user) if(iscarbon(user)) var/mob/living/carbon/C = user - GET_COMPONENT_FROM(insaneinthemembrane, /datum/component/mood, C) + var/datum/component/mood/insaneinthemembrane = C.GetComponent(/datum/component/mood) if(insaneinthemembrane.sanity < 15) return //they've already seen it and are about to die, or are just too insane to care to_chat(C, "OH GOD! NONE OF IT IS REAL! NONE OF IT IS REEEEEEEEEEEEEEEEEEEEEEEEAL!") diff --git a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm index 87ab4fa6..856cf659 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm @@ -190,8 +190,8 @@ icon_state = "inje_map-1" /obj/machinery/atmospherics/components/unary/outlet_injector/layer3 - piping_layer = 2 - icon_state = "inje_map-2" + piping_layer = 3 + icon_state = "inje_map-3" /obj/machinery/atmospherics/components/unary/outlet_injector/on on = TRUE @@ -201,8 +201,8 @@ icon_state = "inje_map-1" /obj/machinery/atmospherics/components/unary/outlet_injector/on/layer3 - piping_layer = 2 - icon_state = "inje_map-2" + piping_layer = 3 + icon_state = "inje_map-3" /obj/machinery/atmospherics/components/unary/outlet_injector/atmos frequency = FREQ_ATMOS_STORAGE @@ -241,4 +241,4 @@ id = ATMOS_GAS_MONITOR_INPUT_INCINERATOR /obj/machinery/atmospherics/components/unary/outlet_injector/atmos/toxins_mixing_input name = "toxins mixing input injector" - id = ATMOS_GAS_MONITOR_INPUT_TOXINS_LAB \ No newline at end of file + id = ATMOS_GAS_MONITOR_INPUT_TOXINS_LAB diff --git a/code/modules/atmospherics/machinery/pipes/layermanifold.dm b/code/modules/atmospherics/machinery/pipes/layermanifold.dm index b9809858..33092f53 100644 --- a/code/modules/atmospherics/machinery/pipes/layermanifold.dm +++ b/code/modules/atmospherics/machinery/pipes/layermanifold.dm @@ -128,7 +128,7 @@ if(initialize_directions & dir) return ..() if((NORTH|EAST) & dir) - user.ventcrawl_layer = CLAMP(user.ventcrawl_layer + 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX) + user.ventcrawl_layer = clamp(user.ventcrawl_layer + 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX) if((SOUTH|WEST) & dir) - user.ventcrawl_layer = CLAMP(user.ventcrawl_layer - 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX) + user.ventcrawl_layer = clamp(user.ventcrawl_layer - 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX) to_chat(user, "You align yourself with the [user.ventcrawl_layer]\th output.") diff --git a/code/modules/atmospherics/machinery/pipes/manifold.dm b/code/modules/atmospherics/machinery/pipes/manifold.dm index 77452fd6..3f061e37 100644 --- a/code/modules/atmospherics/machinery/pipes/manifold.dm +++ b/code/modules/atmospherics/machinery/pipes/manifold.dm @@ -28,6 +28,8 @@ /obj/machinery/atmospherics/pipe/manifold/update_icon() cut_overlays() + if(!center) + center = mutable_appearance(icon, "manifold_center") PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer) add_overlay(center) @@ -36,4 +38,4 @@ if(nodes[i]) add_overlay( getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) ) update_layer() - update_alpha() \ No newline at end of file + update_alpha() diff --git a/code/modules/atmospherics/machinery/pipes/manifold4w.dm b/code/modules/atmospherics/machinery/pipes/manifold4w.dm index 1bcca8d5..bbceff56 100644 --- a/code/modules/atmospherics/machinery/pipes/manifold4w.dm +++ b/code/modules/atmospherics/machinery/pipes/manifold4w.dm @@ -26,6 +26,8 @@ /obj/machinery/atmospherics/pipe/manifold4w/update_icon() cut_overlays() + if(!center) + center = mutable_appearance(icon, "manifold_center") PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer) add_overlay(center) @@ -34,4 +36,4 @@ if(nodes[i]) add_overlay( getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) ) update_layer() - update_alpha() \ No newline at end of file + update_alpha() diff --git a/code/modules/atmospherics/machinery/pipes/pipes.dm b/code/modules/atmospherics/machinery/pipes/pipes.dm index 1e513b84..15615b8e 100644 --- a/code/modules/atmospherics/machinery/pipes/pipes.dm +++ b/code/modules/atmospherics/machinery/pipes/pipes.dm @@ -64,6 +64,7 @@ /obj/machinery/atmospherics/pipe/analyzer_act(mob/living/user, obj/item/I) atmosanalyzer_scan(parent.air, user, src) + return TRUE /obj/machinery/atmospherics/pipe/returnPipenet() return parent @@ -111,3 +112,10 @@ pipe_color = paint_color update_node_icon() return TRUE + +/obj/machinery/atmospherics/pipe/attack_ghost(mob/dead/observer/O) + . = ..() + if(parent) + atmosanalyzer_scan(parent.air, O, src, FALSE) + else + to_chat(O, "[src] doesn't have a pipenet, which is probably a bug.") diff --git a/code/modules/atmospherics/machinery/pipes/simple.dm b/code/modules/atmospherics/machinery/pipes/simple.dm index 34df0628..40afb39e 100644 --- a/code/modules/atmospherics/machinery/pipes/simple.dm +++ b/code/modules/atmospherics/machinery/pipes/simple.dm @@ -27,379 +27,6 @@ if(EAST, WEST) initialize_directions = EAST|WEST -//Colored pipes, use these for mapping -/obj/machinery/atmospherics/pipe/simple/general - -/obj/machinery/atmospherics/pipe/simple/general/visible - level = PIPE_VISIBLE_LEVEL - layer = GAS_PIPE_VISIBLE_LAYER - -/obj/machinery/atmospherics/pipe/simple/general/visible/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/general/visible/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/general/hidden - level = PIPE_HIDDEN_LEVEL - -/obj/machinery/atmospherics/pipe/simple/general/hidden/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/general/hidden/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/scrubbers - name="scrubbers pipe" - pipe_color=rgb(255,0,0) - color=rgb(255,0,0) - -/obj/machinery/atmospherics/pipe/simple/scrubbers/visible - level = PIPE_VISIBLE_LEVEL - layer = GAS_PIPE_VISIBLE_LAYER - -/obj/machinery/atmospherics/pipe/simple/scrubbers/visible/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/scrubbers/visible/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden - level = PIPE_HIDDEN_LEVEL - -/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/supply - name="air supply pipe" - pipe_color=rgb(0,0,255) - color=rgb(0,0,255) - -/obj/machinery/atmospherics/pipe/simple/supply/visible - level = PIPE_VISIBLE_LEVEL - layer = GAS_PIPE_VISIBLE_LAYER - -/obj/machinery/atmospherics/pipe/simple/supply/visible/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/supply/visible/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/supply/hidden - level = PIPE_HIDDEN_LEVEL - -/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/supplymain - name="main air supply pipe" - pipe_color=rgb(130,43,255) - color=rgb(130,43,255) - -/obj/machinery/atmospherics/pipe/simple/supplymain/visible - level = PIPE_VISIBLE_LEVEL - layer = GAS_PIPE_VISIBLE_LAYER - -/obj/machinery/atmospherics/pipe/simple/supplymain/visible/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/supplymain/visible/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/supplymain/hidden - level = PIPE_HIDDEN_LEVEL - -/obj/machinery/atmospherics/pipe/simple/supplymain/hidden/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/supplymain/hidden/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/yellow - pipe_color=rgb(255,198,0) - color=rgb(255,198,0) - -/obj/machinery/atmospherics/pipe/simple/yellow/visible - level = PIPE_VISIBLE_LEVEL - layer = GAS_PIPE_VISIBLE_LAYER - -/obj/machinery/atmospherics/pipe/simple/yellow/visible/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/yellow/visible/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/yellow/hidden - level = PIPE_HIDDEN_LEVEL - -/obj/machinery/atmospherics/pipe/simple/yellow/hidden/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/yellow/hidden/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/cyan - pipe_color=rgb(0,255,249) - color=rgb(0,255,249) - -/obj/machinery/atmospherics/pipe/simple/cyan/visible - level = PIPE_VISIBLE_LEVEL - layer = GAS_PIPE_VISIBLE_LAYER - -/obj/machinery/atmospherics/pipe/simple/cyan/visible/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/cyan/visible/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/cyan/hidden - level = PIPE_HIDDEN_LEVEL - -/obj/machinery/atmospherics/pipe/simple/cyan/hidden/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/cyan/hidden/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/green - pipe_color=rgb(30,255,0) - color=rgb(30,255,0) - -/obj/machinery/atmospherics/pipe/simple/green/visible - level = PIPE_VISIBLE_LEVEL - layer = GAS_PIPE_VISIBLE_LAYER - -/obj/machinery/atmospherics/pipe/simple/green/visible/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/green/visible/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/green/hidden - level = PIPE_HIDDEN_LEVEL - -/obj/machinery/atmospherics/pipe/simple/green/hidden/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/green/hidden/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/orange - pipe_color=rgb(255,129,25) - color=rgb(255,129,25) - -/obj/machinery/atmospherics/pipe/simple/orange/visible - level = PIPE_VISIBLE_LEVEL - layer = GAS_PIPE_VISIBLE_LAYER - -/obj/machinery/atmospherics/pipe/simple/orange/visible/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/orange/visible/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/orange/hidden - level = PIPE_HIDDEN_LEVEL - -/obj/machinery/atmospherics/pipe/simple/orange/hidden/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/orange/hidden/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/purple - pipe_color=rgb(128,0,182) - color=rgb(128,0,182) - -/obj/machinery/atmospherics/pipe/simple/purple/visible - level = PIPE_VISIBLE_LEVEL - layer = GAS_PIPE_VISIBLE_LAYER - -/obj/machinery/atmospherics/pipe/simple/purple/visible/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/purple/visible/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/purple/hidden - level = PIPE_HIDDEN_LEVEL - -/obj/machinery/atmospherics/pipe/simple/purple/hidden/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/purple/hidden/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/dark - pipe_color=rgb(69,69,69) - color=rgb(69,69,69) - -/obj/machinery/atmospherics/pipe/simple/dark/visible - level = PIPE_VISIBLE_LEVEL - layer = GAS_PIPE_VISIBLE_LAYER - -/obj/machinery/atmospherics/pipe/simple/dark/visible/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/dark/visible/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/dark/hidden - level = PIPE_HIDDEN_LEVEL - -/obj/machinery/atmospherics/pipe/simple/dark/hidden/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/dark/hidden/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/violet - pipe_color=rgb(64,0,128) - color=rgb(64,0,128) - -/obj/machinery/atmospherics/pipe/simple/violet/visible - level = PIPE_VISIBLE_LEVEL - layer = GAS_PIPE_VISIBLE_LAYER - -/obj/machinery/atmospherics/pipe/simple/violet/visible/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/violet/visible/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/violet/hidden - level = PIPE_HIDDEN_LEVEL - -/obj/machinery/atmospherics/pipe/simple/violet/hidden/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/violet/hidden/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/brown - pipe_color=rgb(178,100,56) - color=rgb(178,100,56) - -/obj/machinery/atmospherics/pipe/simple/brown/visible - level = PIPE_VISIBLE_LEVEL - layer = GAS_PIPE_VISIBLE_LAYER - -/obj/machinery/atmospherics/pipe/simple/brown/visible/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/brown/visible/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/brown/hidden - level = PIPE_HIDDEN_LEVEL - -/obj/machinery/atmospherics/pipe/simple/brown/hidden/layer1 - piping_layer = PIPING_LAYER_MIN - pixel_x = -PIPING_LAYER_P_X - pixel_y = -PIPING_LAYER_P_Y - -/obj/machinery/atmospherics/pipe/simple/brown/hidden/layer3 - piping_layer = PIPING_LAYER_MAX - pixel_x = PIPING_LAYER_P_X - pixel_y = PIPING_LAYER_P_Y /obj/machinery/atmospherics/pipe/simple/update_icon() icon_state = "pipe[nodes[1] ? "1" : "0"][nodes[2] ? "1" : "0"]-[piping_layer]" update_layer() diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 33a83487..8b2a34a0 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -561,7 +561,7 @@ /obj/item/storage/belt/chameleon/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.silent = TRUE /obj/item/storage/belt/chameleon/emp_act(severity) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 0706f77e..30d705bd 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -139,7 +139,7 @@ . = ..() if(damaged_clothes) . += "It looks damaged!" - GET_COMPONENT(pockets, /datum/component/storage) + var/datum/component/storage/pockets = GetComponent(/datum/component/storage) if(pockets) var/list/how_cool_are_your_threads = list("") if(pockets.attack_hand_interact) diff --git a/code/modules/clothing/shoes/bananashoes.dm b/code/modules/clothing/shoes/bananashoes.dm index 979db7e0..c4d06ea1 100644 --- a/code/modules/clothing/shoes/bananashoes.dm +++ b/code/modules/clothing/shoes/bananashoes.dm @@ -17,7 +17,7 @@ /obj/item/clothing/shoes/clown_shoes/banana_shoes/step_action() . = ..() - GET_COMPONENT(bananium, /datum/component/material_container) + var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container) if(on) if(bananium.amount(MAT_BANANIUM) < 100) on = !on @@ -30,7 +30,7 @@ bananium.use_amount_type(100, MAT_BANANIUM) /obj/item/clothing/shoes/clown_shoes/banana_shoes/attack_self(mob/user) - GET_COMPONENT(bananium, /datum/component/material_container) + var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container) var/sheet_amount = bananium.retrieve_all() if(sheet_amount) to_chat(user, "You retrieve [sheet_amount] sheets of bananium from the prototype shoes.") @@ -42,7 +42,7 @@ . += "The shoes are [on ? "enabled" : "disabled"]." /obj/item/clothing/shoes/clown_shoes/banana_shoes/ui_action_click(mob/user) - GET_COMPONENT(bananium, /datum/component/material_container) + var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container) if(bananium.amount(MAT_BANANIUM)) on = !on update_icon() diff --git a/code/modules/clothing/under/accessories.dm b/code/modules/clothing/under/accessories.dm index dc5372cf..c019cda8 100644 --- a/code/modules/clothing/under/accessories.dm +++ b/code/modules/clothing/under/accessories.dm @@ -12,7 +12,7 @@ var/datum/component/storage/detached_pockets /obj/item/clothing/accessory/proc/attach(obj/item/clothing/under/U, user) - GET_COMPONENT(storage, /datum/component/storage) + var/datum/component/storage/storage = GetComponent(/datum/component/storage) if(storage) if(SEND_SIGNAL(U, COMSIG_CONTAINS_STORAGE)) return FALSE diff --git a/code/modules/events/wizard/rpgloot.dm b/code/modules/events/wizard/rpgloot.dm index 420582dd..3d560aef 100644 --- a/code/modules/events/wizard/rpgloot.dm +++ b/code/modules/events/wizard/rpgloot.dm @@ -13,7 +13,7 @@ if(istype(I, /obj/item/storage)) var/obj/item/storage/S = I - GET_COMPONENT_FROM(STR, /datum/component/storage, S) + var/datum/component/storage/STR = S.GetComponent(/datum/component/storage) if(prob(upgrade_scroll_chance) && S.contents.len < STR.max_items && !S.invisibility) var/obj/item/upgradescroll/scroll = new SEND_SIGNAL(S, COMSIG_TRY_STORAGE_INSERT, scroll, null, TRUE, TRUE) diff --git a/code/modules/food_and_drinks/food/snacks_pastry.dm b/code/modules/food_and_drinks/food/snacks_pastry.dm index b8797783..c3fc942b 100644 --- a/code/modules/food_and_drinks/food/snacks_pastry.dm +++ b/code/modules/food_and_drinks/food/snacks_pastry.dm @@ -38,9 +38,7 @@ if(M.mind && HAS_TRAIT(M.mind, TRAIT_LAW_ENFORCEMENT_METABOLISM) && !HAS_TRAIT(H, TRAIT_AGEUSIA)) to_chat(H,"I love this taste!") H.adjust_disgust(-5 + -2.5 * fraction) - GET_COMPONENT_FROM(mood, /datum/component/mood, H) - if(mood) - mood.add_event(null, "fav_food", /datum/mood_event/favorite_food) + SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "fav_food", /datum/mood_event/favorite_food) last_check_time = world.time return ..() diff --git a/code/modules/holiday/easter.dm b/code/modules/holiday/easter.dm index d6d4ed2a..4dfe2f33 100644 --- a/code/modules/holiday/easter.dm +++ b/code/modules/holiday/easter.dm @@ -68,7 +68,7 @@ /obj/item/storage/bag/easterbasket/Initialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/egg, /obj/item/reagent_containers/food/snacks/chocolateegg, /obj/item/reagent_containers/food/snacks/boiledegg)) /obj/item/storage/bag/easterbasket/proc/countEggs() diff --git a/code/modules/hydroponics/seed_extractor.dm b/code/modules/hydroponics/seed_extractor.dm index 29a26067..5af19b84 100644 --- a/code/modules/hydroponics/seed_extractor.dm +++ b/code/modules/hydroponics/seed_extractor.dm @@ -174,7 +174,7 @@ to_chat(usr, "\The [src] is full.") return FALSE - GET_COMPONENT_FROM(STR, /datum/component/storage, O.loc) + var/datum/component/storage/STR = O.loc.GetComponent(/datum/component/storage) if(STR) if(!STR.remove_from_storage(O,src)) return FALSE diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm index b258a159..b7feedd3 100644 --- a/code/modules/integrated_electronics/subtypes/input.dm +++ b/code/modules/integrated_electronics/subtypes/input.dm @@ -893,7 +893,7 @@ return FALSE var/ignore_bags = get_pin_data(IC_INPUT, 1) if(ignore_bags) - GET_COMPONENT_FROM(STR, /datum/component/storage, A) + var/datum/component/storage/STR = A.GetComponent(/datum/component/storage) if(STR) return FALSE set_pin_data(IC_OUTPUT, 1, WEAKREF(A)) @@ -1104,7 +1104,7 @@ /obj/item/integrated_circuit/input/matscan/do_work() var/atom/movable/H = get_pin_data_as_type(IC_INPUT, 1, /atom/movable) var/turf/T = get_turf(src) - GET_COMPONENT_FROM(mt, /datum/component/material_container, H) + var/datum/component/material_container/mt = H.GetComponent(/datum/component/material_container) if(!mt) //Invalid input return if(H in view(T)) // This is a camera. It can't examine thngs,that it can't see. diff --git a/code/modules/integrated_electronics/subtypes/manipulation.dm b/code/modules/integrated_electronics/subtypes/manipulation.dm index 83efa6ca..f4456eaf 100644 --- a/code/modules/integrated_electronics/subtypes/manipulation.dm +++ b/code/modules/integrated_electronics/subtypes/manipulation.dm @@ -411,7 +411,7 @@ .=..() /obj/item/integrated_circuit/manipulation/matman/proc/AfterMaterialInsert(type_inserted, id_inserted, amount_inserted) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) set_pin_data(IC_OUTPUT, 2, materials.total_amount) for(var/I in 1 to mtypes.len) var/datum/material/M = materials.materials[mtypes[I]] @@ -423,7 +423,7 @@ return TRUE /obj/item/integrated_circuit/manipulation/matman/do_work(ord) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/atom/movable/H = get_pin_data_as_type(IC_INPUT, 1, /atom/movable) if(!check_target(H)) activate_pin(4) @@ -441,7 +441,7 @@ else activate_pin(4) if(2) - GET_COMPONENT_FROM(mt, /datum/component/material_container, H) + var/datum/component/material_container/mt = H.GetComponent(/datum/component/material_container) var/suc for(var/I in 1 to mtypes.len) var/datum/material/M = materials.materials[mtypes[I]] @@ -467,7 +467,7 @@ activate_pin(6) /obj/item/integrated_circuit/manipulation/matman/Destroy() - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.retrieve_all() .=..() @@ -509,14 +509,14 @@ if(!container || !istype(container,/obj/item/storage) || !Adjacent(container)) return - GET_COMPONENT_FROM(STR, /datum/component/storage, container) + var/datum/component/storage/STR = container.GetComponent(/datum/component/storage) if(!STR) return STR.attackby(src, target_obj) else - GET_COMPONENT_FROM(STR, /datum/component/storage, target_obj.loc) + var/datum/component/storage/STR = target_obj.loc.GetComponent(/datum/component/storage) if(!STR) return diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index e67ce367..892bab04 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -78,7 +78,7 @@ state = 0 if(2) - GET_COMPONENT_FROM(STR, /datum/component/storage, I) + var/datum/component/storage/STR = I.GetComponent(/datum/component/storage) if(is_type_in_list(I, allowed_books)) if(!user.transferItemToLoc(I, src)) return diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm index 07224d45..4dc2e248 100644 --- a/code/modules/mining/machine_processing.dm +++ b/code/modules/mining/machine_processing.dm @@ -95,7 +95,7 @@ process_ore(AM) /obj/machinery/mineral/processing_unit/proc/process_ore(obj/item/stack/ore/O) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/material_amount = materials.get_item_material_amount(O) if(!materials.has_space(material_amount)) unload_mineral(O) @@ -107,7 +107,7 @@ /obj/machinery/mineral/processing_unit/proc/get_machine_data() var/dat = "Smelter control console

" - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) for(var/mat_id in materials.materials) var/datum/material/M = materials.materials[mat_id] dat += "[M.name]: [M.amount] cm³" @@ -152,7 +152,7 @@ CONSOLE.updateUsrDialog() /obj/machinery/mineral/processing_unit/proc/smelt_ore() - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/datum/material/mat = materials.materials[selected_material] if(mat) var/sheets_to_remove = (mat.amount >= (MINERAL_MATERIAL_AMOUNT * SMELT_AMOUNT) ) ? SMELT_AMOUNT : round(mat.amount / MINERAL_MATERIAL_AMOUNT) @@ -175,7 +175,7 @@ on = FALSE return - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.use_amount(alloy.materials, amount) generate_mineral(alloy.build_path) @@ -186,7 +186,7 @@ var/build_amount = SMELT_AMOUNT - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) for(var/mat_id in D.materials) var/M = D.materials[mat_id] @@ -204,7 +204,7 @@ unload_mineral(O) /obj/machinery/mineral/processing_unit/on_deconstruction() - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.retrieve_all() ..() diff --git a/code/modules/mining/machine_silo.dm b/code/modules/mining/machine_silo.dm index 65cac24d..e0a8b9b5 100644 --- a/code/modules/mining/machine_silo.dm +++ b/code/modules/mining/machine_silo.dm @@ -34,13 +34,13 @@ GLOBAL_LIST_EMPTY(silo_access_logs) var/datum/component/remote_materials/mats = C mats.disconnect_from(src) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.retrieve_all() return ..() /obj/machinery/ore_silo/proc/remote_attackby(obj/machinery/M, mob/user, obj/item/stack/I) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) // stolen from /datum/component/material_container/proc/OnAttackBy if(user.a_intent != INTENT_HELP) return @@ -71,7 +71,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs) popup.open() /obj/machinery/ore_silo/proc/generate_ui() - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/list/ui = list("Ore Silo

Stored Material:

") var/any = FALSE for(var/M in materials.materials) @@ -149,7 +149,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs) return TRUE else if(href_list["ejectsheet"]) var/eject_sheet = href_list["ejectsheet"] - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/count = materials.retrieve_sheets(text2num(href_list["eject_amt"]), eject_sheet, drop_location()) var/list/matlist = list() matlist[eject_sheet] = MINERAL_MATERIAL_AMOUNT diff --git a/code/modules/mining/mint.dm b/code/modules/mining/mint.dm index e7645bd4..f32afb28 100644 --- a/code/modules/mining/mint.dm +++ b/code/modules/mining/mint.dm @@ -22,7 +22,7 @@ if(!T) return - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) for(var/obj/item/stack/sheet/O in T) materials.insert_stack(O, O.amount) @@ -32,7 +32,7 @@ return var/dat = "Coin Press
" - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) for(var/mat_id in materials.materials) var/datum/material/M = materials.materials[mat_id] if(!M.amount && chosen != mat_id) @@ -65,7 +65,7 @@ if(processing==1) to_chat(usr, "The machine is processing.") return - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) if(href_list["choose"]) if(materials.materials[href_list["choose"]]) chosen = href_list["choose"] diff --git a/code/modules/mining/money_bag.dm b/code/modules/mining/money_bag.dm index f567bd1d..fd5997d3 100644 --- a/code/modules/mining/money_bag.dm +++ b/code/modules/mining/money_bag.dm @@ -11,7 +11,7 @@ /obj/item/storage/bag/money/Initialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_items = 40 STR.max_combined_w_class = 40 diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index d9ffb88b..4b04c3f2 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -40,7 +40,7 @@ if(iscyborg(user) && user.has_buckled_mobs()) var/mob/living/silicon/robot/R = user - GET_COMPONENT_FROM(riding_datum, /datum/component/riding, R) + var/datum/component/riding/riding_datum = R.GetComponent(/datum/component/riding) if(riding_datum) for(var/mob/M in R.buckled_mobs) riding_datum.force_dismount(M) @@ -61,7 +61,7 @@ if(iscyborg(user) && user.has_buckled_mobs()) var/mob/living/silicon/robot/R = user - GET_COMPONENT_FROM(riding_datum, /datum/component/riding, R) + var/datum/component/riding/riding_datum = R.GetComponent(/datum/component/riding) if(riding_datum) for(var/mob/M in R.buckled_mobs) riding_datum.force_dismount(M) @@ -74,4 +74,4 @@ return user.nextsoundemote = world.time + 7 playsound(user, 'modular_citadel/sound/voice/speen.ogg', 50, 1, -1) - . = ..() \ No newline at end of file + . = ..() diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index ef2d7d1e..e08d93fe 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -928,7 +928,7 @@ /mob/living/carbon/do_after_coefficent() . = ..() - GET_COMPONENT_FROM(mood, /datum/component/mood, src) //Currently, only carbons or higher use mood, move this once that changes. + var/datum/component/mood/mood = src.GetComponent(/datum/component/mood) //Currently, only carbons or higher use mood, move this once that changes. if(mood) switch(mood.sanity) //Alters do_after delay based on how sane you are if(SANITY_INSANE to SANITY_DISTURBED) @@ -970,7 +970,7 @@ return TRUE if(HAS_TRAIT(src, TRAIT_DUMB)) return TRUE - GET_COMPONENT_FROM(mood, /datum/component/mood, src) + var/datum/component/mood/mood = src.GetComponent(/datum/component/mood) if(mood) if(mood.sanity < SANITY_UNSTABLE) return TRUE diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 50ebba9a..fa6cc85f 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -297,7 +297,7 @@ SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "headpat", /datum/mood_event/headpat) if(HAS_TRAIT(M, TRAIT_FRIENDLY)) - GET_COMPONENT_FROM(mood, /datum/component/mood, M) + var/datum/component/mood/mood = M.GetComponent(/datum/component/mood) if (mood.sanity >= SANITY_GREAT) SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/besthug, M) else if (mood.sanity >= SANITY_DISTURBED) @@ -366,7 +366,7 @@ "You hug [src] to make [p_them()] feel better!") SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "hug", /datum/mood_event/hug) if(HAS_TRAIT(M, TRAIT_FRIENDLY)) - GET_COMPONENT_FROM(mood, /datum/component/mood, M) + var/datum/component/mood/mood = M.GetComponent(/datum/component/mood) if (mood.sanity >= SANITY_GREAT) SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/besthug, M) else if (mood.sanity >= SANITY_DISTURBED) diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm index bef8895e..14ea50a2 100644 --- a/code/modules/mob/living/carbon/examine.dm +++ b/code/modules/mob/living/carbon/examine.dm @@ -94,7 +94,7 @@ if(combatmode) . += "[t_He] [t_is] visibly tense[resting ? "." : ", and [t_is] standing in combative stance."]" - GET_COMPONENT_FROM(mood, /datum/component/mood, src) + var/datum/component/mood/mood = src.GetComponent(/datum/component/mood) if(mood) switch(mood.shown_mood) if(-INFINITY to MOOD_LEVEL_SAD4) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 415218c4..980d8aeb 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -292,7 +292,7 @@ msg += "[t_He] seem[p_s()] winded.\n" if (getToxLoss() >= 10) msg += "[t_He] seem[p_s()] sickly.\n" - GET_COMPONENT_FROM(mood, /datum/component/mood, src) + var/datum/component/mood/mood = src.GetComponent(/datum/component/mood) if(mood.sanity <= SANITY_DISTURBED) msg += "[t_He] seem[p_s()] distressed.\n" SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "empath", /datum/mood_event/sad_empath, src) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index fef4c127..d0f017a4 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1238,7 +1238,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) if (H.nutrition > 0 && H.stat != DEAD && !HAS_TRAIT(H, TRAIT_NOHUNGER)) // THEY HUNGER var/hunger_rate = HUNGER_FACTOR - GET_COMPONENT_FROM(mood, /datum/component/mood, H) + var/datum/component/mood/mood = H.GetComponent(/datum/component/mood) if(mood && mood.sanity > SANITY_DISTURBED) hunger_rate *= max(0.5, 1 - 0.002 * mood.sanity) //0.85 to 0.75 @@ -1396,7 +1396,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) var/grav_force = min(gravity - STANDARD_GRAVITY,3) . += 1 + grav_force - GET_COMPONENT_FROM(mood, /datum/component/mood, H) + var/datum/component/mood/mood = H.GetComponent(/datum/component/mood) if(mood && !flight) //How can depression slow you down if you can just fly away from your problems? switch(mood.sanity) if(SANITY_INSANE to SANITY_CRAZY) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 26015c60..a61f86b6 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -524,7 +524,7 @@ fire_stacks = 0 confused = 0 update_canmove() - GET_COMPONENT(mood, /datum/component/mood) + var/datum/component/mood/mood = GetComponent(/datum/component/mood) if (mood) QDEL_LIST_ASSOC_VAL(mood.mood_events) mood.sanity = SANITY_GREAT diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index f066bdf1..f9cb5102 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -1220,7 +1220,7 @@ /mob/living/silicon/robot/unbuckle_mob(mob/user, force=FALSE) if(iscarbon(user)) - GET_COMPONENT(riding_datum, /datum/component/riding) + var/datum/component/riding/riding_datum = GetComponent(/datum/component/riding) if(istype(riding_datum)) riding_datum.unequip_buckle_inhands(user) riding_datum.restore_position(user) diff --git a/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm b/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm index 23ac527b..fdb709fc 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm @@ -33,7 +33,7 @@ /mob/living/simple_animal/drone/syndrone/Initialize() . = ..() - GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, internal_storage) + var/datum/component/uplink/hidden_uplink = internal_storage.GetComponent(/datum/component/uplink) hidden_uplink.telecrystals = 10 /mob/living/simple_animal/drone/syndrone/Login() @@ -47,7 +47,7 @@ /mob/living/simple_animal/drone/syndrone/badass/Initialize() . = ..() - GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, internal_storage) + var/datum/component/uplink/hidden_uplink = internal_storage.GetComponent(/datum/component/uplink) hidden_uplink.telecrystals = 30 var/obj/item/implant/weapons_auth/W = new/obj/item/implant/weapons_auth(src) W.implant(src) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 534aacae..689cb51f 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -536,7 +536,7 @@ //ANIMAL RIDING /mob/living/simple_animal/user_buckle_mob(mob/living/M, mob/user) - GET_COMPONENT(riding_datum, /datum/component/riding) + var/datum/component/riding/riding_datum = GetComponent(/datum/component/riding) if(riding_datum) if(user.incapacitated()) return @@ -547,7 +547,7 @@ return ..() /mob/living/simple_animal/relaymove(mob/user, direction) - GET_COMPONENT(riding_datum, /datum/component/riding) + var/datum/component/riding/riding_datum = GetComponent(/datum/component/riding) if(tame && riding_datum) riding_datum.handle_ride(user, direction) diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 1d733354..0372f8b9 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -201,7 +201,7 @@ throwforce = 35 playsound(user, 'sound/weapons/saberon.ogg', 5, 1) to_chat(user, "[src] is now active.") - GET_COMPONENT_FROM(butchering, /datum/component/butchering, src) + var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering) butchering.butchering_enabled = on update_icon() diff --git a/code/modules/photography/photos/album.dm b/code/modules/photography/photos/album.dm index b29a9f2a..8361accb 100644 --- a/code/modules/photography/photos/album.dm +++ b/code/modules/photography/photos/album.dm @@ -13,7 +13,7 @@ /obj/item/storage/photo_album/Initialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.can_hold = typecacheof(list(/obj/item/photo)) STR.max_combined_w_class = 42 STR.max_items = 21 diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 567c1873..9c47b62b 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -175,7 +175,7 @@ data["chosenPillStyle"] = chosenPillStyle data["isPillBottleLoaded"] = bottle ? 1 : 0 if(bottle) - GET_COMPONENT_FROM(STRB, /datum/component/storage, bottle) + var/datum/component/storage/STRB = bottle.GetComponent(/datum/component/storage) data["pillBotContent"] = bottle.contents.len data["pillBotMaxContent"] = STRB.max_items @@ -263,7 +263,7 @@ var/target_loc = bottle ? bottle : drop_location() var/drop_threshold = INFINITY if(bottle) - GET_COMPONENT_FROM(STRB, /datum/component/storage, bottle) + var/datum/component/storage/STRB = bottle.GetComponent(/datum/component/storage) if(STRB) drop_threshold = STRB.max_items - bottle.contents.len diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index e7358f8c..c6aa800d 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -2296,6 +2296,29 @@ datum/reagent/consumable/ethanol/creme_de_coconut . = 1 return ..() +/datum/reagent/consumable/ethanol/commander_and_chief + name = "Commander and Chief" + id = "commander_and_chief" + description = "A cocktail for the captain on the go." + color = "#ffffc9" + boozepwr = 50 + quality = DRINK_FANTASTIC + taste_description = "Tastes like...duty and responsibility?" + glass_icon_state = "commander_and_chief" + glass_name = "Commander and Chief" + glass_desc = "The gems of this majestic chalice represent the departments and their Heads." + +/datum/reagent/consumable/ethanol/commander_and_chief/on_mob_life(mob/living/carbon/M) + if(M.mind && HAS_TRAIT(M.mind, TRAIT_CAPTAIN_METABOLISM)) + M.heal_bodypart_damage(2,2,2) + M.adjustBruteLoss(-3.5,0) + M.adjustOxyLoss(-3.5,0) + M.adjustFireLoss(-3.5,0) + M.adjustToxLoss(-3.5,0) + M.radiation = max(M.radiation - 25, 0) + . = 1 + return ..() + /datum/reagent/consumable/ethanol/fruit_wine name = "Fruit Wine" id = "fruit_wine" diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm index 99694310..ff96a286 100644 --- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm @@ -424,7 +424,7 @@ . = 1 /datum/reagent/drug/happiness/addiction_act_stage1(mob/living/M)// all work and no play makes jack a dull boy - GET_COMPONENT_FROM(mood, /datum/component/mood, M) + var/datum/component/mood/mood = M.GetComponent(/datum/component/mood) mood.setSanity(min(mood.sanity, SANITY_DISTURBED)) M.Jitter(5) if(prob(20)) @@ -432,7 +432,7 @@ ..() /datum/reagent/drug/happiness/addiction_act_stage2(mob/living/M) - GET_COMPONENT_FROM(mood, /datum/component/mood, M) + var/datum/component/mood/mood = M.GetComponent(/datum/component/mood) mood.setSanity(min(mood.sanity, SANITY_UNSTABLE)) M.Jitter(10) if(prob(30)) @@ -440,7 +440,7 @@ ..() /datum/reagent/drug/happiness/addiction_act_stage3(mob/living/M) - GET_COMPONENT_FROM(mood, /datum/component/mood, M) + var/datum/component/mood/mood = M.GetComponent(/datum/component/mood) mood.setSanity(min(mood.sanity, SANITY_CRAZY)) M.Jitter(15) if(prob(40)) @@ -448,7 +448,7 @@ ..() /datum/reagent/drug/happiness/addiction_act_stage4(mob/living/carbon/human/M) - GET_COMPONENT_FROM(mood, /datum/component/mood, M) + var/datum/component/mood/mood = M.GetComponent(/datum/component/mood) mood.setSanity(SANITY_INSANE) M.Jitter(20) if(prob(50)) diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index b1c9554b..10a9b2bd 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -1454,7 +1454,7 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) M.dizziness = max(0, M.dizziness-6) M.confused = max(0, M.confused-6) M.disgust = max(0, M.disgust-6) - GET_COMPONENT_FROM(mood, /datum/component/mood, M) + var/datum/component/mood/mood = M.GetComponent(/datum/component/mood) if(mood.sanity <= SANITY_NEUTRAL) // only take effect if in negative sanity and then... mood.setSanity(min(mood.sanity+5, SANITY_NEUTRAL)) // set minimum to prevent unwanted spiking over neutral ..() diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm index a7d95ba7..145d85cf 100644 --- a/code/modules/recycling/disposal/bin.dm +++ b/code/modules/recycling/disposal/bin.dm @@ -277,7 +277,7 @@ /obj/machinery/disposal/bin/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/storage/bag/trash)) //Not doing component overrides because this is a specific type. var/obj/item/storage/bag/trash/T = I - GET_COMPONENT_FROM(STR, /datum/component/storage, T) + var/datum/component/storage/STR = T.GetComponent(/datum/component/storage) to_chat(user, "You empty the bag.") for(var/obj/item/O in T.contents) STR.remove_from_storage(O,src) diff --git a/code/modules/recycling/disposal/construction.dm b/code/modules/recycling/disposal/construction.dm index 624d5e0e..348e687e 100644 --- a/code/modules/recycling/disposal/construction.dm +++ b/code/modules/recycling/disposal/construction.dm @@ -29,7 +29,7 @@ pipename = initial(pipe_type.name) if(flip) - GET_COMPONENT(rotcomp,/datum/component/simple_rotation) + var/datum/component/simple_rotation/rotcomp = GetComponent(/datum/component/simple_rotation) rotcomp.BaseRot(null,ROTATION_FLIP) update_icon() diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 9b039695..c5bc78dd 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -422,7 +422,7 @@ if(exp == SCANTYPE_OBLITERATE) visible_message("[exp_on] activates the crushing mechanism, [exp_on] is destroyed!") if(linked_console.linked_lathe) - GET_COMPONENT_FROM(linked_materials, /datum/component/material_container, linked_console.linked_lathe) + var/datum/component/material_container/linked_materials = linked_console.linked_lathe.GetComponent(/datum/component/material_container) for(var/material in exp_on.materials) linked_materials.insert_amount( min((linked_materials.max_amount - linked_materials.total_amount), (exp_on.materials[material])), material) if(prob(EFFECT_PROB_LOW) && criticalReaction) diff --git a/code/modules/research/xenobiology/crossbreeding/_misc.dm b/code/modules/research/xenobiology/crossbreeding/_misc.dm index b28f1676..0099fe14 100644 --- a/code/modules/research/xenobiology/crossbreeding/_misc.dm +++ b/code/modules/research/xenobiology/crossbreeding/_misc.dm @@ -58,9 +58,7 @@ var/mob/living/carbon/human/H = M if(H.mind && !HAS_TRAIT(H, TRAIT_AGEUSIA)) to_chat(H,"That didn't taste very good...") //No disgust, though. It's just not good tasting. - GET_COMPONENT_FROM(mood, /datum/component/mood, H) - if(mood) - mood.add_event(null,"gross_food", /datum/mood_event/gross_food) + SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "gross_food", /datum/mood_event/gross_food) last_check_time = world.time return ..() diff --git a/code/modules/shuttle/on_move.dm b/code/modules/shuttle/on_move.dm index 91243e04..beaaa51a 100644 --- a/code/modules/shuttle/on_move.dm +++ b/code/modules/shuttle/on_move.dm @@ -290,7 +290,7 @@ All ShuttleMove procs go here // ignores the movement of the shuttle from the staging area on CentCom to // the station as it is loaded in. if (oldT && !is_centcom_level(oldT.z)) - GET_COMPONENT(STR, /datum/component/storage/concrete/emergency) + var/datum/component/storage/concrete/emergency/STR = GetComponent(/datum/component/storage/concrete/emergency) STR?.unlock_me() /************************************Mob move procs************************************/ diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm index df8ce65b..6117767e 100644 --- a/code/modules/surgery/organs/vocal_cords.dm +++ b/code/modules/surgery/organs/vocal_cords.dm @@ -917,7 +917,7 @@ speaktrigger += "[(H.client?.prefs.lewdchem?"You are my whole world and all of my being belongs to you, ":"I cannot think of anything else but aiding your cause, ")] "//Redflags!! //mood - GET_COMPONENT_FROM(mood, /datum/component/mood, H) + var/datum/component/mood/mood = H.GetComponent(/datum/component/mood) switch(mood.sanity) if(SANITY_GREAT to INFINITY) speaktrigger += "I'm beyond elated!! " //did you mean byond elated? hohoho diff --git a/code/modules/uplink/uplink_devices.dm b/code/modules/uplink/uplink_devices.dm index 95a3745c..2bcfb40c 100644 --- a/code/modules/uplink/uplink_devices.dm +++ b/code/modules/uplink/uplink_devices.dm @@ -25,18 +25,18 @@ /obj/item/uplink/nuclear/Initialize() . = ..() - GET_COMPONENT(hidden_uplink, /datum/component/uplink) + var/datum/component/uplink/hidden_uplink = GetComponent(/datum/component/uplink) hidden_uplink.set_gamemode(/datum/game_mode/nuclear) /obj/item/uplink/nuclear_restricted/Initialize() . = ..() - GET_COMPONENT(hidden_uplink, /datum/component/uplink) + var/datum/component/uplink/hidden_uplink = GetComponent(/datum/component/uplink) hidden_uplink.allow_restricted = FALSE hidden_uplink.set_gamemode(/datum/game_mode/nuclear) /obj/item/uplink/clownop/Initialize() . = ..() - GET_COMPONENT(hidden_uplink, /datum/component/uplink) + var/datum/component/uplink/hidden_uplink = GetComponent(/datum/component/uplink) hidden_uplink.set_gamemode(/datum/game_mode/nuclear/clown_ops) /obj/item/uplink/old @@ -45,7 +45,7 @@ /obj/item/uplink/old/Initialize(mapload, owner, tc_amount = 10) . = ..() - GET_COMPONENT(hidden_uplink, /datum/component/uplink) + var/datum/component/uplink/hidden_uplink = GetComponent(/datum/component/uplink) hidden_uplink.name = "dusty radio" // Multitool uplink diff --git a/hyperstation/code/gamemode/traitor_lewd.dm b/hyperstation/code/gamemode/traitor_lewd.dm index 5b1c1f78..4906e4b4 100644 --- a/hyperstation/code/gamemode/traitor_lewd.dm +++ b/hyperstation/code/gamemode/traitor_lewd.dm @@ -190,7 +190,7 @@ GLOBAL_LIST_INIT(hyper_special_roles, list( if(should_equip) equip(silent) for(var/obj/I in owner.current.GetAllContents()) - GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, I) + var/datum/component/uplink/hidden_uplink = I.GetComponent(/datum/component/uplink) if(hidden_uplink) lewd_uplink_list = get_custom_uplink_items(lewd_uplink_list_raw, /datum/game_mode/traitor/lewd, TRUE, FALSE) hidden_uplink.uplink_items = lewd_uplink_list diff --git a/hyperstation/code/mobs/hugbot.dm b/hyperstation/code/mobs/hugbot.dm index 89d7acbe..26665662 100644 --- a/hyperstation/code/mobs/hugbot.dm +++ b/hyperstation/code/mobs/hugbot.dm @@ -123,7 +123,7 @@ if(ishuman(C)) var/mob/living/carbon/human/H = C - GET_COMPONENT_FROM(mood, /datum/component/mood, H) + var/datum/component/mood/mood = H.GetComponent(/datum/component/mood) if(emagged != 2) // EVERYONE GETS HUGS! for(var/datum/mood_event/i in mood.mood_events) if (i.description == "Hugs are nice.\n" ) diff --git a/hyperstation/code/modules/mob/mob_helpers.dm b/hyperstation/code/modules/mob/mob_helpers.dm index 5c5229ab..a02975fc 100644 --- a/hyperstation/code/modules/mob/mob_helpers.dm +++ b/hyperstation/code/modules/mob/mob_helpers.dm @@ -5,23 +5,24 @@ mob/proc/checkloadappearance() SEND_SOUND(H, 'sound/misc/server-ready.ogg') to_chat(H, "This ghost role allows you to select your loaded character's appearance. Make sure you have your ID in your ID slot, if you have one.") if(alert(H, "Would you like to load your currently loaded character's appearance?", "This can only be done up until 90s after you spawn.", "Yes", "No") == "Yes" && world.time <= (H.time_initialized + 900)) - H.client.prefs.copy_to(H) - if (H.custom_body_size) //Do they have a custom size set? - H.resize(H.custom_body_size * 0.01) - H.real_name = H.client.prefs.real_name - H.mind.name = H.real_name //Makes sure to change their mind name to their real name. - SSquirks.AssignQuirks(H, H.client, TRUE, FALSE, H.job, FALSE)//This Assigns the selected character's quirks - H.dna.update_dna_identity() //This makes sure their DNA is updated. - var/obj/item/card/id/idCard = H.get_idcard() //Time to change their ID card as well if they have one. - if (idCard != null) - idCard.update_label(H.real_name, idCard.assignment) - idCard.registered_name = H.real_name - H.mirrorcanloadappearance = FALSE //Prevents them from using the mirror again. - SEND_SOUND(H, 'sound/magic/charge.ogg') //Fluff - to_chat(H, "Your head aches for a second. You feel like this is how things should have been.") - log_game("[key_name(H)] has loaded their default appearance for a ghost role.") - message_admins("[ADMIN_LOOKUPFLW(H)] has loaded their default appearance for a ghost role.") - return - else - to_chat(H, "You either took too long or chose not to change. Alrighty. Remember, you have 90 seconds from spawn to get to a mirror and still do it if you wish.") - return + if(alert(H, "You should only load a character that has not currently died in the round. Do you accept this?", "Warning", "Yes", "No") == "Yes" && world.time <= (H.time_initialized + 900)) + H.client.prefs.copy_to(H) + if (H.custom_body_size) //Do they have a custom size set? + H.resize(H.custom_body_size * 0.01) + H.real_name = H.client.prefs.real_name + H.mind.name = H.real_name //Makes sure to change their mind name to their real name. + SSquirks.AssignQuirks(H, H.client, TRUE, FALSE, H.job, FALSE)//This Assigns the selected character's quirks + H.dna.update_dna_identity() //This makes sure their DNA is updated. + var/obj/item/card/id/idCard = H.get_idcard() //Time to change their ID card as well if they have one. + if (idCard != null) + idCard.update_label(H.real_name, idCard.assignment) + idCard.registered_name = H.real_name + H.mirrorcanloadappearance = FALSE //Prevents them from using the mirror again. + SEND_SOUND(H, 'sound/magic/charge.ogg') //Fluff + to_chat(H, "Your head aches for a second. You feel like this is how things should have been.") + log_game("[key_name(H)] has loaded their default appearance for a ghost role.") + message_admins("[ADMIN_LOOKUPFLW(H)] has loaded their default appearance for a ghost role.") + return + else + to_chat(H, "You either took too long or chose not to change. Alrighty. Remember, you have 90 seconds from spawn to get to a mirror and still do it if you wish.") + return diff --git a/modular_citadel/code/game/machinery/toylathe.dm b/modular_citadel/code/game/machinery/toylathe.dm index 903235c7..aa8b8cd1 100644 --- a/modular_citadel/code/game/machinery/toylathe.dm +++ b/modular_citadel/code/game/machinery/toylathe.dm @@ -69,7 +69,7 @@ popup.open() /obj/machinery/autoylathe/on_deconstruction() - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.retrieve_all() /obj/machinery/autoylathe/attackby(obj/item/O, mob/user, params) @@ -157,7 +157,7 @@ var/plastic_cost = being_built.materials[MAT_PLASTIC] var/power = max(2000, (metal_cost+glass_cost+plastic_cost)*multiplier/5) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) if((materials.amount(MAT_METAL) >= metal_cost*multiplier*coeff) && (materials.amount(MAT_GLASS) >= glass_cost*multiplier*coeff) && (materials.amount(MAT_PLASTIC) >= plastic_cost*multiplier*coeff)) busy = TRUE use_power(power) @@ -181,7 +181,7 @@ return /obj/machinery/autoylathe/proc/make_item(power, metal_cost, glass_cost, plastic_cost, multiplier, coeff, is_stack) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/atom/A = drop_location() use_power(power) var/list/materials_used = list(MAT_METAL=metal_cost*coeff*multiplier, MAT_GLASS=glass_cost*coeff*multiplier, MAT_PLASTIC=plastic_cost*coeff*multiplier) @@ -205,7 +205,7 @@ var/T = 0 for(var/obj/item/stock_parts/matter_bin/MB in component_parts) T += MB.rating*75000 - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.max_amount = T T=1.2 for(var/obj/item/stock_parts/manipulator/M in component_parts) @@ -254,7 +254,7 @@ dat += "[D.name]" if(ispath(D.build_path, /obj/item/stack)) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/max_multiplier = min(D.maxstack, D.materials[MAT_METAL] ?round(materials.amount(MAT_METAL)/D.materials[MAT_METAL]):INFINITY,D.materials[MAT_GLASS] ?round(materials.amount(MAT_GLASS)/D.materials[MAT_GLASS]):INFINITY,D.materials[MAT_PLASTIC] ?round(materials.amount(MAT_PLASTIC)/D.materials[MAT_PLASTIC]):INFINITY) if (max_multiplier>10 && !disabled) dat += " x10" @@ -286,7 +286,7 @@ dat += "[D.name]" if(ispath(D.build_path, /obj/item/stack)) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/max_multiplier = min(D.maxstack, D.materials[MAT_METAL] ?round(materials.amount(MAT_METAL)/D.materials[MAT_METAL]):INFINITY,D.materials[MAT_GLASS] ?round(materials.amount(MAT_GLASS)/D.materials[MAT_GLASS]):INFINITY,D.materials[MAT_PLASTIC] ?round(materials.amount(MAT_PLASTIC)/D.materials[MAT_PLASTIC]):INFINITY) if (max_multiplier>10 && !disabled) dat += " x10" @@ -301,7 +301,7 @@ return dat /obj/machinery/autoylathe/proc/materials_printout() - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) var/dat = "Total amount: [materials.total_amount] / [materials.max_amount] cm3
" for(var/mat_id in materials.materials) var/datum/material/M = materials.materials[mat_id] @@ -314,7 +314,7 @@ var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : prod_coeff) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) if(D.materials[MAT_METAL] && (materials.amount(MAT_METAL) < (D.materials[MAT_METAL] * coeff * amount))) return FALSE if(D.materials[MAT_GLASS] && (materials.amount(MAT_GLASS) < (D.materials[MAT_GLASS] * coeff * amount))) diff --git a/modular_citadel/code/game/objects/items/storage/firstaid.dm b/modular_citadel/code/game/objects/items/storage/firstaid.dm index 125330a9..95c88ecc 100644 --- a/modular_citadel/code/game/objects/items/storage/firstaid.dm +++ b/modular_citadel/code/game/objects/items/storage/firstaid.dm @@ -49,7 +49,7 @@ /obj/item/storage/hypospraykit/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 12 STR.can_hold = typecacheof(list( /obj/item/hypospray/mkii, @@ -151,7 +151,7 @@ /obj/item/storage/hypospraykit/cmo/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.can_hold = typecacheof(list( /obj/item/hypospray/mkii, diff --git a/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm b/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm index a2792f0c..66c43f2b 100644 --- a/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm +++ b/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm @@ -142,7 +142,7 @@ SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm ! /obj/item/storage/bag/borgdelivery/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_BULKY STR.max_combined_w_class = 5 STR.max_items = 1 diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm index ebd0b597..838af7b4 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm @@ -184,7 +184,7 @@ /datum/reagent/fermi/nanite_b_gone/on_mob_life(mob/living/carbon/C) //var/component/nanites/N = M.GetComponent(/datum/component/nanites) - GET_COMPONENT_FROM(N, /datum/component/nanites, C) + var/datum/component/nanites/N = C.GetComponent(/datum/component/nanites) if(isnull(N)) return ..() N.nanite_volume = -purity//0.5 seems to be the default to me, so it'll neuter them. @@ -192,7 +192,7 @@ /datum/reagent/fermi/nanite_b_gone/overdose_process(mob/living/carbon/C) //var/component/nanites/N = M.GetComponent(/datum/component/nanites) - GET_COMPONENT_FROM(N, /datum/component/nanites, C) + var/datum/component/nanites/N = C.GetComponent(/datum/component/nanites) if(prob(5)) to_chat(C, "The residual voltage from the nanites causes you to seize up!") C.electrocute_act(10, (get_turf(C)), 1, FALSE, FALSE, FALSE, TRUE) diff --git a/modular_citadel/code/modules/vehicles/secway.dm b/modular_citadel/code/modules/vehicles/secway.dm index 85c1de15..9320da6d 100644 --- a/modular_citadel/code/modules/vehicles/secway.dm +++ b/modular_citadel/code/modules/vehicles/secway.dm @@ -24,7 +24,7 @@ if(H.sprinting && charge) charge-- new_speed = chargespeed - GET_COMPONENT(D, /datum/component/riding) + var/datum/component/riding/D = GetComponent(/datum/component/riding) D.vehicle_move_delay = new_speed for(var/i in progressbars_by_rider) var/datum/progressbar/B = progressbars_by_rider[i]