diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm index ed5b07168f..bb9bc75d25 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm @@ -475,6 +475,8 @@ dir = 4 }, /obj/item/storage/bag/plants/portaseeder, +/obj/item/seeds/cotton, +/obj/item/seeds/cotton, /turf/open/indestructible/boss, /area/ruin/unpowered/ash_walkers) "bk" = ( diff --git a/_maps/RandomRuins/SpaceRuins/augmentationfacility.dmm b/_maps/RandomRuins/SpaceRuins/augmentationfacility.dmm index c64050ce3a..e23beb3407 100644 --- a/_maps/RandomRuins/SpaceRuins/augmentationfacility.dmm +++ b/_maps/RandomRuins/SpaceRuins/augmentationfacility.dmm @@ -90,6 +90,9 @@ /obj/structure/table, /obj/effect/decal/cleanable/dirt, /obj/item/organ/cyberimp/chest/reviver, +/obj/item/stack/sheet/mineral/gold{ + amount = 3 + }, /turf/open/floor/plasteel, /area/ruin/powered) "s" = ( @@ -145,9 +148,6 @@ "A" = ( /obj/structure/table, /obj/effect/decal/cleanable/dirt, -/obj/item/mmi/posibrain{ - pixel_y = 9 - }, /obj/item/mmi, /turf/open/floor/plasteel, /area/ruin/powered) diff --git a/_maps/RandomRuins/SpaceRuins/hilbertshoteltestingsite.dmm b/_maps/RandomRuins/SpaceRuins/hilbertshoteltestingsite.dmm new file mode 100644 index 0000000000..a89d1422d2 --- /dev/null +++ b/_maps/RandomRuins/SpaceRuins/hilbertshoteltestingsite.dmm @@ -0,0 +1,970 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"a" = ( +/turf/open/space/basic, +/area/template_noop) +"b" = ( +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"c" = ( +/turf/closed/wall/r_wall/rust, +/area/ruin/space/has_grav/hilbertresearchfacility) +"d" = ( +/turf/closed/wall/r_wall, +/area/ruin/space/has_grav/hilbertresearchfacility) +"e" = ( +/obj/machinery/porta_turret/syndicate{ + desc = "A ballistic machine gun auto-turret that fires bluespace bullets."; + lethal_projectile = /obj/item/projectile/magic/teleport; + name = "displacement turret"; + stun_projectile = /obj/item/projectile/magic/teleport + }, +/turf/open/floor/plasteel/grimy{ + icon_state = "engine" + }, +/area/ruin/space/has_grav/hilbertresearchfacility) +"f" = ( +/turf/open/floor/plasteel/grimy{ + icon_state = "engine" + }, +/area/ruin/space/has_grav/hilbertresearchfacility) +"g" = ( +/obj/structure/table/glass, +/turf/open/floor/plasteel/grimy{ + icon_state = "engine" + }, +/area/ruin/space/has_grav/hilbertresearchfacility) +"h" = ( +/obj/structure/table/glass, +/obj/item/stack/sheet/bluespace_crystal{ + amount = 37 + }, +/turf/open/floor/plasteel/grimy{ + icon_state = "engine" + }, +/area/ruin/space/has_grav/hilbertresearchfacility) +"i" = ( +/obj/structure/table/glass, +/obj/item/bodybag/bluespace, +/turf/open/floor/plasteel/grimy{ + icon_state = "engine" + }, +/area/ruin/space/has_grav/hilbertresearchfacility) +"j" = ( +/turf/open/floor/plasteel/stairs/left, +/area/ruin/space/has_grav/hilbertresearchfacility) +"k" = ( +/turf/open/floor/plasteel/stairs/medium, +/area/ruin/space/has_grav/hilbertresearchfacility) +"l" = ( +/turf/open/floor/plasteel/stairs/right, +/area/ruin/space/has_grav/hilbertresearchfacility) +"m" = ( +/obj/structure/table/glass, +/obj/item/reagent_containers/syringe/bluespace, +/turf/open/floor/plasteel/grimy{ + icon_state = "engine" + }, +/area/ruin/space/has_grav/hilbertresearchfacility) +"n" = ( +/obj/structure/table/glass, +/obj/item/stock_parts/matter_bin/bluespace, +/turf/open/floor/plasteel/grimy{ + icon_state = "engine" + }, +/area/ruin/space/has_grav/hilbertresearchfacility) +"o" = ( +/turf/open/floor/plasteel/vaporwave, +/area/ruin/space/has_grav/hilbertresearchfacility) +"p" = ( +/obj/structure/table/glass, +/obj/item/stack/cable_coil/blue, +/turf/open/floor/plasteel/grimy{ + icon_state = "engine" + }, +/area/ruin/space/has_grav/hilbertresearchfacility) +"q" = ( +/obj/structure/table/glass, +/obj/item/storage/backpack/holding, +/turf/open/floor/plasteel/grimy{ + icon_state = "engine" + }, +/area/ruin/space/has_grav/hilbertresearchfacility) +"r" = ( +/obj/structure/table/glass, +/obj/item/reagent_containers/glass/beaker/bluespace, +/turf/open/floor/plasteel/grimy{ + icon_state = "engine" + }, +/area/ruin/space/has_grav/hilbertresearchfacility) +"s" = ( +/obj/structure/table/glass, +/obj/item/stock_parts/subspace/crystal, +/obj/item/stock_parts/subspace/transmitter, +/turf/open/floor/plasteel/grimy{ + icon_state = "engine" + }, +/area/ruin/space/has_grav/hilbertresearchfacility) +"t" = ( +/obj/structure/displaycase{ + start_showpiece_type = /obj/item/hilbertshotel + }, +/turf/open/floor/plasteel/vaporwave, +/area/ruin/space/has_grav/hilbertresearchfacility) +"u" = ( +/obj/structure/table/glass, +/obj/item/analyzer, +/turf/open/floor/plasteel/grimy{ + icon_state = "engine" + }, +/area/ruin/space/has_grav/hilbertresearchfacility) +"v" = ( +/obj/structure/table/glass, +/obj/item/stock_parts/subspace/amplifier, +/turf/open/floor/plasteel/grimy{ + icon_state = "engine" + }, +/area/ruin/space/has_grav/hilbertresearchfacility) +"w" = ( +/obj/item/paper/crumpled/docslogs, +/obj/item/pen, +/turf/open/floor/plasteel/vaporwave, +/area/ruin/space/has_grav/hilbertresearchfacility) +"x" = ( +/obj/structure/table/glass, +/obj/item/assembly/signaler, +/turf/open/floor/plasteel/grimy{ + icon_state = "engine" + }, +/area/ruin/space/has_grav/hilbertresearchfacility) +"y" = ( +/obj/structure/table/glass, +/obj/item/slimecross/industrial/bluespace, +/turf/open/floor/plasteel/grimy{ + icon_state = "engine" + }, +/area/ruin/space/has_grav/hilbertresearchfacility) +"z" = ( +/obj/machinery/door/airlock/vault{ + name = "secured door"; + req_access = 207 + }, +/obj/effect/mapping_helpers/airlock/locked, +/turf/open/floor/plasteel/grimy{ + icon_state = "engine" + }, +/area/ruin/space/has_grav/hilbertresearchfacility) +"A" = ( +/obj/structure/filingcabinet, +/turf/open/floor/plasteel/grimy, +/area/ruin/space/has_grav/hilbertresearchfacility) +"B" = ( +/turf/open/floor/plasteel/grimy, +/area/ruin/space/has_grav/hilbertresearchfacility) +"C" = ( +/obj/structure/table/reinforced, +/turf/open/floor/plasteel/grimy, +/area/ruin/space/has_grav/hilbertresearchfacility) +"D" = ( +/obj/item/twohanded/required/kirbyplants/random, +/turf/open/floor/plasteel/grimy, +/area/ruin/space/has_grav/hilbertresearchfacility) +"E" = ( +/obj/structure/chair/office, +/turf/open/floor/plasteel/grimy, +/area/ruin/space/has_grav/hilbertresearchfacility) +"F" = ( +/obj/machinery/door/window/eastleft, +/turf/open/floor/plasteel/grimy, +/area/ruin/space/has_grav/hilbertresearchfacility) +"G" = ( +/obj/structure/table/reinforced, +/obj/item/pen, +/turf/open/floor/plasteel/grimy, +/area/ruin/space/has_grav/hilbertresearchfacility) +"H" = ( +/obj/structure/table/reinforced, +/obj/item/paper/crumpled/robertsworkjournal, +/turf/open/floor/plasteel/grimy, +/area/ruin/space/has_grav/hilbertresearchfacility) +"I" = ( +/obj/machinery/door/airlock/highsecurity{ + req_access = 207 + }, +/obj/effect/mapping_helpers/airlock/locked, +/turf/open/floor/plasteel/grimy, +/area/ruin/space/has_grav/hilbertresearchfacility) +"J" = ( +/turf/closed/mineral/random, +/area/ruin/unpowered/no_grav) +"K" = ( +/turf/open/floor/plasteel/stairs/right{ + initial_gas_mix = "TEMP=2.7" + }, +/area/ruin/unpowered/no_grav) +"U" = ( +/turf/open/floor/plasteel/stairs/medium{ + initial_gas_mix = "TEMP=2.7" + }, +/area/ruin/unpowered/no_grav) +"X" = ( +/turf/open/floor/plasteel/stairs/left{ + initial_gas_mix = "TEMP=2.7" + }, +/area/ruin/unpowered/no_grav) + +(1,1,1) = {" +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +"} +(2,1,1) = {" +a +a +a +a +a +a +a +a +a +a +a +b +b +b +a +a +a +a +a +a +a +a +a +a +a +a +"} +(3,1,1) = {" +a +a +a +a +a +a +a +a +a +a +b +J +J +J +a +a +a +a +a +a +a +a +a +a +a +a +"} +(4,1,1) = {" +a +a +a +J +b +J +b +b +a +b +J +b +b +b +b +a +a +a +a +a +a +a +a +a +a +a +"} +(5,1,1) = {" +a +a +b +J +J +J +b +J +b +J +b +b +J +J +J +b +a +a +a +a +a +a +a +a +a +a +"} +(6,1,1) = {" +a +a +b +c +c +c +c +c +d +d +c +d +d +c +d +d +b +a +a +a +a +a +a +a +a +a +"} +(7,1,1) = {" +a +a +b +d +e +f +f +m +r +g +g +f +f +f +e +c +b +a +a +a +a +a +a +a +a +a +"} +(8,1,1) = {" +a +a +b +d +f +f +f +f +f +f +f +f +f +f +f +d +J +b +b +b +b +b +a +a +a +a +"} +(9,1,1) = {" +a +a +J +d +f +f +f +f +f +f +f +f +f +f +f +c +J +b +b +J +b +b +b +a +a +a +"} +(10,1,1) = {" +a +a +J +c +f +f +f +f +f +f +f +f +f +f +f +c +J +b +J +b +b +J +b +a +a +a +"} +(11,1,1) = {" +a +a +J +c +g +f +f +n +s +v +f +f +f +f +f +c +J +J +J +J +J +J +b +a +a +a +"} +(12,1,1) = {" +a +a +J +c +g +f +j +o +o +o +j +f +f +f +c +d +d +c +c +d +c +J +b +a +a +a +"} +(13,1,1) = {" +a +a +J +c +h +f +k +o +t +o +k +f +f +f +c +A +B +C +B +D +c +J +J +a +a +a +"} +(14,1,1) = {" +a +a +J +c +g +f +l +o +o +w +l +f +f +f +d +B +B +G +B +B +c +J +b +b +a +a +"} +(15,1,1) = {" +a +a +J +c +i +f +f +p +u +x +f +f +f +f +d +B +E +H +B +B +c +J +J +J +a +a +"} +(16,1,1) = {" +a +b +J +c +f +f +f +f +f +f +f +f +f +f +c +B +B +C +B +B +c +b +J +b +a +a +"} +(17,1,1) = {" +a +b +J +d +f +f +f +f +f +f +f +f +f +f +c +C +F +C +B +B +c +b +b +b +a +a +"} +(18,1,1) = {" +a +b +J +d +f +f +f +f +f +f +f +f +f +f +d +B +B +B +B +B +d +b +b +b +b +a +"} +(19,1,1) = {" +a +b +J +d +f +f +f +f +f +f +f +f +f +f +z +B +B +B +B +B +d +b +b +b +b +a +"} +(20,1,1) = {" +a +a +b +c +e +f +g +q +g +y +g +f +e +f +c +B +B +B +B +B +d +b +b +b +b +a +"} +(21,1,1) = {" +a +a +b +c +c +c +c +c +c +d +d +c +c +c +d +B +B +B +B +B +d +X +b +b +b +a +"} +(22,1,1) = {" +a +a +b +b +J +J +b +b +J +J +J +J +J +J +d +D +B +B +B +B +I +U +b +b +b +a +"} +(23,1,1) = {" +a +a +a +b +b +J +J +b +b +b +b +J +b +J +c +d +d +c +d +c +d +K +b +b +b +a +"} +(24,1,1) = {" +a +a +a +a +b +b +J +J +J +b +b +b +b +J +b +b +J +J +J +J +b +b +b +b +b +a +"} +(25,1,1) = {" +a +a +a +a +a +b +b +b +J +J +J +J +b +b +b +b +b +b +a +J +J +J +b +J +b +a +"} +(26,1,1) = {" +a +a +a +a +a +a +a +a +b +b +b +a +b +b +b +b +b +a +a +a +J +J +J +J +J +a +"} +(27,1,1) = {" +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +"} diff --git a/_maps/templates/hilbertshotel.dmm b/_maps/templates/hilbertshotel.dmm new file mode 100644 index 0000000000..4e4d8f8267 --- /dev/null +++ b/_maps/templates/hilbertshotel.dmm @@ -0,0 +1,545 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"a" = ( +/turf/open/space/bluespace, +/area/hilbertshotel) +"b" = ( +/turf/closed/indestructible/hotelwall, +/area/hilbertshotel) +"c" = ( +/obj/machinery/jukebox{ + req_access = null + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"d" = ( +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"e" = ( +/obj/structure/table/wood, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"f" = ( +/obj/structure/table/wood, +/obj/structure/showcase/machinery/tv, +/obj/machinery/light/small{ + dir = 1 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"g" = ( +/obj/structure/dresser, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"h" = ( +/obj/structure/table/wood/fancy, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"i" = ( +/obj/structure/table/wood/fancy, +/obj/structure/mirror{ + pixel_y = 24 + }, +/obj/machinery/light/small{ + dir = 1 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"j" = ( +/obj/structure/table/wood/fancy, +/obj/item/flashlight/lamp/green, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"k" = ( +/obj/structure/chair/comfy/brown{ + dir = 4 + }, +/obj/machinery/light/small{ + dir = 8 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"l" = ( +/obj/structure/table/wood/poker, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"m" = ( +/obj/structure/chair/comfy/brown{ + dir = 8 + }, +/obj/machinery/light/small{ + dir = 4 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"n" = ( +/obj/effect/landmark/xmastree, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"o" = ( +/obj/structure/chair/comfy/brown{ + dir = 1 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"p" = ( +/obj/structure/mineral_door/wood, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"q" = ( +/obj/structure/bed, +/obj/item/bedsheet/random, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"r" = ( +/obj/structure/closet/cabinet{ + anchored = 1 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"s" = ( +/obj/structure/table/wood/fancy, +/obj/item/reagent_containers/food/snacks/grown/poppy, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"t" = ( +/obj/machinery/light/small{ + dir = 8 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"u" = ( +/obj/structure/mineral_door/paperframe, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"v" = ( +/obj/structure/extinguisher_cabinet{ + pixel_x = 32 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"w" = ( +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"x" = ( +/obj/structure/curtain, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"y" = ( +/obj/machinery/door/window/northleft, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"z" = ( +/obj/structure/table/reinforced, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"A" = ( +/obj/structure/mirror{ + pixel_x = -32 + }, +/obj/structure/sink{ + dir = 8; + pixel_x = -12; + pixel_y = 2 + }, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"B" = ( +/obj/structure/chair/stool/bar, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"C" = ( +/obj/machinery/shower{ + dir = 8 + }, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"D" = ( +/obj/machinery/light_switch{ + pixel_x = 32 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"E" = ( +/obj/structure/table/reinforced, +/obj/item/soap/deluxe, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"F" = ( +/obj/structure/window/reinforced/tinted{ + dir = 8 + }, +/obj/structure/window/reinforced/tinted{ + dir = 1 + }, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"G" = ( +/obj/machinery/light_switch{ + pixel_x = -32 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"H" = ( +/obj/structure/table/reinforced, +/obj/machinery/microwave, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"I" = ( +/turf/closed/indestructible/hoteldoor, +/area/hilbertshotel) +"J" = ( +/obj/machinery/light/small, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"K" = ( +/obj/structure/closet/crate/bin, +/obj/machinery/light/small{ + dir = 4 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"L" = ( +/obj/machinery/light/small{ + dir = 1 + }, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"M" = ( +/obj/structure/table/reinforced, +/obj/machinery/light/small{ + dir = 4 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"N" = ( +/obj/structure/table/reinforced, +/obj/item/soap/deluxe, +/obj/machinery/light/small{ + dir = 8 + }, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"O" = ( +/obj/item/bikehorn/rubberducky, +/obj/machinery/light/small{ + dir = 4 + }, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"P" = ( +/obj/machinery/light/small, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"Q" = ( +/obj/machinery/smartfridge/food, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"R" = ( +/obj/structure/toilet{ + dir = 8 + }, +/obj/structure/window/reinforced/tinted{ + dir = 1 + }, +/obj/structure/window/reinforced/tinted{ + dir = 8 + }, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"S" = ( +/obj/structure/window/reinforced/tinted{ + dir = 8 + }, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"T" = ( +/obj/structure/window/reinforced/tinted{ + dir = 8 + }, +/obj/structure/window/reinforced/tinted, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"U" = ( +/obj/structure/table/reinforced, +/obj/structure/sink/kitchen, +/obj/machinery/light/small, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"V" = ( +/obj/structure/table/reinforced, +/obj/effect/spawner/lootdrop/three_course_meal, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) + +(1,1,1) = {" +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +"} +(2,1,1) = {" +a +b +b +b +b +b +I +b +b +b +b +b +b +b +a +"} +(3,1,1) = {" +a +b +d +d +k +d +d +t +d +y +t +H +z +b +a +"} +(4,1,1) = {" +a +b +e +d +l +o +d +d +B +z +d +d +z +b +a +"} +(5,1,1) = {" +a +b +f +d +l +o +d +d +B +V +d +d +U +b +a +"} +(6,1,1) = {" +a +b +e +d +l +o +d +d +B +z +d +d +z +b +a +"} +(7,1,1) = {" +a +b +c +d +m +d +D +K +v +z +M +Q +z +b +a +"} +(8,1,1) = {" +a +b +b +b +b +p +b +b +b +b +b +b +b +b +a +"} +(9,1,1) = {" +a +b +g +d +t +d +G +u +w +A +N +A +E +b +a +"} +(10,1,1) = {" +a +b +h +d +d +d +d +b +w +w +w +w +w +b +a +"} +(11,1,1) = {" +a +b +i +d +n +d +J +b +L +w +R +w +P +b +a +"} +(12,1,1) = {" +a +b +h +d +d +d +r +b +x +F +S +T +x +b +a +"} +(13,1,1) = {" +a +b +d +d +d +d +d +b +w +w +w +w +w +b +a +"} +(14,1,1) = {" +a +b +d +j +q +q +s +b +w +C +O +C +w +b +a +"} +(15,1,1) = {" +a +b +b +b +b +b +b +b +b +b +b +b +b +b +a +"} +(16,1,1) = {" +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +"} diff --git a/_maps/templates/hilbertshotelempty.dmm b/_maps/templates/hilbertshotelempty.dmm new file mode 100644 index 0000000000..a0482c93ba --- /dev/null +++ b/_maps/templates/hilbertshotelempty.dmm @@ -0,0 +1,289 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"a" = ( +/turf/open/space/bluespace, +/area/hilbertshotel) +"b" = ( +/turf/closed/indestructible/hotelwall, +/area/hilbertshotel) +"c" = ( +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"d" = ( +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"e" = ( +/turf/closed/indestructible/hoteldoor, +/area/hilbertshotel) + +(1,1,1) = {" +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +"} +(2,1,1) = {" +a +b +b +b +b +b +e +b +b +b +b +b +b +b +a +"} +(3,1,1) = {" +a +b +c +c +c +c +c +c +c +c +c +c +c +b +a +"} +(4,1,1) = {" +a +b +c +c +c +c +c +c +c +c +c +c +c +b +a +"} +(5,1,1) = {" +a +b +c +c +c +c +c +c +c +c +c +c +c +b +a +"} +(6,1,1) = {" +a +b +c +c +c +c +c +c +c +c +c +c +c +b +a +"} +(7,1,1) = {" +a +b +c +c +c +c +c +c +c +c +c +c +c +b +a +"} +(8,1,1) = {" +a +b +b +b +b +c +b +b +b +b +b +b +b +b +a +"} +(9,1,1) = {" +a +b +c +c +c +c +c +c +d +d +d +d +d +b +a +"} +(10,1,1) = {" +a +b +c +c +c +c +c +b +d +d +d +d +d +b +a +"} +(11,1,1) = {" +a +b +c +c +c +c +c +b +d +d +d +d +d +b +a +"} +(12,1,1) = {" +a +b +c +c +c +c +c +b +d +d +d +d +d +b +a +"} +(13,1,1) = {" +a +b +c +c +c +c +c +b +d +d +d +d +d +b +a +"} +(14,1,1) = {" +a +b +c +c +c +c +c +b +d +d +d +d +d +b +a +"} +(15,1,1) = {" +a +b +b +b +b +b +b +b +b +b +b +b +b +b +a +"} +(16,1,1) = {" +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +"} diff --git a/_maps/templates/hilbertshotellore.dmm b/_maps/templates/hilbertshotellore.dmm new file mode 100644 index 0000000000..f6be66bd06 --- /dev/null +++ b/_maps/templates/hilbertshotellore.dmm @@ -0,0 +1,639 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"aa" = ( +/turf/open/space/bluespace, +/area/hilbertshotel) +"ab" = ( +/turf/closed/indestructible/hotelwall, +/area/hilbertshotel) +"ac" = ( +/obj/structure/table/wood/fancy, +/obj/structure/mirror{ + broken = 1; + desc = "Oh no, seven years of bad luck!"; + icon_state = "mirror_broke"; + pixel_y = 24 + }, +/obj/machinery/light/small{ + dir = 1 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"ad" = ( +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"ae" = ( +/obj/structure/table/wood, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"af" = ( +/obj/structure/table/wood, +/obj/structure/showcase/machinery/tv, +/obj/machinery/light/small{ + dir = 1 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"ag" = ( +/obj/structure/dresser, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"ah" = ( +/obj/structure/table/wood/fancy, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"ai" = ( +/obj/structure/table/wood/poker, +/obj/item/toy/cards/deck, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"aj" = ( +/obj/structure/table/wood/fancy, +/obj/item/flashlight/lamp/green, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"ak" = ( +/obj/structure/chair/comfy/brown{ + dir = 4 + }, +/obj/machinery/light/small{ + dir = 8 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"al" = ( +/obj/structure/table/wood/poker, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"am" = ( +/obj/structure/chair/comfy/brown{ + dir = 8 + }, +/obj/machinery/light/small{ + dir = 4 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"an" = ( +/obj/machinery/light/small{ + dir = 8 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"ap" = ( +/obj/structure/bed, +/obj/item/bedsheet/random, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"aq" = ( +/obj/structure/chair/comfy/brown{ + dir = 1 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"ar" = ( +/obj/structure/mineral_door/wood, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"as" = ( +/turf/closed/indestructible/hoteldoor, +/area/hilbertshotel) +"at" = ( +/obj/effect/decal/cleanable/cobweb, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"au" = ( +/obj/machinery/light_switch{ + pixel_x = -32 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"av" = ( +/obj/machinery/light/small, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"aw" = ( +/obj/structure/closet/cabinet{ + anchored = 1 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"ax" = ( +/obj/effect/decal/cleanable/dirt, +/obj/effect/decal/cleanable/cobweb/cobweb2, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"ay" = ( +/obj/structure/closet/crate/bin, +/obj/machinery/light/small{ + dir = 4 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"az" = ( +/obj/structure/mineral_door/paperframe, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"aA" = ( +/obj/structure/chair/stool/bar, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"aB" = ( +/obj/structure/extinguisher_cabinet{ + pixel_x = 32 + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"aC" = ( +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"aD" = ( +/obj/machinery/light/small{ + dir = 1 + }, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"aE" = ( +/obj/structure/curtain, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"aF" = ( +/obj/machinery/door/window/northleft, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"aG" = ( +/obj/structure/table/reinforced, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"aH" = ( +/obj/structure/table/reinforced, +/obj/item/pen, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"aI" = ( +/obj/structure/mirror{ + pixel_x = -32 + }, +/obj/structure/sink{ + dir = 8; + pixel_x = -12; + pixel_y = 2 + }, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"aJ" = ( +/obj/structure/window/reinforced/tinted{ + dir = 8 + }, +/obj/structure/window/reinforced/tinted{ + dir = 1 + }, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"aK" = ( +/obj/machinery/shower{ + dir = 8 + }, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"aL" = ( +/obj/effect/decal/cleanable/dirt, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"aM" = ( +/obj/structure/table/wood/poker, +/obj/effect/decal/cleanable/dirt, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"aN" = ( +/obj/structure/toilet{ + dir = 8 + }, +/obj/structure/window/reinforced/tinted{ + dir = 1 + }, +/obj/structure/window/reinforced/tinted{ + dir = 8 + }, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"aO" = ( +/obj/structure/window/reinforced/tinted{ + dir = 8 + }, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"aP" = ( +/obj/item/bikehorn/rubberducky, +/obj/machinery/light/small{ + dir = 4 + }, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"aQ" = ( +/obj/structure/table/reinforced, +/obj/machinery/microwave, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"aR" = ( +/obj/machinery/smartfridge/food, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"aS" = ( +/obj/structure/window/reinforced/tinted{ + dir = 8 + }, +/obj/structure/window/reinforced/tinted, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"aT" = ( +/obj/structure/table/reinforced, +/obj/structure/sink/kitchen, +/obj/machinery/light/small, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"aU" = ( +/obj/structure/bed, +/obj/item/bedsheet/random, +/obj/effect/decal/cleanable/dirt, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"aV" = ( +/obj/machinery/light/small, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"aW" = ( +/obj/machinery/jukebox{ + req_access = null + }, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"aX" = ( +/obj/machinery/light_switch{ + pixel_x = 32 + }, +/obj/effect/decal/cleanable/dirt, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"aY" = ( +/obj/structure/chair/stool/bar, +/obj/effect/decal/cleanable/blood, +/obj/effect/decal/cleanable/vomit, +/obj/effect/mob_spawn/human/doctorhilbert, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"aZ" = ( +/obj/effect/decal/cleanable/dirt, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"ba" = ( +/obj/effect/decal/cleanable/dirt, +/obj/effect/decal/cleanable/cobweb/cobweb2, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"bb" = ( +/obj/structure/mirror{ + pixel_x = -32 + }, +/obj/structure/sink{ + dir = 8; + pixel_x = -12; + pixel_y = 2 + }, +/obj/effect/decal/cleanable/dirt, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"bc" = ( +/obj/effect/decal/cleanable/blood, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"bd" = ( +/obj/machinery/shower{ + dir = 8 + }, +/obj/effect/decal/cleanable/dirt, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"be" = ( +/obj/machinery/light/small{ + dir = 8 + }, +/obj/effect/decal/cleanable/dirt, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"bf" = ( +/obj/effect/decal/cleanable/dirt, +/obj/effect/decal/cleanable/dirt, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"bg" = ( +/obj/structure/table/reinforced, +/obj/machinery/light/small{ + dir = 4 + }, +/obj/effect/decal/cleanable/dirt, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"bh" = ( +/obj/structure/table/reinforced, +/obj/machinery/light/small{ + dir = 8 + }, +/obj/item/soap/homemade{ + name = "used soap" + }, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"bi" = ( +/obj/effect/decal/cleanable/vomit, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"bj" = ( +/obj/structure/table/reinforced, +/obj/item/soap/homemade{ + name = "used soap" + }, +/turf/open/indestructible/hoteltile, +/area/hilbertshotel) +"bk" = ( +/obj/structure/table/reinforced, +/obj/item/analyzer/hilbertsanalyzer, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) +"bl" = ( +/obj/structure/table/reinforced, +/obj/item/paper/crumpled/bloody/docsdeathnote, +/turf/open/indestructible/hotelwood, +/area/hilbertshotel) + +(1,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +"} +(2,1,1) = {" +aa +ab +ab +ab +ab +ab +as +ab +ab +ab +ab +ab +ab +ab +aa +"} +(3,1,1) = {" +aa +ab +at +aL +ak +ad +aL +an +ad +aF +be +aQ +aG +ab +aa +"} +(4,1,1) = {" +aa +ab +ae +ad +al +aq +ad +ad +aA +aH +ad +aL +aG +ab +aa +"} +(5,1,1) = {" +aa +ab +af +ad +ai +aq +aL +ad +aY +bl +ad +aL +aT +ab +aa +"} +(6,1,1) = {" +aa +ab +ae +ad +aM +aq +ad +ad +aA +bk +bf +bf +aG +ab +aa +"} +(7,1,1) = {" +aa +ab +aW +aL +am +ad +aX +ay +aB +aG +bg +aR +aG +ab +aa +"} +(8,1,1) = {" +aa +ab +ab +ab +ab +ar +ab +ab +ab +ab +ab +ab +ab +ab +aa +"} +(9,1,1) = {" +aa +ab +ag +ad +an +ad +au +az +aC +bb +bh +aI +bj +ab +aa +"} +(10,1,1) = {" +aa +ab +ah +ad +aL +aL +ad +ab +aZ +aZ +aC +aZ +aZ +ab +aa +"} +(11,1,1) = {" +aa +ab +ac +ad +ad +aL +av +ab +aD +aC +aN +bi +aV +ab +aa +"} +(12,1,1) = {" +aa +ab +ah +ad +aL +ad +aw +ab +aE +aJ +aO +aS +aE +ab +aa +"} +(13,1,1) = {" +aa +ab +ad +ad +aL +ad +ad +ab +aC +bc +aZ +aZ +aC +ab +aa +"} +(14,1,1) = {" +aa +ab +ax +aj +ap +aU +ah +ab +ba +bd +aP +aK +aC +ab +aa +"} +(15,1,1) = {" +aa +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +ab +aa +"} +(16,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +"} diff --git a/_maps/templates/hilbertshotelstorage.dmm b/_maps/templates/hilbertshotelstorage.dmm new file mode 100644 index 0000000000..756e2e5155 --- /dev/null +++ b/_maps/templates/hilbertshotelstorage.dmm @@ -0,0 +1,23 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"a" = ( +/turf/closed/indestructible/hotelwall, +/area/hilbertshotelstorage) +"b" = ( +/turf/open/indestructible/hotelwood, +/area/hilbertshotelstorage) + +(1,1,1) = {" +a +a +a +"} +(2,1,1) = {" +a +b +a +"} +(3,1,1) = {" +a +a +a +"} diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index c9c8ad90ab..692ebad447 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 @@ -231,6 +227,9 @@ //Food #define COMSIG_FOOD_EATEN "food_eaten" //from base of obj/item/reagent_containers/food/snacks/attack(): (mob/living/eater, mob/feeder) +//Gibs +#define COMSIG_GIBS_STREAK "gibs_streak" // from base of /obj/effect/decal/cleanable/blood/gibs/streak(): (list/directions, list/diseases) + //Mood #define COMSIG_ADD_MOOD_EVENT "add_mood" //Called when you send a mood event from anywhere in the code. #define COMSIG_CLEAR_MOOD_EVENT "clear_mood" //Called when you clear a mood event from anywhere in the code. diff --git a/code/__DEFINES/obj_flags.dm b/code/__DEFINES/obj_flags.dm index 1917d73a1b..1885dd2621 100644 --- a/code/__DEFINES/obj_flags.dm +++ b/code/__DEFINES/obj_flags.dm @@ -2,43 +2,45 @@ #define EMAGGED (1<<0) -#define IN_USE (1<<1) // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING! -#define CAN_BE_HIT (1<<2) //can this be bludgeoned by items? -#define BEING_SHOCKED (1<<3) // Whether this thing is currently (already) being shocked by a tesla -#define DANGEROUS_POSSESSION (1<<4) //Admin possession yes/no -#define ON_BLUEPRINTS (1<<5) //Are we visible on the station blueprints at roundstart? -#define UNIQUE_RENAME (1<<6) // can you customize the description/name of the thing? +#define IN_USE (1<<1) //If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING! +#define CAN_BE_HIT (1<<2) //can this be bludgeoned by items? +#define BEING_SHOCKED (1<<3) //Whether this thing is currently (already) being shocked by a tesla +#define DANGEROUS_POSSESSION (1<<4) //Admin possession yes/no +#define ON_BLUEPRINTS (1<<5) //Are we visible on the station blueprints at roundstart? +#define UNIQUE_RENAME (1<<6) //can you customize the description/name of the thing? #define USES_TGUI (1<<7) //put on things that use tgui on ui_interact instead of custom/old UI. #define FROZEN (1<<8) -#define SHOVABLE_ONTO (1<<9) //called on turf.shove_act() to consider whether an object should have a niche effect (defined in their own shove_act()) when someone is pushed onto it, or do a sanity CanPass() check. +#define SHOVABLE_ONTO (1<<9) //called on turf.shove_act() to consider whether an object should have a niche effect (defined in their own shove_act()) when someone is pushed onto it, or do a sanity CanPass() check. // If you add new ones, be sure to add them to /obj/Initialize as well for complete mapping support // Flags for the item_flags var on /obj/item #define BEING_REMOVED (1<<0) -#define IN_INVENTORY (1<<1) //is this item equipped into an inventory slot or hand of a mob? used for tooltips -#define FORCE_STRING_OVERRIDE (1<<2) // used for tooltips -#define NEEDS_PERMIT (1<<3) //Used by security bots to determine if this item is safe for public use. +#define IN_INVENTORY (1<<1) //is this item equipped into an inventory slot or hand of a mob? used for tooltips +#define FORCE_STRING_OVERRIDE (1<<2) //used for tooltips +#define NEEDS_PERMIT (1<<3) //Used by security bots to determine if this item is safe for public use. #define SLOWS_WHILE_IN_HAND (1<<4) -#define NO_MAT_REDEMPTION (1<<5) // Stops you from putting things like an RCD or other items into an ORM or protolathe for materials. -#define DROPDEL (1<<6) // When dropped, it calls qdel on itself -#define NOBLUDGEON (1<<7) // when an item has this it produces no "X has been hit by Y with Z" message in the default attackby() -#define ABSTRACT (1<<8) // for all things that are technically items but used for various different stuff -#define IMMUTABLE_SLOW (1<<9) //When players should not be able to change the slowdown of the item (Speed potions, ect) +#define NO_MAT_REDEMPTION (1<<5) //Stops you from putting things like an RCD or other items into an ORM or protolathe for materials. +#define DROPDEL (1<<6) //When dropped, it calls qdel on itself +#define NOBLUDGEON (1<<7) //when an item has this it produces no "X has been hit by Y with Z" message in the default attackby() +#define ABSTRACT (1<<8) //for all things that are technically items but used for various different stuff +#define IMMUTABLE_SLOW (1<<9) //When players should not be able to change the slowdown of the item (Speed potions, ect) #define SURGICAL_TOOL (1<<10) //Tool commonly used for surgery: won't attack targets in an active surgical operation on help intent (in case of mistakes) -#define NO_UNIFORM_REQUIRED (1<<11) // Can be worn on certain slots (currently belt and id) that would otherwise require an uniform. +#define NO_UNIFORM_REQUIRED (1<<11) //Can be worn on certain slots (currently belt and id) that would otherwise require an uniform. // Flags for the clothing_flags var on /obj/item/clothing -#define LAVAPROTECT (1<<0) +#define LAVAPROTECT (1<<0) #define STOPSPRESSUREDAMAGE (1<<1) //SUIT and HEAD items which stop pressure damage. To stop you taking all pressure damage you must have both a suit and head item with this flag. -#define BLOCK_GAS_SMOKE_EFFECT (1<<2) // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! -#define ALLOWINTERNALS (1<<3) // mask allows internals -#define NOSLIP (1<<4) //prevents from slipping on wet floors, in space etc -#define THICKMATERIAL (1<<5) //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. -#define VOICEBOX_TOGGLABLE (1<<6) // The voicebox in this clothing can be toggled. -#define VOICEBOX_DISABLED (1<<7) // The voicebox is currently turned off. +#define BLOCK_GAS_SMOKE_EFFECT (1<<2) //blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! +#define ALLOWINTERNALS (1<<3) //mask allows internals +#define NOSLIP (1<<4) //prevents from slipping on wet floors, in space etc +#define THICKMATERIAL (1<<5) //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. +#define VOICEBOX_TOGGLABLE (1<<6) //The voicebox in this clothing can be toggled. +#define VOICEBOX_DISABLED (1<<7) //The voicebox is currently turned off. +#define SNUG_FIT (1<<8) //Prevents knock-off from things like hat-throwing. +#define ANTI_TINFOIL_MANEUVER (1<<9) //Hats with negative effects when worn (i.e the tinfoil hat). // Flags for the organ_flags var on /obj/item/organ @@ -47,4 +49,4 @@ #define ORGAN_FAILING (1<<2) //Failing organs perform damaging effects until replaced or fixed #define ORGAN_EXTERNAL (1<<3) //Was this organ implanted/inserted/etc, if true will not be removed during species change. #define ORGAN_VITAL (1<<4) //Currently only the brain -#define ORGAN_NO_SPOIL (1<<5) //Do not spoil under any circumstances +#define ORGAN_NO_SPOIL (1<<5) //Do not spoil under any circumstances \ No newline at end of file diff --git a/code/__DEFINES/say.dm b/code/__DEFINES/say.dm index e655408db1..af06a5a2d0 100644 --- a/code/__DEFINES/say.dm +++ b/code/__DEFINES/say.dm @@ -23,6 +23,8 @@ #define MODE_WHISPER "whisper" #define MODE_WHISPER_CRIT "whispercrit" +#define MODE_CUSTOM_SAY "custom_say" + #define MODE_DEPARTMENT "department" #define MODE_KEY_DEPARTMENT "h" #define MODE_TOKEN_DEPARTMENT ":h" diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 80c9b0c2dd..ce294f3749 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1549,3 +1549,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) for(var/i in L) if(condition.Invoke(i)) . |= i + +/proc/CallAsync(datum/source, proctype, list/arguments) + set waitfor = FALSE + return call(source, proctype)(arglist(arguments)) \ No newline at end of file diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 755105dc27..32f0fe2d8e 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -142,6 +142,8 @@ GLOBAL_LIST_INIT(bitfields, list( "THICKMATERIAL" = THICKMATERIAL, "VOICEBOX_TOGGLABLE" = VOICEBOX_TOGGLABLE, "VOICEBOX_DISABLED" = VOICEBOX_DISABLED, + "SNUG_FIT" = SNUG_FIT, + "ANTI_TINFOIL_MANEUVER" = ANTI_TINFOIL_MANEUVER, ), "tesla_flags" = list( "TESLA_MOB_DAMAGE" = TESLA_MOB_DAMAGE, diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 5f0e7c9b22..58eabbdbcf 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -200,7 +200,7 @@ if (!target.loc) continue - if(!(SEND_SIGNAL(target.loc, COMSIG_ATOM_CANREACH, next) & COMPONENT_BLOCK_REACH)) + if(!(SEND_SIGNAL(target.loc, COMSIG_ATOM_CANREACH, next) & COMPONENT_BLOCK_REACH) && target.loc.canReachInto(src, ultimate_target, next, view_only, tool)) next += target.loc checking = next @@ -215,6 +215,10 @@ /mob/living/DirectAccess(atom/target) return ..() + GetAllContents() +//This is called reach into but it's called on the deepest things first so uh, make sure to account for that! +/atom/proc/canReachInto(atom/user, atom/target, list/next, view_only, obj/item/tool) + return TRUE + /atom/proc/AllowClick() return FALSE diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 6455b4ccb6..e47797f4d6 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/controllers/configuration/config_entry.dm b/code/controllers/configuration/config_entry.dm index 3ac103affc..4406655375 100644 --- a/code/controllers/configuration/config_entry.dm +++ b/code/controllers/configuration/config_entry.dm @@ -1,6 +1,7 @@ #define VALUE_MODE_NUM 0 #define VALUE_MODE_TEXT 1 #define VALUE_MODE_FLAG 2 +#define VALUE_MODE_NUM_LIST 3 #define KEY_MODE_TEXT 0 #define KEY_MODE_TYPE 1 @@ -191,6 +192,18 @@ if(VALUE_MODE_TEXT) new_value = key_value continue_check_value = new_value + if(VALUE_MODE_NUM_LIST) + // this is all copy+pasted from number list up there, but it's super basic so I don't see it being changed soon + var/list/new_list = list() + var/list/values = splittext(key_value," ") + for(var/I in values) + var/temp = text2num(I) + if(isnull(temp)) + log_admin("invalid number list entry in [key_name]: [I]") + continue_check_value = FALSE + new_list += temp + new_value = new_list + continue_check_value = new_list.len if(continue_check_value && continue_check_key && ValidateListEntry(new_key, new_value)) config_entry_value[new_key] = new_value return TRUE diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index cf0caebb61..fb974c85bc 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -367,3 +367,27 @@ /datum/config_entry/number/auto_transfer_delay config_entry_value = 72000 min_val = 0 + +/datum/config_entry/number/dynamic_high_pop_limit + config_entry_value = 55 + min_val = 1 + +/datum/config_entry/number/dynamic_pop_per_requirement + config_entry_value = 6 + min_val = 1 + +/datum/config_entry/keyed_list/dynamic_cost + key_mode = KEY_MODE_TEXT + value_mode = VALUE_MODE_NUM + +/datum/config_entry/keyed_list/dynamic_weight + key_mode = KEY_MODE_TEXT + value_mode = VALUE_MODE_NUM + +/datum/config_entry/keyed_list/dynamic_requirements + key_mode = KEY_MODE_TEXT + value_mode = VALUE_MODE_NUM_LIST + +/datum/config_entry/keyed_list/dynamic_high_population_requirement + key_mode = KEY_MODE_TEXT + value_mode = VALUE_MODE_NUM diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index a365405ce6..345e3bb44c 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -33,6 +33,7 @@ SUBSYSTEM_DEF(mapping) var/list/z_list var/datum/space_level/transit var/datum/space_level/empty_space + var/num_of_res_levels = 1 //dlete dis once #39770 is resolved /datum/controller/subsystem/mapping/proc/HACK_LoadMapConfig() @@ -449,6 +450,11 @@ GLOBAL_LIST_EMPTY(the_station_areas) for(var/i in levels_by_trait(ZTRAIT_RESERVED)) if(reserve.Reserve(width, height, i)) return reserve + //If we didn't return at this point, theres a good chance we ran out of room on the exisiting reserved z levels, so lets try a new one + num_of_res_levels += 1 + var/newReserved = add_new_zlevel("Transit/Reserved [num_of_res_levels]", list(ZTRAIT_RESERVED = TRUE)) + if(reserve.Reserve(width, height, newReserved)) + return reserve else if(!level_trait(z, ZTRAIT_RESERVED)) qdel(reserve) @@ -481,6 +487,7 @@ GLOBAL_LIST_EMPTY(the_station_areas) LAZYINITLIST(unused_turfs["[T.z]"]) unused_turfs["[T.z]"] |= T T.flags_1 |= UNUSED_RESERVATION_TURF_1 + GLOB.areas_by_type[world.area].contents += T CHECK_TICK //DO NOT CALL THIS PROC DIRECTLY, CALL wipe_reservations(). diff --git a/code/controllers/subsystem/throwing.dm b/code/controllers/subsystem/throwing.dm index 77ad712b99..4b91944ec8 100644 --- a/code/controllers/subsystem/throwing.dm +++ b/code/controllers/subsystem/throwing.dm @@ -43,6 +43,7 @@ SUBSYSTEM_DEF(throwing) var/atom/movable/thrownthing var/atom/target var/turf/target_turf + var/target_zone var/init_dir var/maxrange var/speed diff --git a/code/controllers/subsystem/vis_overlays.dm b/code/controllers/subsystem/vis_overlays.dm index 435414a899..107d65a558 100644 --- a/code/controllers/subsystem/vis_overlays.dm +++ b/code/controllers/subsystem/vis_overlays.dm @@ -6,11 +6,9 @@ SUBSYSTEM_DEF(vis_overlays) var/list/vis_overlay_cache var/list/currentrun - var/datum/callback/rotate_cb /datum/controller/subsystem/vis_overlays/Initialize() vis_overlay_cache = list() - rotate_cb = CALLBACK(src, .proc/rotate_vis_overlay) return ..() /datum/controller/subsystem/vis_overlays/fire(resumed = FALSE) @@ -52,7 +50,7 @@ SUBSYSTEM_DEF(vis_overlays) if(!thing.managed_vis_overlays) thing.managed_vis_overlays = list(overlay) - RegisterSignal(thing, COMSIG_ATOM_DIR_CHANGE, rotate_cb) + RegisterSignal(thing, COMSIG_ATOM_DIR_CHANGE, .proc/rotate_vis_overlay) else thing.managed_vis_overlays += overlay diff --git a/code/datums/components/_component.dm b/code/datums/components/_component.dm index e41755b6c2..fbe94cbb9e 100644 --- a/code/datums/components/_component.dm +++ b/code/datums/components/_component.dm @@ -87,7 +87,7 @@ /datum/component/proc/UnregisterFromParent() return -/datum/proc/RegisterSignal(datum/target, sig_type_or_types, proc_or_callback, override = FALSE) +/datum/proc/RegisterSignal(datum/target, sig_type_or_types, proctype, override = FALSE) if(QDELETED(src) || QDELETED(target)) return @@ -100,15 +100,12 @@ if(!lookup) target.comp_lookup = lookup = list() - if(!istype(proc_or_callback, /datum/callback)) //if it wasnt a callback before, it is now - proc_or_callback = CALLBACK(src, proc_or_callback) - var/list/sig_types = islist(sig_type_or_types) ? sig_type_or_types : list(sig_type_or_types) for(var/sig_type in sig_types) if(!override && procs[target][sig_type]) stack_trace("[sig_type] overridden. Use override = TRUE to suppress this warning") - procs[target][sig_type] = proc_or_callback + procs[target][sig_type] = proctype if(!lookup[sig_type]) // Nothing has registered here yet lookup[sig_type] = src @@ -175,17 +172,20 @@ var/datum/C = target if(!C.signal_enabled) return NONE - var/datum/callback/CB = C.signal_procs[src][sigtype] - return CB.InvokeAsync(arglist(arguments)) + var/proctype = C.signal_procs[src][sigtype] + return NONE | CallAsync(C, proctype, arguments) . = NONE for(var/I in target) var/datum/C = I if(!C.signal_enabled) continue - var/datum/callback/CB = C.signal_procs[src][sigtype] - . |= CB.InvokeAsync(arglist(arguments)) + var/proctype = C.signal_procs[src][sigtype] + . |= CallAsync(C, proctype, arguments) -/datum/proc/GetComponent(c_type) +// The type arg is casted so initial works, you shouldn't be passing a real instance into this +/datum/proc/GetComponent(datum/component/c_type) + if(initial(c_type.dupe_mode) == COMPONENT_DUPE_ALLOWED) + stack_trace("GetComponent was called to get a component of which multiple copies could be on an object. This can easily break and should be changed. Type: \[[c_type]\]") var/list/dc = datum_components if(!dc) return null @@ -224,10 +224,6 @@ if(ispath(nt)) if(nt == /datum/component) CRASH("[nt] attempted instantiation!") - if(!isnum(dm)) - CRASH("[nt]: Invalid dupe_mode ([dm])!") - if(dt && !ispath(dt)) - CRASH("[nt]: Invalid dupe_type ([dt])!") else new_comp = nt nt = new_comp.type @@ -295,6 +291,7 @@ var/c_type = target.type qdel(target) CRASH("Incompatible [c_type] transfer attempt to a [type]!") + if(target == AddComponent(target)) target._JoinParent() diff --git a/code/datums/components/earprotection.dm b/code/datums/components/earprotection.dm index 2084943756..9256c4310a 100644 --- a/code/datums/components/earprotection.dm +++ b/code/datums/components/earprotection.dm @@ -1,11 +1,11 @@ /datum/component/wearertargeting/earprotection signals = list(COMSIG_CARBON_SOUNDBANG) mobtype = /mob/living/carbon + proctype = .proc/reducebang /datum/component/wearertargeting/earprotection/Initialize(_valid_slots) . = ..() valid_slots = _valid_slots - callback = CALLBACK(src, .proc/reducebang) /datum/component/wearertargeting/earprotection/proc/reducebang(datum/source, list/reflist) reflist[1]-- diff --git a/code/datums/components/infective.dm b/code/datums/components/infective.dm index cd5df8220b..ad2b7ded14 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/mood.dm b/code/datums/components/mood.dm index eb381af577..05d8ce6989 100644 --- a/code/datums/components/mood.dm +++ b/code/datums/components/mood.dm @@ -149,11 +149,13 @@ if(9) IncreaseSanity(src, 0.4, SANITY_GREAT) +/* if(insanity_effect != holdmyinsanityeffect) if(insanity_effect > holdmyinsanityeffect) owner.crit_threshold += (insanity_effect - holdmyinsanityeffect) else owner.crit_threshold -= (holdmyinsanityeffect - insanity_effect) +*/ if(HAS_TRAIT(owner, TRAIT_DEPRESSION)) if(prob(0.05)) @@ -216,8 +218,8 @@ /datum/component/mood/proc/setInsanityEffect(newval)//More code so that the previous proc works if(newval == insanity_effect) return - var/mob/living/master = parent - master.crit_threshold = (master.crit_threshold - insanity_effect) + newval + //var/mob/living/master = parent + //master.crit_threshold = (master.crit_threshold - insanity_effect) + newval insanity_effect = newval /datum/component/mood/proc/DecreaseSanity(datum/source, amount, minimum = SANITY_INSANE) @@ -264,8 +266,6 @@ if(the_event.timeout) addtimer(CALLBACK(src, .proc/clear_event, null, category), the_event.timeout, TIMER_UNIQUE|TIMER_OVERRIDE) - return the_event - /datum/component/mood/proc/clear_event(datum/source, category) var/datum/mood_event/event = mood_events[category] if(!event) diff --git a/code/datums/components/ntnet_interface.dm b/code/datums/components/ntnet_interface.dm index d945f68ca9..7c364a61ab 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/orbiter.dm b/code/datums/components/orbiter.dm index 301e50dc42..efa0fd14d5 100644 --- a/code/datums/components/orbiter.dm +++ b/code/datums/components/orbiter.dm @@ -1,8 +1,7 @@ /datum/component/orbiter + can_transfer = TRUE dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS var/list/orbiters - var/datum/callback/orbiter_spy - var/datum/callback/orbited_spy //radius: range to orbit at, radius of the circle formed by orbiting (in pixels) //clockwise: whether you orbit clockwise or anti clockwise @@ -14,8 +13,6 @@ return COMPONENT_INCOMPATIBLE orbiters = list() - orbiter_spy = CALLBACK(src, .proc/orbiter_move_react) - orbited_spy = CALLBACK(src, .proc/move_react) var/atom/master = parent master.orbiters = src @@ -25,7 +22,7 @@ /datum/component/orbiter/RegisterWithParent() var/atom/target = parent while(ismovableatom(target)) - RegisterSignal(target, COMSIG_MOVABLE_MOVED, orbited_spy) + RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/move_react) target = target.loc /datum/component/orbiter/UnregisterFromParent() @@ -40,8 +37,6 @@ for(var/i in orbiters) end_orbit(i) orbiters = null - QDEL_NULL(orbiter_spy) - QDEL_NULL(orbited_spy) return ..() /datum/component/orbiter/InheritComponent(datum/component/orbiter/newcomp, original, list/arguments) @@ -64,7 +59,7 @@ orbiter.orbiting.end_orbit(orbiter) orbiters[orbiter] = TRUE orbiter.orbiting = src - RegisterSignal(orbiter, COMSIG_MOVABLE_MOVED, orbiter_spy) + RegisterSignal(orbiter, COMSIG_MOVABLE_MOVED, .proc/orbiter_move_react) var/matrix/initial_transform = matrix(orbiter.transform) // Head first! @@ -120,7 +115,7 @@ if(orbited?.loc && orbited.loc != newturf) // We want to know when anything holding us moves too var/atom/target = orbited.loc while(ismovableatom(target)) - RegisterSignal(target, COMSIG_MOVABLE_MOVED, orbited_spy, TRUE) + RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/move_react, TRUE) target = target.loc var/atom/curloc = master.loc diff --git a/code/datums/components/phantomthief.dm b/code/datums/components/phantomthief.dm new file mode 100644 index 0000000000..ff1c48936f --- /dev/null +++ b/code/datums/components/phantomthief.dm @@ -0,0 +1,39 @@ +//This component applies a customizable drop_shadow filter to its wearer when they toggle combat mode on or off. This can stack. + +/datum/component/wearertargeting/phantomthief + dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS + signals = list(COMSIG_COMBAT_TOGGLED) + proctype = .proc/handlefilterstuff + var/filter_x + var/filter_y + var/filter_size + var/filter_border + var/filter_color + +/datum/component/wearertargeting/phantomthief/Initialize(_x = -2, _y = 0, _size = 0, _border = 0, _color = "#E62111", list/_valid_slots = list(SLOT_GLASSES)) + . = ..() + if(. == COMPONENT_INCOMPATIBLE) + return + filter_x = _x + filter_y = _y + filter_size = _size + filter_border = _border + filter_color = _color + valid_slots = _valid_slots + +/datum/component/wearertargeting/phantomthief/proc/handlefilterstuff(datum/source, mob/user, combatmodestate) + if(istype(user)) + var/thefilter = filter(type = "drop_shadow", x = filter_x, y = filter_y, size = filter_size, border = filter_border, color = filter_color) + if(!combatmodestate) + user.filters -= thefilter + else + user.filters += thefilter + +/datum/component/wearertargeting/phantomthief/proc/stripdesiredfilter(mob/user) + if(istype(user)) + var/thefilter = filter(type = "drop_shadow", x = filter_x, y = filter_y, size = filter_size, border = filter_border, color = filter_color) + user.filters -= thefilter + +/datum/component/wearertargeting/phantomthief/on_drop(datum/source, mob/user) + . = ..() + stripdesiredfilter(user) diff --git a/code/datums/components/rotation.dm b/code/datums/components/rotation.dm index eef3873e6e..ed3ecd2ff3 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/signal_redirect.dm b/code/datums/components/signal_redirect.dm deleted file mode 100644 index db98d5664a..0000000000 --- a/code/datums/components/signal_redirect.dm +++ /dev/null @@ -1,33 +0,0 @@ -// This should only be used by non components trying to listen to a signal -// If you use this inside a component I will replace your eyes with lemons ~ninjanomnom - -/datum/component/redirect - dupe_mode = COMPONENT_DUPE_ALLOWED - var/list/signals - var/datum/callback/turfchangeCB - -/datum/component/redirect/Initialize(list/_signals, flags=NONE) - //It's not our job to verify the right signals are registered here, just do it. - if(!LAZYLEN(_signals)) - return COMPONENT_INCOMPATIBLE - if(flags & REDIRECT_TRANSFER_WITH_TURF && isturf(parent)) - // If they also want to listen to the turf change then we need to set it up so both callbacks run - if(_signals[COMSIG_TURF_CHANGE]) - turfchangeCB = _signals[COMSIG_TURF_CHANGE] - if(!istype(turfchangeCB)) - . = COMPONENT_INCOMPATIBLE - CRASH("Redirect components must be given instanced callbacks, not proc paths.") - _signals[COMSIG_TURF_CHANGE] = CALLBACK(src, .proc/turf_change) - - signals = _signals - -/datum/component/redirect/RegisterWithParent() - for(var/signal in signals) - RegisterSignal(parent, signal, signals[signal]) - -/datum/component/redirect/UnregisterFromParent() - UnregisterSignal(parent, signals) - -/datum/component/redirect/proc/turf_change(datum/source, path, new_baseturfs, flags, list/transfers) - transfers += src - return turfchangeCB?.InvokeAsync(arglist(args)) diff --git a/code/datums/components/storage/concrete/pockets.dm b/code/datums/components/storage/concrete/pockets.dm index fe5e1e5217..7e4a561422 100644 --- a/code/datums/components/storage/concrete/pockets.dm +++ b/code/datums/components/storage/concrete/pockets.dm @@ -56,7 +56,7 @@ /obj/item/scalpel, /obj/item/reagent_containers/syringe, /obj/item/dnainjector, /obj/item/reagent_containers/hypospray/medipen, /obj/item/reagent_containers/dropper, /obj/item/implanter, /obj/item/screwdriver, /obj/item/weldingtool/mini, - /obj/item/firing_pin, /obj/item/gun/ballistic/automatic/pistol/mag + /obj/item/firing_pin, /obj/item/gun/ballistic/automatic/pistol )) /datum/component/storage/concrete/pockets/shoes/clown/Initialize() @@ -67,7 +67,7 @@ /obj/item/scalpel, /obj/item/reagent_containers/syringe, /obj/item/dnainjector, /obj/item/reagent_containers/hypospray/medipen, /obj/item/reagent_containers/dropper, /obj/item/implanter, /obj/item/screwdriver, /obj/item/weldingtool/mini, - /obj/item/firing_pin, /obj/item/bikehorn)) + /obj/item/firing_pin, /obj/item/bikehorn, /obj/item/gun/ballistic/automatic/pistol)) /datum/component/storage/concrete/pockets/pocketprotector max_items = 3 diff --git a/code/datums/components/storage/storage.dm b/code/datums/components/storage/storage.dm index adec6f67ce..9f6ca0ffbb 100644 --- a/code/datums/components/storage/storage.dm +++ b/code/datums/components/storage/storage.dm @@ -96,6 +96,7 @@ RegisterSignal(parent, COMSIG_ITEM_PICKUP, .proc/signal_on_pickup) RegisterSignal(parent, COMSIG_MOVABLE_POST_THROW, .proc/close_all) + RegisterSignal(parent, COMSIG_MOVABLE_MOVED, .proc/check_views) RegisterSignal(parent, COMSIG_CLICK_ALT, .proc/on_alt_click) RegisterSignal(parent, COMSIG_MOUSEDROP_ONTO, .proc/mousedrop_onto) @@ -386,6 +387,11 @@ close(M) . = TRUE //returns TRUE if any mobs actually got a close(M) call +/datum/component/storage/proc/check_views() + for(var/mob/M in can_see_contents()) + if(!isobserver(M) && !M.CanReach(src, view_only = TRUE)) + close(M) + /datum/component/storage/proc/emp_act(datum/source, severity) if(emp_shielded) return @@ -587,7 +593,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 17b2178df6..64844c4c32 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/components/virtual_reality.dm b/code/datums/components/virtual_reality.dm index 750cc045ce..f8f0679e9b 100644 --- a/code/datums/components/virtual_reality.dm +++ b/code/datums/components/virtual_reality.dm @@ -1,5 +1,5 @@ /datum/component/virtual_reality - dupe_mode = COMPONENT_DUPE_ALLOWED //mindswap memes, shouldn't stack up otherwise. + can_transfer = TRUE var/datum/mind/mastermind // where is my mind t. pixies var/datum/mind/current_mind var/obj/machinery/vr_sleeper/vr_sleeper diff --git a/code/datums/components/wearertargeting.dm b/code/datums/components/wearertargeting.dm index 0aa0831127..feaa88f934 100644 --- a/code/datums/components/wearertargeting.dm +++ b/code/datums/components/wearertargeting.dm @@ -3,7 +3,7 @@ /datum/component/wearertargeting var/list/valid_slots = list() var/list/signals = list() - var/datum/callback/callback = CALLBACK(GLOBAL_PROC, .proc/pass) + var/proctype = .proc/pass var/mobtype = /mob/living /datum/component/wearertargeting/Initialize() @@ -14,13 +14,9 @@ /datum/component/wearertargeting/proc/on_equip(datum/source, mob/equipper, slot) if((slot in valid_slots) && istype(equipper, mobtype)) - RegisterSignal(equipper, signals, callback, TRUE) + RegisterSignal(equipper, signals, proctype, TRUE) else UnregisterSignal(equipper, signals) /datum/component/wearertargeting/proc/on_drop(datum/source, mob/user) - UnregisterSignal(user, signals) - -/datum/component/wearertargeting/Destroy() - QDEL_NULL(callback) //is likely to ourselves. - return ..() \ No newline at end of file + UnregisterSignal(user, signals) \ No newline at end of file diff --git a/code/datums/components/wet_floor.dm b/code/datums/components/wet_floor.dm index dc124750e4..84b0320375 100644 --- a/code/datums/components/wet_floor.dm +++ b/code/datums/components/wet_floor.dm @@ -40,7 +40,6 @@ /datum/component/wet_floor/UnregisterFromParent() UnregisterSignal(parent, list(COMSIG_TURF_IS_WET, COMSIG_TURF_MAKE_DRY)) - /datum/component/wet_floor/Destroy() STOP_PROCESSING(SSwet_floors, src) var/turf/T = parent diff --git a/code/datums/dna.dm b/code/datums/dna.dm index 33e92e4de5..8a3fd82cb9 100644 --- a/code/datums/dna.dm +++ b/code/datums/dna.dm @@ -42,8 +42,8 @@ destination.dna.unique_enzymes = unique_enzymes destination.dna.uni_identity = uni_identity destination.dna.blood_type = blood_type - destination.set_species(species.type, icon_update=0) destination.dna.features = features.Copy() + destination.set_species(species.type, icon_update=0) destination.dna.real_name = real_name destination.dna.nameless = nameless destination.dna.custom_species = custom_species diff --git a/code/datums/ruins/space.dm b/code/datums/ruins/space.dm index 9762426608..34a676603e 100644 --- a/code/datums/ruins/space.dm +++ b/code/datums/ruins/space.dm @@ -282,6 +282,11 @@ name = "Ancient Cloning Lab" description = "An experimental cloning lab snapped off from an ancient ship. The cloner model inside lacks many modern functionalities and security measures." +/datum/map_template/ruin/space/hilbertresearchfacility + id = "hilbert_facility" + suffix = "hilbertshoteltestingsite.dmm" + name = "Hilbert Research Facility" + description = "A research facility of great bluespace discoveries. Long since abandoned, willingly or not..." /datum/map_template/ruin/space/augmentation id = "augmentationfacility" suffix = "augmentationfacility.dmm" diff --git a/code/datums/status_effects/gas.dm b/code/datums/status_effects/gas.dm index dfe0a1d94e..0041799314 100644 --- a/code/datums/status_effects/gas.dm +++ b/code/datums/status_effects/gas.dm @@ -5,7 +5,6 @@ alert_type = /obj/screen/alert/status_effect/freon var/icon/cube var/can_melt = TRUE - var/datum/weakref/redirect_component /obj/screen/alert/status_effect/freon name = "Frozen Solid" @@ -13,7 +12,7 @@ icon_state = "frozen" /datum/status_effect/freon/on_apply() - redirect_component = WEAKREF(owner.AddComponent(/datum/component/redirect, list(COMSIG_LIVING_RESIST = CALLBACK(src, .proc/owner_resist)))) + RegisterSignal(owner, COMSIG_LIVING_RESIST, .proc/owner_resist) if(!owner.stat) to_chat(owner, "You become frozen in a cube!") cube = icon('icons/effects/freeze.dmi', "ice_cube") @@ -40,8 +39,7 @@ owner.cut_overlay(cube) owner.adjust_bodytemperature(100) owner.update_canmove() - qdel(redirect_component.resolve()) - redirect_component = null + UnregisterSignal(owner, COMSIG_LIVING_RESIST) /datum/status_effect/freon/watcher duration = 8 diff --git a/code/datums/traits/good.dm b/code/datums/traits/good.dm index dffdc92630..80a5f24250 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 f11c2c6d69..2a47d6d015 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -528,7 +528,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/atoms_movable.dm b/code/game/atoms_movable.dm index 83762240bc..2732b3dc82 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -518,6 +518,8 @@ TT.thrower = thrower TT.diagonals_first = diagonals_first TT.callback = callback + if(!QDELETED(thrower)) + TT.target_zone = thrower.zone_selected var/dist_x = abs(target.x - src.x) var/dist_y = abs(target.y - src.y) diff --git a/code/game/gamemodes/clown_ops/clown_weapons.dm b/code/game/gamemodes/clown_ops/clown_weapons.dm index 9d1a3b650c..46cef7df63 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, 0, 0) 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/gamemodes/dynamic/dynamic.dm b/code/game/gamemodes/dynamic/dynamic.dm index e22b785670..24cfddd14f 100644 --- a/code/game/gamemodes/dynamic/dynamic.dm +++ b/code/game/gamemodes/dynamic/dynamic.dm @@ -107,6 +107,11 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) /// If a only ruleset has been executed. var/only_ruleset_executed = FALSE +/datum/game_mode/dynamic/New() // i have NO IDEA if this is the proper way to do this. + ..() + pop_per_requirement = CONFIG_GET(number/dynamic_pop_per_requirement) + GLOB.dynamic_high_pop_limit = CONFIG_GET(number/dynamic_high_pop_limit) + /datum/game_mode/dynamic/admin_panel() var/list/dat = list("Game Mode Panel

Game Mode Panel

") dat += "Dynamic Mode \[VV\]
" diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets.dm b/code/game/gamemodes/dynamic/dynamic_rulesets.dm index 66afcbfb92..011b6ec251 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets.dm @@ -3,6 +3,8 @@ var/name = "" /// For admin logging and round end screen, do not change this unless making a new rule type. var/ruletype = "" + /// For config purposes, similar to config_tag for secret game modes. + var/config_tag = null /// If set to TRUE, the rule won't be discarded after being executed, and dynamic will call rule_process() every time it ticks. var/persistent = FALSE /// If set to TRUE, dynamic mode will be able to draft this ruleset again later on. (doesn't apply for roundstart rules) @@ -65,7 +67,18 @@ restricted_roles += protected_roles if(CONFIG_GET(flag/protect_assistant_from_antagonist)) restricted_roles += "Assistant" - + var/weights = CONFIG_GET(keyed_list/dynamic_weight) + var/costs = CONFIG_GET(keyed_list/dynamic_cost) + var/requirementses = CONFIG_GET(keyed_list/dynamic_requirements) // can't damn well use requirements + var/high_population_requirements = CONFIG_GET(keyed_list/dynamic_high_population_requirement) + if(config_tag in weights) + weight = weights[config_tag] + if(config_tag in costs) + cost = costs[config_tag] + if(config_tag in requirementses) + requirements = requirementses[config_tag] + if(config_tag in high_population_requirements) + high_population_requirement = high_population_requirements[config_tag] if (istype(SSticker.mode, /datum/game_mode/dynamic)) mode = SSticker.mode else if (GLOB.master_mode != "dynamic") // This is here to make roundstart forced ruleset function. diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm index 24b4c67357..fde020a3ae 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm @@ -52,6 +52,7 @@ /datum/dynamic_ruleset/latejoin/infiltrator name = "Syndicate Infiltrator" + config_tag = "latejoin_traitor" antag_datum = /datum/antagonist/traitor antag_flag = ROLE_TRAITOR restricted_roles = list("AI", "Cyborg") @@ -72,6 +73,7 @@ /datum/dynamic_ruleset/latejoin/provocateur name = "Provocateur" + config_tag = "latejoin_revolution" antag_datum = /datum/antagonist/rev/head antag_flag = ROLE_REV_HEAD antag_flag_override = ROLE_REV diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm index 4da085d5a9..56b6e57c4d 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm @@ -169,6 +169,7 @@ /datum/dynamic_ruleset/midround/autotraitor name = "Syndicate Sleeper Agent" + config_tag = "midround_traitor" antag_datum = /datum/antagonist/traitor antag_flag = ROLE_TRAITOR restricted_roles = list("AI", "Cyborg", "Positronic Brain") @@ -224,6 +225,7 @@ /datum/dynamic_ruleset/midround/malf name = "Malfunctioning AI" + config_tag = "malf_ai" antag_datum = /datum/antagonist/traitor antag_flag = ROLE_MALF enemy_roles = list("Security Officer", "Warden","Detective","Head of Security", "Captain", "Scientist", "Chemist", "Research Director", "Chief Engineer") @@ -276,6 +278,7 @@ /datum/dynamic_ruleset/midround/from_ghosts/wizard name = "Wizard" + config_tag = "midround_wizard" antag_datum = /datum/antagonist/wizard antag_flag = ROLE_WIZARD enemy_roles = list("Security Officer","Detective","Head of Security", "Captain") @@ -308,6 +311,7 @@ /datum/dynamic_ruleset/midround/from_ghosts/nuclear name = "Nuclear Assault" + config_tag = "midround_nuclear" antag_flag = ROLE_OPERATIVE antag_datum = /datum/antagonist/nukeop enemy_roles = list("AI", "Cyborg", "Security Officer", "Warden","Detective","Head of Security", "Captain") @@ -351,6 +355,7 @@ /datum/dynamic_ruleset/midround/from_ghosts/blob name = "Blob" + config_tag = "blob" antag_datum = /datum/antagonist/blob antag_flag = ROLE_BLOB enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain") @@ -374,6 +379,7 @@ /datum/dynamic_ruleset/midround/from_ghosts/xenomorph name = "Alien Infestation" + config_tag = "xenos" antag_datum = /datum/antagonist/xeno antag_flag = ROLE_ALIEN enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain") @@ -420,6 +426,7 @@ /datum/dynamic_ruleset/midround/from_ghosts/nightmare name = "Nightmare" + config_tag = "nightmare" antag_datum = /datum/antagonist/nightmare antag_flag = "Nightmare" antag_flag_override = ROLE_ALIEN diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm index 38ce6f68d0..6a9aefa996 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm @@ -7,6 +7,7 @@ /datum/dynamic_ruleset/roundstart/traitor name = "Traitors" + config_tag = "traitor" persistent = TRUE antag_flag = ROLE_TRAITOR antag_datum = /datum/antagonist/traitor/ @@ -48,6 +49,7 @@ /datum/dynamic_ruleset/roundstart/traitorbro name = "Blood Brothers" + config_tag = "traitorbro" antag_flag = ROLE_BROTHER antag_datum = /datum/antagonist/brother/ restricted_roles = list("AI", "Cyborg") @@ -100,6 +102,7 @@ /datum/dynamic_ruleset/roundstart/changeling name = "Changelings" + config_tag = "changeling" antag_flag = ROLE_CHANGELING antag_datum = /datum/antagonist/changeling restricted_roles = list("AI", "Cyborg") @@ -149,6 +152,7 @@ // Dynamic is a wonderful thing that adds wizards to every round and then adds even more wizards during the round. /datum/dynamic_ruleset/roundstart/wizard name = "Wizard" + config_tag = "wizard" antag_flag = ROLE_WIZARD antag_datum = /datum/antagonist/wizard minimum_required_age = 14 @@ -194,6 +198,7 @@ /datum/dynamic_ruleset/roundstart/bloodcult name = "Blood Cult" + config_tag = "cult" antag_flag = ROLE_CULTIST antag_datum = /datum/antagonist/cult minimum_required_age = 14 @@ -254,6 +259,7 @@ /datum/dynamic_ruleset/roundstart/nuclear name = "Nuclear Emergency" + config_tag = "nuclear" antag_flag = ROLE_OPERATIVE antag_datum = /datum/antagonist/nukeop var/datum/antagonist/antag_leader_datum = /datum/antagonist/nukeop/leader @@ -343,6 +349,7 @@ /datum/dynamic_ruleset/roundstart/delayed/revs name = "Revolution" + config_tag = "revolution" persistent = TRUE antag_flag = ROLE_REV_HEAD antag_flag_override = ROLE_REV @@ -433,6 +440,7 @@ /datum/dynamic_ruleset/roundstart/extended name = "Extended" + config_tag = "extended" antag_flag = null antag_datum = null restricted_roles = list() @@ -456,6 +464,7 @@ /datum/dynamic_ruleset/roundstart/clockcult name = "Clockcult" + config_tag = "clockwork_cult" antag_flag = ROLE_SERVANT_OF_RATVAR antag_datum = /datum/antagonist/clockcult restricted_roles = list("AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster") @@ -559,6 +568,7 @@ /datum/dynamic_ruleset/roundstart/nuclear/clown_ops name = "Clown Ops" + config_tag = "clownops" antag_datum = /datum/antagonist/nukeop/clownop antag_leader_datum = /datum/antagonist/nukeop/leader/clownop requirements = list(101,101,101,101,101,101,101,101,101,101) @@ -584,6 +594,7 @@ /datum/dynamic_ruleset/roundstart/devil name = "Devil" + config_tag = "devil" antag_flag = ROLE_DEVIL antag_datum = /datum/antagonist/devil restricted_roles = list("Lawyer", "Curator", "Chaplain", "Head of Security", "Captain", "AI") @@ -642,6 +653,7 @@ /datum/dynamic_ruleset/roundstart/monkey name = "Monkey" + config_tag = "monkey" antag_flag = ROLE_MONKEY antag_datum = /datum/antagonist/monkey/leader restricted_roles = list("Cyborg", "AI") @@ -704,6 +716,7 @@ /datum/dynamic_ruleset/roundstart/meteor name = "Meteor" + config_tag = "meteor" persistent = TRUE required_candidates = 0 weight = 3 diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 5a54ccd5df..1c6e21491c 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))) diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 7dcd85d310..11935e2bfc 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -17,7 +17,7 @@ network += lowertext(i) /obj/machinery/computer/security/check_eye(mob/user) - if( (stat & (NOPOWER|BROKEN)) || user.incapacitated() || user.eye_blind ) + if(CHECK_BITFIELD(stat, NOPOWER|BROKEN) || is_blind(user) || !in_view_range(user, src) || !user.canUseTopic(src, !issilicon(user), FALSE)) user.unset_machine() return if(!(user in watchers)) @@ -30,14 +30,6 @@ if(!C.can_use()) user.unset_machine() return - if(!issilicon(user)) - if(!Adjacent(user)) - user.unset_machine() - return - else if(iscyborg(user)) - var/list/viewing = viewers(src) - if(!viewing.Find(user)) - user.unset_machine() /obj/machinery/computer/security/on_unset_machine(mob/user) watchers.Remove(user) @@ -97,36 +89,22 @@ user.unset_machine() playsound(src, 'sound/machines/terminal_off.ogg', 25, 0) return - if(C) - var/camera_fail = 0 - if(!C.can_use() || user.machine != src || user.eye_blind || user.incapacitated()) - camera_fail = 1 - else if(iscyborg(user)) - var/list/viewing = viewers(src) - if(!viewing.Find(user)) - camera_fail = 1 - else if(!issilicon(user)) - if(!Adjacent(user)) - camera_fail = 1 - - if(camera_fail) - user.unset_machine() - return 0 - - playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 25, 0) - if(isAI(user)) - var/mob/living/silicon/ai/A = user - A.eyeobj.setLoc(get_turf(C)) - A.client.eye = A.eyeobj - else - user.reset_perspective(C) - user.overlay_fullscreen("flash", /obj/screen/fullscreen/flash/static) - user.clear_fullscreen("flash", 5) - watchers[user] = C - use_power(50) - addtimer(CALLBACK(src, .proc/use_camera_console, user), 5) - else + if(!C || !C.can_use() || CHECK_BITFIELD(stat, NOPOWER|BROKEN) || is_blind(user) || !in_view_range(user, src) || !user.canUseTopic(src, !issilicon(user), FALSE)) user.unset_machine() + return FALSE + + playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 25, 0) + if(isAI(user)) + var/mob/living/silicon/ai/A = user + A.eyeobj.setLoc(get_turf(C)) + A.client.eye = A.eyeobj + else + user.reset_perspective(C) + user.overlay_fullscreen("flash", /obj/screen/fullscreen/flash/static) + user.clear_fullscreen("flash", 5) + watchers[user] = C + use_power(50) + addtimer(CALLBACK(src, .proc/use_camera_console, user), 5) //returns the list of cameras accessible from this computer /obj/machinery/computer/security/proc/get_available_cameras() diff --git a/code/game/machinery/computer/telecrystalconsoles.dm b/code/game/machinery/computer/telecrystalconsoles.dm index 692bc8f038..67407d220e 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/computer/teleporter.dm b/code/game/machinery/computer/teleporter.dm index f4f20aecc9..b5869ef36b 100644 --- a/code/game/machinery/computer/teleporter.dm +++ b/code/game/machinery/computer/teleporter.dm @@ -90,6 +90,7 @@ say("Processing hub calibration to target...") calibrating = 1 + power_station.update_icon() spawn(50 * (3 - power_station.teleporter_hub.accurate)) //Better parts mean faster calibration calibrating = 0 if(check_hub_connection()) @@ -97,6 +98,7 @@ say("Calibration complete.") else say("Error: Unable to detect hub.") + power_station.update_icon() updateDialog() updateDialog() diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index 2e78d72b96..eaf8faef12 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -74,7 +74,8 @@ to_chat(user, "You start adding [I] to [src]...") if(do_after(user, 50, target=src)) W.use(5) - new /turf/closed/wall/mineral/wood/nonmetal(get_turf(src)) + var/turf/T = get_turf(src) + T.PlaceOnTop(/turf/closed/wall/mineral/wood/nonmetal) qdel(src) return return ..() diff --git a/code/game/machinery/droneDispenser.dm b/code/game/machinery/droneDispenser.dm index 7c92c158b3..b121057315 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/gulag_teleporter.dm b/code/game/machinery/gulag_teleporter.dm index 6b944f762d..a2d0460d25 100644 --- a/code/game/machinery/gulag_teleporter.dm +++ b/code/game/machinery/gulag_teleporter.dm @@ -135,18 +135,19 @@ The console is located at computer/gulag_teleporter.dm if(linked_reclaimer) linked_reclaimer.stored_items[occupant] = list() var/mob/living/mob_occupant = occupant - for(var/obj/item/W in mob_occupant) - if(!is_type_in_typecache(W, telegulag_required_items)) - if(mob_occupant.temporarilyRemoveItemFromInventory(W)) - if(istype(W, /obj/item/restraints/handcuffs)) - W.forceMove(get_turf(src)) - continue - if(linked_reclaimer) - linked_reclaimer.stored_items[mob_occupant] += W - linked_reclaimer.contents += W - W.forceMove(linked_reclaimer) - else - W.forceMove(src) + for(var/A in mob_occupant.get_equipped_items(TRUE)) + var/obj/item/I = A + if(is_type_in_typecache(I, telegulag_required_items) || !mob_occupant.temporarilyRemoveItemFromInventory(I)) + continue + if(istype(I, /obj/item/restraints/handcuffs)) + I.forceMove(get_turf(src)) + continue + if(linked_reclaimer) + linked_reclaimer.stored_items[mob_occupant] += I + linked_reclaimer.contents += I + I.forceMove(linked_reclaimer) + else + I.forceMove(src) /obj/machinery/gulag_teleporter/proc/handle_prisoner(obj/item/id, datum/data/record/R) if(!ishuman(occupant)) diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index 90de34a22d..1a8bc7ece4 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 @@ -144,7 +144,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) @@ -195,7 +195,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/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 1f1f13ee22..ae71a0b844 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -209,5 +209,7 @@ icon_state = "controller-o" else if(stat & (BROKEN|NOPOWER)) icon_state = "controller-p" + else if(teleporter_console && teleporter_console.calibrating) + icon_state = "controller-c" else icon_state = "controller" diff --git a/code/game/mecha/equipment/tools/mining_tools.dm b/code/game/mecha/equipment/tools/mining_tools.dm index eb3261bb27..4044951c42 100644 --- a/code/game/mecha/equipment/tools/mining_tools.dm +++ b/code/game/mecha/equipment/tools/mining_tools.dm @@ -100,12 +100,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) @@ -115,7 +115,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 e1dc80911f..4acf7981bc 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -47,7 +47,7 @@ //maximum stocking amount (default 300000, 600000 at T4) for(var/obj/item/stock_parts/matter_bin/M in component_parts) T += M.rating - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.max_amount = (200000 + (T*50000)) //resources adjustment coefficient (1 -> 0.85 -> 0.7 -> 0.55) @@ -109,7 +109,7 @@ /obj/machinery/mecha_part_fabricator/proc/output_available_resources() var/output - 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] output += "[M.name]: [M.amount] cm³" @@ -130,7 +130,7 @@ /obj/machinery/mecha_part_fabricator/proc/check_resources(datum/design/D) if(D.reagents_list.len) // No reagents storage - no reagent designs. return FALSE - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) if(materials.has_materials(get_resources_w_coeff(D))) return TRUE return FALSE @@ -140,7 +140,7 @@ desc = "It's building \a [initial(D.name)]." var/list/res_coef = get_resources_w_coeff(D) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.use_amount(res_coef) add_overlay("fab-active") use_power = ACTIVE_POWER_USE @@ -384,14 +384,14 @@ break if(href_list["remove_mat"] && href_list["material"]) - GET_COMPONENT(materials, /datum/component/material_container) + var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.retrieve_sheets(text2num(href_list["remove_mat"]), href_list["material"]) updateUsrDialog() return /obj/machinery/mecha_part_fabricator/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/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index ef3ba969e9..19656f2d7d 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -47,7 +47,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 988011c492..a4d0da1bbe 100644 --- a/code/game/objects/effects/decals/cleanable/aliens.dm +++ b/code/game/objects/effects/decals/cleanable/aliens.dm @@ -25,15 +25,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 e5d38d3ef6..03eeca7d0b 100644 --- a/code/game/objects/effects/decals/cleanable/gibs.dm +++ b/code/game/objects/effects/decals/cleanable/gibs.dm @@ -40,15 +40,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/effects/proximity.dm b/code/game/objects/effects/proximity.dm index de17582f27..6c9525008d 100644 --- a/code/game/objects/effects/proximity.dm +++ b/code/game/objects/effects/proximity.dm @@ -5,7 +5,6 @@ var/list/checkers //list of /obj/effect/abstract/proximity_checkers var/current_range var/ignore_if_not_on_turf //don't check turfs in range if the host's loc isn't a turf - var/datum/component/movement_tracker /datum/proximity_monitor/New(atom/_host, range, _ignore_if_not_on_turf = TRUE) checkers = list() @@ -15,15 +14,17 @@ SetHost(_host) /datum/proximity_monitor/proc/SetHost(atom/H,atom/R) + if(H == host) + return + if(host) + UnregisterSignal(host, COMSIG_MOVABLE_MOVED) if(R) hasprox_receiver = R else if(hasprox_receiver == host) //Default case hasprox_receiver = H host = H + RegisterSignal(host, COMSIG_MOVABLE_MOVED, .proc/HandleMove) last_host_loc = host.loc - if(movement_tracker) - QDEL_NULL(movement_tracker) - movement_tracker = host.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/HandleMove))) SetRange(current_range,TRUE) /datum/proximity_monitor/Destroy() @@ -31,7 +32,6 @@ last_host_loc = null hasprox_receiver = null QDEL_LIST(checkers) - QDEL_NULL(movement_tracker) return ..() /datum/proximity_monitor/proc/HandleMove() diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 92fb2531b8..9ce2e66abf 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -407,12 +407,12 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot) for(var/X in actions) var/datum/action/A = X - if(item_action_slot_check(slot, user)) //some items only give their actions buttons when in a specific slot. + if(item_action_slot_check(slot, user, A)) //some items only give their actions buttons when in a specific slot. A.Grant(user) item_flags |= IN_INVENTORY //sometimes we only want to grant the item's action if it's equipped in a specific slot. -/obj/item/proc/item_action_slot_check(slot, mob/user) +/obj/item/proc/item_action_slot_check(slot, mob/user, datum/action/A) if(slot == SLOT_IN_BACKPACK || slot == SLOT_LEGCUFFED) //these aren't true slots, so avoid granting actions there return FALSE return TRUE diff --git a/code/game/objects/items/RCL.dm b/code/game/objects/items/RCL.dm index 63f460f9aa..93293155a3 100644 --- a/code/game/objects/items/RCL.dm +++ b/code/game/objects/items/RCL.dm @@ -20,8 +20,8 @@ var/ghetto = FALSE lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' - var/datum/component/mobhook var/datum/radial_menu/persistent/wiring_gui_menu + var/mob/listeningTo /obj/item/twohanded/rcl/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/stack/cable_coil)) @@ -86,7 +86,7 @@ /obj/item/twohanded/rcl/Destroy() QDEL_NULL(loaded) last = null - QDEL_NULL(mobhook) + listeningTo = null QDEL_NULL(wiring_gui_menu) return ..() @@ -141,9 +141,8 @@ /obj/item/twohanded/rcl/dropped(mob/wearer) ..() - if(mobhook) - active = FALSE - QDEL_NULL(mobhook) + UnregisterSignal(wearer, COMSIG_MOVABLE_MOVED) + listeningTo = null last = null /obj/item/twohanded/rcl/attack_self(mob/user) @@ -158,13 +157,12 @@ break obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook) - if(to_hook) - if(mobhook && mobhook.parent != to_hook) - QDEL_NULL(mobhook) - if (!mobhook) - mobhook = to_hook.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/trigger))) - else - QDEL_NULL(mobhook) + if(listeningTo == to_hook) + return + if(listeningTo) + UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED) + RegisterSignal(to_hook, COMSIG_MOVABLE_MOVED, .proc/trigger) + listeningTo = to_hook /obj/item/twohanded/rcl/proc/trigger(mob/user) if(active) diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index 699efaac2e..10fbab56be 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -153,7 +153,9 @@ /area/centcom, /area/asteroid, /area/tdome, - /area/wizard_station + /area/wizard_station, + /area/hilbertshotel, + /area/hilbertshotelstorage ) for (var/type in SPECIALS) if ( istype(A,type) ) diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index 875a4bd04f..0e422a3fe9 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -80,6 +80,7 @@ righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi' item_flags = NO_MAT_REDEMPTION | NOBLUDGEON var/prox_check = TRUE //If the emag requires you to be in range + var/uses = 15 /obj/item/card/emag/bluespace name = "bluespace cryptographic sequencer" @@ -110,6 +111,37 @@ user.visible_message("[src] fizzles and sparks. It seems like it's out of charges.") playsound(src, 'sound/effects/light_flicker.ogg', 100, 1) +/obj/item/card/emag/examine(mob/user) + . = ..() + to_chat(user, "It has [uses ? uses : "no"] charges left.") + +/obj/item/card/emag/attackby(obj/item/W, mob/user, params) + if(istype(W, /obj/item/emagrecharge)) + var/obj/item/emagrecharge/ER = W + if(ER.uses) + uses += ER.uses + to_chat(user, "You have added [ER.uses] charges to [src]. It now has [uses] charges.") + playsound(src, "sparks", 100, 1) + ER.uses = 0 + else + to_chat(user, "[ER] has no charges left.") + return + . = ..() + +/obj/item/emagrecharge + name = "electromagnet charging device" + desc = "A small cell with two prongs lazily jabbed into it. It looks like it's made for charging the small batteries found in electromagnetic devices, sadly this can't be recharged like a normal cell." + icon = 'icons/obj/module.dmi' + icon_state = "cell_mini" + item_flags = NOBLUDGEON + var/uses = 5 //Dictates how many charges the device adds to compatible items + +/obj/item/emagrecharge/examine(mob/user) + . = ..() + if(uses) + to_chat(user, "It can add up to [uses] charges to compatible devices") + else + to_chat(user, "It has a small, red, blinking light coming from inside of it. It's spent.") /obj/item/card/emagfake desc = "It's a card with a magnetic strip attached to some circuitry. Closer inspection shows that this card is a poorly made replica, with a \"DonkCo\" logo stamped on the back." @@ -451,3 +483,58 @@ update_label("John Doe", "Clowny") name = "APC Access ID" desc = "A special ID card that allows access to APC terminals." access = list(ACCESS_ENGINE_EQUIP) + +//Polychromatic Knight Badge + +/obj/item/card/id/knight + var/id_color = "#00FF00" //defaults to green + name = "knight badge" + icon_state = "knight" + desc = "A badge denoting the owner as a knight! It has a strip for swiping like an ID" + +/obj/item/card/id/knight/update_label(newname, newjob) + if(newname || newjob) + name = "[(!newname) ? "knight badge" : "[newname]'s Knight Badge"][(!newjob) ? "" : " ([newjob])"]" + return + + name = "[(!registered_name) ? "knight badge" : "[registered_name]'s Knight Badge"][(!assignment) ? "" : " ([assignment])"]" + +/obj/item/card/id/knight/update_icon() + var/mutable_appearance/id_overlay = mutable_appearance(icon, "knight_overlay") + + if(id_color) + id_overlay.color = id_color + cut_overlays() + + add_overlay(id_overlay) + +/obj/item/card/id/knight/AltClick(mob/living/user) + . = ..() + if(!in_range(src, user)) //Basic checks to prevent abuse + return + if(user.incapacitated() || !istype(user)) + to_chat(user, "You can't do that right now!") + return + if(alert("Are you sure you want to recolor your id?", "Confirm Repaint", "Yes", "No") == "Yes") + var/energy_color_input = input(usr,"","Choose Energy Color",id_color) as color|null + if(!in_range(src, user) || !energy_color_input) + return + if(user.incapacitated() || !istype(user)) + to_chat(user, "You can't do that right now!") + return + id_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1) + update_icon() + +/obj/item/card/id/knight/Initialize() + . = ..() + update_icon() + +/obj/item/card/id/knight/examine(mob/user) + ..() + to_chat(user, "Alt-click to recolor it.") + +/obj/item/card/id/knight/blue + id_color = "#0000FF" + +/obj/item/card/id/knight/captain + id_color = "#FFD700" \ No newline at end of file diff --git a/code/game/objects/items/chrono_eraser.dm b/code/game/objects/items/chrono_eraser.dm index 5db5aa416e..911a07c288 100644 --- a/code/game/objects/items/chrono_eraser.dm +++ b/code/game/objects/items/chrono_eraser.dm @@ -37,7 +37,7 @@ PA = new(src) user.put_in_hands(PA) -/obj/item/chrono_eraser/item_action_slot_check(slot, mob/user) +/obj/item/chrono_eraser/item_action_slot_check(slot, mob/user, datum/action/A) if(slot == SLOT_BACK) return 1 diff --git a/code/game/objects/items/control_wand.dm b/code/game/objects/items/control_wand.dm index fa4524528b..c98484b81e 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/crayons.dm b/code/game/objects/items/crayons.dm index 102c6a8eed..d014f70315 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -561,7 +561,7 @@ /obj/item/storage/crayons/Initialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 7 STR.can_hold = typecacheof(list(/obj/item/toy/crayon)) diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index a4f286bf88..f5799e1a22 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -39,7 +39,6 @@ /obj/item/defibrillator/loaded/Initialize() //starts with hicap . = ..() - paddles = make_paddles() cell = new(src) update_icon() return @@ -193,7 +192,7 @@ remove_paddles(user) update_icon() -/obj/item/defibrillator/item_action_slot_check(slot, mob/user) +/obj/item/defibrillator/item_action_slot_check(slot, mob/user, datum/action/A) if(slot == user.getBackSlot()) return 1 @@ -208,8 +207,8 @@ var/M = get(paddles, /mob) remove_paddles(M) QDEL_NULL(paddles) - . = ..() - update_icon() + QDEL_NULL(cell) + return ..() /obj/item/defibrillator/proc/deductcharge(chrgdeductamt) if(cell) @@ -244,13 +243,12 @@ w_class = WEIGHT_CLASS_NORMAL slot_flags = ITEM_SLOT_BELT -/obj/item/defibrillator/compact/item_action_slot_check(slot, mob/user) +/obj/item/defibrillator/compact/item_action_slot_check(slot, mob/user, datum/action/A) if(slot == user.getBeltSlot()) return TRUE /obj/item/defibrillator/compact/loaded/Initialize() . = ..() - paddles = make_paddles() cell = new(src) update_icon() @@ -262,7 +260,6 @@ /obj/item/defibrillator/compact/combat/loaded/Initialize() . = ..() - paddles = make_paddles() cell = new /obj/item/stock_parts/cell/infinite(src) update_icon() @@ -297,31 +294,28 @@ var/grab_ghost = FALSE var/tlimit = DEFIB_TIME_LIMIT * 10 - var/datum/component/mobhook + var/mob/listeningTo /obj/item/twohanded/shockpaddles/equipped(mob/user, slot) . = ..() - if(req_defib) - if (mobhook && mobhook.parent != user) - QDEL_NULL(mobhook) - if (!mobhook) - mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/check_range))) + if(!req_defib) + return + RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/check_range) /obj/item/twohanded/shockpaddles/Moved() . = ..() check_range() /obj/item/twohanded/shockpaddles/proc/check_range() - if(!req_defib) + if(!req_defib || !defib) return if(!in_range(src,defib)) var/mob/living/L = loc if(istype(L)) to_chat(L, "[defib]'s paddles overextend and come out of your hands!") - L.temporarilyRemoveItemFromInventory(src,TRUE) else visible_message("[src] snap back into [defib].") - snap_back() + snap_back() /obj/item/twohanded/shockpaddles/proc/recharge(var/time) if(req_defib || !time) @@ -362,14 +356,14 @@ /obj/item/twohanded/shockpaddles/dropped(mob/user) if(!req_defib) return ..() - if (mobhook) - QDEL_NULL(mobhook) if(user) + UnregisterSignal(user, COMSIG_MOVABLE_MOVED) var/obj/item/twohanded/offhand/O = user.get_inactive_held_item() if(istype(O)) O.unwield() - to_chat(user, "The paddles snap back into the main unit.") - snap_back() + if(user != loc) + to_chat(user, "The paddles snap back into the main unit.") + snap_back() return unwield(user) /obj/item/twohanded/shockpaddles/proc/snap_back() diff --git a/code/game/objects/items/devices/PDA/virus_cart.dm b/code/game/objects/items/devices/PDA/virus_cart.dm index d85c5d72d8..28bc559b93 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 f39d2ba0d6..dffbb46cbb 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/devices/geiger_counter.dm b/code/game/objects/items/devices/geiger_counter.dm index 90cdd0386c..110676de1b 100644 --- a/code/game/objects/items/devices/geiger_counter.dm +++ b/code/game/objects/items/devices/geiger_counter.dm @@ -203,21 +203,25 @@ return TRUE /obj/item/geiger_counter/cyborg - var/datum/component/mobhook + var/mob/listeningTo /obj/item/geiger_counter/cyborg/equipped(mob/user) . = ..() - if (mobhook && mobhook.parent != user) - QDEL_NULL(mobhook) - if (!mobhook) - mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_ATOM_RAD_ACT = CALLBACK(src, .proc/redirect_rad_act))) + if(listeningTo == user) + return + if(listeningTo) + UnregisterSignal(listeningTo, COMSIG_ATOM_RAD_ACT) + RegisterSignal(user, COMSIG_ATOM_RAD_ACT, .proc/redirect_rad_act) + listeningTo = user /obj/item/geiger_counter/cyborg/proc/redirect_rad_act(datum/source, amount) rad_act(amount) /obj/item/geiger_counter/cyborg/dropped() . = ..() - QDEL_NULL(mobhook) + if(listeningTo) + UnregisterSignal(listeningTo, COMSIG_ATOM_RAD_ACT) + listeningTo = null #undef RAD_LEVEL_NORMAL #undef RAD_LEVEL_MODERATE diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index 2c234a59ba..fc768cd38e 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -195,7 +195,7 @@ effective or pretty fucking useless. Deactivate() return -/obj/item/shadowcloak/item_action_slot_check(slot, mob/user) +/obj/item/shadowcloak/item_action_slot_check(slot, mob/user, datum/action/A) if(slot == SLOT_BELT) return 1 diff --git a/code/game/objects/items/his_grace.dm b/code/game/objects/items/his_grace.dm index 3be57d23f1..7e7dddefb6 100644 --- a/code/game/objects/items/his_grace.dm +++ b/code/game/objects/items/his_grace.dm @@ -29,7 +29,7 @@ . = ..() START_PROCESSING(SSprocessing, src) GLOB.poi_list += src - AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_POST_THROW = CALLBACK(src, .proc/move_gracefully))) + RegisterSignal(src, COMSIG_MOVABLE_POST_THROW, .proc/move_gracefully) /obj/item/his_grace/Destroy() STOP_PROCESSING(SSprocessing, src) diff --git a/code/game/objects/items/implants/implant_storage.dm b/code/game/objects/items/implants/implant_storage.dm index 739873af00..1f44b5318e 100644 --- a/code/game/objects/items/implants/implant_storage.dm +++ b/code/game/objects/items/implants/implant_storage.dm @@ -21,7 +21,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.pocket) + var/datum/component/storage/STR = imp_e.pocket.GetComponent(/datum/component/storage) if(!STR || (STR && STR.max_items < max_slot_stacking)) imp_e.pocket.AddComponent(/datum/component/storage/concrete/implant) qdel(src) diff --git a/code/game/objects/items/melee/energy.dm b/code/game/objects/items/melee/energy.dm index 57b9973aa3..624dbdd8ef 100644 --- a/code/game/objects/items/melee/energy.dm +++ b/code/game/objects/items/melee/energy.dm @@ -233,3 +233,152 @@ desc = "An extremely sharp blade made out of hard light. Packs quite a punch." icon_state = "lightblade" item_state = "lightblade" + +/*///////////////////////////////////////////////////////////////////////// +///////////// The TRUE Energy Sword /////////////////////////// +*////////////////////////////////////////////////////////////////////////// + +/obj/item/melee/transforming/energy/sword/cx + name = "non-eutactic blade" + desc = "The Non-Eutactic Blade utilizes a hardlight blade that is dynamically 'forged' on demand to create a deadly sharp edge that is unbreakable." + icon_state = "cxsword_hilt" + item_state = "cxsword" + force = 3 + force_on = 21 + throwforce = 5 + throwforce_on = 20 + hitsound = "swing_hit" //it starts deactivated + hitsound_on = 'sound/weapons/nebhit.ogg' + attack_verb_off = list("tapped", "poked") + throw_speed = 3 + throw_range = 5 + sharpness = IS_SHARP + embedding = list("embedded_pain_multiplier" = 6, "embed_chance" = 20, "embedded_fall_chance" = 60) + armour_penetration = 10 + block_chance = 35 + light_color = "#37FFF7" + actions_types = list() + +/obj/item/melee/transforming/energy/sword/cx/pre_altattackby(atom/A, mob/living/user, params) //checks if it can do right click memes + altafterattack(A, user, TRUE, params) + return TRUE + +/obj/item/melee/transforming/energy/sword/cx/altafterattack(atom/target, mob/living/carbon/user, proximity_flag, click_parameters) //does right click memes + if(istype(user)) + user.visible_message("[user] points the tip of [src] at [target].", "You point the tip of [src] at [target].") + return TRUE + +/obj/item/melee/transforming/energy/sword/cx/transform_weapon(mob/living/user, supress_message_text) + active = !active //I'd use a ..() here but it'd inherit from the regular esword's proc instead, so SPAGHETTI CODE + if(active) //also I'd need to rip out the iconstate changing bits + force = force_on + throwforce = throwforce_on + hitsound = hitsound_on + throw_speed = 4 + if(attack_verb_on.len) + attack_verb = attack_verb_on + w_class = w_class_on + START_PROCESSING(SSobj, src) + set_light(brightness_on) + update_icon() + else + force = initial(force) + throwforce = initial(throwforce) + hitsound = initial(hitsound) + throw_speed = initial(throw_speed) + if(attack_verb_off.len) + attack_verb = attack_verb_off + w_class = initial(w_class) + STOP_PROCESSING(SSobj, src) + set_light(0) + update_icon() + transform_messages(user, supress_message_text) + add_fingerprint(user) + return TRUE + +/obj/item/melee/transforming/energy/sword/cx/transform_messages(mob/living/user, supress_message_text) + playsound(user, active ? 'sound/weapons/nebon.ogg' : 'sound/weapons/neboff.ogg', 65, 1) + if(!supress_message_text) + to_chat(user, "[src] [active ? "is now active":"can now be concealed"].") + +/obj/item/melee/transforming/energy/sword/cx/update_icon() + var/mutable_appearance/blade_overlay = mutable_appearance(icon, "cxsword_blade") + var/mutable_appearance/gem_overlay = mutable_appearance(icon, "cxsword_gem") + + if(light_color) + blade_overlay.color = light_color + gem_overlay.color = light_color + + cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other + + add_overlay(gem_overlay) + + if(active) + add_overlay(blade_overlay) + if(ismob(loc)) + var/mob/M = loc + M.update_inv_hands() + +/obj/item/melee/transforming/energy/sword/cx/AltClick(mob/living/user) + if(!in_range(src, user)) //Basic checks to prevent abuse + return + if(user.incapacitated() || !istype(user)) + to_chat(user, "You can't do that right now!") + return + + if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes") + var/energy_color_input = input(usr,"","Choose Energy Color",light_color) as color|null + if(energy_color_input) + light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1) + update_icon() + update_light() + +/obj/item/melee/transforming/energy/sword/cx/examine(mob/user) + ..() + to_chat(user, "Alt-click to recolor it.") + +/obj/item/melee/transforming/energy/sword/cx/worn_overlays(isinhands, icon_file) + . = ..() + if(active) + if(isinhands) + var/mutable_appearance/blade_inhand = mutable_appearance(icon_file, "cxsword_blade") + blade_inhand.color = light_color + . += blade_inhand + +//Broken version. Not a toy, but not as strong. +/obj/item/melee/transforming/energy/sword/cx/broken + name = "misaligned non-eutactic blade" + desc = "The Non-Eutactic Blade utilizes a hardlight blade that is dynamically 'forged' on demand to create a deadly sharp edge that is unbreakable. This one seems to have a damaged handle and misaligned components, causing the blade to be unstable at best" + force_on = 15 //As strong a survival knife/bone dagger + +/obj/item/melee/transforming/energy/sword/cx/attackby(obj/item/W, mob/living/user, params) + if(istype(W, /obj/item/melee/transforming/energy/sword/cx)) + if(HAS_TRAIT(W, TRAIT_NODROP) || HAS_TRAIT(src, TRAIT_NODROP)) + to_chat(user, "\the [HAS_TRAIT(src, TRAIT_NODROP) ? src : W] is stuck to your hand, you can't attach it to \the [HAS_TRAIT(src, TRAIT_NODROP) ? W : src]!") + return + else + to_chat(user, "You combine the two light swords, making a single supermassive blade! You're cool.") + new /obj/item/twohanded/dualsaber/hypereutactic(user.drop_location()) + qdel(W) + qdel(src) + else + return ..() + +//////// Tatortot NEB /////////////// (same stats as regular esword) +/obj/item/melee/transforming/energy/sword/cx/traitor + name = "\improper Dragon's Tooth Sword" + desc = "The Dragon's Tooth sword is a blackmarket modification of a Non-Eutactic Blade, \ + which utilizes a hardlight blade that is dynamically 'forged' on demand to create a deadly sharp edge that is unbreakable. \ + It appears to have a wooden grip and a shaved down guard." + icon_state = "cxsword_hilt_traitor" + force_on = 30 + armour_penetration = 50 + embedding = list("embedded_pain_multiplier" = 10, "embed_chance" = 75, "embedded_fall_chance" = 0, "embedded_impact_pain_multiplier" = 10) + block_chance = 50 + hitsound_on = 'sound/weapons/blade1.ogg' + light_color = "#37F0FF" + +/obj/item/melee/transforming/energy/sword/cx/traitor/transform_messages(mob/living/user, supress_message_text) + playsound(user, active ? 'sound/weapons/saberon.ogg' : 'sound/weapons/saberoff.ogg', 35, 1) + if(!supress_message_text) + to_chat(user, "[src] [active ? "is now active":"can now be concealed"].") diff --git a/code/game/objects/items/melee/transforming.dm b/code/game/objects/items/melee/transforming.dm index aabb930bb2..850810bdb2 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 74919016f5..7b3dcb1e00 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/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index 5454b0fdb8..0e5d3add5f 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -746,3 +746,73 @@ ..() hud = new /obj/item/clothing/glasses/hud/security(src) return + + +/********************************************************************** + Grippers oh god oh fuck +***********************************************************************/ + +/obj/item/weapon/gripper + name = "circuit gripper" + desc = "A simple grasping tool for inserting circuitboards into machinary." + icon = 'icons/obj/device.dmi' + icon_state = "gripper" + + item_flags = NOBLUDGEON + + //Has a list of items that it can hold. + var/list/can_hold = list( + /obj/item/circuitboard + ) + + var/obj/item/wrapped = null // Item currently being held. + +/obj/item/weapon/gripper/attack_self() + if(wrapped) + wrapped.forceMove(get_turf(wrapped)) + wrapped = null + return ..() + +/obj/item/weapon/gripper/afterattack(var/atom/target, var/mob/living/user, proximity, params) + + if(!proximity) + return + + if(!wrapped) + for(var/obj/item/thing in src.contents) + wrapped = thing + break + + if(wrapped) //Already have an item. + //Temporary put wrapped into user so target's attackby() checks pass. + wrapped.loc = user + + //Pass the attack on to the target. This might delete/relocate wrapped. + var/resolved = target.attackby(wrapped,user) + if(!resolved && wrapped && target) + wrapped.afterattack(target,user,1) + //If wrapped was neither deleted nor put into target, put it back into the gripper. + if(wrapped && user && (wrapped.loc == user)) + wrapped.loc = src + else + wrapped = null + return + + else if(istype(target,/obj/item)) + + var/obj/item/I = target + + var/grab = 0 + for(var/typepath in can_hold) + if(istype(I,typepath)) + grab = 1 + break + + //We can grab the item, finally. + if(grab) + to_chat(user, "You collect \the [I].") + I.loc = src + wrapped = I + return + else + to_chat(user, "Your gripper cannot hold \the [target].") diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 2356319cd7..e1834078a6 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -598,10 +598,10 @@ R.update_transform() /obj/item/borg/upgrade/rped - name = "engineering cyborg RPED" + name = "engineering cyborg BSRPED" desc = "A rapid part exchange device for the engineering cyborg." icon = 'icons/obj/storage.dmi' - icon_state = "borgrped" + icon_state = "borg_BS_RPED" require_module = TRUE module_type = list(/obj/item/robot_module/engineering) @@ -609,14 +609,21 @@ . = ..() if(.) + var/obj/item/storage/part_replacer/bluespace/cyborg/BSRPED = locate() in R var/obj/item/storage/part_replacer/cyborg/RPED = locate() in R - if(RPED) - to_chat(user, "This unit is already equipped with a RPED module.") + if(!RPED) + RPED = locate() in R.module + if(!BSRPED) + BSRPED = locate() in R.module //There's gotta be a smarter way to do this. + if(BSRPED) + to_chat(user, "This unit is already equipped with a BSRPED module.") return FALSE - RPED = new(R.module) - R.module.basic_modules += RPED - R.module.add_module(RPED, FALSE, TRUE) + BSRPED = new(R.module) + SEND_SIGNAL(RPED, COMSIG_TRY_STORAGE_QUICK_EMPTY) + qdel(RPED) + R.module.basic_modules += BSRPED + R.module.add_module(BSRPED, FALSE, TRUE) /obj/item/borg/upgrade/rped/deactivate(mob/living/silicon/robot/R, user = usr) . = ..() diff --git a/code/game/objects/items/stacks/telecrystal.dm b/code/game/objects/items/stacks/telecrystal.dm index 7c34ae87bf..9b5ca2b066 100644 --- a/code/game/objects/items/stacks/telecrystal.dm +++ b/code/game/objects/items/stacks/telecrystal.dm @@ -13,7 +13,7 @@ var/mob/living/L = user for(var/obj/item/implant/uplink/I in L.implants) if(I?.imp_in) - GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, I) + 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 ad8c4306a5..a79eb299da 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 @@ -58,7 +58,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 @@ -87,7 +87,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 @@ -260,7 +260,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 @@ -286,7 +286,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 @@ -338,7 +338,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 @@ -444,7 +444,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 @@ -594,7 +594,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 0a475b2af1..13efe72686 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 @@ -85,7 +85,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 @@ -105,12 +105,12 @@ w_class = WEIGHT_CLASS_NORMAL component_type = /datum/component/storage/concrete/stack var/spam_protection = FALSE //If this is TRUE, the holder won't receive any messages when they fail to pick up ore through crossing it - var/datum/component/mobhook + var/mob/listeningTo rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE /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 @@ -118,15 +118,17 @@ /obj/item/storage/bag/ore/equipped(mob/user) . = ..() - if (mobhook && mobhook.parent != user) - QDEL_NULL(mobhook) - if (!mobhook) - mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/Pickup_ores))) + if(listeningTo == user) + return + if(listeningTo) + UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED) + RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/Pickup_ores) + listeningTo = user /obj/item/storage/bag/ore/dropped() . = ..() - if (mobhook) - QDEL_NULL(mobhook) + UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED) + listeningTo = null /obj/item/storage/bag/ore/proc/Pickup_ores(mob/living/user) var/show_message = FALSE @@ -136,7 +138,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)) @@ -166,7 +168,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 @@ -178,7 +180,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 @@ -191,7 +193,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 @@ -209,7 +211,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 @@ -249,7 +251,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)) @@ -266,7 +268,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 // ----------------------------- @@ -283,7 +285,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 @@ -308,15 +310,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) - STR.quick_empty() + SEND_SIGNAL(src, COMSIG_TRY_STORAGE_QUICK_EMPTY) // Make each item scatter a bit for(var/obj/item/I in oldContents) spawn() @@ -362,7 +363,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" @@ -382,7 +383,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" @@ -397,6 +398,6 @@ /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 diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index e354123ab9..713dbe4133 100755 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -44,7 +44,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, @@ -199,7 +199,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/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 @@ -297,7 +297,7 @@ /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 @@ -308,7 +308,7 @@ /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 @@ -331,7 +331,7 @@ /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 @@ -346,7 +346,7 @@ /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 @@ -359,7 +359,7 @@ /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( @@ -427,7 +427,7 @@ /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 @@ -480,7 +480,7 @@ /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 @@ -533,7 +533,7 @@ /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 @@ -559,7 +559,7 @@ /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( @@ -586,7 +586,7 @@ /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( @@ -602,7 +602,7 @@ /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( @@ -617,7 +617,7 @@ /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.allow_quick_gather = TRUE @@ -659,7 +659,7 @@ /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( @@ -683,7 +683,7 @@ /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 @@ -750,7 +750,7 @@ /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 diff --git a/code/game/objects/items/storage/book.dm b/code/game/objects/items/storage/book.dm index 85a06f0c1e..c658eee3d5 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/boxes.dm b/code/game/objects/items/storage/boxes.dm index dd6a6b8453..dde0e0715b 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -398,7 +398,7 @@ /obj/item/storage/box/donkpockets/ComponentInitialize() . = ..() - 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/donkpocket)) /obj/item/storage/box/donkpockets/PopulateContents() @@ -413,7 +413,7 @@ /obj/item/storage/box/monkeycubes/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 7 STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/monkeycube)) @@ -568,7 +568,7 @@ /obj/item/storage/box/snappops/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.can_hold = typecacheof(list(/obj/item/toy/snappop)) STR.max_items = 8 @@ -586,7 +586,7 @@ /obj/item/storage/box/matches/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/match)) @@ -609,7 +609,7 @@ /obj/item/storage/box/lights/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 21 STR.can_hold = typecacheof(list(/obj/item/light/tube, /obj/item/light/bulb)) STR.max_combined_w_class = 21 diff --git a/code/game/objects/items/storage/briefcase.dm b/code/game/objects/items/storage/briefcase.dm index ed547bc17d..782ffd3add 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 08748bf37e..2703581a94 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 95639918bb..f0a9ad019b 100644 --- a/code/game/objects/items/storage/fancy.dm +++ b/code/game/objects/items/storage/fancy.dm @@ -25,7 +25,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) @@ -72,7 +72,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)) @@ -93,7 +93,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)) @@ -115,7 +115,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) @@ -138,7 +138,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)) @@ -276,7 +276,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)) @@ -300,7 +300,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)) @@ -347,6 +347,6 @@ /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 312ef35430..822a1d5011 100644 --- a/code/game/objects/items/storage/firstaid.dm +++ b/code/game/objects/items/storage/firstaid.dm @@ -170,7 +170,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() @@ -200,7 +200,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)) @@ -337,7 +337,7 @@ /obj/item/storage/pill_bottle/penis_enlargement/PopulateContents() for(var/i in 1 to 7) new /obj/item/reagent_containers/pill/penis_enlargement(src) - + /obj/item/storage/pill_bottle/breast_enlargement name = "breast enlargement pills" desc = "Made by Fermichem - They have a woman with breasts larger than she is on them. The warming states not to take more than 10u at a time." @@ -363,7 +363,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 eeebc6f4c5..1607b19c2f 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 @@ -101,7 +101,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 20dae54a71..8618e4c3ae 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 1861947832..251703f907 100644 --- a/code/game/objects/items/storage/toolbox.dm +++ b/code/game/objects/items/storage/toolbox.dm @@ -124,7 +124,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() @@ -165,7 +165,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 @@ -220,7 +220,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 @@ -258,7 +258,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 cf5d685b4a..84ebc28afa 100644 --- a/code/game/objects/items/storage/uplink_kits.dm +++ b/code/game/objects/items/storage/uplink_kits.dm @@ -220,7 +220,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)) @@ -244,7 +244,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 cb5790e45f..7a6899ad15 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/tanks/watertank.dm b/code/game/objects/items/tanks/watertank.dm index 8f2b85098d..f3be8cefc8 100644 --- a/code/game/objects/items/tanks/watertank.dm +++ b/code/game/objects/items/tanks/watertank.dm @@ -24,7 +24,7 @@ /obj/item/watertank/ui_action_click(mob/user) toggle_mister(user) -/obj/item/watertank/item_action_slot_check(slot, mob/user) +/obj/item/watertank/item_action_slot_check(slot, mob/user, datum/action/A) if(slot == user.getBackSlot()) return 1 @@ -341,7 +341,7 @@ /obj/item/reagent_containers/chemtank/ui_action_click() toggle_injection() -/obj/item/reagent_containers/chemtank/item_action_slot_check(slot, mob/user) +/obj/item/reagent_containers/chemtank/item_action_slot_check(slot, mob/user, datum/action/A) if(slot == SLOT_BACK) return 1 diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 46fabea8b0..638dcd3556 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -276,6 +276,106 @@ /obj/item/toy/sword/getweight() return (active ? total_mass_on : total_mass) || w_class *1.25 +/obj/item/toy/sword/cx + name = "\improper DX Non-Euplastic LightSword" + desc = "A deluxe toy replica of an energy sword. Realistic visuals and sounds! Ages 8 and up." + icon = 'icons/obj/items_and_weapons.dmi' + icon_state = "cxsword_hilt" + item_state = "cxsword" + active = FALSE + w_class = WEIGHT_CLASS_SMALL + attack_verb = list("poked", "jabbed", "hit") + light_color = "#37FFF7" + var/light_brightness = 3 + actions_types = list() + +/obj/item/toy/sword/cx/pre_altattackby(atom/A, mob/living/user, params) //checks if it can do right click memes + altafterattack(A, user, TRUE, params) + return TRUE + +/obj/item/toy/sword/cx/altafterattack(atom/target, mob/living/carbon/user, proximity_flag, click_parameters) //does right click memes + if(istype(user)) + user.visible_message("[user] points the tip of [src] at [target].", "You point the tip of [src] at [target].") + return TRUE + +/obj/item/toy/sword/cx/attack_self(mob/user) + active = !( active ) + + if (active) + to_chat(user, "You activate the holographic blade with a press of a button.") + playsound(user, 'sound/weapons/nebon.ogg', 50, 1) + w_class = WEIGHT_CLASS_BULKY + attack_verb = list("slashed", "stabbed", "ravaged") + set_light(light_brightness) + update_icon() + + else + to_chat(user, "You deactivate the holographic blade with a press of a button.") + playsound(user, 'sound/weapons/neboff.ogg', 50, 1) + w_class = WEIGHT_CLASS_SMALL + attack_verb = list("poked", "jabbed", "hit") + set_light(0) + update_icon() + + add_fingerprint(user) + +/obj/item/toy/sword/cx/update_icon() + var/mutable_appearance/blade_overlay = mutable_appearance(icon, "cxsword_blade") + var/mutable_appearance/gem_overlay = mutable_appearance(icon, "cxsword_gem") + + if(light_color) + blade_overlay.color = light_color + gem_overlay.color = light_color + + cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other + + add_overlay(gem_overlay) + + if(active) + add_overlay(blade_overlay) + if(ismob(loc)) + var/mob/M = loc + M.update_inv_hands() + +/obj/item/toy/sword/cx/AltClick(mob/living/user) + if(!in_range(src, user)) //Basic checks to prevent abuse + return + if(user.incapacitated() || !istype(user)) + to_chat(user, "You can't do that right now!") + return + + if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes") + var/energy_color_input = input(usr,"","Choose Energy Color",light_color) as color|null + if(energy_color_input) + light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1) + update_icon() + update_light() + +/obj/item/toy/sword/cx/worn_overlays(isinhands, icon_file) + . = ..() + if(active) + if(isinhands) + var/mutable_appearance/blade_inhand = mutable_appearance(icon_file, "cxsword_blade") + blade_inhand.color = light_color + . += blade_inhand + +/obj/item/toy/sword/cx/attackby(obj/item/W, mob/living/user, params) + if(istype(W, /obj/item/toy/sword/cx)) + if(HAS_TRAIT(W, TRAIT_NODROP) || HAS_TRAIT(src, TRAIT_NODROP)) + to_chat(user, "\the [HAS_TRAIT(src, TRAIT_NODROP) ? src : W] is stuck to your hand, you can't attach it to \the [HAS_TRAIT(src, TRAIT_NODROP) ? W : src]!") + return + else + to_chat(user, "You combine the two plastic swords, making a single supermassive toy! You're fake-cool.") + new /obj/item/twohanded/dualsaber/hypereutactic/toy(user.loc) + qdel(W) + qdel(src) + else + return ..() + +/obj/item/toy/sword/cx/examine(mob/user) + ..() + to_chat(user, "Alt-click to recolor it.") + /* * Foam armblade */ @@ -337,6 +437,30 @@ /obj/item/twohanded/dualsaber/toy/IsReflect()//Stops Toy Dualsabers from reflecting energy projectiles return FALSE +/obj/item/twohanded/dualsaber/hypereutactic/toy + name = "\improper DX Hyper-Euplastic LightSword" + desc = "A supermassive toy envisioned to cleave the very fabric of space and time itself in twain. Realistic visuals and sounds! Ages 8 and up." + force = 0 + throwforce = 0 + throw_speed = 3 + throw_range = 5 + force_unwielded = 0 + force_wielded = 0 + attack_verb = list("attacked", "struck", "hit") + total_mass_on = TOTAL_MASS_TOY_SWORD + slowdown_wielded = 0 + +/obj/item/twohanded/dualsaber/hypereutactic/toy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) + return FALSE + +/obj/item/twohanded/dualsaber/hypereutactic/toy/IsReflect()//Stops it from reflecting energy projectiles + return FALSE + +/obj/item/twohanded/dualsaber/hypereutactic/toy/rainbow + name = "\improper Hyper-Euclidean Reciprocating Trigonometric Zweihander" + desc = "A custom-built toy with fancy rainbow lights built-in." + hacked = TRUE + /obj/item/toy/katana name = "replica katana" desc = "Woefully underpowered in D20." diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index dda704e1bf..14f924a27e 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -6,6 +6,7 @@ * Spears * CHAINSAWS * Bone Axe and Spear + * And more */ /*################################################################## @@ -464,6 +465,116 @@ else return ..() +///////////////////////////////////////////////////// +// HYPEREUTACTIC Blades ///////////////////////// +///////////////////////////////////////////////////// + +/obj/item/twohanded/dualsaber/hypereutactic + icon = 'icons/obj/1x2.dmi' + icon_state = "hypereutactic" + lefthand_file = 'icons/mob/inhands/64x64_lefthand.dmi' + righthand_file = 'icons/mob/inhands/64x64_righthand.dmi' + item_state = "hypereutactic" + inhand_x_dimension = 64 + inhand_y_dimension = 64 + name = "hypereutactic blade" + desc = "A supermassive weapon envisioned to cleave the very fabric of space and time itself in twain, the hypereutactic blade dynamically flash-forges a hypereutactic crystaline nanostructure capable of passing through most known forms of matter like a hot knife through butter." + force = 7 + force_unwielded = 7 + force_wielded = 40 + wieldsound = 'sound/weapons/nebon.ogg' + unwieldsound = 'sound/weapons/neboff.ogg' + hitsound_on = 'sound/weapons/nebhit.ogg' + slowdown_wielded = 1 + armour_penetration = 60 + light_color = "#37FFF7" + rainbow_colors = list("#FF0000", "#FFFF00", "#00FF00", "#00FFFF", "#0000FF","#FF00FF", "#3399ff", "#ff9900", "#fb008b", "#9800ff", "#00ffa3", "#ccff00") + attack_verb = list("attacked", "slashed", "stabbed", "sliced", "destroyed", "ripped", "devastated", "shredded") + spinnable = FALSE + total_mass_on = 4 + +/obj/item/twohanded/dualsaber/hypereutactic/chaplain + name = "\improper divine lightblade" + desc = "A giant blade of bright and holy light, said to cut down the wicked with ease." + force = 5 + force_unwielded = 5 + force_wielded = 20 + block_chance = 50 + armour_penetration = 0 + var/chaplain_spawnable = TRUE + obj_flags = UNIQUE_RENAME + +/obj/item/twohanded/dualsaber/hypereutactic/chaplain/Initialize() + . = ..() + AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE) + +/obj/item/twohanded/dualsaber/hypereutactic/chaplain/IsReflect() + return FALSE + +/obj/item/twohanded/dualsaber/hypereutactic/pre_altattackby(atom/A, mob/living/user, params) //checks if it can do right click memes + altafterattack(A, user, TRUE, params) + return TRUE + +/obj/item/twohanded/dualsaber/hypereutactic/altafterattack(atom/target, mob/living/user, proximity_flag, click_parameters) //does right click memes + if(istype(user)) + user.visible_message("[user] points the tip of [src] at [target].", "You point the tip of [src] at [target].") + return TRUE + +/obj/item/twohanded/dualsaber/hypereutactic/update_icon() + var/mutable_appearance/blade_overlay = mutable_appearance(icon, "hypereutactic_blade") + var/mutable_appearance/gem_overlay = mutable_appearance(icon, "hypereutactic_gem") + + if(light_color) + blade_overlay.color = light_color + gem_overlay.color = light_color + + cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other + + add_overlay(gem_overlay) + + if(wielded) + add_overlay(blade_overlay) + if(ismob(loc)) + var/mob/M = loc + M.update_inv_hands() + + clean_blood() + +/obj/item/twohanded/dualsaber/hypereutactic/AltClick(mob/living/user) + if(!user.canUseTopic(src, BE_CLOSE, FALSE) || hacked) + return + if(user.incapacitated() || !istype(user)) + to_chat(user, "You can't do that right now!") + return + if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes") + var/energy_color_input = input(usr,"","Choose Energy Color",light_color) as color|null + if(!energy_color_input || !user.canUseTopic(src, BE_CLOSE, FALSE) || hacked) + return + light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1) + update_icon() + update_light() + +/obj/item/twohanded/dualsaber/hypereutactic/worn_overlays(isinhands, icon_file) + . = ..() + if(isinhands) + var/mutable_appearance/gem_inhand = mutable_appearance(icon_file, "hypereutactic_gem") + gem_inhand.color = light_color + . += gem_inhand + if(wielded) + var/mutable_appearance/blade_inhand = mutable_appearance(icon_file, "hypereutactic_blade") + blade_inhand.color = light_color + . += blade_inhand + +/obj/item/twohanded/dualsaber/hypereutactic/examine(mob/user) + ..() + if(!hacked) + to_chat(user, "Alt-click to recolor it.") + +/obj/item/twohanded/dualsaber/hypereutactic/rainbow_process() + . = ..() + update_icon() + update_light() + //spears /obj/item/twohanded/spear icon_state = "spearglass0" @@ -625,7 +736,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) @@ -848,18 +959,20 @@ righthand_file = 'icons/mob/inhands/items_righthand.dmi' slot_flags = ITEM_SLOT_BELT w_class = WEIGHT_CLASS_SMALL - var/datum/component/mobhook + var/mob/listeningTo var/zoom_out_amt = 6 var/zoom_amt = 10 +/obj/item/twohanded/binoculars/Destroy() + listeningTo = null + return ..() + /obj/item/twohanded/binoculars/wield(mob/user) . = ..() if(!wielded) return - if(QDELETED(mobhook)) - mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/unwield))) - else - user.TakeComponent(mobhook) + RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/unwield) + listeningTo = user user.visible_message("[user] holds [src] up to [user.p_their()] eyes.","You hold [src] up to your eyes.") item_state = "binoculars_wielded" user.regenerate_icons() @@ -883,7 +996,8 @@ /obj/item/twohanded/binoculars/unwield(mob/user) . = ..() - mobhook.RemoveComponent() + UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED) + listeningTo = null user.visible_message("[user] lowers [src].","You lower [src].") item_state = "binoculars" user.regenerate_icons() diff --git a/code/game/objects/structures/barsigns.dm b/code/game/objects/structures/barsigns.dm index 2093ae5660..053512a256 100644 --- a/code/game/objects/structures/barsigns.dm +++ b/code/game/objects/structures/barsigns.dm @@ -1,4 +1,4 @@ -/obj/structure/sign/barsign // All Signs are 64 by 32 pixels, they take two tiles +/obj/structure/sign/barsign // All Signs are 64 by 64 pixels, though most of them are made to fit 64 x 32 and only take the two lowermost tiles. name = "Bar Sign" desc = "A bar sign with no writing on it." icon = 'icons/obj/barsigns.dmi' diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 8b0d410a72..172120861b 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -614,3 +614,6 @@ user.resting = FALSE togglelock(user) T1.visible_message("[user] dives into [src]!") + +/obj/structure/closet/canReachInto(atom/user, atom/target, list/next, view_only, obj/item/tool) + return ..() && opened diff --git a/code/game/turfs/change_turf.dm b/code/game/turfs/change_turf.dm index e441ccd6cc..f1c5080c8f 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/game/turfs/simulated/chasm.dm b/code/game/turfs/simulated/chasm.dm index 677fba2990..0a7b507488 100644 --- a/code/game/turfs/simulated/chasm.dm +++ b/code/game/turfs/simulated/chasm.dm @@ -15,11 +15,11 @@ AddComponent(/datum/component/chasm, SSmapping.get_turf_below(src)) /turf/open/chasm/proc/set_target(turf/target) - GET_COMPONENT(chasm_component, /datum/component/chasm) + var/datum/component/chasm/chasm_component = GetComponent(/datum/component/chasm) chasm_component.target_turf = target /turf/open/chasm/proc/drop(atom/movable/AM) - GET_COMPONENT(chasm_component, /datum/component/chasm) + var/datum/component/chasm/chasm_component = GetComponent(/datum/component/chasm) chasm_component.drop(AM) /turf/open/chasm/MakeSlippery(wet_setting, min_wet_time, wet_time_to_add, max_wet_time, permanent) diff --git a/code/modules/NTNet/services/_service.dm b/code/modules/NTNet/services/_service.dm index 8611c2d25d..3622dc3881 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/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 4e58a9cba5..ce4b8f7e39 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -318,6 +318,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) RemoveActive() state = AHELP_CLOSED GLOB.ahelp_tickets.ListInsert(src) + to_chat(initiator, "Ticket closed by [usr?.client?.holder?.fakekey? usr.client.holder.fakekey : "an administrator"].") AddInteraction("Closed by [key_name].") if(!silent) SSblackbox.record_feedback("tally", "ahelp_stats", 1, "closed") @@ -336,7 +337,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) addtimer(CALLBACK(initiator, /client/proc/giveadminhelpverb), 50) AddInteraction("Resolved by [key_name].") - to_chat(initiator, "Your ticket has been resolved by an admin. The Adminhelp verb will be returned to you shortly.") + to_chat(initiator, "Your ticket has been resolved by [usr?.client?.holder?.fakekey? usr.client.holder.fakekey : "an administrator"]. The Adminhelp verb will be returned to you shortly.") if(!silent) SSblackbox.record_feedback("tally", "ahelp_stats", 1, "resolved") var/msg = "Ticket [TicketHref("#[id]")] resolved by [key_name]" @@ -353,7 +354,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) SEND_SOUND(initiator, sound('sound/effects/adminhelp.ogg')) - to_chat(initiator, "- AdminHelp Rejected! -") + to_chat(initiator, "- AdminHelp Rejected by [usr?.client?.holder?.fakekey? usr.client.holder.fakekey : "an administrator"]! -") to_chat(initiator, "Your admin help was rejected. The adminhelp verb has been returned to you so that you may try again.") to_chat(initiator, "Please try to be calm, clear, and descriptive in admin helps, do not assume the admin has seen any related events, and clearly state the names of anybody you are reporting.") @@ -369,7 +370,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) if(state != AHELP_ACTIVE) return - var/msg = "- AdminHelp marked as IC issue! -
" + var/msg = "- AdminHelp marked as IC issue by [usr?.client?.holder?.fakekey? usr.client.holder.fakekey : "an administrator"]! -
" msg += "Losing is part of the game!
" msg += "It is also possible that your ahelp is unable to be answered properly, due to events occurring in the round." if(initiator) diff --git a/code/modules/antagonists/abductor/equipment/abduction_gear.dm b/code/modules/antagonists/abductor/equipment/abduction_gear.dm index d7bc0eb22b..c1088cbb3d 100644 --- a/code/modules/antagonists/abductor/equipment/abduction_gear.dm +++ b/code/modules/antagonists/abductor/equipment/abduction_gear.dm @@ -55,7 +55,7 @@ var/datum/action/A = X A.UpdateButtonIcon() -/obj/item/clothing/suit/armor/abductor/vest/item_action_slot_check(slot, mob/user) +/obj/item/clothing/suit/armor/abductor/vest/item_action_slot_check(slot, mob/user, datum/action/A) if(slot == SLOT_WEAR_SUIT) //we only give the mob the ability to activate the vest if he's actually wearing it. return 1 diff --git a/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm b/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm index fe6fe72d06..644d9eedd5 100644 --- a/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm +++ b/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm @@ -27,7 +27,7 @@ qdel(blaster) return ..() -/obj/item/clothing/glasses/judicial_visor/item_action_slot_check(slot, mob/user) +/obj/item/clothing/glasses/judicial_visor/item_action_slot_check(slot, mob/user, datum/action/A) if(slot != SLOT_GLASSES) return 0 return ..() diff --git a/code/modules/antagonists/disease/disease_mob.dm b/code/modules/antagonists/disease/disease_mob.dm index 49c34131fc..faea113ac5 100644 --- a/code/modules/antagonists/disease/disease_mob.dm +++ b/code/modules/antagonists/disease/disease_mob.dm @@ -31,7 +31,6 @@ the new instance inside the host to be updated to the template's stats. var/browser_open = FALSE var/mob/living/following_host - var/datum/component/redirect/move_listener var/list/disease_instances var/list/hosts //this list is associative, affected_mob -> disease_instance var/datum/disease/advance/sentient_disease/disease_template @@ -261,16 +260,10 @@ the new instance inside the host to be updated to the template's stats. refresh_adaptation_menu() /mob/camera/disease/proc/set_following(mob/living/L) + if(following_host) + UnregisterSignal(following_host, COMSIG_MOVABLE_MOVED) + RegisterSignal(L, COMSIG_MOVABLE_MOVED, .proc/follow_mob) following_host = L - if(!move_listener) - move_listener = L.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/follow_mob))) - else - if(L) - L.TakeComponent(move_listener) - if(QDELING(move_listener)) - move_listener = null - else - QDEL_NULL(move_listener) follow_mob() /mob/camera/disease/proc/follow_next(reverse = FALSE) diff --git a/code/modules/antagonists/revenant/revenant_abilities.dm b/code/modules/antagonists/revenant/revenant_abilities.dm index 292bb380d1..17d200a685 100644 --- a/code/modules/antagonists/revenant/revenant_abilities.dm +++ b/code/modules/antagonists/revenant/revenant_abilities.dm @@ -27,6 +27,7 @@ if(prob(10)) to_chat(target, "You feel as if you are being watched.") return + face_atom(target) draining = TRUE essence_drained += rand(15, 20) to_chat(src, "You search for the soul of [target].") diff --git a/code/modules/antagonists/revenant/revenant_blight.dm b/code/modules/antagonists/revenant/revenant_blight.dm index 89d8de283a..3e05b8d945 100644 --- a/code/modules/antagonists/revenant/revenant_blight.dm +++ b/code/modules/antagonists/revenant/revenant_blight.dm @@ -12,8 +12,8 @@ disease_flags = CURABLE permeability_mod = 1 severity = DISEASE_SEVERITY_DANGEROUS - var/finalstage = 0 //Because we're spawning off the cure in the final stage, we need to check if we've done the final stage's effects. - var/datum/mood_event/revenant_blight/depression + var/finalstage = FALSE //Because we're spawning off the cure in the final stage, we need to check if we've done the final stage's effects. + var/depression = FALSE /datum/disease/revblight/cure() if(affected_mob) @@ -44,7 +44,8 @@ affected_mob.emote("pale") if(3) if(!depression) - depression = SEND_SIGNAL(affected_mob, COMSIG_ADD_MOOD_EVENT, "rev_blight", /datum/mood_event/revenant_blight) + SEND_SIGNAL(affected_mob, COMSIG_ADD_MOOD_EVENT, "rev_blight", /datum/mood_event/revenant_blight) + depression = TRUE SEND_SIGNAL(affected_mob, COMSIG_DECREASE_SANITY, 0.12, SANITY_CRAZY) if(prob(10)) affected_mob.emote(pick("pale","shiver")) diff --git a/code/modules/antagonists/wizard/equipment/artefact.dm b/code/modules/antagonists/wizard/equipment/artefact.dm index 6ea2dd1ce9..576fc6b9bf 100644 --- a/code/modules/antagonists/wizard/equipment/artefact.dm +++ b/code/modules/antagonists/wizard/equipment/artefact.dm @@ -113,7 +113,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/assembly/infrared.dm b/code/modules/assembly/infrared.dm index 07f31a6678..7405549b3d 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -10,7 +10,7 @@ var/maxlength = 8 var/list/obj/effect/beam/i_beam/beams var/olddir = 0 - var/datum/component/redirect/listener + var/turf/listeningTo var/hearing_range = 3 /obj/item/assembly/infra/Initialize() @@ -33,7 +33,7 @@ /obj/item/assembly/infra/Destroy() STOP_PROCESSING(SSobj, src) - QDEL_NULL(listener) + listeningTo = null QDEL_LIST(beams) . = ..() @@ -163,8 +163,12 @@ next_activate = world.time + 30 /obj/item/assembly/infra/proc/switchListener(turf/newloc) - QDEL_NULL(listener) - listener = newloc.AddComponent(/datum/component/redirect, list(COMSIG_ATOM_EXITED = CALLBACK(src, .proc/check_exit))) + if(listeningTo == newloc) + return + if(listeningTo) + UnregisterSignal(listeningTo, COMSIG_ATOM_EXITED) + RegisterSignal(newloc, COMSIG_ATOM_EXITED, .proc/check_exit) + listeningTo = newloc /obj/item/assembly/infra/proc/check_exit(datum/source, atom/movable/offender) if(QDELETED(src)) diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm index 74f81ec9a0..2631491350 100644 --- a/code/modules/awaymissions/corpse.dm +++ b/code/modules/awaymissions/corpse.dm @@ -587,3 +587,57 @@ shoes = /obj/item/clothing/shoes/sneakers/black suit = /obj/item/clothing/suit/armor/vest glasses = /obj/item/clothing/glasses/sunglasses/reagent + +/obj/effect/mob_spawn/human/lavaknight + name = "odd cryogenics pod" + desc = "A humming cryo pod. You can barely recognise a faint glow underneath the built up ice. The machine is attempting to wake up its occupant." + mob_name = "a displaced knight from another dimension" + icon = 'icons/obj/machines/sleeper.dmi' + icon_state = "sleeper" + roundstart = FALSE + id_job = "Knight" + job_description = "Cydonian Knight" + death = FALSE + random = TRUE + outfit = /datum/outfit/lavaknight + mob_species = /datum/species/human + flavour_text = "You are a knight who conveniently has some form of retrograde amnesia. \ + You cannot remember where you came from. However, a few things remain burnt into your mind, most prominently a vow to never harm another sapient being under any circumstances unless it is hellbent on ending your life. \ + Remember: hostile creatures and such are fair game for attacking, but under no circumstances are you to attack anything capable of thought and/or speech unless it has made it its life's calling to chase you to the ends of the earth." + assignedrole = "Cydonian Knight" + +/obj/effect/mob_spawn/human/lavaknight/special(mob/living/new_spawn) + if(ishuman(new_spawn)) + var/mob/living/carbon/human/H = new_spawn + H.dna.features["mam_ears"] = "Cat, Big" //cat people + H.dna.features["mcolor"] = H.hair_color + H.update_body() + +/obj/effect/mob_spawn/human/lavaknight/Destroy() + new/obj/structure/showcase/machinery/oldpod/used(drop_location()) + return ..() + +/datum/outfit/lavaknight + name = "Cydonian Knight" + uniform = /obj/item/clothing/under/assistantformal + mask = /obj/item/clothing/mask/breath + shoes = /obj/item/clothing/shoes/sneakers/black + r_pocket = /obj/item/melee/transforming/energy/sword/cx + suit = /obj/item/clothing/suit/space/hardsuit/lavaknight + suit_store = /obj/item/tank/internals/oxygen + id = /obj/item/card/id/knight/blue + +/obj/effect/mob_spawn/human/lavaknight/captain + name = "odd gilded cryogenics pod" + desc = "A humming cryo pod that appears to be gilded. You can barely recognise a faint glow underneath the built up ice. The machine is attempting to wake up its occupant." + flavour_text = "You are a knight who conveniently has some form of retrograde amnesia. \ + You cannot remember where you came from. However, a few things remain burnt into your mind, most prominently a vow to never harm another sapient being under any circumstances unless it is hellbent on ending your life. \ + Remember: hostile creatures and such are fair game for attacking, but under no circumstances are you to attack anything capable of thought and/or speech unless it has made it its life's calling to chase you to the ends of the earth. \ + You feel a natural instict to lead, and as such, you should strive to lead your comrades to safety, and hopefully home. You also feel a burning determination to uphold your vow, as well as your fellow comrade's." + outfit = /datum/outfit/lavaknight/captain + id_job = "Knight Captain" + +/datum/outfit/lavaknight/captain + name ="Cydonian Knight Captain" + l_pocket = /obj/item/twohanded/dualsaber/hypereutactic + id = /obj/item/card/id/knight/captain diff --git a/code/modules/cargo/exports/manifest.dm b/code/modules/cargo/exports/manifest.dm index d03f5a46ce..60515781f9 100644 --- a/code/modules/cargo/exports/manifest.dm +++ b/code/modules/cargo/exports/manifest.dm @@ -80,7 +80,7 @@ // Paper work done correctly /datum/export/paperwork_correct - cost = 150 + cost = 120 // finicky number 20 x 120 = 2400 per crate k_elasticity = 0 unit_name = "correct paperwork" export_types = list(/obj/item/folder/paperwork_correct) diff --git a/code/modules/cargo/packs/armory.dm b/code/modules/cargo/packs/armory.dm index 4713d94106..11aae8a054 100644 --- a/code/modules/cargo/packs/armory.dm +++ b/code/modules/cargo/packs/armory.dm @@ -87,7 +87,7 @@ /datum/supply_pack/security/armory/mindshield name = "Mindshield Implants Crate" desc = "Prevent against radical thoughts with three Mindshield implants. Requires Armory access to open." - cost = 4000 + cost = 3000 //Lowered untill cargo rework MK II is done contains = list(/obj/item/storage/lockbox/loyalty) crate_name = "mindshield implant crate" @@ -175,7 +175,7 @@ /datum/supply_pack/security/armory/swat name = "SWAT Crate" desc = "Contains two fullbody sets of tough, fireproof, pressurized suits designed in a joint effort by IS-ERI and Nanotrasen. Each set contains a suit, helmet, mask, combat belt, and combat gloves. Requires Armory access to open." - cost = 6750 + cost = 6000 contains = list(/obj/item/clothing/head/helmet/swat/nanotrasen, /obj/item/clothing/head/helmet/swat/nanotrasen, /obj/item/clothing/suit/space/swat, @@ -199,7 +199,7 @@ /datum/supply_pack/security/armory/woodstock name = "Classic WoodStock Shotguns Crate" desc = "Contains three rustic, pumpaction shotguns. Requires Armory access to open." - cost = 3500 + cost = 3000 contains = list(/obj/item/gun/ballistic/shotgun, /obj/item/gun/ballistic/shotgun, /obj/item/gun/ballistic/shotgun) @@ -208,7 +208,7 @@ /datum/supply_pack/security/armory/wt550 name = "WT-550 Semi-Auto Rifle Crate" desc = "Contains two high-powered, semiautomatic rifles chambered in 4.6x30mm. Requires Armory access to open." - cost = 3250 + cost = 2550 contains = list(/obj/item/gun/ballistic/automatic/wt550, /obj/item/gun/ballistic/automatic/wt550) crate_name = "auto rifle crate" @@ -216,7 +216,7 @@ /datum/supply_pack/security/armory/wt550ammo name = "WT-550 Semi-Auto SMG Ammo Crate" desc = "Contains four 20-round magazines for the WT-550 Semi-Auto SMG. Each magazine is designed to facilitate rapid tactical reloads. Requires Armory access to open." - cost = 2750 + cost = 1750 contains = list(/obj/item/ammo_box/magazine/wt550m9, /obj/item/ammo_box/magazine/wt550m9, /obj/item/ammo_box/magazine/wt550m9, @@ -226,7 +226,7 @@ /datum/supply_pack/security/armory/wt550ammo_nonlethal // Takes around 12 shots to stun crit someone name = "WT-550 Semi-Auto SMG Non-Lethal Ammo Crate" desc = "Contains four 20-round magazines for the WT-550 Semi-Auto SMG. Each magazine is designed to facilitate rapid tactical reloads. Requires Armory access to open." - cost = 1200 + cost = 1000 contains = list(/obj/item/ammo_box/magazine/wt550m9/wtrubber, /obj/item/ammo_box/magazine/wt550m9/wtrubber, /obj/item/ammo_box/magazine/wt550m9/wtrubber, @@ -236,7 +236,7 @@ /datum/supply_pack/security/armory/wt550ammo_special name = "WT-550 Semi-Auto SMG Special Ammo Crate" desc = "Contains 2 20-round Armour Piercing and Incendiary magazines for the WT-550 Semi-Auto SMG. Each magazine is designed to facilitate rapid tactical reloads. Requires Armory access to open." - cost = 3500 + cost = 3000 contains = list(/obj/item/ammo_box/magazine/wt550m9/wtap, /obj/item/ammo_box/magazine/wt550m9/wtap, /obj/item/ammo_box/magazine/wt550m9/wtic, diff --git a/code/modules/cargo/packs/emergency.dm b/code/modules/cargo/packs/emergency.dm index be99199f30..1987369d20 100644 --- a/code/modules/cargo/packs/emergency.dm +++ b/code/modules/cargo/packs/emergency.dm @@ -12,7 +12,7 @@ /datum/supply_pack/emergency/vehicle name = "Biker Gang Kit" //TUNNEL SNAKES OWN THIS TOWN desc = "TUNNEL SNAKES OWN THIS TOWN. Contains an unbranded All Terrain Vehicle, and a complete gang outfit -- consists of black gloves, a menacing skull bandanna, and a SWEET leather overcoat!" - cost = 2800 + cost = 2500 contraband = TRUE contains = list(/obj/vehicle/ridden/atv, /obj/item/key, @@ -26,7 +26,7 @@ /datum/supply_pack/emergency/equipment name = "Emergency Bot/Internals Crate" desc = "Explosions got you down? These supplies are guaranteed to patch up holes, in stations and people alike! Comes with two floorbots, two medbots, five oxygen masks and five small oxygen tanks." - cost = 3750 + cost = 2750 contains = list(/mob/living/simple_animal/bot/floorbot, /mob/living/simple_animal/bot/floorbot, /mob/living/simple_animal/bot/medbot, @@ -132,7 +132,7 @@ /datum/supply_pack/emergency/metalfoam name = "Metal Foam Grenade Crate" desc = "Seal up those pesky hull breaches with 14 Metal Foam Grenades." - cost = 2000 + cost = 1500 contains = list(/obj/item/storage/box/metalfoam, /obj/item/storage/box/metalfoam) crate_name = "metal foam grenade crate" diff --git a/code/modules/cargo/packs/engineering.dm b/code/modules/cargo/packs/engineering.dm index 3d46b776c4..19cb53489e 100644 --- a/code/modules/cargo/packs/engineering.dm +++ b/code/modules/cargo/packs/engineering.dm @@ -55,7 +55,7 @@ /datum/supply_pack/engineering/engihardsuit name = "Engineering Hardsuit" desc = "Poly 'Who stole all the hardsuits!' Well now you can get more hardsuits if needed! NOTE ONE HARDSUIT IS IN THIS CRATE, as well as one air tank and mask!" - cost = 2750 + cost = 2250 contains = list(/obj/item/tank/internals/air, /obj/item/clothing/mask/gas, /obj/item/clothing/suit/space/hardsuit/engine) @@ -84,7 +84,7 @@ /datum/supply_pack/engineering/powergamermitts name = "Insulated Gloves Crate" desc = "The backbone of modern society. Barely ever ordered for actual engineering. Contains three insulated gloves." - cost = 2750 //Made of pure-grade bullshittinium + cost = 2300 //Made of pure-grade bullshittinium contains = list(/obj/item/clothing/gloves/color/yellow, /obj/item/clothing/gloves/color/yellow, /obj/item/clothing/gloves/color/yellow) @@ -121,6 +121,18 @@ crate_name = "power cell crate" crate_type = /obj/structure/closet/crate/engineering/electrical + +/datum/supply_pack/engineering/siezedpower + name = "Siezed Power Cell Crate" + desc = "We took the means of power! Contains three high-voltage plus power cells." + cost = 1300 + contraband = TRUE + contains = list(/obj/item/stock_parts/cell/high/plus, + /obj/item/stock_parts/cell/high/plus, + /obj/item/stock_parts/cell/high/plus) + crate_name = "siezed crate" + crate_type = /obj/structure/closet/crate/engineering/electrical + /datum/supply_pack/engineering/shuttle_engine name = "Shuttle Engine Crate" desc = "Through advanced bluespace-shenanigans, our engineers have managed to fit an entire shuttle engine into one tiny little crate. Requires CE access to open." @@ -129,7 +141,22 @@ contains = list(/obj/structure/shuttle/engine/propulsion/burst/cargo) crate_name = "shuttle engine crate" crate_type = /obj/structure/closet/crate/secure/engineering - special = TRUE + +/datum/supply_pack/engineering/siezedproduction + name = "The Means of Production" + desc = "We will win for we have took over the production! S five metal sheets, five wire, three matter bins, one manipulater and one sheet of glass." + cost = 1500 + contraband = TRUE + contains = list(/obj/item/stock_parts/cell/high/plus, + /obj/item/circuitboard/machine/autolathe, + /obj/item/stack/cable_coil/random/five, + /obj/item/stack/sheet/metal/five, + /obj/item/stock_parts/matter_bin, + /obj/item/stock_parts/matter_bin, + /obj/item/stock_parts/matter_bin, + /obj/item/stock_parts/manipulator, + /obj/item/stack/sheet/glass,) + crate_name = "siezed crate" /datum/supply_pack/engineering/tools name = "Toolbox Crate" @@ -183,7 +210,6 @@ ) crate_name= "dna samplers crate" - /datum/supply_pack/engineering/shield_sat name = "Shield Generator Satellite" desc = "Protect the very existence of this station with these Anti-Meteor defenses. Contains three Shield Generator Satellites." diff --git a/code/modules/cargo/packs/misc.dm b/code/modules/cargo/packs/misc.dm index 56ddd92a76..c380d5411e 100644 --- a/code/modules/cargo/packs/misc.dm +++ b/code/modules/cargo/packs/misc.dm @@ -117,8 +117,8 @@ /datum/supply_pack/misc/paper_work name = "Freelance Paper work" - desc = "The Nanotrasen Primary Bureaucratic Database Intelligence (PDBI) reports that the station has not completed its funding and grant paperwork this solar cycle. In order to gain further funding, your station is required to fill out (10) ten of these forms or no additional capital will be disbursed. We have sent you ten copies of the following form and we expect every one to be up to Nanotrasen Standards." // Disbursement. It's not a typo, look it up. - cost = 700 // Net of 0 credits + desc = "The Nanotrasen Primary Bureaucratic Database Intelligence (PDBI) reports that the station has not completed its funding and grant paperwork this solar cycle. In order to gain further funding, your station is required to fill out (20) ten of these forms or no additional capital will be disbursed. We have sent you ten copies of the following form and we expect every one to be up to Nanotrasen Standards." // Disbursement. It's not a typo, look it up. + cost = 700 // Net of 0 credits but makes (120 x 20 = 2400) contains = list(/obj/item/folder/paperwork, /obj/item/folder/paperwork, /obj/item/folder/paperwork, @@ -129,11 +129,18 @@ /obj/item/folder/paperwork, /obj/item/folder/paperwork, /obj/item/folder/paperwork, - /obj/item/pen/fountain, - /obj/item/pen/fountain, - /obj/item/pen/fountain, - /obj/item/pen/fountain, - /obj/item/pen/fountain) + /obj/item/folder/paperwork, + /obj/item/folder/paperwork, + /obj/item/folder/paperwork, + /obj/item/folder/paperwork, + /obj/item/folder/paperwork, + /obj/item/folder/paperwork, + /obj/item/folder/paperwork, + /obj/item/folder/paperwork, + /obj/item/folder/paperwork, + /obj/item/folder/paperwork, + /obj/item/pen/fountain + ) crate_name = "Paperwork" /datum/supply_pack/misc/funeral @@ -149,7 +156,7 @@ /datum/supply_pack/misc/jukebox name = "Jukebox" - cost = 15000 + cost = 10000 contains = list(/obj/machinery/jukebox) crate_name = "Jukebox" diff --git a/code/modules/cargo/packs/service.dm b/code/modules/cargo/packs/service.dm index c7f98cac0b..14bde519e1 100644 --- a/code/modules/cargo/packs/service.dm +++ b/code/modules/cargo/packs/service.dm @@ -36,7 +36,7 @@ /datum/supply_pack/service/carpet_exotic name = "Exotic Carpet Crate" desc = "Exotic carpets straight from Space Russia, for all your decorating needs. Contains 100 tiles each of 10 different flooring patterns." - cost = 10000 + cost = 7000 contains = list(/obj/item/stack/tile/carpet/blue/fifty, /obj/item/stack/tile/carpet/blue/fifty, /obj/item/stack/tile/carpet/cyan/fifty, diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 33a83487fc..8b2a34a089 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 20a8c518f4..1793bd8f4b 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -123,7 +123,7 @@ ..() if(damaged_clothes) to_chat(user, "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/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index 4928de288f..f140fb3074 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -104,7 +104,7 @@ resistance_flags = ACID_PROOF armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100) -/obj/item/clothing/glasses/science/item_action_slot_check(slot) +/obj/item/clothing/glasses/science/item_action_slot_check(slot, mob/user, datum/action/A) if(slot == SLOT_GLASSES) return 1 @@ -307,7 +307,7 @@ M.appearance_flags |= RESET_COLOR M.color = "#[H.eye_color]" . += M - + /obj/item/clothing/glasses/sunglasses/big desc = "Strangely ancient technology used to help provide rudimentary eye cover. Larger than average enhanced shielding blocks flashes." icon_state = "bigsunglasses" diff --git a/code/modules/clothing/gloves/_gloves.dm b/code/modules/clothing/gloves/_gloves.dm index 9d75fc6ce4..6b674c8595 100644 --- a/code/modules/clothing/gloves/_gloves.dm +++ b/code/modules/clothing/gloves/_gloves.dm @@ -14,7 +14,7 @@ /obj/item/clothing/gloves/ComponentInitialize() . = ..() - AddComponent(/datum/component/redirect, list(COMSIG_COMPONENT_CLEAN_ACT = CALLBACK(src, /obj/item/clothing/gloves/clean_blood))) + RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, /obj/item/clothing/gloves/clean_blood) /obj/item/clothing/gloves/clean_blood(datum/source, strength) . = ..() diff --git a/code/modules/clothing/head/_head.dm b/code/modules/clothing/head/_head.dm index ccc167dcbc..358942627d 100644 --- a/code/modules/clothing/head/_head.dm +++ b/code/modules/clothing/head/_head.dm @@ -41,6 +41,49 @@ H.update_inv_head() +///Special throw_impact for hats to frisbee hats at people to place them on their heads/attempt to de-hat them. +/obj/item/clothing/head/throw_impact(atom/hit_atom, datum/thrownthing/thrownthing) + . = ..() + ///if the thrown object's target zone isn't the head + if(thrownthing.target_zone != BODY_ZONE_HEAD) + return + ///ignore any hats with the tinfoil counter-measure enabled + if(clothing_flags & ANTI_TINFOIL_MANEUVER) + return + ///if the hat happens to be capable of holding contents and has something in it. mostly to prevent super cheesy stuff like stuffing a mini-bomb in a hat and throwing it + if(LAZYLEN(contents)) + return + if(iscarbon(hit_atom)) + var/mob/living/carbon/H = hit_atom + if(istype(H.head, /obj/item)) + var/obj/item/WH = H.head + ///check if the item has NODROP + if(HAS_TRAIT(WH, TRAIT_NODROP)) + H.visible_message("[src] bounces off [H]'s [WH.name]!", "[src] bounces off your [WH.name], falling to the floor.") + return + ///check if the item is an actual clothing head item, since some non-clothing items can be worn + if(istype(WH, /obj/item/clothing/head)) + var/obj/item/clothing/head/WHH = WH + ///SNUG_FIT hats are immune to being knocked off + if(WHH.clothing_flags & SNUG_FIT) + H.visible_message("[src] bounces off [H]'s [WHH.name]!", "[src] bounces off your [WHH.name], falling to the floor.") + return + ///if the hat manages to knock something off + if(H.dropItemToGround(WH)) + H.visible_message("[src] knocks [WH] off [H]'s head!", "[WH] is suddenly knocked off your head by [src]!") + if(H.equip_to_slot_if_possible(src, SLOT_HEAD, FALSE, TRUE)) + H.visible_message("[src] lands neatly on [H]'s head!", "[src] lands perfectly onto your head!") + return + if(iscyborg(hit_atom)) + var/mob/living/silicon/robot/R = hit_atom + ///hats in the borg's blacklist bounce off + if(!is_type_in_typecache(src, R.equippable_hats) || R.hat_offset == INFINITY) + R.visible_message("[src] bounces off [R]!", "[src] bounces off you, falling to the floor.") + return + else + R.visible_message("[src] lands neatly on top of [R].", "[src] lands perfectly on top of you.") + R.place_on_head(src) //hats aren't designed to snugly fit borg heads or w/e so they'll always manage to knock eachother off + /obj/item/clothing/head/worn_overlays(isinhands = FALSE) . = list() if(!isinhands) diff --git a/code/modules/clothing/head/collectable.dm b/code/modules/clothing/head/collectable.dm index 90c0690534..5457d32e8a 100644 --- a/code/modules/clothing/head/collectable.dm +++ b/code/modules/clothing/head/collectable.dm @@ -13,12 +13,14 @@ /obj/item/clothing/head/collectable/slime name = "collectable slime cap!" desc = "It just latches right in place!" + clothing_flags = SNUG_FIT icon_state = "slime" dynamic_hair_suffix = "" /obj/item/clothing/head/collectable/xenom name = "collectable xenomorph helmet!" desc = "Hiss hiss hiss!" + clothing_flags = SNUG_FIT icon_state = "xenom" /obj/item/clothing/head/collectable/chef @@ -71,13 +73,14 @@ desc = "A collectable welding helmet. Now with 80% less lead! Not for actual welding. Any welding done while wearing this helmet is done so at the owner's own risk!" icon_state = "welding" item_state = "welding" - resistance_flags = NONE + clothing_flags = SNUG_FIT /obj/item/clothing/head/collectable/slime name = "collectable slime hat" desc = "Just like a real brain slug!" icon_state = "headslime" item_state = "headslime" + clothing_flags = SNUG_FIT /obj/item/clothing/head/collectable/flatcap name = "collectable flat cap" @@ -121,6 +124,7 @@ /obj/item/clothing/head/collectable/hardhat name = "collectable hard hat" desc = "WARNING! Offers no real protection, or luminosity, but damn, is it fancy!" + clothing_flags = SNUG_FIT icon_state = "hardhat0_yellow" item_state = "hardhat0_yellow" @@ -143,7 +147,7 @@ desc = "Go Red! I mean Green! I mean Red! No Green!" icon_state = "thunderdome" item_state = "thunderdome" - resistance_flags = NONE + clothing_flags = SNUG_FIT flags_inv = HIDEHAIR /obj/item/clothing/head/collectable/swat @@ -151,5 +155,5 @@ desc = "That's not real blood. That's red paint." //Reference to the actual description icon_state = "swat" item_state = "swat" - resistance_flags = NONE + clothing_flags = SNUG_FIT flags_inv = HIDEHAIR diff --git a/code/modules/clothing/head/hardhat.dm b/code/modules/clothing/head/hardhat.dm index 9d38b73cd3..54f0ebea45 100644 --- a/code/modules/clothing/head/hardhat.dm +++ b/code/modules/clothing/head/hardhat.dm @@ -11,6 +11,7 @@ armor = list("melee" = 15, "bullet" = 5, "laser" = 20,"energy" = 10, "bomb" = 20, "bio" = 10, "rad" = 20, "fire" = 100, "acid" = 50) flags_inv = 0 actions_types = list(/datum/action/item_action/toggle_helmet_light) + clothing_flags = SNUG_FIT resistance_flags = FIRE_PROOF dynamic_hair_suffix = "+generic" diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index be6e270e45..8a1cc01bd5 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -10,7 +10,7 @@ heat_protection = HEAD max_heat_protection_temperature = HELMET_MAX_TEMP_PROTECT strip_delay = 60 - resistance_flags = NONE + clothing_flags = SNUG_FIT flags_cover = HEADCOVERSEYES flags_inv = HIDEHAIR diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm index 041f0ba012..cac98e74fc 100644 --- a/code/modules/clothing/head/misc.dm +++ b/code/modules/clothing/head/misc.dm @@ -67,12 +67,14 @@ desc = "A plastic replica of a Syndicate agent's space helmet. You'll look just like a real murderous Syndicate agent in this! This is a toy, it is not made for use in space!" flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT mutantrace_variation = MUTANTRACE_VARIATION + clothing_flags = SNUG_FIT /obj/item/clothing/head/cueball name = "cueball helmet" desc = "A large, featureless white orb meant to be worn on your head. How do you even see out of this thing?" icon_state = "cueball" item_state="cueball" + clothing_flags = SNUG_FIT flags_cover = HEADCOVERSEYES|HEADCOVERSMOUTH flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT @@ -81,6 +83,7 @@ desc = "A ball of white styrofoam. So festive." icon_state = "snowman_h" item_state = "snowman_h" + clothing_flags = SNUG_FIT flags_cover = HEADCOVERSEYES flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT @@ -90,6 +93,7 @@ icon_state = "justicered" item_state = "justicered" flags_inv = HIDEHAIR|HIDEEARS|HIDEEYES|HIDEFACE|HIDEFACIALHAIR|HIDESNOUT + clothing_flags = SNUG_FIT flags_cover = HEADCOVERSEYES /obj/item/clothing/head/justice/blue @@ -161,6 +165,7 @@ icon_state = "chickenhead" item_state = "chickensuit" flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT + clothing_flags = SNUG_FIT /obj/item/clothing/head/griffin name = "griffon head" @@ -168,6 +173,7 @@ icon_state = "griffinhat" item_state = "griffinhat" flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT + clothing_flags = SNUG_FIT /obj/item/clothing/head/bearpelt name = "bear pelt hat" @@ -181,6 +187,7 @@ item_state = "xenos_helm" desc = "A helmet made out of chitinous alien hide." flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT + clothing_flags = SNUG_FIT /obj/item/clothing/head/fedora name = "fedora" @@ -302,6 +309,7 @@ desc = "When everything's going to crab, protecting your head is the best choice." icon_state = "lobster_hat" flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT + clothing_flags = SNUG_FIT /obj/item/clothing/head/drfreezehat name = "doctor freeze's wig" diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 535ab46e95..0dea8bfe79 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -29,6 +29,7 @@ visor_flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH resistance_flags = FIRE_PROOF mutantrace_variation = MUTANTRACE_VARIATION + clothing_flags = SNUG_FIT /obj/item/clothing/head/welding/attack_self(mob/user) weldingvisortoggle(user) @@ -115,6 +116,7 @@ item_state = "hardhat0_pumpkin" item_color = "pumpkin" flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT + clothing_flags = SNUG_FIT armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) brightness_on = 2 //luminosity when on flags_cover = HEADCOVERSEYES @@ -163,6 +165,7 @@ desc = "A helmet made out of a box." icon_state = "cardborg_h" item_state = "cardborg_h" + clothing_flags = SNUG_FIT flags_cover = HEADCOVERSEYES flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT @@ -227,6 +230,7 @@ desc = "A crude helmet made out of bronze plates. It offers very little in the way of protection." icon = 'icons/obj/clothing/clockwork_garb.dmi' icon_state = "clockwork_helmet_old" + clothing_flags = SNUG_FIT flags_inv = HIDEEARS|HIDEHAIR armor = list("melee" = 5, "bullet" = 0, "laser" = -5, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 20, "acid" = 20) @@ -239,6 +243,7 @@ equip_delay_other = 140 var/datum/brain_trauma/mild/phobia/paranoia var/warped = FALSE + clothing_flags = ANTI_TINFOIL_MANEUVER /obj/item/clothing/head/foilhat/Initialize(mapload) . = ..() diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index 488f59bb88..37ab2b2bf4 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -23,7 +23,7 @@ /obj/item/clothing/shoes/ComponentInitialize() . = ..() - AddComponent(/datum/component/redirect, list(COMSIG_COMPONENT_CLEAN_ACT = CALLBACK(src, /obj/item/clothing/shoes/clean_blood))) + RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, /obj/item/clothing/shoes/clean_blood) /obj/item/clothing/shoes/suicide_act(mob/living/carbon/user) if(rand(2)>1) diff --git a/code/modules/clothing/shoes/bananashoes.dm b/code/modules/clothing/shoes/bananashoes.dm index b634894805..d13e655d43 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 @@ to_chat(user, "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/spacesuits/_spacesuits.dm b/code/modules/clothing/spacesuits/_spacesuits.dm index 57866b5131..117fbc49e0 100644 --- a/code/modules/clothing/spacesuits/_spacesuits.dm +++ b/code/modules/clothing/spacesuits/_spacesuits.dm @@ -4,7 +4,7 @@ name = "space helmet" icon_state = "spaceold" desc = "A special helmet with solar UV shielding to protect your eyes from harmful rays." - clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL | BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS + clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL | BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS | SNUG_FIT item_state = "spaceold" permeability_coefficient = 0.01 armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 50, "fire" = 80, "acid" = 70) diff --git a/code/modules/clothing/spacesuits/flightsuit.dm b/code/modules/clothing/spacesuits/flightsuit.dm index b105b72234..7ead462b1e 100644 --- a/code/modules/clothing/spacesuits/flightsuit.dm +++ b/code/modules/clothing/spacesuits/flightsuit.dm @@ -547,7 +547,7 @@ changeWearer() ..() -/obj/item/flightpack/item_action_slot_check(slot) +/obj/item/flightpack/item_action_slot_check(slot, mob/user, datum/action/A) if(slot == ITEM_SLOT_BACK) return TRUE @@ -574,7 +574,7 @@ momentum_speed_y = 0 momentum_speed = max(momentum_speed_x, momentum_speed_y) -/obj/item/flightpack/item_action_slot_check(slot) +/obj/item/flightpack/item_action_slot_check(slot, mob/user, datum/action/A) return slot == SLOT_BACK /obj/item/flightpack/proc/enable_stabilizers() @@ -730,7 +730,7 @@ if(!active) clothing_flags &= ~NOSLIP -/obj/item/clothing/shoes/flightshoes/item_action_slot_check(slot) +/obj/item/clothing/shoes/flightshoes/item_action_slot_check(slot, mob/user, datum/action/A) return slot == SLOT_SHOES /obj/item/clothing/shoes/flightshoes/proc/delink_suit() diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 1b97a8e1f6..01a1f46a3f 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -5,6 +5,7 @@ icon_state = "hardsuit0-engineering" item_state = "eng_helm" max_integrity = 300 + clothing_flags = SNUG_FIT armor = list("melee" = 10, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 10, "bio" = 100, "rad" = 75, "fire" = 50, "acid" = 75) var/basestate = "hardsuit" var/brightness_on = 4 //luminosity when on @@ -47,7 +48,7 @@ suit.RemoveHelmet() soundloop.stop(user) -/obj/item/clothing/head/helmet/space/hardsuit/item_action_slot_check(slot) +/obj/item/clothing/head/helmet/space/hardsuit/item_action_slot_check(slot, mob/user, datum/action/A) if(slot == SLOT_HEAD) return 1 @@ -158,7 +159,7 @@ var/datum/action/A = X A.Remove(user) -/obj/item/clothing/suit/space/hardsuit/item_action_slot_check(slot) +/obj/item/clothing/suit/space/hardsuit/item_action_slot_check(slot, mob/user, datum/action/A) if(slot == SLOT_WEAR_SUIT) //we only give the mob the ability to toggle the helmet if he's wearing the hardsuit. return 1 @@ -605,7 +606,6 @@ armor = list("melee" = 30, "bullet" = 5, "laser" = 5, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 75) item_color = "ancient" resistance_flags = FIRE_PROOF - var/datum/component/mobhook /obj/item/clothing/suit/space/hardsuit/ancient name = "prototype RIG hardsuit" @@ -617,7 +617,7 @@ helmettype = /obj/item/clothing/head/helmet/space/hardsuit/ancient resistance_flags = FIRE_PROOF var/footstep = 1 - var/datum/component/mobhook + var/mob/listeningTo /obj/item/clothing/suit/space/hardsuit/ancient/mason name = "M.A.S.O.N RIG" @@ -674,20 +674,24 @@ /obj/item/clothing/suit/space/hardsuit/ancient/equipped(mob/user, slot) . = ..() - if (slot == SLOT_WEAR_SUIT) - if (mobhook && mobhook.parent != user) - QDEL_NULL(mobhook) - if (!mobhook) - mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/on_mob_move))) - else - QDEL_NULL(mobhook) + if(slot != SLOT_WEAR_SUIT) + if(listeningTo) + UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED) + return + if(listeningTo == user) + return + if(listeningTo) + UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED) + RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/on_mob_move) + listeningTo = user /obj/item/clothing/suit/space/hardsuit/ancient/dropped() . = ..() - QDEL_NULL(mobhook) + if(listeningTo) + UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED) /obj/item/clothing/suit/space/hardsuit/ancient/Destroy() - QDEL_NULL(mobhook) // mobhook is not our component + listeningTo = null return ..() /////////////SHIELDED////////////////////////////////// @@ -864,3 +868,133 @@ strip_delay = 130 max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT actions_types = list() + +/* + CYDONIAN ARMOR THAT IS RGB AND STUFF WOOOOOOOOOO +*/ + +/obj/item/clothing/head/helmet/space/hardsuit/lavaknight + name = "cydonian helmet" + desc = "A helmet designed with both form and function in mind, it protects the user against physical trauma and hazardous conditions while also having polychromic light strips." + icon_state = "knight_cydonia" + item_state = "knight_yellow" + item_color = null + max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT + resistance_flags = FIRE_PROOF | LAVA_PROOF + heat_protection = HEAD + armor = list(melee = 50, bullet = 10, laser = 10, energy = 10, bomb = 50, bio = 100, rad = 50, fire = 100, acid = 100) + brightness_on = 7 + allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator) + var/energy_color = "#35FFF0" + var/obj/item/clothing/suit/space/hardsuit/lavaknight/linkedsuit = null + mutantrace_variation = NO_MUTANTRACE_VARIATION + +/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/Initialize() + . = ..() + if(istype(loc, /obj/item/clothing/suit/space/hardsuit/lavaknight)) + var/obj/item/clothing/suit/space/hardsuit/lavaknight/S = loc + energy_color = S.energy_color + update_icon() + +/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/attack_self(mob/user) + on = !on + + if(on) + set_light(brightness_on) + else + set_light(0) + for(var/X in actions) + var/datum/action/A = X + A.UpdateButtonIcon() + +/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/update_icon() + var/mutable_appearance/helm_overlay = mutable_appearance(icon, "knight_cydonia_overlay") + + if(energy_color) + helm_overlay.color = energy_color + + cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other + + add_overlay(helm_overlay) + +/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/worn_overlays(isinhands = FALSE, icon_file) + . = ..() + if(!isinhands) + var/mutable_appearance/energy_overlay = mutable_appearance(icon_file, "knight_cydonia_overlay", ABOVE_LIGHTING_LAYER) + energy_overlay.plane = ABOVE_LIGHTING_LAYER + energy_overlay.color = energy_color + . += energy_overlay + +/obj/item/clothing/suit/space/hardsuit/lavaknight + icon_state = "knight_cydonia" + name = "cydonian armor" + desc = "A suit designed with both form and function in mind, it protects the user against physical trauma and hazardous conditions while also having polychromic light strips." + item_state = "swat_suit" + max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT + resistance_flags = FIRE_PROOF | LAVA_PROOF + armor = list(melee = 50, bullet = 10, laser = 10, energy = 10, bomb = 50, bio = 100, rad = 50, fire = 100, acid = 100) + allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/storage/bag/ore, /obj/item/pickaxe) + helmettype = /obj/item/clothing/head/helmet/space/hardsuit/lavaknight + heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS + tauric = TRUE //Citadel Add for tauric hardsuits + + var/energy_color = "#35FFF0" + +/obj/item/clothing/suit/space/hardsuit/lavaknight/Initialize() + ..() + light_color = energy_color + set_light(1) + update_icon() + +/obj/item/clothing/suit/space/hardsuit/lavaknight/update_icon() + var/mutable_appearance/suit_overlay = mutable_appearance(icon, "knight_cydonia_overlay") + + if(energy_color) + suit_overlay.color = energy_color + + cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other + + add_overlay(suit_overlay) + +/obj/item/clothing/suit/space/hardsuit/lavaknight/worn_overlays(isinhands = FALSE, icon_file) + . = ..() + if(!isinhands) + var/mutable_appearance/energy_overlay + if(taurmode == SNEK_TAURIC) + energy_overlay = mutable_appearance('modular_citadel/icons/mob/taur_naga.dmi', "knight_cydonia_overlay", ABOVE_LIGHTING_LAYER) + else if(taurmode == PAW_TAURIC) + energy_overlay = mutable_appearance('modular_citadel/icons/mob/taur_canine.dmi', "knight_cydonia_overlay", ABOVE_LIGHTING_LAYER) + else + energy_overlay = mutable_appearance(icon_file, "knight_cydonia_overlay", ABOVE_LIGHTING_LAYER) + + energy_overlay.plane = ABOVE_LIGHTING_LAYER + energy_overlay.color = energy_color + . += energy_overlay + +/obj/item/clothing/suit/space/hardsuit/lavaknight/AltClick(mob/living/user) + if(user.incapacitated() || !istype(user)) + to_chat(user, "You can't do that right now!") + return + if(!in_range(src, user)) + return + if(user.incapacitated() || !istype(user) || !in_range(src, user)) + return + + if(alert("Are you sure you want to recolor your armor stripes?", "Confirm Repaint", "Yes", "No") == "Yes") + var/energy_color_input = input(usr,"","Choose Energy Color",energy_color) as color|null + if(energy_color_input) + energy_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1) + user.update_inv_wear_suit() + if(helmet) + var/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/H = helmet + H.energy_color = energy_color + user.update_inv_head() + H.update_icon() + update_icon() + user.update_inv_wear_suit() + light_color = energy_color + update_light() + +/obj/item/clothing/suit/space/hardsuit/lavaknight/examine(mob/user) + ..() + to_chat(user, "Alt-click to recolor it.") diff --git a/code/modules/clothing/suits/_suits.dm b/code/modules/clothing/suits/_suits.dm index 6e469faaa4..932c08ed74 100644 --- a/code/modules/clothing/suits/_suits.dm +++ b/code/modules/clothing/suits/_suits.dm @@ -1,74 +1,74 @@ -/obj/item/clothing/suit - icon = 'icons/obj/clothing/suits.dmi' - name = "suit" - var/fire_resist = T0C+100 - allowed = list(/obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman) - armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) - slot_flags = ITEM_SLOT_OCLOTHING - body_parts_covered = CHEST - var/blood_overlay_type = "suit" - var/togglename = null - var/suittoggled = FALSE - - var/adjusted = NORMAL_STYLE - mutantrace_variation = MUTANTRACE_VARIATION - var/tauric = FALSE //Citadel Add for tauric hardsuits - var/taurmode = NOT_TAURIC - var/dimension_x = 32 - var/dimension_y = 32 - var/center = FALSE //Should we center the sprite? - -/obj/item/clothing/suit/equipped(mob/user, slot) - ..() - if(ishuman(user)) - var/mob/living/carbon/human/H = user - - if(mutantrace_variation) - if(DIGITIGRADE in H.dna.species.species_traits) - adjusted = ALT_STYLE - H.update_inv_wear_suit() - else if(adjusted == ALT_STYLE) - adjusted = NORMAL_STYLE - - if(("taur" in H.dna.species.mutant_bodyparts) && (H.dna.features["taur"] != "None")) - if(H.dna.features["taur"] in GLOB.noodle_taurs) - taurmode = SNEK_TAURIC - if(tauric == TRUE) - center = TRUE - dimension_x = 64 - else if(H.dna.features["taur"] in GLOB.paw_taurs) - taurmode = PAW_TAURIC - if(tauric == TRUE) - center = TRUE - dimension_x = 64 - else - taurmode = NOT_TAURIC - if(tauric == TRUE) - center = FALSE - dimension_x = 32 - H.update_inv_wear_suit() - - -/obj/item/clothing/suit/worn_overlays(isinhands = FALSE) - . = list() - if(!isinhands) - if(damaged_clothes) - . += mutable_appearance('icons/effects/item_damage.dmi', "damaged[blood_overlay_type]") - if(blood_DNA) - if(tauric) - . += mutable_appearance('modular_citadel/icons/mob/64x32_effects.dmi', "[blood_overlay_type]blood", color = blood_DNA_to_color()) - else - . += mutable_appearance('icons/effects/blood.dmi', "[blood_overlay_type]blood", color = blood_DNA_to_color()) - var/mob/living/carbon/human/M = loc - if(ishuman(M) && M.w_uniform) - var/obj/item/clothing/under/U = M.w_uniform - if(istype(U) && U.attached_accessory) - var/obj/item/clothing/accessory/A = U.attached_accessory - if(A.above_suit) - . += U.accessory_overlay - -/obj/item/clothing/suit/update_clothes_damaged_state(damaging = TRUE) - ..() - if(ismob(loc)) - var/mob/M = loc - M.update_inv_wear_suit() +/obj/item/clothing/suit + icon = 'icons/obj/clothing/suits.dmi' + name = "suit" + var/fire_resist = T0C+100 + allowed = list(/obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) + slot_flags = ITEM_SLOT_OCLOTHING + body_parts_covered = CHEST + var/blood_overlay_type = "suit" + var/togglename = null + var/suittoggled = FALSE + + var/adjusted = NORMAL_STYLE + mutantrace_variation = MUTANTRACE_VARIATION + var/tauric = FALSE //Citadel Add for tauric hardsuits + var/taurmode = NOT_TAURIC + var/dimension_x = 32 + var/dimension_y = 32 + var/center = FALSE //Should we center the sprite? + +/obj/item/clothing/suit/equipped(mob/user, slot) + ..() + if(ishuman(user)) + var/mob/living/carbon/human/H = user + + if(mutantrace_variation) + if(DIGITIGRADE in H.dna.species.species_traits) + adjusted = ALT_STYLE + H.update_inv_wear_suit() + else if(adjusted == ALT_STYLE) + adjusted = NORMAL_STYLE + + if(("taur" in H.dna.species.mutant_bodyparts) && (H.dna.features["taur"] != "None")) + if(H.dna.features["taur"] in GLOB.noodle_taurs) + taurmode = SNEK_TAURIC + if(tauric == TRUE) + center = TRUE + dimension_x = 64 + else if(H.dna.features["taur"] in GLOB.paw_taurs) + taurmode = PAW_TAURIC + if(tauric == TRUE) + center = TRUE + dimension_x = 64 + else + taurmode = NOT_TAURIC + if(tauric == TRUE) + center = FALSE + dimension_x = 32 + H.update_inv_wear_suit() + + +/obj/item/clothing/suit/worn_overlays(isinhands = FALSE) + . = list() + if(!isinhands) + if(damaged_clothes) + . += mutable_appearance('icons/effects/item_damage.dmi', "damaged[blood_overlay_type]") + if(blood_DNA) + if(tauric) + . += mutable_appearance('modular_citadel/icons/mob/64x32_effects.dmi', "[blood_overlay_type]blood", color = blood_DNA_to_color()) + else + . += mutable_appearance('icons/effects/blood.dmi', "[blood_overlay_type]blood", color = blood_DNA_to_color()) + var/mob/living/carbon/human/M = loc + if(ishuman(M) && M.w_uniform) + var/obj/item/clothing/under/U = M.w_uniform + if(istype(U) && U.attached_accessory) + var/obj/item/clothing/accessory/A = U.attached_accessory + if(A.above_suit) + . += U.accessory_overlay + +/obj/item/clothing/suit/update_clothes_damaged_state(damaging = TRUE) + ..() + if(ismob(loc)) + var/mob/M = loc + M.update_inv_wear_suit() diff --git a/code/modules/clothing/suits/bio.dm b/code/modules/clothing/suits/bio.dm index 5d0a9b9914..369ddba7b9 100644 --- a/code/modules/clothing/suits/bio.dm +++ b/code/modules/clothing/suits/bio.dm @@ -4,7 +4,7 @@ icon_state = "bio" desc = "A hood that protects the head and face from biological contaminants." permeability_coefficient = 0.01 - clothing_flags = THICKMATERIAL | BLOCK_GAS_SMOKE_EFFECT + clothing_flags = THICKMATERIAL | BLOCK_GAS_SMOKE_EFFECT | SNUG_FIT armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 60, "fire" = 30, "acid" = 100) flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR|HIDEFACE|HIDESNOUT resistance_flags = ACID_PROOF diff --git a/code/modules/clothing/suits/cloaks.dm b/code/modules/clothing/suits/cloaks.dm index b8287c7f4c..be81374868 100644 --- a/code/modules/clothing/suits/cloaks.dm +++ b/code/modules/clothing/suits/cloaks.dm @@ -69,6 +69,7 @@ icon_state = "golhood" desc = "A protective & concealing hood." armor = list("melee" = 35, "bullet" = 10, "laser" = 25, "energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 60) + clothing_flags = SNUG_FIT flags_inv = HIDEEARS|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR /obj/item/clothing/suit/hooded/cloak/drake @@ -88,6 +89,7 @@ icon_state = "dragon" desc = "The skull of a dragon." armor = list("melee" = 70, "bullet" = 30, "laser" = 50, "energy" = 40, "bomb" = 70, "bio" = 60, "rad" = 50, "fire" = 100, "acid" = 100) + clothing_flags = SNUG_FIT heat_protection = HEAD max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT resistance_flags = FIRE_PROOF | ACID_PROOF diff --git a/code/modules/clothing/suits/toggles.dm b/code/modules/clothing/suits/toggles.dm index 5d534e00a7..cc983dbb0f 100644 --- a/code/modules/clothing/suits/toggles.dm +++ b/code/modules/clothing/suits/toggles.dm @@ -23,7 +23,7 @@ /obj/item/clothing/suit/hooded/ui_action_click() ToggleHood() -/obj/item/clothing/suit/hooded/item_action_slot_check(slot, mob/user) +/obj/item/clothing/suit/hooded/item_action_slot_check(slot, mob/user, datum/action/A) if(slot == SLOT_WEAR_SUIT || slot == SLOT_NECK) return 1 diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index fbdca6ddbc..b98d8207d9 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -58,7 +58,7 @@ name = "bomb hood" desc = "Use in case of bomb." icon_state = "bombsuit" - clothing_flags = THICKMATERIAL + clothing_flags = THICKMATERIAL | SNUG_FIT armor = list("melee" = 20, "bullet" = 0, "laser" = 20,"energy" = 10, "bomb" = 100, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 50) flags_inv = HIDEFACE|HIDEMASK|HIDEEARS|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT dynamic_hair_suffix = "" @@ -123,7 +123,7 @@ name = "radiation hood" icon_state = "rad" desc = "A hood with radiation protective properties. The label reads, 'Made with lead. Please do not consume insulation.'" - clothing_flags = THICKMATERIAL + clothing_flags = THICKMATERIAL|SNUG_FIT flags_inv = HIDEMASK|HIDEEARS|HIDEFACE|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 60, "rad" = 100, "fire" = 30, "acid" = 30) strip_delay = 60 diff --git a/code/modules/clothing/suits/wiz_robe.dm b/code/modules/clothing/suits/wiz_robe.dm index 9d1a47f231..93eb8181c7 100644 --- a/code/modules/clothing/suits/wiz_robe.dm +++ b/code/modules/clothing/suits/wiz_robe.dm @@ -7,6 +7,7 @@ armor = list("melee" = 30, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 20, "bio" = 20, "rad" = 20, "fire" = 100, "acid" = 100) strip_delay = 50 equip_delay_other = 50 + clothing_flags = SNUG_FIT resistance_flags = FIRE_PROOF | ACID_PROOF dog_fashion = /datum/dog_fashion/head/blue_wizard diff --git a/code/modules/clothing/under/accessories.dm b/code/modules/clothing/under/accessories.dm index 6dd6164d79..706f7edb0a 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/blob.dm b/code/modules/events/blob.dm index c17918d733..43fb264002 100644 --- a/code/modules/events/blob.dm +++ b/code/modules/events/blob.dm @@ -4,6 +4,7 @@ weight = 10 max_occurrences = 1 + earliest_start = 60 MINUTES min_players = 40 gamemode_blacklist = list("blob") //Just in case a blob survives that long diff --git a/code/modules/events/wizard/magicarp.dm b/code/modules/events/wizard/magicarp.dm index ab23c30e00..57e2a2a051 100644 --- a/code/modules/events/wizard/magicarp.dm +++ b/code/modules/events/wizard/magicarp.dm @@ -36,10 +36,11 @@ projectilesound = 'sound/weapons/emitter.ogg' maxHealth = 50 health = 50 + gold_core_spawnable = NO_SPAWN var/allowed_projectile_types = list(/obj/item/projectile/magic/change, /obj/item/projectile/magic/animate, /obj/item/projectile/magic/resurrection, /obj/item/projectile/magic/death, /obj/item/projectile/magic/teleport, /obj/item/projectile/magic/door, /obj/item/projectile/magic/aoe/fireball, /obj/item/projectile/magic/spellblade, /obj/item/projectile/magic/arcane_barrage) - + /mob/living/simple_animal/hostile/carp/ranged/Initialize() projectiletype = pick(allowed_projectile_types) . = ..() diff --git a/code/modules/events/wizard/rpgloot.dm b/code/modules/events/wizard/rpgloot.dm index 420582ddab..3d560aefb8 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/fields/fields.dm b/code/modules/fields/fields.dm index 5e34c934d9..5b0b4bc1f8 100644 --- a/code/modules/fields/fields.dm +++ b/code/modules/fields/fields.dm @@ -283,7 +283,7 @@ var/field_type = /datum/proximity_monitor/advanced/debug var/operating = FALSE var/datum/proximity_monitor/advanced/current = null - var/datum/component/mobhook + var/mob/listeningTo /obj/item/multitool/field_debug/Initialize() . = ..() @@ -292,7 +292,7 @@ /obj/item/multitool/field_debug/Destroy() STOP_PROCESSING(SSobj, src) QDEL_NULL(current) - QDEL_NULL(mobhook) + listeningTo = null return ..() /obj/item/multitool/field_debug/proc/setup_debug_field() @@ -303,16 +303,20 @@ /obj/item/multitool/field_debug/attack_self(mob/user) operating = !operating to_chat(user, "You turn [src] [operating? "on":"off"].") - QDEL_NULL(mobhook) + UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED) + listeningTo = null if(!istype(current) && operating) - mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/on_mob_move))) + RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/on_mob_move) + listeningTo = user setup_debug_field() else if(!operating) QDEL_NULL(current) /obj/item/multitool/field_debug/dropped() . = ..() - QDEL_NULL(mobhook) + if(listeningTo) + UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED) + listeningTo = null /obj/item/multitool/field_debug/proc/on_mob_move() check_turf(get_turf(src)) diff --git a/code/modules/food_and_drinks/food/snacks_pastry.dm b/code/modules/food_and_drinks/food/snacks_pastry.dm index 9b87002738..b468b6b1d1 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 829cb55312..f2d7fa1526 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/holiday/halloween/bartholomew.dm b/code/modules/holiday/halloween/bartholomew.dm index 129f4e29b6..4911082049 100644 --- a/code/modules/holiday/halloween/bartholomew.dm +++ b/code/modules/holiday/halloween/bartholomew.dm @@ -20,6 +20,7 @@ if(!active) say("Meow!") return + for(var/I2 in items_list) if(istype(I, I2)) qdel(I) @@ -36,6 +37,7 @@ return say("Hello there, I'm Bartholomew, Jacqueline's Familiar.") sleep(20) + say("I'm currently seeking items to put into my pot, if we get the right items, it should crystalise into a magic candy!") if(!iscarbon(user)) say("Though... I'm not sure you can help me.") @@ -52,6 +54,15 @@ message += "currently seem to have the most magic potential." sleep(15) say("[message]") + sleep(15) + //To help people find her + for(var/mob/living/simple_animal/jacq/J in GLOB.simple_animals[1]) + var/turf/L1 = J.loc + if(!L1) //Incase someone uh.. puts her in a locker + return + var/area/L2 = L1.loc + if(L2) + say("Also, it seems that Jacqueline is currently at the [L2], if you're looking for her too.") /obj/item/barthpot/proc/generate_items() var/length = LAZYLEN(items_list) @@ -64,79 +75,70 @@ /obj/item/clothing/head/that = 1, /obj/item/clothing/head/ushanka = 1, /obj/item/clothing/head/welding = 1, - /obj/item/clothing/mask/gas = 15, + /obj/item/clothing/mask/gas = 10, /obj/item/clothing/suit/hazardvest = 1, /obj/item/clothing/under/rank/vice = 1, - /obj/item/clothing/suit/hooded/flashsuit = 2, - /obj/item/clothing/accessory/medal/greytide = 1, + /obj/item/clothing/suit/hooded/flashsuit = 1, /obj/item/assembly/prox_sensor = 4, /obj/item/assembly/timer = 3, - /obj/item/flashlight = 4, + /obj/item/flashlight = 6, /obj/item/flashlight/pen = 1, - /obj/effect/spawner/lootdrop/glowstick = 4, - /obj/effect/spawner/lootdrop/mre = 3, + /obj/item/flashlight/glowstick = 4, /obj/item/multitool = 2, - /obj/item/radio/off = 2, + /obj/item/radio = 2, /obj/item/t_scanner = 5, /obj/item/airlock_painter = 1, - /obj/item/stack/cable_coil/ = 4, + /obj/item/stack/cable_coil = 6, /obj/item/stack/medical/bruise_pack = 1, /obj/item/stack/rods = 3, /obj/item/stack/sheet/cardboard = 2, /obj/item/stack/sheet/metal = 1, /obj/item/stack/sheet/mineral/plasma = 1, /obj/item/stack/sheet/rglass = 1, - /obj/item/book/manual/wiki/engineering_construction = 1, - /obj/item/book/manual/wiki/engineering_hacking = 1, /obj/item/clothing/head/cone = 1, - /obj/item/coin/silver = 1, - /obj/item/coin/twoheaded = 1, - /obj/item/poster/random_contraband = 1, - /obj/item/poster/random_official = 1, - /obj/item/crowbar = 1, + /obj/item/coin = 2, + /obj/item/crowbar = 3, /obj/item/crowbar/red = 1, - /obj/item/extinguisher = 11, + /obj/item/extinguisher = 3, /obj/item/hand_labeler = 1, - /obj/item/paper/crumpled = 1, - /obj/item/pen = 1, + /obj/item/paper = 4, + /obj/item/pen = 3, /obj/item/reagent_containers/spray/pestspray = 1, /obj/item/reagent_containers/rag = 3, /obj/item/stock_parts/cell = 3, /obj/item/storage/belt/utility = 2, - /obj/item/storage/box = 2, + /obj/item/storage/box = 4, /obj/item/storage/box/cups = 1, /obj/item/storage/box/donkpockets = 1, /obj/item/storage/box/lights/mixed = 3, /obj/item/storage/box/hug/medical = 1, - /obj/item/storage/fancy/cigarettes/dromedaryco = 1, - /obj/item/storage/toolbox/mechanical = 1, + /obj/item/storage/fancy/cigarettes = 1, + /obj/item/storage/toolbox = 1, /obj/item/screwdriver = 3, /obj/item/tank/internals/emergency_oxygen = 2, /obj/item/vending_refill/cola = 1, /obj/item/weldingtool = 3, - /obj/item/wirecutters = 1, + /obj/item/wirecutters = 2, /obj/item/wrench = 4, - /obj/item/relic = 3, - /obj/item/weaponcrafting/receiver = 2, + /obj/item/weaponcrafting/receiver = 1, /obj/item/clothing/head/cone = 2, - /obj/item/grenade/smokebomb = 2, + /obj/item/grenade/smokebomb = 1, /obj/item/geiger_counter = 3, - /obj/item/reagent_containers/food/snacks/grown/citrus/orange = 1, - /obj/item/radio/headset = 1, + /obj/item/reagent_containers/food/snacks/grown/citrus/orange = 5, /obj/item/assembly/infra = 1, /obj/item/assembly/igniter = 2, /obj/item/assembly/signaler = 2, - /obj/item/assembly/mousetrap = 2, - /obj/item/reagent_containers/syringe = 2, + /obj/item/assembly/mousetrap = 5, + /obj/item/reagent_containers/syringe = 5, /obj/item/clothing/gloves = 8, /obj/item/clothing/shoes/laceup = 1, /obj/item/storage/secure/briefcase = 3, /obj/item/storage/toolbox/artistic = 2, /obj/item/toy/eightball = 1, - /obj/item/reagent_containers/pill/floorpill = 1, - /obj/item/reagent_containers/food/snacks/cannedpeaches/maint = 2, - /obj/item/clothing/shoes = 2) - if(length == 5) + /obj/item/reagent_containers/pill = 2, + /obj/item/reagent_containers/food/snacks/cannedpeaches/maint = 1, + /obj/item/clothing/shoes = 8) + if(length >= 5) return TRUE //var/metalist = pickweight(GLOB.maintenance_loot) for(var/i = length, i <= 5, i+=1) @@ -144,5 +146,18 @@ if(!item) i-=1 continue + for(var/obj/item_dupe in items_list) //No duplicates + if(item_dupe == item) + i-=1 + continue items_list += item return TRUE + +/obj/item/pinpointer/jacq + name = "The Jacq-Tracq" + desc = "A handheld tracking device that locks onto witchy signals." + +/obj/item/pinpointer/jacq/attack_self(mob/living/user) + for(var/mob/living/simple_animal/jacq/J in GLOB.simple_animals[1]) + target = J + ..() diff --git a/code/modules/holiday/halloween/jacqueen.dm b/code/modules/holiday/halloween/jacqueen.dm index b2f69df2e4..4cb83baf4b 100644 --- a/code/modules/holiday/halloween/jacqueen.dm +++ b/code/modules/holiday/halloween/jacqueen.dm @@ -40,18 +40,22 @@ speech_span = "spooky" friendly = "pets" response_help = "chats with" + light_range = 3 + light_color = "#ff9842" var/last_poof var/progression = list() //Keep track of where people are in the story. var/active = TRUE //Turn this to false to keep normal mob behavour + var/cached_z /mob/living/simple_animal/jacq/Initialize() ..() + cached_z = z poof() /mob/living/simple_animal/jacq/Life() ..() if(!ckey) - if((last_poof+4 MINUTES) < world.realtime) + if((last_poof+3 MINUTES) < world.realtime) poof() /mob/living/simple_animal/jacq/Destroy() //I.e invincible @@ -64,7 +68,7 @@ /mob/living/simple_animal/jacq/death() //What is alive may never die visible_message("[src] cackles, \"You'll nae get rid a me that easily!\"") playsound(loc, 'sound/spookoween/ahaha.ogg', 100, 0.25) - health = 20 + health = 25 poof() /mob/living/simple_animal/jacq/attack_hand(mob/living/carbon/human/M) @@ -96,14 +100,37 @@ s.start() visible_message("[src] disappears in a puff of smoke!") canmove = TRUE + health = 25 var/hp_list = list() for(var/obj/machinery/holopad/hp in world) hp_list += hp - var/obj/machinery/holopad/hp = pick(hp_list) - if(forceMove(pick(hp.loc))) - return TRUE + var/nono_areas = list("AI Chamber", "AI Satellite Antechamber", "AI Satellite Foyer") + + for(var/i = 0, i <= 5, i+=1) //Attempts a jump 6 times. + var/obj/machinery/holopad/hp = pick(hp_list) + if(forceMove(pick(hp.loc))) + + for(var/no_area in nono_areas) + var/turf/L1 = hp.loc + if(!L1) //Incase the area isn't a turf (i.e. in a locker) + continue + var/area/L2 = L1.loc + if(L2) + if(no_area == L2.name) + continue + + //Try to go to populated areas + var/list/seen = viewers(8, get_turf(src)) + for(var/victim in seen) + if(ishuman(victim)) + if(z == cached_z) + return TRUE + + if(z == cached_z)//same z level please, if no humans + return TRUE + return FALSE @@ -129,7 +156,7 @@ if(!progression["[C.real_name]"] || !(progression["[C.real_name]"] & JACQ_HELLO)) visible_message("[src] smiles ominously at [C], \"Well halo there [gender]! Ah'm Jacqueline, tae great Pumpqueen, great tae meet ye.\"") sleep(20) - visible_message("[src] continues, says, \"Ah'm sure yae well stunned, but ah've got nae taem fer that. Ah'm after the candies around this station. If yae get mae enoof o the wee buggers, Ah'll give ye a treat, or if yae feeling bold, Ah ken trick ye instead.\" giving [C] a wide grin.") + visible_message("[src] continues, \"Ah'm sure yae well stunned, but ah've got nae taem fer that. Ah'm after the candies around this station. If yae get mae enoof o the wee buggers, Ah'll give ye a treat, or if yae feeling bold, Ah ken trick ye instead.\" giving [C] a wide grin.") if(!progression["[C.real_name]"]) progression["[C.real_name]"] = NONE //TO MAKE SURE THAT THE LIST ENTRY EXISTS. @@ -153,11 +180,21 @@ /mob/living/simple_animal/jacq/proc/treat(mob/living/carbon/C, gender) visible_message("[src] gives off a glowing smile, \"What ken Ah offer ye? I can magic up an object, a potion or a plushie fer ye.\"") - var/choices_reward = list("Object - 3 candies", "Potion - 2 candies", "Plushie - 1 candy", "Can I ask you a question instead?") + var/choices_reward = list("Object - 3 candies", "Potion - 2 candies", "Jacqueline Tracker - 2 candies", "Plushie - 1 candy", "Can I get to know you instead?", "Become a pumpkinhead dullahan (perma) - 4 candies") var/choice_reward = input(usr, "Trick or Treat?", "Trick or Treat?") in choices_reward //rewards switch(choice_reward) + if("Become a pumpkinhead dullahan (perma) - 4 candies") + if(!take_candies(C, 4)) + visible_message("[src] raises an eyebrown, \"It's 4 candies for that [gender]! Thems the rules!\"") + return + visible_message("[src] waves their arms around, \"Off comes your head, a pumpkin taking it's stead!\"") + C.reagents.add_reagent("pumpkinmutationtoxin", 5) + sleep(20) + poof() + return + if("Object - 3 candies") if(!take_candies(C, 3)) visible_message("[src] raises an eyebrown, \"It's 3 candies per trinket [gender]! Thems the rules!\"") @@ -169,7 +206,7 @@ // panic() var/reward = new new_obj(C.loc) C.put_in_hands(reward) - visible_message("[src] waves her hands, magicing up a [reward] from thin air, \"There ye are [gender], enjoy! \"") + visible_message("[src] waves her hands, magicking up a [reward] from thin air, \"There ye are [gender], enjoy! \"") sleep(20) poof() return @@ -180,7 +217,7 @@ var/reward = new /obj/item/reagent_containers/potion_container(C.loc) C.put_in_hands(reward) - visible_message("[src] waves her hands, magicing up a [reward] from thin air, \"There ye are [gender], enjoy! \"") + visible_message("[src] waves her hands, magicking up a [reward] from thin air, \"There ye are [gender], enjoy! \"") sleep(20) poof() return @@ -190,13 +227,22 @@ return new /obj/item/toy/plush/random(C.loc) - visible_message("[src] waves her hands, magicing up a plushie from thin air, \"There ye are [gender], enjoy! \"") + visible_message("[src] waves her hands, magicking up a plushie from thin air, \"There ye are [gender], enjoy! \"") + sleep(20) + poof() + return + if("Jacqueline Tracker - 2 candies") + if(!take_candies(C, 2)) + visible_message("[src] raises an eyebrow, \"It's 1 candy per plushie [gender]! Thems the rules!\"") + return + new /obj/item/pinpointer/jacq(C.loc) + visible_message("[src] waves her hands, magicking up a tracker from thin air, \"Feels weird to magic up a tracker fer meself but, here ye are [gender], enjoy! \"") sleep(20) poof() return //chitchats! - if("Can I ask you a question instead?") + if("Can I get to know you instead?") var/choices = list() //Figure out where the C is in the story if(!progression["[C.real_name]"]) //I really don't want to get here withoot a hello, but just to be safe @@ -243,25 +289,21 @@ visible_message("[src] says, \"Ave ye tried them? They're full of all sorts of reagents. Ah'm after them so ah ken magic em up an hopefully find rare stuff fer me brews. Honestly it's a lot easier magicking up tatt fer ye lot than runnin aroond on me own like. I'd ask me familiars but most a my familiars are funny fellows 'n constantly bugger off on adventures when given simple objectives like; Go grab me a tea cake or watch over me cauldron. Ah mean, ye might run into Bartholomew my cat. Ee's supposed tae be tending my cauldron, but I've nae idea where ee's got tae.\"") progression["[C.real_name]"] = progression["[C.real_name]"] | JACQ_CANDIES sleep(30) - poof() if("You really came all this way for candy?") - visible_message("[src] looks tae the side sheepishly, \"Aye, well, tae be honest, Ah'm here tae see me sis, but dunnae let her knew that. She's an alchemist too like, but she dunnae use a caldron like mae, she buggered off like tae her posh ivory tower tae learn bloody chemistry instead!\" [src] scowls, \"She's tae black sheep o' the family too, so we dunnae see eye tae eye sometimes on alchemy. Ah mean, she puts moles in her brews! Ye dunnae put moles in yer brews! Yae threw your brews at tae wee bastards an blew em up!\" [src] sighs, \"But she's a heart o gold so.. Ah wanted tae see her an check up oon her, make sure she's okay.\"") + visible_message("[src] l ooks tae the side sheepishly, \"Aye, well, tae be honest, Ah'm here tae see me sis, but dunnae let her knew that. She's an alchemist too like, but she dunnae use a caldron like mae, she buggered off like tae her posh ivory tower tae learn bloody chemistry instead!\" [src] scowls, \"She's tae black sheep o' the family too, so we dunnae see eye tae eye sometimes on alchemy. Ah mean, she puts moles in her brews! Ye dunnae put moles in yer brews! Yae threw your brews at tae wee bastards an blew em up!\" [src] sighs, \"But she's a heart o gold so.. Ah wanted tae see her an check up oon her, make sure she's okay.\"") progression["[C.real_name]"] = progression["[C.real_name]"] | JACQ_FAR sleep(30) - poof() if("What is that on your head?") visible_message("[src] pats the pumpkin atop her head, \"This thing? This ain't nae ordinary pumpkin! Me Ma grew this monster ooer a year o love, dedication an hard work. Honestly it felt like she loved this thing more than any of us, which Ah knew ain't true an it's not like she was hartless or anything but.. well, we had a falling oot when Ah got back home with all me stuff in tow. An all she had done is sent me owl after owl over t' last year aboot this bloody pumpkin and ah had enough. So ah took it, an put it on me head. You know, as ye do. Ah am the great Pumpqueen after all, Ah deserve this.\"") progression["[C.real_name]"] = progression["[C.real_name]"] | JACQ_HEAD sleep(30) - poof() if("Are you a witch?") visible_message("[src] grumbles, \"If ye must know, Ah got kicked oot of the witch academy fer being too much of a \"loose cannon\". A bloody loose cannon? Nae they were just pissed off Ah had the brass tae proclaim myself as the Pumpqueen! And also maybe the time Ah went and blew up one of the towers by trying tae make a huge batch of astrogen might've had something tae do with it. Ah mean it would've worked fine if the cauldrons weren't so shite and were actually upgraded by the faculty. So technically no, I'm not a witch.\"") progression["[C.real_name]"] = progression["[C.real_name]"] | JACQ_WITCH sleep(30) - poof() if("So you got ex-spell-ed?") visible_message("[src] Gives you a blank look at the pun, before continuing, \"Not quite, Ah know Ah ken get back into the academy, it's only an explosion, they happen all the time, but, tae be fair it's my fault that things came tae their explosive climax. You don't know what it's like when you're after a witch doctorate, everyone else is doing well, everyone's making new spells and the like, and I'm just good at making explosions really, or fireworks. So, Ah did something Ah knew was dangerous, because Ah had tae do something tae stand oot, but Ah know this life ain't fer me, Ah don't want tae be locked up in dusty towers, grinding reagent after reagent together, trying tae find new reactions, some of the wizards in there haven't left fer years. Ah want tae live, Ah want tae fly around on a broom, turn people into cats fer a day and disappear cackling! That's what got me into witchcraft!\" she throws her arms up in the arm, spinning the pumpkin upon her head slightly. She carefully spins it back to face you, giving oot a soft sigh, \"Ah know my mother's obsession with this dumb thing on my head is just her trying tae fill the void of me and my sis moving oot, and it really shouldn't be on my head. And Ah know that I'm really here tae get help from my sis.. She's the sensible one, and she gives good hugs.\"") @@ -269,11 +311,10 @@ visible_message("[src] says, \"Thanks [C], Ah guess Ah didn't realise Ah needed someone tae talk tae but, I'm glad ye spent all your candies talking tae me. Funny how things seem much worse in yer head.\"") progression["[C.real_name]"] = progression["[C.real_name]"] | JACQ_EXPELL sleep(30) - poof() if("Can I take you out on a date?") visible_message("[src] blushes, \"...You want tae ask me oot on a date? Me? After all that nonsense Ah just said? It seems a waste of a candy honestly.\"") - progression["[C.real_name]"] = progression["[C.real_name]"] | JACQ_DATE + //progression["[C.real_name]"] = progression["[C.real_name]"] | JACQ_DATE visible_message("[src] looks to the side, deep in thought.") dating_start(C, gender) @@ -285,37 +326,34 @@ /mob/living/simple_animal/jacq/proc/trick(mob/living/carbon/C, gender) var/option if(ishuman(C)) - option = rand(1,7) - else option = rand(1,6) + else + option = rand(1,5) switch(option) if(1) visible_message("[src] waves their arms around, \"Hocus pocus, making friends is now your focus!\"") - var/datum/objective/brainwashing/objective = pick("Make a tasty sandwich for", "Compose a poem for", "Aquire a nice outfit to give to", "Strike up a conversation about pumpkins with", "Write a letter and deliver it to", "Give a nice hat to") + var/message = pick("make a tasty sandwich for", "compose a poem for", "aquire a nice outfit to give to", "strike up a conversation about pumpkins with", "write a letter and deliver it to", "give a nice hat to") var/mob/living/L2 = pick(GLOB.player_list) - objective += " [L2.name]." - brainwash(C, objective) + message += " [L2.name]." + to_chat(C, " You feel an overwhelming desire to [message]") if(2) - visible_message("[src] waves their arms around, \"Off comes your head, a pumpkin taking it's stead!\"") - C.reagents.add_reagent("pumpkinmutationtoxin", 5) - if(3) visible_message("[src] waves their arms around, \"If only you had a better upbringing, your ears are now full of my singing!\"") var/client/C2 = C.client - C2.chatOutput.sendMusic("https://a.uguu.se/rQ8FxxUQ1Xzc_SpOwOkyOwOkyPumpkinSong-PFrPrIxluWk.mp4", 1)//I hope this works! - if(4) + C2.chatOutput.sendMusic("https://puu.sh/ExBbv.mp4", 1)//I hope this works! + if(3) visible_message("[src] waves their arms around, \"You're cute little bumpkin, On your head is a pumpkin!\"") if(C.head) var/obj/item/W = C.head C.dropItemToGround(W, TRUE) var/jaqc_latern = new /obj/item/clothing/head/hardhat/pumpkinhead/jaqc C.equip_to_slot(jaqc_latern, SLOT_HEAD, 1, 1) - if(5) + if(4) visible_message("[src] waves their arms around, \"In your body there's something amiss, you'll find it's a chem made by my sis!\"") C.reagents.add_reagent("eigenstate", 30) - if(6) + if(5) visible_message("[src] waves their arms around, \"A new familiar for me, and you'll see it's thee!\"") C.reagents.add_reagent("secretcatchem", 30) - if(7) + if(6) visible_message("[src] waves their arms around, \"While you may not be a ghost, for this sheet you'll always be it's host.\"") var/mob/living/carbon/human/H = C if(H.wear_suit) diff --git a/code/modules/hydroponics/beekeeping/beekeeper_suit.dm b/code/modules/hydroponics/beekeeping/beekeeper_suit.dm index 7fa1a0dd2c..fd9f879f5e 100644 --- a/code/modules/hydroponics/beekeeping/beekeeper_suit.dm +++ b/code/modules/hydroponics/beekeeping/beekeeper_suit.dm @@ -4,7 +4,7 @@ desc = "Keeps the lil buzzing buggers out of your eyes." icon_state = "beekeeper" item_state = "beekeeper" - clothing_flags = THICKMATERIAL + clothing_flags = THICKMATERIAL | SNUG_FIT /obj/item/clothing/suit/beekeeper_suit diff --git a/code/modules/hydroponics/seed_extractor.dm b/code/modules/hydroponics/seed_extractor.dm index ffa9e2e21d..d9bea64411 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 b258a15972..b7feedd312 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 682e76a46e..81961c2d9c 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/jobs/access.dm b/code/modules/jobs/access.dm index 1ffdff2347..2119baf1a5 100644 --- a/code/modules/jobs/access.dm +++ b/code/modules/jobs/access.dm @@ -1,372 +1,372 @@ - -//returns TRUE if this mob has sufficient access to use this object -/obj/proc/allowed(mob/M) - //check if it doesn't require any access at all - if(src.check_access(null)) - return TRUE - if(issilicon(M)) - if(ispAI(M)) - return FALSE - return TRUE //AI can do whatever it wants - if(IsAdminGhost(M)) - //Access can't stop the abuse - return TRUE - else if(istype(M) && SEND_SIGNAL(M, COMSIG_MOB_ALLOWED, src)) - return TRUE - else if(ishuman(M)) - var/mob/living/carbon/human/H = M - //if they are holding or wearing a card that has access, that works - if(check_access(H.get_active_held_item()) || src.check_access(H.wear_id)) - return TRUE - else if(ismonkey(M) || isalienadult(M)) - var/mob/living/carbon/george = M - //they can only hold things :( - if(check_access(george.get_active_held_item())) - return TRUE - else if(isanimal(M)) - var/mob/living/simple_animal/A = M - if(check_access(A.get_active_held_item()) || check_access(A.access_card)) - return TRUE - return FALSE - -/obj/item/proc/GetAccess() - return list() - -/obj/item/proc/GetID() - return null - -/obj/proc/text2access(access_text) - . = list() - if(!access_text) - return - var/list/split = splittext(access_text,";") - for(var/x in split) - var/n = text2num(x) - if(n) - . += n - -//Call this before using req_access or req_one_access directly -/obj/proc/gen_access() - //These generations have been moved out of /obj/New() because they were slowing down the creation of objects that never even used the access system. - if(!req_access) - req_access = list() - for(var/a in text2access(req_access_txt)) - req_access += a - if(!req_one_access) - req_one_access = list() - for(var/b in text2access(req_one_access_txt)) - req_one_access += b - -// Check if an item has access to this object -/obj/proc/check_access(obj/item/I) - return check_access_list(I ? I.GetAccess() : null) - -/obj/proc/check_access_list(list/access_list) - gen_access() - - if(!islist(req_access)) //something's very wrong - return TRUE - - if(!req_access.len && !length(req_one_access)) - return TRUE - - if(!length(access_list) || !islist(access_list)) - return FALSE - - for(var/req in req_access) - if(!(req in access_list)) //doesn't have this access - return FALSE - - if(length(req_one_access)) - for(var/req in req_one_access) - if(req in access_list) //has an access from the single access list - return TRUE - return FALSE - return TRUE - -/obj/proc/check_access_ntnet(datum/netdata/data) - return check_access_list(data.passkey) - -/proc/get_centcom_access(job) - switch(job) - if("VIP Guest") - return list(ACCESS_CENT_GENERAL) - if("Custodian") - return list(ACCESS_CENT_GENERAL, ACCESS_CENT_LIVING, ACCESS_CENT_STORAGE) - if("Thunderdome Overseer") - return list(ACCESS_CENT_GENERAL, ACCESS_CENT_THUNDER) - if("CentCom Official") - return list(ACCESS_CENT_GENERAL, ACCESS_CENT_LIVING) - if("Medical Officer") - return list(ACCESS_CENT_GENERAL, ACCESS_CENT_LIVING, ACCESS_CENT_MEDICAL) - if("Death Commando") - return list(ACCESS_CENT_GENERAL, ACCESS_CENT_SPECOPS, ACCESS_CENT_LIVING, ACCESS_CENT_STORAGE) - if("Research Officer") - return list(ACCESS_CENT_GENERAL, ACCESS_CENT_SPECOPS, ACCESS_CENT_MEDICAL, ACCESS_CENT_TELEPORTER, ACCESS_CENT_STORAGE) - if("Special Ops Officer") - return list(ACCESS_CENT_GENERAL, ACCESS_CENT_THUNDER, ACCESS_CENT_SPECOPS, ACCESS_CENT_LIVING, ACCESS_CENT_STORAGE) - if("Admiral") - return get_all_centcom_access() - if("CentCom Commander") - return get_all_centcom_access() - if("Emergency Response Team Commander") - return get_ert_access("commander") - if("Security Response Officer") - return get_ert_access("sec") - if("Engineer Response Officer") - return get_ert_access("eng") - if("Medical Response Officer") - return get_ert_access("med") - if("CentCom Bartender") - return list(ACCESS_CENT_GENERAL, ACCESS_CENT_LIVING, ACCESS_CENT_BAR) - -/proc/get_all_accesses() - return list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_ARMORY, ACCESS_FORENSICS_LOCKERS, ACCESS_COURT, ACCESS_ENTER_GENPOP, ACCESS_LEAVE_GENPOP, - ACCESS_MEDICAL, ACCESS_GENETICS, ACCESS_MORGUE, ACCESS_RD, - ACCESS_TOX, ACCESS_TOX_STORAGE, ACCESS_CHEMISTRY, ACCESS_ENGINE, ACCESS_ENGINE_EQUIP, ACCESS_MAINT_TUNNELS, - ACCESS_EXTERNAL_AIRLOCKS, ACCESS_CHANGE_IDS, ACCESS_AI_UPLOAD, - ACCESS_TELEPORTER, ACCESS_EVA, ACCESS_HEADS, ACCESS_CAPTAIN, ACCESS_ALL_PERSONAL_LOCKERS, - ACCESS_TECH_STORAGE, ACCESS_CHAPEL_OFFICE, ACCESS_ATMOSPHERICS, ACCESS_KITCHEN, - ACCESS_BAR, ACCESS_JANITOR, ACCESS_CREMATORIUM, ACCESS_ROBOTICS, ACCESS_CARGO, ACCESS_CONSTRUCTION, - ACCESS_HYDROPONICS, ACCESS_LIBRARY, ACCESS_LAWYER, ACCESS_VIROLOGY, ACCESS_CMO, ACCESS_QM, ACCESS_SURGERY, - ACCESS_THEATRE, ACCESS_RESEARCH, ACCESS_MINING, ACCESS_MAILSORTING, ACCESS_WEAPONS, - ACCESS_VAULT, ACCESS_MINING_STATION, ACCESS_XENOBIOLOGY, ACCESS_CE, ACCESS_HOP, ACCESS_HOS, ACCESS_RC_ANNOUNCE, - ACCESS_KEYCARD_AUTH, ACCESS_TCOMSAT, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM, ACCESS_MINISAT, ACCESS_NETWORK, ACCESS_CLONING) - -/proc/get_all_centcom_access() - return list(ACCESS_CENT_GENERAL, ACCESS_CENT_THUNDER, ACCESS_CENT_SPECOPS, ACCESS_CENT_MEDICAL, ACCESS_CENT_LIVING, ACCESS_CENT_STORAGE, ACCESS_CENT_TELEPORTER, ACCESS_CENT_CAPTAIN) - -/proc/get_ert_access(class) - switch(class) - if("commander") - return get_all_centcom_access() - if("sec") - return list(ACCESS_CENT_GENERAL, ACCESS_CENT_SPECOPS, ACCESS_CENT_LIVING) - if("eng") - return list(ACCESS_CENT_GENERAL, ACCESS_CENT_SPECOPS, ACCESS_CENT_LIVING, ACCESS_CENT_STORAGE) - if("med") - return list(ACCESS_CENT_GENERAL, ACCESS_CENT_SPECOPS, ACCESS_CENT_MEDICAL, ACCESS_CENT_LIVING) - -/proc/get_all_syndicate_access() - return list(ACCESS_SYNDICATE, ACCESS_SYNDICATE) - -/proc/get_region_accesses(code) - switch(code) - if(0) - return get_all_accesses() - if(1) //station general - return list(ACCESS_KITCHEN,ACCESS_BAR, ACCESS_HYDROPONICS, ACCESS_JANITOR, ACCESS_CHAPEL_OFFICE, ACCESS_CREMATORIUM, ACCESS_LIBRARY, ACCESS_THEATRE, ACCESS_LAWYER) - if(2) //security - return list(ACCESS_SEC_DOORS, ACCESS_WEAPONS, ACCESS_SECURITY, ACCESS_BRIG, ACCESS_ARMORY, ACCESS_FORENSICS_LOCKERS, ACCESS_COURT, ACCESS_HOS, ACCESS_ENTER_GENPOP, ACCESS_LEAVE_GENPOP,) - if(3) //medbay - return list(ACCESS_MEDICAL, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_MORGUE, ACCESS_CHEMISTRY, ACCESS_VIROLOGY, ACCESS_SURGERY, ACCESS_CMO) - if(4) //research - return list(ACCESS_RESEARCH, ACCESS_TOX, ACCESS_TOX_STORAGE, ACCESS_GENETICS, ACCESS_ROBOTICS, ACCESS_XENOBIOLOGY, ACCESS_MINISAT, ACCESS_RD, ACCESS_NETWORK) - if(5) //engineering and maintenance - return list(ACCESS_CONSTRUCTION, ACCESS_MAINT_TUNNELS, ACCESS_ENGINE, ACCESS_ENGINE_EQUIP, ACCESS_EXTERNAL_AIRLOCKS, ACCESS_TECH_STORAGE, ACCESS_ATMOSPHERICS, ACCESS_TCOMSAT, ACCESS_MINISAT, ACCESS_CE) - if(6) //supply - return list(ACCESS_MAILSORTING, ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM, ACCESS_CARGO, ACCESS_QM, ACCESS_VAULT) - if(7) //command - return list(ACCESS_HEADS, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_CHANGE_IDS, ACCESS_AI_UPLOAD, ACCESS_TELEPORTER, ACCESS_EVA, ACCESS_GATEWAY, ACCESS_ALL_PERSONAL_LOCKERS, ACCESS_HOP, ACCESS_CAPTAIN, ACCESS_VAULT) - -/proc/get_region_accesses_name(code) - switch(code) - if(0) - return "All" - if(1) //station general - return "General" - if(2) //security - return "Security" - if(3) //medbay - return "Medbay" - if(4) //research - return "Research" - if(5) //engineering and maintenance - return "Engineering" - if(6) //supply - return "Supply" - if(7) //command - return "Command" - -/proc/get_access_desc(A) - switch(A) - if(ACCESS_CARGO) - return "Cargo Bay" - if(ACCESS_CARGO_BOT) - return "Delivery Chutes" - if(ACCESS_SECURITY) - return "Security" - if(ACCESS_BRIG) - return "Holding Cells" - if(ACCESS_COURT) - return "Courtroom" - if(ACCESS_FORENSICS_LOCKERS) - return "Forensics" - if(ACCESS_MEDICAL) - return "Medical" - if(ACCESS_GENETICS) - return "Genetics Lab" - if(ACCESS_MORGUE) - return "Morgue" - if(ACCESS_TOX) - return "R&D Lab" - if(ACCESS_TOX_STORAGE) - return "Toxins Lab" - if(ACCESS_CHEMISTRY) - return "Chemistry Lab" - if(ACCESS_RD) - return "RD Office" - if(ACCESS_BAR) - return "Bar" - if(ACCESS_JANITOR) - return "Custodial Closet" - if(ACCESS_ENGINE) - return "Engineering" - if(ACCESS_ENGINE_EQUIP) - return "Power and Engineering Equipment" - if(ACCESS_MAINT_TUNNELS) - return "Maintenance" - if(ACCESS_EXTERNAL_AIRLOCKS) - return "External Airlocks" - if(ACCESS_EMERGENCY_STORAGE) - return "Emergency Storage" - if(ACCESS_CHANGE_IDS) - return "ID Console" - if(ACCESS_AI_UPLOAD) - return "AI Chambers" - if(ACCESS_TELEPORTER) - return "Teleporter" - if(ACCESS_EVA) - return "EVA" - if(ACCESS_HEADS) - return "Bridge" - if(ACCESS_CAPTAIN) - return "Captain" - if(ACCESS_ALL_PERSONAL_LOCKERS) - return "Personal Lockers" - if(ACCESS_CHAPEL_OFFICE) - return "Chapel Office" - if(ACCESS_TECH_STORAGE) - return "Technical Storage" - if(ACCESS_ATMOSPHERICS) - return "Atmospherics" - if(ACCESS_CREMATORIUM) - return "Crematorium" - if(ACCESS_ARMORY) - return "Armory" - if(ACCESS_CONSTRUCTION) - return "Construction" - if(ACCESS_KITCHEN) - return "Kitchen" - if(ACCESS_HYDROPONICS) - return "Hydroponics" - if(ACCESS_LIBRARY) - return "Library" - if(ACCESS_LAWYER) - return "Law Office" - if(ACCESS_ROBOTICS) - return "Robotics" - if(ACCESS_VIROLOGY) - return "Virology" - if(ACCESS_CMO) - return "CMO Office" - if(ACCESS_QM) - return "Quartermaster" - if(ACCESS_SURGERY) - return "Surgery" - if(ACCESS_THEATRE) - return "Theatre" - if(ACCESS_MANUFACTURING) - return "Manufacturing" - if(ACCESS_RESEARCH) - return "Science" - if(ACCESS_MINING) - return "Mining" - if(ACCESS_MINING_OFFICE) - return "Mining Office" - if(ACCESS_MAILSORTING) - return "Cargo Office" - if(ACCESS_MINT) - return "Mint" - if(ACCESS_MINT_VAULT) - return "Mint Vault" - if(ACCESS_VAULT) - return "Main Vault" - if(ACCESS_MINING_STATION) - return "Mining EVA" - if(ACCESS_XENOBIOLOGY) - return "Xenobiology Lab" - if(ACCESS_HOP) - return "HoP Office" - if(ACCESS_HOS) - return "HoS Office" - if(ACCESS_CE) - return "CE Office" - if(ACCESS_RC_ANNOUNCE) - return "RC Announcements" - if(ACCESS_KEYCARD_AUTH) - return "Keycode Auth." - if(ACCESS_TCOMSAT) - return "Telecommunications" - if(ACCESS_GATEWAY) - return "Gateway" - if(ACCESS_SEC_DOORS) - return "Brig" - if(ACCESS_ENTER_GENPOP) - return "Prison Turnstile Entrance" - if(ACCESS_LEAVE_GENPOP) - return "Prison Turnstile Exit" - if(ACCESS_MINERAL_STOREROOM) - return "Mineral Storage" - if(ACCESS_MINISAT) - return "AI Satellite" - if(ACCESS_WEAPONS) - return "Weapon Permit" - if(ACCESS_NETWORK) - return "Network Access" - if(ACCESS_CLONING) - return "Cloning Room" - -/proc/get_centcom_access_desc(A) - switch(A) - if(ACCESS_CENT_GENERAL) - return "Code Grey" - if(ACCESS_CENT_THUNDER) - return "Code Yellow" - if(ACCESS_CENT_STORAGE) - return "Code Orange" - if(ACCESS_CENT_LIVING) - return "Code Green" - if(ACCESS_CENT_MEDICAL) - return "Code White" - if(ACCESS_CENT_TELEPORTER) - return "Code Blue" - if(ACCESS_CENT_SPECOPS) - return "Code Black" - if(ACCESS_CENT_CAPTAIN) - return "Code Gold" - if(ACCESS_CENT_BAR) - return "Code Scotch" - -/proc/get_all_jobs() - return list("Assistant", "Captain", "Head of Personnel", "Bartender", "Cook", "Botanist", "Quartermaster", "Cargo Technician", - "Shaft Miner", "Clown", "Mime", "Janitor", "Curator", "Lawyer", "Chaplain", "Chief Engineer", "Station Engineer", - "Atmospheric Technician", "Chief Medical Officer", "Medical Doctor", "Chemist", "Geneticist", "Virologist", - "Research Director", "Scientist", "Roboticist", "Head of Security", "Warden", "Detective", "Security Officer") - -/proc/get_all_job_icons() //For all existing HUD icons - return get_all_jobs() + list("Prisoner") - -/proc/get_all_centcom_jobs() - return list("VIP Guest","Custodian","Thunderdome Overseer","CentCom Official","Medical Officer","Death Commando","Research Officer","Special Ops Officer","Admiral","CentCom Commander","Emergency Response Team Commander","Security Response Officer","Engineer Response Officer", "Medical Response Officer","CentCom Bartender") - -/obj/item/proc/GetJobName() //Used in secHUD icon generation - var/obj/item/card/id/I = GetID() - if(!I) - return - var/jobName = I.assignment - if(jobName in get_all_job_icons()) //Check if the job has a hud icon - return jobName - if(jobName in get_all_centcom_jobs()) //Return with the NT logo if it is a CentCom job - return "CentCom" - return "Unknown" //Return unknown if none of the above apply + +//returns TRUE if this mob has sufficient access to use this object +/obj/proc/allowed(mob/M) + //check if it doesn't require any access at all + if(src.check_access(null)) + return TRUE + if(issilicon(M)) + if(ispAI(M)) + return FALSE + return TRUE //AI can do whatever it wants + if(IsAdminGhost(M)) + //Access can't stop the abuse + return TRUE + else if(istype(M) && SEND_SIGNAL(M, COMSIG_MOB_ALLOWED, src)) + return TRUE + else if(ishuman(M)) + var/mob/living/carbon/human/H = M + //if they are holding or wearing a card that has access, that works + if(check_access(H.get_active_held_item()) || src.check_access(H.wear_id)) + return TRUE + else if(ismonkey(M) || isalienadult(M)) + var/mob/living/carbon/george = M + //they can only hold things :( + if(check_access(george.get_active_held_item())) + return TRUE + else if(isanimal(M)) + var/mob/living/simple_animal/A = M + if(check_access(A.get_active_held_item()) || check_access(A.access_card)) + return TRUE + return FALSE + +/obj/item/proc/GetAccess() + return list() + +/obj/item/proc/GetID() + return null + +/obj/proc/text2access(access_text) + . = list() + if(!access_text) + return + var/list/split = splittext(access_text,";") + for(var/x in split) + var/n = text2num(x) + if(n) + . += n + +//Call this before using req_access or req_one_access directly +/obj/proc/gen_access() + //These generations have been moved out of /obj/New() because they were slowing down the creation of objects that never even used the access system. + if(!req_access) + req_access = list() + for(var/a in text2access(req_access_txt)) + req_access += a + if(!req_one_access) + req_one_access = list() + for(var/b in text2access(req_one_access_txt)) + req_one_access += b + +// Check if an item has access to this object +/obj/proc/check_access(obj/item/I) + return check_access_list(I ? I.GetAccess() : null) + +/obj/proc/check_access_list(list/access_list) + gen_access() + + if(!islist(req_access)) //something's very wrong + return TRUE + + if(!req_access.len && !length(req_one_access)) + return TRUE + + if(!length(access_list) || !islist(access_list)) + return FALSE + + for(var/req in req_access) + if(!(req in access_list)) //doesn't have this access + return FALSE + + if(length(req_one_access)) + for(var/req in req_one_access) + if(req in access_list) //has an access from the single access list + return TRUE + return FALSE + return TRUE + +/obj/proc/check_access_ntnet(datum/netdata/data) + return check_access_list(data.passkey) + +/proc/get_centcom_access(job) + switch(job) + if("VIP Guest") + return list(ACCESS_CENT_GENERAL) + if("Custodian") + return list(ACCESS_CENT_GENERAL, ACCESS_CENT_LIVING, ACCESS_CENT_STORAGE) + if("Thunderdome Overseer") + return list(ACCESS_CENT_GENERAL, ACCESS_CENT_THUNDER) + if("CentCom Official") + return list(ACCESS_CENT_GENERAL, ACCESS_CENT_LIVING) + if("Medical Officer") + return list(ACCESS_CENT_GENERAL, ACCESS_CENT_LIVING, ACCESS_CENT_MEDICAL) + if("Death Commando") + return list(ACCESS_CENT_GENERAL, ACCESS_CENT_SPECOPS, ACCESS_CENT_LIVING, ACCESS_CENT_STORAGE) + if("Research Officer") + return list(ACCESS_CENT_GENERAL, ACCESS_CENT_SPECOPS, ACCESS_CENT_MEDICAL, ACCESS_CENT_TELEPORTER, ACCESS_CENT_STORAGE) + if("Special Ops Officer") + return list(ACCESS_CENT_GENERAL, ACCESS_CENT_THUNDER, ACCESS_CENT_SPECOPS, ACCESS_CENT_LIVING, ACCESS_CENT_STORAGE) + if("Admiral") + return get_all_centcom_access() + if("CentCom Commander") + return get_all_centcom_access() + if("Emergency Response Team Commander") + return get_ert_access("commander") + if("Security Response Officer") + return get_ert_access("sec") + if("Engineer Response Officer") + return get_ert_access("eng") + if("Medical Response Officer") + return get_ert_access("med") + if("CentCom Bartender") + return list(ACCESS_CENT_GENERAL, ACCESS_CENT_LIVING, ACCESS_CENT_BAR) + +/proc/get_all_accesses() + return list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_ARMORY, ACCESS_FORENSICS_LOCKERS, ACCESS_COURT, ACCESS_ENTER_GENPOP, ACCESS_LEAVE_GENPOP, + ACCESS_MEDICAL, ACCESS_GENETICS, ACCESS_MORGUE, ACCESS_RD, + ACCESS_TOX, ACCESS_TOX_STORAGE, ACCESS_CHEMISTRY, ACCESS_ENGINE, ACCESS_ENGINE_EQUIP, ACCESS_MAINT_TUNNELS, + ACCESS_EXTERNAL_AIRLOCKS, ACCESS_CHANGE_IDS, ACCESS_AI_UPLOAD, + ACCESS_TELEPORTER, ACCESS_EVA, ACCESS_HEADS, ACCESS_CAPTAIN, ACCESS_ALL_PERSONAL_LOCKERS, + ACCESS_TECH_STORAGE, ACCESS_CHAPEL_OFFICE, ACCESS_ATMOSPHERICS, ACCESS_KITCHEN, + ACCESS_BAR, ACCESS_JANITOR, ACCESS_CREMATORIUM, ACCESS_ROBOTICS, ACCESS_CARGO, ACCESS_CONSTRUCTION, + ACCESS_HYDROPONICS, ACCESS_LIBRARY, ACCESS_LAWYER, ACCESS_VIROLOGY, ACCESS_CMO, ACCESS_QM, ACCESS_SURGERY, + ACCESS_THEATRE, ACCESS_RESEARCH, ACCESS_MINING, ACCESS_MAILSORTING, ACCESS_WEAPONS, + ACCESS_VAULT, ACCESS_MINING_STATION, ACCESS_XENOBIOLOGY, ACCESS_CE, ACCESS_HOP, ACCESS_HOS, ACCESS_RC_ANNOUNCE, + ACCESS_KEYCARD_AUTH, ACCESS_TCOMSAT, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM, ACCESS_MINISAT, ACCESS_NETWORK, ACCESS_CLONING) + +/proc/get_all_centcom_access() + return list(ACCESS_CENT_GENERAL, ACCESS_CENT_THUNDER, ACCESS_CENT_SPECOPS, ACCESS_CENT_MEDICAL, ACCESS_CENT_LIVING, ACCESS_CENT_STORAGE, ACCESS_CENT_TELEPORTER, ACCESS_CENT_CAPTAIN) + +/proc/get_ert_access(class) + switch(class) + if("commander") + return get_all_centcom_access() + if("sec") + return list(ACCESS_CENT_GENERAL, ACCESS_CENT_SPECOPS, ACCESS_CENT_LIVING) + if("eng") + return list(ACCESS_CENT_GENERAL, ACCESS_CENT_SPECOPS, ACCESS_CENT_LIVING, ACCESS_CENT_STORAGE) + if("med") + return list(ACCESS_CENT_GENERAL, ACCESS_CENT_SPECOPS, ACCESS_CENT_MEDICAL, ACCESS_CENT_LIVING) + +/proc/get_all_syndicate_access() + return list(ACCESS_SYNDICATE, ACCESS_SYNDICATE) + +/proc/get_region_accesses(code) + switch(code) + if(0) + return get_all_accesses() + if(1) //station general + return list(ACCESS_KITCHEN,ACCESS_BAR, ACCESS_HYDROPONICS, ACCESS_JANITOR, ACCESS_CHAPEL_OFFICE, ACCESS_CREMATORIUM, ACCESS_LIBRARY, ACCESS_THEATRE, ACCESS_LAWYER) + if(2) //security + return list(ACCESS_SEC_DOORS, ACCESS_WEAPONS, ACCESS_SECURITY, ACCESS_BRIG, ACCESS_ARMORY, ACCESS_FORENSICS_LOCKERS, ACCESS_COURT, ACCESS_HOS, ACCESS_ENTER_GENPOP, ACCESS_LEAVE_GENPOP,) + if(3) //medbay + return list(ACCESS_MEDICAL, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_MORGUE, ACCESS_CHEMISTRY, ACCESS_VIROLOGY, ACCESS_SURGERY, ACCESS_CMO) + if(4) //research + return list(ACCESS_RESEARCH, ACCESS_TOX, ACCESS_TOX_STORAGE, ACCESS_GENETICS, ACCESS_ROBOTICS, ACCESS_XENOBIOLOGY, ACCESS_MINISAT, ACCESS_RD, ACCESS_NETWORK) + if(5) //engineering and maintenance + return list(ACCESS_CONSTRUCTION, ACCESS_MAINT_TUNNELS, ACCESS_ENGINE, ACCESS_ENGINE_EQUIP, ACCESS_EXTERNAL_AIRLOCKS, ACCESS_TECH_STORAGE, ACCESS_ATMOSPHERICS, ACCESS_TCOMSAT, ACCESS_MINISAT, ACCESS_CE) + if(6) //supply + return list(ACCESS_MAILSORTING, ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM, ACCESS_CARGO, ACCESS_QM, ACCESS_VAULT) + if(7) //command + return list(ACCESS_HEADS, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_CHANGE_IDS, ACCESS_AI_UPLOAD, ACCESS_TELEPORTER, ACCESS_EVA, ACCESS_GATEWAY, ACCESS_ALL_PERSONAL_LOCKERS, ACCESS_HOP, ACCESS_CAPTAIN, ACCESS_VAULT) + +/proc/get_region_accesses_name(code) + switch(code) + if(0) + return "All" + if(1) //station general + return "General" + if(2) //security + return "Security" + if(3) //medbay + return "Medbay" + if(4) //research + return "Research" + if(5) //engineering and maintenance + return "Engineering" + if(6) //supply + return "Supply" + if(7) //command + return "Command" + +/proc/get_access_desc(A) + switch(A) + if(ACCESS_CARGO) + return "Cargo Bay" + if(ACCESS_CARGO_BOT) + return "Delivery Chutes" + if(ACCESS_SECURITY) + return "Security Equipment" + if(ACCESS_BRIG) + return "Holding Cells and Prisoner Management" + if(ACCESS_COURT) + return "Courtroom" + if(ACCESS_FORENSICS_LOCKERS) + return "Forensics Lockers" + if(ACCESS_MEDICAL) + return "Medical" + if(ACCESS_GENETICS) + return "Genetics Lab" + if(ACCESS_MORGUE) + return "Morgue" + if(ACCESS_TOX) + return "R&D Lab" + if(ACCESS_TOX_STORAGE) + return "Toxins Lab" + if(ACCESS_CHEMISTRY) + return "Chemistry Lab" + if(ACCESS_RD) + return "RD Office" + if(ACCESS_BAR) + return "Bar" + if(ACCESS_JANITOR) + return "Custodial Closet" + if(ACCESS_ENGINE) + return "Engineering" + if(ACCESS_ENGINE_EQUIP) + return "Power and Engineering Equipment" + if(ACCESS_MAINT_TUNNELS) + return "Maintenance" + if(ACCESS_EXTERNAL_AIRLOCKS) + return "External Airlocks" + if(ACCESS_EMERGENCY_STORAGE) + return "Emergency Storage" + if(ACCESS_CHANGE_IDS) + return "ID Console" + if(ACCESS_AI_UPLOAD) + return "AI Chambers" + if(ACCESS_TELEPORTER) + return "Teleporter" + if(ACCESS_EVA) + return "EVA" + if(ACCESS_HEADS) + return "Bridge and Command Equipment" + if(ACCESS_CAPTAIN) + return "Captain" + if(ACCESS_ALL_PERSONAL_LOCKERS) + return "Personal Lockers" + if(ACCESS_CHAPEL_OFFICE) + return "Chapel Office" + if(ACCESS_TECH_STORAGE) + return "Technical Storage" + if(ACCESS_ATMOSPHERICS) + return "Atmospherics" + if(ACCESS_CREMATORIUM) + return "Crematorium" + if(ACCESS_ARMORY) + return "Armory" + if(ACCESS_CONSTRUCTION) + return "Construction" + if(ACCESS_KITCHEN) + return "Kitchen" + if(ACCESS_HYDROPONICS) + return "Hydroponics" + if(ACCESS_LIBRARY) + return "Library" + if(ACCESS_LAWYER) + return "Law Office" + if(ACCESS_ROBOTICS) + return "Robotics" + if(ACCESS_VIROLOGY) + return "Virology" + if(ACCESS_CMO) + return "CMO Office" + if(ACCESS_QM) + return "Quartermaster" + if(ACCESS_SURGERY) + return "Surgery" + if(ACCESS_THEATRE) + return "Theatre" + if(ACCESS_MANUFACTURING) + return "Manufacturing" + if(ACCESS_RESEARCH) + return "Science" + if(ACCESS_MINING) + return "Mining" + if(ACCESS_MINING_OFFICE) + return "Mining Office" + if(ACCESS_MAILSORTING) + return "Cargo Office" + if(ACCESS_MINT) + return "Mint" + if(ACCESS_MINT_VAULT) + return "Mint Vault" + if(ACCESS_VAULT) + return "Main Vault" + if(ACCESS_MINING_STATION) + return "Mining EVA" + if(ACCESS_XENOBIOLOGY) + return "Xenobiology Lab" + if(ACCESS_HOP) + return "HoP Office" + if(ACCESS_HOS) + return "HoS Office" + if(ACCESS_CE) + return "CE Office" + if(ACCESS_RC_ANNOUNCE) + return "RC Announcements" + if(ACCESS_KEYCARD_AUTH) + return "Keycode Auth." + if(ACCESS_TCOMSAT) + return "Telecommunications" + if(ACCESS_GATEWAY) + return "Gateway" + if(ACCESS_SEC_DOORS) + return "Security SubDepartment Doors" + if(ACCESS_ENTER_GENPOP) + return "Prison Turnstile Entrance" + if(ACCESS_LEAVE_GENPOP) + return "Prison Turnstile Exit" + if(ACCESS_MINERAL_STOREROOM) + return "Mineral Storage" + if(ACCESS_MINISAT) + return "AI Satellite" + if(ACCESS_WEAPONS) + return "Weapon Permit" + if(ACCESS_NETWORK) + return "Network Access" + if(ACCESS_CLONING) + return "Cloning Room" + +/proc/get_centcom_access_desc(A) + switch(A) + if(ACCESS_CENT_GENERAL) + return "Code Grey" + if(ACCESS_CENT_THUNDER) + return "Code Yellow" + if(ACCESS_CENT_STORAGE) + return "Code Orange" + if(ACCESS_CENT_LIVING) + return "Code Green" + if(ACCESS_CENT_MEDICAL) + return "Code White" + if(ACCESS_CENT_TELEPORTER) + return "Code Blue" + if(ACCESS_CENT_SPECOPS) + return "Code Black" + if(ACCESS_CENT_CAPTAIN) + return "Code Gold" + if(ACCESS_CENT_BAR) + return "Code Scotch" + +/proc/get_all_jobs() + return list("Assistant", "Captain", "Head of Personnel", "Bartender", "Cook", "Botanist", "Quartermaster", "Cargo Technician", + "Shaft Miner", "Clown", "Mime", "Janitor", "Curator", "Lawyer", "Chaplain", "Chief Engineer", "Station Engineer", + "Atmospheric Technician", "Chief Medical Officer", "Medical Doctor", "Chemist", "Geneticist", "Virologist", + "Research Director", "Scientist", "Roboticist", "Head of Security", "Warden", "Detective", "Security Officer") + +/proc/get_all_job_icons() //For all existing HUD icons + return get_all_jobs() + list("Prisoner") + +/proc/get_all_centcom_jobs() + return list("VIP Guest","Custodian","Thunderdome Overseer","CentCom Official","Medical Officer","Death Commando","Research Officer","Special Ops Officer","Admiral","CentCom Commander","Emergency Response Team Commander","Security Response Officer","Engineer Response Officer", "Medical Response Officer","CentCom Bartender") + +/obj/item/proc/GetJobName() //Used in secHUD icon generation + var/obj/item/card/id/I = GetID() + if(!I) + return + var/jobName = I.assignment + if(jobName in get_all_job_icons()) //Check if the job has a hud icon + return jobName + if(jobName in get_all_centcom_jobs()) //Return with the NT logo if it is a CentCom job + return "CentCom" + return "Unknown" //Return unknown if none of the above apply diff --git a/code/modules/jobs/job_types/_job.dm b/code/modules/jobs/job_types/_job.dm index 2eeffa8b7a..a52b8589c3 100644 --- a/code/modules/jobs/job_types/_job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -61,6 +61,9 @@ var/display_order = JOB_DISPLAY_ORDER_DEFAULT + //If a job complies with dresscodes, loadout items will not be equipped instead of the job's outfit, instead placing the items into the player's backpack. + var/dresscodecompliant = TRUE + //Only override this proc //H is usually a human unless an /equip override transformed it /datum/job/proc/after_spawn(mob/living/H, mob/M, latejoin = FALSE) diff --git a/code/modules/jobs/job_types/assistant.dm b/code/modules/jobs/job_types/assistant.dm index c04560f849..da8c2aa3b9 100644 --- a/code/modules/jobs/job_types/assistant.dm +++ b/code/modules/jobs/job_types/assistant.dm @@ -15,6 +15,7 @@ Assistant outfit = /datum/outfit/job/assistant antag_rep = 7 display_order = JOB_DISPLAY_ORDER_ASSISTANT + dresscodecompliant = FALSE /datum/job/assistant/get_access() if(CONFIG_GET(flag/assistants_have_maint_access) || !CONFIG_GET(flag/jobs_have_minimal_access)) //Config has assistant maint access set diff --git a/code/modules/jobs/job_types/atmospheric_technician.dm b/code/modules/jobs/job_types/atmospheric_technician.dm index 93775beca9..300fcc7109 100644 --- a/code/modules/jobs/job_types/atmospheric_technician.dm +++ b/code/modules/jobs/job_types/atmospheric_technician.dm @@ -15,7 +15,8 @@ access = list(ACCESS_ENGINE, ACCESS_ENGINE_EQUIP, ACCESS_TECH_STORAGE, ACCESS_MAINT_TUNNELS, ACCESS_EXTERNAL_AIRLOCKS, ACCESS_CONSTRUCTION, ACCESS_ATMOSPHERICS, ACCESS_MINERAL_STOREROOM) - minimal_access = list(ACCESS_ATMOSPHERICS, ACCESS_MAINT_TUNNELS, ACCESS_CONSTRUCTION, ACCESS_MINERAL_STOREROOM) + minimal_access = list(ACCESS_ATMOSPHERICS, ACCESS_MAINT_TUNNELS, ACCESS_EXTERNAL_AIRLOCKS, ACCESS_ENGINE, + ACCESS_ENGINE_EQUIP, ACCESS_EMERGENCY_STORAGE, ACCESS_CONSTRUCTION, ACCESS_MINERAL_STOREROOM) display_order = JOB_DISPLAY_ORDER_ATMOSPHERIC_TECHNICIAN /datum/outfit/job/atmos diff --git a/code/modules/jobs/job_types/captain.dm b/code/modules/jobs/job_types/captain.dm index fea8557b40..c6342e2154 100644 --- a/code/modules/jobs/job_types/captain.dm +++ b/code/modules/jobs/job_types/captain.dm @@ -10,9 +10,9 @@ supervisors = "Nanotrasen officials and Space law" selection_color = "#aac1ee" req_admin_notify = 1 - minimal_player_age = 14 + minimal_player_age = 20 exp_requirements = 180 - exp_type = EXP_TYPE_CREW + exp_type = EXP_TYPE_COMMAND exp_type_department = EXP_TYPE_COMMAND outfit = /datum/outfit/job/captain diff --git a/code/modules/jobs/job_types/cargo_technician.dm b/code/modules/jobs/job_types/cargo_technician.dm index 3ceb29bae2..d6fbe5551f 100644 --- a/code/modules/jobs/job_types/cargo_technician.dm +++ b/code/modules/jobs/job_types/cargo_technician.dm @@ -11,7 +11,8 @@ outfit = /datum/outfit/job/cargo_tech - access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_QM, ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM) + access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_MINING, + ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM) minimal_access = list(ACCESS_MAINT_TUNNELS, ACCESS_CARGO, ACCESS_MAILSORTING, ACCESS_MINERAL_STOREROOM) display_order = JOB_DISPLAY_ORDER_CARGO_TECHNICIAN diff --git a/code/modules/jobs/job_types/chemist.dm b/code/modules/jobs/job_types/chemist.dm index a915d261ed..4614feba8d 100644 --- a/code/modules/jobs/job_types/chemist.dm +++ b/code/modules/jobs/job_types/chemist.dm @@ -32,5 +32,7 @@ satchel = /obj/item/storage/backpack/satchel/chem duffelbag = /obj/item/storage/backpack/duffelbag/med + backpack_contents = list(/obj/item/storage/hypospraykit/regular) + chameleon_extras = /obj/item/gun/syringe diff --git a/code/modules/jobs/job_types/chief_engineer.dm b/code/modules/jobs/job_types/chief_engineer.dm index da3f281267..f6505a4e2a 100644 --- a/code/modules/jobs/job_types/chief_engineer.dm +++ b/code/modules/jobs/job_types/chief_engineer.dm @@ -11,7 +11,7 @@ supervisors = "the captain" selection_color = "#ee7400" req_admin_notify = 1 - minimal_player_age = 7 + minimal_player_age = 10 exp_requirements = 180 exp_type = EXP_TYPE_CREW exp_type_department = EXP_TYPE_ENGINEERING diff --git a/code/modules/jobs/job_types/chief_medical_officer.dm b/code/modules/jobs/job_types/chief_medical_officer.dm index 4c7249f048..69eead70f7 100644 --- a/code/modules/jobs/job_types/chief_medical_officer.dm +++ b/code/modules/jobs/job_types/chief_medical_officer.dm @@ -11,7 +11,7 @@ supervisors = "the captain" selection_color = "#509ed1" req_admin_notify = 1 - minimal_player_age = 7 + minimal_player_age = 10 exp_requirements = 180 exp_type = EXP_TYPE_CREW exp_type_department = EXP_TYPE_MEDICAL diff --git a/code/modules/jobs/job_types/head_of_personnel.dm b/code/modules/jobs/job_types/head_of_personnel.dm index e320ce20b4..2b757872d9 100644 --- a/code/modules/jobs/job_types/head_of_personnel.dm +++ b/code/modules/jobs/job_types/head_of_personnel.dm @@ -11,7 +11,7 @@ supervisors = "the captain" selection_color = "#3a8529" req_admin_notify = 1 - minimal_player_age = 10 + minimal_player_age = 20 exp_requirements = 180 exp_type = EXP_TYPE_CREW exp_type_department = EXP_TYPE_SERVICE @@ -21,13 +21,13 @@ access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_COURT, ACCESS_WEAPONS, ACCESS_MEDICAL, ACCESS_ENGINE, ACCESS_CHANGE_IDS, ACCESS_AI_UPLOAD, ACCESS_EVA, ACCESS_HEADS, ACCESS_ALL_PERSONAL_LOCKERS, ACCESS_MAINT_TUNNELS, ACCESS_BAR, ACCESS_JANITOR, ACCESS_CONSTRUCTION, ACCESS_MORGUE, - ACCESS_CREMATORIUM, ACCESS_KITCHEN, ACCESS_CARGO, ACCESS_MAILSORTING, ACCESS_QM, ACCESS_HYDROPONICS, ACCESS_LAWYER, + ACCESS_CREMATORIUM, ACCESS_KITCHEN, ACCESS_HYDROPONICS, ACCESS_LAWYER, ACCESS_THEATRE, ACCESS_CHAPEL_OFFICE, ACCESS_LIBRARY, ACCESS_RESEARCH, ACCESS_MINING, ACCESS_VAULT, ACCESS_MINING_STATION, ACCESS_HOP, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM) minimal_access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_COURT, ACCESS_WEAPONS, ACCESS_MEDICAL, ACCESS_ENGINE, ACCESS_CHANGE_IDS, ACCESS_AI_UPLOAD, ACCESS_EVA, ACCESS_HEADS, ACCESS_ALL_PERSONAL_LOCKERS, ACCESS_MAINT_TUNNELS, ACCESS_BAR, ACCESS_JANITOR, ACCESS_CONSTRUCTION, ACCESS_MORGUE, - ACCESS_CREMATORIUM, ACCESS_KITCHEN, ACCESS_CARGO, ACCESS_MAILSORTING, ACCESS_QM, ACCESS_HYDROPONICS, ACCESS_LAWYER, + ACCESS_CREMATORIUM, ACCESS_KITCHEN, ACCESS_HYDROPONICS, ACCESS_LAWYER, ACCESS_THEATRE, ACCESS_CHAPEL_OFFICE, ACCESS_LIBRARY, ACCESS_RESEARCH, ACCESS_MINING, ACCESS_VAULT, ACCESS_MINING_STATION, ACCESS_HOP, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM) diff --git a/code/modules/jobs/job_types/head_of_security.dm b/code/modules/jobs/job_types/head_of_security.dm index 33c8856d81..c190d88bc7 100644 --- a/code/modules/jobs/job_types/head_of_security.dm +++ b/code/modules/jobs/job_types/head_of_security.dm @@ -11,7 +11,7 @@ supervisors = "the captain" selection_color = "#b90000" req_admin_notify = 1 - minimal_player_age = 14 + minimal_player_age = 10 exp_requirements = 300 exp_type = EXP_TYPE_CREW exp_type_department = EXP_TYPE_SECURITY diff --git a/code/modules/jobs/job_types/medical_doctor.dm b/code/modules/jobs/job_types/medical_doctor.dm index 19fa1c7158..2a8814f29c 100644 --- a/code/modules/jobs/job_types/medical_doctor.dm +++ b/code/modules/jobs/job_types/medical_doctor.dm @@ -32,4 +32,6 @@ satchel = /obj/item/storage/backpack/satchel/med duffelbag = /obj/item/storage/backpack/duffelbag/med + backpack_contents = list(/obj/item/storage/hypospraykit/regular) + chameleon_extras = /obj/item/gun/syringe diff --git a/code/modules/jobs/job_types/quartermaster.dm b/code/modules/jobs/job_types/quartermaster.dm index 49a93026ba..ad57d05cdc 100644 --- a/code/modules/jobs/job_types/quartermaster.dm +++ b/code/modules/jobs/job_types/quartermaster.dm @@ -11,17 +11,19 @@ supervisors = "the captain" selection_color = "#a06121" req_admin_notify = 1 - minimal_player_age = 7 + minimal_player_age = 10 exp_requirements = 180 exp_type = EXP_TYPE_CREW exp_type_department = EXP_TYPE_SUPPLY outfit = /datum/outfit/job/quartermaster - access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_QM, ACCESS_MINING, ACCESS_MINING_STATION, - ACCESS_MINERAL_STOREROOM, ACCESS_VAULT) - minimal_access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_QM, ACCESS_MINING, - ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM, ACCESS_VAULT) + access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_QM, ACCESS_MINING, + ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM, ACCESS_KEYCARD_AUTH, ACCESS_RC_ANNOUNCE, + ACCESS_SEC_DOORS, ACCESS_HEADS) + minimal_access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_QM, ACCESS_MINING, + ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM, ACCESS_KEYCARD_AUTH, ACCESS_RC_ANNOUNCE, + ACCESS_SEC_DOORS, ACCESS_HEADS) display_order = JOB_DISPLAY_ORDER_QUARTERMASTER blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity) @@ -31,11 +33,13 @@ jobtype = /datum/job/qm belt = /obj/item/pda/quartermaster - ears = /obj/item/radio/headset/headset_cargo + ears = /obj/item/radio/headset/heads/qm uniform = /obj/item/clothing/under/rank/cargo shoes = /obj/item/clothing/shoes/sneakers/brown glasses = /obj/item/clothing/glasses/sunglasses l_hand = /obj/item/clipboard + id = /obj/item/card/id/silver + backpack_contents = list(/obj/item/melee/classic_baton/telescopic = 1, /obj/item/modular_computer/tablet/preset/advanced = 1) chameleon_extras = /obj/item/stamp/qm diff --git a/code/modules/jobs/job_types/research_director.dm b/code/modules/jobs/job_types/research_director.dm index 5368ceee64..a90c5cea6c 100644 --- a/code/modules/jobs/job_types/research_director.dm +++ b/code/modules/jobs/job_types/research_director.dm @@ -11,7 +11,7 @@ supervisors = "the captain" selection_color = "#7544cc" req_admin_notify = 1 - minimal_player_age = 7 + minimal_player_age = 10 exp_type_department = EXP_TYPE_SCIENCE exp_requirements = 180 exp_type = EXP_TYPE_CREW diff --git a/code/modules/jobs/job_types/shaft_miner.dm b/code/modules/jobs/job_types/shaft_miner.dm index ef16d8e53f..771fc02862 100644 --- a/code/modules/jobs/job_types/shaft_miner.dm +++ b/code/modules/jobs/job_types/shaft_miner.dm @@ -13,7 +13,8 @@ outfit = /datum/outfit/job/miner - access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_QM, ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM) + access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_MINING, + ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM) minimal_access = list(ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MAILSORTING, ACCESS_MINERAL_STOREROOM) display_order = JOB_DISPLAY_ORDER_SHAFT_MINER @@ -47,7 +48,7 @@ name = "Shaft Miner (Asteroid)" uniform = /obj/item/clothing/under/rank/miner shoes = /obj/item/clothing/shoes/workboots - + /datum/outfit/job/miner/equipped name = "Shaft Miner (Lavaland + Equipment)" suit = /obj/item/clothing/suit/hooded/explorer/standard diff --git a/code/modules/jobs/job_types/warden.dm b/code/modules/jobs/job_types/warden.dm index 1787d13ee3..9c529f45f3 100644 --- a/code/modules/jobs/job_types/warden.dm +++ b/code/modules/jobs/job_types/warden.dm @@ -42,7 +42,7 @@ glasses = /obj/item/clothing/glasses/hud/security/sunglasses r_pocket = /obj/item/assembly/flash/handheld l_pocket = /obj/item/restraints/handcuffs - suit_store = /obj/item/gun/energy/e_gun/advtaser + suit_store = /obj/item/gun/energy/pumpaction/defender backpack_contents = list(/obj/item/melee/baton/loaded=1) backpack = /obj/item/storage/backpack/security diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index ee563f3100..7dc4fd17b9 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/lighting/lighting_object.dm b/code/modules/lighting/lighting_object.dm index c0c5a411e7..9ceb341f91 100644 --- a/code/modules/lighting/lighting_object.dm +++ b/code/modules/lighting/lighting_object.dm @@ -5,7 +5,7 @@ icon = LIGHTING_ICON icon_state = "transparent" - color = LIGHTING_BASE_MATRIX + color = null //we manually set color in init instead plane = LIGHTING_PLANE mouse_opacity = MOUSE_OPACITY_TRANSPARENT layer = LIGHTING_LAYER @@ -17,6 +17,9 @@ /atom/movable/lighting_object/Initialize(mapload) . = ..() verbs.Cut() + //We avoid setting this in the base as if we do then the parent atom handling will add_atom_color it and that + //is totally unsuitable for this object, as we are always changing its colour manually + color = LIGHTING_BASE_MATRIX myturf = loc if (myturf.lighting_object) diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index 4ebff202e9..e146f1686a 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -205,7 +205,7 @@ resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF var/mob/living/carbon/human/active_owner -/obj/item/clothing/neck/necklace/memento_mori/item_action_slot_check(slot) +/obj/item/clothing/neck/necklace/memento_mori/item_action_slot_check(slot, mob/user, datum/action/A) return slot == SLOT_NECK /obj/item/clothing/neck/necklace/memento_mori/dropped(mob/user) diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm index a004a6ae0d..4d8624864e 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 8fdc50d2ac..c42f1b9f4e 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 6b03be610d..8204977058 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 f567bd1daf..fd5997d3c4 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/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index 591fc650b4..4d253a4693 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -151,7 +151,7 @@ message_admins(msg) to_chat(usr, "The round is either not ready, or has already finished...") return - + if(!GLOB.enter_allowed) to_chat(usr, "There is an administrative lock on entering the game!") return diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index 625a923fe1..41d3d4e158 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) diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 760fb7a29f..e77a91332e 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -468,3 +468,6 @@ bodyparts += BP hand_bodyparts[i] = BP ..() //Don't redraw hands until we have organs for them + +/mob/canReachInto(atom/user, atom/target, list/next, view_only, obj/item/tool) + return ..() && (user == src) diff --git a/code/modules/mob/living/brain/posibrain.dm b/code/modules/mob/living/brain/posibrain.dm index 9e0bb0428b..8a70ccc4cb 100644 --- a/code/modules/mob/living/brain/posibrain.dm +++ b/code/modules/mob/living/brain/posibrain.dm @@ -92,6 +92,17 @@ GLOBAL_VAR(posibrain_notify_cooldown) if(posi_ask == "No" || QDELETED(src)) return transfer_personality(user) + latejoin_remove() + +/obj/item/mmi/posibrain/Destroy() + latejoin_remove() + return ..() + +/obj/item/mmi/posibrain/proc/latejoin_remove() + GLOB.poi_list -= src + LAZYREMOVE(GLOB.mob_spawners[name], src) + if(!LAZYLEN(GLOB.mob_spawners[name])) + GLOB.mob_spawners -= name /obj/item/mmi/posibrain/transfer_identity(mob/living/carbon/C) name = "[initial(name)] ([C])" @@ -163,6 +174,8 @@ GLOBAL_VAR(posibrain_notify_cooldown) brainmob.container = src if(autoping) ping_ghosts("created", TRUE) + GLOB.poi_list |= src + LAZYADD(GLOB.mob_spawners[name], src) /obj/item/mmi/posibrain/attackby(obj/item/O, mob/user) return diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 263edf42c2..88aa5f86d0 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -905,7 +905,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) @@ -947,7 +947,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 bc64c8303b..b0e9b808df 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -287,7 +287,7 @@ "You give [H] a pat on the head to make [p_them()] feel better!") 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) @@ -322,7 +322,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/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm index b509b31e5f..7d1e5320fc 100644 --- a/code/modules/mob/living/carbon/damage_procs.dm +++ b/code/modules/mob/living/carbon/damage_procs.dm @@ -1,8 +1,8 @@ -/mob/living/carbon/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked = FALSE) +/mob/living/carbon/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE) var/hit_percent = (100-blocked)/100 - if(hit_percent <= 0) + if(!forced && hit_percent <= 0) return 0 var/obj/item/bodypart/BP = null @@ -15,34 +15,35 @@ if(!BP) BP = bodyparts[1] + var/damage_amount = forced ? damage : damage * hit_percent switch(damagetype) if(BRUTE) if(BP) - if(damage > 0 ? BP.receive_damage(damage * hit_percent, 0) : BP.heal_damage(abs(damage * hit_percent), 0)) + if(damage > 0 ? BP.receive_damage(damage_amount) : BP.heal_damage(abs(damage_amount), 0)) update_damage_overlays() else //no bodypart, we deal damage with a more general method. - adjustBruteLoss(damage * hit_percent) + adjustBruteLoss(damage_amount, forced = forced) if(BURN) if(BP) - if(damage > 0 ? BP.receive_damage(0, damage * hit_percent) : BP.heal_damage(0, abs(damage * hit_percent))) + if(damage > 0 ? BP.receive_damage(0, damage_amount) : BP.heal_damage(0, abs(damage_amount))) update_damage_overlays() else - adjustFireLoss(damage * hit_percent) + adjustFireLoss(damage_amount, forced = forced) if(TOX) - adjustToxLoss(damage * hit_percent) + adjustToxLoss(damage_amount, forced = forced) if(OXY) - adjustOxyLoss(damage * hit_percent) + adjustOxyLoss(damage_amount, forced = forced) if(CLONE) - adjustCloneLoss(damage * hit_percent) + adjustCloneLoss(damage_amount, forced = forced) if(STAMINA) if(BP) - if(damage > 0 ? BP.receive_damage(0, 0, damage * hit_percent) : BP.heal_damage(0, 0, abs(damage * hit_percent))) + if(damage > 0 ? BP.receive_damage(0, 0, damage_amount) : BP.heal_damage(0, 0, abs(damage_amount))) update_damage_overlays() else - adjustStaminaLoss(damage * hit_percent) + adjustStaminaLoss(damage_amount, forced = forced) //citadel code if(AROUSAL) - adjustArousalLoss(damage * hit_percent) + adjustArousalLoss(damage_amount, forced = forced) return TRUE diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm index c029eac12b..5634d21775 100644 --- a/code/modules/mob/living/carbon/examine.dm +++ b/code/modules/mob/living/carbon/examine.dm @@ -93,7 +93,7 @@ msg += "[t_He] [t_is] visibly tense[resting ? "." : ", and [t_is] standing in combative stance."]\n" msg += common_trait_examine() - 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/damage_procs.dm b/code/modules/mob/living/carbon/human/damage_procs.dm index 7641408529..9f6a572fc8 100644 --- a/code/modules/mob/living/carbon/human/damage_procs.dm +++ b/code/modules/mob/living/carbon/human/damage_procs.dm @@ -1,5 +1,5 @@ -/mob/living/carbon/human/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE) +/mob/living/carbon/human/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE) // depending on the species, it will run the corresponding apply_damage code there - return dna.species.apply_damage(damage, damagetype, def_zone, blocked, src) + return dna.species.apply_damage(damage, damagetype, def_zone, blocked, src, forced) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index a4eee82e0c..7b0fb74f44 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -296,7 +296,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/human.dm b/code/modules/mob/living/carbon/human/human.dm index f2ca5bc939..0e6ac72abf 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -32,7 +32,7 @@ if(CONFIG_GET(flag/disable_stambuffer)) togglesprint() - AddComponent(/datum/component/redirect, list(COMSIG_COMPONENT_CLEAN_ACT = CALLBACK(src, /mob/living/carbon/human/clean_blood))) + RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, /mob/living/carbon/human/clean_blood) /mob/living/carbon/human/ComponentInitialize() diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index eee425063d..c54f41017a 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -1,14 +1,14 @@ /mob/living/carbon/human/say_mod(input, message_mode) verb_say = dna.species.say_mod - switch(slurring) - if(10 to 25) - return "jumbles" - if(25 to 50) - return "slurs" - if(50 to INFINITY) - return "garbles" - else - . = ..() + . = ..() + if(message_mode != MODE_CUSTOM_SAY && message_mode != MODE_WHISPER_CRIT) + switch(slurring) + if(10 to 25) + return "jumbles" + if(25 to 50) + return "slurs" + if(50 to INFINITY) + return "garbles" /mob/living/carbon/human/GetVoice() if(istype(wear_mask, /obj/item/clothing/mask/chameleon)) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 34b8abc311..f9b4654793 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1290,7 +1290,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) 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 @@ -1448,7 +1448,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) 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) @@ -1959,10 +1959,10 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) append_message = "loosening their grip on [target_held_item]" log_combat(user, target, "shoved", append_message) -/datum/species/proc/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H) +/datum/species/proc/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H, forced = FALSE) var/hit_percent = (100-(blocked+armor))/100 hit_percent = (hit_percent * (100-H.physiology.damage_resistance))/100 - if(hit_percent <= 0) + if(!forced && hit_percent <= 0) return 0 var/obj/item/bodypart/BP = null @@ -1984,37 +1984,44 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) switch(damagetype) if(BRUTE) H.damageoverlaytemp = 20 + var/damage_amount = forced ? damage : damage * hit_percent * brutemod * H.physiology.brute_mod if(BP) - if(damage > 0 ? BP.receive_damage(damage * hit_percent * brutemod * H.physiology.brute_mod, 0) : BP.heal_damage(abs(damage * hit_percent * brutemod * H.physiology.brute_mod), 0)) + if(damage > 0 ? BP.receive_damage(damage_amount, 0) : BP.heal_damage(abs(damage_amount), 0)) H.update_damage_overlays() if(HAS_TRAIT(H, TRAIT_MASO)) - H.adjustArousalLoss(damage * brutemod * H.physiology.brute_mod) + H.adjustArousalLoss(damage_amount, 0) if (H.getArousalLoss() >= 100 && ishuman(H) && H.has_dna()) H.mob_climax(forced_climax=TRUE) else//no bodypart, we deal damage with a more general method. - H.adjustBruteLoss(damage * hit_percent * brutemod * H.physiology.brute_mod) + H.adjustBruteLoss(damage_amount) if(BURN) H.damageoverlaytemp = 20 + var/damage_amount = forced ? damage : damage * hit_percent * burnmod * H.physiology.burn_mod if(BP) - if(damage > 0 ? BP.receive_damage(0, damage * hit_percent * burnmod * H.physiology.burn_mod) : BP.heal_damage(0, abs(damage * hit_percent * burnmod * H.physiology.burn_mod))) + if(damage > 0 ? BP.receive_damage(0, damage_amount) : BP.heal_damage(0, abs(damage_amount))) H.update_damage_overlays() else - H.adjustFireLoss(damage * hit_percent * burnmod * H.physiology.burn_mod) + H.adjustFireLoss(damage_amount) if(TOX) - H.adjustToxLoss(damage * hit_percent * H.physiology.tox_mod) + var/damage_amount = forced ? damage : damage * hit_percent * H.physiology.tox_mod + H.adjustToxLoss(damage_amount) if(OXY) - H.adjustOxyLoss(damage * hit_percent * H.physiology.oxy_mod) + var/damage_amount = forced ? damage : damage * hit_percent * H.physiology.oxy_mod + H.adjustOxyLoss(damage_amount) if(CLONE) - H.adjustCloneLoss(damage * hit_percent * H.physiology.clone_mod) + var/damage_amount = forced ? damage : damage * hit_percent * H.physiology.clone_mod + H.adjustCloneLoss(damage_amount) if(STAMINA) + var/damage_amount = forced ? damage : damage * hit_percent * H.physiology.stamina_mod if(BP) - if(damage > 0 ? BP.receive_damage(0, 0, damage * hit_percent * H.physiology.stamina_mod) : BP.heal_damage(0, 0, abs(damage * hit_percent * H.physiology.stamina_mod), only_robotic = FALSE, only_organic = FALSE)) + if(damage > 0 ? BP.receive_damage(0, 0, damage_amount) : BP.heal_damage(0, 0, abs(damage * hit_percent * H.physiology.stamina_mod), only_robotic = FALSE, only_organic = FALSE)) H.update_stamina() else - H.adjustStaminaLoss(damage * hit_percent * H.physiology.stamina_mod) + H.adjustStaminaLoss(damage_amount) if(BRAIN) - H.adjustOrganLoss(ORGAN_SLOT_BRAIN, damage * hit_percent * H.physiology.brain_mod) + var/damage_amount = forced ? damage : damage * hit_percent * H.physiology.brain_mod + H.adjustOrganLoss(ORGAN_SLOT_BRAIN, damage_amount) if(AROUSAL) //Citadel edit - arousal H.adjustArousalLoss(damage * hit_percent) return 1 diff --git a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm index 8f84590ff4..a7e952f430 100644 --- a/code/modules/mob/living/carbon/human/species_types/golems.dm +++ b/code/modules/mob/living/carbon/human/species_types/golems.dm @@ -634,9 +634,10 @@ id = "clockwork golem" say_mod = "clicks" limbs_id = "clockgolem" - info_text = "As a Clockwork Golem, you are faster than other types of golems. On death, you will break down into scrap." + info_text = "As a Clockwork Golem, you are faster than other types of golems, and are capable of using guns. On death, you will break down into scrap." species_traits = list(NOBLOOD,NO_UNDERWEAR,NOEYES,NOGENITALS,NOAROUSAL) inherent_biotypes = list(MOB_ROBOTIC, MOB_HUMANOID) + inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_NOFIRE,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NODISMEMBER) armor = 20 //Reinforced, but much less so to allow for fast movement attack_verb = "smash" attack_sound = 'sound/magic/clockwork/anima_fragment_attack.ogg' @@ -682,7 +683,7 @@ blacklisted = TRUE dangerous_existence = TRUE random_eligible = FALSE - info_text = "As a Clockwork Golem Servant, you are faster than other types of golems." //warcult golems leave a corpse + info_text = "As a Clockwork Golem Servant, you are faster than other types of golems, and are capable of using guns." //warcult golems leave a corpse /datum/species/golem/cloth name = "Cloth Golem" diff --git a/code/modules/mob/living/carbon/human/species_types/zombies.dm b/code/modules/mob/living/carbon/human/species_types/zombies.dm index fefaa025d3..a1dce4fb0f 100644 --- a/code/modules/mob/living/carbon/human/species_types/zombies.dm +++ b/code/modules/mob/living/carbon/human/species_types/zombies.dm @@ -45,7 +45,7 @@ /datum/species/zombie/infectious/spec_stun(mob/living/carbon/human/H,amount) . = min(20, amount) -/datum/species/zombie/infectious/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H) +/datum/species/zombie/infectious/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H, forced = FALSE) . = ..() if(.) regen_cooldown = world.time + REGENERATION_DELAY diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index fbb6074ba2..dc43ab8b07 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -8,23 +8,24 @@ Returns standard 0 if fail */ -/mob/living/proc/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE) +/mob/living/proc/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE) var/hit_percent = (100-blocked)/100 if(!damage || (hit_percent <= 0)) return 0 + var/damage_amount = forced ? damage : damage * hit_percent switch(damagetype) if(BRUTE) - adjustBruteLoss(damage * hit_percent) + adjustBruteLoss(damage_amount, forced = forced) if(BURN) - adjustFireLoss(damage * hit_percent) + adjustFireLoss(damage_amount, forced = forced) if(TOX) - adjustToxLoss(damage * hit_percent) + adjustToxLoss(damage_amount, forced = forced) if(OXY) - adjustOxyLoss(damage * hit_percent) + adjustOxyLoss(damage_amount, forced = forced) if(CLONE) - adjustCloneLoss(damage * hit_percent) + adjustCloneLoss(damage_amount, forced = forced) if(STAMINA) - adjustStaminaLoss(damage * hit_percent) + adjustStaminaLoss(damage_amount, forced = forced) return 1 /mob/living/proc/apply_damage_type(damage = 0, damagetype = BRUTE) //like apply damage except it always uses the damage procs diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index f640d50022..5aa8ce8cfa 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -502,7 +502,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/say.dm b/code/modules/mob/living/say.dm index 5664c2ebca..174fd5c394 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -391,16 +391,16 @@ GLOBAL_LIST_INIT(department_radio_keys, list( return 0 /mob/living/say_mod(input, message_mode) - if(message_mode == MODE_WHISPER) - . = verb_whisper - else if(message_mode == MODE_WHISPER_CRIT) + . = ..() + if(message_mode == MODE_WHISPER_CRIT) . = "[verb_whisper] in [p_their()] last breath" - else if(stuttering) - . = "stammers" - else if(derpspeech) - . = "gibbers" - else - . = ..() + else if(message_mode != MODE_CUSTOM_SAY) + if(message_mode == MODE_WHISPER) + . = verb_whisper + else if(stuttering) + . = "stammers" + else if(derpspeech) + . = "gibbers" /mob/living/whisper(message, bubble_type, list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null) say("#[message]", bubble_type, spans, sanitize, language, ignore_spam, forced) diff --git a/code/modules/mob/living/silicon/ai/vox_sounds.dm b/code/modules/mob/living/silicon/ai/vox_sounds.dm index eb6d0ce991..50a808032d 100644 --- a/code/modules/mob/living/silicon/ai/vox_sounds.dm +++ b/code/modules/mob/living/silicon/ai/vox_sounds.dm @@ -975,4 +975,635 @@ GLOBAL_LIST_INIT(vox_sounds, list("abduction" = 'sound/vox_fem/abduction.ogg', "zombie" = 'sound/vox_fem/zombie.ogg', "zone" = 'sound/vox_fem/zone.ogg', "zulu" = 'sound/vox_fem/zulu.ogg')) + +//for vim +// :%s/\(\(.*\)\.ogg\)/"\2" = 'sound\/vox\/\1',/g +GLOBAL_LIST_INIT(vox_sounds_male, list("," = 'sound/vox/_comma.ogg', +"." = 'sound/vox/_period.ogg', +"a" = 'sound/vox/a.ogg', +"accelerating" = 'sound/vox/accelerating.ogg', +"accelerator" = 'sound/vox/accelerator.ogg', +"accepted" = 'sound/vox/accepted.ogg', +"access" = 'sound/vox/access.ogg', +"acknowledge" = 'sound/vox/acknowledge.ogg', +"acknowledged" = 'sound/vox/acknowledged.ogg', +"acquired" = 'sound/vox/acquired.ogg', +"acquisition" = 'sound/vox/acquisition.ogg', +"across" = 'sound/vox/across.ogg', +"activate" = 'sound/vox/activate.ogg', +"activated" = 'sound/vox/activated.ogg', +"activity" = 'sound/vox/activity.ogg', +"adios" = 'sound/vox/adios.ogg', +"administration" = 'sound/vox/administration.ogg', +"advanced" = 'sound/vox/advanced.ogg', +"after" = 'sound/vox/after.ogg', +"agent" = 'sound/vox/agent.ogg', +"alarm" = 'sound/vox/alarm.ogg', +"alert" = 'sound/vox/alert.ogg', +"alien" = 'sound/vox/alien.ogg', +"aligned" = 'sound/vox/aligned.ogg', +"all" = 'sound/vox/all.ogg', +"alpha" = 'sound/vox/alpha.ogg', +"am" = 'sound/vox/am.ogg', +"amigo" = 'sound/vox/amigo.ogg', +"ammunition" = 'sound/vox/ammunition.ogg', +"an" = 'sound/vox/an.ogg', +"and" = 'sound/vox/and.ogg', +"announcement" = 'sound/vox/announcement.ogg', +"anomalous" = 'sound/vox/anomalous.ogg', +"antenna" = 'sound/vox/antenna.ogg', +"any" = 'sound/vox/any.ogg', +"apprehend" = 'sound/vox/apprehend.ogg', +"approach" = 'sound/vox/approach.ogg', +"are" = 'sound/vox/are.ogg', +"area" = 'sound/vox/area.ogg', +"arm" = 'sound/vox/arm.ogg', +"armed" = 'sound/vox/armed.ogg', +"armor" = 'sound/vox/armor.ogg', +"armory" = 'sound/vox/armory.ogg', +"arrest" = 'sound/vox/arrest.ogg', +"ass" = 'sound/vox/ass.ogg', +"at" = 'sound/vox/at.ogg', +"atomic" = 'sound/vox/atomic.ogg', +"attention" = 'sound/vox/attention.ogg', +"authorize" = 'sound/vox/authorize.ogg', +"authorized" = 'sound/vox/authorized.ogg', +"automatic" = 'sound/vox/automatic.ogg', +"away" = 'sound/vox/away.ogg', +"b" = 'sound/vox/b.ogg', +"back" = 'sound/vox/back.ogg', +"backman" = 'sound/vox/backman.ogg', +"bad" = 'sound/vox/bad.ogg', +"bag" = 'sound/vox/bag.ogg', +"bailey" = 'sound/vox/bailey.ogg', +"barracks" = 'sound/vox/barracks.ogg', +"base" = 'sound/vox/base.ogg', +"bay" = 'sound/vox/bay.ogg', +"be" = 'sound/vox/be.ogg', +"been" = 'sound/vox/been.ogg', +"before" = 'sound/vox/before.ogg', +"beyond" = 'sound/vox/beyond.ogg', +"biohazard" = 'sound/vox/biohazard.ogg', +"biological" = 'sound/vox/biological.ogg', +"birdwell" = 'sound/vox/birdwell.ogg', +"bizwarn" = 'sound/vox/bizwarn.ogg', +"black" = 'sound/vox/black.ogg', +"blast" = 'sound/vox/blast.ogg', +"blocked" = 'sound/vox/blocked.ogg', +"bloop" = 'sound/vox/bloop.ogg', +"blue" = 'sound/vox/blue.ogg', +"bottom" = 'sound/vox/bottom.ogg', +"bravo" = 'sound/vox/bravo.ogg', +"breach" = 'sound/vox/breach.ogg', +"breached" = 'sound/vox/breached.ogg', +"break" = 'sound/vox/break.ogg', +"bridge" = 'sound/vox/bridge.ogg', +"bust" = 'sound/vox/bust.ogg', +"but" = 'sound/vox/but.ogg', +"button" = 'sound/vox/button.ogg', +"buzwarn" = 'sound/vox/buzwarn.ogg', +"bypass" = 'sound/vox/bypass.ogg', +"c" = 'sound/vox/c.ogg', +"cable" = 'sound/vox/cable.ogg', +"call" = 'sound/vox/call.ogg', +"called" = 'sound/vox/called.ogg', +"canal" = 'sound/vox/canal.ogg', +"cap" = 'sound/vox/cap.ogg', +"captain" = 'sound/vox/captain.ogg', +"capture" = 'sound/vox/capture.ogg', +"captured" = 'sound/vox/captured.ogg', +"ceiling" = 'sound/vox/ceiling.ogg', +"celsius" = 'sound/vox/celsius.ogg', +"center" = 'sound/vox/center.ogg', +"centi" = 'sound/vox/centi.ogg', +"central" = 'sound/vox/central.ogg', +"chamber" = 'sound/vox/chamber.ogg', +"charlie" = 'sound/vox/charlie.ogg', +"check" = 'sound/vox/check.ogg', +"checkpoint" = 'sound/vox/checkpoint.ogg', +"chemical" = 'sound/vox/chemical.ogg', +"cleanup" = 'sound/vox/cleanup.ogg', +"clear" = 'sound/vox/clear.ogg', +"clearance" = 'sound/vox/clearance.ogg', +"close" = 'sound/vox/close.ogg', +"clown" = 'sound/vox/clown.ogg', +"code" = 'sound/vox/code.ogg', +"coded" = 'sound/vox/coded.ogg', +"collider" = 'sound/vox/collider.ogg', +"command" = 'sound/vox/command.ogg', +"communication" = 'sound/vox/communication.ogg', +"complex" = 'sound/vox/complex.ogg', +"computer" = 'sound/vox/computer.ogg', +"condition" = 'sound/vox/condition.ogg', +"containment" = 'sound/vox/containment.ogg', +"contamination" = 'sound/vox/contamination.ogg', +"control" = 'sound/vox/control.ogg', +"coolant" = 'sound/vox/coolant.ogg', +"coomer" = 'sound/vox/coomer.ogg', +"core" = 'sound/vox/core.ogg', +"correct" = 'sound/vox/correct.ogg', +"corridor" = 'sound/vox/corridor.ogg', +"crew" = 'sound/vox/crew.ogg', +"cross" = 'sound/vox/cross.ogg', +"cryogenic" = 'sound/vox/cryogenic.ogg', +"d" = 'sound/vox/d.ogg', +"dadeda" = 'sound/vox/dadeda.ogg', +"damage" = 'sound/vox/damage.ogg', +"damaged" = 'sound/vox/damaged.ogg', +"danger" = 'sound/vox/danger.ogg', +"day" = 'sound/vox/day.ogg', +"deactivated" = 'sound/vox/deactivated.ogg', +"decompression" = 'sound/vox/decompression.ogg', +"decontamination" = 'sound/vox/decontamination.ogg', +"deeoo" = 'sound/vox/deeoo.ogg', +"defense" = 'sound/vox/defense.ogg', +"degrees" = 'sound/vox/degrees.ogg', +"delta" = 'sound/vox/delta.ogg', +"denied" = 'sound/vox/denied.ogg', +"deploy" = 'sound/vox/deploy.ogg', +"deployed" = 'sound/vox/deployed.ogg', +"destroy" = 'sound/vox/destroy.ogg', +"destroyed" = 'sound/vox/destroyed.ogg', +"detain" = 'sound/vox/detain.ogg', +"detected" = 'sound/vox/detected.ogg', +"detonation" = 'sound/vox/detonation.ogg', +"device" = 'sound/vox/device.ogg', +"did" = 'sound/vox/did.ogg', +"die" = 'sound/vox/die.ogg', +"dimensional" = 'sound/vox/dimensional.ogg', +"dirt" = 'sound/vox/dirt.ogg', +"disengaged" = 'sound/vox/disengaged.ogg', +"dish" = 'sound/vox/dish.ogg', +"disposal" = 'sound/vox/disposal.ogg', +"distance" = 'sound/vox/distance.ogg', +"distortion" = 'sound/vox/distortion.ogg', +"do" = 'sound/vox/do.ogg', +"doctor" = 'sound/vox/doctor.ogg', +"doop" = 'sound/vox/doop.ogg', +"door" = 'sound/vox/door.ogg', +"down" = 'sound/vox/down.ogg', +"dual" = 'sound/vox/dual.ogg', +"duct" = 'sound/vox/duct.ogg', +"e" = 'sound/vox/e.ogg', +"east" = 'sound/vox/east.ogg', +"echo" = 'sound/vox/echo.ogg', +"ed" = 'sound/vox/ed.ogg', +"effect" = 'sound/vox/effect.ogg', +"egress" = 'sound/vox/egress.ogg', +"eight" = 'sound/vox/eight.ogg', +"eighteen" = 'sound/vox/eighteen.ogg', +"eighty" = 'sound/vox/eighty.ogg', +"electric" = 'sound/vox/electric.ogg', +"electromagnetic" = 'sound/vox/electromagnetic.ogg', +"elevator" = 'sound/vox/elevator.ogg', +"eleven" = 'sound/vox/eleven.ogg', +"eliminate" = 'sound/vox/eliminate.ogg', +"emergency" = 'sound/vox/emergency.ogg', +"enemy" = 'sound/vox/enemy.ogg', +"energy" = 'sound/vox/energy.ogg', +"engage" = 'sound/vox/engage.ogg', +"engaged" = 'sound/vox/engaged.ogg', +"engine" = 'sound/vox/engine.ogg', +"enter" = 'sound/vox/enter.ogg', +"entry" = 'sound/vox/entry.ogg', +"environment" = 'sound/vox/environment.ogg', +"error" = 'sound/vox/error.ogg', +"escape" = 'sound/vox/escape.ogg', +"evacuate" = 'sound/vox/evacuate.ogg', +"exchange" = 'sound/vox/exchange.ogg', +"exit" = 'sound/vox/exit.ogg', +"expect" = 'sound/vox/expect.ogg', +"experiment" = 'sound/vox/experiment.ogg', +"experimental" = 'sound/vox/experimental.ogg', +"explode" = 'sound/vox/explode.ogg', +"explosion" = 'sound/vox/explosion.ogg', +"exposure" = 'sound/vox/exposure.ogg', +"exterminate" = 'sound/vox/exterminate.ogg', +"extinguish" = 'sound/vox/extinguish.ogg', +"extinguisher" = 'sound/vox/extinguisher.ogg', +"extreme" = 'sound/vox/extreme.ogg', +"f" = 'sound/vox/f.ogg', +"face" = 'sound/vox/face.ogg', +"facility" = 'sound/vox/facility.ogg', +"fahrenheit" = 'sound/vox/fahrenheit.ogg', +"failed" = 'sound/vox/failed.ogg', +"failure" = 'sound/vox/failure.ogg', +"farthest" = 'sound/vox/farthest.ogg', +"fast" = 'sound/vox/fast.ogg', +"feet" = 'sound/vox/feet.ogg', +"field" = 'sound/vox/field.ogg', +"fifteen" = 'sound/vox/fifteen.ogg', +"fifth" = 'sound/vox/fifth.ogg', +"fifty" = 'sound/vox/fifty.ogg', +"final" = 'sound/vox/final.ogg', +"fine" = 'sound/vox/fine.ogg', +"fire" = 'sound/vox/fire.ogg', +"first" = 'sound/vox/first.ogg', +"five" = 'sound/vox/five.ogg', +"flag" = 'sound/vox/flag.ogg', +"flooding" = 'sound/vox/flooding.ogg', +"floor" = 'sound/vox/floor.ogg', +"fool" = 'sound/vox/fool.ogg', +"for" = 'sound/vox/for.ogg', +"forbidden" = 'sound/vox/forbidden.ogg', +"force" = 'sound/vox/force.ogg', +"forms" = 'sound/vox/forms.ogg', +"found" = 'sound/vox/found.ogg', +"four" = 'sound/vox/four.ogg', +"fourteen" = 'sound/vox/fourteen.ogg', +"fourth" = 'sound/vox/fourth.ogg', +"fourty" = 'sound/vox/fourty.ogg', +"foxtrot" = 'sound/vox/foxtrot.ogg', +"freeman" = 'sound/vox/freeman.ogg', +"freezer" = 'sound/vox/freezer.ogg', +"from" = 'sound/vox/from.ogg', +"front" = 'sound/vox/front.ogg', +"fuel" = 'sound/vox/fuel.ogg', +"g" = 'sound/vox/g.ogg', +"gay" = 'sound/vox/gay.ogg', +"get" = 'sound/vox/get.ogg', +"go" = 'sound/vox/go.ogg', +"going" = 'sound/vox/going.ogg', +"good" = 'sound/vox/good.ogg', +"goodbye" = 'sound/vox/goodbye.ogg', +"gordon" = 'sound/vox/gordon.ogg', +"got" = 'sound/vox/got.ogg', +"government" = 'sound/vox/government.ogg', +"granted" = 'sound/vox/granted.ogg', +"great" = 'sound/vox/great.ogg', +"green" = 'sound/vox/green.ogg', +"grenade" = 'sound/vox/grenade.ogg', +"guard" = 'sound/vox/guard.ogg', +"gulf" = 'sound/vox/gulf.ogg', +"gun" = 'sound/vox/gun.ogg', +"guthrie" = 'sound/vox/guthrie.ogg', +"handling" = 'sound/vox/handling.ogg', +"hangar" = 'sound/vox/hangar.ogg', +"has" = 'sound/vox/has.ogg', +"have" = 'sound/vox/have.ogg', +"hazard" = 'sound/vox/hazard.ogg', +"head" = 'sound/vox/head.ogg', +"health" = 'sound/vox/health.ogg', +"heat" = 'sound/vox/heat.ogg', +"helicopter" = 'sound/vox/helicopter.ogg', +"helium" = 'sound/vox/helium.ogg', +"hello" = 'sound/vox/hello.ogg', +"help" = 'sound/vox/help.ogg', +"here" = 'sound/vox/here.ogg', +"hide" = 'sound/vox/hide.ogg', +"high" = 'sound/vox/high.ogg', +"highest" = 'sound/vox/highest.ogg', +"hit" = 'sound/vox/hit.ogg', +"holds" = 'sound/vox/holds.ogg', +"hole" = 'sound/vox/hole.ogg', +"hostile" = 'sound/vox/hostile.ogg', +"hot" = 'sound/vox/hot.ogg', +"hotel" = 'sound/vox/hotel.ogg', +"hour" = 'sound/vox/hour.ogg', +"hours" = 'sound/vox/hours.ogg', +"hundred" = 'sound/vox/hundred.ogg', +"hydro" = 'sound/vox/hydro.ogg', +"i" = 'sound/vox/i.ogg', +"idiot" = 'sound/vox/idiot.ogg', +"illegal" = 'sound/vox/illegal.ogg', +"immediate" = 'sound/vox/immediate.ogg', +"immediately" = 'sound/vox/immediately.ogg', +"in" = 'sound/vox/in.ogg', +"inches" = 'sound/vox/inches.ogg', +"india" = 'sound/vox/india.ogg', +"ing" = 'sound/vox/ing.ogg', +"inoperative" = 'sound/vox/inoperative.ogg', +"inside" = 'sound/vox/inside.ogg', +"inspection" = 'sound/vox/inspection.ogg', +"inspector" = 'sound/vox/inspector.ogg', +"interchange" = 'sound/vox/interchange.ogg', +"intruder" = 'sound/vox/intruder.ogg', +"invallid" = 'sound/vox/invallid.ogg', +"invasion" = 'sound/vox/invasion.ogg', +"is" = 'sound/vox/is.ogg', +"it" = 'sound/vox/it.ogg', +"johnson" = 'sound/vox/johnson.ogg', +"juliet" = 'sound/vox/juliet.ogg', +"key" = 'sound/vox/key.ogg', +"kill" = 'sound/vox/kill.ogg', +"kilo" = 'sound/vox/kilo.ogg', +"kit" = 'sound/vox/kit.ogg', +"lab" = 'sound/vox/lab.ogg', +"lambda" = 'sound/vox/lambda.ogg', +"laser" = 'sound/vox/laser.ogg', +"last" = 'sound/vox/last.ogg', +"launch" = 'sound/vox/launch.ogg', +"leak" = 'sound/vox/leak.ogg', +"leave" = 'sound/vox/leave.ogg', +"left" = 'sound/vox/left.ogg', +"legal" = 'sound/vox/legal.ogg', +"level" = 'sound/vox/level.ogg', +"lever" = 'sound/vox/lever.ogg', +"lie" = 'sound/vox/lie.ogg', +"lieutenant" = 'sound/vox/lieutenant.ogg', +"life" = 'sound/vox/life.ogg', +"light" = 'sound/vox/light.ogg', +"lima" = 'sound/vox/lima.ogg', +"liquid" = 'sound/vox/liquid.ogg', +"loading" = 'sound/vox/loading.ogg', +"locate" = 'sound/vox/locate.ogg', +"located" = 'sound/vox/located.ogg', +"location" = 'sound/vox/location.ogg', +"lock" = 'sound/vox/lock.ogg', +"locked" = 'sound/vox/locked.ogg', +"locker" = 'sound/vox/locker.ogg', +"lockout" = 'sound/vox/lockout.ogg', +"lower" = 'sound/vox/lower.ogg', +"lowest" = 'sound/vox/lowest.ogg', +"magnetic" = 'sound/vox/magnetic.ogg', +"main" = 'sound/vox/main.ogg', +"maintenance" = 'sound/vox/maintenance.ogg', +"malfunction" = 'sound/vox/malfunction.ogg', +"man" = 'sound/vox/man.ogg', +"mass" = 'sound/vox/mass.ogg', +"materials" = 'sound/vox/materials.ogg', +"maximum" = 'sound/vox/maximum.ogg', +"may" = 'sound/vox/may.ogg', +"med" = 'sound/vox/med.ogg', +"medical" = 'sound/vox/medical.ogg', +"men" = 'sound/vox/men.ogg', +"mercy" = 'sound/vox/mercy.ogg', +"mesa" = 'sound/vox/mesa.ogg', +"message" = 'sound/vox/message.ogg', +"meter" = 'sound/vox/meter.ogg', +"micro" = 'sound/vox/micro.ogg', +"middle" = 'sound/vox/middle.ogg', +"mike" = 'sound/vox/mike.ogg', +"miles" = 'sound/vox/miles.ogg', +"military" = 'sound/vox/military.ogg', +"milli" = 'sound/vox/milli.ogg', +"million" = 'sound/vox/million.ogg', +"minefield" = 'sound/vox/minefield.ogg', +"minimum" = 'sound/vox/minimum.ogg', +"minutes" = 'sound/vox/minutes.ogg', +"mister" = 'sound/vox/mister.ogg', +"mode" = 'sound/vox/mode.ogg', +"motor" = 'sound/vox/motor.ogg', +"motorpool" = 'sound/vox/motorpool.ogg', +"move" = 'sound/vox/move.ogg', +"must" = 'sound/vox/must.ogg', +"nearest" = 'sound/vox/nearest.ogg', +"nice" = 'sound/vox/nice.ogg', +"nine" = 'sound/vox/nine.ogg', +"nineteen" = 'sound/vox/nineteen.ogg', +"ninety" = 'sound/vox/ninety.ogg', +"no" = 'sound/vox/no.ogg', +"nominal" = 'sound/vox/nominal.ogg', +"north" = 'sound/vox/north.ogg', +"not" = 'sound/vox/not.ogg', +"november" = 'sound/vox/november.ogg', +"now" = 'sound/vox/now.ogg', +"number" = 'sound/vox/number.ogg', +"objective" = 'sound/vox/objective.ogg', +"observation" = 'sound/vox/observation.ogg', +"of" = 'sound/vox/of.ogg', +"officer" = 'sound/vox/officer.ogg', +"ok" = 'sound/vox/ok.ogg', +"on" = 'sound/vox/on.ogg', +"one" = 'sound/vox/one.ogg', +"open" = 'sound/vox/open.ogg', +"operating" = 'sound/vox/operating.ogg', +"operations" = 'sound/vox/operations.ogg', +"operative" = 'sound/vox/operative.ogg', +"option" = 'sound/vox/option.ogg', +"order" = 'sound/vox/order.ogg', +"organic" = 'sound/vox/organic.ogg', +"oscar" = 'sound/vox/oscar.ogg', +"out" = 'sound/vox/out.ogg', +"outside" = 'sound/vox/outside.ogg', +"over" = 'sound/vox/over.ogg', +"overload" = 'sound/vox/overload.ogg', +"override" = 'sound/vox/override.ogg', +"pacify" = 'sound/vox/pacify.ogg', +"pain" = 'sound/vox/pain.ogg', +"pal" = 'sound/vox/pal.ogg', +"panel" = 'sound/vox/panel.ogg', +"percent" = 'sound/vox/percent.ogg', +"perimeter" = 'sound/vox/perimeter.ogg', +"permitted" = 'sound/vox/permitted.ogg', +"personnel" = 'sound/vox/personnel.ogg', +"pipe" = 'sound/vox/pipe.ogg', +"plant" = 'sound/vox/plant.ogg', +"platform" = 'sound/vox/platform.ogg', +"please" = 'sound/vox/please.ogg', +"point" = 'sound/vox/point.ogg', +"portal" = 'sound/vox/portal.ogg', +"power" = 'sound/vox/power.ogg', +"presence" = 'sound/vox/presence.ogg', +"press" = 'sound/vox/press.ogg', +"primary" = 'sound/vox/primary.ogg', +"proceed" = 'sound/vox/proceed.ogg', +"processing" = 'sound/vox/processing.ogg', +"progress" = 'sound/vox/progress.ogg', +"proper" = 'sound/vox/proper.ogg', +"propulsion" = 'sound/vox/propulsion.ogg', +"prosecute" = 'sound/vox/prosecute.ogg', +"protective" = 'sound/vox/protective.ogg', +"push" = 'sound/vox/push.ogg', +"quantum" = 'sound/vox/quantum.ogg', +"quebec" = 'sound/vox/quebec.ogg', +"question" = 'sound/vox/question.ogg', +"questioning" = 'sound/vox/questioning.ogg', +"quick" = 'sound/vox/quick.ogg', +"quit" = 'sound/vox/quit.ogg', +"radiation" = 'sound/vox/radiation.ogg', +"radioactive" = 'sound/vox/radioactive.ogg', +"rads" = 'sound/vox/rads.ogg', +"rapid" = 'sound/vox/rapid.ogg', +"reach" = 'sound/vox/reach.ogg', +"reached" = 'sound/vox/reached.ogg', +"reactor" = 'sound/vox/reactor.ogg', +"red" = 'sound/vox/red.ogg', +"relay" = 'sound/vox/relay.ogg', +"released" = 'sound/vox/released.ogg', +"remaining" = 'sound/vox/remaining.ogg', +"renegade" = 'sound/vox/renegade.ogg', +"repair" = 'sound/vox/repair.ogg', +"report" = 'sound/vox/report.ogg', +"reports" = 'sound/vox/reports.ogg', +"required" = 'sound/vox/required.ogg', +"research" = 'sound/vox/research.ogg', +"reset" = 'sound/vox/reset.ogg', +"resevoir" = 'sound/vox/resevoir.ogg', +"resistance" = 'sound/vox/resistance.ogg', +"returned" = 'sound/vox/returned.ogg', +"right" = 'sound/vox/right.ogg', +"rocket" = 'sound/vox/rocket.ogg', +"roger" = 'sound/vox/roger.ogg', +"romeo" = 'sound/vox/romeo.ogg', +"room" = 'sound/vox/room.ogg', +"round" = 'sound/vox/round.ogg', +"run" = 'sound/vox/run.ogg', +"safe" = 'sound/vox/safe.ogg', +"safety" = 'sound/vox/safety.ogg', +"sargeant" = 'sound/vox/sargeant.ogg', +"satellite" = 'sound/vox/satellite.ogg', +"save" = 'sound/vox/save.ogg', +"science" = 'sound/vox/science.ogg', +"scores" = 'sound/vox/scores.ogg', +"scream" = 'sound/vox/scream.ogg', +"screen" = 'sound/vox/screen.ogg', +"search" = 'sound/vox/search.ogg', +"second" = 'sound/vox/second.ogg', +"secondary" = 'sound/vox/secondary.ogg', +"seconds" = 'sound/vox/seconds.ogg', +"sector" = 'sound/vox/sector.ogg', +"secure" = 'sound/vox/secure.ogg', +"secured" = 'sound/vox/secured.ogg', +"security" = 'sound/vox/security.ogg', +"select" = 'sound/vox/select.ogg', +"selected" = 'sound/vox/selected.ogg', +"service" = 'sound/vox/service.ogg', +"seven" = 'sound/vox/seven.ogg', +"seventeen" = 'sound/vox/seventeen.ogg', +"seventy" = 'sound/vox/seventy.ogg', +"severe" = 'sound/vox/severe.ogg', +"sewage" = 'sound/vox/sewage.ogg', +"sewer" = 'sound/vox/sewer.ogg', +"shield" = 'sound/vox/shield.ogg', +"shipment" = 'sound/vox/shipment.ogg', +"shock" = 'sound/vox/shock.ogg', +"shoot" = 'sound/vox/shoot.ogg', +"shower" = 'sound/vox/shower.ogg', +"shut" = 'sound/vox/shut.ogg', +"side" = 'sound/vox/side.ogg', +"sierra" = 'sound/vox/sierra.ogg', +"sight" = 'sound/vox/sight.ogg', +"silo" = 'sound/vox/silo.ogg', +"six" = 'sound/vox/six.ogg', +"sixteen" = 'sound/vox/sixteen.ogg', +"sixty" = 'sound/vox/sixty.ogg', +"slime" = 'sound/vox/slime.ogg', +"slow" = 'sound/vox/slow.ogg', +"soldier" = 'sound/vox/soldier.ogg', +"some" = 'sound/vox/some.ogg', +"someone" = 'sound/vox/someone.ogg', +"something" = 'sound/vox/something.ogg', +"son" = 'sound/vox/son.ogg', +"sorry" = 'sound/vox/sorry.ogg', +"south" = 'sound/vox/south.ogg', +"squad" = 'sound/vox/squad.ogg', +"square" = 'sound/vox/square.ogg', +"stairway" = 'sound/vox/stairway.ogg', +"status" = 'sound/vox/status.ogg', +"sterile" = 'sound/vox/sterile.ogg', +"sterilization" = 'sound/vox/sterilization.ogg', +"stolen" = 'sound/vox/stolen.ogg', +"storage" = 'sound/vox/storage.ogg', +"sub" = 'sound/vox/sub.ogg', +"subsurface" = 'sound/vox/subsurface.ogg', +"sudden" = 'sound/vox/sudden.ogg', +"suit" = 'sound/vox/suit.ogg', +"superconducting" = 'sound/vox/superconducting.ogg', +"supercooled" = 'sound/vox/supercooled.ogg', +"supply" = 'sound/vox/supply.ogg', +"surface" = 'sound/vox/surface.ogg', +"surrender" = 'sound/vox/surrender.ogg', +"surround" = 'sound/vox/surround.ogg', +"surrounded" = 'sound/vox/surrounded.ogg', +"switch" = 'sound/vox/switch.ogg', +"system" = 'sound/vox/system.ogg', +"systems" = 'sound/vox/systems.ogg', +"tactical" = 'sound/vox/tactical.ogg', +"take" = 'sound/vox/take.ogg', +"talk" = 'sound/vox/talk.ogg', +"tango" = 'sound/vox/tango.ogg', +"tank" = 'sound/vox/tank.ogg', +"target" = 'sound/vox/target.ogg', +"team" = 'sound/vox/team.ogg', +"temperature" = 'sound/vox/temperature.ogg', +"temporal" = 'sound/vox/temporal.ogg', +"ten" = 'sound/vox/ten.ogg', +"terminal" = 'sound/vox/terminal.ogg', +"terminated" = 'sound/vox/terminated.ogg', +"termination" = 'sound/vox/termination.ogg', +"test" = 'sound/vox/test.ogg', +"that" = 'sound/vox/that.ogg', +"the" = 'sound/vox/the.ogg', +"then" = 'sound/vox/then.ogg', +"there" = 'sound/vox/there.ogg', +"third" = 'sound/vox/third.ogg', +"thirteen" = 'sound/vox/thirteen.ogg', +"thirty" = 'sound/vox/thirty.ogg', +"this" = 'sound/vox/this.ogg', +"those" = 'sound/vox/those.ogg', +"thousand" = 'sound/vox/thousand.ogg', +"threat" = 'sound/vox/threat.ogg', +"three" = 'sound/vox/three.ogg', +"through" = 'sound/vox/through.ogg', +"time" = 'sound/vox/time.ogg', +"to" = 'sound/vox/to.ogg', +"top" = 'sound/vox/top.ogg', +"topside" = 'sound/vox/topside.ogg', +"touch" = 'sound/vox/touch.ogg', +"towards" = 'sound/vox/towards.ogg', +"track" = 'sound/vox/track.ogg', +"train" = 'sound/vox/train.ogg', +"transportation" = 'sound/vox/transportation.ogg', +"truck" = 'sound/vox/truck.ogg', +"tunnel" = 'sound/vox/tunnel.ogg', +"turn" = 'sound/vox/turn.ogg', +"turret" = 'sound/vox/turret.ogg', +"twelve" = 'sound/vox/twelve.ogg', +"twenty" = 'sound/vox/twenty.ogg', +"two" = 'sound/vox/two.ogg', +"unauthorized" = 'sound/vox/unauthorized.ogg', +"under" = 'sound/vox/under.ogg', +"uniform" = 'sound/vox/uniform.ogg', +"unlocked" = 'sound/vox/unlocked.ogg', +"until" = 'sound/vox/until.ogg', +"up" = 'sound/vox/up.ogg', +"upper" = 'sound/vox/upper.ogg', +"uranium" = 'sound/vox/uranium.ogg', +"us" = 'sound/vox/us.ogg', +"usa" = 'sound/vox/usa.ogg', +"use" = 'sound/vox/use.ogg', +"used" = 'sound/vox/used.ogg', +"user" = 'sound/vox/user.ogg', +"vacate" = 'sound/vox/vacate.ogg', +"valid" = 'sound/vox/valid.ogg', +"vapor" = 'sound/vox/vapor.ogg', +"vent" = 'sound/vox/vent.ogg', +"ventillation" = 'sound/vox/ventillation.ogg', +"victor" = 'sound/vox/victor.ogg', +"violated" = 'sound/vox/violated.ogg', +"violation" = 'sound/vox/violation.ogg', +"voltage" = 'sound/vox/voltage.ogg', +"vox_login" = 'sound/vox/vox_login.ogg', +"walk" = 'sound/vox/walk.ogg', +"wall" = 'sound/vox/wall.ogg', +"want" = 'sound/vox/want.ogg', +"wanted" = 'sound/vox/wanted.ogg', +"warm" = 'sound/vox/warm.ogg', +"warn" = 'sound/vox/warn.ogg', +"warning" = 'sound/vox/warning.ogg', +"waste" = 'sound/vox/waste.ogg', +"water" = 'sound/vox/water.ogg', +"we" = 'sound/vox/we.ogg', +"weapon" = 'sound/vox/weapon.ogg', +"west" = 'sound/vox/west.ogg', +"whiskey" = 'sound/vox/whiskey.ogg', +"white" = 'sound/vox/white.ogg', +"wilco" = 'sound/vox/wilco.ogg', +"will" = 'sound/vox/will.ogg', +"with" = 'sound/vox/with.ogg', +"without" = 'sound/vox/without.ogg', +"woop" = 'sound/vox/woop.ogg', +"xeno" = 'sound/vox/xeno.ogg', +"yankee" = 'sound/vox/yankee.ogg', +"yards" = 'sound/vox/yards.ogg', +"year" = 'sound/vox/year.ogg', +"yellow" = 'sound/vox/yellow.ogg', +"yes" = 'sound/vox/yes.ogg', +"you" = 'sound/vox/you.ogg', +"your" = 'sound/vox/your.ogg', +"yourself" = 'sound/vox/yourself.ogg', +"zero" = 'sound/vox/zero.ogg', +"zone" = 'sound/vox/zone.ogg', +"zulu" = 'sound/vox/zulu.ogg',)) #endif \ No newline at end of file diff --git a/code/modules/mob/living/silicon/damage_procs.dm b/code/modules/mob/living/silicon/damage_procs.dm index 69d150b315..8fbd7afbdd 100644 --- a/code/modules/mob/living/silicon/damage_procs.dm +++ b/code/modules/mob/living/silicon/damage_procs.dm @@ -1,16 +1,17 @@ -/mob/living/silicon/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE) +/mob/living/silicon/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE) var/hit_percent = (100-blocked)/100 - if(!damage || (hit_percent <= 0)) + if(!damage || (!forced && hit_percent <= 0)) return 0 + var/damage_amount = forced ? damage : damage * hit_percent switch(damagetype) if(BRUTE) - adjustBruteLoss(damage * hit_percent) + adjustBruteLoss(damage_amount, forced = forced) if(BURN) - adjustFireLoss(damage * hit_percent) + adjustFireLoss(damage_amount, forced = forced) if(OXY) - if(damage < 0) //we shouldn't be taking oxygen damage through this proc, but we'll let it heal. - adjustOxyLoss(damage * hit_percent) + if(damage < 0 || forced) //we shouldn't be taking oxygen damage through this proc, but we'll let it heal. + adjustOxyLoss(damage_amount, forced = forced) return 1 @@ -29,7 +30,7 @@ /mob/living/silicon/setCloneLoss(amount, updating_health = TRUE, forced = FALSE) return FALSE -/mob/living/silicon/adjustStaminaLoss(amount, updating_stamina = 1)//immune to stamina damage. +/mob/living/silicon/adjustStaminaLoss(amount, updating_stamina = 1, forced = FALSE)//immune to stamina damage. return FALSE /mob/living/silicon/setStaminaLoss(amount, updating_stamina = 1) diff --git a/code/modules/mob/living/silicon/pai/pai_defense.dm b/code/modules/mob/living/silicon/pai/pai_defense.dm index f36e996b81..dda8ddfebd 100644 --- a/code/modules/mob/living/silicon/pai/pai_defense.dm +++ b/code/modules/mob/living/silicon/pai/pai_defense.dm @@ -81,8 +81,11 @@ /mob/living/silicon/pai/adjustCloneLoss(amount, updating_health = TRUE, forced = FALSE) return FALSE -/mob/living/silicon/pai/adjustStaminaLoss(amount) - take_holo_damage(amount & 0.25) +/mob/living/silicon/pai/adjustStaminaLoss(amount, updating_health, forced = FALSE) + if(forced) + take_holo_damage(amount) + else + take_holo_damage(amount * 0.25) /mob/living/silicon/pai/adjustOrganLoss(slot, amount, maximum = 500) //I kept this in, unlike tg Knockdown(amount * 0.2) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 2b2cc4c0b5..5b670aaa42 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -1233,7 +1233,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/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 7b95ced63f..ac759c7176 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -311,6 +311,10 @@ /obj/item/multitool/cyborg, /obj/item/t_scanner, /obj/item/analyzer, + /obj/item/storage/part_replacer/cyborg, + /obj/item/holosign_creator/atmos, + /obj/item/weapon/gripper, + /obj/item/lightreplacer/cyborg, /obj/item/geiger_counter/cyborg, /obj/item/assembly/signaler/cyborg, /obj/item/areaeditor/blueprints/cyborg, diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index 1bff7dc10c..6b26b7cb23 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -51,6 +51,7 @@ var/treatment_fire = "kelotane" var/treatment_tox_avoid = "tricordrazine" var/treatment_tox = "charcoal" + var/treatment_tox_toxlover = "toxin" var/treatment_virus_avoid = null var/treatment_virus = "spaceacillin" var/treat_virus = 1 //If on, the bot will attempt to treat viral infections, curing them if possible. @@ -381,8 +382,8 @@ if((!C.reagents.has_reagent(treatment_fire_avoid)) && (C.getFireLoss() >= heal_threshold) && (!C.reagents.has_reagent(treatment_fire))) return TRUE - - if((!C.reagents.has_reagent(treatment_tox_avoid)) && (C.getToxLoss() >= heal_threshold) && (!C.reagents.has_reagent(treatment_tox))) + var/treatment_toxavoid = get_avoidchem_toxin(C) + if(((treatment_toxavoid && !C.reagents.has_reagent(treatment_toxavoid))) && (C.getToxLoss() >= heal_threshold) && (!C.reagents.has_reagent(get_healchem_toxin(C)))) return TRUE if(treat_virus && !C.reagents.has_reagent(treatment_virus_avoid) && !C.reagents.has_reagent(treatment_virus)) @@ -396,6 +397,12 @@ return FALSE +/mob/living/simple_animal/bot/medbot/proc/get_avoidchem_toxin(mob/M) + return HAS_TRAIT(M, TRAIT_TOXINLOVER)? null : treatment_tox_avoid + +/mob/living/simple_animal/bot/medbot/proc/get_healchem_toxin(mob/M) + return HAS_TRAIT(M, TRAIT_TOXINLOVER)? treatment_tox_toxlover : treatment_tox + /mob/living/simple_animal/bot/medbot/UnarmedAttack(atom/A) if(iscarbon(A)) var/mob/living/carbon/C = A @@ -463,8 +470,10 @@ reagent_id = treatment_fire if(!reagent_id && (C.getToxLoss() >= heal_threshold)) - if(!C.reagents.has_reagent(treatment_tox) && !C.reagents.has_reagent(treatment_tox_avoid)) - reagent_id = treatment_tox + var/toxin_heal_avoid = get_avoidchem_toxin(C) + var/toxin_healchem = get_healchem_toxin(C) + if(!C.reagents.has_reagent(toxin_healchem) && (toxin_heal_avoid && !C.reagents.has_reagent(toxin_heal_avoid))) + reagent_id = toxin_healchem //If the patient is injured but doesn't have our special reagent in them then we should give it to them first if(reagent_id && use_beaker && reagent_glass && reagent_glass.reagents.total_volume) diff --git a/code/modules/mob/living/simple_animal/damage_procs.dm b/code/modules/mob/living/simple_animal/damage_procs.dm index 1031c5b7ee..0cc097dc08 100644 --- a/code/modules/mob/living/simple_animal/damage_procs.dm +++ b/code/modules/mob/living/simple_animal/damage_procs.dm @@ -37,5 +37,5 @@ else if(damage_coeff[CLONE]) . = adjustHealth(amount * damage_coeff[CLONE] * CONFIG_GET(number/damage_multiplier), updating_health, forced) -/mob/living/simple_animal/adjustStaminaLoss(amount) +/mob/living/simple_animal/adjustStaminaLoss(amount, forced = FALSE) return 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 d28b98263c..521f458e2f 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 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 1f81899d8a..7ece4f792c 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/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 8c287229d7..eb22ab7403 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -88,7 +88,7 @@ if(newletter==" ") newletter="...huuuhhh..." if(newletter==".") - newletter=" *BURP*." + newletter=" BURP!" if(rand(1,100) <= strength*0.5) if(rand(1,5) == 1) newletter+="'" diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 875a65d306..fece60f268 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 bd77d468d7..3400ed6de0 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/power/cell.dm b/code/modules/power/cell.dm index 1759f31344..0762ad46b0 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -20,6 +20,7 @@ var/self_recharge = 0 //does it self recharge, over time, or not? var/ratingdesc = TRUE var/grown_battery = FALSE // If it's a grown that acts as a battery, add a wire overlay to it. + rad_flags = RAD_NO_CONTAMINATE // Prevent the same cheese as with the stock parts /obj/item/stock_parts/cell/get_cell() return src diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 8d2162a0ff..e6fa1e0ee4 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -29,7 +29,7 @@ #define MOLE_HEAT_PENALTY 350 //Heat damage scales around this. Too hot setups with this amount of moles do regular damage, anything above and below is scaled #define POWER_PENALTY_THRESHOLD 5000 //Higher == Engine can generate more power before triggering the high power penalties. #define SEVERE_POWER_PENALTY_THRESHOLD 7000 //Same as above, but causes more dangerous effects -#define CRITICAL_POWER_PENALTY_THRESHOLD 9000 //Even more dangerous effects, threshold for tesla delamination +#define CRITICAL_POWER_PENALTY_THRESHOLD 12000 //Even more dangerous effects, threshold for tesla delamination #define HEAT_PENALTY_THRESHOLD 40 //Higher == Crystal safe operational temperature is higher. #define DAMAGE_HARDCAP 0.002 #define DAMAGE_INCREASE_MULTIPLIER 0.25 diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index fb3ed19f82..13fd834657 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -62,16 +62,16 @@ var/zoomed = FALSE //Zoom toggle var/zoom_amt = 3 //Distance in TURFs to move the user's screen forward (the "zoom" effect) var/zoom_out_amt = 0 - var/datum/action/toggle_scope_zoom/azoom + var/datum/action/item_action/toggle_scope_zoom/azoom /obj/item/gun/Initialize() . = ..() if(pin) pin = new pin(src) if(gun_light) - alight = new /datum/action/item_action/toggle_gunlight(src) - build_zooming() - + alight = new (src) + if(zoomable) + azoom = new (src) /obj/item/gun/CheckParts(list/parts_list) ..() @@ -372,6 +372,12 @@ else return ..() +/obj/item/gun/ui_action_click(mob/user, action) + if(istype(action, /datum/action/item_action/toggle_scope_zoom)) + zoom(user) + else if(istype(action, alight)) + toggle_gunlight() + /obj/item/gun/proc/toggle_gunlight() if(!gun_light) return @@ -407,21 +413,10 @@ var/datum/action/A = X A.UpdateButtonIcon() -/obj/item/gun/pickup(mob/user) - ..() - if(azoom) - azoom.Grant(user) - if(alight) - alight.Grant(user) - -/obj/item/gun/dropped(mob/user) - ..() - if(zoomed) - zoom(user,FALSE) - if(azoom) - azoom.Remove(user) - if(alight) - alight.Remove(user) +/obj/item/gun/item_action_slot_check(slot, mob/user, datum/action/A) + if(istype(A, /datum/action/item_action/toggle_scope_zoom) && slot != SLOT_HANDS) + return FALSE + return ..() /obj/item/gun/proc/handle_suicide(mob/living/carbon/human/user, mob/living/carbon/human/target, params, bypass_timer) if(!ishuman(user) || !ishuman(target)) @@ -468,41 +463,32 @@ // ZOOMING // ///////////// -/datum/action/toggle_scope_zoom +/datum/action/item_action/toggle_scope_zoom name = "Toggle Scope" - check_flags = AB_CHECK_CONSCIOUS|AB_CHECK_RESTRAINED|AB_CHECK_STUN|AB_CHECK_LYING icon_icon = 'icons/mob/actions/actions_items.dmi' button_icon_state = "sniper_zoom" - var/obj/item/gun/gun = null -/datum/action/toggle_scope_zoom/Trigger() - gun.zoom(owner) - -/datum/action/toggle_scope_zoom/IsAvailable() +/datum/action/item_action/toggle_scope_zoom/IsAvailable() . = ..() - if(!gun) - return FALSE if(!.) - gun.zoom(owner, FALSE) - if(!owner.get_held_index_of_item(gun)) - return FALSE - -/datum/action/toggle_scope_zoom/Remove(mob/living/L) - gun.zoom(L, FALSE) - ..() + var/obj/item/gun/G = target + G.zoom(owner, FALSE) +/datum/action/item_action/toggle_scope_zoom/Remove(mob/living/L) + var/obj/item/gun/G = target + G.zoom(L, FALSE) + return ..() /obj/item/gun/proc/zoom(mob/living/user, forced_zoom) - if(!user || !user.client) + if(!(user?.client)) return - switch(forced_zoom) - if(FALSE) - zoomed = FALSE - if(TRUE) - zoomed = TRUE - else - zoomed = !zoomed + if(!isnull(forced_zoom)) + if(zoomed == forced_zoom) + return + zoomed = forced_zoom + else + zoomed = !zoomed if(zoomed) var/_x = 0 @@ -524,16 +510,6 @@ user.client.change_view(CONFIG_GET(string/default_view)) user.client.pixel_x = 0 user.client.pixel_y = 0 - return zoomed - -//Proc, so that gun accessories/scopes/etc. can easily add zooming. -/obj/item/gun/proc/build_zooming() - if(azoom) - return - - if(zoomable) - azoom = new() - azoom.gun = src /obj/item/gun/handle_atom_del(atom/A) if(A == chambered) diff --git a/code/modules/projectiles/guns/ballistic/automatic.dm b/code/modules/projectiles/guns/ballistic/automatic.dm index 4bd65a7b20..cd86b0b06c 100644 --- a/code/modules/projectiles/guns/ballistic/automatic.dm +++ b/code/modules/projectiles/guns/ballistic/automatic.dm @@ -51,8 +51,11 @@ else to_chat(user, "You cannot seem to get \the [src] out of your hands!") -/obj/item/gun/ballistic/automatic/ui_action_click() - burst_select() +/obj/item/gun/ballistic/automatic/ui_action_click(mob/user, action) + if(istype(action, /datum/action/item_action/toggle_firemode)) + burst_select() + else + return ..() /obj/item/gun/ballistic/automatic/proc/burst_select() var/mob/living/carbon/human/user = usr diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index 6060ceba99..2cccc57d9e 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -174,9 +174,6 @@ itemState += "[ratio]" item_state = itemState -/obj/item/gun/energy/ui_action_click() - toggle_gunlight() - /obj/item/gun/energy/suicide_act(mob/living/user) if (istype(user) && can_shoot() && can_trigger_gun(user) && user.get_bodypart(BODY_ZONE_HEAD)) user.visible_message("[user] is putting the barrel of [src] in [user.p_their()] mouth. It looks like [user.p_theyre()] trying to commit suicide!") diff --git a/code/modules/projectiles/guns/misc/beam_rifle.dm b/code/modules/projectiles/guns/misc/beam_rifle.dm index e4d13ad315..92fe91c222 100644 --- a/code/modules/projectiles/guns/misc/beam_rifle.dm +++ b/code/modules/projectiles/guns/misc/beam_rifle.dm @@ -45,7 +45,7 @@ var/aiming_lastangle = 0 var/mob/current_user = null var/list/obj/effect/projectile/tracer/current_tracers - + var/structure_piercing = 1 var/structure_bleed_coeff = 0.7 var/wall_pierce_amount = 0 @@ -76,7 +76,7 @@ var/static/image/drained_overlay = image(icon = 'icons/obj/guns/energy.dmi', icon_state = "esniper_empty") var/datum/action/item_action/zoom_lock_action/zoom_lock_action - var/datum/component/mobhook + var/mob/listeningTo /obj/item/gun/energy/beam_rifle/debug delay = 0 @@ -111,7 +111,9 @@ to_chat(owner, "You switch [src]'s zooming processor to center mode.") if(ZOOM_LOCK_OFF) to_chat(owner, "You disable [src]'s zooming system.") - reset_zooming() + reset_zooming() + else + return ..() /obj/item/gun/energy/beam_rifle/proc/set_autozoom_pixel_offsets_immediate(current_angle) if(zoom_lock == ZOOM_LOCK_CENTER_VIEW || zoom_lock == ZOOM_LOCK_OFF) @@ -172,7 +174,7 @@ STOP_PROCESSING(SSfastprocess, src) set_user(null) QDEL_LIST(current_tracers) - QDEL_NULL(mobhook) + listeningTo = null return ..() /obj/item/gun/energy/beam_rifle/emp_act(severity) @@ -259,14 +261,17 @@ if(user == current_user) return stop_aiming(current_user) - QDEL_NULL(mobhook) + if(listeningTo) + UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED) + listeningTo = null if(istype(current_user)) LAZYREMOVE(current_user.mousemove_intercept_objects, src) current_user = null if(istype(user)) current_user = user LAZYOR(current_user.mousemove_intercept_objects, src) - mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/on_mob_move))) + RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/on_mob_move) + listeningTo = user /obj/item/gun/energy/beam_rifle/onMouseDrag(src_object, over_object, src_location, over_location, params, mob) if(aiming) diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 711fe11d5d..f540ae850d 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/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm index f3df72cd4d..1475f94f53 100644 --- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm @@ -423,7 +423,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)) @@ -431,7 +431,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)) @@ -439,7 +439,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)) @@ -447,7 +447,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 775308589f..3db5c4c4dc 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -1443,7 +1443,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/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 7b41368495..8f8902503c 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -2295,26 +2295,22 @@ chemical_flags = REAGENT_INVISIBLE /datum/reagent/changeling_string/on_mob_metabolize(mob/living/carbon/C) - if(C && C.dna && data["desired_dna"]) + if(ishuman(C) && C.dna && data["desired_dna"]) original_dna = new C.dna.type C.dna.copy_dna(original_dna) var/datum/dna/new_dna = data["desired_dna"] - new_dna.copy_dna(C.dna) + new_dna.transfer_identity(C, TRUE) C.real_name = new_dna.real_name - C.updateappearance(mutcolor_update=1) - C.update_body() + C.updateappearance(mutcolor_update = TRUE) C.domutcheck() - C.regenerate_icons() ..() /datum/reagent/changeling_string/on_mob_end_metabolize(mob/living/carbon/C) if(original_dna) - original_dna.copy_dna(C.dna) + original_dna.transfer_identity(C, TRUE) C.real_name = original_dna.real_name - C.updateappearance(mutcolor_update=1) - C.update_body() + C.updateappearance(mutcolor_update = TRUE) C.domutcheck() - C.regenerate_icons() ..() /datum/reagent/changeling_string/Destroy() diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index a96ba006c9..14245e3232 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -196,3 +196,317 @@ volume = 250 list_reagents = list("holywater" = 150, "tiresolution" = 50, "dizzysolution" = 50) amount_per_transfer_from_this = 50 + +#define HYPO_SPRAY 0 +#define HYPO_INJECT 1 + +#define WAIT_SPRAY 25 +#define WAIT_INJECT 25 +#define SELF_SPRAY 15 +#define SELF_INJECT 15 + +#define DELUXE_WAIT_SPRAY 20 +#define DELUXE_WAIT_INJECT 20 +#define DELUXE_SELF_SPRAY 10 +#define DELUXE_SELF_INJECT 10 + +#define COMBAT_WAIT_SPRAY 0 +#define COMBAT_WAIT_INJECT 0 +#define COMBAT_SELF_SPRAY 0 +#define COMBAT_SELF_INJECT 0 + +//A vial-loaded hypospray. Cartridge-based! +/obj/item/hypospray/mkii + name = "hypospray mk.II" + icon_state = "hypo2" + desc = "A new development from DeForest Medical, this hypospray takes 30-unit vials as the drug supply for easy swapping." + w_class = WEIGHT_CLASS_TINY + var/list/allowed_containers = list(/obj/item/reagent_containers/glass/bottle/vial/tiny, /obj/item/reagent_containers/glass/bottle/vial/small) + var/mode = HYPO_INJECT + var/obj/item/reagent_containers/glass/bottle/vial/vial + var/start_vial = /obj/item/reagent_containers/glass/bottle/vial/small + var/spawnwithvial = TRUE + var/inject_wait = WAIT_INJECT + var/spray_wait = WAIT_SPRAY + var/spray_self = SELF_SPRAY + var/inject_self = SELF_INJECT + var/quickload = FALSE + var/penetrates = FALSE + +/obj/item/hypospray/mkii/brute + start_vial = /obj/item/reagent_containers/glass/bottle/vial/small/preloaded/bicaridine + +/obj/item/hypospray/mkii/toxin + start_vial = /obj/item/reagent_containers/glass/bottle/vial/small/preloaded/antitoxin + +/obj/item/hypospray/mkii/oxygen + start_vial = /obj/item/reagent_containers/glass/bottle/vial/small/preloaded/dexalin + +/obj/item/hypospray/mkii/burn + start_vial = /obj/item/reagent_containers/glass/bottle/vial/small/preloaded/kelotane + +/obj/item/hypospray/mkii/tricord + start_vial = /obj/item/reagent_containers/glass/bottle/vial/small/preloaded/tricord + +/obj/item/hypospray/mkii/enlarge + spawnwithvial = FALSE + +/obj/item/hypospray/mkii/CMO + name = "hypospray mk.II deluxe" + allowed_containers = list(/obj/item/reagent_containers/glass/bottle/vial/tiny, /obj/item/reagent_containers/glass/bottle/vial/small, /obj/item/reagent_containers/glass/bottle/vial/large) + icon_state = "cmo2" + desc = "The Deluxe Hypospray can take larger-size vials. It also acts faster and delivers more reagents per spray." + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF + start_vial = /obj/item/reagent_containers/glass/bottle/vial/large/preloaded/CMO + inject_wait = DELUXE_WAIT_INJECT + spray_wait = DELUXE_WAIT_SPRAY + spray_self = DELUXE_SELF_SPRAY + inject_self = DELUXE_SELF_INJECT + +/obj/item/hypospray/mkii/CMO/combat + name = "combat hypospray mk.II" + desc = "A combat-ready deluxe hypospray that acts almost instantly. It can be tactically reloaded by using a vial on it." + icon_state = "combat2" + start_vial = /obj/item/reagent_containers/glass/bottle/vial/large/preloaded/combat + inject_wait = COMBAT_WAIT_INJECT + spray_wait = COMBAT_WAIT_SPRAY + spray_self = COMBAT_SELF_SPRAY + inject_self = COMBAT_SELF_INJECT + quickload = TRUE + penetrates = TRUE + +/obj/item/hypospray/mkii/Initialize() + . = ..() + if(!spawnwithvial) + update_icon() + return + if(start_vial) + vial = new start_vial + update_icon() + +/obj/item/hypospray/mkii/update_icon() + ..() + icon_state = "[initial(icon_state)][vial ? "" : "-e"]" + if(ismob(loc)) + var/mob/M = loc + M.update_inv_hands() + return + +/obj/item/hypospray/mkii/examine(mob/user) + . = ..() + if(vial) + to_chat(user, "[vial] has [vial.reagents.total_volume]u remaining.") + else + to_chat(user, "It has no vial loaded in.") + to_chat(user, "[src] is set to [mode ? "Inject" : "Spray"] contents on application.") + +/obj/item/hypospray/mkii/proc/unload_hypo(obj/item/I, mob/user) + if((istype(I, /obj/item/reagent_containers/glass/bottle/vial))) + var/obj/item/reagent_containers/glass/bottle/vial/V = I + V.forceMove(user.loc) + user.put_in_hands(V) + to_chat(user, "You remove [vial] from [src].") + vial = null + update_icon() + playsound(loc, 'sound/weapons/empty.ogg', 50, 1) + else + to_chat(user, "This hypo isn't loaded!") + return + +/obj/item/hypospray/mkii/attackby(obj/item/I, mob/living/user) + if((istype(I, /obj/item/reagent_containers/glass/bottle/vial) && vial != null)) + if(!quickload) + to_chat(user, "[src] can not hold more than one vial!") + return FALSE + unload_hypo(vial, user) + if((istype(I, /obj/item/reagent_containers/glass/bottle/vial))) + var/obj/item/reagent_containers/glass/bottle/vial/V = I + if(!is_type_in_list(V, allowed_containers)) + to_chat(user, "[src] doesn't accept this type of vial.") + return FALSE + if(!user.transferItemToLoc(V,src)) + return FALSE + vial = V + user.visible_message("[user] has loaded a vial into [src].","You have loaded [vial] into [src].") + update_icon() + playsound(loc, 'sound/weapons/autoguninsert.ogg', 35, 1) + return TRUE + else + to_chat(user, "This doesn't fit in [src].") + return FALSE + return FALSE + +/obj/item/hypospray/mkii/AltClick(mob/user) + if(vial) + vial.attack_self(user) + +// Gunna allow this for now, still really don't approve - Pooj +/obj/item/hypospray/mkii/emag_act(mob/user) + . = ..() + if(obj_flags & EMAGGED) + to_chat(user, "[src] happens to be already overcharged.") + return + inject_wait = COMBAT_WAIT_INJECT + spray_wait = COMBAT_WAIT_SPRAY + spray_self = COMBAT_SELF_INJECT + inject_self = COMBAT_SELF_SPRAY + penetrates = TRUE + to_chat(user, "You overcharge [src]'s control circuit.") + obj_flags |= EMAGGED + return TRUE + +/obj/item/hypospray/mkii/attack_hand(mob/user) + . = ..() //Don't bother changing this or removing it from containers will break. + +/obj/item/hypospray/mkii/attack(obj/item/I, mob/user, params) + return + +/obj/item/hypospray/mkii/afterattack(atom/target, mob/user, proximity) + if(!vial) + return + + if(!proximity) + return + + if(!ismob(target)) + return + + var/mob/living/L + if(isliving(target)) + L = target + if(!penetrates && !L.can_inject(user, 1)) //This check appears another four times, since otherwise the penetrating sprays will break in do_mob. + return + + if(!L && !target.is_injectable()) //only checks on non-living mobs, due to how can_inject() handles + to_chat(user, "You cannot directly fill [target]!") + return + + if(target.reagents.total_volume >= target.reagents.maximum_volume) + to_chat(user, "[target] is full.") + return + + if(ishuman(L)) + var/obj/item/bodypart/affecting = L.get_bodypart(check_zone(user.zone_selected)) + if(!affecting) + to_chat(user, "The limb is missing!") + return + if(affecting.status != BODYPART_ORGANIC) + to_chat(user, "Medicine won't work on a robotic limb!") + return + + var/contained = vial.reagents.log_list() + log_combat(user, L, "attemped to inject", src, addition="which had [contained]") +//Always log attemped injections for admins + if(vial != null) + switch(mode) + if(HYPO_INJECT) + if(L) //living mob + if(L != user) + L.visible_message("[user] is trying to inject [L] with [src]!", \ + "[user] is trying to inject [L] with [src]!") + if(!do_mob(user, L, inject_wait)) + return + if(!penetrates && !L.can_inject(user, 1)) + return + if(!vial.reagents.total_volume) + return + if(L.reagents.total_volume >= L.reagents.maximum_volume) + return + L.visible_message("[user] uses the [src] on [L]!", \ + "[user] uses the [src] on [L]!") + else + if(!do_mob(user, L, inject_self)) + return + if(!penetrates && !L.can_inject(user, 1)) + return + if(!vial.reagents.total_volume) + return + if(L.reagents.total_volume >= L.reagents.maximum_volume) + return + log_attack("[user.name] ([user.ckey]) applied [src] to [L.name] ([L.ckey]), which had [contained] (INTENT: [uppertext(user.a_intent)]) (MODE: [src.mode])") + L.log_message("applied [src] to themselves ([contained]).", INDIVIDUAL_ATTACK_LOG) + + var/fraction = min(vial.amount_per_transfer_from_this/vial.reagents.total_volume, 1) + vial.reagents.reaction(L, INJECT, fraction) + vial.reagents.trans_to(target, vial.amount_per_transfer_from_this) + if(vial.amount_per_transfer_from_this >= 15) + playsound(loc,'sound/items/hypospray_long.ogg',50, 1, -1) + if(vial.amount_per_transfer_from_this < 15) + playsound(loc, pick('sound/items/hypospray.ogg','sound/items/hypospray2.ogg'), 50, 1, -1) + to_chat(user, "You inject [vial.amount_per_transfer_from_this] units of the solution. The hypospray's cartridge now contains [vial.reagents.total_volume] units.") + + if(HYPO_SPRAY) + if(L) //living mob + if(L != user) + L.visible_message("[user] is trying to spray [L] with [src]!", \ + "[user] is trying to spray [L] with [src]!") + if(!do_mob(user, L, spray_wait)) + return + if(!penetrates && !L.can_inject(user, 1)) + return + if(!vial.reagents.total_volume) + return + if(L.reagents.total_volume >= L.reagents.maximum_volume) + return + L.visible_message("[user] uses the [src] on [L]!", \ + "[user] uses the [src] on [L]!") + else + if(!do_mob(user, L, spray_self)) + return + if(!penetrates && !L.can_inject(user, 1)) + return + if(!vial.reagents.total_volume) + return + if(L.reagents.total_volume >= L.reagents.maximum_volume) + return + log_attack("[user.name] ([user.ckey]) applied [src] to [L.name] ([L.ckey]), which had [contained] (INTENT: [uppertext(user.a_intent)]) (MODE: [src.mode])") + L.log_message("applied [src] to themselves ([contained]).", INDIVIDUAL_ATTACK_LOG) + var/fraction = min(vial.amount_per_transfer_from_this/vial.reagents.total_volume, 1) + vial.reagents.reaction(L, PATCH, fraction) + vial.reagents.trans_to(target, vial.amount_per_transfer_from_this) + if(vial.amount_per_transfer_from_this >= 15) + playsound(loc,'sound/items/hypospray_long.ogg',50, 1, -1) + if(vial.amount_per_transfer_from_this < 15) + playsound(loc, pick('sound/items/hypospray.ogg','sound/items/hypospray2.ogg'), 50, 1, -1) + to_chat(user, "You spray [vial.amount_per_transfer_from_this] units of the solution. The hypospray's cartridge now contains [vial.reagents.total_volume] units.") + else + to_chat(user, "[src] doesn't work here!") + return + +/obj/item/hypospray/mkii/attack_self(mob/living/user) + if(user) + if(user.incapacitated()) + return + else if(!vial) + to_chat(user, "This Hypo needs to be loaded first!") + return + else + unload_hypo(vial,user) + +/obj/item/hypospray/mkii/verb/modes() + set name = "Toggle Application Mode" + set category = "Object" + set src in usr + var/mob/M = usr + switch(mode) + if(HYPO_SPRAY) + mode = HYPO_INJECT + to_chat(M, "[src] is now set to inject contents on application.") + if(HYPO_INJECT) + mode = HYPO_SPRAY + to_chat(M, "[src] is now set to spray contents on application.") + +#undef HYPO_SPRAY +#undef HYPO_INJECT +#undef WAIT_SPRAY +#undef WAIT_INJECT +#undef SELF_SPRAY +#undef SELF_INJECT +#undef DELUXE_WAIT_SPRAY +#undef DELUXE_WAIT_INJECT +#undef DELUXE_SELF_SPRAY +#undef DELUXE_SELF_INJECT +#undef COMBAT_WAIT_SPRAY +#undef COMBAT_WAIT_INJECT +#undef COMBAT_SELF_SPRAY +#undef COMBAT_SELF_INJECT diff --git a/modular_citadel/code/modules/reagents/reagent container/hypovial.dm b/code/modules/reagents/reagent_containers/hypovial.dm old mode 100755 new mode 100644 similarity index 96% rename from modular_citadel/code/modules/reagents/reagent container/hypovial.dm rename to code/modules/reagents/reagent_containers/hypovial.dm index c1e0d6ff01..ba5ce48a4a --- a/modular_citadel/code/modules/reagents/reagent container/hypovial.dm +++ b/code/modules/reagents/reagent_containers/hypovial.dm @@ -1,7 +1,8 @@ +//hypovials used with the MkII hypospray. See hypospray.dm. + /obj/item/reagent_containers/glass/bottle/vial name = "broken hypovial" desc = "A hypovial compatible with most hyposprays." - icon = 'modular_citadel/icons/obj/vial.dmi' icon_state = "hypovial" spillable = FALSE var/comes_with = list() //Easy way of doing this. @@ -34,7 +35,7 @@ /obj/item/reagent_containers/glass/bottle/vial/update_icon() cut_overlays() if(reagents.total_volume) - var/mutable_appearance/filling = mutable_appearance('modular_citadel/icons/obj/vial.dmi', "hypovial10") + var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "hypovial10") var/percent = round((reagents.total_volume / volume) * 100) switch(percent) @@ -86,7 +87,7 @@ /obj/item/reagent_containers/glass/bottle/vial/large/update_icon() cut_overlays() if(reagents.total_volume) - var/mutable_appearance/filling = mutable_appearance('modular_citadel/icons/obj/vial.dmi', "hypoviallarge10") + var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "hypoviallarge10") var/percent = round((reagents.total_volume / volume) * 100) switch(percent) diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index 38880f669f..d4880aa085 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -186,7 +186,6 @@ /obj/item/reagent_containers/pill/antirad_plus name = "prussian blue pill" desc = "Used to treat heavy radition poisoning." - icon = 'modular_citadel/icons/obj/modularpills.dmi' icon_state = "prussian_blue" list_reagents = list("prussian_blue" = 25, "water" = 10) roundstart = 1 @@ -194,7 +193,6 @@ /obj/item/reagent_containers/pill/mutarad name = "radiation treatment deluxe pill" desc = "Used to treat heavy radition poisoning and genetic defects." - icon = 'modular_citadel/icons/obj/modularpills.dmi' icon_state = "anit_rad_fixgene" list_reagents = list("prussian_blue" = 15, "potass_iodide" = 15, "mutadone" = 15, "water" = 5) roundstart = 1 diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm index a4a6a7d473..5edddd64c2 100644 --- a/code/modules/recycling/disposal/bin.dm +++ b/code/modules/recycling/disposal/bin.dm @@ -283,7 +283,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 624d5e0e05..348e687e03 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/designs/electronics_designs.dm b/code/modules/research/designs/electronics_designs.dm index 552976824d..818e80beea 100644 --- a/code/modules/research/designs/electronics_designs.dm +++ b/code/modules/research/designs/electronics_designs.dm @@ -131,3 +131,30 @@ category = list("Misc") departmental_flags = DEPARTMENTAL_FLAG_SCIENCE +/datum/design/xenobio_upgrade + name = "owo" + desc = "someone's bussin" + build_type = PROTOLATHE + materials = list(MAT_METAL = 300, MAT_GLASS = 100) + category = list("Electronics") + departmental_flags = DEPARTMENTAL_FLAG_SCIENCE + +/datum/design/xenobio_upgrade/xenobiomonkeys + name = "Xenobiology console monkey upgrade disk" + desc = "This disk will add the ability to remotely recycle monkeys via the Xenobiology console." + id = "xenobio_monkeys" + build_path = /obj/item/disk/xenobio_console_upgrade/monkey + +/datum/design/xenobio_upgrade/xenobioslimebasic + name = "Xenobiology console basic slime upgrade disk" + desc = "This disk will add the ability to remotely manipulate slimes via the Xenobiology console." + id = "xenobio_slimebasic" + build_path = /obj/item/disk/xenobio_console_upgrade/slimebasic + +/datum/design/xenobio_upgrade/xenobioslimeadv + name = "Xenobiology console advanced slime upgrade disk" + desc = "This disk will add the ability to remotely feed slimes potions via the Xenobiology console, and lift the restrictions on the number of slimes that can be stored inside the Xenobiology console. This includes the contents of the basic slime upgrade disk." + id = "xenobio_slimeadv" + build_path = /obj/item/disk/xenobio_console_upgrade/slimeadv + + diff --git a/code/modules/research/designs/machine_desings/machine_designs_all_misc.dm b/code/modules/research/designs/machine_desings/machine_designs_all_misc.dm index 31723cde07..b4d67315ba 100644 --- a/code/modules/research/designs/machine_desings/machine_designs_all_misc.dm +++ b/code/modules/research/designs/machine_desings/machine_designs_all_misc.dm @@ -98,3 +98,11 @@ build_path = /obj/item/circuitboard/machine/vr_sleeper departmental_flags = DEPARTMENTAL_FLAG_ALL category = list ("Medical Machinery") + +/datum/design/board/autoylathe + name = "Machine Design (Autoylathe)" + desc = "The circuit board for an autoylathe." + id = "autoylathe" + build_path = /obj/item/circuitboard/machine/autoylathe + departmental_flags = DEPARTMENTAL_FLAG_ALL + category = list("Misc. Machinery") diff --git a/code/modules/research/designs/weapon_designs.dm b/code/modules/research/designs/weapon_designs.dm index 5176c4fd71..d69dda37ca 100644 --- a/code/modules/research/designs/weapon_designs.dm +++ b/code/modules/research/designs/weapon_designs.dm @@ -67,6 +67,12 @@ //Ammo Shells/ ////////////// +/datum/design/beanbag_slug/sec + id = "sec_beanbag" + build_type = PROTOLATHE + category = list("Ammo") + departmental_flags = DEPARTMENTAL_FLAG_SECURITY + /datum/design/rubbershot/sec id = "sec_rshot" build_type = PROTOLATHE diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index e56350a280..0bcd0c5984 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/research_disk.dm b/code/modules/research/research_disk.dm index 2ec2398d88..02865dc5bb 100644 --- a/code/modules/research/research_disk.dm +++ b/code/modules/research/research_disk.dm @@ -29,3 +29,12 @@ /obj/item/disk/tech_disk/illegal/Initialize() . = ..() stored_research = new /datum/techweb/syndicate + +/obj/item/disk/tech_disk/abductor + name = "Gray technology disk" + desc = "You feel like it's not Gray because of its color." + materials = list() + +/obj/item/disk/tech_disk/abductor/Initialize() + . = ..() + stored_research = new /datum/techweb/abductor diff --git a/code/modules/research/stock_parts.dm b/code/modules/research/stock_parts.dm index 3cd296f866..12fe64463d 100644 --- a/code/modules/research/stock_parts.dm +++ b/code/modules/research/stock_parts.dm @@ -43,7 +43,7 @@ If you create T5+ please take a pass at gene_modder.dm [L40]. Max_values MUST fi /obj/item/storage/part_replacer/bluespace name = "bluespace rapid part exchange device" - desc = "A version of the RPED that allows for replacement of parts and scanning from a distance, along with higher capacity for parts." + desc = "A version of the RPED that allows for replacement of parts and scanning from a distance, along with higher capacity for parts. Definitely not just a BSRPED painted orange." icon_state = "BS_RPED" w_class = WEIGHT_CLASS_NORMAL works_from_distance = TRUE @@ -52,12 +52,10 @@ If you create T5+ please take a pass at gene_modder.dm [L40]. Max_values MUST fi component_type = /datum/component/storage/concrete/bluespace/rped /obj/item/storage/part_replacer/cyborg - name = "rapid part exchange device" - desc = "Special mechanical module made to store, sort, and apply standard machine parts." icon_state = "borgrped" - item_state = "RPED" - lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' - righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' + +/obj/item/storage/part_replacer/bluespace/cyborg + icon_state = "borg_BS_RPED" /proc/cmp_rped_sort(obj/item/A, obj/item/B) return B.get_part_rating() - A.get_part_rating() diff --git a/code/modules/research/techweb/_techweb.dm b/code/modules/research/techweb/_techweb.dm index cd5a190fd6..1e554f112f 100644 --- a/code/modules/research/techweb/_techweb.dm +++ b/code/modules/research/techweb/_techweb.dm @@ -49,6 +49,14 @@ var/datum/techweb_node/syndicate_basic/Node = new() research_node(Node, TRUE) +/datum/techweb/abductor + id = "ABDUCTOR" + organization = "Aliens" + +/datum/techweb/abductor/New() + var/datum/techweb_node/alientech/Node = new() + research_node(Node, TRUE) + /datum/techweb/science //Global science techweb for RND consoles. id = "SCIENCE" organization = "Nanotrasen" @@ -364,3 +372,7 @@ /datum/techweb/specialized/autounlocking/exofab allowed_buildtypes = MECHFAB + +/datum/techweb/specialized/autounlocking/autoylathe + design_autounlock_buildtypes = AUTOYLATHE + allowed_buildtypes = AUTOYLATHE diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index 82037a9b48..fdf887d259 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -10,7 +10,7 @@ // Default research tech, prevents bricking design_ids = list("basic_matter_bin", "basic_cell", "basic_scanning", "basic_capacitor", "basic_micro_laser", "micro_mani", "destructive_analyzer", "circuit_imprinter", "experimentor", "rdconsole", "design_disk", "tech_disk", "rdserver", "rdservercontrol", "mechfab", - "space_heater", "xlarge_beaker", "sec_rshot", "sec_bshot", "sec_slug", "sec_Islug", "sec_dart", "sec_38", "sec_38lethal", + "space_heater", "xlarge_beaker", "sec_beanbag", "sec_rshot", "sec_bshot", "sec_slug", "sec_Islug", "sec_dart", "sec_38", "sec_38lethal", "rglass","plasteel","plastitanium","plasmaglass","plasmareinforcedglass","titaniumglass","plastitaniumglass") /datum/techweb_node/mmi @@ -1027,26 +1027,19 @@ id = "alien_bio" display_name = "Alien Biological Tools" description = "Advanced biological tools." - prereq_ids = list("alientech", "adv_biotech") + prereq_ids = list("alientech", "advance_surgerytools") design_ids = list("alien_scalpel", "alien_hemostat", "alien_retractor", "alien_saw", "alien_drill", "alien_cautery") - boost_item_paths = list(/obj/item/gun/energy/alien, /obj/item/scalpel/alien, /obj/item/hemostat/alien, /obj/item/retractor/alien, /obj/item/circular_saw/alien, - /obj/item/cautery/alien, /obj/item/surgicaldrill/alien, /obj/item/screwdriver/abductor, /obj/item/wrench/abductor, /obj/item/crowbar/abductor, /obj/item/multitool/abductor, /obj/item/stock_parts/cell/infinite/abductor, - /obj/item/weldingtool/abductor, /obj/item/wirecutters/abductor, /obj/item/circuitboard/machine/abductor, /obj/item/abductor_baton, /obj/item/abductor) - research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500) - export_price = 20000 - hidden = TRUE + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000) + export_price = 10000 /datum/techweb_node/alien_engi id = "alien_engi" display_name = "Alien Engineering" description = "Alien engineering tools" - prereq_ids = list("alientech", "adv_engi") + prereq_ids = list("alientech", "exp_tools") design_ids = list("alien_wrench", "alien_wirecutters", "alien_screwdriver", "alien_crowbar", "alien_welder", "alien_multitool") - boost_item_paths = list(/obj/item/screwdriver/abductor, /obj/item/wrench/abductor, /obj/item/crowbar/abductor, /obj/item/multitool/abductor, /obj/item/stock_parts/cell/infinite/abductor, - /obj/item/weldingtool/abductor, /obj/item/wirecutters/abductor, /obj/item/circuitboard/machine/abductor, /obj/item/abductor_baton, /obj/item/abductor) - research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500) - export_price = 20000 - hidden = TRUE + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000) + export_price = 10000 /datum/techweb_node/syndicate_basic id = "syndicate_basic" @@ -1106,4 +1099,4 @@ for(var/i in processing) var/datum/techweb_node/TN = i TW.add_point_list(TN.research_costs) - return TW.printout_points() \ No newline at end of file + return TW.printout_points() diff --git a/code/modules/research/xenobiology/crossbreeding/_misc.dm b/code/modules/research/xenobiology/crossbreeding/_misc.dm index b28f1676a1..0099fe143d 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/research/xenobiology/crossbreeding/_status_effects.dm b/code/modules/research/xenobiology/crossbreeding/_status_effects.dm index b9e7122d07..6ad4ec34f8 100644 --- a/code/modules/research/xenobiology/crossbreeding/_status_effects.dm +++ b/code/modules/research/xenobiology/crossbreeding/_status_effects.dm @@ -64,10 +64,9 @@ var/interrupted = FALSE var/mob/target var/icon/bluespace - var/datum/weakref/redirect_component /datum/status_effect/slimerecall/on_apply() - redirect_component = WEAKREF(owner.AddComponent(/datum/component/redirect, list(COMSIG_LIVING_RESIST = CALLBACK(src, .proc/resistField)))) + RegisterSignal(owner, COMSIG_LIVING_RESIST, .proc/resistField) to_chat(owner, "You feel a sudden tug from an unknown force, and feel a pull to bluespace!") to_chat(owner, "Resist if you wish avoid the force!") bluespace = icon('icons/effects/effects.dmi',"chronofield") @@ -77,9 +76,9 @@ /datum/status_effect/slimerecall/proc/resistField() interrupted = TRUE owner.remove_status_effect(src) + /datum/status_effect/slimerecall/on_remove() - qdel(redirect_component.resolve()) - redirect_component = null + UnregisterSignal(owner, COMSIG_LIVING_RESIST) owner.cut_overlay(bluespace) if(interrupted || !ismob(target)) to_chat(owner, "The bluespace tug fades away, and you feel that the force has passed you by.") @@ -98,10 +97,9 @@ duration = -1 //Will remove self when block breaks. alert_type = /obj/screen/alert/status_effect/freon/stasis var/obj/structure/ice_stasis/cube - var/datum/weakref/redirect_component /datum/status_effect/frozenstasis/on_apply() - redirect_component = WEAKREF(owner.AddComponent(/datum/component/redirect, list(COMSIG_LIVING_RESIST = CALLBACK(src, .proc/breakCube)))) + RegisterSignal(owner, COMSIG_LIVING_RESIST, .proc/breakCube) cube = new /obj/structure/ice_stasis(get_turf(owner)) owner.forceMove(cube) owner.status_flags |= GODMODE @@ -118,8 +116,7 @@ if(cube) qdel(cube) owner.status_flags &= ~GODMODE - qdel(redirect_component.resolve()) - redirect_component = null + UnregisterSignal(owner, COMSIG_LIVING_RESIST) /datum/status_effect/slime_clone id = "slime_cloned" diff --git a/code/modules/research/xenobiology/xenobio_camera.dm b/code/modules/research/xenobiology/xenobio_camera.dm index 5aebd1bafa..641b7e7dcb 100644 --- a/code/modules/research/xenobiology/xenobio_camera.dm +++ b/code/modules/research/xenobiology/xenobio_camera.dm @@ -29,12 +29,11 @@ var/datum/action/innate/slime_scan/scan_action var/datum/action/innate/feed_potion/potion_action - var/datum/component/redirect/listener - var/list/stored_slimes var/obj/item/slimepotion/slime/current_potion - var/max_slimes = 5 + var/max_slimes = 1 var/monkeys = 0 + var/upgradetier = 0 icon_screen = "slime_comp" icon_keyboard = "rd_key" @@ -50,7 +49,7 @@ scan_action = new potion_action = new stored_slimes = list() - listener = AddComponent(/datum/component/redirect, list(COMSIG_ATOM_CONTENTS_DEL = CALLBACK(src, .proc/on_contents_del))) + RegisterSignal(src, COMSIG_ATOM_CONTENTS_DEL, .proc/on_contents_del) /obj/machinery/computer/camera_advanced/xenobio/Destroy() stored_slimes = null @@ -108,6 +107,22 @@ stored_slimes -= deleted /obj/machinery/computer/camera_advanced/xenobio/attackby(obj/item/O, mob/user, params) + if(istype(O, /obj/item/disk/xenobio_console_upgrade)) + var/obj/item/disk/xenobio_console_upgrade/diskthing = O + var/successfulupgrade = FALSE + for(var/I in diskthing.upgradetypes) + if(upgradetier & I) + continue + else + upgradetier |= I + successfulupgrade = TRUE + if(I == XENOBIO_UPGRADE_SLIMEADV) + max_slimes = 10 + if(successfulupgrade) + to_chat(user, "You have successfully upgraded [src] with [O].") + else + to_chat(user, "[src] already has the contents of [O] installed!") + return if(istype(O, /obj/item/reagent_containers/food/snacks/monkeycube) && (upgradetier & XENOBIO_UPGRADE_MONKEYS)) //CIT CHANGE - makes monkey-related actions require XENOBIO_UPGRADE_MONKEYS monkeys++ to_chat(user, "You feed [O] to [src]. It now has [monkeys] monkey cubes stored.") @@ -266,3 +281,29 @@ break else to_chat(owner, "Target is not near a camera. Cannot proceed.") + +/obj/item/disk/xenobio_console_upgrade + name = "Xenobiology console upgrade disk" + desc = "Allan please add detail." + icon_state = "datadisk5" + var/list/upgradetypes = list() + +/obj/item/disk/xenobio_console_upgrade/admin + name = "Xenobio all access thing" + desc = "'the consoles are literally useless!!!!!!!!!!!!!!!'" + upgradetypes = list(XENOBIO_UPGRADE_SLIMEBASIC, XENOBIO_UPGRADE_SLIMEADV, XENOBIO_UPGRADE_MONKEYS) + +/obj/item/disk/xenobio_console_upgrade/monkey + name = "Xenobiology console monkey upgrade disk" + desc = "This disk will add the ability to remotely recycle monkeys via the Xenobiology console." + upgradetypes = list(XENOBIO_UPGRADE_MONKEYS) + +/obj/item/disk/xenobio_console_upgrade/slimebasic + name = "Xenobiology console basic slime upgrade disk" + desc = "This disk will add the ability to remotely manipulate slimes via the Xenobiology console." + upgradetypes = list(XENOBIO_UPGRADE_SLIMEBASIC) + +/obj/item/disk/xenobio_console_upgrade/slimeadv + name = "Xenobiology console advanced slime upgrade disk" + desc = "This disk will add the ability to remotely feed slimes potions via the Xenobiology console, and lift the restrictions on the number of slimes that can be stored inside the Xenobiology console. This includes the contents of the basic slime upgrade disk." + upgradetypes = list(XENOBIO_UPGRADE_SLIMEBASIC, XENOBIO_UPGRADE_SLIMEADV) diff --git a/code/modules/ruins/spaceruin_code/hilbertshotel.dm b/code/modules/ruins/spaceruin_code/hilbertshotel.dm new file mode 100644 index 0000000000..0d4d2b6ad6 --- /dev/null +++ b/code/modules/ruins/spaceruin_code/hilbertshotel.dm @@ -0,0 +1,529 @@ +GLOBAL_VAR_INIT(hhStorageTurf, null) +GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337) + +/obj/item/hilbertshotel + name = "Hilbert's Hotel" + desc = "A sphere of what appears to be an intricate network of bluespace. Observing it in detail seems to give you a headache as you try to comprehend the infinite amount of infinitesimally distinct points on its surface." + icon_state = "hilbertshotel" + w_class = WEIGHT_CLASS_SMALL + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF + var/datum/map_template/hilbertshotel/hotelRoomTemp + var/datum/map_template/hilbertshotel/empty/hotelRoomTempEmpty + var/datum/map_template/hilbertshotel/lore/hotelRoomTempLore + var/list/activeRooms = list() + var/list/storedRooms = list() + var/storageTurf + //Lore Stuff + var/ruinSpawned = FALSE + var/mysteryRoom + +/obj/item/hilbertshotel/Initialize() + . = ..() + //Load templates + hotelRoomTemp = new() + hotelRoomTempEmpty = new() + hotelRoomTempLore = new() + var/area/currentArea = get_area(src) + if(currentArea.type == /area/ruin/space/has_grav/hilbertresearchfacility) + ruinSpawned = TRUE + +/obj/item/hilbertshotel/Destroy() + ejectRooms() + return ..() + +/obj/item/hilbertshotel/attack(mob/living/M, mob/living/user) + if(M.mind) + to_chat(user, "You invite [M] to the hotel.") + promptAndCheckIn(M) + else + to_chat(user, "[M] is not intelligent enough to understand how to use this device!") + +/obj/item/hilbertshotel/attack_self(mob/user) + . = ..() + promptAndCheckIn(user) + +/obj/item/hilbertshotel/proc/promptAndCheckIn(mob/user) + var/chosenRoomNumber = input(user, "What number room will you be checking into?", "Room Number") as null|num + if(!chosenRoomNumber) + return + if(chosenRoomNumber > SHORT_REAL_LIMIT) + to_chat(user, "You have to check out the first [SHORT_REAL_LIMIT] rooms before you can go to a higher numbered one!") + return + if((chosenRoomNumber < 1) || (chosenRoomNumber != round(chosenRoomNumber))) + to_chat(user, "That is not a valid room number!") + return + if(ismob(loc)) + if(user == loc) //Not always the same as user + forceMove(get_turf(user)) + if(!storageTurf) //Blame subsystems for not allowing this to be in Initialize + if(!GLOB.hhStorageTurf) + var/datum/map_template/hilbertshotelstorage/storageTemp = new() + var/datum/turf_reservation/storageReservation = SSmapping.RequestBlockReservation(3, 3) + storageTemp.load(locate(storageReservation.bottom_left_coords[1], storageReservation.bottom_left_coords[2], storageReservation.bottom_left_coords[3])) + GLOB.hhStorageTurf = locate(storageReservation.bottom_left_coords[1]+1, storageReservation.bottom_left_coords[2]+1, storageReservation.bottom_left_coords[3]) + else + storageTurf = GLOB.hhStorageTurf + if(tryActiveRoom(chosenRoomNumber, user)) + return + if(tryStoredRoom(chosenRoomNumber, user)) + return + sendToNewRoom(chosenRoomNumber, user) + + +/obj/item/hilbertshotel/proc/tryActiveRoom(var/roomNumber, var/mob/user) + if(activeRooms["[roomNumber]"]) + var/datum/turf_reservation/roomReservation = activeRooms["[roomNumber]"] + do_sparks(3, FALSE, get_turf(user)) + user.forceMove(locate(roomReservation.bottom_left_coords[1] + hotelRoomTemp.landingZoneRelativeX, roomReservation.bottom_left_coords[2] + hotelRoomTemp.landingZoneRelativeY, roomReservation.bottom_left_coords[3])) + return TRUE + else + return FALSE + +/obj/item/hilbertshotel/proc/tryStoredRoom(var/roomNumber, var/mob/user) + if(storedRooms["[roomNumber]"]) + var/datum/turf_reservation/roomReservation = SSmapping.RequestBlockReservation(hotelRoomTemp.width, hotelRoomTemp.height) + hotelRoomTempEmpty.load(locate(roomReservation.bottom_left_coords[1], roomReservation.bottom_left_coords[2], roomReservation.bottom_left_coords[3])) + var/turfNumber = 1 + for(var/i=0, iAs the sphere breaks apart, you're suddenly ejected into the depths of space!") + var/max = world.maxx-TRANSITIONEDGE + var/min = 1+TRANSITIONEDGE + var/list/possible_transtitons = list() + for(var/AZ in SSmapping.z_list) + var/datum/space_level/D = AZ + if (D.linkage == CROSSLINKED) + possible_transtitons += D.z_value + var/_z = pick(possible_transtitons) + var/_x = rand(min,max) + var/_y = rand(min,max) + var/turf/T = locate(_x, _y, _z) + A.forceMove(T) + qdel(room) + + if(storedRooms.len) + for(var/x in storedRooms) + var/list/atomList = storedRooms[x] + for(var/atom/movable/A in atomList) + var/max = world.maxx-TRANSITIONEDGE + var/min = 1+TRANSITIONEDGE + var/list/possible_transtitons = list() + for(var/AZ in SSmapping.z_list) + var/datum/space_level/D = AZ + if (D.linkage == CROSSLINKED) + possible_transtitons += D.z_value + var/_z = pick(possible_transtitons) + var/_x = rand(min,max) + var/_y = rand(min,max) + var/turf/T = locate(_x, _y, _z) + A.forceMove(T) + +//Template Stuff +/datum/map_template/hilbertshotel + name = "Hilbert's Hotel Room" + mappath = '_maps/templates/hilbertshotel.dmm' + var/landingZoneRelativeX = 2 + var/landingZoneRelativeY = 8 + +/datum/map_template/hilbertshotel/empty + name = "Empty Hilbert's Hotel Room" + mappath = '_maps/templates/hilbertshotelempty.dmm' + +/datum/map_template/hilbertshotel/lore + name = "Doctor Hilbert's Deathbed" + mappath = '_maps/templates/hilbertshotellore.dmm' + +/datum/map_template/hilbertshotelstorage + name = "Hilbert's Hotel Storage" + mappath = '_maps/templates/hilbertshotelstorage.dmm' + + +//Turfs and Areas +/turf/closed/indestructible/hotelwall + name = "hotel wall" + desc = "A wall designed to protect the security of the hotel's guests." + icon_state = "hotelwall" + canSmoothWith = list(/turf/closed/indestructible/hotelwall) + explosion_block = INFINITY + +/turf/open/indestructible/hotelwood + desc = "Stylish dark wood with extra reinforcement. Secured firmly to the floor to prevent tampering." + icon_state = "wood" + footstep = FOOTSTEP_WOOD + tiled_dirt = FALSE + +/turf/open/indestructible/hoteltile + desc = "Smooth tile with extra reinforcement. Secured firmly to the floor to prevent tampering." + icon_state = "showroomfloor" + footstep = FOOTSTEP_FLOOR + tiled_dirt = FALSE + +/turf/open/space/bluespace + name = "\proper bluespace hyperzone" + icon_state = "bluespace" + baseturfs = /turf/open/space/bluespace + flags_1 = NOJAUNT_1 + explosion_block = INFINITY + var/obj/item/hilbertshotel/parentSphere + +/turf/open/space/bluespace/Entered(atom/movable/A) + . = ..() + A.forceMove(get_turf(parentSphere)) + +/turf/closed/indestructible/hoteldoor + name = "Hotel Door" + icon_state = "hoteldoor" + explosion_block = INFINITY + var/obj/item/hilbertshotel/parentSphere + +/turf/closed/indestructible/hoteldoor/proc/promptExit(mob/living/user) + if(!isliving(user)) + return + if(!user.mind) + return + if(!parentSphere) + to_chat(user, "The door seems to be malfunctioning and refuses to operate!") + return + if(alert(user, "Hilbert's Hotel would like to remind you that while we will do everything we can to protect the belongings you leave behind, we make no guarantees of their safety while you're gone, especially that of the health of any living creatures. With that in mind, are you ready to leave?", "Exit", "Leave", "Stay") == "Leave") + if(!user.canmove || (get_dist(get_turf(src), get_turf(user)) > 1)) //no teleporting around if they're dead or moved away during the prompt. + return + user.forceMove(get_turf(parentSphere)) + do_sparks(3, FALSE, get_turf(user)) + +/turf/closed/indestructible/hoteldoor/attack_ghost(mob/dead/observer/user) + if(!isobserver(user) || !parentSphere) + return ..() + user.forceMove(get_turf(parentSphere)) + +//If only this could be simplified... +/turf/closed/indestructible/hoteldoor/attack_tk(mob/user) + return //need to be close. + +/turf/closed/indestructible/hoteldoor/attack_hand(mob/user) + promptExit(user) + +/turf/closed/indestructible/hoteldoor/attack_animal(mob/user) + promptExit(user) + +/turf/closed/indestructible/hoteldoor/attack_paw(mob/user) + promptExit(user) + +/turf/closed/indestructible/hoteldoor/attack_hulk(mob/living/carbon/human/user, does_attack_animation) + promptExit(user) + +/turf/closed/indestructible/hoteldoor/attack_larva(mob/user) + promptExit(user) + +/turf/closed/indestructible/hoteldoor/attack_slime(mob/user) + promptExit(user) + +/turf/closed/indestructible/hoteldoor/attack_robot(mob/user) + if(get_dist(get_turf(src), get_turf(user)) <= 1) + promptExit(user) + +/turf/closed/indestructible/hoteldoor/AltClick(mob/user) + . = ..() + if(get_dist(get_turf(src), get_turf(user)) <= 1) + to_chat(user, "You peak through the door's bluespace peephole...") + user.reset_perspective(parentSphere) + user.set_machine(src) + var/datum/action/peepholeCancel/PHC = new + user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1) + PHC.Grant(user) + +/turf/closed/indestructible/hoteldoor/check_eye(mob/user) + if(get_dist(get_turf(src), get_turf(user)) >= 2) + user.unset_machine() + for(var/datum/action/peepholeCancel/PHC in user.actions) + PHC.Trigger() + +/datum/action/peepholeCancel + name = "Cancel View" + desc = "Stop looking through the bluespace peephole." + button_icon_state = "cancel_peephole" + +/datum/action/peepholeCancel/Trigger() + . = ..() + to_chat(owner, "You move away from the peephole.") + owner.reset_perspective() + owner.clear_fullscreen("remote_view", 0) + qdel(src) + +/area/hilbertshotel + name = "Hilbert's Hotel Room" + icon_state = "hilbertshotel" + requires_power = FALSE + has_gravity = TRUE + noteleport = TRUE + hidden = TRUE + unique = FALSE + dynamic_lighting = DYNAMIC_LIGHTING_FORCED + ambientsounds = list('sound/ambience/servicebell.ogg') + var/roomnumber = 0 + var/obj/item/hilbertshotel/parentSphere + var/datum/turf_reservation/reservation + var/turf/storageTurf + +/area/hilbertshotel/Entered(atom/movable/AM) + . = ..() + if(istype(AM, /obj/item/hilbertshotel)) + relocate(AM) + var/list/obj/item/hilbertshotel/hotels = AM.GetAllContents(/obj/item/hilbertshotel) + for(var/obj/item/hilbertshotel/H in hotels) + if(parentSphere == H) + relocate(H) + +/area/hilbertshotel/proc/relocate(obj/item/hilbertshotel/H) + if(prob(0.135685)) //Because screw you + qdel(H) + return + var/turf/targetturf = find_safe_turf() + if(!targetturf) + if(GLOB.blobstart.len > 0) + targetturf = get_turf(pick(GLOB.blobstart)) + else + CRASH("Unable to find a blobstart landmark") + var/turf/T = get_turf(H) + var/area/A = T.loc + log_game("[H] entered itself. Moving it to [loc_name(targetturf)].") + message_admins("[H] entered itself. Moving it to [ADMIN_VERBOSEJMP(targetturf)].") + for(var/mob/M in A) + to_chat(M, "[H] almost implodes in upon itself, but quickly rebounds, shooting off into a random point in space!") + H.forceMove(targetturf) + +/area/hilbertshotel/Exited(atom/movable/AM) + . = ..() + if(ismob(AM)) + var/mob/M = AM + if(M.mind) + var/stillPopulated = FALSE + var/list/currentLivingMobs = GetAllContents(/mob/living) //Got to catch anyone hiding in anything + for(var/mob/living/L in currentLivingMobs) //Check to see if theres any sentient mobs left. + if(L.mind) + stillPopulated = TRUE + break + if(!stillPopulated) + storeRoom() + +/area/hilbertshotel/proc/storeRoom() + var/roomSize = (reservation.top_right_coords[1]-reservation.bottom_left_coords[1]+1)*(reservation.top_right_coords[2]-reservation.bottom_left_coords[2]+1) + var/storage[roomSize] + var/turfNumber = 1 + var/obj/item/abstracthotelstorage/storageObj = new(storageTurf) + storageObj.roomNumber = roomnumber + storageObj.parentSphere = parentSphere + storageObj.name = "Room [roomnumber] Storage" + for(var/i=0, i