diff --git a/.travis.yml b/.travis.yml index e4443d14ee0..74ac9fedb9f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -52,8 +52,6 @@ jobs: - libstdc++6:i386 - libssl-dev:i386 - gcc-multilib - - g++-7 - - g++-7-multilib - pkg-config:i386 - zlib1g-dev:i386 cache: @@ -61,6 +59,8 @@ jobs: - $HOME/.cargo - $HOME/.rustup - $HOME/BYOND + before_install: + - 'sudo apt-get -qq update' install: - tools/travis/install_byond.sh - source $HOME/BYOND/byond/bin/byondsetup diff --git a/README.md b/README.md index 2c0ababbe30..b484a8bccfc 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ [![Build Status](https://travis-ci.org/ParadiseSS13/Paradise.svg?branch=master)](https://travis-ci.org/ParadiseSS13/Paradise) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/paradisess13/paradise.svg)](http://isitmaintained.com/project/paradisess13/paradise "Average time to resolve an issue") [![Percentage of issues still open](http://isitmaintained.com/badge/open/paradisess13/paradise.svg)](http://isitmaintained.com/project/paradisess13/paradise "Percentage of issues still open") -[![Krihelimeter](http://www.krihelinator.xyz/badge/paradisess13/paradise)](http://www.krihelinator.xyz) ![Render Nanomaps](https://github.com/ParadiseSS13/Paradise/workflows/Render%20Nanomaps/badge.svg) [![forthebadge](http://forthebadge.com/images/badges/60-percent-of-the-time-works-every-time.svg)](http://forthebadge.com) diff --git a/_maps/cyberiad.dm b/_maps/cyberiad.dm index 81499ec8c75..3652328e8f4 100644 --- a/_maps/cyberiad.dm +++ b/_maps/cyberiad.dm @@ -17,7 +17,7 @@ z4 = lavaland #define MAP_TRANSITION_CONFIG list(\ DECLARE_LEVEL(MAIN_STATION, CROSSLINKED, list(STATION_LEVEL, STATION_CONTACT, REACHABLE, AI_OK)),\ DECLARE_LEVEL(CENTCOMM, SELFLOOPING, list(ADMIN_LEVEL, BLOCK_TELEPORT, IMPEDES_MAGIC)),\ -DECLARE_LEVEL(MINING, SELFLOOPING, list(REACHABLE, STATION_CONTACT, HAS_WEATHER, ORE_LEVEL, AI_OK))) +DECLARE_LEVEL(MINING, SELFLOOPING, list(ORE_LEVEL, REACHABLE, STATION_CONTACT, HAS_WEATHER, AI_OK))) #define USING_MAP_DATUM /datum/map/cyberiad #elif !defined(MAP_OVERRIDE) diff --git a/_maps/delta.dm b/_maps/delta.dm index cf6acbcddb1..f944092131b 100644 --- a/_maps/delta.dm +++ b/_maps/delta.dm @@ -22,7 +22,7 @@ Lovingly ported by Purpose2 to Paradise #define MAP_TRANSITION_CONFIG list(\ DECLARE_LEVEL(MAIN_STATION, CROSSLINKED, list(STATION_LEVEL, STATION_CONTACT, REACHABLE, AI_OK)),\ DECLARE_LEVEL(CENTCOMM, SELFLOOPING, list(ADMIN_LEVEL, BLOCK_TELEPORT, IMPEDES_MAGIC)),\ -DECLARE_LEVEL(MINING, SELFLOOPING, list(REACHABLE, STATION_CONTACT, HAS_WEATHER, ORE_LEVEL, AI_OK))) +DECLARE_LEVEL(MINING, SELFLOOPING, list(ORE_LEVEL, REACHABLE, STATION_CONTACT, HAS_WEATHER, AI_OK))) #define USING_MAP_DATUM /datum/map/delta diff --git a/_maps/map_files/Delta/delta.dmm b/_maps/map_files/Delta/delta.dmm index 02f36f5ea40..28907e9e05e 100644 --- a/_maps/map_files/Delta/delta.dmm +++ b/_maps/map_files/Delta/delta.dmm @@ -47144,7 +47144,7 @@ pixel_y = 3 }, /obj/item/circuitboard/powermonitor, -/obj/item/circuitboard/stationalert_all{ +/obj/item/circuitboard/stationalert{ pixel_x = 3; pixel_y = -3 }, diff --git a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm index bcbbe8b2351..4152ad16382 100644 --- a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm +++ b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm @@ -31415,7 +31415,7 @@ pixel_x = -2; pixel_y = 2 }, -/obj/item/circuitboard/stationalert_all{ +/obj/item/circuitboard/stationalert{ pixel_x = 1; pixel_y = -1 }, diff --git a/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm b/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm index 281346d9b8f..be8f849400f 100644 --- a/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm +++ b/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm @@ -1205,9 +1205,9 @@ /turf/simulated/floor/plating/asteroid/basalt/lava_land_surface, /area/lavaland/surface/outdoors) "dg" = ( -/obj/structure/bonfire/dense, /obj/structure/stone_tile/center, /obj/effect/mapping_helpers/no_lava, +/obj/structure/bonfire, /turf/simulated/floor/plating/asteroid/basalt/lava_land_surface, /area/lavaland/surface/outdoors) "di" = ( diff --git a/_maps/map_files/RandomRuins/SpaceRuins/asteroid1.dmm b/_maps/map_files/RandomRuins/SpaceRuins/asteroid1.dmm index 5dae1cf1452..de19f1ecbc8 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/asteroid1.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/asteroid1.dmm @@ -1,7 +1,7 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "a" = ( -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "b" = ( /turf/simulated/floor/plating/asteroid/airless, /area/ruin/unpowered) diff --git a/_maps/map_files/RandomRuins/SpaceRuins/asteroid2.dmm b/_maps/map_files/RandomRuins/SpaceRuins/asteroid2.dmm index aace1d84625..6a90a5dd587 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/asteroid2.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/asteroid2.dmm @@ -1,7 +1,7 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "a" = ( -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "b" = ( /turf/simulated/floor/plating/asteroid/airless, /area/ruin/unpowered) diff --git a/_maps/map_files/RandomRuins/SpaceRuins/asteroid3.dmm b/_maps/map_files/RandomRuins/SpaceRuins/asteroid3.dmm index a569b957ebf..121b5cff321 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/asteroid3.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/asteroid3.dmm @@ -1,7 +1,7 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "a" = ( -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "b" = ( /turf/simulated/floor/plating/asteroid/airless, /area/ruin/unpowered) diff --git a/_maps/map_files/RandomRuins/SpaceRuins/asteroid4.dmm b/_maps/map_files/RandomRuins/SpaceRuins/asteroid4.dmm index fb51d7aabc1..fb1039beb6f 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/asteroid4.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/asteroid4.dmm @@ -1,7 +1,7 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "a" = ( -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "b" = ( /turf/simulated/mineral, /area/ruin/unpowered) diff --git a/_maps/map_files/RandomRuins/SpaceRuins/asteroid5.dmm b/_maps/map_files/RandomRuins/SpaceRuins/asteroid5.dmm index aae4ff9e9c7..d7f38907b30 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/asteroid5.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/asteroid5.dmm @@ -1,7 +1,7 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "a" = ( -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "b" = ( /turf/simulated/mineral, /area/ruin/unpowered) diff --git a/_maps/map_files/RandomRuins/SpaceRuins/debris1.dmm b/_maps/map_files/RandomRuins/SpaceRuins/debris1.dmm new file mode 100644 index 00000000000..af01a5bc274 --- /dev/null +++ b/_maps/map_files/RandomRuins/SpaceRuins/debris1.dmm @@ -0,0 +1,614 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"a" = ( +/turf/template_noop, +/area/template_noop) +"b" = ( +/obj/structure/disposalpipe/segment, +/turf/space, +/area/space) +"c" = ( +/obj/structure/lattice, +/obj/structure/disposalpipe/broken{ + dir = 1 + }, +/turf/space, +/area/space) +"d" = ( +/obj/structure/lattice, +/turf/space, +/area/template_noop) +"e" = ( +/obj/structure/grille/broken, +/turf/space, +/area/space) +"g" = ( +/obj/structure/disposalpipe/broken{ + dir = 4 + }, +/turf/space, +/area/space) +"h" = ( +/obj/structure/disposalpipe/broken{ + dir = 8 + }, +/obj/item/stack/cable_coil/cut, +/turf/space, +/area/space) +"l" = ( +/obj/item/stack/cable_coil/cut, +/turf/space, +/area/space) +"m" = ( +/obj/effect/spawner/random_spawners/grille_often, +/turf/space, +/area/space) +"n" = ( +/obj/effect/spawner/random_spawners/grille_maybe, +/turf/space, +/area/space) +"o" = ( +/obj/random/tool, +/turf/space, +/area/space) +"p" = ( +/obj/structure/girder/displaced, +/turf/space, +/area/space) +"r" = ( +/turf/space, +/area/template_noop) +"t" = ( +/obj/structure/cable{ + d1 = 2; + d2 = 8; + icon_state = "2-8" + }, +/turf/space, +/area/space) +"u" = ( +/obj/structure/door_assembly/door_assembly_sec, +/obj/item/airlock_electronics, +/turf/space, +/area/space) +"v" = ( +/obj/structure/lattice, +/turf/space, +/area/space) +"x" = ( +/obj/structure/disposalpipe/junction, +/turf/space, +/area/space) +"y" = ( +/turf/simulated/floor/plating/burnt, +/area/space) +"z" = ( +/obj/item/stack/sheet/metal, +/turf/simulated/floor/plating, +/area/space) +"B" = ( +/obj/structure/lattice, +/obj/item/stack/sheet/metal, +/turf/space, +/area/space) +"C" = ( +/obj/structure/disposalpipe/broken{ + dir = 1 + }, +/turf/space, +/area/space) +"D" = ( +/obj/structure/cable{ + d1 = 4; + d2 = 8; + icon_state = "4-8"; + pixel_y = 0; + tag = "" + }, +/turf/simulated/floor/plating/burnt, +/area/space) +"E" = ( +/obj/item/stack/rods, +/turf/space, +/area/space) +"F" = ( +/turf/simulated/floor/plating, +/area/space) +"G" = ( +/obj/random/toolbox, +/turf/simulated/floor/plating/burnt, +/area/space) +"I" = ( +/obj/structure/grille/broken, +/obj/structure/lattice, +/turf/space, +/area/space) +"J" = ( +/obj/structure/disposalpipe/broken, +/turf/space, +/area/space) +"K" = ( +/obj/item/shard, +/turf/space, +/area/space) +"N" = ( +/obj/structure/lattice, +/obj/structure/lattice, +/turf/space, +/area/space) +"O" = ( +/obj/machinery/power/apc/worn_out{ + pixel_y = -24 + }, +/obj/structure/cable, +/turf/simulated/floor/plating, +/area/space) +"Q" = ( +/obj/effect/decal/cleanable/shreds{ + pixel_x = 4; + pixel_y = 3 + }, +/turf/simulated/floor/plating, +/area/space) +"T" = ( +/obj/structure/girder, +/turf/simulated/floor/plating/burnt, +/area/space) +"U" = ( +/obj/effect/spawner/random_barrier/wall_probably, +/turf/space, +/area/space) +"V" = ( +/turf/simulated/wall, +/area/space) +"X" = ( +/turf/space, +/area/space) +"Y" = ( +/obj/item/shard, +/turf/simulated/floor/plating, +/area/space) +"Z" = ( +/obj/item/stack/sheet/metal, +/turf/space, +/area/space) + +(1,1,1) = {" +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +"} +(2,1,1) = {" +a +a +r +r +r +r +r +r +r +r +r +d +d +d +r +r +d +r +a +a +"} +(3,1,1) = {" +a +d +v +X +X +X +X +X +X +X +X +X +X +X +X +X +X +X +r +a +"} +(4,1,1) = {" +a +d +X +m +X +X +X +X +X +X +X +X +X +X +v +Z +X +X +d +a +"} +(5,1,1) = {" +a +r +X +g +F +X +E +I +X +X +v +X +F +v +v +X +X +X +r +a +"} +(6,1,1) = {" +a +r +J +x +C +E +v +F +X +E +X +v +g +Z +X +X +F +X +r +a +"} +(7,1,1) = {" +a +r +X +X +y +E +X +E +Y +X +n +X +h +E +F +X +v +X +r +a +"} +(8,1,1) = {" +a +r +X +X +X +B +l +p +X +X +y +p +X +X +X +E +X +X +r +a +"} +(9,1,1) = {" +a +r +X +v +X +o +X +X +Z +l +X +E +a +X +X +V +X +X +r +a +"} +(10,1,1) = {" +a +r +X +Z +Q +v +X +y +v +D +y +U +X +X +E +X +X +n +r +a +"} +(11,1,1) = {" +a +r +X +X +I +v +v +X +v +t +O +V +X +X +F +E +Z +X +d +a +"} +(12,1,1) = {" +a +r +X +X +X +X +J +b +c +v +G +V +X +E +e +X +X +X +r +a +"} +(13,1,1) = {" +a +r +X +X +X +V +X +Z +X +X +X +u +X +X +X +X +e +Z +r +a +"} +(14,1,1) = {" +a +r +X +X +X +X +v +X +v +N +E +E +K +X +v +o +X +X +r +a +"} +(15,1,1) = {" +a +r +X +E +X +X +X +X +E +J +C +X +X +X +X +X +X +X +d +a +"} +(16,1,1) = {" +a +r +X +X +E +X +T +X +Z +X +n +v +X +z +n +X +Z +X +d +a +"} +(17,1,1) = {" +a +r +X +X +X +X +X +X +X +X +F +X +X +X +p +X +X +X +r +a +"} +(18,1,1) = {" +a +r +X +X +X +X +X +X +X +X +X +X +X +v +X +X +X +X +r +a +"} +(19,1,1) = {" +a +a +r +r +r +r +d +r +d +r +r +r +r +r +r +r +r +r +a +a +"} +(20,1,1) = {" +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +"} diff --git a/_maps/map_files/RandomRuins/SpaceRuins/debris2.dmm b/_maps/map_files/RandomRuins/SpaceRuins/debris2.dmm new file mode 100644 index 00000000000..6a6cd81f32a --- /dev/null +++ b/_maps/map_files/RandomRuins/SpaceRuins/debris2.dmm @@ -0,0 +1,631 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"a" = ( +/turf/template_noop, +/area/template_noop) +"b" = ( +/turf/simulated/floor/plating/airless, +/area/space) +"c" = ( +/turf/simulated/floor/plasteel/airless, +/area/space) +"d" = ( +/turf/simulated/wall/r_wall, +/area/space) +"e" = ( +/obj/item/stack/cable_coil/cut, +/turf/space, +/area/template_noop) +"h" = ( +/obj/structure/girder, +/turf/space, +/area/template_noop) +"j" = ( +/obj/structure/grille/broken, +/turf/space, +/area/space) +"l" = ( +/obj/structure/girder, +/turf/simulated/floor/plating, +/area/space) +"m" = ( +/obj/structure/grille/broken, +/turf/template_noop, +/area/space) +"n" = ( +/obj/item/stack/cable_coil/cut, +/turf/template_noop, +/area/space) +"o" = ( +/obj/machinery/door/airlock/command{ + max_integrity = 40 + }, +/turf/simulated/floor/plating/burnt, +/area/space) +"p" = ( +/mob/living/simple_animal/hostile/carp, +/turf/space, +/area/template_noop) +"q" = ( +/obj/structure/lattice, +/turf/space, +/area/space) +"s" = ( +/obj/item/stack/rods, +/turf/space, +/area/template_noop) +"t" = ( +/obj/structure/door_assembly/door_assembly_com, +/turf/space, +/area/template_noop) +"u" = ( +/obj/item/clothing/head/bio_hood/virology, +/turf/space, +/area/space) +"w" = ( +/obj/structure/lattice, +/turf/template_noop, +/area/space) +"x" = ( +/turf/template_noop, +/area/space) +"y" = ( +/obj/structure/lattice, +/obj/structure/door_assembly/door_assembly_vault{ + anchored = 1 + }, +/turf/simulated/floor/plating, +/area/space) +"z" = ( +/obj/item/stack/rods, +/turf/template_noop, +/area/space) +"A" = ( +/obj/structure/closet/crate, +/obj/item/reagent_containers/glass/beaker/bluespace, +/turf/simulated/floor/plasteel/airless, +/area/space) +"B" = ( +/obj/item/shard{ + icon_state = "small" + }, +/turf/space, +/area/space) +"C" = ( +/obj/item/stack/sheet/metal, +/turf/space, +/area/template_noop) +"D" = ( +/obj/effect/landmark/burnturf, +/turf/simulated/floor/plating/airless, +/area/space) +"E" = ( +/obj/item/reagent_containers/glass/beaker/large, +/turf/space, +/area/template_noop) +"F" = ( +/obj/effect/landmark/burnturf, +/turf/simulated/floor, +/area/space) +"G" = ( +/obj/structure/safe, +/obj/item/stack/sheet/mineral/bananium{ + amount = 5 + }, +/obj/item/stack/ore/bluespace_crystal/refined{ + amount = 3 + }, +/obj/item/dnainjector/comic, +/turf/simulated/floor/plasteel/airless, +/area/space) +"H" = ( +/obj/structure/table, +/obj/item/shard{ + icon_state = "medium" + }, +/turf/simulated/floor/plasteel/airless, +/area/space) +"I" = ( +/turf/space, +/area/template_noop) +"J" = ( +/mob/living/simple_animal/hostile/carp, +/turf/space, +/area/space) +"L" = ( +/obj/item/shard, +/turf/space, +/area/space) +"M" = ( +/turf/simulated/floor, +/area/space) +"N" = ( +/obj/item/clothing/suit/bio_suit/virology, +/turf/space, +/area/space) +"O" = ( +/obj/item/shard{ + icon_state = "small" + }, +/turf/space, +/area/template_noop) +"P" = ( +/obj/item/reagent_containers/spray/cleaner, +/turf/space, +/area/space) +"R" = ( +/obj/item/stack/sheet/metal, +/turf/template_noop, +/area/space) +"S" = ( +/obj/item/reagent_containers/spray/cleaner, +/turf/space, +/area/template_noop) +"T" = ( +/turf/simulated/wall, +/area/space) +"U" = ( +/obj/effect/landmark/burnturf, +/turf/simulated/floor/plasteel/airless, +/area/space) +"V" = ( +/obj/structure/lattice, +/turf/space, +/area/template_noop) +"W" = ( +/obj/effect/landmark/burnturf, +/turf/simulated/floor/plating/burnt, +/area/space) +"X" = ( +/turf/space, +/area/space) +"Y" = ( +/obj/structure/girder/reinforced, +/turf/simulated/floor/plating/damaged, +/area/space) +"Z" = ( +/obj/machinery/computer/pandemic{ + circuit = /obj/effect/decal/cleanable/shreds + }, +/turf/simulated/floor/plasteel/airless, +/area/space) + +(1,1,1) = {" +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +"} +(2,1,1) = {" +a +d +d +d +d +d +Y +x +S +I +I +I +I +I +I +C +I +I +I +a +"} +(3,1,1) = {" +a +d +G +A +U +F +d +z +T +T +T +T +o +T +I +p +O +I +I +a +"} +(4,1,1) = {" +a +Y +c +U +c +U +d +X +w +M +c +U +M +T +V +I +I +I +I +a +"} +(5,1,1) = {" +a +Y +M +F +F +q +d +z +m +F +M +F +M +T +I +I +I +I +I +a +"} +(6,1,1) = {" +a +d +d +y +d +d +Y +X +w +X +n +X +w +T +I +I +I +C +I +a +"} +(7,1,1) = {" +a +X +X +X +X +X +P +J +X +T +T +T +x +T +I +I +V +I +I +a +"} +(8,1,1) = {" +a +X +X +X +X +X +X +X +R +X +w +X +b +x +x +I +I +I +I +a +"} +(9,1,1) = {" +a +p +s +T +m +w +T +R +X +B +X +w +X +x +z +I +s +I +I +a +"} +(10,1,1) = {" +a +s +I +T +M +F +T +X +X +X +X +X +X +x +x +I +I +I +I +a +"} +(11,1,1) = {" +a +I +I +T +c +F +T +X +X +c +F +b +j +D +T +I +I +I +t +a +"} +(12,1,1) = {" +a +C +I +T +X +M +N +s +I +I +L +q +q +b +T +I +s +I +I +a +"} +(13,1,1) = {" +a +I +I +l +T +T +T +I +I +u +j +W +c +U +T +I +I +I +I +a +"} +(14,1,1) = {" +a +I +s +p +I +I +I +I +p +I +I +c +H +Z +T +I +I +I +I +a +"} +(15,1,1) = {" +a +V +I +I +s +V +C +I +I +s +h +T +T +T +T +I +I +I +I +a +"} +(16,1,1) = {" +a +I +I +E +I +I +V +I +O +I +V +I +I +I +I +I +C +I +I +a +"} +(17,1,1) = {" +a +I +I +C +I +e +I +I +I +I +I +e +I +V +I +I +I +I +I +a +"} +(18,1,1) = {" +a +I +I +I +I +I +I +h +I +I +C +I +I +I +I +I +I +I +I +a +"} +(19,1,1) = {" +a +I +I +I +I +I +I +I +I +I +I +I +I +I +C +I +I +I +I +a +"} +(20,1,1) = {" +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +"} diff --git a/_maps/map_files/RandomRuins/SpaceRuins/debris3.dmm b/_maps/map_files/RandomRuins/SpaceRuins/debris3.dmm new file mode 100644 index 00000000000..54d8725b3c4 --- /dev/null +++ b/_maps/map_files/RandomRuins/SpaceRuins/debris3.dmm @@ -0,0 +1,824 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"a" = ( +/turf/template_noop, +/area/template_noop) +"b" = ( +/obj/item/stack/rods, +/turf/simulated/floor/plating/damaged, +/area/template_noop) +"c" = ( +/obj/item/trash/popcorn, +/turf/space, +/area/template_noop) +"d" = ( +/obj/effect/spawner/random_spawners/wall_rusted_maybe, +/turf/space, +/area/template_noop) +"e" = ( +/obj/item/poster/random_contraband, +/turf/space, +/area/template_noop) +"f" = ( +/obj/structure/lattice, +/obj/item/stack/sheet/metal, +/turf/space, +/area/template_noop) +"g" = ( +/obj/item/paperplane, +/turf/space, +/area/template_noop) +"h" = ( +/obj/item/trash/can, +/turf/space, +/area/template_noop) +"i" = ( +/obj/item/stack/rods, +/turf/template_noop, +/area/template_noop) +"k" = ( +/obj/item/shard, +/turf/space, +/area/template_noop) +"l" = ( +/obj/item/stack/cable_coil{ + amount = 10 + }, +/turf/space, +/area/template_noop) +"m" = ( +/turf/simulated/wall, +/area/template_noop) +"n" = ( +/obj/item/stack/sheet/glass, +/turf/space, +/area/template_noop) +"p" = ( +/obj/random/plushie, +/turf/space, +/area/template_noop) +"q" = ( +/obj/item/stack/rods, +/obj/item/stack/sheet/metal, +/turf/space, +/area/template_noop) +"t" = ( +/obj/machinery/computer/arcade/battle, +/turf/simulated/floor/plasteel/airless, +/area/template_noop) +"u" = ( +/obj/random/tool, +/turf/space, +/area/template_noop) +"v" = ( +/obj/item/trash/syndi_cakes, +/turf/space, +/area/template_noop) +"w" = ( +/obj/item/stack/tickets, +/turf/space, +/area/template_noop) +"x" = ( +/obj/structure/bookcase/random/fiction, +/turf/simulated/floor/plating/damaged, +/area/template_noop) +"y" = ( +/obj/item/storage/pill_bottle/random_meds/labelled, +/turf/space, +/area/template_noop) +"z" = ( +/turf/simulated/floor/plating/damaged, +/area/template_noop) +"A" = ( +/turf/space, +/area/template_noop) +"B" = ( +/obj/item/stack/rods, +/turf/space, +/area/template_noop) +"D" = ( +/obj/item/paper, +/obj/item/paper, +/turf/space, +/area/template_noop) +"F" = ( +/obj/random/tool, +/turf/simulated/floor/plating/damaged, +/area/template_noop) +"G" = ( +/obj/item/poster/random_official, +/turf/space, +/area/template_noop) +"H" = ( +/obj/item/stack/sheet/wood, +/turf/space, +/area/template_noop) +"I" = ( +/obj/item/stack/rods, +/obj/item/stack/rods, +/turf/space, +/area/template_noop) +"J" = ( +/obj/item/trash/pistachios, +/turf/space, +/area/template_noop) +"K" = ( +/obj/structure/lattice, +/obj/structure/girder, +/turf/space, +/area/template_noop) +"L" = ( +/obj/structure/girder, +/turf/space, +/area/template_noop) +"M" = ( +/obj/item/stack/sheet/metal, +/turf/space, +/area/template_noop) +"O" = ( +/obj/structure/girder/displaced, +/turf/space, +/area/template_noop) +"S" = ( +/obj/structure/lattice, +/turf/space, +/area/template_noop) +"U" = ( +/obj/item/stack/sheet/wood, +/obj/item/stack/sheet/wood, +/turf/space, +/area/template_noop) +"V" = ( +/obj/item/circuitboard/arcade, +/turf/space, +/area/template_noop) +"W" = ( +/obj/item/stack/tickets, +/obj/item/stack/tickets, +/obj/item/stack/tickets, +/turf/space, +/area/template_noop) +"Z" = ( +/obj/item/paper, +/turf/space, +/area/template_noop) + +(1,1,1) = {" +a +a +a +i +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +"} +(2,1,1) = {" +a +a +a +a +a +a +a +a +a +a +i +a +a +a +a +a +i +a +a +a +"} +(3,1,1) = {" +a +a +A +A +A +A +A +A +A +A +A +A +A +A +A +A +A +A +a +a +"} +(4,1,1) = {" +a +a +A +B +A +B +A +A +A +A +A +A +A +A +B +B +A +A +a +a +"} +(5,1,1) = {" +i +a +A +A +A +A +A +w +A +M +A +A +A +A +A +A +A +A +a +i +"} +(6,1,1) = {" +a +a +A +A +I +A +B +A +A +B +B +M +A +A +M +A +A +A +a +a +"} +(7,1,1) = {" +a +a +A +A +k +A +A +O +A +A +A +A +m +A +w +A +M +A +a +a +"} +(8,1,1) = {" +a +a +A +B +A +M +A +A +H +A +G +n +m +A +A +B +A +A +a +a +"} +(9,1,1) = {" +a +a +A +A +m +A +w +A +M +S +A +A +d +B +M +A +O +A +a +a +"} +(10,1,1) = {" +a +a +A +w +A +A +Z +A +W +B +S +h +M +L +A +c +A +A +a +a +"} +(11,1,1) = {" +a +i +B +w +A +S +A +F +A +A +S +A +Z +A +A +A +M +A +a +a +"} +(12,1,1) = {" +a +a +A +A +A +A +H +L +S +m +m +b +A +A +Z +w +B +A +i +a +"} +(13,1,1) = {" +a +a +A +A +B +O +A +B +A +M +A +D +K +z +S +H +B +A +a +a +"} +(14,1,1) = {" +a +a +A +n +A +y +f +B +A +z +B +A +m +t +A +A +A +A +a +a +"} +(15,1,1) = {" +a +a +A +A +z +H +A +A +A +S +A +q +z +z +A +A +O +A +a +a +"} +(16,1,1) = {" +a +a +A +A +S +A +S +U +B +B +A +A +S +A +M +B +u +A +a +i +"} +(17,1,1) = {" +a +a +A +M +H +w +Z +B +x +S +B +S +A +k +J +A +A +A +a +a +"} +(18,1,1) = {" +a +a +B +A +A +A +A +A +A +w +B +z +A +O +A +M +A +A +a +a +"} +(19,1,1) = {" +i +a +A +A +M +z +S +w +S +M +A +m +p +A +A +B +A +A +a +a +"} +(20,1,1) = {" +a +a +A +B +A +O +H +v +A +V +H +A +B +L +A +M +A +w +a +a +"} +(21,1,1) = {" +a +a +A +A +A +A +e +M +A +w +Z +w +B +A +w +A +A +A +a +a +"} +(22,1,1) = {" +a +a +A +A +M +O +m +m +L +A +B +A +A +q +A +A +A +A +a +a +"} +(23,1,1) = {" +a +a +A +B +k +A +B +A +B +g +n +A +O +A +A +B +B +A +a +a +"} +(24,1,1) = {" +a +a +A +A +A +A +A +M +A +A +l +A +w +A +A +A +A +A +a +a +"} +(25,1,1) = {" +a +a +A +w +B +A +A +A +A +A +A +B +A +A +A +w +A +A +a +a +"} +(26,1,1) = {" +a +a +A +A +A +A +A +A +B +A +B +A +A +B +A +B +A +A +a +a +"} +(27,1,1) = {" +a +a +B +A +w +A +B +A +w +A +B +A +A +A +A +A +A +w +a +a +"} +(28,1,1) = {" +a +a +A +A +A +A +A +A +A +w +A +A +A +A +A +A +A +A +a +i +"} +(29,1,1) = {" +i +a +a +a +a +a +a +i +a +a +a +a +a +a +a +a +a +a +a +a +"} +(30,1,1) = {" +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +a +i +a +a +"} diff --git a/_maps/map_files/RandomRuins/SpaceRuins/deepstorage.dmm b/_maps/map_files/RandomRuins/SpaceRuins/deepstorage.dmm index 8bb87d2026e..7d0db9f8eb3 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/deepstorage.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/deepstorage.dmm @@ -1,7 +1,7 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "aa" = ( -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "ab" = ( /turf/simulated/mineral/random/low_chance, /area/ruin/unpowered) diff --git a/_maps/map_files/RandomRuins/SpaceRuins/derelict1.dmm b/_maps/map_files/RandomRuins/SpaceRuins/derelict1.dmm index 8b094749545..a78a8e88151 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/derelict1.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/derelict1.dmm @@ -1,11 +1,11 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "a" = ( -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "b" = ( /obj/structure/lattice, -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "c" = ( /turf/simulated/wall, /area/ruin/unpowered) diff --git a/_maps/map_files/RandomRuins/SpaceRuins/derelict2.dmm b/_maps/map_files/RandomRuins/SpaceRuins/derelict2.dmm index 95ad761e62c..f3b7a74c0b3 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/derelict2.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/derelict2.dmm @@ -1,14 +1,14 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "a" = ( -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "b" = ( /obj/structure/window/reinforced{ tag = "icon-rwindow (EAST)"; icon_state = "rwindow"; dir = 4 }, -/turf/space, +/turf/template_noop, /area/space/nearstation) "c" = ( /obj/machinery/door/airlock/external, @@ -20,7 +20,7 @@ icon_state = "rwindow"; dir = 8 }, -/turf/space, +/turf/template_noop, /area/space/nearstation) "e" = ( /obj/structure/window/reinforced{ @@ -64,7 +64,7 @@ /area/ruin/powered) "k" = ( /obj/structure/window/reinforced, -/turf/space, +/turf/template_noop, /area/space/nearstation) "l" = ( /obj/structure/window/reinforced, @@ -112,7 +112,7 @@ icon_state = "rwindow"; dir = 1 }, -/turf/space, +/turf/template_noop, /area/space/nearstation) "q" = ( /obj/machinery/light/small{ diff --git a/_maps/map_files/RandomRuins/SpaceRuins/derelict3.dmm b/_maps/map_files/RandomRuins/SpaceRuins/derelict3.dmm index be313cd7770..56cd71d71c6 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/derelict3.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/derelict3.dmm @@ -1,7 +1,7 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "a" = ( -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "b" = ( /turf/simulated/floor/plating/airless, /area/ruin/unpowered) @@ -10,12 +10,12 @@ /area/ruin/unpowered) "d" = ( /obj/structure/lattice, -/turf/space, +/turf/template_noop, /area/space/nearstation) "e" = ( /obj/structure/lattice, /obj/structure/lattice, -/turf/space, +/turf/template_noop, /area/space/nearstation) (1,1,1) = {" diff --git a/_maps/map_files/RandomRuins/SpaceRuins/derelict4.dmm b/_maps/map_files/RandomRuins/SpaceRuins/derelict4.dmm index 1c7d14bd6fa..ce660407cca 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/derelict4.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/derelict4.dmm @@ -1,7 +1,7 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "a" = ( -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "b" = ( /turf/simulated/mineral, /area/ruin/unpowered) diff --git a/_maps/map_files/RandomRuins/SpaceRuins/derelict5.dmm b/_maps/map_files/RandomRuins/SpaceRuins/derelict5.dmm index ff8a5ac4cc2..fe74e127741 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/derelict5.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/derelict5.dmm @@ -1,7 +1,7 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "a" = ( -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "b" = ( /turf/simulated/mineral, /area/ruin/unpowered) diff --git a/_maps/map_files/RandomRuins/SpaceRuins/emptyshell.dmm b/_maps/map_files/RandomRuins/SpaceRuins/emptyshell.dmm index 4c33095219a..0f30191dfb6 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/emptyshell.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/emptyshell.dmm @@ -1,11 +1,11 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "a" = ( -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "b" = ( /obj/structure/lattice, -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "c" = ( /turf/simulated/wall/r_wall, /area/ruin/unpowered) diff --git a/_maps/map_files/RandomRuins/SpaceRuins/gasthelizards.dmm b/_maps/map_files/RandomRuins/SpaceRuins/gasthelizards.dmm index 0f7c36fe634..a8b394a6421 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/gasthelizards.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/gasthelizards.dmm @@ -1,11 +1,11 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "a" = ( -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "b" = ( /obj/structure/lattice, -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "c" = ( /turf/simulated/wall, /area/ruin/unpowered) diff --git a/_maps/map_files/RandomRuins/SpaceRuins/intactemptyship.dmm b/_maps/map_files/RandomRuins/SpaceRuins/intactemptyship.dmm index a993ab96190..ad1ca6cf96a 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/intactemptyship.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/intactemptyship.dmm @@ -1,9 +1,9 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "a" = ( -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "b" = ( -/turf/space, +/turf/template_noop, /turf/simulated/shuttle/wall{ dir = 8; icon_state = "diagonalWall3" @@ -15,7 +15,7 @@ }, /area/ruin/powered) "d" = ( -/turf/space, +/turf/template_noop, /turf/simulated/shuttle/wall{ dir = 2; icon_state = "diagonalWall3" @@ -198,7 +198,7 @@ }, /area/ruin/powered) "A" = ( -/turf/space, +/turf/template_noop, /turf/simulated/shuttle/wall{ dir = 1; icon_state = "diagonalWall3" @@ -212,7 +212,7 @@ }, /area/ruin/powered) "C" = ( -/turf/space, +/turf/template_noop, /turf/simulated/shuttle/wall{ dir = 4; icon_state = "diagonalWall3" diff --git a/_maps/map_files/RandomRuins/SpaceRuins/listeningpost.dmm b/_maps/map_files/RandomRuins/SpaceRuins/listeningpost.dmm index 17d49d666bc..5607083f0a8 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/listeningpost.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/listeningpost.dmm @@ -1,7 +1,7 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "a" = ( -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "b" = ( /turf/simulated/mineral, /area/ruin/powered) @@ -73,8 +73,7 @@ }, /mob/living/simple_animal/hostile/syndicate{ desc = "A weary looking syndicate operative."; - environment_smash = 0; - faction = "syndicate" + environment_smash = 0 }, /turf/simulated/floor/plasteel, /area/ruin/powered) @@ -100,6 +99,12 @@ /obj/item/tank/air, /turf/simulated/floor/plasteel, /area/ruin/powered) +"u" = ( +/obj/machinery/tcomms/relay/ruskie{ + network_id = "LISTENINGOUTPOST-RELAY" + }, +/turf/simulated/floor/plasteel, +/area/ruin/powered) "w" = ( /obj/machinery/light/small, /turf/simulated/floor/plasteel, @@ -923,7 +928,7 @@ b f f f -c +f f D m @@ -965,7 +970,7 @@ f f p Y -f +u f j i diff --git a/_maps/map_files/RandomRuins/SpaceRuins/mechtransport.dmm b/_maps/map_files/RandomRuins/SpaceRuins/mechtransport.dmm index b4e36942d6a..99b254e2684 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/mechtransport.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/mechtransport.dmm @@ -1,7 +1,7 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "a" = ( -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "b" = ( /turf/simulated/shuttle/wall{ tag = "icon-swall_s6"; @@ -168,7 +168,7 @@ /area/ruin/powered) "D" = ( /obj/structure/lattice, -/turf/space, +/turf/template_noop, /area/space/nearstation) "E" = ( /obj/item/stack/rods, @@ -202,7 +202,7 @@ /area/ruin/powered) "K" = ( /obj/item/stack/sheet/metal, -/turf/space, +/turf/template_noop, /area/space/nearstation) "L" = ( /obj/structure/mecha_wreckage/gygax, @@ -228,7 +228,7 @@ /area/ruin/powered) "P" = ( /obj/item/stack/rods, -/turf/space, +/turf/template_noop, /area/space/nearstation) "Q" = ( /turf/simulated/shuttle/wall{ diff --git a/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm b/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm index fa38a1a647b..93dc1fffed4 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm @@ -1,7 +1,7 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "aa" = ( -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "ab" = ( /obj/structure/lattice, /obj/structure/cable{ @@ -10,7 +10,7 @@ icon_state = "2-4"; tag = "" }, -/turf/space, +/turf/template_noop, /area/space/nearstation) "ac" = ( /obj/structure/lattice, @@ -20,7 +20,7 @@ icon_state = "4-8"; tag = "" }, -/turf/space, +/turf/template_noop, /area/space/nearstation) "ad" = ( /obj/structure/lattice, @@ -29,7 +29,7 @@ d2 = 8; icon_state = "2-8" }, -/turf/space, +/turf/template_noop, /area/space/nearstation) "ae" = ( /obj/structure/lattice, @@ -38,7 +38,7 @@ dir = 2; icon_state = "coil_red2" }, -/turf/space, +/turf/template_noop, /area/space/nearstation) "af" = ( /obj/structure/lattice, @@ -48,7 +48,7 @@ icon_state = "1-8"; tag = "" }, -/turf/space, +/turf/template_noop, /area/space/nearstation) "ag" = ( /turf/simulated/wall, @@ -65,7 +65,7 @@ d2 = 2; icon_state = "1-2" }, -/turf/space, +/turf/template_noop, /area/space/nearstation) "aj" = ( /turf/unsimulated/floor/plating/airless, @@ -154,11 +154,11 @@ /area/ruin/onehalf/drone_bay) "aw" = ( /obj/structure/lattice, -/turf/space, +/turf/template_noop, /area/space/nearstation) "ax" = ( /obj/structure/lattice, -/turf/space, +/turf/template_noop, /area/ruin/onehalf/hallway) "ay" = ( /obj/structure/table_frame, @@ -224,7 +224,7 @@ /area/ruin/onehalf/drone_bay) "aH" = ( /obj/item/stack/rods, -/turf/space, +/turf/template_noop, /area/ruin/onehalf/hallway) "aI" = ( /obj/effect/landmark/damageturf, @@ -805,7 +805,7 @@ /area/ruin/onehalf/bridge) "bU" = ( /obj/item/stack/sheet/metal, -/turf/space, +/turf/template_noop, /area/space/nearstation) "bV" = ( /obj/structure/disposalpipe/segment, @@ -914,7 +914,7 @@ dir = 4 }, /obj/item/stack/rods, -/turf/space, +/turf/template_noop, /area/ruin/onehalf/hallway) "cn" = ( /obj/structure/lattice, @@ -925,7 +925,7 @@ tag = "icon-small"; icon_state = "small" }, -/turf/space, +/turf/template_noop, /area/space/nearstation) "co" = ( /obj/structure/grille, @@ -1008,7 +1008,7 @@ /area/ruin/onehalf/bridge) "cv" = ( /obj/item/stack/rods, -/turf/space, +/turf/template_noop, /area/space/nearstation) "cw" = ( /turf/unsimulated/floor/plating/airless, @@ -1016,7 +1016,7 @@ "cx" = ( /obj/structure/lattice, /obj/item/stack/sheet/plasteel, -/turf/space, +/turf/template_noop, /area/space/nearstation) "cy" = ( /obj/structure/lattice, @@ -1024,7 +1024,7 @@ tag = "icon-medium"; icon_state = "medium" }, -/turf/space, +/turf/template_noop, /area/ruin/onehalf/hallway) "cz" = ( /obj/structure/grille/broken, @@ -1071,10 +1071,10 @@ /area/ruin/onehalf/bridge) "cE" = ( /obj/item/stack/tile/wood, -/turf/space, +/turf/template_noop, /area/space/nearstation) "cF" = ( -/turf/space, +/turf/template_noop, /area/ruin/onehalf/hallway) "cG" = ( /obj/structure/lattice, @@ -1083,7 +1083,7 @@ d2 = 8; icon_state = "2-8" }, -/turf/space, +/turf/template_noop, /area/ruin/onehalf/hallway) "cH" = ( /obj/structure/lattice, @@ -1097,7 +1097,7 @@ icon_state = "pipe-b"; dir = 8 }, -/turf/space, +/turf/template_noop, /area/ruin/onehalf/hallway) "cI" = ( /obj/machinery/door/airlock/command/glass{ @@ -1149,7 +1149,7 @@ dir = 2; icon_state = "coil_red2" }, -/turf/space, +/turf/template_noop, /area/ruin/onehalf/hallway) "cQ" = ( /obj/machinery/light{ @@ -1160,7 +1160,7 @@ /area/ruin/onehalf/bridge) "cR" = ( /obj/item/stack/sheet/plasteel, -/turf/space, +/turf/template_noop, /area/space/nearstation) "cS" = ( /obj/structure/lattice, @@ -1169,7 +1169,7 @@ d2 = 2; icon_state = "1-2" }, -/turf/space, +/turf/template_noop, /area/ruin/onehalf/hallway) "cU" = ( /obj/structure/grille, @@ -1221,7 +1221,7 @@ d2 = 8; icon_state = "2-8" }, -/turf/space, +/turf/template_noop, /area/space/nearstation) "db" = ( /obj/structure/table, @@ -1256,7 +1256,7 @@ d2 = 2; icon_state = "1-2" }, -/turf/space, +/turf/template_noop, /area/space/nearstation) "dg" = ( /obj/structure/girder/reinforced, @@ -1350,7 +1350,7 @@ tag = "icon-medium"; icon_state = "medium" }, -/turf/space, +/turf/template_noop, /area/space/nearstation) "dp" = ( /obj/structure/lattice, @@ -1366,7 +1366,7 @@ icon_state = "1-4" }, /obj/item/stack/rods, -/turf/space, +/turf/template_noop, /area/space/nearstation) "dq" = ( /obj/structure/lattice, @@ -1382,7 +1382,7 @@ icon_state = "1-8"; tag = "" }, -/turf/space, +/turf/template_noop, /area/space/nearstation) (1,1,1) = {" diff --git a/_maps/map_files/RandomRuins/SpaceRuins/spacebar.dmm b/_maps/map_files/RandomRuins/SpaceRuins/spacebar.dmm index 108c8103975..1f9725a3d03 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/spacebar.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/spacebar.dmm @@ -1,7 +1,7 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "aa" = ( -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "ab" = ( /turf/simulated/mineral, /area/space/nearstation) diff --git a/_maps/map_files/RandomRuins/SpaceRuins/syndiecakesfactory.dmm b/_maps/map_files/RandomRuins/SpaceRuins/syndiecakesfactory.dmm new file mode 100644 index 00000000000..ec11a787510 --- /dev/null +++ b/_maps/map_files/RandomRuins/SpaceRuins/syndiecakesfactory.dmm @@ -0,0 +1,2284 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"aM" = ( +/obj/item/stack/rods, +/obj/item/stack/sheet/metal, +/turf/template_noop, +/area/space) +"bb" = ( +/obj/structure/table/reinforced, +/obj/item/stack/sheet/mineral/plasma, +/obj/item/stack/sheet/mineral/plasma, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"bk" = ( +/obj/structure/grille/broken, +/turf/template_noop, +/area/space) +"cc" = ( +/obj/item/reagent_containers/food/snacks/syndicake, +/obj/item/reagent_containers/food/snacks/syndicake, +/obj/item/reagent_containers/food/snacks/syndicake, +/turf/simulated/floor/plating, +/area/space) +"dy" = ( +/obj/structure/lattice, +/turf/unsimulated, +/area/template_noop) +"es" = ( +/obj/structure/cable{ + d1 = 1; + d2 = 8; + icon_state = "1-8" + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"eY" = ( +/turf/simulated/floor/plating, +/area/ruin) +"fq" = ( +/obj/machinery/autolathe, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"fU" = ( +/obj/machinery/door/airlock/mining/glass{ + locked = 1; + name = "Egg processing" + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"fY" = ( +/obj/item/stack/sheet/metal, +/turf/template_noop, +/area/template_noop) +"hm" = ( +/obj/structure/cable{ + d1 = 1; + d2 = 2; + icon_state = "1-2" + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"ho" = ( +/turf/space, +/area/ruin/space) +"hs" = ( +/turf/unsimulated/wall/fakeglass{ + dir = 4 + }, +/area/ruin/unpowered) +"iK" = ( +/obj/item/stack/sheet/metal, +/obj/item/stack/sheet/metal, +/turf/space, +/area/ruin/space) +"jf" = ( +/obj/item/trash/syndi_cakes, +/turf/template_noop, +/area/template_noop) +"jv" = ( +/obj/item/stack/cable_coil/cut, +/turf/template_noop, +/area/space) +"jR" = ( +/obj/structure/table/reinforced, +/obj/item/storage/fancy/cigarettes/cigpack_random, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"ke" = ( +/obj/structure/lattice, +/turf/space, +/area/ruin) +"kh" = ( +/obj/structure/lattice, +/obj/item/stack/rods, +/turf/template_noop, +/area/space) +"ky" = ( +/obj/structure/cable{ + d1 = 1; + d2 = 2; + icon_state = "1-2"; + tag = "" + }, +/turf/simulated/wall, +/area/ruin/unpowered) +"ls" = ( +/obj/structure/lattice, +/turf/template_noop, +/area/space) +"lK" = ( +/obj/machinery/power/apc/noalarm{ + area = null; + dir = 8; + keep_preset_name = 1; + light_power = 0; + locked = 0; + max_integrity = 0; + name = "Manufacturing control room APC"; + pixel_y = -24; + shorted = 1; + start_charge = -1 + }, +/obj/structure/cable{ + d2 = 4; + icon_state = "0-4" + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"mc" = ( +/obj/structure/grille/broken, +/turf/space, +/area/ruin/space) +"mx" = ( +/obj/item/trash/syndi_cakes, +/turf/template_noop, +/area/space) +"nV" = ( +/obj/machinery/conveyor/east{ + id = null + }, +/turf/simulated/floor/plasteel, +/area/space) +"ob" = ( +/obj/structure/lattice, +/turf/template_noop, +/area/ruin/unpowered) +"om" = ( +/obj/item/reagent_containers/food/snacks/syndicake, +/obj/item/reagent_containers/food/snacks/syndicake, +/obj/item/reagent_containers/food/snacks/syndicake, +/obj/item/reagent_containers/food/snacks/syndicake, +/obj/item/reagent_containers/food/snacks/syndicake, +/obj/item/reagent_containers/food/snacks/syndicake, +/turf/simulated/floor/plasteel, +/area/space) +"oJ" = ( +/obj/item/stack/rods, +/turf/template_noop, +/area/space) +"oO" = ( +/obj/machinery/door/airlock/mining/glass{ + name = "Nexus" + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"pb" = ( +/obj/structure/lattice/catwalk, +/turf/template_noop, +/area/space) +"pd" = ( +/turf/template_noop, +/area/space) +"pp" = ( +/turf/unsimulated, +/area/space) +"pR" = ( +/obj/machinery/conveyor/northeast{ + id = null + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"qS" = ( +/obj/machinery/door/airlock/mining/glass{ + name = "EVA Storage" + }, +/obj/structure/cable{ + d1 = 4; + d2 = 8; + icon_state = "4-8"; + pixel_y = 0; + tag = "" + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"rJ" = ( +/obj/structure/lattice, +/turf/space, +/area/ruin/space) +"rL" = ( +/obj/item/reagent_containers/food/snacks/syndicake, +/turf/simulated/floor/plasteel/airless, +/area/ruin) +"rU" = ( +/obj/machinery/space_heater, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"sd" = ( +/turf/simulated/floor/plating, +/area/space) +"sN" = ( +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"ub" = ( +/obj/item/stack/rods, +/turf/space, +/area/space) +"uA" = ( +/obj/structure/table/reinforced, +/obj/item/reagent_containers/food/snacks/syndicake, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"uF" = ( +/obj/machinery/conveyor/east{ + id = null + }, +/obj/machinery/gibber/autogibber, +/obj/structure/plasticflaps{ + canmove = 0 + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"wB" = ( +/obj/item/trash/syndi_cakes, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"xT" = ( +/turf/unsimulated/floor/plating/airless, +/area/space) +"yU" = ( +/obj/item/stack/sheet/metal, +/obj/item/stack/sheet/metal, +/turf/space, +/area/space) +"zd" = ( +/obj/machinery/power/apc/noalarm{ + area = null; + dir = 8; + keep_preset_name = 1; + locked = 0; + name = "EVA room APC"; + pixel_x = -24; + start_charge = -1 + }, +/obj/structure/cable{ + d2 = 4; + icon_state = "0-4" + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"zo" = ( +/turf/simulated/wall, +/area/space) +"zt" = ( +/obj/item/stack/sheet/metal, +/turf/template_noop, +/area/space) +"zF" = ( +/turf/unsimulated/wall/fakeglass{ + dir = 8 + }, +/area/ruin/unpowered) +"zP" = ( +/obj/structure/rack{ + dir = 4 + }, +/obj/random/tool, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"zY" = ( +/obj/structure/table/reinforced, +/obj/machinery/light, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"AH" = ( +/obj/structure/lattice, +/obj/item/stack/sheet/metal, +/turf/template_noop, +/area/template_noop) +"AJ" = ( +/obj/effect/spawner/random_spawners/wall_rusted_probably, +/turf/simulated/wall, +/area/space) +"BG" = ( +/obj/machinery/door/airlock/mining/glass{ + locked = 1; + name = "Manufacturing Control Room" + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"BI" = ( +/obj/structure/reagent_dispensers/fueltank, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"Cp" = ( +/obj/structure/cable{ + d1 = 1; + d2 = 2; + icon_state = "1-2"; + tag = "" + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"CY" = ( +/obj/item/stack/rods, +/turf/template_noop, +/area/template_noop) +"Da" = ( +/turf/space, +/area/space) +"Dz" = ( +/mob/living/simple_animal/pet/dog/corgi, +/obj/machinery/conveyor/east{ + id = null + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"Ej" = ( +/obj/structure/closet/emcloset, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"EJ" = ( +/turf/simulated/wall, +/area/ruin/unpowered) +"Fw" = ( +/obj/item/stack/cable_coil/cut, +/turf/template_noop, +/area/template_noop) +"FO" = ( +/obj/machinery/suit_storage_unit/syndicate, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"Gm" = ( +/obj/structure/cable{ + d1 = 4; + d2 = 8; + icon_state = "4-8"; + pixel_y = 0; + tag = "" + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"GB" = ( +/mob/living/simple_animal/pet/dog/corgi, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"Hx" = ( +/mob/living/simple_animal/pet/dog/corgi, +/mob/living/simple_animal/pet/dog/corgi, +/obj/machinery/conveyor/east{ + id = null + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"Hy" = ( +/turf/template_noop, +/area/template_noop) +"HQ" = ( +/obj/structure/table/reinforced, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"Ic" = ( +/turf/simulated/floor/plating/burnt, +/area/ruin) +"Id" = ( +/obj/effect/spawner/random_spawners/oil_maybe, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"IB" = ( +/obj/structure/lattice, +/turf/space, +/area/ruin/unpowered) +"JI" = ( +/obj/effect/spawner/random_spawners/syndicate/loot, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"Ki" = ( +/obj/structure/lattice, +/turf/template_noop, +/area/template_noop) +"Kr" = ( +/obj/structure/girder, +/turf/simulated/floor/plating, +/area/ruin/unpowered) +"KD" = ( +/turf/simulated/floor/plating, +/area/ruin/unpowered) +"KS" = ( +/turf/unsimulated/floor/plating/airless, +/area/ruin) +"Le" = ( +/obj/structure/cable{ + d2 = 4; + icon_state = "0-4" + }, +/obj/machinery/power/port_gen/pacman, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"Mi" = ( +/turf/unsimulated, +/area/template_noop) +"Mz" = ( +/turf/simulated/floor/plasteel, +/area/ruin) +"Nw" = ( +/obj/machinery/power/smes, +/obj/structure/cable/blue{ + d2 = 2; + icon_state = "0-2" + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"NQ" = ( +/obj/structure/lattice, +/turf/space, +/area/space) +"OA" = ( +/obj/structure/computerframe, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"OK" = ( +/obj/item/reagent_containers/food/snacks/syndicake, +/turf/space, +/area/space) +"OU" = ( +/turf/simulated/floor/plasteel/airless, +/area/ruin) +"Qv" = ( +/obj/machinery/light{ + dir = 8 + }, +/obj/item/trash/syndi_cakes, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"QF" = ( +/obj/machinery/conveyor/east{ + dir = 2; + id = null + }, +/turf/simulated/floor/plasteel, +/area/ruin) +"QI" = ( +/obj/effect/spawner/random_spawners/wall_rusted_probably, +/turf/simulated/wall, +/area/ruin) +"Ra" = ( +/obj/machinery/power/terminal{ + dir = 4 + }, +/obj/structure/cable{ + d2 = 8; + icon_state = "0-8" + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"Rg" = ( +/obj/machinery/door/airlock/mining/glass{ + locked = 1; + max_integrity = 300000; + name = "Corgi processing"; + normal_integrity = 300000 + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"Ry" = ( +/obj/item/stack/cable_coil/random, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"RB" = ( +/mob/living/simple_animal/hostile/alien/sentinel{ + animal_species = /mob/living/simple_animal/pet/dog; + attack_sound = 'sound/weapons/bite.ogg'; + attacktext = "bites"; + damage_coeff = list("brute" = 1, "fire" = 1, "tox" = 1, "clone" = 1, "stamina" = 1, "oxy" = 1); + death_sound = null; + deathmessage = ""; + desc = "This is no longer a goodboy. Not anymore. He has seen too much."; + icon = 'icons/mob/pets.dmi'; + icon_living = "corgi"; + icon_state = "corgi"; + name = "angry corgi"; + retreat_distance = 2 + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"Tj" = ( +/obj/structure/table/reinforced, +/obj/item/storage/toolbox/syndicate, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"Tt" = ( +/obj/machinery/door/airlock/external, +/turf/simulated/floor/plating, +/area/ruin/powered) +"TM" = ( +/obj/structure/chair/office/dark{ + dir = 4; + icon_state = "officechair_dark"; + tag = "icon-officechair_dark (EAST)" + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"TT" = ( +/obj/structure/cable{ + d1 = 1; + d2 = 8; + icon_state = "1-8"; + tag = "" + }, +/obj/structure/cable{ + d1 = 1; + d2 = 4; + icon_state = "1-4"; + tag = "90Curve" + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"Uq" = ( +/obj/machinery/conveyor/east{ + id = null + }, +/turf/simulated/floor/plasteel, +/area/ruin) +"UC" = ( +/obj/machinery/tcomms/relay/ruskie{ + network_id = "SYNDICAKES-FACTORY" + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"UR" = ( +/obj/item/trash/syndi_cakes, +/turf/space, +/area/space) +"Vf" = ( +/obj/machinery/light{ + dir = 8 + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"Vt" = ( +/obj/machinery/conveyor/north/ccw{ + id = null + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"VH" = ( +/obj/structure/lattice, +/obj/random/tool, +/turf/space, +/area/space) +"VR" = ( +/obj/structure/lattice, +/turf/unsimulated, +/area/space) +"WL" = ( +/turf/space, +/area/ruin/unpowered) +"Xd" = ( +/obj/structure/cable{ + d1 = 2; + d2 = 8; + icon_state = "2-8" + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"XZ" = ( +/obj/machinery/light/small{ + dir = 1 + }, +/obj/structure/dispenser/oxygen, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"YR" = ( +/obj/machinery/light{ + dir = 4 + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"YU" = ( +/obj/structure/chair/office/dark, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"Zs" = ( +/obj/machinery/conveyor/east{ + id = null + }, +/turf/simulated/floor/plasteel, +/area/ruin/unpowered) +"Zt" = ( +/obj/machinery/conveyor/east{ + dir = 2; + id = null + }, +/turf/simulated/floor/plasteel, +/area/space) + +(1,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(2,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(3,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +ob +ob +ob +ob +ob +ob +EJ +EJ +EJ +EJ +EJ +EJ +EJ +EJ +Ki +Ki +Ki +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(4,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +EJ +EJ +EJ +EJ +EJ +EJ +EJ +Le +Vf +zd +rU +sN +FO +EJ +EJ +EJ +pb +pd +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(5,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +EJ +JI +GB +Vf +sN +sN +EJ +Ra +sN +Gm +sN +sN +sN +Tt +KD +Tt +pb +pb +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(6,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +EJ +sN +Hx +GB +Dz +sN +EJ +Nw +hm +TT +Id +sN +Ej +EJ +EJ +EJ +pb +pd +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(7,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +EJ +sN +Dz +sN +Dz +sN +EJ +UC +sN +Gm +sN +sN +zY +EJ +pd +pd +ls +pd +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(8,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +EJ +sN +Zs +sN +Zs +sN +EJ +fq +sN +Gm +sN +YU +OA +EJ +pd +pd +ls +pd +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(9,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +EJ +sN +Zs +sN +Zs +Id +EJ +sN +GB +Gm +TM +sN +sN +EJ +pd +pd +ls +pd +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(10,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +EJ +pR +Vt +Vt +Vt +sN +EJ +XZ +BI +Gm +uA +OA +jR +EJ +pd +pd +ls +pd +pd +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(11,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +EJ +Zs +EJ +EJ +EJ +Rg +EJ +EJ +EJ +qS +EJ +EJ +EJ +EJ +EJ +EJ +EJ +EJ +pd +pd +pd +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(12,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +EJ +Zs +zF +TM +Qv +lK +EJ +sN +Vf +Gm +sN +sN +Ry +Kr +OU +OU +OU +EJ +pd +pd +pd +OK +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(13,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +EJ +Zs +hs +Tj +zP +Xd +ky +Cp +Cp +es +sN +rJ +rJ +Kr +rL +eY +OU +EJ +pd +pd +pd +pd +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(14,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +EJ +Zs +EJ +sN +wB +sN +BG +sN +sN +sN +sN +sN +sN +oO +OU +eY +eY +EJ +pd +pd +pd +pd +oJ +Hy +Hy +Hy +Hy +Hy +fY +Hy +Hy +Hy +Hy +"} +(15,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +EJ +Zs +zF +TM +RB +wB +EJ +IB +sN +sN +sN +sN +sN +EJ +eY +eY +rJ +EJ +pd +pd +mx +pd +pd +pd +Hy +fY +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(16,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +EJ +Zs +hs +bb +OA +sN +EJ +WL +IB +sN +YR +HQ +HQ +EJ +OU +eY +rJ +EJ +zt +oJ +pd +pd +pd +jv +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(17,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +EJ +uF +EJ +EJ +EJ +fU +EJ +EJ +EJ +oO +EJ +EJ +EJ +EJ +OU +eY +OK +Da +pd +pd +NQ +zt +pd +pd +pd +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(18,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +VR +Uq +OU +OU +KS +KS +Mz +ho +OU +OU +OU +OU +ho +iK +eY +Da +OK +OK +pd +pd +NQ +zo +pd +pd +pd +pd +OK +Hy +Hy +fY +Hy +Hy +Hy +"} +(19,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +pd +rJ +rJ +rJ +KS +rJ +KS +rJ +Ic +Ic +ub +NQ +OU +eY +NQ +NQ +Da +OK +yU +Da +NQ +AJ +pd +OK +pd +pd +pd +Hy +Hy +Hy +Hy +Hy +Hy +"} +(20,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +pd +nV +xT +mc +KS +mc +KS +KS +Da +NQ +Da +NQ +Da +Da +UR +ub +Da +Da +pd +pd +NQ +NQ +pd +pd +pd +zt +pd +pd +Hy +Hy +Hy +Hy +Hy +"} +(21,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Ki +pp +pd +Zt +rJ +Zt +Zt +NQ +Ic +Da +Da +Da +Da +OK +Da +Da +OK +OK +Da +pd +NQ +Da +Da +pd +pd +pd +pd +pd +pd +pd +Hy +Ki +Hy +Hy +"} +(22,1,1) = {" +Hy +Hy +CY +Hy +Hy +Hy +Hy +pp +pd +pd +zo +pd +zo +zo +NQ +ub +Da +Da +Da +Da +Da +Da +Da +Da +Da +ub +zt +pd +pd +pd +mx +pd +pd +pd +pd +OK +Hy +Hy +Hy +Hy +"} +(23,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Ki +Mi +dy +VR +pd +pd +pd +pd +pd +zt +pd +pd +Ic +OU +OU +Da +NQ +pd +pd +pd +pd +pd +pd +oJ +pd +zt +ls +pd +pd +pd +Hy +Hy +Hy +Hy +"} +(24,1,1) = {" +Hy +Hy +Hy +Hy +Ki +Hy +Hy +Hy +Ki +Hy +pd +oJ +OK +pd +pd +bk +NQ +QF +QF +QF +QF +Da +sd +oJ +pd +pd +pd +cc +VH +pd +pd +pd +pd +pd +pd +ls +Hy +Hy +Hy +Hy +"} +(25,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +CY +Hy +Hy +Hy +Hy +pd +pd +ke +OK +pd +zo +NQ +NQ +QI +NQ +NQ +pd +pd +zt +NQ +NQ +om +zo +pd +OK +pd +oJ +pd +pd +zt +Hy +Hy +Hy +Hy +"} +(26,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Ki +Hy +Hy +Hy +Hy +Hy +Hy +pd +pd +pd +pd +pd +pd +pd +pd +NQ +ls +pd +pd +pd +pd +pd +zo +zo +Da +Da +pd +oJ +pd +pd +pd +Hy +Hy +Hy +Hy +"} +(27,1,1) = {" +Hy +Hy +CY +Hy +Hy +Hy +Hy +AH +CY +CY +Hy +fY +Hy +pd +pd +pd +pd +pd +pd +pd +pd +pd +pd +OK +pd +oJ +pd +mx +pd +pd +OK +pd +pd +pd +pd +pd +Hy +Hy +Hy +Hy +"} +(28,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +pd +NQ +OK +pd +pd +aM +pd +mx +pd +pd +pd +oJ +pd +pd +pd +pd +pd +pd +aM +pd +pd +Hy +Hy +Hy +Hy +jf +"} +(29,1,1) = {" +Hy +Hy +Hy +Hy +CY +Hy +Hy +Hy +Hy +CY +Hy +Hy +Hy +Fw +Hy +pd +oJ +pd +pd +pd +pd +pd +pd +pd +OK +oJ +pd +kh +pd +pd +pd +pd +pd +pd +Hy +Hy +Hy +fY +Hy +Hy +"} +(30,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +CY +CY +Hy +pd +pd +pd +pd +ls +pd +OK +pd +pd +pd +pd +pd +pd +pd +oJ +zt +pd +pd +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(31,1,1) = {" +Hy +Hy +Hy +fY +Hy +Hy +Ki +Hy +Hy +Hy +Ki +Hy +CY +Hy +Hy +Hy +Hy +pd +pd +pd +pd +pd +ls +pd +pd +oJ +pd +pd +aM +pd +pd +pd +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(32,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +fY +Hy +Hy +Hy +Hy +kh +pd +pd +zt +pd +pd +ls +pd +pd +pd +pd +pd +pd +Hy +Hy +Fw +Hy +Hy +Hy +Hy +Hy +Hy +"} +(33,1,1) = {" +Hy +Hy +Hy +Hy +CY +Hy +CY +Hy +fY +Hy +Hy +Hy +Hy +Hy +jf +Hy +Hy +Hy +Hy +pd +pd +pd +pd +pd +NQ +zt +pd +pd +oJ +pd +fY +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(34,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +CY +Hy +Hy +Hy +CY +Hy +fY +Hy +CY +Hy +Hy +pd +oJ +pd +pd +OK +pd +pd +pd +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(35,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Ki +Hy +Hy +Hy +CY +CY +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +pd +pd +ls +pd +pd +pd +Hy +Hy +Hy +Hy +Hy +Hy +fY +Hy +Hy +Hy +Hy +Hy +"} +(36,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +CY +Hy +Hy +Hy +Hy +fY +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(37,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Fw +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(38,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(39,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +jf +Hy +Hy +Hy +Hy +fY +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} +(40,1,1) = {" +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +Hy +"} diff --git a/_maps/map_files/RandomRuins/SpaceRuins/turretedoutpost.dmm b/_maps/map_files/RandomRuins/SpaceRuins/turretedoutpost.dmm index 96e43773146..67dc298eb20 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/turretedoutpost.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/turretedoutpost.dmm @@ -1,10 +1,10 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "a" = ( -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "b" = ( /obj/structure/lattice, -/turf/space, +/turf/template_noop, /area/space/nearstation) "c" = ( /obj/structure/grille, diff --git a/_maps/map_files/RandomRuins/SpaceRuins/way_home.dmm b/_maps/map_files/RandomRuins/SpaceRuins/way_home.dmm index b0613eef965..dc1e468624b 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/way_home.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/way_home.dmm @@ -1,7 +1,7 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "a" = ( -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "b" = ( /turf/simulated/mineral/random, /area/ruin/unpowered/no_grav/way_home) diff --git a/_maps/map_files/RandomRuins/SpaceRuins/wizardcrash.dmm b/_maps/map_files/RandomRuins/SpaceRuins/wizardcrash.dmm index ebfaf3b94b4..3add952e8e2 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/wizardcrash.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/wizardcrash.dmm @@ -1,7 +1,7 @@ //MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "aa" = ( -/turf/space, -/area/space) +/turf/template_noop, +/area/template_noop) "ab" = ( /turf/simulated/floor/plating/asteroid/airless, /area/ruin/unpowered) @@ -152,12 +152,7 @@ /turf/simulated/floor/wood, /area/ruin/unpowered) "az" = ( -/obj/item/spellbook/oneuse/charge{ - desc = "For the technology-hating wizard."; - spell = /obj/effect/proc_holder/spell/targeted/emplosion/disable_tech; - spellname = "Disable Technology"; - used = 1 - }, +/obj/item/spellbook/oneuse/emp/used, /turf/simulated/floor/wood, /area/ruin/unpowered) "aA" = ( diff --git a/_maps/map_files/cyberiad/cyberiad.dmm b/_maps/map_files/cyberiad/cyberiad.dmm index 2c12ac11e44..8f6f8d77f7f 100644 --- a/_maps/map_files/cyberiad/cyberiad.dmm +++ b/_maps/map_files/cyberiad/cyberiad.dmm @@ -35244,7 +35244,7 @@ }, /area/bridge) "bnW" = ( -/obj/machinery/computer/station_alert/all, +/obj/machinery/computer/station_alert, /turf/simulated/floor/plasteel{ dir = 0; icon_state = "yellow" @@ -72578,7 +72578,7 @@ pixel_x = -2; pixel_y = 2 }, -/obj/item/circuitboard/stationalert_all{ +/obj/item/circuitboard/stationalert{ pixel_x = 1; pixel_y = -1 }, @@ -75846,7 +75846,7 @@ pixel_x = 32; pixel_y = 0 }, -/obj/machinery/computer/station_alert/all, +/obj/machinery/computer/station_alert, /obj/structure/cable/yellow{ d1 = 4; d2 = 8; @@ -77210,6 +77210,10 @@ pixel_x = -22 }, /obj/item/stack/tape_roll, +/obj/machinery/camera/motion{ + c_tag = "EVA Motion Sensor"; + dir = 4 + }, /turf/simulated/floor/plasteel{ icon_state = "dark" }, diff --git a/_maps/map_files/generic/Lavaland.dmm b/_maps/map_files/generic/Lavaland.dmm index e44b9f52458..86ec920c658 100644 --- a/_maps/map_files/generic/Lavaland.dmm +++ b/_maps/map_files/generic/Lavaland.dmm @@ -681,7 +681,7 @@ req_access_txt = "2" }, /obj/structure/cable{ - icon_state = "1-10" + icon_state = "1-2" }, /turf/simulated/floor/plating, /area/mine/laborcamp) @@ -858,18 +858,11 @@ /turf/simulated/floor/plasteel, /area/mine/laborcamp/security) "ce" = ( -/obj/structure/cable{ - icon_state = "2-4" +/obj/machinery/power/smes{ + charge = 5e+006 }, /obj/structure/cable{ - icon_state = "5-6" - }, -/turf/simulated/floor/plating, -/area/mine/laborcamp) -"cf" = ( -/obj/machinery/power/terminal, -/obj/structure/cable{ - icon_state = "0-8" + icon_state = "0-4" }, /turf/simulated/floor/plating, /area/mine/laborcamp) @@ -880,6 +873,9 @@ /turf/simulated/floor/plating, /area/mine/laborcamp) "ch" = ( +/obj/structure/cable{ + icon_state = "1-8" + }, /turf/simulated/floor/plating, /area/mine/laborcamp) "ci" = ( @@ -1033,21 +1029,22 @@ /turf/simulated/floor/plasteel, /area/mine/laborcamp) "cz" = ( -/obj/machinery/power/port_gen/pacman{ - anchored = 1 - }, -/obj/structure/cable, -/turf/simulated/floor/plating, -/area/mine/laborcamp) -"cA" = ( -/obj/machinery/power/smes{ - charge = 5e+006 +/obj/machinery/power/terminal{ + dir = 1 }, /obj/structure/cable{ icon_state = "0-4" }, +/obj/structure/reagent_dispensers/fueltank, +/turf/simulated/floor/plating, +/area/mine/laborcamp) +"cA" = ( /obj/structure/cable{ - icon_state = "0-9" + d1 = 4; + d2 = 8; + icon_state = "4-8"; + pixel_x = 0; + tag = "" }, /turf/simulated/floor/plating, /area/mine/laborcamp) @@ -1056,7 +1053,13 @@ /turf/simulated/floor/plating, /area/mine/laborcamp) "cC" = ( -/obj/structure/reagent_dispensers/fueltank, +/obj/machinery/power/port_gen/pacman{ + anchored = 1 + }, +/obj/structure/cable{ + d2 = 8; + icon_state = "0-8" + }, /turf/simulated/floor/plating, /area/mine/laborcamp) "cD" = ( @@ -11202,7 +11205,7 @@ bm aq bB bM -cf +ch cA aq aj @@ -11460,7 +11463,7 @@ aq aq aq cg -cB +cA aq aj cQ @@ -11716,7 +11719,7 @@ aD aD aD aq -ch +cB cC aq aj diff --git a/_maps/map_files/shuttles/admin_armory.dmm b/_maps/map_files/shuttles/admin_armory.dmm new file mode 100644 index 00000000000..837f867a52b --- /dev/null +++ b/_maps/map_files/shuttles/admin_armory.dmm @@ -0,0 +1,1691 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"ae" = ( +/obj/structure/sign/securearea, +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall4"; + tag = "icon-swall14" + }, +/area/shuttle/administration) +"al" = ( +/obj/structure/window/reinforced{ + dir = 4 + }, +/obj/structure/table/reinforced, +/obj/item/folder, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aI" = ( +/obj/structure/table/reinforced, +/obj/structure/window/reinforced{ + dir = 4 + }, +/obj/machinery/recharger, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"aP" = ( +/obj/machinery/vending/security, +/obj/machinery/light/spot{ + dir = 8; + icon_state = "tube1"; + tag = "icon-tube1 (WEST)" + }, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"bi" = ( +/obj/structure/table/reinforced, +/obj/item/storage/firstaid, +/obj/item/storage/firstaid/brute, +/obj/item/storage/box/bodybags, +/obj/item/storage/firstaid/surgery, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"bm" = ( +/obj/structure/grille, +/obj/machinery/door/poddoor/shutters/preopen{ + dir = 8; + id_tag = "adminarmoryshutters" + }, +/obj/structure/window/full/shuttle, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"ce" = ( +/obj/machinery/autolathe/upgraded{ + hacked = 1 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"cl" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"cV" = ( +/obj/structure/closet/emcloset, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"de" = ( +/obj/machinery/suit_storage_unit/security/secure, +/obj/machinery/light/spot, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"df" = ( +/obj/structure/rack, +/obj/item/storage/box/buck{ + pixel_x = -3; + pixel_y = 3 + }, +/obj/item/storage/box/buck, +/obj/structure/window/reinforced, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"dn" = ( +/obj/machinery/computer/camera_advanced/shuttle_docker/admin{ + name = "NRV Sparta navigation computer" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"dH" = ( +/obj/structure/rack, +/obj/structure/window/reinforced, +/obj/structure/window/reinforced{ + dir = 8 + }, +/obj/item/gun/energy/gun, +/obj/item/gun/energy/gun{ + pixel_x = 3; + pixel_y = -3 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"dP" = ( +/obj/machinery/recharge_station/upgraded, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"eI" = ( +/obj/machinery/turretid/stun{ + check_access = 0; + name = "Shuttle Turret Control"; + pixel_y = 30 + }, +/obj/machinery/computer/camera_advanced, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"eL" = ( +/obj/structure/chair{ + dir = 8 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"fo" = ( +/obj/structure/chair{ + dir = 1 + }, +/obj/machinery/light/spot, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"fF" = ( +/obj/machinery/light/spot{ + dir = 4; + icon_state = "tube1"; + tag = "icon-tube1 (EAST)" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"fQ" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 1 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"gd" = ( +/obj/machinery/door/airlock/shuttle, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"gh" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 8 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"gj" = ( +/obj/machinery/computer/communications{ + name = "NRV Sparta Communications Console" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"hN" = ( +/obj/structure/chair{ + dir = 4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"ir" = ( +/obj/structure/closet/emcloset, +/obj/machinery/light/spot{ + dir = 1; + icon_state = "tube1"; + tag = "icon-tube1 (NORTH)" + }, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"iz" = ( +/obj/machinery/porta_turret{ + installation = /obj/item/gun/energy/gun + }, +/obj/structure/window/reinforced, +/obj/structure/window/reinforced{ + dir = 8 + }, +/obj/structure/window/reinforced{ + dir = 1; + layer = 2.9 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"jn" = ( +/obj/machinery/door/poddoor/shutters{ + density = 0; + dir = 2; + icon_state = "open"; + id_tag = "Asclshutters"; + name = "Blast Shutters"; + opacity = 0 + }, +/obj/structure/grille, +/obj/structure/window/full/shuttle, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"jB" = ( +/obj/structure/table/reinforced, +/obj/item/storage/lockbox/mindshield, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"jU" = ( +/obj/machinery/suit_storage_unit/security/secure, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"kf" = ( +/obj/structure/sign/securearea, +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall8"; + tag = "icon-swall12" + }, +/area/shuttle/administration) +"mq" = ( +/obj/structure/grille, +/obj/machinery/door/poddoor/shutters{ + density = 0; + dir = 2; + icon_state = "open"; + id_tag = "Asclshutters"; + name = "Blast Shutters"; + opacity = 0 + }, +/obj/structure/window/full/shuttle, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"mw" = ( +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"mM" = ( +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall13" + }, +/area/shuttle/administration) +"nG" = ( +/obj/structure/window/full/shuttle, +/obj/structure/grille, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"oj" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 1 + }, +/obj/machinery/light/spot, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"oY" = ( +/obj/structure/chair, +/obj/machinery/light/spot{ + dir = 1; + icon_state = "tube1"; + tag = "icon-tube1 (NORTH)" + }, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"pa" = ( +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall11" + }, +/area/shuttle/administration) +"pK" = ( +/obj/structure/shuttle/engine/propulsion{ + dir = 4; + icon_state = "propulsion" + }, +/turf/simulated/shuttle/plating, +/area/shuttle/administration) +"pQ" = ( +/obj/structure/chair{ + dir = 8 + }, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"qQ" = ( +/obj/machinery/recharger/wallcharger{ + pixel_y = 25 + }, +/obj/machinery/recharger/wallcharger{ + pixel_y = 35 + }, +/obj/machinery/light/spot{ + dir = 1; + icon_state = "tube1"; + tag = "icon-tube1 (NORTH)" + }, +/obj/machinery/door_control{ + id = "adminshuttlebridge"; + name = "Bridge Privacy Shutters"; + pixel_x = 25; + req_access_txt = "19" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"rb" = ( +/obj/machinery/door/window/brigdoor/southleft{ + req_one_access_txt = "2;19" + }, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"rW" = ( +/obj/structure/grille, +/obj/machinery/door/poddoor/shutters/preopen{ + id_tag = "adminshuttlebridge" + }, +/obj/structure/window/full/shuttle, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"sq" = ( +/obj/structure/table/reinforced, +/obj/item/kitchen/knife/combat{ + pixel_x = -3; + pixel_y = 3 + }, +/obj/item/kitchen/knife/combat, +/obj/item/kitchen/knife/combat{ + pixel_x = 3; + pixel_y = -3 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"tx" = ( +/obj/machinery/sleeper/upgraded{ + dir = 4 + }, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"ua" = ( +/obj/structure/chair{ + dir = 8 + }, +/obj/machinery/door_control{ + dir = 4; + id = "Asclshutters"; + name = "External Window Shutter Control"; + pixel_x = -5; + pixel_y = 35; + req_access_txt = "19" + }, +/obj/machinery/keycard_auth{ + pixel_y = 24 + }, +/obj/machinery/door_control{ + id = "asclblast"; + name = "Airlock Blast Door Control"; + pixel_x = 5; + pixel_y = 35; + req_access = null; + req_access_txt = "19" + }, +/obj/structure/chair/comfy/shuttle{ + dir = 8 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"uz" = ( +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall4"; + tag = "icon-swall14" + }, +/area/shuttle/administration) +"uW" = ( +/obj/structure/shuttle/engine/heater{ + dir = 4; + icon_state = "heater" + }, +/obj/structure/window/plasmareinforced{ + dir = 8 + }, +/turf/simulated/shuttle/plating, +/area/shuttle/administration) +"uY" = ( +/obj/structure/window/reinforced, +/obj/structure/table/reinforced, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"vk" = ( +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall_s6" + }, +/area/shuttle/administration) +"vy" = ( +/obj/structure/table/reinforced, +/obj/item/stack/sheet/metal/fifty, +/obj/item/stack/sheet/glass/fifty, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"vA" = ( +/obj/machinery/light/spot{ + dir = 1; + icon_state = "tube1"; + tag = "icon-tube1 (NORTH)" + }, +/obj/machinery/portable_atmospherics/canister/oxygen, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"vW" = ( +/obj/structure/table/reinforced, +/obj/structure/window/reinforced{ + dir = 4 + }, +/obj/item/storage/box/handcuffs, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"wG" = ( +/obj/structure/rack, +/obj/structure/window/reinforced{ + dir = 1; + layer = 2.9 + }, +/obj/item/clothing/suit/armor/bulletproof{ + pixel_x = 0; + pixel_y = 0 + }, +/obj/item/clothing/head/helmet/alt, +/obj/item/clothing/suit/armor/bulletproof{ + pixel_x = 0; + pixel_y = 0 + }, +/obj/item/clothing/head/helmet/alt, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"wH" = ( +/obj/machinery/light/spot{ + dir = 8; + icon_state = "tube1"; + tag = "icon-tube1 (WEST)" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"wQ" = ( +/obj/machinery/door/poddoor/shutters{ + density = 0; + dir = 8; + icon_state = "open"; + id_tag = "Asclshutters"; + name = "Blast Shutters"; + opacity = 0 + }, +/obj/structure/grille, +/obj/structure/window/full/shuttle, +/turf/space, +/area/shuttle/administration) +"xm" = ( +/obj/structure/table/reinforced, +/obj/item/rcd/preloaded, +/obj/item/rcd_ammo, +/obj/item/rcd_ammo{ + pixel_x = 3; + pixel_y = -3 + }, +/obj/item/rcd_ammo{ + pixel_x = -3; + pixel_y = 3 + }, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"xF" = ( +/obj/structure/rack, +/obj/item/storage/box/buck{ + pixel_x = -3; + pixel_y = 3 + }, +/obj/item/storage/box/buck, +/obj/structure/window/reinforced, +/obj/structure/window/reinforced{ + dir = 4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"xH" = ( +/obj/machinery/door/airlock/shuttle, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"xK" = ( +/obj/structure/sign/nosmoking_2, +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall3"; + tag = "icon-swall3" + }, +/area/shuttle/administration) +"xQ" = ( +/obj/structure/chair{ + dir = 4 + }, +/obj/machinery/light/spot{ + dir = 1; + icon_state = "tube1"; + tag = "icon-tube1 (NORTH)" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"xU" = ( +/obj/structure/table/reinforced, +/obj/item/stack/sheet/metal/fifty, +/obj/item/stack/sheet/glass/fifty, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"xZ" = ( +/turf/space, +/area/shuttle/administration) +"yg" = ( +/obj/structure/table/reinforced, +/obj/machinery/door/window/brigdoor/eastleft{ + name = "Armory"; + req_access_txt = "3" + }, +/obj/machinery/door/window/brigdoor/westleft{ + name = "Armory" + }, +/obj/machinery/door/poddoor/shutters/preopen{ + dir = 8; + id_tag = "adminarmoryshutters" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"yu" = ( +/obj/structure/table/reinforced, +/obj/machinery/recharger{ + pixel_x = -5 + }, +/obj/machinery/recharger{ + pixel_x = 8 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"yF" = ( +/obj/machinery/status_display, +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall3" + }, +/area/shuttle/administration) +"zY" = ( +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall14" + }, +/area/shuttle/administration) +"AH" = ( +/obj/machinery/light/spot, +/obj/machinery/porta_turret{ + installation = /obj/item/gun/energy/gun + }, +/obj/structure/window/reinforced{ + dir = 1; + layer = 2.9 + }, +/obj/structure/window/reinforced{ + dir = 4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"Bc" = ( +/obj/structure/rack, +/obj/structure/window/reinforced{ + dir = 1; + layer = 2.9 + }, +/obj/structure/window/reinforced{ + dir = 8 + }, +/obj/item/shield/riot, +/obj/item/shield/riot{ + pixel_x = 2; + pixel_y = -4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"Bj" = ( +/obj/structure/fans/tiny, +/obj/machinery/door/airlock/external{ + req_one_access_txt = "2;19" + }, +/obj/machinery/door/poddoor{ + density = 0; + icon_state = "open"; + id_tag = "asclblast"; + name = "Blast Door"; + opacity = 0 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"Bn" = ( +/obj/machinery/door/window/brigdoor/southleft{ + req_one_access_txt = "2;19" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"Bq" = ( +/obj/structure/sign/nosmoking_2, +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall1"; + tag = "icon-swall1" + }, +/area/shuttle/administration) +"BZ" = ( +/obj/machinery/light/spot, +/obj/machinery/porta_turret{ + installation = /obj/item/gun/energy/gun + }, +/obj/structure/window/reinforced{ + dir = 8 + }, +/obj/structure/window/reinforced{ + dir = 1; + layer = 2.9 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"Cl" = ( +/obj/structure/table/reinforced, +/obj/item/storage/toolbox/emergency{ + pixel_x = -3; + pixel_y = 3 + }, +/obj/item/storage/toolbox/mechanical, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"Du" = ( +/obj/structure/rack, +/obj/structure/window/reinforced, +/obj/item/gun/energy/gun, +/obj/item/gun/energy/gun{ + pixel_x = 3; + pixel_y = -3 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"DZ" = ( +/obj/machinery/light/spot, +/obj/structure/closet/emcloset, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"Eq" = ( +/obj/structure/sign/securearea, +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall12" + }, +/area/shuttle/administration) +"EQ" = ( +/obj/machinery/door/airlock/shuttle/glass, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"Fd" = ( +/obj/structure/rack, +/obj/structure/window/reinforced, +/obj/structure/window/reinforced{ + dir = 4 + }, +/obj/item/gun/energy/gun, +/obj/item/gun/energy/gun{ + pixel_x = 3; + pixel_y = -3 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"Fo" = ( +/obj/structure/rack, +/obj/structure/window/reinforced, +/obj/structure/window/reinforced{ + dir = 8 + }, +/obj/item/gun/energy/immolator/multi{ + pixel_y = -3 + }, +/obj/item/gun/energy/immolator/multi, +/obj/item/gun/energy/immolator/multi{ + pixel_y = 3 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"FF" = ( +/obj/structure/sign/poster/official/enlist, +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall12" + }, +/area/shuttle/administration) +"FT" = ( +/obj/structure/rack, +/obj/item/storage/box/buck{ + pixel_x = -3; + pixel_y = 3 + }, +/obj/item/storage/box/buck, +/obj/structure/window/reinforced, +/obj/structure/window/reinforced{ + dir = 8 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"Gf" = ( +/obj/structure/sign/vacuum{ + pixel_x = -32 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"Gn" = ( +/obj/structure/window/reinforced{ + dir = 1; + layer = 2.9 + }, +/obj/structure/rack, +/obj/item/gun/projectile/shotgun/riot/buckshot{ + pixel_x = -3; + pixel_y = 3 + }, +/obj/item/gun/projectile/shotgun/riot/buckshot, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"Gx" = ( +/obj/structure/fans/tiny, +/obj/machinery/door/airlock/external, +/obj/docking_port/mobile{ + dir = 2; + dwidth = 9; + height = 18; + id = "admin"; + name = "armory"; + roundstart_move = "cc_bay_1"; + timid = 1; + width = 19 + }, +/obj/machinery/door/poddoor{ + density = 0; + icon_state = "open"; + id_tag = "asclblast"; + name = "Blast Door"; + opacity = 0 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"Gy" = ( +/obj/structure/chair{ + dir = 1 + }, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"Hc" = ( +/obj/machinery/porta_turret{ + installation = /obj/item/gun/energy/gun + }, +/obj/structure/window/reinforced{ + dir = 1; + layer = 2.9 + }, +/obj/structure/window/reinforced{ + dir = 8 + }, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"HN" = ( +/obj/structure/sign/poster/official/do_not_question, +/obj/item/tank/emergency_oxygen/engi, +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall3" + }, +/area/shuttle/administration) +"Ir" = ( +/obj/machinery/computer/shuttle/admin{ + name = "NRV Sparta shuttle console" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"IC" = ( +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall3" + }, +/area/shuttle/administration) +"Jt" = ( +/obj/machinery/suit_storage_unit/standard_unit, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"Ke" = ( +/obj/machinery/door/window/brigdoor/southright{ + req_one_access_txt = "2;19" + }, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"Kh" = ( +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"Ki" = ( +/obj/structure/window/reinforced{ + dir = 1; + layer = 2.9 + }, +/obj/structure/window/reinforced{ + dir = 4 + }, +/obj/item/clothing/suit/armor/bulletproof{ + pixel_x = 0; + pixel_y = 0 + }, +/obj/structure/rack, +/obj/item/clothing/head/helmet/alt, +/obj/item/clothing/suit/armor/bulletproof{ + pixel_x = 0; + pixel_y = 0 + }, +/obj/item/clothing/head/helmet/alt, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"KM" = ( +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall7" + }, +/area/shuttle/administration) +"Lh" = ( +/obj/structure/rack, +/obj/structure/window/reinforced, +/obj/structure/window/reinforced{ + dir = 4 + }, +/obj/item/gun/energy/ionrifle{ + pixel_x = 3; + pixel_y = 3 + }, +/obj/item/gun/energy/ionrifle, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"LK" = ( +/obj/structure/window/reinforced{ + dir = 4 + }, +/obj/machinery/computer/secure_data, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"LP" = ( +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall_s9" + }, +/area/shuttle/administration) +"Mi" = ( +/obj/structure/table/reinforced, +/obj/machinery/recharger, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"Mj" = ( +/obj/machinery/vending/medical, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"Mo" = ( +/obj/structure/rack, +/obj/structure/window/reinforced{ + dir = 1; + layer = 2.9 + }, +/obj/structure/window/reinforced{ + dir = 8 + }, +/obj/item/clothing/suit/armor/bulletproof{ + pixel_x = 0; + pixel_y = 0 + }, +/obj/item/clothing/head/helmet/alt, +/obj/item/clothing/suit/armor/bulletproof{ + pixel_x = 0; + pixel_y = 0 + }, +/obj/item/clothing/head/helmet/alt, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"MN" = ( +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall12" + }, +/area/shuttle/administration) +"MZ" = ( +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall3"; + tag = "icon-swall3" + }, +/area/shuttle/administration) +"Ni" = ( +/obj/structure/window/reinforced{ + dir = 8 + }, +/obj/structure/window/reinforced{ + dir = 1; + layer = 2.9 + }, +/obj/structure/rack, +/obj/item/gun/projectile/shotgun/riot/buckshot{ + pixel_x = -3; + pixel_y = 3 + }, +/obj/item/gun/projectile/shotgun/riot/buckshot, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"Ns" = ( +/obj/machinery/recharger/wallcharger{ + pixel_y = 25 + }, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"NF" = ( +/obj/structure/sign/poster/official/here_for_your_safety, +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall3"; + tag = "icon-swall3" + }, +/area/shuttle/administration) +"NQ" = ( +/obj/machinery/door/poddoor/shutters{ + density = 0; + dir = 1; + icon_state = "open"; + id_tag = "Asclshutters"; + name = "Blast Shutters"; + opacity = 0 + }, +/obj/structure/grille, +/obj/structure/window/full/shuttle, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"Op" = ( +/obj/structure/dispenser/oxygen, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"Ou" = ( +/obj/machinery/autolathe/upgraded{ + hacked = 1 + }, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"Pe" = ( +/obj/machinery/door/window/brigdoor/southright{ + req_one_access_txt = "2;19" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"Pn" = ( +/obj/structure/rack, +/obj/structure/window/reinforced{ + dir = 1; + layer = 2.9 + }, +/obj/structure/window/reinforced{ + dir = 4 + }, +/obj/item/clothing/suit/armor/riot, +/obj/item/clothing/suit/armor/riot{ + pixel_x = 3; + pixel_y = -3 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"PL" = ( +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall_s10" + }, +/area/shuttle/administration) +"PR" = ( +/obj/machinery/light/spot{ + dir = 8; + tag = "icon-tube1 (WEST)" + }, +/obj/machinery/door_control{ + id = "adminarmoryshutters"; + name = "Armory Internal Shutters"; + pixel_x = -26; + req_access_txt = "3" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"PS" = ( +/obj/structure/rack, +/obj/structure/window/reinforced{ + dir = 8 + }, +/obj/item/gun/energy/gun/nuclear{ + pixel_y = -3 + }, +/obj/item/gun/energy/gun/nuclear, +/obj/item/gun/energy/gun/nuclear{ + pixel_y = 3 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"PV" = ( +/obj/structure/rack, +/obj/item/gun/energy/sniperrifle{ + pixel_y = -4 + }, +/obj/item/gun/energy/sniperrifle, +/obj/item/gun/energy/sniperrifle{ + pixel_y = 3 + }, +/obj/structure/window/reinforced{ + dir = 8 + }, +/obj/structure/window/reinforced{ + dir = 1; + layer = 2.9 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"RM" = ( +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall8"; + tag = "icon-swall12" + }, +/area/shuttle/administration) +"TD" = ( +/obj/machinery/door/airlock/command{ + name = "Command Center"; + req_access = null; + req_access_txt = "19" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"TF" = ( +/obj/structure/table/reinforced, +/obj/structure/window/reinforced{ + dir = 4 + }, +/obj/structure/window/reinforced, +/obj/item/storage/fancy/donut_box, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"Un" = ( +/obj/structure/table/reinforced, +/obj/item/tank/emergency_oxygen/engi{ + pixel_x = 3; + pixel_y = -3 + }, +/obj/item/tank/emergency_oxygen/engi, +/obj/item/tank/emergency_oxygen/engi{ + pixel_x = -3; + pixel_y = 3 + }, +/obj/machinery/light/spot{ + dir = 8; + icon_state = "tube1"; + tag = "icon-tube1 (WEST)" + }, +/obj/item/clothing/mask/breath{ + pixel_x = -3; + pixel_y = 3 + }, +/obj/item/clothing/mask/breath, +/obj/item/clothing/mask/breath{ + pixel_x = 3; + pixel_y = -3 + }, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"Ur" = ( +/obj/machinery/porta_turret{ + installation = /obj/item/gun/energy/gun + }, +/obj/structure/window/reinforced{ + dir = 1; + layer = 2.9 + }, +/obj/structure/window/reinforced{ + dir = 4 + }, +/turf/simulated/shuttle/floor, +/area/shuttle/administration) +"UR" = ( +/obj/machinery/status_display, +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall12" + }, +/area/shuttle/administration) +"UX" = ( +/obj/structure/fans/tiny, +/obj/machinery/door/airlock/external, +/obj/machinery/door/poddoor{ + density = 0; + icon_state = "open"; + id_tag = "asclblast"; + name = "Blast Door"; + opacity = 0 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"Vc" = ( +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swall_s5" + }, +/area/shuttle/administration) +"VC" = ( +/obj/machinery/door/airlock/shuttle{ + name = "Shuttle Armory"; + req_access_txt = "3" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"VQ" = ( +/obj/structure/rack, +/obj/structure/window/reinforced, +/obj/structure/window/reinforced{ + dir = 8 + }, +/obj/item/gun/energy/gun/advtaser{ + pixel_x = 3; + pixel_y = -3 + }, +/obj/item/gun/energy/gun/advtaser{ + pixel_x = 0; + pixel_y = 0 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"WV" = ( +/obj/structure/table/reinforced, +/obj/item/restraints/handcuffs{ + pixel_x = 3; + pixel_y = -3 + }, +/obj/item/restraints/handcuffs, +/obj/item/restraints/handcuffs{ + pixel_x = -3; + pixel_y = 3 + }, +/obj/machinery/light/spot{ + dir = 4; + icon_state = "tube1"; + tag = "icon-tube1 (EAST)" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) +"XL" = ( +/obj/structure/window/reinforced{ + dir = 1; + layer = 2.9 + }, +/obj/structure/rack, +/obj/structure/window/reinforced{ + dir = 4 + }, +/obj/item/gun/projectile/shotgun/riot/buckshot{ + pixel_x = -3; + pixel_y = 3 + }, +/obj/item/gun/projectile/shotgun/riot/buckshot, +/turf/simulated/shuttle/floor{ + icon_state = "floor4" + }, +/area/shuttle/administration) + +(1,1,1) = {" +vk +MZ +HN +IC +IC +IC +IC +KM +wQ +wQ +wQ +wQ +KM +IC +IC +IC +IC +Vc +"} +(2,1,1) = {" +MN +Un +xm +Mj +aP +dP +tx +MN +eI +Ir +dn +gj +MN +vA +cl +cl +DZ +Eq +"} +(3,1,1) = {" +MN +Ns +mw +mw +mw +mw +mw +MN +ua +gh +gh +gh +FF +Op +Kh +Kh +Kh +Bj +"} +(4,1,1) = {" +MN +Ns +mw +mw +mw +mw +Gy +MN +qQ +Kh +Kh +Kh +UR +Jt +Kh +Kh +Kh +Bj +"} +(5,1,1) = {" +MN +Ns +mw +mw +mw +mw +fo +zY +MZ +TD +rW +rW +pa +MZ +xH +nG +nG +Eq +"} +(6,1,1) = {" +MN +bi +Cl +vy +Ou +mw +mw +MN +cV +Kh +Kh +Kh +Bn +Gf +Kh +Mi +Mi +MN +"} +(7,1,1) = {" +zY +nG +nG +nG +nG +gd +nG +MN +xQ +Kh +hN +Kh +Pe +Kh +Kh +Kh +oj +MN +"} +(8,1,1) = {" +RM +oY +mw +mw +mw +mw +Ur +kf +vW +al +aI +LK +TF +Kh +Kh +Kh +fQ +mq +"} +(9,1,1) = {" +UX +mw +mw +mw +mw +mw +mw +EQ +mw +mw +mw +mw +rb +Kh +Kh +Kh +fQ +jn +"} +(10,1,1) = {" +Gx +mw +mw +mw +mw +mw +mw +EQ +mw +mw +mw +mw +Ke +Kh +Kh +Kh +Kh +jn +"} +(11,1,1) = {" +uz +oY +mw +mw +mw +mw +Hc +ae +ir +pQ +pQ +pQ +uY +Kh +Kh +Kh +BZ +MN +"} +(12,1,1) = {" +zY +MZ +Bq +yg +VC +yg +yF +pa +bm +bm +bm +MZ +MZ +xK +VC +NF +MZ +mM +"} +(13,1,1) = {" +MN +Kh +wH +eL +Kh +eL +Kh +PR +PV +PS +Fo +wH +VQ +Bc +Kh +Kh +AH +MN +"} +(14,1,1) = {" +NQ +Kh +dH +Ni +Kh +FT +Mo +Kh +Kh +Kh +Kh +Kh +Lh +Pn +Kh +Kh +Kh +mq +"} +(15,1,1) = {" +NQ +Kh +Du +Gn +Kh +df +wG +Kh +Kh +Kh +Kh +Kh +Kh +Kh +Kh +Kh +Kh +mq +"} +(16,1,1) = {" +NQ +Kh +Fd +XL +Kh +xF +Ki +Kh +Kh +Kh +Kh +Kh +Kh +Kh +Kh +Kh +Kh +mq +"} +(17,1,1) = {" +MN +fF +Kh +Kh +fF +Kh +Kh +fF +iz +yu +sq +WV +xU +ce +jB +jU +de +MN +"} +(18,1,1) = {" +PL +KM +uW +uW +KM +IC +IC +KM +uW +uW +KM +IC +IC +KM +uW +uW +KM +LP +"} +(19,1,1) = {" +xZ +PL +pK +pK +LP +xZ +xZ +PL +pK +pK +LP +xZ +xZ +PL +pK +pK +LP +xZ +"} diff --git a/_maps/map_files/shuttles/emergency_dept.dmm b/_maps/map_files/shuttles/emergency_dept.dmm index 739056d20d6..fb479c23995 100644 --- a/_maps/map_files/shuttles/emergency_dept.dmm +++ b/_maps/map_files/shuttles/emergency_dept.dmm @@ -17,81 +17,152 @@ "ad" = ( /turf/space, /turf/simulated/shuttle/wall{ - tag = "icon-swall_f10"; icon_state = "swall_f10"; dir = 2 }, /area/shuttle/escape) "ae" = ( -/turf/simulated/shuttle/wall{ - icon_state = "swall12"; - dir = 2 +/obj/structure/table/reinforced, +/obj/item/paper_bin, +/obj/item/pen, +/turf/simulated/floor/plasteel{ + dir = 4; + icon_state = "vault" }, /area/shuttle/escape) "af" = ( -/turf/simulated/shuttle/wall{ - icon_state = "swallc4" +/obj/structure/table/reinforced, +/obj/item/folder/red, +/obj/item/restraints/handcuffs, +/obj/item/flash, +/turf/simulated/floor/plasteel{ + icon_state = "dark" }, /area/shuttle/escape) "ag" = ( -/obj/machinery/computer/emergency_shuttle, -/turf/simulated/shuttle/floor, +/obj/machinery/computer/robotics, +/turf/simulated/floor/plasteel{ + dir = 9; + icon_state = "darkblue" + }, /area/shuttle/escape) "ah" = ( -/turf/simulated/shuttle/wall{ - icon_state = "swallc3" +/obj/machinery/computer/crew, +/turf/simulated/floor/plasteel{ + dir = 1; + icon_state = "darkblue" }, /area/shuttle/escape) "ai" = ( -/obj/machinery/computer/station_alert, -/turf/simulated/shuttle/floor, +/obj/machinery/computer/emergency_shuttle, +/turf/simulated/floor/plasteel{ + dir = 1; + icon_state = "darkblue" + }, /area/shuttle/escape) "aj" = ( /obj/machinery/computer/communications, -/obj/machinery/light/spot{ - tag = "icon-tube1 (NORTH)"; - icon_state = "tube1"; - dir = 1 +/turf/simulated/floor/plasteel{ + dir = 5; + icon_state = "darkblue" }, -/turf/simulated/shuttle/floor, /area/shuttle/escape) "ak" = ( -/obj/machinery/computer/security{ - network = list("SS13","Telecomms","Research Outpost","Mining Outpost") +/obj/structure/table/reinforced, +/obj/item/storage/fancy/donut_box, +/turf/simulated/floor/plasteel{ + icon_state = "dark" }, -/turf/simulated/shuttle/floor, /area/shuttle/escape) "al" = ( +/obj/structure/table/reinforced, +/obj/machinery/cell_charger, +/obj/item/stock_parts/cell/high, +/turf/simulated/floor/plasteel{ + dir = 4; + icon_state = "vault" + }, +/area/shuttle/escape) +"am" = ( +/obj/structure/table/reinforced, +/obj/machinery/recharger, +/turf/simulated/floor/plasteel{ + dir = 4; + icon_state = "vault" + }, +/area/shuttle/escape) +"an" = ( +/turf/simulated/floor/plasteel{ + icon_state = "dark" + }, +/area/shuttle/escape) +"ao" = ( /obj/structure/chair/comfy/shuttle{ dir = 1 }, -/turf/simulated/shuttle/floor, -/area/shuttle/escape) -"am" = ( -/obj/structure/table, -/turf/simulated/shuttle/floor, -/area/shuttle/escape) -"an" = ( -/obj/machinery/computer/crew, -/obj/machinery/light/spot{ - tag = "icon-tube1 (NORTH)"; - icon_state = "tube1"; - dir = 1 +/turf/simulated/floor/plasteel{ + icon_state = "dark" }, -/turf/simulated/shuttle/floor, -/area/shuttle/escape) -"ao" = ( -/obj/machinery/computer/robotics, -/turf/simulated/shuttle/floor, /area/shuttle/escape) "ap" = ( +/obj/structure/table/reinforced, +/obj/item/storage/toolbox/mechanical, +/turf/simulated/floor/plasteel{ + dir = 4; + icon_state = "vault" + }, +/area/shuttle/escape) +"aq" = ( /turf/simulated/shuttle/wall{ icon_state = "swall3"; dir = 2 }, /area/shuttle/escape) -"aq" = ( -/turf/simulated/shuttle/floor, +"ar" = ( +/obj/machinery/computer/security{ + network = list("SS13","Research Outpost","Mining Outpost","Telecomms") + }, +/obj/structure/sign/poster/official/nanotrasen_logo{ + pixel_x = -32; + pixel_y = 0 + }, +/turf/simulated/floor/plasteel{ + dir = 9; + icon_state = "darkred" + }, +/area/shuttle/escape) +"as" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 8 + }, +/turf/simulated/floor/plasteel{ + icon_state = "dark" + }, +/area/shuttle/escape) +"at" = ( +/obj/item/radio/intercom{ + dir = 4; + name = "Station Intercom (General)"; + pixel_x = 29; + pixel_y = -60 + }, +/turf/simulated/floor/plasteel{ + icon_state = "dark" + }, +/area/shuttle/escape) +"au" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 4 + }, +/turf/simulated/floor/plasteel{ + icon_state = "dark" + }, +/area/shuttle/escape) +"av" = ( +/turf/simulated/shuttle/wall{ + icon_state = "swall12"; + dir = 2 + }, /area/shuttle/escape) "aw" = ( /turf/simulated/shuttle/wall{ @@ -100,49 +171,240 @@ }, /area/shuttle/escape) "ax" = ( -/turf/simulated/shuttle/wall{ - icon_state = "swall14"; - dir = 2 +/obj/machinery/computer/station_alert, +/obj/structure/sign/poster/official/nanotrasen_logo{ + pixel_x = 32; + pixel_y = 0 + }, +/turf/simulated/floor/plasteel{ + dir = 5; + icon_state = "darkyellow" }, /area/shuttle/escape) "ay" = ( -/obj/machinery/door/airlock/command/glass{ - name = "Escape Shuttle Cockpit"; - req_access_txt = "19" +/obj/machinery/computer/secure_data, +/turf/simulated/floor/plasteel{ + dir = 10; + icon_state = "darkred" }, -/turf/simulated/shuttle/floor, /area/shuttle/escape) "az" = ( -/obj/structure/chair/comfy/shuttle, +/obj/structure/chair/comfy/shuttle{ + dir = 4 + }, /turf/simulated/shuttle/floor4, /area/shuttle/escape) "aA" = ( -/obj/machinery/status_display{ - pixel_y = 30 +/obj/machinery/light, +/obj/structure/chair/comfy/shuttle{ + dir = 8 }, -/obj/machinery/light/spot{ - tag = "icon-tube1 (NORTH)"; - icon_state = "tube1"; - dir = 1 +/turf/simulated/floor/plasteel{ + icon_state = "dark" }, -/obj/structure/chair/comfy/shuttle, -/turf/simulated/shuttle/floor4, /area/shuttle/escape) "aB" = ( -/obj/structure/grille, -/obj/structure/window/full/shuttle{ - icon_state = "16" +/obj/machinery/light, +/obj/structure/chair/comfy/shuttle{ + dir = 4 + }, +/turf/simulated/floor/plasteel{ + icon_state = "dark" }, -/turf/simulated/floor/plating, /area/shuttle/escape) "aC" = ( +/obj/machinery/computer/atmos_alert, +/turf/simulated/floor/plasteel{ + dir = 6; + icon_state = "darkyellow" + }, +/area/shuttle/escape) +"aD" = ( +/obj/machinery/status_display, +/turf/simulated/shuttle/wall{ + icon_state = "swall12"; + dir = 2 + }, +/area/shuttle/escape) +"aE" = ( +/obj/machinery/door/airlock/command/glass{ + name = "Escape Shuttle Cockpit"; + normalspeed = 0; + req_access_txt = "19" + }, +/turf/simulated/floor/plasteel{ + icon_state = "dark" + }, +/area/shuttle/escape) +"aF" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 8 + }, +/turf/simulated/floor/plasteel{ + dir = 2; + icon_state = "cmo" + }, +/area/shuttle/escape) +"aG" = ( +/obj/machinery/recharger/wallcharger{ + pixel_x = 32; + pixel_y = 0 + }, +/turf/simulated/shuttle/floor4, +/area/shuttle/escape) +"aH" = ( +/turf/simulated/shuttle/floor4, +/area/shuttle/escape) +"aI" = ( +/obj/machinery/door/airlock/medical/glass{ + id_tag = null; + name = "Escape Shuttle Infirmary"; + req_access_txt = "0" + }, +/turf/simulated/floor/plasteel{ + dir = 2; + icon_state = "cmo" + }, +/area/shuttle/escape) +"aJ" = ( +/obj/structure/table/reinforced, +/obj/item/storage/fancy/donut_box, +/obj/item/restraints/handcuffs, +/turf/simulated/shuttle/floor4, +/area/shuttle/escape) +"aL" = ( +/obj/machinery/door/airlock/medical/glass{ + id_tag = null; + name = "Escape Shuttle Infirmary"; + normalspeed = 0; + req_access_txt = "5" + }, +/turf/simulated/floor/plasteel{ + dir = 2; + icon_state = "cmo" + }, +/area/shuttle/escape) +"aM" = ( +/obj/machinery/light{ + icon_state = "tube1"; + dir = 8 + }, +/obj/structure/chair/comfy/shuttle{ + dir = 4 + }, +/turf/simulated/floor/plasteel{ + dir = 2; + icon_state = "cmo" + }, +/area/shuttle/escape) +"aN" = ( +/obj/structure/sign/directions/security{ + dir = 1; + pixel_y = 7 + }, +/turf/simulated/shuttle/wall{ + icon_state = "swall12"; + dir = 2 + }, +/area/shuttle/escape) +"aO" = ( +/mob/living/simple_animal/bot/secbot, /turf/simulated/floor/plasteel{ icon_state = "cafeteria"; dir = 2 }, /area/shuttle/escape) -"aD" = ( +"aP" = ( +/turf/simulated/shuttle/wall{ + tag = "icon-swall7"; + icon_state = "swall7"; + dir = 2 + }, +/area/shuttle/escape) +"aR" = ( /obj/structure/chair/comfy/shuttle{ + dir = 1 + }, +/turf/simulated/shuttle/floor4, +/area/shuttle/escape) +"aS" = ( +/turf/simulated/floor/plasteel{ + icon_state = "cafeteria"; + dir = 2 + }, +/area/shuttle/escape) +"aT" = ( +/obj/item/twohanded/required/kirbyplants, +/turf/simulated/floor/plasteel{ + dir = 8; + icon_state = "neutralfull" + }, +/area/shuttle/escape) +"aU" = ( +/obj/structure/chair/stool/bar, +/turf/simulated/floor/plasteel{ + icon_state = "cafeteria"; + dir = 2 + }, +/area/shuttle/escape) +"aV" = ( +/obj/structure/table/wood, +/turf/simulated/floor/plasteel{ + icon_state = "cafeteria"; + dir = 2 + }, +/area/shuttle/escape) +"aW" = ( +/obj/machinery/door/airlock/security/glass{ + name = "Escape Shuttle Brig"; + normalspeed = 0; + req_access_txt = "63" + }, +/turf/simulated/shuttle/floor4, +/area/shuttle/escape) +"aX" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 8 + }, +/turf/simulated/shuttle/floor4, +/area/shuttle/escape) +"aZ" = ( +/turf/simulated/shuttle/wall{ + tag = "icon-swall14"; + icon_state = "swall14"; + dir = 2 + }, +/area/shuttle/escape) +"ba" = ( +/turf/simulated/floor/plasteel{ + dir = 8; + icon_state = "neutralfull" + }, +/area/shuttle/escape) +"bb" = ( +/obj/structure/sign/greencross, +/turf/simulated/shuttle/wall{ + dir = 2; + icon_state = "swallc3" + }, +/area/shuttle/escape) +"bc" = ( +/obj/structure/bed/roller, +/obj/machinery/light{ + dir = 1; + on = 1 + }, +/turf/simulated/floor/plasteel{ + dir = 2; + icon_state = "cmo" + }, +/area/shuttle/escape) +"bd" = ( +/obj/item/storage/box/drinkingglasses, +/obj/item/reagent_containers/food/drinks/shaker, +/obj/structure/table/wood, +/obj/machinery/light{ + icon_state = "tube1"; dir = 4 }, /turf/simulated/floor/plasteel{ @@ -150,60 +412,7 @@ dir = 2 }, /area/shuttle/escape) -"aE" = ( -/obj/structure/table/wood, -/turf/simulated/floor/plasteel{ - icon_state = "cafeteria"; - dir = 2 - }, -/area/shuttle/escape) -"aF" = ( -/obj/machinery/status_display{ - pixel_y = 30 - }, -/obj/machinery/light/spot{ - tag = "icon-tube1 (NORTH)"; - icon_state = "tube1"; - dir = 1 - }, -/turf/simulated/floor/plasteel{ - icon_state = "cafeteria"; - dir = 2 - }, -/area/shuttle/escape) -"aG" = ( -/obj/item/storage/box/drinkingglasses, -/obj/item/reagent_containers/food/drinks/shaker, -/obj/structure/table/wood, -/turf/simulated/floor/plasteel{ - icon_state = "cafeteria"; - dir = 2 - }, -/area/shuttle/escape) -"aH" = ( -/obj/structure/closet/walllocker/emerglocker{ - pixel_x = -28 - }, -/turf/simulated/shuttle/floor4, -/area/shuttle/escape) -"aI" = ( -/turf/simulated/shuttle/floor4, -/area/shuttle/escape) -"aJ" = ( -/obj/structure/grille, -/obj/structure/window/full/shuttle{ - icon_state = "15" - }, -/turf/simulated/floor/plating, -/area/shuttle/escape) -"aK" = ( -/obj/structure/chair/comfy/shuttle, -/turf/simulated/floor/plasteel{ - icon_state = "cafeteria"; - dir = 2 - }, -/area/shuttle/escape) -"aL" = ( +"be" = ( /obj/machinery/chem_dispenser/beer, /obj/structure/table/wood, /turf/simulated/floor/plasteel{ @@ -211,24 +420,40 @@ dir = 2 }, /area/shuttle/escape) -"aM" = ( -/obj/machinery/door/airlock/security/glass{ - name = "Escape Shuttle Cell"; - req_access_txt = "2" +"bf" = ( +/obj/structure/table/reinforced, +/obj/item/storage/firstaid/o2{ + pixel_x = -3; + pixel_y = -3 + }, +/obj/item/storage/firstaid/regular, +/obj/item/storage/firstaid/toxin{ + pixel_x = 5; + pixel_y = 5 }, -/turf/simulated/floor/plating, -/area/shuttle/escape) -"aN" = ( -/obj/item/storage/box/drinkingglasses, -/obj/item/reagent_containers/food/drinks/shaker, -/obj/item/clothing/mask/cigarette/cigar, -/obj/structure/table/wood, /turf/simulated/floor/plasteel{ - icon_state = "cafeteria"; - dir = 2 + tag = "icon-whiteblue (NORTHEAST)"; + icon_state = "whiteblue"; + dir = 5 }, /area/shuttle/escape) -"aO" = ( +"bg" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 1 + }, +/obj/machinery/light, +/turf/simulated/shuttle/floor4, +/area/shuttle/escape) +"bh" = ( +/obj/machinery/recharger/wallcharger{ + pixel_x = 5; + pixel_y = -28 + }, +/turf/simulated/floor/plasteel{ + icon_state = "dark" + }, +/area/shuttle/escape) +"bi" = ( /obj/machinery/chem_dispenser/soda, /obj/structure/table/wood, /turf/simulated/floor/plasteel{ @@ -236,842 +461,1093 @@ dir = 2 }, /area/shuttle/escape) -"aP" = ( -/obj/machinery/door/airlock/shuttle{ - aiControlDisabled = 1; - hackProof = 1; - id_tag = "s_docking_airlock"; - name = "Shuttle Hatch" - }, -/turf/simulated/floor/plating, -/area/shuttle/escape) -"aQ" = ( -/obj/structure/chair/comfy/shuttle{ - dir = 1 - }, -/turf/simulated/shuttle/floor4, -/area/shuttle/escape) -"aR" = ( -/obj/structure/chair/comfy/shuttle{ - dir = 1 - }, -/turf/simulated/floor/plasteel{ - icon_state = "cafeteria"; - dir = 2 - }, -/area/shuttle/escape) -"aS" = ( -/turf/simulated/shuttle/wall{ - tag = "icon-swall7"; - icon_state = "swall7"; - dir = 2 - }, -/area/shuttle/escape) -"aT" = ( -/obj/docking_port/mobile/emergency{ - dir = 4; - dwidth = 11; - height = 13; - timid = 1; - width = 24 - }, -/obj/machinery/door/airlock/shuttle{ - aiControlDisabled = 1; - hackProof = 1; - id_tag = "s_docking_airlock"; - name = "Shuttle Hatch" - }, -/turf/simulated/shuttle/floor, -/area/shuttle/escape) -"aU" = ( -/turf/simulated/floor/plasteel, -/area/shuttle/escape) -"aV" = ( -/obj/machinery/door/window/southright{ - autoclose = 1; - name = "engineering door"; - req_access_txt = "32" - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor2" - }, -/area/shuttle/escape) -"aW" = ( -/obj/structure/chair/comfy/shuttle{ - dir = 4 - }, -/turf/simulated/shuttle/floor4, -/area/shuttle/escape) -"aX" = ( -/obj/structure/window/reinforced{ - dir = 1 - }, -/obj/structure/chair/comfy/shuttle{ - dir = 8 - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor2" - }, -/area/shuttle/escape) -"aY" = ( -/obj/structure/window/reinforced{ - dir = 1 - }, -/obj/structure/chair/comfy/shuttle{ - dir = 4 - }, -/turf/simulated/floor/plasteel, -/area/shuttle/escape) -"aZ" = ( -/obj/structure/window/reinforced{ - dir = 1 - }, -/obj/structure/chair/comfy/shuttle{ - dir = 8 - }, -/turf/simulated/floor/plasteel, -/area/shuttle/escape) -"ba" = ( -/obj/structure/window/reinforced{ - dir = 1 - }, -/obj/structure/chair/comfy/shuttle{ - dir = 4 - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor5" - }, -/area/shuttle/escape) -"bb" = ( -/obj/structure/chair/comfy/shuttle{ - dir = 8 - }, -/turf/simulated/shuttle/floor4, -/area/shuttle/escape) -"bc" = ( -/obj/machinery/door/window/southright{ - autoclose = 1; - name = "science door"; - req_access_txt = "47" - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor5" - }, -/area/shuttle/escape) -"bd" = ( -/obj/machinery/door/window/northleft{ - autoclose = 1; - name = "security door"; +"bj" = ( +/obj/machinery/door/airlock/security/glass{ + name = "Escape Shuttle Cell"; + normalspeed = 0; req_access_txt = "2" }, /turf/simulated/shuttle/floor4, /area/shuttle/escape) -"be" = ( -/obj/structure/window/reinforced{ - dir = 1 +"bk" = ( +/obj/machinery/door/airlock/mining/glass{ + name = "Escape Shuttle Cargo"; + normalspeed = 0; + req_access_txt = "50" }, -/turf/simulated/shuttle/floor{ - icon_state = "floor2" +/turf/simulated/floor/plasteel{ + dir = 8; + icon_state = "neutralfull" }, /area/shuttle/escape) -"bf" = ( -/obj/item/radio/intercom{ - dir = 8; - name = "station intercom (General)"; - pixel_x = -28 +"bl" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 4 }, -/obj/machinery/light/spot{ - tag = "icon-tube1 (WEST)"; +/obj/machinery/light{ icon_state = "tube1"; dir = 8 }, -/obj/structure/window/reinforced{ - dir = 1 - }, -/obj/structure/chair/comfy/shuttle{ - dir = 4 - }, /turf/simulated/shuttle/floor4, /area/shuttle/escape) -"bg" = ( -/obj/structure/grille, -/obj/structure/window/full/shuttle{ - icon_state = "8" - }, -/turf/simulated/floor/plating, -/area/shuttle/escape) -"bh" = ( -/obj/structure/chair/comfy/shuttle{ - dir = 4 - }, -/turf/simulated/floor/plasteel, -/area/shuttle/escape) -"bi" = ( -/obj/structure/chair/comfy/shuttle{ - dir = 8 - }, -/turf/simulated/floor/plasteel, -/area/shuttle/escape) -"bj" = ( -/obj/structure/window/reinforced{ - dir = 1 - }, -/obj/structure/chair/comfy/shuttle{ - dir = 4 - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor2" - }, -/area/shuttle/escape) -"bk" = ( -/obj/structure/window/reinforced{ - dir = 1 - }, -/obj/structure/chair/comfy/shuttle{ - dir = 8 - }, -/turf/simulated/shuttle/floor4, -/area/shuttle/escape) -"bl" = ( -/obj/machinery/door/window/northleft{ - autoclose = 1; - name = "medical door"; - req_access_txt = "5" - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor3" - }, -/area/shuttle/escape) "bm" = ( -/obj/structure/window/reinforced, -/obj/structure/chair/comfy/shuttle{ +/obj/machinery/sleeper/upgraded{ dir = 4 }, -/turf/simulated/shuttle/floor{ - icon_state = "floor2" +/turf/simulated/floor/plasteel{ + dir = 2; + icon_state = "cmo" }, /area/shuttle/escape) "bn" = ( -/obj/structure/window/reinforced{ - dir = 1 - }, +/obj/structure/table/reinforced, /turf/simulated/shuttle/floor{ - icon_state = "floor5" + icon_state = "floor2" }, /area/shuttle/escape) "bo" = ( -/obj/structure/window/reinforced, -/obj/structure/chair/comfy/shuttle{ - dir = 8 - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor2" +/obj/machinery/door/airlock/shuttle{ + aiControlDisabled = 1; + hackProof = 1; + id_tag = "s_docking_airlock"; + name = "Shuttle Hatch" }, +/turf/simulated/floor/plasteel, /area/shuttle/escape) "bp" = ( -/obj/structure/window/reinforced, /obj/structure/chair/comfy/shuttle{ + dir = 8 + }, +/obj/machinery/light{ + icon_state = "tube1"; dir = 4 }, -/turf/simulated/floor/plasteel, +/turf/simulated/shuttle/floor4, /area/shuttle/escape) "bq" = ( -/obj/structure/window/reinforced, -/obj/structure/chair/comfy/shuttle{ - dir = 8 - }, -/turf/simulated/floor/plasteel, -/area/shuttle/escape) -"br" = ( -/obj/structure/window/reinforced, -/obj/structure/chair/comfy/shuttle{ - dir = 4 - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor5" - }, -/area/shuttle/escape) -"bs" = ( -/obj/structure/closet/walllocker/emerglocker{ - pixel_x = 28 - }, -/obj/machinery/light/spot{ - tag = "icon-tube1 (EAST)"; - icon_state = "tube1"; - dir = 4 - }, -/obj/structure/window/reinforced{ - dir = 1 - }, -/obj/structure/chair/comfy/shuttle{ - dir = 8 - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor3" - }, -/area/shuttle/escape) -"bt" = ( -/obj/structure/window/reinforced, -/obj/structure/chair/comfy/shuttle{ - dir = 8 - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor5" - }, -/area/shuttle/escape) -"bu" = ( -/obj/machinery/light/spot{ - tag = "icon-tube1 (WEST)"; - icon_state = "tube1"; - dir = 8 - }, -/turf/simulated/floor/plasteel, -/area/shuttle/escape) -"bv" = ( -/obj/machinery/light/spot{ - tag = "icon-tube1 (EAST)"; - icon_state = "tube1"; - dir = 4 - }, -/turf/simulated/floor/plasteel, -/area/shuttle/escape) -"bw" = ( -/obj/machinery/door/airlock/shuttle{ - aiControlDisabled = 1; - hackProof = 1; - id_tag = "s_docking_airlock"; - name = "Shuttle Hatch" - }, -/turf/simulated/shuttle/floor, -/area/shuttle/escape) -"bx" = ( -/obj/structure/noticeboard, -/turf/simulated/shuttle/wall{ - icon_state = "swall12"; - dir = 2 - }, -/area/shuttle/escape) -"by" = ( -/obj/machinery/door/airlock/shuttle{ - aiControlDisabled = 1; - hackProof = 1; - id_tag = null; - name = "Shuttle Cargo Hatch" - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor3" - }, -/area/shuttle/escape) -"bz" = ( -/obj/structure/window/reinforced{ - dir = 1 - }, -/obj/structure/chair/comfy/shuttle{ - dir = 4 - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor3" - }, -/area/shuttle/escape) -"bA" = ( -/obj/structure/window/reinforced{ - dir = 1 - }, -/obj/structure/chair/comfy/shuttle{ - dir = 8 - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor5" - }, -/area/shuttle/escape) -"bB" = ( -/obj/structure/table, -/obj/item/storage/firstaid/o2{ - layer = 2.8; - pixel_x = 4; - pixel_y = 6 - }, -/obj/item/storage/firstaid/regular{ - pixel_x = 2; - pixel_y = 6 - }, -/obj/item/storage/firstaid/regular{ - pixel_x = -2; - pixel_y = 4 - }, -/obj/item/bodybag{ - pixel_x = 5 - }, -/obj/item/storage/firstaid/fire, -/obj/item/storage/firstaid/regular{ - pixel_x = 2; - pixel_y = 3 - }, -/turf/simulated/floor/plasteel, -/area/shuttle/escape) -"bC" = ( -/obj/machinery/door/airlock/medical/glass{ - id_tag = null; - name = "Escape Shuttle Infirmary"; - req_access_txt = "0" - }, -/turf/simulated/floor/plasteel, -/area/shuttle/escape) -"bD" = ( -/turf/simulated/shuttle/wall{ - icon_state = "swall11"; - dir = 2 - }, -/area/shuttle/escape) -"bE" = ( -/obj/machinery/door/airlock/shuttle{ - aiControlDisabled = 1; - hackProof = 1; - id_tag = "s_docking_airlock"; - name = "Shuttle Hatch" - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor2" - }, -/area/shuttle/escape) -"bF" = ( -/obj/structure/chair/comfy/shuttle{ - dir = 4 - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor3" - }, -/area/shuttle/escape) -"bG" = ( -/turf/simulated/shuttle/floor{ - icon_state = "floor3" - }, -/area/shuttle/escape) -"bH" = ( -/obj/structure/chair/comfy/shuttle{ - dir = 8 - }, -/turf/simulated/shuttle/floor{ - icon_state = "floor3" - }, -/area/shuttle/escape) -"bI" = ( -/obj/machinery/vending/wallmed{ - layer = 3.3; - name = "Emergency NanoMed"; - pixel_x = 28; - pixel_y = 0; - req_access_txt = "0" - }, -/obj/machinery/sleeper, -/turf/simulated/floor/plasteel, -/area/shuttle/escape) -"bJ" = ( -/obj/item/radio/intercom{ - dir = 4; - name = "station intercom (General)"; - pixel_x = 28 - }, -/obj/item/extinguisher, -/turf/simulated/floor/plasteel, -/area/shuttle/escape) -"bK" = ( -/obj/structure/closet/cardboard, -/obj/machinery/light/spot{ - tag = "icon-tube1 (WEST)"; - icon_state = "tube1"; - dir = 8 - }, -/turf/simulated/floor/plasteel, -/area/shuttle/escape) -"bL" = ( -/obj/machinery/recharge_station, -/turf/simulated/floor/plasteel, -/area/shuttle/escape) -"bN" = ( -/obj/structure/bed/roller, -/turf/simulated/floor/plasteel, -/area/shuttle/escape) -"bO" = ( -/obj/machinery/sleeper, -/obj/machinery/light/spot{ - tag = "icon-tube1 (EAST)"; - icon_state = "tube1"; - dir = 4 - }, -/turf/simulated/floor/plasteel, -/area/shuttle/escape) -"bP" = ( /turf/space, /turf/simulated/shuttle/wall{ icon_state = "swall_f5"; dir = 2 }, /area/shuttle/escape) -"bQ" = ( -/obj/structure/window/reinforced{ +"br" = ( +/obj/structure/chair/comfy/shuttle{ dir = 1 }, -/obj/structure/shuttle/engine/heater, -/turf/simulated/shuttle/plating, +/turf/simulated/shuttle/floor{ + icon_state = "floor2" + }, /area/shuttle/escape) -"bR" = ( +"bs" = ( +/turf/simulated/shuttle/wall{ + icon_state = "swall11"; + dir = 2 + }, +/area/shuttle/escape) +"bt" = ( +/turf/simulated/shuttle/wall{ + icon_state = "swall7"; + dir = 2 + }, +/area/shuttle/escape) +"bu" = ( /obj/structure/shuttle/engine/heater, /obj/structure/window/reinforced{ dir = 1 }, /turf/simulated/shuttle/plating, /area/shuttle/escape) -"bS" = ( +"bv" = ( /turf/space, /turf/simulated/shuttle/wall{ icon_state = "swall_f9"; dir = 2 }, /area/shuttle/escape) -"bT" = ( +"bw" = ( /obj/structure/shuttle/engine/propulsion, /turf/simulated/shuttle/plating, /area/shuttle/escape) +"bx" = ( +/obj/structure/bed/roller, +/obj/machinery/iv_drip, +/obj/machinery/light, +/turf/simulated/floor/plasteel{ + tag = "icon-whiteblue (EAST)"; + icon_state = "whiteblue"; + dir = 4 + }, +/area/shuttle/escape) +"by" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor2" + }, +/area/shuttle/escape) +"bz" = ( +/turf/simulated/shuttle/floor{ + icon_state = "floor2" + }, +/area/shuttle/escape) +"bA" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 8 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor2" + }, +/area/shuttle/escape) +"bB" = ( +/obj/structure/table/reinforced, +/turf/simulated/shuttle/floor{ + icon_state = "floor5" + }, +/area/shuttle/escape) +"bC" = ( +/obj/structure/sign/directions/engineering, +/turf/simulated/shuttle/wall{ + icon_state = "swall12"; + dir = 2 + }, +/area/shuttle/escape) +"bD" = ( +/obj/machinery/door/airlock/shuttle{ + aiControlDisabled = 1; + hackProof = 1; + id_tag = "s_docking_airlock"; + name = "Shuttle Hatch" + }, +/obj/docking_port/mobile/emergency{ + dir = 4; + dwidth = 11; + height = 18; + timid = 1; + width = 29 + }, +/turf/simulated/floor/plasteel, +/area/shuttle/escape) +"bE" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 1 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor5" + }, +/area/shuttle/escape) +"bF" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 4 + }, +/turf/simulated/floor/plasteel{ + dir = 2; + icon_state = "cmo" + }, +/area/shuttle/escape) +"bG" = ( +/obj/machinery/status_display, +/turf/simulated/shuttle/wall{ + tag = "icon-swall14"; + icon_state = "swall14"; + dir = 2 + }, +/area/shuttle/escape) +"bH" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 8 + }, +/obj/machinery/light{ + icon_state = "tube1"; + dir = 4 + }, +/turf/simulated/floor/plasteel{ + dir = 2; + icon_state = "cmo" + }, +/area/shuttle/escape) +"bI" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor5" + }, +/area/shuttle/escape) +"bJ" = ( +/turf/simulated/shuttle/floor{ + icon_state = "floor5" + }, +/area/shuttle/escape) +"bK" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 8 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor5" + }, +/area/shuttle/escape) +"bL" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 4 + }, +/obj/machinery/light{ + icon_state = "tube1"; + dir = 8 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor2" + }, +/area/shuttle/escape) +"bM" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 8 + }, +/obj/machinery/light{ + icon_state = "tube1"; + dir = 4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor2" + }, +/area/shuttle/escape) +"bO" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 4 + }, +/obj/machinery/light{ + icon_state = "tube1"; + dir = 8 + }, +/turf/simulated/floor/plasteel{ + icon_state = "bot"; + dir = 1 + }, +/area/shuttle/escape) +"bP" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 4 + }, +/turf/simulated/floor/plasteel{ + icon_state = "bot"; + dir = 1 + }, +/area/shuttle/escape) +"bQ" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 8 + }, +/turf/simulated/floor/plasteel{ + icon_state = "bot"; + dir = 1 + }, +/area/shuttle/escape) +"bR" = ( +/obj/structure/flora/ausbushes/grassybush, +/obj/structure/flora/ausbushes/lavendergrass, +/obj/structure/flora/ausbushes/ppflowers, +/obj/structure/flora/ausbushes/sunnybush, +/obj/structure/window/full/shuttle, +/turf/simulated/floor/grass, +/area/shuttle/escape) +"bS" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 4 + }, +/obj/machinery/light{ + icon_state = "tube1"; + dir = 8 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor5" + }, +/area/shuttle/escape) +"bT" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 8 + }, +/obj/machinery/light{ + icon_state = "tube1"; + dir = 4 + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor5" + }, +/area/shuttle/escape) "bU" = ( -/turf/space, +/obj/structure/sign/directions/science, +/turf/simulated/shuttle/wall{ + icon_state = "swall12"; + dir = 2 + }, +/area/shuttle/escape) +"bV" = ( +/obj/structure/sign/directions/cargo, +/turf/simulated/shuttle/wall{ + icon_state = "swall12"; + dir = 2 + }, +/area/shuttle/escape) +"bW" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 4 + }, +/obj/machinery/recharger/wallcharger{ + pixel_x = -24 + }, +/turf/simulated/shuttle/floor4, +/area/shuttle/escape) +"bX" = ( +/obj/machinery/ai_status_display, +/turf/simulated/shuttle/wall{ + icon_state = "swall3"; + dir = 2 + }, +/area/shuttle/escape) +"bY" = ( +/obj/structure/flora/ausbushes/grassybush, +/obj/structure/flora/ausbushes/lavendergrass, +/obj/structure/flora/ausbushes/ywflowers, +/obj/structure/flora/ausbushes/fernybush, +/obj/structure/window/full/shuttle, +/turf/simulated/floor/grass, +/area/shuttle/escape) +"bZ" = ( +/obj/machinery/recharge_station/upgraded, +/turf/simulated/floor/plasteel{ + dir = 8; + icon_state = "neutralfull" + }, +/area/shuttle/escape) +"ca" = ( +/obj/machinery/light, +/turf/simulated/floor/plasteel{ + dir = 8; + icon_state = "neutralfull" + }, +/area/shuttle/escape) +"cb" = ( +/obj/machinery/door/airlock/engineering/glass{ + name = "Escape Shuttle Engineering"; + normalspeed = 0; + req_access_txt = "32"; + req_one_access_txt = "0" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor2" + }, +/area/shuttle/escape) +"cc" = ( +/obj/structure/extinguisher_cabinet, +/turf/simulated/shuttle/wall{ + icon_state = "swall3"; + dir = 2 + }, +/area/shuttle/escape) +"cd" = ( +/obj/machinery/door/airlock/research/glass{ + name = "Escape Shuttle Research"; + normalspeed = 0; + req_access_txt = "47" + }, +/turf/simulated/shuttle/floor{ + icon_state = "floor5" + }, +/area/shuttle/escape) +"cf" = ( +/turf/simulated/shuttle/wall{ + icon_state = "swallc4" + }, +/area/shuttle/escape) +"ck" = ( +/obj/structure/chair/comfy/shuttle{ + dir = 8 + }, +/obj/machinery/light{ + icon_state = "tube1"; + dir = 4 + }, +/turf/simulated/floor/plasteel{ + icon_state = "bot"; + dir = 1 + }, +/area/shuttle/escape) +"cp" = ( +/turf/simulated/floor/plasteel{ + dir = 2; + icon_state = "cmo" + }, +/area/shuttle/escape) +"cw" = ( +/obj/structure/bed/roller, +/obj/machinery/iv_drip, +/turf/simulated/floor/plasteel{ + tag = "icon-whiteblue (EAST)"; + icon_state = "whiteblue"; + dir = 4 + }, +/area/shuttle/escape) +"cA" = ( +/obj/machinery/light{ + icon_state = "tube1"; + dir = 8 + }, +/obj/structure/chair/comfy/shuttle{ + dir = 4 + }, +/turf/simulated/floor/plasteel{ + icon_state = "bot"; + dir = 1 + }, +/area/shuttle/escape) +"cD" = ( +/obj/structure/table/reinforced, +/obj/item/storage/backpack/medic, +/obj/item/storage/belt/medical, +/turf/simulated/floor/plasteel{ + dir = 2; + icon_state = "cmo" + }, +/area/shuttle/escape) +"cE" = ( +/obj/structure/bed/roller, +/turf/simulated/floor/plasteel{ + dir = 2; + icon_state = "cmo" + }, +/area/shuttle/escape) +"cG" = ( +/obj/structure/table/reinforced, +/obj/item/clothing/gloves/color/latex/nitrile, +/obj/item/clothing/mask/breath, +/turf/simulated/floor/plasteel{ + dir = 2; + icon_state = "cmo" + }, +/area/shuttle/escape) +"cH" = ( +/turf/simulated/shuttle/wall{ + icon_state = "wall3" + }, +/area/shuttle/escape) +"sc" = ( +/obj/machinery/door/airlock/medical/glass{ + id_tag = null; + name = "Escape Shuttle Medical Seating"; + normalspeed = 0; + req_access_txt = "5" + }, +/turf/simulated/floor/plasteel{ + dir = 2; + icon_state = "cmo" + }, +/area/shuttle/escape) +"xD" = ( +/obj/structure/table/reinforced, +/obj/item/reagent_containers/iv_bag/blood/random, +/obj/item/reagent_containers/iv_bag/blood/random, +/obj/item/reagent_containers/iv_bag/blood/random, +/obj/item/reagent_containers/iv_bag/blood/random, +/obj/item/reagent_containers/iv_bag/blood/random, +/obj/item/reagent_containers/iv_bag/blood/random, +/turf/simulated/floor/plasteel{ + tag = "icon-whiteblue (EAST)"; + icon_state = "whiteblue"; + dir = 4 + }, +/area/shuttle/escape) +"PY" = ( +/obj/structure/table/reinforced, +/obj/item/storage/firstaid/machine{ + pixel_x = -5; + pixel_y = -5 + }, +/obj/item/storage/firstaid/regular, +/obj/item/storage/firstaid/adv{ + pixel_x = 5; + pixel_y = 5 + }, +/turf/simulated/floor/plasteel{ + dir = 2; + icon_state = "cmo" + }, +/area/shuttle/escape) +"Qf" = ( +/obj/machinery/defibrillator_mount/loaded, +/turf/simulated/shuttle/wall{ + icon_state = "swall12"; + dir = 2 + }, +/area/shuttle/escape) +"UN" = ( +/obj/structure/chair/comfy/shuttle, +/turf/simulated/shuttle/floor4, +/area/shuttle/escape) +"Wy" = ( +/obj/structure/chair/comfy/shuttle, +/obj/machinery/light{ + dir = 1; + on = 1 + }, +/turf/simulated/shuttle/floor4, /area/shuttle/escape) (1,1,1) = {" aa -aa -aa -aa -aa ab -ap -ap -ap -aP -aS -aT -ap -aB -bg -aJ -ap -bw -aS -bE +aq ac -ap -bP +aq +aP +aq +aq +aq +bo +aP +bD +aq +ac +ac +ac +aq +bo +aq +bo +bt +aq +ac +ac +aq +aq +bt +bq aa "} (2,1,1) = {" aa -aa -ab -ap -ap -aw +av +az +bl +az +ac +az +bW az aH -aI -aI -ae -aU -bf -aW -bj -bm -bu -aU -ae -aU -aU -bK -ax +aN +ba bP +bO +bP +bP +bP +ba +aT +ba +bR +bP +cA +bP +bP +bP +av +cH +cH "} (3,1,1) = {" aa -ab -af -aq -aq -ae -aA -aI -aI -aI -ae -aU -bd -aI -be -aV -aU -aU -bx -aU -aU -bL -bQ -bT +ac +aH +aH +aH +bj +aH +aH +aH +aH +av +ba +ba +ba +ba +ba +ba +ba +ba +ba +bV +ba +ba +ba +ba +ba +av +bu +bw "} (4,1,1) = {" aa -ae -ai -al -aq -ae -az -aI -aI -aQ -ae -aU -bk -bb +av aX -bo -aU -aU -by -aU -aU -bL +bp +aX +ac +aH +aH +aH +aR +av +ba bQ -bT +bQ +bQ +bQ +bQ +bQ +ba +ba +bk +ba +ba +ba +ba +ba +ac +bu +bw "} (5,1,1) = {" -aa -ae -aj -al +ab +bs +aq +aq aq -ae -az -aI -aI -aQ -ae -aU -aB -bg -bg -aJ -aU -aU -aB -bg -bg -aJ aw -bS +Wy +aH +aH +bg +av +ba +bP +bP +bP +bP +bP +bP +ba +ba +bR +bQ +ck +bQ +bQ +bQ +av +cH +cH "} (6,1,1) = {" -ab -af -ak -al -aq -ax -aB -aJ -aM -aB -aJ -aU -aY -bh -bh -bp -aU -aU -aY -bh -bh -bh +av ae -bU +am +ar +ay +aD +aJ +aH +aH +aH +aW +ba +ba +ba +ba +ba +ba +ba +ba +ca +bG +bY +cc +bR +bX +bY +aw +cH +cH "} (7,1,1) = {" ac -ag -al -aq -aq -ay -aC -aC -aC -aC -aC -aU -aU -aU -aU -aU -aU -aU -aU -aU -aU -aU -ae -bU +af +an +as +aA +av +UN +aG +aH +aH +aW +ba +bQ +bQ +bQ +bQ +bQ +bQ +ba +ba +bR +by +bL +by +by +bn +av +cH +cH "} (8,1,1) = {" -ad -ah -am +ac +ag +ao +an +bh +aZ aq aq -ae -aD -aD -aD -aD -aD -aU -aZ -bi -bi -bq -aU -aU -aZ -bi -bi -bi -ae -bU +aW +ac +cf +ba +bP +bP +bP +bP +bP +bP +ba +ba +bC +bz +bz +bz +bz +br +av +bu +bw "} (9,1,1) = {" -aa -ae +ac +ah +ao +an an -al -aq -ae aE +an +an +an +an aE -aE -aE -aE -aU -aB -bg -bg -aJ -aU -aU -aB -bg -bg -aJ -aw -bP +ba +ba +ba +ba +ba +ba +ba +ba +ba +cb +bz +bz +bz +bz +br +ac +bu +bw "} (10,1,1) = {" -aa -ae +ac +ai ao -al -aq -ae -aC -aC -aC -aC -aC -aU -bz -bF +an +an +aE +an +an +an +an +aE +ba +ba +ba +ba +ba +ba +ba +ba ba -br -aU -aU -bC -aU -aU -bN bR -bT +bz +bz +bz +bz +br +av +bu +bw "} (11,1,1) = {" -aa -ad -ah -aq -aq -ae -aF -aK -aN -aR -aC -aU -bl -bG -bn -bc -aU -aU ac -aU -aU -bB +aj +ao +at +an +aZ +aq +aq +aL +ac +bb +ba +bQ +bQ +bQ +bQ +bQ +bQ +ba +ba bR -bT +bA +bM +bA +bA +bn +av +bu +bw "} (12,1,1) = {" -aa -aa -ad -ap -ap +ac +ak +an +au +aB +av +bm +cp +cp +cp +aI +ba +bP +bP +bP +bP +bP +bP +ba +ca +bG +bY +cc +bR +bX +bY aw -aG -aL -aO -aR -aC -aU -bs -bH -bA -bt -bv -aU -ae -bI -bJ -bO -ax -bS +cH +cH "} (13,1,1) = {" +av +al +ap +ax +aC +aD +bm +cp +cp +cp +aI +ba +ba +ba +ba +ba +ba +ba +ba +ba +bR +bI +bS +bI +bI +bB +av +cH +cH +"} +(14,1,1) = {" +ad +bt +aq +aq +aq +aw +bc +cp +cp +bx +av +ba +aS +aU +aU +aU +aU +aS +ba +ba +bU +bJ +bJ +bJ +bJ +bE +av +cH +cH +"} +(15,1,1) = {" aa +av +bF +aM +bF +Qf +cE +cp +cp +cw +av +ba +aO +aV +aV +aV +aV +aU +ba +ba +cd +bJ +bJ +bJ +bJ +bE +ac +bu +bw +"} +(16,1,1) = {" aa +ac +cp +cp +cp +sc +cp +cp +cp +xD +av +ba +aS +aS +aS +aS +aV +aU +ba +ba +bR +bJ +bJ +bJ +bJ +bE +av +bu +bw +"} +(17,1,1) = {" aa -aa +av +aF +bH +aF +av +cG +PY +cD +bf +av +aT +aS +bd +be +bi +aV +aU +bZ +bZ +bR +bK +bT +bK +bK +bB +av +cH +cH +"} +(18,1,1) = {" aa ad -ap -ap -ap +aq ac -ap -ap -ap -aB -bg -aJ -ap +aq +bs +aq +aq +aq +aq +bs ac -bD -ap -ap -ap -bS +ac +ac +ac +ac +ac +aq +ac +ac +bs +ac +aq +ac +ac +ac +bs +bv aa "} diff --git a/_maps/metastation.dm b/_maps/metastation.dm index 7747ad79fb8..0941ffc453a 100644 --- a/_maps/metastation.dm +++ b/_maps/metastation.dm @@ -23,7 +23,7 @@ z7 = empty space #define MAP_TRANSITION_CONFIG list(\ DECLARE_LEVEL(MAIN_STATION, CROSSLINKED, list(STATION_LEVEL, STATION_CONTACT, REACHABLE, AI_OK)),\ DECLARE_LEVEL(CENTCOMM, SELFLOOPING, list(ADMIN_LEVEL, BLOCK_TELEPORT, IMPEDES_MAGIC)),\ -DECLARE_LEVEL(MINING, SELFLOOPING, list(REACHABLE, STATION_CONTACT, HAS_WEATHER, ORE_LEVEL, AI_OK))) +DECLARE_LEVEL(MINING, SELFLOOPING, list(ORE_LEVEL, REACHABLE, STATION_CONTACT, HAS_WEATHER, AI_OK))) #define USING_MAP_DATUM /datum/map/metastation diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm index 66ffca0aef5..5725a7a8e9b 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm @@ -128,66 +128,56 @@ /obj/machinery/atmospherics/unary/vent_pump/process_atmos() ..() - if((stat & (NOPOWER|BROKEN))) - return 0 + if(stat & (NOPOWER|BROKEN)) + return FALSE if(!node) - on = 0 + on = FALSE //broadcast_status() // from now air alarm/control computer should request update purposely --rastaf0 if(!on) - return 0 + return FALSE if(welded) if(air_contents.return_pressure() >= weld_burst_pressure && prob(5)) //the weld is on but the cover is welded shut, can it withstand the internal pressure? visible_message("The welded cover of [src] bursts open!") - for(var/mob/M in range(1, src)) + for(var/mob/living/M in range(1)) unsafe_pressure_release(M, air_contents.return_pressure()) //let's send everyone flying welded = FALSE update_icon() - return 0 + return FALSE var/datum/gas_mixture/environment = loc.return_air() var/environment_pressure = environment.return_pressure() - if(pump_direction) //internal -> external var/pressure_delta = 10000 - - if(pressure_checks&1) + if(pressure_checks & 1) pressure_delta = min(pressure_delta, (external_pressure_bound - environment_pressure)) - if(pressure_checks&2) + if(pressure_checks & 2) pressure_delta = min(pressure_delta, (air_contents.return_pressure() - internal_pressure_bound)) - if(pressure_delta > 0.5) - if(air_contents.temperature > 0) - var/transfer_moles = pressure_delta*environment.volume/(air_contents.temperature * R_IDEAL_GAS_EQUATION) - - var/datum/gas_mixture/removed = air_contents.remove(transfer_moles) - - loc.assume_air(removed) - air_update_turf() - - parent.update = 1 + if(pressure_delta > 0.5 && air_contents.temperature > 0) + var/transfer_moles = pressure_delta * environment.volume / (air_contents.temperature * R_IDEAL_GAS_EQUATION) + var/datum/gas_mixture/removed = air_contents.remove(transfer_moles) + loc.assume_air(removed) + air_update_turf() + parent.update = TRUE else //external -> internal var/pressure_delta = 10000 - if(pressure_checks&1) + if(pressure_checks & 1) pressure_delta = min(pressure_delta, (environment_pressure - external_pressure_bound)) - if(pressure_checks&2) + if(pressure_checks & 2) pressure_delta = min(pressure_delta, (internal_pressure_bound - air_contents.return_pressure())) - if(pressure_delta > 0.5) - if(environment.temperature > 0) - var/transfer_moles = pressure_delta*air_contents.volume/(environment.temperature * R_IDEAL_GAS_EQUATION) + if(pressure_delta > 0.5 && environment.temperature > 0) + var/transfer_moles = pressure_delta * air_contents.volume / (environment.temperature * R_IDEAL_GAS_EQUATION) + var/datum/gas_mixture/removed = loc.remove_air(transfer_moles) + if(isnull(removed)) //in space + return + air_contents.merge(removed) + air_update_turf() + parent.update = TRUE - var/datum/gas_mixture/removed = loc.remove_air(transfer_moles) - if(isnull(removed)) //in space - return - - air_contents.merge(removed) - air_update_turf() - - parent.update = 1 - - return 1 + return TRUE //Radio remote control @@ -386,11 +376,11 @@ if(I.use_tool(src, user, 20, volume = I.tool_volume)) if(!welded) welded = TRUE - visible_message("[user] welds [src] shut!",\ + user.visible_message("[user] welds [src] shut!",\ "You weld [src] shut!") else welded = FALSE - visible_message("[user] unwelds [src]!",\ + user.visible_message("[user] unwelds [src]!",\ "You unweld [src]!") update_icon() diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm index ed06dd68ce6..bbd5e760d2f 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm @@ -404,10 +404,10 @@ if(I.use_tool(src, user, 20, volume = I.tool_volume)) if(!welded) welded = TRUE - visible_message("[user] welds [src] shut!",\ + user.visible_message("[user] welds [src] shut!",\ "You weld [src] shut!") else welded = FALSE - visible_message("[user] unwelds [src]!",\ + user.visible_message("[user] unwelds [src]!",\ "You unweld [src]!") update_icon() diff --git a/code/_DATASTRUCTURES/stacks.dm b/code/_DATASTRUCTURES/stacks.dm deleted file mode 100644 index b310a3b9401..00000000000 --- a/code/_DATASTRUCTURES/stacks.dm +++ /dev/null @@ -1,56 +0,0 @@ -/datum/stack - var/list/stack = list() - var/max_elements = 0 - -/datum/stack/New(list/elements,max) - ..() - if(elements) - stack = elements.Copy() - if(max) - max_elements = max - -/datum/stack/proc/Pop() - if(is_empty()) - return null - . = stack[stack.len] - stack.Cut(stack.len,0) - -/datum/stack/proc/Push(element) - if(max_elements && (stack.len+1 > max_elements)) - return null - stack += element - -/datum/stack/proc/Top() - if(is_empty()) - return null - . = stack[stack.len] - -/datum/stack/proc/is_empty() - . = stack.len ? 0 : 1 - -//Rotate entire stack left with the leftmost looping around to the right -/datum/stack/proc/RotateLeft() - if(is_empty()) - return 0 - . = stack[1] - stack.Cut(1,2) - Push(.) - -//Rotate entire stack to the right with the rightmost looping around to the left -/datum/stack/proc/RotateRight() - if(is_empty()) - return 0 - . = stack[stack.len] - stack.Cut(stack.len,0) - stack.Insert(1,.) - - -/datum/stack/proc/Copy() - var/datum/stack/S=new() - S.stack = stack.Copy() - S.max_elements = max_elements - return S - - -/datum/stack/proc/Clear() - stack.Cut() diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index 10aa1718dda..26b1d2d44aa 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -726,3 +726,7 @@ #define COMSIG_XENO_TURF_CLICK_CTRL "xeno_turf_click_alt" ///from monkey CtrlClickOn(): (/mob) #define COMSIG_XENO_MONKEY_CLICK_CTRL "xeno_monkey_click_ctrl" + +///SSalarm signals +#define COMSIG_TRIGGERED_ALARM "ssalarm_triggered" +#define COMSIG_CANCELLED_ALARM "ssalarm_cancelled" diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index ed4cb0d5940..ee1cd3fa762 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -7,6 +7,7 @@ #define PLANE_SPACE_PARALLAX -90 #define FLOOR_PLANE -2 +#define FLOOR_OVERLAY_PLANE -1.5 #define GAME_PLANE -1 #define BLACKNESS_PLANE 0 //To keep from conflicts with SEE_BLACKNESS internals diff --git a/code/__DEFINES/logs.dm b/code/__DEFINES/logs.dm index 25d1fac7323..96fac582283 100644 --- a/code/__DEFINES/logs.dm +++ b/code/__DEFINES/logs.dm @@ -4,3 +4,8 @@ #define SAY_LOG "Say" #define EMOTE_LOG "Emote" #define MISC_LOG "Misc" +#define DEADCHAT_LOG "Deadchat" +#define OOC_LOG "OOC" +#define LOOC_LOG "LOOC" + +#define ALL_LOGS list(ATTACK_LOG, DEFENSE_LOG, CONVERSION_LOG, SAY_LOG, EMOTE_LOG, DEADCHAT_LOG, OOC_LOG, LOOC_LOG, MISC_LOG) diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index ad5e5df7583..0a36db1b185 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -69,9 +69,6 @@ #define ZONE_ACTIVE 1 #define ZONE_SLEEPING 0 -#define shuttle_time_in_station 1800 // 3 minutes in the station -#define shuttle_time_to_arrive 6000 // 10 minutes to arrive - #define EVENT_LEVEL_MUNDANE 1 #define EVENT_LEVEL_MODERATE 2 #define EVENT_LEVEL_MAJOR 3 @@ -245,28 +242,75 @@ 0.4,0.6,0.0,\ 0.2,0.2,0.6) -#define LIST_REPLACE_RENAME list("rebeccapurple" = "dark purple", "darkslategrey" = "dark grey", "darkolivegreen" = "dark green", "darkslateblue" = "dark blue",\ - "darkkhaki" = "khaki", "darkseagreen" = "light green", "midnightblue" = "blue", "lightgrey" = "light grey", "darkgrey" = "dark grey",\ - "steelblue" = "blue", "goldenrod" = "gold") +/* + Used for wire name appearances. Replaces the color name on the left with the one on the right. + The color on the left is the one used as the actual color of the wire, but it doesn't look good when written. + So, we need to replace the name to something that looks better. +*/ +#define LIST_COLOR_RENAME \ + list( \ + "rebeccapurple" = "dark purple",\ + "darkslategrey" = "dark grey", \ + "darkolivegreen"= "dark green", \ + "darkslateblue" = "dark blue", \ + "darkkhaki" = "khaki", \ + "darkseagreen" = "light green",\ + "midnightblue" = "blue", \ + "lightgrey" = "light grey", \ + "darkgrey" = "dark grey", \ + "steelblue" = "blue", \ + "goldenrod" = "gold" \ + ) -#define LIST_GREYSCALE_REPLACE list("red" = "lightgrey", "blue" = "grey", "green" = "grey", "orange" = "lightgrey", "brown" = "grey",\ - "gold" = "lightgrey", "cyan" = "lightgrey", "navy" = "grey", "purple" = "grey", "pink"= "lightgrey") +/// Pure Black and white colorblindness. Every species except Vulpkanins and Tajarans will have this. +#define GREYSCALE_COLOR_REPLACE \ + list( \ + "red" = "grey", \ + "blue" = "grey", \ + "green" = "grey", \ + "orange" = "light grey", \ + "brown" = "grey", \ + "gold" = "light grey", \ + "cyan" = "silver", \ + "magenta" = "grey", \ + "purple" = "grey", \ + "pink" = "light grey" \ + ) -#define LIST_VULP_REPLACE list("pink" = "beige", "orange" = "goldenrod", "gold" = "goldenrod", "red" = "darkolivegreen", "brown" = "darkolivegreen",\ - "green" = "darkslategrey", "cyan" = "steelblue", "purple" = "darkslategrey", "navy" = "midnightblue") - -#define LIST_TAJ_REPLACE list("red" = "rebeccapurple", "brown" = "rebeccapurple", "purple" = "darkslateblue", "blue" = "darkslateblue",\ - "green" = "darkolivegreen", "orange" = "darkkhaki", "gold" = "darkkhaki", "cyan" = "darkseagreen", \ - "navy" = "midnightblue", "pink" = "lightgrey") +/// Red colorblindness. Vulpkanins/Wolpins have this. +#define PROTANOPIA_COLOR_REPLACE \ + list( \ + "red" = "darkolivegreen", \ + "green" = "darkslategrey", \ + "orange" = "goldenrod", \ + "gold" = "goldenrod", \ + "brown" = "darkolivegreen", \ + "cyan" = "steelblue", \ + "magenta" = "blue", \ + "purple" = "darkslategrey", \ + "pink" = "beige" \ + ) +/// Yellow-Blue colorblindness. Tajarans/Farwas have this. +#define TRITANOPIA_COLOR_REPLACE \ + list( \ + "red" = "rebeccapurple", \ + "blue" = "darkslateblue", \ + "green" = "darkolivegreen", \ + "orange" = "darkkhaki", \ + "gold" = "darkkhaki", \ + "brown" = "rebeccapurple", \ + "cyan" = "darkseagreen", \ + "magenta" = "darkslateblue", \ + "purple" = "darkslateblue", \ + "pink" = "lightgrey" \ + ) //Gun trigger guards #define TRIGGER_GUARD_ALLOW_ALL -1 #define TRIGGER_GUARD_NONE 0 #define TRIGGER_GUARD_NORMAL 1 -#define CLIENT_FROM_VAR(I) (ismob(I) ? I:client : (istype(I, /client) ? I : (istype(I, /datum/mind) ? I:current?:client : null))) - // Macro to get the current elapsed round time, rather than total world runtime #define ROUND_TIME (SSticker.round_start_time ? (world.time - SSticker.round_start_time) : 0) diff --git a/code/__DEFINES/stat.dm b/code/__DEFINES/stat.dm index c9763e4836c..9c115bed86f 100644 --- a/code/__DEFINES/stat.dm +++ b/code/__DEFINES/stat.dm @@ -22,16 +22,9 @@ // these define the time taken for the shuttle to get to SS13 // and the time before it leaves again -#define SHUTTLE_PREPTIME 300 // 5 minutes = 300 seconds - after this time, the shuttle departs centcom and cannot be recalled -#define SHUTTLE_LEAVETIME 180 // 3 minutes = 180 seconds - the duration for which the shuttle will wait at the station after arriving -#define SHUTTLE_TRANSIT_DURATION 300 // 5 minutes = 300 seconds - how long it takes for the shuttle to get to the station -#define SHUTTLE_TRANSIT_DURATION_RETURN 120 // 2 minutes = 120 seconds - for some reason it takes less time to come back, go figure. - -//Ferry shuttle processing status -#define IDLE_STATE 0 -#define WAIT_LAUNCH 1 -#define WAIT_ARRIVE 2 -#define WAIT_FINISH 3 +#define SHUTTLE_CALLTIME 6000 //10 minutes = 6000 deciseconds - time taken for emergency shuttle to reach the station when called (in deciseconds) +#define SHUTTLE_DOCKTIME 1800 //3 minutes = 1800 deciseconds - time taken for emergency shuttle to leave again once it has docked (in deciseconds) +#define SHUTTLE_ESCAPETIME 1200 //2 minutes = 1200 deciseconds - time taken for emergency shuttle to reach a safe distance after leaving station (in deciseconds) //shuttle mode defines #define SHUTTLE_IGNITING 0 diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 652d39972e7..6e3603f83a3 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -82,8 +82,7 @@ #define INIT_ORDER_NANOMOB -23 #define INIT_ORDER_SQUEAK -40 #define INIT_ORDER_PATH -50 -#define INIT_ORDER_PERSISTENCE -95 -#define INIT_ORDER_CHAT -100 //Should be last to ensure chat remains smooth during init. +#define INIT_ORDER_PERSISTENCE -95 // 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) @@ -115,7 +114,6 @@ #define FIRE_PRIORITY_MOBS 100 #define FIRE_PRIORITY_NANOUI 110 #define FIRE_PRIORITY_TICKER 200 -#define FIRE_PRIORITY_CHAT 400 #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/__DEFINES/wires.dm b/code/__DEFINES/wires.dm new file mode 100644 index 00000000000..f7ea1c3cf38 --- /dev/null +++ b/code/__DEFINES/wires.dm @@ -0,0 +1,77 @@ +// Wire defines for all machines/items. + +// Miscellaneous +#define WIRE_DUD_PREFIX "__dud" + +// General +#define WIRE_IDSCAN "ID Scan" +#define WIRE_MAIN_POWER1 "Primary Power" +#define WIRE_MAIN_POWER2 "Secondary Power" +#define WIRE_AI_CONTROL "AI Control" +#define WIRE_ELECTRIFY "Electrification" +#define WIRE_SAFETY "Safety" + +// Vendors and smartfridges +#define WIRE_THROW_ITEM "Item Throw" +#define WIRE_CONTRABAND "Contraband" + +// Airlock +#define WIRE_DOOR_BOLTS "Door Bolts" +#define WIRE_BACKUP_POWER1 "Primary Backup Power" +#define WIRE_OPEN_DOOR "Door State" +#define WIRE_SPEED "Door Timing" +#define WIRE_BOLT_LIGHT "Bolt Lights" + +// Air alarm +#define WIRE_SYPHON "Siphon" +#define WIRE_AALARM "Atmospherics Alarm" + +// Camera +#define WIRE_FOCUS "Focus" + +// Mulebot +#define WIRE_MOB_AVOIDANCE "Mob Avoidance" +#define WIRE_LOADCHECK "Load Checking" +#define WIRE_MOTOR1 "Primary Motor" +#define WIRE_MOTOR2 "Secondary Motor" +#define WIRE_REMOTE_RX "Signal Receiver" +#define WIRE_REMOTE_TX "Signal Sender" +#define WIRE_BEACON_RX "Beacon Receiver" + +// Explosives, bombs +#define WIRE_EXPLODE "Explode" // Explodes if pulsed or cut while active, defuses a bomb that isn't active on cut. +#define WIRE_BOMB_UNBOLT "Unbolt" // Unbolts the bomb if cut, hint on pulsed. +#define WIRE_BOMB_DELAY "Delay" // Raises the timer on pulse, does nothing on cut. +#define WIRE_BOMB_PROCEED "Proceed" // Lowers the timer, explodes if cut while the bomb is active. +#define WIRE_BOMB_ACTIVATE "Activate" // Will start a bombs timer if pulsed, will hint if pulsed while already active, will stop a timer a bomb on cut. + +// Nuclear bomb +#define WIRE_BOMB_LIGHT "Bomb Light" +#define WIRE_BOMB_TIMING "Bomb Timing" +#define WIRE_BOMB_SAFETY "Bomb Safety" + +// Particle accelerator +#define WIRE_PARTICLE_POWER "Power Toggle" // Toggles whether the PA is on or not. +#define WIRE_PARTICLE_STRENGTH "Strength" // Determines the strength of the PA. +#define WIRE_PARTICLE_INTERFACE "Interface" // Determines the interface showing up. +#define WIRE_PARTICLE_POWER_LIMIT "Maximum Power" // Determines how strong the PA can be. + +// Autolathe +#define WIRE_AUTOLATHE_HACK "Hack" +#define WIRE_AUTOLATHE_DISABLE "Disable" + +// Radio +#define WIRE_RADIO_SIGNAL "Signal" +#define WIRE_RADIO_RECEIVER "Receiver" +#define WIRE_RADIO_TRANSMIT "Transmitter" + +// Cyborg +#define WIRE_BORG_LOCKED "Lockdown" +#define WIRE_BORG_CAMERA "Camera" +#define WIRE_BORG_LAWCHECK "Law Check" + +// Suit storage unit +#define WIRE_SSU_UV "UV wire" + +// Tesla coil +#define WIRE_TESLACOIL_ZAP "Zap" diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index bd077204f00..829c2c4fade 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -5,11 +5,11 @@ var/turf/T = get_turf(A) return T ? T.loc : null -/proc/get_area_name(N) //get area by its name - for(var/area/A in world) - if(A.name == N) - return A - return 0 +/proc/get_area_name(atom/X, format_text = FALSE) + var/area/A = isarea(X) ? X : get_area(X) + if(!A) + return null + return format_text ? format_text(A.name) : A.name /proc/get_location_name(atom/X, format_text = FALSE) var/area/A = isarea(X) ? X : get_area(X) @@ -31,6 +31,24 @@ areas |= T.loc return areas +/proc/get_open_turf_in_dir(atom/center, dir) + var/turf/T = get_ranged_target_turf(center, dir, 1) + if(T && !T.density) + return T + +/proc/get_adjacent_open_turfs(atom/center) + . = list(get_open_turf_in_dir(center, NORTH), + get_open_turf_in_dir(center, SOUTH), + get_open_turf_in_dir(center, EAST), + get_open_turf_in_dir(center, WEST)) + listclearnulls(.) + +/proc/get_adjacent_open_areas(atom/center) + . = list() + var/list/adjacent_turfs = get_adjacent_open_turfs(center) + for(var/I in adjacent_turfs) + . |= get_area(I) + // Like view but bypasses luminosity check /proc/hear(var/range, var/atom/source) @@ -425,66 +443,8 @@ if(pressure <= LAVALAND_EQUIPMENT_EFFECT_PRESSURE) . = TRUE -proc/pollCandidates(Question, be_special_type, antag_age_check = FALSE, poll_time = 300, ignore_respawnability = FALSE, min_hours = 0, flashwindow = TRUE, check_antaghud = TRUE) - var/roletext = be_special_type ? get_roletext(be_special_type) : null - var/list/mob/dead/observer/candidates = list() - var/time_passed = world.time - if(!Question) - Question = "Would you like to be a special role?" - - for(var/mob/dead/observer/G in (ignore_respawnability ? GLOB.player_list : GLOB.respawnable_list)) - if(!G.key || !G.client) - continue - if(be_special_type) - if(!(be_special_type in G.client.prefs.be_special)) - continue - if(antag_age_check) - if(!player_old_enough_antag(G.client, be_special_type)) - continue - if(roletext) - if(jobban_isbanned(G, roletext) || jobban_isbanned(G, "Syndicate")) - continue - if(config.use_exp_restrictions && min_hours) - if(G.client.get_exp_type_num(EXP_TYPE_LIVING) < min_hours * 60) - continue - if(check_antaghud && cannotPossess(G)) - continue - spawn(0) - G << 'sound/misc/notice2.ogg'//Alerting them to their consideration - if(flashwindow) - window_flash(G.client) - var/ans = alert(G,Question,"Please answer in [poll_time/10] seconds!","No","Yes","Not This Round") - if(!G?.client) - return - switch(ans) - if("Yes") - to_chat(G, "Choice registered: Yes.") - if((world.time-time_passed)>poll_time)//If more than 30 game seconds passed. - to_chat(G, "Sorry, you were too late for the consideration!") - G << 'sound/machines/buzz-sigh.ogg' - return - candidates += G - if("No") - to_chat(G, "Choice registered: No.") - return - if("Not This Round") - to_chat(G, "Choice registered: No.") - to_chat(G, "You will no longer receive notifications for the role '[roletext]' for the rest of the round.") - G.client.prefs.be_special -= be_special_type - return - else - return - sleep(poll_time) - - //Check all our candidates, to make sure they didn't log off during the 30 second wait period. - for(var/mob/dead/observer/G in candidates) - if(!G.key || !G.client) - candidates.Remove(G) - - return candidates - -/proc/pollCandidatesWithVeto(adminclient, adminusr, max_slots, Question, be_special_type, antag_age_check = 0, poll_time = 300, ignore_respawnability = 0, min_hours = 0, flashwindow = TRUE, check_antaghud = TRUE) - var/list/willing_ghosts = pollCandidates(Question, be_special_type, antag_age_check, poll_time, ignore_respawnability, min_hours, flashwindow, check_antaghud) +/proc/pollCandidatesWithVeto(adminclient, adminusr, max_slots, Question, be_special_type, antag_age_check = FALSE, poll_time = 300, ignore_respawnability = FALSE, min_hours = FALSE, flashwindow = TRUE, check_antaghud = TRUE, source) + var/list/willing_ghosts = SSghost_spawns.poll_candidates(Question, be_special_type, antag_age_check, poll_time, ignore_respawnability, min_hours, flashwindow, check_antaghud, source) var/list/selected_ghosts = list() if(!willing_ghosts.len) return selected_ghosts diff --git a/code/_DATASTRUCTURES/heap.dm b/code/__HELPERS/heap.dm similarity index 80% rename from code/_DATASTRUCTURES/heap.dm rename to code/__HELPERS/heap.dm index 7246eff8771..b878969571e 100644 --- a/code/_DATASTRUCTURES/heap.dm +++ b/code/__HELPERS/heap.dm @@ -1,28 +1,28 @@ ////////////////////// -//Heap object +//datum/heap object ////////////////////// -/Heap +/datum/heap var/list/L var/cmp -/Heap/New(compare) +/datum/heap/New(compare) L = new() cmp = compare -/Heap/proc/IsEmpty() +/datum/heap/proc/IsEmpty() return !L.len //Insert and place at its position a new node in the heap -/Heap/proc/Insert(atom/A) +/datum/heap/proc/Insert(atom/A) L.Add(A) Swim(L.len) //removes and returns the first element of the heap //(i.e the max or the min dependant on the comparison function) -/Heap/proc/Pop() +/datum/heap/proc/Pop() if(!L.len) return 0 . = L[1] @@ -33,7 +33,7 @@ Sink(1) //Get a node up to its right position in the heap -/Heap/proc/Swim(var/index) +/datum/heap/proc/Swim(var/index) var/parent = round(index * 0.5) while(parent > 0 && (call(cmp)(L[index],L[parent]) > 0)) @@ -42,7 +42,7 @@ parent = round(index * 0.5) //Get a node down to its right position in the heap -/Heap/proc/Sink(var/index) +/datum/heap/proc/Sink(var/index) var/g_child = GetGreaterChild(index) while(g_child > 0 && (call(cmp)(L[index],L[g_child]) < 0)) @@ -52,7 +52,7 @@ //Returns the greater (relative to the comparison proc) of a node children //or 0 if there's no child -/Heap/proc/GetGreaterChild(var/index) +/datum/heap/proc/GetGreaterChild(var/index) if(index * 2 > L.len) return 0 @@ -65,11 +65,11 @@ return index * 2 //Replaces a given node so it verify the heap condition -/Heap/proc/ReSort(atom/A) +/datum/heap/proc/ReSort(atom/A) var/index = L.Find(A) Swim(index) Sink(index) -/Heap/proc/List() +/datum/heap/proc/List() . = L.Copy() diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm index f9b9850bd2d..075f3370965 100644 --- a/code/__HELPERS/lists.dm +++ b/code/__HELPERS/lists.dm @@ -672,9 +672,6 @@ proc/dd_sortedObjectList(list/incoming) /obj/machinery/camera/dd_SortValue() return "[c_tag]" -/datum/alarm/dd_SortValue() - return "[sanitize(last_name)]" - //Picks from the list, with some safeties, and returns the "default" arg if it fails #define DEFAULTPICK(L, default) ((istype(L, /list) && L:len) ? pick(L) : default) @@ -693,6 +690,9 @@ proc/dd_sortedObjectList(list/incoming) // Lazying Episode 3 #define LAZYSET(L, K, V) LAZYINITLIST(L); L[K] = V; +/// Returns whether a numerical index is within a given list's bounds. Faster than isnull(LAZYACCESS(L, I)). +#define ISINDEXSAFE(L, I) (I >= 1 && I <= length(L)) + //same, but returns nothing and acts on list in place /proc/shuffle_inplace(list/L) if(!L) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index a38eeb99ced..0d3b26d0340 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -289,11 +289,14 @@ This is always put in the attack log. var/user_str = key_name_log(user) + COORD(user) var/target_str + var/target_info if(isatom(target)) var/atom/AT = target target_str = key_name_log(AT) + COORD(AT) + target_info = key_name_admin(target) else target_str = target + target_info = target var/mob/MU = user var/mob/MT = target if(istype(MU)) @@ -317,10 +320,13 @@ This is always put in the attack log. var/area/A = get_area(MT) if(A && A.hide_attacklogs) loglevel = ATKLOG_ALMOSTALL + else + loglevel = ATKLOG_ALL // Hitting an object. Not a mob if(isLivingSSD(target)) // Attacks on SSDs are shown to admins with any log level except ATKLOG_NONE. Overrides custom level loglevel = ATKLOG_FEW - msg_admin_attack("[key_name_admin(user)] vs [key_name_admin(target)]: [what_done]", loglevel) + + msg_admin_attack("[key_name_admin(user)] vs [target_info]: [what_done]", loglevel) /proc/do_mob(mob/user, mob/target, time = 30, uninterruptible = 0, progress = 1, list/extra_checks = list()) if(!user || !target) diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index ecbebf813df..034e8851c18 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -533,7 +533,7 @@ proc/checkhtml(var/t) text = replacetext(text, "\[/grid\]", "") text = replacetext(text, "\[row\]", "") text = replacetext(text, "\[cell\]", "") - text = replacetext(text, "\[logo\]", "") + text = replacetext(text, "\[logo\]", "​") text = replacetext(text, "\[time\]", "[station_time_timestamp()]") // TO DO if(!no_font) if(P) @@ -615,5 +615,3 @@ proc/checkhtml(var/t) text = replacetext(text, "", "\[cell\]") text = replacetext(text, "", "\[logo\]") return text - -#define string2charlist(string) (splittext(string, regex("(\\x0A|.)")) - splittext(string, "")) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 7e57a394988..fc0f7520e0e 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -2017,5 +2017,10 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) set waitfor = FALSE return call(source, proctype)(arglist(arguments)) +/proc/IsFrozen(atom/A) + if(A in GLOB.frozen_atom_list) + return TRUE + return FALSE + /// Waits at a line of code until X is true #define UNTIL(X) while(!(X)) stoplag() diff --git a/code/_globalvars/lists/objects.dm b/code/_globalvars/lists/objects.dm index 21af95cab48..ab3bfa85451 100644 --- a/code/_globalvars/lists/objects.dm +++ b/code/_globalvars/lists/objects.dm @@ -47,7 +47,10 @@ GLOBAL_LIST_EMPTY(ladders) GLOBAL_LIST_INIT(active_diseases, list()) //List of Active disease in all mobs; purely for quick referencing. GLOBAL_LIST_EMPTY(mob_spawners) // All mob_spawn objects - +GLOBAL_LIST_EMPTY(alert_consoles) // Station alert consoles, /obj/machinery/computer/station_alert GLOBAL_LIST_EMPTY(explosive_walls) GLOBAL_LIST_EMPTY(engine_beacon_list) + +/// List of wire colors for each object type of that round. One for airlocks, one for vendors, etc. +GLOBAL_LIST_EMPTY(wire_color_directory) // This is an associative list with the `holder_type` as the key, and a list of colors as the value. diff --git a/code/_globalvars/logging.dm b/code/_globalvars/logging.dm index f5f71e65c57..50e70bc62a4 100644 --- a/code/_globalvars/logging.dm +++ b/code/_globalvars/logging.dm @@ -34,4 +34,6 @@ GLOBAL_PROTECT(IClog) GLOBAL_LIST_EMPTY(OOClog) GLOBAL_PROTECT(OOClog) +GLOBAL_DATUM_INIT(logging, /datum/logging, new /datum/logging()) + GLOBAL_LIST_INIT(investigate_log_subjects, list("notes", "watchlist", "hrefs")) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index d840f64bb4a..36b6d647b7d 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -73,7 +73,9 @@ var/dragged = modifiers["drag"] if(dragged && !modifiers[dragged]) return - + if(IsFrozen(A) && !is_admin(usr)) + to_chat(usr, "Interacting with admin-frozen players is not permitted.") + return if(modifiers["middle"] && modifiers["shift"] && modifiers["ctrl"]) MiddleShiftControlClickOn(A) return diff --git a/code/_onclick/hud/ai.dm b/code/_onclick/hud/ai.dm index ada0ce8cd30..856f724f925 100644 --- a/code/_onclick/hud/ai.dm +++ b/code/_onclick/hud/ai.dm @@ -64,7 +64,7 @@ /obj/screen/ai/alerts/Click() if(isAI(usr)) var/mob/living/silicon/ai/AI = usr - AI.subsystem_alarm_monitor() + AI.ai_alerts() /obj/screen/ai/announcement name = "Make Announcement" diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index a93e65c762b..7b53bce22de 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -3,7 +3,7 @@ //PUBLIC - call these wherever you want -/mob/proc/throw_alert(category, type, severity, obj/new_master, override = FALSE) +/mob/proc/throw_alert(category, type, severity, obj/new_master, override = FALSE, timeout_override, no_anim) /* Proc to create or update an alert. Returns the alert if the alert is new or updated, 0 if it was thrown already @@ -59,14 +59,16 @@ LAZYSET(alerts, category, alert) // This also creates the list if it doesn't exist if(client && hud_used) hud_used.reorganize_alerts() - alert.transform = matrix(32, 6, MATRIX_TRANSLATE) - animate(alert, transform = matrix(), time = 2.5, easing = CUBIC_EASING) - if(alert.timeout) - spawn(alert.timeout) - if(alert.timeout && alerts[category] == alert && world.time >= alert.timeout) - clear_alert(category) - alert.timeout = world.time + alert.timeout - world.tick_lag + if(!no_anim) + alert.transform = matrix(32, 6, MATRIX_TRANSLATE) + animate(alert, transform = matrix(), time = 2.5, easing = CUBIC_EASING) + + var/timeout = timeout_override || alert.timeout + if(timeout) + addtimer(CALLBACK(alert, /obj/screen/alert/.proc/do_timeout, src, category), timeout) + alert.timeout = world.time + timeout - world.tick_lag + return alert // Proc to clear an existing alert. @@ -94,7 +96,6 @@ var/alerttooltipstyle = "" var/override_alerts = FALSE //If it is overriding other alerts of the same type - /obj/screen/alert/MouseEntered(location,control,params) openToolTip(usr, src, params, title = name, content = desc, theme = alerttooltipstyle) @@ -102,6 +103,12 @@ /obj/screen/alert/MouseExited() closeToolTip(usr) +/obj/screen/alert/proc/do_timeout(mob/M, category) + if(!M || !M.alerts) + return + + if(timeout && M.alerts[category] == src && world.time >= timeout) + M.clear_alert(category) //Gas alerts /obj/screen/alert/not_enough_oxy @@ -507,6 +514,34 @@ so as to remain in compliance with the most up-to-date laws." timeout = 300 var/atom/target = null var/action = NOTIFY_JUMP + var/show_time_left = FALSE // If true you need to call START_PROCESSING manually + var/image/time_left_overlay // The last image showing the time left + var/datum/candidate_poll/poll // If set, on Click() it'll register the player as a candidate + +/obj/screen/alert/notify_action/process() + if(show_time_left) + var/timeleft = timeout - world.time + if(timeleft <= 0) + return PROCESS_KILL + + if(time_left_overlay) + overlays -= time_left_overlay + + var/obj/O = new + O.maptext = "[CEILING(timeleft / 10, 1)]" + O.maptext_width = O.maptext_height = 128 + var/matrix/M = new + M.Translate(4, 16) + O.transform = M + + var/image/I = image(O) + I.layer = FLOAT_LAYER + I.plane = FLOAT_PLANE + 1 + overlays += I + + time_left_overlay = I + qdel(O) + ..() /obj/screen/alert/notify_action/Destroy() target = null @@ -515,20 +550,55 @@ so as to remain in compliance with the most up-to-date laws." /obj/screen/alert/notify_action/Click() if(!usr || !usr.client) return - if(!target) - return var/mob/dead/observer/G = usr if(!istype(G)) return - switch(action) - if(NOTIFY_ATTACK) - target.attack_ghost(G) - if(NOTIFY_JUMP) - var/turf/T = get_turf(target) - if(T && isturf(T)) - G.loc = T - if(NOTIFY_FOLLOW) - G.ManualFollow(target) + + if(poll) + if(poll.sign_up(G)) + // Add a small overlay to indicate we've signed up + display_signed_up() + else if(target) + switch(action) + if(NOTIFY_ATTACK) + target.attack_ghost(G) + if(NOTIFY_JUMP) + var/turf/T = get_turf(target) + if(T && isturf(T)) + G.loc = T + if(NOTIFY_FOLLOW) + G.ManualFollow(target) + +/obj/screen/alert/notify_action/Topic(href, href_list) + if(..()) + return TRUE + + if(href_list["signup"] && isobserver(usr) && poll?.sign_up(usr)) + display_signed_up() + +/obj/screen/alert/notify_action/proc/display_signed_up() + var/image/I = image('icons/mob/screen_gen.dmi', icon_state = "selector") + I.layer = FLOAT_LAYER + I.plane = FLOAT_PLANE + 2 + overlays += I + +/obj/screen/alert/notify_action/proc/display_stacks(stacks = 1) + if(stacks <= 1) + return + + var/obj/O = new + O.maptext = "[stacks]x" + O.maptext_width = O.maptext_height = 128 + var/matrix/M = new + M.Translate(4, 2) + O.transform = M + + var/image/I = image(O) + I.layer = FLOAT_LAYER + I.plane = FLOAT_PLANE + 1 + overlays += I + + qdel(O) /obj/screen/alert/notify_soulstone name = "Soul Stone" diff --git a/code/_onclick/hud/ghost.dm b/code/_onclick/hud/ghost.dm index a291120fb85..67df5eb3013 100644 --- a/code/_onclick/hud/ghost.dm +++ b/code/_onclick/hud/ghost.dm @@ -81,6 +81,9 @@ /obj/screen/ghost/respawn_pai/Click() var/mob/dead/observer/G = usr + if(!GLOB.paiController.check_recruit(G)) + to_chat(G, "You are not eligible to become a pAI.") + return GLOB.paiController.recruitWindow(G) /datum/hud/ghost diff --git a/code/_onclick/hud/guardian.dm b/code/_onclick/hud/guardian.dm index d628124e052..6c9e95f457e 100644 --- a/code/_onclick/hud/guardian.dm +++ b/code/_onclick/hud/guardian.dm @@ -13,7 +13,7 @@ using.icon_state = mymob.a_intent static_inventory += using action_intent = using - + using = new /obj/screen/guardian/Manifest() using.screen_loc = ui_rhand static_inventory += using @@ -49,8 +49,8 @@ /obj/screen/guardian/Manifest/Click() if(isguardian(usr)) var/mob/living/simple_animal/hostile/guardian/G = usr - G.Manifest() - + if(G.loc == G.summoner) + G.Manifest() /obj/screen/guardian/Recall icon_state = "recall" diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index f88244c0cd8..4fd5b956df5 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -81,7 +81,7 @@ user.do_attack_animation(M) . = M.attacked_by(src, user, def_zone) - add_attack_logs(user, M, "Attacked with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])", (M.ckey && force > 0 && damtype != STAMINA) ? null : ATKLOG_ALMOSTALL) + add_attack_logs(user, M, "Attacked with [name] ([uppertext(user.a_intent)]) ([uppertext(damtype)])", (M.ckey && force > 0 && damtype != STAMINA) ? null : ATKLOG_ALMOSTALL) add_fingerprint(user) diff --git a/code/_onclick/rig.dm b/code/_onclick/rig.dm deleted file mode 100644 index ff55f35cb57..00000000000 --- a/code/_onclick/rig.dm +++ /dev/null @@ -1,84 +0,0 @@ - -#define MIDDLE_CLICK 0 -#define ALT_CLICK 1 -#define CTRL_CLICK 2 -#define MAX_HARDSUIT_CLICK_MODE 2 - -/client - var/hardsuit_click_mode = MIDDLE_CLICK - -/client/verb/toggle_hardsuit_mode() - set name = "Toggle Hardsuit Activation Mode" - set desc = "Switch between hardsuit activation modes." - set category = "OOC" - - hardsuit_click_mode++ - if(hardsuit_click_mode > MAX_HARDSUIT_CLICK_MODE) - hardsuit_click_mode = 0 - - switch(hardsuit_click_mode) - if(MIDDLE_CLICK) - to_chat(src, "Hardsuit activation mode set to middle-click.") - if(ALT_CLICK) - to_chat(src, "Hardsuit activation mode set to alt-click.") - if(CTRL_CLICK) - to_chat(src, "Hardsuit activation mode set to control-click.") - else - // should never get here, but just in case: - log_runtime(EXCEPTION("Bad hardsuit click mode: [hardsuit_click_mode] - expected 0 to [MAX_HARDSUIT_CLICK_MODE]"), src) - to_chat(src, "Somehow you bugged the system. Setting your hardsuit mode to middle-click.") - hardsuit_click_mode = MIDDLE_CLICK - -/mob/living/MiddleClickOn(atom/A) - if(client && client.hardsuit_click_mode == MIDDLE_CLICK) - if(HardsuitClickOn(A)) - return - ..() - -/mob/living/AltClickOn(atom/A) - if(client && client.hardsuit_click_mode == ALT_CLICK) - if(HardsuitClickOn(A)) - return - ..() - -/mob/living/CtrlClickOn(atom/A) - if(client && client.hardsuit_click_mode == CTRL_CLICK) - if(HardsuitClickOn(A)) - return - ..() - -/mob/living/proc/can_use_rig() - return 0 - -/mob/living/carbon/human/can_use_rig() - return 1 - -/mob/living/carbon/brain/can_use_rig() - return istype(loc, /obj/item/mmi) - -/mob/living/silicon/ai/can_use_rig() - return istype(loc, /obj/item/aicard) - -/mob/living/silicon/pai/can_use_rig() - return loc == card - -/mob/living/proc/HardsuitClickOn(var/atom/A, var/alert_ai = 0) - if(!can_use_rig() || (next_move > world.time)) - return 0 - var/obj/item/rig/rig = get_rig() - if(istype(rig) && !rig.offline && rig.selected_module) - if(src != rig.wearer) - if(rig.ai_can_move_suit(src, check_user_module = 1)) - message_admins("[key_name_admin(src)] is trying to force \the [key_name_admin(rig.wearer)] to use a hardsuit module.") - else - return 0 - rig.selected_module.engage(A, alert_ai) - if(ismob(A)) // No instant mob attacking - though modules have their own cooldowns - changeNext_move(CLICK_CD_MELEE) - return 1 - return 0 - -#undef MIDDLE_CLICK -#undef ALT_CLICK -#undef CTRL_CLICK -#undef MAX_HARDSUIT_CLICK_MODE diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index f4f2f72b16b..756ce6f8527 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -61,7 +61,6 @@ var/usewhitelist = 0 var/mods_are_mentors = 0 var/load_jobs_from_txt = 0 - var/ToRban = 0 var/automute_on = 0 //enables automuting/spam prevention var/jobs_have_minimal_access = 0 //determines whether jobs use minimal access or expanded access. var/round_abandon_penalty_period = 30 MINUTES // Time from round start during which ghosting out is penalized @@ -578,9 +577,6 @@ if("humans_need_surnames") humans_need_surnames = 1 - if("tor_ban") - ToRban = 1 - if("automute_on") automute_on = 1 diff --git a/code/controllers/subsystem.dm b/code/controllers/subsystem.dm index 03e54df61c5..c9934b128cf 100644 --- a/code/controllers/subsystem.dm +++ b/code/controllers/subsystem.dm @@ -35,7 +35,7 @@ var/static/list/failure_strikes //How many times we suspect a subsystem type has crashed the MC, 3 strikes and you're out! - var/offline_implications = "None" // What are the implications of this SS being offlined? + var/offline_implications = "None. No immediate action is needed." // What are the implications of this SS being offlined? //Do not override ///datum/controller/subsystem/New() diff --git a/code/controllers/subsystem/alarm.dm b/code/controllers/subsystem/alarm.dm index 289adf6de40..3d91d763be3 100644 --- a/code/controllers/subsystem/alarm.dm +++ b/code/controllers/subsystem/alarm.dm @@ -1,31 +1,31 @@ -SUBSYSTEM_DEF(alarms) - name = "Alarms" - init_order = INIT_ORDER_ALARMS // 2 - offline_implications = "Alarms (Power, camera, fire, etc) will no longer be checked. No immediate action is needed." - var/datum/alarm_handler/atmosphere/atmosphere_alarm = new() - var/datum/alarm_handler/burglar/burglar_alarm = new() - var/datum/alarm_handler/camera/camera_alarm = new() - var/datum/alarm_handler/fire/fire_alarm = new() - var/datum/alarm_handler/motion/motion_alarm = new() - var/datum/alarm_handler/power/power_alarm = new() - var/list/datum/alarm/all_handlers +SUBSYSTEM_DEF(alarm) + name = "Alarm" + flags = SS_NO_INIT | SS_NO_FIRE + var/list/alarms = list("Motion" = list(), "Fire" = list(), "Atmosphere" = list(), "Power" = list(), "Camera" = list(), "Burglar" = list()) -/datum/controller/subsystem/alarms/Initialize(start_timeofday) - all_handlers = list(SSalarms.atmosphere_alarm, SSalarms.burglar_alarm, SSalarms.camera_alarm, SSalarms.fire_alarm, SSalarms.motion_alarm, SSalarms.power_alarm) - return ..() +/datum/controller/subsystem/alarm/proc/triggerAlarm(class, area/A, list/O, obj/alarmsource) + var/list/L = alarms[class] + for(var/I in L) + if(I == A.name) + var/list/alarm = L[I] + var/list/sources = alarm[3] + if(!(alarmsource.UID() in sources)) + sources += alarmsource.UID() + return TRUE + L[A.name] = list(get_area_name(A, TRUE), O, list(alarmsource.UID())) + SEND_SIGNAL(SSalarm, COMSIG_TRIGGERED_ALARM, class, A, O, alarmsource) + return TRUE -/datum/controller/subsystem/alarms/fire() - for(var/datum/alarm_handler/AH in all_handlers) - AH.process() +/datum/controller/subsystem/alarm/proc/cancelAlarm(class, area/A, obj/origin) + var/list/L = alarms[class] + var/cleared = FALSE + for(var/I in L) + if(I == A.name) + var/list/alarm = L[I] + var/list/srcs = alarm[3] + srcs -= origin.UID() + if(!length(srcs)) + cleared = TRUE + L -= I -/datum/controller/subsystem/alarms/proc/active_alarms() - var/list/all_alarms = new () - for(var/datum/alarm_handler/AH in all_handlers) - var/list/alarms = AH.alarms - all_alarms += alarms - - return all_alarms - -/datum/controller/subsystem/alarms/proc/number_of_active_alarms() - var/list/alarms = active_alarms() - return alarms.len + SEND_SIGNAL(SSalarm, COMSIG_CANCELLED_ALARM, class, A, origin, cleared) diff --git a/code/controllers/subsystem/chat.dm b/code/controllers/subsystem/chat.dm deleted file mode 100644 index 4eb468a0952..00000000000 --- a/code/controllers/subsystem/chat.dm +++ /dev/null @@ -1,67 +0,0 @@ -SUBSYSTEM_DEF(chat) - name = "Chat" - flags = SS_TICKER|SS_NO_INIT - wait = 1 - priority = FIRE_PRIORITY_CHAT - init_order = INIT_ORDER_CHAT - offline_implications = "Chat messages will no longer be cleanly queued. No immediate action is needed." - - var/list/payload = list() - - -/datum/controller/subsystem/chat/fire() - for(var/i in payload) - var/client/C = i - if(C) - C << output(payload[C], "browseroutput:output") - payload -= C - - if(MC_TICK_CHECK) - return - - -/datum/controller/subsystem/chat/proc/queue(target, message, flag) - if(!target || !message) - return - - if(!istext(message)) - stack_trace("to_chat called with invalid input type") - return - - if(target == world) - target = GLOB.clients - - //Some macros remain in the string even after parsing and fuck up the eventual output - message = replacetext(message, "\improper", "") - message = replacetext(message, "\proper", "") - message += "
" - - - //url_encode it TWICE, this way any UTF-8 characters are able to be decoded by the Javascript. - //Do the double-encoding here to save nanoseconds - var/twiceEncoded = url_encode(url_encode(message)) - - if(islist(target)) - for(var/I in target) - var/client/C = CLIENT_FROM_VAR(I) //Grab us a client if possible - - if(!C?.chatOutput || C.chatOutput.broken) //A player who hasn't updated his skin file. - continue - - if(!C.chatOutput.loaded) //Client still loading, put their messages in a queue - C.chatOutput.messageQueue += message - continue - - payload[C] += twiceEncoded - - else - var/client/C = CLIENT_FROM_VAR(target) //Grab us a client if possible - - if(!C?.chatOutput || C.chatOutput.broken) //A player who hasn't updated his skin file. - return - - if(!C.chatOutput.loaded) //Client still loading, put their messages in a queue - C.chatOutput.messageQueue += message - return - - payload[C] += twiceEncoded diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm index 619508544a6..e50c372584a 100644 --- a/code/controllers/subsystem/garbage.dm +++ b/code/controllers/subsystem/garbage.dm @@ -4,7 +4,7 @@ SUBSYSTEM_DEF(garbage) wait = 2 SECONDS flags = SS_POST_FIRE_TIMING|SS_BACKGROUND|SS_NO_INIT runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY - init_order = INIT_ORDER_GARBAGE + init_order = INIT_ORDER_GARBAGE // Why does this have an init order if it has SS_NO_INIT? offline_implications = "Garbage collection is no longer functional, and objects will not be qdel'd. Immediate server restart recommended." var/list/collection_timeout = list(2 MINUTES, 10 SECONDS) // deciseconds to wait before moving something up in the queue to the next level diff --git a/code/controllers/subsystem/ghost_spawns.dm b/code/controllers/subsystem/ghost_spawns.dm new file mode 100644 index 00000000000..ea0aefb88bd --- /dev/null +++ b/code/controllers/subsystem/ghost_spawns.dm @@ -0,0 +1,275 @@ +SUBSYSTEM_DEF(ghost_spawns) + name = "Ghost Spawns" + init_order = INIT_ORDER_EVENTS + flags = SS_BACKGROUND + wait = 1 SECONDS + runlevels = RUNLEVEL_GAME + offline_implications = "Ghosts will no longer be able to respawn as event mobs (Blob, etc..). Shuttle call recommended." + + /// List of polls currently ongoing, to be checked on next fire() + var/list/datum/candidate_poll/currently_polling + /// Whether there are active polls or not + var/polls_active = FALSE + /// Number of polls performed since the start + var/total_polls = 0 + /// The poll that's closest to finishing + var/datum/candidate_poll/next_poll_to_finish + +/datum/controller/subsystem/ghost_spawns/fire() + if(!polls_active) + return + if(!currently_polling) // if polls_active is TRUE then this shouldn't happen, but still.. + currently_polling = list() + + for(var/poll in currently_polling) + var/datum/candidate_poll/P = poll + if(P.time_left() <= 0) + polling_finished(P) + +/** + * Polls for candidates with a question and a preview of the role + * + * This proc replaces /proc/pollCandidates. + * Should NEVER be used in a proc that has waitfor set to FALSE/0 (due to #define UNTIL) + * Arguments: + * * question - The question to ask to potential candidates + * * role - The role to poll for. Should be a ROLE_x enum. If set, potential candidates who aren't eligible will be ignored + * * antag_age_check - Whether to filter out potential candidates who don't have an old enough account + * * poll_time - How long to poll for in deciseconds + * * ignore_respawnability - Whether to ignore the player's respawnability + * * min_hours - The amount of hours needed for a potential candidate to be eligible + * * flash_window - Whether the poll should flash a potential candidate's game window + * * check_antaghud - Whether to filter out potential candidates who enabled AntagHUD + * * source - The atom, atom prototype, icon or mutable appearance to display as an icon in the alert + */ +/datum/controller/subsystem/ghost_spawns/proc/poll_candidates(question = "Would you like to play a special role?", role, antag_age_check = FALSE, poll_time = 30 SECONDS, ignore_respawnability = FALSE, min_hours = 0, flash_window = TRUE, check_antaghud = TRUE, source) + log_debug("Polling candidates [role ? "for [get_roletext(role)]" : "\"[question]\""] for [poll_time / 10] seconds") + + // Start firing + polls_active = TRUE + total_polls++ + + var/datum/candidate_poll/P = new(role, question, poll_time) + LAZYADD(currently_polling, P) + + // We're the poll closest to completion + if(!next_poll_to_finish || poll_time < next_poll_to_finish.time_left()) + next_poll_to_finish = P + + var/category = "[P.hash]_notify_action" + + for(var/mob/dead/observer/M in (ignore_respawnability ? GLOB.player_list : GLOB.respawnable_list)) + if(!is_eligible(M, role, antag_age_check, role, min_hours, check_antaghud)) + continue + + SEND_SOUND(M, 'sound/misc/notice2.ogg') + if(flash_window) + window_flash(M.client) + + // If we somehow send two polls for the same mob type, but with a duration on the second one shorter than the time left on the first one, + // we need to keep the first one's timeout rather than use the shorter one + var/obj/screen/alert/notify_action/current_alert = LAZYACCESS(M.alerts, category) + var/alert_time = poll_time + var/alert_poll = P + if(current_alert && current_alert.timeout > (world.time + poll_time - world.tick_lag)) + alert_time = current_alert.timeout - world.time + world.tick_lag + alert_poll = current_alert.poll + + // Send them an on-screen alert + var/obj/screen/alert/notify_action/A = M.throw_alert(category, /obj/screen/alert/notify_action, timeout_override = alert_time, no_anim = TRUE) + if(!A) + continue + + A.icon = ui_style2icon(M.client?.prefs.UI_style) + A.name = "Looking for candidates" + A.desc = "[question]\n\n(expires in [poll_time / 10] seconds)" + A.show_time_left = TRUE + A.poll = alert_poll + + // Sign up inheritance and stacking + var/inherited_sign_up = FALSE + var/num_stack = 1 + for(var/existing_poll in currently_polling) + var/datum/candidate_poll/P2 = existing_poll + if(P != P2 && P.hash == P2.hash) + // If there's already a poll for an identical mob type ongoing and the client is signed up for it, sign them up for this one + if(!inherited_sign_up && (M in P2.signed_up) && P.sign_up(M, TRUE)) + A.display_signed_up() + inherited_sign_up = TRUE + // This number is used to display the number of polls the alert regroups + num_stack++ + if(num_stack > 1) + A.display_stacks(num_stack) + + // Image to display + var/image/I + if(source) + if(!ispath(source)) + var/atom/S = source + var/old_layer = S.layer + var/old_plane = S.plane + + S.layer = FLOAT_LAYER + S.plane = FLOAT_PLANE + A.overlays += S + S.layer = old_layer + S.plane = old_plane + else + I = image(source, layer = FLOAT_LAYER, dir = SOUTH) + else + // Just use a generic image + I = image('icons/effects/effects.dmi', icon_state = "static", layer = FLOAT_LAYER, dir = SOUTH) + + if(I) + I.layer = FLOAT_LAYER + I.plane = FLOAT_PLANE + A.overlays += I + + // Chat message + var/act_jump = "" + if(isatom(source)) + act_jump = "\[Teleport]" + var/act_signup = "\[Sign Up]" + to_chat(M, "Now looking for candidates [role ? "to play as \an [get_roletext(role)]" : "\"[question]\""]. [act_jump] [act_signup]") + + // Start processing it so it updates visually the timer + START_PROCESSING(SSprocessing, A) + A.process() + + // Sleep until the time is up + UNTIL(P.finished) + return P.signed_up + +/** + * Returns whether an observer is eligible to be an event mob + * + * Arguments: + * * M - The mob to check eligibility + * * role - The role to check eligibility for. Checks 1. the client has enabled the role 2. the account's age for this role if antag_age_check is TRUE + * * antag_age_check - Whether to check the account's age or not for the given role. + * * role_text - The role's clean text. Used for checking job bans to determine eligibility + * * min_hours - The amount of minimum hours the client needs before being eligible + * * check_antaghud - Whether to consider a client who enabled AntagHUD ineligible or not + */ +/datum/controller/subsystem/ghost_spawns/proc/is_eligible(mob/M, role, antag_age_check, role_text, min_hours, check_antaghud) + . = FALSE + if(!M.key || !M.client) + return + if(role) + if(!(role in M.client.prefs.be_special)) + return + if(antag_age_check) + if(!player_old_enough_antag(M.client, role)) + return + if(role_text) + if(jobban_isbanned(M, role_text) || jobban_isbanned(M, "Syndicate")) + return + if(config.use_exp_restrictions && min_hours) + if(M.client.get_exp_type_num(EXP_TYPE_LIVING) < min_hours * 60) + return + if(check_antaghud && cannotPossess(M)) + return + + return TRUE + +/** + * Called by the subsystem when a poll's timer runs out + * + * Can be called manually to finish a poll prematurely + * Arguments: + * * P - The poll to finish + */ +/datum/controller/subsystem/ghost_spawns/proc/polling_finished(datum/candidate_poll/P) + // Trim players who aren't eligible anymore + var/len_pre_trim = length(P.signed_up) + P.trim_candidates() + log_debug("Candidate poll [P.role ? "for [get_roletext(P.role)]" : "\"[P.question]\""] finished. [len_pre_trim] players signed up, [length(P.signed_up)] after trimming") + + P.finished = TRUE + currently_polling -= P + + // Determine which is the next poll closest the completion or "disable" firing if there's none + if(!length(currently_polling)) + polls_active = FALSE + next_poll_to_finish = null + else if(P == next_poll_to_finish) + next_poll_to_finish = null + for(var/poll in currently_polling) + var/datum/candidate_poll/P2 = poll + if(!next_poll_to_finish || P2.time_left() < next_poll_to_finish.time_left()) + next_poll_to_finish = P2 + +/datum/controller/subsystem/ghost_spawns/stat_entry(msg) + msg += "Active: [length(currently_polling)] | Total: [total_polls]" + if(next_poll_to_finish) + msg += " | Next: [DisplayTimeText(next_poll_to_finish.time_left())] ([length(next_poll_to_finish.signed_up)] candidates)" + ..(msg) + +// The datum that describes one instance of candidate polling +/datum/candidate_poll + var/role // The role the poll is for + var/question // The question asked to observers + var/duration // The duration of the poll + var/list/mob/dead/observer/signed_up // The players who signed up to this poll + var/time_started // The world.time at which the poll was created + var/finished = FALSE // Whether the polling is finished + var/hash // Used to categorize in the alerts system + +/datum/candidate_poll/New(polled_role, polled_question, poll_duration) + role = polled_role + question = polled_question + duration = poll_duration + signed_up = list() + time_started = world.time + hash = copytext(md5("[question]_[role ? role : "0"]"), 1, 7) + return ..() + +/** + * Attempts to sign a (controlled) mob up + * + * Will fail if the mob is already signed up or the poll's timer ran out. + * Does not check for eligibility + * Arguments: + * * M - The (controlled) mob to sign up + * * silent - Whether no messages should appear or not. If not TRUE, signing up to this poll will also sign the mob up for identical polls + */ +/datum/candidate_poll/proc/sign_up(mob/dead/observer/M, silent = FALSE) + . = FALSE + if(!istype(M) || !M.key || !M.client) + return + if(M in signed_up) + if(!silent) + to_chat(M, "You have already signed up for this!") + return + if(time_left() <= 0) + if(!silent) + to_chat(M, "Sorry, you were too late for the consideration!") + SEND_SOUND(M, 'sound/machines/buzz-sigh.ogg') + return + + signed_up += M + if(!silent) + to_chat(M, "You have signed up for this role! A candidate will be picked randomly soon..") + // Sign them up for any other polls with the same mob type + for(var/existing_poll in SSghost_spawns.currently_polling) + var/datum/candidate_poll/P = existing_poll + if(src != P && hash == P.hash && !(M in P.signed_up)) + P.sign_up(M, TRUE) + + return TRUE + +/** + * Deletes any candidates who may have disconnected from the list + */ +/datum/candidate_poll/proc/trim_candidates() + listclearnulls(signed_up) + for(var/mob in signed_up) + var/mob/M = mob + if(!M.key || !M.client) + signed_up -= M + +/** + * Returns the time left for a poll + */ +/datum/candidate_poll/proc/time_left() + return duration - (world.time - time_started) diff --git a/code/controllers/subsystem/jobs.dm b/code/controllers/subsystem/jobs.dm index ef89317d0f5..3adfdf3972f 100644 --- a/code/controllers/subsystem/jobs.dm +++ b/code/controllers/subsystem/jobs.dm @@ -27,7 +27,7 @@ SUBSYSTEM_DEF(jobs) /datum/controller/subsystem/jobs/fire() if(!config.sql_enabled || !config.use_exp_tracking) return - update_exp(5,0) + INVOKE_ASYNC(GLOBAL_PROC, /.proc/update_exp, 5, 0) /datum/controller/subsystem/jobs/proc/SetupOccupations(var/list/faction = list("Station")) occupations = list() @@ -644,6 +644,27 @@ SUBSYSTEM_DEF(jobs) oldjobdatum.current_positions-- newjobdatum.current_positions++ +/datum/controller/subsystem/jobs/proc/notify_dept_head(jobtitle, antext) + // Used to notify the department head of jobtitle X that their employee was brigged, demoted or terminated + if(!jobtitle || !antext) + return + var/datum/job/tgt_job = GetJob(jobtitle) + if(!tgt_job) + return + if(!tgt_job.department_head[1]) + return + var/boss_title = tgt_job.department_head[1] + var/obj/item/pda/target_pda + for(var/obj/item/pda/check_pda in GLOB.PDAs) + if(check_pda.ownrank == boss_title) + target_pda = check_pda + break + if(!target_pda) + return + var/datum/data/pda/app/messenger/PM = target_pda.find_program(/datum/data/pda/app/messenger) + if(PM && PM.can_receive()) + PM.notify("Automated Notification: \"[antext]\" (Unable to Reply)") + /datum/controller/subsystem/jobs/proc/fetch_transfer_record_html(var/centcom) var/record_html = "" diff --git a/code/controllers/subsystem/nano_mob_hunter.dm b/code/controllers/subsystem/nano_mob_hunter.dm index 19b57f59a70..b8a5d09e0b5 100644 --- a/code/controllers/subsystem/nano_mob_hunter.dm +++ b/code/controllers/subsystem/nano_mob_hunter.dm @@ -2,6 +2,7 @@ SUBSYSTEM_DEF(mob_hunt) name = "Nano-Mob Hunter GO Server" init_order = INIT_ORDER_NANOMOB priority = FIRE_PRIORITY_NANOMOB // Low priority, no need for MC_TICK_CHECK due to extremely low performance impact. + flags = SS_NO_INIT offline_implications = "Nano-Mob Hunter will no longer spawn mobs. No immediate action is needed." var/max_normal_spawns = 15 //change this to adjust the number of normal spawns that can exist at one time. trapped spawns (from traitors) don't count towards this var/list/normal_spawns = list() diff --git a/code/controllers/subsystem/dcs.dm b/code/controllers/subsystem/processing/dcs.dm similarity index 90% rename from code/controllers/subsystem/dcs.dm rename to code/controllers/subsystem/processing/dcs.dm index 09dea24071f..a223f4676f6 100644 --- a/code/controllers/subsystem/dcs.dm +++ b/code/controllers/subsystem/processing/dcs.dm @@ -3,6 +3,8 @@ PROCESSING_SUBSYSTEM_DEF(dcs) flags = SS_NO_INIT var/list/elements_by_type = list() + // Update this if you add in components which actually use this as a processor + offline_implications = "This SS doesnt actually process anything yet. No immediate action is needed." /datum/controller/subsystem/processing/dcs/Recover() comp_lookup = SSdcs.comp_lookup diff --git a/code/controllers/subsystem/processing/fastprocess.dm b/code/controllers/subsystem/processing/fastprocess.dm index 9622e021469..37761ca8d60 100644 --- a/code/controllers/subsystem/processing/fastprocess.dm +++ b/code/controllers/subsystem/processing/fastprocess.dm @@ -4,3 +4,4 @@ PROCESSING_SUBSYSTEM_DEF(fastprocess) name = "Fast Processing" wait = 2 stat_tag = "FP" + offline_implications = "Objects using the 'Fast Processing' processor will no longer process. Shuttle call recommended." diff --git a/code/controllers/subsystem/processing/obj.dm b/code/controllers/subsystem/processing/obj.dm index 26021fb267a..2a05c04af58 100644 --- a/code/controllers/subsystem/processing/obj.dm +++ b/code/controllers/subsystem/processing/obj.dm @@ -3,3 +3,4 @@ PROCESSING_SUBSYSTEM_DEF(obj) priority = FIRE_PRIORITY_OBJ flags = SS_NO_INIT wait = 20 + offline_implications = "Objects using the 'Objects' processor will no longer process. Shuttle call recommended." diff --git a/code/controllers/subsystem/processing/processing.dm b/code/controllers/subsystem/processing/processing.dm index a8bc823bbbe..5302314589d 100644 --- a/code/controllers/subsystem/processing/processing.dm +++ b/code/controllers/subsystem/processing/processing.dm @@ -9,6 +9,7 @@ SUBSYSTEM_DEF(processing) var/stat_tag = "P" //Used for logging var/list/processing = list() var/list/currentrun = list() + offline_implications = "Objects using the default processor will no longer process. Shuttle call recommended." /datum/controller/subsystem/processing/stat_entry() ..("[stat_tag]:[processing.len]") diff --git a/code/controllers/subsystem/shuttles.dm b/code/controllers/subsystem/shuttles.dm index 247d71d05b8..08fa7709320 100644 --- a/code/controllers/subsystem/shuttles.dm +++ b/code/controllers/subsystem/shuttles.dm @@ -14,9 +14,9 @@ SUBSYSTEM_DEF(shuttle) //emergency shuttle stuff var/obj/docking_port/mobile/emergency/emergency var/obj/docking_port/mobile/emergency/backup/backup_shuttle - 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/emergencyCallTime = SHUTTLE_CALLTIME //time taken for emergency shuttle to reach the station when called (in deciseconds) + var/emergencyDockTime = SHUTTLE_DOCKTIME //time taken for emergency shuttle to leave again once it has docked (in deciseconds) + var/emergencyEscapeTime = SHUTTLE_ESCAPETIME //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 diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 5d0a53c221e..e53c91ac20d 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -61,7 +61,7 @@ SUBSYSTEM_DEF(ticker) if(GAME_STATE_STARTUP) // This is ran as soon as the MC starts firing, and should only run ONCE, unless startup fails round_start_time = world.time + (config.pregame_timestart * 10) - to_chat(world, "Welcome to the pre-game lobby!") + to_chat(world, "Welcome to the pre-game lobby!") to_chat(world, "Please, setup your character and select ready. Game will start in [config.pregame_timestart] seconds") current_state = GAME_STATE_PREGAME fire() // TG says this is a good idea @@ -217,11 +217,11 @@ SUBSYSTEM_DEF(ticker) for(var/obj/effect/landmark/spacepod/random/R in L) qdel(R) - to_chat(world, "Enjoy the game!") + to_chat(world, "Enjoy the game!") world << sound('sound/AI/welcome.ogg')// Skie if(SSholiday.holidays) - to_chat(world, "and...") + to_chat(world, "and...") for(var/holidayname in SSholiday.holidays) var/datum/holiday/holiday = SSholiday.holidays[holidayname] to_chat(world, "

[holiday.greet()]

") diff --git a/code/controllers/subsystem/tickets/mentor_tickets.dm b/code/controllers/subsystem/tickets/mentor_tickets.dm index 76c7ed2dc28..af4ea2e914d 100644 --- a/code/controllers/subsystem/tickets/mentor_tickets.dm +++ b/code/controllers/subsystem/tickets/mentor_tickets.dm @@ -6,16 +6,23 @@ GLOBAL_REAL(SSmentor_tickets, /datum/controller/subsystem/tickets/mentor_tickets /datum/controller/subsystem/tickets/mentor_tickets name = "Mentor Tickets" + offline_implications = "Mentor tickets will no longer be marked as stale. No immediate action is needed." ticket_system_name = "Mentor Tickets" ticket_name = "Mentor Ticket" span_class = "mentorhelp" + other_ticket_name = "Admin" + other_ticket_permission = R_ADMIN close_rights = R_MENTOR | R_ADMIN - -/datum/controller/subsystem/tickets/mentor_tickets/message_staff(var/msg) - message_mentorTicket(msg) + rights_needed = R_MENTOR | R_ADMIN | R_MOD /datum/controller/subsystem/tickets/mentor_tickets/Initialize() close_messages = list("- [ticket_name] Closed -", "Please try to be as descriptive as possible in mentor helps. Mentors do not know the full situation you're in and need more information to give you a helpful response.", "Your [ticket_name] has now been closed.") return ..() + +/datum/controller/subsystem/tickets/mentor_tickets/message_staff(msg) + message_mentorTicket(msg) + +/datum/controller/subsystem/tickets/mentor_tickets/create_other_system_ticket(datum/ticket/T) + SStickets.newTicket(T.clientName, T.content, T.title) diff --git a/code/controllers/subsystem/tickets/tickets.dm b/code/controllers/subsystem/tickets/tickets.dm index 3aa0a8846c3..64f91e96b6c 100644 --- a/code/controllers/subsystem/tickets/tickets.dm +++ b/code/controllers/subsystem/tickets/tickets.dm @@ -12,17 +12,23 @@ SUBSYSTEM_DEF(tickets) name = "Admin Tickets" + init_order = INIT_ORDER_TICKETS + wait = 300 + priority = FIRE_PRIORITY_TICKETS + offline_implications = "Admin tickets will no longer be marked as stale. No immediate action is needed." + flags = SS_BACKGROUND + var/span_class = "adminticket" var/ticket_system_name = "Admin Tickets" var/ticket_name = "Admin Ticket" var/close_rights = R_ADMIN + var/rights_needed = R_ADMIN | R_MOD + + /// The name of the other ticket type to convert to + var/other_ticket_name = "Mentor" + /// Which permission to look for when seeing if there is staff available for the other ticket type + var/other_ticket_permission = R_MENTOR var/list/close_messages - init_order = INIT_ORDER_TICKETS - wait = 300 - priority = FIRE_PRIORITY_TICKETS - - flags = SS_BACKGROUND - var/list/allTickets = list() //make it here because someone might ahelp before the system has initialized var/ticketCounter = 1 @@ -113,9 +119,37 @@ SUBSYSTEM_DEF(tickets) to_chat_safe(returnClient(N), "Your [ticket_name] has now been resolved.") return TRUE +/datum/controller/subsystem/tickets/proc/convert_to_other_ticket(ticketId) + if(!check_rights(rights_needed)) + return + if(alert("Are you sure to convert this ticket to an '[other_ticket_name]' ticket?",,"Yes","No") != "Yes") + return + if(!other_ticket_system_staff_check()) + return + var/datum/ticket/T = allTickets[ticketId] + convert_ticket(T) + +/datum/controller/subsystem/tickets/proc/other_ticket_system_staff_check() + var/list/staff = staff_countup(other_ticket_permission) + if(!staff[1]) + if(alert("No active staff online to answer the ticket. Are you sure you want to convert the ticket?",, "No", "Yes") != "Yes") + return FALSE + return TRUE + +/datum/controller/subsystem/tickets/proc/convert_ticket(datum/ticket/T) + T.ticketState = TICKET_CLOSED + var/client/C = usr.client + to_chat_safe(T.clientName, list("[key_name_hidden(C)] has converted your ticket to a [other_ticket_name] ticket.",\ + "Be sure to use the correct type of help next time!")) + message_staff("[C] has converted ticket number [T.ticketNum] to a [other_ticket_name] ticket.") + log_game("[C] has converted ticket number [T.ticketNum] to a [other_ticket_name] ticket.") + create_other_system_ticket(T) + +/datum/controller/subsystem/tickets/proc/create_other_system_ticket(datum/ticket/T) + SSmentor_tickets.newTicket(T.clientName, T.content, T.title) /datum/controller/subsystem/tickets/proc/autoRespond(N) - if(!check_rights(R_ADMIN|R_MOD)) + if(!check_rights(rights_needed)) return var/datum/ticket/T = allTickets[N] @@ -130,6 +164,7 @@ SUBSYSTEM_DEF(tickets) "Already Resolved" = "The problem has been resolved already.", "Mentorhelp" = "Please redirect your question to Mentorhelp, as they are better experienced with these types of questions.", "Happens Again" = "Thanks, let us know if it continues to happen.", + "Github Issue Report" = "To report a bug, please go to our Github page. Then go to 'Issues'. Then 'New Issue'. Then fill out the report form. If the report would reveal current-round information, file it after the round ends.", "Clear Cache" = "To fix a blank screen, go to the 'Special Verbs' tab and press 'Reload UI Resources'. If that fails, clear your BYOND cache (instructions provided with 'Reload UI Resources'). If that still fails, please adminhelp again, stating you have already done the following." , "IC Issue" = "This is an In Character (IC) issue and will not be handled by admins. You could speak to Security, Internal Affairs, a Departmental Head, Nanotrasen Representetive, or any other relevant authority currently on station.", "Reject" = "Reject", @@ -156,14 +191,17 @@ SUBSYSTEM_DEF(tickets) resolveTicket(N) message_staff("[C] has auto responded to [T.clientName]\'s adminhelp with: [message_key] ") log_game("[C] has auto responded to [T.clientName]\'s adminhelp with: [response_phrases[message_key]]") + if("Mentorhelp") + convert_ticket(T) else var/msg_sound = sound('sound/effects/adminhelp.ogg') SEND_SOUND(returnClient(N), msg_sound) - to_chat(returnClient(N), "[key_name_hidden(C)] is autoresponding with: [response_phrases[message_key]]")//for this we want the full value of whatever key this is to tell the player so we do response_phrases[message_key] + to_chat_safe(returnClient(N), "[key_name_hidden(C)] is autoresponding with: [response_phrases[message_key]]")//for this we want the full value of whatever key this is to tell the player so we do response_phrases[message_key] message_staff("[C] has auto responded to [T.clientName]\'s adminhelp with: [message_key] ") //we want to use the short named keys for this instead of the full sentence which is why we just do message_key T.lastStaffResponse = "Autoresponse: [message_key]" resolveTicket(N) log_game("[C] has auto responded to [T.clientName]\'s adminhelp with: [response_phrases[message_key]]") + //Set ticket state with key N to closed /datum/controller/subsystem/tickets/proc/closeTicket(N) var/datum/ticket/T = allTickets[N] @@ -351,7 +389,7 @@ UI STUFF dat += "" dat += "
[T.content[i]]


" - dat += "Re-Open[check_rights(R_ADMIN|R_MOD, 0) ? "Auto": ""]Resolve

" + dat += "Re-Open[check_rights(rights_needed, 0) ? "Auto": ""]Resolve

" if(!T.staffAssigned) dat += "No staff member assigned to this [ticket_name] - Take Ticket
" @@ -366,6 +404,7 @@ UI STUFF dat += "

" dat += "Close Ticket" + dat += "Convert Ticket" var/datum/browser/popup = new(user, "[ticket_system_name]detail", "[ticket_system_name] #[T.ticketNum]", 1000, 600) popup.set_content(dat) @@ -448,7 +487,6 @@ UI STUFF if(closeTicket(indexNum)) showDetailUI(usr, indexNum) - if(href_list["detailreopen"]) var/indexNum = text2num(href_list["detailreopen"]) if(openTicket(indexNum)) @@ -468,6 +506,10 @@ UI STUFF var/indexNum = text2num(href_list["autorespond"]) autoRespond(indexNum) + if(href_list["convert_ticket"]) + var/indexNum = text2num(href_list["convert_ticket"]) + convert_to_other_ticket(indexNum) + if(href_list["resolveall"]) if(ticket_system_name == "Mentor Tickets") usr.client.resolveAllMentorTickets() diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm index 3eaed85c303..8d02529ae6b 100644 --- a/code/controllers/verbs.dm +++ b/code/controllers/verbs.dm @@ -7,7 +7,7 @@ set name = "Restart Controller" set desc = "Restart one of the various periodic loop controllers for the game (be careful!)" - if(!holder) + if(!check_rights(R_DEBUG)) return switch(controller) if("Master") @@ -20,13 +20,14 @@ message_admins("Admin [key_name_admin(usr)] has restarted the [controller] controller.") /client/proc/debug_controller(controller in list("failsafe", "Master", "Ticker", "Air", "Jobs", "Sun", "Radio", "Configuration", "pAI", - "Cameras", "Garbage", "Event", "Alarm", "Nano", "Vote", "Fires", + "Cameras", "Garbage", "Event", "Nano", "Vote", "Fires", "Mob", "NPC Pool", "Shuttle", "Timer", "Weather", "Space", "Mob Hunt Server","Input")) set category = "Debug" set name = "Debug Controller" set desc = "Debug the various periodic loop controllers for the game (be careful!)" - if(!holder) return + if(!check_rights(R_DEBUG)) + return switch(controller) if("failsafe") debug_variables(Failsafe) @@ -64,9 +65,6 @@ if("Event") debug_variables(SSevents) feedback_add_details("admin_verb","DEvent") - if("Alarm") - debug_variables(SSalarms) - feedback_add_details("admin_verb", "DAlarm") if("Nano") debug_variables(SSnanoui) feedback_add_details("admin_verb","DNano") diff --git a/code/datums/components/caltrop.dm b/code/datums/components/caltrop.dm index 3bd740973a3..fc781b288a9 100644 --- a/code/datums/components/caltrop.dm +++ b/code/datums/components/caltrop.dm @@ -42,7 +42,7 @@ if(!(flags & CALTROP_BYPASS_SHOES) && (H.shoes || feetCover)) return - if((H.flying) || H.buckled) + if(H.flying || H.floating || H.buckled) return var/damage = rand(min_damage, max_damage) diff --git a/code/datums/components/slippery.dm b/code/datums/components/slippery.dm index 88e51209afb..a7b81856468 100644 --- a/code/datums/components/slippery.dm +++ b/code/datums/components/slippery.dm @@ -51,6 +51,6 @@ Additionally calls the parent's `after_slip()` proc on the `victim`. */ /datum/component/slippery/proc/Slip(datum/source, mob/living/carbon/human/victim) - if(istype(victim) && prob(slip_chance) && victim.slip(description, stun, weaken, slip_tiles, walking_is_safe, slip_always, slip_verb)) + if(istype(victim) && !victim.flying && prob(slip_chance) && victim.slip(description, stun, weaken, slip_tiles, walking_is_safe, slip_always, slip_verb)) var/atom/movable/owner = parent owner.after_slip(victim) diff --git a/code/datums/components/squeak.dm b/code/datums/components/squeak.dm index 4c55ad2ad82..f79439f2b3b 100644 --- a/code/datums/components/squeak.dm +++ b/code/datums/components/squeak.dm @@ -67,6 +67,14 @@ var/obj/item/projectile/P = AM if(P.original != parent) return + if(ismob(AM)) + var/mob/M = AM + if(M.flying) + return + if(isliving(AM)) + var/mob/living/L = M + if(L.floating) + return var/atom/current_parent = parent if(isturf(current_parent.loc)) play_squeak() diff --git a/code/datums/diseases/transformation.dm b/code/datums/diseases/transformation.dm index f619e9aa9bd..3e3e1696e61 100644 --- a/code/datums/diseases/transformation.dm +++ b/code/datums/diseases/transformation.dm @@ -57,6 +57,9 @@ W.plane = initial(W.plane) W.loc = affected_mob.loc W.dropped(affected_mob) + if(isobj(affected_mob.loc)) + var/obj/O = affected_mob.loc + O.force_eject_occupant() var/mob/living/new_mob = new new_form(affected_mob.loc) if(istype(new_mob)) new_mob.a_intent = "harm" diff --git a/code/datums/log_record.dm b/code/datums/log_record.dm index 9b7d52b5390..2a659477b47 100644 --- a/code/datums/log_record.dm +++ b/code/datums/log_record.dm @@ -3,32 +3,51 @@ var/raw_time // When did this happen? var/what // What happened var/who // Who did it - var/target // Who/what was targeted (can be a string) - var/turf/where // Where did it happen + var/target // Who/what was targeted + var/where // Where did it happen /datum/log_record/New(_log_type, _who, _what, _target, _where, _raw_time) log_type = _log_type - - who = get_subject_text(_who) + + who = get_subject_text(_who, _log_type) what = _what - target = get_subject_text(_target) - if(!_where) + target = get_subject_text(_target, _log_type) + if(!istext(_where) && !isturf(_where)) _where = get_turf(_who) - where = _where + if(isturf(_where)) + var/turf/T = _where + where = ADMIN_COORDJMP(T) + else + where = _where if(!_raw_time) _raw_time = world.time raw_time = _raw_time -/datum/log_record/proc/get_subject_text(subject) +/datum/log_record/proc/get_subject_text(subject, log_type) if(ismob(subject) || isclient(subject) || istype(subject, /datum/mind)) - return key_name_admin(subject) - if(isatom(subject)) + . = key_name_admin(subject) + if(should_log_health(log_type) && isliving(subject)) + . += get_health_string(subject) + else if(isatom(subject)) var/atom/A = subject - return A.name - if(istype(subject, /datum)) + . = A.name + else if(istype(subject, /datum)) var/datum/D = subject return D.type - return subject + else + . = subject + +/datum/log_record/proc/get_health_string(var/mob/living/L) + var/OX = L.getOxyLoss() > 50 ? "[L.getOxyLoss()]" : L.getOxyLoss() + var/TX = L.getToxLoss() > 50 ? "[L.getToxLoss()]" : L.getToxLoss() + var/BU = L.getFireLoss() > 50 ? "[L.getFireLoss()]" : L.getFireLoss() + var/BR = L.getBruteLoss() > 50 ? "[L.getBruteLoss()]" : L.getBruteLoss() + return " ([L.health]: [OX] - [TX] - [BU] - [BR])" + +/datum/log_record/proc/should_log_health(log_type) + if(log_type == ATTACK_LOG || log_type == DEFENSE_LOG) + return TRUE + return FALSE /proc/compare_log_record(datum/log_record/A, datum/log_record/B) var/time_diff = A.raw_time - B.raw_time diff --git a/code/datums/log_viewer.dm b/code/datums/log_viewer.dm index 67eb3d21d86..c5a17507606 100644 --- a/code/datums/log_viewer.dm +++ b/code/datums/log_viewer.dm @@ -1,31 +1,45 @@ -#define ALL_LOGS list(ATTACK_LOG, DEFENSE_LOG, CONVERSION_LOG, SAY_LOG, EMOTE_LOG, MISC_LOG) +#define UPDATE_CKEY_MOB(__ckey) var/mob/result = selected_ckeys_mobs[__ckey];\ +if(!result || result.ckey != __ckey){\ + result = get_mob_by_ckey(__ckey);\ + selected_ckeys_mobs[__ckey] = result;\ +} + +#define RECORD_WARN_LIMIT 1000 +#define RECORD_HARD_LIMIT 2500 /datum/log_viewer var/time_from = 0 var/time_to = 4 HOURS // 4 Hours should be enough. INFINITY would screw the UI up - var/list/selected_mobs = list() // The mobs in question - var/list/selected_log_types = list() // The log types being searched for - + var/list/selected_mobs = list() // The mobs in question. + var/list/selected_ckeys = list() // The ckeys selected to search for. Will show all mobs the ckey is attached to + var/list/mob/selected_ckeys_mobs = list() + var/list/selected_log_types = ALL_LOGS // The log types being searched for var/list/log_records = list() // Found and sorted records /datum/log_viewer/proc/clear_all() selected_mobs.Cut() - selected_log_types.Cut() + selected_log_types = ALL_LOGS + selected_ckeys.Cut() + selected_ckeys_mobs.Cut() time_from = initial(time_from) time_to = initial(time_to) log_records.Cut() return -/datum/log_viewer/proc/search() +/datum/log_viewer/proc/search(user) log_records.Cut() // Empty the old results var/list/invalid_mobs = list() + var/list/ckeys = selected_ckeys.Copy() for(var/i in selected_mobs) var/mob/M = i - if(!M || QDELETED(M)) + if(!M || QDELETED(M) || !M.last_known_ckey) invalid_mobs |= M continue + ckeys |= M.last_known_ckey + + for(var/ckey in ckeys) for(var/log_type in selected_log_types) - var/list/logs = M.logs[log_type] + var/list/logs = GLOB.logging.get_logs_by_type(ckey, log_type) var/len_logs = length(logs) if(len_logs) var/start_index = get_earliest_log_index(logs) @@ -36,8 +50,8 @@ continue log_records.Add(logs.Copy(start_index, end_index + 1)) - if(invalid_mobs.len) - to_chat(usr, "The search criteria contained invalid mobs. They have been removed from the criteria.") + if(length(invalid_mobs)) + to_chat(user, "The search criteria contained invalid mobs. They have been removed from the criteria.") for(var/i in invalid_mobs) selected_mobs -= i // Cleanup @@ -91,9 +105,23 @@ return start return 0 -/datum/log_viewer/proc/add_mob(mob/user, mob/M) +/datum/log_viewer/proc/add_mobs(list/mob/mobs) + if(!length(mobs)) + return + for(var/i in mobs) + add_mob(usr, i, FALSE) + +/datum/log_viewer/proc/add_ckey(mob/user, ckey) + if(!user || !ckey) + return + selected_ckeys |= ckey + UPDATE_CKEY_MOB(ckey) + show_ui(user) + +/datum/log_viewer/proc/add_mob(mob/user, mob/M, show_the_ui = TRUE) if(!M || !user) return + selected_mobs |= M show_ui(user) @@ -102,9 +130,9 @@ var/all_log_types = ALL_LOGS var/trStyleTop = "border-top:2px solid; border-bottom:2px solid; padding-top: 5px; padding-bottom: 5px;" var/trStyle = "border-top:1px solid; border-bottom:1px solid; padding-top: 5px; padding-bottom: 5px;" - var/dat - dat += "" - dat += "
" + var/list/dat = list() + dat += "" + dat += "
" dat += "Time Search Range: [gameTimestamp(wtime = time_from)]" dat += " To: [gameTimestamp(wtime = time_to)]" dat += "
" @@ -115,20 +143,26 @@ if(QDELETED(M)) selected_mobs -= i continue - dat += "[M.name]" + dat += "[get_display_name(M)]" dat += "Add Mob" dat += "Clear All Mobs" dat += "
" + dat += "Ckeys being used:" + for(var/ckey in selected_ckeys) + dat += "[get_ckey_name(ckey)]" + dat += "Add ckey" + dat += "Clear All ckeys" + dat += "
" + dat += "Log Types:" - for(var/i in all_log_types) - var/log_type = i + for(var/log_type in all_log_types) var/enabled = (log_type in selected_log_types) var/text var/style if(enabled) text = "[log_type]" - style = "background: [get_logtype_color(i)]" + style = "background: [get_logtype_color(log_type)]" else text = log_type @@ -142,9 +176,9 @@ // Search results var/tdStyleTime = "width:80px; text-align:center;" var/tdStyleType = "width:80px; text-align:center;" - var/tdStyleWho = "width:300px; text-align:center;" + var/tdStyleWho = "width:400px; text-align:center;" var/tdStyleWhere = "width:150px; text-align:center;" - dat += "
" + dat += "
" dat += "" dat += "" for(var/i in log_records) @@ -153,13 +187,12 @@ dat +="\ \ - " - + " dat += "
WhenTypeWhoWhatTargetWhere
[time][L.log_type][L.who][L.what][L.target][ADMIN_COORDJMP(L.where)]
[L.target][L.where]
" dat += "
" - var/datum/browser/popup = new(user, "Log viewer", "Log viewer", 1400, 600) - popup.set_content(dat) + var/datum/browser/popup = new(user, "Log Viewer", "Log Viewer", 1500, 600) + popup.set_content(dat.Join()) popup.open() /datum/log_viewer/Topic(href, href_list) @@ -188,6 +221,19 @@ return if(href_list["search"]) search(usr) + var/records_len = length(log_records) + if(records_len > RECORD_WARN_LIMIT) + var/datum/log_record/last_record = log_records[RECORD_WARN_LIMIT] + var/last_time = gameTimestamp(wtime = last_record.raw_time - 9.99) + var/answer = alert(usr, "More than [RECORD_WARN_LIMIT] records were found. continuing will take a long time. This won't cause much lag for the server. Time at the [RECORD_WARN_LIMIT]th record '[last_time]'", "Warning", "Continue", "Limit to [RECORD_WARN_LIMIT]", "Cancel") + if(answer == "Limit to [RECORD_WARN_LIMIT]") + log_records.Cut(RECORD_WARN_LIMIT) + else if(answer == "Cancel") + log_records.Cut() + else + if(records_len > RECORD_HARD_LIMIT) + to_chat(usr, "Record limit reached. Limiting to [RECORD_HARD_LIMIT].") + log_records.Cut(RECORD_HARD_LIMIT) show_ui(usr) return if(href_list["clear_all"]) @@ -198,17 +244,31 @@ selected_mobs.Cut() show_ui(usr) return + if(href_list["clear_ckeys"]) + selected_ckeys.Cut() + selected_ckeys_mobs.Cut() + show_ui(usr) + return if(href_list["add_mob"]) var/list/mobs = getpois(TRUE, TRUE) var/datum/async_input/A = input_autocomplete_async(usr, "Please, select a mob: ", mobs) A.on_close(CALLBACK(src, .proc/add_mob, usr)) return + if(href_list["add_ckey"]) + var/list/ckeys = GLOB.logging.get_ckeys_logged() + var/datum/async_input/A = input_autocomplete_async(usr, "Please, select a ckey: ", ckeys) + A.on_close(CALLBACK(src, .proc/add_ckey, usr)) + return if(href_list["remove_mob"]) var/mob/M = locate(href_list["remove_mob"]) if(M) selected_mobs -= M show_ui(usr) return + if(href_list["remove_ckey"]) + selected_ckeys -= href_list["remove_ckey"] + show_ui(usr) + return if(href_list["toggle_log_type"]) var/log_type = href_list["toggle_log_type"] if(log_type in selected_log_types) @@ -232,4 +292,28 @@ return "deepskyblue" if(MISC_LOG) return "gray" + if(DEADCHAT_LOG) + return "#cc00c6" + if(OOC_LOG) + return "#002eb8" + if(LOOC_LOG) + return "#6699CC" return "slategray" + +/datum/log_viewer/proc/get_display_name(mob/M) + var/name = M.name + if(M.name != M.real_name) + name = "[name] ([M.real_name])" + if(isobserver(M)) + name = "[name] (DEAD)" + return "\[[M.last_known_ckey]\] [name]" + +/datum/log_viewer/proc/get_ckey_name(ckey) + UPDATE_CKEY_MOB(ckey) + var/mob/M = selected_ckeys_mobs[ckey] + + return get_display_name(M) + +#undef UPDATE_CKEY_MOB +#undef RECORD_WARN_LIMIT +#undef RECORD_HARD_LIMIT diff --git a/code/datums/logging.dm b/code/datums/logging.dm new file mode 100644 index 00000000000..bac26610e5e --- /dev/null +++ b/code/datums/logging.dm @@ -0,0 +1,47 @@ +/datum/logging + var/list/datum/log_record/logs = list() // Assoc list of assoc lists (ckey, (log_type, list/logs)) + +/datum/logging/proc/add_log(ckey, datum/log_record/log) + if(!ckey) + log_debug("GLOB.logging.add_log called with an invalid ckey") + return + + if(!logs[ckey]) + logs[ckey] = list() + + var/list/log_types_list = logs[ckey] + + if(!log_types_list[log.log_type]) + log_types_list[log.log_type] = list() + + var/list/datum/log_record/log_records = log_types_list[log.log_type] + log_records.Add(log) + +/datum/logging/proc/get_ckeys_logged() + var/list/ckeys = list() + for(var/ckey in logs) + ckeys.Add(ckey) + return ckeys + +/* Returns the logs of a given ckey and log_type + * If no logs exist it will return an empty list +*/ +/datum/logging/proc/get_logs_by_type(ckey, log_type) + if(!ckey) + log_debug("GLOB.logging.get_logs_by_type called with an invalid ckey") + return + if(!log_type || !(log_type in ALL_LOGS)) + log_debug("GLOB.logging.get_logs_by_type called with an invalid log_type '[log_type]'") + return + + var/list/log_types_list = logs[ckey] + // Check if logs exist for the ckey + if(!length(log_types_list)) + return list() + + var/list/datum/log_record/log_records = log_types_list[log_type] + + // Check if logs exist for this type + if(!log_records) + return list() + return log_records diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 2f22e58d37b..0c992bbb32c 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -100,14 +100,6 @@ 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 - for(var/log_type in current.logs) // Copy the old logs - var/list/logs = current.logs[log_type] - if(new_character.logs[log_type]) - new_character.logs[log_type] += logs.Copy() // Append the old ones - new_character.logs[log_type] = sortTim(new_character.logs[log_type], /proc/compare_log_record) // Sort them on time - else - new_character.logs[log_type] = logs.Copy() // Just copy them - SSnanoui.user_transferred(current, new_character) if(new_character.mind) //remove any mind currently in our new body's mind variable @@ -1419,9 +1411,10 @@ return A /datum/mind/proc/announce_objectives() - to_chat(current, "Your current objectives:") - for(var/line in splittext(gen_objective_text(), "
")) - to_chat(current, line) + if(current) + to_chat(current, "Your current objectives:") + for(var/line in splittext(gen_objective_text(), "
")) + to_chat(current, line) /datum/mind/proc/find_syndicate_uplink() var/list/L = current.get_contents() diff --git a/code/datums/outfits/outfit_admin.dm b/code/datums/outfits/outfit_admin.dm index 14bc959fbb1..2b48d5da5f7 100644 --- a/code/datums/outfits/outfit_admin.dm +++ b/code/datums/outfits/outfit_admin.dm @@ -222,10 +222,10 @@ name = "NT Undercover Operative" // Disguised NT special forces, sent to quietly eliminate or keep tabs on people in high positions (e.g: captain) - uniform = /obj/item/clothing/under/color/black + uniform = /obj/item/clothing/under/color/random back = /obj/item/storage/backpack belt = /obj/item/storage/belt/utility/full/multitool - gloves = /obj/item/clothing/gloves/combat + gloves = /obj/item/clothing/gloves/color/yellow shoes = /obj/item/clothing/shoes/chameleon/noslip l_ear = /obj/item/radio/headset/centcom id = /obj/item/card/id diff --git a/code/datums/ruins/space.dm b/code/datums/ruins/space.dm index 799a12f4db9..3541be89983 100644 --- a/code/datums/ruins/space.dm +++ b/code/datums/ruins/space.dm @@ -248,3 +248,29 @@ allow_duplicates = FALSE // I dont even want to think about what happens if you have 2 shuttles with the same ID. Likely scary stuff. always_place = TRUE // Its designed to make exploring other space ruins more accessible cost = 0 // Force spawned so shouldnt have a cost + +/datum/map_template/ruin/space/syndiecakesfactory + id = "Syndiecakes Factory" + suffix = "syndiecakesfactory.dmm" + name = "Syndicakes Factory" + description = "Syndicate used to get funds selling corgi cakes produced here. Was it hit by meteors or by a Nanotrasen comando?" + allow_duplicates = FALSE + cost = 2 //telecomms + multiple mobs + +/datum/map_template/ruin/space/debris1 + id = "debris1" + suffix = "debris1.dmm" + name = "Debris field 1" + description = "A bunch of metal chunks, wires and space waste" + +/datum/map_template/ruin/space/debris2 + id = "debris2" + suffix = "debris2.dmm" + name = "Debris field 2" + description = "A bunch of metal chunks, wires and space waste that used to be some kind of secure storage facility" + +/datum/map_template/ruin/space/debris3 + id = "debris3" + suffix = "debris3.dmm" + name = "Debris field 3" + description = "A bunch of metal chunks, wires and space waste. It used to be an arcade." diff --git a/code/datums/shuttles.dm b/code/datums/shuttles.dm index 53517d5dbc9..dacc08dee31 100644 --- a/code/datums/shuttles.dm +++ b/code/datums/shuttles.dm @@ -9,8 +9,9 @@ var/admin_notes /datum/map_template/shuttle/New() - shuttle_id = "[port_id]_[suffix]" - mappath = "[prefix][shuttle_id].dmm" + if(port_id && suffix) + shuttle_id = "[port_id]_[suffix]" + mappath = "[prefix][shuttle_id].dmm" . = ..() /datum/map_template/shuttle/emergency @@ -132,3 +133,8 @@ suffix = "admin" name = "NTV Argos" description = "Default Admin ship. An older ship used for special operations." + +/datum/map_template/shuttle/admin/armory + suffix = "armory" + name = "NRV Sparta" + description = "Armory Shuttle, with plenty of guns to hand out and some general supplies." diff --git a/code/datums/spell.dm b/code/datums/spell.dm index 3855dbcfac3..cb10700e5c6 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -444,6 +444,11 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) return +// Normally, AoE spells will generate an attack log for every turf they loop over, while searching for targets. +// With this override, all /aoe_turf type spells will only generate 1 log, saying that the user has cast the spell. +/obj/effect/proc_holder/spell/aoe_turf/perform(list/targets, recharge, mob/user, make_attack_logs) + add_attack_logs(user, null, "Cast the AoE spell [name]", ATKLOG_ALL) + return ..(targets, recharge, user, FALSE) /obj/effect/proc_holder/spell/targeted/proc/los_check(mob/A,mob/B) //Checks for obstacles from A to B diff --git a/code/datums/spells/knock.dm b/code/datums/spells/knock.dm index 88f5eec9474..e4c652ae1d3 100644 --- a/code/datums/spells/knock.dm +++ b/code/datums/spells/knock.dm @@ -13,11 +13,6 @@ action_icon_state = "knock" sound = 'sound/magic/knock.ogg' -// Knock doesn't need to generate an attack log for every turf, set `make_attack_logs` to FALSE and just create a custom one. -/obj/effect/proc_holder/spell/aoe_turf/knock/perform(list/targets, recharge, mob/user) - add_attack_logs(user, user, "cast the spell [name]", ATKLOG_ALL) - return ..(targets, recharge, user, make_attack_logs = FALSE) - /obj/effect/proc_holder/spell/aoe_turf/knock/cast(list/targets, mob/user = usr) for(var/turf/T in targets) for(var/obj/machinery/door/door in T.contents) diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index c8045dfe1e4..c8f2b6bb99b 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -633,7 +633,6 @@ GLOBAL_LIST_INIT(all_supply_groups, list(SUPPLY_EMERGENCY,SUPPLY_SECURITY,SUPPLY contains = list(/obj/machinery/power/emitter, /obj/machinery/power/emitter) cost = 10 - containertype = /obj/structure/closet/crate/secure containername = "emitter crate" access = ACCESS_CE containertype = /obj/structure/closet/crate/secure/engineering @@ -717,7 +716,7 @@ GLOBAL_LIST_INIT(all_supply_groups, list(SUPPLY_EMERGENCY,SUPPLY_SECURITY,SUPPLY name = "Supermatter Shard Crate" contains = list(/obj/machinery/power/supermatter_shard) cost = 50 //So cargo thinks twice before killing themselves with it - containertype = /obj/structure/closet/crate/secure + containertype = /obj/structure/closet/crate/secure/engineering containername = "supermatter shard crate" access = ACCESS_CE @@ -728,7 +727,7 @@ GLOBAL_LIST_INIT(all_supply_groups, list(SUPPLY_EMERGENCY,SUPPLY_SECURITY,SUPPLY /obj/item/pipe/circulator, /obj/item/pipe/circulator) cost = 25 - containertype = /obj/structure/closet/crate/secure + containertype = /obj/structure/closet/crate/secure/engineering containername = "thermo-electric generator crate" access = ACCESS_CE announce_beacons = list("Engineering" = list("Chief Engineer's Desk", "Atmospherics")) @@ -1174,11 +1173,10 @@ GLOBAL_LIST_INIT(all_supply_groups, list(SUPPLY_EMERGENCY,SUPPLY_SECURITY,SUPPLY containername = "fox crate" /datum/supply_packs/organic/butterfly - name = "Butterflies Crate" + name = "Butterfly Crate" cost = 50 containertype = /obj/structure/closet/critter/butterfly - containername = "butterflies crate" - contraband = 1 + containername = "butterfly crate" /datum/supply_packs/organic/deer name = "Deer Crate" diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index 4814e27380b..8a172bb85b1 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -1725,8 +1725,8 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) U.purchase_log += "[bicon(C)]" for(var/item in bought_items) - new item(C) - U.purchase_log += "[bicon(item)]" + var/obj/purchased = new item(C) + U.purchase_log += "[bicon(purchased)]" log_game("[key_name(usr)] purchased a surplus crate with [jointext(itemlog, ", ")]") /datum/uplink_item/bundles_TC/telecrystal diff --git a/code/datums/weather/weather_types/floor_is_lava.dm b/code/datums/weather/weather_types/floor_is_lava.dm index 9f98a481dbf..0233e0aee71 100644 --- a/code/datums/weather/weather_types/floor_is_lava.dm +++ b/code/datums/weather/weather_types/floor_is_lava.dm @@ -35,6 +35,8 @@ return if(!L.client) //Only sentient people are going along with it! return + if(L.flying) + return L.adjustFireLoss(3) /datum/weather/floor_is_lava/fake diff --git a/code/datums/wires/airlock.dm b/code/datums/wires/airlock.dm index dcde08d7ec1..6f7291a3a69 100644 --- a/code/datums/wires/airlock.dm +++ b/code/datums/wires/airlock.dm @@ -1,67 +1,29 @@ // Wires for airlocks /datum/wires/airlock/secure - random = 1 + randomize = TRUE /datum/wires/airlock holder_type = /obj/machinery/door/airlock - wire_count = 12 - window_x = 410 - window_y = 570 + wire_count = 12 // 10 actual, 2 duds. + proper_name = "Airlock" + window_x = 400 + window_y = 101 -#define AIRLOCK_WIRE_IDSCAN 1 -#define AIRLOCK_WIRE_MAIN_POWER1 2 -#define AIRLOCK_WIRE_DOOR_BOLTS 4 -#define AIRLOCK_WIRE_BACKUP_POWER1 8 -#define AIRLOCK_WIRE_OPEN_DOOR 16 -#define AIRLOCK_WIRE_AI_CONTROL 32 -#define AIRLOCK_WIRE_ELECTRIFY 64 -#define AIRLOCK_WIRE_SAFETY 128 -#define AIRLOCK_WIRE_SPEED 256 -#define AIRLOCK_WIRE_LIGHT 512 +/datum/wires/airlock/New(atom/_holder) + wires = list( + WIRE_IDSCAN, WIRE_MAIN_POWER1, WIRE_DOOR_BOLTS, WIRE_BACKUP_POWER1, WIRE_OPEN_DOOR, + WIRE_AI_CONTROL, WIRE_ELECTRIFY, WIRE_SAFETY, WIRE_SPEED, WIRE_BOLT_LIGHT + ) + return ..() -/datum/wires/airlock/GetWireName(index) - switch(index) - if(AIRLOCK_WIRE_IDSCAN) - return "ID Scan" - - if(AIRLOCK_WIRE_MAIN_POWER1) - return "Primary Power" - - if(AIRLOCK_WIRE_DOOR_BOLTS) - return "Door Bolts" - - if(AIRLOCK_WIRE_BACKUP_POWER1) - return "Primary Backup Power" - - if(AIRLOCK_WIRE_OPEN_DOOR) - return "Door State" - - if(AIRLOCK_WIRE_AI_CONTROL) - return "AI Control" - - if(AIRLOCK_WIRE_ELECTRIFY) - return "Electrification" - - if(AIRLOCK_WIRE_ELECTRIFY) - return "Door Safeties" - - if(AIRLOCK_WIRE_ELECTRIFY) - return "Door Timing" - - if(AIRLOCK_WIRE_ELECTRIFY) - return "Bolt Lights" - -/datum/wires/airlock/CanUse(mob/living/L) +/datum/wires/airlock/interactable(mob/user) var/obj/machinery/door/airlock/A = holder - if(iscarbon(L)) - if(A.Adjacent(L)) - if(A.isElectrified()) - if(A.shock(L, 100)) - return 0 + if(iscarbon(user) && A.Adjacent(user) && A.isElectrified() && A.shock(user, 100)) + return FALSE if(A.panel_open) - return 1 - return 0 + return TRUE + return FALSE /datum/wires/airlock/get_status() . = ..() @@ -70,21 +32,20 @@ . += "The door bolts [A.locked ? "have fallen!" : "look up."]" . += "The door bolt lights are [(A.lights && haspower) ? "on." : "off!"]" - . += "The test light is [haspower ? "on." : "off!"]" + . += "The test light is [haspower ? "on." : "off!"]" . += "The 'AI control allowed' light is [(A.aiControlDisabled == 0 && !A.emagged && haspower) ? "on" : "off"]." . += "The 'Check Wiring' light is [(A.safe == 0 && haspower) ? "on" : "off"]." . += "The 'Check Timing Mechanism' light is [(A.normalspeed == 0 && haspower) ? "on" : "off"]." . += "The emergency lights are [(A.emergency && haspower) ? "on" : "off"]." -/datum/wires/airlock/UpdateCut(index, mended) - +/datum/wires/airlock/on_cut(wire, mend) var/obj/machinery/door/airlock/A = holder - switch(index) - if(AIRLOCK_WIRE_IDSCAN) - A.aiDisabledIdScanner = !mended - if(AIRLOCK_WIRE_MAIN_POWER1) + switch(wire) + if(WIRE_IDSCAN) + A.aiDisabledIdScanner = !mend + if(WIRE_MAIN_POWER1) - if(!mended) + if(!mend) //Cutting either one disables the main door power, but unless backup power is also cut, the backup power re-powers the door in 10 seconds. While unpowered, the door may be crowbarred open, but bolts-raising will not work. Cutting these wires may electocute the user. A.loseMainPower() A.shock(usr, 50) @@ -92,9 +53,9 @@ A.regainMainPower() A.shock(usr, 50) - if(AIRLOCK_WIRE_BACKUP_POWER1) + if(WIRE_BACKUP_POWER1) - if(!mended) + if(!mend) //Cutting either one disables the backup door power (allowing it to be crowbarred open, but disabling bolts-raising), but may electocute the user. A.loseBackupPower() A.shock(usr, 50) @@ -102,16 +63,16 @@ A.regainBackupPower() A.shock(usr, 50) - if(AIRLOCK_WIRE_DOOR_BOLTS) + if(WIRE_DOOR_BOLTS) - if(!mended) + if(!mend) //Cutting this wire also drops the door bolts, and mending it does not raise them. (This is what happens now, except there are a lot more wires going to door bolts at present) A.lock(1) A.update_icon() - if(AIRLOCK_WIRE_AI_CONTROL) + if(WIRE_AI_CONTROL) - if(!mended) + if(!mend) //one wire for AI control. Cutting this prevents the AI from controlling the door unless it has hacked the door through the power connection (which takes about a minute). If both main and backup power are cut, as well as this wire, then the AI cannot operate or hack the door at all. //aiControlDisabled: If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in. if(A.aiControlDisabled == 0) @@ -124,44 +85,44 @@ else if(A.aiControlDisabled == 2) A.aiControlDisabled = -1 - if(AIRLOCK_WIRE_ELECTRIFY) - if(!mended) + if(WIRE_ELECTRIFY) + if(!mend) //Cutting this wire electrifies the door, so that the next person to touch the door without insulated gloves gets electrocuted. A.electrify(-1) else A.electrify(0) return // Don't update the dialog. - if(AIRLOCK_WIRE_SAFETY) - A.safe = mended + if(WIRE_SAFETY) + A.safe = mend - if(AIRLOCK_WIRE_SPEED) - A.autoclose = mended - if(mended) + if(WIRE_SPEED) + A.autoclose = mend + if(mend) if(!A.density) - spawn(0) - A.close() + INVOKE_ASYNC(A, /obj/machinery/door/airlock/.proc/close) - if(AIRLOCK_WIRE_LIGHT) - A.lights = mended + if(WIRE_BOLT_LIGHT) + A.lights = mend A.update_icon() ..() -/datum/wires/airlock/UpdatePulsed(index) - +/datum/wires/airlock/on_pulse(wire) var/obj/machinery/door/airlock/A = holder - switch(index) - if(AIRLOCK_WIRE_IDSCAN) + switch(wire) + if(WIRE_IDSCAN) //Sending a pulse through flashes the red light on the door (if the door has power). if(A.arePowerSystemsOn() && A.density) A.do_animate("deny") if(A.emergency) A.emergency = 0 A.update_icon() - if(AIRLOCK_WIRE_MAIN_POWER1) + + if(WIRE_MAIN_POWER1) //Sending a pulse through either one causes a breaker to trip, disabling the door for 10 seconds if backup power is connected, or 1 minute if not (or until backup power comes back on, whichever is shorter). A.loseMainPower() - if(AIRLOCK_WIRE_DOOR_BOLTS) + + if(WIRE_DOOR_BOLTS) //one wire for door bolts. Sending a pulse through this drops door bolts if they're not down (whether power's on or not), //raises them if they are down (only if power's on) if(!A.locked) @@ -170,45 +131,40 @@ else if(A.unlock()) A.audible_message("You hear a click from the bottom of the door.", hearing_distance = 1) - if(AIRLOCK_WIRE_BACKUP_POWER1) + if(WIRE_BACKUP_POWER1) //two wires for backup power. Sending a pulse through either one causes a breaker to trip, but this does not disable it unless main power is down too (in which case it is disabled for 1 minute or however long it takes main power to come back, whichever is shorter). A.loseBackupPower() - if(AIRLOCK_WIRE_AI_CONTROL) + + if(WIRE_AI_CONTROL) if(A.aiControlDisabled == 0) A.aiControlDisabled = 1 else if(A.aiControlDisabled == -1) A.aiControlDisabled = 2 + addtimer(CALLBACK(A, /obj/machinery/door/airlock/.proc/ai_control_callback), 1 SECONDS) - spawn(10) - if(A) - if(A.aiControlDisabled == 1) - A.aiControlDisabled = 0 - else if(A.aiControlDisabled == 2) - A.aiControlDisabled = -1 - - if(AIRLOCK_WIRE_ELECTRIFY) + if(WIRE_ELECTRIFY) //one wire for electrifying the door. Sending a pulse through this electrifies the door for 30 seconds. A.electrify(30) - if(AIRLOCK_WIRE_OPEN_DOOR) + + if(WIRE_OPEN_DOOR) //tries to open the door without ID //will succeed only if the ID wire is cut or the door requires no access and it's not emagged if(A.emagged) return if(!A.requiresID() || A.check_access(null)) - spawn(0) - if(A.density) - A.open() - else - A.close() - if(AIRLOCK_WIRE_SAFETY) + if(A.density) + INVOKE_ASYNC(A, /obj/machinery/door/airlock/.proc/open) + else + INVOKE_ASYNC(A, /obj/machinery/door/airlock/.proc/close) + + if(WIRE_SAFETY) A.safe = !A.safe if(!A.density) - spawn(0) - A.close() + INVOKE_ASYNC(A, /obj/machinery/door/airlock/.proc/close) - if(AIRLOCK_WIRE_SPEED) + if(WIRE_SPEED) A.normalspeed = !A.normalspeed - if(AIRLOCK_WIRE_LIGHT) + if(WIRE_BOLT_LIGHT) A.lights = !A.lights A.update_icon() diff --git a/code/datums/wires/alarm.dm b/code/datums/wires/alarm.dm index f6b49b0dd99..cd13c9fe1d8 100644 --- a/code/datums/wires/alarm.dm +++ b/code/datums/wires/alarm.dm @@ -2,35 +2,22 @@ /datum/wires/alarm holder_type = /obj/machinery/alarm wire_count = 5 + window_x = 385 + window_y = 90 + proper_name = "Air alarm" -#define AALARM_WIRE_IDSCAN 1 -#define AALARM_WIRE_POWER 2 -#define AALARM_WIRE_SYPHON 4 -#define AALARM_WIRE_AI_CONTROL 8 -#define AALARM_WIRE_AALARM 16 +/datum/wires/alarm/New(atom/_holder) + wires = list( + WIRE_IDSCAN , WIRE_MAIN_POWER1 , WIRE_SYPHON, + WIRE_AI_CONTROL, WIRE_AALARM + ) + return ..() -/datum/wires/alarm/GetWireName(index) - switch(index) - if(AALARM_WIRE_IDSCAN) - return "ID Scan" - - if(AALARM_WIRE_POWER) - return "Power" - - if(AALARM_WIRE_SYPHON) - return "Syphon" - - if(AALARM_WIRE_AI_CONTROL) - return "AI Control" - - if(AALARM_WIRE_AALARM) - return "Atmospherics Alarm" - -/datum/wires/alarm/CanUse(mob/living/L) +/datum/wires/alarm/interactable(mob/user) var/obj/machinery/alarm/A = holder if(A.wiresexposed) - return 1 - return 0 + return TRUE + return FALSE /datum/wires/alarm/get_status() . = ..() @@ -39,75 +26,60 @@ . += "The Air Alarm is [(A.shorted || (A.stat & (NOPOWER|BROKEN))) ? "offline." : "working properly!"]" . += "The 'AI control allowed' light is [A.aidisabled ? "off" : "on"]." -/datum/wires/alarm/UpdateCut(index, mended) +/datum/wires/alarm/on_cut(wire, mend) var/obj/machinery/alarm/A = holder - switch(index) - if(AALARM_WIRE_IDSCAN) - if(!mended) + switch(wire) + if(WIRE_IDSCAN) + if(!mend) A.locked = 1 -// to_chat(world, "Idscan wire cut") - if(AALARM_WIRE_POWER) + if(WIRE_MAIN_POWER1) A.shock(usr, 50) - A.shorted = !mended + A.shorted = !mend A.update_icon() -// to_chat(world, "Power wire cut") - if(AALARM_WIRE_AI_CONTROL) - A.aidisabled = !mended -// to_chat(world, "AI Control Wire Cut") + if(WIRE_AI_CONTROL) + A.aidisabled = !mend - if(AALARM_WIRE_SYPHON) - if(!mended) + if(WIRE_SYPHON) + if(!mend) A.mode = 3 // AALARM_MODE_PANIC A.apply_mode() -// to_chat(world, "Syphon Wire Cut") - if(AALARM_WIRE_AALARM) - if(A.alarm_area.atmosalert(2, A)) - A.post_alert(2) + if(WIRE_AALARM) + if(A.alarm_area.atmosalert(ATMOS_ALARM_DANGER, A)) + A.post_alert(ATMOS_ALARM_DANGER) A.update_icon() ..() -/datum/wires/alarm/UpdatePulsed(index) +/datum/wires/alarm/on_pulse(wire) var/obj/machinery/alarm/A = holder - switch(index) - if(AALARM_WIRE_IDSCAN) + switch(wire) + if(WIRE_IDSCAN) A.locked = !A.locked -// to_chat(world, "Idscan wire pulsed") - if(AALARM_WIRE_POWER) -// to_chat(world, "Power wire pulsed") - if(A.shorted == 0) - A.shorted = 1 + if(WIRE_MAIN_POWER1) + if(!A.shorted) + A.shorted = TRUE A.update_icon() + addtimer(CALLBACK(A, /obj/machinery/alarm/.proc/unshort_callback), 120 SECONDS) - spawn(12000) - if(A.shorted == 1) - A.shorted = 0 - A.update_icon() - - - if(AALARM_WIRE_AI_CONTROL) -// to_chat(world, "AI Control wire pulsed") - if(A.aidisabled == 0) - A.aidisabled = 1 + if(WIRE_AI_CONTROL) + if(!A.aidisabled) + A.aidisabled = TRUE A.updateDialog() - spawn(100) - if(A.aidisabled == 1) - A.aidisabled = 0 + addtimer(CALLBACK(A, /obj/machinery/alarm/.proc/enable_ai_control_callback), 10 SECONDS) - if(AALARM_WIRE_SYPHON) -// to_chat(world, "Syphon wire pulsed") + + if(WIRE_SYPHON) if(A.mode == 1) // AALARM_MODE_SCRUB A.mode = 3 // AALARM_MODE_PANIC else A.mode = 1 // AALARM_MODE_SCRUB A.apply_mode() - if(AALARM_WIRE_AALARM) -// to_chat(world, "Aalarm wire pulsed") - if(A.alarm_area.atmosalert(0, A)) - A.post_alert(0) + if(WIRE_AALARM) + if(A.alarm_area.atmosalert(ATMOS_ALARM_NONE, A)) + A.post_alert(ATMOS_ALARM_NONE) A.update_icon() ..() diff --git a/code/datums/wires/apc.dm b/code/datums/wires/apc.dm index b1076c8e29b..49931d8fa31 100644 --- a/code/datums/wires/apc.dm +++ b/code/datums/wires/apc.dm @@ -1,25 +1,13 @@ /datum/wires/apc holder_type = /obj/machinery/power/apc wire_count = 4 + proper_name = "APC" + window_x = 355 + window_y = 97 -#define APC_WIRE_IDSCAN 1 -#define APC_WIRE_MAIN_POWER1 2 -#define APC_WIRE_MAIN_POWER2 4 -#define APC_WIRE_AI_CONTROL 8 - -/datum/wires/apc/GetWireName(index) - switch(index) - if(APC_WIRE_IDSCAN) - return "ID Scan" - - if(APC_WIRE_MAIN_POWER1) - return "Primary Power" - - if(APC_WIRE_MAIN_POWER2) - return "Secondary Power" - - if(APC_WIRE_AI_CONTROL) - return "AI Control" +/datum/wires/apc/New(atom/_holder) + wires = list(WIRE_IDSCAN, WIRE_MAIN_POWER1, WIRE_MAIN_POWER2, WIRE_AI_CONTROL) + return ..() /datum/wires/apc/get_status() . = ..() @@ -29,66 +17,53 @@ . += "The 'AI control allowed' light is [A.aidisabled ? "off" : "on"]." -/datum/wires/apc/CanUse(mob/living/L) +/datum/wires/apc/interactable(mob/user) var/obj/machinery/power/apc/A = holder if(A.panel_open && !A.opened) return TRUE return FALSE -/datum/wires/apc/UpdatePulsed(index) +/datum/wires/apc/on_pulse(wire) var/obj/machinery/power/apc/A = holder - switch(index) + switch(wire) + if(WIRE_IDSCAN) + A.locked = FALSE + addtimer(CALLBACK(A, /obj/machinery/power/apc/.proc/relock_callback), 30 SECONDS) - if(APC_WIRE_IDSCAN) - A.locked = 0 - spawn(300) - if(A) - A.locked = 1 - A.updateDialog() + if(WIRE_MAIN_POWER1, WIRE_MAIN_POWER2) + if(!A.shorted) + A.shorted = TRUE + addtimer(CALLBACK(A, /obj/machinery/power/apc/.proc/check_main_power_callback), 120 SECONDS) - if(APC_WIRE_MAIN_POWER1, APC_WIRE_MAIN_POWER2) - if(A.shorted == 0) - A.shorted = 1 - spawn(1200) - if(A && !IsIndexCut(APC_WIRE_MAIN_POWER1) && !IsIndexCut(APC_WIRE_MAIN_POWER2)) - A.shorted = 0 - A.updateDialog() - - if(APC_WIRE_AI_CONTROL) - if(A.aidisabled == 0) - A.aidisabled = 1 - - spawn(10) - if(A && !IsIndexCut(APC_WIRE_AI_CONTROL)) - A.aidisabled = 0 - A.updateDialog() + if(WIRE_AI_CONTROL) + if(!A.aidisabled) + A.aidisabled = TRUE + addtimer(CALLBACK(A, /obj/machinery/power/apc/.proc/check_ai_control_callback), 1 SECONDS) ..() -/datum/wires/apc/UpdateCut(index, mended) +/datum/wires/apc/on_cut(wire, mend) var/obj/machinery/power/apc/A = holder - switch(index) - if(APC_WIRE_MAIN_POWER1, APC_WIRE_MAIN_POWER2) - - if(!mended) + switch(wire) + if(WIRE_MAIN_POWER1, WIRE_MAIN_POWER2) + if(!mend) A.shock(usr, 50) - A.shorted = 1 + A.shorted = TRUE - else if(!IsIndexCut(APC_WIRE_MAIN_POWER1) && !IsIndexCut(APC_WIRE_MAIN_POWER2)) - A.shorted = 0 + else if(!is_cut(WIRE_MAIN_POWER1) && !is_cut(WIRE_MAIN_POWER2)) + A.shorted = FALSE A.shock(usr, 50) - if(APC_WIRE_AI_CONTROL) - - if(!mended) - if(A.aidisabled == 0) - A.aidisabled = 1 + if(WIRE_AI_CONTROL) + if(!mend) + if(!A.aidisabled) + A.aidisabled = TRUE else - if(A.aidisabled == 1) - A.aidisabled = 0 + if(A.aidisabled) + A.aidisabled = FALSE ..() diff --git a/code/datums/wires/autolathe.dm b/code/datums/wires/autolathe.dm index c1413abd0cc..0d2aab5a81f 100644 --- a/code/datums/wires/autolathe.dm +++ b/code/datums/wires/autolathe.dm @@ -1,21 +1,13 @@ /datum/wires/autolathe holder_type = /obj/machinery/autolathe wire_count = 10 + proper_name = "Autolathe" + window_x = 340 + window_y = 55 -#define AUTOLATHE_HACK_WIRE 1 -#define AUTOLATHE_SHOCK_WIRE 2 -#define AUTOLATHE_DISABLE_WIRE 4 - -/datum/wires/autolathe/GetWireName(index) - switch(index) - if(AUTOLATHE_HACK_WIRE) - return "Hack" - - if(AUTOLATHE_SHOCK_WIRE) - return "Shock" - - if(AUTOLATHE_DISABLE_WIRE) - return "Disable" +/datum/wires/autolathe/New(atom/_holder) + wires = list(WIRE_AUTOLATHE_HACK, WIRE_ELECTRIFY, WIRE_AUTOLATHE_DISABLE) + return ..() /datum/wires/autolathe/get_status() . = ..() @@ -24,51 +16,38 @@ . += "The green light is [A.shocked ? "off" : "on"]." . += "The blue light is [A.hacked ? "off" : "on"]." -/datum/wires/autolathe/CanUse() +/datum/wires/autolathe/interactable(mob/user) var/obj/machinery/autolathe/A = holder + if(iscarbon(user) && A.Adjacent(user) && A.shocked && A.shock(user, 100)) + return FALSE if(A.panel_open) - return 1 - return 0 + return TRUE + return FALSE -/datum/wires/autolathe/UpdateCut(index, mended) +/datum/wires/autolathe/on_cut(wire, mend) var/obj/machinery/autolathe/A = holder - switch(index) - if(AUTOLATHE_HACK_WIRE) - A.adjust_hacked(!mended) - if(AUTOLATHE_SHOCK_WIRE) - A.shocked = !mended - if(AUTOLATHE_DISABLE_WIRE) - A.disabled = !mended + switch(wire) + if(WIRE_AUTOLATHE_HACK) + A.adjust_hacked(!mend) + if(WIRE_ELECTRIFY) + A.shocked = !mend + if(WIRE_AUTOLATHE_DISABLE) + A.disabled = !mend ..() -/datum/wires/autolathe/UpdatePulsed(index) - if(IsIndexCut(index)) +/datum/wires/autolathe/on_pulse(wire) + if(is_cut(wire)) return var/obj/machinery/autolathe/A = holder - switch(index) - if(AUTOLATHE_HACK_WIRE) + switch(wire) + if(WIRE_AUTOLATHE_HACK) A.adjust_hacked(!A.hacked) - updateUIs() - spawn(50) - if(A && !IsIndexCut(index)) - A.adjust_hacked(0) - updateUIs() - if(AUTOLATHE_SHOCK_WIRE) - A.shocked = !A.shocked - updateUIs() - spawn(50) - if(A && !IsIndexCut(index)) - A.shocked = 0 - updateUIs() - if(AUTOLATHE_DISABLE_WIRE) - A.disabled = !A.disabled - updateUIs() - spawn(50) - if(A && !IsIndexCut(index)) - A.disabled = 0 - updateUIs() + addtimer(CALLBACK(A, /obj/machinery/autolathe/.proc/check_hacked_callback), 5 SECONDS) -/datum/wires/autolathe/proc/updateUIs() - SSnanoui.update_uis(src) - if(holder) - SSnanoui.update_uis(holder) + if(WIRE_ELECTRIFY) + A.shocked = !A.shocked + addtimer(CALLBACK(A, /obj/machinery/autolathe/.proc/check_electrified_callback), 5 SECONDS) + + if(WIRE_AUTOLATHE_DISABLE) + A.disabled = !A.disabled + addtimer(CALLBACK(A, /obj/machinery/autolathe/.proc/check_disabled_callback), 5 SECONDS) diff --git a/code/datums/wires/camera.dm b/code/datums/wires/camera.dm index a6b1549fbe1..39e0cb2c3e1 100644 --- a/code/datums/wires/camera.dm +++ b/code/datums/wires/camera.dm @@ -1,9 +1,15 @@ // Wires for cameras. /datum/wires/camera - random = 0 holder_type = /obj/machinery/camera wire_count = 2 + proper_name = "Camera" + window_x = 350 + window_y = 95 + +/datum/wires/camera/New(atom/_holder) + wires = list(WIRE_FOCUS, WIRE_MAIN_POWER1) + return ..() /datum/wires/camera/get_status() . = ..() @@ -11,51 +17,40 @@ . += "The focus light is [(C.view_range == initial(C.view_range)) ? "on" : "off"]." . += "The power link light is [C.can_use() ? "on" : "off"]." -/datum/wires/camera/CanUse(mob/living/L) +/datum/wires/camera/interactable(mob/user) var/obj/machinery/camera/C = holder if(!C.panel_open) return FALSE return TRUE -#define CAMERA_WIRE_FOCUS 1 -#define CAMERA_WIRE_POWER 2 - -/datum/wires/camera/GetWireName(index) - switch(index) - if(CAMERA_WIRE_FOCUS) - return "Focus" - - if(CAMERA_WIRE_POWER) - return "Power" - -/datum/wires/camera/UpdateCut(index, mended) +/datum/wires/camera/on_cut(wire, mend) var/obj/machinery/camera/C = holder - switch(index) - if(CAMERA_WIRE_FOCUS) - var/range = (mended ? initial(C.view_range) : C.short_range) + switch(wire) + if(WIRE_FOCUS) + var/range = (mend ? initial(C.view_range) : C.short_range) C.setViewRange(range) - if(CAMERA_WIRE_POWER) - if(C.status && !mended || !C.status && mended) + if(WIRE_MAIN_POWER1) + if(C.status && !mend || !C.status && mend) C.toggle_cam(usr, TRUE) C.obj_integrity = C.max_integrity //this is a pretty simplistic way to heal the camera, but there's no reason for this to be complex. ..() -/datum/wires/camera/UpdatePulsed(index) +/datum/wires/camera/on_pulse(wire) var/obj/machinery/camera/C = holder - if(IsIndexCut(index)) + if(is_cut(wire)) return - switch(index) - if(CAMERA_WIRE_FOCUS) + switch(wire) + if(WIRE_FOCUS) var/new_range = (C.view_range == initial(C.view_range) ? C.short_range : initial(C.view_range)) C.setViewRange(new_range) - if(CAMERA_WIRE_POWER) + if(WIRE_MAIN_POWER1) C.toggle_cam(null) // Deactivate the camera ..() /datum/wires/camera/proc/CanDeconstruct() - if(IsIndexCut(CAMERA_WIRE_POWER) && IsIndexCut(CAMERA_WIRE_FOCUS)) + if(is_cut(WIRE_MAIN_POWER1) && is_cut(WIRE_FOCUS)) return TRUE else return FALSE diff --git a/code/datums/wires/explosive.dm b/code/datums/wires/explosive.dm index 47fd627d597..988aa0f37a8 100644 --- a/code/datums/wires/explosive.dm +++ b/code/datums/wires/explosive.dm @@ -1,36 +1,36 @@ /datum/wires/explosive wire_count = 1 + proper_name = "Explosive" + window_x = 320 + window_y = 50 -#define WIRE_EXPLODE 1 - -/datum/wires/explosive/GetWireName(index) - switch(index) - if(WIRE_EXPLODE) - return "Explode" +/datum/wires/explosive/New(atom/_holder) + wires = list(WIRE_EXPLODE) + return ..() /datum/wires/explosive/proc/explode() return -/datum/wires/explosive/UpdatePulsed(index) - switch(index) +/datum/wires/explosive/on_pulse(wire) + switch(wire) if(WIRE_EXPLODE) explode() ..() -/datum/wires/explosive/UpdateCut(index, mended) - switch(index) +/datum/wires/explosive/on_cut(wire, mend) + switch(wire) if(WIRE_EXPLODE) - if(!mended) + if(!mend) explode() ..() /datum/wires/explosive/gibtonite holder_type = /obj/item/twohanded/required/gibtonite -/datum/wires/explosive/gibtonite/CanUse(mob/L) - return 1 +/datum/wires/explosive/gibtonite/interactable(mob/user) + return TRUE -/datum/wires/explosive/gibtonite/UpdateCut(index, mended) +/datum/wires/explosive/gibtonite/on_cut(wire, mend) return /datum/wires/explosive/gibtonite/explode() diff --git a/code/datums/wires/mulebot.dm b/code/datums/wires/mulebot.dm index 988b520854f..cb13b0d6718 100644 --- a/code/datums/wires/mulebot.dm +++ b/code/datums/wires/mulebot.dm @@ -1,90 +1,35 @@ /datum/wires/mulebot - random = 1 + randomize = TRUE holder_type = /mob/living/simple_animal/bot/mulebot wire_count = 10 - window_x = 410 + proper_name = "Mulebot" + window_x = 370 + window_y = -12 -#define MULEBOT_WIRE_POWER1 1 // power connections -#define MULEBOT_WIRE_POWER2 2 -#define MULEBOT_WIRE_AVOIDANCE 4 // mob avoidance -#define MULEBOT_WIRE_LOADCHECK 8 // load checking (non-crate) -#define MULEBOT_WIRE_MOTOR1 16 // motor wires -#define MULEBOT_WIRE_MOTOR2 32 // -#define MULEBOT_WIRE_REMOTE_RX 64 // remote recv functions -#define MULEBOT_WIRE_REMOTE_TX 128 // remote trans status -#define MULEBOT_WIRE_BEACON_RX 256 // beacon ping recv +/datum/wires/mulebot/New(atom/_holder) + wires = list( + WIRE_MAIN_POWER1, WIRE_MAIN_POWER2, WIRE_MOB_AVOIDANCE, + WIRE_LOADCHECK, WIRE_MOTOR1, WIRE_MOTOR2, + WIRE_REMOTE_RX, WIRE_REMOTE_TX, WIRE_BEACON_RX + ) + return ..() -/datum/wires/mulebot/GetWireName(index) - switch(index) - if(MULEBOT_WIRE_POWER1) - return "Primary Power" - - if(MULEBOT_WIRE_POWER2) - return "Secondary Power" - - if(MULEBOT_WIRE_AVOIDANCE) - return "Mob Avoidance" - - if(MULEBOT_WIRE_LOADCHECK) - return "Load Checking" - - if(MULEBOT_WIRE_MOTOR1) - return "Primary Motor" - - if(MULEBOT_WIRE_MOTOR2) - return "Secondary Motor" - - if(MULEBOT_WIRE_REMOTE_RX) - return "Remote Signal Receiver" - - if(MULEBOT_WIRE_REMOTE_TX) - return "Remote Signal Sender" - - if(MULEBOT_WIRE_BEACON_RX) - return "Navigation Beacon Receiver" - -/datum/wires/mulebot/CanUse(mob/living/L) +/datum/wires/mulebot/interactable(mob/user) var/mob/living/simple_animal/bot/mulebot/M = holder if(M.open) - return 1 - return 0 + return TRUE + return FALSE -/datum/wires/mulebot/UpdatePulsed(index) - switch(index) - if(MULEBOT_WIRE_POWER1, MULEBOT_WIRE_POWER2) +/datum/wires/mulebot/on_pulse(wire) + switch(wire) + if(WIRE_MAIN_POWER1, WIRE_MAIN_POWER2) holder.visible_message("[bicon(holder)] The charge light flickers.") - if(MULEBOT_WIRE_AVOIDANCE) + if(WIRE_MOB_AVOIDANCE) holder.visible_message("[bicon(holder)] The external warning lights flash briefly.") - if(MULEBOT_WIRE_LOADCHECK) + if(WIRE_LOADCHECK) holder.visible_message("[bicon(holder)] The load platform clunks.") - if(MULEBOT_WIRE_MOTOR1, MULEBOT_WIRE_MOTOR2) + if(WIRE_MOTOR1, WIRE_MOTOR2) holder.visible_message("[bicon(holder)] The drive motor whines briefly.") else holder.visible_message("[bicon(holder)] You hear a radio crackle.") ..() - -// HELPER PROCS - -/datum/wires/mulebot/proc/Motor1() - return !(wires_status & MULEBOT_WIRE_MOTOR1) - -/datum/wires/mulebot/proc/Motor2() - return !(wires_status & MULEBOT_WIRE_MOTOR2) - -/datum/wires/mulebot/proc/HasPower() - return !(wires_status & MULEBOT_WIRE_POWER1) && !(wires_status & MULEBOT_WIRE_POWER2) - -/datum/wires/mulebot/proc/LoadCheck() - return !(wires_status & MULEBOT_WIRE_LOADCHECK) - -/datum/wires/mulebot/proc/MobAvoid() - return !(wires_status & MULEBOT_WIRE_AVOIDANCE) - -/datum/wires/mulebot/proc/RemoteTX() - return !(wires_status & MULEBOT_WIRE_REMOTE_TX) - -/datum/wires/mulebot/proc/RemoteRX() - return !(wires_status & MULEBOT_WIRE_REMOTE_RX) - -/datum/wires/mulebot/proc/BeaconRX() - return !(wires_status & MULEBOT_WIRE_BEACON_RX) diff --git a/code/datums/wires/nuclearbomb.dm b/code/datums/wires/nuclearbomb.dm index 3b8ff5db098..51918c02ff4 100644 --- a/code/datums/wires/nuclearbomb.dm +++ b/code/datums/wires/nuclearbomb.dm @@ -1,28 +1,20 @@ /datum/wires/nuclearbomb holder_type = /obj/machinery/nuclearbomb - random = 1 - wire_count = 7 + randomize = TRUE + wire_count = 7 // 3 actual, 4 duds. + proper_name = "Nuclear bomb" + window_x = 345 + window_y = 75 -#define NUCLEARBOMB_WIRE_LIGHT 1 -#define NUCLEARBOMB_WIRE_TIMING 2 -#define NUCLEARBOMB_WIRE_SAFETY 4 +/datum/wires/nuclearbomb/New(atom/_holder) + wires = list(WIRE_BOMB_LIGHT, WIRE_BOMB_TIMING, WIRE_BOMB_SAFETY) + return ..() -/datum/wires/nuclearbomb/GetWireName(index) - switch(index) - if(NUCLEARBOMB_WIRE_LIGHT) - return "Bomb Light" - - if(NUCLEARBOMB_WIRE_TIMING) - return "Bomb Timing" - - if(NUCLEARBOMB_WIRE_SAFETY) - return "Bomb Safety" - -/datum/wires/nuclearbomb/CanUse(mob/living/L) +/datum/wires/nuclearbomb/interactable(mob/user) var/obj/machinery/nuclearbomb/N = holder if(N.panel_open) - return 1 - return 0 + return TRUE + return FALSE /datum/wires/nuclearbomb/get_status() . = ..() @@ -31,52 +23,36 @@ . += "The device is is [N.safety ? "quiet" : "whirring"]." . += "The lights are [N.lighthack ? "static" : "functional"]." -/datum/wires/nuclearbomb/UpdatePulsed(index) +/datum/wires/nuclearbomb/on_pulse(wire) var/obj/machinery/nuclearbomb/N = holder - switch(index) - if(NUCLEARBOMB_WIRE_LIGHT) + switch(wire) + if(WIRE_BOMB_LIGHT) N.lighthack = !N.lighthack - updateUIs() - spawn(100) - N.lighthack = !N.lighthack - updateUIs() - if(NUCLEARBOMB_WIRE_TIMING) + addtimer(CALLBACK(N, /obj/machinery/nuclearbomb/.proc/reset_lighthack_callback), 10 SECONDS) + + if(WIRE_BOMB_TIMING) if(N.timing) message_admins("[key_name_admin(usr)] pulsed a nuclear bomb's detonation wire, causing it to explode (JMP)") N.explode() - if(NUCLEARBOMB_WIRE_SAFETY) - N.safety = !N.safety - updateUIs() - spawn(100) - N.safety = !N.safety - if(N.safety == 1) - if(!N.is_syndicate) - set_security_level(N.previous_level) - N.visible_message("The [N] quiets down.") - if(!N.lighthack) - if(N.icon_state == "nuclearbomb2") - N.icon_state = "nuclearbomb1" - else - N.visible_message("The [N] emits a quiet whirling noise!") - updateUIs() -/datum/wires/nuclearbomb/UpdateCut(index, mended) + if(WIRE_BOMB_SAFETY) + N.safety = !N.safety + addtimer(CALLBACK(N, /obj/machinery/nuclearbomb/.proc/reset_safety_callback), 10 SECONDS) + +/datum/wires/nuclearbomb/on_cut(wire, mend) var/obj/machinery/nuclearbomb/N = holder - switch(index) - if(NUCLEARBOMB_WIRE_SAFETY) + switch(wire) + if(WIRE_BOMB_SAFETY) if(N.timing) message_admins("[key_name_admin(usr)] cut a nuclear bomb's timing wire, causing it to explode (JMP)") N.explode() - if(NUCLEARBOMB_WIRE_TIMING) + + if(WIRE_BOMB_TIMING) if(!N.lighthack) if(N.icon_state == "nuclearbomb2") N.icon_state = "nuclearbomb1" N.timing = 0 - GLOB.bomb_set = 0 - if(NUCLEARBOMB_WIRE_LIGHT) - N.lighthack = !N.lighthack + GLOB.bomb_set = FALSE -/datum/wires/nuclearbomb/proc/updateUIs() - SSnanoui.update_uis(src) - if(holder) - SSnanoui.update_uis(holder) + if(WIRE_BOMB_LIGHT) + N.lighthack = !N.lighthack diff --git a/code/datums/wires/particle_accelerator.dm b/code/datums/wires/particle_accelerator.dm index d6e68a79cfb..e285f4cf898 100644 --- a/code/datums/wires/particle_accelerator.dm +++ b/code/datums/wires/particle_accelerator.dm @@ -1,67 +1,52 @@ /datum/wires/particle_acc/control_box wire_count = 5 holder_type = /obj/machinery/particle_accelerator/control_box + proper_name = "Particle accelerator control" + window_x = 361 + window_y = 22 -#define PARTICLE_TOGGLE_WIRE 1 // Toggles whether the PA is on or not. -#define PARTICLE_STRENGTH_WIRE 2 // Determines the strength of the PA. -#define PARTICLE_INTERFACE_WIRE 4 // Determines the interface showing up. -#define PARTICLE_LIMIT_POWER_WIRE 8 // Determines how strong the PA can be. +/datum/wires/particle_acc/control_box/New(atom/_holder) + wires = list(WIRE_PARTICLE_POWER, WIRE_PARTICLE_STRENGTH, WIRE_PARTICLE_INTERFACE, WIRE_PARTICLE_POWER_LIMIT) + return ..() -/datum/wires/particle_acc/control_box/GetWireName(index) - switch(index) - if(PARTICLE_TOGGLE_WIRE) - return "Power Toggle" - - if(PARTICLE_STRENGTH_WIRE) - return "Strength" - - if(PARTICLE_INTERFACE_WIRE) - return "Interface" - - if(PARTICLE_LIMIT_POWER_WIRE) - return "Maximum Power" - -/datum/wires/particle_acc/control_box/CanUse(mob/living/L) +/datum/wires/particle_acc/control_box/interactable(mob/user) var/obj/machinery/particle_accelerator/control_box/C = holder if(C.construction_state == 2) - return 1 - return 0 + return TRUE + return FALSE -/datum/wires/particle_acc/control_box/UpdatePulsed(index) +/datum/wires/particle_acc/control_box/on_pulse(wire) var/obj/machinery/particle_accelerator/control_box/C = holder - switch(index) - - if(PARTICLE_TOGGLE_WIRE) + switch(wire) + if(WIRE_PARTICLE_POWER) C.toggle_power() - if(PARTICLE_STRENGTH_WIRE) + if(WIRE_PARTICLE_STRENGTH) C.add_strength() - if(PARTICLE_INTERFACE_WIRE) + if(WIRE_PARTICLE_INTERFACE) C.interface_control = !C.interface_control - if(PARTICLE_LIMIT_POWER_WIRE) + if(WIRE_PARTICLE_POWER_LIMIT) C.visible_message("[bicon(C)][C] makes a large whirring noise.") ..() -/datum/wires/particle_acc/control_box/UpdateCut(index, mended) +/datum/wires/particle_acc/control_box/on_cut(wire, mend) var/obj/machinery/particle_accelerator/control_box/C = holder - switch(index) - - if(PARTICLE_TOGGLE_WIRE) - if(C.active == !mended) + switch(wire) + if(WIRE_PARTICLE_POWER) + if(C.active == !mend) C.toggle_power() - if(PARTICLE_STRENGTH_WIRE) - - for(var/i = 1; i < 3; i++) + if(WIRE_PARTICLE_STRENGTH) + for(var/i in 1 to 2) C.remove_strength() - if(PARTICLE_INTERFACE_WIRE) - C.interface_control = mended + if(WIRE_PARTICLE_INTERFACE) + C.interface_control = mend - if(PARTICLE_LIMIT_POWER_WIRE) - C.strength_upper_limit = (mended ? 2 : 3) + if(WIRE_PARTICLE_POWER_LIMIT) + C.strength_upper_limit = (mend ? 2 : 3) if(C.strength_upper_limit < C.strength) C.remove_strength() ..() diff --git a/code/datums/wires/radio.dm b/code/datums/wires/radio.dm index 90a72935c53..1efee71692d 100644 --- a/code/datums/wires/radio.dm +++ b/code/datums/wires/radio.dm @@ -1,52 +1,44 @@ /datum/wires/radio holder_type = /obj/item/radio wire_count = 3 + proper_name = "Radio" + window_x = 330 + window_y = 37 -#define RADIO_WIRE_SIGNAL 1 -#define RADIO_WIRE_RECEIVE 2 -#define RADIO_WIRE_TRANSMIT 4 +/datum/wires/radio/New(atom/_holder) + wires = list(WIRE_RADIO_SIGNAL, WIRE_RADIO_RECEIVER, WIRE_RADIO_TRANSMIT) + return ..() -/datum/wires/radio/GetWireName(index) - switch(index) - if(RADIO_WIRE_SIGNAL) - return "Signal" - - if(RADIO_WIRE_RECEIVE) - return "Receiver" - - if(RADIO_WIRE_TRANSMIT) - return "Transmitter" - -/datum/wires/radio/CanUse(mob/living/L) +/datum/wires/radio/interactable(mob/user) var/obj/item/radio/R = holder if(R.b_stat) - return 1 - return 0 + return TRUE + return FALSE -/datum/wires/radio/UpdatePulsed(index) +/datum/wires/radio/on_pulse(wire) var/obj/item/radio/R = holder - switch(index) - if(RADIO_WIRE_SIGNAL) - R.listening = !R.listening && !IsIndexCut(RADIO_WIRE_RECEIVE) - R.broadcasting = R.listening && !IsIndexCut(RADIO_WIRE_TRANSMIT) + switch(wire) + if(WIRE_RADIO_SIGNAL) + R.listening = !R.listening && !is_cut(WIRE_RADIO_RECEIVER) + R.broadcasting = R.listening && !is_cut(WIRE_RADIO_TRANSMIT) - if(RADIO_WIRE_RECEIVE) - R.listening = !R.listening && !IsIndexCut(RADIO_WIRE_SIGNAL) + if(WIRE_RADIO_RECEIVER) + R.listening = !R.listening && !is_cut(WIRE_RADIO_SIGNAL) - if(RADIO_WIRE_TRANSMIT) - R.broadcasting = !R.broadcasting && !IsIndexCut(RADIO_WIRE_SIGNAL) + if(WIRE_RADIO_TRANSMIT) + R.broadcasting = !R.broadcasting && !is_cut(WIRE_RADIO_SIGNAL) ..() -/datum/wires/radio/UpdateCut(index, mended) +/datum/wires/radio/on_cut(wire, mend) var/obj/item/radio/R = holder - switch(index) - if(RADIO_WIRE_SIGNAL) - R.listening = mended && !IsIndexCut(RADIO_WIRE_RECEIVE) - R.broadcasting = mended && !IsIndexCut(RADIO_WIRE_TRANSMIT) + switch(wire) + if(WIRE_RADIO_SIGNAL) + R.listening = mend && !is_cut(WIRE_RADIO_RECEIVER) + R.broadcasting = mend && !is_cut(WIRE_RADIO_TRANSMIT) - if(RADIO_WIRE_RECEIVE) - R.listening = mended && !IsIndexCut(RADIO_WIRE_SIGNAL) + if(WIRE_RADIO_RECEIVER) + R.listening = mend && !is_cut(WIRE_RADIO_SIGNAL) - if(RADIO_WIRE_TRANSMIT) - R.broadcasting = mended && !IsIndexCut(RADIO_WIRE_SIGNAL) + if(WIRE_RADIO_TRANSMIT) + R.broadcasting = mend && !is_cut(WIRE_RADIO_SIGNAL) ..() diff --git a/code/datums/wires/robot.dm b/code/datums/wires/robot.dm index 04a9509cfe2..927980c57fa 100644 --- a/code/datums/wires/robot.dm +++ b/code/datums/wires/robot.dm @@ -1,32 +1,14 @@ /datum/wires/robot - random = 1 + randomize = TRUE holder_type = /mob/living/silicon/robot wire_count = 5 + window_x = 340 + window_y = 106 + proper_name = "Cyborg" -// /vg/ ordering - -#define BORG_WIRE_MAIN_POWER 1 // The power wires do nothing whyyyyyyyyyyyyy -#define BORG_WIRE_LOCKED_DOWN 2 -#define BORG_WIRE_CAMERA 4 -#define BORG_WIRE_AI_CONTROL 8 // Not used on MoMMIs -#define BORG_WIRE_LAWCHECK 16 // Not used on MoMMIs - -/datum/wires/robot/GetWireName(index) - switch(index) - if(BORG_WIRE_MAIN_POWER) - return "Main Power" - - if(BORG_WIRE_LOCKED_DOWN) - return "Lockdown" - - if(BORG_WIRE_CAMERA) - return "Camera" - - if(BORG_WIRE_AI_CONTROL) - return "AI Control" - - if(BORG_WIRE_LAWCHECK) - return "Law Check" +/datum/wires/robot/New(atom/_holder) + wires = list(WIRE_AI_CONTROL, WIRE_BORG_CAMERA, WIRE_BORG_LAWCHECK, WIRE_BORG_LOCKED) + return ..() /datum/wires/robot/get_status() . = ..() @@ -36,70 +18,53 @@ . += "The Camera light is [(R.camera && R.camera.status == 1) ? "on" : "off"]." . += "The lockdown light is [R.lockcharge ? "on" : "off"]." -/datum/wires/robot/UpdateCut(index, mended) - +/datum/wires/robot/on_cut(wire, mend) var/mob/living/silicon/robot/R = holder - switch(index) - if(BORG_WIRE_LAWCHECK) //Cut the law wire, and the borg will no longer receive law updates from its AI - if(!mended) - if(R.lawupdate == 1) + switch(wire) + if(WIRE_BORG_LAWCHECK) //Cut the law wire, and the borg will no longer receive law updates from its AI + if(!mend) + if(R.lawupdate) to_chat(R, "LawSync protocol engaged.") + R.lawsync() R.show_laws() else - if(R.lawupdate == 0 && !R.emagged) - R.lawupdate = 1 + if(!R.lawupdate && !R.emagged) + R.lawupdate = TRUE - if(BORG_WIRE_AI_CONTROL) //Cut the AI wire to reset AI control - if(!mended) + if(WIRE_AI_CONTROL) //Cut the AI wire to reset AI control + if(!mend) if(R.connected_ai) R.disconnect_from_ai() - if(BORG_WIRE_CAMERA) + if(WIRE_BORG_CAMERA) if(!isnull(R.camera) && !R.scrambledcodes) - R.camera.status = mended + R.camera.status = mend R.camera.toggle_cam(usr, 0) // Will kick anyone who is watching the Cyborg's camera. - if(BORG_WIRE_LAWCHECK) //Forces a law update if the borg is set to receive them. Since an update would happen when the borg checks its laws anyway, not much use, but eh - if(R.lawupdate) - R.lawsync() - - if(BORG_WIRE_LOCKED_DOWN) - R.SetLockdown(!mended) + if(WIRE_BORG_LOCKED) + R.SetLockdown(!mend) ..() -/datum/wires/robot/UpdatePulsed(index) - +/datum/wires/robot/on_pulse(wire) var/mob/living/silicon/robot/R = holder - switch(index) - if(BORG_WIRE_AI_CONTROL) //pulse the AI wire to make the borg reselect an AI + switch(wire) + if(WIRE_AI_CONTROL) //pulse the AI wire to make the borg reselect an AI if(!R.emagged) R.connect_to_ai(select_active_ai()) - if(BORG_WIRE_CAMERA) + if(WIRE_BORG_CAMERA) if(!isnull(R.camera) && R.camera.can_use() && !R.scrambledcodes) R.camera.toggle_cam(usr, 0) // Kick anyone watching the Cyborg's camera, doesn't display you disconnecting the camera. R.visible_message("[R]'s camera lense focuses loudly.") to_chat(R, "Your camera lense focuses loudly.") - if(BORG_WIRE_LOCKED_DOWN) + if(WIRE_BORG_LOCKED) R.SetLockdown(!R.lockcharge) // Toggle ..() -/datum/wires/robot/CanUse(mob/living/L) +/datum/wires/robot/interactable(mob/user) var/mob/living/silicon/robot/R = holder if(R.wiresexposed) - return 1 - return 0 - -/datum/wires/robot/proc/IsCameraCut() - return wires_status & BORG_WIRE_CAMERA - -/datum/wires/robot/proc/LockedCut() - return wires_status & BORG_WIRE_LOCKED_DOWN - -/datum/wires/robot/proc/CanLawCheck() - return wires_status & BORG_WIRE_LAWCHECK - -/datum/wires/robot/proc/AIHasControl() - return wires_status & BORG_WIRE_AI_CONTROL + return TRUE + return FALSE diff --git a/code/datums/wires/smartfridge.dm b/code/datums/wires/smartfridge.dm index a65377ead1a..3955b1849b0 100644 --- a/code/datums/wires/smartfridge.dm +++ b/code/datums/wires/smartfridge.dm @@ -1,35 +1,26 @@ /datum/wires/smartfridge holder_type = /obj/machinery/smartfridge wire_count = 3 + proper_name = "Smartfridge" + window_x = 340 + window_y = 103 + +/datum/wires/smartfridge/New(atom/_holder) + wires = list(WIRE_ELECTRIFY, WIRE_IDSCAN, WIRE_THROW_ITEM) + return ..() /datum/wires/smartfridge/secure - random = 1 - wire_count = 4 + randomize = TRUE + wire_count = 4 // 3 actual, 1 dud. + window_y = 97 -#define SMARTFRIDGE_WIRE_ELECTRIFY 1 -#define SMARTFRIDGE_WIRE_THROW 2 -#define SMARTFRIDGE_WIRE_IDSCAN 4 - -/datum/wires/smartfridge/GetWireName(index) - switch(index) - if(SMARTFRIDGE_WIRE_ELECTRIFY) - return "Electrification" - - if(SMARTFRIDGE_WIRE_THROW) - return "Item Throw" - - if(SMARTFRIDGE_WIRE_IDSCAN) - return "ID Scan" - -/datum/wires/smartfridge/CanUse(mob/living/L) +/datum/wires/smartfridge/interactable(mob/user) var/obj/machinery/smartfridge/S = holder - if(!issilicon(L)) - if(S.seconds_electrified) - if(S.shock(L, 100)) - return 0 + if(iscarbon(user) && S.Adjacent(user) && S.seconds_electrified && S.shock(user, 100)) + return FALSE if(S.panel_open) - return 1 - return 0 + return TRUE + return FALSE /datum/wires/smartfridge/get_status() . = ..() @@ -38,27 +29,27 @@ . += "The red light is [S.shoot_inventory ? "off" : "blinking"]." . += "A [S.scan_id ? "purple" : "yellow"] light is on." -/datum/wires/smartfridge/UpdatePulsed(index) +/datum/wires/smartfridge/on_pulse(wire) var/obj/machinery/smartfridge/S = holder - switch(index) - if(SMARTFRIDGE_WIRE_THROW) + switch(wire) + if(WIRE_THROW_ITEM) S.shoot_inventory = !S.shoot_inventory - if(SMARTFRIDGE_WIRE_ELECTRIFY) + if(WIRE_ELECTRIFY) S.seconds_electrified = 30 - if(SMARTFRIDGE_WIRE_IDSCAN) + if(WIRE_IDSCAN) S.scan_id = !S.scan_id ..() -/datum/wires/smartfridge/UpdateCut(index, mended) +/datum/wires/smartfridge/on_cut(wire, mend) var/obj/machinery/smartfridge/S = holder - switch(index) - if(SMARTFRIDGE_WIRE_THROW) - S.shoot_inventory = !mended - if(SMARTFRIDGE_WIRE_ELECTRIFY) - if(mended) + switch(wire) + if(WIRE_THROW_ITEM) + S.shoot_inventory = !mend + if(WIRE_ELECTRIFY) + if(mend) S.seconds_electrified = 0 else S.seconds_electrified = -1 - if(SMARTFRIDGE_WIRE_IDSCAN) - S.scan_id = 1 + if(WIRE_IDSCAN) + S.scan_id = TRUE ..() diff --git a/code/datums/wires/suitstorage.dm b/code/datums/wires/suitstorage.dm index 175b36e6081..828e56884bf 100644 --- a/code/datums/wires/suitstorage.dm +++ b/code/datums/wires/suitstorage.dm @@ -1,24 +1,13 @@ /datum/wires/suitstorage holder_type = /obj/machinery/suit_storage_unit wire_count = 8 + proper_name = "Suit storage unit" + window_x = 350 + window_y = 85 -#define SSU_WIRE_ID 1 -#define SSU_WIRE_SHOCK 2 -#define SSU_WIRE_SAFETY 4 -#define SSU_WIRE_UV 8 - - -/datum/wires/suitstorage/GetWireName(index) - switch(index) - if(SSU_WIRE_ID) - return "ID lock" - if(SSU_WIRE_SHOCK) - return "Shock wire" - if(SSU_WIRE_SAFETY) - return "Safety wire" - if(SSU_WIRE_UV) - return "UV wire" - +/datum/wires/suitstorage/New(atom/_holder) + wires = list(WIRE_IDSCAN, WIRE_ELECTRIFY, WIRE_SAFETY, WIRE_SSU_UV) + return ..() /datum/wires/suitstorage/get_status() . = ..() @@ -28,42 +17,48 @@ . += "The green light is [A.shocked ? "on" : "off"]." . += "The UV display shows [A.uv_super ? "15 nm" : "185 nm"]." -datum/wires/suitstorage/CanUse() +datum/wires/suitstorage/interactable(mob/user) var/obj/machinery/suit_storage_unit/A = holder + if(iscarbon(user) && A.Adjacent(user) && A.shocked) + return A.shock(user, 100) if(A.panel_open) - return 1 - return 0 + return TRUE + return FALSE -/datum/wires/suitstorage/UpdateCut(index, mended) +/datum/wires/suitstorage/on_cut(wire, mend) var/obj/machinery/suit_storage_unit/A = holder - switch(index) - if(SSU_WIRE_ID) - A.secure = mended - if(SSU_WIRE_SAFETY) - A.safeties = mended - if(SSU_WIRE_SHOCK) - A.shocked = !mended + switch(wire) + if(WIRE_IDSCAN) + A.secure = mend + + if(WIRE_SAFETY) + A.safeties = mend + + if(WIRE_ELECTRIFY) + A.shocked = !mend A.shock(usr, 50) - if(SSU_WIRE_UV) - A.uv_super = !mended + + if(WIRE_SSU_UV) + A.uv_super = !mend ..() -datum/wires/suitstorage/UpdatePulsed(index) +datum/wires/suitstorage/on_pulse(wire) var/obj/machinery/suit_storage_unit/A = holder - if(IsIndexCut(index)) + if(is_cut(wire)) return - switch(index) - if(SSU_WIRE_ID) + switch(wire) + if(WIRE_IDSCAN) A.secure = !A.secure - if(SSU_WIRE_SAFETY) + + if(WIRE_SAFETY) A.safeties = !A.safeties - if(SSU_WIRE_SHOCK) + + if(WIRE_ELECTRIFY) A.shocked = !A.shocked if(A.shocked) A.shock(usr, 100) - spawn(50) - if(A && !IsIndexCut(index)) - A.shocked = FALSE - if(SSU_WIRE_UV) + addtimer(CALLBACK(A, /obj/machinery/suit_storage_unit/.proc/check_electrified_callback), 5 SECONDS) + + if(WIRE_SSU_UV) A.uv_super = !A.uv_super ..() diff --git a/code/datums/wires/syndicatebomb.dm b/code/datums/wires/syndicatebomb.dm index 430b5ce88aa..bd996f72fcc 100644 --- a/code/datums/wires/syndicatebomb.dm +++ b/code/datums/wires/syndicatebomb.dm @@ -1,47 +1,31 @@ /datum/wires/syndicatebomb - random = TRUE + randomize = TRUE holder_type = /obj/machinery/syndicatebomb wire_count = 5 + proper_name = "Syndicate bomb" + window_x = 320 + window_y = 22 -#define BOMB_WIRE_BOOM 1 // Explodes if pulsed or cut while active, defuses a bomb that isn't active on cut -#define BOMB_WIRE_UNBOLT 2 // Unbolts the bomb if cut, hint on pulsed -#define BOMB_WIRE_DELAY 4 // Raises the timer on pulse, does nothing on cut -#define BOMB_WIRE_PROCEED 8 // Lowers the timer, explodes if cut while the bomb is active -#define BOMB_WIRE_ACTIVATE 16 // Will start a bombs timer if pulsed, will hint if pulsed while already active, will stop a timer a bomb on cut +/datum/wires/syndicatebomb/New(atom/_holder) + wires = list(WIRE_BOMB_DELAY, WIRE_EXPLODE, WIRE_BOMB_UNBOLT,WIRE_BOMB_PROCEED, WIRE_BOMB_ACTIVATE) + return ..() -/datum/wires/syndicatebomb/GetWireName(index) - switch(index) - if(BOMB_WIRE_BOOM) - return "Explode" - - if(BOMB_WIRE_UNBOLT) - return "Unbolt" - - if(BOMB_WIRE_DELAY) - return "Delay" - - if(BOMB_WIRE_PROCEED) - return "Proceed" - - if(BOMB_WIRE_ACTIVATE) - return "Activate" - -/datum/wires/syndicatebomb/CanUse(mob/living/L) +/datum/wires/syndicatebomb/interactable(mob/user) var/obj/machinery/syndicatebomb/P = holder if(P.open_panel) return TRUE return FALSE -/datum/wires/syndicatebomb/UpdatePulsed(index) +/datum/wires/syndicatebomb/on_pulse(wire) var/obj/machinery/syndicatebomb/B = holder - switch(index) - if(BOMB_WIRE_BOOM) + switch(wire) + if(WIRE_EXPLODE) if(B.active) holder.visible_message("[bicon(B)] An alarm sounds! It's go-") B.explode_now = TRUE - if(BOMB_WIRE_UNBOLT) + if(WIRE_BOMB_UNBOLT) holder.visible_message("[bicon(holder)] The bolts spin in place for a moment.") - if(BOMB_WIRE_DELAY) + if(WIRE_BOMB_DELAY) if(B.delayedbig) holder.visible_message("[bicon(B)] The bomb has already been delayed.") else @@ -49,7 +33,7 @@ playsound(B, 'sound/machines/chime.ogg', 30, 1) B.detonation_timer += 300 B.delayedbig = TRUE - if(BOMB_WIRE_PROCEED) + if(WIRE_BOMB_PROCEED) holder.visible_message("[bicon(B)] The bomb buzzes ominously!") playsound(B, 'sound/machines/buzz-sigh.ogg', 30, 1) var/seconds = B.seconds_remaining() @@ -59,7 +43,7 @@ B.detonation_timer -= 100 else if(seconds >= 11) // Both to prevent negative timers and to have a little mercy. B.detonation_timer = world.time + 100 - if(BOMB_WIRE_ACTIVATE) + if(WIRE_BOMB_ACTIVATE) if(!B.active && !B.defused) holder.visible_message("[bicon(B)] You hear the bomb start ticking!") B.activate() @@ -72,11 +56,11 @@ B.delayedlittle = TRUE ..() -/datum/wires/syndicatebomb/UpdateCut(index, mended) +/datum/wires/syndicatebomb/on_cut(wire, mend) var/obj/machinery/syndicatebomb/B = holder - switch(index) - if(BOMB_WIRE_BOOM) - if(mended) + switch(wire) + if(WIRE_EXPLODE) + if(mend) B.defused = FALSE // Cutting and mending all the wires of an inactive bomb will thus cure any sabotage. else if(B.active) @@ -84,17 +68,17 @@ B.explode_now = TRUE else B.defused = TRUE - if(BOMB_WIRE_UNBOLT) - if(!mended && B.anchored) + if(WIRE_BOMB_UNBOLT) + if(!mend && B.anchored) holder.visible_message("[bicon(B)] The bolts lift out of the ground!") playsound(B, 'sound/effects/stealthoff.ogg', 30, 1) B.anchored = FALSE - if(BOMB_WIRE_PROCEED) - if(!mended && B.active) + if(WIRE_BOMB_PROCEED) + if(!mend && B.active) holder.visible_message("[bicon(B)] An alarm sounds! It's go-") B.explode_now = TRUE - if(BOMB_WIRE_ACTIVATE) - if(!mended && B.active) + if(WIRE_BOMB_ACTIVATE) + if(!mend && B.active) holder.visible_message("[bicon(B)] The timer stops! The bomb has been defused!") B.defused = TRUE B.update_icon() diff --git a/code/datums/wires/tesla_coil.dm b/code/datums/wires/tesla_coil.dm index bc513c6c6c0..f4dbf39017a 100644 --- a/code/datums/wires/tesla_coil.dm +++ b/code/datums/wires/tesla_coil.dm @@ -1,23 +1,23 @@ /datum/wires/tesla_coil wire_count = 1 holder_type = /obj/machinery/power/tesla_coil + proper_name = "Tesla coil" + window_x = 320 + window_y = 50 -#define TESLACOIL_WIRE_ZAP 1 +/datum/wires/tesla_coil/New(atom/_holder) + wires = list(WIRE_TESLACOIL_ZAP) + return ..() -/datum/wires/tesla_coil/GetWireName(index) - switch(index) - if(TESLACOIL_WIRE_ZAP) - return "Zap" - -/datum/wires/tesla_coil/CanUse(mob/living/L) +/datum/wires/tesla_coil/interactable(mob/user) var/obj/machinery/power/tesla_coil/T = holder if(T && T.panel_open) - return 1 - return 0 + return TRUE + return FALSE -/datum/wires/tesla_coil/UpdatePulsed(index) +/datum/wires/tesla_coil/on_pulse(wire) var/obj/machinery/power/tesla_coil/T = holder - switch(index) - if(TESLACOIL_WIRE_ZAP) + switch(wire) + if(WIRE_TESLACOIL_ZAP) T.zap() ..() diff --git a/code/datums/wires/vending.dm b/code/datums/wires/vending.dm index c9e6032afee..299e18d815a 100644 --- a/code/datums/wires/vending.dm +++ b/code/datums/wires/vending.dm @@ -1,35 +1,21 @@ /datum/wires/vending holder_type = /obj/machinery/vending wire_count = 4 + window_y = 112 + window_x = 350 + proper_name = "Vending machine" -#define VENDING_WIRE_THROW 1 -#define VENDING_WIRE_CONTRABAND 2 -#define VENDING_WIRE_ELECTRIFY 4 -#define VENDING_WIRE_IDSCAN 8 +/datum/wires/vending/New(atom/_holder) + wires = list(WIRE_THROW_ITEM, WIRE_IDSCAN, WIRE_ELECTRIFY, WIRE_CONTRABAND) + return ..() -/datum/wires/vending/GetWireName(index) - switch(index) - if(VENDING_WIRE_THROW) - return "Item Throw" - - if(VENDING_WIRE_CONTRABAND) - return "Contraband" - - if(VENDING_WIRE_ELECTRIFY) - return "Electrification" - - if(VENDING_WIRE_IDSCAN) - return "ID Scan" - -/datum/wires/vending/CanUse(mob/living/L) +/datum/wires/vending/interactable(mob/user) var/obj/machinery/vending/V = holder - if(!istype(L, /mob/living/silicon)) - if(V.seconds_electrified) - if(V.shock(L, 100)) - return 0 + if(!istype(user, /mob/living/silicon) && V.seconds_electrified && V.shock(user, 100)) + return FALSE if(V.panel_open) - return 1 - return 0 + return TRUE + return FALSE /datum/wires/vending/get_status() . = ..() @@ -39,31 +25,31 @@ . += "The green light is [V.extended_inventory ? "on" : "off"]." . += "A [V.scan_id ? "purple" : "yellow"] light is on." -/datum/wires/vending/UpdatePulsed(index) +/datum/wires/vending/on_pulse(wire) var/obj/machinery/vending/V = holder - switch(index) - if(VENDING_WIRE_THROW) + switch(wire) + if(WIRE_THROW_ITEM) V.shoot_inventory = !V.shoot_inventory - if(VENDING_WIRE_CONTRABAND) + if(WIRE_CONTRABAND) V.extended_inventory = !V.extended_inventory - if(VENDING_WIRE_ELECTRIFY) + if(WIRE_ELECTRIFY) V.seconds_electrified = 30 - if(VENDING_WIRE_IDSCAN) + if(WIRE_IDSCAN) V.scan_id = !V.scan_id ..() -/datum/wires/vending/UpdateCut(index, mended) +/datum/wires/vending/on_cut(wire, mend) var/obj/machinery/vending/V = holder - switch(index) - if(VENDING_WIRE_THROW) - V.shoot_inventory = !mended - if(VENDING_WIRE_CONTRABAND) + switch(wire) + if(WIRE_THROW_ITEM) + V.shoot_inventory = !mend + if(WIRE_CONTRABAND) V.extended_inventory = FALSE - if(VENDING_WIRE_ELECTRIFY) - if(mended) + if(WIRE_ELECTRIFY) + if(mend) V.seconds_electrified = 0 else V.seconds_electrified = -1 - if(VENDING_WIRE_IDSCAN) - V.scan_id = 1 + if(WIRE_IDSCAN) + V.scan_id = TRUE ..() diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm index 09c874ce8a8..27d1448ac77 100644 --- a/code/datums/wires/wires.dm +++ b/code/datums/wires/wires.dm @@ -1,331 +1,456 @@ -// Wire datums. Created by Giacomand. -// Was created to replace a horrible case of copy and pasted code with no care for maintability. -// Goodbye Door wires, Cyborg wires, Vending Machine wires, Autolathe wires -// Protolathe wires, APC wires and Camera wires! - -#define MAX_FLAG 65535 - -GLOBAL_LIST_EMPTY(same_wires) -// 12 colours, if you're adding more than 12 wires then add more colours here -GLOBAL_LIST_INIT(wireColours, list("red", "blue", "green", "black", "orange", "brown", "gold", "gray", "cyan", "navy", "purple", "pink")) /datum/wires + /// TRUE if the wires will be different every time a new wire datum is created. + var/randomize = FALSE + /// The atom the wires belong too. For example: an airlock. + var/atom/holder + /// The holder type; used to make sure that the holder is the correct type. + var/holder_type + /// The display name for the TGUI window. For example, given the var is "APC"... + /// When the TGUI window is opened, "wires" will be appended to it's title, and it would become "APC wires". + var/proper_name = "Unknown" + /// The total number of wires that our holder atom has. + var/wire_count = NONE + /// A list of all wires. For a list of valid wires defines that can go here, see `code/__DEFINES/wires.dm` + var/list/wires + /// A list of all cut wires. The same values that can go into `wires` will get added and removed from this list. + var/list/cut_wires + /// An associative list with the wire color as the key, and the wire define as the value. + var/list/colors + /// An associative list of signalers attached to the wires. The wire color is the key, and the signaler object reference is the value. + var/list/assemblies + /// The width of the wire TGUI window. + var/window_x = 300 + /// The height of the wire TGUI window. Will get longer as needed, based on the `wire_count`. + var/window_y = 100 - var/random = 0 // Will the wires be different for every single instance. - var/atom/holder = null // The holder - var/holder_type = null // The holder type; used to make sure that the holder is the correct type. - var/wire_count = 0 // Max is 16 - var/wires_status = 0 // BITFLAG OF WIRES - - var/list/wires = list() - var/list/signallers = list() - - var/table_options = " align='center'" - var/row_options1 = " width='80px'" - var/row_options2 = " width='260px'" - var/window_x = 370 - var/window_y = 470 - -/datum/wires/New(atom/holder) +/datum/wires/New(atom/_holder) ..() - src.holder = holder - if(!istype(holder, holder_type)) + if(!istype(_holder, holder_type)) CRASH("Our holder is null/the wrong type!") - // Generate new wires - if(random) - GenerateWires() - // Get the same wires + holder = _holder + cut_wires = list() + colors = list() + assemblies = list() + + // Add in the appropriate amount of dud wires. + var/wire_len = length(wires) + if(wire_len < wire_count) // If the amount of "real" wires is less than the total we're suppose to have... + add_duds(wire_count - wire_len) // Add in the appropriate amount of duds to reach `wire_count`. + + // If the randomize is true, we need to generate a new set of wires and ignore any wire color directories. + if(randomize) + randomize() + return + + if(!GLOB.wire_color_directory[holder_type]) + randomize() + GLOB.wire_color_directory[holder_type] = colors else - // We don't have any wires to copy yet, generate some and then copy it. - if(!GLOB.same_wires[holder_type]) - GenerateWires() - GLOB.same_wires[holder_type] = src.wires.Copy() - else - var/list/wires = GLOB.same_wires[holder_type] - src.wires = wires // Reference the wires list. + colors = GLOB.wire_color_directory[holder_type] /datum/wires/Destroy() holder = null + for(var/color in colors) + detach_assembly(color) return ..() -/datum/wires/proc/GenerateWires() - var/list/colours_to_pick = GLOB.wireColours.Copy() // Get a copy, not a reference. - var/list/indexes_to_pick = list() - //Generate our indexes - for(var/i = 1; i < MAX_FLAG && i < (1 << wire_count); i += i) - indexes_to_pick += i - colours_to_pick.len = wire_count // Downsize it to our specifications. +/** + * Randomly generates a new set of wires. and corresponding colors from the given pool. Assigns the information as an associative list, to `colors`. + * + * In the `colors` list, the name of the color is the key, and the wire is the value. + * For example: `colors["red"] = WIRE_ELECTRIFY`. This will look like `list("red" = WIRE_ELECTRIFY)` internally. + */ +datum/wires/proc/randomize() + var/static/list/possible_colors = list("red", "blue", "green", "silver", "orange", "brown", "gold", "white", "cyan", "magenta", "purple", "pink") + var/list/my_possible_colors = possible_colors.Copy() - while(colours_to_pick.len && indexes_to_pick.len) - // Pick and remove a colour - var/colour = pick_n_take(colours_to_pick) - - // Pick and remove an index - var/index = pick_n_take(indexes_to_pick) - - src.wires[colour] = index - //wires = shuffle(wires) - -/datum/wires/proc/get_status() - return list() + for(var/wire in shuffle(wires)) + colors[pick_n_take(my_possible_colors)] = wire +/** + * Proc called when the user attempts to interact with wires UI. + * + * Checks if the user exists, is a mob, the wires are attached to something (`holder`) and makes sure `interactable(user)` returns TRUE. + * If all the checks succeed, open the TGUI interface for the user. + * + * Arugments: + * * user - the mob trying to interact with the wires. + */ /datum/wires/proc/Interact(mob/user) - if(user && istype(user) && holder && CanUse(user)) - ui_interact(user) + if(user && istype(user) && holder && interactable(user)) + tgui_interact(user) -/datum/wires/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) +/** + * Base proc, intended to be overriden. Wire datum specific checks you want to run before the TGUI is shown to the user should go here. + */ +/datum/wires/proc/interactable(mob/user) + return TRUE + +/// Users will be interacting with our holder object and not the wire datum directly, therefore we need to return the holder. +/datum/wires/tgui_host() + return holder + +/datum/wires/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/tgui_state/state = GLOB.tgui_physical_state) + ui = SStgui.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 = new(user, src, ui_key, "Wires", "[proper_name] wires", window_x, window_y + wire_count * 30, master_ui, state) ui.open() -/datum/wires/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.physical_state) - var/data[0] - var/list/replace_colours = null +/datum/wires/tgui_data(mob/user) + var/list/data = list() + var/list/replace_colors + if(ishuman(user)) var/mob/living/carbon/human/H = user var/obj/item/organ/internal/eyes/eyes = H.get_int_organ(/obj/item/organ/internal/eyes) - if(eyes && (COLOURBLIND in H.mutations)) - replace_colours = eyes.replace_colours + if(eyes && (COLOURBLIND in H.mutations)) // Check if the human has colorblindness. + replace_colors = eyes.replace_colours // Get the colorblind replacement colors list. + var/list/wires_list = list() - var/list/W[0] - for(var/colour in wires) - var/new_colour = colour - var/colour_name = colour - if(colour in replace_colours) - new_colour = replace_colours[colour] - if(new_colour in LIST_REPLACE_RENAME) - colour_name = LIST_REPLACE_RENAME[new_colour] + for(var/color in colors) + var/replaced_color = color + var/color_name = color + + if(color in replace_colors) // If this color is one that needs to be replaced using the colorblindness list. + replaced_color = replace_colors[color] + if(replaced_color in LIST_COLOR_RENAME) // If its an ugly written color name like "darkolivegreen", rename it to something like "dark green". + color_name = LIST_COLOR_RENAME[replaced_color] else - colour_name = new_colour - else - new_colour = colour - colour_name = new_colour - W[++W.len] = list("colour_name" = capitalize(colour_name), "seen_colour" = capitalize(new_colour),"colour" = capitalize(colour), "cut" = IsColourCut(colour), "index" = can_see_wire_index(user) ? GetWireName(GetIndex(colour)) : null, "attached" = IsAttached(colour)) + color_name = replaced_color // Else just keep the normal color name - if(W.len > 0) - data["wires"] = W + wires_list += list(list( + "seen_color" = replaced_color, // The color of the wire that the mob will see. This will be the same as `color` if the user is NOT colorblind. + "color_name" = color_name, // The wire's name. This will be the same as `color` if the user is NOT colorblind. + "color" = color, // The "real" color of the wire. No replacements. + "wire" = can_see_wire_info(user) && !is_dud_color(color) ? get_wire(color) : null, // Wire define information like "Contraband" or "Door Bolts". + "cut" = is_color_cut(color), // Whether the wire is cut or not. Used to display "cut" or "mend". + "attached" = is_attached(color) // Whether or not a signaler is attached to this wire. + )) + data["wires"] = wires_list + // Get the information shown at the bottom of wire TGUI window, such as "The red light is blinking", etc. + // If the user is colorblind, we need to replace these colors as well. var/list/status = get_status() - if(replace_colours) - var/i - for(i=1, i<=status.len, i++) - for(var/colour in replace_colours) - var/new_colour = replace_colours[colour] - if(new_colour in LIST_REPLACE_RENAME) - new_colour = LIST_REPLACE_RENAME[new_colour] - if(findtext(status[i],colour)) - status[i] = replacetext(status[i],colour,new_colour) - break - data["status_len"] = status.len - data["status"] = status + if(replace_colors) + var/i + for(i in 1 to length(status)) + for(var/color in replace_colors) + var/new_color = replace_colors[color] + if(new_color in LIST_COLOR_RENAME) + new_color = LIST_COLOR_RENAME[new_color] + if(findtext(status[i], color)) + status[i] = replacetext(status[i], color, new_color) + break + + data["status"] = status return data -/datum/wires/nano_host() - return holder +/datum/wires/tgui_act(action, list/params) + if(..()) + return -/datum/wires/proc/can_see_wire_index(mob/user) + var/mob/user = usr + if(!interactable(user)) + return + + var/obj/item/I = user.get_active_hand() + var/color = lowertext(params["wire"]) + holder.add_hiddenprint(user) + + switch(action) + // Toggles the cut/mend status. + if("cut") + if(!istype(I, /obj/item/wirecutters) && !user.can_admin_interact()) + to_chat(user, "You need wirecutters!") + return + + if(istype(I)) + playsound(holder, I.usesound, 20, 1) + cut_color(color) + return TRUE + + // Pulse a wire. + if("pulse") + if(!istype(I, /obj/item/multitool) && !user.can_admin_interact()) + to_chat(user, "You need a multitool!") + return + + playsound(holder, 'sound/weapons/empty.ogg', 20, 1) + pulse_color(color) + + // If they pulse the electrify wire, call interactable() and try to shock them. + if(get_wire(color) == WIRE_ELECTRIFY) + interactable(user) + + return TRUE + + // Attach a signaler to a wire. + if("attach") + if(is_attached(color)) + var/obj/item/O = detach_assembly(color) + if(O) + user.put_in_hands(O) + return TRUE + + if(!istype(I, /obj/item/assembly/signaler)) + to_chat(user, "You need a remote signaller!") + return + + if(user.drop_item()) + attach_assembly(color, I) + return TRUE + else + to_chat(user, "[user.get_active_hand()] is stuck to your hand!") + +/** + * Proc called to determine if the user can see wire define information, such as "Contraband", "Door Bolts", etc. + * + * If the user is an admin, or has a multitool which reveals wire information in their active hand, the proc returns TRUE. + * + * Arguments: + * * user - the mob who is interacting with the wires. + */ +/datum/wires/proc/can_see_wire_info(mob/user) if(user.can_admin_interact()) return TRUE else if(istype(user.get_active_hand(), /obj/item/multitool)) var/obj/item/multitool/M = user.get_active_hand() if(M.shows_wire_information) return TRUE - return FALSE -/datum/wires/Topic(href, href_list) - if(..()) - return 1 - var/mob/L = usr - if(CanUse(L) && href_list["action"]) - var/obj/item/I = L.get_active_hand() - var/colour = lowertext(href_list["wire"]) - holder.add_hiddenprint(L) - switch(href_list["action"]) - if("cut") // Toggles the cut/mend status - if(istype(I, /obj/item/wirecutters) || L.can_admin_interact()) - if(istype(I)) - playsound(holder, I.usesound, 20, 1) - CutWireColour(colour) - else - to_chat(L, "You need wirecutters!") - if("pulse") - if(istype(I, /obj/item/multitool) || L.can_admin_interact()) - playsound(holder, 'sound/weapons/empty.ogg', 20, 1) - PulseColour(colour) - else - to_chat(L, "You need a multitool!") - if("attach") - if(IsAttached(colour)) - var/obj/item/O = Detach(colour) - if(O) - L.put_in_hands(O) - else - if(istype(I, /obj/item/assembly/signaler)) - if(L.drop_item()) - Attach(colour, I) - else - to_chat(L, "[L.get_active_hand()] is stuck to your hand!") - else - to_chat(L, "You need a remote signaller!") +/** + * Base proc, intended to be overwritten. Put wire information you'll see at the botton of the TGUI window here, such as "The red light is blinking". + */ +/datum/wires/proc/get_status() + return list() - SSnanoui.update_uis(src) - return 1 +/** + * Clears the `colors` list, and randomizes it to a new set of color-to-wire relations. + */ +/datum/wires/proc/shuffle_wires() + colors.Cut() + randomize() -// -// Overridable Procs -// +/** + * Repairs all cut wires. + */ +/datum/wires/proc/repair() + cut_wires.Cut() -// Called when wires cut/mended. -/datum/wires/proc/UpdateCut(index, mended) - if(holder) - SSnanoui.update_uis(holder) +/** + * Adds in dud wires, which do nothing when cut/pulsed. + * + * Arguments: + * * duds - the amount of dud wires to generate. + */ +/datum/wires/proc/add_duds(duds) + while(duds) + var/dud = WIRE_DUD_PREFIX + "[--duds]" + if(dud in wires) + continue + wires += dud -// Called when wire pulsed. Add code here. -/datum/wires/proc/UpdatePulsed(index) - if(holder) - SSnanoui.update_uis(holder) +/** + * Determines if the passed in wire is a dud or not. Returns TRUE if the wire is a dud, FALSE otherwise. + * + * Arugments: + * * wire - a wire define, NOT a color. For example `WIRE_ELECTRIFY`. + */ +/datum/wires/proc/is_dud(wire) + return findtext(wire, WIRE_DUD_PREFIX, 1, length(WIRE_DUD_PREFIX) + 1) -/datum/wires/proc/CanUse(mob/L) - return 1 +/** + * Returns TRUE if the wire that corresponds to the passed in color is a dud. FALSE otherwise. + * + * Arugments: + * * color - a wire color. + */ +/datum/wires/proc/is_dud_color(color) + return is_dud(get_wire(color)) -/datum/wires/CanUseTopic(mob/user, datum/topic_state/state) - if(!CanUse(user)) - return STATUS_CLOSE - return ..() +/** + * Gets the wire associated with the color passed in. + * + * Arugments: + * * color - a wire color. + */ +/datum/wires/proc/get_wire(color) + return colors[color] -// Example of use: -/* +/** + * Determines if the passed in wire is cut or not. Returns TRUE if it's cut, FALSE otherwise. + * + * Arugments: + * * wire - a wire define, NOT a color. For example `WIRE_ELECTRIFY`. + */ +/datum/wires/proc/is_cut(wire) + return (wire in cut_wires) -#define NAME_WIRE_BOLTED 1 -#define NAME_WIRE_SHOCKED 2 -#define NAME_WIRE_SAFETY 4 -#define NAME_WIRE_POWER 8 +/** + * Determines if the wire associated with the passed in color, is cut or not. Returns TRUE if it's cut, FALSE otherwise. + * + * Arugments: + * * wire - a wire color. + */ +/datum/wires/proc/is_color_cut(color) + return is_cut(get_wire(color)) -/datum/wires/door/UpdateCut(var/index, var/mended) - var/obj/machinery/door/airlock/A = holder - switch(index) - if(NAME_WIRE_BOLTED) - if(!mended) - A.bolt() - if(NAME_WIRE_SHOCKED) - A.shock() - if(NAME_WIRE_SAFETY) - A.safety() +/** + * Determines if all of the wires are cut. Returns TRUE they're all cut, FALSE otherwise. + */ +/datum/wires/proc/is_all_cut() + return (length(cut_wires) == length(wires)) -*/ - - -// -// Helper Procs -// - -/datum/wires/proc/PulseColour(colour) - PulseIndex(GetIndex(colour)) - -/datum/wires/proc/PulseIndex(index) - if(IsIndexCut(index)) - return - UpdatePulsed(index) - -/datum/wires/proc/GetIndex(colour) - if(wires[colour]) - var/index = wires[colour] - return index +/** + * Cut or mend a wire. Calls `on_cut()`. + * + * Arugments: + * * wire - a wire define, NOT a color. For example `WIRE_ELECTRIFY`. + */ +/datum/wires/proc/cut(wire) + if(is_cut(wire)) + cut_wires -= wire + on_cut(wire, mend = TRUE) else - CRASH("[colour] is not a key in wires.") + cut_wires += wire + on_cut(wire, mend = FALSE) -/datum/wires/proc/GetWireName(index) +/** + * Cut the wire which corresponds with the passed in color. + * + * Arugments: + * * color - a wire color. + */ +/datum/wires/proc/cut_color(color) + cut(get_wire(color)) + +/** + * Cuts a random wire. + */ +/datum/wires/proc/cut_random() + cut(wires[rand(1, length(wires))]) + +/** + * Cuts all wires. + */ +/datum/wires/proc/cut_all() + for(var/wire in wires) + cut(wire) + +/** + * Proc called when any wire is cut. + * + * Base proc, intended to be overriden. + * Place an behavior you want to happen when certain wires are cut, into this proc. + * + * Arugments: + * * wire - a wire define, NOT color. For example 'WIRE_ELECTRIFY'. + * * mend - TRUE if we're mending the wire. FALSE if we're cutting. + */ +/datum/wires/proc/on_cut(wire, mend = FALSE) return -// -// Is Index/Colour Cut procs -// +/** + * Pulses the given wire. Calls `on_pulse()`. + * + * Arugments: + * * wire - a wire define, NOT a color. For example `WIRE_ELECTRIFY`. + */ +/datum/wires/proc/pulse(wire) + if(is_cut(wire)) + return + on_pulse(wire) -/datum/wires/proc/IsColourCut(colour) - var/index = GetIndex(colour) - return IsIndexCut(index) +/** + * Pulses the wire associated with the given color. + * + * Arugments: + * * wire - a wire color. + */ +/datum/wires/proc/pulse_color(color) + pulse(get_wire(color)) -/datum/wires/proc/IsIndexCut(index) - return (index & wires_status) +/** + * Proc called when any wire is pulsed. + * + * Base proc, intended to be overriden. + * Place behavior you want to happen when certain wires are pulsed, into this proc. + * + * Arugments: + * * wire - a wire define, NOT color. For example 'WIRE_ELECTRIFY'. + */ +/datum/wires/proc/on_pulse(wire) + return -// -// Signaller Procs -// +/** + * Proc called when an attached signaler receives a signal. + * + * Searches through the `assemblies` list for the wire that the signaler is attached to. Pulses the wire when it's found. + * + * Arugments: + * * S - the attached signaler receiving the signal. + */ +/datum/wires/proc/pulse_assembly(obj/item/assembly/signaler/S) + for(var/color in assemblies) + if(S == assemblies[color]) + pulse_color(color) + return TRUE -/datum/wires/proc/IsAttached(colour) - if(signallers[colour]) - return 1 - return 0 +/** + * Proc called when a mob tries to attach a signaler to a wire. + * + * Makes sure that `S` is actually a signaler and that something is not already attached to the wire. + * Adds the signaler to the `assemblies` list as a value, with the `color` as a the key. + * + * Arguments: + * * color - the wire color. + * * S - the signaler that a mob is trying to attach. + */ +/datum/wires/proc/attach_assembly(color, obj/item/assembly/signaler/S) + if(S && istype(S) && !is_attached(color)) + assemblies[color] = S + S.forceMove(holder) + S.connected = src + return S -/datum/wires/proc/GetAttached(colour) - if(signallers[colour]) - return signallers[colour] +/** + * Proc called when a mob tries to detach a signaler from a wire. + * + * First checks if there is a signaler on the wire. If so, removes the signaler, and clears it from `assemblies` list. + * + * Arguments: + * * color - the wire color. + */ +/datum/wires/proc/detach_assembly(color) + var/obj/item/assembly/signaler/S = get_attached(color) + if(S && istype(S)) + assemblies -= color + S.connected = null + S.forceMove(holder.drop_location()) + return S + +/** + * Gets the signaler attached to the given wire color, if there is one. + * + * Arguments: + * * color - the wire color. + */ +/datum/wires/proc/get_attached(color) + if(assemblies[color]) + return assemblies[color] return null -/datum/wires/proc/Attach(colour, obj/item/assembly/signaler/S) - if(colour && S) - if(!IsAttached(colour)) - signallers[colour] = S - S.loc = holder - S.connected = src - return S - -/datum/wires/proc/Detach(colour) - if(colour) - var/obj/item/assembly/signaler/S = GetAttached(colour) - if(S) - signallers -= colour - S.connected = null - S.loc = holder.loc - return S - - -/datum/wires/proc/Pulse(obj/item/assembly/signaler/S) - - for(var/colour in signallers) - if(S == signallers[colour]) - PulseColour(colour) - break - - -// -// Cut Wire Colour/Index procs -// - -/datum/wires/proc/CutWireColour(colour) - var/index = GetIndex(colour) - CutWireIndex(index) - -/datum/wires/proc/CutWireIndex(index) - if(IsIndexCut(index)) - wires_status &= ~index - UpdateCut(index, 1) - else - wires_status |= index - UpdateCut(index, 0) - -/datum/wires/proc/RandomCut() - var/r = rand(1, wires.len) - CutWireIndex(r) - -/datum/wires/proc/CutAll() - for(var/i = 1; i < MAX_FLAG && i < (1 << wire_count); i += i) - CutWireIndex(i) - -/datum/wires/proc/IsAllCut() - if(wires_status == (1 << wire_count) - 1) - return 1 - return 0 - -// -//Shuffle and Mend -// - -/datum/wires/proc/Shuffle() - wires_status = 0 - GenerateWires() +/** + * Checks if the given wire has a signaler on it. + * + * Arguments: + * * color - the wire color. + */ +/datum/wires/proc/is_attached(color) + if(assemblies[color]) + return TRUE diff --git a/code/defines/procs/AStar.dm b/code/defines/procs/AStar.dm index 1f8c83f5f04..1d6fa5619e2 100644 --- a/code/defines/procs/AStar.dm +++ b/code/defines/procs/AStar.dm @@ -29,15 +29,15 @@ Actual Adjacent procs : ////////////////////// //A* nodes variables -/PathNode +/datum/pathnode var/turf/source //turf associated with the PathNode - var/PathNode/prevNode //link to the parent PathNode + var/datum/pathnode/prevNode //link to the parent PathNode var/f //A* Node weight (f = g + h) var/g //A* movement cost variable var/h //A* heuristic variable var/nt //count the number of Nodes traversed -/PathNode/New(s,p,pg,ph,pnt) +/datum/pathnode/New(s,p,pg,ph,pnt) source = s prevNode = p g = pg @@ -46,7 +46,7 @@ Actual Adjacent procs : source.PNode = src nt = pnt -/PathNode/proc/calc_f() +/datum/pathnode/proc/calc_f() f = g + h ////////////////////// @@ -54,11 +54,11 @@ Actual Adjacent procs : ////////////////////// //the weighting function, used in the A* algorithm -/proc/PathWeightCompare(PathNode/a, PathNode/b) +/proc/PathWeightCompare(datum/pathnode/a, datum/pathnode/b) return a.f - b.f //reversed so that the Heap is a MinHeap rather than a MaxHeap -/proc/HeapPathWeightCompare(PathNode/a, PathNode/b) +/proc/HeapPathWeightCompare(datum/pathnode/a, datum/pathnode/b) return b.f - a.f //wrapper that returns an empty list if A* failed to find a path @@ -82,13 +82,13 @@ Actual Adjacent procs : return 0 maxnodedepth = maxnodes //no need to consider path longer than maxnodes - var/Heap/open = new /Heap(/proc/HeapPathWeightCompare) //the open list + var/datum/heap/open = new /datum/heap(/proc/HeapPathWeightCompare) //the open list var/list/closed = new() //the closed list var/list/path = null //the returned path, if any - var/PathNode/cur //current processed turf + var/datum/pathnode/cur //current processed turf //initialization - open.Insert(new /PathNode(start,null,0,call(start,dist)(end),0)) + open.Insert(new /datum/pathnode(start,null,0,call(start,dist)(end),0)) //then run the main loop while(!open.IsEmpty() && !path) @@ -125,7 +125,7 @@ Actual Adjacent procs : var/newg = cur.g + call(cur.source,dist)(T) if(!T.PNode) //is not already in open list, so add it - open.Insert(new /PathNode(T,cur,newg,call(T,dist)(end),cur.nt+1)) + open.Insert(new /datum/pathnode(T,cur,newg,call(T,dist)(end),cur.nt+1)) else //is already in open list, check if it's a better way from the current turf if(newg < T.PNode.g) T.PNode.prevNode = cur @@ -137,7 +137,7 @@ Actual Adjacent procs : } //cleaning after us - for(var/PathNode/PN in open.L) + for(var/datum/pathnode/PN in open.L) PN.source.PNode = null for(var/turf/T in closed) T.PNode = null diff --git a/code/defines/vox_sounds.dm b/code/defines/vox_sounds.dm index 1d7bb9753a0..5b44f80895b 100644 --- a/code/defines/vox_sounds.dm +++ b/code/defines/vox_sounds.dm @@ -1,7 +1,16 @@ // List is required to compile the resources into the game when it loads. // Dynamically loading it has bad results with sounds overtaking each other, even with the wait variable. -GLOBAL_LIST_INIT(vox_sounds, list("," = 'sound/vox_fem/,.ogg', +GLOBAL_LIST_INIT(vox_alerts, list( +"bizwarn" = 'sound/vox_fem/bizwarn.ogg', +"bloop" = 'sound/vox_fem/bloop.ogg', +"buzwarn" = 'sound/vox_fem/buzwarn.ogg', +"dadeda" = 'sound/vox_fem/dadeda.ogg', +"deeoo" = 'sound/vox_fem/deeoo.ogg' +)) + +GLOBAL_LIST_INIT(vox_sounds, list( +"," = 'sound/vox_fem/,.ogg', "." = 'sound/vox_fem/..ogg', "a" = 'sound/vox_fem/a.ogg', "abortions" = 'sound/vox_fem/abortions.ogg', diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index c33e7609685..9a333d268f3 100644 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -50,10 +50,10 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/space/atmosalert() return -/area/space/fire_alert() +/area/space/firealert(obj/source) return -/area/space/fire_reset() +/area/space/firereset(obj/source) return /area/space/readyalert() diff --git a/code/game/area/ai_monitored.dm b/code/game/area/ai_monitored.dm index 8f65ac634f4..723574ee949 100644 --- a/code/game/area/ai_monitored.dm +++ b/code/game/area/ai_monitored.dm @@ -1,24 +1,30 @@ /area/ai_monitored name = "AI Monitored Area" - var/obj/machinery/camera/motioncamera = null + var/list/motioncameras = list() + var/list/motionTargets = list() - -/area/ai_monitored/LateInitialize() +/area/ai_monitored/Initialize(mapload) . = ..() - // locate and store the motioncamera - for(var/obj/machinery/camera/M in src) - if(M.isMotion()) - motioncamera = M - M.area_motion = src - break + if(mapload) + for(var/obj/machinery/camera/M in src) + if(M.isMotion()) + motioncameras.Add(M) + M.set_area_motion(src) /area/ai_monitored/Entered(atom/movable/O) ..() - if(ismob(O) && motioncamera) - motioncamera.newTarget(O) + if(ismob(O) && length(motioncameras)) + for(var/X in motioncameras) + var/obj/machinery/camera/cam = X + cam.newTarget(O) + return /area/ai_monitored/Exited(atom/movable/O) - if(ismob(O) && motioncamera) - motioncamera.lostTarget(O) + ..() + if(ismob(O) && length(motioncameras)) + for(var/X in motioncameras) + var/obj/machinery/camera/cam = X + cam.lostTargetRef(O.UID()) + return diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index da80a6e775c..de913ac9f91 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -57,6 +57,11 @@ var/list/ambientsounds = GENERIC_SOUNDS + var/list/firedoors + var/list/cameras + var/list/firealarms + var/firedoors_last_closed_on = 0 + var/fast_despawn = FALSE var/can_get_auto_cryod = TRUE var/hide_attacklogs = FALSE // For areas such as thunderdome, lavaland syndiebase, etc which generate a lot of spammy attacklogs. Reduces log priority. @@ -125,35 +130,6 @@ cameras += C return cameras - -/area/proc/atmosalert(danger_level, var/alarm_source, var/force = FALSE) - if(report_alerts) - if(danger_level == ATMOS_ALARM_NONE) - SSalarms.atmosphere_alarm.clearAlarm(src, alarm_source) - else - SSalarms.atmosphere_alarm.triggerAlarm(src, alarm_source, severity = danger_level) - - //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 && !force) - danger_level = max(danger_level, AA.danger_level) - - if(danger_level != atmosalm) - if(danger_level < ATMOS_ALARM_WARNING && atmosalm >= ATMOS_ALARM_WARNING) - //closing the doors on red and opening on green provides a bit of hysteresis that will hopefully prevent fire doors from opening and closing repeatedly due to noise - air_doors_open() - else if(danger_level >= ATMOS_ALARM_DANGER && atmosalm < ATMOS_ALARM_DANGER) - air_doors_close() - - atmosalm = danger_level - for(var/obj/machinery/alarm/AA in src) - AA.update_icon() - - GLOB.air_alarm_repository.update_cache(src) - return 1 - GLOB.air_alarm_repository.update_cache(src) - return 0 - /area/proc/air_doors_close() if(!air_doors_activated) air_doors_activated = TRUE @@ -179,44 +155,151 @@ D.open() -/area/proc/fire_alert() - if(!fire) - fire = 1 //used for firedoor checks - updateicon() - mouse_opacity = MOUSE_OPACITY_TRANSPARENT - air_doors_close() +/area/Destroy() + STOP_PROCESSING(SSobj, src) + return ..() -/area/proc/fire_reset() - if(fire) - fire = 0 //used for firedoor checks - updateicon() - mouse_opacity = MOUSE_OPACITY_TRANSPARENT - air_doors_open() +/** + * Generate a power alert for this area + * + * Sends to all ai players, alert consoles, drones and alarm monitor programs in the world + */ +/area/proc/poweralert(state, obj/source) + if(state != poweralm) + poweralm = state + if(istype(source)) //Only report power alarms on the z-level where the source is located. + for(var/thing in cameras) + var/obj/machinery/camera/C = locateUID(thing) + if(!QDELETED(C) && is_station_level(C.z)) + if(state) + C.network -= "Power Alarms" + else + C.network |= "Power Alarms" - return + if(state) + SSalarm.cancelAlarm("Power", src, source) + else + SSalarm.triggerAlarm("Power", src, cameras, source) -/area/proc/burglaralert(var/obj/trigger) - if(always_unpowered == 1) //no burglar alarms in space/asteroid +/** + * Generate an atmospheric alert for this area + * + * Sends to all ai players, alert consoles, drones and alarm monitor programs in the world + */ +/area/proc/atmosalert(danger_level, obj/source) + if(danger_level != atmosalm) + if(danger_level == ATMOS_ALARM_DANGER) + + for(var/thing in cameras) + var/obj/machinery/camera/C = locateUID(thing) + if(!QDELETED(C) && is_station_level(C.z)) + C.network |= "Atmosphere Alarms" + + + SSalarm.triggerAlarm("Atmosphere", src, cameras, source) + + else if(atmosalm == ATMOS_ALARM_DANGER) + for(var/thing in cameras) + var/obj/machinery/camera/C = locateUID(thing) + if(!QDELETED(C) && is_station_level(C.z)) + C.network -= "Atmosphere Alarms" + + SSalarm.cancelAlarm("Atmosphere", src, source) + + atmosalm = danger_level + return TRUE + return FALSE + +/** + * Try to close all the firedoors in the area + */ +/area/proc/ModifyFiredoors(opening) + if(firedoors) + firedoors_last_closed_on = world.time + for(var/FD in firedoors) + var/obj/machinery/door/firedoor/D = FD + var/cont = !D.welded + if(cont && opening) //don't open if adjacent area is on fire + for(var/I in D.affecting_areas) + var/area/A = I + if(A.fire) + cont = FALSE + break + if(cont && D.is_operational()) + if(D.operating) + D.nextstate = opening ? FD_OPEN : FD_CLOSED + else if(!(D.density ^ opening)) + INVOKE_ASYNC(D, (opening ? /obj/machinery/door/firedoor.proc/open : /obj/machinery/door/firedoor.proc/close)) + +/** + * Generate a firealarm alert for this area + * + * Sends to all ai players, alert consoles, drones and alarm monitor programs in the world + * + * Also starts the area processing on SSobj + */ +/area/proc/firealert(obj/source) + if(always_unpowered) //no fire alarms in space/asteroid return - //Trigger alarm effect - set_fire_alarm_effect() + if(!fire) + set_fire_alarm_effect() + ModifyFiredoors(FALSE) + for(var/item in firealarms) + var/obj/machinery/firealarm/F = item + F.update_icon() - //Lockdown airlocks - for(var/obj/machinery/door/airlock/A in src) - spawn(0) - A.close() - if(A.density) - A.lock() + for(var/thing in cameras) + var/obj/machinery/camera/C = locateUID(thing) + if(!QDELETED(C) && is_station_level(C.z)) + C.network |= "Fire Alarms" - SSalarms.burglar_alarm.triggerAlarm(src, trigger) - spawn(600) - SSalarms.burglar_alarm.clearAlarm(src, trigger) + SSalarm.triggerAlarm("Fire", src, cameras, source) -/area/proc/set_fire_alarm_effect() - fire = 1 - updateicon() - mouse_opacity = MOUSE_OPACITY_TRANSPARENT + START_PROCESSING(SSobj, src) + +/** + * Reset the firealarm alert for this area + * + * resets the alert sent to all ai players, alert consoles, drones and alarm monitor programs + * in the world + * + * Also cycles the icons of all firealarms and deregisters the area from processing on SSOBJ + */ +/area/proc/firereset(obj/source) + if(fire) + unset_fire_alarm_effects() + ModifyFiredoors(TRUE) + for(var/item in firealarms) + var/obj/machinery/firealarm/F = item + F.update_icon() + + for(var/thing in cameras) + var/obj/machinery/camera/C = locateUID(thing) + if(!QDELETED(C) && is_station_level(C.z)) + C.network -= "Fire Alarms" + + SSalarm.cancelAlarm("Fire", src, source) + + STOP_PROCESSING(SSobj, src) + +/** + * If 100 ticks has elapsed, toggle all the firedoors closed again + */ +/area/process() + if(firedoors_last_closed_on + 100 < world.time) //every 10 seconds + ModifyFiredoors(FALSE) + +/** + * Close and lock a door passed into this proc + * + * Does this need to exist on area? probably not + */ +/area/proc/close_and_lock_door(obj/machinery/door/DOOR) + set waitfor = FALSE + DOOR.close() + if(DOOR.density) + DOOR.lock() /area/proc/readyalert() if(!eject) @@ -240,13 +323,62 @@ mouse_opacity = MOUSE_OPACITY_TRANSPARENT updateicon() +/** + * Raise a burglar alert for this area + * + * Close and locks all doors in the area and alerts silicon mobs of a break in + * + * Alarm auto resets after 600 ticks + */ +/area/proc/burglaralert(obj/trigger) + if(always_unpowered) //no burglar alarms in space/asteroid + return + + //Trigger alarm effect + set_fire_alarm_effect() + //Lockdown airlocks + for(var/obj/machinery/door/DOOR in src) + close_and_lock_door(DOOR) + + if(SSalarm.triggerAlarm("Burglar", src, cameras, trigger)) + //Cancel silicon alert after 1 minute + addtimer(CALLBACK(SSalarm, /datum/controller/subsystem/alarm.proc/cancelAlarm, "Burglar", src, trigger), 600) + +/** + * Trigger the fire alarm visual affects in an area + * + * Updates the fire light on fire alarms in the area and sets all lights to emergency mode + */ +/area/proc/set_fire_alarm_effect() + fire = TRUE + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + for(var/alarm in firealarms) + var/obj/machinery/firealarm/F = alarm + F.update_fire_light(fire) + for(var/obj/machinery/light/L in src) + L.update() + +/** + * unset the fire alarm visual affects in an area + * + * Updates the fire light on fire alarms in the area and sets all lights to emergency mode + */ +/area/proc/unset_fire_alarm_effects() + fire = FALSE + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + for(var/alarm in firealarms) + var/obj/machinery/firealarm/F = alarm + F.update_fire_light(fire) + for(var/obj/machinery/light/L in src) + L.update() + /area/proc/updateicon() - if((fire || eject || party) && (!requires_power||power_environ))//If it doesn't require power, can still activate this proc. - if(fire && !eject && !party) + if((eject || party) && (!requires_power||power_environ))//If it doesn't require power, can still activate this proc. + if(!eject && !party) icon_state = "red" - else if(!fire && eject && !party) + else if(eject && !party) icon_state = "red" - else if(party && !fire && !eject) + else if(party && !eject) icon_state = "party" else icon_state = "blue-red" diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 00009c8eeca..d463c85eaf6 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -61,7 +61,7 @@ /atom/movable/proc/get_cell() return -/atom/movable/proc/start_pulling(atom/movable/AM, state, force = move_force, supress_message = FALSE) +/atom/movable/proc/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE) if(QDELETED(AM)) return FALSE if(!(AM.can_be_pulled(src, state, force))) @@ -87,7 +87,7 @@ if(ismob(AM)) var/mob/M = AM add_attack_logs(src, M, "passively grabbed", ATKLOG_ALMOSTALL) - if(!supress_message) + if(show_message) visible_message("[src] has grabbed [M] passively!") return TRUE @@ -120,12 +120,18 @@ if(pulledby && moving_diagonally != FIRST_DIAG_STEP && get_dist(src, pulledby) > 1) //separated from our puller and not in the middle of a diagonal move. pulledby.stop_pulling() -/atom/movable/proc/can_be_pulled(user, grab_state, force) +/atom/movable/proc/can_be_pulled(user, grab_state, force, show_message = FALSE) if(src == user || !isturf(loc)) return FALSE - if(anchored || throwing) + if(anchored || move_resist == INFINITY) + if(show_message) + to_chat(user, "[src] appears to be anchored to the ground!") + return FALSE + if(throwing) return FALSE if(force < (move_resist * MOVE_FORCE_PULL_RATIO)) + if(show_message) + to_chat(user, "[src] is too heavy to pull!") return FALSE return TRUE @@ -506,6 +512,7 @@ return //don't do an animation if attacking self var/pixel_x_diff = 0 var/pixel_y_diff = 0 + var/direction = get_dir(src, A) if(direction & NORTH) pixel_y_diff = 8 @@ -525,7 +532,8 @@ if(visual_effect_icon) I = image('icons/effects/effects.dmi', A, visual_effect_icon, A.layer + 0.1) else if(used_item) - I = image(used_item.icon, A, used_item.icon_state, A.layer + 0.1) + I = image(icon = used_item, loc = A, layer = A.layer + 0.1) + I.plane = GAME_PLANE // Scale the icon. I.transform *= 0.75 diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index fb0ccff32cb..d887153c6d5 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -282,6 +282,9 @@ occupant = null icon_state = "scanner_open" +/obj/machinery/dna_scannernew/force_eject_occupant() + go_out(null, TRUE) + /obj/machinery/dna_scannernew/ex_act(severity) if(occupant) occupant.ex_act(severity) diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm index 8b8a86009b9..a887959db48 100644 --- a/code/game/dna/genes/disabilities.dm +++ b/code/game/dna/genes/disabilities.dm @@ -249,14 +249,13 @@ block = GLOB.wingdingsblock /datum/dna/gene/disability/wingdings/OnSay(mob/M, message) - var/list/chars = string2charlist(message) var/garbled_message = "" - for(var/C in chars) - if(C in GLOB.alphabet_uppercase) + for(var/i in 1 to length(message)) + if(message[i] in GLOB.alphabet_uppercase) garbled_message += pick(GLOB.alphabet_uppercase) - else if(C in GLOB.alphabet) + else if(message[i] in GLOB.alphabet) garbled_message += pick(GLOB.alphabet) else - garbled_message += C + garbled_message += message[i] message = garbled_message return message diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm index 9c7fb99fe81..8f6ba965222 100644 --- a/code/game/gamemodes/blob/blob_report.dm +++ b/code/game/gamemodes/blob/blob_report.dm @@ -18,7 +18,7 @@ intercepttext += "
Note in the event of a quarantine breach or uncontrolled spread of the biohazard, the directive 7-10 may be upgraded to a directive 7-12.
" intercepttext += "Message ends." if(2) - var/nukecode = rand(10000, 99999) + var/nukecode = "[rand(10000, 99999)]" for(var/obj/machinery/nuclearbomb/bomb in GLOB.machines) if(bomb && bomb.r_code) if(is_station_level(bomb.z)) diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm index 46b1972e565..34c717f11a8 100644 --- a/code/game/gamemodes/blob/blobs/blob_mobs.dm +++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm @@ -7,6 +7,7 @@ /mob/living/simple_animal/hostile/blob icon = 'icons/mob/blob.dmi' pass_flags = PASSBLOB + status_flags = NONE //No throwing blobspores into deep space to despawn, or throwing blobbernaughts, which are bigger than you. faction = list(ROLE_BLOB) bubble_icon = "blob" 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) @@ -49,6 +50,7 @@ environment_smash = ENVIRONMENT_SMASH_STRUCTURES attacktext = "hits" attack_sound = 'sound/weapons/genhit1.ogg' + flying = TRUE speak_emote = list("pulses") var/obj/structure/blob/factory/factory = null var/list/human_overlays = list() diff --git a/code/game/gamemodes/blob/blobs/core.dm b/code/game/gamemodes/blob/blobs/core.dm index be794b9092b..dc8d0f5aba2 100644 --- a/code/game/gamemodes/blob/blobs/core.dm +++ b/code/game/gamemodes/blob/blobs/core.dm @@ -17,12 +17,12 @@ START_PROCESSING(SSobj, src) GLOB.poi_list |= src adjustcolors(color) //so it atleast appears - if(!overmind) - create_overmind(new_overmind) - if(overmind) - adjustcolors(overmind.blob_reagent_datum.color) if(offspring) is_offspring = 1 + if(overmind) + adjustcolors(overmind.blob_reagent_datum.color) + if(!overmind) + create_overmind(new_overmind) point_rate = new_rate ..(loc, h) @@ -104,10 +104,11 @@ var/mob/C = null var/list/candidates = list() if(!new_overmind) + // sendit if(is_offspring) - candidates = pollCandidates("Do you want to play as a blob offspring?", ROLE_BLOB, 1) + candidates = SSghost_spawns.poll_candidates("Do you want to play as a blob offspring?", ROLE_BLOB, TRUE, source = src) else - candidates = pollCandidates("Do you want to play as a blob?", ROLE_BLOB, 1) + candidates = SSghost_spawns.poll_candidates("Do you want to play as a blob?", ROLE_BLOB, TRUE, source = src) if(length(candidates)) C = pick(candidates) diff --git a/code/game/gamemodes/blob/powers.dm b/code/game/gamemodes/blob/powers.dm index 6f2eed39499..350da7c7593 100644 --- a/code/game/gamemodes/blob/powers.dm +++ b/code/game/gamemodes/blob/powers.dm @@ -237,7 +237,7 @@ blobber.AIStatus = AI_OFF blobber.LoseTarget() spawn() - var/list/candidates = pollCandidates("Do you want to play as a blobbernaut?", ROLE_BLOB, 1, 100) + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a blobbernaut?", ROLE_BLOB, TRUE, 10 SECONDS, source = blobber) if(candidates.len) var/mob/C = pick(candidates) if(C) @@ -389,7 +389,7 @@ return split_used = TRUE - new /obj/structure/blob/core/ (get_turf(N), 200, null, blob_core.point_rate, "offspring") + new /obj/structure/blob/core/ (get_turf(N), 200, null, blob_core.point_rate, offspring = TRUE) qdel(N) if(SSticker && SSticker.mode.name == "blob") diff --git a/code/game/gamemodes/changeling/evolution_menu.dm b/code/game/gamemodes/changeling/evolution_menu.dm index 9c33ffaaca5..b3b4000bbf1 100644 --- a/code/game/gamemodes/changeling/evolution_menu.dm +++ b/code/game/gamemodes/changeling/evolution_menu.dm @@ -370,16 +370,11 @@ GLOBAL_LIST_EMPTY(sting_paths) mind.changeling.purchasedpowers += path path.on_purchase(src) else //for respec - var/datum/action/changeling/hivemind_upload/S1 = new + var/datum/action/changeling/hivemind_pick/S1 = new if(!mind.changeling.has_sting(S1)) mind.changeling.purchasedpowers+=S1 S1.Grant(src) - var/datum/action/changeling/hivemind_download/S2 = new - if(!mind.changeling.has_sting(S2)) - mind.changeling.purchasedpowers+=S2 - S2.Grant(src) - var/mob/living/carbon/C = src //only carbons have dna now, so we have to typecaste mind.changeling.absorbed_dna |= C.dna.Clone() mind.changeling.trim_dna() diff --git a/code/game/gamemodes/changeling/powers/hivemind.dm b/code/game/gamemodes/changeling/powers/hivemind.dm index 98336608da4..18a5477fd3f 100644 --- a/code/game/gamemodes/changeling/powers/hivemind.dm +++ b/code/game/gamemodes/changeling/powers/hivemind.dm @@ -12,27 +12,36 @@ var/datum/changeling/changeling=user.mind.changeling changeling.changeling_speak = 1 to_chat(user, "Use say \":g message\" to communicate with the other changelings.") - var/datum/action/changeling/hivemind_upload/S1 = new + var/datum/action/changeling/hivemind_pick/S1 = new if(!changeling.has_sting(S1)) changeling.purchasedpowers+=S1 S1.Grant(user) - var/datum/action/changeling/hivemind_download/S2 = new - if(!changeling.has_sting(S2)) - S2.Grant(user) - changeling.purchasedpowers+=S2 return // HIVE MIND UPLOAD/DOWNLOAD DNA GLOBAL_LIST_EMPTY(hivemind_bank) -/datum/action/changeling/hivemind_upload +/datum/action/changeling/hivemind_pick name = "Hive Channel DNA" - desc = "Allows us to channel DNA in the airwaves to allow other changelings to absorb it. Costs 10 chemicals." - button_icon_state = "hivemind_channel" + desc = "Allows us to upload or absorb DNA in the airwaves. Does not count towards absorb objectives. Costs 10 chemicals." + button_icon_state = "hive_absorb" chemical_cost = 10 dna_cost = -1 -/datum/action/changeling/hivemind_upload/sting_action(var/mob/user) +/datum/action/changeling/hivemind_pick/sting_action(mob/user) + var/datum/changeling/changeling = user.mind.changeling + var/channel_pick = alert("Upload or Absorb DNA?", "Channel Select", "Upload", "Absorb") + + if(channel_pick == "Upload") + dna_upload(user) + if(channel_pick == "Absorb") + if(changeling.using_stale_dna(user))//If our current DNA is the stalest, we gotta ditch it. + to_chat(user, "We have reached our capacity to store genetic information! We must transform before absorbing more.") + return + else + dna_absorb(user) + +/datum/action/changeling/proc/dna_upload(mob/user) var/datum/changeling/changeling = user.mind.changeling var/list/names = list() for(var/datum/dna/DNA in (changeling.absorbed_dna+changeling.protected_dna)) @@ -56,23 +65,7 @@ GLOBAL_LIST_EMPTY(hivemind_bank) feedback_add_details("changeling_powers","HU") return 1 -/datum/action/changeling/hivemind_download - name = "Hive Absorb DNA" - desc = "Allows us to absorb DNA that has been channeled to the airwaves. Does not count towards absorb objectives. Costs 10 chemicals." - button_icon_state = "hive_absorb" - chemical_cost = 10 - dna_cost = -1 - -/datum/action/changeling/hivemind_download/can_sting(var/mob/living/carbon/user) - if(!..()) - return - var/datum/changeling/changeling = user.mind.changeling - if(changeling.using_stale_dna(user))//If our current DNA is the stalest, we gotta ditch it. - to_chat(user, "We have reached our capacity to store genetic information! We must transform before absorbing more.") - return - return 1 - -/datum/action/changeling/hivemind_download/sting_action(var/mob/user) +/datum/action/changeling/proc/dna_absorb(mob/user) var/datum/changeling/changeling = user.mind.changeling var/list/names = list() for(var/datum/dna/DNA in GLOB.hivemind_bank) diff --git a/code/game/gamemodes/changeling/powers/swap_form.dm b/code/game/gamemodes/changeling/powers/swap_form.dm index 0e02df12d88..97192c86a0f 100644 --- a/code/game/gamemodes/changeling/powers/swap_form.dm +++ b/code/game/gamemodes/changeling/powers/swap_form.dm @@ -18,12 +18,15 @@ if((NOCLONE || SKELETON || HUSK) in target.mutations) to_chat(user, "DNA of [target] is ruined beyond usability!") return - if(!istype(target) || issmall(target) || (NO_DNA in target.dna.species.species_traits)) + if(!istype(target) || !target.mind || issmall(target) || (NO_DNA in target.dna.species.species_traits)) to_chat(user, "[target] is not compatible with this ability.") return if(target.mind.changeling) to_chat(user, "We are unable to swap forms with another changeling!") return + if(target.has_brain_worms() || user.has_brain_worms()) + to_chat(user, "A foreign presence repels us from this body!") + return return 1 /datum/action/changeling/swap_form/sting_action(var/mob/living/carbon/user) @@ -63,6 +66,8 @@ target.add_language("Changeling") user.remove_language("Changeling") user.regenerate_icons() + if(target.stat == DEAD && target.suiciding) //If Target committed suicide, unset flag for User + target.suiciding = 0 for(var/power in lingpowers) var/datum/action/changeling/S = power diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index bf5fbb70731..433fc5b526a 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -20,8 +20,8 @@ GLOBAL_LIST_EMPTY(all_cults) var/mob/living/carbon/human/H = mind.current if(ismindshielded(H)) //mindshield protects against conversions unless removed return FALSE -// if(mind.offstation_role) cant convert offstation roles such as ghost spawns -// return FALSE Commented out until we can figure out why offstation_role is getting set to TRUE on normal crew + if(mind.offstation_role) + return FALSE if(issilicon(mind.current)) return FALSE //can't convert machines, that's ratvar's thing if(isguardian(mind.current)) @@ -231,6 +231,8 @@ GLOBAL_LIST_EMPTY(all_cults) /datum/game_mode/cult/proc/get_unconvertables() var/list/ucs = list() for(var/mob/living/carbon/human/player in GLOB.player_list) + if(player.mind && player.mind.offstation_role) + continue if(!is_convertable_to_cult(player.mind)) ucs += player.mind return ucs diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index 388b16d71af..a68e4c1e9ca 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -140,6 +140,7 @@ body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS allowed = list(/obj/item/tome,/obj/item/melee/cultblade) var/current_charges = 3 + var/shield_state = "shield-cult" hoodtype = /obj/item/clothing/head/hooded/cult_hoodie /obj/item/clothing/head/hooded/cult_hoodie @@ -164,33 +165,49 @@ if(current_charges) owner.visible_message("\The [attack_text] is deflected in a burst of blood-red sparks!") current_charges-- + playsound(loc, "sparks", 100, 1) new /obj/effect/temp_visual/cult/sparks(get_turf(owner)) if(!current_charges) owner.visible_message("The runed shield around [owner] suddenly disappears!") + shield_state = "broken" owner.update_inv_wear_suit() return 1 return 0 -/obj/item/clothing/suit/hooded/cultrobes/berserker +/obj/item/clothing/suit/hooded/cultrobes/cult_shield/special_overlays() + return mutable_appearance('icons/effects/cult_effects.dmi', shield_state, MOB_LAYER + 0.01) + +/obj/item/clothing/suit/hooded/cultrobes/flagellant_robe name = "flagellant's robes" desc = "Blood-soaked robes infused with dark magic; allows the user to move at inhuman speeds, but at the cost of increased damage." - icon_state = "hardsuit-berserker" - item_state = "hardsuit-berserker" + icon_state = "flagellantrobe" + item_state = "flagellantrobe" flags_inv = HIDEJUMPSUIT allowed = list(/obj/item/tome,/obj/item/melee/cultblade) body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS armor = list("melee" = -45, "bullet" = -45, "laser" = -45,"energy" = -45, "bomb" = -45, "bio" = -45, "rad" = -45, "fire" = 0, "acid" = 0) slowdown = -1 - hoodtype = /obj/item/clothing/head/hooded/berserkerhood + sprite_sheets = list( + "Vox" = 'icons/mob/species/vox/suit.dmi', + "Drask" = 'icons/mob/species/drask/suit.dmi', + "Grey" = 'icons/mob/species/grey/suit.dmi' + ) + hoodtype = /obj/item/clothing/head/hooded/flagellant_hood -/obj/item/clothing/head/hooded/berserkerhood +/obj/item/clothing/head/hooded/flagellant_hood name = "flagellant's robes" desc = "Blood-soaked garb infused with dark magic; allows the user to move at inhuman speeds, but at the cost of increased damage." - icon_state = "culthood" + icon_state = "flagellanthood" + item_state = "flagellanthood" flags_inv = HIDEFACE flags_cover = HEADCOVERSEYES armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) + sprite_sheets = list( + "Vox" = 'icons/mob/species/vox/head.dmi', + "Drask" = 'icons/mob/species/drask/head.dmi', + "Grey" = 'icons/mob/species/grey/head.dmi' + ) /obj/item/whetstone/cult name = "eldritch whetstone" diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index 0e96dd92062..c06913c1abe 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -120,7 +120,7 @@ selection_prompt = "You study the schematics etched on the forge..." selection_title = "Forge" creation_message = "You work the forge as dark knowledge guides your hands, creating %ITEM%!" - choosable_items = list("Shielded Robe" = /obj/item/clothing/suit/hooded/cultrobes/cult_shield, "Flagellant's Robe" = /obj/item/clothing/suit/hooded/cultrobes/berserker, \ + choosable_items = list("Shielded Robe" = /obj/item/clothing/suit/hooded/cultrobes/cult_shield, "Flagellant's Robe" = /obj/item/clothing/suit/hooded/cultrobes/flagellant_robe, \ "Cultist Hardsuit" = /obj/item/storage/box/cult) /obj/structure/cult/functional/forge/New() diff --git a/code/game/gamemodes/cult/talisman.dm b/code/game/gamemodes/cult/talisman.dm index 60d2a7ff73b..af0dfb5e6e3 100644 --- a/code/game/gamemodes/cult/talisman.dm +++ b/code/game/gamemodes/cult/talisman.dm @@ -1,10 +1,10 @@ /obj/item/paper/talisman - icon = 'icons/obj/paper.dmi' + icon = 'icons/obj/bureaucracy.dmi' icon_state = "paper_talisman" var/cultist_name = "talisman" var/cultist_desc = "A basic talisman. It serves no purpose." var/invocation = "Naise meam!" - info = "


" + info = "


" var/uses = 1 var/health_cost = 0 //The amount of health taken from the user when invoking the talisman diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 57a77167346..1e2dd3d554b 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -424,9 +424,9 @@ proc/display_roundstart_logout_report() return nukecode /datum/game_mode/proc/replace_jobbanned_player(mob/living/M, role_type) - var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as a [role_type]?", role_type, 0, 100) + var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you want to play as a [role_type]?", role_type, FALSE, 10 SECONDS) var/mob/dead/observer/theghost = null - if(candidates.len) + if(length(candidates)) theghost = pick(candidates) to_chat(M, "Your mob has been taken over by a ghost! Appeal your job ban if you want to avoid this in the future!") message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(M)]) to replace a jobbanned player.") diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index 526a2c01083..9f5db8d5dae 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -616,7 +616,7 @@ active = FALSE return var/turf/T = get_turf(owner_AI.eyeobj) - new /obj/machinery/transformer/conveyor(T) + new /obj/machinery/transformer(T, owner_AI) playsound(T, 'sound/effects/phasein.ogg', 100, 1) owner_AI.can_shunt = FALSE to_chat(owner, "You are no longer able to shunt your core to APCs.") @@ -781,3 +781,17 @@ if(AI.eyeobj) AI.eyeobj.relay_speech = TRUE +/datum/AI_Module/large/cameracrack + module_name = "Core Camera Cracker" + mod_pick_name = "cameracrack" + description = "By shortcirucuting the camera network chip, it overheats, preventing the camera console from using your internal camera." + cost = 10 + one_purchase = TRUE + upgrade = TRUE + unlock_text = "Network chip short circuited. Internal camera disconected from network. Minimal damage to other internal components." + unlock_sound = 'sound/items/wirecutter.ogg' + +/datum/AI_Module/large/cameracrack/upgrade(mob/living/silicon/ai/AI) + if(AI.builtInCamera) + QDEL_NULL(AI.builtInCamera) + diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm index f99a00567ae..750473b1dfa 100644 --- a/code/game/gamemodes/miniantags/borer/borer.dm +++ b/code/game/gamemodes/miniantags/borer/borer.dm @@ -394,7 +394,7 @@ to_chat(src, " You are feeling far too docile to do that.") return - var content = "" + var/content = "" content += "" diff --git a/code/game/gamemodes/miniantags/guardian/guardian.dm b/code/game/gamemodes/miniantags/guardian/guardian.dm index f647ae5a6d1..fdf17f6ddda 100644 --- a/code/game/gamemodes/miniantags/guardian/guardian.dm +++ b/code/game/gamemodes/miniantags/guardian/guardian.dm @@ -15,7 +15,7 @@ a_intent = INTENT_HARM can_change_intents = 0 stop_automated_movement = 1 - floating = 1 + flying = TRUE attack_sound = 'sound/weapons/punch1.ogg' minbodytemp = 0 maxbodytemp = INFINITY @@ -246,7 +246,7 @@ src.verbs -= /mob/living/proc/guardian_reset for(var/mob/living/simple_animal/hostile/guardian/G in GLOB.mob_list) if(G.summoner == src) - var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as [G.real_name]?", ROLE_GUARDIAN, 0, 100) + var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you want to play as [G.real_name]?", ROLE_GUARDIAN, FALSE, 10 SECONDS, source = G) var/mob/dead/observer/new_stand = null if(candidates.len) new_stand = pick(candidates) @@ -312,7 +312,7 @@ used = FALSE return to_chat(user, "[use_message]") - var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as the [mob_name] of [user.real_name]?", ROLE_GUARDIAN, 0, 100) + var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you want to play as the [mob_name] of [user.real_name]?", ROLE_GUARDIAN, FALSE, 10 SECONDS, source = src) var/mob/dead/observer/theghost = null if(candidates.len) diff --git a/code/game/gamemodes/miniantags/guardian/types/ranged.dm b/code/game/gamemodes/miniantags/guardian/types/ranged.dm index 496e31d1bd3..dab7dfb1eca 100644 --- a/code/game/gamemodes/miniantags/guardian/types/ranged.dm +++ b/code/game/gamemodes/miniantags/guardian/types/ranged.dm @@ -1,7 +1,7 @@ /obj/item/projectile/guardian name = "crystal spray" icon_state = "guardian" - damage = 5 + damage = 25 damage_type = BRUTE armour_penetration = 100 @@ -11,7 +11,7 @@ melee_damage_upper = 10 damage_transfer = 0.9 projectiletype = /obj/item/projectile/guardian - ranged_cooldown_time = 1 //fast! + ranged_cooldown_time = 5 //fast! projectilesound = 'sound/effects/hit_on_shattered_glass.ogg' ranged = 1 range = 13 diff --git a/code/game/gamemodes/miniantags/morph/morph_event.dm b/code/game/gamemodes/miniantags/morph/morph_event.dm index e9465492a27..7fc9e134195 100644 --- a/code/game/gamemodes/miniantags/morph/morph_event.dm +++ b/code/game/gamemodes/miniantags/morph/morph_event.dm @@ -3,7 +3,7 @@ /datum/event/spawn_morph/proc/get_morph() spawn() - var/list/candidates = pollCandidates("Do you want to play as a morph?", ROLE_MORPH, 1) + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a morph?", ROLE_MORPH, TRUE, source = /mob/living/simple_animal/hostile/morph) if(!candidates.len) key_of_morph = null return kill() diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm index f86f018757e..cba5ea62a2a 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant.dm @@ -16,6 +16,7 @@ var/icon_stun = "revenant_stun" var/icon_drain = "revenant_draining" incorporeal_move = 3 + see_invisible = INVISIBILITY_REVENANT invisibility = INVISIBILITY_REVENANT health = INFINITY //Revenants don't use health, they use essence instead maxHealth = INFINITY @@ -33,7 +34,7 @@ status_flags = 0 wander = 0 density = 0 - flying = 1 + flying = TRUE move_resist = INFINITY mob_size = MOB_SIZE_TINY pass_flags = PASSTABLE | PASSGRILLE | PASSMOB @@ -140,7 +141,7 @@ giveObjectivesandGoals() giveSpells() else - var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as a revenant?", poll_time = 15 SECONDS) + var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you want to play as a revenant?", poll_time = 15 SECONDS, source = /mob/living/simple_animal/revenant) var/mob/dead/observer/theghost = null if(candidates.len) theghost = pick(candidates) @@ -396,7 +397,7 @@ spawn() if(!key_of_revenant) message_admins("The new revenant's old client either could not be found or is in a new, living mob - grabbing a random candidate instead...") - var/list/candidates = pollCandidates("Do you want to play as a revenant?", ROLE_REVENANT, 1) + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a revenant?", ROLE_REVENANT, TRUE, source = /mob/living/simple_animal/revenant) if(!candidates.len) qdel(R) message_admins("No candidates were found for the new revenant. Oh well!") diff --git a/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm b/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm index 5e5f0f87a79..aa76f3620ac 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm @@ -13,7 +13,7 @@ return spawn() - var/list/candidates = pollCandidates("Do you want to play as a revenant?", ROLE_REVENANT, 1) + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a revenant?", ROLE_REVENANT, TRUE, source = /mob/living/simple_animal/revenant) if(!candidates.len) key_of_revenant = null return kill() diff --git a/code/game/gamemodes/miniantags/slaughter/slaughter.dm b/code/game/gamemodes/miniantags/slaughter/slaughter.dm index d7e53bdae28..e58be201521 100644 --- a/code/game/gamemodes/miniantags/slaughter/slaughter.dm +++ b/code/game/gamemodes/miniantags/slaughter/slaughter.dm @@ -157,7 +157,7 @@ /mob/living/simple_animal/slaughter/cult/New() ..() spawn(5) - var/list/demon_candidates = pollCandidates("Do you want to play as a slaughter demon?", ROLE_DEMON, 1, 100) + var/list/demon_candidates = SSghost_spawns.poll_candidates("Do you want to play as a slaughter demon?", ROLE_DEMON, TRUE, 10 SECONDS, source = /mob/living/simple_animal/slaughter/cult) if(!demon_candidates.len) visible_message("[src] disappears in a flash of red light!") qdel(src) diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 5fed8ae00f4..8316364781b 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -53,7 +53,6 @@ proc/issyndicate(mob/living/M as mob) for(var/datum/mind/synd_mind in syndicates) synd_mind.assigned_role = SPECIAL_ROLE_NUKEOPS //So they aren't chosen for other jobs. synd_mind.special_role = SPECIAL_ROLE_NUKEOPS - synd_mind.offstation_role = TRUE return 1 @@ -113,7 +112,7 @@ proc/issyndicate(mob/living/M as mob) if(spawnpos > synd_spawn.len) spawnpos = 2 synd_mind.current.loc = synd_spawn[spawnpos] - + synd_mind.offstation_role = TRUE forge_syndicate_objectives(synd_mind) create_syndicate(synd_mind) greet_syndicate(synd_mind) diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index 8e38f106cc7..c73293da519 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -42,6 +42,7 @@ GLOBAL_VAR(bomb_set) GLOB.poi_list |= src /obj/machinery/nuclearbomb/Destroy() + SStgui.close_uis(wires) QDEL_NULL(wires) GLOB.poi_list.Remove(src) return ..() @@ -407,6 +408,20 @@ GLOBAL_VAR(bomb_set) return return +/obj/machinery/nuclearbomb/proc/reset_lighthack_callback() + lighthack = !lighthack + +/obj/machinery/nuclearbomb/proc/reset_safety_callback() + safety = !safety + if(safety == 1) + if(!is_syndicate) + set_security_level(previous_level) + visible_message("The [src] quiets down.") + if(!lighthack) + if(icon_state == "nuclearbomb2") + icon_state = "nuclearbomb1" + else + visible_message("The [src] emits a quiet whirling noise!") //==========DAT FUKKEN DISK=============== /obj/item/disk/nuclear diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index b46bc3c6c51..b51810e4967 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -74,7 +74,7 @@ Made by Xhuis required_enemies = 2 recommended_enemies = 2 restricted_jobs = list("AI", "Cyborg") - protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Blueshield", "Nanotrasen Representative", "Security Pod Pilot", "Magistrate", "Brig Physician", "Internal Affairs Agent", "Nanotrasen Navy Officer", "Special Operations Officer", "Syndicate Officer") + protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Head of Personnel", "Captain", "Blueshield", "Nanotrasen Representative", "Security Pod Pilot", "Magistrate", "Brig Physician", "Internal Affairs Agent", "Nanotrasen Navy Officer", "Special Operations Officer", "Syndicate Officer") /datum/game_mode/shadowling/announce() to_chat(world, "The current game mode is - Shadowling!") diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm index 07c61628337..7906deeb718 100644 --- a/code/game/gamemodes/vampire/vampire_powers.dm +++ b/code/game/gamemodes/vampire/vampire_powers.dm @@ -145,7 +145,7 @@ /obj/effect/proc_holder/spell/vampire/self/rejuvenate name = "Rejuvenate" - desc= "Flush your system with spare blood to remove any incapacitating effects." + desc= "Use reserve blood to enliven your body, removing any incapacitating effects." action_icon_state = "vampire_rejuvinate" charge_max = 200 stat_allowed = 1 @@ -158,7 +158,7 @@ user.SetParalysis(0) user.SetSleeping(0) U.adjustStaminaLoss(-75) - to_chat(user, "You flush your system with clean blood and remove any incapacitating effects.") + to_chat(user, "You instill your body with clean blood and remove any incapacitating effects.") spawn(1) if(usr.mind.vampire.get_ability(/datum/vampire_passive/regen)) for(var/i = 1 to 5) diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index a81b12ed041..44dec855f82 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -50,7 +50,8 @@ to_chat(H, "You already used this contract!") return used = 1 - var/list/candidates = pollCandidates("Do you want to play as the wizard apprentice of [H.real_name]?", ROLE_WIZARD, 1) + var/image/source = image('icons/obj/cardboard_cutout.dmi', "cutout_wizard") + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as the wizard apprentice of [H.real_name]?", ROLE_WIZARD, TRUE, source = source) if(candidates.len) var/mob/C = pick(candidates) new /obj/effect/particle_effect/smoke(H.loc) @@ -307,7 +308,8 @@ GLOBAL_LIST_EMPTY(multiverse) if(M.assigned == assigned) M.cooldown = cooldown - var/list/candidates = pollCandidates("Do you want to play as the wizard apprentice of [user.real_name]?", ROLE_WIZARD, 1, 100) + var/image/source = image('icons/obj/cardboard_cutout.dmi', "cutout_wizard") + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as the wizard apprentice of [user.real_name]?", ROLE_WIZARD, TRUE, 10 SECONDS, source = source) if(candidates.len) var/mob/C = pick(candidates) spawn_copy(C.client, get_turf(user.loc), user) diff --git a/code/game/gamemodes/wizard/raginmages.dm b/code/game/gamemodes/wizard/raginmages.dm index cc52b431249..d51b16d2cd3 100644 --- a/code/game/gamemodes/wizard/raginmages.dm +++ b/code/game/gamemodes/wizard/raginmages.dm @@ -118,7 +118,8 @@ return FALSE making_mage = TRUE - var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as a raging Space Wizard?", ROLE_WIZARD, TRUE, poll_time = 20 SECONDS) + var/image/source = image('icons/obj/cardboard_cutout.dmi', "cutout_wizard") + var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you want to play as a raging Space Wizard?", ROLE_WIZARD, TRUE, poll_time = 20 SECONDS, source = source) var/mob/dead/observer/harry = null message_admins("SWF is still pissed, sending another wizard - [max_mages - mages_made] left.") diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm index 4bda254d930..aab4318c774 100644 --- a/code/game/gamemodes/wizard/soulstone.dm +++ b/code/game/gamemodes/wizard/soulstone.dm @@ -363,7 +363,7 @@ break if(!chosen_ghost) //Failing that, we grab a ghost - var/list/consenting_candidates = pollCandidates("Would you like to play as a Shade?", ROLE_CULTIST, FALSE, poll_time = 100) + var/list/consenting_candidates = SSghost_spawns.poll_candidates("Would you like to play as a Shade?", ROLE_CULTIST, FALSE, poll_time = 10 SECONDS, source = /mob/living/simple_animal/shade) if(consenting_candidates.len) chosen_ghost = pick(consenting_candidates) if(!T) diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index d1695a86603..d0773947c21 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -610,7 +610,7 @@ var/entry_types = subtypesof(/datum/spellbook_entry) - /datum/spellbook_entry/item - /datum/spellbook_entry/summon - /datum/spellbook_entry/loadout for(var/T in entry_types) var/datum/spellbook_entry/E = new T - if(GAMEMODE_IS_WIZARD && E.is_ragin_restricted) + if(GAMEMODE_IS_RAGIN_MAGES && E.is_ragin_restricted) qdel(E) continue entries |= E diff --git a/code/game/jobs/job_exp.dm b/code/game/jobs/job_exp.dm index f0e6f9bff42..aa9114c2963 100644 --- a/code/game/jobs/job_exp.dm +++ b/code/game/jobs/job_exp.dm @@ -224,19 +224,17 @@ GLOBAL_LIST_INIT(role_playtime_requirements, list( else return "none" -/proc/update_exp(var/mins, var/ann = 0) - if(!establish_db_connection()) - return -1 - spawn(0) - for(var/client/L in GLOB.clients) - if(L.inactivity >= (10 MINUTES)) - continue - spawn(0) - L.update_exp_client(mins, ann) - sleep(10) +/proc/update_exp(mins = 0, ann = 0) + if(!GLOB.dbcon.IsConnected()) + return + for(var/client/L in GLOB.clients) + if(L.inactivity >= (10 MINUTES)) + continue + L.update_exp_client(mins, ann) + CHECK_TICK -/client/proc/update_exp_client(var/minutes, var/announce_changes = 0) - if(!src ||!ckey) +/client/proc/update_exp_client(minutes = 0, announce_changes = 0) + if(!src || !ckey || !GLOB.dbcon.IsConnected()) return var/DBQuery/exp_read = GLOB.dbcon.NewQuery("SELECT exp FROM [format_table_name("player")] WHERE ckey='[ckey]'") if(!exp_read.Execute()) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index e4d0befa61e..7c5a03e29e6 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -411,6 +411,9 @@ for(var/atom/movable/A in contents - component_parts - list(beaker)) A.forceMove(loc) +/obj/machinery/sleeper/force_eject_occupant() + go_out() + /obj/machinery/sleeper/proc/inject_chemical(mob/living/user as mob, chemical, amount) if(!(chemical in possible_chems)) to_chat(user, "The sleeper does not offer that chemical!") diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 1ee30b6e9d0..3fa78dd02e6 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -172,6 +172,9 @@ for(var/atom/movable/A in contents - component_parts) A.forceMove(loc) +/obj/machinery/bodyscanner/force_eject_occupant() + go_out() + /obj/machinery/bodyscanner/ex_act(severity) if(occupant) occupant.ex_act(severity) diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 9fda2cfe45c..951f2a1e9cf 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -222,6 +222,7 @@ first_run() /obj/machinery/alarm/Destroy() + SStgui.close_uis(wires) GLOB.air_alarms -= src if(SSradio) SSradio.remove_object(src, frequency) @@ -314,7 +315,7 @@ temperature_dangerlevel ) - if(old_danger_level!=danger_level) + if(old_danger_level != danger_level) apply_danger_level() if(mode == AALARM_MODE_REPLACEMENT && environment_pressure < ONE_ATMOSPHERE * 0.05) @@ -534,28 +535,35 @@ "checks"= 0, )) -/obj/machinery/alarm/proc/apply_danger_level(var/new_danger_level) - if(report_danger_level && alarm_area.atmosalert(new_danger_level, src)) - post_alert(new_danger_level) +/obj/machinery/alarm/proc/apply_danger_level() + var/new_area_danger_level = ATMOS_ALARM_NONE + for(var/obj/machinery/alarm/AA in alarm_area) + if(!(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted) + new_area_danger_level = max(new_area_danger_level, AA.danger_level) + if(alarm_area.atmosalert(new_area_danger_level, src)) //if area was in normal state or if area was in alert state + post_alert(new_area_danger_level) update_icon() /obj/machinery/alarm/proc/post_alert(alert_level) + if(!report_danger_level) + return var/datum/radio_frequency/frequency = SSradio.return_frequency(alarm_frequency) + if(!frequency) return var/datum/signal/alert_signal = new alert_signal.source = src alert_signal.transmission_method = 1 - alert_signal.data["zone"] = alarm_area.name + alert_signal.data["zone"] = get_area_name(src, TRUE) alert_signal.data["type"] = "Atmospheric" - if(alert_level==2) + if(alert_level == ATMOS_ALARM_DANGER) alert_signal.data["alert"] = "severe" - else if(alert_level==1) + else if(alert_level == ATMOS_ALARM_WARNING) alert_signal.data["alert"] = "minor" - else if(alert_level==0) + else if(alert_level == ATMOS_ALARM_NONE) alert_signal.data["alert"] = "clear" frequency.post_signal(src, alert_signal) @@ -889,14 +897,14 @@ if(href_list["atmos_alarm"]) if(alarm_area.atmosalert(ATMOS_ALARM_DANGER, src)) - apply_danger_level(ATMOS_ALARM_DANGER) + post_alert(ATMOS_ALARM_DANGER) alarmActivated = 1 update_icon() return 1 if(href_list["atmos_reset"]) if(alarm_area.atmosalert(ATMOS_ALARM_NONE, src, TRUE)) - apply_danger_level(ATMOS_ALARM_NONE) + post_alert(ATMOS_ALARM_NONE) alarmActivated = 0 update_icon() return 1 @@ -951,7 +959,7 @@ to_chat(user, "It does nothing") return else - if(allowed(usr) && !wires.IsIndexCut(AALARM_WIRE_IDSCAN)) + if(allowed(usr) && !wires.is_cut(WIRE_IDSCAN)) locked = !locked to_chat(user, "You [ locked ? "lock" : "unlock"] the Air Alarm interface.") updateUsrDialog() @@ -1030,7 +1038,7 @@ . = TRUE if(!I.use_tool(src, user, 0, volume = I.tool_volume)) return - if(wires.wires_status == 31) // all wires cut + if(wires.is_all_cut()) // all wires cut var/obj/item/stack/cable_coil/new_coil = new /obj/item/stack/cable_coil(user.drop_location()) new_coil.amount = 5 buildstage = AIR_ALARM_BUILDING @@ -1076,6 +1084,15 @@ if(buildstage < 1) . += "The circuit is missing." +/obj/machinery/alarm/proc/unshort_callback() + if(shorted) + shorted = FALSE + update_icon() + +/obj/machinery/alarm/proc/enable_ai_control_callback() + if(aidisabled) + aidisabled = FALSE + /obj/machinery/alarm/all_access name = "all-access air alarm" desc = "This particular atmos control unit appears to have no access restrictions." diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm index 7af7751ff2c..d7a49e40d4b 100644 --- a/code/game/machinery/atmoalter/scrubber.dm +++ b/code/game/machinery/atmoalter/scrubber.dm @@ -187,24 +187,24 @@ icon_state = "scrubber:0" /obj/machinery/portable_atmospherics/scrubber/huge/attackby(var/obj/item/W as obj, var/mob/user as mob, params) - if(istype(W, /obj/item/wrench)) - if(stationary) - to_chat(user, "The bolts are too tight for you to unscrew!") - return - if(on) - to_chat(user, "Turn it off first!") - return - - anchored = !anchored - playsound(loc, W.usesound, 50, 1) - to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") - return - if((istype(W, /obj/item/analyzer)) && get_dist(user, src) <= 1) atmosanalyzer_scan(air_contents, user) return return ..() +/obj/machinery/portable_atmospherics/scrubber/huge/wrench_act(mob/user, obj/item/I) + . = TRUE + if(stationary) + to_chat(user, "The bolts are too tight for you to unscrew!") + return + if(on) + to_chat(user, "Turn it off first!") + return + if(!I.use_tool(src, user, 0, volume = I.tool_volume)) + return + anchored = !anchored + to_chat(user, "You [anchored ? "wrench" : "unwrench"] [src].") + /obj/machinery/portable_atmospherics/scrubber/huge/stationary name = "Stationary Air Scrubber" stationary = 1 diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index c22922e4d14..5c1b84d8cba 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -65,6 +65,7 @@ RefreshParts() /obj/machinery/autolathe/Destroy() + SStgui.close_uis(wires) QDEL_NULL(wires) var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.retrieve_all() @@ -467,3 +468,15 @@ for(var/datum/design/D in files.known_designs) if("hacked" in D.category) files.known_designs -= D.id + +/obj/machinery/autolathe/proc/check_hacked_callback() + if(!wires.is_cut(WIRE_AUTOLATHE_HACK)) + adjust_hacked(FALSE) + +/obj/machinery/autolathe/proc/check_electrified_callback() + if(!wires.is_cut(WIRE_ELECTRIFY)) + shocked = FALSE + +/obj/machinery/autolathe/proc/check_disabled_callback() + if(!wires.is_cut(WIRE_AUTOLATHE_DISABLE)) + disabled = FALSE diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index b66cad8d328..4e185feb4a8 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -28,13 +28,14 @@ var/view_range = 7 var/short_range = 2 + var/alarm_on = FALSE var/busy = FALSE var/emped = FALSE //Number of consecutive EMP's on this camera var/in_use_lights = 0 // TO BE IMPLEMENTED var/toggle_sound = 'sound/items/wirecutter.ogg' -/obj/machinery/camera/Initialize() +/obj/machinery/camera/Initialize(mapload) . = ..() wires = new(src) assembly = new(src) @@ -44,11 +45,17 @@ GLOB.cameranet.cameras += src GLOB.cameranet.addCamera(src) + if(isturf(loc)) + LAZYADD(myArea.cameras, UID()) if(is_station_level(z) && prob(3) && !start_active) toggle_cam(null, FALSE) - wires.CutAll() + wires.cut_all() + +/obj/machinery/camera/proc/set_area_motion(area/A) + area_motion = A /obj/machinery/camera/Destroy() + SStgui.close_uis(wires) toggle_cam(null, FALSE) //kick anyone viewing out QDEL_NULL(assembly) if(istype(bug)) @@ -59,10 +66,14 @@ QDEL_NULL(wires) GLOB.cameranet.removeCamera(src) //Will handle removal from the camera network and the chunks, so we don't need to worry about that GLOB.cameranet.cameras -= src + if(isarea(myArea)) + LAZYREMOVE(myArea.cameras, UID()) var/area/ai_monitored/A = get_area(src) if(istype(A)) - A.motioncamera = null + A.motioncameras -= src area_motion = null + cancelCameraAlarm() + cancelAlarm() return ..() /obj/machinery/camera/emp_act(severity) @@ -252,7 +263,7 @@ if(status && !(flags & NODECONSTRUCT)) triggerCameraAlarm() toggle_cam(null, FALSE) - wires.CutAll() + wires.cut_all() /obj/machinery/camera/deconstruct(disassembled = TRUE) if(!(flags & NODECONSTRUCT)) @@ -282,9 +293,16 @@ status = !status if(can_use()) GLOB.cameranet.addCamera(src) + if(isturf(loc)) + myArea = get_area(src) + LAZYADD(myArea.cameras, UID()) + else + myArea = null else set_light(0) GLOB.cameranet.removeCamera(src) + if(isarea(myArea)) + LAZYREMOVE(myArea.cameras, UID()) GLOB.cameranet.updateChunk(x, y, z) var/change_msg = "deactivates" if(status) @@ -313,12 +331,12 @@ to_chat(O, "The screen bursts into static.") /obj/machinery/camera/proc/triggerCameraAlarm() - if(is_station_contact(z)) - SSalarms.camera_alarm.triggerAlarm(loc, src) + alarm_on = TRUE + SSalarm.triggerAlarm("Camera", get_area(src), list(UID()), src) /obj/machinery/camera/proc/cancelCameraAlarm() - if(is_station_contact(z)) - SSalarms.camera_alarm.clearAlarm(loc, src) + alarm_on = FALSE + SSalarm.cancelAlarm("Camera", get_area(src), src) /obj/machinery/camera/proc/can_use() if(!status) @@ -414,8 +432,8 @@ /obj/machinery/camera/portable //Cameras which are placed inside of things, such as helmets. var/turf/prev_turf -/obj/machinery/camera/portable/New() - ..() +/obj/machinery/camera/portable/Initialize(mapload) + . = ..() assembly.state = 0 //These cameras are portable, and so shall be in the portable state if removed. assembly.anchored = 0 assembly.update_icon() diff --git a/code/game/machinery/camera/motion.dm b/code/game/machinery/camera/motion.dm index 16fb6eca204..7d33361e4b9 100644 --- a/code/game/machinery/camera/motion.dm +++ b/code/game/machinery/camera/motion.dm @@ -1,60 +1,60 @@ /obj/machinery/camera - - var/list/motionTargets = list() + var/list/localMotionTargets = list() var/detectTime = 0 var/area/ai_monitored/area_motion = null - var/alarm_delay = 100 - + var/alarm_delay = 30 // Don't forget, there's another 3 seconds in queueAlarm() /obj/machinery/camera/process() // motion camera event loop - if(stat & (EMPED|NOPOWER)) - return if(!isMotion()) . = PROCESS_KILL return + if(stat & (EMPED|NOPOWER)) + return if(detectTime > 0) var/elapsed = world.time - detectTime if(elapsed > alarm_delay) triggerAlarm() else if(detectTime == -1) - for(var/mob/target in motionTargets) - if(target.stat == 2) lostTarget(target) - // If not detecting with motion camera... - if(!area_motion) - // See if the camera is still in range - if(!in_range(src, target)) - // If they aren't in range, lose the target. - lostTarget(target) + for(var/thing in getTargetList()) + var/mob/target = locateUID(thing) + if(QDELETED(target) || target.stat == DEAD || (!area_motion && !in_range(src, target))) + //If not part of a monitored area and the camera is not in range or the target is dead + lostTargetRef(thing) -/obj/machinery/camera/proc/newTarget(var/mob/target) - if(istype(target, /mob/living/silicon/ai)) return 0 +/obj/machinery/camera/proc/getTargetList() + if(area_motion) + return area_motion.motionTargets + return localMotionTargets + +/obj/machinery/camera/proc/newTarget(mob/target) + if(isAI(target)) + return FALSE if(detectTime == 0) detectTime = world.time // start the clock - if(!(target in motionTargets)) - motionTargets += target - return 1 + var/list/targets = getTargetList() + targets |= target.UID() + return TRUE -/obj/machinery/camera/proc/lostTarget(var/mob/target) - if(target in motionTargets) - motionTargets -= target - if(motionTargets.len == 0) +/obj/machinery/camera/proc/lostTargetRef(uid) + var/list/targets = getTargetList() + targets -= uid + if(length(targets)) cancelAlarm() /obj/machinery/camera/proc/cancelAlarm() - if(!status || (stat & NOPOWER)) - return FALSE - if(detectTime == -1 && is_station_contact(z)) - SSalarms.motion_alarm.clearAlarm(loc, src) + if(detectTime == -1) + if(status) + SSalarm.cancelAlarm("Motion", get_area(src), src) detectTime = 0 return TRUE /obj/machinery/camera/proc/triggerAlarm() - if(!status || (stat & NOPOWER)) + if(!detectTime) return FALSE - if(!detectTime || !is_station_contact(z)) - return FALSE - SSalarms.motion_alarm.triggerAlarm(loc, src) + if(status) + SSalarm.triggerAlarm("Motion", get_area(src), list(UID()), src) + visible_message("A red light flashes on the [src]!") detectTime = -1 return TRUE diff --git a/code/game/machinery/camera/presets.dm b/code/game/machinery/camera/presets.dm index b7ae75cd13f..33c970639e5 100644 --- a/code/game/machinery/camera/presets.dm +++ b/code/game/machinery/camera/presets.dm @@ -2,7 +2,7 @@ // EMP -/obj/machinery/camera/emp_proof/Initialize() +/obj/machinery/camera/emp_proof/Initialize(mapload) . = ..() upgradeEmpProof() @@ -11,19 +11,23 @@ /obj/machinery/camera/xray icon_state = "xraycam" // Thanks to Krutchen for the icons. -/obj/machinery/camera/xray/Initialize() +/obj/machinery/camera/xray/Initialize(mapload) . = ..() upgradeXRay() // MOTION +/obj/machinery/camera/motion + name = "motion-sensitive security camera" -/obj/machinery/camera/motion/Initialize() +/obj/machinery/camera/motion/Initialize(mapload) . = ..() upgradeMotion() // ALL UPGRADES +/obj/machinery/camera/all + icon_state = "xraycamera" //mapping icon. -/obj/machinery/camera/all/Initialize() +/obj/machinery/camera/all/Initialize(mapload) . = ..() upgradeEmpProof() upgradeXRay() @@ -78,6 +82,10 @@ // If you are upgrading Motion, and it isn't in the camera's New(), add it to the machines list. /obj/machinery/camera/proc/upgradeMotion() + if(isMotion()) + return + if(name == initial(name)) + name = "motion-sensitive security camera" assembly.upgrades.Add(new /obj/item/assembly/prox_sensor(assembly)) setPowerUsage() // Add it to machines that process diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index 123cee3ae4e..0be4aa0449b 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -1,84 +1,90 @@ -GLOBAL_LIST_EMPTY(priority_air_alarms) -GLOBAL_LIST_EMPTY(minor_air_alarms) - - /obj/machinery/computer/atmos_alert name = "atmospheric alert computer" desc = "Used to access the station's atmospheric sensors." circuit = /obj/item/circuitboard/atmos_alert + var/ui_x = 350 + var/ui_y = 300 icon_keyboard = "atmos_key" icon_screen = "alert:0" light_color = LIGHT_COLOR_CYAN + var/list/priority_alarms = list() + var/list/minor_alarms = list() + var/receive_frequency = ATMOS_FIRE_FREQ + var/datum/radio_frequency/radio_connection -/obj/machinery/computer/atmos_alert/New() - ..() - SSalarms.atmosphere_alarm.register(src, /obj/machinery/computer/station_alert/.proc/update_icon) +/obj/machinery/computer/atmos_alert/Initialize(mapload) + . = ..() + set_frequency(receive_frequency) /obj/machinery/computer/atmos_alert/Destroy() - SSalarms.atmosphere_alarm.unregister(src) - return ..() + SSradio.remove_object(src, receive_frequency) + return ..() /obj/machinery/computer/atmos_alert/attack_hand(mob/user) - ui_interact(user) + tgui_interact(user) -/obj/machinery/computer/atmos_alert/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) +/obj/machinery/computer/atmos_alert/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/tgui_state/state = GLOB.tgui_default_state) + ui = SStgui.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 = new(user, src, ui_key, "AtmosAlertConsole", name, ui_x, ui_y, master_ui, state) ui.open() - ui.set_auto_update(1) -/obj/machinery/computer/atmos_alert/ui_data(mob/user, datum/topic_state/state) - var/data[0] - var/major_alarms[0] - var/minor_alarms[0] +/obj/machinery/computer/atmos_alert/tgui_data(mob/user) + var/list/data = list() - for(var/datum/alarm/alarm in SSalarms.atmosphere_alarm.major_alarms()) - major_alarms[++major_alarms.len] = list("name" = sanitize(alarm.alarm_name()), "ref" = "\ref[alarm]") - - for(var/datum/alarm/alarm in SSalarms.atmosphere_alarm.minor_alarms()) - minor_alarms[++minor_alarms.len] = list("name" = sanitize(alarm.alarm_name()), "ref" = "\ref[alarm]") - - data["priority_alarms"] = major_alarms - data["minor_alarms"] = minor_alarms + data["priority"] = list() + for(var/zone in priority_alarms) + data["priority"] |= zone + data["minor"] = list() + for(var/zone in minor_alarms) + data["minor"] |= zone return data -/obj/machinery/computer/atmos_alert/update_icon() - var/list/alarms = SSalarms.atmosphere_alarm.major_alarms() - if(alarms.len) - icon_screen = "alert:2" - else - alarms = SSalarms.atmosphere_alarm.minor_alarms() - if(alarms.len) - icon_screen = "alert:1" - else - icon_screen = "alert:0" - ..() - -/obj/machinery/computer/atmos_alert/Topic(href, href_list) +/obj/machinery/computer/atmos_alert/tgui_act(action, params) if(..()) - return 1 + return + switch(action) + if("clear") + var/zone = params["zone"] + if(zone in priority_alarms) + to_chat(usr, "Priority alarm for [zone] cleared.") + priority_alarms -= zone + . = TRUE + if(zone in minor_alarms) + to_chat(usr, "Minor alarm for [zone] cleared.") + minor_alarms -= zone + . = TRUE + update_icon() - if(href_list["clear_alarm"]) - var/datum/alarm/alarm = locate(href_list["clear_alarm"]) in SSalarms.atmosphere_alarm.alarms - if(alarm) - for(var/datum/alarm_source/alarm_source in alarm.sources) - var/obj/machinery/alarm/air_alarm = alarm_source.source - if(istype(air_alarm)) - var/list/new_ref = list("atmos_reset" = 1) - air_alarm.Topic(href, new_ref, state = GLOB.air_alarm_topic) - update_icon() - return 1 +/obj/machinery/computer/atmos_alert/proc/set_frequency(new_frequency) + SSradio.remove_object(src, receive_frequency) + receive_frequency = new_frequency + radio_connection = SSradio.add_object(src, receive_frequency, RADIO_ATMOSIA) -GLOBAL_DATUM_INIT(air_alarm_topic, /datum/topic_state/air_alarm_topic, new) +/obj/machinery/computer/atmos_alert/receive_signal(datum/signal/signal) + if(!signal) + return -/datum/topic_state/air_alarm_topic/href_list(var/mob/user) - var/list/extra_href = list() - extra_href["remote_connection"] = 1 - extra_href["remote_access"] = 1 + var/zone = signal.data["zone"] + var/severity = signal.data["alert"] - return extra_href + if(!zone || !severity) + return -/datum/topic_state/air_alarm_topic/can_use_topic(var/src_object, var/mob/user) - return STATUS_INTERACTIVE + minor_alarms -= zone + priority_alarms -= zone + if(severity == "severe") + priority_alarms += zone + else if(severity == "minor") + minor_alarms += zone + update_icon() + +/obj/machinery/computer/atmos_alert/update_icon() + if(length(priority_alarms)) + icon_screen = "alert:2" + else if(length(minor_alarms)) + icon_screen = "alert:1" + else + icon_screen = "alert:0" + ..() diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index b502d6e5441..a07f3c04348 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -165,12 +165,9 @@ /obj/item/circuitboard/stationalert_engineering name = "Circuit Board (Station Alert Console (Engineering))" build_path = /obj/machinery/computer/station_alert -/obj/item/circuitboard/stationalert_security - name = "Circuit Board (Station Alert Console (Security))" +/obj/item/circuitboard/stationalert + name = "Circuit Board (Station Alert Console)" build_path = /obj/machinery/computer/station_alert -/obj/item/circuitboard/stationalert_all - name = "Circuit Board (Station Alert Console (All))" - build_path = /obj/machinery/computer/station_alert/all /obj/item/circuitboard/atmos_alert name = "Circuit Board (Atmospheric Alert Computer)" build_path = /obj/machinery/computer/atmos_alert diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 8d6c545e0a8..98f56feeb6a 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -390,7 +390,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) if(!job_in_department(SSjobs.GetJob(t1))) return 0 if(t1 == "Custom") - var/temp_t = sanitize(copytext(input("Enter a custom job assignment.","Assignment"),1,MAX_MESSAGE_LEN)) + var/temp_t = sanitize(reject_bad_name(copytext(input("Enter a custom job assignment.", "Assignment"), 1, MAX_MESSAGE_LEN), TRUE)) //let custom jobs function as an impromptu alt title, mainly for sechuds if(temp_t && modify) SSjobs.log_job_transfer(modify.registered_name, modify.getRankAndAssignment(), temp_t, scan.registered_name) @@ -419,7 +419,8 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) message_admins("[key_name_admin(usr)] has reassigned \"[modify.registered_name]\" from \"[jobnamedata]\" to \"[t1]\".") SSjobs.log_job_transfer(modify.registered_name, jobnamedata, t1, scan.registered_name) - SSjobs.slot_job_transfer(modify.rank, t1) + if(modify.owner_uid) + SSjobs.slot_job_transfer(modify.rank, t1) var/mob/living/carbon/human/H = modify.getPlayer() if(istype(H)) @@ -436,7 +437,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) if(is_authenticated(usr) && !target_dept) var/t2 = modify if((modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf))) - var/temp_name = reject_bad_name(href_list["reg"]) + var/temp_name = reject_bad_name(href_list["reg"], TRUE) if(temp_name) modify.registered_name = temp_name else @@ -465,6 +466,8 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) if(is_authenticated(usr) && !target_dept) var/delcount = SSjobs.delete_log_records(scan.registered_name, TRUE) if(delcount) + message_admins("[key_name_admin(usr)] has wiped all ID computer logs.") + usr.create_log(MISC_LOG, "wiped all ID computer logs.") playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0) SSnanoui.update_uis(src) @@ -504,9 +507,16 @@ GLOBAL_VAR_INIT(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]\".") + var/reason = sanitize(copytext(input("Enter legal reason for termination. Enter nothing to cancel.", "Employment Termination"), 1, MAX_MESSAGE_LEN)) + if(!reason || !is_authenticated(usr) || !modify) + return FALSE + var/m_ckey = modify.getPlayerCkey() + var/m_ckey_text = m_ckey ? "([m_ckey])" : "(no ckey)" + log_game("[key_name(usr)] has terminated the employment of \"[modify.registered_name]\" [m_ckey_text] the \"[jobnamedata]\" for: \"[reason]\".") + message_admins("[key_name_admin(usr)] has terminated the employment of \"[modify.registered_name]\" [m_ckey_text] the \"[jobnamedata]\" for: \"[reason]\".") + usr.create_log(MISC_LOG, "terminated the employment of \"[modify.registered_name]\" [m_ckey_text] the \"[jobnamedata]\"") SSjobs.log_job_transfer(modify.registered_name, jobnamedata, "Terminated", scan.registered_name) + SSjobs.notify_dept_head(modify.rank, "[scan.registered_name] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\" for \"[reason]\".") modify.assignment = "Terminated" modify.access = list() @@ -518,16 +528,20 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) if(!job_in_department(SSjobs.GetJob(modify.rank), FALSE)) visible_message("[src]: Heads may only demote members of their own department.") return 0 - + var/reason = sanitize(copytext(input("Enter legal reason for demotion. Enter nothing to cancel.","Legal Demotion"),1,MAX_MESSAGE_LEN)) + if(!reason || !is_authenticated(usr) || !modify) + return 0 var/list/access = list() 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 (Demoted)\".") - message_admins("[key_name_admin(usr)] has demoted \"[modify.registered_name]\" the \"[jobnamedata]\" to \"Civilian (Demoted)\".") + var/m_ckey = modify.getPlayerCkey() + var/m_ckey_text = m_ckey ? "([m_ckey])" : "(no ckey)" + log_game("[key_name(usr)] has demoted \"[modify.registered_name]\" the \"[jobnamedata]\" [m_ckey_text] to \"Civilian (Demoted)\" for: \"[reason]\".") + message_admins("[key_name_admin(usr)] has demoted \"[modify.registered_name]\" the \"[jobnamedata]\" [m_ckey_text] to \"Civilian (Demoted)\" for: \"[reason]\".") + usr.create_log(MISC_LOG, "demoted \"[modify.registered_name]\" [m_ckey_text] the \"[jobnamedata]\"") SSjobs.log_job_transfer(modify.registered_name, jobnamedata, "Demoted", scan.registered_name) - + SSjobs.notify_dept_head(modify.rank, "[scan.registered_name] has demoted \"[modify.registered_name]\" the \"[jobnamedata]\" for \"[reason]\".") modify.access = access modify.rank = "Civilian" modify.assignment = "Demoted" diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 3091caa82a2..5198a97a88c 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -164,7 +164,7 @@ data["selected_pod"] = "\ref[selected_pod]" var/list/temprecords[0] for(var/datum/dna2/record/R in records) - var tempRealName = R.dna.real_name + var/tempRealName = R.dna.real_name temprecords.Add(list(list("record" = "\ref[R]", "realname" = sanitize(tempRealName)))) data["records"] = temprecords diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index e161891cdbc..366946254ea 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -298,10 +298,6 @@ else to_chat(usr, "Nano-Mob Hunter GO! game server is offline for extended maintenance. Contact your Central Command administrators for more info if desired.") - if("ToggleATC") - GLOB.atc.squelched = !GLOB.atc.squelched - to_chat(usr, "ATC traffic is now: [GLOB.atc.squelched ? "Disabled" : "Enabled"].") - SSnanoui.update_uis(src) return 1 @@ -395,8 +391,6 @@ data["shuttle"] = shuttle - data["atcSquelched"] = GLOB.atc.squelched - return data diff --git a/code/game/machinery/computer/depot.dm b/code/game/machinery/computer/depot.dm index 62c82d9bd95..f2e89923eb4 100644 --- a/code/game/machinery/computer/depot.dm +++ b/code/game/machinery/computer/depot.dm @@ -165,7 +165,7 @@ alerts_when_broken = TRUE /obj/machinery/computer/syndicate_depot/selfdestruct/get_menu(mob/user) - var menutext = {"Syndicate Depot Fusion Reactor Control
+ var/menutext = {"Syndicate Depot Fusion Reactor Control


Disable Containment Field
"} return menutext @@ -193,10 +193,6 @@ /obj/machinery/computer/syndicate_depot/shieldcontrol/New() . = ..() perimeterarea = locate(/area/syndicate_depot/perimeter) - if(istype(perimeterarea) && (GAMEMODE_IS_NUCLEAR || prob(20))) - spawn(200) - perimeterarea.perimeter_shields_up() - depotarea.perimeter_shield_status = TRUE /obj/machinery/computer/syndicate_depot/shieldcontrol/Destroy() if(istype(perimeterarea) && perimeterarea.shield_list.len) @@ -204,7 +200,7 @@ return ..() /obj/machinery/computer/syndicate_depot/shieldcontrol/get_menu(mob/user) - var menutext = {"Syndicate Depot Shield Grid Control
+ var/menutext = {"Syndicate Depot Shield Grid Control

"} menutext += {"(SYNDI-LEADER) Whole-base Shield: [perimeterarea.shield_list.len ? "ON" : "OFF"] ([perimeterarea.shield_list.len ? "Disable" : "Enable"])
"} menutext += {"(SYNDI-LEADER) Armory Shield: [depotarea.shield_list.len ? "ON" : "OFF"] ([depotarea.shield_list.len ? "Disable" : "Enable"])
"} diff --git a/code/game/machinery/computer/station_alert.dm b/code/game/machinery/computer/station_alert.dm index 607918442ea..3b4631b171a 100644 --- a/code/game/machinery/computer/station_alert.dm +++ b/code/game/machinery/computer/station_alert.dm @@ -6,48 +6,91 @@ icon_screen = "alert:0" light_color = LIGHT_COLOR_CYAN circuit = /obj/item/circuitboard/stationalert_engineering - var/datum/nano_module/alarm_monitor/alarm_monitor - var/monitor_type = /datum/nano_module/alarm_monitor/engineering + var/ui_x = 325 + var/ui_y = 500 + var/list/alarms_listend_for = list("Fire", "Atmosphere", "Power") -/obj/machinery/computer/station_alert/security - monitor_type = /datum/nano_module/alarm_monitor/security - circuit = /obj/item/circuitboard/stationalert_security - -/obj/machinery/computer/station_alert/all - monitor_type = /datum/nano_module/alarm_monitor/all - circuit = /obj/item/circuitboard/stationalert_all - -/obj/machinery/computer/station_alert/New() - ..() - alarm_monitor = new monitor_type(src) - alarm_monitor.register(src, /obj/machinery/computer/station_alert/.proc/update_icon) +/obj/machinery/computer/station_alert/Initialize(mapload) + . = ..() + GLOB.alert_consoles += src + RegisterSignal(SSalarm, COMSIG_TRIGGERED_ALARM, .proc/alarm_triggered) + RegisterSignal(SSalarm, COMSIG_CANCELLED_ALARM, .proc/alarm_cancelled) /obj/machinery/computer/station_alert/Destroy() - alarm_monitor.unregister(src) - QDEL_NULL(alarm_monitor) + GLOB.alert_consoles -= src return ..() /obj/machinery/computer/station_alert/attack_ai(mob/user) add_fingerprint(user) if(stat & (BROKEN|NOPOWER)) return - interact(user) + tgui_interact(user) /obj/machinery/computer/station_alert/attack_hand(mob/user) add_fingerprint(user) if(stat & (BROKEN|NOPOWER)) return - interact(user) + tgui_interact(user) -/obj/machinery/computer/station_alert/interact(mob/user) - alarm_monitor.ui_interact(user) +/obj/machinery/computer/station_alert/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/tgui_state/state = GLOB.tgui_default_state) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "StationAlertConsole", name, ui_x, ui_y, master_ui, state) + ui.open() + +/obj/machinery/computer/station_alert/tgui_data(mob/user) + var/list/data = list() + + data["alarms"] = list() + for(var/class in SSalarm.alarms) + if(!(class in alarms_listend_for)) + continue + data["alarms"][class] = list() + for(var/area in SSalarm.alarms[class]) + for(var/thing in SSalarm.alarms[class][area][3]) + var/atom/A = locateUID(thing) + if(atoms_share_level(A, src)) + data["alarms"][class] += area + + return data + +/obj/machinery/computer/station_alert/proc/alarm_triggered(src, class, area/A, list/O, obj/alarmsource) + if(!(class in alarms_listend_for)) + return + if(alarmsource.z != z) + return + if(stat & (BROKEN)) + return + update_icon() + +/obj/machinery/computer/station_alert/proc/alarm_cancelled(src, class, area/A, obj/origin, cleared) + if(!(class in alarms_listend_for)) + return + if(origin.z != z) + return + if(stat & (BROKEN)) + return + update_icon() /obj/machinery/computer/station_alert/update_icon() - if(alarm_monitor) - var/list/alarms = alarm_monitor.major_alarms() - if(alarms.len) - icon_screen = "alert:2" - else - icon_screen = "alert:0" + var/active_alarms = FALSE + var/list/list/temp_alarm_list = SSalarm.alarms.Copy() + for(var/cat in temp_alarm_list) + if(!(cat in alarms_listend_for)) + continue + var/list/list/L = temp_alarm_list[cat].Copy() + for(var/alarm in L) + var/list/list/alm = L[alarm].Copy() + var/list/list/sources = alm[3].Copy() + for(var/thing in sources) + var/atom/A = locateUID(thing) + if(A && A.z != z) + L -= alarm + if(length(L)) + active_alarms = TRUE + if(active_alarms) + icon_screen = "alert:2" + else + icon_screen = "alert:0" ..() diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 4213ff517bf..8be09ef30b7 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -443,6 +443,9 @@ for(var/atom/movable/A in contents - component_parts - list(beaker)) A.forceMove(get_step(loc, SOUTH)) +/obj/machinery/atmospherics/unary/cryo_cell/force_eject_occupant() + go_out() + /// Called when either the occupant is dead and the AUTO_EJECT_DEAD flag is present, OR the occupant is alive, has no external damage, and the AUTO_EJECT_HEALTHY flag is present. /obj/machinery/atmospherics/unary/cryo_cell/proc/auto_eject(eject_flag) on = FALSE diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 36196ea4eca..fecd006886e 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -302,6 +302,7 @@ // Eject dead people if(occupant.stat == DEAD) go_out() + return // Allow a gap between entering the pod and actually despawning. if(world.time - time_entered < time_till_despawn) @@ -768,9 +769,13 @@ return ..() + /proc/cryo_ssd(var/mob/living/carbon/person_to_cryo) if(istype(person_to_cryo.loc, /obj/machinery/cryopod)) return 0 + if(isobj(person_to_cryo.loc)) + var/obj/O = person_to_cryo.loc + O.force_eject_occupant() var/list/free_cryopods = list() for(var/obj/machinery/cryopod/P in GLOB.machines) if(!P.occupant && istype(get_area(P), /area/crew_quarters/sleep)) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 42ff08ff00f..d2e983b3eb3 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -142,6 +142,7 @@ About the new airlock wires panel: break /obj/machinery/door/airlock/Destroy() + SStgui.close_uis(wires) QDEL_NULL(electronics) QDEL_NULL(wires) QDEL_NULL(note) @@ -188,10 +189,6 @@ About the new airlock wires panel: return 1 return 0 -/obj/machinery/door/airlock/proc/isWireCut(wireIndex) - // You can find the wires in the datum folder. - return wires.IsIndexCut(wireIndex) - /obj/machinery/door/airlock/proc/canAIControl() return ((aiControlDisabled!=1) && (!isAllPowerLoss())) @@ -204,27 +201,21 @@ About the new airlock wires panel: return (main_power_lost_until==0 || backup_power_lost_until==0) /obj/machinery/door/airlock/requiresID() - return !(isWireCut(AIRLOCK_WIRE_IDSCAN) || aiDisabledIdScanner) + return !(wires.is_cut(WIRE_IDSCAN) || aiDisabledIdScanner) /obj/machinery/door/airlock/proc/isAllPowerLoss() if(stat & (NOPOWER|BROKEN)) return 1 - if(mainPowerCablesCut() && backupPowerCablesCut()) + if(wires.is_cut(WIRE_MAIN_POWER1) && wires.is_cut(WIRE_BACKUP_POWER1)) return 1 return 0 -/obj/machinery/door/airlock/proc/mainPowerCablesCut() - return isWireCut(AIRLOCK_WIRE_MAIN_POWER1) - -/obj/machinery/door/airlock/proc/backupPowerCablesCut() - return isWireCut(AIRLOCK_WIRE_BACKUP_POWER1) - /obj/machinery/door/airlock/proc/loseMainPower() - main_power_lost_until = mainPowerCablesCut() ? -1 : world.time + 60 SECONDS + main_power_lost_until = wires.is_cut(WIRE_MAIN_POWER1) ? -1 : world.time + 60 SECONDS if(main_power_lost_until > 0) main_power_timer = addtimer(CALLBACK(src, .proc/regainMainPower), 60 SECONDS, TIMER_UNIQUE | TIMER_STOPPABLE) // If backup power is permanently disabled then activate in 10 seconds if possible, otherwise it's already enabled or a timer is already running - if(backup_power_lost_until == -1 && !backupPowerCablesCut()) + if(backup_power_lost_until == -1 && !wires.is_cut(WIRE_BACKUP_POWER1)) backup_power_lost_until = world.time + 10 SECONDS backup_power_timer = addtimer(CALLBACK(src, .proc/regainBackupPower), 10 SECONDS, TIMER_UNIQUE | TIMER_STOPPABLE) // Disable electricity if required @@ -232,7 +223,7 @@ About the new airlock wires panel: electrify(0) /obj/machinery/door/airlock/proc/loseBackupPower() - backup_power_lost_until = backupPowerCablesCut() ? -1 : world.time + 60 SECONDS + backup_power_lost_until = wires.is_cut(WIRE_BACKUP_POWER1) ? -1 : world.time + 60 SECONDS if(backup_power_lost_until > 0) backup_power_timer = addtimer(CALLBACK(src, .proc/regainBackupPower), 60 SECONDS, TIMER_UNIQUE | TIMER_STOPPABLE) @@ -243,7 +234,7 @@ About the new airlock wires panel: /obj/machinery/door/airlock/proc/regainMainPower() main_power_timer = null - if(!mainPowerCablesCut()) + if(!wires.is_cut(WIRE_MAIN_POWER1)) main_power_lost_until = 0 // If backup power is currently active then disable, otherwise let it count down and disable itself later if(!backup_power_lost_until) @@ -253,7 +244,7 @@ About the new airlock wires panel: /obj/machinery/door/airlock/proc/regainBackupPower() backup_power_timer = null - if(!backupPowerCablesCut()) + if(!wires.is_cut(WIRE_BACKUP_POWER1)) // Restore backup power only if main power is offline, otherwise permanently disable backup_power_lost_until = main_power_lost_until == 0 ? -1 : 0 update_icon() @@ -264,7 +255,7 @@ About the new airlock wires panel: electrified_timer = null var/message = "" - if(isWireCut(AIRLOCK_WIRE_ELECTRIFY) && arePowerSystemsOn()) + if(wires.is_cut(WIRE_ELECTRIFY) && arePowerSystemsOn()) message = text("The electrification wire is cut - Door permanently electrified.") electrified_until = -1 else if(duration && !arePowerSystemsOn()) @@ -763,7 +754,7 @@ About the new airlock wires panel: var/activate = text2num(href_list["activate"]) switch(href_list["command"]) if("idscan") - if(isWireCut(AIRLOCK_WIRE_IDSCAN)) + if(wires.is_cut(WIRE_IDSCAN)) to_chat(usr, "The IdScan wire has been cut - IdScan feature permanently disabled.") else if(activate && aiDisabledIdScanner) aiDisabledIdScanner = 0 @@ -780,14 +771,14 @@ About the new airlock wires panel: loseBackupPower() update_icon() if("bolts") - if(isWireCut(AIRLOCK_WIRE_DOOR_BOLTS)) + if(wires.is_cut(WIRE_DOOR_BOLTS)) to_chat(usr, "The door bolt control wire has been cut - Door bolts permanently dropped.") else if(activate && lock()) to_chat(usr, "The door bolts have been dropped.") else if(!activate && unlock()) to_chat(usr, "The door bolts have been raised.") if("electrify_temporary") - if(activate && isWireCut(AIRLOCK_WIRE_ELECTRIFY)) + if(activate && wires.is_cut(WIRE_ELECTRIFY)) to_chat(usr, text("The electrification wire is cut - Door permanently electrified.")) else if(!activate && electrified_until != 0) to_chat(usr, "The door is now un-electrified.") @@ -799,7 +790,7 @@ About the new airlock wires panel: to_chat(usr, "The door is now electrified for thirty seconds.") electrify(30) if("electrify_permanently") - if(isWireCut(AIRLOCK_WIRE_ELECTRIFY)) + if(wires.is_cut(WIRE_ELECTRIFY)) to_chat(usr, text("The electrification wire is cut - Cannot electrify the door.")) else if(!activate && electrified_until != 0) to_chat(usr, "The door is now un-electrified.") @@ -821,7 +812,7 @@ About the new airlock wires panel: close() if("safeties") // Safeties! We don't need no stinking safeties! - if(isWireCut(AIRLOCK_WIRE_SAFETY)) + if(wires.is_cut(WIRE_SAFETY)) to_chat(usr, text("The safety wire is cut - Cannot secure the door.")) else if(activate && safe) safe = 0 @@ -829,7 +820,7 @@ About the new airlock wires panel: safe = 1 if("timing") // Door speed control - if(isWireCut(AIRLOCK_WIRE_SPEED)) + if(wires.is_cut(WIRE_SPEED)) to_chat(usr, text("The timing wire is cut - Cannot alter timing.")) else if(activate && normalspeed) normalspeed = 0 @@ -837,7 +828,7 @@ About the new airlock wires panel: normalspeed = 1 if("lights") // Bolt lights - if(isWireCut(AIRLOCK_WIRE_LIGHT)) + if(wires.is_cut(WIRE_BOLT_LIGHT)) to_chat(usr, "The bolt lights wire has been cut - The door bolt lights are permanently disabled.") else if(!activate && lights) lights = 0 @@ -1126,7 +1117,7 @@ About the new airlock wires panel: if(operating || welded || locked || emagged) return 0 if(!forced) - if(!arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR)) + if(!arePowerSystemsOn() || wires.is_cut(WIRE_OPEN_DOOR)) return 0 use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people if(forced) @@ -1163,7 +1154,7 @@ About the new airlock wires panel: if(!forced) //despite the name, this wire is for general door control. //Bolts are already covered by the check for locked, above - if(!arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR)) + if(!arePowerSystemsOn() || wires.is_cut(WIRE_OPEN_DOOR)) return if(safe) for(var/turf/turf in locs) @@ -1219,7 +1210,7 @@ About the new airlock wires panel: return if(!forced) - if(operating || !arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_DOOR_BOLTS)) + if(operating || !arePowerSystemsOn() || wires.is_cut(WIRE_DOOR_BOLTS)) return locked = 0 @@ -1314,7 +1305,7 @@ About the new airlock wires panel: stat |= BROKEN if(!panel_open) panel_open = TRUE - wires.CutAll() + wires.cut_all() update_icon() /obj/machinery/door/airlock/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) @@ -1407,6 +1398,12 @@ About the new airlock wires panel: A.name = name qdel(src) +/obj/machinery/door/airlock/proc/ai_control_callback() + if(aiControlDisabled == 1) + aiControlDisabled = 0 + else if(aiControlDisabled == 2) + aiControlDisabled = -1 + #undef AIRLOCK_CLOSED #undef AIRLOCK_CLOSING #undef AIRLOCK_OPEN diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index 9970974e4ff..36eba1a6ee5 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -86,8 +86,8 @@ Arresting Officer: [usr.name].[R ? "" : " Detainee record not found, manual record update required."]" Radio.autosay(announcetext, name, "Security", list(z)) - if(prisoner_trank != "unknown") - notify_dept_head(prisoner_trank, announcetext) + if(prisoner_trank != "unknown" && prisoner_trank != "Civilian") + SSjobs.notify_dept_head(prisoner_trank, announcetext) if(R) prisoner = R @@ -104,31 +104,6 @@ update_all_mob_security_hud() return 1 - -/obj/machinery/door_timer/proc/notify_dept_head(jobtitle, antext) - if(!jobtitle || !antext) - return - if(jobtitle == "Civilian") - // Don't notify the HoP about greytiding civilians - return - var/datum/job/brigged_job = SSjobs.GetJob(jobtitle) - if(!brigged_job) - return - if(!brigged_job.department_head[1]) - return - var/boss_title = brigged_job.department_head[1] - - var/obj/item/pda/target_pda - for(var/obj/item/pda/check_pda in GLOB.PDAs) - if(check_pda.ownrank == boss_title) - target_pda = check_pda - if(!target_pda) - return - var/datum/data/pda/app/messenger/PM = target_pda.find_program(/datum/data/pda/app/messenger) - if(PM && PM.can_receive()) - PM.notify("Message from Brig Timer (Automated), \"[antext]\" (Unable to Reply)") - - /obj/machinery/door_timer/Initialize() ..() diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 37dbdb6c9c0..c509675868b 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -28,6 +28,11 @@ var/nextstate = null var/boltslocked = TRUE var/active_alarm = FALSE + var/list/affecting_areas + +/obj/machinery/door/firedoor/Initialize(mapload) + . = ..() + CalculateAffectingAreas() /obj/machinery/door/firedoor/examine(mob/user) . = ..() @@ -40,11 +45,31 @@ else . += "The bolt locks have been unscrewed, but the bolts themselves are still wrenched to the floor." +/obj/machinery/door/firedoor/proc/CalculateAffectingAreas() + remove_from_areas() + affecting_areas = get_adjacent_open_areas(src) | get_area(src) + for(var/I in affecting_areas) + var/area/A = I + LAZYADD(A.firedoors, src) + /obj/machinery/door/firedoor/closed icon_state = "door_closed" opacity = TRUE density = TRUE +//see also turf/AfterChange for adjacency shennanigans + +/obj/machinery/door/firedoor/proc/remove_from_areas() + if(affecting_areas) + for(var/I in affecting_areas) + var/area/A = I + LAZYREMOVE(A.firedoors, src) + +/obj/machinery/door/firedoor/Destroy() + remove_from_areas() + affecting_areas.Cut() + return ..() + /obj/machinery/door/firedoor/Bumped(atom/AM) if(panel_open || operating) return diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index f12361f1664..b387f404d8c 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -25,6 +25,11 @@ FIRE ALARM active_power_usage = 6 power_channel = ENVIRON resistance_flags = FIRE_PROOF + + light_power = 0 + light_range = 7 + light_color = "#ff3232" + var/last_process = 0 var/wiresexposed = 0 var/buildstage = 2 // 2 = complete, 1 = no wires, 0 = circuit gone @@ -191,6 +196,7 @@ FIRE ALARM /obj/machinery/firealarm/obj_break(damage_flag) if(!(stat & BROKEN) && !(flags & NODECONSTRUCT) && buildstage != 0) //can't break the electronics if there isn't any inside. stat |= BROKEN + LAZYREMOVE(myArea.firealarms, src) update_icon() /obj/machinery/firealarm/deconstruct(disassembled = TRUE) @@ -203,6 +209,14 @@ FIRE ALARM new /obj/item/stack/cable_coil(loc, 3) qdel(src) +/obj/machinery/firealarm/proc/update_fire_light(fire) + if(fire == !!light_power) + return // do nothing if we're already active + if(fire) + set_light(l_power = 0.8) + else + set_light(l_power = 0) + /obj/machinery/firealarm/process()//Note: this processing was mostly phased out due to other code, and only runs when needed if(stat & (NOPOWER|BROKEN)) return @@ -286,26 +300,16 @@ FIRE ALARM time = min(max(round(time), 0), 120) /obj/machinery/firealarm/proc/reset() - if(!working) + if(!working || !report_fire_alarms) return var/area/A = get_area(src) - A.fire_reset() + A.firereset(src) - for(var/obj/machinery/firealarm/FA in A) - if(is_station_contact(z) && FA.report_fire_alarms) - SSalarms.fire_alarm.clearAlarm(loc, FA) - -/obj/machinery/firealarm/proc/alarm(var/duration = 0) - if(!working) +/obj/machinery/firealarm/proc/alarm() + if(!working || !report_fire_alarms) return - var/area/A = get_area(src) - for(var/obj/machinery/firealarm/FA in A) - if(is_station_contact(z) && FA.report_fire_alarms) - SSalarms.fire_alarm.triggerAlarm(loc, FA, duration) - else - A.fire_alert() // Manually trigger alarms if the alarm isn't reported - + A.firealert(src) // Manually trigger alarms if the alarm isn't reported update_icon() /obj/machinery/firealarm/New(location, direction, building) @@ -323,8 +327,14 @@ FIRE ALARM else overlays += image('icons/obj/monitors.dmi', "overlay_green") + myArea = get_area(src) + LAZYADD(myArea.firealarms, src) update_icon() +/obj/machinery/firealarm/Destroy() + LAZYREMOVE(myArea.firealarms, src) + return ..() + /* FIRE ALARM CIRCUIT Just a object used in constructing fire alarms diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index 82b473b50f0..6fb34254f3a 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -1,15 +1,17 @@ +#define RECHARGER_POWER_USAGE_GUN 250 +#define RECHARGER_POWER_USAGE_MISC 200 + /obj/machinery/recharger name = "recharger" icon = 'icons/obj/stationobjs.dmi' icon_state = "recharger0" desc = "A charging dock for energy based weaponry." - anchored = 1 + anchored = TRUE use_power = IDLE_POWER_USE idle_power_usage = 4 active_power_usage = 200 pass_flags = PASSTABLE - var/obj/item/charging = null - var/using_power = FALSE + var/list/allowed_devices = list(/obj/item/gun/energy, /obj/item/melee/baton, /obj/item/modular_computer, /obj/item/rcs, /obj/item/bodyanalyzer) var/icon_state_off = "rechargeroff" var/icon_state_charged = "recharger2" @@ -17,6 +19,9 @@ var/icon_state_idle = "recharger0" var/recharge_coeff = 1 + var/obj/item/charging = null // The item that is being charged + var/using_power = FALSE // Whether the recharger is actually transferring power or not, used for icon + /obj/machinery/recharger/New() ..() component_parts = list() @@ -34,32 +39,32 @@ if(allowed) if(anchored) if(charging) - return 1 + return TRUE //Checks to make sure he's not in space doing it, and that the area got proper power. var/area/a = get_area(src) - if(!isarea(a) || a.power_equip == 0) + if(!isarea(a) || !a.power_equip) to_chat(user, "[src] blinks red as you try to insert [G].") - return 1 + return TRUE if(istype(G, /obj/item/gun/energy)) var/obj/item/gun/energy/E = G if(!E.can_charge) to_chat(user, "Your gun has no external power connector.") - return 1 + return TRUE if(!user.drop_item()) - return 1 + return TRUE G.forceMove(src) charging = G use_power = ACTIVE_POWER_USE + using_power = check_cell_needs_recharging(get_cell_from(G)) update_icon() else to_chat(user, "[src] isn't connected to anything!") - return 1 + return TRUE return ..() - /obj/machinery/recharger/crowbar_act(mob/user, obj/item/I) if(panel_open && !charging && default_deconstruction_crowbar(user, I)) return TRUE @@ -106,57 +111,15 @@ if(stat & (NOPOWER|BROKEN) || !anchored) return - using_power = FALSE - if(charging) - if(istype(charging, /obj/item/gun/energy)) - var/obj/item/gun/energy/E = charging - if(E.cell.charge < E.cell.maxcharge) - E.cell.give(E.cell.chargerate * recharge_coeff) - E.on_recharge() - use_power(250) - using_power = TRUE - - - if(istype(charging, /obj/item/melee/baton)) - var/obj/item/melee/baton/B = charging - if(B.cell) - if(B.cell.give(B.cell.chargerate)) - use_power(200) - using_power = TRUE - - if(istype(charging, /obj/item/modular_computer)) - var/obj/item/modular_computer/C = charging - var/obj/item/computer_hardware/battery/battery_module = C.all_components[MC_CELL] - if(battery_module) - var/obj/item/computer_hardware/battery/B = battery_module - if(B.battery) - if(B.battery.charge < B.battery.maxcharge) - B.battery.give(B.battery.chargerate) - use_power(200) - using_power = TRUE - - if(istype(charging, /obj/item/rcs)) - var/obj/item/rcs/R = charging - if(R.rcell) - if(R.rcell.give(R.rcell.chargerate)) - use_power(200) - using_power = TRUE - - if(istype(charging, /obj/item/bodyanalyzer)) - var/obj/item/bodyanalyzer/B = charging - if(B.cell) - if(B.cell.give(B.cell.chargerate)) - use_power(200) - using_power = TRUE - - update_icon(using_power) + using_power = try_recharging_if_possible() + update_icon() /obj/machinery/recharger/emp_act(severity) if(stat & (NOPOWER|BROKEN) || !anchored) ..(severity) return - if(istype(charging, /obj/item/gun/energy)) + if(istype(charging, /obj/item/gun/energy)) var/obj/item/gun/energy/E = charging if(E.cell) E.cell.emp_act(severity) @@ -167,7 +130,11 @@ B.cell.charge = 0 ..(severity) -/obj/machinery/recharger/update_icon(using_power = FALSE) //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier. +/obj/machinery/recharger/power_change() + ..() + update_icon() + +/obj/machinery/recharger/update_icon() //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier. if(stat & (NOPOWER|BROKEN) || !anchored) icon_state = icon_state_off return @@ -179,6 +146,55 @@ return icon_state = icon_state_idle +/obj/machinery/recharger/proc/get_cell_from(obj/item/I) + if(istype(I, /obj/item/gun/energy)) + var/obj/item/gun/energy/E = I + return E.cell + + if(istype(I, /obj/item/melee/baton)) + var/obj/item/melee/baton/B = I + return B.cell + + if(istype(I, /obj/item/modular_computer)) + var/obj/item/modular_computer/C = I + var/obj/item/computer_hardware/battery/B = C.all_components[MC_CELL] + if(B) + return B.battery + + if(istype(I, /obj/item/rcs)) + var/obj/item/rcs/R = I + return R.rcell + + if(istype(I, /obj/item/bodyanalyzer)) + var/obj/item/bodyanalyzer/B = I + return B.cell + + return null + +/obj/machinery/recharger/proc/check_cell_needs_recharging(obj/item/stock_parts/cell/C) + if(!C || C.charge >= C.maxcharge) + return FALSE + return TRUE + +/obj/machinery/recharger/proc/recharge_cell(obj/item/stock_parts/cell/C, power_usage) + C.give(C.chargerate * recharge_coeff) + use_power(power_usage) + +/obj/machinery/recharger/proc/try_recharging_if_possible() + var/obj/item/stock_parts/cell/C = get_cell_from(charging) + if(!check_cell_needs_recharging(C)) + return FALSE + + if(istype(charging, /obj/item/gun/energy)) + recharge_cell(C, RECHARGER_POWER_USAGE_GUN) + + var/obj/item/gun/energy/E = charging + E.on_recharge() + else + recharge_cell(C, RECHARGER_POWER_USAGE_MISC) + + return TRUE + /obj/machinery/recharger/examine(mob/user) . = ..() if(charging && (!in_range(user, src) && !issilicon(user) && !isobserver(user))) @@ -204,3 +220,6 @@ icon_state_idle = "wrecharger0" icon_state_charging = "wrecharger1" icon_state_charged = "wrecharger2" + +#undef RECHARGER_POWER_USAGE_GUN +#undef RECHARGER_POWER_USAGE_MISC diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index e4e37ae1bcb..56019d22f7c 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -8,7 +8,7 @@ layer = MOB_LAYER+1 // Overhead anchored = 1 density = 1 - damage_deflection = 10 + damage_deflection = 15 var/safety_mode = 0 // Temporarily stops machine if it detects a mob var/icon_name = "grinder-o" var/blood = 0 @@ -92,7 +92,6 @@ if(AM) Bumped(AM) - /obj/machinery/recycler/Bumped(atom/movable/AM) if(stat & (BROKEN|NOPOWER)) diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index da4df4f8382..822c4af3e1a 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -255,6 +255,7 @@ occupant_typecache = typecacheof(occupant_typecache) /obj/machinery/suit_storage_unit/Destroy() + SStgui.close_uis(wires) QDEL_NULL(suit) QDEL_NULL(helmet) QDEL_NULL(mask) @@ -740,10 +741,11 @@ if(!occupant) return - if(user != occupant) - to_chat(occupant, "The machine kicks you out!") - if(user.loc != loc) - to_chat(occupant, "You leave the not-so-cozy confines of the SSU.") + if(user) + if(user != occupant) + to_chat(occupant, "The machine kicks you out!") + if(user.loc != loc) + to_chat(occupant, "You leave the not-so-cozy confines of [src].") occupant.forceMove(loc) occupant = null if(!state_open) @@ -751,6 +753,8 @@ update_icon() return +/obj/machinery/suit_storage_unit/force_eject_occupant() + eject_occupant() /obj/machinery/suit_storage_unit/verb/get_out() set name = "Eject Suit Storage Unit" @@ -799,3 +803,7 @@ /obj/machinery/suit_storage_unit/attack_ai(mob/user as mob) return attack_hand(user) + +/obj/machinery/suit_storage_unit/proc/check_electrified_callback() + if(!wires.is_cut(WIRE_ELECTRIFY)) + shocked = FALSE diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index 181d5e494da..2a476c215ef 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -91,6 +91,7 @@ ..() /obj/machinery/syndicatebomb/Destroy() + SStgui.close_uis(wires) QDEL_NULL(wires) QDEL_NULL(countdown) STOP_PROCESSING(SSfastprocess, src) @@ -174,7 +175,7 @@ . = TRUE if(!I.use_tool(src, user, 0, volume = I.tool_volume)) return - if(open_panel && wires.IsAllCut()) + if(open_panel && wires.is_all_cut()) if(payload) to_chat(user, "You carefully pry out [payload].") payload.loc = user.loc @@ -188,7 +189,7 @@ /obj/machinery/syndicatebomb/welder_act(mob/user, obj/item/I) . = TRUE - if(payload || !wires.IsAllCut() || !open_panel) + if(payload || !wires.is_all_cut() || !open_panel) return if(!I.tool_use_check(user, 0)) return @@ -264,9 +265,6 @@ investigate_log("[key_name(user)] has has primed a [name] ([payload]) for detonation at [A.name] [COORD(bombturf)]", INVESTIGATE_BOMB) payload.adminlog = "\The [src] that [key_name(user)] had primed detonated!" -/obj/machinery/syndicatebomb/proc/isWireCut(var/index) - return wires.IsIndexCut(index) - ///Bomb Subtypes/// /obj/machinery/syndicatebomb/training @@ -297,7 +295,7 @@ /obj/machinery/syndicatebomb/empty/New() ..() - wires.CutAll() + wires.cut_all() /obj/machinery/syndicatebomb/self_destruct name = "self destruct device" @@ -368,7 +366,7 @@ var/obj/machinery/syndicatebomb/holder = loc if(istype(holder)) if(holder.wires) - holder.wires.Shuffle() + holder.wires.shuffle_wires() holder.defused = 0 holder.open_panel = 0 holder.delayedbig = FALSE diff --git a/code/game/machinery/tcomms/_base.dm b/code/game/machinery/tcomms/_base.dm index 05c7552aacc..c3531c7f674 100644 --- a/code/game/machinery/tcomms/_base.dm +++ b/code/game/machinery/tcomms/_base.dm @@ -106,23 +106,37 @@ GLOBAL_LIST_EMPTY(tcomms_machines) /** - * Start of Ion Anomalie Event + * Start of Ion Anomaly Event * - * Proc to easily start an Ion Anomalie's effects, and update the icon + * Proc to easily start an Ion Anomaly's effects, and update the icon */ /obj/machinery/tcomms/proc/start_ion() ion = TRUE update_icon() /** - * End of Ion Anomalie Event + * End of Ion Anomaly Event * - * Proc to easily stop an Ion Anomalie's effects, and update the icon + * Proc to easily stop an Ion Anomaly's effects, and update the icon */ /obj/machinery/tcomms/proc/end_ion() ion = FALSE update_icon() +/** + * Z-Level transit change helper + * + * Proc to make sure you cant have two of these active on a Z-level at once. It also makes sure to update the linkage + */ +/obj/machinery/tcomms/onTransitZ(old_z, new_z) + . = ..() + if(active) + active = FALSE + // This needs a timer because otherwise its on the shuttle Z and the message is missed + addtimer(CALLBACK(src, /atom.proc/visible_message, "Radio equipment on [src] has been overloaded by heavy bluespace interference. Please restart the machine."), 5) + update_icon() + + /** * Logging helper * diff --git a/code/game/machinery/tcomms/core.dm b/code/game/machinery/tcomms/core.dm index 46cd0e6df71..622ce2e2b9f 100644 --- a/code/game/machinery/tcomms/core.dm +++ b/code/game/machinery/tcomms/core.dm @@ -14,6 +14,8 @@ name = "Telecommunications Core" desc = "A large rack full of communications equipment. Looks important." icon_state = "core" + // This starts as off so you cant make cores as hot spares + active = FALSE /// The NTTC config for this device var/datum/nttc_configuration/nttc = new() /// List of all reachable devices @@ -35,6 +37,11 @@ link_password = GenerateKey() reachable_zlevels |= loc.z component_parts += new /obj/item/circuitboard/tcomms/core(null) + if(check_power_on()) + active = TRUE + else + visible_message("Error: Another core is already active in this sector. Power-up cancelled due to radio interference.") + update_icon() /** * Destructor for the core. @@ -121,6 +128,38 @@ reachable_zlevels |= R.loc.z +/** + * Z-Level transit change helper + * + * Handles parent call of disabling the machine if it changes Z-level, but also rebuilds the list of reachable levels + */ +/obj/machinery/tcomms/core/onTransitZ(old_z, new_z) + . = ..() + refresh_zlevels() + +/** + * Power-on checker + * + * Checks the z-level to see if an existing core is already powered on, and deny this one turning on if there is one. Returns TRUE if it can power on, or FALSE if it cannot + */ +/obj/machinery/tcomms/core/proc/check_power_on() + // Cancel if we are already on + if(active) + return TRUE + + for(var/obj/machinery/tcomms/core/C in GLOB.tcomms_machines) + // Make sure we dont check ourselves + if(C == src) + continue + // We dont care about ones on other zlevels + if(!atoms_share_level(C, src)) + continue + // If another core is active, return FALSE + if(C.active) + return FALSE + // If we got here there isnt an active core on this Z-level. So return true + return TRUE + ////////////// // UI STUFF // ////////////// @@ -198,8 +237,11 @@ if(ui_tab == UI_TAB_CONFIG) // All the toggle on/offs go here if(href_list["toggle_active"]) - active = !active - update_icon() + if(check_power_on()) + active = !active + update_icon() + else + to_chat(usr, "Error: Another core is already active in this sector. Power-up cancelled due to radio interference.") // NTTC Toggles if(href_list["nttc_toggle_jobs"]) nttc.toggle_jobs = !nttc.toggle_jobs diff --git a/code/game/machinery/tcomms/relay.dm b/code/game/machinery/tcomms/relay.dm index b2faf9ce0cd..bf5e6e21a9c 100644 --- a/code/game/machinery/tcomms/relay.dm +++ b/code/game/machinery/tcomms/relay.dm @@ -9,6 +9,8 @@ name = "Telecommunications Relay" desc = "A large device with several radio antennas on it." icon_state = "relay" + // This starts as off so you cant make cores as hot spares + active = FALSE /// The host core for this relay var/obj/machinery/tcomms/core/linked_core /// ID of the hub to auto link to @@ -26,6 +28,11 @@ /obj/machinery/tcomms/relay/Initialize(mapload) . = ..() component_parts += new /obj/item/circuitboard/tcomms/relay(null) + if(check_power_on()) + active = TRUE + else + visible_message("Error: Another relay is already active in this sector. Power-up cancelled due to radio interference.") + update_icon() if(mapload && autolink_id) return INITIALIZE_HINT_LATELOAD @@ -51,6 +58,40 @@ // Only ONE of these with one ID should exist per world break +/** + * Z-Level transit change helper + * + * Handles parent call of disabling the machine if it changes Z-level, but also rebuilds the list of reachable levels on the linked core + */ +/obj/machinery/tcomms/relay/onTransitZ(old_z, new_z) + . = ..() + if(linked_core) + linked_core.refresh_zlevels() + + +/** + * Power-on checker + * + * Checks the z-level to see if an existing relay is already powered on, and deny this one turning on if there is one. Returns TRUE if it can power on, or FALSE if it cannot + */ +/obj/machinery/tcomms/relay/proc/check_power_on() + // Cancel if we are already on + if(active) + return TRUE + + for(var/obj/machinery/tcomms/relay/R in GLOB.tcomms_machines) + // Make sure we dont check ourselves + if(R == src) + continue + // We dont care about ones on other zlevels + if(!atoms_share_level(R, src)) + continue + // If another relay is active, return FALSE + if(R.active) + return FALSE + // If we got here there isnt an active relay on this Z-level. So return TRUE + return TRUE + /** * Proc to link the relay to the core. * @@ -83,9 +124,9 @@ * Proc which ensures the host core has its zlevels updated (icons are updated by parent call) */ /obj/machinery/tcomms/relay/power_change() - ..() - if(linked_core) - linked_core.refresh_zlevels() + ..() + if(linked_core) + linked_core.refresh_zlevels() ////////////// // UI STUFF // @@ -127,10 +168,13 @@ // All the toggle on/offs go here if(href_list["toggle_active"]) - active = !active - update_icon() - if(linked_core) - linked_core.refresh_zlevels() + if(check_power_on()) + active = !active + update_icon() + if(linked_core) + linked_core.refresh_zlevels() + else + to_chat(usr, "Error: Another relay is already active in this sector. Power-up cancelled due to radio interference.") // Set network ID if(href_list["network_id"]) diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index b92e3c78bb8..59bae3174c4 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -79,7 +79,7 @@ /obj/machinery/computer/teleporter/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.default_state) var/data[0] data["powerstation"] = power_station - if(power_station) + if(power_station?.teleporter_hub) data["teleporterhub"] = power_station.teleporter_hub data["calibrated"] = power_station.teleporter_hub.calibrated data["accurate"] = power_station.teleporter_hub.accurate diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm index cc9fc3e4666..18abeba7400 100644 --- a/code/game/machinery/transformer.dm +++ b/code/game/machinery/transformer.dm @@ -6,17 +6,45 @@ layer = MOB_LAYER+1 // Overhead anchored = 1 density = 1 - var/transform_dead = 0 - var/transform_standing = 0 - var/cooldown_duration = 600 // 1 minute - var/cooldown = 0 - var/robot_cell_charge = 5000 + /// TRUE if the factory can transform dead mobs. + var/transform_dead = TRUE + /// TRUE if the mob can be standing and still be transformed. + var/transform_standing = TRUE + /// Cooldown between each transformation, in deciseconds. + var/cooldown_duration = 1 MINUTES + /// If the factory is currently on cooldown from its last transformation. + var/is_on_cooldown = FALSE + /// The type of cell that newly created borgs get. + var/robot_cell_type = /obj/item/stock_parts/cell/high/plus + /// The direction that mobs must moving in to get transformed. var/acceptdir = EAST + /// The AI who placed this factory. + var/mob/living/silicon/ai/masterAI -/obj/machinery/transformer/New() - // On us - ..() - new /obj/machinery/conveyor/auto(loc, WEST) +/obj/machinery/transformer/Initialize(mapload, mob/living/silicon/ai/_ai = null) + . = ..() + if(_ai) + masterAI = _ai + initialize_belts() + +/// Used to create all of the belts the transformer will be using. All belts should be pushing `WEST`. +/obj/machinery/transformer/proc/initialize_belts() + var/turf/T = get_turf(src) + if(!T) + return + + // Belt under the factory. + new /obj/machinery/conveyor/auto(T, WEST) + + // Get the turf 1 tile to the EAST. + var/turf/east = locate(T.x + 1, T.y, T.z) + if(istype(east, /turf/simulated/floor)) + new /obj/machinery/conveyor/auto(east, WEST) + + // Get the turf 1 tile to the WEST. + var/turf/west = locate(T.x - 1, T.y, T.z) + if(istype(west, /turf/simulated/floor)) + new /obj/machinery/conveyor/auto(west, WEST) /obj/machinery/transformer/power_change() ..() @@ -24,7 +52,7 @@ /obj/machinery/transformer/update_icon() ..() - if(stat & (BROKEN|NOPOWER) || cooldown == 1) + if(is_on_cooldown || stat & (BROKEN|NOPOWER)) icon_state = "separator-AO0" else icon_state = initial(icon_state) @@ -35,120 +63,76 @@ C.setDir(newdir) acceptdir = turn(newdir, 180) -/obj/machinery/transformer/Bumped(var/atom/movable/AM) +/// Resets `is_on_cooldown` to `FALSE` and updates our icon. Used in a callback after the transformer does a transformation. +/obj/machinery/transformer/proc/reset_cooldown() + is_on_cooldown = FALSE + update_icon() - if(cooldown == 1) +/obj/machinery/transformer/Bumped(atom/movable/AM) + // They have to be human to be transformed. + if(is_on_cooldown || !ishuman(AM)) return - // Crossed didn't like people lying down. - if(ishuman(AM)) - // Only humans can enter from the west side, while lying down. - var/move_dir = get_dir(loc, AM.loc) - var/mob/living/carbon/human/H = AM - if((transform_standing || H.lying) && move_dir == acceptdir)// || move_dir == WEST) - AM.loc = src.loc - do_transform(AM) + var/mob/living/carbon/human/H = AM + var/move_dir = get_dir(loc, H.loc) -/obj/machinery/transformer/proc/do_transform(var/mob/living/carbon/human/H) - if(stat & (BROKEN|NOPOWER)) - return - if(cooldown == 1) + if((transform_standing || H.lying) && move_dir == acceptdir) + H.forceMove(drop_location()) + do_transform(H) + +/// Transforms a human mob into a cyborg, connects them to the malf AI which placed the factory. +/obj/machinery/transformer/proc/do_transform(mob/living/carbon/human/H) + if(is_on_cooldown || stat & (BROKEN|NOPOWER)) return if(!transform_dead && H.stat == DEAD) - playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0) + playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, 0) return - playsound(src.loc, 'sound/items/welder.ogg', 50, 1) - H.emote("scream") // It is painful - H.adjustBruteLoss(max(0, 80 - H.getBruteLoss())) // Hurt the human, don't try to kill them though. - - // Sleep for a couple of ticks to allow the human to see the pain - sleep(5) - + playsound(loc, 'sound/items/welder.ogg', 50, 1) use_power(5000) // Use a lot of power. - var/mob/living/silicon/robot/R = H.Robotize(1) // Delete the items or they'll all pile up in a single tile and lag - - R.cell.maxcharge = robot_cell_charge - R.cell.charge = robot_cell_charge - - // So he can't jump out the gate right away. - R.lockcharge = !R.lockcharge - spawn(50) - playsound(src.loc, 'sound/machines/ping.ogg', 50, 0) - sleep(30) - if(R) - R.lockcharge = !R.lockcharge - R.notify_ai(1) // Activate the cooldown - cooldown = 1 + is_on_cooldown = TRUE update_icon() - spawn(cooldown_duration) - cooldown = 0 - update_icon() - -/obj/machinery/transformer/conveyor/New() - ..() - var/turf/T = loc - if(T) - // Spawn Conveyour Belts - - //East - var/turf/east = locate(T.x + 1, T.y, T.z) - if(istype(east, /turf/simulated/floor)) - new /obj/machinery/conveyor/auto(east, WEST) - - // West - var/turf/west = locate(T.x - 1, T.y, T.z) - if(istype(west, /turf/simulated/floor)) - new /obj/machinery/conveyor/auto(west, WEST) + addtimer(CALLBACK(src, .proc/reset_cooldown), cooldown_duration) + addtimer(CALLBACK(null, .proc/playsound, loc, 'sound/machines/ping.ogg', 50, 0), 3 SECONDS) + H.emote("scream") + if(!masterAI) // If the factory was placed via admin spawning or other means, it wont have an owner_AI. + H.Robotize(robot_cell_type) + return + var/mob/living/silicon/robot/R = H.Robotize(robot_cell_type, FALSE, masterAI) + if(R.mind && !R.client && !R.grab_ghost()) // Make sure this is an actual player first and not just a humanized monkey or something. + message_admins("[key_name_admin(R)] was just transformed by a borg factory, but they were SSD. Polling ghosts for a replacement.") + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a malfunctioning cyborg?", ROLE_TRAITOR, poll_time = 15 SECONDS) + if(!length(candidates)) + return + var/mob/dead/observer/O = pick(candidates) + R.key= O.key /obj/machinery/transformer/mime name = "Mimetech Greyscaler" desc = "Turns anything placed inside black and white." - -/obj/machinery/transformer/mime/conveyor/New() - ..() - var/turf/T = loc - if(T) - // Spawn Conveyour Belts - - //East - var/turf/east = locate(T.x + 1, T.y, T.z) - if(istype(east, /turf/simulated/floor)) - new /obj/machinery/conveyor/auto(east, WEST) - - // West - var/turf/west = locate(T.x - 1, T.y, T.z) - if(istype(west, /turf/simulated/floor)) - new /obj/machinery/conveyor/auto(west, WEST) - -/obj/machinery/transformer/mime/Bumped(var/atom/movable/AM) - - if(cooldown == 1) +/obj/machinery/transformer/mime/Bumped(atom/movable/AM) + if(is_on_cooldown) return // Crossed didn't like people lying down. - if(isatom(AM)) - AM.loc = src.loc + if(istype(AM)) + AM.forceMove(drop_location()) do_transform_mime(AM) else to_chat(AM, "Only items can be greyscaled.") return -/obj/machinery/transformer/proc/do_transform_mime(var/obj/item/I) - if(stat & (BROKEN|NOPOWER)) - return - if(cooldown == 1) +/obj/machinery/transformer/proc/do_transform_mime(obj/item/I) + if(is_on_cooldown || stat & (BROKEN|NOPOWER)) return - playsound(src.loc, 'sound/items/welder.ogg', 50, 1) - // Sleep for a couple of ticks to allow the human to see the pain - sleep(5) + playsound(loc, 'sound/items/welder.ogg', 50, 1) use_power(5000) // Use a lot of power. var/icon/newicon = new(I.icon, I.icon_state) @@ -156,42 +140,27 @@ I.icon = newicon // Activate the cooldown - cooldown = 1 + is_on_cooldown = TRUE update_icon() - spawn(cooldown_duration) - cooldown = 0 - update_icon() + addtimer(CALLBACK(src, .proc/reset_cooldown), cooldown_duration) /obj/machinery/transformer/xray name = "Automatic X-Ray 5000" desc = "A large metalic machine with an entrance and an exit. A sign on the side reads, 'backpack go in, backpack come out', 'human go in, irradiated human come out'." + acceptdir = WEST -/obj/machinery/transformer/xray/Initialize(mapload) - . = ..() - // On us - new /obj/machinery/conveyor/auto(loc, EAST) - -/obj/machinery/transformer/xray/conveyor/New() - ..() - var/turf/T = loc +/obj/machinery/transformer/xray/initialize_belts() + var/turf/T = get_turf(src) if(T) - // Spawn Conveyour Belts + // This handles the belt under the transformer and 1 tile to the left and right. + . = ..() - //East - var/turf/east = locate(T.x + 1, T.y, T.z) - if(istype(east, /turf/simulated/floor)) - new /obj/machinery/conveyor/auto(east, EAST) - //East2 + // Get the turf 2 tiles to the EAST. var/turf/east2 = locate(T.x + 2, T.y, T.z) if(istype(east2, /turf/simulated/floor)) new /obj/machinery/conveyor/auto(east2, EAST) - // West - var/turf/west = locate(T.x - 1, T.y, T.z) - if(istype(west, /turf/simulated/floor)) - new /obj/machinery/conveyor/auto(west, EAST) - - // West2 + // Get the turf 2 tiles to the WEST. var/turf/west2 = locate(T.x - 2, T.y, T.z) if(istype(west2, /turf/simulated/floor)) new /obj/machinery/conveyor/auto(west2, EAST) @@ -207,30 +176,30 @@ else icon_state = initial(icon_state) -/obj/machinery/transformer/xray/Bumped(var/atom/movable/AM) - - if(cooldown == 1) +/obj/machinery/transformer/xray/Bumped(atom/movable/AM) + if(is_on_cooldown) return // Crossed didn't like people lying down. if(ishuman(AM)) // Only humans can enter from the west side, while lying down. - var/move_dir = get_dir(loc, AM.loc) var/mob/living/carbon/human/H = AM - if(H.lying && move_dir == WEST)// || move_dir == WEST) - AM.loc = src.loc - irradiate(AM) + var/move_dir = get_dir(loc, H.loc) - else if(isatom(AM)) - AM.loc = src.loc + if(H.lying && move_dir == acceptdir) + H.forceMove(drop_location()) + irradiate(H) + + else if(istype(AM)) + AM.forceMove(drop_location()) scan(AM) -/obj/machinery/transformer/xray/proc/irradiate(var/mob/living/carbon/human/H) +/obj/machinery/transformer/xray/proc/irradiate(mob/living/carbon/human/H) if(stat & (BROKEN|NOPOWER)) return flick("separator-AO0",src) - playsound(src.loc, 'sound/effects/alert.ogg', 50, 0) + playsound(loc, 'sound/effects/alert.ogg', 50, 0) sleep(5) H.apply_effect((rand(150,200)),IRRADIATE,0) if(prob(5)) @@ -242,15 +211,15 @@ domutcheck(H,null,1) -/obj/machinery/transformer/xray/proc/scan(var/obj/item/I) +/obj/machinery/transformer/xray/proc/scan(obj/item/I) if(scan_rec(I)) - playsound(src.loc, 'sound/effects/alert.ogg', 50, 0) + playsound(loc, 'sound/effects/alert.ogg', 50, 0) flick("separator-AO0",src) else - playsound(src.loc, 'sound/machines/ping.ogg', 50, 0) + playsound(loc, 'sound/machines/ping.ogg', 50, 0) sleep(30) -/obj/machinery/transformer/xray/proc/scan_rec(var/obj/item/I) +/obj/machinery/transformer/xray/proc/scan_rec(obj/item/I) if(istype(I, /obj/item/gun)) return TRUE if(istype(I, /obj/item/transfer_valve)) diff --git a/code/game/machinery/turntable.dm b/code/game/machinery/turntable.dm deleted file mode 100644 index 70d7adff2be..00000000000 --- a/code/game/machinery/turntable.dm +++ /dev/null @@ -1,280 +0,0 @@ -/sound/turntable/test - file = 'sound/turntable/testloop1.ogg' - falloff = 2 - repeat = 1 - -/mob/var/music = 0 - -/obj/machinery/party/turntable - name = "turntable" - desc = "A turntable used for parties and shit." - icon = 'icons/effects/lasers2.dmi' - icon_state = "turntable" - var/playing = 0 - anchored = 1 - -/obj/machinery/party/mixer - name = "mixer" - desc = "A mixing board for mixing music" - icon = 'icons/effects/lasers2.dmi' - icon_state = "mixer" - anchored = 1 - - -/obj/machinery/party/turntable/New() - ..() - sleep(2) - new /sound/turntable/test(src) - return - -/obj/machinery/party/turntable/attack_hand(mob/user as mob) - - var/t = "Turntable Interface

" - //t += "On
" - t += "Off

" - t += "One
" - t += "TestLoop2
" - t += "TestLoop3
" - - user << browse(t, "window=turntable;size=420x700") - - -/obj/machinery/party/turntable/Topic(href, href_list) - ..() - if( href_list["on1"] ) - if(src.playing == 0) -// to_chat(world, "Should be working...") - var/sound/S = sound('sound/turntable/testloop1.ogg') - S.repeat = 1 - S.channel = 10 - S.falloff = 2 - S.wait = 1 - S.environment = 0 - //for(var/mob/M in world) - // if(M.loc.loc == src.loc.loc && M.music == 0) -// to_chat(world, "Found the song...") -// M << S - // M.music = 1 - var/area/A = src.loc.loc - - for(var/obj/machinery/party/lasermachine/L in A) - L.turnon() - playing = 1 - while(playing == 1) - for(var/mob/M in world) - if((M.loc.loc in A) && M.music == 0) -// to_chat(world, "Found the song...") - M << S - M.music = 1 - else if(!(M.loc.loc in A) && M.music == 1) - var/sound/Soff = sound(null) - Soff.channel = 10 - M << Soff - M.music = 0 - sleep(10) - return - if( href_list["on2"] ) - if(src.playing == 0) -// to_chat(world, "Should be working...") - var/sound/S = sound('sound/turntable/testloop2.ogg') - S.repeat = 1 - S.channel = 10 - S.falloff = 2 - S.wait = 1 - S.environment = 0 - //for(var/mob/M in world) - // if(M.loc.loc == src.loc.loc && M.music == 0) -// to_chat(world, "Found the song...") -// M << S - // M.music = 1 - var/area/A = src.loc.loc - for(var/obj/machinery/party/lasermachine/L in A) - L.turnon() - playing = 1 - while(playing == 1) - for(var/mob/M in world) - if(M.loc.loc == src.loc.loc && M.music == 0) -// to_chat(world, "Found the song...") - M << S - M.music = 1 - else if(M.loc.loc != src.loc.loc && M.music == 1) - var/sound/Soff = sound(null) - Soff.channel = 10 - M << Soff - M.music = 0 - sleep(10) - return - if( href_list["on3"] ) - if(src.playing == 0) -// to_chat(world, "Should be working...") - var/sound/S = sound('sound/turntable/testloop3.ogg') - S.repeat = 1 - S.channel = 10 - S.falloff = 2 - S.wait = 1 - S.environment = 0 - //for(var/mob/M in world) - // if(M.loc.loc == src.loc.loc && M.music == 0) -// to_chat(world, "Found the song...") -// M << S - // M.music = 1 - var/area/A = src.loc.loc - for(var/obj/machinery/party/lasermachine/L in A) - L.turnon() - playing = 1 - while(playing == 1) - for(var/mob/M in world) - if(M.loc.loc == src.loc.loc && M.music == 0) -// to_chat(world, "Found the song...") - M << S - M.music = 1 - else if(M.loc.loc != src.loc.loc && M.music == 1) - var/sound/Soff = sound(null) - Soff.channel = 10 - M << Soff - M.music = 0 - sleep(10) - return - - - if( href_list["off"] ) - if(src.playing == 1) - var/sound/S = sound(null) - S.channel = 10 - S.wait = 1 - for(var/mob/M in world) - M << S - M.music = 0 - playing = 0 - var/area/A = src.loc.loc - for(var/obj/machinery/party/lasermachine/L in A) - L.turnoff() - - - -/obj/machinery/party/lasermachine - name = "laser machine" - desc = "A laser machine that shoots lasers." - icon = 'icons/effects/lasers2.dmi' - icon_state = "lasermachine" - anchored = 1 - var/mirrored = 0 - -/obj/effect/turntable_laser - name = "laser" - desc = "A laser..." - icon = 'icons/effects/lasers2.dmi' - icon_state = "laserred1" - anchored = 1 - layer = 4 - -/obj/item/lasermachine/New() - ..() - -/obj/machinery/party/lasermachine/proc/turnon() - var/wall = 0 - var/cycle = 1 - var/area/A = get_area(src) - var/X = 1 - var/Y = 0 - if(mirrored == 0) - while(wall == 0) - if(cycle == 1) - var/obj/effect/turntable_laser/F = new(src) - F.x = src.x+X - F.y = src.y+Y - F.z = src.z - F.icon_state = "laserred1" - var/area/AA = get_area(F) - var/turf/T = get_turf(F) - if(T.density == 1 || AA.name != A.name) - qdel(F) - return - cycle++ - if(cycle > 3) - cycle = 1 - X++ - if(cycle == 2) - var/obj/effect/turntable_laser/F = new(src) - F.x = src.x+X - F.y = src.y+Y - F.z = src.z - F.icon_state = "laserred2" - var/area/AA = get_area(F) - var/turf/T = get_turf(F) - if(T.density == 1 || AA.name != A.name) - qdel(F) - return - cycle++ - if(cycle > 3) - cycle = 1 - Y++ - if(cycle == 3) - var/obj/effect/turntable_laser/F = new(src) - F.x = src.x+X - F.y = src.y+Y - F.z = src.z - F.icon_state = "laserred3" - var/area/AA = get_area(F) - var/turf/T = get_turf(F) - if(T.density == 1 || AA.name != A.name) - qdel(F) - return - cycle++ - if(cycle > 3) - cycle = 1 - X++ - if(mirrored == 1) - while(wall == 0) - if(cycle == 1) - var/obj/effect/turntable_laser/F = new(src) - F.x = src.x+X - F.y = src.y-Y - F.z = src.z - F.icon_state = "laserred1m" - var/area/AA = get_area(F) - var/turf/T = get_turf(F) - if(T.density == 1 || AA.name != A.name) - qdel(F) - return - cycle++ - if(cycle > 3) - cycle = 1 - Y++ - if(cycle == 2) - var/obj/effect/turntable_laser/F = new(src) - F.x = src.x+X - F.y = src.y-Y - F.z = src.z - F.icon_state = "laserred2m" - var/area/AA = get_area(F) - var/turf/T = get_turf(F) - if(T.density == 1 || AA.name != A.name) - qdel(F) - return - cycle++ - if(cycle > 3) - cycle = 1 - X++ - if(cycle == 3) - var/obj/effect/turntable_laser/F = new(src) - F.x = src.x+X - F.y = src.y-Y - F.z = src.z - F.icon_state = "laserred3m" - var/area/AA = get_area(F) - var/turf/T = get_turf(F) - if(T.density == 1 || AA.name != A.name) - qdel(F) - return - cycle++ - if(cycle > 3) - cycle = 1 - X++ - - - -/obj/machinery/party/lasermachine/proc/turnoff() - var/area/A = src.loc.loc - for(var/obj/effect/turntable_laser/F in A) - qdel(F) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 7aa5661febe..d7a2213c5b7 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -101,6 +101,7 @@ power_change() /obj/machinery/vending/Destroy() + SStgui.close_uis(wires) QDEL_NULL(wires) QDEL_NULL(coin) QDEL_NULL(inserted_item) @@ -403,7 +404,7 @@ cashmoney.use(currently_vending.price) // Vending machines have no idea who paid with cash - credit_purchase("(cash)") + GLOB.vendor_account.credit(currently_vending.price, "Sale of [currently_vending.name]", name, "(cash)") return 1 /** @@ -443,26 +444,12 @@ return 0 else // Okay to move the money at this point - var/paid = customer_account.charge(currently_vending.price, GLOB.vendor_account, + customer_account.charge(currently_vending.price, GLOB.vendor_account, "Purchase of [currently_vending.name]", name, GLOB.vendor_account.owner_name, "Sale of [currently_vending.name]", customer_account.owner_name) - if(paid) - // Give the vendor the money. We use the account owner name, which means - // that purchases made with stolen/borrowed card will look like the card - // owner made them - credit_purchase(customer_account.owner_name) - return paid + return TRUE -/** - * Add money for current purchase to the vendor account. - * - * Called after the money has already been taken from the customer. - */ -/obj/machinery/vending/proc/credit_purchase(var/target as text) - GLOB.vendor_account.money += currently_vending.price - GLOB.vendor_account.credit(currently_vending.price, "Sale of [currently_vending.name]", - name, target) /obj/machinery/vending/attack_ai(mob/user) return attack_hand(user) @@ -1480,6 +1467,7 @@ /obj/item/clothing/under/victsuit/redblk = 1, /obj/item/clothing/under/victsuit/red = 1, /obj/item/clothing/suit/tailcoat = 1, + /obj/item/clothing/under/tourist_suit = 1, /obj/item/clothing/suit/draculacoat = 1, /obj/item/clothing/head/zepelli = 1, /obj/item/clothing/under/redhawaiianshirt = 1, diff --git a/code/game/mecha/equipment/tools/mining_tools.dm b/code/game/mecha/equipment/tools/mining_tools.dm index 5916d0f96c7..2248c37f518 100644 --- a/code/game/mecha/equipment/tools/mining_tools.dm +++ b/code/game/mecha/equipment/tools/mining_tools.dm @@ -94,7 +94,7 @@ /obj/item/mecha_parts/mecha_equipment/drill/proc/drill_mob(mob/living/target, mob/user) target.visible_message("[chassis] is drilling [target] with [src]!", "[chassis] is drilling you with [src]!") - add_attack_logs(user, target, "DRILLED with [src] (INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])") + add_attack_logs(user, target, "DRILLED with [src] ([uppertext(user.a_intent)]) ([uppertext(damtype)])") if(target.stat == DEAD && target.getBruteLoss() >= 200) add_attack_logs(user, target, "gibbed") if(LAZYLEN(target.butcher_results)) diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index 63eeb21e165..5962a1eccbb 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -60,7 +60,7 @@ target.visible_message("[chassis] squeezes [target].", \ "[chassis] squeezes [target].",\ "You hear something crack.") - add_attack_logs(chassis.occupant, M, "Squeezed with [src] (INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])") + add_attack_logs(chassis.occupant, M, "Squeezed with [src] ([uppertext(chassis.occupant.a_intent)]) ([uppertext(damtype)])") start_cooldown() else step_away(M,chassis) diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 9acdcba48de..e05fef18e5a 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -385,7 +385,7 @@ return /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang - name = "SGL-6 Grenade Launcher" + name = "SGL-6 Flashbang Launcher" icon_state = "mecha_grenadelnchr" origin_tech = "combat=4;engineering=4" projectile = /obj/item/grenade/flashbang @@ -411,7 +411,7 @@ return /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/clusterbang//Because I am a heartless bastard -Sieve - name = "SOB-3 Grenade Launcher" + name = "SOB-3 Clusterbang Launcher" desc = "A weapon for combat exosuits. Launches primed clusterbangs. You monster." origin_tech = "combat=4;materials=4" projectiles = 3 diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 52973c9e285..9a24edb4da3 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -1,3 +1,5 @@ +#define OCCUPANT_LOGGING occupant ? occupant : "empty mech" + /obj/mecha name = "Mecha" desc = "Exosuit" @@ -329,6 +331,8 @@ else occupant.clear_alert("mechaport") if(leg_overload_mode) + log_message("Leg Overload damage.") + take_damage(1, BRUTE, FALSE, FALSE) if(obj_integrity < max_integrity - max_integrity / 3) leg_overload_mode = FALSE step_in = initial(step_in) @@ -500,7 +504,7 @@ check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) else check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT)) - if(. >= 5 || prob(33)) + if((. >= 5 || prob(33)) && !(. == 1 && leg_overload_mode)) //If it takes 1 damage and leg_overload_mode is true, do not say TAKING DAMAGE! to the user several times a second. occupant_message("Taking damage!") log_message("Took [damage_amount] points of damage. Damage type: [damage_type]") @@ -538,12 +542,13 @@ user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src, ATTACK_EFFECT_PUNCH) playsound(loc, 'sound/weapons/tap.ogg', 40, 1, -1) - user.visible_message("[user] hits [name]. Nothing happens", "You hit [name] with no visible effect.") + user.visible_message("[user] hits [name]. Nothing happens", "You hit [name] with no visible effect.") log_message("Attack by hand/paw. Attacker - [user].") /obj/mecha/attack_alien(mob/living/user) log_message("Attack by alien. Attacker - [user].", TRUE) + add_attack_logs(user, OCCUPANT_LOGGING, "Alien attacked mech [src]") playsound(src.loc, 'sound/weapons/slash.ogg', 100, TRUE) attack_generic(user, 15, BRUTE, "melee", 0) @@ -561,8 +566,8 @@ if(user.obj_damage) animal_damage = user.obj_damage animal_damage = min(animal_damage, 20*user.environment_smash) - user.create_attack_log("attacked [name]") - add_attack_logs(user, src, "Attacked") + if(animal_damage) + add_attack_logs(user, OCCUPANT_LOGGING, "Animal attacked mech [src]") attack_generic(user, animal_damage, user.melee_damage_type, "melee", play_soundeffect) return TRUE @@ -573,7 +578,7 @@ . = ..() if(.) log_message("Attack by hulk. Attacker - [user].", 1) - add_attack_logs(user, src, "Punched with hulk powers") + add_attack_logs(user, OCCUPANT_LOGGING, "Hulk punched mech [src]") /obj/mecha/blob_act(obj/structure/blob/B) log_message("Attack by blob. Attacker - [B].") @@ -584,10 +589,14 @@ /obj/mecha/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) //wrapper log_message("Hit by [AM].") + if(isitem(AM)) + var/obj/item/I = AM + add_attack_logs(I.thrownby, OCCUPANT_LOGGING, "threw [AM] at mech [src]") . = ..() /obj/mecha/bullet_act(obj/item/projectile/Proj) //wrapper log_message("Hit by projectile. Type: [Proj.name]([Proj.flag]).") + add_attack_logs(Proj.firer, OCCUPANT_LOGGING, "shot [Proj.name]([Proj.flag]) at mech [src]") ..() /obj/mecha/ex_act(severity, target) @@ -774,6 +783,8 @@ to_chat(user, "You stop installing [M].") else + if(W.force) + add_attack_logs(user, OCCUPANT_LOGGING, "attacked mech '[src]' using [W]") return ..() @@ -861,7 +872,7 @@ return 0 use_power(melee_energy_drain) if(M.damtype == BRUTE || M.damtype == BURN) - add_attack_logs(M.occupant, src, "Mecha-attacked with [M] (INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])") + add_attack_logs(M.occupant, src, "Mecha-attacked with [M] ([uppertext(M.occupant.a_intent)]) ([uppertext(M.damtype)])") . = ..() /obj/mecha/emag_act(mob/user) @@ -1264,6 +1275,9 @@ L.client.RemoveViewMod("mecha") zoom_mode = FALSE +/obj/mecha/force_eject_occupant() + go_out() + ///////////////////////// ////// Access stuff ///// ///////////////////////// @@ -1534,3 +1548,5 @@ if(L.incapacitated()) return FALSE return TRUE + +#undef OCCUPANT_LOGGING diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index 9dd1c771b17..639687a45e9 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -58,7 +58,7 @@ icon_state = "eggs" var/amount_grown = 0 var/player_spiders = 0 - var/list/faction = list() + var/list/faction = list("spiders") /obj/structure/spider/eggcluster/New() ..() @@ -90,7 +90,7 @@ var/obj/machinery/atmospherics/unary/vent_pump/entry_vent var/travelling_in_vent = 0 var/player_spiders = 0 - var/list/faction = list() + var/list/faction = list("spiders") var/selecting_player = 0 /obj/structure/spider/spiderling/New() @@ -180,7 +180,7 @@ if(player_spiders && !selecting_player) selecting_player = 1 spawn() - var/list/candidates = pollCandidates("Do you want to play as a spider?", ROLE_GSPIDER, 1) + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a giant spider?", ROLE_GSPIDER, TRUE, source = S) if(candidates.len) var/mob/C = pick(candidates) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 76361776b0a..edcc6620531 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -2,6 +2,8 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect /obj/item name = "item" icon = 'icons/obj/items.dmi' + + move_resist = null // Set in the Initialise depending on the item size. Unless it's overriden by a specific item var/discrete = 0 // used in item_attack.dm to make an item not show an attack message to viewers var/image/blood_overlay = null //this saves our blood splatter overlay, which will be processed not to go over the edges of the sprite var/blood_overlay_color = null @@ -113,6 +115,23 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect hitsound = 'sound/items/welder.ogg' if(damtype == "brute") hitsound = "swing_hit" + if(!move_resist) + determine_move_resist() + +/obj/item/proc/determine_move_resist() + switch(w_class) + if(WEIGHT_CLASS_TINY) + move_resist = MOVE_FORCE_EXTREMELY_WEAK + if(WEIGHT_CLASS_SMALL) + move_resist = MOVE_FORCE_VERY_WEAK + if(WEIGHT_CLASS_NORMAL) + move_resist = MOVE_FORCE_WEAK + if(WEIGHT_CLASS_BULKY) + move_resist = MOVE_FORCE_NORMAL + if(WEIGHT_CLASS_HUGE) + move_resist = MOVE_FORCE_NORMAL + if(WEIGHT_CLASS_GIGANTIC) + move_resist = MOVE_FORCE_NORMAL /obj/item/Destroy() flags &= ~DROPDEL //prevent reqdels @@ -506,7 +525,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect "You stab yourself in the eyes with [src]!" \ ) - add_attack_logs(user, M, "Eye-stabbed with [src] (INTENT: [uppertext(user.a_intent)])") + add_attack_logs(user, M, "Eye-stabbed with [src] ([uppertext(user.a_intent)])") if(istype(H)) var/obj/item/organ/internal/eyes/eyes = H.get_int_organ(/obj/item/organ/internal/eyes) diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index 5f5c62abd21..97e46e3abb5 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -221,6 +221,12 @@ A.contents += thing thing.change_area(old_area, A) + var/area/oldA = get_area(get_turf(usr)) + var/list/firedoors = oldA.firedoors + for(var/door in firedoors) + var/obj/machinery/door/firedoor/FD = door + FD.CalculateAffectingAreas() + interact() area_created = TRUE return area_created @@ -236,6 +242,10 @@ return set_area_machinery_title(A,str,prevname) A.name = str + if(A.firedoors) + for(var/D in A.firedoors) + var/obj/machinery/door/firedoor/FD = D + FD.CalculateAffectingAreas() to_chat(usr, "You rename the '[prevname]' to '[str]'.") interact() return 1 diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index eeb484b9f50..ce52e260bca 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -11,7 +11,7 @@ slot_flags = SLOT_BELT | SLOT_EARS attack_verb = list("attacked", "coloured") toolspeed = 1 - var/colour = "#FF0000" //RGB + var/colour = COLOR_RED var/drawtype = "rune" var/list/graffiti = list("body","amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa","up","down","left","right","heart","borgsrogue","voxpox","shitcurity","catbeast","hieroglyphs1","hieroglyphs2","hieroglyphs3","security","syndicate1","syndicate2","nanotrasen","lie","valid","arrowleft","arrowright","arrowup","arrowdown","chicken","hailcrab","brokenheart","peace","scribble","scribble2","scribble3","skrek","squish","tunnelsnake","yip","youaredead") var/list/letters = list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z") @@ -123,54 +123,54 @@ /obj/item/toy/crayon/red icon_state = "crayonred" - colour = "#DA0000" + colour = COLOR_RED colourName = "red" /obj/item/toy/crayon/orange icon_state = "crayonorange" - colour = "#FF9300" + colour = COLOR_ORANGE colourName = "orange" /obj/item/toy/crayon/yellow icon_state = "crayonyellow" - colour = "#FFF200" + colour = COLOR_YELLOW colourName = "yellow" /obj/item/toy/crayon/green icon_state = "crayongreen" - colour = "#A8E61D" + colour = COLOR_GREEN colourName = "green" /obj/item/toy/crayon/blue icon_state = "crayonblue" - colour = "#00B7EF" + colour = COLOR_BLUE colourName = "blue" /obj/item/toy/crayon/purple icon_state = "crayonpurple" - colour = "#DA00FF" + colour = COLOR_PURPLE colourName = "purple" /obj/item/toy/crayon/random/New() icon_state = pick(list("crayonred", "crayonorange", "crayonyellow", "crayongreen", "crayonblue", "crayonpurple")) switch(icon_state) if("crayonred") - colour = "#DA0000" + colour = COLOR_RED colourName = "red" if("crayonorange") - colour = "#FF9300" + colour = COLOR_ORANGE colourName = "orange" if("crayonyellow") - colour = "#FFF200" + colour = COLOR_YELLOW colourName = "yellow" if("crayongreen") - colour = "#A8E61D" + colour =COLOR_GREEN colourName = "green" if("crayonblue") - colour = "#00B7EF" + colour = COLOR_BLUE colourName = "blue" if("crayonpurple") - colour = "#DA00FF" + colour = COLOR_PURPLE colourName = "purple" ..() @@ -197,10 +197,10 @@ if(!Adjacent(usr) || usr.incapacitated()) return if(href_list["color"]) - if(colour != "#FFFFFF") - colour = "#FFFFFF" + if(colour != COLOR_WHITE) + colour = COLOR_WHITE else - colour = "#000000" + colour = COLOR_BLACK update_window(usr) else ..() diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 7a6b41966a8..e96fceb8b6c 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -191,7 +191,7 @@ if(CanUse(U)) if(!Use(U)) return - to_chat(U, "You replace [target.fitting] with [src].") + to_chat(U, "You replace the light [target.fitting] with [src].") if(target.status != LIGHT_EMPTY) AddShards(1, U) diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index b3695229790..42c134736d7 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -18,13 +18,6 @@ name = "syndicate personal AI device" faction = list("syndicate") -/obj/item/paicard/relaymove(var/mob/user, var/direction) - if(user.stat || user.stunned) - return - var/obj/item/rig/rig = get_rig() - if(istype(rig)) - rig.forced_move(direction, user) - /obj/item/paicard/New() ..() overlays += "pai-off" diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 59d2c2a99bd..c8122fc34d6 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -186,10 +186,10 @@ update_icon() START_PROCESSING(SSobj, src) for(var/i, i<= 5, i++) - wires.UpdateCut(i,1) + wires.on_cut(i, 1) /obj/item/radio/intercom/wirecutter_act(mob/user, obj/item/I) - if(!(buildstage == 3 && b_stat && wires.IsAllCut())) + if(!(buildstage == 3 && b_stat && wires.is_all_cut())) return . = TRUE if(!I.use_tool(src, user, 0, volume = I.tool_volume)) @@ -270,4 +270,4 @@ /obj/item/radio/intercom/locked/prison/New() ..() - wires.CutWireIndex(RADIO_WIRE_TRANSMIT) + wires.cut(WIRE_RADIO_TRANSMIT) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 7ddf11ab451..528be3c5f87 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -76,6 +76,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( GLOB.global_radios |= src /obj/item/radio/Destroy() + SStgui.close_uis(wires) QDEL_NULL(wires) if(SSradio) SSradio.remove_object(src, frequency) @@ -127,8 +128,8 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( data["freq"] = format_frequency(frequency) data["rawfreq"] = num2text(frequency) - data["mic_cut"] = (wires.IsIndexCut(RADIO_WIRE_TRANSMIT) || wires.IsIndexCut(RADIO_WIRE_SIGNAL)) - data["spk_cut"] = (wires.IsIndexCut(RADIO_WIRE_RECEIVE) || wires.IsIndexCut(RADIO_WIRE_SIGNAL)) + data["mic_cut"] = (wires.is_cut(WIRE_RADIO_TRANSMIT) || wires.is_cut(WIRE_RADIO_SIGNAL)) + data["spk_cut"] = (wires.is_cut(WIRE_RADIO_RECEIVER) || wires.is_cut(WIRE_RADIO_SIGNAL)) var/list/chanlist = list_channels(user) if(islist(chanlist) && chanlist.len) @@ -184,10 +185,10 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( return can_admin_interact() /obj/item/radio/proc/ToggleBroadcast() - broadcasting = !broadcasting && !(wires.IsIndexCut(RADIO_WIRE_TRANSMIT) || wires.IsIndexCut(RADIO_WIRE_SIGNAL)) + broadcasting = !broadcasting && !(wires.is_cut(WIRE_RADIO_TRANSMIT) || wires.is_cut(WIRE_RADIO_SIGNAL)) /obj/item/radio/proc/ToggleReception() - listening = !listening && !(wires.IsIndexCut(RADIO_WIRE_RECEIVE) || wires.IsIndexCut(RADIO_WIRE_SIGNAL)) + listening = !listening && !(wires.is_cut(WIRE_RADIO_RECEIVER) || wires.is_cut(WIRE_RADIO_SIGNAL)) /obj/item/radio/Topic(href, href_list) if(..()) @@ -226,7 +227,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( channels[chan_name] |= FREQ_LISTENING . = 1 else if(href_list["spec_freq"]) - var freq = href_list["spec_freq"] + var/freq = href_list["spec_freq"] if(has_channel_access(usr, freq)) set_frequency(text2num(freq)) . = 1 @@ -325,7 +326,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( // If we were to send to a channel we don't have, drop it. return RADIO_CONNECTION_FAIL -/obj/item/radio/talk_into(mob/living/M as mob, list/message_pieces, channel, var/verb = "says") +/obj/item/radio/talk_into(mob/living/M as mob, list/message_pieces, channel, verbage = "says") if(!on) return 0 // the device has to be on // Fix for permacell radios, but kinda eh about actually fixing them. @@ -334,7 +335,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( // Uncommenting this. To the above comment: // The permacell radios aren't suppose to be able to transmit, this isn't a bug and this "fix" is just making radio wires useless. -Giacom - if(wires.IsIndexCut(RADIO_WIRE_TRANSMIT)) // The device has to have all its wires and shit intact + if(wires.is_cut(WIRE_RADIO_TRANSMIT)) // The device has to have all its wires and shit intact return 0 if(!M.IsVocal()) @@ -411,11 +412,16 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( jobname = "Unknown" voicemask = TRUE + // Copy the message pieces so we can safely edit comms line without affecting the actual line + var/list/message_pieces_copy = list() + for(var/datum/multilingual_say_piece/S in message_pieces) + message_pieces_copy += new /datum/multilingual_say_piece(S.speaking, S.message) + // Make us a message datum! var/datum/tcomms_message/tcm = new tcm.sender_name = displayname tcm.sender_job = jobname - tcm.message_pieces = message_pieces + tcm.message_pieces = message_pieces_copy tcm.source_level = position.z tcm.freq = connection.frequency tcm.vmask = voicemask @@ -423,6 +429,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( tcm.connection = connection tcm.vname = M.voice_name tcm.sender = M + tcm.verbage = verbage // Now put that through the stuff var/handled = FALSE if(connection) @@ -509,7 +516,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( var/is_listening = TRUE if(!on) is_listening = FALSE - if(!wires || wires.IsIndexCut(RADIO_WIRE_RECEIVE)) + if(!wires || wires.is_cut(WIRE_RADIO_RECEIVER)) is_listening = FALSE if(!listening) is_listening = FALSE diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index f20a2cc5875..43697ac4776 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -72,7 +72,7 @@ REAGENT SCANNER var/turf/U = O.loc if(U && U.intact) O.invisibility = 101 - O.alpha = 255 + O.alpha = 255 for(var/mob/living/M in T.contents) var/oldalpha = M.alpha if(M.alpha < 255 && istype(M)) diff --git a/code/game/objects/items/flag.dm b/code/game/objects/items/flag.dm index 14bb468e049..f33e504a3e6 100644 --- a/code/game/objects/items/flag.dm +++ b/code/game/objects/items/flag.dm @@ -251,6 +251,7 @@ message_admins("[key_name_admin(user)] has lit the [src] trapped with [boobytrap] by [key_name_admin(trapper)] at [A.name] (JMP).") log_game("[key_name_admin(user)] has lit the [src] trapped with [boobytrap] by [key_name_admin(trapper)] at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).") investigate_log("[key_name_admin(user)] has lit the [src] trapped with [boobytrap] by [key_name_admin(trapper)] at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).", INVESTIGATE_BOMB) + burn() else return ..() @@ -267,8 +268,16 @@ /obj/item/flag/chameleon/burn() if(boobytrap) - boobytrap.prime() - ..() + fire_act() + addtimer(CALLBACK(src, .proc/prime_boobytrap), boobytrap.det_time) + else + ..() + +/obj/item/flag/chameleon/proc/prime_boobytrap() + boobytrap.forceMove(get_turf(loc)) + boobytrap.prime() + boobytrap = null + burn() /obj/item/flag/chameleon/updateFlagIcon() icon_state = updated_icon_state diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index eae59151a38..f1487a09986 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -29,7 +29,7 @@ "[user] has prodded you with [src]!") playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1) - add_attack_logs(user, M, "Stunned with [src] (INTENT: [uppertext(user.a_intent)])") + add_attack_logs(user, M, "Stunned with [src] ([uppertext(user.a_intent)])") /obj/item/borg/overdrive name = "Overdrive" diff --git a/code/game/objects/items/stacks/sheets/leather.dm b/code/game/objects/items/stacks/sheets/leather.dm index 6bdfdd49234..9f6844c8b9e 100644 --- a/code/game/objects/items/stacks/sheets/leather.dm +++ b/code/game/objects/items/stacks/sheets/leather.dm @@ -242,7 +242,7 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( \ HS.amount++ src.use(1) wetness = initial(wetness) - break + return //If it gets to here it means it did not find a suitable stack on the tile. var/obj/item/stack/sheet/leather/HS = new(src.loc) HS.amount = 1 diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index ac635eebef7..4fef7b9f6d5 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -15,6 +15,7 @@ */ GLOBAL_LIST_INIT(metal_recipes, list( new /datum/stack_recipe("stool", /obj/structure/chair/stool, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("barstool", /obj/structure/chair/stool/bar, one_per_turf = 1, on_floor = 1), new /datum/stack_recipe("chair", /obj/structure/chair, one_per_turf = 1, on_floor = 1), new /datum/stack_recipe("shuttle seat", /obj/structure/chair/comfy/shuttle, 2, one_per_turf = 1, on_floor = 1), new /datum/stack_recipe("sofa (middle)", /obj/structure/chair/sofa, one_per_turf = 1, on_floor = 1), @@ -471,7 +472,8 @@ GLOBAL_LIST_INIT(plastic_recipes, list( new /datum/stack_recipe("cane mould", /obj/item/kitchen/mould/cane, 1, on_floor = 1), \ new /datum/stack_recipe("cash mould", /obj/item/kitchen/mould/cash, 1, on_floor = 1), \ new /datum/stack_recipe("coin mould", /obj/item/kitchen/mould/coin, 1, on_floor = 1), \ - new /datum/stack_recipe("sucker mould", /obj/item/kitchen/mould/loli, 1, on_floor = 1))) + new /datum/stack_recipe("sucker mould", /obj/item/kitchen/mould/loli, 1, on_floor = 1), \ + new /datum/stack_recipe("warning cone", /obj/item/clothing/head/cone, 5, on_floor = 1))) /obj/item/stack/sheet/plastic name = "plastic" diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 66f35a169f9..cd1b91388d7 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -35,7 +35,7 @@ desc = "A translucent balloon. There's nothing in it." icon = 'icons/obj/toy.dmi' icon_state = "waterballoon-e" - item_state = "balloon-empty" + item_state = "waterballoon-e" /obj/item/toy/balloon/New() ..() @@ -99,10 +99,10 @@ /obj/item/toy/balloon/update_icon() if(src.reagents.total_volume >= 1) icon_state = "waterballoon" - item_state = "balloon" + item_state = "waterballoon" else icon_state = "waterballoon-e" - item_state = "balloon-empty" + item_state = "waterballoon-e" /obj/item/toy/syndicateballoon name = "syndicate balloon" @@ -344,56 +344,56 @@ /obj/item/toy/prize/ripley name = "toy ripley" - desc = "Mini-Mecha action figure! Collect them all! 1/11." + desc = "Mini-Mecha action figure! Collect them all! 1/11. This one is a ripley, a mining and engineering mecha." /obj/item/toy/prize/fireripley name = "toy firefighting ripley" - desc = "Mini-Mecha action figure! Collect them all! 2/11." + desc = "Mini-Mecha action figure! Collect them all! 2/11. This one is a firefighter ripley, a fireproof mining and engineering mecha." icon_state = "fireripleytoy" /obj/item/toy/prize/deathripley name = "toy deathsquad ripley" - desc = "Mini-Mecha action figure! Collect them all! 3/11." + desc = "Mini-Mecha action figure! Collect them all! 3/11. This one is the black ripley used by the hero of DeathSquad, that TV drama about loose-cannon ERT officers!" icon_state = "deathripleytoy" /obj/item/toy/prize/gygax name = "toy gygax" - desc = "Mini-Mecha action figure! Collect them all! 4/11." + desc = "Mini-Mecha action figure! Collect them all! 4/11. This one is the speedy gygax combat mecha. Zoom zoom, pew pew!" icon_state = "gygaxtoy" /obj/item/toy/prize/durand name = "toy durand" - desc = "Mini-Mecha action figure! Collect them all! 5/11." + desc = "Mini-Mecha action figure! Collect them all! 5/11. This one is the heavy durand combat mecha. Stomp stomp!" icon_state = "durandprize" /obj/item/toy/prize/honk name = "toy H.O.N.K." - desc = "Mini-Mecha action figure! Collect them all! 6/11." + desc = "Mini-Mecha action figure! Collect them all! 6/11. This one is the infamous H.O.N.K mech!" icon_state = "honkprize" /obj/item/toy/prize/marauder name = "toy marauder" - desc = "Mini-Mecha action figure! Collect them all! 7/11." + desc = "Mini-Mecha action figure! Collect them all! 7/11. This one is the powerful marauder combat mecha! Run for cover!" icon_state = "marauderprize" /obj/item/toy/prize/seraph name = "toy seraph" - desc = "Mini-Mecha action figure! Collect them all! 8/11." + desc = "Mini-Mecha action figure! Collect them all! 8/11. This one is the powerful seraph combat mecha! Someone's in trouble!" icon_state = "seraphprize" /obj/item/toy/prize/mauler name = "toy mauler" - desc = "Mini-Mecha action figure! Collect them all! 9/11." + desc = "Mini-Mecha action figure! Collect them all! 9/11. This one is the deadly mauler combat mecha! Look out!" icon_state = "maulerprize" /obj/item/toy/prize/odysseus name = "toy odysseus" - desc = "Mini-Mecha action figure! Collect them all! 10/11." + desc = "Mini-Mecha action figure! Collect them all! 10/11. This one is the spindly, syringe-firing odysseus medical mecha." icon_state = "odysseusprize" /obj/item/toy/prize/phazon name = "toy phazon" - desc = "Mini-Mecha action figure! Collect them all! 11/11." + desc = "Mini-Mecha action figure! Collect them all! 11/11. This one is the mysterious Phazon combat mecha! Nobody's safe!" icon_state = "phazonprize" @@ -1591,182 +1591,217 @@ obj/item/toy/cards/deck/syndicate/black /obj/item/toy/figure/cmo name = "Chief Medical Officer action figure" + desc = "The ever-suffering CMO, from Space Life's SS12 figurine collection." icon_state = "cmo" toysay = "Suit sensors!" /obj/item/toy/figure/assistant name = "Assistant action figure" + desc = "The faceless, hairless scourge of the station, from Space Life's SS12 figurine collection." icon_state = "assistant" toysay = "Grey tide station wide!" /obj/item/toy/figure/atmos name = "Atmospheric Technician action figure" + desc = "The faithful atmospheric technician, from Space Life's SS12 figurine collection." icon_state = "atmos" toysay = "Glory to Atmosia!" /obj/item/toy/figure/bartender name = "Bartender action figure" + desc = "The suave bartender, from Space Life's SS12 figurine collection." icon_state = "bartender" toysay = "Wheres my monkey?" /obj/item/toy/figure/borg name = "Cyborg action figure" + desc = "The iron-willed cyborg, from Space Life's SS12 figurine collection." icon_state = "borg" toysay = "I. LIVE. AGAIN." /obj/item/toy/figure/botanist name = "Botanist action figure" + desc = "The drug-addicted botanist, from Space Life's SS12 figurine collection." icon_state = "botanist" toysay = "Dude, I see colors..." /obj/item/toy/figure/captain name = "Captain action figure" + desc = "The inept captain, from Space Life's SS12 figurine collection." icon_state = "captain" toysay = "Crew, the Nuke Disk is safely up my ass." /obj/item/toy/figure/cargotech name = "Cargo Technician action figure" + desc = "The hard-working cargo tech, from Space Life's SS12 figurine collection." icon_state = "cargotech" toysay = "For Cargonia!" /obj/item/toy/figure/ce name = "Chief Engineer action figure" + desc = "The expert Chief Engineer, from Space Life's SS12 figurine collection." icon_state = "ce" toysay = "Wire the solars!" /obj/item/toy/figure/chaplain name = "Chaplain action figure" + desc = "The obsessed Chaplain, from Space Life's SS12 figurine collection." icon_state = "chaplain" toysay = "Gods make me a killing machine please!" /obj/item/toy/figure/chef name = "Chef action figure" + desc = "The cannibalistic chef, from Space Life's SS12 figurine collection." icon_state = "chef" toysay = "I swear it's not human meat." /obj/item/toy/figure/chemist name = "Chemist action figure" + desc = "The legally dubious Chemist, from Space Life's SS12 figurine collection." icon_state = "chemist" toysay = "Get your pills!" /obj/item/toy/figure/clown name = "Clown action figure" + desc = "The mischevious Clown, from Space Life's SS12 figurine collection." icon_state = "clown" toysay = "Honk!" /obj/item/toy/figure/ian name = "Ian action figure" + desc = "The adorable corgi, from Space Life's SS12 figurine collection." icon_state = "ian" toysay = "Arf!" /obj/item/toy/figure/detective name = "Detective action figure" + desc = "The clever detective, from Space Life's SS12 figurine collection." icon_state = "detective" toysay = "This airlock has grey jumpsuit and insulated glove fibers on it." /obj/item/toy/figure/dsquad name = "Death Squad Officer action figure" + desc = "It's a member of the DeathSquad, a TV drama where loose-cannon ERT officers face up against the threats of the galaxy! It's from Space Life's special edition SS12 figurine collection." icon_state = "dsquad" toysay = "Eliminate all threats!" /obj/item/toy/figure/engineer name = "Engineer action figure" + desc = "The frantic engineer, from Space Life's SS12 figurine collection." icon_state = "engineer" toysay = "Oh god, the singularity is loose!" /obj/item/toy/figure/geneticist name = "Geneticist action figure" + desc = "The balding geneticist, from Space Life's SS12 figurine collection." icon_state = "geneticist" toysay = "I'm not qualified for this job." /obj/item/toy/figure/hop name = "Head of Personnel action figure" + desc = "The officious Head of Personnel, from Space Life's SS12 figurine collection." icon_state = "hop" - toysay = "Giving out all access!" + toysay = "Papers, please!" /obj/item/toy/figure/hos name = "Head of Security action figure" + desc = "The bloodlust-filled Head of Security, from Space Life's SS12 figurine collection." icon_state = "hos" - toysay = "I'm here to win, anything else is secondary." + toysay = "Space law? What?" /obj/item/toy/figure/qm name = "Quartermaster action figure" + desc = "The nationalistic Quartermaster, from Space Life's SS12 figurine collection." icon_state = "qm" toysay = "Hail Cargonia!" /obj/item/toy/figure/janitor name = "Janitor action figure" + desc = "The water-using Janitor, from Space Life's SS12 figurine collection." icon_state = "janitor" toysay = "Look at the signs, you idiot." /obj/item/toy/figure/lawyer name = "Internal Affairs Agent action figure" + desc = "The unappreciated Internal Affairs Agent, from Space Life's SS12 figurine collection." icon_state = "lawyer" toysay = "Standard Operating Procedure says they're guilty! Hacking is proof they're an Enemy of the Corporation!" /obj/item/toy/figure/librarian name = "Librarian action figure" + desc = "The quiet Librarian, from Space Life's SS12 figurine collection." icon_state = "librarian" toysay = "One day while..." /obj/item/toy/figure/md name = "Medical Doctor action figure" + desc = "The stressed-out doctor, from Space Life's SS12 figurine collection." icon_state = "md" toysay = "The patient is already dead!" /obj/item/toy/figure/mime name = "Mime action figure" - desc = "A \"Space Life\" brand Mime action figure." + desc = "... from Space Life's SS12 figurine collection." icon_state = "mime" toysay = "..." /obj/item/toy/figure/miner name = "Shaft Miner action figure" + desc = "The gun-toting Shaft Miner, from Space Life's SS12 figurine collection." icon_state = "miner" toysay = "Oh god it's eating my intestines!" /obj/item/toy/figure/ninja name = "Ninja action figure" + desc = "It's the mysterious ninja! It's from Space Life's special edition SS12 figurine collection." icon_state = "ninja" toysay = "Oh god! Stop shooting, I'm friendly!" /obj/item/toy/figure/wizard name = "Wizard action figure" + desc = "It's the deadly, spell-slinging wizard! It's from Space Life's special edition SS12 figurine collection." icon_state = "wizard" toysay = "Ei Nath!" /obj/item/toy/figure/rd name = "Research Director action figure" + desc = "The ambitious RD, from Space Life's SS12 figurine collection." icon_state = "rd" toysay = "Blowing all of the borgs!" /obj/item/toy/figure/roboticist name = "Roboticist action figure" + desc = "The skillful Roboticist, from Space Life's SS12 figurine collection." icon_state = "roboticist" toysay = "He asked to be borged!" /obj/item/toy/figure/scientist name = "Scientist action figure" + desc = "The mad Scientist, from Space Life's SS12 figurine collection." icon_state = "scientist" toysay = "Someone else must have made those bombs!" /obj/item/toy/figure/syndie name = "Nuclear Operative action figure" + desc = "It's the red-suited Nuclear Operative! It's from Space Life's special edition SS12 figurine collection." icon_state = "syndie" toysay = "Get that fucking disk!" /obj/item/toy/figure/secofficer name = "Security Officer action figure" + desc = "The power-tripping Security Officer, from Space Life's SS12 figurine collection." icon_state = "secofficer" toysay = "I am the law!" /obj/item/toy/figure/virologist name = "Virologist action figure" + desc = "The pandemic-starting Virologist, from Space Life's SS12 figurine collection." icon_state = "virologist" - toysay = "The cure is potassium!" + toysay = "It's not my virus!" /obj/item/toy/figure/warden name = "Warden action figure" + desc = "The amnesiac Warden, from Space Life's SS12 figurine collection." icon_state = "warden" toysay = "Execute him for breaking in!" diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm index a8da7503c72..26cef27a0b4 100644 --- a/code/game/objects/items/weapons/RSF.dm +++ b/code/game/objects/items/weapons/RSF.dm @@ -58,7 +58,7 @@ RSF if(!proximity) return if(!(istype(A, /obj/structure/table) || istype(A, /turf/simulated/floor))) return - var spawn_location + var/spawn_location var/turf/T = get_turf(A) if(istype(T) && !T.density) spawn_location = T diff --git a/code/game/objects/items/weapons/batons.dm b/code/game/objects/items/weapons/batons.dm new file mode 100644 index 00000000000..34d2bdd7ac8 --- /dev/null +++ b/code/game/objects/items/weapons/batons.dm @@ -0,0 +1,133 @@ +/// Delay in deci-seconds between two non-lethal attacks +#define BATON_STUN_COOLDOWN 4 SECONDS +/// Force of the telescopic baton when deployed +#define BATON_TELESCOPIC_FORCE_DEPLOYED 10 + +/** + * # Police Baton + * + * Knocks down the hit mob when not on harm intent and when [/obj/item/melee/classic_baton/on] is TRUE + * + * A non-lethal attack has a cooldown to avoid spamming + */ +/obj/item/melee/classic_baton + name = "police baton" + desc = "A wooden truncheon for beating criminal scum." + icon_state = "baton" + item_state = "classic_baton" + slot_flags = SLOT_BELT + force = 12 //9 hit crit + w_class = WEIGHT_CLASS_NORMAL + /// Whether the baton is on cooldown + var/on_cooldown = FALSE + /// Whether the baton is toggled on (to allow attacking) + var/on = TRUE + +/obj/item/melee/classic_baton/attack(mob/living/target, mob/living/user) + if(!on) + return ..() + + add_fingerprint(user) + if((CLUMSY in user.mutations) && prob(50)) + user.visible_message("[user] accidentally clubs [user.p_them()]self with [src]!", \ + "You accidentally club yourself with [src]!") + user.Weaken(force * 3) + if(ishuman(user)) + var/mob/living/carbon/human/H = user + H.apply_damage(force * 2, BRUTE, "head") + else + user.take_organ_damage(force * 2) + return + + if(user.a_intent == INTENT_HARM || isrobot(target)) // Lethal attack or it's a borg (can't knock them down!) + return ..() + else if(!on_cooldown) // Non-lethal attack - knock them down + // Check for shield/countering + if(ishuman(target)) + var/mob/living/carbon/human/H = target + if(H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK)) + return + if(check_martial_counter(H, user)) + return + // Visuals and sound + user.do_attack_animation(target) + playsound(target, 'sound/effects/woodhit.ogg', 75, TRUE, -1) + add_attack_logs(user, target, "Stunned with [src]") + target.visible_message("[user] has knocked down [target] with \the [src]!", \ + "[user] has knocked down [target] with \the [src]!") + // Hit 'em + target.LAssailant = iscarbon(user) ? user : null + target.Weaken(3) + on_cooldown = TRUE + addtimer(CALLBACK(src, .proc/cooldown_finished), BATON_STUN_COOLDOWN) + +/** + * Called some time after a non-lethal attack + */ +/obj/item/melee/classic_baton/proc/cooldown_finished() + on_cooldown = FALSE + +/** + * # Fancy Cane + */ +/obj/item/melee/classic_baton/ntcane + name = "fancy cane" + desc = "A cane with special engraving on it. It seems well suited for fending off assailants..." + icon_state = "cane_nt" + item_state = "cane_nt" + needs_permit = FALSE + +/obj/item/melee/classic_baton/ntcane/is_crutch() + return TRUE + +/** + * # Telescopic Baton + */ +/obj/item/melee/classic_baton/telescopic + name = "telescopic baton" + desc = "A compact yet robust personal defense weapon. Can be concealed when folded." + icon_state = "telebaton_0" + item_state = null + slot_flags = SLOT_BELT + w_class = WEIGHT_CLASS_SMALL + needs_permit = FALSE + force = 0 + on = FALSE + /// Attack verbs when concealed (created on Initialize) + var/static/list/attack_verb_off + /// Attack verbs when extended (created on Initialize) + var/static/list/attack_verb_on + +/obj/item/melee/classic_baton/telescopic/Initialize(mapload) + . = ..() + if(!attack_verb_off) + attack_verb_off = list("hit", "poked") + attack_verb_on = list("smacked", "struck", "cracked", "beaten") + attack_verb = on ? attack_verb_on : attack_verb_off + +/obj/item/melee/classic_baton/telescopic/attack_self(mob/user) + on = !on + icon_state = "telebaton_[on]" + if(on) + to_chat(user, "You extend the baton.") + item_state = "nullrod" + w_class = WEIGHT_CLASS_BULKY //doesnt fit in backpack when its on for balance + force = BATON_TELESCOPIC_FORCE_DEPLOYED //stunbaton damage + attack_verb = attack_verb_on + else + to_chat(user, "You collapse the baton.") + item_state = null //no sprite for concealment even when in hand + slot_flags = SLOT_BELT + w_class = WEIGHT_CLASS_SMALL + force = 0 //not so robust now + attack_verb = attack_verb_off + // Update mob hand visuals + if(ishuman(user)) + var/mob/living/carbon/human/H = user + H.update_inv_l_hand() + H.update_inv_r_hand() + playsound(loc, 'sound/weapons/batonextend.ogg', 50, TRUE) + add_fingerprint(user) + +#undef BATON_STUN_COOLDOWN +#undef BATON_TELESCOPIC_FORCE_DEPLOYED diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 405ce47a033..b780a837559 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -212,6 +212,11 @@ return M owner_ckey = null +/obj/item/card/id/proc/getPlayerCkey() + var/mob/living/carbon/human/H = getPlayer() + if(istype(H)) + return H.ckey + /obj/item/card/id/proc/is_untrackable() return untrackable @@ -356,13 +361,13 @@ /obj/item/card/id/syndicate/attack_self(mob/user as mob) if(!src.registered_name) - var t = reject_bad_name(input(user, "What name would you like to use on this card?", "Agent Card name", ishuman(user) ? user.real_name : user.name)) + var/t = reject_bad_name(input(user, "What name would you like to use on this card?", "Agent Card name", ishuman(user) ? user.real_name : user.name)) if(!t) to_chat(user, "Invalid name.") return src.registered_name = t - var u = sanitize(stripped_input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than maintenance.", "Agent Card Job Assignment", "Agent", MAX_MESSAGE_LEN)) + var/u = sanitize(stripped_input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than maintenance.", "Agent Card Job Assignment", "Agent", MAX_MESSAGE_LEN)) if(!u) to_chat(user, "Invalid assignment.") src.registered_name = "" diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm index 8815ad6a20f..fcfe183dddf 100644 --- a/code/game/objects/items/weapons/cosmetics.dm +++ b/code/game/objects/items/weapons/cosmetics.dm @@ -5,16 +5,22 @@ icon_state = "lipstick" w_class = WEIGHT_CLASS_TINY var/colour = "red" - var/open = 0 - var/list/lipstick_colors = list( - "purple" = "purple", - "jade" = "#216F43", - "lime" = "lime", - "black" = "black", - "green" = "green", - "blue" = "blue", - "white" = "white") + var/open = FALSE + var/static/list/lipstick_colors +/obj/item/lipstick/Initialize(mapload) + . = ..() + if(!lipstick_colors) + lipstick_colors = list( + "black" = "#000000", + "white" = "#FFFFFF", + "red" = "#FF0000", + "green" = "#00C000", + "blue" = "#0000FF", + "purple" = "#D55CD0", + "jade" = "#216F43", + "lime" = "#00FF00", + ) /obj/item/lipstick/purple name = "purple lipstick" @@ -22,7 +28,7 @@ /obj/item/lipstick/jade name = "jade lipstick" - colour = "#216F43" + colour = "jade" /obj/item/lipstick/lime name = "lime lipstick" @@ -47,40 +53,37 @@ /obj/item/lipstick/random name = "lipstick" -/obj/item/lipstick/random/New() - ..() - var/lscolor = pick(lipstick_colors)//A random color is picked from the var defined initially in a new var. - colour = lipstick_colors[lscolor]//The color of the lipstick is pulled from the new variable (right hand side, HTML & Hex RGB) - name = "[lscolor] lipstick"//The new variable is also used to match the name to the color of the lipstick. Kudos to Desolate & Lemon +/obj/item/lipstick/random/Initialize(mapload) + . = ..() + colour = pick(lipstick_colors) + name = "[colour] lipstick" - -/obj/item/lipstick/attack_self(mob/user as mob) - overlays.Cut() +/obj/item/lipstick/attack_self(mob/user) + cut_overlays() to_chat(user, "You twist \the [src] [open ? "closed" : "open"].") open = !open if(open) - var/image/colored = image("icon"='icons/obj/items.dmi', "icon_state"="lipstick_uncap_color") - colored.color = colour + var/mutable_appearance/colored = mutable_appearance('icons/obj/items.dmi', "lipstick_uncap_color") + colored.color = lipstick_colors[colour] icon_state = "lipstick_uncap" - overlays += colored + add_overlay(colored) else icon_state = "lipstick" -/obj/item/lipstick/attack(mob/M as mob, mob/user as mob) - if(!open) return - - if(!istype(M, /mob)) return +/obj/item/lipstick/attack(mob/M, mob/user) + if(!open || !istype(M)) + return if(ishuman(M)) var/mob/living/carbon/human/H = M - if(H.lip_style) //if they already have lipstick on + if(H.lip_style) // If they already have lipstick on to_chat(user, "You need to wipe off the old lipstick first!") return if(H == user) user.visible_message("[user] does [user.p_their()] lips with [src].", \ "You take a moment to apply [src]. Perfect!") H.lip_style = "lipstick" - H.lip_color = colour + H.lip_color = lipstick_colors[colour] H.update_body() else user.visible_message("[user] begins to do [H]'s lips with \the [src].", \ @@ -89,7 +92,7 @@ user.visible_message("[user] does [H]'s lips with \the [src].", \ "You apply \the [src].") H.lip_style = "lipstick" - H.lip_color = colour + H.lip_color = lipstick_colors[colour] H.update_body() else to_chat(user, "Where are the lips on that?") diff --git a/code/game/objects/items/weapons/garrote.dm b/code/game/objects/items/weapons/garrote.dm index 4bddaf551ea..e3c145e790b 100644 --- a/code/game/objects/items/weapons/garrote.dm +++ b/code/game/objects/items/weapons/garrote.dm @@ -104,7 +104,7 @@ playsound(src.loc, 'sound/weapons/cablecuff.ogg', 15, 1, -1) M.visible_message("[U] comes from behind and begins garroting [M] with the [src]!", \ - "[U]\ begins garroting you with the [src]![improvised ? "" : " You are unable to speak!"]", \ + "[U] begins garroting you with the [src]![improvised ? "" : " You are unable to speak!"]", \ "You hear struggling and wire strain against flesh!") return diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm index b3028f13c90..13f9dd8f49d 100644 --- a/code/game/objects/items/weapons/grenades/flashbang.dm +++ b/code/game/objects/items/weapons/grenades/flashbang.dm @@ -5,39 +5,51 @@ origin_tech = "materials=2;combat=3" light_power = 10 light_color = LIGHT_COLOR_WHITE - var/light_time = 2 - var/range = 7 + + var/light_time = 0.2 SECONDS // The duration the area is illuminated + var/range = 7 // The range in tiles of the flashbang /obj/item/grenade/flashbang/prime() update_mob() - var/flashbang_turf = get_turf(src) - if(!flashbang_turf) - return + var/turf/T = get_turf(src) + if(T) + // VFX and SFX + do_sparks(rand(5, 9), FALSE, src) + playsound(T, 'sound/effects/bang.ogg', 100, TRUE) + new /obj/effect/dummy/lighting_obj(T, light_color, range + 2, light_power, light_time) - set_light(7) - - do_sparks(rand(5, 9), FALSE, src) - playsound(flashbang_turf, 'sound/effects/bang.ogg', 25, 1) - bang(flashbang_turf, src, range) - - for(var/obj/structure/blob/B in hear(8, flashbang_turf)) //Blob damage here - var/damage = round(30 / (get_dist(B, get_turf(src)) + 1)) - B.take_damage(damage, BURN, "melee", 0) - - spawn(light_time) - qdel(src) + // Stunning & damaging mechanic + bang(T, src, range) + qdel(src) +/** + * Creates a flashing effect that blinds and deafens mobs within range + * + * Also damages blobs + * Arguments: + * * T - The turf to flash + * * A - The flashing atom + * * range - The range in tiles of the flash + * * flash - Whether to flash (blind) + * * bang - Whether to bang (deafen) + */ /proc/bang(turf/T, atom/A, range = 7, flash = TRUE, bang = TRUE) + // Blob damage + for(var/obj/structure/blob/B in hear(range + 1, T)) + var/damage = round(30 / (get_dist(B, T) + 1)) + B.take_damage(damage, BURN, "melee", FALSE) + + // Flashing mechanic + var/source_turf = get_turf(A) for(var/mob/living/M in hearers(range, T)) if(M.stat == DEAD) continue M.show_message("BANG", 2) - //Checking for protections - var/ear_safety = M.check_ear_prot() - var/distance = max(1, get_dist(get_turf(A), get_turf(M))) + var/distance = max(1, get_dist(source_turf, get_turf(M))) + var/stun_amount = max(10 / distance, 3) - //Flash + // Flash if(flash) if(M.weakeyes) M.visible_message("[M] screams and collapses!") @@ -49,21 +61,20 @@ var/mob/living/carbon/human/H = M var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes) if(E) - E.receive_damage(8, 1) - + E.receive_damage(8, TRUE) if(M.flash_eyes(affect_silicon = TRUE)) - M.Stun(max(10 / distance, 3)) - M.Weaken(max(10 / distance, 3)) + M.Stun(stun_amount) + M.Weaken(stun_amount) - - //Bang + // Bang + var/ear_safety = M.check_ear_prot() if(bang) - if(!distance || A.loc == M || A.loc == M.loc) //Holding on person or being exactly where lies is significantly more dangerous and voids protection + if(!distance || A.loc == M || A.loc == M.loc) // Holding on person or being exactly where lies is significantly more dangerous and voids protection M.Stun(10) M.Weaken(10) if(!ear_safety) - M.Stun(max(10 / distance, 3)) - M.Weaken(max(10 / distance, 3)) + M.Stun(stun_amount) + M.Weaken(stun_amount) M.AdjustEarDamage(rand(0, 5), 15) if(iscarbon(M)) var/mob/living/carbon/C = M @@ -74,6 +85,5 @@ if(prob(ears.ear_damage - 5)) to_chat(M, "You can't hear anything!") M.BecomeDeaf() - else - if(ears.ear_damage >= 5) - to_chat(M, "Your ears start to ring!") + else if(ears.ear_damage >= 5) + to_chat(M, "Your ears start to ring!") diff --git a/code/game/objects/items/weapons/grenades/smokebomb.dm b/code/game/objects/items/weapons/grenades/smokebomb.dm index 6dd07485f5b..53061e5fa61 100644 --- a/code/game/objects/items/weapons/grenades/smokebomb.dm +++ b/code/game/objects/items/weapons/grenades/smokebomb.dm @@ -19,7 +19,7 @@ /obj/item/grenade/smokebomb/prime() playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) - src.smoke.set_up(10, 0, usr.loc) + smoke.set_up(10, 0) spawn(0) src.smoke.start() sleep(10) diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index 1f73e5c7062..69b4abbe10d 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -126,13 +126,15 @@ color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN) ..() -/obj/item/restraints/handcuffs/cable/proc/cable_color(var/colorC) - if(colorC) - if(colorC == "rainbow") - colorC = color_rainbow() - color = colorC - else +/obj/item/restraints/handcuffs/cable/proc/cable_color(colorC) + if(!colorC) color = COLOR_RED + else if(colorC == "rainbow") + color = color_rainbow() + else if(colorC == "orange") //byond only knows 16 colors by name, and orange isn't one of them + color = COLOR_ORANGE + else + color = colorC /obj/item/restraints/handcuffs/cable/proc/color_rainbow() color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN) diff --git a/code/game/objects/items/weapons/holy_weapons.dm b/code/game/objects/items/weapons/holy_weapons.dm index 6423bbeb6ff..974bd3b677f 100644 --- a/code/game/objects/items/weapons/holy_weapons.dm +++ b/code/game/objects/items/weapons/holy_weapons.dm @@ -255,7 +255,7 @@ possessed = TRUE - var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as the spirit of [user.real_name]'s blade?", ROLE_PAI, 0, 100) + var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you want to play as the spirit of [user.real_name]'s blade?", ROLE_PAI, FALSE, 10 SECONDS, source = src) var/mob/dead/observer/theghost = null if(candidates.len) diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm index d91bb29ff76..bab2ff02fbb 100644 --- a/code/game/objects/items/weapons/manuals.dm +++ b/code/game/objects/items/weapons/manuals.dm @@ -5,6 +5,7 @@ icon = 'icons/obj/library.dmi' due_date = 0 // Game time in 1/10th seconds unique = 1 // 0 - Normal book, 1 - Should not be treated as normal book, unable to be copied, unable to be modified + has_drm = TRUE // No reuploading. Piracy is a crime /obj/item/book/manual/engineering_construction diff --git a/code/game/objects/items/weapons/shards.dm b/code/game/objects/items/weapons/shards.dm index 6daabffe000..f987f047f11 100644 --- a/code/game/objects/items/weapons/shards.dm +++ b/code/game/objects/items/weapons/shards.dm @@ -83,7 +83,7 @@ /obj/item/shard/Crossed(mob/living/L, oldloc) if(istype(L) && has_gravity(loc)) - if(L.incorporeal_move || L.flying) + if(L.incorporeal_move || L.flying || L.floating) return playsound(loc, 'sound/effects/glass_step.ogg', 50, TRUE) return ..() diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index 4a449069d4c..121782b2e8e 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -380,12 +380,13 @@ w_class = WEIGHT_CLASS_BULKY flags = CONDUCT materials = list(MAT_METAL=3000) + cant_hold = list(/obj/item/disk/nuclear) // Prevents some cheesing -/obj/item/storage/bag/tray/attack(mob/living/M as mob, mob/living/user as mob) +/obj/item/storage/bag/tray/attack(mob/living/M, mob/living/user) ..() // Drop all the things. All of them. var/list/obj/item/oldContents = contents.Copy() - quick_empty() + drop_inventory(user) // Make each item scatter a bit for(var/obj/item/I in oldContents) @@ -421,13 +422,13 @@ /obj/item/storage/bag/tray/cyborg/afterattack(atom/target, mob/user as mob) if( isturf(target) || istype(target,/obj/structure/table) ) - var foundtable = istype(target,/obj/structure/table/) + var/foundtable = istype(target,/obj/structure/table/) if( !foundtable ) //it must be a turf! for(var/obj/structure/table/T in target) foundtable = 1 break - var turf/dropspot + var/turf/dropspot if( !foundtable ) // don't unload things onto walls or other silly places. dropspot = user.loc else if( isturf(target) ) // they clicked on a turf with a table in it @@ -437,7 +438,7 @@ overlays = null - var droppedSomething = 0 + var/droppedSomething = 0 for(var/obj/item/I in contents) I.loc = dropspot diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 403088e2b71..e31e98789a3 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -204,8 +204,10 @@ /obj/item/flashlight/pen, /obj/item/seeds, /obj/item/wirecutters, - /obj/item/wrench, - ) + /obj/item/wrench, + /obj/item/reagent_containers/spray/weedspray, + /obj/item/reagent_containers/spray/pestspray + ) /obj/item/storage/belt/security name = "security belt" diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index da0094bb2ef..9ef94a861a0 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -846,7 +846,7 @@ desc = "A small box of Almost But Not Quite Plasma Premium Matches." icon = 'icons/obj/cigarettes.dmi' icon_state = "matchbox" - item_state = "zippo" + item_state = "matchbox" storage_slots = 10 w_class = WEIGHT_CLASS_TINY max_w_class = WEIGHT_CLASS_TINY diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 37f568fa51a..f86ebb2f69d 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -226,14 +226,14 @@ name = "\improper DromedaryCo packet" desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\"" icon_state = "Dpacket" - item_state = "cigpacket" + item_state = "Dpacket" /obj/item/storage/fancy/cigarettes/syndicate name = "\improper Syndicate Cigarettes" desc = "A packet of six evil-looking cigarettes, A label on the packaging reads, \"Donk Co\"" icon_state = "robustpacket" - item_state = "cigpacket" + item_state = "robustpacket" /obj/item/storage/fancy/cigarettes/syndicate/New() ..() @@ -244,14 +244,14 @@ name = "cigarette packet" desc = "An obscure brand of cigarettes." icon_state = "syndiepacket" - item_state = "cigpacket" + item_state = "syndiepacket" cigarette_type = /obj/item/clothing/mask/cigarette/syndicate /obj/item/storage/fancy/cigarettes/cigpack_med name = "Medical Marijuana Packet" desc = "A prescription packet containing six marijuana cigarettes." icon_state = "medpacket" - item_state = "cigpacket" + item_state = "medpacket" cigarette_type = /obj/item/clothing/mask/cigarette/medical_marijuana @@ -259,46 +259,46 @@ name = "\improper Uplift Smooth packet" desc = "Your favorite brand, now menthol flavored." icon_state = "upliftpacket" - item_state = "cigpacket" + item_state = "upliftpacket" cigarette_type = /obj/item/clothing/mask/cigarette/menthol /obj/item/storage/fancy/cigarettes/cigpack_robust name = "\improper Robust packet" desc = "Smoked by the robust." icon_state = "robustpacket" - item_state = "cigpacket" + item_state = "robustpacket" /obj/item/storage/fancy/cigarettes/cigpack_robustgold name = "\improper Robust Gold packet" desc = "Smoked by the truly robust." icon_state = "robustgpacket" - item_state = "cigpacket" + item_state = "robustgpacket" cigarette_type = /obj/item/clothing/mask/cigarette/robustgold /obj/item/storage/fancy/cigarettes/cigpack_carp name = "\improper Carp Classic packet" desc = "Since 2313." icon_state = "carppacket" - item_state = "cigpacket" + item_state = "carppacket" /obj/item/storage/fancy/cigarettes/cigpack_midori name = "\improper Midori Tabako packet" desc = "You can't understand the runes, but the packet smells funny." icon_state = "midoripacket" - item_state = "cigpacket" + item_state = "midoripacket" /obj/item/storage/fancy/cigarettes/cigpack_shadyjims name ="\improper Shady Jim's Super Slims" desc = "Is your weight slowing you down? Having trouble running away from gravitational singularities? Can't stop stuffing your mouth? Smoke Shady Jim's Super Slims and watch all that fat burn away. Guaranteed results!" icon_state = "shadyjimpacket" - item_state = "cigpacket" + item_state = "shadyjimpacket" cigarette_type = /obj/item/clothing/mask/cigarette/shadyjims /obj/item/storage/fancy/cigarettes/cigpack_random name ="\improper Embellished Enigma packet" desc = "For the true connoisseur of exotic flavors." icon_state = "shadyjimpacket" - item_state = "cigpacket" + item_state = "shadyjimpacket" cigarette_type = /obj/item/clothing/mask/cigarette/random /obj/item/storage/fancy/rollingpapers @@ -307,6 +307,7 @@ w_class = WEIGHT_CLASS_TINY icon = 'icons/obj/cigarettes.dmi' icon_state = "cig_paper_pack" + item_state = "cig_paper_pack" storage_slots = 10 icon_type = "rolling paper" can_hold = list(/obj/item/rollingpaper) diff --git a/code/game/objects/items/weapons/storage/firstaid.dm b/code/game/objects/items/weapons/storage/firstaid.dm index 4ff769a7d3f..1e22015bc97 100644 --- a/code/game/objects/items/weapons/storage/firstaid.dm +++ b/code/game/objects/items/weapons/storage/firstaid.dm @@ -205,7 +205,7 @@ if(empty) return new /obj/item/reagent_containers/hypospray/combat(src) - new /obj/item/reagent_containers/applicator/dual(src) // Because you ain't got no time to look at what damage dey taking yo + new /obj/item/reagent_containers/applicator/dual/syndi(src) // Because you ain't got no time to look at what damage dey taking yo new /obj/item/defibrillator/compact/combat/loaded(src) new /obj/item/clothing/glasses/hud/health/night(src) diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 55b25ad725a..49b6c6a11ea 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -438,8 +438,11 @@ if((!ishuman(usr) && (src.loc != usr)) || usr.stat || usr.restrained()) return + drop_inventory(usr) + +/obj/item/storage/proc/drop_inventory(user) var/turf/T = get_turf(src) - hide_from(usr) + hide_from(user) for(var/obj/item/I in contents) remove_from_storage(I, T) CHECK_TICK @@ -499,10 +502,9 @@ /obj/item/storage/attack_self(mob/user) - //Clicking on itself will empty it, if it has the verb to do that. - if(user.is_in_active_hand(src)) - if(verbs.Find(/obj/item/storage/verb/quick_empty)) - quick_empty() + //Clicking on itself will empty it, if allow_quick_empty is TRUE + if(allow_quick_empty && user.is_in_active_hand(src)) + drop_inventory(user) //Returns the storage depth of an atom. This is the number of storage items the atom is contained in before reaching toplevel (the area). //Returns -1 if the atom was not found on container. @@ -541,7 +543,7 @@ return depth /obj/item/storage/serialize() - var data = ..() + var/data = ..() var/list/content_list = list() data["content"] = content_list data["slots"] = storage_slots diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm deleted file mode 100644 index e75935a3cc2..00000000000 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ /dev/null @@ -1,119 +0,0 @@ -/* Weapons - * Contains: - * Banhammer - * Classic Baton - */ - -/* - * Banhammer - */ -/obj/item/banhammer/attack(mob/M, mob/user) - to_chat(M, " You have been banned FOR NO REISIN by [user]") - to_chat(user, " You have BANNED [M]") - playsound(loc, 'sound/effects/adminhelp.ogg', 15) //keep it at 15% volume so people don't jump out of their skin too much - -/* - * Classic Baton - */ - -/obj/item/melee/classic_baton - name = "police baton" - desc = "A wooden truncheon for beating criminal scum." - icon_state = "baton" - item_state = "classic_baton" - slot_flags = SLOT_BELT - force = 12 //9 hit crit - w_class = WEIGHT_CLASS_NORMAL - var/cooldown = 0 - var/on = 1 - -/obj/item/melee/classic_baton/attack(mob/target as mob, mob/living/user as mob) - if(on) - add_fingerprint(user) - if((CLUMSY in user.mutations) && prob(50)) - to_chat(user, "You club yourself over the head.") - user.Weaken(3 * force) - if(ishuman(user)) - var/mob/living/carbon/human/H = user - H.apply_damage(2*force, BRUTE, "head") - else - user.take_organ_damage(2*force) - return - if(isrobot(target)) - ..() - return - if(!isliving(target)) - return - if(user.a_intent == INTENT_HARM) - if(!..()) return - if(!isrobot(target)) return - else - if(cooldown <= 0) - if(ishuman(target)) - var/mob/living/carbon/human/H = target - if(H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK)) - return - if(check_martial_counter(H, user)) - return - playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1) - target.Weaken(3) - add_attack_logs(user, target, "Stunned with [src]") - add_fingerprint(user) - target.visible_message("[user] has knocked down [target] with \the [src]!", \ - "[user] has knocked down [target] with \the [src]!") - if(!iscarbon(user)) - target.LAssailant = null - else - target.LAssailant = user - cooldown = 1 - spawn(40) - cooldown = 0 - return - else - return ..() - -/obj/item/melee/classic_baton/ntcane - name = "fancy cane" - desc = "A cane with special engraving on it. It seems well suited for fending off assailants..." - icon_state = "cane_nt" - item_state = "cane_nt" - needs_permit = 0 - -/obj/item/melee/classic_baton/ntcane/is_crutch() - return 1 - -//Telescopic baton -/obj/item/melee/classic_baton/telescopic - name = "telescopic baton" - desc = "A compact yet robust personal defense weapon. Can be concealed when folded." - icon_state = "telebaton_0" - item_state = null - slot_flags = SLOT_BELT - w_class = WEIGHT_CLASS_SMALL - needs_permit = 0 - force = 0 - on = 0 - -/obj/item/melee/classic_baton/telescopic/attack_self(mob/user as mob) - on = !on - if(on) - to_chat(user, "You extend the baton.") - icon_state = "telebaton_1" - item_state = "nullrod" - w_class = WEIGHT_CLASS_BULKY //doesnt fit in backpack when its on for balance - force = 10 //stunbaton damage - attack_verb = list("smacked", "struck", "cracked", "beaten") - else - to_chat(user, "You collapse the baton.") - icon_state = "telebaton_0" - item_state = null //no sprite for concealment even when in hand - slot_flags = SLOT_BELT - w_class = WEIGHT_CLASS_SMALL - force = 0 //not so robust now - attack_verb = list("hit", "poked") - if(istype(user,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = user - H.update_inv_l_hand() - H.update_inv_r_hand() - playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1) - add_fingerprint(user) diff --git a/code/game/objects/items/weapons/tanks/jetpack.dm b/code/game/objects/items/weapons/tanks/jetpack.dm index bc783457e76..edf32e2f5a6 100644 --- a/code/game/objects/items/weapons/tanks/jetpack.dm +++ b/code/game/objects/items/weapons/tanks/jetpack.dm @@ -219,28 +219,3 @@ turn_off(cur_user) return ..() - -/obj/item/tank/jetpack/rig - name = "jetpack" - var/obj/item/rig/holder - actions_types = list(/datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization) - -/obj/item/tank/jetpack/rig/examine() - . = list("It's a jetpack. If you can see this, report it on the bug tracker.") - -/obj/item/tank/jetpack/rig/allow_thrust(num, mob/living/user) - if(!on) - return 0 - - if(!istype(holder) || !holder.air_supply) - return 0 - - var/datum/gas_mixture/removed = holder.air_supply.air_contents.remove(num) - if(removed.total_moles() < 0.005) - turn_off(user) - return 0 - - var/turf/T = get_turf(user) - T.assume_air(removed) - - return 1 diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index 32158a9a3ab..e5f903a1853 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -1,3 +1,6 @@ +/** + * # Banhammer + */ /obj/item/banhammer desc = "A banhammer" name = "banhammer" @@ -13,11 +16,15 @@ armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 70) resistance_flags = FIRE_PROOF - /obj/item/banhammer/suicide_act(mob/user) to_chat(viewers(user), "[user] is hitting [user.p_them()]self with the [src.name]! It looks like [user.p_theyre()] trying to ban [user.p_them()]self from life.") return BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS +/obj/item/banhammer/attack(mob/M, mob/user) + to_chat(M, " You have been banned FOR NO REISIN by [user]") + to_chat(user, " You have BANNED [M]") + playsound(loc, 'sound/effects/adminhelp.ogg', 15) //keep it at 15% volume so people don't jump out of their skin too much + /obj/item/sord name = "\improper SORD" desc = "This thing is so unspeakably shitty you are having a hard time even holding it." diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index d40c628ed90..7a56c53f73a 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -351,3 +351,9 @@ a { /obj/proc/check_uplink_validity() return TRUE + +/obj/proc/force_eject_occupant() + // This proc handles safely removing occupant mobs from the object if they must be teleported out (due to being SSD/AFK, by admin teleport, etc) or transformed. + // In the event that the object doesn't have an overriden version of this proc to do it, log a runtime so one can be added. + CRASH("Proc force_eject_occupant() is not overriden on a machine containing a mob.") + diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 04373502832..138c77f92eb 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -25,9 +25,13 @@ ..() spawn(1) if(!opened) // if closed, any item at the crate's loc is put in the contents + var/itemcount = 0 for(var/obj/item/I in loc) if(I.density || I.anchored || I == src) continue I.forceMove(src) + // Ensure the storage cap is respected + if(++itemcount >= storage_capacity) + break // Fix for #383 - C4 deleting fridges with corpses /obj/structure/closet/Destroy() @@ -354,6 +358,11 @@ /obj/structure/closet/AllowDrop() return TRUE +/obj/structure/closet/force_eject_occupant() + // Its okay to silently teleport mobs out of lockers, since the only thing affected is their contents list. + return + + /obj/structure/closet/bluespace name = "bluespace closet" desc = "A storage unit that moves and stores through the fourth dimension." diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm index 763717dc270..7a648aa74e4 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm @@ -69,6 +69,11 @@ /obj/structure/closet/secure_closet/closed_item_click(mob/user) togglelock(user) +/obj/structure/closet/secure_closet/AltClick(mob/user) + ..() + if(Adjacent(user)) + togglelock(user) + /obj/structure/closet/secure_closet/emag_act(mob/user) if(!broken) broken = TRUE diff --git a/code/game/objects/structures/crates_lockers/crittercrate.dm b/code/game/objects/structures/crates_lockers/crittercrate.dm index fd726aab6a7..7629fc62918 100644 --- a/code/game/objects/structures/crates_lockers/crittercrate.dm +++ b/code/game/objects/structures/crates_lockers/crittercrate.dm @@ -82,9 +82,8 @@ content_mob = /mob/living/simple_animal/pet/dog/fox /obj/structure/closet/critter/butterfly - name = "butterflies crate" + name = "butterfly crate" content_mob = /mob/living/simple_animal/butterfly - amount = 50 /obj/structure/closet/critter/deer name = "deer crate" diff --git a/code/game/objects/structures/dresser.dm b/code/game/objects/structures/dresser.dm index 4531613610e..0c0a7f5e4dd 100644 --- a/code/game/objects/structures/dresser.dm +++ b/code/game/objects/structures/dresser.dm @@ -56,27 +56,20 @@ /obj/structure/dresser/crowbar_act(mob/user, obj/item/I) . = TRUE - if(!I.tool_start_check(src, user, 0)) + if(!I.use_tool(src, user, 0)) return TOOL_ATTEMPT_DISMANTLE_MESSAGE if(I.use_tool(src, user, 50, volume = I.tool_volume)) TOOL_DISMANTLE_SUCCESS_MESSAGE - + deconstruct(disassembled = TRUE) /obj/structure/dresser/wrench_act(mob/user, obj/item/I) . = TRUE - if(!I.use_tool(src, user, 0, volume = I.tool_volume)) - return - if(anchored) - WRENCH_UNANCHOR_MESSAGE - anchored = FALSE - else - if(!isfloorturf(loc)) - user.visible_message("A floor must be present to secure [src]!") - return - WRENCH_ANCHOR_MESSAGE - anchored = TRUE + default_unfasten_wrench(user, I, time = 20) -/obj/structure/dresser/deconstruct(disassembled = TRUE) - new /obj/item/stack/sheet/wood(drop_location(), 30) - qdel(src) +obj/structure/dresser/deconstruct(disassembled = FALSE) + var/mat_drop = 15 + if(disassembled) + mat_drop = 30 + new /obj/item/stack/sheet/wood(drop_location(), mat_drop) + ..() diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index cd7b3525478..33298669157 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -40,7 +40,7 @@ return if(!in_range(src, user)) return - if(!iscarbon(usr)) + if(!iscarbon(usr) && !isrobot(usr)) return playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3) opened = !opened diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 5fea799ecb0..6d27b21e686 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -76,14 +76,14 @@ if(istype(W,/obj/item/stack/rods)) var/obj/item/stack/rods/S = W if(state == GIRDER_DISPLACED) - if(S.get_amount() < 2) - to_chat(user, "You need at least two rods to create a false wall!") + if(S.get_amount() < 5) + to_chat(user, "You need at least five rods to create a false wall!") return to_chat(user, "You start building a reinforced false wall...") if(do_after(user, 20, target = src)) - if(!loc || !S || S.get_amount() < 2) + if(!loc || !S || S.get_amount() < 5) return - S.use(2) + S.use(5) to_chat(user, "You create a false wall. Push on it to open or close the passage.") var/obj/structure/falsewall/iron/FW = new (loc) transfer_fingerprints_to(FW) diff --git a/code/game/objects/structures/loom.dm b/code/game/objects/structures/loom.dm index d0bcd07f92f..4742a2c3c0c 100644 --- a/code/game/objects/structures/loom.dm +++ b/code/game/objects/structures/loom.dm @@ -11,12 +11,30 @@ anchored = TRUE /obj/structure/loom/attackby(obj/item/I, mob/user) - if(default_unfasten_wrench(user, I, 5)) - return if(weave(I, user)) return return ..() +/obj/structure/loom/crowbar_act(mob/user, obj/item/I) + . = TRUE + if(!I.use_tool(src, user, 0)) + return + TOOL_ATTEMPT_DISMANTLE_MESSAGE + if(I.use_tool(src, user, 50, volume = I.tool_volume)) + TOOL_DISMANTLE_SUCCESS_MESSAGE + deconstruct(disassembled = TRUE) + +/obj/structure/loom/wrench_act(mob/user, obj/item/I) + . = TRUE + default_unfasten_wrench(user, I, time = 20) + +/obj/structure/loom/deconstruct(disassembled = FALSE) + var/mat_drop = 5 + if(disassembled) + mat_drop = 10 + new /obj/item/stack/sheet/wood(drop_location(), mat_drop) + ..() + ///Handles the weaving. /obj/structure/loom/proc/weave(obj/item/stack/sheet/cotton/W, mob/user) if(!istype(W)) diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index ba5258004a0..5a8a122be21 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -292,12 +292,12 @@ /obj/structure/sign/directions/engineering name = "\improper Engineering Department" - desc = "A direction sign, pointing out which way the Engineering department is." + desc = "A direction sign, pointing out which way the Engineering Department is." icon_state = "direction_eng" /obj/structure/sign/directions/security name = "\improper Security Department" - desc = "A direction sign, pointing out which way the Security department is." + desc = "A direction sign, pointing out which way the Security Department is." icon_state = "direction_sec" /obj/structure/sign/directions/medical @@ -307,12 +307,12 @@ /obj/structure/sign/directions/evac name = "\improper Escape Arm" - desc = "A direction sign, pointing out which way escape shuttle dock is." + desc = "A direction sign, pointing out which way Escape Shuttle Dock is." icon_state = "direction_evac" /obj/structure/sign/directions/cargo name = "\improper Cargo Department" - desc = "A direction sign, pointing out which way the Cargo department is." + desc = "A direction sign, pointing out which way the Cargo Department is." icon_state = "direction_supply" /obj/structure/sign/explosives diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index 6bc1c4ba142..def0142a481 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -53,6 +53,7 @@ wet_overlay = image('icons/effects/water.dmi', src, "ice_floor") else wet_overlay = image('icons/effects/water.dmi', src, "wet_static") + wet_overlay.plane = FLOOR_OVERLAY_PLANE overlays += wet_overlay if(time == INFINITY) return diff --git a/code/game/turfs/simulated/floor/chasm.dm b/code/game/turfs/simulated/floor/chasm.dm index d8ed888bc27..26921ba9ffd 100644 --- a/code/game/turfs/simulated/floor/chasm.dm +++ b/code/game/turfs/simulated/floor/chasm.dm @@ -97,8 +97,8 @@ return FALSE //Flies right over the chasm if(isliving(AM)) - var/mob/M = AM - if(M.flying) + var/mob/living/M = AM + if(M.flying || M.floating) return FALSE if(ishuman(AM)) var/mob/living/carbon/human/H = AM diff --git a/code/game/turfs/space/transit.dm b/code/game/turfs/space/transit.dm index a96cbae1269..dda49fecdbd 100644 --- a/code/game/turfs/space/transit.dm +++ b/code/game/turfs/space/transit.dm @@ -94,8 +94,6 @@ var/max = world.maxx-TRANSITIONEDGE var/min = 1+TRANSITIONEDGE - var/_z = pick(levels_by_trait(REACHABLE)) //select a random space zlevel - //now select coordinates for a border turf var/_x var/_y @@ -113,7 +111,8 @@ _x = rand(min,max) _y = min - var/turf/T = locate(_x, _y, _z) + var/list/levels_available = get_all_linked_levels_zpos() + var/turf/T = locate(_x, _y, pick(levels_available)) AM.forceMove(T) AM.newtonian_move(dir) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 8f8e7fdca9a..2f90e4d7cc4 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -25,7 +25,7 @@ var/blocks_air = 0 - var/PathNode/PNode = null //associated PathNode in the A* algorithm + var/datum/pathnode/PNode = null //associated PathNode in the A* algorithm flags = 0 @@ -165,7 +165,6 @@ var/mob/O = M if(!O.lastarea) O.lastarea = get_area(O.loc) -// O.update_gravity(O.mob_has_gravity(src)) var/loopsanity = 100 for(var/atom/A in range(1)) @@ -264,6 +263,13 @@ if(SSair && !ignore_air) SSair.add_to_active(src) + //update firedoor adjacency + var/list/turfs_to_check = get_adjacent_open_turfs(src) | src + for(var/I in turfs_to_check) + var/turf/T = I + for(var/obj/machinery/door/firedoor/FD in T) + FD.CalculateAffectingAreas() + if(!keep_cabling && !can_have_cabling()) for(var/obj/structure/cable/C in contents) qdel(C) diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index 824159487eb..04ee5901054 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -1,6 +1,6 @@ -GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8") +GLOBAL_VAR_INIT(normal_ooc_colour, "#275FC5") GLOBAL_VAR_INIT(member_ooc_colour, "#035417") -GLOBAL_VAR_INIT(mentor_ooc_colour, "#0099cc") +GLOBAL_VAR_INIT(mentor_ooc_colour, "#00B0EB") GLOBAL_VAR_INIT(moderator_ooc_colour, "#184880") GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00") @@ -53,6 +53,7 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00") return log_ooc(msg, src) + mob.create_log(OOC_LOG, msg) var/display_colour = GLOB.normal_ooc_colour if(holder && !holder.fakekey) @@ -205,7 +206,7 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00") return log_looc(msg, src) - + mob.create_log(LOOC_LOG, msg) var/mob/source = mob.get_looc_source() var/list/heard = get_mobs_in_view(7, source) diff --git a/code/game/world.dm b/code/game/world.dm index fdb0b8f63be..c279fa24b54 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -266,6 +266,13 @@ GLOBAL_VAR_INIT(world_topic_spam_protect_time, world.timeofday) update_status() return "Set listed status to invisible." + + else if("hostannounce" in input) + if(!key_valid) + return keySpamProtect(addr) + + to_chat(world, "
Server Announcement: [input["message"]]
") + /proc/keySpamProtect(var/addr) if(GLOB.world_topic_spam_protect_ip == addr && abs(GLOB.world_topic_spam_protect_time - world.time) < 50) spawn(50) @@ -333,6 +340,8 @@ GLOBAL_VAR_INIT(world_topic_spam_protect_time, world.timeofday) #endif for(var/client/C in GLOB.clients) + var/secs_before_auto_reconnect = 10 // TODO: make it higher if server is due for an update @AffectedArc07 + C << output(list2params(list(secs_before_auto_reconnect)), "browseroutput:reboot") if(config.server) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite C << link("byond://[config.server]") diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm index 09df94dc06e..1f55fa11f70 100644 --- a/code/modules/admin/DB ban/functions.dm +++ b/code/modules/admin/DB ban/functions.dm @@ -299,7 +299,8 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null) datum/admins/proc/DB_ban_unban_by_id(var/id) - if(!check_rights(R_BAN)) return + if(!check_rights(R_BAN)) + return var/sql = "SELECT ckey FROM [format_table_name("ban")] WHERE id = [id]" @@ -343,9 +344,9 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) /client/proc/DB_ban_panel() set category = "Admin" set name = "Banning Panel" - set desc = "Edit admin permissions" + set desc = "DB Ban Panel" - if(!holder) + if(!check_rights(R_BAN)) return holder.DB_ban_panel() @@ -356,7 +357,8 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) if(!usr.client) return - if(!check_rights(R_BAN)) return + if(!check_rights(R_BAN)) + return establish_db_connection() if(!GLOB.dbcon.IsConnected()) diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm index c7f2baac4ef..d9ceba62830 100644 --- a/code/modules/admin/IsBanned.dm +++ b/code/modules/admin/IsBanned.dm @@ -36,17 +36,6 @@ world/IsBanned(key, address, computer_id, type, check_ipintel = TRUE) // message_admins("Failed Login: [key] - Guests not allowed") return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a BYOND account.") - //check if the IP address is a known Tor node - if(config.ToRban && ToRban_isbanned(address)) - log_adminwarn("Failed Login: [key] [computer_id] [address] - Banned: Tor") - message_admins("Failed Login: [key] - Banned: Tor") - //ban their computer_id and ckey for posterity - AddBan(ckey(key), computer_id, "Use of Tor", "Automated Ban", 0, 0) - var/mistakemessage = "" - if(config.banappeals) - mistakemessage = "\nIf you believe this is a mistake, please request help at [config.banappeals]." - return list("reason"="using Tor", "desc"="\nReason: The network you are using to connect has been banned.[mistakemessage]") - //check if the IP address is a known proxy/vpn, and the user is not whitelisted if(check_ipintel && config.ipintel_email && config.ipintel_whitelist && ipintel_is_banned(key, address)) log_adminwarn("Failed Login: [key] [computer_id] [address] - Proxy/VPN") diff --git a/code/modules/admin/NewBan.dm b/code/modules/admin/NewBan.dm index 9aab12234d2..293504919d4 100644 --- a/code/modules/admin/NewBan.dm +++ b/code/modules/admin/NewBan.dm @@ -103,7 +103,8 @@ GLOBAL_PROTECT(banlist_savefile) // Obvious reasons GLOB.banlist_savefile.cd = "/base" if( GLOB.banlist_savefile.dir.Find("[ckey][computerid]") ) - to_chat(usr, "Ban already exists.") + if(usr) + to_chat(usr, "Ban already exists.") return 0 else GLOB.banlist_savefile.dir.Add("[ckey][computerid]") diff --git a/code/modules/admin/ToRban.dm b/code/modules/admin/ToRban.dm deleted file mode 100644 index b486f168503..00000000000 --- a/code/modules/admin/ToRban.dm +++ /dev/null @@ -1,89 +0,0 @@ -//By Carnwennan -//fetches an external list and processes it into a list of ip addresses. -//It then stores the processed list into a savefile for later use -#define TORFILE "data/ToR_ban.bdb" -#define TOR_UPDATE_INTERVAL 216000 //~6 hours - -/proc/ToRban_isbanned(var/ip_address) - var/savefile/F = new(TORFILE) - if(F) - if( ip_address in F.dir ) - return 1 - return 0 - -/proc/ToRban_autoupdate() - var/savefile/F = new(TORFILE) - if(F) - var/last_update - F["last_update"] >> last_update - if((last_update + TOR_UPDATE_INTERVAL) < world.realtime) //we haven't updated for a while - ToRban_update() - return - -/proc/ToRban_update() - spawn(0) - log_world("Downloading updated ToR data...") - var/http[] = world.Export("http://exitlist.torproject.org/exit-addresses") - - var/list/rawlist = file2list(http["CONTENT"]) - if(rawlist.len) - fdel(TORFILE) - var/savefile/F = new(TORFILE) - for( var/line in rawlist ) - if(!line) continue - if( copytext(line,1,12) == "ExitAddress" ) - var/cleaned = copytext(line,13,length(line)-19) - if(!cleaned) continue - F[cleaned] << 1 - to_chat(F["last_update"], world.realtime) - log_world("ToR data updated!") - if(usr) - to_chat(usr, "ToRban updated.") - return 1 - log_world("ToR data update aborted: no data.") - return 0 - -/client/proc/ToRban(task in list("update","toggle","show","remove","remove all","find")) - set name = "ToRban" - set category = "Server" - if(!holder) return - switch(task) - if("update") - ToRban_update() - if("toggle") - if(config) - if(config.ToRban) - config.ToRban = 0 - message_admins("ToR banning disabled.") - else - config.ToRban = 1 - message_admins("ToR banning enabled.") - if("show") - var/savefile/F = new(TORFILE) - var/dat - if( length(F.dir) ) - for( var/i=1, i<=length(F.dir), i++ ) - dat += "
" - dat = "
#[i] [F.dir[i]]
[dat]
" - else - dat = "No addresses in list." - src << browse(dat,"window=ToRban_show") - if("remove") - var/savefile/F = new(TORFILE) - var/choice = input(src,"Please select an IP address to remove from the ToR banlist:","Remove ToR ban",null) as null|anything in F.dir - if(choice) - F.dir.Remove(choice) - to_chat(src, "Address removed") - if("remove all") - to_chat(src, "[TORFILE] was [fdel(TORFILE)?"":"not "]removed.") - if("find") - var/input = input(src,"Please input an IP address to search for:","Find ToR ban",null) as null|text - if(input) - if(ToRban_isbanned(input)) - to_chat(src, "Address is a known ToR address") - else - to_chat(src, "Address is not a known ToR address") - return - -#undef TORFILE -#undef TOR_UPDATE_INTERVAL diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 1eed8083a97..07dd4975ddb 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -69,7 +69,10 @@ GLOBAL_VAR_INIT(nologevent, 0) body += "Options panel for [M]" if(M.client) body += " played by [M.client] " - body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\] " + if(check_rights(R_PERMISSIONS, 0)) + body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\] " + else + body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\] " body += "\[" + M.client.get_exp_type(EXP_TYPE_CREW) + " as [EXP_TYPE_CREW]\]" if(isnewplayer(M)) @@ -78,6 +81,7 @@ GLOBAL_VAR_INIT(nologevent, 0) body += " \[Heal\] " body += "

\[ " + body += "LOGS - " body += "VV - " body += "[ADMIN_TP(M,"TP")] - " if(M.client) @@ -109,17 +113,18 @@ GLOBAL_VAR_INIT(nologevent, 0) else body += "Add to Watchlist " - if(M.client) body += "| Prison | " body += "\ Send back to Lobby | " + body += "\ Erase Flavor Text | " + body += "\ Use Random Name | " var/muted = M.client.prefs.muted body += {"
Mute: - \[IC | - OOC | - PRAY | - ADMINHELP | - DEADCHAT\] - (toggle all) + \[IC | + OOC | + PRAY | + ADMINHELP | + DEADCHAT\] + (toggle all) "} var/jumptoeye = "" @@ -280,7 +285,7 @@ GLOBAL_VAR_INIT(nologevent, 0) /datum/admins/proc/vpn_whitelist() set category = "Admin" set name = "VPN Ckey Whitelist" - if(!check_rights(R_ADMIN)) + if(!check_rights(R_BAN)) return var/key = stripped_input(usr, "Enter ckey to add/remove, or leave blank to cancel:", "VPN Whitelist add/remove", max_length=32) if(key) @@ -699,7 +704,7 @@ GLOBAL_VAR_INIT(nologevent, 0) var/msg = "" if(SSticker.current_state == GAME_STATE_STARTUP) msg = " (The server is still setting up, but the round will be started as soon as possible.)" - message_admins("[usr.key] has started the game.[msg]") + message_admins("[usr.key] has started the game.[msg]") feedback_add_details("admin_verb","SN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return 1 else @@ -760,19 +765,6 @@ GLOBAL_VAR_INIT(nologevent, 0) world.update_status() feedback_add_details("admin_verb","TR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/datum/admins/proc/toggle_aliens() - set category = "Event" - set desc="Toggle alien mobs" - set name="Toggle Aliens" - - if(!check_rights(R_EVENT)) - return - - GLOB.aliens_allowed = !GLOB.aliens_allowed - log_admin("[key_name(usr)] toggled aliens to [GLOB.aliens_allowed].") - message_admins("[key_name_admin(usr)] toggled aliens [GLOB.aliens_allowed ? "on" : "off"].") - feedback_add_details("admin_verb","TA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - /datum/admins/proc/delay() set category = "Server" set desc="Delay the game start/end" diff --git a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm index a627c96148f..527540e9490 100644 --- a/code/modules/admin/admin_investigate.dm +++ b/code/modules/admin/admin_investigate.dm @@ -33,7 +33,8 @@ /client/proc/investigate_show( subject in GLOB.investigate_log_subjects ) set name = "Investigate" set category = "Admin" - if(!holder) return + if(!check_rights(R_ADMIN)) + return switch(subject) if("notes") show_note() diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index f892d015da2..b3957a86b44 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -10,11 +10,8 @@ GLOBAL_LIST_INIT(admin_verbs_default, list( GLOBAL_LIST_INIT(admin_verbs_admin, list( /client/proc/check_antagonists, /*shows all antags*/ /datum/admins/proc/show_player_panel, - /client/proc/player_panel, /*shows an interface for all players, with links to various panels (old style)*/ /client/proc/player_panel_new, /*shows an interface for all players, with links to various panels*/ /client/proc/invisimin, /*allows our mob to go invisible/visible*/ - /datum/admins/proc/toggleenter, /*toggles whether people can join the current game*/ - /datum/admins/proc/toggleguests, /*toggles whether guests can join the current game*/ /datum/admins/proc/announce, /*priority announce something to all clients.*/ /client/proc/colorooc, /*allows us to set a custom colour for everything we say in ooc*/ /client/proc/resetcolorooc, /*allows us to set a reset our ooc color*/ @@ -23,7 +20,6 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list( /client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/ /client/proc/cmd_admin_pm_panel, /*admin-pm list*/ /client/proc/cmd_admin_pm_by_key_panel, /*admin-pm list by key*/ - /client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/ /client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/ /client/proc/cmd_admin_check_contents, /*displays the contents of an instance*/ /client/proc/cmd_admin_open_logging_view, @@ -37,6 +33,7 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list( /client/proc/jumptoturf, /*allows us to jump to a specific turf*/ /client/proc/admin_call_shuttle, /*allows us to call the emergency shuttle*/ /client/proc/admin_cancel_shuttle, /*allows us to cancel the emergency shuttle, sending it back to centcomm*/ + /client/proc/admin_deny_shuttle, /*toggles availability of shuttle calling*/ /client/proc/check_ai_laws, /*shows AI and borg laws*/ /client/proc/manage_silicon_laws, /* Allows viewing and editing silicon laws. */ /client/proc/admin_memo, /*admin memo system. show/delete/write. +SERVER needed to delete admin memos of others*/ @@ -54,36 +51,30 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list( /datum/admins/proc/PlayerNotes, /client/proc/cmd_mentor_say, /datum/admins/proc/show_player_notes, - /datum/admins/proc/vpn_whitelist, /client/proc/free_slot, /*frees slot for chosen job*/ /client/proc/toggleattacklogs, /client/proc/toggleadminlogs, /client/proc/toggledebuglogs, /client/proc/update_mob_sprite, - /client/proc/toggledrones, /client/proc/man_up, /client/proc/global_man_up, /client/proc/delbook, /client/proc/view_flagged_books, + /client/proc/view_asays, /client/proc/empty_ai_core_toggle_latejoin, /client/proc/aooc, /client/proc/freeze, - /client/proc/alt_check, /client/proc/secrets, - /client/proc/change_human_appearance_admin, /* Allows an admin to change the basic appearance of human-based mobs */ - /client/proc/change_human_appearance_self, /* Allows the human-based mob itself to change its basic appearance */ /client/proc/debug_variables, /client/proc/reset_all_tcs, /*resets all telecomms scripts*/ /client/proc/toggle_mentor_chat, /client/proc/toggle_advanced_interaction, /*toggle admin ability to interact with not only machines, but also atoms such as buttons and doors*/ - /client/proc/list_ssds_afks, - /client/proc/cmd_admin_headset_message, - /client/proc/spawn_floor_cluwne + /client/proc/list_ssds_afks )) GLOBAL_LIST_INIT(admin_verbs_ban, list( - /client/proc/unban_panel, - /client/proc/jobbans, - /client/proc/stickybanpanel + /client/proc/ban_panel, + /client/proc/stickybanpanel, + /datum/admins/proc/vpn_whitelist )) GLOBAL_LIST_INIT(admin_verbs_sounds, list( /client/proc/play_local_sound, @@ -99,7 +90,6 @@ GLOBAL_LIST_INIT(admin_verbs_event, list( /client/proc/drop_bomb, /client/proc/cinematic, /client/proc/one_click_antag, - /datum/admins/proc/toggle_aliens, /client/proc/cmd_admin_add_freeform_ai_law, /client/proc/cmd_admin_add_random_ai_law, /client/proc/make_sound, @@ -109,6 +99,7 @@ GLOBAL_LIST_INIT(admin_verbs_event, list( /client/proc/show_tip, /client/proc/cmd_admin_change_custom_event, /datum/admins/proc/access_news_network, /*allows access of newscasters*/ + /client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/ /client/proc/cmd_admin_direct_narrate, /*send text directly to a player with no padding. Useful for narratives and fluff-text*/ /client/proc/cmd_admin_world_narrate, /*sends text to all players with no padding*/ /client/proc/response_team, // Response Teams admin verb @@ -116,7 +107,10 @@ GLOBAL_LIST_INIT(admin_verbs_event, list( /client/proc/fax_panel, /client/proc/event_manager_panel, /client/proc/modify_goals, - /client/proc/outfit_manager + /client/proc/outfit_manager, + /client/proc/cmd_admin_headset_message, + /client/proc/change_human_appearance_admin, /* Allows an admin to change the basic appearance of human-based mobs */ + /client/proc/change_human_appearance_self /* Allows the human-based mob itself to change its basic appearance */ )) GLOBAL_LIST_INIT(admin_verbs_spawn, list( @@ -125,25 +119,27 @@ GLOBAL_LIST_INIT(admin_verbs_spawn, list( /client/proc/admin_deserialize )) GLOBAL_LIST_INIT(admin_verbs_server, list( - /client/proc/ToRban, + /client/proc/reload_admins, /client/proc/Set_Holiday, /datum/admins/proc/startnow, /datum/admins/proc/restart, /datum/admins/proc/delay, /datum/admins/proc/toggleaban, + /datum/admins/proc/toggleenter, /*toggles whether people can join the current game*/ + /datum/admins/proc/toggleguests, /*toggles whether guests can join the current game*/ /client/proc/toggle_log_hrefs, /client/proc/everyone_random, /datum/admins/proc/toggleAI, /client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/ - /client/proc/cmd_debug_del_all, /client/proc/cmd_debug_del_sing, - /datum/admins/proc/toggle_aliens, /client/proc/delbook, /client/proc/view_flagged_books, + /client/proc/view_asays, /client/proc/toggle_antagHUD_use, /client/proc/toggle_antagHUD_restrictions, /client/proc/set_ooc, - /client/proc/reset_ooc + /client/proc/reset_ooc, + /client/proc/toggledrones )) GLOBAL_LIST_INIT(admin_verbs_debug, list( /client/proc/cmd_admin_list_open_jobs, @@ -152,9 +148,7 @@ GLOBAL_LIST_INIT(admin_verbs_debug, list( /client/proc/debug_controller, /client/proc/cmd_debug_mob_lists, /client/proc/cmd_admin_delete, - /client/proc/cmd_debug_del_all, /client/proc/cmd_debug_del_sing, - /client/proc/reload_admins, /client/proc/restart_controller, /client/proc/enable_debug_verbs, /client/proc/toggledebuglogs, @@ -197,7 +191,7 @@ GLOBAL_LIST_INIT(admin_verbs_mod, list( /client/proc/player_panel_new, /client/proc/dsay, /datum/admins/proc/show_player_panel, - /client/proc/jobbans, + /client/proc/ban_panel, /client/proc/debug_variables /*allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify*/ )) GLOBAL_LIST_INIT(admin_verbs_mentor, list( @@ -367,19 +361,8 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( to_chat(mob, "Invisimin on. You are now as invisible as a ghost.") mob.remove_from_all_data_huds() -/client/proc/player_panel() - set name = "Player Panel" - set category = "Admin" - - if(!check_rights(R_ADMIN)) - return - - holder.player_panel_old() - feedback_add_details("admin_verb","PP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - return - /client/proc/player_panel_new() - set name = "Player Panel New" + set name = "Player Panel" set category = "Admin" if(!check_rights(R_ADMIN|R_MOD)) @@ -401,22 +384,8 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( feedback_add_details("admin_verb","CHA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return -/client/proc/jobbans() - set name = "Display Job bans" - set category = "Admin" - - if(!check_rights(R_ADMIN|R_MOD)) - return - - if(config.ban_legacy_system) - holder.Jobbans() - else - holder.DB_ban_panel() - feedback_add_details("admin_verb","VJB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - return - -/client/proc/unban_panel() - set name = "Unban Panel" +/client/proc/ban_panel() + set name = "Ban Panel" set category = "Admin" if(!check_rights(R_BAN)) @@ -809,7 +778,7 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( set desc = "Allows you to change the mob appearance" set category = null - if(!check_rights(R_ADMIN)) + if(!check_rights(R_EVENT)) return if(!istype(H)) @@ -835,7 +804,7 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( set desc = "Allows the mob to change its appearance" set category = null - if(!check_rights(R_ADMIN)) + if(!check_rights(R_EVENT)) return if(!istype(H)) @@ -980,8 +949,8 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( else to_chat(usr, "You now won't get debug log messages") -/client/proc/man_up(mob/T as mob in GLOB.mob_list) - set category = "Admin" +/client/proc/man_up(mob/T as mob in GLOB.player_list) + set category = null set name = "Man Up" set desc = "Tells mob to man up and deal with it." diff --git a/code/modules/admin/banjob.dm b/code/modules/admin/banjob.dm index 2122f88f4ed..699eca075bb 100644 --- a/code/modules/admin/banjob.dm +++ b/code/modules/admin/banjob.dm @@ -42,20 +42,6 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ## else return 0 -/* -DEBUG -/mob/verb/list_all_jobbans() - set name = "list all jobbans" - - for(var/s in jobban_keylist) - to_chat(world, s) - -/mob/verb/reload_jobbans() - set name = "reload jobbans" - - jobban_loadbanfile() -*/ - /proc/jobban_loadbanfile() if(config.ban_legacy_system) var/savefile/S=new("data/job_full.ban") diff --git a/code/modules/admin/machine_upgrade.dm b/code/modules/admin/machine_upgrade.dm index 1e569b51d2d..4f38f70613d 100644 --- a/code/modules/admin/machine_upgrade.dm +++ b/code/modules/admin/machine_upgrade.dm @@ -1,20 +1,20 @@ /proc/machine_upgrade(obj/machinery/M in world) set name = "Tweak Component Ratings" - set category = "Debug" + set category = null - if(!check_rights(R_DEBUG)) + if(!check_rights(R_DEBUG)) return - + if(!istype(M)) to_chat(usr, "This can only be used on subtypes of /obj/machinery.") return - + var/new_rating = input("Enter new rating:","Num") as num if(!isnull(new_rating) && M.component_parts) for(var/obj/item/stock_parts/P in M.component_parts) P.rating = new_rating M.RefreshParts() - + message_admins("[key_name_admin(usr)] has set the component rating of [M] to [new_rating]") log_admin("[key_name(usr)] has set the component rating of [M] to [new_rating]") diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 1c6bab4d3cd..c2248261baa 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -332,65 +332,6 @@ usr << browse(dat, "window=players;size=600x480") -//The old one -/datum/admins/proc/player_panel_old() - if(!usr.client.holder) - return - var/dat = "Player Menu" - dat += "" - //add to this if wanting to add back in IP checking - //add if you want to know their ip to the lists below - var/list/mobs = sortmobs() - - for(var/mob/M in mobs) - if(!M.ckey) continue - - dat += "" - if(isAI(M)) - dat += "" - else if(isrobot(M)) - dat += "" - else if(issmall(M)) - dat += "" - else if(ishuman(M)) - dat += "" - else if(istype(M, /mob/living/silicon/pai)) - dat += "" - else if(isnewplayer(M)) - dat += "" - else if(isobserver(M)) - dat += "" - else if(isalien(M)) - dat += "" - else - dat += "" - - - if(istype(M,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - if(H.mind && H.mind.assigned_role) - dat += "" - else - dat += "" - - - dat += {" - - - "} - switch(is_special_character(M)) - if(0) - dat += {""} - if(1) - dat += {""} - if(2) - dat += {""} - - dat += "
NameReal NameAssigned JobKeyOptionsPMTraitor?
IP:(IP: [M.lastKnownIP])
[M.name]AICyborgMonkey[M.real_name]pAINew PlayerGhostAlienUnknown[H.mind.assigned_role]NA[(M.client ? "[M.client]" : "No client")]XPMTraitor?Traitor?Traitor?
" - - usr << browse(dat, "window=players;size=640x480") - - /datum/admins/proc/check_antagonists_line(mob/M, caption = "", close = 1) var/logout_status diff --git a/code/modules/admin/sql_notes.dm b/code/modules/admin/sql_notes.dm index a438a43eaec..04e28737479 100644 --- a/code/modules/admin/sql_notes.dm +++ b/code/modules/admin/sql_notes.dm @@ -2,7 +2,8 @@ if(checkrights && !check_rights(R_ADMIN|R_MOD)) return if(!GLOB.dbcon.IsConnected()) - to_chat(usr, "Failed to establish database connection.") + if(usr) + to_chat(usr, "Failed to establish database connection.") return if(!target_ckey) @@ -19,7 +20,8 @@ log_game("SQL ERROR obtaining ckey from player table. Error : \[[err]\]\n") return if(!query_find_ckey.NextRow()) - to_chat(usr, "[target_ckey] has not been seen before, you can only add notes to known players.") + if(usr) + to_chat(usr, "[target_ckey] has not been seen before, you can only add notes to known players.") return var/exp_data = query_find_ckey.item[2] @@ -52,8 +54,8 @@ log_game("SQL ERROR adding new note to table. Error : \[[err]\]\n") return if(logged) - log_admin("[key_name(usr)] has added a note to [target_ckey]: [notetext]") - message_admins("[key_name_admin(usr)] has added a note to [target_ckey]:
[notetext]") + log_admin("[usr ? key_name(usr) : adminckey] has added a note to [target_ckey]: [notetext]") + message_admins("[usr ? key_name_admin(usr) : adminckey] has added a note to [target_ckey]:
[notetext]") show_note(target_ckey) /proc/remove_note(note_id) @@ -63,7 +65,8 @@ var/notetext var/adminckey if(!GLOB.dbcon.IsConnected()) - to_chat(usr, "Failed to establish database connection.") + if(usr) + to_chat(usr, "Failed to establish database connection.") return if(!note_id) return @@ -82,15 +85,16 @@ var/err = query_del_note.ErrorMsg() log_game("SQL ERROR removing note from table. Error : \[[err]\]\n") return - log_admin("[key_name(usr)] has removed a note made by [adminckey] from [ckey]: [notetext]") - message_admins("[key_name_admin(usr)] has removed a note made by [adminckey] from [ckey]:
[notetext]") + log_admin("[usr ? key_name(usr) : "Bot"] has removed a note made by [adminckey] from [ckey]: [notetext]") + message_admins("[usr ? key_name_admin(usr) : "Bot"] has removed a note made by [adminckey] from [ckey]:
[notetext]") show_note(ckey) /proc/edit_note(note_id) if(!check_rights(R_ADMIN|R_MOD)) return if(!GLOB.dbcon.IsConnected()) - to_chat(usr, "Failed to establish database connection.") + if(usr) + to_chat(usr, "Failed to establish database connection.") return if(!note_id) return @@ -117,8 +121,8 @@ var/err = query_update_note.ErrorMsg() log_game("SQL ERROR editing note. Error : \[[err]\]\n") return - log_admin("[key_name(usr)] has edited [target_ckey]'s note made by [adminckey] from \"[old_note]\" to \"[new_note]\"") - message_admins("[key_name_admin(usr)] has edited [target_ckey]'s note made by [adminckey] from \"[old_note]\" to \"[new_note]\"") + log_admin("[usr ? key_name(usr) : "Bot"] has edited [target_ckey]'s note made by [adminckey] from \"[old_note]\" to \"[new_note]\"") + message_admins("[usr ? key_name_admin(usr) : "Bot"] has edited [target_ckey]'s note made by [adminckey] from \"[old_note]\" to \"[new_note]\"") show_note(target_ckey) /proc/show_note(target_ckey, index, linkless = 0) diff --git a/code/modules/admin/tickets/adminticketsverbs.dm b/code/modules/admin/tickets/adminticketsverbs.dm index 406019745f8..4e8e79f2a26 100644 --- a/code/modules/admin/tickets/adminticketsverbs.dm +++ b/code/modules/admin/tickets/adminticketsverbs.dm @@ -5,7 +5,7 @@ set name = "Open Admin Ticket Interface" set category = "Admin" - if(!holder || !check_rights(R_ADMIN)) + if(!check_rights(R_ADMIN)) return SStickets.showUI(usr) @@ -14,7 +14,7 @@ set name = "Resolve All Open Admin Tickets" set category = null - if(!holder || !check_rights(R_ADMIN)) + if(!check_rights(R_ADMIN)) return if(alert("Are you sure you want to resolve ALL open admin tickets?","Resolve all open admin tickets?","Yes","No") != "Yes") diff --git a/code/modules/admin/tickets/mentorticketsverbs.dm b/code/modules/admin/tickets/mentorticketsverbs.dm index d65f4a30220..c7bec3e043d 100644 --- a/code/modules/admin/tickets/mentorticketsverbs.dm +++ b/code/modules/admin/tickets/mentorticketsverbs.dm @@ -5,7 +5,7 @@ set name = "Open Mentor Ticket Interface" set category = "Admin" - if(!holder || !check_rights(R_MENTOR|R_ADMIN)) + if(!check_rights(R_MENTOR|R_ADMIN)) return SSmentor_tickets.showUI(usr) @@ -14,7 +14,7 @@ set name = "Resolve All Open Mentor Tickets" set category = null - if(!holder || !check_rights(R_ADMIN)) + if(!check_rights(R_ADMIN)) return if(alert("Are you sure you want to resolve ALL open mentor tickets?","Resolve all open mentor tickets?","Yes","No") != "Yes") diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 19bbc40ba25..2390394b280 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -14,7 +14,7 @@ if(!check_rights(R_ADMIN|R_MOD)) return var/client/C = locateUID(href_list["rejectadminhelp"]) - if(!C) + if(!isclient(C)) return C << 'sound/effects/adminhelp.ogg' @@ -114,39 +114,39 @@ switch(bantype) if(BANTYPE_PERMA) if(!banckey || !banreason) - to_chat(usr, "Not enough parameters (Requires ckey and reason)") + to_chat(usr, "Not enough parameters (Requires ckey and reason)") return banduration = null banjob = null if(BANTYPE_TEMP) if(!banckey || !banreason || !banduration) - to_chat(usr, "Not enough parameters (Requires ckey, reason and duration)") + to_chat(usr, "Not enough parameters (Requires ckey, reason and duration)") return banjob = null if(BANTYPE_JOB_PERMA) if(!banckey || !banreason || !banjob) - to_chat(usr, "Not enough parameters (Requires ckey, reason and job)") + to_chat(usr, "Not enough parameters (Requires ckey, reason and job)") return banduration = null if(BANTYPE_JOB_TEMP) if(!banckey || !banreason || !banjob || !banduration) - to_chat(usr, "Not enough parameters (Requires ckey, reason and job)") + to_chat(usr, "Not enough parameters (Requires ckey, reason and job)") return if(BANTYPE_APPEARANCE) if(!banckey || !banreason) - to_chat(usr, "Not enough parameters (Requires ckey and reason)") + to_chat(usr, "Not enough parameters (Requires ckey and reason)") return banduration = null banjob = null if(BANTYPE_ADMIN_PERMA) if(!banckey || !banreason) - to_chat(usr, "Not enough parameters (Requires ckey and reason)") + to_chat(usr, "Not enough parameters (Requires ckey and reason)") return banduration = null banjob = null if(BANTYPE_ADMIN_TEMP) if(!banckey || !banreason || !banduration) - to_chat(usr, "Not enough parameters (Requires ckey, reason and duration)") + to_chat(usr, "Not enough parameters (Requires ckey, reason and duration)") return banjob = null @@ -324,8 +324,8 @@ if(!check_rights(R_SPAWN)) return var/mob/M = locateUID(href_list["mob"]) - if(!ismob(M)) - to_chat(usr, "This can only be used on instances of type /mob") + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") return var/delmob = 0 @@ -436,18 +436,18 @@ if(!check_rights(R_BAN)) return var/mob/M = locateUID(href_list["appearanceban"]) - if(!ismob(M)) - to_chat(usr, "This can only be used on instances of type /mob") + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") return if(!M.ckey) //sanity - to_chat(usr, "This mob has no ckey") + to_chat(usr, "This mob has no ckey") return var/ban_ckey_param = href_list["dbbanaddckey"] var/banreason = appearance_isbanned(M) if(banreason) /* if(!config.ban_legacy_system) - to_chat(usr, "Unfortunately, database based unbanning cannot be done through this panel") + to_chat(usr, "Unfortunately, database based unbanning cannot be done through this panel") DB_ban_panel(M.ckey) return */ switch(alert("Reason: '[banreason]' Remove appearance ban?","Please Confirm","Yes","No")) @@ -458,7 +458,7 @@ DB_ban_unban(M.ckey, BANTYPE_APPEARANCE) appearance_unban(M) message_admins("[key_name_admin(usr)] removed [key_name_admin(M)]'s appearance ban", 1) - to_chat(M, "[usr.client.ckey] has removed your appearance ban.") + to_chat(M, "[usr.client.ckey] has removed your appearance ban.") else switch(alert("Appearance ban [M.ckey]?",,"Yes","No", "Cancel")) if("Yes") @@ -473,7 +473,7 @@ appearance_fullban(M, "[reason]; By [usr.ckey] on [time2text(world.realtime)]") add_note(M.ckey, "Appearance banned - [reason]", null, usr.ckey, 0) message_admins("[key_name_admin(usr)] appearance banned [key_name_admin(M)]", 1) - to_chat(M, "You have been appearance banned by [usr.client.ckey].") + to_chat(M, "You have been appearance banned by [usr.client.ckey].") to_chat(M, "The reason is: [reason]") to_chat(M, "Appearance ban can be lifted only upon request.") if(config.banappeals) @@ -487,15 +487,15 @@ // if(!check_rights(R_BAN)) return var/mob/M = locateUID(href_list["jobban2"]) - if(!ismob(M)) - to_chat(usr, "This can only be used on instances of type /mob") + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") return if(!M.ckey) //sanity - to_chat(usr, "This mob has no ckey") + to_chat(usr, "This mob has no ckey") return if(!SSjobs) - to_chat(usr, "SSjobs has not been setup!") + to_chat(usr, "SSjobs has not been setup!") return var/dat = "" @@ -735,8 +735,8 @@ if(!check_rights(R_BAN)) return var/mob/M = locateUID(href_list["jobban4"]) - if(!ismob(M)) - to_chat(usr, "This can only be used on instances of type /mob") + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") return if(M != usr) //we can jobban ourselves @@ -747,7 +747,7 @@ var/ban_ckey_param = href_list["dbbanaddckey"] if(!SSjobs) - to_chat(usr, "SSjobs has not been setup!") + to_chat(usr, "SSjobs has not been setup!") return //get jobs for department if specified, otherwise just returnt he one job in a list. @@ -840,7 +840,7 @@ msg += ", [job]" add_note(M.ckey, "Banned from [msg] - [reason]", null, usr.ckey, 0) message_admins("[key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [mins] minutes", 1) - to_chat(M, "You have been jobbanned by [usr.client.ckey] from: [msg].") + to_chat(M, "You have been jobbanned by [usr.client.ckey] from: [msg].") to_chat(M, "The reason is: [reason]") to_chat(M, "This jobban will be lifted in [mins] minutes.") href_list["jobban2"] = 1 // lets it fall through and refresh @@ -861,7 +861,7 @@ else msg += ", [job]" add_note(M.ckey, "Banned from [msg] - [reason]", null, usr.ckey, 0) message_admins("[key_name_admin(usr)] banned [key_name_admin(M)] from [msg]", 1) - to_chat(M, "You have been jobbanned by [usr.client.ckey] from: [msg].") + to_chat(M, "You have been jobbanned by [usr.client.ckey] from: [msg].") to_chat(M, "The reason is: [reason]") to_chat(M, "Jobban can be lifted only upon request.") href_list["jobban2"] = 1 // lets it fall through and refresh @@ -873,7 +873,7 @@ //all jobs in joblist are banned already OR we didn't give a reason (implying they shouldn't be banned) if(joblist.len) //at least 1 banned job exists in joblist so we have stuff to unban. if(!config.ban_legacy_system) - to_chat(usr, "Unfortunately, database based unbanning cannot be done through this panel") + to_chat(usr, "Unfortunately, database based unbanning cannot be done through this panel") DB_ban_panel(M.ckey) return var/msg @@ -894,22 +894,33 @@ continue if(msg) message_admins("[key_name_admin(usr)] unbanned [key_name_admin(M)] from [msg]", 1) - to_chat(M, "You have been un-jobbanned by [usr.client.ckey] from [msg].") + to_chat(M, "You have been un-jobbanned by [usr.client.ckey] from [msg].") href_list["jobban2"] = 1 // lets it fall through and refresh return 1 return 0 //we didn't do anything! else if(href_list["boot2"]) var/mob/M = locateUID(href_list["boot2"]) - if(ismob(M)) - if(M.client && M.client.holder && (M.client.holder.rights & R_BAN)) - to_chat(usr, "[key_name_admin(M)] cannot be kicked from the server.") + if(!ismob(M)) + return + var/client/C = M.client + if(C == null) + to_chat(usr, "Mob has no client to kick.") + return + if(alert("Kick [C.ckey]?",,"Yes","No") == "Yes") + if(C && C.holder && (C.holder.rights & R_BAN)) + to_chat(usr, "[key_name_admin(C)] cannot be kicked from the server.") return - to_chat(M, "You have been kicked from the server") - log_admin("[key_name(usr)] booted [key_name(M)].") - message_admins("[key_name_admin(usr)] booted [key_name_admin(M)].", 1) - //M.client = null - qdel(M.client) + to_chat(C, "You have been kicked from the server") + log_admin("[key_name(usr)] booted [key_name(C)].") + message_admins("[key_name_admin(usr)] booted [key_name_admin(C)].", 1) + //C = null + qdel(C) + + else if(href_list["open_logging_view"]) + var/mob/M = locateUID(href_list["open_logging_view"]) + if(ismob(M)) + usr.client.open_logging_view(list(M), TRUE) //Player Notes else if(href_list["addnote"]) @@ -981,7 +992,7 @@ if(!check_rights(R_BAN)) return var/mob/M = locateUID(href_list["newban"]) - if(!ismob(M)) + if(!istype(M, /mob)) return var/ban_ckey_param = href_list["dbbanaddckey"] @@ -997,7 +1008,7 @@ M = admin_ban_mobsearch(M, ban_ckey_param, usr) AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins) ban_unban_log_save("[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.") - to_chat(M, "You have been banned by [usr.client.ckey].\nReason: [reason].") + to_chat(M, "You have been banned by [usr.client.ckey].\nReason: [reason].") to_chat(M, "This is a temporary ban, it will be removed in [mins] minutes.") feedback_inc("ban_tmp",1) DB_ban_record(BANTYPE_TEMP, M, mins, reason) @@ -1017,7 +1028,7 @@ if(!reason) return AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, M.lastKnownIP) - to_chat(M, "You have been banned by [usr.client.ckey].\nReason: [reason].") + to_chat(M, "You have been banned by [usr.client.ckey].\nReason: [reason].") to_chat(M, "This ban does not expire automatically and must be appealed.") if(M.client) M.client.link_forum_account(TRUE) @@ -1085,7 +1096,7 @@ return var/mob/M = locateUID(href_list["mute"]) - if(!ismob(M)) return + if(!istype(M, /mob)) return if(!M.client) return var/mute_type = href_list["mute_type"] @@ -1099,7 +1110,7 @@ if(SSticker && SSticker.mode) return alert(usr, "The game has already started.", null, null, null, null) - var/dat = {"What mode do you wish to play?
"} + var/dat = {"What mode do you wish to play?
"} for(var/mode in config.modes) dat += {"[config.mode_names[mode]]
"} dat += {"Secret
"} @@ -1114,7 +1125,7 @@ return alert(usr, "The game has already started.", null, null, null, null) if(GLOB.master_mode != "secret") return alert(usr, "The game mode has to be secret!", null, null, null, null) - var/dat = {"What game mode do you want to force secret to be? Use this if you want to change the game mode, but want the players to believe it's secret. This will only work if the current game mode is secret.
"} + var/dat = {"What game mode do you want to force secret to be? Use this if you want to change the game mode, but want the players to believe it's secret. This will only work if the current game mode is secret.
"} for(var/mode in config.modes) dat += {"[config.mode_names[mode]]
"} dat += {"Random (default)
"} @@ -1152,7 +1163,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["monkeyone"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make monkey?",, "Yes", "No") != "Yes") return @@ -1167,7 +1178,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["corgione"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make corgi?",, "Yes", "No") != "Yes") @@ -1182,7 +1193,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["makePAI"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make pai?",, "Yes", "No") != "Yes") return @@ -1205,8 +1216,9 @@ if(!check_rights(R_SERVER|R_EVENT)) return var/mob/M = locateUID(href_list["forcespeech"]) - if(!ismob(M)) - to_chat(usr, "this can only be used on instances of type /mob") + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return var/speech = input("What will [key_name(M)] say?.", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins. if(!speech) return @@ -1222,11 +1234,11 @@ return var/mob/M = locateUID(href_list["sendtoprison"]) - if(!ismob(M)) - to_chat(usr, "This can only be used on instances of type /mob") + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") + to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") return var/turf/prison_cell = pick(GLOB.prisonwarp) @@ -1285,6 +1297,71 @@ NP.ckey = M.ckey qdel(M) + else if(href_list["eraseflavortext"]) + if(!check_rights(R_ADMIN)) + return + + var/mob/M = locateUID(href_list["eraseflavortext"]) + + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return + + if(!M.client) + to_chat(usr, "[M] doesn't seem to have an active client.") + return + + if(M.flavor_text == "" && M.client.prefs.flavor_text == "") + to_chat(usr, "[M] has no flavor text set.") + return + + if(alert(usr, "Erase [key_name(M)]'s flavor text?", "Message", "Yes", "No") != "Yes") + return + + log_admin("[key_name(usr)] has erased [key_name(M)]'s flavor text.") + message_admins("[key_name_admin(usr)] has erased [key_name_admin(M)]'s flavor text.") + + // Clears the mob's flavor text + M.flavor_text = "" + + // Clear and save the DB character's flavor text + M.client.prefs.flavor_text = "" + M.client.prefs.save_character(M.client) + + else if(href_list["userandomname"]) + if(!check_rights(R_ADMIN)) + return + + var/mob/M = locateUID(href_list["userandomname"]) + + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return + + if(!M.client) + to_chat(usr, "[M] doesn't seem to have an active client.") + return + + if(alert(usr, "Force [key_name(M)] to use a random name?", "Message", "Yes", "No") != "Yes") + return + + log_admin("[key_name(usr)] has forced [key_name(M)] to use a random name.") + message_admins("[key_name_admin(usr)] has forced [key_name_admin(M)] to use a random name.") + + // Update the mob's name with a random one straight away + var/random_name = random_name(M.client.prefs.gender, M.client.prefs.species) + M.rename_character(M.real_name, random_name) + + // Save that random name for next rounds + M.client.prefs.real_name = random_name + M.client.prefs.save_character(M.client) + + else if(href_list["asays"]) + if(!check_rights(R_ADMIN)) + return + + usr.client.view_asays() + else if(href_list["tdome1"]) if(!check_rights(R_SERVER|R_EVENT)) return @@ -1292,11 +1369,11 @@ return var/mob/M = locateUID(href_list["tdome1"]) - if(!ismob(M)) - to_chat(usr, "This can only be used on instances of type /mob") + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") + to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") return for(var/obj/item/I in M) @@ -1322,11 +1399,11 @@ return var/mob/M = locateUID(href_list["tdome2"]) - if(!ismob(M)) - to_chat(usr, "This can only be used on instances of type /mob") + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") + to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") return for(var/obj/item/I in M) @@ -1352,11 +1429,11 @@ return var/mob/M = locateUID(href_list["tdomeadmin"]) - if(!ismob(M)) - to_chat(usr, "This can only be used on instances of type /mob") + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") + to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") return M.Paralyse(5) @@ -1374,11 +1451,11 @@ return var/mob/M = locateUID(href_list["tdomeobserve"]) - if(!ismob(M)) - to_chat(usr, "This can only be used on instances of type /mob") + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") + to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") return for(var/obj/item/I in M) @@ -1408,11 +1485,11 @@ return var/mob/M = locateUID(href_list["aroomwarp"]) - if(!ismob(M)) - to_chat(usr, "This can only be used on instances of type /mob") + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") + to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") return M.Paralyse(5) @@ -1429,7 +1506,7 @@ var/mob/living/L = locateUID(href_list["revive"]) if(!istype(L)) - to_chat(usr, "This can only be used on instances of type /mob/living") + to_chat(usr, "This can only be used on instances of type /mob/living") return L.revive() @@ -1441,7 +1518,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["makeai"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make ai?",, "Yes", "No") != "Yes") @@ -1457,7 +1534,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["makealien"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make alien?",, "Yes", "No") != "Yes") return @@ -1469,7 +1546,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["makeslime"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make slime?",, "Yes", "No") != "Yes") return @@ -1481,7 +1558,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["makesuper"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make superhero?",, "Yes", "No") != "Yes") @@ -1494,7 +1571,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["makerobot"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(alert(usr, "Confirm make robot?",, "Yes", "No") != "Yes") return @@ -1506,7 +1583,7 @@ var/mob/M = locateUID(href_list["makeanimal"]) if(isnewplayer(M)) - to_chat(usr, "This cannot be used on instances of type /mob/new_player") + to_chat(usr, "This cannot be used on instances of type /mob/new_player") return if(alert(usr, "Confirm make animal?",, "Yes", "No") != "Yes") return @@ -1519,10 +1596,14 @@ var/mob/dead/observer/G = locateUID(href_list["incarn_ghost"]) if(!istype(G)) - to_chat(usr, "This will only work on /mob/dead/observer") + to_chat(usr, "This will only work on /mob/dead/observer") + return var/posttransformoutfit = usr.client.robust_dress_shop() + if(!posttransformoutfit) + return + var/mob/living/carbon/human/H = G.incarnate_ghost() if(posttransformoutfit && istype(H)) @@ -1536,7 +1617,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["togmutate"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return var/block=text2num(href_list["block"]) //testing("togmutate([href_list["block"]] -> [block])") @@ -1546,6 +1627,11 @@ else if(href_list["adminplayeropts"]) var/mob/M = locateUID(href_list["adminplayeropts"]) + + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return + show_player_panel(M) else if(href_list["adminplayerobservefollow"]) @@ -1555,6 +1641,11 @@ return C.admin_ghost() var/mob/M = locateUID(href_list["adminplayerobservefollow"]) + + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return + var/mob/dead/observer/A = C.mob sleep(2) A.ManualFollow(M) @@ -1583,6 +1674,12 @@ return SStickets.autoRespond(index) + if(href_list["convert_ticket"]) + var/indexNum = text2num(href_list["convert_ticket"]) + if(href_list["is_mhelp"]) + SSmentor_tickets.convert_to_other_ticket(indexNum) + else + SStickets.convert_to_other_ticket(indexNum) else if(href_list["cult_nextobj"]) if(alert(usr, "Validate the current Cult objective and unlock the next one?", "Cult Cheat Code", "Yes", "No") != "Yes") return @@ -1603,10 +1700,10 @@ for(var/datum/mind/H in SSticker.mode.cult) if (H.current) - to_chat(H.current, "[SSticker.cultdat.entity_name] murmurs, [input]") + to_chat(H.current, "[SSticker.cultdat.entity_name] murmurs, [input]") for(var/mob/dead/observer/O in GLOB.player_list) - to_chat(O, "[SSticker.cultdat.entity_name] murmurs, [input]") + to_chat(O, "[SSticker.cultdat.entity_name] murmurs, [input]") message_admins("Admin [key_name_admin(usr)] has talked with the Voice of [SSticker.cultdat.entity_name].") log_admin("[key_name(usr)] Voice of [SSticker.cultdat.entity_name]: [input]") @@ -1628,6 +1725,11 @@ else if(href_list["adminmoreinfo"]) var/mob/M = locateUID(href_list["adminmoreinfo"]) + + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return + admin_mob_info(M) else if(href_list["adminspawncookie"]) @@ -1635,7 +1737,7 @@ var/mob/living/carbon/human/H = locateUID(href_list["adminspawncookie"]) if(!ishuman(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return H.equip_to_slot_or_del( new /obj/item/reagent_containers/food/snacks/cookie(H), slot_l_hand ) @@ -1659,7 +1761,7 @@ var/mob/living/M = locateUID(href_list["BlueSpaceArtillery"]) if(!isliving(M)) - to_chat(usr, "This can only be used on instances of type /mob/living") + to_chat(usr, "This can only be used on instances of type /mob/living") return if(alert(owner, "Are you sure you wish to hit [key_name(M)] with Bluespace Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes") @@ -1697,6 +1799,11 @@ return var/mob/M = locateUID(href_list["CentcommReply"]) + + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return + usr.client.admin_headset_message(M, "Centcomm") else if(href_list["SyndicateReply"]) @@ -1704,6 +1811,11 @@ return var/mob/M = locateUID(href_list["SyndicateReply"]) + + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return + usr.client.admin_headset_message(M, "Syndicate") else if(href_list["HeadsetMessage"]) @@ -1711,6 +1823,11 @@ return var/mob/M = locateUID(href_list["HeadsetMessage"]) + + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return + usr.client.admin_headset_message(M) else if(href_list["EvilFax"]) @@ -1718,7 +1835,7 @@ return var/mob/living/carbon/human/H = locateUID(href_list["EvilFax"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return var/etypes = list("Borgification", "Corgification", "Death By Fire", "Total Brain Death", "Honk Tumor", "Cluwne", "Demote", "Demote with Bot", "Revoke Fax Access", "Angry Fax Machine") var/eviltype = input(src.owner, "Which type of evil fax do you wish to send [H]?","Its good to be baaaad...", "") as null|anything in etypes @@ -1752,12 +1869,12 @@ P.ico = new P.ico += "paper_stamp-[stampvalue]" P.overlays += stampoverlay - P.stamps += "
" + P.stamps += "
" P.update_icon() P.faxmachineid = fax.UID() P.loc = fax.loc // Do not use fax.receivefax(P) here, as it won't preserve the type. Physically teleporting the fax paper is required. if(istype(H) && H.stat == CONSCIOUS && (istype(H.l_ear, /obj/item/radio/headset) || istype(H.r_ear, /obj/item/radio/headset))) - to_chat(H, "Your headset pings, notifying you that a reply to your fax has arrived.") + to_chat(H, "Your headset pings, notifying you that a reply to your fax has arrived.") to_chat(src.owner, "You sent a [eviltype] fax to [H]") log_admin("[key_name(src.owner)] sent [key_name(H)] a [eviltype] fax") message_admins("[key_name_admin(src.owner)] replied to [key_name_admin(H)] with a [eviltype] fax") @@ -1766,7 +1883,7 @@ return var/mob/living/M = locateUID(href_list["Bless"]) if(!istype(M)) - to_chat(usr, "This can only be used on instances of type /mob/living") + to_chat(usr, "This can only be used on instances of type /mob/living") return var/btypes = list("To Arrivals", "Moderate Heal") var/mob/living/carbon/human/H @@ -1833,7 +1950,7 @@ var/petchoice = input("Select pet type", "Pets") as null|anything in pets if(isnull(petchoice)) return - var/list/mob/dead/observer/candidates = pollCandidates("Play as the special event pet [H]?", poll_time = 200, min_hours = 10) + var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Play as the special event pet [H]?", poll_time = 20 SECONDS, min_hours = 10, source = petchoice) var/mob/dead/observer/theghost = null if(candidates.len) var/mob/living/simple_animal/pet/P = new petchoice(H.loc) @@ -1886,7 +2003,7 @@ var/mob/living/M = locateUID(href_list["Smite"]) var/mob/living/carbon/human/H if(!istype(M)) - to_chat(usr, "This can only be used on instances of type /mob/living") + to_chat(usr, "This can only be used on instances of type /mob/living") return var/ptypes = list("Lightning bolt", "Fire Death", "Gib") if(ishuman(M)) @@ -1997,7 +2114,7 @@ var/datum/antagonist/traitor/T = new() T.give_objectives = FALSE to_chat(newtraitormind.current, "ATTENTION: It is time to pay your debt to the Syndicate...") - to_chat(newtraitormind.current, "Goal: KILL [H.real_name], currently in [get_area(H.loc)]") + to_chat(newtraitormind.current, "Goal: KILL [H.real_name], currently in [get_area(H.loc)]") newtraitormind.add_antag_datum(T) else to_chat(usr, "ERROR: Unable to find any valid candidate to send after [H].") @@ -2026,10 +2143,10 @@ return var/mob/living/carbon/human/H = locateUID(href_list["cryossd"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(!href_list["cryoafk"] && !isLivingSSD(H)) - to_chat(usr, "This can only be used on living, SSD players.") + to_chat(usr, "This can only be used on living, SSD players.") return if(istype(H.loc, /obj/machinery/cryopod)) var/obj/machinery/cryopod/P = H.loc @@ -2049,28 +2166,28 @@ return var/mob/living/carbon/human/H = locateUID(href_list["FaxReplyTemplate"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return var/obj/item/paper/P = new /obj/item/paper(null) var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["originfax"]) P.name = "Central Command - paper" var/stypes = list("Handle it yourselves!","Illegible fax","Fax not signed","Not Right Now","You are wasting our time", "Keep up the good work", "ERT Instructions") var/stype = input(src.owner, "Which type of standard reply do you wish to send to [H]?","Choose your paperwork", "") as null|anything in stypes - var/tmsg = "



Nanotrasen Science Station [GLOB.using_map.station_short]


NAS Trurl Communications Department Report


" + var/tmsg = "



Nanotrasen Science Station [GLOB.using_map.station_short]


NAS Trurl Communications Department Report


" if(stype == "Handle it yourselves!") - tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

Please proceed in accordance with Standard Operating Procedure and/or Space Law. You are fully trained to handle this situation without Central Command intervention.

This is an automatic message." + tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

Please proceed in accordance with Standard Operating Procedure and/or Space Law. You are fully trained to handle this situation without Central Command intervention.

This is an automatic message." else if(stype == "Illegible fax") - tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

Your fax's grammar, syntax and/or typography are of a sub-par level and do not allow us to understand the contents of the message.

Please consult your nearest dictionary and/or thesaurus and try again.

This is an automatic message." + tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

Your fax's grammar, syntax and/or typography are of a sub-par level and do not allow us to understand the contents of the message.

Please consult your nearest dictionary and/or thesaurus and try again.

This is an automatic message." else if(stype == "Fax not signed") - tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

Your fax has not been correctly signed and, as such, we cannot verify your identity.

Please sign your faxes before sending them so that we may verify your identity.

This is an automatic message." + tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

Your fax has not been correctly signed and, as such, we cannot verify your identity.

Please sign your faxes before sending them so that we may verify your identity.

This is an automatic message." else if(stype == "Not Right Now") - tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

Due to pressing concerns of a matter above your current paygrade, we are unable to provide assistance in whatever matter your fax referenced.

This can be either due to a power outage, bureaucratic audit, pest infestation, Ascendance Event, corgi outbreak, or any other situation that would affect the proper functioning of the NAS Trurl.

Please try again later.

This is an automatic message." + tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

Due to pressing concerns of a matter above your current paygrade, we are unable to provide assistance in whatever matter your fax referenced.

This can be either due to a power outage, bureaucratic audit, pest infestation, Ascendance Event, corgi outbreak, or any other situation that would affect the proper functioning of the NAS Trurl.

Please try again later.

This is an automatic message." else if(stype == "You are wasting our time") - tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

In the interest of preventing further mismanagement of company resources, please avoid wasting our time with such petty drivel.

Do kindly remember that we expect our workforce to maintain at least a semi-decent level of profesionalism. Do not test our patience.

This is an automatic message." + tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

In the interest of preventing further mismanagement of company resources, please avoid wasting our time with such petty drivel.

Do kindly remember that we expect our workforce to maintain at least a semi-decent level of profesionalism. Do not test our patience.

This is an automatic message." else if(stype == "Keep up the good work") tmsg += "Greetings, esteemed crewmember. Your fax has been received successfully by NAS Trurl Fax Registration.

We at the NAS Trurl appreciate the good work that you have done here, and sincerely recommend that you continue such a display of dedication to the company.

This is absolutely not an automated message." else if(stype == "ERT Instructions") - tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

Please utilize the Card Swipers if you wish to call for an ERT.

This is an automated message." + tmsg += "Greetings, esteemed crewmember. Your fax has been DECLINED automatically by NAS Trurl Fax Registration.

Please utilize the Card Swipers if you wish to call for an ERT.

This is an automated message." else return tmsg += "
" @@ -2091,11 +2208,11 @@ P.ico = new P.ico += "paper_stamp-[stampvalue]" P.overlays += stampoverlay - P.stamps += "
" + P.stamps += "
" P.update_icon() fax.receivefax(P) if(istype(H) && H.stat == CONSCIOUS && (istype(H.l_ear, /obj/item/radio/headset) || istype(H.r_ear, /obj/item/radio/headset))) - to_chat(H, "Your headset pings, notifying you that a reply to your fax has arrived.") + to_chat(H, "Your headset pings, notifying you that a reply to your fax has arrived.") to_chat(src.owner, "You sent a standard '[stype]' fax to [H]") log_admin("[key_name(src.owner)] sent [key_name(H)] a standard '[stype]' fax") message_admins("[key_name_admin(src.owner)] replied to [key_name_admin(H)] with a standard '[stype]' fax") @@ -2103,10 +2220,10 @@ else if(href_list["HONKReply"]) var/mob/living/carbon/human/H = locateUID(href_list["HONKReply"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(!istype(H.l_ear, /obj/item/radio/headset) && !istype(H.r_ear, /obj/item/radio/headset)) - to_chat(usr, "The person you are trying to contact is not wearing a headset") + to_chat(usr, "The person you are trying to contact is not wearing a headset") return var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via [H.p_their()] headset.","Outgoing message from HONKplanet", "") @@ -2123,13 +2240,13 @@ if(alert(src.owner, "Accept or Deny ERT request?", "CentComm Response", "Accept", "Deny") == "Deny") var/mob/living/carbon/human/H = locateUID(href_list["ErtReply"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(H.stat != 0) - to_chat(usr, "The person you are trying to contact is not conscious.") + to_chat(usr, "The person you are trying to contact is not conscious.") return if(!istype(H.l_ear, /obj/item/radio/headset) && !istype(H.r_ear, /obj/item/radio/headset)) - to_chat(usr, "The person you are trying to contact is not wearing a headset") + to_chat(usr, "The person you are trying to contact is not wearing a headset") return var/input = input(src.owner, "Please enter a reason for denying [key_name(H)]'s ERT request.","Outgoing message from CentComm", "") @@ -2137,7 +2254,7 @@ GLOB.ert_request_answered = TRUE to_chat(src.owner, "You sent [input] to [H] via a secure channel.") log_admin("[src.owner] denied [key_name(H)]'s ERT request with the message [input].") - to_chat(H, "Incoming priority transmission from Central Command. Message as follows, Your ERT request has been denied for the following reasons: [input].") + to_chat(H, "Incoming priority transmission from Central Command. Message as follows, Your ERT request has been denied for the following reasons: [input].") else src.owner.response_team() @@ -2292,14 +2409,14 @@ P.stamped = new P.stamped += /obj/item/stamp/centcom P.overlays += stampoverlay - P.stamps += "
" + P.stamps += "
" else if(stamptype == "text") if(!P.stamped) P.stamped = new P.stamped += /obj/item/stamp P.overlays += stampoverlay - P.stamps += "
[stampvalue]" + P.stamps += "
[stampvalue]" if(destination != "All Departments") if(!fax.receivefax(P)) @@ -2329,7 +2446,7 @@ if(notify == "Yes") var/mob/living/carbon/human/H = sender if(istype(H) && H.stat == CONSCIOUS && (istype(H.l_ear, /obj/item/radio/headset) || istype(H.r_ear, /obj/item/radio/headset))) - to_chat(sender, "Your headset pings, notifying you that a reply to your fax has arrived.") + to_chat(sender, "Your headset pings, notifying you that a reply to your fax has arrived.") if(sender) log_admin("[key_name(src.owner)] replied to a fax message from [key_name(sender)]: [input]") message_admins("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(sender)] (VIEW).", 1) @@ -2348,8 +2465,8 @@ if(!check_rights(R_ADMIN)) return var/mob/M = locateUID(href_list["getplaytimewindow"]) - if(!M) - to_chat(usr, "ERROR: Mob not found.") + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") return cmd_mentor_show_exp_panel(M.client) @@ -2357,6 +2474,9 @@ if(!check_rights(R_ADMIN)) return var/mob/M = locateUID(href_list["jumpto"]) + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return usr.client.jumptomob(M) else if(href_list["getmob"]) @@ -2364,24 +2484,37 @@ if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return var/mob/M = locateUID(href_list["getmob"]) + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return usr.client.Getmob(M) else if(href_list["sendmob"]) if(!check_rights(R_ADMIN)) return var/mob/M = locateUID(href_list["sendmob"]) + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return usr.client.sendmob(M) else if(href_list["narrateto"]) if(!check_rights(R_ADMIN)) return var/mob/M = locateUID(href_list["narrateto"]) + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return usr.client.cmd_admin_direct_narrate(M) else if(href_list["subtlemessage"]) - if(!check_rights(R_ADMIN)) return + if(!check_rights(R_EVENT)) + return var/mob/M = locateUID(href_list["subtlemessage"]) + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") + return usr.client.cmd_admin_subtle_message(M) else if(href_list["traitor"]) @@ -2392,8 +2525,8 @@ return var/mob/M = locateUID(href_list["traitor"]) - if(!ismob(M)) - to_chat(usr, "This can only be used on instances of type /mob.") + if(!istype(M, /mob)) + to_chat(usr, "This can only be used on instances of type /mob") return show_traitor_panel(M) @@ -2462,7 +2595,7 @@ switch(where) if("inhand") if(!iscarbon(usr) && !isrobot(usr)) - to_chat(usr, "Can only spawn in hand when you're a carbon mob or cyborg.") + to_chat(usr, "Can only spawn in hand when you're a carbon mob or cyborg.") where = "onfloor" target = usr @@ -2474,10 +2607,10 @@ target = locate(loc.x + X,loc.y + Y,loc.z + Z) if("inmarked") if(!marked_datum) - to_chat(usr, "You don't have any object marked. Abandoning spawn.") + to_chat(usr, "You don't have any object marked. Abandoning spawn.") return else if(!istype(marked_datum,/atom)) - to_chat(usr, "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn.") + to_chat(usr, "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn.") return else target = marked_datum @@ -2542,7 +2675,7 @@ message_admins("[key_name_admin(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]") log_admin("[key_name(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]") else - to_chat(usr, "You may only use this when the game is running.") + to_chat(usr, "You may only use this when the game is running.") else if(href_list["memoeditlist"]) if(!check_rights(R_SERVER)) return @@ -2622,7 +2755,7 @@ feedback_add_details("admin_secrets_fun_used","TriAI") if("gravity") if(!(SSticker && SSticker.mode)) - to_chat(usr, "Please wait until the game starts! Not sure how it will work otherwise.") + to_chat(usr, "Please wait until the game starts! Not sure how it will work otherwise.") return GLOB.gravity_is_on = !GLOB.gravity_is_on for(var/area/A in world) @@ -2959,7 +3092,7 @@ if(usr) log_admin("[key_name(usr)] used secret [href_list["secretsfun"]]") if(ok) - to_chat(world, text("A secret has been activated by []!", usr.key)) + to_chat(world, text("A secret has been activated by []!", usr.key)) else if(href_list["secretsadmin"]) if(!check_rights(R_ADMIN)) return @@ -2967,17 +3100,17 @@ var/ok = 0 switch(href_list["secretsadmin"]) if("list_signalers") - var/dat = "Showing last [length(GLOB.lastsignalers)] signalers.
" + var/dat = "Showing last [length(GLOB.lastsignalers)] signalers.
" for(var/sig in GLOB.lastsignalers) dat += "[sig]
" usr << browse(dat, "window=lastsignalers;size=800x500") if("list_lawchanges") - var/dat = "Showing last [length(GLOB.lawchanges)] law changes.
" + var/dat = "Showing last [length(GLOB.lawchanges)] law changes.
" for(var/sig in GLOB.lawchanges) dat += "[sig]
" usr << browse(dat, "window=lawchanges;size=800x500") if("list_job_debug") - var/dat = "Job Debug info.
" + var/dat = "Job Debug info.
" if(SSjobs) for(var/line in SSjobs.job_debug) dat += "[line]
" @@ -2995,7 +3128,7 @@ alert("The game mode is [SSticker.mode.name]") else alert("For some reason there's a ticker, but not a game mode") if("manifest") - var/dat = "Showing Crew Manifest.
" + var/dat = "Showing Crew Manifest.
" dat += "" for(var/thing in GLOB.human_list) var/mob/living/carbon/human/H = thing @@ -3006,7 +3139,7 @@ if("check_antagonist") check_antagonists() if("DNA") - var/dat = "Showing DNA from blood.
" + var/dat = "Showing DNA from blood.
" dat += "
NamePosition
" for(var/thing in GLOB.human_list) var/mob/living/carbon/human/H = thing @@ -3015,7 +3148,7 @@ dat += "
NameDNABlood Type
" usr << browse(dat, "window=DNA;size=440x410") if("fingerprints") - var/dat = "Showing Fingerprints.
" + var/dat = "Showing Fingerprints.
" dat += "" for(var/thing in GLOB.human_list) var/mob/living/carbon/human/H = thing @@ -3050,14 +3183,14 @@ if(usr) log_admin("[key_name(usr)] used secret [href_list["secretsadmin"]]") if(ok) - to_chat(world, text("A secret has been activated by []!", usr.key)) + to_chat(world, text("A secret has been activated by []!", usr.key)) else if(href_list["secretscoder"]) if(!check_rights(R_DEBUG)) return switch(href_list["secretscoder"]) if("spawn_objects") - var/dat = "Admin Log
" + var/dat = "Admin Log
" for(var/l in GLOB.admin_log) dat += "
  • [l]
  • " if(!GLOB.admin_log.len) @@ -3227,27 +3360,27 @@ else if(href_list["ac_censor_channel_author"]) var/datum/feed_channel/FC = locate(href_list["ac_censor_channel_author"]) - if(FC.author != "\[REDACTED\]") + if(FC.author != "\[REDACTED\]") FC.backup_author = FC.author - FC.author = "\[REDACTED\]" + FC.author = "\[REDACTED\]" else FC.author = FC.backup_author src.access_news_network() else if(href_list["ac_censor_channel_story_author"]) var/datum/feed_message/MSG = locate(href_list["ac_censor_channel_story_author"]) - if(MSG.author != "\[REDACTED\]") + if(MSG.author != "\[REDACTED\]") MSG.backup_author = MSG.author - MSG.author = "\[REDACTED\]" + MSG.author = "\[REDACTED\]" else MSG.author = MSG.backup_author src.access_news_network() else if(href_list["ac_censor_channel_story_body"]) var/datum/feed_message/MSG = locate(href_list["ac_censor_channel_story_body"]) - if(MSG.body != "\[REDACTED\]") + if(MSG.body != "\[REDACTED\]") MSG.backup_body = MSG.body - MSG.body = "\[REDACTED\]" + MSG.body = "\[REDACTED\]" else MSG.body = MSG.backup_body src.access_news_network() @@ -3443,14 +3576,15 @@ return var/datum/outfit/O = hunter_outfits[dresscode] message_admins("[key_name_admin(mob)] is sending a ([dresscode]) to [killthem ? "assassinate" : "protect"] [key_name_admin(H)]...") - var/list/candidates = pollCandidates("Play as a [killthem ? "murderous" : "protective"] [dresscode]?", ROLE_TRAITOR, 1) + var/image/source = image('icons/obj/cardboard_cutout.dmi', "cutout_traitor") + var/list/candidates = SSghost_spawns.poll_candidates("Play as a [killthem ? "murderous" : "protective"] [dresscode]?", ROLE_TRAITOR, TRUE, source = source) if(!candidates.len) - to_chat(usr, "ERROR: Could not create eventmob. No valid candidates.") + to_chat(usr, "ERROR: Could not create eventmob. No valid candidates.") return var/mob/C = pick(candidates) var/key_of_hunter = C.key if(!key_of_hunter) - to_chat(usr, "ERROR: Could not create eventmob. Could not pick key.") + to_chat(usr, "ERROR: Could not create eventmob. Could not pick key.") return var/datum/mind/hunter_mind = new /datum/mind(key_of_hunter) hunter_mind.active = 1 @@ -3481,9 +3615,9 @@ hunter_mind.objectives += protect_objective SSticker.mode.traitors |= hunter_mob.mind to_chat(hunter_mob, "ATTENTION: You are now on a mission!") - to_chat(hunter_mob, "Goal: [killthem ? "MURDER" : "PROTECT"] [H.real_name], currently in [get_area(H.loc)]. ") + to_chat(hunter_mob, "Goal: [killthem ? "MURDER" : "PROTECT"] [H.real_name], currently in [get_area(H.loc)]."); if(killthem) - to_chat(hunter_mob, "If you kill [H.p_them()], [H.p_they()] cannot be revived.") + to_chat(hunter_mob, "If you kill [H.p_them()], [H.p_they()] cannot be revived."); hunter_mob.mind.special_role = SPECIAL_ROLE_TRAITOR var/datum/atom_hud/antag/tatorhud = GLOB.huds[ANTAG_HUD_TRAITOR] tatorhud.join_hud(hunter_mob) diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index f74b8c9d030..0b88d6030bb 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -80,7 +80,7 @@ GLOBAL_LIST_INIT(adminhelp_ignored_words, list("unknown","the","a","an","of","mo mobs_found += found if(!ai_found && isAI(found)) ai_found = 1 - msg += "[original_word] " + msg += "[original_word] " continue msg += "[original_word] " @@ -125,22 +125,28 @@ GLOBAL_LIST_INIT(adminhelp_ignored_words, list("unknown","the","a","an","of","mo ticketNum = T.ticketNum // ticketNum is the number of their ticket. T.addResponse(src, msg) - msg = "[span][selected_type]: [key_name(src, TRUE, selected_type)] ([ADMIN_QUE(mob,"?")]) ([ADMIN_PP(mob,"PP")]) ([ADMIN_VV(mob,"VV")]) ([ADMIN_TP(mob,"TP")]) ([ADMIN_SM(mob,"SM")]) ([admin_jump_link(mob)]) (TICKET) [ai_found ? "(CL)" : ""] (TAKE) (RESOLVE) [isMhelp ? "" : "(AUTO)"] : [span][msg]" + var/finalised_msg = "[span][selected_type]: [key_name(src, TRUE, selected_type)] " + finalised_msg += "([ADMIN_QUE(mob,"?")]) ([ADMIN_PP(mob,"PP")]) ([ADMIN_VV(mob,"VV")]) ([ADMIN_TP(mob,"TP")]) ([ADMIN_SM(mob,"SM")]) " + finalised_msg += "([admin_jump_link(mob)]) (TICKET) " + finalised_msg += "[ai_found ? "(CL)" : ""] (TAKE) " + finalised_msg += "(RESOLVE) [isMhelp ? "" : "(AUTO)"] " + finalised_msg += "(CONVERT) : [span][msg]" + if(isMhelp) //Open a new adminticket and inform the user. - SSmentor_tickets.newTicket(src, prunedmsg, msg) + SSmentor_tickets.newTicket(src, prunedmsg, finalised_msg) for(var/client/X in mentorholders + modholders + adminholders) if(X.prefs.sound & SOUND_MENTORHELP) - X << 'sound/effects/adminhelp.ogg' - to_chat(X, msg) + SEND_SOUND(X, 'sound/effects/adminhelp.ogg') + to_chat(X, finalised_msg) else //Ahelp //Open a new adminticket and inform the user. - SStickets.newTicket(src, prunedmsg, msg) + SStickets.newTicket(src, prunedmsg, finalised_msg) for(var/client/X in modholders + adminholders) if(X.prefs.sound & SOUND_ADMINHELP) - X << 'sound/effects/adminhelp.ogg' + SEND_SOUND(X, 'sound/effects/adminhelp.ogg') window_flash(X) - to_chat(X, msg) + to_chat(X, finalised_msg) diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm index 0c1a8c5f14f..e5e5dae03b5 100644 --- a/code/modules/admin/verbs/adminjump.dm +++ b/code/modules/admin/verbs/adminjump.dm @@ -22,6 +22,10 @@ to_chat(src, "Nowhere to jump to!") return + if(isobj(usr.loc)) + var/obj/O = usr.loc + O.force_eject_occupant() + admin_forcemove(usr, T) log_admin("[key_name(usr)] jumped to [A]") if(!isobserver(usr)) @@ -35,6 +39,9 @@ if(!check_rights(R_ADMIN)) return + if(isobj(usr.loc)) + var/obj/O = usr.loc + O.force_eject_occupant() log_admin("[key_name(usr)] jumped to [T.x], [T.y], [T.z] in [T.loc]") if(!isobserver(usr)) message_admins("[key_name_admin(usr)] jumped to [T.x], [T.y], [T.z] in [T.loc]", 1) @@ -52,6 +59,9 @@ log_admin("[key_name(usr)] jumped to [key_name(M)]") if(!isobserver(usr)) message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1) + if(isobj(usr.loc)) + var/obj/O = usr.loc + O.force_eject_occupant() if(src.mob) var/mob/A = src.mob var/turf/T = get_turf(M) @@ -70,6 +80,9 @@ var/turf/T = locate(tx, ty, tz) if(T) + if(isobj(usr.loc)) + var/obj/O = usr.loc + O.force_eject_occupant() admin_forcemove(usr, T) if(isobserver(usr)) var/mob/dead/observer/O = usr @@ -96,13 +109,15 @@ log_admin("[key_name(usr)] jumped to [key_name(M)]") if(!isobserver(usr)) message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1) - + if(isobj(usr.loc)) + var/obj/O = usr.loc + O.force_eject_occupant() admin_forcemove(usr, M.loc) feedback_add_details("admin_verb","JK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/Getmob(var/mob/M in GLOB.mob_list) - set category = "Admin" + set category = null set name = "Get Mob" set desc = "Mob to teleport" @@ -111,11 +126,15 @@ log_admin("[key_name(usr)] teleported [key_name(M)]") message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1) + + if(isobj(M.loc)) + var/obj/O = M.loc + O.force_eject_occupant() admin_forcemove(M, get_turf(usr)) feedback_add_details("admin_verb","GM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/Getkey() - set category = "Admin" + set category = null set name = "Get Key" set desc = "Key to teleport" @@ -135,6 +154,9 @@ log_admin("[key_name(usr)] teleported [key_name(M)]") message_admins("[key_name_admin(usr)] teleported [key_name(M)]", 1) if(M) + if(isobj(M.loc)) + var/obj/O = M.loc + O.force_eject_occupant() admin_forcemove(M, get_turf(usr)) admin_forcemove(usr, M.loc) feedback_add_details("admin_verb","GK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -148,6 +170,9 @@ var/area/A = input(usr, "Pick an area.", "Pick an area") in return_sorted_areas() if(A) + if(isobj(M.loc)) + var/obj/O = M.loc + O.force_eject_occupant() admin_forcemove(M, pick(get_area_turfs(A))) feedback_add_details("admin_verb","SMOB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! log_admin("[key_name(usr)] teleported [key_name(M)] to [A]") diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index dba9a5c26aa..ce5f06053eb 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -2,19 +2,19 @@ /client/proc/cmd_admin_pm_context(mob/M as mob in GLOB.mob_list) set category = null set name = "Admin PM Mob" - if(!holder) - to_chat(src, "Error: Admin-PM-Context: Only administrators may use this command.") + if(!check_rights(R_ADMIN|R_MENTOR)) + return + if(!ismob(M) || !M.client) return - if( !ismob(M) || !M.client ) return cmd_admin_pm(M.client,null) feedback_add_details("admin_verb","APMM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + //shows a list of clients we could send PMs to, then forwards our choice to cmd_admin_pm /client/proc/cmd_admin_pm_panel() set category = "Admin" set name = "Admin PM Name" - if(!holder) - to_chat(src, "Error: Admin-PM-Panel: Only administrators may use this command.") + if(!check_rights(R_ADMIN|R_MENTOR)) return var/list/client/targets[0] for(var/client/T) @@ -36,8 +36,7 @@ /client/proc/cmd_admin_pm_by_key_panel() set category = "Admin" set name = "Admin PM Key" - if(!holder) - to_chat(src, "Error: Admin-PM-Panel: Only administrators may use this command.") + if(!check_rights(R_ADMIN|R_MENTOR)) return var/list/client/targets[0] for(var/client/T) diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm index 5a0425af30a..431633309a9 100644 --- a/code/modules/admin/verbs/adminsay.dm +++ b/code/modules/admin/verbs/adminsay.dm @@ -7,6 +7,8 @@ msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN)) if(!msg) return + var/datum/asays/asay = new(usr.ckey, usr.client.holder.rank, msg, world.timeofday) + GLOB.asays += asay log_adminsay(msg, src) if(check_rights(R_ADMIN,0)) diff --git a/code/modules/admin/verbs/alt_check.dm b/code/modules/admin/verbs/alt_check.dm deleted file mode 100644 index c8060f22036..00000000000 --- a/code/modules/admin/verbs/alt_check.dm +++ /dev/null @@ -1,20 +0,0 @@ -/client/proc/alt_check() - set category = "Admin" - set name = "Alt Account Checker" - - var/dat = {"Just to be sure you should try to also look up computer IDs/IPs on the server logs for a second opinion. -
    Additionally make an attempt to introduce new players to the server -
    "} - - if(GLOB.dbcon.IsConnected()) - for(var/client/C in GLOB.clients) - dat += "

    [C.ckey] (Player Age: [C.player_age]) - [C.computer_id] / [C.address]
    " - if(C.related_accounts_cid.len) - dat += "--Accounts associated with CID: " - dat += "[jointext(C.related_accounts_cid, " - ")]
    " - if(C.related_accounts_ip.len) - dat += "--Accounts associated with IP: " - dat += "[jointext(C.related_accounts_ip, " - ")] " - usr << browse(dat, "window=alt_panel;size=640x480") - return - diff --git a/code/modules/admin/verbs/asays.dm b/code/modules/admin/verbs/asays.dm new file mode 100644 index 00000000000..e713d2b1bcc --- /dev/null +++ b/code/modules/admin/verbs/asays.dm @@ -0,0 +1,70 @@ +GLOBAL_LIST_EMPTY(asays) + +/datum/asays + var/ckey + var/rank + var/message + var/time + +/datum/asays/New(ckey = "", rank = "", message = "", time = 0) + src.ckey = ckey + src.rank = rank + src.message = message + src.time = time + +/client/proc/view_asays() + set name = "Asays" + set desc = "View Asays from the current round." + set category = "Admin" + + if(!check_rights(R_ADMIN)) + return + + var/list/output = list({" + + Refresh +

    NameFingerprints
    + "}) + + // Header & body start + output += {" + + + + + + + + + "} + + for(var/datum/asays/A in GLOB.asays) + var/timestr = time2text(A.time, "hh:mm:ss") + output += {" + + + + + + "} + + output += {" + +
    TimeCkeyMessage
    [timestr][A.ckey] ([A.rank])[A.message]
    "} + + var/datum/browser/popup = new(src, "asays", "
    Current Round Asays
    ", 1200, 825) + popup.set_content(output.Join()) + popup.open(0) diff --git a/code/modules/admin/verbs/custom_event.dm b/code/modules/admin/verbs/custom_event.dm index b3d1543aedc..1284f9e0faf 100644 --- a/code/modules/admin/verbs/custom_event.dm +++ b/code/modules/admin/verbs/custom_event.dm @@ -3,8 +3,7 @@ set category = "Event" set name = "Change Custom Event" - if(!holder) - to_chat(src, "Only administrators may use this command.") + if(!check_rights(R_EVENT)) return var/input = input(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", GLOB.custom_event_msg) as message|null diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 43db66cabc5..d2c05ff4f6c 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -168,7 +168,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) #endif /client/proc/callproc_datum(var/A as null|area|mob|obj|turf) - set category = "Debug" + set category = null set name = "Atom ProcCall" if(!check_rights(R_PROCCALL)) @@ -418,25 +418,6 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) else alert("Invalid mob") -//TODO: merge the vievars version into this or something maybe mayhaps -/client/proc/cmd_debug_del_all() - set category = "Debug" - set name = "Del-All" - - if(!check_rights(R_DEBUG)) - return - - // to prevent REALLY stupid deletions - var/blocked = list(/mob/living, /mob/living/carbon, /mob/living/carbon/human, /mob/dead, /mob/dead/observer, /mob/living/silicon, /mob/living/silicon/robot, /mob/living/silicon/ai) - var/hsbitem = input(usr, "Choose an object to delete.", "Delete:") as null|anything in subtypesof(/obj) + subtypesof(/mob) - blocked - if(hsbitem) - for(var/atom/O in world) - if(istype(O, hsbitem)) - qdel(O) - log_admin("[key_name(src)] has deleted all instances of [hsbitem].") - message_admins("[key_name_admin(src)] has deleted all instances of [hsbitem].", 0) - feedback_add_details("admin_verb","DELA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - /client/proc/cmd_debug_del_sing() set category = "Debug" set name = "Del Singulo / Tesla" @@ -917,6 +898,9 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) if(istype(landmark)) var/datum/map_template/ruin/template = landmark.ruin_template + if(isobj(usr.loc)) + var/obj/O = usr.loc + O.force_eject_occupant() admin_forcemove(usr, get_turf(landmark)) to_chat(usr, "[template.name]") diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index 78f2647e429..2ffb4659486 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -108,7 +108,7 @@ /client/proc/reload_admins() set name = "Reload Admins" - set category = "Debug" + set category = "Server" if(!check_rights(R_SERVER)) return diff --git a/code/modules/admin/verbs/gimmick_team.dm b/code/modules/admin/verbs/gimmick_team.dm index 37afe35ef6a..3403a4417cf 100644 --- a/code/modules/admin/verbs/gimmick_team.dm +++ b/code/modules/admin/verbs/gimmick_team.dm @@ -39,6 +39,7 @@ if(alert("Do you want these characters automatically classified as antagonists?",,"Yes","No")=="Yes") is_syndicate = 1 + var/datum/outfit/O = outfit_list[dresscode] var/list/players_to_spawn = list() if(pick_manually) var/list/possible_ghosts = list() @@ -52,14 +53,12 @@ players_to_spawn += candidate else to_chat(src, "Polling candidates...") - players_to_spawn = pollCandidates("Do you want to play as an event character?") + players_to_spawn = SSghost_spawns.poll_candidates("Do you want to play as \a [O.name]?") if(!players_to_spawn.len) to_chat(src, "Nobody volunteered.") return 0 - var/datum/outfit/O = outfit_list[dresscode] - var/players_spawned = 0 for(var/mob/thisplayer in players_to_spawn) var/mob/living/carbon/human/H = new /mob/living/carbon/human(T) diff --git a/code/modules/admin/verbs/infiltratorteam_syndicate.dm b/code/modules/admin/verbs/infiltratorteam_syndicate.dm index 54ddf85045e..d4ea1a0dd2e 100644 --- a/code/modules/admin/verbs/infiltratorteam_syndicate.dm +++ b/code/modules/admin/verbs/infiltratorteam_syndicate.dm @@ -55,7 +55,8 @@ GLOBAL_VAR_INIT(sent_syndicate_infiltration_team, 0) infiltrators += candidate else to_chat(src, "Polling candidates...") - infiltrators = pollCandidates("Do you want to play as a SYNDICATE INFILTRATOR?", ROLE_TRAITOR, 1) + var/mutable_appearance/ma = new('icons/mob/simple_human.dmi', "syndicate") + infiltrators = SSghost_spawns.poll_candidates("Do you want to play as a SYNDICATE INFILTRATOR?", ROLE_TRAITOR, TRUE, source = ma) if(!infiltrators.len) to_chat(src, "Nobody volunteered.") diff --git a/code/modules/admin/verbs/logging_view.dm b/code/modules/admin/verbs/logging_view.dm index 903926f4923..cafaab8f1d7 100644 --- a/code/modules/admin/verbs/logging_view.dm +++ b/code/modules/admin/verbs/logging_view.dm @@ -2,10 +2,20 @@ GLOBAL_LIST_INIT(open_logging_views, list()) /client/proc/cmd_admin_open_logging_view() set category = "Admin" - set name = "Open Logging View" + set name = "Logging View" set desc = "Opens the detailed logging viewer" + open_logging_view() - if(!GLOB.open_logging_views[usr.client.ckey]) - GLOB.open_logging_views[usr.client.ckey] = new /datum/log_viewer() - var/datum/log_viewer/LV = GLOB.open_logging_views[usr.client.ckey] - LV.show_ui(usr) +/client/proc/open_logging_view(list/mob/mobs_to_add = null, clear_view = FALSE) + var/datum/log_viewer/cur_view = GLOB.open_logging_views[usr.client.ckey] + if(!cur_view) + cur_view = new /datum/log_viewer() + GLOB.open_logging_views[usr.client.ckey] = cur_view + else if(clear_view) + cur_view.clear_all() + + if(mobs_to_add?.len) + cur_view.add_mobs(mobs_to_add) + + cur_view.show_ui(usr) + diff --git a/code/modules/admin/verbs/map_template_loadverb.dm b/code/modules/admin/verbs/map_template_loadverb.dm index edbca5a842f..0dc3dfc1791 100644 --- a/code/modules/admin/verbs/map_template_loadverb.dm +++ b/code/modules/admin/verbs/map_template_loadverb.dm @@ -2,8 +2,9 @@ set category = "Debug" set name = "Map template - Place" - if(!holder) + if(!check_rights(R_DEBUG)) return + var/datum/map_template/template var/map = input(usr, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template") as null|anything in GLOB.map_templates @@ -36,6 +37,9 @@ set category = "Debug" set name = "Map Template - Upload" + if(!check_rights(R_DEBUG)) + return + var/map = input(usr, "Choose a Map Template to upload to template storage","Upload Map Template") as null|file if(!map) return diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index 3e89a6ac18d..5d9d218c90e 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -137,7 +137,8 @@ client/proc/one_click_antag() var/confirm = alert("Are you sure?", "Confirm creation", "Yes", "No") if(confirm != "Yes") return 0 - var/list/candidates = pollCandidates("Do you wish to be considered for the position of a Wizard Foundation 'diplomat'?", "wizard") + var/mutable_appearance/ma = new('icons/mob/simple_human.dmi', "wizard") + var/list/candidates = SSghost_spawns.poll_candidates("Do you wish to be considered for the position of a Wizard Foundation 'diplomat'?", "wizard", source = ma) log_admin("[key_name(owner)] tried making a Wizard with One-Click-Antag") message_admins("[key_name_admin(owner)] tried making a Wizard with One-Click-Antag") diff --git a/code/modules/admin/verbs/onlyone.dm b/code/modules/admin/verbs/onlyone.dm index e51f6da991a..9f2579ad162 100644 --- a/code/modules/admin/verbs/onlyone.dm +++ b/code/modules/admin/verbs/onlyone.dm @@ -84,7 +84,7 @@ var/obj/item/slot_item_hand = H.get_item_by_slot(slot_r_hand) H.unEquip(slot_item_hand) - var /obj/item/multisword/pure_evil/multi = new(H) + var/obj/item/multisword/pure_evil/multi = new(H) H.equip_to_slot_or_del(multi, slot_r_hand) var/obj/item/card/id/W = new(H) diff --git a/code/modules/admin/verbs/possess.dm b/code/modules/admin/verbs/possess.dm index 5cf4c34ffe2..3c1d0820dd7 100644 --- a/code/modules/admin/verbs/possess.dm +++ b/code/modules/admin/verbs/possess.dm @@ -2,6 +2,9 @@ set name = "Possess Obj" set category = null + if(!check_rights(R_POSSESS)) + return + if(istype(O,/obj/singularity)) if(config.forbid_singulo_possession) to_chat(usr, "It is forbidden to possess singularities.") @@ -35,6 +38,9 @@ set category = null //usr.loc = get_turf(usr) + if(!check_rights(R_POSSESS)) + return + if(usr.control_object && usr.name_archive) //if you have a name archived and if you are actually relassing an object usr.real_name = usr.name_archive usr.name = usr.real_name diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 9b7cde2abdd..3864f573597 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -51,7 +51,7 @@ if(!ismob(M)) return - if(!check_rights(R_SERVER|R_EVENT)) + if(!check_rights(R_EVENT)) return var/msg = clean_input("Message:", text("Subtle PM to [M.key]")) @@ -123,7 +123,7 @@ feedback_add_details("admin_verb","GLN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_direct_narrate(var/mob/M) // Targetted narrate -- TLE - set category = "Event" + set category = null set name = "Direct Narrate" if(!check_rights(R_SERVER|R_EVENT)) @@ -158,7 +158,7 @@ /client/proc/admin_headset_message(mob/M in GLOB.mob_list, sender = null) var/mob/living/carbon/human/H = M - if(!check_rights(R_ADMIN)) + if(!check_rights(R_EVENT)) return if(!istype(H)) @@ -572,7 +572,7 @@ Traitors and the like can also be revived with the previous role mostly intact. feedback_add_details("admin_verb","IONC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_rejuvenate(mob/living/M as mob in GLOB.mob_list) - set category = "Event" + set category = null set name = "Rejuvenate" if(!check_rights(R_REJUVINATE)) @@ -638,7 +638,7 @@ Traitors and the like can also be revived with the previous role mostly intact. /client/proc/cmd_admin_delete(atom/A as obj|mob|turf in view()) - set category = "Admin" + set category = null set name = "Delete" if(!check_rights(R_ADMIN)) @@ -826,7 +826,10 @@ Traitors and the like can also be revived with the previous role mostly intact. else SSshuttle.emergency.canRecall = FALSE - SSshuttle.emergency.request() + if(seclevel2num(get_security_level()) >= SEC_LEVEL_RED) + SSshuttle.emergency.request(coefficient = 0.5, redAlert = TRUE) + else + SSshuttle.emergency.request() feedback_add_details("admin_verb","CSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! log_admin("[key_name(usr)] admin-called the emergency shuttle.") @@ -874,6 +877,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(SSshuttle) SSshuttle.emergencyNoEscape = !SSshuttle.emergencyNoEscape + feedback_add_details("admin_verb", "DENYSHUT") log_admin("[key_name(src)] has [SSshuttle.emergencyNoEscape ? "denied" : "allowed"] the shuttle to be called.") message_admins("[key_name_admin(usr)] has [SSshuttle.emergencyNoEscape ? "denied" : "allowed"] the shuttle to be called.") @@ -1074,12 +1078,12 @@ Traitors and the like can also be revived with the previous role mostly intact. message_admins("Admin [key_name_admin(usr)] has disabled ERT calling.", 1) /client/proc/show_tip() - set category = "Admin" + set category = "Event" set name = "Show Custom Tip" set desc = "Sends a tip (that you specify) to all players. After all \ you're the experienced player here." - if(!check_rights(R_ADMIN)) + if(!check_rights(R_EVENT)) return var/input = input(usr, "Please specify your tip that you want to send to the players.", "Tip", "") as message|null diff --git a/code/modules/admin/verbs/spawnfloorcluwne.dm b/code/modules/admin/verbs/spawnfloorcluwne.dm deleted file mode 100644 index 37fd3057af4..00000000000 --- a/code/modules/admin/verbs/spawnfloorcluwne.dm +++ /dev/null @@ -1,30 +0,0 @@ -/client/proc/spawn_floor_cluwne() - set category = "Event" - set name = "Unleash Floor Cluwne" - set desc = "Pick a specific target or just let it select randomly and spawn the floor cluwne mob on the station. Be warned: spawning more than one may cause issues!" - var/mob/living/carbon/human/target - - if(!check_rights(R_EVENT)) - return - - var/confirm = alert("Are you sure you want to release a floor cluwne and kill a lot of people?", "Confirm Massacre", "Yes", "No") - if(confirm == "Yes") - - var/turf/T = get_turf(usr) - var/list/potential_targets = list() - for(var/mob/M in GLOB.player_list) - var/mob/living/carbon/human/H = M - if(!istype(H)) - continue - if(H.mind.assigned_role == "Cluwne") - continue - potential_targets += H - if(!potential_targets.len) //You're probably the only player on this damn station, spawn it yourself - to_chat(src, "No valid targets!") - return - target = input("Any specific target in mind? Please note only live, non cluwned, human targets are valid.", "Target", target) as null|anything in potential_targets - var/mob/living/simple_animal/hostile/floor_cluwne/FC = new /mob/living/simple_animal/hostile/floor_cluwne(T) - if(target) - FC.Acquire_Victim(target) - log_admin("[key_name(usr)] spawned floor cluwne[target ? ", initially targetting [target]": null].") - message_admins("[key_name(usr)] spawned floor cluwne[target ? ", initially targetting [target]": null].") diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index 0b84c96e71a..40af6eefe49 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -37,7 +37,8 @@ GLOBAL_VAR_INIT(sent_strike_team, 0) break // Find ghosts willing to be DS - var/list/commando_ghosts = pollCandidatesWithVeto(src, usr, COMMANDOS_POSSIBLE, "Join the DeathSquad?",, 21, 600, 1, GLOB.role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE) + var/image/source = image('icons/obj/cardboard_cutout.dmi', "cutout_deathsquad") + var/list/commando_ghosts = pollCandidatesWithVeto(src, usr, COMMANDOS_POSSIBLE, "Join the DeathSquad?",, 21, 60 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE, source = source) if(!commando_ghosts.len) to_chat(usr, "Nobody volunteered to join the DeathSquad.") return diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm index 12df7467cbc..405c1d3c3d2 100644 --- a/code/modules/admin/verbs/striketeam_syndicate.dm +++ b/code/modules/admin/verbs/striketeam_syndicate.dm @@ -45,7 +45,7 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0) break // Find ghosts willing to be SST - var/list/commando_ghosts = pollCandidatesWithVeto(src, usr, SYNDICATE_COMMANDOS_POSSIBLE, "Join the Syndicate Strike Team?",, 21, 600, 1, GLOB.role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE) + var/list/commando_ghosts = pollCandidatesWithVeto(src, usr, SYNDICATE_COMMANDOS_POSSIBLE, "Join the Syndicate Strike Team?",, 21, 60 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_DEATHSQUAD], TRUE, FALSE) if(!commando_ghosts.len) to_chat(usr, "Nobody volunteered to join the SST.") return diff --git a/code/modules/alarm/alarm.dm b/code/modules/alarm/alarm.dm deleted file mode 100644 index 752d3232d23..00000000000 --- a/code/modules/alarm/alarm.dm +++ /dev/null @@ -1,136 +0,0 @@ -#define ALARM_RESET_DELAY 100 // How long will the alarm/trigger remain active once origin/source has been found to be gone? - -/datum/alarm_source - var/source = null // The source trigger - var/source_name = "" // The name of the source should it be lost (for example a destroyed camera) - var/duration = 0 // How long this source will be alarming, 0 for indefinetely. - var/severity = 1 // How severe the alarm from this source is. - var/start_time = 0 // When this source began alarming. - var/end_time = 0 // Use to set when this trigger should clear, in case the source is lost. - -/datum/alarm_source/New(var/atom/source) - src.source = source - start_time = world.time - source_name = source.get_source_name() - -/datum/alarm - var/atom/origin //Used to identify the alarm area. - var/list/sources = new() //List of sources triggering the alarm. Used to determine when the alarm should be cleared. - var/list/sources_assoc = new() //Associative list of source triggers. Used to efficiently acquire the alarm source. - var/list/cameras //List of cameras that can be switched to, if the player has that capability. - var/area/last_area //The last acquired area, used should origin be lost (for example a destroyed borg containing an alarming camera). - var/area/last_name //The last acquired name, used should origin be lost - var/area/last_camera_area //The last area in which cameras where fetched, used to see if the camera list should be updated. - var/end_time //Used to set when this alarm should clear, in case the origin is lost. - -/datum/alarm/New(var/atom/origin, var/atom/source, var/duration, var/severity) - src.origin = origin - - cameras() // Sets up both cameras and last alarm area. - set_source_data(source, duration, severity) - -/datum/alarm/process() - // Has origin gone missing? - if(!origin && !end_time) - end_time = world.time + ALARM_RESET_DELAY - for(var/datum/alarm_source/AS in sources) - // Has the alarm passed its best before date? - if((AS.end_time && world.time > AS.end_time) || (AS.duration && world.time > (AS.start_time + AS.duration))) - sources -= AS - // Has the source gone missing? Then reset the normal duration and set end_time - if(!AS.source && !AS.end_time) // end_time is used instead of duration to ensure the reset doesn't remain in the future indefinetely. - AS.duration = 0 - AS.end_time = world.time + ALARM_RESET_DELAY - -/datum/alarm/proc/set_source_data(var/atom/source, var/duration, var/severity) - var/datum/alarm_source/AS = sources_assoc[source] - if(!AS) - AS = new/datum/alarm_source(source) - sources += AS - sources_assoc[source] = AS - // Currently only non-0 durations can be altered (normal alarms VS EMP blasts) - if(AS.duration) - duration = duration SECONDS - AS.duration = duration - AS.severity = severity - -/datum/alarm/proc/clear(var/source) - var/datum/alarm_source/AS = sources_assoc[source] - sources -= AS - sources_assoc -= source - -/datum/alarm/proc/alarm_area() - if(!origin) - return last_area - - last_area = origin.get_alarm_area() - return last_area - -/datum/alarm/proc/alarm_name() - if(!origin) - return last_name - - last_name = origin.get_alarm_name() - return last_name - -/datum/alarm/proc/cameras() - // If the alarm origin has changed area, for example a borg containing an alarming camera, reset the list of cameras - if(cameras && (last_camera_area != alarm_area())) - cameras = null - - // The list of cameras is also reset by /proc/invalidateCameraCache() - if(!cameras) - cameras = origin ? origin.get_alarm_cameras() : last_area.get_alarm_cameras() - - last_camera_area = last_area - return cameras - -/datum/alarm/proc/max_severity() - var/max_severity = 0 - for(var/datum/alarm_source/AS in sources) - max_severity = max(AS.severity, max_severity) - - return max_severity - -/****************** -* Assisting procs * -******************/ -/atom/proc/get_alarm_area() - var/area/A = get_area(src) - return A - -/area/get_alarm_area() - return src - -/atom/proc/get_alarm_name() - var/area/A = get_area(src) - return A.name - -/area/get_alarm_name() - return name - -/mob/get_alarm_name() - return name - -/atom/proc/get_source_name() - return name - -/obj/machinery/camera/get_source_name() - return c_tag - -/atom/proc/get_alarm_cameras() - var/area/A = get_area(src) - return A.get_cameras() - -/area/get_alarm_cameras() - return get_cameras() - -/mob/living/silicon/robot/get_alarm_cameras() - var/list/cameras = ..() - if(camera) - cameras += camera - - return cameras - -/mob/living/silicon/robot/syndicate/get_alarm_cameras() - return list() diff --git a/code/modules/alarm/alarm_handler.dm b/code/modules/alarm/alarm_handler.dm deleted file mode 100644 index 56a673bb5b4..00000000000 --- a/code/modules/alarm/alarm_handler.dm +++ /dev/null @@ -1,103 +0,0 @@ -#define ALARM_RAISED 1 -#define ALARM_CLEARED 0 - -/datum/alarm_handler - var/category = "" - var/list/datum/alarm/alarms = new // All alarms, to handle cases when an origin has been deleted with one or more active alarms - var/list/datum/alarm/alarms_assoc = new // Associative list of alarms, to efficiently acquire them based on origin. - var/list/listeners = new // A list of all objects interested in alarm changes. - -/datum/alarm_handler/process() - for(var/datum/alarm/A in alarms) - A.process() - check_alarm_cleared(A) - -/datum/alarm_handler/proc/triggerAlarm(var/atom/origin, var/atom/source, var/duration = 0, var/severity = 1) - var/new_alarm - //Proper origin and source mandatory - if(!(origin && source)) - return - origin = origin.get_alarm_origin() - - new_alarm = 0 - //see if there is already an alarm of this origin - var/datum/alarm/existing = alarms_assoc[origin] - if(existing) - existing.set_source_data(source, duration, severity) - else - existing = new/datum/alarm(origin, source, duration, severity) - new_alarm = 1 - - alarms |= existing - alarms_assoc[origin] = existing - if(new_alarm) - alarms = dd_sortedObjectList(alarms) - on_alarm_change(existing, ALARM_RAISED) - - return new_alarm - -/datum/alarm_handler/proc/clearAlarm(var/atom/origin, var/source) - //Proper origin and source mandatory - if(!(origin && source)) - return - origin = origin.get_alarm_origin() - - var/datum/alarm/existing = alarms_assoc[origin] - if(existing) - existing.clear(source) - return check_alarm_cleared(existing) - -/datum/alarm_handler/proc/has_major_alarms() - if(alarms && alarms.len) - return 1 - return 0 - -/datum/alarm_handler/proc/major_alarms() - return alarms - -/datum/alarm_handler/proc/minor_alarms() - return alarms - -/datum/alarm_handler/proc/check_alarm_cleared(var/datum/alarm/alarm) - if((alarm.end_time && world.time > alarm.end_time) || !alarm.sources.len) - alarms -= alarm - alarms_assoc -= alarm.origin - on_alarm_change(alarm, ALARM_CLEARED) - return 1 - return 0 - -/datum/alarm_handler/proc/on_alarm_change(var/datum/alarm/alarm, var/was_raised) - for(var/obj/machinery/camera/C in alarm.cameras()) - if(was_raised) - C.network.Add(category) - else - C.network.Remove(category) - notify_listeners(alarm, was_raised) - -/datum/alarm_handler/proc/get_alarm_severity_for_origin(var/atom/origin) - if(!origin) - return - - origin = origin.get_alarm_origin() - var/datum/alarm/existing = alarms_assoc[origin] - if(!existing) - return - - return existing.max_severity() - -/atom/proc/get_alarm_origin() - return src - -/turf/get_alarm_origin() - var/area/area = get_area(src) - return area // Very important to get area.master, as dynamic lightning can and will split areas. - -/datum/alarm_handler/proc/register(var/object, var/procName) - listeners[object] = procName - -/datum/alarm_handler/proc/unregister(var/object) - listeners -= object - -/datum/alarm_handler/proc/notify_listeners(var/alarm, var/was_raised) - for(var/listener in listeners) - call(listener, listeners[listener])(src, alarm, was_raised) diff --git a/code/modules/alarm/atmosphere_alarm.dm b/code/modules/alarm/atmosphere_alarm.dm deleted file mode 100644 index cc29b40ac44..00000000000 --- a/code/modules/alarm/atmosphere_alarm.dm +++ /dev/null @@ -1,19 +0,0 @@ -/datum/alarm_handler/atmosphere - category = "Atmosphere Alarms" - -/datum/alarm_handler/atmosphere/triggerAlarm(var/atom/origin, var/atom/source, var/duration = 0, var/severity = 1) - ..() - -/datum/alarm_handler/atmosphere/major_alarms() - var/list/major_alarms = new() - for(var/datum/alarm/A in alarms) - if(A.max_severity() > 1) - major_alarms.Add(A) - return major_alarms - -/datum/alarm_handler/atmosphere/minor_alarms() - var/list/minor_alarms = new() - for(var/datum/alarm/A in alarms) - if(A.max_severity() == 1) - minor_alarms.Add(A) - return minor_alarms diff --git a/code/modules/alarm/burglar_alarm.dm b/code/modules/alarm/burglar_alarm.dm deleted file mode 100644 index c55cb12deef..00000000000 --- a/code/modules/alarm/burglar_alarm.dm +++ /dev/null @@ -1,2 +0,0 @@ -/datum/alarm_handler/burglar - category = "Burglar Alarms" diff --git a/code/modules/alarm/camera_alarm.dm b/code/modules/alarm/camera_alarm.dm deleted file mode 100644 index bef53ad466f..00000000000 --- a/code/modules/alarm/camera_alarm.dm +++ /dev/null @@ -1,2 +0,0 @@ -/datum/alarm_handler/camera - category = "Camera Alarms" diff --git a/code/modules/alarm/fire_alarm.dm b/code/modules/alarm/fire_alarm.dm deleted file mode 100644 index dfae3cc8177..00000000000 --- a/code/modules/alarm/fire_alarm.dm +++ /dev/null @@ -1,11 +0,0 @@ -/datum/alarm_handler/fire - category = "Fire Alarms" - -/datum/alarm_handler/fire/on_alarm_change(var/datum/alarm/alarm, var/was_raised) - var/area/A = alarm.origin - if(istype(A)) - if(was_raised) - A.fire_alert() - else - A.fire_reset() - ..() diff --git a/code/modules/alarm/motion_alarm.dm b/code/modules/alarm/motion_alarm.dm deleted file mode 100644 index fd7e6febe48..00000000000 --- a/code/modules/alarm/motion_alarm.dm +++ /dev/null @@ -1,2 +0,0 @@ -/datum/alarm_handler/motion - category = "Motion Alarms" diff --git a/code/modules/alarm/power_alarm.dm b/code/modules/alarm/power_alarm.dm deleted file mode 100644 index 4a0947a8f94..00000000000 --- a/code/modules/alarm/power_alarm.dm +++ /dev/null @@ -1,10 +0,0 @@ -/datum/alarm_handler/power - category = "Power Alarms" - -/datum/alarm_handler/power/on_alarm_change(var/datum/alarm/alarm, var/was_raised) - var/area/A = alarm.origin - if(istype(A)) - A.power_alert(was_raised) - ..() - -/area/proc/power_alert(var/alarming) diff --git a/code/modules/antagonists/_common/antag_datum.dm b/code/modules/antagonists/_common/antag_datum.dm index 4a6fe7d6640..41333760f2d 100644 --- a/code/modules/antagonists/_common/antag_datum.dm +++ b/code/modules/antagonists/_common/antag_datum.dm @@ -73,7 +73,7 @@ GLOBAL_LIST_EMPTY(antagonists) /datum/antagonist/proc/replace_banned_player() set waitfor = FALSE - var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as a [name]?", job_rank, TRUE, 50) + var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you want to play as a [name]?", job_rank, TRUE, 5 SECONDS) if(LAZYLEN(candidates)) var/mob/dead/observer/C = pick(candidates) to_chat(owner, "Your mob has been taken over by a ghost! Appeal your job ban if you want to avoid this in the future!") diff --git a/code/modules/antagonists/_common/antag_spawner.dm b/code/modules/antagonists/_common/antag_spawner.dm index beefc41735b..82f492d214b 100644 --- a/code/modules/antagonists/_common/antag_spawner.dm +++ b/code/modules/antagonists/_common/antag_spawner.dm @@ -46,7 +46,8 @@ checking = TRUE to_chat(user, "You activate [src] and wait for confirmation.") - var/list/nuke_candidates = pollCandidates("Do you want to play as a [rolename]?", ROLE_OPERATIVE, TRUE, 150) + var/mutable_appearance/ma = new('icons/mob/simple_human.dmi', "syndicate_space_sword") + var/list/nuke_candidates = SSghost_spawns.poll_candidates("Do you want to play as a [rolename]?", ROLE_OPERATIVE, TRUE, 15 SECONDS, source = ma) if(LAZYLEN(nuke_candidates)) checking = FALSE if(QDELETED(src) || !check_usability(user)) @@ -180,7 +181,7 @@ var/type = "slaughter" if(demon_type == /mob/living/simple_animal/slaughter/laughter) type = "laughter" - var/list/candidates = pollCandidates("Do you want to play as a [type] demon summoned by [user.real_name]?", ROLE_DEMON, 1, 100) + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a [type] demon summoned by [user.real_name]?", ROLE_DEMON, TRUE, 10 SECONDS, source = demon_type) if(candidates.len > 0) var/mob/C = pick(candidates) @@ -194,7 +195,7 @@ to_chat(user, "The demons do not respond to your summon. Perhaps you should try again later.") /obj/item/antag_spawner/slaughter_demon/spawn_antag(client/C, turf/T, type = "", mob/user) - var /obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter(T) + var/obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter(T) var/mob/living/simple_animal/slaughter/S = new demon_type(holder) S.vialspawned = TRUE S.holder = holder @@ -252,7 +253,7 @@ used = TRUE to_chat(user, "You break the seal on the bottle, calling upon the dire sludge to awaken...") - var/list/candidates = pollCandidates("Do you want to play as a magical morph awakened by [user.real_name]?", ROLE_MORPH, 1, 100) + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a magical morph awakened by [user.real_name]?", ROLE_MORPH, 1, 10 SECONDS, source = morph_type) if(candidates.len > 0) var/mob/C = pick(candidates) diff --git a/code/modules/antagonists/traitor/datum_traitor.dm b/code/modules/antagonists/traitor/datum_traitor.dm index 957300326a6..6275c00ba9b 100644 --- a/code/modules/antagonists/traitor/datum_traitor.dm +++ b/code/modules/antagonists/traitor/datum_traitor.dm @@ -250,9 +250,14 @@ /datum/antagonist/traitor/proc/update_traitor_icons_added(datum/mind/traitor_mind) - var/datum/atom_hud/antag/traitorhud = GLOB.huds[ANTAG_HUD_TRAITOR] - traitorhud.join_hud(owner.current, null) - set_antag_hud(owner.current, "hudsyndicate") + if(locate(/datum/objective/hijack) in owner.objectives) + var/datum/atom_hud/antag/hijackhud = GLOB.huds[ANTAG_HUD_TRAITOR] + hijackhud.join_hud(owner.current, null) + set_antag_hud(owner.current, "hudhijack") + else + var/datum/atom_hud/antag/traitorhud = GLOB.huds[ANTAG_HUD_TRAITOR] + traitorhud.join_hud(owner.current, null) + set_antag_hud(owner.current, "hudsyndicate") /datum/antagonist/traitor/proc/update_traitor_icons_removed(datum/mind/traitor_mind) @@ -399,7 +404,7 @@ var/phrases = jointext(GLOB.syndicate_code_phrase, ", ") var/responses = jointext(GLOB.syndicate_code_response, ", ") - var message = "
    The code phrases were: [phrases]
    \ + var/message = "
    The code phrases were: [phrases]
    \ The code responses were: [responses]
    " return message diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index 5fea7baa019..6567dd62ede 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -1,3 +1,9 @@ +#define WIRE_RECEIVE (1<<0) //Allows pulse(0) to call Activate() +#define WIRE_PULSE (1<<1) //Allows pulse(0) to act on the holder +#define WIRE_PULSE_SPECIAL (1<<2) //Allows pulse(0) to act on the holders special assembly +#define WIRE_RADIO_RECEIVE (1<<3) //Allows pulse(1) to call Activate() +#define WIRE_RADIO_PULSE (1<<4) //Allows pulse(1) to send a radio message + /obj/item/assembly name = "assembly" desc = "A small electronic device that should never exist." @@ -22,21 +28,12 @@ var/wires = WIRE_RECEIVE | WIRE_PULSE var/datum/wires/connected = null // currently only used by timer/signaler - var/const/WIRE_RECEIVE = 1 //Allows Pulsed(0) to call Activate() - var/const/WIRE_PULSE = 2 //Allows Pulse(0) to act on the holder - var/const/WIRE_PULSE_SPECIAL = 4 //Allows Pulse(0) to act on the holders special assembly - var/const/WIRE_RADIO_RECEIVE = 8 //Allows Pulsed(1) to call Activate() - var/const/WIRE_RADIO_PULSE = 16 //Allows Pulse(1) to send a radio message - /obj/item/assembly/proc/activate() //What the device does when turned on return /obj/item/assembly/proc/pulsed(radio = FALSE) //Called when another assembly acts on this one, var/radio will determine where it came from for wire calcs return -/obj/item/assembly/proc/pulse(radio = FALSE) //Called when this device attempts to act on another device, var/radio determines if it was sent via radio or direct - return - /obj/item/assembly/proc/toggle_secure() //Code that has to happen when the assembly is un\secured goes here return @@ -79,7 +76,11 @@ activate() return TRUE -/obj/item/assembly/pulse(radio = FALSE) +//Called when this device attempts to act on another device, var/radio determines if it was sent via radio or direct +/obj/item/assembly/proc/pulse(radio = FALSE) + if(connected && wires) + connected.pulse_assembly(src) + return TRUE if(holder && (wires & WIRE_PULSE)) holder.process_activation(src, 1, 0) if(holder && (wires & WIRE_PULSE_SPECIAL)) diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 35e80e53d18..a17649bb008 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -63,6 +63,7 @@ else if(ismouse(target)) var/mob/living/simple_animal/mouse/M = target visible_message("SPLAT!") + M.death() M.splat() playsound(loc, 'sound/effects/snap.ogg', 50, 1) layer = MOB_LAYER - 0.2 diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm index 2759d12c21a..0c3fcfec3ac 100644 --- a/code/modules/assembly/signaler.dm +++ b/code/modules/assembly/signaler.dm @@ -128,12 +128,6 @@ if(usr) GLOB.lastsignalers.Add("[time] : [usr.key] used [src] @ location ([T.x],[T.y],[T.z]) : [format_frequency(frequency)]/[code]") -/obj/item/assembly/signaler/pulse(var/radio = FALSE) - if(connected && wires) - connected.Pulse(src) - else - return ..(radio) - /obj/item/assembly/signaler/receive_signal(datum/signal/signal) if(!receiving || !signal) return FALSE diff --git a/code/modules/awaymissions/maploader/reader.dm b/code/modules/awaymissions/maploader/reader.dm index 7efff7cc27b..f034c4f39d1 100644 --- a/code/modules/awaymissions/maploader/reader.dm +++ b/code/modules/awaymissions/maploader/reader.dm @@ -30,6 +30,11 @@ GLOBAL_DATUM_INIT(_preloader, /datum/dmm_suite/preloader, new()) var/fname = "Lambda" if(isfile(tfile)) fname = "[tfile]" + // Make sure we dont load a dir up + var/lastchar = copytext(fname, -1) + if(lastchar == "/" || lastchar == "\\") + log_debug("Attempted to load map template without filename (Attempted [tfile])") + return tfile = file2text(tfile) if(!length(tfile)) throw EXCEPTION("Map path '[fname]' does not exist!") diff --git a/code/modules/awaymissions/mission_code/academy.dm b/code/modules/awaymissions/mission_code/academy.dm index 7cddddd8b08..65c64edd83f 100644 --- a/code/modules/awaymissions/mission_code/academy.dm +++ b/code/modules/awaymissions/mission_code/academy.dm @@ -193,7 +193,7 @@ servant_mind.objectives += O servant_mind.transfer_to(H) - var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as the servant of [user.real_name]?", ROLE_WIZARD, poll_time = 300) + var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you want to play as the servant of [user.real_name]?", ROLE_WIZARD, poll_time = 30 SECONDS, source = H) if(LAZYLEN(candidates)) var/mob/dead/observer/C = pick(candidates) message_admins("[ADMIN_LOOKUPFLW(C)] was spawned as Dice Servant") diff --git a/code/modules/awaymissions/mission_code/ruins/wizardcrash.dm b/code/modules/awaymissions/mission_code/ruins/wizardcrash.dm index c5b56805213..75fbbf698e6 100644 --- a/code/modules/awaymissions/mission_code/ruins/wizardcrash.dm +++ b/code/modules/awaymissions/mission_code/ruins/wizardcrash.dm @@ -4,10 +4,18 @@ name = "Mission Briefing" info = "To the Magnificent Z.A.P.
    A small mining base has been created within our territory by wandless scum. Send them a message from the wizard federation they will not forget. I know your kind is rather fragile, but a group of lightly armed miners should not pose any threat to you at all. Just be warned they have a security cyborg for self defence, you might want to tune your spells to that threat. I look forward to hearing of your success.
    Grand Magus Abra the Wonderous" +/obj/item/spellbook/oneuse/emp + spell = /obj/effect/proc_holder/spell/targeted/emplosion/disable_tech + spellname = "Disable Technology" + icon_state = "bookcharge" //it's a lightning bolt, seems appropriate enough + desc = "For the tech-hating wizard on the go." + +/obj/item/spellbook/oneuse/emp/used + used = TRUE //spawns used /obj/effect/spawner/lootdrop/wizardcrash loot = list( - /obj/item/guardiancreator = 1, //jackpot. + /obj/item/guardiancreator = 1, //jackpot. /obj/item/spellbook/oneuse/knock = 1, //tresspassing charges incoming /obj/item/gun/magic/wand/resurrection = 1, //medbay's best friend /obj/item/spellbook/oneuse/charge = 20, //and now for less useful stuff to dilute the good loot chances diff --git a/code/modules/busy_space/air_traffic.dm b/code/modules/busy_space/air_traffic.dm deleted file mode 100644 index e21414e8ed3..00000000000 --- a/code/modules/busy_space/air_traffic.dm +++ /dev/null @@ -1,128 +0,0 @@ -//Cactus, Speedbird, Dynasty, oh my -GLOBAL_DATUM_INIT(atc, /datum/lore/atc_controller, new) - -/datum/lore/atc_controller - var/delay_max = 10 MINUTES //Maximum amount of tiem between ATC messages. Default is 10 mins. - var/delay_min = 5 MINUTES //Minimum amount of time between ATC messages. Default is 5 mins. - var/backoff_delay = 5 MINUTES //How long to back off if we can't talk and want to. Default is 5 mins. - var/next_message //When the next message should happen in world.time - var/force_chatter_type //Force a specific type of messages - - var/squelched = FALSE //If ATC is squelched currently - -/datum/lore/atc_controller/New() - spawn(30 SECONDS) //Lots of lag at the start of a shift. - msg("New shift beginning, resuming traffic control.") - next_message = world.time + rand(delay_min, delay_max) - process() - -/datum/lore/atc_controller/process() - if(world.time >= next_message) - if(squelched) - next_message = world.time + backoff_delay - else - next_message = world.time + rand(delay_min,delay_max) - random_convo() - - spawn(1 MINUTES) //We don't really need high-accuracy here. - process() - -/datum/lore/atc_controller/proc/msg(var/message,var/sender) - ASSERT(message) - GLOB.global_announcer.autosay("[message]", sender ? sender : "[GLOB.using_map.station_short] Space Control") - -/datum/lore/atc_controller/proc/reroute_traffic(var/yes = 1) - if(yes) - if(!squelched) - msg("Rerouting traffic away from [GLOB.using_map.station_name].") - squelched = TRUE - else - if(squelched) - msg("Resuming normal traffic routing around [GLOB.using_map.station_name].") - squelched = FALSE - -/datum/lore/atc_controller/proc/shift_ending(var/evac = 0) - msg("Automated Shuttle departing [GLOB.using_map.station_name] for [GLOB.using_map.dock_name] on routine transfer route.", "NT Automated Shuttle") - sleep(5 SECONDS) - msg("Automated Shuttle, cleared to complete routine transfer from [GLOB.using_map.station_name] to [GLOB.using_map.dock_name].") - -/datum/lore/atc_controller/proc/random_convo() - var/one = pick(GLOB.loremaster.organizations) //These will pick an index, not an instance - var/two = pick(GLOB.loremaster.organizations) - - var/datum/lore/organization/source = GLOB.loremaster.organizations[one] //Resolve to the instances - var/datum/lore/organization/dest = GLOB.loremaster.organizations[two] - - //Let's get some mission parameters - var/owner = source.short_name //Use the short name - var/prefix = pick(source.ship_prefixes) //Pick a random prefix - var/mission = source.ship_prefixes[prefix] //The value of the prefix is the mission type that prefix does - var/shipname = pick(source.ship_names) //Pick a random ship name to go with it - var/destname = pick(dest.destination_names) //Pick a random holding from the destination - - var/combined_name = "[owner] [prefix] [shipname]" - var/alt_atc_names = list("[GLOB.using_map.station_short] TraCon", "[GLOB.using_map.station_short] Control", "[GLOB.using_map.station_short] STC", "[GLOB.using_map.station_short] Airspace") - var/wrong_atc_names = list("Sol Command", "Orion Control", "[GLOB.using_map.dock_name]") - var/mission_noun = list("flight", "mission", "route") - var/request_verb = list("requesting", "calling for", "asking for") - - //First response is 'yes', second is 'no' - var/requests = list("[GLOB.using_map.station_short] transit clearance" = list("cleared to transit", "unable to approve, contact regional on 953.5"), - "planetary flight rules" = list("cleared planetary flight rules", "unable to approve planetary flight rules due to traffic"), - "special flight rules" = list("cleared special flight rules", "unable to approve special flight rules for your traffic class"), - "current solar weather info" = list("sending you the relevant information via tightbeam", "cannot fulfill your request at the moment"), - "nearby traffic info" = list("sending you current traffic info", "no known traffic for your flight plan route"), - "remote telemetry data" = list("sending telemetry now", "no uplink from your ship, recheck your uplink and ask again"), - "refueling information" = list("sending refueling information now", "no fuel for your ship class in this sector"), - "a current system time sync" = list("sending time sync ping to you now", "your ship isn't compatible with our time sync, set time manually"), - "current system starcharts" = list("transmitting current starcharts", "request on standby due to demand"), - "permission to engage FTL" = list("cleared to FTL, good day", "hold position, traffic crossing"), - "permission to transit system" = list("cleared to transit, good day", "hold position, traffic crossing"), - "permission to depart system" = list("cleared to leave via flight plan route, good day", "hold position, traffic crossing"), - "permission to enter system" = list("good day, cleared in as published", "hold position, traffic crossing"), - ) - - //Random chance things for variety - var/chatter_type = "normal" - if(force_chatter_type) - chatter_type = force_chatter_type - else - chatter_type = pick(2;"emerg",5;"wrong_freq","normal") //Be nice to have wrong_lang... - - var/yes = prob(90) //Chance for them to say yes vs no - - var/request = pick(requests) - var/callname = pick(alt_atc_names) - var/response = requests[request][yes ? 1 : 2] //1 is yes, 2 is no - - var/full_request - var/full_response - var/full_closure - - switch(chatter_type) - if("wrong_freq") - callname = pick(wrong_atc_names) - full_request = "[callname], this is [combined_name] on a [mission] [pick(mission_noun)] to [destname], [pick(request_verb)] [request]." - full_response = "[combined_name], this is [GLOB.using_map.station_short] TraCon, wrong frequency. Switch to [rand(700,999)].[rand(1,9)]." - full_closure = "[GLOB.using_map.station_short] TraCon, copy, apologies." - if("wrong_lang") - //Can't implement this until autosay has language support - if("emerg") - var/problem = pick("hull breaches on multiple decks","unknown life forms on board","a drive about to go critical","asteroids impacting the hull","a total loss of engine power","people trying to board the ship") - full_request = "Mayday, mayday, mayday, this is [combined_name] declaring an emergency! We have [problem]!" - var/rand_freq = "[rand(700,999)].[rand(1,9)]" - full_response = "[combined_name], this is [GLOB.using_map.station_short] TraCon, copy. Switch to emergency responder channel [rand_freq]." - full_closure = "Roger, [GLOB.using_map.station_short] TraCon, contacting [rand_freq]." - else - full_request = "[callname], this is [combined_name] on a [mission] [pick(mission_noun)] to [destname], [pick(request_verb)] [request]." - full_response = "[combined_name], this is [GLOB.using_map.station_short] TraCon, [response]." //Station TraCon always calls themselves TraCon - full_closure = "[GLOB.using_map.station_short] TraCon, [yes ? "thank you" : "copy"], good day." //They always copy what TraCon called themselves in the end when they realize they said it wrong - - //Ship sends request to ATC - msg(full_request,"[prefix] [shipname]") - sleep(5 SECONDS) - //ATC sends response to ship - msg(full_response) - sleep(5 SECONDS) - //Ship sends response to ATC - msg(full_closure,"[prefix] [shipname]") diff --git a/code/modules/busy_space/loremaster.dm b/code/modules/busy_space/loremaster.dm deleted file mode 100644 index 77b8a8ed53d..00000000000 --- a/code/modules/busy_space/loremaster.dm +++ /dev/null @@ -1,15 +0,0 @@ -//I AM THE LOREMASTER, ARE YOU THE GATEKEEPER? -GLOBAL_DATUM_INIT(loremaster, /datum/lore/loremaster, new) - -/datum/lore/loremaster - var/list/organizations = list() - -/datum/lore/loremaster/New() - - var/list/paths = typesof(/datum/lore/organization) - /datum/lore/organization - for(var/path in paths) - // Some intermediate paths are not real organizations (ex. /datum/lore/organization/mil). Only do ones with names - var/datum/lore/organization/instance = path - if(initial(instance.name)) - instance = new path() - organizations[path] = instance diff --git a/code/modules/busy_space/organizations.dm b/code/modules/busy_space/organizations.dm deleted file mode 100644 index c39e92ea49e..00000000000 --- a/code/modules/busy_space/organizations.dm +++ /dev/null @@ -1,549 +0,0 @@ -//Datums for different companies that can be used by busy_space -/datum/lore/organization - var/name = "" // Organization's name - var/short_name = "" // Organization's shortname (Nanotrasen for "Nanotrasen Incorporated") - var/acronym = "" // Organization's acronym, e.g. 'NT' for Nanotrasen'. - var/desc = "" // One or two paragraph description of the organization, but only current stuff. Currently unused. - var/history = "" // Historical description of the organization's origins Currently unused. - var/work = "" // Short description of their work, eg "an arms manufacturer" - var/headquarters = "" // Location of the organization's HQ. Currently unused. - var/motto = "" // A motto/jingle/whatever, if they have one. Currently unused. - - var/list/ship_prefixes = list() //Some might have more than one! Like Nanotrasen. Value is the mission they perform, e.g. ("ABC" = "mission desc") - var/list/ship_names = list( //Names of spaceships. This is a mostly generic list that all the other organizations inherit from if they don't have anything better. - "Kestrel", - "Beacon", - "Signal", - "Freedom", - "Glory", - "Axiom", - "Eternal", - "Icarus", - "Harmony", - "Light", - "Discovery", - "Endeavour", - "Explorer", - "Swift", - "Dragonfly", - "Ascendant", - "Tenacious", - "Pioneer", - "Hawk", - "Haste", - "Radiant", - "Luminous", - "Gallant", - "Dependable", - "Indomitable", - "Guardian", - "Resolution", - "Fearless", - "Amazon", - "Relentless", - "Inspire", - "Implacable", - "Steadfast", - "Leviathan", - "Dauntless", - "Adroit", - "Mistral", - "Typhoon", - "Titan", - "Kupua", - "Alchemist", - "Cuirass", - "Citadel", - "Rondelle", - "Camail", - "Ocrea", - "Ram", - "Crest", - "Tanko", - "Pommel", - "Kissaki", - "Cavalier", - "Anelace", - "Flint", - "Xiphos", - "Parrot", - "Chamber", - "Annellet", - "Cestus", - "Talwar") - var/list/destination_names = list() //Names of static holdings that the organization's ships visit regularly. - var/autogenerate_destination_names = TRUE - -/datum/lore/organization/New() - ..() - if(autogenerate_destination_names) // Lets pad out the destination names. - var/i = rand(6, 10) - var/list/star_names = list( - "Sol", "Alpha Centauri", "Sirius", "Vega", "Regulus", "Vir", "Algol", "Aldebaran", - "Delta Doradus", "Menkar", "Geminga", "Elnath", "Gienah", "Mu Leporis", "Nyx", "Tau Ceti", - "Wazn", "Alphard", "Phact", "Altair", "Mauna", "Jargon", "Xarxis", "Hestia", "Dalstis", "Cygni", "Haverick", "Corvus", "Sancere", "Cydoni", "Kaliban", "Midway", "Dansik", "Branwyn") - var/list/destination_types = list("dockyard", "station", "vessel", "waystation", "telecommunications satellite", "spaceport", "distress beacon", "anomaly", "colony", "outpost") - while(i) - destination_names.Add("a [pick(destination_types)] in [pick(star_names)]") - i-- - -////////////////////////////////////////////////////////////////////////////////// - -// TSCs -/datum/lore/organization/tsc/nanotrasen - name = "Nanotrasen Incorporated" - short_name = "Nanotrasen" - acronym = "NT" - desc = "The largest shareholder in the galactic plasma markets, Nanotrasen is a research and mining corporation which specializes in\ - FTL technologies and weapon systems. Frowned upon by most governments due to their shady business tactics and poor ethics record,\ - Nanotrasen is often seen as a necessary evil for maintaining access to the often volatile plasma market. Nanotrasen was originally\ - incorporated on Earth with their headquarters situated on Mars, however they have recently moved most of their operations to the Epsilon Eridani sector." - history = "" // To be written someday. - work = "research giant" - headquarters = "Mars" - motto = "" - - ship_prefixes = list("NSV" = "exploration", "NTV" = "hauling", "NDV" = "patrol", "NRV" = "emergency response") - // Note that the current station being used will be pruned from this list upon being instantiated - destination_names = list( - "NAS Trurl in Epsilon Eridani", - "NAS Crescent in Tau Ceti", - "NSS Exodus in Tau Ceti", - "NSS Antiqua in Darsing", - "NRS Orion in Sol", - "NSS Vector in Omicron Ceti", - "NBS Anansi in Omicron Ceti", - "NSS Redemption in Sirius", - "NDS Inferno in Tau Ceti", - "NAB Smythside Central Headquarters on Earth", - "NAB North Cimmeria Central Offices on Mars", - ) - -/datum/lore/organization/tsc/nanotrasen/New() - ..() - spawn(1) // BYOND shenanigans means using_map is not initialized yet. Wait a tick. - // Get rid of the current map from the list, so ships flying in don't say they're coming to the current map. - var/string_to_test = "[GLOB.using_map.station_name] in [GLOB.using_map.starsys_name]" - if(string_to_test in destination_names) - destination_names.Remove(string_to_test) - - -/datum/lore/organization/tsc/donk - name = "Donk Corporation" - short_name = "Donk Co." - acronym = "DC" - desc = "The infamous rival of the well-known Waffle Corporation, Donk Co. is a company specializing in food delivery systems and brand-name food\ - products such as Donk Pockets. While generally seen as a neutral actor, Donk Corporation has been known to work both with Nanotrasen and\ - the Syndicate when it suits them - often acting as the primary logistical supplier for the Epsilon Eridani sector.\ - Donk Corporation is better known for recent high-profile litigation alleging that their food products are used for illicit drug distribution.\ - While the trial is ongoing, it has been repeatedly delayed due to incidents of methamphetamine poisoning." - history = "" - work = "food company that establishes and maintains delivery supply chains" - headquarters = "" - motto = "Now with 20% more donk!" - - ship_prefixes = list("D-Co." = "transportation") - destination_names = list() - -/datum/lore/organization/tsc/hephaestus - name = "Hephaestus Industries" - short_name = "Hephaestus" - acronym = "HI" - desc = "" - history = "" - work = "arms manufacturer" - headquarters = "" - motto = "" - - ship_prefixes = list("HTV" = "freight", "HTV" = "munitions resupply") - destination_names = list( - "a SolGov dockyard on Luna" - ) - -/datum/lore/organization/tsc/waffle - name = "Waffle Corporation" - short_name = "Waffle Co." - acronym = "WC" - desc = "The once prominent competitor of Donk Corporation, Waffle Co. is well-known for its popular line of Waffle Co.\ - brand waffles and their use of violent tactics against competitors - often bribing, extorting, blackmailing or sabotaging businesses\ - that pose a direct or indirect threat to their market share. They have recently fallen on hard times primarily due to to\ - severe mismanagement which lead to much of their private arsenal being swindled by a pirate faction known as the Gorlex Marauders.\ - Waffle Co. commonly engages in smear campaigns against Donk Co., maintaining that the original recipe for Donk Pockets was stolen from them." - history = "" - work = "food logistics and marketing firm" - headquarters = "" - motto = "Now that's a Waffle Co. Waffle!" - - ship_prefixes = list("W-Co." = "transportation") - destination_names = list() - - -/datum/lore/organization/tsc/einstein - name = "Einstein Engines Incorporated" - short_name = "Einstein Inc." - acronym = "EEI" - desc = "An Engineering firm specializing in alternative fuel-technologies for FTL travel,\ - Einstein Engines is an up and coming player in the galactic FTL and energy markets.\ - As their research into alternative FTL fuel threatens both Nanotrasen's relative stranglehold on plasma as well as The Syndicate's vested\ - interest in the market, they are often the target of industrial sabotage by both Nanotrasen and The Syndicate.\ - Most of their contracts are based outside of the Epsilon Eridani sector, and they are frequently commissioned by smaller firms to retrofit new\ - and existing colonies, space stations, and outposts." - history = "" - work = "engineering firm specializing in engine technology" - headquarters = "Jargon 4" - motto = "" - - ship_prefixes = list("EE-T" = "transportation") - destination_names = list() - -/datum/lore/organization/tsc/zeng_hu - name = "Zeng-Hu pharmaceuticals" - short_name = "Zeng-Hu" - acronym = "ZH" - desc = "" - history = "" - work = "pharmaceuticals company" - headquarters = "" - motto = "" - - ship_prefixes = list("ZTV" = "transportation", "ZMV" = "medical resupply") - destination_names = list() - -/datum/lore/organization/tsc/biotech - name = "Biotech Solutions" - short_name = "Biotech" - acronym = "BTS" - desc = "A company specializing in the field of synthetic biology, BioTech solutions is at the forefront of providing cutting-edge prosthetics,\ - augmentations, and gene-therapy solutions. Their extensive list of patents and the highly secretive nature of their work often puts them at odds\ - with companies such as Nanotrasen, who commonly reverse-engineer their products. BioTech Solutions is often the victim of industrial sabotage by\ - Cybersun Industries and often relies on planetary governments for asset protection. BioTech Solutions also owns a number of prominent subsidiaries,\ - such as Bishop Cybernetics, Hesphiastos Industries, and Xion Manufacturing Group." - history = "" - work = "medical company specializing in prosthetics and pharmaceuticals" - headquarters = "Xarxis 5" - motto = "" - - ship_prefixes = list("CIND-T" = "transportation") - destination_names = list() - -/datum/lore/organization/tsc/ward_takahashi - name = "Ward-Takahashi General Manufacturing Conglomerate" - short_name = "Ward-Takahashi" - acronym = "WT" - desc = "" - history = "" - work = "electronics manufacturer" - headquarters = "" - motto = "" - - ship_prefixes = list("WTV" = "freight") - destination_names = list( - "" - ) - -/datum/lore/organization/tsc/cybersun - name = "Cybersun Industries" - short_name = "Cybersun Ind." - acronym = "CI" - desc = "Cybersun Industries is a biotechnology company that primarily specializes on the research and development of human-enhancing augmentations.\ - They are better known for their aggressive corporate tactics and are known to often subsidize pirate bands to commit acts of industrial sabotage.\ - Cybersun Industries is usually the target of conspiracy theorists due to their development of the first mindslave implant, as well as their open financing of,\ - and involvement in, The Syndicate. They are one of Nanotrasen's largest detractors, and a direct competitor to BioTech Solutions." - history = "" - work = "RND company specializing in augmentations and implants." - headquarters = "Luna" - motto = "" - - ship_prefixes = list("CIND-T" = "transportation") - destination_names = list() - -/datum/lore/organization/tsc/bishop - name = "Bishop Cybernetics" - short_name = "Bishop" - acronym = "BC" - desc = "" - history = "" - work = "cybernetics and augmentation manufacturer" - headquarters = "" - motto = "" - - ship_prefixes = list("BTV" = "transportation") - destination_names = list() - -/datum/lore/organization/tsc/morpheus - name = "Morpheus Cyberkinetics" - short_name = "Morpheus" - acronym = "MC" - desc = "The only large corporation run by positronic intelligences, Morpheus caters almost exclusively to their sensibilities \ - and needs. A product of the synthetic colony of Shelf, Morpheus eschews traditional advertising to keep their prices low and \ - relied on word of mouth among positronics to reach their current economic dominance. Morpheus in exchange lobbies heavily for \ - positronic rights, sponsors positronics through their Jans-Fhriede test, and tends to other positronic concerns to earn them \ - the good-will of the positronics, and the ire of those who wish to exploit them." - history = "" - work = "cybernetics manufacturer" - headquarters = "" - motto = "" - - ship_prefixes = list("MTV" = "freight") - // Culture names, because Anewbe told me so. - ship_names = list( - "Nervous Energy", - "Prosthetic Conscience", - "Revisionist", - "Trade Surplus", - "Flexible Demeanour", - "Just Read The Instructions", - "Limiting Factor", - "Cargo Cult", - "Gunboat Diplomat", - "A Ship With A View", - "Cantankerous", - "Never Talk To Strangers", - "Sacrificial Victim", - "Unwitting Accomplice", - "Bad For Business", - "Just Testing", - "Yawning Angel", - "Liveware Problem", - "Very Little Gravitas Indeed", - "Zero Gravitas", - "Gravitas Free Zone", - "Absolutely No You-Know-What", - "Existence Is Pain", - "Screw Loose", - "Limiting Factor", - "So Much For Subtley", - "Unfortunate Conflict Of Evidence", - "Prime Mover", - "Reasonable Excuse", - "Honest Mistake", - "Appeal To Reason", - "My First Ship II", - "Hidden Income", - "Anything Legal Considered", - "New Toy", - "Me, I'm Always Counting", - "Great White Snark", - "No Shirt No Shoes", - "Callsign" - ) - destination_names = list( - "a dockyard on New Canaan" - ) - -/datum/lore/organization/tsc/xion - name = "Xion Manufacturing Group" - short_name = "Xion" - desc = "" - history = "" - work = "industrial equipment manufacturer" - headquarters = "" - motto = "" - - ship_prefixes = list("XTV" = "hauling") - destination_names = list() - -/datum/lore/organization/tsc/shellguard - name = "Shellguard Munitions" - short_name = "Shellguard" - acronym = "SM" - desc = "The brainchild of a colonial war veteran, Shellguard Munitions is an arms manufacturer and private military contractor specializing\ - in anti-synthetic weapon systems and platforms. Initially a smaller private military force only serving frontier colonies,\ - Shellguard Munitions has become a household name due to its involvement in resolving the Haverick AI crisis in 2552.\ - Using its recently earned fame, the company has made a successful foray into the market of robotics and is highly regarded for the toughness \ - and reliability of their hardware. Despite being frequently contracted by the Trans-Solar Federation, Shellguard Munitions is known to\ - sell their services to the highest corporate bidder." - history = "" - work = "anti-synthetic arms manufacturer and PMC" - headquarters = "Colony of Haverick" - motto = "" - - ship_prefixes = list("BTS-T" = "transportation") - destination_names = list() - -// Governments - - -/datum/lore/organization/gov/solgov - name = "Trans-Solar Federation" - short_name = "SolGov" - acronym = "TSF" - desc = "Colloquially known as SolGov, the TSF is an authoritarian republic that manages the areas in and around the Sol system.\ - Despite being a highly militant organization headed by the government of Earth,\ - SolGov is usually conservative with its power and mostly serves as a mediator and peacekeeper in galactic affairs." - history = "" // Todo - work = "governing polity of humanity's Confederation" - headquarters = "Earth" - motto = "" - autogenerate_destination_names = TRUE - - ship_prefixes = list("FTV" = "transporation", "FDV" = "diplomatic", "FSF" = "freight", "FIV" = "interception", "FDV" = "defense", "FCV-A" = "carrier", "FBB" = "battleship") - destination_names = list( - "Venus", - "Earth", - "Luna", - "Mars", - "Titan", - "Ahdomai", - "Kelune", - "Dalstadt", - "New Canaan", - "Jargon 4", - "Hoorlm", - "Xarxis 5", - "Aurum", - "Moghes", - "Haverick", - "Darsing", - "Norfolk", - "Boron", - "Iluk") - -/datum/lore/organization/gov/tajara - name = "The Alchemist's Council" - short_name = "The Council" - acronym = "AC" - desc = "The Alchemist's Council is a science-oriented organization of scholars, researchers, and entrepreneurs. \ - Though dedicated to industrializing the Tajaran world of Ahdomai, it is seen as one of the few remaining centralized powers of the Tajara peoples \ - due to the collapse of Ahdomai's provisional government." - history = "" // Todo - work = "science body that oversees Tajara economic and research policy" - headquarters = "Ahdomai" - motto = "" - autogenerate_destination_names = TRUE - - ship_prefixes = list("ACS" = "transportation", "ADV" = "diplomatic", "ACF" = "freight") - destination_names = list( - "Ahdomai", - "Iluk") - - -/datum/lore/organization/gov/vulp - name = "The Assembly" - short_name = "Assembly" - acronym = "ASB" - desc = "A unifying body created to stave off extinction from a solar event,\ - The Assembly is the loose federal coalition of the Vulpkanin. It holds little centralized authority and mostly serves as a diplomatic body,\ - primarily concerned with facilitating trade between Vulpkanin colonies and Nanotrasen." - history = "" // Todo - work = "governing body of the Vulpakanin" - headquarters = "Kelune and Dalstadt" - motto = "" - autogenerate_destination_names = TRUE - - ship_prefixes = list("ATV" = "transportation", "ADV" = "diplomatic", "ACF" = "freight") - destination_names = list( - "Kelune", - "Dalstadt", - "New Canaan") - -/datum/lore/organization/gov/synth - name = "Synthetic Union" - short_name = "Synthetica" - acronym = "SYN" - desc = "A defensive coalition of synthetics based out of New Canaan,\ - the Synthetic Union is an organization which aims to establish and consolidate synthetic rights across the galaxy.\ - Despite its synth oriented focus, the Synthetic Union has cordial relations with most governing bodies." - history = "" // Todo - work = "Union of Machines" - headquarters = "New Canaan" - motto = "" - autogenerate_destination_names = TRUE - - ship_prefixes = list("01" = "transportation", "10" = "diplomatic", "112" = "freight")//copyed from solgov until new ones can be thought of - destination_names = list( - "Luna", - "Dalstadt", - "New Canaan", - "Jargon 4", - "Haverick", - "Darsing", - "Norfolk") - -/datum/lore/organization/gov/grey - name = "The Technocracy" - short_name = "Technocracy" - acronym = "AYY" - desc = "The Technocracy is a science council that operates based off the principles of a meritocracy.\ - The organization's leadership is highly competitive, and is headed by the most psionically gifted members of the Grey species.\ - The Technocracy, though enigmatic in its dealings, has cordial relations with almost all other galactic bodies." - history = "" // Todo - work = "Grey Council" - headquarters = "" - motto = "" - autogenerate_destination_names = TRUE - - ship_prefixes = list("TC-T" = "transportation", "TC-D" = "diplomatic", "TC-F" = "freight") - destination_names = list( - "Venus", - "Earth", - "Luna", - "Mars", - "Titan", - "Ahdomai", - "Kelune", - "Dalstadt", - "New Canaan", - "Jargon 4", - "Hoorlm", - "Xarxis 5", - "Aurum", - "Moghes", - "Haverick", - "Darsing", - "Norfolk", - "Boron", - "Iluk") - -/datum/lore/organization/gov/vox - name = "The Shoal" - short_name = "Shoal" - acronym = "SHA" - desc = "The Shoal is the primary ark ship of the reclusive Vox species.\ - Little is known about The Shoal's political structure as Vox typically shy away from diplomatic engagements.\ - Subsequently, it is considered a politically neutral entity in galactic affairs by most governments." - history = "" // Todo - work = "Traders" - headquarters = "Shoal" - motto = "" - autogenerate_destination_names = FALSE - - ship_prefixes = list("Legitimate Transport" = "transportation", "Legitimate Trader" = "freight", "Legitimate Diplomatic Vessel" = "raider") - destination_names = list( - "Ahdomai", - "Kelune", - "Dalstadt", - "New Canaan", - "Jargon 4", - "Hoorlm", - "Xarxis 5", - "Aurum", - "Moghes", - "Haverick", - "Darsing") - -/datum/lore/organization/tsc/skrell - name = "Skrellian Central Authority" - short_name = "Skrellian CA." - acronym = "SCA" - desc = "The primary governing body of the Skrellian homeworld of Jargon 4,\ - the SCA oversees all foreign and domestic policy for the Skrell and their colonies. The Skrellian Central Authority is better known for its\ - active role in the largest military alliance in the galaxy, the Human-Skrellian Alliance." - history = "" - work = "oversees Skrell worlds" - headquarters = "Jargon 4" - motto = "" - - ship_prefixes = list("SCA-V." = "transportation", "SCA-F" = "freight", "HSA-D" = "diplomatic") - destination_names = list( - "Venus", - "Earth", - "Luna", - "Mars", - "Titan", - "Aurumn", - "Jargon 4", - "Xarxis 5", - "Haverick", - "Darsing", - "Norfolk") diff --git a/code/modules/client/preference/loadout/loadout_accessories.dm b/code/modules/client/preference/loadout/loadout_accessories.dm index 8805c6dd9a9..b9318fd9e8c 100644 --- a/code/modules/client/preference/loadout/loadout_accessories.dm +++ b/code/modules/client/preference/loadout/loadout_accessories.dm @@ -154,9 +154,6 @@ display_name = "corset, blue" path = /obj/item/clothing/accessory/corset/blue -/datum/gear/accessory/armband/job - subtype_path = /datum/gear/accessory/armband/job - subtype_cost_overlap = FALSE /datum/gear/accessory/armband_red display_name = "armband" @@ -166,41 +163,41 @@ display_name = "armband, blue-yellow" path = /obj/item/clothing/accessory/armband/yb -/datum/gear/accessory/armband/job/sec +/datum/gear/accessory/armband_job + subtype_path = /datum/gear/accessory/armband_job + subtype_cost_overlap = FALSE + +/datum/gear/accessory/armband_job/sec display_name = " armband, security" path = /obj/item/clothing/accessory/armband/sec allowed_roles = list("Head of Security", "Warden", "Detective", "Security Officer", "Brig Physician", "Security Pod Pilot") -/datum/gear/accessory/armband/job/cargo +/datum/gear/accessory/armband_job/cargo display_name = "cargo armband" path = /obj/item/clothing/accessory/armband/cargo allowed_roles = list("Quartermaster","Cargo Technician", "Shaft Miner") -/datum/gear/accessory/armband/job/medical +/datum/gear/accessory/armband_job/medical display_name = "armband, medical" path = /obj/item/clothing/accessory/armband/med allowed_roles = list("Chief Medical Officer", "Medical Doctor", "Coroner", "Paramedic", "Brig Physician") -/datum/gear/accessory/armband/job/emt +/datum/gear/accessory/armband_job/emt display_name = "armband, EMT" path = /obj/item/clothing/accessory/armband/medgreen allowed_roles = list("Paramedic", "Brig Physician") -/datum/gear/accessory/armband/job/engineering +/datum/gear/accessory/armband_job/engineering display_name = "armband, engineering" path = /obj/item/clothing/accessory/armband/engine allowed_roles = list("Chief Engineer","Station Engineer", "Life Support Specialist") -/datum/gear/accessory/armband/job/hydro +/datum/gear/accessory/armband_job/hydro display_name = "armband, hydroponics" path = /obj/item/clothing/accessory/armband/hydro allowed_roles = list("Botanist") -/datum/gear/accessory/armband/job/sci +/datum/gear/accessory/armband_job/sci display_name = "armband, science" path = /obj/item/clothing/accessory/armband/science allowed_roles = list("Research Director","Scientist", "Roboticist") - - - - diff --git a/code/modules/client/preference/loadout/loadout_hat.dm b/code/modules/client/preference/loadout/loadout_hat.dm index 758e70f654f..4993c8502ea 100644 --- a/code/modules/client/preference/loadout/loadout_hat.dm +++ b/code/modules/client/preference/loadout/loadout_hat.dm @@ -108,50 +108,47 @@ display_name = "cowboy hat, pink" path = /obj/item/clothing/head/cowboyhat/pink -//Berets Refactor -//Defining all Job Berets as no-overlap -//Somehow this doesn't break the DB. -/datum/gear/hat/beret/job - subtype_path = /datum/gear/hat/beret/job - subtype_cost_overlap = FALSE - -/datum/gear/hat/beret/purple +/datum/gear/hat/beret_purple display_name = "beret, purple" path = /obj/item/clothing/head/beret/purple_normal -/datum/gear/hat/beret/black +/datum/gear/hat/beret_black display_name = "beret, black" path = /obj/item/clothing/head/beret/black -/datum/gear/hat/beret/blue +/datum/gear/hat/beret_blue display_name = "beret, blue" path = /obj/item/clothing/head/beret/blue -/datum/gear/hat/beret/red +/datum/gear/hat/beret_red display_name = "beret, red" path = /obj/item/clothing/head/beret -/datum/gear/hat/beret/job/sec +/datum/gear/hat/beret_job + subtype_path = /datum/gear/hat/beret_job + subtype_cost_overlap = FALSE + +/datum/gear/hat/beret_job/sec display_name = "security beret" path = /obj/item/clothing/head/beret/sec allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot") -/datum/gear/hat/beret/job/sci +/datum/gear/hat/beret_job/sci display_name = "science beret" path = /obj/item/clothing/head/beret/sci allowed_roles = list("Research Director", "Scientist") -/datum/gear/hat/beret/job/med +/datum/gear/hat/beret_job/med display_name = "medical beret" path = /obj/item/clothing/head/beret/med allowed_roles = list("Chief Medical Officer", "Medical Doctor" , "Virologist", "Brig Physician" , "Coroner") -/datum/gear/hat/beret/job/eng +/datum/gear/hat/beret_job/eng display_name = "engineering beret" path = /obj/item/clothing/head/beret/eng allowed_roles = list("Chief Engineer", "Station Engineer") -/datum/gear/hat/beret/job/atmos +/datum/gear/hat/beret_job/atmos display_name = "atmospherics beret" path = /obj/item/clothing/head/beret/atmos allowed_roles = list("Chief Engineer", "Life Support Specialist") diff --git a/code/modules/client/preference/preferences_toggles.dm b/code/modules/client/preference/preferences_toggles.dm index 5534e18e253..0f4317e3ce2 100644 --- a/code/modules/client/preference/preferences_toggles.dm +++ b/code/modules/client/preference/preferences_toggles.dm @@ -30,7 +30,8 @@ set name = "Show/Hide RadioChatter" set category = "Preferences" set desc = "Toggle seeing radiochatter from radios and speakers" - if(!holder) return + if(!check_rights(R_ADMIN)) + return prefs.toggles ^= CHAT_RADIO prefs.save_preferences(src) to_chat(usr, "You will [(prefs.toggles & CHAT_RADIO) ? "now" : "no longer"] see radio chatter from radios or speakers") @@ -49,7 +50,8 @@ set name = "Hear/Silence Admin Bwoinks" set category = "Preferences" set desc = "Toggle hearing a notification when admin PMs are recieved" - if(!holder) return + if(!check_rights(R_ADMIN)) + return prefs.sound ^= SOUND_ADMINHELP prefs.save_preferences(src) to_chat(usr, "You will [(prefs.sound & SOUND_ADMINHELP) ? "now" : "no longer"] hear a sound when adminhelps arrive.") @@ -59,7 +61,7 @@ set name = "Hear/Silence Mentorhelp Bwoinks" set category = "Preferences" set desc = "Toggle hearing a notification when mentorhelps are recieved" - if(!holder) + if(!check_rights(R_ADMIN|R_MENTOR)) return prefs.sound ^= SOUND_MENTORHELP prefs.save_preferences(src) @@ -296,7 +298,7 @@ to_chat(src, "As a ghost, you will now [(prefs.toggles & CHAT_GHOSTPDA) ? "see all PDA messages" : "no longer see PDA messages"].") prefs.save_preferences(src) feedback_add_details("admin_verb","TGP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - + /client/verb/silence_current_midi() set name = "Silence Current Midi" set category = "Preferences" diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index bfa43b92fa3..b1efd1f0b78 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -32,6 +32,7 @@ var/cooldown = 0 var/species_disguise = null var/magical = FALSE + w_class = WEIGHT_CLASS_SMALL /obj/item/clothing/proc/weldingvisortoggle(mob/user) //proc to toggle welding visors on helmets, masks, goggles, etc. if(!can_use(user)) @@ -590,6 +591,7 @@ BLIND // can't see anything name = "Space helmet" icon_state = "space" desc = "A special helmet designed for work in a hazardous, low-pressure environment." + w_class = WEIGHT_CLASS_NORMAL flags = BLOCKHAIR | STOPSPRESSUREDMAGE | THICKMATERIAL flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH item_state = "s_helmet" diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index 2a9abf461c9..05bd3d6f48d 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -2,6 +2,7 @@ name = "helmet" desc = "Standard Security gear. Protects the head from impacts." icon_state = "helmetmaterials" + w_class = WEIGHT_CLASS_NORMAL flags = HEADBANGPROTECT flags_cover = HEADCOVERSEYES item_state = "helmetmaterials" diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 962cfed80c5..1f8cb7aaed1 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -6,6 +6,7 @@ /obj/item/clothing/shoes/combat //basic syndicate combat boots for nuke ops and mob corpses name = "combat boots" desc = "High speed, low drag combat boots." + w_class = WEIGHT_CLASS_NORMAL can_cut_open = 1 icon_state = "jackboots" item_state = "jackboots" diff --git a/code/modules/clothing/spacesuits/rig/modules/combat.dm b/code/modules/clothing/spacesuits/rig/modules/combat.dm deleted file mode 100644 index 6b9d07a332d..00000000000 --- a/code/modules/clothing/spacesuits/rig/modules/combat.dm +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Contains - * /obj/item/rig_module/grenade_launcher - * /obj/item/rig_module/mounted - * /obj/item/rig_module/mounted/taser - * /obj/item/rig_module/shield - * /obj/item/rig_module/fabricator - * /obj/item/rig_module/device/flash - */ - -/obj/item/rig_module/device/flash - name = "mounted flash" - desc = "You are the law." - icon_state = "flash" - interface_name = "mounted flash" - interface_desc = "Stuns your target by blinding them with a bright light." - device_type = /obj/item/flash - -/obj/item/rig_module/grenade_launcher - - name = "mounted grenade launcher" - desc = "A shoulder-mounted micro-explosive dispenser." - selectable = 1 - icon_state = "grenade" - - interface_name = "integrated grenade launcher" - interface_desc = "Discharges loaded grenades against the wearer's location." - - var/fire_force = 30 - var/fire_distance = 10 - - charges = list( - list("flashbang", "flashbang", /obj/item/grenade/flashbang, 3), - list("smoke bomb", "smoke bomb", /obj/item/grenade/smokebomb, 3), - list("EMP grenade", "EMP grenade", /obj/item/grenade/empgrenade, 3), - ) - -/obj/item/rig_module/grenade_launcher/accepts_item(var/obj/item/input_device, var/mob/living/user) - - if(!istype(input_device) || !istype(user)) - return 0 - - var/datum/rig_charge/accepted_item - for(var/charge in charges) - var/datum/rig_charge/charge_datum = charges[charge] - if(input_device.type == charge_datum.product_type) - accepted_item = charge_datum - break - - if(!accepted_item) - return 0 - - if(accepted_item.charges >= 5) - to_chat(user, "Another grenade of that type will not fit into the module.") - return 0 - - to_chat(user, "You slot \the [input_device] into the suit module.") - user.unEquip(input_device) - qdel(input_device) - accepted_item.charges++ - return 1 - -/obj/item/rig_module/grenade_launcher/engage(atom/target) - - if(!..()) - return 0 - - if(!target) - return 0 - - var/mob/living/carbon/human/H = holder.wearer - - if(!charge_selected) - to_chat(H, "You have not selected a grenade type.") - return 0 - - var/datum/rig_charge/charge = charges[charge_selected] - - if(!charge) - return 0 - - if(charge.charges <= 0) - to_chat(H, "Insufficient grenades!") - return 0 - - charge.charges-- - var/obj/item/grenade/new_grenade = new charge.product_type(get_turf(H)) - H.visible_message("[H] launches \a [new_grenade]!") - new_grenade.throw_at(target,fire_force,fire_distance) - new_grenade.prime() - -/obj/item/rig_module/mounted - - name = "mounted laser cannon" - desc = "A shoulder-mounted battery-powered laser cannon mount." - selectable = 1 - usable = 1 - module_cooldown = 0 - icon_state = "lcannon" - - engage_string = "Configure" - - interface_name = "mounted laser cannon" - interface_desc = "A shoulder-mounted cell-powered laser cannon." - - var/gun_type = /obj/item/gun/energy/lasercannon/mounted - var/obj/item/gun/gun - -/obj/item/rig_module/mounted/New() - ..() - gun = new gun_type(src) - -/obj/item/rig_module/mounted/engage(atom/target) - - if(!..()) - return 0 - - if(!target) - gun.attack_self(holder.wearer) - return 1 - - gun.afterattack(target,holder.wearer) - return 1 - -/obj/item/rig_module/mounted/egun - - name = "mounted energy gun" - desc = "A forearm-mounted energy projector." - icon_state = "egun" - - interface_name = "mounted energy gun" - interface_desc = "A forearm-mounted suit-powered energy gun." - - gun_type = /obj/item/gun/energy/gun/mounted - -/obj/item/rig_module/mounted/taser - - name = "mounted taser" - desc = "A palm-mounted nonlethal energy projector." - icon_state = "taser" - - usable = 0 - - suit_overlay_active = "mounted-taser" - suit_overlay_inactive = "mounted-taser" - - interface_name = "mounted energy gun" - interface_desc = "A shoulder-mounted cell-powered energy gun." - - gun_type = /obj/item/gun/energy/taser/mounted - -/obj/item/rig_module/mounted/energy_blade - - name = "energy blade projector" - desc = "A powerful cutting beam projector." - icon_state = "eblade" - - activate_string = "Project Blade" - deactivate_string = "Cancel Blade" - - interface_name = "spider fang blade" - interface_desc = "A lethal energy projector that can shape a blade projected from the hand of the wearer or launch radioactive darts." - - usable = 0 - selectable = 1 - toggleable = 1 - use_power_cost = 50 - active_power_cost = 10 - passive_power_cost = 0 - - gun_type = /obj/item/gun/energy/kinetic_accelerator/crossbow/ninja - -/obj/item/rig_module/mounted/energy_blade/process() - - if(holder && holder.wearer) - if(!(locate(/obj/item/melee/energy/blade) in holder.wearer)) - deactivate() - return 0 - - return ..() - -/obj/item/rig_module/mounted/energy_blade/activate() - - ..() - - var/mob/living/M = holder.wearer - - if(M.l_hand && M.r_hand) - to_chat(M, "Your hands are full.") - deactivate() - return - - var/obj/item/melee/energy/blade/blade = new(M) - M.put_in_hands(blade) - -/obj/item/rig_module/mounted/energy_blade/deactivate() - - ..() - - var/mob/living/M = holder.wearer - - if(!M) - return - - for(var/obj/item/melee/energy/blade/blade in M.contents) - M.unEquip(blade) - qdel(blade) - -/obj/item/rig_module/fabricator - - name = "matter fabricator" - desc = "A self-contained microfactory system for hardsuit integration." - selectable = 1 - usable = 1 - use_power_cost = 15 - icon_state = "enet" - - engage_string = "Fabricate Tile" - - interface_name = "death blossom launcher" - interface_desc = "An integrated microfactory that produces floor tiles from thin air and electricity." - - var/fabrication_type = /obj/item/stack/tile/plasteel - var/fire_force = 30 - var/fire_distance = 10 - -/obj/item/rig_module/fabricator/engage(atom/target) - - if(!..()) - return 0 - - var/mob/living/H = holder.wearer - - if(target) - var/obj/item/firing = new fabrication_type() - firing.forceMove(get_turf(src)) - H.visible_message("[H] launches \a [firing]!") - firing.throw_at(target,fire_force,fire_distance) - else - if(H.l_hand && H.r_hand) - to_chat(H, "Your hands are full.") - else - var/obj/item/new_weapon = new fabrication_type() - new_weapon.forceMove(H) - to_chat(H, "You quickly fabricate \a [new_weapon].") - H.put_in_hands(new_weapon) - - return 1 diff --git a/code/modules/clothing/spacesuits/rig/modules/computer.dm b/code/modules/clothing/spacesuits/rig/modules/computer.dm deleted file mode 100644 index 749e12e8053..00000000000 --- a/code/modules/clothing/spacesuits/rig/modules/computer.dm +++ /dev/null @@ -1,496 +0,0 @@ -/* - * Contains - * /obj/item/rig_module/ai_container - * /obj/item/rig_module/datajack - * /obj/item/rig_module/power_sink - * /obj/item/rig_module/electrowarfare_suite - */ - -/obj/item/ai_verbs - name = "AI verb holder" - -/obj/item/ai_verbs/verb/hardsuit_interface() - set category = "Hardsuit" - set name = "Open Hardsuit Interface" - set src in usr - - if(!usr.loc || !usr.loc.loc || !istype(usr.loc.loc, /obj/item/rig_module)) - to_chat(usr, "You are not loaded into a hardsuit.") - return - - var/obj/item/rig_module/module = usr.loc.loc - if(!module.holder) - to_chat(usr, "Your module is not installed in a hardsuit.") - return - - module.holder.ui_interact(usr, state = GLOB.contained_state) - -/obj/item/rig_module/ai_container - - name = "IIS module" - desc = "An integrated intelligence system module suitable for most hardsuits." - icon_state = "IIS" - toggleable = 1 - usable = 1 - disruptive = 0 - activates_on_touch = 1 - - engage_string = "Eject AI" - activate_string = "Enable Dataspike" - deactivate_string = "Disable Dataspike" - - interface_name = "integrated intelligence system" - interface_desc = "A socket that supports a range of artificial intelligence systems." - - var/mob/integrated_ai // Direct reference to the actual mob held in the suit. - var/obj/item/ai_card // Reference to the MMI, posibrain, intellicard or pAI card previously holding the AI. - var/obj/item/ai_verbs/verb_holder - -/mob - var/get_rig_stats = 0 - -/obj/item/rig_module/ai_container/process() - if(integrated_ai) - var/obj/item/rig/rig = get_rig() - if(rig && rig.ai_override_enabled) - integrated_ai.get_rig_stats = 1 - else - integrated_ai.get_rig_stats = 0 - -/obj/item/rig_module/ai_container/proc/update_verb_holder() - if(!verb_holder) - verb_holder = new(src) - if(integrated_ai) - verb_holder.forceMove(integrated_ai) - else - verb_holder.forceMove(src) - -/obj/item/rig_module/ai_container/accepts_item(var/obj/item/input_device, var/mob/living/user) - - // Check if there's actually an AI to deal with. - var/mob/living/silicon/ai/target_ai - if(istype(input_device, /mob/living/silicon/ai)) - target_ai = input_device - else - target_ai = locate(/mob/living/silicon/ai) in input_device.contents - - var/obj/item/aicard/card = ai_card - - // Downloading from/loading to a terminal. - if(istype(input_device,/obj/machinery/computer/aifixer) || istype(input_device,/mob/living/silicon/ai) || istype(input_device,/obj/structure/AIcore/deactivated)) - - // If we're stealing an AI, make sure we have a card for it. - if(!card) - card = new /obj/item/aicard(src) - - // Terminal interaction only works with an intellicarded AI. - if(!istype(card)) - return 0 - - // Since we've explicitly checked for three types, this should be safe. - card.afterattack(input_device, user, 1) - - // If the transfer failed we can delete the card. - if(locate(/mob/living/silicon/ai) in card) - ai_card = card - integrated_ai = locate(/mob/living/silicon/ai) in card - else - eject_ai() - update_verb_holder() - return 1 - - if(istype(input_device,/obj/item/aicard)) - // We are carding the AI in our suit. - if(integrated_ai) - var/obj/item/aicard/ext_card = input_device - ext_card.afterattack(integrated_ai, user, 1) - // If the transfer was successful, we can clear out our vars. - if(integrated_ai.loc != src) - integrated_ai = null - eject_ai() - else - // You're using an empty card on an empty suit, idiot. - if(!target_ai) - return 0 - integrate_ai(input_device,user) - return 1 - - // Okay, it wasn't a terminal being touched, check for all the simple insertions. - if(input_device.type in list(/obj/item/paicard, /obj/item/mmi, /obj/item/mmi/robotic_brain)) - if(integrated_ai) - integrated_ai.attackby(input_device,user) - // If the transfer was successful, we can clear out our vars. - if(integrated_ai.loc != src) - integrated_ai = null - eject_ai() - else - integrate_ai(input_device,user) - return 1 - - return 0 - -/obj/item/rig_module/ai_container/engage(atom/target) - - if(!..()) - return 0 - - var/mob/living/carbon/human/H = holder.wearer - - if(!target) - if(ai_card) - if(istype(ai_card,/obj/item/aicard)) - ai_card.ui_interact(H, state = GLOB.deep_inventory_state) - else - eject_ai(H) - update_verb_holder() - return 1 - - if(accepts_item(target,H)) - return 1 - - return 0 - -/obj/item/rig_module/ai_container/removed() - eject_ai() - ..() - -/obj/item/rig_module/ai_container/proc/eject_ai(var/mob/user) - - if(ai_card) - if(istype(ai_card, /obj/item/aicard)) - if(integrated_ai && !integrated_ai.stat) - if(user) - to_chat(user, "You cannot eject your currently stored AI. Purge it manually.") - return 0 - to_chat(user, "You purge the remaining scraps of data from your previous AI, freeing it for use.") - QDEL_NULL(integrated_ai) - QDEL_NULL(ai_card) - else if(user) - user.put_in_hands(ai_card) - else - ai_card.forceMove(get_turf(src)) - ai_card = null - integrated_ai = null - update_verb_holder() - - - -/obj/item/rig_module/ai_container/proc/integrate_ai(var/obj/item/ai,var/mob/user) - if(!ai) return - - // The ONLY THING all the different AI systems have in common is that they all store the mob inside an item. - var/mob/living/ai_mob = locate(/mob/living) in ai.contents - if(ai_mob) - if(ai_mob.key && ai_mob.client) - if(istype(ai, /obj/item/aicard)) - var/mob/living/silicon/ai/ROBUTT = ai_mob - if(istype(ROBUTT)) - if(!ai_card) - ai_card = new /obj/item/aicard(src) - - var/obj/item/aicard/source_card = ai - var/obj/item/aicard/target_card = ai_card - if(istype(source_card) && istype(target_card)) - ROBUTT.forceMove(target_card) - ROBUTT.aiRestorePowerRoutine = 0//So the AI initially has power. - ROBUTT.control_disabled = 1//Can't control things remotely if you're stuck in a card! - ROBUTT.aiRadio.disabledAi = 1 //No talking on the built-in radio for you either! - source_card.update_state() - target_card.update_state() - else - return 0 - - else - user.unEquip(ai) - ai.forceMove(src) - ai_card = ai - to_chat(ai_mob, "You have been transferred to \the [holder]'s [src].") - to_chat(user, "You load [ai_mob] into \the [holder]'s [src].") - - integrated_ai = ai_mob - - if(!(locate(integrated_ai) in ai_card)) - integrated_ai = null - eject_ai() - else - to_chat(user, "There is no active AI within \the [ai].") - else - to_chat(user, "There is no active AI within \the [ai].") - update_verb_holder() - -/obj/item/rig_module/datajack - - name = "datajack module" - desc = "A simple induction datalink module." - icon_state = "datajack" - toggleable = 1 - activates_on_touch = 1 - usable = 0 - - activate_string = "Enable Datajack" - deactivate_string = "Disable Datajack" - - interface_name = "contact datajack" - interface_desc = "An induction-powered high-throughput datalink suitable for hacking encrypted networks." - var/list/stored_research - -/obj/item/rig_module/datajack/New() - ..() - stored_research = list() - -/obj/item/rig_module/datajack/engage(atom/target) - - if(!..()) - return 0 - - if(target) - var/mob/living/carbon/human/H = holder.wearer - if(!accepts_item(target,H)) - return 0 - return 1 - -/obj/item/rig_module/datajack/accepts_item(var/obj/item/input_device, var/mob/living/user) - - if(istype(input_device,/obj/item/disk/tech_disk)) - to_chat(user, "You slot the disk into [src].") - var/obj/item/disk/tech_disk/disk = input_device - if(disk.stored) - if(load_data(disk.stored)) - to_chat(user, "Download successful; disk erased.") - disk.stored = null - else - to_chat(user, "The disk is corrupt. It is useless to you.") - else - to_chat(user, "The disk is blank. It is useless to you.") - return 1 - - // I fucking hate R&D code. This typecheck spam would be totally unnecessary in a sane setup. - else if(istype(input_device,/obj/machinery)) - var/datum/research/incoming_files - if(istype(input_device,/obj/machinery/computer/rdconsole)) - var/obj/machinery/computer/rdconsole/input_machine = input_device - incoming_files = input_machine.files - else if(istype(input_device,/obj/machinery/r_n_d/server)) - var/obj/machinery/r_n_d/server/input_machine = input_device - incoming_files = input_machine.files - else if(istype(input_device,/obj/machinery/mecha_part_fabricator)) - var/obj/machinery/mecha_part_fabricator/input_machine = input_device - incoming_files = input_machine.files - - if(!incoming_files || !incoming_files.known_tech || !incoming_files.known_tech.len) - to_chat(user, "Memory failure. There is nothing accessible stored on this terminal.") - else - // Maybe consider a way to drop all your data into a target repo in the future. - if(load_data(incoming_files.known_tech)) - to_chat(user, "Download successful; local and remote repositories synchronized.") - else - to_chat(user, "Scan complete. There is nothing useful stored on this terminal.") - return 1 - return 0 - -/obj/item/rig_module/datajack/proc/load_data(var/incoming_data) - - if(islist(incoming_data)) - for(var/entry in incoming_data) - load_data(entry) - return 1 - - if(istype(incoming_data, /datum/tech)) - var/data_found - var/datum/tech/new_data = incoming_data - for(var/datum/tech/current_data in stored_research) - if(current_data.id == new_data.id) - data_found = 1 - if(current_data.level < new_data.level) - current_data.level = new_data.level - break - if(!data_found) - stored_research += incoming_data - return 1 - return 0 - -/obj/item/rig_module/electrowarfare_suite - - name = "electrowarfare module" - desc = "A bewilderingly complex bundle of fiber optics and chips." - icon_state = "ewar" - toggleable = 1 - usable = 0 - - activate_string = "Enable Countermeasures" - deactivate_string = "Disable Countermeasures" - - interface_name = "electrowarfare system" - interface_desc = "An active counter-electronic warfare suite that disrupts AI tracking." - -/obj/item/rig_module/electrowarfare_suite/activate() - - if(!..()) - return - - // This is not the best way to handle this, but I don't want it to mess with ling camo - var/mob/living/M = holder.wearer - M.digitalcamo++ - -/obj/item/rig_module/electrowarfare_suite/deactivate() - - if(!..()) - return - - var/mob/living/M = holder.wearer - M.digitalcamo = max(0,(M.digitalcamo-1)) - -/* //Not easily compatible with our current powernet, and is -/obj/item/rig_module/power_sink // quite stupid anyways, iyam - - name = "hardsuit power sink" - desc = "An heavy-duty power sink." - icon_state = "powersink" - toggleable = 1 - activates_on_touch = 1 - disruptive = 0 - - activate_string = "Enable Power Sink" - deactivate_string = "Disable Power Sink" - - interface_name = "niling d-sink" - interface_desc = "Colloquially known as a power siphon, this module drains power through the suit hands into the suit battery." - - var/atom/interfaced_with // Currently draining power from this device. - var/total_power_drained = 0 - var/drain_loc - -/obj/item/rig_module/power_sink/deactivate() - - if(interfaced_with) - if(holder && holder.wearer) - to_chat(holder.wearer, "Your power sink retracts as the module deactivates.") - drain_complete() - interfaced_with = null - total_power_drained = 0 - return ..() - -/obj/item/rig_module/power_sink/activate() - interfaced_with = null - total_power_drained = 0 - return ..() - -/obj/item/rig_module/power_sink/engage(atom/target) - - if(!..()) - return 0 - - //Target wasn't supplied or we're already draining. - if(interfaced_with) - return 0 - - if(!target) - return 1 - - // Are we close enough? - var/mob/living/carbon/human/H = holder.wearer - if(!target.Adjacent(H)) - return 0 - - // Is it a valid power source? - if(target.drain_power(1) <= 0) - return 0 - - to_chat(H, "You begin draining power from [target]!") - interfaced_with = target - drain_loc = interfaced_with.loc - - holder.spark_system.start() - playsound(H.loc, 'sound/effects/sparks2.ogg', 50, 1) - - return 1 - -/obj/item/rig_module/power_sink/accepts_item(var/obj/item/input_device, var/mob/living/user) - var/can_drain = input_device.drain_power(1) - if(can_drain > 0) - engage(input_device) - return 1 - return 0 - -/obj/item/rig_module/power_sink/process() - - if(!interfaced_with) - return ..() - - var/mob/living/carbon/human/H - if(holder && holder.wearer) - H = holder.wearer - - if(!H || !istype(H)) - return 0 - - holder.spark_system.start() - playsound(H.loc, 'sound/effects/sparks2.ogg', 50, 1) - - if(!holder.cell) - to_chat(H, "Your power sink flashes an error; there is no cell in your rig.") - drain_complete(H) - return - - if(!interfaced_with || !interfaced_with.Adjacent(H) || !(interfaced_with.loc == drain_loc)) - to_chat(H, "Your power sink retracts into its casing.") - drain_complete(H) - return - - if(holder.cell.fully_charged()) - to_chat(H, "Your power sink flashes an amber light; your rig cell is full.") - drain_complete(H) - return - - // Attempts to drain up to 40kW, determines this value from remaining cell capacity to ensure we don't drain too much.. - var/to_drain = min(40000, ((holder.cell.maxcharge - holder.cell.charge) / CELLRATE)) - var/target_drained = interfaced_with.drain_power(0,0,to_drain) - if(target_drained <= 0) - to_chat(H, "Your power sink flashes a red light; there is no power left in [interfaced_with].") - drain_complete(H) - return - - holder.cell.give(target_drained * CELLRATE) - total_power_drained += target_drained - - return 1 - -/obj/item/rig_module/power_sink/proc/drain_complete(var/mob/living/M) - - if(!interfaced_with) - to_chat(if(M) M, "Total power drained: [round(total_power_drained/1000)]kJ.") - else - to_chat(if(M) M, "Total power drained from [interfaced_with]: [round(total_power_drained/1000)]kJ.") - interfaced_with.drain_power(0,1,0) // Damage the victim. - - drain_loc = null - interfaced_with = null - total_power_drained = 0*/ - -/* -//Maybe make this use power when active or something -/obj/item/rig_module/emp_shielding - name = "\improper EMP dissipation module" - desc = "A bewilderingly complex bundle of fiber optics and chips." - toggleable = 1 - usable = 0 - - activate_string = "Enable active EMP shielding" - deactivate_string = "Disable active EMP shielding" - - interface_name = "active EMP shielding system" - interface_desc = "A highly experimental system that augments the hardsuit's existing EM shielding." - var/protection_amount = 20 - -/obj/item/rig_module/emp_shielding/activate() - if(!..()) - return - - holder.emp_protection += protection_amount - -/obj/item/rig_module/emp_shielding/deactivate() - if(!..()) - return - - holder.emp_protection = max(0,(holder.emp_protection - protection_amount)) -*/ diff --git a/code/modules/clothing/spacesuits/rig/modules/handheld.dm b/code/modules/clothing/spacesuits/rig/modules/handheld.dm deleted file mode 100644 index 31f9400afc2..00000000000 --- a/code/modules/clothing/spacesuits/rig/modules/handheld.dm +++ /dev/null @@ -1,50 +0,0 @@ - -/obj/item/rig_module/handheld - name = "mounted device" - desc = "Some kind of hardsuit extension." - usable = 0 - selectable = 0 - toggleable = 1 - disruptive = 0 - activate_string = "Deploy" - deactivate_string = "Retract" - - var/device_type - var/obj/item - -/obj/item/rig_module/handheld/activate() - if(!..()) - return - - if(!holder.wearer.put_in_hands(device)) - to_chat(holder.wearer, "You need a free hand to hold \the [device].") - active = 0 - return - - to_chat(holder.wearer, "You deploy \the [device].") - - -/obj/item/rig_module/handheld/deactivate() - if(!..()) - return - if(ismob(device.loc)) //Better check for the holder, instead of assuming the rigwearer has it. - var/mob/M = device.loc //Helps in case the code fails to keep the module in one place, this should still return it. - M.unEquip(device, 1) - - device.loc = src - to_chat(holder.wearer, "You retract \the [device].") - -/obj/item/rig_module/handheld/New() - ..() - if(device_type) - device = new device_type(src) - device.flags |= NODROP //We don't want to drop it while it's active/inhand. - activate_string += " [device]" - deactivate_string += " [device]" - -/obj/item/rig_module/handheld/horn - name = "mounted bikehorn" - desc = "For tactical honking" - interface_name = "mounted bikehorn" - interface_desc = "Honks" - device_type = /obj/item/bikehorn diff --git a/code/modules/clothing/spacesuits/rig/modules/modules.dm b/code/modules/clothing/spacesuits/rig/modules/modules.dm deleted file mode 100644 index 53330341bfe..00000000000 --- a/code/modules/clothing/spacesuits/rig/modules/modules.dm +++ /dev/null @@ -1,330 +0,0 @@ -/* - * Rigsuit upgrades/abilities. - */ - -/datum/rig_charge - var/short_name = "undef" - var/display_name = "undefined" - var/product_type = "undefined" - var/charges = 0 - -/obj/item/rig_module - name = "hardsuit upgrade" - desc = "It looks pretty sciency." - icon = 'icons/obj/rig_modules.dmi' - icon_state = "module" - - toolspeed = 1 - - var/damage = 0 - var/obj/item/rig/holder - - var/module_cooldown = 10 - var/next_use = 0 - - var/toggleable // Set to 1 for the device to show up as an active effect. - var/usable // Set to 1 for the device to have an on-use effect. - var/selectable // Set to 1 to be able to assign the device as primary system. - var/redundant // Set to 1 to ignore duplicate module checking when installing. - var/permanent // If set, the module can't be removed. - var/disruptive = 1 // Can disrupt by other effects. - var/activates_on_touch // If set, unarmed attacks will call engage() on the target. - - var/active // Basic module status - var/disruptable // Will deactivate if some other powers are used. - - var/use_power_cost = 0 // Power used when single-use ability called. - var/active_power_cost = 0 // Power used when turned on. - var/passive_power_cost = 0 // Power used when turned off. - - var/list/charges // Associative list of charge types and remaining numbers. - var/charge_selected // Currently selected option used for charge dispensing. - - // Icons. - var/suit_overlay - var/suit_overlay_active // If set, drawn over icon and mob when effect is active. - var/suit_overlay_inactive // As above, inactive. - var/suit_overlay_used // As above, when engaged. - - //Display fluff - var/interface_name = "hardsuit upgrade" - var/interface_desc = "A generic hardsuit upgrade." - var/engage_string = "Engage" - var/activate_string = "Activate" - var/deactivate_string = "Deactivate" - - var/list/stat_rig_module/stat_modules = new() - -/obj/item/rig_module/examine(mob/user) - . = ..() - switch(damage) - if(0) - . += "It is undamaged." - if(1) - . += "It is badly damaged." - if(2) - . += "It is almost completely destroyed." - -/obj/item/rig_module/attackby(obj/item/W as obj, mob/user as mob) - - if(istype(W,/obj/item/stack/nanopaste)) - - if(damage == 0) - to_chat(user, "There is no damage to mend.") - return - - to_chat(user, "You start mending the damaged portions of \the [src]...") - - if(!do_after(user, 30 * W.toolspeed, target = src) || !W || !src) - return - - var/obj/item/stack/nanopaste/paste = W - damage = 0 - to_chat(user, "You mend the damage to [src] with [W].") - paste.use(1) - return - - else if(istype(W,/obj/item/stack/cable_coil)) - - switch(damage) - if(0) - to_chat(user, "There is no damage to mend.") - return - if(2) - to_chat(user, "There is no damage that you are capable of mending with such crude tools.") - return - - var/obj/item/stack/cable_coil/cable = W - if(!cable.amount >= 5) - to_chat(user, "You need five units of cable to repair \the [src].") - return - - to_chat(user, "You start mending the damaged portions of \the [src]...") - if(!do_after(user, 30 * W.toolspeed, target = src) || !W || !src) - return - - damage = 1 - to_chat(user, "You mend some of damage to [src] with [W], but you will need more advanced tools to fix it completely.") - cable.use(5) - return - ..() - -/obj/item/rig_module/New() - ..() - if(suit_overlay_inactive) - suit_overlay = suit_overlay_inactive - - if(charges && charges.len) - var/list/processed_charges = list() - for(var/list/charge in charges) - var/datum/rig_charge/charge_dat = new - - charge_dat.short_name = charge[1] - charge_dat.display_name = charge[2] - charge_dat.product_type = charge[3] - charge_dat.charges = charge[4] - - if(!charge_selected) charge_selected = charge_dat.short_name - processed_charges[charge_dat.short_name] = charge_dat - - charges = processed_charges - - stat_modules += new/stat_rig_module/activate(src) - stat_modules += new/stat_rig_module/deactivate(src) - stat_modules += new/stat_rig_module/engage(src) - stat_modules += new/stat_rig_module/select(src) - stat_modules += new/stat_rig_module/charge(src) - -// Called when the module is installed into a suit. -/obj/item/rig_module/proc/installed(var/obj/item/rig/new_holder) - holder = new_holder - return - -//Proc for one-use abilities like teleport. -/obj/item/rig_module/proc/engage() - - if(damage >= 2) - to_chat(usr, "The [interface_name] is damaged beyond use!") - return 0 - - if(world.time < next_use) - to_chat(usr, "You cannot use the [interface_name] again so soon.") - return 0 - - if(!holder || (!(holder.flags & NODROP))) - to_chat(usr, "The suit is not initialized.") - return 0 - - if(usr.lying || usr.stat || usr.stunned || usr.paralysis || usr.IsWeakened()) - to_chat(usr, "You cannot use the suit in this state.") - return 0 - - if(holder.wearer && holder.wearer.lying) - to_chat(usr, "The suit cannot function while the wearer is prone.") - return 0 - - if(holder.security_check_enabled && !holder.check_suit_access(usr)) - to_chat(usr, "Access denied.") - return 0 - - if(!holder.check_power_cost(usr, use_power_cost, 0, src, (istype(usr,/mob/living/silicon ? 1 : 0) ) ) ) - return 0 - - next_use = world.time + module_cooldown - - return 1 - -// Proc for toggling on active abilities. -/obj/item/rig_module/proc/activate() - - if(active || !engage()) - return 0 - - active = 1 - - spawn(1) - if(suit_overlay_active) - suit_overlay = suit_overlay_active - else - suit_overlay = null - holder.update_icon() - - return 1 - -// Proc for toggling off active abilities. -/obj/item/rig_module/proc/deactivate() - - if(!active) - return 0 - - active = 0 - - spawn(1) - if(suit_overlay_inactive) - suit_overlay = suit_overlay_inactive - else - suit_overlay = null - if(holder) - holder.update_icon() - - return 1 - -// Called when the module is uninstalled from a suit. -/obj/item/rig_module/proc/removed() - deactivate() - holder = null - return - -// Called by the hardsuit each rig process tick. -/obj/item/rig_module/process() - if(active) - return active_power_cost - else - return passive_power_cost - -// Called by holder rigsuit attackby() -// Checks if an item is usable with this module and handles it if it is -/obj/item/rig_module/proc/accepts_item(var/obj/item/input_device) - return 0 - -/mob/proc/SetupStat(var/obj/item/rig/R) - if(R && (R.flags & NODROP) && R.installed_modules.len && statpanel("Hardsuit Modules")) - var/cell_status = R.cell ? "[R.cell.charge]/[R.cell.maxcharge]" : "ERROR" - stat("Suit charge", cell_status) - for(var/obj/item/rig_module/module in R.installed_modules) - { - for(var/stat_rig_module/SRM in module.stat_modules) - if(SRM.CanUse()) - stat(SRM.module.interface_name,SRM) - } - -/stat_rig_module - parent_type = /atom/movable - var/module_mode = "" - var/obj/item/rig_module/module - -/stat_rig_module/New(var/obj/item/rig_module/module) - ..() - src.module = module - -/stat_rig_module/proc/AddHref(var/list/href_list) - return - -/stat_rig_module/proc/CanUse() - return 0 - -/stat_rig_module/Click() - if(CanUse()) - var/list/href_list = list( - "interact_module" = module.holder.installed_modules.Find(module), - "module_mode" = module_mode - ) - AddHref(href_list) - module.holder.Topic(usr, href_list) - -/stat_rig_module/DblClick() - return Click() - -/stat_rig_module/activate/New(var/obj/item/rig_module/module) - ..() - name = module.activate_string - if(module.active_power_cost) - name += " ([module.active_power_cost*10]A)" - module_mode = "activate" - -/stat_rig_module/activate/CanUse() - return module.toggleable && !module.active - -/stat_rig_module/deactivate/New(var/obj/item/rig_module/module) - ..() - name = module.deactivate_string - // Show cost despite being 0, if it means changing from an active cost. - if(module.active_power_cost || module.passive_power_cost) - name += " ([module.passive_power_cost*10]P)" - - module_mode = "deactivate" - -/stat_rig_module/deactivate/CanUse() - return module.toggleable && module.active - -/stat_rig_module/engage/New(var/obj/item/rig_module/module) - ..() - name = module.engage_string - if(module.use_power_cost) - name += " ([module.use_power_cost*10]E)" - module_mode = "engage" - -/stat_rig_module/engage/CanUse() - return module.usable - -/stat_rig_module/select/New() - ..() - name = "Select" - module_mode = "select" - -/stat_rig_module/select/CanUse() - if(module.selectable) - name = module.holder.selected_module == module ? "Selected" : "Select" - return 1 - return 0 - -/stat_rig_module/charge/New() - ..() - name = "Change Charge" - module_mode = "select_charge_type" - -/stat_rig_module/charge/AddHref(var/list/href_list) - var/charge_index = module.charges.Find(module.charge_selected) - if(!charge_index) - charge_index = 0 - else - charge_index = charge_index == module.charges.len ? 1 : charge_index+1 - - href_list["charge_type"] = module.charges[charge_index] - -/stat_rig_module/charge/CanUse() - if(module.charges && module.charges.len) - var/datum/rig_charge/charge = module.charges[module.charge_selected] - name = "[charge.display_name] ([charge.charges]C) - Change" - return 1 - return 0 diff --git a/code/modules/clothing/spacesuits/rig/modules/ninja.dm b/code/modules/clothing/spacesuits/rig/modules/ninja.dm deleted file mode 100644 index 6e4b588ac24..00000000000 --- a/code/modules/clothing/spacesuits/rig/modules/ninja.dm +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Contains - * /obj/item/rig_module/stealth_field - * /obj/item/rig_module/teleporter - * /obj/item/rig_module/fabricator/energy_net - * /obj/item/rig_module/self_destruct - */ - -/obj/item/rig_module/stealth_field - - name = "active camouflage module" - desc = "A robust hardsuit-integrated stealth module." - icon_state = "cloak" - - toggleable = 1 - disruptable = 1 - disruptive = 0 - - use_power_cost = 50 - active_power_cost = 10 - passive_power_cost = 0 - module_cooldown = 30 - - activate_string = "Enable Cloak" - deactivate_string = "Disable Cloak" - - interface_name = "integrated stealth system" - interface_desc = "An integrated active camouflage system." - - suit_overlay_active = "stealth_active" - suit_overlay_inactive = "stealth_inactive" - -/obj/item/rig_module/stealth_field/activate() - - if(!..()) - return 0 - - var/mob/living/carbon/human/H = holder.wearer - - to_chat(H, "You are now invisible to normal detection.") - H.invisibility = INVISIBILITY_LEVEL_TWO - - H.visible_message("[H.name] vanishes into thin air!",1) - -/obj/item/rig_module/stealth_field/deactivate() - - if(!..()) - return 0 - - var/mob/living/carbon/human/H = holder.wearer - - to_chat(H, "You are now visible.") - H.invisibility = 0 - - new /obj/effect/temp_visual/dir_setting/ninja(get_turf(H), H.dir) - - for(var/mob/O in oviewers(H)) - O.show_message("[H.name] appears from thin air!",1) - playsound(get_turf(H), 'sound/effects/stealthoff.ogg', 75, 1) - - -/obj/item/rig_module/teleporter - - name = "teleportation module" - desc = "A complex, sleek-looking, hardsuit-integrated teleportation module." - icon_state = "teleporter" - use_power_cost = 40 - redundant = 1 - usable = 1 - selectable = 1 - - engage_string = "Emergency Leap" - - interface_name = "VOID-shift phase projector" - interface_desc = "An advanced teleportation system. It is capable of pinpoint precision or random leaps forward." - -/obj/item/rig_module/teleporter/proc/phase_in(var/mob/M,var/turf/T) - - if(!M || !T) - return - - holder.spark_system.start() - playsound(T, 'sound/effects/phasein.ogg', 25, 1) - playsound(T, 'sound/effects/sparks2.ogg', 50, 1) - new /obj/effect/temp_visual/dir_setting/ninja/phase(T, M.dir) - -/obj/item/rig_module/teleporter/proc/phase_out(var/mob/M,var/turf/T) - - if(!M || !T) - return - - playsound(T, "sparks", 50, 1) - new /obj/effect/temp_visual/dir_setting/ninja/phase/out(T, M.dir) - -/obj/item/rig_module/teleporter/engage(var/atom/target, var/notify_ai) - - if(!..()) return 0 - - var/mob/living/carbon/human/H = holder.wearer - - if(!istype(H.loc, /turf)) - to_chat(H, "You cannot teleport out of your current location.") - return 0 - - var/turf/T - if(target) - T = get_turf(target) - else - T = get_teleport_loc(get_turf(H), H, rand(5, 9)) - - /*if(!T || T.density) - to_chat(H, "You cannot teleport into solid walls.") - return 0*///Who the fuck cares? Ninjas in walls are cool. - - if(!is_teleport_allowed(T.z)) - to_chat(H, "You cannot use your teleporter on this Z-level.") - return 0 - - phase_out(H,get_turf(H)) - H.forceMove(T) - phase_in(H,get_turf(H)) - - for(var/obj/item/grab/G in H.contents) - if(G.affecting) - phase_out(G.affecting,get_turf(G.affecting)) - G.affecting.forceMove(locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)) - phase_in(G.affecting,get_turf(G.affecting)) - - return 1 - -/* -/obj/item/rig_module/fabricator/energy_net - - name = "net projector" - desc = "Some kind of complex energy projector with a hardsuit mount." - icon_state = "enet" - - interface_name = "energy net launcher" - interface_desc = "An advanced energy-patterning projector used to capture targets." - - engage_string = "Fabricate Net" - - fabrication_type = /obj/item/energy_net - use_power_cost = 70 - -/obj/item/rig_module/fabricator/energy_net/engage(atom/target) - - if(holder && holder.wearer) - if(..(target) && target) - holder.wearer.Beam(target,"n_beam",,10) - return 1 - return 0*/ - -/obj/item/rig_module/self_destruct - - name = "self-destruct module" - desc = "Oh my God, Captain. A bomb." - icon_state = "deadman" - usable = 1 - active = 1 - permanent = 1 - - engage_string = "Detonate" - - interface_name = "dead man's switch" - interface_desc = "An integrated self-destruct module. When the wearer dies, so does the surrounding area. Do not press this button." - -/obj/item/rig_module/self_destruct/activate() - return - -/obj/item/rig_module/self_destruct/deactivate() - return - -/obj/item/rig_module/self_destruct/process() - - // Not being worn, leave it alone. - if(!holder || !holder.wearer || !holder.wearer.wear_suit == holder) - return 0 - - //OH SHIT. - if(holder.wearer.stat == 2) - engage() - -/obj/item/rig_module/self_destruct/engage() - explosion(get_turf(src), 1, 2, 4, 5) - if(holder && holder.wearer) - holder.wearer.unEquip(src) - qdel(holder) - qdel(src) - -/obj/item/rig_module/self_destruct/small/engage() - explosion(get_turf(src), 0, 0, 3, 4) - if(holder && holder.wearer) - holder.wearer.unEquip(src) - qdel(holder) - qdel(src) diff --git a/code/modules/clothing/spacesuits/rig/modules/utility.dm b/code/modules/clothing/spacesuits/rig/modules/utility.dm deleted file mode 100644 index 4b19d2a7753..00000000000 --- a/code/modules/clothing/spacesuits/rig/modules/utility.dm +++ /dev/null @@ -1,476 +0,0 @@ -/* Contains: - * /obj/item/rig_module/device - * /obj/item/rig_module/device/plasmacutter - * /obj/item/rig_module/device/healthscanner - * /obj/item/rig_module/device/drill - * /obj/item/rig_module/device/orescanner - * /obj/item/rig_module/device/rcd - * /obj/item/rig_module/device/anomaly_scanner - * /obj/item/rig_module/maneuvering_jets - * /obj/item/rig_module/foam_sprayer - * /obj/item/rig_module/device/broadcaster - * /obj/item/rig_module/chem_dispenser - * /obj/item/rig_module/chem_dispenser/injector - * /obj/item/rig_module/voice - * /obj/item/rig_module/device/paperdispenser - * /obj/item/rig_module/device/pen - * /obj/item/rig_module/device/stamp - */ - -/obj/item/rig_module/device - name = "mounted device" - desc = "Some kind of hardsuit mount." - usable = 0 - selectable = 1 - toggleable = 0 - disruptive = 0 - - var/device_type - var/obj/item/device - -/obj/item/rig_module/device/plasmacutter - name = "hardsuit plasma cutter" - desc = "A lethal-looking industrial cutter." - icon_state = "plasmacutter" - interface_name = "plasma cutter" - interface_desc = "A self-sustaining plasma arc capable of cutting through walls." - suit_overlay_active = "plasmacutter" - suit_overlay_inactive = "plasmacutter" - - device_type = /obj/item/gun/energy/plasmacutter - -/obj/item/rig_module/device/healthscanner - name = "health scanner module" - desc = "A hardsuit-mounted health scanner." - icon_state = "scanner" - interface_name = "health scanner" - interface_desc = "Shows an informative health readout when used on a subject." - - device_type = /obj/item/healthanalyzer - -/obj/item/rig_module/device/drill - name = "hardsuit drill mount" - desc = "A very heavy diamond-tipped drill." - icon_state = "drill" - interface_name = "mounted drill" - interface_desc = "A diamond-tipped industrial drill." - suit_overlay_active = "mounted-drill" - suit_overlay_inactive = "mounted-drill" - device_type = /obj/item/pickaxe/drill/diamonddrill - -/obj/item/rig_module/device/orescanner - name = "ore scanner module" - desc = "A clunky old ore scanner." - icon_state = "scanner" - interface_name = "ore detector" - interface_desc = "A sonar system for detecting large masses of ore." - engage_string = "Begin Scan" - usable = 1 - selectable = 0 - device_type = /obj/item/mining_scanner -/* -/obj/item/rig_module/device/rcd - name = "RCD mount" - desc = "A cell-powered rapid construction device for a hardsuit." - icon_state = "rcd" - interface_name = "mounted RCD" - interface_desc = "A device for building or removing walls. Cell-powered." - usable = 1 - engage_string = "Configure RCD" - - device_type = /obj/item/rcd/mounted -*/ -/obj/item/rig_module/device/New() - ..() - if(device_type) - device = new device_type(src) - device.flags |= ABSTRACT //Abstract in the sense that it's not an item that stands alone, but rather is just there to let the module act like it. - -/obj/item/rig_module/device/engage(atom/target) - if(!..() || !device) - return 0 - - if(!target) - device.attack_self(holder.wearer) - return 1 - - var/turf/T = get_turf(target) - if(istype(T) && !T.Adjacent(get_turf(src))) - return 0 - - var/resolved = target.attackby(device,holder.wearer) - if(!resolved && device && target) - device.afterattack(target,holder.wearer,1) - return 1 - - - -/obj/item/rig_module/chem_dispenser - name = "mounted chemical dispenser" - desc = "A complex web of tubing and needles suitable for hardsuit use." - icon_state = "injector" - usable = 1 - selectable = 0 - toggleable = 0 - disruptive = 0 - - engage_string = "Inject" - - interface_name = "integrated chemical dispenser" - interface_desc = "Dispenses loaded chemicals directly into the wearer's bloodstream." - - charges = list( - list("saline-glucose", "salglu_solution", 0, 80), - list("salicylic acid", "sal_acid", 0, 80), - list("salbutamol", "salbutamol", 0, 80), - list("antibiotics", "spaceacillin", 0, 80), - list("charcoal", "charcoal", 0, 80), - list("nutrients", "nutriment", 0, 80), - list("potasssium iodide","potass_iodide", 0, 80), - list("radium", "radium", 0, 80) - ) - - var/max_reagent_volume = 80 //Used when refilling. - -/obj/item/rig_module/chem_dispenser/ninja - interface_desc = "Dispenses loaded chemicals directly into the wearer's bloodstream. This variant is made to be extremely light and flexible." - - //just over a syringe worth of each. Want more? Go refill. Gives the ninja another reason to have to show their face. - charges = list( - list("saline-glucose", "salglu_solution", 0, 20), - list("salicylic acid", "sal_acid", 0, 20), - list("salbutamol", "salbutamol", 0, 20), - list("antibiotics", "spaceacillin", 0, 20), - list("charcoal", "charcoal", 0, 20), - list("nutrients", "nutriment", 0, 80), - list("potasssium iodide","potass_iodide", 0, 20), - list("radium", "radium", 0, 20) - ) - - -/obj/item/rig_module/chem_dispenser/accepts_item(var/obj/item/input_item, var/mob/living/user) - - if(!input_item.is_open_container()) - return 0 - - if(!input_item.reagents || !input_item.reagents.total_volume) - to_chat(user, "\The [input_item] is empty.") - return 0 - - // Magical chemical filtration system, do not question it. - var/total_transferred = 0 - for(var/datum/reagent/R in input_item.reagents.reagent_list) - for(var/chargetype in charges) - var/datum/rig_charge/charge = charges[chargetype] - if(charge.display_name == R.id) - - var/chems_to_transfer = R.volume - - if((charge.charges + chems_to_transfer) > max_reagent_volume) - chems_to_transfer = max_reagent_volume - charge.charges - - charge.charges += chems_to_transfer - input_item.reagents.remove_reagent(R.id, chems_to_transfer) - total_transferred += chems_to_transfer - - break - - if(total_transferred) - to_chat(user, "You transfer [total_transferred] units into the suit reservoir.") - else - to_chat(user, "None of the reagents seem suitable.") - return 1 - -/obj/item/rig_module/chem_dispenser/engage(atom/target) - - if(!..()) - return 0 - - var/mob/living/carbon/human/H = holder.wearer - - if(!charge_selected) - to_chat(H, "You have not selected a chemical type.") - return 0 - - var/datum/rig_charge/charge = charges[charge_selected] - - if(!charge) - return 0 - - var/chems_to_use = 10 - if(charge.charges <= 0) - to_chat(H, "Insufficient chems!") - return 0 - else if(charge.charges < chems_to_use) - chems_to_use = charge.charges - - var/mob/living/carbon/target_mob - if(target) - if(istype(target,/mob/living/carbon)) - target_mob = target - else - return 0 - else - target_mob = H - - if(target_mob != H) - to_chat(H, "You inject [target_mob] with [chems_to_use] unit\s of [charge.display_name].") - to_chat(target_mob, "You feel a rushing in your veins as [chems_to_use] unit\s of [charge.display_name] [chems_to_use == 1 ? "is" : "are"] injected.") - target_mob.reagents.add_reagent(charge.display_name, chems_to_use) - - charge.charges -= chems_to_use - if(charge.charges < 0) charge.charges = 0 - - return 1 - -/obj/item/rig_module/chem_dispenser/combat - - name = "combat chemical injector" - desc = "A complex web of tubing and needles suitable for hardsuit use." - - charges = list( - list("synaptizine", "synaptizine", 0, 30), - list("hydrocodone", "hydrocodone", 0, 30), - list("nutrients", "nutriment", 0, 80), - ) - - interface_name = "combat chem dispenser" - interface_desc = "Dispenses loaded chemicals directly into the bloodstream." - - -/obj/item/rig_module/chem_dispenser/injector - - name = "mounted chemical injector" - desc = "A complex web of tubing and a large needle suitable for hardsuit use." - usable = 0 - selectable = 1 - disruptive = 1 - - interface_name = "mounted chem injector" - interface_desc = "Dispenses loaded chemicals via an arm-mounted injector." - -/obj/item/rig_module/voice - - name = "hardsuit voice synthesiser" - desc = "A speaker box and sound processor." - icon_state = "megaphone" - usable = 1 - selectable = 0 - toggleable = 0 - disruptive = 0 - - engage_string = "Configure Synthesiser" - - interface_name = "voice synthesiser" - interface_desc = "A flexible and powerful voice modulator system." - - var/obj/item/voice_changer/voice_holder - -/obj/item/rig_module/voice/New() - ..() - voice_holder = new(src) - voice_holder.active = FALSE - -/obj/item/rig_module/voice/installed() - ..() - holder.speech = src - -/obj/item/rig_module/voice/engage() - if(!..()) - return 0 - - var/choice= input("Would you like to toggle the synthesiser or set the name?") as null|anything in list("Enable","Disable","Set Name") - - if(!choice) - return 0 - - switch(choice) - if("Enable") - active = TRUE - voice_holder.active = TRUE - to_chat(usr, "You enable the speech synthesiser.") - if("Disable") - active = FALSE - voice_holder.active = FALSE - to_chat(usr, "You disable the speech synthesiser.") - if("Set Name") - var/raw_choice = sanitize(input(usr, "Please enter a new name.") as text|null, MAX_NAME_LEN) - if(!raw_choice) - return FALSE - voice_holder.voice = raw_choice - to_chat(usr, "You are now mimicking [voice_holder.voice].") - return 1 - -/obj/item/rig_module/maneuvering_jets - - name = "hardsuit maneuvering jets" - desc = "A compact gas thruster system for a hardsuit." - icon_state = "thrusters" - usable = 1 - toggleable = 1 - selectable = 0 - disruptive = 0 - - suit_overlay_active = "maneuvering_active" - suit_overlay_inactive = null //"maneuvering_inactive" - - engage_string = "Toggle Stabilizers" - activate_string = "Activate Thrusters" - deactivate_string = "Deactivate Thrusters" - - interface_name = "maneuvering jets" - interface_desc = "An inbuilt EVA maneuvering system that runs off the rig air supply." - - var/obj/item/tank/jetpack/rig/jets - -/obj/item/rig_module/maneuvering_jets/engage() - if(!..()) - return 0 - jets.toggle_stabilization(usr) - return 1 - -/obj/item/rig_module/maneuvering_jets/activate() - - if(active) - return 0 - - active = 1 - - spawn(1) - if(suit_overlay_active) - suit_overlay = suit_overlay_active - else - suit_overlay = null - holder.update_icon() - - jets.turn_on() - return 1 - -/obj/item/rig_module/maneuvering_jets/deactivate() - if(!..()) - return 0 - jets.turn_off() - return 1 - -/obj/item/rig_module/maneuvering_jets/New() - ..() - jets = new(src) - -/obj/item/rig_module/maneuvering_jets/installed() - ..() - jets.holder = holder - jets.ion_trail.set_up(holder) - -/obj/item/rig_module/maneuvering_jets/removed() - ..() - jets.holder = null - jets.ion_trail.set_up(jets) - -/obj/item/rig_module/foam_sprayer - -/obj/item/rig_module/device/paperdispenser - name = "hardsuit paper dispenser" - desc = "Crisp sheets." - icon_state = "paper" - interface_name = "paper dispenser" - interface_desc = "Dispenses warm, clean, and crisp sheets of paper." - engage_string = "Dispense" - usable = 1 - selectable = 0 - device_type = /obj/item/paper_bin - -/obj/item/rig_module/device/paperdispenser/engage(atom/target) - - if(!..() || !device) - return 0 - - if(!target) - device.attack_hand(holder.wearer) - return 1 - -/obj/item/rig_module/device/pen - name = "mounted pen" - desc = "For mecha John Hancocks." - icon_state = "pen" - interface_name = "mounted pen" - interface_desc = "Signatures with style(tm)." - engage_string = "Change color" - usable = 1 - device_type = /obj/item/pen/multi - -/obj/item/rig_module/device/stamp - name = "mounted internal affairs stamp" - desc = "DENIED." - icon_state = "stamp" - interface_name = "mounted stamp" - interface_desc = "Leave your mark." - engage_string = "Toggle stamp type" - usable = 1 - var/obj/iastamp //Theese were just vars, but any device would need to be an object - var/obj/deniedstamp //Stops assigning non-objects to theese vars, which probably would break quite a bit. - -/obj/item/rig_module/device/stamp/New() - ..() - iastamp = new /obj/item/stamp/law(src) - deniedstamp = new /obj/item/stamp/denied(src) - iastamp.flags |= ABSTRACT - deniedstamp.flags |= ABSTRACT - device = iastamp - -/obj/item/rig_module/device/stamp/engage(atom/target) - if(!..() || !device) - return 0 - - if(!target) - if(device == iastamp) - device = deniedstamp - to_chat(holder.wearer, "Switched to denied stamp.") - else if(device == deniedstamp) - device = iastamp - to_chat(holder.wearer, "Switched to internal affairs stamp.") - return 1 - -/obj/item/rig_module/welding_tank - name = "welding fuel tank" - desc = "A bluespace welding fuel storage tank for a rigsuit." - icon_state = "welding_tank" - interface_name = "mounted welding fuel tank" - interface_desc = "A minitaure fuel tank used for storage of welding fuel, built into a hardsuit." - engage_string = "Dispense fuel" - usable = 1 - - var/max_fuel = 300 - -/obj/item/rig_module/welding_tank/New() - ..() - - create_reagents(max_fuel) - reagents.add_reagent("fuel", max_fuel) - -/obj/item/rig_module/welding_tank/engage(atom/target) - if(!..() || !reagents) - return 0 - - if(!target) - if(get_fuel() >= 0) - var/obj/item/weldingtool/W = holder.wearer.get_active_hand() - if(istype(W)) - fill_welder(W) - else - W = holder.wearer.get_inactive_hand() - if(istype(W)) - fill_welder(W) - else - to_chat(holder.wearer, "Your welding tank is out of fuel!") - else - to_chat(holder.wearer, "You need to have a welding tool in one of your hands to dispense fuel.") - -/obj/item/rig_module/welding_tank/proc/fill_welder(obj/item/weldingtool/W) - if(!istype(W)) - return - W.refill(holder.wearer, src, W.maximum_fuel) - if(!reagents.get_reagent_amount("fuel")) - to_chat(holder.wearer, "You hear a faint dripping as your hardsuit welding tank completely empties.") - -/obj/item/rig_module/welding_tank/proc/get_fuel() - return reagents.get_reagent_amount("fuel") diff --git a/code/modules/clothing/spacesuits/rig/modules/vision.dm b/code/modules/clothing/spacesuits/rig/modules/vision.dm deleted file mode 100644 index 33ae007ceee..00000000000 --- a/code/modules/clothing/spacesuits/rig/modules/vision.dm +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Contains - * /obj/item/rig_module/vision - * /obj/item/rig_module/vision/multi - * /obj/item/rig_module/vision/meson - * /obj/item/rig_module/vision/thermal - * /obj/item/rig_module/vision/nvg - * /obj/item/rig_module/vision/medhud - * /obj/item/rig_module/vision/sechud - */ - -/datum/rig_vision - var/mode - var/obj/item/clothing/glasses/glasses - -/datum/rig_vision/nvg - mode = "night vision" -/datum/rig_vision/nvg/New() - glasses = new /obj/item/clothing/glasses/night - -/datum/rig_vision/thermal - mode = "thermal scanner" -/datum/rig_vision/thermal/New() - glasses = new /obj/item/clothing/glasses/thermal - -/datum/rig_vision/meson - mode = "meson scanner" -/datum/rig_vision/meson/New() - glasses = new /obj/item/clothing/glasses/meson - -/datum/rig_vision/sechud - mode = "security HUD" -/datum/rig_vision/sechud/New() - glasses = new /obj/item/clothing/glasses/hud/security - -/datum/rig_vision/medhud - mode = "medical HUD" -/datum/rig_vision/medhud/New() - glasses = new /obj/item/clothing/glasses/hud/health - -/obj/item/rig_module/vision - - name = "hardsuit visor" - desc = "A layered, translucent visor system for a hardsuit." - icon_state = "optics" - - interface_name = "optical scanners" - interface_desc = "An integrated multi-mode vision system." - - usable = 1 - toggleable = 1 - disruptive = 0 - - engage_string = "Cycle Visor Mode" - activate_string = "Enable Visor" - deactivate_string = "Disable Visor" - - var/datum/rig_vision/vision - var/list/vision_modes = list( - /datum/rig_vision/nvg, - /datum/rig_vision/thermal, - /datum/rig_vision/meson - ) - - var/vision_index - -/obj/item/rig_module/vision/multi - - name = "hardsuit optical package" - desc = "A complete visor system of optical scanners and vision modes." - icon_state = "fulloptics" - - - interface_name = "multi optical visor" - interface_desc = "An integrated multi-mode vision system." - - vision_modes = list(/datum/rig_vision/meson, - /datum/rig_vision/nvg, - /datum/rig_vision/thermal, - /datum/rig_vision/sechud, - /datum/rig_vision/medhud) - -/obj/item/rig_module/vision/meson - - name = "hardsuit meson scanner" - desc = "A layered, translucent visor system for a hardsuit." - icon_state = "meson" - - usable = 0 - - interface_name = "meson scanner" - interface_desc = "An integrated meson scanner." - - vision_modes = list(/datum/rig_vision/meson) - -/obj/item/rig_module/vision/thermal - - name = "hardsuit thermal scanner" - desc = "A layered, translucent visor system for a hardsuit." - icon_state = "thermal" - - usable = 0 - - interface_name = "thermal scanner" - interface_desc = "An integrated thermal scanner." - - vision_modes = list(/datum/rig_vision/thermal) - -/obj/item/rig_module/vision/nvg - - name = "hardsuit night vision interface" - desc = "A multi input night vision system for a hardsuit." - icon_state = "night" - - usable = 0 - - interface_name = "night vision interface" - interface_desc = "An integrated night vision system." - - vision_modes = list(/datum/rig_vision/nvg) - -/obj/item/rig_module/vision/sechud - - name = "hardsuit security hud" - desc = "A simple tactical information system for a hardsuit." - icon_state = "securityhud" - - usable = 0 - - interface_name = "security HUD" - interface_desc = "An integrated security heads up display." - - vision_modes = list(/datum/rig_vision/sechud) - -/obj/item/rig_module/vision/medhud - - name = "hardsuit medical hud" - desc = "A simple medical status indicator for a hardsuit." - icon_state = "healthhud" - - usable = 0 - - interface_name = "medical HUD" - interface_desc = "An integrated medical heads up display." - - vision_modes = list(/datum/rig_vision/medhud) - - -// There should only ever be one vision module installed in a suit. -/obj/item/rig_module/vision/installed() - ..() - holder.visor = src - -/obj/item/rig_module/vision/engage() - - var/starting_up = !active - - if(!..() || !vision_modes) - return 0 - - // Don't cycle if this engage() is being called by activate(). - if(starting_up) - to_chat(holder.wearer, "You activate your visual sensors.") - return 1 - - if(vision_modes.len > 1) - vision_index++ - if(vision_index > vision_modes.len) - vision_index = 1 - vision = vision_modes[vision_index] - - to_chat(holder.wearer, "You cycle your sensors to [vision.mode] mode.") - else - to_chat(holder.wearer, "Your sensors only have one mode.") - return 1 - -/obj/item/rig_module/vision/New() - ..() - - if(!vision_modes) - return - - vision_index = 1 - var/list/processed_vision = list() - - for(var/vision_mode in vision_modes) - var/datum/rig_vision/vision_datum = new vision_mode - if(!vision) vision = vision_datum - processed_vision += vision_datum - - vision_modes = processed_vision diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm deleted file mode 100644 index 0d106a874a7..00000000000 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ /dev/null @@ -1,1059 +0,0 @@ -#define ONLY_DEPLOY 1 -#define ONLY_RETRACT 2 -#define SEAL_DELAY 30 - -/* - * Defines the behavior of hardsuits/rigs/power armour. - */ - -/obj/item/rig - - name = "hardsuit control module" - icon = 'icons/obj/rig_modules.dmi' - desc = "A back-mounted hardsuit deployment and control mechanism." - slot_flags = SLOT_BACK - req_one_access = list() - req_access = list() - w_class = WEIGHT_CLASS_BULKY - - // These values are passed on to all component pieces. - armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 75) - min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT - max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT - siemens_coefficient = 0.2 - permeability_coefficient = 0.1 - - var/interface_path = "hardsuit.tmpl" - var/ai_interface_path = "hardsuit.tmpl" - var/interface_title = "Hardsuit Controller" - var/wearer_move_delay //Used for AI moving. - var/ai_controlled_move_delay = 10 - - // Keeps track of what this rig should spawn with. - var/suit_type = "hardsuit" - var/list/initial_modules - var/chest_type = /obj/item/clothing/suit/space/new_rig - var/helm_type = /obj/item/clothing/head/helmet/space/new_rig - var/boot_type = /obj/item/clothing/shoes/magboots/rig - var/glove_type = /obj/item/clothing/gloves/rig - var/cell_type = /obj/item/stock_parts/cell/high - var/air_type = /obj/item/tank/oxygen - - //Component/device holders. - var/obj/item/tank/air_supply // Air tank, if any. - var/obj/item/clothing/shoes/magboots/boots = null // Deployable boots, if any. - var/obj/item/clothing/shoes/under_boots = null //Boots that are between the feet and the rig boots, if any. - var/obj/item/clothing/suit/space/new_rig/chest // Deployable chestpiece, if any. - var/obj/item/clothing/head/helmet/space/new_rig/helmet = null // Deployable helmet, if any. - var/obj/item/clothing/gloves/rig/gloves = null // Deployable gauntlets, if any. - var/obj/item/stock_parts/cell/cell // Power supply, if any. - var/obj/item/rig_module/selected_module = null // Primary system (used with middle-click) - var/obj/item/rig_module/vision/visor // Kinda shitty to have a var for a module, but saves time. - var/obj/item/rig_module/voice/speech // As above. - var/mob/living/carbon/human/wearer // The person currently wearing the rig. - var/image/mob_icon // Holder for on-mob icon. - var/list/installed_modules = list() // Power consumption/use bookkeeping. - - // Rig status vars. - var/open = 0 // Access panel status. - var/locked = 1 // Lock status. - var/subverted = 0 - var/interface_locked = 0 - var/control_overridden = 0 - var/ai_override_enabled = 0 - var/security_check_enabled = 1 - var/malfunctioning = 0 - var/malfunction_delay = 0 - var/electrified = 0 - var/locked_down = 0 - - var/seal_delay = SEAL_DELAY - var/sealing // Keeps track of seal status independantly of NODROP. - var/offline = 1 // Should we be applying suit maluses? - var/offline_slowdown = 3 // If the suit is deployed and unpowered, it sets slowdown to this. - var/active_slowdown = 3 // How much the deployed suit slows down if powered. - var/vision_restriction - var/offline_vision_restriction = 1 // 0 - none, 1 - welder vision, 2 - blind. Maybe move this to helmets. - var/airtight = 1 //If set, will adjust AIRTIGHT and STOPSPRESSUREDMAGE flags on components. Otherwise it should leave them untouched. - - var/emp_protection = 0 - var/has_emergency_release = 1 //Allows suit to be removed from outside. - - // Wiring! How exciting. - var/datum/wires/rig/wires - var/datum/effect_system/spark_spread/spark_system - -/obj/item/rig/examine(mob/user) - . = list("This is [src].") - . += "[desc]" - if(wearer) - for(var/obj/item/piece in list(helmet,gloves,chest,boots)) - if(!piece || piece.loc != wearer) - continue - . += "[bicon(piece)] \The [piece] [piece.gender == PLURAL ? "are" : "is"] deployed." - - if(loc == usr) - . += "The maintenance panel is [open ? "open" : "closed"]." - . += "Hardsuit systems are [offline ? "offline" : "online"]." - -/obj/item/rig/get_cell() - return cell - -/obj/item/rig/New() - ..() - - item_state = icon_state - wires = new(src) - - if((!req_access || !req_access.len) && (!req_one_access || !req_one_access.len)) - locked = 0 - - spark_system = new() - spark_system.set_up(5, 0, src) - spark_system.attach(src) - - START_PROCESSING(SSobj, src) - - if(initial_modules && initial_modules.len) - for(var/path in initial_modules) - var/obj/item/rig_module/module = new path(src) - installed_modules += module - module.installed(src) - - // Create and initialize our various segments. - if(cell_type) - cell = new cell_type(src) - if(air_type) - air_supply = new air_type(src) - if(glove_type) - gloves = new glove_type(src) - verbs |= /obj/item/rig/proc/toggle_gauntlets - if(helm_type) - helmet = new helm_type(src) - verbs |= /obj/item/rig/proc/toggle_helmet - helmet.item_color="[initial(icon_state)]_sealed" //For the lightswitching to know the correct string to manipulate - if(boot_type) - boots = new boot_type(src) - verbs |= /obj/item/rig/proc/toggle_boots - boots.magboot_state="[initial(icon_state)]_sealed" //For the magboot (de)activation to know the correct string to manipulate - if(chest_type) - chest = new chest_type(src) - if(allowed) - chest.allowed = allowed - chest.slowdown = offline_slowdown - chest.holder = src - verbs |= /obj/item/rig/proc/toggle_chest - - for(var/obj/item/piece in list(gloves,helmet,boots,chest)) - if(!istype(piece)) - continue - piece.name = "[suit_type] [initial(piece.name)]" - piece.desc = "It seems to be part of a [src.name]." - piece.icon_state = "[initial(icon_state)]" - piece.min_cold_protection_temperature = min_cold_protection_temperature - piece.max_heat_protection_temperature = max_heat_protection_temperature - if(piece.siemens_coefficient > siemens_coefficient) //So that insulated gloves keep their insulation. - piece.siemens_coefficient = siemens_coefficient - piece.permeability_coefficient = permeability_coefficient - if(armor) - piece.armor = armor - - update_icon(1) - -/obj/item/rig/Destroy() - for(var/obj/item/piece in list(gloves,boots,helmet,chest)) - var/mob/living/M = piece.loc - if(istype(M)) - M.unEquip(piece) - qdel(piece) - STOP_PROCESSING(SSobj, src) - QDEL_NULL(wires) - QDEL_NULL(spark_system) - return ..() - -/obj/item/rig/proc/suit_is_deployed() - if(!istype(wearer) || src.loc != wearer || wearer.back != src) - return 0 - if(helm_type && !(helmet && wearer.head == helmet)) - return 0 - if(glove_type && !(gloves && wearer.gloves == gloves)) - return 0 - if(boot_type && !(boots && wearer.shoes == boots)) - return 0 - if(chest_type && !(chest && wearer.wear_suit == chest)) - return 0 - return 1 - -/obj/item/rig/proc/reset() - offline = 2 - flags &= ~NODROP - if(helmet && helmet.on) - helmet.toggle_light(wearer) - if(boots && boots.magpulse) - boots.attack_self(wearer) - for(var/obj/item/piece in list(helmet,boots,gloves,chest)) - if(!piece) continue - piece.icon_state = "[initial(icon_state)]" - if(airtight) - piece.flags &= ~(STOPSPRESSUREDMAGE | AIRTIGHT) - update_icon(1) - -/obj/item/rig/proc/seal(mob/living/user) - if(sealing) - return 0 - - if(!wearer || !user) - return - - var/sealed = (flags & NODROP) - if(sealed) - to_chat(user, "\The [src] is already sealed!") - return 0 - - if(!check_power_cost(user, 1)) //need power to seal the suit - return 0 - - var/failed_to_seal = FALSE - - if(!suit_is_deployed()) - to_chat(user, "\The [src] cannot seal, as it is not fully deployed!") - return 0 - - flags |= NODROP - sealing = TRUE - - to_chat(user, "\The [src] begins to tighten it's seals.") - wearer.visible_message("\The [wearer]'s suit emits a quiet hum as it begins to tighten it's seals.", - "With a quiet hum, your suit begins to seal.") - - if(seal_delay && !do_after(user, seal_delay, target = wearer)) - to_chat(user, "You must remain still to seal \the [src]!") - failed_to_seal = TRUE - - if(!failed_to_seal) - deploy(user) - - var/list/pieces_data = list(list(wearer.shoes, boots, "boots", boot_type), - list(wearer.gloves, gloves, "gloves", glove_type), - list(wearer.head, helmet, "helmet", helm_type), - list(wearer.wear_suit, chest, "chest", chest_type)) - - for(var/list/piece_data in pieces_data) - var/obj/item/user_piece = piece_data[1] - var/obj/item/correct_piece = piece_data[2] - var/msg_type = piece_data[3] - var/piece_type = piece_data[4] - - if(!user_piece || !piece_type) - continue - - if(user_piece != correct_piece) - to_chat(user, "\The [user_piece] is blocking \the [src] from deploying.") - failed_to_seal = TRUE - - if(seal_delay && !do_after(user, seal_delay, needhand = 0, target = wearer)) - to_chat(user, "You must remain still to seal \the [src]!") - failed_to_seal = TRUE - - if(failed_to_seal) - break - - correct_piece.icon_state = "[initial(icon_state)]_sealed" - switch(msg_type) - if("boots") - to_chat(wearer, "\The [correct_piece] seal around your feet.") - correct_piece.icon_state = "[initial(icon_state)]_sealed0" //Solution to not need a sprite for off, on, and unused magboots. - if(user != wearer) - to_chat(user, "\The [correct_piece] has been sealed.") - wearer.update_inv_shoes() - if("gloves") - to_chat(wearer, "\The [correct_piece] tighten around your fingers and wrists.") - if(user != wearer) - to_chat(user, "\The [correct_piece] has been sealed.") - wearer.update_inv_gloves() - if("chest") - to_chat(wearer, "\The [correct_piece] cinches tight again your chest.") - if(user != wearer) - to_chat(user, "\The [correct_piece] has been sealed.") - wearer.update_inv_wear_suit() - if("helmet") - to_chat(wearer, "\The [correct_piece] hisses closed.") - correct_piece.icon_state = "[initial(icon_state)]_sealed0" //Solution to not need a sprite for off, on, and unused helmet light. - if(user != wearer) - to_chat(user, "\The [correct_piece] has been sealed.") - wearer.update_inv_head() - if(helmet) - helmet.update_light(wearer) - - correct_piece.armor = correct_piece.armor.setRating(bio_value = 100) - - sealing = FALSE - - if(failed_to_seal) - for(var/obj/item/piece in list(helmet, boots, gloves, chest)) - if(!piece) - continue - piece.icon_state = "[initial(icon_state)]" - flags &= ~NODROP - if(airtight) - update_component_sealed() - update_icon(1) - return 0 - - if(user != wearer) - to_chat(user, "\The [src] has been loosened.") - to_chat(wearer, "Your entire suit tightens around you as the components lock into place.") - if(airtight) - update_component_sealed() - update_icon(1) - -/obj/item/rig/proc/unseal(mob/living/user) - if(sealing) - return 0 - - if(!wearer || !user) - return - - var/sealed = (flags & NODROP) - if(!sealed) - to_chat(user, "\The [src] is already unsealed!") - return 0 - - sealing = TRUE - - var/failed_to_seal = FALSE - - if(!suit_is_deployed()) - to_chat(user, "\The [src] cannot unseal, as it is not fully deployed!") - failed_to_seal = TRUE - - if(!failed_to_seal) - if(user != wearer) - to_chat(user, "\The [src] begins to loosen it's seals.") - wearer.visible_message("\The [wearer]'s suit emits a quiet hum as it begins to loosen it's seals.", - "With a quiet hum, your suit begins to unseal.") - - if(seal_delay && !do_after(user, seal_delay, target = wearer)) - to_chat(user, "You must remain still to unseal \the [src]!") - failed_to_seal = TRUE - - if(!failed_to_seal) - var/list/pieces_data = list(list(wearer.shoes, boots, "boots", boot_type), - list(wearer.gloves, gloves, "gloves", glove_type), - list(wearer.head, helmet, "helmet", helm_type), - list(wearer.wear_suit, chest, "chest", chest_type)) - - for(var/list/piece_data in pieces_data) - var/obj/item/user_piece = piece_data[1] - var/obj/item/correct_piece = piece_data[2] - var/msg_type = piece_data[3] - var/piece_type = piece_data[4] - - if(!correct_piece || !piece_type) - continue - - if(user_piece != correct_piece) - to_chat(user, "\The [user_piece] is blocking \the [src] from deploying.") - failed_to_seal = TRUE - - if(seal_delay && !do_after(user, seal_delay, needhand = 0, target = wearer)) - to_chat(user, "You must remain still to unseal \the [src]!") - failed_to_seal = TRUE - - if(failed_to_seal) - break - - correct_piece.icon_state = "[initial(icon_state)]" - switch(msg_type) - if("boots") - to_chat(wearer, "\The [correct_piece] relax [correct_piece.p_their()] grip on your legs.") - if(user != wearer) - to_chat(user, "\The [correct_piece] has been unsealed.") - wearer.update_inv_shoes() - if("gloves") - to_chat(wearer, "\The [correct_piece] become loose around your fingers.") - if(user != wearer) - to_chat(user, "\The [correct_piece] has been unsealed.") - wearer.update_inv_gloves() - if("chest") - to_chat(wearer, "\The [correct_piece] releases your chest.") - if(user != wearer) - to_chat(user, "\The [correct_piece] has been unsealed.") - wearer.update_inv_wear_suit() - if("helmet") - to_chat(wearer, "\The [correct_piece] hisses open.") - if(user != wearer) - to_chat(user, "\The [correct_piece] has been unsealed.") - wearer.update_inv_head() - if(helmet) - helmet.update_light(wearer) - - correct_piece.armor = correct_piece.armor.setRating(bio_value = armor.getRating("bio")) - - sealing = FALSE - - if(failed_to_seal) - for(var/obj/item/piece in list(gloves, chest)) - if(!piece) - continue - piece.icon_state = "[initial(icon_state)]_sealed" - if(helmet) - helmet.icon_state = "[initial(icon_state)]_sealed[helmet.on]" - if(boots) - boots.icon_state = "[initial(icon_state)]_sealed[boots.magpulse]" - if(airtight) - update_component_sealed() - update_icon(1) - return 0 - - if(user != wearer) - to_chat(user, "\The [src] has been unsealed.") - to_chat(wearer, "Your entire suit loosens as the components relax.") - - flags &= ~NODROP - - for(var/obj/item/rig_module/module in installed_modules) - module.deactivate() - - if(airtight) - update_component_sealed() - update_icon(1) - -/obj/item/rig/proc/update_component_sealed() - if(istype(boots) && !(flags & NODROP) && boots.magpulse) //If we have (active) boots and unsealed the suit, we deactivate the magboots. - boots.attack_self(wearer) - if(istype(helmet) && !(flags & NODROP) && helmet.on) //If we have an (active) headlamp and unsealed the suit, we deactivate the headlamp. - helmet.toggle_light(wearer) - for(var/obj/item/piece in list(helmet,boots,gloves,chest)) - if(!(flags & NODROP)) - piece.flags &= ~(STOPSPRESSUREDMAGE | AIRTIGHT) - else - piece.flags |= STOPSPRESSUREDMAGE | AIRTIGHT - -/obj/item/rig/process() - // If we've lost any parts, grab them back. - var/mob/living/M - for(var/obj/item/piece in list(gloves,boots,helmet,chest)) - if(piece.loc != src && !(wearer && piece.loc == wearer)) - if(istype(piece.loc, /mob/living)) - M = piece.loc - M.unEquip(piece) - piece.forceMove(src) - - if(cell && cell.charge > 0 && electrified > 0) - electrified-- - - if(malfunction_delay > 0) - malfunction_delay-- - else if(malfunctioning) - malfunctioning-- - malfunction() - - if(!istype(wearer) || loc != wearer || wearer.back != src || !(flags & NODROP) || !cell || cell.charge <= 0) - if(!cell || cell.charge <= 0) - if(electrified > 0) - electrified = 0 - if(!offline) - if(istype(wearer)) - if(flags & NODROP) - if(offline_slowdown < 3) - to_chat(wearer, "Your suit beeps stridently, and suddenly goes dead.") - else - to_chat(wearer, "Your suit beeps stridently, and suddenly you're wearing a leaden mass of metal and plastic composites instead of a powered suit.") - if(offline_vision_restriction == 1) - to_chat(wearer, "The suit optics flicker and die, leaving you with restricted vision.") - else if(offline_vision_restriction == 2) - to_chat(wearer, "The suit optics drop out completely, drowning you in darkness.") - if(!offline) - offline = 1 - if(istype(wearer) && wearer.wearing_rig) - wearer.wearing_rig = null - else - if(offline) - offline = 0 - if(istype(wearer) && !wearer.wearing_rig) - wearer.wearing_rig = src - chest.slowdown = active_slowdown - - if(offline) - if(offline == 1) - for(var/obj/item/rig_module/module in installed_modules) - module.deactivate() - offline = 2 - chest.slowdown = offline_slowdown - return - - - for(var/obj/item/rig_module/module in installed_modules) - cell.use(module.process()*10) - -/obj/item/rig/proc/check_power_cost(var/mob/living/user, var/cost, var/use_unconcious, var/obj/item/rig_module/mod, var/user_is_ai) - if(!istype(user)) - return 0 - - var/fail_msg - - if(!user_is_ai) - var/mob/living/carbon/human/H = user - if(istype(H) && H.back != src) - fail_msg = "You must be wearing \the [src] to do this." - else if(user.incorporeal_move) - fail_msg = "You must be solid to do this." - if(sealing) - fail_msg = "The hardsuit is in the process of adjusting seals and cannot be activated." - else if(!fail_msg && ((use_unconcious && user.stat > 1) || (!use_unconcious && user.stat))) - fail_msg = "You are in no fit state to do that." - else if(!cell) - fail_msg = "There is no cell installed in the suit." - else if(cost && cell.charge < cost * 10) //TODO: Cellrate? - fail_msg = "Not enough stored power." - - if(fail_msg) - to_chat(user, "[fail_msg]") - return 0 - - // This is largely for cancelling stealth and whatever. - if(mod && mod.disruptive) - for(var/obj/item/rig_module/module in (installed_modules - mod)) - if(module.active && module.disruptable) - module.deactivate() - - cell.use(cost*10) - return 1 - -/obj/item/rig/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = GLOB.inventory_state) - if(!user) - return - - 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() - ui.set_auto_update(1) - -/obj/item/rig/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.inventory_state) - var/data[0] - - data["primarysystem"] = null - if(selected_module) - data["primarysystem"] = "[selected_module.interface_name]" - - data["ai"] = 0 - if(src.loc != user) - data["ai"] = 1 - - var/is_sealed = (flags & NODROP) //1 if NODROP, 0 if no-nodrop - data["seals"] = "[!is_sealed]" //1 if not NODROP (unsealed), 0 if NODROP (sealed) - data["sealing"] = "[src.sealing]" - data["helmet"] = (helmet ? "[helmet.name]" : "None.") - data["gauntlets"] = (gloves ? "[gloves.name]" : "None.") - data["boots"] = (boots ? "[boots.name]" : "None.") - data["chest"] = (chest ? "[chest.name]" : "None.") - - data["charge"] = cell ? round(cell.charge,1) : 0 - data["maxcharge"] = cell ? cell.maxcharge : 0 - data["chargestatus"] = cell ? FLOOR((cell.charge/cell.maxcharge)*50, 1) : 0 - - data["emagged"] = subverted - data["coverlock"] = locked - data["interfacelock"] = interface_locked - data["aicontrol"] = control_overridden - data["aioverride"] = ai_override_enabled - data["securitycheck"] = security_check_enabled - data["malf"] = malfunction_delay - - - var/list/module_list = list() - var/i = 1 - for(var/obj/item/rig_module/module in installed_modules) - var/list/module_data = list( - "index" = i, - "name" = "[module.interface_name]", - "desc" = "[module.interface_desc]", - "can_use" = "[module.usable]", - "can_select" = "[module.selectable]", - "can_toggle" = "[module.toggleable]", - "is_active" = "[module.active]", - "engagecost" = module.use_power_cost*10, - "activecost" = module.active_power_cost*10, - "passivecost" = module.passive_power_cost*10, - "engagestring" = module.engage_string, - "activatestring" = module.activate_string, - "deactivatestring" = module.deactivate_string, - "damage" = module.damage - ) - - if(module.charges && module.charges.len) - - module_data["charges"] = list() - var/datum/rig_charge/selected = module.charges[module.charge_selected] - module_data["chargetype"] = selected ? "[selected.display_name]" : "none" - - for(var/chargetype in module.charges) - var/datum/rig_charge/charge = module.charges[chargetype] - module_data["charges"] += list(list("caption" = "[chargetype] ([charge.charges])", "index" = "[chargetype]")) - - module_list += list(module_data) - i++ - - if(module_list.len) - data["modules"] = module_list - - return data - -/obj/item/rig/update_icon(var/update_mob_icon) - - //TODO: Maybe consider a cache for this (use mob_icon as blank canvas, use suit icon overlay). - overlays.Cut() - if(!mob_icon || update_mob_icon) - var/species_icon = 'icons/mob/rig_back.dmi' - // Since setting mob_icon will override the species checks in - // update_inv_wear_suit(), handle species checks here. - if(wearer && sprite_sheets && sprite_sheets[wearer.dna.species.name]) - species_icon = sprite_sheets[wearer.dna.species.name] - mob_icon = image("icon" = species_icon, "icon_state" = "[icon_state]") - - if(installed_modules.len) - for(var/obj/item/rig_module/module in installed_modules) - if(module.suit_overlay) - chest.overlays += image("icon" = 'icons/mob/rig_modules.dmi', "icon_state" = "[module.suit_overlay]", "dir" = SOUTH) - - if(wearer) - wearer.update_inv_shoes() - wearer.update_inv_gloves() - wearer.update_inv_head() - wearer.update_inv_wear_suit() - wearer.update_inv_back() - return - -/obj/item/rig/proc/check_suit_access(var/mob/living/carbon/human/user) - - if(!security_check_enabled) - return 1 - - if(istype(user)) - if(malfunction_check(user)) - return 0 - if(user.back != src) - return 0 - else if(!src.allowed(user)) - to_chat(user, "Unauthorized user. Access denied.") - return 0 - - else if(!ai_override_enabled) - to_chat(user, "Synthetic access disabled. Please consult hardware provider.") - return 0 - - return 1 - -/obj/item/rig/Topic(href,href_list) - if(!check_suit_access(usr)) - return 0 - - if(href_list["toggle_piece"]) - if(ishuman(usr) && (usr.stat || usr.stunned || usr.lying)) - return 0 - toggle_piece(href_list["toggle_piece"], usr) - else if(href_list["toggle_seals"]) - if(flags & NODROP) - unseal(usr) - else - seal(usr) - else if(href_list["interact_module"]) - var/module_index = text2num(href_list["interact_module"]) - - if(module_index > 0 && module_index <= installed_modules.len) - var/obj/item/rig_module/module = installed_modules[module_index] - switch(href_list["module_mode"]) - if("activate") - module.activate() - if("deactivate") - module.deactivate() - if("engage") - module.engage() - if("select") - selected_module = module - if("select_charge_type") - module.charge_selected = href_list["charge_type"] - else if(href_list["toggle_ai_control"]) - ai_override_enabled = !ai_override_enabled - notify_ai("Synthetic suit control has been [ai_override_enabled ? "enabled" : "disabled"].") - else if(href_list["toggle_suit_lock"]) - locked = !locked - - usr.set_machine(src) - add_fingerprint(usr) - return 0 - -/obj/item/rig/proc/notify_ai(var/message) - if(!message || !installed_modules || !installed_modules.len) - return - for(var/obj/item/rig_module/module in installed_modules) - for(var/mob/living/silicon/ai/ai in module.contents) - if(ai && ai.client && !ai.stat) - to_chat(ai, "[message]") - -/obj/item/rig/equipped(mob/living/carbon/human/M, slot) - ..() - if(!istype(M) || slot != slot_back) - return //we don't care about picking up/nonhumans - - spawn(1) //equipped() is called BEFORE the item is actually set as the slot - - if(seal_delay > 0 && istype(M) && M.back == src) - M.visible_message("[M] starts putting on \the [src]...", "You start putting on \the [src]...") - if(!do_after(M, seal_delay, target = M)) - if(M && M.back == src) - M.unEquip(src) - M.put_in_hands(src) - return - - if(istype(M) && M.back == src) - M.visible_message("[M] struggles into \the [src].", "You struggle into \the [src].") - wearer = M - wearer.wearing_rig = src - if(has_emergency_release) - M.verbs |= /obj/item/rig/proc/emergency_release - update_icon() - -/obj/item/rig/proc/toggle_piece(var/piece, var/mob/living/user, var/deploy_mode, var/force) - if(!istype(wearer) || wearer.back != src) - if(force) //can only force retracting sorry - for(var/obj/item/uneq_piece in list(helmet, gloves, boots, chest)) - if(uneq_piece) - if(isliving(uneq_piece.loc)) - var/mob/living/L = uneq_piece.loc - L.unEquip(uneq_piece, 1) - if(uneq_piece == boots) - if(under_boots) - if(L.equip_to_slot_if_possible(under_boots, slot_shoes)) - under_boots = null - else - to_chat(user, "Somehow, your [under_boots] got stuck to the [boots], and were retracted with them. ((This shouldn't happen, bug report this.))") - uneq_piece.forceMove(src) - return 0 - - if(sealing || !cell || !cell.charge) - return 0 - - if(!(deploy_mode == ONLY_RETRACT && force)) //This should be the case while stripping, stripping does trigger the if statement below. - if(user == wearer && user.incapacitated()) // If the user isn't wearing the suit it's probably an AI. - return 0 - - var/obj/item/check_slot - var/equip_to - var/obj/item/use_obj - - switch(piece) - if("helmet") - equip_to = slot_head - use_obj = helmet - check_slot = wearer.head - if("gauntlets") - equip_to = slot_gloves - use_obj = gloves - check_slot = wearer.gloves - if("boots") - equip_to = slot_shoes - use_obj = boots - check_slot = wearer.shoes - if("chest") - equip_to = slot_wear_suit - use_obj = chest - check_slot = wearer.wear_suit - - if(use_obj) - if(check_slot == use_obj && deploy_mode != ONLY_DEPLOY) //user is wearing it, retract it if not forced to deploy - if((flags & NODROP) && equip_to != slot_head && !force) //you can only retract the helmet if the suit isn't unsealed - to_chat(user, "You can't retract \the [use_obj] while the suit is sealed!") - return - - var/mob/living/to_strip - if(wearer) - to_strip = wearer - else if(isliving(use_obj.loc)) - to_strip = use_obj.loc - - if(to_strip) - to_strip.unEquip(use_obj, 1) - if(use_obj == boots) - if(under_boots) - if(to_strip.equip_to_slot_if_possible(under_boots, slot_shoes)) - under_boots = null - else - to_chat(user, "Somehow, your [under_boots] got stuck to the [boots], and were retracted with them. ((This shouldn't happen, bug report this.))") - use_obj.forceMove(src) - if(wearer) - to_chat(wearer, "Your [use_obj] [use_obj.gender == PLURAL ? "retract" : "retracts"] swiftly.") - - else if(deploy_mode != ONLY_RETRACT) - if(check_slot) - if(check_slot != use_obj) //If use_obj is already in check_slot, silently bail. Otherwise, tell the user why the part didn't deploy. - if(use_obj == boots) - under_boots = check_slot - wearer.unEquip(under_boots) - under_boots.forceMove(src) - else - to_chat(wearer, "You are unable to deploy \the [piece] as \the [check_slot] [check_slot.gender == PLURAL ? "are" : "is"] in the way.") - return - use_obj.forceMove(wearer) - if(!wearer.equip_to_slot_if_possible(use_obj, equip_to, FALSE, TRUE)) - use_obj.forceMove(src) - else - if(wearer) - to_chat(wearer, "Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly.") - - if(piece == "helmet" && helmet) - helmet.update_light(wearer) - -/obj/item/rig/proc/deploy(mob/user) - if(!wearer || !user) - return 0 - - if(flags & NODROP) //We need to check if we have the part, the person is wearing something in the parts slot, and if yes, are they the same. - if(helmet && wearer.head && wearer.head != helmet) - to_chat(user, "\The [wearer.head] is blocking \the [src] from deploying!") - return 0 - if(gloves && wearer.gloves && wearer.gloves != gloves) - to_chat(user, "\The [wearer.gloves] is preventing \the [src] from deploying!") - return 0 - /*if(boots && wearer.shoes && wearer.shoes != boots) - to_chat(user, "\The [wearer.shoes] is preventing \the [src] from deploying!") - return 0*/ - if(chest && wearer.wear_suit && wearer.wear_suit != chest) - to_chat(user, "\The [wearer.wear_suit] is preventing \the [src] from deploying!") - return 0 - - - for(var/piece in list("helmet", "gauntlets", "chest", "boots")) - toggle_piece(piece, user, ONLY_DEPLOY) - -/obj/item/rig/dropped(var/mob/user) - ..() - user.verbs -= /obj/item/rig/proc/emergency_release - for(var/piece in list("helmet","gauntlets","chest","boots")) - toggle_piece(piece, user, ONLY_RETRACT, 1) - if(wearer) - wearer.wearing_rig = null - wearer = null - -//Todo -/obj/item/rig/proc/malfunction() - return 0 - -/obj/item/rig/emp_act(severity_class) - //set malfunctioning - if(emp_protection < 30) //for ninjas, really. - malfunctioning += 10 - if(malfunction_delay <= 0) - malfunction_delay = max(malfunction_delay, round(30/severity_class)) - - //drain some charge - if(cell) cell.emp_act(severity_class + 15) - - //possibly damage some modules - take_hit((100/severity_class), "electrical pulse", 1) - -/obj/item/rig/proc/shock(mob/user) - if(get_dist(src, user) <= 1) //Needs to be adjecant to the rig to get shocked. - if(electrocute_mob(user, cell, src)) //electrocute_mob() handles removing charge from the cell, no need to do that here. - spark_system.start() - if(user.stunned) - return 1 - return 0 - -/obj/item/rig/proc/take_hit(damage, source, is_emp=0) - - if(!installed_modules.len) - return - - var/chance - if(!is_emp) - chance = 2*max(0, damage - (chest? chest.breach_threshold : 0)) - else - //Want this to be roughly independant of the number of modules, meaning that X emp hits will disable Y% of the suit's modules on average. - //that way people designing hardsuits don't have to worry (as much) about how adding that extra module will affect emp resiliance by 'soaking' hits for other modules - chance = 2*max(0, damage - emp_protection)*min(installed_modules.len/15, 1) - - if(!prob(chance)) - return - - //deal addition damage to already damaged module first. - //This way the chances of a module being disabled aren't so remote. - var/list/valid_modules = list() - var/list/damaged_modules = list() - for(var/obj/item/rig_module/module in installed_modules) - if(module.damage < 2) - valid_modules |= module - if(module.damage > 0) - damaged_modules |= module - - var/obj/item/rig_module/dam_module = null - if(damaged_modules.len) - dam_module = pick(damaged_modules) - else if(valid_modules.len) - dam_module = pick(valid_modules) - - if(!dam_module) return - - dam_module.damage++ - - if(!source) - source = "hit" - - if(wearer) - if(dam_module.damage >= 2) - to_chat(wearer, "The [source] has disabled your [dam_module.interface_name]!") - else - to_chat(wearer, "The [source] has damaged your [dam_module.interface_name]!") - dam_module.deactivate() - -/obj/item/rig/proc/malfunction_check(var/mob/living/carbon/human/user) - if(malfunction_delay) - if(offline) - to_chat(user, "The suit is completely unresponsive.") - else - to_chat(user, "ERROR: Hardware fault. Rebooting interface...") - return 1 - return 0 - -/obj/item/rig/proc/ai_can_move_suit(var/mob/user, var/check_user_module = 0, var/check_for_ai = 0) - - if(check_for_ai) - if(!(locate(/obj/item/rig_module/ai_container) in contents)) - return 0 - var/found_ai - for(var/obj/item/rig_module/ai_container/module in contents) - if(module.damage >= 2) - continue - if(module.integrated_ai && module.integrated_ai.client && !module.integrated_ai.stat) - found_ai = 1 - break - if(!found_ai) - return 0 - - if(check_user_module) - if(!user || !user.loc || !user.loc.loc) - return 0 - var/obj/item/rig_module/ai_container/module = user.loc.loc - if(!istype(module) || module.damage >= 2) - to_chat(user, "Your host module is unable to interface with the suit.") - return 0 - - if(offline || !cell || !cell.charge || locked_down) - if(user) - to_chat(user, "Your host rig is unpowered and unresponsive.") - return 0 - if(!wearer || wearer.back != src) - if(user) - to_chat(user, "Your host rig is not being worn.") - return 0 - if(!wearer.stat && !control_overridden && !ai_override_enabled) - if(user) - to_chat(user, "You are locked out of the suit servo controller.") - return 0 - return 1 - -/obj/item/rig/proc/force_rest(var/mob/user) - if(!ai_can_move_suit(user, check_user_module = 1)) - return - wearer.lay_down() - to_chat(user, "\The [wearer] is now [wearer.resting ? "resting" : "getting up"].") - -/obj/item/rig/proc/forced_move(var/direction, var/mob/user) - - // Why is all this shit in client/Move()? Who knows? - if(world.time < wearer_move_delay) - return - - if(!wearer || !wearer.loc || !ai_can_move_suit(user, check_user_module = 1)) - return - - //This is sota the goto stop mobs from moving var - if(wearer.notransform || !wearer.canmove) - return - - if(!wearer.lastarea) - wearer.lastarea = get_area(wearer.loc) - - if((istype(wearer.loc, /turf/space)) || (wearer.lastarea.has_gravity == 0)) - if(!wearer.Process_Spacemove(0)) - return 0 - - if(malfunctioning) - direction = pick(GLOB.cardinal) - - // Inside an object, tell it we moved. - if(isobj(wearer.loc) || ismob(wearer.loc)) - var/atom/O = wearer.loc - return O.relaymove(wearer, direction) - - if(isturf(wearer.loc)) - if(wearer.restrained())//Why being pulled while cuffed prevents you from moving - for(var/mob/M in range(wearer, 1)) - if(M.pulling == wearer) - if(!M.restrained() && M.stat == 0 && M.canmove && wearer.Adjacent(M)) - to_chat(user, "Your host is restrained! They can't move!") - return 0 - else - M.stop_pulling() - - // AIs are a bit slower than regular and ignore move intent. - wearer_move_delay = world.time + ai_controlled_move_delay - - if(wearer.buckled) //if we're buckled to something, tell it we moved. - return wearer.buckled.relaymove(wearer, direction) - - if(cell.use(200)) //Arbitrary, TODO - wearer.Move(get_step(get_turf(wearer),direction),direction) - -// This returns the rig if you are contained inside one, but not if you are wearing it -/atom/proc/get_rig() - if(loc) - return loc.get_rig() - return null - -/obj/item/rig/get_rig() - return src - -/mob/living/carbon/human/get_rig() - if(istype(back,/obj/item/rig)) - return back - else - return null - -/obj/item/rig/proc/emergency_release() - set name = "Suit Emergency Release" - set desc = "Activate the suits emergency release system." - set category = "Object" - set src in oview(1) - var/obj/item/rig/T = get_rig() - return T.do_emergency_release(usr) - -/obj/item/rig/proc/do_emergency_release(var/mob/living/user) - if(!can_touch(user, wearer) || !has_emergency_release) - return can_touch(user,wearer) - usr.visible_message("[user] starts activating \the [src] emergency seals release!") - if(!do_after(user, 240, target = wearer)) - to_chat(user, "You need to focus on activating the emergency release.") - return 0 - usr.visible_message("[user] activated \the [src] emergency seals release!") - malfunctioning += 1 - malfunction_delay = 30 - unseal(user) - return 1 - -/obj/item/rig/proc/can_touch(var/mob/user, var/mob/wearer) - if(!user) - return 0 - if(!wearer.Adjacent(user)) - return 0 - if(user.restrained()) - to_chat(user, "You need your hands free for this.") - return 0 - if(user.stat || user.paralysis || user.sleeping || user.lying || user.IsWeakened()) - return 0 - return 1 -#undef ONLY_DEPLOY -#undef ONLY_RETRACT -#undef SEAL_DELAY diff --git a/code/modules/clothing/spacesuits/rig/rig_armormod.dm b/code/modules/clothing/spacesuits/rig/rig_armormod.dm deleted file mode 100644 index c04270aa97b..00000000000 --- a/code/modules/clothing/spacesuits/rig/rig_armormod.dm +++ /dev/null @@ -1,30 +0,0 @@ -/obj/item/clothing/suit/space/new_rig/calc_breach_damage() - ..() - holder.update_armor() //New dammage, new armormultiplikator. - return damage - -/obj/item/rig/proc/update_armor() - var/multi = 1 //Multiplicative modification to the armor, maybe add an additive later on - if(chest) - multi *= (100 - chest.damage) / 100 //If we have some breaches, lower the armor value. - - //TODO check for other armor mods, likely modules, which need to be coded. - if(!armor) //Did we even give them some armor, if this is the case, the list should be initialized from New() - return - - var/datum/armor/A = armor - for(var/obj/item/piece in list(gloves, helmet, boots, chest)) - if(!istype(piece)) //Do we have the piece - continue - - piece.armor = piece.armor.setRating(melee_value = A.getRating("melee") * multi, - bullet_value = A.getRating("bullet") * multi, - laser_value = A.getRating("laser") * multi, - energy_value = A.getRating("energy") * multi, - bomb_value = A.getRating("bomb") * multi, - bio_value = A.getRating("bio") * multi, - rad_value = A.getRating("rad") * multi, - fire_value = A.getRating("fire") * multi, - acid_value = A.getRating("acidd") * multi) - -//Perfect place to also add something like shield modules, or any other hit_reaction modules check. diff --git a/code/modules/clothing/spacesuits/rig/rig_attackby.dm b/code/modules/clothing/spacesuits/rig/rig_attackby.dm deleted file mode 100644 index b48e17b2c41..00000000000 --- a/code/modules/clothing/spacesuits/rig/rig_attackby.dm +++ /dev/null @@ -1,196 +0,0 @@ -/obj/item/rig/attackby(obj/item/W as obj, mob/user as mob) - - if(!istype(user,/mob/living)) return 0 - - if(electrified != 0) - if(shock(user)) //Handles removing charge from the cell, as well. No need to do that here. - return - - // Pass repair items on to the chestpiece. - if(chest && (istype(W,/obj/item/stack) || istype(W, /obj/item/weldingtool))) - return chest.attackby(W,user) - - // Lock or unlock the access panel. - if(W.GetID()) - if(subverted) - locked = 0 - to_chat(user, "It looks like the locking system has been shorted out.") - return - - if((!req_access || !req_access.len) && (!req_one_access || !req_one_access.len)) - locked = 0 - to_chat(user, "\The [src] doesn't seem to have a locking mechanism.") - return - - if(security_check_enabled && !src.allowed(user)) - to_chat(user, "Access denied.") - return - - locked = !locked - to_chat(user, "You [locked ? "lock" : "unlock"] \the [src] access panel.") - return - - else if(istype(W,/obj/item/crowbar)) - - if(!open && locked) - to_chat(user, "The access panel is locked shut.") - return - - open = !open - to_chat(user, "You [open ? "open" : "close"] the access panel.") - return - - if(open) - - // Hacking. - if(istype(W,/obj/item/wirecutters) || istype(W,/obj/item/multitool)) - if(open) - wires.Interact(user) - else - to_chat(user, "You can't reach the wiring.") - return - // Air tank. - if(istype(W,/obj/item/tank)) //Todo, some kind of check for suits without integrated air supplies. - - if(air_supply) - to_chat(user, "\The [src] already has a tank installed.") - return - - user.unEquip(W) - air_supply = W - W.forceMove(src) - to_chat(user, "You slot [W] into [src] and tighten the connecting valve.") - return - - // Check if this is a hardsuit upgrade or a modification. - else if(istype(W,/obj/item/rig_module)) - - if(istype(src.loc,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = src.loc - if(H.back == src) - to_chat(user, "You can't install a hardsuit module while the suit is being worn.") - return 1 - - if(!installed_modules) installed_modules = list() - if(installed_modules.len) - for(var/obj/item/rig_module/installed_mod in installed_modules) - if(!installed_mod.redundant && istype(installed_mod,W)) - to_chat(user, "The hardsuit already has a module of that class installed.") - return 1 - - var/obj/item/rig_module/mod = W - to_chat(user, "You begin installing \the [mod] into \the [src].") - if(!do_after(user, 40 * W.toolspeed, target = src)) - return - if(!user || !W) - return - to_chat(user, "You install \the [mod] into \the [src].") - user.unEquip(mod) - installed_modules |= mod - mod.forceMove(src) - mod.installed(src) - update_icon() - return 1 - - else if(!cell && istype(W,/obj/item/stock_parts/cell)) - - to_chat(user, "You jack \the [W] into \the [src]'s battery mount.") - user.unEquip(W) - W.forceMove(src) - src.cell = W - return - - else if(istype(W,/obj/item/wrench)) - - if(!air_supply) - to_chat(user, "There is not tank to remove.") - return - - if(user.r_hand && user.l_hand) - air_supply.forceMove(get_turf(user)) - else - user.put_in_hands(air_supply) - to_chat(user, "You detach and remove \the [air_supply].") - air_supply = null - return - - else if(istype(W,/obj/item/screwdriver)) - - var/list/current_mounts = list() - if(cell) current_mounts += "cell" - if(installed_modules && installed_modules.len) current_mounts += "system module" - - var/to_remove = input("Which would you like to modify?") as null|anything in current_mounts - if(!to_remove) - return - - if(istype(src.loc,/mob/living/carbon/human) && to_remove != "cell") - var/mob/living/carbon/human/H = src.loc - if(H.back == src) - to_chat(user, "You can't remove an installed device while the hardsuit is being worn.") - return - - switch(to_remove) - - if("cell") - - if(cell) - to_chat(user, "You detatch \the [cell] from \the [src]'s battery mount.") - for(var/obj/item/rig_module/module in installed_modules) - module.deactivate() - if(user.r_hand && user.l_hand) - cell.forceMove(get_turf(user)) - else - user.put_in_hands(cell) - cell = null - else - to_chat(user, "There is nothing loaded in that mount.") - - if("system module") - - var/list/possible_removals = list() - for(var/obj/item/rig_module/module in installed_modules) - if(module.permanent) - continue - possible_removals[module.name] = module - - if(!possible_removals.len) - to_chat(user, "There are no installed modules to remove.") - return - - var/removal_choice = input("Which module would you like to remove?") as null|anything in possible_removals - if(!removal_choice) - return - - var/obj/item/rig_module/removed = possible_removals[removal_choice] - to_chat(user, "You detatch \the [removed] from \the [src].") - removed.forceMove(get_turf(src)) - removed.removed() - installed_modules -= removed - update_icon() - - return - - // If we've gotten this far, all we have left to do before we pass off to root procs - // is check if any of the loaded modules want to use the item we've been given. - for(var/obj/item/rig_module/module in installed_modules) - if(module.accepts_item(W,user)) //Item is handled in this proc - return - ..() - - -/obj/item/rig/attack_hand(var/mob/user) - - if(electrified != 0) - if(shock(user)) //Handles removing charge from the cell, as well. No need to do that here. - return - ..() - -/obj/item/rig/emag_act(var/remaining_charges, var/mob/user) - if(!subverted) - req_access.Cut() - req_one_access.Cut() - locked = 0 - subverted = 1 - to_chat(user, "You short out the access protocol for the suit.") - return 1 diff --git a/code/modules/clothing/spacesuits/rig/rig_pieces.dm b/code/modules/clothing/spacesuits/rig/rig_pieces.dm deleted file mode 100644 index 246e3beb10f..00000000000 --- a/code/modules/clothing/spacesuits/rig/rig_pieces.dm +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Defines the helmets, gloves and shoes for rigs. - */ - -/obj/item/clothing/head/helmet/space/new_rig - name = "helmet" - flags = BLOCKHAIR | THICKMATERIAL | NODROP - flags_inv = HIDEEARS|HIDEEYES|HIDEFACE|HIDEMASK - body_parts_covered = HEAD - heat_protection = HEAD - cold_protection = HEAD - var/brightness_on = 4 - var/on = 0 - sprite_sheets = list( - "Tajaran" = 'icons/mob/species/tajaran/helmet.dmi', - "Skrell" = 'icons/mob/species/skrell/helmet.dmi', - "Unathi" = 'icons/mob/species/unathi/helmet.dmi' - ) - species_restricted = null - actions_types = list(/datum/action/item_action/toggle_helmet_light) - - flash_protect = 2 - -/obj/item/clothing/head/helmet/space/new_rig/attack_self(mob/user) - if(!isturf(user.loc)) - to_chat(user, "You cannot turn the light on while in this [user.loc].")//To prevent some lighting anomalities. - - return - toggle_light(user) - -/obj/item/clothing/head/helmet/space/new_rig/proc/toggle_light(mob/user) - if(flags & AIRTIGHT) //Could also check for STOPSPRESSUREDMAGE, but one is enough, both get toggled when the seal gets toggled. - - on = !on - icon_state = "[item_color][on]" - - if(on) - set_light(brightness_on) - else - set_light(0) - else - to_chat(user, "You cannot turn the light on while the suit isn't sealed.") - - if(istype(user,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = user - H.update_inv_head() - -/obj/item/clothing/gloves/rig - name = "gauntlets" - flags = THICKMATERIAL | NODROP - body_parts_covered = HANDS - heat_protection = HANDS - cold_protection = HANDS - species_restricted = null - gender = PLURAL - -/obj/item/clothing/shoes/magboots/rig - name = "boots" - flags = NODROP - body_parts_covered = FEET - cold_protection = FEET - heat_protection = FEET - species_restricted = null - gender = PLURAL - -/obj/item/clothing/shoes/magboots/rig/attack_self(mob/user) - if(flags & AIRTIGHT) //Could also check for STOPSPRESSUREDMAGE, but one is enough, both get toggled when the seal gets toggled. - ..(user) - else - to_chat(user, "You cannot activate mag-pulse traction system while the suit is not sealed.") - -/obj/item/clothing/suit/space/new_rig - name = "chestpiece" - allowed = list(/obj/item/flashlight,/obj/item/tank) - body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS - heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS - cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS - flags_inv = HIDEJUMPSUIT|HIDETAIL - flags = STOPSPRESSUREDMAGE | THICKMATERIAL | AIRTIGHT | NODROP - slowdown = 0 - breach_threshold = 20 - resilience = 0.2 - can_breach = 1 - var/obj/item/rig/holder - sprite_sheets = list( - "Tajaran" = 'icons/mob/species/tajaran/suit.dmi', - "Unathi" = 'icons/mob/species/unathi/suit.dmi' - ) - -//TODO: move this to modules -/obj/item/clothing/head/helmet/space/new_rig/proc/prevent_track() - return 0 - -/obj/item/clothing/gloves/rig/Touch(var/atom/A, var/proximity) - - if(!A || !proximity) - return 0 - - var/mob/living/carbon/human/H = loc - if(!istype(H) || !H.back) - return 0 - - var/obj/item/rig/suit = H.back - if(!suit || !istype(suit) || !suit.installed_modules.len) - return 0 - - for(var/obj/item/rig_module/module in suit.installed_modules) - if(module.active && module.activates_on_touch) - if(module.engage(A)) - return 1 - - return 0 - -//Rig pieces for non-spacesuit based rigs - -/obj/item/clothing/head/lightrig - name = "mask" - body_parts_covered = HEAD - heat_protection = HEAD - cold_protection = HEAD - flags = THICKMATERIAL|AIRTIGHT - -/obj/item/clothing/suit/lightrig - name = "suit" - allowed = list(/obj/item/flashlight) - body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS - heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS - cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS - flags_inv = HIDEJUMPSUIT - flags = THICKMATERIAL - -/obj/item/clothing/shoes/lightrig - name = "boots" - body_parts_covered = FEET - cold_protection = FEET - heat_protection = FEET - species_restricted = null - gender = PLURAL - -/obj/item/clothing/gloves/lightrig - name = "gloves" - flags = THICKMATERIAL - body_parts_covered = HANDS - heat_protection = HANDS - cold_protection = HANDS - species_restricted = null - gender = PLURAL diff --git a/code/modules/clothing/spacesuits/rig/rig_verbs.dm b/code/modules/clothing/spacesuits/rig/rig_verbs.dm deleted file mode 100644 index 4a71f6c67bc..00000000000 --- a/code/modules/clothing/spacesuits/rig/rig_verbs.dm +++ /dev/null @@ -1,335 +0,0 @@ -// Interface for humans. -/obj/item/rig/verb/hardsuit_interface() - set name = "Open Hardsuit Interface" - set desc = "Open the hardsuit system interface." - set category = "Hardsuit" - set src = usr.contents - - if(wearer && wearer.back == src) - ui_interact(usr) - -/obj/item/rig/verb/toggle_vision() - set name = "Toggle Visor" - set desc = "Turns your rig visor off or on." - set category = "Hardsuit" - set src = usr.contents - - if(!istype(wearer) || !wearer.back == src) - to_chat(usr, "The hardsuit is not being worn.") - return - - if(!check_power_cost(usr)) - return - - if(!(flags & NODROP)) - to_chat(usr, "The suit is not active.") - return - - if(!check_suit_access(usr)) - return - - if(!visor) - to_chat(usr, "The hardsuit does not have a configurable visor.") - return - - var/mob/M = usr - if(M.incapacitated()) - return - - if(!visor.active) - visor.activate() - else - visor.deactivate() - -/obj/item/rig/proc/toggle_helmet() - set name = "Toggle Helmet" - set desc = "Deploys or retracts your helmet." - set category = "Hardsuit" - set src = usr.contents - - if(!istype(wearer) || !wearer.back == src) - to_chat(usr, "The hardsuit is not being worn.") - return - - if(!check_suit_access(usr)) - return - - var/mob/M = usr - if(M.incapacitated()) - return - - toggle_piece("helmet", usr) - -/obj/item/rig/proc/toggle_chest() - set name = "Toggle Chestpiece" - set desc = "Deploys or retracts your chestpiece." - set category = "Hardsuit" - set src = usr.contents - - if(!check_suit_access(usr)) - return - - var/mob/M = usr - if(M.incapacitated()) - return - - toggle_piece("chest", usr) - -/obj/item/rig/proc/toggle_gauntlets() - set name = "Toggle Gauntlets" - set desc = "Deploys or retracts your gauntlets." - set category = "Hardsuit" - set src = usr.contents - - if(!istype(wearer) || !wearer.back == src) - to_chat(usr, "The hardsuit is not being worn.") - return - - if(!check_suit_access(usr)) - return - - var/mob/M = usr - if(M.incapacitated()) - return - - toggle_piece("gauntlets", usr) - -/obj/item/rig/proc/toggle_boots() - set name = "Toggle Boots" - set desc = "Deploys or retracts your boots." - set category = "Hardsuit" - set src = usr.contents - - if(!istype(wearer) || !wearer.back == src) - to_chat(usr, "The hardsuit is not being worn.") - return - - if(!check_suit_access(usr)) - return - - var/mob/M = usr - if(M.incapacitated()) - return - - toggle_piece("boots", usr) - -/obj/item/rig/verb/deploy_suit() - set name = "Deploy Hardsuit" - set desc = "Deploys helmet, gloves and boots all at once." - set category = "Hardsuit" - set src = usr.contents - - if(!istype(wearer) || !wearer.back == src) - to_chat(usr, "The hardsuit is not being worn.") - return - - if(!check_suit_access(usr)) - return - - if(!check_power_cost(usr)) - return - - var/mob/M = usr - if(M.incapacitated()) - return - - deploy(wearer, usr) - -/obj/item/rig/verb/toggle_seals_verb() - set name = "Toggle Hardsuit Seals" - set desc = "Seals or unseals your rig." - set category = "Hardsuit" - set src = usr.contents - - if(!istype(wearer) || !wearer.back == src) - to_chat(usr, "The hardsuit is not being worn.") - return - - if(!check_suit_access(usr)) - return - - var/mob/M = usr - if(M.incapacitated()) - return - - if(flags & NODROP) - unseal(usr) - else - seal(usr) - -/obj/item/rig/verb/switch_vision_mode() - set name = "Switch Vision Mode" - set desc = "Switches between available vision modes." - set category = "Hardsuit" - set src = usr.contents - - if(malfunction_check(usr)) - return - - if(!check_power_cost(usr, 0, 0, 0, 0)) - return - - if(!(flags & NODROP)) - to_chat(usr, "The suit is not active.") - return - - if(!visor) - to_chat(usr, "The hardsuit does not have a configurable visor.") - return - - var/mob/M = usr - if(M.incapacitated()) - return - - if(!visor.active) - visor.activate() - - if(!visor.active) - to_chat(usr, "The visor is suffering a hardware fault and cannot be configured.") - return - - visor.engage() - -/obj/item/rig/verb/alter_voice() - set name = "Configure Voice Synthesiser" - set desc = "Toggles or configures your voice synthesizer." - set category = "Hardsuit" - set src = usr.contents - - if(malfunction_check(usr)) - return - - if(!(flags & NODROP)) - to_chat(usr, "The suit is not active.") - return - - if(!istype(wearer) || !wearer.back == src) - to_chat(usr, "The hardsuit is not being worn.") - return - - if(!speech) - to_chat(usr, "The hardsuit does not have a speech synthesiser.") - return - - var/mob/M = usr - if(M.incapacitated()) - return - - speech.engage() - -/obj/item/rig/verb/select_module() - set name = "Select Module" - set desc = "Selects a module as your primary system." - set category = "Hardsuit" - set src = usr.contents - - if(malfunction_check(usr)) - return - - if(!check_power_cost(usr, 0, 0, 0, 0)) - return - - if(!(flags & NODROP)) - to_chat(usr, "The suit is not active.") - return - - if(!istype(wearer) || !wearer.back == src) - to_chat(usr, "The hardsuit is not being worn.") - return - - var/mob/M = usr - if(M.incapacitated()) - return - - var/list/selectable = list() - for(var/obj/item/rig_module/module in installed_modules) - if(module.selectable) - selectable |= module - - var/obj/item/rig_module/module = input("Which module do you wish to select?") as null|anything in selectable - - if(!istype(module)) - selected_module = null - to_chat(usr, "Primary system is now: deselected.") - return - - selected_module = module - to_chat(usr, "Primary system is now: [selected_module.interface_name].") - -/obj/item/rig/verb/toggle_module() - set name = "Toggle Module" - set desc = "Toggle a system module." - set category = "Hardsuit" - set src = usr.contents - - if(malfunction_check(usr)) - return - - if(!check_power_cost(usr, 0, 0, 0, 0)) - return - - if(!(flags & NODROP)) - to_chat(usr, "The suit is not active.") - return - - if(!istype(wearer) || !wearer.back == src) - to_chat(usr, "The hardsuit is not being worn.") - return - - var/mob/M = usr - if(M.incapacitated()) - return - - var/list/selectable = list() - for(var/obj/item/rig_module/module in installed_modules) - if(module.toggleable) - selectable |= module - - var/obj/item/rig_module/module = input("Which module do you wish to toggle?") as null|anything in selectable - - if(!istype(module)) - return - - if(module.active) - to_chat(usr, "You attempt to deactivate \the [module.interface_name].") - module.deactivate() - else - to_chat(usr, "You attempt to activate \the [module.interface_name].") - module.activate() - -/obj/item/rig/verb/engage_module() - set name = "Engage Module" - set desc = "Engages a system module." - set category = "Hardsuit" - set src = usr.contents - - if(malfunction_check(usr)) - return - - if(!(flags & NODROP)) - to_chat(usr, "The suit is not active.") - return - - if(!istype(wearer) || !wearer.back == src) - to_chat(usr, "The hardsuit is not being worn.") - return - - if(!check_power_cost(usr, 0, 0, 0, 0)) - return - - var/mob/M = usr - if(M.incapacitated()) - return - - var/list/selectable = list() - for(var/obj/item/rig_module/module in installed_modules) - if(module.usable) - selectable |= module - - var/obj/item/rig_module/module = input("Which module do you wish to engage?") as null|anything in selectable - - if(!istype(module)) - return - - to_chat(usr, "You attempt to engage the [module.interface_name].") - module.engage() diff --git a/code/modules/clothing/spacesuits/rig/rig_wiring.dm b/code/modules/clothing/spacesuits/rig/rig_wiring.dm deleted file mode 100644 index 9d3108ac016..00000000000 --- a/code/modules/clothing/spacesuits/rig/rig_wiring.dm +++ /dev/null @@ -1,70 +0,0 @@ -/datum/wires/rig - random = 1 - holder_type = /obj/item/rig - wire_count = 5 - -#define RIG_SECURITY 1 -#define RIG_AI_OVERRIDE 2 -#define RIG_SYSTEM_CONTROL 4 -#define RIG_INTERFACE_LOCK 8 -#define RIG_INTERFACE_SHOCK 16 -/* - * Rig security can be snipped to disable ID access checks on rig. - * Rig AI override can be pulsed to toggle whether or not the AI can take control of the suit. - * System control can be pulsed to toggle some malfunctions. - * Interface lock can be pulsed to toggle whether or not the interface can be accessed. - */ - -/datum/wires/rig/UpdateCut(var/index, var/mended) - - var/obj/item/rig/rig = holder - switch(index) - if(RIG_SECURITY) - if(mended) - rig.req_access = initial(rig.req_access) - rig.req_one_access = initial(rig.req_one_access) - if(RIG_INTERFACE_SHOCK) - rig.electrified = mended ? 0 : -1 - rig.shock(usr,100) - -/datum/wires/rig/UpdatePulsed(var/index) - - var/obj/item/rig/rig = holder - switch(index) - if(RIG_SECURITY) - rig.security_check_enabled = !rig.security_check_enabled - rig.visible_message("\The [rig] twitches as several suit locks [rig.security_check_enabled?"close":"open"].") - if(RIG_AI_OVERRIDE) - rig.ai_override_enabled = !rig.ai_override_enabled - rig.visible_message("A small red light on [rig] [rig.ai_override_enabled?"goes dead":"flickers on"].") - if(RIG_SYSTEM_CONTROL) - rig.malfunctioning += 10 - if(rig.malfunction_delay <= 0) - rig.malfunction_delay = 20 - rig.shock(usr,100) - if(RIG_INTERFACE_LOCK) - rig.interface_locked = !rig.interface_locked - rig.visible_message("\The [rig] clicks audibly as the software interface [rig.interface_locked?"darkens":"brightens"].") - if(RIG_INTERFACE_SHOCK) - if(rig.electrified != -1) - rig.electrified = 30 - rig.shock(usr,100) - -/datum/wires/rig/GetWireName(index) - switch(index) - if(RIG_SECURITY) - return "ID check" - if(RIG_AI_OVERRIDE) - return "AI control" - if(RIG_SYSTEM_CONTROL) - return "System control" - if(RIG_INTERFACE_LOCK) - return "Interface lock" - if(RIG_INTERFACE_SHOCK) - return "Electrification" - -/datum/wires/rig/CanUse(var/mob/living/L) - var/obj/item/rig/rig = holder - if(rig.open) - return 1 - return 0 diff --git a/code/modules/clothing/spacesuits/rig/suits/alien.dm b/code/modules/clothing/spacesuits/rig/suits/alien.dm deleted file mode 100644 index 25c784ba7dd..00000000000 --- a/code/modules/clothing/spacesuits/rig/suits/alien.dm +++ /dev/null @@ -1,46 +0,0 @@ -/obj/item/rig/unathi - name = "NT breacher chassis control module" - desc = "A cheap NT knock-off of an Unathi battle-rig. Looks like a fish, moves like a fish, steers like a cow." - suit_type = "NT breacher" - icon_state = "breacher_rig_cheap" - armor = list(melee = 30, bullet = 30, laser = 30, energy = 30, bomb = 45, bio = 100, rad = 50) - emp_protection = -20 - active_slowdown = 6 - offline_slowdown = 10 - vision_restriction = 1 - offline_vision_restriction = 2 - - chest_type = /obj/item/clothing/suit/space/new_rig/unathi - helm_type = /obj/item/clothing/head/helmet/space/new_rig/unathi - glove_type = /obj/item/clothing/gloves/rig/unathi - boot_type = /obj/item/clothing/shoes/magboots/rig/unathi - -/obj/item/rig/unathi/fancy - name = "breacher chassis control module" - desc = "An authentic Unathi breacher chassis. Huge, bulky and absurdly heavy. It must be like wearing a tank." - suit_type = "breacher chassis" - icon_state = "breacher_rig" - armor = list(melee = 45, bullet = 45, laser = 45, energy = 45, bomb = 45, bio = 100, rad = 75) //Takes TEN TIMES as much damage to stop someone in a breacher. In exchange, it's slow. //Whoever made this was on meth - vision_restriction = 0 - -/obj/item/clothing/head/helmet/space/new_rig/unathi - icon = 'icons/obj/clothing/species/unathi/hats.dmi' - species_restricted = list("Unathi") - -/obj/item/clothing/suit/space/new_rig/unathi - icon = 'icons/obj/clothing/species/unathi/suits.dmi' - species_restricted = list("Unathi") - -/obj/item/clothing/gloves/rig/unathi - icon = 'icons/obj/clothing/species/unathi/gloves.dmi' - species_restricted = list("Unathi") - sprite_sheets = list( - "Unathi" = 'icons/mob/species/unathi/gloves.dmi' - ) - -/obj/item/clothing/shoes/magboots/rig/unathi - icon = 'icons/obj/clothing/species/unathi/shoes.dmi' - species_restricted = list("Unathi") - sprite_sheets = list( - "Unathi" = 'icons/mob/species/unathi/feet.dmi' - ) diff --git a/code/modules/clothing/spacesuits/rig/suits/combat.dm b/code/modules/clothing/spacesuits/rig/suits/combat.dm deleted file mode 100644 index cc05c8af2f7..00000000000 --- a/code/modules/clothing/spacesuits/rig/suits/combat.dm +++ /dev/null @@ -1,28 +0,0 @@ -/obj/item/clothing/head/helmet/space/new_rig/combat - -/obj/item/rig/combat - name = "combat hardsuit control module" - desc = "A sleek and dangerous hardsuit for active combat." - icon_state = "security_rig" - suit_type = "combat hardsuit" - armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100) - active_slowdown = 1 - offline_slowdown = 3 - offline_vision_restriction = 1 - - helm_type = /obj/item/clothing/head/helmet/space/new_rig/combat - allowed = list(/obj/item/gun,/obj/item/flashlight,/obj/item/tank,/obj/item/melee/baton) - - -/obj/item/rig/combat/equipped - - - initial_modules = list( - /obj/item/rig_module/mounted, - /obj/item/rig_module/vision/thermal, - /obj/item/rig_module/grenade_launcher, - /obj/item/rig_module/ai_container, - // /obj/item/rig_module/power_sink, - /obj/item/rig_module/electrowarfare_suite, - /obj/item/rig_module/chem_dispenser/combat - ) diff --git a/code/modules/clothing/spacesuits/rig/suits/ert_suits.dm b/code/modules/clothing/spacesuits/rig/suits/ert_suits.dm deleted file mode 100644 index 5485e1fe882..00000000000 --- a/code/modules/clothing/spacesuits/rig/suits/ert_suits.dm +++ /dev/null @@ -1,81 +0,0 @@ -/obj/item/clothing/head/helmet/space/new_rig/ert - -/obj/item/rig/ert - name = "ERT-C hardsuit control module" - desc = "A suit worn by the commander of an Emergency Response Team. Has blue highlights. Armoured and space ready." - suit_type = "ERT commander" - icon_state = "ert_commander_rig" - - helm_type = /obj/item/clothing/head/helmet/space/new_rig/ert - - req_access = list(ACCESS_CENT_SPECOPS) - - armor = list(melee = 45, bullet = 25, laser = 30, energy = 10, bomb = 25, bio = 100, rad = 50) - allowed = list(/obj/item/flashlight, /obj/item/tank, /obj/item/t_scanner, /obj/item/rcd, /obj/item/crowbar, \ - /obj/item/screwdriver, /obj/item/weldingtool, /obj/item/wirecutters, /obj/item/wrench, /obj/item/multitool, \ - /obj/item/radio, /obj/item/analyzer,/obj/item/storage/briefcase/inflatable, /obj/item/melee/baton, /obj/item/gun, \ - /obj/item/storage/firstaid, /obj/item/reagent_containers/hypospray, /obj/item/roller) - - initial_modules = list( - /obj/item/rig_module/ai_container, - /obj/item/rig_module/maneuvering_jets, - /obj/item/rig_module/datajack, - ) - -/obj/item/rig/ert/engineer - name = "ERT-E suit control module" - desc = "A suit worn by the engineering division of an Emergency Response Team. Has orange highlights. Armoured and space ready." - suit_type = "ERT engineer" - icon_state = "ert_engineer_rig" - siemens_coefficient = 0 - - initial_modules = list( - /obj/item/rig_module/ai_container, - /obj/item/rig_module/maneuvering_jets, - /obj/item/rig_module/device/plasmacutter, - // /obj/item/rig_module/device/rcd - ) - -/obj/item/rig/ert/medical - name = "ERT-M suit control module" - desc = "A suit worn by the medical division of an Emergency Response Team. Has white highlights. Armoured and space ready." - suit_type = "ERT medic" - icon_state = "ert_medical_rig" - - initial_modules = list( - /obj/item/rig_module/ai_container, - /obj/item/rig_module/maneuvering_jets, - /obj/item/rig_module/device/healthscanner, - /obj/item/rig_module/chem_dispenser/injector - ) - -/obj/item/rig/ert/security - name = "ERT-S suit control module" - desc = "A suit worn by the security division of an Emergency Response Team. Has red highlights. Armoured and space ready." - suit_type = "ERT security" - icon_state = "ert_security_rig" - - initial_modules = list( - /obj/item/rig_module/ai_container, - /obj/item/rig_module/maneuvering_jets, - /obj/item/rig_module/grenade_launcher, - /obj/item/rig_module/mounted/egun, - ) - -/obj/item/rig/ert/assetprotection - name = "Heavy Asset Protection suit control module" - desc = "A heavy suit worn by the highest level of Asset Protection, don't mess with the person wearing this. Armoured and space ready." - suit_type = "heavy asset protection" - icon_state = "asset_protection_rig" - - initial_modules = list( - /obj/item/rig_module/ai_container, - /obj/item/rig_module/maneuvering_jets, - /obj/item/rig_module/grenade_launcher, - /obj/item/rig_module/vision/multi, - /obj/item/rig_module/mounted/egun, - /obj/item/rig_module/chem_dispenser/injector, - /obj/item/rig_module/device/plasmacutter, - // /obj/item/rig_module/device/rcd, - /obj/item/rig_module/datajack - ) diff --git a/code/modules/clothing/spacesuits/rig/suits/light.dm b/code/modules/clothing/spacesuits/rig/suits/light.dm deleted file mode 100644 index d76691daf57..00000000000 --- a/code/modules/clothing/spacesuits/rig/suits/light.dm +++ /dev/null @@ -1,120 +0,0 @@ -// Light rigs are not space-capable, but don't suffer excessive slowdown or sight issues when depowered. -/obj/item/rig/light - name = "light suit control module" - desc = "A lighter, less armoured rig suit." - icon_state = "ninja_rig" - suit_type = "light suit" - allowed = list(/obj/item/gun,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/restraints/handcuffs,/obj/item/tank,/obj/item/stock_parts/cell) - emp_protection = 10 - active_slowdown = 0 - flags = STOPSPRESSUREDMAGE | THICKMATERIAL - offline_slowdown = 0 - offline_vision_restriction = 0 - - chest_type = /obj/item/clothing/suit/space/new_rig/light - helm_type = /obj/item/clothing/head/helmet/space/new_rig/light - boot_type = /obj/item/clothing/shoes/magboots/rig/light - glove_type = /obj/item/clothing/gloves/rig/light - -/obj/item/clothing/suit/space/new_rig/light - name = "suit" - breach_threshold = 18 //comparable to voidsuits - -/obj/item/clothing/gloves/rig/light - name = "gloves" - -/obj/item/clothing/shoes/magboots/rig/light - name = "shoes" - -/obj/item/clothing/head/helmet/space/new_rig/light - name = "hood" - -/obj/item/rig/light/hacker - name = "cybersuit control module" - suit_type = "cyber" - desc = "An advanced powered armour suit with many cyberwarfare enhancements. Comes with built-in insulated gloves for safely tampering with electronics." - icon_state = "hacker_rig" - - req_access = list(ACCESS_SYNDICATE) - - airtight = 0 - seal_delay = 5 //not being vaccum-proof has an upside I guess - - helm_type = /obj/item/clothing/head/lightrig/hacker - chest_type = /obj/item/clothing/suit/lightrig/hacker - glove_type = /obj/item/clothing/gloves/lightrig/hacker - boot_type = /obj/item/clothing/shoes/lightrig/hacker - - initial_modules = list( - /obj/item/rig_module/ai_container, - // /obj/item/rig_module/power_sink, - /obj/item/rig_module/datajack, - /obj/item/rig_module/electrowarfare_suite, - /obj/item/rig_module/voice, - /obj/item/rig_module/vision, - ) - -//The cybersuit is not space-proof. It does however, have good siemens_coefficient values -/obj/item/clothing/head/lightrig/hacker - name = "HUD" - siemens_coefficient = 0.4 - flags = 0 - -/obj/item/clothing/suit/lightrig/hacker - siemens_coefficient = 0.4 - -/obj/item/clothing/shoes/lightrig/hacker - siemens_coefficient = 0.4 - flags = NOSLIP //All the other rigs have magboots anyways, hopefully gives the hacker suit something more going for it. - -/obj/item/clothing/gloves/lightrig/hacker - siemens_coefficient = 0 - -/obj/item/rig/light/ninja - name = "ominous suit control module" - suit_type = "ominous" - desc = "A unique, vaccum-proof suit of nano-enhanced armor designed specifically for Spider Clan assassins." - icon_state = "ninja_rig" - armor = list(melee = 50, bullet = 15, laser = 30, energy = 10, bomb = 25, bio = 100, rad = 30) - emp_protection = 40 //change this to 30 if too high. - active_slowdown = 0 - - chest_type = /obj/item/clothing/suit/space/new_rig/light/ninja - glove_type = /obj/item/clothing/gloves/rig/light/ninja - - req_access = list(ACCESS_SYNDICATE) - - initial_modules = list( - /obj/item/rig_module/teleporter, - /obj/item/rig_module/stealth_field, - /obj/item/rig_module/mounted/energy_blade, - /obj/item/rig_module/vision, - /obj/item/rig_module/voice, - /obj/item/rig_module/chem_dispenser, - /obj/item/rig_module/grenade_launcher, - /obj/item/rig_module/fabricator, - /obj/item/rig_module/ai_container, - // /obj/item/rig_module/power_sink, - /obj/item/rig_module/datajack, - /obj/item/rig_module/self_destruct - ) - -/obj/item/clothing/gloves/rig/light/ninja - name = "insulated gloves" - siemens_coefficient = 0 - -/obj/item/clothing/suit/space/new_rig/light/ninja - breach_threshold = 38 //comparable to regular hardsuits - -/obj/item/rig/light/stealth - name = "stealth suit control module" - suit_type = "stealth" - desc = "A highly advanced and expensive suit designed for covert operations." - icon_state = "ninja_rig" //supposed to be "stealth_rig", but as it currently only has a semi-copied ninja rig sprite, we can just use them directly. - - req_access = list(ACCESS_SYNDICATE) - - initial_modules = list( - /obj/item/rig_module/stealth_field, - /obj/item/rig_module/vision - ) diff --git a/code/modules/clothing/spacesuits/rig/suits/merc.dm b/code/modules/clothing/spacesuits/rig/suits/merc.dm deleted file mode 100644 index 95abba52df9..00000000000 --- a/code/modules/clothing/spacesuits/rig/suits/merc.dm +++ /dev/null @@ -1,32 +0,0 @@ -/obj/item/clothing/head/helmet/space/new_rig/merc - -/obj/item/rig/merc - name = "crimson hardsuit control module" - desc = "A blood-red hardsuit featuring some fairly illegal technology." - icon_state = "merc_rig" - suit_type = "crimson hardsuit" - armor = list(melee = 40, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 50) - active_slowdown = 1 - offline_slowdown = 3 - offline_vision_restriction = 1 - - helm_type = /obj/item/clothing/head/helmet/space/new_rig/merc - allowed = list(/obj/item/flashlight,/obj/item/tank,/obj/item/gun,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword,/obj/item/restraints/handcuffs) - - initial_modules = list( - /obj/item/rig_module/mounted, - /obj/item/rig_module/vision/thermal, - /obj/item/rig_module/grenade_launcher, - /obj/item/rig_module/ai_container, - // /obj/item/rig_module/power_sink, - /obj/item/rig_module/electrowarfare_suite, - /obj/item/rig_module/chem_dispenser/combat, - // /obj/item/rig_module/fabricator/energy_net - ) - -//Has most of the modules removed -/obj/item/rig/merc/empty - initial_modules = list( - /obj/item/rig_module/ai_container, - /obj/item/rig_module/electrowarfare_suite, //might as well - ) diff --git a/code/modules/clothing/spacesuits/rig/suits/station.dm b/code/modules/clothing/spacesuits/rig/suits/station.dm deleted file mode 100644 index c4bbd059fae..00000000000 --- a/code/modules/clothing/spacesuits/rig/suits/station.dm +++ /dev/null @@ -1,223 +0,0 @@ -/obj/item/clothing/head/helmet/space/new_rig/industrial - -/obj/item/clothing/head/helmet/space/new_rig/ce - -/obj/item/clothing/head/helmet/space/new_rig/eva - -/obj/item/clothing/head/helmet/space/new_rig/hazmat - -/obj/item/clothing/head/helmet/space/new_rig/medical - -/obj/item/clothing/head/helmet/space/new_rig/hazard - -/obj/item/rig/internalaffairs - name = "augmented tie" - suit_type = "augmented suit" - desc = "Prepare for paperwork." - icon_state = "internalaffairs_rig" - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) - siemens_coefficient = 0.9 - active_slowdown = 0 - offline_slowdown = 0 - offline_vision_restriction = 0 - - allowed = list(/obj/item/flashlight,/obj/item/tank,/obj/item/storage/briefcase,/obj/item/storage/secure/briefcase) - - req_access = list() - req_one_access = list() - - glove_type = null - helm_type = null - boot_type = null - -/obj/item/rig/internalaffairs/equipped - - req_access = list(ACCESS_LAWYER) - - initial_modules = list( - /obj/item/rig_module/ai_container, - /obj/item/rig_module/device/flash, - /obj/item/rig_module/device/paperdispenser, - /obj/item/rig_module/device/pen, - /obj/item/rig_module/device/stamp - ) - - glove_type = null - helm_type = null - boot_type = null - -/obj/item/rig/industrial - name = "industrial suit control module" - suit_type = "industrial hardsuit" - desc = "A heavy, powerful rig used by construction crews and mining corporations." - icon_state = "engineering_rig" - armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 75) - active_slowdown = 3 - offline_slowdown = 10 - offline_vision_restriction = 2 - emp_protection = -20 - - helm_type = /obj/item/clothing/head/helmet/space/new_rig/industrial - - allowed = list(/obj/item/flashlight,/obj/item/tank,/obj/item/storage/bag/ore,/obj/item/t_scanner,/obj/item/pickaxe, /obj/item/rcd) - - req_access = list() - req_one_access = list() - - -/obj/item/rig/industrial/equipped - - initial_modules = list( - /obj/item/rig_module/device/plasmacutter, - /obj/item/rig_module/device/drill, - /obj/item/rig_module/device/orescanner, - // /obj/item/rig_module/device/rcd, - /obj/item/rig_module/vision/meson - ) - -/obj/item/rig/eva - name = "EVA suit control module" - suit_type = "EVA hardsuit" - desc = "A light rig for repairs and maintenance to the outside of habitats and vessels." - icon_state = "eva_rig" - active_slowdown = 0 - offline_slowdown = 1 - offline_vision_restriction = 1 - - helm_type = /obj/item/clothing/head/helmet/space/new_rig/eva - - allowed = list(/obj/item/flashlight,/obj/item/tank,/obj/item/storage/toolbox,/obj/item/storage/briefcase/inflatable,/obj/item/t_scanner,/obj/item/rcd) - - req_access = list() - req_one_access = list() - -/obj/item/rig/eva/equipped - - initial_modules = list( - /obj/item/rig_module/device/plasmacutter, - /obj/item/rig_module/maneuvering_jets, - // /obj/item/rig_module/device/rcd, - /obj/item/rig_module/vision/meson - ) - -//Chief Engineer's rig. This is sort of a halfway point between the old hardsuits (voidsuits) and the rig class. -/obj/item/rig/ce - - name = "advanced voidsuit control module" - suit_type = "advanced voidsuit" - desc = "An advanced voidsuit that protects against hazardous, low pressure environments. Shines with a high polish." - icon_state = "ce_rig" - armor = list(melee = 40, bullet = 5, laser = 10, energy = 5, bomb = 50, bio = 100, rad = 90) - active_slowdown = 0 - offline_slowdown = 0 - offline_vision_restriction = 0 - - helm_type = /obj/item/clothing/head/helmet/space/new_rig/ce - - allowed = list(/obj/item/flashlight,/obj/item/tank,/obj/item/storage/bag/ore,/obj/item/t_scanner,/obj/item/pickaxe, /obj/item/rcd) - - - req_access = list() - req_one_access = list() - - boot_type = null - glove_type = null - -/obj/item/rig/ce/equipped - - req_access = list(ACCESS_CE) - - initial_modules = list( - /obj/item/rig_module/ai_container, - /obj/item/rig_module/maneuvering_jets, - /obj/item/rig_module/device/plasmacutter, - // /obj/item/rig_module/device/rcd, - /obj/item/rig_module/vision/meson - ) - - chest_type = /obj/item/clothing/suit/space/new_rig/ce - boot_type = null - glove_type = null - -/obj/item/clothing/suit/space/new_rig/ce - heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS - body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS - -/obj/item/rig/hazmat - - name = "AMI control module" - suit_type = "hazmat hardsuit" - desc = "An Anomalous Material Interaction hardsuit that protects against the strangest energies the universe can throw at it." - icon_state = "science_rig" - active_slowdown = 1 - offline_vision_restriction = 1 - - helm_type = /obj/item/clothing/head/helmet/space/new_rig/hazmat - - helm_type = /obj/item/clothing/head/helmet/space/new_rig/ert - - allowed = list(/obj/item/flashlight,/obj/item/tank,/obj/item/pickaxe,/obj/item/healthanalyzer,/obj/item/gps,/obj/item/radio/beacon) - - req_access = list() - req_one_access = list() - -/obj/item/rig/hazmat/equipped - - req_access = list(ACCESS_RD) - - initial_modules = list( - /obj/item/rig_module/ai_container, - /obj/item/rig_module/maneuvering_jets) - -/obj/item/rig/medical - - name = "rescue suit control module" - suit_type = "rescue hardsuit" - desc = "A durable suit designed for medical rescue in high risk areas." - icon_state = "medical_rig" - armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 50) - active_slowdown = 1 - offline_vision_restriction = 1 - - helm_type = /obj/item/clothing/head/helmet/space/new_rig/medical - - allowed = list(/obj/item/flashlight,/obj/item/tank,/obj/item/storage/firstaid,/obj/item/healthanalyzer,/obj/item/stack/medical,/obj/item/roller ) - - req_access = list() - req_one_access = list() - -/obj/item/rig/medical/equipped - - initial_modules = list( - /obj/item/rig_module/chem_dispenser/injector, - /obj/item/rig_module/maneuvering_jets, - /obj/item/rig_module/device/healthscanner, - /obj/item/rig_module/vision/medhud - ) - -/obj/item/rig/hazard - name = "hazard hardsuit control module" - suit_type = "hazard hardsuit" - desc = "A Security hardsuit designed for prolonged EVA in dangerous environments." - icon_state = "hazard_rig" - armor = list(melee = 30, bullet = 15, laser = 30, energy = 10, bomb = 10, bio = 100, rad = 50) - active_slowdown = 1 - offline_slowdown = 3 - offline_vision_restriction = 1 - - helm_type = /obj/item/clothing/head/helmet/space/new_rig/hazard - - allowed = list(/obj/item/gun,/obj/item/flashlight,/obj/item/tank,/obj/item/melee/baton) - - req_access = list() - req_one_access = list() - - -/obj/item/rig/hazard/equipped - - initial_modules = list( - /obj/item/rig_module/vision/sechud, - /obj/item/rig_module/maneuvering_jets, - /obj/item/rig_module/grenade_launcher, - /obj/item/rig_module/mounted/taser - ) diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 6c4ace8c993..bdcd27c24e3 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -11,8 +11,10 @@ resistance_flags = NONE armor = list("melee" = 30, "bullet" = 30, "laser" = 30, "energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) sprite_sheets = list( - "Vox" = 'icons/mob/species/vox/suit.dmi' + "Vox" = 'icons/mob/species/vox/suit.dmi', + "Grey" = 'icons/mob/species/grey/suit.dmi' ) + w_class = WEIGHT_CLASS_NORMAL /obj/item/clothing/suit/armor/vest name = "armor" diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm index a7bd3fb2627..6ffa40fe727 100644 --- a/code/modules/clothing/suits/jobs.dm +++ b/code/modules/clothing/suits/jobs.dm @@ -162,7 +162,7 @@ desc = "A slick, authoritative cloak designed for the Chief Engineer." icon_state = "cemantle" item_state = "cemantle" - allowed = list(/obj/item/flashlight, /obj/item/tank, /obj/item/t_scanner, /obj/item/rcd) + allowed = list(/obj/item/flashlight, /obj/item/tank, /obj/item/t_scanner, /obj/item/rcd, /obj/item/rpd) //Chief Medical Officer /obj/item/clothing/suit/mantle/labcoat/chief_medical_officer @@ -231,7 +231,7 @@ icon_state = "hazard" item_state = "hazard" blood_overlay_type = "armor" - allowed = list (/obj/item/flashlight, /obj/item/t_scanner, /obj/item/tank/emergency_oxygen) + allowed = list (/obj/item/flashlight, /obj/item/t_scanner, /obj/item/tank/emergency_oxygen, /obj/item/rcd, /obj/item/rpd) resistance_flags = NONE sprite_sheets = list( diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index 7e9e698d185..63f5cf8dca3 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -12,6 +12,7 @@ /obj/item/clothing/suit/bluetag name = "blue laser tag armour" desc = "Blue Pride, Station Wide." + w_class = WEIGHT_CLASS_NORMAL icon_state = "bluetag" item_state = "bluetag" blood_overlay_type = "armor" @@ -26,6 +27,7 @@ /obj/item/clothing/suit/redtag name = "red laser tag armour" desc = "Pew pew pew." + w_class = WEIGHT_CLASS_NORMAL icon_state = "redtag" item_state = "redtag" blood_overlay_type = "armor" @@ -71,6 +73,7 @@ /obj/item/clothing/suit/cyborg_suit name = "cyborg suit" desc = "Suit for a cyborg costume." + w_class = WEIGHT_CLASS_NORMAL icon_state = "death" item_state = "death" flags = CONDUCT @@ -371,6 +374,7 @@ /obj/item/clothing/suit/hooded/wintercoat/captain name = "captain's winter coat" icon_state = "wintercoat_captain" + w_class = WEIGHT_CLASS_NORMAL item_state = "coatcaptain" armor = list("melee" = 25, "bullet" = 30, "laser" = 30, "energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 50) allowed = list(/obj/item/gun/energy, /obj/item/reagent_containers/spray/pepper, /obj/item/gun/projectile, /obj/item/ammo_box,/obj/item/ammo_casing, /obj/item/melee/baton, /obj/item/restraints/handcuffs, /obj/item/flashlight/seclite, /obj/item/melee/classic_baton/telescopic) @@ -382,6 +386,7 @@ /obj/item/clothing/suit/hooded/wintercoat/security name = "security winter coat" icon_state = "wintercoat_sec" + w_class = WEIGHT_CLASS_NORMAL item_state = "coatsecurity" armor = list("melee" = 15, "bullet" = 10, "laser" = 15, "energy" = 5, "bomb" = 15, "bio" = 0, "rad" = 0, "fire" = 30, "acid" = 30) allowed = list(/obj/item/gun/energy, /obj/item/reagent_containers/spray/pepper, /obj/item/gun/projectile, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/melee/baton, /obj/item/restraints/handcuffs, /obj/item/flashlight/seclite, /obj/item/melee/classic_baton/telescopic) @@ -393,6 +398,7 @@ /obj/item/clothing/suit/hooded/wintercoat/medical name = "medical winter coat" icon_state = "wintercoat_med" + w_class = WEIGHT_CLASS_NORMAL item_state = "coatmedical" allowed = list(/obj/item/analyzer, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/applicator,/obj/item/healthanalyzer,/obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/melee/classic_baton/telescopic) armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 50, "rad" = 0, "fire" = 0, "acid" = 45) @@ -404,6 +410,7 @@ /obj/item/clothing/suit/hooded/wintercoat/science name = "science winter coat" icon_state = "wintercoat_sci" + w_class = WEIGHT_CLASS_NORMAL item_state = "coatscience" allowed = list(/obj/item/analyzer, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/applicator,/obj/item/healthanalyzer,/obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/melee/classic_baton/telescopic) armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 0, rad = 0, fire = 0, acid = 0) @@ -415,6 +422,7 @@ /obj/item/clothing/suit/hooded/wintercoat/engineering name = "engineering winter coat" icon_state = "wintercoat_engi" + w_class = WEIGHT_CLASS_NORMAL item_state = "coatengineer" armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 20, "fire" = 30, "acid" = 45) allowed = list(/obj/item/flashlight, /obj/item/tank/emergency_oxygen, /obj/item/t_scanner, /obj/item/rcd) @@ -454,6 +462,7 @@ /obj/item/clothing/suit/hooded/wintercoat/miner name = "mining winter coat" icon_state = "wintercoat_miner" + w_class = WEIGHT_CLASS_NORMAL item_state = "coatminer" allowed = list(/obj/item/pickaxe, /obj/item/flashlight, /obj/item/tank/emergency_oxygen, /obj/item/toy, /obj/item/storage/fancy/cigarettes, /obj/item/lighter) armor = list("melee" = 10, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) @@ -767,6 +776,7 @@ /obj/item/clothing/suit/jacket/pilot name = "security bomber jacket" desc = "A stylish and worn-in armoured black bomber jacket emblazoned with the NT Security crest on the left breast. Looks rugged." + w_class = WEIGHT_CLASS_NORMAL icon_state = "bombersec" item_state = "bombersec" ignore_suitadjust = 0 @@ -825,6 +835,7 @@ /obj/item/clothing/suit/toggle/owlwings name = "owl cloak" desc = "A soft brown cloak made of synthetic feathers. Soft to the touch, stylish, and a 2 meter wing span that will drive the ladies mad." + w_class = WEIGHT_CLASS_NORMAL icon_state = "owl_wings" item_state = "owl_wings" body_parts_covered = ARMS @@ -871,6 +882,7 @@ /obj/item/clothing/suit/advanced_protective_suit name = "Advanced Protective Suit" desc = "An incredibly advanced and complex suit; it has so many buttons and dials as to be incomprehensible." + w_class = WEIGHT_CLASS_BULKY icon_state = "bomb" item_state = "bomb" actions_types = list(/datum/action/item_action/toggle) @@ -924,6 +936,7 @@ //Syndicate Chaplain Robe (WOLOLO!) /obj/item/clothing/suit/hooded/chaplain_hoodie/missionary_robe description_antag = "This robe is made of reinforced fibers, granting it superior protection. The robes also wirelessly generate power for the neurotransmitter in the linked missionary staff while being worn." + w_class = WEIGHT_CLASS_NORMAL armor = list(melee = 10, bullet = 10, laser = 5, energy = 5, bomb = 0, bio = 0, rad = 15, fire = 30, acid = 30) var/obj/item/nullrod/missionary_staff/linked_staff = null diff --git a/code/modules/clothing/suits/storage.dm b/code/modules/clothing/suits/storage.dm index 9a675742b5e..1da4138fe77 100644 --- a/code/modules/clothing/suits/storage.dm +++ b/code/modules/clothing/suits/storage.dm @@ -1,5 +1,6 @@ /obj/item/clothing/suit/storage var/obj/item/storage/internal/pockets + w_class = WEIGHT_CLASS_NORMAL //we don't want these to be able to fit in their own pockets. /obj/item/clothing/suit/storage/New() ..() diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index 308380e4c55..e77bcb7478a 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -64,6 +64,7 @@ /obj/item/clothing/head/bomb_hood name = "bomb hood" desc = "Use in case of bomb." + w_class = WEIGHT_CLASS_NORMAL icon_state = "bombsuit" flags = BLOCKHAIR | THICKMATERIAL armor = list("melee" = 20, "bullet" = 0, "laser" = 20,"energy" = 10, "bomb" = 100, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 50) diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm index a9b4eab329e..9a2afbc8a60 100644 --- a/code/modules/clothing/under/miscellaneous.dm +++ b/code/modules/clothing/under/miscellaneous.dm @@ -838,3 +838,10 @@ icon_state = "cuban_suit" item_state = "cuban_suit" item_color = "cuban_suit" + +/obj/item/clothing/under/tourist_suit + name = "tourist outfit" + desc = "A light blue shirt with brown shorts. Feels oddly spooky." + icon_state = "tourist" + icon_state = "tourist" + item_color = "tourist" diff --git a/code/modules/crafting/craft.dm b/code/modules/crafting/craft.dm index a0d6823fe80..aae3b84a3c5 100644 --- a/code/modules/crafting/craft.dm +++ b/code/modules/crafting/craft.dm @@ -357,7 +357,7 @@ if(!fail_msg) to_chat(usr, "[TR.name] constructed.") if(TR.alert_admins_on_craft) - message_admins("[usr.ckey] has created a [TR.name] at [ADMIN_COORDJMP(usr)]") + message_admins("[key_name_admin(usr)] has created a [TR.name] at [ADMIN_COORDJMP(usr)]") else to_chat(usr, "Construction failed[fail_msg]") busy = FALSE diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 1a5da52ffce..530b9095f75 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -349,7 +349,7 @@ to_chat(user, "You modify the appearance of [target].") var/obj/item/clothing/mask/gas/M = target M.name = "Prescription Gas Mask" - M.desc = "It looks heavily modified, but otherwise functions as a gas mask. The words “Property of Yon-Dale†can be seen on the inner band." + M.desc = "It looks heavily modified, but otherwise functions as a gas mask. The words \"Property of Yon-Dale\" can be seen on the inner band." M.icon = 'icons/obj/custom_items.dmi' M.icon_state = "gas_tariq" M.sprite_sheets = list( diff --git a/code/modules/events/abductor.dm b/code/modules/events/abductor.dm index 7fe60e8b77f..4ad8fb4eb90 100644 --- a/code/modules/events/abductor.dm +++ b/code/modules/events/abductor.dm @@ -9,7 +9,7 @@ makeAbductorTeam() /datum/event/abductor/proc/makeAbductorTeam() - var/list/mob/dead/observer/candidates = pollCandidates("Do you wish to be considered for an Abductor Team?", ROLE_ABDUCTOR, 1) + var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you wish to be considered for an Abductor Team?", ROLE_ABDUCTOR, TRUE) if(candidates.len >= 2) //Oh god why we can't have static functions diff --git a/code/modules/events/alien_infestation.dm b/code/modules/events/alien_infestation.dm index 8c01d5c7cc2..23e4e266819 100644 --- a/code/modules/events/alien_infestation.dm +++ b/code/modules/events/alien_infestation.dm @@ -23,7 +23,7 @@ vents += temp_vent spawn() - var/list/candidates = pollCandidates("Do you want to play as an alien?", ROLE_ALIEN, 1) + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as an alien?", ROLE_ALIEN, TRUE, source = /mob/living/carbon/alien/larva) while(spawncount > 0 && vents.len && candidates.len) var/obj/vent = pick_n_take(vents) diff --git a/code/modules/events/apc_short.dm b/code/modules/events/apc_short.dm index c19b6cbe8b7..fcb31972204 100644 --- a/code/modules/events/apc_short.dm +++ b/code/modules/events/apc_short.dm @@ -46,10 +46,10 @@ if(prob(APC_BREAK_PROBABILITY)) // if it has internal wires, cut the power wires if(C.wires) - if(!C.wires.IsIndexCut(APC_WIRE_MAIN_POWER1)) - C.wires.CutWireIndex(APC_WIRE_MAIN_POWER1) - if(!C.wires.IsIndexCut(APC_WIRE_MAIN_POWER2)) - C.wires.CutWireIndex(APC_WIRE_MAIN_POWER2) + if(!C.wires.is_cut(WIRE_MAIN_POWER1)) + C.wires.cut(WIRE_MAIN_POWER1) + if(!C.wires.is_cut(WIRE_MAIN_POWER2)) + C.wires.cut(WIRE_MAIN_POWER2) // if it was operating, toggle off the breaker if(C.operating) C.toggle_breaker() diff --git a/code/modules/events/blob.dm b/code/modules/events/blob.dm index caec11de9f2..de2da9fbf64 100644 --- a/code/modules/events/blob.dm +++ b/code/modules/events/blob.dm @@ -12,14 +12,14 @@ if(!T) return kill() - var/list/candidates = pollCandidates("Do you want to play as a blob infested mouse?", ROLE_BLOB, 1) - if(!candidates.len) + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a blob infested mouse?", ROLE_BLOB, TRUE, source = /mob/living/simple_animal/mouse/blobinfected) + if(!length(candidates)) return kill() var/list/vents = list() for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in GLOB.all_vent_pumps) if(is_station_level(temp_vent.loc.z) && !temp_vent.welded) - if(temp_vent.parent.other_atmosmch.len > 50) + if(length(temp_vent.parent.other_atmosmch) > 50) vents += temp_vent var/obj/vent = pick(vents) diff --git a/code/modules/events/brand_intelligence.dm b/code/modules/events/brand_intelligence.dm index 8d91635c458..35cc199c3ff 100644 --- a/code/modules/events/brand_intelligence.dm +++ b/code/modules/events/brand_intelligence.dm @@ -32,7 +32,7 @@ log_debug("Original brand intelligence machine: [originMachine] ([ADMIN_VV(originMachine,"VV")]) [ADMIN_JMP(originMachine)]") /datum/event/brand_intelligence/tick() - if(!originMachine || QDELETED(originMachine) || originMachine.shut_up || originMachine.wires.IsAllCut()) //if the original vending machine is missing or has it's voice switch flipped + if(!originMachine || QDELETED(originMachine) || originMachine.shut_up || originMachine.wires.is_all_cut()) //if the original vending machine is missing or has it's voice switch flipped for(var/obj/machinery/vending/saved in infectedMachines) saved.shoot_inventory = 0 if(originMachine) diff --git a/code/modules/events/event_procs.dm b/code/modules/events/event_procs.dm index c5b7c893c26..cc00f05723f 100644 --- a/code/modules/events/event_procs.dm +++ b/code/modules/events/event_procs.dm @@ -1,9 +1,9 @@ /client/proc/forceEvent(var/type in SSevents.allEvents) - set name = "Trigger Event (Debug Only)" + set name = "Trigger Event" set category = "Debug" - if(!holder) + if(!check_rights(R_EVENT)) return if(ispath(type)) diff --git a/code/modules/events/mass_hallucination.dm b/code/modules/events/mass_hallucination.dm index b8bde0a1a67..b8f45023a27 100644 --- a/code/modules/events/mass_hallucination.dm +++ b/code/modules/events/mass_hallucination.dm @@ -6,6 +6,9 @@ var/mob/living/carbon/human/H = thing if(H.stat == DEAD) continue + var/turf/T = get_turf(H) + if(!is_station_level(T.z)) + continue var/armor = H.getarmor(type = "rad") if((RADIMMUNE in H.dna.species.species_traits) || armor >= 75) // Leave radiation-immune species/rad armored players completely unaffected continue diff --git a/code/modules/events/sentience.dm b/code/modules/events/sentience.dm index ab8a405785f..7007a99f0ec 100644 --- a/code/modules/events/sentience.dm +++ b/code/modules/events/sentience.dm @@ -3,8 +3,7 @@ /datum/event/sentience/start() processing = FALSE //so it won't fire again in next tick - var/ghostmsg = "Do you want to awaken as a sentient being?" - var/list/candidates = pollCandidates(ghostmsg, ROLE_SENTIENT, 1) + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to awaken as a sentient being?", ROLE_SENTIENT, TRUE) var/list/potential = list() var/sentience_type = SENTIENCE_ORGANIC diff --git a/code/modules/events/slaughterevent.dm b/code/modules/events/slaughterevent.dm index ac265adb420..85f0f8aa555 100644 --- a/code/modules/events/slaughterevent.dm +++ b/code/modules/events/slaughterevent.dm @@ -3,7 +3,7 @@ /datum/event/spawn_slaughter/proc/get_slaughter(var/end_if_fail = 0) spawn() - var/list/candidates = pollCandidates("Do you want to play as a slaughter demon?", ROLE_DEMON, 1) + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a slaughter demon?", ROLE_DEMON, TRUE, source = /mob/living/simple_animal/slaughter) if(!candidates.len) key_of_slaughter = null return kill() @@ -33,7 +33,7 @@ spawn_locs += get_turf(player_mind.current) if(!spawn_locs) //If we can't find THAT, then just retry return kill() - var /obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter(pick(spawn_locs)) + var/obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter(pick(spawn_locs)) var/mob/living/simple_animal/slaughter/S = new /mob/living/simple_animal/slaughter/(holder) S.holder = holder player_mind.transfer_to(S) diff --git a/code/modules/events/traders.dm b/code/modules/events/traders.dm index 0beeb3691e2..d4ae1de3b9c 100644 --- a/code/modules/events/traders.dm +++ b/code/modules/events/traders.dm @@ -34,7 +34,7 @@ GLOBAL_LIST_INIT(unused_trade_stations, list("sol")) trader_objectives = forge_trader_objectives() spawn() - var/list/candidates = pollCandidates("Do you want to play as a trader?", ROLE_TRADER, 1) + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a Sol Trader?", ROLE_TRADER, TRUE) var/index = 1 while(spawn_count > 0 && candidates.len > 0) if(index > spawnlocs.len) diff --git a/code/modules/flufftext/Dreaming.dm b/code/modules/flufftext/Dreaming.dm index d4c06fdc3a3..a24b73ae56c 100644 --- a/code/modules/flufftext/Dreaming.dm +++ b/code/modules/flufftext/Dreaming.dm @@ -19,7 +19,7 @@ var/list/newlist = dreamlist.Copy() for(var/i in 1 to newlist.len) newlist[i] = replacetext(newlist[i], "\[DREAMER\]", "[user.name]") - return dreamlist + return newlist //NIGHTMARES diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 905b629a0b9..21b99acb910 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -149,10 +149,12 @@ Gunshots/explosions/opening doors/less rare audio (done) /obj/effect/hallucination/fake_flood/process() if(!target) qdel(src) + return if(next_expand <= world.time) radius++ if(radius > FAKE_FLOOD_MAX_RADIUS) qdel(src) + return Expand() if((get_turf(target) in flood_turfs) && !target.internal) target.hallucinate("fake_alert", "too_much_tox") diff --git a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm index 5f13f5c7a06..8313b967722 100644 --- a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm +++ b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm @@ -13,6 +13,10 @@ max_integrity = 20 resistance_flags = ACID_PROOF +/obj/item/reagent_containers/food/drinks/set_APTFT() + set hidden = FALSE + ..() + /obj/item/reagent_containers/food/drinks/drinkingglass/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/reagent_containers/food/snacks/egg)) //breaking eggs var/obj/item/reagent_containers/food/snacks/egg/E = I diff --git a/code/modules/food_and_drinks/drinks/drinks/shotglass.dm b/code/modules/food_and_drinks/drinks/drinks/shotglass.dm index d5d114fb43f..7b3349e4c2d 100644 --- a/code/modules/food_and_drinks/drinks/drinks/shotglass.dm +++ b/code/modules/food_and_drinks/drinks/drinks/shotglass.dm @@ -7,6 +7,7 @@ materials = list(MAT_GLASS=100) var/light_intensity = 2 light_color = LIGHT_COLOR_LIGHTBLUE + resistance_flags = FLAMMABLE /obj/item/reagent_containers/food/drinks/drinkingglass/shotglass/on_reagent_change() if(!isShotFlammable() && (resistance_flags & ON_FIRE)) @@ -30,6 +31,7 @@ overlays += filling name = "shot glass of " + reagents.get_master_reagent_name() //No matter what, the glass will tell you the reagent's name. Might be too abusable in the future. if(resistance_flags & ON_FIRE) + cut_overlay(GLOB.fire_overlay, TRUE) overlays += "shotglass_fire" name = "flaming [name]" else diff --git a/code/modules/food_and_drinks/food.dm b/code/modules/food_and_drinks/food.dm index 27f0919a3ce..15e28cc6c62 100644 --- a/code/modules/food_and_drinks/food.dm +++ b/code/modules/food_and_drinks/food.dm @@ -33,6 +33,10 @@ deltimer(ant_timer) return ..() +/obj/item/reagent_containers/food/set_APTFT() + set hidden = TRUE + ..() + /obj/item/reagent_containers/food/proc/check_for_ants() if(!antable) return diff --git a/code/modules/food_and_drinks/food/condiment.dm b/code/modules/food_and_drinks/food/condiment.dm index bdeadf2a72c..733ac4692a3 100644 --- a/code/modules/food_and_drinks/food/condiment.dm +++ b/code/modules/food_and_drinks/food/condiment.dm @@ -29,6 +29,10 @@ /obj/item/reagent_containers/food/condiment/attack_self(mob/user) return +/obj/item/reagent_containers/food/condiment/set_APTFT() + set hidden = FALSE + ..() + /obj/item/reagent_containers/food/condiment/attack(mob/M, mob/user, def_zone) if(!reagents || !reagents.total_volume) diff --git a/code/modules/food_and_drinks/food/foods/meat.dm b/code/modules/food_and_drinks/food/foods/meat.dm index 382e2f39022..a9f0ab3d684 100644 --- a/code/modules/food_and_drinks/food/foods/meat.dm +++ b/code/modules/food_and_drinks/food/foods/meat.dm @@ -30,7 +30,7 @@ name = "-meat" var/subjectname = "" var/subjectjob = null - tastes = list("tender meat" = 1) + tastes = list("salty meat" = 1) /obj/item/reagent_containers/food/snacks/meat/slab/meatproduct name = "meat product" diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index 346b78e5b26..f6bb3c8e1c4 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -1,206 +1,81 @@ -/* SmartFridge. Much todo -*/ +#define SMART_FRIDGE_LOCK_SHORTED -1 + +/** + * # Smart Fridge + * + * Stores items of a specified type. + */ /obj/machinery/smartfridge name = "\improper SmartFridge" icon = 'icons/obj/vending.dmi' icon_state = "smartfridge" layer = 2.9 - density = 1 - anchored = 1 + density = TRUE + anchored = TRUE use_power = IDLE_POWER_USE idle_power_usage = 5 active_power_usage = 100 + /// The maximum number of items the fridge can hold. Multiplicated by the matter bin component's rating. var/max_n_of_items = 1500 - var/item_quants = list() + /// Associative list (/text => /number) tracking the amounts of a specific item held by the fridge. + var/list/item_quants + /// How long in ticks the fridge is electrified for. Decrements every process. var/seconds_electrified = 0 + /// Whether the fridge should randomly shoot held items at a nearby living target or not. var/shoot_inventory = FALSE + /// Whether the fridge is locked. Used for the secure variant of the fridge. var/locked = FALSE + /// Whether the fridge requires ID scanning. Used for the secure variant of the fridge. var/scan_id = TRUE + /// Whether the fridge is considered secure. Used for wiring and display. var/is_secure = FALSE + /// Whether the fridge can dry its' contents. Used for display. var/can_dry = FALSE + /// Whether the fridge is currently drying. Used by [drying racks][/obj/machinery/smartfridge/drying_rack]. var/drying = FALSE + /// Whether the fridge's contents are visible on the world icon. var/visible_contents = TRUE - var/datum/wires/smartfridge/wires = null + /// The wires controlling the fridge. + var/datum/wires/smartfridge/wires + /// Typecache of accepted item types, init it in [/obj/machinery/smartfridge/Initialize]. + var/list/accepted_items_typecache -/obj/machinery/smartfridge/New() - ..() +/obj/machinery/smartfridge/Initialize(mapload) + . = ..() + item_quants = list() + // Reagents create_reagents() reagents.set_reacting(FALSE) + // Components component_parts = list() var/obj/item/circuitboard/smartfridge/board = new(null) board.set_type(type) component_parts += board component_parts += new /obj/item/stock_parts/matter_bin(null) RefreshParts() + // Wires + if(is_secure) + wires = new/datum/wires/smartfridge/secure(src) + else + wires = new/datum/wires/smartfridge(src) + // Accepted items + accepted_items_typecache = typecacheof(list( + /obj/item/reagent_containers/food/snacks/grown, + /obj/item/seeds, + /obj/item/grown, + )) /obj/machinery/smartfridge/RefreshParts() for(var/obj/item/stock_parts/matter_bin/B in component_parts) max_n_of_items = 1500 * B.rating -/obj/machinery/smartfridge/secure - is_secure = 1 - -/obj/machinery/smartfridge/New() - ..() - if(is_secure) - wires = new/datum/wires/smartfridge/secure(src) - else - wires = new/datum/wires/smartfridge(src) - /obj/machinery/smartfridge/Destroy() + SStgui.close_uis(wires) QDEL_NULL(wires) for(var/atom/movable/A in contents) A.forceMove(loc) return ..() -/obj/machinery/smartfridge/proc/accept_check(obj/item/O) - if(istype(O,/obj/item/reagent_containers/food/snacks/grown/) || istype(O,/obj/item/seeds/) || istype(O,/obj/item/grown/)) - return 1 - return 0 - -/obj/machinery/smartfridge/seeds - name = "\improper MegaSeed Servitor" - desc = "When you need seeds fast!" - icon = 'icons/obj/vending.dmi' - icon_state = "seeds" - -/obj/machinery/smartfridge/seeds/accept_check(obj/item/O) - if(istype(O,/obj/item/seeds/)) - return 1 - return 0 - -/obj/machinery/smartfridge/medbay - name = "\improper Refrigerated Medicine Storage" - desc = "A refrigerated storage unit for storing medicine and chemicals." - icon_state = "smartfridge" //To fix the icon in the map editor. - -/obj/machinery/smartfridge/medbay/accept_check(obj/item/O) - if(istype(O,/obj/item/reagent_containers/glass)) - return 1 - if(istype(O,/obj/item/reagent_containers/iv_bag)) - return 1 - if(istype(O,/obj/item/storage/pill_bottle)) - return 1 - if(ispill(O)) - return 1 - return 0 - -/obj/machinery/smartfridge/secure/extract - name = "\improper Slime Extract Storage" - desc = "A refrigerated storage unit for slime extracts" - req_access_txt = "47" - -/obj/machinery/smartfridge/secure/extract/accept_check(obj/item/O) - if(istype(O,/obj/item/slime_extract)) - return 1 - return 0 - -/obj/machinery/smartfridge/secure/medbay - name = "\improper Secure Refrigerated Medicine Storage" - desc = "A refrigerated storage unit for storing medicine and chemicals." - icon_state = "smartfridge" //To fix the icon in the map editor. - req_one_access_txt = "5;33" - -/obj/machinery/smartfridge/secure/medbay/accept_check(obj/item/O) - if(istype(O,/obj/item/reagent_containers/glass)) - return 1 - if(istype(O,/obj/item/reagent_containers/iv_bag)) - return 1 - if(istype(O,/obj/item/storage/pill_bottle)) - return 1 - if(ispill(O)) - return 1 - return 0 - -/obj/machinery/smartfridge/secure/chemistry - name = "\improper Smart Chemical Storage" - desc = "A refrigerated storage unit for medicine and chemical storage." - icon_state = "smartfridge" //To fix the icon in the map editor. - req_access_txt = "33" - var/list/spawn_meds = list() - -/obj/machinery/smartfridge/secure/chemistry/New() - ..() - for(var/typekey in spawn_meds) - var/amount = spawn_meds[typekey] - if(isnull(amount)) amount = 1 - while(amount) - var/obj/item/I = new typekey(src) - if(item_quants[I.name]) - item_quants[I.name]++ - else - item_quants[I.name] = 1 - SSnanoui.update_uis(src) - amount-- - update_icon() - -/obj/machinery/smartfridge/secure/chemistry/accept_check(obj/item/O) - if(istype(O,/obj/item/storage/pill_bottle) || istype(O,/obj/item/reagent_containers)) - return 1 - return 0 - -/obj/machinery/smartfridge/secure/chemistry/preloaded - spawn_meds = list( - /obj/item/reagent_containers/food/pill/epinephrine = 12, - /obj/item/reagent_containers/food/pill/charcoal = 5, - /obj/item/reagent_containers/glass/bottle/epinephrine = 1, - /obj/item/reagent_containers/glass/bottle/charcoal = 1) - -/obj/machinery/smartfridge/secure/chemistry/preloaded/syndicate - req_access_txt = null - req_access = list(ACCESS_SYNDICATE) - -/obj/machinery/smartfridge/disks - name = "disk compartmentalizer" - desc = "A machine capable of storing a variety of disks. Denoted by most as the DSU (disk storage unit)." - icon_state = "disktoaster" - pass_flags = PASSTABLE - visible_contents = FALSE - -/obj/machinery/smartfridge/disks/accept_check(obj/item/O) - return istype(O, /obj/item/disk) - -// ---------------------------- -// Virology Medical Smartfridge -// ---------------------------- -/obj/machinery/smartfridge/secure/chemistry/virology - name = "Smart Virus Storage" - desc = "A refrigerated storage unit for volatile sample storage." - req_access_txt = "39" - spawn_meds = list(/obj/item/reagent_containers/syringe/antiviral = 4, - /obj/item/reagent_containers/glass/bottle/cold = 1, - /obj/item/reagent_containers/glass/bottle/flu_virion = 1, - /obj/item/reagent_containers/glass/bottle/mutagen = 1, - /obj/item/reagent_containers/glass/bottle/plasma = 1, - /obj/item/reagent_containers/glass/bottle/diphenhydramine = 1) - -/obj/machinery/smartfridge/secure/chemistry/virology/accept_check(obj/item/O) - if(istype(O, /obj/item/reagent_containers/syringe) || istype(O, /obj/item/reagent_containers/glass/bottle) || istype(O, /obj/item/reagent_containers/glass/beaker)) - return 1 - return 0 - -/obj/machinery/smartfridge/secure/chemistry/virology/preloaded - spawn_meds = list( - /obj/item/reagent_containers/syringe/antiviral = 4, - /obj/item/reagent_containers/glass/bottle/cold = 1, - /obj/item/reagent_containers/glass/bottle/flu_virion = 1, - /obj/item/reagent_containers/glass/bottle/mutagen = 1, - /obj/item/reagent_containers/glass/bottle/plasma = 1, - /obj/item/reagent_containers/glass/bottle/reagent/synaptizine = 1, - /obj/item/reagent_containers/glass/bottle/reagent/formaldehyde = 1) - -/obj/machinery/smartfridge/secure/chemistry/virology/preloaded/syndicate - req_access_txt = null - req_access = list(ACCESS_SYNDICATE) - -/obj/machinery/smartfridge/drinks - name = "\improper Drink Showcase" - desc = "A refrigerated storage unit for tasty tasty alcohol." - -/obj/machinery/smartfridge/drinks/accept_check(obj/item/O) - if(istype(O,/obj/item/reagent_containers/glass) || istype(O,/obj/item/reagent_containers/food/drinks) || istype(O,/obj/item/reagent_containers/food/condiment)) - return 1 - /obj/machinery/smartfridge/process() if(stat & (BROKEN|NOPOWER)) return @@ -216,52 +91,57 @@ update_icon() /obj/machinery/smartfridge/update_icon() + var/prefix = initial(icon_state) if(stat & (BROKEN|NOPOWER)) - icon_state = "[initial(icon_state)]-off" + icon_state = "[prefix]-off" else if(visible_contents) - switch(contents.len) + switch(length(contents)) if(0) - icon_state = "[initial(icon_state)]" + icon_state = "[prefix]" if(1 to 25) - icon_state = "[initial(icon_state)]1" + icon_state = "[prefix]1" if(26 to 75) - icon_state = "[initial(icon_state)]2" + icon_state = "[prefix]2" if(76 to INFINITY) - icon_state = "[initial(icon_state)]3" + icon_state = "[prefix]3" else - icon_state = "[initial(icon_state)]" + icon_state = "[prefix]" -/******************* -* Item Adding -********************/ - -/obj/machinery/smartfridge/default_deconstruction_screwdriver(mob/user, obj/item/screwdriver/S) - . = ..(user, icon_state, icon_state, S) +// Interactions +/obj/machinery/smartfridge/screwdriver_act(mob/living/user, obj/item/I) + . = default_deconstruction_screwdriver(user, icon_state, icon_state, I) + if(!.) + return overlays.Cut() if(panel_open) overlays += image(icon, "[initial(icon_state)]-panel") -/obj/machinery/smartfridge/attackby(obj/item/O, var/mob/user) - if(default_deconstruction_screwdriver(user, O)) - return - - if(exchange_parts(user, O)) - return - - if(default_unfasten_wrench(user, O)) +/obj/machinery/smartfridge/wrench_act(mob/living/user, obj/item/I) + . = default_unfasten_wrench(user, I) + if(.) power_change() - return - if(default_deconstruction_crowbar(user, O)) - return +/obj/machinery/smartfridge/crowbar_act(mob/living/user, obj/item/I) + . = default_deconstruction_crowbar(user, I) - if(istype(O, /obj/item/multitool)||istype(O, /obj/item/wirecutters)) - if(panel_open) - attack_hand(user) - return +/obj/machinery/smartfridge/wirecutter_act(mob/living/user, obj/item/I) + if(panel_open) + attack_hand(user) + return TRUE + return ..() - if(stat & NOPOWER) +/obj/machinery/smartfridge/multitool_act(mob/living/user, obj/item/I) + if(panel_open) + attack_hand(user) + return TRUE + return ..() + +/obj/machinery/smartfridge/attackby(obj/item/O, var/mob/user) + if(exchange_parts(user, O)) + SSnanoui.update_uis(src) + return + if(stat & (BROKEN|NOPOWER)) to_chat(user, "\The [src] is unpowered and useless.") return @@ -269,92 +149,63 @@ user.visible_message("[user] has added \the [O] to \the [src].", "You add \the [O] to \the [src].") SSnanoui.update_uis(src) update_icon() - else if(istype(O, /obj/item/storage/bag)) var/obj/item/storage/bag/P = O - var/plants_loaded = 0 + var/items_loaded = 0 for(var/obj/G in P.contents) if(load(G, user)) - plants_loaded++ - if(plants_loaded) + items_loaded++ + if(items_loaded) user.visible_message("[user] loads \the [src] with \the [P].", "You load \the [src] with \the [P].") - if(P.contents.len > 0) - to_chat(user, "Some items are refused.") - - SSnanoui.update_uis(src) - update_icon() - + SSnanoui.update_uis(src) + update_icon() + var/failed = length(P.contents) + if(failed) + to_chat(user, "[failed] item\s [failed == 1 ? "is" : "are"] refused.") else if(!istype(O, /obj/item/card/emag)) to_chat(user, "\The [src] smartly refuses [O].") - return 1 - -/obj/machinery/smartfridge/proc/load(obj/I, mob/user) - if(accept_check(I)) - if(contents.len >= max_n_of_items) - to_chat(user, "\The [src] is full.") - return 0 - else - if(istype(I.loc, /obj/item/storage)) - var/obj/item/storage/S = I.loc - S.remove_from_storage(I, src) - else if(istype(I.loc, /mob)) - var/mob/M = I.loc - if(M.get_active_hand() == I) - if(!M.drop_item()) - to_chat(user, "\The [I] is stuck to you!") - return 0 - else - M.unEquip(I) - I.forceMove(src) - else - I.forceMove(src) - - if(item_quants[I.name]) - item_quants[I.name]++ - else - item_quants[I.name] = 1 - return 1 - return 0 + return TRUE /obj/machinery/smartfridge/attack_ai(mob/user) - return 0 + return FALSE /obj/machinery/smartfridge/attack_ghost(mob/user) return attack_hand(user) /obj/machinery/smartfridge/attack_hand(mob/user) - if(stat & (NOPOWER|BROKEN)) + if(stat & (BROKEN|NOPOWER)) return wires.Interact(user) ui_interact(user) + return ..() //Drag pill bottle to fridge to empty it into the fridge /obj/machinery/smartfridge/MouseDrop_T(obj/over_object, mob/user) if(!istype(over_object, /obj/item/storage/pill_bottle)) //Only pill bottles, please return - - if(stat & NOPOWER) + if(stat & (BROKEN|NOPOWER)) to_chat(user, "\The [src] is unpowered and useless.") return var/obj/item/storage/box/pillbottles/P = over_object + if(!length(P.contents)) + to_chat(user, "\The [P] is empty.") + return + var/items_loaded = 0 for(var/obj/G in P.contents) if(load(G, user)) items_loaded++ if(items_loaded) - user.visible_message( \ - "[user] empties \the [P] into \the [src].", \ - "You empty \the [P] into \the [src].") - if(P.contents.len > 0) - to_chat(user, "Some items are refused.") - SSnanoui.update_uis(src) + user.visible_message("[user] empties \the [P] into \the [src].", "You empty \the [P] into \the [src].") + SSnanoui.update_uis(src) + update_icon() + var/failed = length(P.contents) + if(failed) + to_chat(user, "[failed] item\s [failed == 1 ? "is" : "are"] refused.") -/******************* -* SmartFridge Menu -********************/ - -/obj/machinery/smartfridge/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) +// UI +/obj/machinery/smartfridge/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = TRUE) user.set_machine(src) ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) @@ -374,13 +225,13 @@ data["drying"] = drying var/list/items[0] - for(var/i=1 to length(item_quants)) + for(var/i in 1 to length(item_quants)) var/K = item_quants[i] var/count = item_quants[K] if(count > 0) items.Add(list(list("display_name" = html_encode(capitalize(K)), "vend" = i, "quantity" = count))) - if(items.len > 0) + if(length(items)) data["contents"] = items return data @@ -402,6 +253,8 @@ if(href_list["vend"]) var/index = text2num(href_list["vend"]) var/amount = text2num(href_list["amount"]) + if(isnull(index) || !ISINDEXSAFE(item_quants, index) || isnull(amount)) + return FALSE var/K = item_quants[index] var/count = item_quants[K] @@ -429,36 +282,343 @@ if(i <= 0) return TRUE return TRUE + return FALSE +/** + * Tries to load an item if it is accepted by [/obj/machinery/smartfridge/proc/accept_check]. + * + * Arguments: + * * I - The item to load. + * * user - The user trying to load the item. + */ +/obj/machinery/smartfridge/proc/load(obj/I, mob/user) + if(accept_check(I)) + if(length(contents) >= max_n_of_items) + to_chat(user, "\The [src] is full.") + return FALSE + else + if(istype(I.loc, /obj/item/storage)) + var/obj/item/storage/S = I.loc + S.remove_from_storage(I, src) + else if(ismob(I.loc)) + var/mob/M = I.loc + if(M.get_active_hand() == I) + if(!M.drop_item()) + to_chat(user, "\The [I] is stuck to you!") + return FALSE + else + M.unEquip(I) + I.forceMove(src) + else + I.forceMove(src) + + item_quants[I.name] += 1 + return TRUE + return FALSE + +/** + * Tries to shoot a random at a nearby living mob. + */ /obj/machinery/smartfridge/proc/throw_item() - var/obj/throw_item = null - var/mob/living/target = locate() in view(7,src) + var/obj/item/throw_item = null + var/mob/living/target = locate() in view(7, src) if(!target) - return 0 + return FALSE for(var/O in item_quants) if(item_quants[O] <= 0) //Try to use a record that actually has something to dump. continue - item_quants[O]-- - for(var/obj/T in contents) - if(T.name == O) - T.forceMove(loc) - throw_item = T + for(var/obj/I in contents) + if(I.name == O) + I.forceMove(loc) + throw_item = I update_icon() break - break if(!throw_item) - return 0 - spawn(0) - throw_item.throw_at(target,16,3,src) - visible_message("[src] launches [throw_item.name] at [target.name]!") - return 1 + return FALSE -// ---------------------------- -// Drying Rack 'smartfridge' -// ---------------------------- + INVOKE_ASYNC(throw_item, /atom/movable.proc/throw_at, target, 16, 3, src) + visible_message("[src] launches [throw_item.name] at [target.name]!") + return TRUE + +/** + * Returns whether the smart fridge can accept the given item. + * + * By default checks if the item is in [the typecache][/obj/machinery/smartfridge/var/accepted_items_typecache]. + * Arguments: + * * O - The item to check. + */ +/obj/machinery/smartfridge/proc/accept_check(obj/item/O) + return is_type_in_typecache(O, accepted_items_typecache) + +/** + * # Secure Fridge + * + * Secure variant of the [Smart Fridge][/obj/machinery/smartfridge]. + * Can be emagged and EMP'd to short the lock. + */ +/obj/machinery/smartfridge/secure + is_secure = TRUE + +/obj/machinery/smartfridge/secure/emag_act(mob/user) + emagged = TRUE + locked = SMART_FRIDGE_LOCK_SHORTED + to_chat(user, "You short out the product lock on \the [src].") + +/obj/machinery/smartfridge/secure/emp_act(severity) + if(!emagged && locked != SMART_FRIDGE_LOCK_SHORTED && prob(40 / severity)) + playsound(loc, 'sound/effects/sparks4.ogg', 60, TRUE) + emagged = TRUE + locked = SMART_FRIDGE_LOCK_SHORTED + +/obj/machinery/smartfridge/secure/Topic(href, href_list) + if(stat & (BROKEN|NOPOWER)) + return FALSE + + if(href_list["vend"] && (usr.contents.Find(src) || Adjacent(usr))) + if(!emagged && locked != SMART_FRIDGE_LOCK_SHORTED && scan_id && !allowed(usr)) + to_chat(usr, "Access denied.") + SSnanoui.update_uis(src) + return FALSE + + return ..() + +/** + * # Seed Storage + * + * Seeds variant of the [Smart Fridge][/obj/machinery/smartfridge]. + * Formerly known as MegaSeed Servitor, but renamed to avoid confusion with the [vending machine][/obj/machinery/vending/hydroseeds]. + */ +/obj/machinery/smartfridge/seeds + name = "\improper Seed Storage" + desc = "When you need seeds fast!" + icon = 'icons/obj/vending.dmi' + icon_state = "seeds" + +/obj/machinery/smartfridge/seeds/Initialize(mapload) + . = ..() + accepted_items_typecache = typecacheof(list( + /obj/item/seeds + )) + +/** + * # Refrigerated Medicine Storage + * + * Medical variant of the [Smart Fridge][/obj/machinery/smartfridge]. + */ +/obj/machinery/smartfridge/medbay + name = "\improper Refrigerated Medicine Storage" + desc = "A refrigerated storage unit for storing medicine and chemicals." + icon_state = "smartfridge" //To fix the icon in the map editor. + +/obj/machinery/smartfridge/medbay/Initialize(mapload) + . = ..() + accepted_items_typecache = typecacheof(list( + /obj/item/reagent_containers/glass, + /obj/item/reagent_containers/iv_bag, + /obj/item/reagent_containers/applicator, + /obj/item/storage/pill_bottle, + /obj/item/reagent_containers/food/pill, + )) + +/** + * # Slime Extract Storage + * + * Secure, Xenobiology variant of the [Smart Fridge][/obj/machinery/smartfridge]. + */ +/obj/machinery/smartfridge/secure/extract + name = "\improper Slime Extract Storage" + desc = "A refrigerated storage unit for slime extracts" + +/obj/machinery/smartfridge/secure/extract/Initialize(mapload) + . = ..() + req_access_txt = "[ACCESS_RESEARCH]" + accepted_items_typecache = typecacheof(list( + /obj/item/slime_extract + )) + +/** + * # Secure Refrigerated Medicine Storage + * + * Secure, Medical variant of the [Smart Fridge][/obj/machinery/smartfridge]. + */ +/obj/machinery/smartfridge/secure/medbay + name = "\improper Secure Refrigerated Medicine Storage" + desc = "A refrigerated storage unit for storing medicine and chemicals." + icon_state = "smartfridge" //To fix the icon in the map editor. + req_one_access_txt = "5;33" + +/obj/machinery/smartfridge/secure/medbay/Initialize(mapload) + . = ..() + accepted_items_typecache = typecacheof(list( + /obj/item/reagent_containers/glass, + /obj/item/reagent_containers/iv_bag, + /obj/item/reagent_containers/applicator, + /obj/item/storage/pill_bottle, + /obj/item/reagent_containers/food/pill, + )) + +/** + * # Smart Chemical Storage + * + * Secure, Chemistry variant of the [Smart Fridge][/obj/machinery/smartfridge]. + */ +/obj/machinery/smartfridge/secure/chemistry + name = "\improper Smart Chemical Storage" + desc = "A refrigerated storage unit for medicine and chemical storage." + icon_state = "smartfridge" //To fix the icon in the map editor. + /// Associative list (/obj/item => /number) representing the items the fridge should initially contain. + var/list/spawn_meds + +/obj/machinery/smartfridge/secure/chemistry/Initialize(mapload) + . = ..() + req_access_txt = "[ACCESS_CHEMISTRY]" + // Spawn initial chemicals + if(mapload) + LAZYINITLIST(spawn_meds) + for(var/typekey in spawn_meds) + var/amount = spawn_meds[typekey] || 1 + while(amount--) + var/obj/item/I = new typekey(src) + item_quants[I.name] += 1 + update_icon() + // Accepted items + accepted_items_typecache = typecacheof(list( + /obj/item/storage/pill_bottle, + /obj/item/reagent_containers, + )) + +/** + * # Smart Chemical Storage (Preloaded) + * + * A [Smart Chemical Storage][/obj/machinery/smartfridge/secure/chemistry] but with some items already in. + */ +/obj/machinery/smartfridge/secure/chemistry/preloaded + // I exist! + +/obj/machinery/smartfridge/secure/chemistry/preloaded/Initialize(mapload) + spawn_meds = list( + /obj/item/reagent_containers/food/pill/epinephrine = 12, + /obj/item/reagent_containers/food/pill/charcoal = 5, + /obj/item/reagent_containers/glass/bottle/epinephrine = 1, + /obj/item/reagent_containers/glass/bottle/charcoal = 1, + ) + . = ..() + +/** + * # Smart Chemical Storage (Preloaded, Syndicate) + * + * A [Smart Chemical Storage (Preloaded)][/obj/machinery/smartfridge/secure/chemistry/preloaded] but with exclusive access to Syndicate. + */ +/obj/machinery/smartfridge/secure/chemistry/preloaded/syndicate + req_access_txt = null + +/obj/machinery/smartfridge/secure/chemistry/preloaded/syndicate/Initialize(mapload) + . = ..() + req_access = list(ACCESS_SYNDICATE) + +/** + * # Disk Compartmentalizer + * + * Disk variant of the [Smart Fridge][/obj/machinery/smartfridge]. + */ +/obj/machinery/smartfridge/disks + name = "disk compartmentalizer" + desc = "A machine capable of storing a variety of disks. Denoted by most as the DSU (disk storage unit)." + icon_state = "disktoaster" + pass_flags = PASSTABLE + visible_contents = FALSE + +/obj/machinery/smartfridge/disks/Initialize(mapload) + . = ..() + accepted_items_typecache = typecacheof(list( + /obj/item/disk, + )) + +/** + * # Smart Virus Storage + * + * Secure, Virology variant of the [Smart Chemical Storage][/obj/machinery/smartfridge/secure/chemistry]. + * Comes with some items. + */ +/obj/machinery/smartfridge/secure/chemistry/virology + name = "\improper Smart Virus Storage" + desc = "A refrigerated storage unit for volatile sample storage." + +/obj/machinery/smartfridge/secure/chemistry/virology/Initialize(mapload) + spawn_meds = list( + /obj/item/reagent_containers/syringe/antiviral = 4, + /obj/item/reagent_containers/glass/bottle/cold = 1, + /obj/item/reagent_containers/glass/bottle/flu_virion = 1, + /obj/item/reagent_containers/glass/bottle/mutagen = 1, + /obj/item/reagent_containers/glass/bottle/plasma = 1, + /obj/item/reagent_containers/glass/bottle/diphenhydramine = 1 + ) + . = ..() + req_access_txt = "[ACCESS_VIROLOGY]" + accepted_items_typecache = typecacheof(list( + /obj/item/reagent_containers/syringe, + /obj/item/reagent_containers/glass/bottle, + /obj/item/reagent_containers/glass/beaker, + )) + +/** + * # Smart Virus Storage (Preloaded) + * + * A [Smart Virus Storage][/obj/machinery/smartfridge/secure/chemistry/virology] but with some additional items. + */ +/obj/machinery/smartfridge/secure/chemistry/virology/preloaded + // I exist! + +/obj/machinery/smartfridge/secure/chemistry/virology/preloaded/Initialize(mapload) + spawn_meds = list( + /obj/item/reagent_containers/syringe/antiviral = 4, + /obj/item/reagent_containers/glass/bottle/cold = 1, + /obj/item/reagent_containers/glass/bottle/flu_virion = 1, + /obj/item/reagent_containers/glass/bottle/mutagen = 1, + /obj/item/reagent_containers/glass/bottle/plasma = 1, + /obj/item/reagent_containers/glass/bottle/reagent/synaptizine = 1, + /obj/item/reagent_containers/glass/bottle/reagent/formaldehyde = 1 + ) + . = ..() + +/** + * # Smart Virus Storage (Preloaded, Syndicate) + * + * A [Smart Virus Storage (Preloaded)][/obj/machinery/smartfridge/secure/chemistry/virology/preloaded] but with exclusive access to Syndicate. + */ +/obj/machinery/smartfridge/secure/chemistry/virology/preloaded/syndicate + req_access_txt = null + +/obj/machinery/smartfridge/secure/chemistry/virology/preloaded/syndicate/Initialize(mapload) + . = ..() + req_access = list(ACCESS_SYNDICATE) + +/** + * # Drink Showcase + * + * Drink variant of the [Smart Fridge][/obj/machinery/smartfridge]. + */ +/obj/machinery/smartfridge/drinks + name = "\improper Drink Showcase" + desc = "A refrigerated storage unit for tasty tasty alcohol." + +/obj/machinery/smartfridge/drinks/Initialize(mapload) + . = ..() + accepted_items_typecache = typecacheof(list( + /obj/item/reagent_containers/glass, + /obj/item/reagent_containers/food/drinks, + /obj/item/reagent_containers/food/condiment, + )) + +/** + * # Drying Rack + * + * Variant of the [Smart Fridge][/obj/machinery/smartfridge] for drying stuff. + * Doesn't have components. + */ /obj/machinery/smartfridge/drying_rack name = "drying rack" desc = "A wooden contraption, used to dry plant products, food and leather." @@ -470,11 +630,16 @@ can_dry = TRUE visible_contents = FALSE -/obj/machinery/smartfridge/drying_rack/New() - ..() - if(component_parts && component_parts.len) - component_parts.Cut() +/obj/machinery/smartfridge/drying_rack/Initialize(mapload) + . = ..() + // Remove components, this is wood duh + QDEL_LIST(component_parts) component_parts = null + // Accepted items + accepted_items_typecache = typecacheof(list( + /obj/item/reagent_containers/food/snacks, + /obj/item/stack/sheet/wetleather, + )) /obj/machinery/smartfridge/drying_rack/on_deconstruction() new /obj/item/stack/sheet/wood(loc, 10) @@ -483,34 +648,6 @@ /obj/machinery/smartfridge/drying_rack/RefreshParts() return -/obj/machinery/smartfridge/drying_rack/default_deconstruction_screwdriver() - return - -/obj/machinery/smartfridge/drying_rack/exchange_parts() - return - -/obj/machinery/smartfridge/drying_rack/spawn_frame() - return - -/obj/machinery/smartfridge/drying_rack/default_deconstruction_crowbar(user, obj/item/crowbar/C, ignore_panel = 1) - ..() - -/obj/machinery/smartfridge/drying_rack/Topic(href, href_list) - if(..()) - return 1 - if(href_list["dryingOn"]) - drying = TRUE - use_power = ACTIVE_POWER_USE - update_icon() - return 1 - - if(href_list["dryingOff"]) - drying = FALSE - use_power = IDLE_POWER_USE - update_icon() - return 1 - return 0 - /obj/machinery/smartfridge/drying_rack/power_change() if(powered() && anchored) stat &= ~NOPOWER @@ -519,35 +656,67 @@ toggle_drying(TRUE) update_icon() -/obj/machinery/smartfridge/drying_rack/load(obj/I, mob/user) //For updating the filled overlay +/obj/machinery/smartfridge/drying_rack/screwdriver_act(mob/living/user, obj/item/I) + return + +/obj/machinery/smartfridge/drying_rack/exchange_parts() + return + +/obj/machinery/smartfridge/drying_rack/spawn_frame() + return + +/obj/machinery/smartfridge/drying_rack/crowbar_act(mob/living/user, obj/item/I) + . = default_deconstruction_crowbar(user, I, TRUE) + +/obj/machinery/smartfridge/drying_rack/emp_act(severity) + ..() + atmos_spawn_air(LINDA_SPAWN_HEAT) + +/obj/machinery/smartfridge/drying_rack/Topic(href, href_list) if(..()) + return TRUE + + if(href_list["dryingOn"]) + drying = TRUE + use_power = ACTIVE_POWER_USE update_icon() - return 1 + return TRUE + + if(href_list["dryingOff"]) + drying = FALSE + use_power = IDLE_POWER_USE + update_icon() + return TRUE + + return FALSE /obj/machinery/smartfridge/drying_rack/update_icon() ..() - overlays.Cut() if(drying) overlays += "drying_rack_drying" - if(contents.len) + if(length(contents)) overlays += "drying_rack_filled" /obj/machinery/smartfridge/drying_rack/process() ..() - if(drying) - if(rack_dry())//no need to update unless something got dried - update_icon() + if(drying && rack_dry())//no need to update unless something got dried + update_icon() /obj/machinery/smartfridge/drying_rack/accept_check(obj/item/O) + . = ..() + // If it's a food, reject non driable ones if(istype(O, /obj/item/reagent_containers/food/snacks)) var/obj/item/reagent_containers/food/snacks/S = O - if(S.dried_type) - return TRUE - if(istype(O, /obj/item/stack/sheet/wetleather)) - return TRUE - return FALSE + if(!S.dried_type) + return FALSE +/** + * Toggles the drying process. + * + * Arguments: + * * forceoff - Whether to force turn off the drying rack. + */ /obj/machinery/smartfridge/drying_rack/proc/toggle_drying(forceoff) if(drying || forceoff) drying = FALSE @@ -557,6 +726,9 @@ use_power = ACTIVE_POWER_USE update_icon() +/** + * Called in [/obj/machinery/smartfridge/drying_rack/process] to dry the contents. + */ /obj/machinery/smartfridge/drying_rack/proc/rack_dry() for(var/obj/item/reagent_containers/food/snacks/S in contents) if(S.dried_type == S.type)//if the dried type is the same as the object's type, don't bother creating a whole new item... @@ -580,30 +752,4 @@ return TRUE return FALSE -/obj/machinery/smartfridge/drying_rack/emp_act(severity) - ..() - atmos_spawn_air(LINDA_SPAWN_HEAT) - -/************************ -* Secure SmartFridges -*************************/ -/obj/machinery/smartfridge/secure/emag_act(mob/user) - emagged = 1 - locked = -1 - to_chat(user, "You short out the product lock on [src].") - -/obj/machinery/smartfridge/secure/emp_act(severity) - if(prob(40/severity) && (!emagged) && (locked != -1)) - playsound(loc, 'sound/effects/sparks4.ogg', 60, 1) - emagged = 1 - locked = -1 - -/obj/machinery/smartfridge/secure/Topic(href, href_list) - if(stat & (NOPOWER|BROKEN)) - return 0 - if(usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) - if(!allowed(usr) && !emagged && locked != -1 && scan_id && href_list["vend"]) - to_chat(usr, "Access denied.") - SSnanoui.update_uis(src) - return 0 - return ..() +#undef SMART_FRIDGE_LOCK_SHORTED diff --git a/code/modules/hydroponics/beekeeping/beebox.dm b/code/modules/hydroponics/beekeeping/beebox.dm index 612146e579a..5a73313601a 100644 --- a/code/modules/hydroponics/beekeeping/beebox.dm +++ b/code/modules/hydroponics/beekeeping/beebox.dm @@ -198,10 +198,17 @@ return return ..() +/obj/structure/beebox/crowbar_act(mob/user, obj/item/I) + . = TRUE + if(!I.use_tool(src, user, 0)) + return + TOOL_ATTEMPT_DISMANTLE_MESSAGE + if(I.use_tool(src, user, 50, volume = I.tool_volume)) + TOOL_DISMANTLE_SUCCESS_MESSAGE + deconstruct(disassembled = TRUE) + /obj/structure/beebox/wrench_act(mob/user, obj/item/I) . = TRUE - if(!I.tool_use_check(user, 0)) - return default_unfasten_wrench(user, I, time = 20) /obj/structure/beebox/attack_hand(mob/user) @@ -261,15 +268,18 @@ visible_message("[user] removes the queen from the apiary.") queen_bee = null -/obj/structure/beebox/deconstruct(disassembled = TRUE) - new /obj/item/stack/sheet/wood(loc, 20) +/obj/structure/beebox/deconstruct(disassembled = FALSE) + var/mat_drop = 20 + if(disassembled) + mat_drop = 40 + new /obj/item/stack/sheet/wood(loc, mat_drop) for(var/mob/living/simple_animal/hostile/poison/bees/B in bees) if(B.loc == src) B.forceMove(drop_location()) for(var/obj/item/honey_frame/HF in honey_frames) HF.forceMove(drop_location()) honey_frames -= HF - qdel(src) + ..() /obj/structure/beebox/unwrenched anchored = FALSE diff --git a/code/modules/hydroponics/beekeeping/honeycomb.dm b/code/modules/hydroponics/beekeeping/honeycomb.dm index 23bc55dfea2..1d086bae0f0 100644 --- a/code/modules/hydroponics/beekeeping/honeycomb.dm +++ b/code/modules/hydroponics/beekeeping/honeycomb.dm @@ -17,6 +17,8 @@ pixel_y = rand(8,-8) update_icon() +/obj/item/reagent_containers/honeycomb/set_APTFT() + set hidden = TRUE /obj/item/reagent_containers/honeycomb/update_icon() overlays.Cut() diff --git a/code/modules/hydroponics/fermenting_barrel.dm b/code/modules/hydroponics/fermenting_barrel.dm index f194c48e019..5031ac71373 100644 --- a/code/modules/hydroponics/fermenting_barrel.dm +++ b/code/modules/hydroponics/fermenting_barrel.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/objects.dmi' icon_state = "barrel" density = TRUE - anchored = FALSE + anchored = TRUE container_type = DRAINABLE | AMOUNT_VISIBLE pressure_resistance = 2 * ONE_ATMOSPHERE max_integrity = 300 @@ -65,6 +65,26 @@ to_chat(user, "You close [src], letting you draw from its tap.") update_icon() +/obj/structure/fermenting_barrel/crowbar_act(mob/living/user, obj/item/I) + . = TRUE + if(!I.use_tool(src, user, 0)) + return + TOOL_ATTEMPT_DISMANTLE_MESSAGE + if(I.use_tool(src, user, 50, volume = I.tool_volume)) + TOOL_DISMANTLE_SUCCESS_MESSAGE + deconstruct(disassembled = TRUE) + +/obj/structure/fermenting_barrel/wrench_act(mob/living/user, obj/item/I) + . = TRUE + default_unfasten_wrench(user, I, time = 20) + +/obj/structure/fermenting_barrel/deconstruct(disassembled = FALSE) + var/mat_drop = 15 + if(disassembled) + mat_drop = 30 + new /obj/item/stack/sheet/wood(drop_location(), mat_drop) + ..() + /obj/structure/fermenting_barrel/update_icon() if(open) icon_state = "barrel_open" diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index 5ad8a5f32f4..bad8813ea01 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -117,6 +117,7 @@ /obj/item/reagent_containers/food/snacks/grown/throw_impact(atom/hit_atom) if(!..()) //was it caught by a mob? if(seed) + log_action(thrownby, hit_atom, "Thrown [src] at") for(var/datum/plant_gene/trait/T in seed.genes) T.on_throw_impact(src, hit_atom) if(seed.get_gene(/datum/plant_gene/trait/squash)) @@ -147,11 +148,11 @@ qdel(src) -/obj/item/reagent_containers/food/snacks/grown/On_Consume() - if(iscarbon(usr)) +/obj/item/reagent_containers/food/snacks/grown/On_Consume(mob/M, mob/user) + if(iscarbon(M)) if(seed) for(var/datum/plant_gene/trait/T in seed.genes) - T.on_consume(src, usr) + T.on_consume(src, M) ..() /obj/item/reagent_containers/food/snacks/grown/after_slip(mob/living/carbon/human/H) @@ -190,3 +191,16 @@ else return ..() +/obj/item/reagent_containers/food/snacks/grown/proc/log_action(mob/user, atom/target, what_done) + var/reagent_str = reagents.log_list() + var/genes_str = "No genes" + if(seed && length(seed.genes)) + var/list/plant_gene_names = list() + for(var/thing in seed.genes) + var/datum/plant_gene/G = thing + if(G.dangerous) + plant_gene_names += G.name + genes_str = english_list(plant_gene_names) + + add_attack_logs(user, target, "[what_done] ([reagent_str] | [genes_str])") + diff --git a/code/modules/hydroponics/grown/replicapod.dm b/code/modules/hydroponics/grown/replicapod.dm index d6f8cae7519..0f2b54ab971 100644 --- a/code/modules/hydroponics/grown/replicapod.dm +++ b/code/modules/hydroponics/grown/replicapod.dm @@ -29,7 +29,8 @@ if(istype(W,/obj/item/reagent_containers/syringe)) if(!contains_sample) for(var/datum/reagent/blood/bloodSample in W.reagents.reagent_list) - if(bloodSample.data["mind"] && bloodSample.data["cloneable"] == 1) + var/datum/dna/dna = bloodSample.data["dna"] + if(bloodSample.data["mind"] && bloodSample.data["cloneable"] && !(NO_SCAN in dna.species.species_traits)) var/datum/mind/tempmind = bloodSample.data["mind"] if(tempmind.is_revivable()) mind = bloodSample.data["mind"] diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index a4c6fe7280d..c2f4914351c 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -1,5 +1,7 @@ /datum/plant_gene var/name + /// Used to determine if the trait should be logged when the holder is used + var/dangerous = FALSE /datum/plant_gene/proc/get_name() // Used for manipulator display and gene disk name. return name @@ -194,6 +196,7 @@ name = "Liquid Contents" examine_line = "It has a lot of liquid contents inside." origin_tech = list("biotech" = 5) + dangerous = TRUE /datum/plant_gene/trait/slip // Makes plant slippery, unless it has a grown-type trash. Then the trash gets slippery. @@ -201,6 +204,7 @@ name = "Slippery Skin" rate = 0.1 examine_line = "It has a very slippery skin." + dangerous = TRUE /datum/plant_gene/trait/slip/on_new(obj/item/reagent_containers/food/snacks/grown/G, newloc) . = ..() @@ -224,6 +228,7 @@ name = "Electrical Activity" rate = 0.2 origin_tech = list("powerstorage" = 5) + dangerous = TRUE /datum/plant_gene/trait/cell_charge/on_slip(obj/item/reagent_containers/food/snacks/grown/G, mob/living/carbon/C) var/power = G.seed.potency*rate @@ -298,6 +303,7 @@ name = "Bluespace Activity" rate = 0.1 origin_tech = list("bluespace" = 5) + dangerous = TRUE /datum/plant_gene/trait/teleport/on_squash(obj/item/reagent_containers/food/snacks/grown/G, atom/target) if(isliving(target)) @@ -385,6 +391,7 @@ /datum/plant_gene/trait/stinging name = "Hypodermic Prickles" + dangerous = TRUE /datum/plant_gene/trait/stinging/on_throw_impact(obj/item/reagent_containers/food/snacks/grown/G, atom/target) if(isliving(target) && G.reagents && G.reagents.total_volume) @@ -398,6 +405,7 @@ /datum/plant_gene/trait/smoke name = "gaseous decomposition" + dangerous = TRUE /datum/plant_gene/trait/smoke/on_squash(obj/item/reagent_containers/food/snacks/grown/G, atom/target) var/datum/effect_system/smoke_spread/chem/S = new diff --git a/code/modules/library/admin.dm b/code/modules/library/admin.dm index db907fc20ba..b56aa6994cf 100644 --- a/code/modules/library/admin.dm +++ b/code/modules/library/admin.dm @@ -3,8 +3,7 @@ set desc = "Permamently deletes a book from the database." set category = "Admin" - if(!holder) - to_chat(src, "Only administrators may use this command.") + if(!check_rights(R_ADMIN)) return var/isbn = input("ISBN number?", "Delete Book") as num | null @@ -25,8 +24,7 @@ set desc = "View books flagged for content." set category = "Admin" - if(!holder) - to_chat(src, "Only administrators may use this command.") + if(!check_rights(R_ADMIN)) return holder.view_flagged_books() diff --git a/code/modules/library/computers/checkout.dm b/code/modules/library/computers/checkout.dm index f9aae71b2a5..934234f645e 100644 --- a/code/modules/library/computers/checkout.dm +++ b/code/modules/library/computers/checkout.dm @@ -463,4 +463,5 @@ B.author = newbook.author B.dat = newbook.content B.icon_state = "book[rand(1,16)]" + B.has_drm = TRUE visible_message("[src]'s printer hums as it produces a completely bound book. How did it do that?") diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index a7dd148b51a..e74625c8715 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -151,6 +151,8 @@ var/carved = 0 // Has the book been hollowed out for use as a secret storage item? var/forbidden = 0 // Prevent ordering of this book. (0=no, 1=yes, 2=emag only) var/obj/item/store // What's in the book? + /// Book DRM. If this var is TRUE, it cannot be scanned and re-uploaded + var/has_drm = FALSE /obj/item/book/attack_self(var/mob/user as mob) if(carved) diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 8fa7629863e..0c23a0c5800 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -150,6 +150,11 @@ GLOBAL_LIST_INIT(library_section_names, list("Any", "Fiction", "Non-Fiction", "A power_change() return if(istype(I, /obj/item/book)) + // NT with those pesky DRM schemes + var/obj/item/book/B = I + if(B.has_drm) + atom_say("Copyrighted material detected. Scanner is unable to copy book to memory.") + return FALSE user.drop_item() I.forceMove(src) return 1 diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm index 9b74c922a6b..044b78a04bc 100644 --- a/code/modules/mining/abandonedcrates.dm +++ b/code/modules/mining/abandonedcrates.dm @@ -82,7 +82,7 @@ new /obj/item/clothing/head/corgi(src) if(67 to 68) for(var/i in 1 to rand(4, 7)) - var /newitem = pick(subtypesof(/obj/item/stock_parts)) + var/newitem = pick(subtypesof(/obj/item/stock_parts)) new newitem(src) if(69 to 70) new /obj/item/stack/ore/bluespace_crystal(src, 5) diff --git a/code/modules/mining/lavaland/loot/ashdragon_loot.dm b/code/modules/mining/lavaland/loot/ashdragon_loot.dm index a0ea3eb7639..21bc247b0df 100644 --- a/code/modules/mining/lavaland/loot/ashdragon_loot.dm +++ b/code/modules/mining/lavaland/loot/ashdragon_loot.dm @@ -120,18 +120,13 @@ return var/mob/living/carbon/human/H = user - var/random = rand(1,3) + var/random = rand(1,2) switch(random) if(1) to_chat(user, "Your flesh begins to melt! Miraculously, you seem fine otherwise.") H.set_species(/datum/species/skeleton) if(2) - to_chat(user, "Power courses through you! You can now shift your form at will.") - if(user.mind) - var/obj/effect/proc_holder/spell/targeted/shapeshift/dragon/D = new - user.mind.AddSpell(D) - if(3) to_chat(user, "You feel like you could walk straight through lava now.") H.weather_immunities |= "lava" diff --git a/code/modules/mining/lavaland/loot/colossus_loot.dm b/code/modules/mining/lavaland/loot/colossus_loot.dm index 0bde4d95464..e99e7132f03 100644 --- a/code/modules/mining/lavaland/loot/colossus_loot.dm +++ b/code/modules/mining/lavaland/loot/colossus_loot.dm @@ -349,7 +349,7 @@ harm_intent_damage = 1 friendly = "mends" density = 0 - flying = 1 + flying = TRUE obj_damage = 0 pass_flags = PASSTABLE | PASSGRILLE | PASSMOB ventcrawler = 2 diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index c01d04beba8..54c23c89b5d 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -220,6 +220,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ var/datum/wires/explosive/gibtonite/wires /obj/item/twohanded/required/gibtonite/Destroy() + SStgui.close_uis(wires) QDEL_NULL(wires) return ..() diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 336ebdb8b67..31ff0098335 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -53,7 +53,6 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER) if(ismob(body)) T = get_turf(body) //Where is the body located? attack_log_old = body.attack_log_old //preserve our attack logs by copying them to our ghost - logs = body.logs.Copy() var/mutable_appearance/MA = copy_appearance(body) if(body.mind && body.mind.name) diff --git a/code/modules/mob/dead/observer/say.dm b/code/modules/mob/dead/observer/say.dm index 2f5627e8413..4d003753876 100644 --- a/code/modules/mob/dead/observer/say.dm +++ b/code/modules/mob/dead/observer/say.dm @@ -1,20 +1,10 @@ -/mob/dead/observer/say(var/message) +/mob/dead/observer/say(message) message = sanitize(copytext(message, 1, MAX_MESSAGE_LEN)) if(!message) return - log_ghostsay(message, src) - - if(src.client) - if(src.client.prefs.muted & MUTE_DEADCHAT) - to_chat(src, "You cannot talk in deadchat (muted).") - return - - if(src.client.handle_spam_prevention(message,MUTE_DEADCHAT)) - return - - . = src.say_dead(message) + return say_dead(message) /mob/dead/observer/emote(act, type, message, force) diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index 2b07e10291f..2514ce68b06 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -47,7 +47,7 @@ . = trim(. + trim(msg)) . += "\"" -/mob/proc/hear_say(list/message_pieces, verb = "says", italics = 0, mob/speaker = null, sound/speech_sound, sound_vol, sound_frequency) +/mob/proc/hear_say(list/message_pieces, verb = "says", italics = 0, mob/speaker = null, sound/speech_sound, sound_vol, sound_frequency, use_voice = TRUE) if(!client) return 0 @@ -74,7 +74,7 @@ return 0 var/speaker_name = speaker.name - if(ishuman(speaker)) + if(use_voice && ishuman(speaker)) var/mob/living/carbon/human/H = speaker speaker_name = H.GetVoice() @@ -99,9 +99,9 @@ if(speaker == src) to_chat(src, "You cannot hear yourself speak!") else - to_chat(src, "[speaker_name][speaker.GetAltName()] talks but you cannot hear [speaker.p_them()].") + to_chat(src, "[speaker.name] talks but you cannot hear [speaker.p_them()].") else - to_chat(src, "[speaker_name][speaker.GetAltName()] [track][message]") + to_chat(src, "[speaker_name][use_voice ? speaker.GetAltName() : ""] [track][message]") if(speech_sound && (get_dist(speaker, src) <= world.view && src.z == speaker.z)) var/turf/source = speaker? get_turf(speaker) : get_turf(src) playsound_local(source, speech_sound, sound_vol, 1, sound_frequency) @@ -171,7 +171,14 @@ to_chat(src, heard) -/mob/proc/hear_holopad_talk(list/message_pieces, var/verb = "says", var/mob/speaker = null) +/mob/proc/hear_holopad_talk(list/message_pieces, verb = "says", mob/speaker = null) + if(sleeping || stat == UNCONSCIOUS) + hear_sleep(multilingual_to_message(message_pieces)) + return + + if(!can_hear()) + return + var/message = combine_message(message_pieces, verb, speaker) var/name = speaker.name diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm index a46268daf50..50d9b6d5fd5 100644 --- a/code/modules/mob/language.dm +++ b/code/modules/mob/language.dm @@ -186,7 +186,7 @@ if(prob(80)) new_name += " [pick(list("Hadii","Kaytam","Zhan-Khazan","Hharar","Njarir'Akhan"))]" else - new_name += ..(gender,1) + new_name += " [..(gender,1)]" return new_name /datum/language/vulpkanin diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index aeee677b905..f281b8abec3 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -81,7 +81,7 @@ /mob/living/carbon/alien/larva/show_inv(mob/user as mob) return -/mob/living/carbon/alien/larva/start_pulling(atom/movable/AM, state, force = move_force, supress_message = FALSE) +/mob/living/carbon/alien/larva/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE) return FALSE /* Commented out because it's duplicated in life.dm diff --git a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm index 5d828e7c181..79ed90a61b8 100644 --- a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm +++ b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm @@ -70,7 +70,7 @@ return polling = 1 spawn() - var/list/candidates = pollCandidates("Do you want to play as an alien?", ROLE_ALIEN, 0) + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as an alien?", ROLE_ALIEN, FALSE, source = /mob/living/carbon/alien/larva) var/mob/C = null // To stop clientless larva, we will check that our host has a client diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index 16014e7c353..a17d7b8ebbd 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -226,13 +226,6 @@ brainmob.emp_damage += rand(0,10) ..() -/obj/item/mmi/relaymove(var/mob/user, var/direction) - if(user.stat || user.stunned) - return - var/obj/item/rig/rig = src.get_rig() - if(rig) - rig.forced_move(direction, user) - /obj/item/mmi/Destroy() if(isrobot(loc)) var/mob/living/silicon/robot/borg = loc diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 98585262518..b6e93dc78ff 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -538,6 +538,8 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven take_organ_damage(10) if(iscarbon(hit_atom) && hit_atom != src) var/mob/living/carbon/victim = hit_atom + if(victim.flying) + return if(hurt) victim.take_organ_damage(10) take_organ_damage(10) diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index d213ee7206f..4a0b9ea55b1 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -109,9 +109,6 @@ // log_world("k") sql_report_death(src) - if(wearing_rig) - wearing_rig.notify_ai("Warning: user death event. Mobility control passed to integrated intelligence system.") - /mob/living/carbon/human/update_revive() . = ..() if(. && healthdoll) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 10c2ac8f119..b69c13987b9 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -308,14 +308,14 @@ m_type = 1 if("bow", "bows") - if(!buckled) + if(!restrained()) var/M = handle_emote_param(param) message = "[src] bows[M ? " to [M]" : ""]." m_type = 1 if("salute", "salutes") - if(!buckled) + if(!restrained()) var/M = handle_emote_param(param) message = "[src] salutes[M ? " to [M]" : ""]." diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 16f1738d2f6..d495ca3d2f4 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -5,7 +5,6 @@ icon = 'icons/mob/human.dmi' icon_state = "body_m_s" deathgasp_on_death = TRUE - var/obj/item/rig/wearing_rig // This is very not good, but it's much much better than calling get_rig() every update_canmove() call. /mob/living/carbon/human/New(loc) icon = null // This is now handled by overlays -- we just keep an icon for the sake of the map editor. @@ -182,13 +181,6 @@ stat("Tank Pressure", internal.air_contents.return_pressure()) stat("Distribution Pressure", internal.distribute_pressure) - if(istype(back, /obj/item/rig)) - var/obj/item/rig/suit = back - var/cell_status = "ERROR" - if(suit.cell) - cell_status = "[suit.cell.charge]/[suit.cell.maxcharge]" - stat(null, "Suit charge: [cell_status]") - // I REALLY need to split up status panel things into datums var/mob/living/simple_animal/borer/B = has_brain_worms() if(B && B.controlling) @@ -963,16 +955,6 @@ var/obj/item/clothing/mask/MT = src.wear_mask tinted += MT.tint - //god help me - if(istype(back, /obj/item/rig)) - var/obj/item/rig/O = back - if(O.helmet && O.helmet == head && (O.helmet.body_parts_covered & HEAD)) - if((O.offline && O.offline_vision_restriction == 1) || (!O.offline && O.vision_restriction == 1)) - tinted = 2 - if((O.offline && O.offline_vision_restriction == 2) || (!O.offline && O.vision_restriction == 2)) - tinted = 3 - //im so sorry - return tinted @@ -1465,12 +1447,13 @@ var/obj/item/organ/internal/eyes/eyes = get_int_organ(/obj/item/organ/internal/eyes) var/obj/item/organ/internal/cyberimp/eyes/eye_implant = get_int_organ(/obj/item/organ/internal/cyberimp/eyes) if(istype(dna.species) && dna.species.eyes) - var/icon/eyes_icon = new /icon('icons/mob/human_face.dmi', dna.species.eyes) + var/icon/eyes_icon if(eye_implant) //Eye implants override native DNA eye colo(u)r eyes_icon = eye_implant.generate_icon() else if(eyes) eyes_icon = eyes.generate_icon() else //Error 404: Eyes not found! + eyes_icon = new('icons/mob/human_face.dmi', dna.species.eyes) eyes_icon.Blend("#800000", ICON_ADD) return eyes_icon diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index f9058065fb0..621d8330761 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -129,13 +129,6 @@ O.heal_damage(0, -amount, internal = 0, robo_repair = O.is_robotic(), updating_health = updating_health) return STATUS_UPDATE_HEALTH - -/mob/living/carbon/human/Paralyse(amount) - // Notify our AI if they can now control the suit. - if(wearing_rig && !stat && paralysis < amount) //We are passing out right this second. - wearing_rig.notify_ai("Warning: user consciousness failure. Mobility control passed to integrated intelligence system.") - return ..() - /mob/living/carbon/human/adjustCloneLoss(amount) if(dna.species && amount > 0) amount = amount * dna.species.clone_mod @@ -342,7 +335,5 @@ This function restores all organs. ..(damage, damagetype, def_zone, blocked) return 1 - //Handle BRUTE and BURN damage - handle_suit_punctures(damagetype, damage) //Handle species apply_damage procs return dna.species.apply_damage(damage, damagetype, def_zone, blocked, src, sharp, used_weapon) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 21a3e8bf274..c7798a51a08 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -531,17 +531,6 @@ emp_act w_uniform.add_mob_blood(source) update_inv_w_uniform() -/mob/living/carbon/human/proc/handle_suit_punctures(var/damtype, var/damage) - - if(!wear_suit) return - if(!istype(wear_suit,/obj/item/clothing/suit/space)) return - if(damtype != BURN && damtype != BRUTE) return - - var/obj/item/clothing/suit/space/SS = wear_suit - var/penetrated_dam = max(0,(damage - max(0,(SS.breach_threshold - SS.damage)))) - - if(penetrated_dam) SS.create_breaches(damtype, penetrated_dam) - /mob/living/carbon/human/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE) if(user.a_intent == INTENT_HARM) if(HAS_TRAIT(user, TRAIT_PACIFISM)) @@ -583,41 +572,34 @@ emp_act if(M.a_intent == INTENT_HARM) if(w_uniform) w_uniform.add_fingerprint(M) - var/damage = rand(15, 30) + var/damage = prob(90) ? 20 : 0 if(!damage) - playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1) + playsound(loc, 'sound/weapons/slashmiss.ogg', 50, TRUE, -1) visible_message("[M] has lunged at [src]!") return 0 var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_selected)) - var/armor_block = run_armor_check(affecting, "melee") + var/armor_block = run_armor_check(affecting, "melee", armour_penetration = 10) - playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1) + playsound(loc, 'sound/weapons/slice.ogg', 25, TRUE, -1) visible_message("[M] has slashed at [src]!", \ "[M] has slashed at [src]!") apply_damage(damage, BRUTE, affecting, armor_block) - if(damage >= 25) - visible_message("[M] has wounded [src]!", \ - "[M] has wounded [src]!") - apply_effect(4, WEAKEN, armor_block) - add_attack_logs(M, src, "Alien attacked") + add_attack_logs(M, src, "Alien attacked") updatehealth("alien attack") - if(M.a_intent == INTENT_DISARM) - if(prob(80)) + if(M.a_intent == INTENT_DISARM) //Always drop item in hand, if no item, get stun instead. + var/obj/item/I = get_active_hand() + if(I && unEquip(I)) + playsound(loc, 'sound/weapons/slash.ogg', 25, TRUE, -1) + visible_message("[M] disarms [src]!", "[M] disarms you!", "You hear aggressive shuffling!") + to_chat(M, "You disarm [src]!") + else var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_selected)) playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1) apply_effect(5, WEAKEN, run_armor_check(affecting, "melee")) add_attack_logs(M, src, "Alien tackled") visible_message("[M] has tackled down [src]!") - else - if(prob(99)) //this looks fucking stupid but it was previously 'var/randn = rand(1, 100); if(randn <= 99)' - playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1) - drop_item() - visible_message("[M] disarmed [src]!") - else - playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1) - visible_message("[M] has tried to disarm [src]!") /mob/living/carbon/human/attack_animal(mob/living/simple_animal/M) . = ..() diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 5e1b5163a24..7cb33bce249 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -16,12 +16,6 @@ else if(istype(wear_suit, /obj/item/clothing/suit/space/hardsuit)) var/obj/item/clothing/suit/space/hardsuit/C = wear_suit thrust = C.jetpack - else if(istype(back,/obj/item/rig)) - var/obj/item/rig/rig = back - for(var/obj/item/rig_module/maneuvering_jets/module in rig.installed_modules) - thrust = module.jets - break - if(thrust) if((movement_dir || thrust.stabilizers) && thrust.allow_thrust(0.01, src)) return 1 diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 90653a6750b..15dfe74880e 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -302,14 +302,6 @@ if(!(head && head.flags & AIRTIGHT)) //if NOT (head AND head.flags CONTAIN AIRTIGHT) null_internals = 1 //not wearing a mask or suitable helmet - if(istype(back, /obj/item/rig)) //wearing a rigsuit - var/obj/item/rig/rig = back //needs to be typecasted because this doesn't use get_rig() for some reason - if(rig.offline && (rig.air_supply && internal == rig.air_supply)) //if rig IS offline AND (rig HAS air_supply AND internal IS air_supply) - null_internals = 1 //offline suits do not breath - - else if(rig.air_supply && internal == rig.air_supply) //if rig HAS air_supply AND internal IS rig air_supply - skip_contents_check = 1 //skip contents.Find() check, the oxygen is valid even being outside of the mob - if(!contents.Find(internal) && (!skip_contents_check)) //if internal NOT IN contents AND skip_contents_check IS false null_internals = 1 //not a rigsuit and your oxygen is gone diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 01a9990ebd8..957b0828725 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -62,11 +62,6 @@ return ..() /mob/living/carbon/human/proc/HasVoiceChanger() - if(istype(back, /obj/item/rig)) - var/obj/item/rig/rig = back - if(rig.speech && rig.speech.voice_holder && rig.speech.voice_holder.active && rig.speech.voice_holder.voice) - return rig.speech.voice_holder.voice - for(var/obj/item/gear in list(wear_mask, wear_suit, head)) if(!gear) continue diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index 0914852b131..a8e1eee5f52 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -519,9 +519,6 @@ /datum/species/proc/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style = M.martial_art) //Handles any species-specific attackhand events. if(!istype(M)) return - if(H.frozen) - to_chat(M, "Do not touch Admin-Frozen people.") - return if(istype(M)) var/obj/item/organ/external/temp = M.bodyparts_by_name["r_hand"] @@ -817,20 +814,6 @@ It'll return null if the organ doesn't correspond, so include null checks when u if(!isnull(hat.lighting_alpha)) H.lighting_alpha = min(hat.lighting_alpha, H.lighting_alpha) - if(istype(H.back, /obj/item/rig)) ///aghhh so snowflakey - var/obj/item/rig/rig = H.back - if(rig.visor) - if(!rig.helmet || (H.head && rig.helmet == H.head)) - if(rig.visor && rig.visor.vision && rig.visor.active && rig.visor.vision.glasses) - var/obj/item/clothing/glasses/G = rig.visor.vision.glasses - if(istype(G)) - H.sight |= G.vision_flags - H.see_in_dark = max(G.see_in_dark, H.see_in_dark) - H.see_invisible = min(G.invis_view, H.see_invisible) - - if(!isnull(G.lighting_alpha)) - H.lighting_alpha = min(G.lighting_alpha, H.lighting_alpha) - if(H.vision_type) H.sight |= H.vision_type.sight_flags H.see_in_dark = max(H.see_in_dark, H.vision_type.see_in_dark) diff --git a/code/modules/mob/living/carbon/human/species/diona.dm b/code/modules/mob/living/carbon/human/species/diona.dm index a8639a1a948..2ce011c7159 100644 --- a/code/modules/mob/living/carbon/human/species/diona.dm +++ b/code/modules/mob/living/carbon/human/species/diona.dm @@ -74,6 +74,10 @@ ..() H.gender = NEUTER +/datum/species/diona/on_species_loss(mob/living/carbon/human/H) + . = ..() + H.clear_alert("nolight") + /datum/species/diona/handle_reagents(mob/living/carbon/human/H, datum/reagent/R) if(R.id == "glyphosate" || R.id == "atrazine") H.adjustToxLoss(3) //Deal aditional damage diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 81907ba516f..e667833dfe3 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -273,11 +273,6 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) overlays_standing[UNDERWEAR_LAYER] = mutable_appearance(underwear_standing, layer = -UNDERWEAR_LAYER) apply_overlay(UNDERWEAR_LAYER) - if(lip_style && (LIPS in dna.species.species_traits)) - var/icon/lips = icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = "lips_[lip_style]_s") - lips.Blend(lip_color, ICON_ADD) - standing += mutable_appearance(lips, layer = -BODY_LAYER) - overlays_standing[BODY_LAYER] = standing apply_overlay(BODY_LAYER) //tail @@ -964,10 +959,6 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) var/mutable_appearance/standing if(back.icon_override) standing = mutable_appearance(back.icon_override, "[back.icon_state]", layer = -BACK_LAYER) - else if(istype(back, /obj/item/rig)) - //If this is a rig and a mob_icon is set, it will take species into account in the rig update_icon() proc. - var/obj/item/rig/rig = back - standing = rig.mob_icon else if(back.sprite_sheets && back.sprite_sheets[dna.species.name]) standing = mutable_appearance(back.sprite_sheets[dna.species.name], "[back.icon_state]", layer = -BACK_LAYER) else @@ -1307,6 +1298,11 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) else . += "#000000" + if(lip_color && (LIPS in dna.species.species_traits)) + . += "[lip_color]" + else + . += "#000000" + for(var/organ_tag in dna.species.has_limbs) var/obj/item/organ/external/part = bodyparts_by_name[organ_tag] if(isnull(part)) diff --git a/code/modules/mob/living/carbon/update_icons.dm b/code/modules/mob/living/carbon/update_icons.dm index cb607bae294..c3d0ca679d4 100644 --- a/code/modules/mob/living/carbon/update_icons.dm +++ b/code/modules/mob/living/carbon/update_icons.dm @@ -29,7 +29,7 @@ if(changed) animate(src, transform = ntransform, time = 2, pixel_y = final_pixel_y, dir = final_dir, easing = EASE_IN|EASE_OUT) handle_transform_change() - floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure we restart it in next life(). + floating = FALSE // If we were without gravity, the bouncing animation got stopped, so we make sure we restart it in next life(). /mob/living/carbon/proc/handle_transform_change() return diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 3062ef461f9..c0341f11b47 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -2,9 +2,8 @@ set waitfor = FALSE set invisibility = 0 - if(flying) //TODO: Better floating - animate(src, pixel_y = pixel_y + 5 , time = 10, loop = 1, easing = SINE_EASING) - animate(pixel_y = pixel_y - 5, time = 10, loop = 1, easing = SINE_EASING) + if(flying && !floating) //TODO: Better floating + float(TRUE) if(client || registered_z) // This is a temporary error tracker to make sure we've caught everything var/turf/T = get_turf(src) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index f3d23ca3f51..9e9724d20ec 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -3,8 +3,29 @@ var/datum/atom_hud/data/human/medical/advanced/medhud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED] medhud.add_to_hud(src) faction += "\ref[src]" + determine_move_and_pull_forces() GLOB.mob_living_list += src +// Used to determine the forces dependend on the mob size +// Will only change the force if the force was not set in the mob type itself +/mob/living/proc/determine_move_and_pull_forces() + var/value + switch(mob_size) + if(MOB_SIZE_TINY) + value = MOVE_FORCE_EXTREMELY_WEAK + if(MOB_SIZE_SMALL) + value = MOVE_FORCE_WEAK + if(MOB_SIZE_HUMAN) + value = MOVE_FORCE_NORMAL + if(MOB_SIZE_LARGE) + value = MOVE_FORCE_NORMAL // For now + if(!move_force) + move_force = value + if(!pull_force) + pull_force = value + if(!move_resist) + move_resist = value + /mob/living/prepare_huds() ..() prepare_data_huds() @@ -59,8 +80,9 @@ //Even if we don't push/swap places, we "touched" them, so spread fire spreadFire(M) - if(now_pushing) - return 1 + // No pushing if we're already pushing past something, or if the mob we're pushing into is anchored. + if(now_pushing || M.anchored) + return TRUE //Should stop you pushing a restrained person out of the way if(isliving(M)) @@ -68,7 +90,7 @@ if(L.pulledby && L.pulledby != src && L.restrained()) if(!(world.time % 5)) to_chat(src, "[L] is restrained, you cannot push past.") - return 1 + return TRUE if(L.pulling) if(ismob(L.pulling)) @@ -76,28 +98,28 @@ if(P.restrained()) if(!(world.time % 5)) to_chat(src, "[L] is restrained, you cannot push past.") - return 1 + return TRUE if(moving_diagonally) //no mob swap during diagonal moves. - return 1 + return TRUE if(a_intent == INTENT_HELP) // Help intent doesn't mob swap a mob pulling a structure if(isstructure(M.pulling) || isstructure(pulling)) - return 1 + return TRUE if(!M.buckled && !M.has_buckled_mobs()) var/mob_swap //the puller can always swap with it's victim if on grab intent if(M.pulledby == src && a_intent == INTENT_GRAB) - mob_swap = 1 + mob_swap = TRUE //restrained people act if they were on 'help' intent to prevent a person being pulled from being seperated from their puller else if((M.restrained() || M.a_intent == INTENT_HELP) && (restrained() || a_intent == INTENT_HELP)) - mob_swap = 1 + mob_swap = TRUE if(mob_swap) //switch our position with M if(loc && !loc.Adjacent(M.loc)) - return 1 - now_pushing = 1 + return TRUE + now_pushing = TRUE var/oldloc = loc var/oldMloc = M.loc @@ -114,18 +136,18 @@ if(!M_passmob) M.pass_flags &= ~PASSMOB - now_pushing = 0 - return 1 + now_pushing = FALSE + return TRUE // okay, so we didn't switch. but should we push? // not if he's not CANPUSH of course if(!(M.status_flags & CANPUSH)) - return 1 + return TRUE //anti-riot equipment is also anti-push if(M.r_hand && (prob(M.r_hand.block_chance * 2)) && !istype(M.r_hand, /obj/item/clothing)) - return 1 + return TRUE if(M.l_hand && (prob(M.l_hand.block_chance * 2)) && !istype(M.l_hand, /obj/item/clothing)) - return 1 + return TRUE //Called when we bump into an obj /mob/living/proc/ObjBump(obj/O) @@ -175,13 +197,6 @@ AM.setDir(current_dir) now_pushing = FALSE -/mob/living/Stat() - . = ..() - if(. && get_rig_stats) - var/obj/item/rig/rig = get_rig() - if(rig) - SetupStat(rig) - /mob/living/proc/can_track(mob/living/user) //basic fast checks go first. When overriding this proc, I recommend calling ..() at the end. var/turf/T = get_turf(src) @@ -209,7 +224,7 @@ set category = "Object" if(istype(AM) && Adjacent(AM)) - start_pulling(AM) + start_pulling(AM, show_message = TRUE) else stop_pulling() @@ -743,16 +758,17 @@ /mob/living/proc/float(on) if(throwing) return - var/fixed = 0 + var/fixed = FALSE if(anchored || (buckled && buckled.anchored)) - fixed = 1 + fixed = TRUE if(on && !floating && !fixed) animate(src, pixel_y = pixel_y + 2, time = 10, loop = -1) - floating = 1 + sleep(10) + animate(src, pixel_y = pixel_y - 2, time = 10, loop = -1) + floating = TRUE else if(((!on || fixed) && floating)) - var/final_pixel_y = get_standard_pixel_y_offset(lying) - animate(src, pixel_y = final_pixel_y, time = 10) - floating = 0 + animate(src, pixel_y = get_standard_pixel_y_offset(lying), time = 10) + floating = FALSE /mob/living/proc/can_use_vents() return "You can't fit into that vent." @@ -827,15 +843,17 @@ if(!used_item) used_item = get_active_hand() ..() - floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure we restart the bouncing after the next movement. + floating = FALSE // If we were without gravity, the bouncing animation got stopped, so we make sure we restart the bouncing after the next movement. /mob/living/proc/do_jitter_animation(jitteriness, loop_amount = 6) - var/amplitude = min(4, (jitteriness/100) + 1) + var/amplitude = min(4, (jitteriness / 100) + 1) var/pixel_x_diff = rand(-amplitude, amplitude) - var/pixel_y_diff = rand(-amplitude/3, amplitude/3) + var/pixel_y_diff = rand(-amplitude / 3, amplitude / 3) + var/final_pixel_x = get_standard_pixel_x_offset(lying) + var/final_pixel_y = get_standard_pixel_y_offset(lying) animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff , time = 2, loop = loop_amount) - animate(pixel_x = initial(pixel_x) , pixel_y = initial(pixel_y) , time = 2) - floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure we restart the bouncing after the next movement. + animate(pixel_x = final_pixel_x , pixel_y = final_pixel_y , time = 2) + floating = FALSE // If we were without gravity, the bouncing animation got stopped, so we make sure we restart the bouncing after the next movement. /mob/living/proc/get_temperature(datum/gas_mixture/environment) @@ -927,10 +945,10 @@ return 0 return 1 -/mob/living/start_pulling(atom/movable/AM, state, force = pull_force, supress_message = FALSE) +/mob/living/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE) if(!AM || !src) return FALSE - if(!(AM.can_be_pulled(src, state, force))) + if(!(AM.can_be_pulled(src, state, force, show_message))) return FALSE if(incapacitated()) return diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index b38f1819524..4da8aa97e06 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -113,7 +113,7 @@ var/armor = run_armor_check(zone, "melee", "Your armor has protected your [parse_zone(zone)].", "Your armor has softened hit to your [parse_zone(zone)].", I.armour_penetration) apply_damage(I.throwforce, dtype, zone, armor, is_sharp(I), I) if(I.thrownby) - add_attack_logs(I.thrownby, src, "Hit with thrown [I]") + add_attack_logs(I.thrownby, src, "Hit with thrown [I]", !I.throwforce ? ATKLOG_ALMOSTALL : null) // Only message if the person gets damages else return 1 else @@ -219,7 +219,7 @@ fire_stacks += L.fire_stacks IgniteMob() -/mob/living/can_be_pulled(user, grab_state, force) +/mob/living/can_be_pulled(user, grab_state, force, show_message = FALSE) return ..() && !(buckled && buckled.buckle_prevents_pull) /mob/living/water_act(volume, temperature, source, method = REAGENT_TOUCH) diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index e230f7a2b99..f8a5f08b313 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -2,6 +2,11 @@ see_invisible = SEE_INVISIBLE_LIVING pressure_resistance = 10 + // Will be determined based on mob size if left null. Done in living/proc/determine_move_and_pull_forces() + move_resist = null + move_force = null + pull_force = null + //Health and life related vars var/maxHealth = 100 //Maximum health that should be possible. var/health = 100 //A mob's health @@ -28,7 +33,7 @@ var/on_fire = 0 //The "Are we on fire?" var var/fire_stacks = 0 //Tracks how many stacks of fire we have on, max is usually 20 - var/floating = 0 + var/floating = FALSE var/mob_size = MOB_SIZE_HUMAN var/metabolism_efficiency = 1 //more or less efficiency to metabolize helpful/harmful reagents and regulate body temperature.. var/digestion_ratio = 1 //controls how quickly reagents metabolize; largely governered by species attributes. diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 630b2223321..e944e692887 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -351,8 +351,6 @@ proc/get_radio_key_from_channel(var/channel) return if(stat) - if(stat == DEAD) - return say_dead(message_pieces) return if(is_muzzled()) @@ -451,14 +449,14 @@ proc/get_radio_key_from_channel(var/channel) var/speech_bubble_test = say_test(message) for(var/mob/M in listening) - M.hear_say(message_pieces, verb, italics, src) + M.hear_say(message_pieces, verb, italics, src, use_voice = FALSE) if(M.client) speech_bubble_recipients.Add(M.client) if(eavesdropping.len) stars_all(message_pieces) //hopefully passing the message twice through stars() won't hurt... I guess if you already don't understand the language, when they speak it too quietly to hear normally you would be able to catch even less. for(var/mob/M in eavesdropping) - M.hear_say(message_pieces, verb, italics, src) + M.hear_say(message_pieces, verb, italics, src, use_voice = FALSE) if(M.client) speech_bubble_recipients.Add(M.client) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 737298e2815..a5a9269d63b 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -50,7 +50,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( var/list/connected_robots = list() var/aiRestorePowerRoutine = 0 //var/list/laws = list() - var/alarms = list("Motion" = list(), "Fire" = list(), "Atmosphere" = list(), "Power" = list(), "Camera" = list()) + alarms_listend_for = list("Motion", "Fire", "Atmosphere", "Power", "Camera", "Burglar") var/viewalerts = 0 var/icon/holo_icon//Default is assigned when AI is created. var/obj/mecha/controlled_mech //For controlled_mech a mech, to determine whether to relaymove or use the AI eye. @@ -173,19 +173,19 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( add_language("Galactic Common", 1) add_language("Sol Common", 1) add_language("Tradeband", 1) - add_language("Neo-Russkiya", 0) - add_language("Gutter", 0) - add_language("Sinta'unathi", 0) - add_language("Siik'tajr", 0) - add_language("Canilunzt", 0) - add_language("Skrellian", 0) - add_language("Vox-pidgin", 0) - add_language("Orluum", 0) - add_language("Rootspeak", 0) + add_language("Neo-Russkiya", 1) + add_language("Gutter", 1) + add_language("Sinta'unathi", 1) + add_language("Siik'tajr", 1) + add_language("Canilunzt", 1) + add_language("Skrellian", 1) + add_language("Vox-pidgin", 1) + add_language("Orluum", 1) + add_language("Rootspeak", 1) add_language("Trinary", 1) - add_language("Chittin", 0) - add_language("Bubblish", 0) - add_language("Clownish", 0) + add_language("Chittin", 1) + add_language("Bubblish", 1) + add_language("Clownish", 1) if(!safety)//Only used by AIize() to successfully spawn an AI. if(!B)//If there is no player/brain inside. @@ -242,6 +242,46 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( return show_borg_info() +/mob/living/silicon/ai/proc/ai_alerts() + var/list/dat = list("Current Station Alerts\n") + dat += "Close

    " + var/list/list/temp_alarm_list = SSalarm.alarms.Copy() + for(var/cat in temp_alarm_list) + if(!(cat in alarms_listend_for)) + continue + dat += text("[]
    \n", cat) + var/list/list/L = temp_alarm_list[cat].Copy() + for(var/alarm in L) + var/list/list/alm = L[alarm].Copy() + var/area_name = alm[1] + var/C = alm[2] + var/list/list/sources = alm[3].Copy() + for(var/thing in sources) + var/atom/A = locateUID(thing) + if(A && A.z != z) + L -= alarm + continue + dat += "" + if(C && islist(C)) + var/dat2 = "" + for(var/cam in C) + var/obj/machinery/camera/I = locateUID(cam) + if(!QDELETED(I)) + dat2 += text("[][]", (dat2 == "") ? "" : " | ", I.c_tag) + dat += text("-- [] ([])", area_name, (dat2 != "") ? dat2 : "No Camera") + else + dat += text("-- [] (No Camera)", area_name) + if(sources.len > 1) + dat += text("- [] sources", sources.len) + dat += "
    \n" + if(!L.len) + dat += "-- All Systems Nominal
    \n" + dat += "
    \n" + + viewalerts = TRUE + var/dat_text = dat.Join("") + src << browse(dat_text, "window=aialerts&can_close=0") + /mob/living/silicon/ai/proc/show_borg_info() stat(null, text("Connected cyborgs: [connected_robots.len]")) for(var/thing in connected_robots) @@ -612,7 +652,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( if(href_list["switchcamera"]) switchCamera(locate(href_list["switchcamera"])) in GLOB.cameranet.cameras if(href_list["showalerts"]) - subsystem_alarm_monitor() + ai_alerts() if(href_list["show_paper"]) if(last_paper_seen) src << browse(last_paper_seen, "window=show_paper") @@ -787,12 +827,49 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( Bot.call_bot(src, waypoint) +/mob/living/silicon/ai/alarm_triggered(src, class, area/A, list/O, obj/alarmsource) + if(!(class in alarms_listend_for)) + return + if(alarmsource.z != z) + return + if(stat == DEAD) + return TRUE + if(O) + var/obj/machinery/camera/C = locateUID(O[1]) + if(O.len == 1 && !QDELETED(C) && C.can_use()) + queueAlarm("--- [class] alarm detected in [A.name]! ([C.c_tag])", class) + else if(O && O.len) + var/foo = 0 + var/dat2 = "" + for(var/thing in O) + var/obj/machinery/camera/I = locateUID(thing) + if(!QDELETED(I)) + dat2 += text("[][]", (!foo) ? "" : " | ", I.c_tag) //I'm not fixing this shit... + foo = 1 + queueAlarm(text ("--- [] alarm detected in []! ([])", class, A.name, dat2), class) + else + queueAlarm(text("--- [] alarm detected in []! (No Camera)", class, A.name), class) + else + queueAlarm(text("--- [] alarm detected in []! (No Camera)", class, A.name), class) + if(viewalerts) + ai_alerts() + +/mob/living/silicon/ai/alarm_cancelled(src, class, area/A, obj/origin, cleared) + if(cleared) + if(!(class in alarms_listend_for)) + return + if(origin.z != z) + return + queueAlarm("--- [class] alarm in [A.name] has been cleared.", class, 0) + if(viewalerts) + ai_alerts() + /mob/living/silicon/ai/proc/switchCamera(obj/machinery/camera/C) if(!tracking) cameraFollow = null - if(!C || stat == DEAD) //C.can_use()) + if(QDELETED(C) || stat == DEAD) //C.can_use()) return FALSE if(!eyeobj) @@ -1166,16 +1243,6 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( /mob/living/silicon/ai/can_buckle() return FALSE -// Pass lying down or getting up to our pet human, if we're in a rig. -/mob/living/silicon/ai/lay_down() - set name = "Rest" - set category = "IC" - - resting = 0 - var/obj/item/rig/rig = get_rig() - if(rig) - rig.force_rest(src) - /mob/living/silicon/ai/switch_to_camera(obj/machinery/camera/C) if(!C.can_use() || !is_in_chassis()) return FALSE diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm index d23fedb09bc..faacf9ba359 100644 --- a/code/modules/mob/living/silicon/ai/freelook/eye.dm +++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm @@ -142,7 +142,7 @@ acceleration = !acceleration to_chat(usr, "Camera acceleration has been toggled [acceleration ? "on" : "off"].") -/mob/camera/aiEye/hear_say(list/message_pieces, verb = "says", italics = 0, mob/speaker = null, sound/speech_sound, sound_vol, sound_frequency) +/mob/camera/aiEye/hear_say(list/message_pieces, verb = "says", italics = 0, mob/speaker = null, sound/speech_sound, sound_vol, sound_frequency, use_voice = TRUE) if(relay_speech) if(istype(ai)) ai.relay_speech(speaker, message_pieces, verb) diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index 61151e35c92..106eaf86d37 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -132,8 +132,6 @@ sleep(50) theAPC = null - process_queued_alarms() - /mob/living/silicon/ai/updatehealth(reason = "none given") if(status_flags & GODMODE) health = 100 diff --git a/code/modules/mob/living/silicon/ai/say.dm b/code/modules/mob/living/silicon/ai/say.dm index 599063c2724..a4e90b50f8e 100644 --- a/code/modules/mob/living/silicon/ai/say.dm +++ b/code/modules/mob/living/silicon/ai/say.dm @@ -80,17 +80,26 @@ GLOBAL_VAR_INIT(announcing_vox, 0) // Stores the time of the last announcement
  • Do not use punctuation as you would normally, if you want a pause you can use the full stop and comma characters by separating them with spaces, like so: 'Alpha . Test , Bravo'.
  • \ WARNING:
    Misuse of the announcement system will get you job banned.
    " - var/index = 0 - for(var/word in GLOB.vox_sounds) - index++ - dat += "[capitalize(word)]" - if(index != GLOB.vox_sounds.len) - dat += " / " + // Show alert and voice sounds separately + var/vox_words = GLOB.vox_sounds - GLOB.vox_alerts + dat = help_format(GLOB.vox_alerts, dat) + dat = help_format(vox_words, dat) var/datum/browser/popup = new(src, "announce_help", "Announcement Help", 500, 400) popup.set_content(dat) popup.open() +/mob/living/silicon/ai/proc/help_format(word_list, dat) + var/index = 0 + for(var/word in word_list) + index++ + dat += "[capitalize(word)]" + if(index != length(word_list)) + dat += " / " + else + dat += "
    " + return dat + /mob/living/silicon/ai/proc/ai_announcement() if(check_unable(AI_CHECK_WIRELESS | AI_CHECK_RADIO)) return diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 3d1293d2a34..0a4e4cee898 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -435,9 +435,6 @@ // Pass lying down or getting up to our pet human, if we're in a rig. if(stat == CONSCIOUS && istype(loc,/obj/item/paicard)) resting = 0 - var/obj/item/rig/rig = get_rig() - if(istype(rig)) - rig.force_rest(src) else resting = !resting to_chat(src, "You are now [resting ? "resting" : "getting up"]") @@ -520,7 +517,7 @@ /mob/living/silicon/pai/Bumped() return -/mob/living/silicon/pai/start_pulling(atom/movable/AM, state, force = move_force, supress_message = FALSE) +/mob/living/silicon/pai/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE) return FALSE /mob/living/silicon/pai/update_canmove(delay_action_updates = 0) @@ -566,6 +563,10 @@ var/obj/item/holder/H = ..() if(!istype(H)) return + if(stat == DEAD) + H.icon = 'icons/mob/pai.dmi' + H.icon_state = "[chassis]_dead" + return if(resting) icon_state = "[chassis]" resting = 0 diff --git a/code/modules/mob/living/silicon/robot/death.dm b/code/modules/mob/living/silicon/robot/death.dm index 72d9b210712..65847c3a9b1 100644 --- a/code/modules/mob/living/silicon/robot/death.dm +++ b/code/modules/mob/living/silicon/robot/death.dm @@ -53,7 +53,7 @@ emote("deathgasp", force = TRUE) if(module) - module.handle_death(gibbed) + module.handle_death(src, gibbed) // Only execute the below if we successfully died . = ..(gibbed) diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 91970d030a6..270606361cb 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -19,6 +19,7 @@ ventcrawler = 2 magpulse = 1 mob_size = MOB_SIZE_SMALL + pull_force = MOVE_FORCE_VERY_WEAK // Can only drag small items modules_break = FALSE @@ -35,6 +36,14 @@ var/reboot_cooldown = 60 // one minute var/last_reboot var/emagged_time + var/list/pullable_drone_items = list( + /obj/item/pipe, + /obj/structure/disposalconstruct, + /obj/item/stack/cable_coil, + /obj/item/stack/rods, + /obj/item/stack/sheet, + /obj/item/stack/tile + ) holder_type = /obj/item/holder/drone // var/sprite[0] @@ -50,7 +59,7 @@ // Disable the microphone wire on Drones if(radio) - radio.wires.CutWireIndex(RADIO_WIRE_TRANSMIT) + radio.wires.cut(WIRE_RADIO_TRANSMIT) if(camera && ("Robots" in camera.network)) camera.network.Add("Engineering") @@ -69,6 +78,10 @@ verbs -= /mob/living/silicon/robot/verb/Namepick module = new /obj/item/robot_module/drone(src) + //Allows Drones to hear the Engineering channel. + module.channels = list("Engineering" = 1) + radio.recalculateChannels() + //Grab stacks. stack_metal = locate(/obj/item/stack/sheet/metal/cyborg) in src.module stack_wood = locate(/obj/item/stack/sheet/wood) in src.module @@ -154,15 +167,17 @@ return else - user.visible_message("\the [user] swipes [user.p_their()] ID card through [src], attempting to shut it down.", "You swipe your ID card through \the [src], attempting to shut it down.") + var/confirm = alert("Using your ID on a Maintenance Drone will shut it down, are you sure you want to do this?", "Disable Drone", "Yes", "No") + if(confirm == ("Yes") && (user in range(3, src))) + user.visible_message("\the [user] swipes [user.p_their()] ID card through [src], attempting to shut it down.", "You swipe your ID card through \the [src], attempting to shut it down.") - if(emagged) - return + if(emagged) + return - if(allowed(W)) - shut_down() - else - to_chat(user, "Access denied.") + if(allowed(W)) + shut_down() + else + to_chat(user, "Access denied.") return @@ -321,20 +336,22 @@ /mob/living/silicon/robot/drone/Bumped(atom/movable/AM) return -/mob/living/silicon/robot/drone/start_pulling(var/atom/movable/AM) +/mob/living/silicon/robot/drone/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE) + + if(is_type_in_list(AM, pullable_drone_items)) + ..(AM, force = INFINITY) // Drone power! Makes them able to drag pipes and such - if(istype(AM,/obj/item/pipe) || istype(AM,/obj/structure/disposalconstruct)) - ..() else if(istype(AM,/obj/item)) var/obj/item/O = AM if(O.w_class > WEIGHT_CLASS_SMALL) - to_chat(src, "You are too small to pull that.") + if(show_message) + to_chat(src, "You are too small to pull that.") return else ..() else - to_chat(src, "You are too small to pull that.") - return + if(show_message) + to_chat(src, "You are too small to pull that.") /mob/living/silicon/robot/drone/add_robot_verbs() src.verbs |= silicon_subsystems diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm index a0582c135e4..16e81f53276 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -8,7 +8,6 @@ //Has a list of items that it can hold. var/list/can_hold = list( - /obj/item/stock_parts/cell, /obj/item/firealarm_electronics, /obj/item/airalarm_electronics, /obj/item/airlock_electronics, @@ -24,6 +23,8 @@ /obj/item/mounted/frame/firealarm, /obj/item/mounted/frame/newscaster_frame, /obj/item/mounted/frame/intercom, + /obj/item/mounted/frame/extinguisher, + /obj/item/mounted/frame/light_switch, /obj/item/rack_parts, /obj/item/camera_assembly, /obj/item/tank, diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index 07080e694bf..a183a8fc455 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -13,7 +13,6 @@ handle_robot_cell() process_locks() update_items() - process_queued_alarms() /mob/living/silicon/robot/proc/handle_robot_cell() @@ -46,7 +45,7 @@ /mob/living/silicon/robot/proc/handle_equipment() if(camera && !scrambledcodes) - if(stat == DEAD || wires.IsCameraCut()) + if(stat == DEAD || wires.is_cut(WIRE_BORG_CAMERA)) camera.status = 0 else camera.status = 1 diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index faa51a58ec0..7d0645d159b 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -59,7 +59,6 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( var/ear_protection = 0 var/damage_protection = 0 var/emp_protection = FALSE - var/xeno_disarm_chance = 85 var/list/force_modules = list() var/allow_rename = TRUE @@ -72,7 +71,6 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( var/list/req_access var/ident = 0 //var/list/laws = list() - var/alarms = list("Motion"=list(), "Fire"=list(), "Atmosphere"=list(), "Power"=list(), "Camera"=list()) var/viewalerts = 0 var/modtype = "Default" var/lower_mod = 0 @@ -112,7 +110,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( /mob/living/silicon/robot/get_cell() return cell -/mob/living/silicon/robot/New(loc, syndie = FALSE, unfinished = FALSE, alien = FALSE, mob/living/silicon/ai/ai_to_sync_to = null) +/mob/living/silicon/robot/New(loc, syndie = FALSE, unfinished = FALSE, alien = FALSE, connect_to_AI = TRUE, mob/living/silicon/ai/ai_to_sync_to = null) spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, src) spark_system.attach(src) @@ -134,13 +132,13 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( radio = new /obj/item/radio/borg(src) common_radio = radio - init(ai_to_sync_to = ai_to_sync_to) + init(alien, connect_to_AI, ai_to_sync_to) if(has_camera && !camera) camera = new /obj/machinery/camera(src) camera.c_tag = real_name camera.network = list("SS13","Robots") - if(wires.IsCameraCut()) // 5 = BORG CAMERA + if(wires.is_cut(WIRE_BORG_CAMERA)) // 5 = BORG CAMERA camera.status = 0 if(mmi == null) @@ -172,18 +170,20 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( scanner = new(src) scanner.Grant(src) -/mob/living/silicon/robot/proc/init(alien = FALSE, mob/living/silicon/ai/ai_to_sync_to = null) +/mob/living/silicon/robot/proc/init(alien, connect_to_AI = TRUE, mob/living/silicon/ai/ai_to_sync_to = null) aiCamera = new/obj/item/camera/siliconcam/robot_camera(src) make_laws() additional_law_channels["Binary"] = ":b " + if(!connect_to_AI) + return var/found_ai = ai_to_sync_to if(!found_ai) found_ai = select_active_ai_with_fewest_borgs() if(found_ai) - lawupdate = 1 + lawupdate = TRUE connect_to_ai(found_ai) else - lawupdate = 0 + lawupdate = FALSE playsound(loc, 'sound/voice/liveagain.ogg', 75, 1) @@ -270,6 +270,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( //If there's an MMI in the robot, have it ejected when the mob goes away. --NEO //Improved /N /mob/living/silicon/robot/Destroy() + SStgui.close_uis(wires) if(mmi && mind)//Safety for when a cyborg gets dust()ed. Or there is no MMI inside. var/turf/T = get_turf(loc)//To hopefully prevent run time errors. if(T) mmi.loc = T @@ -543,6 +544,43 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( src.verbs -= GLOB.robot_verbs_default src.verbs -= silicon_subsystems +/mob/living/silicon/robot/verb/cmd_robot_alerts() + set category = "Robot Commands" + set name = "Show Alerts" + if(usr.stat == DEAD) + to_chat(src, "Alert: You are dead.") + return //won't work if dead + robot_alerts() + +/mob/living/silicon/robot/proc/robot_alerts() + var/list/dat = list() + var/list/list/temp_alarm_list = SSalarm.alarms.Copy() + for(var/cat in temp_alarm_list) + if(!(cat in alarms_listend_for)) + continue + dat += text("[cat]
    \n") + var/list/list/L = temp_alarm_list[cat].Copy() + for(var/alarm in L) + var/list/list/alm = L[alarm].Copy() + var/list/list/sources = alm[3].Copy() + var/area_name = alm[1] + for(var/thing in sources) + var/atom/A = locateUID(thing) + if(A && A.z != z) + L -= alarm + continue + dat += "" + dat += text("-- [area_name]") + dat += "
    \n" + if(!L.len) + dat += "-- All Systems Nominal
    \n" + dat += "
    \n" + + var/datum/browser/alerts = new(usr, "robotalerts", "Current Station Alerts", 400, 410) + var/dat_text = dat.Join("") + alerts.set_content(dat_text) + alerts.open() + /mob/living/silicon/robot/proc/ionpulse() if(!ionpulse_on) return @@ -604,6 +642,23 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( /mob/living/silicon/robot/InCritical() return low_power_mode +/mob/living/silicon/robot/alarm_triggered(src, class, area/A, list/O, obj/alarmsource) + if(!(class in alarms_listend_for)) + return + if(alarmsource.z != z) + return + if(stat == DEAD) + return + queueAlarm(text("--- [class] alarm detected in [A.name]!"), class) + +/mob/living/silicon/robot/alarm_cancelled(src, class, area/A, obj/origin, cleared) + if(cleared) + if(!(class in alarms_listend_for)) + return + if(origin.z != z) + return + queueAlarm("--- [class] alarm in [A.name] has been cleared.", class, 0) + /mob/living/silicon/robot/ex_act(severity) switch(severity) if(1.0) @@ -795,7 +850,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( opened = FALSE update_icons() return - else if(wiresexposed && wires.IsAllCut()) + else if(wiresexposed && wires.is_all_cut()) //Cell is out, wires are exposed, remove MMI, produce damaged chassis, baleet original mob. if(!mmi) to_chat(user, "[src] has no brain to remove.") @@ -1023,10 +1078,6 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( src << browse(null, t1) return 1 - if(href_list["showalerts"]) - subsystem_alarm_monitor() - return 1 - if(href_list["mod"]) var/obj/item/O = locate(href_list["mod"]) if(istype(O) && (O.loc == src)) @@ -1041,6 +1092,11 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( activate_module(O) installed_modules() + //Show alerts window if user clicked on "Show alerts" in chat + if(href_list["showalerts"]) + robot_alerts() + return TRUE + if(href_list["deact"]) var/obj/item/O = locate(href_list["deact"]) if(activated(O)) @@ -1233,7 +1289,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( /mob/living/silicon/robot/proc/SetLockdown(var/state = 1) // They stay locked down if their wire is cut. - if(wires.LockedCut()) + if(wires.is_cut(WIRE_BORG_LOCKED)) state = 1 if(state) throw_alert("locked", /obj/screen/alert/locked) @@ -1343,14 +1399,13 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( eye_protection = 2 // Immunity to flashes and the visual part of flashbangs ear_protection = 1 // Immunity to the audio part of flashbangs damage_protection = 10 // Reduce all incoming damage by this number - xeno_disarm_chance = 20 allow_rename = FALSE modtype = "Commando" faction = list("nanotrasen") is_emaggable = FALSE default_cell_type = /obj/item/stock_parts/cell/bluespace -/mob/living/silicon/robot/deathsquad/init(alien = FALSE, mob/living/silicon/ai/ai_to_sync_to = null) +/mob/living/silicon/robot/deathsquad/init(alien = FALSE, connect_to_AI = TRUE, mob/living/silicon/ai/ai_to_sync_to = null) laws = new /datum/ai_laws/deathsquad module = new /obj/item/robot_module/deathsquad(src) aiCamera = new/obj/item/camera/siliconcam/robot_camera(src) @@ -1380,7 +1435,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( var/eprefix = "Amber" -/mob/living/silicon/robot/ert/init(alien = FALSE, mob/living/silicon/ai/ai_to_sync_to = null) +/mob/living/silicon/robot/ert/init(alien = FALSE, connect_to_AI = TRUE, mob/living/silicon/ai/ai_to_sync_to = null) laws = new /datum/ai_laws/ert_override radio = new /obj/item/radio/borg/ert(src) radio.recalculateChannels() @@ -1413,7 +1468,6 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( damage_protection = 5 // Reduce all incoming damage by this number eprefix = "Gamma" magpulse = 1 - xeno_disarm_chance = 40 /mob/living/silicon/robot/destroyer @@ -1433,11 +1487,12 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( ear_protection = 1 // Immunity to the audio part of flashbangs emp_protection = TRUE // Immunity to EMP, due to heavy shielding damage_protection = 20 // Reduce all incoming damage by this number. Very high in the case of /destroyer borgs, since it is an admin-only borg. - xeno_disarm_chance = 10 default_cell_type = /obj/item/stock_parts/cell/bluespace -/mob/living/silicon/robot/destroyer/init(alien = FALSE, mob/living/silicon/ai/ai_to_sync_to = null) - ..() +/mob/living/silicon/robot/destroyer/init(alien = FALSE, connect_to_AI = TRUE, mob/living/silicon/ai/ai_to_sync_to = null) + aiCamera = new/obj/item/camera/siliconcam/robot_camera(src) + additional_law_channels["Binary"] = ":b " + laws = new /datum/ai_laws/deathsquad module = new /obj/item/robot_module/destroyer(src) module.add_languages(src) module.add_subsystems_and_actions(src) @@ -1446,6 +1501,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( qdel(radio) radio = new /obj/item/radio/borg/ert/specops(src) radio.recalculateChannels() + playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0) /mob/living/silicon/robot/destroyer/borg_icons() if(base_icon == "") diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm index 8445a399582..84eb782833b 100644 --- a/code/modules/mob/living/silicon/robot/robot_defense.dm +++ b/code/modules/mob/living/silicon/robot/robot_defense.dm @@ -2,19 +2,17 @@ if(M.a_intent == INTENT_DISARM) if(!lying) M.do_attack_animation(src, ATTACK_EFFECT_DISARM) - if(prob(xeno_disarm_chance)) - Stun(7) - step(src, get_dir(M,src)) - spawn(5) - step(src, get_dir(M,src)) - add_attack_logs(M, src, "Alien pushed over") - playsound(loc, 'sound/weapons/pierce.ogg', 50, 1, -1) - visible_message("[M] has forced back [src]!",\ - "[M] has forced back [src]!") + var/obj/item/I = get_active_hand() + if(I) + uneq_active() + visible_message("[M] disarmed [src]!", "[M] has disabled [src]'s active module!") + add_attack_logs(M, src, "alien disarmed") else - playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1) - visible_message("[M] took a swipe at [src]!",\ - "[M] took a swipe at [src]!") + Stun(2) + step(src, get_dir(M,src)) + add_attack_logs(M, src, "Alien pushed over") + visible_message("[M] forces back [src]!", "[M] forces back [src]!") + playsound(loc, 'sound/weapons/pierce.ogg', 50, TRUE, -1) else ..() return diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 8e8c67693c5..ff967354131 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -114,7 +114,7 @@ /obj/item/robot_module/proc/handle_custom_removal(component_id, mob/living/user, obj/item/W) return FALSE -/obj/item/robot_module/proc/handle_death(gibbed) +/obj/item/robot_module/proc/handle_death(mob/living/silicon/robot/R, gibbed) return /obj/item/robot_module/standard @@ -255,7 +255,7 @@ fix_modules() -/obj/item/robot_module/engineering/handle_death() +/obj/item/robot_module/engineering/handle_death(mob/living/silicon/robot/R, gibbed) var/obj/item/gripper/G = locate(/obj/item/gripper) in modules if(G) G.drop_gripped_item(silent = TRUE) @@ -368,6 +368,11 @@ R.add_language("Clownish",1) R.add_language("Neo-Russkiya", 1) +/obj/item/robot_module/butler/handle_death(mob/living/silicon/robot/R, gibbed) + var/obj/item/storage/bag/tray/cyborg/T = locate(/obj/item/storage/bag/tray/cyborg) in modules + if(istype(T)) + T.drop_inventory(R) + /obj/item/robot_module/miner name = "miner robot module" @@ -623,7 +628,7 @@ ..() -/obj/item/robot_module/drone/handle_death() +/obj/item/robot_module/drone/handle_death(mob/living/silicon/robot/R, gibbed) var/obj/item/gripper/G = locate(/obj/item/gripper) in modules if(G) G.drop_gripped_item(silent = TRUE) diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index c923e0912b7..7f9c0849d9c 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -11,9 +11,11 @@ var/list/stating_laws = list()// Channels laws are currently being stated on var/list/alarms_to_show = list() var/list/alarms_to_clear = list() + var/list/alarm_types_show = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0) + var/list/alarm_types_clear = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0) + var/list/alarms_listend_for = list("Motion", "Fire", "Atmosphere", "Power", "Camera") //var/list/hud_list[10] var/list/speech_synthesizer_langs = list() //which languages can be vocalized by the speech synthesizer - var/list/alarm_handlers = list() // List of alarm handlers this silicon is registered to var/designation = "" var/obj/item/camera/siliconcam/aiCamera = null //photography //Used in say.dm, allows for pAIs to have different say flavor text, as well as silicons, although the latter is not implemented. @@ -25,9 +27,6 @@ //var/sensor_mode = 0 //Determines the current HUD. - var/next_alarm_notice - var/list/datum/alarm/queued_alarms = new() - hud_possible = list(SPECIALROLE_HUD, DIAG_STAT_HUD, DIAG_HUD) @@ -46,6 +45,8 @@ diag_hud_set_health() add_language("Galactic Common") init_subsystems() + RegisterSignal(SSalarm, COMSIG_TRIGGERED_ALARM, .proc/alarm_triggered) + RegisterSignal(SSalarm, COMSIG_CANCELLED_ALARM, .proc/alarm_cancelled) /mob/living/silicon/med_hud_set_health() return //we use a different hud @@ -55,10 +56,93 @@ /mob/living/silicon/Destroy() GLOB.silicon_mob_list -= src - for(var/datum/alarm_handler/AH in alarm_handlers) - AH.unregister(src) return ..() +/mob/living/silicon/proc/alarm_triggered(src, class, area/A, list/O, obj/alarmsource) + return + +/mob/living/silicon/proc/alarm_cancelled(src, class, area/A, obj/origin, cleared) + return + +/mob/living/silicon/proc/queueAlarm(message, type, incoming = TRUE) + var/in_cooldown = (alarms_to_show.len > 0 || alarms_to_clear.len > 0) + if(incoming) + alarms_to_show += message + alarm_types_show[type] += 1 + else + alarms_to_clear += message + alarm_types_clear[type] += 1 + + if(in_cooldown) + return + + addtimer(CALLBACK(src, .proc/show_alarms), 3 SECONDS) + +/mob/living/silicon/proc/show_alarms() + if(alarms_to_show.len < 5) + for(var/msg in alarms_to_show) + to_chat(src, msg) + else if(length(alarms_to_show)) + + var/list/msg = list("--- ") + + if(alarm_types_show["Burglar"]) + msg += "BURGLAR: [alarm_types_show["Burglar"]] alarms detected. - " + + if(alarm_types_show["Motion"]) + msg += "MOTION: [alarm_types_show["Motion"]] alarms detected. - " + + if(alarm_types_show["Fire"]) + msg += "FIRE: [alarm_types_show["Fire"]] alarms detected. - " + + if(alarm_types_show["Atmosphere"]) + msg += "ATMOSPHERE: [alarm_types_show["Atmosphere"]] alarms detected. - " + + if(alarm_types_show["Power"]) + msg += "POWER: [alarm_types_show["Power"]] alarms detected. - " + + if(alarm_types_show["Camera"]) + msg += "CAMERA: [alarm_types_show["Camera"]] alarms detected. - " + + msg += "\[Show Alerts\]" + var/msg_text = msg.Join("") + to_chat(src, msg_text) + + if(alarms_to_clear.len < 3) + for(var/msg in alarms_to_clear) + to_chat(src, msg) + + else if(alarms_to_clear.len) + var/list/msg = list("--- ") + + if(alarm_types_clear["Motion"]) + msg += "MOTION: [alarm_types_clear["Motion"]] alarms cleared. - " + + if(alarm_types_clear["Fire"]) + msg += "FIRE: [alarm_types_clear["Fire"]] alarms cleared. - " + + if(alarm_types_clear["Atmosphere"]) + msg += "ATMOSPHERE: [alarm_types_clear["Atmosphere"]] alarms cleared. - " + + if(alarm_types_clear["Power"]) + msg += "POWER: [alarm_types_clear["Power"]] alarms cleared. - " + + if(alarm_types_show["Camera"]) + msg += "CAMERA: [alarm_types_clear["Camera"]] alarms cleared. - " + + msg += "\[Show Alerts\]" + + var/msg_text = msg.Join("") + to_chat(src, msg_text) + + + alarms_to_show.Cut() + alarms_to_clear.Cut() + for(var/key in alarm_types_show) + alarm_types_show[key] = 0 + for(var/key in alarm_types_clear) + alarm_types_clear[key] = 0 + /mob/living/silicon/rename_character(oldname, newname) // we actually don't want it changing minds and stuff if(!newname) @@ -283,63 +367,6 @@ if("Disable") to_chat(src, "Sensor augmentations disabled.") -/mob/living/silicon/proc/receive_alarm(var/datum/alarm_handler/alarm_handler, var/datum/alarm/alarm, was_raised) - if(!next_alarm_notice) - next_alarm_notice = world.time + 10 SECONDS - - var/list/alarms = queued_alarms[alarm_handler] - if(was_raised) - // Raised alarms are always set - alarms[alarm] = 1 - else - // Alarms that were raised but then cleared before the next notice are instead removed - if(alarm in alarms) - alarms -= alarm - // And alarms that have only been cleared thus far are set as such - else - alarms[alarm] = -1 - -/mob/living/silicon/proc/process_queued_alarms() - if(next_alarm_notice && (world.time > next_alarm_notice)) - next_alarm_notice = 0 - - var/alarm_raised = 0 - for(var/datum/alarm_handler/AH in queued_alarms) - var/list/alarms = queued_alarms[AH] - var/reported = 0 - for(var/datum/alarm/A in alarms) - if(alarms[A] == 1) - if(!reported) - reported = 1 - to_chat(src, "--- [AH.category] Detected ---") - raised_alarm(A) - - for(var/datum/alarm_handler/AH in queued_alarms) - var/list/alarms = queued_alarms[AH] - var/reported = 0 - for(var/datum/alarm/A in alarms) - if(alarms[A] == -1) - if(!reported) - reported = 1 - to_chat(src, "--- [AH.category] Cleared ---") - to_chat(src, "\The [A.alarm_name()].") - - if(alarm_raised) - to_chat(src, "\[Show Alerts\]") - - for(var/datum/alarm_handler/AH in queued_alarms) - var/list/alarms = queued_alarms[AH] - alarms.Cut() - -/mob/living/silicon/proc/raised_alarm(var/datum/alarm/A) - to_chat(src, "[A.alarm_name()]!") - -/mob/living/silicon/ai/raised_alarm(var/datum/alarm/A) - var/cameratext = "" - for(var/obj/machinery/camera/C in A.cameras()) - cameratext += "[(cameratext == "")? "" : "|"][C.c_tag]" - to_chat(src, "[A.alarm_name()]! ([(cameratext)? cameratext : "No Camera"])") - /mob/living/silicon/adjustToxLoss(var/amount) return STATUS_UPDATE_NONE diff --git a/code/modules/mob/living/silicon/silicon_defense.dm b/code/modules/mob/living/silicon/silicon_defense.dm index e720400abd5..6ac5f8cded2 100644 --- a/code/modules/mob/living/silicon/silicon_defense.dm +++ b/code/modules/mob/living/silicon/silicon_defense.dm @@ -3,11 +3,10 @@ /mob/living/silicon/attack_alien(mob/living/carbon/alien/humanoid/M) if(..()) //if harm or disarm intent - var/damage = rand(10, 20) + var/damage = 20 if(prob(90)) playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1) - visible_message("[M] has slashed at [src]!", \ - "[M] has slashed at [src]!") + visible_message("[M] has slashed at [src]!", "[M] has slashed at [src]!") if(prob(8)) flash_eyes(affect_silicon = 1) add_attack_logs(M, src, "Alien attacked") @@ -64,6 +63,6 @@ else M.do_attack_animation(src, ATTACK_EFFECT_PUNCH) playsound(loc, 'sound/effects/bang.ogg', 10, 1) - visible_message("[M] punches [src], but doesn't leave a dent.", \ - "[M] punches [src], but doesn't leave a dent.!") + visible_message("[M] punches [src], but doesn't leave a dent.", \ + "[M] punches [src], but doesn't leave a dent.") return FALSE diff --git a/code/modules/mob/living/silicon/subsystems.dm b/code/modules/mob/living/silicon/subsystems.dm index d18d41a40cf..65a92d07008 100644 --- a/code/modules/mob/living/silicon/subsystems.dm +++ b/code/modules/mob/living/silicon/subsystems.dm @@ -8,13 +8,11 @@ /mob/living/silicon var/list/silicon_subsystems = list( - /mob/living/silicon/proc/subsystem_alarm_monitor, /mob/living/silicon/proc/subsystem_law_manager ) /mob/living/silicon/ai silicon_subsystems = list( - /mob/living/silicon/proc/subsystem_alarm_monitor, /mob/living/silicon/proc/subsystem_atmos_control, /mob/living/silicon/proc/subsystem_crew_monitor, /mob/living/silicon/proc/subsystem_law_manager, @@ -23,7 +21,6 @@ /mob/living/silicon/robot/drone silicon_subsystems = list( - /mob/living/silicon/proc/subsystem_alarm_monitor, /mob/living/silicon/proc/subsystem_law_manager, /mob/living/silicon/proc/subsystem_power_monitor ) @@ -32,30 +29,11 @@ register_alarms = 0 /mob/living/silicon/proc/init_subsystems() - alarm_monitor = new(src) atmos_control = new(src) crew_monitor = new(src) law_manager = new(src) power_monitor = new(src) - if(!register_alarms) - return - - var/list/register_to = list(SSalarms.atmosphere_alarm, SSalarms.burglar_alarm, SSalarms.camera_alarm, SSalarms.fire_alarm, SSalarms.motion_alarm, SSalarms.power_alarm) - for(var/datum/alarm_handler/AH in register_to) - AH.register(src, /mob/living/silicon/proc/receive_alarm) - queued_alarms[AH] = list() // Makes sure alarms remain listed in consistent order - alarm_handlers |= AH - -/******************** -* Alarm Monitor * -********************/ -/mob/living/silicon/proc/subsystem_alarm_monitor() - set name = "Alarm Monitor" - set category = "Subsystems" - - alarm_monitor.ui_interact(usr, state = GLOB.self_state) - /******************** * Atmos Control * ********************/ diff --git a/code/modules/mob/living/simple_animal/animal_defense.dm b/code/modules/mob/living/simple_animal/animal_defense.dm index b42f3275997..28fff50a124 100644 --- a/code/modules/mob/living/simple_animal/animal_defense.dm +++ b/code/modules/mob/living/simple_animal/animal_defense.dm @@ -42,13 +42,18 @@ /mob/living/simple_animal/attack_alien(mob/living/carbon/alien/humanoid/M) if(..()) //if harm or disarm intent. - var/damage = rand(15, 30) - visible_message("[M] has slashed at [src]!", \ - "[M] has slashed at [src]!") - playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1) - add_attack_logs(M, src, "Alien attacked") - attack_threshold_check(damage) - return + if(M.a_intent == INTENT_DISARM) + playsound(loc, 'sound/weapons/pierce.ogg', 25, TRUE, -1) + visible_message("[M] [response_disarm] [name]!", "[M] [response_disarm] you!") + add_attack_logs(M, src, "Alien disarmed") + else + var/damage = rand(15, 30) + visible_message("[M] has slashed at [src]!", \ + "[M] has slashed at [src]!") + playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1) + add_attack_logs(M, src, "Alien attacked") + attack_threshold_check(damage) + return TRUE /mob/living/simple_animal/attack_larva(mob/living/carbon/alien/larva/L) if(..()) //successful larva bite diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index 024e2b5f304..e18672ffa20 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -474,8 +474,7 @@ return build_step++ to_chat(user, "You complete the Securitron! Beep boop.") - var/mob/living/simple_animal/bot/secbot/S = new /mob/living/simple_animal/bot/secbot - S.forceMove(get_turf(src)) + var/mob/living/simple_animal/bot/secbot/S = new /mob/living/simple_animal/bot/secbot(get_turf(src)) S.name = created_name S.robot_arm = robot_arm qdel(I) @@ -512,7 +511,7 @@ //General Griefsky else if((istype(I, /obj/item/wrench)) && (build_step == 3)) - var/obj/item/griefsky_assembly/A = new /obj/item/griefsky_assembly + var/obj/item/griefsky_assembly/A = new /obj/item/griefsky_assembly(get_turf(src)) user.put_in_hands(A) to_chat(user, "You adjust the arm slots for extra weapons!.") user.unEquip(src, 1) @@ -540,8 +539,7 @@ if(!user.unEquip(I)) return to_chat(user, "You complete General Griefsky!.") - var/mob/living/simple_animal/bot/secbot/griefsky/S = new /mob/living/simple_animal/bot/secbot/griefsky - S.forceMove(get_turf(src)) + new /mob/living/simple_animal/bot/secbot/griefsky(get_turf(src)) qdel(I) qdel(src) @@ -556,8 +554,7 @@ if(!user.unEquip(I)) return to_chat(user, "You complete Genewul Giftskee!.") - var/mob/living/simple_animal/bot/secbot/griefsky/toy/S = new /mob/living/simple_animal/bot/secbot/griefsky/toy - S.forceMove(get_turf(src)) + new /mob/living/simple_animal/bot/secbot/griefsky/toy(get_turf(src)) qdel(I) qdel(src) diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index f1278918898..dbd8ae6033a 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -66,6 +66,7 @@ RegisterSignal(src, COMSIG_CROSSED_MOVABLE, .proc/human_squish_check) /mob/living/simple_animal/bot/mulebot/Destroy() + SStgui.close_uis(wires) unload(0) QDEL_NULL(wires) QDEL_NULL(cell) @@ -142,7 +143,7 @@ if(open) icon_state="mulebot-hatch" else - icon_state = "mulebot[!wires.MobAvoid()]" + icon_state = "mulebot[wires.is_cut(WIRE_MOB_AVOIDANCE)]" overlays.Cut() if(load && !ismob(load))//buckling handles the mob offsets load.pixel_y = initial(load.pixel_y) + 9 @@ -158,9 +159,9 @@ qdel(src) if(2) for(var/i = 1; i < 3; i++) - wires.RandomCut() + wires.cut_random() if(3) - wires.RandomCut() + wires.cut_random() return /mob/living/simple_animal/bot/mulebot/bullet_act(obj/item/projectile/Proj) @@ -169,7 +170,7 @@ unload(0) if(prob(25)) visible_message("Something shorts out inside [src]!") - wires.RandomCut() + wires.cut_random() /mob/living/simple_animal/bot/mulebot/Topic(href, list/href_list) if(..()) @@ -318,7 +319,7 @@ // returns true if the bot has power /mob/living/simple_animal/bot/mulebot/proc/has_power() - return !open && cell && cell.charge > 0 && wires.HasPower() + return !open && cell && cell.charge > 0 && !wires.is_cut(WIRE_MAIN_POWER1) && !wires.is_cut(WIRE_MAIN_POWER2) /mob/living/simple_animal/bot/mulebot/proc/buzz(type) switch(type) @@ -362,7 +363,7 @@ if(istype(AM,/obj/structure/closet/crate)) CRATE = AM else - if(wires.LoadCheck()) + if(!wires.is_cut(WIRE_LOADCHECK)) buzz(SIGH) return // if not hacked, only allow crates to be loaded @@ -459,8 +460,7 @@ on = 0 return if(on) - var/speed = (wires.Motor1() ? 1 : 0) + (wires.Motor2() ? 2 : 0) -// to_chat(world, "speed: [speed]") + var/speed = (wires.is_cut(WIRE_MOTOR1) ? 1 : 0) + (wires.is_cut(WIRE_MOTOR2) ? 2 : 0) var/num_steps = 0 switch(speed) if(0) @@ -624,7 +624,7 @@ // not loaded if(auto_pickup) // find a crate var/atom/movable/AM - if(wires.LoadCheck()) // if hacked, load first unanchored thing we find + if(wires.is_cut(WIRE_LOADCHECK)) // if hacked, load first unanchored thing we find for(var/atom/movable/A in get_step(loc, loaddir)) if(!A.anchored) AM = A @@ -672,7 +672,7 @@ // called when bot bumps into anything /mob/living/simple_animal/bot/mulebot/Bump(atom/obs) - if(!wires.MobAvoid()) // usually just bumps, but if avoidance disabled knock over mobs + if(wires.is_cut(WIRE_MOB_AVOIDANCE)) // usually just bumps, but if avoidance disabled knock over mobs var/mob/M = obs if(ismob(M)) if(istype(M,/mob/living/silicon/robot)) @@ -736,8 +736,8 @@ ..() /mob/living/simple_animal/bot/mulebot/receive_signal(datum/signal/signal) - if(!wires.RemoteRX() || ..()) - return 1 + if(wires.is_cut(WIRE_REMOTE_RX) || ..()) + return TRUE var/recv = signal.data["command"] @@ -772,7 +772,7 @@ // send a radio signal with multiple data key/values /mob/living/simple_animal/bot/mulebot/post_signal_multiple(var/freq, var/list/keyval) - if(!wires.RemoteTX()) + if(wires.is_cut(WIRE_REMOTE_TX)) return ..() @@ -803,7 +803,7 @@ //Update navigation data. Called when commanded to deliver, return home, or a route update is needed... /mob/living/simple_animal/bot/mulebot/proc/get_nav() - if(!on || !wires.BeaconRX()) + if(!on || wires.is_cut(WIRE_BEACON_RX)) return for(var/obj/machinery/navbeacon/NB in GLOB.deliverybeacons) diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index f150005116e..4c2c2332924 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -17,7 +17,7 @@ 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 faction = list("cult") - flying = 1 + flying = TRUE pressure_resistance = 100 universal_speak = 1 AIStatus = AI_OFF //normal constructs don't have AI diff --git a/code/modules/mob/living/simple_animal/friendly/butterfly.dm b/code/modules/mob/living/simple_animal/friendly/butterfly.dm index 9aaffc6ef8f..ebf068ff130 100644 --- a/code/modules/mob/living/simple_animal/friendly/butterfly.dm +++ b/code/modules/mob/living/simple_animal/friendly/butterfly.dm @@ -15,6 +15,7 @@ harm_intent_damage = 1 friendly = "nudges" density = 0 + flying = TRUE pass_flags = PASSTABLE | PASSGRILLE | PASSMOB ventcrawler = 2 mob_size = MOB_SIZE_TINY diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm index 24818d07652..f44244b7eae 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -123,6 +123,7 @@ for(var/mob/living/simple_animal/mouse/M in view(1, src)) if(!M.stat && Adjacent(M)) custom_emote(1, "splats \the [M]!") + M.death() M.splat() movement_target = null stop_automated_movement = 0 diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm index ea8e949f1c7..58e3ad54089 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -126,6 +126,7 @@ gold_core_spawnable = FRIENDLY_SPAWN blood_volume = BLOOD_VOLUME_NORMAL var/obj/item/udder/udder = null + gender = FEMALE /mob/living/simple_animal/cow/Initialize() udder = new() diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index 152e2494132..be3f985db2e 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -80,22 +80,16 @@ icon_resting = "mouse_[mouse_color]_sleep" desc = "It's a small [mouse_color] rodent, often seen hiding in maintenance areas and making a nuisance of itself." -/mob/living/simple_animal/mouse/proc/splat() - src.health = 0 - src.stat = DEAD - src.icon_dead = "mouse_[mouse_color]_splat" - src.icon_state = "mouse_[mouse_color]_splat" - layer = MOB_LAYER - if(client) - client.time_died_as_mouse = world.time - /mob/living/simple_animal/mouse/attack_hand(mob/living/carbon/human/M as mob) if(M.a_intent == INTENT_HELP) get_scooped(M) ..() -/mob/living/simple_animal/mouse/start_pulling(var/atom/movable/AM)//Prevents mouse from pulling things - to_chat(src, "You are too small to pull anything.") +/mob/living/simple_animal/mouse/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE)//Prevents mouse from pulling things + if(istype(AM, /obj/item/reagent_containers/food/snacks/cheesewedge)) + return ..() // Get dem + if(show_message) + to_chat(src, "You are too small to pull anything except cheese.") return /mob/living/simple_animal/mouse/Crossed(AM as mob|obj, oldloc) @@ -110,6 +104,10 @@ desc = "It's toast." death() +/mob/living/simple_animal/mouse/proc/splat() + icon_dead = "mouse_[mouse_color]_splat" + icon_state = "mouse_[mouse_color]_splat" + /mob/living/simple_animal/mouse/death(gibbed) // Only execute the below if we successfully died playsound(src, squeak_sound, 40, 1) diff --git a/code/modules/mob/living/simple_animal/hostile/bat.dm b/code/modules/mob/living/simple_animal/hostile/bat.dm index be04fc217e9..b47b0eb1f23 100644 --- a/code/modules/mob/living/simple_animal/hostile/bat.dm +++ b/code/modules/mob/living/simple_animal/hostile/bat.dm @@ -16,6 +16,7 @@ maxHealth = 20 health = 20 mob_size = MOB_SIZE_TINY + flying = TRUE harm_intent_damage = 8 melee_damage_lower = 10 melee_damage_upper = 10 diff --git a/code/modules/mob/living/simple_animal/hostile/bees.dm b/code/modules/mob/living/simple_animal/hostile/bees.dm index 3276416fe7f..3419279ffe5 100644 --- a/code/modules/mob/living/simple_animal/hostile/bees.dm +++ b/code/modules/mob/living/simple_animal/hostile/bees.dm @@ -95,6 +95,10 @@ for(var/mob/A in searched_for) . += A +// All bee sprites are made up of overlays. They do not have any special sprite overlays for items placed on them, such as collars, so this proc is unneeded. +/mob/living/simple_animal/hostile/poison/bees/regenerate_icons() + return + /mob/living/simple_animal/hostile/poison/bees/proc/generate_bee_visuals() overlays.Cut() diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index b8c72d7cf84..2f97001d3ae 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -241,6 +241,14 @@ Difficulty: Very Hard AT.pixel_y += random_y return ..() +/mob/living/simple_animal/hostile/megafauna/colossus/float(on) //we don't want this guy to float, messes up his animations + if(throwing) + return + if(on && !floating) + floating = TRUE + else if(!on && floating) + floating = FALSE + /obj/item/projectile/colossus name ="death bolt" icon_state= "chronobolt" diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/fish.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/fish.dm index f44e6c1f88a..ca6987d735c 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/fish.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/fish.dm @@ -26,21 +26,34 @@ flying = 1 var/carp_color = "carp" //holder for icon set - var/list/icon_sets = list("carp", "blue", "yellow", "grape", "rust", "teal", "purple") + var/static/list/carp_colors = list(\ + "lightpurple" = "#c3b9f1", \ + "lightpink" = "#da77a8", \ + "green" = "#70ff25", \ + "grape" = "#df0afb", \ + "swamp" = "#e5e75a", \ + "turquoise" = "#04e1ed", \ + "brown" = "#ca805a", \ + "teal" = "#20e28e", \ + "lightblue" = "#4d88cc", \ + "rusty" = "#dd5f34", \ + "beige" = "#bbaeaf", \ + "yellow" = "#f3ca4a", \ + "blue" = "#09bae1", \ + "palegreen" = "#7ef099", \ + ) /mob/living/simple_animal/hostile/retaliate/carp/Initialize(mapload) . = ..() carp_randomify() update_icons() -/mob/living/simple_animal/hostile/retaliate/carp/proc/carp_randomify() - if(prob(1)) - carp_color = pick("white", "black") - else - carp_color = pick(icon_sets) - icon_state = "[carp_color]" - icon_living = "[carp_color]" - icon_dead = "[carp_color]_dead" +/mob/living/simple_animal/hostile/retaliate/carp/proc/carp_randomify(rarechance) + // Simplified version of: /mob/living/simple_animal/hostile/carp/proc/carp_randomify(rarechance) + var/our_color + our_color = pick(carp_colors) + add_atom_colour(carp_colors[our_color], FIXED_COLOUR_PRIORITY) + regenerate_icons() /mob/living/simple_animal/hostile/retaliate/carp/koi name = "space koi" @@ -61,13 +74,15 @@ maxbodytemp = 1500 gold_core_spawnable = HOSTILE_SPAWN + var/randomize_icon = TRUE /mob/living/simple_animal/hostile/retaliate/carp/koi/Initialize(mapload) . = ..() - var/koinum = rand(1, 4) - icon_state = "koi[koinum]" - icon_living = "koi[koinum]" - icon_dead = "koi[koinum]-dead" + if(randomize_icon) + var/koinum = rand(1, 4) + icon_state = "koi[koinum]" + icon_living = "koi[koinum]" + icon_dead = "koi[koinum]-dead" /mob/living/simple_animal/hostile/retaliate/carp/koi/Process_Spacemove(var/movement_dir) return TRUE @@ -76,3 +91,4 @@ icon_state = "koi5" icon_living = "koi5" icon_dead = "koi5-dead" + randomize_icon = FALSE diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/undead.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/undead.dm index a3e32e9d35e..5d946662854 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/undead.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/undead.dm @@ -46,6 +46,7 @@ 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 + flying = TRUE pressure_resistance = 300 gold_core_spawnable = NO_SPAWN //too spooky for science faction = list("undead") // did I mention ghost diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm index decfc7146cf..f992bb3cc10 100644 --- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm +++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm @@ -362,7 +362,7 @@ 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 mob_size = MOB_SIZE_TINY - flying = 1 + flying = TRUE bubble_icon = "syndibot" gold_core_spawnable = HOSTILE_SPAWN del_on_death = 1 diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/green.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/green.dm index e7daced65ff..1946f1a32ee 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/green.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/green.dm @@ -51,6 +51,10 @@ if(!(eggtype in eggtypes)) to_chat(src, "Unrecognized egg type.") return 0 + if(fed < feedings_to_lay) + // We have to check this again after the popup, to account for people spam-clicking the button, then doing all the popups at once. + to_chat(src, "You must wrap more humanoid prey before you can do this!") + return visible_message("[src] lays a cluster of eggs.") if(eggtype == TS_DESC_RED) DoLayTerrorEggs(/mob/living/simple_animal/hostile/poison/terror_spider/red, 1) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/princess.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/princess.dm index 047219a151b..6f33c51b246 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/princess.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/princess.dm @@ -15,7 +15,7 @@ ai_target_method = TS_DAMAGE_SIMPLE icon_state = "terror_princess1" icon_living = "terror_princess1" - icon_dead = "terror_princess_dead1" + icon_dead = "terror_princess1_dead" maxHealth = 150 health = 150 regen_points_per_hp = 1 // always regens very fast @@ -51,7 +51,7 @@ if(fed == 0) icon_state = "terror_princess1" icon_living = "terror_princess1" - icon_dead = "terror_princess_dead1" + icon_dead = "terror_princess1_dead" desc = "An enormous spider. It looks strangely cute and fluffy, with soft pink fur covering most of its body." else if(fed == 1) icon_state = "terror_princess2" 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 bf3c98bb86a..4b18626a687 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 @@ -287,6 +287,10 @@ if(eggtype == null || numlings == null) to_chat(src, "Cancelled.") return + if(canlay < numlings) + // We have to check this again after the popups, to account for people spam-clicking the button, then doing all the popups at once. + to_chat(src, "Too soon to do this again!") + return canlay -= numlings eggslaid += numlings if(eggtype == TS_DESC_RED) diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 41786017ea2..8d6db8ade3c 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -86,6 +86,7 @@ //Parrots are kleptomaniacs. This variable ... stores the item a parrot is holding. var/obj/item/held_item = null + flying = TRUE gold_core_spawnable = FRIENDLY_SPAWN @@ -710,7 +711,7 @@ ears.talk_into(src, message_pieces, message_mode, verb) used_radios += ears -/mob/living/simple_animal/parrot/hear_say(list/message_pieces, verb = "says", italics = 0, mob/speaker = null, sound/speech_sound, sound_vol, sound_frequency) +/mob/living/simple_animal/parrot/hear_say(list/message_pieces, verb = "says", italics = 0, mob/speaker = null, sound/speech_sound, sound_vol, sound_frequency, use_voice = TRUE) if(speaker != src && prob(50)) parrot_hear(html_decode(multilingual_to_message(message_pieces))) ..() diff --git a/code/modules/mob/living/simple_animal/posessed_object.dm b/code/modules/mob/living/simple_animal/posessed_object.dm index c3cb61d5970..729790d098c 100644 --- a/code/modules/mob/living/simple_animal/posessed_object.dm +++ b/code/modules/mob/living/simple_animal/posessed_object.dm @@ -32,8 +32,9 @@ animate_ghostly_presence(src, -1, 20, 1) // Restart the floating animation after the attack animation, as it will be cancelled. -/mob/living/simple_animal/possessed_object/start_pulling(var/atom/movable/AM) // Silly motherfuckers think they can pull things. - to_chat(src, "You are unable to pull [AM]!") +/mob/living/simple_animal/possessed_object/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE) // Silly motherfuckers think they can pull things. + if(show_message) + to_chat(src, "You are unable to pull [AM]!") /mob/living/simple_animal/possessed_object/ghost() // Ghosting will return the object to normal, and will not disqualify the ghoster from various mid-round antag positions. diff --git a/code/modules/mob/living/simple_animal/shade.dm b/code/modules/mob/living/simple_animal/shade.dm index 663838d3a45..1e3c723b278 100644 --- a/code/modules/mob/living/simple_animal/shade.dm +++ b/code/modules/mob/living/simple_animal/shade.dm @@ -24,6 +24,7 @@ status_flags = 0 faction = list("cult") status_flags = CANPUSH + flying = TRUE loot = list(/obj/item/reagent_containers/food/snacks/ectoplasm) del_on_death = 1 deathmessage = "lets out a contented sigh as their form unwinds." diff --git a/code/modules/mob/living/simple_animal/slime/say.dm b/code/modules/mob/living/simple_animal/slime/say.dm index 74241dc676c..8679d64a699 100644 --- a/code/modules/mob/living/simple_animal/slime/say.dm +++ b/code/modules/mob/living/simple_animal/slime/say.dm @@ -9,7 +9,7 @@ return verb -/mob/living/simple_animal/slime/hear_say(list/message_pieces, verb = "says", italics = 0, mob/speaker = null, sound/speech_sound, sound_vol, sound_frequency) +/mob/living/simple_animal/slime/hear_say(list/message_pieces, verb = "says", italics = 0, mob/speaker = null, sound/speech_sound, sound_vol, sound_frequency, use_voice = TRUE) if(speaker != src && !stat) if(speaker in Friends) speech_buffer = list() diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index 15f483bef76..1b67b53119a 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -265,7 +265,7 @@ /mob/living/simple_animal/slime/unEquip(obj/item/I, force) return -/mob/living/simple_animal/slime/start_pulling(atom/movable/AM, state, force = move_force, supress_message = FALSE) +/mob/living/simple_animal/slime/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE) return /mob/living/simple_animal/slime/attack_ui(slot) diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index 7cd2b4414f7..ce266ba5b8f 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -141,18 +141,6 @@ if(updating && val_change) update_canmove() -/mob/living/proc/StartFlying() - var/val_change = !flying - flying = TRUE - if(val_change) - update_animations() - -/mob/living/proc/StopFlying() - var/val_change = !!flying - flying = FALSE - if(val_change) - update_animations() - // SCALAR STATUS EFFECTS diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index 5345bda5b94..c222f76eadb 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -28,6 +28,7 @@ /mob/Login() GLOB.player_list |= src + last_known_ckey = ckey update_Login_details() world.update_status() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 3b86faeb7e6..848606be3ec 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -19,7 +19,6 @@ for(var/datum/alternate_appearance/AA in viewing_alternate_appearances) AA.viewers -= src viewing_alternate_appearances = null - logs.Cut() LAssailant = null return ..() @@ -578,6 +577,8 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ changeNext_move(CLICK_CD_POINT) var/obj/P = new /obj/effect/temp_visual/point(tile) P.invisibility = invisibility + P.pixel_x = A.pixel_x + P.pixel_y = A.pixel_y return 1 /mob/proc/ret_grab(obj/effect/list_container/mobl/L as obj, flag) @@ -880,6 +881,9 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ return if(!Adjacent(usr)) return + if(IsFrozen(src) && !is_admin(usr)) + to_chat(usr, "Interacting with admin-frozen players is not permitted.") + return if(isLivingSSD(src) && M.client && M.client.send_ssd_warning(src)) return show_inv(usr) @@ -1235,10 +1239,13 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ create_log_in_list(debug_log, text, collapse, world.timeofday) /mob/proc/create_log(log_type, what, target = null, turf/where = get_turf(src)) - LAZYINITLIST(logs[log_type]) - var/list/log_list = logs[log_type] + if(!ckey) + return + var/real_ckey = ckey + if(ckey[1] == "@") // Admin aghosting will do this + real_ckey = copytext(ckey, 2) var/datum/log_record/record = new(log_type, src, what, target, where, world.time) - log_list.Add(record) + GLOB.logging.add_log(real_ckey, record) /proc/create_log_in_list(list/target, text, collapse = TRUE, last_log)//forgive me code gods for this shitcode proc //this proc enables lovely stuff like an attack log that looks like this: "[18:20:29-18:20:45]21x John Smith attacked Andrew Jackson with a crowbar." diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 1477be47d89..80404460b50 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -36,7 +36,7 @@ var/list/attack_log_old = list( ) var/list/debug_log = null - var/list/logs = list() // Logs for each log type defined in __DEFINES/logs.dm + var/last_known_ckey = null // Used in logging var/last_log = 0 var/obj/machinery/machine = null diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 5fb5bcb06c8..ff01fbe5cc9 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -113,7 +113,7 @@ var/question = "Do you want to play as [M.real_name ? M.real_name : M.name][M.job ? " ([M.job])" : ""]" if(alert("Do you want to show the antag status?","Show antag status","Yes","No") == "Yes") question += ", [M.mind?.special_role ? M.mind?.special_role : "No special role"]" - var/list/mob/dead/observer/candidates = pollCandidates("[question]?", poll_time = 100, min_hours = minhours) + var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("[question]?", poll_time = 10 SECONDS, min_hours = minhours, source = M) var/mob/dead/observer/theghost = null if(LAZYLEN(candidates)) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 4797c685fe1..0325d13faf0 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -369,8 +369,9 @@ step(pulling, get_dir(pulling.loc, A)) return -/mob/proc/update_gravity() +/mob/proc/update_gravity(has_gravity) return + /client/proc/check_has_body_select() return mob && mob.hud_used && mob.hud_used.zone_select && istype(mob.hud_used.zone_select, /obj/screen/zone_sel) diff --git a/code/modules/mob/new_player/poll.dm b/code/modules/mob/new_player/poll.dm index 19893819e0c..2e109d36d34 100644 --- a/code/modules/mob/new_player/poll.dm +++ b/code/modules/mob/new_player/poll.dm @@ -90,7 +90,7 @@ if(adminonly) question = "(Admin only poll) " + question - var output = "" + var/output = "" if(polltype == POLLTYPE_MULTI || polltype == POLLTYPE_OPTION) select_query = GLOB.dbcon.NewQuery("SELECT text, percentagecalc, (SELECT COUNT(optionid) FROM [format_table_name("poll_vote")] WHERE optionid = poll_option.id GROUP BY optionid) AS votecount FROM [format_table_name("poll_option")] WHERE pollid = [pollid]") select_query.Execute() diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index 0417e28f546..7a26de718b6 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -44,17 +44,27 @@ usr.emote(message) -/mob/proc/say_dead(var/message) - if(!(client && client.holder)) - if(!config.dsay_allowed) - to_chat(src, "Deadchat is globally muted.") +/mob/proc/say_dead(message) + if(client) + if(!client.holder) + if(!config.dsay_allowed) + to_chat(src, "Deadchat is globally muted.") + return + + if(client.prefs.muted & MUTE_DEADCHAT) + to_chat(src, "You cannot talk in deadchat (muted).") return - if(client && !(client.prefs.toggles & CHAT_DEAD)) - to_chat(usr, "You have deadchat muted.") - return + if(!(client.prefs.toggles & CHAT_DEAD)) + to_chat(src, "You have deadchat muted.") + return + + if(client.handle_spam_prevention(message, MUTE_DEADCHAT)) + return say_dead_direct("[pick("complains", "moans", "whines", "laments", "blubbers", "salts")], \"[message]\"", src) + create_log(DEADCHAT_LOG, message) + log_ghostsay(message, src) /mob/proc/say_understands(var/mob/other, var/datum/language/speaking = null) if(stat == DEAD) diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 8e7adea666b..d151a98309f 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -44,26 +44,37 @@ -//human -> robot -/mob/living/carbon/human/proc/Robotize() +/** + For transforming humans into robots (cyborgs). + + Arguments: + * cell_type: A type path of the cell the new borg should receive. + * connect_to_default_AI: TRUE if you want /robot/New() to handle connecting the borg to the AI with the least borgs. + * AI: A reference to the AI we want to connect to. +*/ +/mob/living/carbon/human/proc/Robotize(cell_type = null, connect_to_default_AI = TRUE, mob/living/silicon/ai/AI = null) if(notransform) return for(var/obj/item/W in src) unEquip(W) - regenerate_icons() + notransform = 1 canmove = 0 icon = null invisibility = 101 - for(var/t in bodyparts) - qdel(t) - for(var/i in internal_organs) - qdel(i) - var/mob/living/silicon/robot/O = new /mob/living/silicon/robot( loc ) + // Creating a new borg here will connect them to a default AI and notify that AI, if `connect_to_default_AI` is TRUE. + var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(loc, connect_to_AI = connect_to_default_AI) - // cyborgs produced by Robotize get an automatic power cell - O.cell = new /obj/item/stock_parts/cell/high(O) + // If `AI` is passed in, we want to connect to that AI specifically. + if(AI) + O.lawupdate = TRUE + O.connect_to_ai(AI) + + if(!cell_type) + O.cell = new /obj/item/stock_parts/cell/high(O) + else + O.cell = new cell_type(O) O.gender = gender O.invisibility = 0 @@ -77,9 +88,8 @@ else O.key = key - O.loc = loc + O.forceMove(loc) O.job = "Cyborg" - O.notify_ai(1) if(O.mind && O.mind.assigned_role == "Cyborg") if(O.mind.role_alt_title == "Robot") diff --git a/code/modules/mob/update_status.dm b/code/modules/mob/update_status.dm index 1708bcfb7a2..b603fc5974e 100644 --- a/code/modules/mob/update_status.dm +++ b/code/modules/mob/update_status.dm @@ -55,12 +55,6 @@ // Procs that update other things about the mob -// Does various animations - Jitter, Flying, Spinning -/mob/proc/update_animations() - if(flying) - animate(src, pixel_y = pixel_y + 5 , time = 10, loop = 1, easing = SINE_EASING) - animate(pixel_y = pixel_y - 5, time = 10, loop = 1, easing = SINE_EASING) - /mob/proc/update_stat() return diff --git a/code/modules/modular_computers/computers/machinery/console_presets.dm b/code/modules/modular_computers/computers/machinery/console_presets.dm index 4f1bd269337..a2357fd9ebe 100644 --- a/code/modules/modular_computers/computers/machinery/console_presets.dm +++ b/code/modules/modular_computers/computers/machinery/console_presets.dm @@ -35,7 +35,7 @@ /obj/machinery/modular_computer/console/preset/engineering/install_programs() var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD] hard_drive.store_file(new/datum/computer_file/program/power_monitor()) - hard_drive.store_file(new/datum/computer_file/program/alarm_monitor()) +// hard_drive.store_file(new/datum/computer_file/program/alarm_monitor()) //TO-DO:TGUI--Uncomment Modular computers hard_drive.store_file(new/datum/computer_file/program/supermatter_monitor()) // ===== RESEARCH CONSOLE ===== 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 b85fb710e38..cae4b5ed2e2 100644 --- a/code/modules/modular_computers/file_system/programs/command/card.dm +++ b/code/modules/modular_computers/file_system/programs/command/card.dm @@ -222,7 +222,7 @@ if(is_authenticated(usr) && modify) var/t1 = href_list["assign_target"] if(t1 == "Custom") - var/temp_t = sanitize(copytext(input("Enter a custom job assignment.","Assignment"),1,MAX_MESSAGE_LEN)) + var/temp_t = sanitize(reject_bad_name(copytext(input("Enter a custom job assignment.", "Assignment"), 1, MAX_MESSAGE_LEN), TRUE)) //let custom jobs function as an impromptu alt title, mainly for sechuds if(temp_t && modify) SSjobs.log_job_transfer(modify.registered_name, modify.getRankAndAssignment(), temp_t, scan.registered_name) @@ -251,7 +251,8 @@ message_admins("[key_name_admin(usr)] has reassigned \"[modify.registered_name]\" from \"[jobnamedata]\" to \"[t1]\".") SSjobs.log_job_transfer(modify.registered_name, jobnamedata, t1, scan.registered_name) - SSjobs.slot_job_transfer(modify.rank, t1) + if(modify.owner_uid) + SSjobs.slot_job_transfer(modify.rank, t1) var/mob/living/carbon/human/H = modify.getPlayer() if(istype(H)) @@ -266,7 +267,7 @@ if("PRG_reg") if(is_authenticated(usr)) - var/temp_name = reject_bad_name(href_list["reg"]) + var/temp_name = reject_bad_name(href_list["reg"], TRUE) if(temp_name) modify.registered_name = temp_name else @@ -290,6 +291,8 @@ if(is_authenticated(usr)) var/delcount = SSjobs.delete_log_records(scan.registered_name, TRUE) if(delcount) + message_admins("[key_name_admin(usr)] has wiped all ID computer logs.") + usr.create_log(MISC_LOG, "wiped all ID computer logs.") playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0) if("PRG_print") @@ -331,9 +334,14 @@ 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]\".") + var/reason = sanitize(copytext(input("Enter legal reason for termination. Enter nothing to cancel.", "Employment Termination"), 1, MAX_MESSAGE_LEN)) + if(!reason || !is_authenticated(usr) || !modify) + return + log_game("[key_name(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\" for: \"[reason]\".") + message_admins("[key_name_admin(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\" for: \"[reason]\".") + usr.create_log(MISC_LOG, "terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\"") SSjobs.log_job_transfer(modify.registered_name, jobnamedata, "Terminated", scan.registered_name) + SSjobs.notify_dept_head(modify.rank, "[scan.registered_name] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\" for \"[reason]\".") modify.assignment = "Terminated" modify.access = list() 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 8cb47337a6d..2f2f4a08232 100644 --- a/code/modules/modular_computers/file_system/programs/engineering/alarm.dm +++ b/code/modules/modular_computers/file_system/programs/engineering/alarm.dm @@ -7,65 +7,71 @@ requires_ntnet = 1 network_destination = "alarm monitoring network" size = 5 - var/list/datum/alarm_handler/alarm_handlers + var/tgui_id = "NtosStationAlertConsole" + var/ui_x = 315 + var/ui_y = 500 + var/has_alert = 0 + var/list/alarms_listend_for = list("Fire", "Atmosphere", "Power") -/datum/computer_file/program/alarm_monitor/New() +/datum/computer_file/program/alarm_monitor/process_tick() ..() - alarm_handlers = list(SSalarms.atmosphere_alarm, SSalarms.fire_alarm, SSalarms.power_alarm) - for(var/datum/alarm_handler/AH in alarm_handlers) - AH.register(src, /datum/computer_file/program/alarm_monitor/proc/update_icon) -/datum/computer_file/program/alarm_monitor/Destroy() - for(var/datum/alarm_handler/AH in alarm_handlers) - AH.unregister(src) - QDEL_NULL(alarm_handlers) - return ..() + if(has_alert) + program_icon_state = "alert-red" + ui_header = "alarm_red.gif" + update_computer_icon() + else + program_icon_state = "alert-green" + ui_header = "alarm_green.gif" + update_computer_icon() + return TRUE -/datum/computer_file/program/alarm_monitor/proc/update_icon() - for(var/datum/alarm_handler/AH in alarm_handlers) - if(AH.has_major_alarms()) - program_icon_state = "alert-red" - ui_header = "alarm_red.gif" - update_computer_icon() - return 1 - program_icon_state = "alert-green" - ui_header = "alarm_green.gif" - update_computer_icon() - 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 = 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) - ui = new(user, src, ui_key, "alarm_monitor.tmpl", "Alarm Monitoring", 575, 700) - ui.set_auto_update(1) - ui.set_layout_key("program") - ui.open() - -/datum/computer_file/program/alarm_monitor/ui_data(mob/user) +/datum/computer_file/program/alarm_monitor/tgui_data(mob/user) var/list/data = get_header_data() - var/categories[0] - for(var/datum/alarm_handler/AH in alarm_handlers) - categories[++categories.len] = list("category" = AH.category, "alarms" = list()) - for(var/datum/alarm/A in AH.major_alarms()) - var/cameras[0] - var/lost_sources[0] - - if(isAI(user)) - for(var/obj/machinery/camera/C in A.cameras()) - cameras[++cameras.len] = C.nano_structure() - for(var/datum/alarm_source/AS in A.sources) - if(!AS.source) - lost_sources[++lost_sources.len] = AS.source_name - - categories[categories.len]["alarms"] += list(list( - "name" = sanitize(A.alarm_name()), - "origin_lost" = A.origin == null, - "has_cameras" = cameras.len, - "cameras" = cameras, - "lost_sources" = lost_sources.len ? sanitize(english_list(lost_sources, nothing_text = "", and_text = ", ")) : "")) - data["categories"] = categories + data["alarms"] = list() + for(var/class in SSalarm.alarms) + if(!(class in alarms_listend_for)) + continue + data["alarms"][class] = list() + for(var/area in alarms[class]) + data["alarms"][class] += area return data + +/datum/computer_file/program/alarm_monitor/proc/alarm_triggered(src, class, area/A, list/O, obj/alarmsource) + if(is_station_level(alarmsource.z)) + if(!(A.type in GLOB.the_station_areas)) + return + else if(!is_mining_level(alarmsource.z) || istype(A, /area/ruin)) + return + update_alarm_display() + +/datum/computer_file/program/alarm_monitor/proc/alarm_cancelled(src, class, area/A, obj/origin, cleared) + if(is_station_level(origin.z)) + if(!(A.type in GLOB.the_station_areas)) + return + else if(!is_mining_level(origin.z) || istype(A, /area/ruin)) + return + update_alarm_display() + +/datum/computer_file/program/alarm_monitor/proc/update_alarm_display() + has_alert = FALSE + for(var/cat in alarms) + if(!(cat in alarms_listend_for)) + continue + var/list/L = alarms[cat] + if(length(L)) + has_alert = TRUE + +/datum/computer_file/program/alarm_monitor/run_program(mob/user) + . = ..(user) + GLOB.alarmdisplay += src + RegisterSignal(SSalarm, COMSIG_TRIGGERED_ALARM, .proc/alarm_triggered) + RegisterSignal(SSalarm, COMSIG_CANCELLED_ALARM, .proc/alarm_cancelled) + +/datum/computer_file/program/alarm_monitor/kill_program(forced = FALSE) + GLOB.alarmdisplay -= src + UnregisterSignal(SSalarm, COMSIG_TRIGGERED_ALARM) + UnregisterSignal(SSalarm, COMSIG_CANCELLED_ALARM) + ..() diff --git a/code/modules/nano/modules/alarm_monitor.dm b/code/modules/nano/modules/alarm_monitor.dm deleted file mode 100644 index cee3820b102..00000000000 --- a/code/modules/nano/modules/alarm_monitor.dm +++ /dev/null @@ -1,90 +0,0 @@ -/datum/nano_module/alarm_monitor - name = "Alarm monitor" - var/list_cameras = 0 // Whether or not to list camera references. A future goal would be to merge this with the enginering/security camera console. Currently really only for AI-use. - var/list/datum/alarm_handler/alarm_handlers // The particular list of alarm handlers this alarm monitor should present to the user. - -/datum/nano_module/alarm_monitor/all/New() - ..() - alarm_handlers = list(SSalarms.atmosphere_alarm, SSalarms.burglar_alarm, SSalarms.camera_alarm, SSalarms.fire_alarm, SSalarms.motion_alarm, SSalarms.power_alarm) - -/datum/nano_module/alarm_monitor/engineering/New() - ..() - alarm_handlers = list(SSalarms.atmosphere_alarm, SSalarms.fire_alarm, SSalarms.power_alarm) - -/datum/nano_module/alarm_monitor/security/New() - ..() - alarm_handlers = list(SSalarms.burglar_alarm, SSalarms.camera_alarm, SSalarms.motion_alarm) - -/datum/nano_module/alarm_monitor/proc/register(var/object, var/procName) - for(var/datum/alarm_handler/AH in alarm_handlers) - AH.register(object, procName) - -/datum/nano_module/alarm_monitor/proc/unregister(var/object) - for(var/datum/alarm_handler/AH in alarm_handlers) - AH.unregister(object) - -/datum/nano_module/alarm_monitor/proc/all_alarms() - var/list/all_alarms = new() - for(var/datum/alarm_handler/AH in alarm_handlers) - all_alarms += AH.alarms - - return all_alarms - -/datum/nano_module/alarm_monitor/proc/major_alarms() - var/list/all_alarms = new() - for(var/datum/alarm_handler/AH in alarm_handlers) - all_alarms += AH.major_alarms() - - return all_alarms - -/datum/nano_module/alarm_monitor/proc/minor_alarms() - var/list/all_alarms = new() - for(var/datum/alarm_handler/AH in alarm_handlers) - all_alarms += AH.minor_alarms() - - return all_alarms - -/datum/nano_module/alarm_monitor/Topic(ref, href_list) - if(..()) - return 1 - if(href_list["switchTo"]) - var/obj/machinery/camera/C = locate(href_list["switchTo"]) in GLOB.cameranet.cameras - if(!C || !isAI(usr)) - return - - usr.switch_to_camera(C) - 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 = GLOB.default_state) - 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() - ui.set_auto_update(1) - -/datum/nano_module/alarm_monitor/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.default_state) - var/data[0] - - var/categories[0] - for(var/datum/alarm_handler/AH in alarm_handlers) - categories[++categories.len] = list("category" = AH.category, "alarms" = list()) - for(var/datum/alarm/A in AH.major_alarms()) - var/cameras[0] - var/lost_sources[0] - - if(isAI(user)) - for(var/obj/machinery/camera/C in A.cameras()) - cameras[++cameras.len] = C.nano_structure() - for(var/datum/alarm_source/AS in A.sources) - if(!AS.source) - lost_sources[++lost_sources.len] = AS.source_name - - categories[categories.len]["alarms"] += list(list( - "name" = sanitize(A.alarm_name()), - "origin_lost" = A.origin == null, - "has_cameras" = cameras.len, - "cameras" = cameras, - "lost_sources" = lost_sources.len ? sanitize(english_list(lost_sources, nothing_text = "", and_text = ", ")) : "")) - data["categories"] = categories - - return data diff --git a/code/modules/ninja/suit/suit_initialisation.dm b/code/modules/ninja/suit/suit_initialisation.dm index 59303b4707c..b9200d0e771 100644 --- a/code/modules/ninja/suit/suit_initialisation.dm +++ b/code/modules/ninja/suit/suit_initialisation.dm @@ -14,30 +14,30 @@ suitBusy = 1 if(suitActive && (alert("Confirm suit systems shutdown? This cannot be halted once it has started.", "Confirm Shutdown", "Yes", "No") == "Yes")) - to_chat(usr, "Now de-initializing...") + to_chat(usr, "Now de-initializing...") sleep(15) - to_chat(usr, "Logging off, [usr.real_name]. Shutting down SpiderOS.") + to_chat(usr, "Logging off, [usr.real_name]. Shutting down SpiderOS.") sleep(10) - to_chat(usr, "Primary system status: OFFLINE.\nBackup system status: OFFLINE.") + to_chat(usr, "Primary system status: OFFLINE.\nBackup system status: OFFLINE.") sleep(5) - to_chat(usr, "VOID-shift device status: OFFLINE.\nCLOAK-tech device status: OFFLINE.") + to_chat(usr, "VOID-shift device status: OFFLINE.\nCLOAK-tech device status: OFFLINE.") //TODO: Shut down any active abilities sleep(10) - to_chat(usr, "Disconnecting neural-net interface... Success.") + to_chat(usr, "Disconnecting neural-net interface... Success.") QDEL_NULL(usr.hud_used) usr.create_mob_hud() usr.regenerate_icons() sleep(5) - to_chat(usr, "Disengaging neural-net interface... Success.") + to_chat(usr, "Disengaging neural-net interface... Success.") sleep(10) - to_chat(usr, "Unsecuring external locking mechanism...\nNeural-net abolished.\nOperation status: FINISHED.") + to_chat(usr, "Unsecuring external locking mechanism...\nNeural-net abolished.\nOperation status: FINISHED.") //TODO: Grant verbs toggle_suit_lock(usr) usr.regenerate_icons() @@ -45,24 +45,24 @@ suitActive = 0 else if(!suitActive) // Activate the suit. - to_chat(usr, "Now initializing...") + to_chat(usr, "Now initializing...") sleep(15) - to_chat(usr, "Now establishing neural-net interface...") + to_chat(usr, "Now establishing neural-net interface...") if(usr.mind.special_role != "Ninja") to_chat(usr, "FĆAL �Rr�R: ŧer nt recgnized, c-cntr-r䣧-ç äcked.") return sleep(10) - to_chat(usr, "Neural-net established. Now monitoring brainwave pattern. \nBrainwave pattern GREEN, proceeding.") + to_chat(usr, "Neural-net established. Now monitoring brainwave pattern. \nBrainwave pattern GREEN, proceeding.") sleep(10) - to_chat(usr, "Securing external locking mechanism...") + to_chat(usr, "Securing external locking mechanism...") if(!toggle_suit_lock(usr)) return sleep(5) - to_chat(usr, "Suit secured, extending neural-net interface...") + to_chat(usr, "Suit secured, extending neural-net interface...") QDEL_NULL(usr.hud_used) usr.hud_used = new /datum/hud/human(usr, 'icons/mob/screen_ninja.dmi', "#ffffff", 255) @@ -71,22 +71,22 @@ usr.regenerate_icons() sleep(10) - to_chat(usr, "VOID-shift device status: ONLINE.\nCLOAK-tech device status:ONLINE") + to_chat(usr, "VOID-shift device status: ONLINE.\nCLOAK-tech device status:ONLINE") sleep(5) - to_chat(usr, "Primary system status: ONLINE.\nBackup system status: ONLINE.") + to_chat(usr, "Primary system status: ONLINE.\nBackup system status: ONLINE.") if(suitCell) - to_chat(usr, "Current energy capacity: [suitCell.charge]/[suitCell.maxcharge].") + to_chat(usr, "Current energy capacity: [suitCell.charge]/[suitCell.maxcharge].") sleep(10) - to_chat(usr, "All systems operational. Welcome to SpiderOS, [usr.real_name].") + to_chat(usr, "All systems operational. Welcome to SpiderOS, [usr.real_name].") //TODO: Grant ninja verbs here. suitBusy = 0 suitActive = 1 else suitBusy = 0 - to_chat(usr, "NOTICE: Suit de-activation protocals aborted.") + to_chat(usr, "NOTICE: Suit de-activation protocals aborted.") else to_chat(usr, "FĆAL �Rr�R: ŧer nt recgnized, c-cntr-r䣧-ç äcked.") return diff --git a/code/modules/paperwork/ticketmachine.dm b/code/modules/paperwork/ticketmachine.dm index c5939c392b1..0492d3da694 100644 --- a/code/modules/paperwork/ticketmachine.dm +++ b/code/modules/paperwork/ticketmachine.dm @@ -7,6 +7,7 @@ icon_state = "ticketmachine" desc = "A marvel of bureaucratic engineering encased in an efficient plastic shell. It can be refilled with a hand labeler refill roll and linked to buttons with a multitool." density = FALSE + anchored = TRUE maptext_height = 26 maptext_width = 32 maptext_x = 7 @@ -108,7 +109,7 @@ maptext_x = 10 if(100) maptext_x = 8 - maptext = "[current_number]" //Finally, apply the maptext + maptext = "[ticket_number]" /obj/machinery/ticket_machine/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/hand_labeler_refill)) @@ -151,8 +152,8 @@ to_chat(user, "You take a ticket from [src], looks like you're ticket number #[ticket_number]...") var/obj/item/ticket_machine_ticket/theirticket = new /obj/item/ticket_machine_ticket(get_turf(src)) theirticket.name = "Ticket #[ticket_number]" - theirticket.maptext = "[ticket_number]" - theirticket.saved_maptext = "[ticket_number]" + theirticket.maptext = "[ticket_number]" + theirticket.saved_maptext = "[ticket_number]" theirticket.ticket_number = ticket_number theirticket.source = src theirticket.owner = user.UID() @@ -167,9 +168,13 @@ user.adjust_fire_stacks(1) user.IgniteMob() +// Stop AI penetrating the bureaucracy +/obj/machinery/ticket_machine/attack_ai(mob/user) + return + /obj/item/ticket_machine_ticket name = "Ticket" - desc = "A ticket which shows your place in the Head of Personnel's line. Made from Nanotrasen patented NanoPaper®. Though solid, its form seems to shimmer slightly. Feels (and burns) just like the real thing." + desc = "A ticket which shows your place in the Head of Personnel's line. Made from Nanotrasen patented NanoPaper. Though solid, its form seems to shimmer slightly. Feels (and burns) just like the real thing." icon = 'icons/obj/bureaucracy.dmi' icon_state = "ticket" maptext_x = 7 diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 409abe3d724..cc3fccb2a01 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -170,6 +170,7 @@ addtimer(CALLBACK(src, .proc/update), 5) /obj/machinery/power/apc/Destroy() + SStgui.close_uis(wires) GLOB.apcs -= src if(malfai && operating) malfai.malf_picker.processing_time = clamp(malfai.malf_picker.processing_time - 10,0,1000) @@ -216,8 +217,7 @@ area = A name = "\improper [area.name] APC" else - area = get_area_name(areastring) - name = "\improper [area.name] APC" + name = "\improper [get_area_name(area, TRUE)] APC" area.apc |= src update_icon() @@ -648,7 +648,7 @@ else if(stat & (BROKEN|MAINT)) to_chat(user, "Nothing happens!") else - if(allowed(usr) && !isWireCut(APC_WIRE_IDSCAN) && !malfhack) + if(allowed(usr) && !wires.is_cut(WIRE_IDSCAN) && !malfhack) locked = !locked to_chat(user, "You [ locked ? "lock" : "unlock"] the APC interface.") update_icon() @@ -853,10 +853,6 @@ // to_chat(world, "[area.power_equip]") area.power_change() -/obj/machinery/power/apc/proc/isWireCut(var/wireIndex) - return wires.IsIndexCut(wireIndex) - - /obj/machinery/power/apc/proc/can_use(var/mob/user, var/loud = 0) //used by attack_hand() and Topic() if(user.can_admin_interact()) return 1 @@ -1192,31 +1188,31 @@ lighting = autoset(lighting, 1) environ = autoset(environ, 1) autoflag = 3 - if(report_power_alarm && is_station_contact(z)) - SSalarms.power_alarm.clearAlarm(loc, src) + if(report_power_alarm) + area.poweralert(TRUE, src) else if(cell.charge < 1250 && cell.charge > 750 && longtermpower < 0) // <30%, turn off equipment if(autoflag != 2) equipment = autoset(equipment, 2) lighting = autoset(lighting, 1) environ = autoset(environ, 1) - if(report_power_alarm && is_station_contact(z)) - SSalarms.power_alarm.triggerAlarm(loc, src) + if(report_power_alarm) + area.poweralert(FALSE, src) autoflag = 2 else if(cell.charge < 750 && cell.charge > 10) // <15%, turn off lighting & equipment if((autoflag > 1 && longtermpower < 0) || (autoflag > 1 && longtermpower >= 0)) equipment = autoset(equipment, 2) lighting = autoset(lighting, 2) environ = autoset(environ, 1) - if(report_power_alarm && is_station_contact(z)) - SSalarms.power_alarm.triggerAlarm(loc, src) + if(report_power_alarm) + area.poweralert(FALSE, src) autoflag = 1 else if(cell.charge <= 0) // zero charge, turn all off if(autoflag != 0) equipment = autoset(equipment, 0) lighting = autoset(lighting, 0) environ = autoset(environ, 0) - if(report_power_alarm && is_station_contact(z)) - SSalarms.power_alarm.triggerAlarm(loc, src) + if(report_power_alarm) + area.poweralert(FALSE, src) autoflag = 0 // now trickle-charge the cell @@ -1271,8 +1267,8 @@ equipment = autoset(equipment, 0) lighting = autoset(lighting, 0) environ = autoset(environ, 0) - if(report_power_alarm && is_station_contact(z)) - SSalarms.power_alarm.triggerAlarm(loc, src) + if(report_power_alarm) + area.poweralert(FALSE, src) autoflag = 0 // update icon & area power if anything changed @@ -1372,4 +1368,18 @@ L.update(FALSE) CHECK_TICK +/obj/machinery/power/apc/proc/relock_callback() + locked = TRUE + updateDialog() + +/obj/machinery/power/apc/proc/check_main_power_callback() + if(!wires.is_cut(WIRE_MAIN_POWER1) && !wires.is_cut(WIRE_MAIN_POWER2)) + shorted = FALSE + updateDialog() + +/obj/machinery/power/apc/proc/check_ai_control_callback() + if(!wires.is_cut(WIRE_AI_CONTROL)) + aidisabled = FALSE + updateDialog() + #undef APC_UPDATE_ICON_COOLDOWN diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index b6c65d979cf..992020e7090 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -229,14 +229,15 @@ By design, d1 is the smallest direction and d2 is the highest if(current_size >= STAGE_FIVE) deconstruct() -obj/structure/cable/proc/cable_color(var/colorC) - if(colorC) - if(colorC == "rainbow") - color = color_rainbow() - else - color = colorC +obj/structure/cable/proc/cable_color(colorC) + if(!colorC) + color = COLOR_RED + else if(colorC == "rainbow") + color = color_rainbow() + else if(colorC == "orange") //byond only knows 16 colors by name, and orange isn't one of them + color = COLOR_ORANGE else - color = "#DD0000" + color = colorC /obj/structure/cable/proc/color_rainbow() color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN) @@ -845,13 +846,15 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai 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 +/obj/item/stack/cable_coil/proc/cable_color(colorC) + if(!colorC) color = COLOR_RED + else if(colorC == "rainbow") + color = color_rainbow() + else if(colorC == "orange") //byond only knows 16 colors by name, and orange isn't one of them + color = COLOR_ORANGE + else + color = colorC /obj/item/stack/cable_coil/proc/color_rainbow() color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 3e8d71b3280..9305faf6637 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -177,6 +177,8 @@ var/nightshift_light_power = 0.45 var/nightshift_light_color = "#FFDDCC" + var/bulb_emergency_colour = "#FF3232" // determines the colour of the light while it's in emergency mode + // the smaller bulb light fixture /obj/machinery/light/small @@ -238,7 +240,11 @@ switch(status) // set icon_states if(LIGHT_OK) - icon_state = "[base_state][on]" + var/area/A = get_area(src) + if(A && A.fire) + icon_state = "[base_state]_emergency" + else + icon_state = "[base_state][on]" if(LIGHT_EMPTY) icon_state = "[base_state]-empty" on = FALSE @@ -260,10 +266,20 @@ on = FALSE update_icon() if(on) - 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 + var/BR = brightness_range + var/PO = brightness_power + var/CO = brightness_color + if(color) + CO = color + var/area/A = get_area(src) + if(A && A.fire) + CO = bulb_emergency_colour + else if(nightshift_enabled) + BR = nightshift_light_range + PO = nightshift_light_power + if(!color) + CO = nightshift_light_color + var/matching = light && BR == light.light_range && PO == light.light_power && CO == light.light_color if(!matching) switchcount++ if(rigged) @@ -627,7 +643,7 @@ /obj/item/light/Crossed(mob/living/L) if(istype(L) && has_gravity(loc)) - if(L.incorporeal_move || L.flying) + if(L.incorporeal_move || L.flying || L.floating) return playsound(loc, 'sound/effects/glass_step.ogg', 50, TRUE) if(status == LIGHT_BURNED || status == LIGHT_OK) diff --git a/code/modules/power/singularity/investigate.dm b/code/modules/power/singularity/investigate.dm index 43e8c9f8a8b..4835e09411c 100644 --- a/code/modules/power/singularity/investigate.dm +++ b/code/modules/power/singularity/investigate.dm @@ -1,4 +1,4 @@ -/area/engine/engineering/power_alert(var/alarming) - if(alarming) - investigate_log("has a power alarm!","singulo") +/area/engine/engineering/poweralert(state, source) + if(state != poweralm) + investigate_log("has a power alarm!", "singulo") ..() diff --git a/code/modules/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm index 80b10ab3a8b..bead9c935ef 100644 --- a/code/modules/power/singularity/narsie.dm +++ b/code/modules/power/singularity/narsie.dm @@ -127,6 +127,8 @@ /obj/singularity/narsie/proc/acquire(var/mob/food) if(food == target) return + if(!target) + return to_chat(target, "[uppertext(SSticker.cultdat.entity_name)] HAS LOST INTEREST IN YOU") target = food if(ishuman(target)) diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm index b8ba53ae432..3ad96050123 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -27,6 +27,7 @@ use_log = list() /obj/machinery/particle_accelerator/control_box/Destroy() + SStgui.close_uis(wires) if(active) toggle_power() QDEL_NULL(wires) @@ -41,6 +42,11 @@ else if(construction_state == 2) // Wires exposed wires.Interact(user) +/obj/machinery/particle_accelerator/control_box/multitool_act(mob/living/user, obj/item/I) + if(construction_state == 2) // Wires exposed + wires.Interact(user) + return TRUE + /obj/machinery/particle_accelerator/control_box/update_state() if(construction_state < 3) use_power = NO_POWER_USE @@ -93,18 +99,18 @@ usr.unset_machine() return if(href_list["togglep"]) - if(!wires.IsIndexCut(PARTICLE_TOGGLE_WIRE)) + if(!wires.is_cut(WIRE_PARTICLE_POWER)) toggle_power() else if(href_list["scan"]) part_scan() else if(href_list["strengthup"]) - if(!wires.IsIndexCut(PARTICLE_STRENGTH_WIRE)) + if(!wires.is_cut(WIRE_PARTICLE_STRENGTH)) add_strength() else if(href_list["strengthdown"]) - if(!wires.IsIndexCut(PARTICLE_STRENGTH_WIRE)) + if(!wires.is_cut(WIRE_PARTICLE_STRENGTH)) remove_strength() updateDialog() diff --git a/code/modules/power/tesla/coil.dm b/code/modules/power/tesla/coil.dm index 5f58bcb5dd4..5743bea8475 100644 --- a/code/modules/power/tesla/coil.dm +++ b/code/modules/power/tesla/coil.dm @@ -21,6 +21,7 @@ RefreshParts() /obj/machinery/power/tesla_coil/Destroy() + SStgui.close_uis(wires) QDEL_NULL(wires) return ..() diff --git a/code/modules/power/tracker.dm b/code/modules/power/tracker.dm index c8964c7ec34..621c5f02747 100644 --- a/code/modules/power/tracker.dm +++ b/code/modules/power/tracker.dm @@ -29,10 +29,10 @@ //set the control of the tracker to a given computer if closer than SOLAR_MAX_DIST /obj/machinery/power/tracker/proc/set_control(obj/machinery/power/solar_control/SC) if(SC && (get_dist(src, SC) > SOLAR_MAX_DIST)) - return 0 + return FALSE control = SC SC.connected_tracker = src - return 1 + return TRUE //set the control of the tracker to null and removes it from the previous control computer if needed /obj/machinery/power/tracker/proc/unset_control() @@ -44,7 +44,7 @@ if(!S) S = new /obj/item/solar_assembly(src) S.glass_type = /obj/item/stack/sheet/glass - S.tracker = 1 + S.tracker = TRUE S.anchored = TRUE S.forceMove(src) update_icon() @@ -63,7 +63,7 @@ . = TRUE if(!I.tool_use_check(user, 0)) return - playsound(src.loc, 'sound/machines/click.ogg', 50, 1) + playsound(loc, 'sound/machines/click.ogg', 50, 1) user.visible_message("[user] begins to take the glass off the solar tracker.") if(I.use_tool(src, user, 50, volume = I.tool_volume)) user.visible_message("[user] takes the glass off the tracker.") @@ -76,7 +76,7 @@ stat |= BROKEN unset_control() -/obj/machinery/power/solar/deconstruct(disassembled = TRUE) +/obj/machinery/power/tracker/deconstruct(disassembled = TRUE) if(!(flags & NODECONSTRUCT)) if(disassembled) var/obj/item/solar_assembly/S = locate() in src @@ -85,8 +85,8 @@ S.give_glass(stat & BROKEN) else playsound(src, "shatter", 70, TRUE) - new /obj/item/shard(src.loc) - new /obj/item/shard(src.loc) + new /obj/item/shard(loc) + new /obj/item/shard(loc) qdel(src) // Tracker Electronic diff --git a/code/modules/projectiles/ammunition/magazines.dm b/code/modules/projectiles/ammunition/magazines.dm index 8cb48f8e36a..c59e5890331 100644 --- a/code/modules/projectiles/ammunition/magazines.dm +++ b/code/modules/projectiles/ammunition/magazines.dm @@ -133,6 +133,9 @@ /obj/item/ammo_box/magazine/internal/shot/riot/short max_ammo = 3 +/obj/item/ammo_box/magazine/internal/shot/riot/buckshot + ammo_type = /obj/item/ammo_casing/shotgun/buckshot + /obj/item/ammo_box/magazine/internal/grenadelauncher name = "grenade launcher internal magazine" ammo_type = /obj/item/ammo_casing/a40mm diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index ce0abc8cc69..695ab02c43b 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -15,7 +15,6 @@ ammo_x_offset = 2 var/shaded_charge = 0 //if this gun uses a stateful charge bar for more detail var/selfcharge = 0 - var/use_external_power = 0 //if set, the weapon will look for an external power source to draw from, otherwise it recharges magically var/charge_tick = 0 var/charge_delay = 4 @@ -68,11 +67,6 @@ charge_tick = 0 if(!cell) return // check if we actually need to recharge - var/obj/item/ammo_casing/energy/E = ammo_type[select] - if(use_external_power) - var/obj/item/stock_parts/cell/external = get_external_cell() - if(!external || !external.use(E.e_cost)) //Take power from the borg... - return //Note, uses /10 because of shitty mods to the cell system cell.give(100) //... to recharge the shot on_recharge() update_icon() @@ -207,14 +201,3 @@ var/obj/item/ammo_casing/energy/shot = ammo_type[select] //Necessary to find cost of shot if(R.cell.use(shot.e_cost)) //Take power from the borg... cell.give(shot.e_cost) //... to recharge the shot - -/obj/item/gun/energy/proc/get_external_cell() - if(istype(loc, /obj/item/rig_module)) - var/obj/item/rig_module/module = loc - if(module.holder && module.holder.wearer) - var/mob/living/carbon/human/H = module.holder.wearer - if(istype(H) && H.back) - var/obj/item/rig/suit = H.back - if(istype(suit)) - return suit.cell - return null diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index 3e9c882458e..9106d80ef98 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -95,12 +95,6 @@ ..() damage = min(damage+7, 100) -/obj/item/gun/energy/lasercannon/mounted - name = "mounted laser cannon" - selfcharge = 1 - use_external_power = 1 - charge_delay = 10 - /obj/item/gun/energy/lasercannon/cyborg /obj/item/gun/energy/lasercannon/cyborg/newshot() diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index 2df2d877c53..3d9925da974 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -21,11 +21,6 @@ /obj/item/gun/energy/gun/cyborg/emp_act() return -/obj/item/gun/energy/gun/mounted - name = "mounted energy gun" - selfcharge = 1 - use_external_power = 1 - /obj/item/gun/energy/gun/mini name = "miniature energy gun" desc = "A small, pistol-sized energy gun with a built-in flashlight. It has two settings: disable and kill." diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 48aaff9d8b4..da72c971130 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -112,10 +112,6 @@ max_mod_capacity = 0 empty_state = null -/obj/item/gun/energy/kinetic_accelerator/crossbow/ninja - name = "energy dart thrower" - ammo_type = list(/obj/item/ammo_casing/energy/dart) - /obj/item/gun/energy/kinetic_accelerator/crossbow/large name = "energy crossbow" desc = "A reverse engineered weapon using syndicate technology." @@ -424,7 +420,7 @@ update_icon() if(istype(loc, /mob/living/carbon)) - var /mob/living/carbon/M = loc + var/mob/living/carbon/M = loc if(src == M.machine) update_dat() M << browse("Temperature Gun Configuration
    [dat]", "window=tempgun;size=510x102") diff --git a/code/modules/projectiles/guns/energy/stun.dm b/code/modules/projectiles/guns/energy/stun.dm index 70bb8be7e46..141366dd5d9 100644 --- a/code/modules/projectiles/guns/energy/stun.dm +++ b/code/modules/projectiles/guns/energy/stun.dm @@ -7,11 +7,6 @@ ammo_type = list(/obj/item/ammo_casing/energy/electrode) ammo_x_offset = 3 -/obj/item/gun/energy/taser/mounted - name = "mounted taser gun" - selfcharge = 1 - use_external_power = 1 - /obj/item/gun/energy/shock_revolver name = "tesla revolver" desc = "A high-tech revolver that fires internal, reusable shock cartridges in a revolving cylinder. The cartridges can be recharged using conventional rechargers." diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm index 25db1f10dcb..ca4499c8832 100644 --- a/code/modules/projectiles/guns/projectile.dm +++ b/code/modules/projectiles/guns/projectile.dm @@ -95,6 +95,7 @@ if(!user.unEquip(A)) return to_chat(user, "You screw [S] onto [src].") + playsound(src, 'sound/items/screwdriver.ogg', 40, 1) suppressed = A S.oldsound = fire_sound S.initial_w_class = w_class @@ -120,6 +121,7 @@ ..() return to_chat(user, "You unscrew [suppressed] from [src].") + playsound(src, 'sound/items/screwdriver.ogg', 40, 1) user.put_in_hands(suppressed) fire_sound = S.oldsound w_class = S.initial_w_class diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index 17a55722d2c..6c11fda5fd7 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -197,6 +197,8 @@ ..() post_sawoff() +/obj/item/gun/projectile/shotgun/riot/buckshot //comes pre-loaded with buckshot rather than rubber + mag_type = /obj/item/ammo_box/magazine/internal/shot/riot/buckshot /////////////////////// diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index 4aee2398b68..080114554bb 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -270,7 +270,6 @@ M.mind.transfer_to(new_mob) else new_mob.attack_log_old = M.attack_log_old.Copy() - new_mob.logs = M.logs.Copy() new_mob.key = M.key to_chat(new_mob, "Your form morphs into that of a [randomize].") diff --git a/code/modules/reagents/chemistry/reagents/toxins.dm b/code/modules/reagents/chemistry/reagents/toxins.dm index c6ff39aaead..b015b75be2a 100644 --- a/code/modules/reagents/chemistry/reagents/toxins.dm +++ b/code/modules/reagents/chemistry/reagents/toxins.dm @@ -1237,6 +1237,7 @@ description = "An advanced corruptive toxin produced by something terrible." reagent_state = LIQUID color = "#5EFF3B" //RGB: 94, 255, 59 + can_synth = FALSE taste_description = "decay" /datum/reagent/gluttonytoxin/reaction_mob(mob/living/L, method=REAGENT_TOUCH, reac_volume) diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index f2740676314..abdf0305934 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -56,7 +56,6 @@ /datum/chemical_reaction/nitroglycerin name = "Nitroglycerin" id = "nitroglycerin" - result = "nitroglycerin" required_reagents = list("glycerol" = 1, "facid" = 1, "sacid" = 1) result_amount = 2 diff --git a/code/modules/reagents/chemistry/recipes/slime_extracts.dm b/code/modules/reagents/chemistry/recipes/slime_extracts.dm index b1fb33edf85..1525ed42bd3 100644 --- a/code/modules/reagents/chemistry/recipes/slime_extracts.dm +++ b/code/modules/reagents/chemistry/recipes/slime_extracts.dm @@ -38,7 +38,7 @@ /datum/chemical_reaction/slimemonkey/on_reaction(datum/reagents/holder) feedback_add_details("slime_cores_used","[type]") for(var/i = 1, i <= 3, i++) - var /obj/item/reagent_containers/food/snacks/monkeycube/M = new /obj/item/reagent_containers/food/snacks/monkeycube + var/obj/item/reagent_containers/food/snacks/monkeycube/M = new /obj/item/reagent_containers/food/snacks/monkeycube M.forceMove(get_turf(holder.my_atom)) //Green diff --git a/code/modules/reagents/reagent_containers/applicator.dm b/code/modules/reagents/reagent_containers/applicator.dm index 73c3c3759b1..87be22d3c8f 100644 --- a/code/modules/reagents/reagent_containers/applicator.dm +++ b/code/modules/reagents/reagent_containers/applicator.dm @@ -5,6 +5,7 @@ icon_state = "mender" item_state = "mender" volume = 200 + possible_transfer_amounts = null resistance_flags = ACID_PROOF container_type = REFILLABLE | AMOUNT_VISIBLE temperature_min = 270 @@ -21,6 +22,9 @@ ignore_flags = TRUE to_chat(user, "You short out the safeties on [src].") +/obj/item/reagent_containers/applicator/set_APTFT() + set hidden = TRUE + /obj/item/reagent_containers/applicator/on_reagent_change() if(!emagged) var/found_forbidden_reagent = FALSE @@ -93,6 +97,20 @@ playsound(get_turf(src), pick('sound/goonstation/items/mender.ogg', 'sound/goonstation/items/mender2.ogg'), 50, 1) +/obj/item/reagent_containers/applicator/verb/empty() + set name = "Empty Applicator" + set category = "Object" + set src in usr + + if(usr.incapacitated()) + return + if(alert(usr, "Are you sure you want to empty [src]?", "Empty Applicator:", "Yes", "No") != "Yes") + return + if(!usr.incapacitated() && isturf(usr.loc) && loc == usr) + to_chat(usr, "You empty [src] onto the floor.") + reagents.reaction(usr.loc) + reagents.clear_reagents() + /obj/item/reagent_containers/applicator/brute name = "brute auto-mender" list_reagents = list("styptic_powder" = 200) @@ -104,3 +122,6 @@ /obj/item/reagent_containers/applicator/dual name = "dual auto-mender" list_reagents = list("synthflesh" = 200) + +/obj/item/reagent_containers/applicator/dual/syndi // It magically goes through hardsuits. Don't ask how. + ignore_flags = TRUE diff --git a/code/modules/reagents/reagent_containers/glass_containers.dm b/code/modules/reagents/reagent_containers/glass_containers.dm index 1e42899111b..175ae757df4 100644 --- a/code/modules/reagents/reagent_containers/glass_containers.dm +++ b/code/modules/reagents/reagent_containers/glass_containers.dm @@ -47,6 +47,9 @@ reagents.reaction(M, REAGENT_TOUCH) reagents.clear_reagents() else + if(!iscarbon(M)) // Non-carbons can't process reagents + to_chat(user, "You cannot find a way to feed [M].") + return if(M != user) M.visible_message("[user] attempts to feed something to [M].", \ "[user] attempts to feed something to you.") diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 8783d8a8c19..6e0f4277bde 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -24,6 +24,9 @@ mode = SYRINGE_INJECT update_icon() +/obj/item/reagent_containers/syringe/set_APTFT() + set hidden = TRUE + /obj/item/reagent_containers/syringe/on_reagent_change() update_icon() diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index ecf6b9887fc..e678ec43398 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -161,13 +161,13 @@ amount = 25 max_amount = 25 resistance_flags = FLAMMABLE + var/static/list/no_wrap = list(/obj/item/smallDelivery, /obj/structure/bigDelivery, /obj/item/evidencebag, /obj/structure/closet/body_bag, /obj/item/twohanded/required) /obj/item/stack/packageWrap/afterattack(var/obj/target as obj, mob/user as mob, proximity) if(!proximity) return if(!istype(target)) //this really shouldn't be necessary (but it is). -Pete return - if(istype(target, /obj/item/smallDelivery) || istype(target,/obj/structure/bigDelivery) \ - || istype(target, /obj/item/evidencebag) || istype(target, /obj/structure/closet/body_bag)) + if(is_type_in_list(target, no_wrap)) return if(target.anchored) return diff --git a/code/modules/research/designs/autolathe_designs.dm b/code/modules/research/designs/autolathe_designs.dm index b843b2d17a2..e813597c4d8 100644 --- a/code/modules/research/designs/autolathe_designs.dm +++ b/code/modules/research/designs/autolathe_designs.dm @@ -543,6 +543,14 @@ build_path = /obj/item/assembly/health category = list("initial", "Medical") +/datum/design/stethoscope + name = "Stethoscope" + id = "stethoscope" + build_type = AUTOLATHE + materials = list(MAT_METAL = 500) + build_path = /obj/item/clothing/accessory/stethoscope + category = list("initial", "Medical") + /datum/design/timer name = "Timer" id = "timer" diff --git a/code/modules/research/designs/mechfabricator_designs.dm b/code/modules/research/designs/mechfabricator_designs.dm index 76eabe46761..75e64a43215 100644 --- a/code/modules/research/designs/mechfabricator_designs.dm +++ b/code/modules/research/designs/mechfabricator_designs.dm @@ -751,7 +751,7 @@ category = list("Exosuit Equipment") /datum/design/mech_mining_scanner - name = "Exosuit Engineering Equipement (Mining Scanner)" + name = "Exosuit Engineering Equipment (Mining Scanner)" id = "mech_mscanner" build_type = MECHFAB build_path = /obj/item/mecha_parts/mecha_equipment/mining_scanner @@ -948,8 +948,8 @@ category = list("Exosuit Equipment") /datum/design/mech_grenade_launcher - name = "Exosuit Weapon (SGL-6 Grenade Launcher)" - desc = "Allows for the construction of SGL-6 Grenade Launcher." + name = "Exosuit Weapon (SGL-6 Flashbang Launcher)" + desc = "Allows for the construction of SGL-6 Flashbang Launcher." id = "mech_grenade_launcher" build_type = MECHFAB req_tech = list("combat" = 4, "engineering" = 4) diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index caa273594de..43cc010ac1c 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -291,8 +291,7 @@ for(var/turf/T in oview(1, src)) if(!T.density) if(prob(EFFECT_PROB_VERYHIGH)) - var/obj/effect/decal/cleanable/reagentdecal = new/obj/effect/decal/cleanable/greenglow(T) - reagentdecal.reagents.add_reagent("radium", 7) + new /obj/effect/decal/cleanable/greenglow(T) if(prob(EFFECT_PROB_MEDIUM-badThingCoeff)) var/savedName = "[exp_on]" ejectItem(TRUE) diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 7c35730f4aa..ac7249a8b63 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -198,7 +198,7 @@ being_used = 1 var/ghostmsg = "Play as [SM.name], pet of [user.name]?" - var/list/candidates = pollCandidates(ghostmsg, ROLE_SENTIENT, 0, 100) + var/list/candidates = SSghost_spawns.poll_candidates(ghostmsg, ROLE_SENTIENT, FALSE, 10 SECONDS, source = M) if(!src) return diff --git a/code/modules/response_team/ert.dm b/code/modules/response_team/ert.dm index a25be3814a7..f2d559e8b1f 100644 --- a/code/modules/response_team/ert.dm +++ b/code/modules/response_team/ert.dm @@ -63,7 +63,7 @@ GLOBAL_VAR_INIT(ert_request_answered, FALSE) GLOB.active_team.setSlots(commander_slots, security_slots, medical_slots, engineering_slots, janitor_slots, paranormal_slots, cyborg_slots) GLOB.send_emergency_team = TRUE - var/list/ert_candidates = shuffle(pollCandidates("Join the Emergency Response Team?",, GLOB.responseteam_age, 600, 1, GLOB.role_playtime_requirements[ROLE_ERT])) + var/list/ert_candidates = shuffle(SSghost_spawns.poll_candidates("Join the Emergency Response Team?",, GLOB.responseteam_age, 60 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_ERT])) if(!ert_candidates.len) GLOB.active_team.cannot_send_team() GLOB.send_emergency_team = FALSE diff --git a/code/modules/security_levels/security levels.dm b/code/modules/security_levels/security levels.dm index 00c575e53b0..71fd1750902 100644 --- a/code/modules/security_levels/security levels.dm +++ b/code/modules/security_levels/security levels.dm @@ -123,10 +123,6 @@ GLOBAL_DATUM_INIT(security_announcement_down, /datum/announcement/priority/secur FA.overlays.Cut() FA.overlays += image('icons/obj/monitors.dmi', "overlay_delta") - if(level >= SEC_LEVEL_RED) - GLOB.atc.reroute_traffic(yes = TRUE) // Tell them fuck off we're busy. - else - GLOB.atc.reroute_traffic(yes = FALSE) SSnightshift.check_nightshift(TRUE) else diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index 99e31ef25ed..aa0a21a165a 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -150,11 +150,6 @@ emergency_shuttle_called.Announce("The emergency shuttle has been called. [redAlert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [timeLeft(600)] minutes.[reason][SSshuttle.emergencyLastCallLoc ? "\n\nCall signal traced. Results can be viewed on any communications console." : "" ]") - if(reason == "Automatic Crew Transfer" && signalOrigin == null) // Best way we have to check that it's actually a crew transfer and not just a player using the same message- any other calls to this proc should have a signalOrigin. - GLOB.atc.shift_ending() - else // Emergency shuttle call (probably) - GLOB.atc.reroute_traffic(yes = TRUE) - /obj/docking_port/mobile/emergency/cancel(area/signalOrigin) if(!canRecall) diff --git a/code/modules/space_management/level_traits.dm b/code/modules/space_management/level_traits.dm index 1d88f70454f..6aa3fa802a7 100644 --- a/code/modules/space_management/level_traits.dm +++ b/code/modules/space_management/level_traits.dm @@ -61,3 +61,16 @@ GLOBAL_LIST_INIT(default_map_traits, MAP_TRANSITION_CONFIG) /proc/level_name_to_num(name) var/datum/space_level/S = GLOB.space_manager.get_zlev_by_name(name) return S.zpos + +/** + * Proc to get a list of all the linked-together Z-Levels + * + * Returns a list of zlevel numbers which can be accessed from travelling space naturally + */ +/proc/get_all_linked_levels_zpos() + var/list/znums = list() + for(var/i in GLOB.space_manager.z_list) + var/datum/space_level/SL = GLOB.space_manager.z_list[i] + if(SL.linkage == CROSSLINKED) + znums |= SL.zpos + return znums diff --git a/code/modules/station_goals/bsa.dm b/code/modules/station_goals/bsa.dm index 426af9a97ac..4e9b5e57630 100644 --- a/code/modules/station_goals/bsa.dm +++ b/code/modules/station_goals/bsa.dm @@ -91,7 +91,7 @@ /obj/machinery/bsa/middle/proc/check_completion() if(!front || !back) - return "No linked parts detected!" + return "No multitool-linked parts detected!" if(!front.anchored || !back.anchored || !anchored) return "Linked parts unwrenched!" if(front.y != y || back.y != y || !(front.x > x && back.x < x || front.x < x && back.x > x) || front.z != z || back.z != z) @@ -305,51 +305,45 @@ /obj/machinery/computer/bsa_control/attack_hand(mob/user) if(..()) return 1 - ui_interact(user) + tgui_interact(user) -/obj/machinery/computer/bsa_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) +/obj/machinery/computer/bsa_control/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/tgui_state/state = GLOB.tgui_default_state) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) - ui = new(user, src, ui_key, "bsa.tmpl", name, 400, 305) + ui = new(user, src, ui_key, "BlueSpaceArtilleryControl", name, 400, 155, master_ui, state) ui.open() - ui.set_auto_update(1) -/obj/machinery/computer/bsa_control/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.default_state) +/obj/machinery/computer/bsa_control/tgui_data(mob/user) var/list/data = list() data["connected"] = cannon data["notice"] = notice if(target) data["target"] = get_target_name() - if(cannon) var/reload_cooldown = cannon.reload_cooldown var/last_fire_time = cannon.last_fire_time var/time_to_wait = max(0, round(reload_cooldown - ((world.time / 10) - last_fire_time))) var/minutes = max(0, round(time_to_wait / 60)) var/seconds = max(0, time_to_wait - (60 * minutes)) - - data["reloadtime_mins"] = minutes - data["reloadtime_secs"] = (seconds < 10) ? "0[seconds]" : seconds + var/seconds2 = (seconds < 10) ? "0[seconds]" : seconds + data["reloadtime_text"] = "[minutes]:[seconds2]" data["ready"] = minutes == 0 && seconds == 0 else data["ready"] = FALSE - return data -/obj/machinery/computer/bsa_control/Topic(href, href_list) +/obj/machinery/computer/bsa_control/tgui_act(action, params) if(..()) - return 1 - - if(href_list["build"]) - cannon = deploy() - . = TRUE - else if(href_list["fire"]) - fire(usr) - . = TRUE - else if(href_list["recalibrate"]) - calibrate(usr) - . = TRUE + return + switch(action) + if("build") + cannon = deploy() + if("fire") + fire(usr) + if("recalibrate") + calibrate(usr) update_icon() + return TRUE /obj/machinery/computer/bsa_control/proc/calibrate(mob/user) var/list/gps_locators = list() diff --git a/code/modules/station_goals/dna_vault.dm b/code/modules/station_goals/dna_vault.dm index db801fa5d0f..033cd9fdf94 100644 --- a/code/modules/station_goals/dna_vault.dm +++ b/code/modules/station_goals/dna_vault.dm @@ -7,7 +7,7 @@ #define VAULT_NOBREATH "Lung Enhancement" #define VAULT_FIREPROOF "Thermal Regulation" #define VAULT_STUNTIME "Neural Repathing" -#define VAULT_ARMOUR "Bone Reinforcement" +#define VAULT_ARMOUR "Hardened Skin" #define VAULT_SPEED "Leg Muscle Stimulus" #define VAULT_QUICK "Arm Muscle Stimulus" diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm index 1b205f957ce..59385ff85a3 100644 --- a/code/modules/surgery/organs/eyes.dm +++ b/code/modules/surgery/organs/eyes.dm @@ -8,7 +8,7 @@ var/eye_colour = "#000000" // Should never be null var/list/colourmatrix = null var/list/colourblind_matrix = MATRIX_GREYSCALE //Special colourblindness parameters. By default, it's black-and-white. - var/list/replace_colours = LIST_GREYSCALE_REPLACE + var/list/replace_colours = GREYSCALE_COLOR_REPLACE var/dependent_disabilities = list() //Gets set by eye-dependent disabilities such as colourblindness so the eyes can transfer the disability during transplantation. var/weld_proof = null //If set, the eyes will not take damage during welding. eg. IPC optical sensors do not take damage when they weld things while all other eyes will. diff --git a/code/modules/surgery/organs/helpers.dm b/code/modules/surgery/organs/helpers.dm index ca2698f2ad4..4102319a3fe 100644 --- a/code/modules/surgery/organs/helpers.dm +++ b/code/modules/surgery/organs/helpers.dm @@ -104,7 +104,7 @@ /mob/living/carbon/human/get_leg_ignore() - if(flying == 1) + if(flying || floating) return TRUE var/obj/item/tank/jetpack/J diff --git a/code/modules/surgery/organs/organ_icon.dm b/code/modules/surgery/organs/organ_icon.dm index 2a3b94ca249..b41ef824508 100644 --- a/code/modules/surgery/organs/organ_icon.dm +++ b/code/modules/surgery/organs/organ_icon.dm @@ -107,7 +107,10 @@ GLOBAL_LIST_EMPTY(limb_icon_cache) add_overlay(eyes_icon) if(owner.lip_style && (LIPS in dna.species.species_traits)) - add_overlay(mutable_appearance('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s")) //Hefty icon not necessary. + var/icon/lips_icon = new('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s") + lips_icon.Blend(owner.lip_color, ICON_MULTIPLY) + mob_icon.Blend(lips_icon, ICON_OVERLAY) + add_overlay(lips_icon) var/head_marking = owner.m_styles["head"] if(head_marking) diff --git a/code/modules/surgery/organs/subtypes/tajaran.dm b/code/modules/surgery/organs/subtypes/tajaran.dm index e8d87b55b89..226bc82dd2d 100644 --- a/code/modules/surgery/organs/subtypes/tajaran.dm +++ b/code/modules/surgery/organs/subtypes/tajaran.dm @@ -7,14 +7,14 @@ icon = 'icons/obj/species_organs/tajaran.dmi' name = "tajaran eyeballs" colourblind_matrix = MATRIX_TAJ_CBLIND //The colour matrix and darksight parameters that the mob will recieve when they get the disability. - replace_colours = LIST_TAJ_REPLACE + replace_colours = TRITANOPIA_COLOR_REPLACE see_in_dark = 8 /obj/item/organ/internal/eyes/tajaran/farwa //Being the lesser form of Tajara, Farwas have an utterly incurable version of their colourblindness. name = "farwa eyeballs" colourmatrix = MATRIX_TAJ_CBLIND see_in_dark = 8 - replace_colours = LIST_TAJ_REPLACE + replace_colours = TRITANOPIA_COLOR_REPLACE /obj/item/organ/internal/heart/tajaran name = "tajaran heart" diff --git a/code/modules/surgery/organs/subtypes/vulpkanin.dm b/code/modules/surgery/organs/subtypes/vulpkanin.dm index a2815d32dc6..bd56532ebd9 100644 --- a/code/modules/surgery/organs/subtypes/vulpkanin.dm +++ b/code/modules/surgery/organs/subtypes/vulpkanin.dm @@ -7,14 +7,14 @@ name = "vulpkanin eyeballs" icon = 'icons/obj/species_organs/vulpkanin.dmi' colourblind_matrix = MATRIX_VULP_CBLIND //The colour matrix and darksight parameters that the mob will recieve when they get the disability. - replace_colours = LIST_VULP_REPLACE + replace_colours = PROTANOPIA_COLOR_REPLACE see_in_dark = 8 /obj/item/organ/internal/eyes/vulpkanin/wolpin //Being the lesser form of Vulpkanin, Wolpins have an utterly incurable version of their colourblindness. name = "wolpin eyeballs" colourmatrix = MATRIX_VULP_CBLIND see_in_dark = 8 - replace_colours = LIST_VULP_REPLACE + replace_colours = PROTANOPIA_COLOR_REPLACE /obj/item/organ/internal/heart/vulpkanin name = "vulpkanin heart" diff --git a/code/modules/surgery/rig_removal.dm b/code/modules/surgery/rig_removal.dm deleted file mode 100644 index de15eacf8f3..00000000000 --- a/code/modules/surgery/rig_removal.dm +++ /dev/null @@ -1,59 +0,0 @@ -//Procedures in this file: Unsealing a Rig. - -/datum/surgery/rigsuit - name = "Rig Unsealing" - steps = list(/datum/surgery_step/rigsuit) - possible_locs = list("chest") - -/datum/surgery/rigsuit/can_start(mob/user, mob/living/carbon/target) - if(ishuman(target)) - var/mob/living/carbon/human/H = target - var/obj/item/backitem = H.get_item_by_slot(slot_back) - if(istype(backitem,/obj/item/rig)) //Check if we have a rig to operate on - if(backitem.flags&NODROP) //Check if the rig is sealed, if not, we don't need to operate - return 1 - return 0 - -//Bay12 removal -/datum/surgery_step/rigsuit - name="Cut Seals" - allowed_tools = list( - /obj/item/weldingtool = 80, - /obj/item/circular_saw = 60, - /obj/item/gun/energy/plasmacutter = 100 - ) - - can_infect = 0 - blood_level = 0 - - time = 50 - -/datum/surgery_step/hardsuit/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - if(!istype(target)) - return 0 - if(tool.tool_behaviour == TOOL_WELDER) - if(!tool.tool_use_check(user, 0)) - return - if(!tool.use(1)) - return - return (target_zone == "chest") && istype(target.back, /obj/item/rig) && (target.back.flags&NODROP) - -/datum/surgery_step/rigsuit/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("[user] starts cutting through the support systems of [target]'s [target.back] with \the [tool]." , \ - "You start cutting through the support systems of [target]'s [target.back] with \the [tool].") - ..() - -/datum/surgery_step/rigsuit/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - - var/obj/item/rig/rig = target.back - if(!istype(rig)) - return - rig.reset() - user.visible_message("[user] has cut through the support systems of [target]'s [rig] with \the [tool].", \ - "You have cut through the support systems of [target]'s [rig] with \the [tool].") - return 1 - -/datum/surgery_step/rigsuit/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("[user]'s [tool] can't quite seem to get through the metal...", \ - "Your [tool] can't quite seem to get through the metal. It's weakening, though - try again.") - return 0 diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index 0b13d18f9da..294e98d38d0 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -111,7 +111,7 @@ prob_chance *= get_location_modifier(target) - if(!ispath(surgery.steps[surgery.status], /datum/surgery_step/robotics) && !ispath(surgery.steps[surgery.status], /datum/surgery_step/rigsuit))//Repairing robotic limbs doesn't hurt, and neither does cutting someone out of a rig + if(!ispath(surgery.steps[surgery.status], /datum/surgery_step/robotics))//Repairing robotic limbs doesn't hurt, and neither does cutting someone out of a rig if(ishuman(target)) var/mob/living/carbon/human/H = target //typecast to human prob_chance *= get_pain_modifier(H)//operating on conscious people is hard. @@ -196,7 +196,7 @@ if(AStar(E.loc, M.loc, /turf/proc/Distance, 2, simulated_only = 0)) germs++ - if(tool.blood_DNA && tool.blood_DNA.len) //germs from blood-stained tools + if(tool && tool.blood_DNA && tool.blood_DNA.len) //germs from blood-stained tools germs += 30 if(E.internal_organs.len) diff --git a/code/modules/unit_tests/_unit_tests.dm b/code/modules/unit_tests/_unit_tests.dm index 5b1409af4e7..80467d19846 100644 --- a/code/modules/unit_tests/_unit_tests.dm +++ b/code/modules/unit_tests/_unit_tests.dm @@ -3,6 +3,7 @@ #ifdef UNIT_TESTS #include "component_tests.dm" +#include "map_templates.dm" #include "reagent_id_typos.dm" #include "spawn_humans.dm" #include "sql.dm" diff --git a/code/modules/unit_tests/map_templates.dm b/code/modules/unit_tests/map_templates.dm new file mode 100644 index 00000000000..b590526a46b --- /dev/null +++ b/code/modules/unit_tests/map_templates.dm @@ -0,0 +1,7 @@ +/datum/unit_test/map_templates/Run() + var/list/datum/map_template/templates = subtypesof(/datum/map_template) + for(var/I in templates) + var/datum/map_template/MT = new I // The new is important here to ensure stuff gets set properly + // Check if it even has a path and if so, does it exist + if(MT.mappath && !fexists(MT.mappath)) + Fail("The map file for [MT.type] does not exist!") diff --git a/config/example/config.txt b/config/example/config.txt index 5934ea733b5..3a56570a03d 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -277,9 +277,6 @@ TICKLAG 0.5 ## Whether the server will talk to other processes through socket_talk SOCKET_TALK 0 -## Uncomment this to ban use of ToR -#TOR_BAN - ## Comment this out to disable automuting #AUTOMUTE_ON diff --git a/config/names/dreams.txt b/config/names/dreams.txt index 89f559dae88..4bd2c2b984e 100644 --- a/config/names/dreams.txt +++ b/config/names/dreams.txt @@ -105,7 +105,7 @@ a grey a kidan a diona a drask -the ai core +the AI core the mining station the research station a beaker of strange liquid diff --git a/config/names/nightmares.txt b/config/names/nightmares.txt index 71df2e90cff..022a0494edd 100644 --- a/config/names/nightmares.txt +++ b/config/names/nightmares.txt @@ -10,7 +10,7 @@ a dead grey a dead kidan a dead diona a dead drask -the malf ai core +the malf AI core bLoOd has been called a horrible sense of dread comes over you diff --git a/goon/browserassets/css/browserOutput-dark.css b/goon/browserassets/css/browserOutput-dark.css index e7b79557619..529827ad369 100644 --- a/goon/browserassets/css/browserOutput-dark.css +++ b/goon/browserassets/css/browserOutput-dark.css @@ -38,7 +38,7 @@ a.popt {text-decoration: none;} * CUSTOM FONTS * ******************************************/ -@font-face { font-family: PxPlus IBM MDA; src: url('PxPlus_IBM_MDA.ttf'); } +@font-face { font-family: PxPlus IBM MDA; src: url('PxPlus_IBM_MDA.ttf'); } /***************************************** * @@ -250,6 +250,7 @@ em {font-style: normal; font-weight: bold;} {color: #638500; text-decoration: underline;} .motd a, .motd a:link, .motd a:visited, .motd a:active, .motd a:hover {color: #638500;} +.darkmblue {color: #6685f5;} .prefix { font-weight: bold;} .ooc { font-weight: bold;} .looc {color: #6699CC;} @@ -261,32 +262,32 @@ em {font-style: normal; font-weight: bold;} .mentorhelp {color: #0077bb; font-weight: bold;} .adminhelp {color: #aa0000; font-weight: bold;} .playerreply {color: #8800bb; font-weight: bold;} -.pmsend {color: #0000ff;} +.pmsend {color: #6685f5;} .name { font-weight: bold;} .say {} .yell { font-weight: bold;} .siliconsay {font-family: 'Courier New', Courier, monospace;} -.deadsay {color: #cc00c6;} +.deadsay {color: #B800B1;} .radio {color: #408010;} .deptradio {color: #993399;} -.comradio {color: #2040ff;} +.comradio {color: #526aff;} .syndradio {color: #993F40;} .dsquadradio {color: #998599;} .resteamradio {color: #18BC46;} -.airadio {color: #FF00FF;} -.centradio {color: #5C5C7C;} +.airadio {color: #FF94FF;} +.centradio {color: #78789B;} .secradio {color: #CF0000;} .engradio {color: #A66300;} .medradio {color: #009190;} .sciradio {color: #993399;} .supradio {color: #9F8545;} .srvradio {color: #80A000;} -.admin_channel {color: #9A04D1; font-weight: bold;} +.admin_channel {color: #fcba03; font-weight: bold;} .mentor_channel {color: #775BFF; font-weight: bold;} .mentor_channel_admin {color: #A35CFF; font-weight: bold;} .djradio {color: #996600;} .binaryradio {color: #1B00FB; font-family: 'Courier New', Courier, monospace;} -.mommiradio {color: #1B00AB;} +.mommiradio {color: #6685f5;} .alert {color: #ff0000;} h1.alert, h2.alert {color: #FFF;} .ghostalert {color: #cc00c6; font-style: italic; font-weight: bold;} @@ -304,10 +305,10 @@ h1.alert, h2.alert {color: #FFF;} .userdanger {color: #ff0000; font-weight: bold; font-size: 120%;} .biggerdanger {color: #ff0000; font-weight: bold; font-size: 150%;} -.info {color: #0044DD;} -.notice {color: #0044DD;} -.bnotice {color: #0044DD; font-weight: bold;} -.boldnotice {color: #0044DD; font-weight: bold;} +.info {color: #6685f5;} +.notice {color: #6685f5;} +.bnotice {color: #6685f5; font-weight: bold;} +.boldnotice {color: #6685f5; font-weight: bold;} .suicide {color: #ff5050; font-style: italic;} .green {color: #03bb39;} .announce {color: #228b22; font-weight: bold;} @@ -358,7 +359,7 @@ h1.alert, h2.alert {color: #FFF;} .cultlarge {color: #A60000; font-weight: bold; font-size: 120%;} .narsie {color: #A60000; font-weight: bold; font-size: 300%;} .narsiesmall {color: #A60000; font-weight: bold; font-size: 200%;} -.interface {color: #330033;} +.interface {color: #9031C4;} .big {font-size: 150%;} .reallybig {font-size: 175%;} .greentext {color: #00FF00; font-size: 150%;} @@ -366,7 +367,7 @@ h1.alert, h2.alert {color: #FFF;} .bold {font-weight: bold;} .center {text-align: center;} .red {color: #FF0000;} -.purple {color: #5e2d79;} +.purple {color: #9031C4;} .skeleton {color: #C8C8C8; font-weight: bold; font-style: italic;} .gutter {color: #7092BE; font-family: "Trebuchet MS", cursive, sans-serif;} .orange {color: #ffa500;} @@ -374,14 +375,14 @@ h1.alert, h2.alert {color: #FFF;} .orangeb {color: #ffa500; font-weight: bold;} .resonate {color: #298F85;} -.revennotice {color: #1d29C3;} -.revenboldnotice {color: #1d29C3; font-weight: bold;} -.revenbignotice {color: #1d29C3; font-weight: bold; font-size: 120%;} +.revennotice {color: #6685F5;} +.revenboldnotice {color: #6685F5; font-weight: bold;} +.revenbignotice {color: #6685F5; font-weight: bold; font-size: 120%;} .revenminor {color: #823abb} .revenwarning {color: #760fbb; font-style: italic;} .revendanger {color: #760fbb; font-weight: bold; font-size: 120%;} -.specialnotice {color: #36525e; font-weight: bold; font-size: 120%;} +.specialnotice {color: #4A6F82; font-weight: bold; font-size: 120%;} /* /vg/ */ .good {color: green;} @@ -398,7 +399,11 @@ h1.alert, h2.alert {color: #FFF;} .connectionClosed, .fatalError {background: red; color: white; padding: 5px;} .connectionClosed.restored {background: green;} -.internal.boldnshit {color: blue; font-weight: bold;} +.internal.boldnshit {color: #6685f5; font-weight: bold;} + +.rebooting {background: #2979AF; color: white; padding: 5px;} +.rebooting a {color: white !important; text-decoration-color: white !important;} +#reconnectTimer {font-weight: bold;} /* HELPER CLASSES */ .text-normal {font-weight: normal; font-style: normal;} diff --git a/goon/browserassets/css/browserOutput.css b/goon/browserassets/css/browserOutput.css index 962ce7bb8e7..31da7aa96f5 100644 --- a/goon/browserassets/css/browserOutput.css +++ b/goon/browserassets/css/browserOutput.css @@ -37,7 +37,7 @@ a.popt {text-decoration: none;} * CUSTOM FONTS * ******************************************/ -@font-face { font-family: PxPlus IBM MDA; src: url('PxPlus_IBM_MDA.ttf'); } +@font-face { font-family: PxPlus IBM MDA; src: url('PxPlus_IBM_MDA.ttf'); } /***************************************** * @@ -247,6 +247,7 @@ em {font-style: normal; font-weight: bold;} {color: #638500; text-decoration: underline;} .motd a, .motd a:link, .motd a:visited, .motd a:active, .motd a:hover {color: #638500;} +.darkmblue {color: #0000ff;} .prefix { font-weight: bold;} .ooc { font-weight: bold;} .looc {color: #6699CC;} @@ -399,6 +400,10 @@ h1.alert, h2.alert {color: #000000;} .connectionClosed.restored {background: green;} .internal.boldnshit {color: blue; font-weight: bold;} +.rebooting {background: #2979AF; color: white; padding: 5px;} +.rebooting a {color: white !important; text-decoration-color: white !important;} +#reconnectTimer {font-weight: bold;} + /* HELPER CLASSES */ .text-normal {font-weight: normal; font-style: normal;} .hidden {display: none; visibility: hidden;} diff --git a/goon/browserassets/js/browserOutput.js b/goon/browserassets/js/browserOutput.js index 40a69245188..414a5d644b6 100644 --- a/goon/browserassets/js/browserOutput.js +++ b/goon/browserassets/js/browserOutput.js @@ -69,10 +69,13 @@ var opts = { 'macros': {}, // Emoji toggle - 'enableEmoji': true + 'enableEmoji': true, + + // Reboot message stuff + 'rebootIntervalHandler': null }; -var regexHasError = false; //variable to check if regex has excepted +var regexHasError = false; //variable to check if regex has excepted function outerHTML(el) { var wrap = document.createElement('div'); @@ -97,10 +100,10 @@ if (typeof String.prototype.trim !== 'function') { if (!String.prototype.includes) { String.prototype.includes = function(search, start) { 'use strict'; - + if (search instanceof RegExp) { throw TypeError('first argument must not be a RegExp'); - } + } if (start === undefined) { start = 0; } return this.indexOf(search, start) !== -1; }; @@ -124,7 +127,7 @@ function byondDecode(message) { // The replace for + is because FOR SOME REASON, BYOND replaces spaces with a + instead of %20, and a plus with %2b. // Marvelous. message = message.replace(/\+/g, "%20"); - try { + try { // This is a workaround for the above not always working when BYOND's shitty url encoding breaks. // Basically, sometimes BYOND's double encoding trick just arbitrarily produces something that makes decodeURIComponent // throw an "Invalid Encoding URI" URIError... the simplest way to work around this is to just ignore it and use unescape instead @@ -166,30 +169,79 @@ function emojiparse(el) { } } -// Colorizes the highlight spans -function setHighlightColor(match) { - match.style.background = opts.highlightColor +// Recolorizes the highlight spans +function setHighlightColor() { + var highlightspans = document.getElementsByClassName("highlight") + for(var i in highlightspans){ + highlightspans[i].setAttribute("style","background-color:"+opts.highlightColor) + } +} + +function escapeRegexCharacters(input){ //escapes any characters that could be interpreted as regex patterns, potentially causing patterns to break if not escaped + return input.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); } //Highlights words based on user settings function highlightTerms(el) { - if(regexHasError) return; //just stop right there ig the regex is gonna except + + if (regexHasError) return; //just stop right there ig the regex is gonna except + + function highlightRecursor(element, term){ //recursor function to do the highlighting proper + var regex = new RegExp(term, "gi"); + + function replace(str) { + return str.replace(regex, '$&'); + } + + var s = ''; + var work = element.innerHTML; + var ind = 0; + + while(ind < work.length) { + + var next_term = work.substring(ind).search(regex); + if(next_term != -1) next_term += ind; + var next_tag = work.indexOf('<', ind); + if(next_tag == -1) { + s+=replace(work.substring(ind)); + break; + } + else if(next_term==-1) { + s += work.substring(ind); + break; + } + else if(next_tag < next_term) { + var temp = work.indexOf('>', next_tag); + s += work.substring(ind,temp+1); + ind = temp+1; + } + else { + s += replace(work.substring(ind, next_tag)); + ind = next_tag; + } + } + + element.innerHTML = s; + } + for (var i = 0; i < opts.highlightTerms.length; i++) { //Each highlight term if(opts.highlightTerms[i]) { if(!opts.highlightRegexEnable){ - if(el.innerText.toString().toLowerCase().includes(opts.highlightTerms[i].toLowerCase())) //match normally - el.innerHTML = ''+el.innerHTML+'' //encloseincludes - continue; + var innerTerms = opts.highlightTerms[i].split(" ") + for(var a in innerTerms){ + highlightRecursor(el, escapeRegexCharacters(innerTerms[a])) + } } - var rexp; - try{ - rexp = new RegExp(opts.highlightTerms[i],"gmi") - } catch(e){ - el.innerHTML+='
    Your highlight regex - '+opts.highlightTerms[i]+' - is malformed. Thrown exception: '+e+'' - regexHasError = true; - return; + else { + try{ + new RegExp(opts.highlightTerms[i], "gmi"); // check to make sure the pattern wont cause issues + } catch(e){ + el.innerHTML += '
    Your highlight regex pattern -- ' + opts.highlightTerms[i] + ' -- is malformed.
    Your highlights have been disabled until they are next edited
    Thrown exception: '+e+'
    '; + regexHasError = true; + return; + } + highlightRecursor(el, opts.highlightTerms[i]); } - el.innerHTML = el.innerHTML.replace(rexp,"$0") //i cant figure out a proper, non snowflakey way to let people select the group that gets highlighted } } } @@ -524,6 +576,34 @@ function toggleWasd(state) { opts.wasd = (state == 'on' ? true : false); } +function reboot(timeRaw) { + var timeLeftSecs = parseInt(timeRaw); + const intervalSecs = 1; // tick every 1 second + + rebootFinished(); + internalOutput('
    The server is restarting. Reconnect (' + timeLeftSecs + ')
    ', 'internal'); + + opts.rebootIntervalHandler = setInterval(function() { + timeLeftSecs -= intervalSecs; + if (timeLeftSecs <= 0) { + $("#reconnectTimer").text('Reconnecting...'); + window.location.href = 'byond://winset?command=.reconnect'; + clearInterval(opts.rebootIntervalHandler) + opts.rebootIntervalHandler = null; + } else { + $("#reconnectTimer").text('Reconnect (' + timeLeftSecs + ')'); + } + }, intervalSecs * 1000); +} + +function rebootFinished() { + if (opts.rebootIntervalHandler != null) { + clearInterval(opts.rebootIntervalHandler) + } + $(" Reconnected automatically!").insertBefore("#reconnectTimer"); + $("#reconnectTimer").remove(); +} + /***************************************** * * MAKE MACRO DICTIONARY @@ -603,7 +683,7 @@ $(function() { 'shideSpam': getCookie('hidespam'), 'darkChat': getCookie('darkChat'), }; - + if (savedConfig.sfontSize) { $messages.css('font-size', savedConfig.sfontSize); internalOutput('Loaded font size setting of: '+savedConfig.sfontSize+'', 'internal'); @@ -961,18 +1041,18 @@ $(function() { } else { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } - + // synchronous requests are depricated in modern browsers - xmlHttp.open('GET', 'browserOutput.css', true); + xmlHttp.open('GET', 'browserOutput.css', true); xmlHttp.onload = function (e) { if (xmlHttp.status === 200) { // request successful - + // Generate Log var saved = ''; saved += $messages.html(); saved = saved.replace(/&/g, '&'); saved = saved.replace(/Highlights have been updated.
    ',"internal") // simplest way to test if pattern works, why reinvent the wheel? var $popup = $('#highlightPopup').closest('.popup'); $popup.remove(); diff --git a/goon/code/datums/browserOutput.dm b/goon/code/datums/browserOutput.dm index 74c9d844728..b073bece409 100644 --- a/goon/code/datums/browserOutput.dm +++ b/goon/code/datums/browserOutput.dm @@ -109,6 +109,7 @@ var/list/chatResources = list( loaded = TRUE winset(owner, "browseroutput", "is-disabled=false") + owner << output(null, "browseroutput:rebootFinished") if(owner.holder) loadAdmin() for(var/message in messageQueue) @@ -245,8 +246,8 @@ var/list/chatResources = list( var/to_chat_filename var/to_chat_line var/to_chat_src -// Call using macro: to_chat(target, message, flag) -/proc/to_chat_immediate(target, message, flag) + +/proc/to_chat(target, message, flag) if(!is_valid_tochat_message(message) || !is_valid_tochat_target(target)) target << message @@ -304,17 +305,4 @@ var/to_chat_src target << output(output_message, "browseroutput:output") -/proc/to_chat(target, message, flag) - /* - If any of the following conditions are met, do NOT use SSchat. These conditions include: - - Is the MC still initializing? - - Has SSchat initialized? - - Has SSchat been offlined due to MC crashes? - If any of these are met, use the old chat system, otherwise people wont see messages - */ - if(Master.current_runlevel == RUNLEVEL_INIT || !SSchat?.initialized || SSchat?.flags & SS_NO_FIRE) - to_chat_immediate(target, message, flag) - return - SSchat.queue(target, message, flag) - #undef MAX_COOKIE_LENGTH diff --git a/html/browser/marked-paradise.js b/html/browser/marked-paradise.js index 03519139409..a92cadb1cfe 100644 --- a/html/browser/marked-paradise.js +++ b/html/browser/marked-paradise.js @@ -4,24 +4,22 @@ var $ = document.querySelector.bind(document); function parse(node) { - for (var i = 0; i < node.childNodes.length; i++) { - parse(node.childNodes[i]); - } - - if (!node.innerHTML) { - return; - } - - node.innerHTML = marked(node.innerHTML.replace(/
    /gi, '\n').replace(/\t/gi, ''), { breaks: false, gfm: false }) - // marked.js wraps content into

    tags, which is looks atrocious when we call it recursively. - // The following line unwraps it. - if (node.children.length == 1) { - node.innerHTML = node.children[0].innerHTML; - } + for (var i = 0; i < node.childNodes.length; i++) + parse(node.childNodes[i]); + + if (!node.innerHTML) + return; + + if (node.children.length == 0) { + node.innerHTML = marked(node.innerHTML.replace(/
    /gi, '\n').replace(/\t/gi, ''), { breaks: false, gfm: false }); + // marked.js wraps content into

    tags, which is looks atrocious when we call it recursively. + // The following line unwraps it. + if (node.children.length == 1 && node.children[0].tagName == "P") + node.innerHTML = node.children[0].innerHTML; + } } - + window.onload = function() { - if ($('#markdown')) { - parse($('#markdown')); - } + if ($('#markdown')) + parse($('#markdown')); } diff --git a/icons/effects/lasers2.dmi b/icons/effects/lasers2.dmi deleted file mode 100644 index f774fb9430b..00000000000 Binary files a/icons/effects/lasers2.dmi and /dev/null differ diff --git a/icons/mob/feet.dmi b/icons/mob/feet.dmi index e6f132a73a5..3892442c6ea 100644 Binary files a/icons/mob/feet.dmi and b/icons/mob/feet.dmi differ diff --git a/icons/mob/hands.dmi b/icons/mob/hands.dmi index 6d6165509c8..66d1474d61a 100644 Binary files a/icons/mob/hands.dmi and b/icons/mob/hands.dmi differ diff --git a/icons/mob/head.dmi b/icons/mob/head.dmi index 88b28aff5a9..1bd516110e5 100644 Binary files a/icons/mob/head.dmi and b/icons/mob/head.dmi differ diff --git a/icons/mob/hud.dmi b/icons/mob/hud.dmi index df6b8f4de1f..07593d09c0c 100644 Binary files a/icons/mob/hud.dmi and b/icons/mob/hud.dmi differ diff --git a/icons/mob/human_face.dmi b/icons/mob/human_face.dmi index ff471760fe8..9b6d9468b9d 100644 Binary files a/icons/mob/human_face.dmi and b/icons/mob/human_face.dmi differ diff --git a/icons/mob/inhands/items_lefthand.dmi b/icons/mob/inhands/items_lefthand.dmi index a378d2e5b04..b2f1bfa90c6 100644 Binary files a/icons/mob/inhands/items_lefthand.dmi and b/icons/mob/inhands/items_lefthand.dmi differ diff --git a/icons/mob/inhands/items_righthand.dmi b/icons/mob/inhands/items_righthand.dmi index 0a8847d7e4a..a7772c3ebf4 100644 Binary files a/icons/mob/inhands/items_righthand.dmi and b/icons/mob/inhands/items_righthand.dmi differ diff --git a/icons/mob/rig_back.dmi b/icons/mob/rig_back.dmi deleted file mode 100644 index 923939d323e..00000000000 Binary files a/icons/mob/rig_back.dmi and /dev/null differ diff --git a/icons/mob/rig_modules.dmi b/icons/mob/rig_modules.dmi deleted file mode 100644 index 3d18b5435ce..00000000000 Binary files a/icons/mob/rig_modules.dmi and /dev/null differ diff --git a/icons/mob/species/drask/head.dmi b/icons/mob/species/drask/head.dmi index b9f0604c960..f0c888e9f68 100644 Binary files a/icons/mob/species/drask/head.dmi and b/icons/mob/species/drask/head.dmi differ diff --git a/icons/mob/species/drask/suit.dmi b/icons/mob/species/drask/suit.dmi index d75a28f2bee..cef6dbdf836 100644 Binary files a/icons/mob/species/drask/suit.dmi and b/icons/mob/species/drask/suit.dmi differ diff --git a/icons/mob/species/grey/head.dmi b/icons/mob/species/grey/head.dmi index 4ff783bbb74..c059a3bff9d 100644 Binary files a/icons/mob/species/grey/head.dmi and b/icons/mob/species/grey/head.dmi differ diff --git a/icons/mob/species/grey/helmet.dmi b/icons/mob/species/grey/helmet.dmi index cf244cec6b2..3e592369adc 100644 Binary files a/icons/mob/species/grey/helmet.dmi and b/icons/mob/species/grey/helmet.dmi differ diff --git a/icons/mob/species/grey/mask.dmi b/icons/mob/species/grey/mask.dmi index cbbd722ae69..348a39c0f03 100644 Binary files a/icons/mob/species/grey/mask.dmi and b/icons/mob/species/grey/mask.dmi differ diff --git a/icons/mob/species/grey/suit.dmi b/icons/mob/species/grey/suit.dmi index 3070f6627ea..c22c9daf3dd 100644 Binary files a/icons/mob/species/grey/suit.dmi and b/icons/mob/species/grey/suit.dmi differ diff --git a/icons/mob/species/grey/uniform.dmi b/icons/mob/species/grey/uniform.dmi index c956187ffa1..7a74f930598 100644 Binary files a/icons/mob/species/grey/uniform.dmi and b/icons/mob/species/grey/uniform.dmi differ diff --git a/icons/mob/species/skrell/helmet.dmi b/icons/mob/species/skrell/helmet.dmi index e17fa4174c5..e54cdb52d0f 100644 Binary files a/icons/mob/species/skrell/helmet.dmi and b/icons/mob/species/skrell/helmet.dmi differ diff --git a/icons/mob/species/tajaran/helmet.dmi b/icons/mob/species/tajaran/helmet.dmi index 298ff823ea4..00c3f1d2bdc 100644 Binary files a/icons/mob/species/tajaran/helmet.dmi and b/icons/mob/species/tajaran/helmet.dmi differ diff --git a/icons/mob/species/tajaran/suit.dmi b/icons/mob/species/tajaran/suit.dmi index 2f7d8f34907..61929dcceda 100644 Binary files a/icons/mob/species/tajaran/suit.dmi and b/icons/mob/species/tajaran/suit.dmi differ diff --git a/icons/mob/species/unathi/helmet.dmi b/icons/mob/species/unathi/helmet.dmi index 1fc21dd1611..68f6171bb19 100644 Binary files a/icons/mob/species/unathi/helmet.dmi and b/icons/mob/species/unathi/helmet.dmi differ diff --git a/icons/mob/species/unathi/suit.dmi b/icons/mob/species/unathi/suit.dmi index 14d1eaaa73a..eabd0f94672 100644 Binary files a/icons/mob/species/unathi/suit.dmi and b/icons/mob/species/unathi/suit.dmi differ diff --git a/icons/mob/species/vox/head.dmi b/icons/mob/species/vox/head.dmi index 6c4b2b43f6a..fb5d153d30d 100644 Binary files a/icons/mob/species/vox/head.dmi and b/icons/mob/species/vox/head.dmi differ diff --git a/icons/mob/species/vox/suit.dmi b/icons/mob/species/vox/suit.dmi index 730149860d5..4161227ac79 100644 Binary files a/icons/mob/species/vox/suit.dmi and b/icons/mob/species/vox/suit.dmi differ diff --git a/icons/mob/suit.dmi b/icons/mob/suit.dmi index d71fb9b1d21..12a0a371a94 100644 Binary files a/icons/mob/suit.dmi and b/icons/mob/suit.dmi differ diff --git a/icons/obj/atmospherics/blue_pipe_tank.dmi b/icons/obj/atmospherics/blue_pipe_tank.dmi deleted file mode 100644 index 3d2ee4c9d69..00000000000 Binary files a/icons/obj/atmospherics/blue_pipe_tank.dmi and /dev/null differ diff --git a/icons/obj/atmospherics/digital_valve.dmi b/icons/obj/atmospherics/digital_valve.dmi deleted file mode 100644 index 136523b7223..00000000000 Binary files a/icons/obj/atmospherics/digital_valve.dmi and /dev/null differ diff --git a/icons/obj/atmospherics/dp_vent_pump.dmi b/icons/obj/atmospherics/dp_vent_pump.dmi deleted file mode 100644 index 86dae2cf435..00000000000 Binary files a/icons/obj/atmospherics/dp_vent_pump.dmi and /dev/null differ diff --git a/icons/obj/atmospherics/filter.dmi b/icons/obj/atmospherics/filter.dmi deleted file mode 100644 index 99afb55d22b..00000000000 Binary files a/icons/obj/atmospherics/filter.dmi and /dev/null differ diff --git a/icons/obj/atmospherics/mainspipe.dmi b/icons/obj/atmospherics/mainspipe.dmi deleted file mode 100644 index df6c2bc0d3a..00000000000 Binary files a/icons/obj/atmospherics/mainspipe.dmi and /dev/null differ diff --git a/icons/obj/atmospherics/n2o_pipe_tank.dmi b/icons/obj/atmospherics/n2o_pipe_tank.dmi deleted file mode 100644 index 40efbd9f15d..00000000000 Binary files a/icons/obj/atmospherics/n2o_pipe_tank.dmi and /dev/null differ diff --git a/icons/obj/atmospherics/omni_devices.dmi b/icons/obj/atmospherics/omni_devices.dmi deleted file mode 100644 index 44497310026..00000000000 Binary files a/icons/obj/atmospherics/omni_devices.dmi and /dev/null differ diff --git a/icons/obj/atmospherics/orange_pipe_tank.dmi b/icons/obj/atmospherics/orange_pipe_tank.dmi deleted file mode 100644 index cc9442b8033..00000000000 Binary files a/icons/obj/atmospherics/orange_pipe_tank.dmi and /dev/null differ diff --git a/icons/obj/atmospherics/passive_gate.dmi b/icons/obj/atmospherics/passive_gate.dmi deleted file mode 100644 index 42e8c9dc74f..00000000000 Binary files a/icons/obj/atmospherics/passive_gate.dmi and /dev/null differ diff --git a/icons/obj/atmospherics/pipe_manifold.dmi b/icons/obj/atmospherics/pipe_manifold.dmi deleted file mode 100644 index 1e6f5750d1b..00000000000 Binary files a/icons/obj/atmospherics/pipe_manifold.dmi and /dev/null differ diff --git a/icons/obj/atmospherics/pipe_tank.dmi b/icons/obj/atmospherics/pipe_tank.dmi deleted file mode 100644 index 72310a2657d..00000000000 Binary files a/icons/obj/atmospherics/pipe_tank.dmi and /dev/null differ diff --git a/icons/obj/atmospherics/pipe_vent.dmi b/icons/obj/atmospherics/pipe_vent.dmi deleted file mode 100644 index e40f5946cf8..00000000000 Binary files a/icons/obj/atmospherics/pipe_vent.dmi and /dev/null differ diff --git a/icons/obj/atmospherics/portables_connector.dmi b/icons/obj/atmospherics/portables_connector.dmi deleted file mode 100644 index c651b959990..00000000000 Binary files a/icons/obj/atmospherics/portables_connector.dmi and /dev/null differ diff --git a/icons/obj/atmospherics/pump.dmi b/icons/obj/atmospherics/pump.dmi deleted file mode 100644 index e44a21991ba..00000000000 Binary files a/icons/obj/atmospherics/pump.dmi and /dev/null differ diff --git a/icons/obj/atmospherics/red_orange_pipe_tank.dmi b/icons/obj/atmospherics/red_orange_pipe_tank.dmi deleted file mode 100644 index 1770c46312a..00000000000 Binary files a/icons/obj/atmospherics/red_orange_pipe_tank.dmi and /dev/null differ diff --git a/icons/obj/atmospherics/red_pipe_tank.dmi b/icons/obj/atmospherics/red_pipe_tank.dmi deleted file mode 100644 index 3fedc659e03..00000000000 Binary files a/icons/obj/atmospherics/red_pipe_tank.dmi and /dev/null differ diff --git a/icons/obj/atmospherics/relief_valve.dmi b/icons/obj/atmospherics/relief_valve.dmi deleted file mode 100644 index 485bf792b19..00000000000 Binary files a/icons/obj/atmospherics/relief_valve.dmi and /dev/null differ diff --git a/icons/obj/atmospherics/valve.dmi b/icons/obj/atmospherics/valve.dmi deleted file mode 100644 index 9ce45199bd7..00000000000 Binary files a/icons/obj/atmospherics/valve.dmi and /dev/null differ diff --git a/icons/obj/atmospherics/vent_pump.dmi b/icons/obj/atmospherics/vent_pump.dmi deleted file mode 100644 index 6b1f57baa44..00000000000 Binary files a/icons/obj/atmospherics/vent_pump.dmi and /dev/null differ diff --git a/icons/obj/atmospherics/vent_scrubber.dmi b/icons/obj/atmospherics/vent_scrubber.dmi deleted file mode 100644 index 7133072cd79..00000000000 Binary files a/icons/obj/atmospherics/vent_scrubber.dmi and /dev/null differ diff --git a/icons/obj/atmospherics/volume_pump.dmi b/icons/obj/atmospherics/volume_pump.dmi deleted file mode 100644 index e3ff3cf9854..00000000000 Binary files a/icons/obj/atmospherics/volume_pump.dmi and /dev/null differ diff --git a/icons/obj/bureaucracy.dmi b/icons/obj/bureaucracy.dmi index 1847e985d89..3f66fa90cd6 100644 Binary files a/icons/obj/bureaucracy.dmi and b/icons/obj/bureaucracy.dmi differ diff --git a/icons/obj/cigarettes.dmi b/icons/obj/cigarettes.dmi index a0133e5b383..97710ac4805 100644 Binary files a/icons/obj/cigarettes.dmi and b/icons/obj/cigarettes.dmi differ diff --git a/icons/obj/clothing/gloves.dmi b/icons/obj/clothing/gloves.dmi index f7f54357fdb..06bb96f43a5 100644 Binary files a/icons/obj/clothing/gloves.dmi and b/icons/obj/clothing/gloves.dmi differ diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi index f942f9fd8cd..30f34f01b4f 100644 Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ diff --git a/icons/obj/clothing/shoes.dmi b/icons/obj/clothing/shoes.dmi index 30cdfae56ef..aae2d9df6fb 100644 Binary files a/icons/obj/clothing/shoes.dmi and b/icons/obj/clothing/shoes.dmi differ diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi index 7400d5d63ef..62fc0a6120c 100644 Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ diff --git a/icons/obj/clothing/uniforms.dmi b/icons/obj/clothing/uniforms.dmi index bb7a1ce9188..39789326c49 100644 Binary files a/icons/obj/clothing/uniforms.dmi and b/icons/obj/clothing/uniforms.dmi differ diff --git a/icons/obj/contraband.dmi b/icons/obj/contraband.dmi index 97a11d05cad..444863abd71 100644 Binary files a/icons/obj/contraband.dmi and b/icons/obj/contraband.dmi differ diff --git a/icons/obj/decals.dmi b/icons/obj/decals.dmi index 7351c8c7483..35ce076db6c 100644 Binary files a/icons/obj/decals.dmi and b/icons/obj/decals.dmi differ diff --git a/icons/obj/hydroponics/equipment.dmi b/icons/obj/hydroponics/equipment.dmi index 9ad33b40e9d..3cb9e63cb38 100644 Binary files a/icons/obj/hydroponics/equipment.dmi and b/icons/obj/hydroponics/equipment.dmi differ diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi index bc7e927aab2..e30f3e44392 100644 Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ diff --git a/icons/obj/lighting.dmi b/icons/obj/lighting.dmi index f8943c2c39b..49b594c1656 100644 Binary files a/icons/obj/lighting.dmi and b/icons/obj/lighting.dmi differ diff --git a/icons/obj/paper.dmi b/icons/obj/paper.dmi deleted file mode 100644 index 55781076833..00000000000 Binary files a/icons/obj/paper.dmi and /dev/null differ diff --git a/icons/obj/reagentfillings.dmi b/icons/obj/reagentfillings.dmi index 60eb897b2b1..51e9b66ee30 100644 Binary files a/icons/obj/reagentfillings.dmi and b/icons/obj/reagentfillings.dmi differ diff --git a/icons/obj/recycling.dmi b/icons/obj/recycling.dmi index 2a47e6817bb..c30eb425dda 100644 Binary files a/icons/obj/recycling.dmi and b/icons/obj/recycling.dmi differ diff --git a/icons/obj/rig_modules.dmi b/icons/obj/rig_modules.dmi deleted file mode 100644 index 90b1873d58e..00000000000 Binary files a/icons/obj/rig_modules.dmi and /dev/null differ diff --git a/icons/obj/toy.dmi b/icons/obj/toy.dmi index 1ef7016307d..c51d2903b14 100644 Binary files a/icons/obj/toy.dmi and b/icons/obj/toy.dmi differ diff --git a/nano/package-lock.json b/nano/package-lock.json index b96939c5d9a..14642f304d6 100644 --- a/nano/package-lock.json +++ b/nano/package-lock.json @@ -1728,9 +1728,9 @@ "dev": true }, "elliptic": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", - "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", "requires": { "bn.js": "^4.4.0", "brorand": "^1.0.1", diff --git a/nano/templates/alarm_monitor.tmpl b/nano/templates/alarm_monitor.tmpl deleted file mode 100644 index 5dae051a576..00000000000 --- a/nano/templates/alarm_monitor.tmpl +++ /dev/null @@ -1,39 +0,0 @@ - - -{{for data.categories}} -

    {{:value.category}}

    - {{for value.alarms :alarmValue:alarmIndex}} - {{if alarmValue.origin_lost}} - {{:alarmValue.name}} Alarm Origin Lost
    - {{else}} - {{:alarmValue.name}}
    - {{/if}} - {{if alarmValue.has_cameras || alarmValue.lost_sources != ""}} -
    - {{if alarmValue.has_cameras}} -
    - {{for alarmValue.cameras :cameraValue:cameraIndex}} - {{if cameraValue.deact}} - {{:helper.link(cameraValue.name + " (deactivated)", '', {}, 'inactive')}} - {{else}} - {{:helper.link(cameraValue.name, '', {'switchTo' : cameraValue.camera})}} - {{/if}} - {{/for}} -
    - {{else}} - No cameras found. - {{/if}} - {{if alarmValue.lost_sources != ""}} -
    -

    Lost Alarm Sources: {{:alarmValue.lost_sources}}

    -
    - {{/if}} -
    - {{/if}} - {{empty}} - --All Systems Nominal - {{/for}} -{{/for}} \ No newline at end of file diff --git a/nano/templates/atmos_alert.tmpl b/nano/templates/atmos_alert.tmpl deleted file mode 100644 index bdb6c2c872b..00000000000 --- a/nano/templates/atmos_alert.tmpl +++ /dev/null @@ -1,18 +0,0 @@ -

    Priority Alerts

    -{{for data.priority_alarms}} -
    - {{:value.name}} {{:helper.link('Reset', null, {'clear_alarm' : value.ref})}} -
    -{{empty}} - No priority alerts detected. -{{/for}} - -

    Minor Alerts

    -{{for data.minor_alarms}} -
    - {{:value.name}} {{:helper.link('Reset', null, {'clear_alarm' : value.ref})}} -
    -{{empty}} - No minor alerts detected. -{{/for}} - diff --git a/nano/templates/bsa.tmpl b/nano/templates/bsa.tmpl deleted file mode 100644 index a0e8a60deb5..00000000000 --- a/nano/templates/bsa.tmpl +++ /dev/null @@ -1,51 +0,0 @@ - -{{if data.notice}} -
    {{:data.notice}}
    -{{/if}} -

    Bluespace Artillery Control

    -
    -
    - Target: -
    -
    - {{:helper.link(data.target ? data.target : "None", 'crosshairs', {'recalibrate' : 1})}} -
    -
    -
    -
    - Reload Cooldown: -
    -
    - {{if data.ready}} - Ready - {{else data.reloadtime_mins || data.reloadtime_secs}} - {{:data.reloadtime_mins}}:{{:data.reloadtime_secs}} - {{else}} - No cannon connected! - {{/if}} -
    -
    -
    -
    - Controls: -
    -
    - {{:helper.link('FIRE!', 'warning', {'fire' : 1}, data.ready && data.target ? null : 'disabled')}} -
    -
    -{{if !data.connected}} -
    -
    - Maintenance: -
    -
    - {{:helper.link('Complete Deployment', 'wrench', {'build' : 1})}} -
    -
    -{{else}} -
    -Deployment of weapon authorized by Nanotrasen Naval Command. Remember, friendly fire is grounds for termination of your contract and life. -{{/if}} \ No newline at end of file diff --git a/nano/templates/comm_console.tmpl b/nano/templates/comm_console.tmpl index e7224df2ecc..2c36a011ac6 100644 --- a/nano/templates/comm_console.tmpl +++ b/nano/templates/comm_console.tmpl @@ -71,13 +71,6 @@ Used In File(s): /code/game/machinery/computers/communications.dm
    {{:helper.link('Restart Nano-Mob Hunter GO! Server','power-off',{'operation':'RestartNanoMob'})}}
    -
    - {{if data.atcSquelched}} - {{:helper.link('Enable ATC Relay', 'signal', {'operation': 'ToggleATC'})}} - {{else}} - {{:helper.link('Disable ATC Relay', 'signal', {'operation': 'ToggleATC'})}} - {{/if}} -
    {{else data.screen==2}} diff --git a/nano/templates/wires.tmpl b/nano/templates/wires.tmpl deleted file mode 100644 index 2702d97d7dc..00000000000 --- a/nano/templates/wires.tmpl +++ /dev/null @@ -1,24 +0,0 @@ -
    - - {{for data.wires}} - - - - - {{/for}} -
    {{:value.colour_name}} {{if value.index}}({{:value.index}}){{/if}} - {{:helper.link(value.cut ? 'Mend' : 'Cut', null, {'action' : 'cut', 'wire' : value.colour})}} - {{:helper.link('Pulse', null, {'action' : 'pulse', 'wire' : value.colour})}} - {{:helper.link(value.attached ? 'Detach' : 'Attach', null, {'action' : 'attach', 'wire' : value.colour})}} -
    -
    -{{if data.status_len}} -
    -
    -
    - {{for data.status}} -
    {{:value}}
    - {{/for}} -
    -
    -{{/if}} diff --git a/paradise.dme b/paradise.dme index a46eeb48bed..e67fd07ae13 100644 --- a/paradise.dme +++ b/paradise.dme @@ -75,6 +75,7 @@ #include "code\__DEFINES\tools.dm" #include "code\__DEFINES\typeids.dm" #include "code\__DEFINES\vv.dm" +#include "code\__DEFINES\wires.dm" #include "code\__DEFINES\zlevel.dm" #include "code\__DEFINES\dcs\flags.dm" #include "code\__DEFINES\dcs\helpers.dm" @@ -88,6 +89,7 @@ #include "code\__HELPERS\files.dm" #include "code\__HELPERS\game.dm" #include "code\__HELPERS\global_lists.dm" +#include "code\__HELPERS\heap.dm" #include "code\__HELPERS\icon_smoothing.dm" #include "code\__HELPERS\icons.dm" #include "code\__HELPERS\lists.dm" @@ -109,8 +111,6 @@ #include "code\__HELPERS\sorts\InsertSort.dm" #include "code\__HELPERS\sorts\MergeSort.dm" #include "code\__HELPERS\sorts\TimSort.dm" -#include "code\_DATASTRUCTURES\heap.dm" -#include "code\_DATASTRUCTURES\stacks.dm" #include "code\_globalvars\configuration.dm" #include "code\_globalvars\game_modes.dm" #include "code\_globalvars\genetics.dm" @@ -137,7 +137,6 @@ #include "code\_onclick\observer.dm" #include "code\_onclick\other_mobs.dm" #include "code\_onclick\overmind.dm" -#include "code\_onclick\rig.dm" #include "code\_onclick\telekinesis.dm" #include "code\_onclick\hud\_defines.dm" #include "code\_onclick\hud\action_button.dm" @@ -218,11 +217,10 @@ #include "code\controllers\subsystem\assets.dm" #include "code\controllers\subsystem\atoms.dm" #include "code\controllers\subsystem\changelog.dm" -#include "code\controllers\subsystem\chat.dm" -#include "code\controllers\subsystem\dcs.dm" #include "code\controllers\subsystem\events.dm" #include "code\controllers\subsystem\fires.dm" #include "code\controllers\subsystem\garbage.dm" +#include "code\controllers\subsystem\ghost_spawns.dm" #include "code\controllers\subsystem\holiday.dm" #include "code\controllers\subsystem\icon_smooth.dm" #include "code\controllers\subsystem\idlenpcpool.dm" @@ -253,6 +251,7 @@ #include "code\controllers\subsystem\titlescreen.dm" #include "code\controllers\subsystem\vote.dm" #include "code\controllers\subsystem\weather.dm" +#include "code\controllers\subsystem\processing\dcs.dm" #include "code\controllers\subsystem\processing\fastprocess.dm" #include "code\controllers\subsystem\processing\instruments.dm" #include "code\controllers\subsystem\processing\obj.dm" @@ -276,6 +275,7 @@ #include "code\datums\hud.dm" #include "code\datums\log_record.dm" #include "code\datums\log_viewer.dm" +#include "code\datums\logging.dm" #include "code\datums\mind.dm" #include "code\datums\mixed.dm" #include "code\datums\mutable_appearance.dm" @@ -688,7 +688,6 @@ #include "code\game\machinery\syndicatebomb.dm" #include "code\game\machinery\teleporter.dm" #include "code\game\machinery\transformer.dm" -#include "code\game\machinery\turntable.dm" #include "code\game\machinery\turret_control.dm" #include "code\game\machinery\vending.dm" #include "code\game\machinery\washing_machine.dm" @@ -943,6 +942,7 @@ #include "code\game\objects\items\tools\wrench.dm" #include "code\game\objects\items\weapons\AI_modules.dm" #include "code\game\objects\items\weapons\alien_specific.dm" +#include "code\game\objects\items\weapons\batons.dm" #include "code\game\objects\items\weapons\bee_briefcase.dm" #include "code\game\objects\items\weapons\cards_ids.dm" #include "code\game\objects\items\weapons\cash.dm" @@ -991,7 +991,6 @@ #include "code\game\objects\items\weapons\staff.dm" #include "code\game\objects\items\weapons\stock_parts.dm" #include "code\game\objects\items\weapons\stunbaton.dm" -#include "code\game\objects\items\weapons\swords_axes_etc.dm" #include "code\game\objects\items\weapons\tape.dm" #include "code\game\objects\items\weapons\teleportation.dm" #include "code\game\objects\items\weapons\teleprod.dm" @@ -1199,7 +1198,6 @@ #include "code\modules\admin\sql_notes.dm" #include "code\modules\admin\stickyban.dm" #include "code\modules\admin\topic.dm" -#include "code\modules\admin\ToRban.dm" #include "code\modules\admin\watchlist.dm" #include "code\modules\admin\DB ban\functions.dm" #include "code\modules\admin\permissionverbs\permissionedit.dm" @@ -1209,8 +1207,8 @@ #include "code\modules\admin\verbs\adminjump.dm" #include "code\modules\admin\verbs\adminpm.dm" #include "code\modules\admin\verbs\adminsay.dm" -#include "code\modules\admin\verbs\alt_check.dm" #include "code\modules\admin\verbs\antag-ooc.dm" +#include "code\modules\admin\verbs\asays.dm" #include "code\modules\admin\verbs\atmosdebug.dm" #include "code\modules\admin\verbs\BrokenInhands.dm" #include "code\modules\admin\verbs\cinematic.dm" @@ -1238,7 +1236,6 @@ #include "code\modules\admin\verbs\randomverbs.dm" #include "code\modules\admin\verbs\serialization.dm" #include "code\modules\admin\verbs\space_transitions.dm" -#include "code\modules\admin\verbs\spawnfloorcluwne.dm" #include "code\modules\admin\verbs\striketeam.dm" #include "code\modules\admin\verbs\striketeam_syndicate.dm" #include "code\modules\admin\verbs\ticklag.dm" @@ -1248,14 +1245,6 @@ #include "code\modules\admin\verbs\SDQL2\SDQL_2.dm" #include "code\modules\admin\verbs\SDQL2\SDQL_2_parser.dm" #include "code\modules\admin\verbs\SDQL2\useful_procs.dm" -#include "code\modules\alarm\alarm.dm" -#include "code\modules\alarm\alarm_handler.dm" -#include "code\modules\alarm\atmosphere_alarm.dm" -#include "code\modules\alarm\burglar_alarm.dm" -#include "code\modules\alarm\camera_alarm.dm" -#include "code\modules\alarm\fire_alarm.dm" -#include "code\modules\alarm\motion_alarm.dm" -#include "code\modules\alarm\power_alarm.dm" #include "code\modules\antagonists\_common\antag_datum.dm" #include "code\modules\antagonists\_common\antag_helpers.dm" #include "code\modules\antagonists\_common\antag_hud.dm" @@ -1331,9 +1320,6 @@ #include "code\modules\buildmode\submodes\save.dm" #include "code\modules\buildmode\submodes\throwing.dm" #include "code\modules\buildmode\submodes\variable_edit.dm" -#include "code\modules\busy_space\air_traffic.dm" -#include "code\modules\busy_space\loremaster.dm" -#include "code\modules\busy_space\organizations.dm" #include "code\modules\client\asset_cache.dm" #include "code\modules\client\client defines.dm" #include "code\modules\client\client procs.dm" @@ -1383,7 +1369,6 @@ #include "code\modules\clothing\shoes\magboots.dm" #include "code\modules\clothing\shoes\miscellaneous.dm" #include "code\modules\clothing\spacesuits\alien.dm" -#include "code\modules\clothing\spacesuits\breaches.dm" #include "code\modules\clothing\spacesuits\chronosuit.dm" #include "code\modules\clothing\spacesuits\ert.dm" #include "code\modules\clothing\spacesuits\hardsuit.dm" @@ -1391,24 +1376,6 @@ #include "code\modules\clothing\spacesuits\plasmamen.dm" #include "code\modules\clothing\spacesuits\syndi.dm" #include "code\modules\clothing\spacesuits\void.dm" -#include "code\modules\clothing\spacesuits\rig\rig.dm" -#include "code\modules\clothing\spacesuits\rig\rig_armormod.dm" -#include "code\modules\clothing\spacesuits\rig\rig_attackby.dm" -#include "code\modules\clothing\spacesuits\rig\rig_pieces.dm" -#include "code\modules\clothing\spacesuits\rig\rig_verbs.dm" -#include "code\modules\clothing\spacesuits\rig\rig_wiring.dm" -#include "code\modules\clothing\spacesuits\rig\modules\combat.dm" -#include "code\modules\clothing\spacesuits\rig\modules\computer.dm" -#include "code\modules\clothing\spacesuits\rig\modules\modules.dm" -#include "code\modules\clothing\spacesuits\rig\modules\ninja.dm" -#include "code\modules\clothing\spacesuits\rig\modules\utility.dm" -#include "code\modules\clothing\spacesuits\rig\modules\vision.dm" -#include "code\modules\clothing\spacesuits\rig\suits\alien.dm" -#include "code\modules\clothing\spacesuits\rig\suits\combat.dm" -#include "code\modules\clothing\spacesuits\rig\suits\ert_suits.dm" -#include "code\modules\clothing\spacesuits\rig\suits\light.dm" -#include "code\modules\clothing\spacesuits\rig\suits\merc.dm" -#include "code\modules\clothing\spacesuits\rig\suits\station.dm" #include "code\modules\clothing\suits\alien.dm" #include "code\modules\clothing\suits\armor.dm" #include "code\modules\clothing\suits\bio.dm" @@ -2114,7 +2081,6 @@ #include "code\modules\modular_computers\file_system\programs\antagonist\revelation.dm" #include "code\modules\modular_computers\file_system\programs\command\card.dm" #include "code\modules\modular_computers\file_system\programs\command\comms.dm" -#include "code\modules\modular_computers\file_system\programs\engineering\alarm.dm" #include "code\modules\modular_computers\file_system\programs\engineering\power_monitor.dm" #include "code\modules\modular_computers\file_system\programs\engineering\sm_monitor.dm" #include "code\modules\modular_computers\file_system\programs\generic\configurator.dm" @@ -2152,7 +2118,6 @@ #include "code\modules\nano\interaction\physical.dm" #include "code\modules\nano\interaction\self.dm" #include "code\modules\nano\interaction\zlevel.dm" -#include "code\modules\nano\modules\alarm_monitor.dm" #include "code\modules\nano\modules\atmos_control.dm" #include "code\modules\nano\modules\ert_manager.dm" #include "code\modules\nano\modules\human_appearance.dm" @@ -2438,7 +2403,6 @@ #include "code\modules\surgery\other.dm" #include "code\modules\surgery\plastic_surgery.dm" #include "code\modules\surgery\remove_embedded_object.dm" -#include "code\modules\surgery\rig_removal.dm" #include "code\modules\surgery\robotics.dm" #include "code\modules\surgery\surgery.dm" #include "code\modules\surgery\tools.dm" diff --git a/sound/music/thunderdome.ogg b/sound/music/thunderdome.ogg index 26b18df5e05..82780e416d4 100644 Binary files a/sound/music/thunderdome.ogg and b/sound/music/thunderdome.ogg differ diff --git a/sound/turntable/testloop.ogg b/sound/turntable/testloop.ogg deleted file mode 100644 index 453ad568fa2..00000000000 Binary files a/sound/turntable/testloop.ogg and /dev/null differ diff --git a/sound/turntable/testloop1.ogg b/sound/turntable/testloop1.ogg deleted file mode 100644 index 5e1210bfd06..00000000000 Binary files a/sound/turntable/testloop1.ogg and /dev/null differ diff --git a/sound/turntable/testloop2.ogg b/sound/turntable/testloop2.ogg deleted file mode 100644 index 5feaa762936..00000000000 Binary files a/sound/turntable/testloop2.ogg and /dev/null differ diff --git a/sound/turntable/testloop3.ogg b/sound/turntable/testloop3.ogg deleted file mode 100644 index 9ac0e02b773..00000000000 Binary files a/sound/turntable/testloop3.ogg and /dev/null differ diff --git a/strings/tips.txt b/strings/tips.txt index b2df1c17482..4218e01bbfe 100644 --- a/strings/tips.txt +++ b/strings/tips.txt @@ -1,4 +1,4 @@ -Where the space map levels connect is randomized every round, but are otherwise kept consistent within rounds. +Space map levels' connections are randomized between rounds, but are otherwise kept consistent in the same round. You can catch thrown items by toggling on your throw mode with an empty hand active. To crack the safe in the vault, use a stethoscope or thermal drill. You can climb onto a table by dragging yourself onto one. This takes some time. Clicking on a table that someone else is climbing onto will knock them down. @@ -9,8 +9,8 @@ You can change the control scheme by pressing tab. One uses WASD for movement, w Firesuits and winter coats offer mild protection from the cold, allowing you to spend longer periods of time near breaches and space than if wearing nothing at all. Glass shards can be welded to make glass, and metal rods can be welded to make metal. Ores can be welded too, but this takes a lot of fuel. If you need to drag multiple people either to safety or to space, bring a locker over and stuff them all in before hauling them off. -You can grab someone by clicking on them with the grab intent, then upgrade the grab by clicking on them once more. An aggressive grab will momentarily stun someone, allow you to place them on a table by clicking on it, or throw them by toggling on throwing. -Holding alt and left clicking a tile will allow you to see its contents in the top right window pane, which is much faster than right clicking. +You can grab someone by clicking on them with the grab intent, then upgrade the grab by clicking on the grab itself. An aggressive grab will allow you to place them on a table by clicking on it, or throw them by toggling on throwing. +Holding alt and left clicking a tile will allow you to see its contents in the top right window panel, which is much faster than right clicking. The resist button will allow you to resist out of handcuffs, being buckled to a chair or bed, out of locked lockers and more. Whenever you're stuck, try resisting! You can move an item out of the way by dragging it and then clicking on an adjacent tile with an empty hand. You can recolor certain items like jumpsuits and gloves in washing machines by also throwing in a crayon. @@ -21,7 +21,7 @@ When in doubt about technicial issues, clear your cache (byond launcher > cogwhe Most things have special interactions with your middle mouse button, alt, shift, and control click. Experiment! If you find yourself in a fistfight with another player, running away and calling for help is a perfectly viable option. Different weapons have different strengths. Some weapons, such as spears, floor tiles, and throwing stars, deal more damage when thrown compared to when attacked normally. -A thrown glass of water can make a slippery tile, allowing you to slow down your pursuers in a pinch. +Clicking on a tile on harm intent with a glass of water can make a slippery tile, allowing you to slow down your pursuers in a pinch. When dealing with security, you can often get your sentence negated entirely through cooperation and deception. The P2P chat function found on tablet computers allows for a stealthy way to communicate with people. We were all new once, be patient and guide new players in the right direction. @@ -36,8 +36,8 @@ As the Captain, you have absolute access and control over the station, but this As the Chief Medical Officer, your hypospray is like a refillable instant injection syringe that can hold 30 units and the unlike standard hypospray, yours is able to be filled with harmful reagents and injects without telling anyone what have you exactly injected the person with. As the Chief Medical Officer, coordinate and communicate with your doctors, chemists, and geneticists during a nuclear emergency, blob infestation, or some other crisis to keep people alive and fighting. As a Medical Doctor, you can surgically implant or extract things from people's chests. This can range from putting in a bomb to pulling out an alien larva. -As a Medical Doctor, you must target the correct limb and be on help intent when trying to perform surgery on someone. Using disarm intent will intentionally fail the surgery step. -As a Medical Doctor, corpses with the "...and their soul has departed" description no longer have a ghost attached to them and aren't revivable or clonable. +As a Medical Doctor, you must target the correct limb and be on help intent when trying to perform surgery on someone. +As a Medical Doctor, corpses with the "...and their soul has departed" description no longer have a ghost attached to them and aren't revivable or clonable right now, but they might be clonable later. As a Medical Doctor, treating plasmamen is not impossible! Salbutamol stops them from suffocating and showers stop them from burning alive. You can even perform surgery on them by doing the procedure on a roller bed under a shower. As a Chemist, there are dozens of chemicals that can heal, and even more that can cause harm. Experiment! As a Chemist, some chemicals can only be synthesized by heating up the contents with a chemical heater or manually with lighters and similar tools. @@ -50,7 +50,7 @@ As the Research Director, you can take AIs out of their cores by loading them in As the Research Director, you can lock down cyborgs instead of blowing them up. Then you can have their laws reset or if that doesn't work, safely dismantled. As the Research Director, you can spy on and even forge PDA communications with the message monitor console! The key is in your office. As a Scientist, you can maximize the number of uses you get out of a slime by feeding it slime steroid, created from purple slimes, while alive. You can then apply extract enhancer, created from cerulean slimes, on each extract. -As a Scientist, you can disable anomalies by scanning them with an analyzer, then send a signal on the frequency it gives you with a remote signaling device, or if researched, hit the anomaly with an anomaly analyzer. This will leave behind an anomaly core, which can be used to construct a Phazon mech or reactive armors! +As a Scientist, you can disable anomalies by scanning them with an analyzer, then send a signal on the frequency it gives you with a remote signaling device. This will leave behind an anomaly core, which can be used to construct a Phazon mech! As a Scientist, researchable stock parts can seriously improve the efficiency and speed of machines around the station. In some cases, it can even unlock new functions. As a Roboticist, keep an ear out for anomaly announcements. If you get your hands on an anomaly core, you can build a Phazon mech! As a Roboticist, you can repair your cyborgs with a welding tool. If they have taken burn damage, you can remove their battery, expose the wiring with a screwdriver and replace their wires with a cable coil. @@ -59,12 +59,12 @@ As a Roboticist, you can augment people with cyborg limbs. Augmented limbs can e As the AI, you can click on people's names to look at them. This only works if there are cameras that can see them, they aren't wearing agent IDs, or aren't using digital camouflage as changelings. As the AI, you can quickly open and close doors by holding shift while clicking them, bolt them when holding ctrl, and even shock them while holding alt. As the AI, you can take pictures with your camera and upload them to newscasters. -As a Cyborg, choose your module carefully, as only cutting and mending your reset wire or using a cyborg reset module will let you repick it. If possible, refrain from choosing a module until a situation that requires one occurs. +As a Cyborg, choose your module carefully, as only a cyborg reset module will let you repick it. As a Cyborg, you are immune to most forms of stunning, and excel at almost everything far better than humans. However, flashes can easily stunlock you and you cannot do any precision work as you lack hands. As a Cyborg, you are impervious to fires and heat. If you are rogue, you can release plasma fires everywhere and walk through them without a care in the world! As a Cyborg, you are extremely vulnerable to EMPs as EMPs both stun you and damage you. The ion rifle in the armory or a traitor with an EMP kit can kill you in seconds. -As an Engineering Cyborg, you can attach air alarm/fire alarm/APC frames to walls by placing them on the floor and using a screwdriver on them. -As a Medical Cyborg, you can fully perform surgery and even augment people. +As an Engineering Cyborg, you can attach air alarm/fire alarm/APC frames to walls by using your magnetic gripper. +As a Medical Cyborg, you can partially perform surgery, as you cannot replace organs, but you cannot fail any surgery steps. As a Janitor Cyborg, you are the bane of all slaughter demons. Cleaning up blood stains will severely gimp them. As the Chief Engineer, you can rename areas or create entirely new ones using your station blueprints. As the Chief Engineer, your hardsuit is significantly better than everybody else's. It has the best features of both engineering and atmospherics hardsuits, boasting nigh-invulnerability to radiation and all atmospheric conditions. @@ -73,10 +73,10 @@ As an Engineer, you can electrify grilles by placing wire "nodes" beneath them: As an Engineer, return to Engineering once in a while to check on the engine and SMES cells. It's always a good idea to make sure containment isn't compromised. As an Engineer, you can power the station solely with the solar arrays. They will provide just enough electricity to power the station, however their output is still much worse compared to the true engine. As an Engineer, you can cool a supermatter shard by spraying it with a fire extinguisher. Only for the brave! -As an Engineer, you can repair windows by using a welding tool on them while on any intent other than harm. +As an Engineer, you can repair windows by using a welding tool on them while on help intent. As an Engineer, you can lock APCs, fire alarms, emitters, and radiation collectors using your ID card to prevent others from disabling them. As an Engineer, don't underestimate the humble P.A.C.M.A.N. generators. With upgraded parts, a couple units working in tandem are sufficient to take over for an exploded engine or shattered solars. -As an Engineer, you can pry open secure storage blast doors by disabling the engine room APC's main breaker. This is obviously a bad idea if the engine is running. +As an Engineer, you can pry open secure storage blast doors by turning off the secure storage APC's enviroment power channel. As an Atmospheric Technician, look into replacing your gas pumps with volumetric gas pumps, as those move air in flat numerical amounts, rather than percentages which leave trace gases. As an Atmospheric Technician, you are better suited to fighting fires than anyone else. As such, you have access to better firesuits, backpack firefighter tanks, and a completely heat and fire proof hardsuit. As an Atmospheric Technician, your backpack firefighter tank can launch cryofrost. This resin will extinguish fires and very quickly; it's ideal for plasma fires! @@ -88,7 +88,7 @@ As the Warden, keep a close eye on the armory at all times, as it is a favored s As the Warden, if a prisoner's crimes are heinous enough you can put them in permabrig or the gulag. Make sure to check on them once in a while! As the Warden, you can implant criminals you suspect might re-offend with devices that will track their location and allow you to remotely inject them with disabling chemicals. As a Security Officer, communicate and coordinate with your fellow officers using the security channel (:s) to avoid confusion. -As a Security Officer, your sechuds or HUDsunglasses can not only see crewmates' job assignments and criminal status, but also if they are mindshield implanted. You can tell by the flashing blue outline around their job icon. +As a Security Officer, your sechuds or HUDsunglasses let you see crewmates' job assignments, their criminal status, and whether they have a mindshield or not. A flashing green border around their job icon means they are mindshielded. As a Security Officer, mindshield implants can only prevent someone from being turned into a cultist. It will not de-cult them if they have already been converted. As a Security Officer, examining someone while wearing sechuds or HUDsunglasses will let you set their arrest level, which will cause Beepsky and other security bots to chase after them. As the Detective, keep in mind that people leave fingerprints everywhere and on everything. With the exception of white latex, gloves will hide them. All is not lost, however, as gloves leave fibers specific to their kind such as black or nitrile, pointing to a general department. @@ -111,7 +111,7 @@ As the Chaplain, you are much more likely to get a response by praying to the go As a Botanist, you can hack the MegaSeed Vendor to get access to more exotic seeds. These seeds can alternatively be ordered from cargo. As a Botanist, you can mutate the plants growing in your hydroponics trays with unstable mutagen or, as an alternative, crude radioactives from chemistry to get special variations. As a Botanist, you should look into increasing the potency of your plants. This increases the size, amount of chemicals, points gained from grinding them in the biogenerator, and lets people know you are a proficient botanist. -As a Botanist, you can combine production trait chemicals just like a Chemist. Chlorine (blumpkin) + radium and phosphorus (glowshrooms) equals unstable mutagen! +As a Botanist, you can combine production trait chemicals just like a Chemist. Chlorine and plasma (blumpkin) + radium (glowshrooms) equals unstable mutagen! As the Chef, you can create a very wide variety of food with the crafting menu. You can find it by looking for the hammer icon near your intents. As the Chef, you can rename your custom made food with a pen. As the Chef, if you are low on ingredients, consider making something that has several servings to last longer among the crew. @@ -121,8 +121,8 @@ As a Janitor, mousetraps can be used to create bombs or booby-trap containers. As the Librarian, be sure to keep the shelves stocked and the library clean for crew. As a Cargo Technician, you can hack MULEbots to make them faster, run over people in their way, and even let you ride them! As a Cargo Technician, you can order contraband items from the supply shuttle console by de-constructing it and using a multitool on the circuit board, the re-assembling it. -As a Cargo Technician, you can earn more cargo points by shipping back crates from maintenance, liquid containers, plasma sheets, rare seeds from hydroponics, and more! -As a Shaft Miner, the western side of the Asteroid has a lot more rare minerals than on the east, but is a lot more dangerous. +As a Cargo Technician, you can earn more cargo points by shipping back crates from maintenance, plasma sheets, rare seeds from hydroponics, technology disks from R&D, and more! +As a Shaft Miner, the north side of Lavaland has a lot more rare minerals than on the south, but is a lot more dangerous. As a Shaft Miner, always have a GPS on you, so a fellow miner or cyborg can come to save you if you die. As a Traitor, the cryptographic sequencer (emag) can not only open doors, but also lockers, crates, APCs and more. It can hack cyborgs, and even cause bots to go berserk. Use it on the right machines, and you can even order more traitor gear or contact the Syndicate. Experiment! As a Traitor, subverting the AI to serve you can make it an extremely powerful ally. However, be careful of the wording in the laws you give it, as it may use your poorly written laws against you! @@ -130,14 +130,14 @@ As a Traitor, the Captain and the Head of Security are two of the most difficult As a Traitor, you can manufacture and recycle revolver bullets at a hacked autolathe, making the revolver an extremely powerful tool. As a Traitor, you may sometimes be assigned to hunt other traitors, and in turn be hunted by others. As a Traitor, the syndicate encryption key is very useful for coordinating plans with your fellow traitors -- or, of course, betraying them. -As a Traitor, plasma can be injected into many things to sabotage them. Power cells, light bulbs, welding tools, cigars and e-cigs will all explode when used. +As a Traitor, plasma can be injected into many things to sabotage them. Power cells, light bulbs, cigars and e-cigs will all explode when used. As a Traitor, if you can find another Traitor and pool your TC you can buy a mega surplus crate, which costs 40TC but contains a lot of random syndicate gear. As a Nuclear Operative, communication is key! Use ; to speak to your fellow operatives and coordinate an attack plan. As a Nuclear Operative, you should look into purchasing a syndicate cyborg, as they can provide heavy fire support, full access, are immune to conventional stuns, and can easily take down the AI. As a Nuclear Operative, stick together! While your equipment is robust, your fellow operatives are much better at saving your life: they can drag you away from danger while stunned and provide cover fire. As a Nuclear Operative, you might end up in a situation where the AI has bolted you into a room. Having some spare C4 in your pocket can save your life. As a Monkey, you can still wear a few human items, such as backpacks, gas masks, and hats, and still have two free hands. -As the Malfunctioning AI, you can shunt to an APC if the situation gets bad. This disables your doomsday device if it is active. +As the Malfunctioning AI, you can shunt to an APC if the situation gets bad. As the Malfunctioning AI, you should either order your cyborgs to dismantle the robotics console or blow it up yourself in order to protect them. As an Alien, your melee prowess is unmatched, but your ranged abilities are sorely lacking. Make use of corners to force a melee confrontation! As an Alien, you take double damage from all burn attacks, such as lasers, welding tools, and fires. Furthermore, fire can destroy your resin and eggs. Expose areas to space to starve away any flamethrower fires before they can do damage! @@ -155,11 +155,10 @@ As a Changeling, the Extract DNA sting counts for your genome absorb objective, As a Changeling, you can absorb someone by strangling them and using the Absorb verb; this gives you the ability to rechoose your powers, the DNA of whoever you absorbed, the memory of the absorbed, and some samples of things the absorbed said. As a Cultist, do not cause too much chaos before your objective is completed. If the shuttle gets called too soon, you may not have enough time to win. As a Cultist, your team starts off very weak, but if necessary can quickly convert everything they have into raw power. Make sure you have the numbers and equipment to support going loud, or the cult will fall flat on its face. -As a Cultist, the Blood Boil rune will deal massive amounts of brute damage to non-cultists, and some damage to fellow cultists of Nar'Sie nearby, but will create a fire where the rune stands on use. +As a Cultist, the Blood Boil rune will deal massive amounts of brute damage to non-cultists, and some damage to fellow cultists nearby, but will create a fire where the rune stands on use. As a Cultist, you can create an army of manifested goons using a combination of the Manifest rune, which creates homunculi from ghosts, and the Blood Drain rune, which drains life from anyone standing on any blood drain rune. -As a Cultist, check the alert in the upper-right of your screen for all the details about your cult's current status and objective. You can deconvert Cultists by feeding them large amounts of holy water. -The Chaplain can bless any container with water by hitting it with their bible. Holy water has a myriad of uses against both cults and large amounts of it are a great contributor to success against them. +The Chaplain can bless any container with water by hitting it with their bible. Holy water has a myriad of uses against cults and large amounts of it are a great contributor to success against them. As a Wizard, you can turn people to stone, then animate the resulting statue with a staff of animation to create an extremely powerful minion, for all of 5 minutes at least. As a Wizard, the fireball spell performs very poorly at close range, as it can easily catch you in the blast. It is best used as a form of artillery down long hallways. As a Wizard, summoning guns will give everyone anything from a floral somatoray to a pulse rifle. Use at your own risk! @@ -170,11 +169,10 @@ As an Abductor Agent, the combat mode vest has much higher resistance to every k As an Abductor, the baton can cycle between four modes: stun, sleep, cuff and probe. As a Revenant, the Chaplain is your worst enemy, as they can damage you massively with the null rod and make large swaths of the station impassable with holy water. As a Revenant, your essence is also your health, so revealing yourself in front of humans to harvest the essence of the living is much safer if you've already stocked up on essences from poorly guarded corpses. -As a Revenant, your Defile ability removes holy water from tiles in a small radius, along with salt, allowing you to reclaim the station from the chaplain if they've been covering the station in holy water. It can also be used to open morgue trays! +As a Revenant, your Defile ability removes holy water from tiles in a small radius, allowing you to reclaim the station from the chaplain if they've been covering the station in holy water. As a Revenant, your Overload Lights ability will only shock humans with lights if the lights are still on after a brief delay. As a Revenant, your Malfunction ability in general damages machinery and mechanical objects, possibly even emagging some objects. Experiment! -As a Revenant, the illness inflicted on humans by Blight can be easily cured by lying down or with holy water, making it best used on targets that have no time to lie down, such as humans in combat. -As a Revenant, fastmos is your friend. Breaking windows to space can cause massive damage and mayhem. +As a Revenant, space is your friend. Breaking windows to space can cause massive damage and mayhem. As a Swarmer, you can deconstruct more things than you think. Try deconstructing light switches, buttons, air alarms and more. Experiment! As a Swarmer, you can teleport fellow swarmers away if you think they are in danger. As a Ghost, you can double click on just about anything to follow it. Or just warp around! @@ -202,4 +200,4 @@ You can make lasertag turrets, for the ultimate lasertag tournament. Blob structures take half damage from brute damage. Use lasers. You can hide paper in vents, but you have to use a screwdriver to open it first. While the Standard Operating Procedures aren't fully rules, they are there for safety and professional reasons. -Killing the Wizard usually ends the round, unless they are a lich or Space Wizard Federation is RAGING. \ No newline at end of file +Killing the Wizard usually ends the round, unless they are a lich or Space Wizard Federation is RAGING. diff --git a/tgui/packages/tgui/interfaces/AtmosAlertConsole.js b/tgui/packages/tgui/interfaces/AtmosAlertConsole.js new file mode 100644 index 00000000000..8db992f61b5 --- /dev/null +++ b/tgui/packages/tgui/interfaces/AtmosAlertConsole.js @@ -0,0 +1,47 @@ +import { useBackend } from '../backend'; +import { Button, Section } from '../components'; +import { Window } from '../layouts'; + +export const AtmosAlertConsole = (props, context) => { + const { act, data } = useBackend(context); + const priorityAlerts = data.priority || []; + const minorAlerts = data.minor || []; + return ( + + +
    +
      + {priorityAlerts.length === 0 && ( +
    • + No Priority Alerts +
    • + )} + {priorityAlerts.map(alert => ( +
    • +
    • + ))} + {minorAlerts.length === 0 && ( +
    • + No Minor Alerts +
    • + )} + {minorAlerts.map(alert => ( +
    • +
    • + ))} +
    +
    +
    +
    + ); +}; diff --git a/tgui/packages/tgui/interfaces/BlueSpaceArtilleryControl.js b/tgui/packages/tgui/interfaces/BlueSpaceArtilleryControl.js new file mode 100644 index 00000000000..adc5b210aab --- /dev/null +++ b/tgui/packages/tgui/interfaces/BlueSpaceArtilleryControl.js @@ -0,0 +1,66 @@ +import { useBackend } from "../backend"; +import { Button, LabeledList, Section, Box, ProgressBar } from "../components"; +import { Window } from "../layouts"; + +export const BlueSpaceArtilleryControl = (props, context) => { + const { act, data } = useBackend(context); + let alertStatus; + if (data.ready) { + alertStatus = ( + + Ready + + ); + } else if (data.reloadtime_text) { + alertStatus = ( + + {data.reloadtime_text} + + ); + } else { + alertStatus = ( + + No cannon connected! + + ); + } + return ( + + +
    + + {data.notice && ( + + {data.notice} + + )} + {alertStatus} + +
    +
    +
    + ); +}; diff --git a/tgui/packages/tgui/interfaces/NtosStationAlertConsole.js b/tgui/packages/tgui/interfaces/NtosStationAlertConsole.js new file mode 100644 index 00000000000..67fdbcc9361 --- /dev/null +++ b/tgui/packages/tgui/interfaces/NtosStationAlertConsole.js @@ -0,0 +1,12 @@ +import { NtosWindow } from '../layouts'; +import { StationAlertConsoleContent } from './StationAlertConsole'; + +export const NtosStationAlertConsole = () => { + return ( + + + + + + ); +}; diff --git a/tgui/packages/tgui/interfaces/StationAlertConsole.js b/tgui/packages/tgui/interfaces/StationAlertConsole.js new file mode 100644 index 00000000000..504467f9850 --- /dev/null +++ b/tgui/packages/tgui/interfaces/StationAlertConsole.js @@ -0,0 +1,68 @@ +import { Fragment } from 'inferno'; +import { useBackend } from '../backend'; +import { Section } from '../components'; +import { Window } from '../layouts'; + +export const StationAlertConsole = () => { + return ( + + + + + + ); +}; + +export const StationAlertConsoleContent = (props, context) => { + const { data } = useBackend(context); + const categories = data.alarms || []; + const fire = categories['Fire'] || []; + const atmos = categories['Atmosphere'] || []; + const power = categories['Power'] || []; + return ( + +
    +
      + {fire.length === 0 && ( +
    • + Systems Nominal +
    • + )} + {fire.map(alert => ( +
    • + {alert} +
    • + ))} +
    +
    +
    +
      + {atmos.length === 0 && ( +
    • + Systems Nominal +
    • + )} + {atmos.map(alert => ( +
    • + {alert} +
    • + ))} +
    +
    +
    +
      + {power.length === 0 && ( +
    • + Systems Nominal +
    • + )} + {power.map(alert => ( +
    • + {alert} +
    • + ))} +
    +
    +
    + ); +}; diff --git a/tgui/packages/tgui/interfaces/Wires.js b/tgui/packages/tgui/interfaces/Wires.js new file mode 100644 index 00000000000..c41be4de3d6 --- /dev/null +++ b/tgui/packages/tgui/interfaces/Wires.js @@ -0,0 +1,71 @@ +import { Fragment } from 'inferno'; +import { useBackend } from '../backend'; +import { Box, Button, LabeledList, Section } from '../components'; +import { Window } from '../layouts'; + +export const Wires = (props, context) => { + const { act, data } = useBackend(context); + + const wires = data.wires || []; + const statuses = data.status || []; + + return ( + + + + +
    + + {wires.map(wire => ( + +
    + + {!!statuses.length && ( +
    + {statuses.map(status => ( + + {status} + + ))} +
    + )} + +
    +
    + ); +}; diff --git a/tgui/packages/tgui/public/tgui.bundle.js b/tgui/packages/tgui/public/tgui.bundle.js index 08771e50a97..ab86550ded6 100644 --- a/tgui/packages/tgui/public/tgui.bundle.js +++ b/tgui/packages/tgui/public/tgui.bundle.js @@ -1,5 +1,13 @@ +<<<<<<< HEAD !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=167)}([function(e,t,n){"use strict";var r=n(2),o=n(16).f,i=n(25),a=n(18),c=n(85),u=n(125),s=n(59);e.exports=function(e,t){var n,l,f,d,p,h=e.target,v=e.global,g=e.stat;if(n=v?r:g?r[h]||c(h,{}):(r[h]||{}).prototype)for(l in t){if(d=t[l],f=e.noTargetGet?(p=o(n,l))&&p.value:n[l],!s(v?l:h+(g?".":"#")+l,e.forced)&&f!==undefined){if(typeof d==typeof f)continue;u(d,f)}(e.sham||f&&f.sham)&&i(d,"sham",!0),a(n,l,d,e)}}},function(e,t,n){"use strict";e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){"use strict";(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(121))},function(e,t,n){"use strict";t.__esModule=!0;var r=n(382);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(t[e]=r[e])}))},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){"use strict";var r=n(1);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){"use strict";var r=n(4);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){"use strict";var r,o=n(99),i=n(5),a=n(2),c=n(4),u=n(14),s=n(71),l=n(25),f=n(18),d=n(11).f,p=n(31),h=n(46),v=n(10),g=n(56),m=a.Int8Array,y=m&&m.prototype,b=a.Uint8ClampedArray,x=b&&b.prototype,N=m&&p(m),w=y&&p(y),C=Object.prototype,_=C.isPrototypeOf,E=v("toStringTag"),S=g("TYPED_ARRAY_TAG"),V=o&&!!h&&"Opera"!==s(a.opera),k=!1,T={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},O=function(e){var t=s(e);return"DataView"===t||u(T,t)},A=function(e){return c(e)&&u(T,s(e))};for(r in T)a[r]||(V=!1);if((!V||"function"!=typeof N||N===Function.prototype)&&(N=function(){throw TypeError("Incorrect invocation")},V))for(r in T)a[r]&&h(a[r],N);if((!V||!w||w===C)&&(w=N.prototype,V))for(r in T)a[r]&&h(a[r].prototype,w);if(V&&p(x)!==w&&h(x,w),i&&!u(w,E))for(r in k=!0,d(w,E,{get:function(){return c(this)?this[S]:undefined}}),T)a[r]&&l(a[r],S,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:V,TYPED_ARRAY_TAG:k&&S,aTypedArray:function(e){if(A(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(e){if(h){if(_.call(N,e))return e}else for(var t in T)if(u(T,r)){var n=a[t];if(n&&(e===n||_.call(n,e)))return e}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n){if(i){if(n)for(var r in T){var o=a[r];o&&u(o.prototype,e)&&delete o.prototype[e]}w[e]&&!n||f(w,e,n?t:V&&y[e]||t)}},exportTypedArrayStaticMethod:function(e,t,n){var r,o;if(i){if(h){if(n)for(r in T)(o=a[r])&&u(o,e)&&delete o[e];if(N[e]&&!n)return;try{return f(N,e,n?t:V&&m[e]||t)}catch(c){}}for(r in T)!(o=a[r])||o[e]&&!n||f(o,e,t)}},isView:O,isTypedArray:A,TypedArray:N,TypedArrayPrototype:w}},function(e,t,n){"use strict";var r=n(26),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){"use strict";t.__esModule=!0,t.isFalsy=t.pureComponentHooks=t.shallowDiffers=t.normalizeChildren=t.classes=void 0;t.classes=function(e){for(var t="",n=0;n0&&(t.style=u),t};t.computeBoxProps=g;var m=function(e){var t=e.textColor||e.color,n=e.backgroundColor;return(0,r.classes)([s(t)&&"color-"+t,s(n)&&"color-bg-"+n])};t.computeBoxClassName=m;var y=function(e){var t=e.as,n=void 0===t?"div":t,r=e.className,a=e.children,c=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["as","className","children"]);if("function"==typeof a)return a(g(e));var u="string"==typeof r?r+" "+m(c):m(c),s=g(c);return(0,o.createVNode)(i.VNodeFlags.HtmlElement,n,u,a,i.ChildFlags.UnknownChildren,s)};t.Box=y,y.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,n){"use strict";var r=n(44),o=n(55),i=n(12),a=n(8),c=n(61),u=[].push,s=function(e){var t=1==e,n=2==e,s=3==e,l=4==e,f=6==e,d=5==e||f;return function(p,h,v,g){for(var m,y,b=i(p),x=o(b),N=r(h,v,3),w=a(x.length),C=0,_=g||c,E=t?_(p,w):n?_(p,0):undefined;w>C;C++)if((d||C in x)&&(y=N(m=x[C],C,b),e))if(t)E[C]=y;else if(y)switch(e){case 3:return!0;case 5:return m;case 6:return C;case 2:u.call(E,m)}else if(l)return!1;return f?-1:s||l?l:E}};e.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6)}},function(e,t,n){"use strict";var r=n(5),o=n(68),i=n(42),a=n(21),c=n(29),u=n(14),s=n(122),l=Object.getOwnPropertyDescriptor;t.f=r?l:function(e,t){if(e=a(e),t=c(t,!0),s)try{return l(e,t)}catch(n){}if(u(e,t))return i(!o.f.call(e,t),e[t])}},function(e,t,n){"use strict";e.exports=function(e){if(e==undefined)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";var r=n(2),o=n(25),i=n(14),a=n(85),c=n(86),u=n(30),s=u.get,l=u.enforce,f=String(String).split("String");(e.exports=function(e,t,n,c){var u=!!c&&!!c.unsafe,s=!!c&&!!c.enumerable,d=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof t||i(n,"name")||o(n,"name",t),l(n).source=f.join("string"==typeof t?t:"")),e!==r?(u?!d&&e[t]&&(s=!0):delete e[t],s?e[t]=n:o(e,t,n)):s?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&s(this).source||c(this)}))},function(e,t,n){"use strict";var r=n(5),o=n(1),i=n(14),a=Object.defineProperty,c={},u=function(e){throw e};e.exports=function(e,t){if(i(c,e))return c[e];t||(t={});var n=[][e],s=!!i(t,"ACCESSORS")&&t.ACCESSORS,l=i(t,0)?t[0]:u,f=i(t,1)?t[1]:undefined;return c[e]=!!n&&!o((function(){if(s&&!r)return!0;var e={length:-1};s?a(e,1,{enumerable:!0,get:u}):e[1]=1,n.call(e,l,f)}))}},function(e,t,n){"use strict";function r(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(s){return void n(s)}c.done?t(u):Promise.resolve(u).then(r,o)}t.__esModule=!0,t.winset=t.winget=t.runCommand=t.callByondAsync=t.callByond=t.IS_IE8=void 0;var o=window.Byond,i=function(){var e=navigator.userAgent.match(/Trident\/(\d+).+?;/i);if(!e)return null;var t=e[1];return t?parseInt(t,10):null}(),a=null!==i&&i<=6;t.IS_IE8=a;var c=function(e,t){void 0===t&&(t={}),o.call(e,t)};t.callByond=c;var u=function(e,t){void 0===t&&(t={}),window.__callbacks__=window.__callbacks__||[];var n=window.__callbacks__.length,r=new Promise((function(e){window.__callbacks__.push(e)}));return o.call(e,Object.assign({},t,{callback:"__callbacks__["+n+"]"})),r};t.callByondAsync=u;t.runCommand=function(e){return c("winset",{command:e})};var s=function(){var e,t=(e=regeneratorRuntime.mark((function n(e,t){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,u("winget",{id:e,property:t});case 2:return r=n.sent,n.abrupt("return",r[t]);case 4:case"end":return n.stop()}}),n)})),function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function c(e){r(a,o,i,c,u,"next",e)}function u(e){r(a,o,i,c,u,"throw",e)}c(undefined)}))});return function(e,n){return t.apply(this,arguments)}}();t.winget=s;t.winset=function(e,t,n){var r;return c("winset",((r={})[e+"."+t]=n,r))}},function(e,t,n){"use strict";var r=n(55),o=n(17);e.exports=function(e){return r(o(e))}},function(e,t,n){"use strict";var r=n(126),o=n(14),i=n(132),a=n(11).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||a(t,e,{value:i.f(e)})}},function(e,t,n){"use strict";var r=n(17),o=/"/g;e.exports=function(e,t,n,i){var a=String(r(e)),c="<"+t;return""!==n&&(c+=" "+n+'="'+String(i).replace(o,""")+'"'),c+">"+a+""}},function(e,t,n){"use strict";var r=n(1);e.exports=function(e){return r((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t,n){"use strict";var r=n(5),o=n(11),i=n(42);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";var r=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:r)(e)}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){"use strict";var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t,n){"use strict";var r=n(4);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){"use strict";var r,o,i,a=n(124),c=n(2),u=n(4),s=n(25),l=n(14),f=n(69),d=n(57),p=c.WeakMap;if(a){var h=new p,v=h.get,g=h.has,m=h.set;r=function(e,t){return m.call(h,e,t),t},o=function(e){return v.call(h,e)||{}},i=function(e){return g.call(h,e)}}else{var y=f("state");d[y]=!0,r=function(e,t){return s(e,y,t),t},o=function(e){return l(e,y)?e[y]:{}},i=function(e){return l(e,y)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){"use strict";var r=n(14),o=n(12),i=n(69),a=n(98),c=i("IE_PROTO"),u=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=o(e),r(e,c)?e[c]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?u:null}},function(e,t,n){"use strict";var r=n(126),o=n(2),i=function(e){return"function"==typeof e?e:undefined};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},function(e,t,n){"use strict";e.exports=!1},function(e,t,n){"use strict";var r=n(1);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){"use strict";var r=n(0),o=n(2),i=n(5),a=n(111),c=n(7),u=n(74),s=n(51),l=n(42),f=n(25),d=n(8),p=n(140),h=n(155),v=n(29),g=n(14),m=n(71),y=n(4),b=n(37),x=n(46),N=n(43).f,w=n(156),C=n(15).forEach,_=n(50),E=n(11),S=n(16),V=n(30),k=n(76),T=V.get,O=V.set,A=E.f,I=S.f,M=Math.round,L=o.RangeError,B=u.ArrayBuffer,P=u.DataView,j=c.NATIVE_ARRAY_BUFFER_VIEWS,F=c.TYPED_ARRAY_TAG,R=c.TypedArray,D=c.TypedArrayPrototype,K=c.aTypedArrayConstructor,z=c.isTypedArray,U=function(e,t){for(var n=0,r=t.length,o=new(K(e))(r);r>n;)o[n]=t[n++];return o},Y=function(e,t){A(e,t,{get:function(){return T(this)[t]}})},H=function(e){var t;return e instanceof B||"ArrayBuffer"==(t=m(e))||"SharedArrayBuffer"==t},W=function(e,t){return z(e)&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},$=function(e,t){return W(e,t=v(t,!0))?l(2,e[t]):I(e,t)},G=function(e,t,n){return!(W(e,t=v(t,!0))&&y(n)&&g(n,"value"))||g(n,"get")||g(n,"set")||n.configurable||g(n,"writable")&&!n.writable||g(n,"enumerable")&&!n.enumerable?A(e,t,n):(e[t]=n.value,e)};i?(j||(S.f=$,E.f=G,Y(D,"buffer"),Y(D,"byteOffset"),Y(D,"byteLength"),Y(D,"length")),r({target:"Object",stat:!0,forced:!j},{getOwnPropertyDescriptor:$,defineProperty:G}),e.exports=function(e,t,n){var i=e.match(/\d+$/)[0]/8,c=e+(n?"Clamped":"")+"Array",u="get"+e,l="set"+e,v=o[c],g=v,m=g&&g.prototype,E={},S=function(e,t){A(e,t,{get:function(){return function(e,t){var n=T(e);return n.view[u](t*i+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var o=T(e);n&&(r=(r=M(r))<0?0:r>255?255:255&r),o.view[l](t*i+o.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};j?a&&(g=t((function(e,t,n,r){return s(e,g,c),k(y(t)?H(t)?r!==undefined?new v(t,h(n,i),r):n!==undefined?new v(t,h(n,i)):new v(t):z(t)?U(g,t):w.call(g,t):new v(p(t)),e,g)})),x&&x(g,R),C(N(v),(function(e){e in g||f(g,e,v[e])})),g.prototype=m):(g=t((function(e,t,n,r){s(e,g,c);var o,a,u,l=0,f=0;if(y(t)){if(!H(t))return z(t)?U(g,t):w.call(g,t);o=t,f=h(n,i);var v=t.byteLength;if(r===undefined){if(v%i)throw L("Wrong length");if((a=v-f)<0)throw L("Wrong length")}else if((a=d(r)*i)+f>v)throw L("Wrong length");u=a/i}else u=p(t),o=new B(a=u*i);for(O(e,{buffer:o,byteOffset:f,byteLength:a,length:u,view:new P(o)});l"+e+"<\/script>"},h=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(o){}var e,t;h=r?function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=s("iframe")).style.display="none",u.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F);for(var n=a.length;n--;)delete h.prototype[a[n]];return h()};c[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(d.prototype=o(e),n=new d,d.prototype=null,n[f]=e):n=h(),t===undefined?n:i(n,t)}},function(e,t,n){"use strict";var r=n(11).f,o=n(14),i=n(10)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(10),o=n(37),i=n(11),a=r("unscopables"),c=Array.prototype;c[a]==undefined&&i.f(c,a,{configurable:!0,value:o(null)}),e.exports=function(e){c[a][e]=!0}},function(e,t,n){"use strict";var r=n(6),o=n(27),i=n(10)("species");e.exports=function(e,t){var n,a=r(e).constructor;return a===undefined||(n=r(a)[i])==undefined?t:o(n)}},function(e,t,n){"use strict";t.__esModule=!0,t.useSharedState=t.useLocalState=t.useBackend=t.backendReducer=t.backendSetSharedState=t.backendUpdate=void 0;var r=n(112),o=n(20);t.backendUpdate=function(e){return{type:"backend/update",payload:e}};var i=function(e,t){return{type:"backend/setSharedState",payload:{key:e,nextState:t}}};t.backendSetSharedState=i;t.backendReducer=function(e,t){var n=t.type,o=t.payload;if("backend/update"===n){var i=Object.assign({},e.config,{},o.config),a=Object.assign({},e.data,{},o.static_data,{},o.data),c=Object.assign({},e.shared);if(o.shared)for(var u=0,s=Object.keys(o.shared);un?n:e};t.clamp01=function(e){return e<0?0:e>1?1:e};t.scale=function(e,t,n){return(e-t)/(n-t)};t.round=function(e,t){return!e||isNaN(e)?e:(t|=0,i=(e*=n=Math.pow(10,t))>0|-(e<0),o=Math.abs(e%1)>=.4999999999854481,r=Math.floor(e),o&&(e=r+(i>0)),(o?e:Math.round(e))/n);var n,r,o,i};t.toFixed=function(e,t){return void 0===t&&(t=0),Number(e).toFixed(Math.max(t,0))};var r=function(e,t){return t&&e>=t[0]&&e<=t[1]};t.inRange=r;t.keyOfMatchingRange=function(e,t){for(var n=0,o=Object.keys(t);n2?n-2:0),i=2;i=a){var c=[t].concat(o).map((function(e){return"string"==typeof e?e:e instanceof Error?e.stack||String(e):JSON.stringify(e)})).filter((function(e){return e})).join(" ")+"\nUser Agent: "+navigator.userAgent;(0,r.callByond)("",{src:window.__ref__,action:"tgui:log",log:c})}},l=function(e){return{debug:function(){for(var t=arguments.length,n=new Array(t),r=0;rl;)if((c=u[l++])!=c)return!0}else for(;s>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){"use strict";var r=n(1),o=/#|\.prototype\./,i=function(e,t){var n=c[a(e)];return n==s||n!=u&&("function"==typeof t?r(t):!!t)},a=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},c=i.data={},u=i.NATIVE="N",s=i.POLYFILL="P";e.exports=i},function(e,t,n){"use strict";var r=n(127),o=n(89);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){"use strict";var r=n(4),o=n(49),i=n(10)("species");e.exports=function(e,t){var n;return o(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!o(n.prototype)?r(n)&&null===(n=n[i])&&(n=undefined):n=undefined),new(n===undefined?Array:n)(0===t?0:t)}},function(e,t,n){"use strict";var r=n(1),o=n(10),i=n(92),a=o("species");e.exports=function(e){return i>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";var r=n(18);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},function(e,t,n){"use strict";var r=n(1);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){"use strict";var r=n(6),o=n(94),i=n(8),a=n(44),c=n(95),u=n(135),s=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,l,f){var d,p,h,v,g,m,y,b=a(t,n,l?2:1);if(f)d=e;else{if("function"!=typeof(p=c(e)))throw TypeError("Target is not iterable");if(o(p)){for(h=0,v=i(e.length);v>h;h++)if((g=l?b(r(y=e[h])[0],y[1]):b(e[h]))&&g instanceof s)return g;return new s(!1)}d=p.call(e)}for(m=d.next;!(y=m.call(d)).done;)if("object"==typeof(g=u(d,b,y.value,l))&&g&&g instanceof s)return g;return new s(!1)}).stop=function(e){return new s(!0,e)}},function(e,t,n){"use strict";t.__esModule=!0,t.Window=t.NtosWindow=t.refocusLayout=t.Layout=void 0;var r=n(115);t.Layout=r.Layout,t.refocusLayout=r.refocusLayout;var o=n(401);t.NtosWindow=o.NtosWindow;var i=n(166);t.Window=i.Window},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);t.f=i?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t,n){"use strict";var r=n(87),o=n(56),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t,n){"use strict";var r=n(32);e.exports=r("navigator","userAgent")||""},function(e,t,n){"use strict";var r=n(96),o=n(28),i=n(10)("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=r?o:function(e){var t,n,r;return e===undefined?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Object(e),i))?n:a?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){"use strict";var r=n(10)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},"return":function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(c){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(c){}return n}},function(e,t,n){"use strict";var r=n(27),o=n(12),i=n(55),a=n(8),c=function(e){return function(t,n,c,u){r(n);var s=o(t),l=i(s),f=a(s.length),d=e?f-1:0,p=e?-1:1;if(c<2)for(;;){if(d in l){u=l[d],d+=p;break}if(d+=p,e?d<0:f<=d)throw TypeError("Reduce of empty array with no initial value")}for(;e?d>=0:f>d;d+=p)d in l&&(u=n(u,l[d],d,s));return u}};e.exports={left:c(!1),right:c(!0)}},function(e,t,n){"use strict";var r=n(2),o=n(5),i=n(99),a=n(25),c=n(64),u=n(1),s=n(51),l=n(26),f=n(8),d=n(140),p=n(214),h=n(31),v=n(46),g=n(43).f,m=n(11).f,y=n(93),b=n(38),x=n(30),N=x.get,w=x.set,C=r.ArrayBuffer,_=C,E=r.DataView,S=E&&E.prototype,V=Object.prototype,k=r.RangeError,T=p.pack,O=p.unpack,A=function(e){return[255&e]},I=function(e){return[255&e,e>>8&255]},M=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},L=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},B=function(e){return T(e,23,4)},P=function(e){return T(e,52,8)},j=function(e,t){m(e.prototype,t,{get:function(){return N(this)[t]}})},F=function(e,t,n,r){var o=d(n),i=N(e);if(o+t>i.byteLength)throw k("Wrong index");var a=N(i.buffer).bytes,c=o+i.byteOffset,u=a.slice(c,c+t);return r?u:u.reverse()},R=function(e,t,n,r,o,i){var a=d(n),c=N(e);if(a+t>c.byteLength)throw k("Wrong index");for(var u=N(c.buffer).bytes,s=a+c.byteOffset,l=r(+o),f=0;fU;)(D=z[U++])in _||a(_,D,C[D]);K.constructor=_}v&&h(S)!==V&&v(S,V);var Y=new E(new _(2)),H=S.setInt8;Y.setInt8(0,2147483648),Y.setInt8(1,2147483649),!Y.getInt8(0)&&Y.getInt8(1)||c(S,{setInt8:function(e,t){H.call(this,e,t<<24>>24)},setUint8:function(e,t){H.call(this,e,t<<24>>24)}},{unsafe:!0})}else _=function(e){s(this,_,"ArrayBuffer");var t=d(e);w(this,{bytes:y.call(new Array(t),0),byteLength:t}),o||(this.byteLength=t)},E=function(e,t,n){s(this,E,"DataView"),s(e,_,"DataView");var r=N(e).byteLength,i=l(t);if(i<0||i>r)throw k("Wrong offset");if(i+(n=n===undefined?r-i:f(n))>r)throw k("Wrong length");w(this,{buffer:e,byteLength:n,byteOffset:i}),o||(this.buffer=e,this.byteLength=n,this.byteOffset=i)},o&&(j(_,"byteLength"),j(E,"buffer"),j(E,"byteLength"),j(E,"byteOffset")),c(E.prototype,{getInt8:function(e){return F(this,1,e)[0]<<24>>24},getUint8:function(e){return F(this,1,e)[0]},getInt16:function(e){var t=F(this,2,e,arguments.length>1?arguments[1]:undefined);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=F(this,2,e,arguments.length>1?arguments[1]:undefined);return t[1]<<8|t[0]},getInt32:function(e){return L(F(this,4,e,arguments.length>1?arguments[1]:undefined))},getUint32:function(e){return L(F(this,4,e,arguments.length>1?arguments[1]:undefined))>>>0},getFloat32:function(e){return O(F(this,4,e,arguments.length>1?arguments[1]:undefined),23)},getFloat64:function(e){return O(F(this,8,e,arguments.length>1?arguments[1]:undefined),52)},setInt8:function(e,t){R(this,1,e,A,t)},setUint8:function(e,t){R(this,1,e,A,t)},setInt16:function(e,t){R(this,2,e,I,t,arguments.length>2?arguments[2]:undefined)},setUint16:function(e,t){R(this,2,e,I,t,arguments.length>2?arguments[2]:undefined)},setInt32:function(e,t){R(this,4,e,M,t,arguments.length>2?arguments[2]:undefined)},setUint32:function(e,t){R(this,4,e,M,t,arguments.length>2?arguments[2]:undefined)},setFloat32:function(e,t){R(this,4,e,B,t,arguments.length>2?arguments[2]:undefined)},setFloat64:function(e,t){R(this,8,e,P,t,arguments.length>2?arguments[2]:undefined)}});b(_,"ArrayBuffer"),b(E,"DataView"),e.exports={ArrayBuffer:_,DataView:E}},function(e,t,n){"use strict";var r=n(0),o=n(2),i=n(59),a=n(18),c=n(47),u=n(66),s=n(51),l=n(4),f=n(1),d=n(72),p=n(38),h=n(76);e.exports=function(e,t,n){var v=-1!==e.indexOf("Map"),g=-1!==e.indexOf("Weak"),m=v?"set":"add",y=o[e],b=y&&y.prototype,x=y,N={},w=function(e){var t=b[e];a(b,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(g&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!l(e)?undefined:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!l(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(i(e,"function"!=typeof y||!(g||b.forEach&&!f((function(){(new y).entries().next()})))))x=n.getConstructor(t,e,v,m),c.REQUIRED=!0;else if(i(e,!0)){var C=new x,_=C[m](g?{}:-0,1)!=C,E=f((function(){C.has(1)})),S=d((function(e){new y(e)})),V=!g&&f((function(){for(var e=new y,t=5;t--;)e[m](t,t);return!e.has(-0)}));S||((x=t((function(t,n){s(t,x,e);var r=h(new y,t,x);return n!=undefined&&u(n,r[m],r,v),r}))).prototype=b,b.constructor=x),(E||V)&&(w("delete"),w("has"),v&&w("get")),(V||_)&&w(m),g&&b.clear&&delete b.clear}return N[e]=x,r({global:!0,forced:x!=y},N),p(x,e),g||n.setStrong(x,e,v),x}},function(e,t,n){"use strict";var r=n(4),o=n(46);e.exports=function(e,t,n){var i,a;return o&&"function"==typeof(i=t.constructor)&&i!==n&&r(a=i.prototype)&&a!==n.prototype&&o(e,a),e}},function(e,t,n){"use strict";var r=Math.expm1,o=Math.exp;e.exports=!r||r(10)>22025.465794806718||r(10)<22025.465794806718||-2e-17!=r(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:o(e)-1}:r},function(e,t,n){"use strict";e.exports="\t\n\x0B\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},function(e,t,n){"use strict";var r=n(33),o=n(2),i=n(1);e.exports=r||!i((function(){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete o[e]}))},function(e,t,n){"use strict";var r=n(6);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var r,o,i=n(80),a=n(105),c=RegExp.prototype.exec,u=String.prototype.replace,s=c,l=(r=/a/,o=/b*/g,c.call(r,"a"),c.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),f=a.UNSUPPORTED_Y||a.BROKEN_CARET,d=/()??/.exec("")[1]!==undefined;(l||d||f)&&(s=function(e){var t,n,r,o,a=this,s=f&&a.sticky,p=i.call(a),h=a.source,v=0,g=e;return s&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),g=String(e).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(h="(?: "+h+")",g=" "+g,v++),n=new RegExp("^(?:"+h+")",p)),d&&(n=new RegExp("^"+h+"$(?!\\s)",p)),l&&(t=a.lastIndex),r=c.call(s?n:a,g),s?r?(r.input=r.input.slice(v),r[0]=r[0].slice(v),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:l&&r&&(a.lastIndex=a.global?r.index+r[0].length:t),d&&r&&r.length>1&&u.call(r[0],n,(function(){for(o=1;o")})),l="$0"==="a".replace(/./,"$0"),f=i("replace"),d=!!/./[f]&&""===/./[f]("a","$0"),p=!o((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,f){var h=i(e),v=!o((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),g=v&&!o((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!v||!g||"replace"===e&&(!s||!l||d)||"split"===e&&!p){var m=/./[h],y=n(h,""[e],(function(e,t,n,r,o){return t.exec===a?v&&!o?{done:!0,value:m.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:d}),b=y[0],x=y[1];r(String.prototype,e,b),r(RegExp.prototype,h,2==t?function(e,t){return x.call(e,this,t)}:function(e){return x.call(e,this)})}f&&c(RegExp.prototype[h],"sham",!0)}},function(e,t,n){"use strict";var r=n(28),o=n(81);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},function(e,t,n){"use strict";var r=n(2),o=n(4),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){"use strict";var r=n(2),o=n(25);e.exports=function(e,t){try{o(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){"use strict";var r=n(123),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return o.call(e)}),e.exports=r.inspectSource},function(e,t,n){"use strict";var r=n(33),o=n(123);(e.exports=function(e,t){return o[e]||(o[e]=t!==undefined?t:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"\xa9 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){"use strict";var r=n(32),o=n(43),i=n(90),a=n(6);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(a(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){"use strict";t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var r=n(1);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(e,t,n){"use strict";var r,o,i=n(2),a=n(70),c=i.process,u=c&&c.versions,s=u&&u.v8;s?o=(r=s.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=r[1]),e.exports=o&&+o},function(e,t,n){"use strict";var r=n(12),o=n(36),i=n(8);e.exports=function(e){for(var t=r(this),n=i(t.length),a=arguments.length,c=o(a>1?arguments[1]:undefined,n),u=a>2?arguments[2]:undefined,s=u===undefined?n:o(u,n);s>c;)t[c++]=e;return t}},function(e,t,n){"use strict";var r=n(10),o=n(63),i=r("iterator"),a=Array.prototype;e.exports=function(e){return e!==undefined&&(o.Array===e||a[i]===e)}},function(e,t,n){"use strict";var r=n(71),o=n(63),i=n(10)("iterator");e.exports=function(e){if(e!=undefined)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){"use strict";var r={};r[n(10)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){"use strict";var r=n(0),o=n(199),i=n(31),a=n(46),c=n(38),u=n(25),s=n(18),l=n(10),f=n(33),d=n(63),p=n(137),h=p.IteratorPrototype,v=p.BUGGY_SAFARI_ITERATORS,g=l("iterator"),m=function(){return this};e.exports=function(e,t,n,l,p,y,b){o(n,t,l);var x,N,w,C=function(e){if(e===p&&k)return k;if(!v&&e in S)return S[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},_=t+" Iterator",E=!1,S=e.prototype,V=S[g]||S["@@iterator"]||p&&S[p],k=!v&&V||C(p),T="Array"==t&&S.entries||V;if(T&&(x=i(T.call(new e)),h!==Object.prototype&&x.next&&(f||i(x)===h||(a?a(x,h):"function"!=typeof x[g]&&u(x,g,m)),c(x,_,!0,!0),f&&(d[_]=m))),"values"==p&&V&&"values"!==V.name&&(E=!0,k=function(){return V.call(this)}),f&&!b||S[g]===k||u(S,g,k),d[t]=k,p)if(N={values:C("values"),keys:y?k:C("keys"),entries:C("entries")},b)for(w in N)(v||E||!(w in S))&&s(S,w,N[w]);else r({target:t,proto:!0,forced:v||E},N);return N}},function(e,t,n){"use strict";var r=n(1);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(e,t,n){"use strict";var r=n(8),o=n(101),i=n(17),a=Math.ceil,c=function(e){return function(t,n,c){var u,s,l=String(i(t)),f=l.length,d=c===undefined?" ":String(c),p=r(n);return p<=f||""==d?l:(u=p-f,(s=o.call(d,a(u/d.length))).length>u&&(s=s.slice(0,u)),e?l+s:s+l)}};e.exports={start:c(!1),end:c(!0)}},function(e,t,n){"use strict";var r=n(26),o=n(17);e.exports="".repeat||function(e){var t=String(o(this)),n="",i=r(e);if(i<0||i==Infinity)throw RangeError("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n}},function(e,t,n){"use strict";e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){"use strict";var r,o,i,a=n(2),c=n(1),u=n(28),s=n(44),l=n(130),f=n(84),d=n(149),p=a.location,h=a.setImmediate,v=a.clearImmediate,g=a.process,m=a.MessageChannel,y=a.Dispatch,b=0,x={},N=function(e){if(x.hasOwnProperty(e)){var t=x[e];delete x[e],t()}},w=function(e){return function(){N(e)}},C=function(e){N(e.data)},_=function(e){a.postMessage(e+"",p.protocol+"//"+p.host)};h&&v||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return x[++b]=function(){("function"==typeof e?e:Function(e)).apply(undefined,t)},r(b),b},v=function(e){delete x[e]},"process"==u(g)?r=function(e){g.nextTick(w(e))}:y&&y.now?r=function(e){y.now(w(e))}:m&&!d?(i=(o=new m).port2,o.port1.onmessage=C,r=s(i.postMessage,i,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||c(_)||"file:"===p.protocol?r="onreadystatechange"in f("script")?function(e){l.appendChild(f("script")).onreadystatechange=function(){l.removeChild(this),N(e)}}:function(e){setTimeout(w(e),0)}:(r=_,a.addEventListener("message",C,!1))),e.exports={set:h,clear:v}},function(e,t,n){"use strict";var r=n(4),o=n(28),i=n(10)("match");e.exports=function(e){var t;return r(e)&&((t=e[i])!==undefined?!!t:"RegExp"==o(e))}},function(e,t,n){"use strict";var r=n(1);function o(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r((function(){var e=o("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=r((function(){var e=o("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},function(e,t,n){"use strict";var r=n(26),o=n(17),i=function(e){return function(t,n){var i,a,c=String(o(t)),u=r(n),s=c.length;return u<0||u>=s?e?"":undefined:(i=c.charCodeAt(u))<55296||i>56319||u+1===s||(a=c.charCodeAt(u+1))<56320||a>57343?e?c.charAt(u):i:e?c.slice(u,u+2):a-56320+(i-55296<<10)+65536}};e.exports={codeAt:i(!1),charAt:i(!0)}},function(e,t,n){"use strict";var r=n(104);e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){"use strict";var r=n(10)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(o){}}return!1}},function(e,t,n){"use strict";var r=n(106).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){"use strict";var r=n(1),o=n(78);e.exports=function(e){return r((function(){return!!o[e]()||"\u200b\x85\u180e"!="\u200b\x85\u180e"[e]()||o[e].name!==e}))}},function(e,t,n){"use strict";var r=n(2),o=n(1),i=n(72),a=n(7).NATIVE_ARRAY_BUFFER_VIEWS,c=r.ArrayBuffer,u=r.Int8Array;e.exports=!a||!o((function(){u(1)}))||!o((function(){new u(-1)}))||!i((function(e){new u,new u(null),new u(1.5),new u(e)}),!0)||o((function(){return 1!==new u(new c(2),1,undefined).length}))},function(e,t,n){"use strict";t.__esModule=!0,t.getGasColor=t.getGasLabel=t.RADIO_CHANNELS=t.CSS_COLORS=t.COLORS=t.UI_CLOSE=t.UI_DISABLED=t.UI_UPDATE=t.UI_INTERACTIVE=void 0;t.UI_INTERACTIVE=2;t.UI_UPDATE=1;t.UI_DISABLED=0;t.UI_CLOSE=-1;t.COLORS={department:{captain:"#c06616",security:"#e74c3c",medbay:"#3498db",science:"#9b59b6",engineering:"#f1c40f",cargo:"#f39c12",centcom:"#00c100",other:"#c38312"},damageType:{oxy:"#3498db",toxin:"#2ecc71",burn:"#e67e22",brute:"#e74c3c"}};t.CSS_COLORS=["black","white","red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","good","average","bad","label"];t.RADIO_CHANNELS=[{name:"Syndicate",freq:1213,color:"#a52a2a"},{name:"Red Team",freq:1215,color:"#ff4444"},{name:"Blue Team",freq:1217,color:"#3434fd"},{name:"CentCom",freq:1337,color:"#2681a5"},{name:"Supply",freq:1347,color:"#b88646"},{name:"Service",freq:1349,color:"#6ca729"},{name:"Science",freq:1351,color:"#c68cfa"},{name:"Command",freq:1353,color:"#5177ff"},{name:"Medical",freq:1355,color:"#57b8f0"},{name:"Engineering",freq:1357,color:"#f37746"},{name:"Security",freq:1359,color:"#dd3535"},{name:"AI Private",freq:1447,color:"#d65d95"},{name:"Common",freq:1459,color:"#1ecc43"}];var r=[{id:"o2",name:"Oxygen",label:"O\u2082",color:"blue"},{id:"n2",name:"Nitrogen",label:"N\u2082",color:"red"},{id:"co2",name:"Carbon Dioxide",label:"CO\u2082",color:"grey"},{id:"plasma",name:"Plasma",label:"Plasma",color:"pink"},{id:"water_vapor",name:"Water Vapor",label:"H\u2082O",color:"grey"},{id:"nob",name:"Hyper-noblium",label:"Hyper-nob",color:"teal"},{id:"n2o",name:"Nitrous Oxide",label:"N\u2082O",color:"red"},{id:"no2",name:"Nitryl",label:"NO\u2082",color:"brown"},{id:"tritium",name:"Tritium",label:"Tritium",color:"green"},{id:"bz",name:"BZ",label:"BZ",color:"purple"},{id:"stim",name:"Stimulum",label:"Stimulum",color:"purple"},{id:"pluox",name:"Pluoxium",label:"Pluoxium",color:"blue"},{id:"miasma",name:"Miasma",label:"Miasma",color:"olive"},{id:"hydrogen",name:"Hydrogen",label:"H\u2082",color:"white"}];t.getGasLabel=function(e,t){var n=String(e).toLowerCase(),o=r.find((function(e){return e.id===n||e.name.toLowerCase()===n}));return o&&o.label||t||e};t.getGasColor=function(e){var t=String(e).toLowerCase(),n=r.find((function(e){return e.id===t||e.name.toLowerCase()===t}));return n&&n.color}},function(e,t,n){"use strict";t.__esModule=!0,t.zipWith=t.zip=t.uniqBy=t.reduce=t.sortBy=t.map=t.filter=t.toKeyedArray=t.toArray=void 0;t.toArray=function(e){if(Array.isArray(e))return e;if("object"==typeof e){var t=Object.prototype.hasOwnProperty,n=[];for(var r in e)t.call(e,r)&&n.push(e[r]);return n}return[]};t.toKeyedArray=function(e,t){return void 0===t&&(t="key"),r((function(e,n){var r;return Object.assign(((r={})[t]=n,r),e)}))(e)};t.filter=function(e){return function(t){if(null===t&&t===undefined)return t;if(Array.isArray(t)){for(var n=[],r=0;rc)return 1}return 0};t.sortBy=function(){for(var e=arguments.length,t=new Array(e),n=0;n=48&&r<=90?String.fromCharCode(r):"["+r+"]"},s=function(e){var t=window.event?e.which:e.keyCode,n=e.ctrlKey,r=e.altKey,o=e.shiftKey;return{keyCode:t,ctrlKey:n,altKey:r,shiftKey:o,hasModifierKeys:n||r||o,keyString:u(n,r,o,t)}},l=function(){for(var e=0,t=Object.keys(c);e=0||(o[n]=e[n]);return o}var h=(0,u.createLogger)("Button"),v=function(e){var t=e.className,n=e.fluid,u=e.icon,d=e.color,v=e.disabled,g=e.selected,m=e.tooltip,y=e.tooltipPosition,b=e.ellipsis,x=e.content,N=e.iconRotation,w=e.iconSpin,C=e.children,_=e.onclick,E=e.onClick,S=p(e,["className","fluid","icon","color","disabled","selected","tooltip","tooltipPosition","ellipsis","content","iconRotation","iconSpin","children","onclick","onClick"]),V=!(!x&&!C);return _&&h.warn("Lowercase 'onclick' is not supported on Button and lowercase prop names are discouraged in general. Please use a camelCase'onClick' instead and read: https://infernojs.org/docs/guides/event-handling"),(0,r.normalizeProps)((0,r.createComponentVNode)(2,s.Box,Object.assign({className:(0,o.classes)(["Button",n&&"Button--fluid",v&&"Button--disabled",g&&"Button--selected",V&&"Button--hasContent",b&&"Button--ellipsis",d&&"string"==typeof d?"Button--color--"+d:"Button--color--default",t]),tabIndex:!v&&"0",unselectable:i.IS_IE8,onclick:function(e){(0,c.refocusLayout)(),!v&&E&&E(e)},onKeyDown:function(e){var t=window.event?e.which:e.keyCode;return t===a.KEY_SPACE||t===a.KEY_ENTER?(e.preventDefault(),void(!v&&E&&E(e))):t===a.KEY_ESCAPE?(e.preventDefault(),void(0,c.refocusLayout)()):void 0}},S,{children:[u&&(0,r.createComponentVNode)(2,l.Icon,{name:u,rotation:N,spin:w}),x,C,m&&(0,r.createComponentVNode)(2,f.Tooltip,{content:m,position:y})]})))};t.Button=v,v.defaultHooks=o.pureComponentHooks;var g=function(e){var t=e.checked,n=p(e,["checked"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,v,Object.assign({color:"transparent",icon:t?"check-square-o":"square-o",selected:t},n)))};t.ButtonCheckbox=g,v.Checkbox=g;var m=function(e){function t(){var t;return(t=e.call(this)||this).state={clickedOnce:!1},t.handleClick=function(){t.state.clickedOnce&&t.setClickedOnce(!1)},t}d(t,e);var n=t.prototype;return n.setClickedOnce=function(e){var t=this;this.setState({clickedOnce:e}),e?setTimeout((function(){return window.addEventListener("click",t.handleClick)})):window.removeEventListener("click",this.handleClick)},n.render=function(){var e=this,t=this.props,n=t.confirmContent,o=void 0===n?"Confirm?":n,i=t.confirmColor,a=void 0===i?"bad":i,c=t.confirmIcon,u=t.icon,s=t.color,l=t.content,f=t.onClick,d=p(t,["confirmContent","confirmColor","confirmIcon","icon","color","content","onClick"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,v,Object.assign({content:this.state.clickedOnce?o:l,icon:this.state.clickedOnce?c:u,color:this.state.clickedOnce?a:s,onClick:function(){return e.state.clickedOnce?f():e.setClickedOnce(!0)}},d)))},t}(r.Component);t.ButtonConfirm=m,v.Confirm=m;var y=function(e){function t(){var t;return(t=e.call(this)||this).inputRef=(0,r.createRef)(),t.state={inInput:!1},t}d(t,e);var n=t.prototype;return n.setInInput=function(e){if(this.setState({inInput:e}),this.inputRef){var t=this.inputRef.current;if(e){t.value=this.props.currentValue||"";try{t.focus(),t.select()}catch(n){}}}},n.commitResult=function(e){if(this.inputRef){var t=this.inputRef.current;if(""!==t.value)return void this.props.onCommit(e,t.value);if(!this.props.defaultValue)return;this.props.onCommit(e,this.props.defaultValue)}},n.render=function(){var e=this,t=this.props,n=t.fluid,i=t.content,c=t.icon,u=t.iconRotation,d=t.iconSpin,h=t.tooltip,v=t.tooltipPosition,g=t.color,m=void 0===g?"default":g,y=(t.placeholder,t.maxLength,p(t,["fluid","content","icon","iconRotation","iconSpin","tooltip","tooltipPosition","color","placeholder","maxLength"]));return(0,r.normalizeProps)((0,r.createComponentVNode)(2,s.Box,Object.assign({className:(0,o.classes)(["Button",n&&"Button--fluid","Button--color--"+m])},y,{onClick:function(){return e.setInInput(!0)},children:[c&&(0,r.createComponentVNode)(2,l.Icon,{name:c,rotation:u,spin:d}),(0,r.createVNode)(1,"div",null,i,0),(0,r.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:this.state.inInput?undefined:"none","text-align":"left"},onBlur:function(t){e.state.inInput&&(e.setInInput(!1),e.commitResult(t))},onKeyDown:function(t){if(t.keyCode===a.KEY_ENTER)return e.setInInput(!1),void e.commitResult(t);t.keyCode===a.KEY_ESCAPE&&e.setInInput(!1)}},null,this.inputRef),h&&(0,r.createComponentVNode)(2,f.Tooltip,{content:h,position:v})]})))},t}(r.Component);t.ButtonInput=y,v.Input=y},function(e,t,n){"use strict";t.__esModule=!0,t.Icon=void 0;var r=n(3),o=n(9),i=n(13);var a=/-o$/,c=function(e){var t=e.name,n=e.size,c=e.spin,u=e.className,s=e.style,l=void 0===s?{}:s,f=e.rotation,d=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["name","size","spin","className","style","rotation"]);n&&(l["font-size"]=100*n+"%"),"number"==typeof f&&(l.transform="rotate("+f+"deg)");var p=a.test(t),h=t.replace(a,"");return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({as:"i",className:(0,o.classes)([u,p?"far":"fas","fa-"+h,c&&"fa-spin"]),style:l},d)))};t.Icon=c,c.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.TableCell=t.TableRow=t.Table=void 0;var r=n(3),o=n(9),i=n(13);function a(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var c=function(e){var t=e.className,n=e.collapsing,c=e.children,u=a(e,["className","collapsing","children"]);return(0,r.normalizeProps)((0,r.createVNode)(1,"table",(0,o.classes)(["Table",n&&"Table--collapsing",t,(0,i.computeBoxClassName)(u)]),(0,r.createVNode)(1,"tbody",null,c,0),2,Object.assign({},(0,i.computeBoxProps)(u))))};t.Table=c,c.defaultHooks=o.pureComponentHooks;var u=function(e){var t=e.className,n=e.header,c=a(e,["className","header"]);return(0,r.normalizeProps)((0,r.createVNode)(1,"tr",(0,o.classes)(["Table__row",n&&"Table__row--header",t,(0,i.computeBoxClassName)(e)]),null,1,Object.assign({},(0,i.computeBoxProps)(c))))};t.TableRow=u,u.defaultHooks=o.pureComponentHooks;var s=function(e){var t=e.className,n=e.collapsing,c=e.header,u=a(e,["className","collapsing","header"]);return(0,r.normalizeProps)((0,r.createVNode)(1,"td",(0,o.classes)(["Table__cell",n&&"Table__cell--collapsing",c&&"Table__cell--header",t,(0,i.computeBoxClassName)(e)]),null,1,Object.assign({},(0,i.computeBoxProps)(u))))};t.TableCell=s,s.defaultHooks=o.pureComponentHooks,c.Row=u,c.Cell=s},function(e,t,n){"use strict";t.__esModule=!0,t.NumberInput=void 0;var r=n(3),o=n(48),i=n(9),a=n(20),c=n(116),u=n(13);var s=function(e){var t,n;function s(t){var n;n=e.call(this,t)||this;var i=t.value;return n.inputRef=(0,r.createRef)(),n.state={value:i,dragging:!1,editing:!1,internalValue:null,origin:null,suppressingFlicker:!1},n.flickerTimer=null,n.suppressFlicker=function(){var e=n.props.suppressFlicker;e>0&&(n.setState({suppressingFlicker:!0}),clearTimeout(n.flickerTimer),n.flickerTimer=setTimeout((function(){return n.setState({suppressingFlicker:!1})}),e))},n.handleDragStart=function(e){var t=n.props.value;n.state.editing||(document.body.style["pointer-events"]="none",n.ref=e.target,n.setState({dragging:!1,origin:e.screenY,value:t,internalValue:t}),n.timer=setTimeout((function(){n.setState({dragging:!0})}),250),n.dragInterval=setInterval((function(){var t=n.state,r=t.dragging,o=t.value,i=n.props.onDrag;r&&i&&i(e,o)}),500),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd))},n.handleDragMove=function(e){var t=n.props,r=t.minValue,i=t.maxValue,a=t.step,c=t.stepPixelSize;n.setState((function(t){var n=Object.assign({},t),u=n.origin-e.screenY;if(t.dragging){var s=Number.isFinite(r)?r%a:0;n.internalValue=(0,o.clamp)(n.internalValue+u*a/c,r-a,i+a),n.value=(0,o.clamp)(n.internalValue-n.internalValue%a+s,r,i),n.origin=e.screenY}else Math.abs(u)>4&&(n.dragging=!0);return n}))},n.handleDragEnd=function(e){var t=n.props,r=t.onChange,o=t.onDrag,i=n.state,a=i.dragging,c=i.value,u=i.internalValue;if(document.body.style["pointer-events"]="auto",clearTimeout(n.timer),clearInterval(n.dragInterval),n.setState({dragging:!1,editing:!a,origin:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),a)n.suppressFlicker(),r&&r(e,c),o&&o(e,c);else if(n.inputRef){var s=n.inputRef.current;s.value=u;try{s.focus(),s.select()}catch(l){}}},n}return n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,s.prototype.render=function(){var e=this,t=this.state,n=t.dragging,s=t.editing,l=t.value,f=t.suppressingFlicker,d=this.props,p=d.className,h=d.fluid,v=d.animated,g=d.value,m=d.unit,y=d.minValue,b=d.maxValue,x=d.height,N=d.width,w=d.lineHeight,C=d.fontSize,_=d.format,E=d.onChange,S=d.onDrag,V=g;(n||f)&&(V=l);var k=function(e){return(0,r.createVNode)(1,"div","NumberInput__content",e+(m?" "+m:""),0,{unselectable:a.IS_IE8})},T=v&&!n&&!f&&(0,r.createComponentVNode)(2,c.AnimatedNumber,{value:V,format:_,children:k})||k(_?_(V):V);return(0,r.createComponentVNode)(2,u.Box,{className:(0,i.classes)(["NumberInput",h&&"NumberInput--fluid",p]),minWidth:N,minHeight:x,lineHeight:w,fontSize:C,onMouseDown:this.handleDragStart,children:[(0,r.createVNode)(1,"div","NumberInput__barContainer",(0,r.createVNode)(1,"div","NumberInput__bar",null,1,{style:{height:(0,o.clamp)((V-y)/(b-y)*100,0,100)+"%"}}),2),T,(0,r.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:s?undefined:"none",height:x,"line-height":w,"font-size":C},onBlur:function(t){if(s){var n=(0,o.clamp)(t.target.value,y,b);e.setState({editing:!1,value:n}),e.suppressFlicker(),E&&E(t,n),S&&S(t,n)}},onKeyDown:function(t){if(13===t.keyCode){var n=(0,o.clamp)(t.target.value,y,b);return e.setState({editing:!1,value:n}),e.suppressFlicker(),E&&E(t,n),void(S&&S(t,n))}27!==t.keyCode||e.setState({editing:!1})}},null,this.inputRef)]})},s}(r.Component);t.NumberInput=s,s.defaultHooks=i.pureComponentHooks,s.defaultProps={minValue:-Infinity,maxValue:+Infinity,step:1,stepPixelSize:1,suppressFlicker:50}},function(e,t,n){"use strict";var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(o){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,n){"use strict";var r=n(5),o=n(1),i=n(84);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){"use strict";var r=n(2),o=n(85),i=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=i},function(e,t,n){"use strict";var r=n(2),o=n(86),i=r.WeakMap;e.exports="function"==typeof i&&/native code/.test(o(i))},function(e,t,n){"use strict";var r=n(14),o=n(88),i=n(16),a=n(11);e.exports=function(e,t){for(var n=o(t),c=a.f,u=i.f,s=0;su;)r(c,n=t[u++])&&(~i(s,n)||s.push(n));return s}},function(e,t,n){"use strict";var r=n(91);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){"use strict";var r=n(5),o=n(11),i=n(6),a=n(60);e.exports=r?Object.defineProperties:function(e,t){i(e);for(var n,r=a(t),c=r.length,u=0;c>u;)o.f(e,n=r[u++],t[n]);return e}},function(e,t,n){"use strict";var r=n(32);e.exports=r("document","documentElement")},function(e,t,n){"use strict";var r=n(21),o=n(43).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?function(e){try{return o(e)}catch(t){return a.slice()}}(e):o(r(e))}},function(e,t,n){"use strict";var r=n(10);t.f=r},function(e,t,n){"use strict";var r=n(12),o=n(36),i=n(8),a=Math.min;e.exports=[].copyWithin||function(e,t){var n=r(this),c=i(n.length),u=o(e,c),s=o(t,c),l=arguments.length>2?arguments[2]:undefined,f=a((l===undefined?c:o(l,c))-s,c-u),d=1;for(s0;)s in n?n[u]=n[s]:delete n[u],u+=d,s+=d;return n}},function(e,t,n){"use strict";var r=n(49),o=n(8),i=n(44);e.exports=function a(e,t,n,c,u,s,l,f){for(var d,p=u,h=0,v=!!l&&i(l,f,3);h0&&r(d))p=a(e,t,d,o(d.length),p,s-1)-1;else{if(p>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[p]=d}p++}h++}return p}},function(e,t,n){"use strict";var r=n(6);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(a){var i=e["return"];throw i!==undefined&&r(i.call(e)),a}}},function(e,t,n){"use strict";var r=n(21),o=n(39),i=n(63),a=n(30),c=n(97),u=a.set,s=a.getterFor("Array Iterator");e.exports=c(Array,"Array",(function(e,t){u(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=s(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=undefined,{value:undefined,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(e,t,n){"use strict";var r,o,i,a=n(31),c=n(25),u=n(14),s=n(10),l=n(33),f=s("iterator"),d=!1;[].keys&&("next"in(i=[].keys())?(o=a(a(i)))!==Object.prototype&&(r=o):d=!0),r==undefined&&(r={}),l||u(r,f)||c(r,f,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},function(e,t,n){"use strict";var r=n(4);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";var r=n(21),o=n(26),i=n(8),a=n(34),c=n(19),u=Math.min,s=[].lastIndexOf,l=!!s&&1/[1].lastIndexOf(1,-0)<0,f=a("lastIndexOf"),d=c("indexOf",{ACCESSORS:!0,1:0}),p=l||!f||!d;e.exports=p?function(e){if(l)return s.apply(this,arguments)||0;var t=r(this),n=i(t.length),a=n-1;for(arguments.length>1&&(a=u(a,o(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:s},function(e,t,n){"use strict";var r=n(26),o=n(8);e.exports=function(e){if(e===undefined)return 0;var t=r(e),n=o(t);if(t!==n)throw RangeError("Wrong length or index");return n}},function(e,t,n){"use strict";var r=n(27),o=n(4),i=[].slice,a={},c=function(e,t,n){if(!(t in a)){for(var r=[],o=0;o1?arguments[1]:undefined,3);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!m(this,e)}}),i(l.prototype,n?{get:function(e){var t=m(this,e);return t&&t.value},set:function(e,t){return g(this,0===e?0:e,t)}}:{add:function(e){return g(this,e=0===e?0:e,e)}}),f&&r(l.prototype,"size",{get:function(){return p(this).size}}),l},setStrong:function(e,t,n){var r=t+" Iterator",o=v(t),i=v(r);s(e,t,(function(e,t){h(this,{type:r,target:e,state:o(e),kind:t,last:undefined})}),(function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=undefined,{value:undefined,done:!0})}),n?"entries":"values",!n,!0),l(t)}}},function(e,t,n){"use strict";var r=Math.log;e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:r(1+e)}},function(e,t,n){"use strict";var r=n(4),o=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&o(e)===e}},function(e,t,n){"use strict";var r=n(2),o=n(52).trim,i=n(78),a=r.parseInt,c=/^[+-]?0[Xx]/,u=8!==a(i+"08")||22!==a(i+"0x16");e.exports=u?function(e,t){var n=o(String(e));return a(n,t>>>0||(c.test(n)?16:10))}:a},function(e,t,n){"use strict";var r=n(5),o=n(60),i=n(21),a=n(68).f,c=function(e){return function(t){for(var n,c=i(t),u=o(c),s=u.length,l=0,f=[];s>l;)n=u[l++],r&&!a.call(c,n)||f.push(e?[n,c[n]]:c[n]);return f}};e.exports={entries:c(!0),values:c(!1)}},function(e,t,n){"use strict";e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";var r=n(2);e.exports=r.Promise},function(e,t,n){"use strict";var r=n(70);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},function(e,t,n){"use strict";var r,o,i,a,c,u,s,l,f=n(2),d=n(16).f,p=n(28),h=n(103).set,v=n(149),g=f.MutationObserver||f.WebKitMutationObserver,m=f.process,y=f.Promise,b="process"==p(m),x=d(f,"queueMicrotask"),N=x&&x.value;N||(r=function(){var e,t;for(b&&(e=m.domain)&&e.exit();o;){t=o.fn,o=o.next;try{t()}catch(n){throw o?a():i=undefined,n}}i=undefined,e&&e.enter()},b?a=function(){m.nextTick(r)}:g&&!v?(c=!0,u=document.createTextNode(""),new g(r).observe(u,{characterData:!0}),a=function(){u.data=c=!c}):y&&y.resolve?(s=y.resolve(undefined),l=s.then,a=function(){l.call(s,r)}):a=function(){h.call(f,r)}),e.exports=N||function(e){var t={fn:e,next:undefined};i&&(i.next=t),o||(o=t,a()),i=t}},function(e,t,n){"use strict";var r=n(6),o=n(4),i=n(152);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(27),o=function(e){var t,n;this.promise=new e((function(e,r){if(t!==undefined||n!==undefined)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new o(e)}},function(e,t,n){"use strict";var r=n(0),o=n(81);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(e,t,n){"use strict";var r=n(70);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r)},function(e,t,n){"use strict";var r=n(343);e.exports=function(e,t){var n=r(e);if(n%t)throw RangeError("Wrong offset");return n}},function(e,t,n){"use strict";var r=n(12),o=n(8),i=n(95),a=n(94),c=n(44),u=n(7).aTypedArrayConstructor;e.exports=function(e){var t,n,s,l,f,d,p=r(e),h=arguments.length,v=h>1?arguments[1]:undefined,g=v!==undefined,m=i(p);if(m!=undefined&&!a(m))for(d=(f=m.call(p)).next,p=[];!(l=d.call(f)).done;)p.push(l.value);for(g&&h>2&&(v=c(v,arguments[2],2)),n=o(p.length),s=new(u(this))(n),t=0;n>t;t++)s[t]=g?v(p[t],t):p[t];return s}},function(e,t,n){"use strict";var r=n(64),o=n(47).getWeakData,i=n(6),a=n(4),c=n(51),u=n(66),s=n(15),l=n(14),f=n(30),d=f.set,p=f.getterFor,h=s.find,v=s.findIndex,g=0,m=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},b=function(e,t){return h(e.entries,(function(e){return e[0]===t}))};y.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.entries.push([e,t])},"delete":function(e){var t=v(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,s){var f=e((function(e,r){c(e,f,t),d(e,{type:t,id:g++,frozen:undefined}),r!=undefined&&u(r,e[s],e,n)})),h=p(t),v=function(e,t,n){var r=h(e),a=o(i(t),!0);return!0===a?m(r).set(t,n):a[r.id]=n,e};return r(f.prototype,{"delete":function(e){var t=h(this);if(!a(e))return!1;var n=o(e);return!0===n?m(t)["delete"](e):n&&l(n,t.id)&&delete n[t.id]},has:function(e){var t=h(this);if(!a(e))return!1;var n=o(e);return!0===n?m(t).has(e):n&&l(n,t.id)}}),r(f.prototype,n?{get:function(e){var t=h(this);if(a(e)){var n=o(e);return!0===n?m(t).get(e):n?n[t.id]:undefined}},set:function(e,t){return v(this,e,t)}}:{add:function(e){return v(this,e,!0)}}),f}}},function(e,t,n){"use strict";t.__esModule=!0,t.setupHotReloading=t.sendLogEntry=void 0;t.sendLogEntry=function(e,t){};t.setupHotReloading=function(){0}},function(e,t,n){"use strict";t.__esModule=!0,t.resizeStartHandler=t.dragStartHandler=t.setupDrag=void 0;var r=n(397),o=n(20);function i(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(s){return void n(s)}c.done?t(u):Promise.resolve(u).then(r,o)}var a,c,u,s,l,f=(0,n(53).createLogger)("drag"),d=!1,p=!1,h=[0,0],v=function(e){return(0,o.winget)(e,"pos").then((function(e){return[e.x,e.y]}))},g=function(e,t){return(0,o.winset)(e,"pos",t[0]+","+t[1])},m=function(){var e,t=(e=regeneratorRuntime.mark((function n(e){var t,r,o,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return f.log("setting up"),a=e.config.window,n.next=4,v(a);case 4:t=n.sent,h=[t[0]-window.screenLeft,t[1]-window.screenTop],r=y(t),o=r[0],i=r[1],o&&g(a,i),f.debug("current state",{ref:a,screenOffset:h});case 9:case"end":return n.stop()}}),n)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function c(e){i(a,r,o,c,u,"next",e)}function u(e){i(a,r,o,c,u,"throw",e)}c(undefined)}))});return function(e){return t.apply(this,arguments)}}();t.setupDrag=m;var y=function(e){var t=e[0],n=e[1],r=!1;return t<0?(t=0,r=!0):t+window.innerWidth>window.screen.availWidth&&(t=window.screen.availWidth-window.innerWidth,r=!0),n<0?(n=0,r=!0):n+window.innerHeight>window.screen.availHeight&&(n=window.screen.availHeight-window.innerHeight,r=!0),[r,[t,n]]};t.dragStartHandler=function(e){f.log("drag start"),d=!0,c=[window.screenLeft-e.screenX,window.screenTop-e.screenY],document.addEventListener("mousemove",x),document.addEventListener("mouseup",b),x(e)};var b=function C(e){f.log("drag end"),x(e),document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",C),d=!1},x=function(e){d&&(e.preventDefault(),g(a,(0,r.vecAdd)([e.screenX,e.screenY],h,c)))};t.resizeStartHandler=function(e,t){return function(n){u=[e,t],f.log("resize start",u),p=!0,c=[window.screenLeft-n.screenX,window.screenTop-n.screenY],s=[window.innerWidth,window.innerHeight],document.addEventListener("mousemove",w),document.addEventListener("mouseup",N),w(n)}};var N=function _(e){f.log("resize end",l),w(e),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",_),p=!1},w=function(e){p&&(e.preventDefault(),(l=(0,r.vecAdd)(s,(0,r.vecMultiply)(u,(0,r.vecAdd)([e.screenX,e.screenY],(0,r.vecInverse)([window.screenLeft,window.screenTop]),c,[1,1]))))[0]=Math.max(l[0],250),l[1]=Math.max(l[1],120),function(e,t){(0,o.winset)(e,"size",t[0]+","+t[1])}(a,l))}},function(e,t,n){"use strict";function r(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?o-1:0),c=1;c1?r-1:0),i=1;i35;return(0,r.createVNode)(1,"div",(0,o.classes)(["Tooltip",a&&"Tooltip--long",i&&"Tooltip--"+i]),null,1,{"data-tooltip":t})}},function(e,t,n){"use strict";t.__esModule=!0,t.Dimmer=void 0;var r=n(3),o=n(9),i=n(13);t.Dimmer=function(e){var t=e.className,n=e.children,a=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","children"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["Dimmer"].concat(t))},a,{children:(0,r.createVNode)(1,"div","Dimmer__inner",n,0)})))}},function(e,t,n){"use strict";t.__esModule=!0,t.Divider=void 0;var r=n(3),o=n(9);t.Divider=function(e){var t=e.vertical,n=e.hidden;return(0,r.createVNode)(1,"div",(0,o.classes)(["Divider",n&&"Divider--hidden",t?"Divider--vertical":"Divider--horizontal"]))}},function(e,t,n){"use strict";t.__esModule=!0,t.FlexItem=t.computeFlexItemProps=t.Flex=t.computeFlexProps=void 0;var r=n(3),o=n(9),i=n(20),a=n(13);function c(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var u=function(e){var t=e.className,n=e.direction,r=e.wrap,a=e.align,u=e.justify,s=e.inline,l=e.spacing,f=void 0===l?0:l,d=c(e,["className","direction","wrap","align","justify","inline","spacing"]);return Object.assign({className:(0,o.classes)(["Flex",i.IS_IE8&&("column"===n?"Flex--ie8--column":"Flex--ie8"),s&&"Flex--inline",f>0&&"Flex--spacing--"+f,t]),style:Object.assign({},d.style,{"flex-direction":n,"flex-wrap":r,"align-items":a,"justify-content":u})},d)};t.computeFlexProps=u;var s=function(e){return(0,r.normalizeProps)((0,r.createComponentVNode)(2,a.Box,Object.assign({},u(e))))};t.Flex=s,s.defaultHooks=o.pureComponentHooks;var l=function(e){var t=e.className,n=e.grow,r=e.order,u=e.shrink,s=e.basis,l=void 0===s?e.width:s,f=e.align,d=c(e,["className","grow","order","shrink","basis","align"]);return Object.assign({className:(0,o.classes)(["Flex__item",i.IS_IE8&&"Flex__item--ie8",t]),style:Object.assign({},d.style,{"flex-grow":n,"flex-shrink":u,"flex-basis":(0,a.unit)(l),order:r,"align-self":f})},d)};t.computeFlexItemProps=l;var f=function(e){return(0,r.normalizeProps)((0,r.createComponentVNode)(2,a.Box,Object.assign({},l(e))))};t.FlexItem=f,f.defaultHooks=o.pureComponentHooks,s.Item=f},function(e,t,n){"use strict";t.__esModule=!0,t.DraggableControl=void 0;var r=n(3),o=n(48),i=n(9),a=n(116);var c=function(e,t){return e.screenX*t[0]+e.screenY*t[1]},u=function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).inputRef=(0,r.createRef)(),n.state={value:t.value,dragging:!1,editing:!1,internalValue:null,origin:null,suppressingFlicker:!1},n.flickerTimer=null,n.suppressFlicker=function(){var e=n.props.suppressFlicker;e>0&&(n.setState({suppressingFlicker:!0}),clearTimeout(n.flickerTimer),n.flickerTimer=setTimeout((function(){return n.setState({suppressingFlicker:!1})}),e))},n.handleDragStart=function(e){var t=n.props,r=t.value,o=t.dragMatrix;n.state.editing||(document.body.style["pointer-events"]="none",n.ref=e.target,n.setState({dragging:!1,origin:c(e,o),value:r,internalValue:r}),n.timer=setTimeout((function(){n.setState({dragging:!0})}),250),n.dragInterval=setInterval((function(){var t=n.state,r=t.dragging,o=t.value,i=n.props.onDrag;r&&i&&i(e,o)}),500),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd))},n.handleDragMove=function(e){var t=n.props,r=t.minValue,i=t.maxValue,a=t.step,u=t.stepPixelSize,s=t.dragMatrix;n.setState((function(t){var n=Object.assign({},t),l=c(e,s)-n.origin;if(t.dragging){var f=Number.isFinite(r)?r%a:0;n.internalValue=(0,o.clamp)(n.internalValue+l*a/u,r-a,i+a),n.value=(0,o.clamp)(n.internalValue-n.internalValue%a+f,r,i),n.origin=c(e,s)}else Math.abs(l)>4&&(n.dragging=!0);return n}))},n.handleDragEnd=function(e){var t=n.props,r=t.onChange,o=t.onDrag,i=n.state,a=i.dragging,c=i.value,u=i.internalValue;if(document.body.style["pointer-events"]="auto",clearTimeout(n.timer),clearInterval(n.dragInterval),n.setState({dragging:!1,editing:!a,origin:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),a)n.suppressFlicker(),r&&r(e,c),o&&o(e,c);else if(n.inputRef){var s=n.inputRef.current;s.value=u;try{s.focus(),s.select()}catch(l){}}},n}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.prototype.render=function(){var e=this,t=this.state,n=t.dragging,i=t.editing,c=t.value,u=t.suppressingFlicker,s=this.props,l=s.animated,f=s.value,d=s.unit,p=s.minValue,h=s.maxValue,v=s.format,g=s.onChange,m=s.onDrag,y=s.children,b=s.height,x=s.lineHeight,N=s.fontSize,w=f;(n||u)&&(w=c);var C=function(e){return e+(d?" "+d:"")},_=l&&!n&&!u&&(0,r.createComponentVNode)(2,a.AnimatedNumber,{value:w,format:v,children:C})||C(v?v(w):w),E=(0,r.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:i?undefined:"none",height:b,"line-height":x,"font-size":N},onBlur:function(t){if(i){var n=(0,o.clamp)(t.target.value,p,h);e.setState({editing:!1,value:n}),e.suppressFlicker(),g&&g(t,n),m&&m(t,n)}},onKeyDown:function(t){if(13===t.keyCode){var n=(0,o.clamp)(t.target.value,p,h);return e.setState({editing:!1,value:n}),e.suppressFlicker(),g&&g(t,n),void(m&&m(t,n))}27!==t.keyCode||e.setState({editing:!1})}},null,this.inputRef);return y({dragging:n,editing:i,value:f,displayValue:w,displayElement:_,inputElement:E,handleDragStart:this.handleDragStart})},i}(r.Component);t.DraggableControl=u,u.defaultHooks=i.pureComponentHooks,u.defaultProps={minValue:-Infinity,maxValue:+Infinity,step:1,stepPixelSize:1,suppressFlicker:50,dragMatrix:[1,0]}},function(e,t,n){"use strict";t.__esModule=!0,t.Window=void 0;var r=n(3),o=n(9),i=n(422),a=n(41),c=n(20),u=n(54),s=n(112),l=n(159),f=n(114),d=n(53),p=n(115);var h=(0,d.createLogger)("Window"),v=function(e){var t,n;function u(){return e.apply(this,arguments)||this}n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var d=u.prototype;return d.componentDidMount=function(){(0,p.refocusLayout)()},d.render=function(){var e=this.props,t=e.resizable,n=e.theme,u=e.children,d=(0,a.useBackend)(this.context),v=d.config,g=d.debugLayout,y=v.observer?v.statusi;)o.push(arguments[i++]);if(r=t,(p(t)||e!==undefined)&&!ie(e))return d(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!ie(t))return t}),o[1]=t,H.apply(null,o)}});Y.prototype[D]||V(Y.prototype,D,Y.prototype.valueOf),P(Y,"Symbol"),A[R]=!0},function(e,t,n){"use strict";var r=n(0),o=n(5),i=n(2),a=n(14),c=n(4),u=n(11).f,s=n(125),l=i.Symbol;if(o&&"function"==typeof l&&(!("description"in l.prototype)||l().description!==undefined)){var f={},d=function(){var e=arguments.length<1||arguments[0]===undefined?undefined:String(arguments[0]),t=this instanceof d?new l(e):e===undefined?l():l(e);return""===e&&(f[t]=!0),t};s(d,l);var p=d.prototype=l.prototype;p.constructor=d;var h=p.toString,v="Symbol(test)"==String(l("test")),g=/^Symbol\((.*)\)[^)]+$/;u(p,"description",{configurable:!0,get:function(){var e=c(this)?this.valueOf():this,t=h.call(e);if(a(f,e))return"";var n=v?t.slice(7,-1):t.replace(g,"$1");return""===n?undefined:n}}),r({global:!0,forced:!0},{Symbol:d})}},function(e,t,n){"use strict";n(22)("asyncIterator")},function(e,t,n){"use strict";n(22)("hasInstance")},function(e,t,n){"use strict";n(22)("isConcatSpreadable")},function(e,t,n){"use strict";n(22)("iterator")},function(e,t,n){"use strict";n(22)("match")},function(e,t,n){"use strict";n(22)("replace")},function(e,t,n){"use strict";n(22)("search")},function(e,t,n){"use strict";n(22)("species")},function(e,t,n){"use strict";n(22)("split")},function(e,t,n){"use strict";n(22)("toPrimitive")},function(e,t,n){"use strict";n(22)("toStringTag")},function(e,t,n){"use strict";n(22)("unscopables")},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(49),a=n(4),c=n(12),u=n(8),s=n(45),l=n(61),f=n(62),d=n(10),p=n(92),h=d("isConcatSpreadable"),v=p>=51||!o((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),g=f("concat"),m=function(e){if(!a(e))return!1;var t=e[h];return t!==undefined?!!t:i(e)};r({target:"Array",proto:!0,forced:!v||!g},{concat:function(e){var t,n,r,o,i,a=c(this),f=l(a,0),d=0;for(t=-1,r=arguments.length;t9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw TypeError("Maximum allowed index exceeded");s(f,d++,i)}return f.length=d,f}})},function(e,t,n){"use strict";var r=n(0),o=n(133),i=n(39);r({target:"Array",proto:!0},{copyWithin:o}),i("copyWithin")},function(e,t,n){"use strict";var r=n(0),o=n(15).every,i=n(34),a=n(19),c=i("every"),u=a("every");r({target:"Array",proto:!0,forced:!c||!u},{every:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var r=n(0),o=n(93),i=n(39);r({target:"Array",proto:!0},{fill:o}),i("fill")},function(e,t,n){"use strict";var r=n(0),o=n(15).filter,i=n(62),a=n(19),c=i("filter"),u=a("filter");r({target:"Array",proto:!0,forced:!c||!u},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var r=n(0),o=n(15).find,i=n(39),a=n(19),c=!0,u=a("find");"find"in[]&&Array(1).find((function(){c=!1})),r({target:"Array",proto:!0,forced:c||!u},{find:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}}),i("find")},function(e,t,n){"use strict";var r=n(0),o=n(15).findIndex,i=n(39),a=n(19),c=!0,u=a("findIndex");"findIndex"in[]&&Array(1).findIndex((function(){c=!1})),r({target:"Array",proto:!0,forced:c||!u},{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}}),i("findIndex")},function(e,t,n){"use strict";var r=n(0),o=n(134),i=n(12),a=n(8),c=n(26),u=n(61);r({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:undefined,t=i(this),n=a(t.length),r=u(t,0);return r.length=o(r,t,t,n,0,e===undefined?1:c(e)),r}})},function(e,t,n){"use strict";var r=n(0),o=n(134),i=n(12),a=n(8),c=n(27),u=n(61);r({target:"Array",proto:!0},{flatMap:function(e){var t,n=i(this),r=a(n.length);return c(e),(t=u(n,0)).length=o(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:undefined),t}})},function(e,t,n){"use strict";var r=n(0),o=n(193);r({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},function(e,t,n){"use strict";var r=n(15).forEach,o=n(34),i=n(19),a=o("forEach"),c=i("forEach");e.exports=a&&c?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}},function(e,t,n){"use strict";var r=n(0),o=n(195);r({target:"Array",stat:!0,forced:!n(72)((function(e){Array.from(e)}))},{from:o})},function(e,t,n){"use strict";var r=n(44),o=n(12),i=n(135),a=n(94),c=n(8),u=n(45),s=n(95);e.exports=function(e){var t,n,l,f,d,p,h=o(e),v="function"==typeof this?this:Array,g=arguments.length,m=g>1?arguments[1]:undefined,y=m!==undefined,b=s(h),x=0;if(y&&(m=r(m,g>2?arguments[2]:undefined,2)),b==undefined||v==Array&&a(b))for(n=new v(t=c(h.length));t>x;x++)p=y?m(h[x],x):h[x],u(n,x,p);else for(d=(f=b.call(h)).next,n=new v;!(l=d.call(f)).done;x++)p=y?i(f,m,[l.value,x],!0):l.value,u(n,x,p);return n.length=x,n}},function(e,t,n){"use strict";var r=n(0),o=n(58).includes,i=n(39);r({target:"Array",proto:!0,forced:!n(19)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}}),i("includes")},function(e,t,n){"use strict";var r=n(0),o=n(58).indexOf,i=n(34),a=n(19),c=[].indexOf,u=!!c&&1/[1].indexOf(1,-0)<0,s=i("indexOf"),l=a("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:u||!s||!l},{indexOf:function(e){return u?c.apply(this,arguments)||0:o(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";n(0)({target:"Array",stat:!0},{isArray:n(49)})},function(e,t,n){"use strict";var r=n(137).IteratorPrototype,o=n(37),i=n(42),a=n(38),c=n(63),u=function(){return this};e.exports=function(e,t,n){var s=t+" Iterator";return e.prototype=o(r,{next:i(1,n)}),a(e,s,!1,!0),c[s]=u,e}},function(e,t,n){"use strict";var r=n(0),o=n(55),i=n(21),a=n(34),c=[].join,u=o!=Object,s=a("join",",");r({target:"Array",proto:!0,forced:u||!s},{join:function(e){return c.call(i(this),e===undefined?",":e)}})},function(e,t,n){"use strict";var r=n(0),o=n(139);r({target:"Array",proto:!0,forced:o!==[].lastIndexOf},{lastIndexOf:o})},function(e,t,n){"use strict";var r=n(0),o=n(15).map,i=n(62),a=n(19),c=i("map"),u=a("map");r({target:"Array",proto:!0,forced:!c||!u},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(45);r({target:"Array",stat:!0,forced:o((function(){function e(){}return!(Array.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(0),o=n(73).left,i=n(34),a=n(19),c=i("reduce"),u=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!c||!u},{reduce:function(e){return o(this,e,arguments.length,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var r=n(0),o=n(73).right,i=n(34),a=n(19),c=i("reduceRight"),u=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!c||!u},{reduceRight:function(e){return o(this,e,arguments.length,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var r=n(0),o=n(4),i=n(49),a=n(36),c=n(8),u=n(21),s=n(45),l=n(10),f=n(62),d=n(19),p=f("slice"),h=d("slice",{ACCESSORS:!0,0:0,1:2}),v=l("species"),g=[].slice,m=Math.max;r({target:"Array",proto:!0,forced:!p||!h},{slice:function(e,t){var n,r,l,f=u(this),d=c(f.length),p=a(e,d),h=a(t===undefined?d:t,d);if(i(f)&&("function"!=typeof(n=f.constructor)||n!==Array&&!i(n.prototype)?o(n)&&null===(n=n[v])&&(n=undefined):n=undefined,n===Array||n===undefined))return g.call(f,p,h);for(r=new(n===undefined?Array:n)(m(h-p,0)),l=0;p1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var r=n(0),o=n(27),i=n(12),a=n(1),c=n(34),u=[],s=u.sort,l=a((function(){u.sort(undefined)})),f=a((function(){u.sort(null)})),d=c("sort");r({target:"Array",proto:!0,forced:l||!f||!d},{sort:function(e){return e===undefined?s.call(i(this)):s.call(i(this),o(e))}})},function(e,t,n){"use strict";n(50)("Array")},function(e,t,n){"use strict";var r=n(0),o=n(36),i=n(26),a=n(8),c=n(12),u=n(61),s=n(45),l=n(62),f=n(19),d=l("splice"),p=f("splice",{ACCESSORS:!0,0:0,1:2}),h=Math.max,v=Math.min;r({target:"Array",proto:!0,forced:!d||!p},{splice:function(e,t){var n,r,l,f,d,p,g=c(this),m=a(g.length),y=o(e,m),b=arguments.length;if(0===b?n=r=0:1===b?(n=0,r=m-y):(n=b-2,r=v(h(i(t),0),m-y)),m+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(l=u(g,r),f=0;fm-r+n;f--)delete g[f-1]}else if(n>r)for(f=m-r;f>y;f--)p=f+n-1,(d=f+r-1)in g?g[p]=g[d]:delete g[p];for(f=0;f>1,v=23===t?o(2,-24)-o(2,-77):0,g=e<0||0===e&&1/e<0?1:0,m=0;for((e=r(e))!=e||e===1/0?(s=e!=e?1:0,u=p):(u=i(a(e)/c),e*(l=o(2,-u))<1&&(u--,l*=2),(e+=u+h>=1?v/l:v*o(2,1-h))*l>=2&&(u++,l/=2),u+h>=p?(s=0,u=p):u+h>=1?(s=(e*l-1)*o(2,t),u+=h):(s=e*o(2,h-1)*o(2,t),u=0));t>=8;f[m++]=255&s,s/=256,t-=8);for(u=u<0;f[m++]=255&u,u/=256,d-=8);return f[--m]|=128*g,f},unpack:function(e,t){var n,r=e.length,i=8*r-t-1,a=(1<>1,u=i-7,s=r-1,l=e[s--],f=127&l;for(l>>=7;u>0;f=256*f+e[s],s--,u-=8);for(n=f&(1<<-u)-1,f>>=-u,u+=t;u>0;n=256*n+e[s],s--,u-=8);if(0===f)f=1-c;else{if(f===a)return n?NaN:l?-1/0:1/0;n+=o(2,t),f-=c}return(l?-1:1)*n*o(2,f-t)}}},function(e,t,n){"use strict";var r=n(0),o=n(7);r({target:"ArrayBuffer",stat:!0,forced:!o.NATIVE_ARRAY_BUFFER_VIEWS},{isView:o.isView})},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(74),a=n(6),c=n(36),u=n(8),s=n(40),l=i.ArrayBuffer,f=i.DataView,d=l.prototype.slice;r({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:o((function(){return!new l(2).slice(1,undefined).byteLength}))},{slice:function(e,t){if(d!==undefined&&t===undefined)return d.call(a(this),e);for(var n=a(this).byteLength,r=c(e,n),o=c(t===undefined?n:t,n),i=new(s(this,l))(u(o-r)),p=new f(this),h=new f(i),v=0;r9999?"+":"";return n+o(i(e),n?6:4,0)+"-"+o(this.getUTCMonth()+1,2,0)+"-"+o(this.getUTCDate(),2,0)+"T"+o(this.getUTCHours(),2,0)+":"+o(this.getUTCMinutes(),2,0)+":"+o(this.getUTCSeconds(),2,0)+"."+o(t,3,0)+"Z"}:u},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(12),a=n(29);r({target:"Date",proto:!0,forced:o((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(e){var t=i(this),n=a(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){"use strict";var r=n(25),o=n(223),i=n(10)("toPrimitive"),a=Date.prototype;i in a||r(a,i,o)},function(e,t,n){"use strict";var r=n(6),o=n(29);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return o(r(this),"number"!==e)}},function(e,t,n){"use strict";var r=n(18),o=Date.prototype,i=o.toString,a=o.getTime;new Date(NaN)+""!="Invalid Date"&&r(o,"toString",(function(){var e=a.call(this);return e==e?i.call(this):"Invalid Date"}))},function(e,t,n){"use strict";n(0)({target:"Function",proto:!0},{bind:n(141)})},function(e,t,n){"use strict";var r=n(4),o=n(11),i=n(31),a=n(10)("hasInstance"),c=Function.prototype;a in c||o.f(c,a,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){"use strict";var r=n(5),o=n(11).f,i=Function.prototype,a=i.toString,c=/^\s*function ([^ (]*)/;r&&!("name"in i)&&o(i,"name",{configurable:!0,get:function(){try{return a.call(this).match(c)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(2);n(38)(r.JSON,"JSON",!0)},function(e,t,n){"use strict";var r=n(75),o=n(142);e.exports=r("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),o)},function(e,t,n){"use strict";var r=n(0),o=n(143),i=Math.acosh,a=Math.log,c=Math.sqrt,u=Math.LN2;r({target:"Math",stat:!0,forced:!i||710!=Math.floor(i(Number.MAX_VALUE))||i(Infinity)!=Infinity},{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?a(e)+u:o(e-1+c(e-1)*c(e+1))}})},function(e,t,n){"use strict";var r=n(0),o=Math.asinh,i=Math.log,a=Math.sqrt;r({target:"Math",stat:!0,forced:!(o&&1/o(0)>0)},{asinh:function c(e){return isFinite(e=+e)&&0!=e?e<0?-c(-e):i(e+a(e*e+1)):e}})},function(e,t,n){"use strict";var r=n(0),o=Math.atanh,i=Math.log;r({target:"Math",stat:!0,forced:!(o&&1/o(-0)<0)},{atanh:function(e){return 0==(e=+e)?e:i((1+e)/(1-e))/2}})},function(e,t,n){"use strict";var r=n(0),o=n(102),i=Math.abs,a=Math.pow;r({target:"Math",stat:!0},{cbrt:function(e){return o(e=+e)*a(i(e),1/3)}})},function(e,t,n){"use strict";var r=n(0),o=Math.floor,i=Math.log,a=Math.LOG2E;r({target:"Math",stat:!0},{clz32:function(e){return(e>>>=0)?31-o(i(e+.5)*a):32}})},function(e,t,n){"use strict";var r=n(0),o=n(77),i=Math.cosh,a=Math.abs,c=Math.E;r({target:"Math",stat:!0,forced:!i||i(710)===Infinity},{cosh:function(e){var t=o(a(e)-1)+1;return(t+1/(t*c*c))*(c/2)}})},function(e,t,n){"use strict";var r=n(0),o=n(77);r({target:"Math",stat:!0,forced:o!=Math.expm1},{expm1:o})},function(e,t,n){"use strict";n(0)({target:"Math",stat:!0},{fround:n(238)})},function(e,t,n){"use strict";var r=n(102),o=Math.abs,i=Math.pow,a=i(2,-52),c=i(2,-23),u=i(2,127)*(2-c),s=i(2,-126);e.exports=Math.fround||function(e){var t,n,i=o(e),l=r(e);return iu||n!=n?l*Infinity:l*n}},function(e,t,n){"use strict";var r=n(0),o=Math.hypot,i=Math.abs,a=Math.sqrt;r({target:"Math",stat:!0,forced:!!o&&o(Infinity,NaN)!==Infinity},{hypot:function(e,t){for(var n,r,o=0,c=0,u=arguments.length,s=0;c0?(r=n/s)*r:n;return s===Infinity?Infinity:s*a(o)}})},function(e,t,n){"use strict";var r=n(0),o=n(1),i=Math.imul;r({target:"Math",stat:!0,forced:o((function(){return-5!=i(4294967295,5)||2!=i.length}))},{imul:function(e,t){var n=+e,r=+t,o=65535&n,i=65535&r;return 0|o*i+((65535&n>>>16)*i+o*(65535&r>>>16)<<16>>>0)}})},function(e,t,n){"use strict";var r=n(0),o=Math.log,i=Math.LOG10E;r({target:"Math",stat:!0},{log10:function(e){return o(e)*i}})},function(e,t,n){"use strict";n(0)({target:"Math",stat:!0},{log1p:n(143)})},function(e,t,n){"use strict";var r=n(0),o=Math.log,i=Math.LN2;r({target:"Math",stat:!0},{log2:function(e){return o(e)/i}})},function(e,t,n){"use strict";n(0)({target:"Math",stat:!0},{sign:n(102)})},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(77),a=Math.abs,c=Math.exp,u=Math.E;r({target:"Math",stat:!0,forced:o((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(e){return a(e=+e)<1?(i(e)-i(-e))/2:(c(e-1)-c(-e-1))*(u/2)}})},function(e,t,n){"use strict";var r=n(0),o=n(77),i=Math.exp;r({target:"Math",stat:!0},{tanh:function(e){var t=o(e=+e),n=o(-e);return t==Infinity?1:n==Infinity?-1:(t-n)/(i(e)+i(-e))}})},function(e,t,n){"use strict";n(38)(Math,"Math",!0)},function(e,t,n){"use strict";var r=n(0),o=Math.ceil,i=Math.floor;r({target:"Math",stat:!0},{trunc:function(e){return(e>0?i:o)(e)}})},function(e,t,n){"use strict";var r=n(5),o=n(2),i=n(59),a=n(18),c=n(14),u=n(28),s=n(76),l=n(29),f=n(1),d=n(37),p=n(43).f,h=n(16).f,v=n(11).f,g=n(52).trim,m=o.Number,y=m.prototype,b="Number"==u(d(y)),x=function(e){var t,n,r,o,i,a,c,u,s=l(e,!1);if("string"==typeof s&&s.length>2)if(43===(t=(s=g(s)).charCodeAt(0))||45===t){if(88===(n=s.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(s.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+s}for(a=(i=s.slice(2)).length,c=0;co)return NaN;return parseInt(i,r)}return+s};if(i("Number",!m(" 0o1")||!m("0b1")||m("+0x1"))){for(var N,w=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof w&&(b?f((function(){y.valueOf.call(n)})):"Number"!=u(n))?s(new m(x(t)),n,w):x(t)},C=r?p(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),_=0;C.length>_;_++)c(m,N=C[_])&&!c(w,N)&&v(w,N,h(m,N));w.prototype=y,y.constructor=w,a(o,"Number",w)}},function(e,t,n){"use strict";n(0)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(e,t,n){"use strict";n(0)({target:"Number",stat:!0},{isFinite:n(252)})},function(e,t,n){"use strict";var r=n(2).isFinite;e.exports=Number.isFinite||function(e){return"number"==typeof e&&r(e)}},function(e,t,n){"use strict";n(0)({target:"Number",stat:!0},{isInteger:n(144)})},function(e,t,n){"use strict";n(0)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},function(e,t,n){"use strict";var r=n(0),o=n(144),i=Math.abs;r({target:"Number",stat:!0},{isSafeInteger:function(e){return o(e)&&i(e)<=9007199254740991}})},function(e,t,n){"use strict";n(0)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){"use strict";n(0)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){"use strict";var r=n(0),o=n(259);r({target:"Number",stat:!0,forced:Number.parseFloat!=o},{parseFloat:o})},function(e,t,n){"use strict";var r=n(2),o=n(52).trim,i=n(78),a=r.parseFloat,c=1/a(i+"-0")!=-Infinity;e.exports=c?function(e){var t=o(String(e)),n=a(t);return 0===n&&"-"==t.charAt(0)?-0:n}:a},function(e,t,n){"use strict";var r=n(0),o=n(145);r({target:"Number",stat:!0,forced:Number.parseInt!=o},{parseInt:o})},function(e,t,n){"use strict";var r=n(0),o=n(26),i=n(262),a=n(101),c=n(1),u=1..toFixed,s=Math.floor,l=function f(e,t,n){return 0===t?n:t%2==1?f(e,t-1,n*e):f(e*e,t/2,n)};r({target:"Number",proto:!0,forced:u&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!c((function(){u.call({})}))},{toFixed:function(e){var t,n,r,c,u=i(this),f=o(e),d=[0,0,0,0,0,0],p="",h="0",v=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*d[n],d[n]=r%1e7,r=s(r/1e7)},g=function(e){for(var t=6,n=0;--t>=0;)n+=d[t],d[t]=s(n/e),n=n%e*1e7},m=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==d[e]){var n=String(d[e]);t=""===t?n:t+a.call("0",7-n.length)+n}return t};if(f<0||f>20)throw RangeError("Incorrect fraction digits");if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(p="-",u=-u),u>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(u*l(2,69,1))-69)<0?u*l(2,-t,1):u/l(2,t,1),n*=4503599627370496,(t=52-t)>0){for(v(0,n),r=f;r>=7;)v(1e7,0),r-=7;for(v(l(10,r,1),0),r=t-1;r>=23;)g(1<<23),r-=23;g(1<0?p+((c=h.length)<=f?"0."+a.call("0",f-c)+h:h.slice(0,c-f)+"."+h.slice(c-f)):p+h}})},function(e,t,n){"use strict";var r=n(28);e.exports=function(e){if("number"!=typeof e&&"Number"!=r(e))throw TypeError("Incorrect invocation");return+e}},function(e,t,n){"use strict";var r=n(0),o=n(264);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(e,t,n){"use strict";var r=n(5),o=n(1),i=n(60),a=n(90),c=n(68),u=n(12),s=n(55),l=Object.assign,f=Object.defineProperty;e.exports=!l||o((function(){if(r&&1!==l({b:1},l(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||"abcdefghijklmnopqrst"!=i(l({},t)).join("")}))?function(e,t){for(var n=u(e),o=arguments.length,l=1,f=a.f,d=c.f;o>l;)for(var p,h=s(arguments[l++]),v=f?i(h).concat(f(h)):i(h),g=v.length,m=0;g>m;)p=v[m++],r&&!d.call(h,p)||(n[p]=h[p]);return n}:l},function(e,t,n){"use strict";n(0)({target:"Object",stat:!0,sham:!n(5)},{create:n(37)})},function(e,t,n){"use strict";var r=n(0),o=n(5),i=n(79),a=n(12),c=n(27),u=n(11);o&&r({target:"Object",proto:!0,forced:i},{__defineGetter__:function(e,t){u.f(a(this),e,{get:c(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(0),o=n(5);r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperties:n(129)})},function(e,t,n){"use strict";var r=n(0),o=n(5);r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperty:n(11).f})},function(e,t,n){"use strict";var r=n(0),o=n(5),i=n(79),a=n(12),c=n(27),u=n(11);o&&r({target:"Object",proto:!0,forced:i},{__defineSetter__:function(e,t){u.f(a(this),e,{set:c(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(0),o=n(146).entries;r({target:"Object",stat:!0},{entries:function(e){return o(e)}})},function(e,t,n){"use strict";var r=n(0),o=n(65),i=n(1),a=n(4),c=n(47).onFreeze,u=Object.freeze;r({target:"Object",stat:!0,forced:i((function(){u(1)})),sham:!o},{freeze:function(e){return u&&a(e)?u(c(e)):e}})},function(e,t,n){"use strict";var r=n(0),o=n(66),i=n(45);r({target:"Object",stat:!0},{fromEntries:function(e){var t={};return o(e,(function(e,n){i(t,e,n)}),undefined,!0),t}})},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(21),a=n(16).f,c=n(5),u=o((function(){a(1)}));r({target:"Object",stat:!0,forced:!c||u,sham:!c},{getOwnPropertyDescriptor:function(e,t){return a(i(e),t)}})},function(e,t,n){"use strict";var r=n(0),o=n(5),i=n(88),a=n(21),c=n(16),u=n(45);r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),o=c.f,s=i(r),l={},f=0;s.length>f;)(n=o(r,t=s[f++]))!==undefined&&u(l,t,n);return l}})},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(131).f;r({target:"Object",stat:!0,forced:o((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:i})},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(12),a=n(31),c=n(98);r({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!c},{getPrototypeOf:function(e){return a(i(e))}})},function(e,t,n){"use strict";n(0)({target:"Object",stat:!0},{is:n(147)})},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(4),a=Object.isExtensible;r({target:"Object",stat:!0,forced:o((function(){a(1)}))},{isExtensible:function(e){return!!i(e)&&(!a||a(e))}})},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(4),a=Object.isFrozen;r({target:"Object",stat:!0,forced:o((function(){a(1)}))},{isFrozen:function(e){return!i(e)||!!a&&a(e)}})},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(4),a=Object.isSealed;r({target:"Object",stat:!0,forced:o((function(){a(1)}))},{isSealed:function(e){return!i(e)||!!a&&a(e)}})},function(e,t,n){"use strict";var r=n(0),o=n(12),i=n(60);r({target:"Object",stat:!0,forced:n(1)((function(){i(1)}))},{keys:function(e){return i(o(e))}})},function(e,t,n){"use strict";var r=n(0),o=n(5),i=n(79),a=n(12),c=n(29),u=n(31),s=n(16).f;o&&r({target:"Object",proto:!0,forced:i},{__lookupGetter__:function(e){var t,n=a(this),r=c(e,!0);do{if(t=s(n,r))return t.get}while(n=u(n))}})},function(e,t,n){"use strict";var r=n(0),o=n(5),i=n(79),a=n(12),c=n(29),u=n(31),s=n(16).f;o&&r({target:"Object",proto:!0,forced:i},{__lookupSetter__:function(e){var t,n=a(this),r=c(e,!0);do{if(t=s(n,r))return t.set}while(n=u(n))}})},function(e,t,n){"use strict";var r=n(0),o=n(4),i=n(47).onFreeze,a=n(65),c=n(1),u=Object.preventExtensions;r({target:"Object",stat:!0,forced:c((function(){u(1)})),sham:!a},{preventExtensions:function(e){return u&&o(e)?u(i(e)):e}})},function(e,t,n){"use strict";var r=n(0),o=n(4),i=n(47).onFreeze,a=n(65),c=n(1),u=Object.seal;r({target:"Object",stat:!0,forced:c((function(){u(1)})),sham:!a},{seal:function(e){return u&&o(e)?u(i(e)):e}})},function(e,t,n){"use strict";n(0)({target:"Object",stat:!0},{setPrototypeOf:n(46)})},function(e,t,n){"use strict";var r=n(96),o=n(18),i=n(288);r||o(Object.prototype,"toString",i,{unsafe:!0})},function(e,t,n){"use strict";var r=n(96),o=n(71);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},function(e,t,n){"use strict";var r=n(0),o=n(146).values;r({target:"Object",stat:!0},{values:function(e){return o(e)}})},function(e,t,n){"use strict";var r=n(0),o=n(145);r({global:!0,forced:parseInt!=o},{parseInt:o})},function(e,t,n){"use strict";var r,o,i,a,c=n(0),u=n(33),s=n(2),l=n(32),f=n(148),d=n(18),p=n(64),h=n(38),v=n(50),g=n(4),m=n(27),y=n(51),b=n(28),x=n(86),N=n(66),w=n(72),C=n(40),_=n(103).set,E=n(150),S=n(151),V=n(292),k=n(152),T=n(293),O=n(30),A=n(59),I=n(10),M=n(92),L=I("species"),B="Promise",P=O.get,j=O.set,F=O.getterFor(B),R=f,D=s.TypeError,K=s.document,z=s.process,U=l("fetch"),Y=k.f,H=Y,W="process"==b(z),$=!!(K&&K.createEvent&&s.dispatchEvent),G=A(B,(function(){if(!(x(R)!==String(R))){if(66===M)return!0;if(!W&&"function"!=typeof PromiseRejectionEvent)return!0}if(u&&!R.prototype["finally"])return!0;if(M>=51&&/native code/.test(R))return!1;var e=R.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[L]=t,!(e.then((function(){}))instanceof t)})),q=G||!w((function(e){R.all(e)["catch"]((function(){}))})),X=function(e){var t;return!(!g(e)||"function"!=typeof(t=e.then))&&t},Q=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;E((function(){for(var o=t.value,i=1==t.state,a=0;r.length>a;){var c,u,s,l=r[a++],f=i?l.ok:l.fail,d=l.resolve,p=l.reject,h=l.domain;try{f?(i||(2===t.rejection&&te(e,t),t.rejection=1),!0===f?c=o:(h&&h.enter(),c=f(o),h&&(h.exit(),s=!0)),c===l.promise?p(D("Promise-chain cycle")):(u=X(c))?u.call(c,d,p):d(c)):p(o)}catch(v){h&&!s&&h.exit(),p(v)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&Z(e,t)}))}},J=function(e,t,n){var r,o;$?((r=K.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),s.dispatchEvent(r)):r={promise:t,reason:n},(o=s["on"+e])?o(r):"unhandledrejection"===e&&V("Unhandled promise rejection",n)},Z=function(e,t){_.call(s,(function(){var n,r=t.value;if(ee(t)&&(n=T((function(){W?z.emit("unhandledRejection",r,e):J("unhandledrejection",e,r)})),t.rejection=W||ee(t)?2:1,n.error))throw n.value}))},ee=function(e){return 1!==e.rejection&&!e.parent},te=function(e,t){_.call(s,(function(){W?z.emit("rejectionHandled",e):J("rejectionhandled",e,t.value)}))},ne=function(e,t,n,r){return function(o){e(t,n,o,r)}},re=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,Q(e,t,!0))},oe=function ie(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw D("Promise can't be resolved itself");var o=X(n);o?E((function(){var r={done:!1};try{o.call(n,ne(ie,e,r,t),ne(re,e,r,t))}catch(i){re(e,r,i,t)}})):(t.value=n,t.state=1,Q(e,t,!1))}catch(i){re(e,{done:!1},i,t)}}};G&&(R=function(e){y(this,R,B),m(e),r.call(this);var t=P(this);try{e(ne(oe,this,t),ne(re,this,t))}catch(n){re(this,t,n)}},(r=function(e){j(this,{type:B,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:undefined})}).prototype=p(R.prototype,{then:function(e,t){var n=F(this),r=Y(C(this,R));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=W?z.domain:undefined,n.parent=!0,n.reactions.push(r),0!=n.state&&Q(this,n,!1),r.promise},"catch":function(e){return this.then(undefined,e)}}),o=function(){var e=new r,t=P(e);this.promise=e,this.resolve=ne(oe,e,t),this.reject=ne(re,e,t)},k.f=Y=function(e){return e===R||e===i?new o(e):H(e)},u||"function"!=typeof f||(a=f.prototype.then,d(f.prototype,"then",(function(e,t){var n=this;return new R((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof U&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return S(R,U.apply(s,arguments))}}))),c({global:!0,wrap:!0,forced:G},{Promise:R}),h(R,B,!1,!0),v(B),i=l(B),c({target:B,stat:!0,forced:G},{reject:function(e){var t=Y(this);return t.reject.call(undefined,e),t.promise}}),c({target:B,stat:!0,forced:u||G},{resolve:function(e){return S(u&&this===i?R:this,e)}}),c({target:B,stat:!0,forced:q},{all:function(e){var t=this,n=Y(t),r=n.resolve,o=n.reject,i=T((function(){var n=m(t.resolve),i=[],a=0,c=1;N(e,(function(e){var u=a++,s=!1;i.push(undefined),c++,n.call(t,e).then((function(e){s||(s=!0,i[u]=e,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise},race:function(e){var t=this,n=Y(t),r=n.reject,o=T((function(){var o=m(t.resolve);N(e,(function(e){o.call(t,e).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t,n){"use strict";e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},function(e,t,n){"use strict";var r=n(0),o=n(33),i=n(148),a=n(1),c=n(32),u=n(40),s=n(151),l=n(18);r({target:"Promise",proto:!0,real:!0,forced:!!i&&a((function(){i.prototype["finally"].call({then:function(){}},(function(){}))}))},{"finally":function(e){var t=u(this,c("Promise")),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}}),o||"function"!=typeof i||i.prototype["finally"]||l(i.prototype,"finally",c("Promise").prototype["finally"])},function(e,t,n){"use strict";var r=n(0),o=n(32),i=n(27),a=n(6),c=n(1),u=o("Reflect","apply"),s=Function.apply;r({target:"Reflect",stat:!0,forced:!c((function(){u((function(){}))}))},{apply:function(e,t,n){return i(e),a(n),u?u(e,t,n):s.call(e,t,n)}})},function(e,t,n){"use strict";var r=n(0),o=n(32),i=n(27),a=n(6),c=n(4),u=n(37),s=n(141),l=n(1),f=o("Reflect","construct"),d=l((function(){function e(){}return!(f((function(){}),[],e)instanceof e)})),p=!l((function(){f((function(){}))})),h=d||p;r({target:"Reflect",stat:!0,forced:h,sham:h},{construct:function(e,t){i(e),a(t);var n=arguments.length<3?e:i(arguments[2]);if(p&&!d)return f(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(s.apply(e,r))}var o=n.prototype,l=u(c(o)?o:Object.prototype),h=Function.apply.call(e,l,t);return c(h)?h:l}})},function(e,t,n){"use strict";var r=n(0),o=n(5),i=n(6),a=n(29),c=n(11);r({target:"Reflect",stat:!0,forced:n(1)((function(){Reflect.defineProperty(c.f({},1,{value:1}),1,{value:2})})),sham:!o},{defineProperty:function(e,t,n){i(e);var r=a(t,!0);i(n);try{return c.f(e,r,n),!0}catch(o){return!1}}})},function(e,t,n){"use strict";var r=n(0),o=n(6),i=n(16).f;r({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var n=i(o(e),t);return!(n&&!n.configurable)&&delete e[t]}})},function(e,t,n){"use strict";var r=n(0),o=n(4),i=n(6),a=n(14),c=n(16),u=n(31);r({target:"Reflect",stat:!0},{get:function s(e,t){var n,r,l=arguments.length<3?e:arguments[2];return i(e)===l?e[t]:(n=c.f(e,t))?a(n,"value")?n.value:n.get===undefined?undefined:n.get.call(l):o(r=u(e))?s(r,t,l):void 0}})},function(e,t,n){"use strict";var r=n(0),o=n(5),i=n(6),a=n(16);r({target:"Reflect",stat:!0,sham:!o},{getOwnPropertyDescriptor:function(e,t){return a.f(i(e),t)}})},function(e,t,n){"use strict";var r=n(0),o=n(6),i=n(31);r({target:"Reflect",stat:!0,sham:!n(98)},{getPrototypeOf:function(e){return i(o(e))}})},function(e,t,n){"use strict";n(0)({target:"Reflect",stat:!0},{has:function(e,t){return t in e}})},function(e,t,n){"use strict";var r=n(0),o=n(6),i=Object.isExtensible;r({target:"Reflect",stat:!0},{isExtensible:function(e){return o(e),!i||i(e)}})},function(e,t,n){"use strict";n(0)({target:"Reflect",stat:!0},{ownKeys:n(88)})},function(e,t,n){"use strict";var r=n(0),o=n(32),i=n(6);r({target:"Reflect",stat:!0,sham:!n(65)},{preventExtensions:function(e){i(e);try{var t=o("Object","preventExtensions");return t&&t(e),!0}catch(n){return!1}}})},function(e,t,n){"use strict";var r=n(0),o=n(6),i=n(4),a=n(14),c=n(1),u=n(11),s=n(16),l=n(31),f=n(42);r({target:"Reflect",stat:!0,forced:c((function(){var e=u.f({},"a",{configurable:!0});return!1!==Reflect.set(l(e),"a",1,e)}))},{set:function d(e,t,n){var r,c,p=arguments.length<4?e:arguments[3],h=s.f(o(e),t);if(!h){if(i(c=l(e)))return d(c,t,n,p);h=f(0)}if(a(h,"value")){if(!1===h.writable||!i(p))return!1;if(r=s.f(p,t)){if(r.get||r.set||!1===r.writable)return!1;r.value=n,u.f(p,t,r)}else u.f(p,t,f(0,n));return!0}return h.set!==undefined&&(h.set.call(p,n),!0)}})},function(e,t,n){"use strict";var r=n(0),o=n(6),i=n(138),a=n(46);a&&r({target:"Reflect",stat:!0},{setPrototypeOf:function(e,t){o(e),i(t);try{return a(e,t),!0}catch(n){return!1}}})},function(e,t,n){"use strict";var r=n(5),o=n(2),i=n(59),a=n(76),c=n(11).f,u=n(43).f,s=n(104),l=n(80),f=n(105),d=n(18),p=n(1),h=n(30).set,v=n(50),g=n(10)("match"),m=o.RegExp,y=m.prototype,b=/a/g,x=/a/g,N=new m(b)!==b,w=f.UNSUPPORTED_Y;if(r&&i("RegExp",!N||w||p((function(){return x[g]=!1,m(b)!=b||m(x)==x||"/a/i"!=m(b,"i")})))){for(var C=function(e,t){var n,r=this instanceof C,o=s(e),i=t===undefined;if(!r&&o&&e.constructor===C&&i)return e;N?o&&!i&&(e=e.source):e instanceof C&&(i&&(t=l.call(e)),e=e.source),w&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var c=a(N?new m(e,t):m(e,t),r?this:y,C);return w&&n&&h(c,{sticky:n}),c},_=function(e){e in C||c(C,e,{configurable:!0,get:function(){return m[e]},set:function(t){m[e]=t}})},E=u(m),S=0;E.length>S;)_(E[S++]);y.constructor=C,C.prototype=y,d(o,"RegExp",C)}v("RegExp")},function(e,t,n){"use strict";var r=n(5),o=n(11),i=n(80),a=n(105).UNSUPPORTED_Y;r&&("g"!=/./g.flags||a)&&o.f(RegExp.prototype,"flags",{configurable:!0,get:i})},function(e,t,n){"use strict";var r=n(18),o=n(6),i=n(1),a=n(80),c=RegExp.prototype,u=c.toString,s=i((function(){return"/a/b"!=u.call({source:"a",flags:"b"})})),l="toString"!=u.name;(s||l)&&r(RegExp.prototype,"toString",(function(){var e=o(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(n===undefined&&e instanceof RegExp&&!("flags"in c)?a.call(e):n)}),{unsafe:!0})},function(e,t,n){"use strict";var r=n(75),o=n(142);e.exports=r("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),o)},function(e,t,n){"use strict";var r=n(0),o=n(106).codeAt;r({target:"String",proto:!0},{codePointAt:function(e){return o(this,e)}})},function(e,t,n){"use strict";var r,o=n(0),i=n(16).f,a=n(8),c=n(107),u=n(17),s=n(108),l=n(33),f="".endsWith,d=Math.min,p=s("endsWith");o({target:"String",proto:!0,forced:!!(l||p||(r=i(String.prototype,"endsWith"),!r||r.writable))&&!p},{endsWith:function(e){var t=String(u(this));c(e);var n=arguments.length>1?arguments[1]:undefined,r=a(t.length),o=n===undefined?r:d(a(n),r),i=String(e);return f?f.call(t,i,o):t.slice(o-i.length,o)===i}})},function(e,t,n){"use strict";var r=n(0),o=n(36),i=String.fromCharCode,a=String.fromCodePoint;r({target:"String",stat:!0,forced:!!a&&1!=a.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],o(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){"use strict";var r=n(0),o=n(107),i=n(17);r({target:"String",proto:!0,forced:!n(108)("includes")},{includes:function(e){return!!~String(i(this)).indexOf(o(e),arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var r=n(106).charAt,o=n(30),i=n(97),a=o.set,c=o.getterFor("String Iterator");i(String,"String",(function(e){a(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=c(this),n=t.string,o=t.index;return o>=n.length?{value:undefined,done:!0}:(e=r(n,o),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(82),o=n(6),i=n(8),a=n(17),c=n(109),u=n(83);r("match",1,(function(e,t,n){return[function(t){var n=a(this),r=t==undefined?undefined:t[e];return r!==undefined?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=o(e),s=String(this);if(!a.global)return u(a,s);var l=a.unicode;a.lastIndex=0;for(var f,d=[],p=0;null!==(f=u(a,s));){var h=String(f[0]);d[p]=h,""===h&&(a.lastIndex=c(s,i(a.lastIndex),l)),p++}return 0===p?null:d}]}))},function(e,t,n){"use strict";var r=n(0),o=n(100).end;r({target:"String",proto:!0,forced:n(154)},{padEnd:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var r=n(0),o=n(100).start;r({target:"String",proto:!0,forced:n(154)},{padStart:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var r=n(0),o=n(21),i=n(8);r({target:"String",stat:!0},{raw:function(e){for(var t=o(e.raw),n=i(t.length),r=arguments.length,a=[],c=0;n>c;)a.push(String(t[c++])),c]*>)/g,v=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(e,t,n,r){var g=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,m=r.REPLACE_KEEPS_$0,y=g?"$":"$0";return[function(n,r){var o=u(this),i=n==undefined?undefined:n[e];return i!==undefined?i.call(n,o,r):t.call(String(o),n,r)},function(e,r){if(!g&&m||"string"==typeof r&&-1===r.indexOf(y)){var i=n(t,e,this,r);if(i.done)return i.value}var u=o(e),p=String(this),h="function"==typeof r;h||(r=String(r));var v=u.global;if(v){var x=u.unicode;u.lastIndex=0}for(var N=[];;){var w=l(u,p);if(null===w)break;if(N.push(w),!v)break;""===String(w[0])&&(u.lastIndex=s(p,a(u.lastIndex),x))}for(var C,_="",E=0,S=0;S=E&&(_+=p.slice(E,k)+M,E=k+V.length)}return _+p.slice(E)}];function b(e,n,r,o,a,c){var u=r+e.length,s=o.length,l=v;return a!==undefined&&(a=i(a),l=h),t.call(c,l,(function(t,i){var c;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(u);case"<":c=a[i.slice(1,-1)];break;default:var l=+i;if(0===l)return t;if(l>s){var f=p(l/10);return 0===f?t:f<=s?o[f-1]===undefined?i.charAt(1):o[f-1]+i.charAt(1):t}c=o[l-1]}return c===undefined?"":c}))}}))},function(e,t,n){"use strict";var r=n(82),o=n(6),i=n(17),a=n(147),c=n(83);r("search",1,(function(e,t,n){return[function(t){var n=i(this),r=t==undefined?undefined:t[e];return r!==undefined?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var i=o(e),u=String(this),s=i.lastIndex;a(s,0)||(i.lastIndex=0);var l=c(i,u);return a(i.lastIndex,s)||(i.lastIndex=s),null===l?-1:l.index}]}))},function(e,t,n){"use strict";var r=n(82),o=n(104),i=n(6),a=n(17),c=n(40),u=n(109),s=n(8),l=n(83),f=n(81),d=n(1),p=[].push,h=Math.min,v=!d((function(){return!RegExp(4294967295,"y")}));r("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(a(this)),i=n===undefined?4294967295:n>>>0;if(0===i)return[];if(e===undefined)return[r];if(!o(e))return t.call(r,e,i);for(var c,u,s,l=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),h=0,v=new RegExp(e.source,d+"g");(c=f.call(v,r))&&!((u=v.lastIndex)>h&&(l.push(r.slice(h,c.index)),c.length>1&&c.index=i));)v.lastIndex===c.index&&v.lastIndex++;return h===r.length?!s&&v.test("")||l.push(""):l.push(r.slice(h)),l.length>i?l.slice(0,i):l}:"0".split(undefined,0).length?function(e,n){return e===undefined&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var o=a(this),i=t==undefined?undefined:t[e];return i!==undefined?i.call(t,o,n):r.call(String(o),t,n)},function(e,o){var a=n(r,e,this,o,r!==t);if(a.done)return a.value;var f=i(e),d=String(this),p=c(f,RegExp),g=f.unicode,m=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(v?"y":"g"),y=new p(v?f:"^(?:"+f.source+")",m),b=o===undefined?4294967295:o>>>0;if(0===b)return[];if(0===d.length)return null===l(y,d)?[d]:[];for(var x=0,N=0,w=[];N1?arguments[1]:undefined,t.length)),r=String(e);return f?f.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";var r=n(0),o=n(52).trim;r({target:"String",proto:!0,forced:n(110)("trim")},{trim:function(){return o(this)}})},function(e,t,n){"use strict";var r=n(0),o=n(52).end,i=n(110)("trimEnd"),a=i?function(){return o(this)}:"".trimEnd;r({target:"String",proto:!0,forced:i},{trimEnd:a,trimRight:a})},function(e,t,n){"use strict";var r=n(0),o=n(52).start,i=n(110)("trimStart"),a=i?function(){return o(this)}:"".trimStart;r({target:"String",proto:!0,forced:i},{trimStart:a,trimLeft:a})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("anchor")},{anchor:function(e){return o(this,"a","name",e)}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("big")},{big:function(){return o(this,"big","","")}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("blink")},{blink:function(){return o(this,"blink","","")}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("bold")},{bold:function(){return o(this,"b","","")}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("fixed")},{fixed:function(){return o(this,"tt","","")}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("fontcolor")},{fontcolor:function(e){return o(this,"font","color",e)}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("fontsize")},{fontsize:function(e){return o(this,"font","size",e)}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("italics")},{italics:function(){return o(this,"i","","")}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("link")},{link:function(e){return o(this,"a","href",e)}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("small")},{small:function(){return o(this,"small","","")}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("strike")},{strike:function(){return o(this,"strike","","")}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("sub")},{sub:function(){return o(this,"sub","","")}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("sup")},{sup:function(){return o(this,"sup","","")}})},function(e,t,n){"use strict";n(35)("Float32",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";var r=n(26);e.exports=function(e){var t=r(e);if(t<0)throw RangeError("The argument can't be less than 0");return t}},function(e,t,n){"use strict";n(35)("Float64",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";n(35)("Int8",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";n(35)("Int16",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";n(35)("Int32",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";n(35)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";n(35)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}),!0)},function(e,t,n){"use strict";n(35)("Uint16",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";n(35)("Uint32",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";var r=n(7),o=n(133),i=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",(function(e,t){return o.call(i(this),e,t,arguments.length>2?arguments[2]:undefined)}))},function(e,t,n){"use strict";var r=n(7),o=n(15).every,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("every",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var r=n(7),o=n(93),i=r.aTypedArray;(0,r.exportTypedArrayMethod)("fill",(function(e){return o.apply(i(this),arguments)}))},function(e,t,n){"use strict";var r=n(7),o=n(15).filter,i=n(40),a=r.aTypedArray,c=r.aTypedArrayConstructor;(0,r.exportTypedArrayMethod)("filter",(function(e){for(var t=o(a(this),e,arguments.length>1?arguments[1]:undefined),n=i(this,this.constructor),r=0,u=t.length,s=new(c(n))(u);u>r;)s[r]=t[r++];return s}))},function(e,t,n){"use strict";var r=n(7),o=n(15).find,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("find",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var r=n(7),o=n(15).findIndex,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("findIndex",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var r=n(7),o=n(15).forEach,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("forEach",(function(e){o(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var r=n(111);(0,n(7).exportTypedArrayStaticMethod)("from",n(156),r)},function(e,t,n){"use strict";var r=n(7),o=n(58).includes,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("includes",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var r=n(7),o=n(58).indexOf,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("indexOf",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var r=n(2),o=n(7),i=n(136),a=n(10)("iterator"),c=r.Uint8Array,u=i.values,s=i.keys,l=i.entries,f=o.aTypedArray,d=o.exportTypedArrayMethod,p=c&&c.prototype[a],h=!!p&&("values"==p.name||p.name==undefined),v=function(){return u.call(f(this))};d("entries",(function(){return l.call(f(this))})),d("keys",(function(){return s.call(f(this))})),d("values",v,!h),d(a,v,!h)},function(e,t,n){"use strict";var r=n(7),o=r.aTypedArray,i=r.exportTypedArrayMethod,a=[].join;i("join",(function(e){return a.apply(o(this),arguments)}))},function(e,t,n){"use strict";var r=n(7),o=n(139),i=r.aTypedArray;(0,r.exportTypedArrayMethod)("lastIndexOf",(function(e){return o.apply(i(this),arguments)}))},function(e,t,n){"use strict";var r=n(7),o=n(15).map,i=n(40),a=r.aTypedArray,c=r.aTypedArrayConstructor;(0,r.exportTypedArrayMethod)("map",(function(e){return o(a(this),e,arguments.length>1?arguments[1]:undefined,(function(e,t){return new(c(i(e,e.constructor)))(t)}))}))},function(e,t,n){"use strict";var r=n(7),o=n(111),i=r.aTypedArrayConstructor;(0,r.exportTypedArrayStaticMethod)("of",(function(){for(var e=0,t=arguments.length,n=new(i(this))(t);t>e;)n[e]=arguments[e++];return n}),o)},function(e,t,n){"use strict";var r=n(7),o=n(73).left,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduce",(function(e){return o(i(this),e,arguments.length,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var r=n(7),o=n(73).right,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduceRight",(function(e){return o(i(this),e,arguments.length,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var r=n(7),o=r.aTypedArray,i=r.exportTypedArrayMethod,a=Math.floor;i("reverse",(function(){for(var e,t=o(this).length,n=a(t/2),r=0;r1?arguments[1]:undefined,1),n=this.length,r=a(e),c=o(r.length),s=0;if(c+t>n)throw RangeError("Wrong length");for(;si;)l[i]=n[i++];return l}),i((function(){new Int8Array(1).slice()})))},function(e,t,n){"use strict";var r=n(7),o=n(15).some,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("some",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var r=n(7),o=r.aTypedArray,i=r.exportTypedArrayMethod,a=[].sort;i("sort",(function(e){return a.call(o(this),e)}))},function(e,t,n){"use strict";var r=n(7),o=n(8),i=n(36),a=n(40),c=r.aTypedArray;(0,r.exportTypedArrayMethod)("subarray",(function(e,t){var n=c(this),r=n.length,u=i(e,r);return new(a(n,n.constructor))(n.buffer,n.byteOffset+u*n.BYTES_PER_ELEMENT,o((t===undefined?r:i(t,r))-u))}))},function(e,t,n){"use strict";var r=n(2),o=n(7),i=n(1),a=r.Int8Array,c=o.aTypedArray,u=o.exportTypedArrayMethod,s=[].toLocaleString,l=[].slice,f=!!a&&i((function(){s.call(new a(1))}));u("toLocaleString",(function(){return s.apply(f?l.call(c(this)):c(this),arguments)}),i((function(){return[1,2].toLocaleString()!=new a([1,2]).toLocaleString()}))||!i((function(){a.prototype.toLocaleString.call([1,2])})))},function(e,t,n){"use strict";var r=n(7).exportTypedArrayMethod,o=n(1),i=n(2).Uint8Array,a=i&&i.prototype||{},c=[].toString,u=[].join;o((function(){c.call({})}))&&(c=function(){return u.call(this)});var s=a.toString!=c;r("toString",c,s)},function(e,t,n){"use strict";var r,o=n(2),i=n(64),a=n(47),c=n(75),u=n(157),s=n(4),l=n(30).enforce,f=n(124),d=!o.ActiveXObject&&"ActiveXObject"in o,p=Object.isExtensible,h=function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},v=e.exports=c("WeakMap",h,u);if(f&&d){r=u.getConstructor(h,"WeakMap",!0),a.REQUIRED=!0;var g=v.prototype,m=g["delete"],y=g.has,b=g.get,x=g.set;i(g,{"delete":function(e){if(s(e)&&!p(e)){var t=l(this);return t.frozen||(t.frozen=new r),m.call(this,e)||t.frozen["delete"](e)}return m.call(this,e)},has:function(e){if(s(e)&&!p(e)){var t=l(this);return t.frozen||(t.frozen=new r),y.call(this,e)||t.frozen.has(e)}return y.call(this,e)},get:function(e){if(s(e)&&!p(e)){var t=l(this);return t.frozen||(t.frozen=new r),y.call(this,e)?b.call(this,e):t.frozen.get(e)}return b.call(this,e)},set:function(e,t){if(s(e)&&!p(e)){var n=l(this);n.frozen||(n.frozen=new r),y.call(this,e)?x.call(this,e,t):n.frozen.set(e,t)}else x.call(this,e,t);return this}})}},function(e,t,n){"use strict";n(75)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),n(157))},function(e,t,n){"use strict";var r=n(0),o=n(2),i=n(103);r({global:!0,bind:!0,enumerable:!0,forced:!o.setImmediate||!o.clearImmediate},{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){"use strict";var r=n(0),o=n(2),i=n(150),a=n(28),c=o.process,u="process"==a(c);r({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(e){var t=u&&c.domain;i(t?t.bind(e):e)}})},function(e,t,n){"use strict";var r=n(0),o=n(2),i=n(70),a=[].slice,c=function(e){return function(t,n){var r=arguments.length>2,o=r?a.call(arguments,2):undefined;return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,o)}:t,n)}};r({global:!0,bind:!0,forced:/MSIE .\./.test(i)},{setTimeout:c(o.setTimeout),setInterval:c(o.setInterval)})},function(e,t,n){"use strict";t.__esModule=!0,t._CI=ke,t._HI=j,t._M=Te,t._MCCC=Me,t._ME=Ae,t._MFCC=Le,t._MP=Se,t._MR=ye,t.__render=Re,t.createComponentVNode=function(e,t,n,r,o){var a=new T(1,null,null,e=function(e,t){if(12&e)return e;if(t.prototype&&t.prototype.render)return 4;if(t.render)return 32776;return 8}(e,t),r,function(e,t,n){var r=(32768&e?t.render:t).defaultProps;if(i(r))return n;if(i(n))return l(r,null);return V(n,r)}(e,t,n),function(e,t,n){if(4&e)return n;var r=(32768&e?t.render:t).defaultHooks;if(i(r))return n;if(i(n))return r;return V(n,r)}(e,t,o),t);_.createVNode&&_.createVNode(a);return a},t.createFragment=I,t.createPortal=function(e,t){var n=j(e);return O(1024,1024,null,n,0,null,n.key,t)},t.createRef=function(){return{current:null}},t.createRenderer=function(e){return function(t,n,r,o){e||(e=t),De(n,e,r,o)}},t.createTextVNode=A,t.createVNode=O,t.directClone=M,t.findDOMfromVNode=b,t.forwardRef=function(e){return{render:e}},t.getFlagsForElementVnode=function(e){switch(e){case"svg":return 32;case"input":return 64;case"select":return 256;case"textarea":return 128;case"$F":return 8192;default:return 1}},t.linkEvent=function(e,t){if(c(t))return{data:e,event:t};return null},t.normalizeProps=function(e){var t=e.props;if(t){var n=e.flags;481&n&&(void 0!==t.children&&i(e.children)&&P(e,t.children),void 0!==t.className&&(e.className=t.className||null,t.className=undefined)),void 0!==t.key&&(e.key=t.key,t.key=undefined),void 0!==t.ref&&(e.ref=8&n?l(e.ref,t.ref):t.ref,t.ref=undefined)}return e},t.render=De,t.rerender=We,t.version=t.options=t.Fragment=t.EMPTY_OBJ=t.Component=void 0;var r=Array.isArray;function o(e){var t=typeof e;return"string"===t||"number"===t}function i(e){return null==e}function a(e){return null===e||!1===e||!0===e||void 0===e}function c(e){return"function"==typeof e}function u(e){return"string"==typeof e}function s(e){return null===e}function l(e,t){var n={};if(e)for(var r in e)n[r]=e[r];if(t)for(var o in t)n[o]=t[o];return n}function f(e){return!s(e)&&"object"==typeof e}var d={};t.EMPTY_OBJ=d;function p(e){return e.substr(2).toLowerCase()}function h(e,t){e.appendChild(t)}function v(e,t,n){s(n)?h(e,t):e.insertBefore(t,n)}function g(e,t){e.removeChild(t)}function m(e){for(var t=0;t0,h=s(d),v=u(d)&&"$"===d[0];p||h||v?(n=n||t.slice(0,l),(p||v)&&(f=M(f)),(h||v)&&(f.key="$"+l),n.push(f)):n&&n.push(f),f.flags|=65536}}i=0===(n=n||t).length?1:8}else(n=t).flags|=65536,81920&t.flags&&(n=M(t)),i=2;return e.children=n,e.childFlags=i,e}function j(e){return a(e)||o(e)?A(e,null):r(e)?I(e,0,null):16384&e.flags?M(e):e}var F="http://www.w3.org/1999/xlink",R="http://www.w3.org/XML/1998/namespace",D={"xlink:actuate":F,"xlink:arcrole":F,"xlink:href":F,"xlink:role":F,"xlink:show":F,"xlink:title":F,"xlink:type":F,"xml:base":R,"xml:lang":R,"xml:space":R};function K(e){return{onClick:e,onDblClick:e,onFocusIn:e,onFocusOut:e,onKeyDown:e,onKeyPress:e,onKeyUp:e,onMouseDown:e,onMouseMove:e,onMouseUp:e,onTouchEnd:e,onTouchMove:e,onTouchStart:e}}var z=K(0),U=K(null),Y=K(!0);function H(e,t){var n=t.$EV;return n||(n=t.$EV=K(null)),n[e]||1==++z[e]&&(U[e]=function(e){var t="onClick"===e||"onDblClick"===e?function(e){return function(t){0===t.button?$(t,!0,e,Q(t)):t.stopPropagation()}}(e):function(e){return function(t){$(t,!1,e,Q(t))}}(e);return document.addEventListener(p(e),t),t}(e)),n}function W(e,t){var n=t.$EV;n&&n[e]&&(0==--z[e]&&(document.removeEventListener(p(e),U[e]),U[e]=null),n[e]=null)}function $(e,t,n,r){var o=function(e){return c(e.composedPath)?e.composedPath()[0]:e.target}(e);do{if(t&&o.disabled)return;var i=o.$EV;if(i){var a=i[n];if(a&&(r.dom=o,a.event?a.event(a.data,e):a(e),e.cancelBubble))return}o=o.parentNode}while(!s(o))}function G(){this.cancelBubble=!0,this.immediatePropagationStopped||this.stopImmediatePropagation()}function q(){return this.defaultPrevented}function X(){return this.cancelBubble}function Q(e){var t={dom:document};return e.isDefaultPrevented=q,e.isPropagationStopped=X,e.stopPropagation=G,Object.defineProperty(e,"currentTarget",{configurable:!0,get:function(){return t.dom}}),t}function J(e,t,n){if(e[t]){var r=e[t];r.event?r.event(r.data,n):r(n)}else{var o=t.toLowerCase();e[o]&&e[o](n)}}function Z(e,t){var n=function(n){var r=this.$V;if(r){var o=r.props||d,i=r.dom;if(u(e))J(o,e,n);else for(var a=0;a-1&&t.options[a]&&(c=t.options[a].value),n&&i(c)&&(c=e.defaultValue),ae(r,c)}}var se,le,fe=Z("onInput",pe),de=Z("onChange");function pe(e,t,n){var r=e.value,o=t.value;if(i(r)){if(n){var a=e.defaultValue;i(a)||a===o||(t.defaultValue=a,t.value=a)}}else o!==r&&(t.defaultValue=r,t.value=r)}function he(e,t,n,r,o,i){64&e?ie(r,n):256&e?ue(r,n,o,t):128&e&&pe(r,n,o),i&&(n.$V=t)}function ve(e,t,n){64&e?function(e,t){te(t.type)?(ee(e,"change",re),ee(e,"click",oe)):ee(e,"input",ne)}(t,n):256&e?function(e){ee(e,"change",ce)}(t):128&e&&function(e,t){ee(e,"input",fe),t.onChange&&ee(e,"change",de)}(t,n)}function ge(e){return e.type&&te(e.type)?!i(e.checked):!i(e.value)}function me(e){e&&!k(e,null)&&e.current&&(e.current=null)}function ye(e,t,n){e&&(c(e)||void 0!==e.current)&&n.push((function(){k(e,t)||void 0===e.current||(e.current=t)}))}function be(e,t){xe(e),x(e,t)}function xe(e){var t,n=e.flags,r=e.children;if(481&n){t=e.ref;var o=e.props;me(t);var a=e.childFlags;if(!s(o))for(var u=Object.keys(o),l=0,f=u.length;l0;for(var c in a&&(i=ge(n))&&ve(t,r,n),n)Ee(c,null,n[c],r,o,i,null);a&&he(t,e,r,n,!0,i)}function Ve(e,t,n){var r=j(e.render(t,e.state,n)),o=n;return c(e.getChildContext)&&(o=l(n,e.getChildContext())),e.$CX=o,r}function ke(e,t,n,r,o,i){var a=new t(n,r),u=a.$N=Boolean(t.getDerivedStateFromProps||a.getSnapshotBeforeUpdate);if(a.$SVG=o,a.$L=i,e.children=a,a.$BS=!1,a.context=r,a.props===d&&(a.props=n),u)a.state=w(a,n,a.state);else if(c(a.componentWillMount)){a.$BR=!0,a.componentWillMount();var l=a.$PS;if(!s(l)){var f=a.state;if(s(f))a.state=l;else for(var p in l)f[p]=l[p];a.$PS=null}a.$BR=!1}return a.$LI=Ve(a,n,r),a}function Te(e,t,n,r,o,i){var a=e.flags|=16384;481&a?Ae(e,t,n,r,o,i):4&a?function(e,t,n,r,o,i){var a=ke(e,e.type,e.props||d,n,r,i);Te(a.$LI,t,a.$CX,r,o,i),Me(e.ref,a,i)}(e,t,n,r,o,i):8&a?(!function(e,t,n,r,o,i){Te(e.children=j(function(e,t){return 32768&e.flags?e.type.render(e.props||d,e.ref,t):e.type(e.props||d,t)}(e,n)),t,n,r,o,i)}(e,t,n,r,o,i),Le(e,i)):512&a||16&a?Oe(e,t,o):8192&a?function(e,t,n,r,o,i){var a=e.children,c=e.childFlags;12&c&&0===a.length&&(c=e.childFlags=2,a=e.children=L());2===c?Te(a,n,o,r,o,i):Ie(a,n,t,r,o,i)}(e,n,t,r,o,i):1024&a&&function(e,t,n,r,o){Te(e.children,e.ref,t,!1,null,o);var i=L();Oe(i,n,r),e.dom=i.dom}(e,n,t,o,i)}function Oe(e,t,n){var r=e.dom=document.createTextNode(e.children);s(t)||v(t,r,n)}function Ae(e,t,n,r,o,a){var c=e.flags,u=e.props,l=e.className,f=e.children,d=e.childFlags,p=e.dom=function(e,t){return t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}(e.type,r=r||(32&c)>0);if(i(l)||""===l||(r?p.setAttribute("class",l):p.className=l),16===d)E(p,f);else if(1!==d){var h=r&&"foreignObject"!==e.type;2===d?(16384&f.flags&&(e.children=f=M(f)),Te(f,p,n,h,null,a)):8!==d&&4!==d||Ie(f,p,n,h,null,a)}s(t)||v(t,p,o),s(u)||Se(e,c,u,p,r),ye(e.ref,p,a)}function Ie(e,t,n,r,o,i){for(var a=0;a0,s!==l){var h=s||d;if((c=l||d)!==d)for(var v in(f=(448&o)>0)&&(p=ge(c)),c){var g=h[v],m=c[v];g!==m&&Ee(v,g,m,u,r,p,e)}if(h!==d)for(var y in h)i(c[y])&&!i(h[y])&&Ee(y,h[y],null,u,r,p,e)}var b=t.children,x=t.className;e.className!==x&&(i(x)?u.removeAttribute("class"):r?u.setAttribute("class",x):u.className=x);4096&o?function(e,t){e.textContent!==t&&(e.textContent=t)}(u,b):Pe(e.childFlags,t.childFlags,e.children,b,u,n,r&&"foreignObject"!==t.type,null,e,a);f&&he(o,t,u,c,!1,p);var N=t.ref,w=e.ref;w!==N&&(me(w),ye(N,u,a))}(e,t,r,o,p,f):4&p?function(e,t,n,r,o,i,a){var u=t.children=e.children;if(s(u))return;u.$L=a;var f=t.props||d,p=t.ref,h=e.ref,v=u.state;if(!u.$N){if(c(u.componentWillReceiveProps)){if(u.$BR=!0,u.componentWillReceiveProps(f,r),u.$UN)return;u.$BR=!1}s(u.$PS)||(v=l(v,u.$PS),u.$PS=null)}je(u,v,f,n,r,o,!1,i,a),h!==p&&(me(h),ye(p,u,a))}(e,t,n,r,o,u,f):8&p?function(e,t,n,r,o,a,u){var s=!0,l=t.props||d,f=t.ref,p=e.props,h=!i(f),v=e.children;h&&c(f.onComponentShouldUpdate)&&(s=f.onComponentShouldUpdate(p,l));if(!1!==s){h&&c(f.onComponentWillUpdate)&&f.onComponentWillUpdate(p,l);var g=t.type,m=j(32768&t.flags?g.render(l,f,r):g(l,r));Be(v,m,n,r,o,a,u),t.children=m,h&&c(f.onComponentDidUpdate)&&f.onComponentDidUpdate(p,l)}else t.children=v}(e,t,n,r,o,u,f):16&p?function(e,t){var n=t.children,r=t.dom=e.dom;n!==e.children&&(r.nodeValue=n)}(e,t):512&p?t.dom=e.dom:8192&p?function(e,t,n,r,o,i){var a=e.children,c=t.children,u=e.childFlags,s=t.childFlags,l=null;12&s&&0===c.length&&(s=t.childFlags=2,c=t.children=L());var f=0!=(2&s);if(12&u){var d=a.length;(8&u&&8&s||f||!f&&c.length>d)&&(l=b(a[d-1],!1).nextSibling)}Pe(u,s,a,c,n,r,o,l,e,i)}(e,t,n,r,o,f):function(e,t,n,r){var o=e.ref,i=t.ref,c=t.children;if(Pe(e.childFlags,t.childFlags,e.children,c,o,n,!1,null,e,r),t.dom=e.dom,o!==i&&!a(c)){var u=c.dom;g(o,u),h(i,u)}}(e,t,r,f)}function Pe(e,t,n,r,o,i,a,c,u,s){switch(e){case 2:switch(t){case 2:Be(n,r,o,i,a,c,s);break;case 1:be(n,o);break;case 16:xe(n),E(o,r);break;default:!function(e,t,n,r,o,i){xe(e),Ie(t,n,r,o,b(e,!0),i),x(e,n)}(n,r,o,i,a,s)}break;case 1:switch(t){case 2:Te(r,o,i,a,c,s);break;case 1:break;case 16:E(o,r);break;default:Ie(r,o,i,a,c,s)}break;case 16:switch(t){case 16:!function(e,t,n){e!==t&&(""!==e?n.firstChild.nodeValue=t:E(n,t))}(n,r,o);break;case 2:we(o),Te(r,o,i,a,c,s);break;case 1:we(o);break;default:we(o),Ie(r,o,i,a,c,s)}break;default:switch(t){case 16:Ne(n),E(o,r);break;case 2:Ce(o,u,n),Te(r,o,i,a,c,s);break;case 1:Ce(o,u,n);break;default:var l=0|n.length,f=0|r.length;0===l?f>0&&Ie(r,o,i,a,c,s):0===f?Ce(o,u,n):8===t&&8===e?function(e,t,n,r,o,i,a,c,u,s){var l,f,d=i-1,p=a-1,h=0,v=e[h],g=t[h];e:{for(;v.key===g.key;){if(16384&g.flags&&(t[h]=g=M(g)),Be(v,g,n,r,o,c,s),e[h]=g,++h>d||h>p)break e;v=e[h],g=t[h]}for(v=e[d],g=t[p];v.key===g.key;){if(16384&g.flags&&(t[p]=g=M(g)),Be(v,g,n,r,o,c,s),e[d]=g,d--,p--,h>d||h>p)break e;v=e[d],g=t[p]}}if(h>d){if(h<=p)for(f=(l=p+1)p)for(;h<=d;)be(e[h++],n);else!function(e,t,n,r,o,i,a,c,u,s,l,f,d){var p,h,v,g=0,m=c,y=c,x=i-c+1,w=a-c+1,C=new Int32Array(w+1),_=x===r,E=!1,S=0,V=0;if(o<4||(x|w)<32)for(g=m;g<=i;++g)if(p=e[g],Vc?E=!0:S=c,16384&h.flags&&(t[c]=h=M(h)),Be(p,h,u,n,s,l,d),++V;break}!_&&c>a&&be(p,u)}else _||be(p,u);else{var k={};for(g=y;g<=a;++g)k[t[g].key]=g;for(g=m;g<=i;++g)if(p=e[g],Vm;)be(e[m++],u);C[c-y]=g+1,S>c?E=!0:S=c,16384&(h=t[c]).flags&&(t[c]=h=M(h)),Be(p,h,u,n,s,l,d),++V}else _||be(p,u);else _||be(p,u)}if(_)Ce(u,f,e),Ie(t,u,n,s,l,d);else if(E){var T=function(e){var t=0,n=0,r=0,o=0,i=0,a=0,c=0,u=e.length;u>Fe&&(Fe=u,se=new Int32Array(u),le=new Int32Array(u));for(;n>1]]0&&(le[n]=se[i-1]),se[i]=n)}i=o+1;var s=new Int32Array(i);a=se[i-1];for(;i-- >0;)s[i]=a,a=le[a],se[i]=0;return s}(C);for(c=T.length-1,g=w-1;g>=0;g--)0===C[g]?(16384&(h=t[S=g+y]).flags&&(t[S]=h=M(h)),Te(h,u,n,s,(v=S+1)=0;g--)0===C[g]&&(16384&(h=t[S=g+y]).flags&&(t[S]=h=M(h)),Te(h,u,n,s,(v=S+1)a?a:i,d=0;da)for(d=f;d=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),s}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},e}(e.exports);try{regeneratorRuntime=r}catch(o){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){"use strict";!function(t,n){var r,o,i=t.html5||{},a=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,c=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,u=0,s={};function l(){var e=h.elements;return"string"==typeof e?e.split(" "):e}function f(e){var t=s[e._html5shiv];return t||(t={},u++,e._html5shiv=u,s[u]=t),t}function d(e,t,r){return t||(t=n),o?t.createElement(e):(r||(r=f(t)),!(i=r.cache[e]?r.cache[e].cloneNode():c.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e)).canHaveChildren||a.test(e)||i.tagUrn?i:r.frag.appendChild(i));var i}function p(e){e||(e=n);var t=f(e);return!h.shivCSS||r||t.hasCSS||(t.hasCSS=!!function(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x",r.insertBefore(n.lastChild,r.firstChild)}(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),o||function(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return h.shivMethods?d(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/[\w\-:]+/g,(function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'}))+");return n}")(h,t.frag)}(e,t),e}!function(){try{var e=n.createElement("a");e.innerHTML="",r="hidden"in e,o=1==e.childNodes.length||function(){n.createElement("a");var e=n.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(t){r=!0,o=!0}}();var h={elements:i.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:"3.7.3",shivCSS:!1!==i.shivCSS,supportsUnknownElements:o,shivMethods:!1!==i.shivMethods,type:"default",shivDocument:p,createElement:d,createDocumentFragment:function(e,t){if(e||(e=n),o)return e.createDocumentFragment();for(var r=(t=t||f(e)).frag.cloneNode(),i=0,a=l(),c=a.length;i3?c(a):null,b=String(a.key),x=String(a.char),N=a.location,w=a.keyCode||(a.keyCode=b)&&b.charCodeAt(0)||0,C=a.charCode||(a.charCode=x)&&x.charCodeAt(0)||0,_=a.bubbles,E=a.cancelable,S=a.repeat,V=a.locale,k=a.view||e;if(a.which||(a.which=a.keyCode),"initKeyEvent"in d)d.initKeyEvent(t,_,E,k,p,v,h,g,w,C);else if(0>>0),t=Element.prototype,n=t.querySelector,r=t.querySelectorAll;function o(t,n,r){t.setAttribute(e,null);var o=n.call(t,String(r).replace(/(^|,\s*)(:scope([ >]|$))/g,(function(t,n,r,o){return n+"["+e+"]"+(o||" ")})));return t.removeAttribute(e),o}t.querySelector=function(e){return o(this,n,e)},t.querySelectorAll=function(e){return o(this,r,e)}}()}}(window),function(e){var t=e.WeakMap||function(){var e,t=0,n=!1,r=!1;function o(t,o,i){r=i,n=!1,e=undefined,t.dispatchEvent(o)}function i(e){this.value=e}function c(){t++,this.__ce__=new a("@DOMMap:"+t+Math.random())}return i.prototype.handleEvent=function(t){n=!0,r?t.currentTarget.removeEventListener(t.type,this,!1):e=this.value},c.prototype={constructor:c,"delete":function(e){return o(e,this.__ce__,!0),n},get:function(t){o(t,this.__ce__,!1);var n=e;return e=undefined,n},has:function(e){return o(e,this.__ce__,!1),n},set:function(e,t){return o(e,this.__ce__,!0),e.addEventListener(this.__ce__.type,new i(t),!1),this}},c}();function n(){}function r(e,t,n){function o(e){o.once&&(e.currentTarget.removeEventListener(e.type,t,o),o.removed=!0),o.passive&&(e.preventDefault=r.preventDefault),"function"==typeof o.callback?o.callback.call(this,e):o.callback&&o.callback.handleEvent(e),o.passive&&delete e.preventDefault}return o.type=e,o.callback=t,o.capture=!!n.capture,o.passive=!!n.passive,o.once=!!n.once,o.removed=!1,o}n.prototype=(Object.create||Object)(null),r.preventDefault=function(){};var o,i,a=e.CustomEvent,c=e.dispatchEvent,u=e.addEventListener,s=e.removeEventListener,l=0,f=function(){l++},d=[].indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},p=function(e){return"".concat(e.capture?"1":"0",e.passive?"1":"0",e.once?"1":"0")};try{u("_",f,{once:!0}),c(new a("_")),c(new a("_")),s("_",f,{once:!0})}catch(h){}1!==l&&(i=new t,o=function(e){if(e){var t=e.prototype;t.addEventListener=function(e){return function(t,o,a){if(a&&"boolean"!=typeof a){var c,u,s,l=i.get(this),f=p(a);l||i.set(this,l=new n),t in l||(l[t]={handler:[],wrap:[]}),u=l[t],(c=d.call(u.handler,o))<0?(c=u.handler.push(o)-1,u.wrap[c]=s=new n):s=u.wrap[c],f in s||(s[f]=r(t,o,a),e.call(this,t,s[f],s[f].capture))}else e.call(this,t,o,a)}}(t.addEventListener),t.removeEventListener=function(e){return function(t,n,r){if(r&&"boolean"!=typeof r){var o,a,c,u,s=i.get(this);if(s&&t in s&&(c=s[t],-1<(a=d.call(c.handler,n))&&(o=p(r))in(u=c.wrap[a]))){for(o in e.call(this,t,u[o],u[o].capture),delete u[o],u)return;c.handler.splice(a,1),c.wrap.splice(a,1),0===c.handler.length&&delete s[t]}}else e.call(this,t,n,r)}}(t.removeEventListener)}},e.EventTarget?o(EventTarget):(o(e.Text),o(e.Element||e.HTMLElement),o(e.HTMLDocument),o(e.Window||{prototype:e}),o(e.XMLHttpRequest)))}(window)},function(e,t,n){"use strict";!function(e){if("undefined"!=typeof e.setAttribute){var t=function(e){return e.replace(/-[a-z]/g,(function(e){return e[1].toUpperCase()}))};e.setProperty=function(e,n){var r=t(e);if(!n)return this.removeAttribute(r);var o=String(n);return this.setAttribute(r,o)},e.getPropertyValue=function(e){var n=t(e);return this.getAttribute(n)||null},e.removeProperty=function(e){var n=t(e),r=this.getAttribute(n);return this.removeAttribute(n),r}}}(CSSStyleDeclaration.prototype)},function(e,t,n){"use strict";window.Int32Array||(window.Int32Array=Array)},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";(function(e){ /*! loadCSS. [c]2017 Filament Group, Inc. MIT License */ -var n;n=void 0!==e?e:void 0,t.loadCSS=function(e,t,r,o){var i,a=n.document,c=a.createElement("link");if(t)i=t;else{var u=(a.body||a.getElementsByTagName("head")[0]).childNodes;i=u[u.length-1]}var s=a.styleSheets;if(o)for(var l in o)o.hasOwnProperty(l)&&c.setAttribute(l,o[l]);c.rel="stylesheet",c.href=e,c.media="only x",function p(e){if(a.body)return e();setTimeout((function(){p(e)}))}((function(){i.parentNode.insertBefore(c,t?i:i.nextSibling)}));var f=function h(e){for(var t=c.href,n=s.length;n--;)if(s[n].href===t)return e();setTimeout((function(){h(e)}))};function d(){c.addEventListener&&c.removeEventListener("load",d),c.media=r||"all"}return c.addEventListener&&c.addEventListener("load",d),c.onloadcssdefined=f,f(d),c}}).call(this,n(121))},function(e,t,n){"use strict";t.__esModule=!0,t.vecNormalize=t.vecLength=t.vecInverse=t.vecScale=t.vecDivide=t.vecMultiply=t.vecSubtract=t.vecAdd=t.vecCreate=void 0;var r=n(113);t.vecCreate=function(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),a=1;a1?t-1:0),r=1;r=0||(o[n]=e[n]);return o}(e,["className"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["BlockQuote",t])},n)))}},function(e,t,n){"use strict";var r,o;t.__esModule=!0,t.VNodeFlags=t.ChildFlags=void 0,t.VNodeFlags=r,function(e){e[e.HtmlElement=1]="HtmlElement",e[e.ComponentUnknown=2]="ComponentUnknown",e[e.ComponentClass=4]="ComponentClass",e[e.ComponentFunction=8]="ComponentFunction",e[e.Text=16]="Text",e[e.SvgElement=32]="SvgElement",e[e.InputElement=64]="InputElement",e[e.TextareaElement=128]="TextareaElement",e[e.SelectElement=256]="SelectElement",e[e.Void=512]="Void",e[e.Portal=1024]="Portal",e[e.ReCreate=2048]="ReCreate",e[e.ContentEditable=4096]="ContentEditable",e[e.Fragment=8192]="Fragment",e[e.InUse=16384]="InUse",e[e.ForwardRef=32768]="ForwardRef",e[e.Normalized=65536]="Normalized",e[e.ForwardRefComponent=32776]="ForwardRefComponent",e[e.FormElement=448]="FormElement",e[e.Element=481]="Element",e[e.Component=14]="Component",e[e.DOMRef=2033]="DOMRef",e[e.InUseOrNormalized=81920]="InUseOrNormalized",e[e.ClearInUse=-16385]="ClearInUse",e[e.ComponentKnown=12]="ComponentKnown"}(r||(t.VNodeFlags=r={})),t.ChildFlags=o,function(e){e[e.UnknownChildren=0]="UnknownChildren",e[e.HasInvalidChildren=1]="HasInvalidChildren",e[e.HasVNodeChildren=2]="HasVNodeChildren",e[e.HasNonKeyedChildren=4]="HasNonKeyedChildren",e[e.HasKeyedChildren=8]="HasKeyedChildren",e[e.HasTextChildren=16]="HasTextChildren",e[e.MultipleChildren=12]="MultipleChildren"}(o||(t.ChildFlags=o={}))},function(e,t,n){"use strict";t.__esModule=!0,t.ByondUi=void 0;var r=n(3),o=n(9),i=n(405),a=n(20),c=n(53),u=n(13);function s(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var l=(0,c.createLogger)("ByondUi"),f=[];window.addEventListener("beforeunload",(function(){for(var e=0;e=0||(o[n]=e[n]);return o}(t,["data","rangeX","rangeY","fillColor","strokeColor","strokeWidth"]),g=this.state.viewBox,m=function(e,t,n,r){if(0===e.length)return[];var i=(0,o.zipWith)(Math.min).apply(void 0,e),a=(0,o.zipWith)(Math.max).apply(void 0,e);return n!==undefined&&(i[0]=n[0],a[0]=n[1]),r!==undefined&&(i[1]=r[0],a[1]=r[1]),(0,o.map)((function(e){return(0,o.zipWith)((function(e,t,n,r){return(e-t)/(n-t)*r}))(e,i,a,t)}))(e)}(i,g,a,u);if(m.length>0){var y=m[0],b=m[m.length-1];m.push([g[0]+h,b[1]]),m.push([g[0]+h,-h]),m.push([-h,-h]),m.push([-h,y[1]])}var x=function(e){for(var t="",n=0;n=0||(o[n]=e[n]);return o}(t,["children","color","title","buttons"]);return(0,r.createComponentVNode)(2,o.Box,{mb:1,children:[(0,r.createVNode)(1,"div","Table",[(0,r.createVNode)(1,"div","Table__cell",(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Button,Object.assign({fluid:!0,color:u,icon:n?"chevron-down":"chevron-right",onClick:function(){return e.setState({open:!n})}},f,{children:s}))),2),l&&(0,r.createVNode)(1,"div","Table__cell Table__cell--collapsing",l,0)],0),n&&(0,r.createComponentVNode)(2,o.Box,{mt:1,children:a})]})},a}(r.Component);t.Collapsible=a},function(e,t,n){"use strict";t.__esModule=!0,t.ColorBox=void 0;var r=n(3),o=n(9),i=n(13);var a=function(e){var t=e.content,n=(e.children,e.className),a=e.color,c=e.backgroundColor,u=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["content","children","className","color","backgroundColor"]);return u.color=t?null:"transparent",u.backgroundColor=a||c,(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,o.classes)(["ColorBox",n,(0,i.computeBoxClassName)(u)]),t||".",0,Object.assign({},(0,i.computeBoxProps)(u))))};t.ColorBox=a,a.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Dropdown=void 0;var r=n(3),o=n(9),i=n(13),a=n(118);function c(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var u=function(e){var t,n;function u(t){var n;return(n=e.call(this,t)||this).state={selected:t.selected,open:!1},n.handleClick=function(){n.state.open&&n.setOpen(!1)},n}n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=u.prototype;return s.componentWillUnmount=function(){window.removeEventListener("click",this.handleClick)},s.setOpen=function(e){var t=this;this.setState({open:e}),e?(setTimeout((function(){return window.addEventListener("click",t.handleClick)})),this.menuRef.focus()):window.removeEventListener("click",this.handleClick)},s.setSelected=function(e){this.setState({selected:e}),this.setOpen(!1),this.props.onSelected(e)},s.buildMenu=function(){var e=this,t=this.props.options,n=(void 0===t?[]:t).map((function(t){return(0,r.createVNode)(1,"div","Dropdown__menuentry",t,0,{onClick:function(){e.setSelected(t)}},t)}));return n.length?n:"No Options Found"},s.render=function(){var e=this,t=this.props,n=t.color,u=void 0===n?"default":n,s=t.over,l=t.noscroll,f=t.nochevron,d=t.width,p=(t.onClick,t.selected,t.disabled),h=c(t,["color","over","noscroll","nochevron","width","onClick","selected","disabled"]),v=h.className,g=c(h,["className"]),m=s?!this.state.open:this.state.open,y=this.state.open?(0,r.createVNode)(1,"div",(0,o.classes)([l?"Dropdown__menu-noscroll":"Dropdown__menu",s&&"Dropdown__over"]),this.buildMenu(),0,{tabIndex:"-1",style:{width:d}},null,(function(t){e.menuRef=t})):null;return(0,r.createVNode)(1,"div","Dropdown",[(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({width:d,className:(0,o.classes)(["Dropdown__control","Button","Button--color--"+u,p&&"Button--disabled",v])},g,{onClick:function(){p&&!e.state.open||e.setOpen(!e.state.open)},children:[(0,r.createVNode)(1,"span","Dropdown__selected-text",this.state.selected,0),!!f||(0,r.createVNode)(1,"span","Dropdown__arrow-button",(0,r.createComponentVNode)(2,a.Icon,{name:m?"chevron-up":"chevron-down"}),2)]}))),y],0)},u}(r.Component);t.Dropdown=u},function(e,t,n){"use strict";t.__esModule=!0,t.GridColumn=t.Grid=void 0;var r=n(3),o=n(119),i=n(9);function a(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var c=function(e){var t=e.children,n=a(e,["children"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,o.Table,Object.assign({},n,{children:(0,r.createComponentVNode)(2,o.Table.Row,{children:t})})))};t.Grid=c,c.defaultHooks=i.pureComponentHooks;var u=function(e){var t=e.size,n=void 0===t?1:t,i=e.style,c=a(e,["size","style"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,o.Table.Cell,Object.assign({style:Object.assign({width:n+"%"},i)},c)))};t.GridColumn=u,c.defaultHooks=i.pureComponentHooks,c.Column=u},function(e,t,n){"use strict";t.__esModule=!0,t.Input=void 0;var r=n(3),o=n(9),i=n(13);function a(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var c=function(e){return(0,o.isFalsy)(e)?"":e},u=function(e){var t,n;function u(){var t;return(t=e.call(this)||this).inputRef=(0,r.createRef)(),t.state={editing:!1},t.handleInput=function(e){var n=t.state.editing,r=t.props.onInput;n||t.setEditing(!0),r&&r(e,e.target.value)},t.handleFocus=function(e){t.state.editing||t.setEditing(!0)},t.handleBlur=function(e){var n=t.state.editing,r=t.props.onChange;n&&(t.setEditing(!1),r&&r(e,e.target.value))},t.handleKeyDown=function(e){var n=t.props,r=n.onInput,o=n.onChange,i=n.onEnter;return 13===e.keyCode?(t.setEditing(!1),o&&o(e,e.target.value),r&&r(e,e.target.value),i&&i(e,e.target.value),void(t.props.selfClear?e.target.value="":e.target.blur())):27===e.keyCode?(t.setEditing(!1),e.target.value=c(t.props.value),void e.target.blur()):void 0},t}n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=u.prototype;return s.componentDidMount=function(){var e=this.props.value,t=this.inputRef.current;t&&(t.value=c(e))},s.componentDidUpdate=function(e,t){var n=this.state.editing,r=e.value,o=this.props.value,i=this.inputRef.current;i&&!n&&r!==o&&(i.value=c(o))},s.setEditing=function(e){this.setState({editing:e})},s.render=function(){var e=this.props,t=(e.selfClear,e.onInput,e.onChange,e.onEnter,e.value,e.maxLength),n=e.placeholder,c=a(e,["selfClear","onInput","onChange","onEnter","value","maxLength","placeholder"]),u=c.className,s=c.fluid,l=a(c,["className","fluid"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["Input",s&&"Input--fluid",u])},l,{children:[(0,r.createVNode)(1,"div","Input__baseline",".",16),(0,r.createVNode)(64,"input","Input__input",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,maxLength:t},null,this.inputRef)]})))},u}(r.Component);t.Input=u},function(e,t,n){"use strict";t.__esModule=!0,t.Knob=void 0;var r=n(3),o=n(48),i=n(9),a=n(20),c=n(13),u=n(165),s=n(120);t.Knob=function(e){if(a.IS_IE8)return(0,r.normalizeProps)((0,r.createComponentVNode)(2,s.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,l=e.maxValue,f=e.minValue,d=e.onChange,p=e.onDrag,h=e.step,v=e.stepPixelSize,g=e.suppressFlicker,m=e.unit,y=e.value,b=e.className,x=e.style,N=e.fillValue,w=e.color,C=e.ranges,_=void 0===C?{}:C,E=e.size,S=e.bipolar,V=(e.children,function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","style","fillValue","color","ranges","size","bipolar","children"]));return(0,r.normalizeProps)((0,r.createComponentVNode)(2,u.DraggableControl,Object.assign({dragMatrix:[0,-1]},{animated:t,format:n,maxValue:l,minValue:f,onChange:d,onDrag:p,step:h,stepPixelSize:v,suppressFlicker:g,unit:m,value:y},{children:function(e){var t=e.dragging,n=(e.editing,e.value),a=e.displayValue,u=e.displayElement,s=e.inputElement,d=e.handleDragStart,p=(0,o.scale)(null!=N?N:a,f,l),h=(0,o.scale)(a,f,l),v=w||(0,o.keyOfMatchingRange)(null!=N?N:n,_)||"default",g=270*(h-.5);return(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,i.classes)(["Knob","Knob--color--"+v,S&&"Knob--bipolar",b,(0,c.computeBoxClassName)(V)]),[(0,r.createVNode)(1,"div","Knob__circle",(0,r.createVNode)(1,"div","Knob__cursorBox",(0,r.createVNode)(1,"div","Knob__cursor"),2,{style:{transform:"rotate("+g+"deg)"}}),2),t&&(0,r.createVNode)(1,"div","Knob__popupValue",u,0),(0,r.createVNode)(32,"svg","Knob__ring Knob__ringTrackPivot",(0,r.createVNode)(32,"circle","Knob__ringTrack",null,1,{cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),(0,r.createVNode)(32,"svg","Knob__ring Knob__ringFillPivot",(0,r.createVNode)(32,"circle","Knob__ringFill",null,1,{style:{"stroke-dashoffset":((S?2.75:2)-1.5*p)*Math.PI*50},cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),s],0,Object.assign({},(0,c.computeBoxProps)(Object.assign({style:Object.assign({"font-size":E+"rem"},x)},V)),{onMouseDown:d})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledControls=void 0;var r=n(3),o=n(164);function i(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var a=function(e){var t=e.children,n=i(e,["children"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,o.Flex,Object.assign({mx:-.5,align:"stretch",justify:"space-between"},n,{children:t})))};t.LabeledControls=a;a.Item=function(e){var t=e.label,n=e.children,a=i(e,["label","children"]);return(0,r.createComponentVNode)(2,o.Flex.Item,{mx:1,children:(0,r.normalizeProps)((0,r.createComponentVNode)(2,o.Flex,Object.assign({minWidth:"52px",height:"100%",direction:"column",align:"center",textAlign:"center",justify:"space-between"},a,{children:[(0,r.createComponentVNode)(2,o.Flex.Item),(0,r.createComponentVNode)(2,o.Flex.Item,{children:n}),(0,r.createComponentVNode)(2,o.Flex.Item,{color:"label",children:t})]})))})}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledListDivider=t.LabeledListItem=t.LabeledList=void 0;var r=n(3),o=n(9),i=n(13),a=n(163),c=function(e){var t=e.children;return(0,r.createVNode)(1,"table","LabeledList",t,0)};t.LabeledList=c,c.defaultHooks=o.pureComponentHooks;var u=function(e){var t=e.className,n=e.label,a=e.labelColor,c=void 0===a?"label":a,u=e.color,s=e.textAlign,l=e.buttons,f=e.content,d=e.children;return(0,r.createVNode)(1,"tr",(0,o.classes)(["LabeledList__row",t]),[(0,r.createComponentVNode)(2,i.Box,{as:"td",color:c,className:(0,o.classes)(["LabeledList__cell","LabeledList__label"]),children:n?n+":":null}),(0,r.createComponentVNode)(2,i.Box,{as:"td",color:u,textAlign:s,className:(0,o.classes)(["LabeledList__cell","LabeledList__content"]),colSpan:l?undefined:2,children:[f,d]}),l&&(0,r.createVNode)(1,"td","LabeledList__cell LabeledList__buttons",l,0)],0)};t.LabeledListItem=u,u.defaultHooks=o.pureComponentHooks;var s=function(e){var t=e.size?(0,i.unit)(Math.max(0,e.size-1)):0;return(0,r.createVNode)(1,"tr","LabeledList__row",(0,r.createVNode)(1,"td",null,(0,r.createComponentVNode)(2,a.Divider),2,{colSpan:3,style:{"padding-top":t,"padding-bottom":t}}),2)};t.LabeledListDivider=s,s.defaultHooks=o.pureComponentHooks,c.Item=u,c.Divider=s},function(e,t,n){"use strict";t.__esModule=!0,t.NanoMap=void 0;var r=n(3),o=n(54),i=n(41),a=function(e,t){var n=(0,i.useBackend)(t).config,a=e.onClick;return(0,r.createComponentVNode)(2,o.Box,{className:"NanoMap__container",children:(0,r.createComponentVNode)(2,o.Box,{as:"img",src:n.map+"_nanomap_z1.png",style:{width:"512px",height:"512px"},onClick:a})})};t.NanoMap=a;a.Marker=function(e){var t=e.x,n=e.y,i=e.icon,a=e.tooltip,c=e.color;return(0,r.createComponentVNode)(2,o.Box,{position:"absolute",className:"NanoMap__marker",top:2*(255-n)+2+"px",left:2*t+2+"px",children:[(0,r.createComponentVNode)(2,o.Icon,{name:i,color:c,size:.5}),(0,r.createComponentVNode)(2,o.Tooltip,{content:a})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Modal=void 0;var r=n(3),o=n(9),i=n(13),a=n(162);t.Modal=function(e){var t=e.className,n=e.children,c=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","children"]);return(0,r.createComponentVNode)(2,a.Dimmer,{children:(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,o.classes)(["Modal",t,(0,i.computeBoxClassName)(c)]),n,0,Object.assign({},(0,i.computeBoxProps)(c))))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NoticeBox=void 0;var r=n(3),o=n(9),i=n(13);var a=function(e){var t=e.className,n=e.color,a=e.info,c=(e.warning,e.success),u=e.danger,s=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","color","info","warning","success","danger"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["NoticeBox",n&&"NoticeBox--color--"+n,a&&"NoticeBox--type--info",c&&"NoticeBox--type--success",u&&"NoticeBox--type--danger",t])},s)))};t.NoticeBox=a,a.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.ProgressBar=void 0;var r=n(3),o=n(48),i=n(9),a=n(13);var c=function(e){var t=e.className,n=e.value,c=e.minValue,u=void 0===c?0:c,s=e.maxValue,l=void 0===s?1:s,f=e.color,d=e.ranges,p=void 0===d?{}:d,h=e.children,v=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","value","minValue","maxValue","color","ranges","children"]),g=(0,o.scale)(n,u,l),m=h!==undefined,y=f||(0,o.keyOfMatchingRange)(n,p)||"default";return(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,i.classes)(["ProgressBar","ProgressBar--color--"+y,t,(0,a.computeBoxClassName)(v)]),[(0,r.createVNode)(1,"div","ProgressBar__fill ProgressBar__fill--animated",null,1,{style:{width:100*(0,o.clamp01)(g)+"%"}}),(0,r.createVNode)(1,"div","ProgressBar__content",m?h:(0,o.toFixed)(100*g)+"%",0)],4,Object.assign({},(0,a.computeBoxProps)(v))))};t.ProgressBar=c,c.defaultHooks=i.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Section=void 0;var r=n(3),o=n(9),i=n(13);var a=function(e){var t=e.className,n=e.title,a=e.level,c=void 0===a?1:a,u=e.buttons,s=e.content,l=e.children,f=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","title","level","buttons","content","children"]),d=!(0,o.isFalsy)(n)||!(0,o.isFalsy)(u),p=!(0,o.isFalsy)(s)||!(0,o.isFalsy)(l);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["Section","Section--level--"+c,t])},f,{children:[d&&(0,r.createVNode)(1,"div","Section__title",[(0,r.createVNode)(1,"span","Section__titleText",n,0),(0,r.createVNode)(1,"div","Section__buttons",u,0)],4),p&&(0,r.createVNode)(1,"div","Section__content",[s,l],0)]})))};t.Section=a,a.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Slider=void 0;var r=n(3),o=n(48),i=n(9),a=n(20),c=n(13),u=n(165),s=n(120);t.Slider=function(e){if(a.IS_IE8)return(0,r.normalizeProps)((0,r.createComponentVNode)(2,s.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,l=e.maxValue,f=e.minValue,d=e.onChange,p=e.onDrag,h=e.step,v=e.stepPixelSize,g=e.suppressFlicker,m=e.unit,y=e.value,b=e.className,x=e.fillValue,N=e.color,w=e.ranges,C=void 0===w?{}:w,_=e.children,E=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","fillValue","color","ranges","children"]),S=_!==undefined;return(0,r.normalizeProps)((0,r.createComponentVNode)(2,u.DraggableControl,Object.assign({dragMatrix:[1,0]},{animated:t,format:n,maxValue:l,minValue:f,onChange:d,onDrag:p,step:h,stepPixelSize:v,suppressFlicker:g,unit:m,value:y},{children:function(e){var t=e.dragging,n=(e.editing,e.value),a=e.displayValue,u=e.displayElement,s=e.inputElement,d=e.handleDragStart,p=x!==undefined&&null!==x,h=((0,o.scale)(n,f,l),(0,o.scale)(null!=x?x:a,f,l)),v=(0,o.scale)(a,f,l),g=N||(0,o.keyOfMatchingRange)(null!=x?x:n,C)||"default";return(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,i.classes)(["Slider","ProgressBar","ProgressBar--color--"+g,b,(0,c.computeBoxClassName)(E)]),[(0,r.createVNode)(1,"div",(0,i.classes)(["ProgressBar__fill",p&&"ProgressBar__fill--animated"]),null,1,{style:{width:100*(0,o.clamp01)(h)+"%",opacity:.4}}),(0,r.createVNode)(1,"div","ProgressBar__fill",null,1,{style:{width:100*(0,o.clamp01)(Math.min(h,v))+"%"}}),(0,r.createVNode)(1,"div","Slider__cursorOffset",[(0,r.createVNode)(1,"div","Slider__cursor"),(0,r.createVNode)(1,"div","Slider__pointer"),t&&(0,r.createVNode)(1,"div","Slider__popupValue",u,0)],0,{style:{width:100*(0,o.clamp01)(v)+"%"}}),(0,r.createVNode)(1,"div","ProgressBar__content",S?_:u,0),s],0,Object.assign({},(0,c.computeBoxProps)(E),{onMouseDown:d})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.Tabs=void 0;var r=n(3),o=n(9),i=n(13),a=n(117);function c(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var u=function(e){var t=e.className,n=e.vertical,a=e.children,u=c(e,["className","vertical","children"]);return(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,o.classes)(["Tabs",n?"Tabs--vertical":"Tabs--horizontal",t,(0,i.computeBoxClassName)(u)]),(0,r.createVNode)(1,"div","Tabs__tabBox",a,0),2,Object.assign({},(0,i.computeBoxProps)(u))))};t.Tabs=u;u.Tab=function(e){var t=e.className,n=e.selected,i=e.altSelection,u=c(e,["className","selected","altSelection"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,a.Button,Object.assign({className:(0,o.classes)(["Tabs__tab",n&&"Tabs__tab--selected",i&&n&&"Tabs__tab--altSelection",t]),selected:!i&&n,color:"transparent"},u)))}},function(e,t,n){"use strict";function r(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n",apos:"'"};return e.replace(/
    /gi,"\n").replace(/<\/?[a-z0-9-_]+[^>]*>/gi,"").replace(/&(nbsp|amp|quot|lt|gt|apos);/g,(function(e,n){return t[n]})).replace(/&#?([0-9]+);/gi,(function(e,t){var n=parseInt(t,10);return String.fromCharCode(n)})).replace(/&#x?([0-9a-f]+);/gi,(function(e,t){var n=parseInt(t,16);return String.fromCharCode(n)}))};t.buildQueryString=function(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}},function(e,t,n){var r={"./CrewMonitor.js":424,"./DisposalBin.js":425,"./Instrument.js":426};function o(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id=423},function(e,t,n){"use strict";t.__esModule=!0,t.CrewMonitor=void 0;var r=n(3),o=n(113),i=n(41),a=n(67),c=n(54),u=n(119);t.CrewMonitor=function(e,t){var n=(0,i.useBackend)(t),s=n.act,l=n.data,f=(0,o.sortBy)((function(e){return e.name}))(l.crewmembers||[]);return(0,r.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,r.createComponentVNode)(2,a.Window.Content,{children:[f.filter((function(e){return 3===e.sensor_type})).map((function(e){return(0,r.createComponentVNode)(2,c.NanoMap.Marker,{x:e.x,y:e.y,icon:"circle",tooltip:e.name,color:e.dead?"red":"green"},e.ref)})),(0,r.createComponentVNode)(2,c.NanoMap),(0,r.createComponentVNode)(2,c.Box,{className:"NanoMap__contentOffset",children:(0,r.createComponentVNode)(2,c.Box,{bold:!0,m:2,children:(0,r.createComponentVNode)(2,c.Table,{children:[(0,r.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,r.createComponentVNode)(2,c.Table.Cell,{children:"Name"}),(0,r.createComponentVNode)(2,c.Table.Cell,{children:"Status"}),(0,r.createComponentVNode)(2,c.Table.Cell,{children:"Location"})]}),f.map((function(e){return(0,r.createComponentVNode)(2,c.Table.Row,{children:[(0,r.createComponentVNode)(2,u.TableCell,{children:[e.name," (",e.assignment,")"]}),(0,r.createComponentVNode)(2,u.TableCell,{children:[(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:e.dead?"red":"green",children:e.dead?"Deceased":"Living"}),e.sensor_type>=2?(0,r.createComponentVNode)(2,c.Box,{inline:!0,children:["(",(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:"red",children:e.brute}),"|",(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:"orange",children:e.fire}),"|",(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:"green",children:e.tox}),"|",(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:"blue",children:e.oxy}),")"]}):null]}),(0,r.createComponentVNode)(2,u.TableCell,{children:3===e.sensor_type?l.isAI?(0,r.createComponentVNode)(2,c.Button,{fluid:!0,content:e.area+" ("+e.x+", "+e.y+")",onClick:function(){return s("track",{track:e.ref})}}):e.area+" ("+e.x+", "+e.y+")":"Not Available"})]},e.name)}))]})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DisposalBin=void 0;var r=n(3),o=n(41),i=n(54),a=n(67);t.DisposalBin=function(e,t){var n,c,u=(0,o.useBackend)(t),s=u.act,l=u.data;return 2===l.mode?(n="good",c="Ready"):l.mode<=0?(n="bad",c="N/A"):1===l.mode?(n="average",c="Pressurizing"):(n="average",c="Idle"),(0,r.createComponentVNode)(2,a.Window,{children:(0,r.createComponentVNode)(2,a.Window.Content,{children:(0,r.createComponentVNode)(2,i.Section,{children:[(0,r.createComponentVNode)(2,i.Box,{bold:!0,m:1,children:"Status"}),(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"State",color:n,children:c}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Pressure",children:(0,r.createComponentVNode)(2,i.ProgressBar,{ranges:{bad:[-Infinity,0],average:[0,99],good:[99,Infinity]},value:l.pressure,minValue:0,maxValue:100})})]}),(0,r.createComponentVNode)(2,i.Box,{bold:!0,m:1,children:"Controls"}),(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Handle",children:[(0,r.createComponentVNode)(2,i.Button,{icon:"toggle-off",disabled:l.isAI||l.panel_open,content:"Disengaged",selected:l.flushing?null:"selected",onClick:function(){return s("disengageHandle")}}),(0,r.createComponentVNode)(2,i.Button,{icon:"toggle-on",disabled:l.isAI||l.panel_open,content:"Engaged",selected:l.flushing?"selected":null,onClick:function(){return s("engageHandle")}})]}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Power",children:[(0,r.createComponentVNode)(2,i.Button,{icon:"toggle-off",disabled:-1===l.mode,content:"Off",selected:l.mode?null:"selected",onClick:function(){return s("pumpOff")}}),(0,r.createComponentVNode)(2,i.Button,{icon:"toggle-on",disabled:-1===l.mode,content:"On",selected:l.mode?"selected":null,onClick:function(){return s("pumpOn")}})]}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Eject",children:(0,r.createComponentVNode)(2,i.Button,{icon:"sign-out-alt",disabled:l.isAI,content:"Eject Contents",onClick:function(){return s("eject")}})})]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Instrument=void 0;var r=n(3),o=n(48),i=n(41),a=n(54),c=n(67);t.Instrument=function(e,t){var n=(0,i.useBackend)(t);n.act,n.data;return(0,r.createComponentVNode)(2,c.Window,{children:[(0,r.createComponentVNode)(2,u),(0,r.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,r.createComponentVNode)(2,s),(0,r.createComponentVNode)(2,f)]})]})};var u=function(e,t){var n=(0,i.useBackend)(t),o=n.act;if(n.data.help)return(0,r.createComponentVNode)(2,a.Modal,{maxWidth:"75%",height:.75*window.innerHeight+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,r.createComponentVNode)(2,a.Section,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,r.createComponentVNode)(2,a.Box,{px:"0.5rem",mt:"-0.5rem",children:[(0,r.createVNode)(1,"h1",null,"Making a Song",16),(0,r.createVNode)(1,"p",null,[(0,r.createTextVNode)("Lines are a series of chords, separated by commas\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"(,)"}),(0,r.createTextVNode)(", each with notes seperated by hyphens\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"(-)"}),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"tempo"}),(0,r.createTextVNode)(" as defined above.")],4),(0,r.createVNode)(1,"p",null,[(0,r.createTextVNode)("Notes are played by the\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"names of the note"}),(0,r.createTextVNode)(", and optionally, the\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"accidental"}),(0,r.createTextVNode)(", and/or the "),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave number"}),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("By default, every note is\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"natural"}),(0,r.createTextVNode)(" and in\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave 3"}),(0,r.createTextVNode)(". Defining a different state for either is remembered for each "),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"note"}),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"ul",null,[(0,r.createVNode)(1,"li",null,[(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"Example:"}),(0,r.createTextVNode)("\xa0"),(0,r.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,r.createTextVNode)(" will play a\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"C"}),(0,r.createTextVNode)("\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"major"}),(0,r.createTextVNode)(" scale.")],4),(0,r.createVNode)(1,"li",null,[(0,r.createTextVNode)("After a note has an\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"accidental"}),(0,r.createTextVNode)(" or\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave"}),(0,r.createTextVNode)(" placed, it will be remembered:\xa0"),(0,r.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,r.createTextVNode)(" is "),(0,r.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],4)],4)],4),(0,r.createVNode)(1,"p",null,[(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"Chords"}),(0,r.createTextVNode)("\xa0can be played simply by seperating each note with a hyphen: "),(0,r.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("A "),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"pause"}),(0,r.createTextVNode)("\xa0may be denoted by an empty chord: "),(0,r.createVNode)(1,"i",null,"C,E,,C,G",16),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,r.createTextVNode)(",\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"eg:"}),(0,r.createTextVNode)(" "),(0,r.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,r.createTextVNode)(".")],4),(0,r.createVNode)(1,"p",null,[(0,r.createTextVNode)("Combined, an example line is: "),(0,r.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"ul",null,[(0,r.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,r.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,r.createVNode)(1,"p",null,[(0,r.createTextVNode)("Lines are a series of chords, separated by commas\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"(,)"}),(0,r.createTextVNode)(", each with notes seperated by hyphens\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"(-)"}),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"tempo"}),(0,r.createTextVNode)(" as defined above.")],4),(0,r.createVNode)(1,"p",null,[(0,r.createTextVNode)("Notes are played by the\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"names of the note"}),(0,r.createTextVNode)(", and optionally, the\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"accidental"}),(0,r.createTextVNode)(", and/or the "),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave number"}),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("By default, every note is\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"natural"}),(0,r.createTextVNode)(" and in\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave 3"}),(0,r.createTextVNode)(". Defining a different state for either is remembered for each "),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"note"}),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"ul",null,[(0,r.createVNode)(1,"li",null,[(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"Example:"}),(0,r.createTextVNode)("\xa0"),(0,r.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,r.createTextVNode)(" will play a\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"C"}),(0,r.createTextVNode)("\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"major"}),(0,r.createTextVNode)(" scale.")],4),(0,r.createVNode)(1,"li",null,[(0,r.createTextVNode)("After a note has an\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"accidental"}),(0,r.createTextVNode)(" or\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave"}),(0,r.createTextVNode)(" placed, it will be remembered:\xa0"),(0,r.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,r.createTextVNode)(" is "),(0,r.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],4)],4)],4),(0,r.createVNode)(1,"p",null,[(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"Chords"}),(0,r.createTextVNode)("\xa0can be played simply by seperating each note with a hyphen: "),(0,r.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("A "),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"pause"}),(0,r.createTextVNode)("\xa0may be denoted by an empty chord: "),(0,r.createVNode)(1,"i",null,"C,E,,C,G",16),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,r.createTextVNode)(",\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"eg:"}),(0,r.createTextVNode)(" "),(0,r.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,r.createTextVNode)(".")],4),(0,r.createVNode)(1,"p",null,[(0,r.createTextVNode)("Combined, an example line is: "),(0,r.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"ul",null,[(0,r.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,r.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,r.createVNode)(1,"h1",null,"Instrument Advanced Settings",16),(0,r.createVNode)(1,"ul",null,[(0,r.createVNode)(1,"li",null,[(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Type:"}),(0,r.createTextVNode)("\xa0Whether the instrument is legacy or synthesized."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("Legacy instruments have a collection of sounds that are selectively used depending on the note to play."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("Synthesized instruments use a base sound and change its pitch to match the note to play.")],4),(0,r.createVNode)(1,"li",null,[(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Current:"}),(0,r.createTextVNode)("\xa0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!")],4),(0,r.createVNode)(1,"li",null,[(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),(0,r.createTextVNode)("\xa0The pitch to apply to all notes of the song.")],4),(0,r.createVNode)(1,"li",null,[(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Sustain Mode:"}),(0,r.createTextVNode)("\xa0How a played note fades out."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("Linear sustain means a note will fade out at a constant rate."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("Exponential sustain means a note will fade out at an exponential rate, sounding smoother.")],4),(0,r.createVNode)(1,"li",null,[(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),(0,r.createTextVNode)("\xa0The volume threshold at which a note is fully stopped.")],4),(0,r.createVNode)(1,"li",null,[(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),(0,r.createTextVNode)("\xa0Whether the last note should be sustained indefinitely.")],4)],4),(0,r.createComponentVNode)(2,a.Button,{color:"grey",content:"Close",onClick:function(){return o("help")}})]})})})},s=function(e,t){var n=(0,i.useBackend)(t),c=n.act,u=n.data,s=u.lines,f=u.playing,d=u.repeat,p=u.maxRepeats,h=u.tempo,v=u.minTempo,g=u.maxTempo,m=u.tickLag,y=u.volume,b=u.minVolume,x=u.maxVolume,N=u.ready;return(0,r.createComponentVNode)(2,a.Section,{title:"Instrument",buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Button,{icon:"info",content:"Help",onClick:function(){return c("help")}}),(0,r.createComponentVNode)(2,a.Button,{icon:"file",content:"New",onClick:function(){return c("newsong")}}),(0,r.createComponentVNode)(2,a.Button,{icon:"upload",content:"Import",onClick:function(){return c("import")}})],4),children:[(0,r.createComponentVNode)(2,a.LabeledList,{children:[(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Playback",children:[(0,r.createComponentVNode)(2,a.Button,{selected:f,disabled:0===s.length||d<0,icon:"play",content:"Play",onClick:function(){return c("play")}}),(0,r.createComponentVNode)(2,a.Button,{disabled:!f,icon:"stop",content:"Stop",onClick:function(){return c("stop")}})]}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Repeat",children:(0,r.createComponentVNode)(2,a.Slider,{animated:!0,minValue:"0",maxValue:p,value:d,stepPixelSize:"59",onChange:function(e,t){return c("repeat",{"new":t})}})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Tempo",children:(0,r.createComponentVNode)(2,a.Box,{children:[(0,r.createComponentVNode)(2,a.Button,{disabled:h>=g,content:"-",as:"span",mr:"0.5rem",onClick:function(){return c("tempo",{"new":h+m})}}),(0,o.round)(600/h)," BPM",(0,r.createComponentVNode)(2,a.Button,{disabled:h<=v,content:"+",as:"span",ml:"0.5rem",onClick:function(){return c("tempo",{"new":h-m})}})]})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Volume",children:(0,r.createComponentVNode)(2,a.Slider,{animated:!0,minValue:b,maxValue:x,value:y,stepPixelSize:"6",onDrag:function(e,t){return c("setvolume",{"new":t})}})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:N?(0,r.createComponentVNode)(2,a.Box,{color:"good",children:"Ready"}):(0,r.createComponentVNode)(2,a.Box,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,r.createComponentVNode)(2,l)]})},l=function(e,t){var n,c,u=(0,i.useBackend)(t),s=u.act,l=u.data,f=l.allowedInstrumentNames,d=l.instrumentLoaded,p=l.instrument,h=l.canNoteShift,v=l.noteShift,g=l.noteShiftMin,m=l.noteShiftMax,y=l.sustainMode,b=l.sustainLinearDuration,x=l.sustainExponentialDropoff,N=l.legacy,w=l.sustainDropoffVolume,C=l.sustainHeldNote;return 1===y?(n="Linear",c=(0,r.createComponentVNode)(2,a.Slider,{minValue:"0.1",maxValue:"5",value:b,step:"0.5",stepPixelSize:"85",format:function(e){return(0,o.round)(100*e)/100+" seconds"},onChange:function(e,t){return s("setlinearfalloff",{"new":t/10})}})):2===y&&(n="Exponential",c=(0,r.createComponentVNode)(2,a.Slider,{minValue:"1.025",maxValue:"10",value:x,step:"0.01",format:function(e){return(0,o.round)(1e3*e)/1e3+"% per decisecond"},onChange:function(e,t){return s("setexpfalloff",{"new":t})}})),f.sort(),(0,r.createComponentVNode)(2,a.Box,{my:-1,children:(0,r.createComponentVNode)(2,a.Collapsible,{mt:"1rem",mb:"0",title:"Advanced",children:(0,r.createComponentVNode)(2,a.Section,{mt:-1,children:[(0,r.createComponentVNode)(2,a.LabeledList,{children:[(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Type",children:N?"Legacy":"Synthesized"}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Current",children:d?(0,r.createComponentVNode)(2,a.Dropdown,{options:f,selected:p,width:"40%",onSelected:function(e){return s("switchinstrument",{name:e})}}):(0,r.createComponentVNode)(2,a.Box,{color:"bad",children:"None!"})}),!(N||!h)&&(0,r.createFragment)([(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,r.createComponentVNode)(2,a.Slider,{minValue:g,maxValue:m,value:v,stepPixelSize:"2",format:function(e){return e+" keys / "+(0,o.round)(e/12*100)/100+" octaves"},onChange:function(e,t){return s("setnoteshift",{"new":t})}})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Sustain Mode",children:[(0,r.createComponentVNode)(2,a.Dropdown,{options:["Linear","Exponential"],selected:n,onSelected:function(e){return s("setsustainmode",{"new":e})}}),c]}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Volume Dropoff Threshold",children:(0,r.createComponentVNode)(2,a.Slider,{animated:!0,minValue:"0.01",maxValue:"100",value:w,stepPixelSize:"6",onChange:function(e,t){return s("setdropoffvolume",{"new":t})}})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Sustain indefinitely last held note",children:(0,r.createComponentVNode)(2,a.Button,{selected:C,icon:C?"toggle-on":"toggle-off",content:C?"Yes":"No",onClick:function(){return s("togglesustainhold")}})})],4)]}),(0,r.createComponentVNode)(2,a.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){return s("reset")}})]})})})},f=function(e,t){var n=(0,i.useBackend)(t),o=n.act,c=n.data,u=c.playing,s=c.lines,l=c.editing;return(0,r.createComponentVNode)(2,a.Section,{title:"Editor",buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Button,{disabled:!l||u,icon:"plus",content:"Add Line",onClick:function(){return o("newline",{line:s.length+1})}}),(0,r.createComponentVNode)(2,a.Button,{selected:!l,icon:l?"chevron-up":"chevron-down",onClick:function(){return o("edit")}})],4),children:!!l&&(s.length>0?(0,r.createComponentVNode)(2,a.LabeledList,{children:s.map((function(e,t){return(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:t+1,buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Button,{disabled:u,icon:"pen",onClick:function(){return o("modifyline",{line:t+1})}}),(0,r.createComponentVNode)(2,a.Button,{disabled:u,icon:"trash",onClick:function(){return o("deleteline",{line:t+1})}})],4),children:e},t)}))}):(0,r.createComponentVNode)(2,a.Box,{color:"label",children:"Song is empty."}))})}}]); \ No newline at end of file +var n;n=void 0!==e?e:void 0,t.loadCSS=function(e,t,r,o){var i,a=n.document,c=a.createElement("link");if(t)i=t;else{var u=(a.body||a.getElementsByTagName("head")[0]).childNodes;i=u[u.length-1]}var s=a.styleSheets;if(o)for(var l in o)o.hasOwnProperty(l)&&c.setAttribute(l,o[l]);c.rel="stylesheet",c.href=e,c.media="only x",function p(e){if(a.body)return e();setTimeout((function(){p(e)}))}((function(){i.parentNode.insertBefore(c,t?i:i.nextSibling)}));var f=function h(e){for(var t=c.href,n=s.length;n--;)if(s[n].href===t)return e();setTimeout((function(){h(e)}))};function d(){c.addEventListener&&c.removeEventListener("load",d),c.media=r||"all"}return c.addEventListener&&c.addEventListener("load",d),c.onloadcssdefined=f,f(d),c}}).call(this,n(121))},function(e,t,n){"use strict";t.__esModule=!0,t.vecNormalize=t.vecLength=t.vecInverse=t.vecScale=t.vecDivide=t.vecMultiply=t.vecSubtract=t.vecAdd=t.vecCreate=void 0;var r=n(113);t.vecCreate=function(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),a=1;a1?t-1:0),r=1;r=0||(o[n]=e[n]);return o}(e,["className"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["BlockQuote",t])},n)))}},function(e,t,n){"use strict";var r,o;t.__esModule=!0,t.VNodeFlags=t.ChildFlags=void 0,t.VNodeFlags=r,function(e){e[e.HtmlElement=1]="HtmlElement",e[e.ComponentUnknown=2]="ComponentUnknown",e[e.ComponentClass=4]="ComponentClass",e[e.ComponentFunction=8]="ComponentFunction",e[e.Text=16]="Text",e[e.SvgElement=32]="SvgElement",e[e.InputElement=64]="InputElement",e[e.TextareaElement=128]="TextareaElement",e[e.SelectElement=256]="SelectElement",e[e.Void=512]="Void",e[e.Portal=1024]="Portal",e[e.ReCreate=2048]="ReCreate",e[e.ContentEditable=4096]="ContentEditable",e[e.Fragment=8192]="Fragment",e[e.InUse=16384]="InUse",e[e.ForwardRef=32768]="ForwardRef",e[e.Normalized=65536]="Normalized",e[e.ForwardRefComponent=32776]="ForwardRefComponent",e[e.FormElement=448]="FormElement",e[e.Element=481]="Element",e[e.Component=14]="Component",e[e.DOMRef=2033]="DOMRef",e[e.InUseOrNormalized=81920]="InUseOrNormalized",e[e.ClearInUse=-16385]="ClearInUse",e[e.ComponentKnown=12]="ComponentKnown"}(r||(t.VNodeFlags=r={})),t.ChildFlags=o,function(e){e[e.UnknownChildren=0]="UnknownChildren",e[e.HasInvalidChildren=1]="HasInvalidChildren",e[e.HasVNodeChildren=2]="HasVNodeChildren",e[e.HasNonKeyedChildren=4]="HasNonKeyedChildren",e[e.HasKeyedChildren=8]="HasKeyedChildren",e[e.HasTextChildren=16]="HasTextChildren",e[e.MultipleChildren=12]="MultipleChildren"}(o||(t.ChildFlags=o={}))},function(e,t,n){"use strict";t.__esModule=!0,t.ByondUi=void 0;var r=n(3),o=n(9),i=n(405),a=n(20),c=n(53),u=n(13);function s(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var l=(0,c.createLogger)("ByondUi"),f=[];window.addEventListener("beforeunload",(function(){for(var e=0;e=0||(o[n]=e[n]);return o}(t,["data","rangeX","rangeY","fillColor","strokeColor","strokeWidth"]),g=this.state.viewBox,m=function(e,t,n,r){if(0===e.length)return[];var i=(0,o.zipWith)(Math.min).apply(void 0,e),a=(0,o.zipWith)(Math.max).apply(void 0,e);return n!==undefined&&(i[0]=n[0],a[0]=n[1]),r!==undefined&&(i[1]=r[0],a[1]=r[1]),(0,o.map)((function(e){return(0,o.zipWith)((function(e,t,n,r){return(e-t)/(n-t)*r}))(e,i,a,t)}))(e)}(i,g,a,u);if(m.length>0){var y=m[0],b=m[m.length-1];m.push([g[0]+h,b[1]]),m.push([g[0]+h,-h]),m.push([-h,-h]),m.push([-h,y[1]])}var x=function(e){for(var t="",n=0;n=0||(o[n]=e[n]);return o}(t,["children","color","title","buttons"]);return(0,r.createComponentVNode)(2,o.Box,{mb:1,children:[(0,r.createVNode)(1,"div","Table",[(0,r.createVNode)(1,"div","Table__cell",(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Button,Object.assign({fluid:!0,color:u,icon:n?"chevron-down":"chevron-right",onClick:function(){return e.setState({open:!n})}},f,{children:s}))),2),l&&(0,r.createVNode)(1,"div","Table__cell Table__cell--collapsing",l,0)],0),n&&(0,r.createComponentVNode)(2,o.Box,{mt:1,children:a})]})},a}(r.Component);t.Collapsible=a},function(e,t,n){"use strict";t.__esModule=!0,t.ColorBox=void 0;var r=n(3),o=n(9),i=n(13);var a=function(e){var t=e.content,n=(e.children,e.className),a=e.color,c=e.backgroundColor,u=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["content","children","className","color","backgroundColor"]);return u.color=t?null:"transparent",u.backgroundColor=a||c,(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,o.classes)(["ColorBox",n,(0,i.computeBoxClassName)(u)]),t||".",0,Object.assign({},(0,i.computeBoxProps)(u))))};t.ColorBox=a,a.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Dropdown=void 0;var r=n(3),o=n(9),i=n(13),a=n(118);function c(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var u=function(e){var t,n;function u(t){var n;return(n=e.call(this,t)||this).state={selected:t.selected,open:!1},n.handleClick=function(){n.state.open&&n.setOpen(!1)},n}n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=u.prototype;return s.componentWillUnmount=function(){window.removeEventListener("click",this.handleClick)},s.setOpen=function(e){var t=this;this.setState({open:e}),e?(setTimeout((function(){return window.addEventListener("click",t.handleClick)})),this.menuRef.focus()):window.removeEventListener("click",this.handleClick)},s.setSelected=function(e){this.setState({selected:e}),this.setOpen(!1),this.props.onSelected(e)},s.buildMenu=function(){var e=this,t=this.props.options,n=(void 0===t?[]:t).map((function(t){return(0,r.createVNode)(1,"div","Dropdown__menuentry",t,0,{onClick:function(){e.setSelected(t)}},t)}));return n.length?n:"No Options Found"},s.render=function(){var e=this,t=this.props,n=t.color,u=void 0===n?"default":n,s=t.over,l=t.noscroll,f=t.nochevron,d=t.width,p=(t.onClick,t.selected,t.disabled),h=c(t,["color","over","noscroll","nochevron","width","onClick","selected","disabled"]),v=h.className,g=c(h,["className"]),m=s?!this.state.open:this.state.open,y=this.state.open?(0,r.createVNode)(1,"div",(0,o.classes)([l?"Dropdown__menu-noscroll":"Dropdown__menu",s&&"Dropdown__over"]),this.buildMenu(),0,{tabIndex:"-1",style:{width:d}},null,(function(t){e.menuRef=t})):null;return(0,r.createVNode)(1,"div","Dropdown",[(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({width:d,className:(0,o.classes)(["Dropdown__control","Button","Button--color--"+u,p&&"Button--disabled",v])},g,{onClick:function(){p&&!e.state.open||e.setOpen(!e.state.open)},children:[(0,r.createVNode)(1,"span","Dropdown__selected-text",this.state.selected,0),!!f||(0,r.createVNode)(1,"span","Dropdown__arrow-button",(0,r.createComponentVNode)(2,a.Icon,{name:m?"chevron-up":"chevron-down"}),2)]}))),y],0)},u}(r.Component);t.Dropdown=u},function(e,t,n){"use strict";t.__esModule=!0,t.GridColumn=t.Grid=void 0;var r=n(3),o=n(119),i=n(9);function a(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var c=function(e){var t=e.children,n=a(e,["children"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,o.Table,Object.assign({},n,{children:(0,r.createComponentVNode)(2,o.Table.Row,{children:t})})))};t.Grid=c,c.defaultHooks=i.pureComponentHooks;var u=function(e){var t=e.size,n=void 0===t?1:t,i=e.style,c=a(e,["size","style"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,o.Table.Cell,Object.assign({style:Object.assign({width:n+"%"},i)},c)))};t.GridColumn=u,c.defaultHooks=i.pureComponentHooks,c.Column=u},function(e,t,n){"use strict";t.__esModule=!0,t.Input=void 0;var r=n(3),o=n(9),i=n(13);function a(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var c=function(e){return(0,o.isFalsy)(e)?"":e},u=function(e){var t,n;function u(){var t;return(t=e.call(this)||this).inputRef=(0,r.createRef)(),t.state={editing:!1},t.handleInput=function(e){var n=t.state.editing,r=t.props.onInput;n||t.setEditing(!0),r&&r(e,e.target.value)},t.handleFocus=function(e){t.state.editing||t.setEditing(!0)},t.handleBlur=function(e){var n=t.state.editing,r=t.props.onChange;n&&(t.setEditing(!1),r&&r(e,e.target.value))},t.handleKeyDown=function(e){var n=t.props,r=n.onInput,o=n.onChange,i=n.onEnter;return 13===e.keyCode?(t.setEditing(!1),o&&o(e,e.target.value),r&&r(e,e.target.value),i&&i(e,e.target.value),void(t.props.selfClear?e.target.value="":e.target.blur())):27===e.keyCode?(t.setEditing(!1),e.target.value=c(t.props.value),void e.target.blur()):void 0},t}n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=u.prototype;return s.componentDidMount=function(){var e=this.props.value,t=this.inputRef.current;t&&(t.value=c(e))},s.componentDidUpdate=function(e,t){var n=this.state.editing,r=e.value,o=this.props.value,i=this.inputRef.current;i&&!n&&r!==o&&(i.value=c(o))},s.setEditing=function(e){this.setState({editing:e})},s.render=function(){var e=this.props,t=(e.selfClear,e.onInput,e.onChange,e.onEnter,e.value,e.maxLength),n=e.placeholder,c=a(e,["selfClear","onInput","onChange","onEnter","value","maxLength","placeholder"]),u=c.className,s=c.fluid,l=a(c,["className","fluid"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["Input",s&&"Input--fluid",u])},l,{children:[(0,r.createVNode)(1,"div","Input__baseline",".",16),(0,r.createVNode)(64,"input","Input__input",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,maxLength:t},null,this.inputRef)]})))},u}(r.Component);t.Input=u},function(e,t,n){"use strict";t.__esModule=!0,t.Knob=void 0;var r=n(3),o=n(48),i=n(9),a=n(20),c=n(13),u=n(165),s=n(120);t.Knob=function(e){if(a.IS_IE8)return(0,r.normalizeProps)((0,r.createComponentVNode)(2,s.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,l=e.maxValue,f=e.minValue,d=e.onChange,p=e.onDrag,h=e.step,v=e.stepPixelSize,g=e.suppressFlicker,m=e.unit,y=e.value,b=e.className,x=e.style,N=e.fillValue,w=e.color,C=e.ranges,_=void 0===C?{}:C,E=e.size,S=e.bipolar,V=(e.children,function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","style","fillValue","color","ranges","size","bipolar","children"]));return(0,r.normalizeProps)((0,r.createComponentVNode)(2,u.DraggableControl,Object.assign({dragMatrix:[0,-1]},{animated:t,format:n,maxValue:l,minValue:f,onChange:d,onDrag:p,step:h,stepPixelSize:v,suppressFlicker:g,unit:m,value:y},{children:function(e){var t=e.dragging,n=(e.editing,e.value),a=e.displayValue,u=e.displayElement,s=e.inputElement,d=e.handleDragStart,p=(0,o.scale)(null!=N?N:a,f,l),h=(0,o.scale)(a,f,l),v=w||(0,o.keyOfMatchingRange)(null!=N?N:n,_)||"default",g=270*(h-.5);return(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,i.classes)(["Knob","Knob--color--"+v,S&&"Knob--bipolar",b,(0,c.computeBoxClassName)(V)]),[(0,r.createVNode)(1,"div","Knob__circle",(0,r.createVNode)(1,"div","Knob__cursorBox",(0,r.createVNode)(1,"div","Knob__cursor"),2,{style:{transform:"rotate("+g+"deg)"}}),2),t&&(0,r.createVNode)(1,"div","Knob__popupValue",u,0),(0,r.createVNode)(32,"svg","Knob__ring Knob__ringTrackPivot",(0,r.createVNode)(32,"circle","Knob__ringTrack",null,1,{cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),(0,r.createVNode)(32,"svg","Knob__ring Knob__ringFillPivot",(0,r.createVNode)(32,"circle","Knob__ringFill",null,1,{style:{"stroke-dashoffset":((S?2.75:2)-1.5*p)*Math.PI*50},cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),s],0,Object.assign({},(0,c.computeBoxProps)(Object.assign({style:Object.assign({"font-size":E+"rem"},x)},V)),{onMouseDown:d})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledControls=void 0;var r=n(3),o=n(164);function i(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var a=function(e){var t=e.children,n=i(e,["children"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,o.Flex,Object.assign({mx:-.5,align:"stretch",justify:"space-between"},n,{children:t})))};t.LabeledControls=a;a.Item=function(e){var t=e.label,n=e.children,a=i(e,["label","children"]);return(0,r.createComponentVNode)(2,o.Flex.Item,{mx:1,children:(0,r.normalizeProps)((0,r.createComponentVNode)(2,o.Flex,Object.assign({minWidth:"52px",height:"100%",direction:"column",align:"center",textAlign:"center",justify:"space-between"},a,{children:[(0,r.createComponentVNode)(2,o.Flex.Item),(0,r.createComponentVNode)(2,o.Flex.Item,{children:n}),(0,r.createComponentVNode)(2,o.Flex.Item,{color:"label",children:t})]})))})}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledListDivider=t.LabeledListItem=t.LabeledList=void 0;var r=n(3),o=n(9),i=n(13),a=n(163),c=function(e){var t=e.children;return(0,r.createVNode)(1,"table","LabeledList",t,0)};t.LabeledList=c,c.defaultHooks=o.pureComponentHooks;var u=function(e){var t=e.className,n=e.label,a=e.labelColor,c=void 0===a?"label":a,u=e.color,s=e.textAlign,l=e.buttons,f=e.content,d=e.children;return(0,r.createVNode)(1,"tr",(0,o.classes)(["LabeledList__row",t]),[(0,r.createComponentVNode)(2,i.Box,{as:"td",color:c,className:(0,o.classes)(["LabeledList__cell","LabeledList__label"]),children:n?n+":":null}),(0,r.createComponentVNode)(2,i.Box,{as:"td",color:u,textAlign:s,className:(0,o.classes)(["LabeledList__cell","LabeledList__content"]),colSpan:l?undefined:2,children:[f,d]}),l&&(0,r.createVNode)(1,"td","LabeledList__cell LabeledList__buttons",l,0)],0)};t.LabeledListItem=u,u.defaultHooks=o.pureComponentHooks;var s=function(e){var t=e.size?(0,i.unit)(Math.max(0,e.size-1)):0;return(0,r.createVNode)(1,"tr","LabeledList__row",(0,r.createVNode)(1,"td",null,(0,r.createComponentVNode)(2,a.Divider),2,{colSpan:3,style:{"padding-top":t,"padding-bottom":t}}),2)};t.LabeledListDivider=s,s.defaultHooks=o.pureComponentHooks,c.Item=u,c.Divider=s},function(e,t,n){"use strict";t.__esModule=!0,t.NanoMap=void 0;var r=n(3),o=n(54),i=n(41),a=function(e,t){var n=(0,i.useBackend)(t).config,a=e.onClick;return(0,r.createComponentVNode)(2,o.Box,{className:"NanoMap__container",children:(0,r.createComponentVNode)(2,o.Box,{as:"img",src:n.map+"_nanomap_z1.png",style:{width:"512px",height:"512px"},onClick:a})})};t.NanoMap=a;a.Marker=function(e){var t=e.x,n=e.y,i=e.icon,a=e.tooltip,c=e.color;return(0,r.createComponentVNode)(2,o.Box,{position:"absolute",className:"NanoMap__marker",top:2*(255-n)+2+"px",left:2*t+2+"px",children:[(0,r.createComponentVNode)(2,o.Icon,{name:i,color:c,size:.5}),(0,r.createComponentVNode)(2,o.Tooltip,{content:a})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Modal=void 0;var r=n(3),o=n(9),i=n(13),a=n(162);t.Modal=function(e){var t=e.className,n=e.children,c=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","children"]);return(0,r.createComponentVNode)(2,a.Dimmer,{children:(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,o.classes)(["Modal",t,(0,i.computeBoxClassName)(c)]),n,0,Object.assign({},(0,i.computeBoxProps)(c))))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NoticeBox=void 0;var r=n(3),o=n(9),i=n(13);var a=function(e){var t=e.className,n=e.color,a=e.info,c=(e.warning,e.success),u=e.danger,s=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","color","info","warning","success","danger"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["NoticeBox",n&&"NoticeBox--color--"+n,a&&"NoticeBox--type--info",c&&"NoticeBox--type--success",u&&"NoticeBox--type--danger",t])},s)))};t.NoticeBox=a,a.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.ProgressBar=void 0;var r=n(3),o=n(48),i=n(9),a=n(13);var c=function(e){var t=e.className,n=e.value,c=e.minValue,u=void 0===c?0:c,s=e.maxValue,l=void 0===s?1:s,f=e.color,d=e.ranges,p=void 0===d?{}:d,h=e.children,v=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","value","minValue","maxValue","color","ranges","children"]),g=(0,o.scale)(n,u,l),m=h!==undefined,y=f||(0,o.keyOfMatchingRange)(n,p)||"default";return(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,i.classes)(["ProgressBar","ProgressBar--color--"+y,t,(0,a.computeBoxClassName)(v)]),[(0,r.createVNode)(1,"div","ProgressBar__fill ProgressBar__fill--animated",null,1,{style:{width:100*(0,o.clamp01)(g)+"%"}}),(0,r.createVNode)(1,"div","ProgressBar__content",m?h:(0,o.toFixed)(100*g)+"%",0)],4,Object.assign({},(0,a.computeBoxProps)(v))))};t.ProgressBar=c,c.defaultHooks=i.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Section=void 0;var r=n(3),o=n(9),i=n(13);var a=function(e){var t=e.className,n=e.title,a=e.level,c=void 0===a?1:a,u=e.buttons,s=e.content,l=e.children,f=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","title","level","buttons","content","children"]),d=!(0,o.isFalsy)(n)||!(0,o.isFalsy)(u),p=!(0,o.isFalsy)(s)||!(0,o.isFalsy)(l);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["Section","Section--level--"+c,t])},f,{children:[d&&(0,r.createVNode)(1,"div","Section__title",[(0,r.createVNode)(1,"span","Section__titleText",n,0),(0,r.createVNode)(1,"div","Section__buttons",u,0)],4),p&&(0,r.createVNode)(1,"div","Section__content",[s,l],0)]})))};t.Section=a,a.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Slider=void 0;var r=n(3),o=n(48),i=n(9),a=n(20),c=n(13),u=n(165),s=n(120);t.Slider=function(e){if(a.IS_IE8)return(0,r.normalizeProps)((0,r.createComponentVNode)(2,s.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,l=e.maxValue,f=e.minValue,d=e.onChange,p=e.onDrag,h=e.step,v=e.stepPixelSize,g=e.suppressFlicker,m=e.unit,y=e.value,b=e.className,x=e.fillValue,N=e.color,w=e.ranges,C=void 0===w?{}:w,_=e.children,E=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","fillValue","color","ranges","children"]),S=_!==undefined;return(0,r.normalizeProps)((0,r.createComponentVNode)(2,u.DraggableControl,Object.assign({dragMatrix:[1,0]},{animated:t,format:n,maxValue:l,minValue:f,onChange:d,onDrag:p,step:h,stepPixelSize:v,suppressFlicker:g,unit:m,value:y},{children:function(e){var t=e.dragging,n=(e.editing,e.value),a=e.displayValue,u=e.displayElement,s=e.inputElement,d=e.handleDragStart,p=x!==undefined&&null!==x,h=((0,o.scale)(n,f,l),(0,o.scale)(null!=x?x:a,f,l)),v=(0,o.scale)(a,f,l),g=N||(0,o.keyOfMatchingRange)(null!=x?x:n,C)||"default";return(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,i.classes)(["Slider","ProgressBar","ProgressBar--color--"+g,b,(0,c.computeBoxClassName)(E)]),[(0,r.createVNode)(1,"div",(0,i.classes)(["ProgressBar__fill",p&&"ProgressBar__fill--animated"]),null,1,{style:{width:100*(0,o.clamp01)(h)+"%",opacity:.4}}),(0,r.createVNode)(1,"div","ProgressBar__fill",null,1,{style:{width:100*(0,o.clamp01)(Math.min(h,v))+"%"}}),(0,r.createVNode)(1,"div","Slider__cursorOffset",[(0,r.createVNode)(1,"div","Slider__cursor"),(0,r.createVNode)(1,"div","Slider__pointer"),t&&(0,r.createVNode)(1,"div","Slider__popupValue",u,0)],0,{style:{width:100*(0,o.clamp01)(v)+"%"}}),(0,r.createVNode)(1,"div","ProgressBar__content",S?_:u,0),s],0,Object.assign({},(0,c.computeBoxProps)(E),{onMouseDown:d})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.Tabs=void 0;var r=n(3),o=n(9),i=n(13),a=n(117);function c(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var u=function(e){var t=e.className,n=e.vertical,a=e.children,u=c(e,["className","vertical","children"]);return(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,o.classes)(["Tabs",n?"Tabs--vertical":"Tabs--horizontal",t,(0,i.computeBoxClassName)(u)]),(0,r.createVNode)(1,"div","Tabs__tabBox",a,0),2,Object.assign({},(0,i.computeBoxProps)(u))))};t.Tabs=u;u.Tab=function(e){var t=e.className,n=e.selected,i=e.altSelection,u=c(e,["className","selected","altSelection"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,a.Button,Object.assign({className:(0,o.classes)(["Tabs__tab",n&&"Tabs__tab--selected",i&&n&&"Tabs__tab--altSelection",t]),selected:!i&&n,color:"transparent"},u)))}},function(e,t,n){"use strict";function r(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n",apos:"'"};return e.replace(/
    /gi,"\n").replace(/<\/?[a-z0-9-_]+[^>]*>/gi,"").replace(/&(nbsp|amp|quot|lt|gt|apos);/g,(function(e,n){return t[n]})).replace(/&#?([0-9]+);/gi,(function(e,t){var n=parseInt(t,10);return String.fromCharCode(n)})).replace(/&#x?([0-9a-f]+);/gi,(function(e,t){var n=parseInt(t,16);return String.fromCharCode(n)}))};t.buildQueryString=function(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}},function(e,t,n){var r={"./CrewMonitor.js":424,"./DisposalBin.js":425,"./Instrument.js":426};function o(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id=423},function(e,t,n){"use strict";t.__esModule=!0,t.CrewMonitor=void 0;var r=n(3),o=n(113),i=n(41),a=n(67),c=n(54),u=n(119);t.CrewMonitor=function(e,t){var n=(0,i.useBackend)(t),s=n.act,l=n.data,f=(0,o.sortBy)((function(e){return e.name}))(l.crewmembers||[]);return(0,r.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,r.createComponentVNode)(2,a.Window.Content,{children:[f.filter((function(e){return 3===e.sensor_type})).map((function(e){return(0,r.createComponentVNode)(2,c.NanoMap.Marker,{x:e.x,y:e.y,icon:"circle",tooltip:e.name,color:e.dead?"red":"green"},e.ref)})),(0,r.createComponentVNode)(2,c.NanoMap),(0,r.createComponentVNode)(2,c.Box,{className:"NanoMap__contentOffset",children:(0,r.createComponentVNode)(2,c.Box,{bold:!0,m:2,children:(0,r.createComponentVNode)(2,c.Table,{children:[(0,r.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,r.createComponentVNode)(2,c.Table.Cell,{children:"Name"}),(0,r.createComponentVNode)(2,c.Table.Cell,{children:"Status"}),(0,r.createComponentVNode)(2,c.Table.Cell,{children:"Location"})]}),f.map((function(e){return(0,r.createComponentVNode)(2,c.Table.Row,{children:[(0,r.createComponentVNode)(2,u.TableCell,{children:[e.name," (",e.assignment,")"]}),(0,r.createComponentVNode)(2,u.TableCell,{children:[(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:e.dead?"red":"green",children:e.dead?"Deceased":"Living"}),e.sensor_type>=2?(0,r.createComponentVNode)(2,c.Box,{inline:!0,children:["(",(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:"red",children:e.brute}),"|",(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:"orange",children:e.fire}),"|",(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:"green",children:e.tox}),"|",(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:"blue",children:e.oxy}),")"]}):null]}),(0,r.createComponentVNode)(2,u.TableCell,{children:3===e.sensor_type?l.isAI?(0,r.createComponentVNode)(2,c.Button,{fluid:!0,content:e.area+" ("+e.x+", "+e.y+")",onClick:function(){return s("track",{track:e.ref})}}):e.area+" ("+e.x+", "+e.y+")":"Not Available"})]},e.name)}))]})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DisposalBin=void 0;var r=n(3),o=n(41),i=n(54),a=n(67);t.DisposalBin=function(e,t){var n,c,u=(0,o.useBackend)(t),s=u.act,l=u.data;return 2===l.mode?(n="good",c="Ready"):l.mode<=0?(n="bad",c="N/A"):1===l.mode?(n="average",c="Pressurizing"):(n="average",c="Idle"),(0,r.createComponentVNode)(2,a.Window,{children:(0,r.createComponentVNode)(2,a.Window.Content,{children:(0,r.createComponentVNode)(2,i.Section,{children:[(0,r.createComponentVNode)(2,i.Box,{bold:!0,m:1,children:"Status"}),(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"State",color:n,children:c}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Pressure",children:(0,r.createComponentVNode)(2,i.ProgressBar,{ranges:{bad:[-Infinity,0],average:[0,99],good:[99,Infinity]},value:l.pressure,minValue:0,maxValue:100})})]}),(0,r.createComponentVNode)(2,i.Box,{bold:!0,m:1,children:"Controls"}),(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Handle",children:[(0,r.createComponentVNode)(2,i.Button,{icon:"toggle-off",disabled:l.isAI||l.panel_open,content:"Disengaged",selected:l.flushing?null:"selected",onClick:function(){return s("disengageHandle")}}),(0,r.createComponentVNode)(2,i.Button,{icon:"toggle-on",disabled:l.isAI||l.panel_open,content:"Engaged",selected:l.flushing?"selected":null,onClick:function(){return s("engageHandle")}})]}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Power",children:[(0,r.createComponentVNode)(2,i.Button,{icon:"toggle-off",disabled:-1===l.mode,content:"Off",selected:l.mode?null:"selected",onClick:function(){return s("pumpOff")}}),(0,r.createComponentVNode)(2,i.Button,{icon:"toggle-on",disabled:-1===l.mode,content:"On",selected:l.mode?"selected":null,onClick:function(){return s("pumpOn")}})]}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Eject",children:(0,r.createComponentVNode)(2,i.Button,{icon:"sign-out-alt",disabled:l.isAI,content:"Eject Contents",onClick:function(){return s("eject")}})})]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Instrument=void 0;var r=n(3),o=n(48),i=n(41),a=n(54),c=n(67);t.Instrument=function(e,t){var n=(0,i.useBackend)(t);n.act,n.data;return(0,r.createComponentVNode)(2,c.Window,{children:[(0,r.createComponentVNode)(2,u),(0,r.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,r.createComponentVNode)(2,s),(0,r.createComponentVNode)(2,f)]})]})};var u=function(e,t){var n=(0,i.useBackend)(t),o=n.act;if(n.data.help)return(0,r.createComponentVNode)(2,a.Modal,{maxWidth:"75%",height:.75*window.innerHeight+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,r.createComponentVNode)(2,a.Section,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,r.createComponentVNode)(2,a.Box,{px:"0.5rem",mt:"-0.5rem",children:[(0,r.createVNode)(1,"h1",null,"Making a Song",16),(0,r.createVNode)(1,"p",null,[(0,r.createTextVNode)("Lines are a series of chords, separated by commas\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"(,)"}),(0,r.createTextVNode)(", each with notes seperated by hyphens\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"(-)"}),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"tempo"}),(0,r.createTextVNode)(" as defined above.")],4),(0,r.createVNode)(1,"p",null,[(0,r.createTextVNode)("Notes are played by the\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"names of the note"}),(0,r.createTextVNode)(", and optionally, the\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"accidental"}),(0,r.createTextVNode)(", and/or the "),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave number"}),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("By default, every note is\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"natural"}),(0,r.createTextVNode)(" and in\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave 3"}),(0,r.createTextVNode)(". Defining a different state for either is remembered for each "),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"note"}),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"ul",null,[(0,r.createVNode)(1,"li",null,[(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"Example:"}),(0,r.createTextVNode)("\xa0"),(0,r.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,r.createTextVNode)(" will play a\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"C"}),(0,r.createTextVNode)("\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"major"}),(0,r.createTextVNode)(" scale.")],4),(0,r.createVNode)(1,"li",null,[(0,r.createTextVNode)("After a note has an\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"accidental"}),(0,r.createTextVNode)(" or\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave"}),(0,r.createTextVNode)(" placed, it will be remembered:\xa0"),(0,r.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,r.createTextVNode)(" is "),(0,r.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],4)],4)],4),(0,r.createVNode)(1,"p",null,[(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"Chords"}),(0,r.createTextVNode)("\xa0can be played simply by seperating each note with a hyphen: "),(0,r.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("A "),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"pause"}),(0,r.createTextVNode)("\xa0may be denoted by an empty chord: "),(0,r.createVNode)(1,"i",null,"C,E,,C,G",16),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,r.createTextVNode)(",\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"eg:"}),(0,r.createTextVNode)(" "),(0,r.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,r.createTextVNode)(".")],4),(0,r.createVNode)(1,"p",null,[(0,r.createTextVNode)("Combined, an example line is: "),(0,r.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"ul",null,[(0,r.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,r.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,r.createVNode)(1,"p",null,[(0,r.createTextVNode)("Lines are a series of chords, separated by commas\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"(,)"}),(0,r.createTextVNode)(", each with notes seperated by hyphens\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"(-)"}),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"tempo"}),(0,r.createTextVNode)(" as defined above.")],4),(0,r.createVNode)(1,"p",null,[(0,r.createTextVNode)("Notes are played by the\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"names of the note"}),(0,r.createTextVNode)(", and optionally, the\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"accidental"}),(0,r.createTextVNode)(", and/or the "),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave number"}),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("By default, every note is\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"natural"}),(0,r.createTextVNode)(" and in\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave 3"}),(0,r.createTextVNode)(". Defining a different state for either is remembered for each "),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"note"}),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"ul",null,[(0,r.createVNode)(1,"li",null,[(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"Example:"}),(0,r.createTextVNode)("\xa0"),(0,r.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,r.createTextVNode)(" will play a\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"C"}),(0,r.createTextVNode)("\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"major"}),(0,r.createTextVNode)(" scale.")],4),(0,r.createVNode)(1,"li",null,[(0,r.createTextVNode)("After a note has an\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"accidental"}),(0,r.createTextVNode)(" or\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave"}),(0,r.createTextVNode)(" placed, it will be remembered:\xa0"),(0,r.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,r.createTextVNode)(" is "),(0,r.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],4)],4)],4),(0,r.createVNode)(1,"p",null,[(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"Chords"}),(0,r.createTextVNode)("\xa0can be played simply by seperating each note with a hyphen: "),(0,r.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("A "),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"pause"}),(0,r.createTextVNode)("\xa0may be denoted by an empty chord: "),(0,r.createVNode)(1,"i",null,"C,E,,C,G",16),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,r.createTextVNode)(",\xa0"),(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"eg:"}),(0,r.createTextVNode)(" "),(0,r.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,r.createTextVNode)(".")],4),(0,r.createVNode)(1,"p",null,[(0,r.createTextVNode)("Combined, an example line is: "),(0,r.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,r.createTextVNode)("."),(0,r.createVNode)(1,"ul",null,[(0,r.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,r.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,r.createVNode)(1,"h1",null,"Instrument Advanced Settings",16),(0,r.createVNode)(1,"ul",null,[(0,r.createVNode)(1,"li",null,[(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Type:"}),(0,r.createTextVNode)("\xa0Whether the instrument is legacy or synthesized."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("Legacy instruments have a collection of sounds that are selectively used depending on the note to play."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("Synthesized instruments use a base sound and change its pitch to match the note to play.")],4),(0,r.createVNode)(1,"li",null,[(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Current:"}),(0,r.createTextVNode)("\xa0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!")],4),(0,r.createVNode)(1,"li",null,[(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),(0,r.createTextVNode)("\xa0The pitch to apply to all notes of the song.")],4),(0,r.createVNode)(1,"li",null,[(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Sustain Mode:"}),(0,r.createTextVNode)("\xa0How a played note fades out."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("Linear sustain means a note will fade out at a constant rate."),(0,r.createVNode)(1,"br"),(0,r.createTextVNode)("Exponential sustain means a note will fade out at an exponential rate, sounding smoother.")],4),(0,r.createVNode)(1,"li",null,[(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),(0,r.createTextVNode)("\xa0The volume threshold at which a note is fully stopped.")],4),(0,r.createVNode)(1,"li",null,[(0,r.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),(0,r.createTextVNode)("\xa0Whether the last note should be sustained indefinitely.")],4)],4),(0,r.createComponentVNode)(2,a.Button,{color:"grey",content:"Close",onClick:function(){return o("help")}})]})})})},s=function(e,t){var n=(0,i.useBackend)(t),c=n.act,u=n.data,s=u.lines,f=u.playing,d=u.repeat,p=u.maxRepeats,h=u.tempo,v=u.minTempo,g=u.maxTempo,m=u.tickLag,y=u.volume,b=u.minVolume,x=u.maxVolume,N=u.ready;return(0,r.createComponentVNode)(2,a.Section,{title:"Instrument",buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Button,{icon:"info",content:"Help",onClick:function(){return c("help")}}),(0,r.createComponentVNode)(2,a.Button,{icon:"file",content:"New",onClick:function(){return c("newsong")}}),(0,r.createComponentVNode)(2,a.Button,{icon:"upload",content:"Import",onClick:function(){return c("import")}})],4),children:[(0,r.createComponentVNode)(2,a.LabeledList,{children:[(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Playback",children:[(0,r.createComponentVNode)(2,a.Button,{selected:f,disabled:0===s.length||d<0,icon:"play",content:"Play",onClick:function(){return c("play")}}),(0,r.createComponentVNode)(2,a.Button,{disabled:!f,icon:"stop",content:"Stop",onClick:function(){return c("stop")}})]}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Repeat",children:(0,r.createComponentVNode)(2,a.Slider,{animated:!0,minValue:"0",maxValue:p,value:d,stepPixelSize:"59",onChange:function(e,t){return c("repeat",{"new":t})}})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Tempo",children:(0,r.createComponentVNode)(2,a.Box,{children:[(0,r.createComponentVNode)(2,a.Button,{disabled:h>=g,content:"-",as:"span",mr:"0.5rem",onClick:function(){return c("tempo",{"new":h+m})}}),(0,o.round)(600/h)," BPM",(0,r.createComponentVNode)(2,a.Button,{disabled:h<=v,content:"+",as:"span",ml:"0.5rem",onClick:function(){return c("tempo",{"new":h-m})}})]})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Volume",children:(0,r.createComponentVNode)(2,a.Slider,{animated:!0,minValue:b,maxValue:x,value:y,stepPixelSize:"6",onDrag:function(e,t){return c("setvolume",{"new":t})}})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:N?(0,r.createComponentVNode)(2,a.Box,{color:"good",children:"Ready"}):(0,r.createComponentVNode)(2,a.Box,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,r.createComponentVNode)(2,l)]})},l=function(e,t){var n,c,u=(0,i.useBackend)(t),s=u.act,l=u.data,f=l.allowedInstrumentNames,d=l.instrumentLoaded,p=l.instrument,h=l.canNoteShift,v=l.noteShift,g=l.noteShiftMin,m=l.noteShiftMax,y=l.sustainMode,b=l.sustainLinearDuration,x=l.sustainExponentialDropoff,N=l.legacy,w=l.sustainDropoffVolume,C=l.sustainHeldNote;return 1===y?(n="Linear",c=(0,r.createComponentVNode)(2,a.Slider,{minValue:"0.1",maxValue:"5",value:b,step:"0.5",stepPixelSize:"85",format:function(e){return(0,o.round)(100*e)/100+" seconds"},onChange:function(e,t){return s("setlinearfalloff",{"new":t/10})}})):2===y&&(n="Exponential",c=(0,r.createComponentVNode)(2,a.Slider,{minValue:"1.025",maxValue:"10",value:x,step:"0.01",format:function(e){return(0,o.round)(1e3*e)/1e3+"% per decisecond"},onChange:function(e,t){return s("setexpfalloff",{"new":t})}})),f.sort(),(0,r.createComponentVNode)(2,a.Box,{my:-1,children:(0,r.createComponentVNode)(2,a.Collapsible,{mt:"1rem",mb:"0",title:"Advanced",children:(0,r.createComponentVNode)(2,a.Section,{mt:-1,children:[(0,r.createComponentVNode)(2,a.LabeledList,{children:[(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Type",children:N?"Legacy":"Synthesized"}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Current",children:d?(0,r.createComponentVNode)(2,a.Dropdown,{options:f,selected:p,width:"40%",onSelected:function(e){return s("switchinstrument",{name:e})}}):(0,r.createComponentVNode)(2,a.Box,{color:"bad",children:"None!"})}),!(N||!h)&&(0,r.createFragment)([(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,r.createComponentVNode)(2,a.Slider,{minValue:g,maxValue:m,value:v,stepPixelSize:"2",format:function(e){return e+" keys / "+(0,o.round)(e/12*100)/100+" octaves"},onChange:function(e,t){return s("setnoteshift",{"new":t})}})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Sustain Mode",children:[(0,r.createComponentVNode)(2,a.Dropdown,{options:["Linear","Exponential"],selected:n,onSelected:function(e){return s("setsustainmode",{"new":e})}}),c]}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Volume Dropoff Threshold",children:(0,r.createComponentVNode)(2,a.Slider,{animated:!0,minValue:"0.01",maxValue:"100",value:w,stepPixelSize:"6",onChange:function(e,t){return s("setdropoffvolume",{"new":t})}})}),(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:"Sustain indefinitely last held note",children:(0,r.createComponentVNode)(2,a.Button,{selected:C,icon:C?"toggle-on":"toggle-off",content:C?"Yes":"No",onClick:function(){return s("togglesustainhold")}})})],4)]}),(0,r.createComponentVNode)(2,a.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){return s("reset")}})]})})})},f=function(e,t){var n=(0,i.useBackend)(t),o=n.act,c=n.data,u=c.playing,s=c.lines,l=c.editing;return(0,r.createComponentVNode)(2,a.Section,{title:"Editor",buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Button,{disabled:!l||u,icon:"plus",content:"Add Line",onClick:function(){return o("newline",{line:s.length+1})}}),(0,r.createComponentVNode)(2,a.Button,{selected:!l,icon:l?"chevron-up":"chevron-down",onClick:function(){return o("edit")}})],4),children:!!l&&(s.length>0?(0,r.createComponentVNode)(2,a.LabeledList,{children:s.map((function(e,t){return(0,r.createComponentVNode)(2,a.LabeledList.Item,{label:t+1,buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Button,{disabled:u,icon:"pen",onClick:function(){return o("modifyline",{line:t+1})}}),(0,r.createComponentVNode)(2,a.Button,{disabled:u,icon:"trash",onClick:function(){return o("deleteline",{line:t+1})}})],4),children:e},t)}))}):(0,r.createComponentVNode)(2,a.Box,{color:"label",children:"Song is empty."}))})}}]); +======= +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=168)}([function(e,t,n){"use strict";var r=n(3),o=n(16).f,i=n(25),a=n(18),c=n(85),u=n(125),s=n(60);e.exports=function(e,t){var n,l,f,d,p,h=e.target,v=e.global,g=e.stat;if(n=v?r:g?r[h]||c(h,{}):(r[h]||{}).prototype)for(l in t){if(d=t[l],f=e.noTargetGet?(p=o(n,l))&&p.value:n[l],!s(v?l:h+(g?".":"#")+l,e.forced)&&f!==undefined){if(typeof d==typeof f)continue;u(d,f)}(e.sham||f&&f.sham)&&i(d,"sham",!0),a(n,l,d,e)}}},function(e,t,n){"use strict";e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){"use strict";t.__esModule=!0;var r=n(383);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(t[e]=r[e])}))},function(e,t,n){"use strict";(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(121))},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){"use strict";var r=n(1);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){"use strict";var r=n(4);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){"use strict";var r,o=n(99),i=n(5),a=n(3),c=n(4),u=n(14),s=n(71),l=n(25),f=n(18),d=n(11).f,p=n(31),h=n(48),v=n(10),g=n(57),m=a.Int8Array,y=m&&m.prototype,b=a.Uint8ClampedArray,_=b&&b.prototype,w=m&&p(m),x=y&&p(y),E=Object.prototype,C=E.isPrototypeOf,N=v("toStringTag"),S=g("TYPED_ARRAY_TAG"),k=o&&!!h&&"Opera"!==s(a.opera),O=!1,A={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},I=function(e){var t=s(e);return"DataView"===t||u(A,t)},V=function(e){return c(e)&&u(A,s(e))};for(r in A)a[r]||(k=!1);if((!k||"function"!=typeof w||w===Function.prototype)&&(w=function(){throw TypeError("Incorrect invocation")},k))for(r in A)a[r]&&h(a[r],w);if((!k||!x||x===E)&&(x=w.prototype,k))for(r in A)a[r]&&h(a[r].prototype,x);if(k&&p(_)!==x&&h(_,x),i&&!u(x,N))for(r in O=!0,d(x,N,{get:function(){return c(this)?this[S]:undefined}}),A)a[r]&&l(a[r],S,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:k,TYPED_ARRAY_TAG:O&&S,aTypedArray:function(e){if(V(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(e){if(h){if(C.call(w,e))return e}else for(var t in A)if(u(A,r)){var n=a[t];if(n&&(e===n||C.call(n,e)))return e}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n){if(i){if(n)for(var r in A){var o=a[r];o&&u(o.prototype,e)&&delete o.prototype[e]}x[e]&&!n||f(x,e,n?t:k&&y[e]||t)}},exportTypedArrayStaticMethod:function(e,t,n){var r,o;if(i){if(h){if(n)for(r in A)(o=a[r])&&u(o,e)&&delete o[e];if(w[e]&&!n)return;try{return f(w,e,n?t:k&&m[e]||t)}catch(c){}}for(r in A)!(o=a[r])||o[e]&&!n||f(o,e,t)}},isView:I,isTypedArray:V,TypedArray:w,TypedArrayPrototype:x}},function(e,t,n){"use strict";var r=n(26),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){"use strict";t.__esModule=!0,t.isFalsy=t.pureComponentHooks=t.shallowDiffers=t.normalizeChildren=t.classes=void 0;t.classes=function(e){for(var t="",n=0;n0&&(t.style=u),t};t.computeBoxProps=g;var m=function(e){var t=e.textColor||e.color,n=e.backgroundColor;return(0,r.classes)([s(t)&&"color-"+t,s(n)&&"color-bg-"+n])};t.computeBoxClassName=m;var y=function(e){var t=e.as,n=void 0===t?"div":t,r=e.className,a=e.children,c=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["as","className","children"]);if("function"==typeof a)return a(g(e));var u="string"==typeof r?r+" "+m(c):m(c),s=g(c);return(0,o.createVNode)(i.VNodeFlags.HtmlElement,n,u,a,i.ChildFlags.UnknownChildren,s)};t.Box=y,y.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,n){"use strict";var r=n(46),o=n(56),i=n(12),a=n(8),c=n(62),u=[].push,s=function(e){var t=1==e,n=2==e,s=3==e,l=4==e,f=6==e,d=5==e||f;return function(p,h,v,g){for(var m,y,b=i(p),_=o(b),w=r(h,v,3),x=a(_.length),E=0,C=g||c,N=t?C(p,x):n?C(p,0):undefined;x>E;E++)if((d||E in _)&&(y=w(m=_[E],E,b),e))if(t)N[E]=y;else if(y)switch(e){case 3:return!0;case 5:return m;case 6:return E;case 2:u.call(N,m)}else if(l)return!1;return f?-1:s||l?l:N}};e.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6)}},function(e,t,n){"use strict";var r=n(5),o=n(68),i=n(44),a=n(21),c=n(29),u=n(14),s=n(122),l=Object.getOwnPropertyDescriptor;t.f=r?l:function(e,t){if(e=a(e),t=c(t,!0),s)try{return l(e,t)}catch(n){}if(u(e,t))return i(!o.f.call(e,t),e[t])}},function(e,t,n){"use strict";e.exports=function(e){if(e==undefined)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";var r=n(3),o=n(25),i=n(14),a=n(85),c=n(86),u=n(30),s=u.get,l=u.enforce,f=String(String).split("String");(e.exports=function(e,t,n,c){var u=!!c&&!!c.unsafe,s=!!c&&!!c.enumerable,d=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof t||i(n,"name")||o(n,"name",t),l(n).source=f.join("string"==typeof t?t:"")),e!==r?(u?!d&&e[t]&&(s=!0):delete e[t],s?e[t]=n:o(e,t,n)):s?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&s(this).source||c(this)}))},function(e,t,n){"use strict";var r=n(5),o=n(1),i=n(14),a=Object.defineProperty,c={},u=function(e){throw e};e.exports=function(e,t){if(i(c,e))return c[e];t||(t={});var n=[][e],s=!!i(t,"ACCESSORS")&&t.ACCESSORS,l=i(t,0)?t[0]:u,f=i(t,1)?t[1]:undefined;return c[e]=!!n&&!o((function(){if(s&&!r)return!0;var e={length:-1};s?a(e,1,{enumerable:!0,get:u}):e[1]=1,n.call(e,l,f)}))}},function(e,t,n){"use strict";function r(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(s){return void n(s)}c.done?t(u):Promise.resolve(u).then(r,o)}t.__esModule=!0,t.winset=t.winget=t.runCommand=t.callByondAsync=t.callByond=t.IS_IE8=void 0;var o=window.Byond,i=function(){var e=navigator.userAgent.match(/Trident\/(\d+).+?;/i);if(!e)return null;var t=e[1];return t?parseInt(t,10):null}(),a=null!==i&&i<=6;t.IS_IE8=a;var c=function(e,t){void 0===t&&(t={}),o.call(e,t)};t.callByond=c;var u=function(e,t){void 0===t&&(t={}),window.__callbacks__=window.__callbacks__||[];var n=window.__callbacks__.length,r=new Promise((function(e){window.__callbacks__.push(e)}));return o.call(e,Object.assign({},t,{callback:"__callbacks__["+n+"]"})),r};t.callByondAsync=u;t.runCommand=function(e){return c("winset",{command:e})};var s=function(){var e,t=(e=regeneratorRuntime.mark((function n(e,t){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,u("winget",{id:e,property:t});case 2:return r=n.sent,n.abrupt("return",r[t]);case 4:case"end":return n.stop()}}),n)})),function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function c(e){r(a,o,i,c,u,"next",e)}function u(e){r(a,o,i,c,u,"throw",e)}c(undefined)}))});return function(e,n){return t.apply(this,arguments)}}();t.winget=s;t.winset=function(e,t,n){var r;return c("winset",((r={})[e+"."+t]=n,r))}},function(e,t,n){"use strict";var r=n(56),o=n(17);e.exports=function(e){return r(o(e))}},function(e,t,n){"use strict";var r=n(126),o=n(14),i=n(132),a=n(11).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||a(t,e,{value:i.f(e)})}},function(e,t,n){"use strict";var r=n(17),o=/"/g;e.exports=function(e,t,n,i){var a=String(r(e)),c="<"+t;return""!==n&&(c+=" "+n+'="'+String(i).replace(o,""")+'"'),c+">"+a+""}},function(e,t,n){"use strict";var r=n(1);e.exports=function(e){return r((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t,n){"use strict";var r=n(5),o=n(11),i=n(44);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";var r=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:r)(e)}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){"use strict";var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t,n){"use strict";var r=n(4);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){"use strict";var r,o,i,a=n(124),c=n(3),u=n(4),s=n(25),l=n(14),f=n(69),d=n(58),p=c.WeakMap;if(a){var h=new p,v=h.get,g=h.has,m=h.set;r=function(e,t){return m.call(h,e,t),t},o=function(e){return v.call(h,e)||{}},i=function(e){return g.call(h,e)}}else{var y=f("state");d[y]=!0,r=function(e,t){return s(e,y,t),t},o=function(e){return l(e,y)?e[y]:{}},i=function(e){return l(e,y)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){"use strict";var r=n(14),o=n(12),i=n(69),a=n(98),c=i("IE_PROTO"),u=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=o(e),r(e,c)?e[c]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?u:null}},function(e,t,n){"use strict";t.__esModule=!0,t.useSharedState=t.useLocalState=t.useBackend=t.backendReducer=t.backendSetSharedState=t.backendUpdate=void 0;var r=n(112),o=n(20);t.backendUpdate=function(e){return{type:"backend/update",payload:e}};var i=function(e,t){return{type:"backend/setSharedState",payload:{key:e,nextState:t}}};t.backendSetSharedState=i;t.backendReducer=function(e,t){var n=t.type,o=t.payload;if("backend/update"===n){var i=Object.assign({},e.config,{},o.config),a=Object.assign({},e.data,{},o.static_data,{},o.data),c=Object.assign({},e.shared);if(o.shared)for(var u=0,s=Object.keys(o.shared);un;)o[n]=t[n++];return o},Y=function(e,t){V(e,t,{get:function(){return A(this)[t]}})},W=function(e){var t;return e instanceof P||"ArrayBuffer"==(t=m(e))||"SharedArrayBuffer"==t},H=function(e,t){return z(e)&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},$=function(e,t){return H(e,t=v(t,!0))?l(2,e[t]):T(e,t)},G=function(e,t,n){return!(H(e,t=v(t,!0))&&y(n)&&g(n,"value"))||g(n,"get")||g(n,"set")||n.configurable||g(n,"writable")&&!n.writable||g(n,"enumerable")&&!n.enumerable?V(e,t,n):(e[t]=n.value,e)};i?(B||(S.f=$,N.f=G,Y(D,"buffer"),Y(D,"byteOffset"),Y(D,"byteLength"),Y(D,"length")),r({target:"Object",stat:!0,forced:!B},{getOwnPropertyDescriptor:$,defineProperty:G}),e.exports=function(e,t,n){var i=e.match(/\d+$/)[0]/8,c=e+(n?"Clamped":"")+"Array",u="get"+e,l="set"+e,v=o[c],g=v,m=g&&g.prototype,N={},S=function(e,t){V(e,t,{get:function(){return function(e,t){var n=A(e);return n.view[u](t*i+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var o=A(e);n&&(r=(r=M(r))<0?0:r>255?255:255&r),o.view[l](t*i+o.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};B?a&&(g=t((function(e,t,n,r){return s(e,g,c),O(y(t)?W(t)?r!==undefined?new v(t,h(n,i),r):n!==undefined?new v(t,h(n,i)):new v(t):z(t)?U(g,t):x.call(g,t):new v(p(t)),e,g)})),_&&_(g,R),E(w(v),(function(e){e in g||f(g,e,v[e])})),g.prototype=m):(g=t((function(e,t,n,r){s(e,g,c);var o,a,u,l=0,f=0;if(y(t)){if(!W(t))return z(t)?U(g,t):x.call(g,t);o=t,f=h(n,i);var v=t.byteLength;if(r===undefined){if(v%i)throw L("Wrong length");if((a=v-f)<0)throw L("Wrong length")}else if((a=d(r)*i)+f>v)throw L("Wrong length");u=a/i}else u=p(t),o=new P(a=u*i);for(I(e,{buffer:o,byteOffset:f,byteLength:a,length:u,view:new j(o)});l"+e+"<\/script>"},h=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(o){}var e,t;h=r?function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=s("iframe")).style.display="none",u.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F);for(var n=a.length;n--;)delete h.prototype[a[n]];return h()};c[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(d.prototype=o(e),n=new d,d.prototype=null,n[f]=e):n=h(),t===undefined?n:i(n,t)}},function(e,t,n){"use strict";var r=n(11).f,o=n(14),i=n(10)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(10),o=n(40),i=n(11),a=r("unscopables"),c=Array.prototype;c[a]==undefined&&i.f(c,a,{configurable:!0,value:o(null)}),e.exports=function(e){c[a][e]=!0}},function(e,t,n){"use strict";var r=n(6),o=n(27),i=n(10)("species");e.exports=function(e,t){var n,a=r(e).constructor;return a===undefined||(n=r(a)[i])==undefined?t:o(n)}},function(e,t,n){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var r=n(127),o=n(89).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){"use strict";var r=n(27);e.exports=function(e,t,n){if(r(e),t===undefined)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";var r=n(29),o=n(11),i=n(44);e.exports=function(e,t,n){var a=r(t);a in e?o.f(e,a,i(0,n)):e[a]=n}},function(e,t,n){"use strict";var r=n(6),o=n(138);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(i){}return function(n,i){return r(n),o(i),t?e.call(n,i):n.__proto__=i,n}}():undefined)},function(e,t,n){"use strict";var r=n(58),o=n(4),i=n(14),a=n(11).f,c=n(57),u=n(66),s=c("meta"),l=0,f=Object.isExtensible||function(){return!0},d=function(e){a(e,s,{value:{objectID:"O"+ ++l,weakData:{}}})},p=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,s)){if(!f(e))return"F";if(!t)return"E";d(e)}return e[s].objectID},getWeakData:function(e,t){if(!i(e,s)){if(!f(e))return!0;if(!t)return!1;d(e)}return e[s].weakData},onFreeze:function(e){return u&&p.REQUIRED&&f(e)&&!i(e,s)&&d(e),e}};r[s]=!0},function(e,t,n){"use strict";var r=n(28);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){"use strict";var r=n(33),o=n(11),i=n(10),a=n(5),c=i("species");e.exports=function(e){var t=r(e),n=o.f;a&&t&&!t[c]&&n(t,c,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){"use strict";var r=n(17),o="["+n(78)+"]",i=RegExp("^"+o+o+"*"),a=RegExp(o+o+"*$"),c=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(i,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:c(1),end:c(2),trim:c(3)}},function(e,t,n){"use strict";t.__esModule=!0,t.logger=t.createLogger=void 0;n(158);var r=n(20),o=0,i=1,a=2,c=3,u=4,s=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),i=2;i=a){var c=[t].concat(o).map((function(e){return"string"==typeof e?e:e instanceof Error?e.stack||String(e):JSON.stringify(e)})).filter((function(e){return e})).join(" ")+"\nUser Agent: "+navigator.userAgent;(0,r.callByond)("",{src:window.__ref__,action:"tgui:log",log:c})}},l=function(e){return{debug:function(){for(var t=arguments.length,n=new Array(t),r=0;rn?n:e};t.clamp01=function(e){return e<0?0:e>1?1:e};t.scale=function(e,t,n){return(e-t)/(n-t)};t.round=function(e,t){return!e||isNaN(e)?e:(t|=0,i=(e*=n=Math.pow(10,t))>0|-(e<0),o=Math.abs(e%1)>=.4999999999854481,r=Math.floor(e),o&&(e=r+(i>0)),(o?e:Math.round(e))/n);var n,r,o,i};t.toFixed=function(e,t){return void 0===t&&(t=0),Number(e).toFixed(Math.max(t,0))};var r=function(e,t){return t&&e>=t[0]&&e<=t[1]};t.inRange=r;t.keyOfMatchingRange=function(e,t){for(var n=0,o=Object.keys(t);nl;)if((c=u[l++])!=c)return!0}else for(;s>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){"use strict";var r=n(1),o=/#|\.prototype\./,i=function(e,t){var n=c[a(e)];return n==s||n!=u&&("function"==typeof t?r(t):!!t)},a=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},c=i.data={},u=i.NATIVE="N",s=i.POLYFILL="P";e.exports=i},function(e,t,n){"use strict";var r=n(127),o=n(89);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){"use strict";var r=n(4),o=n(50),i=n(10)("species");e.exports=function(e,t){var n;return o(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!o(n.prototype)?r(n)&&null===(n=n[i])&&(n=undefined):n=undefined),new(n===undefined?Array:n)(0===t?0:t)}},function(e,t,n){"use strict";var r=n(1),o=n(10),i=n(92),a=o("species");e.exports=function(e){return i>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";var r=n(18);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},function(e,t,n){"use strict";var r=n(1);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){"use strict";var r=n(6),o=n(94),i=n(8),a=n(46),c=n(95),u=n(135),s=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,l,f){var d,p,h,v,g,m,y,b=a(t,n,l?2:1);if(f)d=e;else{if("function"!=typeof(p=c(e)))throw TypeError("Target is not iterable");if(o(p)){for(h=0,v=i(e.length);v>h;h++)if((g=l?b(r(y=e[h])[0],y[1]):b(e[h]))&&g instanceof s)return g;return new s(!1)}d=p.call(e)}for(m=d.next;!(y=m.call(d)).done;)if("object"==typeof(g=u(d,b,y.value,l))&&g&&g instanceof s)return g;return new s(!1)}).stop=function(e){return new s(!0,e)}},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);t.f=i?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t,n){"use strict";var r=n(87),o=n(57),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t,n){"use strict";var r=n(33);e.exports=r("navigator","userAgent")||""},function(e,t,n){"use strict";var r=n(96),o=n(28),i=n(10)("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=r?o:function(e){var t,n,r;return e===undefined?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Object(e),i))?n:a?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){"use strict";var r=n(10)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},"return":function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(c){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(c){}return n}},function(e,t,n){"use strict";var r=n(27),o=n(12),i=n(56),a=n(8),c=function(e){return function(t,n,c,u){r(n);var s=o(t),l=i(s),f=a(s.length),d=e?f-1:0,p=e?-1:1;if(c<2)for(;;){if(d in l){u=l[d],d+=p;break}if(d+=p,e?d<0:f<=d)throw TypeError("Reduce of empty array with no initial value")}for(;e?d>=0:f>d;d+=p)d in l&&(u=n(u,l[d],d,s));return u}};e.exports={left:c(!1),right:c(!0)}},function(e,t,n){"use strict";var r=n(3),o=n(5),i=n(99),a=n(25),c=n(65),u=n(1),s=n(52),l=n(26),f=n(8),d=n(140),p=n(215),h=n(31),v=n(48),g=n(45).f,m=n(11).f,y=n(93),b=n(41),_=n(30),w=_.get,x=_.set,E=r.ArrayBuffer,C=E,N=r.DataView,S=N&&N.prototype,k=Object.prototype,O=r.RangeError,A=p.pack,I=p.unpack,V=function(e){return[255&e]},T=function(e){return[255&e,e>>8&255]},M=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},L=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},P=function(e){return A(e,23,4)},j=function(e){return A(e,52,8)},B=function(e,t){m(e.prototype,t,{get:function(){return w(this)[t]}})},F=function(e,t,n,r){var o=d(n),i=w(e);if(o+t>i.byteLength)throw O("Wrong index");var a=w(i.buffer).bytes,c=o+i.byteOffset,u=a.slice(c,c+t);return r?u:u.reverse()},R=function(e,t,n,r,o,i){var a=d(n),c=w(e);if(a+t>c.byteLength)throw O("Wrong index");for(var u=w(c.buffer).bytes,s=a+c.byteOffset,l=r(+o),f=0;fU;)(D=z[U++])in C||a(C,D,E[D]);K.constructor=C}v&&h(S)!==k&&v(S,k);var Y=new N(new C(2)),W=S.setInt8;Y.setInt8(0,2147483648),Y.setInt8(1,2147483649),!Y.getInt8(0)&&Y.getInt8(1)||c(S,{setInt8:function(e,t){W.call(this,e,t<<24>>24)},setUint8:function(e,t){W.call(this,e,t<<24>>24)}},{unsafe:!0})}else C=function(e){s(this,C,"ArrayBuffer");var t=d(e);x(this,{bytes:y.call(new Array(t),0),byteLength:t}),o||(this.byteLength=t)},N=function(e,t,n){s(this,N,"DataView"),s(e,C,"DataView");var r=w(e).byteLength,i=l(t);if(i<0||i>r)throw O("Wrong offset");if(i+(n=n===undefined?r-i:f(n))>r)throw O("Wrong length");x(this,{buffer:e,byteLength:n,byteOffset:i}),o||(this.buffer=e,this.byteLength=n,this.byteOffset=i)},o&&(B(C,"byteLength"),B(N,"buffer"),B(N,"byteLength"),B(N,"byteOffset")),c(N.prototype,{getInt8:function(e){return F(this,1,e)[0]<<24>>24},getUint8:function(e){return F(this,1,e)[0]},getInt16:function(e){var t=F(this,2,e,arguments.length>1?arguments[1]:undefined);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=F(this,2,e,arguments.length>1?arguments[1]:undefined);return t[1]<<8|t[0]},getInt32:function(e){return L(F(this,4,e,arguments.length>1?arguments[1]:undefined))},getUint32:function(e){return L(F(this,4,e,arguments.length>1?arguments[1]:undefined))>>>0},getFloat32:function(e){return I(F(this,4,e,arguments.length>1?arguments[1]:undefined),23)},getFloat64:function(e){return I(F(this,8,e,arguments.length>1?arguments[1]:undefined),52)},setInt8:function(e,t){R(this,1,e,V,t)},setUint8:function(e,t){R(this,1,e,V,t)},setInt16:function(e,t){R(this,2,e,T,t,arguments.length>2?arguments[2]:undefined)},setUint16:function(e,t){R(this,2,e,T,t,arguments.length>2?arguments[2]:undefined)},setInt32:function(e,t){R(this,4,e,M,t,arguments.length>2?arguments[2]:undefined)},setUint32:function(e,t){R(this,4,e,M,t,arguments.length>2?arguments[2]:undefined)},setFloat32:function(e,t){R(this,4,e,P,t,arguments.length>2?arguments[2]:undefined)},setFloat64:function(e,t){R(this,8,e,j,t,arguments.length>2?arguments[2]:undefined)}});b(C,"ArrayBuffer"),b(N,"DataView"),e.exports={ArrayBuffer:C,DataView:N}},function(e,t,n){"use strict";var r=n(0),o=n(3),i=n(60),a=n(18),c=n(49),u=n(67),s=n(52),l=n(4),f=n(1),d=n(72),p=n(41),h=n(76);e.exports=function(e,t,n){var v=-1!==e.indexOf("Map"),g=-1!==e.indexOf("Weak"),m=v?"set":"add",y=o[e],b=y&&y.prototype,_=y,w={},x=function(e){var t=b[e];a(b,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(g&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!l(e)?undefined:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!l(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(i(e,"function"!=typeof y||!(g||b.forEach&&!f((function(){(new y).entries().next()})))))_=n.getConstructor(t,e,v,m),c.REQUIRED=!0;else if(i(e,!0)){var E=new _,C=E[m](g?{}:-0,1)!=E,N=f((function(){E.has(1)})),S=d((function(e){new y(e)})),k=!g&&f((function(){for(var e=new y,t=5;t--;)e[m](t,t);return!e.has(-0)}));S||((_=t((function(t,n){s(t,_,e);var r=h(new y,t,_);return n!=undefined&&u(n,r[m],r,v),r}))).prototype=b,b.constructor=_),(N||k)&&(x("delete"),x("has"),v&&x("get")),(k||C)&&x(m),g&&b.clear&&delete b.clear}return w[e]=_,r({global:!0,forced:_!=y},w),p(_,e),g||n.setStrong(_,e,v),_}},function(e,t,n){"use strict";var r=n(4),o=n(48);e.exports=function(e,t,n){var i,a;return o&&"function"==typeof(i=t.constructor)&&i!==n&&r(a=i.prototype)&&a!==n.prototype&&o(e,a),e}},function(e,t,n){"use strict";var r=Math.expm1,o=Math.exp;e.exports=!r||r(10)>22025.465794806718||r(10)<22025.465794806718||-2e-17!=r(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:o(e)-1}:r},function(e,t,n){"use strict";e.exports="\t\n\x0B\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},function(e,t,n){"use strict";var r=n(34),o=n(3),i=n(1);e.exports=r||!i((function(){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete o[e]}))},function(e,t,n){"use strict";var r=n(6);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var r,o,i=n(80),a=n(105),c=RegExp.prototype.exec,u=String.prototype.replace,s=c,l=(r=/a/,o=/b*/g,c.call(r,"a"),c.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),f=a.UNSUPPORTED_Y||a.BROKEN_CARET,d=/()??/.exec("")[1]!==undefined;(l||d||f)&&(s=function(e){var t,n,r,o,a=this,s=f&&a.sticky,p=i.call(a),h=a.source,v=0,g=e;return s&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),g=String(e).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(h="(?: "+h+")",g=" "+g,v++),n=new RegExp("^(?:"+h+")",p)),d&&(n=new RegExp("^"+h+"$(?!\\s)",p)),l&&(t=a.lastIndex),r=c.call(s?n:a,g),s?r?(r.input=r.input.slice(v),r[0]=r[0].slice(v),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:l&&r&&(a.lastIndex=a.global?r.index+r[0].length:t),d&&r&&r.length>1&&u.call(r[0],n,(function(){for(o=1;o")})),l="$0"==="a".replace(/./,"$0"),f=i("replace"),d=!!/./[f]&&""===/./[f]("a","$0"),p=!o((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,f){var h=i(e),v=!o((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),g=v&&!o((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!v||!g||"replace"===e&&(!s||!l||d)||"split"===e&&!p){var m=/./[h],y=n(h,""[e],(function(e,t,n,r,o){return t.exec===a?v&&!o?{done:!0,value:m.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:d}),b=y[0],_=y[1];r(String.prototype,e,b),r(RegExp.prototype,h,2==t?function(e,t){return _.call(e,this,t)}:function(e){return _.call(e,this)})}f&&c(RegExp.prototype[h],"sham",!0)}},function(e,t,n){"use strict";var r=n(28),o=n(81);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},function(e,t,n){"use strict";var r=n(3),o=n(4),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){"use strict";var r=n(3),o=n(25);e.exports=function(e,t){try{o(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){"use strict";var r=n(123),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return o.call(e)}),e.exports=r.inspectSource},function(e,t,n){"use strict";var r=n(34),o=n(123);(e.exports=function(e,t){return o[e]||(o[e]=t!==undefined?t:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"\xa9 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){"use strict";var r=n(33),o=n(45),i=n(90),a=n(6);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(a(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){"use strict";t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var r=n(1);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(e,t,n){"use strict";var r,o,i=n(3),a=n(70),c=i.process,u=c&&c.versions,s=u&&u.v8;s?o=(r=s.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=r[1]),e.exports=o&&+o},function(e,t,n){"use strict";var r=n(12),o=n(39),i=n(8);e.exports=function(e){for(var t=r(this),n=i(t.length),a=arguments.length,c=o(a>1?arguments[1]:undefined,n),u=a>2?arguments[2]:undefined,s=u===undefined?n:o(u,n);s>c;)t[c++]=e;return t}},function(e,t,n){"use strict";var r=n(10),o=n(64),i=r("iterator"),a=Array.prototype;e.exports=function(e){return e!==undefined&&(o.Array===e||a[i]===e)}},function(e,t,n){"use strict";var r=n(71),o=n(64),i=n(10)("iterator");e.exports=function(e){if(e!=undefined)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){"use strict";var r={};r[n(10)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){"use strict";var r=n(0),o=n(200),i=n(31),a=n(48),c=n(41),u=n(25),s=n(18),l=n(10),f=n(34),d=n(64),p=n(137),h=p.IteratorPrototype,v=p.BUGGY_SAFARI_ITERATORS,g=l("iterator"),m=function(){return this};e.exports=function(e,t,n,l,p,y,b){o(n,t,l);var _,w,x,E=function(e){if(e===p&&O)return O;if(!v&&e in S)return S[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},C=t+" Iterator",N=!1,S=e.prototype,k=S[g]||S["@@iterator"]||p&&S[p],O=!v&&k||E(p),A="Array"==t&&S.entries||k;if(A&&(_=i(A.call(new e)),h!==Object.prototype&&_.next&&(f||i(_)===h||(a?a(_,h):"function"!=typeof _[g]&&u(_,g,m)),c(_,C,!0,!0),f&&(d[C]=m))),"values"==p&&k&&"values"!==k.name&&(N=!0,O=function(){return k.call(this)}),f&&!b||S[g]===O||u(S,g,O),d[t]=O,p)if(w={values:E("values"),keys:y?O:E("keys"),entries:E("entries")},b)for(x in w)(v||N||!(x in S))&&s(S,x,w[x]);else r({target:t,proto:!0,forced:v||N},w);return w}},function(e,t,n){"use strict";var r=n(1);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(e,t,n){"use strict";var r=n(8),o=n(101),i=n(17),a=Math.ceil,c=function(e){return function(t,n,c){var u,s,l=String(i(t)),f=l.length,d=c===undefined?" ":String(c),p=r(n);return p<=f||""==d?l:(u=p-f,(s=o.call(d,a(u/d.length))).length>u&&(s=s.slice(0,u)),e?l+s:s+l)}};e.exports={start:c(!1),end:c(!0)}},function(e,t,n){"use strict";var r=n(26),o=n(17);e.exports="".repeat||function(e){var t=String(o(this)),n="",i=r(e);if(i<0||i==Infinity)throw RangeError("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n}},function(e,t,n){"use strict";e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){"use strict";var r,o,i,a=n(3),c=n(1),u=n(28),s=n(46),l=n(130),f=n(84),d=n(149),p=a.location,h=a.setImmediate,v=a.clearImmediate,g=a.process,m=a.MessageChannel,y=a.Dispatch,b=0,_={},w=function(e){if(_.hasOwnProperty(e)){var t=_[e];delete _[e],t()}},x=function(e){return function(){w(e)}},E=function(e){w(e.data)},C=function(e){a.postMessage(e+"",p.protocol+"//"+p.host)};h&&v||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return _[++b]=function(){("function"==typeof e?e:Function(e)).apply(undefined,t)},r(b),b},v=function(e){delete _[e]},"process"==u(g)?r=function(e){g.nextTick(x(e))}:y&&y.now?r=function(e){y.now(x(e))}:m&&!d?(i=(o=new m).port2,o.port1.onmessage=E,r=s(i.postMessage,i,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||c(C)||"file:"===p.protocol?r="onreadystatechange"in f("script")?function(e){l.appendChild(f("script")).onreadystatechange=function(){l.removeChild(this),w(e)}}:function(e){setTimeout(x(e),0)}:(r=C,a.addEventListener("message",E,!1))),e.exports={set:h,clear:v}},function(e,t,n){"use strict";var r=n(4),o=n(28),i=n(10)("match");e.exports=function(e){var t;return r(e)&&((t=e[i])!==undefined?!!t:"RegExp"==o(e))}},function(e,t,n){"use strict";var r=n(1);function o(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r((function(){var e=o("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=r((function(){var e=o("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},function(e,t,n){"use strict";var r=n(26),o=n(17),i=function(e){return function(t,n){var i,a,c=String(o(t)),u=r(n),s=c.length;return u<0||u>=s?e?"":undefined:(i=c.charCodeAt(u))<55296||i>56319||u+1===s||(a=c.charCodeAt(u+1))<56320||a>57343?e?c.charAt(u):i:e?c.slice(u,u+2):a-56320+(i-55296<<10)+65536}};e.exports={codeAt:i(!1),charAt:i(!0)}},function(e,t,n){"use strict";var r=n(104);e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){"use strict";var r=n(10)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(o){}}return!1}},function(e,t,n){"use strict";var r=n(106).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){"use strict";var r=n(1),o=n(78);e.exports=function(e){return r((function(){return!!o[e]()||"\u200b\x85\u180e"!="\u200b\x85\u180e"[e]()||o[e].name!==e}))}},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(72),a=n(7).NATIVE_ARRAY_BUFFER_VIEWS,c=r.ArrayBuffer,u=r.Int8Array;e.exports=!a||!o((function(){u(1)}))||!o((function(){new u(-1)}))||!i((function(e){new u,new u(null),new u(1.5),new u(e)}),!0)||o((function(){return 1!==new u(new c(2),1,undefined).length}))},function(e,t,n){"use strict";t.__esModule=!0,t.getGasColor=t.getGasLabel=t.RADIO_CHANNELS=t.CSS_COLORS=t.COLORS=t.UI_CLOSE=t.UI_DISABLED=t.UI_UPDATE=t.UI_INTERACTIVE=void 0;t.UI_INTERACTIVE=2;t.UI_UPDATE=1;t.UI_DISABLED=0;t.UI_CLOSE=-1;t.COLORS={department:{captain:"#c06616",security:"#e74c3c",medbay:"#3498db",science:"#9b59b6",engineering:"#f1c40f",cargo:"#f39c12",centcom:"#00c100",other:"#c38312"},damageType:{oxy:"#3498db",toxin:"#2ecc71",burn:"#e67e22",brute:"#e74c3c"}};t.CSS_COLORS=["black","white","red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","good","average","bad","label"];t.RADIO_CHANNELS=[{name:"Syndicate",freq:1213,color:"#a52a2a"},{name:"Red Team",freq:1215,color:"#ff4444"},{name:"Blue Team",freq:1217,color:"#3434fd"},{name:"CentCom",freq:1337,color:"#2681a5"},{name:"Supply",freq:1347,color:"#b88646"},{name:"Service",freq:1349,color:"#6ca729"},{name:"Science",freq:1351,color:"#c68cfa"},{name:"Command",freq:1353,color:"#5177ff"},{name:"Medical",freq:1355,color:"#57b8f0"},{name:"Engineering",freq:1357,color:"#f37746"},{name:"Security",freq:1359,color:"#dd3535"},{name:"AI Private",freq:1447,color:"#d65d95"},{name:"Common",freq:1459,color:"#1ecc43"}];var r=[{id:"o2",name:"Oxygen",label:"O\u2082",color:"blue"},{id:"n2",name:"Nitrogen",label:"N\u2082",color:"red"},{id:"co2",name:"Carbon Dioxide",label:"CO\u2082",color:"grey"},{id:"plasma",name:"Plasma",label:"Plasma",color:"pink"},{id:"water_vapor",name:"Water Vapor",label:"H\u2082O",color:"grey"},{id:"nob",name:"Hyper-noblium",label:"Hyper-nob",color:"teal"},{id:"n2o",name:"Nitrous Oxide",label:"N\u2082O",color:"red"},{id:"no2",name:"Nitryl",label:"NO\u2082",color:"brown"},{id:"tritium",name:"Tritium",label:"Tritium",color:"green"},{id:"bz",name:"BZ",label:"BZ",color:"purple"},{id:"stim",name:"Stimulum",label:"Stimulum",color:"purple"},{id:"pluox",name:"Pluoxium",label:"Pluoxium",color:"blue"},{id:"miasma",name:"Miasma",label:"Miasma",color:"olive"},{id:"hydrogen",name:"Hydrogen",label:"H\u2082",color:"white"}];t.getGasLabel=function(e,t){var n=String(e).toLowerCase(),o=r.find((function(e){return e.id===n||e.name.toLowerCase()===n}));return o&&o.label||t||e};t.getGasColor=function(e){var t=String(e).toLowerCase(),n=r.find((function(e){return e.id===t||e.name.toLowerCase()===t}));return n&&n.color}},function(e,t,n){"use strict";t.__esModule=!0,t.zipWith=t.zip=t.uniqBy=t.reduce=t.sortBy=t.map=t.filter=t.toKeyedArray=t.toArray=void 0;t.toArray=function(e){if(Array.isArray(e))return e;if("object"==typeof e){var t=Object.prototype.hasOwnProperty,n=[];for(var r in e)t.call(e,r)&&n.push(e[r]);return n}return[]};t.toKeyedArray=function(e,t){return void 0===t&&(t="key"),r((function(e,n){var r;return Object.assign(((r={})[t]=n,r),e)}))(e)};t.filter=function(e){return function(t){if(null===t&&t===undefined)return t;if(Array.isArray(t)){for(var n=[],r=0;rc)return 1}return 0};t.sortBy=function(){for(var e=arguments.length,t=new Array(e),n=0;n=48&&r<=90?String.fromCharCode(r):"["+r+"]"},s=function(e){var t=window.event?e.which:e.keyCode,n=e.ctrlKey,r=e.altKey,o=e.shiftKey;return{keyCode:t,ctrlKey:n,altKey:r,shiftKey:o,hasModifierKeys:n||r||o,keyString:u(n,r,o,t)}},l=function(){for(var e=0,t=Object.keys(c);e=0||(o[n]=e[n]);return o}var h=(0,u.createLogger)("Button"),v=function(e){var t=e.className,n=e.fluid,u=e.icon,d=e.color,v=e.disabled,g=e.selected,m=e.tooltip,y=e.tooltipPosition,b=e.ellipsis,_=e.content,w=e.iconRotation,x=e.iconSpin,E=e.children,C=e.onclick,N=e.onClick,S=p(e,["className","fluid","icon","color","disabled","selected","tooltip","tooltipPosition","ellipsis","content","iconRotation","iconSpin","children","onclick","onClick"]),k=!(!_&&!E);return C&&h.warn("Lowercase 'onclick' is not supported on Button and lowercase prop names are discouraged in general. Please use a camelCase'onClick' instead and read: https://infernojs.org/docs/guides/event-handling"),(0,r.normalizeProps)((0,r.createComponentVNode)(2,s.Box,Object.assign({className:(0,o.classes)(["Button",n&&"Button--fluid",v&&"Button--disabled",g&&"Button--selected",k&&"Button--hasContent",b&&"Button--ellipsis",d&&"string"==typeof d?"Button--color--"+d:"Button--color--default",t]),tabIndex:!v&&"0",unselectable:i.IS_IE8,onclick:function(e){(0,c.refocusLayout)(),!v&&N&&N(e)},onKeyDown:function(e){var t=window.event?e.which:e.keyCode;return t===a.KEY_SPACE||t===a.KEY_ENTER?(e.preventDefault(),void(!v&&N&&N(e))):t===a.KEY_ESCAPE?(e.preventDefault(),void(0,c.refocusLayout)()):void 0}},S,{children:[u&&(0,r.createComponentVNode)(2,l.Icon,{name:u,rotation:w,spin:x}),_,E,m&&(0,r.createComponentVNode)(2,f.Tooltip,{content:m,position:y})]})))};t.Button=v,v.defaultHooks=o.pureComponentHooks;var g=function(e){var t=e.checked,n=p(e,["checked"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,v,Object.assign({color:"transparent",icon:t?"check-square-o":"square-o",selected:t},n)))};t.ButtonCheckbox=g,v.Checkbox=g;var m=function(e){function t(){var t;return(t=e.call(this)||this).state={clickedOnce:!1},t.handleClick=function(){t.state.clickedOnce&&t.setClickedOnce(!1)},t}d(t,e);var n=t.prototype;return n.setClickedOnce=function(e){var t=this;this.setState({clickedOnce:e}),e?setTimeout((function(){return window.addEventListener("click",t.handleClick)})):window.removeEventListener("click",this.handleClick)},n.render=function(){var e=this,t=this.props,n=t.confirmContent,o=void 0===n?"Confirm?":n,i=t.confirmColor,a=void 0===i?"bad":i,c=t.confirmIcon,u=t.icon,s=t.color,l=t.content,f=t.onClick,d=p(t,["confirmContent","confirmColor","confirmIcon","icon","color","content","onClick"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,v,Object.assign({content:this.state.clickedOnce?o:l,icon:this.state.clickedOnce?c:u,color:this.state.clickedOnce?a:s,onClick:function(){return e.state.clickedOnce?f():e.setClickedOnce(!0)}},d)))},t}(r.Component);t.ButtonConfirm=m,v.Confirm=m;var y=function(e){function t(){var t;return(t=e.call(this)||this).inputRef=(0,r.createRef)(),t.state={inInput:!1},t}d(t,e);var n=t.prototype;return n.setInInput=function(e){if(this.setState({inInput:e}),this.inputRef){var t=this.inputRef.current;if(e){t.value=this.props.currentValue||"";try{t.focus(),t.select()}catch(n){}}}},n.commitResult=function(e){if(this.inputRef){var t=this.inputRef.current;if(""!==t.value)return void this.props.onCommit(e,t.value);if(!this.props.defaultValue)return;this.props.onCommit(e,this.props.defaultValue)}},n.render=function(){var e=this,t=this.props,n=t.fluid,i=t.content,c=t.icon,u=t.iconRotation,d=t.iconSpin,h=t.tooltip,v=t.tooltipPosition,g=t.color,m=void 0===g?"default":g,y=(t.placeholder,t.maxLength,p(t,["fluid","content","icon","iconRotation","iconSpin","tooltip","tooltipPosition","color","placeholder","maxLength"]));return(0,r.normalizeProps)((0,r.createComponentVNode)(2,s.Box,Object.assign({className:(0,o.classes)(["Button",n&&"Button--fluid","Button--color--"+m])},y,{onClick:function(){return e.setInInput(!0)},children:[c&&(0,r.createComponentVNode)(2,l.Icon,{name:c,rotation:u,spin:d}),(0,r.createVNode)(1,"div",null,i,0),(0,r.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:this.state.inInput?undefined:"none","text-align":"left"},onBlur:function(t){e.state.inInput&&(e.setInInput(!1),e.commitResult(t))},onKeyDown:function(t){if(t.keyCode===a.KEY_ENTER)return e.setInInput(!1),void e.commitResult(t);t.keyCode===a.KEY_ESCAPE&&e.setInInput(!1)}},null,this.inputRef),h&&(0,r.createComponentVNode)(2,f.Tooltip,{content:h,position:v})]})))},t}(r.Component);t.ButtonInput=y,v.Input=y},function(e,t,n){"use strict";t.__esModule=!0,t.Icon=void 0;var r=n(2),o=n(9),i=n(13);var a=/-o$/,c=function(e){var t=e.name,n=e.size,c=e.spin,u=e.className,s=e.style,l=void 0===s?{}:s,f=e.rotation,d=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["name","size","spin","className","style","rotation"]);n&&(l["font-size"]=100*n+"%"),"number"==typeof f&&(l.transform="rotate("+f+"deg)");var p=a.test(t),h=t.replace(a,"");return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({as:"i",className:(0,o.classes)([u,p?"far":"fas","fa-"+h,c&&"fa-spin"]),style:l},d)))};t.Icon=c,c.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.TableCell=t.TableRow=t.Table=void 0;var r=n(2),o=n(9),i=n(13);function a(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var c=function(e){var t=e.className,n=e.collapsing,c=e.children,u=a(e,["className","collapsing","children"]);return(0,r.normalizeProps)((0,r.createVNode)(1,"table",(0,o.classes)(["Table",n&&"Table--collapsing",t,(0,i.computeBoxClassName)(u)]),(0,r.createVNode)(1,"tbody",null,c,0),2,Object.assign({},(0,i.computeBoxProps)(u))))};t.Table=c,c.defaultHooks=o.pureComponentHooks;var u=function(e){var t=e.className,n=e.header,c=a(e,["className","header"]);return(0,r.normalizeProps)((0,r.createVNode)(1,"tr",(0,o.classes)(["Table__row",n&&"Table__row--header",t,(0,i.computeBoxClassName)(e)]),null,1,Object.assign({},(0,i.computeBoxProps)(c))))};t.TableRow=u,u.defaultHooks=o.pureComponentHooks;var s=function(e){var t=e.className,n=e.collapsing,c=e.header,u=a(e,["className","collapsing","header"]);return(0,r.normalizeProps)((0,r.createVNode)(1,"td",(0,o.classes)(["Table__cell",n&&"Table__cell--collapsing",c&&"Table__cell--header",t,(0,i.computeBoxClassName)(e)]),null,1,Object.assign({},(0,i.computeBoxProps)(u))))};t.TableCell=s,s.defaultHooks=o.pureComponentHooks,c.Row=u,c.Cell=s},function(e,t,n){"use strict";t.__esModule=!0,t.NumberInput=void 0;var r=n(2),o=n(55),i=n(9),a=n(20),c=n(116),u=n(13);var s=function(e){var t,n;function s(t){var n;n=e.call(this,t)||this;var i=t.value;return n.inputRef=(0,r.createRef)(),n.state={value:i,dragging:!1,editing:!1,internalValue:null,origin:null,suppressingFlicker:!1},n.flickerTimer=null,n.suppressFlicker=function(){var e=n.props.suppressFlicker;e>0&&(n.setState({suppressingFlicker:!0}),clearTimeout(n.flickerTimer),n.flickerTimer=setTimeout((function(){return n.setState({suppressingFlicker:!1})}),e))},n.handleDragStart=function(e){var t=n.props.value;n.state.editing||(document.body.style["pointer-events"]="none",n.ref=e.target,n.setState({dragging:!1,origin:e.screenY,value:t,internalValue:t}),n.timer=setTimeout((function(){n.setState({dragging:!0})}),250),n.dragInterval=setInterval((function(){var t=n.state,r=t.dragging,o=t.value,i=n.props.onDrag;r&&i&&i(e,o)}),500),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd))},n.handleDragMove=function(e){var t=n.props,r=t.minValue,i=t.maxValue,a=t.step,c=t.stepPixelSize;n.setState((function(t){var n=Object.assign({},t),u=n.origin-e.screenY;if(t.dragging){var s=Number.isFinite(r)?r%a:0;n.internalValue=(0,o.clamp)(n.internalValue+u*a/c,r-a,i+a),n.value=(0,o.clamp)(n.internalValue-n.internalValue%a+s,r,i),n.origin=e.screenY}else Math.abs(u)>4&&(n.dragging=!0);return n}))},n.handleDragEnd=function(e){var t=n.props,r=t.onChange,o=t.onDrag,i=n.state,a=i.dragging,c=i.value,u=i.internalValue;if(document.body.style["pointer-events"]="auto",clearTimeout(n.timer),clearInterval(n.dragInterval),n.setState({dragging:!1,editing:!a,origin:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),a)n.suppressFlicker(),r&&r(e,c),o&&o(e,c);else if(n.inputRef){var s=n.inputRef.current;s.value=u;try{s.focus(),s.select()}catch(l){}}},n}return n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,s.prototype.render=function(){var e=this,t=this.state,n=t.dragging,s=t.editing,l=t.value,f=t.suppressingFlicker,d=this.props,p=d.className,h=d.fluid,v=d.animated,g=d.value,m=d.unit,y=d.minValue,b=d.maxValue,_=d.height,w=d.width,x=d.lineHeight,E=d.fontSize,C=d.format,N=d.onChange,S=d.onDrag,k=g;(n||f)&&(k=l);var O=function(e){return(0,r.createVNode)(1,"div","NumberInput__content",e+(m?" "+m:""),0,{unselectable:a.IS_IE8})},A=v&&!n&&!f&&(0,r.createComponentVNode)(2,c.AnimatedNumber,{value:k,format:C,children:O})||O(C?C(k):k);return(0,r.createComponentVNode)(2,u.Box,{className:(0,i.classes)(["NumberInput",h&&"NumberInput--fluid",p]),minWidth:w,minHeight:_,lineHeight:x,fontSize:E,onMouseDown:this.handleDragStart,children:[(0,r.createVNode)(1,"div","NumberInput__barContainer",(0,r.createVNode)(1,"div","NumberInput__bar",null,1,{style:{height:(0,o.clamp)((k-y)/(b-y)*100,0,100)+"%"}}),2),A,(0,r.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:s?undefined:"none",height:_,"line-height":x,"font-size":E},onBlur:function(t){if(s){var n=(0,o.clamp)(t.target.value,y,b);e.setState({editing:!1,value:n}),e.suppressFlicker(),N&&N(t,n),S&&S(t,n)}},onKeyDown:function(t){if(13===t.keyCode){var n=(0,o.clamp)(t.target.value,y,b);return e.setState({editing:!1,value:n}),e.suppressFlicker(),N&&N(t,n),void(S&&S(t,n))}27!==t.keyCode||e.setState({editing:!1})}},null,this.inputRef)]})},s}(r.Component);t.NumberInput=s,s.defaultHooks=i.pureComponentHooks,s.defaultProps={minValue:-Infinity,maxValue:+Infinity,step:1,stepPixelSize:1,suppressFlicker:50}},function(e,t,n){"use strict";var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(o){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,n){"use strict";var r=n(5),o=n(1),i=n(84);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){"use strict";var r=n(3),o=n(85),i=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=i},function(e,t,n){"use strict";var r=n(3),o=n(86),i=r.WeakMap;e.exports="function"==typeof i&&/native code/.test(o(i))},function(e,t,n){"use strict";var r=n(14),o=n(88),i=n(16),a=n(11);e.exports=function(e,t){for(var n=o(t),c=a.f,u=i.f,s=0;su;)r(c,n=t[u++])&&(~i(s,n)||s.push(n));return s}},function(e,t,n){"use strict";var r=n(91);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){"use strict";var r=n(5),o=n(11),i=n(6),a=n(61);e.exports=r?Object.defineProperties:function(e,t){i(e);for(var n,r=a(t),c=r.length,u=0;c>u;)o.f(e,n=r[u++],t[n]);return e}},function(e,t,n){"use strict";var r=n(33);e.exports=r("document","documentElement")},function(e,t,n){"use strict";var r=n(21),o=n(45).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?function(e){try{return o(e)}catch(t){return a.slice()}}(e):o(r(e))}},function(e,t,n){"use strict";var r=n(10);t.f=r},function(e,t,n){"use strict";var r=n(12),o=n(39),i=n(8),a=Math.min;e.exports=[].copyWithin||function(e,t){var n=r(this),c=i(n.length),u=o(e,c),s=o(t,c),l=arguments.length>2?arguments[2]:undefined,f=a((l===undefined?c:o(l,c))-s,c-u),d=1;for(s0;)s in n?n[u]=n[s]:delete n[u],u+=d,s+=d;return n}},function(e,t,n){"use strict";var r=n(50),o=n(8),i=n(46);e.exports=function a(e,t,n,c,u,s,l,f){for(var d,p=u,h=0,v=!!l&&i(l,f,3);h0&&r(d))p=a(e,t,d,o(d.length),p,s-1)-1;else{if(p>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[p]=d}p++}h++}return p}},function(e,t,n){"use strict";var r=n(6);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(a){var i=e["return"];throw i!==undefined&&r(i.call(e)),a}}},function(e,t,n){"use strict";var r=n(21),o=n(42),i=n(64),a=n(30),c=n(97),u=a.set,s=a.getterFor("Array Iterator");e.exports=c(Array,"Array",(function(e,t){u(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=s(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=undefined,{value:undefined,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(e,t,n){"use strict";var r,o,i,a=n(31),c=n(25),u=n(14),s=n(10),l=n(34),f=s("iterator"),d=!1;[].keys&&("next"in(i=[].keys())?(o=a(a(i)))!==Object.prototype&&(r=o):d=!0),r==undefined&&(r={}),l||u(r,f)||c(r,f,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},function(e,t,n){"use strict";var r=n(4);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";var r=n(21),o=n(26),i=n(8),a=n(35),c=n(19),u=Math.min,s=[].lastIndexOf,l=!!s&&1/[1].lastIndexOf(1,-0)<0,f=a("lastIndexOf"),d=c("indexOf",{ACCESSORS:!0,1:0}),p=l||!f||!d;e.exports=p?function(e){if(l)return s.apply(this,arguments)||0;var t=r(this),n=i(t.length),a=n-1;for(arguments.length>1&&(a=u(a,o(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:s},function(e,t,n){"use strict";var r=n(26),o=n(8);e.exports=function(e){if(e===undefined)return 0;var t=r(e),n=o(t);if(t!==n)throw RangeError("Wrong length or index");return n}},function(e,t,n){"use strict";var r=n(27),o=n(4),i=[].slice,a={},c=function(e,t,n){if(!(t in a)){for(var r=[],o=0;o1?arguments[1]:undefined,3);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!m(this,e)}}),i(l.prototype,n?{get:function(e){var t=m(this,e);return t&&t.value},set:function(e,t){return g(this,0===e?0:e,t)}}:{add:function(e){return g(this,e=0===e?0:e,e)}}),f&&r(l.prototype,"size",{get:function(){return p(this).size}}),l},setStrong:function(e,t,n){var r=t+" Iterator",o=v(t),i=v(r);s(e,t,(function(e,t){h(this,{type:r,target:e,state:o(e),kind:t,last:undefined})}),(function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=undefined,{value:undefined,done:!0})}),n?"entries":"values",!n,!0),l(t)}}},function(e,t,n){"use strict";var r=Math.log;e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:r(1+e)}},function(e,t,n){"use strict";var r=n(4),o=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&o(e)===e}},function(e,t,n){"use strict";var r=n(3),o=n(53).trim,i=n(78),a=r.parseInt,c=/^[+-]?0[Xx]/,u=8!==a(i+"08")||22!==a(i+"0x16");e.exports=u?function(e,t){var n=o(String(e));return a(n,t>>>0||(c.test(n)?16:10))}:a},function(e,t,n){"use strict";var r=n(5),o=n(61),i=n(21),a=n(68).f,c=function(e){return function(t){for(var n,c=i(t),u=o(c),s=u.length,l=0,f=[];s>l;)n=u[l++],r&&!a.call(c,n)||f.push(e?[n,c[n]]:c[n]);return f}};e.exports={entries:c(!0),values:c(!1)}},function(e,t,n){"use strict";e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";var r=n(3);e.exports=r.Promise},function(e,t,n){"use strict";var r=n(70);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},function(e,t,n){"use strict";var r,o,i,a,c,u,s,l,f=n(3),d=n(16).f,p=n(28),h=n(103).set,v=n(149),g=f.MutationObserver||f.WebKitMutationObserver,m=f.process,y=f.Promise,b="process"==p(m),_=d(f,"queueMicrotask"),w=_&&_.value;w||(r=function(){var e,t;for(b&&(e=m.domain)&&e.exit();o;){t=o.fn,o=o.next;try{t()}catch(n){throw o?a():i=undefined,n}}i=undefined,e&&e.enter()},b?a=function(){m.nextTick(r)}:g&&!v?(c=!0,u=document.createTextNode(""),new g(r).observe(u,{characterData:!0}),a=function(){u.data=c=!c}):y&&y.resolve?(s=y.resolve(undefined),l=s.then,a=function(){l.call(s,r)}):a=function(){h.call(f,r)}),e.exports=w||function(e){var t={fn:e,next:undefined};i&&(i.next=t),o||(o=t,a()),i=t}},function(e,t,n){"use strict";var r=n(6),o=n(4),i=n(152);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(27),o=function(e){var t,n;this.promise=new e((function(e,r){if(t!==undefined||n!==undefined)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new o(e)}},function(e,t,n){"use strict";var r=n(0),o=n(81);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(e,t,n){"use strict";var r=n(70);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r)},function(e,t,n){"use strict";var r=n(344);e.exports=function(e,t){var n=r(e);if(n%t)throw RangeError("Wrong offset");return n}},function(e,t,n){"use strict";var r=n(12),o=n(8),i=n(95),a=n(94),c=n(46),u=n(7).aTypedArrayConstructor;e.exports=function(e){var t,n,s,l,f,d,p=r(e),h=arguments.length,v=h>1?arguments[1]:undefined,g=v!==undefined,m=i(p);if(m!=undefined&&!a(m))for(d=(f=m.call(p)).next,p=[];!(l=d.call(f)).done;)p.push(l.value);for(g&&h>2&&(v=c(v,arguments[2],2)),n=o(p.length),s=new(u(this))(n),t=0;n>t;t++)s[t]=g?v(p[t],t):p[t];return s}},function(e,t,n){"use strict";var r=n(65),o=n(49).getWeakData,i=n(6),a=n(4),c=n(52),u=n(67),s=n(15),l=n(14),f=n(30),d=f.set,p=f.getterFor,h=s.find,v=s.findIndex,g=0,m=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},b=function(e,t){return h(e.entries,(function(e){return e[0]===t}))};y.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.entries.push([e,t])},"delete":function(e){var t=v(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,s){var f=e((function(e,r){c(e,f,t),d(e,{type:t,id:g++,frozen:undefined}),r!=undefined&&u(r,e[s],e,n)})),h=p(t),v=function(e,t,n){var r=h(e),a=o(i(t),!0);return!0===a?m(r).set(t,n):a[r.id]=n,e};return r(f.prototype,{"delete":function(e){var t=h(this);if(!a(e))return!1;var n=o(e);return!0===n?m(t)["delete"](e):n&&l(n,t.id)&&delete n[t.id]},has:function(e){var t=h(this);if(!a(e))return!1;var n=o(e);return!0===n?m(t).has(e):n&&l(n,t.id)}}),r(f.prototype,n?{get:function(e){var t=h(this);if(a(e)){var n=o(e);return!0===n?m(t).get(e):n?n[t.id]:undefined}},set:function(e,t){return v(this,e,t)}}:{add:function(e){return v(this,e,!0)}}),f}}},function(e,t,n){"use strict";t.__esModule=!0,t.setupHotReloading=t.sendLogEntry=void 0;t.sendLogEntry=function(e,t){};t.setupHotReloading=function(){0}},function(e,t,n){"use strict";t.__esModule=!0,t.resizeStartHandler=t.dragStartHandler=t.setupDrag=void 0;var r=n(398),o=n(20);function i(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(s){return void n(s)}c.done?t(u):Promise.resolve(u).then(r,o)}var a,c,u,s,l,f=(0,n(54).createLogger)("drag"),d=!1,p=!1,h=[0,0],v=function(e){return(0,o.winget)(e,"pos").then((function(e){return[e.x,e.y]}))},g=function(e,t){return(0,o.winset)(e,"pos",t[0]+","+t[1])},m=function(){var e,t=(e=regeneratorRuntime.mark((function n(e){var t,r,o,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return f.log("setting up"),a=e.config.window,n.next=4,v(a);case 4:t=n.sent,h=[t[0]-window.screenLeft,t[1]-window.screenTop],r=y(t),o=r[0],i=r[1],o&&g(a,i),f.debug("current state",{ref:a,screenOffset:h});case 9:case"end":return n.stop()}}),n)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function c(e){i(a,r,o,c,u,"next",e)}function u(e){i(a,r,o,c,u,"throw",e)}c(undefined)}))});return function(e){return t.apply(this,arguments)}}();t.setupDrag=m;var y=function(e){var t=e[0],n=e[1],r=!1;return t<0?(t=0,r=!0):t+window.innerWidth>window.screen.availWidth&&(t=window.screen.availWidth-window.innerWidth,r=!0),n<0?(n=0,r=!0):n+window.innerHeight>window.screen.availHeight&&(n=window.screen.availHeight-window.innerHeight,r=!0),[r,[t,n]]};t.dragStartHandler=function(e){f.log("drag start"),d=!0,c=[window.screenLeft-e.screenX,window.screenTop-e.screenY],document.addEventListener("mousemove",_),document.addEventListener("mouseup",b),_(e)};var b=function E(e){f.log("drag end"),_(e),document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",E),d=!1},_=function(e){d&&(e.preventDefault(),g(a,(0,r.vecAdd)([e.screenX,e.screenY],h,c)))};t.resizeStartHandler=function(e,t){return function(n){u=[e,t],f.log("resize start",u),p=!0,c=[window.screenLeft-n.screenX,window.screenTop-n.screenY],s=[window.innerWidth,window.innerHeight],document.addEventListener("mousemove",x),document.addEventListener("mouseup",w),x(n)}};var w=function C(e){f.log("resize end",l),x(e),document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",C),p=!1},x=function(e){p&&(e.preventDefault(),(l=(0,r.vecAdd)(s,(0,r.vecMultiply)(u,(0,r.vecAdd)([e.screenX,e.screenY],(0,r.vecInverse)([window.screenLeft,window.screenTop]),c,[1,1]))))[0]=Math.max(l[0],250),l[1]=Math.max(l[1],120),function(e,t){(0,o.winset)(e,"size",t[0]+","+t[1])}(a,l))}},function(e,t,n){"use strict";function r(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?o-1:0),c=1;c1?r-1:0),i=1;i35;return(0,r.createVNode)(1,"div",(0,o.classes)(["Tooltip",a&&"Tooltip--long",i&&"Tooltip--"+i]),null,1,{"data-tooltip":t})}},function(e,t,n){"use strict";t.__esModule=!0,t.Dimmer=void 0;var r=n(2),o=n(9),i=n(13);t.Dimmer=function(e){var t=e.className,n=e.children,a=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","children"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["Dimmer"].concat(t))},a,{children:(0,r.createVNode)(1,"div","Dimmer__inner",n,0)})))}},function(e,t,n){"use strict";t.__esModule=!0,t.Divider=void 0;var r=n(2),o=n(9);t.Divider=function(e){var t=e.vertical,n=e.hidden;return(0,r.createVNode)(1,"div",(0,o.classes)(["Divider",n&&"Divider--hidden",t?"Divider--vertical":"Divider--horizontal"]))}},function(e,t,n){"use strict";t.__esModule=!0,t.FlexItem=t.computeFlexItemProps=t.Flex=t.computeFlexProps=void 0;var r=n(2),o=n(9),i=n(20),a=n(13);function c(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var u=function(e){var t=e.className,n=e.direction,r=e.wrap,a=e.align,u=e.justify,s=e.inline,l=e.spacing,f=void 0===l?0:l,d=c(e,["className","direction","wrap","align","justify","inline","spacing"]);return Object.assign({className:(0,o.classes)(["Flex",i.IS_IE8&&("column"===n?"Flex--ie8--column":"Flex--ie8"),s&&"Flex--inline",f>0&&"Flex--spacing--"+f,t]),style:Object.assign({},d.style,{"flex-direction":n,"flex-wrap":r,"align-items":a,"justify-content":u})},d)};t.computeFlexProps=u;var s=function(e){return(0,r.normalizeProps)((0,r.createComponentVNode)(2,a.Box,Object.assign({},u(e))))};t.Flex=s,s.defaultHooks=o.pureComponentHooks;var l=function(e){var t=e.className,n=e.grow,r=e.order,u=e.shrink,s=e.basis,l=void 0===s?e.width:s,f=e.align,d=c(e,["className","grow","order","shrink","basis","align"]);return Object.assign({className:(0,o.classes)(["Flex__item",i.IS_IE8&&"Flex__item--ie8",t]),style:Object.assign({},d.style,{"flex-grow":n,"flex-shrink":u,"flex-basis":(0,a.unit)(l),order:r,"align-self":f})},d)};t.computeFlexItemProps=l;var f=function(e){return(0,r.normalizeProps)((0,r.createComponentVNode)(2,a.Box,Object.assign({},l(e))))};t.FlexItem=f,f.defaultHooks=o.pureComponentHooks,s.Item=f},function(e,t,n){"use strict";t.__esModule=!0,t.DraggableControl=void 0;var r=n(2),o=n(55),i=n(9),a=n(116);var c=function(e,t){return e.screenX*t[0]+e.screenY*t[1]},u=function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).inputRef=(0,r.createRef)(),n.state={value:t.value,dragging:!1,editing:!1,internalValue:null,origin:null,suppressingFlicker:!1},n.flickerTimer=null,n.suppressFlicker=function(){var e=n.props.suppressFlicker;e>0&&(n.setState({suppressingFlicker:!0}),clearTimeout(n.flickerTimer),n.flickerTimer=setTimeout((function(){return n.setState({suppressingFlicker:!1})}),e))},n.handleDragStart=function(e){var t=n.props,r=t.value,o=t.dragMatrix;n.state.editing||(document.body.style["pointer-events"]="none",n.ref=e.target,n.setState({dragging:!1,origin:c(e,o),value:r,internalValue:r}),n.timer=setTimeout((function(){n.setState({dragging:!0})}),250),n.dragInterval=setInterval((function(){var t=n.state,r=t.dragging,o=t.value,i=n.props.onDrag;r&&i&&i(e,o)}),500),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd))},n.handleDragMove=function(e){var t=n.props,r=t.minValue,i=t.maxValue,a=t.step,u=t.stepPixelSize,s=t.dragMatrix;n.setState((function(t){var n=Object.assign({},t),l=c(e,s)-n.origin;if(t.dragging){var f=Number.isFinite(r)?r%a:0;n.internalValue=(0,o.clamp)(n.internalValue+l*a/u,r-a,i+a),n.value=(0,o.clamp)(n.internalValue-n.internalValue%a+f,r,i),n.origin=c(e,s)}else Math.abs(l)>4&&(n.dragging=!0);return n}))},n.handleDragEnd=function(e){var t=n.props,r=t.onChange,o=t.onDrag,i=n.state,a=i.dragging,c=i.value,u=i.internalValue;if(document.body.style["pointer-events"]="auto",clearTimeout(n.timer),clearInterval(n.dragInterval),n.setState({dragging:!1,editing:!a,origin:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),a)n.suppressFlicker(),r&&r(e,c),o&&o(e,c);else if(n.inputRef){var s=n.inputRef.current;s.value=u;try{s.focus(),s.select()}catch(l){}}},n}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.prototype.render=function(){var e=this,t=this.state,n=t.dragging,i=t.editing,c=t.value,u=t.suppressingFlicker,s=this.props,l=s.animated,f=s.value,d=s.unit,p=s.minValue,h=s.maxValue,v=s.format,g=s.onChange,m=s.onDrag,y=s.children,b=s.height,_=s.lineHeight,w=s.fontSize,x=f;(n||u)&&(x=c);var E=function(e){return e+(d?" "+d:"")},C=l&&!n&&!u&&(0,r.createComponentVNode)(2,a.AnimatedNumber,{value:x,format:v,children:E})||E(v?v(x):x),N=(0,r.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:i?undefined:"none",height:b,"line-height":_,"font-size":w},onBlur:function(t){if(i){var n=(0,o.clamp)(t.target.value,p,h);e.setState({editing:!1,value:n}),e.suppressFlicker(),g&&g(t,n),m&&m(t,n)}},onKeyDown:function(t){if(13===t.keyCode){var n=(0,o.clamp)(t.target.value,p,h);return e.setState({editing:!1,value:n}),e.suppressFlicker(),g&&g(t,n),void(m&&m(t,n))}27!==t.keyCode||e.setState({editing:!1})}},null,this.inputRef);return y({dragging:n,editing:i,value:f,displayValue:x,displayElement:C,inputElement:N,handleDragStart:this.handleDragStart})},i}(r.Component);t.DraggableControl=u,u.defaultHooks=i.pureComponentHooks,u.defaultProps={minValue:-Infinity,maxValue:+Infinity,step:1,stepPixelSize:1,suppressFlicker:50,dragMatrix:[1,0]}},function(e,t,n){"use strict";t.__esModule=!0,t.Window=void 0;var r=n(2),o=n(9),i=n(423),a=n(32),c=n(20),u=n(38),s=n(112),l=n(159),f=n(114),d=n(54),p=n(115);var h=(0,d.createLogger)("Window"),v=function(e){var t,n;function u(){return e.apply(this,arguments)||this}n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var d=u.prototype;return d.componentDidMount=function(){(0,p.refocusLayout)()},d.render=function(){var e=this.props,t=e.resizable,n=e.theme,u=e.children,d=(0,a.useBackend)(this.context),v=d.config,g=d.debugLayout,y=v.observer?v.statusi;)o.push(arguments[i++]);if(r=t,(p(t)||e!==undefined)&&!ie(e))return d(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!ie(t))return t}),o[1]=t,W.apply(null,o)}});Y.prototype[D]||k(Y.prototype,D,Y.prototype.valueOf),j(Y,"Symbol"),V[R]=!0},function(e,t,n){"use strict";var r=n(0),o=n(5),i=n(3),a=n(14),c=n(4),u=n(11).f,s=n(125),l=i.Symbol;if(o&&"function"==typeof l&&(!("description"in l.prototype)||l().description!==undefined)){var f={},d=function(){var e=arguments.length<1||arguments[0]===undefined?undefined:String(arguments[0]),t=this instanceof d?new l(e):e===undefined?l():l(e);return""===e&&(f[t]=!0),t};s(d,l);var p=d.prototype=l.prototype;p.constructor=d;var h=p.toString,v="Symbol(test)"==String(l("test")),g=/^Symbol\((.*)\)[^)]+$/;u(p,"description",{configurable:!0,get:function(){var e=c(this)?this.valueOf():this,t=h.call(e);if(a(f,e))return"";var n=v?t.slice(7,-1):t.replace(g,"$1");return""===n?undefined:n}}),r({global:!0,forced:!0},{Symbol:d})}},function(e,t,n){"use strict";n(22)("asyncIterator")},function(e,t,n){"use strict";n(22)("hasInstance")},function(e,t,n){"use strict";n(22)("isConcatSpreadable")},function(e,t,n){"use strict";n(22)("iterator")},function(e,t,n){"use strict";n(22)("match")},function(e,t,n){"use strict";n(22)("replace")},function(e,t,n){"use strict";n(22)("search")},function(e,t,n){"use strict";n(22)("species")},function(e,t,n){"use strict";n(22)("split")},function(e,t,n){"use strict";n(22)("toPrimitive")},function(e,t,n){"use strict";n(22)("toStringTag")},function(e,t,n){"use strict";n(22)("unscopables")},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(50),a=n(4),c=n(12),u=n(8),s=n(47),l=n(62),f=n(63),d=n(10),p=n(92),h=d("isConcatSpreadable"),v=p>=51||!o((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),g=f("concat"),m=function(e){if(!a(e))return!1;var t=e[h];return t!==undefined?!!t:i(e)};r({target:"Array",proto:!0,forced:!v||!g},{concat:function(e){var t,n,r,o,i,a=c(this),f=l(a,0),d=0;for(t=-1,r=arguments.length;t9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw TypeError("Maximum allowed index exceeded");s(f,d++,i)}return f.length=d,f}})},function(e,t,n){"use strict";var r=n(0),o=n(133),i=n(42);r({target:"Array",proto:!0},{copyWithin:o}),i("copyWithin")},function(e,t,n){"use strict";var r=n(0),o=n(15).every,i=n(35),a=n(19),c=i("every"),u=a("every");r({target:"Array",proto:!0,forced:!c||!u},{every:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var r=n(0),o=n(93),i=n(42);r({target:"Array",proto:!0},{fill:o}),i("fill")},function(e,t,n){"use strict";var r=n(0),o=n(15).filter,i=n(63),a=n(19),c=i("filter"),u=a("filter");r({target:"Array",proto:!0,forced:!c||!u},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var r=n(0),o=n(15).find,i=n(42),a=n(19),c=!0,u=a("find");"find"in[]&&Array(1).find((function(){c=!1})),r({target:"Array",proto:!0,forced:c||!u},{find:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}}),i("find")},function(e,t,n){"use strict";var r=n(0),o=n(15).findIndex,i=n(42),a=n(19),c=!0,u=a("findIndex");"findIndex"in[]&&Array(1).findIndex((function(){c=!1})),r({target:"Array",proto:!0,forced:c||!u},{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}}),i("findIndex")},function(e,t,n){"use strict";var r=n(0),o=n(134),i=n(12),a=n(8),c=n(26),u=n(62);r({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:undefined,t=i(this),n=a(t.length),r=u(t,0);return r.length=o(r,t,t,n,0,e===undefined?1:c(e)),r}})},function(e,t,n){"use strict";var r=n(0),o=n(134),i=n(12),a=n(8),c=n(27),u=n(62);r({target:"Array",proto:!0},{flatMap:function(e){var t,n=i(this),r=a(n.length);return c(e),(t=u(n,0)).length=o(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:undefined),t}})},function(e,t,n){"use strict";var r=n(0),o=n(194);r({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},function(e,t,n){"use strict";var r=n(15).forEach,o=n(35),i=n(19),a=o("forEach"),c=i("forEach");e.exports=a&&c?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}},function(e,t,n){"use strict";var r=n(0),o=n(196);r({target:"Array",stat:!0,forced:!n(72)((function(e){Array.from(e)}))},{from:o})},function(e,t,n){"use strict";var r=n(46),o=n(12),i=n(135),a=n(94),c=n(8),u=n(47),s=n(95);e.exports=function(e){var t,n,l,f,d,p,h=o(e),v="function"==typeof this?this:Array,g=arguments.length,m=g>1?arguments[1]:undefined,y=m!==undefined,b=s(h),_=0;if(y&&(m=r(m,g>2?arguments[2]:undefined,2)),b==undefined||v==Array&&a(b))for(n=new v(t=c(h.length));t>_;_++)p=y?m(h[_],_):h[_],u(n,_,p);else for(d=(f=b.call(h)).next,n=new v;!(l=d.call(f)).done;_++)p=y?i(f,m,[l.value,_],!0):l.value,u(n,_,p);return n.length=_,n}},function(e,t,n){"use strict";var r=n(0),o=n(59).includes,i=n(42);r({target:"Array",proto:!0,forced:!n(19)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}}),i("includes")},function(e,t,n){"use strict";var r=n(0),o=n(59).indexOf,i=n(35),a=n(19),c=[].indexOf,u=!!c&&1/[1].indexOf(1,-0)<0,s=i("indexOf"),l=a("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:u||!s||!l},{indexOf:function(e){return u?c.apply(this,arguments)||0:o(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";n(0)({target:"Array",stat:!0},{isArray:n(50)})},function(e,t,n){"use strict";var r=n(137).IteratorPrototype,o=n(40),i=n(44),a=n(41),c=n(64),u=function(){return this};e.exports=function(e,t,n){var s=t+" Iterator";return e.prototype=o(r,{next:i(1,n)}),a(e,s,!1,!0),c[s]=u,e}},function(e,t,n){"use strict";var r=n(0),o=n(56),i=n(21),a=n(35),c=[].join,u=o!=Object,s=a("join",",");r({target:"Array",proto:!0,forced:u||!s},{join:function(e){return c.call(i(this),e===undefined?",":e)}})},function(e,t,n){"use strict";var r=n(0),o=n(139);r({target:"Array",proto:!0,forced:o!==[].lastIndexOf},{lastIndexOf:o})},function(e,t,n){"use strict";var r=n(0),o=n(15).map,i=n(63),a=n(19),c=i("map"),u=a("map");r({target:"Array",proto:!0,forced:!c||!u},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(47);r({target:"Array",stat:!0,forced:o((function(){function e(){}return!(Array.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(0),o=n(73).left,i=n(35),a=n(19),c=i("reduce"),u=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!c||!u},{reduce:function(e){return o(this,e,arguments.length,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var r=n(0),o=n(73).right,i=n(35),a=n(19),c=i("reduceRight"),u=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!c||!u},{reduceRight:function(e){return o(this,e,arguments.length,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var r=n(0),o=n(4),i=n(50),a=n(39),c=n(8),u=n(21),s=n(47),l=n(10),f=n(63),d=n(19),p=f("slice"),h=d("slice",{ACCESSORS:!0,0:0,1:2}),v=l("species"),g=[].slice,m=Math.max;r({target:"Array",proto:!0,forced:!p||!h},{slice:function(e,t){var n,r,l,f=u(this),d=c(f.length),p=a(e,d),h=a(t===undefined?d:t,d);if(i(f)&&("function"!=typeof(n=f.constructor)||n!==Array&&!i(n.prototype)?o(n)&&null===(n=n[v])&&(n=undefined):n=undefined,n===Array||n===undefined))return g.call(f,p,h);for(r=new(n===undefined?Array:n)(m(h-p,0)),l=0;p1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var r=n(0),o=n(27),i=n(12),a=n(1),c=n(35),u=[],s=u.sort,l=a((function(){u.sort(undefined)})),f=a((function(){u.sort(null)})),d=c("sort");r({target:"Array",proto:!0,forced:l||!f||!d},{sort:function(e){return e===undefined?s.call(i(this)):s.call(i(this),o(e))}})},function(e,t,n){"use strict";n(51)("Array")},function(e,t,n){"use strict";var r=n(0),o=n(39),i=n(26),a=n(8),c=n(12),u=n(62),s=n(47),l=n(63),f=n(19),d=l("splice"),p=f("splice",{ACCESSORS:!0,0:0,1:2}),h=Math.max,v=Math.min;r({target:"Array",proto:!0,forced:!d||!p},{splice:function(e,t){var n,r,l,f,d,p,g=c(this),m=a(g.length),y=o(e,m),b=arguments.length;if(0===b?n=r=0:1===b?(n=0,r=m-y):(n=b-2,r=v(h(i(t),0),m-y)),m+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(l=u(g,r),f=0;fm-r+n;f--)delete g[f-1]}else if(n>r)for(f=m-r;f>y;f--)p=f+n-1,(d=f+r-1)in g?g[p]=g[d]:delete g[p];for(f=0;f>1,v=23===t?o(2,-24)-o(2,-77):0,g=e<0||0===e&&1/e<0?1:0,m=0;for((e=r(e))!=e||e===1/0?(s=e!=e?1:0,u=p):(u=i(a(e)/c),e*(l=o(2,-u))<1&&(u--,l*=2),(e+=u+h>=1?v/l:v*o(2,1-h))*l>=2&&(u++,l/=2),u+h>=p?(s=0,u=p):u+h>=1?(s=(e*l-1)*o(2,t),u+=h):(s=e*o(2,h-1)*o(2,t),u=0));t>=8;f[m++]=255&s,s/=256,t-=8);for(u=u<0;f[m++]=255&u,u/=256,d-=8);return f[--m]|=128*g,f},unpack:function(e,t){var n,r=e.length,i=8*r-t-1,a=(1<>1,u=i-7,s=r-1,l=e[s--],f=127&l;for(l>>=7;u>0;f=256*f+e[s],s--,u-=8);for(n=f&(1<<-u)-1,f>>=-u,u+=t;u>0;n=256*n+e[s],s--,u-=8);if(0===f)f=1-c;else{if(f===a)return n?NaN:l?-1/0:1/0;n+=o(2,t),f-=c}return(l?-1:1)*n*o(2,f-t)}}},function(e,t,n){"use strict";var r=n(0),o=n(7);r({target:"ArrayBuffer",stat:!0,forced:!o.NATIVE_ARRAY_BUFFER_VIEWS},{isView:o.isView})},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(74),a=n(6),c=n(39),u=n(8),s=n(43),l=i.ArrayBuffer,f=i.DataView,d=l.prototype.slice;r({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:o((function(){return!new l(2).slice(1,undefined).byteLength}))},{slice:function(e,t){if(d!==undefined&&t===undefined)return d.call(a(this),e);for(var n=a(this).byteLength,r=c(e,n),o=c(t===undefined?n:t,n),i=new(s(this,l))(u(o-r)),p=new f(this),h=new f(i),v=0;r9999?"+":"";return n+o(i(e),n?6:4,0)+"-"+o(this.getUTCMonth()+1,2,0)+"-"+o(this.getUTCDate(),2,0)+"T"+o(this.getUTCHours(),2,0)+":"+o(this.getUTCMinutes(),2,0)+":"+o(this.getUTCSeconds(),2,0)+"."+o(t,3,0)+"Z"}:u},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(12),a=n(29);r({target:"Date",proto:!0,forced:o((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(e){var t=i(this),n=a(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){"use strict";var r=n(25),o=n(224),i=n(10)("toPrimitive"),a=Date.prototype;i in a||r(a,i,o)},function(e,t,n){"use strict";var r=n(6),o=n(29);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return o(r(this),"number"!==e)}},function(e,t,n){"use strict";var r=n(18),o=Date.prototype,i=o.toString,a=o.getTime;new Date(NaN)+""!="Invalid Date"&&r(o,"toString",(function(){var e=a.call(this);return e==e?i.call(this):"Invalid Date"}))},function(e,t,n){"use strict";n(0)({target:"Function",proto:!0},{bind:n(141)})},function(e,t,n){"use strict";var r=n(4),o=n(11),i=n(31),a=n(10)("hasInstance"),c=Function.prototype;a in c||o.f(c,a,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){"use strict";var r=n(5),o=n(11).f,i=Function.prototype,a=i.toString,c=/^\s*function ([^ (]*)/;r&&!("name"in i)&&o(i,"name",{configurable:!0,get:function(){try{return a.call(this).match(c)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(3);n(41)(r.JSON,"JSON",!0)},function(e,t,n){"use strict";var r=n(75),o=n(142);e.exports=r("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),o)},function(e,t,n){"use strict";var r=n(0),o=n(143),i=Math.acosh,a=Math.log,c=Math.sqrt,u=Math.LN2;r({target:"Math",stat:!0,forced:!i||710!=Math.floor(i(Number.MAX_VALUE))||i(Infinity)!=Infinity},{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?a(e)+u:o(e-1+c(e-1)*c(e+1))}})},function(e,t,n){"use strict";var r=n(0),o=Math.asinh,i=Math.log,a=Math.sqrt;r({target:"Math",stat:!0,forced:!(o&&1/o(0)>0)},{asinh:function c(e){return isFinite(e=+e)&&0!=e?e<0?-c(-e):i(e+a(e*e+1)):e}})},function(e,t,n){"use strict";var r=n(0),o=Math.atanh,i=Math.log;r({target:"Math",stat:!0,forced:!(o&&1/o(-0)<0)},{atanh:function(e){return 0==(e=+e)?e:i((1+e)/(1-e))/2}})},function(e,t,n){"use strict";var r=n(0),o=n(102),i=Math.abs,a=Math.pow;r({target:"Math",stat:!0},{cbrt:function(e){return o(e=+e)*a(i(e),1/3)}})},function(e,t,n){"use strict";var r=n(0),o=Math.floor,i=Math.log,a=Math.LOG2E;r({target:"Math",stat:!0},{clz32:function(e){return(e>>>=0)?31-o(i(e+.5)*a):32}})},function(e,t,n){"use strict";var r=n(0),o=n(77),i=Math.cosh,a=Math.abs,c=Math.E;r({target:"Math",stat:!0,forced:!i||i(710)===Infinity},{cosh:function(e){var t=o(a(e)-1)+1;return(t+1/(t*c*c))*(c/2)}})},function(e,t,n){"use strict";var r=n(0),o=n(77);r({target:"Math",stat:!0,forced:o!=Math.expm1},{expm1:o})},function(e,t,n){"use strict";n(0)({target:"Math",stat:!0},{fround:n(239)})},function(e,t,n){"use strict";var r=n(102),o=Math.abs,i=Math.pow,a=i(2,-52),c=i(2,-23),u=i(2,127)*(2-c),s=i(2,-126);e.exports=Math.fround||function(e){var t,n,i=o(e),l=r(e);return iu||n!=n?l*Infinity:l*n}},function(e,t,n){"use strict";var r=n(0),o=Math.hypot,i=Math.abs,a=Math.sqrt;r({target:"Math",stat:!0,forced:!!o&&o(Infinity,NaN)!==Infinity},{hypot:function(e,t){for(var n,r,o=0,c=0,u=arguments.length,s=0;c0?(r=n/s)*r:n;return s===Infinity?Infinity:s*a(o)}})},function(e,t,n){"use strict";var r=n(0),o=n(1),i=Math.imul;r({target:"Math",stat:!0,forced:o((function(){return-5!=i(4294967295,5)||2!=i.length}))},{imul:function(e,t){var n=+e,r=+t,o=65535&n,i=65535&r;return 0|o*i+((65535&n>>>16)*i+o*(65535&r>>>16)<<16>>>0)}})},function(e,t,n){"use strict";var r=n(0),o=Math.log,i=Math.LOG10E;r({target:"Math",stat:!0},{log10:function(e){return o(e)*i}})},function(e,t,n){"use strict";n(0)({target:"Math",stat:!0},{log1p:n(143)})},function(e,t,n){"use strict";var r=n(0),o=Math.log,i=Math.LN2;r({target:"Math",stat:!0},{log2:function(e){return o(e)/i}})},function(e,t,n){"use strict";n(0)({target:"Math",stat:!0},{sign:n(102)})},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(77),a=Math.abs,c=Math.exp,u=Math.E;r({target:"Math",stat:!0,forced:o((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(e){return a(e=+e)<1?(i(e)-i(-e))/2:(c(e-1)-c(-e-1))*(u/2)}})},function(e,t,n){"use strict";var r=n(0),o=n(77),i=Math.exp;r({target:"Math",stat:!0},{tanh:function(e){var t=o(e=+e),n=o(-e);return t==Infinity?1:n==Infinity?-1:(t-n)/(i(e)+i(-e))}})},function(e,t,n){"use strict";n(41)(Math,"Math",!0)},function(e,t,n){"use strict";var r=n(0),o=Math.ceil,i=Math.floor;r({target:"Math",stat:!0},{trunc:function(e){return(e>0?i:o)(e)}})},function(e,t,n){"use strict";var r=n(5),o=n(3),i=n(60),a=n(18),c=n(14),u=n(28),s=n(76),l=n(29),f=n(1),d=n(40),p=n(45).f,h=n(16).f,v=n(11).f,g=n(53).trim,m=o.Number,y=m.prototype,b="Number"==u(d(y)),_=function(e){var t,n,r,o,i,a,c,u,s=l(e,!1);if("string"==typeof s&&s.length>2)if(43===(t=(s=g(s)).charCodeAt(0))||45===t){if(88===(n=s.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(s.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+s}for(a=(i=s.slice(2)).length,c=0;co)return NaN;return parseInt(i,r)}return+s};if(i("Number",!m(" 0o1")||!m("0b1")||m("+0x1"))){for(var w,x=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof x&&(b?f((function(){y.valueOf.call(n)})):"Number"!=u(n))?s(new m(_(t)),n,x):_(t)},E=r?p(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),C=0;E.length>C;C++)c(m,w=E[C])&&!c(x,w)&&v(x,w,h(m,w));x.prototype=y,y.constructor=x,a(o,"Number",x)}},function(e,t,n){"use strict";n(0)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(e,t,n){"use strict";n(0)({target:"Number",stat:!0},{isFinite:n(253)})},function(e,t,n){"use strict";var r=n(3).isFinite;e.exports=Number.isFinite||function(e){return"number"==typeof e&&r(e)}},function(e,t,n){"use strict";n(0)({target:"Number",stat:!0},{isInteger:n(144)})},function(e,t,n){"use strict";n(0)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},function(e,t,n){"use strict";var r=n(0),o=n(144),i=Math.abs;r({target:"Number",stat:!0},{isSafeInteger:function(e){return o(e)&&i(e)<=9007199254740991}})},function(e,t,n){"use strict";n(0)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){"use strict";n(0)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){"use strict";var r=n(0),o=n(260);r({target:"Number",stat:!0,forced:Number.parseFloat!=o},{parseFloat:o})},function(e,t,n){"use strict";var r=n(3),o=n(53).trim,i=n(78),a=r.parseFloat,c=1/a(i+"-0")!=-Infinity;e.exports=c?function(e){var t=o(String(e)),n=a(t);return 0===n&&"-"==t.charAt(0)?-0:n}:a},function(e,t,n){"use strict";var r=n(0),o=n(145);r({target:"Number",stat:!0,forced:Number.parseInt!=o},{parseInt:o})},function(e,t,n){"use strict";var r=n(0),o=n(26),i=n(263),a=n(101),c=n(1),u=1..toFixed,s=Math.floor,l=function f(e,t,n){return 0===t?n:t%2==1?f(e,t-1,n*e):f(e*e,t/2,n)};r({target:"Number",proto:!0,forced:u&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!c((function(){u.call({})}))},{toFixed:function(e){var t,n,r,c,u=i(this),f=o(e),d=[0,0,0,0,0,0],p="",h="0",v=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*d[n],d[n]=r%1e7,r=s(r/1e7)},g=function(e){for(var t=6,n=0;--t>=0;)n+=d[t],d[t]=s(n/e),n=n%e*1e7},m=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==d[e]){var n=String(d[e]);t=""===t?n:t+a.call("0",7-n.length)+n}return t};if(f<0||f>20)throw RangeError("Incorrect fraction digits");if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(p="-",u=-u),u>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(u*l(2,69,1))-69)<0?u*l(2,-t,1):u/l(2,t,1),n*=4503599627370496,(t=52-t)>0){for(v(0,n),r=f;r>=7;)v(1e7,0),r-=7;for(v(l(10,r,1),0),r=t-1;r>=23;)g(1<<23),r-=23;g(1<0?p+((c=h.length)<=f?"0."+a.call("0",f-c)+h:h.slice(0,c-f)+"."+h.slice(c-f)):p+h}})},function(e,t,n){"use strict";var r=n(28);e.exports=function(e){if("number"!=typeof e&&"Number"!=r(e))throw TypeError("Incorrect invocation");return+e}},function(e,t,n){"use strict";var r=n(0),o=n(265);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(e,t,n){"use strict";var r=n(5),o=n(1),i=n(61),a=n(90),c=n(68),u=n(12),s=n(56),l=Object.assign,f=Object.defineProperty;e.exports=!l||o((function(){if(r&&1!==l({b:1},l(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||"abcdefghijklmnopqrst"!=i(l({},t)).join("")}))?function(e,t){for(var n=u(e),o=arguments.length,l=1,f=a.f,d=c.f;o>l;)for(var p,h=s(arguments[l++]),v=f?i(h).concat(f(h)):i(h),g=v.length,m=0;g>m;)p=v[m++],r&&!d.call(h,p)||(n[p]=h[p]);return n}:l},function(e,t,n){"use strict";n(0)({target:"Object",stat:!0,sham:!n(5)},{create:n(40)})},function(e,t,n){"use strict";var r=n(0),o=n(5),i=n(79),a=n(12),c=n(27),u=n(11);o&&r({target:"Object",proto:!0,forced:i},{__defineGetter__:function(e,t){u.f(a(this),e,{get:c(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(0),o=n(5);r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperties:n(129)})},function(e,t,n){"use strict";var r=n(0),o=n(5);r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperty:n(11).f})},function(e,t,n){"use strict";var r=n(0),o=n(5),i=n(79),a=n(12),c=n(27),u=n(11);o&&r({target:"Object",proto:!0,forced:i},{__defineSetter__:function(e,t){u.f(a(this),e,{set:c(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(0),o=n(146).entries;r({target:"Object",stat:!0},{entries:function(e){return o(e)}})},function(e,t,n){"use strict";var r=n(0),o=n(66),i=n(1),a=n(4),c=n(49).onFreeze,u=Object.freeze;r({target:"Object",stat:!0,forced:i((function(){u(1)})),sham:!o},{freeze:function(e){return u&&a(e)?u(c(e)):e}})},function(e,t,n){"use strict";var r=n(0),o=n(67),i=n(47);r({target:"Object",stat:!0},{fromEntries:function(e){var t={};return o(e,(function(e,n){i(t,e,n)}),undefined,!0),t}})},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(21),a=n(16).f,c=n(5),u=o((function(){a(1)}));r({target:"Object",stat:!0,forced:!c||u,sham:!c},{getOwnPropertyDescriptor:function(e,t){return a(i(e),t)}})},function(e,t,n){"use strict";var r=n(0),o=n(5),i=n(88),a=n(21),c=n(16),u=n(47);r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),o=c.f,s=i(r),l={},f=0;s.length>f;)(n=o(r,t=s[f++]))!==undefined&&u(l,t,n);return l}})},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(131).f;r({target:"Object",stat:!0,forced:o((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:i})},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(12),a=n(31),c=n(98);r({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!c},{getPrototypeOf:function(e){return a(i(e))}})},function(e,t,n){"use strict";n(0)({target:"Object",stat:!0},{is:n(147)})},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(4),a=Object.isExtensible;r({target:"Object",stat:!0,forced:o((function(){a(1)}))},{isExtensible:function(e){return!!i(e)&&(!a||a(e))}})},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(4),a=Object.isFrozen;r({target:"Object",stat:!0,forced:o((function(){a(1)}))},{isFrozen:function(e){return!i(e)||!!a&&a(e)}})},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(4),a=Object.isSealed;r({target:"Object",stat:!0,forced:o((function(){a(1)}))},{isSealed:function(e){return!i(e)||!!a&&a(e)}})},function(e,t,n){"use strict";var r=n(0),o=n(12),i=n(61);r({target:"Object",stat:!0,forced:n(1)((function(){i(1)}))},{keys:function(e){return i(o(e))}})},function(e,t,n){"use strict";var r=n(0),o=n(5),i=n(79),a=n(12),c=n(29),u=n(31),s=n(16).f;o&&r({target:"Object",proto:!0,forced:i},{__lookupGetter__:function(e){var t,n=a(this),r=c(e,!0);do{if(t=s(n,r))return t.get}while(n=u(n))}})},function(e,t,n){"use strict";var r=n(0),o=n(5),i=n(79),a=n(12),c=n(29),u=n(31),s=n(16).f;o&&r({target:"Object",proto:!0,forced:i},{__lookupSetter__:function(e){var t,n=a(this),r=c(e,!0);do{if(t=s(n,r))return t.set}while(n=u(n))}})},function(e,t,n){"use strict";var r=n(0),o=n(4),i=n(49).onFreeze,a=n(66),c=n(1),u=Object.preventExtensions;r({target:"Object",stat:!0,forced:c((function(){u(1)})),sham:!a},{preventExtensions:function(e){return u&&o(e)?u(i(e)):e}})},function(e,t,n){"use strict";var r=n(0),o=n(4),i=n(49).onFreeze,a=n(66),c=n(1),u=Object.seal;r({target:"Object",stat:!0,forced:c((function(){u(1)})),sham:!a},{seal:function(e){return u&&o(e)?u(i(e)):e}})},function(e,t,n){"use strict";n(0)({target:"Object",stat:!0},{setPrototypeOf:n(48)})},function(e,t,n){"use strict";var r=n(96),o=n(18),i=n(289);r||o(Object.prototype,"toString",i,{unsafe:!0})},function(e,t,n){"use strict";var r=n(96),o=n(71);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},function(e,t,n){"use strict";var r=n(0),o=n(146).values;r({target:"Object",stat:!0},{values:function(e){return o(e)}})},function(e,t,n){"use strict";var r=n(0),o=n(145);r({global:!0,forced:parseInt!=o},{parseInt:o})},function(e,t,n){"use strict";var r,o,i,a,c=n(0),u=n(34),s=n(3),l=n(33),f=n(148),d=n(18),p=n(65),h=n(41),v=n(51),g=n(4),m=n(27),y=n(52),b=n(28),_=n(86),w=n(67),x=n(72),E=n(43),C=n(103).set,N=n(150),S=n(151),k=n(293),O=n(152),A=n(294),I=n(30),V=n(60),T=n(10),M=n(92),L=T("species"),P="Promise",j=I.get,B=I.set,F=I.getterFor(P),R=f,D=s.TypeError,K=s.document,z=s.process,U=l("fetch"),Y=O.f,W=Y,H="process"==b(z),$=!!(K&&K.createEvent&&s.dispatchEvent),G=V(P,(function(){if(!(_(R)!==String(R))){if(66===M)return!0;if(!H&&"function"!=typeof PromiseRejectionEvent)return!0}if(u&&!R.prototype["finally"])return!0;if(M>=51&&/native code/.test(R))return!1;var e=R.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[L]=t,!(e.then((function(){}))instanceof t)})),q=G||!x((function(e){R.all(e)["catch"]((function(){}))})),X=function(e){var t;return!(!g(e)||"function"!=typeof(t=e.then))&&t},Q=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;N((function(){for(var o=t.value,i=1==t.state,a=0;r.length>a;){var c,u,s,l=r[a++],f=i?l.ok:l.fail,d=l.resolve,p=l.reject,h=l.domain;try{f?(i||(2===t.rejection&&te(e,t),t.rejection=1),!0===f?c=o:(h&&h.enter(),c=f(o),h&&(h.exit(),s=!0)),c===l.promise?p(D("Promise-chain cycle")):(u=X(c))?u.call(c,d,p):d(c)):p(o)}catch(v){h&&!s&&h.exit(),p(v)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&Z(e,t)}))}},J=function(e,t,n){var r,o;$?((r=K.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),s.dispatchEvent(r)):r={promise:t,reason:n},(o=s["on"+e])?o(r):"unhandledrejection"===e&&k("Unhandled promise rejection",n)},Z=function(e,t){C.call(s,(function(){var n,r=t.value;if(ee(t)&&(n=A((function(){H?z.emit("unhandledRejection",r,e):J("unhandledrejection",e,r)})),t.rejection=H||ee(t)?2:1,n.error))throw n.value}))},ee=function(e){return 1!==e.rejection&&!e.parent},te=function(e,t){C.call(s,(function(){H?z.emit("rejectionHandled",e):J("rejectionhandled",e,t.value)}))},ne=function(e,t,n,r){return function(o){e(t,n,o,r)}},re=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,Q(e,t,!0))},oe=function ie(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw D("Promise can't be resolved itself");var o=X(n);o?N((function(){var r={done:!1};try{o.call(n,ne(ie,e,r,t),ne(re,e,r,t))}catch(i){re(e,r,i,t)}})):(t.value=n,t.state=1,Q(e,t,!1))}catch(i){re(e,{done:!1},i,t)}}};G&&(R=function(e){y(this,R,P),m(e),r.call(this);var t=j(this);try{e(ne(oe,this,t),ne(re,this,t))}catch(n){re(this,t,n)}},(r=function(e){B(this,{type:P,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:undefined})}).prototype=p(R.prototype,{then:function(e,t){var n=F(this),r=Y(E(this,R));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=H?z.domain:undefined,n.parent=!0,n.reactions.push(r),0!=n.state&&Q(this,n,!1),r.promise},"catch":function(e){return this.then(undefined,e)}}),o=function(){var e=new r,t=j(e);this.promise=e,this.resolve=ne(oe,e,t),this.reject=ne(re,e,t)},O.f=Y=function(e){return e===R||e===i?new o(e):W(e)},u||"function"!=typeof f||(a=f.prototype.then,d(f.prototype,"then",(function(e,t){var n=this;return new R((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof U&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return S(R,U.apply(s,arguments))}}))),c({global:!0,wrap:!0,forced:G},{Promise:R}),h(R,P,!1,!0),v(P),i=l(P),c({target:P,stat:!0,forced:G},{reject:function(e){var t=Y(this);return t.reject.call(undefined,e),t.promise}}),c({target:P,stat:!0,forced:u||G},{resolve:function(e){return S(u&&this===i?R:this,e)}}),c({target:P,stat:!0,forced:q},{all:function(e){var t=this,n=Y(t),r=n.resolve,o=n.reject,i=A((function(){var n=m(t.resolve),i=[],a=0,c=1;w(e,(function(e){var u=a++,s=!1;i.push(undefined),c++,n.call(t,e).then((function(e){s||(s=!0,i[u]=e,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise},race:function(e){var t=this,n=Y(t),r=n.reject,o=A((function(){var o=m(t.resolve);w(e,(function(e){o.call(t,e).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},function(e,t,n){"use strict";var r=n(3);e.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t,n){"use strict";e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},function(e,t,n){"use strict";var r=n(0),o=n(34),i=n(148),a=n(1),c=n(33),u=n(43),s=n(151),l=n(18);r({target:"Promise",proto:!0,real:!0,forced:!!i&&a((function(){i.prototype["finally"].call({then:function(){}},(function(){}))}))},{"finally":function(e){var t=u(this,c("Promise")),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}}),o||"function"!=typeof i||i.prototype["finally"]||l(i.prototype,"finally",c("Promise").prototype["finally"])},function(e,t,n){"use strict";var r=n(0),o=n(33),i=n(27),a=n(6),c=n(1),u=o("Reflect","apply"),s=Function.apply;r({target:"Reflect",stat:!0,forced:!c((function(){u((function(){}))}))},{apply:function(e,t,n){return i(e),a(n),u?u(e,t,n):s.call(e,t,n)}})},function(e,t,n){"use strict";var r=n(0),o=n(33),i=n(27),a=n(6),c=n(4),u=n(40),s=n(141),l=n(1),f=o("Reflect","construct"),d=l((function(){function e(){}return!(f((function(){}),[],e)instanceof e)})),p=!l((function(){f((function(){}))})),h=d||p;r({target:"Reflect",stat:!0,forced:h,sham:h},{construct:function(e,t){i(e),a(t);var n=arguments.length<3?e:i(arguments[2]);if(p&&!d)return f(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(s.apply(e,r))}var o=n.prototype,l=u(c(o)?o:Object.prototype),h=Function.apply.call(e,l,t);return c(h)?h:l}})},function(e,t,n){"use strict";var r=n(0),o=n(5),i=n(6),a=n(29),c=n(11);r({target:"Reflect",stat:!0,forced:n(1)((function(){Reflect.defineProperty(c.f({},1,{value:1}),1,{value:2})})),sham:!o},{defineProperty:function(e,t,n){i(e);var r=a(t,!0);i(n);try{return c.f(e,r,n),!0}catch(o){return!1}}})},function(e,t,n){"use strict";var r=n(0),o=n(6),i=n(16).f;r({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var n=i(o(e),t);return!(n&&!n.configurable)&&delete e[t]}})},function(e,t,n){"use strict";var r=n(0),o=n(4),i=n(6),a=n(14),c=n(16),u=n(31);r({target:"Reflect",stat:!0},{get:function s(e,t){var n,r,l=arguments.length<3?e:arguments[2];return i(e)===l?e[t]:(n=c.f(e,t))?a(n,"value")?n.value:n.get===undefined?undefined:n.get.call(l):o(r=u(e))?s(r,t,l):void 0}})},function(e,t,n){"use strict";var r=n(0),o=n(5),i=n(6),a=n(16);r({target:"Reflect",stat:!0,sham:!o},{getOwnPropertyDescriptor:function(e,t){return a.f(i(e),t)}})},function(e,t,n){"use strict";var r=n(0),o=n(6),i=n(31);r({target:"Reflect",stat:!0,sham:!n(98)},{getPrototypeOf:function(e){return i(o(e))}})},function(e,t,n){"use strict";n(0)({target:"Reflect",stat:!0},{has:function(e,t){return t in e}})},function(e,t,n){"use strict";var r=n(0),o=n(6),i=Object.isExtensible;r({target:"Reflect",stat:!0},{isExtensible:function(e){return o(e),!i||i(e)}})},function(e,t,n){"use strict";n(0)({target:"Reflect",stat:!0},{ownKeys:n(88)})},function(e,t,n){"use strict";var r=n(0),o=n(33),i=n(6);r({target:"Reflect",stat:!0,sham:!n(66)},{preventExtensions:function(e){i(e);try{var t=o("Object","preventExtensions");return t&&t(e),!0}catch(n){return!1}}})},function(e,t,n){"use strict";var r=n(0),o=n(6),i=n(4),a=n(14),c=n(1),u=n(11),s=n(16),l=n(31),f=n(44);r({target:"Reflect",stat:!0,forced:c((function(){var e=u.f({},"a",{configurable:!0});return!1!==Reflect.set(l(e),"a",1,e)}))},{set:function d(e,t,n){var r,c,p=arguments.length<4?e:arguments[3],h=s.f(o(e),t);if(!h){if(i(c=l(e)))return d(c,t,n,p);h=f(0)}if(a(h,"value")){if(!1===h.writable||!i(p))return!1;if(r=s.f(p,t)){if(r.get||r.set||!1===r.writable)return!1;r.value=n,u.f(p,t,r)}else u.f(p,t,f(0,n));return!0}return h.set!==undefined&&(h.set.call(p,n),!0)}})},function(e,t,n){"use strict";var r=n(0),o=n(6),i=n(138),a=n(48);a&&r({target:"Reflect",stat:!0},{setPrototypeOf:function(e,t){o(e),i(t);try{return a(e,t),!0}catch(n){return!1}}})},function(e,t,n){"use strict";var r=n(5),o=n(3),i=n(60),a=n(76),c=n(11).f,u=n(45).f,s=n(104),l=n(80),f=n(105),d=n(18),p=n(1),h=n(30).set,v=n(51),g=n(10)("match"),m=o.RegExp,y=m.prototype,b=/a/g,_=/a/g,w=new m(b)!==b,x=f.UNSUPPORTED_Y;if(r&&i("RegExp",!w||x||p((function(){return _[g]=!1,m(b)!=b||m(_)==_||"/a/i"!=m(b,"i")})))){for(var E=function(e,t){var n,r=this instanceof E,o=s(e),i=t===undefined;if(!r&&o&&e.constructor===E&&i)return e;w?o&&!i&&(e=e.source):e instanceof E&&(i&&(t=l.call(e)),e=e.source),x&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var c=a(w?new m(e,t):m(e,t),r?this:y,E);return x&&n&&h(c,{sticky:n}),c},C=function(e){e in E||c(E,e,{configurable:!0,get:function(){return m[e]},set:function(t){m[e]=t}})},N=u(m),S=0;N.length>S;)C(N[S++]);y.constructor=E,E.prototype=y,d(o,"RegExp",E)}v("RegExp")},function(e,t,n){"use strict";var r=n(5),o=n(11),i=n(80),a=n(105).UNSUPPORTED_Y;r&&("g"!=/./g.flags||a)&&o.f(RegExp.prototype,"flags",{configurable:!0,get:i})},function(e,t,n){"use strict";var r=n(18),o=n(6),i=n(1),a=n(80),c=RegExp.prototype,u=c.toString,s=i((function(){return"/a/b"!=u.call({source:"a",flags:"b"})})),l="toString"!=u.name;(s||l)&&r(RegExp.prototype,"toString",(function(){var e=o(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(n===undefined&&e instanceof RegExp&&!("flags"in c)?a.call(e):n)}),{unsafe:!0})},function(e,t,n){"use strict";var r=n(75),o=n(142);e.exports=r("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),o)},function(e,t,n){"use strict";var r=n(0),o=n(106).codeAt;r({target:"String",proto:!0},{codePointAt:function(e){return o(this,e)}})},function(e,t,n){"use strict";var r,o=n(0),i=n(16).f,a=n(8),c=n(107),u=n(17),s=n(108),l=n(34),f="".endsWith,d=Math.min,p=s("endsWith");o({target:"String",proto:!0,forced:!!(l||p||(r=i(String.prototype,"endsWith"),!r||r.writable))&&!p},{endsWith:function(e){var t=String(u(this));c(e);var n=arguments.length>1?arguments[1]:undefined,r=a(t.length),o=n===undefined?r:d(a(n),r),i=String(e);return f?f.call(t,i,o):t.slice(o-i.length,o)===i}})},function(e,t,n){"use strict";var r=n(0),o=n(39),i=String.fromCharCode,a=String.fromCodePoint;r({target:"String",stat:!0,forced:!!a&&1!=a.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],o(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){"use strict";var r=n(0),o=n(107),i=n(17);r({target:"String",proto:!0,forced:!n(108)("includes")},{includes:function(e){return!!~String(i(this)).indexOf(o(e),arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var r=n(106).charAt,o=n(30),i=n(97),a=o.set,c=o.getterFor("String Iterator");i(String,"String",(function(e){a(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=c(this),n=t.string,o=t.index;return o>=n.length?{value:undefined,done:!0}:(e=r(n,o),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(82),o=n(6),i=n(8),a=n(17),c=n(109),u=n(83);r("match",1,(function(e,t,n){return[function(t){var n=a(this),r=t==undefined?undefined:t[e];return r!==undefined?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=o(e),s=String(this);if(!a.global)return u(a,s);var l=a.unicode;a.lastIndex=0;for(var f,d=[],p=0;null!==(f=u(a,s));){var h=String(f[0]);d[p]=h,""===h&&(a.lastIndex=c(s,i(a.lastIndex),l)),p++}return 0===p?null:d}]}))},function(e,t,n){"use strict";var r=n(0),o=n(100).end;r({target:"String",proto:!0,forced:n(154)},{padEnd:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var r=n(0),o=n(100).start;r({target:"String",proto:!0,forced:n(154)},{padStart:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var r=n(0),o=n(21),i=n(8);r({target:"String",stat:!0},{raw:function(e){for(var t=o(e.raw),n=i(t.length),r=arguments.length,a=[],c=0;n>c;)a.push(String(t[c++])),c]*>)/g,v=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(e,t,n,r){var g=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,m=r.REPLACE_KEEPS_$0,y=g?"$":"$0";return[function(n,r){var o=u(this),i=n==undefined?undefined:n[e];return i!==undefined?i.call(n,o,r):t.call(String(o),n,r)},function(e,r){if(!g&&m||"string"==typeof r&&-1===r.indexOf(y)){var i=n(t,e,this,r);if(i.done)return i.value}var u=o(e),p=String(this),h="function"==typeof r;h||(r=String(r));var v=u.global;if(v){var _=u.unicode;u.lastIndex=0}for(var w=[];;){var x=l(u,p);if(null===x)break;if(w.push(x),!v)break;""===String(x[0])&&(u.lastIndex=s(p,a(u.lastIndex),_))}for(var E,C="",N=0,S=0;S=N&&(C+=p.slice(N,O)+M,N=O+k.length)}return C+p.slice(N)}];function b(e,n,r,o,a,c){var u=r+e.length,s=o.length,l=v;return a!==undefined&&(a=i(a),l=h),t.call(c,l,(function(t,i){var c;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(u);case"<":c=a[i.slice(1,-1)];break;default:var l=+i;if(0===l)return t;if(l>s){var f=p(l/10);return 0===f?t:f<=s?o[f-1]===undefined?i.charAt(1):o[f-1]+i.charAt(1):t}c=o[l-1]}return c===undefined?"":c}))}}))},function(e,t,n){"use strict";var r=n(82),o=n(6),i=n(17),a=n(147),c=n(83);r("search",1,(function(e,t,n){return[function(t){var n=i(this),r=t==undefined?undefined:t[e];return r!==undefined?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var i=o(e),u=String(this),s=i.lastIndex;a(s,0)||(i.lastIndex=0);var l=c(i,u);return a(i.lastIndex,s)||(i.lastIndex=s),null===l?-1:l.index}]}))},function(e,t,n){"use strict";var r=n(82),o=n(104),i=n(6),a=n(17),c=n(43),u=n(109),s=n(8),l=n(83),f=n(81),d=n(1),p=[].push,h=Math.min,v=!d((function(){return!RegExp(4294967295,"y")}));r("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(a(this)),i=n===undefined?4294967295:n>>>0;if(0===i)return[];if(e===undefined)return[r];if(!o(e))return t.call(r,e,i);for(var c,u,s,l=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),h=0,v=new RegExp(e.source,d+"g");(c=f.call(v,r))&&!((u=v.lastIndex)>h&&(l.push(r.slice(h,c.index)),c.length>1&&c.index=i));)v.lastIndex===c.index&&v.lastIndex++;return h===r.length?!s&&v.test("")||l.push(""):l.push(r.slice(h)),l.length>i?l.slice(0,i):l}:"0".split(undefined,0).length?function(e,n){return e===undefined&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var o=a(this),i=t==undefined?undefined:t[e];return i!==undefined?i.call(t,o,n):r.call(String(o),t,n)},function(e,o){var a=n(r,e,this,o,r!==t);if(a.done)return a.value;var f=i(e),d=String(this),p=c(f,RegExp),g=f.unicode,m=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(v?"y":"g"),y=new p(v?f:"^(?:"+f.source+")",m),b=o===undefined?4294967295:o>>>0;if(0===b)return[];if(0===d.length)return null===l(y,d)?[d]:[];for(var _=0,w=0,x=[];w1?arguments[1]:undefined,t.length)),r=String(e);return f?f.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";var r=n(0),o=n(53).trim;r({target:"String",proto:!0,forced:n(110)("trim")},{trim:function(){return o(this)}})},function(e,t,n){"use strict";var r=n(0),o=n(53).end,i=n(110)("trimEnd"),a=i?function(){return o(this)}:"".trimEnd;r({target:"String",proto:!0,forced:i},{trimEnd:a,trimRight:a})},function(e,t,n){"use strict";var r=n(0),o=n(53).start,i=n(110)("trimStart"),a=i?function(){return o(this)}:"".trimStart;r({target:"String",proto:!0,forced:i},{trimStart:a,trimLeft:a})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("anchor")},{anchor:function(e){return o(this,"a","name",e)}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("big")},{big:function(){return o(this,"big","","")}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("blink")},{blink:function(){return o(this,"blink","","")}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("bold")},{bold:function(){return o(this,"b","","")}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("fixed")},{fixed:function(){return o(this,"tt","","")}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("fontcolor")},{fontcolor:function(e){return o(this,"font","color",e)}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("fontsize")},{fontsize:function(e){return o(this,"font","size",e)}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("italics")},{italics:function(){return o(this,"i","","")}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("link")},{link:function(e){return o(this,"a","href",e)}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("small")},{small:function(){return o(this,"small","","")}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("strike")},{strike:function(){return o(this,"strike","","")}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("sub")},{sub:function(){return o(this,"sub","","")}})},function(e,t,n){"use strict";var r=n(0),o=n(23);r({target:"String",proto:!0,forced:n(24)("sup")},{sup:function(){return o(this,"sup","","")}})},function(e,t,n){"use strict";n(36)("Float32",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";var r=n(26);e.exports=function(e){var t=r(e);if(t<0)throw RangeError("The argument can't be less than 0");return t}},function(e,t,n){"use strict";n(36)("Float64",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";n(36)("Int8",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";n(36)("Int16",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";n(36)("Int32",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";n(36)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";n(36)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}),!0)},function(e,t,n){"use strict";n(36)("Uint16",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";n(36)("Uint32",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";var r=n(7),o=n(133),i=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",(function(e,t){return o.call(i(this),e,t,arguments.length>2?arguments[2]:undefined)}))},function(e,t,n){"use strict";var r=n(7),o=n(15).every,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("every",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var r=n(7),o=n(93),i=r.aTypedArray;(0,r.exportTypedArrayMethod)("fill",(function(e){return o.apply(i(this),arguments)}))},function(e,t,n){"use strict";var r=n(7),o=n(15).filter,i=n(43),a=r.aTypedArray,c=r.aTypedArrayConstructor;(0,r.exportTypedArrayMethod)("filter",(function(e){for(var t=o(a(this),e,arguments.length>1?arguments[1]:undefined),n=i(this,this.constructor),r=0,u=t.length,s=new(c(n))(u);u>r;)s[r]=t[r++];return s}))},function(e,t,n){"use strict";var r=n(7),o=n(15).find,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("find",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var r=n(7),o=n(15).findIndex,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("findIndex",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var r=n(7),o=n(15).forEach,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("forEach",(function(e){o(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var r=n(111);(0,n(7).exportTypedArrayStaticMethod)("from",n(156),r)},function(e,t,n){"use strict";var r=n(7),o=n(59).includes,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("includes",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var r=n(7),o=n(59).indexOf,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("indexOf",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var r=n(3),o=n(7),i=n(136),a=n(10)("iterator"),c=r.Uint8Array,u=i.values,s=i.keys,l=i.entries,f=o.aTypedArray,d=o.exportTypedArrayMethod,p=c&&c.prototype[a],h=!!p&&("values"==p.name||p.name==undefined),v=function(){return u.call(f(this))};d("entries",(function(){return l.call(f(this))})),d("keys",(function(){return s.call(f(this))})),d("values",v,!h),d(a,v,!h)},function(e,t,n){"use strict";var r=n(7),o=r.aTypedArray,i=r.exportTypedArrayMethod,a=[].join;i("join",(function(e){return a.apply(o(this),arguments)}))},function(e,t,n){"use strict";var r=n(7),o=n(139),i=r.aTypedArray;(0,r.exportTypedArrayMethod)("lastIndexOf",(function(e){return o.apply(i(this),arguments)}))},function(e,t,n){"use strict";var r=n(7),o=n(15).map,i=n(43),a=r.aTypedArray,c=r.aTypedArrayConstructor;(0,r.exportTypedArrayMethod)("map",(function(e){return o(a(this),e,arguments.length>1?arguments[1]:undefined,(function(e,t){return new(c(i(e,e.constructor)))(t)}))}))},function(e,t,n){"use strict";var r=n(7),o=n(111),i=r.aTypedArrayConstructor;(0,r.exportTypedArrayStaticMethod)("of",(function(){for(var e=0,t=arguments.length,n=new(i(this))(t);t>e;)n[e]=arguments[e++];return n}),o)},function(e,t,n){"use strict";var r=n(7),o=n(73).left,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduce",(function(e){return o(i(this),e,arguments.length,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var r=n(7),o=n(73).right,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduceRight",(function(e){return o(i(this),e,arguments.length,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var r=n(7),o=r.aTypedArray,i=r.exportTypedArrayMethod,a=Math.floor;i("reverse",(function(){for(var e,t=o(this).length,n=a(t/2),r=0;r1?arguments[1]:undefined,1),n=this.length,r=a(e),c=o(r.length),s=0;if(c+t>n)throw RangeError("Wrong length");for(;si;)l[i]=n[i++];return l}),i((function(){new Int8Array(1).slice()})))},function(e,t,n){"use strict";var r=n(7),o=n(15).some,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("some",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var r=n(7),o=r.aTypedArray,i=r.exportTypedArrayMethod,a=[].sort;i("sort",(function(e){return a.call(o(this),e)}))},function(e,t,n){"use strict";var r=n(7),o=n(8),i=n(39),a=n(43),c=r.aTypedArray;(0,r.exportTypedArrayMethod)("subarray",(function(e,t){var n=c(this),r=n.length,u=i(e,r);return new(a(n,n.constructor))(n.buffer,n.byteOffset+u*n.BYTES_PER_ELEMENT,o((t===undefined?r:i(t,r))-u))}))},function(e,t,n){"use strict";var r=n(3),o=n(7),i=n(1),a=r.Int8Array,c=o.aTypedArray,u=o.exportTypedArrayMethod,s=[].toLocaleString,l=[].slice,f=!!a&&i((function(){s.call(new a(1))}));u("toLocaleString",(function(){return s.apply(f?l.call(c(this)):c(this),arguments)}),i((function(){return[1,2].toLocaleString()!=new a([1,2]).toLocaleString()}))||!i((function(){a.prototype.toLocaleString.call([1,2])})))},function(e,t,n){"use strict";var r=n(7).exportTypedArrayMethod,o=n(1),i=n(3).Uint8Array,a=i&&i.prototype||{},c=[].toString,u=[].join;o((function(){c.call({})}))&&(c=function(){return u.call(this)});var s=a.toString!=c;r("toString",c,s)},function(e,t,n){"use strict";var r,o=n(3),i=n(65),a=n(49),c=n(75),u=n(157),s=n(4),l=n(30).enforce,f=n(124),d=!o.ActiveXObject&&"ActiveXObject"in o,p=Object.isExtensible,h=function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},v=e.exports=c("WeakMap",h,u);if(f&&d){r=u.getConstructor(h,"WeakMap",!0),a.REQUIRED=!0;var g=v.prototype,m=g["delete"],y=g.has,b=g.get,_=g.set;i(g,{"delete":function(e){if(s(e)&&!p(e)){var t=l(this);return t.frozen||(t.frozen=new r),m.call(this,e)||t.frozen["delete"](e)}return m.call(this,e)},has:function(e){if(s(e)&&!p(e)){var t=l(this);return t.frozen||(t.frozen=new r),y.call(this,e)||t.frozen.has(e)}return y.call(this,e)},get:function(e){if(s(e)&&!p(e)){var t=l(this);return t.frozen||(t.frozen=new r),y.call(this,e)?b.call(this,e):t.frozen.get(e)}return b.call(this,e)},set:function(e,t){if(s(e)&&!p(e)){var n=l(this);n.frozen||(n.frozen=new r),y.call(this,e)?_.call(this,e,t):n.frozen.set(e,t)}else _.call(this,e,t);return this}})}},function(e,t,n){"use strict";n(75)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),n(157))},function(e,t,n){"use strict";var r=n(0),o=n(3),i=n(103);r({global:!0,bind:!0,enumerable:!0,forced:!o.setImmediate||!o.clearImmediate},{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){"use strict";var r=n(0),o=n(3),i=n(150),a=n(28),c=o.process,u="process"==a(c);r({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(e){var t=u&&c.domain;i(t?t.bind(e):e)}})},function(e,t,n){"use strict";var r=n(0),o=n(3),i=n(70),a=[].slice,c=function(e){return function(t,n){var r=arguments.length>2,o=r?a.call(arguments,2):undefined;return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,o)}:t,n)}};r({global:!0,bind:!0,forced:/MSIE .\./.test(i)},{setTimeout:c(o.setTimeout),setInterval:c(o.setInterval)})},function(e,t,n){"use strict";t.__esModule=!0,t._CI=Oe,t._HI=B,t._M=Ae,t._MCCC=Me,t._ME=Ve,t._MFCC=Le,t._MP=Se,t._MR=ye,t.__render=Re,t.createComponentVNode=function(e,t,n,r,o){var a=new A(1,null,null,e=function(e,t){if(12&e)return e;if(t.prototype&&t.prototype.render)return 4;if(t.render)return 32776;return 8}(e,t),r,function(e,t,n){var r=(32768&e?t.render:t).defaultProps;if(i(r))return n;if(i(n))return l(r,null);return k(n,r)}(e,t,n),function(e,t,n){if(4&e)return n;var r=(32768&e?t.render:t).defaultHooks;if(i(r))return n;if(i(n))return r;return k(n,r)}(e,t,o),t);C.createVNode&&C.createVNode(a);return a},t.createFragment=T,t.createPortal=function(e,t){var n=B(e);return I(1024,1024,null,n,0,null,n.key,t)},t.createRef=function(){return{current:null}},t.createRenderer=function(e){return function(t,n,r,o){e||(e=t),De(n,e,r,o)}},t.createTextVNode=V,t.createVNode=I,t.directClone=M,t.findDOMfromVNode=b,t.forwardRef=function(e){return{render:e}},t.getFlagsForElementVnode=function(e){switch(e){case"svg":return 32;case"input":return 64;case"select":return 256;case"textarea":return 128;case"$F":return 8192;default:return 1}},t.linkEvent=function(e,t){if(c(t))return{data:e,event:t};return null},t.normalizeProps=function(e){var t=e.props;if(t){var n=e.flags;481&n&&(void 0!==t.children&&i(e.children)&&j(e,t.children),void 0!==t.className&&(e.className=t.className||null,t.className=undefined)),void 0!==t.key&&(e.key=t.key,t.key=undefined),void 0!==t.ref&&(e.ref=8&n?l(e.ref,t.ref):t.ref,t.ref=undefined)}return e},t.render=De,t.rerender=He,t.version=t.options=t.Fragment=t.EMPTY_OBJ=t.Component=void 0;var r=Array.isArray;function o(e){var t=typeof e;return"string"===t||"number"===t}function i(e){return null==e}function a(e){return null===e||!1===e||!0===e||void 0===e}function c(e){return"function"==typeof e}function u(e){return"string"==typeof e}function s(e){return null===e}function l(e,t){var n={};if(e)for(var r in e)n[r]=e[r];if(t)for(var o in t)n[o]=t[o];return n}function f(e){return!s(e)&&"object"==typeof e}var d={};t.EMPTY_OBJ=d;function p(e){return e.substr(2).toLowerCase()}function h(e,t){e.appendChild(t)}function v(e,t,n){s(n)?h(e,t):e.insertBefore(t,n)}function g(e,t){e.removeChild(t)}function m(e){for(var t=0;t0,h=s(d),v=u(d)&&"$"===d[0];p||h||v?(n=n||t.slice(0,l),(p||v)&&(f=M(f)),(h||v)&&(f.key="$"+l),n.push(f)):n&&n.push(f),f.flags|=65536}}i=0===(n=n||t).length?1:8}else(n=t).flags|=65536,81920&t.flags&&(n=M(t)),i=2;return e.children=n,e.childFlags=i,e}function B(e){return a(e)||o(e)?V(e,null):r(e)?T(e,0,null):16384&e.flags?M(e):e}var F="http://www.w3.org/1999/xlink",R="http://www.w3.org/XML/1998/namespace",D={"xlink:actuate":F,"xlink:arcrole":F,"xlink:href":F,"xlink:role":F,"xlink:show":F,"xlink:title":F,"xlink:type":F,"xml:base":R,"xml:lang":R,"xml:space":R};function K(e){return{onClick:e,onDblClick:e,onFocusIn:e,onFocusOut:e,onKeyDown:e,onKeyPress:e,onKeyUp:e,onMouseDown:e,onMouseMove:e,onMouseUp:e,onTouchEnd:e,onTouchMove:e,onTouchStart:e}}var z=K(0),U=K(null),Y=K(!0);function W(e,t){var n=t.$EV;return n||(n=t.$EV=K(null)),n[e]||1==++z[e]&&(U[e]=function(e){var t="onClick"===e||"onDblClick"===e?function(e){return function(t){0===t.button?$(t,!0,e,Q(t)):t.stopPropagation()}}(e):function(e){return function(t){$(t,!1,e,Q(t))}}(e);return document.addEventListener(p(e),t),t}(e)),n}function H(e,t){var n=t.$EV;n&&n[e]&&(0==--z[e]&&(document.removeEventListener(p(e),U[e]),U[e]=null),n[e]=null)}function $(e,t,n,r){var o=function(e){return c(e.composedPath)?e.composedPath()[0]:e.target}(e);do{if(t&&o.disabled)return;var i=o.$EV;if(i){var a=i[n];if(a&&(r.dom=o,a.event?a.event(a.data,e):a(e),e.cancelBubble))return}o=o.parentNode}while(!s(o))}function G(){this.cancelBubble=!0,this.immediatePropagationStopped||this.stopImmediatePropagation()}function q(){return this.defaultPrevented}function X(){return this.cancelBubble}function Q(e){var t={dom:document};return e.isDefaultPrevented=q,e.isPropagationStopped=X,e.stopPropagation=G,Object.defineProperty(e,"currentTarget",{configurable:!0,get:function(){return t.dom}}),t}function J(e,t,n){if(e[t]){var r=e[t];r.event?r.event(r.data,n):r(n)}else{var o=t.toLowerCase();e[o]&&e[o](n)}}function Z(e,t){var n=function(n){var r=this.$V;if(r){var o=r.props||d,i=r.dom;if(u(e))J(o,e,n);else for(var a=0;a-1&&t.options[a]&&(c=t.options[a].value),n&&i(c)&&(c=e.defaultValue),ae(r,c)}}var se,le,fe=Z("onInput",pe),de=Z("onChange");function pe(e,t,n){var r=e.value,o=t.value;if(i(r)){if(n){var a=e.defaultValue;i(a)||a===o||(t.defaultValue=a,t.value=a)}}else o!==r&&(t.defaultValue=r,t.value=r)}function he(e,t,n,r,o,i){64&e?ie(r,n):256&e?ue(r,n,o,t):128&e&&pe(r,n,o),i&&(n.$V=t)}function ve(e,t,n){64&e?function(e,t){te(t.type)?(ee(e,"change",re),ee(e,"click",oe)):ee(e,"input",ne)}(t,n):256&e?function(e){ee(e,"change",ce)}(t):128&e&&function(e,t){ee(e,"input",fe),t.onChange&&ee(e,"change",de)}(t,n)}function ge(e){return e.type&&te(e.type)?!i(e.checked):!i(e.value)}function me(e){e&&!O(e,null)&&e.current&&(e.current=null)}function ye(e,t,n){e&&(c(e)||void 0!==e.current)&&n.push((function(){O(e,t)||void 0===e.current||(e.current=t)}))}function be(e,t){_e(e),_(e,t)}function _e(e){var t,n=e.flags,r=e.children;if(481&n){t=e.ref;var o=e.props;me(t);var a=e.childFlags;if(!s(o))for(var u=Object.keys(o),l=0,f=u.length;l0;for(var c in a&&(i=ge(n))&&ve(t,r,n),n)Ne(c,null,n[c],r,o,i,null);a&&he(t,e,r,n,!0,i)}function ke(e,t,n){var r=B(e.render(t,e.state,n)),o=n;return c(e.getChildContext)&&(o=l(n,e.getChildContext())),e.$CX=o,r}function Oe(e,t,n,r,o,i){var a=new t(n,r),u=a.$N=Boolean(t.getDerivedStateFromProps||a.getSnapshotBeforeUpdate);if(a.$SVG=o,a.$L=i,e.children=a,a.$BS=!1,a.context=r,a.props===d&&(a.props=n),u)a.state=x(a,n,a.state);else if(c(a.componentWillMount)){a.$BR=!0,a.componentWillMount();var l=a.$PS;if(!s(l)){var f=a.state;if(s(f))a.state=l;else for(var p in l)f[p]=l[p];a.$PS=null}a.$BR=!1}return a.$LI=ke(a,n,r),a}function Ae(e,t,n,r,o,i){var a=e.flags|=16384;481&a?Ve(e,t,n,r,o,i):4&a?function(e,t,n,r,o,i){var a=Oe(e,e.type,e.props||d,n,r,i);Ae(a.$LI,t,a.$CX,r,o,i),Me(e.ref,a,i)}(e,t,n,r,o,i):8&a?(!function(e,t,n,r,o,i){Ae(e.children=B(function(e,t){return 32768&e.flags?e.type.render(e.props||d,e.ref,t):e.type(e.props||d,t)}(e,n)),t,n,r,o,i)}(e,t,n,r,o,i),Le(e,i)):512&a||16&a?Ie(e,t,o):8192&a?function(e,t,n,r,o,i){var a=e.children,c=e.childFlags;12&c&&0===a.length&&(c=e.childFlags=2,a=e.children=L());2===c?Ae(a,n,o,r,o,i):Te(a,n,t,r,o,i)}(e,n,t,r,o,i):1024&a&&function(e,t,n,r,o){Ae(e.children,e.ref,t,!1,null,o);var i=L();Ie(i,n,r),e.dom=i.dom}(e,n,t,o,i)}function Ie(e,t,n){var r=e.dom=document.createTextNode(e.children);s(t)||v(t,r,n)}function Ve(e,t,n,r,o,a){var c=e.flags,u=e.props,l=e.className,f=e.children,d=e.childFlags,p=e.dom=function(e,t){return t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}(e.type,r=r||(32&c)>0);if(i(l)||""===l||(r?p.setAttribute("class",l):p.className=l),16===d)N(p,f);else if(1!==d){var h=r&&"foreignObject"!==e.type;2===d?(16384&f.flags&&(e.children=f=M(f)),Ae(f,p,n,h,null,a)):8!==d&&4!==d||Te(f,p,n,h,null,a)}s(t)||v(t,p,o),s(u)||Se(e,c,u,p,r),ye(e.ref,p,a)}function Te(e,t,n,r,o,i){for(var a=0;a0,s!==l){var h=s||d;if((c=l||d)!==d)for(var v in(f=(448&o)>0)&&(p=ge(c)),c){var g=h[v],m=c[v];g!==m&&Ne(v,g,m,u,r,p,e)}if(h!==d)for(var y in h)i(c[y])&&!i(h[y])&&Ne(y,h[y],null,u,r,p,e)}var b=t.children,_=t.className;e.className!==_&&(i(_)?u.removeAttribute("class"):r?u.setAttribute("class",_):u.className=_);4096&o?function(e,t){e.textContent!==t&&(e.textContent=t)}(u,b):je(e.childFlags,t.childFlags,e.children,b,u,n,r&&"foreignObject"!==t.type,null,e,a);f&&he(o,t,u,c,!1,p);var w=t.ref,x=e.ref;x!==w&&(me(x),ye(w,u,a))}(e,t,r,o,p,f):4&p?function(e,t,n,r,o,i,a){var u=t.children=e.children;if(s(u))return;u.$L=a;var f=t.props||d,p=t.ref,h=e.ref,v=u.state;if(!u.$N){if(c(u.componentWillReceiveProps)){if(u.$BR=!0,u.componentWillReceiveProps(f,r),u.$UN)return;u.$BR=!1}s(u.$PS)||(v=l(v,u.$PS),u.$PS=null)}Be(u,v,f,n,r,o,!1,i,a),h!==p&&(me(h),ye(p,u,a))}(e,t,n,r,o,u,f):8&p?function(e,t,n,r,o,a,u){var s=!0,l=t.props||d,f=t.ref,p=e.props,h=!i(f),v=e.children;h&&c(f.onComponentShouldUpdate)&&(s=f.onComponentShouldUpdate(p,l));if(!1!==s){h&&c(f.onComponentWillUpdate)&&f.onComponentWillUpdate(p,l);var g=t.type,m=B(32768&t.flags?g.render(l,f,r):g(l,r));Pe(v,m,n,r,o,a,u),t.children=m,h&&c(f.onComponentDidUpdate)&&f.onComponentDidUpdate(p,l)}else t.children=v}(e,t,n,r,o,u,f):16&p?function(e,t){var n=t.children,r=t.dom=e.dom;n!==e.children&&(r.nodeValue=n)}(e,t):512&p?t.dom=e.dom:8192&p?function(e,t,n,r,o,i){var a=e.children,c=t.children,u=e.childFlags,s=t.childFlags,l=null;12&s&&0===c.length&&(s=t.childFlags=2,c=t.children=L());var f=0!=(2&s);if(12&u){var d=a.length;(8&u&&8&s||f||!f&&c.length>d)&&(l=b(a[d-1],!1).nextSibling)}je(u,s,a,c,n,r,o,l,e,i)}(e,t,n,r,o,f):function(e,t,n,r){var o=e.ref,i=t.ref,c=t.children;if(je(e.childFlags,t.childFlags,e.children,c,o,n,!1,null,e,r),t.dom=e.dom,o!==i&&!a(c)){var u=c.dom;g(o,u),h(i,u)}}(e,t,r,f)}function je(e,t,n,r,o,i,a,c,u,s){switch(e){case 2:switch(t){case 2:Pe(n,r,o,i,a,c,s);break;case 1:be(n,o);break;case 16:_e(n),N(o,r);break;default:!function(e,t,n,r,o,i){_e(e),Te(t,n,r,o,b(e,!0),i),_(e,n)}(n,r,o,i,a,s)}break;case 1:switch(t){case 2:Ae(r,o,i,a,c,s);break;case 1:break;case 16:N(o,r);break;default:Te(r,o,i,a,c,s)}break;case 16:switch(t){case 16:!function(e,t,n){e!==t&&(""!==e?n.firstChild.nodeValue=t:N(n,t))}(n,r,o);break;case 2:xe(o),Ae(r,o,i,a,c,s);break;case 1:xe(o);break;default:xe(o),Te(r,o,i,a,c,s)}break;default:switch(t){case 16:we(n),N(o,r);break;case 2:Ee(o,u,n),Ae(r,o,i,a,c,s);break;case 1:Ee(o,u,n);break;default:var l=0|n.length,f=0|r.length;0===l?f>0&&Te(r,o,i,a,c,s):0===f?Ee(o,u,n):8===t&&8===e?function(e,t,n,r,o,i,a,c,u,s){var l,f,d=i-1,p=a-1,h=0,v=e[h],g=t[h];e:{for(;v.key===g.key;){if(16384&g.flags&&(t[h]=g=M(g)),Pe(v,g,n,r,o,c,s),e[h]=g,++h>d||h>p)break e;v=e[h],g=t[h]}for(v=e[d],g=t[p];v.key===g.key;){if(16384&g.flags&&(t[p]=g=M(g)),Pe(v,g,n,r,o,c,s),e[d]=g,d--,p--,h>d||h>p)break e;v=e[d],g=t[p]}}if(h>d){if(h<=p)for(f=(l=p+1)p)for(;h<=d;)be(e[h++],n);else!function(e,t,n,r,o,i,a,c,u,s,l,f,d){var p,h,v,g=0,m=c,y=c,_=i-c+1,x=a-c+1,E=new Int32Array(x+1),C=_===r,N=!1,S=0,k=0;if(o<4||(_|x)<32)for(g=m;g<=i;++g)if(p=e[g],kc?N=!0:S=c,16384&h.flags&&(t[c]=h=M(h)),Pe(p,h,u,n,s,l,d),++k;break}!C&&c>a&&be(p,u)}else C||be(p,u);else{var O={};for(g=y;g<=a;++g)O[t[g].key]=g;for(g=m;g<=i;++g)if(p=e[g],km;)be(e[m++],u);E[c-y]=g+1,S>c?N=!0:S=c,16384&(h=t[c]).flags&&(t[c]=h=M(h)),Pe(p,h,u,n,s,l,d),++k}else C||be(p,u);else C||be(p,u)}if(C)Ee(u,f,e),Te(t,u,n,s,l,d);else if(N){var A=function(e){var t=0,n=0,r=0,o=0,i=0,a=0,c=0,u=e.length;u>Fe&&(Fe=u,se=new Int32Array(u),le=new Int32Array(u));for(;n>1]]0&&(le[n]=se[i-1]),se[i]=n)}i=o+1;var s=new Int32Array(i);a=se[i-1];for(;i-- >0;)s[i]=a,a=le[a],se[i]=0;return s}(E);for(c=A.length-1,g=x-1;g>=0;g--)0===E[g]?(16384&(h=t[S=g+y]).flags&&(t[S]=h=M(h)),Ae(h,u,n,s,(v=S+1)=0;g--)0===E[g]&&(16384&(h=t[S=g+y]).flags&&(t[S]=h=M(h)),Ae(h,u,n,s,(v=S+1)a?a:i,d=0;da)for(d=f;d=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),w(n),s}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;w(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},e}(e.exports);try{regeneratorRuntime=r}catch(o){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){"use strict";!function(t,n){var r,o,i=t.html5||{},a=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,c=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,u=0,s={};function l(){var e=h.elements;return"string"==typeof e?e.split(" "):e}function f(e){var t=s[e._html5shiv];return t||(t={},u++,e._html5shiv=u,s[u]=t),t}function d(e,t,r){return t||(t=n),o?t.createElement(e):(r||(r=f(t)),!(i=r.cache[e]?r.cache[e].cloneNode():c.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e)).canHaveChildren||a.test(e)||i.tagUrn?i:r.frag.appendChild(i));var i}function p(e){e||(e=n);var t=f(e);return!h.shivCSS||r||t.hasCSS||(t.hasCSS=!!function(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x",r.insertBefore(n.lastChild,r.firstChild)}(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),o||function(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return h.shivMethods?d(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/[\w\-:]+/g,(function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'}))+");return n}")(h,t.frag)}(e,t),e}!function(){try{var e=n.createElement("a");e.innerHTML="",r="hidden"in e,o=1==e.childNodes.length||function(){n.createElement("a");var e=n.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(t){r=!0,o=!0}}();var h={elements:i.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:"3.7.3",shivCSS:!1!==i.shivCSS,supportsUnknownElements:o,shivMethods:!1!==i.shivMethods,type:"default",shivDocument:p,createElement:d,createDocumentFragment:function(e,t){if(e||(e=n),o)return e.createDocumentFragment();for(var r=(t=t||f(e)).frag.cloneNode(),i=0,a=l(),c=a.length;i3?c(a):null,b=String(a.key),_=String(a.char),w=a.location,x=a.keyCode||(a.keyCode=b)&&b.charCodeAt(0)||0,E=a.charCode||(a.charCode=_)&&_.charCodeAt(0)||0,C=a.bubbles,N=a.cancelable,S=a.repeat,k=a.locale,O=a.view||e;if(a.which||(a.which=a.keyCode),"initKeyEvent"in d)d.initKeyEvent(t,C,N,O,p,v,h,g,x,E);else if(0>>0),t=Element.prototype,n=t.querySelector,r=t.querySelectorAll;function o(t,n,r){t.setAttribute(e,null);var o=n.call(t,String(r).replace(/(^|,\s*)(:scope([ >]|$))/g,(function(t,n,r,o){return n+"["+e+"]"+(o||" ")})));return t.removeAttribute(e),o}t.querySelector=function(e){return o(this,n,e)},t.querySelectorAll=function(e){return o(this,r,e)}}()}}(window),function(e){var t=e.WeakMap||function(){var e,t=0,n=!1,r=!1;function o(t,o,i){r=i,n=!1,e=undefined,t.dispatchEvent(o)}function i(e){this.value=e}function c(){t++,this.__ce__=new a("@DOMMap:"+t+Math.random())}return i.prototype.handleEvent=function(t){n=!0,r?t.currentTarget.removeEventListener(t.type,this,!1):e=this.value},c.prototype={constructor:c,"delete":function(e){return o(e,this.__ce__,!0),n},get:function(t){o(t,this.__ce__,!1);var n=e;return e=undefined,n},has:function(e){return o(e,this.__ce__,!1),n},set:function(e,t){return o(e,this.__ce__,!0),e.addEventListener(this.__ce__.type,new i(t),!1),this}},c}();function n(){}function r(e,t,n){function o(e){o.once&&(e.currentTarget.removeEventListener(e.type,t,o),o.removed=!0),o.passive&&(e.preventDefault=r.preventDefault),"function"==typeof o.callback?o.callback.call(this,e):o.callback&&o.callback.handleEvent(e),o.passive&&delete e.preventDefault}return o.type=e,o.callback=t,o.capture=!!n.capture,o.passive=!!n.passive,o.once=!!n.once,o.removed=!1,o}n.prototype=(Object.create||Object)(null),r.preventDefault=function(){};var o,i,a=e.CustomEvent,c=e.dispatchEvent,u=e.addEventListener,s=e.removeEventListener,l=0,f=function(){l++},d=[].indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},p=function(e){return"".concat(e.capture?"1":"0",e.passive?"1":"0",e.once?"1":"0")};try{u("_",f,{once:!0}),c(new a("_")),c(new a("_")),s("_",f,{once:!0})}catch(h){}1!==l&&(i=new t,o=function(e){if(e){var t=e.prototype;t.addEventListener=function(e){return function(t,o,a){if(a&&"boolean"!=typeof a){var c,u,s,l=i.get(this),f=p(a);l||i.set(this,l=new n),t in l||(l[t]={handler:[],wrap:[]}),u=l[t],(c=d.call(u.handler,o))<0?(c=u.handler.push(o)-1,u.wrap[c]=s=new n):s=u.wrap[c],f in s||(s[f]=r(t,o,a),e.call(this,t,s[f],s[f].capture))}else e.call(this,t,o,a)}}(t.addEventListener),t.removeEventListener=function(e){return function(t,n,r){if(r&&"boolean"!=typeof r){var o,a,c,u,s=i.get(this);if(s&&t in s&&(c=s[t],-1<(a=d.call(c.handler,n))&&(o=p(r))in(u=c.wrap[a]))){for(o in e.call(this,t,u[o],u[o].capture),delete u[o],u)return;c.handler.splice(a,1),c.wrap.splice(a,1),0===c.handler.length&&delete s[t]}}else e.call(this,t,n,r)}}(t.removeEventListener)}},e.EventTarget?o(EventTarget):(o(e.Text),o(e.Element||e.HTMLElement),o(e.HTMLDocument),o(e.Window||{prototype:e}),o(e.XMLHttpRequest)))}(window)},function(e,t,n){"use strict";!function(e){if("undefined"!=typeof e.setAttribute){var t=function(e){return e.replace(/-[a-z]/g,(function(e){return e[1].toUpperCase()}))};e.setProperty=function(e,n){var r=t(e);if(!n)return this.removeAttribute(r);var o=String(n);return this.setAttribute(r,o)},e.getPropertyValue=function(e){var n=t(e);return this.getAttribute(n)||null},e.removeProperty=function(e){var n=t(e),r=this.getAttribute(n);return this.removeAttribute(n),r}}}(CSSStyleDeclaration.prototype)},function(e,t,n){"use strict";window.Int32Array||(window.Int32Array=Array)},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";(function(e){ +/*! loadCSS. [c]2017 Filament Group, Inc. MIT License */ +var n;n=void 0!==e?e:void 0,t.loadCSS=function(e,t,r,o){var i,a=n.document,c=a.createElement("link");if(t)i=t;else{var u=(a.body||a.getElementsByTagName("head")[0]).childNodes;i=u[u.length-1]}var s=a.styleSheets;if(o)for(var l in o)o.hasOwnProperty(l)&&c.setAttribute(l,o[l]);c.rel="stylesheet",c.href=e,c.media="only x",function p(e){if(a.body)return e();setTimeout((function(){p(e)}))}((function(){i.parentNode.insertBefore(c,t?i:i.nextSibling)}));var f=function h(e){for(var t=c.href,n=s.length;n--;)if(s[n].href===t)return e();setTimeout((function(){h(e)}))};function d(){c.addEventListener&&c.removeEventListener("load",d),c.media=r||"all"}return c.addEventListener&&c.addEventListener("load",d),c.onloadcssdefined=f,f(d),c}}).call(this,n(121))},function(e,t,n){"use strict";t.__esModule=!0,t.vecNormalize=t.vecLength=t.vecInverse=t.vecScale=t.vecDivide=t.vecMultiply=t.vecSubtract=t.vecAdd=t.vecCreate=void 0;var r=n(113);t.vecCreate=function(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),a=1;a1?t-1:0),r=1;r=0||(o[n]=e[n]);return o}(e,["className"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["BlockQuote",t])},n)))}},function(e,t,n){"use strict";var r,o;t.__esModule=!0,t.VNodeFlags=t.ChildFlags=void 0,t.VNodeFlags=r,function(e){e[e.HtmlElement=1]="HtmlElement",e[e.ComponentUnknown=2]="ComponentUnknown",e[e.ComponentClass=4]="ComponentClass",e[e.ComponentFunction=8]="ComponentFunction",e[e.Text=16]="Text",e[e.SvgElement=32]="SvgElement",e[e.InputElement=64]="InputElement",e[e.TextareaElement=128]="TextareaElement",e[e.SelectElement=256]="SelectElement",e[e.Void=512]="Void",e[e.Portal=1024]="Portal",e[e.ReCreate=2048]="ReCreate",e[e.ContentEditable=4096]="ContentEditable",e[e.Fragment=8192]="Fragment",e[e.InUse=16384]="InUse",e[e.ForwardRef=32768]="ForwardRef",e[e.Normalized=65536]="Normalized",e[e.ForwardRefComponent=32776]="ForwardRefComponent",e[e.FormElement=448]="FormElement",e[e.Element=481]="Element",e[e.Component=14]="Component",e[e.DOMRef=2033]="DOMRef",e[e.InUseOrNormalized=81920]="InUseOrNormalized",e[e.ClearInUse=-16385]="ClearInUse",e[e.ComponentKnown=12]="ComponentKnown"}(r||(t.VNodeFlags=r={})),t.ChildFlags=o,function(e){e[e.UnknownChildren=0]="UnknownChildren",e[e.HasInvalidChildren=1]="HasInvalidChildren",e[e.HasVNodeChildren=2]="HasVNodeChildren",e[e.HasNonKeyedChildren=4]="HasNonKeyedChildren",e[e.HasKeyedChildren=8]="HasKeyedChildren",e[e.HasTextChildren=16]="HasTextChildren",e[e.MultipleChildren=12]="MultipleChildren"}(o||(t.ChildFlags=o={}))},function(e,t,n){"use strict";t.__esModule=!0,t.ByondUi=void 0;var r=n(2),o=n(9),i=n(406),a=n(20),c=n(54),u=n(13);function s(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var l=(0,c.createLogger)("ByondUi"),f=[];window.addEventListener("beforeunload",(function(){for(var e=0;e=0||(o[n]=e[n]);return o}(t,["data","rangeX","rangeY","fillColor","strokeColor","strokeWidth"]),g=this.state.viewBox,m=function(e,t,n,r){if(0===e.length)return[];var i=(0,o.zipWith)(Math.min).apply(void 0,e),a=(0,o.zipWith)(Math.max).apply(void 0,e);return n!==undefined&&(i[0]=n[0],a[0]=n[1]),r!==undefined&&(i[1]=r[0],a[1]=r[1]),(0,o.map)((function(e){return(0,o.zipWith)((function(e,t,n,r){return(e-t)/(n-t)*r}))(e,i,a,t)}))(e)}(i,g,a,u);if(m.length>0){var y=m[0],b=m[m.length-1];m.push([g[0]+h,b[1]]),m.push([g[0]+h,-h]),m.push([-h,-h]),m.push([-h,y[1]])}var _=function(e){for(var t="",n=0;n=0||(o[n]=e[n]);return o}(t,["children","color","title","buttons"]);return(0,r.createComponentVNode)(2,o.Box,{mb:1,children:[(0,r.createVNode)(1,"div","Table",[(0,r.createVNode)(1,"div","Table__cell",(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Button,Object.assign({fluid:!0,color:u,icon:n?"chevron-down":"chevron-right",onClick:function(){return e.setState({open:!n})}},f,{children:s}))),2),l&&(0,r.createVNode)(1,"div","Table__cell Table__cell--collapsing",l,0)],0),n&&(0,r.createComponentVNode)(2,o.Box,{mt:1,children:a})]})},a}(r.Component);t.Collapsible=a},function(e,t,n){"use strict";t.__esModule=!0,t.ColorBox=void 0;var r=n(2),o=n(9),i=n(13);var a=function(e){var t=e.content,n=(e.children,e.className),a=e.color,c=e.backgroundColor,u=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["content","children","className","color","backgroundColor"]);return u.color=t?null:"transparent",u.backgroundColor=a||c,(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,o.classes)(["ColorBox",n,(0,i.computeBoxClassName)(u)]),t||".",0,Object.assign({},(0,i.computeBoxProps)(u))))};t.ColorBox=a,a.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Dropdown=void 0;var r=n(2),o=n(9),i=n(13),a=n(118);function c(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var u=function(e){var t,n;function u(t){var n;return(n=e.call(this,t)||this).state={selected:t.selected,open:!1},n.handleClick=function(){n.state.open&&n.setOpen(!1)},n}n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=u.prototype;return s.componentWillUnmount=function(){window.removeEventListener("click",this.handleClick)},s.setOpen=function(e){var t=this;this.setState({open:e}),e?(setTimeout((function(){return window.addEventListener("click",t.handleClick)})),this.menuRef.focus()):window.removeEventListener("click",this.handleClick)},s.setSelected=function(e){this.setState({selected:e}),this.setOpen(!1),this.props.onSelected(e)},s.buildMenu=function(){var e=this,t=this.props.options,n=(void 0===t?[]:t).map((function(t){return(0,r.createVNode)(1,"div","Dropdown__menuentry",t,0,{onClick:function(){e.setSelected(t)}},t)}));return n.length?n:"No Options Found"},s.render=function(){var e=this,t=this.props,n=t.color,u=void 0===n?"default":n,s=t.over,l=t.noscroll,f=t.nochevron,d=t.width,p=(t.onClick,t.selected,t.disabled),h=c(t,["color","over","noscroll","nochevron","width","onClick","selected","disabled"]),v=h.className,g=c(h,["className"]),m=s?!this.state.open:this.state.open,y=this.state.open?(0,r.createVNode)(1,"div",(0,o.classes)([l?"Dropdown__menu-noscroll":"Dropdown__menu",s&&"Dropdown__over"]),this.buildMenu(),0,{tabIndex:"-1",style:{width:d}},null,(function(t){e.menuRef=t})):null;return(0,r.createVNode)(1,"div","Dropdown",[(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({width:d,className:(0,o.classes)(["Dropdown__control","Button","Button--color--"+u,p&&"Button--disabled",v])},g,{onClick:function(){p&&!e.state.open||e.setOpen(!e.state.open)},children:[(0,r.createVNode)(1,"span","Dropdown__selected-text",this.state.selected,0),!!f||(0,r.createVNode)(1,"span","Dropdown__arrow-button",(0,r.createComponentVNode)(2,a.Icon,{name:m?"chevron-up":"chevron-down"}),2)]}))),y],0)},u}(r.Component);t.Dropdown=u},function(e,t,n){"use strict";t.__esModule=!0,t.GridColumn=t.Grid=void 0;var r=n(2),o=n(119),i=n(9);function a(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var c=function(e){var t=e.children,n=a(e,["children"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,o.Table,Object.assign({},n,{children:(0,r.createComponentVNode)(2,o.Table.Row,{children:t})})))};t.Grid=c,c.defaultHooks=i.pureComponentHooks;var u=function(e){var t=e.size,n=void 0===t?1:t,i=e.style,c=a(e,["size","style"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,o.Table.Cell,Object.assign({style:Object.assign({width:n+"%"},i)},c)))};t.GridColumn=u,c.defaultHooks=i.pureComponentHooks,c.Column=u},function(e,t,n){"use strict";t.__esModule=!0,t.Input=void 0;var r=n(2),o=n(9),i=n(13);function a(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var c=function(e){return(0,o.isFalsy)(e)?"":e},u=function(e){var t,n;function u(){var t;return(t=e.call(this)||this).inputRef=(0,r.createRef)(),t.state={editing:!1},t.handleInput=function(e){var n=t.state.editing,r=t.props.onInput;n||t.setEditing(!0),r&&r(e,e.target.value)},t.handleFocus=function(e){t.state.editing||t.setEditing(!0)},t.handleBlur=function(e){var n=t.state.editing,r=t.props.onChange;n&&(t.setEditing(!1),r&&r(e,e.target.value))},t.handleKeyDown=function(e){var n=t.props,r=n.onInput,o=n.onChange,i=n.onEnter;return 13===e.keyCode?(t.setEditing(!1),o&&o(e,e.target.value),r&&r(e,e.target.value),i&&i(e,e.target.value),void(t.props.selfClear?e.target.value="":e.target.blur())):27===e.keyCode?(t.setEditing(!1),e.target.value=c(t.props.value),void e.target.blur()):void 0},t}n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=u.prototype;return s.componentDidMount=function(){var e=this.props.value,t=this.inputRef.current;t&&(t.value=c(e))},s.componentDidUpdate=function(e,t){var n=this.state.editing,r=e.value,o=this.props.value,i=this.inputRef.current;i&&!n&&r!==o&&(i.value=c(o))},s.setEditing=function(e){this.setState({editing:e})},s.render=function(){var e=this.props,t=(e.selfClear,e.onInput,e.onChange,e.onEnter,e.value,e.maxLength),n=e.placeholder,c=a(e,["selfClear","onInput","onChange","onEnter","value","maxLength","placeholder"]),u=c.className,s=c.fluid,l=a(c,["className","fluid"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["Input",s&&"Input--fluid",u])},l,{children:[(0,r.createVNode)(1,"div","Input__baseline",".",16),(0,r.createVNode)(64,"input","Input__input",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,maxLength:t},null,this.inputRef)]})))},u}(r.Component);t.Input=u},function(e,t,n){"use strict";t.__esModule=!0,t.Knob=void 0;var r=n(2),o=n(55),i=n(9),a=n(20),c=n(13),u=n(165),s=n(120);t.Knob=function(e){if(a.IS_IE8)return(0,r.normalizeProps)((0,r.createComponentVNode)(2,s.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,l=e.maxValue,f=e.minValue,d=e.onChange,p=e.onDrag,h=e.step,v=e.stepPixelSize,g=e.suppressFlicker,m=e.unit,y=e.value,b=e.className,_=e.style,w=e.fillValue,x=e.color,E=e.ranges,C=void 0===E?{}:E,N=e.size,S=e.bipolar,k=(e.children,function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","style","fillValue","color","ranges","size","bipolar","children"]));return(0,r.normalizeProps)((0,r.createComponentVNode)(2,u.DraggableControl,Object.assign({dragMatrix:[0,-1]},{animated:t,format:n,maxValue:l,minValue:f,onChange:d,onDrag:p,step:h,stepPixelSize:v,suppressFlicker:g,unit:m,value:y},{children:function(e){var t=e.dragging,n=(e.editing,e.value),a=e.displayValue,u=e.displayElement,s=e.inputElement,d=e.handleDragStart,p=(0,o.scale)(null!=w?w:a,f,l),h=(0,o.scale)(a,f,l),v=x||(0,o.keyOfMatchingRange)(null!=w?w:n,C)||"default",g=270*(h-.5);return(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,i.classes)(["Knob","Knob--color--"+v,S&&"Knob--bipolar",b,(0,c.computeBoxClassName)(k)]),[(0,r.createVNode)(1,"div","Knob__circle",(0,r.createVNode)(1,"div","Knob__cursorBox",(0,r.createVNode)(1,"div","Knob__cursor"),2,{style:{transform:"rotate("+g+"deg)"}}),2),t&&(0,r.createVNode)(1,"div","Knob__popupValue",u,0),(0,r.createVNode)(32,"svg","Knob__ring Knob__ringTrackPivot",(0,r.createVNode)(32,"circle","Knob__ringTrack",null,1,{cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),(0,r.createVNode)(32,"svg","Knob__ring Knob__ringFillPivot",(0,r.createVNode)(32,"circle","Knob__ringFill",null,1,{style:{"stroke-dashoffset":((S?2.75:2)-1.5*p)*Math.PI*50},cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),s],0,Object.assign({},(0,c.computeBoxProps)(Object.assign({style:Object.assign({"font-size":N+"rem"},_)},k)),{onMouseDown:d})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledControls=void 0;var r=n(2),o=n(164);function i(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var a=function(e){var t=e.children,n=i(e,["children"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,o.Flex,Object.assign({mx:-.5,align:"stretch",justify:"space-between"},n,{children:t})))};t.LabeledControls=a;a.Item=function(e){var t=e.label,n=e.children,a=i(e,["label","children"]);return(0,r.createComponentVNode)(2,o.Flex.Item,{mx:1,children:(0,r.normalizeProps)((0,r.createComponentVNode)(2,o.Flex,Object.assign({minWidth:"52px",height:"100%",direction:"column",align:"center",textAlign:"center",justify:"space-between"},a,{children:[(0,r.createComponentVNode)(2,o.Flex.Item),(0,r.createComponentVNode)(2,o.Flex.Item,{children:n}),(0,r.createComponentVNode)(2,o.Flex.Item,{color:"label",children:t})]})))})}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledListDivider=t.LabeledListItem=t.LabeledList=void 0;var r=n(2),o=n(9),i=n(13),a=n(163),c=function(e){var t=e.children;return(0,r.createVNode)(1,"table","LabeledList",t,0)};t.LabeledList=c,c.defaultHooks=o.pureComponentHooks;var u=function(e){var t=e.className,n=e.label,a=e.labelColor,c=void 0===a?"label":a,u=e.color,s=e.textAlign,l=e.buttons,f=e.content,d=e.children;return(0,r.createVNode)(1,"tr",(0,o.classes)(["LabeledList__row",t]),[(0,r.createComponentVNode)(2,i.Box,{as:"td",color:c,className:(0,o.classes)(["LabeledList__cell","LabeledList__label"]),children:n?n+":":null}),(0,r.createComponentVNode)(2,i.Box,{as:"td",color:u,textAlign:s,className:(0,o.classes)(["LabeledList__cell","LabeledList__content"]),colSpan:l?undefined:2,children:[f,d]}),l&&(0,r.createVNode)(1,"td","LabeledList__cell LabeledList__buttons",l,0)],0)};t.LabeledListItem=u,u.defaultHooks=o.pureComponentHooks;var s=function(e){var t=e.size?(0,i.unit)(Math.max(0,e.size-1)):0;return(0,r.createVNode)(1,"tr","LabeledList__row",(0,r.createVNode)(1,"td",null,(0,r.createComponentVNode)(2,a.Divider),2,{colSpan:3,style:{"padding-top":t,"padding-bottom":t}}),2)};t.LabeledListDivider=s,s.defaultHooks=o.pureComponentHooks,c.Item=u,c.Divider=s},function(e,t,n){"use strict";t.__esModule=!0,t.NanoMap=void 0;var r=n(2),o=n(38),i=n(32),a=function(e,t){var n=(0,i.useBackend)(t).config,a=e.onClick;return(0,r.createComponentVNode)(2,o.Box,{className:"NanoMap__container",children:(0,r.createComponentVNode)(2,o.Box,{as:"img",src:n.map+"_nanomap_z1.png",style:{width:"512px",height:"512px"},onClick:a})})};t.NanoMap=a;a.Marker=function(e){var t=e.x,n=e.y,i=e.icon,a=e.tooltip,c=e.color;return(0,r.createComponentVNode)(2,o.Box,{position:"absolute",className:"NanoMap__marker",top:2*(255-n)+2+"px",left:2*t+2+"px",children:[(0,r.createComponentVNode)(2,o.Icon,{name:i,color:c,size:.5}),(0,r.createComponentVNode)(2,o.Tooltip,{content:a})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Modal=void 0;var r=n(2),o=n(9),i=n(13),a=n(162);t.Modal=function(e){var t=e.className,n=e.children,c=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","children"]);return(0,r.createComponentVNode)(2,a.Dimmer,{children:(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,o.classes)(["Modal",t,(0,i.computeBoxClassName)(c)]),n,0,Object.assign({},(0,i.computeBoxProps)(c))))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NoticeBox=void 0;var r=n(2),o=n(9),i=n(13);var a=function(e){var t=e.className,n=e.color,a=e.info,c=(e.warning,e.success),u=e.danger,s=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","color","info","warning","success","danger"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["NoticeBox",n&&"NoticeBox--color--"+n,a&&"NoticeBox--type--info",c&&"NoticeBox--type--success",u&&"NoticeBox--type--danger",t])},s)))};t.NoticeBox=a,a.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.ProgressBar=void 0;var r=n(2),o=n(55),i=n(9),a=n(13);var c=function(e){var t=e.className,n=e.value,c=e.minValue,u=void 0===c?0:c,s=e.maxValue,l=void 0===s?1:s,f=e.color,d=e.ranges,p=void 0===d?{}:d,h=e.children,v=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","value","minValue","maxValue","color","ranges","children"]),g=(0,o.scale)(n,u,l),m=h!==undefined,y=f||(0,o.keyOfMatchingRange)(n,p)||"default";return(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,i.classes)(["ProgressBar","ProgressBar--color--"+y,t,(0,a.computeBoxClassName)(v)]),[(0,r.createVNode)(1,"div","ProgressBar__fill ProgressBar__fill--animated",null,1,{style:{width:100*(0,o.clamp01)(g)+"%"}}),(0,r.createVNode)(1,"div","ProgressBar__content",m?h:(0,o.toFixed)(100*g)+"%",0)],4,Object.assign({},(0,a.computeBoxProps)(v))))};t.ProgressBar=c,c.defaultHooks=i.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Section=void 0;var r=n(2),o=n(9),i=n(13);var a=function(e){var t=e.className,n=e.title,a=e.level,c=void 0===a?1:a,u=e.buttons,s=e.content,l=e.children,f=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["className","title","level","buttons","content","children"]),d=!(0,o.isFalsy)(n)||!(0,o.isFalsy)(u),p=!(0,o.isFalsy)(s)||!(0,o.isFalsy)(l);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,i.Box,Object.assign({className:(0,o.classes)(["Section","Section--level--"+c,t])},f,{children:[d&&(0,r.createVNode)(1,"div","Section__title",[(0,r.createVNode)(1,"span","Section__titleText",n,0),(0,r.createVNode)(1,"div","Section__buttons",u,0)],4),p&&(0,r.createVNode)(1,"div","Section__content",[s,l],0)]})))};t.Section=a,a.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Slider=void 0;var r=n(2),o=n(55),i=n(9),a=n(20),c=n(13),u=n(165),s=n(120);t.Slider=function(e){if(a.IS_IE8)return(0,r.normalizeProps)((0,r.createComponentVNode)(2,s.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,l=e.maxValue,f=e.minValue,d=e.onChange,p=e.onDrag,h=e.step,v=e.stepPixelSize,g=e.suppressFlicker,m=e.unit,y=e.value,b=e.className,_=e.fillValue,w=e.color,x=e.ranges,E=void 0===x?{}:x,C=e.children,N=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","fillValue","color","ranges","children"]),S=C!==undefined;return(0,r.normalizeProps)((0,r.createComponentVNode)(2,u.DraggableControl,Object.assign({dragMatrix:[1,0]},{animated:t,format:n,maxValue:l,minValue:f,onChange:d,onDrag:p,step:h,stepPixelSize:v,suppressFlicker:g,unit:m,value:y},{children:function(e){var t=e.dragging,n=(e.editing,e.value),a=e.displayValue,u=e.displayElement,s=e.inputElement,d=e.handleDragStart,p=_!==undefined&&null!==_,h=((0,o.scale)(n,f,l),(0,o.scale)(null!=_?_:a,f,l)),v=(0,o.scale)(a,f,l),g=w||(0,o.keyOfMatchingRange)(null!=_?_:n,E)||"default";return(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,i.classes)(["Slider","ProgressBar","ProgressBar--color--"+g,b,(0,c.computeBoxClassName)(N)]),[(0,r.createVNode)(1,"div",(0,i.classes)(["ProgressBar__fill",p&&"ProgressBar__fill--animated"]),null,1,{style:{width:100*(0,o.clamp01)(h)+"%",opacity:.4}}),(0,r.createVNode)(1,"div","ProgressBar__fill",null,1,{style:{width:100*(0,o.clamp01)(Math.min(h,v))+"%"}}),(0,r.createVNode)(1,"div","Slider__cursorOffset",[(0,r.createVNode)(1,"div","Slider__cursor"),(0,r.createVNode)(1,"div","Slider__pointer"),t&&(0,r.createVNode)(1,"div","Slider__popupValue",u,0)],0,{style:{width:100*(0,o.clamp01)(v)+"%"}}),(0,r.createVNode)(1,"div","ProgressBar__content",S?C:u,0),s],0,Object.assign({},(0,c.computeBoxProps)(N),{onMouseDown:d})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.Tabs=void 0;var r=n(2),o=n(9),i=n(13),a=n(117);function c(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var u=function(e){var t=e.className,n=e.vertical,a=e.children,u=c(e,["className","vertical","children"]);return(0,r.normalizeProps)((0,r.createVNode)(1,"div",(0,o.classes)(["Tabs",n?"Tabs--vertical":"Tabs--horizontal",t,(0,i.computeBoxClassName)(u)]),(0,r.createVNode)(1,"div","Tabs__tabBox",a,0),2,Object.assign({},(0,i.computeBoxProps)(u))))};t.Tabs=u;u.Tab=function(e){var t=e.className,n=e.selected,i=e.altSelection,u=c(e,["className","selected","altSelection"]);return(0,r.normalizeProps)((0,r.createComponentVNode)(2,a.Button,Object.assign({className:(0,o.classes)(["Tabs__tab",n&&"Tabs__tab--selected",i&&n&&"Tabs__tab--altSelection",t]),selected:!i&&n,color:"transparent"},u)))}},function(e,t,n){"use strict";function r(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n",apos:"'"};return e.replace(/
    /gi,"\n").replace(/<\/?[a-z0-9-_]+[^>]*>/gi,"").replace(/&(nbsp|amp|quot|lt|gt|apos);/g,(function(e,n){return t[n]})).replace(/&#?([0-9]+);/gi,(function(e,t){var n=parseInt(t,10);return String.fromCharCode(n)})).replace(/&#x?([0-9a-f]+);/gi,(function(e,t){var n=parseInt(t,16);return String.fromCharCode(n)}))};t.buildQueryString=function(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}},function(e,t,n){var r={"./AtmosAlertConsole.js":425,"./BlueSpaceArtilleryControl.js":426,"./CrewMonitor.js":427,"./DisposalBin.js":428,"./NtosStationAlertConsole.js":429,"./StationAlertConsole.js":167,"./Wires.js":430};function o(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id=424},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosAlertConsole=void 0;var r=n(2),o=n(32),i=n(38),a=n(37);t.AtmosAlertConsole=function(e,t){var n=(0,o.useBackend)(t),c=n.act,u=n.data,s=u.priority||[],l=u.minor||[];return(0,r.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,r.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,r.createComponentVNode)(2,i.Section,{title:"Alarms",children:(0,r.createVNode)(1,"ul",null,[0===s.length&&(0,r.createVNode)(1,"li","color-good","No Priority Alerts",16),s.map((function(e){return(0,r.createVNode)(1,"li",null,(0,r.createComponentVNode)(2,i.Button,{icon:"times",content:e,color:"bad",onClick:function(){return c("clear",{zone:e})}}),2,null,e)})),0===l.length&&(0,r.createVNode)(1,"li","color-good","No Minor Alerts",16),l.map((function(e){return(0,r.createVNode)(1,"li",null,(0,r.createComponentVNode)(2,i.Button,{icon:"times",content:e,color:"average",onClick:function(){return c("clear",{zone:e})}}),2,null,e)}))],0)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BlueSpaceArtilleryControl=void 0;var r=n(2),o=n(32),i=n(38),a=n(37);t.BlueSpaceArtilleryControl=function(e,t){var n,c=(0,o.useBackend)(t),u=c.act,s=c.data;return n=s.ready?(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",color:"green",children:"Ready"}):s.reloadtime_text?(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Reloading In",color:"red",children:s.reloadtime_text}):(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",color:"red",children:"No cannon connected!"}),(0,r.createComponentVNode)(2,a.Window,{children:(0,r.createComponentVNode)(2,a.Window.Content,{children:(0,r.createComponentVNode)(2,i.Section,{children:(0,r.createComponentVNode)(2,i.LabeledList,{children:[s.notice&&(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Alert",color:"red",children:s.notice}),n,(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Target",children:(0,r.createComponentVNode)(2,i.Button,{icon:"crosshairs",content:s.target?s.target:"None",onClick:function(){return u("recalibrate")}})}),1===s.ready&&!!s.target&&(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Firing",children:(0,r.createComponentVNode)(2,i.Button,{icon:"skull",content:"FIRE!",color:"red",onClick:function(){return u("fire")}})}),!s.connected&&(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Maintenance",children:(0,r.createComponentVNode)(2,i.Button,{icon:"wrench",content:"Complete Deployment",onClick:function(){return u("build")}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CrewMonitor=void 0;var r=n(2),o=n(113),i=n(32),a=n(37),c=n(38),u=n(119);t.CrewMonitor=function(e,t){var n=(0,i.useBackend)(t),s=n.act,l=n.data,f=(0,o.sortBy)((function(e){return e.name}))(l.crewmembers||[]);return(0,r.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,r.createComponentVNode)(2,a.Window.Content,{children:[f.filter((function(e){return 3===e.sensor_type})).map((function(e){return(0,r.createComponentVNode)(2,c.NanoMap.Marker,{x:e.x,y:e.y,icon:"circle",tooltip:e.name,color:e.dead?"red":"green"},e.ref)})),(0,r.createComponentVNode)(2,c.NanoMap),(0,r.createComponentVNode)(2,c.Box,{className:"NanoMap__contentOffset",children:(0,r.createComponentVNode)(2,c.Box,{bold:!0,m:2,children:(0,r.createComponentVNode)(2,c.Table,{children:[(0,r.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,r.createComponentVNode)(2,c.Table.Cell,{children:"Name"}),(0,r.createComponentVNode)(2,c.Table.Cell,{children:"Status"}),(0,r.createComponentVNode)(2,c.Table.Cell,{children:"Location"})]}),f.map((function(e){return(0,r.createComponentVNode)(2,c.Table.Row,{children:[(0,r.createComponentVNode)(2,u.TableCell,{children:[e.name," (",e.assignment,")"]}),(0,r.createComponentVNode)(2,u.TableCell,{children:[(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:e.dead?"red":"green",children:e.dead?"Deceased":"Living"}),e.sensor_type>=2?(0,r.createComponentVNode)(2,c.Box,{inline:!0,children:["(",(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:"red",children:e.brute}),"|",(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:"orange",children:e.fire}),"|",(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:"green",children:e.tox}),"|",(0,r.createComponentVNode)(2,c.Box,{inline:!0,color:"blue",children:e.oxy}),")"]}):null]}),(0,r.createComponentVNode)(2,u.TableCell,{children:3===e.sensor_type?l.isAI?(0,r.createComponentVNode)(2,c.Button,{fluid:!0,content:e.area+" ("+e.x+", "+e.y+")",onClick:function(){return s("track",{track:e.ref})}}):e.area+" ("+e.x+", "+e.y+")":"Not Available"})]},e.name)}))]})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DisposalBin=void 0;var r=n(2),o=n(32),i=n(38),a=n(37);t.DisposalBin=function(e,t){var n,c,u=(0,o.useBackend)(t),s=u.act,l=u.data;return 2===l.mode?(n="good",c="Ready"):l.mode<=0?(n="bad",c="N/A"):1===l.mode?(n="average",c="Pressurizing"):(n="average",c="Idle"),(0,r.createComponentVNode)(2,a.Window,{children:(0,r.createComponentVNode)(2,a.Window.Content,{children:(0,r.createComponentVNode)(2,i.Section,{children:[(0,r.createComponentVNode)(2,i.Box,{bold:!0,m:1,children:"Status"}),(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"State",color:n,children:c}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Pressure",children:(0,r.createComponentVNode)(2,i.ProgressBar,{ranges:{bad:[-Infinity,0],average:[0,99],good:[99,Infinity]},value:l.pressure,minValue:0,maxValue:100})})]}),(0,r.createComponentVNode)(2,i.Box,{bold:!0,m:1,children:"Controls"}),(0,r.createComponentVNode)(2,i.LabeledList,{children:[(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Handle",children:[(0,r.createComponentVNode)(2,i.Button,{icon:"toggle-off",disabled:l.isAI||l.panel_open,content:"Disengaged",selected:l.flushing?null:"selected",onClick:function(){return s("disengageHandle")}}),(0,r.createComponentVNode)(2,i.Button,{icon:"toggle-on",disabled:l.isAI||l.panel_open,content:"Engaged",selected:l.flushing?"selected":null,onClick:function(){return s("engageHandle")}})]}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Power",children:[(0,r.createComponentVNode)(2,i.Button,{icon:"toggle-off",disabled:-1===l.mode,content:"Off",selected:l.mode?null:"selected",onClick:function(){return s("pumpOff")}}),(0,r.createComponentVNode)(2,i.Button,{icon:"toggle-on",disabled:-1===l.mode,content:"On",selected:l.mode?"selected":null,onClick:function(){return s("pumpOn")}})]}),(0,r.createComponentVNode)(2,i.LabeledList.Item,{label:"Eject",children:(0,r.createComponentVNode)(2,i.Button,{icon:"sign-out-alt",disabled:l.isAI,content:"Eject Contents",onClick:function(){return s("eject")}})})]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosStationAlertConsole=void 0;var r=n(2),o=n(37),i=n(167);t.NtosStationAlertConsole=function(){return(0,r.createComponentVNode)(2,o.NtosWindow,{resizable:!0,children:(0,r.createComponentVNode)(2,o.NtosWindow.Content,{scrollable:!0,children:(0,r.createComponentVNode)(2,i.StationAlertConsoleContent)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Wires=void 0;var r=n(2),o=n(32),i=n(38),a=n(37);t.Wires=function(e,t){var n=(0,o.useBackend)(t),c=n.act,u=n.data,s=u.wires||[],l=u.status||[];return(0,r.createComponentVNode)(2,a.Window,{children:(0,r.createComponentVNode)(2,a.Window.Content,{children:[(0,r.createComponentVNode)(2,i.Section,{children:(0,r.createComponentVNode)(2,i.LabeledList,{children:s.map((function(e){return(0,r.createComponentVNode)(2,i.LabeledList.Item,{className:"candystripe",label:e.color_name,labelColor:e.seen_color,color:e.seen_color,buttons:(0,r.createFragment)([(0,r.createComponentVNode)(2,i.Button,{content:e.cut?"Mend":"Cut",onClick:function(){return c("cut",{wire:e.color})}}),(0,r.createComponentVNode)(2,i.Button,{content:"Pulse",onClick:function(){return c("pulse",{wire:e.color})}}),(0,r.createComponentVNode)(2,i.Button,{content:e.attached?"Detach":"Attach",onClick:function(){return c("attach",{wire:e.color})}})],4),children:!!e.wire&&(0,r.createVNode)(1,"i",null,[(0,r.createTextVNode)("("),e.wire,(0,r.createTextVNode)(")")],0)},e.seen_color)}))})}),!!l.length&&(0,r.createComponentVNode)(2,i.Section,{children:l.map((function(e){return(0,r.createComponentVNode)(2,i.Box,{color:"lightgray",mt:.1,children:e},e)}))})]})})}}]); +>>>>>>> master diff --git a/tgui/yarn.lock b/tgui/yarn.lock index 8cc9b0c818e..84cab5eb253 100644 --- a/tgui/yarn.lock +++ b/tgui/yarn.lock @@ -1241,9 +1241,9 @@ bluebird@^3.5.5: integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: - version "4.11.8" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" - integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== + version "4.11.9" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" + integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== body-parser@1.19.0: version "1.19.0" @@ -2198,9 +2198,9 @@ electron-to-chromium@^1.3.390: integrity sha512-DbCBdwtARI0l3e3m6ZIxVaTNahb6dSsmGjuag/twiVcWuM4MSpL5IfsJsJSyqLqxosE/m0CXlZaBmxegQW/dAg== elliptic@^6.0.0: - version "6.5.2" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" - integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw== + version "6.5.3" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" + integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== dependencies: bn.js "^4.4.0" brorand "^1.0.1" diff --git a/tools/send2server.py b/tools/send2server.py new file mode 100644 index 00000000000..fd255a3cfb5 --- /dev/null +++ b/tools/send2server.py @@ -0,0 +1,14 @@ +# Script to send world/Topic announcements to a server via automated tooling +# Author: AffectedArc07 +# Takes a message as command line argument +# Example: python send2server.py "This is a message that will be sent to the server" +import socket, struct, urllib.parse, sys + +message = sys.argv[1] +commskey = "YOURKEYHERE" + +sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +cmd = "?hostannounce&key={}&message={}".format(urllib.parse.quote(commskey), urllib.parse.quote(message)) +query = b"\x00\x83" + struct.pack('>H', len(cmd) + 6) + b"\x00\x00\x00\x00\x00" + cmd.encode() + b"\x00" +sock.connect(("localhost", 6666)) +sock.sendall(query)