diff --git a/_maps/map_files/RandomZLevels/terrorspiders.dmm b/_maps/map_files/RandomZLevels/terrorspiders.dmm index c9f87baae70..1b378c09f9a 100644 --- a/_maps/map_files/RandomZLevels/terrorspiders.dmm +++ b/_maps/map_files/RandomZLevels/terrorspiders.dmm @@ -521,7 +521,7 @@ "ka" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/awaymission/UO71/centralhall) "kb" = (/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"; tag = ""},/obj/structure/disposalpipe/segment{dir = 8; icon_state = "pipe-c"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 9},/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/awaymission/UO71/centralhall) "kc" = (/obj/machinery/door/poddoor{id_tag = "UO71_Start"; name = "UO71 Sealed Facility"},/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) -"kd" = (/obj/machinery/door/firedoor,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = ""},/obj/machinery/door/airlock/command{icon_state = "door_closed"; lockdownbyai = 0; locked = 0; name = "Gateway Chamber"; req_access_txt = "271"},/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) +"kd" = (/obj/machinery/door/firedoor,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = ""},/obj/machinery/door/airlock/command{name = "Gateway"; req_access_txt = "271"},/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) "ke" = (/obj/structure/sign/securearea{desc = "A warning sign which reads 'DANGER - LETHAL BIOHAZARDS WITHIN'"; name = "CONTAINMENT AREA"},/turf/simulated/wall,/area/awaymission/UO71/science) "kf" = (/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plasteel{tag = "icon-whitepurple (NORTHWEST)"; icon_state = "whitepurple"; dir = 9},/area/awaymission/UO71/science) "kg" = (/turf/simulated/floor/plasteel{tag = "icon-whitepurple (NORTHEAST)"; icon_state = "whitepurple"; dir = 5},/area/awaymission/UO71/science) @@ -548,7 +548,7 @@ "kB" = (/obj/structure/closet/emcloset,/obj/item/clothing/mask/breath,/obj/item/weapon/storage/toolbox/syndicate,/turf/simulated/floor/plating{broken = 1; icon_state = "platingdmg1"; tag = "icon-platingdmg1"},/area/awaymission/UO71/centralhall) "kC" = (/obj/structure/closet/crate,/obj/effect/decal/cleanable/dirt,/obj/item/weapon/storage/toolbox/mechanical{pixel_x = -2; pixel_y = -1},/obj/item/device/multitool,/turf/simulated/floor/plating,/area/awaymission/UO71/centralhall) "kD" = (/obj/structure/closet/l3closet/general,/turf/simulated/floor/plating,/area/awaymission/UO71/centralhall) -"kE" = (/obj/structure/table,/obj/machinery/computer/id_upgrader,/turf/simulated/floor/plasteel{dir = 4; icon_state = "warndark"; tag = "icon-warndark (EAST)"},/area/awaymission/UO71/gateway) +"kE" = (/obj/structure/table,/obj/item/weapon/storage/belt/utility,/obj/item/weapon/storage/belt/utility,/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) "kF" = (/turf/simulated/floor/plasteel{dir = 8; icon_state = "floorgrime"; tag = "icon-floorgrime (WEST)"},/area/awaymission/UO71/gateway) "kG" = (/obj/effect/decal/cleanable/dirt,/obj/machinery/suit_storage_unit/engine,/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) "kH" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/plasteel{dir = 1; icon_state = "warning"},/area/awaymission/UO71/gateway) @@ -596,11 +596,11 @@ "lx" = (/obj/structure/table,/obj/item/weapon/storage/toolbox/mechanical{pixel_x = -2; pixel_y = -1},/obj/item/device/multitool,/obj/structure/sign/nosmoking_2{pixel_x = -32},/obj/item/weapon/storage/toolbox/mechanical{pixel_x = -2; pixel_y = -1},/turf/simulated/floor/plasteel{dir = 4; icon_state = "warndark"; tag = "icon-warndark (EAST)"},/area/awaymission/UO71/gateway) "ly" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) "lz" = (/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"; tag = ""},/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) -"lA" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/structure/cable{d1 = 2; d2 = 4; icon_state = "2-4"; tag = ""},/obj/machinery/alarm/monitor{frequency = 1439; locked = 0; pixel_y = 23; req_access = null},/obj/machinery/camera{c_tag = "Gateway Ready Room"; dir = 2; network = list("UO71")},/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) +"lA" = (/obj/machinery/alarm/monitor{frequency = 1439; locked = 0; pixel_y = 23; req_access = null},/obj/machinery/camera{c_tag = "Gateway Ready Room"; dir = 2; network = list("UO71")},/obj/structure/table,/obj/machinery/computer/id_upgrader,/turf/simulated/floor/plasteel{dir = 8; icon_state = "floorgrime"; tag = "icon-floorgrime (WEST)"},/area/awaymission/UO71/gateway) "lB" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 6},/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) "lC" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) "lD" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/atmospherics/pipe/manifold/hidden/supply,/turf/simulated/floor/plasteel{icon_state = "white"},/area/awaymission/UO71/gateway) -"lE" = (/obj/machinery/door/firedoor,/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/door/poddoor{id_tag = "UO71_Start"; name = "UO71 Sealed Facility"},/obj/machinery/door/airlock/command{icon_state = "door_closed"; lockdownbyai = 0; locked = 0; name = "Gateway Ready Room"; req_access_txt = "271"},/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) +"lE" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/structure/cable{d1 = 2; d2 = 4; icon_state = "2-4"; tag = ""},/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) "lF" = (/obj/machinery/door/firedoor,/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/door/airlock/research{name = "Research Division Access"; req_access_txt = "271"},/turf/simulated/floor/plasteel{icon_state = "white"},/area/awaymission/UO71/gateway) "lG" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/plasteel{icon_state = "white"},/area/awaymission/UO71/gateway) "lH" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/plasteel{dir = 2; icon_state = "whitepurplecorner"},/area/awaymission/UO71/science) @@ -660,10 +660,10 @@ "mJ" = (/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/awaymission/UO71/eng) "mK" = (/obj/structure/closet/crate,/obj/item/stack/sheet/metal{amount = 50},/obj/item/stack/sheet/glass{amount = 50},/obj/item/stack/rods{amount = 50},/obj/machinery/door_control{desc = "A remote control-switch for secure storage."; id = "UO71_Secure Storage"; name = "Engineering Secure Storage"; pixel_x = 6; pixel_y = -24; req_access_txt = "271"},/turf/simulated/floor/plating,/area/awaymission/UO71/eng) "mL" = (/obj/structure/table,/obj/item/weapon/hand_labeler,/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) -"mM" = (/obj/structure/extinguisher_cabinet{pixel_x = 0; pixel_y = -28},/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/device/flashlight,/obj/item/device/flashlight,/obj/item/device/flashlight,/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) -"mN" = (/obj/structure/table,/obj/item/weapon/storage/belt/utility,/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) +"mM" = (/obj/machinery/door/firedoor,/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/door/airlock/command{name = "Gateway"; req_access_txt = "271"},/obj/machinery/door/poddoor{id_tag = "UO71_Start"; name = "UO71 Sealed Facility"},/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) +"mN" = (/obj/structure/extinguisher_cabinet{pixel_x = 0; pixel_y = -28},/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/device/flashlight,/obj/item/device/flashlight,/obj/item/device/flashlight,/obj/item/device/flashlight,/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) "mO" = (/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/clothing/shoes/magboots,/obj/machinery/firealarm{dir = 1; pixel_x = 0; pixel_y = -24},/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) -"mP" = (/obj/structure/cable,/obj/machinery/power/apc/noalarm{cell_type = 15000; dir = 2; locked = 0; name = "UO71 Gateway APC"; pixel_x = 0; pixel_y = -25; req_access = null; start_charge = 100},/obj/machinery/light/small,/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/weapon/gun/energy/laser/awaymission_aeg,/obj/item/weapon/gun/energy/laser/awaymission_aeg,/obj/item/weapon/gun/energy/laser/awaymission_aeg,/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) +"mP" = (/obj/structure/cable,/obj/machinery/power/apc/noalarm{cell_type = 15000; dir = 2; locked = 0; name = "UO71 Gateway APC"; pixel_x = 0; pixel_y = -25; req_access = null; start_charge = 100},/obj/machinery/light/small,/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/weapon/gun/energy/laser/awaymission_aeg,/obj/item/weapon/gun/energy/laser/awaymission_aeg,/obj/item/weapon/gun/energy/laser/awaymission_aeg,/obj/item/weapon/gun/energy/laser/awaymission_aeg,/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) "mQ" = (/obj/structure/reagent_dispensers/fueltank,/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) "mR" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/wall/rust,/area/awaymission/UO71/science) "mS" = (/obj/structure/reagent_dispensers/watertank,/turf/simulated/floor/plasteel,/area/awaymission/UO71/gateway) @@ -743,7 +743,7 @@ "oo" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/table/reinforced,/obj/item/weapon/paper_bin{pixel_x = 1; pixel_y = 9},/obj/item/weapon/pen,/turf/simulated/floor/plasteel{dir = 5; icon_state = "cafeteria"; tag = "icon-cafeteria (NORTHEAST)"},/area/awaymission/UO71/science) "op" = (/obj/machinery/light/small{dir = 4},/obj/structure/window/reinforced{dir = 1},/obj/structure/table/reinforced,/obj/item/device/taperecorder{pixel_x = -3},/obj/item/device/paicard{pixel_x = 4},/turf/simulated/floor/plasteel{dir = 5; icon_state = "cafeteria"; tag = "icon-cafeteria (NORTHEAST)"},/area/awaymission/UO71/science) "oq" = (/obj/machinery/atmospherics/unary/vent_pump{on = 1},/turf/simulated/floor/plasteel,/area/awaymission/UO71/science) -"or" = (/obj/machinery/alarm/monitor{dir = 4; frequency = 1439; locked = 0; pixel_x = -23; pixel_y = 0; req_access = null},/obj/item/device/radio/off,/obj/item/weapon/screwdriver{pixel_y = 10},/obj/machinery/light/small{dir = 8},/turf/simulated/floor/plasteel{dir = 8; icon_state = "red"},/area/awaymission/UO71/science) +"or" = (/obj/machinery/alarm/monitor{dir = 4; frequency = 1439; locked = 0; pixel_x = -23; pixel_y = 0; req_access = null},/obj/item/device/radio/off,/obj/machinery/light/small{dir = 8},/obj/item/weapon/screwdriver,/turf/simulated/floor/plasteel{dir = 8; icon_state = "red"},/area/awaymission/UO71/science) "os" = (/turf/simulated/floor/plasteel{dir = 4; icon_state = "red"},/area/awaymission/UO71/science) "ot" = (/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"; tag = ""},/obj/structure/disposalpipe/segment{dir = 1; icon_state = "pipe-c"},/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers,/turf/simulated/floor/plasteel{dir = 4; icon_state = "neutralcorner"},/area/awaymission/UO71/centralhall) "ou" = (/obj/machinery/light/small{dir = 8},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/machinery/alarm/monitor{dir = 4; frequency = 1439; locked = 0; pixel_x = -23; pixel_y = 0; req_access = null},/turf/simulated/floor/plasteel{dir = 8; icon_state = "neutral"},/area/awaymission/UO71/centralhall) @@ -1035,7 +1035,7 @@ "tU" = (/obj/machinery/atmospherics/unary/vent_scrubber{dir = 1; on = 1; scrub_N2O = 0; scrub_Toxins = 0},/turf/simulated/floor/plasteel{dir = 6; icon_state = "yellow"},/area/awaymission/UO71/eng) "tV" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = ""},/obj/structure/disposalpipe/segment,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/plasteel{icon_state = "yellow"},/area/awaymission/UO71/eng) "tW" = (/obj/machinery/computer/security{network = list("UO71")},/obj/machinery/door_control{desc = "A remote control-switch for the security privacy shutters."; id = "UO71_EngineeringOffice"; name = "Privacy Shutters"; pixel_x = -24; pixel_y = 6; req_access_txt = "271"},/turf/simulated/floor/plasteel{dir = 8; icon_state = "red"},/area/awaymission/UO71/eng) -"tX" = (/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 8; initialize_directions = 7; tag = "icon-manifold-r-f (WEST)"},/obj/item/weapon/screwdriver{pixel_y = 10},/obj/item/device/radio/off,/turf/simulated/floor/plasteel{dir = 4; icon_state = "red"},/area/awaymission/UO71/eng) +"tX" = (/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 8; initialize_directions = 7; tag = "icon-manifold-r-f (WEST)"},/obj/item/device/radio/off,/obj/item/weapon/screwdriver,/turf/simulated/floor/plasteel{dir = 4; icon_state = "red"},/area/awaymission/UO71/eng) "tY" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/plasteel,/area/awaymission/UO71/eng) "tZ" = (/obj/machinery/atmospherics/pipe/simple/visible/purple{dir = 6},/obj/machinery/atmospherics/unary/vent_scrubber{dir = 8; on = 1; scrub_N2O = 0; scrub_Toxins = 0},/turf/simulated/floor/plasteel,/area/awaymission/UO71/eng) "ua" = (/obj/structure/grille,/obj/structure/window/full/reinforced,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/machinery/door/poddoor/preopen{id_tag = "UO71_Engineering"; name = "engineering security door"},/turf/simulated/floor/plating,/area/awaymission/UO71/eng) @@ -1220,7 +1220,7 @@ "xx" = (/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = ""},/turf/simulated/floor/plasteel{dir = 8; icon_state = "floorgrime"; tag = "icon-floorgrime (WEST)"},/area/awaymission/UO71/mining) "xy" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/plasteel,/area/awaymission/UO71/mining) "xz" = (/obj/structure/filingcabinet/chestdrawer,/turf/simulated/floor/plasteel{dir = 2; icon_state = "neutralfull"},/area/awaymission/UO71/eng) -"xA" = (/mob/living/simple_animal/hostile/poison/terror_spider/white,/turf/simulated/floor/plasteel{dir = 2; icon_state = "neutralfull"},/area/awaymission/UO71/eng) +"xA" = (/turf/simulated/floor/plasteel{dir = 2; icon_state = "neutralfull"},/area/awaymission/UO71/eng) "xB" = (/obj/structure/stool/bed/chair/office,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plasteel{dir = 2; icon_state = "neutralfull"},/area/awaymission/UO71/eng) "xC" = (/obj/machinery/door/airlock{name = "Private Restroom"},/turf/simulated/floor/plasteel{icon_state = "freezerfloor"},/area/awaymission/UO71/eng) "xD" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/plasteel{dir = 2; icon_state = "neutralfull"},/area/awaymission/UO71/eng) @@ -1420,10 +1420,10 @@ aaaaaaaaaaaaaaabababababfMiuitiwiviziyiGiEixiHiJiAiBiCiDgagaiOiOgaiFgafNiPiQgAfO aaaaaaaaaaaaaaabababababfMjaiZjcjbjejdjfjfjjjhjkfMababababjgjnjnjgjifOfOjojpgzfOababababzcyXzczcyYjqjqyYzczczcabfejsjrfefeababababfejtjugEiohMjyjvjAfbfbjBjwjwjxjxjCjzabababababababababababababababababababababababababababababababababababababaaaaaaaaaaaaaa aaaaaaaaaaaaaaabababababfLjEjDiwjFjHfLfLfMfMjIjJfMababababjGjKjKjGjifOfOjLjNjMfOabababababjlababjGjOjOjGababababfbjPfRjQfefbfbfbfefejRjShhjThjhjgEgEjUjWjVjYjXkajZkbfeabababababababababababababababababababababababababababababababababababababaaaaaaaaaaaaaa aaaaaaaaaaaaaaabababababfMfLfMkdkcfLfLkkkifMklkqfLfOfOfOfOkekfkgkekhfNkrkjktksfOfOfOfOfOfOkmfOfOknkokpkefOfOfNfOfOkufRfRkvfRfFfRfRjrgEgEgEkwiogEkxkykykAkzfbkBkDkCfefbabababababababababababababababababababababababababababababababababababababaaaaaaaaaaaaaa -aaaaaaaaaaaaaaababababababfLkEiwkFfLkGkRkHixkSkUkTkIkJkKkLkMkJkNkOkPkQlckVleldkJkWkNkJkJkXkYkZlalblglflhfOljlilkfOlmlllllllnlllplojrgEiogElrlqlqlqlulslwlvfbfbfefefeababababababababababababababltltltltltabababababababababababababababababababaaaaaaaaaaaaaa -aaaaaaaaaaaaaaababababababfLlxlzlylAlylClBlElDlGlFlHlHlIlHlJlHlLlKlNlMlPlOlRlQlTlSlVlUlXlWlXlXlXlYgAlflhlZgAgAgAlZmbmafFmcfbfefbfbfefefbfbfbmdmehhmffbjsmgfeababababababababababababababababababltnBmzmjltabababababababababababababababababababaaaaaaaaaaaaaa +aaaaaaaaaaaaaaababababababfLkEiwkFlAkGkRkHixkSkUkTkIkJkKkLkMkJkNkOkPkQlckVleldkJkWkNkJkJkXkYkZlalblglflhfOljlilkfOlmlllllllnlllplojrgEiogElrlqlqlqlulslwlvfbfbfefefeababababababababababababababltltltltltabababababababababababababababababababaaaaaaaaaaaaaa +aaaaaaaaaaaaaaababababababfLlxlzlylElylClBmMlDlGlFlHlHlIlHlJlHlLlKlNlMlPlOlRlQlTlSlVlUlXlWlXlXlXlYgAlflhlZgAgAgAlZmbmafFmcfbfefbfbfefefbfbfbmdmehhmffbjsmgfeababababababababababababababababababltnBmzmjltabababababababababababababababababababaaaaaaaaaaaaaa aaaaaaaaaaaaaaababababababfMmkmmmliwjHjHmnfLmompfMfNfOfOfOfNfOfOmqfOfOmsmrfOfOfOmtfOfOfOfNmumumumumvlflhfOokmwqDtDqKfEmBmAfbmCmDmCfemEmGmFfefefbfbfefbmImHfeababababababababababababababababababltmKmJmjltabababababababababababababababababababaaaaaaaaaaaaaa -aaaaaaaaaaaaaaababababababfLmLmNmMmPmOmSmQfMfLfLfLabfOgAgAmTfOmVmUmTfNmRmWfOmXmZmYnbnancfOnendnfmumvlbfOfOmRfOfOfNnhngfefefbninknjfbnlnnnmfenonsnqntfbnumHfbabababababababababababababababababnpltltnvnrnrnpababababababababababababababababababaaaaaaaaaaaaaa +aaaaaaaaaaaaaaababababababfLmLmlmNmPmOmSmQfMfLfLfLabfOgAgAmTfOmVmUmTfNmRmWfOmXmZmYnbnancfOnendnfmumvlbfOfOmRfOfOfNnhngfefefbninknjfbnlnnnmfenonsnqntfbnumHfbabababababababababababababababababnpltltnvnrnrnpababababababababababababababababababaaaaaaaaaaaaaa aaaaaaaaaaaaaaababababababfLfLfMfMfLfLfMfMfLababababfOgAgAgAfOnwmUnxfOmRnyfOnzojnAnDnanafNnFnEnGmumvnCfNnHzDnInInKnMnLnOnNfbfXnPfbfefXnQfbfbnRfFnSnVnUnZnWfbabababababababababababababababababnToaobobobocnpababababababababababababababababababaaaaaaaaaaaaaa aaaaaaaaaaaaaaabababababababababababababababababababfOnXnYgAodgAoeoffOkmogfOohojoiooonopfNoroqosmumvlbfNogzHolomomouotowovoyoxoAozoCoBoAoDoFoEoHoGoJoIoNoMfbabababababababababababababababababnToOoQoPoQoOnpnpnpnpabababababababababababababababaaaaaaaaaaaaaa aaaaaaaaaaaaaaabababababababababababababababababababfOoKoLgAfOoSoRoTfOkmoUfOoVojoWoYoXoZfNpbpapdpcmvlbfOnymRfbfbfbpfpellpgpiphpkpjplphpnpmpppopkpqprfbptpsfeabababababababababababababababababnppwpypxpApznppupvnpabababababababababababababababaaaaaaaaaaaaaa diff --git a/_maps/map_files/cyberiad/cyberiad.dmm b/_maps/map_files/cyberiad/cyberiad.dmm index 8c13c13a6bf..7368c072da7 100644 --- a/_maps/map_files/cyberiad/cyberiad.dmm +++ b/_maps/map_files/cyberiad/cyberiad.dmm @@ -655,7 +655,7 @@ "amE" = (/obj/machinery/computer/prisoner,/turf/simulated/floor/plasteel{dir = 5; icon_state = "darkred"},/area/security/warden) "amF" = (/obj/effect/decal/warning_stripes/north,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/plasteel,/area/security/seceqstorage) "amG" = (/obj/machinery/vending/security,/turf/simulated/floor/plasteel{icon_state = "red"; dir = 9},/area/security/seceqstorage) -"amH" = (/obj/structure/rack,/obj/machinery/recharger/wallcharger{pixel_y = 25},/obj/machinery/recharger/wallcharger{pixel_y = 35},/obj/item/device/flash,/obj/effect/decal/warning_stripes/red/hollow,/turf/simulated/floor/plasteel{icon_state = "red"; dir = 1},/area/security/seceqstorage) +"amH" = (/obj/structure/rack,/obj/machinery/recharger/wallcharger{pixel_y = 25},/obj/machinery/recharger/wallcharger{pixel_y = 35},/obj/effect/decal/warning_stripes/red/hollow,/obj/item/device/assembly/timer{pixel_x = 3; pixel_y = -8},/obj/item/device/assembly/timer{pixel_y = -6; pixel_z = 3},/obj/item/device/flash,/turf/simulated/floor/plasteel{icon_state = "red"; dir = 1},/area/security/seceqstorage) "amI" = (/obj/effect/decal/warning_stripes/north,/turf/simulated/floor/plasteel,/area/security/seceqstorage) "amJ" = (/obj/structure/rack,/obj/structure/reagent_dispensers/peppertank{pixel_y = 30},/obj/item/weapon/restraints/handcuffs{pixel_y = -4},/obj/item/weapon/restraints/handcuffs,/obj/effect/decal/warning_stripes/red/hollow,/obj/machinery/light{dir = 1},/turf/simulated/floor/plasteel{icon_state = "red"; dir = 1},/area/security/seceqstorage) "amK" = (/obj/effect/decal/warning_stripes/red/partial,/turf/simulated/floor/plasteel,/area/security/main) @@ -6628,6 +6628,7 @@ "cxx" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/firealarm{dir = 8; pixel_x = 24},/turf/simulated/floor/plasteel{tag = "icon-whitegreen (EAST)"; icon_state = "whitegreen"; dir = 4},/area/medical/virology) "cxy" = (/obj/structure/table/wood,/obj/item/weapon/storage/briefcase,/obj/item/device/flashlight/lamp/green,/obj/machinery/alarm{dir = 4; pixel_x = -23; pixel_y = 0},/turf/simulated/floor/carpet,/area/medical/psych) "cxz" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 1; on = 1},/turf/simulated/floor/carpet,/area/medical/psych) +"cxA" = (/obj/machinery/door/poddoor{density = 0; icon_state = "open"; id_tag = "Engineering"; name = "Engineering Security Doors"; opacity = 0},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/door/firedoor,/obj/machinery/door/airlock/engineering/glass{name = "Engineering"; req_access_txt = "32"; req_one_access_txt = "0"},/turf/simulated/floor/plasteel,/area/engine/equipmentstorage) "cxB" = (/obj/structure/stool/bed/chair/comfy/lime{dir = 8},/obj/machinery/light{dir = 4},/turf/simulated/floor/carpet,/area/medical/psych) "cxC" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/computer/general_air_control{frequency = 1443; level = 3; name = "Distribution and Waste Monitor"; sensors = list("mair_in_meter" = "Mixed Air In", "air_sensor" = "Mixed Air Supply Tank", "mair_out_meter" = "Mixed Air Out", "dloop_atm_meter" = "Distribution Loop", "wloop_atm_meter" = "Waste Loop")},/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"; tag = ""},/turf/simulated/floor/plasteel,/area/atmos/control) "cxD" = (/obj/machinery/camera{c_tag = "Atmospherics Control Room"; network = list("SS13")},/obj/structure/cable{icon_state = "0-4"; d2 = 4},/obj/structure/table,/obj/item/weapon/book/manual/atmospipes,/obj/item/device/multitool{pixel_x = 5},/obj/machinery/power/apc{dir = 1; name = "north bump Engineering"; pixel_x = 0; pixel_y = 24; shock_proof = 1},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/plasteel,/area/atmos/control) @@ -6660,6 +6661,7 @@ "cye" = (/obj/machinery/atmospherics/unary/tank/oxygen{volume = 3200},/turf/simulated/floor/plasteel{icon_state = "floorgrime"},/area/maintenance/incinerator) "cyf" = (/obj/machinery/portable_atmospherics/canister/oxygen,/obj/effect/decal/cleanable/cobweb2,/turf/simulated/floor/plasteel{icon_state = "floorgrime"},/area/maintenance/incinerator) "cyg" = (/obj/structure/reagent_dispensers/watertank,/turf/simulated/floor/plating,/area/maintenance/apmaint) +"cyh" = (/obj/machinery/door/poddoor{density = 0; icon_state = "open"; id_tag = "Engineering"; name = "Engineering Security Doors"; opacity = 0},/obj/machinery/door/firedoor,/obj/machinery/door/airlock/engineering/glass{name = "Engineering"; req_access_txt = "32"; req_one_access_txt = "0"},/turf/simulated/floor/plasteel,/area/engine/equipmentstorage) "cyi" = (/obj/item/weapon/crowbar,/turf/simulated/floor/plating,/area/maintenance/consarea) "cyj" = (/obj/effect/spawner/window/reinforced,/turf/simulated/floor/plating,/area/maintenance/consarea) "cyk" = (/obj/item/stack/sheet/metal{amount = 10},/turf/simulated/floor/plating,/area/maintenance/consarea) @@ -7603,7 +7605,6 @@ "cQG" = (/turf/simulated/floor/plasteel{tag = "icon-warnwhite (NORTH)"; icon_state = "warnwhite"; dir = 1},/area/assembly/assembly_line) "cQH" = (/obj/structure/table,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/plasteel{tag = "icon-warnwhite (NORTH)"; icon_state = "warnwhite"; dir = 1},/area/assembly/assembly_line) "cQI" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/door/airlock/maintenance{req_access_txt = "12"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/structure/disposalpipe/segment,/turf/simulated/floor/plating,/area/maintenance/aft) -"cQJ" = (/obj/machinery/door/poddoor{density = 0; icon_state = "open"; id_tag = "Engineering"; name = "Engineering Security Doors"; opacity = 0},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/machinery/door/firedoor,/obj/machinery/door/airlock/engineering/glass{name = "Engineering"; req_access_txt = "10"; req_one_access_txt = "0"},/turf/simulated/floor/plasteel,/area/engine/equipmentstorage) "cQK" = (/obj/structure/sign/securearea,/obj/effect/spawner/window/reinforced,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/door/poddoor{density = 0; icon_state = "open"; id_tag = "Engineering"; name = "Engineering Security Doors"; opacity = 0},/turf/simulated/floor/plating,/area/engine/equipmentstorage) "cQL" = (/obj/machinery/light{dir = 8},/obj/machinery/portable_atmospherics/canister/oxygen,/obj/effect/decal/warning_stripes/blue/hollow,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/atmos) "cQM" = (/obj/machinery/portable_atmospherics/canister/oxygen,/obj/effect/decal/warning_stripes/blue/hollow,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/atmos) @@ -7614,7 +7615,6 @@ "cQR" = (/obj/machinery/door/airlock/maintenance,/obj/structure/cable{d1 = 2; d2 = 4; icon_state = "2-4"},/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4; level = 1},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4; level = 1},/turf/simulated/floor/plating,/area/maintenance/asmaint) "cQS" = (/obj/effect/spawner/window/reinforced,/obj/machinery/atmospherics/pipe/simple/hidden/supply{level = 1},/obj/machinery/door/poddoor{density = 0; icon_state = "open"; id_tag = "Engineering"; name = "Engineering Security Doors"; opacity = 0},/turf/simulated/floor/plating,/area/engine/equipmentstorage) "cQT" = (/obj/machinery/hologram/holopad,/turf/simulated/floor/plasteel,/area/atmos/distribution) -"cQU" = (/obj/machinery/door/poddoor{density = 0; icon_state = "open"; id_tag = "Engineering"; name = "Engineering Security Doors"; opacity = 0},/obj/machinery/door/firedoor,/obj/machinery/door/airlock/engineering/glass{name = "Engineering"; req_access_txt = "10"; req_one_access_txt = "0"},/turf/simulated/floor/plasteel,/area/engine/equipmentstorage) "cQV" = (/turf/simulated/floor/plasteel,/turf/simulated/floor/plasteel{tag = "icon-siding8 (NORTH)"; icon_state = "siding8"; dir = 1},/area/atmos) "cQW" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/structure/disposalpipe/segment{dir = 8; icon_state = "pipe-c"},/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 4; initialize_directions = 11; level = 1},/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 4; initialize_directions = 11; level = 1},/turf/simulated/floor/plating,/area/maintenance/genetics) "cQX" = (/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4; level = 1},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4; level = 1},/turf/simulated/floor/plating,/area/maintenance/genetics) @@ -8107,7 +8107,6 @@ "dbV" = (/obj/machinery/computer/shuttle/engineering,/turf/simulated/floor/plating,/area/maintenance/engi_shuttle) "dbW" = (/obj/machinery/light/small{dir = 4},/turf/simulated/floor/engine{carbon_dioxide = 0; name = "plasma floor"; nitrogen = 0; oxygen = 0; toxins = 70000},/area/atmos) "dbY" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"; tag = ""},/turf/simulated/floor/plasteel,/area/hallway/primary/central/west) -"dca" = (/obj/docking_port/stationary{dir = 8; dwidth = 3; height = 5; id = "sit_scimaint"; name = "Cyberiad Science Maint"; width = 11},/turf/space,/area/space) "dcc" = (/obj/machinery/floodlight,/turf/simulated/floor/plating{icon_state = "warnplate"; dir = 4},/area/storage/secure) "dcd" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/structure/table,/obj/machinery/cell_charger,/obj/machinery/camera{c_tag = "Engineering Foyer"; network = list("SS13")},/obj/structure/noticeboard{pixel_y = 28},/turf/simulated/floor/plasteel{icon_state = "caution"; dir = 5},/area/engine/break_room) "dcf" = (/obj/machinery/power/tesla_coil{anchored = 1},/obj/structure/cable{icon_state = "0-2"; pixel_y = 1; d2 = 2},/turf/simulated/floor/plating/airless,/area/space) @@ -9004,7 +9003,7 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacNwaaaalwaaacNFcNEcNMaaacNFcNEcNMaaacNFcNEcNMaaaaaacLicNAcNBcNCcLicNDcNNcLmcLmcLmcLmcLmcLmcLmcLmcLmcNRcKfcNGcLGcMBcNHcLGcLGcLGcNIcLGcNGcNGcLGcLGcLGcLGcNJcNKcMGcNLcHDcNScyEcHQcHQcNTcLOcNOcNPcNQcLOcNUcHVcNVcAGcAFcAHcGKcsKcsLcNYcsLcAIdfMcAOcAMcARcARcARcARcBxcATcBycBycBycBycBAcyJcMfczqcyJcyJcebcsLcsLcBCcAvcAvczqcBCcBYcsLcsLcBGcBHciYbQXcBIcBRcxNcxNcxNcxNcOkcEHcOlcOncOmcOpcOocxNcOqcOtcOrcBRaaaaaacLbcOvcOucOscLecODcLbcOCbGGcFcbGHaabaabaabaabaaaaaaaaaaaaabpaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalwaaacNFcOFcNMaaacNFcOFcNMaaacNFcOFcNMaaaayicLicNBcNBcNBcLicLicOwcOxcLicLicOxcOxcLicLicOxcOxcLwcKfcNGcOycLGcOzcOAcOBcOBcMAcLGcNGcOGcLGcLGcLGcLGcOHcOEcOJcOIclXcOKcOMcOLcOYcORcLOcNOcOZcONcLOcOOcHVcGKcGKcGKcBJcGKcZScOTcOUcOTcOWcOTcOTcOTcOTcOTcBKcBPcBPcBPcBPcBPcBPcBPcBLcnVcBQcsLcBOcBMcBTcsLcsLchfcBWcBVcBXchfcDbcCXcPhcDecDgciYbQXcDhcBRcKPcKQcKRcPmcPlcNocPncPjcPocPqcPpcPscPrcPpcPtcBRaaaaaacLbcLbcPycPAcPzcLbcLbbGHbGGcPBcuQcuQcuQbGHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabpaaaaaaaaaayiaabcNFcOFcNMaaacNFcOFcNMaabcNFcOFcNMaaaaabcLicMrcPucNDcLiaaaaabaaaaaaaaaaaaaaaaabaaaaaacOxcLwcKbcPvcLGcPwcPxcPCcPEcPDcPEcPFcPEcPGcPHcLCcPIcNGcNGcNKcPLcPJcPNcPMcPPcPKcPVcPSbgYcPObHWcPQcPRcPYcPTcPUcPUcQacDjcDicQdcPZcQfcDkcQhcQgcDlcQicQocQmcQpcQpcQpcQpcQpcQpcQqcBPcBLcsLcDmchfchfcBQcBQchfcDnchfchfchfchfchfciYcDobQXctrbQXciYcDpbQXcBRcJKcKZcJKcQxcMjcEHcQzcQAcQrcQscEHcEHcQtcEHcQBcBRaaaaabaabcLbcLbcQvcLbcLbaaabGHbGGcFccuQcQwcQCbGHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaacNFcOFcNMaabcNFcOFcNMaaacNFcOFcNMaabaaacLicLicOxcLicLiaaaaabaabaaaaabaaaaabaabaaaaaacQycQDcKbcQFcQGcQGcQHcKbcKbcKbcKbcKbcKbcKbcKbcKbcKbcKbcKbcKbcJZcQIcJZcQEcJZcFacQKcQJbHYcQNcQNcQNcQUcQScPTcQLcQMcDrcDtcDscQQcPZcDxcDvcQTcEmcEncRacRdcRcaabcQZcQZcQZcQZcQZcRecBPcEocsLcMfcsLcyJcyJcsLcsLcsLchfcEpchfcsKcEqciYciYciYctrbQXciYciYciYcBRcJKcJKcJKcRDcRwcNocRHcRIcRtcRucRvcRvcRJcEHcRxcBRaabaabaaaaaaaaacRyaaaaaaaaabGHbGGcFccuQbGGbGGbGHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaacNFcOFcNMaabcNFcOFcNMaaacNFcOFcNMaabaaacLicLicOxcLicLiaaaaabaabaaaaabaaaaabaabaaaaaacQycQDcKbcQFcQGcQGcQHcKbcKbcKbcKbcKbcKbcKbcKbcKbcKbcKbcKbcKbcJZcQIcJZcQEcJZcFacQKcxAbHYcQNcQNcQNcyhcQScPTcQLcQMcDrcDtcDscQQcPZcDxcDvcQTcEmcEncRacRdcRcaabcQZcQZcQZcQZcQZcRecBPcEocsLcMfcsLcyJcyJcsLcsLcsLchfcEpchfcsKcEqciYciYciYctrbQXciYciYciYcBRcJKcJKcJKcRDcRwcNocRHcRIcRtcRucRvcRvcRJcEHcRxcBRaabaabaaaaaaaaacRyaaaaaaaaabGHbGGcFccuQbGGbGGbGHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalwalwalvayiaaacNFcOFcNMaabcNFcOFcNMaaacNFcOFcNMaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaabcRzcRAcRAcRAcRAcQycRBcLwcRCcRKcREcREcRFcRGcRMcRLcRLcRLcRLcRNcRPcROcRQcRQcRScRScRQcRTcRVcRUcRRcRRcRYcRWcTecSabHZcRXcRXcShcRZcSjcSbcSkcErcSdcSecPZcEucSlcSmcEvcSpcSocSrcSqcQpcSncSucSscSwcQZcRecBQcEwcsLchfcExchfcEycEAcEzcyJchfcECcEBcsLcsLciYcEDcgactrbQXciYcEFcEEcBRcxNcxNcxNcxNcSNcEHcQzcEIcSOcQscEHcSGcSHcSHcSPcSJcSKaabaaaaaaaaaaaaaaaaaaaaabGHbGGcPBbGGbGGcSLbGHaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalwaaaaabaaaaabaabcSQaabaabaabcSQaabaaaaabcSQaabaaaaaaaaaaaaaaaaaaaaaaaaaaacRzcRzcRzcSRcTacSTcRAcTbcTccNRcRCcRCcSScTdcKbcKbcMvcSUcSUcSUcSUcSVcSWcSXcSWcSWcSWcRRcRRcSYcSZcTfcTicTgcRXcTjcTecRXcRXcRXcRXcTkcPTcTlcThcQVcErcSdcSdcPZcEucSlcTncEJcTqcTpcTucTraabcTocTvcSwcTwcQZcRecBQcELcEKcFpcEMchfcsLcsLcsLcFqcMfcFscyJcFscsLciYbQXcgactrcFvciYbQXcFvcBRcKPcKQcKRcTJcPlcNocTKcTNcTMcTGcTGcTHcTIcTPcTOcBRaabaabaabaaaaaaaaaaaaaaaaaabGHcTLcFcbGHbGHbGHbGHbGHaabaabaabcTQcTQcTQcTQcTQcTQaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalvaabcTRcTScTScTUcTTcTVcTVcTVcTTcTVcTVcTVcTTcTVcTVcTVcTWcTScTScTScTScTScTXcTZcTYcUbcUacUecUdcUgcUfcNBcLwcUccRCcKbcKbcKbcUhcMvcSUcUkcUjcUmcFxcUicFycFAcFzcUrcFCcUucUscUxcUwcUycFCcUtcUzcTecUvcRXcRXcRXcUAcPTcUCcUCcSdcFEcFDcFGcFFcFIcFHcFLcFJcUPcUNcUScSqcUVcSncUWcSwcSwcQZcRecBQcGIcsLctZcmJchfchfcMfchfchfchfcyJcyJcyJcsKchfchfchfctrbQXcGLbQXbQXcBRcJKcMgcJKcVecMjcEHcVfcUXcUYcEHcUZcVgcxNcxNcxNcBRaaaaaaaabaabaaaaaaaaaaaaaaabGHcJQcFcbGHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -9014,7 +9013,7 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalvaabcNFcWxcNMaaacNFcWxcNMaaacNFcWxcNMaabaaaaaaaaaaaaaaaaaaaaaaaaaabaabaaaaaaaabaabaabcXucYtcYtcYucYAcYBcYBcYDcYCcYCcYEcYGcYFcVjcHhcVjcYHcVjcVjcVjcRRcYLcIvcIxcIwcIycYIcYJcYQcYRcYMcYMcYMcYXcYUcYZaZHcZacYScVIcQPcYTcZbcYVcYWcZccSdcXTcZdcZgcZecZhcSncZicWZcWZcQZcRecBQckKcExchfcyJcJqcyPcJscImcJucJtcJvcsLcJwcYjcIpcJxchfctrcIqciYbQXcpEbQXciYcJzcIrcBRcZqcZscZrcxNcZtcZycZvcxNcZzcZBcZAcBRaabaabaaaaaaaaaaaaaaaaaaaaaaaabGHcFcbGGbGGbGHaabaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalvaabcNFcWxcNMaaacNFcWxcNMaabcNFcWxcNMaabaabaabaabaaaaabaaaaaaaabaabaaaaaaaaaaabaaaaaacXucYtcYtcYucZucZucZucZCcZwcZxcSUcJBcJAcJDcJCcJFcJEcJHcZFcZFcZLcZOcZNcVjcVjcVjcZPcZRcZQcZMcJIcKscZVdacdabcSUcZScZSdafcVIcQPcZUdagcZWcZXcZYcSdcZZdahdajdaidadcQZcQZcQZcQZcQZcRecBQckKdaecsLcyJcJqchfcKvcKucKwcJtcKAcIjcKCcKBcKDcJxchfctrcIqcGLbQXcKEcKFciYcKGbQXcBRcMkcJKcJKcxNcMkcJKcJKcxNcMkcJKcJKcBRaaaaabaabaaaaaaaaaaaaaaacuQcuQbGHdaucuQbGGbGHbGHbGHcTQcTQaabaabaabaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaamhaabcNFdavcNMaaacNFdavcNMaaacNFdavcNMaabalvaabaabaabaabaabaabaabaaaaaaaaaaaaaaaaaaaabcXudaodapcZucZucZudaxdardardardardardardarcKHcKJcKIcKKdawdawdawdaFdaydaJdaAdaBdawdaydaKdaRcKLcKsdaSdacdabdaGdaHdaIdaTdaUdaLdaMdaNcZcdaOdaPdaVdaYdaWdaZcXcdbacSndbcdbbdbbcQZcRecBPckKchfcBNdaXcJqchfcKNcKMcJtcIjcJtcKScJtcJucJtcsLchfctrcIqciYbQXciYciYciYbQXbQXcBRdbfcKZcJKcxNdbfcKZcJKcxNdbfcKZcJKcBRaaaaaaaabaabaaaaaaaaaaaacuQdbgbGGcFccuQdbhcuQdbibGHaabaabaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalvaaaaabaaaaaaaaaaabaabaabaaaaaaaabaabaaaalvaabaabaabaabaabaabaaaaaaaaaaaaaaaaaaaaaaabcXudbjcZucZucZucZucZudardbtdblcKTdbwdbvdarcKUdbqdbrcHhcVjcVjdbsdbBdbydbEdbCdbGdbFdbzcSUdbAcKLcKsdbHdacdbJcSUdbDcZSdbKdbLcSddaMdaNdbNcSddaPdaVcXTcXUdbOcYbdbIcTodbScLVdbWcQZcRecBPckKchfdbMdbMcJqchfcLYcsLcLZcIjcMccMbcMecMdcJGcJvcyPctrcIqciYbQXbQXcMhciYbQXaqFcBRdbRcJKcJKcxNdbRcJKcJKcxNdbRcJKcJKcBRaaaaaaaaaaabaabaaaaaadcacuQbGGbGGcFccuQbGGbGGbGGbZZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalvaaaaabaaaaaaaaaaabaabaabaaaaaaaabaabaaaalvaabaabaabaabaabaabaaaaaaaaaaaaaaaaaaaaaaabcXudbjcZucZucZucZucZudardbtdblcKTdbwdbvdarcKUdbqdbrcHhcVjcVjdbsdbBdbydbEdbCdbGdbFdbzcSUdbAcKLcKsdbHdacdbJcSUdbDcZSdbKdbLcSddaMdaNdbNcSddaPdaVcXTcXUdbOcYbdbIcTodbScLVdbWcQZcRecBPckKchfdbMdbMcJqchfcLYcsLcLZcIjcMccMbcMecMdcJGcJvcyPctrcIqciYbQXbQXcMhciYbQXaqFcBRdbRcJKcJKcxNdbRcJKcJKcxNdbRcJKcJKcBRaaaaaaaaaaabaabaaaaaaaaacuQbGGbGGcFccuQbGGbGGbGGbZZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalwalwalvalwalwamhalvalvalvalvalwalvalvalwdbTaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacXudbUcZwcZucZucZudbVdardbldcccMOcMTcMScMVcMUcMYcMWcMZcVjdcmdcldchdcocNbcNacNcdcrdcndcwdbrcHhdcydcxcZMdczcSUdcscZSdctdcLcSddaMdaNcZccSddcvdaVcXTdcOdcRcZedcScSndcTdbbdbbcQZcRecBQckKdcAcuccABcJqchfchfcNdcNecDncNfcNfcNgchfchfchfchfctrcIqciYbQXcNhcKFciYcepcepcBRcBRcBRcBRcBRcBRcBRcBRcBRcBRcBRcBRcBRaaaaaaaaaaaaaabaabaaaaaabGHbGHbGHcFccuQdcJdcKbGGbZZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabcXucXucXudcUdcMdcMdcMdardcNdcVdcPdcPdcQdcWdawcNidcXcNkcNjcNjcNWcNZcNXcOaddbcOccObcNZcOdcOfcOecOhcOgcOiddpddrdbDcZSddmddscSddaMcSdddtcSddaPdaVcXTcXUddxcYbdbIcQZcQZcQZcQZcQZcRecBQcOjcYlcuccTBcOScOPcOVcOPcOXcsLcsLcsLcsLczfchfcPacPecPbcPfcGLbQXcFvcepcepaaaaaaddFaabaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaabaabaaabGHcJQddBddKcuQddJddIbGGbZZaaaaaaaaaaaaaaaaaaabpaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabpaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaddLcXucZucZucZudcMaabaabdarddGddMdcPdcPddNdarddOcPgddPddUcPicPWcPkcSUcPXcQbddScVjddYcSUcQccQecQeddUddUcQjdefcSUddZcZSdeadehcSddaMcSdcZUdagdecdeidaYdejdekcXcdelcSndendemdemcQZcRecBQcsLckKchfchfcPdchfchfcsLcQlcyJcyJcyJcsLcQucQRcQOcQXcQWcDocepcepcepcepaaaaaaaaaaaaaabaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaabaabbGHdbgcAScaccuQcuQcuQbGGbGHaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index deee7f76a78..fa66c27500e 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -158,7 +158,7 @@ Pipelines + Other Objects -> Pipe network P.other_atmosmch -= src //(De)construction -/obj/machinery/atmospherics/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) +/obj/machinery/atmospherics/attackby(obj/item/weapon/W, mob/user) if(can_unwrench && istype(W, /obj/item/weapon/wrench)) var/turf/T = get_turf(src) if(level == 1 && isturf(T) && T.intact) @@ -179,7 +179,7 @@ Pipelines + Other Objects -> Pipe network to_chat(user, "As you begin unwrenching \the [src] a gush of air blows in your face... maybe you should reconsider?") unsafe_wrenching = TRUE //Oh dear oh dear - if(do_after(user, 40 * W.toolspeed, target = src) && isnull(gcDestroyed)) + if(do_after(user, 40 * W.toolspeed, target = src) && !QDELETED(src)) user.visible_message( \ "[user] unfastens \the [src].", \ "You have unfastened \the [src].", \ diff --git a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm index d36c6059c5f..1d2e0483563 100644 --- a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm @@ -42,6 +42,12 @@ id_tag = num2text(uid) icon = null +/obj/machinery/atmospherics/binary/dp_vent_pump/Destroy() + if(radio_controller) + radio_controller.remove_object(src, frequency) + radio_connection = null + return ..() + /obj/machinery/atmospherics/binary/dp_vent_pump/initialize() ..() if(frequency) diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm index e4e4464b55f..5112326fe9e 100644 --- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm +++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm @@ -21,6 +21,12 @@ if(frequency) set_frequency(frequency) +/obj/machinery/atmospherics/binary/passive_gate/Destroy() + if(radio_controller) + radio_controller.remove_object(src, frequency) + radio_connection = null + return ..() + /obj/machinery/atmospherics/binary/passive_gate/update_icon() icon_state = "[on ? "on" : "off"]" @@ -137,7 +143,7 @@ /obj/machinery/atmospherics/binary/passive_gate/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state) user.set_machine(src) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "atmos_pump.tmpl", name, 385, 115, state = state) ui.open() @@ -174,7 +180,7 @@ investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", "atmos") update_icon() - nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/atmospherics/binary/passive_gate/attackby(obj/item/weapon/W, mob/user, params) if(!istype(W, /obj/item/weapon/wrench)) diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm index 8b36352700c..a2e6a93ec0a 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm @@ -28,6 +28,12 @@ Thus, the two variables affect pump operation are set in New(): var/id = null var/datum/radio_frequency/radio_connection +/obj/machinery/atmospherics/binary/pump/Destroy() + if(radio_controller) + radio_controller.remove_object(src, frequency) + radio_connection = null + return ..() + /obj/machinery/atmospherics/binary/pump/highcap name = "High capacity gas pump" desc = "A high capacity pump" @@ -157,7 +163,7 @@ Thus, the two variables affect pump operation are set in New(): /obj/machinery/atmospherics/binary/pump/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state) user.set_machine(src) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "atmos_pump.tmpl", name, 385, 115, state = state) ui.open() @@ -194,7 +200,7 @@ Thus, the two variables affect pump operation are set in New(): investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", "atmos") update_icon() - nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/atmospherics/binary/pump/power_change() var/old_stat = stat diff --git a/code/ATMOSPHERICS/components/binary_devices/valve.dm b/code/ATMOSPHERICS/components/binary_devices/valve.dm index 2737b7abfbd..0e06c5b55d5 100644 --- a/code/ATMOSPHERICS/components/binary_devices/valve.dm +++ b/code/ATMOSPHERICS/components/binary_devices/valve.dm @@ -44,10 +44,10 @@ update_icon() investigate_log("was closed by [usr ? key_name(usr) : "a remote signal"]", "atmos") return - + /obj/machinery/atmospherics/binary/valve/attack_ai(mob/user) return - + /obj/machinery/atmospherics/binary/valve/attack_ghost(mob/user) if(user.can_advanced_admin_interact()) return attack_hand(user) @@ -60,7 +60,7 @@ close() else open() - + /obj/machinery/atmospherics/binary/valve/digital // can be controlled by AI name = "digital valve" desc = "A digitally controlled valve." @@ -71,6 +71,12 @@ var/datum/radio_frequency/radio_connection settagwhitelist = list("id_tag") +/obj/machinery/atmospherics/binary/valve/digital/Destroy() + if(radio_controller) + radio_controller.remove_object(src, frequency) + radio_connection = null + return ..() + /obj/machinery/atmospherics/binary/valve/digital/attack_ai(mob/user) return attack_hand(user) diff --git a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm index 334e632f1df..049524d6e03 100644 --- a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm @@ -28,6 +28,12 @@ Thus, the two variables affect pump operation are set in New(): var/id = null var/datum/radio_frequency/radio_connection +/obj/machinery/atmospherics/binary/volume_pump/Destroy() + if(radio_controller) + radio_controller.remove_object(src, frequency) + radio_connection = null + return ..() + /obj/machinery/atmospherics/binary/volume_pump/on on = 1 icon_state = "map_on" @@ -147,7 +153,7 @@ Thus, the two variables affect pump operation are set in New(): /obj/machinery/atmospherics/binary/volume_pump/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state) user.set_machine(src) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "atmos_pump.tmpl", name, 310, 115, state = state) ui.open() @@ -184,7 +190,7 @@ Thus, the two variables affect pump operation are set in New(): investigate_log("was set to [transfer_rate] L/s by [key_name(usr)]", "atmos") update_icon() - nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/atmospherics/binary/volume_pump/power_change() var/old_stat = stat diff --git a/code/ATMOSPHERICS/components/omni_devices/filter.dm b/code/ATMOSPHERICS/components/omni_devices/filter.dm index 1b0ffd91562..83d60b1c292 100644 --- a/code/ATMOSPHERICS/components/omni_devices/filter.dm +++ b/code/ATMOSPHERICS/components/omni_devices/filter.dm @@ -112,7 +112,7 @@ /obj/machinery/atmospherics/omni/filter/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, force_open = 0) usr.set_machine(src) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "omni_filter.tmpl", "Omni Filter Control", 330, 330) ui.open() @@ -197,7 +197,7 @@ switch_filter(dir_flag(href_list["dir"]), mode_return_switch(new_filter)) update_icon() - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return /obj/machinery/atmospherics/omni/filter/proc/mode_return_switch(var/mode) diff --git a/code/ATMOSPHERICS/components/omni_devices/mixer.dm b/code/ATMOSPHERICS/components/omni_devices/mixer.dm index 0676d833029..5586bdc3a98 100644 --- a/code/ATMOSPHERICS/components/omni_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/omni_devices/mixer.dm @@ -136,7 +136,7 @@ /obj/machinery/atmospherics/omni/mixer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, force_open = 0) usr.set_machine(src) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "omni_mixer.tmpl", "Omni Mixer Control", 360, 330) ui.open() @@ -202,7 +202,7 @@ con_lock(dir_flag(href_list["dir"])) update_icon() - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return /obj/machinery/atmospherics/omni/mixer/proc/switch_mode(var/port = NORTH, var/mode = ATM_NONE) diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm index 7ec310f2642..427c77e8246 100755 --- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm @@ -22,6 +22,13 @@ Filter types: var/frequency = 0 var/datum/radio_frequency/radio_connection + +/obj/machinery/atmospherics/trinary/filter/Destroy() + if(radio_controller) + radio_controller.remove_object(src, frequency) + radio_connection = null + return ..() + /obj/machinery/atmospherics/trinary/filter/flipped icon_state = "mmap" flipped = 1 @@ -162,7 +169,7 @@ Filter types: /obj/machinery/atmospherics/trinary/filter/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state) user.set_machine(src) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "atmos_filter.tmpl", name, 475, 155, state = state) ui.open() @@ -204,4 +211,4 @@ Filter types: . = TRUE update_icon() - nanomanager.update_uis(src) \ No newline at end of file + SSnanoui.update_uis(src) \ No newline at end of file diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm index 8d388d478dd..0c64804b6da 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm @@ -125,7 +125,7 @@ /obj/machinery/atmospherics/trinary/mixer/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state) user.set_machine(src) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "atmos_mixer.tmpl", name, 370, 165, state = state) ui.open() @@ -176,4 +176,4 @@ . = TRUE update_icon() - nanomanager.update_uis(src) \ No newline at end of file + SSnanoui.update_uis(src) \ No newline at end of file diff --git a/code/ATMOSPHERICS/components/trinary_devices/tvalve.dm b/code/ATMOSPHERICS/components/trinary_devices/tvalve.dm index 0987561f94c..ad9561fbf1d 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/tvalve.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/tvalve.dm @@ -7,7 +7,7 @@ name = "manual switching valve" desc = "A pipe valve" - + can_unwrench = 1 var/state = TVALVE_STATE_STRAIGHT @@ -15,16 +15,16 @@ /obj/machinery/atmospherics/trinary/tvalve/bypass icon_state = "map_tvalve1" state = TVALVE_STATE_SIDE - + /obj/machinery/atmospherics/trinary/tvalve/flipped icon_state = "map_tvalvem0" flipped = 1 - + /obj/machinery/atmospherics/trinary/tvalve/flipped/bypass icon_state = "map_tvalvem1" flipped = 1 state = TVALVE_STATE_SIDE - + /obj/machinery/atmospherics/trinary/tvalve/update_icon(animation) var/flipstate = "" if(flipped) @@ -40,7 +40,7 @@ var/turf/T = get_turf(src) if(!istype(T)) return - + add_underlay(T, node1, turn(dir, -180)) if(flipped) @@ -49,7 +49,7 @@ add_underlay(T, node2, turn(dir, -90)) add_underlay(T, node3, dir) - + /obj/machinery/atmospherics/trinary/tvalve/proc/switch_side() if(state == TVALVE_STATE_STRAIGHT) go_to_side() @@ -57,7 +57,7 @@ go_straight() /obj/machinery/atmospherics/trinary/tvalve/proc/go_to_side() - if(state == TVALVE_STATE_SIDE) + if(state == TVALVE_STATE_SIDE) return 0 state = TVALVE_STATE_SIDE @@ -74,7 +74,7 @@ /obj/machinery/atmospherics/trinary/tvalve/proc/go_straight() if(state == TVALVE_STATE_STRAIGHT) return 0 - + state = TVALVE_STATE_STRAIGHT update_icon() @@ -82,13 +82,13 @@ parent2.update = 0 parent3.update = 0 parent1.reconcile_air() - + investigate_log("was set to straight by [usr ? key_name(usr) : "a remote signal"]", "atmos") return 1 /obj/machinery/atmospherics/trinary/tvalve/attack_ai(mob/user) return - + /obj/machinery/atmospherics/trinary/tvalve/attack_ghost(mob/user) if(user.can_advanced_admin_interact()) return attack_hand(user) @@ -108,14 +108,20 @@ var/id = null var/datum/radio_frequency/radio_connection +/obj/machinery/atmospherics/trinary/tvalve/digital/Destroy() + if(radio_controller) + radio_controller.remove_object(src, frequency) + radio_connection = null + return ..() + /obj/machinery/atmospherics/trinary/tvalve/digital/bypass icon_state = "map_tvalve1" state = TVALVE_STATE_SIDE - + /obj/machinery/atmospherics/trinary/tvalve/digital/flipped icon_state = "map_tvalvem0" flipped = 1 - + /obj/machinery/atmospherics/trinary/tvalve/digital/flipped/bypass icon_state = "map_tvalvem1" flipped = 1 diff --git a/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm b/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm index 63070b19538..f61275a8065 100644 --- a/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm +++ b/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm @@ -31,6 +31,12 @@ if(id && !id_tag)//I'm not dealing with any more merge conflicts id_tag = id +/obj/machinery/atmospherics/unary/outlet_injector/Destroy() + if(radio_controller) + radio_controller.remove_object(src, frequency) + radio_connection = null + return ..() + /obj/machinery/atmospherics/unary/outlet_injector/update_icon() if(!powered()) icon_state = "off" diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm index 662f5fe48f2..b6eafcf5ee4 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm @@ -433,4 +433,7 @@ if(initial_loc) initial_loc.air_vent_info -= id_tag initial_loc.air_vent_names -= id_tag + if(radio_controller) + radio_controller.remove_object(src, frequency) + radio_connection = null return ..() diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm index e86b8caa722..83f9466a574 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm @@ -53,6 +53,9 @@ if(initial_loc && frequency == 1439) initial_loc.air_scrub_info -= id_tag initial_loc.air_scrub_names -= id_tag + if(radio_controller) + radio_controller.remove_object(src, frequency) + radio_connection = null return ..() /obj/machinery/atmospherics/unary/vent_pump/examine(mob/user) diff --git a/code/ATMOSPHERICS/pipes/pipe.dm b/code/ATMOSPHERICS/pipes/pipe.dm index 05c5d18df99..3ff92ba27d8 100644 --- a/code/ATMOSPHERICS/pipes/pipe.dm +++ b/code/ATMOSPHERICS/pipes/pipe.dm @@ -32,7 +32,7 @@ . = ..() // if we're somehow by ourself - if(parent && isnull(parent.gcDestroyed) && parent.members.len == 1 && parent.members[1] == src) + if(parent && !QDELETED(parent) && parent.members.len == 1 && parent.members[1] == src) qdel(parent) parent = null diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 0795d7bb78c..9be310c94ef 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -22,6 +22,8 @@ #define BLOCK_GAS_SMOKE_EFFECT 8192 // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! #define THICKMATERIAL 8192 //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. (NOTE: flag shared with BLOCK_GAS_SMOKE_EFFECT) +#define DROPDEL 16384 // When dropped, it calls qdel on itself + //Reagent flags #define REAGENT_NOREACT 1 diff --git a/code/__DEFINES/logging.dm b/code/__DEFINES/logging.dm deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/code/__DEFINES/qdel.dm b/code/__DEFINES/qdel.dm index 492918be671..14fd6ea0e36 100644 --- a/code/__DEFINES/qdel.dm +++ b/code/__DEFINES/qdel.dm @@ -1,11 +1,32 @@ //defines that give qdel hints. these can be given as a return in destory() or by calling + #define QDEL_HINT_QUEUE 0 //qdel should queue the object for deletion. #define QDEL_HINT_LETMELIVE 1 //qdel should let the object live after calling destory. #define QDEL_HINT_IWILLGC 2 //functionally the same as the above. qdel should assume the object will gc on its own, and not check it. +#define QDEL_HINT_HARDDEL 3 //qdel should assume this object won't gc, and queue a hard delete using a hard reference. #define QDEL_HINT_HARDDEL_NOW 4 //qdel should assume this object won't gc, and hard del it post haste. #define QDEL_HINT_FINDREFERENCE 5 //functionally identical to QDEL_HINT_QUEUE if TESTING is not enabled in _compiler_options.dm. //if TESTING is enabled, qdel will call this object's find_references() verb. +#define QDEL_HINT_IFFAIL_FINDREFERENCE 6 //Above but only if gc fails. +//defines for the gc_destroyed var -// A convenient wrapper around checking for qdeletion/non-existence -#define exists(A) (A && !qdeleted(A)) +#define GC_QUEUE_PREQUEUE 1 +#define GC_QUEUE_CHECK 2 +#define GC_QUEUE_HARDDELETE 3 +#define GC_QUEUE_COUNT 3 //increase this when adding more steps. + +#define GC_QUEUED_FOR_QUEUING -1 +#define GC_QUEUED_FOR_HARD_DEL -2 +#define GC_CURRENTLY_BEING_QDELETED -3 + +#define QDELING(X) (X.gc_destroyed) +#define QDELETED(X) (!X || QDELING(X)) +#define QDESTROYING(X) (!X || X.gc_destroyed == GC_CURRENTLY_BEING_QDELETED) + +/proc/check_datum_qdeleted(datum/D) //for checking if something is a datum, first, then checking gc_destroyed; get rid of this eventually. TO-DO + if(!istype(D)) + return FALSE + if(D.gc_destroyed) + return TRUE + return FALSE \ No newline at end of file diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 180007fa1b8..f9dbff89d76 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -70,6 +70,7 @@ #define INIT_ORDER_STICKY_BAN -10 #define INIT_ORDER_LIGHTING -20 #define INIT_ORDER_SHUTTLE -21 +#define INIT_ORDER_NIGHTSHIFT -22 #define INIT_ORDER_SQUEAK -40 #define INIT_ORDER_PATH -50 #define INIT_ORDER_PERSISTENCE -100 @@ -77,6 +78,7 @@ // Subsystem fire priority, from lowest to highest priority // If the subsystem isn't listed here it's either DEFAULT or PROCESS (if it's a processing subsystem child) +#define FIRE_PRIORITY_NIGHTSHIFT 10 #define FIRE_PRIORITY_IDLE_NPC 10 #define FIRE_PRIORITY_SERVER_MAINT 10 #define FIRE_PRIORITY_RESEARCH 10 @@ -99,7 +101,7 @@ #define FIRE_PRIORITY_PARALLAX 65 #define FIRE_PRIORITY_FLIGHTPACKS 80 #define FIRE_PRIORITY_MOBS 100 -#define FIRE_PRIORITY_TGUI 110 +#define FIRE_PRIORITY_NANOUI 110 #define FIRE_PRIORITY_TICKER 200 #define FIRE_PRIORITY_OVERLAYS 500 #define FIRE_PRIORITY_INPUT 1000 // This must always always be the max highest priority. Player input must never be lost. diff --git a/code/__HELPERS/cmp.dm b/code/__HELPERS/cmp.dm index 2b02c212659..4b97b67e27e 100644 --- a/code/__HELPERS/cmp.dm +++ b/code/__HELPERS/cmp.dm @@ -31,6 +31,15 @@ /proc/cmp_subsystem_priority(datum/controller/subsystem/a, datum/controller/subsystem/b) return a.priority - b.priority +/proc/cmp_qdel_item_time(datum/qdel_item/A, datum/qdel_item/B) + . = B.hard_delete_time - A.hard_delete_time + if(!.) + . = B.destroy_time - A.destroy_time + if(!.) + . = B.failures - A.failures + if(!.) + . = B.qdels - A.qdels + /proc/cmp_atom_layer_asc(atom/A,atom/B) if(A.plane != B.plane) return A.plane - B.plane diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index 43dcaa1c75d..d0e1feb3d62 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -50,8 +50,6 @@ init_subtypes(/datum/crafting_recipe, crafting_recipes) - all_cults = typesof(/datum/cult_info) - return 1 /* // Uncomment to debug chemical reaction list. diff --git a/code/__HELPERS/icon_smoothing.dm b/code/__HELPERS/icon_smoothing.dm index cc4b5459aa0..27ec6e7202f 100644 --- a/code/__HELPERS/icon_smoothing.dm +++ b/code/__HELPERS/icon_smoothing.dm @@ -109,7 +109,7 @@ return adjacencies /proc/smooth_icon(atom/A) - if(qdeleted(A)) + if(QDELETED(A)) return if(A && (A.smooth & SMOOTH_TRUE) || (A.smooth & SMOOTH_MORE)) var/adjacencies = calculate_adjacencies(A) diff --git a/code/__HELPERS/logging.dm b/code/__HELPERS/logging.dm index 5b16083dbf2..b31e3a40c88 100644 --- a/code/__HELPERS/logging.dm +++ b/code/__HELPERS/logging.dm @@ -15,9 +15,12 @@ /proc/warning(msg) log_to_dd("## WARNING: [msg]") -//print a testing-mode debug message to world.log -/proc/testing(msg) - log_to_dd("## TESTING: [msg]") +//print a testing-mode debug message to world.log and world +#ifdef TESTING +#define testing(msg) log_to_dd("## TESTING: [msg]"); to_chat(world, "## TESTING: [msg]") +#else +#define testing(msg) +#endif /proc/log_admin(text) admin_log.Add(text) @@ -49,7 +52,7 @@ /proc/log_say(text) if(config.log_say) diary << "\[[time_stamp()]]SAY: [text]" - + /proc/log_robot(text) if(config.log_say) diary << "\[[time_stamp()]]ROBOT: [text]" diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index ef2f8578783..0de4f548ee0 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -505,7 +505,7 @@ proc/checkhtml(var/t) text = replacetext(text, "\[row\]", "") text = replacetext(text, "\[cell\]", "") text = replacetext(text, "\[logo\]", "") - text = replacetext(text, "\[time\]", "[gameTimestamp()]") // TO DO + text = replacetext(text, "\[time\]", "[station_time_timestamp()]") // TO DO if(P) text = "[text]" else diff --git a/code/__HELPERS/time.dm b/code/__HELPERS/time.dm index 6d28c2c0cd4..57adb01c2cb 100644 --- a/code/__HELPERS/time.dm +++ b/code/__HELPERS/time.dm @@ -1,7 +1,15 @@ // So you can be all 10 SECONDS #define SECONDS *10 -#define MINUTES *600 -#define HOURS *36000 + +#define MINUTES SECONDS*60 + +#define HOURS MINUTES*60 + +#define TICKS *world.tick_lag + +#define DS2TICKS(DS) ((DS)/world.tick_lag) + +#define TICKS2DS(T) ((T) TICKS) #define TimeOfGame (get_game_time()) #define TimeOfTick (world.tick_usage*0.01*world.tick_lag) @@ -22,16 +30,36 @@ return wtime + (time_offset + wusage) * world.tick_lag -//Returns the world time in english -/proc/worldtime2text(time = world.time) +/* This proc should only be used for world/Topic. + * If you want to display the time for which dream daemon has been running ("round time") use worldtime2text. + * If you want to display the canonical station "time" (aka the in-character time of the station) use station_time_timestamp + */ +/proc/classic_worldtime2text(time = world.time) time = (round_start_time ? (time - round_start_time) : (time - world.time)) return "[round(time / 36000)+12]:[(time / 600 % 60) < 10 ? add_zero(time / 600 % 60, 1) : time / 600 % 60]" -/proc/time_stamp() - return time2text(world.timeofday, "hh:mm:ss") +//Returns the world time in english +/proc/worldtime2text() + return gameTimestamp("hh:mm:ss", world.time) -/proc/gameTimestamp(format = "hh:mm:ss") // Get the game time in text - return time2text(world.time - timezoneOffset + 432000, format) +/proc/time_stamp(format = "hh:mm:ss", show_ds) + var/time_string = time2text(world.timeofday, format) + return show_ds ? "[time_string]:[world.timeofday % 10]" : time_string + +/proc/gameTimestamp(format = "hh:mm:ss", wtime=null) + if(!wtime) + wtime = world.time + return time2text(wtime - GLOB.timezoneOffset, format) + +/* This is used for displaying the "station time" equivelent of a world.time value + Calling it with no args will give you the current time, but you can specify a world.time-based value as an argument + - You can use this, for example, to do "This will expire at [station_time_at(world.time + 500)]" to display a "station time" expiration date + which is much more useful for a player)*/ +/proc/station_time(time=world.time, display_only=FALSE) + return ((((time - round_start_time)) + GLOB.gametime_offset) % 864000) - (display_only ? GLOB.timezoneOffset : 0) + +/proc/station_time_timestamp(format = "hh:mm:ss", time=world.time) + return time2text(station_time(time, TRUE), format) /* Returns 1 if it is the selected month and day */ proc/isDay(var/month, var/day) @@ -172,4 +200,4 @@ GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0) /proc/update_midnight_rollover() if(world.timeofday < GLOB.rollovercheck_last_timeofday) //TIME IS GOING BACKWARDS! return GLOB.midnight_rollovers++ - return GLOB.midnight_rollovers \ No newline at end of file + return GLOB.midnight_rollovers diff --git a/code/__HELPERS/unique_ids.dm b/code/__HELPERS/unique_ids.dm index f6f9393d937..1e9c699dcb9 100644 --- a/code/__HELPERS/unique_ids.dm +++ b/code/__HELPERS/unique_ids.dm @@ -16,7 +16,6 @@ var/global/next_unique_datum_id = 1 -/datum/var/tmp/unique_datum_id = null /client/var/tmp/unique_datum_id = null /datum/proc/UID() diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 82d9326252a..690b945cc63 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -526,6 +526,14 @@ proc/GaussRandRound(var/sigma,var/roundto) return toReturn +//Searches contents of the atom and returns the sum of all w_class of obj/item within +/atom/proc/GetTotalContentsWeight(searchDepth = 5) + var/weight = 0 + var/list/content = GetAllContents(searchDepth) + for(var/obj/item/I in content) + weight += I.w_class + return weight + //Step-towards method of determining whether one atom can see another. Similar to viewers() /proc/can_see(var/atom/source, var/atom/target, var/length=5) // I couldnt be arsed to do actual raycasting :I This is horribly inaccurate. var/turf/current = get_turf(source) @@ -1474,13 +1482,13 @@ var/mob/dview/dview_mob = new /mob/dview/New() //For whatever reason, if this isn't called, then BYOND will throw a type mismatch runtime when attempting to add this to the mobs list. -Fox -/proc/IsValidSrc(var/A) +/proc/IsValidSrc(A) if(istype(A, /datum)) - var/datum/B = A - return isnull(B.gcDestroyed) + var/datum/D = A + return !QDELETED(D) if(istype(A, /client)) - return 1 - return 0 + return TRUE + return FALSE //Get the dir to the RIGHT of dir if they were on a clock diff --git a/code/_compile_options.dm b/code/_compile_options.dm index 5e9d9462d7f..c6b63b77271 100644 --- a/code/_compile_options.dm +++ b/code/_compile_options.dm @@ -1,6 +1,14 @@ #define DEBUG //#define TESTING +#ifdef TESTING +//#define GC_FAILURE_HARD_LOOKUP //makes paths that fail to GC call find_references before del'ing. + //implies FIND_REF_NO_CHECK_TICK + +//#define FIND_REF_NO_CHECK_TICK //Sets world.loop_checks to false and prevents find references from sleeping + +#endif + #define IS_MODE_COMPILED(MODE) (ispath(text2path("/datum/game_mode/"+(MODE)))) #define BACKGROUND_ENABLED 0 // The default value for all uses of set background. Set background can cause gradual lag and is recommended you only turn this on if necessary. diff --git a/code/_globalvars/lists/reagents.dm b/code/_globalvars/lists/reagents.dm index 7042cbe932a..30809943a8a 100644 --- a/code/_globalvars/lists/reagents.dm +++ b/code/_globalvars/lists/reagents.dm @@ -55,7 +55,7 @@ var/global/list/blocked_chems = list("polonium", "initropidril", "concentrated_i "syndicate_nanites", "ripping_tendrils", "boiling_oil", "envenomed_filaments", "lexorin_jelly", "kinetic", "cryogenic_liquid", "dark_matter", "b_sorium", - "reagent", "life","dragonsbreath") + "reagent", "life","dragonsbreath", "nanocalcium") var/global/list/safe_chem_list = list("antihol", "charcoal", "epinephrine", "insulin", "teporone","silver_sulfadiazine", "salbutamol", "omnizine", "stimulants", "synaptizine", "potass_iodide", "oculine", "mannitol", "styptic_powder", diff --git a/code/_globalvars/misc.dm b/code/_globalvars/misc.dm index bc61c854ab4..91514a79a7e 100644 --- a/code/_globalvars/misc.dm +++ b/code/_globalvars/misc.dm @@ -2,8 +2,6 @@ var/global/obj/effect/overlay/plmaster = null var/global/obj/effect/overlay/slmaster = null var/global/obj/effect/overlay/icemaster = null -// nanomanager, the manager for Nano UIs -var/datum/nanomanager/nanomanager = new() // Event Manager, the manager for events. var/datum/event_manager/event_manager = new() // Announcer intercom, because too much stuff creates an intercom for one message then hard del()s it. @@ -74,8 +72,10 @@ var/score_dmgestkey = null var/TAB = "    " -var/timezoneOffset = 0 // The difference betwen midnight (of the host computer) and 0 world.ticks. +GLOBAL_VAR_INIT(timezoneOffset, 0) // The difference betwen midnight (of the host computer) and 0 world.ticks. // For FTP requests. (i.e. downloading runtime logs.) // However it'd be ok to use for accessing attack logs and such too, which are even laggier. -var/fileaccess_timer = 0 \ No newline at end of file +var/fileaccess_timer = 0 + +GLOBAL_VAR_INIT(gametime_offset, 432000) // 12:00 in seconds \ No newline at end of file diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 58b12ed8857..3abef4e0cc5 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -2,7 +2,7 @@ if(pre_attackby(target, user, params)) // Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example) var/resolved = target.attackby(src, user, params) - if(!resolved && target && !qdeleted(src)) + if(!resolved && target && !QDELETED(src)) afterattack(target, user, 1, params) // 1: clicking something Adjacent // Called when the item is in the active hand, and clicked; alternately, there is an 'activate held object' verb or you can hit pagedown. diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index 02c2954b61f..5ab67ffb611 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -62,9 +62,9 @@ var/const/tk_maxrange = 15 desc = "Magic" icon = 'icons/obj/magic.dmi'//Needs sprites icon_state = "2" - flags = NOBLUDGEON | ABSTRACT + flags = NOBLUDGEON | ABSTRACT | DROPDEL //item_state = null - w_class = 10 + w_class = WEIGHT_CLASS_GIGANTIC layer = 20 plane = HUD_PLANE @@ -82,9 +82,8 @@ var/const/tk_maxrange = 15 /obj/item/tk_grab/dropped(mob/user) if(focus && user && loc != user && loc != user.loc) // drop_item() gets called when you tk-attack a table/closet with an item if(focus.Adjacent(loc)) - focus.loc = loc - - qdel(src) + focus.forceMove(loc) + . = ..() //stops TK grabs being equipped anywhere but into hands diff --git a/code/controllers/ProcessScheduler/core/process.dm b/code/controllers/ProcessScheduler/core/process.dm index 4fc377e9e37..9e777d07ea3 100644 --- a/code/controllers/ProcessScheduler/core/process.dm +++ b/code/controllers/ProcessScheduler/core/process.dm @@ -393,7 +393,7 @@ exceptions[eid] = 0 /datum/controller/process/proc/catchBadType(var/datum/caught) - if(isnull(caught) || !istype(caught) || !isnull(caught.gcDestroyed)) + if(isnull(caught) || !istype(caught) || QDELETED(caught)) return // Only bother with types we can identify and that don't belong catchException("Type [caught.type] does not belong in process' queue") diff --git a/code/controllers/Processes/air.dm b/code/controllers/Processes/air.dm deleted file mode 100644 index e7937593c19..00000000000 --- a/code/controllers/Processes/air.dm +++ /dev/null @@ -1,197 +0,0 @@ -var/kill_air = 0 - -var/global/datum/controller/process/air_system/air_master - -/datum/controller/process/air_system - var/list/excited_groups = list() - var/list/active_turfs = list() - var/list/hotspots = list() - - //Special functions lists - var/list/turf/simulated/active_super_conductivity = list() - var/list/turf/simulated/high_pressure_delta = list() - - var/current_cycle = 0 - var/failed_ticks = 0 - var/tick_progress = 0 - - // Stats - var/last_active = 0 - var/last_excited = 0 - var/last_hpd = 0 - var/last_hotspots = 0 - var/last_asc = 0 - - -/datum/controller/process/air_system/setup() - name = "air" - schedule_interval = 4 - start_delay = 4 - - var/watch = start_watch() - log_startup_progress("Processing geometry...") - setup_overlays() // Assign icons and such for gas-turf-overlays - setup_allturfs() // Get all currently active tiles that need processing each atmos tick. - log_startup_progress(" Geometry processed in [stop_watch(watch)]s.") - -/datum/controller/process/air_system/doWork() - if(kill_air) - return 1 - current_cycle++ - process_pipenets() - process_atmos_machinery() - process_active_turfs() - process_excited_groups() - process_high_pressure_delta() - process_hotspots() - process_super_conductivity() - return 1 - -/datum/controller/process/air_system/statProcess() - ..() - stat(null, "[last_active] active") - stat(null, "[last_excited] EG | [last_hpd] HPD | [last_asc] ASC | [last_hotspots] Hot") - stat(null, "[pipe_networks.len] pipe nets, [deferred_pipenet_rebuilds.len] deferred") - stat(null, "[atmos_machinery.len] atmos machines") - -DECLARE_GLOBAL_CONTROLLER(air_system, air_master) - -/datum/controller/process/air_system/proc/process_hotspots() - last_hotspots = hotspots.len - for(var/obj/effect/hotspot/H in hotspots) - H.process() - SCHECK - -/datum/controller/process/air_system/proc/process_super_conductivity() - last_asc = active_super_conductivity.len - for(var/turf/simulated/T in active_super_conductivity) - T.super_conduct() - SCHECK - -/datum/controller/process/air_system/proc/process_high_pressure_delta() - last_hpd = high_pressure_delta.len - for(var/turf/T in high_pressure_delta) - T.high_pressure_movements() - T.pressure_difference = 0 - SCHECK - high_pressure_delta.Cut() - -/datum/controller/process/air_system/proc/process_active_turfs() - last_active = active_turfs.len - for(var/turf/simulated/T in active_turfs) - T.process_cell() - SCHECK - -/datum/controller/process/air_system/proc/process_pipenets() - for(last_object in deferred_pipenet_rebuilds) - var/obj/machinery/atmospherics/M = last_object - if(istype(M) && isnull(M.gcDestroyed)) - try - M.build_network() - catch(var/exception/e) - catchException(e, M) - SCHECK - else - catchBadType(M) - deferred_pipenet_rebuilds -= M - - for(last_object in pipe_networks) - var/datum/pipeline/pipeNetwork = last_object - if(istype(pipeNetwork) && isnull(pipeNetwork.gcDestroyed)) - try - pipeNetwork.process() - catch(var/exception/e) - catchException(e, pipeNetwork) - SCHECK - else - catchBadType(pipeNetwork) - pipe_networks -= pipeNetwork - -/datum/controller/process/air_system/proc/process_atmos_machinery() - for(last_object in atmos_machinery) - var/obj/machinery/M = last_object - if(istype(M) && isnull(M.gcDestroyed)) - try - if(M.process_atmos() == PROCESS_KILL) - atmos_machinery.Remove(M) - continue - catch(var/exception/e) - catchException(e, M) - else - catchBadType(M) - atmos_machinery -= M - - SCHECK - - -/datum/controller/process/air_system/proc/remove_from_active(var/turf/simulated/T) - if(istype(T)) - T.excited = 0 - active_turfs -= T - if(T.excited_group) - T.excited_group.garbage_collect() - -/datum/controller/process/air_system/proc/add_to_active(var/turf/simulated/T, var/blockchanges = 1) - if(istype(T) && T.air) - T.excited = 1 - active_turfs |= T - if(blockchanges && T.excited_group) - T.excited_group.garbage_collect() - else - for(var/direction in cardinal) - if(!(T.atmos_adjacent_turfs & direction)) - continue - var/turf/simulated/S = get_step(T, direction) - if(istype(S)) - add_to_active(S) - -/datum/controller/process/air_system/proc/setup_allturfs(var/turfs_in = world) - for(var/turf/simulated/T in turfs_in) - T.CalculateAdjacentTurfs() - if(!T.blocks_air) - T.update_visuals() - for(var/direction in cardinal) - if(!(T.atmos_adjacent_turfs & direction)) - continue - var/turf/enemy_tile = get_step(T, direction) - if(istype(enemy_tile,/turf/simulated/)) - var/turf/simulated/enemy_simulated = enemy_tile - if(!T.air.compare(enemy_simulated.air)) - T.excited = 1 - active_turfs |= T - break - else - if(!T.air.check_turf_total(enemy_tile)) - T.excited = 1 - active_turfs |= T - -/datum/controller/process/air_system/proc/process_excited_groups() - last_excited = excited_groups.len - for(var/datum/excited_group/EG in excited_groups) - EG.breakdown_cooldown++ - if(EG.breakdown_cooldown == 10) - EG.self_breakdown() - SCHECK - return - if(EG.breakdown_cooldown > 20) - EG.dismantle() - SCHECK - -/datum/controller/process/air_system/proc/setup_overlays() - plmaster = new /obj/effect/overlay() - plmaster.icon = 'icons/effects/tile_effects.dmi' - plmaster.icon_state = "plasma" - plmaster.layer = FLY_LAYER - plmaster.mouse_opacity = 0 - - slmaster = new /obj/effect/overlay() - slmaster.icon = 'icons/effects/tile_effects.dmi' - slmaster.icon_state = "sleeping_agent" - slmaster.layer = FLY_LAYER - slmaster.mouse_opacity = 0 - - icemaster = new /obj/effect/overlay() - icemaster.icon = 'icons/turf/overlays.dmi' - icemaster.icon_state = "snowfloor" - icemaster.layer = TURF_LAYER+0.1 - icemaster.mouse_opacity = 0 diff --git a/code/controllers/Processes/garbage.dm b/code/controllers/Processes/garbage.dm deleted file mode 100644 index 1a93c8f13db..00000000000 --- a/code/controllers/Processes/garbage.dm +++ /dev/null @@ -1,17 +0,0 @@ -var/global/datum/controller/process/garbage_collector/garbageCollector - -/datum/controller/process/garbage_collector/setup() - name = "garbage" - schedule_interval = 10 - start_delay = 3 - -/datum/controller/process/garbage_collector/doWork() - // Garbage collection code can be found in code\modules\garbage collection\garbage_collector.dm - processGarbage() - -/datum/controller/process/garbage_collector/statProcess() - ..() - stat(null, "[del_everything ? "Off" : "On"], [queue.len] queued") - stat(null, "Dels: [dels_count], [soft_dels] soft, [hard_dels] hard") - -DECLARE_GLOBAL_CONTROLLER(garbage_collector, garbageCollector) diff --git a/code/controllers/Processes/inactivity.dm b/code/controllers/Processes/inactivity.dm deleted file mode 100644 index b08df7983fc..00000000000 --- a/code/controllers/Processes/inactivity.dm +++ /dev/null @@ -1,16 +0,0 @@ -/*/datum/controller/process/inactivity/setup() - name = "inactivity" - schedule_interval = INACTIVITY_KICK - -/datum/controller/process/inactivity/doWork() - if(config.kick_inactive) - for(var/client/C in clients) - if(C.is_afk(INACTIVITY_KICK)) - if(!istype(C.mob, /mob/dead)) - log_access("AFK: [key_name(C)]") - to_chat(C, "You have been inactive for more than 10 minutes and have been disconnected.") - del(C) - - SCHECK - -#undef INACTIVITY_KICK*/ diff --git a/code/controllers/Processes/machinery.dm b/code/controllers/Processes/machinery.dm index 268e1c073a2..2466f802740 100644 --- a/code/controllers/Processes/machinery.dm +++ b/code/controllers/Processes/machinery.dm @@ -24,7 +24,7 @@ /datum/controller/process/machinery/proc/process_machines() for(last_object in machine_processing) var/obj/machinery/M = last_object - if(istype(M) && isnull(M.gcDestroyed)) + if(istype(M) && !QDELETED(M)) try if(M.process() == PROCESS_KILL) machine_processing.Remove(M) @@ -43,7 +43,7 @@ /datum/controller/process/machinery/proc/process_power() for(last_object in deferred_powernet_rebuilds) var/obj/O = last_object - if(istype(O) && isnull(O.gcDestroyed)) + if(istype(O) && !QDELETED(O)) try var/datum/powernet/newPN = new()// creates a new powernet... propagate_network(O, newPN)//... and propagates it to the other side of the cable @@ -56,7 +56,7 @@ for(last_object in powernets) var/datum/powernet/powerNetwork = last_object - if(istype(powerNetwork) && isnull(powerNetwork.gcDestroyed)) + if(istype(powerNetwork) && !QDELETED(powerNetwork)) try powerNetwork.reset() catch(var/exception/e) diff --git a/code/controllers/Processes/mob.dm b/code/controllers/Processes/mob.dm index 86c76604606..2b11eff99be 100644 --- a/code/controllers/Processes/mob.dm +++ b/code/controllers/Processes/mob.dm @@ -21,7 +21,7 @@ var/global/datum/controller/process/mob/mob_master /datum/controller/process/mob/doWork() for(last_object in mob_list) var/mob/M = last_object - if(istype(M) && isnull(M.gcDestroyed)) + if(istype(M) && !QDELETED(M)) try M.Life() catch(var/exception/e) diff --git a/code/controllers/Processes/npcai.dm b/code/controllers/Processes/npcai.dm index 09d8556187e..1f8d2a34e9e 100644 --- a/code/controllers/Processes/npcai.dm +++ b/code/controllers/Processes/npcai.dm @@ -25,7 +25,7 @@ var/global/datum/controller/process/npcai/npcai_master /datum/controller/process/npcai/doWork() for(last_object in simple_animal_list) var/mob/living/simple_animal/M = last_object - if(istype(M) && isnull(M.gcDestroyed)) + if(istype(M) && !QDELETED(M)) if(!M.client && M.stat == CONSCIOUS) try M.process_ai() @@ -44,7 +44,7 @@ var/global/datum/controller/process/npcai/npcai_master for(last_object in snpc_list) var/mob/living/carbon/human/interactive/M = last_object - if(istype(M) && isnull(M.gcDestroyed)) + if(istype(M) && !QDELETED(M)) try if(!M.alternateProcessing || M.forceProcess) M.doProcess() diff --git a/code/controllers/Processes/obj.dm b/code/controllers/Processes/obj.dm index 0e573bcc05c..454709b6194 100644 --- a/code/controllers/Processes/obj.dm +++ b/code/controllers/Processes/obj.dm @@ -15,7 +15,7 @@ /datum/controller/process/obj/doWork() for(last_object in processing_objects) var/datum/O = last_object - if(istype(O) && isnull(O.gcDestroyed)) + if(istype(O) && !QDELETED(O)) try // Reagent datums get shoved in here, but the process proc isn't on the // base datum type, so we just call it blindly. diff --git a/code/controllers/Processes/shuttles.dm b/code/controllers/Processes/shuttles.dm index 4f47bda014c..57ca886d6e1 100644 --- a/code/controllers/Processes/shuttles.dm +++ b/code/controllers/Processes/shuttles.dm @@ -13,6 +13,7 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12 var/emergencyCallTime = 6000 //time taken for emergency shuttle to reach the station when called (in deciseconds) var/emergencyDockTime = 1800 //time taken for emergency shuttle to leave again once it has docked (in deciseconds) var/emergencyEscapeTime = 1200 //time taken for emergency shuttle to reach a safe distance after leaving station (in deciseconds) + var/emergency_sec_level_time = 0 // time sec level was last raised to red or higher var/area/emergencyLastCallLoc var/emergencyNoEscape @@ -134,7 +135,11 @@ DECLARE_GLOBAL_CONTROLLER(shuttle, shuttle_master) var/area/signal_origin = get_area(user) var/emergency_reason = "\nNature of emergency:\n\n[call_reason]" if(seclevel2num(get_security_level()) >= SEC_LEVEL_RED) // There is a serious threat we gotta move no time to give them five minutes. - emergency.request(null, 0.5, signal_origin, html_decode(emergency_reason), 1) + var/extra_minutes = 0 + var/priority_time = emergencyCallTime * 0.5 + if(world.time - emergency_sec_level_time < priority_time) + extra_minutes = 5 + emergency.request(null, 0.5 + extra_minutes / (emergencyCallTime / 600), signal_origin, html_decode(emergency_reason), 1) else emergency.request(null, 1, signal_origin, html_decode(emergency_reason), 0) diff --git a/code/controllers/Processes/spacedrift.dm b/code/controllers/Processes/spacedrift.dm deleted file mode 100644 index d799aeb99d9..00000000000 --- a/code/controllers/Processes/spacedrift.dm +++ /dev/null @@ -1,53 +0,0 @@ -var/global/datum/controller/process/spacedrift/drift_master - -/datum/controller/process/spacedrift - var/list/processing_list = list() - -/datum/controller/process/spacedrift/setup() - name = "spacedrift" - schedule_interval = 5 - start_delay = 20 - log_startup_progress("Spacedrift starting up.") - -/datum/controller/process/spacedrift/statProcess() - ..() - stat(null, "P:[processing_list.len]") - -/datum/controller/process/spacedrift/doWork() - var/list/currentrun = processing_list.Copy() - - while(currentrun.len) - var/atom/movable/AM = currentrun[currentrun.len] - currentrun.len-- - if(!AM) - processing_list -= AM - SCHECK - continue - - if(AM.inertia_next_move > world.time) - SCHECK - continue - - if(!AM.loc || AM.loc != AM.inertia_last_loc || AM.Process_Spacemove(0)) - AM.inertia_dir = 0 - - if(!AM.inertia_dir) - AM.inertia_last_loc = null - processing_list -= AM - SCHECK - continue - - var/old_dir = AM.dir - var/old_loc = AM.loc - AM.inertia_moving = TRUE - step(AM, AM.inertia_dir) - AM.inertia_moving = FALSE - AM.inertia_next_move = world.time + AM.inertia_move_delay - if(AM.loc == old_loc) - AM.inertia_dir = 0 - - AM.setDir(old_dir) - AM.inertia_last_loc = AM.loc - SCHECK - -DECLARE_GLOBAL_CONTROLLER(spacedrift, drift_master) \ No newline at end of file diff --git a/code/controllers/Processes/sun.dm b/code/controllers/Processes/sun.dm deleted file mode 100644 index bd9644b4536..00000000000 --- a/code/controllers/Processes/sun.dm +++ /dev/null @@ -1,61 +0,0 @@ -var/global/datum/controller/process/sun/sun - -/datum/controller/process/sun - var/angle - var/dx - var/dy - var/rate - var/list/solars = list() // for debugging purposes, references solars list at the constructor - -/datum/controller/process/sun/setup() - name = "sun" - schedule_interval = 600 // every 60 seconds - log_startup_progress("Sun ticker starting up.") - - angle = rand (0,360) // the station position to the sun is randomised at round start - rate = rand(50,200)/100 // 50% - 200% of standard rotation - if(prob(50)) // same chance to rotate clockwise than counter-clockwise - rate = -rate - -/datum/controller/process/sun/doWork() - calc_position() - update_solar_machinery() - -DECLARE_GLOBAL_CONTROLLER(sun, sun) - -// calculate the sun's position given the time of day -// at the standard rate (100%) the angle is increase/decreased by 6 degrees every minute. -// a full rotation thus take a game hour in that case -/datum/controller/process/sun/proc/calc_position() - angle = (360 + angle + rate * 6) % 360 // increase/decrease the angle to the sun, adjusted by the rate - - // now calculate and cache the (dx,dy) increments for line drawing - var/s = sin(angle) - var/c = cos(angle) - - // Either "abs(s) < abs(c)" or "abs(s) >= abs(c)" - // In both cases, the greater is greater than 0, so, no "if 0" check is needed for the divisions - - if(abs(s) < abs(c)) - dx = s / abs(c) - dy = c / abs(c) - else - dx = s / abs(s) - dy = c / abs(s) - -//now tell the solar control computers to update their status and linked devices -/datum/controller/process/sun/proc/update_solar_machinery() - for(last_object in solars) - var/obj/machinery/power/solar_control/SC = last_object - if(istype(SC) && isnull(SC.gcDestroyed)) - if(!SC.powernet) - solars -= SC - continue - try - SC.update() - catch(var/exception/e) - catchException(e, SC) - SCHECK - else - catchBadType(SC) - solars -= SC diff --git a/code/controllers/Processes/throwing.dm b/code/controllers/Processes/throwing.dm deleted file mode 100644 index a11c1252d35..00000000000 --- a/code/controllers/Processes/throwing.dm +++ /dev/null @@ -1,138 +0,0 @@ -#define MAX_THROWING_DIST 512 // 2 z-levels on default width -#define MAX_TICKS_TO_MAKE_UP 3 //how many missed ticks will we attempt to make up for this run. - -var/global/datum/controller/process/throwing/throw_master - -/datum/controller/process/throwing - var/list/processing_list - -/datum/controller/process/throwing/setup() - name = "throwing" - schedule_interval = 1 - start_delay = 20 - log_startup_progress("Throw ticker starting up.") - -/datum/controller/process/throwing/statProcess() - ..() - stat(null, "P:[processing_list.len]") - -/datum/controller/process/throwing/started() - ..() - if(!processing_list) - processing_list = list() - -/datum/controller/process/throwing/doWork() - for(last_object in processing_list) - var/atom/movable/AM = last_object - if(istype(AM) && isnull(AM.gcDestroyed)) - var/datum/thrownthing/TT = processing_list[AM] - if(istype(TT) && isnull(TT.gcDestroyed)) - TT.tick() - SCHECK - else - catchBadType(TT) - processing_list -= AM - AM.throwing = null - else - catchBadType(AM) - processing_list -= AM - SCHECK - -DECLARE_GLOBAL_CONTROLLER(throwing, throw_master) - -/datum/thrownthing - var/atom/movable/thrownthing - var/atom/target - var/turf/target_turf - var/init_dir - var/maxrange - var/speed - var/mob/thrower - var/diagonals_first - var/dist_travelled = 0 - var/start_time - var/dist_x - var/dist_y - var/dx - var/dy - var/pure_diagonal - var/diagonal_error - var/datum/callback/callback - -/datum/thrownthing/proc/tick() - var/atom/movable/AM = thrownthing - if(!isturf(AM.loc) || !AM.throwing) - finalize() - return - - if(dist_travelled && hitcheck()) //to catch sneaky things moving on our tile while we slept - finalize() - return - - var/atom/step - - // calculate how many tiles to move, making up for any missed ticks. - if((dist_travelled >= maxrange || AM.loc == target_turf) && has_gravity(AM, AM.loc)) - finalize() - return - - if(dist_travelled <= max(dist_x, dist_y)) //if we haven't reached the target yet we home in on it, otherwise we use the initial direction - step = get_step(AM, get_dir(AM, target_turf)) - else - step = get_step(AM, init_dir) - - if(!pure_diagonal && !diagonals_first) // not a purely diagonal trajectory and we don't want all diagonal moves to be done first - if(diagonal_error >= 0 && max(dist_x, dist_y) - dist_travelled != 1) // we do a step forward unless we're right before the target - step = get_step(AM, dx) - diagonal_error += (diagonal_error < 0) ? dist_x / 2 : -dist_y - - if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge - finalize() - return - - AM.Move(step, get_dir(AM, step)) - - if(!AM.throwing) // we hit something during our move - finalize(hit = TRUE) - return - - dist_travelled++ - - if(dist_travelled > MAX_THROWING_DIST) - finalize() - return - -/datum/thrownthing/proc/finalize(hit = FALSE) - set waitfor = 0 - throw_master.processing_list -= thrownthing - // done throwning, either because it hit something or it finished moving - thrownthing.throwing = null - if(!hit) - for(var/thing in get_turf(thrownthing)) //looking for our target on the turf we land on. - var/atom/A = thing - if(A == target) - hit = 1 - thrownthing.throw_impact(A, src) - break - if(!hit) - thrownthing.throw_impact(get_turf(thrownthing), src) // we haven't hit something yet and we still must, let's hit the ground. - thrownthing.newtonian_move(init_dir) - else - thrownthing.newtonian_move(init_dir) - if(callback) - callback.Invoke() - -/datum/thrownthing/proc/hit_atom(atom/A) - thrownthing.throw_impact(A, src) - thrownthing.newtonian_move(init_dir) - finalize(TRUE) - -/datum/thrownthing/proc/hitcheck() - for(var/thing in get_turf(thrownthing)) - var/atom/movable/AM = thing - if(AM == thrownthing) - continue - if(AM.density && !(AM.pass_flags & LETPASSTHROW) && !(AM.flags & ON_BORDER)) - thrownthing.throwing = null - thrownthing.throw_impact(AM, src) - return TRUE \ No newline at end of file diff --git a/code/controllers/Processes/timer.dm b/code/controllers/Processes/timer.dm index 0dcaf128193..4b42d69221d 100644 --- a/code/controllers/Processes/timer.dm +++ b/code/controllers/Processes/timer.dm @@ -19,7 +19,7 @@ var/global/datum/controller/process/timer/timer_master return for(last_object in processing_timers) var/datum/timedevent/event = last_object - if(!event.thingToCall || qdeleted(event.thingToCall)) + if(!event.thingToCall || check_datum_qdeleted(event.thingToCall)) qdel(event) if(event.timeToRun <= world.time) runevent(event) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 88fdb83da10..7750a40074f 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -199,22 +199,22 @@ var/high_pop_mc_mode_amount = 65 var/disable_high_pop_mc_mode_amount = 60 -/datum/configuration/New() - var/list/L = subtypesof(/datum/game_mode) - for(var/T in L) - // I wish I didn't have to instance the game modes in order to look up - // their information, but it is the only way (at least that I know of). - var/datum/game_mode/M = new T() + // Nightshift + var/randomize_shift_time = FALSE + var/enable_night_shifts = FALSE - if(M.config_tag) - if(!(M.config_tag in modes)) // ensure each mode is added only once - diary << "Adding game mode [M.name] ([M.config_tag]) to configuration." - src.modes += M.config_tag - src.mode_names[M.config_tag] = M.name - src.probabilities[M.config_tag] = M.probability - if(M.votable) - src.votable_modes += M.config_tag - qdel(M) +/datum/configuration/New() + for(var/T in subtypesof(/datum/game_mode)) + var/datum/game_mode/M = T + + if(initial(M.config_tag)) + if(!(initial(M.config_tag) in modes)) // ensure each mode is added only once + diary << "Adding game mode [initial(M.name)] ([initial(M.config_tag)]) to configuration." + src.modes += initial(M.config_tag) + src.mode_names[initial(M.config_tag)] = initial(M.name) + src.probabilities[initial(M.config_tag)] = initial(M.probability) + if(initial(M.votable)) + src.votable_modes += initial(M.config_tag) src.votable_modes += "secret" /datum/configuration/proc/load(filename, type = "config") //the type can also be game_options, in which case it uses a different switch. not making it separate to not copypaste code - Urist @@ -605,19 +605,18 @@ shutdown_shell_command = value if("disable_karma") - disable_karma = 1 + config.disable_karma = 1 if("tick_limit_mc_init") - tick_limit_mc_init = text2num(value) + config.tick_limit_mc_init = text2num(value) if("base_mc_tick_rate") - base_mc_tick_rate = text2num(value) + config.base_mc_tick_rate = text2num(value) if("high_pop_mc_tick_rate") - high_pop_mc_tick_rate = text2num(value) + config.high_pop_mc_tick_rate = text2num(value) if("high_pop_mc_mode_amount") - high_pop_mc_mode_amount = text2num(value) + config.high_pop_mc_mode_amount = text2num(value) if("disable_high_pop_mc_mode_amount") - disable_high_pop_mc_mode_amount = text2num(value) - + config.disable_high_pop_mc_mode_amount = text2num(value) else diary << "Unknown setting in configuration: '[name]'" @@ -680,6 +679,10 @@ MAX_EX_FLAME_RANGE = BombCap if("default_laws") config.default_laws = text2num(value) + if("randomize_shift_time") + config.randomize_shift_time = TRUE + if("enable_night_shifts") + config.enable_night_shifts = TRUE else diary << "Unknown setting in configuration: '[name]'" @@ -750,13 +753,10 @@ config.overflow_whitelist += t /datum/configuration/proc/pick_mode(mode_name) - // I wish I didn't have to instance the game modes in order to look up - // their information, but it is the only way (at least that I know of). for(var/T in subtypesof(/datum/game_mode)) - var/datum/game_mode/M = new T() - if(M.config_tag && M.config_tag == mode_name) - return M - qdel(M) + var/datum/game_mode/M = T + if(initial(M.config_tag) && initial(M.config_tag) == mode_name) + return new T() return new /datum/game_mode/extended() /datum/configuration/proc/get_runnable_modes() @@ -773,4 +773,4 @@ if(M.can_start()) runnable_modes[M] = probabilities[M.config_tag] // to_chat(world, "DEBUG: runnable_mode\[[runnable_modes.len]\] = [M.config_tag]") - return runnable_modes + return runnable_modes \ No newline at end of file diff --git a/code/controllers/failsafe.dm b/code/controllers/failsafe.dm index 78303449f26..923dece3c6b 100644 --- a/code/controllers/failsafe.dm +++ b/code/controllers/failsafe.dm @@ -28,7 +28,7 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe) /datum/controller/failsafe/Initialize() set waitfor = 0 Failsafe.Loop() - if(!qdeleted(src)) + if(!QDELETED(src)) qdel(src) //when Loop() returns, we delete ourselves and let the mc recreate us /datum/controller/failsafe/Destroy() diff --git a/code/controllers/subsystem/fires.dm b/code/controllers/subsystem/fires.dm index 50624aa8db0..ce66405e1c9 100644 --- a/code/controllers/subsystem/fires.dm +++ b/code/controllers/subsystem/fires.dm @@ -21,7 +21,7 @@ SUBSYSTEM_DEF(fires) while(currentrun.len) var/obj/O = currentrun[currentrun.len] currentrun.len-- - if(!O || qdeleted(O)) + if(!O || QDELETED(O)) processing -= O if(MC_TICK_CHECK) return diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm new file mode 100644 index 00000000000..05dab2bd97b --- /dev/null +++ b/code/controllers/subsystem/garbage.dm @@ -0,0 +1,466 @@ +SUBSYSTEM_DEF(garbage) + name = "Garbage" + priority = FIRE_PRIORITY_GARBAGE + wait = 2 SECONDS + flags = SS_POST_FIRE_TIMING|SS_BACKGROUND|SS_NO_INIT + runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY + init_order = INIT_ORDER_GARBAGE + + var/list/collection_timeout = list(0, 2 MINUTES, 10 SECONDS) // deciseconds to wait before moving something up in the queue to the next level + + //Stat tracking + var/delslasttick = 0 // number of del()'s we've done this tick + var/gcedlasttick = 0 // number of things that gc'ed last tick + var/totaldels = 0 + var/totalgcs = 0 + + var/highest_del_time = 0 + var/highest_del_tickusage = 0 + + var/list/pass_counts + var/list/fail_counts + + var/list/items = list() // Holds our qdel_item statistics datums + + //Queue + var/list/queues + + #ifdef TESTING + var/list/reference_find_on_fail = list() + #endif + + +/datum/controller/subsystem/garbage/PreInit() + queues = new(GC_QUEUE_COUNT) + pass_counts = new(GC_QUEUE_COUNT) + fail_counts = new(GC_QUEUE_COUNT) + for(var/i in 1 to GC_QUEUE_COUNT) + queues[i] = list() + pass_counts[i] = 0 + fail_counts[i] = 0 + +/datum/controller/subsystem/garbage/stat_entry(msg) + var/list/counts = list() + for(var/list/L in queues) + counts += length(L) + msg += "Q:[counts.Join(",")]|D:[delslasttick]|G:[gcedlasttick]|" + msg += "GR:" + if(!(delslasttick + gcedlasttick)) + msg += "n/a|" + else + msg += "[round((gcedlasttick / (delslasttick + gcedlasttick)) * 100, 0.01)]%|" + + msg += "TD:[totaldels]|TG:[totalgcs]|" + if(!(totaldels + totalgcs)) + msg += "n/a|" + else + msg += "TGR:[round((totalgcs / (totaldels + totalgcs)) * 100, 0.01)]%" + msg += " P:[pass_counts.Join(",")]" + msg += "|F:[fail_counts.Join(",")]" + ..(msg) + +/* TO-DO +/datum/controller/subsystem/garbage/Shutdown() + //Adds the del() log to the qdel log file + var/list/dellog = list() + + //sort by how long it's wasted hard deleting + sortTim(items, cmp=/proc/cmp_qdel_item_time, associative = TRUE) + for(var/path in items) + var/datum/qdel_item/I = items[path] + dellog += "Path: [path]" + if(I.failures) + dellog += "\tFailures: [I.failures]" + dellog += "\tqdel() Count: [I.qdels]" + dellog += "\tDestroy() Cost: [I.destroy_time]ms" + if(I.hard_deletes) + dellog += "\tTotal Hard Deletes [I.hard_deletes]" + dellog += "\tTime Spent Hard Deleting: [I.hard_delete_time]ms" + if(I.slept_destroy) + dellog += "\tSleeps: [I.slept_destroy]" + if(I.no_respect_force) + dellog += "\tIgnored force: [I.no_respect_force] times" + if(I.no_hint) + dellog += "\tNo hint: [I.no_hint] times" + log_qdel(dellog.Join("\n")) +*/ + +/datum/controller/subsystem/garbage/fire() + //the fact that this resets its processing each fire (rather then resume where it left off) is intentional. + var/queue = GC_QUEUE_PREQUEUE + + while(state == SS_RUNNING) + switch(queue) + if(GC_QUEUE_PREQUEUE) + HandlePreQueue() + queue = GC_QUEUE_PREQUEUE + 1 + if(GC_QUEUE_CHECK) + HandleQueue(GC_QUEUE_CHECK) + queue = GC_QUEUE_CHECK + 1 + if(GC_QUEUE_HARDDELETE) + HandleQueue(GC_QUEUE_HARDDELETE) + break + + if(state == SS_PAUSED) //make us wait again before the next run. + state = SS_RUNNING + +//If you see this proc high on the profile, what you are really seeing is the garbage collection/soft delete overhead in byond. +//Don't attempt to optimize, not worth the effort. +/datum/controller/subsystem/garbage/proc/HandlePreQueue() + var/list/tobequeued = queues[GC_QUEUE_PREQUEUE] + var/static/count = 0 + if(count) + var/c = count + count = 0 //so if we runtime on the Cut, we don't try again. + tobequeued.Cut(1, c + 1) + + for(var/ref in tobequeued) + count++ + Queue(ref, GC_QUEUE_PREQUEUE + 1) + if(MC_TICK_CHECK) + break + if(count) + tobequeued.Cut(1, count + 1) + count = 0 + +/datum/controller/subsystem/garbage/proc/HandleQueue(level = GC_QUEUE_CHECK) + if(level == GC_QUEUE_CHECK) + delslasttick = 0 + gcedlasttick = 0 + var/cut_off_time = world.time - collection_timeout[level] //ignore entries newer then this + var/list/queue = queues[level] + var/static/lastlevel + var/static/count = 0 + if(count) //runtime last run before we could do this. + var/c = count + count = 0 //so if we runtime on the Cut, we don't try again. + var/list/lastqueue = queues[lastlevel] + lastqueue.Cut(1, c + 1) + + lastlevel = level + + for(var/refID in queue) + if(!refID) + count++ + if(MC_TICK_CHECK) + break + continue + + var/GCd_at_time = queue[refID] + if(GCd_at_time > cut_off_time) + break // Everything else is newer, skip them + count++ + + var/datum/D + D = locate(refID) + + if(!D || D.gc_destroyed != GCd_at_time) // So if something else coincidently gets the same ref, it's not deleted by mistake + ++gcedlasttick + ++totalgcs + pass_counts[level]++ + #ifdef TESTING + reference_find_on_fail -= refID //It's deleted we don't care anymore. + #endif + if(MC_TICK_CHECK) + break + continue + + // Something's still referring to the qdel'd object. + fail_counts[level]++ + switch(level) + if(GC_QUEUE_CHECK) + #ifdef TESTING + if(reference_find_on_fail[refID]) + D.find_references() + #ifdef GC_FAILURE_HARD_LOOKUP + else + D.find_references() + #endif + reference_find_on_fail -= refID + #endif + var/type = D.type + var/datum/qdel_item/I = items[type] + testing("GC: -- \ref[src] | [type] was unable to be GC'd --") + I.failures++ + if(GC_QUEUE_HARDDELETE) + HardDelete(D) + if(MC_TICK_CHECK) + break + continue + + Queue(D, level + 1) + + if(MC_TICK_CHECK) + break + if(count) + queue.Cut(1, count + 1) + count = 0 + +/datum/controller/subsystem/garbage/proc/PreQueue(datum/D) + if(D.gc_destroyed == GC_CURRENTLY_BEING_QDELETED) + queues[GC_QUEUE_PREQUEUE] += D + D.gc_destroyed = GC_QUEUED_FOR_QUEUING + +/datum/controller/subsystem/garbage/proc/Queue(datum/D, level = GC_QUEUE_CHECK) + if(isnull(D)) + return + if(D.gc_destroyed == GC_QUEUED_FOR_HARD_DEL) + level = GC_QUEUE_HARDDELETE + if(level > GC_QUEUE_COUNT) + HardDelete(D) + return + var/gctime = world.time + var/refid = "\ref[D]" + + D.gc_destroyed = gctime + var/list/queue = queues[level] + if(queue[refid]) + queue -= refid // Removing any previous references that were GC'd so that the current object will be at the end of the list. + + queue[refid] = gctime + +//this is mainly to separate things profile wise. +/datum/controller/subsystem/garbage/proc/HardDelete(datum/D) + var/time = world.timeofday + var/tick = TICK_USAGE + var/ticktime = world.time + ++delslasttick + ++totaldels + var/type = D.type + var/refID = "\ref[D]" + + del(D) + + tick = (TICK_USAGE - tick + ((world.time - ticktime) / world.tick_lag * 100)) + + var/datum/qdel_item/I = items[type] + + I.hard_deletes++ + I.hard_delete_time += TICK_DELTA_TO_MS(tick) + + + if(tick > highest_del_tickusage) + highest_del_tickusage = tick + time = world.timeofday - time + if(!time && TICK_DELTA_TO_MS(tick) > 1) + time = TICK_DELTA_TO_MS(tick) / 100 + if(time > highest_del_time) + highest_del_time = time + if(time > 10) + log_game("Error: [type]([refID]) took longer than 1 second to delete (took [time / 10] seconds to delete)") + message_admins("Error: [type]([refID]) took longer than 1 second to delete (took [time / 10] seconds to delete).") + postpone(time) + +/datum/controller/subsystem/garbage/proc/HardQueue(datum/D) + if(D.gc_destroyed == GC_CURRENTLY_BEING_QDELETED) + queues[GC_QUEUE_PREQUEUE] += D + D.gc_destroyed = GC_QUEUED_FOR_HARD_DEL + +/datum/controller/subsystem/garbage/Recover() + if(istype(SSgarbage.queues)) + for(var/i in 1 to SSgarbage.queues.len) + queues[i] |= SSgarbage.queues[i] + + +/datum/qdel_item + var/name = "" + var/qdels = 0 //Total number of times it's passed thru qdel. + var/destroy_time = 0 //Total amount of milliseconds spent processing this type's Destroy() + var/failures = 0 //Times it was queued for soft deletion but failed to soft delete. + var/hard_deletes = 0 //Different from failures because it also includes QDEL_HINT_HARDDEL deletions + var/hard_delete_time = 0//Total amount of milliseconds spent hard deleting this type. + var/no_respect_force = 0//Number of times it's not respected force=TRUE + var/no_hint = 0 //Number of times it's not even bother to give a qdel hint + var/slept_destroy = 0 //Number of times it's slept in its destroy + +/datum/qdel_item/New(mytype) + name = "[mytype]" + +#ifdef TESTING +/proc/qdel_and_find_ref_if_fail(datum/D, force = FALSE) + SSgarbage.reference_find_on_fail["\ref[D]"] = TRUE + qdel(D, force) +#endif + +// Should be treated as a replacement for the 'del' keyword. +// Datums passed to this will be given a chance to clean up references to allow the GC to collect them. +/proc/qdel(datum/D, force = FALSE, ...) + if(!istype(D)) + del(D) + return + var/datum/qdel_item/I = SSgarbage.items[D.type] + if(!I) + I = SSgarbage.items[D.type] = new /datum/qdel_item(D.type) + I.qdels++ + + + if(isnull(D.gc_destroyed)) + D.gc_destroyed = GC_CURRENTLY_BEING_QDELETED + var/start_time = world.time + var/start_tick = world.tick_usage + var/hint = D.Destroy(arglist(args.Copy(2))) // Let our friend know they're about to get fucked up. + if(world.time != start_time) + I.slept_destroy++ + else + I.destroy_time += TICK_USAGE_TO_MS(start_tick) + if(!D) + return + switch(hint) + if(QDEL_HINT_QUEUE) //qdel should queue the object for deletion. + SSgarbage.PreQueue(D) + if(QDEL_HINT_IWILLGC) + D.gc_destroyed = world.time + return + if(QDEL_HINT_LETMELIVE) //qdel should let the object live after calling destory. + if(!force) + D.gc_destroyed = null //clear the gc variable (important!) + return + // Returning LETMELIVE after being told to force destroy + // indicates the objects Destroy() does not respect force + #ifdef TESTING + if(!I.no_respect_force) + testing("WARNING: [D.type] has been force deleted, but is \ + returning an immortal QDEL_HINT, indicating it does \ + not respect the force flag for qdel(). It has been \ + placed in the queue, further instances of this type \ + will also be queued.") + #endif + I.no_respect_force++ + + SSgarbage.PreQueue(D) + if(QDEL_HINT_HARDDEL) //qdel should assume this object won't gc, and queue a hard delete using a hard reference to save time from the locate() + SSgarbage.HardQueue(D) + if(QDEL_HINT_HARDDEL_NOW) //qdel should assume this object won't gc, and hard del it post haste. + SSgarbage.HardDelete(D) + if(QDEL_HINT_FINDREFERENCE)//qdel will, if TESTING is enabled, display all references to this object, then queue the object for deletion. + SSgarbage.PreQueue(D) + #ifdef TESTING + D.find_references() + #endif + if(QDEL_HINT_IFFAIL_FINDREFERENCE) + SSgarbage.PreQueue(D) + #ifdef TESTING + SSgarbage.reference_find_on_fail["\ref[D]"] = TRUE + #endif + else + #ifdef TESTING + if(!I.no_hint) + testing("WARNING: [D.type] is not returning a qdel hint. It is being placed in the queue. Further instances of this type will also be queued.") + #endif + I.no_hint++ + SSgarbage.PreQueue(D) + else if(D.gc_destroyed == GC_CURRENTLY_BEING_QDELETED) + CRASH("[D.type] destroy proc was called multiple times, likely due to a qdel loop in the Destroy logic") + +#ifdef TESTING + +/datum/verb/find_refs() + set category = "Debug" + set name = "Find References" + set src in world + + find_references(FALSE) + +/datum/proc/find_references(skip_alert) + running_find_references = type + if(usr && usr.client) + if(usr.client.running_find_references) + testing("CANCELLED search for references to a [usr.client.running_find_references].") + usr.client.running_find_references = null + running_find_references = null + //restart the garbage collector + SSgarbage.can_fire = 1 + SSgarbage.next_fire = world.time + world.tick_lag + return + + if(!skip_alert) + if(alert("Running this will lock everything up for about 5 minutes. Would you like to begin the search?", "Find References", "Yes", "No") == "No") + running_find_references = null + return + + //this keeps the garbage collector from failing to collect objects being searched for in here + SSgarbage.can_fire = 0 + + if(usr && usr.client) + usr.client.running_find_references = type + + testing("Beginning search for references to a [type].") + last_find_references = world.time + + DoSearchVar(GLOB) //globals + for(var/datum/thing in world) //atoms (don't beleive it's lies) + DoSearchVar(thing, "World -> [thing]") + + for(var/datum/thing) //datums + DoSearchVar(thing, "World -> [thing]") + + for(var/client/thing) //clients + DoSearchVar(thing, "World -> [thing]") + + testing("Completed search for references to a [type].") + if(usr && usr.client) + usr.client.running_find_references = null + running_find_references = null + + //restart the garbage collector + SSgarbage.can_fire = 1 + SSgarbage.next_fire = world.time + world.tick_lag + +/datum/verb/qdel_then_find_references() + set category = "Debug" + set name = "qdel() then Find References" + set src in world + + qdel(src, TRUE) //Force. + if(!running_find_references) + find_references(TRUE) + +/datum/verb/qdel_then_if_fail_find_references() + set category = "Debug" + set name = "qdel() then Find References if GC failure" + set src in world + + qdel_and_find_ref_if_fail(src, TRUE) + +/datum/proc/DoSearchVar(X, Xname, recursive_limit = 64) + if(usr && usr.client && !usr.client.running_find_references) + return + if(!recursive_limit) + return + + if(istype(X, /datum)) + var/datum/D = X + if(D.last_find_references == last_find_references) + return + + D.last_find_references = last_find_references + var/list/L = D.vars + + for(var/varname in L) + if(varname == "vars") + continue + var/variable = L[varname] + + if(variable == src) + testing("Found [src.type] \ref[src] in [D.type]'s [varname] var. [Xname]") + + else if(islist(variable)) + DoSearchVar(variable, "[Xname] -> list", recursive_limit - 1) + + else if(islist(X)) + var/normal = IS_NORMAL_LIST(X) + for(var/I in X) + if(I == src) + testing("Found [src.type] \ref[src] in list [Xname].") + + else if(I && !isnum(I) && normal && X[I] == src) + testing("Found [src.type] \ref[src] in list [Xname]\[[I]\]") + + else if(islist(I)) + DoSearchVar(I, "[Xname] -> list", recursive_limit - 1) + +#ifndef FIND_REF_NO_CHECK_TICK + CHECK_TICK +#endif + +#endif diff --git a/code/controllers/subsystem/nanoui.dm b/code/controllers/subsystem/nanoui.dm new file mode 100644 index 00000000000..c8cbbc62013 --- /dev/null +++ b/code/controllers/subsystem/nanoui.dm @@ -0,0 +1,33 @@ +SUBSYSTEM_DEF(nanoui) + name = "Nanoui" + wait = 9 + flags = SS_NO_INIT + priority = FIRE_PRIORITY_NANOUI + runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT + + var/list/currentrun = list() + var/list/open_uis = list() // A list of open UIs, grouped by src_object and ui_key. + var/list/processing_uis = list() // A list of processing UIs, ungrouped. + +/datum/controller/subsystem/nanoui/Shutdown() + close_all_uis() + +/datum/controller/subsystem/nanoui/stat_entry() + ..("P:[processing_uis.len]") + +/datum/controller/subsystem/nanoui/fire(resumed = 0) + if(!resumed) + src.currentrun = processing_uis.Copy() + //cache for sanic speed (lists are references anyways) + var/list/currentrun = src.currentrun + + while(currentrun.len) + var/datum/nanoui/ui = currentrun[currentrun.len] + currentrun.len-- + if(ui && ui.user && ui.src_object) + ui.process() + else + processing_uis.Remove(ui) + if(MC_TICK_CHECK) + return + diff --git a/code/controllers/subsystem/nightshift.dm b/code/controllers/subsystem/nightshift.dm new file mode 100644 index 00000000000..813cfd5012a --- /dev/null +++ b/code/controllers/subsystem/nightshift.dm @@ -0,0 +1,61 @@ +SUBSYSTEM_DEF(nightshift) + name = "Night Shift" + init_order = INIT_ORDER_NIGHTSHIFT + priority = FIRE_PRIORITY_NIGHTSHIFT + wait = 600 + flags = SS_NO_TICK_CHECK + + var/nightshift_active = FALSE + var/nightshift_start_time = 702000 //7:30 PM, station time + var/nightshift_end_time = 270000 //7:30 AM, station time + var/nightshift_first_check = 30 SECONDS + + var/high_security_mode = FALSE + +/datum/controller/subsystem/nightshift/Initialize() + if(!config.enable_night_shifts) + can_fire = FALSE + if(config.randomize_shift_time) + GLOB.gametime_offset = rand(0, 23) HOURS + return ..() + +/datum/controller/subsystem/nightshift/fire(resumed = FALSE) + if(world.time - round_start_time < nightshift_first_check) + return + check_nightshift() + +/datum/controller/subsystem/nightshift/proc/announce(message) + priority_announcement.Announce(message, new_sound = 'sound/misc/notice2.ogg', new_title = "Automated Lighting System Announcement") + +/datum/controller/subsystem/nightshift/proc/check_nightshift(check_canfire=FALSE) + if(check_canfire && !can_fire) + return + var/emergency = security_level >= SEC_LEVEL_RED + var/announcing = TRUE + var/time = station_time() + var/night_time = (time < nightshift_end_time) || (time > nightshift_start_time) + if(high_security_mode != emergency) + high_security_mode = emergency + if(night_time) + announcing = FALSE + if(!emergency) + announce("Restoring night lighting configuration to normal operation.") + else + announce("Disabling night lighting: Station is in a state of emergency.") + if(emergency) + night_time = FALSE + if(nightshift_active != night_time) + update_nightshift(night_time, announcing) + +/datum/controller/subsystem/nightshift/proc/update_nightshift(active, announce = TRUE) + nightshift_active = active + if(announce) + if(active) + announce("Good evening, crew. To reduce power consumption and stimulate the circadian rhythms of some species, all of the lights aboard the station have been dimmed for the night.") + else + announce("Good morning, crew. As it is now day time, all of the lights aboard the station have been restored to their former brightness.") + for(var/A in apcs) + var/obj/machinery/power/apc/APC = A + if(is_station_level(APC.z)) + APC.set_nightshift(active) + CHECK_TICK diff --git a/code/controllers/subsystem/sun.dm b/code/controllers/subsystem/sun.dm new file mode 100644 index 00000000000..8e5e47e7abf --- /dev/null +++ b/code/controllers/subsystem/sun.dm @@ -0,0 +1,42 @@ +SUBSYSTEM_DEF(sun) + name = "Sun" + wait = 600 + flags = SS_NO_TICK_CHECK|SS_NO_INIT + var/angle + var/dx + var/dy + var/rate + var/list/solars = list() + +/datum/controller/subsystem/sun/PreInit() + angle = rand (0,360) // the station position to the sun is randomised at round start + rate = rand(50,200)/100 // 50% - 200% of standard rotation + if(prob(50)) // same chance to rotate clockwise than counter-clockwise + rate = -rate + +/datum/controller/subsystem/sun/stat_entry(msg) + ..("P:[solars.len]") + +/datum/controller/subsystem/sun/fire() + angle = (360 + angle + rate * 6) % 360 // increase/decrease the angle to the sun, adjusted by the rate + + // now calculate and cache the (dx,dy) increments for line drawing + var/s = sin(angle) + var/c = cos(angle) + + // Either "abs(s) < abs(c)" or "abs(s) >= abs(c)" + // In both cases, the greater is greater than 0, so, no "if 0" check is needed for the divisions + + if(abs(s) < abs(c)) + dx = s / abs(c) + dy = c / abs(c) + else + dx = s / abs(s) + dy = c / abs(s) + + //now tell the solar control computers to update their status and linked devices + for(var/obj/machinery/power/solar_control/SC in solars) + if(!SC.powernet) + solars.Remove(SC) + continue + SC.update() \ No newline at end of file diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm index bad73292c82..73104f212ff 100644 --- a/code/controllers/verbs.dm +++ b/code/controllers/verbs.dm @@ -49,7 +49,7 @@ debug_variables(job_master) feedback_add_details("admin_verb","DJobs") if("Sun") - debug_variables(sun) + debug_variables(SSsun) feedback_add_details("admin_verb","DSun") if("Radio") debug_variables(radio_controller) @@ -70,10 +70,10 @@ debug_variables(alarm_manager) feedback_add_details("admin_verb", "DAlarm") if("Garbage") - debug_variables(garbageCollector) + debug_variables(SSgarbage) feedback_add_details("admin_verb","DGarbage") if("Nano") - debug_variables(nanomanager) + debug_variables(SSnanoui) feedback_add_details("admin_verb","DNano") if("Vote") debug_variables(vote) diff --git a/code/controllers/voting.dm b/code/controllers/voting.dm index 55abf2834f1..a8890186bae 100644 --- a/code/controllers/voting.dm +++ b/code/controllers/voting.dm @@ -20,9 +20,9 @@ var/global/list/round_voters = list() //Keeps track of the individuals voting fo qdel(vote) vote = src spawn(0) - while(!gcDestroyed) + while(!QDELETED(src)) try - while(!gcDestroyed) + while(!QDELETED(src)) sleep(10) process() catch(var/exception/e) diff --git a/code/datums/action.dm b/code/datums/action.dm index e12bd371a6d..4ee33474049 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -101,7 +101,7 @@ //Presets for item actions /datum/action/item_action check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUNNED|AB_CHECK_LYING|AB_CHECK_CONSCIOUS - + var/use_itemicon = TRUE /datum/action/item_action/New(Target) ..() var/obj/item/I = target @@ -121,17 +121,19 @@ return 1 /datum/action/item_action/ApplyIcon(obj/screen/movable/action_button/current_button) - current_button.overlays.Cut() - if(target) - var/obj/item/I = target - var/old_layer = I.layer - var/old_plane = I.plane - I.layer = 21 - I.plane = HUD_PLANE - current_button.overlays += I - I.layer = old_layer - I.plane = old_plane - + if(use_itemicon) + current_button.overlays.Cut() + if(target) + var/obj/item/I = target + var/old_layer = I.layer + var/old_plane = I.plane + I.layer = 21 + I.plane = HUD_PLANE + current_button.overlays += I + I.layer = old_layer + I.plane = old_plane + else + ..() /datum/action/item_action/toggle_light name = "Toggle Light" diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 558f6407528..96c663fb703 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -468,137 +468,142 @@ var/record_id_num = 1001 var/icon/clothes_s = null - switch(H.mind.assigned_role) - if("Head of Personnel") - clothes_s = new /icon('icons/mob/uniform.dmi', "hop_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) - if("Nanotrasen Representative") - clothes_s = new /icon('icons/mob/uniform.dmi', "officer_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "laceups"), ICON_UNDERLAY) - if("Blueshield") - clothes_s = new /icon('icons/mob/uniform.dmi', "officer_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/hands.dmi', "swat_gl"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "blueshield"), ICON_OVERLAY) - if("Magistrate") - clothes_s = new /icon('icons/mob/uniform.dmi', "really_black_suit_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "laceups"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "judge"), ICON_OVERLAY) - if("Bartender") - clothes_s = new /icon('icons/mob/uniform.dmi', "ba_suit_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - if("Botanist") - clothes_s = new /icon('icons/mob/uniform.dmi', "hydroponics_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - if("Chef") - clothes_s = new /icon('icons/mob/uniform.dmi', "chef_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - if("Janitor") - clothes_s = new /icon('icons/mob/uniform.dmi', "janitor_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - if("Librarian") - clothes_s = new /icon('icons/mob/uniform.dmi', "red_suit_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - if("Quartermaster") - clothes_s = new /icon('icons/mob/uniform.dmi', "qm_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) - if("Cargo Technician") - clothes_s = new /icon('icons/mob/uniform.dmi', "cargotech_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - if("Shaft Miner") - clothes_s = new /icon('icons/mob/uniform.dmi', "miner_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - if("Lawyer") - clothes_s = new /icon('icons/mob/uniform.dmi', "internalaffairs_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) - if("Chaplain") - clothes_s = new /icon('icons/mob/uniform.dmi', "chapblack_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - if("Research Director") - clothes_s = new /icon('icons/mob/uniform.dmi', "director_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY) - if("Scientist") - clothes_s = new /icon('icons/mob/uniform.dmi', "toxinswhite_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY) - if("Chemist") - clothes_s = new /icon('icons/mob/uniform.dmi', "chemistrywhite_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_chem_open"), ICON_OVERLAY) - if("Chief Medical Officer") - clothes_s = new /icon('icons/mob/uniform.dmi', "cmo_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_cmo_open"), ICON_OVERLAY) - if("Medical Doctor") - clothes_s = new /icon('icons/mob/uniform.dmi', "medical_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY) - if("Geneticist") - clothes_s = new /icon('icons/mob/uniform.dmi', "geneticswhite_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_gen_open"), ICON_OVERLAY) - if("Virologist") - clothes_s = new /icon('icons/mob/uniform.dmi', "virologywhite_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_vir_open"), ICON_OVERLAY) - if("Psychiatrist") - clothes_s = new /icon('icons/mob/uniform.dmi', "psych_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "laceups"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_UNDERLAY) - if("Paramedic") - clothes_s = new /icon('icons/mob/uniform.dmi', "paramedic_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - if("Captain") - clothes_s = new /icon('icons/mob/uniform.dmi', "captain_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) - if("Head of Security") - clothes_s = new /icon('icons/mob/uniform.dmi', "hosred_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY) - if("Warden") - clothes_s = new /icon('icons/mob/uniform.dmi', "warden_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY) - if("Detective") - clothes_s = new /icon('icons/mob/uniform.dmi', "detective_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "detective"), ICON_OVERLAY) - if("Security Pod Pilot") - clothes_s = new /icon('icons/mob/uniform.dmi', "secred_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "bomber"), ICON_OVERLAY) - if("Brig Physician") - clothes_s = new /icon('icons/mob/uniform.dmi', "medical_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "fr_jacket_open"), ICON_OVERLAY) - if("Security Officer") - clothes_s = new /icon('icons/mob/uniform.dmi', "secred_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY) - if("Chief Engineer") - clothes_s = new /icon('icons/mob/uniform.dmi', "chief_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY) - if("Station Engineer") - clothes_s = new /icon('icons/mob/uniform.dmi', "engine_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "orange"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY) - if("Life Support Specialist") - clothes_s = new /icon('icons/mob/uniform.dmi', "atmos_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY) - if("Mechanic") - clothes_s = new /icon('icons/mob/uniform.dmi', "mechanic_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "orange"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY) - if("Roboticist") - clothes_s = new /icon('icons/mob/uniform.dmi', "robotics_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY) - else if(H.mind.assigned_role in get_all_centcom_jobs()) - clothes_s = new /icon('icons/mob/uniform.dmi', "officer_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "laceups"), ICON_UNDERLAY) - else - clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s") - clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + if(H.mind) + switch(H.mind.assigned_role) + if("Head of Personnel") + clothes_s = new /icon('icons/mob/uniform.dmi', "hop_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) + if("Nanotrasen Representative") + clothes_s = new /icon('icons/mob/uniform.dmi', "officer_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "laceups"), ICON_UNDERLAY) + if("Blueshield") + clothes_s = new /icon('icons/mob/uniform.dmi', "officer_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY) + clothes_s.Blend(new /icon('icons/mob/hands.dmi', "swat_gl"), ICON_UNDERLAY) + clothes_s.Blend(new /icon('icons/mob/suit.dmi', "blueshield"), ICON_OVERLAY) + if("Magistrate") + clothes_s = new /icon('icons/mob/uniform.dmi', "really_black_suit_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "laceups"), ICON_UNDERLAY) + clothes_s.Blend(new /icon('icons/mob/suit.dmi', "judge"), ICON_OVERLAY) + if("Bartender") + clothes_s = new /icon('icons/mob/uniform.dmi', "ba_suit_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + if("Botanist") + clothes_s = new /icon('icons/mob/uniform.dmi', "hydroponics_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + if("Chef") + clothes_s = new /icon('icons/mob/uniform.dmi', "chef_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + if("Janitor") + clothes_s = new /icon('icons/mob/uniform.dmi', "janitor_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + if("Librarian") + clothes_s = new /icon('icons/mob/uniform.dmi', "red_suit_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + if("Quartermaster") + clothes_s = new /icon('icons/mob/uniform.dmi', "qm_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) + if("Cargo Technician") + clothes_s = new /icon('icons/mob/uniform.dmi', "cargotech_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + if("Shaft Miner") + clothes_s = new /icon('icons/mob/uniform.dmi', "miner_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + if("Lawyer") + clothes_s = new /icon('icons/mob/uniform.dmi', "internalaffairs_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) + if("Chaplain") + clothes_s = new /icon('icons/mob/uniform.dmi', "chapblack_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + if("Research Director") + clothes_s = new /icon('icons/mob/uniform.dmi', "director_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) + clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY) + if("Scientist") + clothes_s = new /icon('icons/mob/uniform.dmi', "toxinswhite_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) + clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY) + if("Chemist") + clothes_s = new /icon('icons/mob/uniform.dmi', "chemistrywhite_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) + clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_chem_open"), ICON_OVERLAY) + if("Chief Medical Officer") + clothes_s = new /icon('icons/mob/uniform.dmi', "cmo_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) + clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_cmo_open"), ICON_OVERLAY) + if("Medical Doctor") + clothes_s = new /icon('icons/mob/uniform.dmi', "medical_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) + clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY) + if("Geneticist") + clothes_s = new /icon('icons/mob/uniform.dmi', "geneticswhite_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) + clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_gen_open"), ICON_OVERLAY) + if("Virologist") + clothes_s = new /icon('icons/mob/uniform.dmi', "virologywhite_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) + clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_vir_open"), ICON_OVERLAY) + if("Psychiatrist") + clothes_s = new /icon('icons/mob/uniform.dmi', "psych_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "laceups"), ICON_UNDERLAY) + clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_UNDERLAY) + if("Paramedic") + clothes_s = new /icon('icons/mob/uniform.dmi', "paramedic_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + if("Captain") + clothes_s = new /icon('icons/mob/uniform.dmi', "captain_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) + if("Head of Security") + clothes_s = new /icon('icons/mob/uniform.dmi', "hosred_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY) + if("Warden") + clothes_s = new /icon('icons/mob/uniform.dmi', "warden_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY) + if("Detective") + clothes_s = new /icon('icons/mob/uniform.dmi', "detective_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) + clothes_s.Blend(new /icon('icons/mob/suit.dmi', "detective"), ICON_OVERLAY) + if("Security Pod Pilot") + clothes_s = new /icon('icons/mob/uniform.dmi', "secred_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY) + clothes_s.Blend(new /icon('icons/mob/suit.dmi', "bomber"), ICON_OVERLAY) + if("Brig Physician") + clothes_s = new /icon('icons/mob/uniform.dmi', "medical_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) + clothes_s.Blend(new /icon('icons/mob/suit.dmi', "fr_jacket_open"), ICON_OVERLAY) + if("Security Officer") + clothes_s = new /icon('icons/mob/uniform.dmi', "secred_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY) + if("Chief Engineer") + clothes_s = new /icon('icons/mob/uniform.dmi', "chief_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) + clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY) + if("Station Engineer") + clothes_s = new /icon('icons/mob/uniform.dmi', "engine_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "orange"), ICON_UNDERLAY) + clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY) + if("Life Support Specialist") + clothes_s = new /icon('icons/mob/uniform.dmi', "atmos_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY) + if("Mechanic") + clothes_s = new /icon('icons/mob/uniform.dmi', "mechanic_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "orange"), ICON_UNDERLAY) + clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY) + if("Roboticist") + clothes_s = new /icon('icons/mob/uniform.dmi', "robotics_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY) + else if(H.mind.assigned_role in get_all_centcom_jobs()) + clothes_s = new /icon('icons/mob/uniform.dmi', "officer_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "laceups"), ICON_UNDERLAY) + else + clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + else + clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s") + clothes_s.Blend(new /icon('icons/mob/feet.dmi', "black"), ICON_UNDERLAY) + preview_icon.Blend(face_s, ICON_OVERLAY) // Why do we do this twice if(clothes_s) diff --git a/code/datums/datum.dm b/code/datums/datum.dm new file mode 100644 index 00000000000..68745b4dda1 --- /dev/null +++ b/code/datums/datum.dm @@ -0,0 +1,18 @@ +/datum + var/gc_destroyed //Time when this object was destroyed. + + var/var_edited = FALSE //Warranty void if seal is broken + + var/tmp/unique_datum_id = null + +#ifdef TESTING + var/running_find_references + var/last_find_references = 0 +#endif + +// Default implementation of clean-up code. +// This should be overridden to remove all references pointing to the object being destroyed. +// Return the appropriate QDEL_HINT; in most cases this is QDEL_HINT_QUEUE. +/datum/proc/Destroy(force = FALSE, ...) + tag = null + return QDEL_HINT_QUEUE \ No newline at end of file diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index 120b36ae4dc..8e86a4eb5ed 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -1,8 +1,5 @@ // reference: /client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0) -/datum - var/var_edited = FALSE //Warranty void if seal is broken - /datum/proc/can_vv_get(var_name) return TRUE diff --git a/code/datums/diseases/kingstons.dm b/code/datums/diseases/kingstons.dm new file mode 100644 index 00000000000..abad7dcf720 --- /dev/null +++ b/code/datums/diseases/kingstons.dm @@ -0,0 +1,95 @@ +/datum/disease/kingstons + name = "Kingstons Syndrome" + max_stages = 4 + spread_text = "Airborne" + cure_text = "Milk" + cures = list("milk") + cure_chance = 50 + agent = "Nya Virus" + viable_mobtypes = list(/mob/living/carbon/human) + permeability_mod = 0.75 + desc = "If left untreated the subject will turn into a feline. In felines it has... OTHER... effects." + severity = DANGEROUS + +/datum/disease/kingstons/stage_act() + ..() + switch(stage) + if(1) + if(prob(10)) + if(affected_mob.get_species() == "Tajaran") + to_chat(affected_mob, "You feel good.") + else + to_chat(affected_mob, "You feel like playing with string.") + if(2) + if(prob(10)) + if(affected_mob.get_species() == "Tajaran") + to_chat(affected_mob, "Something in your throat itches.") + else + to_chat(affected_mob, "You NEED to find a mouse.") + if(3) + if(prob(10)) + if(affected_mob.get_species() == "Tajaran") + to_chat(affected_mob, "You feel something in your throat!") + affected_mob.emote("cough") + else + affected_mob.say(pick(list("Mew", "Meow!", "Nya!~"))) + if(4) + if(prob(5)) + if(affected_mob.get_species() == "Tajaran") + affected_mob.visible_message("[affected_mob] coughs up a hairball!", \ + "You cough up a hairball!") + affected_mob.Stun(5) + else + affected_mob.visible_message("[affected_mob]'s form contorts into something more feline!", \ + "YOU TURN INTO A TAJARAN!") + var/mob/living/carbon/human/catface = affected_mob + catface.set_species("Tajaran") + + +/datum/disease/kingstons/advanced + name = "Advanced Kingstons Syndrome" + spread_text = "Airborne" + cure_text = "Plasma" + cures = list("plasma") + cure_chance = 50 + agent = "AMB45DR Bacteria" + viable_mobtypes = list(/mob/living/carbon/human) + permeability_mod = 0.75 + desc = "If left untreated the subject will mutate to a different species." + severity = BIOHAZARD + var/list/virspecies = list("Human", "Tajaran", "Unathi", "Skrell", "Vulpkanin")//no karma races sorrys. + var/list/virsuffix = list("pox", "rot", "flu", "cough", "-gitis", "cold", "rash", "itch", "decay") + var/chosentype + var/chosensuff + +/datum/disease/kingstons/advanced/New() + chosentype = pick(virspecies) + chosensuff = pick(virsuffix) + + name = "[chosentype] [chosensuff]" + +/datum/disease/kingstons/advanced/stage_act() + ..() + switch(stage) + if(1) + if(prob(10)) + to_chat(affected_mob, "You feel awkward.") + if(2) + if(prob(10)) + to_chat(affected_mob, "You itch.") + if(3) + if(prob(10)) + to_chat(affected_mob, "Your skin starts to flake!") + + if(4) + if(prob(5)) + if(affected_mob.get_species() != chosentype) + affected_mob.visible_message("[affected_mob]'s skin splits and form contorts!", \ + "Your body mutates into a [chosentype]!") + var/mob/living/carbon/human/twisted = affected_mob + twisted.set_species(chosentype) + else + affected_mob.visible_message("[affected_mob] scratches at thier skin!", \ + "You scratch your skin to try not to itch!") + affected_mob.adjustBruteLoss(-5) + affected_mob.adjustStaminaLoss(5) \ No newline at end of file diff --git a/code/datums/diseases/lycancoughy.dm b/code/datums/diseases/lycancoughy.dm new file mode 100644 index 00000000000..2c5a8752cbb --- /dev/null +++ b/code/datums/diseases/lycancoughy.dm @@ -0,0 +1,45 @@ +/datum/disease/lycan + name = "Lycancoughy" + form = "Infection" + max_stages = 4 + spread_text = "On contact" + spread_flags = CONTACT_GENERAL + cure_text = "Ethanol" + cures = list("ethanol") + agent = "Excess Snuggles" + viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/human/monkey) + desc = "If left untreated subject will regurgitate... puppies." + severity = MEDIUM + +/datum/disease/lycan/stage_act() + ..() + switch(stage) + if(2) //also changes say, see say.dm + if(prob(5)) + to_chat(affected_mob, "You itch.") + affected_mob.emote("cough") + if(3) + if(prob(10)) + to_chat(affected_mob, "You hear faint barking.") + if(prob(5)) + to_chat(affected_mob, "You crave meat.") + affected_mob.emote("cough") + if(prob(2)) + to_chat(affected_mob, "Your stomach growls!") + if(4) + if(prob(10)) + to_chat(affected_mob, "Your stomach barks?!") + if(prob(5)) + affected_mob.visible_message("[affected_mob] howls!", \ + "You howl!") + affected_mob.AdjustConfused(rand(6, 8)) + if(prob(3)) + var/list/puppytype = list(/mob/living/simple_animal/pet/corgi/puppy, /mob/living/simple_animal/pet/pug, /mob/living/simple_animal/pet/fox) + var/mob/living/puppypicked = pick(puppytype) + affected_mob.visible_message("[affected_mob] coughs up [initial(puppypicked.name)]!", \ + "You cough up [initial(puppypicked.name)]?!") + affected_mob.emote("cough") + affected_mob.adjustBruteLoss(5) + new puppypicked(affected_mob.loc) + new puppypicked(affected_mob.loc) + return diff --git a/code/datums/diseases/pierrot_throat.dm b/code/datums/diseases/pierrot_throat.dm index 2bf0ca308a8..f2f9e1371b1 100644 --- a/code/datums/diseases/pierrot_throat.dm +++ b/code/datums/diseases/pierrot_throat.dm @@ -26,3 +26,38 @@ if(4) if(prob(5)) affected_mob.say( pick( list("HONK!", "Honk!", "Honk.", "Honk?", "Honk!!", "Honk?!", "Honk...") ) ) + + +/datum/disease/pierrot_throat/advanced + name = "Advanced Pierrot's Throat" + spread_text = "Airborne" + cure_text = "Banana products, especially banana bread." + cures = list("banana") + cure_chance = 75 + agent = "H0NI<42.B4n4 Virus" + viable_mobtypes = list(/mob/living/carbon/human) + permeability_mod = 0.75 + desc = "If left untreated the subject will probably drive others to insanity and go insane themselves." + severity = DANGEROUS + +/datum/disease/pierrot_throat/advanced/stage_act() + ..() + switch(stage) + if(1) + if(prob(10)) + to_chat(affected_mob, "You feel very silly.") + if(prob(5)) + to_chat(affected_mob, "You feel like making a joke.") + if(2) + if(prob(10)) + to_chat(affected_mob, "You don't just start seeing rainbows... YOU ARE RAINBOWS!") + if(3) + if(prob(10)) + to_chat(affected_mob, "Your thoughts are interrupted by a loud HONK!") + affected_mob << 'sound/items/AirHorn.ogg' + if(4) + if(prob(5)) + affected_mob.say( pick( list("HONK!", "Honk!", "Honk.", "Honk?", "Honk!!", "Honk?!", "Honk...") ) ) + + if(!istype(affected_mob.wear_mask, /obj/item/clothing/mask/gas/virusclown_hat)) + affected_mob.equip_to_slot(new /obj/item/clothing/mask/gas/virusclown_hat(src), slot_wear_mask) \ No newline at end of file diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 3e1c3207a87..50679c408b0 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -89,7 +89,7 @@ current.mind = null leave_all_huds() //leave all the huds in the old body, so it won't get huds if somebody else enters it - nanomanager.user_transferred(current, new_character) + SSnanoui.user_transferred(current, new_character) if(new_character.mind) //remove any mind currently in our new body's mind variable new_character.mind.current = null @@ -805,8 +805,8 @@ if(!(src in ticker.mode.cult)) ticker.mode.add_cultist(src) special_role = SPECIAL_ROLE_CULTIST - to_chat(current, "You catch a glimpse of the Realm of [ticker.mode.cultdat.entity_name], [ticker.mode.cultdat.entity_title3]. You now see how flimsy the world is, you see that it should be open to the knowledge of [ticker.mode.cultdat.entity_name].") - to_chat(current, "Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve [ticker.mode.cultdat.entity_title2] above all else. Bring It back.") + to_chat(current, "You catch a glimpse of the Realm of [ticker.cultdat.entity_name], [ticker.cultdat.entity_title3]. You now see how flimsy the world is, you see that it should be open to the knowledge of [ticker.cultdat.entity_name].") + to_chat(current, "Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve [ticker.cultdat.entity_title2] above all else. Bring It back.") log_admin("[key_name(usr)] has culted [key_name(current)]") message_admins("[key_name_admin(usr)] has culted [key_name_admin(current)]") if("tome") @@ -1330,13 +1330,13 @@ ticker.mode.cult += src ticker.mode.update_cult_icons_added(src) special_role = SPECIAL_ROLE_CULTIST - to_chat(current, "You catch a glimpse of the Realm of [ticker.mode.cultdat.entity_name], [ticker.mode.cultdat.entity_title2]. You now see how flimsy the world is, you see that it should be open to the knowledge of [ticker.mode.cultdat.entity_name].") + to_chat(current, "You catch a glimpse of the Realm of [ticker.cultdat.entity_name], [ticker.cultdat.entity_title2]. You now see how flimsy the world is, you see that it should be open to the knowledge of [ticker.cultdat.entity_name].") to_chat(current, "Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.") var/datum/game_mode/cult/cult = ticker.mode if(GAMEMODE_IS_CULT) cult.memorize_cult_objectives(src) else - var/explanation = "Summon [ticker.mode.cultdat.entity_name] via the use of the appropriate rune. It will only work if nine cultists stand on and around it." + var/explanation = "Summon [ticker.cultdat.entity_name] via the use of the appropriate rune. It will only work if nine cultists stand on and around it." to_chat(current, "Objective #1: [explanation]") current.memory += "Objective #1: [explanation]
" diff --git a/code/datums/mixed.dm b/code/datums/mixed.dm index 391b7090ad4..a40a9f9a34d 100644 --- a/code/datums/mixed.dm +++ b/code/datums/mixed.dm @@ -22,8 +22,15 @@ var/list/fields = list( ) /datum/data/record/Destroy() - ..() - return QDEL_HINT_HARDDEL_NOW + if(src in data_core.medical) + data_core.medical -= src + if(src in data_core.security) + data_core.security -= src + if(src in data_core.general) + data_core.general -= src + if(src in data_core.locked) + data_core.locked -= src + return ..() /datum/data/text name = "text" diff --git a/code/datums/outfits/outfit.dm b/code/datums/outfits/outfit.dm index 9517ee09ef8..2d67a5d71dd 100644 --- a/code/datums/outfits/outfit.dm +++ b/code/datums/outfits/outfit.dm @@ -22,6 +22,8 @@ var/pda = null var/internals_slot = null //ID of slot containing a gas tank var/list/backpack_contents = list() // In the list(path=count,otherpath=count) format + var/list/implants = null + var/list/cybernetic_implants = null /datum/outfit/proc/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) @@ -89,6 +91,13 @@ var/number = backpack_contents[path] for(var/i = 0, i < number, i++) equip_item(H, path, slot_in_backpack) + if(implants) + for(var/path in implants) + var/obj/item/weapon/implant/I = new path(H) + I.implant(H) + for(var/path in cybernetic_implants) + var/obj/item/organ/internal/O = new path(H) + O.insert(H) post_equip(H, visualsOnly) diff --git a/code/datums/outfits/outfit_admin.dm b/code/datums/outfits/outfit_admin.dm index 5212570223f..ae98f702ac1 100644 --- a/code/datums/outfits/outfit_admin.dm +++ b/code/datums/outfits/outfit_admin.dm @@ -1,6 +1,13 @@ // Used for 'select equipment' // code/modules/admin/verbs/debug.dm 566 +/datum/outfit/admin/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) + . = ..() + if(!visualsOnly) + H.mind.assigned_role = name + H.job = name + + /proc/apply_to_card(obj/item/weapon/card/id/I, mob/living/carbon/human/H, list/access = list(), rank, special_icon) if(!istype(I) || !istype(H)) return 0 @@ -95,6 +102,7 @@ mask = /obj/item/clothing/mask/gas/syndicate l_ear = /obj/item/device/radio/headset/syndicate/alt glasses = /obj/item/clothing/glasses/night + shoes = /obj/item/clothing/shoes/magboots/syndie l_pocket = /obj/item/weapon/pinpointer/advpinpointer l_hand = /obj/item/weapon/tank/jetpack/oxygen/harness @@ -107,6 +115,7 @@ /obj/item/weapon/grenade/plastic/c4 = 1, /obj/item/weapon/reagent_containers/food/snacks/syndidonkpocket = 1, /obj/item/device/flashlight = 1, + /obj/item/clothing/shoes/combat = 1 ) /datum/outfit/admin/syndicate/operative/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) @@ -131,15 +140,21 @@ /datum/outfit/admin/syndicate/officer name = "Syndicate Officer" + head = /obj/item/clothing/head/beret + mask = /obj/item/clothing/mask/cigarette/cigar/havana belt = /obj/item/weapon/gun/projectile/automatic/pistol/deagle/camo l_ear = /obj/item/device/radio/headset/syndicate/alt l_pocket = /obj/item/weapon/pinpointer/advpinpointer backpack_contents = list( /obj/item/weapon/storage/box/engineer = 1, + /obj/item/device/flashlight = 1, /obj/item/weapon/reagent_containers/food/pill/initropidril = 1, /obj/item/weapon/reagent_containers/food/snacks/syndidonkpocket = 1, - /obj/item/ammo_box/magazine/m50 = 2) + /obj/item/ammo_box/magazine/m50 = 2, + /obj/item/clothing/shoes/magboots/syndie/advance = 1, + /obj/item/weapon/lighter/zippo/gonzofist = 1 + ) id_icon = "commander" id_access = "Syndicate Operative Leader" @@ -152,22 +167,11 @@ var/obj/item/weapon/implant/uplink/U = new /obj/item/weapon/implant/uplink(H) U.implant(H) - U.hidden_uplink.uses = 500//a measly 1000 TC along with the uplink in the pocket + U.hidden_uplink.uses = 500 var/obj/item/weapon/implant/dust/D = new(H) D.implant(H) -/datum/outfit/admin/syndicate/bomber - name = "Syndicate Bomber" - - backpack_contents = list( - /obj/item/weapon/storage/box/engineer = 1, - /obj/item/device/flashlight = 1, - /obj/item/weapon/card/emag = 1, - /obj/item/device/radio/beacon/syndicate/bomb = 2, - /obj/item/device/syndicatedetonator = 1, - /obj/item/weapon/reagent_containers/food/snacks/syndidonkpocket = 1 - ) /datum/outfit/admin/nt_vip name = "VIP Guest" @@ -193,114 +197,6 @@ if(istype(I)) apply_to_card(I, H, get_centcom_access("VIP Guest"), "VIP Guest") -/datum/outfit/admin/nt_navy_officer - name = "NT Navy Officer" - - uniform = /obj/item/clothing/under/rank/centcom/officer - back = /obj/item/weapon/storage/backpack/satchel - belt = /obj/item/weapon/gun/energy/pulse/pistol - gloves = /obj/item/clothing/gloves/color/white - shoes = /obj/item/clothing/shoes/centcom - head = /obj/item/clothing/head/beret/centcom/officer - l_ear = /obj/item/device/radio/headset/centcom - glasses = /obj/item/clothing/glasses/hud/security/sunglasses - id = /obj/item/weapon/card/id/centcom - pda = /obj/item/device/pda/centcom - backpack_contents = list( - /obj/item/weapon/storage/box/engineer = 1, - /obj/item/weapon/implanter/dust = 1, - /obj/item/weapon/implanter/death_alarm = 1 - ) - -/datum/outfit/admin/nt_navy_officer/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - . = ..() - if(visualsOnly) - return - - var/obj/item/weapon/card/id/I = H.wear_id - if(istype(I)) - apply_to_card(I, H, get_centcom_access("Nanotrasen Navy Officer"), "Nanotrasen Navy Officer") - - var/obj/item/weapon/implant/L = new /obj/item/weapon/implant/mindshield(H) - L.implant(H) - - -/datum/outfit/admin/nt_special_ops_officer - name = "NT Special Ops Officer" - - uniform = /obj/item/clothing/under/syndicate/combat - suit = /obj/item/clothing/suit/space/deathsquad/officer - back = /obj/item/weapon/storage/backpack/security - belt = /obj/item/weapon/gun/energy/pulse/pistol/m1911 - gloves = /obj/item/clothing/gloves/combat - shoes = /obj/item/clothing/shoes/combat - head = /obj/item/clothing/head/helmet/space/deathsquad/beret - mask = /obj/item/clothing/mask/cigarette/cigar/cohiba - l_ear = /obj/item/device/radio/headset/centcom - glasses = /obj/item/clothing/glasses/thermal/cyber - id = /obj/item/weapon/card/id/centcom - r_pocket = /obj/item/weapon/storage/box/matches - pda = /obj/item/device/pda/centcom - backpack_contents = list( - /obj/item/weapon/storage/box/engineer = 1, - /obj/item/weapon/tank/emergency_oxygen/double/full = 1, - /obj/item/weapon/implanter/dust = 1, - /obj/item/weapon/implanter/death_alarm = 1, - /obj/item/weapon/twohanded/dualsaber/red = 1, - /obj/item/weapon/pinpointer/advpinpointer = 1, - /obj/item/weapon/reagent_containers/hypospray/combat/nanites = 1, - /obj/item/weapon/storage/box/zipties = 1, - /obj/item/clothing/shoes/magboots/advance = 1, - /obj/item/weapon/implanter/mindshield = 1, - ) - -/datum/outfit/admin/nt_special_ops_officer/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - . = ..() - if(visualsOnly) - return - - var/obj/item/weapon/card/id/I = H.wear_id - if(istype(I)) - apply_to_card(I, H, get_centcom_access("Special Operations Officer"), "Special Operations Officer") - -/datum/outfit/admin/nt_special_ops_formal - name = "NT Special Ops Formal" - - uniform = /obj/item/clothing/under/rank/centcom/captain - back = /obj/item/weapon/storage/backpack/satchel - belt = /obj/item/weapon/gun/energy/pulse/pistol/m1911 - gloves = /obj/item/clothing/gloves/combat - shoes = /obj/item/clothing/shoes/combat - head = /obj/item/clothing/head/helmet/space/deathsquad/beret - mask = /obj/item/clothing/mask/cigarette/cigar/cohiba - l_ear = /obj/item/device/radio/headset/centcom - glasses = /obj/item/clothing/glasses/thermal/cyber - id = /obj/item/weapon/card/id/centcom - r_pocket = /obj/item/weapon/storage/box/matches - pda = /obj/item/device/pda/centcom - backpack_contents = list( - /obj/item/weapon/storage/box/engineer = 1, - /obj/item/weapon/melee/classic_baton/telescopic = 1, - /obj/item/weapon/implanter/dust = 1, - /obj/item/weapon/implanter/death_alarm = 1 - ) - -/datum/outfit/admin/nt_special_ops_formal/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - . = ..() - if(visualsOnly) - return - - var/obj/item/device/pda/PDA = H.wear_pda - if(istype(PDA)) - PDA.owner = H.real_name - PDA.ownjob = "Special Operations Officer" - PDA.icon_state = "pda-syndi" - PDA.name = "PDA-[H.real_name] ([PDA.ownjob])" - PDA.desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a special edition designed for military field work." - - var/obj/item/weapon/card/id/I = H.wear_id - if(istype(I)) - apply_to_card(I, H, get_centcom_access("Special Operations Officer"), "Special Operations Officer") /datum/outfit/admin/nt_navy_captain name = "NT Navy Captain" @@ -316,10 +212,13 @@ id = /obj/item/weapon/card/id/centcom pda = /obj/item/device/pda/centcom backpack_contents = list( - /obj/item/weapon/storage/box/engineer = 1, - /obj/item/weapon/implanter/dust = 1, + /obj/item/weapon/storage/box/centcomofficer = 1, /obj/item/weapon/implanter/death_alarm = 1 ) + implants = list( + /obj/item/weapon/implant/mindshield, + /obj/item/weapon/implant/dust + ) /datum/outfit/admin/nt_navy_captain/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) . = ..() @@ -330,9 +229,6 @@ if(istype(I)) apply_to_card(I, H, get_centcom_access("Nanotrasen Navy Captain"), "Nanotrasen Navy Captain") - var/obj/item/weapon/implant/L = new /obj/item/weapon/implant/mindshield(H) - L.implant(H) - /datum/outfit/admin/nt_diplomat name = "NT Diplomat" @@ -347,9 +243,12 @@ pda = /obj/item/device/pda/centcom backpack_contents = list( /obj/item/weapon/storage/box/survival = 1, - /obj/item/weapon/implanter/dust = 1, /obj/item/weapon/implanter/death_alarm = 1, ) + implants = list( + /obj/item/weapon/implant/mindshield, + /obj/item/weapon/implant/dust + ) /datum/outfit/admin/nt_diplomat/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) . = ..() @@ -360,6 +259,57 @@ if(istype(I)) apply_to_card(I, H, get_centcom_access("Nanotrasen Navy Representative"), "Nanotrasen Diplomat") + +/datum/outfit/admin/nt_undercover + name = "NT Undercover Operative" + // Disguised NT special forces, sent to quietly eliminate mutinous people in high positions (e.g: captain) + + uniform = /obj/item/clothing/under/chameleon + back = /obj/item/weapon/storage/backpack + belt = /obj/item/weapon/storage/belt/utility/full/multitool + gloves = /obj/item/clothing/gloves/combat + shoes = /obj/item/clothing/shoes/syndigaloshes + l_ear = /obj/item/device/radio/headset/heads/captain + id = /obj/item/weapon/card/id/syndicate + pda = /obj/item/device/pda + backpack_contents = list( + /obj/item/weapon/storage/box/engineer = 1, + /obj/item/device/flashlight = 1, + /obj/item/weapon/gun/projectile/automatic/proto = 1, // NT saber SMG + /obj/item/weapon/suppressor = 1, // silencer for SMG + /obj/item/ammo_box/magazine/smgm9mm = 3, // SMG ammo + /obj/item/weapon/door_remote/omni = 1, + /obj/item/weapon/implanter/mindshield = 1, // not implanted by default, as that would make them suspicious + /obj/item/weapon/implanter/storage = 1 // do not auto-implant this, that causes a bug + ) + implants = list( + /obj/item/weapon/implant/dust + ) + cybernetic_implants = list( + /obj/item/organ/internal/cyberimp/eyes/hud/security, + /obj/item/organ/internal/cyberimp/eyes/xray, + /obj/item/organ/internal/cyberimp/brain/anti_drop, + /obj/item/organ/internal/cyberimp/brain/anti_stun, + /obj/item/organ/internal/cyberimp/chest/nutriment/plus + ) + +/datum/outfit/admin/nt_undercover/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) + . = ..() + if(visualsOnly) + return + + var/obj/item/weapon/card/id/I = H.wear_id + if(istype(I)) + apply_to_card(I, H, get_all_accesses(), "Civilian") + I.icon_state = "deathsquad" + + + var/obj/item/device/radio/R = H.l_ear + if(istype(R)) + R.name = "radio headset" + R.icon_state = "headset" + + /datum/outfit/admin/death_commando name = "NT Death Commando" @@ -485,12 +435,10 @@ backpack_contents = list( /obj/item/weapon/storage/box/survival = 1, /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing = 1, - /obj/item/weapon/storage/box/syndie_kit/caneshotgun = 1, /obj/item/toy/crayon/mime = 1, - /obj/item/weapon/gun/projectile/automatic/pistol = 1, - /obj/item/weapon/suppressor = 1, + /obj/item/weapon/storage/box/syndie_kit/caneshotgun = 1, /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath = 2, - /obj/item/weapon/pen/sleepy = 1, + /obj/item/device/radio/uplink = 1, /obj/item/weapon/reagent_containers/food/snacks/syndidonkpocket = 1, /obj/item/device/flashlight = 1 ) @@ -701,7 +649,9 @@ backpack_contents = list( /obj/item/weapon/storage/box/survival = 1, /obj/item/weapon/kitchen/knife/combat = 1, - /obj/item/ammo_box/magazine/m556 = 3) + /obj/item/ammo_box/magazine/m556 = 3, + /obj/item/clothing/shoes/magboots = 1 + ) /datum/outfit/admin/solgov/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) @@ -725,7 +675,9 @@ /obj/item/weapon/storage/box/survival = 1, /obj/item/weapon/kitchen/knife/combat = 1, /obj/item/weapon/melee/classic_baton/telescopic = 1, - /obj/item/ammo_box/magazine/m50 = 2) + /obj/item/ammo_box/magazine/m50 = 2, + /obj/item/clothing/shoes/magboots/advance = 1 + ) /datum/outfit/admin/chrono name = "Chrono Legionnaire" @@ -734,7 +686,7 @@ suit = /obj/item/clothing/suit/space/chronos back = /obj/item/weapon/chrono_eraser gloves = /obj/item/clothing/gloves/combat - shoes = /obj/item/clothing/shoes/combat + shoes = /obj/item/clothing/shoes/magboots/advance head = /obj/item/clothing/head/helmet/space/chronos mask = /obj/item/clothing/mask/gas/syndicate glasses = /obj/item/clothing/glasses/night @@ -756,7 +708,7 @@ uniform = /obj/item/clothing/under/color/grey suit = /obj/item/clothing/suit/space back = /obj/item/weapon/tank/jetpack/oxygen - shoes = /obj/item/clothing/shoes/black + shoes = /obj/item/clothing/shoes/magboots head = /obj/item/clothing/head/helmet/space mask = /obj/item/clothing/mask/breath l_ear = /obj/item/device/radio/headset @@ -779,6 +731,7 @@ /datum/outfit/admin/hardsuit back = /obj/item/weapon/tank/jetpack/oxygen mask = /obj/item/clothing/mask/breath + shoes = /obj/item/clothing/shoes/magboots id = /obj/item/weapon/card/id /datum/outfit/admin/hardsuit/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) @@ -804,6 +757,7 @@ name = "CE Hardsuit" suit = /obj/item/clothing/suit/space/hardsuit/elite head = /obj/item/clothing/head/helmet/space/hardsuit/elite + shoes = /obj/item/clothing/shoes/magboots/advance /datum/outfit/admin/hardsuit/mining name = "Mining Hardsuit" @@ -814,11 +768,13 @@ name = "Syndi Hardsuit" suit = /obj/item/clothing/suit/space/hardsuit/syndi head = /obj/item/clothing/head/helmet/space/hardsuit/syndi + shoes = /obj/item/clothing/shoes/magboots/syndie /datum/outfit/admin/hardsuit/wizard name = "Wizard Hardsuit" suit = /obj/item/clothing/suit/space/hardsuit/wizard head = /obj/item/clothing/head/helmet/space/hardsuit/wizard + shoes = /obj/item/clothing/shoes/magboots /datum/outfit/admin/hardsuit/medical name = "Medical Hardsuit" @@ -996,15 +952,15 @@ /obj/item/weapon/storage/box/survival = 1, /obj/item/device/flashlight = 1 ) + implants = list( + /obj/item/weapon/implant/dust + ) /datum/outfit/admin/assassin/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) . = ..() if(visualsOnly) return - var/obj/item/weapon/implant/dust/D = new /obj/item/weapon/implant/dust(H) - D.implant(H) - var/obj/item/device/pda/PDA = H.wear_pda if(istype(PDA)) PDA.owner = H.real_name @@ -1034,7 +990,10 @@ /obj/item/weapon/suppressor = 1, /obj/item/weapon/card/emag = 1, /obj/item/device/flashlight = 1, - /obj/item/weapon/implanter/storage = 1 + /obj/item/weapon/implanter/storage = 1 // do not auto-implant this, that causes a bug + ) + implants = list( + /obj/item/weapon/implant/dust ) /datum/outfit/admin/spy/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) @@ -1046,9 +1005,6 @@ if(istype(G)) G.name = "black gloves" - var/obj/item/weapon/implant/dust/D = new /obj/item/weapon/implant/dust(H) - D.implant(H) - var/obj/item/device/pda/PDA = H.wear_pda if(istype(PDA)) PDA.owner = H.real_name @@ -1089,6 +1045,7 @@ if(istype(I)) apply_to_card(I, H, get_all_accesses(), "Dark Lord", "syndie") + /datum/outfit/admin/wizard uniform = /obj/item/clothing/under/color/lightpurple suit = /obj/item/clothing/suit/wizrobe @@ -1130,6 +1087,36 @@ shoes = /obj/item/clothing/shoes/sandal/marisa head = /obj/item/clothing/head/wizard/marisa +/datum/outfit/admin/wizard/arch + name = "Arch Wizard" + + suit = /obj/item/clothing/suit/wizrobe/magusred + head = /obj/item/clothing/head/wizard/magus + belt = /obj/item/weapon/storage/belt/wands/full + l_hand = null + backpack_contents = list( + /obj/item/weapon/storage/box/engineer = 1, + /obj/item/clothing/suit/space/hardsuit/wizard = 1, + /obj/item/clothing/head/helmet/space/hardsuit/wizard = 1, + /obj/item/clothing/shoes/magboots = 1, + /obj/item/weapon/kitchen/knife/ritual = 1, + /obj/item/clothing/suit/wizrobe/red = 1, + /obj/item/clothing/head/wizard/red = 1 + ) + +/datum/outfit/admin/wizard/arch/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) + . = ..() + if(visualsOnly) + return + var/obj/item/weapon/spellbook/B = H.r_hand + if(istype(B)) + B.owner = H // force-bind it so it can never be stolen, no matter what. + B.name = "Archwizard Spellbook" + B.uses = 50 + var/obj/item/weapon/card/id/I = H.wear_id + if(istype(I)) + apply_to_card(I, H, get_all_accesses(), "Arch Wizard") + /datum/outfit/admin/dark_priest name = "Dark Priest" @@ -1147,6 +1134,9 @@ /obj/item/weapon/storage/box/survival = 1, /obj/item/device/flashlight = 1, ) + implants = list( + /obj/item/weapon/implant/dust + ) /datum/outfit/admin/dark_priest/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) . = ..() @@ -1163,5 +1153,3 @@ var/obj/item/device/radio/headset/R = H.l_ear if(istype(R)) R.flags |= NODROP - var/obj/item/weapon/implant/dust/D = new /obj/item/weapon/implant/dust(H) - D.implant(H) \ No newline at end of file diff --git a/code/datums/spells/ethereal_jaunt.dm b/code/datums/spells/ethereal_jaunt.dm index d855f6a3092..43c3d3a61cd 100644 --- a/code/datums/spells/ethereal_jaunt.dm +++ b/code/datums/spells/ethereal_jaunt.dm @@ -54,7 +54,7 @@ target.setDir(holder.dir) sleep(jaunt_in_time) qdel(holder) - if(!qdeleted(target)) + if(!QDELETED(target)) if(mobloc.density) for(var/direction in alldirs) var/turf/T = get_step(mobloc, direction) diff --git a/code/datums/spells/lichdom.dm b/code/datums/spells/lichdom.dm index bda640f80a1..84c3a552c03 100644 --- a/code/datums/spells/lichdom.dm +++ b/code/datums/spells/lichdom.dm @@ -28,7 +28,7 @@ config.continuous_rounds = 0 return ..() -/obj/effect/proc_holder/spell/targeted/lichdom/cast(list/targets,mob/user = usr) +/obj/effect/proc_holder/spell/targeted/lichdom/cast(list/targets,mob/user = usr) if(!config.continuous_rounds) existence_stops_round_end = 1 config.continuous_rounds = 1 @@ -49,7 +49,7 @@ charge_counter = charge_max return - if(!marked_item || qdeleted(marked_item)) //Wait nevermind + if(!marked_item || QDELETED(marked_item)) //Wait nevermind to_chat(M, "Your phylactery is gone!") return diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 15d78f37276..1feea397ac0 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -388,6 +388,15 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containertype = /obj/structure/closet/crate/secure/plasma containername = "energy gun crate" +/datum/supply_packs/security/armory/epistol // costs 3/5ths of the normal e-guns for 3/4ths the total ammo, making it cheaper to arm more people, but less convient for any one person + name = "Energy Pistol Crate" + contains = list(/obj/item/weapon/gun/energy/gun/mini, + /obj/item/weapon/gun/energy/gun/mini, + /obj/item/weapon/gun/energy/gun/mini) + cost = 15 + containertype = /obj/structure/closet/crate/secure/plasma + containername = "energy gun crate" + /datum/supply_packs/security/armory/eweapons name = "Incendiary Weapons Crate" contains = list(/obj/item/weapon/flamethrower/full, diff --git a/code/datums/wires/autolathe.dm b/code/datums/wires/autolathe.dm index 644a472acf3..a901695c880 100644 --- a/code/datums/wires/autolathe.dm +++ b/code/datums/wires/autolathe.dm @@ -10,10 +10,10 @@ var/const/AUTOLATHE_DISABLE_WIRE = 4 switch(index) if(AUTOLATHE_HACK_WIRE) return "Hack" - + if(AUTOLATHE_SHOCK_WIRE) return "Shock" - + if(AUTOLATHE_DISABLE_WIRE) return "Disable" @@ -69,6 +69,6 @@ var/const/AUTOLATHE_DISABLE_WIRE = 4 updateUIs() /datum/wires/autolathe/proc/updateUIs() - nanomanager.update_uis(src) + SSnanoui.update_uis(src) if(holder) - nanomanager.update_uis(holder) \ No newline at end of file + SSnanoui.update_uis(holder) \ No newline at end of file diff --git a/code/datums/wires/nuclearbomb.dm b/code/datums/wires/nuclearbomb.dm index 2034c59576b..5b704a4526b 100644 --- a/code/datums/wires/nuclearbomb.dm +++ b/code/datums/wires/nuclearbomb.dm @@ -11,12 +11,12 @@ var/const/NUCLEARBOMB_WIRE_SAFETY = 4 switch(index) if(NUCLEARBOMB_WIRE_LIGHT) return "Bomb Light" - + if(NUCLEARBOMB_WIRE_TIMING) return "Bomb Timing" - + if(NUCLEARBOMB_WIRE_SAFETY) - return "Bomb Safety" + return "Bomb Safety" /datum/wires/nuclearbomb/CanUse(mob/living/L) var/obj/machinery/nuclearbomb/N = holder @@ -77,6 +77,6 @@ var/const/NUCLEARBOMB_WIRE_SAFETY = 4 N.lighthack = !N.lighthack /datum/wires/nuclearbomb/proc/updateUIs() - nanomanager.update_uis(src) + SSnanoui.update_uis(src) if(holder) - nanomanager.update_uis(holder) \ No newline at end of file + SSnanoui.update_uis(holder) \ No newline at end of file diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm index b192045d29d..2b86f1247f6 100644 --- a/code/datums/wires/wires.dm +++ b/code/datums/wires/wires.dm @@ -76,7 +76,7 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown", ui_interact(user) /datum/wires/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "wires.tmpl", holder.name, window_x, window_y) ui.open() @@ -174,7 +174,7 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown", else to_chat(L, "You need a remote signaller!") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 // @@ -184,12 +184,12 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown", // Called when wires cut/mended. /datum/wires/proc/UpdateCut(index, mended) if(holder) - nanomanager.update_uis(holder) + SSnanoui.update_uis(holder) // Called when wire pulsed. Add code here. /datum/wires/proc/UpdatePulsed(index) if(holder) - nanomanager.update_uis(holder) + SSnanoui.update_uis(holder) /datum/wires/proc/CanUse(mob/L) return 1 diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index b473b830e39..83880039a73 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -53,15 +53,15 @@ return cameras -/area/proc/atmosalert(danger_level, var/alarm_source) +/area/proc/atmosalert(danger_level, var/alarm_source, var/force = FALSE) if(danger_level == ATMOS_ALARM_NONE) atmosphere_alarm.clearAlarm(src, alarm_source) else atmosphere_alarm.triggerAlarm(src, alarm_source, severity = danger_level) - //Check all the alarms before lowering atmosalm. Raising is perfectly fine. + //Check all the alarms before lowering atmosalm. Raising is perfectly fine. If force = 1 we don't care. for(var/obj/machinery/alarm/AA in src) - if(!(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted && AA.report_danger_level) + if(!(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted && AA.report_danger_level && !force) danger_level = max(danger_level, AA.danger_level) if(danger_level != atmosalm) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 6ca5047ac6c..3fdc402bb8a 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -144,7 +144,7 @@ if(throwing) throwing.hit_atom(A) . = 1 - if(!A || qdeleted(A)) + if(!A || QDELETED(A)) return A.Bumped(src) @@ -224,7 +224,7 @@ //called when src is thrown into hit_atom /atom/movable/proc/throw_impact(atom/hit_atom, throwingdatum) set waitfor = 0 - if(exists(hit_atom)) + if(!QDELETED(hit_atom)) return hit_atom.hitby(src) /atom/movable/hitby(atom/movable/AM, skipcatch, hitpush = 1, blocked) diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 43054c24923..391b8fa8ee8 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -371,7 +371,7 @@ I.forceMove(src) src.disk = I to_chat(user, "You insert [I].") - nanomanager.update_uis(src) // update all UIs attached to src() + SSnanoui.update_uis(src) // update all UIs attached to src() return else ..() @@ -469,7 +469,7 @@ return // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm @@ -580,7 +580,7 @@ irradiating = src.radiation_duration var/lock_state = src.connected.locked src.connected.locked = 1//lock it - nanomanager.update_uis(src) // update all UIs attached to src + SSnanoui.update_uis(src) // update all UIs attached to src sleep(10*src.radiation_duration) // sleep for radiation_duration seconds @@ -685,7 +685,7 @@ irradiating = src.radiation_duration var/lock_state = src.connected.locked src.connected.locked = 1//lock it - nanomanager.update_uis(src) // update all UIs attached to src + SSnanoui.update_uis(src) // update all UIs attached to src sleep(10*src.radiation_duration) // sleep for radiation_duration seconds @@ -753,7 +753,7 @@ irradiating = src.radiation_duration var/lock_state = src.connected.locked src.connected.locked = 1 //lock it - nanomanager.update_uis(src) // update all UIs attached to src + SSnanoui.update_uis(src) // update all UIs attached to src sleep(10*src.radiation_duration) // sleep for radiation_duration seconds @@ -888,7 +888,7 @@ irradiating = 2 var/lock_state = src.connected.locked src.connected.locked = 1//lock it - nanomanager.update_uis(src) // update all UIs attached to src + SSnanoui.update_uis(src) // update all UIs attached to src sleep(2 SECONDS) diff --git a/code/game/gamemodes/changeling/powers/mutations.dm b/code/game/gamemodes/changeling/powers/mutations.dm index fc00cfff19c..0b36449c54a 100644 --- a/code/game/gamemodes/changeling/powers/mutations.dm +++ b/code/game/gamemodes/changeling/powers/mutations.dm @@ -125,7 +125,7 @@ icon = 'icons/obj/weapons.dmi' icon_state = "arm_blade" item_state = "arm_blade" - flags = ABSTRACT | NODROP + flags = ABSTRACT | NODROP | DROPDEL w_class = WEIGHT_CLASS_HUGE sharp = 1 force = 25 @@ -140,7 +140,7 @@ /obj/item/weapon/melee/arm_blade/dropped(mob/user) user.visible_message("With a sickening crunch, [user] reforms his blade into an arm!", "We assimilate the blade back into our body.", "You prepare to extend a tentacle.") -/obj/item/weapon/gun/magic/tentacle/dropped() - . = ..() - qdel(src) - /obj/item/weapon/gun/magic/tentacle/shoot_with_empty_chamber(mob/living/user as mob|obj) to_chat(user, "The [name] is not ready yet.") @@ -377,7 +373,7 @@ /obj/item/weapon/shield/changeling name = "shield-like mass" desc = "A mass of tough, boney tissue. You can still see the fingers as a twisted pattern in the shield." - flags = NODROP + flags = NODROP | DROPDEL icon = 'icons/obj/weapons.dmi' icon_state = "ling_shield" block_chance = 50 @@ -389,9 +385,6 @@ if(ismob(loc)) loc.visible_message("The end of [loc.name]\'s hand inflates rapidly, forming a huge shield-like mass!", "We inflate our hand into a strong shield.", "You hear organic matter ripping and tearing!") -/obj/item/weapon/shield/changeling/dropped() - qdel(src) - /obj/item/weapon/shield/changeling/hit_reaction() if(remaining_uses < 1) if(ishuman(loc)) @@ -429,7 +422,7 @@ name = "flesh mass" icon_state = "lingspacesuit" desc = "A huge, bulky mass of pressure and temperature-resistant organic tissue, evolved to facilitate space travel." - flags = STOPSPRESSUREDMAGE | NODROP + flags = STOPSPRESSUREDMAGE | NODROP | DROPDEL allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank/emergency_oxygen, /obj/item/weapon/tank/oxygen) armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) //No armor at all. @@ -439,9 +432,6 @@ loc.visible_message("[loc.name]\'s flesh rapidly inflates, forming a bloated mass around their body!", "We inflate our flesh, creating a spaceproof suit!", "You hear organic matter ripping and tearing!") processing_objects += src -/obj/item/clothing/suit/space/changeling/dropped() - qdel(src) - /obj/item/clothing/suit/space/changeling/process() if(ishuman(loc)) var/mob/living/carbon/human/H = loc @@ -451,12 +441,9 @@ name = "flesh mass" icon_state = "lingspacehelmet" desc = "A covering of pressure and temperature-resistant organic tissue with a glass-like chitin front." - flags = BLOCKHAIR | STOPSPRESSUREDMAGE | NODROP + flags = BLOCKHAIR | STOPSPRESSUREDMAGE | NODROP | DROPDEL armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) -/obj/item/clothing/head/helmet/space/changeling/dropped() - qdel(src) - /***************************************\ |*****************ARMOR*****************| @@ -481,7 +468,7 @@ name = "chitinous mass" desc = "A tough, hard covering of black chitin." icon_state = "lingarmor" - flags = NODROP + flags = NODROP | DROPDEL body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS armor = list(melee = 40, bullet = 40, laser = 40, energy = 20, bomb = 10, bio = 4, rad = 0) flags_inv = HIDEJUMPSUIT @@ -495,16 +482,10 @@ if(ismob(loc)) loc.visible_message("[loc.name]\'s flesh turns black, quickly transforming into a hard, chitinous mass!", "We harden our flesh, creating a suit of armor!", "You hear organic matter ripping and tearing!") -/obj/item/clothing/suit/armor/changeling/dropped() - qdel(src) - /obj/item/clothing/head/helmet/changeling name = "chitinous mass" desc = "A tough, hard covering of black chitin with transparent chitin in front." icon_state = "lingarmorhelmet" - flags = BLOCKHAIR | NODROP + flags = BLOCKHAIR | NODROP | DROPDEL armor = list(melee = 30, bullet = 30, laser = 40, energy = 20, bomb = 10, bio = 4, rad = 0) - flags_inv = HIDEEARS - -/obj/item/clothing/head/helmet/changeling/dropped() - qdel(src) + flags_inv = HIDEEARS \ No newline at end of file diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index 2ac7d46dfba..3cca118bf03 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -119,7 +119,7 @@ var/global/list/all_cults = list() var/datum/action/innate/cultcomm/C = new() C.Grant(cult_mind.current) update_cult_icons_added(cult_mind) - to_chat(cult_mind.current, "You catch a glimpse of the Realm of [ticker.mode.cultdat.entity_name], [ticker.mode.cultdat.entity_title3]. You now see how flimsy the world is, you see that it should be open to the knowledge of [ticker.mode.cultdat.entity_name].") + to_chat(cult_mind.current, "You catch a glimpse of the Realm of [ticker.cultdat.entity_name], [ticker.cultdat.entity_title3]. You now see how flimsy the world is, you see that it should be open to the knowledge of [ticker.cultdat.entity_name].") first_phase() @@ -133,16 +133,16 @@ var/global/list/all_cults = list() if("survive") explanation = "Our knowledge must live on. Make sure at least [acolytes_needed] acolytes escape on the shuttle to spread their work on an another station." if("convert") - explanation = "We must increase our influence before we can summon [ticker.mode.cultdat.entity_name], Convert [convert_target] crew members. Take it slowly to avoid raising suspicions." + explanation = "We must increase our influence before we can summon [ticker.cultdat.entity_name], Convert [convert_target] crew members. Take it slowly to avoid raising suspicions." if("bloodspill") - explanation = "We must prepare this place for [ticker.mode.cultdat.entity_title1]'s coming. Spill blood and gibs over [spilltarget] floor tiles." + explanation = "We must prepare this place for [ticker.cultdat.entity_title1]'s coming. Spill blood and gibs over [spilltarget] floor tiles." if("sacrifice") if(sacrifice_target) explanation = "Sacrifice [sacrifice_target.current.real_name], the [sacrifice_target.assigned_role]. You will need the sacrifice rune and three acolytes to do so." else explanation = "Free objective." if("eldergod") - explanation = "Summon [ticker.mode.cultdat.entity_name] by invoking the 'Tear Reality' rune.The summoning can only be accomplished in [english_list(summon_spots)] - where the veil is weak enough for the ritual to begin." + explanation = "Summon [ticker.cultdat.entity_name] by invoking the 'Tear Reality' rune.The summoning can only be accomplished in [english_list(summon_spots)] - where the veil is weak enough for the ritual to begin." to_chat(cult_mind.current, "Objective #[obj_count]: [explanation]") cult_mind.memory += "Objective #[obj_count]: [explanation]
" @@ -308,10 +308,10 @@ var/global/list/all_cults = list() feedback_add_details("cult_objective","cult_sacrifice|FAIL|GIBBED") if("eldergod") if(!eldergod) - explanation = "Summon [ticker.mode.cultdat.entity_name]. Success!" + explanation = "Summon [ticker.cultdat.entity_name]. Success!" feedback_add_details("cult_objective","cult_narsie|SUCCESS") else - explanation = "Summon [ticker.mode.cultdat.entity_name]. Fail." + explanation = "Summon [ticker.cultdat.entity_name]. Fail." feedback_add_details("cult_objective","cult_narsie|FAIL") if("slaughter") if(demons_summoned) @@ -339,10 +339,10 @@ var/global/list/all_cults = list() if("harvest") if(harvested > harvest_target) - explanation = "Offer [harvest_target] humans for [ticker.mode.cultdat.entity_name]'s first meal of the day. ([harvested] sacrificed) Success!" + explanation = "Offer [harvest_target] humans for [ticker.cultdat.entity_name]'s first meal of the day. ([harvested] sacrificed) Success!" feedback_add_details("cult_objective","cult_harvest|SUCCESS") else - explanation = "Offer [harvest_target] humans for [ticker.mode.cultdat.entity_name]'s first meal of the day. ([harvested] sacrificed) Fail!" + explanation = "Offer [harvest_target] humans for [ticker.cultdat.entity_name]'s first meal of the day. ([harvested] sacrificed) Fail!" feedback_add_details("cult_objective","cult_harvest|FAIL") if("hijack") diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index 00592b7812d..057de105c41 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -361,32 +361,16 @@ /obj/item/weapon/melee/cultblade/ghost name = "eldritch sword" force = 15 - flags = NODROP - -/obj/item/weapon/melee/cultblade/ghost/dropped(mob/living/carbon/human/user) - ..() - qdel(src) + flags = NODROP | DROPDEL /obj/item/clothing/head/culthood/alt/ghost - flags = NODROP - -/obj/item/clothing/head/culthood/alt/ghost/dropped(mob/living/carbon/human/user) - ..() - qdel(src) + flags = NODROP | DROPDEL /obj/item/clothing/suit/cultrobes/alt/ghost - flags = NODROP - -/obj/item/clothing/suit/cultrobes/alt/ghost/dropped(mob/living/carbon/human/user) - ..() - qdel(src) + flags = NODROP | DROPDEL /obj/item/clothing/shoes/cult/ghost - flags = NODROP - -/obj/item/clothing/shoes/cult/ghost/dropped(mob/living/carbon/human/user) - ..() - qdel(src) + flags = NODROP | DROPDEL /datum/outfit/ghost_cultist name = "Cultist Ghost" diff --git a/code/game/gamemodes/cult/cult_objectives.dm b/code/game/gamemodes/cult/cult_objectives.dm index d489387ad76..5ddc8ccdf98 100644 --- a/code/game/gamemodes/cult/cult_objectives.dm +++ b/code/game/gamemodes/cult/cult_objectives.dm @@ -19,10 +19,10 @@ switch(new_objective) if("convert") - explanation = "We must increase our influence before we can summon [ticker.mode.cultdat.entity_name], Convert [convert_target] crew members. Take it slowly to avoid raising suspicions." + explanation = "We must increase our influence before we can summon [ticker.cultdat.entity_name], Convert [convert_target] crew members. Take it slowly to avoid raising suspicions." if("bloodspill") spilltarget = 100 + rand(0,player_list.len * 3) - explanation = "We must prepare this place for [ticker.mode.cultdat.entity_title1]'s coming. Spill blood and gibs over [spilltarget] floor tiles." + explanation = "We must prepare this place for [ticker.cultdat.entity_title1]'s coming. Spill blood and gibs over [spilltarget] floor tiles." if("sacrifice") explanation = "We need to sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role], for their blood is the key that will lead our master to this realm. You will need 3 cultists around a Sacrifice rune to perform the ritual." @@ -59,8 +59,8 @@ message_admins("The Cult has already completed [prenarsie_objectives] objectives! Nar-Sie objective unlocked.") log_admin("The Cult has already completed [prenarsie_objectives] objectives! Nar-Sie objective unlocked.") else - message_admins("There are less than 4 cultists! [ticker.mode.cultdat.entity_name] objective unlocked.") - log_admin("There are less than 4 cultists! [ticker.mode.cultdat.entity_name] objective unlocked.") + message_admins("There are less than 4 cultists! [ticker.cultdat.entity_name] objective unlocked.") + log_admin("There are less than 4 cultists! [ticker.cultdat.entity_name] objective unlocked.") gtfo_phase() if(!sacrificed.len && (new_objective != "sacrifice")) @@ -76,10 +76,10 @@ switch(new_objective) if("convert") - explanation = "We must increase our influence before we can summon [ticker.mode.cultdat.entity_name]. Convert [convert_target] crew members. Take it slowly to avoid raising suspicions." + explanation = "We must increase our influence before we can summon [ticker.cultdat.entity_name]. Convert [convert_target] crew members. Take it slowly to avoid raising suspicions." if("bloodspill") spilltarget = 100 + rand(0,player_list.len * 3) - explanation = "We must prepare this place for [ticker.mode.cultdat.entity_title1]'s coming. Spread blood and gibs over [spilltarget] of the Station's floor tiles." + explanation = "We must prepare this place for [ticker.cultdat.entity_title1]'s coming. Spread blood and gibs over [spilltarget] of the Station's floor tiles." if("sacrifice") explanation = "We need to sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role], for their blood is the key that will lead our master to this realm. You will need 3 cultists around a Sacrifice rune to perform the ritual." @@ -111,7 +111,7 @@ if(prob(40))//split the chance of this objectives += "eldergod" - explanation = "Summon [ticker.mode.cultdat.entity_name] on the Station via the use of the Tear Reality rune. The veil is weak enough in [english_list(summon_spots)] for the ritual to begin." + explanation = "Summon [ticker.cultdat.entity_name] on the Station via the use of the Tear Reality rune. The veil is weak enough in [english_list(summon_spots)] for the ritual to begin." else objectives += "slaughter" explanation = "Bring the Slaughter via the rune 'Bring forth the slaughter'. The veil is weak enough in [english_list(summon_spots)] for the ritual to begin." @@ -135,11 +135,11 @@ switch(last_objective) if("harvest") - explanation = "[ticker.mode.cultdat.entity_title1] hungers for their first meal of this never-ending day. Offer them [harvest_target] humans in sacrifice." + explanation = "[ticker.cultdat.entity_title1] hungers for their first meal of this never-ending day. Offer them [harvest_target] humans in sacrifice." if("hijack") - explanation = "[ticker.mode.cultdat.entity_name] wishes for their troops to start the assault on Centcom immediately. Hijack the escape shuttle and don't let a single non-cultist board it." + explanation = "[ticker.cultdat.entity_name] wishes for their troops to start the assault on Centcom immediately. Hijack the escape shuttle and don't let a single non-cultist board it." if("massacre") - explanation = "[ticker.mode.cultdat.entity_name] wants to watch you as you massacre the remaining humans on the station (until less than [massacre_target] humans are left alive)." + explanation = "[ticker.cultdat.entity_name] wants to watch you as you massacre the remaining humans on the station (until less than [massacre_target] humans are left alive)." for(var/datum/mind/cult_mind in cult) if(cult_mind) diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index e5f2ce5d4ef..5e304407302 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -98,7 +98,7 @@ return var/choice = input(user, selection_prompt, selection_title) as null|anything in choosable_items var/pickedtype = choosable_items[choice] - if(pickedtype && Adjacent(user) && src && !qdeleted(src) && !user.incapacitated() && cooldowntime <= world.time) + if(pickedtype && Adjacent(user) && src && !QDELETED(src) && !user.incapacitated() && cooldowntime <= world.time) cooldowntime = world.time + creation_delay var/obj/item/N = new pickedtype(get_turf(src)) to_chat(user, replacetext("[creation_message]", "%ITEM%", "[N]")) diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 72535d9d1e5..0e9158294f1 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -42,13 +42,13 @@ if(!ticker.mode) icon_state = "tome" else - icon_state = ticker.mode.cultdat.tome_icon + icon_state = ticker.cultdat.tome_icon ..() /obj/item/weapon/tome/examine(mob/user) ..() if(iscultist(user) || user.stat == DEAD) - to_chat(user, "The scriptures of [ticker.mode.cultdat.entity_title3]. Allows the scribing of runes and access to the knowledge archives of the cult of [ticker.mode.cultdat.entity_name].") + to_chat(user, "The scriptures of [ticker.cultdat.entity_title3]. Allows the scribing of runes and access to the knowledge archives of the cult of [ticker.cultdat.entity_name].") to_chat(user, "Striking another cultist with it will purge holy water from them.") to_chat(user, "Striking a noncultist, however, will sear their flesh.") @@ -91,7 +91,7 @@ /obj/item/weapon/tome/proc/read_tome(mob/user) var/text = list() - text += "
Archives of [ticker.mode.cultdat.entity_title1]



" + text += "
Archives of [ticker.cultdat.entity_title1]



" text += "A rune's name and effects can be revealed by examining the rune.<

" text += "Rite of Binding
This rune is one of the most important runes the cult has, being the only way to create new talismans. A blank sheet of paper must be on top of the rune. After \ @@ -102,7 +102,7 @@ text += "Rite of Enlightenment
This rune is critical to the success of the cult. It will allow you to convert normal crew members into cultists. \ To do this, simply place the crew member upon the rune and invoke it. This rune requires two invokers to use. If the target to be converted is mindshielded or a certain assignment, they will \ - be unable to be converted. People [ticker.mode.cultdat.entity_title3] wishes sacrificed will also be ineligible for conversion, and anyone with a shielding presence like the null rod will not be converted.
\ + be unable to be converted. People [ticker.cultdat.entity_title3] wishes sacrificed will also be ineligible for conversion, and anyone with a shielding presence like the null rod will not be converted.
\ Successful conversions will produce a tome for the new cultist.

" text += "Rite of Tribute
This rune is necessary to achieve your goals. Simply place any dead creature upon the rune and invoke it (this will not \ @@ -135,12 +135,12 @@ text += "Leeching
When invoked, this rune will transfer lifeforce from the victim to the invoker.

" - text += "Rite of Spectral Manifestation
This rune allows you to summon spirits as humanoid fighters. When invoked, a spirit above the rune will be brought to life as a human, wearing nothing, that seeks only to serve you and [ticker.mode.cultdat.entity_title3]. \ + text += "Rite of Spectral Manifestation
This rune allows you to summon spirits as humanoid fighters. When invoked, a spirit above the rune will be brought to life as a human, wearing nothing, that seeks only to serve you and [ticker.cultdat.entity_title3]. \ However, the spirit's link to reality is fragile - you must remain on top of the rune, and you will slowly take damage. Upon stepping off the rune, all summoned spirits will dissipate, dropping their items to the ground. You may manifest \ multiple spirits with one rune, but you will rapidly take damage in doing so.

" text += "Ritual of Dimensional Rending
This rune is necessary to achieve your goals. On attempting to scribe it, it will produce shields around you and alert everyone you are attempting to scribe it; it takes a very long time to scribe, \ - and does massive damage to the one attempting to scribe it.
Invoking it requires 9 invokers and the sacrifice of a specific crewmember, and once invoked, will summon [ticker.mode.cultdat.entity_title3], [ticker.mode.cultdat.entity_name]. \ + and does massive damage to the one attempting to scribe it.
Invoking it requires 9 invokers and the sacrifice of a specific crewmember, and once invoked, will summon [ticker.cultdat.entity_title3], [ticker.cultdat.entity_name]. \ This will complete your objectives.


" text += "Talisman of Teleportation
The talisman form of the Teleport rune will transport the invoker to a selected Teleport rune once.

" @@ -206,7 +206,7 @@ if(GAMEMODE_IS_CULT) if(!canbypass)//not an admin-tome, check things if(!cult_mode.narsie_condition_cleared) - to_chat(user, "There is still more to do before unleashing [cult_mode.cultdat.entity_name] power!") + to_chat(user, "There is still more to do before unleashing [ticker.cultdat.entity_name] power!") return 0 if(!cult_mode.eldergod) to_chat(user, "\"I am already here. There is no need to try to summon me now.\"") @@ -215,19 +215,19 @@ to_chat(user, "\"We are already here. There is no need to try to summon us now.\"") return 0 if(!((CULT_ELDERGOD in cult_mode.objectives) || (CULT_SLAUGHTER in cult_mode.objectives))) - to_chat(user, "[cult_mode.cultdat.entity_name]'s power does not wish to be unleashed!") + to_chat(user, "[ticker.cultdat.entity_name]'s power does not wish to be unleashed!") return 0 if(!(A in summon_spots)) - to_chat(user, "[cult_mode.cultdat.entity_name] can only be summoned where the veil is weak - in [english_list(summon_spots)]!") + to_chat(user, "[ticker.cultdat.entity_name] can only be summoned where the veil is weak - in [english_list(summon_spots)]!") return 0 - var/confirm_final = alert(user, "This is the FINAL step to summon your deities power, it is a long, painful ritual and the crew will be alerted to your presence", "Are you prepared for the final battle?", "My life for [cult_mode.cultdat.entity_name]!", "No") + var/confirm_final = alert(user, "This is the FINAL step to summon your deities power, it is a long, painful ritual and the crew will be alerted to your presence", "Are you prepared for the final battle?", "My life for [ticker.cultdat.entity_name]!", "No") if(confirm_final == "No" || confirm_final == null) to_chat(user, "You decide to prepare further before scribing the rune.") return 0 else return 1 else//the game mode is not cult..but we ARE a cultist...ALL ON THE ADMINBUS - var/confirm_final = alert(user, "This is the FINAL step to summon your deities power, it is a long, painful ritual and the crew will be alerted to your presence", "Are you prepared for the final battle?", "My life for [cult_mode.cultdat.entity_name]!", "No") + var/confirm_final = alert(user, "This is the FINAL step to summon your deities power, it is a long, painful ritual and the crew will be alerted to your presence", "Are you prepared for the final battle?", "My life for [ticker.cultdat.entity_name]!", "No") if(confirm_final == "No" || confirm_final == null) to_chat(user, "You decide to prepare further before scribing the rune.") return 0 @@ -252,7 +252,7 @@ if(!possible_runes.len) return entered_rune_name = input(user, "Choose a rite to scribe.", "Sigils of Power") as null|anything in possible_runes - if(!Adjacent(user) || !src || qdeleted(src) || user.incapacitated()) + if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated()) return for(var/T in typesof(/obj/effect/rune)) var/obj/effect/rune/R = T @@ -271,7 +271,7 @@ if(locate(/obj/effect/rune) in runeturf) to_chat(user, "There is already a rune here.") return - if(!Adjacent(user) || !src || qdeleted(src) || user.incapacitated()) + if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated()) return if(ispath(rune_to_scribe, /obj/effect/rune/narsie) || ispath(rune_to_scribe, /obj/effect/rune/slaughter))//may need to change this - Fethas if(finale_runes_ok(user,rune_to_scribe)) @@ -294,22 +294,22 @@ var/mob/living/carbon/human/H = user var/dam_zone = pick("head", "chest", "groin", "l_arm", "l_hand", "r_arm", "r_hand", "l_leg", "l_foot", "r_leg", "r_foot") var/obj/item/organ/external/affecting = H.get_organ(ran_zone(dam_zone)) - user.visible_message("[user] cuts open their [affecting] and begins writing in their own blood!", "You slice open your [affecting] and begin drawing a sigil of [ticker.mode.cultdat.entity_title3].") + user.visible_message("[user] cuts open their [affecting] and begins writing in their own blood!", "You slice open your [affecting] and begin drawing a sigil of [ticker.cultdat.entity_title3].") user.apply_damage(initial(rune_to_scribe.scribe_damage), BRUTE , affecting) if(!do_after(user, initial(rune_to_scribe.scribe_delay)-scribereduct, target = get_turf(user))) for(var/V in shields) var/obj/machinery/shield/S = V - if(S && !qdeleted(S)) + if(S && !QDELETED(S)) qdel(S) return if(locate(/obj/effect/rune) in runeturf) to_chat(user, "There is already a rune here.") return user.visible_message("[user] creates a strange circle in their own blood.", \ - "You finish drawing the arcane markings of [ticker.mode.cultdat.entity_title3].") + "You finish drawing the arcane markings of [ticker.cultdat.entity_title3].") for(var/V in shields) var/obj/machinery/shield/S = V - if(S && !qdeleted(S)) + if(S && !QDELETED(S)) qdel(S) var/obj/effect/rune/R = new rune_to_scribe(runeturf, chosen_keyword) R.blood_DNA = list() diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 9b94627d664..ce98bb7f241 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -194,7 +194,7 @@ structure_check() searches for nearby cultist structures required for the invoca ..() for(var/M in invokers) var/mob/living/L = M - to_chat(L, "You feel your life force draining. [ticker.mode.cultdat.entity_title3] is displeased.") + to_chat(L, "You feel your life force draining. [ticker.cultdat.entity_title3] is displeased.") qdel(src) /mob/proc/null_rod_check() //The null rod, if equipped, will protect the holder from the effects of most runes @@ -238,7 +238,7 @@ structure_check() searches for nearby cultist structures required for the invoca possible_talismans[talisman_cult_name] = J //This is to allow the menu to let cultists select talismans by name entered_talisman_name = input(user, "Choose a talisman to imbue.", "Talisman Choices") as null|anything in possible_talismans talisman_type = possible_talismans[entered_talisman_name] - if(!Adjacent(user) || !src || qdeleted(src) || user.incapacitated() || rune_in_use || !talisman_type) + if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated() || rune_in_use || !talisman_type) return ..() visible_message("Dark power begins to channel into the paper!.") @@ -303,7 +303,7 @@ var/list/teleport_runes = list() var/input_rune_key = input(user, "Choose a rune to teleport to.", "Rune to Teleport to") as null|anything in potential_runes //we know what key they picked var/obj/effect/rune/teleport/actual_selected_rune = potential_runes[input_rune_key] //what rune does that key correspond to? - if(!Adjacent(user) || !src || qdeleted(src) || user.incapacitated() || !actual_selected_rune) + if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated() || !actual_selected_rune) fail_invoke() return @@ -374,7 +374,7 @@ var/list/teleport_runes = list() new_cultist.mind.special_role = "Cultist" to_chat(new_cultist, "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible, truth. The veil of reality has been ripped away \ and something evil takes root.") - to_chat(new_cultist, "Assist your new compatriots in their dark dealings. Your goal is theirs, and theirs is yours. You serve [ticker.mode.cultdat.entity_title3] above all else. Bring it back.\ + to_chat(new_cultist, "Assist your new compatriots in their dark dealings. Your goal is theirs, and theirs is yours. You serve [ticker.cultdat.entity_title3] above all else. Bring it back.\ ") //Rite of Tribute: Sacrifices a crew member to Nar-Sie. Places them into a soul shard if they're in their body. @@ -388,7 +388,7 @@ var/list/teleport_runes = list() /obj/effect/rune/sacrifice/New() ..() - cultist_desc = "sacrifices a crew member to [ticker.mode.cultdat.entity_title3]. May place them into a soul shard if their spirit remains in their body." + cultist_desc = "sacrifices a crew member to [ticker.cultdat.entity_title3]. May place them into a soul shard if their spirit remains in their body." /obj/effect/rune/sacrifice/invoke(var/list/invokers) if(rune_in_use) @@ -406,7 +406,7 @@ var/list/teleport_runes = list() var/mob/offering if(possible_targets.len > 1) //If there's more than one target, allow choice offering = input(user, "Choose an offering to sacrifice.", "Unholy Tribute") as null|anything in possible_targets - if(!Adjacent(user) || !src || qdeleted(src) || user.incapacitated()) + if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated()) return else if(possible_targets.len) //Otherwise, if there's a target at all, pick the only one offering = possible_targets[possible_targets.len] @@ -492,8 +492,8 @@ var/list/teleport_runes = list() /obj/effect/rune/narsie/New() ..() - cultist_name = "Summon [ticker.mode.cultdat.entity_name]" - cultist_desc = "tears apart dimensional barriers, calling forth [ticker.mode.cultdat.entity_title3]. Requires 9 invokers." + cultist_name = "Summon [ticker.cultdat.entity_name]" + cultist_desc = "tears apart dimensional barriers, calling forth [ticker.cultdat.entity_title3]. Requires 9 invokers." /obj/effect/rune/narsie/check_icon() @@ -519,7 +519,7 @@ var/list/teleport_runes = list() return if(!cult_mode.eldergod) for(var/M in invokers) - to_chat(M, "[ticker.mode.cultdat.entity_name] is already on this plane!") + to_chat(M, "[ticker.cultdat.entity_name] is already on this plane!") log_game("Summon god rune failed - already summoned") return //BEGIN THE SUMMONING @@ -654,7 +654,7 @@ var/list/teleport_runes = list() log_game("Raise Dead rune failed - no catalyst corpse") return mob_to_sacrifice = input(user, "Choose a corpse to sacrifice.", "Corpse to Sacrifice") as null|anything in potential_sacrifice_mobs - if(!Adjacent(user) || !src || qdeleted(src) || user.incapacitated() || !mob_to_sacrifice || rune_in_use) + if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated() || !mob_to_sacrifice || rune_in_use) return for(var/mob/living/M in T.contents) if(M.stat == DEAD) @@ -664,7 +664,7 @@ var/list/teleport_runes = list() log_game("Raise Dead rune failed - no corpse to revive") return mob_to_revive = input(user, "Choose a corpse to revive.", "Corpse to Revive") as null|anything in potential_revive_mobs - if(!Adjacent(user) || !src || qdeleted(src) || user.incapacitated() || rune_in_use || !mob_to_revive) + if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated() || rune_in_use || !mob_to_revive) return if(!in_range(mob_to_sacrifice,src)) to_chat(user, "The sacrificial target has been moved!") @@ -857,8 +857,8 @@ var/list/teleport_runes = list() for(var/datum/mind/M in ticker.mode.cult) if(!(M.current in invokers) && M.current && M.current.stat != DEAD) cultists |= M.current - var/mob/living/cultist_to_summon = input(user, "Who do you wish to call to [src]?", "Followers of [ticker.mode.cultdat.entity_title3]") as null|anything in cultists - if(!Adjacent(user) || !src || qdeleted(src) || user.incapacitated()) + var/mob/living/cultist_to_summon = input(user, "Who do you wish to call to [src]?", "Followers of [ticker.cultdat.entity_title3]") as null|anything in cultists + if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated()) return if(!cultist_to_summon) to_chat(user, "You require a summoning target!") @@ -866,7 +866,7 @@ var/list/teleport_runes = list() log_game("Summon Cultist rune failed - no target") return if(!iscultist(cultist_to_summon)) - to_chat(user, "[cultist_to_summon] is not a follower of [ticker.mode.cultdat.entity_title3]!") + to_chat(user, "[cultist_to_summon] is not a follower of [ticker.cultdat.entity_title3]!") fail_invoke() log_game("Summon Cultist rune failed - no target") return @@ -975,7 +975,7 @@ var/list/teleport_runes = list() /obj/effect/rune/manifest/New(loc) ..() - cultist_desc = "manifests a spirit as a servant of [ticker.mode.cultdat.entity_title3]. The invoker must not move from atop the rune, and will take damage for each summoned spirit." + cultist_desc = "manifests a spirit as a servant of [ticker.cultdat.entity_title3]. The invoker must not move from atop the rune, and will take damage for each summoned spirit." notify_ghosts("Manifest rune created in [get_area(src)].", 'sound/effects/ghost2.ogg', source = src) @@ -1034,7 +1034,7 @@ var/list/teleport_runes = list() ticker.mode.add_cultist(new_human.mind, 0) summoned_guys |= new_human ghosts++ - to_chat(new_human, "You are a servant of [ticker.mode.cultdat.entity_title3]. You have been made semi-corporeal by the cult of [ticker.mode.cultdat.entity_name], and you are to serve them at all costs.") + to_chat(new_human, "You are a servant of [ticker.cultdat.entity_title3]. You have been made semi-corporeal by the cult of [ticker.cultdat.entity_name], and you are to serve them at all costs.") while(user in get_turf(src)) if(user.stat) diff --git a/code/game/gamemodes/cult/talisman.dm b/code/game/gamemodes/cult/talisman.dm index 9b0e2e9ab7e..152c5e57994 100644 --- a/code/game/gamemodes/cult/talisman.dm +++ b/code/game/gamemodes/cult/talisman.dm @@ -41,7 +41,7 @@ invocation = "Ra'sha yoka!" /obj/item/weapon/paper/talisman/malformed/invoke(mob/living/user, successfuluse = 1) - to_chat(user, "You feel a pain in your head. [ticker.mode.cultdat.entity_title3] is displeased.") + to_chat(user, "You feel a pain in your head. [ticker.cultdat.entity_title3] is displeased.") if(iscarbon(user)) var/mob/living/carbon/C = user C.apply_damage(10, BRUTE, "head") @@ -148,7 +148,7 @@ var/input_rune_key = input(user, "Choose a rune to teleport to.", "Rune to Teleport to") as null|anything in potential_runes //we know what key they picked var/obj/effect/rune/teleport/actual_selected_rune = potential_runes[input_rune_key] //what rune does that key correspond to? - if(!src || qdeleted(src) || !user || user.l_hand != src && user.r_hand != src || user.incapacitated() || !actual_selected_rune) + if(!src || QDELETED(src) || !user || user.l_hand != src && user.r_hand != src || user.incapacitated() || !actual_selected_rune) return ..(user, 0) user.visible_message("Dust flows from [user]'s hand, and they disappear in a flash of red light!", \ @@ -412,7 +412,11 @@ trashtype = /obj/item/weapon/restraints/handcuffs/energy/used origin_tech = "materials=2;magnets=5" +/obj/item/weapon/restraints/handcuffs/energy/used + desc = "energy discharge" + flags = DROPDEL + /obj/item/weapon/restraints/handcuffs/energy/cult/used/dropped(mob/user) user.visible_message("[user]'s shackles shatter in a discharge of dark magic!", \ "Your [src] shatters in a discharge of dark magic!") - qdel(src) + . = ..() \ No newline at end of file diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 42fb3105f18..76e81c234e4 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -29,7 +29,6 @@ var/ert_disabled = 0 var/uplink_welcome = "Syndicate Uplink Console:" var/uplink_uses = 20 - var/datum/cult_info/cultdat //here instead of cult for adminbus purposes var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds) var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds) @@ -164,7 +163,7 @@ T.purpose = "Payment" T.amount = pay T.date = current_date_string - T.time = worldtime2text() + T.time = station_time_timestamp() T.source_terminal = "\[CLASSIFIED\] Terminal #[rand(111,333)]" M.mind.initial_account.transaction_log.Add(T) msg += "You have been sent the $[pay], as agreed." @@ -281,10 +280,11 @@ // Get a list of all the people who want to be the antagonist for this round, except those with incompatible species for(var/mob/new_player/player in players) - if((role in player.client.prefs.be_special) && !(player.client.prefs.species in protected_species)) - player_draft_log += "[player.key] had [roletext] enabled, so we are drafting them." - candidates += player.mind - players -= player + if(!player.skip_antag) + if((role in player.client.prefs.be_special) && !(player.client.prefs.species in protected_species)) + player_draft_log += "[player.key] had [roletext] enabled, so we are drafting them." + candidates += player.mind + players -= player // If we don't have enough antags, draft people who voted for the round. if(candidates.len < recommended_enemies) @@ -374,7 +374,6 @@ /datum/game_mode/New() newscaster_announcements = pick(newscaster_standard_feeds) - cultdat = setupcult() ////////////////////////// //Reports player logouts// diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 6612f1e7192..8058ff6e5c9 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -20,6 +20,8 @@ var/round_start_time = 0 var/Bible_name // name of the bible var/Bible_deity_name + var/datum/cult_info/cultdat = null //here instead of cult for adminbus purposes + var/random_players = 0 // if set to nonzero, ALL players who latejoin or declare-ready join will have random appearances/genders var/list/syndicate_coalition = list() // list of traitor-compatible factions @@ -35,7 +37,8 @@ var/round_start_time = 0 var/obj/screen/cinematic = null //used for station explosion cinematic - var/round_end_announced = 0 // Spam Prevention. Announce round end only once. + var/round_end_announced = 0 // Spam Prevention. Announce round end only once.\ + /datum/controller/gameticker/proc/pregame() login_music = pick(\ @@ -70,6 +73,7 @@ var/round_start_time = 0 votetimer() /datum/controller/gameticker/proc/setup() + cultdat = setupcult() //Create and announce mode if(master_mode=="secret") src.hide_mode = 1 diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index e644af03f3c..8ab83c01253 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -331,7 +331,7 @@ audible_message("You hear a loud electrical buzzing sound!") to_chat(src, "Reprogramming machine behaviour...") spawn(50) - if(M && !qdeleted(M)) + if(M && !QDELETED(M)) new /mob/living/simple_animal/hostile/mimic/copy/machine(get_turf(M), M, src, 1) else to_chat(src, "Out of uses.") diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index c8bc0e1e15e..f6dc76c7b27 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -454,6 +454,7 @@ Congratulations! You are now trained for invasive xenobiology research!"} /obj/item/weapon/restraints/handcuffs/energy/used desc = "energy discharge" + flags = DROPDEL /obj/item/weapon/restraints/handcuffs/energy/used/dropped(mob/user) user.visible_message("[user]'s [src] break in a discharge of energy!", \ @@ -461,7 +462,7 @@ Congratulations! You are now trained for invasive xenobiology research!"} var/datum/effect_system/spark_spread/S = new S.set_up(4,0,user.loc) S.start() - qdel(src) + . = ..() /obj/item/weapon/abductor_baton/examine(mob/user) ..() diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm index ba7f91e2c37..5851023fce9 100644 --- a/code/game/gamemodes/miniantags/borer/borer.dm +++ b/code/game/gamemodes/miniantags/borer/borer.dm @@ -134,7 +134,7 @@ if(stat != CONSCIOUS) return var/be_borer = alert("Become a cortical borer? (Warning, You can no longer be cloned!)",,"Yes","No") - if(be_borer == "No" || !src || qdeleted(src)) + if(be_borer == "No" || !src || QDELETED(src)) return if(key) return @@ -175,7 +175,7 @@ if(!input) return - if(src && !qdeleted(src) && !qdeleted(host)) + if(src && !QDELETED(src) && !QDELETED(host)) var/say_string = (docile) ? "slurs" :"states" if(host) to_chat(host, "[truename] [say_string]: [input]") @@ -538,7 +538,7 @@ /mob/living/simple_animal/borer/proc/let_go() - if(!host || !src || qdeleted(host) || qdeleted(src)) + if(!host || !src || QDELETED(host) || QDELETED(src)) return if(!leaving) return @@ -605,7 +605,7 @@ to_chat(src, "You begin delicately adjusting your connection to the host brain...") - if(qdeleted(src) || qdeleted(host)) + if(QDELETED(src) || QDELETED(host)) return bonding = TRUE @@ -805,7 +805,7 @@ if(!candidate || !candidate.mob) return - if(!qdeleted(candidate) || !qdeleted(candidate.mob)) + if(!QDELETED(candidate) || !QDELETED(candidate.mob)) var/datum/mind/M = create_borer_mind(candidate.ckey) M.transfer_to(src) candidate.mob = src diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm index be18793554f..c3401db2a58 100644 --- a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm +++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm @@ -47,7 +47,7 @@ if(crit_fail)//in case it depowers while ghost is looking at yes/no to_chat(user, "This swarmer shell is completely depowered. You cannot activate it.") return - if(qdeleted(src)) + if(QDELETED(src)) to_chat(user, "Swarmer has been occupied by someone else.") return var/mob/living/simple_animal/hostile/swarmer/S = new /mob/living/simple_animal/hostile/swarmer(get_turf(loc)) diff --git a/code/game/gamemodes/miniantags/guardian/types/lightning.dm b/code/game/gamemodes/miniantags/guardian/types/lightning.dm index ea11fc5cfdd..3aaeebbc513 100644 --- a/code/game/gamemodes/miniantags/guardian/types/lightning.dm +++ b/code/game/gamemodes/miniantags/guardian/types/lightning.dm @@ -53,12 +53,12 @@ removechains() /mob/living/simple_animal/hostile/guardian/beam/proc/cleardeletedchains() - if(summonerchain && qdeleted(summonerchain)) + if(summonerchain && QDELETED(summonerchain)) summonerchain = null if(enemychains.len) for(var/chain in enemychains) var/datum/cd = chain - if(!chain || qdeleted(cd)) + if(!chain || QDELETED(cd)) enemychains -= chain /mob/living/simple_animal/hostile/guardian/beam/proc/shockallchains() diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index fbb7d249ba0..e3e30f51a36 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -46,7 +46,7 @@ var/bomb_set if(timeleft <= 0) spawn explode() - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return /obj/machinery/nuclearbomb/attackby(obj/item/weapon/O as obj, mob/user as mob, params) @@ -177,7 +177,7 @@ var/bomb_set return /obj/machinery/nuclearbomb/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "nuclear_bomb.tmpl", "Nuke Control Panel", 450, 550, state = physical_state) ui.open() @@ -280,11 +280,11 @@ var/bomb_set timeleft = min(max(round(src.timeleft), 120), 600) if(href_list["timer"]) if(timing == -1.0) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return if(safety) to_chat(usr, "The safety is still on.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return timing = !(timing) if(timing) @@ -314,7 +314,7 @@ var/bomb_set if(removal_stage == 5) anchored = 0 visible_message("\The [src] makes a highly unpleasant crunching noise. It looks like the anchoring bolts have been cut.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return if(!isinspace()) @@ -326,7 +326,7 @@ var/bomb_set else to_chat(usr, "There is nothing to anchor to!") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/nuclearbomb/ex_act(severity) return diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm index 7c69b02eda1..00c6bc67ee2 100644 --- a/code/game/gamemodes/setupgame.dm +++ b/code/game/gamemodes/setupgame.dm @@ -151,12 +151,12 @@ ticker.syndicate_coalition.Add(S) /proc/setupcult() - var/static/picked_cult // Only needs to get picked once + var/static/datum/cult_info/picked_cult // Only needs to get picked once if(picked_cult) return picked_cult - var/random_cult = pick(all_cults) + var/random_cult = pick(typesof(/datum/cult_info)) picked_cult = new random_cult() if(!picked_cult) diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index 439d3cb237d..76129be2d71 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -240,7 +240,7 @@ Made by Xhuis M.visible_message("[M] screams and contorts!", \ "THE LIGHT-- YOUR MIND-- BURNS--") spawn(30) - if(!M || qdeleted(M)) + if(!M || QDELETED(M)) return M.visible_message("[M] suddenly bloats and explodes!", \ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA----") diff --git a/code/game/gamemodes/vampire/vampire.dm b/code/game/gamemodes/vampire/vampire.dm index 394f7fcc7da..781d417929f 100644 --- a/code/game/gamemodes/vampire/vampire.dm +++ b/code/game/gamemodes/vampire/vampire.dm @@ -384,8 +384,8 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha var/ay = owner.y for(var/i = 1 to 20) - ax += sun.dx - ay += sun.dy + ax += SSsun.dx + ay += SSsun.dy var/turf/T = locate(round(ax, 0.5), round(ay, 0.5), owner.z) diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm index c78cc55676f..1b5921119db 100644 --- a/code/game/gamemodes/vampire/vampire_powers.dm +++ b/code/game/gamemodes/vampire/vampire_powers.dm @@ -349,6 +349,7 @@ to_chat(user, "You have successfully Enthralled [H]. If they refuse to do as you say just adminhelp.") add_logs(user, H, "vampire-thralled") + /obj/effect/proc_holder/spell/vampire/self/cloak name = "Cloak of Darkness" desc = "Toggles whether you are currently cloaking yourself in darkness." diff --git a/code/game/gamemodes/wizard/godhand.dm b/code/game/gamemodes/wizard/godhand.dm index 16f9adb8dd9..979a28379ea 100644 --- a/code/game/gamemodes/wizard/godhand.dm +++ b/code/game/gamemodes/wizard/godhand.dm @@ -7,7 +7,7 @@ icon = 'icons/obj/weapons.dmi' icon_state = "syndballoon" item_state = null - flags = ABSTRACT | NODROP + flags = ABSTRACT | NODROP | DROPDEL w_class = WEIGHT_CLASS_HUGE force = 0 throwforce = 0 @@ -32,10 +32,10 @@ attached_spell.attached_hand = null qdel(src) -/obj/item/weapon/melee/touch_attack/dropped() +/obj/item/weapon/melee/touch_attack/Destroy() if(attached_spell) attached_spell.attached_hand = null - qdel(src) + return ..() /obj/item/weapon/melee/touch_attack/disintegrate name = "disintegrating touch" diff --git a/code/game/jobs/job/central.dm b/code/game/jobs/job/central.dm index 64298b70fbe..b07b2655f28 100644 --- a/code/game/jobs/job/central.dm +++ b/code/game/jobs/job/central.dm @@ -28,16 +28,13 @@ glasses = /obj/item/clothing/glasses/hud/security/sunglasses id = /obj/item/weapon/card/id/centcom pda = /obj/item/device/pda/centcom - backpack_contents = list( - /obj/item/weapon/gun/energy/pulse/pistol = 1, - /obj/item/weapon/implanter/dust = 1, - /obj/item/weapon/implanter/death_alarm = 1 + belt = /obj/item/weapon/gun/energy/pulse/pistol + implants = list( + /obj/item/weapon/implant/mindshield, + /obj/item/weapon/implant/dust ) - - implants = list(/obj/item/weapon/implant/mindshield) - backpack = /obj/item/weapon/storage/backpack/satchel - + box = /obj/item/weapon/storage/box/centcomofficer // CC Officials who lead ERTs, Death Squads, etc. @@ -61,22 +58,33 @@ /datum/outfit/job/ntspecops name = "Special Operations Officer" jobtype = /datum/job/ntspecops - - uniform = /obj/item/clothing/under/syndicate/combat + uniform = /obj/item/clothing/under/rank/centcom_commander suit = /obj/item/clothing/suit/space/deathsquad/officer + back = /obj/item/weapon/storage/backpack/security + belt = /obj/item/weapon/gun/energy/pulse/pistol/m1911 gloves = /obj/item/clothing/gloves/combat shoes = /obj/item/clothing/shoes/combat - head = /obj/item/clothing/head/beret/centcom/officer/navy + mask = /obj/item/clothing/mask/cigarette/cigar/cohiba + head = /obj/item/clothing/head/helmet/space/deathsquad/beret l_ear = /obj/item/device/radio/headset/centcom glasses = /obj/item/clothing/glasses/hud/security/sunglasses id = /obj/item/weapon/card/id/centcom pda = /obj/item/device/pda/centcom + r_pocket = /obj/item/weapon/storage/box/matches + box = /obj/item/weapon/storage/box/centcomofficer + backpack = /obj/item/weapon/storage/backpack/satchel backpack_contents = list( - /obj/item/weapon/implanter/dust = 1, - /obj/item/weapon/gun/energy/pulse/pistol/m1911 = 1, - /obj/item/weapon/implanter/death_alarm = 1 + /obj/item/clothing/shoes/magboots/advance = 1, + /obj/item/weapon/twohanded/dualsaber/red = 1, + /obj/item/weapon/storage/box/zipties = 1 ) - - implants = list(/obj/item/weapon/implant/mindshield) - - backpack = /obj/item/weapon/storage/backpack/satchel \ No newline at end of file + implants = list( + /obj/item/weapon/implant/mindshield, + /obj/item/weapon/implant/dust + ) + cybernetic_implants = list( + /obj/item/organ/internal/cyberimp/eyes/xray, + /obj/item/organ/internal/cyberimp/brain/anti_drop, + /obj/item/organ/internal/cyberimp/brain/anti_stun, + /obj/item/organ/internal/cyberimp/chest/nutriment/plus + ) \ No newline at end of file diff --git a/code/game/jobs/job/engineering.dm b/code/game/jobs/job/engineering.dm index 477321a69ec..f573467cc41 100644 --- a/code/game/jobs/job/engineering.dm +++ b/code/game/jobs/job/engineering.dm @@ -94,7 +94,7 @@ department_head = list("Chief Engineer") selection_color = "#fff5cc" access = list(access_eva, 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_eva, access_atmospherics, access_maint_tunnels, access_external_airlocks, access_emergency_storage, access_construction, access_mineral_storeroom) + minimal_access = list(access_eva, access_atmospherics, access_maint_tunnels, access_external_airlocks, access_emergency_storage, access_construction, access_mineral_storeroom, access_tech_storage) alt_titles = list("Atmospheric Technician") minimal_player_age = 7 exp_requirements = 300 diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index cfb4e9418a9..a611735701a 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -142,8 +142,6 @@ shoes = /obj/item/clothing/shoes/black pda = /obj/item/device/pda - var/list/implants = null - var/backpack = /obj/item/weapon/storage/backpack var/satchel = /obj/item/weapon/storage/backpack/satchel_norm var/dufflebag = /obj/item/weapon/storage/backpack/duffel @@ -210,11 +208,6 @@ imprint_pda(H) - if(implants) - for(var/implant_type in implants) - var/obj/item/weapon/implant/I = new implant_type(H) - I.implant(H) - if(gear_leftovers.len) for(var/datum/gear/G in gear_leftovers) var/atom/placed_in = H.equip_or_collect(G.spawn_item(null, H.client.prefs.gear[G.display_name])) diff --git a/code/game/machinery/Freezer.dm b/code/game/machinery/Freezer.dm index d373b09edd6..55d7588c152 100644 --- a/code/game/machinery/Freezer.dm +++ b/code/game/machinery/Freezer.dm @@ -100,7 +100,7 @@ /obj/machinery/atmospherics/unary/cold_sink/freezer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm @@ -258,7 +258,7 @@ /obj/machinery/atmospherics/unary/heat_reservoir/heater/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 728575fee21..a8f79cab534 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -140,7 +140,7 @@ ui_interact(user) /obj/machinery/sleeper/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "sleeper.tmpl", "Sleeper", 550, 770) ui.open() diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 3b20943e46d..0a6ea8c784d 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -1,6 +1,4 @@ /obj/machinery/bodyscanner - var/mob/living/carbon/occupant - var/locked name = "body scanner" icon = 'icons/obj/Cryogenic2.dmi' icon_state = "bodyscanner-open" @@ -11,6 +9,16 @@ active_power_usage = 2500 light_color = "#00FF00" + var/obj/machinery/body_scanconsole/console = null + var/mob/living/carbon/occupant = null + var/locked + +/obj/machinery/bodyscanner/Destroy() + go_out() + if(console) + console.connected = null + console = null + return ..() /obj/machinery/bodyscanner/power_change() ..() @@ -207,9 +215,6 @@ return /obj/machinery/body_scanconsole - var/obj/machinery/bodyscanner/connected - var/delete - var/temphtml name = "Body Scanner Console" icon = 'icons/obj/Cryogenic2.dmi' icon_state = "bodyscannerconsole" @@ -218,6 +223,9 @@ dir = 8 idle_power_usage = 250 active_power_usage = 500 + var/obj/machinery/bodyscanner/connected = null + var/delete + var/temphtml var/printing = null var/printing_text = null var/known_implants = list(/obj/item/weapon/implant/chem, /obj/item/weapon/implant/death_alarm, /obj/item/weapon/implant/mindshield, /obj/item/weapon/implant/tracking, /obj/item/weapon/implant/health) @@ -243,6 +251,12 @@ RefreshParts() findscanner() +/obj/machinery/body_scanconsole/Destroy() + if(connected) + connected.console = null + connected = null + return ..() + /obj/machinery/body_scanconsole/ex_act(severity) switch(severity) if(1.0) @@ -269,15 +283,13 @@ return /obj/machinery/body_scanconsole/proc/findscanner() - var/obj/machinery/bodyscanner/bodyscannernew = null - // Loop through every direction for(dir in list(NORTH,EAST,SOUTH,WEST)) // Try to find a scanner in that direction var/temp = locate(/obj/machinery/bodyscanner, get_step(src, dir)) - if(!isnull(temp)) - bodyscannernew = temp - src.connected = bodyscannernew - return + if(temp) + connected = temp + connected.console = src + break /obj/machinery/body_scanconsole/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob, params) @@ -321,7 +333,7 @@ /obj/machinery/body_scanconsole/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "adv_med.tmpl", "Body Scanner", 690, 600) ui.open() @@ -474,7 +486,7 @@ var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(loc) playsound(loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, 1) P.info = "
Body Scan - [href_list["name"]]

" - P.info += "Time of scan: [worldtime2text(world.time)]

" + P.info += "Time of scan: [station_time_timestamp()]

" P.info += "[printing_text]" P.info += "

Notes:
" P.name = "Body Scan - [href_list["name"]]" diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 7694ff41ca0..c0197b136a3 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -212,6 +212,7 @@ air_alarms -= src if(radio_controller) radio_controller.remove_object(src, frequency) + radio_connection = null air_alarm_repository.update_cache(src) QDEL_NULL(wires) if(alarm_area && alarm_area.master_air_alarm == src) @@ -796,7 +797,7 @@ return thresholds /obj/machinery/alarm/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "air_alarm.tmpl", name, 570, 410, state = state) ui.open() @@ -922,7 +923,7 @@ return 1 if(href_list["atmos_reset"]) - if(alarm_area.atmosalert(ATMOS_ALARM_NONE, src)) + if(alarm_area.atmosalert(ATMOS_ALARM_NONE, src, TRUE)) apply_danger_level(ATMOS_ALARM_NONE) alarmActivated = 0 update_icon() diff --git a/code/game/machinery/atmo_control.dm b/code/game/machinery/atmo_control.dm index fcb9bd0d28e..eebf66bc447 100644 --- a/code/game/machinery/atmo_control.dm +++ b/code/game/machinery/atmo_control.dm @@ -135,7 +135,8 @@ obj/machinery/air_sensor Destroy() SSair.atmos_machinery -= src if(radio_controller) - radio_controller.remove_object(src,frequency) + radio_controller.remove_object(src, frequency) + radio_connection = null return ..() @@ -156,6 +157,12 @@ obj/machinery/air_sensor var/list/sensor_information = list() var/datum/radio_frequency/radio_connection + Destroy() + if(radio_controller) + radio_controller.remove_object(src, frequency) + radio_connection = null + return ..() + attack_hand(mob/user) if(..(user)) return diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index 00ca34e9a30..f4ae632791f 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -367,7 +367,7 @@ update_flag ..() - nanomanager.update_uis(src) // Update all NanoUIs attached to src + SSnanoui.update_uis(src) // Update all NanoUIs attached to src @@ -389,7 +389,7 @@ update_flag return // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/game/machinery/atmoalter/pump.dm b/code/game/machinery/atmoalter/pump.dm index 4fca317bf0d..fb7732018e9 100644 --- a/code/game/machinery/atmoalter/pump.dm +++ b/code/game/machinery/atmoalter/pump.dm @@ -107,7 +107,7 @@ /obj/machinery/portable_atmospherics/pump/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = physical_state) // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm index 17f671d9cc8..7ebadb0b5de 100644 --- a/code/game/machinery/atmoalter/scrubber.dm +++ b/code/game/machinery/atmoalter/scrubber.dm @@ -12,7 +12,7 @@ volume = 750 var/minrate = 0//probably useless, but whatever - var/maxrate = 10 * ONE_ATMOSPHERE + var/maxrate = 10 * ONE_ATMOSPHERE / 4 /obj/machinery/portable_atmospherics/scrubber/emp_act(severity) if(stat & (BROKEN|NOPOWER)) @@ -118,7 +118,7 @@ /obj/machinery/portable_atmospherics/scrubber/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = physical_state) // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 346949414fa..dfc983bb803 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -82,7 +82,7 @@ ui_interact(user) /obj/machinery/autolathe/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "autolathe.tmpl", name, 800, 550) ui.open() @@ -175,7 +175,7 @@ return 1 if(default_deconstruction_screwdriver(user, "autolathe_t", "autolathe", O)) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return if(exchange_parts(user, O)) @@ -239,7 +239,7 @@ use_power(max(500, inserted / 10)) qdel(O) busy = 0 - nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/autolathe/attack_ghost(mob/user) interact(user) @@ -318,7 +318,7 @@ screen = AUTOLATHE_SEARCH_MENU - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 /obj/machinery/autolathe/RefreshParts() @@ -353,7 +353,7 @@ else var/list/materials_used = list(MAT_METAL=metal_cost/coeff, MAT_GLASS=glass_cost/coeff) materials.use_amount(materials_used) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) sleep(32/coeff) if(is_stack) var/obj/item/stack/S = new D.build_path(BuildTurf) @@ -362,7 +362,7 @@ var/obj/item/new_item = new D.build_path(BuildTurf) new_item.materials[MAT_METAL] /= coeff new_item.materials[MAT_GLASS] /= coeff - nanomanager.update_uis(src) + SSnanoui.update_uis(src) desc = initial(desc) /obj/machinery/autolathe/proc/can_build(datum/design/D, multiplier = 1, custom_metal, custom_glass) diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index 80cfef47d88..91852deaf73 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -48,13 +48,14 @@ /obj/machinery/driver_button/Destroy() if(radio_controller) - radio_controller.remove_object(src,frequency) + radio_controller.remove_object(src, frequency) + radio_connection = null return ..() /obj/machinery/driver_button/attack_ai(mob/user as mob) return attack_hand(user) - + /obj/machinery/driver_button/attack_ghost(mob/user) if(user.can_advanced_admin_interact()) return attack_hand(user) @@ -167,7 +168,7 @@ /obj/machinery/ignition_switch/attack_ai(mob/user) return attack_hand(user) - + /obj/machinery/ignition_switch/attack_ghost(mob/user) if(user.can_advanced_admin_interact()) return attack_hand(user) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 61bcf2a15b8..5e03043d6c3 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -91,7 +91,7 @@ cameranet.addCamera(src) emped = 0 //Resets the consecutive EMP count spawn(100) - if(!qdeleted(src)) + if(!QDELETED(src)) cancelCameraAlarm() for(var/mob/O in mob_list) if(O.client && O.client.eye == src) @@ -275,7 +275,7 @@ change_msg = "reactivates" triggerCameraAlarm() spawn(100) - if(!qdeleted(src)) + if(!QDELETED(src)) cancelCameraAlarm() if(displaymessage) if(user) diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm index 1a53fcfa4a5..e9f36eb4eaa 100644 --- a/code/game/machinery/computer/Operating.dm +++ b/code/game/machinery/computer/Operating.dm @@ -93,7 +93,7 @@ // onclose(user, "op") /obj/machinery/computer/operating/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)//ui is mostly copy pasta from the sleeper ui - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "op_computer.tmpl", "Patient Monitor", 650, 455) ui.open() diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index bcdd075bea6..a3b9bd25815 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -33,7 +33,7 @@ to_chat(user, "You have been locked out from this console!") /obj/machinery/computer/aifixer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "ai_fixer.tmpl", "AI System Integrity Restorer", 550, 500) @@ -90,7 +90,7 @@ if(radio == 0 || radio == 1) occupant.aiRadio.disabledAi = radio - nanomanager.update_uis(src) + SSnanoui.update_uis(src) update_icon() return diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index 67a6c6801b8..9284ac7d03d 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -22,7 +22,7 @@ var/global/list/minor_air_alarms = list() ui_interact(user) /obj/machinery/computer/atmos_alert/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "atmos_alert.tmpl", src.name, 500, 500) ui.open() diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 1a90398f922..4721131f8cc 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -125,7 +125,7 @@ return access /obj/machinery/computer/security/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "sec_camera.tmpl", "Camera Console", 900, 800) @@ -211,7 +211,7 @@ network += net break - nanomanager.update_uis(src) + SSnanoui.update_uis(src) // Check if camera is accessible when jumping /obj/machinery/computer/security/proc/can_access_camera(var/obj/machinery/camera/C, var/mob/M) diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index d6792073f9d..f8c8b810e09 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -138,7 +138,7 @@ var/time_last_changed_position = 0 id_card.loc = src modify = id_card - nanomanager.update_uis(src) + SSnanoui.update_uis(src) attack_hand(user) //Check if you can't touch a job in any way whatsoever @@ -225,7 +225,7 @@ var/time_last_changed_position = 0 /obj/machinery/computer/card/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) user.set_machine(src) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "identification_computer.tmpl", src.name, 775, 700) ui.open() @@ -373,6 +373,7 @@ var/time_last_changed_position = 0 //let custom jobs function as an impromptu alt title, mainly for sechuds if(temp_t && modify) modify.assignment = temp_t + log_game("[key_name(usr)] has given \"[modify.registered_name]\" the custom job title \"[temp_t]\".") else var/list/access = list() if(is_centcom()) @@ -390,6 +391,11 @@ var/time_last_changed_position = 0 access = jobdatum.get_access() + var/jobnamedata = modify.getRankAndAssignment() + log_game("[key_name(usr)] has reassigned \"[modify.registered_name]\" from \"[jobnamedata]\" to \"[t1]\".") + if(t1 == "Civilian") + message_admins("[key_name_admin(usr)] has reassigned \"[modify.registered_name]\" from \"[jobnamedata]\" to \"[t1]\".") + modify.access = access modify.rank = t1 modify.assignment = t1 @@ -406,7 +412,7 @@ var/time_last_changed_position = 0 modify.registered_name = temp_name else visible_message("[src] buzzes rudely.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) if("account") if(is_authenticated(usr) && !target_dept) @@ -414,7 +420,7 @@ var/time_last_changed_position = 0 if((modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf))) var/account_num = text2num(href_list["account"]) modify.associated_account_number = account_num - nanomanager.update_uis(src) + SSnanoui.update_uis(src) if("mode") mode = text2num(href_list["mode_target"]) @@ -425,11 +431,11 @@ var/time_last_changed_position = 0 playsound(loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, 1) spawn(50) printing = null - nanomanager.update_uis(src) + SSnanoui.update_uis(src) var/obj/item/weapon/paper/P = new(loc) if(mode == 2) - P.name = text("crew manifest ([])", worldtime2text()) + P.name = "crew manifest ([station_time_timestamp()])" P.info = {"

Crew Manifest


[data_core ? data_core.get_manifest(0) : ""] @@ -454,6 +460,9 @@ var/time_last_changed_position = 0 if("terminate") if(is_authenticated(usr) && !target_dept) + var/jobnamedata = modify.getRankAndAssignment() + log_game("[key_name(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\".") + message_admins("[key_name_admin(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\".") modify.assignment = "Terminated" modify.access = list() callHook("terminate_employee", list(modify)) @@ -471,6 +480,10 @@ var/time_last_changed_position = 0 var/datum/job/jobdatum = new /datum/job/civilian access = jobdatum.get_access() + var/jobnamedata = modify.getRankAndAssignment() + log_game("[key_name(usr)] has demoted \"[modify.registered_name]\" the \"[jobnamedata]\" to \"Civilian (Unassigned)\".") + message_admins("[key_name_admin(usr)] has demoted \"[modify.registered_name]\" the \"[jobnamedata]\" to \"Civilian (Unassigned)\".") + modify.access = access modify.rank = "Civilian" modify.assignment = "Unassigned" @@ -493,7 +506,7 @@ var/time_last_changed_position = 0 opened_positions[edit_job_target]++ log_game("[key_name(usr)] has opened a job slot for job \"[j]\".") message_admins("[key_name_admin(usr)] has opened a job slot for job \"[j.title]\".") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) if("make_job_unavailable") // MAKE JOB POSITION UNAVAILABLE FOR LATE JOINERS @@ -513,7 +526,7 @@ var/time_last_changed_position = 0 opened_positions[edit_job_target]-- log_game("[key_name(usr)] has closed a job slot for job \"[j]\".") message_admins("[key_name_admin(usr)] has closed a job slot for job \"[j.title]\".") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) if("prioritize_job") // TOGGLE WHETHER JOB APPEARS AS PRIORITIZED IN THE LOBBY diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 1eef8430d7b..9e7daea4661 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -88,7 +88,7 @@ W.loc = src src.diskette = W to_chat(user, "You insert [W].") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return else if(istype(W, /obj/item/device/multitool)) var/obj/item/device/multitool/M = W @@ -122,7 +122,7 @@ return // Set up the Nano UI - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "cloning_console.tmpl", "Cloning Console UI", 640, 520) ui.open() @@ -204,16 +204,16 @@ scan_mob(scanner.occupant) loading = 0 - nanomanager.update_uis(src) + SSnanoui.update_uis(src) if(href_list["task"]) switch(href_list["task"]) if("autoprocess") autoprocess = 1 - nanomanager.update_uis(src) + SSnanoui.update_uis(src) if("stopautoprocess") autoprocess = 0 - nanomanager.update_uis(src) + SSnanoui.update_uis(src) //No locking an open scanner. else if((href_list["lock"]) && (!isnull(src.scanner))) @@ -257,12 +257,12 @@ if("load") if((isnull(src.diskette)) || isnull(src.diskette.buf)) src.temp = "Error: The disk's data could not be read." - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return if(isnull(src.active_record)) src.temp = "Error: No active record was found." src.menu = 1 - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return src.active_record = src.diskette.buf.copy() @@ -277,7 +277,7 @@ else if(href_list["save_disk"]) //Save to disk! if((isnull(src.diskette)) || (src.diskette.read_only) || (isnull(src.active_record))) src.temp = "Error: The data could not be saved." - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return // DNA2 makes things a little simpler. @@ -294,7 +294,7 @@ src.temp = "Save \[[href_list["save_disk"]]\] successful." else if(href_list["refresh"]) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) else if(href_list["selectpod"]) var/obj/machinery/clonepod/selected = locate(href_list["selectpod"]) @@ -346,7 +346,7 @@ scan_mode = 0 src.add_fingerprint(usr) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return /obj/machinery/computer/cloning/proc/scan_mob(mob/living/carbon/human/subject as mob, var/scan_brain = 0) @@ -358,7 +358,7 @@ return if((isnull(subject)) || (!(ishuman(subject))) || (!subject.dna) || (NO_SCAN in subject.species.species_traits)) scantemp = "Error: Unable to locate valid genetic data." - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return if(subject.get_int_organ(/obj/item/organ/internal/brain)) var/obj/item/organ/internal/brain/Brn = subject.get_int_organ(/obj/item/organ/internal/brain) @@ -366,31 +366,31 @@ var/datum/species/S = all_species[Brn.dna.species] // stepladder code wooooo if(NO_SCAN in S.species_traits) scantemp = "Error: Subject's brain is incompatible." - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return if(!subject.get_int_organ(/obj/item/organ/internal/brain)) scantemp = "Error: No signs of intelligence detected." - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return if(subject.suiciding) scantemp = "Error: Subject's brain is not responding to scanning stimuli." - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return if((!subject.ckey) || (!subject.client)) scantemp = "Error: Mental interface failure." - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return if((NOCLONE in subject.mutations) && src.scanner.scan_level < 2) scantemp = "Error: Mental interface failure." - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return if(scan_brain && !subject.get_int_organ(/obj/item/organ/internal/brain)) scantemp = "Error: No brain found." - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return if(!isnull(find_record(subject.ckey))) scantemp = "Subject already in database." - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return subject.dna.check_integrity() @@ -427,7 +427,7 @@ src.records += R scantemp = "Subject successfully scanned. " + extra_info - nanomanager.update_uis(src) + SSnanoui.update_uis(src) //Find a specific record by key. /obj/machinery/computer/cloning/proc/find_record(var/find_key) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index e46182b735e..76d583df982 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -95,14 +95,14 @@ if(istype(id)) crew_announcement.announcer = GetNameAndAssignmentFromId(id) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return if(href_list["logout"]) authenticated = COMM_AUTHENTICATION_NONE crew_announcement.announcer = "" setMenuState(usr,COMM_SCREEN_MAIN) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return if(!is_authenticated(usr)) @@ -145,11 +145,11 @@ if(is_authenticated(usr) == COMM_AUTHENTICATION_MAX) if(message_cooldown) to_chat(usr, "Please allow at least one minute to pass between announcements.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return var/input = input(usr, "Please write a message to announce to the station crew.", "Priority Announcement") if(!input || message_cooldown || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return crew_announcement.Announce(input) message_cooldown = 1 @@ -159,7 +159,7 @@ if("callshuttle") var/input = input(usr, "Please enter the reason for calling the shuttle.", "Shuttle Call Reason.","") as text|null if(!input || ..() || !is_authenticated(usr)) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return call_shuttle_proc(usr, input) @@ -170,7 +170,7 @@ if("cancelshuttle") if(isAI(usr) || isrobot(usr)) to_chat(usr, "Firewalls prevent you from recalling the shuttle.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 var/response = alert("Are you sure you wish to recall the shuttle?", "Confirm", "Yes", "No") if(response == "Yes") @@ -229,11 +229,11 @@ if(is_authenticated(usr) == COMM_AUTHENTICATION_MAX) if(centcomm_message_cooldown) to_chat(usr, "Arrays recycling. Please stand by.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return var/input = stripped_input(usr, "Please enter the reason for requesting the nuclear self-destruct codes. Misuse of the nuclear request system will not be tolerated under any circumstances. Transmission does not guarantee a response.", "Self Destruct Code Request.","") as text|null if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return Nuke_request(input, usr) to_chat(usr, "Request sent.") @@ -248,14 +248,14 @@ if(is_authenticated(usr) == COMM_AUTHENTICATION_MAX) if(centcomm_message_cooldown) to_chat(usr, "Arrays recycling. Please stand by.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") as text|null if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return Centcomm_announce(input, usr) - print_centcom_report(input, worldtime2text() +" Captain's Message") + print_centcom_report(input, station_time_timestamp() + " Captain's Message") to_chat(usr, "Message transmitted.") log_say("[key_name(usr)] has made a Centcomm announcement: [input]") centcomm_message_cooldown = 1 @@ -268,11 +268,11 @@ if((is_authenticated(usr) == COMM_AUTHENTICATION_MAX) && (src.emagged)) if(centcomm_message_cooldown) to_chat(usr, "Arrays recycling. Please stand by.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") as text|null if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return Syndicate_announce(input, usr) to_chat(usr, "Message transmitted.") @@ -313,14 +313,14 @@ atc.squelched = !atc.squelched to_chat(usr, "ATC traffic is now: [atc.squelched ? "Disabled" : "Enabled"].") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 /obj/machinery/computer/communications/emag_act(user as mob) if(!emagged) src.emagged = 1 to_chat(user, "You scramble the communication routing circuits!") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/computer/communications/attack_ai(var/mob/user as mob) return src.attack_hand(user) @@ -340,7 +340,7 @@ /obj/machinery/computer/communications/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index d016a0df7bd..5e16fe42828 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -5,7 +5,7 @@ #define MED_DATA_V_DATA 5 // Virus database #define MED_DATA_MEDBOT 6 // Medbot monitor -/obj/machinery/computer/med_data//TODO:SANITY +/obj/machinery/computer/med_data //TODO:SANITY name = "medical records console" desc = "This can be used to check medical records." icon_keyboard = "med_key" @@ -23,6 +23,11 @@ light_color = LIGHT_COLOR_DARKBLUE +/obj/machinery/computer/med_data/Destroy() + active1 = null + active2 = null + return ..() + /obj/machinery/computer/med_data/attackby(obj/item/O, mob/user, params) if(istype(O, /obj/item/weapon/card/id) && !scan) usr.drop_item() @@ -41,7 +46,7 @@ ui_interact(user) /obj/machinery/computer/med_data/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "med_data.tmpl", name, 800, 380) ui.open() @@ -453,7 +458,7 @@ var/t1 = copytext(trim(sanitize(input("Add Comment:", "Med. records", null, null) as message)), 1, MAX_MESSAGE_LEN) if(!t1 || ..() || active2 != a2) return 1 - active2.fields["comments"] += "Made by [authenticated] ([rank]) on [current_date_string] [worldtime2text()]
[t1]" + active2.fields["comments"] += "Made by [authenticated] ([rank]) on [current_date_string] [station_time_timestamp()]
[t1]" if(href_list["del_c"]) var/index = min(max(text2num(href_list["del_c"]) + 1, 1), length(active2.fields["comments"])) @@ -515,7 +520,7 @@ else P.info += "Medical Record Lost!
" P.info += "" - P.name = "paper- 'Medical Record'" + P.name = "paper- 'Medical Record: [active1.fields["name"]]'" printing = 0 return 1 diff --git a/code/game/machinery/computer/pod_tracking_console.dm b/code/game/machinery/computer/pod_tracking_console.dm index 75bad25bfab..a9e967ab171 100644 --- a/code/game/machinery/computer/pod_tracking_console.dm +++ b/code/game/machinery/computer/pod_tracking_console.dm @@ -14,7 +14,7 @@ ui_interact(user) /obj/machinery/computer/podtracker/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "pod_tracking.tmpl", "Pod Tracking Console", 400, 500) ui.open() @@ -47,4 +47,4 @@ return 1 if(href_list["refresh"]) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index ec41de193b8..c3d367ae716 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -35,7 +35,7 @@ return 0 /obj/machinery/computer/robotics/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "robot_control.tmpl", "Robotic Control Console", 400, 500) ui.open() diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 8289e8714e3..0600f8c1a08 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -24,6 +24,10 @@ light_color = LIGHT_COLOR_RED +/obj/machinery/computer/secure_data/Destroy() + active1 = null + active2 = null + return ..() /obj/machinery/computer/secure_data/attackby(obj/item/O, mob/user, params) if(istype(O, /obj/item/weapon/card/id) && !scan) @@ -44,7 +48,7 @@ ui_interact(user) /obj/machinery/computer/secure_data/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "secure_data.tmpl", name, 800, 380) ui.open() @@ -198,7 +202,7 @@ active2.fields["criminal"] = "Released" var/newstatus = active2.fields["criminal"] log_admin("[key_name_admin(usr)] set secstatus of [their_rank] [their_name] to [newstatus], comment: [t1]") - active2.fields["comments"] += "Set to [newstatus] by [usr.name] ([rank]) on [current_date_string] [worldtime2text()], comment: [t1]" + active2.fields["comments"] += "Set to [newstatus] by [usr.name] ([rank]) on [current_date_string] [station_time_timestamp()], comment: [t1]" update_all_mob_security_hud() if("rank") if(active1) @@ -366,7 +370,7 @@ else P.info += "Security Record Lost!
" P.info += "" - P.name = "paper - 'Security Record'" + P.name = "paper - 'Security Record: [active1.fields["name"]]'" printing = 0 /* Removed due to BYOND issue @@ -404,7 +408,7 @@ var/t1 = copytext(trim(sanitize(input("Add Comment:", "Secure. records", null, null) as message)), 1, MAX_MESSAGE_LEN) if(!t1 || ..() || active2 != a2) return 1 - active2.fields["comments"] += "Made by [authenticated] ([rank]) on [current_date_string] [worldtime2text()]
[t1]" + active2.fields["comments"] += "Made by [authenticated] ([rank]) on [current_date_string] [station_time_timestamp()]
[t1]" else if(href_list["del_c"]) var/index = min(max(text2num(href_list["del_c"]) + 1, 1), length(active2.fields["comments"])) diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index 66d0bfdbaee..5c0a0cffd55 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -23,6 +23,9 @@ var/sortBy = "name" var/order = 1 // -1 = Descending - 1 = Ascending +/obj/machinery/computer/skills/Destroy() + active1 = null + return ..() /obj/machinery/computer/skills/attackby(obj/item/O, mob/user, params) if(istype(O, /obj/item/weapon/card/id) && !scan) @@ -43,7 +46,7 @@ ui_interact(user) /obj/machinery/computer/skills/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "skills_data.tmpl", name, 800, 380) ui.open() @@ -232,7 +235,7 @@ else P.info += "General Record Lost!
" P.info += "" - P.name = "paper - 'Employment Record'" + P.name = "paper - 'Employment Record: [active1.fields["name"]]'" printing = 0 if(href_list["field"]) diff --git a/code/game/machinery/computer/telecrystalconsoles.dm b/code/game/machinery/computer/telecrystalconsoles.dm index e2119247409..4006e005b12 100644 --- a/code/game/machinery/computer/telecrystalconsoles.dm +++ b/code/game/machinery/computer/telecrystalconsoles.dm @@ -137,7 +137,7 @@ var/list/possible_uplinker_IDs = list("Alfa","Bravo","Charlie","Delta","Echo","F var/list/transferlog = list() /obj/machinery/computer/telecrystals/boss/proc/logTransfer(var/logmessage) - transferlog += ("[worldtime2text()] [logmessage]") + transferlog += ("[station_time_timestamp()] [logmessage]") /obj/machinery/computer/telecrystals/boss/proc/scanUplinkers() for(var/obj/machinery/computer/telecrystals/uplinker/A in range(scanrange, src.loc)) diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index bb33210f780..2c862b5cb0c 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -185,7 +185,7 @@ */ /obj/machinery/atmospherics/unary/cryo_cell/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 0cc98cd8622..039e40d67f1 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -371,7 +371,7 @@ cult_mode.sacrifice_target = pick(p_s_t) for(var/datum/mind/H in ticker.mode.cult) if(H.current) - to_chat(H.current, "[ticker.mode.cultdat.entity_name] murmurs, [occupant] is beyond your reach. Sacrifice [cult_mode.sacrifice_target.current] instead...
") + to_chat(H.current, "[ticker.cultdat.entity_name] murmurs, [occupant] is beyond your reach. Sacrifice [cult_mode.sacrifice_target.current] instead...
") else cult_mode.bypass_phase() diff --git a/code/game/machinery/dance_machine.dm b/code/game/machinery/dance_machine.dm index a7ddc648df6..fc8f8032863 100644 --- a/code/game/machinery/dance_machine.dm +++ b/code/game/machinery/dance_machine.dm @@ -118,7 +118,7 @@ add_fingerprint(usr) switch(href_list["action"]) if("toggle") - if(qdeleted(src)) + if(QDELETED(src)) return if(!active) if(stop > world.time) @@ -143,7 +143,7 @@ for(var/datum/track/S in songs) available[S.song_name] = S var/selected = input(usr, "Choose your song", "Track:") as null|anything in available - if(qdeleted(src) || !selected || !istype(available[selected], /datum/track)) + if(QDELETED(src) || !selected || !istype(available[selected], /datum/track)) return selection = available[selected] updateUsrDialog() @@ -165,7 +165,7 @@ deejay('sound/ai/harmalarm.ogg') /obj/machinery/disco/proc/deejay(S) - if(qdeleted(src) || !active || charge < 5) + if(QDELETED(src) || !active || charge < 5) to_chat(usr, "The device is not able to play more DJ sounds at this time.") return charge -= 5 @@ -241,7 +241,7 @@ /obj/machinery/disco/proc/lights_spin() for(var/i in 1 to 25) - if(qdeleted(src) || !active) + if(QDELETED(src) || !active) return var/obj/effect/overlay/sparkles/S = new /obj/effect/overlay/sparkles(src) S.alpha = 0 @@ -266,7 +266,7 @@ reveal.alpha = 255 while(active) for(var/obj/item/device/flashlight/spotlight/glow in spotlights) // The multiples reflects custom adjustments to each colors after dozens of tests - if(qdeleted(src) || !active || qdeleted(glow)) + if(QDELETED(src) || !active || QDELETED(glow)) return if(glow.light_color == "red") glow.light_color = "nw" diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index 723a2cc3770..88210652e99 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -79,7 +79,7 @@ for reference: user.visible_message("[user] is prying apart \the [src].", "You begin to pry apart \the [src].") playsound(src, W.usesound, 200, 1) - if(do_after(user, 300 * W.toolspeed, target = src) && src && !src.gcDestroyed) + if(do_after(user, 300 * W.toolspeed, target = src) && !QDELETED(src)) user.visible_message("[user] pries apart \the [src].", "You pry apart \the [src].") dismantle() return diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index b215839a0ca..074e29096a6 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -140,6 +140,7 @@ About the new airlock wires panel: /obj/machinery/door/airlock/Destroy() QDEL_NULL(electronics) QDEL_NULL(wires) + QDEL_NULL(note) if(main_power_timer) deltimer(main_power_timer) main_power_timer = null @@ -149,7 +150,9 @@ About the new airlock wires panel: if(electrified_timer) deltimer(electrified_timer) electrified_timer = null - qdel(note) + if(radio_controller) + radio_controller.remove_object(src, frequency) + radio_connection = null return ..() /obj/machinery/door/airlock/handle_atom_del(atom/A) @@ -180,7 +183,7 @@ About the new airlock wires panel: /obj/machinery/door/airlock/autoclose() autoclose_timer = 0 - if(!qdeleted(src) && !density && !operating && !locked && !welded && autoclose) + if(!QDELETED(src) && !density && !operating && !locked && !welded && autoclose) close() return @@ -547,7 +550,7 @@ About the new airlock wires panel: ui_interact(user) /obj/machinery/door/airlock/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "door_control.tmpl", "Door Controls - [src]", 600, 375) ui.open() @@ -1161,7 +1164,7 @@ About the new airlock wires panel: operating = TRUE update_icon(AIRLOCK_EMAG, 1) sleep(6) - if(qdeleted(src)) + if(QDELETED(src)) return operating = FALSE if(!open()) diff --git a/code/game/machinery/doors/airlock_control.dm b/code/game/machinery/doors/airlock_control.dm index cc7da319ddd..8a53dd3de8c 100644 --- a/code/game/machinery/doors/airlock_control.dm +++ b/code/game/machinery/doors/airlock_control.dm @@ -216,6 +216,12 @@ if(radio_controller) set_frequency(frequency) +/obj/machinery/airlock_sensor/Destroy() + if(radio_controller) + radio_controller.remove_object(src, frequency) + radio_connection = null + return ..() + /obj/machinery/airlock_sensor/airlock_interior command = "cycle_interior" @@ -279,6 +285,12 @@ if(radio_controller) set_frequency(frequency) +/obj/machinery/access_button/Destroy() + if(radio_controller) + radio_controller.remove_object(src, frequency) + radio_connection = null + return ..() + /obj/machinery/access_button/airlock_interior frequency = 1379 command = "cycle_interior" diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index 5914d9b5d87..b8f00b60131 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -40,11 +40,11 @@ for(var/obj/machinery/computer/prisoner/C in prisoncomputer_list) var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(C.loc) - P.name = "[id] log - [logname] [worldtime2text()]" + P.name = "[id] log - [logname] [station_time_timestamp()]" P.info = "
[id] - Brig record



" P.info += {"
[station_name()] - Security Department

Admission data:

- Log generated at: [worldtime2text()]
+ Log generated at: [station_time_timestamp()]
Detainee: [logname]
Duration: [seconds_to_time(timetoset / 10)]
Charge(s): [logcharges]
@@ -68,7 +68,7 @@ rank = I.assignment if(!R.fields["comments"] || !islist(R.fields["comments"])) //copied from security computer code because apparently these need to be initialized R.fields["comments"] = list() - R.fields["comments"] += "Autogenerated by [name] on [current_date_string] [worldtime2text()]
Sentenced to [timetoset/10] seconds for the charges of \"[logcharges]\" by [rank] [usr.name]." + R.fields["comments"] += "Autogenerated by [name] on [current_date_string] [station_time_timestamp()]
Sentenced to [timetoset/10] seconds for the charges of \"[logcharges]\" by [rank] [usr.name]." update_all_mob_security_hud() return 1 diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index bfb758bae75..bb6702ec89a 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -94,12 +94,8 @@ M.last_bumped = world.time if(M.restrained() && !check_access(null)) return - if(M.mob_size > MOB_SIZE_SMALL) + if(M.mob_size > MOB_SIZE_TINY) bumpopen(M) - else if(ispet(M)) - var/mob/living/simple_animal/A = AM - if(A.collar) - bumpopen(M) return if(ismecha(AM)) @@ -353,7 +349,7 @@ /obj/machinery/door/proc/autoclose() autoclose_timer = 0 - if(!qdeleted(src) && !density && !operating && !locked && !welded && autoclose) + if(!QDELETED(src) && !density && !operating && !locked && !welded && autoclose) close() /obj/machinery/door/proc/update_freelook_sight() diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 5490b529564..e5211f48407 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -77,7 +77,7 @@ if(!ticker) return var/mob/living/M = AM - if(!M.restrained() && M.mob_size > MOB_SIZE_SMALL && (!(isrobot(M) && M.stat))) + if(!M.restrained() && M.mob_size > MOB_SIZE_TINY && (!(isrobot(M) && M.stat))) bumpopen(M) /obj/machinery/door/window/bumpopen(mob/user) diff --git a/code/game/machinery/embedded_controller/airlock_controllers.dm b/code/game/machinery/embedded_controller/airlock_controllers.dm index 99b5189e206..27ee0197514 100644 --- a/code/game/machinery/embedded_controller/airlock_controllers.dm +++ b/code/game/machinery/embedded_controller/airlock_controllers.dm @@ -21,7 +21,7 @@ name = "Advanced Airlock Controller" /obj/machinery/embedded_controller/radio/airlock/advanced_airlock_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "advanced_airlock_console.tmpl", name, 470, 290) ui.open() @@ -77,7 +77,7 @@ tag_secure = 1 /obj/machinery/embedded_controller/radio/airlock/airlock_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "simple_airlock_console.tmpl", name, 470, 290) ui.open() @@ -140,7 +140,7 @@ icon_state = "access_control_off" /obj/machinery/embedded_controller/radio/airlock/access_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "door_access_console.tmpl", name, 330, 220) ui.open() diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm index a4a656fa5d6..08143524744 100644 --- a/code/game/machinery/embedded_controller/embedded_controller_base.dm +++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm @@ -58,6 +58,12 @@ ..() set_frequency(frequency) +/obj/machinery/embedded_controller/radio/Destroy() + if(radio_controller) + radio_controller.remove_object(src, frequency) + radio_connection = null + return ..() + /obj/machinery/embedded_controller/radio/update_icon() if(on && program) if(program.memory["processing"]) diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index 56a36b07e92..523a11884a9 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -169,7 +169,7 @@ FIRE ALARM ui_interact(user) /obj/machinery/firealarm/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "firealarm.tmpl", name, 400, 400, state = state) ui.open() diff --git a/code/game/machinery/guestpass.dm b/code/game/machinery/guestpass.dm index bc70868cf8f..8e043af82ad 100644 --- a/code/game/machinery/guestpass.dm +++ b/code/game/machinery/guestpass.dm @@ -19,9 +19,9 @@ /obj/item/weapon/card/id/guest/examine(mob/user) ..(user) if(world.time < expiration_time) - to_chat(user, "This pass expires at [worldtime2text(expiration_time)].") + to_chat(user, "This pass expires at [station_time_timestamp("hh:mm:ss", expiration_time)].") else - to_chat(user, "It expired at [worldtime2text(expiration_time)].") + to_chat(user, "It expired at [station_time_timestamp("hh:mm:ss", expiration_time)].") to_chat(user, "It grants access to following areas:") for(var/A in temp_access) to_chat(user, "[get_access_desc(A)].") @@ -166,13 +166,13 @@ if("issue") if(giver) var/number = add_zero("[rand(0,9999)]", 4) - var/entry = "\[[worldtime2text()]\] Pass #[number] issued by [giver.registered_name] ([giver.assignment]) to [giv_name]. Reason: [reason]. Grants access to following areas: " + var/entry = "\[[station_time()]\] Pass #[number] issued by [giver.registered_name] ([giver.assignment]) to [giv_name]. Reason: [reason]. Grants access to following areas: " for(var/i=1 to accesses.len) var/A = accesses[i] if(A) var/area = get_access_desc(A) entry += "[i > 1 ? ", [area]" : "[area]"]" - entry += ". Expires at [worldtime2text(world.time + duration*10*60)]." + entry += ". Expires at [station_time(world.time + duration*10*60)]." internal_log.Add(entry) var/obj/item/weapon/card/id/guest/pass = new(src.loc) diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index 644b5a73ab9..abe9f38f363 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -56,7 +56,8 @@ /obj/machinery/light_switch/Destroy() if(radio_controller) - radio_controller.remove_object(src,frequency) + radio_controller.remove_object(src, frequency) + radio_connection = null return ..() /obj/machinery/light_switch/proc/updateicon() @@ -75,7 +76,7 @@ /obj/machinery/light_switch/attack_ghost(mob/user) if(user.can_advanced_admin_interact()) return attack_hand(user) - + /obj/machinery/light_switch/attack_hand(mob/user) on = !on updateicon() diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index 362b9718b3a..0ff8847a8d8 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -236,6 +236,12 @@ filter_path() // renders rpath + Destroy() + if(radio_controller) + radio_controller.remove_object(src, frequency) + radio_connection = null + return ..() + process() if(magnets.len == 0 && autolink) for(var/obj/machinery/magnetic_module/M in world) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 7cc40fdc62e..36b1ca0d837 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -186,7 +186,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co user.set_machine(src) if(can_scan(user)) scan_user(user) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "newscaster.tmpl", name, 400, 600) ui.open() @@ -566,7 +566,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co else if(href_list["jobs"]) screen = NEWSCASTER_JOBS - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 /obj/machinery/newscaster/attackby(obj/item/I, mob/living/user, params) diff --git a/code/game/machinery/poolcontroller.dm b/code/game/machinery/poolcontroller.dm index c169f3c0a59..661a814c6fb 100644 --- a/code/game/machinery/poolcontroller.dm +++ b/code/game/machinery/poolcontroller.dm @@ -100,7 +100,10 @@ if(drownee.losebreath > 20) //You've probably got bigger problems than drowning at this point, so we won't add to it until you get that under control. return - add_logs(src, drownee, "drowned", null, null, 0) //log it to their VV, but don't spam the admins' chats with the logs + if(isLivingSSD(drownee)) + add_logs(src, drownee, "drowned", null, null, 0, 1) // Notify admins, since the person is SSD + else + add_logs(src, drownee, "drowned", null, null, 0, 0) // Do not notify admins. if(drownee.stat) //Mob is in critical. drownee.AdjustLoseBreath(3, bound_lower = 0, bound_upper = 20) drownee.visible_message("\The [drownee] appears to be drowning!","You're quickly drowning!") //inform them that they are fucked. @@ -126,7 +129,7 @@ /obj/machinery/poolcontroller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "poolcontroller.tmpl", "Pool Controller Interface", 520, 410) ui.open() diff --git a/code/game/machinery/portable_tag_turret.dm b/code/game/machinery/portable_tag_turret.dm index 1944da8f071..610f7d22f9c 100644 --- a/code/game/machinery/portable_tag_turret.dm +++ b/code/game/machinery/portable_tag_turret.dm @@ -43,7 +43,7 @@ iconholder = 1 /obj/machinery/porta_turret/tag/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300) ui.open() diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 01486963356..73431fc0c94 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -212,7 +212,7 @@ var/list/turret_icons ui_interact(user) /obj/machinery/porta_turret/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 320) ui.open() diff --git a/code/game/machinery/quantum_pad.dm b/code/game/machinery/quantum_pad.dm index d742ab00658..86c11f7cbe9 100644 --- a/code/game/machinery/quantum_pad.dm +++ b/code/game/machinery/quantum_pad.dm @@ -71,7 +71,7 @@ to_chat(user, "The panel must be closed before operating this machine!") return - if(!linked_pad || qdeleted(linked_pad)) + if(!linked_pad || QDELETED(linked_pad)) to_chat(user, "There is no linked pad!") return @@ -108,14 +108,14 @@ teleporting = 1 spawn(teleport_speed) - if(!src || qdeleted(src)) + if(!src || QDELETED(src)) teleporting = 0 return if(stat & NOPOWER) to_chat(user, "[src] is unpowered!") teleporting = 0 return - if(!linked_pad || qdeleted(linked_pad) || linked_pad.stat & NOPOWER) + if(!linked_pad || QDELETED(linked_pad) || linked_pad.stat & NOPOWER) to_chat(user, "Linked pad is not responding to ping. Teleport aborted.") teleporting = 0 return diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index 43fda1c6e00..142683e8962 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -112,7 +112,7 @@ var/const/SAFETY_COOLDOWN = 100 for(var/i in to_eat) var/atom/movable/AM = i - if(!exists(AM)) + if(QDELETED(AM)) continue else if(isliving(AM)) if(emagged) diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index c10f4044f78..d3799a5a20b 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -131,7 +131,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() ui_interact(user) /obj/machinery/requests_console/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "request_console.tmpl", "[department] Request Console", 520, 410) ui.open() @@ -221,7 +221,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() radiochannel = "AI Private" if(recipient == "Cargo Bay") radiochannel = "Supply" - message_log += "Message sent to [recipient] at [worldtime2text()]
[message]" + message_log += "Message sent to [recipient] at [station_time_timestamp()]
[message]" Radio.autosay("Alert; a new requests console message received for [recipient] from [department]", null, "[radiochannel]") else audible_message(text("[bicon(src)] *The Requests Console beeps: 'NOTICE: No server detected!'"),,4) @@ -265,7 +265,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() if(href_list["toggleSilent"]) silent = !silent - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return //err... hacking code, which has no reason for existing... but anyway... it was once supposed to unlock priority 3 messanging on that console (EXTREME priority...), but the code for that was removed. diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm index ca6484d8dd4..822cc6d9978 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -22,7 +22,7 @@ ui_interact(user) /obj/machinery/slot_machine/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "slotmachine.tmpl", name, 350, 200) ui.open() @@ -113,5 +113,5 @@ T.purpose = "Slot Winnings" T.amount = "[amt]" T.date = current_date_string - T.time = worldtime2text() + T.time = station_time_timestamp() account.transaction_log.Add(T) diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index 614f4d8f53f..414ec8d2e62 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -98,7 +98,7 @@ message2 = "Error!" else message1 = "TIME" - message2 = worldtime2text() + message2 = station_time_timestamp("hh:mm") update_display(message1, message2, use_warn) return 1 if(STATUS_DISPLAY_MESSAGE) //custom messages @@ -126,7 +126,7 @@ return 1 if(STATUS_DISPLAY_TIME) message1 = "TIME" - message2 = worldtime2text() + message2 = station_time_timestamp("hh:mm") update_display(message1, message2) return 1 return 0 diff --git a/code/game/machinery/supply_display.dm b/code/game/machinery/supply_display.dm index 9c945fff989..863d76ef7b6 100644 --- a/code/game/machinery/supply_display.dm +++ b/code/game/machinery/supply_display.dm @@ -10,7 +10,7 @@ message2 = "Docked" else message1 = "TIME" - message2 = worldtime2text() + message2 = station_time_timestamp("hh:mm") else message1 = "CARGO" message2 = shuttle_master.supply.getTimerStr() diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 8479e4e051b..843b889478d 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -70,7 +70,7 @@ return // Set up the Nano UI - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "teleporter_console.tmpl", "Teleporter Console UI", 400, 400) ui.open() @@ -99,16 +99,16 @@ if(href_list["eject"]) eject() - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return if(!check_hub_connection()) to_chat(usr, "Error: Unable to detect hub.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return if(calibrating) to_chat(usr, "Error: Calibration in progress. Stand by.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return if(href_list["regimeset"]) @@ -116,32 +116,32 @@ power_station.teleporter_hub.update_icon() power_station.teleporter_hub.calibrated = 0 reset_regime() - nanomanager.update_uis(src) + SSnanoui.update_uis(src) if(href_list["settarget"]) power_station.engaged = 0 power_station.teleporter_hub.update_icon() power_station.teleporter_hub.calibrated = 0 set_target(usr) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) if(href_list["lock"]) power_station.engaged = 0 power_station.teleporter_hub.update_icon() power_station.teleporter_hub.calibrated = 0 target = get_turf(locked.locked_location) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) if(href_list["calibrate"]) if(!target) to_chat(usr, "Error: No target set to calibrate to.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return if(power_station.teleporter_hub.calibrated || power_station.teleporter_hub.accurate >= 3) to_chat(usr, "Hub is already calibrated.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return src.visible_message("Processing hub calibration to target...") calibrating = 1 - nanomanager.update_uis(src) + SSnanoui.update_uis(src) spawn(50 * (3 - power_station.teleporter_hub.accurate)) //Better parts mean faster calibration calibrating = 0 if(check_hub_connection()) @@ -149,9 +149,9 @@ src.visible_message("Calibration complete.") else src.visible_message("Error: Unable to detect hub.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/computer/teleporter/proc/check_hub_connection() if(!power_station) diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm index ad5aeb5fc61..4bcf869ba64 100644 --- a/code/game/machinery/turret_control.dm +++ b/code/game/machinery/turret_control.dm @@ -25,7 +25,7 @@ var/check_anomalies = 1 //checks if it can shoot at unidentified lifeforms (ie xenos) var/check_synth = 0 //if active, will shoot at anything not an AI or cyborg var/ailock = 0 //Silicons cannot use this - + var/syndicate = 0 var/faction = "" // Turret controls can only access turrets that are in the same faction @@ -39,21 +39,21 @@ enabled = 1 lethal = 1 icon_state = "control_kill" - + /obj/machinery/turretid/syndicate enabled = 1 lethal = 1 icon_state = "control_kill" - + lethal = 1 check_arrest = 0 check_records = 0 check_weapons = 0 check_access = 0 - check_anomalies = 1 + check_anomalies = 1 check_synth = 1 ailock = 1 - + syndicate = 1 faction = "syndicate" @@ -139,7 +139,7 @@ ui_interact(user) /obj/machinery/turretid/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300) ui.open() diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 1329922235f..07365fb0c9a 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -234,7 +234,7 @@ vend(currently_vending, usr) return else if(handled) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return // don't smack that machine with your 2 thalers if(default_unfasten_wrench(user, I, time = 60)) @@ -247,7 +247,7 @@ overlays.Cut() if(panel_open) overlays += image(icon, "[initial(icon_state)]-panel") - nanomanager.update_uis(src) // Speaker switch is on the main UI, not wires UI + SSnanoui.update_uis(src) // Speaker switch is on the main UI, not wires UI return if(panel_open) @@ -269,7 +269,7 @@ coin = I categories |= CAT_COIN to_chat(user, "You insert the [I] into the [src]") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return else if(istype(I, refill_canister) && refill_canister != null) if(stat & (BROKEN|NOPOWER)) @@ -327,14 +327,14 @@ I.forceMove(src) to_chat(user, "You insert [I] into [src].") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/vending/proc/eject_item() if(!item_slot || !inserted_item) return inserted_item.forceMove(get_turf(src)) inserted_item = null - nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/vending/emag_act(user as mob) emagged = 1 @@ -430,7 +430,7 @@ T.amount = "[currently_vending.price]" T.source_terminal = src.name T.date = current_date_string - T.time = worldtime2text() + T.time = station_time_timestamp() vendor_account.transaction_log.Add(T) /obj/machinery/vending/attack_ai(mob/user) @@ -458,7 +458,7 @@ /obj/machinery/vending/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) user.set_machine(src) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "vending_machine.tmpl", src.name, 440, 600) ui.open() @@ -545,7 +545,7 @@ vend(currently_vending, usr) return else if(handled) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return // don't smack that machine with your 2 credits if((href_list["vend"]) && vend_ready && !currently_vending) @@ -584,7 +584,7 @@ shut_up = !src.shut_up add_fingerprint(usr) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/vending/proc/vend(datum/data/vending_product/R, mob/user) if(!allowed(usr) && !usr.can_admin_interact() && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH @@ -599,7 +599,7 @@ vend_ready = 0 //One thing at a time!! status_message = "Vending..." status_error = 0 - nanomanager.update_uis(src) + SSnanoui.update_uis(src) if(R.category & CAT_COIN) if(!coin) @@ -632,7 +632,7 @@ status_error = 0 vend_ready = 1 currently_vending = null - nanomanager.update_uis(src) + SSnanoui.update_uis(src) //override this proc to add handling for what to do with the vended product when you have a inserted item and remember to include a parent call for this generic handling /obj/machinery/vending/proc/do_vend(datum/data/vending_product/R) diff --git a/code/game/magic/Uristrunes.dm b/code/game/magic/Uristrunes.dm index e309b562522..1a242594bfe 100644 --- a/code/game/magic/Uristrunes.dm +++ b/code/game/magic/Uristrunes.dm @@ -1,7 +1,7 @@ /proc/get_rune_cult(word) var/animated - if(word && !(ticker.mode.cultdat.theme == "fire" || ticker.mode.cultdat.theme == "death")) + if(word && !(ticker.cultdat.theme == "fire" || ticker.cultdat.theme == "death")) animated = 1 else animated = 0 @@ -20,9 +20,9 @@ var/runetype = "rune" if(!ticker.mode)//work around for maps with runes and cultdat is not loaded all the way runetype = "rune" - else if(ticker.mode.cultdat.theme == "fire") + else if(ticker.cultdat.theme == "fire") runetype = "fire-rune" - else if(ticker.mode.cultdat.theme == "death") + else if(ticker.cultdat.theme == "death") runetype = "death-rune" diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index bf547881869..1b9deed332b 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -429,7 +429,7 @@ if(!use_cable(1)) return reset() var/obj/structure/cable/NC = new(new_turf) - NC.cableColor("red") + NC.cable_color("red") NC.d1 = 0 NC.d2 = fdirn NC.updateicon() diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm index b3e42bb968e..76cd58abed6 100644 --- a/code/game/mecha/mech_bay.dm +++ b/code/game/mecha/mech_bay.dm @@ -148,7 +148,7 @@ ui_interact(user) /obj/machinery/computer/mech_bay_power_console/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm @@ -162,11 +162,11 @@ var/data[0] if(!recharge_port) reconnect() - if(recharge_port && !qdeleted(recharge_port)) + if(recharge_port && !QDELETED(recharge_port)) data["recharge_port"] = list("mech" = null) - if(recharge_port.recharging_mecha && !qdeleted(recharge_port.recharging_mecha)) + if(recharge_port.recharging_mecha && !QDELETED(recharge_port.recharging_mecha)) data["recharge_port"]["mech"] = list("health" = recharge_port.recharging_mecha.health, "maxhealth" = initial(recharge_port.recharging_mecha.health), "cell" = null) - if(recharge_port.recharging_mecha.cell && !qdeleted(recharge_port.recharging_mecha.cell)) + if(recharge_port.recharging_mecha.cell && !QDELETED(recharge_port.recharging_mecha.cell)) data["has_mech"] = 1 data["mecha_name"] = recharge_port.recharging_mecha || "None" data["mecha_charge"] = isnull(recharge_port.recharging_mecha) ? 0 : recharge_port.recharging_mecha.cell.charge diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index c3de7aa4bfb..01867405e85 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -1275,7 +1275,7 @@ occupant = null return else - if(!AI.linked_core || qdeleted(AI.linked_core)) + if(!AI.linked_core || QDELETED(AI.linked_core)) to_chat(AI, "Inactive core destroyed. Unable to return.") AI.linked_core = null return diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm index c14134ba2c5..531f31c3df2 100644 --- a/code/game/mecha/mecha_control_console.dm +++ b/code/game/mecha/mecha_control_console.dm @@ -17,7 +17,7 @@ ui_interact(user) /obj/machinery/computer/mecha/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "exosuit_control.tmpl", "Exosuit Control Console", 420, 500) ui.open() @@ -63,7 +63,7 @@ if(href_list["return"]) screen = 0 - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return /obj/item/mecha_parts/mecha_tracking diff --git a/code/game/objects/effects/alien_acid.dm b/code/game/objects/effects/alien_acid.dm new file mode 100644 index 00000000000..59ae654c85b --- /dev/null +++ b/code/game/objects/effects/alien_acid.dm @@ -0,0 +1,88 @@ +/* Alien shit! + * Contains: + * effect/acid + */ + + +/* + * Acid + */ +/obj/effect/acid + gender = PLURAL + name = "acid" + desc = "Burbling corrossive stuff." + icon = 'icons/effects/effects.dmi' + icon_state = "acid" + density = 0 + opacity = 0 + anchored = 1 + unacidable = 1 + var/atom/target + var/ticks = 0 + var/target_strength = 0 + + +/obj/effect/acid/New(loc, targ) + ..(loc) + target = targ + + //handle APCs and newscasters and stuff nicely + pixel_x = target.pixel_x + pixel_y = target.pixel_y + + if(isturf(target)) //Turfs take twice as long to take down. + target_strength = 640 + else + target_strength = 320 + tick() + + +/obj/effect/acid/proc/tick() + if(!target) + qdel(src) + + ticks++ + + if(ticks >= target_strength) + target.visible_message("[target] collapses under its own weight into a puddle of goop and undigested debris!") + + if(istype(target, /obj/structure/closet)) + var/obj/structure/closet/T = target + T.dump_contents() + qdel(target) + + if(istype(target, /turf/simulated/mineral)) + var/turf/simulated/mineral/M = target + M.ChangeTurf(/turf/simulated/floor/plating/airless/asteroid) + + if(istype(target, /turf/simulated/floor)) + var/turf/simulated/floor/F = target + F.ChangeTurf(/turf/space) + + if(istype(target, /turf/simulated/wall)) + var/turf/simulated/wall/W = target + W.dismantle_wall(1) + + else + qdel(target) + + qdel(src) + return + + x = target.x + y = target.y + z = target.z + + switch(target_strength - ticks) + if(480) + visible_message("[target] is holding up against the acid!") + if(320) + visible_message("[target] is being melted by the acid!") + if(160) + visible_message("[target] is struggling to withstand the acid!") + if(80) + visible_message("[target] begins to crumble under the acid!") + + spawn(1) + if(src) + tick() diff --git a/code/game/objects/effects/decals/contraband.dm b/code/game/objects/effects/decals/contraband.dm index d825a7a9146..eda338961b8 100644 --- a/code/game/objects/effects/decals/contraband.dm +++ b/code/game/objects/effects/decals/contraband.dm @@ -157,7 +157,7 @@ playsound(D.loc, 'sound/items/poster_being_created.ogg', 100, 1) if(do_after(user, PLACE_SPEED, target = src)) - if(!D || qdeleted(D)) + if(!D || QDELETED(D)) return if(iswallturf(src) && user && user.loc == temp_loc) //Let's check if everything is still there diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 9d6ebd06fcb..aa59c6e2740 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -101,6 +101,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d new path(src) /obj/item/Destroy() + flags &= ~DROPDEL //prevent reqdels QDEL_NULL(hidden_uplink) if(ismob(loc)) var/mob/m = loc @@ -317,6 +318,8 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d for(var/X in actions) var/datum/action/A = X A.Remove(user) + if(flags & DROPDEL) + qdel(src) // called just as an item is picked up (loc is not yet changed) /obj/item/proc/pickup(mob/user) @@ -485,7 +488,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d else ..() /obj/item/throw_impact(atom/A) - if(A && !qdeleted(A)) + if(A && !QDELETED(A)) var/itempush = 1 if(w_class < WEIGHT_CLASS_BULKY) itempush = 0 // too light to push anything diff --git a/code/game/objects/items/control_wand.dm b/code/game/objects/items/control_wand.dm index 0fe6cf48631..40629931aa5 100644 --- a/code/game/objects/items/control_wand.dm +++ b/code/game/objects/items/control_wand.dm @@ -9,6 +9,7 @@ name = "control wand" desc = "Remotely controls airlocks." w_class = WEIGHT_CLASS_TINY + flags = NOBLUDGEON var/mode = WAND_OPEN var/region_access = 1 //See access.dm var/obj/item/weapon/card/id/ID diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index f74d80f845e..88e2a7d86e5 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -41,7 +41,7 @@ /obj/item/device/aicard/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "aicard.tmpl", "[name]", 600, 400, state = state) ui.open() diff --git a/code/game/objects/items/devices/autopsy.dm b/code/game/objects/items/devices/autopsy.dm index 62e4354f238..d7d416c36d0 100644 --- a/code/game/objects/items/devices/autopsy.dm +++ b/code/game/objects/items/devices/autopsy.dm @@ -96,7 +96,7 @@ var/scan_data = "" if(timeofdeath) - scan_data += "Time of death: [worldtime2text(timeofdeath)]

" + scan_data += "Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]

" var/n = 1 for(var/wdata_idx in wdata) @@ -146,7 +146,7 @@ if(damaging_weapon) scan_data += "Severity: [damage_desc]
" scan_data += "Hits by weapon: [total_hits]
" - scan_data += "Approximate time of wound infliction: [worldtime2text(age)]
" + scan_data += "Approximate time of wound infliction: [station_time(age)]
" scan_data += "Affected limbs: [D.organ_names]
" scan_data += "Possible weapons:
" for(var/weapon_name in weapon_chances) diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index e8d023ff101..d8baaf0ea2c 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -99,7 +99,7 @@ /obj/item/device/radio/electropack/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "radio_electro.tmpl", "[name]", 400, 500) ui.open() diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 67009e3366d..f10eeff1ebb 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -77,6 +77,7 @@ var/global/list/default_medbay_channels = list( radio_controller.remove_object(src, frequency) for(var/ch_name in channels) radio_controller.remove_object(src, radiochannels[ch_name]) + radio_connection = null global_radios -= src follow_target = null return ..() @@ -107,7 +108,7 @@ var/global/list/default_medbay_channels = list( return ui_interact(user) /obj/item/device/radio/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 400, 550) ui.open() @@ -793,7 +794,7 @@ var/global/list/default_medbay_channels = list( . = ..() /obj/item/device/radio/borg/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 430, 500) ui.open() diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index dfec1d1ba09..3aba9d2d95b 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -160,7 +160,7 @@ REAGENT SCANNER user.show_message("\t Damage Specifics: [OX] - [TX] - [BU] - [BR]") user.show_message("Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)", 1) if(M.timeofdeath && (M.stat == DEAD || (M.status_flags & FAKEDEATH))) - user.show_message("Time of Death: [worldtime2text(M.timeofdeath)]") + user.show_message("Time of Death: [station_time_timestamp("hh:mm:ss", M.timeofdeath)]") if(istype(M, /mob/living/carbon/human) && mode == 1) var/mob/living/carbon/human/H = M var/list/damaged = H.get_damaged_organs(1,1) @@ -432,7 +432,7 @@ REAGENT SCANNER sleep(50) var/obj/item/weapon/paper/P = new(get_turf(src)) - P.name = "Mass Spectrometer Scanner Report: [worldtime2text()]" + P.name = "Mass Spectrometer Scanner Report: [station_time_timestamp()]" P.info = "
Mass Spectrometer

Data Analysis:



Trace chemicals detected:
[datatoprint]

" if(ismob(loc)) @@ -502,7 +502,7 @@ REAGENT SCANNER sleep(50) var/obj/item/weapon/paper/P = new(get_turf(src)) - P.name = "Reagent Scanner Report: [worldtime2text()]" + P.name = "Reagent Scanner Report: [station_time_timestamp()]" P.info = "
Reagent Scanner

Data Analysis:



Chemical agents detected:
[datatoprint]

" if(ismob(loc)) diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index 9c293bd6073..c27c6a3f435 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -46,7 +46,7 @@ w_class = I.w_class update_icon() - nanomanager.update_uis(src) // update all UIs attached to src + SSnanoui.update_uis(src) // update all UIs attached to src //TODO: Have this take an assemblyholder else if(isassembly(I)) var/obj/item/device/assembly/A = I @@ -67,7 +67,7 @@ msg_admin_attack("[key_name_admin(user)]attached [A] to a transfer valve.") log_game("[key_name_admin(user)] attached [A] to a transfer valve.") attacher = user - nanomanager.update_uis(src) // update all UIs attached to src + SSnanoui.update_uis(src) // update all UIs attached to src /obj/item/device/transfer_valve/HasProximity(atom/movable/AM) @@ -90,7 +90,7 @@ /obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/game/objects/items/devices/uplinks.dm b/code/game/objects/items/devices/uplinks.dm index 0c21ef212c9..d4906aa17db 100644 --- a/code/game/objects/items/devices/uplinks.dm +++ b/code/game/objects/items/devices/uplinks.dm @@ -129,7 +129,7 @@ var/list/world_uplinks = list() if(!UI) return UI.buy(src,usr) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) /* var/list/L = UI.spawn_item(get_turf(usr),src) if(ishuman(usr)) @@ -190,7 +190,7 @@ var/list/world_uplinks = list() /obj/item/device/uplink/hidden/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state) var/title = "Remote Uplink" // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm @@ -224,7 +224,7 @@ var/list/world_uplinks = list() if(!( istype(usr, /mob/living/carbon/human))) return 1 var/mob/user = usr - var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main") + var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main") if((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf)))) usr.set_machine(src) if(..(href, href_list)) @@ -246,7 +246,7 @@ var/list/world_uplinks = list() show_descriptions = !show_descriptions update_nano_data() - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 /obj/item/device/uplink/hidden/proc/update_nano_data(var/id) diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm index 8e3c6a57e18..593ef9a820f 100644 --- a/code/game/objects/items/stacks/nanopaste.dm +++ b/code/game/objects/items/stacks/nanopaste.dm @@ -5,7 +5,8 @@ icon = 'icons/obj/nanopaste.dmi' icon_state = "tube" origin_tech = "materials=2;engineering=3" - amount = 10 + amount = 6 + max_amount = 6 toolspeed = 1 /obj/item/stack/nanopaste/attack(mob/living/M as mob, mob/user as mob) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 5e07e09b040..6a631f53e38 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -13,6 +13,7 @@ var/list/recipes = list() // /datum/stack_recipe var/singular_name var/amount = 1 + var/to_transfer = 0 var/max_amount //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount var/merge_type = null // This path and its children should merge with this stack, defaults to src.type @@ -26,8 +27,7 @@ /obj/item/stack/Destroy() if(usr && usr.machine == src) usr << browse(null, "window=stack") - ..() - return QDEL_HINT_HARDDEL_NOW // because qdel'd stacks act strange for cyborgs + return ..() /obj/item/stack/examine(mob/user) if(..(user, 1)) @@ -195,15 +195,18 @@ interact(usr) return -/obj/item/stack/proc/use(var/used) +/obj/item/stack/proc/use(used) if(amount < used) return 0 amount -= used if(amount < 1) // Just in case a stack's amount ends up fractional somehow + if(isrobot(loc)) + var/mob/living/silicon/robot/R = loc //Horrifying cyborg snowflake code that allows stacks to GC and cyborgs not to horrendously break + if(locate(src) in R.module.modules) + R.module.modules -= src if(usr) - usr.unEquip(src, 1) - spawn() - qdel(src) + usr.unEquip(src, TRUE) // this has to be unEquip() over drop_item() or something similar because of cyborgs + qdel(src) update_icon() return 1 @@ -229,6 +232,9 @@ /obj/item/stack/proc/get_max_amount() return max_amount +/obj/item/stack/proc/get_amount_transferred() + return to_transfer + /obj/item/stack/proc/split(mob/user, amt) var/obj/item/stack/F = new type(loc, amt) F.copy_evidences(src) @@ -255,7 +261,6 @@ if(S.amount >= max_amount) return 1 - var/to_transfer if(user.is_in_inactive_hand(src)) var/desired = input("How much would you like to transfer from this stack?", "How much?", 1) as null|num if(!desired) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 5d4104f57ac..3ceb8607eba 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -1357,6 +1357,7 @@ obj/item/toy/cards/deck/syndicate/black item_state = "gun" lefthand_file = 'icons/mob/inhands/guns_lefthand.dmi' righthand_file = 'icons/mob/inhands/guns_righthand.dmi' + hitsound = "swing_hit" flags = CONDUCT slot_flags = SLOT_BELT materials = list(MAT_METAL=2000) @@ -1364,14 +1365,13 @@ obj/item/toy/cards/deck/syndicate/black throwforce = 5 throw_speed = 4 throw_range = 5 - force = 5.0 + force = 5 origin_tech = "combat=1" attack_verb = list("struck", "hit", "bashed") var/bullet_position = 1 - var/is_empty = 0 /obj/item/toy/russian_revolver/suicide_act(mob/user) - user.visible_message("[user] quickly loads six bullets into the [src.name]'s cylinder and points it at \his head before pulling the trigger! It looks like they are trying to commit suicide.") + user.visible_message("[user] quickly loads six bullets into [src]'s cylinder and points it at \his head before pulling the trigger! It looks like they are trying to commit suicide.") playsound(loc, 'sound/weapons/Gunshot.ogg', 50, 1) return (BRUTELOSS) @@ -1381,36 +1381,37 @@ obj/item/toy/cards/deck/syndicate/black /obj/item/toy/russian_revolver/attack_self(mob/user) - if(is_empty) - user.visible_message("[user] loads a bullet into the [src]'s cylinder.") - is_empty = 0 + if(!bullet_position) + user.visible_message("[user] loads a bullet into [src]'s cylinder.") + bullet_position = 1 else spin_cylinder() - user.visible_message("[user] spins the cylinder on the [src]!") + user.visible_message("[user] spins the cylinder on [src]!") - -/obj/item/toy/russian_revolver/attack(mob/living/carbon/M, mob/user) +/obj/item/toy/russian_revolver/attack(mob/living/carbon/human/M, mob/living/carbon/human/user) if(M != user) //can't use this on other people + return ..() + if(!bullet_position) + to_chat(user, "[src] is empty.") return - if(is_empty) - to_chat(user, "The [src] is empty.") + if(!(user.has_organ("head"))) //For sanity + to_chat(user, "Playing this game without a head would be classed as cheating.") return - user.visible_message("[user] points the [src] at their head, ready to pull the trigger!") - if(do_after(user, 30, target = M)) - if(bullet_position != 1) + user.visible_message("[user] points [src] at their head, ready to pull the trigger!") + if(do_after(user, 30, target = user)) + if(bullet_position > 1) user.visible_message("*click*") playsound(src, 'sound/weapons/empty.ogg', 100, 1) - bullet_position -= 1 + bullet_position-- return - if(bullet_position == 1) - is_empty = 1 + else + bullet_position = null playsound(src, 'sound/weapons/Gunshot.ogg', 50, 1) - user.visible_message("The [src] goes off!") - M.apply_damage(200, BRUTE, "head", sharp =1, used_weapon = "Self-inflicted gunshot wound to the head.") - M.death() + user.visible_message("[src] goes off!") + user.apply_damage(200, BRUTE, "head", sharp = 1, used_weapon = "Self-inflicted gunshot wound to the head.") + user.death() else - user.visible_message("[user] lowers the [src] from their head.") - + user.visible_message("[user] lowers [src] from their head.") /obj/item/toy/russian_revolver/proc/spin_cylinder() bullet_position = rand(1,6) diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index cc905783223..087ced385fb 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -80,7 +80,7 @@ RCD playsound(loc, 'sound/machines/click.ogg', 50, 1) to_chat(user, "The RCD now holds [matter]/[max_matter] matter-units.") desc = "A RCD. It currently holds [matter]/[max_matter] matter-units." - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return @@ -92,7 +92,7 @@ RCD ui_interact(user) /obj/item/weapon/rcd/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "rcd.tmpl", "[name]", 450, 400, state = state) ui.open() @@ -187,16 +187,16 @@ RCD if(!proximity) return if(istype(A,/area/shuttle)||istype(A,/turf/space/transit)) return 0 - if(!(istype(A, /turf) || istype(A, /obj/machinery/door/airlock) || istype(A, /obj/structure/grille) || istype(A, /obj/structure/window))) + if(!(istype(A, /turf) || istype(A, /obj/machinery/door/airlock) || istype(A, /obj/structure/grille) || istype(A, /obj/structure/window) || istype(A, /obj/structure/lattice))) return 0 switch(mode) if(1) - if(istype(A, /turf/space)) + if(istype(A, /turf/space) || istype(A, /obj/structure/lattice)) if(useResource(1, user)) to_chat(user, "Building Floor...") activate() - var/turf/AT = A + var/turf/AT = get_turf(A) AT.ChangeTurf(/turf/simulated/floor/plating) return 1 return 0 @@ -351,14 +351,14 @@ RCD to_chat(user, "ERROR: RCD in MODE: [mode] attempted use by [user]. Send this text #coderbus or an admin.") return 0 - nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/item/weapon/rcd/proc/useResource(var/amount, var/mob/user) if(matter < amount) return 0 matter -= amount desc = "A RCD. It currently holds [matter]/[max_matter] matter-units." - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 /obj/item/weapon/rcd/proc/checkResource(var/amount, var/mob/user) diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index dc4f23657b5..f28d316f394 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -99,7 +99,6 @@ var/rank = null //actual job var/dorm = 0 // determines if this ID has claimed a dorm already - var/datum/data/record/active1 = null var/sex var/age var/photo @@ -123,9 +122,9 @@ if(guest_pass) to_chat(user, "There is a guest pass attached to this ID card") if(world.time < guest_pass.expiration_time) - to_chat(user, "It expires at [worldtime2text(guest_pass.expiration_time)].") + to_chat(user, "It expires at [station_time_timestamp("hh:mm:ss", guest_pass.expiration_time)].") else - to_chat(user, "It expired at [worldtime2text(guest_pass.expiration_time)].") + to_chat(user, "It expired at [station_time_timestamp("hh:mm:ss", guest_pass.expiration_time)].") to_chat(user, "It grants access to following areas:") for(var/A in guest_pass.temp_access) to_chat(user, "[get_access_desc(A)].") @@ -187,6 +186,14 @@ /obj/item/weapon/card/id/GetID() return src +/obj/item/weapon/card/id/proc/getRankAndAssignment() + var/jobnamedata = "" + if(rank) + jobnamedata += rank + if(rank != assignment) + jobnamedata += " (" + assignment + ")" + return jobnamedata + /obj/item/weapon/card/id/proc/is_untrackable() return untrackable @@ -440,7 +447,37 @@ RebuildHTML() if("Occupation") - var/new_job = sanitize(stripped_input(user,"What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation", "Civilian", MAX_MESSAGE_LEN)) + var/list/departments =list( + "Civilian", + "Engineering", + "Medical", + "Science", + "Security", + "Support", + "Command", + "Custom", + ) + + var/department = input(user, "What job would you like to put on this card?\nChoose a department or a custom job title.\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in departments + var/new_job = "Civilian" + + if(department == "Custom") + new_job = sanitize(stripped_input(user,"Choose a custom jon title:","Agent Card Occupation", "Civilian", MAX_MESSAGE_LEN)) + else if(department != "Civilian") + switch(department) + if("Engineering") + new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in engineering_positions + if("Medical") + new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in medical_positions + if("Science") + new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in science_positions + if("Security") + new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in security_positions + if("Support") + new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in support_positions + if("Command") + new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in command_positions + if(!Adjacent(user)) return src.assignment = new_job diff --git a/code/game/objects/items/weapons/chrono_eraser.dm b/code/game/objects/items/weapons/chrono_eraser.dm index ef1e2c91498..d1c052828f9 100644 --- a/code/game/objects/items/weapons/chrono_eraser.dm +++ b/code/game/objects/items/weapons/chrono_eraser.dm @@ -47,7 +47,7 @@ icon_state = "chronogun" item_state = "chronogun" w_class = WEIGHT_CLASS_NORMAL - flags = NODROP + flags = NODROP | DROPDEL ammo_type = list(/obj/item/ammo_casing/energy/chrono_beam) can_charge = 0 fire_delay = 50 @@ -63,10 +63,6 @@ TED = new(src.loc) qdel(src) -/obj/item/weapon/gun/energy/chrono_gun/dropped() - ..() - qdel(src) - /obj/item/weapon/gun/energy/chrono_gun/update_icon() return diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index 85e24757517..a46e8eefd48 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -17,7 +17,7 @@ "Vox" = 'icons/mob/species/vox/back.dmi' ) - var/on = 0 //if the paddles are equipped (1) or on the defib (0) + var/paddles_on_defib = TRUE //if the paddles are on the defib (TRUE) var/safety = 1 //if you can zap people with the defibs on harm mode var/powered = 0 //if there's a cell in the defib with enough power for a revive, blocks paddles from reviving otherwise var/obj/item/weapon/twohanded/shockpaddles/paddles @@ -53,7 +53,7 @@ /obj/item/weapon/defibrillator/proc/update_overlays() overlays.Cut() - if(!on) + if(paddles_on_defib) overlays += "[icon_state]-paddles" if(powered) overlays += "[icon_state]-powered" @@ -130,18 +130,18 @@ /obj/item/weapon/defibrillator/verb/toggle_paddles() set name = "Toggle Paddles" set category = "Object" - on = !on var/mob/living/carbon/human/user = usr - if(on) + + if(paddles_on_defib) //Detach the paddles into the user's hands if(!usr.put_in_hands(paddles)) - on = 0 to_chat(user, "You need a free hand to hold the paddles!") update_icon() return paddles.loc = user - else + paddles_on_defib = FALSE + else if(user.is_in_active_hand(paddles)) //Remove from their hands and back onto the defib unit remove_paddles(user) @@ -163,15 +163,16 @@ if(slot == slot_back) return 1 -/obj/item/weapon/defibrillator/proc/remove_paddles(mob/user) +/obj/item/weapon/defibrillator/proc/remove_paddles(mob/user) // from your hands var/mob/living/carbon/human/M = user if(paddles in get_both_hands(M)) M.unEquip(paddles) + paddles_on_defib = TRUE update_icon() return /obj/item/weapon/defibrillator/Destroy() - if(on) + if(!paddles_on_defib) var/M = get(paddles, /mob) remove_paddles(M) QDEL_NULL(paddles) @@ -288,7 +289,7 @@ if(istype(O)) O.unwield() to_chat(user, "The paddles snap back into the main unit.") - defib.on = 0 + defib.paddles_on_defib = TRUE loc = defib defib.update_icon() update_icon() @@ -355,7 +356,7 @@ QDEL_NULL(ghost) var/tplus = world.time - H.timeofdeath - var/tlimit = 1800 //past this much time the patient is unrecoverable (in deciseconds) + var/tlimit = 3000 //past this much time the patient is unrecoverable (in deciseconds) var/tloss = 600 //brain damage starts setting in on the patient after some time left rotting var/total_burn = 0 var/total_brute = 0 @@ -500,7 +501,7 @@ QDEL_NULL(ghost) var/tplus = world.time - H.timeofdeath - var/tlimit = 1800 //past this much time the patient is unrecoverable (in deciseconds) + var/tlimit = 3000 //past this much time the patient is unrecoverable (in deciseconds) var/tloss = 600 //brain damage starts setting in on the patient after some time left rotting var/total_burn = 0 var/total_brute = 0 diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index 58de51085de..68ccad0090d 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -132,7 +132,7 @@ /obj/item/weapon/grenade/plastic/c4/prime() var/turf/location if(target) - if(!qdeleted(target)) + if(!QDELETED(target)) location = get_turf(target) target.overlays -= image_overlay else @@ -159,7 +159,7 @@ /obj/item/weapon/grenade/plastic/x4/prime() var/turf/location if(target) - if(!qdeleted(target)) + if(!QDELETED(target)) location = get_turf(target) target.overlays -= image_overlay else @@ -193,7 +193,7 @@ /obj/item/weapon/grenade/plastic/c4_shaped/prime() var/turf/location if(target) - if(!qdeleted(target)) + if(!QDELETED(target)) location = get_turf(target) target.overlays -= image_overlay else diff --git a/code/game/objects/items/weapons/grenades/clusterbuster.dm b/code/game/objects/items/weapons/grenades/clusterbuster.dm index e238e3bda25..ca96006abad 100644 --- a/code/game/objects/items/weapons/grenades/clusterbuster.dm +++ b/code/game/objects/items/weapons/grenades/clusterbuster.dm @@ -67,7 +67,7 @@ walk_away(P,loc,rand(1,4)) spawn(rand(15,60)) - if(P && isnull(P.gcDestroyed)) + if(!QDELETED(P)) if(istype(P, /obj/item/weapon/grenade)) P.prime() qdel(src) diff --git a/code/game/objects/items/weapons/grenades/custom_grenades.dm b/code/game/objects/items/weapons/grenades/custom_grenades.dm index 82252c3a340..e9b78bbe90d 100644 --- a/code/game/objects/items/weapons/grenades/custom_grenades.dm +++ b/code/game/objects/items/weapons/grenades/custom_grenades.dm @@ -111,23 +111,23 @@ payload_name = "lubricant" stage = 2 - New() - ..() - var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src) - B1.reagents.add_reagent("lube",50) - beakers += B1 -/obj/item/weapon/grenade/chem_grenade/lube/remote - New() - ..() - CreateDefaultTrigger(/obj/item/device/assembly/signaler) -/obj/item/weapon/grenade/chem_grenade/lube/prox - New() - ..() - CreateDefaultTrigger(/obj/item/device/assembly/prox_sensor) -/obj/item/weapon/grenade/chem_grenade/lube/tripwire - New() - ..() - CreateDefaultTrigger(/obj/item/device/assembly/infra) +/obj/item/weapon/grenade/chem_grenade/lube/New() + ..() + var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src) + B1.reagents.add_reagent("lube",50) + beakers += B1 + +/obj/item/weapon/grenade/chem_grenade/lube/remote/New() + ..() + CreateDefaultTrigger(/obj/item/device/assembly/signaler) + +/obj/item/weapon/grenade/chem_grenade/lube/prox/New() + ..() + CreateDefaultTrigger(/obj/item/device/assembly/prox_sensor) + +/obj/item/weapon/grenade/chem_grenade/lube/tripwire/New() + ..() + CreateDefaultTrigger(/obj/item/device/assembly/infra) // Basic explosion grenade @@ -135,32 +135,68 @@ payload_name = "conventional" stage = 2 - New() - ..() - var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src) - var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src) - B1.reagents.add_reagent("glycerol",30) // todo: someone says NG is overpowered, test. - B1.reagents.add_reagent("sacid",15) - B2.reagents.add_reagent("sacid",15) - B2.reagents.add_reagent("facid",30) - beakers += B1 - beakers += B2 +/obj/item/weapon/grenade/chem_grenade/explosion/New() + ..() + var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src) + var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src) + B1.reagents.add_reagent("glycerol",30) // todo: someone says NG is overpowered, test. + B1.reagents.add_reagent("sacid",15) + B2.reagents.add_reagent("sacid",15) + B2.reagents.add_reagent("facid",30) + beakers += B1 + beakers += B2 // Assembly Variants -/obj/item/weapon/grenade/chem_grenade/explosion/remote - New() - ..() - CreateDefaultTrigger(/obj/item/device/assembly/signaler) +/obj/item/weapon/grenade/chem_grenade/explosion/remote/New() + ..() + CreateDefaultTrigger(/obj/item/device/assembly/signaler) + +/obj/item/weapon/grenade/chem_grenade/explosion/prox/New() + ..() + CreateDefaultTrigger(/obj/item/device/assembly/prox_sensor) + +/obj/item/weapon/grenade/chem_grenade/explosion/mine/New() + ..() + CreateDefaultTrigger(/obj/item/device/assembly/mousetrap) + + +// Water + Potassium = Boom + +/obj/item/weapon/grenade/chem_grenade/waterpotassium + payload_name = "chem explosive" + stage = 2 + +/obj/item/weapon/grenade/chem_grenade/waterpotassium/New() + ..() + var/obj/item/weapon/reagent_containers/glass/beaker/large/B1 = new(src) + var/obj/item/weapon/reagent_containers/glass/beaker/large/B2 = new(src) + B1.reagents.add_reagent("water",100) + B2.reagents.add_reagent("potassium",100) + beakers += B1 + beakers += B2 + +/obj/item/weapon/grenade/chem_grenade/waterpotassium/remote/New() + ..() + CreateDefaultTrigger(/obj/item/device/assembly/signaler) + +/obj/item/weapon/grenade/chem_grenade/waterpotassium/prox/New() + ..() + CreateDefaultTrigger(/obj/item/device/assembly/prox_sensor) + + +/obj/item/weapon/grenade/chem_grenade/waterpotassium/tripwire/New() + ..() + CreateDefaultTrigger(/obj/item/device/assembly/infra) + +/obj/item/weapon/grenade/chem_grenade/waterpotassium/tripwire_armed/New() + ..() + CreateDefaultTrigger(/obj/item/device/assembly/infra/armed) + +/obj/item/weapon/grenade/chem_grenade/waterpotassium/tripwire_armed_stealth/New() + ..() + CreateDefaultTrigger(/obj/item/device/assembly/infra/armed/stealth) -/obj/item/weapon/grenade/chem_grenade/explosion/prox - New() - ..() - CreateDefaultTrigger(/obj/item/device/assembly/prox_sensor) -/obj/item/weapon/grenade/chem_grenade/explosion/mine - New() - ..() - CreateDefaultTrigger(/obj/item/device/assembly/mousetrap) // Basic EMP grenade /obj/item/weapon/grenade/chem_grenade/emp diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index 24bcb7a8c2c..da24b6084c6 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -108,6 +108,18 @@ color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN) ..() +/obj/item/weapon/restraints/handcuffs/cable/proc/cable_color(var/colorC) + if(colorC) + if(colorC == "rainbow") + colorC = color_rainbow() + color = colorC + else + color = COLOR_RED + +/obj/item/weapon/restraints/handcuffs/cable/proc/color_rainbow() + color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN) + return color + /obj/item/weapon/restraints/handcuffs/alien icon_state = "handcuffAlien" @@ -143,6 +155,9 @@ if(!remove_item_from_storage(user)) user.unEquip(src) qdel(src) + else if(istype(I, /obj/item/toy/crayon)) + var/obj/item/toy/crayon/C = I + cable_color(C.colourName) /obj/item/weapon/restraints/handcuffs/cable/zipties name = "zipties" diff --git a/code/game/objects/items/weapons/holy_weapons.dm b/code/game/objects/items/weapons/holy_weapons.dm index d721aadfbed..59335cb1c3f 100644 --- a/code/game/objects/items/weapons/holy_weapons.dm +++ b/code/game/objects/items/weapons/holy_weapons.dm @@ -70,7 +70,7 @@ icon_state = "disintegrate" item_state = "disintegrate" desc = "This hand of yours glows with an awesome power!" - flags = ABSTRACT | NODROP + flags = ABSTRACT | NODROP| DROPDEL w_class = WEIGHT_CLASS_HUGE hitsound = 'sound/weapons/sear.ogg' damtype = BURN diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 8109e8e8b86..13826f34564 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -11,6 +11,7 @@ item_color = "b" var/allow_multiple = 0 var/uses = -1 + flags = DROPDEL /obj/item/weapon/implant/proc/trigger(emote, mob/source) @@ -82,6 +83,5 @@ return "No information available" /obj/item/weapon/implant/dropped(mob/user) - ..() . = 1 - qdel(src) + ..() \ No newline at end of file diff --git a/code/game/objects/items/weapons/legcuffs.dm b/code/game/objects/items/weapons/legcuffs.dm index 21d8828310f..ae738b3ccd0 100644 --- a/code/game/objects/items/weapons/legcuffs.dm +++ b/code/game/objects/items/weapons/legcuffs.dm @@ -128,19 +128,18 @@ armed = 1 icon_state = "e_snare" trap_damage = 0 + flags = DROPDEL /obj/item/weapon/restraints/legcuffs/beartrap/energy/New() ..() - spawn(100) - if(!istype(loc, /mob)) - var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread - sparks.set_up(1, 1, src) - sparks.start() - qdel(src) + addtimer(src, "dissipate", 100) -/obj/item/weapon/restraints/legcuffs/beartrap/energy/dropped() - ..() - qdel(src) +/obj/item/weapon/restraints/legcuffs/beartrap/energy/proc/dissipate() + if(!ismob(loc)) + var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread + sparks.set_up(1, 1, src) + sparks.start() + qdel(src) /obj/item/weapon/restraints/legcuffs/beartrap/energy/attack_hand(mob/user) Crossed(user) //honk diff --git a/code/game/objects/items/weapons/rpd.dm b/code/game/objects/items/weapons/rpd.dm index 85d50a6ad12..57303d72d67 100644 --- a/code/game/objects/items/weapons/rpd.dm +++ b/code/game/objects/items/weapons/rpd.dm @@ -140,7 +140,7 @@ var/list/pipemenu = list( ui_interact(user) /obj/item/weapon/rpd/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "rpd.tmpl", "[name]", 400, 650, state = state) ui.open() @@ -173,7 +173,7 @@ var/list/pipemenu = list( mode = text2num(sanitize(href_list["mode"])) else return - nanomanager.update_uis(src) + SSnanoui.update_uis(src) //What the RPD actually does diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 302fa1bd0bc..30d8f8a9ef5 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -829,6 +829,26 @@ return return ..() + +/obj/item/weapon/storage/box/centcomofficer + name = "officer kit" + +/obj/item/weapon/storage/box/centcomofficer/New() + ..() + contents = list() + new /obj/item/clothing/mask/breath(src) + new /obj/item/weapon/tank/emergency_oxygen/double/full(src) + new /obj/item/device/flashlight/seclite(src) + new /obj/item/weapon/kitchen/knife/combat(src) + + new /obj/item/device/radio/centcom(src) + new /obj/item/weapon/door_remote/omni(src) + new /obj/item/weapon/implanter/death_alarm(src) + + new /obj/item/weapon/reagent_containers/hypospray/combat/nanites(src) + new /obj/item/weapon/pinpointer/advpinpointer(src) + + #undef NODESIGN #undef NANOTRASEN #undef SYNDI diff --git a/code/game/objects/items/weapons/tanks/jetpack.dm b/code/game/objects/items/weapons/tanks/jetpack.dm index 3334fdf2de7..42dbbbda4b6 100644 --- a/code/game/objects/items/weapons/tanks/jetpack.dm +++ b/code/game/objects/items/weapons/tanks/jetpack.dm @@ -96,6 +96,14 @@ ..() air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) +/obj/item/weapon/tank/jetpack/void/grey + name = "Void Jetpack (Oxygen)" + icon_state = "jetpack-void-grey" + +/obj/item/weapon/tank/jetpack/void/gold + name = "Retro Jetpack (Oxygen)" + icon_state = "jetpack-void-gold" + /obj/item/weapon/tank/jetpack/oxygen name = "Jetpack (Oxygen)" diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 3ee198e8765..b18840fc628 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -141,7 +141,7 @@ /obj/item/weapon/tank/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index 9c78e6f7b94..01379abb0c0 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -115,10 +115,12 @@ flags = ABSTRACT /obj/item/weapon/twohanded/offhand/unwield() - qdel(src) + if(!QDELETED(src)) + qdel(src) /obj/item/weapon/twohanded/offhand/wield() - qdel(src) + if(!QDELETED(src)) + qdel(src) ///////////Two hand required objects/////////////// //This is for objects that require two hands to even pick up diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm index d5ef8fce545..0738d57e8fb 100644 --- a/code/game/objects/obj_defense.dm +++ b/code/game/objects/obj_defense.dm @@ -130,7 +130,7 @@ /obj/singularity_act() ex_act(1) - if(src && !qdeleted(src)) + if(src && !QDELETED(src)) qdel(src) return 2 diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 20cc3afc756..9830fdf6619 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -66,7 +66,7 @@ /obj/Destroy() machines -= src processing_objects -= src - nanomanager.close_uis(src) + SSnanoui.close_uis(src) return ..() /obj/proc/process() diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/structures/aliens.dm similarity index 81% rename from code/game/objects/effects/aliens.dm rename to code/game/objects/structures/aliens.dm index ebeda7a77c0..3960d4c8dcc 100644 --- a/code/game/objects/effects/aliens.dm +++ b/code/game/objects/structures/aliens.dm @@ -4,7 +4,6 @@ * Resin * Weeds * Egg - * effect/acid */ #define WEED_NORTH_EDGING "north" @@ -317,6 +316,9 @@ spawn(rand(MIN_GROWTH_TIME, MAX_GROWTH_TIME)) Grow() +/obj/structure/alien/egg/attack_alien(mob/living/carbon/alien/user) + return attack_hand(user) + /obj/structure/alien/egg/attack_hand(mob/living/user) if(user.get_int_organ(/obj/item/organ/internal/xenos/plasmavessel)) switch(status) @@ -420,90 +422,6 @@ #undef MIN_GROWTH_TIME #undef MAX_GROWTH_TIME - -/* - * Acid - */ -/obj/effect/acid - gender = PLURAL - name = "acid" - desc = "Burbling corrossive stuff." - icon = 'icons/effects/effects.dmi' - icon_state = "acid" - density = 0 - opacity = 0 - anchored = 1 - unacidable = 1 - var/atom/target - var/ticks = 0 - var/target_strength = 0 - - -/obj/effect/acid/New(loc, targ) - ..(loc) - target = targ - - //handle APCs and newscasters and stuff nicely - pixel_x = target.pixel_x - pixel_y = target.pixel_y - - if(isturf(target)) //Turfs take twice as long to take down. - target_strength = 640 - else - target_strength = 320 - tick() - - -/obj/effect/acid/proc/tick() - if(!target) - qdel(src) - - ticks++ - - if(ticks >= target_strength) - target.visible_message("[target] collapses under its own weight into a puddle of goop and undigested debris!") - - if(istype(target, /obj/structure/closet)) - var/obj/structure/closet/T = target - T.dump_contents() - qdel(target) - - if(istype(target, /turf/simulated/mineral)) - var/turf/simulated/mineral/M = target - M.ChangeTurf(/turf/simulated/floor/plating/airless/asteroid) - - if(istype(target, /turf/simulated/floor)) - var/turf/simulated/floor/F = target - F.ChangeTurf(/turf/space) - - if(istype(target, /turf/simulated/wall)) - var/turf/simulated/wall/W = target - W.dismantle_wall(1) - - else - qdel(target) - - qdel(src) - return - - x = target.x - y = target.y - z = target.z - - switch(target_strength - ticks) - if(480) - visible_message("[target] is holding up against the acid!") - if(320) - visible_message("[target] is being melted by the acid!") - if(160) - visible_message("[target] is struggling to withstand the acid!") - if(80) - visible_message("[target] begins to crumble under the acid!") - - spawn(1) - if(src) - tick() - #undef WEED_NORTH_EDGING #undef WEED_SOUTH_EDGING #undef WEED_EAST_EDGING diff --git a/code/game/objects/structures/crates_lockers/closets/malfunction.dm b/code/game/objects/structures/crates_lockers/closets/malfunction.dm index ba32e37f38c..06d5fd19d30 100644 --- a/code/game/objects/structures/crates_lockers/closets/malfunction.dm +++ b/code/game/objects/structures/crates_lockers/closets/malfunction.dm @@ -9,8 +9,7 @@ ..() new /obj/item/weapon/tank/jetpack/void(src) new /obj/item/clothing/mask/breath(src) - new /obj/item/clothing/head/helmet/space/nasavoid(src) - new /obj/item/clothing/suit/space/nasavoid(src) + new /obj/effect/nasavoidsuitspawner(src) new /obj/item/weapon/crowbar(src) new /obj/item/weapon/stock_parts/cell(src) new /obj/item/device/multitool(src) \ No newline at end of file diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index a9a302dae82..19833a9933c 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -53,7 +53,7 @@ new /obj/item/weapon/storage/box/ids(src) new /obj/item/weapon/storage/box/PDAs(src) new /obj/item/clothing/suit/armor/vest(src) - new /obj/item/weapon/gun/energy/gun(src) + new /obj/item/weapon/gun/energy/gun/mini(src) new /obj/item/device/flash(src) new /obj/item/clothing/accessory/petcollar(src) new /obj/item/weapon/door_remote/civillian(src) diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 744bd26fc85..ce9f8f2f7c5 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -363,7 +363,7 @@ icon_state = "crema_active" for(var/mob/living/M in search_contents_for(/mob/living)) - if(!M || !isnull(M.gcDestroyed)) + if(QDELETED(M)) continue if(M.stat!=2) M.emote("scream") @@ -372,7 +372,7 @@ user.create_attack_log("Cremated [M.name] ([M.ckey])") log_attack("[user.name] ([user.ckey]) cremated [M.name] ([M.ckey])") M.death(1) - if(!M || !isnull(M.gcDestroyed)) + if(QDELETED(M)) continue // Re-check for mobs that delete themselves on death M.ghostize() qdel(M) diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm index 1677b776c15..da4c1181f01 100644 --- a/code/game/objects/structures/musician.dm +++ b/code/game/objects/structures/musician.dm @@ -115,7 +115,7 @@ if(!instrumentObj) return - ui = nanomanager.try_update_ui(user, instrumentObj, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, instrumentObj, ui_key, ui, force_open) if(!ui) ui = new(user, instrumentObj, ui_key, "song.tmpl", instrumentObj.name, 700, 500) ui.open() @@ -149,7 +149,7 @@ lines = new() tempo = sanitize_tempo(5) // default 120 BPM name = "" - nanomanager.update_uis(src) + SSnanoui.update_uis(src) else if(href_list["import"]) playing = 0 @@ -185,11 +185,11 @@ lines.Remove(l) else linenum++ - nanomanager.update_uis(src) + SSnanoui.update_uis(src) else if(href_list["help"]) help = !help - nanomanager.update_uis(src) + SSnanoui.update_uis(src) if(href_list["repeat"]) //Changing this from a toggle to a number of repeats to avoid infinite loops. if(playing) @@ -199,11 +199,11 @@ repeat = 0 if(repeat > max_repeat) repeat = max_repeat - nanomanager.update_uis(src) + SSnanoui.update_uis(src) else if(href_list["tempo"]) tempo = sanitize_tempo(tempo + text2num(href_list["tempo"]) * world.tick_lag) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) else if(href_list["play"]) if(playing) @@ -211,7 +211,7 @@ playing = 1 spawn() playsong(usr) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) else if(href_list["insertline"]) var/num = round(text2num(href_list["insertline"])) @@ -227,14 +227,14 @@ newline = copytext(newline, 1, 200) lines.Insert(num, newline) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) else if(href_list["deleteline"]) var/num = round(text2num(href_list["deleteline"])) if(num > lines.len || num < 1) return lines.Cut(num, num + 1) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) else if(href_list["modifyline"]) var/num = round(text2num(href_list["modifyline"])) @@ -246,11 +246,11 @@ if(num > lines.len || num < 1) return lines[num] = content - nanomanager.update_uis(src) + SSnanoui.update_uis(src) else if(href_list["stop"]) playing = 0 - nanomanager.update_uis(src) + SSnanoui.update_uis(src) /datum/song/proc/sanitize_tempo(new_tempo) new_tempo = abs(new_tempo) diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm index fb176ce9dba..fc20d48cbe2 100644 --- a/code/game/objects/structures/tank_dispenser.dm +++ b/code/game/objects/structures/tank_dispenser.dm @@ -40,7 +40,7 @@ /obj/structure/dispenser/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state) user.set_machine(src) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "tank_dispenser.tmpl", name, 275, 100, state = state) ui.open() @@ -62,7 +62,7 @@ to_chat(user, "You put [I] in [src].") else to_chat(user, "[src] is full.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) if(istype(I, /obj/item/weapon/tank/plasma)) if(plasmatanks < 10) user.drop_item() @@ -73,7 +73,7 @@ to_chat(user, "You put [I] in [src].") else to_chat(user, "[src] is full.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) if(istype(I, /obj/item/weapon/wrench)) if(anchored) to_chat(user, "You lean down and unwrench [src].") @@ -114,7 +114,7 @@ update_icon() add_fingerprint(usr) updateUsrDialog() - nanomanager.update_uis(src) + SSnanoui.update_uis(src) else - nanomanager.close_user_uis(usr,src) + SSnanoui.close_user_uis(usr,src) return 1 diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index 18ff4d697fa..787aa4ef1a3 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -141,7 +141,7 @@ /turf/simulated/floor/engine/cult/New() ..() if(ticker.mode)//only do this if the round is going..otherwise..fucking asteroid.. - icon_state = ticker.mode.cultdat.cult_floor_icon_state + icon_state = ticker.cultdat.cult_floor_icon_state /turf/simulated/floor/engine/cult/narsie_act() return diff --git a/code/game/turfs/simulated/walls_misc.dm b/code/game/turfs/simulated/walls_misc.dm index 8ce32658a62..18492da2d00 100644 --- a/code/game/turfs/simulated/walls_misc.dm +++ b/code/game/turfs/simulated/walls_misc.dm @@ -14,7 +14,7 @@ ..() if(ticker.mode)//game hasn't started offically don't do shit.. new /obj/effect/temp_visual/cult/turf(src) - icon_state = ticker.mode.cultdat.cult_wall_icon_state + icon_state = ticker.cultdat.cult_wall_icon_state /turf/simulated/wall/cult/artificer name = "runed stone wall" diff --git a/code/hub.dm b/code/hub.dm index 0dfc4359ca3..d54b49e1011 100644 --- a/code/hub.dm +++ b/code/hub.dm @@ -3,6 +3,7 @@ hub = "Exadv1.spacestation13" hub_password = "kMZy3U5jJHSiBQjr" name = "Space Station 13" + /var/hub_password_base = "kMZy3U5jJHSiBQjr" /* This is for any host that would like their server to appear on the main SS13 hub. To use it, simply replace the password above, with the password found below, and it should work. If not, let us know on the main tgstation IRC channel of irc.rizon.net #tgstation13 we can help you there. diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 28df27026a6..e3889ebf1bd 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -159,8 +159,8 @@ var/list/admin_verbs_debug = list( /client/proc/restart_controller, /client/proc/enable_debug_verbs, /client/proc/toggledebuglogs, - /client/proc/qdel_toggle, /client/proc/cmd_display_del_log, + /client/proc/cmd_display_del_log_simple, /client/proc/debugNatureMapGenerator, /client/proc/check_bomb_impacts, /client/proc/test_movable_UI, @@ -976,6 +976,7 @@ var/list/admin_verbs_ticket = list( to_chat(T, "Man up and deal with it.") to_chat(T, "Move on.") + T << 'sound/voice/ManUp1.ogg' log_admin("[key_name(usr)] told [key_name(T)] to man up and deal with it.") message_admins("[key_name_admin(usr)] told [key_name(T)] to man up and deal with it.") diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm index 9692eac6713..21731cc8b7a 100644 --- a/code/modules/admin/secrets.dm +++ b/code/modules/admin/secrets.dm @@ -23,6 +23,7 @@ Show Game Mode   Show Crew Manifest
Show current traitors and objectives
+ Set Night Shift Mode
Bombs
Bombing List   Remove all bombs currently in existence diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index d92b9088d4a..6bb997f17f9 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1576,19 +1576,19 @@ log_admin("Admin [key_name_admin(usr)] has unlocked the Cult's next objective.") else if(href_list["cult_mindspeak"]) - var/input = stripped_input(usr, "Communicate to all the cultists with the voice of [ticker.mode.cultdat.entity_name]", "Voice of [ticker.mode.cultdat.entity_name]", "") + var/input = stripped_input(usr, "Communicate to all the cultists with the voice of [ticker.cultdat.entity_name]", "Voice of [ticker.cultdat.entity_name]", "") if(!input) return for(var/datum/mind/H in ticker.mode.cult) if (H.current) - to_chat(H.current, "[ticker.mode.cultdat.entity_name] murmurs, [input]
") + to_chat(H.current, "[ticker.cultdat.entity_name] murmurs, [input]") for(var/mob/dead/observer/O in player_list) - to_chat(O, "[ticker.mode.cultdat.entity_name] murmurs, [input]") + to_chat(O, "[ticker.cultdat.entity_name] murmurs, [input]") - message_admins("Admin [key_name_admin(usr)] has talked with the Voice of [ticker.mode.cultdat.entity_name].") - log_admin("[key_name(usr)] Voice of [ticker.mode.cultdat.entity_name]: [input]") + message_admins("Admin [key_name_admin(usr)] has talked with the Voice of [ticker.cultdat.entity_name].") + log_admin("[key_name(usr)] Voice of [ticker.cultdat.entity_name]: [input]") else if(href_list["adminplayerobservecoodjump"]) if(!check_rights(R_ADMIN)) return @@ -3023,6 +3023,24 @@ dat += "[H]H.dna = null" dat += "" usr << browse(dat, "window=fingerprints;size=440x410") + if("night_shift_set") + var/val = alert(usr, "What do you want to set night shift to? This will override the automatic system until set to automatic again.", "Night Shift", "On", "Off", "Automatic") + switch(val) + if("Automatic") + if(config.enable_night_shifts) + SSnightshift.can_fire = TRUE + SSnightshift.fire() + else + SSnightshift.update_nightshift(FALSE, TRUE) + to_chat(usr, "Night shift set to automatic.") + if("On") + SSnightshift.can_fire = FALSE + SSnightshift.update_nightshift(TRUE, FALSE) + to_chat(usr, "Night shift forced on.") + if("Off") + SSnightshift.can_fire = FALSE + SSnightshift.update_nightshift(FALSE, FALSE) + to_chat(usr, "Night shift forced off.") else if(usr) log_admin("[key_name(usr)] used secret [href_list["secretsadmin"]]") diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index f8d61606789..d267ca682e1 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -748,6 +748,65 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that if("Respawnable Mobs") to_chat(usr, jointext(respawnable_list,",")) +/client/proc/cmd_display_del_log() + set category = "Debug" + set name = "Display del() Log" + set desc = "Display del's log of everything that's passed through it." + + if(!check_rights(R_DEBUG)) + return + + var/list/dellog = list("List of things that have gone through qdel this round

    ") + sortTim(SSgarbage.items, cmp=/proc/cmp_qdel_item_time, associative = TRUE) + for(var/path in SSgarbage.items) + var/datum/qdel_item/I = SSgarbage.items[path] + dellog += "
  1. [path]
      " + if(I.failures) + dellog += "
    • Failures: [I.failures]
    • " + dellog += "
    • qdel() Count: [I.qdels]
    • " + dellog += "
    • Destroy() Cost: [I.destroy_time]ms
    • " + if(I.hard_deletes) + dellog += "
    • Total Hard Deletes [I.hard_deletes]
    • " + dellog += "
    • Time Spent Hard Deleting: [I.hard_delete_time]ms
    • " + if(I.slept_destroy) + dellog += "
    • Sleeps: [I.slept_destroy]
    • " + if(I.no_respect_force) + dellog += "
    • Ignored force: [I.no_respect_force]
    • " + if(I.no_hint) + dellog += "
    • No hint: [I.no_hint]
    • " + dellog += "
  2. " + + dellog += "
" + + usr << browse(dellog.Join(), "window=dellog") + +/client/proc/cmd_display_del_log_simple() + set category = "Debug" + set name = "Display Simple del() Log" + set desc = "Display a compacted del's log." + + if(!check_rights(R_DEBUG)) + return + + var/dat = "List of things that failed to GC this round

" + for(var/path in SSgarbage.items) + var/datum/qdel_item/I = SSgarbage.items[path] + if(I.failures) + dat += "[I] - [I.failures] times
" + + dat += "List of paths that did not return a qdel hint in Destroy()

" + for(var/path in SSgarbage.items) + var/datum/qdel_item/I = SSgarbage.items[path] + if(I.no_hint) + dat += "[I]
" + + dat += "List of paths that slept in Destroy()

" + for(var/path in SSgarbage.items) + var/datum/qdel_item/I = SSgarbage.items[path] + if(I.slept_destroy) + dat += "[I]
" + + usr << browse(dat, "window=simpledellog") /client/proc/cmd_admin_toggle_block(var/mob/M,var/block) if(!check_rights(R_SPAWN)) @@ -773,7 +832,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that set desc = "Force the client to redownload NanoUI Resources" // Close open NanoUIs. - nanomanager.close_user_uis(usr) + SSnanoui.close_user_uis(usr) // Re-load the assets. var/datum/asset/assets = get_asset_datum(/datum/asset/nanoui) diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index 8651d26f016..bd771ea8c0c 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -26,7 +26,7 @@ cross = image('icons/obj/storage.dmi',"tome") font_color = "red" prayer_type = "CULTIST PRAYER" - deity = ticker.mode.cultdat.entity_name + deity = ticker.cultdat.entity_name msg = "[bicon(cross)][prayer_type][deity ? " (to [deity])" : ""]:[key_name(src, 1)] (?) (PP) (VV) (SM) ([admin_jump_link(src)]) (CA) (SC) (BLESS) (SMITE): [msg]" diff --git a/code/modules/arcade/arcade_base.dm b/code/modules/arcade/arcade_base.dm index b043eb934c9..26f1462201b 100644 --- a/code/modules/arcade/arcade_base.dm +++ b/code/modules/arcade/arcade_base.dm @@ -131,7 +131,7 @@ T.amount = "[token_price]" T.source_terminal = src.name T.date = current_date_string - T.time = worldtime2text() + T.time = station_time_timestamp() customer_account.transaction_log.Add(T) return 1 diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm index 16b047ab1f0..6a2dbf02c18 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -7,12 +7,16 @@ bomb_name = "tripwire mine" + secured = 0 // toggle_secure()'ed in New() for correct adding to processing_objects, won't work otherwise + dir = EAST var/on = 0 - var/visible = 0 + var/visible = 1 var/obj/effect/beam/i_beam/first = null var/obj/effect/beam/i_beam/last = null var/max_nesting_level = 10 var/turf/fire_location + var/emission_cycles = 0 + var/emission_cap = 20 /obj/item/device/assembly/infra/Destroy() if(first) @@ -22,7 +26,11 @@ return ..() /obj/item/device/assembly/infra/describe() - return "The infrared trigger is [on?"on":"off"]." + return "The assembly is [secured ? "secure" : "not secure"]. The infrared trigger is [on ? "on" : "off"]." + +/obj/item/device/assembly/infra/examine(mob/user) + ..() + to_chat(user, describe()) /obj/item/device/assembly/infra/activate() if(!..()) return 0//Cooldown check @@ -36,11 +44,22 @@ processing_objects.Add(src) else on = 0 - if(first) qdel(first) + if(first) + qdel(first) processing_objects.Remove(src) update_icon() return secured +/obj/item/device/assembly/infra/New() + ..() + if(!secured) + toggle_secure() + +/obj/item/device/assembly/infra/proc/arm() // Forces the device to arm no matter its current state. + if(!secured) // Checked because arm() might be called sometime after the object is spawned. + toggle_secure() + on = 1 + /obj/item/device/assembly/infra/update_icon() overlays.Cut() attached_overlays = list() @@ -51,38 +70,22 @@ if(holder) holder.update_icon() -/obj/item/device/assembly/infra/proc/get_valid_loc(atom/A, atom/prev, level = 0) - if(!A) - A = loc - if(!prev) - prev = src - if(level > max_nesting_level) - return null - else if(isturf(A)) - return A - else if(isobj(A)) - var/obj/O = A - if(isassembly(A) || O.IsAssemblyHolder() || istype(A, /obj/item/device/onetankbomb)) - return .(A.loc, A, level + 1) - else if(ismob(A)) - var/mob/user = A - if(user.get_active_hand() == prev || user.get_inactive_hand() == prev) - return .(A.loc, A, level + 1) - return null - /obj/item/device/assembly/infra/process() - if(!on || fire_location != get_turf(loc)) - if(first) - qdel(first) - return + var/turf/T = get_turf(src) + if(first && (!on || !fire_location || fire_location != T || emission_cycles >= emission_cap)) + qdel(first) + return + if(!on) + return if(!secured) return if(first && last) last.process() + emission_cycles++ return - var/turf/T = get_valid_loc() if(T) fire_location = T + emission_cycles = 0 var/obj/effect/beam/i_beam/I = new /obj/effect/beam/i_beam(T) I.master = src I.density = 1 @@ -124,6 +127,8 @@ return 0 pulse(0) audible_message("[bicon(src)] *beep* *beep*", null, 3) + if(first) + qdel(first) cooldown = 2 spawn(10) process_cooldown() @@ -177,6 +182,21 @@ if(usr.machine == src) interact(usr) + if(first) + qdel(first) + + + +/obj/item/device/assembly/infra/armed/New() + ..() + spawn(3) + if(holder) + if(holder.master) + dir = holder.master.dir + arm() + +/obj/item/device/assembly/infra/armed/stealth + visible = 0 /***************************IBeam*********************************/ @@ -191,6 +211,8 @@ var/limit = null var/visible = 0.0 var/left = null + var/life_cycles = 0 + var/life_cap = 20 anchored = 1.0 pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE @@ -209,7 +231,8 @@ transform = turn(matrix(), dir2angle(dir)) /obj/effect/beam/i_beam/process() - if((loc.density || !(master))) + life_cycles++ + if(loc.density || !master || life_cycles >= life_cap) qdel(src) return if(left > 0) diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm index 959a8d60452..6c94893d6db 100644 --- a/code/modules/assembly/signaler.dm +++ b/code/modules/assembly/signaler.dm @@ -29,7 +29,8 @@ /obj/item/device/assembly/signaler/Destroy() if(radio_controller) - radio_controller.remove_object(src,frequency) + radio_controller.remove_object(src, frequency) + radio_connection = null return ..() /obj/item/device/assembly/signaler/describe() diff --git a/code/modules/awaymissions/maploader/writer.dm b/code/modules/awaymissions/maploader/writer.dm index 842a51fbce5..c6d1fd589cf 100644 --- a/code/modules/awaymissions/maploader/writer.dm +++ b/code/modules/awaymissions/maploader/writer.dm @@ -136,13 +136,13 @@ // Objects loop if(!(flags & DMM_IGNORE_OBJS)) for(var/obj/O in model.contents) - if(O.dont_save || !isnull(O.gcDestroyed)) + if(O.dont_save || QDELETED(O)) continue obj_template += "[O.type][check_attributes(O,use_json=use_json)]," // Mobs Loop for(var/mob/M in model.contents) - if(M.dont_save || !isnull(M.gcDestroyed)) + if(M.dont_save || QDELETED(M)) continue if(M.client) if(!(flags & DMM_IGNORE_PLAYERS)) diff --git a/code/modules/awaymissions/mission_code/spacehotel_npcs.dm b/code/modules/awaymissions/mission_code/spacehotel_npcs.dm index 91eb76c6c4c..6d716cdf387 100644 --- a/code/modules/awaymissions/mission_code/spacehotel_npcs.dm +++ b/code/modules/awaymissions/mission_code/spacehotel_npcs.dm @@ -17,6 +17,26 @@ /mob/living/carbon/human/interactive/away/hotel/guard/doSetup() ..("Guard") + // anti-pinata cheese + var/obj/item/weapon/implant/dust/D = new /obj/item/weapon/implant/dust(src) + D.implant(src) + + for(var/obj/item/I in get_all_slots()) + I.flags |= NODROP + + // FIXME(crazylemon) a hack to prevent guards from running around with an + // extra security jumpsuit like a goof + for(var/obj/item/clothing/under/U in get_all_slots()) + if(w_uniform != U) + qdel(U) + +/mob/living/carbon/human/interactive/away/hotel/guard/KnockOut() + // you'll never take me alive (this triggers the implant) + emote("deathgasp") + if(stat != DEAD) + // mission failed. we'll get em next time + ..() + /mob/living/carbon/human/interactive/away/hotel/chef default_job = /datum/job/chef away_area = /area/awaymission/spacehotel/kitchen diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm index ca3d17e9c50..b64f965a81a 100644 --- a/code/modules/client/client defines.dm +++ b/code/modules/client/client defines.dm @@ -20,6 +20,13 @@ var/adminhelped = 0 + var/gc_destroyed //Time when this object was destroyed. + +#ifdef TESTING + var/running_find_references + var/last_find_references = 0 +#endif + /////////////// //SOUND STUFF// /////////////// diff --git a/code/modules/client/preference/loadout/loadout_racial.dm b/code/modules/client/preference/loadout/loadout_racial.dm index 09b21a63642..38d216ae156 100644 --- a/code/modules/client/preference/loadout/loadout_racial.dm +++ b/code/modules/client/preference/loadout/loadout_racial.dm @@ -26,19 +26,16 @@ display_name = "hi-tech veil" description = "A common traditional nano-fiber veil worn by many Tajaran, It is rare and offensive to see it on other races." path = /obj/item/clothing/glasses/tajblind/sci - allowed_roles = list("Scientist", "Research Director", "Robotocist") /datum/gear/racial/tajeng display_name = "industrial veil" description = "A common traditional nano-fiber veil worn by many Tajaran, It is rare and offensive to see it on other races." path = /obj/item/clothing/glasses/tajblind/eng - allowed_roles = list("Chief Engineer", "Station Engineer", "Mechanic", "Life Support Specialist") /datum/gear/racial/tajcargo display_name = "khaki veil" description = "A common traditional nano-fiber veil worn by many Tajaran, It is rare and offensive to see it on other races. It is light and comfy!" path = /obj/item/clothing/glasses/tajblind/cargo - allowed_roles = list("Quartermaster","Cargo Technician", "Miner") /datum/gear/racial/footwraps display_name = "cloth footwraps" diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 80350b3f3fe..645d0cdf633 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -131,6 +131,7 @@ desc = "A true prankster's facial attire. A clown is incomplete without his wig and mask." icon_state = "clown" item_state = "clown_hat" + flags = NODROP /obj/item/clothing/mask/gas/sexyclown name = "sexy-clown wig and mask" diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index dcdf7c9d7b2..43a8676bb29 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -94,6 +94,7 @@ w_class = WEIGHT_CLASS_TINY resist_time = 150 mute = MUTE_MUFFLE + flags = DROPDEL species_fit = list("Vox", "Unathi", "Tajaran", "Vulpkanin", "Grey") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/mask.dmi', @@ -109,9 +110,8 @@ R.loc = T transfer_fingerprints_to(R) playsound(src,'sound/items/poster_ripped.ogg',40,1) - spawn(0) // Because of how dropping is done, if the muzzle gets deleted now, icons won't properly update and the whole unEquip() proc will break stuff. - qdel(src) // This makes sure it gets deleted AFTER all that has to be done is done. - user.emote("scream") + user.emote("scream") + . = ..() /obj/item/clothing/mask/muzzle/safety name = "safety muzzle" diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 7500af07af3..172401ec0d7 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -525,7 +525,7 @@ if(!user) return - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, ((src.loc != user) ? ai_interface_path : interface_path), interface_title, 480, 550, state = state) ui.open() diff --git a/code/modules/clothing/spacesuits/void.dm b/code/modules/clothing/spacesuits/void.dm index cce0f4c49b3..df26d6f2f15 100644 --- a/code/modules/clothing/spacesuits/void.dm +++ b/code/modules/clothing/spacesuits/void.dm @@ -1,14 +1,113 @@ -//NASA Voidsuit +//Voidsuits /obj/item/clothing/head/helmet/space/nasavoid name = "NASA Void Helmet" - desc = "A high tech, NASA Centcom branch designed, dark red space suit helmet. Used for AI satellite maintenance." - icon_state = "void" + desc = "A high tech, NASA Centcom branch designed space suit helmet. Used for AI satellite maintenance." + icon_state = "void-red" item_state = "void" + flags_inv = HIDEMASK|HIDEEARS /obj/item/clothing/suit/space/nasavoid - name = "NASA Voidsuit" - icon_state = "void" + name = "NASA Void Suit" + icon_state = "void-red" item_state = "void" - desc = "A high tech, NASA Centcom branch designed, dark red Space suit. Used for AI satellite maintenance." - allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/multitool) \ No newline at end of file + desc = "A high tech, NASA Centcom branch designed space suit. Used for AI satellite maintenance." + allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/multitool) + +//Colors!!! +/obj/item/clothing/head/helmet/space/nasavoid/green + icon_state = "void-green" + +/obj/item/clothing/suit/space/nasavoid/green + icon_state = "void-green" + +/obj/item/clothing/head/helmet/space/nasavoid/ntblue + icon_state = "void-ntblue" + +/obj/item/clothing/suit/space/nasavoid/ntblue + icon_state = "void-ntblue" + +/obj/item/clothing/head/helmet/space/nasavoid/purple + icon_state = "void-purple" + +/obj/item/clothing/suit/space/nasavoid/purple + icon_state = "void-purple" + +/obj/item/clothing/head/helmet/space/nasavoid/yellow + icon_state = "void-yellow" + +/obj/item/clothing/suit/space/nasavoid/yellow + icon_state = "void-yellow" + +/obj/item/clothing/head/helmet/space/nasavoid/ltblue + icon_state = "void-light_blue" + +/obj/item/clothing/suit/space/nasavoid/ltblue + icon_state = "void-light_blue" + + +//Captian's Suit, like the other captian's suit, but looks better, at the cost of armor +/obj/item/clothing/head/helmet/space/nasavoid/captain + name = "Fancy Retro Void Helmet" + icon_state = "void-captian" + desc = "A high tech, NASA Centcom branch designed space suit helmet. Used for AI satellite maintenance. This one is fit for a captain." + +/obj/item/clothing/suit/space/nasavoid/captain + name = "Fancy NASA Void Suit" + icon_state = "void-captian" + desc = "A high tech, NASA Centcom branch designed space suit. Used for AI satellite maintenance. This one is fit for a captain." + +//Syndi's suit, on par with a blood red softsuit + +/obj/item/clothing/head/helmet/space/nasavoid/syndi + name = "Blood Red Retro Void Helmet" + icon_state = "void-syndi" + desc = "A high tech, NASA Centcom branch designed space suit helmet. This one looks rather suspicious." + flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE + armor = list(melee = 40, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) + +/obj/item/clothing/suit/space/nasavoid/syndi + name = "Blood Red NASA Void Suit" + icon_state = "void-syndi" + desc = "A high tech, NASA Centcom branch designed space suit. This one looks rather suspicious." + w_class = WEIGHT_CLASS_NORMAL + allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword/saber,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank) + armor = list(melee = 40, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) + +//random spawner + +/obj/effect/nasavoidsuitspawner + name = "NASA Void Suit Spawner" + icon = 'icons/obj/clothing/suits.dmi' + icon_state = "void-red" + desc = "You shouldn't see this, a spawner for NASA Void Suits." + var/suits = list("red", "green", "ntblue", "purple", "yellow", "ltblue") + +/obj/effect/nasavoidsuitspawner/New() + var/obj/item/clothing/head/helmet/space/nasavoid/H + var/obj/item/clothing/suit/space/nasavoid/S + switch(pick(suits)) + if("red") + H = new /obj/item/clothing/head/helmet/space/nasavoid + S = new /obj/item/clothing/suit/space/nasavoid + if("green") + H = new /obj/item/clothing/head/helmet/space/nasavoid/green + S = new /obj/item/clothing/suit/space/nasavoid/green + if("ntblue") + H = new /obj/item/clothing/head/helmet/space/nasavoid/ntblue + S = new /obj/item/clothing/suit/space/nasavoid/ntblue + if("purple") + H = new /obj/item/clothing/head/helmet/space/nasavoid/purple + S = new /obj/item/clothing/suit/space/nasavoid/purple + if("yellow") + H = new /obj/item/clothing/head/helmet/space/nasavoid/yellow + S = new /obj/item/clothing/suit/space/nasavoid/yellow + if("ltblue") + H = new /obj/item/clothing/head/helmet/space/nasavoid/ltblue + S = new /obj/item/clothing/suit/space/nasavoid/ltblue + var/turf/T = get_turf(src) + if(H) + H.forceMove(T) + if(S) + S.forceMove(T) + qdel(src) \ No newline at end of file diff --git a/code/modules/countdown/countdown.dm b/code/modules/countdown/countdown.dm index 7e651fb910f..54ec874c743 100644 --- a/code/modules/countdown/countdown.dm +++ b/code/modules/countdown/countdown.dm @@ -42,7 +42,7 @@ return /obj/effect/countdown/process() - if(!attached_to || qdeleted(attached_to)) + if(!attached_to || QDELETED(attached_to)) qdel(src) forceMove(get_turf(attached_to)) var/new_val = get_value() diff --git a/code/modules/crafting/craft.dm b/code/modules/crafting/craft.dm index e1ea3f4dc5c..b9d0b6b72e1 100644 --- a/code/modules/crafting/craft.dm +++ b/code/modules/crafting/craft.dm @@ -228,7 +228,7 @@ qdel(DL) /datum/personal_crafting/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, datum/topic_state/state = not_incapacitated_turf_state) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "personal_crafting.tmpl", "Crafting Menu", 700, 800, state = state) ui.open() @@ -265,14 +265,14 @@ if(href_list["make"]) var/datum/crafting_recipe/TR = locate(href_list["make"]) busy = 1 - nanomanager.update_uis(src) + SSnanoui.update_uis(src) var/fail_msg = construct_item(usr, TR) if(!fail_msg) to_chat(usr, "[TR.name] constructed.") else to_chat(usr, "Construction failed[fail_msg]") busy = 0 - nanomanager.update_uis(src) + SSnanoui.update_uis(src) if(href_list["forwardCat"]) viewing_category = next_cat() to_chat(usr, "Category is now [categories[viewing_category]].") @@ -290,7 +290,7 @@ to_chat(usr, "Crafting menu is now [display_compact? "compact" : "full size"].") . = TRUE - nanomanager.update_uis(src) + SSnanoui.update_uis(src) //Next works nicely with modular arithmetic /datum/personal_crafting/proc/next_cat() diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 12bb06412a8..7eaa06f3133 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -940,6 +940,14 @@ flags_inv = HIDEEARS //////////// Uniforms //////////// +/obj/item/clothing/under/fluff/soviet_casual_uniform // Norstead : Natalya Sokolova + icon = 'icons/obj/custom_items.dmi' + name = "Soviet Casual Uniform" + desc = "Female U.S.S.P. casual wear. Dlya Rodiny!" + icon_state = "soviet_casual_uniform" + item_state = "soviet_casual_uniform" + item_color = "soviet_casual_uniform" + /obj/item/clothing/under/fluff/kharshai // Kharshai: Athena Castile name = "Castile formal outfit" desc = "A white and gold formal uniform, accompanied by a small pin with the numbers '004' etched upon it." @@ -1056,7 +1064,7 @@ icon = 'icons/obj/custom_items.dmi' icon_state = "fox_jacket" item_state = "fox_jacket" - ignore_suitadjust = 1 + ignore_suitadjust = TRUE actions_types = list() adjust_flavour = null species_fit = null @@ -1069,7 +1077,37 @@ icon_state = "fox_suit" item_state = "g_suit" item_color = "fox_suit" - displays_id = 0 //still appears on examine; this is pure fluff. + displays_id = FALSE //still appears on examine; this is pure fluff. + +/obj/item/toy/plushie/fluff/fox + name = "orange fox plushie" + desc = "A cute, soft, fuzzy, fluffy, and cuddly plushie. This has a small tag on it that is signed 'Fox McCloud'." + icon_state = "orangefox" + attack_verb = list("poofed", "cuddled","fluffed") + actions_types = list(/datum/action/item_action/adjust) + var/prompting_change = FALSE + var/list/plush_colors = list("red fox plushie" = "redfox", "black fox plushie" = "blackfox", "marble fox plushie" = "marblefox", "blue fox plushie" = "bluefox", "orange fox plushie" = "orangefox", + "coffee fox plushie" = "coffeefox", "pink fox plushie" = "pinkfox", "purple fox plushie" = "purplefox", "crimson fox plushie" = "crimsonfox") + +/obj/item/toy/plushie/fluff/fox/proc/change_color() + if(prompting_change) + return + prompting_change = TRUE + var/plushie_color = input("Select a color", "[src]") as null|anything in plush_colors + prompting_change = FALSE + if(!plushie_color) + return + if(!Adjacent(usr)) + return + name = plushie_color + icon_state = plush_colors[plushie_color] + + for(var/X in actions) + var/datum/action/A = X + A.UpdateButtonIcon() + +/obj/item/toy/plushie/fluff/fox/ui_action_click() + change_color() // TheFlagbearer: Willow Walker /obj/item/clothing/under/fluff/arachno_suit @@ -1296,7 +1334,7 @@ pod.can_paint = FALSE used = 1 qdel(src) - + /obj/item/weapon/bikehorn/fluff/pinkbikehorn //Xerdies: Squiddle Toodle name = "Honkinator5000" desc = "This horn may look ridiculous but is the new hot item for clowns in the Clown Empire. It has a fine print on its side reading: Property of Prince Honktertong the IV" diff --git a/code/modules/detective_work/scanner.dm b/code/modules/detective_work/scanner.dm index c8c2ace6d88..c183bedb610 100644 --- a/code/modules/detective_work/scanner.dm +++ b/code/modules/detective_work/scanner.dm @@ -159,7 +159,7 @@ spawn(0) var/found_something = 0 - add_log("[worldtime2text()][get_timestamp()] - [target_name]", 0) + add_log("[station_time_timestamp()][get_timestamp()] - [target_name]", 0) // Fingerprints if(fingerprints && fingerprints.len) diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm index 3470302c057..0b6403a9708 100644 --- a/code/modules/economy/ATM.dm +++ b/code/modules/economy/ATM.dm @@ -50,7 +50,7 @@ log transactions linked_db = null authenticated_account = null visible_message("[bicon(src)][src] buzzes rudely, \"Connection to remote database lost.\"") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) if(ticks_left_timeout > 0) ticks_left_timeout-- @@ -90,7 +90,7 @@ log transactions held_card = I if(authenticated_account && held_card.associated_account_number != authenticated_account.account_number) authenticated_account = null - nanomanager.update_uis(src) + SSnanoui.update_uis(src) else if(authenticated_account) if(istype(I, /obj/item/stack/spacecash)) //consume the money @@ -107,11 +107,11 @@ log transactions T.amount = C.amount T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = station_time_timestamp() authenticated_account.transaction_log.Add(T) to_chat(user, "You insert [C] into [src].") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) C.use(C.amount) else ..() @@ -129,7 +129,7 @@ log transactions /obj/machinery/atm/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) user.set_machine(src) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if (!ui) ui = new(user, src, ui_key, "atm.tmpl", name, 550, 650) ui.open() @@ -183,7 +183,7 @@ log transactions T.purpose = transfer_purpose T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = station_time_timestamp() T.amount = "([transfer_amount])" authenticated_account.transaction_log.Add(T) else @@ -225,7 +225,7 @@ log transactions T.purpose = "Unauthorised login attempt" T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = station_time_timestamp() failed_account.transaction_log.Add(T) else to_chat(usr, "[bicon(src)]Incorrect pin/account combination entered, [max_pin_attempts - number_incorrect_tries] attempts remaining.") @@ -245,7 +245,7 @@ log transactions T.purpose = "Remote terminal access" T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = station_time_timestamp() authenticated_account.transaction_log.Add(T) to_chat(usr, "[bicon(src)]Access granted. Welcome user '[authenticated_account.owner_name].'") previous_account_number = tried_account_num @@ -271,7 +271,7 @@ log transactions T.amount = "([amount])" T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = station_time_timestamp() authenticated_account.transaction_log.Add(T) else to_chat(usr, "[bicon(src)]You don't have enough funds to do that!") @@ -288,7 +288,7 @@ log transactions Account holder: [authenticated_account.owner_name]
Account number: [authenticated_account.account_number]
Balance: $[authenticated_account.money]
- Date and time: [worldtime2text()], [current_date_string]

+ Date and time: [station_time_timestamp()], [current_date_string]

Service terminal ID: [machine_id]
"} //stamp the paper @@ -317,7 +317,7 @@ log transactions if("logout") authenticated_account = null - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 //create the most effective combination of notes to make up the requested amount @@ -345,8 +345,8 @@ log transactions T.purpose = "Remote terminal access" T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = station_time_timestamp() authenticated_account.transaction_log.Add(T) view_screen = NO_SCREEN - nanomanager.update_uis(src) + SSnanoui.update_uis(src) diff --git a/code/modules/economy/Accounts.dm b/code/modules/economy/Accounts.dm index c43f14d1283..ca000bc3f85 100644 --- a/code/modules/economy/Accounts.dm +++ b/code/modules/economy/Accounts.dm @@ -54,8 +54,8 @@ var/global/list/all_money_accounts = list() department_accounts[department] = department_account -//the current ingame time (hh:mm) can be obtained by calling: -//worldtime2text() +//the current ingame time (hh:mm:ss) can be obtained by calling: +//station_time_timestamp("hh:mm:ss") /proc/create_account(var/new_owner_name = "Default user", var/starting_funds = 0, var/obj/machinery/computer/account_database/source_db) @@ -79,7 +79,7 @@ var/global/list/all_money_accounts = list() M.account_number = rand(111111, 999999) else T.date = current_date_string - T.time = worldtime2text() + T.time = station_time_timestamp() T.source_terminal = source_db.machine_id M.account_number = next_account_number @@ -101,7 +101,7 @@ var/global/list/all_money_accounts = list() Account number: [M.account_number]
Account pin: [M.remote_access_pin]
Starting balance: $[M.money]
- Date and time: [worldtime2text()], [current_date_string]

+ Date and time: [station_time_timestamp()], [current_date_string]

Creation terminal ID: [source_db.machine_id]
Authorised NT officer overseeing creation: [overseer]
"} // END AUTOFIX @@ -302,7 +302,7 @@ var/global/list/all_money_accounts = list() T.purpose = "New account funds initialisation" T.amount = "([starting_funds])" T.date = current_date_string - T.time = worldtime2text() + T.time = station_time_timestamp() T.source_terminal = machine_id station_account.transaction_log.Add(T) @@ -354,7 +354,7 @@ var/global/list/all_money_accounts = list() else T.amount = "[amount]" T.date = current_date_string - T.time = worldtime2text() + T.time = station_time_timestamp() T.source_terminal = terminal_id D.transaction_log.Add(T) diff --git a/code/modules/economy/Accounts_DB.dm b/code/modules/economy/Accounts_DB.dm index a2bb2552824..a8538f32c3c 100644 --- a/code/modules/economy/Accounts_DB.dm +++ b/code/modules/economy/Accounts_DB.dm @@ -31,7 +31,7 @@ T.purpose = reason T.amount = amount T.date = current_date_string - T.time = worldtime2text() + T.time = station_time_timestamp() T.source_terminal = machine_id return T @@ -69,7 +69,7 @@ O.loc = src held_card = O - nanomanager.update_uis(src) + SSnanoui.update_uis(src) attack_hand(user) @@ -78,7 +78,7 @@ /obj/machinery/computer/account_database/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) user.set_machine(src) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "accounts_terminal.tmpl", src.name, 400, 640) ui.open() @@ -153,7 +153,7 @@ if(!get_access_level(usr)) return 1 - var/datum/nanoui/ui = nanomanager.get_open_ui(usr, src, "main") + var/datum/nanoui/ui = SSnanoui.get_open_ui(usr, src, "main") if(href_list["choice"]) switch(href_list["choice"]) diff --git a/code/modules/economy/EFTPOS.dm b/code/modules/economy/EFTPOS.dm index babbac30b11..b0d6f322e53 100644 --- a/code/modules/economy/EFTPOS.dm +++ b/code/modules/economy/EFTPOS.dm @@ -70,7 +70,7 @@ if(linked_db) if(linked_account) scan_card(O, user) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) else to_chat(user, "[bicon(src)]Unable to connect to linked account.") else @@ -79,7 +79,7 @@ ..() /obj/item/device/eftpos/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "eftpos.tmpl", name, 790, 310) ui.open() @@ -172,7 +172,7 @@ access_code = 0 to_chat(usr, "[bicon(src)]Access code reset to 0.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 /obj/item/device/eftpos/proc/scan_card(obj/item/weapon/card/I, mob/user) @@ -203,7 +203,7 @@ T.amount = "[transaction_amount]" T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = station_time_timestamp() D.transaction_log.Add(T) // T = new() @@ -212,7 +212,7 @@ T.amount = "[transaction_amount]" T.source_terminal = machine_id T.date = current_date_string - T.time = worldtime2text() + T.time = station_time_timestamp() linked_account.transaction_log.Add(T) else to_chat(user, "[bicon(src)]You don't have that much money!") diff --git a/code/modules/economy/POS.dm b/code/modules/economy/POS.dm index ca5189ce122..67f2f3b190e 100644 --- a/code/modules/economy/POS.dm +++ b/code/modules/economy/POS.dm @@ -173,7 +173,7 @@ var/const/POS_HEADER = {" receipt += myArea.name receipt += "" receipt += {"
-
[worldtime2text()], [current_date_string]
+
[station_time_timestamp()], [current_date_string]
@@ -369,7 +369,7 @@ var/const/POS_HEADER = {" logindata={"[logged_in.name]"} var/dat = POS_HEADER + {" " html += "" - html += "" + html += "" html += "" html += "" html += "" html += "" - html += "" + html += "" html += "" html += "" html += "" diff --git a/code/modules/events/money_hacker.dm b/code/modules/events/money_hacker.dm index e3665815515..641fec1405e 100644 --- a/code/modules/events/money_hacker.dm +++ b/code/modules/events/money_hacker.dm @@ -15,7 +15,7 @@ kill() /datum/event/money_hacker/announce() - var/message = "A brute force hack has been detected (in progress since [worldtime2text()]). The target of the attack is: Financial account #[affected_account.account_number], \ + var/message = "A brute force hack has been detected (in progress since [station_time_timestamp()]). The target of the attack is: Financial account #[affected_account.account_number], \ without intervention this attack will succeed in approximately 10 minutes. Required intervention: temporary suspension of affected accounts until the attack has ceased. \ Notifications will be sent as updates occur.
" var/my_department = "[station_name()] firewall subroutines" @@ -50,7 +50,7 @@ T.date = pick("", current_date_string, date1, date2) var/time1 = rand(0, 99999999) var/time2 = "[round(time1 / 36000)+12]:[(time1 / 600 % 60) < 10 ? add_zero(time1 / 600 % 60, 1) : time1 / 600 % 60]" - T.time = pick("", worldtime2text(), time2) + T.time = pick("", station_time_timestamp(), time2) T.source_terminal = pick("","[pick("Biesel","New Gibson")] GalaxyNet Terminal #[rand(111,999)]","your mums place","nantrasen high CommanD") affected_account.transaction_log.Add(T) diff --git a/code/modules/events/prison_break.dm b/code/modules/events/prison_break.dm index 8f16d2636ea..2ea618acd32 100644 --- a/code/modules/events/prison_break.dm +++ b/code/modules/events/prison_break.dm @@ -46,7 +46,7 @@ if(areas && areas.len > 0) var/my_department = "[station_name()] firewall subroutines" - var/rc_message = "An unknown malicious program has been detected in the [english_list(areaName)] lighting and airlock control systems at [worldtime2text()]. Systems will be fully compromised within approximately three minutes. Direct intervention is required immediately.
" + var/rc_message = "An unknown malicious program has been detected in the [english_list(areaName)] lighting and airlock control systems at [station_time_timestamp()]. Systems will be fully compromised within approximately three minutes. Direct intervention is required immediately.
" for(var/obj/machinery/message_server/MS in world) MS.send_rc_message("Engineering", my_department, rc_message, "", "", 2) for(var/mob/living/silicon/ai/A in player_list) diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm index e4237cc49fd..7060b84e136 100644 --- a/code/modules/events/spacevine.dm +++ b/code/modules/events/spacevine.dm @@ -319,9 +319,9 @@ /datum/spacevine_mutation/woodening/on_grow(obj/structure/spacevine/holder) if(holder.energy) - holder.density = 1 - holder.maxhealth = 100 - holder.health = holder.maxhealth + holder.density = TRUE + holder.max_integrity = 100 + holder.obj_integrity = holder.max_integrity /datum/spacevine_mutation/woodening/on_hit(obj/structure/spacevine/holder, mob/living/hitter, obj/item/I, expected_damage) if(!is_sharp(I)) @@ -408,13 +408,12 @@ desc = "An extremely expansionistic species of vine." icon = 'icons/effects/spacevines.dmi' icon_state = "Light1" - anchored = 1 - density = 0 - layer = MOB_LAYER + 0.8 + anchored = TRUE + density = FALSE + layer = SPACEVINE_LAYER mouse_opacity = 2 //Clicking anywhere on the turf is good enough pass_flags = PASSTABLE | PASSGRILLE - var/health = 50 - var/maxhealth = 50 + max_integrity = 50 var/energy = 0 var/obj/structure/spacevine_controller/master = null var/list/mutations = list() @@ -488,7 +487,7 @@ if(S.extend) //so folded telescythes won't get damage boosts / insta-clears (they instead will instead be treated like non-scythes) damage_dealt *= 4 for(var/obj/structure/spacevine/B in range(1,src)) - if(B.health > damage_dealt) //this only is going to occur for woodening mutation vines (increased health) or if we nerf scythe damage/multiplier + if(B.obj_integrity > damage_dealt) //this only is going to occur for woodening mutation vines (increased health) or if we nerf scythe damage/multiplier B.take_damage(damage_dealt, I.damtype, "melee", 1) else B.wither() @@ -607,7 +606,7 @@ var/list/obj/structure/spacevine/queue_end = list() for(var/obj/structure/spacevine/SV in growth_queue) - if(qdeleted(SV)) + if(QDELETED(SV)) continue i++ queue_end += SV diff --git a/code/modules/events/spider_terror.dm b/code/modules/events/spider_terror.dm index ebcf1346db9..c956d2fa551 100644 --- a/code/modules/events/spider_terror.dm +++ b/code/modules/events/spider_terror.dm @@ -22,7 +22,7 @@ switch(infestation_type) if(1) spider_type = /mob/living/simple_animal/hostile/poison/terror_spider/green - spawncount = 4 + spawncount = 5 if(2) spider_type = /mob/living/simple_animal/hostile/poison/terror_spider/white spawncount = 2 @@ -38,8 +38,7 @@ while(spawncount >= 1 && vents.len) var/obj/vent = pick(vents) var/obj/structure/spider/spiderling/terror_spiderling/S = new(vent.loc) - S.name = "evil-looking spiderling" S.grow_as = spider_type - S.amount_grown = 75 + S.amount_grown = 90 vents -= vent spawncount-- \ No newline at end of file diff --git a/code/modules/examine/examine.dm b/code/modules/examine/examine.dm index b5d6def5bbf..0956877d202 100644 --- a/code/modules/examine/examine.dm +++ b/code/modules/examine/examine.dm @@ -49,17 +49,8 @@ description_holders["icon"] = "[bicon(A)]" description_holders["desc"] = A.desc -// Byond seemingly calls stat, each tick. -// Calling things each tick can get expensive real quick. -// So we slow this down a little. -// See: http://www.byond.com/docs/ref/info.html#/client/proc/Stat /client/Stat() . = ..() - if(holder) - sleep(1) - else - sleep(5) - stoplag() if(usr && statpanel("Examine")) stat(null,"[description_holders["icon"]] [description_holders["name"]]") //The name, written in big letters. stat(null,"[description_holders["desc"]]") //the default examine text. diff --git a/code/modules/fish/fishtank.dm b/code/modules/fish/fishtank.dm index 16ec28dc929..82bb656f4fe 100644 --- a/code/modules/fish/fishtank.dm +++ b/code/modules/fish/fishtank.dm @@ -313,14 +313,17 @@ egg_list.Cut() //Destroy any excess eggs, clearing the egg_list /obj/machinery/fishtank/proc/harvest_fish(var/mob/user) - if(!fish_count) //Can't catch non-existant fish! + if(fish_count <= 0) //Can't catch non-existant fish! to_chat(usr, "There are no fish in \the [src] to catch!") return var/list/fish_names_list = list() for(var/datum/fish/fish_type in fish_list) fish_names_list += list("[fish_type.fish_name]" = fish_type) var/caught_fish = input("Select a fish to catch.", "Fishing") as null|anything in fish_names_list //Select a fish from the tank - if(caught_fish) + if(fish_count <= 0) + to_chat(usr, "There are no fish in \the [src] to catch!") + return + else if(caught_fish) user.visible_message("[user.name] harvests \a [caught_fish] from \the [src].", "You scoop \a [caught_fish] out of \the [src].") var/datum/fish/fish_type = fish_names_list[caught_fish] var/fish_item = fish_type.fish_item diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index d180bb9c2ac..c75037778ea 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -264,7 +264,7 @@ Gunshots/explosions/opening doors/less rare audio (done) to_chat(T, "Primary [rand(1000,9999)] states: [pick("Hello","Hi","You're my slave now!","Don't try to get rid of me...")]") break sleep(4) - if(!qdeleted(borer)) + if(!QDELETED(borer)) qdel(borer) qdel(src) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 71a089683ce..19cdf645c4f 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -1,4 +1,4 @@ -#define MAX_WEIGHT_CLASS WEIGHT_CLASS_SMALL * 2 +#define MAX_WEIGHT_CLASS WEIGHT_CLASS_SMALL //Food items that are eaten normally and don't leave anything behind. /obj/item/weapon/reagent_containers/food/snacks name = "snack" @@ -133,9 +133,10 @@ ) inaccurate = 1 else if(W.w_class <= WEIGHT_CLASS_SMALL && istype(src,/obj/item/weapon/reagent_containers/food/snacks/sliceable)) - if(total_w_class > MAX_WEIGHT_CLASS) + var/newweight = GetTotalContentsWeight() + W.GetTotalContentsWeight() + W.w_class + if(newweight > MAX_WEIGHT_CLASS) // Nope, no bluespace slice food - to_chat(user, "Something is already in [src]!") + to_chat(user, "You cannot fit [W] in [src]!") return 1 if(!iscarbon(user)) return 1 @@ -1247,7 +1248,7 @@ return 1 /obj/item/weapon/reagent_containers/food/snacks/monkeycube/proc/Expand() - if(isnull(gcDestroyed)) + if(!QDELETED(src)) visible_message("[src] expands!") new/mob/living/carbon/human(get_turf(src), monkey_type) qdel(src) @@ -1844,7 +1845,7 @@ /obj/item/weapon/reagent_containers/food/snacks/sliceable/cheesewheel name = "Cheese wheel" - desc = "A big wheel of delcious Cheddar." + desc = "A big wheel of delicious Cheddar." icon_state = "cheesewheel" slice_path = /obj/item/weapon/reagent_containers/food/snacks/cheesewedge slices_num = 5 diff --git a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm index 289a4c66d4c..1f1fd454c12 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm @@ -32,6 +32,7 @@ ********************/ /obj/machinery/kitchen_machine/New() + ..() create_reagents(100) reagents.set_reacting(FALSE) if(!available_recipes) diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index 966b5c3f4de..324963c59fd 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -133,7 +133,7 @@ item_quants[I.name]++ else item_quants[I.name] = 1 - nanomanager.update_uis(src) + SSnanoui.update_uis(src) amount-- /obj/machinery/smartfridge/chemistry/accept_check(obj/item/O) @@ -227,7 +227,7 @@ if(load(O, user)) user.visible_message("[user] has added \the [O] to \the [src].", "You add \the [O] to \the [src].") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) else if(istype(O, /obj/item/weapon/storage/bag)) var/obj/item/weapon/storage/bag/P = O @@ -240,7 +240,7 @@ if(P.contents.len > 0) to_chat(user, "Some items are refused.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) else to_chat(user, "\The [src] smartly refuses [O].") @@ -306,7 +306,7 @@ "You empty \the [P] into \the [src].") if(P.contents.len > 0) to_chat(user, "Some items are refused.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/smartfridge/secure/emag_act(mob/user) emagged = 1 @@ -320,7 +320,7 @@ /obj/machinery/smartfridge/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) user.set_machine(src) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "smartfridge.tmpl", name, 400, 500) ui.open() @@ -352,7 +352,7 @@ if(..()) return 0 var/mob/user = usr - var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main") + var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main") add_fingerprint(user) @@ -521,14 +521,14 @@ new dried(loc) item_quants[S.name]-- qdel(S) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return TRUE for(var/obj/item/stack/sheet/wetleather/WL in contents) var/obj/item/stack/sheet/leather/L = new(loc) L.amount = WL.amount item_quants[WL.name]-- qdel(WL) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return TRUE return FALSE @@ -546,6 +546,6 @@ if(usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) if(!allowed(usr) && !emagged && locked != -1 && href_list["vend"]) to_chat(usr, "Access denied.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 0 return ..() \ No newline at end of file diff --git a/code/modules/garbage_collection/__gc_info.dm b/code/modules/garbage_collection/__gc_info.dm deleted file mode 100644 index e36b5fd2b1b..00000000000 --- a/code/modules/garbage_collection/__gc_info.dm +++ /dev/null @@ -1,65 +0,0 @@ -/* - -=============================================================================== - How Garbage Collection Works -=============================================================================== - -In BYOND, there are exactly two ways anything gets deleted: - -- A "soft delete", which occurs when an object's reference count hits 0, meaning it is not being referenced by anything - in the world (more on references further down). When an object is unreferenced, nothing can access it, so it has no - reason to exist, and BYOND's garbage collector simply deletes the object. This is fast. - -- A "hard delete", which occurs when the del keyword is used to directly delete an object. This forces BYOND to find - every reference to the object being deleted, and null them all out. This is slow. - -A reference is anything that refers to an object, and can thus be used to access it. A variable on another object, a -variable in a proc, an argument to a proc, the src of a running proc, the locs of contained objects, another object's -contents list (but not the world's automatic contents list), anything. BYOND keeps track of how many references there -are to an object - the reference count goes up when you make a new reference to an object, and back down when that -reference gets set to null, goes out of scope, or is deleted. When the reference count hits 0, there are no remaining -references to the object, and it is deleted by BYOND's garbage collector. - -When you have something that exists in the world, and you want it to stop existing (maybe it got blown up, or eaten by -the singularity, or whatever), it needs to be deleted. You can use the del keyword to make sure it's deleted instantly, -but del is slow, and you want things to be deleted as quickly as possible, especially if you're deleting a whole lot of -them. You want soft deletes. - -That's where the garbage collection system comes in - it prepares things to be soft deleted, and hard deletes anything -that can't be. There are two main procs involved in this process: - -/proc/qdel(datumToDelete) - This is, effectively, a replacement for del that tells an object to prepare itself to be soft deleted by calling its - Destroy() proc. Depending on the qdel hint returned by Destroy(), qdel will queue the object in the garbage collector - (to be hard deleted if it isn't soft deleted), directly delete the object, or ignore the object and - assume it will handle deleting itself. An object passed into qdel will have its gcDestroyed var set, so - isnull(gcDestroyed) will be true if an object is not being destroyed, and false if it is (which means you should get - rid of the reference you have to it). - - Note that qdel can only work with datum-based objects, which excludes the world (deleting this shuts down the world), - clients (deleting these disconnect the client), lists, and savefiles. If any of these are passed to qdel, they will - be directly deleted, just as if they had been passed straight to del, so it should never be unsafe to qdel anything - you could del. - -/datum/proc/Destroy() - This is, effectively, a replacement for Del() (with some exceptions) which is also responsible for nulling out - references to or on the object it is called on. Unlike Del, the Destroy proc will only be called by qdel; generally, - this should only happen to datums that are no longer referenced by anything, which shouldn't be an issue. - - The exceptions where Destroy cannot replace Del are for the same non-datum types mentioned under qdel, above. Those - should use a Del proc for any necessary cleanup, as a Destroy proc on them will not automatically get called. - - When called by qdel, Destroy is expected to return a qdel hint, which determines whether the object should be directly - deleted, queued for deletion, or ignored entirely; which of these are appropriate will vary, though objects - should be pooled or queued whenever possible. The full list of qdel hints are in the code for the qdel proc. - -As mentioned above, gcDestroyed can be used to tell whether an object is being destroyed. This is important, because if -an object is being destroyed, it WILL still exist, and any code that references it should stop referencing it as soon as -possible. In the same places that you check whether a reference still exists, you should also check for something like -isnull(myRefVar.gcDestroyed), which will be false if your object is being destroyed, meaning you should throw out the -reference immediately. - -The inner workings of the GC itself and the stuff related to testing it probably don't need a detailed description - if -you intend to work with them, it would be best to read the code to understand what they do. - -*/ \ No newline at end of file diff --git a/code/modules/garbage_collection/garbage_collector.dm b/code/modules/garbage_collection/garbage_collector.dm deleted file mode 100644 index 51493432ace..00000000000 --- a/code/modules/garbage_collection/garbage_collector.dm +++ /dev/null @@ -1,185 +0,0 @@ -// Main garbage collection code - -// For general information about how the GC works and how to use it, see __gc_info.dm - -#define GC_COLLECTIONS_PER_TICK 150 // Was 100. -#define GC_COLLECTION_TIMEOUT (30 SECONDS) -#define GC_FORCE_DEL_PER_TICK 30 -//#define GC_DEBUG - -var/list/didntgc = list() // list of all types that have failed to GC associated with the number of times that's happened. - // the types are stored as strings -var/list/sleptDestroy = list() //Same as above but these are paths that slept during their Destroy call - -var/list/noqdelhint = list() // list of all types that do not return a QDEL_HINT - -// The time a datum was destroyed by the GC, or null if it hasn't been -/datum/var/gcDestroyed -// Whether a datum was hard-deleted by the GC; 0 if not, 1 if it was queued, -1 if directly deleted -/datum/var/hard_deleted = 0 - - - -/datum/controller/process/garbage_collector - var/list/queue = new - var/del_everything = 0 - - // To let them know how hardworking am I :^). - var/dels_count = 0 - var/hard_dels = 0 - var/soft_dels = 0 - - // all types that did not respect qdel(A, force=TRUE) and returned one - // of the immortality qdel hints - var/list/noforcerespect = list() - - -/datum/controller/process/garbage_collector/proc/addTrash(var/datum/D) - if(!istype(D) || del_everything) - del(D) - hard_dels++ - dels_count++ - return - - queue -= "\ref[D]" // If this is a re-used ref, remove the old ref from the queue - queue["\ref[D]"] = world.time - -/datum/controller/process/garbage_collector/proc/processGarbage() - var/remainingCollectionPerTick = GC_COLLECTIONS_PER_TICK - var/remainingForceDelPerTick = GC_FORCE_DEL_PER_TICK - var/collectionTimeScope = world.time - GC_COLLECTION_TIMEOUT - while(queue.len && --remainingCollectionPerTick >= 0) - var/refID = queue[1] - var/destroyedAtTime = queue[refID] - - if(destroyedAtTime > collectionTimeScope) - break - - var/datum/D = locate(refID) - // If the object still exists, and it's the same object, hard del it - if(D && D.gcDestroyed == destroyedAtTime) - if(remainingForceDelPerTick <= 0) - break - - #ifdef GC_DEBUG - gcwarning("GC process force delete [D.type]") - #endif - - hardDel(D) - queue.Cut(1, 2) - - remainingForceDelPerTick-- - else // Otherwise, it was GC'd - remove it from the queue - queue.Cut(1, 2) - soft_dels++ - dels_count++ - SCHECK - -#ifdef GC_DEBUG -#undef GC_DEBUG -#endif - -#undef GC_FORCE_DEL_PER_TICK -#undef GC_COLLECTION_TIMEOUT -#undef GC_COLLECTIONS_PER_TICK - -/datum/controller/process/garbage_collector/proc/hardDel(var/datum/D) - didntgc["[D.type]"]++ - D.hard_deleted = 1 - if(!D.gcDestroyed) - spawn(-1) - D.Destroy() - D.gcDestroyed = world.time - del(D) - hard_dels++ - dels_count++ - -// Effectively replaces del for any datum-based type -/proc/qdel(datum/D, force=FALSE) - if(isnull(D)) - return - - if(!istype(D)) // A non-datum was passed into qdel - just delete it outright. - // warning("qdel() passed object of type [D.type]. qdel() can only handle /datum/ types.") - del(D) - return - - if(isnull(garbageCollector)) - D.Destroy() - del(D) - return - - if(isnull(D.gcDestroyed)) - // Let our friend know they're about to get fucked up. - var/hint - D.gcDestroyed = world.time - try - hint = D.Destroy(force) - catch(var/exception/e) - if(istype(e)) - log_runtime(e, D, "Caught by qdel() destroying [D.type]") - else - gcwarning("qdel() caught runtime destroying [D.type]: [e]") - // Destroy runtimed? Panic! Hard delete! - D.hard_deleted = -1 - del(D) - if(garbageCollector) - garbageCollector.dels_count++ - return - if(!isnull(D.gcDestroyed) && D.gcDestroyed != world.time) - gcwarning("Sleep detected in Destroy() call of [D.type]") - sleptDestroy["[D.type]"]++ - D.gcDestroyed = world.time - - switch(hint) - if(QDEL_HINT_QUEUE) //qdel should queue the object for deletion - garbageCollector.addTrash(D) - if (QDEL_HINT_LETMELIVE, QDEL_HINT_IWILLGC) //qdel should let the object live after calling destory. - if(!force) - return - // Returning LETMELIVE after being told to force destroy - // indicates the objects Destroy() does not respect force - if(!("[D.type]" in garbageCollector.noforcerespect)) - garbageCollector.noforcerespect += "[D.type]" - gcwarning("WARNING: [D.type] has been force deleted, but is \ - returning an immortal QDEL_HINT, indicating it does \ - not respect the force flag for qdel(). It has been \ - placed in the queue, further instances of this type \ - will also be queued.") - garbageCollector.addTrash(D) - if(QDEL_HINT_HARDDEL_NOW) //qdel should assume this object won't gc, and hard del it post haste. - D.hard_deleted = -1 // -1 means "this hard del skipped the queue", used for profiling - del(D) - if(garbageCollector) - garbageCollector.dels_count++ - if(QDEL_HINT_FINDREFERENCE)//qdel will, if TESTING is enabled, display all references to this object, then queue the object for deletion. - #ifdef TESTING - D.find_references(remove_from_queue = FALSE) - #endif - garbageCollector.addTrash(D) - else - if(!noqdelhint["[D.type]"]) - noqdelhint["[D.type]"] = "[D.type]" - gcwarning("WARNING: [D.type] is not returning a qdel hint. It is being placed in the queue. Further instances of this type will also be queued.") - garbageCollector.addTrash(D) - - -// Returns 1 if the object has been queued for deletion. -/proc/qdeleted(var/datum/D) - if(!istype(D)) - return 0 - if(!isnull(D.gcDestroyed)) - return 1 - return 0 - -/* - * Like Del(), but for qdel. - * Called BEFORE qdel moves shit. - */ -/datum/proc/Destroy(force=FALSE) - tag = null - return QDEL_HINT_QUEUE // Garbage Collect everything. - -/proc/gcwarning(msg) - log_to_dd("## GC WARNING: [msg]") - log_runtime(EXCEPTION(msg)) diff --git a/code/modules/garbage_collection/gc_testing.dm b/code/modules/garbage_collection/gc_testing.dm deleted file mode 100644 index 934a93adc21..00000000000 --- a/code/modules/garbage_collection/gc_testing.dm +++ /dev/null @@ -1,105 +0,0 @@ -// Garbage collection testing/debugging/profiling code - -/client/proc/qdel_toggle() - set name = "(GC) Toggle Queueing" - set desc = "Toggle qdel usage between normal and force del()." - set category = "Debug" - - if(!check_rights(R_DEBUG)) - return - - garbageCollector.del_everything = !garbageCollector.del_everything -// to_chat(world, "GC: qdel turned [garbageCollector.del_everything ? "off" : "on"].") - log_admin("[key_name(usr)] turned qdel [garbageCollector.del_everything ? "off" : "on"].") - message_admins("[key_name_admin(usr)] turned qdel [garbageCollector.del_everything ? "off" : "on"].", 1) - -/client/proc/cmd_display_del_log() - set category = "Debug" - set name = "(GC) Display del() Log" - set desc = "Displays a list of things that have failed to GC this round" - - if(!check_rights(R_DEBUG)) - return - - var/dat = "List of things that failed to GC this round

" - for(var/path in didntgc) - dat += "[path] - [didntgc[path]] times
" - - dat += "List of paths that did not return a qdel hint in Destroy()

" - for(var/path in noqdelhint) - dat += "[path]
" - - dat += "List of paths that slept in Destroy()

" - for(var/path in sleptDestroy) - dat += "[path]
" - - usr << browse(dat, "window=dellog") - -#ifdef TESTING -/client/var/running_find_references -/datum/var/running_find_references - -/datum/verb/find_references(remove_from_queue = TRUE as num) - set category = "Debug" - set name = "Find References" - set background = 1 - set src in world - - running_find_references = type - if(usr && usr.client) - if(usr.client.running_find_references) - testing("CANCELLED search for references to a [usr.client.running_find_references].") - usr.client.running_find_references = null - running_find_references = null - return - - if(alert("Running this will create a lot of lag until it finishes. You can cancel it by running it again. Would you like to begin the search?", "Find References", "Yes", "No") == "No") - running_find_references = null - return - // Remove this object from the list of things to be auto-deleted. - if(remove_from_queue && garbageCollector && ("\ref[src]" in garbageCollector.queue)) - garbageCollector.queue -= "\ref[src]" - if(usr && usr.client) - usr.client.running_find_references = type - - testing("Beginning search for references to a [type].") - var/list/things = list() - for(var/client/thing) - things |= thing - for(var/datum/thing) - things |= thing - testing("Collected list of things in search for references to a [type]. ([things.len] Thing\s)") - for(var/datum/thing in things) - if(usr && usr.client && !usr.client.running_find_references) return - for(var/varname in thing.vars) - var/variable = thing.vars[varname] - if(variable == src) - testing("Found [src.type] \ref[src] in [thing.type]'s [varname] var.") - else if(islist(variable)) - if(src in variable) - testing("Found [src.type] \ref[src] in [thing.type]'s [varname] list var.") - testing("Completed search for references to a [type].") - if(usr && usr.client) - usr.client.running_find_references = null - running_find_references = null - -/client/verb/purge_all_destroyed_objects() - set category = "Debug" - if(garbageCollector) - while(garbageCollector.queue.len) - var/datum/o = locate(garbageCollector.queue[1]) - if(istype(o) && !isnull(o.gcDestroyed)) - del(o) - garbageCollector.dels_count++ - garbageCollector.queue.Cut(1, 2) - -/datum/verb/qdel_then_find_references() - set category = "Debug" - set name = "qdel() then Find References" - set background = 1 - set src in world - - qdel(src) - if(!running_find_references) - find_references(remove_from_queue = FALSE) -#endif diff --git a/code/modules/hydroponics/grown/tomato.dm b/code/modules/hydroponics/grown/tomato.dm index 78c3e3dfded..2785c39359e 100644 --- a/code/modules/hydroponics/grown/tomato.dm +++ b/code/modules/hydroponics/grown/tomato.dm @@ -131,7 +131,7 @@ awakening = 1 spawn(30) - if(!qdeleted(src)) + if(!QDELETED(src)) var/mob/living/simple_animal/hostile/killertomato/K = new /mob/living/simple_animal/hostile/killertomato(get_turf(loc)) K.maxHealth += round(seed.endurance / 3) K.melee_damage_lower += round(seed.potency / 10) diff --git a/code/modules/logic/logic_base.dm b/code/modules/logic/logic_base.dm index 926b8a1f129..abc80df5fca 100644 --- a/code/modules/logic/logic_base.dm +++ b/code/modules/logic/logic_base.dm @@ -62,7 +62,8 @@ /obj/machinery/logic_gate/Destroy() if(radio_controller) - radio_controller.remove_object(src,frequency) + radio_controller.remove_object(src, frequency) + radio_connection = null return ..() /obj/machinery/logic_gate/process() diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 3d3ce0aa613..df035379331 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -68,7 +68,7 @@ stack_list[processed_sheet] = s // Not including tg's ignoring of metal, glass being stocked because if cargo's not telling science when ores are there, they probably won't // help with restocking metal/glass either - var/msg = "\[[worldtime2text()]\]: [capitalize(s.name)] sheets have been stocked in the ore reclaimer." + var/msg = "\[[station_time_timestamp()]\]: [capitalize(s.name)] sheets have been stocked in the ore reclaimer." for(var/obj/machinery/requests_console/D in allConsoles) if(D.department in src.supply_consoles) if(supply_consoles[D.department] == null || (s.name in supply_consoles[D.department])) diff --git a/code/modules/mining/lavaland/loot/colossus_loot.dm b/code/modules/mining/lavaland/loot/colossus_loot.dm index 425fbee2b8a..e5aed837d62 100644 --- a/code/modules/mining/lavaland/loot/colossus_loot.dm +++ b/code/modules/mining/lavaland/loot/colossus_loot.dm @@ -427,7 +427,7 @@ /obj/structure/closet/stasis/process() if(holder_animal) - if(holder_animal.stat == DEAD && !qdeleted(holder_animal)) + if(holder_animal.stat == DEAD && !QDELETED(holder_animal)) dump_contents() holder_animal.gib() return @@ -455,7 +455,7 @@ L.disabilities &= ~MUTE L.status_flags &= ~GODMODE L.notransform = 0 - if(holder_animal && !qdeleted(holder_animal)) + if(holder_animal && !QDELETED(holder_animal)) holder_animal.mind.transfer_to(L) L.mind.RemoveSpell(/obj/effect/proc_holder/spell/targeted/exit_possession) if(kill || !isanimal(loc)) diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm index c96855a07e8..6d6558463e1 100644 --- a/code/modules/mob/language.dm +++ b/code/modules/mob/language.dm @@ -562,7 +562,7 @@ log_robot("[key_name(speaker)] : [message]") var/message_start = "[name], [speaker.name]" - var/message_body = "[speaker.say_quote(message)],\"[message]\"" + var/message_body = "[speaker.say_quote(message)],\"[message]\"" for(var/mob/M in dead_mob_list) if(!isnewplayer(M) && !isbrain(M)) diff --git a/code/modules/mob/living/carbon/alien/death.dm b/code/modules/mob/living/carbon/alien/death.dm index 2229d4c9d0c..6d663d6f3d4 100644 --- a/code/modules/mob/living/carbon/alien/death.dm +++ b/code/modules/mob/living/carbon/alien/death.dm @@ -55,6 +55,6 @@ update_icons() timeofdeath = world.time - if(mind) mind.store_memory("Time of death: [worldtime2text(timeofdeath)]", 0) + if(mind) mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0) return ..(gibbed) diff --git a/code/modules/mob/living/carbon/alien/larva/death.dm b/code/modules/mob/living/carbon/alien/larva/death.dm index 6db93c4ddd2..7d1101ca7d8 100644 --- a/code/modules/mob/living/carbon/alien/larva/death.dm +++ b/code/modules/mob/living/carbon/alien/larva/death.dm @@ -9,7 +9,7 @@ update_canmove() timeofdeath = world.time - if(mind) mind.store_memory("Time of death: [worldtime2text(timeofdeath)]", 0) + if(mind) mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0) living_mob_list -= src return ..(gibbed) diff --git a/code/modules/mob/living/carbon/brain/death.dm b/code/modules/mob/living/carbon/brain/death.dm index 8303c3ef04a..cbec4409fd6 100644 --- a/code/modules/mob/living/carbon/brain/death.dm +++ b/code/modules/mob/living/carbon/brain/death.dm @@ -11,7 +11,7 @@ see_invisible = SEE_INVISIBLE_LEVEL_TWO timeofdeath = world.time - if(mind) mind.store_memory("Time of death: [worldtime2text(timeofdeath)]", 0) //mind. ? + if(mind) mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0) //mind. ? return ..(gibbed) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 1fa4b57356f..9ad17eb844f 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -3,6 +3,10 @@ var/datum/middleClickOverride/middleClickOverride = null /mob/living/carbon/Destroy() + // This clause is here due to items falling off from limb deletion + for(var/obj/item in get_all_slots()) + unEquip(item) + qdel(item) QDEL_LIST(internal_organs) QDEL_LIST(stomach_contents) var/mob/living/simple_animal/borer/B = has_brain_worms() diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 8ad380dbc9f..514fd2fe83f 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -119,7 +119,7 @@ timeofdeath = world.time med_hud_set_health() med_hud_set_status() - if(mind) mind.store_memory("Time of death: [worldtime2text(timeofdeath)]", 0) + if(mind) mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0) if(ticker && ticker.mode) // log_to_dd("k") sql_report_death(src) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index dca0d82874e..ae079eb8c0c 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -835,13 +835,13 @@ else if(ishuman(usr)) var/mob/living/carbon/human/U = usr - R.fields["comments"] += "Set to [setcriminal] by [U.get_authentification_name()] ([U.get_assignment()]) on [current_date_string] [worldtime2text()] with comment: [t1]
" + R.fields["comments"] += "Set to [setcriminal] by [U.get_authentification_name()] ([U.get_assignment()]) on [current_date_string] [station_time_timestamp()] with comment: [t1]
" if(isrobot(usr)) var/mob/living/silicon/robot/U = usr - R.fields["comments"] += "Set to [setcriminal] by [U.name] ([U.modtype] [U.braintype]) on [current_date_string] [worldtime2text()] with comment: [t1]
" + R.fields["comments"] += "Set to [setcriminal] by [U.name] ([U.modtype] [U.braintype]) on [current_date_string] [station_time_timestamp()] with comment: [t1]
" if(isAI(usr)) var/mob/living/silicon/ai/U = usr - R.fields["comments"] += "Set to [setcriminal] by [U.name] (artificial intelligence) on [current_date_string] [worldtime2text()] with comment: [t1]
" + R.fields["comments"] += "Set to [setcriminal] by [U.name] (artificial intelligence) on [current_date_string] [station_time_timestamp()] with comment: [t1]
" R.fields["criminal"] = setcriminal log_admin("[key_name_admin(usr)] set secstatus of [their_rank] [their_name] to [setcriminal], comment: [t1]") @@ -931,13 +931,13 @@ return if(ishuman(usr)) var/mob/living/carbon/human/U = usr - R.fields["comments"] += "Made by [U.get_authentification_name()] ([U.get_assignment()]) on [current_date_string] [worldtime2text()]
[t1]" + R.fields["comments"] += "Made by [U.get_authentification_name()] ([U.get_assignment()]) on [current_date_string] [station_time_timestamp()]
[t1]" if(isrobot(usr)) var/mob/living/silicon/robot/U = usr - R.fields["comments"] += "Made by [U.name] ([U.modtype] [U.braintype]) on [current_date_string] [worldtime2text()]
[t1]" + R.fields["comments"] += "Made by [U.name] ([U.modtype] [U.braintype]) on [current_date_string] [station_time_timestamp()]
[t1]" if(isAI(usr)) var/mob/living/silicon/ai/U = usr - R.fields["comments"] += "Made by [U.name] (artificial intelligence) on [current_date_string] [worldtime2text()]
[t1]" + R.fields["comments"] += "Made by [U.name] (artificial intelligence) on [current_date_string] [station_time_timestamp()]
[t1]" if(href_list["medical"]) if(hasHUD(usr,"medical")) @@ -1053,10 +1053,10 @@ return if(ishuman(usr)) var/mob/living/carbon/human/U = usr - R.fields["comments"] += "Made by [U.get_authentification_name()] ([U.get_assignment()]) on [current_date_string] [worldtime2text()]
[t1]" + R.fields["comments"] += "Made by [U.get_authentification_name()] ([U.get_assignment()]) on [current_date_string] [station_time_timestamp()]
[t1]" if(isrobot(usr)) var/mob/living/silicon/robot/U = usr - R.fields["comments"] += "Made by [U.name] ([U.modtype] [U.braintype]) on [current_date_string] [worldtime2text()]
[t1]" + R.fields["comments"] += "Made by [U.name] ([U.modtype] [U.braintype]) on [current_date_string] [station_time_timestamp()]
[t1]" if(href_list["lookitem"]) var/obj/item/I = locate(href_list["lookitem"]) diff --git a/code/modules/mob/living/carbon/human/interactive/functions.dm b/code/modules/mob/living/carbon/human/interactive/functions.dm index 46706c45363..d48c7a6eecf 100644 --- a/code/modules/mob/living/carbon/human/interactive/functions.dm +++ b/code/modules/mob/living/carbon/human/interactive/functions.dm @@ -237,10 +237,15 @@ /mob/living/carbon/human/interactive/proc/shitcurity(obj) var/list/allContents = getAllContents() - if(retal && TARGET && Adjacent(TARGET)) - var/obj/item/weapon/restraints/R = locate() in allContents - if(R) - R.attack(TARGET, src) // go go bluespace restraint launcher! + if(retal && TARGET) + if(Adjacent(TARGET)) + var/obj/item/weapon/restraints/R = locate() in allContents + if(R) + R.attack(TARGET, src) // go go bluespace restraint launcher! + else if(TARGET in oview(7, src)) + var/obj/item/weapon/gun/G = locate() in allContents + if(G) + G.afterattack(TARGET, src) /mob/living/carbon/human/interactive/proc/clowning(obj) if(shouldModulePass()) diff --git a/code/modules/mob/living/carbon/human/interactive/interactive.dm b/code/modules/mob/living/carbon/human/interactive/interactive.dm index 442bb19ca9a..b4ae144bcf7 100644 --- a/code/modules/mob/living/carbon/human/interactive/interactive.dm +++ b/code/modules/mob/living/carbon/human/interactive/interactive.dm @@ -556,8 +556,12 @@ var/obj/item/I = get_item_by_slot(pick(slots)) var/obj/item/weapon/storage/BP = get_item_by_slot(slot_back) if(back && BP && I) + // hack to allow SNPCs to "sticky grab" items without losing their inventorying + var/oldnodrop = I.flags | NODROP + I.flags &= ~NODROP if(BP.can_be_inserted(I)) BP.handle_item_insertion(I) + I.flags |= oldnodrop else unEquip(I,TRUE) update_hands = 1 diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index a522119eae4..d0420aa27f5 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -993,7 +993,7 @@ return 1 /mob/living/proc/harvest(mob/living/user) - if(qdeleted(src)) + if(QDELETED(src)) return if(butcher_results) for(var/path in butcher_results) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index ecbef74ee1d..67e4f33cf0c 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -1236,7 +1236,7 @@ var/list/ai_verbs_default = list( malfhacking = 0 clear_alert("hackingapc") - if(!istype(apc) || qdeleted(apc) || apc.stat & BROKEN) + if(!istype(apc) || QDELETED(apc) || apc.stat & BROKEN) to_chat(src, "Hack aborted. The designated APC no longer exists on the power network.") playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, 1) else if(apc.aidisabled) diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm index 9947e6faeec..48718f2ab10 100644 --- a/code/modules/mob/living/silicon/ai/death.dm +++ b/code/modules/mob/living/silicon/ai/death.dm @@ -44,6 +44,6 @@ loc.icon_state = "aicard-404" timeofdeath = world.time - if(mind) mind.store_memory("Time of death: [worldtime2text(timeofdeath)]", 0) + if(mind) mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0) return ..(gibbed) diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index c710e4c12db..13b5308bc86 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -21,7 +21,7 @@ death() return 0 - if(!eyeobj || qdeleted(eyeobj) || !eyeobj.loc) + if(!eyeobj || QDELETED(eyeobj) || !eyeobj.loc) view_core() if(machine) diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 3637b0e10b1..a99faca4a09 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -118,6 +118,14 @@ C.toff = 1 ..() +/mob/living/silicon/pai/Destroy() + medicalActive1 = null + medicalActive2 = null + securityActive1 = null + securityActive2 = null + return ..() + + /mob/living/silicon/pai/movement_delay() . = ..() . += slowdown @@ -295,7 +303,7 @@ medicalActive1 = null medicalActive2 = null medical_cannotfind = 0 - nanomanager.update_uis(src) + SSnanoui.update_uis(src) to_chat(usr, "You reset your record-viewing software.") /mob/living/silicon/pai/cancel_camera() diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm index 4847931e543..135e1996dfe 100644 --- a/code/modules/mob/living/silicon/pai/software.dm +++ b/code/modules/mob/living/silicon/pai/software.dm @@ -41,7 +41,7 @@ var/global/list/default_pai_software = list() if(ui_key != "main") var/datum/pai_software/S = software[ui_key] if(S && !S.toggle) - ui = nanomanager.try_update_ui(user, src, S.id, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, S.id, ui, force_open) if(!ui) ui = new(user, src, S.id, S.template_file, S.ui_title, S.ui_width, S.ui_height, state = state) ui.open() @@ -52,7 +52,7 @@ var/global/list/default_pai_software = list() ui.set_status(STATUS_CLOSE, 0) return - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "pai_interface.tmpl", "pAI Software Interface", 450, 600, state = state) ui.open() @@ -132,4 +132,4 @@ var/global/list/default_pai_software = list() var/img = text2num(href_list["image"]) if(1 <= img && img <= 9) card.setEmotion(img) - return 1 + return 1 diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm index 1c514a891ca..34af6a0d76a 100644 --- a/code/modules/mob/living/silicon/robot/component.dm +++ b/code/modules/mob/living/silicon/robot/component.dm @@ -206,7 +206,7 @@ to_chat(user, "\t Key: Electronics/Brute") to_chat(user, "\t Damage Specifics: [BU] - [BR]") if(M.timeofdeath && M.stat == DEAD) - to_chat(user, "Time of Disable: [worldtime2text(M.timeofdeath)]") + to_chat(user, "Time of Disable: [station_time_timestamp("hh:mm:ss", M.timeofdeath)]") var/mob/living/silicon/robot/H = M var/list/damaged = H.get_damaged_components(1,1,1) to_chat(user, "Localized Damage:") diff --git a/code/modules/mob/living/silicon/robot/death.dm b/code/modules/mob/living/silicon/robot/death.dm index 99b79d35360..82667be2d3d 100644 --- a/code/modules/mob/living/silicon/robot/death.dm +++ b/code/modules/mob/living/silicon/robot/death.dm @@ -64,7 +64,7 @@ see_invisible = SEE_INVISIBLE_LEVEL_TWO update_icons() timeofdeath = world.time - if(mind) mind.store_memory("Time of death: [worldtime2text(timeofdeath)]", 0) + if(mind) mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0) sql_report_cyborg_death(src) diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 81a1958d22c..9b9c756eef9 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -16,7 +16,7 @@ req_access = list(access_engine, access_robotics) ventcrawler = 2 magpulse = 1 - + mob_size = MOB_SIZE_SMALL default_language = "Drone" // We need to keep track of a few module items so we don't need to do list operations diff --git a/code/modules/mob/living/silicon/robot/emote.dm b/code/modules/mob/living/silicon/robot/emote.dm index bf7f413708f..72df46e226f 100644 --- a/code/modules/mob/living/silicon/robot/emote.dm +++ b/code/modules/mob/living/silicon/robot/emote.dm @@ -166,6 +166,9 @@ set category = "Robot Commands" set name = "Power Warning" + if(handle_emote_CD(50)) + return + if(!is_component_functioning("power cell") || !cell || !cell.charge) visible_message("The power warning light on [src] flashes urgently.",\ "You announce you are operating in low power mode.") diff --git a/code/modules/mob/living/silicon/robot/inventory.dm b/code/modules/mob/living/silicon/robot/inventory.dm index cf5a44884d1..380cc55e191 100644 --- a/code/modules/mob/living/silicon/robot/inventory.dm +++ b/code/modules/mob/living/silicon/robot/inventory.dm @@ -233,7 +233,7 @@ /mob/living/silicon/robot/unEquip(obj/item/I) if(I == module_active) - deselect_module(get_selected_module()) + uneq_active(I) return ..() /mob/living/silicon/robot/proc/update_module_icon() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 4c1053995e0..fc88e75bd2d 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -49,6 +49,8 @@ var/list/robot_verbs_default = list( var/datum/wires/robot/wires = null var/opened = 0 + var/custom_panel = null + var/list/custom_panel_names = list("Cricket") var/emagged = 0 var/list/force_modules = list() @@ -314,6 +316,7 @@ var/list/robot_verbs_default = list( module_sprites["Default"] = "Service2" module_sprites["Standard"] = "robotServ" module_sprites["Noble-SRV"] = "Noble-SRV" + module_sprites["Cricket"] = "Cricket-SERV" if("Miner") module = new /obj/item/weapon/robot_module/miner(src) @@ -325,6 +328,7 @@ var/list/robot_verbs_default = list( module_sprites["Treadhead"] = "Miner" module_sprites["Standard"] = "robotMine" module_sprites["Noble-DIG"] = "Noble-DIG" + module_sprites["Cricket"] = "Cricket-MINE" if("Medical") module = new /obj/item/weapon/robot_module/medical(src) @@ -337,6 +341,7 @@ var/list/robot_verbs_default = list( module_sprites["Needles"] = "medicalrobot" module_sprites["Standard"] = "robotMedi" module_sprites["Noble-MED"] = "Noble-MED" + module_sprites["Cricket"] = "Cricket-MEDI" status_flags &= ~CANPUSH if("Security") @@ -348,6 +353,7 @@ var/list/robot_verbs_default = list( module_sprites["Bloodhound"] = "bloodhound" module_sprites["Standard"] = "robotSecy" module_sprites["Noble-SEC"] = "Noble-SEC" + module_sprites["Cricket"] = "Cricket-SEC" status_flags &= ~CANPUSH if("Engineering") @@ -360,6 +366,7 @@ var/list/robot_verbs_default = list( module_sprites["Landmate"] = "landmate" module_sprites["Standard"] = "robotEngi" module_sprites["Noble-ENG"] = "Noble-ENG" + module_sprites["Cricket"] = "Cricket-ENGI" magpulse = 1 if("Janitor") @@ -370,6 +377,7 @@ var/list/robot_verbs_default = list( module_sprites["Mop Gear Rex"] = "mopgearrex" module_sprites["Standard"] = "robotJani" module_sprites["Noble-CLN"] = "Noble-CLN" + module_sprites["Cricket"] = "Cricket-JANI" if("Combat") module = new /obj/item/weapon/robot_module/combat(src) @@ -968,6 +976,9 @@ var/list/robot_verbs_default = list( if(custom_sprite) //Custom borgs also have custom panels, heh panelprefix = "[ckey]" + if(custom_panel in custom_panel_names) //For default borgs with different panels + panelprefix = custom_panel + if(wiresexposed) overlays += "[panelprefix]-openpanel +w" else if(cell) @@ -1289,6 +1300,8 @@ var/list/robot_verbs_default = list( module.module_type = "Brobot" update_module_icon() lockcharge = null + var/list/names = splittext(icontype, "-") + custom_panel = trim(names[1]) else to_chat(src, "Something is badly wrong with the sprite selection. Harass a coder.") icon_state = module_sprites[1] diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index a1980b72fed..ac04998430b 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -54,7 +54,6 @@ var/obj/item/stack/S = O if(!S) - modules -= null S = new T(src) modules += S S.amount = 1 @@ -124,10 +123,10 @@ module_type = "Medical" subsystems = list(/mob/living/silicon/proc/subsystem_crew_monitor) stacktypes = list( - /obj/item/stack/medical/bruise_pack/advanced = 5, - /obj/item/stack/medical/ointment/advanced = 5, - /obj/item/stack/medical/splint = 5, - /obj/item/stack/nanopaste = 5 + /obj/item/stack/medical/bruise_pack/advanced = 6, + /obj/item/stack/medical/ointment/advanced = 6, + /obj/item/stack/medical/splint = 6, + /obj/item/stack/nanopaste = 6 ) /obj/item/weapon/robot_module/medical/New() diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 7469c2cca73..8a4df553508 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -224,10 +224,11 @@ /mob/living/silicon/proc/remove_med_sec_hud() var/datum/atom_hud/secsensor = huds[sec_hud] var/datum/atom_hud/medsensor = huds[med_hud] - var/datum/atom_hud/diagsensor = huds[d_hud] + for(var/datum/atom_hud/data/diagnostic/diagsensor in huds) + diagsensor.remove_hud_from(src) secsensor.remove_hud_from(src) medsensor.remove_hud_from(src) - diagsensor.remove_hud_from(src) + /mob/living/silicon/proc/add_sec_hud() var/datum/atom_hud/secsensor = huds[sec_hud] diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index e3ea50aad7b..1526e97304a 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -35,15 +35,15 @@ icon_living = const_type icon_state = const_type else - name = "[ticker.mode.cultdat.get_name(const_type)] ([rand(1, 1000)])" - real_name = ticker.mode.cultdat.get_name(const_type) - icon_living = ticker.mode.cultdat.get_icon(const_type) - icon_state = ticker.mode.cultdat.get_icon(const_type) + name = "[ticker.cultdat.get_name(const_type)] ([rand(1, 1000)])" + real_name = ticker.cultdat.get_name(const_type) + icon_living = ticker.cultdat.get_icon(const_type) + icon_state = ticker.cultdat.get_icon(const_type) for(var/spell in construct_spells) AddSpell(new spell(null)) - if(ticker.mode.cultdat.theme == "blood") + if(ticker.cultdat.theme == "blood") updateglow() /mob/living/simple_animal/hostile/construct/examine(mob/user) diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm index 501bfd1e798..5dfce5d7b72 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -175,3 +175,5 @@ eats_mice = 0 atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) minbodytemp = 0 + melee_damage_lower = 5 + melee_damage_upper = 15 \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/friendly/fox.dm b/code/modules/mob/living/simple_animal/friendly/fox.dm index 6edfc6f42c9..26db6dae955 100644 --- a/code/modules/mob/living/simple_animal/friendly/fox.dm +++ b/code/modules/mob/living/simple_animal/friendly/fox.dm @@ -37,4 +37,6 @@ faction = list("syndicate") gold_core_spawnable = CHEM_MOB_SPAWN_INVALID atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) - minbodytemp = 0 \ No newline at end of file + minbodytemp = 0 + melee_damage_lower = 10 + melee_damage_upper = 20 \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/friendly/sloth.dm b/code/modules/mob/living/simple_animal/friendly/sloth.dm index bf12b07de2e..7f80683a46d 100644 --- a/code/modules/mob/living/simple_animal/friendly/sloth.dm +++ b/code/modules/mob/living/simple_animal/friendly/sloth.dm @@ -17,8 +17,8 @@ response_disarm = "gently pushes aside" response_harm = "kicks" gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY - melee_damage_lower = 18 - melee_damage_upper = 18 + melee_damage_lower = 0 + melee_damage_upper = 0 health = 50 maxHealth = 50 speed = 2 @@ -28,4 +28,4 @@ /mob/living/simple_animal/pet/sloth/paperwork name = "Paperwork" desc = "Cargo's pet sloth. About as useful as the rest of the techs." - gold_core_spawnable = CHEM_MOB_SPAWN_INVALID + gold_core_spawnable = CHEM_MOB_SPAWN_INVALID \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm index fe0374561a4..e58ed9e4289 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm @@ -218,7 +218,7 @@ Difficulty: Medium fire_rain() icon_state = "dragon" - if(swoop_target && !qdeleted(swoop_target) && swoop_target.z == src.z) + if(swoop_target && !QDELETED(swoop_target) && swoop_target.z == src.z) tturf = get_turf(swoop_target) else tturf = get_turf(src) @@ -233,7 +233,7 @@ Difficulty: Medium L.gib() else L.adjustBruteLoss(75) - if(L && !qdeleted(L)) // Some mobs are deleted on death + if(L && !QDELETED(L)) // Some mobs are deleted on death var/throw_dir = get_dir(src, L) if(L.loc == loc) throw_dir = pick(alldirs) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm index 054c94d7a25..43e2fa4c13f 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm @@ -446,7 +446,7 @@ Difficulty: Hard if(!currently_seeking) currently_seeking = TRUE targetturf = get_turf(target) - while(target && src && !qdeleted(src) && currently_seeking && x && y && targetturf) //can this target actually be sook out + while(target && src && !QDELETED(src) && currently_seeking && x && y && targetturf) //can this target actually be sook out if(!moving) //we're out of tiles to move, find more and where the target is! more_previouser_moving_dir = previous_moving_dir previous_moving_dir = moving_dir diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/__defines.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/__defines.dm index eefc506ff99..b4e2728eabb 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/__defines.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/__defines.dm @@ -17,6 +17,7 @@ #define TS_DESC_WHITE "White - Infect" #define TS_DESC_BLACK "Black - Poison" #define TS_DESC_PURPLE "Purple - Guard" +#define TS_DESC_BROWN "Brown - Breacher" #define TS_DESC_PRINCE "Prince - WAR" #define TS_DESC_MOTHER "Mother - HORROR" #define TS_DESC_QUEEN "Queen - LEADER" diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/actions.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/actions.dm index 90cef39a98f..f2bed558b8c 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/actions.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/actions.dm @@ -121,6 +121,7 @@ if(thick) W.opacity = 1 W.name = "thick terror web" + W.health = W.health * 2 if(web_infects) W.infectious = 1 W.name = "sharp terror web" @@ -251,17 +252,32 @@ stop_automated_movement = 0 /mob/living/simple_animal/hostile/poison/terror_spider/proc/DoVentSmash() + var/valid_target = FALSE + for(var/obj/machinery/atmospherics/unary/vent_pump/P in range(1, get_turf(src))) + if(P.welded) + valid_target = TRUE + for(var/obj/machinery/atmospherics/unary/vent_scrubber/C in range(1, get_turf(src))) + if(C.welded) + valid_target = TRUE + if(!valid_target) + to_chat(src, "No welded vent or scrubber nearby!") + return + playsound(get_turf(src), 'sound/machines/airlock_alien_prying.ogg', 50, 0) if(do_after(src, 40, target = loc)) - for(var/obj/machinery/atmospherics/unary/vent_pump/P in view(1, src)) + for(var/obj/machinery/atmospherics/unary/vent_pump/P in range(1, get_turf(src))) if(P.welded) P.welded = 0 P.update_icon() + P.update_pipe_image() + forceMove(P.loc) P.visible_message("[src] smashes the welded cover off [P]!") return - for(var/obj/machinery/atmospherics/unary/vent_scrubber/C in view(1, src)) + for(var/obj/machinery/atmospherics/unary/vent_scrubber/C in range(1, get_turf(src))) if(C.welded) C.welded = 0 C.update_icon() + C.update_pipe_image() + forceMove(C.loc) C.visible_message("[src] smashes the welded cover off [C]!") return to_chat(src, "There is no welded vent or scrubber close enough to do this.") \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/black.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/black.dm index c1a7bf45da7..982a0eaae90 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/black.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/black.dm @@ -39,9 +39,8 @@ visible_message("[src] bites [target], but cannot inject venom into their [inject_target]!") L.attack_animal(src) if(!ckey && (!(target in enemies) || L.reagents.has_reagent("terror_black_toxin", 60))) - step_away(src,L) - step_away(src,L) + step_away(src, L) + step_away(src, L) LoseTarget() - for(var/i in 0 to 3) - step_away(src, L) - visible_message("[src] warily eyes [L] from a distance.") \ No newline at end of file + step_away(src, L) + visible_message("[src] jumps away from [L]!") \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/brown.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/brown.dm new file mode 100644 index 00000000000..af5bd4495ee --- /dev/null +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/brown.dm @@ -0,0 +1,34 @@ +// -------------------------------------------------------------------------------- +// ----------------- TERROR SPIDERS: T2 BROWN TERROR ------------------------------ +// -------------------------------------------------------------------------------- +// -------------: ROLE: breaking vents +// -------------: AI: ventcrawls a lot, breaks open vents +// -------------: SPECIAL: ventsmash +// -------------: TO FIGHT IT: blast it before it can get away! +// -------------: SPRITES FROM: IK3I + +/mob/living/simple_animal/hostile/poison/terror_spider/brown + name = "Brown Terror spider" + desc = "An ominous-looking spider, colored brown like the dirt it crawled out of. Its forearms have sharp digging claws." + spider_role_summary = "Vent-breaking spider that breaches into new areas." + ai_target_method = TS_DAMAGE_BRUTE + icon_state = "terror_brown" + icon_living = "terror_brown" + icon_dead = "terror_brown_dead" + maxHealth = 120 // Low + health = 120 + melee_damage_lower = 20 + melee_damage_upper = 30 + move_to_delay = 20 // Slow. + spider_opens_doors = 2 // Breach specialist. + environment_smash = ENVIRONMENT_SMASH_RWALLS // Breaks anything. + spider_tier = TS_TIER_2 + ai_ventbreaker = 1 + freq_ventcrawl_combat = 600 // Ventcrawls very frequently, breaking open vents as it goes. + freq_ventcrawl_idle = 1800 + var/datum/action/innate/terrorspider/ventsmash/ventsmash_action + +/mob/living/simple_animal/hostile/poison/terror_spider/brown/New() + ..() + ventsmash_action = new() + ventsmash_action.Grant(src) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/ghost.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/ghost.dm index 592f8230edd..b52abff90c9 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/ghost.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/ghost.dm @@ -31,7 +31,7 @@ return if(error_on_humanize == "") var/spider_ask = alert(humanize_prompt, "Join as Terror Spider?", "Yes", "No") - if(spider_ask == "No" || !src || qdeleted(src)) + if(spider_ask == "No" || !src || QDELETED(src)) return else to_chat(user, "Cannot inhabit spider: [error_on_humanize]") diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/gray.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/gray.dm index fdaa36257d2..06b28c6400e 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/gray.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/gray.dm @@ -29,19 +29,16 @@ /mob/living/simple_animal/hostile/poison/terror_spider/gray/spider_specialattack(mob/living/carbon/human/L, poisonable) - if(!poisonable) - ..() - return - if(L.silent >= 10) - L.attack_animal(src) + var/obj/structure/spider/terrorweb/W = locate() in get_turf(L) + if(W) + melee_damage_lower = initial(melee_damage_lower) * 2 + melee_damage_upper = initial(melee_damage_upper) * 2 + visible_message("[src] savagely mauls [target] while they are stuck in the web!") else - var/inject_target = pick("chest","head") - if(L.stunned || L.can_inject(null,0,inject_target,0)) - L.Silence(20) // instead of having a venom that only lasts seconds, we just add the silence directly. - visible_message("[src] buries grey fangs deep into the [inject_target] of [target]!") - else - visible_message("[src] bites [target], but cannot inject venom into their [inject_target]!") - L.attack_animal(src) + melee_damage_lower = initial(melee_damage_lower) + melee_damage_upper = initial(melee_damage_upper) + visible_message("[src] bites [target]!") + L.attack_animal(src) /mob/living/simple_animal/hostile/poison/terror_spider/gray/adjustBruteLoss(damage) ..(damage) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm index afb2785bb10..21b1276425c 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm @@ -25,7 +25,6 @@ ventcrawler = 0 ai_ventcrawls = 0 environment_smash = ENVIRONMENT_SMASH_RWALLS - loot = list(/obj/item/clothing/accessory/medal) idle_ventcrawl_chance = 0 spider_tier = TS_TIER_3 spider_opens_doors = 2 diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm index 6a19cf1122c..c9309715443 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm @@ -20,7 +20,7 @@ health = 200 melee_damage_lower = 15 melee_damage_upper = 25 - move_to_delay = 6 + move_to_delay = 4 spider_tier = TS_TIER_2 spider_opens_doors = 2 ventcrawler = 0 @@ -30,7 +30,12 @@ var/dcheck_counter = 0 var/queen_visible = 1 var/cycles_noqueen = 0 + var/datum/action/innate/terrorspider/thickweb/thickweb_action +/mob/living/simple_animal/hostile/poison/terror_spider/purple/New() + ..() + thickweb_action = new() + thickweb_action.Grant(src) /mob/living/simple_animal/hostile/poison/terror_spider/purple/death(gibbed) if(spider_myqueen) @@ -43,14 +48,6 @@ visible_message("[src] chitters in the direction of [Q]!") . = ..() -/mob/living/simple_animal/hostile/poison/terror_spider/purple/spider_specialattack(mob/living/carbon/human/L, poisonable) - if(cycles_noqueen < 6 && prob(10)) - visible_message("[src] rams into [L], knocking them to the floor!") - L.Weaken(5) - L.Stun(5) - else - ..() - /mob/living/simple_animal/hostile/poison/terror_spider/purple/Life() . = ..() if(.) // if mob is NOT dead diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm index ef285b488a6..5edcbe919c2 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm @@ -6,7 +6,7 @@ // -------------: AI: builds a nest, lays many eggs, attempts to take over the station // -------------: SPECIAL: spins webs, breaks lights, breaks cameras, webs objects, lays eggs, commands other spiders... // -------------: TO FIGHT IT: bring an army, and take no prisoners. Mechs and/or decloner guns are a very good idea. -// -------------: SPRITES FROM: FoS, http://nanotrasen.se/phpBB3/memberlist.php?mode=viewprofile&u=386 +// -------------: SPRITES FROM: IK3I /mob/living/simple_animal/hostile/poison/terror_spider/queen name = "Queen of Terror spider" @@ -23,17 +23,6 @@ melee_damage_upper = 20 move_to_delay = 15 // yeah, this is very slow, but ventcrawler = 1 - var/spider_spawnfrequency = 1200 // 120 seconds - var/spider_spawnfrequency_stable = 1200 // 120 seconds. Spawnfrequency is set to this on ai spiders once nest setup is complete. - var/spider_lastspawn = 0 - var/nestfrequency = 150 // 15 seconds - var/lastnestsetup = 0 - var/neststep = 0 - var/hasnested = 0 - var/spider_max_per_nest = 25 // above this, AI queens become stable - var/canlay = 4 // main counter for egg-laying ability! # = num uses, incremented at intervals - var/eggslaid = 0 - var/spider_can_fakelings = 3 // spawns defective spiderlings that don't grow up, used to freak out crew, atmosphere idle_ventcrawl_chance = 0 force_threshold = 18 // outright immune to anything of force under 18, this means welders can't hurt it, only guns can ranged = 1 @@ -43,7 +32,18 @@ projectiletype = /obj/item/projectile/terrorqueenspit spider_tier = TS_TIER_4 spider_opens_doors = 2 - loot = list(/obj/item/clothing/accessory/medal) + var/spider_spawnfrequency = 1200 // 120 seconds + var/spider_spawnfrequency_stable = 1200 // 120 seconds. Spawnfrequency is set to this on ai spiders once nest setup is complete. + var/spider_lastspawn = 0 + var/nestfrequency = 300 // 30 seconds + var/lastnestsetup = 0 + var/neststep = 0 + var/hasnested = 0 + var/spider_max_per_nest = 25 // above this, AI queens become stable + var/canlay = 4 // main counter for egg-laying ability! # = num uses, incremented at intervals + var/eggslaid = 0 + var/spider_can_fakelings = 3 // spawns defective spiderlings that don't grow up, used to freak out crew, atmosphere + var/list/spider_types_standard = list(/mob/living/simple_animal/hostile/poison/terror_spider/red, /mob/living/simple_animal/hostile/poison/terror_spider/gray, /mob/living/simple_animal/hostile/poison/terror_spider/green, /mob/living/simple_animal/hostile/poison/terror_spider/black) var/datum/action/innate/terrorspider/queen/queennest/queennest_action var/datum/action/innate/terrorspider/queen/queensense/queensense_action var/datum/action/innate/terrorspider/queen/queeneggs/queeneggs_action @@ -98,12 +98,18 @@ for(var/mob/living/simple_animal/hostile/poison/terror_spider/T in ts_spiderlist) T.enemies |= enemies +/mob/living/simple_animal/hostile/poison/terror_spider/queen/proc/ai_nest_is_full() + var/numspiders = CountSpiders() + if(numspiders >= spider_max_per_nest) + return TRUE + return FALSE + /mob/living/simple_animal/hostile/poison/terror_spider/queen/handle_automated_action() ..() if(!stat && !ckey && AIStatus != AI_OFF && !target && !path_to_vent) switch(neststep) if(0) - // we have no nest :( + // No nest. If current location is eligible for nesting, advance to step 1. var/ok_to_nest = 1 var/area/new_area = get_area(loc) if(new_area) @@ -140,81 +146,60 @@ qdel(src) new /obj/effect/portal(get_turf(loc)) if(1) + // No nest, and we should create one. Start NestMode(), then advance to step 2. if(world.time > (lastnestsetup + nestfrequency)) lastnestsetup = world.time neststep = 2 NestMode() if(2) + // Create initial pair of purple nest guards. if(world.time > (lastnestsetup + nestfrequency)) lastnestsetup = world.time spider_lastspawn = world.time DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/purple, 2, 0) neststep = 3 if(3) + // Create spiders (random T1 types) until nest is full. if(world.time > (spider_lastspawn + spider_spawnfrequency)) if(prob(20)) - var/obj/structure/spider/eggcluster/terror_eggcluster/N = locate() in get_turf(src) - if(!N) - spider_lastspawn = world.time - DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/green, 2, 0) + if(ai_nest_is_full()) + if(spider_awaymission) + spider_spawnfrequency = spider_spawnfrequency_stable neststep = 4 + else + var/obj/structure/spider/eggcluster/terror_eggcluster/N = locate() in get_turf(src) + if(!N) + spider_lastspawn = world.time + DoLayTerrorEggs(pick(spider_types_standard), 2, 0) if(4) + // Nest should be full. If so, pulse attack command. Otherwise, start replenishing nest (stage 5). if(world.time > (spider_lastspawn + spider_spawnfrequency)) if(prob(20)) - var/obj/structure/spider/eggcluster/terror_eggcluster/N = locate() in get_turf(src) - if(!N) - spider_lastspawn = world.time - DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/red, 2, 1) + if(ai_nest_is_full()) + SetHiveCommand(0, 15) // AI=0 (attack everyone), ventcrawl=15%/tick + else neststep = 5 if(5) + // If already replenished, go idle (stage 4). Otherwise, replenish nest. if(world.time > (spider_lastspawn + spider_spawnfrequency)) if(prob(20)) - var/obj/structure/spider/eggcluster/terror_eggcluster/N = locate() in get_turf(src) - if(!N) - if(!spider_awaymission) - QueenFakeLings() - spider_lastspawn = world.time - if(prob(33)) - DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/gray, 2, 1) - else if(prob(50)) - DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/red, 2, 1) - else - DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/green, 2, 1) - var/spidercount = CountSpiders() - if(spidercount >= spider_max_per_nest) // station overwhelmed! - neststep = 6 - if(6) - if(world.time > (spider_lastspawn + spider_spawnfrequency)) - spider_lastspawn = world.time - // go hostile, EXTERMINATE MODE. - SetHiveCommand(0, 15) // AI=0 (attack everyone), ventcrawl=15%/tick - var/numspiders = CountSpiders() - if(numspiders < spider_max_per_nest) - if(prob(33)) - DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/black, 2, 1) - else if(prob(50)) - DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/red, 2, 0) + if(ai_nest_is_full()) + neststep = 4 else - DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/green, 2, 1) - else if(spider_awaymission) - neststep = 7 - spider_spawnfrequency = spider_spawnfrequency_stable - // if we're an away mission queen... don't keep spawning spiders at high rates. Away team should have a chance. - if(7) - if(world.time > (spider_lastspawn + spider_spawnfrequency)) - spider_lastspawn = world.time - var/numspiders = CountSpiders() - if(numspiders < spider_max_per_nest) - // someone is killing my children... - if(prob(25)) - DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/black, 2, 1) - else if(prob(33)) - DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/red, 2, 0) - else if(prob(50)) - DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/green, 2, 1) - else - DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/purple, 2, 0) - neststep = 6 + var/obj/structure/spider/eggcluster/terror_eggcluster/N = locate() in get_turf(src) + if(!N) + spider_lastspawn = world.time + var/num_purple = CountSpidersType(/mob/living/simple_animal/hostile/poison/terror_spider/purple) + var/num_white = CountSpidersType(/mob/living/simple_animal/hostile/poison/terror_spider/white) + var/num_brown = CountSpidersType(/mob/living/simple_animal/hostile/poison/terror_spider/brown) + if(num_purple < 4) + DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/purple, 2, 0) + else if(num_white < 2) + DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/white, 2, 0) + else if(num_brown < 2) + DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/brown, 2, 0) + else + DoLayTerrorEggs(pick(spider_types_standard), 2, 0) /mob/living/simple_animal/hostile/poison/terror_spider/queen/proc/NestPrompt() var/confirm = alert(src, "Are you sure you want to nest? You will be able to lay eggs, and smash walls, but not ventcrawl.","Nest?","Yes","No") @@ -264,13 +249,15 @@ to_chat(src, "Too soon to attempt that again. Wait just a few more seconds...") return var/list/eggtypes = list(TS_DESC_RED, TS_DESC_GRAY, TS_DESC_GREEN, TS_DESC_BLACK, TS_DESC_PURPLE) + if(canlay >= 4) + eggtypes |= TS_DESC_BROWN if(canlay >= 12) eggtypes |= TS_DESC_MOTHER eggtypes |= TS_DESC_PRINCE - var num_purples = CountSpidersType(/mob/living/simple_animal/hostile/poison/terror_spider/purple) + var/num_purples = CountSpidersType(/mob/living/simple_animal/hostile/poison/terror_spider/purple) if(num_purples >= 2) eggtypes -= TS_DESC_PURPLE - var num_blacks = CountSpidersType(/mob/living/simple_animal/hostile/poison/terror_spider/black) + var/num_blacks = CountSpidersType(/mob/living/simple_animal/hostile/poison/terror_spider/black) if(num_blacks >= 2) eggtypes -= TS_DESC_BLACK var/eggtype = input("What kind of eggs?") as null|anything in eggtypes @@ -288,6 +275,13 @@ canlay -= 12 DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/prince, 1, 0) return + else if(eggtype == TS_DESC_BROWN) + if(canlay < 4) + to_chat(src, "Insufficient strength. It takes as much effort to lay one of those as it does to lay 4 normal eggs.") + else + canlay -= 4 + DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/brown, 1, 0) + return var/numlings = 1 if(eggtype != TS_DESC_PURPLE) if(canlay >= 5) @@ -333,9 +327,7 @@ for(var/i in 1 to numlings) var/obj/structure/spider/spiderling/terror_spiderling/S = new /obj/structure/spider/spiderling/terror_spiderling(get_turf(src)) S.grow_as = /mob/living/simple_animal/hostile/poison/terror_spider/red - S.stillborn = TRUE - S.name = "Evil-Looking Spiderling" - S.desc = "It moves very quickly, hisses loudly for its size... and has disproportionately large fangs. Hopefully it does not grow up..." + S.stillborn = 1 if(!spider_can_fakelings) queenfakelings_action.Remove(src) else diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm index b7225b373f2..62f69b20b39 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm @@ -148,7 +148,7 @@ last_ventcrawl_time = world.time var/vdistance = 99 for(var/obj/machinery/atmospherics/unary/vent_pump/v in view(10, src)) - if(!v.welded) + if(!v.welded || ai_ventbreaker) if(get_dist(src,v) < vdistance) entry_vent = v vdistance = get_dist(src,v) @@ -217,7 +217,8 @@ var/tgt_dir = get_dir(src,mygoal) for(var/obj/machinery/door/airlock/A in view(1, src)) if(A.density) - try_open_airlock(A) + spawn(0) + try_open_airlock(A) for(var/obj/machinery/door/firedoor/F in view(1, src)) if(tgt_dir == get_dir(src,F) && F.density && !F.welded) visible_message("[src] pries open the firedoor!") @@ -234,9 +235,13 @@ if(is_type_in_list(obstacle, valid_obstacles)) obstacle.attack_animal(src) -/mob/living/simple_animal/hostile/poison/terror_spider/proc/TSVentCrawlRandom(/var/entry_vent) +/mob/living/simple_animal/hostile/poison/terror_spider/proc/TSVentCrawlRandom() if(entry_vent) if(get_dist(src, entry_vent) <= 2) + if(ai_ventbreaker && entry_vent.welded) + entry_vent.welded = 0 + entry_vent.update_icon() + entry_vent.visible_message("[src] smashes the welded cover off [entry_vent]!") var/list/vents = list() for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in entry_vent.parent.other_atmosmch) vents.Add(temp_vent) @@ -250,17 +255,23 @@ forceMove(exit_vent) var/travel_time = round(get_dist(loc, exit_vent.loc) / 2) spawn(travel_time) - if(!exit_vent || exit_vent.welded) + if(!exit_vent || (exit_vent.welded && !ai_ventbreaker)) forceMove(original_location) entry_vent = null return if(prob(50)) audible_message("You hear something squeezing through the ventilation ducts.") spawn(travel_time) - if(!exit_vent || exit_vent.welded) + if(!exit_vent || (exit_vent.welded && !ai_ventbreaker)) forceMove(original_location) entry_vent = null return + if(ai_ventbreaker && exit_vent.welded) + exit_vent.welded = 0 + exit_vent.update_icon() + exit_vent.update_pipe_image() + exit_vent.visible_message("[src] smashes the welded cover off [exit_vent]!") + playsound(exit_vent.loc, 'sound/machines/airlock_alien_prying.ogg', 50, 0) forceMove(exit_vent.loc) entry_vent = null var/area/new_area = get_area(loc) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm index dd5fe980214..2a1e0f17ef4 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm @@ -49,6 +49,7 @@ var/global/list/ts_spiderling_list = list() var/freq_ventcrawl_combat = 1800 // 3 minutes var/freq_ventcrawl_idle = 9000 // 15 minutes var/last_ventcrawl_time = -9000 // Last time the spider crawled. Used to prevent excessive crawling. Setting to freq*-1 ensures they can crawl once on spawn. + var/ai_ventbreaker = 0 // AI movement tracking var/spider_steps_taken = 0 // leave at 0, its a counter for ai steps taken. @@ -271,6 +272,8 @@ var/global/list/ts_spiderling_list = list() // after 30 seconds, assuming nobody took control of it yet, offer it to ghosts. addtimer(src, "CheckFaction", 150) addtimer(src, "announcetoghosts", 300) + var/datum/atom_hud/U = huds[DATA_HUD_MEDICAL_ADVANCED] + U.add_hud_to(src) /mob/living/simple_animal/hostile/poison/terror_spider/proc/announcetoghosts() if(spider_awaymission) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/white.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/white.dm index 0eced254544..973195c90a7 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/white.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/white.dm @@ -21,7 +21,6 @@ melee_damage_upper = 15 move_to_delay = 4 spider_tier = TS_TIER_2 - loot = list(/obj/item/clothing/accessory/medal) web_infects = 1 diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 91eb0970f50..e6dacc81a67 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -687,7 +687,15 @@ "STOP HOT-WIRING THE ENGINE, FUCKING CHRIST!", "Wire the solars, you lazy bums!", "WHO TOOK THE DAMN HARDSUITS?", - "OH GOD ITS FREE CALL THE SHUTTLE") + "OH GOD ITS FREE CALL THE SHUTTLE", + "Why are there so many atmos alerts?", + "OH GOD WHY WOULD YOU TURN ON THE PA BEFORE CONTAINMENT IS UP?", + "Remember to lock the emitters!", + "Stop goofing off and repair the goddam station!", + "The singularity is not your friend!", + "What were the wires again?", + "Goddam emaggers!" + ) gold_core_spawnable = CHEM_MOB_SPAWN_INVALID /mob/living/simple_animal/parrot/Poly/New() diff --git a/code/modules/mob/living/simple_animal/tribbles.dm b/code/modules/mob/living/simple_animal/tribbles.dm index dfe4715edd5..5ea4225b1ad 100644 --- a/code/modules/mob/living/simple_animal/tribbles.dm +++ b/code/modules/mob/living/simple_animal/tribbles.dm @@ -93,13 +93,13 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles, item_state = "tribble1" w_class = 10 var/gestation = 0 + flags = DROPDEL /obj/item/toy/tribble/attack_self(mob/user as mob) //hug that tribble (and play a sound if we add one) ..() to_chat(user, "You nuzzle the tribble and it trills softly.") /obj/item/toy/tribble/dropped(mob/user as mob) //now you can't item form them to get rid of them all so easily - ..() new /mob/living/simple_animal/tribble(user.loc) for(var/mob/living/simple_animal/tribble/T in user.loc) T.icon_state = src.icon_state @@ -108,7 +108,7 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles, T.gestation = src.gestation to_chat(user, "The tribble gets up and wanders around.") - qdel(src) + . = ..() /obj/item/toy/tribble/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob) //neutering and un-neutering ..() diff --git a/code/modules/mob/logout.dm b/code/modules/mob/logout.dm index b9fed474cdf..1909c67f0ec 100644 --- a/code/modules/mob/logout.dm +++ b/code/modules/mob/logout.dm @@ -1,5 +1,5 @@ /mob/Logout() - nanomanager.user_logout(src) // this is used to clean up (remove) this user's Nano UIs + SSnanoui.user_logout(src) // this is used to clean up (remove) this user's Nano UIs unset_machine() player_list -= src log_access("Logout: [key_name(src)]") diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 06bd75f39e8..890dcb033a7 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -22,7 +22,7 @@ AA.viewers -= src viewing_alternate_appearances = null ..() - return QDEL_HINT_HARDDEL_NOW + return QDEL_HINT_HARDDEL /mob/New() mob_list += src @@ -970,7 +970,8 @@ var/list/slot_equipment_priority = list( \ // this function displays the station time in the status panel /mob/proc/show_stat_station_time() - stat(null, "Station Time: [worldtime2text()]") + stat(null, "Round Time: [worldtime2text()]") + stat(null, "Station Time: [station_time_timestamp()]") // this function displays the shuttles ETA in the status panel if the shuttle has been called /mob/proc/show_stat_emergency_shuttle_eta() diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 4b41b5084c6..5bbe94010a7 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -10,7 +10,7 @@ /obj/item/weapon/grab name = "grab" - flags = NOBLUDGEON | ABSTRACT + flags = NOBLUDGEON | ABSTRACT | DROPDEL var/obj/screen/grab/hud = null var/mob/living/affecting = null var/mob/living/assailant = null @@ -433,10 +433,6 @@ return EAT_TIME_FAT //if it doesn't fit into the above, it's probably a fat guy, take EAT_TIME_FAT to do it -/obj/item/weapon/grab/dropped() - qdel(src) - - /obj/item/weapon/grab/Destroy() if(affecting) affecting.pixel_x = 0 diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 9d16d66a64c..d28a34f1bc3 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -1,6 +1,7 @@ /mob/new_player var/ready = 0 - var/spawning = 0//Referenced when you want to delete the new_player later on in the code. + var/skip_antag = 0 //For declining an antag roll this round. + var/spawning = 0 //Referenced when you want to delete the new_player later on in the code. var/totalPlayers = 0 //Player counts for the Lobby tab var/totalPlayersReady = 0 universal_speak = 1 @@ -31,6 +32,11 @@ if(!ready) output += "

Declare Ready

" else output += "

You are ready (Cancel)

" + var/list/antags = client.prefs.be_special + if(antags && antags.len) + if(!skip_antag) output += "

Global Antag Candidancy" + else output += "

Global Antag Candidancy" + output += "
You are [skip_antag ? "ineligable" : "eligable"] for all antag roles.

" else output += "

View the Crew Manifest

" output += "

Join Game!

" @@ -97,8 +103,7 @@ statpanel("Status") if(client.statpanel == "Status" && ticker) - if(ticker.current_state != GAME_STATE_PREGAME) - stat(null, "Station Time: [worldtime2text()]") + show_stat_station_time() /mob/new_player/Topic(href, href_list[]) @@ -112,6 +117,10 @@ ready = !ready new_player_panel_proc() + if(href_list["skip_antag"]) + skip_antag = !skip_antag + new_player_panel_proc() + if(href_list["refresh"]) src << browse(null, "window=playersetup") //closes the player setup window new_player_panel_proc() diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 072300a85f8..aa1607db9af 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -274,6 +274,9 @@ if(!MP) return 0 + if(!GAMEMODE_IS_NUCLEAR) + if(ispath(MP, /mob/living/simple_animal/pet/cat/Syndi)) + return 0 if(ispath(MP, /mob/living/simple_animal/pet/cat)) return 1 if(ispath(MP, /mob/living/simple_animal/pet/corgi)) @@ -288,6 +291,9 @@ return 1 if(ispath(MP, /mob/living/simple_animal/pony)) return 1 + if(!GAMEMODE_IS_NUCLEAR) + if(ispath(MP, /mob/living/simple_animal/pet/fox/Syndifox)) + return 0 if(ispath(MP, /mob/living/simple_animal/pet/fox)) return 1 if(ispath(MP, /mob/living/simple_animal/chick)) diff --git a/code/modules/modular_computers/NTNet/NTNRC/conversation.dm b/code/modules/modular_computers/NTNet/NTNRC/conversation.dm index 55998071e71..33a94cc31a5 100644 --- a/code/modules/modular_computers/NTNet/NTNRC/conversation.dm +++ b/code/modules/modular_computers/NTNet/NTNRC/conversation.dm @@ -21,12 +21,12 @@ var/global/static/ntnrc_uid = 0 return ..() /datum/ntnet_conversation/proc/add_message(message, username) - message = "[worldtime2text()] [username]: [message]" + message = "[station_time_timestamp()] [username]: [message]" messages.Add(message) trim_message_list() /datum/ntnet_conversation/proc/add_status_message(message) - messages.Add("[worldtime2text()] -!- [message]") + messages.Add("[station_time_timestamp()] -!- [message]") trim_message_list() /datum/ntnet_conversation/proc/trim_message_list() diff --git a/code/modules/modular_computers/NTNet/NTNet.dm b/code/modules/modular_computers/NTNet/NTNet.dm index ed69207f0ee..0fbcdae9f08 100644 --- a/code/modules/modular_computers/NTNet/NTNet.dm +++ b/code/modules/modular_computers/NTNet/NTNet.dm @@ -36,7 +36,7 @@ var/global/datum/ntnet/ntnet_global = new() // Simplified logging: Adds a log. log_string is mandatory parameter, source is optional. /datum/ntnet/proc/add_log(log_string, obj/item/weapon/computer_hardware/network_card/source = null) - var/log_text = "[worldtime2text()] - " + var/log_text = "[station_time_timestamp()] - " if(source) log_text += "[source.get_network_tag()] - " else diff --git a/code/modules/modular_computers/NTNet/NTNet_relay.dm b/code/modules/modular_computers/NTNet/NTNet_relay.dm index 5f5325e0364..aade579c403 100644 --- a/code/modules/modular_computers/NTNet/NTNet_relay.dm +++ b/code/modules/modular_computers/NTNet/NTNet_relay.dm @@ -60,7 +60,7 @@ ..() /obj/machinery/ntnet_relay/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "ntnet_relay.tmpl", "NTNet Quantum Relay", 500, 300) ui.open() diff --git a/code/modules/modular_computers/computers/item/computer_ui.dm b/code/modules/modular_computers/computers/item/computer_ui.dm index 4044e2530bf..03b3f692730 100644 --- a/code/modules/modular_computers/computers/item/computer_ui.dm +++ b/code/modules/modular_computers/computers/item/computer_ui.dm @@ -29,7 +29,7 @@ to_chat(user, "\The [src] beeps three times, it's screen displaying a \"DISK ERROR\" warning.") return // No HDD, No HDD files list or no stored files. Something is very broken. - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) var/datum/asset/assets = get_asset_datum(/datum/asset/simple/headers) assets.send(user) @@ -105,7 +105,7 @@ data["PC_programheaders"] = program_headers - data["PC_stationtime"] = worldtime2text() + data["PC_stationtime"] = station_time_timestamp() data["PC_showexitprogram"] = active_program ? 1 : 0 // Hides "Exit Program" button on mainscreen return data diff --git a/code/modules/modular_computers/file_system/program.dm b/code/modules/modular_computers/file_system/program.dm index 8d917e4cb81..5eea746f725 100644 --- a/code/modules/modular_computers/file_system/program.dm +++ b/code/modules/modular_computers/file_system/program.dm @@ -160,7 +160,7 @@ if(..()) return 1 - var/datum/nanoui/ui = nanomanager.get_open_ui(usr, src, "main") + var/datum/nanoui/ui = SSnanoui.get_open_ui(usr, src, "main") if(computer) switch(href_list["action"]) diff --git a/code/modules/modular_computers/file_system/programs/antagonist/dos.dm b/code/modules/modular_computers/file_system/programs/antagonist/dos.dm index feaee3be63d..485cb7d01b1 100644 --- a/code/modules/modular_computers/file_system/programs/antagonist/dos.dm +++ b/code/modules/modular_computers/file_system/programs/antagonist/dos.dm @@ -36,7 +36,7 @@ ..() /datum/computer_file/program/ntnet_dos/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) var/datum/asset/assets = get_asset_datum(/datum/asset/simple/headers) assets.send(user) diff --git a/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm b/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm index 38da8499756..eabb8fe4828 100644 --- a/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm +++ b/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm @@ -61,7 +61,7 @@ return temp /datum/computer_file/program/revelation/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) var/datum/asset/assets = get_asset_datum(/datum/asset/simple/headers) assets.send(user) diff --git a/code/modules/modular_computers/file_system/programs/command/card.dm b/code/modules/modular_computers/file_system/programs/command/card.dm index 8cd1043bea6..9cd1797b142 100644 --- a/code/modules/modular_computers/file_system/programs/command/card.dm +++ b/code/modules/modular_computers/file_system/programs/command/card.dm @@ -79,7 +79,9 @@ "current_positions" = job.current_positions, "total_positions" = job.total_positions, "can_open" = can_open_job(job), - "can_close" = can_close_job(job)))) + "can_close" = can_close_job(job), + "can_prioritize" = can_prioritize_job(job) + ))) return formatted @@ -121,6 +123,19 @@ return -1 return 0 +/datum/computer_file/program/card_mod/proc/can_prioritize_job(datum/job/job) + if(job) + if(!job_blacklisted(job)) + if(job in job_master.prioritized_jobs) + return 2 + else + if(job_master.prioritized_jobs.len >= 3) + return 0 + if(job.total_positions <= job.current_positions) + return 0 + return 1 + return -1 + /datum/computer_file/program/card_mod/proc/format_jobs(list/jobs) var/obj/item/weapon/computer_hardware/card_slot/card_slot = computer.all_components[MC_CARD] if(!card_slot || !card_slot.stored_card) @@ -137,7 +152,7 @@ /datum/computer_file/program/card_mod/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) var/datum/asset/assets = get_asset_datum(/datum/asset/simple/headers) assets.send(user) @@ -210,6 +225,7 @@ //let custom jobs function as an impromptu alt title, mainly for sechuds if(temp_t && modify) modify.assignment = temp_t + log_game("[key_name(usr)] has given \"[modify.registered_name]\" the custom job title \"[temp_t]\".") else var/list/access = list() if(is_centcom) @@ -227,6 +243,11 @@ access = jobdatum.get_access() + var/jobnamedata = modify.getRankAndAssignment() + log_game("[key_name(usr)] has reassigned \"[modify.registered_name]\" from \"[jobnamedata]\" to \"[t1]\".") + if(t1 == "Civilian") + message_admins("[key_name_admin(usr)] has reassigned \"[modify.registered_name]\" from \"[jobnamedata]\" to \"[t1]\".") + modify.access = access modify.assignment = t1 modify.rank = t1 @@ -255,11 +276,11 @@ playsound(computer.loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, 1) spawn(50) printing = 0 - nanomanager.update_uis(src) + SSnanoui.update_uis(src) var/title var/content if(mode == 2) - title = "crew manifest ([worldtime2text()])" + title = "crew manifest ([station_time_timestamp()])" content = "

Crew Manifest


[data_core ? data_core.get_manifest(0) : ""]" else if(modify && !mode) title = "access report" @@ -287,9 +308,11 @@ if("PRG_terminate") if(is_authenticated(usr)) + var/jobnamedata = modify.getRankAndAssignment() + log_game("[key_name(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\".") + message_admins("[key_name_admin(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\".") modify.assignment = "Terminated" modify.access = list() - callHook("terminate_employee", list(modify)) if("PRG_make_job_available") @@ -323,10 +346,30 @@ opened_positions[edit_job_target]-- log_game("[key_name(usr)] has closed a job slot for job \"[j]\".") + + if("PRG_prioritize_job") + // TOGGLE WHETHER JOB APPEARS AS PRIORITIZED IN THE LOBBY + if(is_authenticated(usr)) + var/priority_target = href_list["job"] + var/datum/job/j = job_master.GetJob(priority_target) + if(!j) + return 0 + // Unlike the proper ID computer, this does not check job_in_department + var/priority = TRUE + if(j in job_master.prioritized_jobs) + job_master.prioritized_jobs -= j + priority = FALSE + else if(job_master.prioritized_jobs.len < 3) + job_master.prioritized_jobs += j + else + return 0 + log_game("[key_name(usr)] [priority ? "prioritized" : "unprioritized"] the job \"[j.title]\".") + playsound(computer.loc, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0) + if(modify) modify.name = text("[modify.registered_name]'s ID Card ([modify.assignment])") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 /datum/computer_file/program/card_mod/ui_data(mob/user) diff --git a/code/modules/modular_computers/file_system/programs/command/comms.dm b/code/modules/modular_computers/file_system/programs/command/comms.dm index 84cc2ec130a..fc6ac7d50f3 100644 --- a/code/modules/modular_computers/file_system/programs/command/comms.dm +++ b/code/modules/modular_computers/file_system/programs/command/comms.dm @@ -94,7 +94,7 @@ return menu_state /datum/computer_file/program/comm/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) - ui = nanomanager.try_update_ui(user, src, ui_key, ui) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui) if(!ui) var/datum/asset/assets = get_asset_datum(/datum/asset/simple/headers) assets.send(user) @@ -191,14 +191,14 @@ if(istype(id)) crew_announcement.announcer = GetNameAndAssignmentFromId(id) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 if(href_list["PRG_logout"]) authenticated = COMM_AUTHENTICATION_NONE crew_announcement.announcer = "" setMenuState(usr, COMM_SCREEN_MAIN) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 if(is_authenticated(usr)) @@ -239,11 +239,11 @@ if(is_authenticated(usr) == COMM_AUTHENTICATION_MAX) if(message_cooldown) to_chat(usr, "Please allow at least one minute to pass between announcements.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 var/input = input(usr, "Please write a message to announce to the station crew.", "Priority Announcement") if(!input || message_cooldown || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 crew_announcement.Announce(input) message_cooldown = 1 @@ -253,7 +253,7 @@ if("callshuttle") var/input = input(usr, "Please enter the reason for calling the shuttle.", "Shuttle Call Reason.","") as text|null if(!input || ..() || !is_authenticated(usr)) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 call_shuttle_proc(usr, input) @@ -264,7 +264,7 @@ if("cancelshuttle") if(isAI(usr) || isrobot(usr)) to_chat(usr, "Firewalls prevent you from recalling the shuttle.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 var/response = alert("Are you sure you wish to recall the shuttle?", "Confirm", "Yes", "No") if(response == "Yes") @@ -323,11 +323,11 @@ if(is_authenticated(usr) == COMM_AUTHENTICATION_MAX) if(centcomm_message_cooldown) to_chat(usr, "Arrays recycling. Please stand by.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 var/input = stripped_input(usr, "Please enter the reason for requesting the nuclear self-destruct codes. Misuse of the nuclear request system will not be tolerated under any circumstances. Transmission does not guarantee a response.", "Self Destruct Code Request.","") as text|null if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 Nuke_request(input, usr) to_chat(usr, "Request sent.") @@ -342,11 +342,11 @@ if(is_authenticated(usr) == COMM_AUTHENTICATION_MAX) if(centcomm_message_cooldown) to_chat(usr, "Arrays recycling. Please stand by.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") as text|null if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 Centcomm_announce(input, usr) to_chat(usr, "Message transmitted.") @@ -361,11 +361,11 @@ if((is_authenticated(usr) == COMM_AUTHENTICATION_MAX) && (computer && computer.emagged)) if(centcomm_message_cooldown) to_chat(usr, "Arrays recycling. Please stand by.") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") as text|null if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 Syndicate_announce(input, usr) to_chat(usr, "Message transmitted.") @@ -398,5 +398,5 @@ trade_dockrequest_timelimit = 0 event_announcement.Announce("Docking request for trading ship denied.", "Docking request") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 \ No newline at end of file diff --git a/code/modules/modular_computers/file_system/programs/engineering/alarm.dm b/code/modules/modular_computers/file_system/programs/engineering/alarm.dm index 254559c2580..5fcaf9b03fd 100644 --- a/code/modules/modular_computers/file_system/programs/engineering/alarm.dm +++ b/code/modules/modular_computers/file_system/programs/engineering/alarm.dm @@ -34,7 +34,7 @@ return 0 /datum/computer_file/program/alarm_monitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) var/datum/asset/assets = get_asset_datum(/datum/asset/simple/headers) assets.send(user) diff --git a/code/modules/modular_computers/file_system/programs/engineering/power_monitor.dm b/code/modules/modular_computers/file_system/programs/engineering/power_monitor.dm index dca2fabd499..2efe872a7f5 100644 --- a/code/modules/modular_computers/file_system/programs/engineering/power_monitor.dm +++ b/code/modules/modular_computers/file_system/programs/engineering/power_monitor.dm @@ -24,7 +24,7 @@ attached = locate() in T /datum/computer_file/program/power_monitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) var/datum/asset/assets = get_asset_datum(/datum/asset/simple/headers) assets.send(user) diff --git a/code/modules/modular_computers/file_system/programs/generic/configurator.dm b/code/modules/modular_computers/file_system/programs/generic/configurator.dm index 0630d1a129a..cbb7559c8ef 100644 --- a/code/modules/modular_computers/file_system/programs/generic/configurator.dm +++ b/code/modules/modular_computers/file_system/programs/generic/configurator.dm @@ -15,7 +15,7 @@ /datum/computer_file/program/computerconfig/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) var/datum/asset/assets = get_asset_datum(/datum/asset/simple/headers) assets.send(user) diff --git a/code/modules/modular_computers/file_system/programs/generic/file_browser.dm b/code/modules/modular_computers/file_system/programs/generic/file_browser.dm index 4d12bcb0ff8..bf0ce12d1cf 100644 --- a/code/modules/modular_computers/file_system/programs/generic/file_browser.dm +++ b/code/modules/modular_computers/file_system/programs/generic/file_browser.dm @@ -17,7 +17,7 @@ return t /datum/computer_file/program/filemanager/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) var/datum/asset/assets = get_asset_datum(/datum/asset/simple/headers) assets.send(user) diff --git a/code/modules/modular_computers/file_system/programs/generic/ntdownloader.dm b/code/modules/modular_computers/file_system/programs/generic/ntdownloader.dm index 1ce9fb38bd1..38f62ceab6e 100644 --- a/code/modules/modular_computers/file_system/programs/generic/ntdownloader.dm +++ b/code/modules/modular_computers/file_system/programs/generic/ntdownloader.dm @@ -104,7 +104,7 @@ return 0 /datum/computer_file/program/ntnetdownload/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) var/datum/asset/assets = get_asset_datum(/datum/asset/simple/headers) assets.send(user) diff --git a/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm b/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm index 7460d357b21..e26b9a74779 100644 --- a/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm +++ b/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm @@ -41,7 +41,7 @@ ..() /datum/computer_file/program/chatclient/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) var/datum/asset/assets = get_asset_datum(/datum/asset/simple/headers) assets.send(user) diff --git a/code/modules/modular_computers/file_system/programs/generic/nttransfer.dm b/code/modules/modular_computers/file_system/programs/generic/nttransfer.dm index 1ddabcd1151..68f77c46293 100644 --- a/code/modules/modular_computers/file_system/programs/generic/nttransfer.dm +++ b/code/modules/modular_computers/file_system/programs/generic/nttransfer.dm @@ -86,7 +86,7 @@ var/global/nttransfer_uid = 0 /datum/computer_file/program/nttransfer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) var/datum/asset/assets = get_asset_datum(/datum/asset/simple/headers) assets.send(user) diff --git a/code/modules/modular_computers/file_system/programs/research/airestorer.dm b/code/modules/modular_computers/file_system/programs/research/airestorer.dm index 55bbcb3b2b2..0a1ba7acaf3 100644 --- a/code/modules/modular_computers/file_system/programs/research/airestorer.dm +++ b/code/modules/modular_computers/file_system/programs/research/airestorer.dm @@ -123,7 +123,7 @@ return data /datum/computer_file/program/aidiag/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) var/datum/asset/assets = get_asset_datum(/datum/asset/simple/headers) assets.send(user) diff --git a/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm b/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm index e3809cdcc37..bf1d71a95ec 100644 --- a/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm +++ b/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm @@ -9,7 +9,7 @@ available_on_ntnet = 1 /datum/computer_file/program/ntnetmonitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) var/datum/asset/assets = get_asset_datum(/datum/asset/simple/headers) assets.send(user) diff --git a/code/modules/modular_computers/hardware/hard_drive.dm b/code/modules/modular_computers/hardware/hard_drive.dm index caf0406336b..9339f3d3c5d 100644 --- a/code/modules/modular_computers/hardware/hard_drive.dm +++ b/code/modules/modular_computers/hardware/hard_drive.dm @@ -65,7 +65,6 @@ if(F in stored_files) stored_files -= F - qdel(F) recalculate_size() return 1 else @@ -119,7 +118,6 @@ return null /obj/item/weapon/computer_hardware/hard_drive/Destroy() - QDEL_LIST(stored_files) stored_files = null return ..() diff --git a/code/modules/modular_computers/laptop_vendor.dm b/code/modules/modular_computers/laptop_vendor.dm index 81281fe3dcc..f52991c39af 100644 --- a/code/modules/modular_computers/laptop_vendor.dm +++ b/code/modules/modular_computers/laptop_vendor.dm @@ -215,7 +215,7 @@ ui_interact(user) /obj/machinery/lapvend/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "computer_fabricator.tmpl", "Personal Computer Vendor", 500, 700) ui.set_auto_update(1) @@ -296,7 +296,7 @@ obj/machinery/lapvend/attackby(obj/item/I, mob/user) T.amount = "[total_price]" T.source_terminal = name T.date = current_date_string - T.time = worldtime2text() + T.time = station_time_timestamp() vendor_account.transaction_log.Add(T) return 1 return 0 diff --git a/code/modules/nano/modules/alarm_monitor.dm b/code/modules/nano/modules/alarm_monitor.dm index 015d0990ee7..e4dd848dac6 100644 --- a/code/modules/nano/modules/alarm_monitor.dm +++ b/code/modules/nano/modules/alarm_monitor.dm @@ -56,7 +56,7 @@ return 1 /datum/nano_module/alarm_monitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "alarm_monitor.tmpl", "Alarm Monitoring Console", 800, 800, state = state) ui.open() diff --git a/code/modules/nano/modules/atmos_control.dm b/code/modules/nano/modules/atmos_control.dm index 9dbb508f16e..58c4acc6704 100644 --- a/code/modules/nano/modules/atmos_control.dm +++ b/code/modules/nano/modules/atmos_control.dm @@ -29,7 +29,7 @@ alarm.ui_interact(usr, master_ui = ui_ref, state = TS) /datum/nano_module/atmos_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "atmos_control.tmpl", src.name, 900, 800, state = state) ui.add_template("mapContent", "atmos_control_map_content.tmpl") diff --git a/code/modules/nano/modules/crew_monitor.dm b/code/modules/nano/modules/crew_monitor.dm index 05749741461..ed102005ed5 100644 --- a/code/modules/nano/modules/crew_monitor.dm +++ b/code/modules/nano/modules/crew_monitor.dm @@ -17,7 +17,7 @@ return 1 /datum/nano_module/crew_monitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "crew_monitor.tmpl", "Crew Monitoring Computer", 900, 800) diff --git a/code/modules/nano/modules/ert_manager.dm b/code/modules/nano/modules/ert_manager.dm index 8c17cda55e2..d954c36ee2d 100644 --- a/code/modules/nano/modules/ert_manager.dm +++ b/code/modules/nano/modules/ert_manager.dm @@ -12,7 +12,7 @@ /datum/nano_module/ert_manager/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(ui && autoclose) ui.close() return 0 diff --git a/code/modules/nano/modules/human_appearance.dm b/code/modules/nano/modules/human_appearance.dm index 41eadfc87aa..ad7a8f5cff6 100644 --- a/code/modules/nano/modules/human_appearance.dm +++ b/code/modules/nano/modules/human_appearance.dm @@ -173,7 +173,7 @@ return 0 /datum/nano_module/appearance_changer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "appearance_changer.tmpl", "[src]", 800, 450, state = state) ui.open() diff --git a/code/modules/nano/modules/law_manager.dm b/code/modules/nano/modules/law_manager.dm index 92378e3abcc..04a98aa25a9 100644 --- a/code/modules/nano/modules/law_manager.dm +++ b/code/modules/nano/modules/law_manager.dm @@ -148,7 +148,7 @@ return 0 /datum/nano_module/law_manager/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "law_manager.tmpl", sanitize("[src] - [owner.name]"), 800, is_malf(user) ? 600 : 400, state = state) ui.open() diff --git a/code/modules/nano/modules/power_monitor.dm b/code/modules/nano/modules/power_monitor.dm index ef052d6a5f6..00dcf9819ec 100644 --- a/code/modules/nano/modules/power_monitor.dm +++ b/code/modules/nano/modules/power_monitor.dm @@ -12,7 +12,7 @@ powermonitor = nano_host() /datum/nano_module/power_monitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "power_monitor.tmpl", "Power Monitoring Console", 800, 700, state = state) ui.open() diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index 5e478e9367b..87649f97512 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -420,7 +420,7 @@ nanoui is used to open and update nano browser uis winset(user, "mapwindow.map", "focus=true") // return keyboard focus to map on_close_winset() //onclose(user, window_id) - nanomanager.ui_opened(src) + SSnanoui.ui_opened(src) /** * Reinitialize the UI with @@ -439,7 +439,7 @@ nanoui is used to open and update nano browser uis */ /datum/nanoui/proc/close() is_auto_updating = 0 - nanomanager.ui_closed(src) + SSnanoui.ui_closed(src) user << browse(null, "window=[window_id]") for(var/datum/nanoui/child in children) child.close() @@ -496,7 +496,7 @@ nanoui is used to open and update nano browser uis map_update = 1 if((src_object && src_object.Topic(href, href_list, 0, state)) || map_update) - nanomanager.update_uis(src_object) // update all UIs attached to src_object + SSnanoui.update_uis(src_object) // update all UIs attached to src_object /** * Process this UI, updating the entire UI or just the status (aka visibility) diff --git a/code/modules/nano/nanomanager.dm b/code/modules/nano/subsystem.dm similarity index 84% rename from code/modules/nano/nanomanager.dm rename to code/modules/nano/subsystem.dm index 774aa875b89..6ad4201b93d 100644 --- a/code/modules/nano/nanomanager.dm +++ b/code/modules/nano/subsystem.dm @@ -1,11 +1,3 @@ -// This is the window/UI manager for Nano UI -// There should only ever be one (global) instance of nanomanger -/datum/nanomanager - // a list of current open /nanoui UIs, grouped by src_object and ui_key - var/open_uis[0] - // a list of current open /nanoui UIs, not grouped, for use in processing - var/list/processing_uis = list() - /** * Get an open /nanoui ui for the current user, src_object and ui_key and try to update it with data * @@ -18,7 +10,7 @@ * * @return /nanoui Returns the found ui, for null if none exists */ -/datum/nanomanager/proc/try_update_ui(var/mob/user, var/datum/src_object, ui_key, var/datum/nanoui/ui, var/force_open = 0) +/datum/controller/subsystem/nanoui/proc/try_update_ui(var/mob/user, var/datum/src_object, ui_key, var/datum/nanoui/ui, var/force_open = 0) if(isnull(ui)) // no ui has been passed, so we'll search for one ui = get_open_ui(user, src_object, ui_key) @@ -40,7 +32,7 @@ * * @return /nanoui Returns the found ui, or null if none exists */ -/datum/nanomanager/proc/get_open_ui(var/mob/user, src_object, ui_key) +/datum/controller/subsystem/nanoui/proc/get_open_ui(var/mob/user, src_object, ui_key) var/src_object_key = "\ref[src_object]" if(isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list)) //testing("nanomanager/get_open_ui mob [user.name] [src_object:name] [ui_key] - there are no uis open") @@ -63,7 +55,7 @@ * * @return int The number of uis updated */ -/datum/nanomanager/proc/update_uis(src_object) +/datum/controller/subsystem/nanoui/proc/update_uis(src_object) var/src_object_key = "\ref[src_object]" if(isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list)) return 0 @@ -83,7 +75,7 @@ * * @return int The number of uis close */ -/datum/nanomanager/proc/close_uis(src_object) +/datum/controller/subsystem/nanoui/proc/close_uis(src_object) var/src_object_key = "\ref[src_object]" if(isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list)) return 0 @@ -96,6 +88,23 @@ close_count++ return close_count + /** + * private + * + * Close *ALL* UIs + * + * return int The number of UIs closed. + **/ +/datum/controller/subsystem/nanoui/proc/close_all_uis() + var/close_count = 0 + for(var/src_object_key in open_uis) + for(var/ui_key in open_uis[src_object_key]) + for(var/datum/nanoui/ui in open_uis[src_object_key][ui_key]) + if(ui && ui.src_object && ui.user && ui.src_object.nano_host()) // Check the UI is valid. + ui.close() // Close the UI. + close_count++ // Count each UI we close. + return close_count + /** * Update /nanoui uis belonging to user * @@ -105,7 +114,7 @@ * * @return int The number of uis updated */ -/datum/nanomanager/proc/update_user_uis(var/mob/user, src_object = null, ui_key = null) +/datum/controller/subsystem/nanoui/proc/update_user_uis(var/mob/user, src_object = null, ui_key = null) if(isnull(user.open_uis) || !istype(user.open_uis, /list) || open_uis.len == 0) return 0 // has no open uis @@ -126,7 +135,7 @@ * * @return int The number of uis closed */ -/datum/nanomanager/proc/close_user_uis(var/mob/user, src_object = null, ui_key = null) +/datum/controller/subsystem/nanoui/proc/close_user_uis(var/mob/user, src_object = null, ui_key = null) if(isnull(user.open_uis) || !istype(user.open_uis, /list) || open_uis.len == 0) //testing("nanomanager/close_user_uis mob [user.name] has no open uis") return 0 // has no open uis @@ -149,7 +158,7 @@ * * @return nothing */ -/datum/nanomanager/proc/ui_opened(var/datum/nanoui/ui) +/datum/controller/subsystem/nanoui/proc/ui_opened(var/datum/nanoui/ui) var/src_object_key = "\ref[ui.src_object]" if(isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list)) open_uis[src_object_key] = list(ui.ui_key = list()) @@ -170,7 +179,7 @@ * * @return int 0 if no ui was removed, 1 if removed successfully */ -/datum/nanomanager/proc/ui_closed(var/datum/nanoui/ui) +/datum/controller/subsystem/nanoui/proc/ui_closed(var/datum/nanoui/ui) var/src_object_key = "\ref[ui.src_object]" if(isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list)) return 0 // wasn't open @@ -197,7 +206,7 @@ */ // -/datum/nanomanager/proc/user_logout(var/mob/user) +/datum/controller/subsystem/nanoui/proc/user_logout(var/mob/user) //testing("nanomanager/user_logout user [user.name]") return close_user_uis(user) @@ -210,7 +219,7 @@ * * @return nothing */ -/datum/nanomanager/proc/user_transferred(var/mob/oldMob, var/mob/newMob) +/datum/controller/subsystem/nanoui/proc/user_transferred(var/mob/oldMob, var/mob/newMob) //testing("nanomanager/user_transferred from mob [oldMob.name] to mob [newMob.name]") if(!oldMob || isnull(oldMob.open_uis) || !istype(oldMob.open_uis, /list) || open_uis.len == 0) //testing("nanomanager/user_transferred mob [oldMob.name] has no open uis") diff --git a/code/modules/ninja/suit/SpiderOS.dm b/code/modules/ninja/suit/SpiderOS.dm index 8a2fadc7634..2764e3d0270 100644 --- a/code/modules/ninja/suit/SpiderOS.dm +++ b/code/modules/ninja/suit/SpiderOS.dm @@ -30,7 +30,7 @@ dat += "

SpiderOS v.1.337

" dat += "Welcome, [U.real_name].
" dat += "
" - dat += " Current Time: [worldtime2text()]
" + dat += " Current Time: [station_time_timestamp()]
" dat += " Battery Life: [round(cell.charge/100)]%
" dat += " Smoke Bombs: \Roman [s_bombs]
" dat += "

" diff --git a/code/modules/paperwork/fax.dm b/code/modules/paperwork/fax.dm index 71b1bee18a2..ade10febd2c 100644 --- a/code/modules/paperwork/fax.dm +++ b/code/modules/paperwork/fax.dm @@ -42,7 +42,7 @@ var/list/adminfaxes = list() html += "" html += "" html += "" - html += "" + html += "" if(A.sent_by) var/mob/living/S = A.sent_by html += "" @@ -71,7 +71,7 @@ var/list/adminfaxes = list() html += "" html += "" html += "" - html += "" + html += "" if(F.sent_by) var/mob/living/S = F.sent_by html += "" diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index 14925d9752f..128f8793a67 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -30,9 +30,12 @@ var/list/alldepartments = list() /obj/machinery/photocopier/faxmachine/New() ..() allfaxes += src + update_network() - if( !(("[department]" in alldepartments) || ("[department]" in admin_departments)) ) - alldepartments |= department +/obj/machinery/photocopier/faxmachine/proc/update_network() + if(department != "Unknown") + if(!(("[department]" in alldepartments) || ("[department]" in admin_departments) || ("[department]" in hidden_admin_departments))) + alldepartments |= department /obj/machinery/photocopier/faxmachine/longrange name = "long range fax machine" @@ -43,14 +46,14 @@ var/list/alldepartments = list() ui_interact(user) /obj/machinery/photocopier/faxmachine/attack_ghost(mob/user) - ui_interact(user) - + ui_interact(user) + /obj/machinery/photocopier/faxmachine/attackby(obj/item/weapon/item, mob/user, params) if(istype(item,/obj/item/weapon/card/id) && !scan) scan(item) else if(istype(item, /obj/item/weapon/paper) || istype(item, /obj/item/weapon/photo) || istype(item, /obj/item/weapon/paper_bundle)) ..() - nanomanager.update_uis(src) + SSnanoui.update_uis(src) else return ..() @@ -62,7 +65,7 @@ var/list/alldepartments = list() to_chat(user, "You swipe the card through [src], but nothing happens.") /obj/machinery/photocopier/faxmachine/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "faxmachine.tmpl", "Fax Machine UI", 540, 450) ui.open() @@ -103,11 +106,11 @@ var/list/alldepartments = list() else if(user.can_admin_interact()) return TRUE return FALSE - + /obj/machinery/photocopier/faxmachine/Topic(href, href_list) if(..()) return 1 - + var/is_authenticated = is_authenticated(usr) if(href_list["send"]) if(copyitem && is_authenticated) @@ -119,7 +122,7 @@ var/list/alldepartments = list() if(sendcooldown) spawn(sendcooldown) // cooldown time sendcooldown = 0 - nanomanager.update_uis(src) + SSnanoui.update_uis(src) if(href_list["paper"]) if(copyitem) @@ -174,7 +177,7 @@ var/list/alldepartments = list() else if(istype(copyitem, /obj/item/weapon/paper_bundle)) copyitem.name = "[(n_name ? text("[n_name]") : "paper")]" - nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/photocopier/faxmachine/proc/scan(var/obj/item/weapon/card/id/card = null) if(scan) // Card is in machine @@ -197,14 +200,14 @@ var/list/alldepartments = list() usr.drop_item() card.forceMove(src) scan = card - nanomanager.update_uis(src) - + SSnanoui.update_uis(src) + /obj/machinery/photocopier/faxmachine/verb/eject_id() set category = null set name = "Eject ID Card" set src in oview(1) - if(usr.restrained()) + if(usr.restrained()) return if(scan) @@ -224,7 +227,7 @@ var/list/alldepartments = list() var/success = 0 for(var/obj/machinery/photocopier/faxmachine/F in allfaxes) - if( F.department == destination ) + if(F.department == destination) success = F.receivefax(copyitem) if(success) @@ -270,7 +273,7 @@ var/list/alldepartments = list() /obj/machinery/photocopier/faxmachine/proc/send_admin_fax(var/mob/sender, var/destination) if(stat & (BROKEN|NOPOWER)) return - + if(sendcooldown) return @@ -304,6 +307,9 @@ var/list/alldepartments = list() message_admins(sender, "CENTCOM FAX", destination, rcvdcopy, "#006100") if("Syndicate") message_admins(sender, "SYNDICATE FAX", destination, rcvdcopy, "#DC143C") + for(var/obj/machinery/photocopier/faxmachine/F in allfaxes) + if(F.department == destination) + F.receivefax(copyitem) sendcooldown = cooldown_time spawn(50) visible_message("[src] beeps, \"Message transmitted successfully.\"") diff --git a/code/modules/pda/PDA.dm b/code/modules/pda/PDA.dm index e002049e55f..d93a7a01472 100755 --- a/code/modules/pda/PDA.dm +++ b/code/modules/pda/PDA.dm @@ -102,7 +102,7 @@ var/global/list/obj/item/device/pda/PDAs = list() /obj/item/device/pda/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state) ui_tick++ - var/datum/nanoui/old_ui = nanomanager.get_open_ui(user, src, "main") + var/datum/nanoui/old_ui = SSnanoui.get_open_ui(user, src, "main") var/auto_update = 1 if(!current_app) return @@ -117,7 +117,7 @@ var/global/list/obj/item/device/pda/PDAs = list() var/title = "Personal Data Assistant" // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm @@ -169,7 +169,7 @@ var/global/list/obj/item/device/pda/PDAs = list() data["useRetro"] = retro_mode data["cartridge_name"] = cartridge ? cartridge.name : "" - data["stationTime"] = worldtime2text() + data["stationTime"] = station_time_timestamp() data["app"] = list() current_app.update_ui(user, data) @@ -217,7 +217,7 @@ var/global/list/obj/item/device/pda/PDAs = list() return var/mob/user = usr - var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main") + var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main") var/mob/living/U = usr if(usr.stat == DEAD) return 0 @@ -282,7 +282,7 @@ var/global/list/obj/item/device/pda/PDAs = list() return // return 1 tells it to refresh the UI in NanoUI /obj/item/device/pda/proc/close(mob/user) - var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main") + var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main") ui.close() /obj/item/device/pda/verb/verb_reset_pda() diff --git a/code/modules/pda/app.dm b/code/modules/pda/app.dm index 4ad6c40ae24..bce40cc34b7 100644 --- a/code/modules/pda/app.dm +++ b/code/modules/pda/app.dm @@ -35,7 +35,7 @@ if(L) to_chat(L, "[bicon(pda)] [message]") - nanomanager.update_user_uis(L, pda) // Update the receiving user's PDA UI so that they can see the new message + SSnanoui.update_user_uis(L, pda) // Update the receiving user's PDA UI so that they can see the new message if(!notify_silent) pda.play_ringtone() diff --git a/code/modules/pda/messenger.dm b/code/modules/pda/messenger.dm index d32863c1cb9..b048b1c054c 100644 --- a/code/modules/pda/messenger.dm +++ b/code/modules/pda/messenger.dm @@ -178,7 +178,7 @@ if(!PM.conversations.Find("\ref[pda]")) PM.conversations.Add("\ref[pda]") - nanomanager.update_user_uis(U, P) // Update the sending user's PDA UI so that they can see the new message + SSnanoui.update_user_uis(U, P) // Update the sending user's PDA UI so that they can see the new message PM.notify("Message from [pda.owner] ([pda.ownjob]), \"[t]\" (Reply)") log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]") else diff --git a/code/modules/pda/radio.dm b/code/modules/pda/radio.dm index 108dd4178fa..2a5e84bcac1 100644 --- a/code/modules/pda/radio.dm +++ b/code/modules/pda/radio.dm @@ -168,6 +168,7 @@ /obj/item/radio/integrated/signal/Destroy() if(radio_controller) radio_controller.remove_object(src, frequency) + radio_connection = null return ..() /obj/item/radio/integrated/signal/initialize() diff --git a/code/modules/pda/utilities.dm b/code/modules/pda/utilities.dm index 558af083eb8..f53de429c55 100644 --- a/code/modules/pda/utilities.dm +++ b/code/modules/pda/utilities.dm @@ -49,7 +49,7 @@ user.show_message("\t Key: Suffocation/Toxin/Burns/Brute", 1) user.show_message("\t Body Temperature: [C.bodytemperature-T0C]°C ([C.bodytemperature*1.8-459.67]°F)", 1) if(C.timeofdeath && (C.stat == DEAD || (C.status_flags & FAKEDEATH))) - user.show_message("\t Time of Death: [worldtime2text(C.timeofdeath)]") + user.show_message("\t Time of Death: [station_time_timestamp("hh:mm:ss", C.timeofdeath)]") if(istype(C, /mob/living/carbon/human)) var/mob/living/carbon/human/H = C var/list/damaged = H.get_damaged_organs(1,1) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 4842fcd2631..47c91cc82c2 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -104,6 +104,10 @@ var/shock_proof = 0 //if set to 1, this APC will not arc bolts of electricity if it's overloaded. + // Nightshift + var/nightshift_lights = FALSE + var/last_nightshift_switch = 0 + /obj/machinery/power/apc/worn_out name = "\improper Worn out APC" keep_preset_name = 1 @@ -752,7 +756,7 @@ return // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) // the ui does not exist, so we'll create a new one ui = new(user, src, ui_key, "apc.tmpl", "[area.name] - APC", 510, issilicon(user) ? 535 : 460) @@ -773,6 +777,7 @@ data["siliconUser"] = istype(user, /mob/living/silicon) data["siliconLock"] = locked data["malfStatus"] = get_malf_status(user) + data["nightshiftLights"] = nightshift_lights var/powerChannels[0] powerChannels[++powerChannels.len] = list( @@ -904,6 +909,16 @@ toggle_breaker() + else if(href_list["toggle_nightshift"]) + if(!is_authenticated(usr)) + return + + if(last_nightshift_switch > world.time + 100) // don't spam... + to_chat(usr, "[src]'s night lighting circuit breaker is still cycling!") + return + last_nightshift_switch = world.time + set_nightshift(!nightshift_lights) + else if(href_list["cmode"]) if(!is_authenticated(usr)) return @@ -940,7 +955,7 @@ update_icon() update() else if( href_list["close"] ) - nanomanager.close_user_uis(usr, src) + SSnanoui.close_user_uis(usr, src) return 0 else if(href_list["close2"]) @@ -1353,4 +1368,13 @@ else return 0 +/obj/machinery/power/apc/proc/set_nightshift(on) + set waitfor = FALSE + nightshift_lights = on + for(var/obj/machinery/light/L in area) + if(L.nightshift_allowed) + L.nightshift_enabled = nightshift_lights + L.update(FALSE) + CHECK_TICK + #undef APC_UPDATE_ICON_COOLDOWN diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 0914cdc8d32..7880cfeef2c 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -184,6 +184,10 @@ By design, d1 is the smallest direction and d2 is the highest shock(user, 5, 0.2) + else if(istype(W, /obj/item/toy/crayon)) + var/obj/item/toy/crayon/C = W + cable_color(C.colourName) + else if(W.flags & CONDUCT) shock(user, 50, 0.7) @@ -218,11 +222,18 @@ By design, d1 is the smallest direction and d2 is the highest qdel(src) // qdel return -obj/structure/cable/proc/cableColor(var/colorC) - var/color_n = "#DD0000" +obj/structure/cable/proc/cable_color(var/colorC) if(colorC) - color_n = colorC - color = color_n + if(colorC == "rainbow") + color = color_rainbow() + else + color = colorC + else + color = "#DD0000" + +/obj/structure/cable/proc/color_rainbow() + color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN) + return color ///////////////////////////////////////////////// // Cable laying helpers @@ -588,30 +599,20 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( ..() if(istype(W, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/C = W + // Cable merging is handled by parent proc if(C.amount >= MAXCOIL) - to_chat(user, "The coil is too long, you cannot add any more cable to it.") + to_chat(user, "The coil is as long as it will get.") return - if( (C.amount + src.amount <= MAXCOIL) ) to_chat(user, "You join the cable coils together.") - C.give(src.amount) // give it cable - src.use(src.amount) // make sure this one cleans up right return - else - var/amt = MAXCOIL - C.amount - to_chat(user, "You transfer [amt] length\s of cable from one coil to the other.") - C.give(amt) - src.use(amt) + to_chat(user, "You transfer [get_amount_transferred()] length\s of cable from one coil to the other.") return -//add cables to the stack -/obj/item/stack/cable_coil/proc/give(var/extra) - if(amount + extra > MAXCOIL) - amount = MAXCOIL - else - amount += extra - update_icon() + if(istype(W, /obj/item/toy/crayon)) + var/obj/item/toy/crayon/C = W + cable_color(C.colourName) /////////////////////////////////////////////// // Cable laying procedures @@ -619,7 +620,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( /obj/item/stack/cable_coil/proc/get_new_cable(location) var/obj/structure/cable/C = new(location) - C.cableColor(color) + C.cable_color(color) return C @@ -736,7 +737,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( return - C.cableColor(color) + C.cable_color(color) C.d1 = nd1 C.d2 = nd2 @@ -806,6 +807,18 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN) ..() +/obj/item/stack/cable_coil/proc/cable_color(var/colorC) + if(colorC) + if(colorC == "rainbow") + colorC = color_rainbow() + color = colorC + else + color = COLOR_RED + +/obj/item/stack/cable_coil/proc/color_rainbow() + color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN) + return color + /obj/item/stack/cable_coil/cyborg name = "cyborg cable coil" diff --git a/code/modules/power/cable_heavyduty.dm b/code/modules/power/cable_heavyduty.dm index e0992d1b79e..806f0794bf7 100644 --- a/code/modules/power/cable_heavyduty.dm +++ b/code/modules/power/cable_heavyduty.dm @@ -24,5 +24,5 @@ else ..() -/obj/structure/cable/heavyduty/cableColor(var/colorC) +/obj/structure/cable/heavyduty/cable_color(var/colorC) return \ No newline at end of file diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 7a6c648610f..9aab058f233 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -142,7 +142,7 @@ var/static_power_used = 0 var/brightness_range = 8 // luminosity when on, also used in power calculation var/brightness_power = 1 - var/brightness_color = null + var/brightness_color = "#FFFFFF" var/status = LIGHT_OK // LIGHT_OK, _EMPTY, _BURNED or _BROKEN var/flickering = 0 var/light_type = /obj/item/weapon/light/tube // the type of light item @@ -153,6 +153,13 @@ var/rigged = 0 // true if rigged to explode var/lightmaterials = list(MAT_GLASS=100) //stores the materials the light is made of to stop infinite glass exploit + var/nightshift_enabled = FALSE //Currently in night shift mode? + var/nightshift_allowed = TRUE //Set to FALSE to never let this light get switched to night mode. + var/nightshift_light_range = 8 + var/nightshift_light_power = 0.45 + var/nightshift_light_color = "#FFDDCC" + + // the smaller bulb light fixture /obj/machinery/light/small @@ -161,6 +168,7 @@ fitting = "bulb" brightness_range = 4 brightness_color = "#a0a080" + nightshift_light_range = 4 desc = "A small lighting fixture." light_type = /obj/item/weapon/light/bulb @@ -226,18 +234,24 @@ return // update the icon_state and luminosity of the light depending on its state -/obj/machinery/light/proc/update(var/trigger = 1) - +/obj/machinery/light/proc/update(var/trigger = TRUE) + switch(status) + if(LIGHT_BROKEN, LIGHT_BURNED, LIGHT_EMPTY) + on = FALSE update_icon() if(on) - if(light_range != brightness_range || light_power != brightness_power || light_color != brightness_color) + var/BR = nightshift_enabled ? nightshift_light_range : brightness_range + var/PO = nightshift_enabled ? nightshift_light_power : brightness_power + var/CO = nightshift_enabled ? nightshift_light_color : brightness_color + var/matching = light_range == BR && light_power == PO && light_color == CO + if(!matching) switchcount++ if(rigged) if(status == LIGHT_OK && trigger) log_admin("LOG: Rigged light explosion, last touched by [fingerprintslast]") message_admins("LOG: Rigged light explosion, last touched by [fingerprintslast]") explode() - else if( prob( min(60, switchcount*switchcount*0.01) ) ) + else if(prob(min(60, switchcount * switchcount * 0.01))) if(status == LIGHT_OK && trigger) status = LIGHT_BURNED icon_state = "[base_state]-burned" @@ -245,7 +259,7 @@ set_light(0) else use_power = 2 - set_light(brightness_range, brightness_power, brightness_color) + set_light(BR, PO, CO) else use_power = 1 set_light(0) diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 2fe6411a445..427abd78962 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -239,7 +239,7 @@ var/temp_loss = (temperature - cooling_temperature)/TEMPERATURE_DIVISOR temp_loss = between(2, round(temp_loss, 1), TEMPERATURE_CHANGE_MAX) temperature = max(temperature - temp_loss, cooling_temperature) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) if(overheating) overheating-- @@ -280,7 +280,7 @@ to_chat(user, "You add [amount] sheet\s to the [src.name].") sheets += amount addstack.use(amount) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return else if(!active) if(istype(O, /obj/item/weapon/wrench)) @@ -325,7 +325,7 @@ if(IsBroken()) return - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "pacman.tmpl", src.name, 500, 560) ui.open() @@ -381,7 +381,7 @@ if(power_output < max_power_output || (emagged && power_output < round(max_power_output*2.5))) power_output++ - nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/power/port_gen/pacman/super name = "S.U.P.E.R.P.A.C.M.A.N.-type Portable Generator" diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 34dad709bd1..be39cb210de 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -117,6 +117,9 @@ update_icon() /obj/machinery/power/emitter/Destroy() + if(radio_controller) + radio_controller.remove_object(src, frequency) + radio_connection = null msg_admin_attack("Emitter deleted at ([x],[y],[z] - JMP)",0,1) log_game("Emitter deleted at ([x],[y],[z])") investigate_log("deleted at ([x],[y],[z])","singulo") diff --git a/code/modules/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm index 8e09d9f6ed3..9a911400fd5 100644 --- a/code/modules/power/singularity/narsie.dm +++ b/code/modules/power/singularity/narsie.dm @@ -24,8 +24,8 @@ /obj/singularity/narsie/large/New() ..() - icon_state = ticker.mode.cultdat.entity_icon_state - name = ticker.mode.cultdat.entity_name + icon_state = ticker.cultdat.entity_icon_state + name = ticker.cultdat.entity_name to_chat(world, " [name] HAS RISEN") world << pick(sound('sound/hallucinations/im_here1.ogg'), sound('sound/hallucinations/im_here2.ogg')) @@ -126,12 +126,12 @@ /obj/singularity/narsie/proc/acquire(var/mob/food) if(food == target) return - to_chat(target, "[uppertext(ticker.mode.cultdat.entity_name)] HAS LOST INTEREST IN YOU") + to_chat(target, "[uppertext(ticker.cultdat.entity_name)] HAS LOST INTEREST IN YOU") target = food if(ishuman(target)) - to_chat(target, "[uppertext(ticker.mode.cultdat.entity_name)] HUNGERS FOR YOUR SOUL") + to_chat(target, "[uppertext(ticker.cultdat.entity_name)] HUNGERS FOR YOUR SOUL") else - to_chat(target, "[uppertext(ticker.mode.cultdat.entity_name)] HAS CHOSEN YOU TO LEAD HER TO HER NEXT MEAL") + to_chat(target, "[uppertext(ticker.cultdat.entity_name)] HAS CHOSEN YOU TO LEAD HER TO HER NEXT MEAL") //Wizard narsie /obj/singularity/narsie/wizard diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 6c8b02d5e23..06de2b658b5 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -365,7 +365,7 @@ // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index fa9b61c8059..91632ec5cc2 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -111,7 +111,7 @@ return //find the smaller angle between the direction the panel is facing and the direction of the sun (the sign is not important here) - var/p_angle = min(abs(adir - sun.angle), 360 - abs(adir - sun.angle)) + var/p_angle = min(abs(adir - SSsun.angle), 360 - abs(adir - SSsun.angle)) if(p_angle > 90) // if facing more than 90deg from sun, zero output sunfrac = 0 @@ -146,7 +146,7 @@ /obj/machinery/power/solar/ex_act(severity, target) ..() - if(isnull(gcDestroyed)) + if(!QDELETED(src)) switch(severity) if(2) if(prob(50) && broken()) @@ -174,8 +174,8 @@ var/ax = x // start at the solar panel var/ay = y var/turf/T = null - var/dx = sun.dx - var/dy = sun.dy + var/dx = SSsun.dx + var/dy = SSsun.dy for(var/i = 1 to 20) // 20 steps is enough ax += dx // do step @@ -309,7 +309,7 @@ if(autostart) src.search_for_connected() if(connected_tracker && track == 2) - connected_tracker.set_angle(sun.angle) + connected_tracker.set_angle(SSsun.angle) set_panels(cdir) /obj/machinery/power/solar_control/Destroy() @@ -321,13 +321,12 @@ /obj/machinery/power/solar_control/disconnect_from_network() ..() - if(sun) - sun.solars.Remove(src) + SSsun.solars.Remove(src) /obj/machinery/power/solar_control/connect_to_network() var/to_return = ..() - if(powernet && sun) //if connected and not already in solar list... - sun.solars |= src //... add it + if(powernet) //if connected and not already in solar list... + SSsun.solars |= src //... add it return to_return //search for unconnected panels and trackers in the computer powernet and connect them @@ -355,7 +354,7 @@ cdir = targetdir //...the current direction is the targetted one (and rotates panels to it) if(2) // auto-tracking if(connected_tracker) - connected_tracker.set_angle(sun.angle) + connected_tracker.set_angle(SSsun.angle) set_panels(cdir) updateDialog() @@ -390,7 +389,7 @@ ui_interact(user) /obj/machinery/power/solar_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "solar_control.tmpl", name, 490, 420) ui.open() @@ -479,7 +478,7 @@ track = text2num(href_list["track"]) if(track == 2) if(connected_tracker) - connected_tracker.set_angle(sun.angle) + connected_tracker.set_angle(SSsun.angle) set_panels(cdir) else if(track == 1) //begin manual tracking src.targetdir = src.cdir @@ -489,7 +488,7 @@ if(href_list["search_connected"]) search_for_connected() if(connected_tracker && track == 2) - connected_tracker.set_angle(sun.angle) + connected_tracker.set_angle(SSsun.angle) set_panels(cdir) return @@ -517,7 +516,7 @@ /obj/machinery/power/solar_control/ex_act(severity, target) ..() - if(isnull(gcDestroyed)) + if(!QDELETED(src)) switch(severity) if(2) if(prob(50)) diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 344971d42a2..81faee840cf 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -260,7 +260,7 @@ // This is purely informational UI that may be accessed by AIs or robots /obj/machinery/power/supermatter_shard/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "supermatter_crystal.tmpl", "Supermatter Crystal", 500, 300) ui.open() diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index 3e4838f7e20..9f9eb0693f4 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -30,7 +30,6 @@ name = "miniature energy gun" desc = "A small, pistol-sized energy gun with a built-in flashlight. It has two settings: stun and kill." icon_state = "mini" - item_state = "gun" w_class = WEIGHT_CLASS_SMALL ammo_x_offset = 2 charge_sections = 3 diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index 93895b94603..2397247a1dd 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -36,7 +36,7 @@ energy = min(energy + addenergy, max_energy) if(energy != oldenergy) use_power(1500) // This thing uses up alot of power (this is still low as shit for creating reagents from thin air) - nanomanager.update_uis(src) // update all UIs attached to src + SSnanoui.update_uis(src) // update all UIs attached to src /obj/machinery/chem_dispenser/power_change() if(powered()) @@ -44,7 +44,7 @@ else spawn(rand(0, 15)) stat |= NOPOWER - nanomanager.update_uis(src) // update all UIs attached to src + SSnanoui.update_uis(src) // update all UIs attached to src /obj/machinery/chem_dispenser/process() @@ -113,7 +113,7 @@ return // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm @@ -224,7 +224,7 @@ return B.forceMove(src) to_chat(user, "You set [B] on the machine.") - nanomanager.update_uis(src) // update all UIs attached to src + SSnanoui.update_uis(src) // update all UIs attached to src if(!icon_beaker) icon_beaker = image('icons/obj/chemical.dmi', src, "disp_beaker") //randomize beaker overlay position. icon_beaker.pixel_x = rand(-10,5) diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm index e9025a2aa3d..9a6bf813b1e 100644 --- a/code/modules/reagents/chemistry/machinery/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -49,7 +49,7 @@ state_change = 1 if(state_change) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/chem_heater/proc/eject_beaker() if(beaker) @@ -58,7 +58,7 @@ beaker = null icon_state = "mixer0b" on = FALSE - nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/chem_heater/power_change() if(powered()) @@ -66,7 +66,7 @@ else spawn(rand(0, 15)) stat |= NOPOWER - nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/chem_heater/attackby(obj/item/I, mob/user) if(isrobot(user)) @@ -82,7 +82,7 @@ I.forceMove(src) to_chat(user, "You add the beaker to the machine!") icon_state = "mixer1b" - nanomanager.update_uis(src) + SSnanoui.update_uis(src) if(default_deconstruction_screwdriver(user, "mixer0b", "mixer0b", I)) return @@ -131,7 +131,7 @@ return // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui) if(!ui) ui = new(user, src, ui_key, "chem_heater.tmpl", "ChemHeater", 350, 270) ui.open() diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 86ec72e238b..cfd47fef4d5 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -56,7 +56,7 @@ beaker = B B.forceMove(src) to_chat(user, "You add the beaker to the machine!") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) icon_state = "mixer1" else if(istype(B, /obj/item/weapon/storage/pill_bottle)) @@ -71,7 +71,7 @@ loaded_pill_bottle = B B.forceMove(src) to_chat(user, "You add the pill bottle into the dispenser slot!") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return /obj/machinery/chem_master/Topic(href, href_list) @@ -99,7 +99,7 @@ playsound(loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, 1) var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(loc) P.info = "
Chemical Analysis

" - P.info += "Time of analysis: [worldtime2text(world.time)]

" + P.info += "Time of analysis: [station_time_timestamp()]

" P.info += "Chemical name: [href_list["name"]]
" if(href_list["name"] == "Blood") var/datum/reagents/R = beaker.reagents @@ -304,7 +304,7 @@ bottlesprite = href_list["bottle_sprite"] usr << browse(null, "window=chem_master_iconsel") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return /obj/machinery/chem_master/attack_ai(mob/user) @@ -323,7 +323,7 @@ var/datum/asset/chem_master/assets = get_asset_datum(/datum/asset/chem_master) assets.send(user) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "chem_master.tmpl", name, 575, 400) ui.open() diff --git a/code/modules/reagents/chemistry/reagents/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm index 0e53f7fdc39..970ff077762 100644 --- a/code/modules/reagents/chemistry/reagents/medicine.dm +++ b/code/modules/reagents/chemistry/reagents/medicine.dm @@ -853,16 +853,17 @@ description = "A strong anesthetic and sedative." reagent_state = LIQUID color = "#96DEDE" + metabolization_rate = 0.1 /datum/reagent/medicine/ether/on_mob_life(mob/living/M) M.AdjustJitter(-25) switch(current_cycle) - if(1 to 15) + if(1 to 30) if(prob(7)) M.emote("yawn") - if(16 to 35) + if(31 to 40) M.Drowsy(20) - if(36 to INFINITY) + if(41 to INFINITY) M.Paralyse(15) M.Drowsy(20) ..() @@ -1042,6 +1043,7 @@ description = "Highly advanced nanites equipped with calcium payloads designed to repair bones. Nanomachines son." color = "#9b3401" metabolization_rate = 0.5 + can_synth = FALSE /datum/reagent/medicine/nanocalcium/on_mob_life(mob/living/carbon/human/M) switch(current_cycle) diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index ef953d84113..d7bea130272 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -75,7 +75,7 @@ /obj/structure/reagent_dispensers/fueltank/bullet_act(obj/item/projectile/P) ..() - if(!qdeleted(src)) //wasn't deleted by the projectile's effects. + if(!QDELETED(src)) //wasn't deleted by the projectile's effects. if(!P.nodamage && ((P.damage_type == BURN) || (P.damage_type == BRUTE))) message_admins("[key_name_admin(P.firer)] triggered a fueltank explosion.") log_game("[key_name(P.firer)] triggered a fueltank explosion.") diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 0e06e67f3e8..29ae4171824 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -240,7 +240,7 @@ return /obj/machinery/disposal/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "disposal_bin.tmpl", "Waste Disposal Unit", 395, 250) ui.open() diff --git a/code/modules/research/designs/mechfabricator_designs.dm b/code/modules/research/designs/mechfabricator_designs.dm index 697b3e3abaf..56ecb8577e8 100644 --- a/code/modules/research/designs/mechfabricator_designs.dm +++ b/code/modules/research/designs/mechfabricator_designs.dm @@ -896,7 +896,7 @@ /datum/design/mech_disabler name = "Exosuit Weapon (CH-PD Disabler)" desc = "Allows for the construction of CH-PD Disabler." - id = "mech_laser" + id = "mech_disabler" build_type = MECHFAB req_tech = list("combat" = 3) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/disabler diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index ee499b8eac3..943e49281fe 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -182,7 +182,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, to_chat(user, "You add the disk to the machine!") else if(!(linked_destroy && linked_destroy.busy) && !(linked_lathe && linked_lathe.busy) && !(linked_imprinter && linked_imprinter.busy)) ..() - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return /obj/machinery/computer/rdconsole/emag_act(user as mob) @@ -234,7 +234,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, spawn(TECH_UPDATE_DELAY) clear_wait_message() files.AddTech2Known(t_disk.stored) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) griefProtection() //Update centcom too else if(href_list["clear_tech"]) //Erase data on the technology disk. @@ -259,7 +259,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, spawn(DESIGN_UPDATE_DELAY) clear_wait_message() files.AddDesign2Known(d_disk.blueprint) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) griefProtection() //Update centcom too else if(href_list["clear_design"]) //Erases data on the design disk. @@ -312,7 +312,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, log_admin("[key_name(usr)] has maximized the research levels.") message_admins("[key_name_admin(usr)] has maximized the research levels.") Maximize() - nanomanager.update_uis(src) + SSnanoui.update_uis(src) griefProtection() //Update centcomm too else if(href_list["deconstruct"]) //Deconstruct the item in the destructive analyzer and update the research holder. @@ -332,7 +332,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, return linked_destroy.busy = 1 add_wait_message("Processing and Updating Database...", DECONSTRUCT_DELAY) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) flick("d_analyzer_process", linked_destroy) spawn(DECONSTRUCT_DELAY) clear_wait_message() @@ -374,7 +374,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, qdel(I) linked_destroy.icon_state = "d_analyzer" use_power(250) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) else if(href_list["sync"]) //Sync the research holder with all the R&D consoles in the game that aren't sync protected. if(!sync) @@ -397,7 +397,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, server_processed = 1 if(!istype(S, /obj/machinery/r_n_d/server/centcom) && server_processed) S.produce_heat(100) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) else if(href_list["togglesync"]) //Prevents the console from being synced by other consoles. Can still send data. sync = !sync @@ -479,7 +479,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, new_item.loc = linked_lathe.loc clear_wait_message() linked_lathe.busy = 0 - nanomanager.update_uis(src) + SSnanoui.update_uis(src) else if(href_list["imprint"]) //Causes the Circuit Imprinter to build something. var/coeff = linked_imprinter.efficiency_coeff @@ -527,7 +527,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, new_item.loc = linked_imprinter.loc linked_imprinter.busy = 0 clear_wait_message() - nanomanager.update_uis(src) + SSnanoui.update_uis(src) else if(href_list["disposeI"] && linked_imprinter) //Causes the circuit imprinter to dispose of a single reagent (all of it) linked_imprinter.reagents.del_reagent(href_list["disposeI"]) @@ -588,7 +588,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, spawn(SYNC_DEVICE_DELAY) SyncRDevices() clear_wait_message() - nanomanager.update_uis(src) + SSnanoui.update_uis(src) else if(href_list["disconnect"]) //The R&D console disconnects with a specific device. switch(href_list["disconnect"]) @@ -611,7 +611,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, files = new /datum/research(src) spawn(RESET_RESEARCH_DELAY) clear_wait_message() - nanomanager.update_uis(src) + SSnanoui.update_uis(src) else if(href_list["search"]) //Search for designs with name matching pattern var/compare @@ -633,7 +633,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, selected_category = "Search Results for '[href_list["to_search"]]'" - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return @@ -647,7 +647,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, /obj/machinery/computer/rdconsole/ui_interact(mob/user, ui_key="main", var/datum/nanoui/ui = null, var/force_open = 1) user.set_machine(src) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "r_n_d.tmpl", src.name, 800, 550) ui.open() @@ -884,7 +884,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, // if the timer calls this function deltimer(wait_message_timer) wait_message_timer = 0 - nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/computer/rdconsole/core diff --git a/code/modules/scripting/Implementations/Telecomms.dm b/code/modules/scripting/Implementations/Telecomms.dm index 0a6432e6d48..35d47c9be28 100644 --- a/code/modules/scripting/Implementations/Telecomms.dm +++ b/code/modules/scripting/Implementations/Telecomms.dm @@ -228,7 +228,7 @@ // Time interpreter.SetProc("time", /proc/time) - interpreter.SetProc("timestamp", /proc/timestamp) + interpreter.SetProc("timestamp", /proc/gameTimestamp) // Run the compiled code interpreter.Run() diff --git a/code/modules/scripting/Implementations/_Logic.dm b/code/modules/scripting/Implementations/_Logic.dm index c31d55f3077..1cb55edf6d8 100644 --- a/code/modules/scripting/Implementations/_Logic.dm +++ b/code/modules/scripting/Implementations/_Logic.dm @@ -155,10 +155,6 @@ //writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/time() called tick#: [world.time]") return world.time + (12 HOURS) -/proc/timestamp(var/format = "hh:mm:ss") // Get the game time in text - //writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/timestamp() called tick#: [world.time]") - return time2text(world.time + (10 HOURS), format) // Yes, 10, not 12 hours, for some reason time2text() is being moronic (T-thanks BYOND), and it's adding 2 hours to this, I don't even know either. - proc/string_explode(var/string, var/separator = "") //writepanic("[__FILE__].[__LINE__] \\/proc/string_explode() called tick#: [world.time]") if(istext(string) && (istext(separator) || isnull(separator))) diff --git a/code/modules/security_levels/keycard authentication.dm b/code/modules/security_levels/keycard authentication.dm index e8e5a78d597..785721eb1c6 100644 --- a/code/modules/security_levels/keycard authentication.dm +++ b/code/modules/security_levels/keycard authentication.dm @@ -70,7 +70,7 @@ user.set_machine(src) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "keycard_auth.tmpl", "Keycard Authentication Device UI", 540, 320) ui.open() @@ -98,7 +98,7 @@ if(href_list["ert"]) ert_reason = input(usr, "Reason for ERT Call:", "", "") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) add_fingerprint(usr) return @@ -159,7 +159,7 @@ to_chat(usr, "All Emergency Response Teams are dispatched and can not be called at this time.") return to_chat(usr, "ERT request transmitted.") - print_centcom_report(ert_reason, worldtime2text() +" ERT Request") + print_centcom_report(ert_reason, station_time_timestamp() + " ERT Request") var/fullmin_count = 0 for(var/client/C in admins) diff --git a/code/modules/security_levels/security levels.dm b/code/modules/security_levels/security levels.dm index fa1e6b6c841..aa96b79dd01 100644 --- a/code/modules/security_levels/security levels.dm +++ b/code/modules/security_levels/security levels.dm @@ -27,6 +27,10 @@ //Will not be announced if you try to set to the same level as it already is if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_DELTA && level != security_level) + if(level >= SEC_LEVEL_RED && security_level < SEC_LEVEL_RED) + // Mark down this time to prevent shuttle cheese + shuttle_master.emergency_sec_level_time = world.time + switch(level) if(SEC_LEVEL_GREEN) security_announcement_down.Announce("All threats to the station have passed. All weapons need to be holstered and privacy laws are once again fully enforced.","Attention! Security level lowered to green.") @@ -123,6 +127,7 @@ atc.reroute_traffic(yes = TRUE) // Tell them fuck off we're busy. else atc.reroute_traffic(yes = FALSE) + SSnightshift.check_nightshift(TRUE) else return diff --git a/code/modules/shuttle/assault_pod.dm b/code/modules/shuttle/assault_pod.dm index fe3d059a08a..db5f68ba752 100644 --- a/code/modules/shuttle/assault_pod.dm +++ b/code/modules/shuttle/assault_pod.dm @@ -34,7 +34,7 @@ var/target_area target_area = input("Area to land", "Select a Landing Zone", target_area) in teleportlocs var/area/picked_area = teleportlocs[target_area] - if(!src || qdeleted(src)) + if(!src || QDELETED(src)) return var/turf/T = safepick(get_area_turfs(picked_area)) diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index eca8ea6f2df..ac5930b2319 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -734,7 +734,7 @@ /obj/machinery/computer/shuttle/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) var/obj/docking_port/mobile/M = shuttle_master.getShuttle(shuttleId) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "shuttle_console.tmpl", M ? M.name : "shuttle", 300, 200) ui.open() @@ -814,7 +814,7 @@ log_admin("[key_name(usr)] requested to move the transport ferry to Centcom.") message_admins("FERRY: [key_name_admin(usr)] (Move Ferry) is requesting to move the transport ferry to Centcom.") . = 1 - nanomanager.update_uis(src) + SSnanoui.update_uis(src) spawn(600) //One minute cooldown cooldown = 0 @@ -869,7 +869,7 @@ desc = "Used to call and send the SIT shuttle." req_access = list(access_syndicate) shuttleId = "sit" - possible_destinations = "sit_arrivals;sit_scimaint;sit_engshuttle;sit_away" + possible_destinations = "sit_arrivals;sit_engshuttle;sit_away" var/global/trade_dock_timelimit = 0 diff --git a/code/modules/shuttle/shuttle_manipulator.dm b/code/modules/shuttle/shuttle_manipulator.dm index 34196c888b0..5ba25533445 100644 --- a/code/modules/shuttle/shuttle_manipulator.dm +++ b/code/modules/shuttle/shuttle_manipulator.dm @@ -60,7 +60,7 @@ /obj/machinery/shuttle_manipulator/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm index 77d77c5706d..1200a7313d6 100644 --- a/code/modules/shuttle/supply.dm +++ b/code/modules/shuttle/supply.dm @@ -428,7 +428,7 @@ ui_interact(user) /obj/machinery/computer/ordercomp/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) - ui = nanomanager.try_update_ui(user, src, ui_key, ui) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui) if(!ui) ui = new(user, src, ui_key, "order_console.tmpl", name, ORDER_SCREEN_WIDTH, ORDER_SCREEN_HEIGHT) ui.open() @@ -492,7 +492,7 @@ if(href_list["doorder"]) if(world.time < reqtime) visible_message("[src]'s monitor flashes, \"[world.time - reqtime] seconds remaining until another requisition form may be printed.\"") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 var/index = copytext(href_list["doorder"], 1, lentext(href_list["doorder"])) //text2num(copytext(href_list["doorder"], 1)) @@ -555,7 +555,7 @@ content_pack = P add_fingerprint(usr) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 /obj/machinery/computer/supplycomp/attack_ai(var/mob/user as mob) @@ -577,7 +577,7 @@ return /obj/machinery/computer/supplycomp/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) - ui = nanomanager.try_update_ui(user, src, ui_key, ui) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui) if(!ui) ui = new(user, src, ui_key, "supply_console.tmpl", name, SUPPLY_SCREEN_WIDTH, SUPPLY_SCREEN_HEIGHT) ui.open() @@ -673,7 +673,7 @@ else if(href_list["doorder"]) if(world.time < reqtime) visible_message("[src]'s monitor flashes, \"[world.time - reqtime] seconds remaining until another requisition form may be printed.\"") - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 var/index = copytext(href_list["doorder"], 1, lentext(href_list["doorder"])) //text2num(copytext(href_list["doorder"], 1)) @@ -754,7 +754,7 @@ content_pack = P add_fingerprint(usr) - nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 /obj/machinery/computer/supplycomp/proc/post_signal(var/command) diff --git a/code/modules/station_goals/bsa.dm b/code/modules/station_goals/bsa.dm index f9aa857c3e8..f10c346a745 100644 --- a/code/modules/station_goals/bsa.dm +++ b/code/modules/station_goals/bsa.dm @@ -306,7 +306,7 @@ ui_interact(user) /obj/machinery/computer/bsa_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "bsa.tmpl", name, 400, 305) ui.open() diff --git a/code/modules/station_goals/dna_vault.dm b/code/modules/station_goals/dna_vault.dm index 70a5d522678..1e221d0e3a7 100644 --- a/code/modules/station_goals/dna_vault.dm +++ b/code/modules/station_goals/dna_vault.dm @@ -199,7 +199,7 @@ var/list/non_simple_animals = typecacheof(list(/mob/living/carbon/human/monkey,/ ui_interact(user) /obj/machinery/dna_vault/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) roll_powers(user) ui = new(user, src, ui_key, "dna_vault.tmpl", name, 550, 400) diff --git a/code/modules/station_goals/shield.dm b/code/modules/station_goals/shield.dm index 5a19fcb67cc..420823210e6 100644 --- a/code/modules/station_goals/shield.dm +++ b/code/modules/station_goals/shield.dm @@ -46,14 +46,14 @@ icon_screen = "accelerator" icon_keyboard = "accelerator_key" var/notice - + /obj/machinery/computer/sat_control/attack_hand(mob/user) if(..()) return 1 ui_interact(user) /obj/machinery/computer/sat_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "sat_control.tmpl", name, 475, 400) ui.open() @@ -90,7 +90,7 @@ data["meteor_shield_coverage_max"] = G.coverage_goal data["meteor_shield_coverage_percentage"] = (G.get_coverage() / G.coverage_goal) * 100 return data - + /obj/machinery/satellite name = "Defunct Satellite" desc = "" @@ -106,7 +106,7 @@ /obj/machinery/satellite/New() ..() id = gid++ - + /obj/machinery/satellite/attack_hand(mob/user) if(..()) return 1 diff --git a/code/modules/store/store.dm b/code/modules/store/store.dm index d93d56acc41..84c85fea29e 100644 --- a/code/modules/store/store.dm +++ b/code/modules/store/store.dm @@ -41,7 +41,7 @@ var/global/datum/store/centcomm_store=new T.purpose = "Purchase of [item.name]" T.amount = -amount T.date = current_date_string - T.time = worldtime2text() + T.time = station_time_timestamp() T.source_terminal = "\[CLASSIFIED\] Terminal #[rand(111,333)]" mind.initial_account.transaction_log.Add(T) return 1 diff --git a/code/world.dm b/code/world.dm index df7fc20437c..48c48debef5 100644 --- a/code/world.dm +++ b/code/world.dm @@ -32,7 +32,7 @@ var/global/list/map_transition_config = MAP_TRANSITION_CONFIG // dumb and hardcoded but I don't care~ config.server_name += " #[(world.port % 1000) / 100]" - timezoneOffset = text2num(time2text(0,"hh")) * 36000 + GLOB.timezoneOffset = text2num(time2text(0, "hh")) * 36000 callHook("startup") @@ -60,8 +60,8 @@ var/global/list/map_transition_config = MAP_TRANSITION_CONFIG map_name = "[using_map.name]" else map_name = "Unknown" - - + + if(config && config.server_name) name = "[config.server_name]: [station_name()]" else @@ -116,7 +116,12 @@ var/world_topic_spam_protect_time = world.timeofday s["ai"] = config.allow_ai s["host"] = host ? host : null s["players"] = list() - s["stationtime"] = worldtime2text() + s["roundtime"] = worldtime2text() + s["stationtime"] = station_time_timestamp() + s["oldstationtime"] = classic_worldtime2text() // more "consistent" indication of the round's running time + s["listed"] = "Public" + if(!hub_password) + s["listed"] = "Invisible" var/player_count = 0 var/admin_count = 0 @@ -137,6 +142,7 @@ var/world_topic_spam_protect_time = world.timeofday s["real_mode"] = ticker.mode.name s["security_level"] = get_security_level() + s["ticker_state"] = ticker.current_state if(shuttle_master && shuttle_master.emergency) // Shuttle status, see /__DEFINES/stat.dm @@ -269,6 +275,18 @@ var/world_topic_spam_protect_time = world.timeofday return "Logs set to current date" + else if("setlist" in input) + if(!key_valid) + return keySpamProtect(addr) + if(input["req"] == "public") + hub_password = hub_password_base + update_status() + return "Set listed status to public." + else + hub_password = "" + update_status() + return "Set listed status to invisible." + /proc/keySpamProtect(var/addr) if(world_topic_spam_protect_ip == addr && abs(world_topic_spam_protect_time - world.time) < 50) spawn(50) diff --git a/config/example/config.txt b/config/example/config.txt index 5e6f9465708..95ec5292021 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -370,4 +370,4 @@ HIGH_POP_MC_TICK_RATE 1.1 HIGH_POP_MC_MODE_AMOUNT 65 ##Disengage high pop mode if player count drops below this -DISABLE_HIGH_POP_MC_MODE_AMOUNT 60 \ No newline at end of file +DISABLE_HIGH_POP_MC_MODE_AMOUNT 60 diff --git a/config/example/game_options.txt b/config/example/game_options.txt index ae3cc153995..8a477dd6610 100644 --- a/config/example/game_options.txt +++ b/config/example/game_options.txt @@ -65,4 +65,10 @@ BOMBCAP 20 ## Set to 0/commented for "off", silicons will just start with Crewsimov. ## Set to 1 for "random", silicons will start with a random lawset picked from (at the time of writing): Nanotrasen Default, P.A.L.A.D.I.N., Corporate, Robop and Crewsimov. More can be added by changing the law datum "default" variable in ai_laws.dm. -DEFAULT_LAWS 1 \ No newline at end of file +DEFAULT_LAWS 1 + +## Randomize roundstart time (anywhere from 00:00 to 23:00 instead of always starting at 12:00) +RANDOMIZE_SHIFT_TIME + +## Enable Nightshift - Causes the station to go into "night mode" from 19:30 to 07:30. Best used with RANDOMIZED_SHIFT_TIME. +ENABLE_NIGHT_SHIFTS \ No newline at end of file diff --git a/goon/browserassets/css/browserOutput.css b/goon/browserassets/css/browserOutput.css index fad9711bc42..f3fe28315f6 100644 --- a/goon/browserassets/css/browserOutput.css +++ b/goon/browserassets/css/browserOutput.css @@ -322,7 +322,7 @@ h1.alert, h2.alert {color: #000000;} .rose {color: #ff5050;} .sans {font-family: 'Comic Sans MS', cursive, sans-serif;} .wingdings {font-family: Wingdings, Webdings;} -.ibm {font-family: 'PxPlus IBM MDA';} +.robot {font-family: 'PxPlus IBM MDA'; font-size: 1.15em;} .ancient {color: #008B8B; font-stye: italic;} .newscaster {color: #800000;} .mod {color: #735638; font-weight: bold;} diff --git a/html/changelog.html b/html/changelog.html index 4d431ca2bea..5340d13c3b2 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,178 @@ -->
+

17 April 2018

+

Citinited updated:

+
    +
  • Kitchen machinery no longer looks as if it is falling apart.
  • +
+

MINIMAN10000 updated:

+
    +
  • Adds NOBLUDGEON to door_remote so the remote always triggers
  • +
  • Cable coils now allow you to transfer a part of the stack
  • +
  • Stack handling from cable.dm is removed as stack.dm already handles it
  • +
  • Changed cable coil message
  • +
  • The ability to change the color of cables
  • +
  • cableColor now follows the new cable_color format
  • +
+ +

14 April 2018

+

Anticept updated:

+
    +
  • Changed defib timer from 3 minutes to 5 minutes
  • +
+

MarsM0nd updated:

+
    +
  • Single man up now looks and sounds the same as the global man up for that person.
  • +
+ +

11 April 2018

+

KasparoVy updated:

+
    +
  • Removes the job-restriction on the purely cosmetic Tajaran veils while those wth integrated HUDs remain unchanged.
  • +
+ +

08 April 2018

+

Kyep updated:

+
    +
  • Terror Spiders now have a new type in their roster (brown) and see the health status of humanoids (since some of their abilities depend on that status). The Terror Spider away mission has also been adjusted to smooth out areas of no challenge (safe spaces) as well as areas of nigh-impossible challenge (dozens of spiders stacking up together in the final room).
  • +
+ +

07 April 2018

+

Alffd updated:

+
    +
  • portable (stationary) scrubbers now remove 1/4th as much air per tick at maximum.
  • +
+

Birdtalon updated:

+
    +
  • Nanocalcium can no longer be synthesised by bees or Odysseus
  • +
  • Silicons now have their diagnostic HUD removed correctly.
  • +
  • Defibs no longer give endless paddles.
  • +
  • Ether re-balanced into a more effective anaesthetic for surgery.
  • +
  • Atmos techs have access to tech storage and inner engineering tool room.
  • +
+

Citinited updated:

+
    +
  • You can't play russian roulette without a head
  • +
  • using a russian revolver on another human will now hit them with the revolver instead of failing to play russian roulette with them.
  • +
+

Crazylemon64 updated:

+
    +
  • Deletion of human mobs now properly deletes equipment balance: Hotel guards now dust on death balance: Hotel guards no longer drop equipment when stunned balance: Hotel guards now are able to use the tasers they hold
  • +
+

Dyhr updated:

+
    +
  • Agent ID's now provide some presets for valid occupations.
  • +
+

Kyep updated:

+
    +
  • SIT shuttle can no longer dock in scimaint.
  • +
  • Crew demotions and terminations now generate an automatic message to admins. All job changes are also logged.
  • +
  • Modular computers now support toggling priority on/off for jobs. The button for doing this in both normal and modular computers is now marked 'Pri', instead of the old '*'.
  • +
+

MarsM0nd updated:

+
    +
  • Admins can make a fax machine recive the faxes Centcomm or the Syndicate does get.
  • +
  • Stops "Unknown" department to send to from coming up when a fax machine gets spawned.
  • +
  • Allows adding of departments to send to over a proc-call.
  • +
+

Spacemanspark updated:

+
    +
  • Mining drones now have movement sprites.
  • +
+

uraniummeltdown updated:

+
    +
  • Drones will no longer shatter glass tables
  • +
  • All small mobs can bump open public access doors
  • +
+ +

06 April 2018

+

Fox McCloud updated:

+
    +
  • Fixes medical cyborgs having one less stack than they should have they recharge
  • +
  • Fixes inconsistency in the medical stacks amounts (they should all be 6)
  • +
+ +

05 April 2018

+

uraniummeltdown updated:

+
    +
  • Aliens can pull facehuggers out of eggs again
  • +
+ +

03 April 2018

+

& Deathride58 & Tigercat2000 updated:

+
    +
  • Station time is now randomized [if enabled in game_options configuration].
  • +
  • A separate round time has been added to status panel. This will start at 00:00:00.
  • +
  • Night shift lighting [if enabled in the same configuration] will activate between station time 7:30 PM and 7:30 AM. This will dim all lights affected, but they will still have the same range.
  • +
  • APCs now have an option to set night lighting mode on or off, regardless of time.
  • +
+ +

02 April 2018

+

Desolate updated:

+
    +
  • New Cricket Borg module selection.
  • +
+

EldritchSigma updated:

+
    +
  • Mech mounted Disablers are now printable with consistency.
  • +
+

Fethas updated:

+
    +
  • Viruses Lycancoughy, Adv. Pierrots throat and Kingstons added.
  • +
+

IK3I updated:

+
    +
  • You can now opt out of the syndicate recruitment semminar prior to boarding the station.
  • +
+

Kyep updated:

+
    +
  • Syndifox and Syndicat can now do melee damage. Paperwork (cargo sloth pet) no longer can.
  • +
  • Syndifox and Syndicat are no longer controllable by players by default.
  • +
  • Poly (parrot in Engineering) now knows more phrases.
  • +
+

Shazbot updated:

+
    +
  • Adds E-pistol crates to the cargo manifest Change: changes the HoP's E-gun to an E-pistol
  • +
+

Tayyyyyyy updated:

+
    +
  • Borg power warning is on a 2 second cooldown
  • +
+ +

01 April 2018

+

Tayyyyyyy, LP Spartan updated:

+
    +
  • Once you up to red, it takes 5 minutes before the shuttle transit time is reduced to 5 minutes.
  • +
+ +

30 March 2018

+

matt81093 updated:

+
    +
  • fish duplication when pulling out multiple fish at once
  • +
+ +

28 March 2018

+

Birdtalon updated:

+
    +
  • Enforces size limits for placing items inside slicable food
  • +
+

Fox McCloud updated:

+
    +
  • Nano UI will update a bit faster
  • +
+

MarsM0nd updated:

+
    +
  • Record printouts now automatically get labled with the name of the person.
  • +
+ +

25 March 2018

+

Alffd updated:

+
    +
  • Logic checks to lessen death from flying objects due to atmospheric breaches.
  • +
  • Removes atmospheric stunning while thrown.
  • +
+

24 March 2018

matt81093 updated:

    diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index 290d75a5606..0412bbb593e 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -6189,3 +6189,125 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. - bugfix: Borgs no longer keep their special vision when reset with the reset module uraniummeltdown: - bugfix: Deconstructing default RCD airlocks should work now +2018-03-25: + Alffd: + - rscadd: Logic checks to lessen death from flying objects due to atmospheric breaches. + - rscdel: Removes atmospheric stunning while thrown. +2018-03-28: + Birdtalon: + - bugfix: Enforces size limits for placing items inside slicable food + Fox McCloud: + - tweak: Nano UI will update a bit faster + MarsM0nd: + - rscadd: Record printouts now automatically get labled with the name of the person. +2018-03-30: + matt81093: + - bugfix: fish duplication when pulling out multiple fish at once +2018-04-01: + Tayyyyyyy, LP Spartan: + - tweak: Once you up to red, it takes 5 minutes before the shuttle transit time + is reduced to 5 minutes. +2018-04-02: + Desolate: + - rscadd: New Cricket Borg module selection. + EldritchSigma: + - bugfix: Mech mounted Disablers are now printable with consistency. + Fethas: + - rscadd: Viruses Lycancoughy, Adv. Pierrots throat and Kingstons added. + IK3I: + - rscadd: You can now opt out of the syndicate recruitment semminar prior to boarding + the station. + Kyep: + - tweak: Syndifox and Syndicat can now do melee damage. Paperwork (cargo sloth pet) + no longer can. + - tweak: Syndifox and Syndicat are no longer controllable by players by default. + - tweak: Poly (parrot in Engineering) now knows more phrases. + Shazbot: + - rscadd: 'Adds E-pistol crates to the cargo manifest Change: changes the HoP''s + E-gun to an E-pistol' + Tayyyyyyy: + - tweak: Borg power warning is on a 2 second cooldown +2018-04-03: + '& Deathride58 & Tigercat2000': + - experiment: Station time is now randomized [if enabled in game_options configuration]. + - rscadd: A separate round time has been added to status panel. This will start + at 00:00:00. + - rscadd: Night shift lighting [if enabled in the same configuration] will activate + between station time 7:30 PM and 7:30 AM. This will dim all lights affected, + but they will still have the same range. + - rscadd: APCs now have an option to set night lighting mode on or off, regardless + of time. +2018-04-05: + uraniummeltdown: + - bugfix: Aliens can pull facehuggers out of eggs again +2018-04-06: + Fox McCloud: + - bugfix: Fixes medical cyborgs having one less stack than they should have they + recharge + - bugfix: Fixes inconsistency in the medical stacks amounts (they should all be + 6) +2018-04-07: + Alffd: + - tweak: portable (stationary) scrubbers now remove 1/4th as much air per tick at + maximum. + Birdtalon: + - tweak: Nanocalcium can no longer be synthesised by bees or Odysseus + - bugfix: Silicons now have their diagnostic HUD removed correctly. + - bugfix: Defibs no longer give endless paddles. + - tweak: Ether re-balanced into a more effective anaesthetic for surgery. + - tweak: Atmos techs have access to tech storage and inner engineering tool room. + Citinited: + - tweak: You can't play russian roulette without a head + - tweak: using a russian revolver on another human will now hit them with the revolver + instead of failing to play russian roulette with them. + Crazylemon64: + - bugfix: 'Deletion of human mobs now properly deletes equipment balance: Hotel + guards now dust on death balance: Hotel guards no longer drop equipment when + stunned balance: Hotel guards now are able to use the tasers they hold' + Dyhr: + - tweak: Agent ID's now provide some presets for valid occupations. + Kyep: + - tweak: SIT shuttle can no longer dock in scimaint. + - tweak: Crew demotions and terminations now generate an automatic message to admins. + All job changes are also logged. + - tweak: Modular computers now support toggling priority on/off for jobs. The button + for doing this in both normal and modular computers is now marked 'Pri', instead + of the old '*'. + MarsM0nd: + - rscadd: Admins can make a fax machine recive the faxes Centcomm or the Syndicate + does get. + - tweak: Stops "Unknown" department to send to from coming up when a fax machine + gets spawned. + - tweak: Allows adding of departments to send to over a proc-call. + Spacemanspark: + - rscadd: Mining drones now have movement sprites. + uraniummeltdown: + - bugfix: Drones will no longer shatter glass tables + - tweak: All small mobs can bump open public access doors +2018-04-08: + Kyep: + - tweak: Terror Spiders now have a new type in their roster (brown) and see the + health status of humanoids (since some of their abilities depend on that status). + The Terror Spider away mission has also been adjusted to smooth out areas of + no challenge (safe spaces) as well as areas of nigh-impossible challenge (dozens + of spiders stacking up together in the final room). +2018-04-11: + KasparoVy: + - tweak: Removes the job-restriction on the purely cosmetic Tajaran veils while + those wth integrated HUDs remain unchanged. +2018-04-14: + Anticept: + - tweak: Changed defib timer from 3 minutes to 5 minutes + MarsM0nd: + - tweak: Single man up now looks and sounds the same as the global man up for that + person. +2018-04-17: + Citinited: + - bugfix: Kitchen machinery no longer looks as if it is falling apart. + MINIMAN10000: + - bugfix: Adds NOBLUDGEON to door_remote so the remote always triggers + - tweak: Cable coils now allow you to transfer a part of the stack + - rscdel: Stack handling from cable.dm is removed as stack.dm already handles it + - tweak: Changed cable coil message + - rscadd: The ability to change the color of cables + - bugfix: cableColor now follows the new cable_color format diff --git a/html/changelogs/AutoChangeLog-pr-8386.yml b/html/changelogs/AutoChangeLog-pr-8386.yml deleted file mode 100644 index ad3a430b15d..00000000000 --- a/html/changelogs/AutoChangeLog-pr-8386.yml +++ /dev/null @@ -1,5 +0,0 @@ -author: "Alffd" -delete-after: True -changes: - - rscadd: "Logic checks to lessen death from flying objects due to atmospheric breaches." - - rscdel: "Removes atmospheric stunning while thrown." diff --git a/icons/mob/back.dmi b/icons/mob/back.dmi index 574052a3297..d229cd65875 100644 Binary files a/icons/mob/back.dmi and b/icons/mob/back.dmi differ diff --git a/icons/mob/custom_synthetic/custom-synthetic.dmi b/icons/mob/custom_synthetic/custom-synthetic.dmi index 10d40e4e629..6143f5ef4d7 100644 Binary files a/icons/mob/custom_synthetic/custom-synthetic.dmi and b/icons/mob/custom_synthetic/custom-synthetic.dmi differ diff --git a/icons/mob/head.dmi b/icons/mob/head.dmi index 81096a8c13a..e465cdd6901 100644 Binary files a/icons/mob/head.dmi and b/icons/mob/head.dmi differ diff --git a/icons/mob/human_face.dmi b/icons/mob/human_face.dmi index c7314121dce..80131245d13 100644 Binary files a/icons/mob/human_face.dmi and b/icons/mob/human_face.dmi differ diff --git a/icons/mob/inhands/guns_lefthand.dmi b/icons/mob/inhands/guns_lefthand.dmi index f980e24d7ef..b258ecdfb50 100644 Binary files a/icons/mob/inhands/guns_lefthand.dmi and b/icons/mob/inhands/guns_lefthand.dmi differ diff --git a/icons/mob/inhands/guns_righthand.dmi b/icons/mob/inhands/guns_righthand.dmi index af4040a94f0..fb256e34937 100644 Binary files a/icons/mob/inhands/guns_righthand.dmi and b/icons/mob/inhands/guns_righthand.dmi differ diff --git a/icons/mob/robots.dmi b/icons/mob/robots.dmi index 6ea8f69d632..8bcbf4146d5 100644 Binary files a/icons/mob/robots.dmi and b/icons/mob/robots.dmi differ diff --git a/icons/mob/suit.dmi b/icons/mob/suit.dmi index 9f8a20b37c5..bf24f5c47e2 100644 Binary files a/icons/mob/suit.dmi and b/icons/mob/suit.dmi differ diff --git a/icons/mob/terrorspider.dmi b/icons/mob/terrorspider.dmi index a5d678f3f38..f1ffcacdcc9 100644 Binary files a/icons/mob/terrorspider.dmi and b/icons/mob/terrorspider.dmi differ diff --git a/icons/mob/uniform.dmi b/icons/mob/uniform.dmi index 38679e42e41..901581494dd 100644 Binary files a/icons/mob/uniform.dmi and b/icons/mob/uniform.dmi differ diff --git a/icons/obj/aibots.dmi b/icons/obj/aibots.dmi index b564c3a59e1..05b043260c7 100644 Binary files a/icons/obj/aibots.dmi and b/icons/obj/aibots.dmi differ diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi index e872cb74f7e..559a4b3980b 100644 Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi index 95d9b07dd0d..dacd21506d0 100644 Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ diff --git a/icons/obj/custom_items.dmi b/icons/obj/custom_items.dmi index 9ef8e4352ed..384b608a5c2 100644 Binary files a/icons/obj/custom_items.dmi and b/icons/obj/custom_items.dmi differ diff --git a/icons/obj/tank.dmi b/icons/obj/tank.dmi index c020f467d92..e5eec2cf459 100644 Binary files a/icons/obj/tank.dmi and b/icons/obj/tank.dmi differ diff --git a/nano/templates/apc.tmpl b/nano/templates/apc.tmpl index 9e0959c1d09..234074fe577 100644 --- a/nano/templates/apc.tmpl +++ b/nano/templates/apc.tmpl @@ -177,4 +177,21 @@
{{/if}} +
+
+ Night Shift Lighting: +
+
+ {{if data.locked}} + {{if data.nightshiftLights}} + On + {{else}} + Off + {{/if}} + {{else}} + {{:helper.link('Enabled', 'lightbulb-o', {'toggle_nightshift' : 1}, data.nightshiftLights ? 'selected' : null)}}{{:helper.link('Disabled', 'lightbulb-o', {'toggle_nightshift' : 1}, data.nightshiftLights ? null : 'selected')}} + {{/if}} +
+
+ diff --git a/nano/templates/card_prog.tmpl b/nano/templates/card_prog.tmpl index 56c913a9de9..478c8f6b400 100644 --- a/nano/templates/card_prog.tmpl +++ b/nano/templates/card_prog.tmpl @@ -41,6 +41,7 @@ {{:value.title}}: {{:value.current_positions}}/{{:value.total_positions}} {{:helper.link('-', null, {'action' : 'PRG_make_job_unavailable', 'job' : value.title}, value.can_close == 1 && data.authenticated ? null : 'disabled')}} {{:helper.link('+', null, {'action' : 'PRG_make_job_available', 'job' : value.title}, value.can_open == 1 && data.authenticated ? null : 'disabled')}} + {{:helper.link('Pri', null, {'action' : 'PRG_prioritize_job', 'job' : value.title}, value.can_prioritize > 0 && data.authenticated ? null : 'disabled')}} {{if value.can_prioritize == 2}}Priority Job {{/if}} {{/for}} diff --git a/nano/templates/identification_computer.tmpl b/nano/templates/identification_computer.tmpl index d7696b8630e..ad2779f7864 100644 --- a/nano/templates/identification_computer.tmpl +++ b/nano/templates/identification_computer.tmpl @@ -41,7 +41,7 @@ {{:value.title}}: {{:value.current_positions}}/{{:value.total_positions}} {{:helper.link('-', null, {'choice' : 'make_job_unavailable', 'job' : value.title}, value.can_close == 1 && data.authenticated ? null : 'disabled')}} {{:helper.link('+', null, {'choice' : 'make_job_available', 'job' : value.title}, value.can_open == 1 && data.authenticated ? null : 'disabled')}} - {{:helper.link('*', null, {'choice' : 'prioritize_job', 'job' : value.title}, value.can_prioritize > 0 && data.authenticated ? null : 'disabled')}} {{if value.can_prioritize == 2}}Priority Job {{/if}} + {{:helper.link('Pri', null, {'choice' : 'prioritize_job', 'job' : value.title}, value.can_prioritize > 0 && data.authenticated ? null : 'disabled')}} {{if value.can_prioritize == 2}}Priority Job {{/if}} {{/for}} diff --git a/paradise.dme b/paradise.dme index b6606aad888..70570684595 100644 --- a/paradise.dme +++ b/paradise.dme @@ -190,18 +190,14 @@ #include "code\controllers\Processes\alarm.dm" #include "code\controllers\Processes\event.dm" #include "code\controllers\Processes\fast_process.dm" -#include "code\controllers\Processes\garbage.dm" -#include "code\controllers\Processes\inactivity.dm" #include "code\controllers\Processes\lighting.dm" #include "code\controllers\Processes\machinery.dm" #include "code\controllers\Processes\mob.dm" #include "code\controllers\Processes\nano_mob_hunter.dm" -#include "code\controllers\Processes\nanoui.dm" #include "code\controllers\Processes\npcai.dm" #include "code\controllers\Processes\npcpool.dm" #include "code\controllers\Processes\obj.dm" #include "code\controllers\Processes\shuttles.dm" -#include "code\controllers\Processes\sun.dm" #include "code\controllers\Processes\ticker.dm" #include "code\controllers\Processes\timer.dm" #include "code\controllers\Processes\weather.dm" @@ -209,7 +205,11 @@ #include "code\controllers\ProcessScheduler\core\processScheduler.dm" #include "code\controllers\subsystem\air.dm" #include "code\controllers\subsystem\fires.dm" +#include "code\controllers\subsystem\garbage.dm" +#include "code\controllers\subsystem\nanoui.dm" +#include "code\controllers\subsystem\nightshift.dm" #include "code\controllers\subsystem\spacedrift.dm" +#include "code\controllers\subsystem\sun.dm" #include "code\controllers\subsystem\throwing.dm" #include "code\datums\action.dm" #include "code\datums\ai_law_sets.dm" @@ -220,6 +220,7 @@ #include "code\datums\cargoprofile.dm" #include "code\datums\computerfiles.dm" #include "code\datums\datacore.dm" +#include "code\datums\datum.dm" #include "code\datums\datumvars.dm" #include "code\datums\gas_mixture.dm" #include "code\datums\holocall.dm" @@ -260,7 +261,9 @@ #include "code\datums\diseases\fluspanish.dm" #include "code\datums\diseases\food_poisoning.dm" #include "code\datums\diseases\gbs.dm" +#include "code\datums\diseases\kingstons.dm" #include "code\datums\diseases\kuru.dm" +#include "code\datums\diseases\lycancoughy.dm" #include "code\datums\diseases\magnitis.dm" #include "code\datums\diseases\pierrot_throat.dm" #include "code\datums\diseases\retrovirus.dm" @@ -705,7 +708,7 @@ #include "code\game\objects\objs.dm" #include "code\game\objects\structures.dm" #include "code\game\objects\weapons.dm" -#include "code\game\objects\effects\aliens.dm" +#include "code\game\objects\effects\alien_acid.dm" #include "code\game\objects\effects\anomalies.dm" #include "code\game\objects\effects\bump_teleporter.dm" #include "code\game\objects\effects\effects.dm" @@ -942,6 +945,7 @@ #include "code\game\objects\items\weapons\tanks\tanks.dm" #include "code\game\objects\items\weapons\tanks\watertank.dm" #include "code\game\objects\random\random.dm" +#include "code\game\objects\structures\aliens.dm" #include "code\game\objects\structures\artstuff.dm" #include "code\game\objects\structures\barsign.dm" #include "code\game\objects\structures\bedsheet_bin.dm" @@ -1413,8 +1417,6 @@ #include "code\modules\food_and_drinks\recipes\recipes_microwave.dm" #include "code\modules\food_and_drinks\recipes\recipes_oven.dm" #include "code\modules\food_and_drinks\recipes\tablecraft\recipes_table.dm" -#include "code\modules\garbage_collection\garbage_collector.dm" -#include "code\modules\garbage_collection\gc_testing.dm" #include "code\modules\holiday\christmas.dm" #include "code\modules\holiday\holiday.dm" #include "code\modules\hydroponics\biogenerator.dm" @@ -1794,6 +1796,7 @@ #include "code\modules\mob\living\simple_animal\hostile\terror_spiders\__defines.dm" #include "code\modules\mob\living\simple_animal\hostile\terror_spiders\actions.dm" #include "code\modules\mob\living\simple_animal\hostile\terror_spiders\black.dm" +#include "code\modules\mob\living\simple_animal\hostile\terror_spiders\brown.dm" #include "code\modules\mob\living\simple_animal\hostile\terror_spiders\chem.dm" #include "code\modules\mob\living\simple_animal\hostile\terror_spiders\empress.dm" #include "code\modules\mob\living\simple_animal\hostile\terror_spiders\ghost.dm" @@ -1860,9 +1863,9 @@ #include "code\modules\modular_computers\NTNet\NTNet_relay.dm" #include "code\modules\modular_computers\NTNet\NTNRC\conversation.dm" #include "code\modules\nano\nanoexternal.dm" -#include "code\modules\nano\nanomanager.dm" #include "code\modules\nano\nanomapgen.dm" #include "code\modules\nano\nanoui.dm" +#include "code\modules\nano\subsystem.dm" #include "code\modules\nano\interaction\admin.dm" #include "code\modules\nano\interaction\base.dm" #include "code\modules\nano\interaction\conscious.dm" diff --git a/sound/effects/siren-spooky.ogg b/sound/effects/siren-spooky.ogg index 6e9eb341156..28fc7689616 100644 Binary files a/sound/effects/siren-spooky.ogg and b/sound/effects/siren-spooky.ogg differ
Item
[severity_to_string[severity]][worldtime2text(max(EC.next_event_time, world.time))][station_time_timestamp("hh:mm:ss", max(EC.next_event_time, world.time))][round(next_event_at / 600, 0.1)]" html += "--" @@ -188,7 +188,7 @@ html += "
[severity_to_string[EM.severity]][EM.name][no_end ? "N/A" : worldtime2text(ends_at)][no_end ? "N/A" : station_time_timestamp("hh:mm:ss", ends_at)][no_end ? "N/A" : ends_in]Stop
[A.name][A.from_department][A.to_department][worldtime2text(A.sent_at)][station_time_timestamp("hh:mm:ss", A.sent_at)][S.name][F.name][F.from_department][F.to_department][worldtime2text(F.sent_at)][station_time_timestamp("hh:mm:ss", F.sent_at)][S.name]