diff --git a/.dockerignore b/.dockerignore
index 2e6259d23d..9c6ac6b4aa 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,6 +1,5 @@
.dockerignore
.editorconfig
-.travis.yml
GPLv3.txt
LICENSE
README.md
@@ -26,5 +25,4 @@ tgstation.dyn.rsc
libmariadb.dll
rust_g.dll
BSQL.dll
-appveyor.yml
Dockerfile
diff --git a/.gitattributes b/.gitattributes
index c447869d3e..b23dfe6932 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -38,5 +38,8 @@
*.dmm text eol=lf merge=dmm
*.dmi binary merge=dmi
+##Force tab indents on dm files
+*.dm whitespace=indent-with-non-tab
+
## Force changelog merging to use union
html/changelog.html text eol=lf merge=union
diff --git a/.github/workflows/ci_suite.yml b/.github/workflows/ci_suite.yml
new file mode 100644
index 0000000000..76a1c26656
--- /dev/null
+++ b/.github/workflows/ci_suite.yml
@@ -0,0 +1,114 @@
+name: CI Suite
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+jobs:
+ run_linters:
+ if: "!contains(github.event.head_commit.message, '[ci skip]')"
+ name: Run Linters
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup cache
+ uses: actions/cache@v2
+ with:
+ path: $HOME/SpacemanDMM
+ key: ${{ runner.os }}-spacemandmm
+ - name: Install Tools
+ run: |
+ pip3 install setuptools
+ bash tools/ci/install_build_tools.sh
+ bash tools/ci/install_spaceman_dmm.sh dreamchecker
+ pip3 install -r tools/mapmerge2/requirements.txt
+ - name: Run Linters
+ run: |
+ bash tools/ci/check_filedirs.sh tgstation.dme
+ bash tools/ci/check_changelogs.sh
+ find . -name "*.php" -print0 | xargs -0 -n1 php -l
+ find . -name "*.json" -not -path "*/node_modules/*" -print0 | xargs -0 python3 ./tools/json_verifier.py
+ bash tools/ci/build_tgui.sh
+ bash tools/ci/check_grep.sh
+ python3 tools/mapmerge2/dmi.py --test
+ ~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1
+ - name: Annotate Lints
+ uses: yogstation13/DreamAnnotate@v1
+ if: always()
+ with:
+ outputFile: output-annotations.txt
+
+ compile_all_maps:
+ if: "!contains(github.event.head_commit.message, '[ci skip]')"
+ name: Compile Maps
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup cache
+ uses: actions/cache@v2
+ with:
+ path: $HOME/BYOND
+ key: ${{ runner.os }}-byond
+ - name: Compile All Maps
+ run: |
+ bash tools/ci/install_byond.sh
+ source $HOME/BYOND/byond/bin/byondsetup
+ python3 tools/ci/template_dm_generator.py
+ bash tools/ci/dm.sh -DCIBUILDING -DCITESTING -DALL_MAPS tgstation.dme
+ run_all_tests:
+ if: "!contains(github.event.head_commit.message, '[ci skip]')"
+ name: Integration Tests
+ runs-on: ubuntu-latest
+ services:
+ mysql:
+ image: mysql:latest
+ env:
+ MYSQL_ROOT_PASSWORD: root
+ ports:
+ - 3306
+ options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup cache
+ uses: actions/cache@v2
+ with:
+ path: $HOME/BYOND
+ key: ${{ runner.os }}-byond
+ - name: Setup database
+ run: |
+ sudo systemctl start mysql
+ mysql -u root -proot -e 'CREATE DATABASE tg_ci;'
+ mysql -u root -proot tg_ci < SQL/tgstation_schema.sql
+ mysql -u root -proot -e 'CREATE DATABASE tg_ci_prefixed;'
+ mysql -u root -proot tg_ci_prefixed < SQL/tgstation_schema_prefixed.sql
+ - name: Install rust-g
+ run: |
+ sudo dpkg --add-architecture i386
+ sudo apt update || true
+ sudo apt install libssl1.1:i386
+ bash tools/ci/install_rust_g.sh
+ # - name: Compile and run tests
+ # run: |
+ # bash tools/ci/install_byond.sh
+ # source $HOME/BYOND/byond/bin/byondsetup
+ # bash tools/ci/dm.sh -DCIBUILDING tgstation.dme
+ # bash tools/ci/run_server.sh
+ test_windows:
+ if: "!contains(github.event.head_commit.message, '[ci skip]')"
+ name: Windows Build
+ runs-on: windows-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Compile
+ run: pwsh tools/ci/build.ps1
+ - name: Create artifact
+ run: |
+ md deploy
+ bash tools/deploy.sh ./deploy
+ - name: Deploy artifact
+ uses: actions/upload-artifact@v2
+ with:
+ name: deploy
+ path: deploy
diff --git a/.github/workflows/compile_changelogs.yml b/.github/workflows/compile_changelogs.yml
index 4fd396f133..c8756f0d28 100644
--- a/.github/workflows/compile_changelogs.yml
+++ b/.github/workflows/compile_changelogs.yml
@@ -15,7 +15,7 @@ jobs:
CHANGELOG_ENABLER: ${{ secrets.CHANGELOG_ENABLER }}
run: |
unset SECRET_EXISTS
- if [-n $CHANGELOG_ENABLER]; then SECRET_EXISTS='true' ; fi
+ if [ -n $CHANGELOG_ENABLER ]; then SECRET_EXISTS='true' ; fi
echo ::set-output name=CL_ENABLED::${SECRET_EXISTS}
- name: "Setup python"
if: steps.value_holder.outputs.CL_ENABLED
diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml
new file mode 100644
index 0000000000..7417a382c4
--- /dev/null
+++ b/.github/workflows/docker_publish.yml
@@ -0,0 +1,22 @@
+name: Docker Build
+
+on:
+ push:
+ branches:
+ - master
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Build and Publish Docker Image to Registry
+ uses: elgohr/Publish-Docker-Github-Action@master
+ with:
+ name: tgstation/tgstation
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_PASSWORD }}
+ dockerfile: Dockerfile
+ tags: "latest"
+ cache: true
diff --git a/.github/workflows/generate_documentation.yml b/.github/workflows/generate_documentation.yml
new file mode 100644
index 0000000000..d0d61be073
--- /dev/null
+++ b/.github/workflows/generate_documentation.yml
@@ -0,0 +1,31 @@
+name: Generate documentation
+on:
+ push:
+ branches:
+ - master
+jobs:
+ generate_documentation:
+ if: "!contains(github.event.head_commit.message, '[ci skip]')"
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup cache
+ uses: actions/cache@v2
+ with:
+ path: $HOME/SpacemanDMM
+ key: ${{ runner.os }}-spacemandmm
+ - name: Install SpacemanDMM
+ run: bash tools/ci/install_spaceman_dmm.sh dmdoc
+ - name: Generate documentation
+ run: |
+ ~/dmdoc
+ touch dmdoc/.nojekyll
+ echo codedocs.tgstation13.org > dmdoc/CNAME
+ - name: Deploy
+ uses: JamesIves/github-pages-deploy-action@3.7.1
+ with:
+ BRANCH: gh-pages
+ CLEAN: true
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ SINGLE_COMMIT: true
+ FOLDER: dmdoc
diff --git a/.github/workflows/update_tgs_dmapi.yml b/.github/workflows/update_tgs_dmapi.yml
index 6fe53f700c..c7bb5c970c 100644
--- a/.github/workflows/update_tgs_dmapi.yml
+++ b/.github/workflows/update_tgs_dmapi.yml
@@ -26,6 +26,7 @@ jobs:
library-path: 'code/modules/tgs'
- name: Commit and Push
+ continue-on-error: true
run: |
git config user.name tgstation-server
git config user.email tgstation-server@users.noreply.github.com
@@ -35,6 +36,7 @@ jobs:
- name: Create Pull Request
uses: repo-sync/pull-request@v2
+ if: ${{ success() }}
with:
source_branch: "tgs-dmapi-update"
destination_branch: "master"
@@ -42,4 +44,4 @@ jobs:
pr_body: "This pull request updates the TGS DMAPI to the latest version. Please note any breaking or unimplemented changes before merging."
pr_label: "Tools"
pr_allow_empty: false
- github_token: ${{ secrets.GITHUB_TOKEN }}
+ github_token: ${{ secrets.TGS_UPDATER }}
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 83ef6fa8ff..0000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,102 +0,0 @@
-language: generic
-os: linux
-dist: xenial
-
-branches:
- except:
- - ___TGS3TempBranch
- - ___TGSTempBranch
-
-jobs:
- include:
- - name: "Run Linters"
- addons:
- apt:
- packages:
- - python3
- - python3-pip
- - python3-setuptools
- - pcregrep
- - rustc
- - cargo
- cache:
- directories:
- - $HOME/SpacemanDMM
- install:
- - tools/travis/install_build_tools.sh
- - tools/travis/install_spaceman_dmm.sh dreamchecker
- script:
- - tools/travis/check_filedirs.sh tgstation.dme
- - tools/travis/check_changelogs.sh
- - find . -name "*.php" -print0 | xargs -0 -n1 php -l
- - find . -name "*.json" -not -path "*/node_modules/*" -print0 | xargs -0 python3 ./tools/json_verifier.py
- - tools/travis/build_tgui.sh
- - tools/travis/check_grep.sh
- - python3 tools/travis/check_line_endings.py
- - ~/dreamchecker
-
- - name: "Compile All Maps"
- addons:
- apt:
- packages:
- - libstdc++6:i386
- cache:
- directories:
- - $HOME/BYOND
- install:
- - tools/travis/install_byond.sh
- - source $HOME/BYOND/byond/bin/byondsetup
- before_script:
- - tools/travis/template_dm_generator.py
- script:
- - tools/travis/dm.sh -DTRAVISBUILDING -DTRAVISTESTING -DALL_MAPS tgstation.dme
-
- - name: "Compile and Run Tests"
- addons:
- mariadb: '10.2'
- apt:
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - libstdc++6:i386
- - gcc-multilib
- - g++-7
- - g++-7-multilib
- - libmariadb-client-lgpl-dev:i386
- - libmariadbd-dev
- cache:
- directories:
- - $HOME/BYOND
- - $HOME/libmariadb
- install:
- - tools/travis/install_byond.sh
- - source $HOME/BYOND/byond/bin/byondsetup
- - tools/travis/install_libmariadb.sh
- - tools/travis/install_rust_g.sh
- before_script:
- - mysql -u root -e 'CREATE DATABASE tg_travis;'
- - mysql -u root tg_travis < SQL/tgstation_schema.sql
- - mysql -u root -e 'CREATE DATABASE tg_travis_prefixed;'
- - mysql -u root tg_travis_prefixed < SQL/tgstation_schema_prefixed.sql
- - tools/travis/build_bsql.sh
- script:
- - tools/travis/dm.sh -DTRAVISBUILDING tgstation.dme || travis_terminate 1
- - tools/travis/run_server.sh
-
- # - name: "Generate Documentation"
- # # Only run for non-PR commits to the real master branch.
- # if: branch = master AND head_branch IS blank
- # install:
- # - tools/travis/install_spaceman_dmm.sh dmdoc
- # before_script:
- # # Travis checks out a hash, try to get back on a branch.
- # - git checkout $TRAVIS_BRANCH || true
- # script:
- # - ~/dmdoc
- # - touch dmdoc/.nojekyll
- # deploy:
- # provider: pages
- # skip_cleanup: true
- # local_dir: dmdoc
- # token: $DMDOC_GITHUB_TOKEN
- # fqdn: codedocs.tgstation13.org
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
index f79100f563..bf0d9d2fb9 100644
--- a/.vscode/extensions.json
+++ b/.vscode/extensions.json
@@ -1,9 +1,10 @@
{
- "recommendations": [
- "gbasood.byond-dm-language-support",
- "platymuus.dm-langclient",
+ "recommendations": [
+ "gbasood.byond-dm-language-support",
+ "platymuus.dm-langclient",
"EditorConfig.EditorConfig",
"arcanis.vscode-zipfs",
- "dbaeumer.vscode-eslint"
- ]
+ "dbaeumer.vscode-eslint",
+ "kevinkyang.auto-comment-blocks"
+ ]
}
diff --git a/Dockerfile b/Dockerfile
index e8a5f44908..cca7e43a54 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,14 +1,12 @@
-FROM tgstation/byond:513.1508 as base
+FROM tgstation/byond:513.1533 as base
-FROM base as build_base
+FROM base as rust_g
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git \
ca-certificates
-FROM build_base as rust_g
-
WORKDIR /rust_g
RUN apt-get install -y --no-install-recommends \
@@ -27,36 +25,6 @@ RUN /bin/bash -c "source dependencies.sh \
&& git checkout FETCH_HEAD \
&& ~/.cargo/bin/cargo build --release
-FROM build_base as bsql
-
-WORKDIR /bsql
-
-RUN apt-get install -y --no-install-recommends software-properties-common \
- && add-apt-repository ppa:ubuntu-toolchain-r/test \
- && apt-get update \
- && apt-get install -y --no-install-recommends \
- cmake \
- make \
- g++-7 \
- libmariadb-client-lgpl-dev \
- && git init \
- && git remote add origin https://github.com/tgstation/BSQL
-
-COPY dependencies.sh .
-
-RUN /bin/bash -c "source dependencies.sh \
- && git fetch --depth 1 origin \$BSQL_VERSION" \
- && git checkout FETCH_HEAD
-
-WORKDIR /bsql/artifacts
-
-ENV CC=gcc-7 CXX=g++-7
-
-RUN ln -s /usr/include/mariadb /usr/include/mysql \
- && ln -s /usr/lib/i386-linux-gnu /root/MariaDB \
- && cmake .. \
- && make
-
FROM base as dm_base
WORKDIR /tgstation
@@ -65,26 +33,30 @@ FROM dm_base as build
COPY . .
-RUN DreamMaker -max_errors 0 tgstation.dme && tools/deploy.sh /deploy
+RUN DreamMaker -max_errors 0 tgstation.dme \
+ && tools/deploy.sh /deploy \
+ && rm /deploy/*.dll
FROM dm_base
EXPOSE 1337
RUN apt-get update \
+ && apt-get install -y --no-install-recommends software-properties-common \
+ && add-apt-repository ppa:ubuntu-toolchain-r/test \
+ && apt-get update \
+ && apt-get upgrade -y \
+ && apt-get dist-upgrade -y \
&& apt-get install -y --no-install-recommends \
+ libmariadb2 \
mariadb-client \
libssl1.0.0 \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /root/.byond/bin
COPY --from=rust_g /rust_g/target/release/librust_g.so /root/.byond/bin/rust_g
-COPY --from=bsql /bsql/artifacts/src/BSQL/libBSQL.so ./
COPY --from=build /deploy ./
-#bsql fexists memes
-RUN ln -s /tgstation/libBSQL.so /root/.byond/bin/libBSQL.so
-
VOLUME [ "/tgstation/config", "/tgstation/data" ]
ENTRYPOINT [ "DreamDaemon", "tgstation.dmb", "-port", "1337", "-trusted", "-close", "-verbose" ]
diff --git a/SpacemanDMM.toml b/SpacemanDMM.toml
index b827472254..eb25c8a0cd 100644
--- a/SpacemanDMM.toml
+++ b/SpacemanDMM.toml
@@ -1,2 +1,9 @@
[langserver]
dreamchecker = true
+
+#[code_standards]
+#disallow_relative_type_definitions = true
+#disallow_relative_proc_definitions = true
+
+[dmdoc]
+use_typepath_names = true
diff --git a/TGS3.json b/TGS3.json
index 39b75bd913..228854a166 100644
--- a/TGS3.json
+++ b/TGS3.json
@@ -1,22 +1,9 @@
{
"documentation": "/tg/station server 3 configuration file",
- "changelog": {
- "script": "tools/ss13_genchangelog.py",
- "arguments": "html/changelog.html html/changelogs",
- "pip_dependancies": [
- "PyYaml",
- "beautifulsoup4"
- ]
- },
- "synchronize_paths": [
- "html/changelog.html",
- "html/changelogs/*"
- ],
+ "synchronize_paths": [],
"static_directories": [
"config",
"data"
],
- "dlls": [
- "libmariadb.dll"
- ]
+ "dlls": []
}
diff --git a/_maps/RandomRuins/SpaceRuins/skelter.dmm b/_maps/RandomRuins/SpaceRuins/skelter.dmm
index f6e56a6348..77837392e4 100644
--- a/_maps/RandomRuins/SpaceRuins/skelter.dmm
+++ b/_maps/RandomRuins/SpaceRuins/skelter.dmm
@@ -2729,9 +2729,7 @@
/turf/open/floor/carpet,
/area/ruin/space/has_grav/skelter/admin)
"gx" = (
-/obj/machinery/door/firedoor{
- pixel_x = 0
- },
+/obj/machinery/door/firedoor,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/obj/structure/cable/yellow{
icon_state = "1-2"
@@ -2742,9 +2740,7 @@
/turf/open/floor/plasteel/showroomfloor,
/area/ruin/space/has_grav/skelter/shields)
"gy" = (
-/obj/machinery/door/firedoor{
- pixel_x = 0
- },
+/obj/machinery/door/firedoor,
/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/obj/machinery/door/airlock/engineering{
name = "Shields"
diff --git a/_maps/RandomRuins/StationRuins/Lavaland/Mining_Station/Mining_Station_Public_01.dmm b/_maps/RandomRuins/StationRuins/Lavaland/Mining_Station/Mining_Station_Public_01.dmm
index 1aed2fdbb0..69cf7c0867 100644
--- a/_maps/RandomRuins/StationRuins/Lavaland/Mining_Station/Mining_Station_Public_01.dmm
+++ b/_maps/RandomRuins/StationRuins/Lavaland/Mining_Station/Mining_Station_Public_01.dmm
@@ -3170,7 +3170,9 @@
/turf/open/lava/smooth/lava_land_surface,
/area/lavaland/surface/outdoors)
"VY" = (
-/obj/structure/closet/emcloset,
+/obj/structure/closet/emcloset{
+ anchored = 1
+ },
/obj/effect/turf_decal/tile/purple{
dir = 1
},
diff --git a/_maps/_basemap.dm b/_maps/_basemap.dm
index 213211fc42..bf5b4f7d49 100644
--- a/_maps/_basemap.dm
+++ b/_maps/_basemap.dm
@@ -13,7 +13,7 @@
#include "map_files\BoxStation\BoxStation.dmm"
#include "map_files\LambdaStation\lambda.dmm"
- #ifdef TRAVISBUILDING
+ #ifdef CIBUILDING
#include "templates.dm"
#endif
#endif
diff --git a/_maps/map_files/BoxStation/BoxStation.dmm b/_maps/map_files/BoxStation/BoxStation.dmm
index cb257efeba..b81f55be21 100644
--- a/_maps/map_files/BoxStation/BoxStation.dmm
+++ b/_maps/map_files/BoxStation/BoxStation.dmm
@@ -29620,10 +29620,10 @@
/turf/open/floor/plasteel/white,
/area/science/robotics/lab)
"bsU" = (
-/mob/living/simple_animal/hostile/retaliate/ghost,
/obj/machinery/atmospherics/components/unary/vent_pump/on{
dir = 4
},
+/mob/living/simple_animal/hostile/retaliate/ghost,
/turf/open/floor/wood,
/area/maintenance/port/fore)
"bsV" = (
@@ -53488,6 +53488,10 @@
},
/turf/closed/wall,
/area/science/circuit)
+"dxF" = (
+/obj/machinery/gear_painter,
+/turf/open/floor/wood,
+/area/maintenance/bar)
"dyE" = (
/obj/structure/cable{
icon_state = "0-4"
@@ -56505,6 +56509,10 @@
},
/turf/open/floor/wood/wood_diagonal,
/area/maintenance/port/fore)
+"kqy" = (
+/obj/machinery/gear_painter,
+/turf/open/floor/plasteel,
+/area/crew_quarters/fitness)
"kqI" = (
/obj/structure/window,
/turf/open/floor/wood,
@@ -58551,6 +58559,7 @@
/obj/structure/disposalpipe/segment{
dir = 4
},
+/obj/machinery/gear_painter,
/turf/open/floor/plasteel,
/area/crew_quarters/locker)
"pqR" = (
@@ -86334,7 +86343,7 @@ oKh
oKh
iiW
iiW
-iiW
+dxF
izv
nfm
bCq
@@ -98349,7 +98358,7 @@ awB
att
azh
fHG
-fHG
+kqy
kxf
ufD
alP
diff --git a/_maps/map_files/CogStation/CogStation.dmm b/_maps/map_files/CogStation/CogStation.dmm
index 482ddc3f22..6f5bab0498 100644
--- a/_maps/map_files/CogStation/CogStation.dmm
+++ b/_maps/map_files/CogStation/CogStation.dmm
@@ -33604,6 +33604,10 @@
/obj/machinery/atmospherics/pipe/simple/cyan/hidden{
dir = 4
},
+/obj/item/kirbyplants{
+ icon_state = "plant-20";
+ pixel_y = 3
+ },
/turf/open/floor/plasteel,
/area/crew_quarters/locker)
"bvu" = (
@@ -38936,10 +38940,7 @@
/obj/effect/turf_decal/tile/neutral{
dir = 1
},
-/obj/item/kirbyplants{
- icon_state = "plant-20";
- pixel_y = 3
- },
+/obj/machinery/gear_painter,
/turf/open/floor/plasteel,
/area/crew_quarters/locker)
"bGN" = (
@@ -52867,7 +52868,7 @@
dir = 4;
pixel_x = -28
},
-/obj/item/kirbyplants/random,
+/obj/machinery/gear_painter,
/turf/open/floor/plasteel,
/area/quartermaster/office)
"cjB" = (
@@ -71256,6 +71257,13 @@
},
/turf/open/floor/plating/airless,
/area/router/aux)
+"stP" = (
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/obj/item/kirbyplants/random,
+/turf/open/floor/plasteel,
+/area/quartermaster/office)
"sAm" = (
/obj/structure/plasticflaps,
/obj/machinery/door/poddoor{
@@ -114255,7 +114263,7 @@ ckq
bgf
beB
cxC
-bgq
+stP
cjA
biy
bjN
diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm
index e907602d59..07902b28b1 100644
--- a/_maps/map_files/Deltastation/DeltaStation2.dmm
+++ b/_maps/map_files/Deltastation/DeltaStation2.dmm
@@ -3535,9 +3535,7 @@
dir = 4
},
/obj/effect/turf_decal/delivery,
-/obj/item/kirbyplants{
- icon_state = "plant-21"
- },
+/obj/machinery/gear_painter,
/turf/open/floor/plasteel,
/area/hallway/secondary/entry)
"ajL" = (
@@ -3823,6 +3821,9 @@
/obj/effect/turf_decal/tile/blue{
dir = 8
},
+/obj/item/kirbyplants{
+ icon_state = "plant-21"
+ },
/turf/open/floor/plasteel/white/corner,
/area/hallway/secondary/entry)
"akn" = (
@@ -79384,6 +79385,7 @@
/obj/effect/turf_decal/tile/neutral{
dir = 8
},
+/obj/machinery/gear_painter,
/turf/open/floor/plasteel{
heat_capacity = 1e+006
},
diff --git a/_maps/map_files/KiloStation/KiloStation.dmm b/_maps/map_files/KiloStation/KiloStation.dmm
index 3ff364fa5c..408efad32f 100644
--- a/_maps/map_files/KiloStation/KiloStation.dmm
+++ b/_maps/map_files/KiloStation/KiloStation.dmm
@@ -48007,8 +48007,9 @@
/obj/effect/turf_decal/tile/neutral{
dir = 4
},
-/obj/structure/closet/wardrobe/mixed,
/obj/machinery/light/small,
+/obj/effect/turf_decal/delivery,
+/obj/machinery/gear_painter,
/turf/open/floor/plasteel/dark,
/area/crew_quarters/locker)
"bzo" = (
@@ -48767,7 +48768,6 @@
/turf/open/floor/plasteel/dark,
/area/crew_quarters/fitness/recreation)
"bAA" = (
-/obj/structure/table,
/obj/effect/turf_decal/tile/neutral{
dir = 1
},
@@ -48777,11 +48777,6 @@
/obj/effect/turf_decal/tile/neutral{
dir = 8
},
-/obj/item/storage/backpack{
- pixel_x = 4;
- pixel_y = 4
- },
-/obj/item/storage/backpack,
/obj/machinery/firealarm{
dir = 8;
pixel_x = 26
@@ -49398,6 +49393,7 @@
dir = 1;
name = "recreation camera"
},
+/obj/structure/closet/wardrobe/mixed,
/turf/open/floor/plasteel,
/area/crew_quarters/fitness/recreation)
"bBy" = (
@@ -54797,11 +54793,6 @@
/area/hallway/secondary/exit/departure_lounge)
"bKn" = (
/obj/structure/table,
-/obj/item/paper_bin{
- pixel_x = -4;
- pixel_y = 4
- },
-/obj/item/pen,
/obj/effect/decal/cleanable/cobweb/cobweb2,
/obj/effect/turf_decal/tile/neutral{
dir = 8
@@ -54810,6 +54801,11 @@
/obj/machinery/airalarm{
pixel_y = 22
},
+/obj/item/storage/backpack{
+ pixel_x = 4;
+ pixel_y = 4
+ },
+/obj/item/storage/backpack,
/turf/open/floor/plasteel/dark,
/area/crew_quarters/fitness/recreation)
"bKo" = (
@@ -55425,6 +55421,12 @@
pixel_x = 28;
pixel_y = 22
},
+/obj/structure/table,
+/obj/item/paper_bin{
+ pixel_x = -4;
+ pixel_y = 4
+ },
+/obj/item/pen,
/turf/open/floor/plasteel,
/area/crew_quarters/fitness/recreation)
"bLd" = (
@@ -60844,6 +60846,11 @@
/obj/effect/turf_decal/tile/red{
dir = 1
},
+/obj/structure/table,
+/obj/item/toy/figure/assistant{
+ pixel_x = 8;
+ pixel_y = 6
+ },
/turf/open/floor/plasteel,
/area/hallway/secondary/entry)
"bTD" = (
@@ -61021,6 +61028,12 @@
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{
dir = 10
},
+/obj/structure/table,
+/obj/item/paper_bin{
+ pixel_x = -4;
+ pixel_y = 4
+ },
+/obj/item/pen,
/turf/open/floor/plasteel,
/area/hallway/secondary/entry)
"bTO" = (
@@ -61259,19 +61272,8 @@
/obj/effect/turf_decal/tile/neutral{
dir = 1
},
-/obj/structure/table,
-/obj/item/paper_bin{
- pixel_x = -4;
- pixel_y = 4
- },
-/obj/item/pen,
-/obj/item/toy/figure/assistant{
- pixel_x = 8;
- pixel_y = 6
- },
-/obj/effect/turf_decal/loading_area{
- dir = 1
- },
+/obj/effect/turf_decal/delivery,
+/obj/machinery/gear_painter,
/turf/open/floor/plasteel/dark,
/area/hallway/secondary/entry)
"bUi" = (
@@ -71325,15 +71327,16 @@
icon_gib = "magicarp_gib";
icon_living = "magicarp";
icon_state = "magicarp";
- maxHealth = 200;
max_co2 = 5;
max_tox = 2;
+ maxHealth = 200;
melee_damage_lower = 15;
melee_damage_upper = 20;
min_oxy = 5;
name = "Lia";
real_name = "Lia";
- response_help = "pets";
+ response_help_continuous = "pets";
+ response_help_simple = "pet";
turns_per_move = 10
},
/turf/open/floor/plasteel/dark,
diff --git a/_maps/map_files/LambdaStation/dorms.dmm b/_maps/map_files/LambdaStation/dorms.dmm
index b7adb4a518..0ed1b0203c 100644
--- a/_maps/map_files/LambdaStation/dorms.dmm
+++ b/_maps/map_files/LambdaStation/dorms.dmm
@@ -13764,6 +13764,7 @@
/obj/effect/turf_decal/trimline/neutral/filled/corner{
dir = 4
},
+/obj/machinery/gear_painter,
/turf/open/floor/plasteel,
/area/crew_quarters/locker)
"Jp" = (
diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm
index c2953916e0..958ab2dc5a 100644
--- a/_maps/map_files/MetaStation/MetaStation.dmm
+++ b/_maps/map_files/MetaStation/MetaStation.dmm
@@ -4826,6 +4826,7 @@
/obj/machinery/light{
dir = 4
},
+/obj/machinery/gear_painter,
/turf/open/floor/plasteel/white/corner,
/area/hallway/secondary/entry)
"aiU" = (
@@ -23177,6 +23178,9 @@
},
/obj/machinery/light,
/obj/effect/turf_decal/tile/neutral,
+/obj/machinery/newscaster{
+ pixel_y = -32
+ },
/turf/open/floor/plasteel,
/area/crew_quarters/locker)
"aTy" = (
@@ -23190,17 +23194,6 @@
/obj/effect/turf_decal/tile/neutral,
/turf/open/floor/plasteel,
/area/crew_quarters/locker)
-"aTz" = (
-/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
- dir = 4
- },
-/obj/machinery/light,
-/obj/machinery/newscaster{
- pixel_y = -32
- },
-/obj/effect/turf_decal/tile/neutral,
-/turf/open/floor/plasteel,
-/area/crew_quarters/locker)
"aTA" = (
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
dir = 9
@@ -81348,6 +81341,21 @@
/obj/structure/closet/firecloset,
/turf/open/floor/plating,
/area/engine/engineering)
+"foN" = (
+/obj/effect/turf_decal/tile/neutral{
+ dir = 1
+ },
+/obj/effect/turf_decal/tile/neutral,
+/obj/effect/turf_decal/tile/neutral{
+ dir = 4
+ },
+/obj/effect/turf_decal/tile/neutral{
+ dir = 8
+ },
+/obj/machinery/light,
+/obj/machinery/gear_painter,
+/turf/open/floor/plasteel/dark,
+/area/crew_quarters/locker)
"fpa" = (
/obj/structure/extinguisher_cabinet{
pixel_y = -30
@@ -81974,6 +81982,16 @@
},
/turf/open/floor/plasteel/dark,
/area/crew_quarters/cryopod)
+"lFR" = (
+/obj/effect/turf_decal/tile/blue{
+ dir = 4
+ },
+/obj/machinery/light{
+ dir = 4
+ },
+/obj/machinery/vending/clothing,
+/turf/open/floor/plasteel/white/corner,
+/area/hallway/secondary/entry)
"lGS" = (
/obj/docking_port/stationary/public_mining_dock,
/turf/open/floor/plating,
@@ -97543,7 +97561,7 @@ blU
aiT
bEs
bHJ
-aiT
+lFR
iSt
mcS
alK
@@ -118601,8 +118619,8 @@ aOD
aPK
aQV
aOu
-aTz
-aUM
+aTt
+foN
aUM
aYe
dnh
diff --git a/_maps/map_files/OmegaStation/OmegaStation.dmm b/_maps/map_files/OmegaStation/OmegaStation.dmm
index 74f7f95c2c..f4d798511f 100644
--- a/_maps/map_files/OmegaStation/OmegaStation.dmm
+++ b/_maps/map_files/OmegaStation/OmegaStation.dmm
@@ -15268,6 +15268,9 @@
/obj/effect/turf_decal/tile/neutral{
dir = 8
},
+/obj/item/kirbyplants{
+ icon_state = "plant-21"
+ },
/turf/open/floor/plasteel/dark,
/area/crew_quarters/dorms)
"axG" = (
@@ -19618,9 +19621,6 @@
/turf/open/floor/plasteel/dark,
/area/crew_quarters/dorms)
"aEL" = (
-/obj/item/kirbyplants{
- icon_state = "plant-21"
- },
/obj/machinery/status_display{
pixel_y = -32
},
@@ -19635,6 +19635,7 @@
/obj/effect/turf_decal/tile/neutral{
dir = 8
},
+/obj/machinery/gear_painter,
/turf/open/floor/plasteel/dark,
/area/crew_quarters/dorms)
"aEM" = (
diff --git a/_maps/map_files/PubbyStation/PubbyStation.dmm b/_maps/map_files/PubbyStation/PubbyStation.dmm
index d367ed82b1..12ae0092f0 100644
--- a/_maps/map_files/PubbyStation/PubbyStation.dmm
+++ b/_maps/map_files/PubbyStation/PubbyStation.dmm
@@ -511,10 +511,10 @@
/turf/open/floor/plasteel,
/area/crew_quarters/fitness/recreation)
"abi" = (
-/obj/machinery/disposal/bin,
-/obj/structure/disposalpipe/trunk{
- dir = 8
+/obj/structure/disposalpipe/segment{
+ dir = 10
},
+/obj/machinery/gear_painter,
/turf/open/floor/plasteel,
/area/crew_quarters/fitness/recreation)
"abj" = (
@@ -2337,9 +2337,12 @@
/turf/open/floor/plasteel/dark,
/area/security/prison)
"afJ" = (
-/obj/effect/landmark/carpspawn,
-/turf/open/space/basic,
-/area/space/nearstation)
+/obj/effect/turf_decal/tile/neutral,
+/obj/machinery/atmospherics/pipe/manifold/supply/hidden{
+ dir = 8
+ },
+/turf/open/floor/plasteel,
+/area/hallway/primary/central)
"afK" = (
/obj/machinery/atmospherics/components/unary/tank/air{
dir = 1
@@ -20027,9 +20030,7 @@
/obj/structure/cable{
icon_state = "1-8"
},
-/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{
- dir = 4
- },
+/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden,
/turf/open/floor/plating,
/area/maintenance/department/crew_quarters/bar)
"aUQ" = (
@@ -20044,6 +20045,9 @@
/obj/effect/turf_decal/tile/neutral{
dir = 8
},
+/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
+ dir = 10
+ },
/turf/open/floor/plasteel/dark,
/area/hydroponics)
"aUR" = (
@@ -20485,8 +20489,16 @@
/turf/closed/wall,
/area/janitor)
"aVT" = (
-/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
-/turf/closed/wall,
+/obj/machinery/door/firedoor,
+/obj/machinery/door/poddoor/shutters{
+ id = "jangarage";
+ name = "Custodial Closet Shutters"
+ },
+/obj/effect/turf_decal/delivery,
+/obj/machinery/atmospherics/pipe/simple/supply/hidden{
+ dir = 4
+ },
+/turf/open/floor/plasteel,
/area/janitor)
"aVU" = (
/obj/machinery/door/window/eastright{
@@ -20510,6 +20522,7 @@
/obj/effect/turf_decal/tile/neutral{
dir = 8
},
+/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/turf/open/floor/plasteel/dark,
/area/janitor)
"aVV" = (
@@ -20892,9 +20905,6 @@
/obj/machinery/camera{
c_tag = "Custodial Quarters"
},
-/obj/machinery/atmospherics/components/unary/vent_scrubber/on{
- dir = 1
- },
/obj/machinery/light/small{
dir = 1
},
@@ -20915,6 +20925,9 @@
/obj/effect/turf_decal/tile/neutral{
dir = 8
},
+/obj/machinery/atmospherics/components/unary/vent_scrubber/on{
+ dir = 4
+ },
/turf/open/floor/plasteel/dark,
/area/janitor)
"aWO" = (
@@ -20934,6 +20947,9 @@
/obj/effect/turf_decal/tile/neutral{
dir = 8
},
+/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
+ dir = 9
+ },
/turf/open/floor/plasteel/dark,
/area/janitor)
"aWP" = (
@@ -23004,9 +23020,6 @@
/turf/open/floor/plasteel,
/area/hallway/primary/central)
"baW" = (
-/obj/machinery/atmospherics/pipe/manifold/supply/hidden{
- dir = 8
- },
/obj/machinery/button/door{
id = "jangarage";
name = "Custodial Closet Shutters Control";
@@ -23014,14 +23027,12 @@
req_access_txt = "26"
},
/obj/effect/turf_decal/tile/neutral,
+/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/turf/open/floor/plasteel,
/area/hallway/primary/central)
"baX" = (
/obj/vehicle/ridden/janicart,
/obj/structure/disposalpipe/segment,
-/obj/machinery/atmospherics/pipe/simple/supply/hidden{
- dir = 4
- },
/obj/machinery/light{
dir = 8
},
@@ -23034,6 +23045,9 @@
/obj/structure/cable{
icon_state = "2-4"
},
+/obj/machinery/atmospherics/pipe/simple/supply/hidden{
+ dir = 6
+ },
/turf/open/floor/plasteel,
/area/janitor)
"baY" = (
@@ -23398,6 +23412,9 @@
/obj/structure/cable{
icon_state = "1-2"
},
+/obj/machinery/atmospherics/pipe/simple/supply/hidden{
+ dir = 9
+ },
/turf/open/floor/plasteel,
/area/janitor)
"bbY" = (
@@ -31173,17 +31190,26 @@
"bup" = (
/obj/machinery/rnd/destructive_analyzer,
/obj/effect/turf_decal/delivery,
+/obj/machinery/atmospherics/pipe/simple/supply/hidden{
+ dir = 4
+ },
/turf/open/floor/plasteel,
/area/science/lab)
"buq" = (
/obj/structure/disposalpipe/segment,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/obj/effect/turf_decal/bot,
+/obj/machinery/atmospherics/pipe/simple/supply/hidden{
+ dir = 4
+ },
/turf/open/floor/plasteel,
/area/science/lab)
"bur" = (
/obj/effect/turf_decal/delivery,
/obj/machinery/rnd/production/protolathe/department/science,
+/obj/machinery/atmospherics/pipe/simple/supply/hidden{
+ dir = 4
+ },
/turf/open/floor/plasteel,
/area/science/lab)
"bus" = (
@@ -31202,6 +31228,9 @@
/obj/machinery/light{
dir = 4
},
+/obj/machinery/atmospherics/pipe/simple/supply/hidden{
+ dir = 10
+ },
/turf/open/floor/plasteel/white,
/area/science/lab)
"but" = (
@@ -31664,6 +31693,7 @@
/obj/structure/cable{
icon_state = "1-2"
},
+/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/turf/open/floor/plasteel/white,
/area/science/lab)
"bvA" = (
@@ -32372,6 +32402,7 @@
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
dir = 4
},
+/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/turf/open/floor/plasteel/white,
/area/science/lab)
"bxh" = (
@@ -33056,12 +33087,6 @@
/turf/open/floor/plasteel,
/area/hallway/primary/aft)
"byD" = (
-/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
- dir = 6
- },
-/obj/structure/cable{
- icon_state = "2-4"
- },
/obj/machinery/door/airlock/research{
name = "R&D Lab";
req_one_access_txt = "7;29;30"
@@ -33070,6 +33095,12 @@
/obj/structure/disposalpipe/segment{
dir = 6
},
+/obj/structure/cable{
+ icon_state = "4-8"
+ },
+/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
+ dir = 4
+ },
/turf/open/floor/plasteel,
/area/science/lab)
"byE" = (
@@ -33091,7 +33122,6 @@
/turf/open/floor/plasteel/white,
/area/science/lab)
"byG" = (
-/obj/machinery/atmospherics/components/unary/vent_pump/on,
/obj/structure/cable{
icon_state = "1-2"
},
@@ -33919,10 +33949,6 @@
/area/hallway/primary/aft)
"bAm" = (
/obj/structure/disposalpipe/segment,
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/turf/closed/wall/r_wall,
/area/hallway/primary/aft)
"bAo" = (
@@ -33952,7 +33978,6 @@
/obj/structure/cable{
icon_state = "1-4"
},
-/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/obj/effect/turf_decal/tile/purple{
dir = 1
},
@@ -34404,17 +34429,14 @@
name = "RD Office APC";
pixel_x = -25
},
-/obj/structure/cable{
- icon_state = "0-4"
- },
/obj/effect/turf_decal/tile/purple{
dir = 1
},
/obj/effect/turf_decal/tile/purple{
dir = 8
},
-/obj/machinery/atmospherics/pipe/simple/supply/hidden{
- dir = 4
+/obj/structure/cable{
+ icon_state = "4-8"
},
/turf/open/floor/plasteel/dark,
/area/crew_quarters/heads/hor)
@@ -34425,8 +34447,8 @@
/obj/structure/disposalpipe/segment{
dir = 5
},
-/obj/machinery/atmospherics/pipe/manifold/supply/hidden{
- dir = 4
+/obj/machinery/atmospherics/pipe/simple/supply/hidden{
+ dir = 6
},
/turf/open/floor/plasteel/dark,
/area/crew_quarters/heads/hor)
@@ -34434,6 +34456,9 @@
/obj/structure/disposalpipe/segment{
dir = 4
},
+/obj/machinery/atmospherics/pipe/simple/supply/hidden{
+ dir = 4
+ },
/turf/open/floor/plasteel/dark,
/area/crew_quarters/heads/hor)
"bBt" = (
@@ -34441,6 +34466,9 @@
/obj/structure/disposalpipe/segment{
dir = 4
},
+/obj/machinery/atmospherics/pipe/simple/supply/hidden{
+ dir = 4
+ },
/turf/open/floor/plasteel/dark,
/area/crew_quarters/heads/hor)
"bBu" = (
@@ -34478,6 +34506,9 @@
/obj/effect/turf_decal/tile/purple{
dir = 4
},
+/obj/machinery/atmospherics/pipe/simple/supply/hidden{
+ dir = 9
+ },
/turf/open/floor/plasteel/dark,
/area/crew_quarters/heads/hor)
"bBw" = (
@@ -35240,6 +35271,7 @@
/obj/structure/cable{
icon_state = "0-8"
},
+/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/turf/open/floor/plating,
/area/crew_quarters/heads/hor)
"bCK" = (
@@ -44248,9 +44280,11 @@
/turf/open/floor/engine/co2,
/area/engine/atmos)
"bWh" = (
-/obj/effect/turf_decal/sand,
+/obj/machinery/atmospherics/pipe/manifold/supply/hidden{
+ dir = 8
+ },
/turf/open/floor/plasteel,
-/area/chapel/office)
+/area/hallway/primary/aft)
"bWi" = (
/obj/structure/flora/ausbushes/leafybush,
/obj/structure/flora/ausbushes/reedbush,
@@ -52824,6 +52858,9 @@
/turf/closed/wall/r_wall,
/area/science/lab)
"cCt" = (
+/obj/machinery/atmospherics/pipe/manifold/supply/hidden{
+ dir = 1
+ },
/turf/open/floor/plasteel/white,
/area/science/lab)
"cCB" = (
@@ -53058,6 +53095,9 @@
freq = 1400;
location = "Research Division"
},
+/obj/machinery/atmospherics/pipe/simple/supply/hidden{
+ dir = 4
+ },
/turf/open/floor/plasteel/dark,
/area/science/lab)
"cXW" = (
@@ -53151,10 +53191,6 @@
/area/maintenance/department/security/brig)
"dhz" = (
/obj/structure/disposalpipe/segment,
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/obj/structure/chair{
dir = 8;
name = "Defense"
@@ -53163,9 +53199,6 @@
/obj/effect/turf_decal/tile/purple{
dir = 8
},
-/obj/machinery/atmospherics/pipe/simple/supply/hidden{
- dir = 4
- },
/turf/open/floor/plasteel,
/area/hallway/primary/aft)
"dir" = (
@@ -53960,11 +53993,11 @@
/obj/structure/disposalpipe/segment{
dir = 4
},
-/obj/structure/cable{
- icon_state = "4-8"
- },
/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{
- dir = 1
+ dir = 4
+ },
+/obj/structure/cable{
+ icon_state = "1-8"
},
/turf/open/floor/plasteel,
/area/hallway/primary/aft)
@@ -55488,6 +55521,12 @@
/obj/effect/turf_decal/tile/purple{
dir = 4
},
+/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
+ dir = 6
+ },
+/obj/structure/cable{
+ icon_state = "2-4"
+ },
/turf/open/floor/plasteel,
/area/hallway/primary/aft)
"ioj" = (
@@ -55591,6 +55630,9 @@
/obj/effect/turf_decal/tile/blue{
dir = 8
},
+/obj/structure/cable{
+ icon_state = "4-8"
+ },
/turf/open/floor/plasteel,
/area/hallway/primary/aft)
"iyg" = (
@@ -56345,9 +56387,13 @@
/turf/open/floor/plasteel/white,
/area/science/mixing)
"koz" = (
-/obj/machinery/atmospherics/pipe/manifold/supply/hidden{
+/obj/effect/turf_decal/tile/purple,
+/obj/effect/turf_decal/tile/purple{
dir = 8
},
+/obj/machinery/atmospherics/pipe/simple/supply/hidden{
+ dir = 4
+ },
/turf/open/floor/plasteel,
/area/hallway/primary/aft)
"kpK" = (
@@ -56634,10 +56680,14 @@
/turf/open/floor/plasteel/dark,
/area/science/xenobiology)
"kSb" = (
-/obj/structure/lattice,
-/obj/structure/grille,
-/turf/open/space/basic,
-/area/space)
+/obj/structure/chair/office/light{
+ dir = 8
+ },
+/obj/machinery/atmospherics/components/unary/vent_pump/on{
+ dir = 1
+ },
+/turf/open/floor/plasteel/white,
+/area/science/lab)
"kSF" = (
/obj/structure/cable{
icon_state = "1-4"
@@ -56711,6 +56761,10 @@
/obj/effect/turf_decal/tile/purple{
dir = 8
},
+/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
+/obj/structure/cable{
+ icon_state = "1-2"
+ },
/turf/open/floor/plasteel,
/area/hallway/primary/aft)
"lcU" = (
@@ -57121,6 +57175,7 @@
/obj/effect/turf_decal/tile/purple{
dir = 8
},
+/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/turf/open/floor/plasteel/white,
/area/science/lab)
"meF" = (
@@ -57128,8 +57183,9 @@
/turf/closed/wall/r_wall,
/area/engine/supermatter)
"mfC" = (
-/obj/machinery/atmospherics/pipe/simple/supply/hidden{
- dir = 4
+/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
+/obj/structure/cable{
+ icon_state = "1-2"
},
/turf/open/floor/plasteel,
/area/hallway/primary/aft)
@@ -59138,6 +59194,13 @@
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/turf/open/floor/plating,
/area/maintenance/department/engine)
+"qAx" = (
+/obj/structure/disposalpipe/trunk{
+ dir = 1
+ },
+/obj/machinery/disposal/bin,
+/turf/open/floor/plasteel,
+/area/crew_quarters/fitness/recreation)
"qAM" = (
/obj/effect/spawner/lootdrop/maintenance,
/obj/item/cigbutt,
@@ -59336,6 +59399,7 @@
/area/hallway/secondary/exit/departure_lounge)
"qVk" = (
/obj/machinery/door/poddoor/incinerator_atmos_aux,
+/obj/structure/lattice/catwalk,
/turf/open/space/basic,
/area/maintenance/disposal/incinerator)
"qVP" = (
@@ -60486,6 +60550,9 @@
id = "research_shutters_2";
name = "research shutters"
},
+/obj/machinery/atmospherics/pipe/simple/supply/hidden{
+ dir = 4
+ },
/turf/open/floor/plasteel,
/area/science/lab)
"tLP" = (
@@ -60808,12 +60875,6 @@
/obj/structure/disposalpipe/segment{
dir = 9
},
-/obj/structure/cable{
- icon_state = "1-8"
- },
-/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
- dir = 9
- },
/obj/structure/chair{
dir = 8;
name = "Defense"
@@ -60933,6 +60994,10 @@
/obj/effect/turf_decal/plaque,
/turf/open/floor/plating,
/area/maintenance/department/engine)
+"uNA" = (
+/obj/structure/disposalpipe/segment,
+/turf/open/floor/plasteel,
+/area/crew_quarters/fitness/recreation)
"uQR" = (
/obj/item/ammo_casing/shotgun/beanbag,
/turf/open/floor/plating,
@@ -61489,12 +61554,6 @@
},
/turf/open/floor/plasteel,
/area/science/xenobiology)
-"wfG" = (
-/obj/machinery/atmospherics/pipe/simple/supply/hidden{
- dir = 4
- },
-/turf/closed/wall/r_wall,
-/area/crew_quarters/heads/hor)
"wfO" = (
/mob/living/simple_animal/hostile/retaliate/poison/snake,
/turf/open/floor/plating,
@@ -76958,7 +77017,7 @@ aaa
bOv
bNs
bNs
-bWh
+bQg
bQg
bQg
bQg
@@ -84165,7 +84224,7 @@ bIZ
cbb
bDi
ccO
-bIZ
+bva
cjm
cjm
xgh
@@ -84425,8 +84484,8 @@ bva
bva
aht
aht
-kSb
-kSb
+fon
+fon
aht
aht
mau
@@ -86680,7 +86739,7 @@ aXL
aYL
aZN
baW
-aKI
+afJ
aKI
beb
aKI
@@ -86936,8 +86995,8 @@ aVS
aXM
aVS
aVS
-aXM
-bbW
+aVS
+aVT
bbW
aVS
aVS
@@ -87138,7 +87197,7 @@ aaa
aaa
aaa
aaa
-afJ
+cFB
aby
aaa
agQ
@@ -87445,7 +87504,7 @@ aRJ
aSz
aSz
aUP
-aVT
+aVS
aWN
aXO
aYM
@@ -89457,7 +89516,7 @@ aaa
aaa
aaa
aaa
-afJ
+cFB
aaa
aaa
abI
@@ -94921,12 +94980,12 @@ jcT
xje
tTl
tTl
-tTl
+bWh
gkS
tTl
tTl
tTl
-koz
+tTl
dgg
phJ
phJ
@@ -95178,7 +95237,7 @@ bjm
mhn
cqi
cqi
-cqi
+koz
cqi
cqi
imE
@@ -95697,7 +95756,7 @@ duF
bxa
byE
bBp
-wfG
+bBp
bBp
bBp
bBp
@@ -95950,7 +96009,7 @@ cCl
brq
byF
cCt
-byF
+kSb
bxc
nIU
bAo
@@ -104126,8 +104185,8 @@ aaY
awB
abe
abi
-axw
-axw
+uNA
+qAx
axw
axw
aBX
diff --git a/_maps/map_files/generic/CentCom.dmm b/_maps/map_files/generic/CentCom.dmm
index bf0e1dc797..7506fbdca3 100644
--- a/_maps/map_files/generic/CentCom.dmm
+++ b/_maps/map_files/generic/CentCom.dmm
@@ -10524,6 +10524,10 @@
},
/turf/open/floor/plasteel,
/area/centcom/control)
+"yl" = (
+/obj/machinery/gear_painter,
+/turf/open/indestructible/hotelwood,
+/area/centcom/holding)
"yn" = (
/obj/effect/spawner/structure/window/reinforced,
/obj/structure/sign/warning/vacuum,
@@ -43992,7 +43996,7 @@ NS
Nd
ZL
NS
-NS
+yl
Nd
CU
NS
diff --git a/_maps/shuttles/emergency_nature.dmm b/_maps/shuttles/emergency_nature.dmm
index 9639e37852..51a14594fb 100644
--- a/_maps/shuttles/emergency_nature.dmm
+++ b/_maps/shuttles/emergency_nature.dmm
@@ -33,8 +33,8 @@
"bg" = (
/obj/structure/table/reinforced,
/obj/item/storage/toolbox/mechanical{
- pixel_y = 8;
- pixel_x = -2
+ pixel_x = -2;
+ pixel_y = 8
},
/obj/item/storage/toolbox/electrical,
/obj/effect/turf_decal/stripes/line,
@@ -43,8 +43,8 @@
"bS" = (
/obj/structure/table/reinforced,
/obj/item/storage/box/lights/mixed{
- pixel_y = 9;
- pixel_x = -5
+ pixel_x = -5;
+ pixel_y = 9
},
/obj/item/storage/box/matches{
pixel_y = 5
@@ -413,8 +413,8 @@
pixel_y = 4
},
/obj/item/reagent_containers/food/drinks/soda_cans/monkey_energy{
- pixel_y = 5;
- pixel_x = 6
+ pixel_x = 6;
+ pixel_y = 5
},
/turf/open/floor/plasteel/white,
/area/shuttle/escape)
@@ -494,8 +494,8 @@
/area/shuttle/escape)
"rg" = (
/obj/item/clothing/glasses/welding{
- pixel_y = 8;
- pixel_x = 3
+ pixel_x = 3;
+ pixel_y = 8
},
/obj/item/weldingtool/largetank{
pixel_x = -3
@@ -882,8 +882,8 @@
},
/obj/structure/table/glass,
/obj/item/storage/box/monkeycubes{
- pixel_y = 10;
- pixel_x = 5
+ pixel_x = 5;
+ pixel_y = 10
},
/obj/item/reagent_containers/food/snacks/cube/monkey{
pixel_x = 5
@@ -1156,8 +1156,8 @@
},
/obj/structure/table/glass,
/obj/item/clothing/suit/monkeysuit{
- pixel_y = 4;
- pixel_x = -2
+ pixel_x = -2;
+ pixel_y = 4
},
/obj/item/clothing/mask/gas/monkeymask{
pixel_x = 5;
@@ -1169,6 +1169,7 @@
/obj/machinery/door/airlock/titanium{
name = "Emergency Shuttle Airlock"
},
+/obj/structure/fans/tiny,
/turf/open/floor/plasteel/white,
/area/shuttle/escape)
"ST" = (
@@ -1319,6 +1320,7 @@
name = "Emergency Shuttle Airlock"
},
/obj/docking_port/mobile/emergency,
+/obj/structure/fans/tiny,
/turf/open/floor/plasteel/white,
/area/shuttle/escape)
"Yu" = (
diff --git a/appveyor.yml b/appveyor.yml
deleted file mode 100644
index c9decee834..0000000000
--- a/appveyor.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-version: '{build}'
-skip_branch_with_pr: true
-shallow_clone: true
-branches:
- except:
- - ___TGS3TempBranch
- - ___TGSTempBranch
-cache:
- - C:\byond\ -> dependencies.sh
-build_script:
- - ps: tools/appveyor/build.ps1
- - ps: "$deployPath = $env:APPVEYOR_BUILD_FOLDER + '/deploy'; bash tools/deploy.sh $deployPath"
- - ps: "[System.IO.Compression.ZipFile]::CreateFromDirectory($env:APPVEYOR_BUILD_FOLDER + '/deploy', $env:APPVEYOR_BUILD_FOLDER + '/deploy.zip')"
-artifacts:
- - path: deploy.zip
diff --git a/code/__DEFINES/MC.dm b/code/__DEFINES/MC.dm
index bad64846d6..cad75fbfe4 100644
--- a/code/__DEFINES/MC.dm
+++ b/code/__DEFINES/MC.dm
@@ -22,49 +22,45 @@
#define START_PROCESSING(Processor, Datum) if (!(Datum.datum_flags & DF_ISPROCESSING)) {Datum.datum_flags |= DF_ISPROCESSING;Processor.processing += Datum}
#define STOP_PROCESSING(Processor, Datum) Datum.datum_flags &= ~DF_ISPROCESSING;Processor.processing -= Datum;Processor.currentrun -= Datum
-//SubSystem flags (Please design any new flags so that the default is off, to make adding flags to subsystems easier)
+//! SubSystem flags (Please design any new flags so that the default is off, to make adding flags to subsystems easier)
-//subsystem does not initialize.
-#define SS_NO_INIT (1<<0)
+/// subsystem does not initialize.
+#define SS_NO_INIT 1
-//subsystem does not fire.
-// (like can_fire = 0, but keeps it from getting added to the processing subsystems list)
-// (Requires a MC restart to change)
-#define SS_NO_FIRE (1<<1)
+/** subsystem does not fire. */
+/// (like can_fire = 0, but keeps it from getting added to the processing subsystems list)
+/// (Requires a MC restart to change)
+#define SS_NO_FIRE 2
-//subsystem only runs on spare cpu (after all non-background subsystems have ran that tick)
-// SS_BACKGROUND has its own priority bracket
-#define SS_BACKGROUND (1<<2)
+/** Subsystem only runs on spare cpu (after all non-background subsystems have ran that tick) */
+/// SS_BACKGROUND has its own priority bracket, this overrides SS_TICKER's priority bump
+#define SS_BACKGROUND 4
-//subsystem does not tick check, and should not run unless there is enough time (or its running behind (unless background))
-#define SS_NO_TICK_CHECK (1<<3)
+/// subsystem does not tick check, and should not run unless there is enough time (or its running behind (unless background))
+#define SS_NO_TICK_CHECK 8
-//Treat wait as a tick count, not DS, run every wait ticks.
-// (also forces it to run first in the tick, above even SS_NO_TICK_CHECK subsystems)
-// (implies all runlevels because of how it works)
-// (overrides SS_BACKGROUND)
-// This is designed for basically anything that works as a mini-mc (like SStimer)
-#define SS_TICKER (1<<4)
+/** Treat wait as a tick count, not DS, run every wait ticks. */
+/// (also forces it to run first in the tick (unless SS_BACKGROUND))
+/// (implies all runlevels because of how it works)
+/// This is designed for basically anything that works as a mini-mc (like SStimer)
+#define SS_TICKER 16
-//keep the subsystem's timing on point by firing early if it fired late last fire because of lag
-// ie: if a 20ds subsystem fires say 5 ds late due to lag or what not, its next fire would be in 15ds, not 20ds.
-#define SS_KEEP_TIMING (1<<5)
+/** keep the subsystem's timing on point by firing early if it fired late last fire because of lag */
+/// ie: if a 20ds subsystem fires say 5 ds late due to lag or what not, its next fire would be in 15ds, not 20ds.
+#define SS_KEEP_TIMING 32
-//Calculate its next fire after its fired.
-// (IE: if a 5ds wait SS takes 2ds to run, its next fire should be 5ds away, not 3ds like it normally would be)
-// This flag overrides SS_KEEP_TIMING
-#define SS_POST_FIRE_TIMING (1<<6)
+/** Calculate its next fire after its fired. */
+/// (IE: if a 5ds wait SS takes 2ds to run, its next fire should be 5ds away, not 3ds like it normally would be)
+/// This flag overrides SS_KEEP_TIMING
+#define SS_POST_FIRE_TIMING 64
-/// Show in stat() by default even if SS_NO_FIRE
-#define SS_ALWAYS_SHOW_STAT (1<<7)
-
-//SUBSYSTEM STATES
-#define SS_IDLE 0 //aint doing shit.
-#define SS_QUEUED 1 //queued to run
-#define SS_RUNNING 2 //actively running
-#define SS_PAUSED 3 //paused by mc_tick_check
-#define SS_SLEEPING 4 //fire() slept.
-#define SS_PAUSING 5 //in the middle of pausing
+//! SUBSYSTEM STATES
+#define SS_IDLE 0 /// ain't doing shit.
+#define SS_QUEUED 1 /// queued to run
+#define SS_RUNNING 2 /// actively running
+#define SS_PAUSED 3 /// paused by mc_tick_check
+#define SS_SLEEPING 4 /// fire() slept.
+#define SS_PAUSING 5 /// in the middle of pausing
#define SUBSYSTEM_DEF(X) GLOBAL_REAL(SS##X, /datum/controller/subsystem/##X);\
/datum/controller/subsystem/##X/New(){\
diff --git a/code/__DEFINES/_extools.dm b/code/__DEFINES/_extools.dm
index 4513243aae..e01e09a3d3 100644
--- a/code/__DEFINES/_extools.dm
+++ b/code/__DEFINES/_extools.dm
@@ -1 +1,38 @@
-#define EXTOOLS (world.system_type == MS_WINDOWS ? "byond-extools.dll" : "libbyond-extools.so")
+// _extools_api.dm - DM API for extools extension library
+// (blatently stolen from rust_g)
+//
+// To configure, create a `extools.config.dm` and set what you care about from
+// the following options:
+//
+// #define EXTOOLS "path/to/extools"
+// Override the .dll/.so detection logic with a fixed path or with detection
+// logic of your own.
+
+#ifndef EXTOOLS
+// Default automatic EXTOOLS detection.
+// On Windows, looks in the standard places for `byond-extools.dll`.
+// On Linux, looks in the standard places for`libbyond-extools.so`.
+
+/* This comment bypasses grep checks */ /var/__extools
+
+/proc/__detect_extools()
+ if (world.system_type == UNIX)
+ if (fexists("./libbyond-extools.so"))
+ // No need for LD_LIBRARY_PATH badness.
+ return __extools = "./libbyond-extools.so"
+ else
+ // It's not in the current directory, so try others
+ return __extools = "libbyond-extools.so"
+ else
+ return __extools = "byond-extools.dll"
+
+#define EXTOOLS (__extools || __detect_extools())
+#endif
+
+#ifndef UNIT_TESTS // use default logging as extools is broken on travis
+#define EXTOOLS_LOGGING // rust_g is used as a fallback if this is undefined
+#endif
+
+/proc/extools_log_write()
+
+/proc/extools_finalize_logging()
diff --git a/code/__DEFINES/_flags/_flags.dm b/code/__DEFINES/_flags/_flags.dm
index 6e018b1eeb..f12e3618f7 100644
--- a/code/__DEFINES/_flags/_flags.dm
+++ b/code/__DEFINES/_flags/_flags.dm
@@ -163,5 +163,19 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
else if(!HAS_TRAIT(x, TRAIT_KEEP_TOGETHER))\
x.appearance_flags &= ~KEEP_TOGETHER
+//dir macros
+///Returns true if the dir is diagonal, false otherwise
+#define ISDIAGONALDIR(d) (d&(d-1))
+///True if the dir is north or south, false therwise
+#define NSCOMPONENT(d) (d&(NORTH|SOUTH))
+///True if the dir is east/west, false otherwise
+#define EWCOMPONENT(d) (d&(EAST|WEST))
+///Flips the dir for north/south directions
+#define NSDIRFLIP(d) (d^(NORTH|SOUTH))
+///Flips the dir for east/west directions
+#define EWDIRFLIP(d) (d^(EAST|WEST))
+///Turns the dir by 180 degrees
+#define DIRFLIP(d) turn(d, 180)
+
/// 33554431 (2^24 - 1) is the maximum value our bitflags can reach.
#define MAX_BITFLAG_DIGITS 8
diff --git a/code/__DEFINES/admin.dm b/code/__DEFINES/admin.dm
index 143063b4e9..f6293454ee 100644
--- a/code/__DEFINES/admin.dm
+++ b/code/__DEFINES/admin.dm
@@ -91,3 +91,6 @@
#define SPAM_TRIGGER_WARNING 5 //Number of identical messages required before the spam-prevention will warn you to stfu
#define SPAM_TRIGGER_AUTOMUTE 10 //Number of identical messages required before the spam-prevention will automute you
+
+#define STICKYBAN_DB_CACHE_TIME 10 SECONDS
+#define STICKYBAN_ROGUE_CHECK_TIME 5
diff --git a/code/__DEFINES/dcs/helpers.dm b/code/__DEFINES/dcs/helpers.dm
index 182035db9b..ba2b9a704a 100644
--- a/code/__DEFINES/dcs/helpers.dm
+++ b/code/__DEFINES/dcs/helpers.dm
@@ -6,9 +6,16 @@
#define SEND_GLOBAL_SIGNAL(sigtype, arguments...) ( SEND_SIGNAL(SSdcs, sigtype, ##arguments) )
+/// Signifies that this proc is used to handle signals.
+/// Every proc you pass to RegisterSignal must have this.
+#define SIGNAL_HANDLER SHOULD_NOT_SLEEP(TRUE)
+
+/// Signifies that this proc is used to handle signals, but also sleeps.
+/// Do not use this for new work.
+#define SIGNAL_HANDLER_DOES_SLEEP
+
/// A wrapper for _AddElement that allows us to pretend we're using normal named arguments
#define AddElement(arguments...) _AddElement(list(##arguments))
-
/// A wrapper for _RemoveElement that allows us to pretend we're using normal named arguments
#define RemoveElement(arguments...) _RemoveElement(list(##arguments))
diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index 153a82ad5e..8e7cf8763b 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -61,7 +61,7 @@
#define BODYPART_NANITES 4
#define HYBRID_BODYPART_DAMAGE_THRESHHOLD 25 //How much damage has to be suffered until the damage threshhold counts as passed
-#define HYBRID_BODYPART_THESHHOLD_MINDAMAGE 15 //Which damage value this limb cannot be healed out of via easy nonsurgical means if the threshhold has been passed, state resets if damage value goes below mindamage.
+#define HYBRID_BODYPART_THESHHOLD_MINDAMAGE 10 //Which damage value this limb cannot be healed out of via easy nonsurgical means if the threshhold has been passed, state resets if damage value goes below mindamage.
#define BODYPART_NOT_DISABLED 0
#define BODYPART_DISABLED_DAMAGE 1
diff --git a/code/__DEFINES/movement.dm b/code/__DEFINES/movement.dm
new file mode 100644
index 0000000000..5bf7de8647
--- /dev/null
+++ b/code/__DEFINES/movement.dm
@@ -0,0 +1,26 @@
+/// The minimum for glide_size to be clamped to.
+#define MIN_GLIDE_SIZE 1
+/// The maximum for glide_size to be clamped to.
+/// This shouldn't be higher than the icon size, and generally you shouldn't be changing this, but it's here just in case.
+#define MAX_GLIDE_SIZE 32
+
+/// Compensating for time dialation
+GLOBAL_VAR_INIT(glide_size_multiplier, 1.0)
+
+///Broken down, here's what this does:
+/// divides the world icon_size (32) by delay divided by ticklag to get the number of pixels something should be moving each tick.
+/// The division result is given a min value of 1 to prevent obscenely slow glide sizes from being set
+/// Then that's multiplied by the global glide size multiplier. 1.25 by default feels pretty close to spot on. This is just to try to get byond to behave.
+/// The whole result is then clamped to within the range above.
+/// Not very readable but it works
+#define DELAY_TO_GLIDE_SIZE(delay) (clamp(((32 / max((delay) / world.tick_lag, 1)) * GLOB.glide_size_multiplier), MIN_GLIDE_SIZE, MAX_GLIDE_SIZE))
+
+/// Enables smooth movement
+// #define SMOOTH_MOVEMENT
+
+/// Set appearance flags in vars
+#ifdef SMOOTH_MOVEMENT
+ #define SET_APPEARANCE_FLAGS(_flags) appearance_flags = (_flags | LONG_GLIDE)
+#else
+ #define SET_APPEARANCE_FLAGS(_flags) appearance_flags = _flags
+#endif
diff --git a/code/__DEFINES/rust_g.dm b/code/__DEFINES/rust_g.dm
index 20e7975ec4..988acd3dae 100644
--- a/code/__DEFINES/rust_g.dm
+++ b/code/__DEFINES/rust_g.dm
@@ -1,19 +1,76 @@
// rust_g.dm - DM API for rust_g extension library
-#define RUST_G "rust_g"
+//
+// To configure, create a `rust_g.config.dm` and set what you care about from
+// the following options:
+//
+// #define RUST_G "path/to/rust_g"
+// Override the .dll/.so detection logic with a fixed path or with detection
+// logic of your own.
+//
+// #define RUSTG_OVERRIDE_BUILTINS
+// Enable replacement rust-g functions for certain builtins. Off by default.
-#define RUSTG_JOB_NO_RESULTS_YET "NO RESULTS YET"
-#define RUSTG_JOB_NO_SUCH_JOB "NO SUCH JOB"
-#define RUSTG_JOB_ERROR "JOB PANICKED"
+#ifndef RUST_G
+// Default automatic RUST_G detection.
+// On Windows, looks in the standard places for `rust_g.dll`.
+// On Linux, looks in `.`, `$LD_LIBRARY_PATH`, and `~/.byond/bin` for either of
+// `librust_g.so` (preferred) or `rust_g` (old).
+
+/* This comment bypasses grep checks */ /var/__rust_g
+
+/proc/__detect_rust_g()
+ if (world.system_type == UNIX)
+ if (fexists("./librust_g.so"))
+ // No need for LD_LIBRARY_PATH badness.
+ return __rust_g = "./librust_g.so"
+ else if (fexists("./rust_g"))
+ // Old dumb filename.
+ return __rust_g = "./rust_g"
+ else if (fexists("[world.GetConfig("env", "HOME")]/.byond/bin/rust_g"))
+ // Old dumb filename in `~/.byond/bin`.
+ return __rust_g = "rust_g"
+ else
+ // It's not in the current directory, so try others
+ return __rust_g = "librust_g.so"
+ else
+ return __rust_g = "rust_g"
+
+#define RUST_G (__rust_g || __detect_rust_g())
+#endif
+
+/**
+ * This proc generates a cellular automata noise grid which can be used in procedural generation methods.
+ *
+ * Returns a single string that goes row by row, with values of 1 representing an alive cell, and a value of 0 representing a dead cell.
+ *
+ * Arguments:
+ * * percentage: The chance of a turf starting closed
+ * * smoothing_iterations: The amount of iterations the cellular automata simulates before returning the results
+ * * birth_limit: If the number of neighboring cells is higher than this amount, a cell is born
+ * * death_limit: If the number of neighboring cells is lower than this amount, a cell dies
+ * * width: The width of the grid.
+ * * height: The height of the grid.
+ */
+#define rustg_cnoise_generate(percentage, smoothing_iterations, birth_limit, death_limit, width, height) \
+ call(RUST_G, "cnoise_generate")(percentage, smoothing_iterations, birth_limit, death_limit, width, height)
#define rustg_dmi_strip_metadata(fname) call(RUST_G, "dmi_strip_metadata")(fname)
#define rustg_dmi_create_png(path, width, height, data) call(RUST_G, "dmi_create_png")(path, width, height, data)
+#define rustg_dmi_resize_png(path, width, height, resizetype) call(RUST_G, "dmi_resize_png")(path, width, height, resizetype)
+
+#define rustg_file_read(fname) call(RUST_G, "file_read")(fname)
+#define rustg_file_exists(fname) call(RUST_G, "file_exists")(fname)
+#define rustg_file_write(text, fname) call(RUST_G, "file_write")(text, fname)
+#define rustg_file_append(text, fname) call(RUST_G, "file_append")(text, fname)
+
+#ifdef RUSTG_OVERRIDE_BUILTINS
+ #define file2text(fname) rustg_file_read("[fname]")
+ #define text2file(text, fname) rustg_file_append(text, "[fname]")
+#endif
#define rustg_git_revparse(rev) call(RUST_G, "rg_git_revparse")(rev)
#define rustg_git_commit_date(rev) call(RUST_G, "rg_git_commit_date")(rev)
-#define rustg_log_write(fname, text, format) call(RUST_G, "log_write")(fname, text, format)
-/proc/rustg_log_close_all() return call(RUST_G, "log_close_all")()
-
#define RUSTG_HTTP_METHOD_GET "get"
#define RUSTG_HTTP_METHOD_PUT "put"
#define RUSTG_HTTP_METHOD_DELETE "delete"
@@ -23,3 +80,22 @@
#define rustg_http_request_blocking(method, url, body, headers) call(RUST_G, "http_request_blocking")(method, url, body, headers)
#define rustg_http_request_async(method, url, body, headers) call(RUST_G, "http_request_async")(method, url, body, headers)
#define rustg_http_check_request(req_id) call(RUST_G, "http_check_request")(req_id)
+
+#define RUSTG_JOB_NO_RESULTS_YET "NO RESULTS YET"
+#define RUSTG_JOB_NO_SUCH_JOB "NO SUCH JOB"
+#define RUSTG_JOB_ERROR "JOB PANICKED"
+
+#define rustg_json_is_valid(text) (call(RUST_G, "json_is_valid")(text) == "true")
+
+#define rustg_log_write(fname, text, format) call(RUST_G, "log_write")(fname, text, format)
+/proc/rustg_log_close_all() return call(RUST_G, "log_close_all")()
+
+#define rustg_noise_get_at_coordinates(seed, x, y) call(RUST_G, "noise_get_at_coordinates")(seed, x, y)
+
+#define rustg_sql_connect_pool(options) call(RUST_G, "sql_connect_pool")(options)
+#define rustg_sql_query_async(handle, query, params) call(RUST_G, "sql_query_async")(handle, query, params)
+#define rustg_sql_query_blocking(handle, query, params) call(RUST_G, "sql_query_blocking")(handle, query, params)
+#define rustg_sql_connected(handle) call(RUST_G, "sql_connected")(handle)
+#define rustg_sql_disconnect_pool(handle) call(RUST_G, "sql_disconnect_pool")(handle)
+#define rustg_sql_check_query(job_id) call(RUST_G, "sql_check_query")("[job_id]")
+
diff --git a/code/__DEFINES/sound.dm b/code/__DEFINES/sound.dm
index 73781154c5..1098a07b39 100644
--- a/code/__DEFINES/sound.dm
+++ b/code/__DEFINES/sound.dm
@@ -3,6 +3,7 @@
#define CHANNEL_ADMIN 1023
#define CHANNEL_VOX 1022
#define CHANNEL_JUKEBOX 1021
+
#define CHANNEL_JUKEBOX_START 1016 //The gap between this and CHANNEL_JUKEBOX determines the amount of free jukebox channels. This currently allows 6 jukebox channels to exist.
#define CHANNEL_JUSTICAR_ARK 1015
#define CHANNEL_HEARTBEAT 1014 //sound channel for heartbeats
@@ -15,6 +16,17 @@
#define CHANNEL_DIGEST 1009
#define CHANNEL_PREYLOOP 1008
+///Default range of a sound.
+#define SOUND_RANGE 17
+///default extra range for sounds considered to be quieter
+#define SHORT_RANGE_SOUND_EXTRARANGE -9
+///The range deducted from sound range for things that are considered silent / sneaky
+#define SILENCED_SOUND_EXTRARANGE -11
+///Percentage of sound's range where no falloff is applied
+#define SOUND_DEFAULT_FALLOFF_DISTANCE 1 //For a normal sound this would be 1 tile of no falloff
+///The default exponent of sound falloff
+#define SOUND_FALLOFF_EXPONENT 6
+
//THIS SHOULD ALWAYS BE THE LOWEST ONE!
//KEEP IT UPDATED
@@ -23,6 +35,7 @@
#define MAX_INSTRUMENT_CHANNELS (128 * 6)
#define SOUND_MINIMUM_PRESSURE 10
+/// remove
#define FALLOFF_SOUNDS 1
@@ -53,7 +66,8 @@
#define MINING list('sound/ambience/ambimine.ogg', 'sound/ambience/ambicave.ogg', 'sound/ambience/ambiruin.ogg',\
'sound/ambience/ambiruin2.ogg', 'sound/ambience/ambiruin3.ogg', 'sound/ambience/ambiruin4.ogg',\
'sound/ambience/ambiruin5.ogg', 'sound/ambience/ambiruin6.ogg', 'sound/ambience/ambiruin7.ogg',\
- 'sound/ambience/ambidanger.ogg', 'sound/ambience/ambidanger2.ogg', 'sound/ambience/ambimaint1.ogg', 'sound/ambience/ambilava.ogg')
+ 'sound/ambience/ambidanger.ogg', 'sound/ambience/ambidanger2.ogg', 'sound/ambience/ambimaint1.ogg',\
+ 'sound/ambience/ambilava.ogg')
#define MEDICAL list('sound/ambience/ambinice.ogg')
@@ -80,3 +94,55 @@
'sound/hallucinations/growl3.ogg', 'sound/hallucinations/im_here1.ogg', 'sound/hallucinations/im_here2.ogg', 'sound/hallucinations/i_see_you1.ogg', 'sound/hallucinations/i_see_you2.ogg',\
'sound/hallucinations/look_up1.ogg', 'sound/hallucinations/look_up2.ogg', 'sound/hallucinations/over_here1.ogg', 'sound/hallucinations/over_here2.ogg', 'sound/hallucinations/over_here3.ogg',\
'sound/hallucinations/turn_around1.ogg', 'sound/hallucinations/turn_around2.ogg', 'sound/hallucinations/veryfar_noise.ogg', 'sound/hallucinations/wail.ogg')
+
+
+#define INTERACTION_SOUND_RANGE_MODIFIER -3
+#define EQUIP_SOUND_VOLUME 30
+#define PICKUP_SOUND_VOLUME 15
+#define DROP_SOUND_VOLUME 20
+#define YEET_SOUND_VOLUME 90
+
+
+//default byond sound environments
+#define SOUND_ENVIRONMENT_NONE -1
+#define SOUND_ENVIRONMENT_GENERIC 0
+#define SOUND_ENVIRONMENT_PADDED_CELL 1
+#define SOUND_ENVIRONMENT_ROOM 2
+#define SOUND_ENVIRONMENT_BATHROOM 3
+#define SOUND_ENVIRONMENT_LIVINGROOM 4
+#define SOUND_ENVIRONMENT_STONEROOM 5
+#define SOUND_ENVIRONMENT_AUDITORIUM 6
+#define SOUND_ENVIRONMENT_CONCERT_HALL 7
+#define SOUND_ENVIRONMENT_CAVE 8
+#define SOUND_ENVIRONMENT_ARENA 9
+#define SOUND_ENVIRONMENT_HANGAR 10
+#define SOUND_ENVIRONMENT_CARPETED_HALLWAY 11
+#define SOUND_ENVIRONMENT_HALLWAY 12
+#define SOUND_ENVIRONMENT_STONE_CORRIDOR 13
+#define SOUND_ENVIRONMENT_ALLEY 14
+#define SOUND_ENVIRONMENT_FOREST 15
+#define SOUND_ENVIRONMENT_CITY 16
+#define SOUND_ENVIRONMENT_MOUNTAINS 17
+#define SOUND_ENVIRONMENT_QUARRY 18
+#define SOUND_ENVIRONMENT_PLAIN 19
+#define SOUND_ENVIRONMENT_PARKING_LOT 20
+#define SOUND_ENVIRONMENT_SEWER_PIPE 21
+#define SOUND_ENVIRONMENT_UNDERWATER 22
+#define SOUND_ENVIRONMENT_DRUGGED 23
+#define SOUND_ENVIRONMENT_DIZZY 24
+#define SOUND_ENVIRONMENT_PSYCHOTIC 25
+//If we ever make custom ones add them here
+
+//"sound areas": easy way of keeping different types of areas consistent.
+#define SOUND_AREA_STANDARD_STATION SOUND_ENVIRONMENT_PARKING_LOT
+#define SOUND_AREA_LARGE_ENCLOSED SOUND_ENVIRONMENT_QUARRY
+#define SOUND_AREA_SMALL_ENCLOSED SOUND_ENVIRONMENT_BATHROOM
+#define SOUND_AREA_TUNNEL_ENCLOSED SOUND_ENVIRONMENT_STONEROOM
+#define SOUND_AREA_LARGE_SOFTFLOOR SOUND_ENVIRONMENT_CARPETED_HALLWAY
+#define SOUND_AREA_MEDIUM_SOFTFLOOR SOUND_ENVIRONMENT_LIVINGROOM
+#define SOUND_AREA_SMALL_SOFTFLOOR SOUND_ENVIRONMENT_ROOM
+#define SOUND_AREA_ASTEROID SOUND_ENVIRONMENT_CAVE
+#define SOUND_AREA_SPACE SOUND_ENVIRONMENT_UNDERWATER
+#define SOUND_AREA_LAVALAND SOUND_ENVIRONMENT_MOUNTAINS
+#define SOUND_AREA_ICEMOON SOUND_ENVIRONMENT_CAVE
+#define SOUND_AREA_WOODFLOOR SOUND_ENVIRONMENT_CITY
diff --git a/code/__DEFINES/spaceman_dmm.dm b/code/__DEFINES/spaceman_dmm.dm
index e21f3dc1c1..087fa5e6e6 100644
--- a/code/__DEFINES/spaceman_dmm.dm
+++ b/code/__DEFINES/spaceman_dmm.dm
@@ -29,5 +29,5 @@
#endif
/world/proc/enable_debugger()
- if (fexists(EXTOOLS))
- call(EXTOOLS, "debug_initialize")()
+ if (fexists(EXTOOLS))
+ call(EXTOOLS, "debug_initialize")()
diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm
index fad9ddcda5..e2ace84156 100644
--- a/code/__DEFINES/status_effects.dm
+++ b/code/__DEFINES/status_effects.dm
@@ -40,6 +40,9 @@
#define STATUS_EFFECT_DETERMINED /datum/status_effect/determined //currently in a combat high from being seriously wounded
+#define STATUS_EFFECT_MANTRA /datum/status_effect/mantra // a toggled self buff that makes you stronger and more resilient, but drains stamina over time
+#define STATUS_EFFECT_ASURA /datum/status_effect/asura // like a weaker version of mantra, drains HP instead of stamina and has no armor
+
/////////////
// DEBUFFS //
/////////////
diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm
index b405db83b0..cbf701e1d3 100644
--- a/code/__DEFINES/subsystems.dm
+++ b/code/__DEFINES/subsystems.dm
@@ -1,40 +1,90 @@
-//Update this whenever the db schema changes
-//make sure you add an update to the schema_version stable in the db changelog
+//! Defines for subsystems and overlays
+//!
+//! Lots of important stuff in here, make sure you have your brain switched on
+//! when editing this file
+
+//! ## DB defines
+/**
+ * DB major schema version
+ *
+ * Update this whenever the db schema changes
+ *
+ * make sure you add an update to the schema_version stable in the db changelog
+ */
#define DB_MAJOR_VERSION 4
+
+/**
+ * DB minor schema version
+ *
+ * Update this whenever the db schema changes
+ *
+ * make sure you add an update to the schema_version stable in the db changelog
+ */
#define DB_MINOR_VERSION 7
-//Timing subsystem
-//Don't run if there is an identical unique timer active
-//if the arguments to addtimer are the same as an existing timer, it doesn't create a new timer, and returns the id of the existing timer
+//! ## Timing subsystem
+/**
+ * Don't run if there is an identical unique timer active
+ *
+ * if the arguments to addtimer are the same as an existing timer, it doesn't create a new timer,
+ * and returns the id of the existing timer
+ */
#define TIMER_UNIQUE (1<<0)
-//For unique timers: Replace the old timer rather then not start this one
+
+///For unique timers: Replace the old timer rather then not start this one
#define TIMER_OVERRIDE (1<<1)
-//Timing should be based on how timing progresses on clients, not the sever.
-// tracking this is more expensive,
-// should only be used in conjuction with things that have to progress client side, such as animate() or sound()
+
+/**
+ * Timing should be based on how timing progresses on clients, not the server.
+ *
+ * Tracking this is more expensive,
+ * should only be used in conjuction with things that have to progress client side, such as
+ * animate() or sound()
+ */
#define TIMER_CLIENT_TIME (1<<2)
-//Timer can be stopped using deltimer()
+
+///Timer can be stopped using deltimer()
#define TIMER_STOPPABLE (1<<3)
-//To be used with TIMER_UNIQUE
-//prevents distinguishing identical timers with the wait variable
+
+///prevents distinguishing identical timers with the wait variable
+///
+///To be used with TIMER_UNIQUE
#define TIMER_NO_HASH_WAIT (1<<4)
-//Loops the timer repeatedly until qdeleted
-//In most cases you want a subsystem instead
+
+///Loops the timer repeatedly until qdeleted
+///
+///In most cases you want a subsystem instead, so don't use this unless you have a good reason
#define TIMER_LOOP (1<<5)
-#define TIMER_NO_INVOKE_WARNING 600 //number of byond ticks that are allowed to pass before the timer subsystem thinks it hung on something
-
+///Empty ID define
#define TIMER_ID_NULL -1
-#define INITIALIZATION_INSSATOMS 0 //New should not call Initialize
-#define INITIALIZATION_INNEW_MAPLOAD 2 //New should call Initialize(TRUE)
-#define INITIALIZATION_INNEW_REGULAR 1 //New should call Initialize(FALSE)
+//! ## Initialization subsystem
-#define INITIALIZE_HINT_NORMAL 0 //Nothing happens
-#define INITIALIZE_HINT_LATELOAD 1 //Call LateInitialize
-#define INITIALIZE_HINT_QDEL 2 //Call qdel on the atom
+///New should not call Initialize
+#define INITIALIZATION_INSSATOMS 0
+///New should call Initialize(TRUE)
+#define INITIALIZATION_INNEW_MAPLOAD 2
+///New should call Initialize(FALSE)
+#define INITIALIZATION_INNEW_REGULAR 1
-//type and all subtypes should always call Initialize in New()
+//! ### Initialization hints
+
+///Nothing happens
+#define INITIALIZE_HINT_NORMAL 0
+/**
+ * call LateInitialize at the end of all atom Initalization
+ *
+ * The item will be added to the late_loaders list, this is iterated over after
+ * initalization of subsystems is complete and calls LateInitalize on the atom
+ * see [this file for the LateIntialize proc](atom.html#proc/LateInitialize)
+ */
+#define INITIALIZE_HINT_LATELOAD 1
+
+///Call qdel on the atom after intialization
+#define INITIALIZE_HINT_QDEL 2
+
+///type and all subtypes should always immediately call Initialize in New()
#define INITIALIZE_IMMEDIATE(X) ##X/New(loc, ...){\
..();\
if(!(flags_1 & INITIALIZED_1)) {\
@@ -47,35 +97,40 @@
// Subsystems shutdown in the reverse of the order they initialize in
// The numbers just define the ordering, they are meaningless otherwise.
-#define INIT_ORDER_PROFILER 100
-#define INIT_ORDER_FAIL2TOPIC 99
-#define INIT_ORDER_TITLE 98
-#define INIT_ORDER_GARBAGE 95
-#define INIT_ORDER_DBCORE 94
-#define INIT_ORDER_STATPANELS 93
-#define INIT_ORDER_BLACKBOX 92
-#define INIT_ORDER_SERVER_MAINT 91
-#define INIT_ORDER_INPUT 90
-#define INIT_ORDER_SOUNDS 85
+#define INIT_ORDER_PROFILER 102
+#define INIT_ORDER_FAIL2TOPIC 101
+#define INIT_ORDER_TITLE 100
+#define INIT_ORDER_GARBAGE 99
+#define INIT_ORDER_DBCORE 95
+#define INIT_ORDER_BLACKBOX 94
+#define INIT_ORDER_SERVER_MAINT 93
+#define INIT_ORDER_INPUT 85
+#define INIT_ORDER_SOUNDS 83
+#define INIT_ORDER_INSTRUMENTS 82
#define INIT_ORDER_VIS 80
+// #define INIT_ORDER_ACHIEVEMENTS 77
#define INIT_ORDER_RESEARCH 75
#define INIT_ORDER_EVENTS 70
#define INIT_ORDER_JOBS 65
#define INIT_ORDER_QUIRKS 60
#define INIT_ORDER_TICKER 55
-#define INIT_ORDER_INSTRUMENTS 53
+// #define INIT_ORDER_TCG 55
#define INIT_ORDER_MAPPING 50
-#define INIT_ORDER_ECONOMY 45
-#define INIT_ORDER_NETWORKS 40
+#define INIT_ORDER_TIMETRACK 47
+#define INIT_ORDER_NETWORKS 45
+#define INIT_ORDER_ECONOMY 40
#define INIT_ORDER_HOLODECK 35
+// #define INIT_ORDER_OUTPUTS 35
#define INIT_ORDER_ATOMS 30
#define INIT_ORDER_LANGUAGE 25
#define INIT_ORDER_MACHINES 20
#define INIT_ORDER_CIRCUIT 15
+// #define INIT_ORDER_SKILLS 15
#define INIT_ORDER_TIMER 1
#define INIT_ORDER_DEFAULT 0
#define INIT_ORDER_AIR -1
#define INIT_ORDER_AIR_TURFS -2
+#define INIT_ORDER_PERSISTENCE -2 //before assets because some assets take data from SSPersistence
#define INIT_ORDER_MINIMAP -3
#define INIT_ORDER_ASSETS -4
#define INIT_ORDER_ICON_SMOOTHING -5
@@ -86,7 +141,9 @@
#define INIT_ORDER_SHUTTLE -21
#define INIT_ORDER_MINOR_MAPPING -40
#define INIT_ORDER_PATH -50
-#define INIT_ORDER_PERSISTENCE -95
+// #define INIT_ORDER_DISCORD -60
+// #define INIT_ORDER_EXPLOSIONS -69
+#define INIT_ORDER_STATPANELS -98
#define INIT_ORDER_DEMO -99 // o avoid a bunch of changes related to initialization being written, do this last
#define INIT_ORDER_CHAT -100 //Should be last to ensure chat remains smooth during init.
@@ -102,6 +159,7 @@
#define FIRE_PRIORITY_GARBAGE 15
#define FIRE_PRIORITY_WET_FLOORS 20
#define FIRE_PRIORITY_AIR 20
+#define FIRE_PRIORITY_NPC 20
#define FIRE_PRIORITY_PROCESS 25
#define FIRE_PRIORITY_THROWING 25
#define FIRE_PRIORITY_SPACEDRIFT 30
@@ -116,7 +174,6 @@
#define FIRE_PRIORITY_AIR_TURFS 40
#define FIRE_PRIORITY_DEFAULT 50
#define FIRE_PRIORITY_PARALLAX 65
-#define FIRE_PRIORITY_NPC 80
#define FIRE_PRIORITY_MOBS 100
#define FIRE_PRIORITY_TGUI 110
#define FIRE_PRIORITY_PROJECTILES 200
@@ -126,6 +183,8 @@
#define FIRE_PRIORITY_CHAT 400
#define FIRE_PRIORITY_RUNECHAT 410
#define FIRE_PRIORITY_OVERLAYS 500
+// #define FIRE_PRIORITY_EXPLOSIONS 666
+#define FIRE_PRIORITY_TIMER 700
#define FIRE_PRIORITY_INPUT 1000 // This must always always be the max highest priority. Player input must never be lost.
// SS runlevels
@@ -138,6 +197,37 @@
#define RUNLEVELS_DEFAULT (RUNLEVEL_SETUP | RUNLEVEL_GAME | RUNLEVEL_POSTGAME)
+
+
+//! ## Overlays subsystem
+
+///Compile all the overlays for an atom from the cache lists
+// |= on overlays is not actually guaranteed to not add same appearances but we're optimistically using it anyway.
+#define COMPILE_OVERLAYS(A)\
+ if (TRUE) {\
+ var/list/ad = A.add_overlays;\
+ var/list/rm = A.remove_overlays;\
+ if(LAZYLEN(rm)){\
+ A.overlays -= rm;\
+ rm.Cut();\
+ }\
+ if(LAZYLEN(ad)){\
+ A.overlays |= ad;\
+ ad.Cut();\
+ }\
+ A.flags_1 &= ~OVERLAY_QUEUED_1;\
+ }
+
+
+/**
+ Create a new timer and add it to the queue.
+ * Arguments:
+ * * callback the callback to call on timer finish
+ * * wait deciseconds to run the timer for
+ * * flags flags for this timer, see: code\__DEFINES\subsystems.dm
+*/
+#define addtimer(args...) _addtimer(args, file = __FILE__, line = __LINE__)
+
// SSair run section
#define SSAIR_PIPENETS 1
#define SSAIR_ATMOSMACHINERY 2
@@ -148,19 +238,3 @@
#define SSAIR_REBUILD_PIPENETS 7
#define SSAIR_EQUALIZE 8
#define SSAIR_ACTIVETURFS 9
-
-// |= on overlays is not actually guaranteed to not add same appearances but we're optimistically using it anyway.
-#define COMPILE_OVERLAYS(A)\
- if (TRUE) {\
- var/list/ad = A.add_overlays;\
- var/list/rm = A.remove_overlays;\
- if(LAZYLEN(rm)){\
- A.overlays -= rm;\
- A.remove_overlays = null;\
- }\
- if(LAZYLEN(ad)){\
- A.overlays |= ad;\
- A.add_overlays = null;\
- }\
- A.flags_1 &= ~OVERLAY_QUEUED_1;\
- }
diff --git a/code/__DEFINES/vote.dm b/code/__DEFINES/vote.dm
index a3617e21d0..88e70b884e 100644
--- a/code/__DEFINES/vote.dm
+++ b/code/__DEFINES/vote.dm
@@ -2,7 +2,7 @@
#define APPROVAL_VOTING "APPROVAL"
#define SCHULZE_VOTING "SCHULZE"
#define SCORE_VOTING "SCORE"
-#define MAJORITY_JUDGEMENT_VOTING "MAJORITY_JUDGEMENT"
+#define HIGHEST_MEDIAN_VOTING "HIGHEST_MEDIAN"
#define INSTANT_RUNOFF_VOTING "IRV"
#define SHOW_RESULTS (1<<0)
@@ -18,7 +18,7 @@ GLOBAL_LIST_INIT(vote_type_names,list(\
"IRV (single winner ranked choice)" = INSTANT_RUNOFF_VOTING,\
"Schulze (ranked choice, higher result=better)" = SCHULZE_VOTING,\
"Raw Score (returns results from 0 to 1, winner is 1)" = SCORE_VOTING,\
-"Majority Judgement (single-winner score voting)" = MAJORITY_JUDGEMENT_VOTING,\
+"Highest Median (single-winner score voting)" = HIGHEST_MEDIAN_VOTING,\
))
GLOBAL_LIST_INIT(display_vote_settings, list(\
diff --git a/code/__HELPERS/_extools_api.dm b/code/__HELPERS/_extools_api.dm
deleted file mode 100644
index af348dc939..0000000000
--- a/code/__HELPERS/_extools_api.dm
+++ /dev/null
@@ -1,5 +0,0 @@
-#define EXTOOLS_LOGGING // rust_g is used as a fallback if this is undefined
-
-/proc/extools_log_write()
-
-/proc/extools_finalize_logging()
diff --git a/code/__HELPERS/_lists.dm b/code/__HELPERS/_lists.dm
index 3efb50ef65..8d25fb8e03 100644
--- a/code/__HELPERS/_lists.dm
+++ b/code/__HELPERS/_lists.dm
@@ -37,7 +37,7 @@
* TYPECONT: The typepath of the contents of the list
* COMPARE: The object to compare against, usualy the same as INPUT
* COMPARISON: The variable on the objects to compare
- * COMPTYPE: How the current bin item to compare against COMPARE is fetched. By key or value.
+ * COMPTYPE: How should the values be compared? Either COMPARE_KEY or COMPARE_VALUE.
*/
#define BINARY_INSERT(INPUT, LIST, TYPECONT, COMPARE, COMPARISON, COMPTYPE) \
do {\
@@ -49,7 +49,7 @@
var/__BIN_LEFT = 1;\
var/__BIN_RIGHT = __BIN_CTTL;\
var/__BIN_MID = (__BIN_LEFT + __BIN_RIGHT) >> 1;\
- var/##TYPECONT/__BIN_ITEM;\
+ var ##TYPECONT/__BIN_ITEM;\
while(__BIN_LEFT < __BIN_RIGHT) {\
__BIN_ITEM = COMPTYPE;\
if(__BIN_ITEM.##COMPARISON <= COMPARE.##COMPARISON) {\
diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm
index 76ca97cd3a..18d02229dd 100644
--- a/code/__HELPERS/_logging.dm
+++ b/code/__HELPERS/_logging.dm
@@ -32,7 +32,7 @@
#define testing(msg)
#endif
-#ifdef UNIT_TESTS
+#if defined(UNIT_TESTS) || defined(SPACEMAN_DMM)
/proc/log_test(text)
WRITE_LOG(GLOB.test_log, text)
SEND_TEXT(world.log, text)
@@ -191,6 +191,10 @@
/proc/log_mapping(text)
WRITE_LOG(GLOB.world_map_error_log, text)
+/proc/log_perf(list/perf_info)
+ . = "[perf_info.Join(",")]\n"
+ WRITE_LOG_NO_FORMAT(GLOB.perf_log, .)
+
/proc/log_reagent(text)
WRITE_LOG(GLOB.reagent_log, text)
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 794a495ae3..f386c5f79b 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -271,7 +271,7 @@ Turf and target are separate in case you want to teleport some distance from a t
if(skip_mindless && (!M.mind && !M.ckey))
if(!isbot(M) && !iscameramob(M) && !ismegafauna(M))
continue
- if(M.client && M.client.holder && M.client.holder.fakekey) //stealthmins
+ if(M.client?.holder?.fakekey && isobserver(M))
continue
var/name = avoid_assoc_duplicate_keys(M.name, namecounts)
@@ -1202,7 +1202,7 @@ GLOBAL_REAL_VAR(list/stack_trace_storage)
GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
//Version of view() which ignores darkness, because BYOND doesn't have it (I actually suggested it but it was tagged redundant, BUT HEARERS IS A T- /rant).
-/proc/dview(var/range = world.view, var/center, var/invis_flags = 0)
+/proc/dview(range = world.view, center, invis_flags = 0)
if(!center)
return
@@ -1222,6 +1222,10 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
var/ready_to_die = FALSE
/mob/dview/Initialize() //Properly prevents this mob from gaining huds or joining any global lists
+ SHOULD_CALL_PARENT(FALSE)
+ if(flags_1 & INITIALIZED_1)
+ stack_trace("Warning: [src]([type]) initialized multiple times!")
+ flags_1 |= INITIALIZED_1
return INITIALIZE_HINT_NORMAL
/mob/dview/Destroy(force = FALSE)
diff --git a/code/_compile_options.dm b/code/_compile_options.dm
index 0e0bd4ffaa..64b4129024 100644
--- a/code/_compile_options.dm
+++ b/code/_compile_options.dm
@@ -46,11 +46,11 @@
//Update this whenever you need to take advantage of more recent byond features
#define MIN_COMPILER_VERSION 513
-#define MIN_COMPILER_BUILD 1508
+#define MIN_COMPILER_BUILD 1514
#if DM_VERSION < MIN_COMPILER_VERSION || DM_BUILD < MIN_COMPILER_BUILD
//Don't forget to update this part
#error Your version of BYOND is too out-of-date to compile this project. Go to https://secure.byond.com/download and update.
-#error You need version 513.1508 or higher
+#error You need version 513.1514 or higher
#endif
//Additional code for the above flags.
@@ -62,10 +62,14 @@
#define FIND_REF_NO_CHECK_TICK
#endif
-#ifdef TRAVISBUILDING
+#ifdef CIBUILDING
#define UNIT_TESTS
#endif
-#ifdef TRAVISTESTING
+#ifdef CITESTING
#define TESTING
#endif
+
+// A reasonable number of maximum overlays an object needs
+// If you think you need more, rethink it
+#define MAX_ATOM_OVERLAYS 100
diff --git a/code/_globalvars/admin.dm b/code/_globalvars/admin.dm
new file mode 100644
index 0000000000..81037ff3dd
--- /dev/null
+++ b/code/_globalvars/admin.dm
@@ -0,0 +1,12 @@
+GLOBAL_LIST_EMPTY(stickybanadminexemptions) //stores a list of ckeys exempted from a stickyban (workaround for a bug)
+GLOBAL_LIST_EMPTY(stickybanadmintexts) //stores the entire stickyban list temporarily
+GLOBAL_VAR(stickbanadminexemptiontimerid) //stores the timerid of the callback that restores all stickybans after an admin joins
+
+// /proc/init_smites() //todo: add on the second wave
+// var/list/smites = list()
+// for (var/_smite_path in subtypesof(/datum/smite))
+// var/datum/smite/smite_path = _smite_path
+// smites[initial(smite_path.name)] = smite_path
+// return smites
+
+// GLOBAL_LIST_INIT_TYPED(smites, /datum/smite, init_smites())
diff --git a/code/_globalvars/lists/maintenance_loot.dm b/code/_globalvars/lists/maintenance_loot.dm
index 694e913d53..b41b7356a8 100644
--- a/code/_globalvars/lists/maintenance_loot.dm
+++ b/code/_globalvars/lists/maintenance_loot.dm
@@ -89,7 +89,7 @@ GLOBAL_LIST_INIT(maintenance_loot, list(
/obj/effect/spawner/lootdrop/welder_tools = 3,
/obj/effect/spawner/lootdrop/low_tools = 5,
/obj/item/relic = 3,
- /obj/item/weaponcrafting/improvised_parts/shotgun_receiver = 2,
+ /obj/item/weaponcrafting/receiver = 2,
/obj/item/clothing/head/cone = 2,
/obj/item/grenade/smokebomb = 2,
/obj/item/geiger_counter = 3,
diff --git a/code/_globalvars/logging.dm b/code/_globalvars/logging.dm
index e9f98f836e..78d802dbbf 100644
--- a/code/_globalvars/logging.dm
+++ b/code/_globalvars/logging.dm
@@ -8,6 +8,8 @@ GLOBAL_VAR(world_qdel_log)
GLOBAL_PROTECT(world_qdel_log)
GLOBAL_VAR(world_attack_log)
GLOBAL_PROTECT(world_attack_log)
+// GLOBAL_VAR(world_econ_log)
+// GLOBAL_PROTECT(world_econ_log)
GLOBAL_VAR(world_href_log)
GLOBAL_PROTECT(world_href_log)
GLOBAL_VAR(round_id)
@@ -26,22 +28,28 @@ GLOBAL_VAR(query_debug_log)
GLOBAL_PROTECT(query_debug_log)
GLOBAL_VAR(world_job_debug_log)
GLOBAL_PROTECT(world_job_debug_log)
+// GLOBAL_VAR(world_mecha_log)
+// GLOBAL_PROTECT(world_mecha_log)
GLOBAL_VAR(world_virus_log)
GLOBAL_PROTECT(world_virus_log)
GLOBAL_VAR(world_asset_log)
GLOBAL_PROTECT(world_asset_log)
+// GLOBAL_VAR(world_cloning_log)
+// GLOBAL_PROTECT(world_cloning_log)
GLOBAL_VAR(world_map_error_log)
GLOBAL_PROTECT(world_map_error_log)
GLOBAL_VAR(world_paper_log)
GLOBAL_PROTECT(world_paper_log)
-GLOBAL_VAR(subsystem_log)
-GLOBAL_PROTECT(subsystem_log)
-GLOBAL_VAR(reagent_log)
-GLOBAL_PROTECT(reagent_log)
-GLOBAL_VAR(world_crafting_log)
-GLOBAL_PROTECT(world_crafting_log)
-GLOBAL_VAR(click_log)
-GLOBAL_PROTECT(click_log)
+GLOBAL_VAR(tgui_log)
+GLOBAL_PROTECT(tgui_log)
+GLOBAL_VAR(world_shuttle_log)
+GLOBAL_PROTECT(world_shuttle_log)
+
+GLOBAL_VAR(perf_log)
+GLOBAL_PROTECT(perf_log)
+
+// GLOBAL_VAR(demo_log)
+// GLOBAL_PROTECT(demo_log)
GLOBAL_LIST_EMPTY(bombers)
GLOBAL_PROTECT(bombers)
@@ -51,10 +59,7 @@ GLOBAL_LIST_EMPTY(lastsignalers) //keeps last 100 signals here in format: "[src]
GLOBAL_PROTECT(lastsignalers)
GLOBAL_LIST_EMPTY(lawchanges) //Stores who uploaded laws to which silicon-based lifeform, and what the law was
GLOBAL_PROTECT(lawchanges)
-GLOBAL_VAR(tgui_log)
-GLOBAL_PROTECT(tgui_log)
-GLOBAL_VAR(world_shuttle_log)
-GLOBAL_PROTECT(world_shuttle_log)
+
GLOBAL_LIST_EMPTY(combatlog)
GLOBAL_PROTECT(combatlog)
GLOBAL_LIST_EMPTY(IClog)
@@ -75,3 +80,13 @@ GLOBAL_PROTECT(picture_logging_id)
GLOBAL_VAR(picture_logging_prefix)
GLOBAL_PROTECT(picture_logging_prefix)
/////
+
+//// cit logging
+GLOBAL_VAR(subsystem_log)
+GLOBAL_PROTECT(subsystem_log)
+GLOBAL_VAR(reagent_log)
+GLOBAL_PROTECT(reagent_log)
+GLOBAL_VAR(world_crafting_log)
+GLOBAL_PROTECT(world_crafting_log)
+GLOBAL_VAR(click_log)
+GLOBAL_PROTECT(click_log)
diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm
index d82f3e7cf5..076c949f8e 100644
--- a/code/_onclick/hud/fullscreen.dm
+++ b/code/_onclick/hud/fullscreen.dm
@@ -149,6 +149,15 @@
/obj/screen/fullscreen/color_vision/blue
color = "#0000ff"
+/obj/screen/fullscreen/cinematic_backdrop
+ icon = 'icons/mob/screen_gen.dmi'
+ screen_loc = "WEST,SOUTH to EAST,NORTH"
+ icon_state = "flash"
+ plane = SPLASHSCREEN_PLANE
+ layer = SPLASHSCREEN_LAYER - 1
+ color = "#000000"
+ show_when_dead = TRUE
+
/obj/screen/fullscreen/lighting_backdrop
icon = 'icons/mob/screen_gen.dmi'
icon_state = "flash"
diff --git a/code/_onclick/hud/parallax.dm b/code/_onclick/hud/parallax.dm
index 9050bcb5f0..5d48f430d7 100755
--- a/code/_onclick/hud/parallax.dm
+++ b/code/_onclick/hud/parallax.dm
@@ -10,6 +10,8 @@
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_1(null, C.view)
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_2(null, C.view)
C.parallax_layers_cached += new /obj/screen/parallax_layer/planet(null, C.view)
+ if(SSparallax.random_layer)
+ C.parallax_layers_cached += new SSparallax.random_layer
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_3(null, C.view)
C.parallax_layers = C.parallax_layers_cached.Copy()
@@ -52,12 +54,12 @@
switch(C.prefs.parallax)
if (PARALLAX_INSANE)
C.parallax_throttle = FALSE
- C.parallax_layers_max = 4
+ C.parallax_layers_max = 5
return TRUE
if (PARALLAX_MED)
C.parallax_throttle = PARALLAX_DELAY_MED
- C.parallax_layers_max = 2
+ C.parallax_layers_max = 3
return TRUE
if (PARALLAX_LOW)
@@ -68,8 +70,9 @@
if (PARALLAX_DISABLE)
return FALSE
+ //This is high parallax.
C.parallax_throttle = PARALLAX_DELAY_DEFAULT
- C.parallax_layers_max = 3
+ C.parallax_layers_max = 4
return TRUE
/datum/hud/proc/update_parallax_pref(mob/viewmob)
@@ -219,15 +222,14 @@
L.screen_loc = "CENTER-7:[round(L.offset_x,1)],CENTER-7:[round(L.offset_y,1)]"
/atom/movable/proc/update_parallax_contents()
- set waitfor = FALSE
if(length(client_mobs_in_contents))
for(var/thing in client_mobs_in_contents)
var/mob/M = thing
- if(M && M.client && M.hud_used && length(M.client.parallax_layers))
+ if(M?.client && M.hud_used && length(M.client.parallax_layers))
M.hud_used.update_parallax()
/mob/proc/update_parallax_teleport() //used for arrivals shuttle
- if(client && client.eye && hud_used && length(client.parallax_layers))
+ if(client?.eye && hud_used && length(client.parallax_layers))
var/area/areaobj = get_area(client.eye)
hud_used.set_parallax_movedir(areaobj.parallax_movedir, TRUE)
@@ -287,6 +289,21 @@
speed = 1.4
layer = 3
+/obj/screen/parallax_layer/random
+ blend_mode = BLEND_OVERLAY
+ speed = 3
+ layer = 3
+
+/obj/screen/parallax_layer/random/space_gas
+ icon_state = "space_gas"
+
+/obj/screen/parallax_layer/random/space_gas/Initialize(mapload, view)
+ . = ..()
+ src.add_atom_colour(SSparallax.random_parallax_color, ADMIN_COLOUR_PRIORITY)
+
+/obj/screen/parallax_layer/random/asteroids
+ icon_state = "asteroids"
+
/obj/screen/parallax_layer/planet
icon_state = "planet"
blend_mode = BLEND_OVERLAY
@@ -295,11 +312,11 @@
layer = 30
/obj/screen/parallax_layer/planet/update_status(mob/M)
- var/turf/T = get_turf(M)
- if(is_station_level(T.z))
- invisibility = 0
- else
- invisibility = INVISIBILITY_ABSTRACT
+ var/client/C = M.client
+ var/turf/posobj = get_turf(C.eye)
+ if(!posobj)
+ return
+ invisibility = is_station_level(posobj.z) ? 0 : INVISIBILITY_ABSTRACT
/obj/screen/parallax_layer/planet/update_o()
- return //Shit wont move
+ return //Shit won't move
diff --git a/code/_onclick/hud/plane_master.dm b/code/_onclick/hud/plane_master.dm
index 7a8b0a1121..f5b8991e20 100644
--- a/code/_onclick/hud/plane_master.dm
+++ b/code/_onclick/hud/plane_master.dm
@@ -28,8 +28,6 @@
. = ..()
filters += filter(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE)
-/obj/screen/plane_master/openspace/backdrop(mob/mymob)
- filters = list()
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -10)
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -15)
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -20)
@@ -93,13 +91,6 @@
else
remove_filter("ambient_occlusion")
-//Reserved to chat messages, so they are still displayed above the field of vision masking.
-/obj/screen/plane_master/chat_messages
- name = "chat messages plane master"
- plane = CHAT_PLANE
- appearance_flags = PLANE_MASTER
- mouse_opacity = MOUSE_OPACITY_TRANSPARENT
-
///Contains all shadow cone masks, whose image overrides are displayed only to their respective owners.
/obj/screen/plane_master/field_of_vision
name = "field of vision mask plane master"
@@ -135,10 +126,14 @@
blend_mode = BLEND_MULTIPLY
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
+/obj/screen/plane_master/lighting/backdrop(mob/mymob)
+ mymob.overlay_fullscreen("lighting_backdrop_lit", /obj/screen/fullscreen/lighting_backdrop/lit)
+ mymob.overlay_fullscreen("lighting_backdrop_unlit", /obj/screen/fullscreen/lighting_backdrop/unlit)
+
/obj/screen/plane_master/lighting/Initialize()
. = ..()
- filters += filter(type="alpha", render_source=EMISSIVE_RENDER_TARGET, flags=MASK_INVERSE)
- filters += filter(type="alpha", render_source=EMISSIVE_UNBLOCKABLE_RENDER_TARGET, flags=MASK_INVERSE)
+ filters += filter(type="alpha", render_source = EMISSIVE_RENDER_TARGET, flags = MASK_INVERSE)
+ filters += filter(type="alpha", render_source = EMISSIVE_UNBLOCKABLE_RENDER_TARGET, flags = MASK_INVERSE)
/**
* Things placed on this mask the lighting plane. Doesn't render directly.
@@ -186,7 +181,6 @@
render_target = EMISSIVE_BLOCKER_RENDER_TARGET
///Contains space parallax
-
/obj/screen/plane_master/parallax
name = "parallax plane master"
plane = PLANE_SPACE_PARALLAX
@@ -197,12 +191,16 @@
name = "parallax whitifier plane master"
plane = PLANE_SPACE
-/obj/screen/plane_master/lighting/backdrop(mob/mymob)
- mymob.overlay_fullscreen("lighting_backdrop_lit", /obj/screen/fullscreen/lighting_backdrop/lit)
- mymob.overlay_fullscreen("lighting_backdrop_unlit", /obj/screen/fullscreen/lighting_backdrop/unlit)
-
/obj/screen/plane_master/camera_static
name = "camera static plane master"
plane = CAMERA_STATIC_PLANE
appearance_flags = PLANE_MASTER
blend_mode = BLEND_OVERLAY
+
+
+//Reserved to chat messages, so they are still displayed above the field of vision masking.
+/obj/screen/plane_master/chat_messages
+ name = "runechat plane master"
+ plane = CHAT_PLANE
+ appearance_flags = PLANE_MASTER
+ blend_mode = BLEND_OVERLAY
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 2ed8c81ba2..53915ff42b 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -12,9 +12,14 @@
layer = HUD_LAYER
plane = HUD_PLANE
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
+ animate_movement = SLIDE_STEPS
+ speech_span = SPAN_ROBOT
+ vis_flags = VIS_INHERIT_PLANE
appearance_flags = APPEARANCE_UI
- var/obj/master = null //A reference to the object in the slot. Grabs or items, generally.
- var/datum/hud/hud = null // A reference to the owner HUD, if any.
+ /// A reference to the object in the slot. Grabs or items, generally.
+ var/obj/master = null
+ /// A reference to the owner HUD, if any.
+ var/datum/hud/hud = null
/**
* Map name assigned to this object.
* Automatically set by /client/proc/add_obj_to_map.
@@ -60,7 +65,17 @@
name = "swap hand"
/obj/screen/swap_hand/Click()
- usr.swap_hand()
+ // At this point in client Click() code we have passed the 1/10 sec check and little else
+ // We don't even know if it's a middle click
+ // if(world.time <= usr.next_move)
+ // return 1
+
+ if(usr.incapacitated())
+ return 1
+
+ if(ismob(usr))
+ var/mob/M = usr
+ M.swap_hand()
return 1
/obj/screen/craft
@@ -96,17 +111,27 @@
H.open_language_menu(usr)
/obj/screen/inventory
- var/slot_id // The indentifier for the slot. It has nothing to do with ID cards.
- var/icon_empty // Icon when empty. For now used only by humans.
- var/icon_full // Icon when contains an item. For now used only by humans.
+ /// The identifier for the slot. It has nothing to do with ID cards.
+ var/slot_id
+ /// Icon when empty. For now used only by humans.
+ var/icon_empty
+ /// Icon when contains an item. For now used only by humans.
+ var/icon_full
+ /// The overlay when hovering over with an item in your hand
var/list/object_overlays = list()
layer = HUD_LAYER
plane = HUD_PLANE
/obj/screen/inventory/Click(location, control, params)
- if(hud?.mymob && (hud.mymob != usr))
- return
- // just redirect clicks
+ // At this point in client Click() code we have passed the 1/10 sec check and little else
+ // We don't even know if it's a middle click
+ // if(world.time <= usr.next_move)
+ // return TRUE
+
+ if(usr.incapacitated()) // ignore_stasis = TRUE
+ return TRUE
+ if(ismecha(usr.loc)) // stops inventory actions in a mech
+ return TRUE
if(hud?.mymob && slot_id)
var/obj/item/inv_item = hud.mymob.get_item_by_slot(slot_id)
@@ -150,12 +175,13 @@
var/image/item_overlay = image(holding)
item_overlay.alpha = 92
- if(!user.can_equip(holding, slot_id, TRUE, TRUE, TRUE))
+ if(!user.can_equip(holding, slot_id, TRUE))
item_overlay.color = "#FF0000"
else
item_overlay.color = "#00ff00"
- object_overlays += item_overlay
+ cut_overlay(object_overlays)
+ // object_overlay = item_overlay
add_overlay(object_overlays)
/obj/screen/inventory/hand
@@ -187,10 +213,17 @@
/obj/screen/inventory/hand/Click(location, control, params)
- if(hud?.mymob && (hud.mymob != usr))
- return
- var/mob/user = hud.mymob
- // just redirect clicks
+ // At this point in client Click() code we have passed the 1/10 sec check and little else
+ // We don't even know if it's a middle click
+ var/mob/user = hud?.mymob
+ if(usr != user)
+ return TRUE
+ // if(world.time <= user.next_move)
+ // return TRUE
+ if(user.incapacitated())
+ return TRUE
+ if (ismecha(user.loc)) // stops inventory actions in a mech
+ return TRUE
if(user.active_hand_index == held_index)
var/obj/item/I = user.get_active_held_item()
diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index cd1ee56848..7a614da07b 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -85,7 +85,7 @@
if(force && damtype != STAMINA && HAS_TRAIT(user, TRAIT_PACIFISM))
to_chat(user, "You don't want to harm other living beings! ")
return
-
+
if(!UseStaminaBufferStandard(user, STAM_COST_ATTACK_MOB_MULT, null, TRUE))
return DISCARD_LAST_ACTION
diff --git a/code/controllers/admin.dm b/code/controllers/admin.dm
index 3782d8be94..19fef28597 100644
--- a/code/controllers/admin.dm
+++ b/code/controllers/admin.dm
@@ -3,7 +3,7 @@
name = "Initializing..."
var/target
-INITIALIZE_IMMEDIATE(/obj/effect/statclick) //it's new, but rebranded.
+INITIALIZE_IMMEDIATE(/obj/effect/statclick)
/obj/effect/statclick/Initialize(mapload, text, target) //Don't port this to Initialize it's too critical
. = ..()
@@ -33,14 +33,6 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick) //it's new, but rebranded.
usr.client.debug_variables(target)
message_admins("Admin [key_name_admin(usr)] is debugging the [target] [class].")
-/obj/effect/statclick/misc_subsystems/Click()
- if(!usr.client.holder)
- return
- var/subsystem = input(usr, "Debug which subsystem?", "Debug nonprocessing subsystem") as null|anything in (Master.subsystems - Master.statworthy_subsystems)
- if(!subsystem)
- return
- usr.client.debug_variables(subsystem)
- message_admins("Admin [key_name_admin(usr)] is debugging the [subsystem] subsystem.")
// Debug verbs.
/client/proc/restart_controller(controller in list("Master", "Failsafe"))
diff --git a/code/controllers/failsafe.dm b/code/controllers/failsafe.dm
index fdce9a1287..a15056e442 100644
--- a/code/controllers/failsafe.dm
+++ b/code/controllers/failsafe.dm
@@ -1,7 +1,7 @@
/**
- * Failsafe
- *
- * Pretty much pokes the MC to make sure it's still alive.
+ * Failsafe
+ *
+ * Pretty much pokes the MC to make sure it's still alive.
**/
GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
diff --git a/code/controllers/master.dm b/code/controllers/master.dm
index 1b5c7e5e83..59ac68960c 100644
--- a/code/controllers/master.dm
+++ b/code/controllers/master.dm
@@ -1,10 +1,10 @@
- /**
- * StonedMC
- *
- * Designed to properly split up a given tick among subsystems
- * Note: if you read parts of this code and think "why is it doing it that way"
- * Odds are, there is a reason
- *
+/**
+ * StonedMC
+ *
+ * Designed to properly split up a given tick among subsystems
+ * Note: if you read parts of this code and think "why is it doing it that way"
+ * Odds are, there is a reason
+ *
**/
//This is the ABSOLUTE ONLY THING that should init globally like this
@@ -28,8 +28,6 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
// List of subsystems to process().
var/list/subsystems
- /// List of subsystems to include in the MC stat panel.
- var/list/statworthy_subsystems
// Vars for keeping track of tick drift.
var/init_timeofday
@@ -41,7 +39,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
///Only run ticker subsystems for the next n ticks.
var/skip_ticks = 0
- var/make_runtime = 0
+ var/make_runtime = FALSE
var/initializations_finished_with_no_players_logged_in //I wonder what this could be?
@@ -67,9 +65,6 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
//used by CHECK_TICK as well so that the procs subsystems call can obey that SS's tick limits
var/static/current_ticklimit = TICK_LIMIT_RUNNING
- /// Statclick for misc subsystems
- var/obj/effect/statclick/misc_subsystems/misc_statclick
-
/datum/controller/master/New()
if(!config)
config = new
@@ -96,11 +91,6 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
_subsystems += new I
Master = src
- // We want to see all subsystems during init.
- statworthy_subsystems = subsystems.Copy()
-
- misc_statclick = new(null, "Debug")
-
if(!GLOB)
new /datum/controller/global_vars
@@ -217,7 +207,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
// Sort subsystems by display setting for easy access.
sortTim(subsystems, /proc/cmp_subsystem_display)
// Set world options.
- world.fps = CONFIG_GET(number/fps)
+ world.change_fps(CONFIG_GET(number/fps))
var/initialized_tod = REALTIMEOFDAY
if(tgs_prime)
@@ -271,14 +261,10 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
var/list/tickersubsystems = list()
var/list/runlevel_sorted_subsystems = list(list()) //ensure we always have at least one runlevel
var/timer = world.time
- statworthy_subsystems = list()
for (var/thing in subsystems)
var/datum/controller/subsystem/SS = thing
if (SS.flags & SS_NO_FIRE)
- if(SS.flags & SS_ALWAYS_SHOW_STAT)
- statworthy_subsystems += SS
continue
- statworthy_subsystems += SS
SS.queued_time = 0
SS.queue_next = null
SS.queue_prev = null
diff --git a/code/controllers/subsystem.dm b/code/controllers/subsystem.dm
index e49da32557..12798f3863 100644
--- a/code/controllers/subsystem.dm
+++ b/code/controllers/subsystem.dm
@@ -23,7 +23,7 @@
var/priority = FIRE_PRIORITY_DEFAULT
/// [Subsystem Flags][SS_NO_INIT] to control binary behavior. Flags must be set at compile time or before preinit finishes to take full effect. (You can also restart the mc to force them to process again)
- var/flags = 0
+ var/flags = NONE
/// This var is set to TRUE after the subsystem has been initialized.
var/initialized = FALSE
@@ -114,7 +114,7 @@
//previously, this would have been named 'process()' but that name is used everywhere for different things!
//fire() seems more suitable. This is the procedure that gets called every 'wait' deciseconds.
//Sleeping in here prevents future fires until returned.
-/datum/controller/subsystem/proc/fire(resumed = 0)
+/datum/controller/subsystem/proc/fire(resumed = FALSE)
flags |= SS_NO_FIRE
CRASH("Subsystem [src]([type]) does not fire() but did not set the SS_NO_FIRE flag. Please add the SS_NO_FIRE flag to any subsystem that doesn't fire so it doesn't get added to the processing list and waste cpu.")
diff --git a/code/controllers/subsystem/air.dm b/code/controllers/subsystem/air.dm
index f777c967ae..3c58c90452 100644
--- a/code/controllers/subsystem/air.dm
+++ b/code/controllers/subsystem/air.dm
@@ -241,7 +241,8 @@ SUBSYSTEM_DEF(air)
return
/datum/controller/subsystem/air/proc/process_turf_equalize(resumed = 0)
- return process_turf_equalize_extools(resumed, (Master.current_ticklimit - TICK_USAGE) * 0.01 * world.tick_lag)
+ if(process_turf_equalize_extools(resumed, (Master.current_ticklimit - TICK_USAGE) * 0.01 * world.tick_lag))
+ pause()
/*
//cache for sanic speed
var/fire_count = times_fired
@@ -260,7 +261,8 @@ SUBSYSTEM_DEF(air)
*/
/datum/controller/subsystem/air/proc/process_active_turfs(resumed = 0)
- return process_active_turfs_extools(resumed, (Master.current_ticklimit - TICK_USAGE) * 0.01 * world.tick_lag)
+ if(process_active_turfs_extools(resumed, (Master.current_ticklimit - TICK_USAGE) * 0.01 * world.tick_lag))
+ pause()
/*
//cache for sanic speed
var/fire_count = times_fired
@@ -278,7 +280,8 @@ SUBSYSTEM_DEF(air)
*/
/datum/controller/subsystem/air/proc/process_excited_groups(resumed = 0)
- return process_excited_groups_extools(resumed, (Master.current_ticklimit - TICK_USAGE) * 0.01 * world.tick_lag)
+ if(process_excited_groups_extools(resumed, (Master.current_ticklimit - TICK_USAGE) * 0.01 * world.tick_lag))
+ pause()
/*
if (!resumed)
src.currentrun = excited_groups.Copy()
diff --git a/code/controllers/subsystem/assets.dm b/code/controllers/subsystem/assets.dm
index 4f02d32ad0..4b43f98290 100644
--- a/code/controllers/subsystem/assets.dm
+++ b/code/controllers/subsystem/assets.dm
@@ -11,7 +11,7 @@ SUBSYSTEM_DEF(assets)
switch (CONFIG_GET(string/asset_transport))
if ("webroot")
newtransporttype = /datum/asset_transport/webroot
-
+
if (newtransporttype == transport.type)
return
diff --git a/code/controllers/subsystem/atoms.dm b/code/controllers/subsystem/atoms.dm
index b9a4785f49..02aad6dec3 100644
--- a/code/controllers/subsystem/atoms.dm
+++ b/code/controllers/subsystem/atoms.dm
@@ -10,33 +10,37 @@ SUBSYSTEM_DEF(atoms)
var/old_initialized
- var/list/late_loaders
+ var/list/late_loaders = list()
var/list/BadInitializeCalls = list()
+ initialized = INITIALIZATION_INSSATOMS
+
/datum/controller/subsystem/atoms/Initialize(timeofday)
GLOB.fire_overlay.appearance_flags = RESET_COLOR
- setupGenetics()
+ setupGenetics() //to set the mutations' sequence
+
initialized = INITIALIZATION_INNEW_MAPLOAD
InitializeAtoms()
+ initialized = INITIALIZATION_INNEW_REGULAR
return ..()
/datum/controller/subsystem/atoms/proc/InitializeAtoms(list/atoms)
if(initialized == INITIALIZATION_INSSATOMS)
return
+ old_initialized = initialized
initialized = INITIALIZATION_INNEW_MAPLOAD
- LAZYINITLIST(late_loaders)
-
var/count
var/list/mapload_arg = list(TRUE)
+
if(atoms)
count = atoms.len
- for(var/I in atoms)
- var/atom/A = I
+ for(var/I in 1 to count)
+ var/atom/A = atoms[I]
if(!(A.flags_1 & INITIALIZED_1))
- InitAtom(I, mapload_arg)
+ InitAtom(A, mapload_arg)
CHECK_TICK
else
count = 0
@@ -49,15 +53,16 @@ SUBSYSTEM_DEF(atoms)
testing("Initialized [count] atoms")
pass(count)
- initialized = INITIALIZATION_INNEW_REGULAR
+ initialized = old_initialized
if(late_loaders.len)
- for(var/I in late_loaders)
- var/atom/A = I
+ for(var/I in 1 to late_loaders.len)
+ var/atom/A = late_loaders[I]
A.LateInitialize()
testing("Late initialized [late_loaders.len] atoms")
late_loaders.Cut()
+/// Init this specific atom
/datum/controller/subsystem/atoms/proc/InitAtom(atom/A, list/arguments)
var/the_type = A.type
if(QDELING(A))
@@ -150,8 +155,3 @@ SUBSYSTEM_DEF(atoms)
var/initlog = InitLog()
if(initlog)
text2file(initlog, "[GLOB.log_directory]/initialize.log")
-
-#undef BAD_INIT_QDEL_BEFORE
-#undef BAD_INIT_DIDNT_INIT
-#undef BAD_INIT_SLEPT
-#undef BAD_INIT_NO_HINT
diff --git a/code/controllers/subsystem/blackbox.dm b/code/controllers/subsystem/blackbox.dm
index dc1f246e3d..bacccefc61 100644
--- a/code/controllers/subsystem/blackbox.dm
+++ b/code/controllers/subsystem/blackbox.dm
@@ -14,12 +14,14 @@ SUBSYSTEM_DEF(blackbox)
"explosion" = 2,
"time_dilation_current" = 3,
"science_techweb_unlock" = 2,
- "round_end_stats" = 2) //associative list of any feedback variables that have had their format changed since creation and their current version, remember to update this
+ "round_end_stats" = 2,
+ "testmerged_prs" = 2) //associative list of any feedback variables that have had their format changed since creation and their current version, remember to update this
/datum/controller/subsystem/blackbox/Initialize()
triggertime = world.time
record_feedback("amount", "random_seed", Master.random_seed)
record_feedback("amount", "dm_version", DM_VERSION)
+ record_feedback("amount", "dm_build", DM_BUILD)
record_feedback("amount", "byond_version", world.byond_version)
record_feedback("amount", "byond_build", world.byond_build)
. = ..()
@@ -39,10 +41,7 @@ SUBSYSTEM_DEF(blackbox)
if(!SSdbcore.Connect())
return
- var/playercount = 0
- for(var/mob/M in GLOB.player_list)
- if(M.client)
- playercount += 1
+ var/playercount = LAZYLEN(GLOB.player_list)
var/admincount = GLOB.admins.len
var/datum/DBQuery/query_record_playercount = SSdbcore.NewQuery("INSERT INTO [format_table_name("legacy_population")] (playercount, admincount, time, server_ip, server_port, round_id) VALUES ([playercount], [admincount], '[SQLtime()]', INET_ATON(IF('[world.internet_address]' LIKE '', '0', '[world.internet_address]')), '[world.port]', '[GLOB.round_id]')")
query_record_playercount.Execute()
@@ -88,18 +87,24 @@ SUBSYSTEM_DEF(blackbox)
if (!SSdbcore.Connect())
return
+ // var/list/special_columns = list(
+ // "datetime" = "NOW()"
+ // )
var/list/sqlrowlist = list()
-
for (var/datum/feedback_variable/FV in feedback)
- var/sqlversion = 1
- if(FV.key in versions)
- sqlversion = versions[FV.key]
- sqlrowlist += list(list("datetime" = "Now()", "round_id" = GLOB.round_id, "key_name" = "'[sanitizeSQL(FV.key)]'", "key_type" = "'[FV.key_type]'", "version" = "[sqlversion]", "json" = "'[sanitizeSQL(json_encode(FV.json))]'"))
+ sqlrowlist += list(list(
+ "datetime" = "Now()", //legacy
+ "round_id" = GLOB.round_id,
+ "key_name" = sanitizeSQL(FV.key),
+ "key_type" = FV.key_type,
+ "version" = versions[FV.key] || 1,
+ "json" = sanitizeSQL(json_encode(FV.json))
+ ))
if (!length(sqlrowlist))
return
- SSdbcore.MassInsert(format_table_name("feedback"), sqlrowlist, ignore_errors = TRUE, delayed = TRUE)
+ SSdbcore.MassInsert(format_table_name("feedback"), sqlrowlist, ignore_errors = TRUE, delayed = TRUE)//, special_columns = special_columns)
/datum/controller/subsystem/blackbox/proc/Seal()
if(sealed)
@@ -169,7 +174,7 @@ feedback data can be recorded in 5 formats:
"tally"
used to track the number of occurances of multiple related values i.e. how many times each type of gun is fired
further calls to the same key will:
- add or subtract from the saved value of the data key if it already exists
+ add or subtract from the saved value of the data key if it already exists
append the key and it's value if it doesn't exist
calls: SSblackbox.record_feedback("tally", "example", 1, "sample data")
SSblackbox.record_feedback("tally", "example", 4, "sample data")
@@ -181,7 +186,7 @@ feedback data can be recorded in 5 formats:
the final element in the data list is used as the tracking key, all prior elements are used for nesting
all data list elements must be strings
further calls to the same key will:
- add or subtract from the saved value of the data key if it already exists in the same multi-dimensional position
+ add or subtract from the saved value of the data key if it already exists in the same multi-dimensional position
append the key and it's value if it doesn't exist
calls: SSblackbox.record_feedback("nested tally", "example", 1, list("fruit", "orange", "apricot"))
SSblackbox.record_feedback("nested tally", "example", 2, list("fruit", "orange", "orange"))
@@ -270,6 +275,18 @@ Versioning
/datum/feedback_variable/New(new_key, new_key_type)
key = new_key
key_type = new_key_type
+/*
+/datum/controller/subsystem/blackbox/proc/LogAhelp(ticket, action, message, recipient, sender)
+ if(!SSdbcore.Connect())
+ return
+
+ var/datum/db_query/query_log_ahelp = SSdbcore.NewQuery({"
+ INSERT INTO [format_table_name("ticket")] (ticket, action, message, recipient, sender, server_ip, server_port, round_id, timestamp)
+ VALUES (:ticket, :action, :message, :recipient, :sender, INET_ATON(:server_ip), :server_port, :round_id, :time)
+ "}, list("ticket" = ticket, "action" = action, "message" = message, "recipient" = recipient, "sender" = sender, "server_ip" = world.internet_address || "0", "server_port" = world.port, "round_id" = GLOB.round_id, "time" = SQLtime()))
+ query_log_ahelp.Execute()
+ qdel(query_log_ahelp)
+*/
/datum/controller/subsystem/blackbox/proc/ReportDeath(mob/living/L)
set waitfor = FALSE
diff --git a/code/controllers/subsystem/chat.dm b/code/controllers/subsystem/chat.dm
index f2e9da704f..0e4f8ecad2 100644
--- a/code/controllers/subsystem/chat.dm
+++ b/code/controllers/subsystem/chat.dm
@@ -1,4 +1,4 @@
-/**
+/*!
* Copyright (c) 2020 Aleksej Komarov
* SPDX-License-Identifier: MIT
*/
diff --git a/code/controllers/subsystem/dbcore.dm b/code/controllers/subsystem/dbcore.dm
index 4eff4fbf1d..c779c9f26d 100644
--- a/code/controllers/subsystem/dbcore.dm
+++ b/code/controllers/subsystem/dbcore.dm
@@ -177,6 +177,25 @@ SUBSYSTEM_DEF(dbcore)
return FALSE
return new /datum/DBQuery(sql_query, connection)
+/datum/controller/subsystem/dbcore/proc/QuerySelect(list/querys, warn = FALSE, qdel = FALSE)
+ if (!islist(querys))
+ if (!istype(querys, /datum/DBQuery))
+ CRASH("Invalid query passed to QuerySelect: [querys]")
+ querys = list(querys)
+
+ for (var/thing in querys)
+ var/datum/DBQuery/query = thing
+ if (warn)
+ INVOKE_ASYNC(query, /datum/DBQuery.proc/warn_execute)
+ else
+ INVOKE_ASYNC(query, /datum/DBQuery.proc/Execute)
+
+ for (var/thing in querys)
+ var/datum/DBQuery/query = thing
+ UNTIL(!query.in_progress)
+ if (qdel)
+ qdel(query)
+
/*
Takes a list of rows (each row being an associated list of column => value) and inserts them via a single mass query.
Rows missing columns present in other rows will resolve to SQL NULL
@@ -361,5 +380,5 @@ Delayed insert mode was removed in mysql 7 and only works with MyISAM type table
//strip sensitive stuff
if(findtext(message, ": CreateConnection("))
message = "CreateConnection CENSORED"
-
+
log_sql("BSQL_DEBUG: [message]")
diff --git a/code/controllers/subsystem/events.dm b/code/controllers/subsystem/events.dm
index 9bc8a631c1..3660770596 100644
--- a/code/controllers/subsystem/events.dm
+++ b/code/controllers/subsystem/events.dm
@@ -25,7 +25,7 @@ SUBSYSTEM_DEF(events)
return ..()
-/datum/controller/subsystem/events/fire(resumed = 0)
+/datum/controller/subsystem/events/fire(resumed = FALSE)
if(!resumed)
checkEvent() //only check these if we aren't resuming a paused fire
src.currentrun = running.Copy()
@@ -37,7 +37,7 @@ SUBSYSTEM_DEF(events)
var/datum/thing = currentrun[currentrun.len]
currentrun.len--
if(thing)
- thing.process()
+ thing.process(wait * 0.1)
else
running.Remove(thing)
if (MC_TICK_CHECK)
@@ -91,13 +91,13 @@ SUBSYSTEM_DEF(events)
if(. == EVENT_CANT_RUN)//we couldn't run this event for some reason, set its max_occurrences to 0
E.max_occurrences = 0
else if(. == EVENT_READY)
- E.random = TRUE
- E.runEvent(TRUE)
+ E.runEvent(random = TRUE)
//allows a client to trigger an event
//aka Badmin Central
// > Not in modules/admin
// REEEEEEEEE
+// Why the heck is this here! Took me so damn long to find!
/client/proc/forceEvent()
set name = "Trigger Event"
set category = "Admin.Events"
diff --git a/code/controllers/subsystem/fire_burning.dm b/code/controllers/subsystem/fire_burning.dm
index 3251285ade..f81c23d186 100644
--- a/code/controllers/subsystem/fire_burning.dm
+++ b/code/controllers/subsystem/fire_burning.dm
@@ -18,6 +18,7 @@ SUBSYSTEM_DEF(fire_burning)
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
+ var/delta_time = wait * 0.1
while(currentrun.len)
var/obj/O = currentrun[currentrun.len]
@@ -28,10 +29,12 @@ SUBSYSTEM_DEF(fire_burning)
return
continue
- if(O.resistance_flags & ON_FIRE)
- O.take_damage(20, BURN, "fire", 0)
- else
- processing -= O
+
+ if(O.resistance_flags & ON_FIRE) //in case an object is extinguished while still in currentrun
+ if(!(O.resistance_flags & FIRE_PROOF))
+ O.take_damage(10 * delta_time, BURN, "fire", 0)
+ else
+ O.extinguish()
if (MC_TICK_CHECK)
return
diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm
index da3bb24a2f..2d2fac1d13 100644
--- a/code/controllers/subsystem/garbage.dm
+++ b/code/controllers/subsystem/garbage.dm
@@ -1,3 +1,26 @@
+/*!
+## Debugging GC issues
+
+In order to debug `qdel()` failures, there are several tools available.
+To enable these tools, define `TESTING` in [_compile_options.dm](https://github.com/tgstation/-tg-station/blob/master/code/_compile_options.dm).
+
+First is a verb called "Find References", which lists **every** refererence to an object in the world. This allows you to track down any indirect or obfuscated references that you might have missed.
+
+Complementing this is another verb, "qdel() then Find References".
+This does exactly what you'd expect; it calls `qdel()` on the object and then it finds all references remaining.
+This is great, because it means that `Destroy()` will have been called before it starts to find references,
+so the only references you'll find will be the ones preventing the object from `qdel()`ing gracefully.
+
+If you have a datum or something you are not destroying directly (say via the singulo),
+the next tool is `QDEL_HINT_FINDREFERENCE`. You can return this in `Destroy()` (where you would normally `return ..()`),
+to print a list of references once it enters the GC queue.
+
+Finally is a verb, "Show qdel() Log", which shows the deletion log that the garbage subsystem keeps. This is helpful if you are having race conditions or need to review the order of deletions.
+
+Note that for any of these tools to work `TESTING` must be defined.
+By using these methods of finding references, you can make your life far, far easier when dealing with `qdel()` failures.
+*/
+
SUBSYSTEM_DEF(garbage)
name = "Garbage"
priority = FIRE_PRIORITY_GARBAGE
@@ -6,7 +29,7 @@ SUBSYSTEM_DEF(garbage)
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
init_order = INIT_ORDER_GARBAGE
- var/list/collection_timeout = list(15 SECONDS, 30 SECONDS) // deciseconds to wait before moving something up in the queue to the next level
+ var/list/collection_timeout = list(2 MINUTES, 10 SECONDS) // deciseconds to wait before moving something up in the queue to the next level
//Stat tracking
var/delslasttick = 0 // number of del()'s we've done this tick
@@ -24,10 +47,8 @@ SUBSYSTEM_DEF(garbage)
//Queue
var/list/queues
-
#ifdef LEGACY_REFERENCE_TRACKING
var/list/reference_find_on_fail = list()
- var/list/reference_find_on_fail_types = list()
#endif
@@ -99,6 +120,9 @@ SUBSYSTEM_DEF(garbage)
state = SS_RUNNING
break
+
+
+
/datum/controller/subsystem/garbage/proc/HandleQueue(level = GC_QUEUE_CHECK)
if (level == GC_QUEUE_CHECK)
delslasttick = 0
@@ -139,7 +163,7 @@ SUBSYSTEM_DEF(garbage)
++totalgcs
pass_counts[level]++
#ifdef LEGACY_REFERENCE_TRACKING
- reference_find_on_fail -= refID //It's deleted we don't care anymore.
+ reference_find_on_fail -= refID //It's deleted we don't care anymore.
#endif
if (MC_TICK_CHECK)
return
@@ -153,10 +177,10 @@ SUBSYSTEM_DEF(garbage)
D.find_references()
#elif defined(LEGACY_REFERENCE_TRACKING)
if(reference_find_on_fail[refID])
- D.find_references()
+ D.find_references_legacy()
#ifdef GC_FAILURE_HARD_LOOKUP
else
- D.find_references()
+ D.find_references_legacy()
#endif
reference_find_on_fail -= refID
#endif
@@ -190,24 +214,6 @@ SUBSYSTEM_DEF(garbage)
queue.Cut(1,count+1)
count = 0
-/datum/controller/subsystem/garbage/proc/Queue(datum/D, level = GC_QUEUE_CHECK)
- if (isnull(D))
- return
- if (level > GC_QUEUE_COUNT)
- HardDelete(D)
- return
- var/gctime = world.time
- var/refid = "\ref[D]"
-
-#ifdef LEGACY_REFERENCE_TRACKING
- if(reference_find_on_fail_types[D.type])
- reference_find_on_fail["\ref[D]"] = TRUE
-#endif
-
- D.gc_destroyed = gctime
- var/list/queue = queues[level]
- queue[++queue.len] = list(gctime, refid) // not += for byond reasons
-
#ifdef LEGACY_REFERENCE_TRACKING
/datum/controller/subsystem/garbage/proc/add_type_to_findref(type)
if(!ispath(type))
@@ -223,6 +229,24 @@ SUBSYSTEM_DEF(garbage)
reference_find_on_fail_types = list()
#endif
+/datum/controller/subsystem/garbage/proc/Queue(datum/D, level = GC_QUEUE_CHECK)
+ if (isnull(D))
+ return
+ if (level > GC_QUEUE_COUNT)
+ HardDelete(D)
+ return
+ var/gctime = world.time
+ var/refid = "\ref[D]"
+
+#ifdef LEGACY_REFERENCE_TRACKING
+ if(reference_find_on_fail_types[D.type])
+ SSgarbage.reference_find_on_fail[REF(D)] = TRUE
+#endif
+
+ D.gc_destroyed = gctime
+ var/list/queue = queues[level]
+ queue[++queue.len] = list(gctime, refid) // not += for byond reasons
+
//this is mainly to separate things profile wise.
/datum/controller/subsystem/garbage/proc/HardDelete(datum/D)
var/time = world.timeofday
@@ -275,8 +299,10 @@ SUBSYSTEM_DEF(garbage)
/datum/qdel_item/New(mytype)
name = "[mytype]"
-// Should be treated as a replacement for the 'del' keyword.
-// Datums passed to this will be given a chance to clean up references to allow the GC to collect them.
+
+/// Should be treated as a replacement for the 'del' keyword.
+///
+/// Datums passed to this will be given a chance to clean up references to allow the GC to collect them.
/proc/qdel(datum/D, force=FALSE, ...)
if(!istype(D))
del(D)
@@ -331,9 +357,10 @@ SUBSYSTEM_DEF(garbage)
#ifdef LEGACY_REFERENCE_TRACKING
if (QDEL_HINT_FINDREFERENCE) //qdel will, if LEGACY_REFERENCE_TRACKING is enabled, display all references to this object, then queue the object for deletion.
SSgarbage.Queue(D)
+ D.find_references_legacy()
if (QDEL_HINT_IFFAIL_FINDREFERENCE)
SSgarbage.Queue(D)
- SSgarbage.reference_find_on_fail["\ref[D]"] = TRUE
+ SSgarbage.reference_find_on_fail[REF(D)] = TRUE
#endif
else
#ifdef TESTING
diff --git a/code/controllers/subsystem/idlenpcpool.dm b/code/controllers/subsystem/idlenpcpool.dm
index 03b7931d82..ccdaa555a2 100644
--- a/code/controllers/subsystem/idlenpcpool.dm
+++ b/code/controllers/subsystem/idlenpcpool.dm
@@ -33,8 +33,9 @@ SUBSYSTEM_DEF(idlenpcpool)
while(currentrun.len)
var/mob/living/simple_animal/SA = currentrun[currentrun.len]
--currentrun.len
- if (!SA)
+ if (QDELETED(SA))
GLOB.simple_animals[AI_IDLE] -= SA
+ log_world("Found a null in simple_animals list!")
continue
if(!SA.ckey)
diff --git a/code/controllers/subsystem/ipintel.dm b/code/controllers/subsystem/ipintel.dm
index fca394924d..fb0ddead09 100644
--- a/code/controllers/subsystem/ipintel.dm
+++ b/code/controllers/subsystem/ipintel.dm
@@ -2,13 +2,13 @@ SUBSYSTEM_DEF(ipintel)
name = "XKeyScore"
init_order = INIT_ORDER_XKEYSCORE
flags = SS_NO_FIRE
- var/enabled = 0 //disable at round start to avoid checking reconnects
+ var/enabled = FALSE //disable at round start to avoid checking reconnects
var/throttle = 0
var/errors = 0
var/list/cache = list()
/datum/controller/subsystem/ipintel/Initialize(timeofday, zlevel)
- enabled = 1
+ enabled = TRUE
. = ..()
diff --git a/code/controllers/subsystem/jukeboxes.dm b/code/controllers/subsystem/jukeboxes.dm
index 3ebeaf71ea..7be6d44a7f 100644
--- a/code/controllers/subsystem/jukeboxes.dm
+++ b/code/controllers/subsystem/jukeboxes.dm
@@ -94,8 +94,8 @@ SUBSYSTEM_DEF(jukeboxes)
stack_trace("Nonexistant or invalid object associated with jukebox.")
continue
var/sound/song_played = sound(juketrack.song_path)
- var/area/currentarea = get_area(jukebox)
var/turf/currentturf = get_turf(jukebox)
+ var/area/currentarea = get_area(jukebox)
var/list/hearerscache = hearers(7, jukebox)
song_played.falloff = jukeinfo[4]
@@ -116,7 +116,6 @@ SUBSYSTEM_DEF(jukeboxes)
inrange = TRUE
else
song_played.status = SOUND_MUTE | SOUND_UPDATE //Setting volume = 0 doesn't let the sound properties update at all, which is lame.
-
M.playsound_local(currentturf, null, 100, channel = jukeinfo[2], S = song_played, envwet = (inrange ? -250 : 0), envdry = (inrange ? 0 : -10000))
CHECK_TICK
return
diff --git a/code/controllers/subsystem/lighting.dm b/code/controllers/subsystem/lighting.dm
index e193c68536..19345f3c8d 100644
--- a/code/controllers/subsystem/lighting.dm
+++ b/code/controllers/subsystem/lighting.dm
@@ -6,6 +6,7 @@ SUBSYSTEM_DEF(lighting)
name = "Lighting"
wait = 2
init_order = INIT_ORDER_LIGHTING
+ flags = SS_TICKER
/datum/controller/subsystem/lighting/stat_entry(msg)
msg = "L:[length(GLOB.lighting_update_lights)]|C:[length(GLOB.lighting_update_corners)]|O:[length(GLOB.lighting_update_objects)]"
diff --git a/code/controllers/subsystem/machines.dm b/code/controllers/subsystem/machines.dm
index f356009569..23190574d8 100644
--- a/code/controllers/subsystem/machines.dm
+++ b/code/controllers/subsystem/machines.dm
@@ -2,6 +2,7 @@ SUBSYSTEM_DEF(machines)
name = "Machines"
init_order = INIT_ORDER_MACHINES
flags = SS_KEEP_TIMING
+ wait = 2 SECONDS
var/list/processing = list()
var/list/currentrun = list()
var/list/powernets = list()
@@ -27,7 +28,7 @@ SUBSYSTEM_DEF(machines)
return ..()
-/datum/controller/subsystem/machines/fire(resumed = 0)
+/datum/controller/subsystem/machines/fire(resumed = FALSE)
if (!resumed)
for(var/datum/powernet/Powernet in powernets)
Powernet.reset() //reset the power state.
@@ -36,11 +37,10 @@ SUBSYSTEM_DEF(machines)
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
- var/seconds = wait * 0.1
while(currentrun.len)
var/obj/machinery/thing = currentrun[currentrun.len]
currentrun.len--
- if(!QDELETED(thing) && thing.process(seconds) != PROCESS_KILL)
+ if(!QDELETED(thing) && thing.process(wait * 0.1) != PROCESS_KILL)
if(thing.use_power)
thing.auto_use_power() //add back the power state
else
diff --git a/code/controllers/subsystem/minimum_spawns.dm b/code/controllers/subsystem/minimum_spawns.dm
index caab2b1949..b9d19b6cd2 100644
--- a/code/controllers/subsystem/minimum_spawns.dm
+++ b/code/controllers/subsystem/minimum_spawns.dm
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(min_spawns)
name = "Minimum Spawns" /// this hot steaming pile of garbage makes sure theres a minimum of tendrils scattered around
init_order = INIT_ORDER_DEFAULT
- flags = SS_BACKGROUND | SS_NO_FIRE | SS_ALWAYS_SHOW_STAT
+ flags = SS_BACKGROUND | SS_NO_FIRE
wait = 2
var/where_we_droppin_boys_iterations = 0
var/snaxi_snowflake_check = FALSE
@@ -71,7 +71,7 @@ GLOBAL_LIST_INIT(minimum_snow_under_spawns, list(
continue
if(typesof(/turf/open/lava) in orange(9, TT))
continue
- valid_mining_turfs_2.Add(TT)
+ valid_mining_turfs_2.Add(TT)
else
for(var/z_level in SSmapping.levels_by_trait(ZTRAIT_LAVA_RUINS))
for(var/turf/TT in Z_TURFS(z_level))
@@ -103,14 +103,14 @@ GLOBAL_LIST_INIT(minimum_snow_under_spawns, list(
for(var/mob/living/simple_animal/hostile/megafauna/H in urange(70,RT)) //prevents mob clumps
if((istype(MS_tospawn, /mob/living/simple_animal/hostile/megafauna)) && get_dist(RT, H) <= 70)
active_spawns.Add(MS_tospawn)
- continue //let's try not to dump megas too close to each other?
+ continue //let's try not to dump megas too close to each other?
if((istype(MS_tospawn, /obj/structure/spawner)) && get_dist(RT, H) <= 40)
active_spawns.Add(MS_tospawn)
continue //let's at least /try/ to space these out?
for(var/obj/structure/spawner/LT in urange(70,RT)) //prevents tendril/mega clumps
if((istype(MS_tospawn, /mob/living/simple_animal/hostile/megafauna)) && get_dist(RT, LT) <= 70)
active_spawns.Add(MS_tospawn)
- continue //let's try not to dump megas too close to each other?
+ continue //let's try not to dump megas too close to each other?
if((istype(MS_tospawn, /obj/structure/spawner)) && get_dist(RT, LT) <= 40)
active_spawns.Add(MS_tospawn)
continue //let's at least /try/ to space these out?
@@ -127,7 +127,7 @@ GLOBAL_LIST_INIT(minimum_snow_under_spawns, list(
for(var/mob/living/simple_animal/hostile/H in urange(70,RT2)) //prevents mob clumps
if((istype(MS2_tospawn, /mob/living/simple_animal/hostile/megafauna) || ismegafauna(H)) && get_dist(RT2, H) <= 70)
active_spawns_2.Add(MS2_tospawn)
- continue //let's try not to dump megas too close to each other?
+ continue //let's try not to dump megas too close to each other?
if((istype(MS2_tospawn, /obj/structure/spawner)) && get_dist(RT2, H) <= 40)
active_spawns_2.Add(MS2_tospawn)
continue //let's at least /try/ to space these out?
diff --git a/code/controllers/subsystem/minor_mapping.dm b/code/controllers/subsystem/minor_mapping.dm
index bd950e453e..d6cbf99f97 100644
--- a/code/controllers/subsystem/minor_mapping.dm
+++ b/code/controllers/subsystem/minor_mapping.dm
@@ -1,3 +1,5 @@
+#define PROB_MOUSE_SPAWN 98
+
SUBSYSTEM_DEF(minor_mapping)
name = "Minor Mapping"
init_order = INIT_ORDER_MINOR_MAPPING
@@ -5,29 +7,43 @@ SUBSYSTEM_DEF(minor_mapping)
/datum/controller/subsystem/minor_mapping/Initialize(timeofday)
trigger_migration(CONFIG_GET(number/mice_roundstart))
+ // place_satchels()
return ..()
/datum/controller/subsystem/minor_mapping/proc/trigger_migration(num_mice=10)
var/list/exposed_wires = find_exposed_wires()
- var/mob/living/simple_animal/mouse/M
+ var/mob/living/simple_animal/mouse/mouse
var/turf/proposed_turf
while((num_mice > 0) && exposed_wires.len)
proposed_turf = pick_n_take(exposed_wires)
- if(!M)
- M = new(proposed_turf)
- else
- M.forceMove(proposed_turf)
- if(M.environment_is_safe())
- num_mice -= 1
- M = null
+ if(prob(PROB_MOUSE_SPAWN))
+ if(!mouse)
+ mouse = new(proposed_turf)
+ else
+ mouse.forceMove(proposed_turf)
+ // else
+ // mouse = new /mob/living/simple_animal/hostile/regalrat/controlled(proposed_turf)
+ if(mouse.environment_is_safe())
+ num_mice -= 1
+ mouse = null
+
+// /datum/controller/subsystem/minor_mapping/proc/place_satchels(amount=10)
+// var/list/turfs = find_satchel_suitable_turfs()
+
+// while(turfs.len && amount > 0)
+// var/turf/T = pick_n_take(turfs)
+// var/obj/item/storage/backpack/satchel/flat/F = new(T)
+
+// SEND_SIGNAL(F, COMSIG_OBJ_HIDE, T.intact)
+// amount--
/proc/find_exposed_wires()
var/list/exposed_wires = list()
- exposed_wires.Cut()
+
var/list/all_turfs
- for (var/z in SSmapping.levels_by_trait(ZTRAIT_STATION))
+ for(var/z in SSmapping.levels_by_trait(ZTRAIT_STATION))
all_turfs += block(locate(1,1,z), locate(world.maxx,world.maxy,z))
for(var/turf/open/floor/plating/T in all_turfs)
if(is_blocked_turf(T))
@@ -36,3 +52,15 @@ SUBSYSTEM_DEF(minor_mapping)
exposed_wires += T
return shuffle(exposed_wires)
+
+// /proc/find_satchel_suitable_turfs()
+// var/list/suitable = list()
+
+// for(var/z in SSmapping.levels_by_trait(ZTRAIT_STATION))
+// for(var/t in block(locate(1,1,z), locate(world.maxx,world.maxy,z)))
+// if(isfloorturf(t) && !isplatingturf(t))
+// suitable += t
+
+// return shuffle(suitable)
+
+#undef PROB_MOUSE_SPAWN
diff --git a/code/controllers/subsystem/overlays.dm b/code/controllers/subsystem/overlays.dm
index b42a1e6b7e..74b60783c3 100644
--- a/code/controllers/subsystem/overlays.dm
+++ b/code/controllers/subsystem/overlays.dm
@@ -48,9 +48,16 @@ SUBSYSTEM_DEF(overlays)
for (var/thing in queue)
count++
if(thing)
- STAT_START_STOPWATCH
var/atom/A = thing
+ if(A.overlays.len >= MAX_ATOM_OVERLAYS)
+ //Break it real GOOD
+ stack_trace("Too many overlays on [A.type] - [A.overlays.len], refusing to update and cutting")
+ A.overlays.Cut()
+ continue
+ STAT_START_STOPWATCH
COMPILE_OVERLAYS(A)
+ UNSETEMPTY(A.add_overlays)
+ UNSETEMPTY(A.remove_overlays)
STAT_STOP_STOPWATCH
STAT_LOG_ENTRY(stats, A.type)
if(mc_check)
@@ -117,9 +124,8 @@ SUBSYSTEM_DEF(overlays)
#define QUEUE_FOR_COMPILE flags_1 |= OVERLAY_QUEUED_1; SSoverlays.queue += src;
/atom/proc/cut_overlays()
LAZYINITLIST(remove_overlays)
- LAZYINITLIST(add_overlays)
remove_overlays = overlays.Copy()
- add_overlays.Cut()
+ add_overlays = null
//If not already queued for work and there are overlays to remove
if(NOT_QUEUED_ALREADY && remove_overlays.len)
@@ -129,7 +135,7 @@ SUBSYSTEM_DEF(overlays)
if(!overlays)
return
overlays = build_appearance_list(overlays)
- LAZYINITLIST(add_overlays) //always initialized after this point
+ LAZYINITLIST(add_overlays)
LAZYINITLIST(remove_overlays)
var/a_len = add_overlays.len
var/r_len = remove_overlays.len
@@ -140,8 +146,9 @@ SUBSYSTEM_DEF(overlays)
var/fr_len = remove_overlays.len
//If not already queued and there is work to be done
- if(NOT_QUEUED_ALREADY && (fa_len != a_len || fr_len != r_len))
+ if(NOT_QUEUED_ALREADY && (fa_len != a_len || fr_len != r_len ))
QUEUE_FOR_COMPILE
+ UNSETEMPTY(add_overlays)
/atom/proc/add_overlay(list/overlays)
if(!overlays)
diff --git a/code/controllers/subsystem/parallax.dm b/code/controllers/subsystem/parallax.dm
index 64299fda38..7096c667e1 100644
--- a/code/controllers/subsystem/parallax.dm
+++ b/code/controllers/subsystem/parallax.dm
@@ -7,13 +7,21 @@ SUBSYSTEM_DEF(parallax)
var/list/currentrun
var/planet_x_offset = 128
var/planet_y_offset = 128
+ var/random_layer
+ var/random_parallax_color
-/datum/controller/subsystem/parallax/Initialize(timeofday)
+
+//These are cached per client so needs to be done asap so people joining at roundstart do not miss these.
+/datum/controller/subsystem/parallax/PreInit()
. = ..()
+ if(prob(70)) //70% chance to pick a special extra layer
+ random_layer = pick(/obj/screen/parallax_layer/random/space_gas, /obj/screen/parallax_layer/random/asteroids)
+ random_parallax_color = pick(COLOR_TEAL, COLOR_GREEN, COLOR_YELLOW, COLOR_CYAN, COLOR_ORANGE, COLOR_PURPLE)//Special color for random_layer1. Has to be done here so everyone sees the same color. [COLOR_SILVER]
planet_y_offset = rand(100, 160)
planet_x_offset = rand(100, 160)
-/datum/controller/subsystem/parallax/fire(resumed = 0)
+
+/datum/controller/subsystem/parallax/fire(resumed = FALSE)
if (!resumed)
src.currentrun = GLOB.clients.Copy()
@@ -21,24 +29,27 @@ SUBSYSTEM_DEF(parallax)
var/list/currentrun = src.currentrun
while(length(currentrun))
- var/client/C = currentrun[currentrun.len]
+ var/client/processing_client = currentrun[currentrun.len]
currentrun.len--
- if (!C || !C.eye)
+ if (QDELETED(processing_client) || !processing_client.eye)
if (MC_TICK_CHECK)
return
continue
- var/atom/movable/A = C.eye
- if(!istype(A))
- continue
- for (A; isloc(A.loc) && !isturf(A.loc); A = A.loc);
- if(A != C.movingmob)
- if(C.movingmob != null)
- C.movingmob.client_mobs_in_contents -= C.mob
- UNSETEMPTY(C.movingmob.client_mobs_in_contents)
- LAZYINITLIST(A.client_mobs_in_contents)
- A.client_mobs_in_contents += C.mob
- C.movingmob = A
+ var/atom/movable/movable_eye = processing_client.eye
+ if(!istype(movable_eye))
+ continue
+
+ for (movable_eye; isloc(movable_eye.loc) && !isturf(movable_eye.loc); movable_eye = movable_eye.loc);
+
+ if(movable_eye == processing_client.movingmob)
+ if (MC_TICK_CHECK)
+ return
+ continue
+ if(!isnull(processing_client.movingmob))
+ LAZYREMOVE(processing_client.movingmob.client_mobs_in_contents, processing_client.mob)
+ LAZYADD(movable_eye.client_mobs_in_contents, processing_client.mob)
+ processing_client.movingmob = movable_eye
if (MC_TICK_CHECK)
return
currentrun = null
diff --git a/code/controllers/subsystem/pathfinder.dm b/code/controllers/subsystem/pathfinder.dm
index 8e1cf946ae..ccbea79306 100644
--- a/code/controllers/subsystem/pathfinder.dm
+++ b/code/controllers/subsystem/pathfinder.dm
@@ -18,7 +18,7 @@ SUBSYSTEM_DEF(pathfinder)
var/free
var/list/flow
-/datum/flowcache/New(var/n)
+/datum/flowcache/New(n)
. = ..()
lcount = n
run = 0
diff --git a/code/controllers/subsystem/persistence/_persistence.dm b/code/controllers/subsystem/persistence/_persistence.dm
index 741d1dd72a..e8faf80e5d 100644
--- a/code/controllers/subsystem/persistence/_persistence.dm
+++ b/code/controllers/subsystem/persistence/_persistence.dm
@@ -58,6 +58,7 @@ SUBSYSTEM_DEF(persistence)
if(CONFIG_GET(flag/use_antag_rep))
LoadAntagReputation()
LoadRandomizedRecipes()
+ LoadPaintings()
/**
* Saves persistent data relevant to the server: Configurations, past gamemodes, votes, antag rep, etc
diff --git a/code/controllers/subsystem/processing/fastprocess.dm b/code/controllers/subsystem/processing/fastprocess.dm
index 9622e02146..1b30ca44c2 100644
--- a/code/controllers/subsystem/processing/fastprocess.dm
+++ b/code/controllers/subsystem/processing/fastprocess.dm
@@ -1,6 +1,4 @@
-//Fires five times every second.
-
PROCESSING_SUBSYSTEM_DEF(fastprocess)
name = "Fast Processing"
- wait = 2
+ wait = 0.2 SECONDS
stat_tag = "FP"
diff --git a/code/controllers/subsystem/processing/nanites.dm b/code/controllers/subsystem/processing/nanites.dm
index c34e7f7806..8a55491f5f 100644
--- a/code/controllers/subsystem/processing/nanites.dm
+++ b/code/controllers/subsystem/processing/nanites.dm
@@ -1,7 +1,7 @@
PROCESSING_SUBSYSTEM_DEF(nanites)
name = "Nanites"
flags = SS_BACKGROUND|SS_POST_FIRE_TIMING|SS_NO_INIT
- wait = 10
+ wait = 1 SECONDS
var/list/datum/nanite_cloud_backup/cloud_backups = list()
var/list/mob/living/nanite_monitored_mobs = list()
diff --git a/code/controllers/subsystem/processing/obj.dm b/code/controllers/subsystem/processing/obj.dm
index 26021fb267..3566e8a4dc 100644
--- a/code/controllers/subsystem/processing/obj.dm
+++ b/code/controllers/subsystem/processing/obj.dm
@@ -2,4 +2,4 @@ PROCESSING_SUBSYSTEM_DEF(obj)
name = "Objects"
priority = FIRE_PRIORITY_OBJ
flags = SS_NO_INIT
- wait = 20
+ wait = 2 SECONDS
diff --git a/code/controllers/subsystem/processing/processing.dm b/code/controllers/subsystem/processing/processing.dm
index 637b04993d..5cefd3a148 100644
--- a/code/controllers/subsystem/processing/processing.dm
+++ b/code/controllers/subsystem/processing/processing.dm
@@ -1,10 +1,10 @@
-//Used to process objects. Fires once every second.
+//Used to process objects.
SUBSYSTEM_DEF(processing)
name = "Processing"
priority = FIRE_PRIORITY_PROCESS
flags = SS_BACKGROUND|SS_POST_FIRE_TIMING|SS_NO_INIT
- wait = 10
+ wait = 1 SECONDS
var/stat_tag = "P" //Used for logging
var/list/processing = list()
@@ -14,9 +14,10 @@ SUBSYSTEM_DEF(processing)
msg = "[stat_tag]:[length(processing)]"
return ..()
-/datum/controller/subsystem/processing/fire(resumed = 0)
+/datum/controller/subsystem/processing/fire(resumed = FALSE)
if (!resumed)
currentrun = processing.Copy()
+ var/delta_time = (flags & SS_TICKER)? (wait * world.tick_lag * 0.1) : (wait * 0.1)
//cache for sanic speed (lists are references anyways)
var/list/current_run = currentrun
@@ -25,12 +26,26 @@ SUBSYSTEM_DEF(processing)
current_run.len--
if(QDELETED(thing))
processing -= thing
- else if(thing.process(wait) == PROCESS_KILL)
+ else if(thing.process(delta_time) == PROCESS_KILL)
// fully stop so that a future START_PROCESSING will work
STOP_PROCESSING(src, thing)
if (MC_TICK_CHECK)
return
-/datum/proc/process()
- set waitfor = 0
+
+/**
+ * This proc is called on a datum on every "cycle" if it is being processed by a subsystem. The time between each cycle is determined by the subsystem's "wait" setting.
+ * You can start and stop processing a datum using the START_PROCESSING and STOP_PROCESSING defines.
+ *
+ * Since the wait setting of a subsystem can be changed at any time, it is important that any rate-of-change that you implement in this proc is multiplied by the delta_time that is sent as a parameter,
+ * Additionally, any "prob" you use in this proc should instead use the DT_PROB define to make sure that the final probability per second stays the same even if the subsystem's wait is altered.
+ * Examples where this must be considered:
+ * - Implementing a cooldown timer, use `mytimer -= delta_time`, not `mytimer -= 1`. This way, `mytimer` will always have the unit of seconds
+ * - Damaging a mob, do `L.adjustFireLoss(20 * delta_time)`, not `L.adjustFireLoss(20)`. This way, the damage per second stays constant even if the wait of the subsystem is changed
+ * - Probability of something happening, do `if(DT_PROB(25, delta_time))`, not `if(prob(25))`. This way, if the subsystem wait is e.g. lowered, there won't be a higher chance of this event happening per second
+ *
+ * If you override this do not call parent, as it will return PROCESS_KILL. This is done to prevent objects that dont override process() from staying in the processing list
+ */
+/datum/proc/process(delta_time)
+ set waitfor = FALSE
return PROCESS_KILL
diff --git a/code/controllers/subsystem/processing/quirks.dm b/code/controllers/subsystem/processing/quirks.dm
index c57bac5526..74cd53b0ae 100644
--- a/code/controllers/subsystem/processing/quirks.dm
+++ b/code/controllers/subsystem/processing/quirks.dm
@@ -5,8 +5,8 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
name = "Quirks"
init_order = INIT_ORDER_QUIRKS
flags = SS_BACKGROUND
- wait = 10
runlevels = RUNLEVEL_GAME
+ wait = 1 SECONDS
var/list/quirks = list() //Assoc. list of all roundstart quirk datum types; "name" = /path/
var/list/quirk_names_by_path = list()
diff --git a/code/controllers/subsystem/profiler.dm b/code/controllers/subsystem/profiler.dm
index 81fa77dc6c..7533e9663f 100644
--- a/code/controllers/subsystem/profiler.dm
+++ b/code/controllers/subsystem/profiler.dm
@@ -18,7 +18,7 @@ SUBSYSTEM_DEF(profiler)
if(CONFIG_GET(flag/auto_profile))
StartProfiling()
else
- StopProfiling() //Stop the early start from world/New
+ StopProfiling() //Stop the early start profiler
return ..()
/datum/controller/subsystem/profiler/fire()
@@ -31,12 +31,23 @@ SUBSYSTEM_DEF(profiler)
return ..()
/datum/controller/subsystem/profiler/proc/StartProfiling()
+#if DM_BUILD < 1506
+ stack_trace("Auto profiling unsupported on this byond version")
+ CONFIG_SET(flag/auto_profile, FALSE)
+#else
world.Profile(PROFILE_START)
+#endif
/datum/controller/subsystem/profiler/proc/StopProfiling()
+#if DM_BUILD >= 1506
world.Profile(PROFILE_STOP)
+#endif
/datum/controller/subsystem/profiler/proc/DumpFile()
+#if DM_BUILD < 1506
+ stack_trace("Auto profiling unsupported on this byond version")
+ CONFIG_SET(flag/auto_profile, FALSE)
+#else
var/timer = TICK_USAGE_REAL
var/current_profile_data = world.Profile(PROFILE_REFRESH,format="json")
fetch_cost = MC_AVERAGE(fetch_cost, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
@@ -49,3 +60,4 @@ SUBSYSTEM_DEF(profiler)
timer = TICK_USAGE_REAL
WRITE_FILE(json_file, current_profile_data)
write_cost = MC_AVERAGE(write_cost, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
+#endif
diff --git a/code/controllers/subsystem/radiation.dm b/code/controllers/subsystem/radiation.dm
index f29fe72e80..2d764d84dd 100644
--- a/code/controllers/subsystem/radiation.dm
+++ b/code/controllers/subsystem/radiation.dm
@@ -1,6 +1,7 @@
PROCESSING_SUBSYSTEM_DEF(radiation)
name = "Radiation"
flags = SS_NO_INIT | SS_BACKGROUND
+ wait = 1 SECONDS
var/list/warned_atoms = list()
@@ -13,5 +14,5 @@ PROCESSING_SUBSYSTEM_DEF(radiation)
warned_atoms[ref] = TRUE
var/atom/master = contamination.parent
SSblackbox.record_feedback("tally", "contaminated", 1, master.type)
- var/msg = "has become contamintaed with enough radiation to contaminate other objects. || Source: [contamination.source] || Strength: [contamination.strength]"
+ var/msg = "has become contaminated with enough radiation to contaminate other objects. || Source: [contamination.source] || Strength: [contamination.strength]"
master.investigate_log(msg, INVESTIGATE_RADIATION)
diff --git a/code/controllers/subsystem/runechat.dm b/code/controllers/subsystem/runechat.dm
index ec296e7d32..9bd665e5ee 100644
--- a/code/controllers/subsystem/runechat.dm
+++ b/code/controllers/subsystem/runechat.dm
@@ -6,15 +6,15 @@
#define BUCKET_LIMIT (world.time + TICKS2DS(min(BUCKET_LEN - (SSrunechat.practical_offset - DS2TICKS(world.time - SSrunechat.head_offset)) - 1, BUCKET_LEN - 1)))
/**
- * # Runechat Subsystem
- *
- * Maintains a timer-like system to handle destruction of runechat messages. Much of this code is modeled
- * after or adapted from the timer subsystem.
- *
- * Note that this has the same structure for storing and queueing messages as the timer subsystem does
- * for handling timers: the bucket_list is a list of chatmessage datums, each of which are the head
- * of a circularly linked list. Any given index in bucket_list could be null, representing an empty bucket.
- */
+ * # Runechat Subsystem
+ *
+ * Maintains a timer-like system to handle destruction of runechat messages. Much of this code is modeled
+ * after or adapted from the timer subsystem.
+ *
+ * Note that this has the same structure for storing and queueing messages as the timer subsystem does
+ * for handling timers: the bucket_list is a list of chatmessage datums, each of which are the head
+ * of a circularly linked list. Any given index in bucket_list could be null, representing an empty bucket.
+ */
SUBSYSTEM_DEF(runechat)
name = "Runechat"
flags = SS_TICKER | SS_NO_INIT
@@ -131,14 +131,14 @@ SUBSYSTEM_DEF(runechat)
bucket_resolution = world.tick_lag
/**
- * Enters the runechat subsystem with this chatmessage, inserting it into the end-of-life queue
- *
- * This will also account for a chatmessage already being registered, and in which case
- * the position will be updated to remove it from the previous location if necessary
- *
- * Arguments:
- * * new_sched_destruction Optional, when provided is used to update an existing message with the new specified time
- */
+ * Enters the runechat subsystem with this chatmessage, inserting it into the end-of-life queue
+ *
+ * This will also account for a chatmessage already being registered, and in which case
+ * the position will be updated to remove it from the previous location if necessary
+ *
+ * Arguments:
+ * * new_sched_destruction Optional, when provided is used to update an existing message with the new specified time
+ */
/datum/chatmessage/proc/enter_subsystem(new_sched_destruction = 0)
// Get local references from subsystem as they are faster to access than the datum references
var/list/bucket_list = SSrunechat.bucket_list
@@ -169,7 +169,7 @@ SUBSYSTEM_DEF(runechat)
// Handle insertion into the secondary queue if the required time is outside our tracked amounts
if (scheduled_destruction >= BUCKET_LIMIT)
- BINARY_INSERT(src, SSrunechat.second_queue, datum/chatmessage, src, scheduled_destruction, COMPARE_KEY)
+ BINARY_INSERT(src, SSrunechat.second_queue, /datum/chatmessage, src, scheduled_destruction, COMPARE_KEY)
return
// Get bucket position and a local reference to the datum var, it's faster to access this way
@@ -194,8 +194,8 @@ SUBSYSTEM_DEF(runechat)
/**
- * Removes this chatmessage datum from the runechat subsystem
- */
+ * Removes this chatmessage datum from the runechat subsystem
+ */
/datum/chatmessage/proc/leave_subsystem()
// Attempt to find the bucket that contains this chat message
var/bucket_pos = BUCKET_POS(scheduled_destruction)
diff --git a/code/controllers/subsystem/server_maint.dm b/code/controllers/subsystem/server_maint.dm
index 2427fbd277..7eb81003f1 100644
--- a/code/controllers/subsystem/server_maint.dm
+++ b/code/controllers/subsystem/server_maint.dm
@@ -56,12 +56,13 @@ SUBSYSTEM_DEF(server_maint)
for(var/I in currentrun)
var/client/C = I
//handle kicking inactive players
- if(round_started && kick_inactive && C.is_afk(afk_period))
+ if(round_started && kick_inactive && !C.holder && C.is_afk(afk_period))
var/cmob = C.mob
- if(!(isobserver(cmob) || (isdead(cmob) && C.holder)))
+ if (!isnewplayer(cmob) || !SSticker.queued_players.Find(cmob))
log_access("AFK: [key_name(C)]")
- to_chat(C, "You have been inactive for more than [DisplayTimeText(afk_period)] and have been disconnected. ")
- qdel(C)
+ to_chat(C, "You have been inactive for more than [DisplayTimeText(afk_period)] and have been disconnected. You may reconnect via the button in the file menu or by clicking here to reconnect . ")
+ QDEL_IN(C, 1) //to ensure they get our message before getting disconnected
+ continue
if (!(!C || world.time - C.connection_time < PING_BUFFER_TIME || C.inactivity >= (wait-1)))
winset(C, null, "command=.update_ping+[world.time+world.tick_lag*TICK_USAGE_REAL/100]")
@@ -83,4 +84,15 @@ SUBSYSTEM_DEF(server_maint)
if(tgsversion)
SSblackbox.record_feedback("text", "server_tools", 1, tgsversion.raw_parameter)
+
+/datum/controller/subsystem/server_maint/proc/UpdateHubStatus()
+ // if(!CONFIG_GET(flag/hub) || !CONFIG_GET(number/max_hub_pop))
+ // return FALSE //no point, hub / auto hub controls are disabled
+
+ // var/max_pop = CONFIG_GET(number/max_hub_pop)
+
+ // if(GLOB.clients.len > max_pop)
+ // world.update_hub_visibility(FALSE)
+ // else
+ // world.update_hub_visibility(TRUE)
#undef PING_BUFFER_TIME
diff --git a/code/controllers/subsystem/sounds.dm b/code/controllers/subsystem/sounds.dm
index 5e7c5e6545..fa9ba3c472 100644
--- a/code/controllers/subsystem/sounds.dm
+++ b/code/controllers/subsystem/sounds.dm
@@ -5,34 +5,48 @@ SUBSYSTEM_DEF(sounds)
flags = SS_NO_FIRE
init_order = INIT_ORDER_SOUNDS
var/static/using_channels_max = CHANNEL_HIGHEST_AVAILABLE //BYOND max channels
+ /// Amount of channels to reserve for random usage rather than reservations being allowed to reserve all channels. Also a nice safeguard for when someone screws up.
+ var/static/random_channels_min = 50
// Hey uh these two needs to be initialized fast because the whole "things get deleted before init" thing.
- /// Assoc list, "[channel]" = either the datum using it or TRUE for an unsafe-reserved (datumless reservation) channel
- var/list/using_channels = list()
+ /// Assoc list, `"[channel]" =` either the datum using it or TRUE for an unsafe-reserved (datumless reservation) channel
+ var/list/using_channels
/// Assoc list datum = list(channel1, channel2, ...) for what channels something reserved.
- var/list/using_channels_by_datum = list()
- /// List of all available channels with associations set to TRUE for fast lookups/allocation.
- var/list/available_channels
+ var/list/using_channels_by_datum
+ // Special datastructure for fast channel management
+ /// List of all channels as numbers
+ var/list/channel_list
+ /// Associative list of all reserved channels associated to their position. `"[channel_number]" =` index as number
+ var/list/reserved_channels
+ /// lower iteration position - Incremented and looped to get "random" sound channels for normal sounds. The channel at this index is returned when asking for a random channel.
+ var/channel_random_low
+ /// higher reserve position - decremented and incremented to reserve sound channels, anything above this is reserved. The channel at this index is the highest unreserved channel.
+ var/channel_reserve_high
/datum/controller/subsystem/sounds/Initialize()
setup_available_channels()
return ..()
/datum/controller/subsystem/sounds/proc/setup_available_channels()
- available_channels = list()
+ channel_list = list()
+ reserved_channels = list()
+ using_channels = list()
+ using_channels_by_datum = list()
for(var/i in 1 to using_channels_max)
- available_channels[num2text(i)] = TRUE
+ channel_list += i
+ channel_random_low = 1
+ channel_reserve_high = length(channel_list)
/// Removes a channel from using list.
/datum/controller/subsystem/sounds/proc/free_sound_channel(channel)
- channel = num2text(channel)
- var/using = using_channels[channel]
- using_channels -= channel
- if(using)
+ var/text_channel = num2text(channel)
+ var/using = using_channels[text_channel]
+ using_channels -= text_channel
+ if(using != TRUE) // datum channel
using_channels_by_datum[using] -= channel
if(!length(using_channels_by_datum[using]))
using_channels_by_datum -= using
- available_channels[channel] = TRUE
+ free_channel(channel)
/// Frees all the channels a datum is using.
/datum/controller/subsystem/sounds/proc/free_datum_channels(datum/D)
@@ -40,8 +54,8 @@ SUBSYSTEM_DEF(sounds)
if(!L)
return
for(var/channel in L)
- using_channels -= channel
- available_channels[channel] = TRUE
+ using_channels -= num2text(channel)
+ free_channel(channel)
using_channels_by_datum -= D
/// Frees all datumless channels
@@ -50,42 +64,72 @@ SUBSYSTEM_DEF(sounds)
/// NO AUTOMATIC CLEANUP - If you use this, you better manually free it later! Returns an integer for channel.
/datum/controller/subsystem/sounds/proc/reserve_sound_channel_datumless()
- var/channel = random_available_channel_text()
- if(!channel) //oh no..
+ . = reserve_channel()
+ if(!.) //oh no..
return FALSE
- available_channels -= channel
- using_channels[channel] = DATUMLESS
+ var/text_channel = num2text(.)
+ using_channels[text_channel] = DATUMLESS
LAZYINITLIST(using_channels_by_datum[DATUMLESS])
- using_channels_by_datum[DATUMLESS] += channel
- return text2num(channel)
+ using_channels_by_datum[DATUMLESS] += .
/// Reserves a channel for a datum. Automatic cleanup only when the datum is deleted. Returns an integer for channel.
/datum/controller/subsystem/sounds/proc/reserve_sound_channel(datum/D)
if(!D) //i don't like typechecks but someone will fuck it up
CRASH("Attempted to reserve sound channel without datum using the managed proc.")
- var/channel = random_available_channel_text()
- if(!channel)
+ .= reserve_channel()
+ if(!.)
return FALSE
- available_channels -= channel
- using_channels[channel] = D
+ var/text_channel = num2text(.)
+ using_channels[text_channel] = D
LAZYINITLIST(using_channels_by_datum[D])
- using_channels_by_datum[D] += channel
- return text2num(channel)
+ using_channels_by_datum[D] += .
+
+/**
+ * Reserves a channel and updates the datastructure. Private proc.
+ */
+/datum/controller/subsystem/sounds/proc/reserve_channel()
+ PRIVATE_PROC(TRUE)
+ if(channel_reserve_high <= random_channels_min) // out of channels
+ return
+ var/channel = channel_list[channel_reserve_high]
+ reserved_channels[num2text(channel)] = channel_reserve_high--
+ return channel
+
+/**
+ * Frees a channel and updates the datastructure. Private proc.
+ */
+/datum/controller/subsystem/sounds/proc/free_channel(number)
+ PRIVATE_PROC(TRUE)
+ var/text_channel = num2text(number)
+ var/index = reserved_channels[text_channel]
+ if(!index)
+ CRASH("Attempted to (internally) free a channel that wasn't reserved.")
+ reserved_channels -= text_channel
+ // push reserve index up, which makes it now on a channel that is reserved
+ channel_reserve_high++
+ // swap the reserved channel wtih the unreserved channel so the reserve index is now on an unoccupied channel and the freed channel is next to be used.
+ channel_list.Swap(channel_reserve_high, index)
+ // now, an existing reserved channel will likely (exception: unreserving last reserved channel) be at index
+ // get it, and update position.
+ var/text_reserved = num2text(channel_list[index])
+ if(!reserved_channels[text_reserved]) //if it isn't already reserved make sure we don't accidently mistakenly put it on reserved list!
+ return
+ reserved_channels[text_reserved] = index
/// Random available channel, returns text.
/datum/controller/subsystem/sounds/proc/random_available_channel_text()
- return pick(available_channels)
+ if(channel_random_low > channel_reserve_high)
+ channel_random_low = 1
+ . = "[channel_list[channel_random_low++]]"
/// Random available channel, returns number
/datum/controller/subsystem/sounds/proc/random_available_channel()
- return text2num(pick(available_channels))
-
-/// If a channel is available
-/datum/controller/subsystem/sounds/proc/is_channel_available(channel)
- return available_channels[num2text(channel)]
+ if(channel_random_low > channel_reserve_high)
+ channel_random_low = 1
+ . = channel_list[channel_random_low++]
/// How many channels we have left.
/datum/controller/subsystem/sounds/proc/available_channels_left()
- return length(available_channels)
+ return length(channel_list) - random_channels_min
#undef DATUMLESS
diff --git a/code/controllers/subsystem/spacedrift.dm b/code/controllers/subsystem/spacedrift.dm
index c3261df304..e84a70a45f 100644
--- a/code/controllers/subsystem/spacedrift.dm
+++ b/code/controllers/subsystem/spacedrift.dm
@@ -13,7 +13,7 @@ SUBSYSTEM_DEF(spacedrift)
return ..()
-/datum/controller/subsystem/spacedrift/fire(resumed = 0)
+/datum/controller/subsystem/spacedrift/fire(resumed = FALSE)
if (!resumed)
src.currentrun = processing.Copy()
@@ -47,6 +47,7 @@ SUBSYSTEM_DEF(spacedrift)
var/old_dir = AM.dir
var/old_loc = AM.loc
AM.inertia_moving = TRUE
+ AM.set_glide_size(DELAY_TO_GLIDE_SIZE(AM.inertia_move_delay), FALSE)
step(AM, AM.inertia_dir)
AM.inertia_moving = FALSE
AM.inertia_next_move = world.time + AM.inertia_move_delay
diff --git a/code/controllers/subsystem/statpanel.dm b/code/controllers/subsystem/statpanel.dm
index 13e9ff50a2..d0d5579611 100644
--- a/code/controllers/subsystem/statpanel.dm
+++ b/code/controllers/subsystem/statpanel.dm
@@ -203,3 +203,4 @@ SUBSYSTEM_DEF(statpanels)
set hidden = TRUE
statbrowser_ready = TRUE
+ init_verbs()
diff --git a/code/controllers/subsystem/stickyban.dm b/code/controllers/subsystem/stickyban.dm
index 189efa99fe..0c71777bc0 100644
--- a/code/controllers/subsystem/stickyban.dm
+++ b/code/controllers/subsystem/stickyban.dm
@@ -1,34 +1,231 @@
SUBSYSTEM_DEF(stickyban)
- name = "Sticky Ban"
+ name = "PRISM"
init_order = INIT_ORDER_STICKY_BAN
flags = SS_NO_FIRE
var/list/cache = list()
+ var/list/dbcache = list()
+ var/list/confirmed_exempt = list()
+ var/dbcacheexpire = 0
+
/datum/controller/subsystem/stickyban/Initialize(timeofday)
- var/list/bannedkeys = world.GetConfig("ban")
+ if (length(GLOB.stickybanadminexemptions))
+ restore_stickybans()
+ var/list/bannedkeys = sticky_banned_ckeys()
//sanitize the sticky ban list
+
+ //delete db bans that no longer exist in the database and add new legacy bans to the database
+ if (SSdbcore.Connect() || length(SSstickyban.dbcache))
+ if (length(GLOB.stickybanadminexemptions))
+ restore_stickybans()
+ for (var/oldban in (world.GetConfig("ban") - bannedkeys))
+ var/ckey = ckey(oldban)
+ if (ckey != oldban && (ckey in bannedkeys))
+ continue
+
+ var/list/ban = params2list(world.GetConfig("ban", oldban))
+ if (ban && !ban["fromdb"])
+ if (!import_raw_stickyban_to_db(ckey, ban))
+ log_world("Could not import stickyban on [oldban] into the database. Ignoring")
+ continue
+ dbcacheexpire = 0
+ bannedkeys += ckey
+ world.SetConfig("ban", oldban, null)
+
+ if (length(GLOB.stickybanadminexemptions)) //the previous loop can sleep
+ restore_stickybans()
+
for (var/bannedkey in bannedkeys)
var/ckey = ckey(bannedkey)
- var/list/ban = stickyban2list(world.GetConfig("ban", bannedkey))
+ var/list/ban = get_stickyban_from_ckey(bannedkey)
- //byond stores sticky bans by key, that can end up confusing things
- //i also remove it here so that if any stickybans cause a runtime, they just stop existing
- world.SetConfig("ban", bannedkey, null)
+ //byond stores sticky bans by key, that's lame
+ if (ckey != bannedkey)
+ world.SetConfig("ban", bannedkey, null)
if (!ban["ckey"])
ban["ckey"] = ckey
- //storing these can break things and isn't needed for sticky ban tracking
- ban -= "IP"
- ban -= "computer_id"
-
ban["matches_this_round"] = list()
ban["existing_user_matches_this_round"] = list()
ban["admin_matches_this_round"] = list()
+ ban["pending_matches_this_round"] = list()
+
cache[ckey] = ban
-
- for (var/bannedckey in cache)
- world.SetConfig("ban", bannedckey, list2stickyban(cache[bannedckey]))
+ world.SetConfig("ban", ckey, list2stickyban(ban))
return ..()
+
+/datum/controller/subsystem/stickyban/proc/Populatedbcache()
+ var/newdbcache = list() //so if we runtime or the db connection dies we don't kill the existing cache
+
+ // var/datum/db_query/query_stickybans = SSdbcore.NewQuery("SELECT ckey, reason, banning_admin, datetime FROM [format_table_name("stickyban")] ORDER BY ckey")
+ // var/datum/db_query/query_ckey_matches = SSdbcore.NewQuery("SELECT stickyban, matched_ckey, first_matched, last_matched, exempt FROM [format_table_name("stickyban_matched_ckey")] ORDER BY first_matched")
+ // var/datum/db_query/query_cid_matches = SSdbcore.NewQuery("SELECT stickyban, matched_cid, first_matched, last_matched FROM [format_table_name("stickyban_matched_cid")] ORDER BY first_matched")
+ // var/datum/db_query/query_ip_matches = SSdbcore.NewQuery("SELECT stickyban, INET_NTOA(matched_ip), first_matched, last_matched FROM [format_table_name("stickyban_matched_ip")] ORDER BY first_matched")
+
+ var/datum/DBQuery/query_stickybans = SSdbcore.NewQuery("SELECT ckey, reason, banning_admin, datetime FROM [format_table_name("stickyban")] ORDER BY ckey")
+ var/datum/DBQuery/query_ckey_matches = SSdbcore.NewQuery("SELECT stickyban, matched_ckey, first_matched, last_matched, exempt FROM [format_table_name("stickyban_matched_ckey")] ORDER BY first_matched")
+ var/datum/DBQuery/query_cid_matches = SSdbcore.NewQuery("SELECT stickyban, matched_cid, first_matched, last_matched FROM [format_table_name("stickyban_matched_cid")] ORDER BY first_matched")
+ var/datum/DBQuery/query_ip_matches = SSdbcore.NewQuery("SELECT stickyban, INET_NTOA(matched_ip), first_matched, last_matched FROM [format_table_name("stickyban_matched_ip")] ORDER BY first_matched")
+
+ SSdbcore.QuerySelect(list(query_stickybans, query_ckey_matches, query_cid_matches, query_ip_matches))
+
+ if (query_stickybans.last_error)
+ qdel(query_stickybans)
+ qdel(query_ckey_matches)
+ qdel(query_cid_matches)
+ qdel(query_ip_matches)
+ return
+
+ while (query_stickybans.NextRow())
+ var/list/ban = list()
+
+ ban["ckey"] = query_stickybans.item[1]
+ ban["message"] = query_stickybans.item[2]
+ ban["reason"] = "(InGameBan)([query_stickybans.item[3]])"
+ ban["admin"] = query_stickybans.item[3]
+ ban["datetime"] = query_stickybans.item[4]
+ ban["type"] = list("sticky")
+
+ newdbcache["[query_stickybans.item[1]]"] = ban
+
+
+ if (!query_ckey_matches.last_error)
+ while (query_ckey_matches.NextRow())
+ var/list/match = list()
+
+ match["stickyban"] = query_ckey_matches.item[1]
+ match["matched_ckey"] = query_ckey_matches.item[2]
+ match["first_matched"] = query_ckey_matches.item[3]
+ match["last_matched"] = query_ckey_matches.item[4]
+ match["exempt"] = text2num(query_ckey_matches.item[5])
+
+ var/ban = newdbcache[query_ckey_matches.item[1]]
+ if (!ban)
+ continue
+ var/keys = ban[text2num(query_ckey_matches.item[5]) ? "whitelist" : "keys"]
+ if (!keys)
+ keys = ban[text2num(query_ckey_matches.item[5]) ? "whitelist" : "keys"] = list()
+ keys[query_ckey_matches.item[2]] = match
+
+ if (!query_cid_matches.last_error)
+ while (query_cid_matches.NextRow())
+ var/list/match = list()
+
+ match["stickyban"] = query_cid_matches.item[1]
+ match["matched_cid"] = query_cid_matches.item[2]
+ match["first_matched"] = query_cid_matches.item[3]
+ match["last_matched"] = query_cid_matches.item[4]
+
+ var/ban = newdbcache[query_cid_matches.item[1]]
+ if (!ban)
+ continue
+ var/computer_ids = ban["computer_id"]
+ if (!computer_ids)
+ computer_ids = ban["computer_id"] = list()
+ computer_ids[query_cid_matches.item[2]] = match
+
+
+ if (!query_ip_matches.last_error)
+ while (query_ip_matches.NextRow())
+ var/list/match = list()
+
+ match["stickyban"] = query_ip_matches.item[1]
+ match["matched_ip"] = query_ip_matches.item[2]
+ match["first_matched"] = query_ip_matches.item[3]
+ match["last_matched"] = query_ip_matches.item[4]
+
+ var/ban = newdbcache[query_ip_matches.item[1]]
+ if (!ban)
+ continue
+ var/IPs = ban["IP"]
+ if (!IPs)
+ IPs = ban["IP"] = list()
+ IPs[query_ip_matches.item[2]] = match
+
+ dbcache = newdbcache
+ dbcacheexpire = world.time+STICKYBAN_DB_CACHE_TIME
+
+ qdel(query_stickybans)
+ qdel(query_ckey_matches)
+ qdel(query_cid_matches)
+ qdel(query_ip_matches)
+
+
+/datum/controller/subsystem/stickyban/proc/import_raw_stickyban_to_db(ckey, list/ban)
+ . = FALSE
+ if (!ban["admin"])
+ ban["admin"] = "LEGACY"
+ if (!ban["message"])
+ ban["message"] = "Evasion"
+
+ // TODO: USE NEW DB IMPLEMENTATION
+ var/datum/DBQuery/query_create_stickyban = SSdbcore.NewQuery(
+ "INSERT IGNORE INTO [format_table_name("stickyban")] (ckey, reason, banning_admin) VALUES ([ckey], [ban["message"]], ban["admin"]))"
+ )
+
+ if (query_create_stickyban.warn_execute())
+ qdel(query_create_stickyban)
+ return
+ qdel(query_create_stickyban)
+
+ // var/datum/db_query/query_create_stickyban = SSdbcore.NewQuery(
+ // "INSERT IGNORE INTO [format_table_name("stickyban")] (ckey, reason, banning_admin) VALUES (:ckey, :message, :admin)",
+ // list("ckey" = ckey, "message" = ban["message"], "admin" = ban["admin"])
+ // )
+ // if (!query_create_stickyban.warn_execute())
+ // qdel(query_create_stickyban)
+ // return
+ // qdel(query_create_stickyban)
+
+ var/list/sqlckeys = list()
+ var/list/sqlcids = list()
+ var/list/sqlips = list()
+
+ if (ban["keys"])
+ var/list/keys = splittext(ban["keys"], ",")
+ for (var/key in keys)
+ var/list/sqlckey = list()
+ sqlckey["stickyban"] = ckey
+ sqlckey["matched_ckey"] = ckey(key)
+ sqlckey["exempt"] = FALSE
+ sqlckeys[++sqlckeys.len] = sqlckey
+
+ if (ban["whitelist"])
+ var/list/keys = splittext(ban["whitelist"], ",")
+ for (var/key in keys)
+ var/list/sqlckey = list()
+ sqlckey["stickyban"] = ckey
+ sqlckey["matched_ckey"] = ckey(key)
+ sqlckey["exempt"] = TRUE
+ sqlckeys[++sqlckeys.len] = sqlckey
+
+ if (ban["computer_id"])
+ var/list/cids = splittext(ban["computer_id"], ",")
+ for (var/cid in cids)
+ var/list/sqlcid = list()
+ sqlcid["stickyban"] = ckey
+ sqlcid["matched_cid"] = cid
+ sqlcids[++sqlcids.len] = sqlcid
+
+ if (ban["IP"])
+ var/list/ips = splittext(ban["IP"], ",")
+ for (var/ip in ips)
+ var/list/sqlip = list()
+ sqlip["stickyban"] = ckey
+ sqlip["matched_ip"] = ip
+ sqlips[++sqlips.len] = sqlip
+
+ if (length(sqlckeys))
+ SSdbcore.MassInsert(format_table_name("stickyban_matched_ckey"), sqlckeys, ignore_errors = TRUE)
+
+ if (length(sqlcids))
+ SSdbcore.MassInsert(format_table_name("stickyban_matched_cid"), sqlcids, ignore_errors = TRUE)
+
+ if (length(sqlips))
+ SSdbcore.MassInsert(format_table_name("stickyban_matched_ip"), sqlips, ignore_errors = TRUE)
+
+
+ return TRUE
diff --git a/code/controllers/subsystem/throwing.dm b/code/controllers/subsystem/throwing.dm
index 9814f3e46e..0fa8035d72 100644
--- a/code/controllers/subsystem/throwing.dm
+++ b/code/controllers/subsystem/throwing.dm
@@ -57,6 +57,7 @@ SUBSYSTEM_DEF(throwing)
var/dx
var/dy
var/force = MOVE_FORCE_DEFAULT
+ var/gentle = FALSE
var/pure_diagonal
var/diagonal_error
var/datum/callback/callback
@@ -64,6 +65,24 @@ SUBSYSTEM_DEF(throwing)
var/delayed_time = 0
var/last_move = 0
+
+/datum/thrownthing/New(thrownthing, target, target_turf, init_dir, maxrange, speed, thrower, diagonals_first, force, gentle, callback, target_zone)
+ . = ..()
+ src.thrownthing = thrownthing
+ RegisterSignal(thrownthing, COMSIG_PARENT_QDELETING, .proc/on_thrownthing_qdel)
+ src.target = target
+ src.target_turf = target_turf
+ src.init_dir = init_dir
+ src.maxrange = maxrange
+ src.speed = speed
+ src.thrower = thrower
+ src.diagonals_first = diagonals_first
+ src.force = force
+ src.gentle = gentle
+ src.callback = callback
+ src.target_zone = target_zone
+
+
/datum/thrownthing/Destroy()
if(HAS_TRAIT_FROM(thrownthing, TRAIT_SPOOKY_THROW, "revenant"))
REMOVE_TRAIT(thrownthing, TRAIT_SPOOKY_THROW, "revenant")
@@ -72,9 +91,18 @@ SUBSYSTEM_DEF(throwing)
thrownthing = null
target = null
thrower = null
- callback = null
+ if(callback)
+ QDEL_NULL(callback) //It stores a reference to the thrownthing, its source. Let's clean that.
return ..()
+
+///Defines the datum behavior on the thrownthing's qdeletion event.
+/datum/thrownthing/proc/on_thrownthing_qdel(atom/movable/source, force)
+ SIGNAL_HANDLER
+
+ qdel(src)
+
+
/datum/thrownthing/proc/tick()
var/atom/movable/AM = thrownthing
if (!isturf(AM.loc) || !AM.throwing)
@@ -114,7 +142,7 @@ SUBSYSTEM_DEF(throwing)
finalize()
return
- AM.Move(step, get_dir(AM, step))
+ AM.Move(step, get_dir(AM, step), DELAY_TO_GLIDE_SIZE(1 / speed))
if (!AM.throwing) // we hit something during our move
finalize(hit = TRUE)
@@ -138,15 +166,21 @@ SUBSYSTEM_DEF(throwing)
if (A == target)
hit = TRUE
thrownthing.throw_impact(A, src)
+ if(QDELETED(thrownthing)) //throw_impact can delete things, such as glasses smashing
+ return //deletion should already be handled by on_thrownthing_qdel()
break
if (!hit)
thrownthing.throw_impact(get_turf(thrownthing), src) // we haven't hit something yet and we still must, let's hit the ground.
+ if(QDELETED(thrownthing)) //throw_impact can delete things, such as glasses smashing
+ return //deletion should already be handled by on_thrownthing_qdel()
thrownthing.newtonian_move(init_dir)
else
thrownthing.newtonian_move(init_dir)
if(target)
thrownthing.throw_impact(target, src)
+ if(QDELETED(thrownthing)) //throw_impact can delete things, such as glasses smashing
+ return //deletion should already be handled by on_thrownthing_qdel()
if (callback)
callback.Invoke()
diff --git a/code/controllers/subsystem/time_track.dm b/code/controllers/subsystem/time_track.dm
index 2f4949fc1e..8a0a351d48 100644
--- a/code/controllers/subsystem/time_track.dm
+++ b/code/controllers/subsystem/time_track.dm
@@ -1,7 +1,8 @@
SUBSYSTEM_DEF(time_track)
name = "Time Tracking"
- wait = 1 SECONDS
- flags = SS_NO_INIT|SS_NO_TICK_CHECK
+ wait = 10
+ flags = SS_NO_TICK_CHECK
+ init_order = INIT_ORDER_TIMETRACK
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
var/time_dilation_current = 0
@@ -16,33 +17,81 @@ SUBSYSTEM_DEF(time_track)
var/last_tick_byond_time = 0
var/last_tick_tickcount = 0
- var/last_measurement = 0
- var/measurement_delay = 60
-
- var/stat_time_text
- var/time_dilation_text
+/datum/controller/subsystem/time_track/Initialize(start_timeofday)
+ . = ..()
+ GLOB.perf_log = "[GLOB.log_directory]/perf-[GLOB.round_id ? GLOB.round_id : "NULL"]-[SSmapping.config?.map_name].csv"
+ log_perf(
+ list(
+ "time",
+ "players",
+ "tidi",
+ "tidi_fastavg",
+ "tidi_avg",
+ "tidi_slowavg",
+ "maptick",
+ "num_timers",
+ "air_turf_cost",
+ "air_eg_cost",
+ "air_highpressure_cost",
+ "air_hotspots_cost",
+ "air_superconductivity_cost",
+ "air_pipenets_cost",
+ "air_rebuilds_cost",
+ "air_turf_count",
+ "air_eg_count",
+ "air_hotspot_count",
+ "air_network_count",
+ "air_delta_count",
+ "air_superconductive_count"
+ )
+ )
/datum/controller/subsystem/time_track/fire()
- stat_time_text = "Server Time: [time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss")]\n\nRound Time: [DisplayTimeText(world.time - SSticker.round_start_time, 1)] \n\nStation Time: [STATION_TIME_TIMESTAMP("hh:mm:ss", world.time)]\n\n[time_dilation_text]"
- if(++last_measurement == measurement_delay)
- last_measurement = 0
- var/current_realtime = REALTIMEOFDAY
- var/current_byondtime = world.time
- var/current_tickcount = world.time/world.tick_lag
+ var/current_realtime = REALTIMEOFDAY
+ var/current_byondtime = world.time
+ var/current_tickcount = world.time/world.tick_lag
+ GLOB.glide_size_multiplier = (current_byondtime - last_tick_byond_time) / (current_realtime - last_tick_realtime)
- if (!first_run)
- var/tick_drift = max(0, (((current_realtime - last_tick_realtime) - (current_byondtime - last_tick_byond_time)) / world.tick_lag))
+ if(times_fired % 10) // everything else is once every 10 seconds
+ return
- time_dilation_current = tick_drift / (current_tickcount - last_tick_tickcount) * 100
+ if (!first_run)
+ var/tick_drift = max(0, (((current_realtime - last_tick_realtime) - (current_byondtime - last_tick_byond_time)) / world.tick_lag))
- time_dilation_avg_fast = MC_AVERAGE_FAST(time_dilation_avg_fast, time_dilation_current)
- time_dilation_avg = MC_AVERAGE(time_dilation_avg, time_dilation_avg_fast)
- time_dilation_avg_slow = MC_AVERAGE_SLOW(time_dilation_avg_slow, time_dilation_avg)
- else
- first_run = FALSE
- last_tick_realtime = current_realtime
- last_tick_byond_time = current_byondtime
- last_tick_tickcount = current_tickcount
- SSblackbox.record_feedback("associative", "time_dilation_current", 1, list("[SQLtime()]" = list("current" = "[time_dilation_current]", "avg_fast" = "[time_dilation_avg_fast]", "avg" = "[time_dilation_avg]", "avg_slow" = "[time_dilation_avg_slow]")))
- time_dilation_text = "Time Dilation: [round(time_dilation_current,1)]% AVG:([round(time_dilation_avg_fast,1)]%, [round(time_dilation_avg,1)]%, [round(time_dilation_avg_slow,1)]%)"
+ time_dilation_current = tick_drift / (current_tickcount - last_tick_tickcount) * 100
+
+ time_dilation_avg_fast = MC_AVERAGE_FAST(time_dilation_avg_fast, time_dilation_current)
+ time_dilation_avg = MC_AVERAGE(time_dilation_avg, time_dilation_avg_fast)
+ time_dilation_avg_slow = MC_AVERAGE_SLOW(time_dilation_avg_slow, time_dilation_avg)
+ else
+ first_run = FALSE
+ last_tick_realtime = current_realtime
+ last_tick_byond_time = current_byondtime
+ last_tick_tickcount = current_tickcount
+ SSblackbox.record_feedback("associative", "time_dilation_current", 1, list("[SQLtime()]" = list("current" = "[time_dilation_current]", "avg_fast" = "[time_dilation_avg_fast]", "avg" = "[time_dilation_avg]", "avg_slow" = "[time_dilation_avg_slow]")))
+ log_perf(
+ list(
+ world.time,
+ length(GLOB.clients),
+ time_dilation_current,
+ time_dilation_avg_fast,
+ time_dilation_avg,
+ time_dilation_avg_slow,
+ MAPTICK_LAST_INTERNAL_TICK_USAGE,
+ length(SStimer.timer_id_dict),
+ SSair.cost_turfs,
+ SSair.cost_groups,
+ SSair.cost_highpressure,
+ SSair.cost_hotspots,
+ SSair.cost_superconductivity,
+ SSair.cost_pipenets,
+ SSair.cost_rebuilds,
+ SSair.get_active_turfs(), //does not return a list, which is what we want
+ SSair.get_amt_excited_groups(),
+ length(SSair.hotspots),
+ length(SSair.networks),
+ length(SSair.high_pressure_delta),
+ length(SSair.active_super_conductivity)
+ )
+ )
diff --git a/code/controllers/subsystem/timer.dm b/code/controllers/subsystem/timer.dm
index 398e23cdc1..48165be960 100644
--- a/code/controllers/subsystem/timer.dm
+++ b/code/controllers/subsystem/timer.dm
@@ -1,31 +1,51 @@
-#define BUCKET_LEN (world.fps*1*60) //how many ticks should we keep in the bucket. (1 minutes worth)
+/// Controls how many buckets should be kept, each representing a tick. (1 minutes worth)
+#define BUCKET_LEN (world.fps*1*60)
+/// Helper for getting the correct bucket for a given timer
#define BUCKET_POS(timer) (((round((timer.timeToRun - SStimer.head_offset) / world.tick_lag)+1) % BUCKET_LEN)||BUCKET_LEN)
+/// Gets the maximum time at which timers will be invoked from buckets, used for deferring to secondary queue
#define TIMER_MAX (world.time + TICKS2DS(min(BUCKET_LEN-(SStimer.practical_offset-DS2TICKS(world.time - SStimer.head_offset))-1, BUCKET_LEN-1)))
-#define TIMER_ID_MAX (2**24) //max float with integer precision
+/// Max float with integer precision
+#define TIMER_ID_MAX (2**24)
+/**
+ * # Timer Subsystem
+ *
+ * Handles creation, callbacks, and destruction of timed events.
+ *
+ * It is important to understand the buckets used in the timer subsystem are just a series of circular doubly-linked
+ * lists. The object at a given index in bucket_list is a /datum/timedevent, the head of a circular list, which has prev
+ * and next references for the respective elements in that bucket's circular list.
+ */
SUBSYSTEM_DEF(timer)
name = "Timer"
- wait = 1 //SS_TICKER subsystem, so wait is in ticks
+ wait = 1 // SS_TICKER subsystem, so wait is in ticks
init_order = INIT_ORDER_TIMER
-
+ priority = FIRE_PRIORITY_TIMER
flags = SS_TICKER|SS_NO_INIT
- var/list/datum/timedevent/second_queue = list() //awe, yes, you've had first queue, but what about second queue?
+ /// Queue used for storing timers that do not fit into the current buckets
+ var/list/datum/timedevent/second_queue = list()
+ /// A hashlist dictionary used for storing unique timers
var/list/hashes = list()
-
- var/head_offset = 0 //world.time of the first entry in the the bucket.
- var/practical_offset = 1 //index of the first non-empty item in the bucket.
- var/bucket_resolution = 0 //world.tick_lag the bucket was designed for
- var/bucket_count = 0 //how many timers are in the buckets
-
- var/list/bucket_list = list() //list of buckets, each bucket holds every timer that has to run that byond tick.
-
- var/list/timer_id_dict = list() //list of all active timers assoicated to their timer id (for easy lookup)
-
- var/list/clienttime_timers = list() //special snowflake timers that run on fancy pansy "client time"
-
+ /// world.time of the first entry in the bucket list, effectively the 'start time' of the current buckets
+ var/head_offset = 0
+ /// Index of the wrap around pivot for buckets. buckets before this are later running buckets wrapped around from the end of the bucket list.
+ var/practical_offset = 1
+ /// world.tick_lag the bucket was designed for
+ var/bucket_resolution = 0
+ /// How many timers are in the buckets
+ var/bucket_count = 0
+ /// List of buckets, each bucket holds every timer that has to run that byond tick
+ var/list/bucket_list = list()
+ /// List of all active timers associated to their timer ID (for easy lookup)
+ var/list/timer_id_dict = list()
+ /// Special timers that run in real-time, not BYOND time; these are more expensive to run and maintain
+ var/list/clienttime_timers = list()
+ /// Contains the last time that a timer's callback was invoked, or the last tick the SS fired if no timers are being processed
var/last_invoke_tick = 0
+ /// Contains the last time that a warning was issued for not invoking callbacks
var/static/last_invoke_warning = 0
+ /// Boolean operator controlling if the timer SS will automatically reset buckets if it fails to invoke callbacks for an extended period of time
var/static/bucket_auto_reset = TRUE
/datum/controller/subsystem/timer/PreInit()
@@ -38,44 +58,53 @@ SUBSYSTEM_DEF(timer)
return ..()
/datum/controller/subsystem/timer/fire(resumed = FALSE)
+ // Store local references to datum vars as it is faster to access them
var/lit = last_invoke_tick
- var/last_check = world.time - TICKS2DS(BUCKET_LEN*1.5)
var/list/bucket_list = src.bucket_list
+ var/last_check = world.time - TICKS2DS(BUCKET_LEN * 1.5)
+ // If there are no timers being tracked, then consider now to be the last invoked time
if(!bucket_count)
last_invoke_tick = world.time
+ // Check that we have invoked a callback in the last 1.5 minutes of BYOND time,
+ // and throw a warning and reset buckets if this is true
if(lit && lit < last_check && head_offset < last_check && last_invoke_warning < last_check)
last_invoke_warning = world.time
- var/msg = "No regular timers processed in the last [BUCKET_LEN*1.5] ticks[bucket_auto_reset ? ", resetting buckets" : ""]!"
+ var/msg = "No regular timers processed in the last [BUCKET_LEN * 1.5] ticks[bucket_auto_reset ? ", resetting buckets" : ""]!"
message_admins(msg)
WARNING(msg)
if(bucket_auto_reset)
bucket_resolution = 0
- log_world("Timer bucket reset. world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]")
+ var/list/to_log = list("Timer bucket reset. world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]")
for (var/i in 1 to length(bucket_list))
var/datum/timedevent/bucket_head = bucket_list[i]
if (!bucket_head)
continue
- log_world("Active timers at index [i]:")
-
+ to_log += "Active timers at index [i]:"
var/datum/timedevent/bucket_node = bucket_head
var/anti_loop_check = 1000
do
- log_world(get_timer_debug_string(bucket_node))
+ to_log += get_timer_debug_string(bucket_node)
bucket_node = bucket_node.next
anti_loop_check--
while(bucket_node && bucket_node != bucket_head && anti_loop_check)
- log_world("Active timers in the second_queue queue:")
+
+ to_log += "Active timers in the second_queue queue:"
for(var/I in second_queue)
- log_world(get_timer_debug_string(I))
+ to_log += get_timer_debug_string(I)
- var/next_clienttime_timer_index = 0
- var/len = length(clienttime_timers)
+ // Dump all the logged data to the world log
+ log_world(to_log.Join("\n"))
- for (next_clienttime_timer_index in 1 to len)
+ // Process client-time timers
+ var/static/next_clienttime_timer_index = 0
+ if (next_clienttime_timer_index)
+ clienttime_timers.Cut(1, next_clienttime_timer_index+1)
+ next_clienttime_timer_index = 0
+ for (next_clienttime_timer_index in 1 to length(clienttime_timers))
if (MC_TICK_CHECK)
next_clienttime_timer_index--
break
@@ -86,8 +115,8 @@ SUBSYSTEM_DEF(timer)
var/datum/callback/callBack = ctime_timer.callBack
if (!callBack)
- clienttime_timers.Cut(next_clienttime_timer_index,next_clienttime_timer_index+1)
- CRASH("Invalid timer: [get_timer_debug_string(ctime_timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset], REALTIMEOFDAY: [REALTIMEOFDAY]")
+ CRASH("Invalid timer: [get_timer_debug_string(ctime_timer)] world.time: [world.time], \
+ head_offset: [head_offset], practical_offset: [practical_offset], REALTIMEOFDAY: [REALTIMEOFDAY]")
ctime_timer.spent = REALTIMEOFDAY
callBack.InvokeAsync()
@@ -95,135 +124,93 @@ SUBSYSTEM_DEF(timer)
if(ctime_timer.flags & TIMER_LOOP)
ctime_timer.spent = 0
ctime_timer.timeToRun = REALTIMEOFDAY + ctime_timer.wait
- BINARY_INSERT(ctime_timer, clienttime_timers, datum/timedevent, ctime_timer, timeToRun, COMPARE_KEY)
+ BINARY_INSERT(ctime_timer, clienttime_timers, /datum/timedevent, ctime_timer, timeToRun, COMPARE_KEY)
else
qdel(ctime_timer)
-
+ // Remove invoked client-time timers
if (next_clienttime_timer_index)
clienttime_timers.Cut(1, next_clienttime_timer_index+1)
+ next_clienttime_timer_index = 0
if (MC_TICK_CHECK)
return
- var/static/list/spent = list()
- var/static/datum/timedevent/timer
+ // Check for when we need to loop the buckets, this occurs when
+ // the head_offset is approaching BUCKET_LEN ticks in the past
if (practical_offset > BUCKET_LEN)
head_offset += TICKS2DS(BUCKET_LEN)
practical_offset = 1
resumed = FALSE
+ // Check for when we have to reset buckets, typically from auto-reset
if ((length(bucket_list) != BUCKET_LEN) || (world.tick_lag != bucket_resolution))
reset_buckets()
bucket_list = src.bucket_list
resumed = FALSE
- if (!resumed)
- timer = null
-
- while (practical_offset <= BUCKET_LEN && head_offset + ((practical_offset-1)*world.tick_lag) <= world.time)
- var/datum/timedevent/head = bucket_list[practical_offset]
- if (!timer || !head || timer == head)
- head = bucket_list[practical_offset]
- timer = head
- while (timer)
+ // Iterate through each bucket starting from the practical offset
+ while (practical_offset <= BUCKET_LEN && head_offset + ((practical_offset - 1) * world.tick_lag) <= world.time)
+ var/datum/timedevent/timer
+ while ((timer = bucket_list[practical_offset]))
var/datum/callback/callBack = timer.callBack
if (!callBack)
- bucket_resolution = null //force bucket recreation
- CRASH("Invalid timer: [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]")
+ bucket_resolution = null // force bucket recreation
+ CRASH("Invalid timer: [get_timer_debug_string(timer)] world.time: [world.time], \
+ head_offset: [head_offset], practical_offset: [practical_offset]")
+ timer.bucketEject() //pop the timer off of the bucket list.
+
+ // Invoke callback if possible
if (!timer.spent)
- spent += timer
timer.spent = world.time
callBack.InvokeAsync()
last_invoke_tick = world.time
- if (MC_TICK_CHECK)
- return
-
- timer = timer.next
- if (timer == head)
- break
-
-
- bucket_list[practical_offset++] = null
-
- //we freed up a bucket, lets see if anything in second_queue needs to be shifted to that bucket.
- var/i = 0
- var/L = length(second_queue)
- for (i in 1 to L)
- timer = second_queue[i]
- if (timer.timeToRun >= TIMER_MAX)
- i--
- break
-
- if (timer.timeToRun < head_offset)
- bucket_resolution = null //force bucket recreation
- stack_trace("[i] Invalid timer state: Timer in long run queue with a time to run less then head_offset. [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]")
-
- if (timer.callBack && !timer.spent)
- timer.callBack.InvokeAsync()
- spent += timer
- bucket_count++
- else if(!QDELETED(timer))
- qdel(timer)
- continue
-
- if (timer.timeToRun < head_offset + TICKS2DS(practical_offset-1))
- bucket_resolution = null //force bucket recreation
- stack_trace("[i] Invalid timer state: Timer in long run queue that would require a backtrack to transfer to short run queue. [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]")
- if (timer.callBack && !timer.spent)
- timer.callBack.InvokeAsync()
- spent += timer
- bucket_count++
- else if(!QDELETED(timer))
- qdel(timer)
- continue
-
- bucket_count++
- var/bucket_pos = max(1, BUCKET_POS(timer))
-
- var/datum/timedevent/bucket_head = bucket_list[bucket_pos]
- if (!bucket_head)
- bucket_list[bucket_pos] = timer
- timer.next = null
- timer.prev = null
- continue
-
- if (!bucket_head.prev)
- bucket_head.prev = bucket_head
- timer.next = bucket_head
- timer.prev = bucket_head.prev
- timer.next.prev = timer
- timer.prev.next = timer
- if (i)
- second_queue.Cut(1, i+1)
-
- timer = null
-
- bucket_count -= length(spent)
-
- for (var/i in spent)
- var/datum/timedevent/qtimer = i
- if(QDELETED(qtimer))
- bucket_count++
- continue
- if(!(qtimer.flags & TIMER_LOOP))
- qdel(qtimer)
- else
- bucket_count++
- qtimer.spent = 0
- qtimer.bucketEject()
- if(qtimer.flags & TIMER_CLIENT_TIME)
- qtimer.timeToRun = REALTIMEOFDAY + qtimer.wait
+ if (timer.flags & TIMER_LOOP) // Prepare looping timers to re-enter the queue
+ timer.spent = 0
+ timer.timeToRun = world.time + timer.wait
+ timer.bucketJoin()
else
- qtimer.timeToRun = world.time + qtimer.wait
- qtimer.bucketJoin()
+ qdel(timer)
- spent.len = 0
+ if (MC_TICK_CHECK)
+ break
-//formated this way to be runtime resistant
+ if (!bucket_list[practical_offset])
+ // Empty the bucket, check if anything in the secondary queue should be shifted to this bucket
+ bucket_list[practical_offset++] = null
+ var/i = 0
+ for (i in 1 to length(second_queue))
+ timer = second_queue[i]
+ if (timer.timeToRun >= TIMER_MAX)
+ i--
+ break
+
+ // Check for timers that are scheduled to run in the past
+ if (timer.timeToRun < head_offset)
+ bucket_resolution = null // force bucket recreation
+ stack_trace("[i] Invalid timer state: Timer in long run queue with a time to run less then head_offset. \
+ [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]")
+ break
+
+ // Check for timers that are not capable of being scheduled to run without rebuilding buckets
+ if (timer.timeToRun < head_offset + TICKS2DS(practical_offset - 1))
+ bucket_resolution = null // force bucket recreation
+ stack_trace("[i] Invalid timer state: Timer in long run queue that would require a backtrack to transfer to \
+ short run queue. [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]")
+ break
+
+ timer.bucketJoin()
+ if (i)
+ second_queue.Cut(1, i+1)
+ if (MC_TICK_CHECK)
+ break
+
+/**
+ * Generates a string with details about the timed event for debugging purposes
+ */
/datum/controller/subsystem/timer/proc/get_timer_debug_string(datum/timedevent/TE)
. = "Timer: [TE]"
. += "Prev: [TE.prev ? TE.prev : "NULL"], Next: [TE.next ? TE.next : "NULL"]"
@@ -234,12 +221,16 @@ SUBSYSTEM_DEF(timer)
if(!TE.callBack)
. += ", NO CALLBACK"
+/**
+ * Destroys the existing buckets and creates new buckets from the existing timed events
+ */
/datum/controller/subsystem/timer/proc/reset_buckets()
- var/list/bucket_list = src.bucket_list
+ var/list/bucket_list = src.bucket_list // Store local reference to datum var, this is faster
var/list/alltimers = list()
- //collect the timers currently in the bucket
+
+ // Get all timers currently in the buckets
for (var/bucket_head in bucket_list)
- if (!bucket_head)
+ if (!bucket_head) // if bucket is empty for this tick
continue
var/datum/timedevent/bucket_node = bucket_head
do
@@ -247,25 +238,38 @@ SUBSYSTEM_DEF(timer)
bucket_node = bucket_node.next
while(bucket_node && bucket_node != bucket_head)
+ // Empty the list by zeroing and re-assigning the length
bucket_list.len = 0
bucket_list.len = BUCKET_LEN
+ // Reset values for the subsystem to their initial values
practical_offset = 1
bucket_count = 0
head_offset = world.time
bucket_resolution = world.tick_lag
+ // Add all timed events from the secondary queue as well
alltimers += second_queue
+
+ // If there are no timers being tracked by the subsystem,
+ // there is no need to do any further rebuilding
if (!length(alltimers))
return
+ // Sort all timers by time to run
sortTim(alltimers, .proc/cmp_timer)
+ // Get the earliest timer, and if the TTR is earlier than the current world.time,
+ // then set the head offset appropriately to be the earliest time tracked by the
+ // current set of buckets
var/datum/timedevent/head = alltimers[1]
-
if (head.timeToRun < head_offset)
head_offset = head.timeToRun
+ // Iterate through each timed event and insert it into an appropriate bucket,
+ // up unto the point that we can no longer insert into buckets as the TTR
+ // is outside the range we are tracking, then insert the remainder into the
+ // secondary queue
var/new_bucket_count
var/i = 1
for (i in 1 to length(alltimers))
@@ -273,34 +277,38 @@ SUBSYSTEM_DEF(timer)
if (!timer)
continue
- var/bucket_pos = BUCKET_POS(timer)
+ // Check that the TTR is within the range covered by buckets, when exceeded we've finished
if (timer.timeToRun >= TIMER_MAX)
i--
break
-
+ // Check that timer has a valid callback and hasn't been invoked
if (!timer.callBack || timer.spent)
- WARNING("Invalid timer: [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]")
+ WARNING("Invalid timer: [get_timer_debug_string(timer)] world.time: [world.time], \
+ head_offset: [head_offset], practical_offset: [practical_offset]")
if (timer.callBack)
qdel(timer)
continue
+ // Insert the timer into the bucket, and perform necessary circular doubly-linked list operations
new_bucket_count++
+ var/bucket_pos = BUCKET_POS(timer)
var/datum/timedevent/bucket_head = bucket_list[bucket_pos]
if (!bucket_head)
bucket_list[bucket_pos] = timer
timer.next = null
timer.prev = null
continue
-
if (!bucket_head.prev)
bucket_head.prev = bucket_head
timer.next = bucket_head
timer.prev = bucket_head.prev
timer.next.prev = timer
timer.prev.next = timer
+
+ // Cut the timers that are tracked by the buckets from the secondary queue
if (i)
- alltimers.Cut(1, i+1)
+ alltimers.Cut(1, i + 1)
second_queue = alltimers
bucket_count = new_bucket_count
@@ -311,45 +319,64 @@ SUBSYSTEM_DEF(timer)
timer_id_dict |= SStimer.timer_id_dict
bucket_list |= SStimer.bucket_list
+/**
+ * # Timed Event
+ *
+ * This is the actual timer, it contains the callback and necessary data to maintain
+ * the timer.
+ *
+ * See the documentation for the timer subsystem for an explanation of the buckets referenced
+ * below in next and prev
+ */
/datum/timedevent
+ /// ID used for timers when the TIMER_STOPPABLE flag is present
var/id
+ /// The callback to invoke after the timer completes
var/datum/callback/callBack
+ /// The time at which the callback should be invoked at
var/timeToRun
+ /// The length of the timer
var/wait
+ /// Unique hash generated when TIMER_UNIQUE flag is present
var/hash
+ /// The source of the timedevent, whatever called addtimer
+ var/source
+ /// Flags associated with the timer, see _DEFINES/subsystems.dm
var/list/flags
- var/spent = 0 //time we ran the timer.
- var/name //for easy debugging.
- //cicular doublely linked list
+ /// Time at which the timer was invoked or destroyed
+ var/spent = 0
+ /// An informative name generated for the timer as its representation in strings, useful for debugging
+ var/name
+ /// Next timed event in the bucket
var/datum/timedevent/next
+ /// Previous timed event in the bucket
var/datum/timedevent/prev
-/datum/timedevent/New(datum/callback/callBack, wait, flags, hash)
+/datum/timedevent/New(datum/callback/callBack, wait, flags, hash, source)
var/static/nextid = 1
id = TIMER_ID_NULL
src.callBack = callBack
src.wait = wait
src.flags = flags
src.hash = hash
+ src.source = source
- if (flags & TIMER_CLIENT_TIME)
- timeToRun = REALTIMEOFDAY + wait
- else
- timeToRun = world.time + wait
+ // Determine time at which the timer's callback should be invoked
+ timeToRun = (flags & TIMER_CLIENT_TIME ? REALTIMEOFDAY : world.time) + wait
+ // Include the timer in the hash table if the timer is unique
if (flags & TIMER_UNIQUE)
SStimer.hashes[hash] = src
+ // Generate ID for the timer if the timer is stoppable, include in the timer id dictionary
if (flags & TIMER_STOPPABLE)
id = num2text(nextid, 100)
if (nextid >= SHORT_REAL_LIMIT)
- nextid += min(1, 2**round(nextid/SHORT_REAL_LIMIT))
+ nextid += min(1, 2 ** round(nextid / SHORT_REAL_LIMIT))
else
nextid++
SStimer.timer_id_dict[id] = src
- name = "Timer: [id] (\ref[src]), TTR: [timeToRun], Flags: [jointext(bitfield2list(flags, list("TIMER_UNIQUE", "TIMER_OVERRIDE", "TIMER_CLIENT_TIME", "TIMER_STOPPABLE", "TIMER_NO_HASH_WAIT", "TIMER_LOOP")), ", ")], callBack: \ref[callBack], callBack.object: [callBack.object]\ref[callBack.object]([getcallingtype()]), callBack.delegate:[callBack.delegate]([callBack.arguments ? callBack.arguments.Join(", ") : ""])"
-
if ((timeToRun < world.time || timeToRun < SStimer.head_offset) && !(flags & TIMER_CLIENT_TIME))
CRASH("Invalid timer state: Timer created that would require a backtrack to run (addtimer would never let this happen): [SStimer.get_timer_debug_string(src)]")
@@ -390,23 +417,39 @@ SUBSYSTEM_DEF(timer)
prev = null
return QDEL_HINT_IWILLGC
+/**
+ * Removes this timed event from any relevant buckets, or the secondary queue
+ */
/datum/timedevent/proc/bucketEject()
+ // Attempt to find bucket that contains this timed event
var/bucketpos = BUCKET_POS(src)
+
+ // Store local references for the bucket list and secondary queue
+ // This is faster than referencing them from the datum itself
var/list/bucket_list = SStimer.bucket_list
var/list/second_queue = SStimer.second_queue
+
+ // Attempt to get the head of the bucket
var/datum/timedevent/buckethead
if(bucketpos > 0)
buckethead = bucket_list[bucketpos]
+
+ // Decrement the number of timers in buckets if the timed event is
+ // the head of the bucket, or has a TTR less than TIMER_MAX implying it fits
+ // into an existing bucket, or is otherwise not present in the secondary queue
if(buckethead == src)
bucket_list[bucketpos] = next
SStimer.bucket_count--
- else if(timeToRun < TIMER_MAX || next || prev)
+ else if(timeToRun < TIMER_MAX)
SStimer.bucket_count--
else
var/l = length(second_queue)
second_queue -= src
if(l == length(second_queue))
SStimer.bucket_count--
+
+ // Remove the timed event from the bucket, ensuring to maintain
+ // the integrity of the bucket's list if relevant
if(prev != next)
prev.next = next
next.prev = prev
@@ -415,32 +458,47 @@ SUBSYSTEM_DEF(timer)
next?.prev = null
prev = next = null
+/**
+ * Attempts to add this timed event to a bucket, will enter the secondary queue
+ * if there are no appropriate buckets at this time.
+ *
+ * Secondary queueing of timed events will occur when the timespan covered by the existing
+ * buckets is exceeded by the time at which this timed event is scheduled to be invoked.
+ * If the timed event is tracking client time, it will be added to a special bucket.
+ */
/datum/timedevent/proc/bucketJoin()
- var/list/L
+ // Generate debug-friendly name for timer
+ var/static/list/bitfield_flags = list("TIMER_UNIQUE", "TIMER_OVERRIDE", "TIMER_CLIENT_TIME", "TIMER_STOPPABLE", "TIMER_NO_HASH_WAIT", "TIMER_LOOP")
+ name = "Timer: [id] (\ref[src]), TTR: [timeToRun], wait:[wait] Flags: [jointext(bitfield2list(flags, bitfield_flags), ", ")], \
+ callBack: \ref[callBack], callBack.object: [callBack.object]\ref[callBack.object]([getcallingtype()]), \
+ callBack.delegate:[callBack.delegate]([callBack.arguments ? callBack.arguments.Join(", ") : ""]), source: [source]"
+ // Check if this timed event should be diverted to the client time bucket, or the secondary queue
+ var/list/L
if (flags & TIMER_CLIENT_TIME)
L = SStimer.clienttime_timers
else if (timeToRun >= TIMER_MAX)
L = SStimer.second_queue
-
if(L)
- BINARY_INSERT(src, L, datum/timedevent, src, timeToRun, COMPARE_KEY)
+ BINARY_INSERT(src, L, /datum/timedevent, src, timeToRun, COMPARE_KEY)
return
- //get the list of buckets
+ // Get a local reference to the bucket list, this is faster than referencing the datum
var/list/bucket_list = SStimer.bucket_list
- //calculate our place in the bucket list
+ // Find the correct bucket for this timed event
var/bucket_pos = BUCKET_POS(src)
-
- //get the bucket for our tick
var/datum/timedevent/bucket_head = bucket_list[bucket_pos]
SStimer.bucket_count++
- //empty bucket, we will just add ourselves
+
+ // If there is no timed event at this position, then the bucket is 'empty'
+ // and we can just set this event to that position
if (!bucket_head)
bucket_list[bucket_pos] = src
return
- //other wise, lets do a simplified linked list add.
+
+ // Otherwise, we merely add this timed event into the bucket, which is a
+ // circularly doubly-linked list
if (!bucket_head.prev)
bucket_head.prev = bucket_head
next = bucket_head
@@ -448,7 +506,9 @@ SUBSYSTEM_DEF(timer)
next.prev = src
prev.next = src
-///Returns a string of the type of the callback for this timer
+/**
+ * Returns a string of the type of the callback for this timer
+ */
/datum/timedevent/proc/getcallingtype()
. = "ERROR"
if (callBack.object == GLOBAL_PROC)
@@ -457,14 +517,15 @@ SUBSYSTEM_DEF(timer)
. = "[callBack.object.type]"
/**
- * Create a new timer and insert it in the queue
- *
- * Arguments:
- * * callback the callback to call on timer finish
- * * wait deciseconds to run the timer for
- * * flags flags for this timer, see: code\__DEFINES\subsystems.dm
- */
-/proc/addtimer(datum/callback/callback, wait = 0, flags = 0)
+ * Create a new timer and insert it in the queue.
+ * You should not call this directly, and should instead use the addtimer macro, which includes source information.
+ *
+ * Arguments:
+ * * callback the callback to call on timer finish
+ * * wait deciseconds to run the timer for
+ * * flags flags for this timer, see: code\__DEFINES\subsystems.dm
+ */
+/proc/_addtimer(datum/callback/callback, wait = 0, flags = 0, file, line)
if (!callback)
CRASH("addtimer called without a callback")
@@ -472,31 +533,30 @@ SUBSYSTEM_DEF(timer)
stack_trace("addtimer called with a negative wait. Converting to [world.tick_lag]")
if (callback.object != GLOBAL_PROC && QDELETED(callback.object) && !QDESTROYING(callback.object))
- stack_trace("addtimer called with a callback assigned to a qdeleted object. In the future such timers will not be supported and may refuse to run or run with a 0 wait")
+ stack_trace("addtimer called with a callback assigned to a qdeleted object. In the future such timers will not \
+ be supported and may refuse to run or run with a 0 wait")
wait = max(CEILING(wait, world.tick_lag), world.tick_lag)
if(wait >= INFINITY)
CRASH("Attempted to create timer with INFINITY delay")
+ // Generate hash if relevant for timed events with the TIMER_UNIQUE flag
var/hash
-
if (flags & TIMER_UNIQUE)
- var/list/hashlist
- if(flags & TIMER_NO_HASH_WAIT)
- hashlist = list(callback.object, "([REF(callback.object)])", callback.delegate, flags & TIMER_CLIENT_TIME)
- else
- hashlist = list(callback.object, "([REF(callback.object)])", callback.delegate, wait, flags & TIMER_CLIENT_TIME)
+ var/list/hashlist = list(callback.object, "([REF(callback.object)])", callback.delegate, flags & TIMER_CLIENT_TIME)
+ if(!(flags & TIMER_NO_HASH_WAIT))
+ hashlist += wait
hashlist += callback.arguments
hash = hashlist.Join("|||||||")
var/datum/timedevent/hash_timer = SStimer.hashes[hash]
if(hash_timer)
- if (hash_timer.spent) //it's pending deletion, pretend it doesn't exist.
- hash_timer.hash = null //but keep it from accidentally deleting us
+ if (hash_timer.spent) // it's pending deletion, pretend it doesn't exist.
+ hash_timer.hash = null // but keep it from accidentally deleting us
else
if (flags & TIMER_OVERRIDE)
- hash_timer.hash = null //no need having it delete it's hash if we are going to replace it
+ hash_timer.hash = null // no need having it delete it's hash if we are going to replace it
qdel(hash_timer)
else
if (hash_timer.flags & TIMER_STOPPABLE)
@@ -505,24 +565,23 @@ SUBSYSTEM_DEF(timer)
else if(flags & TIMER_OVERRIDE)
stack_trace("TIMER_OVERRIDE used without TIMER_UNIQUE")
- var/datum/timedevent/timer = new(callback, wait, flags, hash)
+ var/datum/timedevent/timer = new(callback, wait, flags, hash, file && "[file]:[line]")
return timer.id
/**
- * Delete a timer
- *
- * Arguments:
- * * id a timerid or a /datum/timedevent
- */
+ * Delete a timer
+ *
+ * Arguments:
+ * * id a timerid or a /datum/timedevent
+ */
/proc/deltimer(id)
if (!id)
return FALSE
if (id == TIMER_ID_NULL)
CRASH("Tried to delete a null timerid. Use TIMER_STOPPABLE flag")
- if (!istext(id))
- if (istype(id, /datum/timedevent))
- qdel(id)
- return TRUE
+ if (istype(id, /datum/timedevent))
+ qdel(id)
+ return TRUE
//id is string
var/datum/timedevent/timer = SStimer.timer_id_dict[id]
if (timer && !timer.spent)
@@ -531,25 +590,22 @@ SUBSYSTEM_DEF(timer)
return FALSE
/**
- * Get the remaining deciseconds on a timer
- *
- * Arguments:
- * * id a timerid or a /datum/timedevent
- */
+ * Get the remaining deciseconds on a timer
+ *
+ * Arguments:
+ * * id a timerid or a /datum/timedevent
+ */
/proc/timeleft(id)
if (!id)
return null
if (id == TIMER_ID_NULL)
CRASH("Tried to get timeleft of a null timerid. Use TIMER_STOPPABLE flag")
- if (!istext(id))
- if (istype(id, /datum/timedevent))
- var/datum/timedevent/timer = id
- return timer.timeToRun - world.time
+ if (istype(id, /datum/timedevent))
+ var/datum/timedevent/timer = id
+ return timer.timeToRun - world.time
//id is string
var/datum/timedevent/timer = SStimer.timer_id_dict[id]
- if (timer && !timer.spent)
- return timer.timeToRun - world.time
- return null
+ return (timer && !timer.spent) ? timer.timeToRun - world.time : null
#undef BUCKET_LEN
#undef BUCKET_POS
diff --git a/code/controllers/subsystem/title.dm b/code/controllers/subsystem/title.dm
index bd843f959d..996f73ccf6 100644
--- a/code/controllers/subsystem/title.dm
+++ b/code/controllers/subsystem/title.dm
@@ -25,12 +25,12 @@ SUBSYSTEM_DEF(title)
SSmapping.HACK_LoadMapConfig()
for(var/S in provisional_title_screens)
var/list/L = splittext(S,"+")
- if((L.len == 1 && L[1] != "blank.png")|| (L.len > 1 && ((use_rare_screens && lowertext(L[1]) == "rare") || (lowertext(L[1]) == lowertext(SSmapping.config.map_name)))))
+ if((L.len == 1 && (L[1] != "exclude" && L[1] != "blank.png"))|| (L.len > 1 && ((use_rare_screens && lowertext(L[1]) == "rare") || (lowertext(L[1]) == lowertext(SSmapping.config.map_name)))))
title_screens += S
if(length(title_screens))
file_path = "[global.config.directory]/title_screens/images/[pick(title_screens)]"
-
+
if(!file_path)
file_path = "icons/default_title.dmi"
diff --git a/code/controllers/subsystem/vis_overlays.dm b/code/controllers/subsystem/vis_overlays.dm
index 0635709074..b0e5d6c689 100644
--- a/code/controllers/subsystem/vis_overlays.dm
+++ b/code/controllers/subsystem/vis_overlays.dm
@@ -5,10 +5,12 @@ SUBSYSTEM_DEF(vis_overlays)
init_order = INIT_ORDER_VIS
var/list/vis_overlay_cache
+ var/list/unique_vis_overlays
var/list/currentrun
/datum/controller/subsystem/vis_overlays/Initialize()
vis_overlay_cache = list()
+ unique_vis_overlays = list()
return ..()
/datum/controller/subsystem/vis_overlays/fire(resumed = FALSE)
@@ -29,31 +31,45 @@ SUBSYSTEM_DEF(vis_overlays)
return
//the "thing" var can be anything with vis_contents which includes images
-/datum/controller/subsystem/vis_overlays/proc/add_vis_overlay(atom/movable/thing, icon, iconstate, layer, plane, dir, alpha = 255, add_appearance_flags = NONE)
- . = "[icon]|[iconstate]|[layer]|[plane]|[dir]|[alpha]|[add_appearance_flags]"
- var/obj/effect/overlay/vis/overlay = vis_overlay_cache[.]
- if(!overlay)
- overlay = new
- overlay.icon = icon
- overlay.icon_state = iconstate
- overlay.layer = layer
- overlay.plane = plane
- overlay.dir = dir
- overlay.alpha = alpha
- overlay.appearance_flags |= add_appearance_flags
- vis_overlay_cache[.] = overlay
+/datum/controller/subsystem/vis_overlays/proc/add_vis_overlay(atom/movable/thing, icon, iconstate, layer, plane, dir, alpha = 255, add_appearance_flags = NONE, unique = FALSE)
+ var/obj/effect/overlay/vis/overlay
+ if(!unique)
+ . = "[icon]|[iconstate]|[layer]|[plane]|[dir]|[alpha]|[add_appearance_flags]"
+ overlay = vis_overlay_cache[.]
+ if(!overlay)
+ overlay = _create_new_vis_overlay(icon, iconstate, layer, plane, dir, alpha, add_appearance_flags)
+ vis_overlay_cache[.] = overlay
+ else
+ overlay.unused = 0
else
- overlay.unused = 0
+ overlay = _create_new_vis_overlay(icon, iconstate, layer, plane, dir, alpha, add_appearance_flags)
+ overlay.cache_expiration = -1
+ var/cache_id = "\ref[overlay]@{[world.time]}"
+ unique_vis_overlays += overlay
+ vis_overlay_cache[cache_id] = overlay
+ . = overlay
thing.vis_contents += overlay
if(!isatom(thing)) // Automatic rotation is not supported on non atoms
- return
+ return overlay
if(!thing.managed_vis_overlays)
thing.managed_vis_overlays = list(overlay)
- RegisterSignal(thing, COMSIG_ATOM_DIR_CHANGE, .proc/rotate_vis_overlay)
else
thing.managed_vis_overlays += overlay
+ return overlay
+
+/datum/controller/subsystem/vis_overlays/proc/_create_new_vis_overlay(icon, iconstate, layer, plane, dir, alpha, add_appearance_flags)
+ var/obj/effect/overlay/vis/overlay = new
+ overlay.icon = icon
+ overlay.icon_state = iconstate
+ overlay.layer = layer
+ overlay.plane = plane
+ overlay.dir = dir
+ overlay.alpha = alpha
+ overlay.appearance_flags |= add_appearance_flags
+ return overlay
+
/datum/controller/subsystem/vis_overlays/proc/remove_vis_overlay(atom/movable/thing, list/overlays)
thing.vis_contents -= overlays
@@ -62,15 +78,3 @@ SUBSYSTEM_DEF(vis_overlays)
thing.managed_vis_overlays -= overlays
if(!length(thing.managed_vis_overlays))
thing.managed_vis_overlays = null
- UnregisterSignal(thing, COMSIG_ATOM_DIR_CHANGE)
-
-/datum/controller/subsystem/vis_overlays/proc/rotate_vis_overlay(atom/thing, old_dir, new_dir)
- if(old_dir == new_dir)
- return
- var/rotation = dir2angle(old_dir) - dir2angle(new_dir)
- var/list/overlays_to_remove = list()
- for(var/i in thing.managed_vis_overlays)
- var/obj/effect/overlay/vis/overlay = i
- add_vis_overlay(thing, overlay.icon, overlay.icon_state, overlay.layer, overlay.plane, turn(overlay.dir, rotation), overlay.alpha, overlay.appearance_flags)
- overlays_to_remove += overlay
- remove_vis_overlay(thing, overlays_to_remove)
diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm
index 880802fd5c..fb8299d108 100644
--- a/code/controllers/subsystem/vote.dm
+++ b/code/controllers/subsystem/vote.dm
@@ -141,8 +141,8 @@ SUBSYSTEM_DEF(vote)
choices[choices[i]]++ // higher shortest path = better candidate, so we add to choices here
// choices[choices[i]] is the schulze ranking, here, rather than raw vote numbers
-/datum/controller/subsystem/vote/proc/calculate_majority_judgement_vote(var/blackbox_text)
- // https://en.wikipedia.org/wiki/Majority_judgment
+/datum/controller/subsystem/vote/proc/calculate_highest_median(var/blackbox_text)
+ // https://en.wikipedia.org/wiki/Highest_median_voting_rules
var/list/scores_by_choice = list()
for(var/choice in choices)
scores_by_choice += "[choice]"
@@ -161,33 +161,24 @@ SUBSYSTEM_DEF(vote)
// END BALLOT GATHERING
for(var/score_name in scores_by_choice)
var/list/score = scores_by_choice[score_name]
- for(var/indiv_score in score)
- SSblackbox.record_feedback("nested tally","voting",1,list(blackbox_text,"Scores",score_name,GLOB.vote_score_options[indiv_score]))
- if(score.len == 0)
- scores_by_choice -= score_name
- while(scores_by_choice.len > 1)
- var/highest_median = 0
- for(var/score_name in scores_by_choice) // first get highest median
- var/list/score = scores_by_choice[score_name]
- if(!score.len)
- scores_by_choice -= score_name
- continue
+ if(!score.len)
+ choices[score_name] = 0
+ else
var/median = score[max(1,round(score.len/2))]
- if(median >= highest_median)
- highest_median = median
- for(var/score_name in scores_by_choice) // then, remove
- var/list/score = scores_by_choice[score_name]
- var/median = score[max(1,round(score.len/2))]
- if(median < highest_median)
- scores_by_choice -= score_name
- for(var/score_name in scores_by_choice) // after removals
- var/list/score = scores_by_choice[score_name]
- if(score.len == 0)
- choices[score_name] += 100 // we're in a tie situation--just go with the first one
- return
- var/median_pos = max(1,round(score.len/2))
- score.Cut(median_pos,median_pos+1)
- choices[score_name]++
+ var/p = 0 // proponents (those with higher than median)
+ var/q = 0 // opponents (lower than median)
+ var/list/this_score_list = scores_by_choice[score_name]
+ for(var/indiv_score in score)
+ SSblackbox.record_feedback("nested tally","voting",1,list(blackbox_text,"Scores",score_name,GLOB.vote_score_options[indiv_score]))
+ if(indiv_score < median) // this is possible to do in O(logn) but n is never more than 200 so this is fine
+ q += 1
+ else if(indiv_score > median)
+ p += 1
+ p /= this_score_list.len
+ q /= this_score_list.len
+ choices[score_name] = median + (((p - q) / (1 - p - q)) * 0.5) // usual judgement
+ // choices[score_name] = median + p - q // typical judgement
+ // choices[score_name] = median + (((p - q) / (p + q)) * 0.5) // central judgement
/datum/controller/subsystem/vote/proc/calculate_scores(var/blackbox_text)
for(var/choice in choices)
@@ -245,8 +236,8 @@ SUBSYSTEM_DEF(vote)
calculate_condorcet_votes(vote_title_text)
if(vote_system == SCORE_VOTING)
calculate_scores(vote_title_text)
- if(vote_system == MAJORITY_JUDGEMENT_VOTING)
- calculate_majority_judgement_vote(vote_title_text) // nothing uses this at the moment
+ if(vote_system == HIGHEST_MEDIAN_VOTING)
+ calculate_highest_median(vote_title_text) // nothing uses this at the moment
var/list/winners = vote_system == INSTANT_RUNOFF_VOTING ? get_runoff_results() : get_result()
var/was_roundtype_vote = mode == "roundtype" || mode == "dynamic"
if(winners.len > 0)
@@ -255,8 +246,8 @@ SUBSYSTEM_DEF(vote)
if(display_votes & SHOW_RESULTS)
if(vote_system == SCHULZE_VOTING)
text += "\nIt should be noted that this is not a raw tally of votes (impossible in ranked choice) but the score determined by the schulze method of voting, so the numbers will look weird!"
- if(vote_system == MAJORITY_JUDGEMENT_VOTING)
- text += "\nIt should be noted that this is not a raw tally of votes but the number of runoffs done by majority judgement!"
+ if(vote_system == HIGHEST_MEDIAN_VOTING)
+ text += "\nThis is the highest median score plus the tiebreaker!"
for(var/i=1,i<=choices.len,i++)
var/votes = choices[choices[i]]
if(!votes)
@@ -302,7 +293,7 @@ SUBSYSTEM_DEF(vote)
if(vote_system != SCORE_VOTING)
if(vote_system == SCHULZE_VOTING)
admintext += "\nIt should be noted that this is not a raw tally of votes (impossible in ranked choice) but the score determined by the schulze method of voting, so the numbers will look weird!"
- else if(vote_system == MAJORITY_JUDGEMENT_VOTING)
+ else if(vote_system == HIGHEST_MEDIAN_VOTING)
admintext += "\nIt should be noted that this is not a raw tally of votes but the number of runoffs done by majority judgement!"
for(var/i=1,i<=choices.len,i++)
var/votes = choices[choices[i]]
@@ -429,7 +420,7 @@ SUBSYSTEM_DEF(vote)
voted[usr.ckey] = list()
voted[usr.ckey] += vote
saved -= usr.ckey
- if(SCORE_VOTING,MAJORITY_JUDGEMENT_VOTING)
+ if(SCORE_VOTING,HIGHEST_MEDIAN_VOTING)
if(!(usr.ckey in voted))
voted += usr.ckey
voted[usr.ckey] = list()
@@ -584,7 +575,7 @@ SUBSYSTEM_DEF(vote)
. += "
Vote any number of choices. "
if(SCHULZE_VOTING,INSTANT_RUNOFF_VOTING)
. += "Vote by order of preference. Revoting will demote to the bottom. 1 is your favorite, and higher numbers are worse. "
- if(SCORE_VOTING,MAJORITY_JUDGEMENT_VOTING)
+ if(SCORE_VOTING,HIGHEST_MEDIAN_VOTING)
. += "Grade the candidates by how much you like them. "
. += "No-votes have no power--your opinion is only heard if you vote! "
. += "Time Left: [DisplayTimeText(end_time-world.time)]"
@@ -621,7 +612,7 @@ SUBSYSTEM_DEF(vote)
. += "(Saved!)"
. += "(Load vote from save )"
. += "(Reset votes )"
- if(SCORE_VOTING,MAJORITY_JUDGEMENT_VOTING)
+ if(SCORE_VOTING,HIGHEST_MEDIAN_VOTING)
var/list/myvote = voted[C.ckey]
for(var/i=1,i<=choices.len,i++)
. += "[choices[i]] "
@@ -724,7 +715,7 @@ SUBSYSTEM_DEF(vote)
voted[usr.ckey] = SSpersistence.saved_votes[usr.ckey][mode]
if(islist(voted[usr.ckey]))
var/malformed = FALSE
- if(vote_system == SCORE_VOTING || vote_system == MAJORITY_JUDGEMENT_VOTING)
+ if(vote_system == SCORE_VOTING || vote_system == HIGHEST_MEDIAN_VOTING)
for(var/thing in voted[usr.ckey])
if(!(thing in choices))
malformed = TRUE
@@ -738,7 +729,7 @@ SUBSYSTEM_DEF(vote)
to_chat(usr,"Your saved vote was malformed! Start over!")
voted -= usr.ckey
else
- if(vote_system == SCORE_VOTING || vote_system == MAJORITY_JUDGEMENT_VOTING)
+ if(vote_system == SCORE_VOTING || vote_system == HIGHEST_MEDIAN_VOTING)
submit_vote(round(text2num(href_list["vote"])),round(text2num(href_list["score"])))
else
submit_vote(round(text2num(href_list["vote"])))
diff --git a/code/datums/brain_damage/imaginary_friend.dm b/code/datums/brain_damage/imaginary_friend.dm
index e5e1434ab8..f35389f171 100644
--- a/code/datums/brain_damage/imaginary_friend.dm
+++ b/code/datums/brain_damage/imaginary_friend.dm
@@ -92,7 +92,7 @@
trauma = _trauma
owner = trauma.owner
- setup_friend()
+ INVOKE_ASYNC(src, .proc/setup_friend)
join = new
join.Grant(src)
diff --git a/code/datums/cinematic.dm b/code/datums/cinematic.dm
index 7b3081cb33..2648ae1eab 100644
--- a/code/datums/cinematic.dm
+++ b/code/datums/cinematic.dm
@@ -30,7 +30,7 @@
/datum/cinematic
var/id = CINEMATIC_DEFAULT
var/list/watching = list() //List of clients watching this
- var/list/locked = list() //Who had mob_transforming set during the cinematic
+ var/list/locked = list() //Who had mob_transforming set during the cinematic
var/is_global = FALSE //Global cinematics will override mob-specific ones
var/obj/screen/cinematic/screen
var/datum/callback/special_callback //For special effects synced with animation (explosions after the countdown etc)
@@ -45,7 +45,7 @@
if(!CC)
continue
var/client/C = CC
- //C.mob.clear_fullscreen("cinematic")
+ C.mob.clear_fullscreen("cinematic")
C.screen -= screen
watching = null
QDEL_NULL(screen)
@@ -54,7 +54,7 @@
if(!MM)
continue
var/mob/M = MM
- M.mob_transforming = FALSE
+ M.mob_transforming = FALSE
locked = null
return ..()
@@ -93,7 +93,7 @@
toggle_ooc(TRUE)
/datum/cinematic/proc/show_to(mob/M, client/C)
- //SIGNAL_HANDLER //must not wait.
+ SIGNAL_HANDLER
if(!M.mob_transforming)
locked += M
@@ -101,7 +101,7 @@
if(!C)
return
watching += C
- //M.overlay_fullscreen("cinematic",/obj/screen/fullscreen/cinematic_backdrop)
+ M.overlay_fullscreen("cinematic",/obj/screen/fullscreen/cinematic_backdrop)
C.screen += screen
//Sound helper
@@ -122,7 +122,7 @@
sleep(50)
/datum/cinematic/proc/replacement_cinematic(datum/source, datum/cinematic/other)
- //SIGNAL_HANDLER
+ SIGNAL_HANDLER
if(!is_global && other.is_global) //Allow it to play if we're local and it's global
return NONE
@@ -210,6 +210,20 @@
special()
screen.icon_state = "summary_cult"
+// /datum/cinematic/cult_fail
+// id = CINEMATIC_CULT_FAIL
+
+// /datum/cinematic/cult_fail/content()
+// screen.icon_state = "station_intact"
+// sleep(20)
+// cinematic_sound(sound('sound/creatures/narsie_rises.ogg'))
+// sleep(60)
+// cinematic_sound(sound('sound/effects/explosion_distant.ogg'))
+// sleep(10)
+// cinematic_sound(sound('sound/magic/demon_dies.ogg'))
+// sleep(30)
+// special()
+
/datum/cinematic/nuke_annihilation
id = CINEMATIC_ANNIHILATION
diff --git a/code/datums/components/combat_mode.dm b/code/datums/components/combat_mode.dm
index b9952e9133..29d90fd509 100644
--- a/code/datums/components/combat_mode.dm
+++ b/code/datums/components/combat_mode.dm
@@ -125,7 +125,7 @@
///Changes the user direction to (try) keep match the pointer.
/datum/component/combat_mode/proc/on_move(atom/movable/source, dir, atom/oldloc, forced)
var/mob/living/L = source
- if(mode_flags & COMBAT_MODE_ACTIVE && L.client && lastmousedir && lastmousedir != dir)
+ if((mode_flags & COMBAT_MODE_ACTIVE) && L.client)
L.setDir(lastmousedir, ismousemovement = TRUE)
/// Added movement delay if moving backward.
diff --git a/code/datums/components/crafting/guncrafting.dm b/code/datums/components/crafting/guncrafting.dm
index deab5e9b69..33db660c54 100644
--- a/code/datums/components/crafting/guncrafting.dm
+++ b/code/datums/components/crafting/guncrafting.dm
@@ -2,6 +2,12 @@
/obj/item/weaponcrafting
icon = 'icons/obj/improvised.dmi'
+/obj/item/weaponcrafting/receiver
+ name = "modular receiver"
+ desc = "A prototype modular receiver and trigger assembly for a firearm."
+ icon = 'icons/obj/improvised.dmi'
+ icon_state = "receiver"
+
/obj/item/weaponcrafting/stock
name = "rifle stock"
desc = "A classic rifle stock that doubles as a grip, roughly carved out of wood."
@@ -12,41 +18,3 @@
name = "wound thread"
desc = "A long piece of thread with some resemblance to cable coil."
icon_state = "durastring"
-
-////////////////////////////////
-// IMPROVISED WEAPON PARTS//
-////////////////////////////////
-
-/obj/item/weaponcrafting/improvised_parts
- name = "Debug Improvised Gun Part"
- desc = "A badly coded gun part. You should report coders if you see this."
- icon = 'icons/obj/guns/gun_parts.dmi'
- icon_state = "palette"
-
-// RECEIVERS
-
-/obj/item/weaponcrafting/improvised_parts/rifle_receiver
- name = "rifle receiver"
- desc = "A crudely constructed receiver to create an improvised bolt-action breechloaded rifle." // removed some text implying that the item had more uses than it does
- icon_state = "receiver_rifle"
- w_class = WEIGHT_CLASS_SMALL
-
-
-/obj/item/weaponcrafting/improvised_parts/shotgun_receiver
- name = "shotgun reciever"
- desc = "An improvised receiver to create a break-action breechloaded shotgun." // removed some text implying that the item had more uses than it does
- icon_state = "receiver_shotgun"
- w_class = WEIGHT_CLASS_SMALL
-
-// MISC
-
-/obj/item/weaponcrafting/improvised_parts/trigger_assembly
- name = "firearm trigger assembly"
- desc = "A modular trigger assembly with a firing pin, this can be used to make a whole bunch of improvised firearss."
- icon_state = "trigger_assembly"
- w_class = WEIGHT_CLASS_SMALL
-
-/obj/item/weaponcrafting/improvised_parts/wooden_body
- name = "wooden firearm body"
- desc = "A crudely fashioned wooden body to help keep higher calibre improvised weapons from blowing themselves apart."
- icon_state = "wooden_body"
diff --git a/code/datums/components/crafting/recipes/recipes_misc.dm b/code/datums/components/crafting/recipes/recipes_misc.dm
index 14987bac44..1f4a47c474 100644
--- a/code/datums/components/crafting/recipes/recipes_misc.dm
+++ b/code/datums/components/crafting/recipes/recipes_misc.dm
@@ -172,11 +172,11 @@
///////////////////
/datum/crafting_recipe/upgraded_gauze
- name = "Improved Gauze"
+ name = "Sterilized Gauze"
result = /obj/item/stack/medical/gauze/adv/one
time = 1
reqs = list(/obj/item/stack/medical/gauze = 1,
- /datum/reagent/space_cleaner/sterilizine = 10)
+ /datum/reagent/space_cleaner/sterilizine = 5)
category = CAT_MISC
subcategory = CAT_TOOL
@@ -184,7 +184,7 @@
name = "Suture Pack"
result = /obj/item/stack/medical/suture/five
time = 1
- reqs = list(/obj/item/stack/medical/gauze = 1,
+ reqs = list(/obj/item/stack/medical/gauze/adv = 1,
/datum/reagent/medicine/styptic_powder = 10)
category = CAT_MISC
subcategory = CAT_TOOL
@@ -193,7 +193,7 @@
name = "Regenerative Mesh"
result = /obj/item/stack/medical/mesh/five
time = 1
- reqs = list(/obj/item/stack/medical/gauze = 1,
+ reqs = list(/obj/item/stack/medical/gauze/adv = 1,
/datum/reagent/medicine/silver_sulfadiazine = 10)
category = CAT_MISC
subcategory = CAT_TOOL
diff --git a/code/datums/components/crafting/recipes/recipes_weapon_and_ammo.dm b/code/datums/components/crafting/recipes/recipes_weapon_and_ammo.dm
index 6786f0c0f7..0135cab77f 100644
--- a/code/datums/components/crafting/recipes/recipes_weapon_and_ammo.dm
+++ b/code/datums/components/crafting/recipes/recipes_weapon_and_ammo.dm
@@ -297,30 +297,15 @@
/datum/crafting_recipe/ishotgun
name = "Improvised Shotgun"
result = /obj/item/gun/ballistic/revolver/doublebarrel/improvised
- reqs = list(/obj/item/pipe = 2, // putting a large amount of meaningless timegates by forcing people to turn base resources into upgraded resources kinda sucks
- /obj/item/weaponcrafting/improvised_parts/shotgun_receiver = 1,
- /obj/item/weaponcrafting/improvised_parts/trigger_assembly = 1,
- /obj/item/weaponcrafting/improvised_parts/wooden_body = 1,
- /obj/item/weaponcrafting/stock = 1,
- /obj/item/stack/packageWrap = 5)
- tools = list(TOOL_SCREWDRIVER)
- time = 100
- category = CAT_WEAPONRY
- subcategory = CAT_WEAPON
-
-/datum/crafting_recipe/irifle // larger and less versatile gun, but a bit easier to make
- name = "Improvised Rifle (7.62mm)"
- result = /obj/item/gun/ballistic/shotgun/boltaction/improvised
- reqs = list(/obj/item/pipe = 2, // above
- /obj/item/weaponcrafting/improvised_parts/rifle_receiver = 1,
- /obj/item/weaponcrafting/improvised_parts/trigger_assembly = 1,
- /obj/item/weaponcrafting/improvised_parts/wooden_body = 1,
+ reqs = list(/obj/item/pipe = 1,
+ /obj/item/weaponcrafting/receiver = 1,
/obj/item/weaponcrafting/stock = 1,
/obj/item/stack/packageWrap = 5)
tools = list(TOOL_SCREWDRIVER)
time = 100
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
+//the Improvised Rifle will not be missed. Rest in Pieces 2019-2021
//////////////////
///AMMO CRAFTING//
@@ -449,38 +434,6 @@
// PARTS CRAFTING //
////////////////////
-// RECEIVERS
-
-/datum/crafting_recipe/rifle_receiver
- name = "Improvised Rifle Receiver"
- result = /obj/item/weaponcrafting/improvised_parts/rifle_receiver
- reqs = list(/obj/item/stack/sheet/metal = 15)
- tools = list(TOOL_SCREWDRIVER, TOOL_WELDER)
- time = 25
- category = CAT_WEAPONRY
- subcategory = CAT_PARTS
-
-/datum/crafting_recipe/shotgun_receiver
- name = "Improvised Shotgun Receiver"
- result = /obj/item/weaponcrafting/improvised_parts/shotgun_receiver
- reqs = list(/obj/item/stack/sheet/metal = 10) // shotgun does less damage than the rifle and can't 1shot but is more portable
- tools = list(TOOL_SCREWDRIVER, TOOL_WELDER)
- time = 20
- category = CAT_WEAPONRY
- subcategory = CAT_PARTS
-
-// MISC
-
-/datum/crafting_recipe/trigger_assembly
- name = "Trigger Assembly"
- result = /obj/item/weaponcrafting/improvised_parts/trigger_assembly
- reqs = list(/obj/item/stack/sheet/metal = 3,
- /obj/item/assembly/igniter = 1)
- tools = list(TOOL_SCREWDRIVER, TOOL_WELDER)
- time = 20
- category = CAT_WEAPONRY
- subcategory = CAT_PARTS
-
// BOKKEN CRAFTING
/datum/crafting_recipe/bokken_blade
diff --git a/code/datums/components/footstep.dm b/code/datums/components/footstep.dm
index f767c607a5..8b326ac424 100644
--- a/code/datums/components/footstep.dm
+++ b/code/datums/components/footstep.dm
@@ -46,7 +46,7 @@
var/mob/living/LM = parent
if(!T.footstep || LM.buckled || !CHECK_MOBILITY(LM, MOBILITY_STAND) || LM.buckled || LM.throwing || (LM.movement_type & (VENTCRAWLING | FLYING)))
if (LM.lying && !LM.buckled && !(!T.footstep || LM.movement_type & (VENTCRAWLING | FLYING))) //play crawling sound if we're lying
- playsound(T, 'sound/effects/footstep/crawl1.ogg', 15 * volume)
+ playsound(T, 'sound/effects/footstep/crawl1.ogg', 15 * volume, falloff_distance = 1)
return
if(HAS_TRAIT(LM, TRAIT_SILENT_STEP))
@@ -75,7 +75,7 @@
if(!T)
return
if(isfile(footstep_sounds) || istext(footstep_sounds))
- playsound(T, footstep_sounds, volume)
+ playsound(T, footstep_sounds, volume, falloff_distance = 1)
return
var/turf_footstep
switch(footstep_type)
@@ -89,7 +89,7 @@
turf_footstep = T.footstep
if(!turf_footstep)
return
- playsound(T, pick(footstep_sounds[turf_footstep][1]), footstep_sounds[turf_footstep][2] * volume, TRUE, footstep_sounds[turf_footstep][3] + e_range)
+ playsound(T, pick(footstep_sounds[turf_footstep][1]), footstep_sounds[turf_footstep][2] * volume, TRUE, footstep_sounds[turf_footstep][3] + e_range, falloff_distance = 1)
/datum/component/footstep/proc/play_humanstep()
var/turf/open/T = prepare_step()
@@ -114,10 +114,10 @@
turf_footstep = T.footstep
L = GLOB.footstep
if(FOOTSTEP_MOB_SLIME)
- playsound(T, 'sound/effects/footstep/slime1.ogg', 50 * volume)
+ playsound(T, 'sound/effects/footstep/slime1.ogg', 50 * volume, falloff_distance = 1)
return
if(FOOTSTEP_MOB_CRAWL)
- playsound(T, 'sound/effects/footstep/crawl1.ogg', 50 * volume)
+ playsound(T, 'sound/effects/footstep/crawl1.ogg', 50 * volume, falloff_distance = 1)
return
special = TRUE
else
@@ -126,13 +126,13 @@
playsound(T, pick(GLOB.footstep[T.footstep][1]),
GLOB.footstep[T.footstep][2] * volume,
TRUE,
- GLOB.footstep[T.footstep][3] + e_range)
+ GLOB.footstep[T.footstep][3] + e_range, falloff_distance = 1)
return
if(!special && H.dna.species.special_step_sounds)
- playsound(T, pick(H.dna.species.special_step_sounds), 50, TRUE)
+ playsound(T, pick(H.dna.species.special_step_sounds), 50, TRUE, falloff_distance = 1)
else
playsound(T, pick(L[turf_footstep][1]),
L[turf_footstep][2] * volume,
TRUE,
- L[turf_footstep][3] + e_range)
+ L[turf_footstep][3] + e_range, falloff_distance = 1)
diff --git a/code/datums/components/riding.dm b/code/datums/components/riding.dm
index 03f3820a9b..e9aa5afe92 100644
--- a/code/datums/components/riding.dm
+++ b/code/datums/components/riding.dm
@@ -36,15 +36,15 @@
if(del_on_unbuckle_all && !AM.has_buckled_mobs())
qdel(src)
-/datum/component/riding/proc/vehicle_mob_buckle(datum/source, mob/living/M, force = FALSE)
+/datum/component/riding/proc/vehicle_mob_buckle(datum/source, mob/living/M, force)
handle_vehicle_offsets()
-/datum/component/riding/proc/handle_vehicle_layer()
+/datum/component/riding/proc/handle_vehicle_layer(dir)
var/atom/movable/AM = parent
var/static/list/defaults = list(TEXT_NORTH = OBJ_LAYER, TEXT_SOUTH = ABOVE_MOB_LAYER, TEXT_EAST = ABOVE_MOB_LAYER, TEXT_WEST = ABOVE_MOB_LAYER)
- . = defaults["[AM.dir]"]
- if(directional_vehicle_layers["[AM.dir]"])
- . = directional_vehicle_layers["[AM.dir]"]
+ . = defaults["[dir]"]
+ if(directional_vehicle_layers["[dir]"])
+ . = directional_vehicle_layers["[dir]"]
if(isnull(.)) //you can set it to null to not change it.
. = AM.layer
AM.layer = .
@@ -52,12 +52,17 @@
/datum/component/riding/proc/set_vehicle_dir_layer(dir, layer)
directional_vehicle_layers["[dir]"] = layer
-/datum/component/riding/proc/vehicle_moved(datum/source)
+/datum/component/riding/proc/vehicle_moved(datum/source, oldLoc, dir)
+ SIGNAL_HANDLER
+
var/atom/movable/AM = parent
+ if (isnull(dir))
+ dir = AM.dir
+ AM.set_glide_size(DELAY_TO_GLIDE_SIZE(vehicle_move_delay), FALSE)
for(var/i in AM.buckled_mobs)
ride_check(i)
- handle_vehicle_offsets()
- handle_vehicle_layer()
+ handle_vehicle_offsets(dir)
+ handle_vehicle_layer(dir)
/datum/component/riding/proc/ride_check(mob/living/M)
var/atom/movable/AM = parent
@@ -74,9 +79,9 @@
/datum/component/riding/proc/additional_offset_checks()
return TRUE
-/datum/component/riding/proc/handle_vehicle_offsets()
+/datum/component/riding/proc/handle_vehicle_offsets(dir)
var/atom/movable/AM = parent
- var/AM_dir = "[AM.dir]"
+ var/AM_dir = "[dir]"
var/passindex = 0
if(AM.has_buckled_mobs())
for(var/m in AM.buckled_mobs)
@@ -177,8 +182,8 @@
else
last_move_diagonal = FALSE
- handle_vehicle_offsets()
- handle_vehicle_layer()
+ handle_vehicle_offsets(direction)
+ handle_vehicle_layer(direction)
else
to_chat(user, "You'll need the keys in one of your hands to [drive_verb] [AM]. ")
diff --git a/code/datums/components/squeak.dm b/code/datums/components/squeak.dm
index 0552a791ea..a285b7d3f2 100644
--- a/code/datums/components/squeak.dm
+++ b/code/datums/components/squeak.dm
@@ -19,7 +19,14 @@
/// chance we'll be stopped from squeaking by cooldown when something crossing us squeaks
var/cross_squeak_delay_chance = 33 // about 3 things can squeak at a time
-/datum/component/squeak/Initialize(custom_sounds, volume_override, chance_override, step_delay_override, use_delay_override)
+ ///extra-range for this component's sound
+ var/sound_extra_range = -1
+ ///when sounds start falling off for the squeak
+ var/sound_falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE
+ ///sound exponent for squeak. Defaults to 10 as squeaking is loud and annoying enough.
+ var/sound_falloff_exponent = 10
+
+/datum/component/squeak/Initialize(custom_sounds, volume_override, chance_override, step_delay_override, use_delay_override, extrarange, falloff_exponent, fallof_distance)
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY), .proc/play_squeak)
@@ -45,6 +52,12 @@
step_delay = step_delay_override
if(isnum(use_delay_override))
use_delay = use_delay_override
+ if(isnum(extrarange))
+ sound_extra_range = extrarange
+ if(isnum(falloff_exponent))
+ sound_falloff_exponent = falloff_exponent
+ if(isnum(fallof_distance))
+ sound_falloff_distance = fallof_distance
/datum/component/squeak/UnregisterFromParent()
if(!isatom(parent))
@@ -62,6 +75,7 @@
return ..()
/datum/component/squeak/proc/play_squeak()
+ SIGNAL_HANDLER
do_play_squeak()
/datum/component/squeak/proc/do_play_squeak(bypass_cooldown = FALSE)
@@ -69,14 +83,16 @@
return FALSE
if(prob(squeak_chance))
if(!override_squeak_sounds)
- playsound(parent, pickweight(default_squeak_sounds), volume, 1, -1)
+ playsound(parent, pickweight(default_squeak_sounds), volume, TRUE, sound_extra_range, sound_falloff_exponent, falloff_distance = sound_falloff_distance)
else
- playsound(parent, pickweight(override_squeak_sounds), volume, 1, -1)
+ playsound(parent, pickweight(override_squeak_sounds), volume, TRUE, sound_extra_range, sound_falloff_exponent, falloff_distance = sound_falloff_distance)
last_squeak = world.time
return TRUE
return FALSE
/datum/component/squeak/proc/step_squeak()
+ SIGNAL_HANDLER
+
if(steps > step_delay)
do_play_squeak(TRUE)
steps = 0
@@ -84,20 +100,22 @@
steps++
/datum/component/squeak/proc/play_squeak_crossed(datum/source, atom/movable/AM)
+ SIGNAL_HANDLER
+
if(isitem(AM))
var/obj/item/I = AM
if(I.item_flags & ABSTRACT)
return
- else if(istype(AM, /obj/item/projectile))
- var/obj/item/projectile/P = AM
- if(P.original != parent)
- return
+ if(AM.movement_type & (FLYING|FLOATING) || !AM.has_gravity())
+ return
var/atom/current_parent = parent
if(isturf(current_parent.loc))
if(do_play_squeak())
SEND_SIGNAL(AM, COMSIG_CROSS_SQUEAKED)
/datum/component/squeak/proc/use_squeak()
+ SIGNAL_HANDLER
+
if(last_use + use_delay < world.time)
last_use = world.time
play_squeak()
@@ -118,6 +136,8 @@
RegisterSignal(holder, COMSIG_ATOM_DIR_CHANGE, .proc/holder_dir_change)
/datum/component/squeak/proc/holder_dir_change(datum/source, old_dir, new_dir)
+ SIGNAL_HANDLER
+
//If the dir changes it means we're going through a bend in the pipes, let's pretend we bumped the wall
if(old_dir != new_dir)
play_squeak()
diff --git a/code/datums/datum.dm b/code/datums/datum.dm
index d11532a883..42580425ce 100644
--- a/code/datums/datum.dm
+++ b/code/datums/datum.dm
@@ -77,21 +77,21 @@
/**
- * Default implementation of clean-up code.
- *
- * This should be overridden to remove all references pointing to the object being destroyed, if
- * you do override it, make sure to call the parent and return it's return value by default
- *
- * Return an appropriate [QDEL_HINT][QDEL_HINT_QUEUE] to modify handling of your deletion;
- * in most cases this is [QDEL_HINT_QUEUE].
- *
- * The base case is responsible for doing the following
- * * Erasing timers pointing to this datum
- * * Erasing compenents on this datum
- * * Notifying datums listening to signals from this datum that we are going away
- *
- * Returns [QDEL_HINT_QUEUE]
- */
+ * Default implementation of clean-up code.
+ *
+ * This should be overridden to remove all references pointing to the object being destroyed, if
+ * you do override it, make sure to call the parent and return it's return value by default
+ *
+ * Return an appropriate [QDEL_HINT][QDEL_HINT_QUEUE] to modify handling of your deletion;
+ * in most cases this is [QDEL_HINT_QUEUE].
+ *
+ * The base case is responsible for doing the following
+ * * Erasing timers pointing to this datum
+ * * Erasing compenents on this datum
+ * * Notifying datums listening to signals from this datum that we are going away
+ *
+ * Returns [QDEL_HINT_QUEUE]
+ */
/datum/proc/Destroy(force=FALSE, ...)
SHOULD_CALL_PARENT(TRUE)
tag = null
@@ -138,8 +138,6 @@
UnregisterSignal(target, signal_procs[target])
//END: ECS SHIT
- SSsounds.free_datum_channels(src) //?? (not on tg)
-
return QDEL_HINT_QUEUE
#ifdef DATUMVAR_DEBUGGING_MODE
diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm
index a91549ab4c..0bb803ddb3 100644
--- a/code/datums/datumvars.dm
+++ b/code/datums/datumvars.dm
@@ -4,7 +4,7 @@
/datum/proc/can_vv_get(var_name)
return TRUE
-/datum/proc/vv_edit_var(var_name, var_value) //called whenever a var is edited
+/datum/proc/vv_edit_var(var_name, var_value, massedit) //called whenever a var is edited
if(var_name == NAMEOF(src, vars))
return FALSE
vars[var_name] = var_value
diff --git a/code/datums/diseases/heart_failure.dm b/code/datums/diseases/heart_failure.dm
index aabb9ed144..952ce4f18d 100644
--- a/code/datums/diseases/heart_failure.dm
+++ b/code/datums/diseases/heart_failure.dm
@@ -37,7 +37,7 @@
to_chat(H, "You feel [pick("full", "nauseated", "sweaty", "weak", "tired", "short on breath", "uneasy")]. ")
if(3 to 4)
if(!sound)
- H.playsound_local(H, 'sound/health/slowbeat.ogg',40,0, channel = CHANNEL_HEARTBEAT)
+ H.playsound_local(H, 'sound/health/slowbeat.ogg', 40, FALSE, channel = CHANNEL_HEARTBEAT)
sound = TRUE
if(prob(3))
to_chat(H, "You feel a sharp pain in your chest! ")
@@ -53,7 +53,7 @@
H.emote("cough")
if(5)
H.stop_sound_channel(CHANNEL_HEARTBEAT)
- H.playsound_local(H, 'sound/effects/singlebeat.ogg', 100, 0)
+ H.playsound_local(H, 'sound/effects/singlebeat.ogg', 100, FALSE)
if(H.stat == CONSCIOUS)
H.visible_message("[H] clutches at [H.p_their()] chest as if [H.p_their()] heart is stopping! ")
H.adjustStaminaLoss(60)
diff --git a/code/datums/elements/bed_tucking.dm b/code/datums/elements/bed_tucking.dm
index 602c93fab3..4a498b2ed8 100644
--- a/code/datums/elements/bed_tucking.dm
+++ b/code/datums/elements/bed_tucking.dm
@@ -57,4 +57,4 @@
tucked.transform = turn(tucked.transform, -rotation_degree)
- UnregisterSignal(tucked, COMSIG_ITEM_PICKUP)
\ No newline at end of file
+ UnregisterSignal(tucked, COMSIG_ITEM_PICKUP)
diff --git a/code/datums/explosion.dm b/code/datums/explosion.dm
index ca65186063..36ca035be9 100644
--- a/code/datums/explosion.dm
+++ b/code/datums/explosion.dm
@@ -33,6 +33,14 @@ GLOBAL_LIST_EMPTY(explosions)
EX_PREPROCESS_EXIT_CHECK\
}
+#define CREAK_DELAY 5 SECONDS //Time taken for the creak to play after explosion, if applicable.
+#define FAR_UPPER 60 //Upper limit for the far_volume, distance, clamped.
+#define FAR_LOWER 40 //lower limit for the far_volume, distance, clamped.
+#define PROB_SOUND 75 //The probability modifier for a sound to be an echo, or a far sound. (0-100)
+#define SHAKE_CLAMP 2.5 //The limit for how much the camera can shake for out of view booms.
+#define FREQ_UPPER 40 //The upper limit for the randomly selected frequency.
+#define FREQ_LOWER 25 //The lower of the above.
+
/datum/explosion/New(atom/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog, ignorecap, flame_range, silent, smoke)
set waitfor = FALSE
@@ -89,7 +97,7 @@ GLOBAL_LIST_EMPTY(explosions)
if(adminlog)
message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range], [flame_range]) in [ADMIN_VERBOSEJMP(epicenter)]")
log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range], [flame_range]) in [loc_name(epicenter)]")
-
+
deadchat_broadcast("An explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range], [flame_range]) has occured at ([get_area(epicenter)]) ", turf_target = get_turf(epicenter))
var/x0 = epicenter.x
@@ -115,13 +123,14 @@ GLOBAL_LIST_EMPTY(explosions)
var/sound/creaking_explosion_sound = sound(get_sfx("explosion_creaking"))
var/sound/hull_creaking_sound = sound(get_sfx("hull_creaking"))
var/sound/explosion_echo_sound = sound('sound/effects/explosion_distant.ogg')
- var/on_station = SSmapping.level_trait(epicenter.z, ZTRAIT_STATION)
+ var/on_station = SSmapping.level_trait(epicenter.z, ZTRAIT_STATION)
var/creaking_explosion = FALSE
if(prob(devastation_range*30+heavy_impact_range*5) && on_station) // Huge explosions are near guaranteed to make the station creak and whine, smaller ones might.
creaking_explosion = TRUE // prob over 100 always returns true
- for(var/mob/M in GLOB.player_list)
+ for(var/MN in GLOB.player_list)
+ var/mob/M = MN
// Double check for client
var/turf/M_turf = get_turf(M)
if(M_turf && M_turf.z == z0)
@@ -131,15 +140,15 @@ GLOBAL_LIST_EMPTY(explosions)
baseshakeamount = sqrt((orig_max_distance - dist)*0.1)
// If inside the blast radius + world.view - 2
if(dist <= round(max_range + world.view - 2, 1))
- M.playsound_local(epicenter, null, 100, 1, frequency, falloff = 5, S = explosion_sound)
+ M.playsound_local(epicenter, null, 100, 1, frequency, S = explosion_sound)
if(baseshakeamount > 0)
shake_camera(M, 25, clamp(baseshakeamount, 0, 10))
// You hear a far explosion if you're outside the blast radius. Small bombs shouldn't be heard all over the station.
else if(dist <= far_dist)
- var/far_volume = clamp(far_dist/2, 40, 60) // Volume is based on explosion size and dist
+ var/far_volume = clamp(far_dist/2, FAR_LOWER, FAR_UPPER) // Volume is based on explosion size and dist
if(creaking_explosion)
M.playsound_local(epicenter, null, far_volume, 1, frequency, S = creaking_explosion_sound, distance_multiplier = 0)
- else if(prob(75))
+ else if(prob(PROB_SOUND)) // Sound variety during meteor storm/tesloose/other bad event
M.playsound_local(epicenter, null, far_volume, 1, frequency, S = far_explosion_sound, distance_multiplier = 0) // Far sound
else
M.playsound_local(epicenter, null, far_volume, 1, frequency, S = explosion_echo_sound, distance_multiplier = 0) // Echo sound
@@ -147,18 +156,18 @@ GLOBAL_LIST_EMPTY(explosions)
if(baseshakeamount > 0 || devastation_range)
if(!baseshakeamount) // Devastating explosions rock the station and ground
baseshakeamount = devastation_range*3
- shake_camera(M, 10, clamp(baseshakeamount*0.25, 0, 2.5))
-
- else if(M.can_hear() && !isspaceturf(get_turf(M)) && heavy_impact_range) // Big enough explosions echo throughout the hull
+ shake_camera(M, 10, clamp(baseshakeamount*0.25, 0, SHAKE_CLAMP))
+ else if(!isspaceturf(get_turf(M)) && heavy_impact_range) // Big enough explosions echo throughout the hull
var/echo_volume = 40
if(devastation_range)
baseshakeamount = devastation_range
- shake_camera(M, 10, clamp(baseshakeamount*0.25, 0, 2.5))
+ shake_camera(M, 10, clamp(baseshakeamount*0.25, 0, SHAKE_CLAMP))
echo_volume = 60
M.playsound_local(epicenter, null, echo_volume, 1, frequency, S = explosion_echo_sound, distance_multiplier = 0)
if(creaking_explosion) // 5 seconds after the bang, the station begins to creak
- addtimer(CALLBACK(M, /mob/proc/playsound_local, epicenter, null, rand(25, 40), 1, frequency, null, null, FALSE, hull_creaking_sound, null, null, null, null, 0), 5 SECONDS)
+ addtimer(CALLBACK(M, /mob/proc/playsound_local, epicenter, null, rand(FREQ_LOWER, FREQ_UPPER), 1, frequency, null, null, FALSE, hull_creaking_sound, 0), CREAK_DELAY)
+
EX_PREPROCESS_CHECK_TICK
//postpone processing for a bit
@@ -316,6 +325,14 @@ GLOBAL_LIST_EMPTY(explosions)
++stopped
qdel(src)
+#undef CREAK_DELAY
+#undef FAR_UPPER
+#undef FAR_LOWER
+#undef PROB_SOUND
+#undef SHAKE_CLAMP
+#undef FREQ_UPPER
+#undef FREQ_LOWER
+
#undef EX_PREPROCESS_EXIT_CHECK
#undef EX_PREPROCESS_CHECK_TICK
diff --git a/code/datums/holocall.dm b/code/datums/holocall.dm
index 4bf02e8587..c54f6c971a 100644
--- a/code/datums/holocall.dm
+++ b/code/datums/holocall.dm
@@ -237,7 +237,7 @@
/obj/item/disk/holodisk/Initialize(mapload)
. = ..()
if(preset_record_text)
- build_record()
+ INVOKE_ASYNC(src, .proc/build_record)
/obj/item/disk/holodisk/Destroy()
QDEL_NULL(record)
@@ -425,42 +425,42 @@
"}
/obj/item/disk/holodisk/ruin/snowengieruin
- name = "Blackbox Print-out #EB412"
- desc = "A holodisk containing the last moments of EB412. There's a bloody fingerprint on it."
- preset_image_type = /datum/preset_holoimage/engineer
- preset_record_text = {"
- NAME Dave Tundrale
- SAY Maria, how's Build?
- DELAY 10
- NAME Maria Dell
- PRESET /datum/preset_holoimage/engineer/atmos
- SAY It's fine, don't worry. I've got Plastic on it. And frankly, i'm kinda busy with, the, uhhm, incinerator.
- DELAY 30
- NAME Dave Tundrale
- PRESET /datum/preset_holoimage/engineer
- SAY Aight, wonderful. The science mans been kinda shit though. No RCDs-
- DELAY 20
- NAME Maria Dell
- PRESET /datum/preset_holoimage/engineer/atmos
- SAY Enough about your RCDs. They're not even that important, just bui-
- DELAY 15
- SOUND explosion
- DELAY 10
- SAY Oh, shit!
- DELAY 10
- PRESET /datum/preset_holoimage/engineer/atmos/rig
- LANGUAGE /datum/language/narsie
- NAME Unknown
- SAY RISE, MY LORD!!
- DELAY 10
- LANGUAGE /datum/language/common
- NAME Plastic
- PRESET /datum/preset_holoimage/engineer/rig
- SAY Fuck, fuck, fuck!
- DELAY 20
- SAY It's loose! CALL THE FUCKING SHUTT-
- DELAY 10
- PRESET /datum/preset_holoimage/corgi
- NAME Blackbox Automated Message
- SAY Connection lost. Dumping audio logs to disk.
- DELAY 50"}
+ name = "Blackbox Print-out #EB412"
+ desc = "A holodisk containing the last moments of EB412. There's a bloody fingerprint on it."
+ preset_image_type = /datum/preset_holoimage/engineer
+ preset_record_text = {"
+ NAME Dave Tundrale
+ SAY Maria, how's Build?
+ DELAY 10
+ NAME Maria Dell
+ PRESET /datum/preset_holoimage/engineer/atmos
+ SAY It's fine, don't worry. I've got Plastic on it. And frankly, i'm kinda busy with, the, uhhm, incinerator.
+ DELAY 30
+ NAME Dave Tundrale
+ PRESET /datum/preset_holoimage/engineer
+ SAY Aight, wonderful. The science mans been kinda shit though. No RCDs-
+ DELAY 20
+ NAME Maria Dell
+ PRESET /datum/preset_holoimage/engineer/atmos
+ SAY Enough about your RCDs. They're not even that important, just bui-
+ DELAY 15
+ SOUND explosion
+ DELAY 10
+ SAY Oh, shit!
+ DELAY 10
+ PRESET /datum/preset_holoimage/engineer/atmos/rig
+ LANGUAGE /datum/language/narsie
+ NAME Unknown
+ SAY RISE, MY LORD!!
+ DELAY 10
+ LANGUAGE /datum/language/common
+ NAME Plastic
+ PRESET /datum/preset_holoimage/engineer/rig
+ SAY Fuck, fuck, fuck!
+ DELAY 20
+ SAY It's loose! CALL THE FUCKING SHUTT-
+ DELAY 10
+ PRESET /datum/preset_holoimage/corgi
+ NAME Blackbox Automated Message
+ SAY Connection lost. Dumping audio logs to disk.
+ DELAY 50"}
diff --git a/code/datums/looping_sounds/_looping_sound.dm b/code/datums/looping_sounds/_looping_sound.dm
index 8bee4f3d1c..6af3b3c993 100644
--- a/code/datums/looping_sounds/_looping_sound.dm
+++ b/code/datums/looping_sounds/_looping_sound.dm
@@ -18,8 +18,12 @@
var/list/atom/output_atoms
var/mid_sounds
var/mid_length
+ ///Override for volume of start sound
+ var/start_volume
var/start_sound
var/start_length
+ ///Override for volume of end sound
+ var/end_volume
var/end_sound
var/chance
var/volume = 100
@@ -27,10 +31,9 @@
var/max_loops
var/direct
var/extra_range = 0
- var/falloff
-
+ var/falloff_exponent
var/timerid
- var/init_timerid
+ var/falloff_distance
/datum/looping_sound/New(list/_output_atoms=list(), start_immediately=FALSE, _direct=FALSE)
if(!mid_sounds)
@@ -51,16 +54,13 @@
/datum/looping_sound/proc/start(atom/add_thing)
if(add_thing)
output_atoms |= add_thing
- if(timerid || init_timerid)
+ if(timerid)
return
on_start()
/datum/looping_sound/proc/stop(atom/remove_thing)
if(remove_thing)
output_atoms -= remove_thing
- if(init_timerid)
- deltimer(init_timerid)
- init_timerid = null
if(!timerid)
return
on_stop()
@@ -76,18 +76,18 @@
if(!timerid)
timerid = addtimer(CALLBACK(src, .proc/sound_loop, world.time), mid_length, TIMER_CLIENT_TIME | TIMER_STOPPABLE | TIMER_LOOP)
-/datum/looping_sound/proc/play(soundfile)
+/datum/looping_sound/proc/play(soundfile, volume_override)
var/list/atoms_cache = output_atoms
var/sound/S = sound(soundfile)
if(direct)
S.channel = SSsounds.random_available_channel()
- S.volume = volume
+ S.volume = volume_override || volume //Use volume as fallback if theres no override
for(var/i in 1 to atoms_cache.len)
var/atom/thing = atoms_cache[i]
if(direct)
SEND_SOUND(thing, S)
else
- playsound(thing, S, volume, vary, extra_range, falloff)
+ playsound(thing, S, volume, vary, extra_range, falloff_exponent = falloff_exponent, falloff_distance = falloff_distance)
/datum/looping_sound/proc/get_sound(starttime, _mid_sounds)
. = _mid_sounds || mid_sounds
@@ -97,10 +97,10 @@
/datum/looping_sound/proc/on_start()
var/start_wait = 0
if(start_sound)
- play(start_sound)
+ play(start_sound, start_volume)
start_wait = start_length
- init_timerid = addtimer(CALLBACK(src, .proc/sound_loop), start_wait, TIMER_CLIENT_TIME | TIMER_STOPPABLE)
+ addtimer(CALLBACK(src, .proc/sound_loop), start_wait, TIMER_CLIENT_TIME)
/datum/looping_sound/proc/on_stop()
if(end_sound)
- play(end_sound)
+ play(end_sound, end_volume)
diff --git a/code/datums/looping_sounds/machinery_sounds.dm b/code/datums/looping_sounds/machinery_sounds.dm
index 4f6996bfdd..f7a3b46118 100644
--- a/code/datums/looping_sounds/machinery_sounds.dm
+++ b/code/datums/looping_sounds/machinery_sounds.dm
@@ -4,7 +4,7 @@
mid_sounds = list('sound/machines/shower/shower_mid1.ogg'=1,'sound/machines/shower/shower_mid2.ogg'=1,'sound/machines/shower/shower_mid3.ogg'=1)
mid_length = 10
end_sound = 'sound/machines/shower/shower_end.ogg'
- volume = 10
+ volume = 20
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -12,6 +12,28 @@
mid_sounds = list('sound/machines/sm/supermatter1.ogg'=1,'sound/machines/sm/supermatter2.ogg'=1,'sound/machines/sm/supermatter3.ogg'=1)
mid_length = 10
volume = 1
+ extra_range = 25
+ falloff_exponent = 10
+ falloff_distance = 5
+ vary = TRUE
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/datum/looping_sound/destabilized_crystal
+ mid_sounds = list('sound/machines/sm/loops/delamming.ogg' = 1)
+ mid_length = 60
+ volume = 55
+ extra_range = 15
+ vary = TRUE
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+// /datum/looping_sound/hypertorus
+// mid_sounds = list('sound/machines/hypertorus/loops/hypertorus_nominal.ogg' = 1)
+// mid_length = 60
+// volume = 55
+// extra_range = 15
+// vary = TRUE
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -32,7 +54,22 @@
mid_sounds = list('sound/machines/fryer/deep_fryer_1.ogg' = 1, 'sound/machines/fryer/deep_fryer_2.ogg' = 1)
mid_length = 2
end_sound = 'sound/machines/fryer/deep_fryer_emerge.ogg'
- volume = 5
+ volume = 15
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+/datum/looping_sound/grill
+ mid_sounds = list('sound/machines/grill/grillsizzle.ogg' = 1)
+ mid_length = 18
+ volume = 50
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/datum/looping_sound/deep_fryer
+ mid_length = 2
+ mid_sounds = list('sound/machines/fryer/deep_fryer_1.ogg' = 1, 'sound/machines/fryer/deep_fryer_2.ogg' = 1)
+ volume = 30
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -46,9 +83,39 @@
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-/datum/looping_sound/grill
- mid_length = 2
- mid_sounds = list('sound/machines/fryer/deep_fryer_1.ogg' = 1, 'sound/machines/fryer/deep_fryer_2.ogg' = 1)
- volume = 10
+// /datum/looping_sound/jackpot
+// mid_length = 11
+// mid_sounds = list('sound/machines/roulettejackpot.ogg')
+// volume = 85
+// vary = TRUE
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+/*
+/datum/looping_sound/server
+ mid_sounds = list('sound/machines/tcomms/tcomms_mid1.ogg'=1,'sound/machines/tcomms/tcomms_mid2.ogg'=1,'sound/machines/tcomms/tcomms_mid3.ogg'=1,'sound/machines/tcomms/tcomms_mid4.ogg'=1,\
+ 'sound/machines/tcomms/tcomms_mid5.ogg'=1,'sound/machines/tcomms/tcomms_mid6.ogg'=1,'sound/machines/tcomms/tcomms_mid7.ogg'=1)
+ mid_length = 1.8 SECONDS
+ extra_range = -11
+ falloff_distance = 1
+ falloff_exponent = 5
+ volume = 50
+*/
+// /datum/looping_sound/computer
+// start_sound = 'sound/machines/computer/computer_start.ogg'
+// start_length = 7.2 SECONDS
+// start_volume = 10
+// mid_sounds = list('sound/machines/computer/computer_mid1.ogg'=1, 'sound/machines/computer/computer_mid2.ogg'=1)
+// mid_length = 1.8 SECONDS
+// end_sound = 'sound/machines/computer/computer_end.ogg'
+// end_volume = 10
+// volume = 2
+// falloff_exponent = 5 //Ultra quiet very fast
+// extra_range = -12
+// falloff_distance = 1 //Instant falloff after initial tile
+
+// /datum/looping_sound/gravgen
+// mid_sounds = list('sound/machines/gravgen/gravgen_mid1.ogg'=1,'sound/machines/gravgen/gravgen_mid2.ogg'=1,'sound/machines/gravgen/gravgen_mid3.ogg'=1,'sound/machines/gravgen/gravgen_mid4.ogg'=1,)
+// mid_length = 1.8 SECONDS
+// extra_range = 10
+// volume = 70
+// falloff_distance = 5
+// falloff_exponent = 20
diff --git a/code/datums/skills/_skill_modifier.dm b/code/datums/skills/_skill_modifier.dm
index c38cbf23c6..fd8de29f28 100644
--- a/code/datums/skills/_skill_modifier.dm
+++ b/code/datums/skills/_skill_modifier.dm
@@ -47,7 +47,7 @@ GLOBAL_LIST_EMPTY(potential_mods_per_skill)
if(!mod_L)
mod_L = GLOB.potential_mods_per_skill[target_skills] = list()
else
- BINARY_INSERT(identifier, mod_L, datum/skill_modifier, src, priority, COMPARE_VALUE)
+ BINARY_INSERT(identifier, mod_L, /datum/skill_modifier, src, priority, COMPARE_VALUE)
mod_L[identifier] = src
GLOB.potential_skills_per_mod[target_skills_key] = list(target_skills)
else //Should be a list.
@@ -66,7 +66,7 @@ GLOBAL_LIST_EMPTY(potential_mods_per_skill)
if(!mod_L)
mod_L = GLOB.potential_mods_per_skill[path] = list()
else
- BINARY_INSERT(identifier, mod_L, datum/skill_modifier, src, priority, COMPARE_VALUE)
+ BINARY_INSERT(identifier, mod_L, /datum/skill_modifier, src, priority, COMPARE_VALUE)
mod_L[identifier] = src
/datum/skill_modifier/Destroy()
diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm
index f4a53d5c72..fb6b5c9a65 100644
--- a/code/datums/status_effects/buffs.dm
+++ b/code/datums/status_effects/buffs.dm
@@ -573,13 +573,17 @@
duration = 1 MINUTES
status_type = STATUS_EFFECT_REPLACE
alert_type = /obj/screen/alert/status_effect/regenerative_core
+ var/heal_amount = 25
/datum/status_effect/regenerative_core/on_apply()
. = ..()
ADD_TRAIT(owner, TRAIT_IGNOREDAMAGESLOWDOWN, "regenerative_core")
- owner.adjustBruteLoss(-25)
+
+ if(HAS_TRAIT(owner, TRAIT_ROBOTIC_ORGANISM)) //Robots can heal from cores, but only get 1/5th of the healing. They can use this to get past the damage threshhold however, and then regularely heal from there.
+ heal_amount *= 0.2
+ owner.adjustBruteLoss(-heal_amount, only_organic = FALSE)
if(!AmBloodsucker(owner)) //use your coffin you lazy bastard
- owner.adjustFireLoss(-25)
+ owner.adjustFireLoss(-heal_amount, only_organic = FALSE)
owner.remove_CC()
owner.bodytemperature = BODYTEMP_NORMAL
return TRUE
@@ -647,3 +651,120 @@
if(D.severity == DISEASE_SEVERITY_POSITIVE)
continue
D.cure()
+
+/datum/status_effect/mantra // available to wizards and admins alone, currently
+ id = "Mantra"
+ examine_text = "Their aura is filled with yellow energy! "
+ alert_type = null
+ var/damageboost = 10
+ var/woundboost = 5
+ var/prev_hair_color
+ var/powerup
+ var/powerdown
+
+/datum/status_effect/mantra/on_apply()
+ . = ..()
+ if(iscarbon(owner))
+ var/mob/living/carbon/human/H = owner
+ playsound(H, 'sound/magic/powerup.ogg', 50, 1)
+ H.add_filter("mantra_glow", 2, list("type" = "outline", "color" = "#edfa347a", "size" = 2))
+ prev_hair_color = H.hair_color
+ H.hair_color = "ffe11e"
+ H.update_hair()
+ ADD_TRAIT(H, TRAIT_PUGILIST, "Mantra")
+ ADD_TRAIT(H, TRAIT_NOSOFTCRIT, "Mantra")
+ ADD_TRAIT(H, TRAIT_STUNIMMUNE, "Mantra")
+ ADD_TRAIT(H, TRAIT_PUSHIMMUNE, "Mantra")
+ ADD_TRAIT(H, TRAIT_NOGUNS, "Mantra")
+ H.dna.species.punchdamagehigh += damageboost
+ H.dna.species.punchdamagelow += damageboost
+ H.dna.species.punchwoundbonus += woundboost
+ H.physiology.brute_mod *= 0.9 // slightly resilient against lethal damage, but...
+ H.physiology.burn_mod *= 0.9
+ H.physiology.stamina_mod *= 0.5 // very resistant to non-lethal damage, because they're already draining stamina every second
+ to_chat(H, "Your inner mantra coalesces around you, granting you incredible strength and durability - but at what cost? ")
+
+/datum/status_effect/mantra/tick()
+ . = ..()
+ if(owner.health < HEALTH_THRESHOLD_FULLCRIT)
+ owner.remove_status_effect(STATUS_EFFECT_MANTRA)
+ return
+ if(owner.combat_flags & COMBAT_FLAG_HARD_STAMCRIT)
+ owner.remove_status_effect(STATUS_EFFECT_MANTRA)
+ return
+ if(iscarbon(owner))
+ var/mob/living/carbon/human/C = owner
+ C.adjustBruteLoss(-1) // slightly resilient against lethal damage
+ C.adjustFireLoss(-1)
+ C.adjustStaminaLoss(3) // in testing i personally found that 2/sec was too minimal and 4/sec was too much
+ /*if(SEND_SIGNAL(owner, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_ACTIVE)) // turning on combat mode flares up your aura
+
+ else*/
+
+/datum/status_effect/mantra/on_remove()
+ . = ..()
+ if(iscarbon(owner))
+ var/mob/living/carbon/human/M = owner
+ playsound(M, 'sound/magic/powerdown.ogg', 50, 1)
+ M.remove_filter("mantra_glow")
+ M.hair_color = prev_hair_color
+ M.update_hair()
+ REMOVE_TRAIT(M, TRAIT_PUGILIST, "Mantra")
+ REMOVE_TRAIT(M, TRAIT_NOSOFTCRIT, "Mantra")
+ REMOVE_TRAIT(M, TRAIT_STUNIMMUNE, "Mantra")
+ REMOVE_TRAIT(M, TRAIT_PUSHIMMUNE, "Mantra")
+ REMOVE_TRAIT(M, TRAIT_NOGUNS, "Mantra")
+ M.dna.species.punchdamagehigh -= damageboost
+ M.dna.species.punchdamagelow -= damageboost
+ M.dna.species.punchwoundbonus -= woundboost
+ M.physiology.brute_mod /= 0.9
+ M.physiology.burn_mod /= 0.9
+ M.physiology.stamina_mod /= 0.5
+ to_chat(M, "Your inner mantra collapses, for now. ")
+
+/datum/status_effect/asura // mfw miner gear
+ id = "Asura"
+ examine_text = "Their aura is filled with red-hot rage! "
+ alert_type = null
+ var/damageboost = 10
+ var/woundboost = 5
+
+/datum/status_effect/asura/on_apply()
+ . = ..()
+ if(iscarbon(owner))
+ var/mob/living/carbon/human/H = owner
+ playsound(H, 'sound/magic/powerup.ogg', 50, 1)
+ H.add_filter("asura_glow", 2, list("type" = "outline", "color" = "#fc21217a", "size" = 2))
+ ADD_TRAIT(H, TRAIT_PUGILIST, "Asura")
+ H.dna.species.punchdamagehigh += damageboost
+ H.dna.species.punchdamagelow += damageboost
+ H.dna.species.punchwoundbonus += woundboost
+ to_chat(H, "Your anger unleashes in a crimson blaze around you and corrosive power fills your muscles. ")
+
+/datum/status_effect/asura/tick()
+ . = ..()
+ if(owner.health < HEALTH_THRESHOLD_CRIT)
+ owner.remove_status_effect(STATUS_EFFECT_ASURA)
+ return
+ if(owner.combat_flags & COMBAT_FLAG_HARD_STAMCRIT)
+ owner.remove_status_effect(STATUS_EFFECT_ASURA)
+ return
+ if(iscarbon(owner))
+ var/mob/living/carbon/human/C = owner
+ C.adjustBruteLoss(1) // drains 1 hp per second. You're gonna need some Senzu Cores.
+ C.adjustStaminaLoss(-2) // angry man punch a lot
+ /*if(SEND_SIGNAL(owner, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_ACTIVE)) // turning on combat mode flares up your aura
+
+ else*/
+
+/datum/status_effect/asura/on_remove()
+ . = ..()
+ if(iscarbon(owner))
+ var/mob/living/carbon/human/M = owner
+ playsound(M, 'sound/magic/powerdown.ogg', 50, 1)
+ M.remove_filter("asura_glow")
+ REMOVE_TRAIT(M, TRAIT_PUGILIST, "Asura")
+ M.dna.species.punchdamagehigh -= damageboost
+ M.dna.species.punchdamagelow -= damageboost
+ M.dna.species.punchwoundbonus -= woundboost
+ to_chat(M, "You calm yourself, and your unnatural strength dissipates. ")
diff --git a/code/datums/status_effects/status_effect.dm b/code/datums/status_effects/status_effect.dm
index 7f1009d035..9dbbc1c469 100644
--- a/code/datums/status_effects/status_effect.dm
+++ b/code/datums/status_effects/status_effect.dm
@@ -74,13 +74,19 @@
/datum/status_effect/proc/on_remove() //Called whenever the buff expires or is removed; do note that at the point this is called, it is out of the owner's status_effects but owner is not yet null
SHOULD_CALL_PARENT(TRUE)
- REMOVE_TRAIT(owner, TRAIT_COMBAT_MODE_LOCKED, src)
- REMOVE_TRAIT(owner, TRAIT_SPRINT_LOCKED, src)
+ if(blocks_combatmode)
+ REMOVE_TRAIT(owner, TRAIT_COMBAT_MODE_LOCKED, src)
+ if(blocks_sprint)
+ REMOVE_TRAIT(owner, TRAIT_SPRINT_LOCKED, src)
return TRUE
/datum/status_effect/proc/be_replaced() //Called instead of on_remove when a status effect is replaced by itself or when a status effect with on_remove_on_mob_delete = FALSE has its mob deleted
owner.clear_alert(id)
LAZYREMOVE(owner.status_effects, src)
+ if(blocks_combatmode)
+ REMOVE_TRAIT(owner, TRAIT_COMBAT_MODE_LOCKED, src)
+ if(blocks_sprint)
+ REMOVE_TRAIT(owner, TRAIT_SPRINT_LOCKED, src)
owner = null
qdel(src)
diff --git a/code/game/area/Space_Station_13_areas.dm b/code/game/area/Space_Station_13_areas.dm
index 2c2cc46344..b2673c960e 100644
--- a/code/game/area/Space_Station_13_areas.dm
+++ b/code/game/area/Space_Station_13_areas.dm
@@ -45,6 +45,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
ambientsounds = SPACE
blob_allowed = FALSE //Eating up space doesn't count for victory as a blob.
considered_hull_exterior = TRUE
+ sound_environment = SOUND_AREA_SPACE
/area/space/nearstation
icon_state = "space_near"
@@ -70,6 +71,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
blob_allowed = FALSE //Nope, no winning on the asteroid as a blob. Gotta eat the station.
valid_territory = FALSE
ambientsounds = MINING
+ sound_environment = SOUND_AREA_ASTEROID
/area/asteroid/nearstation
dynamic_lighting = DYNAMIC_LIGHTING_FORCED
@@ -107,7 +109,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/maintenance
ambientsounds = MAINTENANCE
valid_territory = FALSE
-
+ sound_environment = SOUND_AREA_TUNNEL_ENCLOSED
//Departments
@@ -122,6 +124,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/maintenance/department/crew_quarters/bar
name = "Bar Maintenance"
icon_state = "maint_bar"
+ sound_environment = SOUND_AREA_WOODFLOOR
/area/maintenance/department/crew_quarters/dorms
name = "Dormitory Maintenance"
@@ -265,6 +268,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/hallway
nightshift_public_area = NIGHTSHIFT_AREA_PUBLIC
+ sound_environment = SOUND_AREA_STANDARD_STATION
/area/hallway/primary/aft
name = "Aft Primary Hallway"
@@ -333,30 +337,36 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
name = "Bridge"
icon_state = "bridge"
music = "signal"
+ sound_environment = SOUND_AREA_STANDARD_STATION
/area/bridge/meeting_room
name = "Heads of Staff Meeting Room"
icon_state = "meeting"
music = null
+ sound_environment = SOUND_AREA_MEDIUM_SOFTFLOOR
/area/bridge/meeting_room/council
name = "Council Chamber"
icon_state = "meeting"
music = null
+ sound_environment = SOUND_AREA_MEDIUM_SOFTFLOOR
/area/bridge/showroom/corporate
name = "Corporate Showroom"
icon_state = "showroom"
music = null
+ sound_environment = SOUND_AREA_MEDIUM_SOFTFLOOR
/area/crew_quarters/heads/captain
name = "Captain's Office"
icon_state = "captain"
clockwork_warp_allowed = FALSE
+ sound_environment = SOUND_AREA_WOODFLOOR
/area/crew_quarters/heads/captain/private
name = "Captain's Quarters"
icon_state = "captain"
+ sound_environment = SOUND_AREA_WOODFLOOR
/area/crew_quarters/heads/chief
name = "Chief Engineer's Office"
@@ -401,10 +411,12 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/comms
name = "Communications Relay"
icon_state = "tcomsatcham"
+ sound_environment = SOUND_AREA_STANDARD_STATION
/area/server
name = "Messaging Server Room"
icon_state = "server"
+ sound_environment = SOUND_AREA_STANDARD_STATION
//Crew
@@ -413,6 +425,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
icon_state = "Sleep"
safe = TRUE
nightshift_public_area = NIGHTSHIFT_AREA_RECREATION
+ sound_environment = SOUND_AREA_STANDARD_STATION
/area/crew_quarters/dorms/male
name = "Male Dorm"
@@ -431,6 +444,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/crew_quarters/toilet
name = "Dormitory Toilets"
icon_state = "toilet"
+ sound_environment = SOUND_AREA_SMALL_ENCLOSED
/area/crew_quarters/toilet/auxiliary
name = "Auxiliary Restrooms"
@@ -465,6 +479,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
name = "Lounge"
icon_state = "yellow"
nightshift_public_area = NIGHTSHIFT_AREA_RECREATION
+ sound_environment = SOUND_AREA_SMALL_SOFTFLOOR
/area/crew_quarters/arcade
name = "Arcade"
@@ -502,15 +517,18 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/crew_quarters/kitchen/backroom
name = "Kitchen Coldroom"
icon_state = "kitchen"
+ sound_environment = SOUND_AREA_SMALL_ENCLOSED
/area/crew_quarters/bar
name = "Bar"
icon_state = "bar"
nightshift_public_area = NIGHTSHIFT_AREA_RECREATION
+ sound_environment = SOUND_AREA_WOODFLOOR
/area/crew_quarters/bar/atrium
name = "Atrium"
icon_state = "bar"
+ sound_environment = SOUND_AREA_WOODFLOOR
/area/crew_quarters/electronic_marketing_den
name = "Electronic Marketing Den"
@@ -526,6 +544,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/crew_quarters/theatre
name = "Theatre"
icon_state = "Theatre"
+ sound_environment = SOUND_AREA_WOODFLOOR
/area/crew_quarters/theatre/abandoned
name = "Abandoned Theatre"
@@ -546,10 +565,12 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
icon_state = "library"
flags_1 = NONE
nightshift_public_area = NIGHTSHIFT_AREA_RECREATION
+ sound_environment = SOUND_AREA_LARGE_SOFTFLOOR
/area/library/lounge
name = "Library Lounge"
icon_state = "library"
+ sound_environment = SOUND_AREA_SMALL_SOFTFLOOR
/area/library/abandoned
name = "Abandoned Library"
@@ -564,6 +585,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
clockwork_warp_allowed = FALSE
clockwork_warp_fail = "The consecration here prevents you from warping in."
nightshift_public_area = NIGHTSHIFT_AREA_RECREATION
+ sound_environment = SOUND_AREA_LARGE_ENCLOSED
/area/chapel/main
name = "Chapel"
@@ -579,6 +601,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/chapel/asteroid
name = "Chapel Asteroid"
icon_state = "explored"
+ sound_environment = SOUND_AREA_ASTEROID
/area/chapel/asteroid/monastery
name = "Monastery Asteroid"
@@ -590,12 +613,14 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/lawoffice
name = "Law Office"
icon_state = "law"
+ sound_environment = SOUND_AREA_SMALL_SOFTFLOOR
//Engineering
/area/engine
ambientsounds = ENGINEERING
+ sound_environment = SOUND_AREA_LARGE_ENCLOSED
/area/engine/engine_smes
name = "Engineering SMES"
@@ -613,14 +638,17 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/engine/atmospherics_engine
name = "Atmospherics Engine"
icon_state = "atmos_engine"
+ sound_environment = SOUND_AREA_LARGE_ENCLOSED
/area/engine/supermatter
name = "Supermatter Engine"
icon_state = "engine_sm"
+ sound_environment = SOUND_AREA_SMALL_ENCLOSED
/area/engine/break_room
name = "Engineering Foyer"
icon_state = "engine_foyer"
+ sound_environment = SOUND_AREA_SMALL_ENCLOSED
/area/engine/gravity_generator
name = "Gravity Generator Room"
@@ -635,6 +663,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/engine/storage
name = "Engineering Storage"
icon_state = "engi_storage"
+ sound_environment = SOUND_AREA_SMALL_ENCLOSED
/area/engine/storage_shared
name = "Shared Engineering Storage"
@@ -654,10 +683,12 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
blob_allowed = FALSE
flags_1 = NONE
ambientsounds = ENGINEERING
+ sound_environment = SOUND_AREA_SPACE
/area/solar/fore
name = "Fore Solar Array"
icon_state = "yellow"
+ sound_environment = SOUND_AREA_STANDARD_STATION
/area/solar/aft
name = "Aft Solar Array"
@@ -763,6 +794,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
icon_state = "gateway"
music = "signal"
ambientsounds = ENGINEERING
+ sound_environment = SOUND_AREA_STANDARD_STATION
//MedBay
@@ -770,6 +802,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
name = "Medical"
icon_state = "medbay3"
ambientsounds = MEDICAL
+ sound_environment = SOUND_AREA_STANDARD_STATION
/area/medical/clinic
name = "Clinic"
@@ -780,6 +813,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
name = "Abandoned Medbay"
icon_state = "medbay3"
music = 'sound/ambience/signal.ogg'
+ sound_environment = SOUND_AREA_SMALL_ENCLOSED
/area/medical/medbay/central
name = "Medbay Central"
@@ -821,6 +855,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/medical/patients_rooms
name = "Patients' Rooms"
icon_state = "patients"
+ sound_environment = SOUND_AREA_SMALL_SOFTFLOOR
/area/medical/patients_rooms/room_a
name = "Patient Room A"
@@ -839,6 +874,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
name = "Morgue"
icon_state = "morgue"
ambientsounds = SPOOKY
+ sound_environment = SOUND_AREA_SMALL_ENCLOSED
/area/medical/chemistry
name = "Chemistry"
@@ -879,6 +915,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
name = "Security"
icon_state = "security"
ambientsounds = HIGHSEC
+ sound_environment = SOUND_AREA_STANDARD_STATION
/area/security/main
name = "Security Office"
@@ -891,6 +928,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/security/courtroom
name = "Courtroom"
icon_state = "courtroom"
+ sound_environment = SOUND_AREA_LARGE_ENCLOSED
/area/security/prison
name = "Prison Wing"
@@ -903,10 +941,12 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/security/processing/cremation
name = "Security Crematorium"
icon_state = "sec_prison"
+ sound_environment = SOUND_AREA_SMALL_ENCLOSED
/area/security/warden
name = "Brig Control"
icon_state = "Warden"
+ sound_environment = SOUND_AREA_SMALL_SOFTFLOOR
/area/security/armory
name = "Armory"
@@ -920,6 +960,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/security/detectives_office/private_investigators_office
name = "Private Investigator's Office"
icon_state = "detective"
+ sound_environment = SOUND_AREA_SMALL_SOFTFLOOR
/area/security/range
name = "Firing Range"
@@ -997,18 +1038,17 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/quartermaster
name = "Quartermasters"
icon_state = "quart"
-
-///////////WORK IN PROGRESS//////////
+ sound_environment = SOUND_AREA_STANDARD_STATION
/area/quartermaster/sorting
name = "Delivery Office"
icon_state = "cargo_delivery"
+ sound_environment = SOUND_AREA_STANDARD_STATION
/area/quartermaster/warehouse
name = "Warehouse"
icon_state = "cargo_warehouse"
-
-////////////WORK IN PROGRESS//////////
+ sound_environment = SOUND_AREA_LARGE_ENCLOSED
/area/quartermaster/office
name = "Cargo Office"
@@ -1017,6 +1057,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/quartermaster/storage
name = "Cargo Bay"
icon_state = "cargo_bay"
+ sound_environment = SOUND_AREA_LARGE_ENCLOSED
/area/quartermaster/qm
name = "Quartermaster's Office"
@@ -1046,6 +1087,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
name = "Custodial Closet"
icon_state = "janitor"
flags_1 = NONE
+ sound_environment = SOUND_AREA_SMALL_ENCLOSED
/area/janitor/aux
name = "Auxiliary Custodial Closet"
@@ -1055,6 +1097,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/hydroponics
name = "Hydroponics"
icon_state = "hydro"
+ sound_environment = SOUND_AREA_STANDARD_STATION
/area/hydroponics/lobby
name = "Hydroponics Lobby"
@@ -1067,6 +1110,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/hydroponics/garden/abandoned
name = "Abandoned Garden"
icon_state = "abandoned_garden"
+ sound_environment = SOUND_AREA_SMALL_ENCLOSED
/area/hydroponics/garden/monastery
name = "Monastery Garden"
@@ -1077,6 +1121,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/science
name = "Science Division"
icon_state = "toxlab"
+ sound_environment = SOUND_AREA_STANDARD_STATION
/area/science/observatory
name = "Research Observatory"
@@ -1167,12 +1212,15 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/science/research/abandoned
name = "Abandoned Research Lab"
icon_state = "medresearch"
+ sound_environment = SOUND_AREA_SMALL_ENCLOSED
/area/science/nanite
name = "Nanite Lab"
icon_state = "toxmisc"
//Storage
+/area/storage
+ sound_environment = SOUND_AREA_STANDARD_STATION
/area/storage/tools
name = "Auxiliary Tool Storage"
@@ -1242,6 +1290,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
name = "Construction Area"
icon_state = "yellow"
ambientsounds = ENGINEERING
+ sound_environment = SOUND_AREA_STANDARD_STATION
/area/construction/minisat_exterior
name = "Minisat Exterior"
@@ -1250,6 +1299,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/construction/mining/aux_base
name = "Auxiliary Base Construction"
icon_state = "yellow"
+ sound_environment = SOUND_AREA_MEDIUM_SOFTFLOOR
/area/construction/mining/aux_base/closet
name = "Auxiliary Closet Construction"
@@ -1305,6 +1355,8 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
//AI
+/area/ai_monitored
+ sound_environment = SOUND_AREA_STANDARD_STATION
/area/ai_monitored/security/armory
name = "Armory"
@@ -1329,10 +1381,12 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/ai_monitored/turret_protected/ai_upload
name = "AI Upload Chamber"
icon_state = "ai_upload"
+ sound_environment = SOUND_AREA_SMALL_ENCLOSED
/area/ai_monitored/turret_protected/ai_upload_foyer
name = "AI Upload Access"
icon_state = "ai_foyer"
+ sound_environment = SOUND_AREA_SMALL_ENCLOSED
/area/ai_monitored/turret_protected/ai
name = "AI Chamber"
@@ -1341,6 +1395,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/ai_monitored/turret_protected/aisat
name = "AI Satellite"
icon_state = "ai"
+ sound_environment = SOUND_ENVIRONMENT_ROOM
/area/ai_monitored/turret_protected/aisat/atmos
name = "AI Satellite Atmos"
@@ -1365,6 +1420,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/ai_monitored/turret_protected/aisat_interior
name = "AI Satellite Antechamber"
icon_state = "ai"
+ sound_environment = SOUND_AREA_LARGE_ENCLOSED
/area/ai_monitored/turret_protected/AIsatextFP
name = "AI Sat Ext"
@@ -1418,6 +1474,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/tcommsat/computer
name = "Telecomms Control Room"
icon_state = "tcomsatcomp"
+ sound_environment = SOUND_AREA_MEDIUM_SOFTFLOOR
/area/tcommsat/server
name = "Telecomms Server Room"
diff --git a/code/game/area/ai_monitored.dm b/code/game/area/ai_monitored.dm
index 558a4b1026..48e77e1623 100644
--- a/code/game/area/ai_monitored.dm
+++ b/code/game/area/ai_monitored.dm
@@ -3,6 +3,7 @@
clockwork_warp_allowed = FALSE
var/list/obj/machinery/camera/motioncameras = list()
var/list/datum/weakref/motionTargets = list()
+ sound_environment = SOUND_ENVIRONMENT_ROOM
/area/ai_monitored/Initialize(mapload)
. = ..()
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index ff177898cb..4790d20f64 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -1,16 +1,72 @@
-// Areas.dm
-
-
+/**
+ * # area
+ *
+ * A grouping of tiles into a logical space, mostly used by map editors
+ */
/area
- level = null
name = "Space"
icon = 'icons/turf/areas.dmi'
icon_state = "unknown"
layer = AREA_LAYER
- plane = BLACKNESS_PLANE //Keeping this on the default plane, GAME_PLANE, will make area overlays fail to render on FLOOR_PLANE.
+ //Keeping this on the default plane, GAME_PLANE, will make area overlays fail to render on FLOOR_PLANE.
+ plane = BLACKNESS_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
invisibility = INVISIBILITY_LIGHTING
+ var/fire = null
+ ///Whether there is an atmos alarm in this area
+ var/atmosalm = FALSE
+ var/poweralm = FALSE
+ var/lightswitch = TRUE
+
+ /// All beauty in this area combined, only includes indoor area.
+ var/totalbeauty = 0
+ /// Beauty average per open turf in the area
+ var/beauty = 0
+ /// If a room is too big it doesn't have beauty.
+ var/beauty_threshold = 150
+
+ /// For space, the asteroid, lavaland, etc. Used with blueprints or with weather to determine if we are adding a new area (vs editing a station room)
+ var/outdoors = FALSE
+
+ /// Size of the area in open turfs, only calculated for indoors areas.
+ var/areasize = 0
+
+ /// Bonus mood for being in this area
+ var/mood_bonus = 0
+ /// Mood message for being here, only shows up if mood_bonus != 0
+ var/mood_message = "This area is pretty nice!\n "
+
+ ///Will objects this area be needing power?
+ var/requires_power = TRUE
+ /// This gets overridden to 1 for space in area/Initialize().
+ var/always_unpowered = FALSE
+
+ var/power_equip = TRUE
+ var/power_light = TRUE
+ var/power_environ = TRUE
+
+ var/has_gravity = FALSE
+
+ var/parallax_movedir = 0
+
+ var/list/ambientsounds = GENERIC
+ flags_1 = CAN_BE_DIRTY_1
+
+ var/list/firedoors
+ var/list/cameras
+ var/list/firealarms
+ var/firedoors_last_closed_on = 0
+
+
+ ///This datum, if set, allows terrain generation behavior to be ran on Initialize()
+ // var/datum/map_generator/map_generator
+
+ ///Used to decide what kind of reverb the area makes sound have
+ var/sound_environment = SOUND_ENVIRONMENT_NONE
+
+ /// CIT SPECIFIC VARS
+
/// Set in New(); preserves the name set by the map maker, even if renamed by the Blueprints.
var/map_name
@@ -41,29 +97,8 @@
/// Considered space for hull shielding
var/considered_hull_exterior = FALSE
- var/fire = null
var/atmos = TRUE
- var/atmosalm = FALSE
- var/poweralm = TRUE
- var/lightswitch = TRUE
- var/totalbeauty = 0 //All beauty in this area combined, only includes indoor area.
- var/beauty = 0 // Beauty average per open turf in the area
- var/beauty_threshold = 150 //If a room is too big it doesn't have beauty.
-
- var/requires_power = TRUE
- /// This gets overridden to 1 for space in area/Initialize().
- var/always_unpowered = FALSE
-
- /// For space, the asteroid, lavaland, etc. Used with blueprints to determine if we are adding a new area (vs editing a station room)
- var/outdoors = FALSE
-
- /// Size of the area in open turfs, only calculated for indoors areas.
- var/areasize = 0
-
- var/power_equip = TRUE
- var/power_light = TRUE
- var/power_environ = TRUE
var/music = null
var/used_equip = 0
var/used_light = 0
@@ -72,7 +107,6 @@
var/static_light = 0
var/static_environ
- var/has_gravity = 0
/// Are you forbidden from teleporting to the area? (centcom, mobs, wizard, hand teleporter)
var/noteleport = FALSE
/// Hides area from player Teleport function.
@@ -84,15 +118,6 @@
var/no_air = null
- var/parallax_movedir = 0
-
- var/list/ambientsounds = GENERIC
- flags_1 = CAN_BE_DIRTY_1
-
- var/list/firedoors
- var/list/cameras
- var/list/firealarms
- var/firedoors_last_closed_on = 0
var/xenobiology_compatible = FALSE //Can the Xenobio management console transverse this area by default?
var/list/canSmoothWithAreas //typecache to limit the areas that atoms in this area can smooth with
@@ -111,10 +136,24 @@
var/nightshift_public_area = NIGHTSHIFT_AREA_NONE //considered a public area for nightshift
-/*Adding a wizard area teleport list because motherfucking lag -- Urist*/
-/*I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game*/
+
+/**
+ * A list of teleport locations
+ *
+ * Adding a wizard area teleport list because motherfucking lag -- Urist
+ * I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game
+ */
GLOBAL_LIST_EMPTY(teleportlocs)
+/**
+ * Generate a list of turfs you can teleport to from the areas list
+ *
+ * Includes areas if they're not a shuttle or not not teleport or have no contents
+ *
+ * The chosen turf is the first item in the areas contents that is a station level
+ *
+ * The returned list of turfs is sorted by name
+ */
/proc/process_teleport_locs()
for(var/V in GLOB.sortedAreas)
var/area/AR = V
@@ -128,11 +167,19 @@ GLOBAL_LIST_EMPTY(teleportlocs)
if (picked && is_station_level(picked.z))
GLOB.teleportlocs[AR.name] = AR
- sortTim(GLOB.teleportlocs, /proc/cmp_text_dsc)
-
-// ===
+ sortTim(GLOB.teleportlocs, /proc/cmp_text_asc)
+/**
+ * Called when an area loads
+ *
+ * Adds the item to the GLOB.areas_by_type list based on area type
+ */
/area/New()
+ // This interacts with the map loader, so it needs to be set immediately
+ // rather than waiting for atoms to initialize.
+ if (unique)
+ GLOB.areas_by_type[type] = src
+
if(!minimap_color) // goes in New() because otherwise it doesn't fucking work
// generate one using the icon_state
if(icon_state && icon_state != "unknown")
@@ -141,14 +188,18 @@ GLOBAL_LIST_EMPTY(teleportlocs)
minimap_color = I.GetPixel(1,1)
else // no icon state? use random.
minimap_color = rgb(rand(50,70),rand(50,70),rand(50,70)) // This interacts with the map loader, so it needs to be set immediately
- // rather than waiting for atoms to initialize.
- if (unique)
- GLOB.areas_by_type[type] = src
return ..()
+/**
+ * Initalize this area
+ *
+ * intializes the dynamic area lighting and also registers the area with the z level via
+ * reg_in_areas_in_z
+ *
+ * returns INITIALIZE_HINT_LATELOAD
+ */
/area/Initialize()
icon_state = ""
- layer = AREA_LAYER
map_name = name // Save the initial (the name set in the map) name of the area.
canSmoothWithAreas = typecacheof(canSmoothWithAreas)
@@ -202,29 +253,55 @@ GLOBAL_LIST_EMPTY(teleportlocs)
return INITIALIZE_HINT_LATELOAD
+/**
+ * Sets machine power levels in the area
+ */
/area/LateInitialize()
if(!base_area) //we don't want to run it twice.
power_change() // all machines set to current power level, also updates icon
update_beauty()
-/area/proc/reg_in_areas_in_z()
- if(contents.len)
- var/list/areas_in_z = SSmapping.areas_in_z
- var/z
- update_areasize()
- for(var/i in 1 to contents.len)
- var/atom/thing = contents[i]
- if(!thing)
- continue
- z = thing.z
- break
- if(!z)
- WARNING("No z found for [src]")
- return
- if(!areas_in_z["[z]"])
- areas_in_z["[z]"] = list()
- areas_in_z["[z]"] += src
+/// Soon ™
+/area/proc/RunGeneration()
+ // if(map_generator)
+ // map_generator = new map_generator()
+ // var/list/turfs = list()
+ // for(var/turf/T in contents)
+ // turfs += T
+ // map_generator.generate_terrain(turfs)
+/area/proc/test_gen()
+ // if(map_generator)
+ // var/list/turfs = list()
+ // for(var/turf/T in contents)
+ // turfs += T
+ // map_generator.generate_terrain(turfs)
+
+/**
+ * Register this area as belonging to a z level
+ *
+ * Ensures the item is added to the SSmapping.areas_in_z list for this z
+ */
+/area/proc/reg_in_areas_in_z()
+ if(!length(contents))
+ return
+ var/list/areas_in_z = SSmapping.areas_in_z
+ update_areasize()
+ if(!z)
+ WARNING("No z found for [src]")
+ return
+ if(!areas_in_z["[z]"])
+ areas_in_z["[z]"] = list()
+ areas_in_z["[z]"] += src
+
+/**
+ * Destroy an area and clean it up
+ *
+ * Removes the area from GLOB.areas_by_type and also stops it processing on SSobj
+ *
+ * This is despite the fact that no code appears to put it on SSobj, but
+ * who am I to argue with old coders
+ */
/area/Destroy()
if(GLOB.areas_by_type[type] == src)
GLOB.areas_by_type[type] = null
@@ -244,6 +321,11 @@ GLOBAL_LIST_EMPTY(teleportlocs)
STOP_PROCESSING(SSobj, src)
return ..()
+/**
+ * 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
@@ -525,6 +607,13 @@ GLOBAL_LIST_EMPTY(teleportlocs)
used_environ += amount
+/**
+ * Call back when an atom enters an area
+ *
+ * Sends signals COMSIG_AREA_ENTERED and COMSIG_ENTER_AREA (to the atom)
+ *
+ * If the area has ambience, then it plays some ambience music to the ambience channel
+ */
/area/Entered(atom/movable/M, atom/OldLoc)
set waitfor = FALSE
SEND_SIGNAL(src, COMSIG_AREA_ENTERED, M)
@@ -567,6 +656,12 @@ GLOBAL_LIST_EMPTY(teleportlocs)
return FALSE //Too big
beauty = totalbeauty / areasize
+
+/**
+ * Called when an atom exits an area
+ *
+ * Sends signals COMSIG_AREA_EXITED and COMSIG_EXIT_AREA (to the atom)
+ */
/area/Exited(atom/movable/M)
SEND_SIGNAL(src, COMSIG_AREA_EXITED, M)
SEND_SIGNAL(M, COMSIG_EXIT_AREA, src) //The atom that exits the area
diff --git a/code/game/area/areas/away_content.dm b/code/game/area/areas/away_content.dm
index 27a73ae5f1..63beaec412 100644
--- a/code/game/area/areas/away_content.dm
+++ b/code/game/area/areas/away_content.dm
@@ -9,6 +9,7 @@ Unused icons for new areas are "awaycontent1" ~ "awaycontent30"
icon_state = "away"
has_gravity = STANDARD_GRAVITY
ambientsounds = AWAY_MISSION
+ sound_environment = SOUND_ENVIRONMENT_ROOM
/area/awaymission/beach
name = "Beach"
diff --git a/code/game/area/areas/holodeck.dm b/code/game/area/areas/holodeck.dm
index 9eec00460a..c0819d29b9 100644
--- a/code/game/area/areas/holodeck.dm
+++ b/code/game/area/areas/holodeck.dm
@@ -4,6 +4,7 @@
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
flags_1 = 0
hidden = TRUE
+ sound_environment = SOUND_ENVIRONMENT_PADDED_CELL
var/obj/machinery/computer/holodeck/linked
var/restricted = 0 // if true, program goes on emag list
diff --git a/code/game/area/areas/mining.dm b/code/game/area/areas/mining.dm
index 70e0910dde..520c7ba59f 100644
--- a/code/game/area/areas/mining.dm
+++ b/code/game/area/areas/mining.dm
@@ -19,6 +19,7 @@
flags_1 = NONE
ambientsounds = MINING
flora_allowed = FALSE
+ sound_environment = SOUND_AREA_STANDARD_STATION
/area/mine/unexplored
name = "Mine"
@@ -86,6 +87,7 @@
has_gravity = STANDARD_GRAVITY
flags_1 = NONE
flora_allowed = TRUE
+ sound_environment = SOUND_AREA_LAVALAND
/area/lavaland/surface
name = "Lavaland"
@@ -139,6 +141,7 @@
flags_1 = NONE
flora_allowed = TRUE
blob_allowed = FALSE
+ sound_environment = SOUND_AREA_ICEMOON
/area/icemoon/surface
name = "Icemoon"
diff --git a/code/game/area/areas/ruins/_ruins.dm b/code/game/area/areas/ruins/_ruins.dm
index b97c3f0ef4..17ba4f7721 100644
--- a/code/game/area/areas/ruins/_ruins.dm
+++ b/code/game/area/areas/ruins/_ruins.dm
@@ -7,6 +7,7 @@
hidden = TRUE
dynamic_lighting = DYNAMIC_LIGHTING_FORCED
ambientsounds = RUINS
+ sound_environment = SOUND_ENVIRONMENT_STONEROOM
/area/ruin/unpowered
diff --git a/code/game/area/areas/shuttles.dm b/code/game/area/areas/shuttles.dm
index e7f8c63d4a..9a890ead75 100644
--- a/code/game/area/areas/shuttles.dm
+++ b/code/game/area/areas/shuttles.dm
@@ -12,6 +12,7 @@
icon_state = "shuttle"
// Loading the same shuttle map at a different time will produce distinct area instances.
unique = FALSE
+ sound_environment = SOUND_ENVIRONMENT_ROOM
/area/shuttle/Initialize()
if(!canSmoothWithAreas)
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 7fbfe48f4e..4a24416e3c 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -1,12 +1,22 @@
+/**
+ * The base type for nearly all physical objects in SS13
+
+ * Lots and lots of functionality lives here, although in general we are striving to move
+ * as much as possible to the components/elements system
+ */
/atom
layer = TURF_LAYER
plane = GAME_PLANE
- var/level = 2
- var/article // If non-null, overrides a/an/some in all cases
+ appearance_flags = TILE_BOUND
+ var/level = 2
+ ///If non-null, overrides a/an/some in all cases
+ var/article
+
+ ///First atom flags var
var/flags_1 = NONE
+ ///Intearaction flags
var/interaction_flags_atom = NONE
- var/datum/reagents/reagents = null
var/flags_ricochet = NONE
@@ -15,35 +25,52 @@
///When a projectile ricochets off this atom, it deals the normal damage * this modifier to this atom
var/ricochet_damage_mod = 0.33
- //This atom's HUD (med/sec, etc) images. Associative list.
+ ///Reagents holder
+ var/datum/reagents/reagents = null
+
+ ///This atom's HUD (med/sec, etc) images. Associative list.
var/list/image/hud_list = null
- //HUD images that this atom can provide.
+ ///HUD images that this atom can provide.
var/list/hud_possible
- //Value used to increment ex_act() if reactionary_explosions is on
+ ///Value used to increment ex_act() if reactionary_explosions is on
var/explosion_block = 0
- var/list/atom_colours //used to store the different colors on an atom
- //its inherent color, the colored paint applied on it, special color effect etc...
+ /**
+ * used to store the different colors on an atom
+ *
+ * its inherent color, the colored paint applied on it, special color effect etc...
+ */
+ var/list/atom_colours
- var/list/remove_overlays // a very temporary list of overlays to remove
- var/list/add_overlays // a very temporary list of overlays to add
- var/list/managed_vis_overlays //vis overlays managed by SSvis_overlays to automaticaly turn them like other overlays
- ///overlays managed by update_overlays() to prevent removing overlays that weren't added by the same proc
+ /// a very temporary list of overlays to remove
+ var/list/remove_overlays
+ /// a very temporary list of overlays to add
+ var/list/add_overlays
+
+ ///vis overlays managed by SSvis_overlays to automaticaly turn them like other overlays
+ var/list/managed_vis_overlays
+ ///overlays managed by [update_overlays][/atom/proc/update_overlays] to prevent removing overlays that weren't added by the same proc
var/list/managed_overlays
+ ///Proximity monitor associated with this atom
var/datum/proximity_monitor/proximity_monitor
+ ///Last fingerprints to touch this atom
var/fingerprintslast
var/list/filter_data //For handling persistent filters
+ ///Price of an item in a vending machine, overriding the base vending machine price. Define in terms of paycheck defines as opposed to raw numbers.
var/custom_price
+ ///Price of an item in a vending machine, overriding the premium vending machine price. Define in terms of paycheck defines as opposed to raw numbers.
var/custom_premium_price
+ //List of datums orbiting this atom
var/datum/component/orbiter/orbiters
var/rad_flags = NONE // Will move to flags_1 when i can be arsed to
+ /// Radiation insulation types
var/rad_insulation = RAD_NO_INSULATION
///The custom materials this atom is made of, used by a lot of things like furniture, walls, and floors (if I finish the functionality, that is.)
@@ -72,6 +99,16 @@
///Mobs that are currently do_after'ing this atom, to be cleared from on Destroy()
var/list/targeted_by
+/**
+ * Called when an atom is created in byond (built in engine proc)
+ *
+ * Not a lot happens here in SS13 code, as we offload most of the work to the
+ * [Intialization][/atom/proc/Initialize] proc, mostly we run the preloader
+ * if the preloader is being used and then call [InitAtom][/datum/controller/subsystem/atoms/proc/InitAtom] of which the ultimate
+ * result is that the Intialize proc is called.
+ *
+ * We also generate a tag here if the DF_USE_TAG flag is set on the atom
+ */
/atom/New(loc, ...)
//atom creation method that preloads variables at creation
if(GLOB.use_preloader && (src.type == GLOB._preloader.target_path))//in case the instanciated atom is creating other atoms in New()
@@ -87,24 +124,50 @@
//we were deleted
return
-//Called after New if the map is being loaded. mapload = TRUE
-//Called from base of New if the map is not being loaded. mapload = FALSE
-//This base must be called or derivatives must set initialized to TRUE
-//must not sleep
-//Other parameters are passed from New (excluding loc), this does not happen if mapload is TRUE
-//Must return an Initialize hint. Defined in __DEFINES/subsystems.dm
-
-//Note: the following functions don't call the base for optimization and must copypasta:
-// /turf/Initialize
-// /turf/open/space/Initialize
-
+/**
+ * The primary method that objects are setup in SS13 with
+ *
+ * we don't use New as we have better control over when this is called and we can choose
+ * to delay calls or hook other logic in and so forth
+ *
+ * During roundstart map parsing, atoms are queued for intialization in the base atom/New(),
+ * After the map has loaded, then Initalize is called on all atoms one by one. NB: this
+ * is also true for loading map templates as well, so they don't Initalize until all objects
+ * in the map file are parsed and present in the world
+ *
+ * If you're creating an object at any point after SSInit has run then this proc will be
+ * immediately be called from New.
+ *
+ * mapload: This parameter is true if the atom being loaded is either being intialized during
+ * the Atom subsystem intialization, or if the atom is being loaded from the map template.
+ * If the item is being created at runtime any time after the Atom subsystem is intialized then
+ * it's false.
+ *
+ * You must always call the parent of this proc, otherwise failures will occur as the item
+ * will not be seen as initalized (this can lead to all sorts of strange behaviour, like
+ * the item being completely unclickable)
+ *
+ * You must not sleep in this proc, or any subprocs
+ *
+ * Any parameters from new are passed through (excluding loc), naturally if you're loading from a map
+ * there are no other arguments
+ *
+ * Must return an [initialization hint][INITIALIZE_HINT_NORMAL] or a runtime will occur.
+ *
+ * Note: the following functions don't call the base for optimization and must copypasta handling:
+ * * [/turf/proc/Initialize]
+ * * [/turf/open/space/proc/Initialize]
+ */
/atom/proc/Initialize(mapload, ...)
+ // SHOULD_NOT_SLEEP(TRUE)
+ SHOULD_CALL_PARENT(TRUE)
if(flags_1 & INITIALIZED_1)
stack_trace("Warning: [src]([type]) initialized multiple times!")
flags_1 |= INITIALIZED_1
if(loc)
SEND_SIGNAL(loc, COMSIG_ATOM_CREATED, src) /// Sends a signal that the new atom `src`, has been created at `loc`
+
//atom color stuff
if(color)
add_atom_colour(color, FIXED_COLOUR_PRIORITY)
@@ -126,14 +189,34 @@
return INITIALIZE_HINT_NORMAL
-//called if Initialize returns INITIALIZE_HINT_LATELOAD
+/**
+ * Late Intialization, for code that should run after all atoms have run Intialization
+ *
+ * To have your LateIntialize proc be called, your atoms [Initalization][/atom/proc/Initialize]
+ * proc must return the hint
+ * [INITIALIZE_HINT_LATELOAD] otherwise you will never be called.
+ *
+ * useful for doing things like finding other machines on GLOB.machines because you can guarantee
+ * that all atoms will actually exist in the "WORLD" at this time and that all their Intialization
+ * code has been run
+ */
/atom/proc/LateInitialize()
- return
+ set waitfor = FALSE
-// Put your AddComponent() calls here
+/// Put your [AddComponent] calls here
/atom/proc/ComponentInitialize()
return
+/**
+ * Top level of the destroy chain for most atoms
+ *
+ * Cleans up the following:
+ * * Removes alternate apperances from huds that see them
+ * * qdels the reagent holder from atoms if it exists
+ * * clears the orbiters list
+ * * clears overlays and priority overlays
+ * * clears the light object
+ */
/atom/Destroy()
if(alternate_appearances)
for(var/K in alternate_appearances)
@@ -143,6 +226,8 @@
if(reagents)
qdel(reagents)
+ orbiters = null // The component is attached to us normaly and will be deleted elsewhere
+
LAZYCLEARLIST(overlays)
for(var/i in targeted_by)
@@ -179,6 +264,16 @@
/atom/proc/CanPass(atom/movable/mover, turf/target)
return !density
+/**
+ * Is this atom currently located on centcom
+ *
+ * Specifically, is it on the z level and within the centcom areas
+ *
+ * You can also be in a shuttleshuttle during endgame transit
+ *
+ * Used in gamemode to identify mobs who have escaped and for some other areas of the code
+ * who don't want atoms where they shouldn't be
+ */
/atom/proc/onCentCom()
var/turf/T = get_turf(src)
if(!T)
@@ -209,6 +304,13 @@
if(T in shuttle_area)
return TRUE
+/**
+ * Is the atom in any of the centcom syndicate areas
+ *
+ * Either in the syndie base on centcom, or any of their shuttles
+ *
+ * Also used in gamemode code for win conditions
+ */
/atom/proc/onSyndieBase()
var/turf/T = get_turf(src)
if(!T)
@@ -222,6 +324,23 @@
return FALSE
+/**
+ * Is the atom in an away mission
+ *
+ * Must be in the away mission z-level to return TRUE
+ *
+ * Also used in gamemode code for win conditions
+ */
+/atom/proc/onAwayMission()
+ var/turf/T = get_turf(src)
+ if(!T)
+ return FALSE
+
+ if(is_away_level(T.z))
+ return TRUE
+
+ return FALSE
+
/atom/proc/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE)
SEND_SIGNAL(src, COMSIG_ATOM_HULK_ATTACK, user)
if(does_attack_animation)
@@ -415,7 +534,7 @@
/// Updates the overlays of the atom
/atom/proc/update_overlays()
- SHOULD_CALL_PARENT(1)
+ SHOULD_CALL_PARENT(TRUE)
. = list()
SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_OVERLAYS, .)
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 09a0fad645..79fb2cd5a7 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -1,5 +1,7 @@
/atom/movable
layer = OBJ_LAYER
+ glide_size = 8
+ SET_APPEARANCE_FLAGS(TILE_BOUND | PIXEL_SCALE)
var/last_move = null
var/last_move_time = 0
var/anchored = FALSE
@@ -28,8 +30,6 @@
var/atom/movable/moving_from_pull //attempt to resume grab after moving instead of before.
var/list/client_mobs_in_contents // This contains all the client mobs within this container
var/list/acted_explosions //for explosion dodging
- glide_size = 8
- appearance_flags = TILE_BOUND|PIXEL_SCALE
var/datum/forced_movement/force_moving = null //handled soley by forced_movement.dm
var/movement_type = GROUND //Incase you have multiple types, you automatically use the most useful one. IE: Skating on ice, flippers on water, flying over chasm/space, etc.
var/atom/movable/pulling
@@ -59,6 +59,42 @@
em_block = new(src, render_target)
vis_contents += em_block
+
+/atom/movable/Destroy(force)
+ QDEL_NULL(proximity_monitor)
+ QDEL_NULL(language_holder)
+ QDEL_NULL(em_block)
+
+ unbuckle_all_mobs(force = TRUE)
+
+ if(loc)
+ //Restore air flow if we were blocking it (movables with ATMOS_PASS_PROC will need to do this manually if necessary)
+ if(((CanAtmosPass == ATMOS_PASS_DENSITY && density) || CanAtmosPass == ATMOS_PASS_NO) && isturf(loc))
+ CanAtmosPass = ATMOS_PASS_YES
+ air_update_turf(TRUE)
+ loc.handle_atom_del(src)
+
+ // if(opacity)
+ // RemoveElement(/datum/element/light_blocking)
+
+ invisibility = INVISIBILITY_ABSTRACT
+
+ if(pulledby)
+ pulledby.stop_pulling()
+
+ if(orbiting)
+ orbiting.end_orbit(src)
+ orbiting = null
+
+ . = ..()
+
+ for(var/movable_content in contents)
+ qdel(movable_content)
+
+ LAZYCLEARLIST(client_mobs_in_contents)
+
+ moveToNullspace()
+
/atom/movable/proc/update_emissive_block()
if(blocks_emissive != EMISSIVE_BLOCK_GENERIC)
return
@@ -113,40 +149,52 @@
return FALSE
return T.zPassOut(src, direction, destination) && destination.zPassIn(src, direction, T)
-/atom/movable/vv_edit_var(var_name, var_value)
- var/static/list/banned_edits = list("step_x", "step_y", "step_size")
- var/static/list/careful_edits = list("bound_x", "bound_y", "bound_width", "bound_height")
- if(var_name in banned_edits)
+/atom/movable/vv_edit_var(var_name, var_value, massedit)
+ var/static/list/banned_edits = list("step_x" = TRUE, "step_y" = TRUE, "step_size" = TRUE, "bounds" = TRUE)
+ var/static/list/careful_edits = list("bound_x" = TRUE, "bound_y" = TRUE, "bound_width" = TRUE, "bound_height" = TRUE)
+ if(banned_edits[var_name])
return FALSE //PLEASE no.
- if((var_name in careful_edits) && (var_value % world.icon_size) != 0)
+ if((careful_edits[var_name]) && (var_value % world.icon_size) != 0)
return FALSE
+
switch(var_name)
if(NAMEOF(src, x))
var/turf/T = locate(var_value, y, z)
if(T)
- forceMove(T)
+ admin_teleport(T, !massedit)
return TRUE
return FALSE
if(NAMEOF(src, y))
var/turf/T = locate(x, var_value, z)
if(T)
- forceMove(T)
+ admin_teleport(T, !massedit)
return TRUE
return FALSE
if(NAMEOF(src, z))
var/turf/T = locate(x, y, var_value)
if(T)
- forceMove(T)
+ admin_teleport(T, !massedit)
return TRUE
return FALSE
if(NAMEOF(src, loc))
- if(istype(var_value, /atom))
- forceMove(var_value)
- return TRUE
- else if(isnull(var_value))
- moveToNullspace()
+ if(isatom(var_value) || isnull(var_value))
+ admin_teleport(var_value, !massedit)
return TRUE
return FALSE
+ if(NAMEOF(src, anchored))
+ set_anchored(var_value)
+ . = TRUE
+ if(NAMEOF(src, pulledby))
+ set_pulledby(var_value)
+ . = TRUE
+ if(NAMEOF(src, glide_size))
+ set_glide_size(var_value)
+ . = TRUE
+
+ if(!isnull(.))
+ datum_flags |= DF_VAR_EDITED
+ return
+
return ..()
/atom/movable/proc/start_pulling(atom/movable/AM, state, force = move_force, supress_message = FALSE)
@@ -168,48 +216,73 @@
AMob.grabbedby(src)
return TRUE
stop_pulling()
+
+ // SEND_SIGNAL(src, COMSIG_ATOM_START_PULL, AM, state, force)
+
if(AM.pulledby)
log_combat(AM, AM.pulledby, "pulled from", src)
AM.pulledby.stop_pulling() //an object can't be pulled by two mobs at once.
pulling = AM
- AM.pulledby = src
+ AM.set_pulledby(src)
setGrabState(state)
if(ismob(AM))
var/mob/M = AM
log_combat(src, M, "grabbed", addition="passive grab")
if(!supress_message)
- visible_message("[src] has grabbed [M] passively! ")
+ M.visible_message("[src] grabs [M] passively. ", \
+ "[src] grabs you passively. ")
return TRUE
/atom/movable/proc/stop_pulling()
if(!pulling)
return
- pulling.pulledby = null
+ pulling.set_pulledby(null)
var/mob/living/ex_pulled = pulling
+ setGrabState(GRAB_PASSIVE)
pulling = null
- setGrabState(0)
if(isliving(ex_pulled))
var/mob/living/L = ex_pulled
L.update_mobility()// mob gets up if it was lyng down in a chokehold
+///Reports the event of the change in value of the pulledby variable.
+/atom/movable/proc/set_pulledby(new_pulledby)
+ if(new_pulledby == pulledby)
+ return FALSE //null signals there was a change, be sure to return FALSE if none happened here.
+ . = pulledby
+ pulledby = new_pulledby
+
/atom/movable/proc/Move_Pulled(atom/A)
if(!pulling)
- return
+ return FALSE
if(pulling.anchored || pulling.move_resist > move_force || !pulling.Adjacent(src))
stop_pulling()
- return
+ return FALSE
if(isliving(pulling))
var/mob/living/L = pulling
if(L.buckled && L.buckled.buckle_prevents_pull) //if they're buckled to something that disallows pulling, prevent it
stop_pulling()
- return
+ return FALSE
if(A == loc && pulling.density)
- return
- if(!Process_Spacemove(get_dir(pulling.loc, A)))
- return
- step(pulling, get_dir(pulling.loc, A))
+ return FALSE
+ var/move_dir = get_dir(pulling.loc, A)
+ if(!Process_Spacemove(move_dir))
+ return FALSE
+ pulling.Move(get_step(pulling.loc, move_dir), move_dir, glide_size)
return TRUE
+/**
+ * Recursively set glide size for atom's pulled things
+ */
+/atom/movable/proc/recursive_pulled_glidesize_update()
+ var/list/ran = list()
+ var/atom/movable/updating = pulling
+ while(updating)
+ if(ran[updating])
+ return
+ updating.set_glide_size(glide_size, FALSE)
+ ran[updating] = TRUE
+ updating = updating.pulling
+
/atom/movable/proc/check_pulling()
if(pulling)
var/atom/movable/pullee = pulling
@@ -229,54 +302,57 @@
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/Destroy(force)
- QDEL_NULL(proximity_monitor)
- QDEL_NULL(language_holder)
- QDEL_NULL(em_block)
+/atom/movable/proc/set_glide_size(target = 8, recursive = TRUE)
+#ifdef SMOOTH_MOVEMENT
+ // SEND_SIGNAL(src, COMSIG_MOVABLE_UPDATE_GLIDE_SIZE, target)
+ glide_size = target
- unbuckle_all_mobs(force=1)
+ for(var/m in buckled_mobs)
+ var/mob/buckled_mob = m
+ buckled_mob.set_glide_size(target)
- . = ..()
+ if(recursive)
+ recursive_pulled_glidesize_update()
+#else
+ return
+#endif
- if(loc)
- //Restore air flow if we were blocking it (movables with ATMOS_PASS_PROC will need to do this manually if necessary)
- if(((CanAtmosPass == ATMOS_PASS_DENSITY && density) || CanAtmosPass == ATMOS_PASS_NO) && isturf(loc))
- CanAtmosPass = ATMOS_PASS_YES
- air_update_turf(TRUE)
- loc.handle_atom_del(src)
- for(var/atom/movable/AM in contents)
- qdel(AM)
- moveToNullspace()
- invisibility = INVISIBILITY_ABSTRACT
- if(pulledby)
- pulledby.stop_pulling()
-
- if(orbiting)
- orbiting.end_orbit(src)
- orbiting = null
+///Sets the anchored var and returns if it was sucessfully changed or not.
+/atom/movable/proc/set_anchored(anchorvalue)
+ SHOULD_CALL_PARENT(TRUE)
+ if(anchored == anchorvalue)
+ return
+ . = anchored
+ anchored = anchorvalue
+ // SEND_SIGNAL(src, COMSIG_MOVABLE_SET_ANCHORED, anchorvalue)
/atom/movable/proc/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
- set waitfor = 0
+ set waitfor = FALSE
var/hitpush = TRUE
var/impact_signal = SEND_SIGNAL(src, COMSIG_MOVABLE_IMPACT, hit_atom, throwingdatum)
if(impact_signal & COMPONENT_MOVABLE_IMPACT_FLIP_HITPUSH)
hitpush = FALSE // hacky, tie this to something else or a proper workaround later
- if(impact_signal & ~COMPONENT_MOVABLE_IMPACT_NEVERMIND) // in case a signal interceptor broke or deleted the thing before we could process our hit
- return hit_atom.hitby(src, throwingdatum = throwingdatum, hitpush = hitpush)
+ if(!(impact_signal && (impact_signal & COMPONENT_MOVABLE_IMPACT_NEVERMIND))) // in case a signal interceptor broke or deleted the thing before we could process our hit
+ return hit_atom.hitby(src, throwingdatum=throwingdatum, hitpush=hitpush)
/atom/movable/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked, datum/thrownthing/throwingdatum)
if(!anchored && hitpush && (!throwingdatum || (throwingdatum.force >= (move_resist * MOVE_FORCE_PUSH_RATIO))))
step(src, AM.dir)
..()
-/atom/movable/proc/safe_throw_at(atom/target, range, speed, mob/thrower, spin = TRUE, diagonals_first = FALSE, datum/callback/callback, force = INFINITY, messy_throw = TRUE)
+/atom/movable/proc/safe_throw_at(atom/target, range, speed, mob/thrower, spin = TRUE, diagonals_first = FALSE, datum/callback/callback, force = MOVE_FORCE_STRONG, gentle = FALSE)
if((force < (move_resist * MOVE_FORCE_THROW_RATIO)) || (move_resist == INFINITY))
return
- return throw_at(target, range, speed, thrower, spin, diagonals_first, callback, force, messy_throw)
+ return throw_at(target, range, speed, thrower, spin, diagonals_first, callback, force, gentle)
-/atom/movable/proc/throw_at(atom/target, range, speed, mob/thrower, spin = TRUE, diagonals_first = FALSE, datum/callback/callback, force = INFINITY, messy_throw = TRUE) //If this returns FALSE then callback will not be called.
+///If this returns FALSE then callback will not be called.
+/atom/movable/proc/throw_at(atom/target, range, speed, mob/thrower, spin = TRUE, diagonals_first = FALSE, datum/callback/callback, force = MOVE_FORCE_STRONG, gentle = FALSE, quickstart = TRUE)
. = FALSE
+
+ if(QDELETED(src))
+ CRASH("Qdeleted thing being thrown around.")
+
if (!target || speed <= 0)
return
@@ -288,7 +364,7 @@
//They are moving! Wouldn't it be cool if we calculated their momentum and added it to the throw?
if (thrower && thrower.last_move && thrower.client && thrower.client.move_delay >= world.time + world.tick_lag*2)
- var/user_momentum = thrower.movement_delay()
+ var/user_momentum = thrower.movement_delay() //cached_multiplicative_slowdown
if (!user_momentum) //no movement_delay, this means they move once per byond tick, lets calculate from that instead.
user_momentum = world.tick_lag
@@ -312,19 +388,13 @@
. = TRUE // No failure conditions past this point.
- var/datum/thrownthing/TT = new()
- TT.thrownthing = src
- TT.target = target
- TT.target_turf = get_turf(target)
- TT.init_dir = get_dir(src, target)
- TT.maxrange = range
- TT.speed = speed
- TT.thrower = thrower
- TT.diagonals_first = diagonals_first
- TT.force = force
- TT.callback = callback
- if(!QDELETED(thrower))
- TT.target_zone = thrower.zone_selected
+ var/target_zone
+ if(QDELETED(thrower))
+ thrower = null //Let's not pass a qdeleting reference if any.
+ else
+ target_zone = thrower.zone_selected
+
+ var/datum/thrownthing/TT = new(src, target, get_turf(target), get_dir(src, target), range, speed, thrower, diagonals_first, force, gentle, callback, target_zone)
var/dist_x = abs(target.x - src.x)
var/dist_y = abs(target.y - src.y)
@@ -359,7 +429,8 @@
SSthrowing.processing[src] = TT
if (SSthrowing.state == SS_PAUSED && length(SSthrowing.currentrun))
SSthrowing.currentrun[src] = TT
- TT.tick()
+ if (quickstart)
+ TT.tick()
/atom/movable/proc/force_pushed(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction)
return FALSE
@@ -382,13 +453,13 @@
return TRUE
return ..()
-// called when this atom is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called.
-/atom/movable/proc/on_exit_storage(datum/component/storage/concrete/S)
- return
+/// called when this atom is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called.
+/atom/movable/proc/on_exit_storage(datum/component/storage/concrete/S) // rename S to master_storage
+ // SEND_SIGNAL(src, COMSIG_STORAGE_EXITED, master_storage)
-// called when this atom is added into a storage item, which is passed on as S. The loc variable is already set to the storage item.
+/// called when this atom is added into a storage item, which is passed on as S. The loc variable is already set to the storage item.
/atom/movable/proc/on_enter_storage(datum/component/storage/concrete/S)
- return
+ // SEND_SIGNAL(src, COMSIG_STORAGE_ENTERED, master_storage)
/atom/movable/proc/get_spacemove_backup()
var/atom/movable/dense_object_backup
@@ -422,24 +493,26 @@
return //don't do an animation if attacking self
var/pixel_x_diff = 0
var/pixel_y_diff = 0
+ var/turn_dir = 1
var/direction = get_dir(src, A)
if(direction & NORTH)
pixel_y_diff = 8
+ turn_dir = prob(50) ? -1 : 1
else if(direction & SOUTH)
pixel_y_diff = -8
+ turn_dir = prob(50) ? -1 : 1
if(direction & EAST)
pixel_x_diff = 8
else if(direction & WEST)
pixel_x_diff = -8
+ turn_dir = -1
- var/matrix/OM = matrix(transform)
- var/matrix/M = matrix(transform)
- M.Turn(pixel_x_diff ? pixel_x_diff*2 : pick(-16, 16))
-
- animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, transform = M, time = 2)
- animate(src, pixel_x = pixel_x - pixel_x_diff, pixel_y = pixel_y - pixel_y_diff, transform = OM, time = 2)
+ var/matrix/initial_transform = matrix(transform)
+ var/matrix/rotated_transform = transform.Turn(15 * turn_dir)
+ animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, transform=rotated_transform, time = 1, easing=BACK_EASING|EASE_IN)
+ animate(pixel_x = pixel_x - pixel_x_diff, pixel_y = pixel_y - pixel_y_diff, transform=initial_transform, time = 2, easing=SINE_EASING)
/atom/movable/proc/do_item_attack_animation(atom/A, visual_effect_icon, obj/item/used_item)
var/image/I
@@ -450,21 +523,21 @@
I.plane = GAME_PLANE
// Scale the icon.
- I.transform *= 0.75
+ I.transform *= 0.4
// The icon should not rotate.
I.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
// Set the direction of the icon animation.
var/direction = get_dir(src, A)
if(direction & NORTH)
- I.pixel_y = -16
+ I.pixel_y = -12
else if(direction & SOUTH)
- I.pixel_y = 16
+ I.pixel_y = 12
if(direction & EAST)
- I.pixel_x = -16
+ I.pixel_x = -14
else if(direction & WEST)
- I.pixel_x = 16
+ I.pixel_x = 14
if(!direction) // Attacked self?!
I.pixel_z = 16
@@ -472,10 +545,12 @@
if(!I)
return
- flick_overlay(I, GLOB.clients, 5) // 5 ticks/half a second
+ flick_overlay(I, GLOB.clients, 10)
// And animate the attack!
- animate(I, alpha = 175, pixel_x = 0, pixel_y = 0, pixel_z = 0, time = 3)
+ animate(I, alpha = 175, transform = matrix() * 0.75, pixel_x = 0, pixel_y = 0, pixel_z = 0, time = 3)
+ animate(time = 1)
+ animate(alpha = 0, time = 3, easing = CIRCULAR_EASING|EASE_OUT)
/atom/movable/vv_get_dropdown()
. = ..()
@@ -495,16 +570,14 @@
/atom/movable/proc/float(on, throw_override)
if(throwing || !throw_override)
return
- if(on && (!(movement_type & FLOATING) || floating_need_update))
- animate(src, pixel_y = pixel_y + 2, time = 10, loop = -1)
- sleep(10)
- animate(src, pixel_y = pixel_y - 2, time = 10, loop = -1)
- if(!(movement_type & FLOATING))
- setMovetype(movement_type | FLOATING)
- else if (!on && movement_type & FLOATING)
+ if(on && !(movement_type & FLOATING))
+ animate(src, pixel_y = 2, time = 10, loop = -1, flags = ANIMATION_RELATIVE)
+ animate(pixel_y = -2, time = 10, loop = -1, flags = ANIMATION_RELATIVE)
+ setMovetype(movement_type | FLOATING)
+ else if (!on && (movement_type & FLOATING))
animate(src, pixel_y = initial(pixel_y), time = 10)
setMovetype(movement_type & ~FLOATING)
- floating_need_update = FALSE
+ floating_need_update = FALSE // assume it's done
/* Language procs
* Unless you are doing something very specific, these are the ones you want to use.
@@ -611,10 +684,32 @@
return FALSE
return TRUE
-/// Updates the grab state of the movable
-/// This exists to act as a hook for behaviour
+/**
+ * Updates the grab state of the movable
+ *
+ * This exists to act as a hook for behaviour
+ */
/atom/movable/proc/setGrabState(newstate)
+ if(newstate == grab_state)
+ return
+ // SEND_SIGNAL(src, COMSIG_MOVABLE_SET_GRAB_STATE, newstate)
+ . = grab_state
grab_state = newstate
+ // switch(grab_state) // Current state.
+ // if(GRAB_PASSIVE)
+ // REMOVE_TRAIT(pulling, TRAIT_IMMOBILIZED, CHOKEHOLD_TRAIT)
+ // REMOVE_TRAIT(pulling, TRAIT_HANDS_BLOCKED, CHOKEHOLD_TRAIT)
+ // if(. >= GRAB_NECK) // Previous state was a a neck-grab or higher.
+ // REMOVE_TRAIT(pulling, TRAIT_FLOORED, CHOKEHOLD_TRAIT)
+ // if(GRAB_AGGRESSIVE)
+ // if(. >= GRAB_NECK) // Grab got downgraded.
+ // REMOVE_TRAIT(pulling, TRAIT_FLOORED, CHOKEHOLD_TRAIT)
+ // else // Grab got upgraded from a passive one.
+ // ADD_TRAIT(pulling, TRAIT_IMMOBILIZED, CHOKEHOLD_TRAIT)
+ // ADD_TRAIT(pulling, TRAIT_HANDS_BLOCKED, CHOKEHOLD_TRAIT)
+ // if(GRAB_NECK, GRAB_KILL)
+ // if(. <= GRAB_AGGRESSIVE)
+ // ADD_TRAIT(pulling, TRAIT_FLOORED, CHOKEHOLD_TRAIT)
/obj/item/proc/do_pickup_animation(atom/target)
set waitfor = FALSE
@@ -626,31 +721,24 @@
I.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
var/turf/T = get_turf(src)
var/direction
- var/to_x = 0
- var/to_y = 0
+ var/to_x = initial(target.pixel_x)
+ var/to_y = initial(target.pixel_y)
if(!QDELETED(T) && !QDELETED(target))
direction = get_dir(T, target)
if(direction & NORTH)
- to_y = 32
+ to_y += 32
else if(direction & SOUTH)
- to_y = -32
+ to_y -= 32
if(direction & EAST)
- to_x = 32
+ to_x += 32
else if(direction & WEST)
- to_x = -32
+ to_x -= 32
if(!direction)
- to_y = 16
+ to_y += 16
flick_overlay(I, GLOB.clients, 6)
var/matrix/M = new
M.Turn(pick(-30, 30))
animate(I, alpha = 175, pixel_x = to_x, pixel_y = to_y, time = 3, transform = M, easing = CUBIC_EASING)
sleep(1)
animate(I, alpha = 0, transform = matrix(), time = 1)
-
-/atom/movable/proc/set_anchored(anchorvalue) //literally only for plumbing ran
- SHOULD_CALL_PARENT(TRUE)
- if(anchored == anchorvalue)
- return
- . = anchored
- anchored = anchorvalue
diff --git a/code/game/atoms_movement.dm b/code/game/atoms_movement.dm
index db9424d983..4f07ff6f95 100644
--- a/code/game/atoms_movement.dm
+++ b/code/game/atoms_movement.dm
@@ -5,8 +5,7 @@
// Here's where we rewrite how byond handles movement except slightly different
// To be removed on step_ conversion
// All this work to prevent a second bump
-/atom/movable/Move(atom/newloc, direct=0)
- set waitfor = FALSE //n o
+/atom/movable/Move(atom/newloc, direct=0, glide_size_override = 0)
. = FALSE
if(!newloc || newloc == loc)
return
@@ -52,8 +51,7 @@
//
////////////////////////////////////////
-/atom/movable/Move(atom/newloc, direct)
- set waitfor = FALSE //n o
+/atom/movable/Move(atom/newloc, direct, glide_size_override = 0)
var/atom/movable/pullee = pulling
var/turf/T = loc
if(!moving_from_pull)
@@ -61,6 +59,9 @@
if(!loc || !newloc)
return FALSE
var/atom/oldloc = loc
+ //Early override for some cases like diagonal movement
+ if(glide_size_override)
+ set_glide_size(glide_size_override, FALSE)
if(loc != newloc)
if (!(direct & (direct - 1))) //Cardinal move
@@ -120,32 +121,38 @@
return
if(!loc || (loc == oldloc && oldloc != newloc))
- last_move = NONE
+ last_move = 0
return
+ setDir(direct)
if(.)
- last_move = direct
- setDir(direct)
-
- if(has_buckled_mobs() && !handle_buckled_mob_movement(loc,direct)) //movement failed due to buckled mob(s)
- return FALSE
-
- if(pulling && pulling == pullee && pulling != moving_from_pull) //we were pulling a thing and didn't lose it during our move.
- if(pulling.anchored)
- stop_pulling()
- else
- var/pull_dir = get_dir(src, pulling)
- //puller and pullee more than one tile away or in diagonal position
- if(get_dist(src, pulling) > 1 || (moving_diagonally != SECOND_DIAG_STEP && ((pull_dir - 1) & pull_dir)))
- pulling.moving_from_pull = src
- pulling.Move(T, get_dir(pulling, T)) //the pullee tries to reach our previous position
- pulling.moving_from_pull = null
Moved(oldloc, direct)
+ if(. && pulling && pulling == pullee && pulling != moving_from_pull) //we were pulling a thing and didn't lose it during our move.
+ if(pulling.anchored)
+ stop_pulling()
+ else
+ var/pull_dir = get_dir(src, pulling)
+ //puller and pullee more than one tile away or in diagonal position
+ if(get_dist(src, pulling) > 1 || (moving_diagonally != SECOND_DIAG_STEP && ((pull_dir - 1) & pull_dir)))
+ pulling.moving_from_pull = src
+ pulling.Move(T, get_dir(pulling, T), glide_size) //the pullee tries to reach our previous position
+ pulling.moving_from_pull = null
+ check_pulling()
-/atom/movable/proc/handle_buckled_mob_movement(newloc,direct)
+
+ //glide_size strangely enough can change mid movement animation and update correctly while the animation is playing
+ //This means that if you don't override it late like this, it will just be set back by the movement update that's called when you move turfs.
+ if(glide_size_override)
+ set_glide_size(glide_size_override, FALSE)
+
+ last_move = direct
+ if(. && has_buckled_mobs() && !handle_buckled_mob_movement(loc, direct, glide_size_override)) //movement failed due to buckled mob(s)
+ return FALSE
+
+/atom/movable/proc/handle_buckled_mob_movement(newloc, direct, glide_size_override)
for(var/m in buckled_mobs)
var/mob/living/buckled_mob = m
- if(!buckled_mob.Move(newloc, direct))
+ if(!buckled_mob.Move(newloc, direct, glide_size_override))
forceMove(buckled_mob.loc)
last_move = buckled_mob.last_move
inertia_dir = last_move
@@ -155,6 +162,7 @@
//Called after a successful Move(). By this point, we've already moved
/atom/movable/proc/Moved(atom/OldLoc, Dir, Forced = FALSE)
+ SHOULD_CALL_PARENT(TRUE)
SEND_SIGNAL(src, COMSIG_MOVABLE_MOVED, OldLoc, Dir, Forced)
if (!inertia_moving)
inertia_next_move = world.time + inertia_move_delay
@@ -174,6 +182,8 @@
//oldloc = old location on atom, inserted when forceMove is called and ONLY when forceMove is called!
/atom/movable/Crossed(atom/movable/AM, oldloc)
+ // SHOULD_CALL_PARENT(TRUE)
+ . = ..()
SEND_SIGNAL(src, COMSIG_MOVABLE_CROSSED, AM)
/atom/movable/Uncross(atom/movable/AM, atom/newloc)
@@ -204,7 +214,11 @@
var/atom/movable/AM = item
AM.onTransitZ(old_z,new_z)
+///Proc to modify the movement_type and hook behavior associated with it changing.
/atom/movable/proc/setMovetype(newval)
+ if(movement_type == newval)
+ return
+ . = movement_type
movement_type = newval
///////////// FORCED MOVEMENT /////////////
@@ -268,37 +282,44 @@
old_area.Exited(src, null)
loc = null
-//Called whenever an object moves and by mobs when they attempt to move themselves through space
-//And when an object or action applies a force on src, see newtonian_move() below
-//Return 0 to have src start/keep drifting in a no-grav area and 1 to stop/not start drifting
-//Mobs should return 1 if they should be able to move of their own volition, see client/Move() in mob_movement.dm
-//movement_dir == 0 when stopping or any dir when trying to move
+/**
+ * Called whenever an object moves and by mobs when they attempt to move themselves through space
+ * And when an object or action applies a force on src, see [newtonian_move][/atom/movable/proc/newtonian_move]
+ *
+ * Return 0 to have src start/keep drifting in a no-grav area and 1 to stop/not start drifting
+ *
+ * Mobs should return 1 if they should be able to move of their own volition, see [/client/proc/Move]
+ *
+ * Arguments:
+ * * movement_dir - 0 when stopping or any dir when trying to move
+ */
/atom/movable/proc/Process_Spacemove(movement_dir = 0)
if(has_gravity(src))
- return 1
+ return TRUE
- if(pulledby)
- return 1
+ if(pulledby && (pulledby.pulledby != src || moving_from_pull))
+ return TRUE
if(throwing)
- return 1
+ return TRUE
if(!isturf(loc))
- return 1
+ return TRUE
if(locate(/obj/structure/lattice) in range(1, get_turf(src))) //Not realistic but makes pushing things in space easier
- return 1
+ return TRUE
- return 0
+ return FALSE
-/atom/movable/proc/newtonian_move(direction) //Only moves the object if it's under no gravity
- if(!loc || Process_Spacemove(0))
+/// Only moves the object if it's under no gravity
+/atom/movable/proc/newtonian_move(direction)
+ if(!isturf(loc) || Process_Spacemove(0))
inertia_dir = 0
- return 0
+ return FALSE
inertia_dir = direction
if(!direction)
- return 1
+ return TRUE
inertia_last_loc = loc
SSspacedrift.processing[src] = src
- return 1
+ return TRUE
diff --git a/code/game/machinery/camera/motion.dm b/code/game/machinery/camera/motion.dm
index e515f56196..af5093d6ca 100644
--- a/code/game/machinery/camera/motion.dm
+++ b/code/game/machinery/camera/motion.dm
@@ -109,4 +109,4 @@
else if (world.time > detectTime)
detectTime = 0
for(var/obj/machinery/computer/security/telescreen/entertainment/TV in GLOB.machines)
- TV.notify(FALSE)
\ No newline at end of file
+ TV.notify(FALSE)
diff --git a/code/game/machinery/computer/arcade/battle.dm b/code/game/machinery/computer/arcade/battle.dm
index 5a0f0e9acf..96f224f4cf 100644
--- a/code/game/machinery/computer/arcade/battle.dm
+++ b/code/game/machinery/computer/arcade/battle.dm
@@ -60,7 +60,7 @@
blocked = TRUE
var/attackamt = rand(2,6)
temp = "You attack for [attackamt] damage!"
- playsound(loc, 'sound/arcade/hit.ogg', 50, 1, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/hit.ogg', 50, TRUE, extrarange = -3)
updateUsrDialog()
if(turtle > 0)
turtle--
@@ -74,7 +74,7 @@
var/pointamt = rand(1,3)
var/healamt = rand(6,8)
temp = "You use [pointamt] magic to heal for [healamt] damage!"
- playsound(loc, 'sound/arcade/heal.ogg', 50, 1, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/heal.ogg', 50, TRUE, extrarange = -3)
updateUsrDialog()
turtle++
@@ -89,7 +89,7 @@
blocked = TRUE
var/chargeamt = rand(4,7)
temp = "You regain [chargeamt] points"
- playsound(loc, 'sound/arcade/mana.ogg', 50, 1, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/mana.ogg', 50, TRUE, extrarange = -3)
player_mp += chargeamt
if(turtle > 0)
turtle--
@@ -124,7 +124,7 @@
if(!gameover)
gameover = TRUE
temp = "[enemy_name] has fallen! Rejoice!"
- playsound(loc, 'sound/arcade/win.ogg', 50, 1, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/win.ogg', 50, TRUE, extrarange = -3)
if(obj_flags & EMAGGED)
new /obj/effect/spawner/newbomb/timer/syndicate(loc)
@@ -141,13 +141,13 @@
else if ((obj_flags & EMAGGED) && (turtle >= 4))
var/boomamt = rand(5,10)
temp = "[enemy_name] throws a bomb, exploding you for [boomamt] damage!"
- playsound(loc, 'sound/arcade/boom.ogg', 50, 1, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/boom.ogg', 50, TRUE, extrarange = -3)
player_hp -= boomamt
else if ((enemy_mp <= 5) && (prob(70)))
var/stealamt = rand(2,3)
temp = "[enemy_name] steals [stealamt] of your power!"
- playsound(loc, 'sound/arcade/steal.ogg', 50, 1, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/steal.ogg', 50, TRUE, extrarange = -3)
player_mp -= stealamt
updateUsrDialog()
@@ -155,27 +155,27 @@
gameover = TRUE
sleep(turn_speed)
temp = "You have been drained! GAME OVER"
- playsound(loc, 'sound/arcade/lose.ogg', 50, 1, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/lose.ogg', 50, TRUE, extrarange = -3)
if(obj_flags & EMAGGED)
usr.gib()
SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("loss", "mana", (obj_flags & EMAGGED ? "emagged":"normal")))
else if ((enemy_hp <= 10) && (enemy_mp > 4))
temp = "[enemy_name] heals for 4 health!"
- playsound(loc, 'sound/arcade/heal.ogg', 50, 1, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/heal.ogg', 50, TRUE, extrarange = -3)
enemy_hp += 4
enemy_mp -= 4
else
var/attackamt = rand(3,6)
temp = "[enemy_name] attacks for [attackamt] damage!"
- playsound(loc, 'sound/arcade/hit.ogg', 50, 1, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/hit.ogg', 50, TRUE, extrarange = -3)
player_hp -= attackamt
if ((player_mp <= 0) || (player_hp <= 0))
gameover = TRUE
temp = "You have been crushed! GAME OVER"
- playsound(loc, 'sound/arcade/lose.ogg', 50, 1, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/lose.ogg', 50, TRUE, extrarange = -3)
if(obj_flags & EMAGGED)
usr.gib()
SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("loss", "hp", (obj_flags & EMAGGED ? "emagged":"normal")))
diff --git a/code/game/machinery/computer/arcade/minesweeper.dm b/code/game/machinery/computer/arcade/minesweeper.dm
index a9c9b5dfd9..3f7ef778b0 100644
--- a/code/game/machinery/computer/arcade/minesweeper.dm
+++ b/code/game/machinery/computer/arcade/minesweeper.dm
@@ -78,7 +78,7 @@
columns = 0
mine_placed = 0
if(href_list["Easy"])
- playsound(loc, startup_sound, 50, 0, extrarange = -3, falloff = 10)
+ playsound(loc, startup_sound, 50, FALSE, extrarange = -3)
flag_text = "OFF"
game_status = MINESWEEPER_GAME_PLAYING
reset_board = TRUE
@@ -87,7 +87,7 @@
columns = 10
mine_limit = 10
if(href_list["Intermediate"])
- playsound(loc, startup_sound, 50, 0, extrarange = -3, falloff = 10)
+ playsound(loc, startup_sound, 50, FALSE, extrarange = -3)
flag_text = "OFF"
game_status = MINESWEEPER_GAME_PLAYING
reset_board = TRUE
@@ -96,7 +96,7 @@
columns = 17
mine_limit = 40
if(href_list["Hard"])
- playsound(loc, startup_sound, 50, 0, extrarange = -3, falloff = 10)
+ playsound(loc, startup_sound, 50, FALSE, extrarange = -3)
flag_text = "OFF"
game_status = MINESWEEPER_GAME_PLAYING
reset_board = TRUE
@@ -110,9 +110,9 @@
game_status = MINESWEEPER_GAME_PLAYING
reset_board = TRUE
difficulty = "Custom"
- playsound(loc, startup_sound, 50, 0, extrarange = -3, falloff = 10)
+ playsound(loc, startup_sound, 50, FALSE, extrarange = -3)
if(href_list["Flag"])
- playsound(loc, 'sound/arcade/minesweeper_boardpress.ogg', 50, 0, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/minesweeper_boardpress.ogg', 50, FALSE, extrarange = -3)
if(!flagging)
flagging = TRUE
flag_text = "ON"
@@ -122,10 +122,10 @@
if(game_status == MINESWEEPER_GAME_MAIN_MENU)
if(CHECK_BITFIELD(obj_flags, EMAGGED))
- playsound(loc, 'sound/arcade/minesweeper_emag2.ogg', 50, 0, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/minesweeper_emag2.ogg', 50, FALSE, extrarange = -3)
web += "Explode in the game, explode in real life! What difficulty do you want to play?Easy (9x9 board, 10 mines) Intermediate (16x16 board, 40 mines) Hard (16x30 board, 99 mines) Custom "
else
- playsound(loc, 'sound/arcade/minesweeper_startup.ogg', 50, 0, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/minesweeper_startup.ogg', 50, FALSE, extrarange = -3)
web += web_difficulty_menu
if(game_status == MINESWEEPER_GAME_PLAYING)
@@ -152,7 +152,7 @@
if(table[y1][x1] < 10 && table[y1][x1] >= 0) //Check that it's not already revealed, and stop flag removal if we're out of flag mode
table[y1][x1] += 10
if(table[y1][x1] != 10)
- playsound(loc, 'sound/arcade/minesweeper_boardpress.ogg', 50, 0, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/minesweeper_boardpress.ogg', 50, FALSE, extrarange = -3)
else
if(game_status != MINESWEEPER_GAME_LOST && game_status != MINESWEEPER_GAME_WON)
game_status = MINESWEEPER_GAME_LOST
@@ -164,14 +164,14 @@
if(mine_sound)
switch(rand(1,3)) //Play every time a mine is hit
if(1)
- playsound(loc, 'sound/arcade/minesweeper_explosion1.ogg', 50, 0, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/minesweeper_explosion1.ogg', 50, FALSE, extrarange = -3)
if(2)
- playsound(loc, 'sound/arcade/minesweeper_explosion2.ogg', 50, 0, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/minesweeper_explosion2.ogg', 50, FALSE, extrarange = -3)
if(3)
- playsound(loc, 'sound/arcade/minesweeper_explosion3.ogg', 50, 0, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/minesweeper_explosion3.ogg', 50, FALSE, extrarange = -3)
mine_sound = FALSE
else
- playsound(loc, 'sound/arcade/minesweeper_boardpress.ogg', 50, 0, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/minesweeper_boardpress.ogg', 50, FALSE, extrarange = -3)
if(table[y1][x1] >= 0) //Check that it's not already flagged
table[y1][x1] -= 10
else if(table[y1][x1] < 0) //If flagged, remove the flag
@@ -182,7 +182,7 @@
game_status = MINESWEEPER_GAME_PLAYING
if(table[y1][x1] >= 10) //If revealed, become unrevealed!
if(mine_sound)
- playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, FALSE, extrarange = -3)
mine_sound = FALSE
table[y1][x1] -= 10
if(table[y1][x1] > 10 && !reset_board)
@@ -243,10 +243,10 @@
if(safe_squares_revealed >= win_condition && game_status == MINESWEEPER_GAME_PLAYING)
game_status = MINESWEEPER_GAME_WON
if(rows < 10 || columns < 10) //If less than easy difficulty
- playsound(loc, 'sound/arcade/minesweeper_winfail.ogg', 50, 0, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/minesweeper_winfail.ogg', 50, FALSE, extrarange = -3)
say("You cleared the board of all mines, but you picked too small of a board! Try again with at least a 9x9 board!")
else
- playsound(loc, 'sound/arcade/minesweeper_win.ogg', 50, 0, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/minesweeper_win.ogg', 50, FALSE, extrarange = -3)
say("You cleared the board of all mines! Congratulations!")
if(CHECK_BITFIELD(obj_flags, EMAGGED))
var/itemname
@@ -299,32 +299,32 @@
ENABLE_BITFIELD(obj_flags, EMAGGED)
if(game_status == MINESWEEPER_GAME_MAIN_MENU)
to_chat(user, "An ominous tune plays from the arcade's speakers! ")
- playsound(user, 'sound/arcade/minesweeper_emag1.ogg', 100, 0, extrarange = 3, falloff = 10)
+ playsound(user, 'sound/arcade/minesweeper_emag1.ogg', 100, FALSE, extrarange = 3)
else //Can't let you do that, star fox!
to_chat(user, "The machine buzzes and sparks... the game has been reset! ")
- playsound(user, 'sound/machines/buzz-sigh.ogg', 100, 0, extrarange = 3, falloff = 10) //Loud buzz
+ playsound(user, 'sound/machines/buzz-sigh.ogg', 100, FALSE, extrarange = 3) //Loud buzz
game_status = MINESWEEPER_GAME_MAIN_MENU
return TRUE
/obj/machinery/computer/arcade/minesweeper/proc/custom_generation(mob/user)
- playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10) //Entered into the menu so ping sound
+ playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, FALSE, extrarange = -3) //Entered into the menu so ping sound
var/new_rows = input(user, "How many rows do you want? (Minimum: 4, Maximum: 30)", "Minesweeper Rows") as null|num
if(!new_rows || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
return FALSE
new_rows = clamp(new_rows + 1, 4, 30)
- playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, FALSE, extrarange = -3)
var/new_columns = input(user, "How many columns do you want? (Minimum: 4, Maximum: 50)", "Minesweeper Squares") as null|num
if(!new_columns || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
return FALSE
new_columns = clamp(new_columns + 1, 4, 50)
- playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, FALSE, extrarange = -3)
var/grid_area = (new_rows - 1) * (new_columns - 1)
var/lower_limit = round(grid_area*0.156)
var/upper_limit = round(grid_area*0.85)
var/new_mine_limit = input(user, "How many mines do you want? (Minimum: [lower_limit], Maximum: [upper_limit])", "Minesweeper Mines") as null|num
if(!new_mine_limit || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
return FALSE
- playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, FALSE, extrarange = -3)
rows = new_rows
columns = new_columns
mine_limit = clamp(new_mine_limit, lower_limit, upper_limit)
diff --git a/code/game/machinery/computer/arcade/misc_arcade.dm b/code/game/machinery/computer/arcade/misc_arcade.dm
index 24516740f9..50633192ce 100644
--- a/code/game/machinery/computer/arcade/misc_arcade.dm
+++ b/code/game/machinery/computer/arcade/misc_arcade.dm
@@ -17,14 +17,14 @@
to_chat(c_user, "You move your hand towards the machine, and begin to hesitate as a bloodied guillotine emerges from inside of it... ")
if(do_after(c_user, 50, target = src))
to_chat(c_user, "The guillotine drops on your arm, and the machine sucks it in! ")
- playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
+ playsound(loc, 'sound/weapons/slice.ogg', 25, TRUE, -1)
var/which_hand = BODY_ZONE_L_ARM
if(!(c_user.active_hand_index % 2))
which_hand = BODY_ZONE_R_ARM
var/obj/item/bodypart/chopchop = c_user.get_bodypart(which_hand)
chopchop.dismember()
qdel(chopchop)
- playsound(loc, 'sound/arcade/win.ogg', 50, 1, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/win.ogg', 50, TRUE, extrarange = -3)
for(var/i=1; i<=rand(3,5); i++)
prizevend(user)
else
diff --git a/code/game/machinery/doors/alarmlock.dm b/code/game/machinery/doors/alarmlock.dm
index a563200575..fa516f4b6b 100644
--- a/code/game/machinery/doors/alarmlock.dm
+++ b/code/game/machinery/doors/alarmlock.dm
@@ -23,7 +23,7 @@
. = ..()
SSradio.remove_object(src, air_frequency)
air_connection = SSradio.add_object(src, air_frequency, RADIO_TO_AIRALARM)
- open()
+ INVOKE_ASYNC(src, .proc/open)
/obj/machinery/door/airlock/alarmlock/receive_signal(datum/signal/signal)
..()
diff --git a/code/game/machinery/quantum_pad.dm b/code/game/machinery/quantum_pad.dm
index f9fda50daf..4f706954a6 100644
--- a/code/game/machinery/quantum_pad.dm
+++ b/code/game/machinery/quantum_pad.dm
@@ -130,7 +130,7 @@
/obj/machinery/quantumpad/proc/doteleport(mob/user, obj/machinery/quantumpad/target_pad = linked_pad)
if(target_pad)
- playsound(get_turf(src), 'sound/weapons/flash.ogg', 25, 1)
+ playsound(get_turf(src), 'sound/weapons/flash.ogg', 25, TRUE)
teleporting = TRUE
spawn(teleport_speed)
@@ -155,9 +155,9 @@
target_pad.sparks()
flick("qpad-beam", src)
- playsound(get_turf(src), 'sound/weapons/emitter2.ogg', 25, 1, extrarange = 3, falloff = 5)
+ playsound(get_turf(src), 'sound/weapons/emitter2.ogg', 25, TRUE)
flick("qpad-beam", target_pad)
- playsound(get_turf(target_pad), 'sound/weapons/emitter2.ogg', 25, 1, extrarange = 3, falloff = 5)
+ playsound(get_turf(target_pad), 'sound/weapons/emitter2.ogg', 25, TRUE)
for(var/atom/movable/ROI in get_turf(src))
if(QDELETED(ROI))
continue //sleeps in CHECK_TICK
diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm
index 706d2bb9bf..2ffd556dc1 100644
--- a/code/game/machinery/recycler.dm
+++ b/code/game/machinery/recycler.dm
@@ -100,51 +100,54 @@
eat(AM)
. = ..()
-/obj/machinery/recycler/proc/eat(atom/AM0)
- if(stat & (BROKEN|NOPOWER) || safety_mode)
+/obj/machinery/recycler/proc/eat(atom/movable/AM0, sound=TRUE)
+ if(stat & (BROKEN|NOPOWER))
return
+ if(safety_mode)
+ return
+ if(!isturf(AM0.loc))
+ return //I don't know how you called Crossed() but stop it.
- var/list/to_eat
+ var/list/to_eat = AM0.GetAllContents()
- to_eat = list(AM0)
+ var/living_detected = FALSE //technically includes silicons as well but eh
+ var/list/nom = list()
+ var/list/crunchy_nom = list() //Mobs have to be handled differently so they get a different list instead of checking them multiple times.
- var/items_recycled = 0
- var/buzz = FALSE
for(var/i in to_eat)
var/atom/movable/AM = i
- if(QDELETED(AM))
- continue
- var/obj/item/bodypart/head/as_head = AM
- var/obj/item/mmi/as_mmi = AM
- var/brain_holder = istype(AM, /obj/item/organ/brain) || (istype(as_head) && as_head.brain) || (istype(as_mmi) && as_mmi.brain) || istype(AM, /obj/item/dullahan_relay)
- if(brain_holder)
- if(obj_flags & EMAGGED)
- continue
- else
- emergency_stop(AM)
- return
+ if(istype(AM, /obj/item))
+ var/obj/item/bodypart/head/as_head = AM
+ var/obj/item/mmi/as_mmi = AM
+ if(istype(AM, /obj/item/organ/brain) || (istype(as_head) && as_head.brain) || (istype(as_mmi) && as_mmi.brain) || istype(AM, /obj/item/dullahan_relay))
+ living_detected = TRUE
+ nom += AM
else if(isliving(AM))
- if((obj_flags & EMAGGED)||((!allowed(AM))&&(!ishuman(AM))))
- to_eat += crush_living(AM)
- else
- emergency_stop(AM)
- return
- else if(isitem(AM))
- var/obj/O = AM
- if(O.resistance_flags & INDESTRUCTIBLE)
- buzz = TRUE
- O.forceMove(loc)
- else
- to_eat += recycle_item(AM)
- items_recycled++
- else
- buzz = TRUE
- AM.forceMove(loc)
-
- if(items_recycled)
- playsound(src, item_recycle_sound, 50, 1)
- if(buzz)
- playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
+ living_detected = TRUE
+ crunchy_nom += AM
+ var/not_eaten = to_eat.len - nom.len - crunchy_nom.len
+ if(living_detected) // First, check if we have any living beings detected.
+ if(obj_flags & EMAGGED)
+ for(var/CRUNCH in crunchy_nom) // Eat them and keep going because we don't care about safety.
+ if(isliving(CRUNCH)) // MMIs and brains will get eaten like normal items
+ crush_living(CRUNCH)
+ else // Stop processing right now without eating anything.
+ emergency_stop()
+ return
+ for(var/nommed in nom)
+ recycle_item(nommed)
+ if(nom.len && sound)
+ playsound(src, item_recycle_sound, (50 + nom.len*5), TRUE, nom.len, ignore_walls = (nom.len - 10)) // As a substitute for playing 50 sounds at once.
+ if(not_eaten)
+ playsound(src, 'sound/machines/buzz-sigh.ogg', (50 + not_eaten*5), FALSE, not_eaten, ignore_walls = (not_eaten - 10)) // Ditto.
+ if(!ismob(AM0))
+ AM0.moveToNullspace()
+ qdel(AM0)
+ else // Lets not move a mob to nullspace and qdel it, yes?
+ for(var/i in AM0.contents)
+ var/atom/movable/content = i
+ content.moveToNullspace()
+ qdel(content)
/obj/machinery/recycler/proc/recycle_item(obj/item/I)
diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm
index 6282d74346..1fadad168e 100644
--- a/code/game/machinery/slotmachine.dm
+++ b/code/game/machinery/slotmachine.dm
@@ -11,6 +11,8 @@
#define SPIN_TIME 65 //As always, deciseconds.
#define REEL_DEACTIVATE_DELAY 7
#define SEVEN "7 "
+#define HOLOCHIP 1
+#define COIN 2
/obj/machinery/computer/slot_machine
name = "slot machine"
@@ -21,40 +23,48 @@
use_power = IDLE_POWER_USE
idle_power_usage = 50
circuit = /obj/item/circuitboard/computer/slot_machine
+ light_color = LIGHT_COLOR_BROWN
var/money = 3000 //How much money it has CONSUMED
var/plays = 0
- var/working = 0
+ var/working = FALSE
var/balance = 0 //How much money is in the machine, ready to be CONSUMED.
var/jackpots = 0
+ var/paymode = HOLOCHIP //toggles between HOLOCHIP/COIN, defined above
+ var/cointype = /obj/item/coin/iron //default cointype
+ var/list/coinvalues = list()
var/list/reels = list(list("", "", "") = 0, list("", "", "") = 0, list("", "", "") = 0, list("", "", "") = 0, list("", "", "") = 0)
var/list/symbols = list(SEVEN = 1, "& " = 2, "@ " = 2, "$ " = 2, "? " = 2, "# " = 2, "! " = 2, "% " = 2) //if people are winning too much, multiply every number in this list by 2 and see if they are still winning too much.
- light_color = LIGHT_COLOR_BROWN
/obj/machinery/computer/slot_machine/Initialize()
. = ..()
jackpots = rand(1, 4) //false hope
plays = rand(75, 200)
- toggle_reel_spin(1) //The reels won't spin unless we activate them
+ INVOKE_ASYNC(src, .proc/toggle_reel_spin, TRUE)//The reels won't spin unless we activate them
var/list/reel = reels[1]
for(var/i = 0, i < reel.len, i++) //Populate the reels.
randomize_reels()
- toggle_reel_spin(0)
+ INVOKE_ASYNC(src, .proc/toggle_reel_spin, FALSE)
+
+ for(cointype in typesof(/obj/item/coin))
+ var/obj/item/coin/C = new cointype
+ coinvalues["[cointype]"] = C.get_item_credit_value()
+ qdel(C) //Sigh
/obj/machinery/computer/slot_machine/Destroy()
if(balance)
- give_coins(balance)
+ give_payout(balance)
return ..()
-/obj/machinery/computer/slot_machine/process()
+/obj/machinery/computer/slot_machine/process(delta_time)
. = ..() //Sanity checks.
if(!.)
return .
- money++ //SPESSH MAJICKS
+ money += round(delta_time / 2) //SPESSH MAJICKS
/obj/machinery/computer/slot_machine/update_icon_state()
if(stat & NOPOWER)
@@ -69,27 +79,46 @@
else
icon_state = "slots1"
-/obj/machinery/computer/slot_machine/power_change()
- ..()
- update_icon()
-
/obj/machinery/computer/slot_machine/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/coin))
var/obj/item/coin/C = I
- if(prob(2))
- if(!user.transferItemToLoc(C, drop_location()))
- return
- C.throw_at(user, 3, 10)
- if(prob(10))
- balance = max(balance - SPIN_PRICE, 0)
- to_chat(user, "[src] spits your coin back out! ")
+ if(paymode == COIN)
+ if(prob(2))
+ if(!user.transferItemToLoc(C, drop_location()))
+ return
+ C.throw_at(user, 3, 10)
+ if(prob(10))
+ balance = max(balance - SPIN_PRICE, 0)
+ to_chat(user, "[src] spits your coin back out! ")
+ else
+ if(!user.temporarilyRemoveItemFromInventory(C))
+ return
+ to_chat(user, "You insert [C] into [src]'s slot! ")
+ balance += C.value
+ qdel(C)
else
- if(!user.temporarilyRemoveItemFromInventory(C))
+ to_chat(user, "This machine is only accepting holochips! ")
+ else if(istype(I, /obj/item/holochip))
+ if(paymode == HOLOCHIP)
+ var/obj/item/holochip/H = I
+ if(!user.temporarilyRemoveItemFromInventory(H))
return
- to_chat(user, "You insert [C] into [src]'s slot! ")
- balance += C.value
- qdel(C)
+ to_chat(user, "You insert [H.credits] holocredits into [src]'s slot! ")
+ balance += H.credits
+ qdel(H)
+ else
+ to_chat(user, "This machine is only accepting coins! ")
+ else if(I.tool_behaviour == TOOL_MULTITOOL)
+ if(balance > 0)
+ visible_message("[src] says, 'ERROR! Please empty the machine balance before altering paymode'") //Prevents converting coins into holocredits and vice versa
+ else
+ if(paymode == HOLOCHIP)
+ paymode = COIN
+ visible_message("[src] says, 'This machine now works with COINS!'")
+ else
+ paymode = HOLOCHIP
+ visible_message("[src] says, 'This machine now works with HOLOCHIPS!'")
else
return ..()
@@ -101,8 +130,7 @@
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(4, 0, src.loc)
spark_system.start()
- playsound(src, "sparks", 50, 1)
- return TRUE
+ playsound(src, "sparks", 50, TRUE)
/obj/machinery/computer/slot_machine/ui_interact(mob/living/user)
. = ..()
@@ -127,8 +155,9 @@
Play!
[reeltext]
-
- Refund balance "}
+ "}
+ if(balance > 0)
+ dat+="Refund balance "
var/datum/browser/popup = new(user, "slotmachine", "Slot Machine")
popup.set_content(dat)
@@ -143,21 +172,22 @@
spin(usr)
else if(href_list["refund"])
- give_coins(balance)
- balance = 0
+ if(balance > 0)
+ give_payout(balance)
+ balance = 0
/obj/machinery/computer/slot_machine/emp_act(severity)
. = ..()
if(stat & (NOPOWER|BROKEN) || . & EMP_PROTECT_SELF)
return
- if(prob(1500 / severity))
+ if(prob(15 * severity))
return
- if(prob(1 * severity/100)) // :^)
+ if(prob(1)) // :^)
obj_flags |= EMAGGED
var/severity_ascending = 4 - severity
money = max(rand(money - (200 * severity_ascending), money + (200 * severity_ascending)), 0)
balance = max(rand(balance - (50 * severity_ascending), balance + (50 * severity_ascending)), 0)
- money -= max(0, give_coins(min(rand(-50, 100 * severity_ascending)), money)) //This starts at -50 because it shouldn't always dispense coins yo
+ money -= max(0, give_payout(min(rand(-50, 100 * severity_ascending)), money)) //This starts at -50 because it shouldn't always dispense coins yo
spin()
/obj/machinery/computer/slot_machine/proc/spin(mob/user)
@@ -174,37 +204,43 @@
balance -= SPIN_PRICE
money += SPIN_PRICE
plays += 1
- working = 1
+ working = TRUE
toggle_reel_spin(1)
update_icon()
updateDialog()
- spawn(0)
- while(working)
- randomize_reels()
- updateDialog()
- sleep(2)
+ var/spin_loop = addtimer(CALLBACK(src, .proc/do_spin), 2, TIMER_LOOP|TIMER_STOPPABLE)
- spawn(SPIN_TIME - (REEL_DEACTIVATE_DELAY * reels.len)) //WARNING: no sanity checking for user since it's not needed and would complicate things (machine should still spin even if user is gone), be wary of this if you're changing this code.
- toggle_reel_spin(0, REEL_DEACTIVATE_DELAY)
- working = 0
- give_prizes(the_name, user)
- update_icon()
- updateDialog()
+ addtimer(CALLBACK(src, .proc/finish_spinning, spin_loop, user, the_name), SPIN_TIME - (REEL_DEACTIVATE_DELAY * reels.len))
+ //WARNING: no sanity checking for user since it's not needed and would complicate things (machine should still spin even if user is gone), be wary of this if you're changing this code.
+
+/obj/machinery/computer/slot_machine/proc/do_spin()
+ randomize_reels()
+ updateDialog()
+
+/obj/machinery/computer/slot_machine/proc/finish_spinning(spin_loop, mob/user, the_name)
+ toggle_reel_spin(0, REEL_DEACTIVATE_DELAY)
+ working = FALSE
+ deltimer(spin_loop)
+ give_prizes(the_name, user)
+ update_icon()
+ updateDialog()
/obj/machinery/computer/slot_machine/proc/can_spin(mob/user)
if(stat & NOPOWER)
to_chat(user, "The slot machine has no power! ")
+ return FALSE
if(stat & BROKEN)
to_chat(user, "The slot machine is broken! ")
+ return FALSE
if(working)
to_chat(user, "You need to wait until the machine stops spinning before you can play again! ")
- return 0
+ return FALSE
if(balance < SPIN_PRICE)
to_chat(user, "Insufficient money to play! ")
- return 0
- return 1
+ return FALSE
+ return TRUE
/obj/machinery/computer/slot_machine/proc/toggle_reel_spin(value, delay = 0) //value is 1 or 0 aka on or off
for(var/list/reel in reels)
@@ -223,23 +259,25 @@
var/linelength = get_lines()
if(reels[1][2] + reels[2][2] + reels[3][2] + reels[4][2] + reels[5][2] == "[SEVEN][SEVEN][SEVEN][SEVEN][SEVEN]")
- visible_message("[src] says, 'JACKPOT! You win [money] credits worth of coins!'")
+ visible_message("[src] says, 'JACKPOT! You win [money] credits!'")
priority_announce("Congratulations to [user ? user.real_name : usrname] for winning the jackpot at the slot machine in [get_area(src)]!")
jackpots += 1
- balance += money - give_coins(JACKPOT)
+ balance += money - give_payout(JACKPOT)
money = 0
-
- for(var/i = 0, i < 5, i++)
- var/cointype = pick(subtypesof(/obj/item/coin))
- var/obj/item/coin/C = new cointype(loc)
- random_step(C, 2, 50)
+ if(paymode == HOLOCHIP)
+ new /obj/item/holochip(loc,JACKPOT)
+ else
+ for(var/i = 0, i < 5, i++)
+ cointype = pick(subtypesof(/obj/item/coin))
+ var/obj/item/coin/C = new cointype(loc)
+ random_step(C, 2, 50)
else if(linelength == 5)
- visible_message("[src] says, 'Big Winner! You win a thousand credits worth of coins!'")
+ visible_message("[src] says, 'Big Winner! You win a thousand credits!'")
give_money(BIG_PRIZE)
else if(linelength == 4)
- visible_message("[src] says, 'Winner! You win four hundred credits worth of coins!'")
+ visible_message("[src] says, 'Winner! You win four hundred credits!'")
give_money(SMALL_PRIZE)
else if(linelength == 3)
@@ -271,12 +309,15 @@
/obj/machinery/computer/slot_machine/proc/give_money(amount)
var/amount_to_give = money >= amount ? amount : money
- var/surplus = amount_to_give - give_coins(amount_to_give)
+ var/surplus = amount_to_give - give_payout(amount_to_give)
money = max(0, money - amount)
balance += surplus
-/obj/machinery/computer/slot_machine/proc/give_coins(amount)
- var/cointype = obj_flags & EMAGGED ? /obj/item/coin/iron : /obj/item/coin/silver
+/obj/machinery/computer/slot_machine/proc/give_payout(amount)
+ if(paymode == HOLOCHIP)
+ cointype = /obj/item/holochip
+ else
+ cointype = obj_flags & EMAGGED ? /obj/item/coin/iron : /obj/item/coin/silver
if(!(obj_flags & EMAGGED))
amount = dispense(amount, cointype, null, 0)
@@ -288,22 +329,25 @@
return amount
-/obj/machinery/computer/slot_machine/proc/dispense(amount = 0, cointype = /obj/item/coin/silver, mob/living/target, throwit = FALSE)
- var/value = GLOB.coin_values[cointype] || GLOB.coin_values[/obj/item/coin/iron]
- INVOKE_ASYNC(src, .proc/become_rich, amount, value, cointype, target, throwit)
- return amount % value
+/obj/machinery/computer/slot_machine/proc/dispense(amount = 0, cointype = /obj/item/coin/silver, mob/living/target, throwit = 0)
+ if(paymode == HOLOCHIP)
+ var/obj/item/holochip/H = new /obj/item/holochip(loc,amount)
-/obj/machinery/computer/slot_machine/proc/become_rich(amount, value, cointype = /obj/item/coin/silver, mob/living/target, throwit = FALSE)
- if(value <= 0)
- return
- while(amount >= value && !QDELETED(src))
- var/obj/item/coin/C = new cointype(loc) //DOUBLE THE PAIN
- amount -= value
if(throwit && target)
- C.throw_at(target, 3, 10)
- else
- random_step(C, 2, 40)
- CHECK_TICK
+ H.throw_at(target, 3, 10)
+ else
+ var/value = coinvalues["[cointype]"]
+ if(value <= 0)
+ CRASH("Coin value of zero, refusing to payout in dispenser")
+ while(amount >= value)
+ var/obj/item/coin/C = new cointype(loc) //DOUBLE THE PAIN
+ amount -= value
+ if(throwit && target)
+ C.throw_at(target, 3, 10)
+ else
+ random_step(C, 2, 40)
+
+ return amount
#undef SEVEN
#undef SPIN_TIME
@@ -311,3 +355,5 @@
#undef BIG_PRIZE
#undef SMALL_PRIZE
#undef SPIN_PRICE
+#undef HOLOCHIP
+#undef COIN
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 88a5c3f20f..036aa6ed79 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -578,6 +578,7 @@
/obj/mecha/proc/mechstep(direction)
var/current_dir = dir
+ set_glide_size(DELAY_TO_GLIDE_SIZE(step_in))
var/result = step(src,direction)
if(strafe)
setDir(current_dir)
diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm
index bdb748925c..27b0aa4e66 100644
--- a/code/game/objects/buckling.dm
+++ b/code/game/objects/buckling.dm
@@ -14,6 +14,9 @@
if(.)
return
if(can_buckle && has_buckled_mobs())
+ if(ishuman(src)) //prevent people from unbuckling fireman-carried/piggybacked people unless on disarm or harm intents
+ if(act_intent == INTENT_HELP || act_intent == INTENT_GRAB)
+ return
if(buckled_mobs.len > 1)
var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in buckled_mobs
if(user_unbuckle_mob(unbuckled,user))
@@ -84,16 +87,22 @@
M.IgniteMob()
/atom/movable/proc/unbuckle_mob(mob/living/buckled_mob, force=FALSE)
- if(istype(buckled_mob) && buckled_mob.buckled == src && (buckled_mob.can_unbuckle() || force))
- . = buckled_mob
- buckled_mob.buckled = null
- buckled_mob.anchored = initial(buckled_mob.anchored)
- buckled_mob.update_mobility()
- buckled_mob.clear_alert("buckled")
- buckled_mobs -= buckled_mob
- SEND_SIGNAL(src, COMSIG_MOVABLE_UNBUCKLE, buckled_mob, force)
+ if(!isliving(buckled_mob))
+ CRASH("Non-living [buckled_mob] thing called unbuckle_mob() for source.")
+ if(buckled_mob.buckled != src)
+ CRASH("[buckled_mob] called unbuckle_mob() for source while having buckled as [buckled_mob.buckled].")
+ if(!force && !buckled_mob.can_unbuckle())
+ return
+ . = buckled_mob
+ buckled_mob.buckled = null
+ buckled_mob.anchored = initial(buckled_mob.anchored)
+ buckled_mob.update_mobility()
+ buckled_mob.clear_alert("buckled")
+ buckled_mob.set_glide_size(DELAY_TO_GLIDE_SIZE(buckled_mob.total_multiplicative_slowdown()))
+ buckled_mobs -= buckled_mob
+ SEND_SIGNAL(src, COMSIG_MOVABLE_UNBUCKLE, buckled_mob, force)
- post_unbuckle_mob(.)
+ post_unbuckle_mob(.)
/atom/movable/proc/unbuckle_all_mobs(force=FALSE)
if(!has_buckled_mobs())
diff --git a/code/game/objects/effects/alien_acid.dm b/code/game/objects/effects/alien_acid.dm
index 5276062121..6496b392c3 100644
--- a/code/game/objects/effects/alien_acid.dm
+++ b/code/game/objects/effects/alien_acid.dm
@@ -53,6 +53,7 @@
return 0
/obj/effect/acid/Crossed(AM as mob|obj)
+ . = ..()
if(isliving(AM))
var/mob/living/L = AM
if(L.movement_type & FLYING)
diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm
index 9d6d034364..8f8b83bfde 100644
--- a/code/game/objects/effects/anomalies.dm
+++ b/code/game/objects/effects/anomalies.dm
@@ -138,7 +138,7 @@
/obj/effect/anomaly/grav/high/Initialize(mapload, new_lifespan)
. = ..()
- setup_grav_field()
+ INVOKE_ASYNC(src, .proc/setup_grav_field)
/obj/effect/anomaly/grav/high/proc/setup_grav_field()
grav_field = make_field(/datum/proximity_monitor/advanced/gravity, list("current_range" = 7, "host" = src, "gravity_value" = rand(0,3)))
diff --git a/code/game/objects/effects/decals/cleanable/robots.dm b/code/game/objects/effects/decals/cleanable/robots.dm
index 8f8f27c3c6..9dd3c2a852 100644
--- a/code/game/objects/effects/decals/cleanable/robots.dm
+++ b/code/game/objects/effects/decals/cleanable/robots.dm
@@ -69,4 +69,5 @@
persistent = FALSE
/obj/effect/decal/cleanable/oil/slippery/Initialize()
+ . = ..()
AddComponent(/datum/component/slippery, 80, (NO_SLIP_WHEN_WALKING | SLIDE))
diff --git a/code/game/objects/effects/proximity.dm b/code/game/objects/effects/proximity.dm
index ab35d213ea..5c477501f4 100644
--- a/code/game/objects/effects/proximity.dm
+++ b/code/game/objects/effects/proximity.dm
@@ -5,6 +5,7 @@
var/list/checkers //list of /obj/effect/abstract/proximity_checkers
var/current_range
var/ignore_if_not_on_turf //don't check turfs in range if the host's loc isn't a turf
+ var/wire = FALSE
/datum/proximity_monitor/New(atom/_host, range, _ignore_if_not_on_turf = TRUE)
checkers = list()
@@ -35,6 +36,8 @@
return ..()
/datum/proximity_monitor/proc/HandleMove()
+ SIGNAL_HANDLER
+
var/atom/_host = host
var/atom/new_host_loc = _host.loc
if(last_host_loc != new_host_loc)
@@ -58,6 +61,8 @@
var/atom/_host = host
var/atom/loc_to_use = ignore_if_not_on_turf ? _host.loc : get_turf(_host)
+ if(wire && !isturf(loc_to_use)) //it makes assemblies attached on wires work
+ loc_to_use = get_turf(loc_to_use)
if(!isturf(loc_to_use)) //only check the host's loc
if(range)
var/obj/effect/abstract/proximity_checker/pc
@@ -109,4 +114,5 @@
/obj/effect/abstract/proximity_checker/Crossed(atom/movable/AM)
set waitfor = FALSE
- monitor?.hasprox_receiver.HasProximity(AM)
+ . = ..()
+ monitor?.hasprox_receiver?.HasProximity(AM)
diff --git a/code/game/objects/effects/spawners/bundle.dm b/code/game/objects/effects/spawners/bundle.dm
index 4304fc3c9c..58cd0f4fa9 100644
--- a/code/game/objects/effects/spawners/bundle.dm
+++ b/code/game/objects/effects/spawners/bundle.dm
@@ -170,6 +170,7 @@
/obj/item/clothing/under/rank/civilian/mime/sexy)
/obj/effect/spawner/bundle/crate/Initialize(mapload)
+ SHOULD_CALL_PARENT(FALSE)
if(items && items.len)
var/turf/T = get_turf(src)
var/obj/structure/closet/LC = locate(/obj/structure/closet) in T
diff --git a/code/game/objects/effects/spawners/lootdrop.dm b/code/game/objects/effects/spawners/lootdrop.dm
index bacbf3c388..5a0e1790a9 100644
--- a/code/game/objects/effects/spawners/lootdrop.dm
+++ b/code/game/objects/effects/spawners/lootdrop.dm
@@ -664,9 +664,8 @@
lootcount = 1
spawn_on_turf = FALSE
loot = list("" = 50,
- /obj/item/weaponcrafting/improvised_parts/rifle_receiver = 13,
- /obj/item/weaponcrafting/improvised_parts/shotgun_receiver = 13,
- /obj/item/weaponcrafting/improvised_parts/trigger_assembly = 12,
+ /obj/item/weaponcrafting/receiver = 25,
+ /obj/item/weaponcrafting/stock = 25,
)
/obj/effect/spawner/lootdrop/weapon_parts
@@ -674,8 +673,8 @@
lootcount = 1
spawn_on_turf = FALSE
loot = list("" = 80,
- /obj/item/weaponcrafting/improvised_parts/rifle_receiver = 5,
- /obj/item/weaponcrafting/improvised_parts/trigger_assembly = 5,
+ /obj/item/weaponcrafting/receiver = 5,
+ /obj/item/weaponcrafting/stock = 5,
)
/obj/effect/spawner/lootdrop/ammo
diff --git a/code/game/objects/effects/spawners/xeno_egg_delivery.dm b/code/game/objects/effects/spawners/xeno_egg_delivery.dm
index 9be52dab52..dd4a6ea479 100644
--- a/code/game/objects/effects/spawners/xeno_egg_delivery.dm
+++ b/code/game/objects/effects/spawners/xeno_egg_delivery.dm
@@ -15,5 +15,5 @@
message_admins("An alien egg has been delivered to [ADMIN_VERBOSEJMP(T)].")
log_game("An alien egg has been delivered to [AREACOORD(T)]")
var/message = "Attention [station_name()], we have entrusted you with a research specimen in [get_area_name(T, TRUE)]. Remember to follow all safety precautions when dealing with the specimen."
- SSticker.OnRoundstart(CALLBACK(GLOBAL_PROC, /proc/addtimer, CALLBACK(GLOBAL_PROC, /proc/print_command_report, message), announcement_time))
+ SSticker.OnRoundstart(CALLBACK(GLOBAL_PROC, /proc/_addtimer, CALLBACK(GLOBAL_PROC, /proc/print_command_report, message), announcement_time))
return INITIALIZE_HINT_QDEL
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index fa5ab19fba..46ac106b45 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -428,18 +428,19 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
/obj/item/proc/talk_into(mob/M, input, channel, spans, datum/language/language)
return ITALICS | REDUCE_RANGE
-/obj/item/proc/dropped(mob/user)
+/// Called when a mob drops an item.
+/obj/item/proc/dropped(mob/user, silent = FALSE)
SHOULD_CALL_PARENT(TRUE)
- current_equipped_slot = null
for(var/X in actions)
var/datum/action/A = X
A.Remove(user)
if(item_flags & DROPDEL)
qdel(src)
item_flags &= ~IN_INVENTORY
- if(SEND_SIGNAL(src, COMSIG_ITEM_DROPPED,user) & COMPONENT_DROPPED_RELOCATION)
- . = ITEM_RELOCATED_BY_DROPPED
- user.update_equipment_speed_mods()
+ SEND_SIGNAL(src, COMSIG_ITEM_DROPPED,user)
+ // if(!silent)
+ // playsound(src, drop_sound, DROP_SOUND_VOLUME, ignore_walls = FALSE)
+ user?.update_equipment_speed_mods()
// called just as an item is picked up (loc is not yet changed)
/obj/item/proc/pickup(mob/user)
@@ -478,23 +479,33 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
over.MouseDrop_T(src,usr)
return
-// called after an item is placed in an equipment slot
-// user is mob that equipped it
-// slot uses the slot_X defines found in setup.dm
-// for items that can be placed in multiple slots
-// note this isn't called during the initial dressing of a player
-/obj/item/proc/equipped(mob/user, slot)
+/**
+ * Called after an item is placed in an equipment slot.
+ *
+ * Note that hands count as slots.
+ *
+ * Arguments:
+ * * user is mob that equipped it
+ * * slot uses the slot_X defines found in setup.dm for items that can be placed in multiple slots
+ * * Initial is used to indicate whether or not this is the initial equipment (job datums etc) or just a player doing it
+ */
+/obj/item/proc/equipped(mob/user, slot, initial = FALSE)
SHOULD_CALL_PARENT(TRUE)
- . = SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot)
+ SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot)
current_equipped_slot = slot
- if(!(. & COMPONENT_NO_GRANT_ACTIONS))
- for(var/X in actions)
- var/datum/action/A = X
- if(item_action_slot_check(slot, user, A)) //some items only give their actions buttons when in a specific slot.
- A.Grant(user)
+ for(var/X in actions)
+ var/datum/action/A = X
+ if(item_action_slot_check(slot, user, A)) //some items only give their actions buttons when in a specific slot.
+ A.Grant(user)
item_flags |= IN_INVENTORY
+ // if(!initial)
+ // if(equip_sound && (slot_flags & slot))
+ // playsound(src, equip_sound, EQUIP_SOUND_VOLUME, TRUE, ignore_walls = FALSE)
+ // else if(slot == ITEM_SLOT_HANDS)
+ // playsound(src, pickup_sound, PICKUP_SOUND_VOLUME, ignore_walls = FALSE)
user.update_equipment_speed_mods()
+
//Overlays for the worn overlay so you can overlay while you overlay
//eg: ammo counters, primed grenade flashing, etc.
//"icon_file" is used automatically for inhands etc. to make sure it gets the right inhand file
@@ -661,6 +672,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
else
playsound(hit_atom, 'sound/weapons/throwtap.ogg', 1, volume, -1)
+ // else
+ // playsound(src, drop_sound, YEET_SOUND_VOLUME, ignore_walls = FALSE)
return hit_atom.hitby(src, 0, itempush, throwingdatum=throwingdatum)
/obj/item/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, force, messy_throw = TRUE)
diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm
index 4873962587..89d566f714 100644
--- a/code/game/objects/items/circuitboards/machine_circuitboards.dm
+++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm
@@ -263,6 +263,7 @@
/obj/machinery/vending/cola = "Robust Softdrinks",
/obj/machinery/vending/cigarette = "ShadyCigs Deluxe",
/obj/machinery/vending/games = "\improper Good Clean Fun",
+ /obj/machinery/vending/kink = "KinkMate",
/obj/machinery/vending/autodrobe = "AutoDrobe",
/obj/machinery/vending/assist = "\improper Vendomat",
/obj/machinery/vending/engivend = "\improper Engi-Vend",
diff --git a/code/game/objects/items/devices/dogborg_sleeper.dm b/code/game/objects/items/devices/dogborg_sleeper.dm
index 1f91196b24..4d57d05be4 100644
--- a/code/game/objects/items/devices/dogborg_sleeper.dm
+++ b/code/game/objects/items/devices/dogborg_sleeper.dm
@@ -347,9 +347,9 @@
last_hearcheck = world.time
for(var/mob/H in hearing_mobs)
if(!istype(H.loc, /obj/item/dogborg/sleeper))
- H.playsound_local(source, null, 45, falloff = 0, S = pred_death)
+ H.playsound_local(source, null, 45, S = pred_death)
else if(H in contents)
- H.playsound_local(source, null, 65, falloff = 0, S = prey_death)
+ H.playsound_local(source, null, 65, S = prey_death)
for(var/belly in T.vore_organs)
var/obj/belly/B = belly
for(var/atom/movable/thing in B)
@@ -391,9 +391,9 @@
last_hearcheck = world.time
for(var/mob/H in hearing_mobs)
if(!istype(H.loc, /obj/item/dogborg/sleeper))
- H.playsound_local(source, null, 45, falloff = 0, S = pred_digest)
+ H.playsound_local(source, null, 45, S = pred_digest)
else if(H in contents)
- H.playsound_local(source, null, 65, falloff = 0, S = prey_digest)
+ H.playsound_local(source, null, 65, S = prey_digest)
update_gut(hound)
diff --git a/code/game/objects/items/grenades/plastic.dm b/code/game/objects/items/grenades/plastic.dm
index 69f89d0150..ee259c4050 100644
--- a/code/game/objects/items/grenades/plastic.dm
+++ b/code/game/objects/items/grenades/plastic.dm
@@ -85,6 +85,7 @@
/obj/item/grenade/plastic/Crossed(atom/movable/AM)
if(nadeassembly)
nadeassembly.Crossed(AM)
+ . = ..()
/obj/item/grenade/plastic/on_found(mob/finder)
if(nadeassembly)
diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm
index a15e1368d8..a541fb8fe3 100644
--- a/code/game/objects/items/holy_weapons.dm
+++ b/code/game/objects/items/holy_weapons.dm
@@ -803,6 +803,7 @@
force = 4
throwforce = 0
attack_verb = list("whipped", "repented", "lashed", "flagellated")
+ slot_flags = ITEM_SLOT_BELT
var/praying = FALSE
var/deity_name = "Coderbus" //This is the default, hopefully won't actually appear if the religion subsystem is running properly
diff --git a/code/game/objects/items/plushes.dm b/code/game/objects/items/plushes.dm
index a5a3762a4f..c213fa34df 100644
--- a/code/game/objects/items/plushes.dm
+++ b/code/game/objects/items/plushes.dm
@@ -466,6 +466,7 @@ GLOBAL_LIST_INIT(valid_plushie_paths, valid_plushie_paths())
can_random_spawn = FALSE
/obj/item/toy/plush/random/Initialize()
+ SHOULD_CALL_PARENT(FALSE)
var/newtype
var/list/snowflake_list = CONFIG_GET(keyed_list/snowflake_plushies)
diff --git a/code/game/objects/items/puzzle_pieces.dm b/code/game/objects/items/puzzle_pieces.dm
index d0fd4dc3f6..345f3185da 100644
--- a/code/game/objects/items/puzzle_pieces.dm
+++ b/code/game/objects/items/puzzle_pieces.dm
@@ -134,7 +134,7 @@
/obj/item/pressure_plate/hologrid/Crossed(atom/movable/AM)
. = ..()
if(trigger_item && istype(AM, specific_item) && !claimed)
- AM.anchored = TRUE
+ AM.set_anchored(TRUE)
flick("laserbox_burn", AM)
trigger()
QDEL_IN(src, 15)
diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index 01d684adad..6e66f833c2 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -173,11 +173,11 @@
"You hear cutting. ")
use(2)
else if(I.is_drainable() && I.reagents.has_reagent(/datum/reagent/space_cleaner/sterilizine))
- if(!I.reagents.has_reagent(/datum/reagent/space_cleaner/sterilizine, 10))
+ if(!I.reagents.has_reagent(/datum/reagent/space_cleaner/sterilizine, 5))
to_chat(user, "There's not enough sterilizine in [I] to sterilize [src]! ")
return
- user.visible_message("[user] pours the contents of [I] onto [src], sterilizing it. ", "You pour the contents of [I] onto [src], sterilizing it. ")
- I.reagents.remove_reagent(/datum/reagent/space_cleaner/sterilizine, 10)
+ user.visible_message("[user] sterilizes [src] with the contents of [I]. ", "You pour the contents of [I] onto [src], sterilizing it. ")
+ I.reagents.remove_reagent(/datum/reagent/space_cleaner/sterilizine, 5)
new /obj/item/stack/medical/gauze/adv/one(user.drop_location())
use(1)
else
@@ -187,6 +187,9 @@
user.visible_message("[user] begins tightening \the [src] around [user.p_their()] neck! It looks like [user.p_they()] forgot how to use medical supplies! ")
return OXYLOSS
+/obj/item/stack/medical/gauze/one
+ amount = 1
+
/obj/item/stack/medical/gauze/improvised
name = "improvised gauze"
singular_name = "improvised gauze"
@@ -204,8 +207,9 @@
heal_brute = 6
self_delay = 45
other_delay = 15
- absorption_rate = 0.4
- absorption_capacity = 6
+ absorption_rate = 0.5
+ absorption_capacity = 12
+ splint_factor = 0.15
/obj/item/stack/medical/gauze/adv/one
amount = 1
@@ -472,3 +476,51 @@
return TRUE
to_chat(user, "You can't heal [M] with the \the [src]! ")
+
+/obj/item/stack/medical/nanogel
+ name = "nanogel"
+ singular_name = "nanogel"
+ desc = "A highly advanced gel that when applied on a sufficiently repaired robotic limb will neutralize internal damage if present, allowing further repairs without the need for surgery."
+ self_delay = 150 //Agonizingly slow if used on self, but, not completely forbidden because antags with robolimbs need a way to handle their thresholds.
+ other_delay = 30 //Pretty fast if used on others.
+ amount = 12
+ max_amount = 12 //Two synths worth of fixing, if every single bodypart of them has internal damage. Usually, probably more like 6-12.
+ icon_state = "nanogel"
+ var/being_applied = FALSE //No doafter stacking.
+
+/obj/item/stack/medical/nanogel/try_heal(mob/living/M, mob/user, silent = FALSE)
+ if(being_applied)
+ to_chat(user, "You are already applying [src]! ")
+ return
+ if(!iscarbon(M))
+ to_chat(user, "This won't work on [M]! ")
+ return
+ being_applied = TRUE
+ ..()
+ being_applied = FALSE
+
+/obj/item/stack/medical/nanogel/heal(mob/living/M, mob/user)
+ var/mob/living/carbon/C = M //Only carbons should be able to get here
+ if(!C)
+ return
+ var/obj/item/bodypart/affecting = C.get_bodypart(check_zone(user.zone_selected))
+ if(!affecting) //Missing limb?
+ to_chat(user, "[C] doesn't have \a [parse_zone(user.zone_selected)]! ")
+ return
+ if(!affecting.is_robotic_limb())
+ to_chat(user, "This won't work on nonrobotic limbs! ")
+ return
+ if(!affecting.threshhold_brute_passed && !affecting.threshhold_burn_passed)
+ to_chat(user, "There is no need to use this on [affecting] ")
+ return
+ if(affecting.threshhold_brute_passed && affecting.brute_dam == affecting.threshhold_passed_mindamage)
+ . = TRUE
+ affecting.threshhold_brute_passed = FALSE
+ if(affecting.threshhold_burn_passed && affecting.burn_dam == affecting.threshhold_passed_mindamage)
+ . = TRUE
+ affecting.threshhold_burn_passed = FALSE
+ if(.)
+ user.visible_message("The nanogel gets to work on [C], repairing [affecting]'s internal damage. ", "You watch as the nanogel gets to work on fixing the internal damage in [affecting]")
+ return
+ //If it gets here: It failed, lets tell the user why.
+ to_chat(user, "[src] fails to work on [affecting] due to residual [(affecting.threshhold_burn_passed && affecting.threshhold_burn_passed) ? "brute and burn" : "[affecting.threshhold_burn_passed ? "burn" : "brute"]"] damage! Perform some external repairs before using this. ")
diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm
index 9f126f492b..62949b45a8 100644
--- a/code/game/objects/items/stacks/sheets/sheet_types.dm
+++ b/code/game/objects/items/stacks/sheets/sheet_types.dm
@@ -246,7 +246,6 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
new /datum/stack_recipe("pew (right)", /obj/structure/chair/pew/right, 3, one_per_turf = TRUE, on_floor = TRUE),\
)),
null, \
- new/datum/stack_recipe("wooden firearm body", /obj/item/weaponcrafting/improvised_parts/wooden_body, 10, time = 20), \
new/datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 20), \
new/datum/stack_recipe("rolling pin", /obj/item/kitchen/rollingpin, 2, time = 30), \
new/datum/stack_recipe("wooden bucket", /obj/item/reagent_containers/glass/bucket/wood, 2, time = 30), \
@@ -391,7 +390,7 @@ GLOBAL_LIST_INIT(cloth_recipes, list ( \
new/datum/stack_recipe("construction bag", /obj/item/storage/bag/construction, 4), \
null, \
new/datum/stack_recipe("string", /obj/item/weaponcrafting/string, 1, time = 10), \
- new/datum/stack_recipe("improvised gauze", /obj/item/stack/medical/gauze/improvised, 1, 2, 6), \
+ new/datum/stack_recipe("improvised gauze", /obj/item/stack/medical/gauze/improvised, 1, 2, 10), \
new/datum/stack_recipe("rag", /obj/item/reagent_containers/rag, 1), \
new/datum/stack_recipe("towel", /obj/item/reagent_containers/rag/towel, 3), \
new/datum/stack_recipe("bedsheet", /obj/item/bedsheet, 3), \
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index 3e2bb675fa..520a400630 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -65,7 +65,7 @@
if(merge)
for(var/obj/item/stack/S in loc)
if(S.merge_type == merge_type)
- merge(S)
+ INVOKE_ASYNC(src, .proc/merge, S)
var/list/temp_recipes = get_main_recipes()
recipes = temp_recipes.Copy()
if(material_type)
diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm
index 0b0f37a1e0..fa3300aece 100644
--- a/code/game/objects/items/stunbaton.dm
+++ b/code/game/objects/items/stunbaton.dm
@@ -196,7 +196,7 @@
return FALSE
stunpwr *= round(stuncharge/hitcost, 0.1)
- if(!user.UseStaminaBuffer(getweight(user, STAM_COST_BATON_MOB_MULT), warn = TRUE))
+ if(user && !user.UseStaminaBuffer(getweight(user, STAM_COST_BATON_MOB_MULT), warn = TRUE))
return FALSE
if(!disarming)
@@ -317,12 +317,12 @@
/obj/item/melee/baton/boomerang
name = "\improper OZtek Boomerang"
desc = "A device invented in 2486 for the great Space Emu War by the confederacy of Australicus, these high-tech boomerangs also work exceptionally well at stunning crewmembers. Just be careful to catch it when thrown!"
- throw_speed = 1
+ throw_speed = 1.5
icon_state = "boomerang"
item_state = "boomerang"
force = 5
throwforce = 5
- throw_range = 5
+ throw_range = 10
hitcost = 2000
throw_hit_chance = 99 //Have you prayed today?
custom_materials = list(/datum/material/iron = 10000, /datum/material/glass = 4000, /datum/material/silver = 10000, /datum/material/gold = 2000)
@@ -331,7 +331,7 @@
if(turned_on)
if(ishuman(thrower))
var/mob/living/carbon/human/H = thrower
- H.throw_mode_off() //so they can catch it on the return.
+ H.throw_mode_on() //so they can catch it on the return.
return ..()
/obj/item/melee/baton/boomerang/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index 4e82df2452..97fced4eb7 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -531,6 +531,7 @@
pop_burst()
/obj/item/toy/snappop/Crossed(H as mob|obj)
+ . = ..()
if(ishuman(H) || issilicon(H)) //i guess carp and shit shouldn't set them off
var/mob/living/carbon/M = H
if(issilicon(H) || M.m_intent == MOVE_INTENT_RUN)
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm
index 3cbeae1ce8..4b405ae64a 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm
@@ -96,7 +96,7 @@
new /obj/item/tank/internals/emergency_oxygen/engi(src)
new /obj/item/analyzer(src)
new /obj/item/holosign_creator/atmos(src)
- new /obj/item/holosign_creator/firelock(src)
+ new /obj/item/holosign_creator/firelock(src) //what if atmos techs could test things they are meant to test, wild, innit?
new /obj/item/watertank/atmos(src)
new /obj/item/clothing/suit/fire/atmos(src)
new /obj/item/clothing/head/hardhat/atmos(src)
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index 31f11a199c..1ef0726e63 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -269,13 +269,13 @@
UnregisterSignal(source, COMSIG_MOVABLE_MOVED)
/obj/structure/table/rolling/Moved(atom/OldLoc, Dir)
+ . = ..()
for(var/mob/M in OldLoc.contents)//Kidnap everyone on top
M.forceMove(loc)
for(var/x in attached_items)
var/atom/movable/AM = x
if(!AM.Move(loc))
RemoveItemFromTable(AM, AM.loc)
- return TRUE
/*
* Glass tables
diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm
index cf68341b2c..21709edf73 100644
--- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm
+++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm
@@ -126,12 +126,13 @@
if(current_tube == null)
setDir(next_dir)
- Move(get_step(loc, dir), dir) // Allow collisions when leaving the tubes.
+ Move(get_step(loc, dir), dir, DELAY_TO_GLIDE_SIZE(exit_delay)) // Allow collisions when leaving the tubes.
break
last_delay = current_tube.enter_delay(src, next_dir)
sleep(last_delay)
setDir(next_dir)
+ set_glide_size(DELAY_TO_GLIDE_SIZE(last_delay + exit_delay))
forceMove(next_loc) // When moving from one tube to another, skip collision and such.
density = current_tube.density
diff --git a/code/game/objects/structures/traps.dm b/code/game/objects/structures/traps.dm
index 4c8379d14f..e6a76f36ca 100644
--- a/code/game/objects/structures/traps.dm
+++ b/code/game/objects/structures/traps.dm
@@ -56,6 +56,7 @@
animate(src, alpha = initial(alpha), time = time_between_triggers)
/obj/structure/trap/Crossed(atom/movable/AM)
+ . = ..()
if(last_trigger + time_between_triggers > world.time)
return
// Don't want the traps triggered by sparks, ghosts or projectiles.
@@ -67,6 +68,7 @@
return
if(M.anti_magic_check())
flare()
+ return
if(charges <= 0)
return
flare()
diff --git a/code/game/say.dm b/code/game/say.dm
index 3bc14ed245..b7bfe540d0 100644
--- a/code/game/say.dm
+++ b/code/game/say.dm
@@ -59,7 +59,7 @@ GLOBAL_LIST_INIT(freqtospan, list(
var/endspanpart = ""
//Message
- var/messagepart = " [say_emphasis(lang_treat(speaker, message_language, raw_message, spans, message_mode))] "
+ var/messagepart = " [lang_treat(speaker, message_language, raw_message, spans, message_mode)] "
var/languageicon = ""
var/datum/language/D = GLOB.language_datum_instances[message_language]
@@ -116,6 +116,7 @@ GLOBAL_LIST_INIT(freqtospan, list(
/atom/movable/proc/lang_treat(atom/movable/speaker, datum/language/language, raw_message, list/spans, message_mode, no_quote = FALSE)
if(has_language(language))
var/atom/movable/AM = speaker.GetSource()
+ raw_message = say_emphasis(raw_message)
if(AM) //Basically means "if the speaker is virtual"
return no_quote ? AM.quoteless_say_quote(raw_message, spans, message_mode) : AM.say_quote(raw_message, spans, message_mode)
else
diff --git a/code/game/sound.dm b/code/game/sound.dm
index b012ba4e2a..1816336bd1 100644
--- a/code/game/sound.dm
+++ b/code/game/sound.dm
@@ -1,4 +1,49 @@
-/proc/playsound(atom/source, soundin, vol as num, vary, extrarange as num, falloff, frequency = null, channel = 0, pressure_affected = TRUE, ignore_walls = TRUE, soundenvwet = -10000, soundenvdry = 0)
+// /tg/ reverb disabled
+/*
+///Default override for echo
+/sound
+ echo = list(
+ 0, // Direct
+ 0, // DirectHF
+ -10000, // Room, -10000 means no low frequency sound reverb
+ -10000, // RoomHF, -10000 means no high frequency sound reverb
+ 0, // Obstruction
+ 0, // ObstructionLFRatio
+ 0, // Occlusion
+ 0.25, // OcclusionLFRatio
+ 1.5, // OcclusionRoomRatio
+ 1.0, // OcclusionDirectRatio
+ 0, // Exclusion
+ 1.0, // ExclusionLFRatio
+ 0, // OutsideVolumeHF
+ 0, // DopplerFactor
+ 0, // RolloffFactor
+ 0, // RoomRolloffFactor
+ 1.0, // AirAbsorptionFactor
+ 0, // Flags (1 = Auto Direct, 2 = Auto Room, 4 = Auto RoomHF)
+ )
+ environment = SOUND_ENVIRONMENT_NONE //Default to none so sounds without overrides dont get reverb
+*/
+
+/*! playsound
+
+playsound is a proc used to play a 3D sound in a specific range. This uses SOUND_RANGE + extra_range to determine that.
+
+source - Origin of sound
+soundin - Either a file, or a string that can be used to get an SFX
+vol - The volume of the sound, excluding falloff and pressure affection.
+vary - bool that determines if the sound changes pitch every time it plays
+extrarange - modifier for sound range. This gets added on top of SOUND_RANGE
+falloff_exponent - Rate of falloff for the audio. Higher means quicker drop to low volume. Should generally be over 1 to indicate a quick dive to 0 rather than a slow dive.
+frequency - playback speed of audio
+channel - The channel the sound is played at
+pressure_affected - Whether or not difference in pressure affects the sound (E.g. if you can hear in space)
+ignore_walls - Whether or not the sound can pass through walls.
+falloff_distance - Distance at which falloff begins. Sound is at peak volume (in regards to falloff) aslong as it is in this range.
+
+*/
+
+/proc/playsound(atom/source, soundin, vol as num, vary, extrarange as num, falloff_exponent = SOUND_FALLOFF_EXPONENT, frequency = null, channel = 0, pressure_affected = TRUE, ignore_walls = TRUE, falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE, envwet = -10000, envdry = 0)
if(isarea(source))
CRASH("playsound(): source is an area")
@@ -10,26 +55,60 @@
//allocate a channel if necessary now so its the same for everyone
channel = channel || SSsounds.random_available_channel()
- // Looping through the player list has the added bonus of working for mobs inside containers
+ // Looping through the player list has the added bonus of working for mobs inside containers
var/sound/S = sound(get_sfx(soundin))
- var/maxdistance = (world.view + extrarange)
- var/z = turf_source.z
- var/list/listeners = SSmobs.clients_by_zlevel[z]
+ var/maxdistance = SOUND_RANGE + extrarange
+ var/source_z = turf_source.z
+ var/list/listeners = SSmobs.clients_by_zlevel[source_z].Copy()
+
+ var/turf/above_turf = SSmapping.get_turf_above(turf_source)
+ var/turf/below_turf = SSmapping.get_turf_below(turf_source)
+
if(!ignore_walls) //these sounds don't carry through walls
listeners = listeners & hearers(maxdistance,turf_source)
+
+ if(above_turf && istransparentturf(above_turf))
+ listeners += hearers(maxdistance,above_turf)
+
+ if(below_turf && istransparentturf(turf_source))
+ listeners += hearers(maxdistance,below_turf)
+
+ else
+ if(above_turf && istransparentturf(above_turf))
+ listeners += SSmobs.clients_by_zlevel[above_turf.z]
+
+ if(below_turf && istransparentturf(turf_source))
+ listeners += SSmobs.clients_by_zlevel[below_turf.z]
+
for(var/P in listeners)
var/mob/M = P
if(get_dist(M, turf_source) <= maxdistance)
- M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, channel, pressure_affected, S, soundenvwet, soundenvdry)
- for(var/P in SSmobs.dead_players_by_zlevel[z])
+ M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff_exponent, channel, pressure_affected, S, maxdistance, falloff_distance, null, envwet, envdry)
+ for(var/P in SSmobs.dead_players_by_zlevel[source_z])
var/mob/M = P
if(get_dist(M, turf_source) <= maxdistance)
- M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, channel, pressure_affected, S, soundenvwet, soundenvdry)
+ M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff_exponent, channel, pressure_affected, S, maxdistance, falloff_distance, null, envwet, envdry)
-/mob/proc/playsound_local(turf/turf_source, soundin, vol as num, vary, frequency, falloff, channel = 0, pressure_affected = TRUE, sound/S, envwet = -10000, envdry = 0, manual_x, manual_y, distance_multiplier = 1)
- if(audiovisual_redirect)
- var/turf/T = get_turf(src)
- audiovisual_redirect.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, channel, pressure_affected, S, 0, -1000, turf_source.x - T.x, turf_source.y - T.y, distance_multiplier)
+/*! playsound
+
+playsound_local is a proc used to play a sound directly on a mob from a specific turf.
+This is called by playsound to send sounds to players, in which case it also gets the max_distance of that sound.
+
+turf_source - Origin of sound
+soundin - Either a file, or a string that can be used to get an SFX
+vol - The volume of the sound, excluding falloff
+vary - bool that determines if the sound changes pitch every time it plays
+frequency - playback speed of audio
+falloff_exponent - Rate of falloff for the audio. Higher means quicker drop to low volume. Should generally be over 1 to indicate a quick dive to 0 rather than a slow dive.
+channel - The channel the sound is played at
+pressure_affected - Whether or not difference in pressure affects the sound (E.g. if you can hear in space)
+max_distance - The peak distance of the sound, if this is a 3D sound
+falloff_distance - Distance at which falloff begins, if this is a 3D sound
+distance_multiplier - Can be used to multiply the distance at which the sound is heard
+
+*/
+
+/mob/proc/playsound_local(turf/turf_source, soundin, vol as num, vary, frequency, falloff_exponent = SOUND_FALLOFF_EXPONENT, channel = 0, pressure_affected = TRUE, sound/S, max_distance, falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE, distance_multiplier = 1, envwet = -10000, envdry = 0)
if(!client || !can_hear())
return
@@ -39,7 +118,9 @@
S.wait = 0 //No queue
S.channel = channel || SSsounds.random_available_channel()
S.volume = vol
+ // CITADEL EDIT - Force citadel reverb
S.environment = 7
+ // End
if(vary)
if(frequency)
@@ -51,13 +132,13 @@
var/turf/T = get_turf(src)
//sound volume falloff with distance
- var/distance = 0
- if(!manual_x && !manual_y)
- distance = get_dist(T, turf_source)
+ var/distance = get_dist(T, turf_source)
distance *= distance_multiplier
- S.volume -= max(distance - world.view, 0) * 2 //multiplicative falloff to add on top of natural audio falloff.
+ if(max_distance) //If theres no max_distance we're not a 3D sound, so no falloff.
+ S.volume -= (max(distance - falloff_distance, 0) ** (1 / falloff_exponent)) / ((max(max_distance, distance) - falloff_distance) ** (1 / falloff_exponent)) * S.volume
+ //https://www.desmos.com/calculator/sqdfl8ipgf
if(pressure_affected)
//Atmosphere affects sound
@@ -72,42 +153,57 @@
else //space
pressure_factor = 0
- S.echo = list(envdry, null, envwet, null, null, null, null, null, null, null, null, null, null, 1, 1, 1, null, null)
-
if(distance <= 1)
pressure_factor = max(pressure_factor, 0.15) //touching the source of the sound
S.volume *= pressure_factor
//End Atmosphere affecting sound
+ /// Citadel edit - Citadel reverb
+ S.echo = list(envdry, null, envwet, null, null, null, null, null, null, null, null, null, null, 1, 1, 1, null, null)
+ /// End
+
if(S.volume <= 0)
return //No sound
- var/dx = 0 // Hearing from the right/left
- if(!manual_x)
- dx = turf_source.x - T.x
- else
- dx = manual_x
+ var/dx = turf_source.x - T.x // Hearing from the right/left
S.x = dx * distance_multiplier
- var/dz = 0 // Hearing from infront/behind
- if(!manual_x)
- dz = turf_source.y - T.y
- else
- dz = manual_y
+ var/dz = turf_source.y - T.y // Hearing from infront/behind
S.z = dz * distance_multiplier
- // The y value is for above your head, but there is no ceiling in 2d spessmens.
- S.y = 1
- S.falloff = (falloff ? falloff : FALLOFF_SOUNDS)
+ var/dy = (turf_source.z - T.z) * 5 * distance_multiplier // Hearing from above / below, multiplied by 5 because we assume height is further along coords.
+ S.y = dy
+
+ S.falloff = isnull(max_distance)? FALLOFF_SOUNDS : max_distance //use max_distance, else just use 1 as we are a direct sound so falloff isnt relevant.
+
+ /*
+ /// Tg reverb removed
+ if(S.environment == SOUND_ENVIRONMENT_NONE)
+ if(sound_environment_override != SOUND_ENVIRONMENT_NONE)
+ S.environment = sound_environment_override
+ else
+ var/area/A = get_area(src)
+ if(A.sound_environment != SOUND_ENVIRONMENT_NONE)
+ S.environment = A.sound_environment
+
+ if(use_reverb)
+ if(S.environment == SOUND_ENVIRONMENT_NONE) //We have reverb, reset our echo setting
+ S.environment = SOUND_ENVIRONMENT_CONCERT_HALL
+ S.echo = list(0, null, -10000, null, null, null, null, null, null, null, null, null, null, 1, 1, 1, null, null)
+ else
+ S.echo[3] = 0 //Room setting, 0 means normal reverb
+ S.echo[4] = 0 //RoomHF setting, 0 means normal reverb.
+ */
+ ///
SEND_SOUND(src, S)
-/proc/sound_to_playing_players(soundin, volume = 100, vary = FALSE, frequency = 0, falloff = FALSE, channel = 0, pressure_affected = FALSE, sound/S)
+/proc/sound_to_playing_players(soundin, volume = 100, vary = FALSE, frequency = 0, channel = 0, pressure_affected = FALSE, sound/S)
if(!S)
S = sound(get_sfx(soundin))
for(var/m in GLOB.player_list)
if(ismob(m) && !isnewplayer(m))
var/mob/M = m
- M.playsound_local(M, null, volume, vary, frequency, falloff, channel, pressure_affected, S)
+ M.playsound_local(M, null, volume, vary, frequency, null, channel, pressure_affected, S)
/mob/proc/stop_sound_channel(chan)
SEND_SOUND(src, sound(null, repeat = 0, wait = 0, channel = chan))
@@ -130,14 +226,14 @@
/proc/get_sfx(soundin)
if(istext(soundin))
switch(soundin)
- if ("explosion_creaking") // from skyrat-ss13/skyrat13/pull/3295
- soundin = pick('sound/effects/explosioncreak1.ogg', 'sound/effects/explosioncreak2.ogg')
- if ("hull_creaking") // from skyrat-ss13/skyrat13/pull/3295
- soundin = pick('sound/effects/creak1.ogg', 'sound/effects/creak2.ogg', 'sound/effects/creak3.ogg')
if ("shatter")
soundin = pick('sound/effects/glassbr1.ogg','sound/effects/glassbr2.ogg','sound/effects/glassbr3.ogg')
if ("explosion")
soundin = pick('sound/effects/explosion1.ogg','sound/effects/explosion2.ogg')
+ if ("explosion_creaking")
+ soundin = pick('sound/effects/explosioncreak1.ogg', 'sound/effects/explosioncreak2.ogg')
+ if ("hull_creaking")
+ soundin = pick('sound/effects/creak1.ogg', 'sound/effects/creak2.ogg', 'sound/effects/creak3.ogg')
if ("sparks")
soundin = pick('sound/effects/sparks1.ogg','sound/effects/sparks2.ogg','sound/effects/sparks3.ogg','sound/effects/sparks4.ogg')
if ("rustle")
diff --git a/code/game/turfs/simulated/floor/misc_floor.dm b/code/game/turfs/simulated/floor/misc_floor.dm
index c70332eacb..82e60ed8f6 100644
--- a/code/game/turfs/simulated/floor/misc_floor.dm
+++ b/code/game/turfs/simulated/floor/misc_floor.dm
@@ -196,7 +196,7 @@
if(M.client && (is_servant_of_ratvar(M) || isobserver(M) || M.stat == DEAD))
viewing += M.client
flick_overlay(I, viewing, 8)
- L.adjustToxLoss(-3, TRUE, TRUE)
+ L.adjustToxLoss(-3, TRUE, TRUE, toxins_type = TOX_OMNI)
/turf/open/floor/clockwork/try_replace_tile(obj/item/stack/tile/T, mob/user, params)
return
@@ -278,4 +278,4 @@
heavyfootstep = FOOTSTEP_RUST
/turf/open/floor/plating/rust/rust_heretic_act()
- return
+ return
diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm
index 9c9639e57c..52b3436154 100644
--- a/code/game/turfs/space/space.dm
+++ b/code/game/turfs/space/space.dm
@@ -25,7 +25,13 @@
//This is used to optimize the map loader
return
+/**
+ * Space Initialize
+ *
+ * Doesn't call parent, see [/atom/proc/Initialize]
+ */
/turf/open/space/Initialize()
+ SHOULD_CALL_PARENT(FALSE)
icon_state = SPACE_ICON_STATE
air = space_gas
update_air_ref()
@@ -36,6 +42,15 @@
stack_trace("Warning: [src]([type]) initialized multiple times!")
flags_1 |= INITIALIZED_1
+ // if (length(smoothing_groups))
+ // sortTim(smoothing_groups) //In case it's not properly ordered, let's avoid duplicate entries with the same values.
+ // SET_BITFLAG_LIST(smoothing_groups)
+ // if (length(canSmoothWith))
+ // sortTim(canSmoothWith)
+ // if(canSmoothWith[length(canSmoothWith)] > MAX_S_TURF) //If the last element is higher than the maximum turf-only value, then it must scan turf contents for smoothing targets.
+ // smoothing_flags |= SMOOTH_OBJ
+ // SET_BITFLAG_LIST(canSmoothWith)
+
var/area/A = loc
if(!IS_DYNAMIC_LIGHTING(src) && IS_DYNAMIC_LIGHTING(A))
add_overlay(/obj/effect/fullbright)
@@ -49,6 +64,13 @@
if (opacity)
has_opaque_atom = TRUE
+ var/turf/T = SSmapping.get_turf_above(src)
+ if(T)
+ T.multiz_turf_new(src, DOWN)
+ T = SSmapping.get_turf_below(src)
+ if(T)
+ T.multiz_turf_new(src, UP)
+
ComponentInitialize()
return INITIALIZE_HINT_NORMAL
@@ -74,6 +96,10 @@
/turf/open/space/Assimilate_Air()
return
+//IT SHOULD RETURN NULL YOU MONKEY, WHY IN TARNATION WHAT THE FUCKING FUCK
+/turf/open/space/remove_air(amount)
+ return null
+
/turf/open/space/proc/update_starlight()
if(CONFIG_GET(flag/starlight))
for(var/t in RANGE_TURFS(1,src)) //RANGE_TURFS is in code\__HELPERS\game.dm
@@ -90,9 +116,8 @@
/turf/open/space/proc/CanBuildHere()
return TRUE
-/turf/open/space/handle_slip(mob/living/carbon/C, knockdown_amount, obj/O, lube)
- if(lube & FLYING_DOESNT_HELP)
- return ..()
+/turf/open/space/handle_slip()
+ return // no lube bullshit, this is space
/turf/open/space/attackby(obj/item/C, mob/user, params)
..()
@@ -107,15 +132,16 @@
return
if(L)
if(R.use(1))
+ qdel(L)
to_chat(user, "You construct a catwalk. ")
- playsound(src, 'sound/weapons/genhit.ogg', 50, 1)
+ playsound(src, 'sound/weapons/genhit.ogg', 50, TRUE)
new/obj/structure/lattice/catwalk(src)
else
to_chat(user, "You need two rods to build a catwalk! ")
return
if(R.use(1))
to_chat(user, "You construct a lattice. ")
- playsound(src, 'sound/weapons/genhit.ogg', 50, 1)
+ playsound(src, 'sound/weapons/genhit.ogg', 50, TRUE)
ReplaceWithLattice()
else
to_chat(user, "You need one rod to build a lattice. ")
@@ -126,7 +152,7 @@
var/obj/item/stack/tile/plasteel/S = C
if(S.use(1))
qdel(L)
- playsound(src, 'sound/weapons/genhit.ogg', 50, 1)
+ playsound(src, 'sound/weapons/genhit.ogg', 50, TRUE)
to_chat(user, "You build a floor. ")
PlaceOnTop(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR)
else
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index 55d945535d..c2fee908fb 100755
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -1,8 +1,11 @@
+GLOBAL_LIST_EMPTY(station_turfs)
+
+/// Any floor or wall. What makes up the station and the rest of the map.
/turf
icon = 'icons/turf/floors.dmi'
- level = 1
- vis_flags = VIS_INHERIT_PLANE|VIS_INHERIT_ID //when this be added to vis_contents of something it inherit something.plane and be associatet with something on clicking,
- //important for visualisation of turf in openspace and interraction with openspace that show you turf.
+ flags_1 = CAN_BE_DIRTY_1
+ vis_flags = VIS_INHERIT_ID|VIS_INHERIT_PLANE // Important for interaction with and visualization of openspace.
+ luminosity = 1
var/intact = 1
@@ -19,8 +22,6 @@
var/blocks_air = FALSE
- flags_1 = CAN_BE_DIRTY_1
-
var/list/image/blueprint_data //for the station blueprints, images of objects eg: pipes
var/explosion_level = 0 //for preventing explosion dodging
@@ -41,7 +42,13 @@
return FALSE
. = ..()
+/**
+ * Turf Initialize
+ *
+ * Doesn't call parent, see [/atom/proc/Initialize]
+ */
/turf/Initialize(mapload)
+ SHOULD_CALL_PARENT(FALSE)
if(flags_1 & INITIALIZED_1)
stack_trace("Warning: [src]([type]) initialized multiple times!")
flags_1 |= INITIALIZED_1
@@ -49,7 +56,7 @@
// by default, vis_contents is inherited from the turf that was here before
vis_contents.Cut()
- if(color)
+ if(color) // is this being used? This is here because parent isn't being called
add_atom_colour(color, FIXED_COLOUR_PRIORITY)
assemble_baseturfs()
@@ -57,6 +64,7 @@
levelupdate()
if(smooth)
queue_smooth(src)
+
visibilityChanged()
for(var/atom/movable/AM in src)
@@ -76,11 +84,10 @@
var/turf/T = SSmapping.get_turf_above(src)
if(T)
T.multiz_turf_new(src, DOWN)
- SEND_SIGNAL(T, COMSIG_TURF_MULTIZ_NEW, src, DOWN)
T = SSmapping.get_turf_below(src)
if(T)
T.multiz_turf_new(src, UP)
- SEND_SIGNAL(T, COMSIG_TURF_MULTIZ_NEW, src, UP)
+
if (opacity)
has_opaque_atom = TRUE
@@ -112,8 +119,6 @@
var/turf/B = new world.turf(src)
for(var/A in B.contents)
qdel(A)
- for(var/I in B.vars)
- B.vars[I] = null
return
SSair.remove_from_active(src)
visibilityChanged()
@@ -122,12 +127,14 @@
requires_activation = FALSE
..()
-/turf/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
+/turf/on_attack_hand(mob/user)
user.Move_Pulled(src)
/turf/proc/multiz_turf_del(turf/T, dir)
+ // SEND_SIGNAL(src, COMSIG_TURF_MULTIZ_DEL, T, dir)
/turf/proc/multiz_turf_new(turf/T, dir)
+ SEND_SIGNAL(src, COMSIG_TURF_MULTIZ_NEW, T, dir)
//zPassIn doesn't necessarily pass an atom!
//direction is direction of travel of air
@@ -158,13 +165,14 @@
prev_turf.visible_message("[mov_name] falls through [prev_turf]! ")
if(flags & FALL_INTERCEPTED)
return
- if(zFall(A, ++levels))
+ if(zFall(A, levels + 1))
return FALSE
A.visible_message("[A] crashes into [src]! ")
A.onZImpact(src, levels)
return TRUE
/turf/proc/can_zFall(atom/movable/A, levels = 1, turf/target)
+ SHOULD_BE_PURE(TRUE)
return zPassOut(A, DOWN, target) && target.zPassIn(A, DOWN, src)
/turf/proc/zFall(atom/movable/A, levels = 1, force = FALSE)
@@ -217,49 +225,54 @@
stack_trace("Non movable passed to turf CanPass : [mover]")
return FALSE
+//There's a lot of QDELETED() calls here if someone can figure out how to optimize this but not runtime when something gets deleted by a Bump/CanPass/Cross call, lemme know or go ahead and fix this mess - kevinz000
/turf/Enter(atom/movable/mover, atom/oldloc)
// Do not call ..()
// Byond's default turf/Enter() doesn't have the behaviour we want with Bump()
// By default byond will call Bump() on the first dense object in contents
// Here's hoping it doesn't stay like this for years before we finish conversion to step_
var/atom/firstbump
- if(!CanPass(mover, src))
- firstbump = src
- else
+ var/canPassSelf = CanPass(mover, src)
+ if(canPassSelf || (mover.movement_type & UNSTOPPABLE))
for(var/i in contents)
+ if(QDELETED(mover))
+ return FALSE //We were deleted, do not attempt to proceed with movement.
if(i == mover || i == mover.loc) // Multi tile objects and moving out of other objects
continue
- if(QDELETED(mover))
- break
var/atom/movable/thing = i
if(!thing.Cross(mover))
- if(CHECK_BITFIELD(mover.movement_type, UNSTOPPABLE))
+ if(QDELETED(mover)) //Mover deleted from Cross/CanPass, do not proceed.
+ return FALSE
+ if((mover.movement_type & UNSTOPPABLE))
mover.Bump(thing)
continue
else
if(!firstbump || ((thing.layer > firstbump.layer || thing.flags_1 & ON_BORDER_1) && !(firstbump.flags_1 & ON_BORDER_1)))
firstbump = thing
+ if(QDELETED(mover)) //Mover deleted from Cross/CanPass/Bump, do not proceed.
+ return FALSE
+ if(!canPassSelf) //Even if mover is unstoppable they need to bump us.
+ firstbump = src
if(firstbump)
- if(!QDELETED(mover))
- mover.Bump(firstbump)
- return CHECK_BITFIELD(mover.movement_type, UNSTOPPABLE)
+ mover.Bump(firstbump)
+ return (mover.movement_type & UNSTOPPABLE)
return TRUE
/turf/Exit(atom/movable/mover, atom/newloc)
. = ..()
- if(!.)
+ if(!. || QDELETED(mover))
return FALSE
for(var/i in contents)
- if(QDELETED(mover))
- break
if(i == mover)
continue
var/atom/movable/thing = i
if(!thing.Uncross(mover, newloc))
if(thing.flags_1 & ON_BORDER_1)
mover.Bump(thing)
- if(!CHECK_BITFIELD(mover.movement_type, UNSTOPPABLE))
+ if(!(mover.movement_type & UNSTOPPABLE))
return FALSE
+ if(QDELETED(mover))
+ return FALSE //We were deleted.
/turf/Entered(atom/movable/AM)
..()
@@ -271,6 +284,7 @@
has_opaque_atom = TRUE // Make sure to do this before reconsider_lights(), incase we're on instant updates. Guaranteed to be on in this case.
reconsider_lights()
+
/turf/open/Entered(atom/movable/AM)
..()
//melting
@@ -278,7 +292,6 @@
var/obj/O = AM
if(O.obj_flags & FROZEN)
O.make_unfrozen()
-
if(!AM.zfalling)
zFall(AM)
@@ -336,14 +349,13 @@
/turf/proc/levelupdate()
for(var/obj/O in src)
- if(O.level == 1 && (O.flags_1 & INITIALIZED_1))
- O.hide(src.intact)
+ if(O.flags_1 & INITIALIZED_1)
+ // SEND_SIGNAL(O, COMSIG_OBJ_HIDE, intact)
+ O.hide(intact)
// override for space turfs, since they should never hide anything
/turf/open/space/levelupdate()
- for(var/obj/O in src)
- if(O.level == 1 && (O.flags_1 & INITIALIZED_1))
- O.hide(0)
+ return
// Removes all signs of lattice on the pos of the turf -Donkieyo
/turf/proc/RemoveLattice()
@@ -368,13 +380,13 @@
if(.)
return
if(length(src_object.contents()))
- to_chat(user, "You start dumping out the contents... ")
- if(!do_after(user,20,target=src_object.parent))
+ to_chat(usr, "You start dumping out the contents... ")
+ if(!do_after(usr,20,target=src_object.parent))
return FALSE
var/list/things = src_object.contents()
var/datum/progressbar/progress = new(user, things.len, src)
- while (do_after(user, 10, TRUE, src, FALSE, CALLBACK(src_object, /datum/component/storage.proc/mass_remove_from_storage, src, things, progress)))
+ while (do_after(usr, 1 SECONDS, TRUE, src, FALSE, CALLBACK(src_object, /datum/component/storage.proc/mass_remove_from_storage, src, things, progress)))
stoplag(1)
qdel(progress)
@@ -494,10 +506,8 @@
I.loc = src
I.setDir(AM.dir)
I.alpha = 128
-
LAZYADD(blueprint_data, I)
-
/turf/proc/add_blueprints_preround(atom/movable/AM)
if(!SSticker.HasRoundStarted())
add_blueprints(AM)
@@ -531,7 +541,7 @@
if(!forced)
return
if(has_gravity(src))
- playsound(src, "bodyfall", 50, 1)
+ playsound(src, "bodyfall", 50, TRUE)
faller.drop_all_held_items()
/turf/proc/photograph(limit=20)
diff --git a/code/game/world.dm b/code/game/world.dm
index 42c90d8be1..97ed64a405 100644
--- a/code/game/world.dm
+++ b/code/game/world.dm
@@ -1,21 +1,46 @@
#define RESTART_COUNTER_PATH "data/round_counter.txt"
GLOBAL_VAR(restart_counter)
+
GLOBAL_VAR_INIT(tgs_initialized, FALSE)
GLOBAL_VAR(topic_status_lastcache)
GLOBAL_LIST(topic_status_cache)
-//This happens after the Master subsystem new(s) (it's a global datum)
-//So subsystems globals exist, but are not initialised
+/**
+ * World creation
+ *
+ * Here is where a round itself is actually begun and setup.
+ * * db connection setup
+ * * config loaded from files
+ * * loads admins
+ * * Sets up the dynamic menu system
+ * * and most importantly, calls initialize on the master subsystem, starting the game loop that causes the rest of the game to begin processing and setting up
+ *
+ *
+ * Nothing happens until something moves. ~Albert Einstein
+ *
+ * For clarity, this proc gets triggered later in the initialization pipeline, it is not the first thing to happen, as it might seem.
+ *
+ * Initialization Pipeline:
+ * Global vars are new()'ed, (including config, glob, and the master controller will also new and preinit all subsystems when it gets new()ed)
+ * Compiled in maps are loaded (mainly centcom). all areas/turfs/objs/mobs(ATOMs) in these maps will be new()ed
+ * world/New() (You are here)
+ * Once world/New() returns, client's can connect.
+ * 1 second sleep
+ * Master Controller initialization.
+ * Subsystem initialization.
+ * Non-compiled-in maps are maploaded, all atoms are new()ed
+ * All atoms in both compiled and uncompiled maps are initialized()
+ */
/world/New()
if (fexists(EXTOOLS))
call(EXTOOLS, "maptick_initialize")()
- #ifdef EXTOOLS_LOGGING
+#ifdef EXTOOLS_LOGGING
call(EXTOOLS, "init_logging")()
else
CRASH("[EXTOOLS] does not exist!")
- #endif
+#endif
enable_debugger()
#ifdef REFERENCE_TRACKING
enable_reference_tracking()
@@ -23,12 +48,11 @@ GLOBAL_LIST(topic_status_cache)
world.Profile(PROFILE_START)
- log_world("World loaded at [TIME_STAMP("hh:mm:ss", FALSE)]!")
-
GLOB.config_error_log = GLOB.world_manifest_log = GLOB.world_pda_log = GLOB.world_job_debug_log = GLOB.sql_error_log = GLOB.world_href_log = GLOB.world_runtime_log = GLOB.world_attack_log = GLOB.world_game_log = "data/logs/config_error.[GUID()].log" //temporary file used to record errors with loading config, moved to log directory once logging is set bl
- make_datum_references_lists() //initialises global lists for referencing frequently used datums (so that we only ever do it once)
+ log_world("World loaded at [TIME_STAMP("hh:mm:ss", FALSE)]!")
+ make_datum_references_lists() //initialises global lists for referencing frequently used datums (so that we only ever do it once)
GLOB.revdata = new
@@ -36,6 +60,9 @@ GLOBAL_LIST(topic_status_cache)
config.Load(params[OVERRIDE_CONFIG_DIRECTORY_PARAMETER])
+ load_admins()
+ load_mentors()
+
//SetupLogs depends on the RoundID, so lets check
//DB schema and set RoundID if we can
SSdbcore.CheckSchemaVersion()
@@ -49,14 +76,9 @@ GLOBAL_LIST(topic_status_cache)
world.log = file("[GLOB.log_directory]/dd.log") //not all runtimes trigger world/Error, so this is the only way to ensure we can see all of them.
#endif
- load_admins()
- load_mentors()
LoadVerbs(/datum/verbs/menu)
if(CONFIG_GET(flag/usewhitelist))
load_whitelist()
- LoadBans()
- initialize_global_loadout_items()
- reload_custom_roundstart_items_list()//Cit change - loads donator items. Remind me to remove when I port over bay's loadout system
GLOB.timezoneOffset = text2num(time2text(0,"hh")) * 36000
@@ -67,10 +89,15 @@ GLOBAL_LIST(topic_status_cache)
if(NO_INIT_PARAMETER in params)
return
+ LoadBans()
+ initialize_global_loadout_items()
+ reload_custom_roundstart_items_list()//Cit change - loads donator items. Remind me to remove when I port over bay's loadout system
+
Master.Initialize(10, FALSE, TRUE)
- if(TEST_RUN_PARAMETER in params)
- HandleTestRun()
+ #ifdef UNIT_TESTS
+ HandleTestRun()
+ #endif
/world/proc/InitTgs()
TgsNew(new /datum/tgs_event_handler/impl, TGS_SECURITY_TRUSTED)
@@ -88,7 +115,7 @@ GLOBAL_LIST(topic_status_cache)
#else
cb = VARSET_CALLBACK(SSticker, force_ending, TRUE)
#endif
- SSticker.OnRoundstart(CALLBACK(GLOBAL_PROC, /proc/addtimer, cb, 10 SECONDS))
+ SSticker.OnRoundstart(CALLBACK(GLOBAL_PROC, /proc/_addtimer, cb, 10 SECONDS))
/world/proc/SetupLogs()
var/override_dir = params[OVERRIDE_LOG_DIRECTORY_PARAMETER]
@@ -136,7 +163,7 @@ GLOBAL_LIST(topic_status_cache)
#ifdef UNIT_TESTS
- GLOB.test_log = file("[GLOB.log_directory]/tests.log")
+ GLOB.test_log = "[GLOB.log_directory]/tests.log"
start_log(GLOB.test_log)
#endif
start_log(GLOB.world_game_log)
@@ -170,14 +197,6 @@ GLOBAL_LIST(topic_status_cache)
/world/Topic(T, addr, master, key)
TGS_TOPIC //redirect to server tools if necessary
- if(!SSfail2topic)
- return "Server not initialized."
- else if(SSfail2topic.IsRateLimited(addr))
- return "Rate limited."
-
- if(length(T) > CONFIG_GET(number/topic_max_size))
- return "Payload too large!"
-
var/static/list/topic_handlers = TopicHandlers()
var/list/input = params2list(T)
@@ -243,9 +262,10 @@ GLOBAL_LIST(topic_status_cache)
TgsReboot()
- if(TEST_RUN_PARAMETER in params)
- FinishTestRun()
- return
+ #ifdef UNIT_TESTS
+ FinishTestRun()
+ return
+ #endif
if(TgsAvailable())
var/do_hard_reboot
@@ -280,11 +300,11 @@ GLOBAL_LIST(topic_status_cache)
var/list/features = list()
- /*if(GLOB.master_mode) CIT CHANGE - hides the gamemode from the hub entry, removes some useless info from the hub entry
- features += GLOB.master_mode
+ // if(GLOB.master_mode)
+ // features += GLOB.master_mode
- if (!GLOB.enter_allowed)
- features += "closed"*/
+ // if (!GLOB.enter_allowed)
+ // features += "closed"
var/s = ""
var/hostedby
@@ -292,25 +312,22 @@ GLOBAL_LIST(topic_status_cache)
var/server_name = CONFIG_GET(string/servername)
if (server_name)
s += "[server_name] — "
- /*features += "[CONFIG_GET(flag/norespawn) ? "no " : ""]respawn" CIT CHANGE - removes some useless info from the hub entry
- if(CONFIG_GET(flag/allow_vote_mode))
- features += "vote"
- if(CONFIG_GET(flag/allow_ai))
- features += "AI allowed"*/
+ // features += "[CONFIG_GET(flag/norespawn) ? "no " : ""]respawn"
+ // if(CONFIG_GET(flag/allow_vote_mode))
+ // features += "vote"
+ // if(CONFIG_GET(flag/allow_ai))
+ // features += "AI allowed"
hostedby = CONFIG_GET(string/hostedby)
s += "[station_name()] ";
s += " ("
- s += "" //Change this to wherever you want the hub to link to. CIT CHANGE - links to cit's website on the hub
- s += "Citadel" //Replace this with something else. Or ever better, delete it and uncomment the game version. CIT CHANGE - modifies the hub entry link
+ s += " " //Change this to wherever you want the hub to link to.
+ s += "Citadel" //Replace this with something else. Or ever better, delete it and uncomment the game version.
s += " "
s += ")\]" //CIT CHANGE - encloses the server title in brackets to make the hub entry fancier
s += " [CONFIG_GET(string/servertagline)] " //CIT CHANGE - adds a tagline!
- var/n = 0
- for (var/mob/M in GLOB.player_list)
- if (M.client)
- n++
+ var/players = GLOB.clients.len
if(SSmapping.config) // this just stops the runtime, honk.
features += "[SSmapping.config.map_name]" //CIT CHANGE - makes the hub entry display the current map
@@ -318,16 +335,23 @@ GLOBAL_LIST(topic_status_cache)
if(NUM2SECLEVEL(GLOB.security_level))//CIT CHANGE - makes the hub entry show the security level
features += "[NUM2SECLEVEL(GLOB.security_level)] alert"
- if (n > 1)
- features += "~[n] players"
- else if (n > 0)
- features += "~[n] player"
+ var/popcaptext = ""
+ var/popcap = max(CONFIG_GET(number/extreme_popcap), CONFIG_GET(number/hard_popcap), CONFIG_GET(number/soft_popcap))
+ if (popcap)
+ popcaptext = "/[popcap]"
+
+ if (players > 1)
+ features += "[players][popcaptext] players"
+ else if (players > 0)
+ features += "[players][popcaptext] player"
+
+ game_state = (CONFIG_GET(number/extreme_popcap) && players >= CONFIG_GET(number/extreme_popcap)) //tells the hub if we are full
if (!host && hostedby)
features += "hosted by [hostedby] "
if (features)
- s += "\[[jointext(features, ", ")]" //CIT CHANGE - replaces the colon here with a left bracket
+ s += "\[[jointext(features, ", ")]"
status = s
@@ -346,4 +370,28 @@ GLOBAL_LIST(topic_status_cache)
SSidlenpcpool.MaxZChanged()
world.refresh_atmos_grid()
+/// Extools atmos
/world/proc/refresh_atmos_grid()
+
+/world/proc/change_fps(new_value = 20)
+ if(new_value <= 0)
+ CRASH("change_fps() called with [new_value] new_value.")
+ if(fps == new_value)
+ return //No change required.
+
+ fps = new_value
+ on_tickrate_change()
+
+
+/world/proc/change_tick_lag(new_value = 0.5)
+ if(new_value <= 0)
+ CRASH("change_tick_lag() called with [new_value] new_value.")
+ if(tick_lag == new_value)
+ return //No change required.
+
+ tick_lag = new_value
+ on_tickrate_change()
+
+
+/world/proc/on_tickrate_change()
+ SStimer?.reset_buckets()
diff --git a/code/modules/actionspeed/_actionspeed_modifier.dm b/code/modules/actionspeed/_actionspeed_modifier.dm
index fe244e6653..a2870be6f4 100644
--- a/code/modules/actionspeed/_actionspeed_modifier.dm
+++ b/code/modules/actionspeed/_actionspeed_modifier.dm
@@ -69,7 +69,7 @@ GLOBAL_LIST_EMPTY(actionspeed_modification_cache)
return TRUE
remove_actionspeed_modifier(existing, FALSE)
if(length(actionspeed_modification))
- BINARY_INSERT(type_or_datum.id, actionspeed_modification, datum/actionspeed_modifier, type_or_datum, priority, COMPARE_VALUE)
+ BINARY_INSERT(type_or_datum.id, actionspeed_modification, /datum/actionspeed_modifier, type_or_datum, priority, COMPARE_VALUE)
LAZYSET(actionspeed_modification, type_or_datum.id, type_or_datum)
if(update)
update_actionspeed()
diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm
index 4ddb92ab19..63facade2e 100644
--- a/code/modules/admin/IsBanned.dm
+++ b/code/modules/admin/IsBanned.dm
@@ -226,6 +226,14 @@
key_cache[key] = 0
return .
+/proc/restore_stickybans()
+ for (var/banned_ckey in GLOB.stickybanadmintexts)
+ world.SetConfig("ban", banned_ckey, GLOB.stickybanadmintexts[banned_ckey])
+ GLOB.stickybanadminexemptions = list()
+ GLOB.stickybanadmintexts = list()
+ if (GLOB.stickbanadminexemptiontimerid)
+ deltimer(GLOB.stickbanadminexemptiontimerid)
+ GLOB.stickbanadminexemptiontimerid = null
#undef STICKYBAN_MAX_MATCHES
#undef STICKYBAN_MAX_EXISTING_USER_MATCHES
diff --git a/code/modules/admin/sound_emitter.dm b/code/modules/admin/sound_emitter.dm
index 56c778dc85..ad9c995aa1 100644
--- a/code/modules/admin/sound_emitter.dm
+++ b/code/modules/admin/sound_emitter.dm
@@ -52,11 +52,9 @@
edit_emitter(user)
/obj/effect/sound_emitter/AltClick(mob/user)
- . = ..()
if(check_rights_for(user.client, R_SOUNDS))
activate(user)
- to_chat(user, "Sound emitter activated. ")
- return TRUE
+ to_chat(user, "Sound emitter activated. ", confidential = TRUE)
/obj/effect/sound_emitter/proc/edit_emitter(mob/user)
var/dat = ""
@@ -84,20 +82,20 @@
if(!new_label)
return
maptext = new_label
- to_chat(user, "Label set to [maptext]. ")
+ to_chat(user, "Label set to [maptext]. ", confidential = TRUE)
if(href_list["edit_sound_file"])
var/new_file = input(user, "Choose a sound file.", "Sound Emitter") as null|sound
if(!new_file)
return
sound_file = new_file
- to_chat(user, "New sound file set to [sound_file]. ")
+ to_chat(user, "New sound file set to [sound_file]. ", confidential = TRUE)
if(href_list["edit_volume"])
var/new_volume = input(user, "Choose a volume.", "Sound Emitter", sound_volume) as null|num
if(isnull(new_volume))
return
new_volume = clamp(new_volume, 0, 100)
sound_volume = new_volume
- to_chat(user, "Volume set to [sound_volume]%. ")
+ to_chat(user, "Volume set to [sound_volume]%. ", confidential = TRUE)
if(href_list["edit_mode"])
var/new_mode
var/mode_list = list("Local (normal sound)" = SOUND_EMITTER_LOCAL, "Direct (not affected by environment/location)" = SOUND_EMITTER_DIRECT)
@@ -105,7 +103,7 @@
if(!new_mode)
return
motus_operandi = mode_list[new_mode]
- to_chat(user, "Mode set to [motus_operandi]. ")
+ to_chat(user, "Mode set to [motus_operandi]. ", confidential = TRUE)
if(href_list["edit_range"])
var/new_range
var/range_list = list("Radius (all mobs within a radius)" = SOUND_EMITTER_RADIUS, "Z-Level (all mobs on the same z)" = SOUND_EMITTER_ZLEVEL, "Global (all players)" = SOUND_EMITTER_GLOBAL)
@@ -113,14 +111,14 @@
if(!new_range)
return
emitter_range = range_list[new_range]
- to_chat(user, "Range set to [emitter_range]. ")
+ to_chat(user, "Range set to [emitter_range]. ", confidential = TRUE)
if(href_list["edit_radius"])
var/new_radius = input(user, "Choose a radius.", "Sound Emitter", sound_volume) as null|num
if(isnull(new_radius))
return
new_radius = clamp(new_radius, 0, 127)
play_radius = new_radius
- to_chat(user, "Audible radius set to [play_radius]. ")
+ to_chat(user, "Audible radius set to [play_radius]. ", confidential = TRUE)
if(href_list["play"])
activate(user)
edit_emitter(user) //Refresh the UI to see our changes
diff --git a/code/modules/admin/stickyban.dm b/code/modules/admin/stickyban.dm
index df6a9b89ad..ef0bfe8e70 100644
--- a/code/modules/admin/stickyban.dm
+++ b/code/modules/admin/stickyban.dm
@@ -7,7 +7,7 @@
if ("add")
var/list/ban = list()
var/ckey
- ban["admin"] = usr.key
+ ban["admin"] = usr.ckey
ban["type"] = list("sticky")
ban["reason"] = "(InGameBan)([usr.key])" //this will be displayed in dd only
@@ -21,7 +21,8 @@
ban["ckey"] = ckey
if (get_stickyban_from_ckey(ckey))
- to_chat(usr, "Error: Can not add a stickyban: User already has a current sticky ban ")
+ to_chat(usr, "Error: Can not add a stickyban: User already has a current sticky ban ", confidential = TRUE)
+ return
if (data["reason"])
ban["message"] = data["reason"]
@@ -31,7 +32,26 @@
return
ban["message"] = "[reason]"
+ if(SSdbcore.Connect()) // todo: second wave
+ // var/datum/db_query/query_create_stickyban = SSdbcore.NewQuery({"
+ // INSERT INTO [format_table_name("stickyban")] (ckey, reason, banning_admin)
+ // VALUES (:ckey, :message, :banning_admin)
+ // "}, list("ckey" = ckey, "message" = ban["message"], "banning_admin" = usr.ckey))
+ var/datum/DBQuery/query_create_stickyban = SSdbcore.NewQuery({"
+ INSERT INTO [format_table_name("stickyban")] (ckey, reason, banning_admin)
+ VALUES ([ckey], [ban["message"]], [usr.ckey])
+ "})
+ if (query_create_stickyban.warn_execute())
+ ban["fromdb"] = TRUE
+ qdel(query_create_stickyban)
+
world.SetConfig("ban",ckey,list2stickyban(ban))
+ ban = stickyban2list(list2stickyban(ban))
+ ban["matches_this_round"] = list()
+ ban["existing_user_matches_this_round"] = list()
+ ban["admin_matches_this_round"] = list()
+ ban["pending_matches_this_round"] = list()
+ SSstickyban.cache[ckey] = ban
log_admin_private("[key_name(usr)] has stickybanned [ckey].\nReason: [ban["message"]]")
message_admins("[key_name_admin(usr)] has stickybanned [ckey].\nReason: [ban["message"]] ")
@@ -43,14 +63,29 @@
var/ban = get_stickyban_from_ckey(ckey)
if (!ban)
- to_chat(usr, "Error: No sticky ban for [ckey] found! ")
+ to_chat(usr, "Error: No sticky ban for [ckey] found! ", confidential = TRUE)
return
if (alert("Are you sure you want to remove the sticky ban on [ckey]?","Are you sure","Yes","No") == "No")
return
if (!get_stickyban_from_ckey(ckey))
- to_chat(usr, "Error: The ban disappeared. ")
+ to_chat(usr, "Error: The ban disappeared. ", confidential = TRUE)
return
world.SetConfig("ban",ckey, null)
+ SSstickyban.cache -= ckey
+
+ if (SSdbcore.Connect())
+ // SSdbcore.QuerySelect(list(
+ // SSdbcore.NewQuery("DELETE FROM [format_table_name("stickyban")] WHERE ckey = :ckey", list("ckey" = ckey)),
+ // SSdbcore.NewQuery("DELETE FROM [format_table_name("stickyban_matched_ckey")] WHERE stickyban = :ckey", list("ckey" = ckey)),
+ // SSdbcore.NewQuery("DELETE FROM [format_table_name("stickyban_matched_cid")] WHERE stickyban = :ckey", list("ckey" = ckey)),
+ // SSdbcore.NewQuery("DELETE FROM [format_table_name("stickyban_matched_ip")] WHERE stickyban = :ckey", list("ckey" = ckey))
+ // ), warn = TRUE, qdel = TRUE)
+ SSdbcore.QuerySelect(list(
+ SSdbcore.NewQuery("DELETE FROM [format_table_name("stickyban")] WHERE ckey = [ckey]"),
+ SSdbcore.NewQuery("DELETE FROM [format_table_name("stickyban_matched_ckey")] WHERE stickyban = [ckey]"),
+ SSdbcore.NewQuery("DELETE FROM [format_table_name("stickyban_matched_cid")] WHERE stickyban = [ckey]"),
+ SSdbcore.NewQuery("DELETE FROM [format_table_name("stickyban_matched_ip")] WHERE stickyban = [ckey]")
+ ), warn = TRUE, qdel = TRUE)
log_admin_private("[key_name(usr)] removed [ckey]'s stickyban")
message_admins("[key_name_admin(usr)] removed [ckey]'s stickyban ")
@@ -64,42 +99,45 @@
var/alt = ckey(data["alt"])
var/ban = get_stickyban_from_ckey(ckey)
if (!ban)
- to_chat(usr, "Error: No sticky ban for [ckey] found! ")
+ to_chat(usr, "Error: No sticky ban for [ckey] found! ", confidential = TRUE)
return
- var/found = 0
- //we have to do it this way because byond keeps the case in its sticky ban matches WHY!!!
- for (var/key in ban["keys"])
- if (ckey(key) == alt)
- found = 1
- break
-
- if (!found)
- to_chat(usr, "Error: [alt] is not linked to [ckey]'s sticky ban! ")
+ var/key = LAZYACCESS(ban["keys"], alt)
+ if (!key)
+ to_chat(usr, "Error: [alt] is not linked to [ckey]'s sticky ban! ", confidential = TRUE)
return
- if (alert("Are you sure you want to disassociate [alt] from [ckey]'s sticky ban? \nNote: Nothing stops byond from re-linking them","Are you sure","Yes","No") == "No")
+ if (alert("Are you sure you want to disassociate [alt] from [ckey]'s sticky ban? \nNote: Nothing stops byond from re-linking them, Use \[E] to exempt them","Are you sure","Yes","No") == "No")
return
//we have to do this again incase something changes
ban = get_stickyban_from_ckey(ckey)
if (!ban)
- to_chat(usr, "Error: The ban disappeared. ")
+ to_chat(usr, "Error: The ban disappeared. ", confidential = TRUE)
return
- found = 0
- for (var/key in ban["keys"])
- if (ckey(key) == alt)
- ban["keys"] -= key
- found = 1
- break
+ key = LAZYACCESS(ban["keys"], alt)
- if (!found)
- to_chat(usr, "Error: [alt] link to [ckey]'s sticky ban disappeared. ")
+ if (!key)
+ to_chat(usr, "Error: [alt] link to [ckey]'s sticky ban disappeared. ", confidential = TRUE)
return
+ LAZYREMOVE(ban["keys"], alt)
world.SetConfig("ban",ckey,list2stickyban(ban))
+ SSstickyban.cache[ckey] = ban
+
+ if (SSdbcore.Connect())
+ // var/datum/db_query/query_remove_stickyban_alt = SSdbcore.NewQuery(
+ // "DELETE FROM [format_table_name("stickyban_matched_ckey")] WHERE stickyban = :ckey AND matched_ckey = :alt",
+ // list("ckey" = ckey, "alt" = alt)
+ // )
+ var/datum/DBQuery/query_remove_stickyban_alt = SSdbcore.NewQuery(
+ "DELETE FROM [format_table_name("stickyban_matched_ckey")] WHERE stickyban = [ckey] AND matched_ckey = [alt]"
+ )
+ query_remove_stickyban_alt.warn_execute()
+ qdel(query_remove_stickyban_alt)
+
log_admin_private("[key_name(usr)] has disassociated [alt] from [ckey]'s sticky ban")
message_admins("[key_name_admin(usr)] has disassociated [alt] from [ckey]'s sticky ban ")
@@ -109,7 +147,7 @@
var/ckey = data["ckey"]
var/ban = get_stickyban_from_ckey(ckey)
if (!ban)
- to_chat(usr, "Error: No sticky ban for [ckey] found! ")
+ to_chat(usr, "Error: No sticky ban for [ckey] found! ", confidential = TRUE)
return
var/oldreason = ban["message"]
var/reason = input(usr,"Reason","Reason","[ban["message"]]") as text|null
@@ -118,28 +156,203 @@
//we have to do this again incase something changed while we waited for input
ban = get_stickyban_from_ckey(ckey)
if (!ban)
- to_chat(usr, "Error: The ban disappeared. ")
+ to_chat(usr, "Error: The ban disappeared. ", confidential = TRUE)
return
ban["message"] = "[reason]"
world.SetConfig("ban",ckey,list2stickyban(ban))
+ SSstickyban.cache[ckey] = ban
+
+ if (SSdbcore.Connect())
+ // var/datum/db_query/query_edit_stickyban = SSdbcore.NewQuery(
+ // "UPDATE [format_table_name("stickyban")] SET reason = :reason WHERE ckey = :ckey",
+ // list("reason" = reason, "ckey" = ckey)
+ // )
+ var/datum/DBQuery/query_edit_stickyban = SSdbcore.NewQuery(
+ "UPDATE [format_table_name("stickyban")] SET reason = [reason] WHERE ckey = [ckey]"
+ )
+ query_edit_stickyban.warn_execute()
+ qdel(query_edit_stickyban)
+
log_admin_private("[key_name(usr)] has edited [ckey]'s sticky ban reason from [oldreason] to [reason]")
message_admins("[key_name_admin(usr)] has edited [ckey]'s sticky ban reason from [oldreason] to [reason] ")
+ if ("exempt")
+ if (!data["ckey"])
+ return
+ var/ckey = data["ckey"]
+ if (!data["alt"])
+ return
+ var/alt = ckey(data["alt"])
+ var/ban = get_stickyban_from_ckey(ckey)
+ if (!ban)
+ to_chat(usr, "Error: No sticky ban for [ckey] found! ", confidential = TRUE)
+ return
+
+ var/key = LAZYACCESS(ban["keys"], alt)
+ if (!key)
+ to_chat(usr, "Error: [alt] is not linked to [ckey]'s sticky ban! ", confidential = TRUE)
+ return
+
+ if (alert("Are you sure you want to exempt [alt] from [ckey]'s sticky ban?","Are you sure","Yes","No") == "No")
+ return
+
+ //we have to do this again incase something changes
+ ban = get_stickyban_from_ckey(ckey)
+ if (!ban)
+ to_chat(usr, "Error: The ban disappeared. ", confidential = TRUE)
+ return
+
+ key = LAZYACCESS(ban["keys"], alt)
+
+ if (!key)
+ to_chat(usr, "Error: [alt]'s link to [ckey]'s sticky ban disappeared. ", confidential = TRUE)
+ return
+ LAZYREMOVE(ban["keys"], alt)
+ key["exempt"] = TRUE
+ LAZYSET(ban["whitelist"], alt, key)
+
+ world.SetConfig("ban",ckey,list2stickyban(ban))
+
+ SSstickyban.cache[ckey] = ban
+
+ if (SSdbcore.Connect())
+ // var/datum/db_query/query_exempt_stickyban_alt = SSdbcore.NewQuery(
+ // "UPDATE [format_table_name("stickyban_matched_ckey")] SET exempt = 1 WHERE stickyban = :ckey AND matched_ckey = :alt",
+ // list("ckey" = ckey, "alt" = alt)
+ // )
+ var/datum/DBQuery/query_exempt_stickyban_alt = SSdbcore.NewQuery(
+ "UPDATE [format_table_name("stickyban_matched_ckey")] SET exempt = 1 WHERE stickyban = [ckey] AND matched_ckey = [alt]"
+ )
+ query_exempt_stickyban_alt.warn_execute()
+ qdel(query_exempt_stickyban_alt)
+
+ log_admin_private("[key_name(usr)] has exempted [alt] from [ckey]'s sticky ban")
+ message_admins("[key_name_admin(usr)] has exempted [alt] from [ckey]'s sticky ban ")
+
+ if ("unexempt")
+ if (!data["ckey"])
+ return
+ var/ckey = data["ckey"]
+ if (!data["alt"])
+ return
+ var/alt = ckey(data["alt"])
+ var/ban = get_stickyban_from_ckey(ckey)
+ if (!ban)
+ to_chat(usr, "Error: No sticky ban for [ckey] found! ", confidential = TRUE)
+ return
+
+ var/key = LAZYACCESS(ban["whitelist"], alt)
+ if (!key)
+ to_chat(usr, "Error: [alt] is not exempt from [ckey]'s sticky ban! ", confidential = TRUE)
+ return
+
+ if (alert("Are you sure you want to unexempt [alt] from [ckey]'s sticky ban?","Are you sure","Yes","No") == "No")
+ return
+
+ //we have to do this again incase something changes
+ ban = get_stickyban_from_ckey(ckey)
+ if (!ban)
+ to_chat(usr, "Error: The ban disappeared. ", confidential = TRUE)
+ return
+
+ key = LAZYACCESS(ban["whitelist"], alt)
+ if (!key)
+ to_chat(usr, "Error: [alt]'s exemption from [ckey]'s sticky ban disappeared. ", confidential = TRUE)
+ return
+
+ LAZYREMOVE(ban["whitelist"], alt)
+ key["exempt"] = FALSE
+ LAZYSET(ban["keys"], alt, key)
+
+ world.SetConfig("ban",ckey,list2stickyban(ban))
+
+ SSstickyban.cache[ckey] = ban
+
+ if (SSdbcore.Connect())
+ // var/datum/db_query/query_unexempt_stickyban_alt = SSdbcore.NewQuery(
+ // "UPDATE [format_table_name("stickyban_matched_ckey")] SET exempt = 0 WHERE stickyban = :ckey AND matched_ckey = :alt",
+ // list("ckey" = ckey, "alt" = alt)
+ // )
+ var/datum/DBQuery/query_unexempt_stickyban_alt = SSdbcore.NewQuery(
+ "UPDATE [format_table_name("stickyban_matched_ckey")] SET exempt = 0 WHERE stickyban = [ckey] AND matched_ckey = [alt]"
+ )
+ query_unexempt_stickyban_alt.warn_execute()
+ qdel(query_unexempt_stickyban_alt)
+
+ log_admin_private("[key_name(usr)] has unexempted [alt] from [ckey]'s sticky ban")
+ message_admins("[key_name_admin(usr)] has unexempted [alt] from [ckey]'s sticky ban ")
+
+ if ("timeout")
+ if (!data["ckey"])
+ return
+ if (!SSdbcore.Connect())
+ to_chat(usr, "No database connection! ", confidential = TRUE)
+ return
+
+ var/ckey = data["ckey"]
+
+ if (alert("Are you sure you want to put [ckey]'s stickyban on timeout until next round (or removed)?","Are you sure","Yes","No") == "No")
+ return
+ var/ban = get_stickyban_from_ckey(ckey)
+ if (!ban)
+ to_chat(usr, "Error: No sticky ban for [ckey] found! ", confidential = TRUE)
+ return
+
+ ban["timeout"] = TRUE
+
+ world.SetConfig("ban", ckey, null)
+
+ var/cachedban = SSstickyban.cache[ckey]
+ if (cachedban)
+ cachedban["timeout"] = TRUE
+
+ log_admin_private("[key_name(usr)] has put [ckey]'s sticky ban on timeout.")
+ message_admins("[key_name_admin(usr)] has put [ckey]'s sticky ban on timeout. ")
+
+ if ("untimeout")
+ if (!data["ckey"])
+ return
+ if (!SSdbcore.Connect())
+ to_chat(usr, "No database connection! ", confidential = TRUE)
+ return
+ var/ckey = data["ckey"]
+
+ if (alert("Are you sure you want to lift the timeout on [ckey]'s stickyban?","Are you sure","Yes","No") == "No")
+ return
+
+ var/ban = get_stickyban_from_ckey(ckey)
+ var/cachedban = SSstickyban.cache[ckey]
+ if (cachedban)
+ cachedban["timeout"] = FALSE
+ if (!ban)
+ if (!cachedban)
+ to_chat(usr, "Error: No sticky ban for [ckey] found! ", confidential = TRUE)
+ return
+ ban = cachedban
+
+ ban["timeout"] = FALSE
+
+ world.SetConfig("ban",ckey,list2stickyban(ban))
+
+ log_admin_private("[key_name(usr)] has taken [ckey]'s sticky ban off of timeout.")
+ message_admins("[key_name_admin(usr)] has taken [ckey]'s sticky ban off of timeout. ")
+
+
if ("revert")
if (!data["ckey"])
return
var/ckey = data["ckey"]
- if (alert("Are you sure you want to revert the sticky ban on [ckey] to its state at round start?","Are you sure","Yes","No") == "No")
+ if (alert("Are you sure you want to revert the sticky ban on [ckey] to its state at round start (or last edit)?","Are you sure","Yes","No") == "No")
return
var/ban = get_stickyban_from_ckey(ckey)
if (!ban)
- to_chat(usr, "Error: No sticky ban for [ckey] found! ")
+ to_chat(usr, "Error: No sticky ban for [ckey] found! ", confidential = TRUE)
return
var/cached_ban = SSstickyban.cache[ckey]
if (!cached_ban)
- to_chat(usr, "Error: No cached sticky ban for [ckey] found! ")
+ to_chat(usr, "Error: No cached sticky ban for [ckey] found! ", confidential = TRUE)
world.SetConfig("ban",ckey,null)
log_admin_private("[key_name(usr)] has reverted [ckey]'s sticky ban to its state at round start.")
@@ -150,14 +363,22 @@
world.SetConfig("ban",ckey,list2stickyban(cached_ban))
-/datum/admins/proc/stickyban_gethtml(ckey, ban)
- . = {"
+/datum/admins/proc/stickyban_gethtml(ckey)
+ var/ban = get_stickyban_from_ckey(ckey)
+ if (!ban)
+ return
+ var/timeout
+ if (SSdbcore.Connect())
+ timeout = "\[[(ban["timeout"] ? "untimeout" : "timeout" )]\] "
+ else
+ timeout = "\[revert\] "
+ . = list({"
\[-\]
- \[revert\]
+ [timeout]
[ckey]
"
[ban["message"]] \[Edit\]
- "}
+ "})
if (ban["admin"])
. += "[ban["admin"]] "
else
@@ -166,19 +387,24 @@
for (var/key in ban["keys"])
if (ckey(key) == ckey)
continue
- . += "\[-\] [key] "
+ . += "\[-\] [key]\[E\] "
+
+ for (var/key in ban["whitelist"])
+ if (ckey(key) == ckey)
+ continue
+ . += "\[-\] [key]\[UE\] "
+
. += "\n"
/datum/admins/proc/stickyban_show()
if(!check_rights(R_BAN))
return
- var/list/bans = sortList(world.GetConfig("ban"))
- var/banhtml = ""
+ var/list/bans = sticky_banned_ckeys()
+ var/list/banhtml = list()
for(var/key in bans)
var/ckey = ckey(key)
- var/ban = stickyban2list(world.GetConfig("ban",key))
banhtml += " \n"
- banhtml += stickyban_gethtml(ckey,ban)
+ banhtml += stickyban_gethtml(ckey)
var/html = {"
@@ -186,22 +412,49 @@
All Sticky Bans: \[+\]
- [banhtml]
+ [banhtml.Join("")]
"}
usr << browse(html,"window=stickybans;size=700x400")
-/proc/get_stickyban_from_ckey(var/ckey)
+/proc/sticky_banned_ckeys()
+ if (SSdbcore.Connect() || length(SSstickyban.dbcache))
+ if (SSstickyban.dbcacheexpire < world.time)
+ SSstickyban.Populatedbcache()
+ if (SSstickyban.dbcacheexpire)
+ return SSstickyban.dbcache.Copy()
+
+ return sortList(world.GetConfig("ban"))
+
+
+/proc/get_stickyban_from_ckey(ckey)
+ . = list()
if (!ckey)
return null
- ckey = ckey(ckey)
- . = null
- for (var/key in world.GetConfig("ban"))
- if (ckey(key) == ckey)
- . = stickyban2list(world.GetConfig("ban",key))
- break
+ if (SSdbcore.Connect() || length(SSstickyban.dbcache))
+ if (SSstickyban.dbcacheexpire < world.time)
+ SSstickyban.Populatedbcache()
+ if (SSstickyban.dbcacheexpire)
+ . = SSstickyban.dbcache[ckey]
+ //reset the cache incase its a newer ban (but only if we didn't update the cache recently)
+ if (!. && SSstickyban.dbcacheexpire != world.time+STICKYBAN_DB_CACHE_TIME)
+ SSstickyban.dbcacheexpire = 1
+ SSstickyban.Populatedbcache()
+ . = SSstickyban.dbcache[ckey]
+ if (.)
+ var/list/cachedban = SSstickyban.cache["[ckey]"]
+ if (cachedban)
+ .["timeout"] = cachedban["timeout"]
-/proc/stickyban2list(var/ban)
+ .["fromdb"] = TRUE
+ return
+
+ . = stickyban2list(world.GetConfig("ban", ckey)) || stickyban2list(world.GetConfig("ban", ckey(ckey))) || list()
+
+ if (!length(.))
+ return null
+
+/proc/stickyban2list(ban, strictdb = TRUE)
if (!ban)
return null
. = params2list(ban)
@@ -212,30 +465,40 @@
var/ckey = ckey(key)
ckeys[ckey] = ckey //to make searching faster.
.["keys"] = ckeys
+ if (.["whitelist"])
+ var/keys = splittext(.["whitelist"], ",")
+ var/ckeys = list()
+ for (var/key in keys)
+ var/ckey = ckey(key)
+ ckeys[ckey] = ckey //to make searching faster.
+ .["whitelist"] = ckeys
.["type"] = splittext(.["type"], ",")
.["IP"] = splittext(.["IP"], ",")
.["computer_id"] = splittext(.["computer_id"], ",")
+ . -= "fromdb"
-/proc/list2stickyban(var/list/ban)
+/proc/list2stickyban(list/ban)
if (!ban || !islist(ban))
return null
. = ban.Copy()
if (.["keys"])
.["keys"] = jointext(.["keys"], ",")
+ if (.["IP"])
+ .["IP"] = jointext(.["IP"], ",")
+ if (.["computer_id"])
+ .["computer_id"] = jointext(.["computer_id"], ",")
+ if (.["whitelist"])
+ .["whitelist"] = jointext(.["whitelist"], ",")
if (.["type"])
.["type"] = jointext(.["type"], ",")
- //internal tracking only, shouldn't be stored
+ . -= "reverting"
+ . -= "matches_this_round"
. -= "existing_user_matches_this_round"
. -= "admin_matches_this_round"
- . -= "matches_this_round"
- . -= "reverting"
+ . -= "pending_matches_this_round"
- //storing these can sometimes cause sticky bans to start matching everybody
- // and isn't even needed for sticky ban matching, as the hub tracks these separately
- . -= "IP"
- . -= "computer_id"
. = list2params(.)
diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm
index 97d912cb9e..f2c10ecc1c 100644
--- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm
+++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm
@@ -782,7 +782,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null
if(temp.vars.Find(v))
temp.vars[v] = SDQL_expression(d, set_list[sets])
else
- temp.vv_edit_var(v, SDQL_expression(d, set_list[sets]))
+ temp.vv_edit_var(v, SDQL_expression(d, set_list[sets]), TRUE)
break
if(temp.vars.Find(v) && (istype(temp.vars[v], /datum) || istype(temp.vars[v], /client)))
temp = temp.vars[v]
diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm
index ef56b4cd2a..2f89dc82eb 100644
--- a/code/modules/admin/verbs/adminjump.dm
+++ b/code/modules/admin/verbs/adminjump.dm
@@ -158,3 +158,19 @@
else
to_chat(src, "Failed to move mob to a valid location.", confidential = TRUE)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Send Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+
+/// Proc to hook user-enacted teleporting behavior and keep logging of the event.
+/atom/movable/proc/admin_teleport(atom/new_location, message = TRUE)
+ if(isnull(new_location))
+ log_admin("[key_name(usr)] teleported [key_name(src)] to nullspace")
+ moveToNullspace()
+ else
+ log_admin("[key_name(usr)] teleported [key_name(src)] to [AREACOORD(loc)]")
+ forceMove(new_location)
+
+/mob/admin_teleport(atom/new_location, message = TRUE)
+ var/msg = "[key_name_admin(usr)] teleported [ADMIN_LOOKUPFLW(src)] to [isnull(new_location) ? "nullspace" : ADMIN_VERBOSEJMP(loc)]"
+ if(message)
+ message_admins(msg)
+ admin_ticket_log(src, msg)
+ return ..()
diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm
index 6e188a6c7a..c9a5cafd9b 100644
--- a/code/modules/admin/verbs/playsound.dm
+++ b/code/modules/admin/verbs/playsound.dm
@@ -4,12 +4,10 @@
if(!check_rights(R_SOUNDS))
return
+ var/freq = 1
var/vol = input(usr, "What volume would you like the sound to play at?",, 100) as null|num
if(!vol)
return
- var/freq = input(usr, "What frequency would you like the sound to play at?",, 1) as null|num
- if(!freq)
- freq = 1
vol = clamp(vol, 1, 100)
var/sound/admin_sound = new()
@@ -18,14 +16,14 @@
admin_sound.channel = CHANNEL_ADMIN
admin_sound.frequency = freq
admin_sound.wait = 1
- admin_sound.repeat = 0
+ admin_sound.repeat = FALSE
admin_sound.status = SOUND_STREAM
admin_sound.volume = vol
var/res = alert(usr, "Show the title of this song to the players?",, "Yes","No", "Cancel")
switch(res)
if("Yes")
- to_chat(world, "An admin played: [S] ")
+ to_chat(world, "An admin played: [S] ", confidential = TRUE)
if("Cancel")
return
@@ -49,7 +47,7 @@
log_admin("[key_name(src)] played a local sound [S]")
message_admins("[key_name_admin(src)] played a local sound [S]")
- playsound(get_turf(src.mob), S, 50, 0, 0)
+ playsound(get_turf(src.mob), S, 50, FALSE, FALSE)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Play Local Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/play_web_sound()
diff --git a/code/modules/admin/view_variables/mass_edit_variables.dm b/code/modules/admin/view_variables/mass_edit_variables.dm
index a498868436..c45513e812 100644
--- a/code/modules/admin/view_variables/mass_edit_variables.dm
+++ b/code/modules/admin/view_variables/mass_edit_variables.dm
@@ -104,7 +104,7 @@
if (!thing)
continue
var/datum/D = thing
- if (D.vv_edit_var(variable, initial(D.vars[variable])) != FALSE)
+ if (D.vv_edit_var(variable, initial(D.vars[variable]), TRUE) != FALSE)
accepted++
else
rejected++
@@ -135,7 +135,7 @@
for(var/V in varsvars)
new_value = replacetext(new_value,"\[[V]]","[D.vars[V]]")
- if (D.vv_edit_var(variable, new_value) != FALSE)
+ if (D.vv_edit_var(variable, new_value, TRUE) != FALSE)
accepted++
else
rejected++
@@ -161,7 +161,7 @@
if(many && !new_value)
new_value = new type()
- if (D.vv_edit_var(variable, new_value) != FALSE)
+ if (D.vv_edit_var(variable, new_value, TRUE) != FALSE)
accepted++
else
rejected++
@@ -176,7 +176,7 @@
if (!thing)
continue
var/datum/D = thing
- if (D.vv_edit_var(variable, new_value) != FALSE)
+ if (D.vv_edit_var(variable, new_value, TRUE) != FALSE)
accepted++
else
rejected++
diff --git a/code/modules/admin/view_variables/reference_tracking.dm b/code/modules/admin/view_variables/reference_tracking.dm
index 70aac2f107..c293500298 100644
--- a/code/modules/admin/view_variables/reference_tracking.dm
+++ b/code/modules/admin/view_variables/reference_tracking.dm
@@ -109,7 +109,7 @@ GLOBAL_LIST_EMPTY(deletion_failures)
set name = "Find References"
set src in world
- find_references(FALSE)
+ find_references_legacy(FALSE)
/datum/proc/find_references_legacy(skip_alert)
@@ -164,7 +164,7 @@ GLOBAL_LIST_EMPTY(deletion_failures)
qdel(src, TRUE) //force a qdel
if(!running_find_references)
- find_references(TRUE)
+ find_references_legacy(TRUE)
/datum/verb/qdel_then_if_fail_find_references()
diff --git a/code/modules/antagonists/_common/antag_spawner.dm b/code/modules/antagonists/_common/antag_spawner.dm
index edfa9caa22..bcba1e1e1e 100644
--- a/code/modules/antagonists/_common/antag_spawner.dm
+++ b/code/modules/antagonists/_common/antag_spawner.dm
@@ -38,7 +38,7 @@
dat += "Robeless "
dat += "Your apprentice is training to cast spells without their robes. They know Knock and Mindswap. "
dat += "Martial Artist "
- dat += "Your apprentice is training in ancient martial arts. They know the Plasmafist and Nuclear Fist. "
+ dat += "Your apprentice is training in ancient martial arts. They know an Inner Mantra and the Nuclear Fist technique. "
user << browse(dat, "window=radio")
onclose(user, "radio")
return
diff --git a/code/modules/antagonists/abductor/equipment/orderable_gear.dm b/code/modules/antagonists/abductor/equipment/orderable_gear.dm
index f21294b041..774f158169 100644
--- a/code/modules/antagonists/abductor/equipment/orderable_gear.dm
+++ b/code/modules/antagonists/abductor/equipment/orderable_gear.dm
@@ -69,6 +69,7 @@ GLOBAL_LIST_INIT(abductor_gear, subtypesof(/datum/abductor_gear))
build_path = /obj/item/abductor_machine_beacon/chem_dispenser
category = "Advanced Gear"
+/*
/datum/abductor_gear/shrink_ray
name = "Shrink Ray Blaster"
description = "This is a piece of frightening alien tech that enhances the magnetic pull of atoms in a localized space to temporarily make an object shrink. \
@@ -77,3 +78,4 @@ GLOBAL_LIST_INIT(abductor_gear, subtypesof(/datum/abductor_gear))
cost = 2
build_path = /obj/item/gun/energy/shrink_ray
category = "Advanced Gear"
+*/
diff --git a/code/modules/antagonists/bloodsucker/bloodsucker_sunlight.dm b/code/modules/antagonists/bloodsucker/bloodsucker_sunlight.dm
index 43163f6a70..2cb50c6b3b 100644
--- a/code/modules/antagonists/bloodsucker/bloodsucker_sunlight.dm
+++ b/code/modules/antagonists/bloodsucker/bloodsucker_sunlight.dm
@@ -13,8 +13,9 @@
var/nightime_duration = 900 //15 Minutes
/obj/effect/sunlight/Initialize()
- countdown()
- hud_tick()
+ . = ..()
+ INVOKE_ASYNC(src, .proc/countdown)
+ INVOKE_ASYNC(src, .proc/hud_tick)
/obj/effect/sunlight/proc/countdown()
set waitfor = FALSE
diff --git a/code/modules/antagonists/bloodsucker/datum_vassal.dm b/code/modules/antagonists/bloodsucker/datum_vassal.dm
index c065d5fe7c..91e89e71e6 100644
--- a/code/modules/antagonists/bloodsucker/datum_vassal.dm
+++ b/code/modules/antagonists/bloodsucker/datum_vassal.dm
@@ -90,7 +90,7 @@
/datum/antagonist/vassal/greet()
to_chat(owner, "You are now the mortal servant of [master.owner.current], a bloodsucking vampire! ")
to_chat(owner, "The power of [master.owner.current.p_their()] immortal blood compells you to obey [master.owner.current.p_them()] in all things, even offering your own life to prolong theirs. \
- You are not required to obey any other Bloodsucker, for only [master.owner.current] is your master. The laws of Nanotransen do not apply to you now; only your vampiric master's word must be obeyed.")
+ You are not required to obey any other Bloodsucker, for only [master.owner.current] is your master. The laws of Nanotrasen do not apply to you now; only your vampiric master's word must be obeyed.")
// Effects...
owner.current.playsound_local(null, 'sound/magic/mutate.ogg', 100, FALSE, pressure_affected = FALSE)
//owner.store_memory("You became the mortal servant of [master.owner.current], a bloodsucking vampire!")
diff --git a/code/modules/antagonists/changeling/changeling.dm b/code/modules/antagonists/changeling/changeling.dm
index dacd568993..7a34af4d13 100644
--- a/code/modules/antagonists/changeling/changeling.dm
+++ b/code/modules/antagonists/changeling/changeling.dm
@@ -213,7 +213,7 @@
if(canrespec)
to_chat(owner.current, "We have removed our evolutions from this form, and are now ready to readapt. ")
reset_powers()
- playsound(get_turf(owner.current), 'sound/effects/lingreadapt.ogg', 75, TRUE, 5, soundenvwet = 0)
+ playsound(get_turf(owner.current), 'sound/effects/lingreadapt.ogg', 75, TRUE, 5)
canrespec = 0
SSblackbox.record_feedback("tally", "changeling_power_purchase", 1, "Readapt")
return 1
diff --git a/code/modules/antagonists/changeling/powers/shriek.dm b/code/modules/antagonists/changeling/powers/shriek.dm
index 0e2515fdae..dae1da9f8f 100644
--- a/code/modules/antagonists/changeling/powers/shriek.dm
+++ b/code/modules/antagonists/changeling/powers/shriek.dm
@@ -29,7 +29,7 @@
for(var/obj/machinery/light/L in range(4, user))
L.on = 1
L.break_light_tube()
- playsound(get_turf(user), 'sound/effects/lingscreech.ogg', 75, TRUE, 5, soundenvwet = 0)
+ playsound(get_turf(user), 'sound/effects/lingscreech.ogg', 75, TRUE, 5)
return TRUE
/obj/effect/proc_holder/changeling/dissonant_shriek
@@ -49,5 +49,5 @@
L.on = 1
L.break_light_tube()
empulse_using_range(get_turf(user), 8, TRUE)
- playsound(get_turf(user), 'sound/effects/lingempscreech.ogg', 75, TRUE, 5, soundenvwet = 0)
+ playsound(get_turf(user), 'sound/effects/lingempscreech.ogg', 75, TRUE, 5)
return TRUE
diff --git a/code/modules/antagonists/clockcult/clock_effects/city_of_cogs_rift.dm b/code/modules/antagonists/clockcult/clock_effects/city_of_cogs_rift.dm
index 3ea4668df8..1da49efe3c 100644
--- a/code/modules/antagonists/clockcult/clock_effects/city_of_cogs_rift.dm
+++ b/code/modules/antagonists/clockcult/clock_effects/city_of_cogs_rift.dm
@@ -22,7 +22,7 @@
for(var/mob/M in GLOB.player_list)
if(M.z == z)
if(get_dist(src, M) >= 7)
- M.playsound_local(src, 'sound/magic/blink.ogg', 10, FALSE, falloff = 10)
+ M.playsound_local(src, 'sound/magic/blink.ogg', 10, FALSE)
else
M.playsound_local(src, 'sound/magic/blink.ogg', 50, FALSE)
diff --git a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm
index db498f0975..b868fb54c0 100644
--- a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm
+++ b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm
@@ -348,9 +348,9 @@
L.dust()
else if(L.health > min_drain_health)
if(!GLOB.ratvar_awakens && L.stat == CONSCIOUS)
- vitality_drained = L.adjustToxLoss(1, forced = TRUE)
+ vitality_drained = L.adjustToxLoss(1, forced = TRUE, toxins_type = TOX_OMNI)
else
- vitality_drained = L.adjustToxLoss(1.5, forced = TRUE)
+ vitality_drained = L.adjustToxLoss(1.5, forced = TRUE, toxins_type = TOX_OMNI)
if(vitality_drained)
GLOB.clockwork_vitality += vitality_drained
else
diff --git a/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm b/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm
index 5affcd5dec..a00019aa45 100644
--- a/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm
+++ b/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm
@@ -115,7 +115,7 @@
if(totaldamage)
L.heal_overall_damage(brutedamage, burndamage, only_organic = FALSE) //Maybe a machine god shouldn't murder augmented followers instead of healing them
L.adjustOxyLoss(-oxydamage)
- L.adjustToxLoss(totaldamage * 0.5, TRUE, TRUE)
+ L.adjustToxLoss(totaldamage * 0.5, TRUE, TRUE, toxins_type = TOX_OMNI)
clockwork_say(ranged_ability_user, text2ratvar("[has_holy_water ? "Heal tainted" : "Mend wounded"] flesh!"))
log_combat(ranged_ability_user, L, "healed with Sentinel's Compromise")
L.visible_message("A blue light washes over [L], [has_holy_water ? "causing [L.p_them()] to briefly glow as it mends" : " mending"] [L.p_their()] bruises and burns! ", \
diff --git a/code/modules/antagonists/clockcult/clock_structures/trap_triggers/pressure_sensor.dm b/code/modules/antagonists/clockcult/clock_structures/trap_triggers/pressure_sensor.dm
index af29bc9b31..c5d1bc2ded 100644
--- a/code/modules/antagonists/clockcult/clock_structures/trap_triggers/pressure_sensor.dm
+++ b/code/modules/antagonists/clockcult/clock_structures/trap_triggers/pressure_sensor.dm
@@ -15,3 +15,5 @@
audible_message("*click* ")
playsound(src, 'sound/items/screwdriver2.ogg', 50, TRUE)
activate()
+
+ . = ..()
diff --git a/code/modules/antagonists/clockcult/clock_structures/trap_triggers/pressure_sensor_mech.dm b/code/modules/antagonists/clockcult/clock_structures/trap_triggers/pressure_sensor_mech.dm
index 10a5b7787f..21735ad6d7 100644
--- a/code/modules/antagonists/clockcult/clock_structures/trap_triggers/pressure_sensor_mech.dm
+++ b/code/modules/antagonists/clockcult/clock_structures/trap_triggers/pressure_sensor_mech.dm
@@ -8,7 +8,7 @@
alpha = 75
/obj/structure/destructible/clockwork/trap/trigger/pressure_sensor/mech/Crossed(atom/movable/AM)
-
+ . = ..()
if(!istype(AM,/obj/mecha/))
return
diff --git a/code/modules/antagonists/clockcult/clock_structures/traps/steam_vent.dm b/code/modules/antagonists/clockcult/clock_structures/traps/steam_vent.dm
index 6aede1592e..7d6eea1c79 100644
--- a/code/modules/antagonists/clockcult/clock_structures/traps/steam_vent.dm
+++ b/code/modules/antagonists/clockcult/clock_structures/traps/steam_vent.dm
@@ -21,3 +21,5 @@
if(isliving(AM) && opacity)
var/mob/living/L = AM
L.adjust_fire_stacks(-1) //It's wet!
+ return
+ . = ..()
diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm
index 4a697a6bd7..901c83b1b7 100644
--- a/code/modules/antagonists/cult/blood_magic.dm
+++ b/code/modules/antagonists/cult/blood_magic.dm
@@ -717,9 +717,9 @@
uses = 0
ratio *= -1
H.adjustOxyLoss((overall_damage*ratio) * (H.getOxyLoss() / overall_damage), 0)
- H.adjustToxLoss((overall_damage*ratio) * (H.getToxLoss() / overall_damage), 0)
- H.adjustFireLoss((overall_damage*ratio) * (H.getFireLoss() / overall_damage), 0)
- H.adjustBruteLoss((overall_damage*ratio) * (H.getBruteLoss() / overall_damage), 0)
+ H.adjustToxLoss((overall_damage*ratio) * (H.getToxLoss() / overall_damage), 0, toxins_type = TOX_OMNI)
+ H.adjustFireLoss((overall_damage*ratio) * (H.getFireLoss() / overall_damage), 0, only_organic = FALSE)
+ H.adjustBruteLoss((overall_damage*ratio) * (H.getBruteLoss() / overall_damage), 0, only_organic = FALSE)
H.updatehealth()
playsound(get_turf(H), 'sound/magic/staff_healing.ogg', 25)
new /obj/effect/temp_visual/cult/sparks(get_turf(H))
diff --git a/code/modules/antagonists/cult/cult_structures.dm b/code/modules/antagonists/cult/cult_structures.dm
index a388621c92..25fd446b06 100644
--- a/code/modules/antagonists/cult/cult_structures.dm
+++ b/code/modules/antagonists/cult/cult_structures.dm
@@ -214,8 +214,8 @@
if(L.health != L.maxHealth)
new /obj/effect/temp_visual/heal(get_turf(src), "#960000")
if(ishuman(L))
- L.adjustBruteLoss(-1, 0)
- L.adjustFireLoss(-1, 0)
+ L.adjustBruteLoss(-1, 0, only_organic = FALSE)
+ L.adjustFireLoss(-1, 0, only_organic = FALSE)
L.updatehealth()
if(isshade(L) || isconstruct(L))
var/mob/living/simple_animal/M = L
diff --git a/code/modules/antagonists/wizard/equipment/spellbook.dm b/code/modules/antagonists/wizard/equipment/spellbook.dm
index 1e98b2f753..9b2def48d7 100644
--- a/code/modules/antagonists/wizard/equipment/spellbook.dm
+++ b/code/modules/antagonists/wizard/equipment/spellbook.dm
@@ -189,6 +189,10 @@
name = "Mutate"
spell_type = /obj/effect/proc_holder/spell/targeted/genetic/mutate
+/datum/spellbook_entry/mantra
+ name = "Inner Mantra"
+ spell_type = /obj/effect/proc_holder/spell/self/mantra
+
/datum/spellbook_entry/jaunt
name = "Ethereal Jaunt"
spell_type = /obj/effect/proc_holder/spell/targeted/ethereal_jaunt
diff --git a/code/modules/antagonists/wizard/wizard.dm b/code/modules/antagonists/wizard/wizard.dm
index 42954c3542..23e870a0ec 100644
--- a/code/modules/antagonists/wizard/wizard.dm
+++ b/code/modules/antagonists/wizard/wizard.dm
@@ -181,8 +181,8 @@
to_chat(owner, "Your service has not gone unrewarded, however. Studying under [master.current.real_name], you have learned stealthy, robeless spells. You are able to cast knock and mindswap.")
if(APPRENTICE_MARTIAL)
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/touch/nuclear_fist(null))
- H.put_in_hands(new /obj/item/book/granter/martial/plasma_fist(H))
- to_chat(owner, "Your service has not gone unrewarded, however. Studying under [master.current.real_name], you have learned mystical martial abilities. You are also able to use the Nuclear Fist at will.")
+ owner.AddSpell(new /obj/effect/proc_holder/spell/self/mantra(null))
+ to_chat(owner, "Your service has not gone unrewarded, however. Studying under [master.current.real_name], you have learned to control your Inner Mantra. You are also able to use the Nuclear Fist at will.")
/datum/antagonist/wizard/apprentice/create_objectives()
var/datum/objective/protect/new_objective = new /datum/objective/protect
diff --git a/code/modules/arousal/toys/dildos.dm b/code/modules/arousal/toys/dildos.dm
index 3f6fa9bb45..0cfa57e5fc 100644
--- a/code/modules/arousal/toys/dildos.dm
+++ b/code/modules/arousal/toys/dildos.dm
@@ -123,6 +123,7 @@ obj/item/dildo/flared/huge
desc = "THIS THING IS HUGE!"
dildo_size = 4
force = 10
+ hitsound = 'sound/weapons/klonk.ogg'
obj/item/dildo/custom
name = "customizable dildo"
diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm
index bf56449a0c..84e70bbbb3 100644
--- a/code/modules/assembly/holder.dm
+++ b/code/modules/assembly/holder.dm
@@ -62,6 +62,7 @@
master.update_icon()
/obj/item/assembly_holder/Crossed(atom/movable/AM as mob|obj)
+ . = ..()
if(a_left)
a_left.Crossed(AM)
if(a_right)
diff --git a/code/modules/asset_cache/asset_cache_client.dm b/code/modules/asset_cache/asset_cache_client.dm
index f462fe386b..3cff8cb41f 100644
--- a/code/modules/asset_cache/asset_cache_client.dm
+++ b/code/modules/asset_cache/asset_cache_client.dm
@@ -1,5 +1,5 @@
-/// Process asset cache client topic calls for "asset_cache_confirm_arrival=[INT]"
+/// Process asset cache client topic calls for `"asset_cache_confirm_arrival=[INT]"`
/client/proc/asset_cache_confirm_arrival(job_id)
var/asset_cache_job = round(text2num(job_id))
//because we skip the limiter, we have to make sure this is a valid arrival and not somebody tricking us into letting them append to a list without limit.
@@ -10,7 +10,7 @@
return asset_cache_job || TRUE
-/// Process asset cache client topic calls for "asset_cache_preload_data=[HTML+JSON_STRING]
+/// Process asset cache client topic calls for `"asset_cache_preload_data=[HTML+JSON_STRING]"`
/client/proc/asset_cache_preload_data(data)
var/json = data
var/list/preloaded_assets = json_decode(json)
diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm
index 3b6a30a02a..22fb266033 100644
--- a/code/modules/asset_cache/asset_list_items.dm
+++ b/code/modules/asset_cache/asset_list_items.dm
@@ -47,8 +47,9 @@
"smmon_3.gif" = 'icons/program_icons/smmon_3.gif',
"smmon_4.gif" = 'icons/program_icons/smmon_4.gif',
"smmon_5.gif" = 'icons/program_icons/smmon_5.gif',
- "smmon_6.gif" = 'icons/program_icons/smmon_6.gif',
- "borg_mon.gif" = 'icons/program_icons/borg_mon.gif'
+ "smmon_6.gif" = 'icons/program_icons/smmon_6.gif'
+ // "borg_mon.gif" = 'icons/program_icons/borg_mon.gif',
+ // "robotact.gif" = 'icons/program_icons/robotact.gif'
)
/datum/asset/simple/radar_assets
@@ -156,7 +157,6 @@
)
/datum/asset/simple/namespaced/fontawesome
- legacy = TRUE
assets = list(
"fa-regular-400.eot" = 'html/font-awesome/webfonts/fa-regular-400.eot',
"fa-regular-400.woff" = 'html/font-awesome/webfonts/fa-regular-400.woff',
@@ -248,6 +248,10 @@
"rule8" = 'icons/UI_Icons/Achievements/Misc/rule8.png',
"snail" = 'icons/UI_Icons/Achievements/Misc/snail.png',
"ascension" = 'icons/UI_Icons/Achievements/Misc/ascension.png',
+ "ashascend" = 'icons/UI_Icons/Achievements/Misc/ashascend.png',
+ "fleshascend" = 'icons/UI_Icons/Achievements/Misc/fleshascend.png',
+ "rustascend" = 'icons/UI_Icons/Achievements/Misc/rustascend.png',
+ "voidascend" = 'icons/UI_Icons/Achievements/Misc/voidascend.png',
"mining" = 'icons/UI_Icons/Achievements/Skills/mining.png',
"assistant" = 'icons/UI_Icons/Achievements/Mafia/assistant.png',
"changeling" = 'icons/UI_Icons/Achievements/Mafia/changeling.png',
@@ -288,7 +292,7 @@
)
/datum/asset/spritesheet/simple/pills
- name ="pills"
+ name = "pills"
assets = list(
"pill1" = 'icons/UI_Icons/Pills/pill1.png',
"pill2" = 'icons/UI_Icons/Pills/pill2.png',
@@ -313,7 +317,28 @@
"pill21" = 'icons/UI_Icons/Pills/pill21.png',
"pill22" = 'icons/UI_Icons/Pills/pill22.png',
)
-
+/*
+/datum/asset/spritesheet/simple/condiments
+ name = "condiments"
+ assets = list(
+ CONDIMASTER_STYLE_FALLBACK = 'icons/UI_Icons/Condiments/emptycondiment.png',
+ "enzyme" = 'icons/UI_Icons/Condiments/enzyme.png',
+ "flour" = 'icons/UI_Icons/Condiments/flour.png',
+ "mayonnaise" = 'icons/UI_Icons/Condiments/mayonnaise.png',
+ "milk" = 'icons/UI_Icons/Condiments/milk.png',
+ "blackpepper" = 'icons/UI_Icons/Condiments/peppermillsmall.png',
+ "rice" = 'icons/UI_Icons/Condiments/rice.png',
+ "sodiumchloride" = 'icons/UI_Icons/Condiments/saltshakersmall.png',
+ "soymilk" = 'icons/UI_Icons/Condiments/soymilk.png',
+ "soysauce" = 'icons/UI_Icons/Condiments/soysauce.png',
+ "sugar" = 'icons/UI_Icons/Condiments/sugar.png',
+ "ketchup" = 'icons/UI_Icons/Condiments/ketchup.png',
+ "capsaicin" = 'icons/UI_Icons/Condiments/hotsauce.png',
+ "frostoil" = 'icons/UI_Icons/Condiments/coldsauce.png',
+ "bbqsauce" = 'icons/UI_Icons/Condiments/bbqsauce.png',
+ "cornoil" = 'icons/UI_Icons/Condiments/oliveoil.png',
+ )
+*/
//this exists purely to avoid meta by pre-loading all language icons.
/datum/asset/language/register()
for(var/path in typesof(/datum/language))
@@ -484,3 +509,31 @@
/datum/asset/spritesheet/mafia/register()
InsertAll("", 'icons/obj/mafia.dmi')
..()
+
+/datum/asset/simple/portraits
+ var/tab = "use subtypes of this please"
+ assets = list()
+
+/datum/asset/simple/portraits/New()
+ if(!SSpersistence.paintings || !SSpersistence.paintings[tab] || !length(SSpersistence.paintings[tab]))
+ return
+ for(var/p in SSpersistence.paintings[tab])
+ var/list/portrait = p
+ var/png = "data/paintings/[tab]/[portrait["md5"]].png"
+ if(fexists(png))
+ assets[portrait["title"]] = png
+ ..() //this is where it registers all these assets we added to the list
+
+/datum/asset/simple/portraits/library
+ tab = "library"
+
+/datum/asset/simple/portraits/library_secure
+ tab = "library_secure"
+
+/datum/asset/simple/portraits/library_private
+ tab = "library_private"
+
+/datum/asset/simple/safe
+ assets = list(
+ "safe_dial.png" = 'html/safe_dial.png'
+ )
diff --git a/code/modules/asset_cache/readme.md b/code/modules/asset_cache/readme.md
index 82e6bea896..c8c9d78b71 100644
--- a/code/modules/asset_cache/readme.md
+++ b/code/modules/asset_cache/readme.md
@@ -24,7 +24,7 @@ Call .get_url_mappings() to get an associated list with the urls your assets can
See the documentation for `/datum/asset_transport` for the backend api the asset datums utilize.
-The global variable `SSassets.transport` contains the currently configured transport.
+The global variable `SSassets.transport` contains the currently configured transport.
@@ -32,6 +32,6 @@ The global variable `SSassets.transport` contains the currently configured trans
Because byond browse() calls use non-blocking queues, if your code uses output() (which bypasses all of these queues) to invoke javascript functions you will need to first have the javascript announce to the server it has loaded before trying to invoke js functions.
-To make your code work with any CDNs configured by the server, you must make sure assets are referenced from the url returned by `get_url_mappings()` or by asset_transport's `get_asset_url()`. (TGUI also has helpers for this.) If this can not be easily done, you can bypass the cdn using legacy assets, see the simple asset datum for details.
+To make your code work with any CDNs configured by the server, you must make sure assets are referenced from the url returned by `get_url_mappings()` or by asset_transport's `get_asset_url()`. (TGUI also has helpers for this.) If this can not be easily done, you can bypass the cdn using legacy assets, see the simple asset datum for details.
CSS files that use url() can be made to use the CDN without needing to rewrite all url() calls in code by using the namespaced helper datum. See the documentation for `/datum/asset/simple/namespaced` for details.
diff --git a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm
index eee8859485..244b51bd2b 100644
--- a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm
+++ b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm
@@ -49,6 +49,7 @@
SSair.add_to_active(T)
return ..()
+/// Function for Extools Atmos
/turf/proc/update_air_ref()
/////////////////GAS MIXTURE PROCS///////////////////
diff --git a/code/modules/awaymissions/capture_the_flag.dm b/code/modules/awaymissions/capture_the_flag.dm
index 3426208fae..d32905e007 100644
--- a/code/modules/awaymissions/capture_the_flag.dm
+++ b/code/modules/awaymissions/capture_the_flag.dm
@@ -7,6 +7,8 @@
#define AMMO_DROP_LIFETIME 300
#define CTF_REQUIRED_PLAYERS 4
+
+
/obj/item/ctf
name = "banner"
icon = 'icons/obj/items_and_weapons.dmi'
@@ -16,13 +18,13 @@
righthand_file = 'icons/mob/inhands/equipment/banners_righthand.dmi'
desc = "A banner with Nanotrasen's logo on it."
slowdown = 2
- item_flags = SLOWS_WHILE_IN_HAND
throw_speed = 0
throw_range = 1
force = 200
armour_penetration = 1000
resistance_flags = INDESTRUCTIBLE
anchored = TRUE
+ item_flags = SLOWS_WHILE_IN_HAND
var/team = WHITE_TEAM
var/reset_cooldown = 0
var/anyonecanpickup = TRUE
@@ -53,12 +55,13 @@
to_chat(M, "\The [src] has been returned to base! ")
STOP_PROCESSING(SSobj, src)
-/obj/item/ctf/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
+//ATTACK HAND IGNORING PARENT RETURN VALUE
+/obj/item/ctf/on_attack_hand(mob/living/user)
if(!is_ctf_target(user) && !anyonecanpickup)
- to_chat(user, "Non players shouldn't be moving the flag!")
+ to_chat(user, "Non-players shouldn't be moving the flag! ")
return
if(team in user.faction)
- to_chat(user, "You can't move your own flag!")
+ to_chat(user, "You can't move your own flag! ")
return
if(loc == user)
if(!user.dropItemToGround(src))
@@ -68,7 +71,7 @@
if(!user.put_in_active_hand(src))
dropped(user)
return
- user.anchored = TRUE
+ user.set_anchored(TRUE)
user.status_flags &= ~CANPUSH
for(var/mob/M in GLOB.player_list)
var/area/mob_area = get_area(M)
@@ -79,7 +82,7 @@
/obj/item/ctf/dropped(mob/user)
..()
- user.anchored = FALSE
+ user.set_anchored(FALSE)
user.status_flags |= CANPUSH
reset_cooldown = world.time + 200 //20 seconds
START_PROCESSING(SSobj, src)
@@ -172,20 +175,20 @@
GLOB.poi_list.Remove(src)
..()
-/obj/machinery/capture_the_flag/process()
+/obj/machinery/capture_the_flag/process(delta_time)
for(var/i in spawned_mobs)
if(!i)
spawned_mobs -= i
continue
// Anyone in crit, automatically reap
- var/mob/living/M = i
- if(M.InCritical() || M.stat == DEAD)
- ctf_dust_old(M)
+ var/mob/living/living_participant = i
+ if(living_participant.InCritical() || living_participant.stat == DEAD)
+ ctf_dust_old(living_participant)
else
// The changes that you've been hit with no shield but not
// instantly critted are low, but have some healing.
- M.adjustBruteLoss(-5)
- M.adjustFireLoss(-5)
+ living_participant.adjustBruteLoss(-2.5 * delta_time)
+ living_participant.adjustFireLoss(-2.5 * delta_time)
/obj/machinery/capture_the_flag/red
name = "Red CTF Controller"
@@ -212,6 +215,10 @@
toggle_all_ctf(user)
return
+
+ // if(!(GLOB.ghost_role_flags & GHOSTROLE_MINIGAME))
+ // to_chat(user, "CTF has been temporarily disabled by admins. ")
+ // return
people_who_want_to_play |= user.ckey
var/num = people_who_want_to_play.len
var/remaining = CTF_REQUIRED_PLAYERS - num
@@ -227,7 +234,7 @@
return
if(user.ckey in team_members)
if(user.ckey in recently_dead_ckeys)
- to_chat(user, "It must be more than [DisplayTimeText(respawn_cooldown)] from your last death to respawn!")
+ to_chat(user, "It must be more than [DisplayTimeText(respawn_cooldown)] from your last death to respawn! ")
return
var/client/new_team_member = user.client
if(user.mind && user.mind.current)
@@ -239,10 +246,10 @@
if(CTF == src || CTF.ctf_enabled == FALSE)
continue
if(user.ckey in CTF.team_members)
- to_chat(user, "No switching teams while the round is going!")
+ to_chat(user, "No switching teams while the round is going! ")
return
if(CTF.team_members.len < src.team_members.len)
- to_chat(user, "[src.team] has more team members than [CTF.team]. Try joining [CTF.team] team to even things up.")
+ to_chat(user, "[src.team] has more team members than [CTF.team]! Try joining [CTF.team] team to even things up. ")
return
team_members |= user.ckey
var/client/new_team_member = user.client
@@ -258,7 +265,7 @@
addtimer(CALLBACK(src, .proc/clear_cooldown, body.ckey), respawn_cooldown, TIMER_UNIQUE)
body.dust()
-/obj/machinery/capture_the_flag/proc/clear_cooldown(var/ckey)
+/obj/machinery/capture_the_flag/proc/clear_cooldown(ckey)
recently_dead_ckeys -= ckey
/obj/machinery/capture_the_flag/proc/spawn_team_member(client/new_team_member)
@@ -270,7 +277,7 @@
M.equipOutfit(ctf_gear)
M.dna.species.punchdamagehigh = 25
M.dna.species.punchdamagelow = 25
- M.AddElement(/datum/element/ghost_role_eligibility)
+ M.AddElement(/datum/element/ghost_role_eligibility) //??
spawned_mobs += M
/obj/machinery/capture_the_flag/Topic(href, href_list)
@@ -293,14 +300,15 @@
victory()
/obj/machinery/capture_the_flag/proc/victory()
- for(var/mob/M in GLOB.mob_list)
- var/area/mob_area = get_area(M)
+ for(var/mob/_competitor in GLOB.mob_living_list)
+ var/mob/living/competitor = _competitor
+ var/area/mob_area = get_area(competitor)
if(istype(mob_area, /area/ctf))
- to_chat(M, "[team] team wins! ")
- to_chat(M, "Teams have been cleared. Click on the machines to vote to begin another round. ")
- for(var/obj/item/ctf/W in M)
- M.dropItemToGround(W)
- M.dust()
+ to_chat(competitor, "[team] team wins! ")
+ to_chat(competitor, "Teams have been cleared. Click on the machines to vote to begin another round. ")
+ for(var/obj/item/ctf/W in competitor)
+ competitor.dropItemToGround(W)
+ competitor.dust()
for(var/obj/machinery/control_point/control in GLOB.machines)
control.icon_state = "dominator"
control.controlling = null
@@ -328,7 +336,7 @@
dead_barricades.Cut()
- notify_ghosts("[name] has been activated!", enter_link="(Click to join the [team] team!) or click on the controller directly!", source = src, action=NOTIFY_ATTACK)
+ notify_ghosts("[name] has been activated!", enter_link="(Click to join the [team] team!) or click on the controller directly!", source = src, action=NOTIFY_ATTACK, header = "CTF has been activated")
if(!arena_reset)
reset_the_arena()
@@ -355,10 +363,10 @@
ctf_enabled = FALSE
arena_reset = FALSE
var/area/A = get_area(src)
- for(var/i in GLOB.mob_list)
- var/mob/M = i
- if((get_area(A) == A) && (M.ckey in team_members))
- M.dust()
+ for(var/_competitor in GLOB.mob_living_list)
+ var/mob/living/competitor = _competitor
+ if((get_area(A) == A) && (competitor.ckey in team_members))
+ competitor.dust()
team_members.Cut()
spawned_mobs.Cut()
recently_dead_ckeys.Cut()
@@ -375,18 +383,18 @@
CTF.ctf_gear = initial(ctf_gear)
CTF.respawn_cooldown = DEFAULT_RESPAWN
-/proc/ctf_floor_vanish(atom/target)
- if(isturf(target.loc))
- qdel(target)
-
/obj/item/gun/ballistic/automatic/pistol/deagle/ctf
desc = "This looks like it could really hurt in melee."
force = 75
mag_type = /obj/item/ammo_box/magazine/m50/ctf
-/obj/item/gun/ballistic/automatic/pistol/deagle/ctf/dropped(mob/user)
+/obj/item/gun/ballistic/automatic/pistol/deagle/ctf/dropped()
. = ..()
- addtimer(CALLBACK(GLOBAL_PROC, /proc/ctf_floor_vanish, src), 1)
+ addtimer(CALLBACK(src, .proc/floor_vanish), 1)
+
+/obj/item/gun/ballistic/automatic/pistol/deagle/ctf/proc/floor_vanish()
+ if(isturf(loc))
+ qdel(src)
/obj/item/ammo_box/magazine/m50/ctf
ammo_type = /obj/item/ammo_casing/a50/ctf
@@ -400,6 +408,7 @@
/obj/item/projectile/bullet/ctf/prehit(atom/target)
if(is_ctf_target(target))
damage = 60
+ return //PROJECTILE_PIERCE_NONE /// hey uhh don't hit anyone behind them
. = ..()
/obj/item/gun/ballistic/automatic/laser/ctf
@@ -407,16 +416,24 @@
desc = "This looks like it could really hurt in melee."
force = 50
-/obj/item/gun/ballistic/automatic/laser/ctf/dropped(mob/user)
+/obj/item/gun/ballistic/automatic/laser/ctf/dropped()
. = ..()
- addtimer(CALLBACK(GLOBAL_PROC, /proc/ctf_floor_vanish, src), 1)
+ addtimer(CALLBACK(src, .proc/floor_vanish), 1)
+
+/obj/item/gun/ballistic/automatic/laser/ctf/proc/floor_vanish()
+ if(isturf(loc))
+ qdel(src)
/obj/item/ammo_box/magazine/recharge/ctf
ammo_type = /obj/item/ammo_casing/caseless/laser/ctf
-/obj/item/ammo_box/magazine/recharge/ctf/dropped(mob/user)
+/obj/item/ammo_box/magazine/recharge/ctf/dropped()
. = ..()
- addtimer(CALLBACK(GLOBAL_PROC, /proc/ctf_floor_vanish, src), 1)
+ addtimer(CALLBACK(src, .proc/floor_vanish), 1)
+
+/obj/item/ammo_box/magazine/recharge/ctf/proc/floor_vanish()
+ if(isturf(loc))
+ qdel(src)
/obj/item/ammo_casing/caseless/laser/ctf
projectile_type = /obj/item/projectile/beam/ctf
@@ -428,15 +445,16 @@
/obj/item/projectile/beam/ctf/prehit(atom/target)
if(is_ctf_target(target))
damage = 150
+ return //PROJECTILE_PIERCE_NONE /// hey uhhh don't hit anyone behind them
. = ..()
/proc/is_ctf_target(atom/target)
. = FALSE
if(istype(target, /obj/structure/barricade/security/ctf))
. = TRUE
- if(isliving(target))
- var/mob/living/H = target
- if((RED_TEAM in H.faction) || (BLUE_TEAM in H.faction))
+ if(ishuman(target))
+ var/mob/living/carbon/human/H = target
+ if(istype(H.wear_suit, /obj/item/clothing/suit/space/hardsuit/shielded/ctf))
. = TRUE
// RED TEAM GUNS
@@ -482,7 +500,11 @@
/obj/item/claymore/ctf/dropped(mob/user)
. = ..()
- addtimer(CALLBACK(GLOBAL_PROC, /proc/ctf_floor_vanish, src), 1)
+ addtimer(CALLBACK(src, .proc/floor_vanish), 1)
+
+/obj/item/claymore/ctf/proc/floor_vanish()
+ if(isturf(loc))
+ qdel(src)
/datum/outfit/ctf
name = "CTF"
@@ -491,27 +513,28 @@
suit = /obj/item/clothing/suit/space/hardsuit/shielded/ctf
toggle_helmet = FALSE // see the whites of their eyes
shoes = /obj/item/clothing/shoes/combat
- gloves = /obj/item/clothing/gloves/tackler/combat
+ gloves = /obj/item/clothing/gloves/combat
+ id = /obj/item/card/id/away
belt = /obj/item/gun/ballistic/automatic/pistol/deagle/ctf
l_pocket = /obj/item/ammo_box/magazine/recharge/ctf
r_pocket = /obj/item/ammo_box/magazine/recharge/ctf
r_hand = /obj/item/gun/ballistic/automatic/laser/ctf
back = /obj/item/claymore/ctf
-/datum/outfit/ctf/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source)
+/datum/outfit/ctf/post_equip(mob/living/carbon/human/H, visualsOnly=FALSE)
if(visualsOnly)
return
var/list/no_drops = list()
var/obj/item/card/id/W = H.wear_id
no_drops += W
W.registered_name = H.real_name
- W.update_label(W.registered_name, W.assignment)
+ W.update_label()
- // The shielded hardsuit is already TRAIT_NODROP
- no_drops += H.get_item_by_slot(SLOT_GLOVES)
- no_drops += H.get_item_by_slot(SLOT_SHOES)
- no_drops += H.get_item_by_slot(SLOT_W_UNIFORM)
- no_drops += H.get_item_by_slot(SLOT_EARS)
+ no_drops += H.get_item_by_slot(ITEM_SLOT_OCLOTHING)
+ no_drops += H.get_item_by_slot(ITEM_SLOT_GLOVES)
+ no_drops += H.get_item_by_slot(ITEM_SLOT_FEET)
+ no_drops += H.get_item_by_slot(ITEM_SLOT_ICLOTHING)
+ no_drops += H.get_item_by_slot(ITEM_SLOT_EARS)
for(var/i in no_drops)
var/obj/item/I = i
ADD_TRAIT(I, TRAIT_NODROP, CAPTURE_THE_FLAG_TRAIT)
@@ -525,6 +548,7 @@
r_hand = /obj/item/gun/ballistic/automatic/laser/ctf/red
l_pocket = /obj/item/ammo_box/magazine/recharge/ctf/red
r_pocket = /obj/item/ammo_box/magazine/recharge/ctf/red
+ id = /obj/item/card/id/syndicate_command //it's red
/datum/outfit/ctf/red/instagib
r_hand = /obj/item/gun/energy/laser/instakill/red
@@ -535,12 +559,13 @@
r_hand = /obj/item/gun/ballistic/automatic/laser/ctf/blue
l_pocket = /obj/item/ammo_box/magazine/recharge/ctf/blue
r_pocket = /obj/item/ammo_box/magazine/recharge/ctf/blue
+ id = /obj/item/card/id/centcom //it's blue
/datum/outfit/ctf/blue/instagib
r_hand = /obj/item/gun/energy/laser/instakill/blue
shoes = /obj/item/clothing/shoes/jackboots/fast
-/datum/outfit/ctf/red/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source)
+/datum/outfit/ctf/red/post_equip(mob/living/carbon/human/H)
..()
var/obj/item/radio/R = H.ears
R.set_frequency(FREQ_CTF_RED)
@@ -548,7 +573,7 @@
R.independent = TRUE
H.dna.species.stunmod = 0
-/datum/outfit/ctf/blue/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source)
+/datum/outfit/ctf/blue/post_equip(mob/living/carbon/human/H)
..()
var/obj/item/radio/R = H.ears
R.set_frequency(FREQ_CTF_BLUE)
@@ -595,6 +620,10 @@
/obj/structure/barricade/security/ctf/make_debris()
new /obj/effect/ctf/dead_barricade(get_turf(src))
+/obj/structure/table/reinforced/ctf
+ resistance_flags = INDESTRUCTIBLE
+ flags_1 = NODECONSTRUCT_1
+
/obj/effect/ctf
density = FALSE
anchored = TRUE
@@ -617,10 +646,11 @@
QDEL_IN(src, AMMO_DROP_LIFETIME)
/obj/effect/ctf/ammo/Crossed(atom/movable/AM)
+ . = ..()
reload(AM)
-/obj/effect/ctf/ammo/Bump(atom/movable/AM)
- reload(AM)
+/obj/effect/ctf/ammo/Bump(atom/A)
+ reload(A)
/obj/effect/ctf/ammo/Bumped(atom/movable/AM)
reload(AM)
@@ -636,7 +666,7 @@
qdel(G)
O.equip(M)
to_chat(M, "Ammunition reloaded! ")
- playsound(get_turf(M), 'sound/weapons/shotgunpump.ogg', 50, 1, -1)
+ playsound(get_turf(M), 'sound/weapons/shotgunpump.ogg', 50, TRUE, -1)
qdel(src)
break
@@ -667,18 +697,18 @@
resistance_flags = INDESTRUCTIBLE
var/obj/machinery/capture_the_flag/controlling
var/team = "none"
- var/point_rate = 1
+ var/point_rate = 0.5
-/obj/machinery/control_point/process()
+/obj/machinery/control_point/process(delta_time)
if(controlling)
- controlling.control_points += point_rate
+ controlling.control_points += point_rate * delta_time
if(controlling.control_points >= controlling.control_points_to_win)
controlling.victory()
/obj/machinery/control_point/attackby(mob/user, params)
capture(user)
-/obj/machinery/control_point/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
+/obj/machinery/control_point/on_attack_hand(mob/user)
capture(user)
/obj/machinery/control_point/proc/capture(mob/user)
diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm
index e68c45a84c..cd5c2f76f3 100644
--- a/code/modules/awaymissions/corpse.dm
+++ b/code/modules/awaymissions/corpse.dm
@@ -66,7 +66,7 @@
/obj/effect/mob_spawn/Initialize(mapload)
. = ..()
if(instant || (roundstart && (mapload || (SSticker && SSticker.current_state > GAME_STATE_SETTING_UP))))
- create()
+ INVOKE_ASYNC(src, .proc/create)
else if(ghost_usable)
GLOB.poi_list |= src
LAZYADD(GLOB.mob_spawners[job_description ? job_description : name], src)
diff --git a/code/modules/awaymissions/mission_code/Academy.dm b/code/modules/awaymissions/mission_code/Academy.dm
index 129e6d7a2b..98e7f4c292 100644
--- a/code/modules/awaymissions/mission_code/Academy.dm
+++ b/code/modules/awaymissions/mission_code/Academy.dm
@@ -196,7 +196,7 @@
/obj/item/dice/d20/fate/proc/effect(var/mob/living/carbon/human/user,roll)
if(!reusable)
used = 1
- visible_message("The die flare briefly. ")
+ visible_message("The die flares briefly. ")
switch(roll)
if(1)
//Dust
diff --git a/code/modules/awaymissions/mission_code/wildwest.dm b/code/modules/awaymissions/mission_code/wildwest.dm
index f13341faf3..bc7e2cbd08 100644
--- a/code/modules/awaymissions/mission_code/wildwest.dm
+++ b/code/modules/awaymissions/mission_code/wildwest.dm
@@ -132,6 +132,7 @@
var/triggered = 0
/obj/effect/meatgrinder/Crossed(atom/movable/AM)
+ . = ..()
Bumped(AM)
/obj/effect/meatgrinder/Bumped(atom/movable/AM)
diff --git a/code/modules/chatter/chatter.dm b/code/modules/chatter/chatter.dm
index 2dfd0bd77d..3da2b32a67 100644
--- a/code/modules/chatter/chatter.dm
+++ b/code/modules/chatter/chatter.dm
@@ -38,7 +38,7 @@
var/path = "sound/chatter/[phomeme]_[length].ogg"
playsound(loc, path,
- vol = 40, vary = 0, extrarange = 3, falloff = FALSE)
+ vol = 40, vary = 0, extrarange = 3)
sleep((length + 1) * chatter_get_sleep_multiplier(phomeme))
diff --git a/code/modules/client/client_defines.dm b/code/modules/client/client_defines.dm
index b71521121b..241cd6be93 100644
--- a/code/modules/client/client_defines.dm
+++ b/code/modules/client/client_defines.dm
@@ -31,6 +31,7 @@
var/datum/preferences/prefs = null
var/last_turn = 0
var/move_delay = 0
+ var/last_move = 0
var/area = null
/// Last time we Click()ed. No clicking twice in one tick!
diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm
index c298d150f8..5f567f1360 100644
--- a/code/modules/client/client_procs.dm
+++ b/code/modules/client/client_procs.dm
@@ -147,6 +147,8 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
/client/proc/handle_statpanel_click(list/href_list)
var/atom/target = locate(href_list["statpanel_item_target"])
+ if(!target)
+ return
Click(target, target.loc, null, "[href_list["statpanel_item_shiftclick"]?"shift=1;":null][href_list["statpanel_item_ctrlclick"]?"ctrl=1;":null]&alt=[href_list["statpanel_item_altclick"]?"alt=1;":null]", FALSE, "statpanel")
/client/proc/is_content_unlocked()
@@ -496,7 +498,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
GLOB.directory -= ckey
log_access("Logout: [key_name(src)]")
GLOB.ahelp_tickets.ClientLogout(src)
- // SSserver_maint.UpdateHubStatus()
+ SSserver_maint.UpdateHubStatus()
if(credits)
QDEL_LIST(credits)
if(holder)
@@ -642,7 +644,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
query_log_connection.Execute()
qdel(query_log_connection)
- // SSserver_maint.UpdateHubStatus()
+ SSserver_maint.UpdateHubStatus()
if(new_player)
player_age = -1
diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm
index af55c6b9d7..c069649848 100644
--- a/code/modules/clothing/gloves/miscellaneous.dm
+++ b/code/modules/clothing/gloves/miscellaneous.dm
@@ -36,7 +36,7 @@
/obj/item/clothing/gloves/fingerless/pugilist/equipped(mob/user, slot)
. = ..()
- if(current_equipped_slot == SLOT_GLOVES)
+ if(slot == SLOT_GLOVES)
use_buffs(user, TRUE)
wornonce = TRUE
diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm
index 2ffe85b6c4..c944b2aa1f 100644
--- a/code/modules/clothing/spacesuits/miscellaneous.dm
+++ b/code/modules/clothing/spacesuits/miscellaneous.dm
@@ -510,12 +510,12 @@ Contains:
name = "paramedic EVA suit"
icon_state = "paramedic-eva"
item_state = "paramedic-eva"
- desc = "A deep blue space suit decorated with red and white crosses to indicate that the wearer is trained emergency medical personnel."
+ desc = "A deep blue space suit decorated with medical insignia to indicate that the wearer is trained emergency medical personnel."
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/roller)
/obj/item/clothing/head/helmet/space/eva/paramedic
name = "paramedic EVA helmet"
- desc = "A deep blue space helmet with a large red cross on the faceplate to designate the wearer as trained emergency medical personnel."
+ desc = "A deep blue space helmet decorated with medical insignia to designate the wearer as trained emergency medical personnel."
icon_state = "paramedic-eva-helmet"
item_state = "paramedic-eva-helmet"
diff --git a/code/modules/clothing/suits/labcoat.dm b/code/modules/clothing/suits/labcoat.dm
index c7d5a4ea56..a27d82a544 100644
--- a/code/modules/clothing/suits/labcoat.dm
+++ b/code/modules/clothing/suits/labcoat.dm
@@ -55,7 +55,7 @@
/obj/item/clothing/suit/toggle/labcoat/virologist
name = "virologist labcoat"
- desc = "A suit that protects against minor chemical spills. Offers slightly more protection against biohazards than the standard model. Has a green stripe on the shoulder."
+ desc = "A suit that protects against minor chemical spills. Has a green stripe on the shoulder."
icon_state = "labcoat_vir"
/obj/item/clothing/suit/toggle/labcoat/science
@@ -63,6 +63,11 @@
desc = "A suit that protects against minor chemical spills. Has a purple stripe on the shoulder."
icon_state = "labcoat_tox"
+/obj/item/clothing/suit/toggle/labcoat/roboticist
+ name = "roboticist labcoat"
+ desc = "More like an eccentric coat than a labcoat. Helps pass off bloodstains as part of the aesthetic. Comes with red shoulder pads."
+ icon_state = "labcoat_robo"
+
// Departmental Jackets
/obj/item/clothing/suit/toggle/labcoat/depjacket
mutantrace_variation = STYLE_DIGITIGRADE|STYLE_NO_ANTHRO_ICON
diff --git a/code/modules/clothing/suits/toggles.dm b/code/modules/clothing/suits/toggles.dm
index f496468371..aa22834670 100644
--- a/code/modules/clothing/suits/toggles.dm
+++ b/code/modules/clothing/suits/toggles.dm
@@ -58,6 +58,12 @@
RemoveHood()
/obj/item/clothing/suit/hooded/proc/ToggleHood()
+ if(!hood)
+ to_chat(loc, "[src] seems to be missing its hood.. ")
+ return
+ if(atom_colours)
+ hood.atom_colours = atom_colours.Copy()
+ hood.update_atom_colour()
if(!suittoggled)
if(ishuman(src.loc))
var/mob/living/carbon/human/H = src.loc
@@ -191,7 +197,11 @@
if(!helmettype)
return
if(!helmet)
+ to_chat(H, "[src] seems to be missing its helmet.. ")
return
+ if(atom_colours)
+ helmet.atom_colours = atom_colours.Copy()
+ helmet.update_atom_colour()
if(!suittoggled)
if(ishuman(src.loc))
if(H.wear_suit != src)
diff --git a/code/modules/events/_event.dm b/code/modules/events/_event.dm
index 40ce543d31..10f8c60386 100644
--- a/code/modules/events/_event.dm
+++ b/code/modules/events/_event.dm
@@ -92,7 +92,7 @@
log_admin_private("[key_name(usr)] cancelled event [name].")
SSblackbox.record_feedback("tally", "event_admin_cancelled", 1, typepath)
-/datum/round_event_control/proc/runEvent()
+/datum/round_event_control/proc/runEvent(random = FALSE)
var/datum/round_event/E = new typepath()
E.current_players = get_active_player_count(alive_check = 1, afk_check = 1, human_check = 1)
E.control = src
diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm
index 7cf11848e8..edc062f78f 100644
--- a/code/modules/events/spacevine.dm
+++ b/code/modules/events/spacevine.dm
@@ -340,6 +340,7 @@
playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE)
/obj/structure/spacevine/Crossed(atom/movable/AM)
+ . = ..()
if(!isliving(AM))
return
for(var/datum/spacevine_mutation/SM in mutations)
diff --git a/code/modules/events/travelling_trader.dm b/code/modules/events/travelling_trader.dm
index eeb1acdba5..1f9c69a9f0 100644
--- a/code/modules/events/travelling_trader.dm
+++ b/code/modules/events/travelling_trader.dm
@@ -99,7 +99,7 @@
new reward(get_turf(src))
/mob/living/carbon/human/dummy/travelling_trader/Initialize()
- ..()
+ . = ..() // return a hint you fuck
add_atom_colour("#570d6b", FIXED_COLOUR_PRIORITY) //make them purple (otherworldly!)
set_light(1, -0.7, "#AAD84B")
ADD_TRAIT(src,TRAIT_PIERCEIMMUNE, "trader_pierce_immune") //don't let people take their blood
diff --git a/code/modules/fields/fields.dm b/code/modules/fields/fields.dm
index 8710282021..cb8d3e8dcf 100644
--- a/code/modules/fields/fields.dm
+++ b/code/modules/fields/fields.dm
@@ -16,7 +16,7 @@
if(!F.check_variables() && !override_checks)
QDEL_NULL(F)
if(start_field && (F || override_checks))
- F.Initialize()
+ F.begin_field()
return F
/datum/proximity_monitor/advanced
@@ -78,11 +78,11 @@
/datum/proximity_monitor/advanced/proc/process_edge_turf(turf/T)
-/datum/proximity_monitor/advanced/New()
+/datum/proximity_monitor/advanced/New(atom/_host, range, _ignore_if_not_on_turf = TRUE)
if(requires_processing)
START_PROCESSING(SSfields, src)
-/datum/proximity_monitor/advanced/proc/Initialize()
+/datum/proximity_monitor/advanced/proc/begin_field()
setup_field()
post_setup_field()
@@ -154,7 +154,7 @@
var/atom/_host = host
var/atom/new_host_loc = _host.loc
if(last_host_loc != new_host_loc)
- recalculate_field()
+ INVOKE_ASYNC(src, .proc/recalculate_field)
/datum/proximity_monitor/advanced/proc/post_setup_field()
@@ -302,7 +302,7 @@
/obj/item/multitool/field_debug/attack_self(mob/user)
operating = !operating
- to_chat(user, "You turn [src] [operating? "on":"off"].")
+ to_chat(user, "You turn [src] [operating? "on":"off"]. ")
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
listeningTo = null
if(!istype(current) && operating)
@@ -312,13 +312,15 @@
else if(!operating)
QDEL_NULL(current)
-/obj/item/multitool/field_debug/dropped(mob/user)
+/obj/item/multitool/field_debug/dropped()
. = ..()
if(listeningTo)
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
listeningTo = null
/obj/item/multitool/field_debug/proc/on_mob_move()
+ SIGNAL_HANDLER
+
check_turf(get_turf(src))
/obj/item/multitool/field_debug/process()
diff --git a/code/modules/fields/timestop.dm b/code/modules/fields/timestop.dm
index 56abef8cd6..a96a44a789 100644
--- a/code/modules/fields/timestop.dm
+++ b/code/modules/fields/timestop.dm
@@ -33,7 +33,7 @@
if(G.summoner && locate(/obj/effect/proc_holder/spell/aoe_turf/timestop) in G.summoner.mind.spell_list) //It would only make sense that a person's stand would also be immune.
immune[G] = TRUE
if(start)
- timestop()
+ INVOKE_ASYNC(src, .proc/timestop)
/obj/effect/timestop/Destroy()
qdel(chronofield)
@@ -42,7 +42,7 @@
/obj/effect/timestop/proc/timestop()
target = get_turf(src)
- playsound(src, 'sound/magic/timeparadox2.ogg', 75, 1, -1)
+ playsound(src, 'sound/magic/timeparadox2.ogg', 75, TRUE, -1)
chronofield = make_field(/datum/proximity_monitor/advanced/timestop, list("current_range" = freezerange, "host" = src, "immune" = immune, "check_anti_magic" = check_anti_magic, "check_holy" = check_holy))
QDEL_IN(src, duration)
@@ -112,6 +112,8 @@
unfreeze_turf(T)
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_atom(atom/movable/A)
+ SIGNAL_HANDLER
+
if(A.throwing)
unfreeze_throwing(A)
if(isliving(A))
@@ -128,12 +130,14 @@
frozen_things -= A
global_frozen_atoms -= A
+
/datum/proximity_monitor/advanced/timestop/proc/freeze_mecha(obj/mecha/M)
M.completely_disabled = TRUE
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_mecha(obj/mecha/M)
M.completely_disabled = FALSE
+
/datum/proximity_monitor/advanced/timestop/proc/freeze_throwing(atom/movable/AM)
var/datum/thrownthing/T = AM.throwing
T.paused = TRUE
@@ -160,7 +164,7 @@
/datum/proximity_monitor/advanced/timestop/process()
for(var/i in frozen_mobs)
var/mob/living/m = i
- m.Stun(20, 1, 1)
+ m.Stun(20, ignore_canstun = TRUE)
/datum/proximity_monitor/advanced/timestop/setup_field_turf(turf/T)
for(var/i in T.contents)
@@ -168,6 +172,7 @@
freeze_turf(T)
return ..()
+
/datum/proximity_monitor/advanced/timestop/proc/freeze_projectile(obj/item/projectile/P)
P.paused = TRUE
@@ -176,18 +181,18 @@
/datum/proximity_monitor/advanced/timestop/proc/freeze_mob(mob/living/L)
frozen_mobs += L
- L.Stun(20, 1, 1)
+ L.Stun(20, ignore_canstun = TRUE)
ADD_TRAIT(L, TRAIT_MUTE, TIMESTOP_TRAIT)
walk(L, 0) //stops them mid pathing even if they're stunimmune
if(isanimal(L))
var/mob/living/simple_animal/S = L
S.toggle_ai(AI_OFF)
- if(ishostile(L))
- var/mob/living/simple_animal/hostile/H = L
- H.LoseTarget()
+ if(ishostile(L))
+ var/mob/living/simple_animal/hostile/H = L
+ H.LoseTarget()
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_mob(mob/living/L)
- L.AdjustStun(-20, 1, 1)
+ L.AdjustStun(-20, ignore_canstun = TRUE)
REMOVE_TRAIT(L, TRAIT_MUTE, TIMESTOP_TRAIT)
frozen_mobs -= L
if(isanimal(L))
diff --git a/code/modules/fields/turf_objects.dm b/code/modules/fields/turf_objects.dm
index d37036d83c..1af924294a 100644
--- a/code/modules/fields/turf_objects.dm
+++ b/code/modules/fields/turf_objects.dm
@@ -24,11 +24,12 @@
desc = "Get off my turf!"
/obj/effect/abstract/proximity_checker/advanced/field_turf/CanPass(atom/movable/AM, turf/target)
+ . = ..()
if(parent)
return parent.field_turf_canpass(AM, src, target)
- return TRUE
/obj/effect/abstract/proximity_checker/advanced/field_turf/Crossed(atom/movable/AM)
+ . = ..()
if(parent)
return parent.field_turf_crossed(AM, src)
return TRUE
@@ -48,11 +49,12 @@
desc = "Edgy description here."
/obj/effect/abstract/proximity_checker/advanced/field_edge/CanPass(atom/movable/AM, turf/target)
+ . = ..()
if(parent)
return parent.field_edge_canpass(AM, src, target)
- return TRUE
/obj/effect/abstract/proximity_checker/advanced/field_edge/Crossed(atom/movable/AM)
+ . = ..()
if(parent)
return parent.field_edge_crossed(AM, src)
return TRUE
diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm
index 56c96c3559..cc18207a29 100644
--- a/code/modules/flufftext/Hallucination.dm
+++ b/code/modules/flufftext/Hallucination.dm
@@ -139,10 +139,11 @@ GLOBAL_LIST_INIT(hallucination_list, list(
Show()
/obj/effect/hallucination/simple/Moved(atom/OldLoc, Dir)
+ . = ..()
Show()
/obj/effect/hallucination/simple/Destroy()
- if(target && target.client)
+ if(target?.client)
target.client.images.Remove(current_image)
active = FALSE
return ..()
@@ -1093,6 +1094,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
target.client.images += image
/obj/effect/hallucination/danger/lava/Crossed(atom/movable/AM)
+ . = ..()
if(AM == target)
target.adjustStaminaLoss(20)
new /datum/hallucination/fire(target)
diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm
index 3f51da22b3..07039139bf 100644
--- a/code/modules/food_and_drinks/drinks/drinks.dm
+++ b/code/modules/food_and_drinks/drinks/drinks.dm
@@ -596,7 +596,7 @@
name = "Buzz Fuzz"
desc = "The sister drink of Shambler's Juice! Uses real honey, making it a sweet tooth's dream drink. The slogan reads ''A Hive of Flavour'', there's also a label about how it is adddicting."
icon_state = "honeysoda_can"
- list_reagents = list(/datum/reagent/consumable/buzz_fuzz = 25, /datum/reagent/consumable/honey = 5)
+ list_reagents = list(/datum/reagent/consumable/buzz_fuzz = 30)
foodtype = SUGAR | JUNKFOOD
/obj/item/reagent_containers/food/drinks/soda_cans/grey_bull
diff --git a/code/modules/holiday/halloween/bartholomew.dm b/code/modules/holiday/halloween/bartholomew.dm
index 117e03c357..31cfb1f26a 100644
--- a/code/modules/holiday/halloween/bartholomew.dm
+++ b/code/modules/holiday/halloween/bartholomew.dm
@@ -117,7 +117,7 @@
/obj/item/weldingtool = 3,
/obj/item/wirecutters = 2,
/obj/item/wrench = 4,
- /obj/item/weaponcrafting/improvised_parts/shotgun_receiver = 1,
+ /obj/item/weaponcrafting/receiver = 1,
/obj/item/geiger_counter = 3,
/obj/item/reagent_containers/food/snacks/grown/citrus/orange = 5,
/obj/item/assembly/infra = 1,
diff --git a/code/modules/holiday/halloween/jacqueen.dm b/code/modules/holiday/halloween/jacqueen.dm
index 90016954fc..4212a2e296 100644
--- a/code/modules/holiday/halloween/jacqueen.dm
+++ b/code/modules/holiday/halloween/jacqueen.dm
@@ -50,16 +50,18 @@
var/cached_z
/// I'm busy, don't move.
var/busy = FALSE
+
var/static/blacklisted_items = typecacheof(list(
- /obj/effect,
- /obj/belly,
- /obj/mafia_game_board,
- /obj/docking_port,
- /obj/shapeshift_holder,
- /obj/screen))
+ /obj/effect,
+ /obj/belly,
+ /obj/mafia_game_board,
+ /obj/docking_port,
+ /obj/shapeshift_holder,
+ /obj/screen
+ ))
/mob/living/simple_animal/jacq/Initialize()
- ..()
+ . = ..() //fuck you jacq, return a hint you shit
cached_z = z
poof()
@@ -158,23 +160,18 @@
return FALSE
/mob/living/simple_animal/jacq/proc/gender_check(mob/living/carbon/C)
- var/gender = "lamb"
- if(C)
- if(C.gender == MALE)
- gender = "laddie"
- if(C.gender == FEMALE)
- gender = "lassie"
- return gender
+ . = "lamb"
+ switch(C)
+ if(MALE)
+ . = "laddie"
+ if(FEMALE)
+ . = "lassie"
//Ye wee bugger, gerrout of it. Ye've nae tae enjoy reading the code fer mae secrets like.
/mob/living/simple_animal/jacq/proc/chit_chat(mob/living/carbon/C)
//Very important
var/gender = gender_check(C)
- if(C)
- if(C.gender == MALE)
- gender = "laddie"
- if(C.gender == FEMALE)
- gender = "lassie"
+ // it physicaly cannot fail*. Why is there a fucking dupe
if(!progression["[C.real_name]"] || !(progression["[C.real_name]"] & JACQ_HELLO))
visible_message("[src] smiles ominously at [C], \"Well halo there [gender]! Ah'm Jacqueline, tae great Pumpqueen, great tae meet ye.\" ")
diff --git a/code/modules/instruments/songs/play_legacy.dm b/code/modules/instruments/songs/play_legacy.dm
index eee9be3cc7..c4d86e2013 100644
--- a/code/modules/instruments/songs/play_legacy.dm
+++ b/code/modules/instruments/songs/play_legacy.dm
@@ -82,5 +82,5 @@
var/sound/music_played = sound(soundfile)
for(var/i in hearing_mobs)
var/mob/M = i
- M.playsound_local(source, null, volume * using_instrument.volume_multiplier, falloff = 5, S = music_played)
+ M.playsound_local(source, null, volume * using_instrument.volume_multiplier, S = music_played)
// Could do environment and echo later but not for now
diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm
index 7c9f811c34..6cb578dfb1 100644
--- a/code/modules/integrated_electronics/core/assemblies.dm
+++ b/code/modules/integrated_electronics/core/assemblies.dm
@@ -578,6 +578,7 @@
return FALSE
/obj/item/electronic_assembly/Moved(oldLoc, dir)
+ . = ..()
for(var/I in assembly_components)
var/obj/item/integrated_circuit/IC = I
IC.ext_moved(oldLoc, dir)
diff --git a/code/modules/jobs/job_types/_job.dm b/code/modules/jobs/job_types/_job.dm
index 64ab4791d3..855e2ccbd7 100644
--- a/code/modules/jobs/job_types/_job.dm
+++ b/code/modules/jobs/job_types/_job.dm
@@ -187,7 +187,7 @@
/datum/job/proc/announce_head(var/mob/living/carbon/human/H, var/channels) //tells the given channel that the given mob is the new department head. See communications.dm for valid channels.
if(H && GLOB.announcement_systems.len)
//timer because these should come after the captain announcement
- SSticker.OnRoundstart(CALLBACK(GLOBAL_PROC, .proc/addtimer, CALLBACK(pick(GLOB.announcement_systems), /obj/machinery/announcement_system/proc/announce, "NEWHEAD", H.real_name, H.job, channels), 1))
+ SSticker.OnRoundstart(CALLBACK(GLOBAL_PROC, .proc/_addtimer, CALLBACK(pick(GLOB.announcement_systems), /obj/machinery/announcement_system/proc/announce, "NEWHEAD", H.real_name, H.job, channels), 1))
//If the configuration option is set to require players to be logged as old enough to play certain jobs, then this proc checks that they are, otherwise it just returns 1
/datum/job/proc/player_old_enough(client/C)
diff --git a/code/modules/jobs/job_types/roboticist.dm b/code/modules/jobs/job_types/roboticist.dm
index aa52b353df..b44d536cd2 100644
--- a/code/modules/jobs/job_types/roboticist.dm
+++ b/code/modules/jobs/job_types/roboticist.dm
@@ -32,7 +32,7 @@
l_pocket = /obj/item/pda/roboticist
ears = /obj/item/radio/headset/headset_sci
uniform = /obj/item/clothing/under/rank/rnd/roboticist
- suit = /obj/item/clothing/suit/toggle/labcoat
+ suit = /obj/item/clothing/suit/toggle/labcoat/roboticist
backpack = /obj/item/storage/backpack/science
satchel = /obj/item/storage/backpack/satchel/tox
diff --git a/code/modules/mapping/reader.dm b/code/modules/mapping/reader.dm
index 11bcc0ffcf..a3e0653678 100644
--- a/code/modules/mapping/reader.dm
+++ b/code/modules/mapping/reader.dm
@@ -135,7 +135,7 @@
var/curr_z = text2num(dmmRegex.group[5])
if(curr_z < z_lower || curr_z > z_upper)
continue
-
+
var/curr_x = text2num(dmmRegex.group[3])
var/curr_y = text2num(dmmRegex.group[4])
@@ -171,7 +171,7 @@
if(width > right_width)
for(var/i in 1 to lines)
gridLines[i] = copytext(gridLines[i], 1, key_len * right_width)
-
+
// during the actual load we're starting at the top and working our way down
gridSet.ycrd += lines - 1
@@ -300,14 +300,14 @@
//we do this after we load everything in. if we don't; we'll have weird atmos bugs regarding atmos adjacent turfs
T.AfterChange(CHANGETURF_IGNORE_AIR)
+ if(did_expand)
+ world.refresh_atmos_grid()
+
#ifdef TESTING
if(turfsSkipped)
testing("Skipped loading [turfsSkipped] default turfs")
#endif
- if(did_expand)
- world.refresh_atmos_grid()
-
return TRUE
/datum/parsed_map/proc/build_cache(no_changeturf, bad_paths=null)
diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm
index 0953ea138d..9c39601b4e 100644
--- a/code/modules/mining/lavaland/necropolis_chests.dm
+++ b/code/modules/mining/lavaland/necropolis_chests.dm
@@ -1104,7 +1104,7 @@
if(1)
new /obj/item/mayhem(src)
if(2)
- new /obj/item/gun/ballistic/revolver/doublebarrel/super(src)
+ new /obj/item/book/granter/spell/asura(src)
if(3)
new /obj/item/guardiancreator(src)
@@ -1187,6 +1187,13 @@
unique_reskin = null
sawn_off = TRUE
+/obj/item/book/granter/spell/asura
+ spell = /obj/effect/proc_holder/spell/self/asura
+ spellname = "asuras wrath"
+ icon_state = "bookasura"
+ desc = "This crimson novel emanates rage incarnate."
+ remarks = list("Kaio-What?", "It can only be sustained for a short time...", "It's like a massive upsurge of energy...", "Takes a heavy toll on the user's body...?", "Extra arms not included...", "There's stronger levels? Why aren't they in the book...")
+
//Colossus
/obj/structure/closet/crate/necropolis/colossus
name = "colossus chest"
diff --git a/code/modules/mob/dead/dead.dm b/code/modules/mob/dead/dead.dm
index 87f9d716bd..223366c7ab 100644
--- a/code/modules/mob/dead/dead.dm
+++ b/code/modules/mob/dead/dead.dm
@@ -8,6 +8,7 @@ INITIALIZE_IMMEDIATE(/mob/dead)
throwforce = 0
/mob/dead/Initialize()
+ SHOULD_CALL_PARENT(FALSE)
if(flags_1 & INITIALIZED_1)
stack_trace("Warning: [src]([type]) initialized multiple times!")
flags_1 |= INITIALIZED_1
@@ -68,14 +69,15 @@ INITIALIZE_IMMEDIATE(/mob/dead)
set desc= "Jump to the other server"
if(mob_transforming)
return
- var/list/csa = CONFIG_GET(keyed_list/cross_server)
+ var/list/our_id = CONFIG_GET(string/cross_comms_name)
+ var/list/csa = CONFIG_GET(keyed_list/cross_server) - our_id
var/pick
switch(csa.len)
if(0)
remove_verb(src, /mob/dead/proc/server_hop)
to_chat(src, "Server Hop has been disabled. ")
if(1)
- pick = csa[0]
+ pick = csa[1]
else
pick = input(src, "Pick a server to jump to", "Server Hop") as null|anything in csa
@@ -100,7 +102,7 @@ INITIALIZE_IMMEDIATE(/mob/dead)
winset(src, null, "command=.options") //other wise the user never knows if byond is downloading resources
- C << link("[addr]?server_hop=[key]")
+ C << link("[addr]")
/mob/dead/proc/update_z(new_z) // 1+ to register, null to unregister
if (registered_z != new_z)
diff --git a/code/modules/mob/dead/new_player/sprite_accessories/body_markings.dm b/code/modules/mob/dead/new_player/sprite_accessories/body_markings.dm
index 6c510807b4..bc6c4899dd 100644
--- a/code/modules/mob/dead/new_player/sprite_accessories/body_markings.dm
+++ b/code/modules/mob/dead/new_player/sprite_accessories/body_markings.dm
@@ -243,6 +243,10 @@
icon_state = "none"
relevant_layers = null
+/datum/sprite_accessory/insect_fluff/brown
+ name = "Brown"
+ icon_state = "brown"
+
/datum/sprite_accessory/insect_fluff/punished
name = "Burnt Off"
icon_state = "punished"
@@ -271,6 +275,10 @@
name = "Deathshead"
icon_state = "deathhead"
+/datum/sprite_accessory/insect_fluff/featherymoth
+ name = "Feathery Moth"
+ icon_state = "featherymoth"
+
/datum/sprite_accessory/insect_fluff/firewatch
name = "Firewatch"
icon_state = "firewatch"
@@ -291,18 +299,22 @@
name = "Moon Fly"
icon_state = "moonfly"
-/datum/sprite_accessory/insect_fluff/oakworm
- name = "Oak Worm"
- icon_state = "oakworm"
-
/datum/sprite_accessory/insect_fluff/plain
name = "Plain"
icon_state = "plain"
+/datum/sprite_accessory/insect_fluff/plasmafire
+ name = "Plasma Fire"
+ icon_state = "plasmafire"
+
/datum/sprite_accessory/insect_fluff/poison
name = "Poison"
icon_state = "poison"
+/datum/sprite_accessory/insect_fluff/oakworm
+ name = "Oak Worm"
+ icon_state = "oakworm"
+
/datum/sprite_accessory/insect_fluff/ragged
name = "Ragged"
icon_state = "ragged"
@@ -311,6 +323,10 @@
name = "Reddish"
icon_state = "redish"
+/datum/sprite_accessory/insect_fluff/rosy
+ name = "Rosy"
+ icon_state = "rosy"
+
/datum/sprite_accessory/insect_fluff/royal
name = "Royal"
icon_state = "royal"
diff --git a/code/modules/mob/dead/new_player/sprite_accessories/wings.dm b/code/modules/mob/dead/new_player/sprite_accessories/wings.dm
index 37ef2a7d19..800682b8cf 100644
--- a/code/modules/mob/dead/new_player/sprite_accessories/wings.dm
+++ b/code/modules/mob/dead/new_player/sprite_accessories/wings.dm
@@ -58,9 +58,7 @@
dimension_y = 34
relevant_layers = list(BODY_BEHIND_LAYER, BODY_ADJ_LAYER, BODY_FRONT_LAYER)
-/datum/sprite_accessory/deco_wings/atlas
- name = "Atlas"
- icon_state = "atlas"
+//nonmoth wings
/datum/sprite_accessory/deco_wings/bat
name = "Bat"
@@ -70,18 +68,76 @@
name = "Bee"
icon_state = "bee"
-/datum/sprite_accessory/deco_wings/deathhead
- name = "Deathshead"
- icon_state = "deathhead"
+/datum/sprite_accessory/deco_wings/bee2
+ name = "Small Bee"
+ icon_state = "beewings"
+
+/datum/sprite_accessory/deco_wings/dragon
+ name = "Dragon"
+ icon_state = "dragon"
+
+/datum/sprite_accessory/deco_wings/dragonfly
+ name = "Dragonfly"
+ icon_state = "dragonfly"
/datum/sprite_accessory/deco_wings/fairy
name = "Fairy"
icon_state = "fairy"
-/datum/sprite_accessory/deco_wings/feathery
+/datum/sprite_accessory/deco_wings/featheredwing
name = "Feathery"
icon_state = "feathery"
+/datum/sprite_accessory/deco_wings/featheredwingmedium
+ name = "Medium Feathered"
+ icon_state = "feathered3"
+
+/datum/sprite_accessory/deco_wings/featheredwinglarge
+ name = "Large Feathered"
+ icon_state = "feathered2"
+
+/datum/sprite_accessory/deco_wings/harpywings
+ name = "Harpy"
+ icon_state = "harpywings"
+
+/datum/sprite_accessory/deco_wings/roboticwing
+ name = "Robotic"
+ icon_state = "drago"
+
+/datum/sprite_accessory/deco_wings/succubusblack
+ name = "Succubus Black"
+ icon_state = "succubusblack"
+
+/datum/sprite_accessory/deco_wings/succubuspurple
+ name = "Succubus Purple"
+ icon_state = "succubuspurple"
+
+/datum/sprite_accessory/deco_wings/succubusred
+ name = "Succubus Red"
+ icon_state = "succubusred"
+
+/datum/sprite_accessory/deco_wings/xenobackplate
+ name = "Xenomorph Backplate"
+ icon_state = "snagbackplate"
+
+//moth wings
+
+/datum/sprite_accessory/deco_wings/atlas
+ name = "Atlas"
+ icon_state = "atlas"
+
+/datum/sprite_accessory/deco_wings/brown
+ name = "Brown"
+ icon_state = "brown"
+
+/datum/sprite_accessory/deco_wings/deathhead
+ name = "Deathshead"
+ icon_state = "deathhead"
+
+/datum/sprite_accessory/deco_wings/featherymoth
+ name = "Feathery Moth Wings"
+ icon_state = "featherymoth"
+
/datum/sprite_accessory/deco_wings/firewatch
name = "Firewatch"
icon_state = "firewatch"
@@ -90,6 +146,10 @@
name = "Gothic"
icon_state = "gothic"
+/datum/sprite_accessory/deco_wings/jungle
+ name = "Jungle"
+ icon_state = "jungle"
+
/datum/sprite_accessory/deco_wings/lovers
name = "Lovers"
icon_state = "lovers"
@@ -106,10 +166,18 @@
name = "Moon Fly"
icon_state = "moonfly"
+/datum/sprite_accessory/deco_wings/oakworm
+ name = "Oak Worm"
+ icon_state = "oakworm"
+
/datum/sprite_accessory/deco_wings/plain
name = "Plain"
icon_state = "plain"
+/datum/sprite_accessory/deco_wings/plasmafire
+ name = "Plasma Fire"
+ icon_state = "plasmafire"
+
/datum/sprite_accessory/deco_wings/poison
name = "Poison"
icon_state = "poison"
@@ -126,6 +194,10 @@
name = "Reddish"
icon_state = "redish"
+/datum/sprite_accessory/deco_wings/rosy
+ name = "Rosy"
+ icon_state = "rosy"
+
/datum/sprite_accessory/deco_wings/royal
name = "Royal"
icon_state = "royal"
@@ -138,18 +210,10 @@
name = "White Fly"
icon_state = "whitefly"
-/datum/sprite_accessory/deco_wings/oakworm
- name = "Oak Worm"
- icon_state = "oakworm"
-
/datum/sprite_accessory/deco_wings/witchwing
name = "Witch Wing"
icon_state = "witchwing"
-/datum/sprite_accessory/deco_wings/jungle
- name = "Jungle"
- icon_state = "jungle"
-
//INSECT WINGS
/datum/sprite_accessory/insect_wings
@@ -157,6 +221,69 @@
color_src = WINGCOLOR
relevant_layers = list(BODY_BEHIND_LAYER, BODY_FRONT_LAYER)
+//non insect wings
+/datum/sprite_accessory/deco_wings/bat
+ name = "Bat"
+ icon_state = "bat"
+
+/datum/sprite_accessory/insect_wings/bee
+ name = "Bee"
+ icon_state = "bee"
+
+/datum/sprite_accessory/insect_wings/bee2
+ name = "Small Bee"
+ icon_state = "beewings"
+
+/datum/sprite_accessory/insect_wings/dragon
+ name = "Dragon"
+ icon_state = "dragon"
+
+/datum/sprite_accessory/insect_wings/dragonfly
+ name = "Dragonfly"
+ icon_state = "dragonfly"
+
+/datum/sprite_accessory/insect_wings/fairy
+ name = "Fairy"
+ icon_state = "fairy"
+
+/datum/sprite_accessory/insect_wings/featheredwing
+ name = "Feathery"
+ icon_state = "feathery"
+
+/datum/sprite_accessory/insect_wings/featheredwingmedium
+ name = "Medium Feathered"
+ icon_state = "feathered3"
+
+/datum/sprite_accessory/insect_wings/featheredwinglarge
+ name = "Large Feathered"
+ icon_state = "feathered2"
+
+/datum/sprite_accessory/insect_wings/harpywings
+ name = "Harpy"
+ icon_state = "harpywings"
+
+/datum/sprite_accessory/insect_wings/roboticwing
+ name = "Robotic"
+ icon_state = "drago"
+
+/datum/sprite_accessory/insect_wings/succubusblack
+ name = "Succubus Black"
+ icon_state = "succubusblack"
+
+/datum/sprite_accessory/insect_wings/succubuspurple
+ name = "Succubus Purple"
+ icon_state = "succubuspurple"
+
+/datum/sprite_accessory/insect_wings/succubusred
+ name = "Succubus Red"
+ icon_state = "succubusred"
+
+/datum/sprite_accessory/insect_wings/xenobackplate
+ name = "Xenomorph Backplate"
+ icon_state = "snagbackplate"
+
+//moth wings
+
/datum/sprite_accessory/insect_wings/none
name = "None"
icon_state = "none"
@@ -166,25 +293,17 @@
name = "Atlas"
icon_state = "atlas"
-/datum/sprite_accessory/insect_wings/bat
- name = "Bat"
- icon_state = "bat"
-
-/datum/sprite_accessory/insect_wings/bee
- name = "Bee"
- icon_state = "bee"
+/datum/sprite_accessory/insect_wings/brown
+ name = "Brown"
+ icon_state = "brown"
/datum/sprite_accessory/insect_wings/deathhead
name = "Deathshead"
icon_state = "deathhead"
-/datum/sprite_accessory/insect_wings/fairy
- name = "Fairy"
- icon_state = "fairy"
-
-/datum/sprite_accessory/insect_wings/feathery
- name = "Feathery"
- icon_state = "feathery"
+/datum/sprite_accessory/insect_wings/featherymoth
+ name = "Feathery Moth Wings"
+ icon_state = "featherymoth"
/datum/sprite_accessory/insect_wings/firewatch
name = "Firewatch"
@@ -222,6 +341,10 @@
name = "Plain"
icon_state = "plain"
+/datum/sprite_accessory/insect_wings/plasmafire
+ name = "Plasma Fire"
+ icon_state = "plasmafire"
+
/datum/sprite_accessory/insect_wings/poison
name = "Poison"
icon_state = "poison"
@@ -238,6 +361,10 @@
name = "Reddish"
icon_state = "redish"
+/datum/sprite_accessory/insect_wings/rosy
+ name = "Rosy"
+ icon_state = "rosy"
+
/datum/sprite_accessory/insect_wings/royal
name = "Royal"
icon_state = "royal"
@@ -265,45 +392,25 @@
icon_state = "none"
relevant_layers = null
-/datum/sprite_accessory/insect_markings/reddish
- name = "Reddish"
- icon_state = "reddish"
-
-/datum/sprite_accessory/insect_markings/royal
- name = "Royal"
- icon_state = "royal"
-
-/datum/sprite_accessory/insect_markings/gothic
- name = "Gothic"
- icon_state = "gothic"
-
-/datum/sprite_accessory/insect_markings/whitefly
- name = "White Fly"
- icon_state = "whitefly"
-
-/datum/sprite_accessory/insect_markings/lovers
- name = "Lovers"
- icon_state = "lovers"
-
-/datum/sprite_accessory/insect_markings/punished
- name = "Punished"
- icon_state = "punished"
+/datum/sprite_accessory/insect_markings/deathhead
+ name = "Deathshead"
+ icon_state = "deathhead"
/datum/sprite_accessory/insect_markings/firewatch
name = "Firewatch"
icon_state = "firewatch"
-/datum/sprite_accessory/insect_markings/deathhead
- name = "Deathshead"
- icon_state = "deathhead"
+/datum/sprite_accessory/insect_markings/gothic
+ name = "Gothic"
+ icon_state = "gothic"
-/datum/sprite_accessory/insect_markings/poison
- name = "Poison"
- icon_state = "poison"
+/datum/sprite_accessory/insect_markings/jungle
+ name = "Jungle"
+ icon_state = "jungle"
-/datum/sprite_accessory/insect_markings/ragged
- name = "Ragged"
- icon_state = "ragged"
+/datum/sprite_accessory/insect_markings/lovers
+ name = "Lovers"
+ icon_state = "lovers"
/datum/sprite_accessory/insect_markings/moonfly
name = "Moon Fly"
@@ -313,10 +420,42 @@
name = "Oak Worm"
icon_state = "oakworm"
-/datum/sprite_accessory/insect_markings/jungle
- name = "Jungle"
- icon_state = "jungle"
+/datum/sprite_accessory/insect_markings/poison
+ name = "Poison"
+ icon_state = "poison"
+
+/datum/sprite_accessory/insect_markings/punished
+ name = "Punished"
+ icon_state = "punished"
+
+/datum/sprite_accessory/insect_markings/ragged
+ name = "Ragged"
+ icon_state = "ragged"
+
+/datum/sprite_accessory/insect_markings/reddish
+ name = "Reddish"
+ icon_state = "reddish"
+
+/datum/sprite_accessory/insect_markings/royal
+ name = "Royal"
+ icon_state = "royal"
+
+/datum/sprite_accessory/insect_markings/whitefly
+ name = "White Fly"
+ icon_state = "whitefly"
/datum/sprite_accessory/insect_markings/witchwing
name = "Witch Wing"
icon_state = "witchwing"
+
+//DONATOR WINGS
+
+/datum/sprite_accessory/deco_wings/eyestalks
+ name = "gazer eyestalks"
+ icon_state = "eyestalks"
+ //ckeys_allowed = list("liquidfirefly","seiga") //At request.
+
+/datum/sprite_accessory/insect_wings/eyestalks
+ name = "gazer eyestalks"
+ icon_state = "eyestalks"
+ //ckeys_allowed = list("liquidfirefly","seiga") //At request.
diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm
index 5392e7b2d5..ca2946fd8a 100644
--- a/code/modules/mob/living/carbon/alien/special/facehugger.dm
+++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm
@@ -91,8 +91,8 @@
Attach(M)
/obj/item/clothing/mask/facehugger/Crossed(atom/target)
+ . = ..()
HasProximity(target)
- return
/obj/item/clothing/mask/facehugger/on_found(mob/finder)
if(stat == CONSCIOUS)
diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm
index 7a16d5c352..b2c14c30fe 100644
--- a/code/modules/mob/living/carbon/carbon_defense.dm
+++ b/code/modules/mob/living/carbon/carbon_defense.dm
@@ -304,10 +304,16 @@
emote("wag")
else if(check_zone(M.zone_selected) == BODY_ZONE_R_ARM || check_zone(M.zone_selected) == BODY_ZONE_L_ARM)
- M.visible_message( \
- "[M] shakes [src]'s hand. ", \
- "You shake [src]'s hand. ", target = src,
- target_message = "[M] shakes your hand. ")
+ if((pulling == M) && (grab_state == GRAB_PASSIVE))
+ M.visible_message( \
+ "[M] squeezes [src]'s hand. ", \
+ "You squeeze [src]'s hand. ", target = src,
+ target_message = "[M] squeezes your hand. ")
+ else
+ M.visible_message( \
+ "[M] shakes [src]'s hand. ", \
+ "You shake [src]'s hand. ", target = src,
+ target_message = "[M] shakes your hand. ")
else
M.visible_message("[M] hugs [src] to make [p_them()] feel better! ", \
diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm
index a866049d65..1f3a174d0f 100644
--- a/code/modules/mob/living/carbon/damage_procs.dm
+++ b/code/modules/mob/living/carbon/damage_procs.dm
@@ -62,8 +62,8 @@
amount += BP.burn_dam
return amount
-
-/mob/living/carbon/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE)
+//In both these procs, only_organic / only_robotic are only used for healing, not for damaging. For now at least.
+/mob/living/carbon/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, only_robotic = FALSE, only_organic = TRUE)
if(!forced && amount < 0 && HAS_TRAIT(src,TRAIT_NONATURALHEAL))
return FALSE
if(!forced && (status_flags & GODMODE))
@@ -71,10 +71,10 @@
if(amount > 0)
take_overall_damage(amount, 0, 0, updating_health)
else
- heal_overall_damage(abs(amount), 0, 0, FALSE, TRUE, updating_health)
+ heal_overall_damage(abs(amount), 0, 0, only_robotic, only_organic, updating_health)
return amount
-/mob/living/carbon/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/carbon/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, only_robotic = FALSE, only_organic = TRUE)
if(!forced && amount < 0 && HAS_TRAIT(src,TRAIT_NONATURALHEAL)) //Vamps don't heal naturally.
return FALSE
if(!forced && (status_flags & GODMODE))
@@ -82,7 +82,7 @@
if(amount > 0)
take_overall_damage(0, amount, 0, updating_health)
else
- heal_overall_damage(0, abs(amount), 0, FALSE, TRUE, updating_health)
+ heal_overall_damage(0, abs(amount), 0, only_robotic, only_organic, updating_health)
return amount
diff --git a/code/modules/mob/living/carbon/handle_corruption.dm b/code/modules/mob/living/carbon/handle_corruption.dm
index 7b84c41e27..5ac2a2f616 100644
--- a/code/modules/mob/living/carbon/handle_corruption.dm
+++ b/code/modules/mob/living/carbon/handle_corruption.dm
@@ -80,10 +80,11 @@
if("shortlimbdisable")
var/disabled_type = pick(list(TRAIT_PARALYSIS_L_ARM, TRAIT_PARALYSIS_R_ARM, TRAIT_PARALYSIS_L_LEG, TRAIT_PARALYSIS_R_LEG))
ADD_TRAIT(src, disabled_type, CORRUPTED_SYSTEM)
+ update_disabled_bodyparts()
addtimer(CALLBACK(src, .proc/reenable_limb, disabled_type), 5 SECONDS)
to_chat(src, "Error - Limb control subsystem partially shutdown, rebooting. ")
if("shortblind")
- ADD_TRAIT(src, TRAIT_BLIND, CORRUPTED_SYSTEM)
+ become_blind(CORRUPTED_SYSTEM)
addtimer(CALLBACK(src, .proc/reenable_vision), 5 SECONDS)
to_chat(src, "Visual receptor shutdown detected - Initiating reboot. ")
if("shortstun")
@@ -105,10 +106,11 @@
if("longlimbdisable")
var/disabled_type = pick(list(TRAIT_PARALYSIS_L_ARM, TRAIT_PARALYSIS_R_ARM, TRAIT_PARALYSIS_L_LEG, TRAIT_PARALYSIS_R_LEG))
ADD_TRAIT(src, disabled_type, CORRUPTED_SYSTEM)
+ update_disabled_bodyparts()
addtimer(CALLBACK(src, .proc/reenable_limb, disabled_type), 25 SECONDS)
to_chat(src, "Fatal error in limb control subsystem - rebooting. ")
if("blindmutedeaf")
- ADD_TRAIT(src, TRAIT_BLIND, CORRUPTED_SYSTEM)
+ become_blind(CORRUPTED_SYSTEM)
addtimer(CALLBACK(src, .proc/reenable_vision), (rand(10, 25)) SECONDS)
ADD_TRAIT(src, TRAIT_DEAF, CORRUPTED_SYSTEM)
addtimer(CALLBACK(src, .proc/reenable_hearing), (rand(15, 35)) SECONDS)
@@ -140,6 +142,7 @@
/mob/living/carbon/proc/reenable_limb(disabled_limb)
REMOVE_TRAIT(src, disabled_limb, CORRUPTED_SYSTEM)
+ update_disabled_bodyparts()
to_chat(src, "Limb control subsystem successfully rebooted. ")
/mob/living/carbon/proc/reenable_hearing()
@@ -147,7 +150,7 @@
to_chat(src, "Hearing restored. ")
/mob/living/carbon/proc/reenable_vision()
- REMOVE_TRAIT(src, TRAIT_BLIND, CORRUPTED_SYSTEM)
+ cure_blind(CORRUPTED_SYSTEM)
to_chat(src, "Visual receptors back online. ")
/mob/living/carbon/proc/reenable_speech()
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 03816555b3..df7ed66169 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -3,7 +3,7 @@
real_name = "Unknown"
icon = 'icons/mob/human.dmi'
icon_state = "caucasian_m"
- appearance_flags = KEEP_TOGETHER|TILE_BOUND|PIXEL_SCALE
+ SET_APPEARANCE_FLAGS(KEEP_TOGETHER|TILE_BOUND|PIXEL_SCALE)
/mob/living/carbon/human/Initialize()
add_verb(src, /mob/living/proc/mob_sleep)
@@ -1028,7 +1028,7 @@
return
stop_pulling()
- riding_datum.handle_vehicle_layer()
+ riding_datum.handle_vehicle_layer(dir)
riding_datum.fireman_carrying = fireman
. = ..(target, force, check_loc)
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 1b140af672..a74afc10f5 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -411,15 +411,18 @@
if(isrobotic(src))
apply_status_effect(/datum/status_effect/no_combat_mode/robotic_emp, severity / 20)
severity *= 0.5
+ var/do_not_stun = FALSE
if(HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM))
severity *= 0.5 //Robotpeople take less limb damage, but instead suffer system corruption (see carbon emp_act)
+ do_not_stun = TRUE
for(var/obj/item/bodypart/L in src.bodyparts)
if(L.is_robotic_limb())
if(!informed)
to_chat(src, "You feel a sharp pain as your robotic limbs overload. ")
informed = TRUE
L.receive_damage(0,severity/10)
- Stun(severity*2)
+ if(!do_not_stun) //Tiny bit better than checking for the trait another six times in succession
+ Stun(severity*2)
/mob/living/carbon/human/acid_act(acidpwr, acid_volume, bodyzone_hit)
var/list/damaged = list()
diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm
index 440400f889..1619d0f6de 100644
--- a/code/modules/mob/living/carbon/human/human_movement.dm
+++ b/code/modules/mob/living/carbon/human/human_movement.dm
@@ -9,11 +9,6 @@
return
return considering
-/mob/living/carbon/human/movement_delay()
- . = ..()
- if (m_intent == MOVE_INTENT_WALK && HAS_TRAIT(src, TRAIT_SPEEDY_STEP))
- . -= 1.5
-
/mob/living/carbon/human/slip(knockdown_amount, obj/O, lube)
if(HAS_TRAIT(src, TRAIT_NOSLIPALL))
return 0
diff --git a/code/modules/mob/living/carbon/human/species_types/arachnid.dm b/code/modules/mob/living/carbon/human/species_types/arachnid.dm
index a44177ced1..454625cf36 100644
--- a/code/modules/mob/living/carbon/human/species_types/arachnid.dm
+++ b/code/modules/mob/living/carbon/human/species_types/arachnid.dm
@@ -4,7 +4,7 @@
override_bp_icon = 'icons/mob/arachnid_parts.dmi'
say_mod = "chitters"
default_color = "00FF00"
- species_traits = list(LIPS, NOEYES, NO_UNDERWEAR)
+ species_traits = list(LIPS, NOEYES, NO_UNDERWEAR, HAS_FLESH, HAS_BONE)
inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_BUG
mutant_bodyparts = list("arachnid_legs" = "Plain", "arachnid_spinneret" = "Plain", "arachnid_mandibles" = "Plain")
attack_verb = "slash"
diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
index 803d3ec245..dc2269e19b 100644
--- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
@@ -94,7 +94,7 @@
name = "Xenobiological Slime Entity"
id = SPECIES_SLIME
default_color = "00FFFF"
- species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR)
+ species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,HAS_FLESH)
say_mod = "says"
hair_color = "mutcolor"
hair_alpha = 150
@@ -404,7 +404,7 @@
id = SPECIES_SLIME_HYBRID
limbs_id = SPECIES_SLIME
default_color = "00FFFF"
- species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR)
+ species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,HAS_FLESH)
inherent_traits = list(TRAIT_TOXINLOVER)
mutant_bodyparts = list("mcolor" = "FFFFFF", "mcolor2" = "FFFFFF","mcolor3" = "FFFFFF", "mam_tail" = "None", "mam_ears" = "None", "mam_body_markings" = "Plain", "mam_snouts" = "None", "taur" = "None", "legs" = "Plantigrade")
say_mod = "says"
diff --git a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm
index e02d15303f..4d0f88754f 100644
--- a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm
@@ -4,7 +4,7 @@
id = SPECIES_LIZARD
say_mod = "hisses"
default_color = "00FF00"
- species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,LIPS,HORNCOLOR,WINGCOLOR,HAS_FLESH,HAS_BONE)
+ species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,LIPS,HORNCOLOR,WINGCOLOR,CAN_SCAR,HAS_FLESH,HAS_BONE)
inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_REPTILE
mutanttongue = /obj/item/organ/tongue/lizard
mutanttail = /obj/item/organ/tail/lizard
@@ -48,7 +48,7 @@
name = "Ash Walker"
id = SPECIES_ASHWALKER
limbs_id = SPECIES_LIZARD
- species_traits = list(MUTCOLORS,EYECOLOR,LIPS,DIGITIGRADE)
+ species_traits = list(MUTCOLORS,EYECOLOR,LIPS,DIGITIGRADE,CAN_SCAR,HAS_FLESH,HAS_BONE)
inherent_traits = list(TRAIT_CHUNKYFINGERS)
mutantlungs = /obj/item/organ/lungs/ashwalker
mutanteyes = /obj/item/organ/eyes/night_vision
diff --git a/code/modules/mob/living/carbon/human/species_types/podpeople.dm b/code/modules/mob/living/carbon/human/species_types/podpeople.dm
index 45a1870ae8..c25c5efb6c 100644
--- a/code/modules/mob/living/carbon/human/species_types/podpeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/podpeople.dm
@@ -68,7 +68,7 @@
/datum/species/pod/pseudo_weak
name = "Anthromorphic Plant"
id = SPECIES_POD_WEAK
- species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,MUTCOLORS)
+ species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,MUTCOLORS,CAN_SCAR,HAS_FLESH,HAS_BONE)
mutant_bodyparts = list("mcolor" = "FFFFFF","mcolor2" = "FFFFFF","mcolor3" = "FFFFFF", "mam_snouts" = "Husky", "mam_tail" = "Husky", "mam_ears" = "Husky", "mam_body_markings" = "Husky", "taur" = "None", "legs" = "Normal Legs")
limbs_id = SPECIES_POD
light_nutrition_gain_factor = 3
diff --git a/code/modules/mob/living/carbon/human/species_types/xeno.dm b/code/modules/mob/living/carbon/human/species_types/xeno.dm
index f88ccc876f..9d5a700417 100644
--- a/code/modules/mob/living/carbon/human/species_types/xeno.dm
+++ b/code/modules/mob/living/carbon/human/species_types/xeno.dm
@@ -4,7 +4,7 @@
id = SPECIES_XENOHYBRID
say_mod = "hisses"
default_color = "00FF00"
- species_traits = list(MUTCOLORS,EYECOLOR,LIPS,CAN_SCAR)
+ species_traits = list(MUTCOLORS,EYECOLOR,LIPS,CAN_SCAR,HAS_FLESH,HAS_BONE)
mutant_bodyparts = list("xenotail"="Xenomorph Tail","xenohead"="Standard","xenodorsal"="Standard", "mam_body_markings" = "Xeno","mcolor" = "0F0","mcolor2" = "0F0","mcolor3" = "0F0","taur" = "None", "legs" = "Digitigrade","deco_wings"= "None")
attack_verb = "slash"
attack_sound = 'sound/weapons/slash.ogg'
diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm
index e0fab331a6..9885efd7c7 100644
--- a/code/modules/mob/living/carbon/life.dm
+++ b/code/modules/mob/living/carbon/life.dm
@@ -594,10 +594,18 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put
drunkenness = max(drunkenness - (drunkenness * 0.04), 0)
if(drunkenness >= 6)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "drunk", /datum/mood_event/drunk)
+ if(prob(25))
+ slurring += 2
jitteriness = max(jitteriness - 3, 0)
+ // throw_alert("drunk", /atom/movable/screen/alert/drunk)
if(HAS_TRAIT(src, TRAIT_DRUNK_HEALING))
adjustBruteLoss(-0.12, FALSE)
adjustFireLoss(-0.06, FALSE)
+ sound_environment_override = SOUND_ENVIRONMENT_PSYCHOTIC
+ else
+ SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "drunk")
+ clear_alert("drunk")
+ sound_environment_override = SOUND_ENVIRONMENT_NONE
if(mind && (mind.assigned_role == "Scientist" || mind.assigned_role == "Research Director"))
if(SSresearch.science_tech)
diff --git a/code/modules/mob/living/carbon/status_procs.dm b/code/modules/mob/living/carbon/status_procs.dm
index a47bb7fb4a..d602c25331 100644
--- a/code/modules/mob/living/carbon/status_procs.dm
+++ b/code/modules/mob/living/carbon/status_procs.dm
@@ -8,10 +8,12 @@
overlay_fullscreen("high", /obj/screen/fullscreen/high)
throw_alert("high", /obj/screen/alert/high)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "high", /datum/mood_event/high)
+ sound_environment_override = SOUND_ENVIRONMENT_DRUGGED
else
clear_fullscreen("high")
clear_alert("high")
SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "high")
+ sound_environment_override = SOUND_ENVIRONMENT_NONE
/mob/living/carbon/set_drugginess(amount)
druggy = max(amount, 0)
diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm
index 44701a26b2..e7426aa1fa 100644
--- a/code/modules/mob/living/damage_procs.dm
+++ b/code/modules/mob/living/damage_procs.dm
@@ -141,7 +141,8 @@
/mob/living/proc/getBruteLoss()
return bruteloss
-/mob/living/proc/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE)
+//only_robotic and only_organic arg only relevant for carbons
+/mob/living/proc/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, only_robotic = FALSE, only_organic = TRUE)
if(!forced && (status_flags & GODMODE))
return FALSE
bruteloss = clamp((bruteloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
@@ -215,7 +216,8 @@
/mob/living/proc/getFireLoss()
return fireloss
-/mob/living/proc/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE)
+//only_robotic and only_organic arg only relevant for carbons
+/mob/living/proc/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, only_robotic = FALSE, only_organic = TRUE)
if(!forced && (status_flags & GODMODE))
return FALSE
fireloss = clamp((fireloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
diff --git a/code/modules/mob/living/living_movement.dm b/code/modules/mob/living/living_movement.dm
index 9e093d391e..bafa38ec5e 100644
--- a/code/modules/mob/living/living_movement.dm
+++ b/code/modules/mob/living/living_movement.dm
@@ -101,6 +101,7 @@
if(lying && !buckled && prob(getBruteLoss()*200/maxHealth))
makeTrail(newloc, T, old_direction)
+
if(causes_dirt_buildup_on_floor && (movement_type & GROUND))
dirt_buildup()
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index fbf2d27c31..823f759e67 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -911,10 +911,10 @@
if(!istype(apc) || QDELETED(apc) || apc.stat & BROKEN)
to_chat(src, "Hack aborted. The designated APC no longer exists on the power network. ")
- playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, 1)
+ playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, TRUE, ignore_walls = FALSE)
else if(apc.aidisabled)
to_chat(src, "Hack aborted. \The [apc] is no longer responding to our systems. ")
- playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, 1)
+ playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, TRUE, ignore_walls = FALSE)
else
malf_picker.processing_time += 10
@@ -923,7 +923,7 @@
apc.locked = TRUE
apc.coverlocked = TRUE
- playsound(get_turf(src), 'sound/machines/ding.ogg', 50, 1)
+ playsound(get_turf(src), 'sound/machines/ding.ogg', 50, TRUE, ignore_walls = FALSE)
to_chat(src, "Hack complete. \The [apc] is now under your exclusive control.")
apc.update_icon()
diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm
index 786c121ad6..2ab74664a3 100644
--- a/code/modules/mob/living/silicon/pai/pai.dm
+++ b/code/modules/mob/living/silicon/pai/pai.dm
@@ -426,6 +426,10 @@
//Misc
.["Cyborg - Misc (dog - blade)"] = process_holoform_icon_filter(icon('modular_citadel/icons/mob/widerobot.dmi', "blade"), HOLOFORM_FILTER_PAI, FALSE)
+ // Gorillas
+ .["Gorilla (standing)"] = process_holoform_icon_filter(icon('icons/mob/gorilla.dmi', "standing"), HOLOFORM_FILTER_PAI, FALSE)
+ .["Gorilla (crawling)"] = process_holoform_icon_filter(icon('icons/mob/gorilla.dmi', "crawling"), HOLOFORM_FILTER_PAI, FALSE)
+
/mob/living/silicon/pai/proc/default_chassis_pixel_offsets_x()
. = list()
//Engi
diff --git a/code/modules/mob/living/silicon/pai/pai_defense.dm b/code/modules/mob/living/silicon/pai/pai_defense.dm
index c5fa5ece1f..c339aa920f 100644
--- a/code/modules/mob/living/silicon/pai/pai_defense.dm
+++ b/code/modules/mob/living/silicon/pai/pai_defense.dm
@@ -81,10 +81,10 @@
to_chat(src, "The impact degrades your holochassis! ")
return amount
-/mob/living/silicon/pai/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/silicon/pai/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, only_robotic = FALSE, only_organic = TRUE)
return take_holo_damage(amount)
-/mob/living/silicon/pai/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/silicon/pai/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, only_robotic = FALSE, only_organic = TRUE)
return take_holo_damage(amount)
/mob/living/silicon/pai/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, toxins_type = TOX_DEFAULT)
diff --git a/code/modules/mob/living/simple_animal/damage_procs.dm b/code/modules/mob/living/simple_animal/damage_procs.dm
index 9a2921cc0e..f478458829 100644
--- a/code/modules/mob/living/simple_animal/damage_procs.dm
+++ b/code/modules/mob/living/simple_animal/damage_procs.dm
@@ -7,13 +7,13 @@
updatehealth()
return amount
-/mob/living/simple_animal/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/simple_animal/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, only_robotic = FALSE, only_organic = TRUE)
if(forced)
. = adjustHealth(amount * CONFIG_GET(number/damage_multiplier), updating_health, forced)
else if(damage_coeff[BRUTE])
. = adjustHealth(amount * damage_coeff[BRUTE] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
-/mob/living/simple_animal/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/simple_animal/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, only_robotic = FALSE, only_organic = TRUE)
if(forced)
. = adjustHealth(amount * CONFIG_GET(number/damage_multiplier), updating_health, forced)
else if(damage_coeff[BURN])
diff --git a/code/modules/mob/living/simple_animal/friendly/cockroach.dm b/code/modules/mob/living/simple_animal/friendly/cockroach.dm
index 384fa8146f..f33c179911 100644
--- a/code/modules/mob/living/simple_animal/friendly/cockroach.dm
+++ b/code/modules/mob/living/simple_animal/friendly/cockroach.dm
@@ -37,23 +37,25 @@
return
..()
-/mob/living/simple_animal/cockroach/Crossed(var/atom/movable/AM)
- if(ismob(AM))
- if(isliving(AM))
- var/mob/living/A = AM
- if(A.mob_size > MOB_SIZE_SMALL && !(A.movement_type & FLYING))
- if(prob(squish_chance))
- A.visible_message("[A] squashed [src]. ", "You squashed [src]. ")
- adjustBruteLoss(1) //kills a normal cockroach
- else
- visible_message("[src] avoids getting crushed. ")
- else
- if(isstructure(AM))
+/mob/living/simple_animal/cockroach/Crossed(atom/movable/AM)
+ . = ..()
+ if(isliving(AM))
+ var/mob/living/A = AM
+ if(A.mob_size > MOB_SIZE_SMALL && !(A.movement_type & FLYING))
+ if(HAS_TRAIT(A, TRAIT_PACIFISM))
+ A.visible_message("[A] carefully steps over [src]. ", "You carefully step over [src] to avoid hurting it. ")
+ return
if(prob(squish_chance))
- AM.visible_message("[src] was crushed under [AM]. ")
- adjustBruteLoss(1)
+ A.visible_message("[A] squashed [src]. ", "You squashed [src]. ")
+ adjustBruteLoss(1) //kills a normal cockroach
else
visible_message("[src] avoids getting crushed. ")
+ else if(isstructure(AM))
+ if(prob(squish_chance))
+ AM.visible_message("[src] is crushed under [AM]. ")
+ adjustBruteLoss(1)
+ else
+ visible_message("[src] avoids getting crushed. ")
/mob/living/simple_animal/cockroach/ex_act() //Explosions are a terrible way to handle a cockroach.
return
diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm
index 0584995583..49581b91a7 100644
--- a/code/modules/mob/living/simple_animal/friendly/dog.dm
+++ b/code/modules/mob/living/simple_animal/friendly/dog.dm
@@ -263,7 +263,7 @@
/mob/living/simple_animal/pet/dog/corgi/proc/place_on_head(obj/item/item_to_add, mob/user)
if(istype(item_to_add, /obj/item/grenade/plastic)) // last thing he ever wears, I guess
- item_to_add.afterattack(src,user,1)
+ INVOKE_ASYNC(item_to_add, /obj/item.proc/afterattack, src, user, 1)
return
if(inventory_head)
@@ -271,13 +271,15 @@
to_chat(user, "You can't put more than one hat on [src]! ")
return
if(!item_to_add)
- user.visible_message("[user] pets [src].","You rest your hand on [src]'s head for a moment. ")
+ user.visible_message("[user] pets [src]. ", "You rest your hand on [src]'s head for a moment. ")
+ if(flags_1 & HOLOGRAM_1)
+ return
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, src, /datum/mood_event/pet_animal, src)
return
if(user && !user.temporarilyRemoveItemFromInventory(item_to_add))
to_chat(user, "\The [item_to_add] is stuck to your hand, you cannot put it on [src]'s head! ")
- return 0
+ return
var/valid = FALSE
if(ispath(item_to_add.dog_fashion, /datum/dog_fashion/head))
@@ -287,11 +289,11 @@
if(valid)
if(health <= 0)
- to_chat(user, "There is merely a dull, lifeless look in [real_name]'s eyes as you put the [item_to_add] on [p_them()]. ")
+ to_chat(user, "There is merely a dull, lifeless look in [real_name]'s eyes as you put the [item_to_add] on [p_them()]. ")
else if(user)
- user.visible_message("[user] puts [item_to_add] on [real_name]'s head. [src] looks at [user] and barks once.",
- "You put [item_to_add] on [real_name]'s head. [src] gives you a peculiar look, then wags [p_their()] tail once and barks. ",
- "You hear a friendly-sounding bark. ")
+ user.visible_message("[user] puts [item_to_add] on [real_name]'s head. [src] looks at [user] and barks once. ",
+ "You put [item_to_add] on [real_name]'s head. [src] gives you a peculiar look, then wags [p_their()] tail once and barks. ",
+ "You hear a friendly-sounding bark. ")
item_to_add.forceMove(src)
src.inventory_head = item_to_add
update_corgi_fluff()
@@ -361,7 +363,7 @@
icon_state = "old_corgi"
icon_living = "old_corgi"
icon_dead = "old_corgi_dead"
- desc = "At a ripe old age of [record_age] Ian's not as spry as he used to be, but he'll always be the HoP's beloved corgi." //RIP
+ desc = "At a ripe old age of [record_age], Ian's not as spry as he used to be, but he'll always be the HoP's beloved corgi." //RIP
turns_per_move = 20
RemoveElement(/datum/element/mob_holder, held_icon)
AddElement(/datum/element/mob_holder, "old_corgi")
diff --git a/code/modules/mob/living/simple_animal/guardian/types/ranged.dm b/code/modules/mob/living/simple_animal/guardian/types/ranged.dm
index e7c4e2f352..e2bcdd5684 100644
--- a/code/modules/mob/living/simple_animal/guardian/types/ranged.dm
+++ b/code/modules/mob/living/simple_animal/guardian/types/ranged.dm
@@ -110,6 +110,7 @@
/obj/effect/snare/Crossed(AM as mob|obj)
+ . = ..()
if(isliving(AM) && spawner && spawner.summoner && AM != spawner && !spawner.hasmatchingsummoner(AM))
to_chat(spawner.summoner, "[AM] has crossed surveillance snare, [name]. ")
var/list/guardians = spawner.summoner.hasparasites()
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm
index 61be1f6287..cee7e2979d 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm
@@ -94,16 +94,17 @@
consume_bait()
/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/proc/consume_bait()
- var/obj/item/stack/ore/diamond/diamonds = locate(/obj/item/stack/ore/diamond) in oview(src, 9)
- var/obj/item/pen/survival/bait = locate(/obj/item/pen/survival) in oview(src, 9)
- if(!diamonds && !bait)
- return
+ var/list/L = list()
+ for(var/obj/O in view(src, 9))
+ L += O
+ var/obj/item/stack/ore/diamond/diamonds = locate(/obj/item/stack/ore/diamond) in L
if(diamonds)
var/distanced = 0
distanced = get_dist(loc,diamonds.loc)
if(distanced <= 1 && diamonds)
qdel(diamonds)
src.visible_message("[src] consumes [diamonds], and it disappears! ...At least, you think. ")
+ var/obj/item/pen/survival/bait = locate(/obj/item/pen/survival) in L
if(bait)
var/distanceb = 0
distanceb = get_dist(loc,bait.loc)
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/goliath_broodmother.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/goliath_broodmother.dm
index 4e8f4f6160..ef51dc572f 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/goliath_broodmother.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/goliath_broodmother.dm
@@ -219,6 +219,9 @@
/obj/effect/temp_visual/goliath_tentacle/broodmother/patch/Initialize(mapload, new_spawner)
. = ..()
+ INVOKE_ASYNC(src, .proc/createpatch)
+
+/obj/effect/temp_visual/goliath_tentacle/broodmother/patch/proc/createpatch()
var/tentacle_locs = spiral_range_turfs(1, get_turf(src))
for(var/T in tentacle_locs)
new /obj/effect/temp_visual/goliath_tentacle/broodmother(T, spawner)
diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/frog.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/frog.dm
index 8424a0a576..f0fe85008a 100644
--- a/code/modules/mob/living/simple_animal/hostile/retaliate/frog.dm
+++ b/code/modules/mob/living/simple_animal/hostile/retaliate/frog.dm
@@ -42,7 +42,8 @@
butcher_results = list(/obj/item/reagent_containers/food/snacks/nugget = 5)
/mob/living/simple_animal/hostile/retaliate/frog/Crossed(AM as mob|obj)
+ . = ..()
if(!stat && isliving(AM))
var/mob/living/L = AM
if(L.mob_size > MOB_SIZE_TINY)
- playsound(src, stepped_sound, 50, 1)
+ playsound(src, stepped_sound, 50, TRUE)
diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm
index 6e02944885..06e336875a 100644
--- a/code/modules/mob/living/simple_animal/parrot.dm
+++ b/code/modules/mob/living/simple_animal/parrot.dm
@@ -1189,4 +1189,4 @@
icon_state = "mtoo-flap"
icon_living = "mtoo-flap"
icon_dead = "mtoo-dead"
- icon_sit = "mtoo_sit"
\ No newline at end of file
+ icon_sit = "mtoo_sit"
diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm
index 1f45e57718..ab59441572 100644
--- a/code/modules/mob/living/simple_animal/slime/slime.dm
+++ b/code/modules/mob/living/simple_animal/slime/slime.dm
@@ -225,7 +225,7 @@
. += "Power Level: [powerlevel]"
-/mob/living/simple_animal/slime/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/simple_animal/slime/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, only_robotic = FALSE, only_organic = TRUE)
if(!forced)
amount = -abs(amount)
return ..() //Heals them
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index dc81b3cfbf..ba2399b831 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -177,3 +177,6 @@
var/list/ability_actions
/// ability = list(data). see __DEFINES/mobs/innate_abilities.dm
var/list/ability_properties
+
+ ///Override for sound_environments. If this is set the user will always hear a specific type of reverb (Instead of the area defined reverb)
+ var/sound_environment_override = SOUND_ENVIRONMENT_NONE
diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm
index e977c397c9..c467605f37 100644
--- a/code/modules/mob/mob_movement.dm
+++ b/code/modules/mob/mob_movement.dm
@@ -73,6 +73,7 @@
return FALSE
//We are now going to move
var/add_delay = mob.movement_delay()
+ mob.set_glide_size(DELAY_TO_GLIDE_SIZE(add_delay * ( (NSCOMPONENT(direction) && EWCOMPONENT(direction)) ? 2 : 1 ) ), FALSE) // set it now in case of pulled objects
if(old_move_delay + (add_delay*MOVEMENT_DELAY_BUFFER_DELTA) + MOVEMENT_DELAY_BUFFER > world.time)
move_delay = old_move_delay
else
@@ -95,6 +96,7 @@
if((direction & (direction - 1)) && mob.loc == n) //moved diagonally successfully
add_delay *= 2
+ mob.set_glide_size(DELAY_TO_GLIDE_SIZE(add_delay), FALSE)
move_delay += add_delay
if(.) // If mob is null here, we deserve the runtime
if(mob.throwing)
@@ -104,6 +106,8 @@
if(AM && AM.density && !SEND_SIGNAL(L, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_ACTIVE) && !ismob(AM))
L.setDir(turn(L.dir, 180))
+ last_move = world.time
+
SEND_SIGNAL(mob, COMSIG_MOB_CLIENT_MOVE, src, direction, n, oldloc, add_delay)
/// Process_Grab(): checks for grab, attempts to break if so. Return TRUE to prevent movement.
diff --git a/code/modules/modular_computers/file_system/programs/arcade.dm b/code/modules/modular_computers/file_system/programs/arcade.dm
index 87a3f1ec94..002cf20801 100644
--- a/code/modules/modular_computers/file_system/programs/arcade.dm
+++ b/code/modules/modular_computers/file_system/programs/arcade.dm
@@ -27,7 +27,7 @@
// user?.mind?.adjust_experience(/datum/skill/gaming, 1)
if(boss_hp <= 0)
heads_up = "You have crushed [boss_name]! Rejoice!"
- playsound(computer.loc, 'sound/arcade/win.ogg', 50, TRUE, extrarange = -3, falloff = 10)
+ playsound(computer.loc, 'sound/arcade/win.ogg', 50, TRUE, extrarange = -3)
game_active = FALSE
program_icon_state = "arcade_off"
if(istype(computer))
@@ -37,7 +37,7 @@
sleep(10)
else if(player_hp <= 0 || player_mp <= 0)
heads_up = "You have been defeated... how will the station survive?"
- playsound(computer.loc, 'sound/arcade/lose.ogg', 50, TRUE, extrarange = -3, falloff = 10)
+ playsound(computer.loc, 'sound/arcade/lose.ogg', 50, TRUE, extrarange = -3)
game_active = FALSE
program_icon_state = "arcade_off"
if(istype(computer))
@@ -57,17 +57,17 @@
return
if (boss_mp <= 5)
heads_up = "[boss_mpamt] magic power has been stolen from you!"
- playsound(computer.loc, 'sound/arcade/steal.ogg', 50, TRUE, extrarange = -3, falloff = 10)
+ playsound(computer.loc, 'sound/arcade/steal.ogg', 50, TRUE, extrarange = -3)
player_mp -= boss_mpamt
boss_mp += boss_mpamt
else if(boss_mp > 5 && boss_hp <12)
heads_up = "[boss_name] heals for [bossheal] health!"
- playsound(computer.loc, 'sound/arcade/heal.ogg', 50, TRUE, extrarange = -3, falloff = 10)
+ playsound(computer.loc, 'sound/arcade/heal.ogg', 50, TRUE, extrarange = -3)
boss_hp += bossheal
boss_mp -= boss_mpamt
else
heads_up = "[boss_name] attacks you for [boss_attackamt] damage!"
- playsound(computer.loc, 'sound/arcade/hit.ogg', 50, TRUE, extrarange = -3, falloff = 10)
+ playsound(computer.loc, 'sound/arcade/hit.ogg', 50, TRUE, extrarange = -3)
player_hp -= boss_attackamt
pause_state = FALSE
@@ -106,7 +106,7 @@
attackamt = rand(2,6)// + rand(0, gamerSkill)
pause_state = TRUE
heads_up = "You attack for [attackamt] damage."
- playsound(computer.loc, 'sound/arcade/hit.ogg', 50, TRUE, extrarange = -3, falloff = 10)
+ playsound(computer.loc, 'sound/arcade/hit.ogg', 50, TRUE, extrarange = -3)
boss_hp -= attackamt
sleep(10)
game_check()
@@ -123,7 +123,7 @@
healcost = rand(1, maxPointCost)
pause_state = TRUE
heads_up = "You heal for [healamt] damage."
- playsound(computer.loc, 'sound/arcade/heal.ogg', 50, TRUE, extrarange = -3, falloff = 10)
+ playsound(computer.loc, 'sound/arcade/heal.ogg', 50, TRUE, extrarange = -3)
player_hp += healamt
player_mp -= healcost
sleep(10)
@@ -136,7 +136,7 @@
rechargeamt = rand(4,7)// + rand(0, gamerSkill)
pause_state = TRUE
heads_up = "You regain [rechargeamt] magic power."
- playsound(computer.loc, 'sound/arcade/mana.ogg', 50, TRUE, extrarange = -3, falloff = 10)
+ playsound(computer.loc, 'sound/arcade/mana.ogg', 50, TRUE, extrarange = -3)
player_mp += rechargeamt
sleep(10)
game_check()
@@ -153,7 +153,7 @@
computer.visible_message("\The [computer] prints out paper. ")
if(ticket_count >= 1)
new /obj/item/stack/arcadeticket((get_turf(computer)), 1)
- to_chat(usr, "[src] dispenses a ticket! ")
+ to_chat(usr, "[computer] dispenses a ticket! ")
ticket_count -= 1
printer.stored_paper -= 1
else
diff --git a/code/modules/movespeed/_movespeed_modifier.dm b/code/modules/movespeed/_movespeed_modifier.dm
index 9c8036bd55..46d10afe7f 100644
--- a/code/modules/movespeed/_movespeed_modifier.dm
+++ b/code/modules/movespeed/_movespeed_modifier.dm
@@ -96,7 +96,7 @@ GLOBAL_LIST_EMPTY(movespeed_modification_cache)
return TRUE
remove_movespeed_modifier(existing, FALSE)
if(length(movespeed_modification))
- BINARY_INSERT(type_or_datum.id, movespeed_modification, datum/movespeed_modifier, type_or_datum, priority, COMPARE_VALUE)
+ BINARY_INSERT(type_or_datum.id, movespeed_modification, /datum/movespeed_modifier, type_or_datum, priority, COMPARE_VALUE)
LAZYSET(movespeed_modification, type_or_datum.id, type_or_datum)
if(update)
update_movespeed()
@@ -217,13 +217,25 @@ GLOBAL_LIST_EMPTY(movespeed_modification_cache)
else
continue
. = M.apply_multiplicative(., src)
- var/old = cached_multiplicative_slowdown // CITAEDL EDIT - To make things a bit less jarring, when in situations where
// your delay decreases, "give" the delay back to the client
cached_multiplicative_slowdown = .
- var/diff = old - cached_multiplicative_slowdown
- if((diff > 0) && client)
+ if(!client)
+ return
+ var/diff = (client.last_move - client.move_delay) - cached_multiplicative_slowdown
+ if(diff > 0)
if(client.move_delay > world.time + 1.5)
client.move_delay -= diff
+ var/timeleft = world.time - client.move_delay
+ var/elapsed = world.time - client.last_move
+ var/glide_size_current = glide_size
+ if((timeleft <= 0) || (elapsed > 20))
+ set_glide_size(16, TRUE)
+ return
+ var/pixels_moved = glide_size_current * elapsed * (1 / world.tick_lag)
+ // calculate glidesize needed to move to the next tile within timeleft deciseconds
+ var/ticks_allowed = timeleft / world.tick_lag
+ var/pixels_per_tick = pixels_moved / ticks_allowed
+ set_glide_size(pixels_per_tick * GLOB.glide_size_multiplier, TRUE)
/// Get the move speed modifiers list of the mob
/mob/proc/get_movespeed_modifiers()
diff --git a/code/modules/movespeed/modifiers/mobs.dm b/code/modules/movespeed/modifiers/mobs.dm
index d453124b71..cdfb275418 100644
--- a/code/modules/movespeed/modifiers/mobs.dm
+++ b/code/modules/movespeed/modifiers/mobs.dm
@@ -62,6 +62,11 @@
var/mod = CONFIG_GET(number/movedelay/walk_delay)
multiplicative_slowdown = isnum(mod)? mod : initial(multiplicative_slowdown)
+/datum/movespeed_modifier/config_wak_run/walk/apply_multiplicative(existing, mob/target)
+ . = ..()
+ if(HAS_TRAIT(target, TRAIT_SPEEDY_STEP))
+ . -= 1.25
+
/datum/movespeed_modifier/config_walk_run/run/sync()
var/mod = CONFIG_GET(number/movedelay/run_delay)
multiplicative_slowdown = isnum(mod)? mod : initial(multiplicative_slowdown)
diff --git a/code/modules/pool/pool_main.dm b/code/modules/pool/pool_main.dm
index 98189cc8a4..088c991ca0 100644
--- a/code/modules/pool/pool_main.dm
+++ b/code/modules/pool/pool_main.dm
@@ -150,7 +150,8 @@
H.DefaultCombatKnockdown(40)
playsound(src, 'sound/effects/woodhit.ogg', 60, TRUE, 1)
else if(filled)
- victim.adjustStaminaLoss(1)
+ if(iscarbon(victim))
+ victim.adjustStaminaLoss(1)
playsound(src, "water_wade", 20, TRUE)
return ..()
diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm
index dfb51df9cf..2ca9b7513c 100644
--- a/code/modules/power/singularity/containment_field.dm
+++ b/code/modules/power/singularity/containment_field.dm
@@ -56,12 +56,14 @@
else
..()
-/obj/machinery/field/containment/Crossed(mob/mover)
- if(isliving(mover))
- shock(mover)
+/obj/machinery/field/containment/Crossed(atom/movable/AM)
+ . = ..()
+ if(isliving(AM))
+ shock(AM)
+
+ if(ismachinery(AM) || isstructure(AM) || ismecha(AM))
+ bump_field(AM)
- if(ismachinery(mover) || isstructure(mover) || ismecha(mover))
- bump_field(mover)
/obj/machinery/field/containment/proc/set_master(master1,master2)
if(!master1 || !master2)
diff --git a/code/modules/power/singularity/particle_accelerator/particle.dm b/code/modules/power/singularity/particle_accelerator/particle.dm
index 9e098446d1..7ecde364ae 100644
--- a/code/modules/power/singularity/particle_accelerator/particle.dm
+++ b/code/modules/power/singularity/particle_accelerator/particle.dm
@@ -44,6 +44,7 @@
movement_range = 0
/obj/effect/accelerated_particle/Crossed(atom/A)
+ . = ..()
if(isliving(A))
toxmob(A)
diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm
index f385b640aa..1e82a601ea 100644
--- a/code/modules/power/supermatter/supermatter.dm
+++ b/code/modules/power/supermatter/supermatter.dm
@@ -348,11 +348,11 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
/obj/machinery/power/supermatter_crystal/proc/alarm()
switch(get_status())
if(SUPERMATTER_DELAMINATING)
- playsound(src, 'sound/misc/bloblarm.ogg', 100)
+ playsound(src, 'sound/misc/bloblarm.ogg', 100, FALSE, 40, 30, falloff_distance = 10)
if(SUPERMATTER_EMERGENCY)
- playsound(src, 'sound/machines/engine_alert1.ogg', 100)
+ playsound(src, 'sound/machines/engine_alert1.ogg', 100, FALSE, 30, 30, falloff_distance = 10)
if(SUPERMATTER_DANGER)
- playsound(src, 'sound/machines/engine_alert2.ogg', 100)
+ playsound(src, 'sound/machines/engine_alert2.ogg', 100, FALSE, 30, 30, falloff_distance = 10)
if(SUPERMATTER_WARNING)
playsound(src, 'sound/machines/terminal_alert.ogg', 75)
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index eb75a37f19..25a718ff29 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -18,6 +18,8 @@
item_flags = NEEDS_PERMIT
attack_verb = list("struck", "hit", "bashed")
attack_speed = CLICK_CD_RANGE
+ var/ranged_attack_speed = CLICK_CD_RANGE
+ var/melee_attack_speed = CLICK_CD_MELEE
var/fire_sound = "gunshot"
var/suppressed = null //whether or not a message is displayed when fired
@@ -159,7 +161,7 @@
user.UseStaminaBuffer(safe_cost)
if(suppressed)
- playsound(user, fire_sound, 10, 1)
+ playsound(user, fire_sound, 10, TRUE, ignore_walls = FALSE, extrarange = SILENCED_SOUND_EXTRARANGE, falloff_distance = 0)
else
playsound(user, fire_sound, 50, 1)
if(message)
@@ -174,12 +176,25 @@
for(var/obj/O in contents)
O.emp_act(severity)
+/obj/item/gun/attack(mob/living/M, mob/user)
+ . = ..()
+ if(!(. & DISCARD_LAST_ACTION))
+ user.DelayNextAction(melee_attack_speed)
+
+/obj/item/gun/attack_obj(obj/O, mob/user)
+ . = ..()
+ if(!(. & DISCARD_LAST_ACTION))
+ user.DelayNextAction(melee_attack_speed)
+
/obj/item/gun/afterattack(atom/target, mob/living/user, flag, params)
. = ..()
- if(user && !CheckAttackCooldown(user, target))
+ if(user && !CheckAttackCooldown(user, target, TRUE))
return
process_afterattack(target, user, flag, params)
+/obj/item/gun/CheckAttackCooldown(mob/user, atom/target, shooting = FALSE)
+ return user.CheckActionCooldown(shooting? ranged_attack_speed : attack_speed, clickdelay_from_next_action, clickdelay_mod_bypass, clickdelay_ignores_next_action)
+
/obj/item/gun/proc/process_afterattack(atom/target, mob/living/user, flag, params)
if(!target)
return
diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm
index 37b23402f1..3e564a9ace 100644
--- a/code/modules/projectiles/guns/ballistic/revolver.dm
+++ b/code/modules/projectiles/guns/ballistic/revolver.dm
@@ -373,7 +373,6 @@
sawn_off = TRUE
slot_flags = ITEM_SLOT_BELT
-
/obj/item/gun/ballistic/revolver/reverse //Fires directly at its user... unless the user is a clown, of course.
clumsy_check = 0
diff --git a/code/modules/projectiles/guns/ballistic/shotgun.dm b/code/modules/projectiles/guns/ballistic/shotgun.dm
index 7b3ac36ef6..796e544603 100644
--- a/code/modules/projectiles/guns/ballistic/shotgun.dm
+++ b/code/modules/projectiles/guns/ballistic/shotgun.dm
@@ -318,7 +318,7 @@
pump()
return TRUE
-// DOUBLE BARRELED SHOTGUN and IMPROVISED SHOTGUN are in revolver.dm
+//due to code weirdness, and the fact that a refactor is coming soon anyway, the barman's shotgun and maint shotgun are in revolver.dm
/obj/item/gun/ballistic/shotgun/doublebarrel/hook
name = "hook modified sawn-off shotgun"
diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm
index a08e570dd7..ae6050a68e 100644
--- a/code/modules/projectiles/guns/energy/special.dm
+++ b/code/modules/projectiles/guns/energy/special.dm
@@ -173,18 +173,60 @@
force = 15
ammo_type = list(/obj/item/ammo_casing/energy/plasma/adv)
+//Sci guns
+
+/obj/item/gun/energy/gravity_gun
+ name = "one-point gravitational manipulator"
+ desc = "An experimental, multi-mode device that fires bolts of Zero-Point Energy, causing local distortions in gravity. Requires an anomaly core to function."
+ ammo_type = list(/obj/item/ammo_casing/energy/gravity/repulse, /obj/item/ammo_casing/energy/gravity/attract, /obj/item/ammo_casing/energy/gravity/chaos)
+ item_state = "gravity_gun"
+ icon_state = "gravity_gun"
+ var/power = 4
+ var/firing_core = FALSE
+
+/obj/item/gun/energy/gravity_gun/attackby(obj/item/C, mob/user)
+ if(istype(C, /obj/item/assembly/signaler/anomaly))
+ to_chat(user, "You insert [C] into the gravitational manipulator and the weapon gently hums to life. ")
+ firing_core = TRUE
+ playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE)
+ qdel(C)
+ return
+ return ..()
+
+/obj/item/gun/energy/gravity_gun/can_shoot()
+ if(!firing_core)
+ return FALSE
+ return ..()
+
/obj/item/gun/energy/wormhole_projector
name = "bluespace wormhole projector"
- desc = "A projector that emits high density quantum-coupled bluespace beams."
+ desc = "A projector that emits high density quantum-coupled bluespace beams. Requires an anomaly core to function."
ammo_type = list(/obj/item/ammo_casing/energy/wormhole, /obj/item/ammo_casing/energy/wormhole/orange)
item_state = null
icon_state = "wormhole_projector"
- pin = null
inaccuracy_modifier = 0.25
automatic_charge_overlays = FALSE
var/obj/effect/portal/p_blue
var/obj/effect/portal/p_orange
var/atmos_link = FALSE
+ var/firing_core = FALSE
+
+/obj/item/gun/energy/wormhole_projector/attackby(obj/item/C, mob/user)
+ if(istype(C, /obj/item/assembly/signaler/anomaly))
+ to_chat(user, "You insert [C] into the wormhole projector and the weapon gently hums to life. ")
+ firing_core = TRUE
+ playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE)
+ qdel(C)
+ return
+
+/obj/item/gun/energy/wormhole_projector/can_shoot()
+ if(!firing_core)
+ return FALSE
+ return ..()
+
+/obj/item/gun/energy/wormhole_projector/shoot_with_empty_chamber(mob/living/user)
+ . = ..()
+ to_chat(user, "The display says, 'NO CORE INSTALLED'. ")
/obj/item/gun/energy/wormhole_projector/update_icon_state()
icon_state = "[initial(icon_state)][current_firemode_index]"
@@ -243,6 +285,9 @@
p_blue = P
crosslink()
+/obj/item/gun/energy/wormhole_projector/core_inserted
+ firing_core = TRUE
+
/* 3d printer 'pseudo guns' for borgs */
/obj/item/gun/energy/printer
@@ -298,18 +343,6 @@
/obj/item/gun/energy/laser/instakill/emp_act() //implying you could stop the instagib
return
-/obj/item/gun/energy/gravity_gun
- name = "one-point bluespace-gravitational manipulator"
- desc = "An experimental, multi-mode device that fires bolts of Zero-Point Energy, causing local distortions in gravity."
- ammo_type = list(/obj/item/ammo_casing/energy/gravity/repulse, /obj/item/ammo_casing/energy/gravity/attract, /obj/item/ammo_casing/energy/gravity/chaos)
- item_state = "gravity_gun"
- icon_state = "gravity_gun"
- pin = null
- var/power = 4
-
-/obj/item/gun/energy/gravity_gun/security
- pin = /obj/item/firing_pin
-
//Emitter Gun
/obj/item/gun/energy/emitter
diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm
index fb9e6ff6c6..481d3c2c68 100644
--- a/code/modules/projectiles/projectile.dm
+++ b/code/modules/projectiles/projectile.dm
@@ -471,11 +471,10 @@
if(paused || !isturf(loc))
return
- var/ds = (SSprojectiles.flags & SS_TICKER)? (wait * world.tick_lag) : wait
- var/required_pixels = (pixels_per_second * ds * 0.1) + pixels_tick_leftover
+ var/required_pixels = (pixels_per_second * wait) + pixels_tick_leftover
if(required_pixels >= pixel_increment_amount)
pixels_tick_leftover = MODULUS(required_pixels, pixel_increment_amount)
- pixel_move(FLOOR(required_pixels / pixel_increment_amount, 1), FALSE, ds, SSprojectiles.global_projectile_speed_multiplier)
+ pixel_move(FLOOR(required_pixels / pixel_increment_amount, 1), FALSE, wait, SSprojectiles.global_projectile_speed_multiplier)
else
pixels_tick_leftover = required_pixels
@@ -603,7 +602,7 @@
* Trajectory multiplier directly modifies the factor of pixel_increment_amount to go per time.
* It's complicated, so probably just don't mess with this unless you know what you're doing.
*/
-/obj/item/projectile/proc/pixel_move(times, hitscanning = FALSE, deciseconds_equivalent = world.tick_lag, trajectory_multiplier = 1, allow_animation = TRUE)
+/obj/item/projectile/proc/pixel_move(times, hitscanning = FALSE, seconds_equivalent = world.tick_lag * 0.1, trajectory_multiplier = 1, allow_animation = TRUE)
if(!loc || !trajectory)
return
if(!nondirectional_sprite && !hitscanning)
@@ -620,7 +619,7 @@
if(homing_target)
// No datum/points, too expensive.
var/angle = closer_angle_difference(Angle, get_projectile_angle(src, homing_target))
- var/max_turn = homing_turn_speed * deciseconds_equivalent * 0.1
+ var/max_turn = homing_turn_speed * seconds_equivalent
setAngle(Angle + clamp(angle, -max_turn, max_turn))
// HOMING END
trajectory.increment(trajectory_multiplier)
diff --git a/code/modules/projectiles/projectile/reusable/foam_dart.dm b/code/modules/projectiles/projectile/reusable/foam_dart.dm
index 7d21f663c2..b00c35cd18 100644
--- a/code/modules/projectiles/projectile/reusable/foam_dart.dm
+++ b/code/modules/projectiles/projectile/reusable/foam_dart.dm
@@ -20,8 +20,9 @@
newcasing.modified = modified
var/obj/item/projectile/bullet/reusable/foam_dart/newdart = newcasing.BB
newdart.modified = modified
- newdart.damage = damage
- newdart.nodamage = nodamage
+ if(modified)
+ newdart.damage = 5
+ newdart.nodamage = FALSE
newdart.damage_type = damage_type
if(pen)
newdart.pen = pen
diff --git a/code/modules/reagents/chemistry/reagents/drink_reagents.dm b/code/modules/reagents/chemistry/reagents/drink_reagents.dm
index 37fc075c6f..1a8f6edcbe 100644
--- a/code/modules/reagents/chemistry/reagents/drink_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/drink_reagents.dm
@@ -625,8 +625,9 @@
myseed.adjust_potency(round(chems.get_reagent_amount(src.type) * 0.5))
/datum/reagent/consumable/buzz_fuzz/on_mob_life(mob/living/carbon/M)
- M.reagents.add_reagent(/datum/reagent/consumable/sugar,1)
- if(prob(5))
+ if(prob(33))
+ M.reagents.add_reagent(/datum/reagent/consumable/sugar,1)
+ if(prob(1))
M.reagents.add_reagent(/datum/reagent/consumable/honey,1)
..()
diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm
index e64647028c..17cde0611b 100644
--- a/code/modules/reagents/chemistry/reagents/other_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm
@@ -1125,8 +1125,8 @@
/datum/reagent/space_cleaner/sterilizine/reaction_obj(obj/O, reac_volume)
if(istype(O, /obj/item/stack/medical/gauze))
var/obj/item/stack/medical/gauze/G = O
- reac_volume = min((reac_volume / 10), G.amount)
- new/obj/item/stack/medical/gauze/adv(get_turf(G), reac_volume)
+ reac_volume = min((reac_volume / 5), G.amount)
+ new /obj/item/stack/medical/gauze/adv(get_turf(G), reac_volume)
G.use(reac_volume)
diff --git a/code/modules/recycling/disposal/construction.dm b/code/modules/recycling/disposal/construction.dm
index 348e687e03..c6d015df34 100644
--- a/code/modules/recycling/disposal/construction.dm
+++ b/code/modules/recycling/disposal/construction.dm
@@ -14,12 +14,12 @@
var/obj/pipe_type = /obj/structure/disposalpipe/segment
var/pipename
-/obj/structure/disposalconstruct/Initialize(loc, _pipe_type, _dir = SOUTH, flip = FALSE, obj/make_from)
+/obj/structure/disposalconstruct/Initialize(mapload, _pipe_type, _dir = SOUTH, flip = FALSE, obj/make_from)
. = ..()
if(make_from)
pipe_type = make_from.type
setDir(make_from.dir)
- anchored = TRUE
+ set_anchored(TRUE)
else
if(_pipe_type)
@@ -34,6 +34,8 @@
update_icon()
+ // AddElement(/datum/element/undertile, TRAIT_T_RAY_VISIBLE)
+
/obj/structure/disposalconstruct/Move()
var/old_dir = dir
..()
diff --git a/code/modules/recycling/disposal/holder.dm b/code/modules/recycling/disposal/holder.dm
index 2e36a9deaa..f739057699 100644
--- a/code/modules/recycling/disposal/holder.dm
+++ b/code/modules/recycling/disposal/holder.dm
@@ -73,14 +73,16 @@
/obj/structure/disposalholder/proc/move()
set waitfor = FALSE
var/obj/structure/disposalpipe/last
+ var/ticks = 1
while(active)
var/obj/structure/disposalpipe/curr = loc
last = curr
+ set_glide_size(DELAY_TO_GLIDE_SIZE(ticks * world.tick_lag))
curr = curr.transfer(src)
if(!curr && active)
last.expel(src, loc, dir)
- stoplag()
+ ticks = stoplag()
if(!(count--))
active = FALSE
diff --git a/code/modules/research/designs/autolathe_desings/autolathe_designs_sec_and_hacked.dm b/code/modules/research/designs/autolathe_desings/autolathe_designs_sec_and_hacked.dm
index 61d0594d3b..bf9d5886a0 100644
--- a/code/modules/research/designs/autolathe_desings/autolathe_designs_sec_and_hacked.dm
+++ b/code/modules/research/designs/autolathe_desings/autolathe_designs_sec_and_hacked.dm
@@ -74,12 +74,12 @@
build_path = /obj/item/restraints/handcuffs
category = list("hacked", "Security")
-/datum/design/rifle_receiver
- name = "Rifle Receiver"
- id = "rifle_receiver"
+/datum/design/reciever
+ name = "Modular Receiver"
+ id = "modular_receiver"
build_type = AUTOLATHE
materials = list(/datum/material/iron = 24000)
- build_path = /obj/item/weaponcrafting/improvised_parts/rifle_receiver
+ build_path = /obj/item/weaponcrafting/receiver
category = list("hacked", "Security")
/datum/design/shotgun_slug
diff --git a/code/modules/research/designs/autolathe_desings/autolathe_designs_tcomms_and_misc.dm b/code/modules/research/designs/autolathe_desings/autolathe_designs_tcomms_and_misc.dm
index 539232bbcd..1b1c710e8c 100644
--- a/code/modules/research/designs/autolathe_desings/autolathe_designs_tcomms_and_misc.dm
+++ b/code/modules/research/designs/autolathe_desings/autolathe_designs_tcomms_and_misc.dm
@@ -282,10 +282,3 @@
build_path = /obj/item/vending_refill/custom
category = list("initial", "Misc")
-/datum/design/trigger_assembly
- name = "Trigger Assembly"
- id = "trigger_assembly"
- build_type = AUTOLATHE
- materials = list(/datum/material/iron = 6500, /datum/material/glass = 50)
- build_path = /obj/item/weaponcrafting/improvised_parts/trigger_assembly
- category = list("initial", "Misc")
diff --git a/code/modules/research/designs/machine_desings/machine_designs_engi.dm b/code/modules/research/designs/machine_desings/machine_designs_engi.dm
index 8908241b83..ca522d2ce1 100644
--- a/code/modules/research/designs/machine_desings/machine_designs_engi.dm
+++ b/code/modules/research/designs/machine_desings/machine_designs_engi.dm
@@ -111,4 +111,4 @@
id = "spaceship_navigation_beacon"
build_path = /obj/item/circuitboard/machine/spaceship_navigation_beacon
category = list ("Teleportation Machinery")
- departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
\ No newline at end of file
+ departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm
index 1fc61c9bed..9879171e71 100644
--- a/code/modules/research/designs/medical_designs.dm
+++ b/code/modules/research/designs/medical_designs.dm
@@ -308,7 +308,7 @@
materials = list(/datum/material/iron = 16000, /datum/material/glass = 18000, /datum/material/gold = 6000, /datum/material/silver = 6000)
build_path = /obj/item/disk/medical/defib_heal
construction_time = 10
- category = list("Misc")
+ category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
/datum/design/defib_shock
@@ -319,7 +319,7 @@
materials = list(/datum/material/iron = 16000, /datum/material/glass = 18000, /datum/material/gold = 6000, /datum/material/silver = 6000)
build_path = /obj/item/disk/medical/defib_shock
construction_time = 10
- category = list("Misc")
+ category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
/datum/design/defib_decay
@@ -330,7 +330,7 @@
materials = list(/datum/material/iron = 16000, /datum/material/glass = 18000, /datum/material/gold = 16000, /datum/material/silver = 6000, /datum/material/titanium = 2000)
build_path = /obj/item/disk/medical/defib_decay
construction_time = 10
- category = list("Misc")
+ category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
/datum/design/defib_speed
@@ -341,7 +341,7 @@
build_path = /obj/item/disk/medical/defib_speed
materials = list(/datum/material/iron = 16000, /datum/material/glass = 8000, /datum/material/gold = 26000, /datum/material/silver = 26000)
construction_time = 10
- category = list("Misc")
+ category = list("Medical Designs")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
/datum/design/defibrillator_compact
diff --git a/code/modules/research/designs/misc_designs.dm b/code/modules/research/designs/misc_designs.dm
index a54fe857e9..7dfe19f635 100644
--- a/code/modules/research/designs/misc_designs.dm
+++ b/code/modules/research/designs/misc_designs.dm
@@ -481,7 +481,7 @@
build_path = /obj/item/holosign_creator/atmos
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
-
+/*
/datum/design/holosignfirelock
name = "ATMOS Holofirelock Projector"
desc = "A holographic projector that creates holographic barriers that prevent changes in temperature conditions."
@@ -491,7 +491,7 @@
build_path = /obj/item/holosign_creator/firelock
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
-
+*/
/datum/design/holosigncombifan
name = "ATMOS Holo-Combifan Projector"
desc = "A holographic projector that creates holographic barriers that prevent changes in atmospheric and temperature conditions."
diff --git a/code/modules/research/techweb/nodes/misc_nodes.dm b/code/modules/research/techweb/nodes/misc_nodes.dm
index 1bdc144232..94a19924b8 100644
--- a/code/modules/research/techweb/nodes/misc_nodes.dm
+++ b/code/modules/research/techweb/nodes/misc_nodes.dm
@@ -38,7 +38,7 @@
display_name = "Electromagnetic Theory"
description = "Study into usage of frequencies in the electromagnetic spectrum."
prereq_ids = list("base")
- design_ids = list("holosign", "holosignsec", "holosignengi", "holosignatmos", "holosignfirelock", "inducer", "tray_goggles", "holopad")
+ design_ids = list("holosign", "holosignsec", "holosignengi", "holosignatmos",/* "holosignfirelock",*/ "inducer", "tray_goggles", "holopad")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
/datum/techweb_node/emp_adv
@@ -75,15 +75,14 @@
prereq_ids = list("base")
design_ids = list("sticky_tape")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
- hidden = TRUE
- experimental = TRUE
+ starting_node = TRUE
-// Can be researched after getting the basic sticky technology from the BEPIS major reward
+// now a BEPIS locked thing
/datum/techweb_node/sticky_advanced
id = "sticky_advanced"
display_name = "Advanced Sticky Technology"
description = "Taking a good joke too far? Nonsense!"
- prereq_ids = list("sticky_basic")
design_ids = list("super_sticky_tape", "pointy_tape")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000)
hidden = TRUE
+ experimental = TRUE
diff --git a/code/modules/ruins/objects_and_mobs/necropolis_gate.dm b/code/modules/ruins/objects_and_mobs/necropolis_gate.dm
index fd2f4377e7..5f9b810070 100644
--- a/code/modules/ruins/objects_and_mobs/necropolis_gate.dm
+++ b/code/modules/ruins/objects_and_mobs/necropolis_gate.dm
@@ -274,6 +274,7 @@ GLOBAL_DATUM(necropolis_gate, /obj/structure/necropolis_gate/legion_gate)
return
/obj/structure/stone_tile/Crossed(atom/movable/AM)
+ . = ..()
if(falling || fallen)
return
var/turf/T = get_turf(src)
diff --git a/code/modules/ruins/objects_and_mobs/sin_ruins.dm b/code/modules/ruins/objects_and_mobs/sin_ruins.dm
index e87382cd6a..5e2fc3d7e4 100644
--- a/code/modules/ruins/objects_and_mobs/sin_ruins.dm
+++ b/code/modules/ruins/objects_and_mobs/sin_ruins.dm
@@ -136,10 +136,13 @@
return
if(ishuman(AM))
var/mob/living/carbon/human/H = AM
- if(user.real_name != H.dna.real_name)
- user.real_name = H.dna.real_name
- H.dna.transfer_identity(user, transfer_SE=1)
- user.updateappearance(mutcolor_update=1)
- user.domutcheck()
- user.visible_message("[user]'s appearance shifts into [H]'s! ", \
- "[H.p_they(TRUE)] think[H.p_s()] [H.p_theyre()] sooo much better than you. Not anymore, [H.p_they()] won't. ")
+ if(!(NOTRANSSTING in H.dna.species.species_traits))
+ if(user.real_name != H.dna.real_name)
+ user.real_name = H.dna.real_name
+ H.dna.transfer_identity(user, transfer_SE=1)
+ user.updateappearance(mutcolor_update=1)
+ user.domutcheck()
+ user.visible_message("[user]'s appearance shifts into [H]'s! ", \
+ "[H.p_they(TRUE)] think[H.p_s()] [H.p_theyre()] sooo much better than you. Not anymore, [H.p_they()] won't. ")
+ else
+ to_chat(user, "You are unable to transform into [H]! ")
diff --git a/code/modules/ruins/spaceruin_code/hilbertshotel.dm b/code/modules/ruins/spaceruin_code/hilbertshotel.dm
index 4859fcfca0..33c4a70634 100644
--- a/code/modules/ruins/spaceruin_code/hilbertshotel.dm
+++ b/code/modules/ruins/spaceruin_code/hilbertshotel.dm
@@ -21,6 +21,9 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337)
/obj/item/hilbertshotel/Initialize()
. = ..()
//Load templates
+ INVOKE_ASYNC(src, .proc/prepare_rooms)
+
+/obj/item/hilbertshotel/proc/prepare_rooms()
hotelRoomTemp = new()
hotelRoomTempEmpty = new()
hotelRoomTempLore = new()
diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm
index 03ff509086..c8ecbf1906 100644
--- a/code/modules/shuttle/shuttle.dm
+++ b/code/modules/shuttle/shuttle.dm
@@ -807,7 +807,7 @@
for(var/mob/M in SSmobs.clients_by_zlevel[z])
var/dist_far = get_dist(M, distant_source)
if(dist_far <= long_range && dist_far > range)
- M.playsound_local(distant_source, "sound/effects/[selected_sound]_distance.ogg", 100, falloff = 20)
+ M.playsound_local(distant_source, "sound/effects/[selected_sound]_distance.ogg", 100)
else if(dist_far <= range)
var/source
if(engine_list.len == 0)
@@ -819,7 +819,7 @@
if(dist_near < closest_dist)
source = O
closest_dist = dist_near
- M.playsound_local(source, "sound/effects/[selected_sound].ogg", 100, falloff = range / 2)
+ M.playsound_local(source, "sound/effects/[selected_sound].ogg", 100)
// Losing all initial engines should get you 2
// Adding another set of engines at 0.5 time
diff --git a/code/modules/shuttle/spaceship_navigation_beacon.dm b/code/modules/shuttle/spaceship_navigation_beacon.dm
index f1861e0477..e389b32a94 100644
--- a/code/modules/shuttle/spaceship_navigation_beacon.dm
+++ b/code/modules/shuttle/spaceship_navigation_beacon.dm
@@ -60,4 +60,4 @@ obj/machinery/spaceship_navigation_beacon/emp_act()
if(default_deconstruction_crowbar(W))
return
- return ..()
\ No newline at end of file
+ return ..()
diff --git a/code/modules/spells/spell_types/spacetime_distortion.dm b/code/modules/spells/spell_types/spacetime_distortion.dm
index 5797cbf8b7..5a8776b16b 100644
--- a/code/modules/spells/spell_types/spacetime_distortion.dm
+++ b/code/modules/spells/spell_types/spacetime_distortion.dm
@@ -1,6 +1,6 @@
/obj/effect/proc_holder/spell/spacetime_dist
name = "Spacetime Distortion"
- desc = "Entangle the strings of spacetime to deny easy movement around you. The strings vibrate..."
+ desc = "Entangle the strings of space-time in an area around you, randomizing the layout and making proper movement impossible. The strings vibrate..."
charge_max = 300
var/duration = 150
range = 7
@@ -10,8 +10,9 @@
sound = 'sound/effects/magic.ogg'
cooldown_min = 300
level_max = 0
+ // action_icon_state = "spacetime"
-/obj/effect/proc_holder/spell/spacetime_dist/can_cast(mob/user = usr, skipcharge = FALSE, silent = FALSE)
+/obj/effect/proc_holder/spell/spacetime_dist/can_cast(mob/user = usr)
if(ready)
return ..()
return FALSE
@@ -97,10 +98,11 @@
busy = TRUE
flick("purplesparkles", src)
AM.forceMove(get_turf(src))
- playsound(get_turf(src),sound,70,0)
+ playsound(get_turf(src),sound,70,FALSE)
busy = FALSE
/obj/effect/cross_action/spacetime_dist/Crossed(atom/movable/AM)
+ . = ..()
if(!busy)
walk_link(AM)
@@ -110,7 +112,8 @@
else
walk_link(user)
-/obj/effect/cross_action/spacetime_dist/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
+//ATTACK HAND IGNORING PARENT RETURN VALUE
+/obj/effect/cross_action/spacetime_dist/on_attack_hand(mob/user)
walk_link(user)
/obj/effect/cross_action/spacetime_dist/attack_paw(mob/user)
diff --git a/code/modules/spells/spell_types/togglebuff.dm b/code/modules/spells/spell_types/togglebuff.dm
new file mode 100644
index 0000000000..4b8f3d02e1
--- /dev/null
+++ b/code/modules/spells/spell_types/togglebuff.dm
@@ -0,0 +1,39 @@
+/obj/effect/proc_holder/spell/self/mantra
+ name = "Inner Mantra"
+ desc = "Control your Inner Mantra, gaining strength and durability for a cost."
+ clothes_req = NONE
+ mobs_whitelist = list(/mob/living/carbon/human)
+ charge_max = 100
+ antimagic_allowed = TRUE
+ invocation = "SU'UP'AH S'EI YEN"
+ invocation_type = "shout"
+ level_max = 0
+ cooldown_min = 100
+ action_icon = 'icons/obj/magic.dmi'
+ action_icon_state = "iconmantra"
+
+/obj/effect/proc_holder/spell/self/mantra/cast(mob/living/carbon/human/user)
+ if(user.has_status_effect(STATUS_EFFECT_MANTRA))
+ user.remove_status_effect(STATUS_EFFECT_MANTRA)
+ else
+ user.apply_status_effect(STATUS_EFFECT_MANTRA)
+
+/obj/effect/proc_holder/spell/self/asura
+ name = "Asura's Wrath"
+ desc = "Unleash your rage as corrosive power fills your muscles."
+ clothes_req = NONE
+ mobs_whitelist = list(/mob/living/carbon/human)
+ charge_max = 100
+ antimagic_allowed = TRUE
+ invocation = "KYE Y'O'KEN"
+ invocation_type = "shout"
+ level_max = 0
+ cooldown_min = 100
+ action_icon = 'icons/obj/magic.dmi'
+ action_icon_state = "iconasura"
+
+/obj/effect/proc_holder/spell/self/asura/cast(mob/living/carbon/human/user)
+ if(user.has_status_effect(STATUS_EFFECT_ASURA))
+ user.remove_status_effect(STATUS_EFFECT_ASURA)
+ else
+ user.apply_status_effect(STATUS_EFFECT_ASURA)
diff --git a/code/modules/surgery/bodyparts/_bodyparts.dm b/code/modules/surgery/bodyparts/_bodyparts.dm
index 2ca7d07e73..962bc8c1ce 100644
--- a/code/modules/surgery/bodyparts/_bodyparts.dm
+++ b/code/modules/surgery/bodyparts/_bodyparts.dm
@@ -297,6 +297,7 @@
owner.update_stamina()
consider_processing()
update_disabled()
+ update_threshhold_state()
return update_bodypart_damage_state()
/// Allows us to roll for and apply a wound without actually dealing damage. Used for aggregate wounding power with pellet clouds
@@ -475,6 +476,7 @@
owner.updatehealth()
consider_processing()
update_disabled()
+ update_threshhold_state()
return update_bodypart_damage_state()
//Returns total damage.
diff --git a/code/modules/surgery/emergency_reboot.dm b/code/modules/surgery/emergency_reboot.dm
new file mode 100644
index 0000000000..046edd884c
--- /dev/null
+++ b/code/modules/surgery/emergency_reboot.dm
@@ -0,0 +1,62 @@
+//Emergency Reboot: A surgery that allows for revival of Synthetics without the need for a defib. Doesn't all all the organs like the Revival surgery though.
+
+/datum/surgery/emergency_reboot
+ name = "Emergency Reboot"
+ desc = "A surgery forcing the posibrain of a robot to begin it's reboot procedure, if their body can sustain its operation."
+ possible_locs = list(BODY_ZONE_HEAD)
+ requires_bodypart_type = BODYPART_ROBOTIC //If you are a Synth with a organic head (somehow), this won't work.
+ steps = list(/datum/surgery_step/mechanic_open, /datum/surgery_step/open_hatch, /datum/surgery_step/mechanic_unwrench, /datum/surgery_step/force_reboot, /datum/surgery_step/mechanic_wrench, /datum/surgery_step/mechanic_close)
+
+/datum/surgery/emergency_reboot/can_start(mob/user, mob/living/carbon/target, obj/item/tool)
+ if(!..())
+ return FALSE
+ if(target.stat != DEAD)
+ return FALSE
+ if(target.suiciding || HAS_TRAIT(target, TRAIT_NOCLONE) || target.hellbound)
+ return FALSE
+ if(!HAS_TRAIT(target, TRAIT_ROBOTIC_ORGANISM))
+ return FALSE
+ var/obj/item/organ/brain/B = target.getorganslot(ORGAN_SLOT_BRAIN)
+ if(!B || !istype(B, /obj/item/organ/brain/ipc))
+ return FALSE
+ return TRUE
+
+/datum/surgery_step/force_reboot
+ name = "initiate system reboot"
+ implements = list(TOOL_MULTITOOL = 100, /obj/item/borg/upgrade/restart = 100)
+ time = 100
+
+/datum/surgery_step/force_reboot/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
+ display_results(user, target, "You prepare to begin rebooting [target]'s posibrain. ",
+ "[user] prepares to reboot [target]'s posibrain with [tool].",
+ "[user] prepares to reboot [target]'s posibrain with [tool].")
+ target.notify_ghost_cloning("Someone is trying to reboot you! Re-enter your corpse if you want to be revived!", source = target)
+
+/datum/surgery_step/force_reboot/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
+ display_results(user, target, "You successfully initiate a reboot in [target]'s posibrain... ",
+ "[user] initiates a reboot in [target]'s posibrain...",
+ "[user] initiates a reboot in [target]'s posibrain...")
+ target.adjustOxyLoss(-50, 0)
+ target.updatehealth()
+ var/tplus = world.time - target.timeofdeath
+ if(target.revive())
+ target.visible_message("...[target]'s posibrain flickers to life once again!")
+ target.emote("ping")
+ var/list/policies = CONFIG_GET(keyed_list/policyconfig)
+ var/timelimit = CONFIG_GET(number/defib_cmd_time_limit) * 10 //the config is in seconds, not deciseconds
+ var/late = timelimit && (tplus > timelimit)
+ var/policy = late? policies[POLICYCONFIG_ON_DEFIB_LATE] : policies[POLICYCONFIG_ON_DEFIB_INTACT]
+ if(policy)
+ to_chat(target, policy)
+ target.log_message("revived using surgical revival, [tplus] deciseconds from time of death, considered [late? "late" : "memory-intact"] revival under configured policy limits.", LOG_GAME)
+ return TRUE
+ else
+ target.visible_message("...[target]'s posibrain flickers a few times, before the lights fade yet again...")
+ return FALSE
+
+/datum/surgery_step/force_reboot/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
+ display_results(user, target, "You attempt to reboot [target]'s posibrain, but [target.p_they()] doesn't react. ",
+ "[user] attempts to reboot [target]'s posibrain, but [target.p_they()] doesn't react.",
+ "[user] attempts to reboot [target]'s posibrain, but [target.p_they()] doesn't react")
+ target.adjustOrganLoss(ORGAN_SLOT_BRAIN, 15, 199)
+ return FALSE
diff --git a/code/modules/surgery/limb_augmentation.dm b/code/modules/surgery/limb_augmentation.dm
index 059a5aaa34..c65f5f11f6 100644
--- a/code/modules/surgery/limb_augmentation.dm
+++ b/code/modules/surgery/limb_augmentation.dm
@@ -31,6 +31,12 @@
target_mobtypes = list(/mob/living/carbon/human)
possible_locs = list(BODY_ZONE_R_ARM,BODY_ZONE_L_ARM,BODY_ZONE_R_LEG,BODY_ZONE_L_LEG,BODY_ZONE_CHEST,BODY_ZONE_HEAD)
requires_real_bodypart = TRUE
+
+//The augmentation surgery for synthetic limbs
+/datum/surgery/augmentation/synth
+ requires_bodypart_type = BODYPART_HYBRID
+ steps = list(/datum/surgery_step/mechanic_open, /datum/surgery_step/pry_off_plating, /datum/surgery_step/cut_wires, /datum/surgery_step/prepare_electronics, /datum/surgery_step/replace_limb)
+
//SURGERY STEP SUCCESSES
/datum/surgery_step/replace_limb/success(mob/user, mob/living/carbon/target, target_zone, obj/item/bodypart/tool, datum/surgery/surgery)
if(L)
diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm
index b6b74efe32..47b504c86e 100644
--- a/code/modules/surgery/organs/vocal_cords.dm
+++ b/code/modules/surgery/organs/vocal_cords.dm
@@ -1319,7 +1319,7 @@
if(E.phase > 1)
if(user.ckey == E.enthrallID && user.real_name == E.master.real_name)
E.master = user
- addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, H, "[(E.lewd?"You hear the words of your [E.enthrallGender] again!! They're back!!":"You recognise the voice of [E.master].")] "), 5)
+ to_chat(H, "[(E.lewd?"You hear the words of your [E.enthrallGender] again!! They're back!!":"You recognise the voice of [E.master].")] ")
to_chat(user, "[H] looks at you with sparkling eyes, recognising you! ")
//I dunno how to do state objectives without them revealing they're an antag
diff --git a/code/modules/surgery/remove_embedded_object.dm b/code/modules/surgery/remove_embedded_object.dm
index f974c39bb4..dfdb1f7eca 100644
--- a/code/modules/surgery/remove_embedded_object.dm
+++ b/code/modules/surgery/remove_embedded_object.dm
@@ -2,11 +2,17 @@
name = "removal of embedded objects"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/remove_object)
possible_locs = list(BODY_ZONE_R_ARM,BODY_ZONE_L_ARM,BODY_ZONE_R_LEG,BODY_ZONE_L_LEG,BODY_ZONE_CHEST,BODY_ZONE_HEAD)
+
+/datum/surgery/embedded_removal/robot
+ requires_bodypart_type = BODYPART_ROBOTIC
+ steps = list(/datum/surgery_step/mechanic_open, /datum/surgery_step/open_hatch, /datum/surgery_step/remove_object)
+
/datum/surgery_step/remove_object
name = "remove embedded objects"
time = 32
accept_hand = 1
var/obj/item/bodypart/L = null
+
/datum/surgery_step/remove_object/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
L = surgery.operated_bodypart
if(L)
diff --git a/code/modules/unit_tests/README.md b/code/modules/unit_tests/README.md
new file mode 100644
index 0000000000..420c805fbf
--- /dev/null
+++ b/code/modules/unit_tests/README.md
@@ -0,0 +1,70 @@
+# Unit Tests
+
+## What is unit testing?
+
+Unit tests are automated code to verify that parts of the game work exactly as they should. For example, [a test to make sure that the amputation surgery actually amputates the limb](https://github.com/tgstation/tgstation/blob/e416283f162b86345a8623125ab866839b1ac40d/code/modules/unit_tests/surgeries.dm#L1-L13). These are ran every time a PR is made, and thus are very helpful for preventing bugs from cropping up in your code that would've otherwise gone unnoticed. For example, would you have thought to check [that beach boys would still work the same after editing pizza](https://github.com/tgstation/tgstation/pull/53641#issuecomment-691384934)? If you value your time, probably not.
+
+On their most basic level, when `UNIT_TESTS` is defined, all subtypes of `/datum/unit_test` will have their `Run` proc executed. From here, if `Fail` is called at any point, then the tests will report as failed.
+
+## How do I write one?
+1. Find a relevant file.
+
+All unit test related code is in `code/modules/unit_tests`. If you are adding a new test for a surgery, for example, then you'd open `surgeries.dm`. If a relevant file does not exist, simply create one in this folder, then `#include` it in `_unit_tests.dm`.
+
+2. Create the unit test.
+
+To make a new unit test, you simply need to define a `/datum/unit_test`.
+
+For example, let's suppose that we are creating a test to make sure a proc `square` correctly raises inputs to the power of two. We'd start with first:
+
+```
+/datum/unit_test/square/Run()
+```
+
+This defines our new unit test, `/datum/unit_test/square`. Inside this function, we're then going to run through whatever we want to check. Tests provide a few assertion functions to make this easy. For now, we're going to use `TEST_ASSERT_EQUAL`.
+
+```
+/datum/unit_test/square/Run()
+ TEST_ASSERT_EQUAL(square(3), 9, "square(3) did not return 9")
+ TEST_ASSERT_EQUAL(square(4), 16, "square(4) did not return 16")
+```
+
+As you can hopefully tell, we're simply checking if the output of `square` matches the output we are expecting. If the test fails, it'll report the error message given as well as whatever the actual output was.
+
+3. Run the unit test
+
+Open `code/_compile_options.dm` and uncomment the following line.
+
+```
+//#define UNIT_TESTS //If this is uncommented, we do a single run though of the game setup and tear down process with unit tests in between
+```
+
+Then, run tgstation.dmb in Dream Daemon. Don't bother trying to connect, you won't need to. You'll be able to see the outputs of all the tests. You'll get to see which tests failed and for what reason. If they all pass, you're set!
+
+## How to think about tests
+
+Unit tests exist to prevent bugs that would happen in a real game. Thus, they should attempt to emulate the game world wherever possible. For example, the [quick swap sanity test](https://github.com/tgstation/tgstation/blob/e416283f162b86345a8623125ab866839b1ac40d/code/modules/unit_tests/quick_swap_sanity.dm) emulates a *real* scenario of the bug it fixed occurring by creating a character and giving it real items. The unrecommended alternative would be to create special test-only items. This isn't a hard rule, the [reagent method exposure tests](https://github.com/tgstation/tgstation/blob/e416283f162b86345a8623125ab866839b1ac40d/code/modules/unit_tests/reagent_mod_expose.dm) create a test-only reagent for example, but do keep it in mind.
+
+Unit tests should also be just that--testing *units* of code. For example, instead of having one massive test for reagents, there are instead several smaller tests for testing exposure, metabolization, etc.
+
+## The unit testing API
+
+You can find more information about all of these from their respective doc comments, but for a brief overview:
+
+`/datum/unit_test` - The base for all tests to be ran. Subtypes must override `Run()`. `New()` and `Destroy()` can be used for setup and teardown. To fail, use `Fail(reason)`.
+
+`/datum/unit_test/proc/allocate(type, ...)` - Allocates an instance of the provided type with the given arguments. Is automatically destroyed when the test is over. Commonly seen in the form of `var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human)`.
+
+`TEST_ASSERT(assertion, reason)` - Stops the unit test and fails if the assertion is not met. For example: `TEST_ASSERT(powered(), "Machine is not powered")`.
+
+`TEST_ASSERT_EQUAL(a, b, message)` - Same as `TEST_ASSERT`, but checks if `a == b`. If not, gives a helpful message showing what both `a` and `b` were. For example: `TEST_ASSERT_EQUAL(2 + 2, 4, "The universe is falling apart before our eyes!")`.
+
+`TEST_ASSERT_NOTEQUAL(a, b, message)` - Same as `TEST_ASSERT_EQUAL`, but reversed.
+
+`TEST_FOCUS(test_path)` - *Only* run the test provided within the parameters. Useful for reducing noise. For example, if we only want to run our example square test, we can add `TEST_FOCUS(/datum/unit_test/square)`. Should *never* be pushed in a pull request--you will be laughed at.
+
+## Final Notes
+
+- Writing tests before you attempt to fix the bug can actually speed up development a lot! It means you don't have to go in game and folllow the same exact steps manually every time. This process is known as "TDD" (test driven development). Write the test first, make sure it fails, *then* start work on the fix/feature, and you'll know you're done when your tests pass. If you do try this, do make sure to confirm in a non-testing environment just to double check.
+- Make sure that your tests don't accidentally call RNG functions like `prob`. Since RNG is seeded during tests, you may not realize you have until someone else makes a PR and the tests fail!
+- Do your best not to change the behavior of non-testing code during tests. While it may sometimes be necessary in the case of situations such as the above, it is still a slippery slope that can lead to the code you're testing being too different from the production environment to be useful.
diff --git a/code/modules/unit_tests/_unit_tests.dm b/code/modules/unit_tests/_unit_tests.dm
index 37fa35946c..2745d971ff 100644
--- a/code/modules/unit_tests/_unit_tests.dm
+++ b/code/modules/unit_tests/_unit_tests.dm
@@ -1,42 +1,80 @@
//include unit test files in this module in this ifdef
//Keep this sorted alphabetically
-#ifdef UNIT_TESTS
+#if defined(UNIT_TESTS) || defined(SPACEMAN_DMM)
+
/// Asserts that a condition is true
/// If the condition is not true, fails the test
#define TEST_ASSERT(assertion, reason) if (!(assertion)) { return Fail("Assertion failed: [reason || "No reason"]") }
/// Asserts that the two parameters passed are equal, fails otherwise
/// Optionally allows an additional message in the case of a failure
-#define TEST_ASSERT_EQUAL(a, b, message) if ((a) != (b)) { return Fail("Expected [isnull(a) ? "null" : a] to be equal to [isnull(b) ? "null" : b].[message ? " [message]" : ""]") }
+#define TEST_ASSERT_EQUAL(a, b, message) do { \
+ var/lhs = ##a; \
+ var/rhs = ##b; \
+ if (lhs != rhs) { \
+ return Fail("Expected [isnull(lhs) ? "null" : lhs] to be equal to [isnull(rhs) ? "null" : rhs].[message ? " [message]" : ""]"); \
+ } \
+} while (FALSE)
+
+/// Asserts that the two parameters passed are not equal, fails otherwise
+/// Optionally allows an additional message in the case of a failure
+#define TEST_ASSERT_NOTEQUAL(a, b, message) do { \
+ var/lhs = ##a; \
+ var/rhs = ##b; \
+ if (lhs == rhs) { \
+ return Fail("Expected [isnull(lhs) ? "null" : lhs] to not be equal to [isnull(rhs) ? "null" : rhs].[message ? " [message]" : ""]"); \
+ } \
+} while (FALSE)
+
+/// *Only* run the test provided within the parentheses
+/// This is useful for debugging when you want to reduce noise, but should never be pushed
+/// Intended to be used in the manner of `TEST_FOCUS(/datum/unit_test/math)`
+#define TEST_FOCUS(test_path) ##test_path { focus = TRUE; }
#include "anchored_mobs.dm"
#include "bespoke_id.dm"
-// #include "binary_insert.dm"
-// #include "card_mismatch.dm" shame we don't have this!
+#include "binary_insert.dm"
+// #include "card_mismatch.dm"
#include "chain_pull_through_space.dm"
-#include "character_saving.dm"
+// #include "combat.dm"
#include "component_tests.dm"
// #include "confusion.dm"
-// #include "keybinding_init.dm"
+// #include "emoting.dm"
+// #include "heretic_knowledge.dm"
+// #include "holidays.dm"
+#include "initialize_sanity.dm"
+#include "keybinding_init.dm"
#include "machine_disassembly.dm"
#include "medical_wounds.dm"
+#include "merge_type.dm"
// #include "metabolizing.dm"
// #include "outfit_sanity.dm"
+// #include "pills.dm"
// #include "plantgrowth_tests.dm"
-// #include "quick_swap_sanity.dm" - we don't have quick swap yet
+// #include "projectiles.dm"
#include "reagent_id_typos.dm"
+// #include "reagent_mod_expose.dm"
+// #include "reagent_mod_procs.dm"
#include "reagent_recipe_collisions.dm"
#include "resist.dm"
-// #include "say.dm" //no saymods, someone update saycode please.
+// #include "say.dm"
+// #include "serving_tray.dm"
// #include "siunit.dm"
#include "spawn_humans.dm"
// #include "species_whitelists.dm"
+// #include "stomach.dm"
#include "subsystem_init.dm"
-// #include "surgeries.dm" // fails at random due to a race condition, commented out for now
+#include "surgeries.dm"
+#include "teleporters.dm"
#include "timer_sanity.dm"
#include "unit_test.dm"
+/// CIT TESTS
+#include "character_saving.dm"
+
#undef TEST_ASSERT
#undef TEST_ASSERT_EQUAL
+#undef TEST_ASSERT_NOTEQUAL
+#undef TEST_FOCUS
#endif
diff --git a/code/modules/unit_tests/card_mismatch.dm b/code/modules/unit_tests/card_mismatch.dm
new file mode 100644
index 0000000000..506e88f19c
--- /dev/null
+++ b/code/modules/unit_tests/card_mismatch.dm
@@ -0,0 +1,7 @@
+/datum/unit_test/card_mismatch
+
+/datum/unit_test/card_mismatch/Run()
+ var/message = checkCardpacks(SStrading_card_game.card_packs)
+ message += checkCardDatums()
+ if(message)
+ Fail(message)
diff --git a/code/modules/unit_tests/combat.dm b/code/modules/unit_tests/combat.dm
new file mode 100644
index 0000000000..30bad72175
--- /dev/null
+++ b/code/modules/unit_tests/combat.dm
@@ -0,0 +1,98 @@
+/datum/unit_test/harm_punch/Run()
+ var/mob/living/carbon/human/puncher = allocate(/mob/living/carbon/human)
+ var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human)
+
+ // Avoid all randomness in tests
+ ADD_TRAIT(puncher, TRAIT_PERFECT_ATTACKER, INNATE_TRAIT)
+
+ puncher.a_intent_change(INTENT_HARM)
+ victim.attack_hand(puncher)
+
+ TEST_ASSERT(victim.getBruteLoss() > 0, "Victim took no brute damage after being punched")
+
+/datum/unit_test/harm_melee/Run()
+ var/mob/living/carbon/human/tider = allocate(/mob/living/carbon/human)
+ var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human)
+ var/obj/item/storage/toolbox/toolbox = allocate(/obj/item/storage/toolbox)
+
+ tider.put_in_active_hand(toolbox, forced = TRUE)
+ tider.a_intent_change(INTENT_HARM)
+ victim.attackby(toolbox, tider)
+
+ TEST_ASSERT(victim.getBruteLoss() > 0, "Victim took no brute damage after being hit by a toolbox")
+
+/datum/unit_test/harm_different_damage/Run()
+ var/mob/living/carbon/human/attacker = allocate(/mob/living/carbon/human)
+ var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human)
+ var/obj/item/weldingtool/welding_tool = allocate(/obj/item/weldingtool)
+
+ attacker.put_in_active_hand(welding_tool, forced = TRUE)
+ attacker.a_intent_change(INTENT_HARM)
+ welding_tool.attack_self(attacker) // Turn it on
+ victim.attackby(welding_tool, attacker)
+
+ TEST_ASSERT_EQUAL(victim.getBruteLoss(), 0, "Victim took brute damage from a lit welding tool")
+ TEST_ASSERT(victim.getFireLoss() > 0, "Victim took no burn damage after being hit by a lit welding tool")
+
+/datum/unit_test/attack_chain
+ var/attack_hit
+ var/post_attack_hit
+ var/pre_attack_hit
+
+/datum/unit_test/attack_chain/proc/attack_hit()
+ attack_hit = TRUE
+
+/datum/unit_test/attack_chain/proc/post_attack_hit()
+ post_attack_hit = TRUE
+
+/datum/unit_test/attack_chain/proc/pre_attack_hit()
+ pre_attack_hit = TRUE
+
+/datum/unit_test/attack_chain/Run()
+ var/mob/living/carbon/human/attacker = allocate(/mob/living/carbon/human)
+ var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human)
+ var/obj/item/storage/toolbox/toolbox = allocate(/obj/item/storage/toolbox)
+
+ RegisterSignal(toolbox, COMSIG_ITEM_PRE_ATTACK, .proc/pre_attack_hit)
+ RegisterSignal(toolbox, COMSIG_ITEM_ATTACK, .proc/attack_hit)
+ RegisterSignal(toolbox, COMSIG_ITEM_AFTERATTACK, .proc/post_attack_hit)
+
+ attacker.put_in_active_hand(toolbox, forced = TRUE)
+ attacker.a_intent_change(INTENT_HARM)
+ toolbox.melee_attack_chain(attacker, victim)
+
+ TEST_ASSERT(pre_attack_hit, "Pre-attack signal was not fired")
+ TEST_ASSERT(attack_hit, "Attack signal was not fired")
+ TEST_ASSERT(post_attack_hit, "Post-attack signal was not fired")
+
+/datum/unit_test/disarm/Run()
+ var/mob/living/carbon/human/attacker = allocate(/mob/living/carbon/human)
+ var/mob/living/carbon/human/victim = allocate(/mob/living/carbon/human)
+ var/obj/item/storage/toolbox/toolbox = allocate(/obj/item/storage/toolbox)
+
+ victim.put_in_active_hand(toolbox, forced = TRUE)
+ attacker.a_intent_change(INTENT_DISARM)
+
+ var/obj/structure/barricade/dense_object = allocate(/obj/structure/barricade)
+
+ // Attacker --> Victim --> Empty space --> Wall
+ attacker.forceMove(run_loc_bottom_left)
+ victim.forceMove(locate(run_loc_bottom_left.x + 1, run_loc_bottom_left.y, run_loc_bottom_left.z))
+ dense_object.forceMove(locate(run_loc_bottom_left.x + 3, run_loc_bottom_left.y, run_loc_bottom_left.z))
+
+ // First disarm, world should now look like:
+ // Attacker --> Empty space --> Victim --> Wall
+ victim.attack_hand(attacker)
+
+ TEST_ASSERT_EQUAL(victim.loc.x, run_loc_bottom_left.x + 2, "Victim wasn't moved back after being pushed")
+ TEST_ASSERT(!victim.has_status_effect(STATUS_EFFECT_KNOCKDOWN), "Victim was knocked down despite not being against a wall")
+ TEST_ASSERT_EQUAL(victim.get_active_held_item(), toolbox, "Victim dropped toolbox despite not being against a wall")
+
+ attacker.forceMove(get_step(attacker, EAST))
+
+ // Second disarm, victim was against wall and should be down
+ victim.attack_hand(attacker)
+
+ TEST_ASSERT_EQUAL(victim.loc.x, run_loc_bottom_left.x + 2, "Victim was moved after being pushed against a wall")
+ TEST_ASSERT(victim.has_status_effect(STATUS_EFFECT_KNOCKDOWN), "Victim was not knocked down after being pushed against a wall")
+ TEST_ASSERT_EQUAL(victim.get_active_held_item(), null, "Victim didn't drop toolbox after being pushed against a wall")
diff --git a/code/modules/unit_tests/confusion.dm b/code/modules/unit_tests/confusion.dm
new file mode 100644
index 0000000000..8282493c96
--- /dev/null
+++ b/code/modules/unit_tests/confusion.dm
@@ -0,0 +1,16 @@
+// Checks that the confusion symptom correctly gives, and removes, confusion
+/datum/unit_test/confusion_symptom/Run()
+ var/mob/living/carbon/human/H = allocate(/mob/living/carbon/human)
+ var/datum/disease/advance/confusion/disease = allocate(/datum/disease/advance/confusion)
+ var/datum/symptom/confusion/confusion = disease.symptoms[1]
+ disease.processing = TRUE
+ disease.update_stage(5)
+ disease.infect(H, make_copy = FALSE)
+ confusion.Activate(disease)
+ TEST_ASSERT(H.get_confusion() > 0, "Human is not confused after getting symptom.")
+ disease.cure()
+ TEST_ASSERT_EQUAL(H.get_confusion(), 0, "Human is still confused after curing confusion.")
+
+/datum/disease/advance/confusion/New()
+ symptoms += new /datum/symptom/confusion
+ Refresh()
diff --git a/code/modules/unit_tests/emoting.dm b/code/modules/unit_tests/emoting.dm
new file mode 100644
index 0000000000..5795ab3437
--- /dev/null
+++ b/code/modules/unit_tests/emoting.dm
@@ -0,0 +1,25 @@
+/datum/unit_test/emoting
+ var/emotes_used = 0
+
+/datum/unit_test/emoting/Run()
+ var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human)
+ RegisterSignal(human, COMSIG_MOB_EMOTE, .proc/on_emote_used)
+
+ human.say("*shrug")
+ TEST_ASSERT_EQUAL(emotes_used, 1, "Human did not shrug")
+
+ human.say("*beep")
+ TEST_ASSERT_EQUAL(emotes_used, 1, "Human beeped, when that should be restricted to silicons")
+
+ human.setOxyLoss(140)
+
+ TEST_ASSERT(human.stat != CONSCIOUS, "Human is somehow conscious after receiving suffocation damage")
+
+ human.say("*shrug")
+ TEST_ASSERT_EQUAL(emotes_used, 1, "Human shrugged while unconscious")
+
+ human.say("*deathgasp")
+ TEST_ASSERT_EQUAL(emotes_used, 2, "Human could not deathgasp while unconscious")
+
+/datum/unit_test/emoting/proc/on_emote_used()
+ emotes_used += 1
diff --git a/code/modules/unit_tests/heretic_knowledge.dm b/code/modules/unit_tests/heretic_knowledge.dm
new file mode 100644
index 0000000000..a433bce1ec
--- /dev/null
+++ b/code/modules/unit_tests/heretic_knowledge.dm
@@ -0,0 +1,21 @@
+/// This test checks all heretic knowledge nodes - excluding the ones which are unreachable on purpose - and ensures players can reach them in game.
+/// If it finds a node that is unreachable, it throws an error.
+/datum/unit_test/heretic_knowledge/Run()
+ ///List of all knowledge excluding the unreachable base types.
+ var/list/blacklist = list(/datum/eldritch_knowledge/spell,/datum/eldritch_knowledge/curse,/datum/eldritch_knowledge/final,/datum/eldritch_knowledge/summon)
+ var/list/all_possible_knowledge = subtypesof(/datum/eldritch_knowledge) - blacklist
+
+ var/list/list_to_check = GLOB.heretic_start_knowledge.Copy()
+ var/i = 0
+ while(i < length(list_to_check))
+ var/datum/eldritch_knowledge/eldritch_knowledge = allocate(list_to_check[++i])
+ for(var/next_knowledge in eldritch_knowledge.next_knowledge)
+ if(next_knowledge in list_to_check)
+ continue
+ list_to_check += next_knowledge
+
+ if(length(all_possible_knowledge) != length(all_possible_knowledge & list_to_check))
+ var/list/unreachables = all_possible_knowledge - list_to_check
+ for(var/X in unreachables)
+ var/datum/eldritch_knowledge/eldritch_knowledge = X
+ Fail("[initial(eldritch_knowledge.name)] is unreachable by players! Add it to the blacklist in /code/modules/unit_tests/heretic_knowledge.dm if it is purposeful!")
diff --git a/code/modules/unit_tests/holidays.dm b/code/modules/unit_tests/holidays.dm
new file mode 100644
index 0000000000..4df5443e2e
--- /dev/null
+++ b/code/modules/unit_tests/holidays.dm
@@ -0,0 +1,33 @@
+// test Jewish holiday
+/datum/unit_test/hanukkah_2123/Run()
+ var/datum/holiday/hebrew/hanukkah/hanukkah = new
+ TEST_ASSERT(hanukkah.shouldCelebrate(14, DECEMBER, 2123, 2, TUESDAY), "December 14, 2123 was not Hanukkah.")
+
+// test Islamic holiday
+/datum/unit_test/ramadan_2165/Run()
+ var/datum/holiday/islamic/ramadan/ramadan = new
+ TEST_ASSERT(ramadan.shouldCelebrate(6, NOVEMBER, 2165, 1, WEDNESDAY), "November 6, 2165 was not Ramadan.")
+
+// nth day of week
+/datum/unit_test/thanksgiving_2020/Run()
+ var/datum/holiday/nth_week/thanksgiving/thanksgiving = new
+ TEST_ASSERT(thanksgiving.shouldCelebrate(26, NOVEMBER, 2020, 4, THURSDAY), "November 26, 2020 was not Thanksgiving.")
+
+// another nth day of week
+/datum/unit_test/indigenous_3683/Run()
+ var/datum/holiday/nth_week/indigenous/indigenous = new
+ TEST_ASSERT(indigenous.shouldCelebrate(11, OCTOBER, 3683, 2, MONDAY), "October 11, 3683 was not Indigenous Peoples' Day.")
+
+// plain old simple holiday
+/datum/unit_test/hello_2020/Run()
+ var/datum/holiday/hello/hello = new
+ TEST_ASSERT(hello.shouldCelebrate(21, NOVEMBER, 2020, 3, SATURDAY), "November 21, 2020 was not Hello day.")
+
+// holiday which goes across months
+/datum/unit_test/new_year_1983/Run()
+ var/datum/holiday/new_year/new_year = new
+ TEST_ASSERT(new_year.shouldCelebrate(2, JANUARY, 1983, 1, SUNDAY), "January 2, 1983 was not New Year.")
+
+/datum/unit_test/moth_week_2020/Run()
+ var/datum/holiday/moth/moth = new
+ TEST_ASSERT(moth.shouldCelebrate(19, JULY, 2020, 3, SATURDAY), "July 19, 2020 was not Moth Week.")
diff --git a/code/modules/unit_tests/initialize_sanity.dm b/code/modules/unit_tests/initialize_sanity.dm
new file mode 100644
index 0000000000..d183f530c8
--- /dev/null
+++ b/code/modules/unit_tests/initialize_sanity.dm
@@ -0,0 +1,11 @@
+/datum/unit_test/initialize_sanity/Run()
+ if(length(SSatoms.BadInitializeCalls))
+ Fail("Bad Initialize() calls detected. Please read logs.")
+ var/list/init_failures_to_text = list(
+ "[BAD_INIT_QDEL_BEFORE]" = "Qdeleted Before Initialized",
+ "[BAD_INIT_DIDNT_INIT]" = "Did Not Initialize",
+ "[BAD_INIT_SLEPT]" = "Initialize() Slept",
+ "[BAD_INIT_NO_HINT]" = "No Initialize() Hint Returned",
+ )
+ for(var/failure in SSatoms.BadInitializeCalls)
+ log_world("[failure]: [init_failures_to_text["[SSatoms.BadInitializeCalls[failure]]"]]") // You like stacked brackets?
diff --git a/code/modules/unit_tests/keybinding_init.dm b/code/modules/unit_tests/keybinding_init.dm
new file mode 100644
index 0000000000..2bd2fdee1e
--- /dev/null
+++ b/code/modules/unit_tests/keybinding_init.dm
@@ -0,0 +1,6 @@
+/datum/unit_test/keybinding_init/Run()
+ for(var/i in subtypesof(/datum/keybinding))
+ var/datum/keybinding/KB = i
+ if(initial(KB.keybind_signal) || !initial(KB.name))
+ continue
+ Fail("[KB.name] does not have a keybind signal defined.")
diff --git a/code/modules/unit_tests/machine_disassembly.dm b/code/modules/unit_tests/machine_disassembly.dm
index bcc769bcf2..59edb4ae9d 100644
--- a/code/modules/unit_tests/machine_disassembly.dm
+++ b/code/modules/unit_tests/machine_disassembly.dm
@@ -3,11 +3,10 @@
var/obj/machinery/freezer = allocate(/obj/machinery/atmospherics/components/unary/thermomachine/freezer)
var/turf/freezer_location = freezer.loc
- freezer_location.ChangeTurf(/turf/open/floor/plasteel)
freezer.deconstruct()
// Check that the components are created
TEST_ASSERT(locate(/obj/item/stock_parts/micro_laser) in freezer_location, "Couldn't find micro-laser when disassembling freezer")
// Check that the circuit board itself is created
- TEST_ASSERT(locate(/obj/item/circuitboard/machine/thermomachine/freezer) in freezer_location, "Couldn't find the circuit board when disassembling freezer")
+ TEST_ASSERT(locate(/obj/item/circuitboard/machine/thermomachine) in freezer_location, "Couldn't find the circuit board when disassembling freezer")
diff --git a/code/modules/unit_tests/merge_type.dm b/code/modules/unit_tests/merge_type.dm
new file mode 100644
index 0000000000..ba3cfcf492
--- /dev/null
+++ b/code/modules/unit_tests/merge_type.dm
@@ -0,0 +1,15 @@
+/datum/unit_test/merge_type/Run()
+ var/list/blacklist = list(/obj/item/stack/sheet,
+ /obj/item/stack/sheet/mineral,
+ /obj/item/stack/ore,
+ /obj/item/stack/spacecash,
+ // /obj/item/stack/license_plates,
+ /obj/item/stack/tile/mineral,
+ /obj/item/stack/tile)
+
+ var/list/paths = subtypesof(/obj/item/stack) - blacklist
+
+ for(var/stackpath in paths)
+ var/obj/item/stack/stack = stackpath
+ if(!initial(stack.merge_type))
+ Fail("([stack]) lacks set merge_type variable!")
diff --git a/code/modules/unit_tests/metabolizing.dm b/code/modules/unit_tests/metabolizing.dm
index 895762c0ec..b7f8fc4f6a 100644
--- a/code/modules/unit_tests/metabolizing.dm
+++ b/code/modules/unit_tests/metabolizing.dm
@@ -17,3 +17,22 @@
/datum/unit_test/metabolization/Destroy()
SSmobs.ignite()
return ..()
+
+/datum/unit_test/on_mob_end_metabolize/Run()
+ var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human)
+ var/obj/item/reagent_containers/pill/pill = allocate(/obj/item/reagent_containers/pill)
+ var/datum/reagent/drug/methamphetamine/meth = /datum/reagent/drug/methamphetamine
+
+ // Give them enough meth to be consumed in 2 metabolizations
+ pill.reagents.add_reagent(meth, initial(meth.metabolization_rate) * 1.9)
+ pill.attack(user, user)
+
+ user.Life()
+
+ TEST_ASSERT(user.reagents.has_reagent(meth), "User does not have meth in their system after consuming it")
+ TEST_ASSERT(user.has_movespeed_modifier(/datum/movespeed_modifier/reagent/methamphetamine), "User consumed meth, but did not gain movespeed modifier")
+
+ user.Life()
+
+ TEST_ASSERT(!user.reagents.has_reagent(meth), "User still has meth in their system when it should've finished metabolizing")
+ TEST_ASSERT(!user.has_movespeed_modifier(/datum/movespeed_modifier/reagent/methamphetamine), "User still has movespeed modifier despite not containing any more meth")
diff --git a/code/modules/unit_tests/outfit_sanity.dm b/code/modules/unit_tests/outfit_sanity.dm
index 235820f9e9..57ce22434e 100644
--- a/code/modules/unit_tests/outfit_sanity.dm
+++ b/code/modules/unit_tests/outfit_sanity.dm
@@ -30,8 +30,8 @@
CHECK_OUTFIT_SLOT(glasses, ITEM_SLOT_EYES)
CHECK_OUTFIT_SLOT(id, ITEM_SLOT_ID)
CHECK_OUTFIT_SLOT(suit_store, ITEM_SLOT_SUITSTORE)
- CHECK_OUTFIT_SLOT(l_pocket, ITEM_SLOT_POCKET)
- CHECK_OUTFIT_SLOT(r_pocket, ITEM_SLOT_POCKET)
+ CHECK_OUTFIT_SLOT(l_pocket, ITEM_SLOT_LPOCKET)
+ CHECK_OUTFIT_SLOT(r_pocket, ITEM_SLOT_RPOCKET)
if (outfit.backpack_contents || outfit.box)
var/list/backpack_contents = outfit.backpack_contents?.Copy()
diff --git a/code/modules/unit_tests/pills.dm b/code/modules/unit_tests/pills.dm
new file mode 100644
index 0000000000..ed8f64ce95
--- /dev/null
+++ b/code/modules/unit_tests/pills.dm
@@ -0,0 +1,10 @@
+/datum/unit_test/pills/Run()
+ var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human)
+ var/obj/item/reagent_containers/pill/iron/pill = allocate(/obj/item/reagent_containers/pill/iron)
+
+ TEST_ASSERT_EQUAL(human.has_reagent(/datum/reagent/iron), FALSE, "Human somehow has iron before taking pill")
+
+ pill.attack(human, human)
+ human.Life()
+
+ TEST_ASSERT(human.has_reagent(/datum/reagent/iron), "Human doesn't have iron after taking pill")
diff --git a/code/modules/unit_tests/projectiles.dm b/code/modules/unit_tests/projectiles.dm
new file mode 100644
index 0000000000..53ceef01d6
--- /dev/null
+++ b/code/modules/unit_tests/projectiles.dm
@@ -0,0 +1,5 @@
+/datum/unit_test/projectile_movetypes/Run()
+ for(var/path in typesof(/obj/item/projectile))
+ var/obj/projectile/projectile = path
+ if(initial(projectile.movement_type) & PHASING)
+ Fail("[path] has default movement type PHASING. Piercing projectiles should be done using the projectile piercing system, not movement_types!")
diff --git a/code/modules/unit_tests/reagent_mod_expose.dm b/code/modules/unit_tests/reagent_mod_expose.dm
new file mode 100644
index 0000000000..3fe02e044d
--- /dev/null
+++ b/code/modules/unit_tests/reagent_mod_expose.dm
@@ -0,0 +1,59 @@
+// testing the mob expose procs are working
+
+/datum/reagent/method_patch_test
+ name = "method patch test"
+
+/datum/reagent/method_patch_test/expose_mob(mob/living/target, methods = PATCH, reac_volume, show_message = TRUE)
+ . = ..()
+ if(methods & PATCH)
+ target.health = 90
+ if(methods & INJECT)
+ target.health = 80
+
+/datum/unit_test/reagent_mob_expose/Run()
+ // Life() is handled just by tests
+ SSmobs.pause()
+
+ var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human)
+ var/obj/item/reagent_containers/dropper/dropper = allocate(/obj/item/reagent_containers/dropper)
+ var/obj/item/reagent_containers/food/drinks/drink = allocate(/obj/item/reagent_containers/food/drinks/bottle)
+ var/obj/item/reagent_containers/pill/patch/patch = allocate(/obj/item/reagent_containers/pill/patch)
+ var/obj/item/reagent_containers/syringe/syringe = allocate(/obj/item/reagent_containers/syringe)
+
+ // INGEST
+ TEST_ASSERT_EQUAL(human.fire_stacks, 0, "Human has fire stacks before taking phlogiston")
+ drink.reagents.add_reagent(/datum/reagent/phlogiston, 10)
+ drink.attack(human, human)
+ TEST_ASSERT_EQUAL(human.fire_stacks, 1, "Human does not have fire stacks after taking phlogiston")
+ human.Life()
+ TEST_ASSERT(human.fire_stacks > 1, "Human fire stacks did not increase after life tick")
+
+ // TOUCH
+ dropper.reagents.add_reagent(/datum/reagent/water, 1)
+ dropper.afterattack(human, human, TRUE)
+ TEST_ASSERT_EQUAL(human.fire_stacks, 0, "Human still has fire stacks after touching water")
+
+ // VAPOR
+ TEST_ASSERT_EQUAL(human.drowsyness, 0, "Human is drowsy at the start of testing")
+ drink.reagents.clear_reagents()
+ drink.reagents.add_reagent(/datum/reagent/nitrous_oxide, 10)
+ drink.reagents.trans_to(human, 10, methods = VAPOR)
+ TEST_ASSERT_NOTEQUAL(human.drowsyness, 0, "Human is not drowsy after exposure to vapors")
+
+ // PATCH
+ human.health = 100
+ TEST_ASSERT_EQUAL(human.health, 100, "Human health did not set properly")
+ patch.reagents.add_reagent(/datum/reagent/method_patch_test, 1)
+ patch.self_delay = 0
+ patch.attack(human, human)
+ TEST_ASSERT_EQUAL(human.health, 90, "Human health did not update after patch was applied")
+
+ // INJECT
+ syringe.reagents.add_reagent(/datum/reagent/method_patch_test, 1)
+ syringe.mode = SYRINGE_INJECT
+ syringe.afterattack(human, human, TRUE)
+ TEST_ASSERT_EQUAL(human.health, 80, "Human health did not update after injection from syringe")
+
+/datum/unit_test/reagent_mob_expose/Destroy()
+ SSmobs.ignite()
+ return ..()
diff --git a/code/modules/unit_tests/reagent_mod_procs.dm b/code/modules/unit_tests/reagent_mod_procs.dm
new file mode 100644
index 0000000000..a2087f8624
--- /dev/null
+++ b/code/modules/unit_tests/reagent_mod_procs.dm
@@ -0,0 +1,12 @@
+/datum/unit_test/reagent_mob_procs/Run()
+ var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human)
+ var/obj/item/food/hotdog/debug/fooditem = allocate(/obj/item/food/hotdog/debug)
+
+ TEST_ASSERT_EQUAL(human.has_reagent(/datum/reagent/consumable/ketchup), FALSE, "Human somehow has ketchup before eating")
+ TEST_ASSERT_EQUAL(human.has_reagent(/datum/reagent/medicine/epinephrine), FALSE, "Human somehow has epinephrine before injecting")
+
+ fooditem.attack(human, human)
+ human.reagents.add_reagent(/datum/reagent/medicine/epinephrine, 5)
+
+ TEST_ASSERT(human.has_reagent(/datum/reagent/consumable/ketchup), "Human doesn't have ketchup after eating")
+ TEST_ASSERT(human.has_reagent(/datum/reagent/medicine/epinephrine), "Human doesn't have epinephrine after injecting")
diff --git a/code/modules/unit_tests/say.dm b/code/modules/unit_tests/say.dm
index 3fe6675ab4..a7df5ad624 100644
--- a/code/modules/unit_tests/say.dm
+++ b/code/modules/unit_tests/say.dm
@@ -10,7 +10,6 @@
test(";%Never gonna give you up", "Never gonna give you up", list(MODE_HEADSET = TRUE, MODE_SING = TRUE))
test(".s Gun plz", "Gun plz", list(RADIO_KEY = RADIO_KEY_SECURITY, RADIO_EXTENSION = RADIO_CHANNEL_SECURITY))
test("...What", "...What", list())
- //note to lettern: add the ++, ||, __, and the verb*text checks
/datum/unit_test/get_message_mods/proc/test(message, expected_message, list/expected_mods)
var/list/mods = list()
diff --git a/code/modules/unit_tests/serving_tray.dm b/code/modules/unit_tests/serving_tray.dm
new file mode 100644
index 0000000000..00e911ae50
--- /dev/null
+++ b/code/modules/unit_tests/serving_tray.dm
@@ -0,0 +1,47 @@
+/**
+ * Check that standard food items fit on the serving tray
+ */
+/datum/unit_test/servingtray/Run()
+ var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human)
+ var/obj/structure/table/the_table = allocate(/obj/structure/table)
+ var/obj/item/storage/bag/tray/test_tray = allocate(/obj/item/storage/bag/tray)
+ var/obj/item/reagent_containers/food/banana = allocate(/obj/item/food/rationpack)
+ var/obj/item/food/the_bread = allocate(/obj/item/food/breadslice)
+ var/obj/item/reagent_containers/food/sugarcookie = allocate(/obj/item/food/cookie/sugar)
+ var/obj/item/clothing/under/jumpsuit = allocate(/obj/item/clothing/under/color/black)
+
+ TEST_ASSERT_EQUAL((the_bread in test_tray.contents), FALSE, "The bread is on the serving tray at test start")
+
+ // set the tray to single item mode the dirty way
+ var/datum/component/storage/tray_storage = test_tray.GetComponent(/datum/component/storage)
+ tray_storage.collection_mode = COLLECT_ONE
+
+ test_tray.pre_attack(the_bread, human)
+
+ TEST_ASSERT_EQUAL((the_bread in test_tray.contents), TRUE, "The bread did not get picked up by the serving tray")
+
+ test_tray.pre_attack(banana, human)
+
+ TEST_ASSERT_EQUAL((banana in test_tray.contents), TRUE, "The banana did not get picked up by the serving tray")
+
+ the_table.attackby(test_tray, human)
+
+ TEST_ASSERT_EQUAL(test_tray.contents.len, 0, "The serving tray did not drop all items on hitting the table")
+
+ test_tray.pre_attack(sugarcookie, human)
+
+ TEST_ASSERT_EQUAL((sugarcookie in test_tray.contents), TRUE, "The sugarcookie did not get picked up by the serving tray")
+
+ human.equip_to_slot(jumpsuit, ITEM_SLOT_ICLOTHING)
+ TEST_ASSERT(human.get_item_by_slot(ITEM_SLOT_ICLOTHING), "Human does not have jumpsuit on")
+
+ human.equip_to_slot(test_tray, ITEM_SLOT_LPOCKET)
+ TEST_ASSERT(human.get_item_by_slot(ITEM_SLOT_LPOCKET), "Serving tray failed to fit in the Left Pocket")
+
+ human.equip_to_slot(test_tray, ITEM_SLOT_RPOCKET)
+ TEST_ASSERT(human.get_item_by_slot(ITEM_SLOT_RPOCKET), "Serving tray failed to fit in the Right Pocket")
+
+ test_tray.attack(human, human)
+
+ TEST_ASSERT_EQUAL(test_tray.contents.len, 0, "The serving tray did not drop all items on hitting a human")
+
diff --git a/code/modules/unit_tests/siunit.dm b/code/modules/unit_tests/siunit.dm
new file mode 100644
index 0000000000..3a7a25a98d
--- /dev/null
+++ b/code/modules/unit_tests/siunit.dm
@@ -0,0 +1,15 @@
+/datum/unit_test/siunit/Run()
+ TEST_ASSERT_EQUAL(siunit(0.5345, "A", 0), "535 mA", "")
+ TEST_ASSERT_EQUAL(siunit(0.5344, "A", 0), "534 mA", "")
+ TEST_ASSERT_EQUAL(siunit(-0.5344, "A", 0), "-534 mA", "")
+ TEST_ASSERT_EQUAL(siunit_pressure(1.234, 1), "1.2 kPa", "") // test for pascal require *10e-3, as the game thinks in kPa, the proc siunit in Pa
+ TEST_ASSERT_EQUAL(siunit_pressure(1.234, 2), "1.23 kPa", "")
+ TEST_ASSERT_EQUAL(siunit_pressure(1.234, 3), "1.234 kPa", "")
+ TEST_ASSERT_EQUAL(siunit_pressure(1, 4), "1 kPa", "")
+ TEST_ASSERT_EQUAL(siunit_pressure(0), "0 Pa", "")
+ TEST_ASSERT_EQUAL(siunit_pressure(1e3), "1 MPa", "")
+ TEST_ASSERT_EQUAL(siunit_pressure(999e3), "999 MPa", "")
+ TEST_ASSERT_EQUAL(siunit_pressure(999.9e3), "999.9 MPa" , "")
+ TEST_ASSERT_EQUAL(siunit_pressure(999.9e3, 0), "1 GPa", "")
+ TEST_ASSERT_EQUAL(siunit_pressure(1e6), "1 GPa", "")
+ TEST_ASSERT_EQUAL(siunit_pressure(3e17), "300000 PPa", "")
diff --git a/code/modules/unit_tests/spawn_humans.dm b/code/modules/unit_tests/spawn_humans.dm
index 7189e87277..0500deae0a 100644
--- a/code/modules/unit_tests/spawn_humans.dm
+++ b/code/modules/unit_tests/spawn_humans.dm
@@ -1,7 +1,7 @@
/datum/unit_test/spawn_humans/Run()
- var/locs = block(run_loc_bottom_left, run_loc_top_right)
+ var/locs = block(run_loc_bottom_left, run_loc_top_right)
- for(var/I in 1 to 5)
- new /mob/living/carbon/human(pick(locs))
+ for(var/I in 1 to 5)
+ new /mob/living/carbon/human(pick(locs))
- sleep(50)
+ sleep(50)
diff --git a/code/modules/unit_tests/species_whitelists.dm b/code/modules/unit_tests/species_whitelists.dm
new file mode 100644
index 0000000000..145f3a259f
--- /dev/null
+++ b/code/modules/unit_tests/species_whitelists.dm
@@ -0,0 +1,5 @@
+/datum/unit_test/species_whitelist_check/Run()
+ for(var/typepath in subtypesof(/datum/species))
+ var/datum/species/S = typepath
+ if(initial(S.changesource_flags) == NONE)
+ Fail("A species type was detected with no changesource flags: [S]")
diff --git a/code/modules/unit_tests/stomach.dm b/code/modules/unit_tests/stomach.dm
new file mode 100644
index 0000000000..06fdc71dd4
--- /dev/null
+++ b/code/modules/unit_tests/stomach.dm
@@ -0,0 +1,40 @@
+/datum/unit_test/stomach/Run()
+
+ // Pause natural mob life so it can be handled entirely by the test
+ SSmobs.pause()
+
+ var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human)
+ var/obj/item/food/hotdog/debug/fooditem = allocate(/obj/item/food/hotdog/debug)
+ var/obj/item/organ/stomach/belly = human.getorganslot(ORGAN_SLOT_STOMACH)
+ var/obj/item/reagent_containers/pill/pill = allocate(/obj/item/reagent_containers/pill)
+ var/datum/reagent/drug/methamphetamine/meth = /datum/reagent/drug/methamphetamine
+
+ TEST_ASSERT_EQUAL(human.has_reagent(/datum/reagent/consumable/ketchup), FALSE, "Human somehow has ketchup before eating")
+
+ fooditem.attack(human, human)
+
+ TEST_ASSERT(belly.reagents.has_reagent(/datum/reagent/consumable/ketchup), "Stomach doesn't have ketchup after eating")
+ TEST_ASSERT_EQUAL(human.reagents.has_reagent(/datum/reagent/consumable/ketchup), FALSE, "Human body has ketchup after eating it should only be in the stomach")
+
+ //Give them meth and let it kick in
+ pill.reagents.add_reagent(meth, initial(meth.metabolization_rate) * 1.9)
+ pill.attack(human, human)
+ human.Life()
+
+ TEST_ASSERT(human.reagents.has_reagent(meth), "Human body does not have meth after life tick")
+ TEST_ASSERT(human.has_movespeed_modifier(/datum/movespeed_modifier/reagent/methamphetamine), "Human consumed meth, but did not gain movespeed modifier")
+
+ belly.Remove(human)
+ human.reagents.remove_all(human.reagents.total_volume)
+
+ TEST_ASSERT_EQUAL(human.has_reagent(/datum/reagent/consumable/ketchup), FALSE, "Human has reagents after clearing")
+
+ fooditem.attack(human, human)
+
+ TEST_ASSERT_EQUAL(human.has_reagent(/datum/reagent/consumable/ketchup), FALSE, "Human has ketchup without a stomach")
+
+
+
+/datum/unit_test/stomach/Destroy()
+ SSmobs.ignite()
+ return ..()
diff --git a/code/modules/unit_tests/surgeries.dm b/code/modules/unit_tests/surgeries.dm
index 7b8145ac19..6348057f79 100644
--- a/code/modules/unit_tests/surgeries.dm
+++ b/code/modules/unit_tests/surgeries.dm
@@ -2,14 +2,14 @@
var/mob/living/carbon/human/patient = allocate(/mob/living/carbon/human)
var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human)
- TEST_ASSERT_EQUAL(patient.get_missing_limbs().len, 0, "Patient is somehow missing limbs before surgery")
+ TEST_ASSERT_EQUAL(length(patient.get_missing_limbs()), 0, "Patient is somehow missing limbs before surgery")
var/datum/surgery/amputation/surgery = new(patient, BODY_ZONE_R_ARM, patient.get_bodypart(BODY_ZONE_R_ARM))
var/datum/surgery_step/sever_limb/sever_limb = new
sever_limb.success(user, patient, BODY_ZONE_R_ARM, null, surgery)
- TEST_ASSERT_EQUAL(patient.get_missing_limbs().len, 1, "Patient did not lose any limbs")
+ TEST_ASSERT_EQUAL(length(patient.get_missing_limbs()), 1, "Patient did not lose any limbs")
TEST_ASSERT_EQUAL(patient.get_missing_limbs()[1], BODY_ZONE_R_ARM, "Patient is missing a limb that isn't the one we operated on")
/datum/unit_test/brain_surgery/Run()
@@ -27,6 +27,33 @@
TEST_ASSERT(!patient.has_trauma_type(), "Patient kept their brain trauma after brain surgery")
TEST_ASSERT(patient.getOrganLoss(ORGAN_SLOT_BRAIN) < 20, "Patient did not heal their brain damage after brain surgery")
+/datum/unit_test/head_transplant/Run()
+ var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human)
+ var/mob/living/carbon/human/alice = allocate(/mob/living/carbon/human)
+ var/mob/living/carbon/human/bob = allocate(/mob/living/carbon/human)
+
+ alice.fully_replace_character_name(null, "Alice")
+ bob.fully_replace_character_name(null, "Bob")
+
+ var/obj/item/bodypart/head/alices_head = alice.get_bodypart(BODY_ZONE_HEAD)
+ alices_head.drop_limb()
+
+ var/obj/item/bodypart/head/bobs_head = bob.get_bodypart(BODY_ZONE_HEAD)
+ bobs_head.drop_limb()
+
+ TEST_ASSERT_EQUAL(alice.get_bodypart(BODY_ZONE_HEAD), null, "Alice still has a head after dismemberment")
+ TEST_ASSERT_EQUAL(alice.get_visible_name(), "Unknown", "Alice's head was dismembered, but they are not Unknown")
+
+ TEST_ASSERT_EQUAL(bobs_head.real_name, "Bob", "Bob's head does not remember that it is from Bob")
+
+ // Put Bob's head onto Alice's body
+ var/datum/surgery_step/add_prosthetic/add_prosthetic = new
+ user.put_in_active_hand(bobs_head)
+ add_prosthetic.success(user, alice, BODY_ZONE_HEAD, bobs_head)
+
+ TEST_ASSERT(!isnull(alice.get_bodypart(BODY_ZONE_HEAD)), "Alice has no head after prosthetic replacement")
+ TEST_ASSERT_EQUAL(alice.get_visible_name(), "Bob", "Bob's head was transplanted onto Alice's body, but their name is not Bob")
+
/datum/unit_test/multiple_surgeries/Run()
var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human)
var/mob/living/carbon/human/patient_zero = allocate(/mob/living/carbon/human)
@@ -41,8 +68,6 @@
TEST_ASSERT(surgery_for_zero.step_in_progress, "Surgery on patient zero was not initiated")
var/datum/surgery/organ_manipulation/surgery_for_one = new
-
- sleep(0.2) // if we don't have this, then the next surgery step can start *before* the previous one does, which is no good
// Without waiting for the incision to complete, try to start a new surgery
TEST_ASSERT(!surgery_step.initiate(user, patient_one, BODY_ZONE_CHEST, scalpel, surgery_for_one), "Was allowed to start a second surgery without the rod of asclepius")
diff --git a/code/modules/unit_tests/teleporters.dm b/code/modules/unit_tests/teleporters.dm
new file mode 100644
index 0000000000..fa2624adaa
--- /dev/null
+++ b/code/modules/unit_tests/teleporters.dm
@@ -0,0 +1,10 @@
+/datum/unit_test/auto_teleporter_linking/Run()
+ // Put down the teleporter machinery
+ var/obj/machinery/teleport/hub/hub = allocate(/obj/machinery/teleport/hub)
+ var/obj/machinery/teleport/station/station = allocate(/obj/machinery/teleport/station, locate(run_loc_bottom_left.x + 1, run_loc_bottom_left.y, run_loc_bottom_left.z))
+ var/obj/machinery/computer/teleporter/computer = allocate(/obj/machinery/computer/teleporter, locate(run_loc_bottom_left.x + 2, run_loc_bottom_left.y, run_loc_bottom_left.z))
+
+ TEST_ASSERT_EQUAL(hub.power_station, station, "Hub didn't link to the station")
+ TEST_ASSERT_EQUAL(station.teleporter_console, computer, "Station didn't link to the teleporter console")
+ TEST_ASSERT_EQUAL(station.teleporter_hub, hub, "Station didn't link to the hub")
+ TEST_ASSERT_EQUAL(computer.power_station, station, "Teleporter console didn't link to the hub")
diff --git a/code/modules/unit_tests/unit_test.dm b/code/modules/unit_tests/unit_test.dm
index 36b406e75e..15fe6b466c 100644
--- a/code/modules/unit_tests/unit_test.dm
+++ b/code/modules/unit_tests/unit_test.dm
@@ -1,9 +1,14 @@
/*
+
Usage:
Override /Run() to run your test code
+
Call Fail() to fail the test (You should specify a reason)
+
You may use /New() and /Destroy() for setup/teardown respectively
+
You can use the run_loc_bottom_left and run_loc_top_right to get turfs for testing
+
*/
GLOBAL_DATUM(current_test, /datum/unit_test)
@@ -14,19 +19,33 @@ GLOBAL_VAR(test_log)
//Bit of metadata for the future maybe
var/list/procs_tested
- //usable vars
+ /// The bottom left turf of the testing zone
var/turf/run_loc_bottom_left
+
+ /// The top right turf of the testing zone
var/turf/run_loc_top_right
+ /// The type of turf to allocate for the testing zone
+ var/test_turf_type = /turf/open/floor/plasteel
+
//internal shit
+ var/focus = FALSE
var/succeeded = TRUE
var/list/allocated
var/list/fail_reasons
+ var/static/datum/turf_reservation/turf_reservation
+
/datum/unit_test/New()
+ if (isnull(turf_reservation))
+ turf_reservation = SSmapping.RequestBlockReservation(5, 5)
+
+ for (var/turf/reserved_turf in turf_reservation.reserved_turfs)
+ reserved_turf.ChangeTurf(test_turf_type)
+
allocated = new
- run_loc_bottom_left = locate(1, 1, 1)
- run_loc_top_right = locate(5, 5, 1)
+ run_loc_bottom_left = locate(turf_reservation.bottom_left_coords[1], turf_reservation.bottom_left_coords[2], turf_reservation.bottom_left_coords[3])
+ run_loc_top_right = locate(turf_reservation.top_right_coords[1], turf_reservation.top_right_coords[2], turf_reservation.top_right_coords[3])
/datum/unit_test/Destroy()
//clear the test area
@@ -61,7 +80,14 @@ GLOBAL_VAR(test_log)
/proc/RunUnitTests()
CHECK_TICK
- for(var/I in subtypesof(/datum/unit_test))
+ var/tests_to_run = subtypesof(/datum/unit_test)
+ for (var/_test_to_run in tests_to_run)
+ var/datum/unit_test/test_to_run = _test_to_run
+ if (initial(test_to_run.focus))
+ tests_to_run = list(test_to_run)
+ break
+
+ for(var/I in tests_to_run)
var/datum/unit_test/test = new I
GLOB.current_test = test
diff --git a/code/modules/vehicles/cars/clowncar.dm b/code/modules/vehicles/cars/clowncar.dm
index 655ca21b93..0b75dbf4db 100644
--- a/code/modules/vehicles/cars/clowncar.dm
+++ b/code/modules/vehicles/cars/clowncar.dm
@@ -139,6 +139,7 @@
/obj/vehicle/sealed/car/clowncar/twitch_plays
key_type = null
+ explode_on_death = FALSE
/obj/vehicle/sealed/car/clowncar/twitch_plays/Initialize()
. = ..()
diff --git a/code/modules/vehicles/sealed.dm b/code/modules/vehicles/sealed.dm
index 28f6b1cca8..63c7c9f858 100644
--- a/code/modules/vehicles/sealed.dm
+++ b/code/modules/vehicles/sealed.dm
@@ -1,6 +1,7 @@
/obj/vehicle/sealed
enclosed = TRUE // you're in a sealed vehicle dont get dinked idiot
var/enter_delay = 20
+ var/explode_on_death = TRUE
flags_1 = BLOCK_FACE_ATOM_1
/obj/vehicle/sealed/generate_actions()
@@ -87,7 +88,8 @@
/obj/vehicle/sealed/Destroy()
DumpMobs()
- explosion(loc, 0, 1, 2, 3, 0)
+ if(explode_on_death)
+ explosion(loc, 0, 1, 2, 3, 0)
return ..()
/obj/vehicle/sealed/proc/DumpMobs(randomstep = TRUE)
diff --git a/code/modules/vending/kinkmate.dm b/code/modules/vending/kinkmate.dm
index e522583772..56d794e341 100644
--- a/code/modules/vending/kinkmate.dm
+++ b/code/modules/vending/kinkmate.dm
@@ -2,7 +2,6 @@
name = "KinkMate"
desc = "A vending machine for all your unmentionable desires."
icon_state = "kink"
- circuit = /obj/item/circuitboard/machine/kinkmate
product_slogans = "Kinky!;Sexy!;Check me out, big boy!"
vend_reply = "Have fun, you shameless pervert!"
products = list(
diff --git a/code/modules/vending/medical.dm b/code/modules/vending/medical.dm
index 795d35adc4..a24233b17c 100644
--- a/code/modules/vending/medical.dm
+++ b/code/modules/vending/medical.dm
@@ -34,7 +34,8 @@
/obj/item/healthanalyzer/wound = 4,
/obj/item/stack/medical/ointment = 2,
/obj/item/stack/medical/suture = 2,
- /obj/item/stack/medical/bone_gel = 4)
+ /obj/item/stack/medical/bone_gel = 4,
+ /obj/item/stack/medical/nanogel = 4)
contraband = list(/obj/item/reagent_containers/pill/tox = 3,
/obj/item/reagent_containers/pill/morphine = 4,
/obj/item/reagent_containers/pill/charcoal = 6)
diff --git a/code/modules/vending/medical_wall.dm b/code/modules/vending/medical_wall.dm
index 31f3dc49f1..2d4c30080d 100644
--- a/code/modules/vending/medical_wall.dm
+++ b/code/modules/vending/medical_wall.dm
@@ -13,6 +13,7 @@
/obj/item/reagent_containers/medspray/sterilizine = 1,
/obj/item/healthanalyzer/wound = 2,
/obj/item/stack/medical/bone_gel = 2,
+ /obj/item/stack/medical/nanogel = 2,
/obj/item/reagent_containers/syringe/dart = 10)
contraband = list(/obj/item/reagent_containers/pill/tox = 2,
/obj/item/reagent_containers/pill/morphine = 2)
diff --git a/code/modules/vending/robotics.dm b/code/modules/vending/robotics.dm
index 88f65506a6..2d77b2fc51 100644
--- a/code/modules/vending/robotics.dm
+++ b/code/modules/vending/robotics.dm
@@ -17,7 +17,8 @@
/obj/item/tank/internals/anesthetic = 2,
/obj/item/clothing/mask/breath/medical = 5,
/obj/item/screwdriver = 5,
- /obj/item/crowbar = 5)
+ /obj/item/crowbar = 6,
+ /obj/item/stack/medical/nanogel = 5)
armor = list("melee" = 100, "bullet" = 100, "laser" = 100, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50)
resistance_flags = FIRE_PROOF
default_price = PRICE_EXPENSIVE
diff --git a/code/modules/vending/wardrobes.dm b/code/modules/vending/wardrobes.dm
index 0b47c7218f..e88cfe33a3 100644
--- a/code/modules/vending/wardrobes.dm
+++ b/code/modules/vending/wardrobes.dm
@@ -17,8 +17,8 @@
product_ads = "Beat perps in style!;It's red so you can't see the blood!;You have the right to be fashionable!;Now you can be the fashion police you always wanted to be!"
vend_reply = "Thank you for using the SecDrobe!"
products = list(/obj/item/clothing/suit/hooded/wintercoat/security = 2,
- /obj/item/storage/backpack/security = 2,
- /obj/item/storage/backpack/satchel/sec = 2,
+ /obj/item/storage/backpack/security = 3,
+ /obj/item/storage/backpack/satchel/sec = 3,
/obj/item/storage/backpack/duffelbag/sec = 3,
/obj/item/clothing/under/rank/security/officer = 5,
/obj/item/clothing/shoes/jackboots = 5,
@@ -88,9 +88,9 @@
vend_reply = "Thank you for using the MediDrobe!"
products = list(/obj/item/clothing/accessory/pocketprotector = 5,
/obj/item/clothing/head/beret/med = 5,
- /obj/item/storage/backpack/duffelbag/med = 5,
/obj/item/storage/backpack/medic = 5,
/obj/item/storage/backpack/satchel/med = 5,
+ /obj/item/storage/backpack/duffelbag/med = 5,
/obj/item/clothing/suit/hooded/wintercoat/medical = 5,
/obj/item/clothing/suit/hooded/wintercoat/paramedic = 2,
/obj/item/clothing/under/rank/medical/doctor/nurse = 5,
@@ -131,9 +131,9 @@
vend_reply = "Thank you for using the EngiDrobe!"
products = list(/obj/item/clothing/accessory/pocketprotector = 5,
/obj/item/clothing/head/beret/eng = 3,
- /obj/item/storage/backpack/duffelbag/engineering = 3,
/obj/item/storage/backpack/industrial = 3,
/obj/item/storage/backpack/satchel/eng = 3,
+ /obj/item/storage/backpack/duffelbag/engineering = 3,
/obj/item/clothing/suit/hooded/wintercoat/engineering = 3,
/obj/item/clothing/under/rank/engineering/engineer = 5,
/obj/item/clothing/under/rank/engineering/engineer/skirt = 5,
@@ -162,9 +162,9 @@
vend_reply = "Thank you for using the AtmosDrobe!"
products = list(/obj/item/clothing/accessory/pocketprotector = 3,
/obj/item/clothing/head/beret/atmos = 3,
- /obj/item/storage/backpack/duffelbag/engineering = 3,
- /obj/item/storage/backpack/satchel/eng = 3,
/obj/item/storage/backpack/industrial = 3,
+ /obj/item/storage/backpack/satchel/eng = 3,
+ /obj/item/storage/backpack/duffelbag/engineering = 3,
/obj/item/clothing/head/hardhat/weldhat/dblue = 3,
/obj/item/clothing/suit/hooded/wintercoat/engineering/atmos = 3,
/obj/item/clothing/under/rank/engineering/atmospheric_technician = 5,
@@ -212,7 +212,7 @@
/obj/item/clothing/under/rank/rnd/roboticist/sleek = 3,
/obj/item/clothing/under/rank/rnd/roboticist/skirt = 3,
/obj/item/clothing/suit/hooded/wintercoat/robotics = 3,
- /obj/item/clothing/suit/toggle/labcoat = 3,
+ /obj/item/clothing/suit/toggle/labcoat/roboticist = 3,
/obj/item/clothing/shoes/sneakers/black = 3,
/obj/item/clothing/gloves/fingerless = 3,
/obj/item/clothing/head/soft/black = 3,
@@ -238,6 +238,7 @@
/obj/item/clothing/head/beret/sci = 3,
/obj/item/storage/backpack/science = 3,
/obj/item/storage/backpack/satchel/tox = 3,
+ /obj/item/storage/backpack/duffelbag = 3,
/obj/item/clothing/suit/hooded/wintercoat/science = 3,
/obj/item/clothing/under/rank/rnd/scientist = 4,
/obj/item/clothing/under/rank/rnd/scientist/util = 4,
@@ -261,7 +262,9 @@
product_ads = "Do you love soil? Then buy our clothes!;Get outfits to match your green thumb here!"
vend_reply = "Thank you for using the Hydrobe!"
products = list(/obj/item/storage/backpack/botany = 3,
+ /obj/item/storage/backpack = 3,
/obj/item/storage/backpack/satchel/hyd = 3,
+ /obj/item/storage/backpack/duffelbag = 3,
/obj/item/clothing/suit/hooded/wintercoat/hydro = 2,
/obj/item/clothing/suit/apron = 3,
/obj/item/clothing/suit/apron/overalls = 5,
@@ -468,7 +471,7 @@
/obj/item/storage/backpack/chemistry = 3,
/obj/item/storage/backpack/satchel/chem = 3,
/obj/item/storage/bag/chemistry = 3,
- /obj/item/fermichem/pHbooklet = 3)//pH indicator)
+ /obj/item/fermichem/pHbooklet = 3)
refill_canister = /obj/item/vending_refill/wardrobe/chem_wardrobe
payment_department = ACCOUNT_MED
cost_multiplier_per_dept = list(ACCOUNT_MED = 0)
diff --git a/code/modules/vore/eating/belly_obj.dm b/code/modules/vore/eating/belly_obj.dm
index 7f8aed83ef..8e74dd3c92 100644
--- a/code/modules/vore/eating/belly_obj.dm
+++ b/code/modules/vore/eating/belly_obj.dm
@@ -248,7 +248,7 @@
for(var/mob/living/H in hearing_mobs)
if(H && H.client && (isturf(H.loc) || (H.loc != src.contents)))
var/sound/releasement = GLOB.pred_release_sounds[release_sound]
- H.playsound_local(owner.loc, releasement, vol = 75, vary = 1, falloff = VORE_SOUND_FALLOFF)
+ H.playsound_local(owner.loc, releasement, 75, TRUE)
else if(H?.client && (H in contents))
var/sound/releasement = GLOB.prey_release_sounds[release_sound]
SEND_SOUND(H,releasement)
@@ -304,7 +304,7 @@
for(var/mob/living/H in hearing_mobs)
if(H && H.client && (isturf(H.loc) || (H.loc != src.contents)))
var/sound/releasement = GLOB.pred_release_sounds[release_sound]
- H.playsound_local(owner.loc, releasement, vol = 75, vary = 1, falloff = VORE_SOUND_FALLOFF)
+ H.playsound_local(owner.loc, releasement, 75, TRUE)
else if(H?.client && (H in contents))
var/sound/releasement = GLOB.prey_release_sounds[release_sound]
SEND_SOUND(H,releasement)
@@ -366,7 +366,7 @@
for(var/mob/living/H in hearing_mobs)
if(H && H.client && (isturf(H.loc) || (H.loc != src.contents)))
var/sound/eating = GLOB.pred_vore_sounds[vore_sound]
- H.playsound_local(owner.loc, eating, vol = 75, vary = 1, falloff = VORE_SOUND_FALLOFF)
+ H.playsound_local(owner.loc, eating, 75, TRUE)
else if(H?.client && (H in contents))
var/sound/eating = GLOB.prey_vore_sounds[vore_sound]
SEND_SOUND(H,eating)
@@ -585,14 +585,14 @@
if(is_wet)
for(var/mob/living/H in hearing_mobs)
if(H && H.client && (isturf(H.loc) || (H.loc != src.contents)))
- H.playsound_local(owner.loc, pred_struggle_snuggle, vol = 75, vary = 1, falloff = VORE_SOUND_FALLOFF)
+ H.playsound_local(owner.loc, pred_struggle_snuggle, 75, TRUE)
else if(H && H.client && (H in contents))
SEND_SOUND(H,prey_struggle_snuggle)
else
for(var/mob/living/H in hearing_mobs)
if(H && H.client)
- H.playsound_local(owner.loc, struggle_rustle, vol = 75, vary = 1, falloff = VORE_SOUND_FALLOFF)
+ H.playsound_local(owner.loc, struggle_rustle, 75, TRUE)
for(var/mob/living/H in hearing_mobs)
if(H && H.client && (isturf(H.loc)))
diff --git a/code/modules/vore/eating/bellymodes.dm b/code/modules/vore/eating/bellymodes.dm
index 291ef8654f..7cf36ebc50 100644
--- a/code/modules/vore/eating/bellymodes.dm
+++ b/code/modules/vore/eating/bellymodes.dm
@@ -245,7 +245,7 @@
last_hearcheck = world.time
for(var/mob/M in hearing_mobs) //so we don't fill the whole room with the sound effect
if(M && M.client && (isturf(M.loc) || (M.loc != src.contents))) //to avoid people on the inside getting the outside sounds and their direct sounds + built in sound pref check
- M.playsound_local(owner.loc, play_sound, vol = 75, vary = 1, falloff = VORE_SOUND_FALLOFF)
+ M.playsound_local(owner.loc, play_sound, 75, TRUE)
//these are all external sound triggers now, so it's ok.
if(to_update)
for(var/mob/living/M in contents)
diff --git a/code/modules/vore/eating/living.dm b/code/modules/vore/eating/living.dm
index a0ae58a44d..41d7da16a1 100644
--- a/code/modules/vore/eating/living.dm
+++ b/code/modules/vore/eating/living.dm
@@ -359,6 +359,10 @@
if(QDELETED(tasted) || (tasted.ckey && !(tasted.client?.prefs.vore_flags & LICKABLE)) || !Adjacent(tasted) || incapacitated(ignore_restraints = TRUE))
return
+ if(ishuman(tasted))
+ var/mob/living/carbon/human/H = tasted
+ H.wash_cream()
+
visible_message("[src] licks [tasted]! ","You lick [tasted]. They taste rather like [tasted.get_taste_message()]. ","Slurp! ")
/mob/living/proc/get_taste_message(allow_generic = TRUE, datum/species/mrace)
diff --git a/code/world.dm b/code/world.dm
index 344ca9be79..71a9853d01 100644
--- a/code/world.dm
+++ b/code/world.dm
@@ -1,12 +1,22 @@
//This file is just for the necessary /world definition
//Try looking in game/world.dm
+/**
+ * # World
+ *
+ * Two possibilities exist: either we are alone in the Universe or we are not. Both are equally terrifying. ~ Arthur C. Clarke
+ *
+ * The byond world object stores some basic byond level config, and has a few hub specific procs for managing hub visiblity
+ *
+ * The world /New() is the root of where a round itself begins
+ */
/world
mob = /mob/dead/new_player
turf = /turf/open/space/basic
area = /area/space
view = "15x15"
hub = "Exadv1.spacestation13"
+ hub_password = "kMZy3U5jJHSiBQjr"
name = "/tg/ Station 13"
fps = 20
#ifdef FIND_REF_NO_CHECK_TICK
diff --git a/config/respawns.txt b/config/respawns.txt
index 337a691b07..804a856a93 100644
--- a/config/respawns.txt
+++ b/config/respawns.txt
@@ -25,5 +25,5 @@ RESPAWN_MINIMUM_DELAY_ROUNDSTART 30.0
## Gamemode (config tags!) banlist for respawn
RESPAWN_CHAOS_GAMEMODES WIZARD
RESPAWN_CHAOS_GAMEMODES NUCLEAR
-RESPAWN_CHAOS_GAMEMODES CLONWOPS
-RESPAWN_CHOAS_GAMEMODES REVOLUTION
+RESPAWN_CHAOS_GAMEMODES CLOWNOPS
+RESPAWN_CHAOS_GAMEMODES REVOLUTION
diff --git a/dependencies.sh b/dependencies.sh
index 75e49f3fe1..e8709d10b1 100644
--- a/dependencies.sh
+++ b/dependencies.sh
@@ -11,16 +11,13 @@ export BYOND_MINOR=${LIST[1]}
unset LIST
#rust_g git tag
-export RUST_G_VERSION=0.4.4
-
-#bsql git tag
-export BSQL_VERSION=v1.4.0.0
+export RUST_G_VERSION=0.4.7
#node version
export NODE_VERSION=12
-# PHP version
-export PHP_VERSION=5.6
-
# SpacemanDMM git tag
-export SPACEMAN_DMM_VERSION=suite-1.4
+export SPACEMAN_DMM_VERSION=suite-1.6
+
+# Extools git tag
+export EXTOOLS_VERSION=v0.0.6
diff --git a/html/changelogs/AutoChangeLog-pr-13610.yml b/html/changelogs/AutoChangeLog-pr-13610.yml
new file mode 100644
index 0000000000..a3ca8e6f78
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-13610.yml
@@ -0,0 +1,4 @@
+author: "Putnam3145"
+delete-after: True
+changes:
+ - bugfix: "atmos subsystem no longer dies if there's too many gases"
diff --git a/html/changelogs/AutoChangeLog-pr-13826.yml b/html/changelogs/AutoChangeLog-pr-13826.yml
new file mode 100644
index 0000000000..959dc738b1
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-13826.yml
@@ -0,0 +1,9 @@
+author: "LetterN"
+delete-after: True
+changes:
+ - rscadd: "Coin & Holochip support for slot machine"
+ - admin: "Stickybans are now saved in the DB too"
+ - soundadd: "Immersive ™ audio reverbs. (also adds multiz audio)"
+ - code_imp: "Semi-hardsync from TG"
+ - code_imp: "Updates rust-g"
+ - code_imp: "Uses git CI instead of travis/appveyor now"
diff --git a/html/changelogs/AutoChangeLog-pr-13963.yml b/html/changelogs/AutoChangeLog-pr-13963.yml
new file mode 100644
index 0000000000..8a1e923aa0
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-13963.yml
@@ -0,0 +1,4 @@
+author: "necromanceranne"
+delete-after: True
+changes:
+ - rscadd: "Adds new roboticist labcoat sprites!"
diff --git a/html/changelogs/AutoChangeLog-pr-13975.yml b/html/changelogs/AutoChangeLog-pr-13975.yml
new file mode 100644
index 0000000000..ff643cd19c
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-13975.yml
@@ -0,0 +1,4 @@
+author: "zeroisthebiggay"
+delete-after: True
+changes:
+ - imageadd: "fuck the r*d cr*ss"
diff --git a/html/changelogs/AutoChangeLog-pr-14009.yml b/html/changelogs/AutoChangeLog-pr-14009.yml
new file mode 100644
index 0000000000..03a1ca39dd
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14009.yml
@@ -0,0 +1,7 @@
+author: "shellspeed1"
+delete-after: True
+changes:
+ - rscadd: "Wings from Cit RP have been ported over"
+ - rscadd: "Moth wings from cit have been ported over"
+ - bugfix: "Cleaned up some pixels on existing moth wings."
+ - tweak: "Organized the lists for wings by if they are for moths or not and than by alphabetical."
diff --git a/html/changelogs/AutoChangeLog-pr-14015.yml b/html/changelogs/AutoChangeLog-pr-14015.yml
new file mode 100644
index 0000000000..fe507d0a1e
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14015.yml
@@ -0,0 +1,4 @@
+author: "DeltaFire15"
+delete-after: True
+changes:
+ - balance: "Some synth damage stuff has been a bit rebalanced, see the PR for details."
diff --git a/html/changelogs/AutoChangeLog-pr-14019.yml b/html/changelogs/AutoChangeLog-pr-14019.yml
new file mode 100644
index 0000000000..37bdd52948
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14019.yml
@@ -0,0 +1,4 @@
+author: "timothyteakettle"
+delete-after: True
+changes:
+ - bugfix: "species with NOTRANSSTING cannot have envy's knife used on them"
diff --git a/html/changelogs/AutoChangeLog-pr-14021.yml b/html/changelogs/AutoChangeLog-pr-14021.yml
new file mode 100644
index 0000000000..aab94ae724
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14021.yml
@@ -0,0 +1,4 @@
+author: "DeltaFire15"
+delete-after: True
+changes:
+ - bugfix: "Combat mode now will not stay permanently disabled due to status effects not working as intended."
diff --git a/html/changelogs/AutoChangeLog-pr-14025.yml b/html/changelogs/AutoChangeLog-pr-14025.yml
new file mode 100644
index 0000000000..6db185baa3
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14025.yml
@@ -0,0 +1,7 @@
+author: "DeltaFire15"
+delete-after: True
+changes:
+ - rscadd: "A new surgery, allowing revival of synths without a defib at hand."
+ - balance: "Semi-permanent damage of Synth limbs caused by passing the damage threshold: 10 <- 15."
+ - tweak: "The embed removal surgery now has a version for Synths."
+ - balance: "EMPs no longer hardstun Synths."
diff --git a/html/changelogs/AutoChangeLog-pr-14029.yml b/html/changelogs/AutoChangeLog-pr-14029.yml
new file mode 100644
index 0000000000..2d4e0cdb17
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14029.yml
@@ -0,0 +1,4 @@
+author: "HeroWithYay"
+delete-after: True
+changes:
+ - tweak: "Wormhole Projector and Gravity Gun now require anomaly cores to function instead of firing pins."
diff --git a/html/changelogs/AutoChangeLog-pr-14030.yml b/html/changelogs/AutoChangeLog-pr-14030.yml
new file mode 100644
index 0000000000..9d4ee2647b
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14030.yml
@@ -0,0 +1,4 @@
+author: "Putnam3145"
+delete-after: True
+changes:
+ - tweak: "Replaces majority judgement with usual judgement."
diff --git a/html/changelogs/AutoChangeLog-pr-14032.yml b/html/changelogs/AutoChangeLog-pr-14032.yml
new file mode 100644
index 0000000000..67f0a80f83
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14032.yml
@@ -0,0 +1,8 @@
+author: "kappa-sama"
+delete-after: True
+changes:
+ - rscadd: "A new spell for the wizard and his martial apprentices, the Inner Mantra technique. It makes you punch people really good and makes you durable, but drains your energy while it's active."
+ - rscadd: "A self-buffing spell for valiant bubblegum slayers that is ultimately useless on lavaland and probably overpowered for miner antagonists. Go figure. At least all it does is let you punch hard while draining your health every second."
+ - balance: "bubblegum now drops a book that makes you into an abusive father instead of a shotgun that plays like pre-nerf shotguns"
+ - soundadd: "a powerup and powerdown sound effect"
+ - imageadd: "two icons for two buff spells"
diff --git a/html/changelogs/AutoChangeLog-pr-14033.yml b/html/changelogs/AutoChangeLog-pr-14033.yml
new file mode 100644
index 0000000000..db6a6b0691
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14033.yml
@@ -0,0 +1,4 @@
+author: "BlueWildrose"
+delete-after: True
+changes:
+ - rscadd: "Color Mates have been added to all stations (except Snaxi). Enjoy coloring your attire without having to bug science!"
diff --git a/html/changelogs/AutoChangeLog-pr-14034.yml b/html/changelogs/AutoChangeLog-pr-14034.yml
new file mode 100644
index 0000000000..ecd0d4ca10
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14034.yml
@@ -0,0 +1,4 @@
+author: "DeltaFire15"
+delete-after: True
+changes:
+ - bugfix: "Some edge cases causing issues with system corruption shouldn't be able to occur anymore."
diff --git a/html/changelogs/AutoChangeLog-pr-14035.yml b/html/changelogs/AutoChangeLog-pr-14035.yml
new file mode 100644
index 0000000000..b8690368a3
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14035.yml
@@ -0,0 +1,4 @@
+author: "SiliconMain"
+delete-after: True
+changes:
+ - tweak: "hololocks (which haven't worked for god knows how long) commented out until auxmos is merged"
diff --git a/html/changelogs/AutoChangeLog-pr-14036.yml b/html/changelogs/AutoChangeLog-pr-14036.yml
new file mode 100644
index 0000000000..a2bb654233
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14036.yml
@@ -0,0 +1,4 @@
+author: "BlueWildrose"
+delete-after: True
+changes:
+ - tweak: "You will now only unbuckle fireman-carried/piggybacked people on disarm or harm intent."
diff --git a/html/changelogs/AutoChangeLog-pr-14037.yml b/html/changelogs/AutoChangeLog-pr-14037.yml
new file mode 100644
index 0000000000..b105b5e19a
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14037.yml
@@ -0,0 +1,4 @@
+author: "DeltaFire15"
+delete-after: True
+changes:
+ - rscadd: "Nanogel, available at medical and robotics, which fixes internal damage in sufficiently repaired robotic limbs."
diff --git a/html/changelogs/AutoChangeLog-pr-14038.yml b/html/changelogs/AutoChangeLog-pr-14038.yml
new file mode 100644
index 0000000000..906f6f7053
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14038.yml
@@ -0,0 +1,9 @@
+author: "Hatterhat"
+delete-after: True
+changes:
+ - rscadd: "The nature interaction shuttle with the monkeys now has tiny fans on the airlocks in, because that's apparently a feature that was missing."
+ - rscadd: "More bags have been added to department vendors."
+ - balance: "Every roundstart species (and also ash walkers) now has flesh and bone that can be wounded."
+ - balance: "Recipes for sutures, regen mesh, and sterilized gauze have been adjusted to be easier, mostly."
+ - balance: "Sterilized gauze is better at absorbing blood and being a splint."
+ - bugfix: "Energy sabres now have an off inhand."
diff --git a/html/changelogs/AutoChangeLog-pr-14039.yml b/html/changelogs/AutoChangeLog-pr-14039.yml
new file mode 100644
index 0000000000..a799003a02
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14039.yml
@@ -0,0 +1,4 @@
+author: "Hatterhat"
+delete-after: True
+changes:
+ - rscadd: "Basic sticky technology is now a roundstart tech. Advanced sticky technology is BEPIS-locked, though. Theoretically."
diff --git a/html/changelogs/AutoChangeLog-pr-14040.yml b/html/changelogs/AutoChangeLog-pr-14040.yml
new file mode 100644
index 0000000000..6202f0b3e1
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14040.yml
@@ -0,0 +1,4 @@
+author: "LetterN"
+delete-after: True
+changes:
+ - bugfix: "fixed telecomms pda log"
diff --git a/html/changelogs/AutoChangeLog-pr-14042.yml b/html/changelogs/AutoChangeLog-pr-14042.yml
new file mode 100644
index 0000000000..a924ff582f
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14042.yml
@@ -0,0 +1,4 @@
+author: "kiwedespars"
+delete-after: True
+changes:
+ - rscadd: "the robust dildo weapon now has sound."
diff --git a/html/changelogs/AutoChangeLog-pr-14043.yml b/html/changelogs/AutoChangeLog-pr-14043.yml
new file mode 100644
index 0000000000..03a347724f
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14043.yml
@@ -0,0 +1,4 @@
+author: "timothyteakettle"
+delete-after: True
+changes:
+ - rscadd: "licking people washes pie off their face"
diff --git a/html/changelogs/AutoChangeLog-pr-14044.yml b/html/changelogs/AutoChangeLog-pr-14044.yml
new file mode 100644
index 0000000000..e19b6266a7
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14044.yml
@@ -0,0 +1,4 @@
+author: "corin9090"
+delete-after: True
+changes:
+ - tweak: "The chaplain's prayer beads can now be worn on your belt slot"
diff --git a/html/changelogs/AutoChangeLog-pr-14048.yml b/html/changelogs/AutoChangeLog-pr-14048.yml
new file mode 100644
index 0000000000..b7b1448b37
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14048.yml
@@ -0,0 +1,4 @@
+author: "MrJWhit"
+delete-after: True
+changes:
+ - tweak: "Updates suit storage info on Tip Of the Round."
diff --git a/html/changelogs/AutoChangeLog-pr-14054.yml b/html/changelogs/AutoChangeLog-pr-14054.yml
new file mode 100644
index 0000000000..406e6b2713
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14054.yml
@@ -0,0 +1,5 @@
+author: "TheObserver"
+delete-after: True
+changes:
+ - rscadd: "Re-adds the rifle stock, and sets the improv shotgun to be as it was."
+ - rscdel: "The maintenance rifle has been shelved - for now. Watch this space."
diff --git a/html/changelogs/AutoChangeLog-pr-14055.yml b/html/changelogs/AutoChangeLog-pr-14055.yml
new file mode 100644
index 0000000000..95baa857fa
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14055.yml
@@ -0,0 +1,4 @@
+author: "BlueWildrose"
+delete-after: True
+changes:
+ - tweak: "No more straining when your cock or breasts are growing via incubus draft or succubus milk."
diff --git a/html/changelogs/AutoChangeLog-pr-14060.yml b/html/changelogs/AutoChangeLog-pr-14060.yml
new file mode 100644
index 0000000000..f9750fc9be
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14060.yml
@@ -0,0 +1,4 @@
+author: "Hatterhat"
+delete-after: True
+changes:
+ - rscdel: "Apparently, shrink rays were buyable again, despite a PR having been made a while ago specifically for removing shrink rays. They're gone again."
diff --git a/html/changelogs/AutoChangeLog-pr-14061.yml b/html/changelogs/AutoChangeLog-pr-14061.yml
new file mode 100644
index 0000000000..c10eded1df
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14061.yml
@@ -0,0 +1,5 @@
+author: "Hatterhat"
+delete-after: True
+changes:
+ - tweak: "Improvised gauzes can now be crafted in stacks up to 10, like their maximum stacksize implies they should be capable of doing."
+ - bugfix: "Pouring sterilizine on gauze now takes the proper 5u per sterilized gauze instead of 10u."
diff --git a/html/changelogs/AutoChangeLog-pr-14062.yml b/html/changelogs/AutoChangeLog-pr-14062.yml
new file mode 100644
index 0000000000..84e40850ec
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14062.yml
@@ -0,0 +1,4 @@
+author: "kappa-sama"
+delete-after: True
+changes:
+ - bugfix: "super saiyan"
diff --git a/html/changelogs/AutoChangeLog-pr-14065.yml b/html/changelogs/AutoChangeLog-pr-14065.yml
new file mode 100644
index 0000000000..96a0a7cb3a
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14065.yml
@@ -0,0 +1,4 @@
+author: "MrJWhit"
+delete-after: True
+changes:
+ - tweak: "A small bucket of random fixes,"
diff --git a/html/changelogs/AutoChangeLog-pr-14070.yml b/html/changelogs/AutoChangeLog-pr-14070.yml
new file mode 100644
index 0000000000..f9a694c6ff
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14070.yml
@@ -0,0 +1,4 @@
+author: "YakumoChen"
+delete-after: True
+changes:
+ - balance: "To lower production costs, Buzz Fuzz is now manufactured with Real™️ Synthetic honey."
diff --git a/html/changelogs/AutoChangeLog-pr-14082.yml b/html/changelogs/AutoChangeLog-pr-14082.yml
new file mode 100644
index 0000000000..c65f417894
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14082.yml
@@ -0,0 +1,7 @@
+author: "kappa-sama"
+delete-after: True
+changes:
+ - rscadd: "s"
+ - tweak: "s"
+ - balance: "s"
+ - bugfix: "s"
diff --git a/html/changelogs/AutoChangeLog-pr-14089.yml b/html/changelogs/AutoChangeLog-pr-14089.yml
new file mode 100644
index 0000000000..4a473d6fa7
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-14089.yml
@@ -0,0 +1,4 @@
+author: "MrJWhit"
+delete-after: True
+changes:
+ - tweak: "Mining station oxygen locker on the cycling airlock starts out wrenched."
diff --git a/html/changelogs/example.yml b/html/changelogs/example.yml
index 48aa13aa11..c44f796755 100644
--- a/html/changelogs/example.yml
+++ b/html/changelogs/example.yml
@@ -8,16 +8,41 @@
#
# Valid Prefixes:
# bugfix
-# wip (For works in progress)
+# - (fixes bugs)
+# wip
+# - (work in progress)
# tweak
+# - (tweaks something)
# soundadd
+# - (adds a sound)
# sounddel
-# rscadd (general adding of nice things)
-# rscdel (general deleting of nice things)
+# - (removes a sound)
+# rscdel
+# - (adds a feature)
+# rscadd
+# - (removes a feature)
# imageadd
+# - (adds an image or sprite)
# imagedel
-# spellcheck (typo fixes)
+# - (removes an image or sprite)
+# spellcheck
+# - (fixes spelling or grammar)
# experiment
+# - (experimental change)
+# tgs
+# - (TGS change)
+# balance
+# - (balance changes)
+# code_imp
+# - (misc internal code change)
+# refactor
+# - (refactors code)
+# config
+# - (makes a change to the config files)
+# admin
+# - (makes changes to administrator tools)
+# server
+# - (miscellaneous changes to server)
#################################
# Your name.
diff --git a/html/safe_dial.png b/html/safe_dial.png
new file mode 100644
index 0000000000..de24f16b67
Binary files /dev/null and b/html/safe_dial.png differ
diff --git a/icons/mob/clothing/head.dmi b/icons/mob/clothing/head.dmi
index 62d6644311..4b0c56c4d2 100644
Binary files a/icons/mob/clothing/head.dmi and b/icons/mob/clothing/head.dmi differ
diff --git a/icons/mob/clothing/head_muzzled.dmi b/icons/mob/clothing/head_muzzled.dmi
index 0c72221833..e99f1ff6d4 100644
Binary files a/icons/mob/clothing/head_muzzled.dmi and b/icons/mob/clothing/head_muzzled.dmi differ
diff --git a/icons/mob/clothing/suit.dmi b/icons/mob/clothing/suit.dmi
index 21d2f872f1..6098b8342a 100644
Binary files a/icons/mob/clothing/suit.dmi and b/icons/mob/clothing/suit.dmi differ
diff --git a/icons/mob/clothing/suit_digi.dmi b/icons/mob/clothing/suit_digi.dmi
index 9f6e3ffb84..5c361feb5f 100644
Binary files a/icons/mob/clothing/suit_digi.dmi and b/icons/mob/clothing/suit_digi.dmi differ
diff --git a/icons/mob/inhands/weapons/swords_lefthand.dmi b/icons/mob/inhands/weapons/swords_lefthand.dmi
index 8685b882f0..e4f22de1cd 100644
Binary files a/icons/mob/inhands/weapons/swords_lefthand.dmi and b/icons/mob/inhands/weapons/swords_lefthand.dmi differ
diff --git a/icons/mob/inhands/weapons/swords_righthand.dmi b/icons/mob/inhands/weapons/swords_righthand.dmi
index 50b0064de5..8716c3627f 100644
Binary files a/icons/mob/inhands/weapons/swords_righthand.dmi and b/icons/mob/inhands/weapons/swords_righthand.dmi differ
diff --git a/icons/mob/wings.dmi b/icons/mob/wings.dmi
index 4523403344..92de5c150c 100644
Binary files a/icons/mob/wings.dmi and b/icons/mob/wings.dmi differ
diff --git a/icons/obj/closet.dmi b/icons/obj/closet.dmi
index 3653635c56..70f5001c26 100644
Binary files a/icons/obj/closet.dmi and b/icons/obj/closet.dmi differ
diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi
index 95a31f8b9f..ee6cf90597 100644
Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ
diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi
index 935e9ead02..6ddac703a0 100644
Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ
diff --git a/icons/obj/library.dmi b/icons/obj/library.dmi
index 6e14c4c6ca..7e3b8058b8 100644
Binary files a/icons/obj/library.dmi and b/icons/obj/library.dmi differ
diff --git a/icons/obj/magic.dmi b/icons/obj/magic.dmi
index c376dc7321..6555373ae1 100644
Binary files a/icons/obj/magic.dmi and b/icons/obj/magic.dmi differ
diff --git a/icons/obj/stack_objects.dmi b/icons/obj/stack_objects.dmi
index 1cdb3b6443..3136cf34b2 100644
Binary files a/icons/obj/stack_objects.dmi and b/icons/obj/stack_objects.dmi differ
diff --git a/modular_citadel/code/modules/client/loadout/unlockable.dm b/modular_citadel/code/modules/client/loadout/unlockable.dm
index 6e522812b8..67e0c06d8c 100644
--- a/modular_citadel/code/modules/client/loadout/unlockable.dm
+++ b/modular_citadel/code/modules/client/loadout/unlockable.dm
@@ -27,4 +27,4 @@
path = /obj/item/bedsheet/unlockable/miner
progress_required = 100000
- progress_key = "miner"
\ No newline at end of file
+ progress_key = "miner"
diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/enlargement.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/enlargement.dm
index ac3ef96505..2e5f3b8994 100644
--- a/modular_citadel/code/modules/reagents/chemistry/reagents/enlargement.dm
+++ b/modular_citadel/code/modules/reagents/chemistry/reagents/enlargement.dm
@@ -30,7 +30,6 @@
inverse_chem = /datum/reagent/fermi/BEsmaller //At really impure vols, it just becomes 100% inverse
can_synth = FALSE
value = REAGENT_VALUE_VERY_RARE
- var/message_spam = FALSE
/datum/reagent/fermi/breast_enlarger/on_mob_metabolize(mob/living/M)
. = ..()
@@ -81,16 +80,7 @@
H.reagents.remove_reagent(type, 5)
B.Insert(H)
- //If they have them, increase size. If size is comically big, limit movement and rip clothes.
B.modify_size(0.05)
-
- if (ISINRANGE_EX(B.cached_size, 8.5, 9) && (H.w_uniform || H.wear_suit))
- var/target = H.get_bodypart(BODY_ZONE_CHEST)
- if(!message_spam)
- to_chat(H, "Your breasts begin to strain against your clothes tightly! ")
- message_spam = TRUE
- H.adjustOxyLoss(5, 0)
- H.apply_damage(1, BRUTE, target)
return ..()
/datum/reagent/fermi/breast_enlarger/overdose_process(mob/living/carbon/M) //Turns you into a female if male and ODing, doesn't touch nonbinary and object genders.
@@ -189,7 +179,6 @@
inverse_chem = /datum/reagent/fermi/PEsmaller //At really impure vols, it just becomes 100% inverse and shrinks instead.
can_synth = FALSE
value = REAGENT_VALUE_VERY_RARE
- var/message_spam = FALSE
/datum/reagent/fermi/penis_enlarger/on_mob_metabolize(mob/living/M)
. = ..()
@@ -232,14 +221,6 @@
P.Insert(H)
P.modify_size(0.1)
- var/max_D = CONFIG_GET(number/penis_max_inches_prefs)
- if (ISINRANGE_EX(P.length, max_D + 0.5, max_D + 1) && (H.w_uniform || H.wear_suit))
- var/target = H.get_bodypart(BODY_ZONE_CHEST)
- if(!message_spam)
- to_chat(H, "Your cock begin to strain against your clothes tightly! ")
- message_spam = TRUE
- H.apply_damage(2.5, BRUTE, target)
-
return ..()
/datum/reagent/fermi/penis_enlarger/overdose_process(mob/living/carbon/human/M) //Turns you into a male if female and ODing, doesn't touch nonbinary and object genders.
diff --git a/rust_g.dll b/rust_g.dll
old mode 100755
new mode 100644
index 8cd62b8ca4..8ef1c59a10
Binary files a/rust_g.dll and b/rust_g.dll differ
diff --git a/sound/machines/grill/grillsizzle.ogg b/sound/machines/grill/grillsizzle.ogg
new file mode 100644
index 0000000000..056ce45941
Binary files /dev/null and b/sound/machines/grill/grillsizzle.ogg differ
diff --git a/sound/magic/powerdown.ogg b/sound/magic/powerdown.ogg
new file mode 100644
index 0000000000..9d514c64ca
Binary files /dev/null and b/sound/magic/powerdown.ogg differ
diff --git a/sound/magic/powerup.ogg b/sound/magic/powerup.ogg
new file mode 100644
index 0000000000..909c2a33c7
Binary files /dev/null and b/sound/magic/powerup.ogg differ
diff --git a/strings/tips.txt b/strings/tips.txt
index 5336f767a5..68d1cbe57a 100644
--- a/strings/tips.txt
+++ b/strings/tips.txt
@@ -295,7 +295,7 @@ In a pinch, stripping yourself naked will give you a sizeable resistance to bein
Wearing riot armor makes you significantly more effective at performing tackle takedowns, but will use extra stamina with each leap! It will also significantly protect you from other tackles!
Epipens contain a powerful coagulant that drastically reduces bleeding on all bleeding wounds. If you don't have time to properly treat someone with lots of slashes or piercings, stick them with a pen to buy some time!
Anything you can light a cigarette with, you can use to cauterize a bleeding wound. Technically, that includes the supermatter.
-Suit storage units entirely purge radiation from any carbon mob put inside of them when cycling, at the cost of some horrific burns, this is a very effective strategy to clean someone up after they bathed in the engine.
+Suit storage units, when hacked, entirely purge radiation from any carbon mob put inside of them when cycling, at the cost of some horrific burns, this is a very effective strategy to clean someone up after they bathed in the engine.
Laser pointers can be upgraded by replacing its micro laser with a better one from RnD! Use a screwdriver on it to remove the old laser. Upgrading the laser pointer gives you better odds of stunning a cyborg, and even blinding people with sunglasses.
Being out of combat mode makes makes you deal less damage to people and objects when attacking. This stacks with the penalty incurred by resting.
Resting makes you deal less damage to people and objects when attacking. This stacks with the penalty incurred by being out of combat mode.
diff --git a/tgstation.dme b/tgstation.dme
index 99130d1740..a0f5d54c03 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -79,6 +79,7 @@
#include "code\__DEFINES\mobs.dm"
#include "code\__DEFINES\monkeys.dm"
#include "code\__DEFINES\move_force.dm"
+#include "code\__DEFINES\movement.dm"
#include "code\__DEFINES\movespeed_modification.dm"
#include "code\__DEFINES\nanites.dm"
#include "code\__DEFINES\networks.dm"
@@ -154,7 +155,6 @@
#include "code\__DEFINES\storage\_storage.dm"
#include "code\__DEFINES\storage\volumetrics.dm"
#include "code\__HELPERS\_cit_helpers.dm"
-#include "code\__HELPERS\_extools_api.dm"
#include "code\__HELPERS\_lists.dm"
#include "code\__HELPERS\_logging.dm"
#include "code\__HELPERS\_string_lists.dm"
@@ -202,6 +202,7 @@
#include "code\__HELPERS\sorts\InsertSort.dm"
#include "code\__HELPERS\sorts\MergeSort.dm"
#include "code\__HELPERS\sorts\TimSort.dm"
+#include "code\_globalvars\admin.dm"
#include "code\_globalvars\bitfields.dm"
#include "code\_globalvars\configuration.dm"
#include "code\_globalvars\game_modes.dm"
@@ -3402,6 +3403,7 @@
#include "code\modules\spells\spell_types\taeclowndo.dm"
#include "code\modules\spells\spell_types\telepathy.dm"
#include "code\modules\spells\spell_types\the_traps.dm"
+#include "code\modules\spells\spell_types\togglebuff.dm"
#include "code\modules\spells\spell_types\touch_attacks.dm"
#include "code\modules\spells\spell_types\trigger.dm"
#include "code\modules\spells\spell_types\turf_teleport.dm"
@@ -3425,6 +3427,7 @@
#include "code\modules\surgery\dental_implant.dm"
#include "code\modules\surgery\embalming.dm"
#include "code\modules\surgery\emergency_cardioversion_recovery.dm"
+#include "code\modules\surgery\emergency_reboot.dm"
#include "code\modules\surgery\experimental_dissection.dm"
#include "code\modules\surgery\eye_surgery.dm"
#include "code\modules\surgery\graft_synthtissue.dm"
diff --git a/tgui/packages/tgui/interfaces/TelecommsPDALog.js b/tgui/packages/tgui/interfaces/TelecommsPDALog.js
index b03a5abf2c..8383b3cad4 100644
--- a/tgui/packages/tgui/interfaces/TelecommsPDALog.js
+++ b/tgui/packages/tgui/interfaces/TelecommsPDALog.js
@@ -365,9 +365,9 @@ export const TeleLogs = (props, context) => {
);
};
-export const CustomMsg = context => {
+export const CustomMsg = (props, context) => {
const { act, data } = useBackend(context);
- const fake_message = data.fake_message || {
+ const fake_message = data.fake_message !== {} ? data.fake_message : {
'sender': 'System Administrator',
'job': 'Admin',
'recepient': null,
diff --git a/tgui/public/tgui.bundle.js b/tgui/public/tgui.bundle.js
index cfceab005d..3266ef473d 100644
--- a/tgui/public/tgui.bundle.js
+++ b/tgui/public/tgui.bundle.js
@@ -1 +1 @@
-!function(e){function t(t){for(var o,c,i=t[0],l=t[1],d=t[2],s=0,m=[];s0&&g.flatMap((function(e){return e.items||[]})).filter(L).filter((function(e,t){return t<25}))||(null==(l=g.find((function(e){return e.name===_})))?void 0:l.items)||[];return(0,o.createComponentVNode)(2,c.Section,{title:(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:s>0?"good":"bad",children:[(0,i.formatMoney)(s)," ",p]}),buttons:(0,o.createFragment)([(0,o.createTextVNode)("Search"),(0,o.createComponentVNode)(2,c.Input,{autoFocus:!0,value:k,onInput:function(e,t){return x(t)},mx:1}),(0,o.createComponentVNode)(2,c.Button,{icon:V?"list":"info",content:V?"Compact":"Detailed",onClick:function(){return h("compact_toggle")}}),!!b&&(0,o.createComponentVNode)(2,c.Button,{icon:"lock",content:"Lock",onClick:function(){return h("lock")}})],0),children:(0,o.createComponentVNode)(2,c.Flex,{children:[0===k.length&&(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Tabs,{vertical:!0,children:g.map((function(e){var t;return(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:e.name===_,onClick:function(){return w(e.name)},children:[e.name," (",(null==(t=e.items)?void 0:t.length)||0,")"]},e.name)}))})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,basis:0,children:[0===y.length&&(0,o.createComponentVNode)(2,c.NoticeBox,{children:0===k.length?"No items in this category.":"No results found."}),(0,o.createComponentVNode)(2,u,{compactMode:k.length>0||V,currencyAmount:s,currencySymbol:p,items:y})]})]})})};t.GenericUplink=d;var u=function(e,t){var n=e.compactMode,l=e.currencyAmount,d=e.currencySymbol,u=(0,a.useBackend)(t).act,s=(0,a.useLocalState)(t,"hoveredItem",{}),m=s[0],p=s[1],C=m&&m.cost||0,h=e.items.map((function(e){var t=m&&m.name!==e.name,n=l-C50?"battery-half":"battery-quarter")||1===t&&"bolt"||2===t&&"battery-full",color:0===t&&(n>50?"yellow":"red")||1===t&&"yellow"||2===t&&"green"}),(0,o.createComponentVNode)(2,d.Box,{inline:!0,width:"36px",textAlign:"right",children:(0,c.toFixed)(n)+"%"})],4)};t.AreaCharge=C,C.defaultHooks=i.pureComponentHooks;var h=function(e){var t=e.status,n=Boolean(2&t),r=Boolean(1&t),a=(n?"On":"Off")+" ["+(r?"auto":"manual")+"]";return(0,o.createComponentVNode)(2,d.ColorBox,{color:n?"good":"bad",content:r?undefined:"M",title:a})};h.defaultHooks=i.pureComponentHooks},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";t.__esModule=!0,t.AiRestorerContent=t.AiRestorer=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.AiRestorer=function(){return(0,o.createComponentVNode)(2,c.Window,{width:370,height:360,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.AI_present,d=i.error,u=i.name,s=i.laws,m=i.isDead,p=i.restoring,C=i.health,h=i.ejectable;return(0,o.createFragment)([d&&(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:d}),!!h&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:l?u:"----------",disabled:!l,onClick:function(){return c("PRG_eject")}}),!!l&&(0,o.createComponentVNode)(2,a.Section,{title:h?"System Status":u,buttons:(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,color:m?"bad":"good",children:m?"Nonfunctional":"Functional"}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:C,minValue:0,maxValue:100,ranges:{good:[70,Infinity],average:[50,70],bad:[-Infinity,50]}})})}),!!p&&(0,o.createComponentVNode)(2,a.Box,{bold:!0,textAlign:"center",fontSize:"20px",color:"good",mt:1,children:"RECONSTRUCTION IN PROGRESS"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"plus",content:"Begin Reconstruction",disabled:p,mt:1,onClick:function(){return c("PRG_beginReconstruction")}}),(0,o.createComponentVNode)(2,a.Section,{title:"Laws",level:2,children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{className:"candystripe",children:e},e)}))})]})],0)};t.AiRestorerContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.AccessList=void 0;var o=n(0),r=n(14),a=n(2),c=n(1);function i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(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(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}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(n=e[Symbol.iterator]()).next.bind(n)}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n0&&"yellow",selected:"requests"===m,onClick:function(){return C("requests")},children:["Requests (",V.length,")"]}),!h&&(0,o.createComponentVNode)(2,c.Tabs.Tab,{icon:"shopping-cart",textColor:"cart"!==m&&N.length>0&&"yellow",selected:"cart"===m,onClick:function(){return C("cart")},children:["Checkout (",N.length,")"]})]})}),"catalog"===m&&(0,o.createComponentVNode)(2,u),"requests"===m&&(0,o.createComponentVNode)(2,s),"cart"===m&&(0,o.createComponentVNode)(2,p)]})})};var d=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.away,u=l.docked,s=l.loan,m=l.loan_dispatched,p=l.location,C=l.message,h=l.points,N=l.requestonly;return(0,o.createComponentVNode)(2,c.Section,{title:"Cargo",buttons:(0,o.createComponentVNode)(2,c.Box,{inline:!0,bold:!0,children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:h,format:function(e){return(0,i.formatMoney)(e)}})," credits"]}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Shuttle",children:u&&!N&&(0,o.createComponentVNode)(2,c.Button,{content:p,onClick:function(){return r("send")}})||p}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"CentCom Message",children:C}),!!s&&!N&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Loan",children:!m&&(0,o.createComponentVNode)(2,c.Button,{content:"Loan Shuttle",disabled:!(d&&u),onClick:function(){return r("loan")}})||(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Loaned to Centcom"})})]})})},u=function(e,t){var n,l=e.express,d=(0,a.useBackend)(t),u=d.act,s=d.data,p=s.self_paid,C=(0,r.toArray)(s.supplies),h=(0,a.useSharedState)(t,"supply",null==(n=C[0])?void 0:n.name),N=h[0],V=h[1],b=C.find((function(e){return e.name===N}));return(0,o.createComponentVNode)(2,c.Section,{title:"Catalog",buttons:!l&&(0,o.createFragment)([(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,c.Button.Checkbox,{ml:2,content:"Buy Privately",checked:p,onClick:function(){return u("toggleprivate")}})],4),children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{ml:-1,mr:1,children:(0,o.createComponentVNode)(2,c.Tabs,{vertical:!0,children:C.map((function(e){return(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:e.name===N,onClick:function(){return V(e.name)},children:[e.name," (",e.packs.length,")"]},e.name)}))})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,c.Table,{children:null==b?void 0:b.packs.map((function(e){var t=[];return e.small_item&&t.push("Small"),e.access&&t.push("Restricted"),(0,o.createComponentVNode)(2,c.Table.Row,{className:"candystripe",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,color:"label",textAlign:"right",children:t.join(", ")}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,textAlign:"right",children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,tooltip:e.desc,tooltipPosition:"left",onClick:function(){return u("add",{id:e.id})},children:[(0,i.formatMoney)(p&&!e.goody?Math.round(1.1*e.cost):e.cost)," cr"]})})]},e.name)}))})})]})})};t.CargoCatalog=u;var s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.requestonly,u=l.requests||[];return(0,o.createComponentVNode)(2,c.Section,{title:"Active Requests",buttons:!d&&(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Clear",color:"transparent",onClick:function(){return r("denyall")}}),children:[0===u.length&&(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"No Requests"}),u.length>0&&(0,o.createComponentVNode)(2,c.Table,{children:u.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"candystripe",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,color:"label",children:["#",e.id]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.object}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createVNode)(1,"b",null,e.orderer,0)}),(0,o.createComponentVNode)(2,c.Table.Cell,{width:"25%",children:(0,o.createVNode)(1,"i",null,e.reason,0)}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,textAlign:"right",children:[(0,i.formatMoney)(e.cost)," cr"]}),!d&&(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,children:[(0,o.createComponentVNode)(2,c.Button,{icon:"check",color:"good",onClick:function(){return r("approve",{id:e.id})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"times",color:"bad",onClick:function(){return r("deny",{id:e.id})}})]})]},e.id)}))})]})},m=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.requestonly,u=l.cart||[],s=u.reduce((function(e,t){return e+t.cost}),0);return d?null:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{inline:!0,mx:1,children:[0===u.length&&"Cart is empty",1===u.length&&"1 item",u.length>=2&&u.length+" items"," ",s>0&&"("+(0,i.formatMoney)(s)+" cr)"]}),(0,o.createComponentVNode)(2,c.Button,{icon:"times",color:"transparent",content:"Clear",onClick:function(){return r("clear")}})],4)},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.requestonly,u=l.away,s=l.docked,p=l.location,C=l.cart||[];return(0,o.createComponentVNode)(2,c.Section,{title:"Current Cart",buttons:(0,o.createComponentVNode)(2,m),children:[0===C.length&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Nothing in cart"}),C.length>0&&(0,o.createComponentVNode)(2,c.Table,{children:C.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"candystripe",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,color:"label",children:["#",e.id]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.object}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,children:!!e.paid&&(0,o.createVNode)(1,"b",null,"[Paid Privately]",16)}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,textAlign:"right",children:[(0,i.formatMoney)(e.cost)," cr"]}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,c.Button,{icon:"minus",onClick:function(){return r("remove",{id:e.id})}})})]},e.id)}))}),C.length>0&&!d&&(0,o.createComponentVNode)(2,c.Box,{mt:2,children:1===u&&1===s&&(0,o.createComponentVNode)(2,c.Button,{color:"green",style:{"line-height":"28px",padding:"0 12px"},content:"Confirm the order",onClick:function(){return r("send")}})||(0,o.createComponentVNode)(2,c.Box,{opacity:.5,children:["Shuttle in ",p,"."]})})]})}},,function(e,t,n){"use strict";t.__esModule=!0,t.BeakerContents=void 0;var o=n(0),r=n(1);t.BeakerContents=function(e){var t=e.beakerLoaded,n=e.beakerContents;return(0,o.createComponentVNode)(2,r.Box,{children:[!t&&(0,o.createComponentVNode)(2,r.Box,{color:"label",children:"No beaker loaded."})||0===n.length&&(0,o.createComponentVNode)(2,r.Box,{color:"label",children:"Beaker is empty."}),n.map((function(e){return(0,o.createComponentVNode)(2,r.Box,{color:"label",children:[e.volume," units of ",e.name," ",e.purity<1&&"(Purity: "+e.purity+")"]},e.name)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LaunchpadConsole=t.LaunchpadControl=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Grid,{width:"1px",children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"arrow-left",iconRotation:45,mb:1,onClick:function(){return n("move_pos",{x:-1,y:1})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"arrow-left",mb:1,onClick:function(){return n("move_pos",{x:-1})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"arrow-down",iconRotation:45,mb:1,onClick:function(){return n("move_pos",{x:-1,y:-1})}})]}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"arrow-up",mb:1,onClick:function(){return n("move_pos",{y:1})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"R",mb:1,onClick:function(){return n("set_pos",{x:0,y:0})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"arrow-down",mb:1,onClick:function(){return n("move_pos",{y:-1})}})]}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"arrow-up",iconRotation:45,mb:1,onClick:function(){return n("move_pos",{x:1,y:1})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"arrow-right",mb:1,onClick:function(){return n("move_pos",{x:1})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"arrow-right",iconRotation:45,mb:1,onClick:function(){return n("move_pos",{x:1,y:-1})}})]})]})},l=function(e,t){var n=e.topLevel,c=(0,r.useBackend)(t),l=c.act,d=c.data,u=d.x,s=d.y,m=d.pad_name,p=d.range;return(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Input,{value:m,width:"170px",onChange:function(e,t){return l("rename",{name:t})}}),level:n?1:2,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Remove",color:"bad",onClick:function(){return l("remove")}}),children:[(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Controls",level:2,children:(0,o.createComponentVNode)(2,i)})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Target",level:2,children:(0,o.createComponentVNode)(2,a.Box,{fontSize:"26px",children:[(0,o.createComponentVNode)(2,a.Box,{mb:1,children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,mr:1,children:"X:"}),(0,o.createComponentVNode)(2,a.NumberInput,{value:u,minValue:-p,maxValue:p,lineHeight:"30px",fontSize:"26px",width:"90px",height:"30px",stepPixelSize:10,onChange:function(e,t){return l("set_pos",{x:t})}})]}),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,mr:1,children:"Y:"}),(0,o.createComponentVNode)(2,a.NumberInput,{value:s,minValue:-p,maxValue:p,stepPixelSize:10,lineHeight:"30px",fontSize:"26px",width:"90px",height:"30px",onChange:function(e,t){return l("set_pos",{y:t})}})]})]})})})]}),(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"upload",content:"Launch",textAlign:"center",onClick:function(){return l("launch")}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"download",content:"Pull",textAlign:"center",onClick:function(){return l("pull")}})})]})]})};t.LaunchpadControl=l;t.LaunchpadConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,d=n.data,u=d.launchpads,s=void 0===u?[]:u,m=d.selected_id;return(0,o.createComponentVNode)(2,c.Window,{width:475,height:260,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:0===s.length&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Pads Connected"})||(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Flex,{minHeight:"190px",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"140px",minHeight:"190px",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,ellipsis:!0,content:e.name,selected:m===e.id,color:"transparent",onClick:function(){return i("select_pad",{id:e.id})}},e.name)}))}),(0,o.createComponentVNode)(2,a.Flex.Item,{minHeight:"100%",children:(0,o.createComponentVNode)(2,a.Divider,{vertical:!0})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,minHeight:"100%",children:m&&(0,o.createComponentVNode)(2,l)||(0,o.createComponentVNode)(2,a.Box,{children:"Please select a pad"})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosCyborgRemoteMonitorContent=t.NtosCyborgRemoteMonitor=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NtosCyborgRemoteMonitor=function(e,t){return(0,o.createComponentVNode)(2,c.NtosWindow,{width:600,height:800,resizable:!0,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.card,d=i.cyborgs,u=void 0===d?[]:d;return u.length?(0,o.createFragment)([!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Certain features require an ID card login."}),u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"terminal",content:"Send Message",color:"blue",disabled:!l,onClick:function(){return c("messagebot",{ref:e.ref})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Box,{color:e.status?"bad":e.locked_down?"average":"good",children:e.status?"Not Responding":e.locked_down?"Locked Down":e.shell_discon?"Nominal/Disconnected":"Nominal"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge",children:(0,o.createComponentVNode)(2,a.Box,{color:e.charge<=30?"bad":e.charge<=70?"average":"good",children:"number"==typeof e.charge?e.charge+"%":"Not Found"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Module",children:e.module}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Upgrades",children:e.upgrades})]})},e.ref)}))],0):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cyborg units detected."})};t.NtosCyborgRemoteMonitorContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.NtosRadarContent=t.NtosRadar=void 0;var o=n(0),r=n(6),a=n(63),c=n(2),i=n(1),l=n(3);t.NtosRadar=function(e,t){return(0,o.createComponentVNode)(2,l.NtosWindow,{width:800,height:600,theme:"ntos",children:(0,o.createComponentVNode)(2,d,{sig_err:"Signal Lost"})})};var d=function(e,t){var n=(0,c.useBackend)(t),d=n.act,u=n.data,s=u.selected,m=u.object,p=void 0===m?[]:m,C=u.target,h=void 0===C?[]:C,N=u.scanning,V=e.sig_err;return(0,o.createComponentVNode)(2,i.Flex,{direction:"row",hight:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{position:"relative",width:20.5,hight:"100%",children:(0,o.createComponentVNode)(2,l.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"redo-alt",content:N?"Scanning...":"Scan",color:"blue",disabled:N,onClick:function(){return d("scan")}}),!p.length&&!N&&(0,o.createVNode)(1,"div",null,"No trackable signals found",16),!N&&p.map((function(e){return(0,o.createVNode)(1,"div",(0,r.classes)(["Button","Button--fluid","Button--color--transparent","Button--ellipsis",e.ref===s&&"Button--selected"]),e.name,0,{title:e.name,onClick:function(){d("selecttarget",{ref:e.ref})}},e.dev)}))]})})}),(0,o.createComponentVNode)(2,i.Flex.Item,{style:{"background-image":'url("'+(0,a.resolveAsset)("ntosradarbackground.png")+'")',"background-position":"center","background-repeat":"no-repeat",top:"20px"},position:"relative",m:1.5,width:45,height:45,children:0===Object.keys(h).length?!!s&&(0,o.createComponentVNode)(2,i.NoticeBox,{position:"absolute",top:20.6,left:1.35,width:42,fontSize:"30px",textAlign:"center",children:V}):!!h.userot&&(0,o.createComponentVNode)(2,i.Box,{as:"img",src:(0,a.resolveAsset)(h.arrowstyle),position:"absolute",top:"20px",left:"243px",style:{transform:"rotate("+h.rot+"deg)"}})||(0,o.createComponentVNode)(2,i.Icon,{name:h.pointer,position:"absolute",size:2,color:h.color,top:10*h.locy+19+"px",left:10*h.locx+16+"px"})})]})};t.NtosRadarContent=d},function(e,t,n){"use strict";t.__esModule=!0,t.RequestKioskContent=t.RequestKiosk=void 0;var o=n(0),r=n(2),a=n(1),c=n(39),i=n(3);t.RequestKiosk=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{width:550,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.accountName,u=l.requests,s=void 0===u?[]:u,m=l.applicants,p=void 0===m?[]:m,C=l.bountyValue;l.bountyText;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Account",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:"Log out",onClick:function(){return i("clear")}}),children:d||"N/A"})})}),(0,o.createComponentVNode)(2,a.Flex,{mb:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:null==s?void 0:s.map((function(e){return(0,o.createComponentVNode)(2,a.Collapsible,{title:e.owner,width:"300px",children:(0,o.createComponentVNode)(2,a.Section,{width:"300px",children:[(0,o.createComponentVNode)(2,a.Flex,{spacing:1,align:"baseline",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,width:"310px",children:e.owner}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100px",children:(0,c.formatMoney)(e.value)+" cr"}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"pen-fancy",content:"Apply",onClick:function(){return i("apply",{request:e.acc_number})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"trash-alt",content:"Delete",color:"red",onClick:function(){return i("deleteRequest",{request:e.acc_number})}})]})]}),(0,o.createComponentVNode)(2,a.Section,{align:"center",children:(0,o.createVNode)(1,"i",null,[(0,o.createTextVNode)('"'),e.description,(0,o.createTextVNode)('"')],0)}),(0,o.createComponentVNode)(2,a.Section,{title:"Request Applicants",children:null==p?void 0:p.map((function(t){return t.request_id===e.acc_number&&(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,p:.5,backgroundColor:"rgba(0, 0, 69, 0.5)",width:"510px",style:{border:"2px solid rgba(13, 13, 213, 0.7)"},children:t.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{align:"end",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"cash-register",onClick:function(){return i("payApplicant",{applicant:t.requestee_id,request:e.acc_number})}})})]})}))})]},e.name)},e.name)}))}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Collapsible,{title:"New Bounty",width:"220px",color:"green",children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.TextArea,{fluid:!0,height:"250px",width:"200px",backgroundColor:"black",textColor:"white",onChange:function(e,t){return i("bountyText",{bountytext:t})}}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.NumberInput,{animate:!0,unit:"cr",minValue:1,maxValue:1e3,value:C,width:"80px",onChange:function(e,t){return i("bountyVal",{bountyval:t})}})}),(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Submit bounty",onClick:function(){return i("createBounty")}})]})})})]})],4)};t.RequestKioskContent=l},function(e,t,n){"use strict";t.__esModule=!0,t.StationAlertConsoleContent=t.StationAlertConsole=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.StationAlertConsole=function(){return(0,o.createComponentVNode)(2,c.Window,{width:325,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t).data.alarms||[],c=n.Fire||[],i=n.Atmosphere||[],l=n.Power||[];return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Fire Alarms",children:(0,o.createVNode)(1,"ul",null,[0===c.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),c.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)}),(0,o.createComponentVNode)(2,a.Section,{title:"Atmospherics Alarms",children:(0,o.createVNode)(1,"ul",null,[0===i.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),i.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Alarms",children:(0,o.createVNode)(1,"ul",null,[0===l.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),l.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)})],4)};t.StationAlertConsoleContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.PortableBasicInfo=void 0;var o=n(0),r=n(2),a=n(1);t.PortableBasicInfo=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.connected,d=i.holding,u=i.on,s=i.pressure;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return c("power")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:s})," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Port",color:l?"good":"average",children:l?"Connected":"Not Connected"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Holding Tank",minHeight:"82px",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!d,onClick:function(){return c("eject")}}),children:d?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Label",children:d.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d.pressure})," kPa"]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No holding tank"})})],4)}},,,,,,,,,,,function(e,t,n){n(148),e.exports=n(447)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var o=n(0);n(449),n(450),n(451),n(452),n(453),n(454),n(455),n(456),n(457),n(458);var r,a,c=n(99),i=(n(100),n(135)),l=n(186),d=n(136),u=n(187),s=n(57);c.perf.mark("inception",null==(r=window.performance)||null==(a=r.timing)?void 0:a.navigationStart),c.perf.mark("init");var m=(0,u.configureStore)(),p=(0,d.createRenderer)((function(){var e=(0,n(486).getRoutedComponent)(m);return(0,o.createComponentVNode)(2,u.StoreProvider,{store:m,children:(0,o.createComponentVNode)(2,e)})}));!function C(){if("loading"!==document.readyState){for((0,s.setupGlobalEvents)(),(0,i.setupHotKeys)(),(0,l.captureExternalLinks)(),m.subscribe(p),window.update=function(e){return m.dispatch(Byond.parseJson(e))};;){var e=window.__updateQueue__.shift();if(!e)break;window.update(e)}0}else document.addEventListener("DOMContentLoaded",C)}()},,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){},function(e,t,n){},function(e,t,n){},,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";t.__esModule=!0,t.getRoutedComponent=void 0;var o=n(0),r=n(2),a=(n(190),n(3)),c=n(487),i=function(e,t){return function(){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:["notFound"===e&&(0,o.createVNode)(1,"div",null,[(0,o.createTextVNode)("Interface "),(0,o.createVNode)(1,"b",null,t,0),(0,o.createTextVNode)(" was not found.")],4),"missingExport"===e&&(0,o.createVNode)(1,"div",null,[(0,o.createTextVNode)("Interface "),(0,o.createVNode)(1,"b",null,t,0),(0,o.createTextVNode)(" is missing an export.")],4)]})})}},l=function(){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0})})};t.getRoutedComponent=function(e){var t=e.getState(),n=(0,r.selectBackend)(t),o=n.suspended,a=n.config;if(o)return l;var d,u=null==a?void 0:a["interface"];try{d=c("./"+u+".js")}catch(m){if("MODULE_NOT_FOUND"===m.code)return i("notFound",u);throw m}var s=d[u];return s||i("missingExport",u)}},function(e,t,n){var o={"./AbductorConsole.js":488,"./Achievements.js":489,"./AiAirlock.js":490,"./AiRestorer.js":201,"./AirAlarm.js":491,"./AirlockElectronics.js":493,"./Apc.js":494,"./ApcControl.js":495,"./AtmosAlertConsole.js":496,"./AtmosControlConsole.js":497,"./AtmosControlPanel.js":498,"./AtmosFilter.js":499,"./AtmosMixer.js":500,"./AtmosPump.js":501,"./AtmosRelief.js":502,"./AutomatedAnnouncement.js":503,"./BankMachine.js":504,"./Bepis.js":505,"./Biogenerator.js":506,"./BlackmarketUplink.js":507,"./BluespaceArtillery.js":508,"./BluespaceLocator.js":509,"./BorgPanel.js":510,"./BrigTimer.js":511,"./CameraConsole.js":512,"./Canister.js":513,"./Canvas.js":514,"./Cargo.js":203,"./CargoBountyConsole.js":515,"./CargoExpress.js":516,"./CargoHoldTerminal.js":517,"./CellularEmporium.js":518,"./CentcomPodLauncher.js":519,"./ChemAcclimator.js":520,"./ChemDebugSynthesizer.js":521,"./ChemDispenser.js":522,"./ChemFilter.js":523,"./ChemHeater.js":524,"./ChemMaster.js":525,"./ChemPress.js":526,"./ChemReactionChamber.js":527,"./ChemSplitter.js":528,"./ChemSynthesizer.js":529,"./CivCargoHoldTerminal.js":530,"./ClockworkSlab.js":531,"./CodexGigas.js":532,"./ComputerFabricator.js":533,"./Crayon.js":534,"./CrewConsole.js":535,"./Cryo.js":536,"./DecalPainter.js":537,"./DisposalUnit.js":538,"./DnaConsole.js":539,"./DnaVault.js":540,"./EightBallVote.js":541,"./Electrolyzer.js":542,"./Electropack.js":543,"./EmergencyShuttleConsole.js":544,"./EngravedMessage.js":545,"./ExosuitControlConsole.js":546,"./ExosuitFabricator.js":547,"./ForbiddenLore.js":548,"./Gateway.js":549,"./GhostPoolProtection.js":550,"./GlandDispenser.js":551,"./Gps.js":552,"./GravityGenerator.js":553,"./GulagItemReclaimer.js":554,"./GulagTeleporterConsole.js":555,"./Holodeck.js":556,"./Holopad.js":557,"./HypnoChair.js":558,"./ImplantChair.js":559,"./InfraredEmitter.js":560,"./Intellicard.js":561,"./Jukebox.js":562,"./KeycardAuth.js":563,"./LaborClaimConsole.js":564,"./LanguageMenu.js":565,"./LaunchpadConsole.js":206,"./LaunchpadRemote.js":566,"./MafiaPanel.js":567,"./MalfunctionModulePicker.js":568,"./MechBayPowerConsole.js":569,"./MechpadConsole.js":570,"./MedicalKiosk.js":571,"./Microscope.js":572,"./MiningVendor.js":573,"./Mint.js":574,"./Mule.js":575,"./NaniteChamberControl.js":576,"./NaniteCloudControl.js":577,"./NaniteProgramHub.js":578,"./NaniteProgrammer.js":579,"./NaniteRemote.js":580,"./NotificationPreferences.js":581,"./NtnetRelay.js":582,"./NtosAiRestorer.js":583,"./NtosArcade.js":584,"./NtosAtmos.js":585,"./NtosBountyConsole.js":586,"./NtosCard.js":587,"./NtosConfiguration.js":588,"./NtosCrewManifest.js":589,"./NtosCyborgRemoteMonitor.js":207,"./NtosCyborgRemoteMonitorSyndicate.js":590,"./NtosFileManager.js":591,"./NtosJobManager.js":592,"./NtosMain.js":593,"./NtosNetChat.js":594,"./NtosNetDos.js":595,"./NtosNetDownloader.js":596,"./NtosNetMonitor.js":597,"./NtosPowerMonitor.js":598,"./NtosRadar.js":208,"./NtosRadarSyndicate.js":599,"./NtosRequestKiosk.js":600,"./NtosRevelation.js":601,"./NtosRoboControl.js":602,"./NtosShipping.js":603,"./NtosStationAlertConsole.js":604,"./NtosSupermatterMonitor.js":605,"./NuclearBomb.js":606,"./OperatingComputer.js":607,"./Orbit.js":608,"./OreBox.js":609,"./OreRedemptionMachine.js":610,"./Pandemic.js":611,"./PaperSheet.js":612,"./ParticleAccelerator.js":615,"./PersonalCrafting.js":616,"./Photocopier.js":617,"./PortableChemMixer.js":618,"./PortableGenerator.js":619,"./PortablePump.js":620,"./PortableScrubber.js":621,"./PortableTurret.js":622,"./PowerMonitor.js":143,"./ProbingConsole.js":623,"./ProximitySensor.js":624,"./Radio.js":625,"./RadioactiveMicrolaser.js":626,"./RapidPipeDispenser.js":627,"./RemoteRobotControl.js":628,"./RequestKiosk.js":209,"./RoboticsControlConsole.js":629,"./Roulette.js":630,"./SatelliteControl.js":631,"./ScannerGate.js":632,"./SeedExtractor.js":633,"./ShuttleConsole.js":634,"./ShuttleManipulator.js":635,"./Signaler.js":636,"./SkillPanel.js":637,"./SkillStation.js":638,"./Sleeper.js":639,"./SlimeBodySwapper.js":640,"./SmartVend.js":641,"./Smes.js":642,"./SmokeMachine.js":643,"./SolarControl.js":644,"./SpaceHeater.js":645,"./SpawnersMenu.js":646,"./StationAlertConsole.js":210,"./SuitStorageUnit.js":647,"./SyndContractor.js":648,"./TachyonArray.js":649,"./Tank.js":650,"./TankDispenser.js":651,"./Telecomms.js":652,"./TelecommsInteraction.js":653,"./TelecommsLogBrowser.js":654,"./TelecommsMonitor.js":655,"./TelecommsPDALog.js":656,"./Teleporter.js":657,"./ThermoMachine.js":658,"./Timer.js":659,"./TransferValve.js":660,"./TurbineComputer.js":661,"./TurretControl.js":662,"./Uplink.js":142,"./VaultController.js":663,"./Vendatray.js":664,"./Vending.js":665,"./VrSleeper.js":666,"./Wires.js":667};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=487},function(e,t,n){"use strict";t.__esModule=!0,t.AbductorConsole=void 0;var o=n(0),r=n(142),a=n(2),c=n(1),i=n(3);t.AbductorConsole=function(e,t){var n=(0,a.useSharedState)(t,"tab",1),r=n[0],s=n[1];return(0,o.createComponentVNode)(2,i.Window,{theme:"abductor",width:600,height:532,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{icon:"list",lineHeight:"23px",selected:1===r,onClick:function(){return s(1)},children:"Abductsoft 3000"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{icon:"list",lineHeight:"23px",selected:2===r,onClick:function(){return s(2)},children:"Mission Settings"})]}),1===r&&(0,o.createComponentVNode)(2,l),2===r&&(0,o.createFragment)([(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u)],4)]})})};var l=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),l=i.experiment,d=i.points,u=i.credits;return l?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Collected Samples",children:d})})}),(0,o.createComponentVNode)(2,r.GenericUplink,{currencyAmount:u,currencySymbol:"Credits"})],4):(0,o.createComponentVNode)(2,c.NoticeBox,{danger:!0,children:"No Experiment Machine Detected"})},d=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.pad,d=i.gizmo;return l?(0,o.createComponentVNode)(2,c.Section,{title:"Emergency Teleport",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"exclamation-circle",content:"Activate",color:"bad",onClick:function(){return r("teleporter_send")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Mark Retrieval",children:(0,o.createComponentVNode)(2,c.Button,{icon:d?"user-plus":"user-slash",content:d?"Retrieve":"No Mark",disabled:!d,onClick:function(){return r("teleporter_retrieve")}})})})}):(0,o.createComponentVNode)(2,c.NoticeBox,{danger:!0,children:"No Telepad Detected"})},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.vest,d=i.vest_mode,u=i.vest_lock;return l?(0,o.createComponentVNode)(2,c.Section,{title:"Agent Vest Settings",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:u?"lock":"unlock",content:u?"Locked":"Unlocked",onClick:function(){return r("toggle_vest")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Mode",children:(0,o.createComponentVNode)(2,c.Button,{icon:1===d?"eye-slash":"fist-raised",content:1===d?"Stealth":"Combat",onClick:function(){return r("flip_vest")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Disguise",children:(0,o.createComponentVNode)(2,c.Button,{icon:"user-secret",content:"Select",onClick:function(){return r("select_disguise")}})})]})}):(0,o.createComponentVNode)(2,c.NoticeBox,{danger:!0,children:"No Agent Vest Detected"})}},function(e,t,n){"use strict";t.__esModule=!0,t.Achievements=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.Achievements=function(e,t){var n=(0,r.useBackend)(t).data,l=n.categories,u=(0,r.useLocalState)(t,"category",l[0]),s=u[0],m=u[1],p=n.achievements.filter((function(e){return e.category===s}));return(0,o.createComponentVNode)(2,c.Window,{title:"Achievements",width:540,height:680,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[l.map((function(e){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:s===e,onClick:function(){return m(e)},children:e},e)})),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:"High Scores"===s,onClick:function(){return m("High Scores")},children:"High Scores"})]}),"High Scores"===s&&(0,o.createComponentVNode)(2,d)||(0,o.createComponentVNode)(2,i,{achievements:p})]})})};var i=function(e,t){var n=e.achievements;return(0,o.createComponentVNode)(2,a.Table,{children:n.map((function(e){return(0,o.createComponentVNode)(2,l,{achievement:e},e.name)}))})},l=function(e){var t=e.achievement,n=t.name,r=t.desc,c=t.icon_class,i=t.value,l=t.score;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,a.Box,{m:1,className:c})}),(0,o.createComponentVNode)(2,a.Table.Cell,{verticalAlign:"top",children:[(0,o.createVNode)(1,"h1",null,n,0),r,l&&(0,o.createComponentVNode)(2,a.Box,{color:i>0?"good":"bad",children:i>0?"Earned "+i+" times":"Locked"})||(0,o.createComponentVNode)(2,a.Box,{color:i?"good":"bad",children:i?"Unlocked":"Locked"})]})]},n)},d=function(e,t){var n=(0,r.useBackend)(t).data,c=n.highscore,i=n.user_ckey,l=(0,r.useLocalState)(t,"highscore",0),d=l[0],u=l[1],s=c[d];if(!s)return null;var m=Object.keys(s.scores).map((function(e){return{ckey:e,value:s.scores[e]}}));return(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Tabs,{vertical:!0,children:c.map((function(e,t){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:d===t,onClick:function(){return u(t)},children:e.name},e.name)}))})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"#"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Key"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Score"})]}),m.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{className:"candystripe",m:2,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{color:"label",textAlign:"center",children:t+1}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:e.ckey===i&&"green",textAlign:"center",children:[0===t&&(0,o.createComponentVNode)(2,a.Icon,{name:"crown",color:"yellow",mr:2}),e.ckey,0===t&&(0,o.createComponentVNode)(2,a.Icon,{name:"crown",color:"yellow",ml:2})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.value})]},e.ckey)}))]})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AiAirlock=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}};t.AiAirlock=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=i[d.power.main]||i[0],s=i[d.power.backup]||i[0],m=i[d.shock]||i[0];return(0,o.createComponentVNode)(2,c.Window,{width:500,height:390,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Main",color:u.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",disabled:!d.power.main,content:"Disrupt",onClick:function(){return l("disrupt-main")}}),children:[d.power.main?"Online":"Offline"," ",d.wires.main_1&&d.wires.main_2?d.power.main_timeleft>0&&"["+d.power.main_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Backup",color:s.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",disabled:!d.power.backup,content:"Disrupt",onClick:function(){return l("disrupt-backup")}}),children:[d.power.backup?"Online":"Offline"," ",d.wires.backup_1&&d.wires.backup_2?d.power.backup_timeleft>0&&"["+d.power.backup_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Electrify",color:m.color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",disabled:!(d.wires.shock&&0===d.shock),content:"Restore",onClick:function(){return l("shock-restore")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",disabled:!d.wires.shock,content:"Temporary",onClick:function(){return l("shock-temp")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",disabled:!d.wires.shock,content:"Permanent",onClick:function(){return l("shock-perm")}})],4),children:[2===d.shock?"Safe":"Electrified"," ",(d.wires.shock?d.shock_timeleft>0&&"["+d.shock_timeleft+"s]":"[Wires have been cut!]")||-1===d.shock_timeleft&&"[Permanent]"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Access and Door Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Scan",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.id_scanner?"power-off":"times",content:d.id_scanner?"Enabled":"Disabled",selected:d.id_scanner,disabled:!d.wires.id_scanner,onClick:function(){return l("idscan-toggle")}}),children:!d.wires.id_scanner&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Access",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.emergency?"power-off":"times",content:d.emergency?"Enabled":"Disabled",selected:d.emergency,onClick:function(){return l("emergency-toggle")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Bolts",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.locked?"lock":"unlock",content:d.locked?"Lowered":"Raised",selected:d.locked,disabled:!d.wires.bolts,onClick:function(){return l("bolt-toggle")}}),children:!d.wires.bolts&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.lights?"power-off":"times",content:d.lights?"Enabled":"Disabled",selected:d.lights,disabled:!d.wires.lights,onClick:function(){return l("light-toggle")}}),children:!d.wires.lights&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.safe?"power-off":"times",content:d.safe?"Enabled":"Disabled",selected:d.safe,disabled:!d.wires.safe,onClick:function(){return l("safe-toggle")}}),children:!d.wires.safe&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.speed?"power-off":"times",content:d.speed?"Enabled":"Disabled",selected:d.speed,disabled:!d.wires.timing,onClick:function(){return l("speed-toggle")}}),children:!d.wires.timing&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Control",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.opened?"sign-out-alt":"sign-in-alt",content:d.opened?"Open":"Closed",selected:d.opened,disabled:d.locked||d.welded,onClick:function(){return l("open-close")}}),children:!(!d.locked&&!d.welded)&&(0,o.createVNode)(1,"span",null,[(0,o.createTextVNode)("[Door is "),d.locked?"bolted":"",d.locked&&d.welded?" and ":"",d.welded?"welded":"",(0,o.createTextVNode)("!]")],0)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirAlarm=void 0;var o=n(0),r=n(9),a=(n(19),n(2)),c=n(1),i=(n(36),n(3)),l=n(64),d=n(492);t.AirAlarm=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),c=r.locked&&!r.siliconUser;return(0,o.createComponentVNode)(2,i.Window,{width:440,height:650,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l.InterfaceLockNoticeBox),(0,o.createComponentVNode)(2,u),!c&&(0,o.createComponentVNode)(2,m)]})})};var u=function(e,t){var n=(0,a.useBackend)(t).data,i=(n.environment_data||[]).filter((function(e){return e.value>=.01})),l={0:{color:"good",localStatusText:"Optimal"},1:{color:"average",localStatusText:"Caution"},2:{color:"bad",localStatusText:"Danger (Internals Required)"}},d=l[n.danger_level]||l[0];return(0,o.createComponentVNode)(2,c.Section,{title:"Air Status",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[i.length>0&&(0,o.createFragment)([i.map((function(e){var t=l[e.danger_level]||l[0];return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.name,color:t.color,children:[(0,r.toFixed)(e.value,2),e.unit]},e.name)})),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Local status",color:d.color,children:d.localStatusText}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Area status",color:n.atmos_alarm||n.fire_alarm?"bad":"good",children:(n.atmos_alarm?"Atmosphere Alarm":n.fire_alarm&&"Fire Alarm")||"Nominal"})],0)||(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Warning",color:"bad",children:"Cannot obtain air sample for analysis."}),!!n.emagged&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Warning",color:"bad",children:"Safety measures offline. Device may exhibit abnormal behavior."})]})})},s={home:{title:"Air Controls",component:function(){return p}},vents:{title:"Vent Controls",component:function(){return C}},scrubbers:{title:"Scrubber Controls",component:function(){return h}},modes:{title:"Operating Mode",component:function(){return N}},thresholds:{title:"Alarm Thresholds",component:function(){return V}}},m=function(e,t){var n=(0,a.useLocalState)(t,"screen"),r=n[0],i=n[1],l=s[r]||s.home,d=l.component();return(0,o.createComponentVNode)(2,c.Section,{title:l.title,buttons:r&&(0,o.createComponentVNode)(2,c.Button,{icon:"arrow-left",content:"Back",onClick:function(){return i()}}),children:(0,o.createComponentVNode)(2,d)})},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=(0,a.useLocalState)(t,"screen"),d=(l[0],l[1]),u=i.mode,s=i.atmos_alarm;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:s?"exclamation-triangle":"exclamation",color:s&&"caution",content:"Area Atmosphere Alarm",onClick:function(){return r(s?"reset":"alarm")}}),(0,o.createComponentVNode)(2,c.Box,{mt:1}),(0,o.createComponentVNode)(2,c.Button,{icon:3===u?"exclamation-triangle":"exclamation",color:3===u&&"danger",content:"Panic Siphon",onClick:function(){return r("mode",{mode:3===u?1:3})}}),(0,o.createComponentVNode)(2,c.Box,{mt:2}),(0,o.createComponentVNode)(2,c.Button,{icon:"sign-out-alt",content:"Vent Controls",onClick:function(){return d("vents")}}),(0,o.createComponentVNode)(2,c.Box,{mt:1}),(0,o.createComponentVNode)(2,c.Button,{icon:"filter",content:"Scrubber Controls",onClick:function(){return d("scrubbers")}}),(0,o.createComponentVNode)(2,c.Box,{mt:1}),(0,o.createComponentVNode)(2,c.Button,{icon:"cog",content:"Operating Mode",onClick:function(){return d("modes")}}),(0,o.createComponentVNode)(2,c.Box,{mt:1}),(0,o.createComponentVNode)(2,c.Button,{icon:"chart-bar",content:"Alarm Thresholds",onClick:function(){return d("thresholds")}})],4)},C=function(e,t){var n=(0,a.useBackend)(t).data.vents;return n&&0!==n.length?n.map((function(e){return(0,o.createComponentVNode)(2,d.Vent,{vent:e},e.id_tag)})):"Nothing to show"},h=function(e,t){var n=(0,a.useBackend)(t).data.scrubbers;return n&&0!==n.length?n.map((function(e){return(0,o.createComponentVNode)(2,d.Scrubber,{scrubber:e},e.id_tag)})):"Nothing to show"},N=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.modes;return i&&0!==i.length?i.map((function(e){return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:e.selected?"check-square-o":"square-o",selected:e.selected,color:e.selected&&e.danger&&"danger",content:e.name,onClick:function(){return r("mode",{mode:e.mode})}}),(0,o.createComponentVNode)(2,c.Box,{mt:1})],4,e.mode)})):"Nothing to show"},V=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.thresholds;return(0,o.createVNode)(1,"table","LabeledList",[(0,o.createVNode)(1,"thead",null,(0,o.createVNode)(1,"tr",null,[(0,o.createVNode)(1,"td"),(0,o.createVNode)(1,"td","color-bad","min2",16),(0,o.createVNode)(1,"td","color-average","min1",16),(0,o.createVNode)(1,"td","color-average","max1",16),(0,o.createVNode)(1,"td","color-bad","max2",16)],4),2),(0,o.createVNode)(1,"tbody",null,l.map((function(e){return(0,o.createVNode)(1,"tr",null,[(0,o.createVNode)(1,"td","LabeledList__label",e.name,0),e.settings.map((function(e){return(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,c.Button,{content:(0,r.toFixed)(e.selected,2),onClick:function(){return i("threshold",{env:e.env,"var":e.val})}}),2,null,e.val)}))],0,null,e.name)})),0)],4,{style:{width:"100%"}})}},function(e,t,n){"use strict";t.__esModule=!0,t.Scrubber=t.Vent=void 0;var o=n(0),r=n(19),a=n(2),c=n(1),i=n(36);t.Vent=function(e,t){var n=e.vent,i=(0,a.useBackend)(t).act,l=n.id_tag,d=n.long_name,u=n.power,s=n.checks,m=n.excheck,p=n.incheck,C=n.direction,h=n.external,N=n.internal,V=n.extdefault,b=n.intdefault;return(0,o.createComponentVNode)(2,c.Section,{level:2,title:(0,r.decodeHtmlEntities)(d),buttons:(0,o.createComponentVNode)(2,c.Button,{icon:u?"power-off":"times",selected:u,content:u?"On":"Off",onClick:function(){return i("power",{id_tag:l,val:Number(!u)})}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Mode",children:(0,o.createComponentVNode)(2,c.Button,{icon:"sign-in-alt",content:C?"Pressurizing":"Scrubbing",color:!C&&"danger",onClick:function(){return i("direction",{id_tag:l,val:Number(!C)})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pressure Regulator",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"sign-in-alt",content:"Internal",selected:p,onClick:function(){return i("incheck",{id_tag:l,val:s})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"sign-out-alt",content:"External",selected:m,onClick:function(){return i("excheck",{id_tag:l,val:s})}})]}),!!p&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Internal Target",children:[(0,o.createComponentVNode)(2,c.NumberInput,{value:Math.round(N),unit:"kPa",width:"75px",minValue:0,step:10,maxValue:5066,onChange:function(e,t){return i("set_internal_pressure",{id_tag:l,value:t})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"undo",disabled:b,content:"Reset",onClick:function(){return i("reset_internal_pressure",{id_tag:l})}})]}),!!m&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"External Target",children:[(0,o.createComponentVNode)(2,c.NumberInput,{value:Math.round(h),unit:"kPa",width:"75px",minValue:0,step:10,maxValue:5066,onChange:function(e,t){return i("set_external_pressure",{id_tag:l,value:t})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"undo",disabled:V,content:"Reset",onClick:function(){return i("reset_external_pressure",{id_tag:l})}})]})]})})};t.Scrubber=function(e,t){var n=e.scrubber,l=(0,a.useBackend)(t).act,d=n.long_name,u=n.power,s=n.scrubbing,m=n.id_tag,p=n.widenet,C=n.filter_types;return(0,o.createComponentVNode)(2,c.Section,{level:2,title:(0,r.decodeHtmlEntities)(d),buttons:(0,o.createComponentVNode)(2,c.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return l("power",{id_tag:m,val:Number(!u)})}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Mode",children:[(0,o.createComponentVNode)(2,c.Button,{icon:s?"filter":"sign-in-alt",color:s||"danger",content:s?"Scrubbing":"Siphoning",onClick:function(){return l("scrubbing",{id_tag:m,val:Number(!s)})}}),(0,o.createComponentVNode)(2,c.Button,{icon:p?"expand":"compress",selected:p,content:p?"Expanded range":"Normal range",onClick:function(){return l("widenet",{id_tag:m,val:Number(!p)})}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Filters",children:s&&C.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{icon:e.enabled?"check-square-o":"square-o",content:(0,i.getGasLabel)(e.gas_id,e.gas_name),title:e.gas_name,selected:e.enabled,onClick:function(){return l("toggle_filter",{id_tag:m,val:e.gas_id})}},e.gas_id)}))||"N/A"})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirlockElectronics=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=n(202);t.AirlockElectronics=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.oneAccess,s=d.unres_direction,m=d.regions||[],p=d.accesses||[];return(0,o.createComponentVNode)(2,c.Window,{width:420,height:485,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Main",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Access Required",children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"unlock":"lock",content:u?"One":"All",onClick:function(){return l("one_access")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unrestricted Access",children:[(0,o.createComponentVNode)(2,a.Button,{icon:1&s?"check-square-o":"square-o",content:"North",selected:1&s,onClick:function(){return l("direc_set",{unres_direction:"1"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:2&s?"check-square-o":"square-o",content:"South",selected:2&s,onClick:function(){return l("direc_set",{unres_direction:"2"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:4&s?"check-square-o":"square-o",content:"East",selected:4&s,onClick:function(){return l("direc_set",{unres_direction:"4"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:8&s?"check-square-o":"square-o",content:"West",selected:8&s,onClick:function(){return l("direc_set",{unres_direction:"8"})}})]})]})}),(0,o.createComponentVNode)(2,i.AccessList,{accesses:m,selectedList:p,accessMod:function(e){return l("set",{access:e})},grantAll:function(){return l("grant_all")},denyAll:function(){return l("clear_all")},grantDep:function(e){return l("grant_region",{region:e})},denyDep:function(e){return l("deny_region",{region:e})}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Apc=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=n(64);t.Apc=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{width:450,height:445,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,u)})})};var l={2:{color:"good",externalPowerText:"External Power",chargingText:"Fully Charged"},1:{color:"average",externalPowerText:"Low External Power",chargingText:"Charging"},0:{color:"bad",externalPowerText:"No External Power",chargingText:"Not Charging"}},d={1:{icon:"terminal",content:"Override Programming",action:"hack"},2:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"},3:{icon:"caret-square-left",content:"Return to Main Core",action:"deoccupy"},4:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"}},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data,s=u.locked&&!u.siliconUser,m=l[u.externalPower]||l[0],p=l[u.chargingStatus]||l[0],C=u.powerChannels||[],h=d[u.malfStatus]||d[0],N=u.powerCellStatus/100;return u.failTime>0?(0,o.createComponentVNode)(2,a.NoticeBox,{children:[(0,o.createVNode)(1,"b",null,(0,o.createVNode)(1,"h3",null,"SYSTEM FAILURE",16),2),(0,o.createVNode)(1,"i",null,"I/O regulators malfunction detected! Waiting for system reboot...",16),(0,o.createVNode)(1,"br"),"Automatic reboot in ",u.failTime," seconds...",(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Reboot Now",onClick:function(){return c("reboot")}})]}):(0,o.createFragment)([(0,o.createComponentVNode)(2,i.InterfaceLockNoticeBox),(0,o.createComponentVNode)(2,a.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Main Breaker",color:m.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.isOperating?"power-off":"times",content:u.isOperating?"On":"Off",selected:u.isOperating&&!s,disabled:s,onClick:function(){return c("breaker")}}),children:["[ ",m.externalPowerText," ]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Cell",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:"good",value:N})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",color:p.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.chargeMode?"sync":"close",content:u.chargeMode?"Auto":"Off",disabled:s,onClick:function(){return c("charge")}}),children:["[ ",p.chargingText," ]"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Channels",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[C.map((function(e){var t=e.topicParams;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.title,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{inline:!0,mx:2,color:e.status>=2?"good":"bad",children:e.status>=2?"On":"Off"}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Auto",selected:!s&&(1===e.status||3===e.status),disabled:s,onClick:function(){return c("channel",t.auto)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:"On",selected:!s&&2===e.status,disabled:s,onClick:function(){return c("channel",t.on)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Off",selected:!s&&0===e.status,disabled:s,onClick:function(){return c("channel",t.off)}})],4),children:e.powerLoad},e.title)})),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Load",children:(0,o.createVNode)(1,"b",null,u.totalLoad,0)})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Misc",buttons:!!u.siliconUser&&(0,o.createFragment)([!!u.malfStatus&&(0,o.createComponentVNode)(2,a.Button,{icon:h.icon,content:h.content,color:"bad",onClick:function(){return c(h.action)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){return c("overload")}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cover Lock",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.coverLocked?"lock":"unlock",content:u.coverLocked?"Engaged":"Disengaged",disabled:s,onClick:function(){return c("cover")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Lighting",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:u.emergencyLights?"Enabled":"Disabled",disabled:s,onClick:function(){return c("emergency_lighting")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Night Shift Lighting",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:u.nightshiftLights?"Enabled":"Disabled",onClick:function(){return c("toggle_nightshift")}})}),1===u.hijackable&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{title:"Hijacking",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"unlock",content:"Hijack",disabled:u.hijacker,onClick:function(){return c("hijack")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lock",content:"Lockdown",isabled:!u.lockdownavail&&1===u.hijacked,onClick:function(){return c("lockdown")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:"Drain",disabled:!u.drainavail&&1===u.hijacked,onClick:function(){return c("drain")}})],4)})]})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.ApcControl=void 0;var o=n(0),r=n(14),a=n(30),c=n(6),i=n(2),l=n(1),d=n(3),u=n(143);t.ApcControl=function(e,t){var n=(0,i.useBackend)(t).data;return(0,o.createComponentVNode)(2,d.Window,{title:"APC Controller",width:550,height:500,resizable:!0,children:[1===n.authenticated&&(0,o.createComponentVNode)(2,m),0===n.authenticated&&(0,o.createComponentVNode)(2,s)]})};var s=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.emagged,c=1===a?"Open":"Log In";return(0,o.createComponentVNode)(2,d.Window.Content,{children:(0,o.createComponentVNode)(2,l.Button,{fluid:!0,color:1===a?"":"good",content:c,onClick:function(){return r("log-in")}})})},m=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.restoring,c=(0,i.useLocalState)(t,"tab-index",1),u=c[0],s=c[1];return(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Tabs,{children:[(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:1===u,onClick:function(){s(1),r("check-apcs")},children:"APC Control Panel"}),(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:2===u,onClick:function(){s(2),r("check-logs")},children:"Log View Panel"})]}),1===a&&(0,o.createComponentVNode)(2,l.Dimmer,{fontSize:"32px",children:[(0,o.createComponentVNode)(2,l.Icon,{name:"cog",spin:!0})," Resetting..."]}),1===u&&(0,o.createFragment)([(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,l.Box,{fillPositionedParent:!0,top:"53px",children:(0,o.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,C)})})],4),2===u&&(0,o.createComponentVNode)(2,l.Box,{fillPositionedParent:!0,top:"20px",children:(0,o.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,h)})})],0)},p=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,c=a.emagged,d=a.logging,u=(0,i.useLocalState)(t,"sortByField",null),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,l.Flex.Item,{children:[(0,o.createComponentVNode)(2,l.Box,{inline:!0,mr:2,color:"label",children:"Sort by:"}),(0,o.createComponentVNode)(2,l.Button.Checkbox,{checked:"name"===s,content:"Name",onClick:function(){return m("name"!==s&&"name")}}),(0,o.createComponentVNode)(2,l.Button.Checkbox,{checked:"charge"===s,content:"Charge",onClick:function(){return m("charge"!==s&&"charge")}}),(0,o.createComponentVNode)(2,l.Button.Checkbox,{checked:"draw"===s,content:"Draw",onClick:function(){return m("draw"!==s&&"draw")}})]}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1}),(0,o.createComponentVNode)(2,l.Flex.Item,{children:[1===c&&(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Button,{color:1===d?"bad":"good",content:1===d?"Stop Logging":"Restore Logging",onClick:function(){return r("toggle-logs")}}),(0,o.createComponentVNode)(2,l.Button,{content:"Reset Console",onClick:function(){return r("restore-console")}})],4),(0,o.createComponentVNode)(2,l.Button,{color:"bad",content:"Log Out",onClick:function(){return r("log-out")}})]})]})},C=function(e,t){var n=(0,i.useBackend)(t),c=n.data,d=n.act,s=(0,i.useLocalState)(t,"sortByField",null)[0],m=(0,a.flow)([(0,r.map)((function(e,t){return Object.assign({},e,{id:e.name+t})})),"name"===s&&(0,r.sortBy)((function(e){return e.name})),"charge"===s&&(0,r.sortBy)((function(e){return-e.charge})),"draw"===s&&(0,r.sortBy)((function(e){return-(0,u.powerRank)(e.load)}),(function(e){return-parseFloat(e.load)}))])(c.apcs);return(0,o.createComponentVNode)(2,l.Table,{children:[(0,o.createComponentVNode)(2,l.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,l.Table.Cell,{children:"On/Off"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Area"}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,children:"Charge"}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,textAlign:"right",children:"Draw"}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,title:"Equipment",children:"Eqp"}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,title:"Lighting",children:"Lgt"}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,title:"Environment",children:"Env"})]}),m.map((function(e,t){return(0,o.createVNode)(1,"tr","Table__row candystripe",[(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,l.Button,{icon:e.operating?"power-off":"times",color:e.operating?"good":"bad",onClick:function(){return d("breaker",{ref:e.ref})}}),2),(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,l.Button,{onClick:function(){return d("access-apc",{ref:e.ref})},children:e.name}),2),(0,o.createVNode)(1,"td","Table__cell text-right text-nowrap",(0,o.createComponentVNode)(2,u.AreaCharge,{charging:e.charging,charge:e.charge}),2),(0,o.createVNode)(1,"td","Table__cell text-right text-nowrap",e.load,0),(0,o.createVNode)(1,"td","Table__cell text-center text-nowrap",(0,o.createComponentVNode)(2,N,{target:"equipment",status:e.eqp,apc:e,act:d}),2),(0,o.createVNode)(1,"td","Table__cell text-center text-nowrap",(0,o.createComponentVNode)(2,N,{target:"lighting",status:e.lgt,apc:e,act:d}),2),(0,o.createVNode)(1,"td","Table__cell text-center text-nowrap",(0,o.createComponentVNode)(2,N,{target:"environ",status:e.env,apc:e,act:d}),2)],4,null,e.id)}))]})},h=function(e,t){var n=(0,i.useBackend)(t).data,c=(0,a.flow)([(0,r.map)((function(e,t){return Object.assign({},e,{id:e.entry+t})})),function(e){return e.reverse()}])(n.logs);return(0,o.createComponentVNode)(2,l.Box,{m:-.5,children:c.map((function(e){return(0,o.createComponentVNode)(2,l.Box,{p:.5,className:"candystripe",bold:!0,children:e.entry},e.id)}))})},N=function(e){var t=e.target,n=e.status,r=e.apc,a=e.act,c=Boolean(2&n),i=Boolean(1&n);return(0,o.createComponentVNode)(2,l.Button,{icon:i?"sync":"power-off",color:c?"good":"bad",onClick:function(){return a("toggle-minor",{type:t,value:V(n),ref:r.ref})}})},V=function(e){return 0===e?2:2===e?3:0};N.defaultHooks=c.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosAlertConsole=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.AtmosAlertConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.priority||[],u=l.minor||[];return(0,o.createComponentVNode)(2,c.Window,{width:350,height:300,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Alarms",children:(0,o.createVNode)(1,"ul",null,[0===d.length&&(0,o.createVNode)(1,"li","color-good","No Priority Alerts",16),d.map((function(e){return(0,o.createVNode)(1,"li",null,(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:e,color:"bad",onClick:function(){return i("clear",{zone:e})}}),2,null,e)})),0===u.length&&(0,o.createVNode)(1,"li","color-good","No Minor Alerts",16),u.map((function(e){return(0,o.createVNode)(1,"li",null,(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:e,color:"average",onClick:function(){return i("clear",{zone:e})}}),2,null,e)}))],0)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosControlConsole=void 0;var o=n(0),r=n(14),a=n(9),c=n(2),i=n(1),l=n(3);t.AtmosControlConsole=function(e,t){var n,d=(0,c.useBackend)(t),u=d.act,s=d.data,m=s.sensors||[];return(0,o.createComponentVNode)(2,l.Window,{width:500,height:315,resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:!!s.tank&&(null==(n=m[0])?void 0:n.long_name),children:m.map((function(e){var t=e.gases||{};return(0,o.createComponentVNode)(2,i.Section,{title:!s.tank&&e.long_name,level:2,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pressure",children:(0,a.toFixed)(e.pressure,2)+" kPa"}),!!e.temperature&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:(0,a.toFixed)(e.temperature,2)+" K"}),(0,r.map)((function(e,t){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:t,children:(0,a.toFixed)(e,2)+"%"})}))(t)]})},e.id_tag)}))}),s.tank&&(0,o.createComponentVNode)(2,i.Section,{title:"Controls",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"undo",content:"Reconnect",onClick:function(){return u("reconnect")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Input Injector",children:(0,o.createComponentVNode)(2,i.Button,{icon:s.inputting?"power-off":"times",content:s.inputting?"Injecting":"Off",selected:s.inputting,onClick:function(){return u("input")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Input Rate",children:(0,o.createComponentVNode)(2,i.NumberInput,{value:s.inputRate,unit:"L/s",width:"63px",minValue:0,maxValue:200,suppressFlicker:2e3,onChange:function(e,t){return u("rate",{rate:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Output Regulator",children:(0,o.createComponentVNode)(2,i.Button,{icon:s.outputting?"power-off":"times",content:s.outputting?"Open":"Closed",selected:s.outputting,onClick:function(){return u("output")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Output Pressure",children:(0,o.createComponentVNode)(2,i.NumberInput,{value:parseFloat(s.outputPressure),unit:"kPa",width:"75px",minValue:0,maxValue:4500,step:10,suppressFlicker:2e3,onChange:function(e,t){return u("pressure",{pressure:t})}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosControlPanel=void 0;var o=n(0),r=n(14),a=n(30),c=n(2),i=n(1),l=n(3);t.AtmosControlPanel=function(e,t){var n=(0,c.useBackend)(t),d=n.act,u=n.data,s=(0,a.flow)([(0,r.map)((function(e,t){return Object.assign({},e,{id:e.area+t})})),(0,r.sortBy)((function(e){return e.id}))])(u.excited_groups);return(0,o.createComponentVNode)(2,l.Window,{title:"SSAir Control Panel",width:900,height:500,resizable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{m:1,children:(0,o.createComponentVNode)(2,i.Flex,{justify:"space-between",align:"baseline",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return d("toggle-freeze")},color:1===u.frozen?"good":"bad",children:1===u.frozen?"Freeze Subsystem":"Unfreeze Subsystem"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:["Fire Cnt: ",u.fire_count]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:["Active Turfs: ",u.active_size]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:["Excited Groups: ",u.excited_size]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:["Hotspots: ",u.hotspots_size]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:["Superconductors: ",u.conducting_size]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:u.showing_user,onClick:function(){return d("toggle_user_display")},children:"Personal View"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:u.show_all,onClick:function(){return d("toggle_show_all")},children:"Display all"})})]})}),(0,o.createComponentVNode)(2,i.Box,{fillPositionedParent:!0,top:"45px",children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Area Name"}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:"Breakdown"}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:"Dismantle"}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:"Turfs"}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:1===u.display_max&&"Max Share"}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:"Display"})]}),s.map((function(e){return(0,o.createVNode)(1,"tr",null,[(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,i.Button,{content:e.area,onClick:function(){return d("move-to-target",{spot:e.jump_to})}}),2),(0,o.createVNode)(1,"td",null,e.breakdown,0),(0,o.createVNode)(1,"td",null,e.dismantle,0),(0,o.createVNode)(1,"td",null,e.size,0),(0,o.createVNode)(1,"td",null,1===u.display_max&&e.max_share,0),(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:e.should_show,onClick:function(){return d("toggle_show_group",{group:e.group})}}),2)],4,null,e.id)}))]})})})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosFilter=void 0;var o=n(0),r=n(2),a=n(1),c=n(36),i=n(3);t.AtmosFilter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.filter_types||[];return(0,o.createComponentVNode)(2,i.Window,{width:390,height:187,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:d.on?"power-off":"times",content:d.on?"On":"Off",selected:d.on,onClick:function(){return l("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transfer Rate",children:[(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(d.rate),width:"63px",unit:"L/s",minValue:0,maxValue:200,onDrag:function(e,t){return l("rate",{rate:t})}}),(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"plus",content:"Max",disabled:d.rate===d.max_rate,onClick:function(){return l("rate",{rate:"max"})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Filter",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{selected:e.selected,content:(0,c.getGasLabel)(e.id,e.name),onClick:function(){return l("filter",{mode:e.id})}},e.id)}))})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosMixer=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.AtmosMixer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:370,height:165,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.on?"power-off":"times",content:l.on?"On":"Off",selected:l.on,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output Pressure",children:[(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(l.set_pressure),unit:"kPa",width:"75px",minValue:0,maxValue:4500,step:10,onChange:function(e,t){return i("pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"plus",content:"Max",disabled:l.set_pressure===l.max_pressure,onClick:function(){return i("pressure",{pressure:"max"})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Node 1",children:(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:l.node1_concentration,unit:"%",width:"60px",minValue:0,maxValue:100,stepPixelSize:2,onDrag:function(e,t){return i("node1",{concentration:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Node 2",children:(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:l.node2_concentration,unit:"%",width:"60px",minValue:0,maxValue:100,stepPixelSize:2,onDrag:function(e,t){return i("node2",{concentration:t})}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosPump=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.AtmosPump=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:335,height:115,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.on?"power-off":"times",content:l.on?"On":"Off",selected:l.on,onClick:function(){return i("power")}})}),l.max_rate?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transfer Rate",children:[(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(l.rate),width:"63px",unit:"L/s",minValue:0,maxValue:200,onChange:function(e,t){return i("rate",{rate:t})}}),(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"plus",content:"Max",disabled:l.rate===l.max_rate,onClick:function(){return i("rate",{rate:"max"})}})]}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output Pressure",children:[(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(l.pressure),unit:"kPa",width:"75px",minValue:0,maxValue:4500,step:10,onChange:function(e,t){return i("pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"plus",content:"Max",disabled:l.pressure===l.max_pressure,onClick:function(){return i("pressure",{pressure:"max"})}})]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosRelief=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.AtmosRelief=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:335,height:115,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Open Pressure",children:[(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(l.open_pressure),unit:"kPa",width:"75px",minValue:0,maxValue:l.max_pressure||4500,step:10,onChange:function(e,t){return i("open_pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"plus",content:"Max",disabled:l.open_pressure===l.max_pressure,onClick:function(){return i("open_pressure",{pressure:"max"})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Close Pressure",children:[(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(l.close_pressure),unit:"kPa",width:"75px",minValue:0,maxValue:l.max_pressure||4500,step:10,onChange:function(e,t){return i("close_pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"plus",content:"Max",disabled:l.close_pressure===l.max_pressure,onClick:function(){return i("close_pressure",{pressure:"max"})}})]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AutomatedAnnouncement=void 0;var o=n(0),r=(n(19),n(2)),a=n(1),c=n(3),i="%PERSON will be replaced with their name.\n%RANK with their job.";t.AutomatedAnnouncement=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.arrivalToggle,s=d.arrival,m=d.newheadToggle,p=d.newhead;return(0,o.createComponentVNode)(2,c.Window,{title:"Automated Announcement System",width:500,height:225,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Arrival Announcement",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",selected:u,content:u?"On":"Off",onClick:function(){return l("ArrivalToggle")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"info",tooltip:i,tooltipPosition:"left"}),children:(0,o.createComponentVNode)(2,a.Input,{fluid:!0,value:s,onChange:function(e,t){return l("ArrivalText",{newText:t})}})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Departmental Head Announcement",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:m?"power-off":"times",selected:m,content:m?"On":"Off",onClick:function(){return l("NewheadToggle")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"info",tooltip:i,tooltipPosition:"left"}),children:(0,o.createComponentVNode)(2,a.Input,{fluid:!0,value:p,onChange:function(e,t){return l("NewheadText",{newText:t})}})})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BankMachine=void 0;var o=n(0),r=n(2),a=n(1),c=n(39),i=n(3);t.BankMachine=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.current_balance,s=d.siphoning,m=d.station_name;return(0,o.createComponentVNode)(2,i.Window,{width:350,height:155,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.NoticeBox,{danger:!0,children:"Authorized personnel only"}),(0,o.createComponentVNode)(2,a.Section,{title:m+" Vault",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Balance",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:s?"times":"sync",content:s?"Stop Siphoning":"Siphon Credits",selected:s,onClick:function(){return l(s?"halt":"siphon")}}),children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u,format:function(e){return(0,c.formatMoney)(e)}})," cr"]})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Bepis=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.Bepis=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.amount;return(0,o.createComponentVNode)(2,c.Window,{width:500,height:480,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Business Exploration Protocol Incubation Sink",children:[(0,o.createComponentVNode)(2,a.Section,{title:"Information",backgroundColor:"#450F44",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:l.manual_power?"Off":"On",selected:!l.manual_power,onClick:function(){return i("toggle_power")}}),children:"All you need to know about the B.E.P.I.S. and you! The B.E.P.I.S. performs hundreds of tests a second using electrical and financial resources to invent new products, or discover new technologies otherwise overlooked for being too risky or too niche to produce!"}),(0,o.createComponentVNode)(2,a.Section,{title:"Payer's Account",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"redo-alt",content:"Reset Account",onClick:function(){return i("account_reset")}}),children:["Console is currently being operated by ",l.account_owner?l.account_owner:"no one","."]}),(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{size:1.5,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored Data and Statistics",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Deposited Credits",children:l.stored_cash}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Investment Variability",children:[l.accuracy_percentage,"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Innovation Bonus",children:l.positive_cash_offset}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Risk Offset",color:"bad",children:l.negative_cash_offset}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Deposit Amount",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:d,unit:"Credits",minValue:100,maxValue:3e4,step:100,stepPixelSize:2,onChange:function(e,t){return i("amount",{amount:t})}})})]})}),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"donate",content:"Deposit Credits",disabled:1===l.manual_power||1===l.silicon_check,onClick:function(){return i("deposit_cash")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Withdraw Credits",disabled:1===l.manual_power,onClick:function(){return i("withdraw_cash")}})]})]}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Market Data and Analysis",children:[(0,o.createComponentVNode)(2,a.Box,{children:["Average technology cost: ",l.mean_value]}),(0,o.createComponentVNode)(2,a.Box,{children:["Current chance of Success: Est. ",l.success_estimate,"%"]}),l.error_name&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Previous Failure Reason: Deposited cash value too low. Please insert more money for future success."}),(0,o.createComponentVNode)(2,a.Box,{m:1}),(0,o.createComponentVNode)(2,a.Button,{icon:"microscope",disabled:1===l.manual_power,onClick:function(){return i("begin_experiment")},content:"Begin Testing"})]})})]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BiogeneratorContent=t.Biogenerator=void 0;var o=n(0),r=n(6),a=n(19),c=n(2),i=n(1),l=n(39),d=n(3);t.Biogenerator=function(e,t){var n=(0,c.useBackend)(t).data,r=n.beaker,a=n.processing;return(0,o.createComponentVNode)(2,d.Window,{width:550,height:380,resizable:!0,children:[!!a&&(0,o.createComponentVNode)(2,i.Dimmer,{fontSize:"32px",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"cog",spin:1})," Processing..."]}),(0,o.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:[!r&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No Container"}),!!r&&(0,o.createComponentVNode)(2,u)]})]})};var u=function(e,t){var n,r,d=(0,c.useBackend)(t),u=d.act,m=d.data,p=m.biomass,C=m.can_process,h=m.categories,N=void 0===h?[]:h,V=(0,c.useLocalState)(t,"searchText",""),b=V[0],f=V[1],g=(0,c.useLocalState)(t,"category",null==(n=N[0])?void 0:n.name),v=g[0],k=g[1],x=(0,a.createSearch)(b,(function(e){return e.name})),B=b.length>0&&N.flatMap((function(e){return e.items||[]})).filter(x).filter((function(e,t){return t<25}))||(null==(r=N.find((function(e){return e.name===v})))?void 0:r.items)||[];return(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:p>0?"good":"bad",children:[(0,l.formatMoney)(p)," Biomass"]}),buttons:(0,o.createFragment)([(0,o.createTextVNode)("Search"),(0,o.createComponentVNode)(2,i.Input,{autoFocus:!0,value:b,onInput:function(e,t){return f(t)},mx:1}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject",onClick:function(){return u("detach")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"cog",content:"Activate",disabled:!C,onClick:function(){return u("activate")}})],4),children:(0,o.createComponentVNode)(2,i.Flex,{children:[0===b.length&&(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Tabs,{vertical:!0,children:N.map((function(e){var t;return(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:e.name===v,onClick:function(){return k(e.name)},children:[e.name," (",(null==(t=e.items)?void 0:t.length)||0,")"]},e.name)}))})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,basis:0,children:[0===B.length&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:0===b.length?"No items in this category.":"No results found."}),(0,o.createComponentVNode)(2,i.Table,{children:(0,o.createComponentVNode)(2,s,{biomass:p,items:B})})]})]})})};t.BiogeneratorContent=u;var s=function(e,t){var n=(0,c.useBackend)(t).act,a=(0,c.useLocalState)(t,"hoveredItem",{}),l=a[0],d=a[1],u=l&&l.cost||0;return e.items.map((function(n){var o=(0,c.useLocalState)(t,"amount"+n.name,1),r=o[0],a=o[1],i=l&&l.name!==n.name,d=e.biomass-u*l.amountV,onClick:function(){return d("select",{item:e.id})}})})]}),e.desc]},e.name)}))})]})]})]})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.buying,u=l.ltsrbt_built,s=l.money;if(!d)return null;var m=l.delivery_methods.map((function(e){var t=l.delivery_method_description[e.name];return Object.assign({},e,{description:t})}));return(0,o.createComponentVNode)(2,a.Modal,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex,{mb:1,children:m.map((function(e){return"LTSRBT"!==e.name||u?(0,o.createComponentVNode)(2,a.Flex.Item,{mx:1,width:"250px",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"30px",children:e.name}),(0,o.createComponentVNode)(2,a.Box,{mt:1,children:e.description}),(0,o.createComponentVNode)(2,a.Button,{mt:2,content:(0,c.formatMoney)(e.price)+" cr",disabled:s=0||(r[n]=e[n]);return r}(t,["res","value"]),a=l(n),c=a[0],i=a[1];return(0,o.normalizeProps)((0,o.createVNode)(1,"canvas",null,"Canvas failed to render.",16,Object.assign({width:28*c||300,height:28*i||300},r,{onClick:function(t){return e.clickwrapper(t)}}),null,this.canvasRef))},r}(o.Component),l=function(e){var t=e.length;return[t,0!==t?e[0].length:0]};t.Canvas=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=l(u.grid),m=s[0],p=s[1];return(0,o.createComponentVNode)(2,c.Window,{width:Math.min(400,28*m*32+24),height:Math.min(400,28*p*32+24),resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:[(0,o.createComponentVNode)(2,i,{value:u.grid,onCanvasClick:function(e,t){return d("paint",{x:e,y:t})}}),(0,o.createComponentVNode)(2,a.Box,{children:[!u.finalized&&(0,o.createComponentVNode)(2,a.Button.Confirm,{onClick:function(){return d("finalize")},content:"Finalize"}),u.name]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CargoBountyConsole=void 0;var o=n(0),r=n(2),a=n(1),c=n(39),i=n(3);t.CargoBountyConsole=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data.bountydata,u=void 0===d?[]:d;return(0,o.createComponentVNode)(2,i.Window,{width:750,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,l),buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print Bounty List",onClick:function(){return c("Print")}}),children:(0,o.createComponentVNode)(2,a.Table,{border:!0,children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,italic:!0,color:"label",fontSize:1.25,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{p:1,textAlign:"center",children:"Bounty Object"}),(0,o.createComponentVNode)(2,a.Table.Cell,{p:1,textAlign:"center",children:"Description"}),(0,o.createComponentVNode)(2,a.Table.Cell,{p:1,textAlign:"center",children:"Progress"}),(0,o.createComponentVNode)(2,a.Table.Cell,{p:1,textAlign:"center",children:"Value"}),(0,o.createComponentVNode)(2,a.Table.Cell,{p:1,textAlign:"center",children:"Claim"})]}),u.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{backgroundColor:1===e.priority?"rgba(252, 152, 3, 0.25)":"",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,p:1,children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{italic:!0,textAlign:"center",p:1,children:e.description}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,p:1,textAlign:"center",children:[1===e.priority?(0,o.createComponentVNode)(2,a.Box,{children:"High Priority"}):"",e.completion_string]}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,p:1,textAlign:"center",children:e.reward_string}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,p:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:1===e.claimed?"check":"",content:1===e.claimed?"Claimed":"Claim",disabled:1===e.claimed,color:1===e.can_claim?"green":"red",onClick:function(){return c("ClaimBounty",{bounty:e.bounty_ref})}})})]},e.name)}))]})})})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.stored_cash);return(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:i,format:function(e){return(0,c.formatMoney)(e)}})," credits"]})}},function(e,t,n){"use strict";t.__esModule=!0,t.CargoExpress=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=n(203),l=n(64);t.CargoExpress=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data);return(0,o.createComponentVNode)(2,c.Window,{width:600,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l.InterfaceLockNoticeBox,{accessText:"a QM-level ID card"}),!a.locked&&(0,o.createComponentVNode)(2,d)]})})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Cargo Express",buttons:(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(l.points)})," credits"]}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Landing Location",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Cargo Bay",selected:!l.usingBeacon,onClick:function(){return c("LZCargo")}}),(0,o.createComponentVNode)(2,a.Button,{selected:l.usingBeacon,disabled:!l.hasBeacon,onClick:function(){return c("LZBeacon")},children:[l.beaconzone," (",l.beaconName,")"]}),(0,o.createComponentVNode)(2,a.Button,{content:l.printMsg,disabled:!l.canBuyBeacon,onClick:function(){return c("printBeacon")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Notice",children:l.message})]})}),(0,o.createComponentVNode)(2,i.CargoCatalog,{express:!0})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.CargoHoldTerminal=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.CargoHoldTerminal=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.points,u=l.pad,s=l.sending,m=l.status_report;return(0,o.createComponentVNode)(2,c.Window,{width:600,height:230,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Cargo Value",children:(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(d)})," credits"]})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Cargo Pad",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Recalculate Value",disabled:!u,onClick:function(){return i("recalc")}}),(0,o.createComponentVNode)(2,a.Button,{icon:s?"times":"arrow-up",content:s?"Stop Sending":"Send Goods",selected:s,disabled:!u,onClick:function(){return i(s?"stop":"send")}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:u?"good":"bad",children:u?"Online":"Not Found"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cargo Report",children:m})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CellularEmporium=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.CellularEmporium=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.abilities;return(0,o.createComponentVNode)(2,c.Window,{width:900,height:480,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Genetic Points",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"undo",content:"Readapt",disabled:!l.can_readapt,onClick:function(){return i("readapt")}}),children:l.genetic_points_remaining})})}),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{className:"candystripe",label:e.name,buttons:(0,o.createFragment)([e.dna_cost," ",(0,o.createComponentVNode)(2,a.Button,{content:e.owned?"Evolved":"Evolve",selected:e.owned,onClick:function(){return i("evolve",{name:e.name})}})],0),children:[e.desc,(0,o.createComponentVNode)(2,a.Box,{color:"good",children:e.helptext})]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CentcomPodLauncher=void 0;var o=n(0),r=n(9),a=n(6),c=n(79),i=(n(19),n(204)),l=n(2),d=n(1),u=n(3);function s(e,t,n,o,r,a,c){try{var i=e[a](c),l=i.value}catch(d){return void n(d)}i.done?t(l):Promise.resolve(l).then(o,r)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(o,r){var a=e.apply(t,n);function c(e){s(a,o,r,c,i,"next",e)}function i(e){s(a,o,r,c,i,"throw",e)}c(undefined)}))}}var p={color:"grey"},C=function(e){var t=(0,l.useLocalState)(e,"compact",!1),n=t[0],o=t[1];return[n,function(){return o(!n)}]};t.CentcomPodLauncher=function(e,t){var n=C(t)[0];return(0,o.createComponentVNode)(2,u.Window,{resizable:!0,title:n?"Use against Helen Weinstein":"Supply Pod Menu (Use against Helen Weinstein)",overflow:"hidden",width:n?435:690,height:n?360:440,children:(0,o.createComponentVNode)(2,h)},"CPL_"+n)};var h=function(e,t){var n=C(t)[0];return(0,o.createComponentVNode)(2,u.Window.Content,{children:(0,o.createComponentVNode)(2,d.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,d.Flex.Item,{grow:0,shrink:0,children:(0,o.createComponentVNode)(2,L)}),(0,o.createComponentVNode)(2,d.Flex.Item,{mt:1,grow:1,children:(0,o.createComponentVNode)(2,d.Flex,{height:"100%",children:[(0,o.createComponentVNode)(2,d.Flex.Item,{grow:1,shrink:0,basis:"13em",children:(0,o.createComponentVNode)(2,d.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,d.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,S)}),(0,o.createComponentVNode)(2,d.Flex.Item,{mt:1,grow:0,children:(0,o.createComponentVNode)(2,y)}),(0,o.createComponentVNode)(2,d.Flex.Item,{mt:1,children:(0,o.createComponentVNode)(2,d.Section,{children:(0,o.createComponentVNode)(2,I)})})]})}),!n&&(0,o.createComponentVNode)(2,d.Flex.Item,{ml:1,grow:3,children:(0,o.createComponentVNode)(2,x)}),(0,o.createComponentVNode)(2,d.Flex.Item,{ml:1,basis:"8em",children:(0,o.createComponentVNode)(2,d.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,d.Flex.Item,{children:(0,o.createComponentVNode)(2,A)}),(0,o.createComponentVNode)(2,d.Flex.Item,{mt:1,grow:1,children:(0,o.createComponentVNode)(2,P)}),!n&&(0,o.createComponentVNode)(2,d.Flex.Item,{mt:1,children:(0,o.createComponentVNode)(2,R)})]})}),(0,o.createComponentVNode)(2,d.Flex.Item,{ml:1,basis:"11em",children:(0,o.createComponentVNode)(2,T)})]})})]})})},N=[{title:"View Pod",component:function(){return B}},{title:"View Bay",component:function(){return _}},{title:"View Dropoff Location",component:function(){return w}}],V=[{title:"Mobs",icon:"user"},{title:"Unanchored\nObjects",key:"Unanchored",icon:"cube"},{title:"Anchored\nObjects",key:"Anchored",icon:"anchor"},{title:"Under-Floor",key:"Underfloor",icon:"eye-slash"},{title:"Wall-Mounted",key:"Wallmounted",icon:"link"},{title:"Floors",icon:"border-all"},{title:"Walls",icon:"square"}],b=[{title:"Pre",tooltip:"Time until pod gets to station"},{title:"Fall",tooltip:"Duration of pods\nfalling animation"},{title:"Open",tooltip:"Time it takes pod to open after landing"},{title:"Exit",tooltip:"Time for pod to\nleave after opening"}],f=[{title:"Fall",act:"fallingSound",tooltip:"Plays while pod falls, timed\nto end when pod lands"},{title:"Land",act:"landingSound",tooltip:"Plays after pod lands"},{title:"Open",act:"openingSound",tooltip:"Plays when pod opens"},{title:"Exit",act:"leavingSound",tooltip:"Plays when pod leaves"}],g=[{title:"Standard"},{title:"Advanced"},{title:"Nanotrasen"},{title:"Syndicate"},{title:"Deathsquad"},{title:"Cultist"},{title:"Missile"},{title:"Syndie Missile"},{title:"Supply Box"},{title:"Clown Pod"},{title:"Fruit"},{title:"Invisible"},{title:"Gondola"},{title:"Seethrough"}],v=[{title:"1"},{title:"2"},{title:"3"},{title:"4"},{title:"ERT"}],k=[{list:[{title:"Launch All Turfs",icon:"globe",choiceNumber:0,selected:"launchChoice",act:"launchAll"},{title:"Launch Turf Ordered",icon:"sort-amount-down-alt",choiceNumber:1,selected:"launchChoice",act:"launchOrdered"},{title:"Pick Random Turf",icon:"dice",choiceNumber:2,selected:"launchChoice",act:"launchRandomTurf"},{divider:1},{title:"Launch Whole Turf",icon:"expand",choiceNumber:0,selected:"launchRandomItem",act:"launchWholeTurf"},{title:"Pick Random Item",icon:"dice",choiceNumber:1,selected:"launchRandomItem",act:"launchRandomItem"},{divider:1},{title:"Clone",icon:"clone",soloSelected:"launchClone",act:"launchClone"}],label:"Load From",alt_label:"Load",tooltipPosition:"right"},{list:[{title:"Specific Target",icon:"user-check",soloSelected:"effectTarget",act:"effectTarget"},{title:"Pod Stays",icon:"hand-paper",choiceNumber:0,selected:"effectBluespace",act:"effectBluespace"},{title:"Stealth",icon:"user-ninja",soloSelected:"effectStealth",act:"effectStealth"},{title:"Quiet",icon:"volume-mute",soloSelected:"effectQuiet",act:"effectQuiet"},{title:"Missile Mode",icon:"rocket",soloSelected:"effectMissile",act:"effectMissile"},{title:"Burst Launch",icon:"certificate",soloSelected:"effectBurst",act:"effectBurst"},{title:"Any Descent Angle",icon:"ruler-combined",soloSelected:"effectCircle",act:"effectCircle"},{title:"No Ghost Alert\n(If you dont want to\nentertain bored ghosts)",icon:"ghost",choiceNumber:0,selected:"effectAnnounce",act:"effectAnnounce"}],label:"Normal Effects",tooltipPosition:"bottom"},{list:[{title:"Explosion Custom",icon:"bomb",choiceNumber:1,selected:"explosionChoice",act:"explosionCustom"},{title:"Adminbus Explosion\nWhat are they gonna do, ban you?",icon:"bomb",choiceNumber:2,selected:"explosionChoice",act:"explosionBus"},{divider:1},{title:"Custom Damage",icon:"skull",choiceNumber:1,selected:"damageChoice",act:"damageCustom"},{title:"Gib",icon:"skull-crossbones",choiceNumber:2,selected:"damageChoice",act:"damageGib"},{divider:1},{title:"Projectile Cloud",details:!0,icon:"cloud-meatball",soloSelected:"effectShrapnel",act:"effectShrapnel"},{title:"Stun",icon:"sun",soloSelected:"effectStun",act:"effectStun"},{title:"Delimb",icon:"socks",soloSelected:"effectLimb",act:"effectLimb"},{title:"Yeet Organs",icon:"book-dead",soloSelected:"effectOrgans",act:"effectOrgans"}],label:"Harmful Effects",tooltipPosition:"bottom"}],x=function(e,t){var n=(0,l.useBackend)(t),r=n.act,a=n.data,c=(0,l.useLocalState)(t,"tabPageIndex",1),i=c[0],u=c[1],s=a.mapRef,m=N[i].component();return(0,o.createComponentVNode)(2,d.Section,{title:"View",fill:!0,buttons:(0,o.createFragment)([!!a.customDropoff&&1===a.effectReverse&&(0,o.createComponentVNode)(2,d.Button,{inline:!0,color:"transparent",tooltip:"View Dropoff Location",icon:"arrow-circle-down",selected:2===i,onClick:function(){u(2),r("tabSwitch",{tabIndex:2})}}),(0,o.createComponentVNode)(2,d.Button,{inline:!0,color:"transparent",tooltip:"View Pod",icon:"rocket",selected:0===i,onClick:function(){u(0),r("tabSwitch",{tabIndex:0})}}),(0,o.createComponentVNode)(2,d.Button,{inline:!0,color:"transparent",tooltip:"View Source Bay",icon:"th",selected:1===i,onClick:function(){u(1),r("tabSwitch",{tabIndex:1})}}),(0,o.createVNode)(1,"span",null,"|",16,{style:p}),!!a.customDropoff&&1===a.effectReverse&&(0,o.createComponentVNode)(2,d.Button,{inline:!0,color:"transparent",icon:"lightbulb",selected:a.renderLighting,tooltip:"Render Lighting for the dropoff view",onClick:function(){r("renderLighting"),r("refreshView")}}),(0,o.createComponentVNode)(2,d.Button,{inline:!0,color:"transparent",icon:"sync-alt",tooltip:"Refresh view window in case it breaks",onClick:function(){u(i),r("refreshView")}})],0),children:(0,o.createComponentVNode)(2,d.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,d.Flex.Item,{m:.5,children:(0,o.createComponentVNode)(2,m)}),(0,o.createComponentVNode)(2,d.Flex.Item,{m:.5,grow:1,children:(0,o.createComponentVNode)(2,d.Section,{fill:!0,children:(0,o.createComponentVNode)(2,d.ByondUi,{fillPositionedParent:!0,params:{zoom:0,id:s,type:"map"}})})})]})})},B=function(e,t){return(0,o.createComponentVNode)(2,d.Box,{color:"label",children:["Note: You can right click on this",(0,o.createVNode)(1,"br"),"blueprint pod and edit vars directly"]})},_=function(e,t){var n=(0,l.useBackend)(t),r=n.act,a=n.data;n.config;return(0,o.createFragment)([(0,o.createComponentVNode)(2,d.Button,{content:"Teleport",icon:"street-view",onClick:function(){return r("teleportCentcom")}}),(0,o.createComponentVNode)(2,d.Button,{content:a.oldArea?a.oldArea.substring(0,17):"Go Back",disabled:!a.oldArea,icon:"undo-alt",onClick:function(){return r("teleportBack")}})],4)},w=function(e,t){var n=(0,l.useBackend)(t),r=n.act,a=n.data;n.config,a.mapRef;return(0,o.createFragment)([(0,o.createComponentVNode)(2,d.Button,{content:"Teleport",icon:"street-view",onClick:function(){return r("teleportDropoff")}}),(0,o.createComponentVNode)(2,d.Button,{content:a.oldArea?a.oldArea.substring(0,17):"Go Back",disabled:!a.oldArea,icon:"undo-alt",onClick:function(){return r("teleportBack")}})],4)},L=function(e,t){var n=(0,l.useBackend)(t),r=n.act,a=n.data,c=C(t),i=c[0],u=c[1];return(0,o.createComponentVNode)(2,d.Section,{fill:!0,width:"100%",children:(0,o.createComponentVNode)(2,d.Flex,{children:k.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,d.Flex.Item,{children:[(0,o.createComponentVNode)(2,d.Box,{bold:!0,color:"label",mb:1,children:[1===i&&e.alt_label?e.alt_label:e.label,":"]}),(0,o.createComponentVNode)(2,d.Box,{children:e.list.map((function(t,n){return(0,o.createFragment)([t.divider&&(0,o.createVNode)(1,"span",null,(0,o.createVNode)(1,"b",null,"|",16),2,{style:p}),!t.divider&&(0,o.createComponentVNode)(2,d.Button,{tooltip:t.details&&a.effectShrapnel?t.title+"\n"+a.shrapnelType+"\nMagnitude:"+a.shrapnelMagnitude:t.title,tooltipPosition:e.tooltipPosition,tooltipOverrideLong:!0,icon:t.icon,content:t.content,selected:t.soloSelected?a[t.soloSelected]:a[t.selected]===t.choiceNumber,onClick:function(){return 0!==a.payload?r(t.act,t.payload):r(t.act)},style:{"vertical-align":"middle","margin-left":0!==n?"1px":"0px","margin-right":n!==e.list.length-1?"1px":"0px","border-radius":"5px"}})],0,n)}))})]}),t=g.length-2?t%2==1?"top-left":"top-right":t%2==1?"bottom-left":"bottom-right",tooltip:e.title,style:{"vertical-align":"middle","margin-right":"5px","border-radius":"20px"},selected:c.styleChoice-1===t,onClick:function(){return r("setStyle",{style:t})},children:(0,o.createComponentVNode)(2,d.Box,{className:(0,a.classes)(["supplypods64x64","pod_asset"+(t+1)]),style:{transform:"rotate(45deg) translate(-25%,-10%)","pointer-events":"none"}})},t)}))})},A=function(e,t){var n=(0,l.useBackend)(t),r=n.act,a=n.data;C(t)[0];return(0,o.createComponentVNode)(2,d.Section,{fill:!0,title:"Bay",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,d.Button,{icon:"trash",color:"transparent",tooltip:"Clears everything\nfrom the selected bay",tooltipOverrideLong:!0,tooltipPosition:"bottom-right",onClick:function(){return r("clearBay")}}),(0,o.createComponentVNode)(2,d.Button,{icon:"question",color:"transparent",tooltip:'Each option corresponds\nto an area on centcom.\nLaunched pods will\nbe filled with items\nin these areas according\nto the "Load from Bay"\noptions at the top left.',tooltipOverrideLong:!0,tooltipPosition:"bottom-right"})],4),children:v.map((function(e,t){return(0,o.createComponentVNode)(2,d.Button,{content:e.title,tooltipPosition:"bottom-right",selected:a.bayNumber===""+(t+1),onClick:function(){return r("switchBay",{bayNumber:""+(t+1)})}},t)}))})},P=function(e,t){var n=(0,l.useBackend)(t),a=n.act,c=n.data;return(0,o.createComponentVNode)(2,d.Section,{fill:!0,title:"Delay",buttons:(0,o.createComponentVNode)(2,d.Button,{icon:"undo",color:"transparent",tooltip:"Reset all pod\ntimings/delays",tooltipOverrideLong:!0,tooltipPosition:"bottom-right",onClick:function(){return a("resetTiming")}}),children:(0,o.createComponentVNode)(2,d.LabeledControls,{wrap:!0,children:b.map((function(e,t){return(0,o.createComponentVNode)(2,d.LabeledControls.Item,{label:e.title,children:(0,o.createComponentVNode)(2,d.Knob,{inline:!0,step:.02,value:c["delay_"+(t+1)]/10,unclamped:!0,minValue:0,unit:"s",format:function(e){return(0,r.toFixed)(e,2)},maxValue:10,color:c["delay_"+(t+1)]/10>10?"orange":"default",onDrag:function(e,n){a("editTiming",{timer:t+1,value:Math.max(n,0)})}})},t)}))})})},R=function(e,t){var n=(0,l.useBackend)(t),r=n.act,a=n.data;return(0,o.createComponentVNode)(2,d.Section,{fill:!0,title:"Sounds",buttons:(0,o.createComponentVNode)(2,d.Button,{icon:"volume-up",color:"transparent",selected:a.soundVolume!==a.defaultSoundVolume,tooltip:"Sound Volume:"+a.soundVolume,tooltipOverrideLong:!0,onClick:function(){return r("soundVolume")}}),children:f.map((function(e,t){return(0,o.createComponentVNode)(2,d.Button,{content:e.title,tooltip:e.tooltip,tooltipPosition:"top-right",tooltipOverrideLong:!0,selected:a[e.act],onClick:function(){return r(e.act)}},t)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemAcclimator=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.ChemAcclimator=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:320,height:271,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Acclimator",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Temperature",children:[l.chem_temp," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Temperature",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:l.target_temperature,unit:"K",width:"59px",minValue:0,maxValue:1e3,step:5,stepPixelSize:2,onChange:function(e,t){return i("set_target_temperature",{temperature:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Acceptable Temp. Difference",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:l.allowed_temperature_difference,unit:"K",width:"59px",minValue:1,maxValue:l.target_temperature,stepPixelSize:2,onChange:function(e,t){i("set_allowed_temperature_difference",{temperature:t})}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:l.enabled?"On":"Off",selected:l.enabled,onClick:function(){return i("toggle_power")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Volume",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:l.max_volume,unit:"u",width:"50px",minValue:l.reagent_volume,maxValue:200,step:2,stepPixelSize:2,onChange:function(e,t){return i("change_volume",{volume:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Operation",children:l.acclimate_state}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current State",children:l.emptying?"Emptying":"Filling"})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemDebugSynthesizer=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.ChemDebugSynthesizer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.amount,u=l.beakerCurrentVolume,s=l.beakerMaxVolume,m=l.isBeakerLoaded,p=l.beakerContents,C=void 0===p?[]:p;return(0,o.createComponentVNode)(2,c.Window,{width:390,height:330,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Recipient",buttons:m?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",onClick:function(){return i("ejectBeaker")}}),(0,o.createComponentVNode)(2,a.NumberInput,{value:d,unit:"u",minValue:1,maxValue:s,step:1,stepPixelSize:2,onChange:function(e,t){return i("amount",{amount:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"plus",content:"Input",onClick:function(){return i("input")}})],4):(0,o.createComponentVNode)(2,a.Button,{icon:"plus",content:"Create Beaker",onClick:function(){return i("makecup")}}),children:m?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u})," / "+s+" u"]}),C.length>0?(0,o.createComponentVNode)(2,a.LabeledList,{children:C.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[e.volume," u"]},e.name)}))}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Recipient Empty"})],0):(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No Recipient"})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemDispenser=void 0;var o=n(0),r=n(9),a=n(19),c=n(2),i=n(1),l=n(3);t.ChemDispenser=function(e,t){var n=(0,c.useBackend)(t),d=n.act,u=n.data,s=!!u.recordingRecipe,m=Object.keys(u.recipes).map((function(e){return{name:e,contents:u.recipes[e]}})),p=u.beakerTransferAmounts||[],C=s&&Object.keys(u.recordingRecipe).map((function(e){return{id:e,name:(0,a.toTitleCase)(e.replace(/_/," ")),volume:u.recordingRecipe[e]}}))||u.beakerContents||[];return(0,o.createComponentVNode)(2,l.Window,{width:565,height:620,resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:"Status",buttons:s&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,mx:1,color:"red",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"circle",mr:1}),"Recording"]}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Energy",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:u.energy/u.maxEnergy,children:(0,r.toFixed)(u.energy)+" units"})})})}),(0,o.createComponentVNode)(2,i.Section,{title:"Recipes",buttons:(0,o.createFragment)([!s&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,mx:1,children:(0,o.createComponentVNode)(2,i.Button,{color:"transparent",content:"Clear recipes",onClick:function(){return d("clear_recipes")}})}),!s&&(0,o.createComponentVNode)(2,i.Button,{icon:"circle",disabled:!u.isBeakerLoaded,content:"Record",onClick:function(){return d("record_recipe")}}),s&&(0,o.createComponentVNode)(2,i.Button,{icon:"ban",color:"transparent",content:"Discard",onClick:function(){return d("cancel_recording")}}),s&&(0,o.createComponentVNode)(2,i.Button,{icon:"save",color:"green",content:"Save",onClick:function(){return d("save_recording")}})],0),children:(0,o.createComponentVNode)(2,i.Box,{mr:-1,children:[m.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:"tint",width:"129.5px",lineHeight:1.75,content:e.name,onClick:function(){return d("dispense_recipe",{recipe:e.name})}},e.name)})),0===m.length&&(0,o.createComponentVNode)(2,i.Box,{color:"light-gray",children:"No recipes."})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Dispense",buttons:p.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:"plus",selected:e===u.amount,content:e,onClick:function(){return d("amount",{target:e})}},e)})),children:(0,o.createComponentVNode)(2,i.Box,{mr:-1,children:u.chemicals.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:"tint",width:"129.5px",lineHeight:1.75,content:e.title,onClick:function(){return d("dispense",{reagent:e.id})}},e.id)}))})}),(0,o.createComponentVNode)(2,i.Section,{title:"Beaker",buttons:p.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:"minus",disabled:s,content:e,onClick:function(){return d("remove",{amount:e})}},e)})),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Beaker",buttons:!!u.isBeakerLoaded&&(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject",disabled:!u.isBeakerLoaded,onClick:function(){return d("eject")}}),children:(s?"Virtual beaker":u.isBeakerLoaded&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.AnimatedNumber,{initial:0,value:u.beakerCurrentVolume}),(0,o.createTextVNode)("/"),u.beakerMaxVolume,(0,o.createTextVNode)(" units")],0))||"No beaker"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Contents",children:[(0,o.createComponentVNode)(2,i.Box,{color:"label",children:u.isBeakerLoaded||s?0===C.length&&"Nothing":"N/A"}),C.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{color:"label",children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{initial:0,value:e.volume})," ","units of ",e.name]},e.name)})),(0,o.createComponentVNode)(2,i.Box,{children:["pH:",(0,o.createComponentVNode)(2,i.AnimatedNumber,{initial:7,value:u.beakerCurrentpH})]},"pH")]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemFilter=t.ChemFilterPane=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=function(e,t){var n=(0,r.useBackend)(t).act,c=e.title,i=e.list,l=e.reagentName,d=e.onReagentInput,u=c.toLowerCase();return(0,o.createComponentVNode)(2,a.Section,{title:c,minHeight:"240px",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Input,{placeholder:"Reagent",width:"140px",onInput:function(e,t){return d(t)}}),(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"plus",onClick:function(){return n("add",{which:u,name:l})}})],4),children:i.map((function(e){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"minus",content:e,onClick:function(){return n("remove",{which:u,reagent:e})}})],4,e)}))})};t.ChemFilterPane=i;t.ChemFilter=function(e,t){var n=(0,r.useBackend)(t),l=(n.act,n.data),d=l.left,u=void 0===d?[]:d,s=l.right,m=void 0===s?[]:s,p=(0,r.useLocalState)(t,"leftName",""),C=p[0],h=p[1],N=(0,r.useLocalState)(t,"rightName",""),V=N[0],b=N[1];return(0,o.createComponentVNode)(2,c.Window,{width:500,height:300,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i,{title:"Left",list:u,reagentName:C,onReagentInput:function(e){return h(e)}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i,{title:"Right",list:m,reagentName:V,onReagentInput:function(e){return b(e)}})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemHeater=void 0;var o=n(0),r=n(9),a=n(2),c=n(1),i=n(3),l=n(205);t.ChemHeater=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data,s=u.targetTemp,m=u.isActive,p=u.isBeakerLoaded,C=u.currentTemp,h=u.beakerCurrentVolume,N=u.beakerMaxVolume,V=u.beakerContents,b=void 0===V?[]:V;return(0,o.createComponentVNode)(2,i.Window,{width:300,height:320,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{title:"Thermostat",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:m?"power-off":"times",selected:m,content:m?"On":"Off",onClick:function(){return d("power")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Target",children:(0,o.createComponentVNode)(2,c.NumberInput,{width:"65px",unit:"K",step:10,stepPixelSize:3,value:(0,r.round)(s),minValue:0,maxValue:1e3,onDrag:function(e,t){return d("temperature",{target:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Reading",children:(0,o.createComponentVNode)(2,c.Box,{width:"60px",textAlign:"right",children:p&&(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:C,format:function(e){return(0,r.toFixed)(e)+" K"}})||"\u2014"})})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Beaker",buttons:!!p&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:"label",mr:2,children:[h," / ",N," units"]}),(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject",onClick:function(){return d("eject")}})],4),children:[(0,o.createComponentVNode)(2,l.BeakerContents,{beakerLoaded:p,beakerContents:b}),(0,o.createComponentVNode)(2,c.Box,{color:"label",children:[Number(u.currentpH).toFixed(u.partRating)," pH"]},"pH")]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemMaster=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.ChemMaster=function(e,t){var n=(0,r.useBackend)(t).data.screen;return(0,o.createComponentVNode)(2,c.Window,{width:465,height:550,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:"analyze"===n&&(0,o.createComponentVNode)(2,m)||(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,u=i.screen,p=i.beakerContents,C=void 0===p?[]:p,h=i.bufferContents,N=void 0===h?[]:h,V=i.beakerCurrentVolume,b=i.beakerMaxVolume,f=i.isBeakerLoaded,g=i.isPillBottleLoaded,v=i.pillBottleCurrentAmount,k=i.pillBottleMaxAmount;return"analyze"===u?(0,o.createComponentVNode)(2,m):(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Beaker",buttons:!!i.isBeakerLoaded&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mr:2,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:V,initial:0})," / "+b+" units"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",onClick:function(){return c("eject")}})],4),children:[!f&&(0,o.createComponentVNode)(2,a.Box,{color:"label",mt:"3px",mb:"5px",children:"No beaker loaded."}),!!f&&0===C.length&&(0,o.createComponentVNode)(2,a.Box,{color:"label",mt:"3px",mb:"5px",children:"Beaker is empty."}),(0,o.createComponentVNode)(2,l,{children:C.map((function(e){return(0,o.createComponentVNode)(2,d,{chemical:e,transferTo:"buffer"},e.id)}))})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Buffer",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mr:1,children:"Mode:"}),(0,o.createComponentVNode)(2,a.Button,{color:i.mode?"good":"bad",icon:i.mode?"exchange-alt":"times",content:i.mode?"Transfer":"Destroy",onClick:function(){return c("toggleMode")}})],4),children:[0===N.length&&(0,o.createComponentVNode)(2,a.Box,{color:"label",mt:"3px",mb:"5px",children:"Buffer is empty."}),(0,o.createComponentVNode)(2,l,{children:N.map((function(e){return(0,o.createComponentVNode)(2,d,{chemical:e,transferTo:"beaker"},e.id)}))})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Packaging",children:(0,o.createComponentVNode)(2,s)}),!!g&&(0,o.createComponentVNode)(2,a.Section,{title:"Pill Bottle",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mr:2,children:[v," / ",k," pills"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",onClick:function(){return c("ejectPillBottle")}})],4)})],0)},l=a.Table,d=function(e,t){var n=(0,r.useBackend)(t).act,c=e.chemical,i=e.transferTo;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{color:"label",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:c.volume,initial:0})," units of "+c.name]}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:[(0,o.createComponentVNode)(2,a.Button,{content:"1",onClick:function(){return n("transfer",{id:c.id,amount:1,to:i})}}),(0,o.createComponentVNode)(2,a.Button,{content:"5",onClick:function(){return n("transfer",{id:c.id,amount:5,to:i})}}),(0,o.createComponentVNode)(2,a.Button,{content:"10",onClick:function(){return n("transfer",{id:c.id,amount:10,to:i})}}),(0,o.createComponentVNode)(2,a.Button,{content:"All",onClick:function(){return n("transfer",{id:c.id,amount:1e3,to:i})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"ellipsis-h",title:"Custom amount",onClick:function(){return n("transfer",{id:c.id,amount:-1,to:i})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"question",title:"Analyze",onClick:function(){return n("analyze",{id:c.id})}})]})]},c.id)},u=function(e){var t=e.label,n=e.amountUnit,r=e.amount,c=e.onChangeAmount,i=e.onCreate,l=e.sideNote;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:t,children:[(0,o.createComponentVNode)(2,a.NumberInput,{width:"84px",unit:n,step:1,stepPixelSize:15,value:r,minValue:1,maxValue:20,onChange:c}),(0,o.createComponentVNode)(2,a.Button,{ml:1,content:"Create",onClick:i}),(0,o.createComponentVNode)(2,a.Box,{inline:!0,ml:1,color:"label",children:l})]})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(0,r.useSharedState)(t,"pillAmount",1),d=l[0],s=l[1],m=(0,r.useSharedState)(t,"patchAmount",1),p=m[0],C=m[1],h=(0,r.useSharedState)(t,"bottleAmount",1),N=h[0],V=h[1],b=(0,r.useSharedState)(t,"packAmount",1),f=b[0],g=b[1],v=(0,r.useSharedState)(t,"setvialAmount",1),k=v[0],x=v[1],B=(0,r.useSharedState)(t,"setdartAmount",1),_=B[0],w=B[1],L=i.condi,y=i.chosenPillStyle,S=i.pillStyles,I=void 0===S?[]:S;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[!L&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pill type",children:I.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{width:"30px",selected:e.id===y,textAlign:"center",color:"transparent",onClick:function(){return c("pillStyle",{id:e.id})},children:(0,o.createComponentVNode)(2,a.Box,{mx:-1,className:e.className})},e.id)}))}),!L&&(0,o.createComponentVNode)(2,u,{label:"Pills",amount:d,amountUnit:"pills",sideNote:"max 50u",onChangeAmount:function(e,t){return s(t)},onCreate:function(){return c("create",{type:"pill",amount:d,volume:"auto"})}}),!L&&(0,o.createComponentVNode)(2,u,{label:"Patches",amount:p,amountUnit:"patches",sideNote:"max 40u",onChangeAmount:function(e,t){return C(t)},onCreate:function(){return c("create",{type:"patch",amount:p,volume:"auto"})}}),!L&&(0,o.createComponentVNode)(2,u,{label:"Bottles",amount:N,amountUnit:"bottles",sideNote:"max 30u",onChangeAmount:function(e,t){return V(t)},onCreate:function(){return c("create",{type:"bottle",amount:N,volume:"auto"})}}),!L&&(0,o.createComponentVNode)(2,u,{label:"Hypovials",amount:k,amountUnit:"vials",sideNote:"max 60u",onChangeAmount:function(e,t){return x(t)},onCreate:function(){return c("create",{type:"hypoVial",amount:k,volume:"auto"})}}),!L&&(0,o.createComponentVNode)(2,u,{label:"Smartdarts",amount:_,amountUnit:"darts",sideNote:"max 20u",onChangeAmount:function(e,t){return w(t)},onCreate:function(){return c("create",{type:"smartDart",amount:_,volume:"auto"})}}),!!L&&(0,o.createComponentVNode)(2,u,{label:"Packs",amount:f,amountUnit:"packs",sideNote:"max 10u",onChangeAmount:function(e,t){return g(t)},onCreate:function(){return c("create",{type:"condimentPack",amount:f,volume:"auto"})}}),!!L&&(0,o.createComponentVNode)(2,u,{label:"Bottles",amount:N,amountUnit:"bottles",sideNote:"max 50u",onChangeAmount:function(e,t){return V(t)},onCreate:function(){return c("create",{type:"condimentBottle",amount:N,volume:"auto"})}})]})},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.fermianalyze,d=i.analyzeVars;return(0,o.createComponentVNode)(2,a.Section,{title:"Analysis Results",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Back",onClick:function(){return c("goScreen",{screen:"home"})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:d.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"State",children:d.state}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Color",children:[(0,o.createComponentVNode)(2,a.ColorBox,{color:d.color,mr:1}),d.color]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:d.description}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Metabolization Rate",children:[d.metaRate," u/minute"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Overdose Threshold",children:d.overD}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Addiction Threshold",children:d.addicD}),!!l&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Purity",children:d.purityF}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inverse Ratio",children:d.inverseRatioF}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Purity E",children:d.purityE}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Lower Optimal Temperature",children:d.minTemp}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Upper Optimal Temperature",children:d.maxTemp}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Explosive Temperature",children:d.eTemp}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"pH Peak",children:d.pHpeak})],4)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemPress=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.ChemPress=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.current_volume,u=l.product_name,s=l.pill_style,m=l.pill_styles,p=void 0===m?[]:m,C=l.product,h=l.min_volume,N=l.max_volume;return(0,o.createComponentVNode)(2,c.Window,{width:300,height:227,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Product",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{content:"Pills",checked:"pill"===C,onClick:function(){return i("change_product",{product:"pill"})}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{content:"Patches",checked:"patch"===C,onClick:function(){return i("change_product",{product:"patch"})}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{content:"Bottles",checked:"bottle"===C,onClick:function(){return i("change_product",{product:"bottle"})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Volume",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:d,unit:"u",width:"43px",minValue:h,maxValue:N,step:1,stepPixelSize:2,onChange:function(e,t){return i("change_current_volume",{volume:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:[(0,o.createComponentVNode)(2,a.Input,{value:u,placeholder:u,onChange:function(e,t){return i("change_product_name",{name:t})}}),(0,o.createComponentVNode)(2,a.Box,{as:"span",children:C})]}),"pill"===C&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Style",children:p.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{width:"30px",selected:e.id===s,textAlign:"center",color:"transparent",onClick:function(){return i("change_pill_style",{id:e.id})},children:(0,o.createComponentVNode)(2,a.Box,{mx:-1,className:e.class_name})},e.id)}))})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemReactionChamber=void 0;var o=n(0),r=n(14),a=n(6),c=n(2),i=n(1),l=n(3);t.ChemReactionChamber=function(e,t){var n=(0,c.useBackend)(t),d=n.act,u=n.data,s=(0,c.useLocalState)(t,"reagentName",""),m=s[0],p=s[1],C=(0,c.useLocalState)(t,"reagentQuantity",1),h=C[0],N=C[1],V=u.emptying,b=u.reagents||[];return(0,o.createComponentVNode)(2,l.Window,{width:250,height:225,resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:"Reagents",buttons:(0,o.createComponentVNode)(2,i.Box,{inline:!0,bold:!0,color:V?"bad":"good",children:V?"Emptying":"Filling"}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createVNode)(1,"tr","LabledList__row",[(0,o.createVNode)(1,"td","LabeledList__cell",(0,o.createComponentVNode)(2,i.Input,{fluid:!0,value:"",placeholder:"Reagent Name",onInput:function(e,t){return p(t)}}),2,{colSpan:"2"}),(0,o.createVNode)(1,"td",(0,a.classes)(["LabeledList__buttons","LabeledList__cell"]),[(0,o.createComponentVNode)(2,i.NumberInput,{value:h,minValue:1,maxValue:100,step:1,stepPixelSize:3,width:"39px",onDrag:function(e,t){return N(t)}}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,mr:1}),(0,o.createComponentVNode)(2,i.Button,{icon:"plus",onClick:function(){return d("add",{chem:m,amount:h})}})],4)],4),(0,r.map)((function(e,t){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:t,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"minus",color:"bad",onClick:function(){return d("remove",{chem:t})}}),children:e},t)}))(b)]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemSplitter=void 0;var o=n(0),r=n(9),a=n(2),c=n(1),i=n(3);t.ChemSplitter=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.straight,s=d.side,m=d.max_transfer;return(0,o.createComponentVNode)(2,i.Window,{width:220,height:105,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Straight",children:(0,o.createComponentVNode)(2,c.NumberInput,{value:u,unit:"u",width:"55px",minValue:1,maxValue:m,format:function(e){return(0,r.toFixed)(e,2)},step:.05,stepPixelSize:4,onChange:function(e,t){return l("set_amount",{target:"straight",amount:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Side",children:(0,o.createComponentVNode)(2,c.NumberInput,{value:s,unit:"u",width:"55px",minValue:1,maxValue:m,format:function(e){return(0,r.toFixed)(e,2)},step:.05,stepPixelSize:4,onChange:function(e,t){return l("set_amount",{target:"side",amount:t})}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemSynthesizer=void 0;var o=n(0),r=n(9),a=n(2),c=n(1),i=n(3);t.ChemSynthesizer=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.amount,s=d.current_reagent,m=d.chemicals,p=void 0===m?[]:m,C=d.possible_amounts,h=void 0===C?[]:C;return(0,o.createComponentVNode)(2,i.Window,{width:300,height:375,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.Box,{children:h.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{icon:"plus",content:(0,r.toFixed)(e,0),selected:e===u,onClick:function(){return l("amount",{target:e})}},(0,r.toFixed)(e,0))}))}),(0,o.createComponentVNode)(2,c.Box,{mt:1,children:p.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{icon:"tint",content:e.title,width:"129px",selected:e.id===s,onClick:function(){return l("select",{reagent:e.id})}},e.id)}))})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CivCargoHoldTerminal=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.CivCargoHoldTerminal=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.pad,s=d.sending,m=d.status_report,p=d.id_inserted,C=d.id_bounty_info;d.id_bounty_value,d.id_bounty_num;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,width:500,height:375,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.NoticeBox,{color:p?"blue":"default",children:p?"Welcome valued employee.":"To begin, insert your ID into the console."}),(0,o.createComponentVNode)(2,a.Section,{title:"Cargo Pad",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:u?"good":"bad",children:u?"Online":"Not Found"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cargo Report",children:m})]})}),(0,o.createComponentVNode)(2,i)]}),(0,o.createComponentVNode)(2,a.Flex.Item,{m:1,children:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"sync",content:"Check Contents",disabled:!u||!p,onClick:function(){return l("recalc")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:s?"times":"arrow-up",content:s?"Stop Sending":"Send Goods",selected:s,disabled:!u||!p,onClick:function(){return l(s?"stop":"send")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:C?"recycle":"pen",color:C?"green":"default",content:C?"Replace Bounty":"New Bounty",disabled:!p,onClick:function(){return l("bounty")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"download",content:"Eject",disabled:!p,onClick:function(){return l("eject")}})],4)})]})})})};var i=function(e,t){var n=(0,r.useBackend)(t).data,c=n.id_bounty_info,i=n.id_bounty_value,l=n.id_bounty_num;return(0,o.createComponentVNode)(2,a.Section,{title:"Bounty Info",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:c||"N/A, please add a new bounty."}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Quantity",children:c?l:"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Value",children:c?i:"N/A"})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ClockworkSlab=void 0;for(var o=n(0),r=n(2),a=n(14),c=n(1),i=n(3),l="",d=0;d=w,tooltip:e.tip,tooltipPosition:"left",onClick:function(){return d("recite",{script:e.type})},children:"Recite "+e.required})}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,disabled:!e.quickbind,onClick:function(){return d("bind",{script:e.type})},children:["content=",e.bound?"Unbind "+e.bound:"Quickbind"]})})]},e.name)}))})]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CodexGigas=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=["Dark","Hellish","Fallen","Fiery","Sinful","Blood","Fluffy"],l=["Lord","Prelate","Count","Viscount","Vizier","Elder","Adept"],d=["hal","ve","odr","neit","ci","quon","mya","folth","wren","geyr","hil","niet","twou","phi","coa"],u=["the Red","the Soulless","the Master","the Lord of all things","Jr."];t.CodexGigas=function(e,t){var n=(0,r.useBackend)(t),s=n.act,m=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:450,height:450,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[m.name,(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Prefix",children:i.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e,disabled:1!==m.currentSection,onClick:function(){return s(e+" ")}},e.toLowerCase())}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e,disabled:m.currentSection>2,onClick:function(){return s(e+" ")}},e.toLowerCase())}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e,disabled:m.currentSection>4,onClick:function(){return s(e)}},e.toLowerCase())}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Suffix",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e,disabled:4!==m.currentSection,onClick:function(){return s(" "+e)}},e.toLowerCase())}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Submit",children:(0,o.createComponentVNode)(2,a.Button,{content:"Search",disabled:m.currentSection<4,onClick:function(){return s("search")}})})]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ComputerFabricator=void 0;var o=n(0),r=(n(19),n(2)),a=n(1),c=n(3);t.ComputerFabricator=function(e,t){var n=(0,r.useBackend)(t),s=n.act,m=n.data;return(0,o.createComponentVNode)(2,c.Window,{title:"Personal Computer Vendor",width:500,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{italic:!0,fontSize:"20px",children:"Your perfect device, only three steps away..."}),0!==m.state&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mb:1,icon:"circle",content:"Clear Order",onClick:function(){return s("clean_order")}}),0===m.state&&(0,o.createComponentVNode)(2,i),1===m.state&&(0,o.createComponentVNode)(2,l),2===m.state&&(0,o.createComponentVNode)(2,d),3===m.state&&(0,o.createComponentVNode)(2,u)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Step 1",minHeight:"306px",children:[(0,o.createComponentVNode)(2,a.Box,{mt:5,bold:!0,textAlign:"center",fontSize:"40px",children:"Choose your Device"}),(0,o.createComponentVNode)(2,a.Box,{mt:3,children:(0,o.createComponentVNode)(2,a.Grid,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"laptop",content:"Laptop",textAlign:"center",fontSize:"30px",lineHeight:2,onClick:function(){return c("pick_device",{pick:"1"})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"tablet-alt",content:"Tablet",textAlign:"center",fontSize:"30px",lineHeight:2,onClick:function(){return c("pick_device",{pick:"2"})}})})]})})]})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Step 2: Customize your device",minHeight:"282px",buttons:(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"good",children:[i.totalprice," cr"]}),children:[(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,position:"relative",children:["Battery:",(0,o.createComponentVNode)(2,a.Tooltip,{content:"Allows your device to operate without external utility power\nsource. Advanced batteries increase battery life.",position:"right"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Standard",selected:1===i.hw_battery,onClick:function(){return c("hw_battery",{battery:"1"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Upgraded",selected:2===i.hw_battery,onClick:function(){return c("hw_battery",{battery:"2"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Advanced",selected:3===i.hw_battery,onClick:function(){return c("hw_battery",{battery:"3"})}})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,position:"relative",children:["Hard Drive:",(0,o.createComponentVNode)(2,a.Tooltip,{content:"Stores file on your device. Advanced drives can store more\nfiles, but use more power, shortening battery life.",position:"right"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Standard",selected:1===i.hw_disk,onClick:function(){return c("hw_disk",{disk:"1"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Upgraded",selected:2===i.hw_disk,onClick:function(){return c("hw_disk",{disk:"2"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Advanced",selected:3===i.hw_disk,onClick:function(){return c("hw_disk",{disk:"3"})}})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,position:"relative",children:["Network Card:",(0,o.createComponentVNode)(2,a.Tooltip,{content:"Allows your device to wirelessly connect to stationwide NTNet\nnetwork. Basic cards are limited to on-station use, while\nadvanced cards can operate anywhere near the station, which\nincludes asteroid outposts",position:"right"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"None",selected:0===i.hw_netcard,onClick:function(){return c("hw_netcard",{netcard:"0"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Standard",selected:1===i.hw_netcard,onClick:function(){return c("hw_netcard",{netcard:"1"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Advanced",selected:2===i.hw_netcard,onClick:function(){return c("hw_netcard",{netcard:"2"})}})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,position:"relative",children:["Nano Printer:",(0,o.createComponentVNode)(2,a.Tooltip,{content:"A device that allows for various paperwork manipulations,\nsuch as, scanning of documents or printing new ones.\nThis device was certified EcoFriendlyPlus and is capable of\nrecycling existing paper for printing purposes.",position:"right"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"None",selected:0===i.hw_nanoprint,onClick:function(){return c("hw_nanoprint",{print:"0"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Standard",selected:1===i.hw_nanoprint,onClick:function(){return c("hw_nanoprint",{print:"1"})}})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,position:"relative",children:["Secondary Card Reader:",(0,o.createComponentVNode)(2,a.Tooltip,{content:"Adds a secondary RFID card reader, for manipulating or\nreading from a second standard RFID card.\nPlease note that a primary card reader is necessary to\nallow the device to read your identification, but one\nis included in the base price.",position:"right"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"None",selected:0===i.hw_card,onClick:function(){return c("hw_card",{card:"0"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Standard",selected:1===i.hw_card,onClick:function(){return c("hw_card",{card:"1"})}})})]}),2!==i.devtype&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,position:"relative",children:["Processor Unit:",(0,o.createComponentVNode)(2,a.Tooltip,{content:"A component critical for your device's functionality.\nIt allows you to run programs from your hard drive.\nAdvanced CPUs use more power, but allow you to run\nmore programs on background at once.",position:"right"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Standard",selected:1===i.hw_cpu,onClick:function(){return c("hw_cpu",{cpu:"1"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Advanced",selected:2===i.hw_cpu,onClick:function(){return c("hw_cpu",{cpu:"2"})}})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,position:"relative",children:["Tesla Relay:",(0,o.createComponentVNode)(2,a.Tooltip,{content:"An advanced wireless power relay that allows your device\nto connect to nearby area power controller to provide\nalternative power source. This component is currently\nunavailable on tablet computers due to size restrictions.",position:"right"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"None",selected:0===i.hw_tesla,onClick:function(){return c("hw_tesla",{tesla:"0"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Standard",selected:1===i.hw_tesla,onClick:function(){return c("hw_tesla",{tesla:"1"})}})})]})],4)]}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:3,content:"Confirm Order",color:"good",textAlign:"center",fontSize:"18px",lineHeight:2,onClick:function(){return c("confirm_order")}})]})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Step 3: Payment",minHeight:"282px",children:[(0,o.createComponentVNode)(2,a.Box,{italic:!0,textAlign:"center",fontSize:"20px",children:"Your device is ready for fabrication..."}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,mt:2,textAlign:"center",fontSize:"16px",children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,children:"Please insert the required"})," ",(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"good",children:[i.totalprice," cr"]})]}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,mt:1,textAlign:"center",fontSize:"18px",children:"Current:"}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,mt:.5,textAlign:"center",fontSize:"18px",color:i.credits>=i.totalprice?"good":"bad",children:[i.credits," cr"]}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Purchase",disabled:i.credits=10&&e<20?c.COLORS.department.security:e>=20&&e<30?c.COLORS.department.medbay:e>=30&&e<40?c.COLORS.department.science:e>=40&&e<50?c.COLORS.department.engineering:e>=50&&e<60?c.COLORS.department.cargo:e>=200&&e<230?c.COLORS.department.centcom:c.COLORS.department.other},u=function(e){var t=e.type,n=e.value;return(0,o.createComponentVNode)(2,a.Box,{inline:!0,width:2,color:c.COLORS.damageType[t],textAlign:"center",children:n})};t.CrewConsole=function(){return(0,o.createComponentVNode)(2,i.Window,{title:"Crew Monitor",width:800,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{minHeight:"540px",children:(0,o.createComponentVNode)(2,s)})})})};var s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,s=i.sensors||[];return(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,collapsing:!0}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,collapsing:!0,textAlign:"center",children:"Vitals"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Position"}),!!i.link_allowed&&(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,collapsing:!0,children:"Tracking"})]}),s.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:(C=e.ijob,C%10==0),color:d(e.ijob),children:[e.name," (",e.assignment,")"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,a.ColorBox,{color:(t=e.oxydam,n=e.toxdam,r=e.burndam,s=e.brutedam,m=t+n+r+s,p=Math.min(Math.max(Math.ceil(m/25),0),5),l[p])})}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:null!==e.oxydam?(0,o.createComponentVNode)(2,a.Box,{inline:!0,children:[(0,o.createComponentVNode)(2,u,{type:"oxy",value:e.oxydam}),"/",(0,o.createComponentVNode)(2,u,{type:"toxin",value:e.toxdam}),"/",(0,o.createComponentVNode)(2,u,{type:"burn",value:e.burndam}),"/",(0,o.createComponentVNode)(2,u,{type:"brute",value:e.brutedam})]}):e.life_status?"Alive":"Dead"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:null!==e.pos_x?e.area:"N/A"}),!!i.link_allowed&&(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,a.Button,{content:"Track",disabled:!e.can_track,onClick:function(){return c("select_person",{name:e.name})}})})]},e.name);var t,n,r,s,m,p,C}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Cryo=void 0;var o=n(0),r=n(2),a=n(1),c=n(205),i=n(3),l=[{label:"Brute",type:"bruteLoss"},{label:"Respiratory",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Burn",type:"fireLoss"}];t.Cryo=function(){return(0,o.createComponentVNode)(2,i.Window,{width:400,height:550,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,d)})})};var d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,d=n.data;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Occupant",children:d.occupant.name||"No Occupant"}),!!d.hasOccupant&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"State",color:d.occupant.statstate,children:d.occupant.stat}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",color:d.occupant.temperaturestatus,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d.occupant.bodyTemperature})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.occupant.health/d.occupant.maxHealth,color:d.occupant.health>0?"good":"average",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d.occupant.health})})}),l.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.label,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.occupant[e.type]/100,children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d.occupant[e.type]})})},e.id)}))],0)]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Cell",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:d.isOperating?"power-off":"times",disabled:d.isOpen,onClick:function(){return i("power")},color:d.isOperating&&"green",children:d.isOperating?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d.cellTemperature})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door",children:[(0,o.createComponentVNode)(2,a.Button,{icon:d.isOpen?"unlock":"lock",onClick:function(){return i("door")},content:d.isOpen?"Open":"Closed"}),(0,o.createComponentVNode)(2,a.Button,{icon:d.autoEject?"sign-out-alt":"sign-in-alt",onClick:function(){return i("autoeject")},content:d.autoEject?"Auto":"Manual"})]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Beaker",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",disabled:!d.isBeakerLoaded,onClick:function(){return i("ejectbeaker")},content:"Eject"}),children:(0,o.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:d.isBeakerLoaded,beakerContents:d.beakerContents})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.DecalPainter=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.DecalPainter=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.decal_list||[],u=l.color_list||[],s=l.dir_list||[];return(0,o.createComponentVNode)(2,c.Window,{width:500,height:400,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Decal Type",children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,selected:e.decal===l.decal_style,onClick:function(){return i("select decal",{decals:e.decal})}},e.decal)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Decal Color",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:"red"===e.colors?"Red":"white"===e.colors?"White":"Yellow",selected:e.colors===l.decal_color,onClick:function(){return i("select color",{colors:e.colors})}},e.colors)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Decal Direction",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:1===e.dirs?"North":2===e.dirs?"South":4===e.dirs?"East":"West",selected:e.dirs===l.decal_direction,onClick:function(){return i("selected direction",{dirs:e.dirs})}},e.dirs)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DisposalUnit=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.DisposalUnit=function(e,t){var n,i,l=(0,r.useBackend)(t),d=l.act,u=l.data;return u.full_pressure?(n="good",i="Ready"):u.panel_open?(n="bad",i="Power Disabled"):u.pressure_charging?(n="average",i="Pressurizing"):(n="bad",i="Off"),(0,o.createComponentVNode)(2,c.Window,{width:300,height:180,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"State",color:n,children:i}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.per,color:"good"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Handle",children:(0,o.createComponentVNode)(2,a.Button,{icon:u.flush?"toggle-on":"toggle-off",disabled:u.isai||u.panel_open,content:u.flush?"Disengage":"Engage",onClick:function(){return d(u.flush?"handle-0":"handle-1")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Eject",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sign-out-alt",disabled:u.isai,content:"Eject Contents",onClick:function(){return d("eject")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",disabled:u.panel_open,selected:u.pressure_charging,onClick:function(){return d(u.pressure_charging?"pump-0":"pump-1")}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DnaConsoleCommands=t.DnaConsole=void 0;var o=n(0),r=n(14),a=n(30),c=n(6),i=n(19),l=n(63),d=n(2),u=n(1),s=n(3);var m=["A","T","C","G"],p={A:"green",T:"green",G:"blue",C:"blue",X:"grey"},C={1:"good",2:"bad",4:"average"},h=function(e,t){return e.Alias===t.Alias&&e.AppliedChromo===t.AppliedChromo};t.DnaConsole=function(e,t){var n=(0,d.useBackend)(t),r=n.data,a=(n.act,r.isPulsingRads),c=r.radPulseSeconds,i=r.view.consoleMode;return(0,o.createComponentVNode)(2,s.Window,{title:"DNA Console",width:539,height:710,resizable:!0,children:[!!a&&(0,o.createComponentVNode)(2,u.Dimmer,{fontSize:"14px",textAlign:"center",children:[(0,o.createComponentVNode)(2,u.Icon,{mr:1,name:"spinner",spin:!0}),"Radiation pulse in progress...",(0,o.createComponentVNode)(2,u.Box,{mt:1}),c,"s"]}),(0,o.createComponentVNode)(2,s.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,N),(0,o.createComponentVNode)(2,g),"storage"===i&&(0,o.createComponentVNode)(2,k),"sequencer"===i&&(0,o.createComponentVNode)(2,L),"enzymes"===i&&(0,o.createComponentVNode)(2,T)]})]})};var N=function(e,t){return(0,o.createComponentVNode)(2,u.Section,{title:"DNA Scanner",buttons:(0,o.createComponentVNode)(2,V),children:(0,o.createComponentVNode)(2,f)})},V=function(e,t){var n=(0,d.useBackend)(t),r=n.data,a=n.act,c=r.hasDelayedAction,i=r.isPulsingRads,l=r.isScannerConnected,s=r.isScrambleReady,m=r.isViableSubject,p=r.scannerLocked,C=r.scannerOpen,h=r.scrambleSeconds;return l?(0,o.createFragment)([!!c&&(0,o.createComponentVNode)(2,u.Button,{content:"Cancel Delayed Action",onClick:function(){return a("cancel_delay")}}),!!m&&(0,o.createComponentVNode)(2,u.Button,{disabled:!s||i,onClick:function(){return a("scramble_dna")},children:["Scramble DNA",!s&&" ("+h+"s)"]}),(0,o.createComponentVNode)(2,u.Box,{inline:!0,mr:1}),(0,o.createComponentVNode)(2,u.Button,{icon:p?"lock":"lock-open",color:p&&"bad",disabled:C,content:p?"Locked":"Unlocked",onClick:function(){return a("toggle_lock")}}),(0,o.createComponentVNode)(2,u.Button,{disabled:p,content:C?"Close":"Open",onClick:function(){return a("toggle_door")}})],0):(0,o.createComponentVNode)(2,u.Button,{content:"Connect Scanner",onClick:function(){return a("connect_scanner")}})},b=function(e,t){var n=e.status;return 0===n?(0,o.createComponentVNode)(2,u.Box,{inline:!0,color:"good",children:"Conscious"}):2===n?(0,o.createComponentVNode)(2,u.Box,{inline:!0,color:"average",children:"Unconscious"}):1===n?(0,o.createComponentVNode)(2,u.Box,{inline:!0,color:"average",children:"Critical"}):3===n?(0,o.createComponentVNode)(2,u.Box,{inline:!0,color:"bad",children:"Dead"}):4===n?(0,o.createComponentVNode)(2,u.Box,{inline:!0,color:"bad",children:"Transforming"}):(0,o.createComponentVNode)(2,u.Box,{inline:!0,children:"Unknown"})},f=function(e,t){var n=(0,d.useBackend)(t),r=n.data,a=(n.act,r.subjectName),c=r.isScannerConnected,i=r.isViableSubject,l=r.subjectHealth,s=r.subjectRads,m=r.subjectStatus;return c?i?(0,o.createComponentVNode)(2,u.LabeledList,{children:[(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Status",children:[a,(0,o.createComponentVNode)(2,u.Icon,{mx:1,color:"label",name:"long-arrow-alt-right"}),(0,o.createComponentVNode)(2,b,{status:m})]}),(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,u.ProgressBar,{value:l,minValue:0,maxValue:100,ranges:{olive:[101,Infinity],good:[70,101],average:[30,70],bad:[-Infinity,30]},children:[l,"%"]})}),(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Radiation",children:(0,o.createComponentVNode)(2,u.ProgressBar,{value:s,minValue:0,maxValue:100,ranges:{bad:[71,Infinity],average:[30,71],good:[0,30],olive:[-Infinity,0]},children:[s,"%"]})})]}):(0,o.createComponentVNode)(2,u.Box,{color:"average",children:"No viable subject found in DNA Scanner."}):(0,o.createComponentVNode)(2,u.Box,{color:"bad",children:"DNA Scanner is not connected."})},g=function(e,t){var n=(0,d.useBackend)(t),r=n.data,a=n.act,c=r.hasDisk,i=r.isInjectorReady,l=r.injectorSeconds,s=r.view.consoleMode;return(0,o.createComponentVNode)(2,u.Section,{title:"DNA Console",buttons:!i&&(0,o.createComponentVNode)(2,u.Box,{lineHeight:"20px",color:"label",children:["Injector on cooldown (",l,"s)"]}),children:(0,o.createComponentVNode)(2,u.LabeledList,{children:[(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Mode",children:[(0,o.createComponentVNode)(2,u.Button,{content:"Storage",selected:"storage"===s,onClick:function(){return a("set_view",{consoleMode:"storage"})}}),(0,o.createComponentVNode)(2,u.Button,{content:"Sequencer",disabled:!r.isViableSubject,selected:"sequencer"===s,onClick:function(){return a("set_view",{consoleMode:"sequencer"})}}),(0,o.createComponentVNode)(2,u.Button,{content:"Enzymes",selected:"enzymes"===s,onClick:function(){return a("set_view",{consoleMode:"enzymes"})}})]}),!!c&&(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Disk",children:(0,o.createComponentVNode)(2,u.Button,{icon:"eject",content:"Eject",onClick:function(){a("eject_disk"),a("set_view",{storageMode:"console"})}})})]})})};t.DnaConsoleCommands=g;var v=function(e,t){var n=(0,d.useBackend)(t),r=n.data,a=n.act,c=r.hasDisk,i=r.view,l=i.storageMode,s=i.storageConsSubMode,m=i.storageDiskSubMode;return(0,o.createFragment)(["console"===l&&(0,o.createFragment)([(0,o.createComponentVNode)(2,u.Button,{selected:"mutations"===s,content:"Mutations",onClick:function(){return a("set_view",{storageConsSubMode:"mutations"})}}),(0,o.createComponentVNode)(2,u.Button,{selected:"chromosomes"===s,content:"Chromosomes",onClick:function(){return a("set_view",{storageConsSubMode:"chromosomes"})}})],4),"disk"===l&&(0,o.createFragment)([(0,o.createComponentVNode)(2,u.Button,{selected:"mutations"===m,content:"Mutations",onClick:function(){return a("set_view",{storageDiskSubMode:"mutations"})}}),(0,o.createComponentVNode)(2,u.Button,{selected:"diskenzymes"===m,content:"Enzymes",onClick:function(){return a("set_view",{storageDiskSubMode:"diskenzymes"})}})],4),(0,o.createComponentVNode)(2,u.Box,{inline:!0,mr:1}),(0,o.createComponentVNode)(2,u.Button,{content:"Console",selected:"console"===l,onClick:function(){return a("set_view",{storageMode:"console",storageConsSubMode:"mutations"})}}),(0,o.createComponentVNode)(2,u.Button,{content:"Disk",disabled:!c,selected:"disk"===l,onClick:function(){return a("set_view",{storageMode:"disk",storageDiskSubMode:"mutations"})}}),(0,o.createComponentVNode)(2,u.Button,{content:"Adv. Injector",selected:"injector"===l,onClick:function(){return a("set_view",{storageMode:"injector"})}})],0)},k=function(e,t){var n=(0,d.useBackend)(t),r=n.data,a=n.act,c=r.view,i=c.storageMode,l=c.storageConsSubMode,s=c.storageDiskSubMode,m=r.diskMakeupBuffer,p=r.diskHasMakeup,C=r.storage[i];return(0,o.createComponentVNode)(2,u.Section,{title:"Storage",buttons:(0,o.createComponentVNode)(2,v),children:["console"===i&&"mutations"===l&&(0,o.createComponentVNode)(2,x,{mutations:C}),"console"===i&&"chromosomes"===l&&(0,o.createComponentVNode)(2,B),"disk"===i&&"mutations"===s&&(0,o.createComponentVNode)(2,x,{mutations:C}),"disk"===i&&"diskenzymes"===s&&(0,o.createFragment)([(0,o.createComponentVNode)(2,M,{makeup:m}),(0,o.createComponentVNode)(2,u.Button,{icon:"times",color:"red",disabled:!p,content:"Delete",onClick:function(){return a("del_makeup_disk")}})],4),"injector"===i&&(0,o.createComponentVNode)(2,j)]})},x=function(e,t){var n=e.customMode,r=void 0===n?"":n,a=(0,d.useBackend)(t),c=a.data,l=a.act,s=e.mutations||[],m=c.view.storageMode+r,p=c.view["storage"+m+"MutationRef"],C=s.find((function(e){return e.ByondRef===p}));return!C&&s.length>0&&(C=s[0],p=C.ByondRef),(0,o.createComponentVNode)(2,u.Flex,{children:[(0,o.createComponentVNode)(2,u.Flex.Item,{width:"140px",children:(0,o.createComponentVNode)(2,u.Section,{title:(0,i.capitalize)(c.view.storageMode)+" Storage",level:2,children:s.map((function(e){return(0,o.createComponentVNode)(2,u.Button,{fluid:!0,ellipsis:!0,color:"transparent",selected:e.ByondRef===p,content:e.Name,onClick:function(){var t;return l("set_view",((t={})["storage"+m+"MutationRef"]=e.ByondRef,t))}},e.ByondRef)}))})}),(0,o.createComponentVNode)(2,u.Flex.Item,{children:(0,o.createComponentVNode)(2,u.Divider,{vertical:!0})}),(0,o.createComponentVNode)(2,u.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,u.Section,{title:"Mutation Info",level:2,children:(0,o.createComponentVNode)(2,_,{mutation:C})})})]})},B=function(e,t){var n,a=(0,d.useBackend)(t),c=a.data,i=a.act,l=null!=(n=c.chromoStorage)?n:[],s=(0,r.uniqBy)((function(e){return e.Name}))(l),m=c.view.storageChromoName,p=l.find((function(e){return e.Name===m}));return(0,o.createComponentVNode)(2,u.Flex,{children:[(0,o.createComponentVNode)(2,u.Flex.Item,{width:"140px",children:(0,o.createComponentVNode)(2,u.Section,{title:"Console Storage",level:2,children:s.map((function(e){return(0,o.createComponentVNode)(2,u.Button,{fluid:!0,ellipsis:!0,color:"transparent",selected:e.Name===m,content:e.Name,onClick:function(){return i("set_view",{storageChromoName:e.Name})}},e.Index)}))})}),(0,o.createComponentVNode)(2,u.Flex.Item,{children:(0,o.createComponentVNode)(2,u.Divider,{vertical:!0})}),(0,o.createComponentVNode)(2,u.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,u.Section,{title:"Chromosome Info",level:2,children:!p&&(0,o.createComponentVNode)(2,u.Box,{color:"label",children:"Nothing to show."})||(0,o.createFragment)([(0,o.createComponentVNode)(2,u.LabeledList,{children:[(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Name",children:p.Name}),(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Description",children:p.Description}),(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Amount",children:l.filter((function(e){return e.Name===p.Name})).length})]}),(0,o.createComponentVNode)(2,u.Button,{mt:2,icon:"eject",content:"Eject Chromosome",onClick:function(){return i("eject_chromo",{chromo:p.Name})}})],4)})})]})},_=function(e,t){var n,c,i,l=e.mutation,s=(0,d.useBackend)(t),m=s.data,p=s.act,N=m.diskCapacity,V=m.diskReadOnly,b=m.hasDisk,f=m.isInjectorReady,g=null!=(n=m.storage.disk)?n:[],v=null!=(c=m.storage.console)?c:[],k=null!=(i=m.storage.injector)?i:[];if(!l)return(0,o.createComponentVNode)(2,u.Box,{color:"label",children:"Nothing to show."});if("occupant"===l.Source&&!l.Discovered)return(0,o.createComponentVNode)(2,u.LabeledList,{children:(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Name",children:l.Alias})});var x=v.find((function(e){return h(e,l)})),B=g.find((function(e){return h(e,l)})),_=(0,a.flow)([(0,r.uniqBy)((function(e){return e.Name})),(0,r.filter)((function(e){return e.Name!==l.Name}))])([].concat(g,v));return(0,o.createFragment)([(0,o.createComponentVNode)(2,u.LabeledList,{children:[(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,u.Box,{inline:!0,color:C[l.Quality],children:l.Name})}),(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Description",children:l.Description}),(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Instability",children:l.Instability})]}),(0,o.createComponentVNode)(2,u.Divider),(0,o.createComponentVNode)(2,u.Box,{children:["disk"===l.Source&&(0,o.createComponentVNode)(2,W,{disabled:!b||N<=0||V,mutations:_,source:l}),"console"===l.Source&&(0,o.createComponentVNode)(2,W,{mutations:_,source:l}),["occupant","disk","console"].includes(l.Source)&&(0,o.createFragment)([(0,o.createComponentVNode)(2,u.Dropdown,{width:"240px",options:k.map((function(e){return e.name})),disabled:0===k.length||!l.Active,selected:"Add to advanced injector",onSelected:function(e){return p("add_advinj_mut",{mutref:l.ByondRef,advinj:e,source:l.Source})}}),(0,o.createComponentVNode)(2,u.Button,{icon:"syringe",disabled:!f||!l.Active,content:"Print Activator",onClick:function(){return p("print_injector",{mutref:l.ByondRef,is_activator:1,source:l.Source})}}),(0,o.createComponentVNode)(2,u.Button,{icon:"syringe",disabled:!f||!l.Active,content:"Print Mutator",onClick:function(){return p("print_injector",{mutref:l.ByondRef,is_activator:0,source:l.Source})}})],4)]}),["disk","occupant"].includes(l.Source)&&(0,o.createComponentVNode)(2,u.Button,{icon:"save",disabled:x||!l.Active,content:"Save to Console",onClick:function(){return p("save_console",{mutref:l.ByondRef,source:l.Source})}}),["console","occupant"].includes(l.Source)&&(0,o.createComponentVNode)(2,u.Button,{icon:"save",disabled:B||!b||N<=0||V||!l.Active,content:"Save to Disk",onClick:function(){return p("save_disk",{mutref:l.ByondRef,source:l.Source})}}),["console","disk","injector"].includes(l.Source)&&(0,o.createComponentVNode)(2,u.Button,{icon:"times",color:"red",content:"Delete from "+l.Source,onClick:function(){return p("delete_"+l.Source+"_mut",{mutref:l.ByondRef})}}),(2===l.Class||!!l.Scrambled&&"occupant"===l.Source)&&(0,o.createComponentVNode)(2,u.Button,{content:"Nullify",onClick:function(){return p("nullify",{mutref:l.ByondRef})}}),(0,o.createComponentVNode)(2,u.Divider),(0,o.createComponentVNode)(2,w,{disabled:"occupant"!==l.Source,mutation:l})],0)},w=function(e,t){var n=e.mutation,r=e.disabled,a=(0,d.useBackend)(t),c=(a.data,a.act);return 0===n.CanChromo?(0,o.createComponentVNode)(2,u.Box,{color:"label",children:"No compatible chromosomes"}):1===n.CanChromo?r?(0,o.createComponentVNode)(2,u.Box,{color:"label",children:"No chromosome applied."}):(0,o.createFragment)([(0,o.createComponentVNode)(2,u.Dropdown,{width:"240px",options:n.ValidStoredChromos,disabled:0===n.ValidStoredChromos.length,selected:0===n.ValidStoredChromos.length?"No Suitable Chromosomes":"Select a chromosome",onSelected:function(e){return c("apply_chromo",{chromo:e,mutref:n.ByondRef})}}),(0,o.createComponentVNode)(2,u.Box,{color:"label",mt:1,children:["Compatible with: ",n.ValidChromos]})],4):2===n.CanChromo?(0,o.createComponentVNode)(2,u.Box,{color:"label",children:["Applied chromosome: ",n.AppliedChromo]}):null},L=function(e,t){var n,r,a=(0,d.useBackend)(t),c=a.data,i=a.act,s=null!=(n=null==(r=c.storage)?void 0:r.occupant)?n:[],m=c.isJokerReady,p=c.isMonkey,C=c.jokerSeconds,h=c.subjectStatus,N=c.view,V=N.sequencerMutation,b=N.jokerActive,f=s.find((function(e){return e.Alias===V}));return(0,o.createFragment)([(0,o.createComponentVNode)(2,u.Flex,{spacing:1,mb:1,children:[(0,o.createComponentVNode)(2,u.Flex.Item,{width:s.length<=8?"154px":"174px",children:(0,o.createComponentVNode)(2,u.Section,{title:"Sequences",height:"214px",overflowY:s.length>8&&"scroll",children:s.map((function(e){return(0,o.createComponentVNode)(2,y,{url:(0,l.resolveAsset)(e.Image),selected:e.Alias===V,onClick:function(){i("set_view",{sequencerMutation:e.Alias}),i("check_discovery",{alias:e.Alias})}},e.Alias)}))})}),(0,o.createComponentVNode)(2,u.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,u.Section,{title:"Sequence Info",minHeight:"100%",children:(0,o.createComponentVNode)(2,_,{mutation:f})})})]}),3===h&&(0,o.createComponentVNode)(2,u.Section,{color:"bad",children:"Genetic sequence corrupted. Subject diagnostic report: DECEASED."})||p&&"Monkified"!==(null==f?void 0:f.Name)&&(0,o.createComponentVNode)(2,u.Section,{color:"bad",children:"Genetic sequence corrupted. Subject diagnostic report: MONKEY."})||4===h&&(0,o.createComponentVNode)(2,u.Section,{color:"bad",children:"Genetic sequence corrupted. Subject diagnostic report: TRANSFORMING."})||(0,o.createComponentVNode)(2,u.Section,{title:"Genome Sequencer\u2122",buttons:!m&&(0,o.createComponentVNode)(2,u.Box,{lineHeight:"20px",color:"label",children:["Joker on cooldown (",C,"s)"]})||b&&(0,o.createFragment)([(0,o.createComponentVNode)(2,u.Box,{mr:1,inline:!0,color:"label",children:"Click on a gene to reveal it."}),(0,o.createComponentVNode)(2,u.Button,{content:"Cancel Joker",onClick:function(){return i("set_view",{jokerActive:""})}})],4)||(0,o.createComponentVNode)(2,u.Button,{icon:"crown",color:"purple",content:"Use Joker",onClick:function(){return i("set_view",{jokerActive:"1"})}}),children:(0,o.createComponentVNode)(2,I,{mutation:f})})],0)},y=function(e,t){var n,r=e.url,a=e.selected,c=e.onClick;return a&&(n="2px solid #22aa00"),(0,o.createComponentVNode)(2,u.Box,{as:"img",src:r,style:{width:"64px",margin:"2px","margin-left":"4px",outline:n},onClick:c})},S=function(e,t){var n=e.gene,r=e.onChange,a=e.disabled,c=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["gene","onChange","disabled"]),i=m.length,l=m.indexOf(n),d=a&&p.X||p[n];return(0,o.normalizeProps)((0,o.createComponentVNode)(2,u.Button,Object.assign({},c,{color:d,onClick:function(e){if(e.preventDefault(),r)if(-1!==l){var t=m[(l+1)%i];r(e,t)}else r(e,m[0])},oncontextmenu:function(e){if(e.preventDefault(),r)if(-1!==l){var t=m[(l-1+i)%i];r(e,t)}else r(e,m[i-1])},children:n})))},I=function(e,t){var n=e.mutation,r=(0,d.useBackend)(t),a=r.data,i=r.act,l=a.view.jokerActive;if(!n)return(0,o.createComponentVNode)(2,u.Box,{color:"average",children:"No genome selected for sequencing."});if(n.Scrambled)return(0,o.createComponentVNode)(2,u.Box,{color:"average",children:"Sequence unreadable due to unpredictable mutation."});for(var s=n.Sequence,m=n.DefaultSeq,p=[],C=function(e){var t=s.charAt(e),r=(0,o.createComponentVNode)(2,S,{width:"22px",textAlign:"center",disabled:!!n.Scrambled||1!==n.Class,className:"X"===(null==m?void 0:m.charAt(e))&&!n.Active&&(0,c.classes)(["outline-solid","outline-color-orange"]),gene:t,onChange:function(t,o){if(!t.ctrlKey)return l?(i("pulse_gene",{pos:e+1,gene:"J",alias:n.Alias}),void i("set_view",{jokerActive:""})):void i("pulse_gene",{pos:e+1,gene:o,alias:n.Alias});i("pulse_gene",{pos:e+1,gene:"X",alias:n.Alias})}});p.push(r)},h=0;h=3){var r=(0,o.createComponentVNode)(2,u.Box,{inline:!0,width:"22px",mx:"1px",children:s});l.push(r),s=[]}},p=0;p=i,onCommit:function(e,t){return a("new_adv_inj",{name:t})}})})]})},W=function(e,t){var n=e.mutations,r=void 0===n?[]:n,a=e.source,c=(0,d.useBackend)(t),i=c.act;c.data;return(0,o.createComponentVNode)(2,u.Dropdown,{width:"240px",options:r.map((function(e){return e.Name})),disabled:0===r.length,selected:"Combine mutations",onSelected:function(e){return i("combine_"+a.Source,{firstref:(t=e,null==(n=r.find((function(e){return e.Name===t})))?void 0:n.ByondRef),secondref:a.ByondRef});var t,n}},a.ByondRef)}},function(e,t,n){"use strict";t.__esModule=!0,t.DnaVault=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.DnaVault=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.completed,u=l.used,s=l.choiceA,m=l.choiceB,p=l.dna,C=l.dna_max,h=l.plants,N=l.plants_max,V=l.animals,b=l.animals_max;return(0,o.createComponentVNode)(2,c.Window,{width:350,height:400,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"DNA Vault Database",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Human DNA",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:p/C,children:p+" / "+C+" Samples"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Plant DNA",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:h/N,children:h+" / "+N+" Samples"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Animal DNA",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:V/V,children:V+" / "+b+" Samples"})})]})}),!(!d||u)&&(0,o.createComponentVNode)(2,a.Section,{title:"Personal Gene Therapy",children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,textAlign:"center",mb:1,children:"Applicable Gene Therapy Treatments"}),(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,bold:!0,content:s,textAlign:"center",onClick:function(){return i("gene",{choice:s})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,bold:!0,content:m,textAlign:"center",onClick:function(){return i("gene",{choice:m})}})})]})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.EightBallVote=void 0;var o=n(0),r=n(2),a=n(1),c=n(19),i=n(3);t.EightBallVote=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.shaking);return(0,o.createComponentVNode)(2,i.Window,{width:400,height:600,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:!c&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No question is currently being asked."})||(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.question,u=l.answers,s=void 0===u?[]:u;return(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,textAlign:"center",fontSize:"16px",m:1,children:['"',d,'"']}),(0,o.createComponentVNode)(2,a.Grid,{children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Grid.Column,{children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,bold:!0,content:(0,c.toTitleCase)(e.answer),selected:e.selected,fontSize:"16px",lineHeight:"24px",textAlign:"center",mb:1,onClick:function(){return i("vote",{answer:e.answer})}}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,textAlign:"center",fontSize:"30px",children:e.amount})]},e.answer)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Electrolyzer=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.Electrolyzer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:400,height:305,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Power",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject Cell",disabled:!l.hasPowercell||!l.open,onClick:function(){return i("eject")}}),(0,o.createComponentVNode)(2,a.Button,{icon:l.on?"power-off":"times",content:l.on?"On":"Off",selected:l.on,disabled:!l.hasPowercell,onClick:function(){return i("power")}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell",color:!l.hasPowercell&&"bad",children:l.hasPowercell&&(0,o.createComponentVNode)(2,a.ProgressBar,{value:l.powerLevel/100,content:l.powerLevel+"%",ranges:{good:[.6,Infinity],average:[.3,.6],bad:[-Infinity,.3]}})||"None"})})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Electropack=void 0;var o=n(0),r=n(9),a=n(2),c=n(1),i=n(3);t.Electropack=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.power,s=d.code,m=d.frequency,p=d.minFrequency,C=d.maxFrequency;return(0,o.createComponentVNode)(2,i.Window,{width:260,height:137,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,c.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return l("power")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Frequency",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"freq"})}}),children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:p/10,maxValue:C/10,value:m/10,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onDrag:function(e,t){return l("freq",{freq:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Code",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"code"})}}),children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:s,width:"80px",onDrag:function(e,t){return l("code",{code:t})}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.EmergencyShuttleConsole=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.EmergencyShuttleConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.timer_str,u=l.enabled,s=l.emagged,m=l.engines_started,p=l.authorizations_remaining,C=l.authorizations,h=void 0===C?[]:C;return(0,o.createComponentVNode)(2,c.Window,{width:400,height:350,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,fontSize:"40px",textAlign:"center",fontFamily:"monospace",children:d}),(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",fontSize:"16px",mb:1,children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,children:"ENGINES:"}),(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:m?"good":"average",ml:1,children:m?"Online":"Idle"})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Early Launch Authorization",level:2,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Repeal All",color:"bad",disabled:!u,onClick:function(){return i("abort")}}),children:[(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"exclamation-triangle",color:"good",content:"AUTHORIZE",disabled:!u,onClick:function(){return i("authorize")}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"minus",content:"REPEAL",disabled:!u,onClick:function(){return i("repeal")}})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Authorizations",level:3,minHeight:"150px",buttons:(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,color:s?"bad":"good",children:s?"ERROR":"Remaining: "+p}),children:h.length>0?h.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{bold:!0,fontSize:"16px",className:"candystripe",children:[e.name," (",e.job,")"]},e.name)})):(0,o.createComponentVNode)(2,a.Box,{bold:!0,textAlign:"center",fontSize:"16px",color:"average",children:"No Active Authorizations"})})]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.EngravedMessage=void 0;var o=n(0),r=n(19),a=n(2),c=n(1),i=n(3);t.EngravedMessage=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.admin_mode,s=d.creator_key,m=d.creator_name,p=d.has_liked,C=d.has_disliked,h=d.hidden_message,N=d.is_creator,V=d.num_likes,b=d.num_dislikes,f=d.realdate;return(0,o.createComponentVNode)(2,i.Window,{width:600,height:300,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.Box,{bold:!0,textAlign:"center",fontSize:"20px",mb:2,children:(0,r.decodeHtmlEntities)(h)}),(0,o.createComponentVNode)(2,c.Grid,{children:[(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,icon:"arrow-up",content:" "+V,disabled:N,selected:p,textAlign:"center",fontSize:"16px",lineHeight:"24px",onClick:function(){return l("like")}})}),(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,icon:"circle",disabled:N,selected:!C&&!p,textAlign:"center",fontSize:"16px",lineHeight:"24px",onClick:function(){return l("neutral")}})}),(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,icon:"arrow-down",content:" "+b,disabled:N,selected:C,textAlign:"center",fontSize:"16px",lineHeight:"24px",onClick:function(){return l("dislike")}})})]})]}),(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Created On",children:f})})}),(0,o.createComponentVNode)(2,c.Section),!!u&&(0,o.createComponentVNode)(2,c.Section,{title:"Admin Panel",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Delete",color:"bad",onClick:function(){return l("delete")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Creator Ckey",children:s}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Creator Character Name",children:m})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ExosuitControlConsole=void 0;var o=n(0),r=n(9),a=n(2),c=n(1),i=n(3);t.ExosuitControlConsole=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data.mechs,u=void 0===d?[]:d;return(0,o.createComponentVNode)(2,i.Window,{width:500,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[0===u.length&&(0,o.createComponentVNode)(2,c.NoticeBox,{children:"No exosuits detected"}),u.map((function(e){return(0,o.createComponentVNode)(2,c.Section,{title:e.name,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"envelope",content:"Send Message",disabled:!e.pilot,onClick:function(){return l("send_message",{tracker_ref:e.tracker_ref})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"wifi",content:e.emp_recharging?"Recharging...":"EMP Burst",color:"bad",disabled:e.emp_recharging,onClick:function(){return l("shock",{tracker_ref:e.tracker_ref})}})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,c.Box,{color:(e.integrity<=30?"bad":e.integrity<=70&&"average")||"good",children:[e.integrity,"%"]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Charge",children:(0,o.createComponentVNode)(2,c.Box,{color:(e.charge<=30?"bad":e.charge<=70&&"average")||"good",children:"number"==typeof e.charge&&e.charge+"%"||"Not Found"})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Airtank",children:"number"==typeof e.airtank&&(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:e.airtank,format:function(e){return(0,r.toFixed)(e,2)+" kPa"}})||"Not Equipped"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pilot",children:e.pilot||"None"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Location",children:e.location||"Unknown"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Active Equipment",children:e.active_equipment||"None"}),e.cargo_space>=0&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Used Cargo Space",children:(0,o.createComponentVNode)(2,c.Box,{color:(e.cargo_space<=30?"good":e.cargo_space<=70&&"average")||"bad",children:[e.cargo_space,"%"]})})]})},e.tracker_ref)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ExosuitFabricator=void 0;var o,r=n(0),a=n(6),c=n(14),i=n(2),l=n(39),d=n(1),u=n(3),s=n(19);function m(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return p(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(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}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(n=e[Symbol.iterator]()).next.bind(n)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);nn?{color:2,deficit:e-n}:t>n?{color:1,deficit:e}:e+t>n?{color:1,deficit:e+t-n}:{color:0,deficit:0}},V=function(e,t,n){var o={textColor:0};return Object.keys(n.cost).forEach((function(r){o[r]=N(n.cost[r],t[r],e[r]),o[r].color>o.textColor&&(o.textColor=o[r].color)})),o};t.ExosuitFabricator=function(e,t){var n,o,a=(0,i.useBackend)(t),c=a.act,l=a.data,s=l.queue||[],m=(n=l.materials||[],o={},n.forEach((function(e){o[e.name]=e.amount})),o),p=function(e,t){var n={},o={},r={},a={};return t.forEach((function(t,c){a[c]=0,Object.keys(t.cost).forEach((function(i){n[i]=n[i]||0,r[i]=r[i]||0,o[i]=N(t.cost[i],n[i],e[i]),0!==o[i].color?a[c]1&&l=0&&m+"s"||"Dispensing..."})]})})})}}},function(e,t,n){"use strict";t.__esModule=!0,t.ForbiddenLore=void 0;var o=n(0),r=n(14),a=n(30),c=n(2),i=n(1),l=n(3);t.ForbiddenLore=function(e,t){var n=(0,c.useBackend)(t),d=n.act,u=n.data,s=u.charges,m=(0,a.flow)([(0,r.sortBy)((function(e){return"Research"!==e.state}),(function(e){return"Side"===e.path}))])(u.to_know||[]);return(0,o.createComponentVNode)(2,l.Window,{width:500,height:900,resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:"Research Eldritch Knowledge",children:["Charges left : ",s,null!==m?m.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,level:2,children:[(0,o.createComponentVNode)(2,i.Box,{bold:!0,my:1,children:[e.path," path"]}),(0,o.createComponentVNode)(2,i.Box,{my:1,children:[(0,o.createComponentVNode)(2,i.Button,{content:e.state,disabled:e.disabled,onClick:function(){return d("research",{name:e.name,cost:e.cost})}})," ","Cost : ",e.cost]}),(0,o.createComponentVNode)(2,i.Box,{italic:!0,my:1,children:e.flavour}),(0,o.createComponentVNode)(2,i.Box,{my:1,children:e.desc})]},e.name)})):(0,o.createComponentVNode)(2,i.Box,{children:"No more knowledge can be found"})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Gateway=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.Gateway=function(){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.gateway_present,d=void 0!==l&&l,u=i.gateway_status,s=void 0!==u&&u,m=i.current_target,p=void 0===m?null:m,C=i.destinations,h=void 0===C?[]:C;return d?p?(0,o.createComponentVNode)(2,a.Section,{title:p.name,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"rainbow",size:4,color:"green"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,onClick:function(){return c("deactivate")},children:"Deactivate"})]}):h.length?(0,o.createFragment)([!s&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Gateway Unpowered"}),h.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:e.available&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,onClick:function(){return c("activate",{destination:e.ref})},children:"Activate"})||(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{m:1,textColor:"bad",children:e.reason}),!!e.timeout&&(0,o.createComponentVNode)(2,a.ProgressBar,{value:e.timeout,children:"Calibrating..."})],0)},e.ref)}))],0):(0,o.createComponentVNode)(2,a.Section,{children:"No gateway nodes detected."}):(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No linked gateway"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,onClick:function(){return c("linkup")},children:"Linkup"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.GhostPoolProtection=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.GhostPoolProtection=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.events_or_midrounds,u=l.spawners,s=l.station_sentience,m=l.silicons,p=l.minigames;return(0,o.createComponentVNode)(2,c.Window,{title:"Ghost Pool Protection",width:400,height:270,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{grow:1,height:"100%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Options",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{color:"good",icon:"plus-circle",content:"Enable Everything",onClick:function(){return i("all_roles")}}),(0,o.createComponentVNode)(2,a.Button,{color:"bad",icon:"minus-circle",content:"Disable Everything",onClick:function(){return i("no_roles")}})],4),children:[(0,o.createComponentVNode)(2,a.NoticeBox,{danger:!0,children:"For people creating a sneaky event: If you toggle Station Created Sentience, people may catch on that admins have disabled roles for your event..."}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",color:d?"good":"bad",icon:"meteor",content:"Events and Midround Rulesets",onClick:function(){return i("toggle_events_or_midrounds")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",color:u?"good":"bad",icon:"pastafarianism",content:"Ghost Role Spawners",onClick:function(){return i("toggle_spawners")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",color:s?"good":"bad",icon:"user-astronaut",content:"Station Created Sentience",onClick:function(){return i("toggle_station_sentience")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",color:m?"good":"bad",icon:"robot",content:"Silicons",onClick:function(){return i("toggle_silicons")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",color:p?"good":"bad",icon:"gamepad",content:"Minigames",onClick:function(){return i("toggle_minigames")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",color:"orange",icon:"check",content:"Apply Changes",onClick:function(){return i("apply_settings")}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GlandDispenser=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.GlandDispenser=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.glands,d=void 0===l?[]:l;return(0,o.createComponentVNode)(2,c.Window,{width:300,height:338,theme:"abductor",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",lineHeight:"55px",icon:"eject",backgroundColor:e.color,content:e.amount||"0",disabled:!e.amount,onClick:function(){return i("dispense",{gland_id:e.id})}},e.id)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Gps=void 0;var o=n(0),r=n(14),a=n(30),c=n(9),i=n(102),l=n(2),d=n(1),u=n(3),s=function(e){return(0,r.map)(parseFloat)(e.split(", "))};t.Gps=function(e,t){var n=(0,l.useBackend)(t),m=n.act,p=n.data,C=p.currentArea,h=p.currentCoords,N=p.globalmode,V=p.power,b=p.tag,f=p.updating,g=(0,a.flow)([(0,r.map)((function(e,t){var n=e.dist&&Math.round((0,i.vecLength)((0,i.vecSubtract)(s(h),s(e.coords))));return Object.assign({},e,{dist:n,index:t})})),(0,r.sortBy)((function(e){return e.dist===undefined}),(function(e){return e.entrytag}))])(p.signals||[]);return(0,o.createComponentVNode)(2,u.Window,{title:"Global Positioning System",width:470,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d.Section,{title:"Control",buttons:(0,o.createComponentVNode)(2,d.Button,{icon:"power-off",content:V?"On":"Off",selected:V,onClick:function(){return m("power")}}),children:(0,o.createComponentVNode)(2,d.LabeledList,{children:[(0,o.createComponentVNode)(2,d.LabeledList.Item,{label:"Tag",children:(0,o.createComponentVNode)(2,d.Button,{icon:"pencil-alt",content:b,onClick:function(){return m("rename")}})}),(0,o.createComponentVNode)(2,d.LabeledList.Item,{label:"Scan Mode",children:(0,o.createComponentVNode)(2,d.Button,{icon:f?"unlock":"lock",content:f?"AUTO":"MANUAL",color:!f&&"bad",onClick:function(){return m("updating")}})}),(0,o.createComponentVNode)(2,d.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,d.Button,{icon:"sync",content:N?"MAXIMUM":"LOCAL",selected:!N,onClick:function(){return m("globalmode")}})})]})}),!!V&&(0,o.createFragment)([(0,o.createComponentVNode)(2,d.Section,{title:"Current Location",children:(0,o.createComponentVNode)(2,d.Box,{fontSize:"18px",children:[C," (",h,")"]})}),(0,o.createComponentVNode)(2,d.Section,{title:"Detected Signals",children:(0,o.createComponentVNode)(2,d.Table,{children:[(0,o.createComponentVNode)(2,d.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,d.Table.Cell,{content:"Name"}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,content:"Direction"}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,content:"Coordinates"})]}),g.map((function(e){return(0,o.createComponentVNode)(2,d.Table.Row,{className:"candystripe",children:[(0,o.createComponentVNode)(2,d.Table.Cell,{bold:!0,color:"label",children:e.entrytag}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,opacity:e.dist!==undefined&&(0,c.clamp)(1.2/Math.log(Math.E+e.dist/20),.4,1),children:[e.degrees!==undefined&&(0,o.createComponentVNode)(2,d.Icon,{mr:1,size:1.2,name:"arrow-up",rotation:e.degrees}),e.dist!==undefined&&e.dist+"m"]}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,children:e.coords})]},e.entrytag+e.coords+e.index)}))]})})],4)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GravityGenerator=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.GravityGenerator=function(e,t){var n=(0,r.useBackend)(t),l=(n.act,n.data),d=l.charging_state,u=l.operational;return(0,o.createComponentVNode)(2,c.Window,{width:400,height:155,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[!u&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No data available"}),!!u&&0!==d&&(0,o.createComponentVNode)(2,a.NoticeBox,{danger:!0,children:"WARNING - Radiation detected"}),!!u&&0===d&&(0,o.createComponentVNode)(2,a.NoticeBox,{success:!0,children:"No radiation detected"}),!!u&&(0,o.createComponentVNode)(2,i)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.breaker,d=i.charge_count,u=i.charging_state,s=i.on,m=i.operational;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:l?"power-off":"times",content:l?"On":"Off",selected:l,disabled:!m,onClick:function(){return c("gentoggle")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gravity Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d/100,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",children:[0===u&&(s&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Fully Charged"})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Not Charging"})),1===u&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Charging"}),2===u&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Discharging"})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GulagItemReclaimer=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.GulagItemReclaimer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.mobs,u=void 0===d?[]:d;return(0,o.createComponentVNode)(2,c.Window,{width:325,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[0===u.length&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No stored items"}),u.length>0&&(0,o.createComponentVNode)(2,a.Section,{title:"Stored Items",children:(0,o.createComponentVNode)(2,a.Table,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:(0,o.createComponentVNode)(2,a.Button,{content:"Retrieve Items",disabled:!l.can_reclaim,onClick:function(){return i("release_items",{mobref:e.mob})}})})]},e.mob)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GulagTeleporterConsole=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.GulagTeleporterConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.teleporter,u=l.teleporter_lock,s=l.teleporter_state_open,m=l.teleporter_location,p=l.beacon,C=l.beacon_location,h=l.id,N=l.id_name,V=l.can_teleport,b=l.goal,f=void 0===b?0:b,g=l.prisoner,v=void 0===g?{}:g;return(0,o.createComponentVNode)(2,c.Window,{width:350,height:295,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Teleporter Console",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:s?"Open":"Closed",disabled:u,selected:s,onClick:function(){return i("toggle_open")}}),(0,o.createComponentVNode)(2,a.Button,{icon:u?"lock":"unlock",content:u?"Locked":"Unlocked",selected:u,disabled:s,onClick:function(){return i("teleporter_lock")}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Teleporter Unit",color:d?"good":"bad",buttons:!d&&(0,o.createComponentVNode)(2,a.Button,{content:"Reconnect",onClick:function(){return i("scan_teleporter")}}),children:d?m:"Not Connected"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Receiver Beacon",color:p?"good":"bad",buttons:!p&&(0,o.createComponentVNode)(2,a.Button,{content:"Reconnect",onClick:function(){return i("scan_beacon")}}),children:p?C:"Not Connected"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Prisoner Details",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Prisoner ID",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:h?N:"No ID",onClick:function(){return i("handle_id")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Point Goal",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:f,width:"48px",minValue:1,maxValue:1e3,onChange:function(e,t){return i("set_goal",{value:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Occupant",children:v.name||"No Occupant"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Criminal Status",children:v.crimstat||"No Status"})]})}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Process Prisoner",disabled:!V,textAlign:"center",color:"bad",onClick:function(){return i("teleport")}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Holodeck=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.Holodeck=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.can_toggle_safety,u=l.default_programs,s=void 0===u?[]:u,m=l.emag_programs,p=void 0===m?[]:m,C=l.emagged,h=l.program;return(0,o.createComponentVNode)(2,c.Window,{width:400,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Default Programs",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:C?"unlock":"lock",content:"Safeties",color:"bad",disabled:!d,selected:!C,onClick:function(){return i("safety")}}),children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:e.name.substring(11),textAlign:"center",selected:e.type===h,onClick:function(){return i("load_program",{type:e.type})}},e.type)}))}),!!C&&(0,o.createComponentVNode)(2,a.Section,{title:"Dangerous Programs",children:p.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:e.name.substring(11),color:"bad",textAlign:"center",selected:e.type===h,onClick:function(){return i("load_program",{type:e.type})}},e.type)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Holopad=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.Holopad=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data.calling;return(0,o.createComponentVNode)(2,c.Window,{width:440,height:245,resizable:!0,children:[!!d&&(0,o.createComponentVNode)(2,a.Modal,{fontSize:"36px",fontFamily:"monospace",children:[(0,o.createComponentVNode)(2,a.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:2,mt:2,children:(0,o.createComponentVNode)(2,a.Icon,{name:"phone-alt",rotation:25})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:2,children:"Dialing..."})]}),(0,o.createComponentVNode)(2,a.Box,{mt:2,textAlign:"center",fontSize:"24px",children:(0,o.createComponentVNode)(2,a.Button,{lineHeight:"40px",icon:"times",content:"Hang Up",color:"bad",onClick:function(){return l("hang_up")}})})]}),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})]})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.on_network,d=i.on_cooldown,u=i.allowed,s=i.disk,m=i.disk_record,p=i.replay_mode,C=i.loop_mode,h=i.record_mode,N=i.holo_calls,V=void 0===N?[]:N;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Holopad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"bell",content:d?"AI Presence Requested":"Request AI Presence",disabled:!l||d,onClick:function(){return c("AIrequest")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Communicator",children:(0,o.createComponentVNode)(2,a.Button,{icon:"phone-alt",content:u?"Connect To Holopad":"Call Holopad",disabled:!l,onClick:function(){return c("holocall",{headcall:u})}})}),V.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.connected?"Current Call":"Incoming Call",children:(0,o.createComponentVNode)(2,a.Button,{icon:e.connected?"phone-slash":"phone-alt",content:e.connected?"Disconnect call from "+e.caller:"Answer call from "+e.caller,color:e.connected?"bad":"good",disabled:!l,onClick:function(){return c(e.connected?"disconnectcall":"connectcall",{holopad:e.ref})}})},e.ref)}))]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Holodisk",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!s||p||h,onClick:function(){return c("disk_eject")}}),children:!s&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No holodisk"})||(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Disk Player",children:[(0,o.createComponentVNode)(2,a.Button,{icon:p?"pause":"play",content:p?"Stop":"Replay",selected:p,disabled:h||!m,onClick:function(){return c("replay_mode")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:C?"Looping":"Loop",selected:C,disabled:h||!m,onClick:function(){return c("loop_mode")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"exchange-alt",content:"Change Offset",disabled:!p,onClick:function(){return c("offset")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Recorder",children:[(0,o.createComponentVNode)(2,a.Button,{icon:h?"pause":"video",content:h?"End Recording":"Record",selected:h,disabled:m&&!h||p,onClick:function(){return c("record_mode")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"trash",content:"Clear Recording",color:"bad",disabled:!m||p||h,onClick:function(){return c("record_clear")}})]})]})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.HypnoChair=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.HypnoChair=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:375,height:480,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Information",backgroundColor:"#450F44",children:"The Enhanced Interrogation Chamber is designed to induce a deep-rooted trance trigger into the subject. Once the procedure is complete, by using the implanted trigger phrase, the authorities are able to ensure immediate and complete obedience and truthfulness."}),(0,o.createComponentVNode)(2,a.Section,{title:"Occupant Information",textAlign:"center",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:l.occupant.name?l.occupant.name:"No Occupant"}),!!l.occupied&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:0===l.occupant.stat?"good":1===l.occupant.stat?"average":"bad",children:0===l.occupant.stat?"Conscious":1===l.occupant.stat?"Unconcious":"Dead"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Operations",textAlign:"center",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.open?"unlock":"lock",color:l.open?"default":"red",content:l.open?"Open":"Closed",onClick:function(){return i("door")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Phrase",children:(0,o.createComponentVNode)(2,a.Input,{value:l.trigger,onChange:function(e,t){return i("set_phrase",{phrase:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Interrogate Occupant",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"code-branch",content:l.interrogating?"Interrupt Interrogation":"Begin Enhanced Interrogation",onClick:function(){return i("interrogate")}}),1===l.interrogating&&(0,o.createComponentVNode)(2,a.Icon,{name:"cog",color:"orange",spin:!0})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ImplantChair=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.ImplantChair=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:375,height:280,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Occupant Information",textAlign:"center",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:l.occupant.name||"No Occupant"}),!!l.occupied&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:0===l.occupant.stat?"good":1===l.occupant.stat?"average":"bad",children:0===l.occupant.stat?"Conscious":1===l.occupant.stat?"Unconcious":"Dead"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Operations",textAlign:"center",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.open?"unlock":"lock",color:l.open?"default":"red",content:l.open?"Open":"Closed",onClick:function(){return i("door")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Implant Occupant",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"code-branch",content:l.ready?l.special_name||"Implant":"Recharging",onClick:function(){return i("implant")}}),0===l.ready&&(0,o.createComponentVNode)(2,a.Icon,{name:"cog",color:"orange",spin:!0})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Implants Remaining",children:[l.ready_implants,1===l.replenishing&&(0,o.createComponentVNode)(2,a.Icon,{name:"sync",color:"red",spin:!0})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.InfraredEmitter=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.InfraredEmitter=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.on,u=l.visible;return(0,o.createComponentVNode)(2,c.Window,{width:225,height:110,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Button,{icon:d?"power-off":"times",content:d?"On":"Off",selected:d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Visibility",children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"eye":"eye-slash",content:u?"Visible":"Invisible",selected:u,onClick:function(){return i("visibility")}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Intellicard=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.Intellicard=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.name,u=l.isDead,s=l.isBraindead,m=l.health,p=l.wireless,C=l.radio,h=l.wiping,N=l.laws,V=void 0===N?[]:N,b=u||s;return(0,o.createComponentVNode)(2,c.Window,{width:500,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:d||"Empty Card",buttons:!!d&&(0,o.createComponentVNode)(2,a.Button,{icon:"trash",content:h?"Stop Wiping":"Wipe",disabled:u,onClick:function(){return i("wipe")}}),children:!!d&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:b?"bad":"good",children:b?"Offline":"Operation"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Software Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:m,minValue:0,maxValue:100,ranges:{good:[70,Infinity],average:[50,70],bad:[-Infinity,50]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Settings",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"signal",content:"Wireless Activity",selected:p,onClick:function(){return i("wireless")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"microphone",content:"Subspace Radio",selected:C,onClick:function(){return i("radio")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Laws",children:V.map((function(e){return(0,o.createComponentVNode)(2,a.BlockQuote,{children:e},e)}))})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Jukebox=void 0;var o=n(0),r=n(14),a=n(30),c=n(2),i=n(1),l=n(3);t.Jukebox=function(e,t){var n=(0,c.useBackend)(t),d=n.act,u=n.data,s=u.active,m=u.track_selected,p=u.track_length,C=u.track_beat,h=u.volume,N=(0,a.flow)([(0,r.sortBy)((function(e){return e.name}))])(u.songs||[]);return(0,o.createComponentVNode)(2,l.Window,{width:370,height:313,children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Song Player",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s?"pause":"play",content:s?"Stop":"Play",selected:s,onClick:function(){return d("toggle")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Track Selected",children:(0,o.createComponentVNode)(2,i.Dropdown,{"overflow-y":"scroll",width:"240px",options:N.map((function(e){return e.name})),disabled:s,selected:m||"Select a Track",onSelected:function(e){return d("select_track",{track:e})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Track Length",children:m?p:"No Track Selected"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Track Beat",children:[m?C:"No Track Selected",1===C?" beat":" beats"]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Machine Settings",children:(0,o.createComponentVNode)(2,i.LabeledControls,{justify:"center",children:(0,o.createComponentVNode)(2,i.LabeledControls.Item,{label:"Volume",children:(0,o.createComponentVNode)(2,i.Box,{position:"relative",children:[(0,o.createComponentVNode)(2,i.Knob,{size:3.2,color:h>=50?"red":"green",value:h,unit:"%",minValue:0,maxValue:100,step:1,stepPixelSize:1,disabled:s,onDrag:function(e,t){return d("set_volume",{volume:t})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"-2px",right:"-22px",color:"transparent",icon:"fast-backward",onClick:function(){return d("set_volume",{volume:"min"})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"16px",right:"-22px",color:"transparent",icon:"fast-forward",onClick:function(){return d("set_volume",{volume:"max"})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"34px",right:"-22px",color:"transparent",icon:"undo",onClick:function(){return d("set_volume",{volume:"reset"})}})]})})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.KeycardAuth=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.KeycardAuth=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:375,height:125,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{children:1===l.waiting&&(0,o.createVNode)(1,"span",null,"Waiting for another device to confirm your request...",16)}),(0,o.createComponentVNode)(2,a.Box,{children:0===l.waiting&&(0,o.createFragment)([!!l.auth_required&&(0,o.createComponentVNode)(2,a.Button,{icon:"check-square",color:"red",textAlign:"center",lineHeight:"60px",fluid:!0,onClick:function(){return i("auth_swipe")},content:"Authorize"}),0===l.auth_required&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",fluid:!0,onClick:function(){return i("red_alert")},content:"Red Alert"}),(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",fluid:!0,onClick:function(){return i("emergency_maint")},content:"Emergency Maintenance Access"}),(0,o.createComponentVNode)(2,a.Button,{icon:"meteor",fluid:!0,onClick:function(){return i("bsa_unlock")},content:"Bluespace Artillery Unlock"})],4)],0)})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LaborClaimConsole=void 0;var o=n(0),r=n(19),a=n(2),c=n(1),i=n(3);t.LaborClaimConsole=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.can_go_home,s=d.id_points,m=d.ores,p=d.status_info,C=d.unclaimed_points;return(0,o.createComponentVNode)(2,i.Window,{width:315,height:440,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",children:p}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Shuttle controls",children:(0,o.createComponentVNode)(2,c.Button,{content:"Move shuttle",disabled:!u,onClick:function(){return l("move_shuttle")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Points",children:s}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Unclaimed points",buttons:(0,o.createComponentVNode)(2,c.Button,{content:"Claim points",disabled:!C,onClick:function(){return l("claim_points")}}),children:C})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Material values",children:(0,o.createComponentVNode)(2,c.Table,{children:[(0,o.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Material"}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,textAlign:"right",children:"Value"})]}),m.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,r.toTitleCase)(e.ore)}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,textAlign:"right",children:(0,o.createComponentVNode)(2,c.Box,{color:"label",inline:!0,children:e.value})})]},e.ore)}))]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LanguageMenu=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.LanguageMenu=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.admin_mode,u=l.is_living,s=l.omnitongue,m=l.languages,p=void 0===m?[]:m,C=l.unknown_languages,h=void 0===C?[]:C;return(0,o.createComponentVNode)(2,c.Window,{title:"Language Menu",width:700,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Known Languages",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:p.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,buttons:(0,o.createFragment)([!!u&&(0,o.createComponentVNode)(2,a.Button,{content:e.is_default?"Default Language":"Select as Default",disabled:!e.can_speak,selected:e.is_default,onClick:function(){return i("select_default",{language_name:e.name})}}),!!d&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Grant",onClick:function(){return i("grant_language",{language_name:e.name})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Remove",onClick:function(){return i("remove_language",{language_name:e.name})}})],4)],0),children:[e.desc," ","Key: ,",e.key," ",e.can_understand?"Can understand.":"Cannot understand."," ",e.can_speak?"Can speak.":"Cannot speak."]},e.name)}))})}),!!d&&(0,o.createComponentVNode)(2,a.Section,{title:"Unknown Languages",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Omnitongue "+(s?"Enabled":"Disabled"),selected:s,onClick:function(){return i("toggle_omnitongue")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:h.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Grant",onClick:function(){return i("grant_language",{language_name:e.name})}}),children:[e.desc," ","Key: ,",e.key," ",!!e.shadow&&"(gained from mob)"," ",e.can_speak?"Can speak.":"Cannot speak."]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LaunchpadRemote=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=n(206);t.LaunchpadRemote=function(e,t){var n=(0,r.useBackend)(t).data,l=n.has_pad,d=n.pad_closed;return(0,o.createComponentVNode)(2,c.Window,{title:"Briefcase Launchpad Remote",width:300,height:240,theme:"syndicate",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Launchpad Connected"})||d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Launchpad Closed"})||(0,o.createComponentVNode)(2,i.LaunchpadControl,{topLevel:!0})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MafiaPanel=void 0;var o=n(0),r=n(6),a=(n(19),n(2)),c=n(1),i=n(3);t.MafiaPanel=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data,s=u.lobbydata,m=u.players,p=u.actions,C=u.phase,h=u.roleinfo,N=u.role_theme,V=u.admin_controls,b=u.judgement_phase,f=u.timeleft,g=u.all_roles,v=h?30*m.length:7,k=s?s.filter((function(e){return"Ready"===e.status})):null;return(0,o.createComponentVNode)(2,i.Window,{title:"Mafia",theme:N,width:650,height:293+v,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:V,children:[!h&&(0,o.createComponentVNode)(2,c.Flex,{scrollable:!0,overflowY:"scroll",direction:"column",height:"100%",grow:1,children:(0,o.createComponentVNode)(2,c.Section,{title:"Lobby",mb:1,buttons:(0,o.createComponentVNode)(2,l,{phase:C,timeleft:f,admin_controls:V}),children:(0,o.createComponentVNode)(2,c.Box,{textAlign:"center",children:[(0,o.createComponentVNode)(2,c.NoticeBox,{info:!0,children:["The lobby currently has ",k.length,"/12 valid players signed up."]}),(0,o.createComponentVNode)(2,c.Flex,{direction:"column",children:!!s&&s.map((function(e){return(0,o.createComponentVNode)(2,c.Flex.Item,{basis:2,className:"Section__title candystripe",children:(0,o.createComponentVNode)(2,c.Flex,{height:2,align:"center",justify:"space-between",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{basis:0,children:e.name}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:"STATUS:"}),(0,o.createComponentVNode)(2,c.Flex.Item,{width:"30%",children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.Box,{color:"Ready"===e.status?"green":"red",textAlign:"center",children:[e.status," ",e.spectating]})})})]})},e)}))})]})})}),!!h&&(0,o.createComponentVNode)(2,c.Section,{title:C,minHeight:"100px",maxHeight:"50px",buttons:(0,o.createComponentVNode)(2,c.Box,{children:[!!V&&(0,o.createComponentVNode)(2,c.Button,{color:"red",icon:"gavel",tooltipPosition:"bottom-left",tooltip:"Hello admin! If it is the admin controls you seek,\nplease notice the extra scrollbar you have that players\ndo not!"})," ",(0,o.createComponentVNode)(2,c.TimeDisplay,{auto:"down",value:f})]}),children:(0,o.createComponentVNode)(2,c.Flex,{justify:"space-between",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{align:"center",textAlign:"center",maxWidth:"500px",children:[(0,o.createVNode)(1,"b",null,[(0,o.createTextVNode)("You are the "),h.role],0),(0,o.createVNode)(1,"br"),(0,o.createVNode)(1,"b",null,h.desc,0)]}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:[(0,o.createComponentVNode)(2,c.Box,{className:(0,r.classes)(["mafia32x32",h.revealed_icon]),style:{transform:"scale(2) translate(0px, 10%)","vertical-align":"middle"}}),(0,o.createComponentVNode)(2,c.Box,{className:(0,r.classes)(["mafia32x32",h.hud_icon]),style:{transform:"scale(2) translate(-5px, -5px)","vertical-align":"middle"}})]})]})}),(0,o.createComponentVNode)(2,c.Flex,{children:!!p&&p.map((function(e){return(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Button,{onClick:function(){return d("mf_action",{atype:e})},children:e})},e)}))}),!!h&&(0,o.createComponentVNode)(2,c.Section,{title:"Judgement",buttons:(0,o.createComponentVNode)(2,c.Button,{color:"transparent",icon:"info",tooltipPosition:"left",tooltip:"When someone is on trial, you are in charge of their fate.\nInnocent winning means the person on trial can live to see\nanother day... and in losing they do not. You can go back\nto abstaining with the middle button if you reconsider."}),children:[(0,o.createComponentVNode)(2,c.Flex,{justify:"space-around",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"smile-beam",content:"INNOCENT!",color:"good",disabled:!b,onClick:function(){return d("vote_innocent")}}),!b&&(0,o.createComponentVNode)(2,c.Box,{children:"There is nobody on trial at the moment."}),!!b&&(0,o.createComponentVNode)(2,c.Box,{children:"It is now time to vote, vote the accused innocent or guilty!"}),(0,o.createComponentVNode)(2,c.Button,{icon:"angry",content:"GUILTY!",color:"bad",disabled:!b,onClick:function(){return d("vote_guilty")}})]}),(0,o.createComponentVNode)(2,c.Flex,{justify:"center",children:(0,o.createComponentVNode)(2,c.Button,{icon:"meh",content:"Abstain",color:"white",disabled:!b,onClick:function(){return d("vote_abstain")}})})]}),"No Game"!==C&&(0,o.createComponentVNode)(2,c.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:2,children:(0,o.createComponentVNode)(2,c.Section,{title:"Players",buttons:(0,o.createComponentVNode)(2,c.Button,{color:"transparent",icon:"info",tooltip:"This is the list of all the players in\nthe game, during the day phase you may vote on them and,\ndepending on your role, select players\nat certain phases to use your ability."}),children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",children:!!m&&m.map((function(e){return(0,o.createComponentVNode)(2,c.Flex.Item,{height:"30px",className:"Section__title candystripe",children:(0,o.createComponentVNode)(2,c.Flex,{height:"18px",justify:"space-between",align:"center",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{basis:16,children:[!!e.alive&&(0,o.createComponentVNode)(2,c.Box,{children:e.name}),!e.alive&&(0,o.createComponentVNode)(2,c.Box,{color:"red",children:e.name})]}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:!e.alive&&(0,o.createComponentVNode)(2,c.Box,{color:"red",children:"DEAD"})}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:e.votes!==undefined&&!!e.alive&&(0,o.createFragment)([(0,o.createTextVNode)("Votes : "),e.votes,(0,o.createTextVNode)(" ")],0)}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:!!e.actions&&e.actions.map((function(t){return(0,o.createComponentVNode)(2,c.Button,{onClick:function(){return d("mf_targ_action",{atype:t,target:e.ref})},children:t},t)}))})]})},e.ref)}))})})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:2,children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Section,{title:"Roles and Notes",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{color:"transparent",icon:"address-book",tooltipPosition:"bottom-left",tooltip:"The top section is the roles in the game. You can\npress the question mark to get a quick blurb\nabout the role itself."}),(0,o.createComponentVNode)(2,c.Button,{color:"transparent",icon:"edit",tooltipPosition:"bottom-left",tooltip:"The bottom section are your notes. on some roles this\nwill just be an empty box, but on others it records the\nactions of your abilities (so for example, your\ndetective work revealing a changeling)."})],4),children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",children:!!g&&g.map((function(e){return(0,o.createComponentVNode)(2,c.Flex.Item,{height:"30px",className:"Section__title candystripe",children:(0,o.createComponentVNode)(2,c.Flex,{height:"18px",align:"center",justify:"space-between",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{children:e}),(0,o.createComponentVNode)(2,c.Flex.Item,{textAlign:"right",children:(0,o.createComponentVNode)(2,c.Button,{color:"transparent",icon:"question",onClick:function(){return d("mf_lookup",{atype:e.slice(0,-3)})}})})]})},e)}))})}),!!h&&(0,o.createComponentVNode)(2,c.Flex.Item,{height:0,grow:1,children:(0,o.createComponentVNode)(2,c.Section,{scrollable:!0,fill:!0,overflowY:"scroll",children:h!==undefined&&!!h.action_log&&h.action_log.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:e},e)}))})})]})})]}),(0,o.createComponentVNode)(2,c.Flex,{mt:1,direction:"column",children:(0,o.createComponentVNode)(2,c.Flex.Item,{children:!!V&&(0,o.createComponentVNode)(2,c.Section,{textAlign:"center",children:(0,o.createComponentVNode)(2,c.Collapsible,{title:"ADMIN CONTROLS",color:"red",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"exclamation-triangle",color:"black",tooltipPosition:"top",tooltip:"Almost all of these are all built to help me debug\nthe game (ow, debugging a 12 player game!) So they are\nrudamentary and prone to breaking at the drop of a hat.\nMake sure you know what you're doing when you press one.\nAlso because an admin did it: do not gib/delete/dust\nanyone! It will runtime the game to death!",content:"A Kind, Coder Warning",onClick:function(){return d("next_phase")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button,{icon:"arrow-right",tooltipPosition:"top",tooltip:"This will advance the game to the next phase\n(day talk > day voting, day voting > night/trial)\npretty fun to just spam this and freak people out,\ntry that roundend!",content:"Next Phase",onClick:function(){return d("next_phase")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"home",tooltipPosition:"top",tooltip:"Hopefully you won't use this button\noften, it's a safety net just in case\nmafia players somehow escape (nullspace\nredirects to the error room then station)\nEither way, VERY BAD IF THAT HAPPENS as\ngodmoded assistants will run free. Use\nthis to recollect them then make a bug report.",content:"Send All Players Home",onClick:function(){return d("players_home")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"sync-alt",tooltipPosition:"top",tooltip:"This immediately ends the game, and attempts to start\nanother. Nothing will happen if another\ngame fails to start!",content:"New Game",onClick:function(){return d("new_game")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"skull",tooltipPosition:"top",tooltip:"Deletes the datum, clears all landmarks, makes mafia\nas it was roundstart: nonexistant. Use this if you\nreally mess things up. You did mess things up, didn't you.",content:"Nuke",onClick:function(){return d("nuke")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button,{icon:"paint-brush",tooltipPosition:"top",tooltip:"This is the custom game creator, it is... simple.\nYou put in roles and until you press CANCEL or FINISH\nit will keep letting you add more roles. Assitants\non the bottom because of pathing stuff. Resets after\nthe round finishes back to 12 player random setups.",content:"Create Custom Setup",onClick:function(){return d("debug_setup")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"paint-roller",tooltipPosition:"top",tooltip:"If you messed up and accidently didn't make it how\nyou wanted, simply just press this to reset it. The game\nwill auto reset after each game as well.",content:"Reset Custom Setup",onClick:function(){return d("cancel_setup")}})]})})})})]})})};var l=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.phase,d=i.timeleft,u=i.admin_controls;return(0,o.createComponentVNode)(2,c.Box,{children:["[Phase = ",l," | ",(0,o.createComponentVNode)(2,c.TimeDisplay,{auto:"down",value:d}),"]"," ",(0,o.createComponentVNode)(2,c.Button,{icon:"clipboard-check",tooltipPosition:"bottom-left",tooltip:"Signs you up for the next game. If there\nis an ongoing one, you will be signed up\nfor the next.",content:"Sign Up",onClick:function(){return r("mf_signup")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"eye",tooltipPosition:"bottom-left",tooltip:"Spectates games until you turn it off.\nAutomatically enabled when you die in game,\nbecause I assumed you would want to see the\nconclusion. You won't get messages if you\nrejoin SS13.",content:"Spectate",onClick:function(){return r("mf_spectate")}}),!!u&&(0,o.createComponentVNode)(2,c.Button,{color:"red",icon:"gavel",tooltipPosition:"bottom-left",tooltip:"Hello admin! If it is the admin controls you seek,\nplease notice the scrollbar you have that players\ndo not!"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.MalfunctionModulePicker=void 0;var o=n(0),r=n(2),a=n(3),c=n(142);t.MalfunctionModulePicker=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.processingTime);return(0,o.createComponentVNode)(2,a.Window,{width:620,height:525,theme:"malfunction",resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.GenericUplink,{currencyAmount:i,currencySymbol:"PT"})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechBayPowerConsole=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.MechBayPowerConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.recharge_port,d=l&&l.mech,u=d&&d.cell;return(0,o.createComponentVNode)(2,c.Window,{width:400,height:200,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Mech status",textAlign:"center",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Sync",onClick:function(){return i("reconnect")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No power port detected. Please re-sync."})||!d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mech detected."})||(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.health/d.maxhealth,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No power port detected. Please re-sync."})||!d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mech detected."})||!u&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cell is installed."})||(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.charge/u.maxcharge,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]},children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.charge})," / "+u.maxcharge]})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechpadConsole=t.MechpadControl=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=function(e,t){var n=e.topLevel,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.pad_name,u=l.connected_mechpad;return(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Input,{value:d,width:"170px",onChange:function(e,t){return i("rename",{name:t})}}),level:n?1:2,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Remove",color:"bad",onClick:function(){return i("remove")}}),children:!u&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",textAlign:"center",children:"No Pad Connected."})||(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"upload",content:"Launch",textAlign:"center",onClick:function(){return i("launch")}})})};t.MechpadControl=i;t.MechpadConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.mechpads,s=void 0===u?[]:u,m=d.selected_id;return(0,o.createComponentVNode)(2,c.Window,{width:475,height:130,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:0===s.length&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Pads Connected"})||(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Flex,{minHeight:"70px",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"140px",minHeight:"70px",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,ellipsis:!0,content:e.name,selected:m===e.id,color:"transparent",onClick:function(){return l("select_pad",{id:e.id})}},e.name)}))}),(0,o.createComponentVNode)(2,a.Flex.Item,{minHeight:"100%",children:(0,o.createComponentVNode)(2,a.Divider,{vertical:!0})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,minHeight:"100%",children:m&&(0,o.createComponentVNode)(2,i)||(0,o.createComponentVNode)(2,a.Box,{children:"Please select a pad"})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MedicalKiosk=void 0;var o=n(0),r=(n(19),n(2)),a=n(1),c=n(3);t.MedicalKiosk=function(e,t){var n=(0,r.useBackend)(t),p=(n.act,n.data),C=(0,r.useSharedState)(t,"scanIndex")[0],h=p.active_status_1,N=p.active_status_2,V=p.active_status_3,b=p.active_status_4;return(0,o.createComponentVNode)(2,c.Window,{width:575,height:420,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Flex,{mb:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:1,children:(0,o.createComponentVNode)(2,a.Section,{minHeight:"100%",children:[(0,o.createComponentVNode)(2,i,{index:1,icon:"procedures",name:"General Health Scan",description:"Reads back exact values of your general health scan."}),(0,o.createComponentVNode)(2,i,{index:2,icon:"heartbeat",name:"Symptom Based Checkup",description:"Provides information based on various non-obvious symptoms,\nlike blood levels or disease status."}),(0,o.createComponentVNode)(2,i,{index:3,icon:"radiation-alt",name:"Neurological/Radiological Scan",description:"Provides information about brain trauma and radiation."}),(0,o.createComponentVNode)(2,i,{index:4,icon:"mortar-pestle",name:"Chemical and Psychoactive Scan",description:"Provides a list of consumed chemicals, as well as potential\nside effects."})]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,l)})]}),!!h&&1===C&&(0,o.createComponentVNode)(2,d),!!N&&2===C&&(0,o.createComponentVNode)(2,u),!!V&&3===C&&(0,o.createComponentVNode)(2,s),!!b&&4===C&&(0,o.createComponentVNode)(2,m)]})})};var i=function(e,t){var n=e.index,c=e.name,i=e.description,l=e.icon,d=(0,r.useBackend)(t),u=d.act,s=d.data,m=(0,r.useSharedState)(t,"scanIndex"),p=m[0],C=m[1],h=s["active_status_"+n];return(0,o.createComponentVNode)(2,a.Flex,{spacing:1,align:"baseline",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"16px",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Icon,{name:h?"check":"dollar-sign",color:h?"green":"grey"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:l,selected:h&&p===n,tooltip:i,tooltipPosition:"right",content:c,onClick:function(){h||u("beginScan_"+n),C(n)}})})]})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.kiosk_cost,d=i.patient_name;return(0,o.createComponentVNode)(2,a.Section,{minHeight:"100%",children:[(0,o.createComponentVNode)(2,a.Box,{italic:!0,children:["Greetings Valued Employee! Please select a desired automatic health check procedure. Diagnosis costs ",(0,o.createVNode)(1,"b",null,[l,(0,o.createTextVNode)(" credits.")],0)]}),(0,o.createComponentVNode)(2,a.Box,{mt:1,children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mr:1,children:"Patient:"}),d]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,tooltip:"Resets the current scanning target, cancelling current scans.",icon:"sync",color:"average",onClick:function(){return c("clearTarget")},content:"Reset Scanner"})]})},d=function(e,t){var n=(0,r.useBackend)(t).data,c=n.patient_health,i=n.brute_health,l=n.burn_health,d=n.suffocation_health,u=n.toxin_health;return(0,o.createComponentVNode)(2,a.Section,{title:"Patient Health",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:c/100,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:c}),"%"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brute Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:i/100,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:i})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Burn Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:l/100,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:l})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Oxygen Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d/100,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toxin Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u/100,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u})})})]})})},u=function(e,t){var n=(0,r.useBackend)(t).data,c=n.patient_status,i=n.patient_illness,l=n.illness_info,d=n.bleed_status,u=n.blood_levels,s=n.blood_status;return(0,o.createComponentVNode)(2,a.Section,{title:"Symptom Based Checkup",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Patient Status",color:"good",children:c}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Disease Status",children:i}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Disease information",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood Levels",children:[(0,o.createComponentVNode)(2,a.ProgressBar,{value:u/100,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u})}),(0,o.createComponentVNode)(2,a.Box,{mt:1,color:"label",children:d})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood Information",children:s})]})})},s=function(e,t){var n=(0,r.useBackend)(t).data,c=n.clone_health,i=n.brain_damage,l=n.brain_health,d=n.rad_contamination_status,u=n.rad_contamination_value,s=n.rad_sickness_status,m=n.rad_sickness_value,p=n.trauma_status;return(0,o.createComponentVNode)(2,a.Section,{title:"Patient Neurological and Radiological Health",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cellular Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:c/100,color:"good",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:c})})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brain Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:i/100,color:"good",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:i})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brain Status",color:"health-0",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brain Trauma Status",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Sickness Status",children:s}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Sickness Percentage",children:[m,"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Contamination Status",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Contamination Percentage",children:[u,"%"]})]})})},m=function(e,t){var n=(0,r.useBackend)(t).data,c=n.chemical_list,i=void 0===c?[]:c,l=n.overdose_list,d=void 0===l?[]:l,u=n.addict_list,s=void 0===u?[]:u,m=n.hallucinating_status;return(0,o.createComponentVNode)(2,a.Section,{title:"Chemical and Psychoactive Analysis",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Chemical Contents",children:[0===i.length&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No reagents detected."}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{color:"good",children:[e.volume," units of ",e.name]},e.id)}))]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Overdose Status",color:"bad",children:[0===d.length&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Patient is not overdosing."}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["Overdosing on ",e.name]},e.id)}))]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Addiction Status",color:"bad",children:[0===s.length&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Patient has no addictions."}),s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["Addicted to ",e.name]},e.id)}))]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Psychoactive Status",children:m})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Microscope=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.Microscope=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=(0,r.useSharedState)(t,"tab",1),m=s[0],p=s[1],C=u.has_dish,h=u.cell_lines,N=void 0===h?[]:h,V=u.viruses,b=void 0===V?[]:V;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dish Sample",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!C,onClick:function(){return d("eject_petridish")}})})})}),(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{icon:"microscope",lineHeight:"23px",selected:1===m,onClick:function(){return p(1)},children:["Micro-Organisms (",N.length,")"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{icon:"microscope",lineHeight:"23px",selected:2===m,onClick:function(){return p(2)},children:["Viruses (",b.length,")"]})]}),1===m&&(0,o.createComponentVNode)(2,i,{cell_lines:N}),2===m&&(0,o.createComponentVNode)(2,l,{viruses:b})]})})};var i=function(e,t){var n=e.cell_lines,c=(0,r.useBackend)(t);c.act,c.data;return n.length?n.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.desc,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Growth Rate",children:e.growth_rate}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Virus Suspectibility",children:e.suspectibility}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Required Reagents",children:e.requireds}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Supplementary Reagents",children:e.supplementaries}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Suppresive reagents",children:e.suppressives})]})},e.desc)})):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No micro-organisms found"})},l=function(e,t){var n=e.viruses;(0,r.useBackend)(t).act;return n.length?n.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.desc},e.desc)})):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No viruses found"})}},function(e,t,n){"use strict";t.__esModule=!0,t.MiningVendor=void 0;var o=n(0),r=n(6),a=n(2),c=n(1),i=n(3);t.MiningVendor=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=[].concat(d.product_records);return(0,o.createComponentVNode)(2,i.Window,{width:425,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{title:"User",children:d.user&&(0,o.createComponentVNode)(2,c.Box,{children:["Welcome, ",(0,o.createVNode)(1,"b",null,d.user.name||"Unknown",0),","," ",(0,o.createVNode)(1,"b",null,d.user.job||"Unemployed",0),"!",(0,o.createVNode)(1,"br"),"Your balance is ",(0,o.createVNode)(1,"b",null,[d.user.points,(0,o.createTextVNode)(" mining points")],0),"."]})||(0,o.createComponentVNode)(2,c.Box,{color:"light-gray",children:["No registered ID card!",(0,o.createVNode)(1,"br"),"Please contact your local HoP!"]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Equipment",children:(0,o.createComponentVNode)(2,c.Table,{children:u.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createVNode)(1,"span",(0,r.classes)(["vending32x32",e.path]),null,1,{style:{"vertical-align":"middle"}})," ",(0,o.createVNode)(1,"b",null,e.name,0)]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{style:{"min-width":"95px","text-align":"center"},disabled:!d.user||e.price>d.user.points,content:e.price+" points",onClick:function(){return l("purchase",{ref:e.ref})}})})]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Mint=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.Mint=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.inserted_materials||[];return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Materials",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:l.processing?"times":"power-off",content:l.processing?"Stop":"Start",selected:l.processing,onClick:function(){return i(l.processing?"stoppress":"startpress")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.material,buttons:(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:l.chosen_material===e.material,onClick:function(){return i("changematerial",{material_name:e.material})}}),children:[e.amount," cm\xb3"]},e.material)}))})}),(0,o.createComponentVNode)(2,a.Section,{children:["Pressed ",l.produced_coins," coins this cycle."]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Mule=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=n(64);t.Mule=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.on,s=d.cell,m=d.cellPercent,p=d.load,C=d.mode,h=d.modeStatus,N=d.haspai,V=d.autoReturn,b=d.autoPickup,f=d.reportDelivery,g=d.destination,v=d.home,k=d.id,x=d.destinations,B=void 0===x?[]:x,_=d.locked&&!d.siliconUser;return(0,o.createComponentVNode)(2,c.Window,{width:350,height:425,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.InterfaceLockNoticeBox),(0,o.createComponentVNode)(2,a.Section,{title:"Status",minHeight:"110px",buttons:!_&&(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return l("power")}}),children:[(0,o.createComponentVNode)(2,a.ProgressBar,{value:s?m/100:0,color:s?"good":"bad"}),(0,o.createComponentVNode)(2,a.Flex,{mt:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mode",color:h,children:C})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Load",color:p?"good":"average",children:p||"None"})})})]})]}),!_&&(0,o.createComponentVNode)(2,a.Section,{title:"Controls",buttons:(0,o.createFragment)([!!p&&(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Unload",onClick:function(){return l("unload")}}),!!N&&(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject PAI",onClick:function(){return l("ejectpai")}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID",children:(0,o.createComponentVNode)(2,a.Input,{value:k,onChange:function(e,t){return l("setid",{value:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destination",children:[(0,o.createComponentVNode)(2,a.Dropdown,{over:!0,selected:g||"None",options:B,width:"150px",onSelected:function(e){return l("destination",{value:e})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"stop",content:"Stop",onClick:function(){return l("stop")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"play",content:"Go",onClick:function(){return l("go")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Home",children:[(0,o.createComponentVNode)(2,a.Dropdown,{over:!0,selected:v,options:B,width:"150px",onSelected:function(e){return l("destination",{value:e})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"home",content:"Go Home",onClick:function(){return l("home")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Settings",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:V,content:"Auto-Return",onClick:function(){return l("autored")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:b,content:"Auto-Pickup",onClick:function(){return l("autopick")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:f,content:"Report Delivery",onClick:function(){return l("report")}})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NaniteChamberControlContent=t.NaniteChamberControl=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NaniteChamberControl=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{width:380,height:570,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.status_msg,d=i.locked,u=i.occupant_name,s=i.has_nanites,m=i.nanite_volume,p=i.regen_rate,C=i.safety_threshold,h=i.cloud_id,N=i.scan_level;if(l)return(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:l});var V=i.mob_programs||[];return(0,o.createComponentVNode)(2,a.Section,{title:"Chamber: "+u,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d?"lock":"lock-open",content:d?"Locked":"Unlocked",color:d?"bad":"default",onClick:function(){return c("toggle_lock")}}),children:s?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Status",level:2,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",content:"Destroy Nanites",color:"bad",onClick:function(){return c("remove_nanites")}}),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nanite Volume",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Growth Rate",children:p})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safety Threshold",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:C,minValue:0,maxValue:500,width:"39px",onChange:function(e,t){return c("set_safety",{value:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cloud ID",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:h,minValue:0,maxValue:100,step:1,stepPixelSize:3,width:"39px",onChange:function(e,t){return c("set_cloud",{value:t})}})})]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Programs",level:2,children:V.map((function(e){var t=e.extra_settings||[],n=e.rules||[];return(0,o.createComponentVNode)(2,a.Collapsible,{title:e.name,children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:e.desc}),N>=2&&(0,o.createComponentVNode)(2,a.Grid.Column,{size:.6,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Activation Status",children:(0,o.createComponentVNode)(2,a.Box,{color:e.activated?"good":"bad",children:e.activated?"Active":"Inactive"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nanites Consumed",children:[e.use_rate,"/s"]})]})})]}),N>=2&&(0,o.createComponentVNode)(2,a.Grid,{children:[!!e.can_trigger&&(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Triggers",level:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cost",children:e.trigger_cost}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cooldown",children:e.trigger_cooldown}),!!e.timer_trigger_delay&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Delay",children:[e.timer_trigger_delay," s"]}),!!e.timer_trigger&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Repeat Timer",children:[e.timer_trigger," s"]})]})})}),!(!e.timer_restart&&!e.timer_shutdown)&&(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.timer_restart&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Restart Timer",children:[e.timer_restart," s"]}),e.timer_shutdown&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shutdown Timer",children:[e.timer_shutdown," s"]})]})})})]}),N>=3&&!!e.has_extra_settings&&(0,o.createComponentVNode)(2,a.Section,{title:"Extra Settings",level:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:t.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:e.value},e.name)}))})}),N>=4&&(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Codes",level:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[!!e.activation_code&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Activation",children:e.activation_code}),!!e.deactivation_code&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Deactivation",children:e.deactivation_code}),!!e.kill_code&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Kill",children:e.kill_code}),!!e.can_trigger&&!!e.trigger_code&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger",children:e.trigger_code})]})})}),e.has_rules&&(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Rules",level:2,children:n.map((function(e){return(0,o.createFragment)([e.display,(0,o.createVNode)(1,"br")],0,e.display)}))})})]})]})},e.name)}))})],4):(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"bad",textAlign:"center",fontSize:"30px",mb:1,children:"No Nanites Detected"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,bold:!0,icon:"syringe",content:" Implant Nanites",color:"green",textAlign:"center",fontSize:"30px",lineHeight:"50px",onClick:function(){return c("nanite_injection")}})],4)})};t.NaniteChamberControlContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.NaniteCloudControl=t.NaniteCloudBackupDetails=t.NaniteCloudBackupList=t.NaniteInfoBox=t.NaniteDiskBox=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=function(e,t){var n=(0,r.useBackend)(t).data,c=n.has_disk,i=n.has_program,d=n.disk;return c?i?(0,o.createComponentVNode)(2,l,{program:d}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Inserted disk has no program"}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No disk inserted"})};t.NaniteDiskBox=i;var l=function(e,t){var n=e.program,r=n.name,c=n.desc,i=n.activated,l=n.use_rate,d=n.can_trigger,u=n.trigger_cost,s=n.trigger_cooldown,m=n.activation_code,p=n.deactivation_code,C=n.kill_code,h=n.trigger_code,N=n.timer_restart,V=n.timer_shutdown,b=n.timer_trigger,f=n.timer_trigger_delay,g=n.extra_settings||[];return(0,o.createComponentVNode)(2,a.Section,{title:r,level:2,buttons:(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,color:i?"good":"bad",children:i?"Activated":"Deactivated"}),children:[(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{mr:1,children:c}),(0,o.createComponentVNode)(2,a.Grid.Column,{size:.5,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Use Rate",children:l}),!!d&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cost",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cooldown",children:s})],4)]})})]}),(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Codes",level:3,mr:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Activation",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Deactivation",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Kill",children:C}),!!d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger",children:h})]})})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Delays",level:3,mr:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Restart",children:[N," s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shutdown",children:[V," s"]}),!!d&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger",children:[b," s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Delay",children:[f," s"]})],4)]})})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Extra Settings",level:3,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:g.map((function(e){var t={number:(0,o.createFragment)([e.value,e.unit],0),text:e.value,type:e.value,boolean:e.value?e.true_text:e.false_text};return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:t[e.type]},e.name)}))})})]})};t.NaniteInfoBox=l;var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act;return(n.data.cloud_backups||[]).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Backup #"+e.cloud_id,textAlign:"center",onClick:function(){return c("set_view",{view:e.cloud_id})}},e.cloud_id)}))};t.NaniteCloudBackupList=d;var u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.current_view,u=i.disk,s=i.has_program,m=i.cloud_backup,p=u&&u.can_rule||!1;if(!m)return(0,o.createComponentVNode)(2,a.NoticeBox,{children:"ERROR: Backup not found"});var C=i.cloud_programs||[];return(0,o.createComponentVNode)(2,a.Section,{title:"Backup #"+d,level:2,buttons:!!s&&(0,o.createComponentVNode)(2,a.Button,{icon:"upload",content:"Upload From Disk",color:"good",onClick:function(){return c("upload_program")}}),children:C.map((function(e){var t=e.rules||[];return(0,o.createComponentVNode)(2,a.Collapsible,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"minus-circle",color:"bad",onClick:function(){return c("remove_program",{program_id:e.id})}}),children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,l,{program:e}),(!!p||!!e.has_rules)&&(0,o.createComponentVNode)(2,a.Section,{mt:-2,title:"Rules",level:2,buttons:!!p&&(0,o.createComponentVNode)(2,a.Button,{icon:"plus",content:"Add Rule from Disk",color:"good",onClick:function(){return c("add_rule",{program_id:e.id})}}),children:e.has_rules?t.map((function(t){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"minus-circle",color:"bad",onClick:function(){return c("remove_rule",{program_id:e.id,rule_id:t.id})}})," "+t.display]},t.display)})):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No Active Rules"})})]})},e.name)}))})};t.NaniteCloudBackupDetails=u;t.NaniteCloudControl=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,m=s.has_disk,p=s.current_view,C=s.new_backup_id;return(0,o.createComponentVNode)(2,c.Window,{width:375,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Program Disk",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!m,onClick:function(){return l("eject")}}),children:(0,o.createComponentVNode)(2,i)}),(0,o.createComponentVNode)(2,a.Section,{title:"Cloud Storage",buttons:p?(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Return",onClick:function(){return l("set_view",{view:0})}}):(0,o.createFragment)(["New Backup: ",(0,o.createComponentVNode)(2,a.NumberInput,{value:C,minValue:1,maxValue:100,stepPixelSize:4,width:"39px",onChange:function(e,t){return l("update_new_backup_value",{value:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"plus",onClick:function(){return l("create_backup")}})],0),children:s.current_view?(0,o.createComponentVNode)(2,u):(0,o.createComponentVNode)(2,d)})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NaniteProgramHub=void 0;var o=n(0),r=n(14),a=n(2),c=n(1),i=n(3);t.NaniteProgramHub=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.detail_view,s=d.disk,m=d.has_disk,p=d.has_program,C=d.programs,h=void 0===C?{}:C,N=(0,a.useSharedState)(t,"category"),V=N[0],b=N[1],f=h&&h[V]||[];return(0,o.createComponentVNode)(2,i.Window,{width:500,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{title:"Program Disk",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject",onClick:function(){return l("eject")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"minus-circle",content:"Delete Program",onClick:function(){return l("clear")}})],4),children:m?p?(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Program Name",children:s.name}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description",children:s.desc})]}):(0,o.createComponentVNode)(2,c.NoticeBox,{children:"No Program Installed"}):(0,o.createComponentVNode)(2,c.NoticeBox,{children:"Insert Disk"})}),(0,o.createComponentVNode)(2,c.Section,{title:"Programs",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:u?"info":"list",content:u?"Detailed":"Compact",onClick:function(){return l("toggle_details")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"sync",content:"Sync Research",onClick:function(){return l("refresh")}})],4),children:null!==h?(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{minWidth:"110px",children:(0,o.createComponentVNode)(2,c.Tabs,{vertical:!0,children:(0,r.map)((function(e,t){var n=t.substring(0,t.length-8);return(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:t===V,onClick:function(){return b(t)},children:n},t)}))(h)})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,basis:0,children:u?f.map((function(e){return(0,o.createComponentVNode)(2,c.Section,{title:e.name,level:2,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"download",content:"Download",disabled:!m,onClick:function(){return l("download",{program_id:e.id})}}),children:e.desc},e.id)})):(0,o.createComponentVNode)(2,c.LabeledList,{children:f.map((function(e){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.name,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"download",content:"Download",disabled:!m,onClick:function(){return l("download",{program_id:e.id})}})},e.id)}))})})]}):(0,o.createComponentVNode)(2,c.NoticeBox,{children:"No nanite programs are currently researched."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NaniteProgrammerContent=t.NaniteProgrammer=t.NaniteExtraBoolean=t.NaniteExtraType=t.NaniteExtraText=t.NaniteExtraNumber=t.NaniteExtraEntry=t.NaniteDelays=t.NaniteCodes=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Codes",level:3,mr:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Activation",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:i.activation_code,width:"47px",minValue:0,maxValue:9999,onChange:function(e,t){return c("set_code",{target_code:"activation",code:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Deactivation",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:i.deactivation_code,width:"47px",minValue:0,maxValue:9999,onChange:function(e,t){return c("set_code",{target_code:"deactivation",code:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Kill",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:i.kill_code,width:"47px",minValue:0,maxValue:9999,onChange:function(e,t){return c("set_code",{target_code:"kill",code:t})}})}),!!i.can_trigger&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:i.trigger_code,width:"47px",minValue:0,maxValue:9999,onChange:function(e,t){return c("set_code",{target_code:"trigger",code:t})}})})]})})};t.NaniteCodes=i;var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Delays",level:3,ml:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Restart Timer",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:i.timer_restart,unit:"s",width:"57px",minValue:0,maxValue:3600,onChange:function(e,t){return c("set_restart_timer",{delay:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shutdown Timer",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:i.timer_shutdown,unit:"s",width:"57px",minValue:0,maxValue:3600,onChange:function(e,t){return c("set_shutdown_timer",{delay:t})}})}),!!i.can_trigger&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Repeat Timer",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:i.timer_trigger,unit:"s",width:"57px",minValue:0,maxValue:3600,onChange:function(e,t){return c("set_trigger_timer",{delay:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Delay",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:i.timer_trigger_delay,unit:"s",width:"57px",minValue:0,maxValue:3600,onChange:function(e,t){return c("set_timer_trigger_delay",{delay:t})}})})],4)]})})};t.NaniteDelays=l;var d=function(e,t){var n=e.extra_setting,r=n.name,c=n.type,i={number:(0,o.createComponentVNode)(2,u,{extra_setting:n}),text:(0,o.createComponentVNode)(2,s,{extra_setting:n}),type:(0,o.createComponentVNode)(2,m,{extra_setting:n}),boolean:(0,o.createComponentVNode)(2,p,{extra_setting:n})};return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:r,children:i[c]})};t.NaniteExtraEntry=d;var u=function(e,t){var n=e.extra_setting,c=(0,r.useBackend)(t).act,i=n.name,l=n.value,d=n.min,u=n.max,s=n.unit;return(0,o.createComponentVNode)(2,a.NumberInput,{value:l,width:"64px",minValue:d,maxValue:u,unit:s,onChange:function(e,t){return c("set_extra_setting",{target_setting:i,value:t})}})};t.NaniteExtraNumber=u;var s=function(e,t){var n=e.extra_setting,c=(0,r.useBackend)(t).act,i=n.name,l=n.value;return(0,o.createComponentVNode)(2,a.Input,{value:l,width:"200px",onInput:function(e,t){return c("set_extra_setting",{target_setting:i,value:t})}})};t.NaniteExtraText=s;var m=function(e,t){var n=e.extra_setting,c=(0,r.useBackend)(t).act,i=n.name,l=n.value,d=n.types;return(0,o.createComponentVNode)(2,a.Dropdown,{over:!0,selected:l,width:"150px",options:d,onSelected:function(e){return c("set_extra_setting",{target_setting:i,value:e})}})};t.NaniteExtraType=m;var p=function(e,t){var n=e.extra_setting,c=(0,r.useBackend)(t).act,i=n.name,l=n.value,d=n.true_text,u=n.false_text;return(0,o.createComponentVNode)(2,a.Button.Checkbox,{content:l?d:u,checked:l,onClick:function(){return c("set_extra_setting",{target_setting:i})}})};t.NaniteExtraBoolean=p;t.NaniteProgrammer=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{width:420,height:550,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,C)})})};var C=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data,s=u.has_disk,m=u.has_program,p=u.name,C=u.desc,h=u.use_rate,N=u.can_trigger,V=u.trigger_cost,b=u.trigger_cooldown,f=u.activated,g=u.has_extra_settings,v=u.extra_settings,k=void 0===v?{}:v;return s?m?(0,o.createComponentVNode)(2,a.Section,{title:p,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",onClick:function(){return c("eject")}}),children:[(0,o.createComponentVNode)(2,a.Section,{title:"Info",level:2,children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:C}),(0,o.createComponentVNode)(2,a.Grid.Column,{size:.7,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Use Rate",children:h}),!!N&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cost",children:V}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cooldown",children:b})],4)]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Settings",level:2,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:f?"power-off":"times",content:f?"Active":"Inactive",selected:f,color:"bad",bold:!0,onClick:function(){return c("toggle_active")}}),children:[(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,i)}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,l)})]}),!!g&&(0,o.createComponentVNode)(2,a.Section,{title:"Special",level:3,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:k.map((function(e){return(0,o.createComponentVNode)(2,d,{extra_setting:e},e.name)}))})})]})]}):(0,o.createComponentVNode)(2,a.Section,{title:"Blank Disk",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",onClick:function(){return c("eject")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Insert a nanite program disk"})};t.NaniteProgrammerContent=C},function(e,t,n){"use strict";t.__esModule=!0,t.NaniteRemoteContent=t.NaniteRemote=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NaniteRemote=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{width:420,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.code,d=i.locked,u=i.mode,s=i.program_name,m=i.relay_code,p=i.comms,C=i.message,h=i.saved_settings,N=void 0===h?[]:h;return d?(0,o.createComponentVNode)(2,a.NoticeBox,{children:"This interface is locked."}):(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Nanite Control",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lock",content:"Lock Interface",onClick:function(){return c("lock")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:[(0,o.createComponentVNode)(2,a.Input,{value:s,maxLength:14,width:"130px",onChange:function(e,t){return c("update_name",{name:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"save",content:"Save",onClick:function(){return c("save")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:p?"Comm Code":"Signal Code",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:l,minValue:0,maxValue:9999,width:"47px",step:1,stepPixelSize:2,onChange:function(e,t){return c("set_code",{code:t})}})}),!!p&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message",children:(0,o.createComponentVNode)(2,a.Input,{value:C,width:"270px",onChange:function(e,t){return c("set_message",{value:t})}})}),"Relay"===u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Relay Code",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:m,minValue:0,maxValue:9999,width:"47px",step:1,stepPixelSize:2,onChange:function(e,t){return c("set_relay_code",{code:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Signal Mode",children:["Off","Local","Targeted","Area","Relay"].map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e,selected:u===e,onClick:function(){return c("select_mode",{mode:e})}},e)}))})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Saved Settings",children:N.length>0?(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"35%",children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"20%",children:"Mode"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Code"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Relay"})]}),N.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,color:"label",children:[e.name,":"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.mode}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.code}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Relay"===e.mode&&e.relay_code}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"upload",color:"good",onClick:function(){return c("load",{save_id:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"minus",color:"bad",onClick:function(){return c("remove_save",{save_id:e.id})}})]})]},e.id)}))]}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No settings currently saved"})})],4)};t.NaniteRemoteContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.NotificationPreferences=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NotificationPreferences=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=(n.data.ignore||[]).sort((function(e,t){var n=e.desc.toLowerCase(),o=t.desc.toLowerCase();return no?1:0}));return(0,o.createComponentVNode)(2,c.Window,{title:"Notification Preferences",width:270,height:360,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Ghost Role Notifications",children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:e.enabled?"times":"check",content:e.desc,color:e.enabled?"bad":"good",onClick:function(){return i("toggle_ignore",{key:e.key})}},e.key)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtnetRelay=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NtnetRelay=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.enabled,u=l.dos_capacity,s=l.dos_overload,m=l.dos_crashed;return(0,o.createComponentVNode)(2,c.Window,{title:"NtNet Quantum Relay",width:400,height:300,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Network Buffer",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:d,content:d?"ENABLED":"DISABLED",onClick:function(){return i("toggle")}}),children:m?(0,o.createComponentVNode)(2,a.Box,{fontFamily:"monospace",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"20px",children:"NETWORK BUFFER OVERFLOW"}),(0,o.createComponentVNode)(2,a.Box,{fontSize:"16px",children:"OVERLOAD RECOVERY MODE"}),(0,o.createComponentVNode)(2,a.Box,{children:"This system is suffering temporary outage due to overflow of traffic buffers. Until buffered traffic is processed, all further requests will be dropped. Frequent occurences of this error may indicate insufficient hardware capacity of your network. Please contact your network planning department for instructions on how to resolve this issue."}),(0,o.createComponentVNode)(2,a.Box,{fontSize:"20px",color:"bad",children:"ADMINISTRATOR OVERRIDE"}),(0,o.createComponentVNode)(2,a.Box,{fontSize:"16px",color:"bad",children:"CAUTION - DATA LOSS MAY OCCUR"}),(0,o.createComponentVNode)(2,a.Button,{icon:"signal",content:"PURGE BUFFER",mt:1,color:"bad",onClick:function(){return i("restart")}})]}):(0,o.createComponentVNode)(2,a.ProgressBar,{value:s,minValue:0,maxValue:u,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:s})," GQ"," / ",u," GQ"]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosAiRestorer=void 0;var o=n(0),r=n(3),a=n(201);t.NtosAiRestorer=function(){return(0,o.createComponentVNode)(2,r.NtosWindow,{width:370,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,r.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.AiRestorerContent)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosArcade=void 0;var o=n(0),r=n(63),a=n(2),c=n(1),i=n(3);t.NtosArcade=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,i.NtosWindow,{width:450,height:350,children:(0,o.createComponentVNode)(2,i.NtosWindow.Content,{children:(0,o.createComponentVNode)(2,c.Section,{title:"Outbomb Cuban Pete Ultra",textAlign:"center",children:[(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Grid,{children:[(0,o.createComponentVNode)(2,c.Grid.Column,{size:2,children:[(0,o.createComponentVNode)(2,c.Box,{m:1}),(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Player Health",children:(0,o.createComponentVNode)(2,c.ProgressBar,{value:d.PlayerHitpoints,minValue:0,maxValue:30,ranges:{olive:[31,Infinity],good:[20,31],average:[10,20],bad:[-Infinity,10]},children:[d.PlayerHitpoints,"HP"]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Player Magic",children:(0,o.createComponentVNode)(2,c.ProgressBar,{value:d.PlayerMP,minValue:0,maxValue:10,ranges:{purple:[11,Infinity],violet:[3,11],bad:[-Infinity,3]},children:[d.PlayerMP,"MP"]})})]}),(0,o.createComponentVNode)(2,c.Box,{my:1,mx:4}),(0,o.createComponentVNode)(2,c.Section,{backgroundColor:1===d.PauseState?"#1b3622":"#471915",children:d.Status})]}),(0,o.createComponentVNode)(2,c.Grid.Column,{children:[(0,o.createComponentVNode)(2,c.ProgressBar,{value:d.Hitpoints,minValue:0,maxValue:45,ranges:{good:[30,Infinity],average:[5,30],bad:[-Infinity,5]},children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:d.Hitpoints}),"HP"]}),(0,o.createComponentVNode)(2,c.Box,{m:1}),(0,o.createComponentVNode)(2,c.Section,{inline:!0,width:"156px",textAlign:"center",children:(0,o.createVNode)(1,"img",null,null,1,{src:(0,r.resolveAsset)(d.BossID)})})]})]}),(0,o.createComponentVNode)(2,c.Box,{my:1,mx:4}),(0,o.createComponentVNode)(2,c.Button,{icon:"fist-raised",tooltip:"Go in for the kill!",tooltipPosition:"top",disabled:0===d.GameActive||1===d.PauseState,onClick:function(){return l("Attack")},content:"Attack!"}),(0,o.createComponentVNode)(2,c.Button,{icon:"band-aid",tooltip:"Heal yourself!",tooltipPosition:"top",disabled:0===d.GameActive||1===d.PauseState,onClick:function(){return l("Heal")},content:"Heal!"}),(0,o.createComponentVNode)(2,c.Button,{icon:"magic",tooltip:"Recharge your magic!",tooltipPosition:"top",disabled:0===d.GameActive||1===d.PauseState,onClick:function(){return l("Recharge_Power")},content:"Recharge!"})]}),(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Button,{icon:"sync-alt",tooltip:"One more game couldn't hurt.",tooltipPosition:"top",disabled:1===d.GameActive,onClick:function(){return l("Start_Game")},content:"Begin Game"}),(0,o.createComponentVNode)(2,c.Button,{icon:"ticket-alt",tooltip:"Claim at your local Arcade Computer for Prizes!",tooltipPosition:"top",disabled:1===d.GameActive,onClick:function(){return l("Dispense_Tickets")},content:"Claim Tickets"})]}),(0,o.createComponentVNode)(2,c.Box,{color:d.TicketCount>=1?"good":"normal",children:["Earned Tickets: ",d.TicketCount]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosAtmos=void 0;var o=n(0),r=n(14),a=n(30),c=n(9),i=n(2),l=n(1),d=n(36),u=n(3);t.NtosAtmos=function(e,t){var n=(0,i.useBackend)(t),s=(n.act,n.data),m=s.AirTemp,p=s.AirPressure,C=(0,a.flow)([(0,r.filter)((function(e){return e.percentage>=.01})),(0,r.sortBy)((function(e){return-e.percentage}))])(s.AirData||[]),h=Math.max.apply(Math,[1].concat(C.map((function(e){return e.percentage}))));return(0,o.createComponentVNode)(2,u.NtosWindow,{width:300,height:350,resizable:!0,children:(0,o.createComponentVNode)(2,u.NtosWindow.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l.Section,{children:(0,o.createComponentVNode)(2,l.LabeledList,{children:[(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Temperature",children:[m,"\xb0C"]}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Pressure",children:[p," kPa"]})]})}),(0,o.createComponentVNode)(2,l.Section,{children:(0,o.createComponentVNode)(2,l.LabeledList,{children:C.map((function(e){return(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:(0,d.getGasLabel)(e.name),children:(0,o.createComponentVNode)(2,l.ProgressBar,{color:(0,d.getGasColor)(e.name),value:e.percentage,minValue:0,maxValue:h,children:(0,c.toFixed)(e.percentage,2)+"%"})},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosBountyConsole=void 0;var o=n(0),r=n(2),a=n(1),c=n(39),i=n(3);t.NtosBountyConsole=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data.bountydata,u=void 0===d?[]:d;return(0,o.createComponentVNode)(2,i.NtosWindow,{width:750,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,l),buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print Bounty List",onClick:function(){return c("Print")}}),children:(0,o.createComponentVNode)(2,a.Table,{border:!0,children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,italic:!0,color:"label",fontSize:1.25,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{p:1,textAlign:"center",children:"Bounty Object"}),(0,o.createComponentVNode)(2,a.Table.Cell,{p:1,textAlign:"center",children:"Description"}),(0,o.createComponentVNode)(2,a.Table.Cell,{p:1,textAlign:"center",children:"Progress"}),(0,o.createComponentVNode)(2,a.Table.Cell,{p:1,textAlign:"center",children:"Value"}),(0,o.createComponentVNode)(2,a.Table.Cell,{p:1,textAlign:"center",children:"Claim"})]}),u.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{backgroundColor:1===e.priority?"rgba(252, 152, 3, 0.25)":"",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,p:1,children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{italic:!0,textAlign:"center",p:1,children:e.description}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,p:1,textAlign:"center",children:[1===e.priority?(0,o.createComponentVNode)(2,a.Box,{children:"High Priority"}):"",e.completion_string]}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,p:1,textAlign:"center",children:e.reward_string}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,p:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:1===e.claimed?"check":"",content:1===e.claimed?"Claimed":"Claim",disabled:1===e.claimed,color:1===e.can_claim?"green":"red",onClick:function(){return c("ClaimBounty",{bounty:e.bounty_ref})}})})]},e.name)}))]})})})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.stored_cash);return(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:i,format:function(e){return(0,c.formatMoney)(e)}})," credits"]})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosCardContent=t.NtosCard=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=n(202);t.NtosCard=function(e,t){return(0,o.createComponentVNode)(2,c.NtosWindow,{width:450,height:520,resizable:!0,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=(0,r.useLocalState)(t,"tab",1),u=d[0],s=d[1],m=l.authenticated,p=l.regions,C=void 0===p?[]:p,h=l.access_on_card,N=void 0===h?[]:h,V=l.jobs,b=void 0===V?{}:V,f=l.id_rank,g=l.id_owner,v=l.has_id,k=l.have_printer,x=l.have_id_slot,B=l.id_name,_=(0,r.useLocalState)(t,"department",Object.keys(b)[0]),w=_[0],L=_[1];if(!x)return(0,o.createComponentVNode)(2,a.NoticeBox,{children:"This program requires an ID slot in order to function"});var y=b[w]||[];return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:v&&m?(0,o.createComponentVNode)(2,a.Input,{value:g,width:"250px",onInput:function(e,t){return c("PRG_edit",{name:t})}}):g||"No Card Inserted",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print",disabled:!k||!v,onClick:function(){return c("PRG_print")}}),(0,o.createComponentVNode)(2,a.Button,{icon:m?"sign-out-alt":"sign-in-alt",content:m?"Log Out":"Log In",color:m?"bad":"good",onClick:function(){c(m?"PRG_logout":"PRG_authenticate")}})],4),children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:B,onClick:function(){return c("PRG_eject")}})}),!!v&&!!m&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===u,onClick:function(){return s(1)},children:"Access"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===u,onClick:function(){return s(2)},children:"Jobs"})]}),1===u&&(0,o.createComponentVNode)(2,i.AccessList,{accesses:C,selectedList:N,accessMod:function(e){return c("PRG_access",{access_target:e})},grantAll:function(){return c("PRG_grantall")},denyAll:function(){return c("PRG_denyall")},grantDep:function(e){return c("PRG_grantregion",{region:e})},denyDep:function(e){return c("PRG_denyregion",{region:e})}}),2===u&&(0,o.createComponentVNode)(2,a.Section,{title:f,buttons:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"exclamation-triangle",content:"Terminate",color:"bad",onClick:function(){return c("PRG_terminate")}}),children:[(0,o.createComponentVNode)(2,a.Button.Input,{fluid:!0,content:"Custom...",onCommit:function(e,t){return c("PRG_assign",{assign_target:"Custom",custom_name:t})}}),(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Tabs,{vertical:!0,children:Object.keys(b).map((function(e){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:e===w,onClick:function(){return L(e)},children:e},e)}))})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:y.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:e.display_name,onClick:function(){return c("PRG_assign",{assign_target:e.job})}},e.job)}))})]})]})]})],0)};t.NtosCardContent=l},function(e,t,n){"use strict";t.__esModule=!0,t.NtosConfiguration=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NtosConfiguration=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.PC_device_theme,u=l.power_usage,s=l.battery_exists,m=l.battery,p=void 0===m?{}:m,C=l.disk_size,h=l.disk_used,N=l.hardware,V=void 0===N?[]:N;return(0,o.createComponentVNode)(2,c.NtosWindow,{theme:d,width:420,height:630,resizable:!0,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Power Supply",buttons:(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,mr:1,children:["Power Draw: ",u,"W"]}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Battery Status",color:!s&&"average",children:s?(0,o.createComponentVNode)(2,a.ProgressBar,{value:p.charge,minValue:0,maxValue:p.max,ranges:{good:[p.max/2,Infinity],average:[p.max/4,p.max/2],bad:[-Infinity,p.max/4]},children:[p.charge," / ",p.max]}):"Not Available"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"File System",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:h,minValue:0,maxValue:C,color:"good",children:[h," GQ / ",C," GQ"]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Hardware Components",children:V.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,level:2,buttons:(0,o.createFragment)([!e.critical&&(0,o.createComponentVNode)(2,a.Button.Checkbox,{content:"Enabled",checked:e.enabled,mr:1,onClick:function(){return i("PC_toggle_component",{name:e.name})}}),(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,mr:1,children:["Power Usage: ",e.powerusage,"W"]})],0),children:e.desc},e.name)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosCrewManifest=void 0;var o=n(0),r=n(14),a=n(2),c=n(1),i=n(3);t.NtosCrewManifest=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.have_printer,s=d.manifest,m=void 0===s?{}:s;return(0,o.createComponentVNode)(2,i.NtosWindow,{width:400,height:480,resizable:!0,children:(0,o.createComponentVNode)(2,i.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.Section,{title:"Crew Manifest",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"print",content:"Print",disabled:!u,onClick:function(){return l("PRG_print")}}),children:(0,r.map)((function(e,t){return(0,o.createComponentVNode)(2,c.Section,{level:2,title:t,children:(0,o.createComponentVNode)(2,c.Table,{children:e.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"candystripe",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{bold:!0,children:e.name}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:["(",e.rank,")"]})]},e.name)}))})},t)}))(m)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosCyborgRemoteMonitorSyndicate=void 0;var o=n(0),r=n(3),a=n(207);t.NtosCyborgRemoteMonitorSyndicate=function(e,t){return(0,o.createComponentVNode)(2,r.NtosWindow,{width:600,height:800,theme:"syndicate",children:(0,o.createComponentVNode)(2,r.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.NtosCyborgRemoteMonitorContent)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosFileManager=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NtosFileManager=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.PC_device_theme,s=d.usbconnected,m=d.files,p=void 0===m?[]:m,C=d.usbfiles,h=void 0===C?[]:C;return(0,o.createComponentVNode)(2,c.NtosWindow,{resizable:!0,theme:u,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,i,{files:p,usbconnected:s,onUpload:function(e){return l("PRG_copytousb",{name:e})},onDelete:function(e){return l("PRG_deletefile",{name:e})},onRename:function(e,t){return l("PRG_rename",{name:e,new_name:t})},onDuplicate:function(e){return l("PRG_clone",{file:e})}})}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"Data Disk",children:(0,o.createComponentVNode)(2,i,{usbmode:!0,files:h,usbconnected:s,onUpload:function(e){return l("PRG_copyfromusb",{name:e})},onDelete:function(e){return l("PRG_deletefile",{name:e})},onRename:function(e,t){return l("PRG_rename",{name:e,new_name:t})},onDuplicate:function(e){return l("PRG_clone",{file:e})}})})]})})};var i=function(e){var t=e.files,n=void 0===t?[]:t,r=e.usbconnected,c=e.usbmode,i=e.onUpload,l=e.onDelete,d=e.onRename;return(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"File"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Type"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Size"})]}),n.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.undeletable?e.name:(0,o.createComponentVNode)(2,a.Button.Input,{fluid:!0,content:e.name,currentValue:e.name,tooltip:"Rename",onCommit:function(t,n){return d(e.name,n)}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.type}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.size}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:!e.undeletable&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",confirmIcon:"times",confirmContent:"",tooltip:"Delete",onClick:function(){return l(e.name)}}),!!r&&(c?(0,o.createComponentVNode)(2,a.Button,{icon:"download",tooltip:"Download",onClick:function(){return i(e.name)}}):(0,o.createComponentVNode)(2,a.Button,{icon:"upload",tooltip:"Upload",onClick:function(){return i(e.name)}}))],0)})]},e.name)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosJobManagerContent=t.NtosJobManager=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NtosJobManager=function(e,t){return(0,o.createComponentVNode)(2,c.NtosWindow,{width:400,height:620,resizable:!0,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.authed,d=i.cooldown,u=i.slots,s=void 0===u?[]:u,m=i.prioritized,p=void 0===m?[]:m;return l?(0,o.createComponentVNode)(2,a.Section,{children:[d>0&&(0,o.createComponentVNode)(2,a.Dimmer,{children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,textAlign:"center",fontSize:"20px",children:["On Cooldown: ",d,"s"]})}),(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Prioritized"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Slots"})]}),s.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:e.title,disabled:e.total<=0,checked:e.total>0&&p.includes(e.title),onClick:function(){return c("PRG_priority",{target:e.title})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:[e.current," / ",e.total]}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:[(0,o.createComponentVNode)(2,a.Button,{content:"Open",disabled:!e.status_open,onClick:function(){return c("PRG_open_job",{target:e.title})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Close",disabled:!e.status_close,onClick:function(){return c("PRG_close_job",{target:e.title})}})]})]},e.title)}))]})]}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Current ID does not have access permissions to change job slots."})};t.NtosJobManagerContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.NtosMain=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i={compconfig:"cog",ntndownloader:"download",filemanager:"folder",smmonitor:"radiation",alarmmonitor:"bell",cardmod:"id-card",arcade:"gamepad",ntnrc_client:"comment-alt",nttransfer:"exchange-alt",powermonitor:"plug",job_manage:"address-book",crewmani:"clipboard-list",robocontrol:"robot",atmosscan:"thermometer-half",shipping:"tags"};t.NtosMain=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.device_theme,s=d.programs,m=void 0===s?[]:s,p=d.has_light,C=d.light_on,h=d.comp_light_color,N=d.removable_media,V=void 0===N?[]:N,b=d.login,f=void 0===b?[]:b;return(0,o.createComponentVNode)(2,c.NtosWindow,{title:"syndicate"===u?"Syndix Main Menu":"NtOS Main Menu",theme:u,width:400,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:[!!p&&(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Button,{width:"144px",icon:"lightbulb",selected:C,onClick:function(){return l("PC_toggle_light")},children:["Flashlight: ",C?"ON":"OFF"]}),(0,o.createComponentVNode)(2,a.Button,{ml:1,onClick:function(){return l("PC_light_color")},children:["Color:",(0,o.createComponentVNode)(2,a.ColorBox,{ml:1,color:h})]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"User Login",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject ID",disabled:!f.IDName,onClick:function(){return l("PC_Eject_Disk",{name:"ID"})}}),children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:["ID Name: ",f.IDName]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:["Assignment: ",f.IDJob]})]})}),!!V.length&&(0,o.createComponentVNode)(2,a.Section,{title:"Media Eject",children:(0,o.createComponentVNode)(2,a.Table,{children:V.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,color:"transparent",icon:"eject",content:e,onClick:function(){return l("PC_Eject_Disk",{name:e})}})})},e)}))})}),(0,o.createComponentVNode)(2,a.Section,{title:"Programs",children:(0,o.createComponentVNode)(2,a.Table,{children:m.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,color:"transparent",icon:i[e.name]||"window-maximize-o",content:e.desc,onClick:function(){return l("PC_runprogram",{name:e.name})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,width:"18px",children:!!e.running&&(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"times",tooltip:"Close program",tooltipPosition:"left",onClick:function(){return l("PC_killprogram",{name:e.name})}})})]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosNetChat=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NtosNetChat=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.can_admin,u=l.adminmode,s=l.authed,m=l.username,p=l.active_channel,C=l.is_operator,h=l.all_channels,N=void 0===h?[]:h,V=l.clients,b=void 0===V?[]:V,f=l.messages,g=void 0===f?[]:f,v=null!==p,k=s||u;return(0,o.createComponentVNode)(2,c.NtosWindow,{width:900,height:675,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{children:(0,o.createComponentVNode)(2,a.Section,{height:"600px",children:(0,o.createComponentVNode)(2,a.Table,{height:"580px",children:(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{verticalAlign:"top",style:{width:"200px"},children:[(0,o.createComponentVNode)(2,a.Box,{height:"537px",overflowY:"scroll",children:[(0,o.createComponentVNode)(2,a.Button.Input,{fluid:!0,content:"New Channel...",onCommit:function(e,t){return i("PRG_newchannel",{new_channel_name:t})}}),N.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:e.chan,selected:e.id===p,color:"transparent",onClick:function(){return i("PRG_joinchannel",{id:e.id})}},e.chan)}))]}),(0,o.createComponentVNode)(2,a.Button.Input,{fluid:!0,mt:1,content:m+"...",currentValue:m,onCommit:function(e,t){return i("PRG_changename",{new_name:t})}}),!!d&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,bold:!0,content:"ADMIN MODE: "+(u?"ON":"OFF"),color:u?"bad":"good",onClick:function(){return i("PRG_toggleadmin")}})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Box,{height:"560px",overflowY:"scroll",children:v&&(k?g.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:e.msg},e.msg)})):(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",mt:4,fontSize:"40px"}),(0,o.createComponentVNode)(2,a.Box,{mt:1,bold:!0,fontSize:"18px",children:"THIS CHANNEL IS PASSWORD PROTECTED"}),(0,o.createComponentVNode)(2,a.Box,{mt:1,children:"INPUT PASSWORD TO ACCESS"})]}))}),(0,o.createComponentVNode)(2,a.Input,{fluid:!0,selfClear:!0,mt:1,onEnter:function(e,t){return i("PRG_speak",{message:t})}})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{verticalAlign:"top",style:{width:"150px"},children:[(0,o.createComponentVNode)(2,a.Box,{height:"477px",overflowY:"scroll",children:b.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:e.name},e.name)}))}),v&&k&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Input,{fluid:!0,content:"Save log...",defaultValue:"new_log",onCommit:function(e,t){return i("PRG_savelog",{log_name:t})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{fluid:!0,content:"Leave Channel",onClick:function(){return i("PRG_leavechannel")}})],4),!!C&&s&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{fluid:!0,content:"Delete Channel",onClick:function(){return i("PRG_deletechannel")}}),(0,o.createComponentVNode)(2,a.Button.Input,{fluid:!0,content:"Rename Channel...",onCommit:function(e,t){return i("PRG_renamechannel",{new_name:t})}}),(0,o.createComponentVNode)(2,a.Button.Input,{fluid:!0,content:"Set Password...",onCommit:function(e,t){return i("PRG_setpassword",{new_password:t})}})],4)]})]})})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosNetDosContent=t.NtosNetDos=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NtosNetDos=function(e,t){return(0,o.createComponentVNode)(2,c.NtosWindow,{width:400,height:250,theme:"syndicate",children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.relays,d=void 0===l?[]:l,u=i.focus,s=i.target,m=i.speed,p=i.overload,C=i.capacity,h=i.error;if(h)return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.NoticeBox,{children:h}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Reset",textAlign:"center",onClick:function(){return c("PRG_reset")}})],4);var N=function(e){for(var t="",n=p/C;t.lengthn?t+="0":t+="1";return t};return s?(0,o.createComponentVNode)(2,a.Section,{fontFamily:"monospace",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Box,{children:["CURRENT SPEED: ",m," GQ/s"]}),(0,o.createComponentVNode)(2,a.Box,{children:N(45)}),(0,o.createComponentVNode)(2,a.Box,{children:N(45)}),(0,o.createComponentVNode)(2,a.Box,{children:N(45)}),(0,o.createComponentVNode)(2,a.Box,{children:N(45)}),(0,o.createComponentVNode)(2,a.Box,{children:N(45)})]}):(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target",children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.id,selected:u===e.id,onClick:function(){return c("PRG_target_relay",{targid:e.id})}},e.id)}))})}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,bold:!0,content:"EXECUTE",color:"bad",textAlign:"center",disabled:!u,mt:1,onClick:function(){return c("PRG_execute")}})]})};t.NtosNetDosContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.NtosNetDownloader=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NtosNetDownloader=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.PC_device_theme,s=d.disk_size,m=d.disk_used,p=d.downloadable_programs,C=void 0===p?[]:p,h=d.error,N=d.hacked_programs,V=void 0===N?[]:N,b=d.hackedavailable;return(0,o.createComponentVNode)(2,c.NtosWindow,{theme:u,width:480,height:735,resizable:!0,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:[!!h&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:[(0,o.createComponentVNode)(2,a.Box,{mb:1,children:h}),(0,o.createComponentVNode)(2,a.Button,{content:"Reset",onClick:function(){return l("PRG_reseterror")}})]}),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Disk usage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:m,minValue:0,maxValue:s,children:m+" GQ / "+s+" GQ"})})})}),(0,o.createComponentVNode)(2,a.Section,{children:C.map((function(e){return(0,o.createComponentVNode)(2,i,{program:e},e.filename)}))}),!!b&&(0,o.createComponentVNode)(2,a.Section,{title:"UNKNOWN Software Repository",children:[(0,o.createComponentVNode)(2,a.NoticeBox,{mb:1,children:"Please note that Nanotrasen does not recommend download of software from non-official servers."}),V.map((function(e){return(0,o.createComponentVNode)(2,i,{program:e},e.filename)}))]})]})})};var i=function(e,t){var n=e.program,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.disk_size,u=l.disk_used,s=l.downloadcompletion,m=l.downloading,p=l.downloadname,C=l.downloadsize,h=d-u;return(0,o.createComponentVNode)(2,a.Box,{mb:3,children:[(0,o.createComponentVNode)(2,a.Flex,{align:"baseline",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:1,children:n.filedesc}),(0,o.createComponentVNode)(2,a.Flex.Item,{color:"label",nowrap:!0,children:[n.size," GQ"]}),(0,o.createComponentVNode)(2,a.Flex.Item,{ml:2,width:"94px",textAlign:"center",children:n.filename===p&&(0,o.createComponentVNode)(2,a.ProgressBar,{color:"green",minValue:0,maxValue:C,value:s})||(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"download",content:"Download",disabled:m||n.size>h,onClick:function(){return i("PRG_downloadfile",{filename:n.filename})}})})]}),"Compatible"!==n.compatibility&&(0,o.createComponentVNode)(2,a.Box,{mt:1,italic:!0,fontSize:"12px",position:"relative",children:[(0,o.createComponentVNode)(2,a.Icon,{mx:1,color:"red",name:"times"}),"Incompatible!"]}),n.size>h&&(0,o.createComponentVNode)(2,a.Box,{mt:1,italic:!0,fontSize:"12px",position:"relative",children:[(0,o.createComponentVNode)(2,a.Icon,{mx:1,color:"red",name:"times"}),"Not enough disk space!"]}),(0,o.createComponentVNode)(2,a.Box,{mt:1,italic:!0,color:"label",fontSize:"12px",children:n.fileinfo})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosNetMonitor=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.NtosNetMonitor=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data,d=l.ntnetrelays,u=l.ntnetstatus,s=l.config_softwaredownload,m=l.config_peertopeer,p=l.config_communication,C=l.config_systemcontrol,h=l.idsalarm,N=l.idsstatus,V=l.ntnetmaxlogs,b=l.maxlogs,f=l.minlogs,g=l.ntnetlogs,v=void 0===g?[]:g;return(0,o.createComponentVNode)(2,c.NtosWindow,{resizable:!0,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,r.NoticeBox,{children:"WARNING: Disabling wireless transmitters when using a wireless device may prevent you from reenabling them!"}),(0,o.createComponentVNode)(2,r.Section,{title:"Wireless Connectivity",buttons:(0,o.createComponentVNode)(2,r.Button.Confirm,{icon:u?"power-off":"times",content:u?"ENABLED":"DISABLED",selected:u,onClick:function(){return i("toggleWireless")}}),children:d?(0,o.createComponentVNode)(2,r.LabeledList,{children:(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Active NTNet Relays",children:d})}):"No Relays Connected"}),(0,o.createComponentVNode)(2,r.Section,{title:"Firewall Configuration",children:(0,o.createComponentVNode)(2,r.LabeledList,{children:[(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Software Downloads",buttons:(0,o.createComponentVNode)(2,r.Button,{icon:s?"power-off":"times",content:s?"ENABLED":"DISABLED",selected:s,onClick:function(){return i("toggle_function",{id:"1"})}})}),(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Peer to Peer Traffic",buttons:(0,o.createComponentVNode)(2,r.Button,{icon:m?"power-off":"times",content:m?"ENABLED":"DISABLED",selected:m,onClick:function(){return i("toggle_function",{id:"2"})}})}),(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Communication Systems",buttons:(0,o.createComponentVNode)(2,r.Button,{icon:p?"power-off":"times",content:p?"ENABLED":"DISABLED",selected:p,onClick:function(){return i("toggle_function",{id:"3"})}})}),(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Remote System Control",buttons:(0,o.createComponentVNode)(2,r.Button,{icon:C?"power-off":"times",content:C?"ENABLED":"DISABLED",selected:C,onClick:function(){return i("toggle_function",{id:"4"})}})})]})}),(0,o.createComponentVNode)(2,r.Section,{title:"Security Systems",children:[!!h&&(0,o.createFragment)([(0,o.createComponentVNode)(2,r.NoticeBox,{children:"NETWORK INCURSION DETECTED"}),(0,o.createComponentVNode)(2,r.Box,{italics:!0,children:"Abnormal activity has been detected in the network. Check system logs for more information"})],4),(0,o.createComponentVNode)(2,r.LabeledList,{children:[(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"IDS Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,r.Button,{icon:N?"power-off":"times",content:N?"ENABLED":"DISABLED",selected:N,onClick:function(){return i("toggleIDS")}}),(0,o.createComponentVNode)(2,r.Button,{icon:"sync",content:"Reset",color:"bad",onClick:function(){return i("resetIDS")}})],4)}),(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Max Log Count",buttons:(0,o.createComponentVNode)(2,r.NumberInput,{value:V,minValue:f,maxValue:b,width:"39px",onChange:function(e,t){return i("updatemaxlogs",{new_number:t})}})})]}),(0,o.createComponentVNode)(2,r.Section,{title:"System Log",level:2,buttons:(0,o.createComponentVNode)(2,r.Button.Confirm,{icon:"trash",content:"Clear Logs",onClick:function(){return i("purgelogs")}}),children:v.map((function(e){return(0,o.createComponentVNode)(2,r.Box,{className:"candystripe",children:e.entry},e.entry)}))})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosPowerMonitor=void 0;var o=n(0),r=n(3),a=n(143);t.NtosPowerMonitor=function(){return(0,o.createComponentVNode)(2,r.NtosWindow,{width:550,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,r.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.PowerMonitorContent)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosRadarSyndicate=void 0;var o=n(0),r=n(3),a=n(208);t.NtosRadarSyndicate=function(e,t){return(0,o.createComponentVNode)(2,r.NtosWindow,{width:800,height:600,theme:"syndicate",children:(0,o.createComponentVNode)(2,a.NtosRadarContent,{sig_err:"Out of Range"})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosRequestKiosk=void 0;var o=n(0),r=n(209),a=n(3);t.NtosRequestKiosk=function(e,t){return(0,o.createComponentVNode)(2,a.NtosWindow,{width:550,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,a.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,r.RequestKioskContent)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosRevelation=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.NtosRevelation=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.NtosWindow,{width:400,height:250,theme:"syndicate",children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{children:(0,o.createComponentVNode)(2,r.Section,{children:[(0,o.createComponentVNode)(2,r.Button.Input,{fluid:!0,content:"Obfuscate Name...",onCommit:function(e,t){return i("PRG_obfuscate",{new_name:t})},mb:1}),(0,o.createComponentVNode)(2,r.LabeledList,{children:(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Payload Status",buttons:(0,o.createComponentVNode)(2,r.Button,{content:l.armed?"ARMED":"DISARMED",color:l.armed?"bad":"average",onClick:function(){return i("PRG_arm")}})})}),(0,o.createComponentVNode)(2,r.Button,{fluid:!0,bold:!0,content:"ACTIVATE",textAlign:"center",color:"bad",disabled:!l.armed})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosRoboControl=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NtosRoboControl=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.bots,s=d.id_owner,m=d.has_id;return(0,o.createComponentVNode)(2,c.NtosWindow,{width:550,height:550,resizable:!0,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Robot Control Console",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Id Card",children:[s,!!m&&(0,o.createComponentVNode)(2,a.Button,{ml:2,icon:"eject",content:"Eject",onClick:function(){return l("ejectcard")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Bots in range",children:d.botcount})]})}),null==u?void 0:u.map((function(e){return(0,o.createComponentVNode)(2,i,{robot:e},e.bot_ref)}))]})})};var i=function(e,t){var n=e.robot,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.mules||[],u=!!n.mule_check&&function(e,t){return null==e?void 0:e.find((function(e){return e.mule_ref===t}))}(d,n.bot_ref),s=1===n.mule_check?"rgba(110, 75, 14, 1)":"rgba(74, 59, 140, 1)";return(0,o.createComponentVNode)(2,a.Section,{title:n.name,style:{border:"4px solid "+s},buttons:u&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"play",tooltip:"Go to Destination.",onClick:function(){return i("go",{robot:u.mule_ref})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"pause",tooltip:"Stop Moving.",onClick:function(){return i("stop",{robot:u.mule_ref})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"home",tooltip:"Travel Home.",tooltipPosition:"bottom-left",onClick:function(){return i("home",{robot:u.mule_ref})}})],4),children:(0,o.createComponentVNode)(2,a.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Model",children:n.model}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:n.locat}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:n.mode}),u&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Loaded Cargo",children:l.load||"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Home",children:u.home}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destination",children:u.dest||"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.power,minValue:0,maxValue:100,ranges:{good:[60,Infinity],average:[20,60],bad:[-Infinity,20]}})})],4)]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"150px",children:[u&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Set Destination",onClick:function(){return i("destination",{robot:u.mule_ref})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Set ID",onClick:function(){return i("setid",{robot:u.mule_ref})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Set Home",onClick:function(){return i("sethome",{robot:u.mule_ref})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Unload Cargo",onClick:function(){return i("unload",{robot:u.mule_ref})}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Auto Return",checked:u.autoReturn,onClick:function(){return i("autoret",{robot:u.mule_ref})}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Auto Pickup",checked:u.autoPickup,onClick:function(){return i("autopick",{robot:u.mule_ref})}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Delivery Report",checked:u.reportDelivery,onClick:function(){return i("report",{robot:u.mule_ref})}})],4),!u&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Stop Patrol",onClick:function(){return i("patroloff",{robot:n.bot_ref})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Start Patrol",onClick:function(){return i("patrolon",{robot:n.bot_ref})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Summon",onClick:function(){return i("summon",{robot:n.bot_ref})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Eject PAi",onClick:function(){return i("ejectpai",{robot:n.bot_ref})}})],4)]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosShipping=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NtosShipping=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.NtosWindow,{width:450,height:350,resizable:!0,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"NTOS Shipping Hub.",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject Id",onClick:function(){return i("ejectid")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current User",children:l.current_user||"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inserted Card",children:l.card_owner||"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available Paper",children:l.has_printer?l.paperamt:"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Profit on Sale",children:[l.barcode_split,"%"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Shipping Options",children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"id-card",tooltip:"The currently ID card will become the current user.",tooltipPosition:"right",disabled:!l.has_id_slot,onClick:function(){return i("selectid")},content:"Set Current ID"})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"print",tooltip:"Print a barcode to use on a wrapped package.",tooltipPosition:"right",disabled:!l.has_printer||!l.current_user,onClick:function(){return i("print")},content:"Print Barcode"})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"tags",tooltip:"Set how much profit you'd like on your package.",tooltipPosition:"right",onClick:function(){return i("setsplit")},content:"Set Profit Margin"})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"sync-alt",content:"Reset ID",onClick:function(){return i("resetid")}})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosStationAlertConsole=void 0;var o=n(0),r=n(3),a=n(210);t.NtosStationAlertConsole=function(){return(0,o.createComponentVNode)(2,r.NtosWindow,{width:315,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,r.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.StationAlertConsoleContent)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosSupermatterMonitorContent=t.NtosSupermatterMonitor=void 0;var o=n(0),r=n(14),a=n(30),c=n(9),i=n(2),l=n(1),d=n(36),u=n(3),s=function(e){return Math.log2(16+Math.max(0,e))-4};t.NtosSupermatterMonitor=function(e,t){return(0,o.createComponentVNode)(2,u.NtosWindow,{width:600,height:350,resizable:!0,children:(0,o.createComponentVNode)(2,u.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,m)})})};var m=function(e,t){var n=(0,i.useBackend)(t),u=n.act,m=n.data,C=m.active,h=m.SM_integrity,N=m.SM_power,V=m.SM_ambienttemp,b=m.SM_ambientpressure;if(!C)return(0,o.createComponentVNode)(2,p);var f=(0,a.flow)([function(e){return e.filter((function(e){return e.amount>=.01}))},(0,r.sortBy)((function(e){return-e.amount}))])(m.gases||[]),g=Math.max.apply(Math,[1].concat(f.map((function(e){return e.amount}))));return(0,o.createComponentVNode)(2,l.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,l.Flex.Item,{width:"270px",children:(0,o.createComponentVNode)(2,l.Section,{title:"Metrics",children:(0,o.createComponentVNode)(2,l.LabeledList,{children:[(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:h/100,ranges:{good:[.9,Infinity],average:[.5,.9],bad:[-Infinity,.5]}})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Relative EER",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:N,minValue:0,maxValue:5e3,ranges:{good:[-Infinity,5e3],average:[5e3,7e3],bad:[7e3,Infinity]},children:(0,c.toFixed)(N)+" MeV/cm3"})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:s(V),minValue:0,maxValue:s(1e4),ranges:{teal:[-Infinity,s(80)],good:[s(80),s(373)],average:[s(373),s(1e3)],bad:[s(1e3),Infinity]},children:(0,c.toFixed)(V)+" K"})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:s(b),minValue:0,maxValue:s(5e4),ranges:{good:[s(1),s(300)],average:[-Infinity,s(1e3)],bad:[s(1e3),+Infinity]},children:(0,c.toFixed)(b)+" kPa"})})]})})}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Gases",buttons:(0,o.createComponentVNode)(2,l.Button,{icon:"arrow-left",content:"Back",onClick:function(){return u("PRG_clear")}}),children:(0,o.createComponentVNode)(2,l.LabeledList,{children:f.map((function(e){return(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:(0,d.getGasLabel)(e.name),children:(0,o.createComponentVNode)(2,l.ProgressBar,{color:(0,d.getGasColor)(e.name),value:e.amount,minValue:0,maxValue:g,children:(0,c.toFixed)(e.amount,2)+"%"})},e.name)}))})})})]})};t.NtosSupermatterMonitorContent=m;var p=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.supermatters,c=void 0===a?[]:a;return(0,o.createComponentVNode)(2,l.Section,{title:"Detected Supermatters",buttons:(0,o.createComponentVNode)(2,l.Button,{icon:"sync",content:"Refresh",onClick:function(){return r("PRG_refresh")}}),children:(0,o.createComponentVNode)(2,l.Table,{children:c.map((function(e){return(0,o.createComponentVNode)(2,l.Table.Row,{children:[(0,o.createComponentVNode)(2,l.Table.Cell,{children:e.uid+". "+e.area_name}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,color:"label",children:"Integrity:"}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,width:"120px",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:e.integrity/100,ranges:{good:[.9,Infinity],average:[.5,.9],bad:[-Infinity,.5]}})}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,l.Button,{content:"Details",onClick:function(){return r("PRG_set",{target:e.uid})}})})]},e.uid)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NuclearBomb=void 0;var o=n(0),r=n(6),a=n(2),c=n(1),i=n(3),l=function(e,t){var n=(0,a.useBackend)(t).act;return(0,o.createComponentVNode)(2,c.Box,{width:"185px",children:(0,o.createComponentVNode)(2,c.Grid,{width:"1px",children:[["1","4","7","C"],["2","5","8","0"],["3","6","9","E"]].map((function(e){return(0,o.createComponentVNode)(2,c.Grid.Column,{children:e.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,mb:"6px",content:e,textAlign:"center",fontSize:"40px",lineHeight:1.25,width:"55px",className:(0,r.classes)(["NuclearBomb__Button","NuclearBomb__Button--keypad","NuclearBomb__Button--"+e]),onClick:function(){return n("keypad",{digit:e})}},e)}))},e[0])}))})})};t.NuclearBomb=function(e,t){var n=(0,a.useBackend)(t),r=n.act,d=n.data,u=(d.anchored,d.disk_present,d.status1),s=d.status2;return(0,o.createComponentVNode)(2,i.Window,{width:350,height:442,theme:"retro",children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Box,{m:"6px",children:[(0,o.createComponentVNode)(2,c.Box,{mb:"6px",className:"NuclearBomb__displayBox",children:u}),(0,o.createComponentVNode)(2,c.Flex,{mb:1.5,children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,c.Box,{className:"NuclearBomb__displayBox",children:s})}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Button,{icon:"eject",fontSize:"24px",lineHeight:1,textAlign:"center",width:"43px",ml:"6px",mr:"3px",mt:"3px",className:"NuclearBomb__Button NuclearBomb__Button--keypad",onClick:function(){return r("eject_disk")}})})]}),(0,o.createComponentVNode)(2,c.Flex,{ml:"3px",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,l)}),(0,o.createComponentVNode)(2,c.Flex.Item,{ml:"6px",width:"129px",children:(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"ARM",textAlign:"center",fontSize:"28px",lineHeight:1.1,mb:"6px",className:"NuclearBomb__Button NuclearBomb__Button--C",onClick:function(){return r("arm")}}),(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"ANCHOR",textAlign:"center",fontSize:"28px",lineHeight:1.1,className:"NuclearBomb__Button NuclearBomb__Button--E",onClick:function(){return r("anchor")}}),(0,o.createComponentVNode)(2,c.Box,{textAlign:"center",color:"#9C9987",fontSize:"80px",children:(0,o.createComponentVNode)(2,c.Icon,{name:"radiation"})}),(0,o.createComponentVNode)(2,c.Box,{height:"80px",className:"NuclearBomb__NTIcon"})]})})]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OperatingComputer=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=[{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"},{label:"Toxin",type:"toxLoss"},{label:"Respiratory",type:"oxyLoss"}];t.OperatingComputer=function(e,t){var n=(0,r.useSharedState)(t,"tab",1),i=n[0],u=n[1];return(0,o.createComponentVNode)(2,c.Window,{width:350,height:470,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===i,onClick:function(){return u(1)},children:"Patient State"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===i,onClick:function(){return u(2)},children:"Surgery Procedures"})]}),1===i&&(0,o.createComponentVNode)(2,l),2===i&&(0,o.createComponentVNode)(2,d)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),l=c.table,d=c.procedures,u=void 0===d?[]:d,s=c.patient,m=void 0===s?{}:s;return l?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Patient State",children:m&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"State",color:m.statstate,children:m.stat}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood Type",children:m.blood_type}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:m.health,minValue:m.minHealth,maxValue:m.maxHealth,color:m.health>=0?"good":"average",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:m.health})})}),i.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:m.is_robotic_organism&&"Toxin"===e.label?"Corruption":e.label,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:m[e.type]/m.maxHealth,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:m[e.type]})})},e.type)}))]})||"No Patient Detected"}),0===u.length&&(0,o.createComponentVNode)(2,a.Section,{children:"No Active Procedures"}),u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Next Step",children:[e.next_step,e.chems_needed&&(0,o.createFragment)([(0,o.createVNode)(1,"b",null,"Required Chemicals:",16),(0,o.createVNode)(1,"br"),e.chems_needed],0)]}),!!c.alternative_step&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Alternative Step",children:[e.alternative_step,e.alt_chems_needed&&(0,o.createFragment)([(0,o.createVNode)(1,"b",null,"Required Chemicals:",16),(0,o.createVNode)(1,"br"),e.alt_chems_needed],0)]})]})},e.name)}))],0):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Table Detected"})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.surgeries,l=void 0===i?[]:i;return(0,o.createComponentVNode)(2,a.Section,{title:"Advanced Surgery Procedures",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"download",content:"Sync Research Database",onClick:function(){return c("sync")}}),l.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,level:2,children:e.desc},e.name)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Orbit=void 0;var o=n(0),r=n(19),a=n(63),c=n(2),i=n(1),l=n(3);function d(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return u(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(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}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(n=e[Symbol.iterator]()).next.bind(n)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);nt},h=function(e,t){var n=e.name,o=t.name,r=n.match(m),a=o.match(m);return r&&a&&n.replace(m,"")===o.replace(m,"")?parseInt(r[1],10)-parseInt(a[1],10):C(n,o)},N=function(e,t){var n=(0,c.useBackend)(t).act,r=e.searchText,a=e.source,l=e.title,d=a.filter(p(r));return d.sort(h),a.length>0&&(0,o.createComponentVNode)(2,i.Section,{title:l+" - ("+a.length+")",children:d.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.name.replace(s,""),onClick:function(){return n("orbit",{ref:e.ref})}},e.name)}))})},V=function(e,t){var n=(0,c.useBackend)(t).act,r=e.color,l=e.thing;return(0,o.createComponentVNode)(2,i.Button,{color:r,onClick:function(){return n("orbit",{ref:l.ref})},children:[l.name,l.orbiters&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,ml:1,children:["(",l.orbiters," ",(0,o.createComponentVNode)(2,i.Box,{as:"img",src:(0,a.resolveAsset)("ghost.png"),opacity:.7}),")"]})]})};t.Orbit=function(e,t){for(var n,r=(0,c.useBackend)(t),a=r.act,u=r.data,s=u.alive,m=u.antagonists,b=u.dead,f=u.ghosts,g=u.misc,v=u.npcs,k=(0,c.useLocalState)(t,"searchText",""),x=k[0],B=k[1],_={},w=d(m);!(n=w()).done;){var L=n.value;_[L.antag]===undefined&&(_[L.antag]=[]),_[L.antag].push(L)}var y=Object.entries(_);y.sort((function(e,t){return C(e[0],t[0])}));return(0,o.createComponentVNode)(2,l.Window,{title:"Orbit",width:350,height:700,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Icon,{name:"search",mr:1})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Input,{placeholder:"Search...",autoFocus:!0,fluid:!0,value:x,onInput:function(e,t){return B(t)},onEnter:function(e,t){return function(e){for(var t=0,n=[y.map((function(e){return e[0],e[1]})),s,f,b,v,g];t0&&(0,o.createComponentVNode)(2,i.Section,{title:"Ghost-Visible Antagonists",children:y.map((function(e){var t=e[0],n=e[1];return(0,o.createComponentVNode)(2,i.Section,{title:t,level:2,children:n.filter(p(x)).sort(h).map((function(e){return(0,o.createComponentVNode)(2,V,{color:"bad",thing:e},e.name)}))},t)}))}),(0,o.createComponentVNode)(2,i.Section,{title:"Alive",children:s.filter(p(x)).sort(h).map((function(e){return(0,o.createComponentVNode)(2,V,{color:"good",thing:e},e.name)}))}),(0,o.createComponentVNode)(2,N,{title:"Ghosts",source:f,searchText:x}),(0,o.createComponentVNode)(2,N,{title:"Dead",source:b,searchText:x}),(0,o.createComponentVNode)(2,N,{title:"NPCs",source:v,searchText:x}),(0,o.createComponentVNode)(2,N,{title:"Misc",source:g,searchText:x})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OreBox=void 0;var o=n(0),r=n(19),a=n(1),c=n(2),i=n(3);t.OreBox=function(e,t){var n=(0,c.useBackend)(t),l=n.act,d=n.data.materials;return(0,o.createComponentVNode)(2,i.Window,{width:335,height:415,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Ores",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Empty",onClick:function(){return l("removeall")}}),children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Ore"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"right",children:"Amount"})]}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,r.toTitleCase)(e.name)}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"right",children:(0,o.createComponentVNode)(2,a.Box,{color:"label",inline:!0,children:e.amount})})]},e.type)}))]})}),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Box,{children:["All ores will be placed in here when you are wearing a mining stachel on your belt or in a pocket while dragging the ore box.",(0,o.createVNode)(1,"br"),"Gibtonite is not accepted."]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OreRedemptionMachine=void 0;var o=n(0),r=n(19),a=n(2),c=n(1),i=n(3);t.OreRedemptionMachine=function(e,t){var n=(0,a.useBackend)(t),r=n.act,d=n.data,u=d.unclaimedPoints,s=d.materials,m=d.alloys,p=d.diskDesigns,C=d.hasDisk;return(0,o.createComponentVNode)(2,i.Window,{title:"Ore Redemption Machine",width:440,height:550,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.BlockQuote,{mb:1,children:["This machine only accepts ore.",(0,o.createVNode)(1,"br"),"Gibtonite and Slag are not accepted."]}),(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:"label",mr:1,children:"Unclaimed points:"}),u,(0,o.createComponentVNode)(2,c.Button,{ml:2,content:"Claim",disabled:0===u,onClick:function(){return r("Claim")}})]})]}),(0,o.createComponentVNode)(2,c.Section,{children:C&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{mb:1,children:(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject design disk",onClick:function(){return r("diskEject")}})}),(0,o.createComponentVNode)(2,c.Table,{children:p.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:["File ",e.index,": ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,c.Button,{disabled:!e.canupload,content:"Upload",onClick:function(){return r("diskUpload",{design:e.index})}})})]},e.index)}))})],4)||(0,o.createComponentVNode)(2,c.Button,{icon:"save",content:"Insert design disk",onClick:function(){return r("diskInsert")}})}),(0,o.createComponentVNode)(2,c.Section,{title:"Materials",children:(0,o.createComponentVNode)(2,c.Table,{children:s.map((function(e){return(0,o.createComponentVNode)(2,l,{material:e,onRelease:function(t){return r("Release",{id:e.id,sheets:t})}},e.id)}))})}),(0,o.createComponentVNode)(2,c.Section,{title:"Alloys",children:(0,o.createComponentVNode)(2,c.Table,{children:m.map((function(e){return(0,o.createComponentVNode)(2,l,{material:e,onRelease:function(t){return r("Smelt",{id:e.id,sheets:t})}},e.id)}))})})]})})};var l=function(e,t){var n=e.material,i=e.onRelease,l=(0,a.useLocalState)(t,"amount"+n.name,1),d=l[0],u=l[1],s=Math.floor(n.amount);return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,r.toTitleCase)(n.name).replace("Alloy","")}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,textAlign:"right",children:(0,o.createComponentVNode)(2,c.Box,{mr:2,color:"label",inline:!0,children:n.value&&n.value+" cr"})}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,textAlign:"right",children:(0,o.createComponentVNode)(2,c.Box,{mr:2,color:"label",inline:!0,children:[s," sheets"]})}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,children:[(0,o.createComponentVNode)(2,c.NumberInput,{width:"32px",step:1,stepPixelSize:5,minValue:1,maxValue:50,value:d,onChange:function(e,t){return u(t)}}),(0,o.createComponentVNode)(2,c.Button,{disabled:s<1,content:"Release",onClick:function(){return i(d)}})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Pandemic=t.PandemicAntibodyDisplay=t.PandemicSymptomDisplay=t.PandemicDiseaseDisplay=t.PandemicBeakerDisplay=void 0;var o=n(0),r=n(14),a=n(2),c=n(1),i=n(3),l=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.has_beaker,d=i.beaker_empty,u=i.has_blood,s=i.blood,m=!l||d;return(0,o.createComponentVNode)(2,c.Section,{title:"Beaker",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Empty and Eject",color:"bad",disabled:m,onClick:function(){return r("empty_eject_beaker")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"trash",content:"Empty",disabled:m,onClick:function(){return r("empty_beaker")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject",disabled:!l,onClick:function(){return r("eject_beaker")}})],4),children:l?d?(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Beaker is empty"}):u?(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Blood DNA",children:s&&s.dna||"Unknown"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Blood Type",children:s&&s.type||"Unknown"})]}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"No blood detected"}):(0,o.createComponentVNode)(2,c.NoticeBox,{children:"No beaker loaded"})})};t.PandemicBeakerDisplay=l;var d=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.is_ready;return(i.viruses||[]).map((function(e){var t=e.symptoms||[];return(0,o.createComponentVNode)(2,c.Section,{title:e.can_rename?(0,o.createComponentVNode)(2,c.Input,{value:e.name,onChange:function(t,n){return r("rename_disease",{index:e.index,name:n})}}):e.name,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"flask",content:"Create culture bottle",disabled:!l,onClick:function(){return r("create_culture_bottle",{index:e.index})}}),children:[(0,o.createComponentVNode)(2,c.Grid,{children:[(0,o.createComponentVNode)(2,c.Grid.Column,{children:e.description}),(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Agent",children:e.agent}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Spread",children:e.spread}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Possible Cure",children:e.cure})]})})]}),!!e.is_adv&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"Statistics",level:2,children:(0,o.createComponentVNode)(2,c.Grid,{children:[(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Resistance",children:e.resistance}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Stealth",children:e.stealth})]})}),(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Stage speed",children:e.stage_speed}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Transmissibility",children:e.transmission})]})})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Symptoms",level:2,children:t.map((function(e){return(0,o.createComponentVNode)(2,c.Collapsible,{title:e.name,children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,u,{symptom:e})})},e.name)}))})],4)]},e.name)}))};t.PandemicDiseaseDisplay=d;var u=function(e,t){var n=e.symptom,a=n.name,i=n.desc,l=n.stealth,d=n.resistance,u=n.stage_speed,s=n.transmission,m=n.level,p=n.neutered,C=(0,r.map)((function(e,t){return{desc:e,label:t}}))(n.threshold_desc||{});return(0,o.createComponentVNode)(2,c.Section,{title:a,level:2,buttons:!!p&&(0,o.createComponentVNode)(2,c.Box,{bold:!0,color:"bad",children:"Neutered"}),children:[(0,o.createComponentVNode)(2,c.Grid,{children:[(0,o.createComponentVNode)(2,c.Grid.Column,{size:2,children:i}),(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Level",children:m}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Resistance",children:d}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Stealth",children:l}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Stage Speed",children:u}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Transmission",children:s})]})})]}),C.length>0&&(0,o.createComponentVNode)(2,c.Section,{title:"Thresholds",level:3,children:(0,o.createComponentVNode)(2,c.LabeledList,{children:C.map((function(e){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.label,children:e.desc},e.label)}))})})]})};t.PandemicSymptomDisplay=u;var s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.resistances||[];return(0,o.createComponentVNode)(2,c.Section,{title:"Antibodies",children:l.length>0?(0,o.createComponentVNode)(2,c.LabeledList,{children:l.map((function(e){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,c.Button,{icon:"eye-dropper",content:"Create vaccine bottle",disabled:!i.is_ready,onClick:function(){return r("create_vaccine_bottle",{index:e.id})}})},e.name)}))}):(0,o.createComponentVNode)(2,c.Box,{bold:!0,color:"bad",mt:1,children:"No antibodies detected."})})};t.PandemicAntibodyDisplay=s;t.Pandemic=function(e,t){var n=(0,a.useBackend)(t).data;return(0,o.createComponentVNode)(2,i.Window,{width:520,height:550,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l),!!n.has_blood&&(0,o.createFragment)([(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,s)],4)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PaperSheet=void 0;var o=n(0),r=n(6),a=n(102),c=s(n(613)),i=s(n(614)),l=n(2),d=n(1),u=n(3);function s(e){return e&&e.__esModule?e:{"default":e}}function m(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function p(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}function C(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return h(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(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}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(n=e[Symbol.iterator]()).next.bind(n)}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n]+)>/g,(function(e,t){return"$"+n[t]})))}if("function"==typeof t){var a=this;return o[Symbol.replace].call(this,e,(function(){var e=[];return e.push.apply(e,arguments),"object"!=typeof e[e.length-1]&&e.push(c(e,a)),t.apply(this,e)}))}return o[Symbol.replace].call(this,e,t)},N.apply(this,arguments)}function V(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}function b(e){var t="function"==typeof Map?new Map:undefined;return(b=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,o)}function o(){return f(e,arguments,k(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),v(o,e)})(e)}function f(e,t,n){return(f=g()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var r=new(Function.bind.apply(e,o));return n&&v(r,n.prototype),r}).apply(null,arguments)}function g(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var x=function(e,t,n,o){return void 0===o&&(o=!1),"'+e+" "},B=/\[(_+)\]/g,_=N(/\[ \]/gm,{id:2}),w=/%s(?:ign)?(?=\\s|$)/gim,L=function(e,t,n,o,r){var a=e.replace(B,(function(e,a,c,i){var l=function(e,t,n){t=n+"x "+t;var o=document.createElement("canvas").getContext("2d");return o.font=t,o.measureText(e).width}(e,t,n)+"px";return function(e,t,n,o,r,a){return'[ '+(n=a,r=l,(r?n.replace(/ ")};return(0,o.createComponentVNode)(2,d.Box,{position:"relative",backgroundColor:i,width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,d.Box,{fillPositionedParent:!0,width:"100%",height:"100%",dangerouslySetInnerHTML:s,p:"10px"}),u.map((function(e,t){return(0,o.createComponentVNode)(2,S,{image:{sprite:e[0],x:e[1],y:e[2],rotate:e[3]}},e[0]+t)}))]})},T=function(e){function t(t,n){var o;return(o=e.call(this,t,n)||this).state={x:0,y:0,rotate:0},o}m(t,e);var n=t.prototype;return n.findStampPosition=function(e){for(var t=event.pageX,n=event.pageY,o={left:e.target.offsetLeft,top:e.target.offsetTop},r=e.target.offsetParent;r;)o.left+=r.offsetLeft,o.top+=r.offsetTop,r=r.offsetParent;var c=[t-o.left,n-o.top],i=(0,a.vecScale)([121,51],.5);return(0,a.vecSubtract)(c,i)},n.componentDidMount=function(){document.onwheel=this.handleWheel.bind(this)},n.handleMouseMove=function(e){var t=this.findStampPosition(e);y(e),this.setState({x:t[0],y:t[1]})},n.handleMouseClick=function(e){var t=this.findStampPosition(e),n=(0,l.useBackend)(this.context),o=n.act,r=n.data;o("stamp",{x:t[0],y:t[1],r:this.state.rotate,stamp_class:this.props.stamp_class,stamp_icon_state:r.stamp_icon_state}),this.setState({x:t[0],y:t[1]})},n.handleWheel=function(e){var t=e.deltaY>0?15:-15;if(e.deltaY<0&&0===this.state.rotate)this.setState({rotate:360+t});else if(e.deltaY>0&&360===this.state.rotate)this.setState({rotate:t});else{var n={rotate:t+this.state.rotate};this.setState((function(){return n}))}y(e)},n.render=function(){var e=this.props,t=e.value,n=e.stamp_class,r=e.stamps,a=p(e,["value","stamp_class","stamps"]),c=r||[],i={sprite:n,x:this.state.x,y:this.state.y,rotate:this.state.rotate};return(0,o.normalizeProps)((0,o.createComponentVNode)(2,d.Box,Object.assign({onClick:this.handleMouseClick.bind(this),onMouseMove:this.handleMouseMove.bind(this),onwheel:this.handleWheel.bind(this)},a,{children:[(0,o.createComponentVNode)(2,I,{readOnly:!0,value:t,stamps:c}),(0,o.createComponentVNode)(2,S,{opacity:.5,image:i})]})))},t}(o.Component),A=function(e){function t(t,n){var o;return(o=e.call(this,t,n)||this).state={previewSelected:"Preview",old_text:t.value||"",textarea_text:"",combined_text:t.value||""},o}m(t,e);var n=t.prototype;return n.createPreview=function(e,t){void 0===t&&(t=!1);var n,o,r=(0,l.useBackend)(this.context).data,a=r.text,d=r.pen_color,u=r.pen_font,s=r.is_crayon,m=r.field_counter,p=r.edit_usr,h={text:a};if((e=e.trim()).length>0){var N=function(e){return c["default"].sanitize(e,{FORBID_ATTR:["class","style"],ALLOWED_TAGS:["br","code","li","p","pre","span","table","td","tr","th","ul","ol","menu","font","b","center","table","tr","th"]})}(e+="\n"===e[e.length]?" \n":"\n \n"),V=(n=d,o=p,N.replace(w,(function(){return x(o,"Times New Roman",n,!0)}))),b=L(V,u,12,d,m),f=function(e){return(0,i["default"])(e,{breaks:!0,smartypants:!0,smartLists:!0,walkTokens:function(e){switch(e.type){case"url":case"autolink":case"reflink":case"link":case"image":e.type="text",e.href=""}},baseUrl:"thisshouldbreakhttp"})}(b.text),g=x(f,u,d,s);h.text+=g,h.field_counter=b.counter}if(t){var v=function(e,t,n,o,r){var a;void 0===r&&(r=!1);for(var i={},l=[];null!==(a=_.exec(e));){var d=a[0],u=a.groups.id;if(u){var s=document.getElementById(u);if(0===(s&&s.value?s.value:"").length)continue;var m=c["default"].sanitize(s.value.trim(),{ALLOWED_TAGS:[]});if(0===m.length)continue;var p=s.cloneNode(!0);m.match(w)?(p.style.fontFamily="Times New Roman",r=!0,p.defaultValue=o):(p.style.fontFamily=t,p.defaultValue=m),r&&(p.style.fontWeight="bold"),p.style.color=n,p.disabled=!0;var h=document.createElement("div");h.appendChild(p),i[u]=m,l.push({value:"["+h.innerHTML+"]",raw_text:d})}}if(l.length>0)for(var N,V=C(l);!(N=V()).done;){var b=N.value;e=e.replace(b.raw_text,b.value)}return{text:e,fields:i}}(h.text,u,d,p,s);h.text=v.text,h.form_fields=v.fields}return h},n.onInputHandler=function(e,t){var n=this;if(t!==this.state.textarea_text){var o=this.state.old_text.length+this.state.textarea_text.length;if(o>5e3&&(t=o-5e3>=t.length?"":t.substr(0,t.length-(o-5e3)))===this.state.textarea_text)return;this.setState((function(){return{textarea_text:t,combined_text:n.createPreview(t)}}))}},n.finalUpdate=function(e){var t=(0,l.useBackend)(this.context).act,n=this.createPreview(e,!0);t("save",n),this.setState((function(){return{textarea_text:"",previewSelected:"save",combined_text:n.text}}))},n.render=function(){var e=this,t=this.props,n=(t.value,t.textColor),r=t.fontFamily,a=t.stamps,c=t.backgroundColor;return p(t,["value","textColor","fontFamily","stamps","backgroundColor"]),(0,o.createComponentVNode)(2,d.Flex,{direction:"column",fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,d.Flex.Item,{children:(0,o.createComponentVNode)(2,d.Tabs,{children:[(0,o.createComponentVNode)(2,d.Tabs.Tab,{textColor:"black",backgroundColor:"Edit"===this.state.previewSelected?"grey":"white",selected:"Edit"===this.state.previewSelected,onClick:function(){return e.setState({previewSelected:"Edit"})},children:"Edit"},"marked_edit"),(0,o.createComponentVNode)(2,d.Tabs.Tab,{textColor:"black",backgroundColor:"Preview"===this.state.previewSelected?"grey":"white",selected:"Preview"===this.state.previewSelected,onClick:function(){return e.setState((function(){return{previewSelected:"Preview",textarea_text:e.state.textarea_text,combined_text:e.createPreview(e.state.textarea_text).text}}))},children:"Preview"},"marked_preview"),(0,o.createComponentVNode)(2,d.Tabs.Tab,{textColor:"black",backgroundColor:"confirm"===this.state.previewSelected?"red":"save"===this.state.previewSelected?"grey":"white",selected:"confirm"===this.state.previewSelected||"save"===this.state.previewSelected,onClick:function(){"confirm"===e.state.previewSelected?e.finalUpdate(e.state.textarea_text):"Edit"===e.state.previewSelected?e.setState((function(){return{previewSelected:"confirm",textarea_text:e.state.textarea_text,combined_text:e.createPreview(e.state.textarea_text).text}})):e.setState({previewSelected:"confirm"})},children:"confirm"===this.state.previewSelected?"confirm":"save"},"marked_done")]})}),(0,o.createComponentVNode)(2,d.Flex.Item,{grow:1,basis:1,children:"Edit"===this.state.previewSelected&&(0,o.createComponentVNode)(2,d.TextArea,{value:this.state.textarea_text,textColor:n,fontFamily:r,height:window.innerHeight-80+"px",backgroundColor:c,onInput:this.onInputHandler.bind(this)})||(0,o.createComponentVNode)(2,I,{value:this.state.combined_text,stamps:a,fontFamily:r,textColor:n})})]})},t}(o.Component);t.PaperSheet=function(e,t){var n=(0,l.useBackend)(t).data,r=n.edit_mode,a=n.text,c=n.paper_color,i=n.pen_color,s=void 0===i?"black":i,m=n.pen_font,p=void 0===m?"Verdana":m,C=n.stamps,h=n.stamp_class,N=(n.stamped,c&&"white"!==c?c:"#FFFFFF"),V=C&&null!==C?C:[];return(0,o.createComponentVNode)(2,u.Window,{theme:"paper",width:400,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,u.Window.Content,{children:(0,o.createComponentVNode)(2,d.Box,{fillPositionedParent:!0,backgroundColor:N,children:function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,I,{value:a,stamps:V,readOnly:!0});case 1:return(0,o.createComponentVNode)(2,A,{value:a,textColor:s,fontFamily:p,stamps:V,backgroundColor:N});case 2:return(0,o.createComponentVNode)(2,T,{value:a,stamps:V,stamp_class:h});default:return"ERROR ERROR WE CANNOT BE HERE!!"}}(r)})})})}},,,function(e,t,n){"use strict";t.__esModule=!0,t.ParticleAccelerator=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.ParticleAccelerator=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.assembled,u=l.power,s=l.strength;return(0,o.createComponentVNode)(2,c.Window,{width:350,height:185,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Run Scan",onClick:function(){return i("scan")}}),children:(0,o.createComponentVNode)(2,a.Box,{color:d?"good":"bad",children:d?"Ready - All parts in place":"Unable to detect all parts"})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Particle Accelerator Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:!d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Particle Strength",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:!d,onClick:function(){return i("remove_strength")}})," ",String(s).padStart(1,"0")," ",(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:!d,onClick:function(){return i("add_strength")}})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PersonalCrafting=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);function i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(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(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}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(n=e[Symbol.iterator]()).next.bind(n)}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n50?"good":d>15&&"average")||"bad";return(0,o.createComponentVNode)(2,c.Window,{width:450,height:340,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!l.anchored&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Generator not anchored."}),(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power switch",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.active?"power-off":"times",onClick:function(){return i("toggle_power")},disabled:!l.ready_to_boot,children:l.active?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:l.sheet_name+" sheets",children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:u,children:l.sheets}),l.sheets>=1&&(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"eject",disabled:l.active,onClick:function(){return i("eject")},children:"Eject"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current sheet level",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:l.stack_percent/100,ranges:{good:[.1,Infinity],average:[.01,.1],bad:[-Infinity,.01]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Heat level",children:l.current_heat<100?(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"good",children:"Nominal"}):l.current_heat<200?(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"average",children:"Caution"}):(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"bad",children:"DANGER"})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Output",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current output",children:l.power_output}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Adjust output",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"minus",onClick:function(){return i("lower_power")},children:l.power_generated}),(0,o.createComponentVNode)(2,a.Button,{icon:"plus",onClick:function(){return i("higher_power")},children:l.power_generated})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power available",children:(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:!l.connected&&"bad",children:l.connected?l.power_available:"Unconnected"})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PortablePump=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=n(211);t.PortablePump=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.direction,s=(d.holding,d.target_pressure),m=d.default_pressure,p=d.min_pressure,C=d.max_pressure;return(0,o.createComponentVNode)(2,c.Window,{width:300,height:315,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.PortableBasicInfo),(0,o.createComponentVNode)(2,a.Section,{title:"Pump",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"sign-in-alt":"sign-out-alt",content:u?"In":"Out",selected:u,onClick:function(){return l("direction")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:s,unit:"kPa",width:"75px",minValue:p,maxValue:C,step:10,onChange:function(e,t){return l("pressure",{pressure:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Presets",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"minus",disabled:s===p,onClick:function(){return l("pressure",{pressure:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",disabled:s===m,onClick:function(){return l("pressure",{pressure:"reset"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"plus",disabled:s===C,onClick:function(){return l("pressure",{pressure:"max"})}})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PortableScrubber=void 0;var o=n(0),r=n(2),a=n(1),c=n(36),i=n(3),l=n(211);t.PortableScrubber=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data.filter_types||[];return(0,o.createComponentVNode)(2,i.Window,{width:320,height:350,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,l.PortableBasicInfo),(0,o.createComponentVNode)(2,a.Section,{title:"Filters",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:e.enabled?"check-square-o":"square-o",content:(0,c.getGasLabel)(e.gas_id,e.gas_name),selected:e.enabled,onClick:function(){return d("toggle_filter",{val:e.gas_id})}},e.id)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PortableTurret=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.PortableTurret=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.silicon_user,u=l.locked,s=l.on,m=l.check_weapons,p=l.neutralize_criminals,C=l.neutralize_all,h=l.neutralize_unidentified,N=l.neutralize_nonmindshielded,V=l.neutralize_cyborgs,b=l.neutralize_heads,f=l.manual_control,g=l.allow_manual_control,v=l.lasertag_turret;return(0,o.createComponentVNode)(2,c.Window,{width:310,height:v?110:292,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.NoticeBox,{children:["Swipe an ID card to ",u?"unlock":"lock"," this interface."]}),(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",buttons:!v&&(!!g||!!f&&!!d)&&(0,o.createComponentVNode)(2,a.Button,{icon:f?"wifi":"terminal",content:f?"Remotely Controlled":"Manual Control",disabled:f,color:"bad",onClick:function(){return i("manual")}}),children:(0,o.createComponentVNode)(2,a.Button,{icon:s?"power-off":"times",content:s?"On":"Off",selected:s,disabled:u,onClick:function(){return i("power")}})})})}),!v&&(0,o.createComponentVNode)(2,a.Section,{title:"Target Settings",buttons:(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:!b,content:"Ignore Command",disabled:u,onClick:function(){return i("shootheads")}}),children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:C,content:"Non-Security and Non-Command",disabled:u,onClick:function(){return i("shootall")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Unauthorized Weapons",disabled:u,onClick:function(){return i("authweapon")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:h,content:"Unidentified Life Signs",disabled:u,onClick:function(){return i("checkxenos")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:N,content:"Non-Mindshielded",disabled:u,onClick:function(){return i("checkloyal")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:p,content:"Wanted Criminals",disabled:u,onClick:function(){return i("shootcriminals")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:V,content:"Cyborgs",disabled:u,onClick:function(){return i("shootborgs")}})]})],0)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ProbingConsole=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.ProbingConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.open,u=l.feedback,s=l.occupant,m=l.occupant_name,p=l.occupant_status;return(0,o.createComponentVNode)(2,c.Window,{width:330,height:207,theme:"abductor",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Machine Report",children:u})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Scanner",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d?"sign-out-alt":"sign-in-alt",content:d?"Close":"Open",onClick:function(){return i("door")}}),children:s&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:3===p?"bad":2===p?"average":"good",children:3===p?"Deceased":2===p?"Unconscious":"Conscious"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Experiments",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"thermometer",content:"Probe",onClick:function(){return i("experiment",{experiment_type:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"brain",content:"Dissect",onClick:function(){return i("experiment",{experiment_type:2})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"search",content:"Analyze",onClick:function(){return i("experiment",{experiment_type:3})}})]})]})||(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Subject"})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ProximitySensor=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.ProximitySensor=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.minutes,u=l.seconds,s=l.timing,m=l.scanning,p=l.sensitivity;return(0,o.createComponentVNode)(2,c.Window,{width:250,height:185,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Button,{icon:m?"lock":"unlock",content:m?"Armed":"Not Armed",selected:m,onClick:function(){return i("scanning")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Detection Range",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:m,onClick:function(){return i("sense",{range:-1})}})," ",String(p).padStart(1,"1")," ",(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:m,onClick:function(){return i("sense",{range:1})}})]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Auto Arm",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"clock-o",content:s?"Stop":"Start",selected:s,disabled:m,onClick:function(){return i("time")}}),children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:m||s,onClick:function(){return i("input",{adjust:-30})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:m||s,onClick:function(){return i("input",{adjust:-1})}})," ",String(d).padStart(2,"0"),":",String(u).padStart(2,"0")," ",(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:m||s,onClick:function(){return i("input",{adjust:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:m||s,onClick:function(){return i("input",{adjust:30})}})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Radio=void 0;var o=n(0),r=n(14),a=n(9),c=n(2),i=n(1),l=n(36),d=n(3);t.Radio=function(e,t){var n=(0,c.useBackend)(t),u=n.act,s=n.data,m=s.freqlock,p=s.frequency,C=s.minFrequency,h=s.maxFrequency,N=s.listening,V=s.broadcasting,b=s.command,f=s.useCommand,g=s.subspace,v=s.subspaceSwitchable,k=l.RADIO_CHANNELS.find((function(e){return e.freq===p})),x=(0,r.map)((function(e,t){return{name:t,status:!!e}}))(s.channels),B=106;return g&&(x.length>0?B+=21*x.length+6:B+=24),(0,o.createComponentVNode)(2,d.Window,{width:360,height:B,children:(0,o.createComponentVNode)(2,d.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Frequency",children:[m&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"light-gray",children:(0,a.toFixed)(p/10,1)+" kHz"})||(0,o.createComponentVNode)(2,i.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:10,minValue:C/10,maxValue:h/10,value:p/10,format:function(e){return(0,a.toFixed)(e,1)},onDrag:function(e,t){return u("frequency",{adjust:t-p/10})}}),k&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:k.color,ml:2,children:["[",k.name,"]"]})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Audio",children:[(0,o.createComponentVNode)(2,i.Button,{textAlign:"center",width:"37px",icon:N?"volume-up":"volume-mute",selected:N,onClick:function(){return u("listen")}}),(0,o.createComponentVNode)(2,i.Button,{textAlign:"center",width:"37px",icon:V?"microphone":"microphone-slash",selected:V,onClick:function(){return u("broadcast")}}),!!b&&(0,o.createComponentVNode)(2,i.Button,{ml:1,icon:"bullhorn",selected:f,content:"High volume "+(f?"ON":"OFF"),onClick:function(){return u("command")}}),!!v&&(0,o.createComponentVNode)(2,i.Button,{ml:1,icon:"bullhorn",selected:g,content:"Subspace Tx "+(g?"ON":"OFF"),onClick:function(){return u("subspace")}})]}),!!g&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Channels",children:[0===x.length&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"bad",children:"No encryption keys installed."}),x.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{icon:e.status?"check-square-o":"square-o",selected:e.status,content:e.name,onClick:function(){return u("channel",{channel:e.name})}})},e.name)}))]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RadioactiveMicrolaser=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.RadioactiveMicrolaser=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.irradiate,u=l.stealth,s=l.scanmode,m=l.intensity,p=l.wavelength,C=l.on_cooldown,h=l.cooldown;return(0,o.createComponentVNode)(2,c.Window,{title:"Radioactive Microlaser",width:320,height:335,theme:"syndicate",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Laser Status",children:(0,o.createComponentVNode)(2,a.Box,{color:C?"average":"good",children:C?"Recharging":"Ready"})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Scanner Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Irradiation",children:(0,o.createComponentVNode)(2,a.Button,{icon:d?"power-off":"times",content:d?"On":"Off",selected:d,onClick:function(){return i("irradiate")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Stealth Mode",children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"eye-slash":"eye",content:u?"On":"Off",disabled:!d,selected:u,onClick:function(){return i("stealth")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Scan Mode",children:(0,o.createComponentVNode)(2,a.Button,{icon:s?"mortar-pestle":"heartbeat",content:s?"Scan Reagents":"Scan Health",disabled:d&&u,onClick:function(){return i("scanmode")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Laser Settings",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Intensity",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",onClick:function(){return i("radintensity",{adjust:-5})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",onClick:function(){return i("radintensity",{adjust:-1})}})," ",(0,o.createComponentVNode)(2,a.NumberInput,{value:Math.round(m),width:"40px",minValue:1,maxValue:20,onChange:function(e,t){return i("radintensity",{target:t})}})," ",(0,o.createComponentVNode)(2,a.Button,{icon:"forward",onClick:function(){return i("radintensity",{adjust:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",onClick:function(){return i("radintensity",{adjust:5})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Wavelength",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",onClick:function(){return i("radwavelength",{adjust:-5})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",onClick:function(){return i("radwavelength",{adjust:-1})}})," ",(0,o.createComponentVNode)(2,a.NumberInput,{value:Math.round(p),width:"40px",minValue:0,maxValue:120,onChange:function(e,t){return i("radwavelength",{target:t})}})," ",(0,o.createComponentVNode)(2,a.Button,{icon:"forward",onClick:function(){return i("radwavelength",{adjust:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",onClick:function(){return i("radwavelength",{adjust:5})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Laser Cooldown",children:(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,children:h})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RapidPipeDispenser=void 0;var o=n(0),r=n(6),a=n(2),c=n(1),i=n(3),l=["Atmospherics","Disposals","Transit Tubes"],d={Atmospherics:"wrench",Disposals:"trash-alt","Transit Tubes":"bus",Pipes:"grip-lines","Disposal Pipes":"grip-lines",Devices:"microchip","Heat Exchange":"thermometer-half","Station Equipment":"microchip"},u={grey:"#bbbbbb",amethyst:"#a365ff",blue:"#4466ff",brown:"#b26438",cyan:"#48eae8",dark:"#808080",green:"#1edd00",orange:"#ffa030",purple:"#b535ea",red:"#ff3333",violet:"#6e00f6",yellow:"#ffce26"},s=[{name:"Dispense",bitmask:1},{name:"Connect",bitmask:2},{name:"Destroy",bitmask:4},{name:"Paint",bitmask:8}];t.RapidPipeDispenser=function(e,t){var n=(0,a.useBackend)(t),m=n.act,p=n.data,C=p.category,h=p.categories,N=void 0===h?[]:h,V=p.selected_color,b=p.piping_layer,f=p.mode,g=p.preview_rows.flatMap((function(e){return e.previews})),v=(0,a.useLocalState)(t,"categoryName"),k=v[0],x=v[1],B=N.find((function(e){return e.cat_name===k}))||N[0];return(0,o.createComponentVNode)(2,i.Window,{width:425,height:515,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Category",children:l.map((function(e,t){return(0,o.createComponentVNode)(2,c.Button,{selected:C===t,icon:d[e],color:"transparent",content:e,onClick:function(){return m("category",{category:t})}},e)}))}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Modes",children:s.map((function(e){return(0,o.createComponentVNode)(2,c.Button.Checkbox,{checked:f&e.bitmask,content:e.name,onClick:function(){return m("mode",{mode:e.bitmask})}},e.bitmask)}))}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Color",children:[(0,o.createComponentVNode)(2,c.Box,{inline:!0,width:"64px",color:u[V],children:V}),Object.keys(u).map((function(e){return(0,o.createComponentVNode)(2,c.ColorBox,{ml:1,color:u[e],onClick:function(){return m("color",{paint_color:e})}},e)}))]})]})}),(0,o.createComponentVNode)(2,c.Flex,{m:-.5,children:[(0,o.createComponentVNode)(2,c.Flex.Item,{m:.5,children:(0,o.createComponentVNode)(2,c.Section,{children:[0===C&&(0,o.createComponentVNode)(2,c.Box,{mb:1,children:[1,2,3].map((function(e){return(0,o.createComponentVNode)(2,c.Button.Checkbox,{fluid:!0,checked:e===b,content:"Layer "+e,onClick:function(){return m("piping_layer",{piping_layer:e})}},e)}))}),(0,o.createComponentVNode)(2,c.Box,{width:"108px",children:g.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{title:e.dir_name,selected:e.selected,style:{width:"48px",height:"48px",padding:0},onClick:function(){return m("setdir",{dir:e.dir,flipped:e.flipped})},children:(0,o.createComponentVNode)(2,c.Box,{className:(0,r.classes)(["pipes32x32",e.dir+"-"+e.icon_state]),style:{transform:"scale(1.5) translate(17%, 17%)"}})},e.dir)}))})]})}),(0,o.createComponentVNode)(2,c.Flex.Item,{m:.5,grow:1,children:(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.Tabs,{children:N.map((function(e,t){return(0,o.createComponentVNode)(2,c.Tabs.Tab,{fluid:!0,icon:d[e.cat_name],selected:e.cat_name===B.cat_name,onClick:function(){return x(e.cat_name)},children:e.cat_name},e.cat_name)}))}),null==B?void 0:B.recipes.map((function(e){return(0,o.createComponentVNode)(2,c.Button.Checkbox,{fluid:!0,ellipsis:!0,checked:e.selected,content:e.pipe_name,title:e.pipe_name,onClick:function(){return m("pipe_type",{pipe_type:e.pipe_index,category:B.cat_name})}},e.pipe_index)}))]})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RemoteRobotControlContent=t.RemoteRobotControl=void 0;var o=n(0),r=n(19),a=n(2),c=n(1),i=n(3);t.RemoteRobotControl=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{title:"Remote Robot Control",width:500,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.robots,d=void 0===l?[]:l;return d.length?d.map((function(e){return(0,o.createComponentVNode)(2,c.Section,{title:e.name+" ("+e.model+")",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"tools",content:"Interface",onClick:function(){return i("interface",{ref:e.ref})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"phone-alt",content:"Call",onClick:function(){return i("callbot",{ref:e.ref})}})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:"Inactive"===(0,r.decodeHtmlEntities)(e.mode)?"bad":"Idle"===(0,r.decodeHtmlEntities)(e.mode)?"average":"good",children:(0,r.decodeHtmlEntities)(e.mode)})," ",e.hacked&&(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:"bad",children:"(HACKED)"})||""]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Location",children:e.location})]})},e.ref)})):(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.NoticeBox,{textAlign:"center",children:"No robots detected"})})};t.RemoteRobotControlContent=l},function(e,t,n){"use strict";t.__esModule=!0,t.RoboticsControlConsole=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.RoboticsControlConsole=function(e,t){var n=(0,r.useBackend)(t),d=(n.act,n.data),u=(0,r.useSharedState)(t,"tab",1),s=u[0],m=u[1],p=d.can_hack,C=d.can_convert,h=d.cyborgs,N=void 0===h?[]:h,V=d.drones,b=void 0===V?[]:V;return(0,o.createComponentVNode)(2,c.Window,{width:500,height:460,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{icon:"list",lineHeight:"23px",selected:1===s,onClick:function(){return m(1)},children:["Cyborgs (",N.length,")"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{icon:"list",lineHeight:"23px",selected:2===s,onClick:function(){return m(2)},children:["Drones (",b.length,")"]})]}),1===s&&(0,o.createComponentVNode)(2,i,{cyborgs:N,can_hack:p,can_convert:C}),2===s&&(0,o.createComponentVNode)(2,l,{drones:b})]})})};var i=function(e,t){var n=e.cyborgs,c=e.can_hack,i=e.can_convert,l=(0,r.useBackend)(t),d=l.act;l.data;return n.length?n.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createFragment)([!!c&&!e.emagged&&(0,o.createComponentVNode)(2,a.Button,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){return d("magbot",{ref:e.ref})}}),!!i&&!e.servant&&(0,o.createComponentVNode)(2,a.Button,{icon:"terminal",content:"Convert",color:"bad",onClick:function(){return d("convert",{ref:e.ref})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:e.locked_down?"unlock":"lock",color:e.locked_down?"good":"default",content:e.locked_down?"Release":"Lockdown",onClick:function(){return d("stopbot",{ref:e.ref})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"bomb",content:"Detonate",color:"bad",onClick:function(){return d("killbot",{ref:e.ref})}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Box,{color:e.status?"bad":e.locked_down?"average":"good",children:e.status?"Not Responding":e.locked_down?"Locked Down":"Nominal"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge",children:(0,o.createComponentVNode)(2,a.Box,{color:e.charge<=30?"bad":e.charge<=70?"average":"good",children:"number"==typeof e.charge?e.charge+"%":"Not Found"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Module",children:e.module}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Master AI",children:(0,o.createComponentVNode)(2,a.Box,{color:e.synchronization?"default":"average",children:e.synchronization||"None"})})]})},e.ref)})):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cyborg units detected within access parameters"})},l=function(e,t){var n=e.drones,c=(0,r.useBackend)(t).act;return n.length?n.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"bomb",content:"Detonate",color:"bad",onClick:function(){return c("killdrone",{ref:e.ref})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Box,{color:e.status?"bad":"good",children:e.status?"Not Responding":"Nominal"})})})},e.ref)})):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No drone units detected within access parameters"})}},function(e,t,n){"use strict";t.__esModule=!0,t.Roulette=t.RouletteBetTable=t.RouletteBoard=t.RouletteNumberButton=void 0;var o=n(0),r=n(6),a=n(2),c=n(1),i=n(3),l=function(e){if(0===e)return"green";for(var t=[[1,10],[19,28]],n=!0,o=0;o=r[0]&&e<=r[1]){n=!1;break}}var a=e%2==0;return(n?a:!a)?"red":"black"},d=function(e,t){var n=e.number,r=(0,a.useBackend)(t).act;return(0,o.createComponentVNode)(2,c.Button,{bold:!0,content:n,color:l(n),width:"40px",height:"28px",fontSize:"20px",textAlign:"center",mb:0,className:"Roulette__board-extrabutton",onClick:function(){return r("ChangeBetType",{type:n})}})};t.RouletteNumberButton=d;var u=function(e,t){var n=(0,a.useBackend)(t).act;return(0,o.createVNode)(1,"table","Table",[(0,o.createVNode)(1,"tr","Roulette__board-row",[(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{content:"0",color:"transparent",height:"88px",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:0})}}),2,{rowSpan:"3"}),[3,6,9,12,15,18,21,24,27,30,33,36].map((function(e){return(0,o.createVNode)(1,"td","Roulette__board-cell Table__cell-collapsing",(0,o.createComponentVNode)(2,d,{number:e}),2,null,e)})),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"2 to 1",color:"transparent",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"s3rd col"})}}),2)],0),(0,o.createVNode)(1,"tr",null,[[2,5,8,11,14,17,20,23,26,29,32,35].map((function(e){return(0,o.createVNode)(1,"td","Roulette__board-cell Table__cell-collapsing",(0,o.createComponentVNode)(2,d,{number:e}),2,null,e)})),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"2 to 1",color:"transparent",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"s2nd col"})}}),2)],0),(0,o.createVNode)(1,"tr",null,[[1,4,7,10,13,16,19,22,25,28,31,34].map((function(e){return(0,o.createVNode)(1,"td","Roulette__board-cell Table__cell-collapsing",(0,o.createComponentVNode)(2,d,{number:e}),2,null,e)})),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"2 to 1",color:"transparent",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"s1st col"})}}),2)],0),(0,o.createVNode)(1,"tr",null,[(0,o.createVNode)(1,"td"),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"1st 12",color:"transparent",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"s1-12"})}}),2,{colSpan:"4"}),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"2nd 12",color:"transparent",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"s13-24"})}}),2,{colSpan:"4"}),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"3rd 12",color:"transparent",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"s25-36"})}}),2,{colSpan:"4"})],4),(0,o.createVNode)(1,"tr",null,[(0,o.createVNode)(1,"td"),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"1-18",color:"transparent",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"s1-18"})}}),2,{colSpan:"2"}),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"Even",color:"transparent",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"even"})}}),2,{colSpan:"2"}),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"Black",color:"black",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"black"})}}),2,{colSpan:"2"}),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"Red",color:"red",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"red"})}}),2,{colSpan:"2"}),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"Odd",color:"transparent",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"odd"})}}),2,{colSpan:"2"}),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"19-36",color:"transparent",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"s19-36"})}}),2,{colSpan:"2"})],4)],4,{style:{width:"1px"}})};t.RouletteBoard=u;var s=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data,u=(0,a.useLocalState)(t,"customBet",500),s=u[0],m=u[1],p=d.BetType;return p.startsWith("s")&&(p=p.substring(1,p.length)),(0,o.createVNode)(1,"table","Roulette__lowertable",[(0,o.createVNode)(1,"tr",null,[(0,o.createVNode)(1,"th",(0,r.classes)(["Roulette","Roulette__lowertable--cell","Roulette__lowertable--header"]),"Last Spun:",16),(0,o.createVNode)(1,"th",(0,r.classes)(["Roulette","Roulette__lowertable--cell","Roulette__lowertable--header"]),"Current Bet:",16)],4),(0,o.createVNode)(1,"tr",null,[(0,o.createVNode)(1,"td",(0,r.classes)(["Roulette","Roulette__lowertable--cell","Roulette__lowertable--spinresult","Roulette__lowertable--spinresult-"+l(d.LastSpin)]),d.LastSpin,0),(0,o.createVNode)(1,"td",(0,r.classes)(["Roulette","Roulette__lowertable--cell","Roulette__lowertable--betscell"]),[(0,o.createComponentVNode)(2,c.Box,{bold:!0,mt:1,mb:1,fontSize:"25px",textAlign:"center",children:[d.BetAmount," cr on ",p]}),(0,o.createComponentVNode)(2,c.Box,{ml:1,mr:1,children:[(0,o.createComponentVNode)(2,c.Button,{fluid:!0,content:"Bet 10 cr",onClick:function(){return i("ChangeBetAmount",{amount:10})}}),(0,o.createComponentVNode)(2,c.Button,{fluid:!0,content:"Bet 50 cr",onClick:function(){return i("ChangeBetAmount",{amount:50})}}),(0,o.createComponentVNode)(2,c.Button,{fluid:!0,content:"Bet 100 cr",onClick:function(){return i("ChangeBetAmount",{amount:100})}}),(0,o.createComponentVNode)(2,c.Button,{fluid:!0,content:"Bet 500 cr",onClick:function(){return i("ChangeBetAmount",{amount:500})}}),(0,o.createComponentVNode)(2,c.Grid,{children:[(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,content:"Bet custom amount...",onClick:function(){return i("ChangeBetAmount",{amount:s})}})}),(0,o.createComponentVNode)(2,c.Grid.Column,{size:.1,children:(0,o.createComponentVNode)(2,c.NumberInput,{value:s,minValue:0,maxValue:1e3,step:10,stepPixelSize:4,width:"40px",onChange:function(e,t){return m(t)}})})]})]})],4)],4),(0,o.createVNode)(1,"tr",null,(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,c.Box,{bold:!0,m:1,fontSize:"14px",textAlign:"center",children:"Swipe an ID card with a connected account to spin!"}),2,{colSpan:"2"}),2),(0,o.createVNode)(1,"tr",null,[(0,o.createVNode)(1,"td","Roulette__lowertable--cell",[(0,o.createComponentVNode)(2,c.Box,{inline:!0,bold:!0,mr:1,children:"House Balance:"}),(0,o.createComponentVNode)(2,c.Box,{inline:!0,children:d.HouseBalance?d.HouseBalance+" cr":"None"})],4),(0,o.createVNode)(1,"td","Roulette__lowertable--cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,content:d.IsAnchored?"Bolted":"Unbolted",m:1,color:"transparent",textAlign:"center",onClick:function(){return i("anchor")}}),2)],4)],4)};t.RouletteBetTable=s;t.Roulette=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{width:603,height:475,theme:"cardtable",children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SatelliteControl=void 0;var o=n(0),r=n(2),a=n(1),c=n(198),i=n(3);t.SatelliteControl=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.satellites||[];return(0,o.createComponentVNode)(2,i.Window,{width:400,height:305,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[d.meteor_shield&&(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Coverage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.meteor_shield_coverage/d.meteor_shield_coverage_max,content:100*d.meteor_shield_coverage/d.meteor_shield_coverage_max+"%",ranges:{good:[1,Infinity],average:[.3,1],bad:[-Infinity,.3]}})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Satellite Controls",children:(0,o.createComponentVNode)(2,a.Box,{mr:-1,children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:e.active,content:"#"+e.id+" "+e.mode,onClick:function(){return l("toggle",{id:e.id})}},e.id)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ScannerGate=void 0;var o=n(0),r=n(2),a=n(1),c=n(64),i=n(3),l=["Positive","Harmless","Minor","Medium","Harmful","Dangerous","BIOHAZARD"],d=[{name:"Human",value:"human"},{name:"Lizardperson",value:"lizard"},{name:"Flyperson",value:"fly"},{name:"Felinid",value:"felinid"},{name:"Plasmaman",value:"plasma"},{name:"Mothperson",value:"moth"},{name:"Jellyperson",value:"jelly"},{name:"Podperson",value:"pod"},{name:"Golem",value:"golem"},{name:"Zombie",value:"zombie"}],u=[{name:"Starving",value:150},{name:"Obese",value:600}];t.ScannerGate=function(e,t){var n=(0,r.useBackend)(t),a=n.act,l=n.data;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:300,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.InterfaceLockNoticeBox,{onLockedStatusChange:function(){return a("toggle_lock")}}),!l.locked&&(0,o.createComponentVNode)(2,m)]})})};var s={Off:{title:"Scanner Mode: Off",component:function(){return p}},Wanted:{title:"Scanner Mode: Wanted",component:function(){return C}},Guns:{title:"Scanner Mode: Guns",component:function(){return h}},Mindshield:{title:"Scanner Mode: Mindshield",component:function(){return N}},Disease:{title:"Scanner Mode: Disease",component:function(){return V}},Species:{title:"Scanner Mode: Species",component:function(){return b}},Nutrition:{title:"Scanner Mode: Nutrition",component:function(){return f}},Nanites:{title:"Scanner Mode: Nanites",component:function(){return g}}},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.scan_mode,l=s[i]||s.off,d=l.component();return(0,o.createComponentVNode)(2,a.Section,{title:l.title,buttons:"Off"!==i&&(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"back",onClick:function(){return c("set_mode",{new_mode:"Off"})}}),children:(0,o.createComponentVNode)(2,d)})},p=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{mb:2,children:"Select a scanning mode below."}),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Wanted",onClick:function(){return n("set_mode",{new_mode:"Wanted"})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Guns",onClick:function(){return n("set_mode",{new_mode:"Guns"})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Mindshield",onClick:function(){return n("set_mode",{new_mode:"Mindshield"})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Disease",onClick:function(){return n("set_mode",{new_mode:"Disease"})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Species",onClick:function(){return n("set_mode",{new_mode:"Species"})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Nutrition",onClick:function(){return n("set_mode",{new_mode:"Nutrition"})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Nanites",onClick:function(){return n("set_mode",{new_mode:"Nanites"})}})]})],4)},C=function(e,t){var n=(0,r.useBackend)(t).data.reverse;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{mb:2,children:["Trigger if the person scanned ",n?"does not have":"has"," ","any warrants for their arrest."]}),(0,o.createComponentVNode)(2,v)],4)},h=function(e,t){var n=(0,r.useBackend)(t).data.reverse;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{mb:2,children:["Trigger if the person scanned ",n?"does not have":"has"," ","any guns."]}),(0,o.createComponentVNode)(2,v)],4)},N=function(e,t){var n=(0,r.useBackend)(t).data.reverse;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{mb:2,children:["Trigger if the person scanned ",n?"does not have":"has"," ","a mindshield."]}),(0,o.createComponentVNode)(2,v)],4)},V=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.reverse,u=i.disease_threshold;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{mb:2,children:["Trigger if the person scanned ",d?"does not have":"has"," ","a disease equal or worse than ",u,"."]}),(0,o.createComponentVNode)(2,a.Box,{mb:2,children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:e===u,content:e,onClick:function(){return c("set_disease_threshold",{new_threshold:e})}},e)}))}),(0,o.createComponentVNode)(2,v)],4)},b=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.reverse,u=i.target_species,s=d.find((function(e){return e.value===u}));return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{mb:2,children:["Trigger if the person scanned is ",l?"not":""," ","of the ",s.name," species.","zombie"===u&&" All zombie types will be detected, including dormant zombies."]}),(0,o.createComponentVNode)(2,a.Box,{mb:2,children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:e.value===u,content:e.name,onClick:function(){return c("set_target_species",{new_species:e.value})}},e.value)}))}),(0,o.createComponentVNode)(2,v)],4)},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.reverse,d=i.target_nutrition,s=u.find((function(e){return e.value===d}));return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{mb:2,children:["Trigger if the person scanned ",l?"does not have":"has"," ","the ",s.name," nutrition level."]}),(0,o.createComponentVNode)(2,a.Box,{mb:2,children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:e.value===d,content:e.name,onClick:function(){return c("set_target_nutrition",{new_nutrition:e.name})}},e.name)}))}),(0,o.createComponentVNode)(2,v)],4)},g=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.reverse,d=i.nanite_cloud;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{mb:2,children:["Trigger if the person scanned ",l?"does not have":"has"," ","nanite cloud ",d,"."]}),(0,o.createComponentVNode)(2,a.Box,{mb:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cloud ID",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:d,width:"65px",minValue:1,maxValue:100,stepPixelSize:2,onChange:function(e,t){return c("set_nanite_cloud",{new_cloud:t})}})})})}),(0,o.createComponentVNode)(2,v)],4)},v=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.reverse;return(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Scanning Mode",children:(0,o.createComponentVNode)(2,a.Button,{content:i?"Inverted":"Default",icon:i?"random":"long-arrow-alt-right",onClick:function(){return c("toggle_reverse")},color:i?"bad":"good"})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SeedExtractor=void 0;var o=n(0),r=n(14),a=n(30),c=n(19),i=n(2),l=n(1),d=n(3);t.SeedExtractor=function(e,t){var n,u,s=(0,i.useBackend)(t),m=s.act,p=s.data,C=(n=p.seeds,u=Object.keys(n).map((function(e){var t=function(e){var t,n=/([^;=]+)=([^;]+)/g,o={};do{(t=n.exec(e))&&(o[t[1]]=t[2]+"")}while(t);return o}(e);return t.amount=n[e],t.key=e,t.name=(0,c.toTitleCase)(t.name.replace("pack of ","")),t})),(0,a.flow)([(0,r.sortBy)((function(e){return e.name}))])(u));return(0,o.createComponentVNode)(2,d.Window,{width:1e3,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Stored seeds:",children:(0,o.createComponentVNode)(2,l.Table,{cellpadding:"3",textAlign:"center",children:[(0,o.createComponentVNode)(2,l.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Lifespan"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Endurance"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Maturation"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Production"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Yield"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Potency"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Instability"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Stock"})]}),C.map((function(e){return(0,o.createComponentVNode)(2,l.Table.Row,{children:[(0,o.createComponentVNode)(2,l.Table.Cell,{bold:!0,children:e.name}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:e.lifespan}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:e.endurance}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:e.maturation}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:e.production}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:e.yield}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:e.potency}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:e.instability}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:[(0,o.createComponentVNode)(2,l.Button,{content:"Vend",onClick:function(){return m("select",{item:e.key})}}),"(",e.amount," left)"]})]},e.key)}))]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleConsole=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.ShuttleConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.authorization_required;return(0,o.createComponentVNode)(2,c.Window,{width:350,height:230,children:[!!l&&(0,o.createComponentVNode)(2,a.Modal,{ml:1,mt:1,width:26,height:12,fontSize:"28px",fontFamily:"monospace",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mt:2,children:(0,o.createComponentVNode)(2,a.Icon,{name:"minus-circle"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mt:2,ml:2,color:"bad",children:"SHUTTLE LOCKED"})]}),(0,o.createComponentVNode)(2,a.Box,{fontSize:"18px",mt:4,children:(0,o.createComponentVNode)(2,a.Button,{lineHeight:"40px",icon:"arrow-circle-right",content:"Request Authorization",color:"bad",onClick:function(){return i("request")}})})]}),(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,d)})]})};var i=function(e,t){var n;return null==e||null==(n=e.find((function(e){return e.id===t})))?void 0:n.name},l=function(e,t){var n;return null==e||null==(n=e.find((function(e){return e.name===t})))?void 0:n.id},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,u=d.status,s=d.locked,m=d.authorization_required,p=d.destination,C=d.docked_location,h=d.timer_str,N=d.locations,V=void 0===N?[]:N;return(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,fontSize:"26px",textAlign:"center",fontFamily:"monospace",children:h||"00:00"}),(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",fontSize:"14px",mb:1,children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,children:"STATUS:"}),(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"In Transit"===u?"good":"Idle"===u||"Igniting"===u?"average":"bad",ml:1,children:u||"Not Available"})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Shuttle Controls",level:2,children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:C||"Not Available"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destination",children:0===V.length&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Not Available"})||1===V.length&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:i(V,p)})||(0,o.createComponentVNode)(2,a.Dropdown,{over:!0,width:"240px",options:V.map((function(e){return e.name})),disabled:s||m,selected:i(V,p)||"Select a Destination",onSelected:function(e){return c("set_destination",{destination:l(V,e)})}})})]}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Depart",disabled:!i(V,p)||s||m,mt:1.5,icon:"arrow-up",textAlign:"center",onClick:function(){return c("move",{shuttle_id:p})}})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleManipulatorModification=t.ShuttleManipulatorTemplates=t.ShuttleManipulatorStatus=t.ShuttleManipulator=void 0;var o=n(0),r=n(14),a=n(2),c=n(1),i=n(3);t.ShuttleManipulator=function(e,t){var n=(0,a.useLocalState)(t,"tab",1),r=n[0],s=n[1];return(0,o.createComponentVNode)(2,i.Window,{title:"Shuttle Manipulator",width:800,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===r,onClick:function(){return s(1)},children:"Status"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===r,onClick:function(){return s(2)},children:"Templates"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:3===r,onClick:function(){return s(3)},children:"Modification"})]}),1===r&&(0,o.createComponentVNode)(2,l),2===r&&(0,o.createComponentVNode)(2,d),3===r&&(0,o.createComponentVNode)(2,u)]})})};var l=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.shuttles||[];return(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.Table,{children:i.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{content:"JMP",onClick:function(){return r("jump_to",{type:"mobile",id:e.id})}},e.id)}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{content:"Fly",disabled:!e.can_fly,onClick:function(){return r("fly",{id:e.id})}},e.id)}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.status}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:[e.mode,!!e.timer&&(0,o.createFragment)([(0,o.createTextVNode)("("),e.timeleft,(0,o.createTextVNode)(")"),(0,o.createComponentVNode)(2,c.Button,{content:"Fast Travel",disabled:!e.can_fast_travel,onClick:function(){return r("fast_travel",{id:e.id})}},e.id)],0)]})]},e.id)}))})})};t.ShuttleManipulatorStatus=l;var d=function(e,t){var n,i=(0,a.useBackend)(t),l=i.act,d=i.data,u=d.templates||{},s=d.selected||{},m=(0,a.useLocalState)(t,"templateId",Object.keys(u)[0]),p=m[0],C=m[1],h=null==(n=u[p])?void 0:n.templates;return(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Tabs,{vertical:!0,children:(0,r.map)((function(e,t){return(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:p===t,onClick:function(){return C(t)},children:e.port_id},t)}))(u)})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,basis:0,children:h.map((function(e){var t=e.shuttle_id===s.shuttle_id;return(0,o.createComponentVNode)(2,c.Section,{title:e.name,level:2,buttons:(0,o.createComponentVNode)(2,c.Button,{content:t?"Selected":"Select",selected:t,onClick:function(){return l("select_template",{shuttle_id:e.shuttle_id})}}),children:(!!e.description||!!e.admin_notes)&&(0,o.createComponentVNode)(2,c.LabeledList,{children:[!!e.description&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description",children:e.description}),!!e.admin_notes&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Admin Notes",children:e.admin_notes})]})},e.shuttle_id)}))})]})})};t.ShuttleManipulatorTemplates=d;var u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.selected||{},d=i.existing_shuttle||{};return(0,o.createComponentVNode)(2,c.Section,{children:l?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{level:2,title:l.name,children:(!!l.description||!!l.admin_notes)&&(0,o.createComponentVNode)(2,c.LabeledList,{children:[!!l.description&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description",children:l.description}),!!l.admin_notes&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Admin Notes",children:l.admin_notes})]})}),d?(0,o.createComponentVNode)(2,c.Section,{level:2,title:"Existing Shuttle: "+d.name,children:(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",buttons:(0,o.createComponentVNode)(2,c.Button,{content:"Jump To",onClick:function(){return r("jump_to",{type:"mobile",id:d.id})}}),children:[d.status,!!d.timer&&(0,o.createFragment)([(0,o.createTextVNode)("("),d.timeleft,(0,o.createTextVNode)(")")],0)]})})}):(0,o.createComponentVNode)(2,c.Section,{level:2,title:"Existing Shuttle: None"}),(0,o.createComponentVNode)(2,c.Section,{level:2,title:"Status",children:[(0,o.createComponentVNode)(2,c.Button,{content:"Preview",onClick:function(){return r("preview",{shuttle_id:l.shuttle_id})}}),(0,o.createComponentVNode)(2,c.Button,{content:"Load",color:"bad",onClick:function(){return r("load",{shuttle_id:l.shuttle_id})}})]})],0):"No shuttle selected"})};t.ShuttleManipulatorModification=u},function(e,t,n){"use strict";t.__esModule=!0,t.Signaler=void 0;var o=n(0),r=n(9),a=n(2),c=n(1),i=n(3);t.Signaler=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.code,s=d.frequency,m=d.minFrequency,p=d.maxFrequency;return(0,o.createComponentVNode)(2,i.Window,{width:280,height:132,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.Grid,{children:[(0,o.createComponentVNode)(2,c.Grid.Column,{size:1.4,color:"label",children:"Frequency:"}),(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:m/10,maxValue:p/10,value:s/10,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onDrag:function(e,t){return l("freq",{freq:t})}})}),(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.Button,{ml:1.3,icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"freq"})}})})]}),(0,o.createComponentVNode)(2,c.Grid,{mt:.6,children:[(0,o.createComponentVNode)(2,c.Grid.Column,{size:1.4,color:"label",children:"Code:"}),(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:u,width:"80px",onDrag:function(e,t){return l("code",{code:t})}})}),(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.Button,{ml:1.3,icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"code"})}})})]}),(0,o.createComponentVNode)(2,c.Grid,{mt:.8,children:(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.Button,{mb:-.1,fluid:!0,icon:"arrow-up",content:"Send Signal",textAlign:"center",onClick:function(){return l("signal")}})})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SkillPanel=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i={color:"lightgreen",fontWeight:"bold"},l={color:"#FFDB58",fontWeight:"bold"};t.SkillPanel=function(e,t){var n=(0,r.useBackend)(t),u=n.act,s=n.data,m=s.skills||[];return(0,o.createComponentVNode)(2,c.Window,{title:"Manage Skills",width:600,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:m.playername,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:m.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[(0,o.createVNode)(1,"span",null,e.desc,0,{style:l}),(0,o.createVNode)(1,"br"),!!e.level_based&&(0,o.createFragment)([(0,o.createComponentVNode)(2,d,{skill_lvl_num:e.lvl_base_num,skill_lvl:e.lvl_base}),(0,o.createVNode)(1,"br")],4),"Total Experience: [",e.value_base," XP]",(0,o.createVNode)(1,"br"),"XP To Next Level:",e.level_based?(0,o.createVNode)(1,"span",null,e.xp_next_lvl_base,0):(0,o.createVNode)(1,"span",null,"[MAXXED]",16,{style:i}),(0,o.createVNode)(1,"br"),e.base_readout,(0,o.createComponentVNode)(2,a.ProgressBar,{value:e.percent_base,color:"good"}),(0,o.createVNode)(1,"br"),!!s.admin&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Adjust Exp",onClick:function(){return u("adj_exp",{skill:e.path})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Set Exp",onClick:function(){return u("set_exp",{skill:e.path})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Set Level",onClick:function(){return u("set_lvl",{skill:e.path})}}),(0,o.createVNode)(1,"br"),(0,o.createVNode)(1,"br")],4)]},e.name)}))})})})})};var d=function(e){var t=e.skill_lvl_num,n=e.skill_lvl;return(0,o.createComponentVNode)(2,a.Box,{inline:!0,children:["Level: [",(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,textColor:"hsl("+50*t+", 50%, 50%)",children:n}),"]"]})}},function(e,t,n){"use strict";t.__esModule=!0,t.SkillStation=t.TimeFormat=t.ImplantedSkillchips=t.InsertedSkillchip=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=n(9),l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.skillchip_ready,d=i.slot_use,u=i.slots_used,s=i.slots_max,m=i.implantable_reason,p=i.implantable,C=i.complexity,h=i.skill_name,N=i.skill_desc,V=i.skill_icon,b=i.working;return l?(0,o.createComponentVNode)(2,a.Section,{title:"Inserted Skillchip",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"syringe",disabled:!p||!!b,color:p?"good":"default",onClick:function(){return c("implant")},content:"Implant",tooltip:m}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",disabled:!!b,onClick:function(){return c("eject")},content:"Eject"})],4),children:(0,o.createComponentVNode)(2,a.Flex,{spacing:2,height:"100%",width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{height:"100%",align:"center",children:(0,o.createComponentVNode)(2,a.Icon,{size:3,name:V})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Skillchip",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:h})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:(0,o.createComponentVNode)(2,a.Box,{italic:!0,children:N})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Complexity",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"brain",width:"15px",textAlign:"center"})," ",C]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Slot Size",children:(0,o.createComponentVNode)(2,a.Box,{color:u+d>s&&"red",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"save",width:"15px",textAlign:"center"})," ",d]})}),!!m&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Error",color:p?"good":"bad",children:m})]})})]})}):!b&&(0,o.createComponentVNode)(2,a.NoticeBox,{info:!0,children:"Please insert a skillchip."})};t.InsertedSkillchip=l;var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.slots_used,d=i.slots_max,u=i.complexity_used,s=i.complexity_max,m=i.working,p=i.current||[];return(0,o.createComponentVNode)(2,a.Section,{title:"Implanted Skillchips",children:[!p.length&&"No skillchips detected.",!!p.length&&(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Chip"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"brain",tooltip:"Complexity",tooltipPosition:"top",content:u+"/"+s})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"save",tooltip:"Slot Size",tooltipPosition:"top",content:l+"/"+d})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"check",tooltip:"Is Active",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"hourglass-half",tooltip:"Cooldown",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"tasks",tooltip:"Actions",tooltipPosition:"top"})})]}),p.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Icon,{textAlign:"center",width:"18px",mr:1,name:e.icon}),e.name]}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,color:(!e.active?e.complexity+u>s&&"bad":"good")||"grey",textAlign:"center",children:e.complexity}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,color:"good",textAlign:"center",children:e.slot_use}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Icon,{name:e.active?"check":"times",color:e.active?"good":"bad"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.cooldown>0&&Math.ceil(e.cooldown/10)+"s"||"0s"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("remove",{ref:e.ref})},icon:e.removable?"eject":"trash",color:e.removable?"good":"bad",tooltip:e.removable?"Extract":"Destroy",tooltipPosition:"left",disabled:e.cooldown||m}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("toggle_activate",{ref:e.ref})},icon:e.active?"check-square-o":"square-o",color:e.active?"good":"default",tooltip:!!e.active_error&&!e.active&&e.active_error||e.active&&"Deactivate"||"Activate",tooltipPosition:"left",disabled:e.cooldown||m||!e.active&&e.complexity+u>s})]})]},e.ref)}))]})]})};t.ImplantedSkillchips=d;var u=function(e,t){var n=e.value,o=(0,i.toFixed)(Math.floor(n/10%60)).padStart(2,"0"),r=(0,i.toFixed)(Math.floor(n/600%60)).padStart(2,"0");return(0,i.toFixed)(Math.floor(n/36e3%24)).padStart(2,"0")+":"+r+":"+o};t.TimeFormat=u;t.SkillStation=function(e,t){var n=(0,r.useBackend)(t).data,i=n.working,s=n.timeleft,m=n.error;return(0,o.createComponentVNode)(2,c.Window,{title:"Skillsoft Station",width:500,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[!!m&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:m}),!!i&&(0,o.createComponentVNode)(2,a.NoticeBox,{danger:!0,children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mb:.5,children:"Operation in progress. Please do not leave the chamber."}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:["Time Left: ",(0,o.createComponentVNode)(2,u,{value:s})]})]})}),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,d)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Sleeper=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=[{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"},{label:"Toxin",type:"toxLoss"},{label:"Oxygen",type:"oxyLoss"}];t.Sleeper=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.open,s=d.occupant,m=void 0===s?{}:s,p=d.occupied,C=(d.chems||[]).sort((function(e,t){var n=e.name.toLowerCase(),o=t.name.toLowerCase();return no?1:0}));return(0,o.createComponentVNode)(2,c.Window,{width:310,height:465,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:m.name?m.name:"No Occupant",minHeight:"210px",buttons:!!m.stat&&(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,color:m.statstate,children:m.stat}),children:!!p&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.ProgressBar,{value:m.health,minValue:m.minHealth,maxValue:m.maxHealth,ranges:{good:[50,Infinity],average:[0,50],bad:[-Infinity,0]}}),(0,o.createComponentVNode)(2,a.Box,{mt:1}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[i.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:m.is_robotic_organism&&"Toxin"===e.label?"Corruption":e.label,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:m[e.type],minValue:0,maxValue:m.maxHealth,color:"bad"})},e.type)})),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cells",color:m.cloneLoss?"bad":"good",children:m.cloneLoss?"Damaged":"Healthy"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brain",color:m.brainLoss?"bad":"good",children:m.brainLoss?"Abnormal":"Healthy"})]})],4)}),(0,o.createComponentVNode)(2,a.Section,{title:"Medicines",minHeight:"205px",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"door-open":"door-closed",content:u?"Open":"Closed",onClick:function(){return l("door")}}),children:C.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:"flask",content:e.name,disabled:!p||!e.allowed,width:"140px",onClick:function(){return l("inject",{chem:e.id})}},e.name)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SlimeBodySwapper=t.BodyEntry=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i={Dead:"bad",Unconscious:"average",Conscious:"good"},l={owner:"You Are Here",stranger:"Occupied",available:"Swap"},d=function(e,t){var n=e.body,r=e.swapFunc;return(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:n.htmlcolor,children:n.name}),level:2,buttons:(0,o.createComponentVNode)(2,a.Button,{content:l[n.occupied],selected:"owner"===n.occupied,color:"stranger"===n.occupied&&"bad",onClick:function(){return r()}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",bold:!0,color:i[n.status],children:n.status}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Jelly",children:n.exoticblood}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:n.area})]})})};t.BodyEntry=d;t.SlimeBodySwapper=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.bodies,u=void 0===l?[]:l;return(0,o.createComponentVNode)(2,c.Window,{width:400,height:400,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{children:u.map((function(e){return(0,o.createComponentVNode)(2,d,{body:e,swapFunc:function(){return i("swap",{ref:e.ref})}},e.name)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SmartVend=void 0;var o=n(0),r=n(14),a=n(2),c=n(1),i=n(3);t.SmartVend=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,i.Window,{width:440,height:550,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.Section,{title:"Storage",buttons:!!d.isdryer&&(0,o.createComponentVNode)(2,c.Button,{icon:d.drying?"stop":"tint",onClick:function(){return l("Dry")},children:d.drying?"Stop drying":"Dry"}),children:0===d.contents.length&&(0,o.createComponentVNode)(2,c.NoticeBox,{children:["Unfortunately, this ",d.name," is empty."]})||(0,o.createComponentVNode)(2,c.Table,{children:[(0,o.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Item"}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,textAlign:"center",children:d.verb?d.verb:"Dispense"})]}),(0,r.map)((function(e,t){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,textAlign:"right",children:e.amount}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,children:[(0,o.createComponentVNode)(2,c.Button,{content:"One",disabled:e.amount<1,onClick:function(){return l("Release",{name:e.name,amount:1})}}),(0,o.createComponentVNode)(2,c.Button,{content:"Many",disabled:e.amount<=1,onClick:function(){return l("Release",{name:e.name})}})]})]},t)}))(d.contents)]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Smes=void 0;var o=n(0),r=n(2),a=n(1),c=n(39),i=n(3);t.Smes=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.capacityPercent,s=(d.capacity,d.charge),m=d.inputAttempt,p=d.inputting,C=d.inputLevel,h=d.inputLevelMax,N=d.inputAvailable,V=d.outputAttempt,b=d.outputting,f=d.outputLevel,g=d.outputLevelMax,v=d.outputUsed,k=(u>=100?"good":p&&"average")||"bad",x=(b?"good":s>0&&"average")||"bad";return(0,o.createComponentVNode)(2,i.Window,{width:340,height:350,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:.01*u,ranges:{good:[.5,Infinity],average:[.15,.5],bad:[-Infinity,.15]}})}),(0,o.createComponentVNode)(2,a.Section,{title:"Input",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:m?"sync-alt":"times",selected:m,onClick:function(){return l("tryinput")},children:m?"Auto":"Off"}),children:(0,o.createComponentVNode)(2,a.Box,{color:k,children:(u>=100?"Fully Charged":p&&"Charging")||"Not Charging"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Input",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===C,onClick:function(){return l("input",{target:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===C,onClick:function(){return l("input",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:C/1e3,fillValue:N/1e3,minValue:0,maxValue:h/1e3,step:5,stepPixelSize:4,format:function(e){return(0,c.formatPower)(1e3*e,1)},onDrag:function(e,t){return l("input",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:C===h,onClick:function(){return l("input",{adjust:1e4})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:C===h,onClick:function(){return l("input",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available",children:(0,c.formatPower)(N)})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Output",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output Mode",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:V?"power-off":"times",selected:V,onClick:function(){return l("tryoutput")},children:V?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.Box,{color:x,children:b?"Sending":s>0?"Not Sending":"No Charge"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Output",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===f,onClick:function(){return l("output",{target:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===f,onClick:function(){return l("output",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:f/1e3,minValue:0,maxValue:g/1e3,step:5,stepPixelSize:4,format:function(e){return(0,c.formatPower)(1e3*e,1)},onDrag:function(e,t){return l("output",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:f===g,onClick:function(){return l("output",{adjust:1e4})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:f===g,onClick:function(){return l("output",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Outputting",children:(0,c.formatPower)(v)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SmokeMachine=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.SmokeMachine=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.TankContents,u=(l.isTankLoaded,l.TankCurrentVolume),s=l.TankMaxVolume,m=l.active,p=l.setting,C=(l.screen,l.maxSetting),h=void 0===C?[]:C;return(0,o.createComponentVNode)(2,c.Window,{width:350,height:350,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Dispersal Tank",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:m?"power-off":"times",selected:m,content:m?"On":"Off",onClick:function(){return i("power")}}),children:[(0,o.createComponentVNode)(2,a.ProgressBar,{value:u/s,ranges:{bad:[-Infinity,.3]},children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{initial:0,value:u||0})," / "+s]}),(0,o.createComponentVNode)(2,a.Box,{mt:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Range",children:[1,2,3,4,5].map((function(e){return(0,o.createComponentVNode)(2,a.Button,{selected:p===e,icon:"plus",content:3*e,disabled:h0?"good":"bad",children:h})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{size:1.5,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power output",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.66,Infinity],average:[.33,.66],bad:[-Infinity,.33]},minValue:0,maxValue:1,value:u,children:d+" W"})})})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracking",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Off",selected:0===C,onClick:function(){return i("tracking",{mode:0})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"clock-o",content:"Timed",selected:1===C,onClick:function(){return i("tracking",{mode:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Auto",selected:2===C,disabled:!N,onClick:function(){return i("tracking",{mode:2})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Azimuth",children:[(0===C||1===C)&&(0,o.createComponentVNode)(2,a.NumberInput,{width:"52px",unit:"\xb0",step:1,stepPixelSize:2,minValue:-360,maxValue:720,value:s,onDrag:function(e,t){return i("azimuth",{value:t})}}),1===C&&(0,o.createComponentVNode)(2,a.NumberInput,{width:"80px",unit:"\xb0/m",step:.01,stepPixelSize:1,minValue:-p-.01,maxValue:p+.01,value:m,format:function(e){return(Math.sign(e)>0?"+":"-")+Math.abs(e)},onDrag:function(e,t){return i("azimuth_rate",{value:t})}}),2===C&&(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mt:"3px",children:[s+" \xb0"," (auto)"]})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SpaceHeater=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.SpaceHeater=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:400,height:305,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Power",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject Cell",disabled:!l.hasPowercell||!l.open,onClick:function(){return i("eject")}}),(0,o.createComponentVNode)(2,a.Button,{icon:l.on?"power-off":"times",content:l.on?"On":"Off",selected:l.on,disabled:!l.hasPowercell,onClick:function(){return i("power")}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell",color:!l.hasPowercell&&"bad",children:l.hasPowercell&&(0,o.createComponentVNode)(2,a.ProgressBar,{value:l.powerLevel/100,ranges:{good:[.6,Infinity],average:[.3,.6],bad:[-Infinity,.3]},children:l.powerLevel+"%"})||"None"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Thermostat",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Temperature",children:(0,o.createComponentVNode)(2,a.Box,{fontSize:"18px",color:Math.abs(l.targetTemp-l.currentTemp)>50?"bad":Math.abs(l.targetTemp-l.currentTemp)>20?"average":"good",children:[l.currentTemp,"\xb0C"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Temperature",children:l.open&&(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(l.targetTemp),width:"65px",unit:"\xb0C",minValue:l.minTemp,maxValue:l.maxTemp,onChange:function(e,t){return i("target",{target:t})}})||l.targetTemp+"\xb0C"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mode",children:l.open?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"thermometer-half",content:"Auto",selected:"auto"===l.mode,onClick:function(){return i("mode",{mode:"auto"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fire-alt",content:"Heat",selected:"heat"===l.mode,onClick:function(){return i("mode",{mode:"heat"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fan",content:"Cool",selected:"cool"===l.mode,onClick:function(){return i("mode",{mode:"cool"})}})],4):"Auto"}),(0,o.createComponentVNode)(2,a.LabeledList.Divider)]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SpawnersMenu=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.SpawnersMenu=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.spawners||[];return(0,o.createComponentVNode)(2,c.Window,{title:"Spawners Menu",width:700,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name+" ("+e.amount_left+" left)",level:2,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Jump",onClick:function(){return i("jump",{name:e.name})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Spawn",onClick:function(){return i("spawn",{name:e.name})}})],4),children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,mb:1,fontSize:"20px",children:e.short_desc}),(0,o.createComponentVNode)(2,a.Box,{children:e.flavor_text}),!!e.important_info&&(0,o.createComponentVNode)(2,a.Box,{mt:1,bold:!0,color:"bad",fontSize:"26px",children:e.important_info})]},e.name)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SuitStorageUnit=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.SuitStorageUnit=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.locked,u=l.open,s=l.safeties,m=l.uv_active,p=l.occupied,C=l.suit,h=l.helmet,N=l.mask,V=l.storage;return(0,o.createComponentVNode)(2,c.Window,{width:400,height:305,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[!(!p||!s)&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Biological entity detected in suit chamber. Please remove before continuing with operation."}),m&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Contents are currently being decontaminated. Please wait."})||(0,o.createComponentVNode)(2,a.Section,{title:"Storage",minHeight:"260px",buttons:(0,o.createFragment)([!u&&(0,o.createComponentVNode)(2,a.Button,{icon:d?"unlock":"lock",content:d?"Unlock":"Lock",onClick:function(){return i("lock")}}),!d&&(0,o.createComponentVNode)(2,a.Button,{icon:u?"sign-out-alt":"sign-in-alt",content:u?"Close":"Open",onClick:function(){return i("door")}})],0),children:d&&(0,o.createComponentVNode)(2,a.Box,{mt:6,bold:!0,textAlign:"center",fontSize:"40px",children:[(0,o.createComponentVNode)(2,a.Box,{children:"Unit Locked"}),(0,o.createComponentVNode)(2,a.Icon,{name:"lock"})]})||u&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Helmet",children:(0,o.createComponentVNode)(2,a.Button,{icon:h?"square":"square-o",content:h||"Empty",disabled:!h,onClick:function(){return i("dispense",{item:"helmet"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Suit",children:(0,o.createComponentVNode)(2,a.Button,{icon:C?"square":"square-o",content:C||"Empty",disabled:!C,onClick:function(){return i("dispense",{item:"suit"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mask",children:(0,o.createComponentVNode)(2,a.Button,{icon:N?"square":"square-o",content:N||"Empty",disabled:!N,onClick:function(){return i("dispense",{item:"mask"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Storage",children:(0,o.createComponentVNode)(2,a.Button,{icon:V?"square":"square-o",content:V||"Empty",disabled:!V,onClick:function(){return i("dispense",{item:"storage"})}})})]})||(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"recycle",content:"Decontaminate",disabled:p&&s,textAlign:"center",onClick:function(){return i("uv")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SyndPane=t.StatusPane=t.SyndContractorContent=t.SyndContractor=t.FakeTerminal=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);var i=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={currentIndex:0,currentDisplay:[]},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var c=r.prototype;return c.tick=function(){var e=this.props,t=this.state;t.currentIndex<=e.allMessages.length?(this.setState((function(e){return{currentIndex:e.currentIndex+1}})),t.currentDisplay.push(e.allMessages[t.currentIndex])):(clearTimeout(this.timer),setTimeout(e.onFinished,e.finishedTimeout))},c.componentDidMount=function(){var e=this,t=this.props.linesPerSecond,n=void 0===t?2.5:t;this.timer=setInterval((function(){return e.tick()}),1e3/n)},c.componentWillUnmount=function(){clearTimeout(this.timer)},c.render=function(){return(0,o.createComponentVNode)(2,a.Box,{m:1,children:this.state.currentDisplay.map((function(e){return(0,o.createFragment)([e,(0,o.createVNode)(1,"br")],0,e)}))})},r}(o.Component);t.FakeTerminal=i;t.SyndContractor=function(e,t){return(0,o.createComponentVNode)(2,c.NtosWindow,{width:500,height:600,theme:"syndicate",resizable:!0,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.data,l=n.act,d=["Recording biometric data...","Analyzing embedded syndicate info...","STATUS CONFIRMED","Contacting syndicate database...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Response received, ack 4851234...","CONFIRM ACC "+Math.round(2e4*Math.random()),"Setting up private accounts...","CONTRACTOR ACCOUNT CREATED","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","CONTRACTS FOUND","WELCOME, AGENT"],s=!!c.error&&(0,o.createComponentVNode)(2,a.Modal,{backgroundColor:"red",children:(0,o.createComponentVNode)(2,a.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:2,children:(0,o.createComponentVNode)(2,a.Icon,{size:4,name:"exclamation-triangle"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:2,grow:1,textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Box,{width:"260px",textAlign:"left",minHeight:"80px",children:c.error}),(0,o.createComponentVNode)(2,a.Button,{content:"Dismiss",onClick:function(){return l("PRG_clear_error")}})]})]})});return c.logged_in?c.logged_in&&c.first_load?(0,o.createComponentVNode)(2,a.Box,{backgroundColor:"rgba(0, 0, 0, 0.8)",minHeight:"525px",children:(0,o.createComponentVNode)(2,i,{allMessages:d,finishedTimeout:3e3,onFinished:function(){return l("PRG_set_first_load_finished")}})}):c.info_screen?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{backgroundColor:"rgba(0, 0, 0, 0.8)",minHeight:"500px",children:(0,o.createComponentVNode)(2,i,{allMessages:["SyndTract v2.0","","We've identified potentional high-value targets that are","currently assigned to your mission area. They are believed","to hold valuable information which could be of immediate","importance to our organisation.","","Listed below are all of the contracts available to you. You","are to bring the specified target to the designated","drop-off, and contact us via this uplink. We will send","a specialised extraction unit to put the body into.","","We want targets alive - but we will sometimes pay slight","amounts if they're not, you just won't recieve the shown","bonus. You can redeem your payment through this uplink in","the form of raw telecrystals, which can be put into your","regular Syndicate uplink to purchase whatever you may need.","We provide you with these crystals the moment you send the","target up to us, which can be collected at anytime through","this system.","","Targets extracted will be ransomed back to the station once","their use to us is fulfilled, with us providing you a small","percentage cut. You may want to be mindful of them","identifying you when they come back. We provide you with","a standard contractor loadout, which will help cover your","identity."],linesPerSecond:10})}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"CONTINUE",color:"transparent",textAlign:"center",onClick:function(){return l("PRG_toggle_info")}})],4):(0,o.createFragment)([s,(0,o.createComponentVNode)(2,u)],0):(0,o.createComponentVNode)(2,a.Section,{minHeight:"525px",children:[(0,o.createComponentVNode)(2,a.Box,{width:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{content:"REGISTER USER",color:"transparent",onClick:function(){return l("PRG_login")}})}),!!c.error&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:c.error})]})};t.SyndContractorContent=l;var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createFragment)([(0,o.createTextVNode)("Contractor Status"),(0,o.createComponentVNode)(2,a.Button,{content:"View Information Again",color:"transparent",mb:0,ml:1,onClick:function(){return c("PRG_toggle_info")}})],4),buttons:(0,o.createComponentVNode)(2,a.Box,{bold:!0,mr:1,children:[i.contract_rep," Rep"]}),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{size:.85,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"TC Available",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Claim",disabled:i.redeemable_tc<=0,onClick:function(){return c("PRG_redeem_TC")}}),children:i.redeemable_tc}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"TC Earned",children:i.earned_tc})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Contracts Completed",children:i.contracts_completed}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Status",children:"ACTIVE"})]})})]})})};t.StatusPane=d;var u=function(e,t){var n=(0,r.useLocalState)(t,"tab",1),c=n[0],i=n[1];return(0,o.createFragment)([(0,o.createComponentVNode)(2,d,{state:e.state}),(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===c,onClick:function(){return i(1)},children:"Contracts"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===c,onClick:function(){return i(2)},children:"Hub"})]}),1===c&&(0,o.createComponentVNode)(2,s),2===c&&(0,o.createComponentVNode)(2,m)],0)};t.SyndPane=u;var s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.contracts||[];return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Available Contracts",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Call Extraction",disabled:!i.ongoing_contract||i.extraction_enroute,onClick:function(){return c("PRG_call_extraction")}}),children:l.map((function(e){if(!i.ongoing_contract||2===e.status){var t=e.status>1;if(!(e.status>=5))return(0,o.createComponentVNode)(2,a.Section,{title:e.target?e.target+" ("+e.target_rank+")":"Invalid Target",level:t?1:2,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,mr:1,children:[e.payout," (+",e.payout_bonus,") TC"]}),(0,o.createComponentVNode)(2,a.Button,{content:t?"Abort":"Accept",disabled:e.extraction_enroute,color:t&&"bad",onClick:function(){return c("PRG_contract"+(t?"_abort":"-accept"),{contract_id:e.id})}})],4),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:e.message}),(0,o.createComponentVNode)(2,a.Grid.Column,{size:.5,children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,mb:1,children:"Dropoff Location:"}),(0,o.createComponentVNode)(2,a.Box,{children:e.dropoff})]})]})},e.target)}}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Dropoff Locator",textAlign:"center",opacity:i.ongoing_contract?100:0,children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:i.dropoff_direction})})],4)},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.contractor_hub_items||[];return(0,o.createComponentVNode)(2,a.Section,{children:l.map((function(e){var t=e.cost?e.cost+" Rep":"FREE",n=-1!==e.limited;return(0,o.createComponentVNode)(2,a.Section,{title:e.name+" - "+t,level:2,buttons:(0,o.createFragment)([n&&(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,mr:1,children:[e.limited," remaining"]}),(0,o.createComponentVNode)(2,a.Button,{content:"Purchase",disabled:i.contract_repl.user.cash),content:h?"FREE":d.price+" cr",onClick:function(){return i("vend",{ref:d.ref})}})})]})};t.Vending=function(e,t){var n,r=(0,a.useBackend)(t),d=(r.act,r.data),u=d.user,s=d.onstation,m=d.product_records,p=void 0===m?[]:m,C=d.coin_records,h=void 0===C?[]:C,N=d.hidden_records,V=void 0===N?[]:N,b=d.stock,f=!1;return d.vending_machine_input?(n=d.vending_machine_input||[],f=!0):(n=[].concat(p,h),d.extended_inventory&&(n=[].concat(n,V))),n=n.filter((function(e){return!!e})),(0,o.createComponentVNode)(2,i.Window,{title:"Vending Machine",width:450,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[!!s&&(0,o.createComponentVNode)(2,c.Section,{title:"User",children:u&&(0,o.createComponentVNode)(2,c.Box,{children:["Welcome, ",(0,o.createVNode)(1,"b",null,u.name,0),","," ",(0,o.createVNode)(1,"b",null,u.job||"Unemployed",0),"!",(0,o.createVNode)(1,"br"),"Your balance is ",(0,o.createVNode)(1,"b",null,[u.cash,(0,o.createTextVNode)(" credits")],0),"."]})||(0,o.createComponentVNode)(2,c.Box,{color:"light-grey",children:["No registered ID card!",(0,o.createVNode)(1,"br"),"Please contact your local HoP!"]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Products",children:(0,o.createComponentVNode)(2,c.Table,{children:n.map((function(e){return(0,o.createComponentVNode)(2,l,{custom:f,product:e,productStock:b[e.name]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VrSleeper=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.VrSleeper=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:475,height:340,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[!!l.emagged&&(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Safety restraints disabled."})}),(0,o.createComponentVNode)(2,a.Section,{title:"Virtual Avatar",children:l.vr_avatar?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:l.vr_avatar.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:l.vr_avatar.status}),!!l.vr_avatar&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:l.vr_avatar.health/l.vr_avatar.maxhealth,ranges:{good:[.9,Infinity],average:[.7,.8],bad:[-Infinity,.5]}})})]}):"No Virtual Avatar detected"}),(0,o.createComponentVNode)(2,a.Section,{title:"VR Commands",children:[(0,o.createComponentVNode)(2,a.Button,{icon:l.toggle_open?"unlock":"lock",disabled:l.stored0&&g.flatMap((function(e){return e.items||[]})).filter(L).filter((function(e,t){return t<25}))||(null==(l=g.find((function(e){return e.name===_})))?void 0:l.items)||[];return(0,o.createComponentVNode)(2,c.Section,{title:(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:s>0?"good":"bad",children:[(0,i.formatMoney)(s)," ",p]}),buttons:(0,o.createFragment)([(0,o.createTextVNode)("Search"),(0,o.createComponentVNode)(2,c.Input,{autoFocus:!0,value:k,onInput:function(e,t){return x(t)},mx:1}),(0,o.createComponentVNode)(2,c.Button,{icon:V?"list":"info",content:V?"Compact":"Detailed",onClick:function(){return h("compact_toggle")}}),!!b&&(0,o.createComponentVNode)(2,c.Button,{icon:"lock",content:"Lock",onClick:function(){return h("lock")}})],0),children:(0,o.createComponentVNode)(2,c.Flex,{children:[0===k.length&&(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Tabs,{vertical:!0,children:g.map((function(e){var t;return(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:e.name===_,onClick:function(){return w(e.name)},children:[e.name," (",(null==(t=e.items)?void 0:t.length)||0,")"]},e.name)}))})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,basis:0,children:[0===y.length&&(0,o.createComponentVNode)(2,c.NoticeBox,{children:0===k.length?"No items in this category.":"No results found."}),(0,o.createComponentVNode)(2,u,{compactMode:k.length>0||V,currencyAmount:s,currencySymbol:p,items:y})]})]})})};t.GenericUplink=d;var u=function(e,t){var n=e.compactMode,l=e.currencyAmount,d=e.currencySymbol,u=(0,a.useBackend)(t).act,s=(0,a.useLocalState)(t,"hoveredItem",{}),m=s[0],p=s[1],C=m&&m.cost||0,h=e.items.map((function(e){var t=m&&m.name!==e.name,n=l-C50?"battery-half":"battery-quarter")||1===t&&"bolt"||2===t&&"battery-full",color:0===t&&(n>50?"yellow":"red")||1===t&&"yellow"||2===t&&"green"}),(0,o.createComponentVNode)(2,d.Box,{inline:!0,width:"36px",textAlign:"right",children:(0,c.toFixed)(n)+"%"})],4)};t.AreaCharge=C,C.defaultHooks=i.pureComponentHooks;var h=function(e){var t=e.status,n=Boolean(2&t),r=Boolean(1&t),a=(n?"On":"Off")+" ["+(r?"auto":"manual")+"]";return(0,o.createComponentVNode)(2,d.ColorBox,{color:n?"good":"bad",content:r?undefined:"M",title:a})};h.defaultHooks=i.pureComponentHooks},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";t.__esModule=!0,t.AiRestorerContent=t.AiRestorer=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.AiRestorer=function(){return(0,o.createComponentVNode)(2,c.Window,{width:370,height:360,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.AI_present,d=i.error,u=i.name,s=i.laws,m=i.isDead,p=i.restoring,C=i.health,h=i.ejectable;return(0,o.createFragment)([d&&(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:d}),!!h&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:l?u:"----------",disabled:!l,onClick:function(){return c("PRG_eject")}}),!!l&&(0,o.createComponentVNode)(2,a.Section,{title:h?"System Status":u,buttons:(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,color:m?"bad":"good",children:m?"Nonfunctional":"Functional"}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:C,minValue:0,maxValue:100,ranges:{good:[70,Infinity],average:[50,70],bad:[-Infinity,50]}})})}),!!p&&(0,o.createComponentVNode)(2,a.Box,{bold:!0,textAlign:"center",fontSize:"20px",color:"good",mt:1,children:"RECONSTRUCTION IN PROGRESS"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"plus",content:"Begin Reconstruction",disabled:p,mt:1,onClick:function(){return c("PRG_beginReconstruction")}}),(0,o.createComponentVNode)(2,a.Section,{title:"Laws",level:2,children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{className:"candystripe",children:e},e)}))})]})],0)};t.AiRestorerContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.AccessList=void 0;var o=n(0),r=n(14),a=n(2),c=n(1);function i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(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(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}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(n=e[Symbol.iterator]()).next.bind(n)}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n0&&"yellow",selected:"requests"===m,onClick:function(){return C("requests")},children:["Requests (",V.length,")"]}),!h&&(0,o.createComponentVNode)(2,c.Tabs.Tab,{icon:"shopping-cart",textColor:"cart"!==m&&N.length>0&&"yellow",selected:"cart"===m,onClick:function(){return C("cart")},children:["Checkout (",N.length,")"]})]})}),"catalog"===m&&(0,o.createComponentVNode)(2,u),"requests"===m&&(0,o.createComponentVNode)(2,s),"cart"===m&&(0,o.createComponentVNode)(2,p)]})})};var d=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.away,u=l.docked,s=l.loan,m=l.loan_dispatched,p=l.location,C=l.message,h=l.points,N=l.requestonly;return(0,o.createComponentVNode)(2,c.Section,{title:"Cargo",buttons:(0,o.createComponentVNode)(2,c.Box,{inline:!0,bold:!0,children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:h,format:function(e){return(0,i.formatMoney)(e)}})," credits"]}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Shuttle",children:u&&!N&&(0,o.createComponentVNode)(2,c.Button,{content:p,onClick:function(){return r("send")}})||p}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"CentCom Message",children:C}),!!s&&!N&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Loan",children:!m&&(0,o.createComponentVNode)(2,c.Button,{content:"Loan Shuttle",disabled:!(d&&u),onClick:function(){return r("loan")}})||(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Loaned to Centcom"})})]})})},u=function(e,t){var n,l=e.express,d=(0,a.useBackend)(t),u=d.act,s=d.data,p=s.self_paid,C=(0,r.toArray)(s.supplies),h=(0,a.useSharedState)(t,"supply",null==(n=C[0])?void 0:n.name),N=h[0],V=h[1],b=C.find((function(e){return e.name===N}));return(0,o.createComponentVNode)(2,c.Section,{title:"Catalog",buttons:!l&&(0,o.createFragment)([(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,c.Button.Checkbox,{ml:2,content:"Buy Privately",checked:p,onClick:function(){return u("toggleprivate")}})],4),children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{ml:-1,mr:1,children:(0,o.createComponentVNode)(2,c.Tabs,{vertical:!0,children:C.map((function(e){return(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:e.name===N,onClick:function(){return V(e.name)},children:[e.name," (",e.packs.length,")"]},e.name)}))})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,c.Table,{children:null==b?void 0:b.packs.map((function(e){var t=[];return e.small_item&&t.push("Small"),e.access&&t.push("Restricted"),(0,o.createComponentVNode)(2,c.Table.Row,{className:"candystripe",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,color:"label",textAlign:"right",children:t.join(", ")}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,textAlign:"right",children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,tooltip:e.desc,tooltipPosition:"left",onClick:function(){return u("add",{id:e.id})},children:[(0,i.formatMoney)(p&&!e.goody?Math.round(1.1*e.cost):e.cost)," cr"]})})]},e.name)}))})})]})})};t.CargoCatalog=u;var s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.requestonly,u=l.requests||[];return(0,o.createComponentVNode)(2,c.Section,{title:"Active Requests",buttons:!d&&(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Clear",color:"transparent",onClick:function(){return r("denyall")}}),children:[0===u.length&&(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"No Requests"}),u.length>0&&(0,o.createComponentVNode)(2,c.Table,{children:u.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"candystripe",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,color:"label",children:["#",e.id]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.object}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createVNode)(1,"b",null,e.orderer,0)}),(0,o.createComponentVNode)(2,c.Table.Cell,{width:"25%",children:(0,o.createVNode)(1,"i",null,e.reason,0)}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,textAlign:"right",children:[(0,i.formatMoney)(e.cost)," cr"]}),!d&&(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,children:[(0,o.createComponentVNode)(2,c.Button,{icon:"check",color:"good",onClick:function(){return r("approve",{id:e.id})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"times",color:"bad",onClick:function(){return r("deny",{id:e.id})}})]})]},e.id)}))})]})},m=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.requestonly,u=l.cart||[],s=u.reduce((function(e,t){return e+t.cost}),0);return d?null:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{inline:!0,mx:1,children:[0===u.length&&"Cart is empty",1===u.length&&"1 item",u.length>=2&&u.length+" items"," ",s>0&&"("+(0,i.formatMoney)(s)+" cr)"]}),(0,o.createComponentVNode)(2,c.Button,{icon:"times",color:"transparent",content:"Clear",onClick:function(){return r("clear")}})],4)},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.requestonly,u=l.away,s=l.docked,p=l.location,C=l.cart||[];return(0,o.createComponentVNode)(2,c.Section,{title:"Current Cart",buttons:(0,o.createComponentVNode)(2,m),children:[0===C.length&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Nothing in cart"}),C.length>0&&(0,o.createComponentVNode)(2,c.Table,{children:C.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"candystripe",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,color:"label",children:["#",e.id]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.object}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,children:!!e.paid&&(0,o.createVNode)(1,"b",null,"[Paid Privately]",16)}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,textAlign:"right",children:[(0,i.formatMoney)(e.cost)," cr"]}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,c.Button,{icon:"minus",onClick:function(){return r("remove",{id:e.id})}})})]},e.id)}))}),C.length>0&&!d&&(0,o.createComponentVNode)(2,c.Box,{mt:2,children:1===u&&1===s&&(0,o.createComponentVNode)(2,c.Button,{color:"green",style:{"line-height":"28px",padding:"0 12px"},content:"Confirm the order",onClick:function(){return r("send")}})||(0,o.createComponentVNode)(2,c.Box,{opacity:.5,children:["Shuttle in ",p,"."]})})]})}},,function(e,t,n){"use strict";t.__esModule=!0,t.BeakerContents=void 0;var o=n(0),r=n(1);t.BeakerContents=function(e){var t=e.beakerLoaded,n=e.beakerContents;return(0,o.createComponentVNode)(2,r.Box,{children:[!t&&(0,o.createComponentVNode)(2,r.Box,{color:"label",children:"No beaker loaded."})||0===n.length&&(0,o.createComponentVNode)(2,r.Box,{color:"label",children:"Beaker is empty."}),n.map((function(e){return(0,o.createComponentVNode)(2,r.Box,{color:"label",children:[e.volume," units of ",e.name," ",e.purity<1&&"(Purity: "+e.purity+")"]},e.name)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LaunchpadConsole=t.LaunchpadControl=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Grid,{width:"1px",children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"arrow-left",iconRotation:45,mb:1,onClick:function(){return n("move_pos",{x:-1,y:1})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"arrow-left",mb:1,onClick:function(){return n("move_pos",{x:-1})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"arrow-down",iconRotation:45,mb:1,onClick:function(){return n("move_pos",{x:-1,y:-1})}})]}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"arrow-up",mb:1,onClick:function(){return n("move_pos",{y:1})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"R",mb:1,onClick:function(){return n("set_pos",{x:0,y:0})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"arrow-down",mb:1,onClick:function(){return n("move_pos",{y:-1})}})]}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"arrow-up",iconRotation:45,mb:1,onClick:function(){return n("move_pos",{x:1,y:1})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"arrow-right",mb:1,onClick:function(){return n("move_pos",{x:1})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"arrow-right",iconRotation:45,mb:1,onClick:function(){return n("move_pos",{x:1,y:-1})}})]})]})},l=function(e,t){var n=e.topLevel,c=(0,r.useBackend)(t),l=c.act,d=c.data,u=d.x,s=d.y,m=d.pad_name,p=d.range;return(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Input,{value:m,width:"170px",onChange:function(e,t){return l("rename",{name:t})}}),level:n?1:2,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Remove",color:"bad",onClick:function(){return l("remove")}}),children:[(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Controls",level:2,children:(0,o.createComponentVNode)(2,i)})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Target",level:2,children:(0,o.createComponentVNode)(2,a.Box,{fontSize:"26px",children:[(0,o.createComponentVNode)(2,a.Box,{mb:1,children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,mr:1,children:"X:"}),(0,o.createComponentVNode)(2,a.NumberInput,{value:u,minValue:-p,maxValue:p,lineHeight:"30px",fontSize:"26px",width:"90px",height:"30px",stepPixelSize:10,onChange:function(e,t){return l("set_pos",{x:t})}})]}),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,mr:1,children:"Y:"}),(0,o.createComponentVNode)(2,a.NumberInput,{value:s,minValue:-p,maxValue:p,stepPixelSize:10,lineHeight:"30px",fontSize:"26px",width:"90px",height:"30px",onChange:function(e,t){return l("set_pos",{y:t})}})]})]})})})]}),(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"upload",content:"Launch",textAlign:"center",onClick:function(){return l("launch")}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"download",content:"Pull",textAlign:"center",onClick:function(){return l("pull")}})})]})]})};t.LaunchpadControl=l;t.LaunchpadConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,d=n.data,u=d.launchpads,s=void 0===u?[]:u,m=d.selected_id;return(0,o.createComponentVNode)(2,c.Window,{width:475,height:260,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:0===s.length&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Pads Connected"})||(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Flex,{minHeight:"190px",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"140px",minHeight:"190px",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,ellipsis:!0,content:e.name,selected:m===e.id,color:"transparent",onClick:function(){return i("select_pad",{id:e.id})}},e.name)}))}),(0,o.createComponentVNode)(2,a.Flex.Item,{minHeight:"100%",children:(0,o.createComponentVNode)(2,a.Divider,{vertical:!0})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,minHeight:"100%",children:m&&(0,o.createComponentVNode)(2,l)||(0,o.createComponentVNode)(2,a.Box,{children:"Please select a pad"})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosCyborgRemoteMonitorContent=t.NtosCyborgRemoteMonitor=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NtosCyborgRemoteMonitor=function(e,t){return(0,o.createComponentVNode)(2,c.NtosWindow,{width:600,height:800,resizable:!0,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.card,d=i.cyborgs,u=void 0===d?[]:d;return u.length?(0,o.createFragment)([!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Certain features require an ID card login."}),u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"terminal",content:"Send Message",color:"blue",disabled:!l,onClick:function(){return c("messagebot",{ref:e.ref})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Box,{color:e.status?"bad":e.locked_down?"average":"good",children:e.status?"Not Responding":e.locked_down?"Locked Down":e.shell_discon?"Nominal/Disconnected":"Nominal"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge",children:(0,o.createComponentVNode)(2,a.Box,{color:e.charge<=30?"bad":e.charge<=70?"average":"good",children:"number"==typeof e.charge?e.charge+"%":"Not Found"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Module",children:e.module}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Upgrades",children:e.upgrades})]})},e.ref)}))],0):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cyborg units detected."})};t.NtosCyborgRemoteMonitorContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.NtosRadarContent=t.NtosRadar=void 0;var o=n(0),r=n(6),a=n(63),c=n(2),i=n(1),l=n(3);t.NtosRadar=function(e,t){return(0,o.createComponentVNode)(2,l.NtosWindow,{width:800,height:600,theme:"ntos",children:(0,o.createComponentVNode)(2,d,{sig_err:"Signal Lost"})})};var d=function(e,t){var n=(0,c.useBackend)(t),d=n.act,u=n.data,s=u.selected,m=u.object,p=void 0===m?[]:m,C=u.target,h=void 0===C?[]:C,N=u.scanning,V=e.sig_err;return(0,o.createComponentVNode)(2,i.Flex,{direction:"row",hight:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{position:"relative",width:20.5,hight:"100%",children:(0,o.createComponentVNode)(2,l.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"redo-alt",content:N?"Scanning...":"Scan",color:"blue",disabled:N,onClick:function(){return d("scan")}}),!p.length&&!N&&(0,o.createVNode)(1,"div",null,"No trackable signals found",16),!N&&p.map((function(e){return(0,o.createVNode)(1,"div",(0,r.classes)(["Button","Button--fluid","Button--color--transparent","Button--ellipsis",e.ref===s&&"Button--selected"]),e.name,0,{title:e.name,onClick:function(){d("selecttarget",{ref:e.ref})}},e.dev)}))]})})}),(0,o.createComponentVNode)(2,i.Flex.Item,{style:{"background-image":'url("'+(0,a.resolveAsset)("ntosradarbackground.png")+'")',"background-position":"center","background-repeat":"no-repeat",top:"20px"},position:"relative",m:1.5,width:45,height:45,children:0===Object.keys(h).length?!!s&&(0,o.createComponentVNode)(2,i.NoticeBox,{position:"absolute",top:20.6,left:1.35,width:42,fontSize:"30px",textAlign:"center",children:V}):!!h.userot&&(0,o.createComponentVNode)(2,i.Box,{as:"img",src:(0,a.resolveAsset)(h.arrowstyle),position:"absolute",top:"20px",left:"243px",style:{transform:"rotate("+h.rot+"deg)"}})||(0,o.createComponentVNode)(2,i.Icon,{name:h.pointer,position:"absolute",size:2,color:h.color,top:10*h.locy+19+"px",left:10*h.locx+16+"px"})})]})};t.NtosRadarContent=d},function(e,t,n){"use strict";t.__esModule=!0,t.RequestKioskContent=t.RequestKiosk=void 0;var o=n(0),r=n(2),a=n(1),c=n(39),i=n(3);t.RequestKiosk=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{width:550,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.accountName,u=l.requests,s=void 0===u?[]:u,m=l.applicants,p=void 0===m?[]:m,C=l.bountyValue;l.bountyText;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Account",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:"Log out",onClick:function(){return i("clear")}}),children:d||"N/A"})})}),(0,o.createComponentVNode)(2,a.Flex,{mb:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:null==s?void 0:s.map((function(e){return(0,o.createComponentVNode)(2,a.Collapsible,{title:e.owner,width:"300px",children:(0,o.createComponentVNode)(2,a.Section,{width:"300px",children:[(0,o.createComponentVNode)(2,a.Flex,{spacing:1,align:"baseline",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,width:"310px",children:e.owner}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100px",children:(0,c.formatMoney)(e.value)+" cr"}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"pen-fancy",content:"Apply",onClick:function(){return i("apply",{request:e.acc_number})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"trash-alt",content:"Delete",color:"red",onClick:function(){return i("deleteRequest",{request:e.acc_number})}})]})]}),(0,o.createComponentVNode)(2,a.Section,{align:"center",children:(0,o.createVNode)(1,"i",null,[(0,o.createTextVNode)('"'),e.description,(0,o.createTextVNode)('"')],0)}),(0,o.createComponentVNode)(2,a.Section,{title:"Request Applicants",children:null==p?void 0:p.map((function(t){return t.request_id===e.acc_number&&(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,p:.5,backgroundColor:"rgba(0, 0, 69, 0.5)",width:"510px",style:{border:"2px solid rgba(13, 13, 213, 0.7)"},children:t.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{align:"end",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"cash-register",onClick:function(){return i("payApplicant",{applicant:t.requestee_id,request:e.acc_number})}})})]})}))})]},e.name)},e.name)}))}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Collapsible,{title:"New Bounty",width:"220px",color:"green",children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.TextArea,{fluid:!0,height:"250px",width:"200px",backgroundColor:"black",textColor:"white",onChange:function(e,t){return i("bountyText",{bountytext:t})}}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.NumberInput,{animate:!0,unit:"cr",minValue:1,maxValue:1e3,value:C,width:"80px",onChange:function(e,t){return i("bountyVal",{bountyval:t})}})}),(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Submit bounty",onClick:function(){return i("createBounty")}})]})})})]})],4)};t.RequestKioskContent=l},function(e,t,n){"use strict";t.__esModule=!0,t.StationAlertConsoleContent=t.StationAlertConsole=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.StationAlertConsole=function(){return(0,o.createComponentVNode)(2,c.Window,{width:325,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t).data.alarms||[],c=n.Fire||[],i=n.Atmosphere||[],l=n.Power||[];return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Fire Alarms",children:(0,o.createVNode)(1,"ul",null,[0===c.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),c.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)}),(0,o.createComponentVNode)(2,a.Section,{title:"Atmospherics Alarms",children:(0,o.createVNode)(1,"ul",null,[0===i.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),i.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Alarms",children:(0,o.createVNode)(1,"ul",null,[0===l.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),l.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)})],4)};t.StationAlertConsoleContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.PortableBasicInfo=void 0;var o=n(0),r=n(2),a=n(1);t.PortableBasicInfo=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.connected,d=i.holding,u=i.on,s=i.pressure;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return c("power")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:s})," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Port",color:l?"good":"average",children:l?"Connected":"Not Connected"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Holding Tank",minHeight:"82px",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!d,onClick:function(){return c("eject")}}),children:d?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Label",children:d.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d.pressure})," kPa"]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No holding tank"})})],4)}},,,,,,,,,,,function(e,t,n){n(148),e.exports=n(447)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var o=n(0);n(449),n(450),n(451),n(452),n(453),n(454),n(455),n(456),n(457),n(458);var r,a,c=n(99),i=(n(100),n(135)),l=n(186),d=n(136),u=n(187),s=n(57);c.perf.mark("inception",null==(r=window.performance)||null==(a=r.timing)?void 0:a.navigationStart),c.perf.mark("init");var m=(0,u.configureStore)(),p=(0,d.createRenderer)((function(){var e=(0,n(486).getRoutedComponent)(m);return(0,o.createComponentVNode)(2,u.StoreProvider,{store:m,children:(0,o.createComponentVNode)(2,e)})}));!function C(){if("loading"!==document.readyState){for((0,s.setupGlobalEvents)(),(0,i.setupHotKeys)(),(0,l.captureExternalLinks)(),m.subscribe(p),window.update=function(e){return m.dispatch(Byond.parseJson(e))};;){var e=window.__updateQueue__.shift();if(!e)break;window.update(e)}0}else document.addEventListener("DOMContentLoaded",C)}()},,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){},function(e,t,n){},function(e,t,n){},,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";t.__esModule=!0,t.getRoutedComponent=void 0;var o=n(0),r=n(2),a=(n(190),n(3)),c=n(487),i=function(e,t){return function(){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:["notFound"===e&&(0,o.createVNode)(1,"div",null,[(0,o.createTextVNode)("Interface "),(0,o.createVNode)(1,"b",null,t,0),(0,o.createTextVNode)(" was not found.")],4),"missingExport"===e&&(0,o.createVNode)(1,"div",null,[(0,o.createTextVNode)("Interface "),(0,o.createVNode)(1,"b",null,t,0),(0,o.createTextVNode)(" is missing an export.")],4)]})})}},l=function(){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0})})};t.getRoutedComponent=function(e){var t=e.getState(),n=(0,r.selectBackend)(t),o=n.suspended,a=n.config;if(o)return l;var d,u=null==a?void 0:a["interface"];try{d=c("./"+u+".js")}catch(m){if("MODULE_NOT_FOUND"===m.code)return i("notFound",u);throw m}var s=d[u];return s||i("missingExport",u)}},function(e,t,n){var o={"./AbductorConsole.js":488,"./Achievements.js":489,"./AiAirlock.js":490,"./AiRestorer.js":201,"./AirAlarm.js":491,"./AirlockElectronics.js":493,"./Apc.js":494,"./ApcControl.js":495,"./AtmosAlertConsole.js":496,"./AtmosControlConsole.js":497,"./AtmosControlPanel.js":498,"./AtmosFilter.js":499,"./AtmosMixer.js":500,"./AtmosPump.js":501,"./AtmosRelief.js":502,"./AutomatedAnnouncement.js":503,"./BankMachine.js":504,"./Bepis.js":505,"./Biogenerator.js":506,"./BlackmarketUplink.js":507,"./BluespaceArtillery.js":508,"./BluespaceLocator.js":509,"./BorgPanel.js":510,"./BrigTimer.js":511,"./CameraConsole.js":512,"./Canister.js":513,"./Canvas.js":514,"./Cargo.js":203,"./CargoBountyConsole.js":515,"./CargoExpress.js":516,"./CargoHoldTerminal.js":517,"./CellularEmporium.js":518,"./CentcomPodLauncher.js":519,"./ChemAcclimator.js":520,"./ChemDebugSynthesizer.js":521,"./ChemDispenser.js":522,"./ChemFilter.js":523,"./ChemHeater.js":524,"./ChemMaster.js":525,"./ChemPress.js":526,"./ChemReactionChamber.js":527,"./ChemSplitter.js":528,"./ChemSynthesizer.js":529,"./CivCargoHoldTerminal.js":530,"./ClockworkSlab.js":531,"./CodexGigas.js":532,"./ComputerFabricator.js":533,"./Crayon.js":534,"./CrewConsole.js":535,"./Cryo.js":536,"./DecalPainter.js":537,"./DisposalUnit.js":538,"./DnaConsole.js":539,"./DnaVault.js":540,"./EightBallVote.js":541,"./Electrolyzer.js":542,"./Electropack.js":543,"./EmergencyShuttleConsole.js":544,"./EngravedMessage.js":545,"./ExosuitControlConsole.js":546,"./ExosuitFabricator.js":547,"./ForbiddenLore.js":548,"./Gateway.js":549,"./GhostPoolProtection.js":550,"./GlandDispenser.js":551,"./Gps.js":552,"./GravityGenerator.js":553,"./GulagItemReclaimer.js":554,"./GulagTeleporterConsole.js":555,"./Holodeck.js":556,"./Holopad.js":557,"./HypnoChair.js":558,"./ImplantChair.js":559,"./InfraredEmitter.js":560,"./Intellicard.js":561,"./Jukebox.js":562,"./KeycardAuth.js":563,"./LaborClaimConsole.js":564,"./LanguageMenu.js":565,"./LaunchpadConsole.js":206,"./LaunchpadRemote.js":566,"./MafiaPanel.js":567,"./MalfunctionModulePicker.js":568,"./MechBayPowerConsole.js":569,"./MechpadConsole.js":570,"./MedicalKiosk.js":571,"./Microscope.js":572,"./MiningVendor.js":573,"./Mint.js":574,"./Mule.js":575,"./NaniteChamberControl.js":576,"./NaniteCloudControl.js":577,"./NaniteProgramHub.js":578,"./NaniteProgrammer.js":579,"./NaniteRemote.js":580,"./NotificationPreferences.js":581,"./NtnetRelay.js":582,"./NtosAiRestorer.js":583,"./NtosArcade.js":584,"./NtosAtmos.js":585,"./NtosBountyConsole.js":586,"./NtosCard.js":587,"./NtosConfiguration.js":588,"./NtosCrewManifest.js":589,"./NtosCyborgRemoteMonitor.js":207,"./NtosCyborgRemoteMonitorSyndicate.js":590,"./NtosFileManager.js":591,"./NtosJobManager.js":592,"./NtosMain.js":593,"./NtosNetChat.js":594,"./NtosNetDos.js":595,"./NtosNetDownloader.js":596,"./NtosNetMonitor.js":597,"./NtosPowerMonitor.js":598,"./NtosRadar.js":208,"./NtosRadarSyndicate.js":599,"./NtosRequestKiosk.js":600,"./NtosRevelation.js":601,"./NtosRoboControl.js":602,"./NtosShipping.js":603,"./NtosStationAlertConsole.js":604,"./NtosSupermatterMonitor.js":605,"./NuclearBomb.js":606,"./OperatingComputer.js":607,"./Orbit.js":608,"./OreBox.js":609,"./OreRedemptionMachine.js":610,"./Pandemic.js":611,"./PaperSheet.js":612,"./ParticleAccelerator.js":615,"./PersonalCrafting.js":616,"./Photocopier.js":617,"./PortableChemMixer.js":618,"./PortableGenerator.js":619,"./PortablePump.js":620,"./PortableScrubber.js":621,"./PortableTurret.js":622,"./PowerMonitor.js":143,"./ProbingConsole.js":623,"./ProximitySensor.js":624,"./Radio.js":625,"./RadioactiveMicrolaser.js":626,"./RapidPipeDispenser.js":627,"./RemoteRobotControl.js":628,"./RequestKiosk.js":209,"./RoboticsControlConsole.js":629,"./Roulette.js":630,"./SatelliteControl.js":631,"./ScannerGate.js":632,"./SeedExtractor.js":633,"./ShuttleConsole.js":634,"./ShuttleManipulator.js":635,"./Signaler.js":636,"./SkillPanel.js":637,"./SkillStation.js":638,"./Sleeper.js":639,"./SlimeBodySwapper.js":640,"./SmartVend.js":641,"./Smes.js":642,"./SmokeMachine.js":643,"./SolarControl.js":644,"./SpaceHeater.js":645,"./SpawnersMenu.js":646,"./StationAlertConsole.js":210,"./SuitStorageUnit.js":647,"./SyndContractor.js":648,"./TachyonArray.js":649,"./Tank.js":650,"./TankDispenser.js":651,"./Telecomms.js":652,"./TelecommsInteraction.js":653,"./TelecommsLogBrowser.js":654,"./TelecommsMonitor.js":655,"./TelecommsPDALog.js":656,"./Teleporter.js":657,"./ThermoMachine.js":658,"./Timer.js":659,"./TransferValve.js":660,"./TurbineComputer.js":661,"./TurretControl.js":662,"./Uplink.js":142,"./VaultController.js":663,"./Vendatray.js":664,"./Vending.js":665,"./VrSleeper.js":666,"./Wires.js":667};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=487},function(e,t,n){"use strict";t.__esModule=!0,t.AbductorConsole=void 0;var o=n(0),r=n(142),a=n(2),c=n(1),i=n(3);t.AbductorConsole=function(e,t){var n=(0,a.useSharedState)(t,"tab",1),r=n[0],s=n[1];return(0,o.createComponentVNode)(2,i.Window,{theme:"abductor",width:600,height:532,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{icon:"list",lineHeight:"23px",selected:1===r,onClick:function(){return s(1)},children:"Abductsoft 3000"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{icon:"list",lineHeight:"23px",selected:2===r,onClick:function(){return s(2)},children:"Mission Settings"})]}),1===r&&(0,o.createComponentVNode)(2,l),2===r&&(0,o.createFragment)([(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u)],4)]})})};var l=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),l=i.experiment,d=i.points,u=i.credits;return l?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Collected Samples",children:d})})}),(0,o.createComponentVNode)(2,r.GenericUplink,{currencyAmount:u,currencySymbol:"Credits"})],4):(0,o.createComponentVNode)(2,c.NoticeBox,{danger:!0,children:"No Experiment Machine Detected"})},d=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.pad,d=i.gizmo;return l?(0,o.createComponentVNode)(2,c.Section,{title:"Emergency Teleport",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"exclamation-circle",content:"Activate",color:"bad",onClick:function(){return r("teleporter_send")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Mark Retrieval",children:(0,o.createComponentVNode)(2,c.Button,{icon:d?"user-plus":"user-slash",content:d?"Retrieve":"No Mark",disabled:!d,onClick:function(){return r("teleporter_retrieve")}})})})}):(0,o.createComponentVNode)(2,c.NoticeBox,{danger:!0,children:"No Telepad Detected"})},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.vest,d=i.vest_mode,u=i.vest_lock;return l?(0,o.createComponentVNode)(2,c.Section,{title:"Agent Vest Settings",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:u?"lock":"unlock",content:u?"Locked":"Unlocked",onClick:function(){return r("toggle_vest")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Mode",children:(0,o.createComponentVNode)(2,c.Button,{icon:1===d?"eye-slash":"fist-raised",content:1===d?"Stealth":"Combat",onClick:function(){return r("flip_vest")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Disguise",children:(0,o.createComponentVNode)(2,c.Button,{icon:"user-secret",content:"Select",onClick:function(){return r("select_disguise")}})})]})}):(0,o.createComponentVNode)(2,c.NoticeBox,{danger:!0,children:"No Agent Vest Detected"})}},function(e,t,n){"use strict";t.__esModule=!0,t.Achievements=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.Achievements=function(e,t){var n=(0,r.useBackend)(t).data,l=n.categories,u=(0,r.useLocalState)(t,"category",l[0]),s=u[0],m=u[1],p=n.achievements.filter((function(e){return e.category===s}));return(0,o.createComponentVNode)(2,c.Window,{title:"Achievements",width:540,height:680,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[l.map((function(e){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:s===e,onClick:function(){return m(e)},children:e},e)})),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:"High Scores"===s,onClick:function(){return m("High Scores")},children:"High Scores"})]}),"High Scores"===s&&(0,o.createComponentVNode)(2,d)||(0,o.createComponentVNode)(2,i,{achievements:p})]})})};var i=function(e,t){var n=e.achievements;return(0,o.createComponentVNode)(2,a.Table,{children:n.map((function(e){return(0,o.createComponentVNode)(2,l,{achievement:e},e.name)}))})},l=function(e){var t=e.achievement,n=t.name,r=t.desc,c=t.icon_class,i=t.value,l=t.score;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,a.Box,{m:1,className:c})}),(0,o.createComponentVNode)(2,a.Table.Cell,{verticalAlign:"top",children:[(0,o.createVNode)(1,"h1",null,n,0),r,l&&(0,o.createComponentVNode)(2,a.Box,{color:i>0?"good":"bad",children:i>0?"Earned "+i+" times":"Locked"})||(0,o.createComponentVNode)(2,a.Box,{color:i?"good":"bad",children:i?"Unlocked":"Locked"})]})]},n)},d=function(e,t){var n=(0,r.useBackend)(t).data,c=n.highscore,i=n.user_ckey,l=(0,r.useLocalState)(t,"highscore",0),d=l[0],u=l[1],s=c[d];if(!s)return null;var m=Object.keys(s.scores).map((function(e){return{ckey:e,value:s.scores[e]}}));return(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Tabs,{vertical:!0,children:c.map((function(e,t){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:d===t,onClick:function(){return u(t)},children:e.name},e.name)}))})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"#"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Key"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Score"})]}),m.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{className:"candystripe",m:2,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{color:"label",textAlign:"center",children:t+1}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:e.ckey===i&&"green",textAlign:"center",children:[0===t&&(0,o.createComponentVNode)(2,a.Icon,{name:"crown",color:"yellow",mr:2}),e.ckey,0===t&&(0,o.createComponentVNode)(2,a.Icon,{name:"crown",color:"yellow",ml:2})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.value})]},e.ckey)}))]})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AiAirlock=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}};t.AiAirlock=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=i[d.power.main]||i[0],s=i[d.power.backup]||i[0],m=i[d.shock]||i[0];return(0,o.createComponentVNode)(2,c.Window,{width:500,height:390,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Main",color:u.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",disabled:!d.power.main,content:"Disrupt",onClick:function(){return l("disrupt-main")}}),children:[d.power.main?"Online":"Offline"," ",d.wires.main_1&&d.wires.main_2?d.power.main_timeleft>0&&"["+d.power.main_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Backup",color:s.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",disabled:!d.power.backup,content:"Disrupt",onClick:function(){return l("disrupt-backup")}}),children:[d.power.backup?"Online":"Offline"," ",d.wires.backup_1&&d.wires.backup_2?d.power.backup_timeleft>0&&"["+d.power.backup_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Electrify",color:m.color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",disabled:!(d.wires.shock&&0===d.shock),content:"Restore",onClick:function(){return l("shock-restore")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",disabled:!d.wires.shock,content:"Temporary",onClick:function(){return l("shock-temp")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",disabled:!d.wires.shock,content:"Permanent",onClick:function(){return l("shock-perm")}})],4),children:[2===d.shock?"Safe":"Electrified"," ",(d.wires.shock?d.shock_timeleft>0&&"["+d.shock_timeleft+"s]":"[Wires have been cut!]")||-1===d.shock_timeleft&&"[Permanent]"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Access and Door Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Scan",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.id_scanner?"power-off":"times",content:d.id_scanner?"Enabled":"Disabled",selected:d.id_scanner,disabled:!d.wires.id_scanner,onClick:function(){return l("idscan-toggle")}}),children:!d.wires.id_scanner&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Access",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.emergency?"power-off":"times",content:d.emergency?"Enabled":"Disabled",selected:d.emergency,onClick:function(){return l("emergency-toggle")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Bolts",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.locked?"lock":"unlock",content:d.locked?"Lowered":"Raised",selected:d.locked,disabled:!d.wires.bolts,onClick:function(){return l("bolt-toggle")}}),children:!d.wires.bolts&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.lights?"power-off":"times",content:d.lights?"Enabled":"Disabled",selected:d.lights,disabled:!d.wires.lights,onClick:function(){return l("light-toggle")}}),children:!d.wires.lights&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.safe?"power-off":"times",content:d.safe?"Enabled":"Disabled",selected:d.safe,disabled:!d.wires.safe,onClick:function(){return l("safe-toggle")}}),children:!d.wires.safe&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.speed?"power-off":"times",content:d.speed?"Enabled":"Disabled",selected:d.speed,disabled:!d.wires.timing,onClick:function(){return l("speed-toggle")}}),children:!d.wires.timing&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Control",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.opened?"sign-out-alt":"sign-in-alt",content:d.opened?"Open":"Closed",selected:d.opened,disabled:d.locked||d.welded,onClick:function(){return l("open-close")}}),children:!(!d.locked&&!d.welded)&&(0,o.createVNode)(1,"span",null,[(0,o.createTextVNode)("[Door is "),d.locked?"bolted":"",d.locked&&d.welded?" and ":"",d.welded?"welded":"",(0,o.createTextVNode)("!]")],0)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirAlarm=void 0;var o=n(0),r=n(9),a=(n(19),n(2)),c=n(1),i=(n(36),n(3)),l=n(64),d=n(492);t.AirAlarm=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),c=r.locked&&!r.siliconUser;return(0,o.createComponentVNode)(2,i.Window,{width:440,height:650,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l.InterfaceLockNoticeBox),(0,o.createComponentVNode)(2,u),!c&&(0,o.createComponentVNode)(2,m)]})})};var u=function(e,t){var n=(0,a.useBackend)(t).data,i=(n.environment_data||[]).filter((function(e){return e.value>=.01})),l={0:{color:"good",localStatusText:"Optimal"},1:{color:"average",localStatusText:"Caution"},2:{color:"bad",localStatusText:"Danger (Internals Required)"}},d=l[n.danger_level]||l[0];return(0,o.createComponentVNode)(2,c.Section,{title:"Air Status",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[i.length>0&&(0,o.createFragment)([i.map((function(e){var t=l[e.danger_level]||l[0];return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.name,color:t.color,children:[(0,r.toFixed)(e.value,2),e.unit]},e.name)})),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Local status",color:d.color,children:d.localStatusText}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Area status",color:n.atmos_alarm||n.fire_alarm?"bad":"good",children:(n.atmos_alarm?"Atmosphere Alarm":n.fire_alarm&&"Fire Alarm")||"Nominal"})],0)||(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Warning",color:"bad",children:"Cannot obtain air sample for analysis."}),!!n.emagged&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Warning",color:"bad",children:"Safety measures offline. Device may exhibit abnormal behavior."})]})})},s={home:{title:"Air Controls",component:function(){return p}},vents:{title:"Vent Controls",component:function(){return C}},scrubbers:{title:"Scrubber Controls",component:function(){return h}},modes:{title:"Operating Mode",component:function(){return N}},thresholds:{title:"Alarm Thresholds",component:function(){return V}}},m=function(e,t){var n=(0,a.useLocalState)(t,"screen"),r=n[0],i=n[1],l=s[r]||s.home,d=l.component();return(0,o.createComponentVNode)(2,c.Section,{title:l.title,buttons:r&&(0,o.createComponentVNode)(2,c.Button,{icon:"arrow-left",content:"Back",onClick:function(){return i()}}),children:(0,o.createComponentVNode)(2,d)})},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=(0,a.useLocalState)(t,"screen"),d=(l[0],l[1]),u=i.mode,s=i.atmos_alarm;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:s?"exclamation-triangle":"exclamation",color:s&&"caution",content:"Area Atmosphere Alarm",onClick:function(){return r(s?"reset":"alarm")}}),(0,o.createComponentVNode)(2,c.Box,{mt:1}),(0,o.createComponentVNode)(2,c.Button,{icon:3===u?"exclamation-triangle":"exclamation",color:3===u&&"danger",content:"Panic Siphon",onClick:function(){return r("mode",{mode:3===u?1:3})}}),(0,o.createComponentVNode)(2,c.Box,{mt:2}),(0,o.createComponentVNode)(2,c.Button,{icon:"sign-out-alt",content:"Vent Controls",onClick:function(){return d("vents")}}),(0,o.createComponentVNode)(2,c.Box,{mt:1}),(0,o.createComponentVNode)(2,c.Button,{icon:"filter",content:"Scrubber Controls",onClick:function(){return d("scrubbers")}}),(0,o.createComponentVNode)(2,c.Box,{mt:1}),(0,o.createComponentVNode)(2,c.Button,{icon:"cog",content:"Operating Mode",onClick:function(){return d("modes")}}),(0,o.createComponentVNode)(2,c.Box,{mt:1}),(0,o.createComponentVNode)(2,c.Button,{icon:"chart-bar",content:"Alarm Thresholds",onClick:function(){return d("thresholds")}})],4)},C=function(e,t){var n=(0,a.useBackend)(t).data.vents;return n&&0!==n.length?n.map((function(e){return(0,o.createComponentVNode)(2,d.Vent,{vent:e},e.id_tag)})):"Nothing to show"},h=function(e,t){var n=(0,a.useBackend)(t).data.scrubbers;return n&&0!==n.length?n.map((function(e){return(0,o.createComponentVNode)(2,d.Scrubber,{scrubber:e},e.id_tag)})):"Nothing to show"},N=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.modes;return i&&0!==i.length?i.map((function(e){return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:e.selected?"check-square-o":"square-o",selected:e.selected,color:e.selected&&e.danger&&"danger",content:e.name,onClick:function(){return r("mode",{mode:e.mode})}}),(0,o.createComponentVNode)(2,c.Box,{mt:1})],4,e.mode)})):"Nothing to show"},V=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.thresholds;return(0,o.createVNode)(1,"table","LabeledList",[(0,o.createVNode)(1,"thead",null,(0,o.createVNode)(1,"tr",null,[(0,o.createVNode)(1,"td"),(0,o.createVNode)(1,"td","color-bad","min2",16),(0,o.createVNode)(1,"td","color-average","min1",16),(0,o.createVNode)(1,"td","color-average","max1",16),(0,o.createVNode)(1,"td","color-bad","max2",16)],4),2),(0,o.createVNode)(1,"tbody",null,l.map((function(e){return(0,o.createVNode)(1,"tr",null,[(0,o.createVNode)(1,"td","LabeledList__label",e.name,0),e.settings.map((function(e){return(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,c.Button,{content:(0,r.toFixed)(e.selected,2),onClick:function(){return i("threshold",{env:e.env,"var":e.val})}}),2,null,e.val)}))],0,null,e.name)})),0)],4,{style:{width:"100%"}})}},function(e,t,n){"use strict";t.__esModule=!0,t.Scrubber=t.Vent=void 0;var o=n(0),r=n(19),a=n(2),c=n(1),i=n(36);t.Vent=function(e,t){var n=e.vent,i=(0,a.useBackend)(t).act,l=n.id_tag,d=n.long_name,u=n.power,s=n.checks,m=n.excheck,p=n.incheck,C=n.direction,h=n.external,N=n.internal,V=n.extdefault,b=n.intdefault;return(0,o.createComponentVNode)(2,c.Section,{level:2,title:(0,r.decodeHtmlEntities)(d),buttons:(0,o.createComponentVNode)(2,c.Button,{icon:u?"power-off":"times",selected:u,content:u?"On":"Off",onClick:function(){return i("power",{id_tag:l,val:Number(!u)})}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Mode",children:(0,o.createComponentVNode)(2,c.Button,{icon:"sign-in-alt",content:C?"Pressurizing":"Scrubbing",color:!C&&"danger",onClick:function(){return i("direction",{id_tag:l,val:Number(!C)})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pressure Regulator",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"sign-in-alt",content:"Internal",selected:p,onClick:function(){return i("incheck",{id_tag:l,val:s})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"sign-out-alt",content:"External",selected:m,onClick:function(){return i("excheck",{id_tag:l,val:s})}})]}),!!p&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Internal Target",children:[(0,o.createComponentVNode)(2,c.NumberInput,{value:Math.round(N),unit:"kPa",width:"75px",minValue:0,step:10,maxValue:5066,onChange:function(e,t){return i("set_internal_pressure",{id_tag:l,value:t})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"undo",disabled:b,content:"Reset",onClick:function(){return i("reset_internal_pressure",{id_tag:l})}})]}),!!m&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"External Target",children:[(0,o.createComponentVNode)(2,c.NumberInput,{value:Math.round(h),unit:"kPa",width:"75px",minValue:0,step:10,maxValue:5066,onChange:function(e,t){return i("set_external_pressure",{id_tag:l,value:t})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"undo",disabled:V,content:"Reset",onClick:function(){return i("reset_external_pressure",{id_tag:l})}})]})]})})};t.Scrubber=function(e,t){var n=e.scrubber,l=(0,a.useBackend)(t).act,d=n.long_name,u=n.power,s=n.scrubbing,m=n.id_tag,p=n.widenet,C=n.filter_types;return(0,o.createComponentVNode)(2,c.Section,{level:2,title:(0,r.decodeHtmlEntities)(d),buttons:(0,o.createComponentVNode)(2,c.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return l("power",{id_tag:m,val:Number(!u)})}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Mode",children:[(0,o.createComponentVNode)(2,c.Button,{icon:s?"filter":"sign-in-alt",color:s||"danger",content:s?"Scrubbing":"Siphoning",onClick:function(){return l("scrubbing",{id_tag:m,val:Number(!s)})}}),(0,o.createComponentVNode)(2,c.Button,{icon:p?"expand":"compress",selected:p,content:p?"Expanded range":"Normal range",onClick:function(){return l("widenet",{id_tag:m,val:Number(!p)})}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Filters",children:s&&C.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{icon:e.enabled?"check-square-o":"square-o",content:(0,i.getGasLabel)(e.gas_id,e.gas_name),title:e.gas_name,selected:e.enabled,onClick:function(){return l("toggle_filter",{id_tag:m,val:e.gas_id})}},e.gas_id)}))||"N/A"})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirlockElectronics=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=n(202);t.AirlockElectronics=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.oneAccess,s=d.unres_direction,m=d.regions||[],p=d.accesses||[];return(0,o.createComponentVNode)(2,c.Window,{width:420,height:485,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Main",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Access Required",children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"unlock":"lock",content:u?"One":"All",onClick:function(){return l("one_access")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unrestricted Access",children:[(0,o.createComponentVNode)(2,a.Button,{icon:1&s?"check-square-o":"square-o",content:"North",selected:1&s,onClick:function(){return l("direc_set",{unres_direction:"1"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:2&s?"check-square-o":"square-o",content:"South",selected:2&s,onClick:function(){return l("direc_set",{unres_direction:"2"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:4&s?"check-square-o":"square-o",content:"East",selected:4&s,onClick:function(){return l("direc_set",{unres_direction:"4"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:8&s?"check-square-o":"square-o",content:"West",selected:8&s,onClick:function(){return l("direc_set",{unres_direction:"8"})}})]})]})}),(0,o.createComponentVNode)(2,i.AccessList,{accesses:m,selectedList:p,accessMod:function(e){return l("set",{access:e})},grantAll:function(){return l("grant_all")},denyAll:function(){return l("clear_all")},grantDep:function(e){return l("grant_region",{region:e})},denyDep:function(e){return l("deny_region",{region:e})}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Apc=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=n(64);t.Apc=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{width:450,height:445,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,u)})})};var l={2:{color:"good",externalPowerText:"External Power",chargingText:"Fully Charged"},1:{color:"average",externalPowerText:"Low External Power",chargingText:"Charging"},0:{color:"bad",externalPowerText:"No External Power",chargingText:"Not Charging"}},d={1:{icon:"terminal",content:"Override Programming",action:"hack"},2:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"},3:{icon:"caret-square-left",content:"Return to Main Core",action:"deoccupy"},4:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"}},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data,s=u.locked&&!u.siliconUser,m=l[u.externalPower]||l[0],p=l[u.chargingStatus]||l[0],C=u.powerChannels||[],h=d[u.malfStatus]||d[0],N=u.powerCellStatus/100;return u.failTime>0?(0,o.createComponentVNode)(2,a.NoticeBox,{children:[(0,o.createVNode)(1,"b",null,(0,o.createVNode)(1,"h3",null,"SYSTEM FAILURE",16),2),(0,o.createVNode)(1,"i",null,"I/O regulators malfunction detected! Waiting for system reboot...",16),(0,o.createVNode)(1,"br"),"Automatic reboot in ",u.failTime," seconds...",(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Reboot Now",onClick:function(){return c("reboot")}})]}):(0,o.createFragment)([(0,o.createComponentVNode)(2,i.InterfaceLockNoticeBox),(0,o.createComponentVNode)(2,a.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Main Breaker",color:m.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.isOperating?"power-off":"times",content:u.isOperating?"On":"Off",selected:u.isOperating&&!s,disabled:s,onClick:function(){return c("breaker")}}),children:["[ ",m.externalPowerText," ]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Cell",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:"good",value:N})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",color:p.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.chargeMode?"sync":"close",content:u.chargeMode?"Auto":"Off",disabled:s,onClick:function(){return c("charge")}}),children:["[ ",p.chargingText," ]"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Channels",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[C.map((function(e){var t=e.topicParams;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.title,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{inline:!0,mx:2,color:e.status>=2?"good":"bad",children:e.status>=2?"On":"Off"}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Auto",selected:!s&&(1===e.status||3===e.status),disabled:s,onClick:function(){return c("channel",t.auto)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:"On",selected:!s&&2===e.status,disabled:s,onClick:function(){return c("channel",t.on)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Off",selected:!s&&0===e.status,disabled:s,onClick:function(){return c("channel",t.off)}})],4),children:e.powerLoad},e.title)})),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Load",children:(0,o.createVNode)(1,"b",null,u.totalLoad,0)})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Misc",buttons:!!u.siliconUser&&(0,o.createFragment)([!!u.malfStatus&&(0,o.createComponentVNode)(2,a.Button,{icon:h.icon,content:h.content,color:"bad",onClick:function(){return c(h.action)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){return c("overload")}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cover Lock",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.coverLocked?"lock":"unlock",content:u.coverLocked?"Engaged":"Disengaged",disabled:s,onClick:function(){return c("cover")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Lighting",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:u.emergencyLights?"Enabled":"Disabled",disabled:s,onClick:function(){return c("emergency_lighting")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Night Shift Lighting",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:u.nightshiftLights?"Enabled":"Disabled",onClick:function(){return c("toggle_nightshift")}})}),1===u.hijackable&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{title:"Hijacking",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"unlock",content:"Hijack",disabled:u.hijacker,onClick:function(){return c("hijack")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lock",content:"Lockdown",isabled:!u.lockdownavail&&1===u.hijacked,onClick:function(){return c("lockdown")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:"Drain",disabled:!u.drainavail&&1===u.hijacked,onClick:function(){return c("drain")}})],4)})]})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.ApcControl=void 0;var o=n(0),r=n(14),a=n(30),c=n(6),i=n(2),l=n(1),d=n(3),u=n(143);t.ApcControl=function(e,t){var n=(0,i.useBackend)(t).data;return(0,o.createComponentVNode)(2,d.Window,{title:"APC Controller",width:550,height:500,resizable:!0,children:[1===n.authenticated&&(0,o.createComponentVNode)(2,m),0===n.authenticated&&(0,o.createComponentVNode)(2,s)]})};var s=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.emagged,c=1===a?"Open":"Log In";return(0,o.createComponentVNode)(2,d.Window.Content,{children:(0,o.createComponentVNode)(2,l.Button,{fluid:!0,color:1===a?"":"good",content:c,onClick:function(){return r("log-in")}})})},m=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.restoring,c=(0,i.useLocalState)(t,"tab-index",1),u=c[0],s=c[1];return(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Tabs,{children:[(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:1===u,onClick:function(){s(1),r("check-apcs")},children:"APC Control Panel"}),(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:2===u,onClick:function(){s(2),r("check-logs")},children:"Log View Panel"})]}),1===a&&(0,o.createComponentVNode)(2,l.Dimmer,{fontSize:"32px",children:[(0,o.createComponentVNode)(2,l.Icon,{name:"cog",spin:!0})," Resetting..."]}),1===u&&(0,o.createFragment)([(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,l.Box,{fillPositionedParent:!0,top:"53px",children:(0,o.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,C)})})],4),2===u&&(0,o.createComponentVNode)(2,l.Box,{fillPositionedParent:!0,top:"20px",children:(0,o.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,h)})})],0)},p=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,c=a.emagged,d=a.logging,u=(0,i.useLocalState)(t,"sortByField",null),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,l.Flex.Item,{children:[(0,o.createComponentVNode)(2,l.Box,{inline:!0,mr:2,color:"label",children:"Sort by:"}),(0,o.createComponentVNode)(2,l.Button.Checkbox,{checked:"name"===s,content:"Name",onClick:function(){return m("name"!==s&&"name")}}),(0,o.createComponentVNode)(2,l.Button.Checkbox,{checked:"charge"===s,content:"Charge",onClick:function(){return m("charge"!==s&&"charge")}}),(0,o.createComponentVNode)(2,l.Button.Checkbox,{checked:"draw"===s,content:"Draw",onClick:function(){return m("draw"!==s&&"draw")}})]}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1}),(0,o.createComponentVNode)(2,l.Flex.Item,{children:[1===c&&(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Button,{color:1===d?"bad":"good",content:1===d?"Stop Logging":"Restore Logging",onClick:function(){return r("toggle-logs")}}),(0,o.createComponentVNode)(2,l.Button,{content:"Reset Console",onClick:function(){return r("restore-console")}})],4),(0,o.createComponentVNode)(2,l.Button,{color:"bad",content:"Log Out",onClick:function(){return r("log-out")}})]})]})},C=function(e,t){var n=(0,i.useBackend)(t),c=n.data,d=n.act,s=(0,i.useLocalState)(t,"sortByField",null)[0],m=(0,a.flow)([(0,r.map)((function(e,t){return Object.assign({},e,{id:e.name+t})})),"name"===s&&(0,r.sortBy)((function(e){return e.name})),"charge"===s&&(0,r.sortBy)((function(e){return-e.charge})),"draw"===s&&(0,r.sortBy)((function(e){return-(0,u.powerRank)(e.load)}),(function(e){return-parseFloat(e.load)}))])(c.apcs);return(0,o.createComponentVNode)(2,l.Table,{children:[(0,o.createComponentVNode)(2,l.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,l.Table.Cell,{children:"On/Off"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Area"}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,children:"Charge"}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,textAlign:"right",children:"Draw"}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,title:"Equipment",children:"Eqp"}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,title:"Lighting",children:"Lgt"}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,title:"Environment",children:"Env"})]}),m.map((function(e,t){return(0,o.createVNode)(1,"tr","Table__row candystripe",[(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,l.Button,{icon:e.operating?"power-off":"times",color:e.operating?"good":"bad",onClick:function(){return d("breaker",{ref:e.ref})}}),2),(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,l.Button,{onClick:function(){return d("access-apc",{ref:e.ref})},children:e.name}),2),(0,o.createVNode)(1,"td","Table__cell text-right text-nowrap",(0,o.createComponentVNode)(2,u.AreaCharge,{charging:e.charging,charge:e.charge}),2),(0,o.createVNode)(1,"td","Table__cell text-right text-nowrap",e.load,0),(0,o.createVNode)(1,"td","Table__cell text-center text-nowrap",(0,o.createComponentVNode)(2,N,{target:"equipment",status:e.eqp,apc:e,act:d}),2),(0,o.createVNode)(1,"td","Table__cell text-center text-nowrap",(0,o.createComponentVNode)(2,N,{target:"lighting",status:e.lgt,apc:e,act:d}),2),(0,o.createVNode)(1,"td","Table__cell text-center text-nowrap",(0,o.createComponentVNode)(2,N,{target:"environ",status:e.env,apc:e,act:d}),2)],4,null,e.id)}))]})},h=function(e,t){var n=(0,i.useBackend)(t).data,c=(0,a.flow)([(0,r.map)((function(e,t){return Object.assign({},e,{id:e.entry+t})})),function(e){return e.reverse()}])(n.logs);return(0,o.createComponentVNode)(2,l.Box,{m:-.5,children:c.map((function(e){return(0,o.createComponentVNode)(2,l.Box,{p:.5,className:"candystripe",bold:!0,children:e.entry},e.id)}))})},N=function(e){var t=e.target,n=e.status,r=e.apc,a=e.act,c=Boolean(2&n),i=Boolean(1&n);return(0,o.createComponentVNode)(2,l.Button,{icon:i?"sync":"power-off",color:c?"good":"bad",onClick:function(){return a("toggle-minor",{type:t,value:V(n),ref:r.ref})}})},V=function(e){return 0===e?2:2===e?3:0};N.defaultHooks=c.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosAlertConsole=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.AtmosAlertConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.priority||[],u=l.minor||[];return(0,o.createComponentVNode)(2,c.Window,{width:350,height:300,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Alarms",children:(0,o.createVNode)(1,"ul",null,[0===d.length&&(0,o.createVNode)(1,"li","color-good","No Priority Alerts",16),d.map((function(e){return(0,o.createVNode)(1,"li",null,(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:e,color:"bad",onClick:function(){return i("clear",{zone:e})}}),2,null,e)})),0===u.length&&(0,o.createVNode)(1,"li","color-good","No Minor Alerts",16),u.map((function(e){return(0,o.createVNode)(1,"li",null,(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:e,color:"average",onClick:function(){return i("clear",{zone:e})}}),2,null,e)}))],0)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosControlConsole=void 0;var o=n(0),r=n(14),a=n(9),c=n(2),i=n(1),l=n(3);t.AtmosControlConsole=function(e,t){var n,d=(0,c.useBackend)(t),u=d.act,s=d.data,m=s.sensors||[];return(0,o.createComponentVNode)(2,l.Window,{width:500,height:315,resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:!!s.tank&&(null==(n=m[0])?void 0:n.long_name),children:m.map((function(e){var t=e.gases||{};return(0,o.createComponentVNode)(2,i.Section,{title:!s.tank&&e.long_name,level:2,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pressure",children:(0,a.toFixed)(e.pressure,2)+" kPa"}),!!e.temperature&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:(0,a.toFixed)(e.temperature,2)+" K"}),(0,r.map)((function(e,t){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:t,children:(0,a.toFixed)(e,2)+"%"})}))(t)]})},e.id_tag)}))}),s.tank&&(0,o.createComponentVNode)(2,i.Section,{title:"Controls",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"undo",content:"Reconnect",onClick:function(){return u("reconnect")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Input Injector",children:(0,o.createComponentVNode)(2,i.Button,{icon:s.inputting?"power-off":"times",content:s.inputting?"Injecting":"Off",selected:s.inputting,onClick:function(){return u("input")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Input Rate",children:(0,o.createComponentVNode)(2,i.NumberInput,{value:s.inputRate,unit:"L/s",width:"63px",minValue:0,maxValue:200,suppressFlicker:2e3,onChange:function(e,t){return u("rate",{rate:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Output Regulator",children:(0,o.createComponentVNode)(2,i.Button,{icon:s.outputting?"power-off":"times",content:s.outputting?"Open":"Closed",selected:s.outputting,onClick:function(){return u("output")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Output Pressure",children:(0,o.createComponentVNode)(2,i.NumberInput,{value:parseFloat(s.outputPressure),unit:"kPa",width:"75px",minValue:0,maxValue:4500,step:10,suppressFlicker:2e3,onChange:function(e,t){return u("pressure",{pressure:t})}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosControlPanel=void 0;var o=n(0),r=n(14),a=n(30),c=n(2),i=n(1),l=n(3);t.AtmosControlPanel=function(e,t){var n=(0,c.useBackend)(t),d=n.act,u=n.data,s=(0,a.flow)([(0,r.map)((function(e,t){return Object.assign({},e,{id:e.area+t})})),(0,r.sortBy)((function(e){return e.id}))])(u.excited_groups);return(0,o.createComponentVNode)(2,l.Window,{title:"SSAir Control Panel",width:900,height:500,resizable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{m:1,children:(0,o.createComponentVNode)(2,i.Flex,{justify:"space-between",align:"baseline",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return d("toggle-freeze")},color:1===u.frozen?"good":"bad",children:1===u.frozen?"Freeze Subsystem":"Unfreeze Subsystem"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:["Fire Cnt: ",u.fire_count]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:["Active Turfs: ",u.active_size]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:["Excited Groups: ",u.excited_size]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:["Hotspots: ",u.hotspots_size]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:["Superconductors: ",u.conducting_size]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:u.showing_user,onClick:function(){return d("toggle_user_display")},children:"Personal View"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:u.show_all,onClick:function(){return d("toggle_show_all")},children:"Display all"})})]})}),(0,o.createComponentVNode)(2,i.Box,{fillPositionedParent:!0,top:"45px",children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Area Name"}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:"Breakdown"}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:"Dismantle"}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:"Turfs"}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:1===u.display_max&&"Max Share"}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:"Display"})]}),s.map((function(e){return(0,o.createVNode)(1,"tr",null,[(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,i.Button,{content:e.area,onClick:function(){return d("move-to-target",{spot:e.jump_to})}}),2),(0,o.createVNode)(1,"td",null,e.breakdown,0),(0,o.createVNode)(1,"td",null,e.dismantle,0),(0,o.createVNode)(1,"td",null,e.size,0),(0,o.createVNode)(1,"td",null,1===u.display_max&&e.max_share,0),(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:e.should_show,onClick:function(){return d("toggle_show_group",{group:e.group})}}),2)],4,null,e.id)}))]})})})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosFilter=void 0;var o=n(0),r=n(2),a=n(1),c=n(36),i=n(3);t.AtmosFilter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.filter_types||[];return(0,o.createComponentVNode)(2,i.Window,{width:390,height:187,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:d.on?"power-off":"times",content:d.on?"On":"Off",selected:d.on,onClick:function(){return l("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transfer Rate",children:[(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(d.rate),width:"63px",unit:"L/s",minValue:0,maxValue:200,onDrag:function(e,t){return l("rate",{rate:t})}}),(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"plus",content:"Max",disabled:d.rate===d.max_rate,onClick:function(){return l("rate",{rate:"max"})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Filter",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{selected:e.selected,content:(0,c.getGasLabel)(e.id,e.name),onClick:function(){return l("filter",{mode:e.id})}},e.id)}))})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosMixer=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.AtmosMixer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:370,height:165,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.on?"power-off":"times",content:l.on?"On":"Off",selected:l.on,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output Pressure",children:[(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(l.set_pressure),unit:"kPa",width:"75px",minValue:0,maxValue:4500,step:10,onChange:function(e,t){return i("pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"plus",content:"Max",disabled:l.set_pressure===l.max_pressure,onClick:function(){return i("pressure",{pressure:"max"})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Node 1",children:(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:l.node1_concentration,unit:"%",width:"60px",minValue:0,maxValue:100,stepPixelSize:2,onDrag:function(e,t){return i("node1",{concentration:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Node 2",children:(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:l.node2_concentration,unit:"%",width:"60px",minValue:0,maxValue:100,stepPixelSize:2,onDrag:function(e,t){return i("node2",{concentration:t})}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosPump=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.AtmosPump=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:335,height:115,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.on?"power-off":"times",content:l.on?"On":"Off",selected:l.on,onClick:function(){return i("power")}})}),l.max_rate?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transfer Rate",children:[(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(l.rate),width:"63px",unit:"L/s",minValue:0,maxValue:200,onChange:function(e,t){return i("rate",{rate:t})}}),(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"plus",content:"Max",disabled:l.rate===l.max_rate,onClick:function(){return i("rate",{rate:"max"})}})]}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output Pressure",children:[(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(l.pressure),unit:"kPa",width:"75px",minValue:0,maxValue:4500,step:10,onChange:function(e,t){return i("pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"plus",content:"Max",disabled:l.pressure===l.max_pressure,onClick:function(){return i("pressure",{pressure:"max"})}})]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosRelief=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.AtmosRelief=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:335,height:115,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Open Pressure",children:[(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(l.open_pressure),unit:"kPa",width:"75px",minValue:0,maxValue:l.max_pressure||4500,step:10,onChange:function(e,t){return i("open_pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"plus",content:"Max",disabled:l.open_pressure===l.max_pressure,onClick:function(){return i("open_pressure",{pressure:"max"})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Close Pressure",children:[(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(l.close_pressure),unit:"kPa",width:"75px",minValue:0,maxValue:l.max_pressure||4500,step:10,onChange:function(e,t){return i("close_pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"plus",content:"Max",disabled:l.close_pressure===l.max_pressure,onClick:function(){return i("close_pressure",{pressure:"max"})}})]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AutomatedAnnouncement=void 0;var o=n(0),r=(n(19),n(2)),a=n(1),c=n(3),i="%PERSON will be replaced with their name.\n%RANK with their job.";t.AutomatedAnnouncement=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.arrivalToggle,s=d.arrival,m=d.newheadToggle,p=d.newhead;return(0,o.createComponentVNode)(2,c.Window,{title:"Automated Announcement System",width:500,height:225,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Arrival Announcement",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",selected:u,content:u?"On":"Off",onClick:function(){return l("ArrivalToggle")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"info",tooltip:i,tooltipPosition:"left"}),children:(0,o.createComponentVNode)(2,a.Input,{fluid:!0,value:s,onChange:function(e,t){return l("ArrivalText",{newText:t})}})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Departmental Head Announcement",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:m?"power-off":"times",selected:m,content:m?"On":"Off",onClick:function(){return l("NewheadToggle")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"info",tooltip:i,tooltipPosition:"left"}),children:(0,o.createComponentVNode)(2,a.Input,{fluid:!0,value:p,onChange:function(e,t){return l("NewheadText",{newText:t})}})})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BankMachine=void 0;var o=n(0),r=n(2),a=n(1),c=n(39),i=n(3);t.BankMachine=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.current_balance,s=d.siphoning,m=d.station_name;return(0,o.createComponentVNode)(2,i.Window,{width:350,height:155,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.NoticeBox,{danger:!0,children:"Authorized personnel only"}),(0,o.createComponentVNode)(2,a.Section,{title:m+" Vault",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Balance",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:s?"times":"sync",content:s?"Stop Siphoning":"Siphon Credits",selected:s,onClick:function(){return l(s?"halt":"siphon")}}),children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u,format:function(e){return(0,c.formatMoney)(e)}})," cr"]})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Bepis=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.Bepis=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.amount;return(0,o.createComponentVNode)(2,c.Window,{width:500,height:480,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Business Exploration Protocol Incubation Sink",children:[(0,o.createComponentVNode)(2,a.Section,{title:"Information",backgroundColor:"#450F44",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:l.manual_power?"Off":"On",selected:!l.manual_power,onClick:function(){return i("toggle_power")}}),children:"All you need to know about the B.E.P.I.S. and you! The B.E.P.I.S. performs hundreds of tests a second using electrical and financial resources to invent new products, or discover new technologies otherwise overlooked for being too risky or too niche to produce!"}),(0,o.createComponentVNode)(2,a.Section,{title:"Payer's Account",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"redo-alt",content:"Reset Account",onClick:function(){return i("account_reset")}}),children:["Console is currently being operated by ",l.account_owner?l.account_owner:"no one","."]}),(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{size:1.5,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored Data and Statistics",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Deposited Credits",children:l.stored_cash}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Investment Variability",children:[l.accuracy_percentage,"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Innovation Bonus",children:l.positive_cash_offset}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Risk Offset",color:"bad",children:l.negative_cash_offset}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Deposit Amount",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:d,unit:"Credits",minValue:100,maxValue:3e4,step:100,stepPixelSize:2,onChange:function(e,t){return i("amount",{amount:t})}})})]})}),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"donate",content:"Deposit Credits",disabled:1===l.manual_power||1===l.silicon_check,onClick:function(){return i("deposit_cash")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Withdraw Credits",disabled:1===l.manual_power,onClick:function(){return i("withdraw_cash")}})]})]}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Market Data and Analysis",children:[(0,o.createComponentVNode)(2,a.Box,{children:["Average technology cost: ",l.mean_value]}),(0,o.createComponentVNode)(2,a.Box,{children:["Current chance of Success: Est. ",l.success_estimate,"%"]}),l.error_name&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Previous Failure Reason: Deposited cash value too low. Please insert more money for future success."}),(0,o.createComponentVNode)(2,a.Box,{m:1}),(0,o.createComponentVNode)(2,a.Button,{icon:"microscope",disabled:1===l.manual_power,onClick:function(){return i("begin_experiment")},content:"Begin Testing"})]})})]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BiogeneratorContent=t.Biogenerator=void 0;var o=n(0),r=n(6),a=n(19),c=n(2),i=n(1),l=n(39),d=n(3);t.Biogenerator=function(e,t){var n=(0,c.useBackend)(t).data,r=n.beaker,a=n.processing;return(0,o.createComponentVNode)(2,d.Window,{width:550,height:380,resizable:!0,children:[!!a&&(0,o.createComponentVNode)(2,i.Dimmer,{fontSize:"32px",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"cog",spin:1})," Processing..."]}),(0,o.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:[!r&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No Container"}),!!r&&(0,o.createComponentVNode)(2,u)]})]})};var u=function(e,t){var n,r,d=(0,c.useBackend)(t),u=d.act,m=d.data,p=m.biomass,C=m.can_process,h=m.categories,N=void 0===h?[]:h,V=(0,c.useLocalState)(t,"searchText",""),b=V[0],f=V[1],g=(0,c.useLocalState)(t,"category",null==(n=N[0])?void 0:n.name),v=g[0],k=g[1],x=(0,a.createSearch)(b,(function(e){return e.name})),B=b.length>0&&N.flatMap((function(e){return e.items||[]})).filter(x).filter((function(e,t){return t<25}))||(null==(r=N.find((function(e){return e.name===v})))?void 0:r.items)||[];return(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:p>0?"good":"bad",children:[(0,l.formatMoney)(p)," Biomass"]}),buttons:(0,o.createFragment)([(0,o.createTextVNode)("Search"),(0,o.createComponentVNode)(2,i.Input,{autoFocus:!0,value:b,onInput:function(e,t){return f(t)},mx:1}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject",onClick:function(){return u("detach")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"cog",content:"Activate",disabled:!C,onClick:function(){return u("activate")}})],4),children:(0,o.createComponentVNode)(2,i.Flex,{children:[0===b.length&&(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Tabs,{vertical:!0,children:N.map((function(e){var t;return(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:e.name===v,onClick:function(){return k(e.name)},children:[e.name," (",(null==(t=e.items)?void 0:t.length)||0,")"]},e.name)}))})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,basis:0,children:[0===B.length&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:0===b.length?"No items in this category.":"No results found."}),(0,o.createComponentVNode)(2,i.Table,{children:(0,o.createComponentVNode)(2,s,{biomass:p,items:B})})]})]})})};t.BiogeneratorContent=u;var s=function(e,t){var n=(0,c.useBackend)(t).act,a=(0,c.useLocalState)(t,"hoveredItem",{}),l=a[0],d=a[1],u=l&&l.cost||0;return e.items.map((function(n){var o=(0,c.useLocalState)(t,"amount"+n.name,1),r=o[0],a=o[1],i=l&&l.name!==n.name,d=e.biomass-u*l.amountV,onClick:function(){return d("select",{item:e.id})}})})]}),e.desc]},e.name)}))})]})]})]})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.buying,u=l.ltsrbt_built,s=l.money;if(!d)return null;var m=l.delivery_methods.map((function(e){var t=l.delivery_method_description[e.name];return Object.assign({},e,{description:t})}));return(0,o.createComponentVNode)(2,a.Modal,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex,{mb:1,children:m.map((function(e){return"LTSRBT"!==e.name||u?(0,o.createComponentVNode)(2,a.Flex.Item,{mx:1,width:"250px",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"30px",children:e.name}),(0,o.createComponentVNode)(2,a.Box,{mt:1,children:e.description}),(0,o.createComponentVNode)(2,a.Button,{mt:2,content:(0,c.formatMoney)(e.price)+" cr",disabled:s=0||(r[n]=e[n]);return r}(t,["res","value"]),a=l(n),c=a[0],i=a[1];return(0,o.normalizeProps)((0,o.createVNode)(1,"canvas",null,"Canvas failed to render.",16,Object.assign({width:28*c||300,height:28*i||300},r,{onClick:function(t){return e.clickwrapper(t)}}),null,this.canvasRef))},r}(o.Component),l=function(e){var t=e.length;return[t,0!==t?e[0].length:0]};t.Canvas=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=l(u.grid),m=s[0],p=s[1];return(0,o.createComponentVNode)(2,c.Window,{width:Math.min(400,28*m*32+24),height:Math.min(400,28*p*32+24),resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:[(0,o.createComponentVNode)(2,i,{value:u.grid,onCanvasClick:function(e,t){return d("paint",{x:e,y:t})}}),(0,o.createComponentVNode)(2,a.Box,{children:[!u.finalized&&(0,o.createComponentVNode)(2,a.Button.Confirm,{onClick:function(){return d("finalize")},content:"Finalize"}),u.name]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CargoBountyConsole=void 0;var o=n(0),r=n(2),a=n(1),c=n(39),i=n(3);t.CargoBountyConsole=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data.bountydata,u=void 0===d?[]:d;return(0,o.createComponentVNode)(2,i.Window,{width:750,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,l),buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print Bounty List",onClick:function(){return c("Print")}}),children:(0,o.createComponentVNode)(2,a.Table,{border:!0,children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,italic:!0,color:"label",fontSize:1.25,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{p:1,textAlign:"center",children:"Bounty Object"}),(0,o.createComponentVNode)(2,a.Table.Cell,{p:1,textAlign:"center",children:"Description"}),(0,o.createComponentVNode)(2,a.Table.Cell,{p:1,textAlign:"center",children:"Progress"}),(0,o.createComponentVNode)(2,a.Table.Cell,{p:1,textAlign:"center",children:"Value"}),(0,o.createComponentVNode)(2,a.Table.Cell,{p:1,textAlign:"center",children:"Claim"})]}),u.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{backgroundColor:1===e.priority?"rgba(252, 152, 3, 0.25)":"",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,p:1,children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{italic:!0,textAlign:"center",p:1,children:e.description}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,p:1,textAlign:"center",children:[1===e.priority?(0,o.createComponentVNode)(2,a.Box,{children:"High Priority"}):"",e.completion_string]}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,p:1,textAlign:"center",children:e.reward_string}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,p:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:1===e.claimed?"check":"",content:1===e.claimed?"Claimed":"Claim",disabled:1===e.claimed,color:1===e.can_claim?"green":"red",onClick:function(){return c("ClaimBounty",{bounty:e.bounty_ref})}})})]},e.name)}))]})})})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.stored_cash);return(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:i,format:function(e){return(0,c.formatMoney)(e)}})," credits"]})}},function(e,t,n){"use strict";t.__esModule=!0,t.CargoExpress=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=n(203),l=n(64);t.CargoExpress=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data);return(0,o.createComponentVNode)(2,c.Window,{width:600,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l.InterfaceLockNoticeBox,{accessText:"a QM-level ID card"}),!a.locked&&(0,o.createComponentVNode)(2,d)]})})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Cargo Express",buttons:(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(l.points)})," credits"]}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Landing Location",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Cargo Bay",selected:!l.usingBeacon,onClick:function(){return c("LZCargo")}}),(0,o.createComponentVNode)(2,a.Button,{selected:l.usingBeacon,disabled:!l.hasBeacon,onClick:function(){return c("LZBeacon")},children:[l.beaconzone," (",l.beaconName,")"]}),(0,o.createComponentVNode)(2,a.Button,{content:l.printMsg,disabled:!l.canBuyBeacon,onClick:function(){return c("printBeacon")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Notice",children:l.message})]})}),(0,o.createComponentVNode)(2,i.CargoCatalog,{express:!0})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.CargoHoldTerminal=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.CargoHoldTerminal=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.points,u=l.pad,s=l.sending,m=l.status_report;return(0,o.createComponentVNode)(2,c.Window,{width:600,height:230,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Cargo Value",children:(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(d)})," credits"]})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Cargo Pad",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Recalculate Value",disabled:!u,onClick:function(){return i("recalc")}}),(0,o.createComponentVNode)(2,a.Button,{icon:s?"times":"arrow-up",content:s?"Stop Sending":"Send Goods",selected:s,disabled:!u,onClick:function(){return i(s?"stop":"send")}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:u?"good":"bad",children:u?"Online":"Not Found"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cargo Report",children:m})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CellularEmporium=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.CellularEmporium=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.abilities;return(0,o.createComponentVNode)(2,c.Window,{width:900,height:480,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Genetic Points",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"undo",content:"Readapt",disabled:!l.can_readapt,onClick:function(){return i("readapt")}}),children:l.genetic_points_remaining})})}),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{className:"candystripe",label:e.name,buttons:(0,o.createFragment)([e.dna_cost," ",(0,o.createComponentVNode)(2,a.Button,{content:e.owned?"Evolved":"Evolve",selected:e.owned,onClick:function(){return i("evolve",{name:e.name})}})],0),children:[e.desc,(0,o.createComponentVNode)(2,a.Box,{color:"good",children:e.helptext})]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CentcomPodLauncher=void 0;var o=n(0),r=n(9),a=n(6),c=n(79),i=(n(19),n(204)),l=n(2),d=n(1),u=n(3);function s(e,t,n,o,r,a,c){try{var i=e[a](c),l=i.value}catch(d){return void n(d)}i.done?t(l):Promise.resolve(l).then(o,r)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(o,r){var a=e.apply(t,n);function c(e){s(a,o,r,c,i,"next",e)}function i(e){s(a,o,r,c,i,"throw",e)}c(undefined)}))}}var p={color:"grey"},C=function(e){var t=(0,l.useLocalState)(e,"compact",!1),n=t[0],o=t[1];return[n,function(){return o(!n)}]};t.CentcomPodLauncher=function(e,t){var n=C(t)[0];return(0,o.createComponentVNode)(2,u.Window,{resizable:!0,title:n?"Use against Helen Weinstein":"Supply Pod Menu (Use against Helen Weinstein)",overflow:"hidden",width:n?435:690,height:n?360:440,children:(0,o.createComponentVNode)(2,h)},"CPL_"+n)};var h=function(e,t){var n=C(t)[0];return(0,o.createComponentVNode)(2,u.Window.Content,{children:(0,o.createComponentVNode)(2,d.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,d.Flex.Item,{grow:0,shrink:0,children:(0,o.createComponentVNode)(2,L)}),(0,o.createComponentVNode)(2,d.Flex.Item,{mt:1,grow:1,children:(0,o.createComponentVNode)(2,d.Flex,{height:"100%",children:[(0,o.createComponentVNode)(2,d.Flex.Item,{grow:1,shrink:0,basis:"13em",children:(0,o.createComponentVNode)(2,d.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,d.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,S)}),(0,o.createComponentVNode)(2,d.Flex.Item,{mt:1,grow:0,children:(0,o.createComponentVNode)(2,y)}),(0,o.createComponentVNode)(2,d.Flex.Item,{mt:1,children:(0,o.createComponentVNode)(2,d.Section,{children:(0,o.createComponentVNode)(2,I)})})]})}),!n&&(0,o.createComponentVNode)(2,d.Flex.Item,{ml:1,grow:3,children:(0,o.createComponentVNode)(2,x)}),(0,o.createComponentVNode)(2,d.Flex.Item,{ml:1,basis:"8em",children:(0,o.createComponentVNode)(2,d.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,d.Flex.Item,{children:(0,o.createComponentVNode)(2,A)}),(0,o.createComponentVNode)(2,d.Flex.Item,{mt:1,grow:1,children:(0,o.createComponentVNode)(2,P)}),!n&&(0,o.createComponentVNode)(2,d.Flex.Item,{mt:1,children:(0,o.createComponentVNode)(2,R)})]})}),(0,o.createComponentVNode)(2,d.Flex.Item,{ml:1,basis:"11em",children:(0,o.createComponentVNode)(2,T)})]})})]})})},N=[{title:"View Pod",component:function(){return B}},{title:"View Bay",component:function(){return _}},{title:"View Dropoff Location",component:function(){return w}}],V=[{title:"Mobs",icon:"user"},{title:"Unanchored\nObjects",key:"Unanchored",icon:"cube"},{title:"Anchored\nObjects",key:"Anchored",icon:"anchor"},{title:"Under-Floor",key:"Underfloor",icon:"eye-slash"},{title:"Wall-Mounted",key:"Wallmounted",icon:"link"},{title:"Floors",icon:"border-all"},{title:"Walls",icon:"square"}],b=[{title:"Pre",tooltip:"Time until pod gets to station"},{title:"Fall",tooltip:"Duration of pods\nfalling animation"},{title:"Open",tooltip:"Time it takes pod to open after landing"},{title:"Exit",tooltip:"Time for pod to\nleave after opening"}],f=[{title:"Fall",act:"fallingSound",tooltip:"Plays while pod falls, timed\nto end when pod lands"},{title:"Land",act:"landingSound",tooltip:"Plays after pod lands"},{title:"Open",act:"openingSound",tooltip:"Plays when pod opens"},{title:"Exit",act:"leavingSound",tooltip:"Plays when pod leaves"}],g=[{title:"Standard"},{title:"Advanced"},{title:"Nanotrasen"},{title:"Syndicate"},{title:"Deathsquad"},{title:"Cultist"},{title:"Missile"},{title:"Syndie Missile"},{title:"Supply Box"},{title:"Clown Pod"},{title:"Fruit"},{title:"Invisible"},{title:"Gondola"},{title:"Seethrough"}],v=[{title:"1"},{title:"2"},{title:"3"},{title:"4"},{title:"ERT"}],k=[{list:[{title:"Launch All Turfs",icon:"globe",choiceNumber:0,selected:"launchChoice",act:"launchAll"},{title:"Launch Turf Ordered",icon:"sort-amount-down-alt",choiceNumber:1,selected:"launchChoice",act:"launchOrdered"},{title:"Pick Random Turf",icon:"dice",choiceNumber:2,selected:"launchChoice",act:"launchRandomTurf"},{divider:1},{title:"Launch Whole Turf",icon:"expand",choiceNumber:0,selected:"launchRandomItem",act:"launchWholeTurf"},{title:"Pick Random Item",icon:"dice",choiceNumber:1,selected:"launchRandomItem",act:"launchRandomItem"},{divider:1},{title:"Clone",icon:"clone",soloSelected:"launchClone",act:"launchClone"}],label:"Load From",alt_label:"Load",tooltipPosition:"right"},{list:[{title:"Specific Target",icon:"user-check",soloSelected:"effectTarget",act:"effectTarget"},{title:"Pod Stays",icon:"hand-paper",choiceNumber:0,selected:"effectBluespace",act:"effectBluespace"},{title:"Stealth",icon:"user-ninja",soloSelected:"effectStealth",act:"effectStealth"},{title:"Quiet",icon:"volume-mute",soloSelected:"effectQuiet",act:"effectQuiet"},{title:"Missile Mode",icon:"rocket",soloSelected:"effectMissile",act:"effectMissile"},{title:"Burst Launch",icon:"certificate",soloSelected:"effectBurst",act:"effectBurst"},{title:"Any Descent Angle",icon:"ruler-combined",soloSelected:"effectCircle",act:"effectCircle"},{title:"No Ghost Alert\n(If you dont want to\nentertain bored ghosts)",icon:"ghost",choiceNumber:0,selected:"effectAnnounce",act:"effectAnnounce"}],label:"Normal Effects",tooltipPosition:"bottom"},{list:[{title:"Explosion Custom",icon:"bomb",choiceNumber:1,selected:"explosionChoice",act:"explosionCustom"},{title:"Adminbus Explosion\nWhat are they gonna do, ban you?",icon:"bomb",choiceNumber:2,selected:"explosionChoice",act:"explosionBus"},{divider:1},{title:"Custom Damage",icon:"skull",choiceNumber:1,selected:"damageChoice",act:"damageCustom"},{title:"Gib",icon:"skull-crossbones",choiceNumber:2,selected:"damageChoice",act:"damageGib"},{divider:1},{title:"Projectile Cloud",details:!0,icon:"cloud-meatball",soloSelected:"effectShrapnel",act:"effectShrapnel"},{title:"Stun",icon:"sun",soloSelected:"effectStun",act:"effectStun"},{title:"Delimb",icon:"socks",soloSelected:"effectLimb",act:"effectLimb"},{title:"Yeet Organs",icon:"book-dead",soloSelected:"effectOrgans",act:"effectOrgans"}],label:"Harmful Effects",tooltipPosition:"bottom"}],x=function(e,t){var n=(0,l.useBackend)(t),r=n.act,a=n.data,c=(0,l.useLocalState)(t,"tabPageIndex",1),i=c[0],u=c[1],s=a.mapRef,m=N[i].component();return(0,o.createComponentVNode)(2,d.Section,{title:"View",fill:!0,buttons:(0,o.createFragment)([!!a.customDropoff&&1===a.effectReverse&&(0,o.createComponentVNode)(2,d.Button,{inline:!0,color:"transparent",tooltip:"View Dropoff Location",icon:"arrow-circle-down",selected:2===i,onClick:function(){u(2),r("tabSwitch",{tabIndex:2})}}),(0,o.createComponentVNode)(2,d.Button,{inline:!0,color:"transparent",tooltip:"View Pod",icon:"rocket",selected:0===i,onClick:function(){u(0),r("tabSwitch",{tabIndex:0})}}),(0,o.createComponentVNode)(2,d.Button,{inline:!0,color:"transparent",tooltip:"View Source Bay",icon:"th",selected:1===i,onClick:function(){u(1),r("tabSwitch",{tabIndex:1})}}),(0,o.createVNode)(1,"span",null,"|",16,{style:p}),!!a.customDropoff&&1===a.effectReverse&&(0,o.createComponentVNode)(2,d.Button,{inline:!0,color:"transparent",icon:"lightbulb",selected:a.renderLighting,tooltip:"Render Lighting for the dropoff view",onClick:function(){r("renderLighting"),r("refreshView")}}),(0,o.createComponentVNode)(2,d.Button,{inline:!0,color:"transparent",icon:"sync-alt",tooltip:"Refresh view window in case it breaks",onClick:function(){u(i),r("refreshView")}})],0),children:(0,o.createComponentVNode)(2,d.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,d.Flex.Item,{m:.5,children:(0,o.createComponentVNode)(2,m)}),(0,o.createComponentVNode)(2,d.Flex.Item,{m:.5,grow:1,children:(0,o.createComponentVNode)(2,d.Section,{fill:!0,children:(0,o.createComponentVNode)(2,d.ByondUi,{fillPositionedParent:!0,params:{zoom:0,id:s,type:"map"}})})})]})})},B=function(e,t){return(0,o.createComponentVNode)(2,d.Box,{color:"label",children:["Note: You can right click on this",(0,o.createVNode)(1,"br"),"blueprint pod and edit vars directly"]})},_=function(e,t){var n=(0,l.useBackend)(t),r=n.act,a=n.data;n.config;return(0,o.createFragment)([(0,o.createComponentVNode)(2,d.Button,{content:"Teleport",icon:"street-view",onClick:function(){return r("teleportCentcom")}}),(0,o.createComponentVNode)(2,d.Button,{content:a.oldArea?a.oldArea.substring(0,17):"Go Back",disabled:!a.oldArea,icon:"undo-alt",onClick:function(){return r("teleportBack")}})],4)},w=function(e,t){var n=(0,l.useBackend)(t),r=n.act,a=n.data;n.config,a.mapRef;return(0,o.createFragment)([(0,o.createComponentVNode)(2,d.Button,{content:"Teleport",icon:"street-view",onClick:function(){return r("teleportDropoff")}}),(0,o.createComponentVNode)(2,d.Button,{content:a.oldArea?a.oldArea.substring(0,17):"Go Back",disabled:!a.oldArea,icon:"undo-alt",onClick:function(){return r("teleportBack")}})],4)},L=function(e,t){var n=(0,l.useBackend)(t),r=n.act,a=n.data,c=C(t),i=c[0],u=c[1];return(0,o.createComponentVNode)(2,d.Section,{fill:!0,width:"100%",children:(0,o.createComponentVNode)(2,d.Flex,{children:k.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,d.Flex.Item,{children:[(0,o.createComponentVNode)(2,d.Box,{bold:!0,color:"label",mb:1,children:[1===i&&e.alt_label?e.alt_label:e.label,":"]}),(0,o.createComponentVNode)(2,d.Box,{children:e.list.map((function(t,n){return(0,o.createFragment)([t.divider&&(0,o.createVNode)(1,"span",null,(0,o.createVNode)(1,"b",null,"|",16),2,{style:p}),!t.divider&&(0,o.createComponentVNode)(2,d.Button,{tooltip:t.details&&a.effectShrapnel?t.title+"\n"+a.shrapnelType+"\nMagnitude:"+a.shrapnelMagnitude:t.title,tooltipPosition:e.tooltipPosition,tooltipOverrideLong:!0,icon:t.icon,content:t.content,selected:t.soloSelected?a[t.soloSelected]:a[t.selected]===t.choiceNumber,onClick:function(){return 0!==a.payload?r(t.act,t.payload):r(t.act)},style:{"vertical-align":"middle","margin-left":0!==n?"1px":"0px","margin-right":n!==e.list.length-1?"1px":"0px","border-radius":"5px"}})],0,n)}))})]}),t=g.length-2?t%2==1?"top-left":"top-right":t%2==1?"bottom-left":"bottom-right",tooltip:e.title,style:{"vertical-align":"middle","margin-right":"5px","border-radius":"20px"},selected:c.styleChoice-1===t,onClick:function(){return r("setStyle",{style:t})},children:(0,o.createComponentVNode)(2,d.Box,{className:(0,a.classes)(["supplypods64x64","pod_asset"+(t+1)]),style:{transform:"rotate(45deg) translate(-25%,-10%)","pointer-events":"none"}})},t)}))})},A=function(e,t){var n=(0,l.useBackend)(t),r=n.act,a=n.data;C(t)[0];return(0,o.createComponentVNode)(2,d.Section,{fill:!0,title:"Bay",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,d.Button,{icon:"trash",color:"transparent",tooltip:"Clears everything\nfrom the selected bay",tooltipOverrideLong:!0,tooltipPosition:"bottom-right",onClick:function(){return r("clearBay")}}),(0,o.createComponentVNode)(2,d.Button,{icon:"question",color:"transparent",tooltip:'Each option corresponds\nto an area on centcom.\nLaunched pods will\nbe filled with items\nin these areas according\nto the "Load from Bay"\noptions at the top left.',tooltipOverrideLong:!0,tooltipPosition:"bottom-right"})],4),children:v.map((function(e,t){return(0,o.createComponentVNode)(2,d.Button,{content:e.title,tooltipPosition:"bottom-right",selected:a.bayNumber===""+(t+1),onClick:function(){return r("switchBay",{bayNumber:""+(t+1)})}},t)}))})},P=function(e,t){var n=(0,l.useBackend)(t),a=n.act,c=n.data;return(0,o.createComponentVNode)(2,d.Section,{fill:!0,title:"Delay",buttons:(0,o.createComponentVNode)(2,d.Button,{icon:"undo",color:"transparent",tooltip:"Reset all pod\ntimings/delays",tooltipOverrideLong:!0,tooltipPosition:"bottom-right",onClick:function(){return a("resetTiming")}}),children:(0,o.createComponentVNode)(2,d.LabeledControls,{wrap:!0,children:b.map((function(e,t){return(0,o.createComponentVNode)(2,d.LabeledControls.Item,{label:e.title,children:(0,o.createComponentVNode)(2,d.Knob,{inline:!0,step:.02,value:c["delay_"+(t+1)]/10,unclamped:!0,minValue:0,unit:"s",format:function(e){return(0,r.toFixed)(e,2)},maxValue:10,color:c["delay_"+(t+1)]/10>10?"orange":"default",onDrag:function(e,n){a("editTiming",{timer:t+1,value:Math.max(n,0)})}})},t)}))})})},R=function(e,t){var n=(0,l.useBackend)(t),r=n.act,a=n.data;return(0,o.createComponentVNode)(2,d.Section,{fill:!0,title:"Sounds",buttons:(0,o.createComponentVNode)(2,d.Button,{icon:"volume-up",color:"transparent",selected:a.soundVolume!==a.defaultSoundVolume,tooltip:"Sound Volume:"+a.soundVolume,tooltipOverrideLong:!0,onClick:function(){return r("soundVolume")}}),children:f.map((function(e,t){return(0,o.createComponentVNode)(2,d.Button,{content:e.title,tooltip:e.tooltip,tooltipPosition:"top-right",tooltipOverrideLong:!0,selected:a[e.act],onClick:function(){return r(e.act)}},t)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemAcclimator=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.ChemAcclimator=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:320,height:271,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Acclimator",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Temperature",children:[l.chem_temp," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Temperature",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:l.target_temperature,unit:"K",width:"59px",minValue:0,maxValue:1e3,step:5,stepPixelSize:2,onChange:function(e,t){return i("set_target_temperature",{temperature:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Acceptable Temp. Difference",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:l.allowed_temperature_difference,unit:"K",width:"59px",minValue:1,maxValue:l.target_temperature,stepPixelSize:2,onChange:function(e,t){i("set_allowed_temperature_difference",{temperature:t})}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:l.enabled?"On":"Off",selected:l.enabled,onClick:function(){return i("toggle_power")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Volume",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:l.max_volume,unit:"u",width:"50px",minValue:l.reagent_volume,maxValue:200,step:2,stepPixelSize:2,onChange:function(e,t){return i("change_volume",{volume:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Operation",children:l.acclimate_state}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current State",children:l.emptying?"Emptying":"Filling"})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemDebugSynthesizer=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.ChemDebugSynthesizer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.amount,u=l.beakerCurrentVolume,s=l.beakerMaxVolume,m=l.isBeakerLoaded,p=l.beakerContents,C=void 0===p?[]:p;return(0,o.createComponentVNode)(2,c.Window,{width:390,height:330,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Recipient",buttons:m?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",onClick:function(){return i("ejectBeaker")}}),(0,o.createComponentVNode)(2,a.NumberInput,{value:d,unit:"u",minValue:1,maxValue:s,step:1,stepPixelSize:2,onChange:function(e,t){return i("amount",{amount:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"plus",content:"Input",onClick:function(){return i("input")}})],4):(0,o.createComponentVNode)(2,a.Button,{icon:"plus",content:"Create Beaker",onClick:function(){return i("makecup")}}),children:m?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u})," / "+s+" u"]}),C.length>0?(0,o.createComponentVNode)(2,a.LabeledList,{children:C.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[e.volume," u"]},e.name)}))}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Recipient Empty"})],0):(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No Recipient"})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemDispenser=void 0;var o=n(0),r=n(9),a=n(19),c=n(2),i=n(1),l=n(3);t.ChemDispenser=function(e,t){var n=(0,c.useBackend)(t),d=n.act,u=n.data,s=!!u.recordingRecipe,m=Object.keys(u.recipes).map((function(e){return{name:e,contents:u.recipes[e]}})),p=u.beakerTransferAmounts||[],C=s&&Object.keys(u.recordingRecipe).map((function(e){return{id:e,name:(0,a.toTitleCase)(e.replace(/_/," ")),volume:u.recordingRecipe[e]}}))||u.beakerContents||[];return(0,o.createComponentVNode)(2,l.Window,{width:565,height:620,resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:"Status",buttons:s&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,mx:1,color:"red",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"circle",mr:1}),"Recording"]}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Energy",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:u.energy/u.maxEnergy,children:(0,r.toFixed)(u.energy)+" units"})})})}),(0,o.createComponentVNode)(2,i.Section,{title:"Recipes",buttons:(0,o.createFragment)([!s&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,mx:1,children:(0,o.createComponentVNode)(2,i.Button,{color:"transparent",content:"Clear recipes",onClick:function(){return d("clear_recipes")}})}),!s&&(0,o.createComponentVNode)(2,i.Button,{icon:"circle",disabled:!u.isBeakerLoaded,content:"Record",onClick:function(){return d("record_recipe")}}),s&&(0,o.createComponentVNode)(2,i.Button,{icon:"ban",color:"transparent",content:"Discard",onClick:function(){return d("cancel_recording")}}),s&&(0,o.createComponentVNode)(2,i.Button,{icon:"save",color:"green",content:"Save",onClick:function(){return d("save_recording")}})],0),children:(0,o.createComponentVNode)(2,i.Box,{mr:-1,children:[m.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:"tint",width:"129.5px",lineHeight:1.75,content:e.name,onClick:function(){return d("dispense_recipe",{recipe:e.name})}},e.name)})),0===m.length&&(0,o.createComponentVNode)(2,i.Box,{color:"light-gray",children:"No recipes."})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Dispense",buttons:p.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:"plus",selected:e===u.amount,content:e,onClick:function(){return d("amount",{target:e})}},e)})),children:(0,o.createComponentVNode)(2,i.Box,{mr:-1,children:u.chemicals.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:"tint",width:"129.5px",lineHeight:1.75,content:e.title,onClick:function(){return d("dispense",{reagent:e.id})}},e.id)}))})}),(0,o.createComponentVNode)(2,i.Section,{title:"Beaker",buttons:p.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:"minus",disabled:s,content:e,onClick:function(){return d("remove",{amount:e})}},e)})),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Beaker",buttons:!!u.isBeakerLoaded&&(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject",disabled:!u.isBeakerLoaded,onClick:function(){return d("eject")}}),children:(s?"Virtual beaker":u.isBeakerLoaded&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.AnimatedNumber,{initial:0,value:u.beakerCurrentVolume}),(0,o.createTextVNode)("/"),u.beakerMaxVolume,(0,o.createTextVNode)(" units")],0))||"No beaker"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Contents",children:[(0,o.createComponentVNode)(2,i.Box,{color:"label",children:u.isBeakerLoaded||s?0===C.length&&"Nothing":"N/A"}),C.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{color:"label",children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{initial:0,value:e.volume})," ","units of ",e.name]},e.name)})),(0,o.createComponentVNode)(2,i.Box,{children:["pH:",(0,o.createComponentVNode)(2,i.AnimatedNumber,{initial:7,value:u.beakerCurrentpH})]},"pH")]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemFilter=t.ChemFilterPane=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=function(e,t){var n=(0,r.useBackend)(t).act,c=e.title,i=e.list,l=e.reagentName,d=e.onReagentInput,u=c.toLowerCase();return(0,o.createComponentVNode)(2,a.Section,{title:c,minHeight:"240px",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Input,{placeholder:"Reagent",width:"140px",onInput:function(e,t){return d(t)}}),(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"plus",onClick:function(){return n("add",{which:u,name:l})}})],4),children:i.map((function(e){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"minus",content:e,onClick:function(){return n("remove",{which:u,reagent:e})}})],4,e)}))})};t.ChemFilterPane=i;t.ChemFilter=function(e,t){var n=(0,r.useBackend)(t),l=(n.act,n.data),d=l.left,u=void 0===d?[]:d,s=l.right,m=void 0===s?[]:s,p=(0,r.useLocalState)(t,"leftName",""),C=p[0],h=p[1],N=(0,r.useLocalState)(t,"rightName",""),V=N[0],b=N[1];return(0,o.createComponentVNode)(2,c.Window,{width:500,height:300,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i,{title:"Left",list:u,reagentName:C,onReagentInput:function(e){return h(e)}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i,{title:"Right",list:m,reagentName:V,onReagentInput:function(e){return b(e)}})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemHeater=void 0;var o=n(0),r=n(9),a=n(2),c=n(1),i=n(3),l=n(205);t.ChemHeater=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data,s=u.targetTemp,m=u.isActive,p=u.isBeakerLoaded,C=u.currentTemp,h=u.beakerCurrentVolume,N=u.beakerMaxVolume,V=u.beakerContents,b=void 0===V?[]:V;return(0,o.createComponentVNode)(2,i.Window,{width:300,height:320,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{title:"Thermostat",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:m?"power-off":"times",selected:m,content:m?"On":"Off",onClick:function(){return d("power")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Target",children:(0,o.createComponentVNode)(2,c.NumberInput,{width:"65px",unit:"K",step:10,stepPixelSize:3,value:(0,r.round)(s),minValue:0,maxValue:1e3,onDrag:function(e,t){return d("temperature",{target:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Reading",children:(0,o.createComponentVNode)(2,c.Box,{width:"60px",textAlign:"right",children:p&&(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:C,format:function(e){return(0,r.toFixed)(e)+" K"}})||"\u2014"})})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Beaker",buttons:!!p&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:"label",mr:2,children:[h," / ",N," units"]}),(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject",onClick:function(){return d("eject")}})],4),children:[(0,o.createComponentVNode)(2,l.BeakerContents,{beakerLoaded:p,beakerContents:b}),(0,o.createComponentVNode)(2,c.Box,{color:"label",children:[Number(u.currentpH).toFixed(u.partRating)," pH"]},"pH")]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemMaster=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.ChemMaster=function(e,t){var n=(0,r.useBackend)(t).data.screen;return(0,o.createComponentVNode)(2,c.Window,{width:465,height:550,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:"analyze"===n&&(0,o.createComponentVNode)(2,m)||(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,u=i.screen,p=i.beakerContents,C=void 0===p?[]:p,h=i.bufferContents,N=void 0===h?[]:h,V=i.beakerCurrentVolume,b=i.beakerMaxVolume,f=i.isBeakerLoaded,g=i.isPillBottleLoaded,v=i.pillBottleCurrentAmount,k=i.pillBottleMaxAmount;return"analyze"===u?(0,o.createComponentVNode)(2,m):(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Beaker",buttons:!!i.isBeakerLoaded&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mr:2,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:V,initial:0})," / "+b+" units"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",onClick:function(){return c("eject")}})],4),children:[!f&&(0,o.createComponentVNode)(2,a.Box,{color:"label",mt:"3px",mb:"5px",children:"No beaker loaded."}),!!f&&0===C.length&&(0,o.createComponentVNode)(2,a.Box,{color:"label",mt:"3px",mb:"5px",children:"Beaker is empty."}),(0,o.createComponentVNode)(2,l,{children:C.map((function(e){return(0,o.createComponentVNode)(2,d,{chemical:e,transferTo:"buffer"},e.id)}))})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Buffer",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mr:1,children:"Mode:"}),(0,o.createComponentVNode)(2,a.Button,{color:i.mode?"good":"bad",icon:i.mode?"exchange-alt":"times",content:i.mode?"Transfer":"Destroy",onClick:function(){return c("toggleMode")}})],4),children:[0===N.length&&(0,o.createComponentVNode)(2,a.Box,{color:"label",mt:"3px",mb:"5px",children:"Buffer is empty."}),(0,o.createComponentVNode)(2,l,{children:N.map((function(e){return(0,o.createComponentVNode)(2,d,{chemical:e,transferTo:"beaker"},e.id)}))})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Packaging",children:(0,o.createComponentVNode)(2,s)}),!!g&&(0,o.createComponentVNode)(2,a.Section,{title:"Pill Bottle",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mr:2,children:[v," / ",k," pills"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",onClick:function(){return c("ejectPillBottle")}})],4)})],0)},l=a.Table,d=function(e,t){var n=(0,r.useBackend)(t).act,c=e.chemical,i=e.transferTo;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{color:"label",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:c.volume,initial:0})," units of "+c.name]}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:[(0,o.createComponentVNode)(2,a.Button,{content:"1",onClick:function(){return n("transfer",{id:c.id,amount:1,to:i})}}),(0,o.createComponentVNode)(2,a.Button,{content:"5",onClick:function(){return n("transfer",{id:c.id,amount:5,to:i})}}),(0,o.createComponentVNode)(2,a.Button,{content:"10",onClick:function(){return n("transfer",{id:c.id,amount:10,to:i})}}),(0,o.createComponentVNode)(2,a.Button,{content:"All",onClick:function(){return n("transfer",{id:c.id,amount:1e3,to:i})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"ellipsis-h",title:"Custom amount",onClick:function(){return n("transfer",{id:c.id,amount:-1,to:i})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"question",title:"Analyze",onClick:function(){return n("analyze",{id:c.id})}})]})]},c.id)},u=function(e){var t=e.label,n=e.amountUnit,r=e.amount,c=e.onChangeAmount,i=e.onCreate,l=e.sideNote;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:t,children:[(0,o.createComponentVNode)(2,a.NumberInput,{width:"84px",unit:n,step:1,stepPixelSize:15,value:r,minValue:1,maxValue:20,onChange:c}),(0,o.createComponentVNode)(2,a.Button,{ml:1,content:"Create",onClick:i}),(0,o.createComponentVNode)(2,a.Box,{inline:!0,ml:1,color:"label",children:l})]})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(0,r.useSharedState)(t,"pillAmount",1),d=l[0],s=l[1],m=(0,r.useSharedState)(t,"patchAmount",1),p=m[0],C=m[1],h=(0,r.useSharedState)(t,"bottleAmount",1),N=h[0],V=h[1],b=(0,r.useSharedState)(t,"packAmount",1),f=b[0],g=b[1],v=(0,r.useSharedState)(t,"setvialAmount",1),k=v[0],x=v[1],B=(0,r.useSharedState)(t,"setdartAmount",1),_=B[0],w=B[1],L=i.condi,y=i.chosenPillStyle,S=i.pillStyles,I=void 0===S?[]:S;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[!L&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pill type",children:I.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{width:"30px",selected:e.id===y,textAlign:"center",color:"transparent",onClick:function(){return c("pillStyle",{id:e.id})},children:(0,o.createComponentVNode)(2,a.Box,{mx:-1,className:e.className})},e.id)}))}),!L&&(0,o.createComponentVNode)(2,u,{label:"Pills",amount:d,amountUnit:"pills",sideNote:"max 50u",onChangeAmount:function(e,t){return s(t)},onCreate:function(){return c("create",{type:"pill",amount:d,volume:"auto"})}}),!L&&(0,o.createComponentVNode)(2,u,{label:"Patches",amount:p,amountUnit:"patches",sideNote:"max 40u",onChangeAmount:function(e,t){return C(t)},onCreate:function(){return c("create",{type:"patch",amount:p,volume:"auto"})}}),!L&&(0,o.createComponentVNode)(2,u,{label:"Bottles",amount:N,amountUnit:"bottles",sideNote:"max 30u",onChangeAmount:function(e,t){return V(t)},onCreate:function(){return c("create",{type:"bottle",amount:N,volume:"auto"})}}),!L&&(0,o.createComponentVNode)(2,u,{label:"Hypovials",amount:k,amountUnit:"vials",sideNote:"max 60u",onChangeAmount:function(e,t){return x(t)},onCreate:function(){return c("create",{type:"hypoVial",amount:k,volume:"auto"})}}),!L&&(0,o.createComponentVNode)(2,u,{label:"Smartdarts",amount:_,amountUnit:"darts",sideNote:"max 20u",onChangeAmount:function(e,t){return w(t)},onCreate:function(){return c("create",{type:"smartDart",amount:_,volume:"auto"})}}),!!L&&(0,o.createComponentVNode)(2,u,{label:"Packs",amount:f,amountUnit:"packs",sideNote:"max 10u",onChangeAmount:function(e,t){return g(t)},onCreate:function(){return c("create",{type:"condimentPack",amount:f,volume:"auto"})}}),!!L&&(0,o.createComponentVNode)(2,u,{label:"Bottles",amount:N,amountUnit:"bottles",sideNote:"max 50u",onChangeAmount:function(e,t){return V(t)},onCreate:function(){return c("create",{type:"condimentBottle",amount:N,volume:"auto"})}})]})},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.fermianalyze,d=i.analyzeVars;return(0,o.createComponentVNode)(2,a.Section,{title:"Analysis Results",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Back",onClick:function(){return c("goScreen",{screen:"home"})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:d.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"State",children:d.state}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Color",children:[(0,o.createComponentVNode)(2,a.ColorBox,{color:d.color,mr:1}),d.color]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:d.description}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Metabolization Rate",children:[d.metaRate," u/minute"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Overdose Threshold",children:d.overD}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Addiction Threshold",children:d.addicD}),!!l&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Purity",children:d.purityF}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inverse Ratio",children:d.inverseRatioF}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Purity E",children:d.purityE}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Lower Optimal Temperature",children:d.minTemp}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Upper Optimal Temperature",children:d.maxTemp}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Explosive Temperature",children:d.eTemp}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"pH Peak",children:d.pHpeak})],4)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemPress=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.ChemPress=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.current_volume,u=l.product_name,s=l.pill_style,m=l.pill_styles,p=void 0===m?[]:m,C=l.product,h=l.min_volume,N=l.max_volume;return(0,o.createComponentVNode)(2,c.Window,{width:300,height:227,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Product",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{content:"Pills",checked:"pill"===C,onClick:function(){return i("change_product",{product:"pill"})}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{content:"Patches",checked:"patch"===C,onClick:function(){return i("change_product",{product:"patch"})}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{content:"Bottles",checked:"bottle"===C,onClick:function(){return i("change_product",{product:"bottle"})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Volume",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:d,unit:"u",width:"43px",minValue:h,maxValue:N,step:1,stepPixelSize:2,onChange:function(e,t){return i("change_current_volume",{volume:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:[(0,o.createComponentVNode)(2,a.Input,{value:u,placeholder:u,onChange:function(e,t){return i("change_product_name",{name:t})}}),(0,o.createComponentVNode)(2,a.Box,{as:"span",children:C})]}),"pill"===C&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Style",children:p.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{width:"30px",selected:e.id===s,textAlign:"center",color:"transparent",onClick:function(){return i("change_pill_style",{id:e.id})},children:(0,o.createComponentVNode)(2,a.Box,{mx:-1,className:e.class_name})},e.id)}))})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemReactionChamber=void 0;var o=n(0),r=n(14),a=n(6),c=n(2),i=n(1),l=n(3);t.ChemReactionChamber=function(e,t){var n=(0,c.useBackend)(t),d=n.act,u=n.data,s=(0,c.useLocalState)(t,"reagentName",""),m=s[0],p=s[1],C=(0,c.useLocalState)(t,"reagentQuantity",1),h=C[0],N=C[1],V=u.emptying,b=u.reagents||[];return(0,o.createComponentVNode)(2,l.Window,{width:250,height:225,resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:"Reagents",buttons:(0,o.createComponentVNode)(2,i.Box,{inline:!0,bold:!0,color:V?"bad":"good",children:V?"Emptying":"Filling"}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createVNode)(1,"tr","LabledList__row",[(0,o.createVNode)(1,"td","LabeledList__cell",(0,o.createComponentVNode)(2,i.Input,{fluid:!0,value:"",placeholder:"Reagent Name",onInput:function(e,t){return p(t)}}),2,{colSpan:"2"}),(0,o.createVNode)(1,"td",(0,a.classes)(["LabeledList__buttons","LabeledList__cell"]),[(0,o.createComponentVNode)(2,i.NumberInput,{value:h,minValue:1,maxValue:100,step:1,stepPixelSize:3,width:"39px",onDrag:function(e,t){return N(t)}}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,mr:1}),(0,o.createComponentVNode)(2,i.Button,{icon:"plus",onClick:function(){return d("add",{chem:m,amount:h})}})],4)],4),(0,r.map)((function(e,t){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:t,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"minus",color:"bad",onClick:function(){return d("remove",{chem:t})}}),children:e},t)}))(b)]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemSplitter=void 0;var o=n(0),r=n(9),a=n(2),c=n(1),i=n(3);t.ChemSplitter=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.straight,s=d.side,m=d.max_transfer;return(0,o.createComponentVNode)(2,i.Window,{width:220,height:105,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Straight",children:(0,o.createComponentVNode)(2,c.NumberInput,{value:u,unit:"u",width:"55px",minValue:1,maxValue:m,format:function(e){return(0,r.toFixed)(e,2)},step:.05,stepPixelSize:4,onChange:function(e,t){return l("set_amount",{target:"straight",amount:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Side",children:(0,o.createComponentVNode)(2,c.NumberInput,{value:s,unit:"u",width:"55px",minValue:1,maxValue:m,format:function(e){return(0,r.toFixed)(e,2)},step:.05,stepPixelSize:4,onChange:function(e,t){return l("set_amount",{target:"side",amount:t})}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemSynthesizer=void 0;var o=n(0),r=n(9),a=n(2),c=n(1),i=n(3);t.ChemSynthesizer=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.amount,s=d.current_reagent,m=d.chemicals,p=void 0===m?[]:m,C=d.possible_amounts,h=void 0===C?[]:C;return(0,o.createComponentVNode)(2,i.Window,{width:300,height:375,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.Box,{children:h.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{icon:"plus",content:(0,r.toFixed)(e,0),selected:e===u,onClick:function(){return l("amount",{target:e})}},(0,r.toFixed)(e,0))}))}),(0,o.createComponentVNode)(2,c.Box,{mt:1,children:p.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{icon:"tint",content:e.title,width:"129px",selected:e.id===s,onClick:function(){return l("select",{reagent:e.id})}},e.id)}))})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CivCargoHoldTerminal=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.CivCargoHoldTerminal=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.pad,s=d.sending,m=d.status_report,p=d.id_inserted,C=d.id_bounty_info;d.id_bounty_value,d.id_bounty_num;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,width:500,height:375,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.NoticeBox,{color:p?"blue":"default",children:p?"Welcome valued employee.":"To begin, insert your ID into the console."}),(0,o.createComponentVNode)(2,a.Section,{title:"Cargo Pad",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:u?"good":"bad",children:u?"Online":"Not Found"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cargo Report",children:m})]})}),(0,o.createComponentVNode)(2,i)]}),(0,o.createComponentVNode)(2,a.Flex.Item,{m:1,children:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"sync",content:"Check Contents",disabled:!u||!p,onClick:function(){return l("recalc")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:s?"times":"arrow-up",content:s?"Stop Sending":"Send Goods",selected:s,disabled:!u||!p,onClick:function(){return l(s?"stop":"send")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:C?"recycle":"pen",color:C?"green":"default",content:C?"Replace Bounty":"New Bounty",disabled:!p,onClick:function(){return l("bounty")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"download",content:"Eject",disabled:!p,onClick:function(){return l("eject")}})],4)})]})})})};var i=function(e,t){var n=(0,r.useBackend)(t).data,c=n.id_bounty_info,i=n.id_bounty_value,l=n.id_bounty_num;return(0,o.createComponentVNode)(2,a.Section,{title:"Bounty Info",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:c||"N/A, please add a new bounty."}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Quantity",children:c?l:"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Value",children:c?i:"N/A"})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ClockworkSlab=void 0;for(var o=n(0),r=n(2),a=n(14),c=n(1),i=n(3),l="",d=0;d=w,tooltip:e.tip,tooltipPosition:"left",onClick:function(){return d("recite",{script:e.type})},children:"Recite "+e.required})}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,disabled:!e.quickbind,onClick:function(){return d("bind",{script:e.type})},children:["content=",e.bound?"Unbind "+e.bound:"Quickbind"]})})]},e.name)}))})]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CodexGigas=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=["Dark","Hellish","Fallen","Fiery","Sinful","Blood","Fluffy"],l=["Lord","Prelate","Count","Viscount","Vizier","Elder","Adept"],d=["hal","ve","odr","neit","ci","quon","mya","folth","wren","geyr","hil","niet","twou","phi","coa"],u=["the Red","the Soulless","the Master","the Lord of all things","Jr."];t.CodexGigas=function(e,t){var n=(0,r.useBackend)(t),s=n.act,m=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:450,height:450,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[m.name,(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Prefix",children:i.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e,disabled:1!==m.currentSection,onClick:function(){return s(e+" ")}},e.toLowerCase())}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e,disabled:m.currentSection>2,onClick:function(){return s(e+" ")}},e.toLowerCase())}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e,disabled:m.currentSection>4,onClick:function(){return s(e)}},e.toLowerCase())}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Suffix",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e,disabled:4!==m.currentSection,onClick:function(){return s(" "+e)}},e.toLowerCase())}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Submit",children:(0,o.createComponentVNode)(2,a.Button,{content:"Search",disabled:m.currentSection<4,onClick:function(){return s("search")}})})]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ComputerFabricator=void 0;var o=n(0),r=(n(19),n(2)),a=n(1),c=n(3);t.ComputerFabricator=function(e,t){var n=(0,r.useBackend)(t),s=n.act,m=n.data;return(0,o.createComponentVNode)(2,c.Window,{title:"Personal Computer Vendor",width:500,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{italic:!0,fontSize:"20px",children:"Your perfect device, only three steps away..."}),0!==m.state&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mb:1,icon:"circle",content:"Clear Order",onClick:function(){return s("clean_order")}}),0===m.state&&(0,o.createComponentVNode)(2,i),1===m.state&&(0,o.createComponentVNode)(2,l),2===m.state&&(0,o.createComponentVNode)(2,d),3===m.state&&(0,o.createComponentVNode)(2,u)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Step 1",minHeight:"306px",children:[(0,o.createComponentVNode)(2,a.Box,{mt:5,bold:!0,textAlign:"center",fontSize:"40px",children:"Choose your Device"}),(0,o.createComponentVNode)(2,a.Box,{mt:3,children:(0,o.createComponentVNode)(2,a.Grid,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"laptop",content:"Laptop",textAlign:"center",fontSize:"30px",lineHeight:2,onClick:function(){return c("pick_device",{pick:"1"})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"tablet-alt",content:"Tablet",textAlign:"center",fontSize:"30px",lineHeight:2,onClick:function(){return c("pick_device",{pick:"2"})}})})]})})]})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Step 2: Customize your device",minHeight:"282px",buttons:(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"good",children:[i.totalprice," cr"]}),children:[(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,position:"relative",children:["Battery:",(0,o.createComponentVNode)(2,a.Tooltip,{content:"Allows your device to operate without external utility power\nsource. Advanced batteries increase battery life.",position:"right"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Standard",selected:1===i.hw_battery,onClick:function(){return c("hw_battery",{battery:"1"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Upgraded",selected:2===i.hw_battery,onClick:function(){return c("hw_battery",{battery:"2"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Advanced",selected:3===i.hw_battery,onClick:function(){return c("hw_battery",{battery:"3"})}})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,position:"relative",children:["Hard Drive:",(0,o.createComponentVNode)(2,a.Tooltip,{content:"Stores file on your device. Advanced drives can store more\nfiles, but use more power, shortening battery life.",position:"right"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Standard",selected:1===i.hw_disk,onClick:function(){return c("hw_disk",{disk:"1"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Upgraded",selected:2===i.hw_disk,onClick:function(){return c("hw_disk",{disk:"2"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Advanced",selected:3===i.hw_disk,onClick:function(){return c("hw_disk",{disk:"3"})}})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,position:"relative",children:["Network Card:",(0,o.createComponentVNode)(2,a.Tooltip,{content:"Allows your device to wirelessly connect to stationwide NTNet\nnetwork. Basic cards are limited to on-station use, while\nadvanced cards can operate anywhere near the station, which\nincludes asteroid outposts",position:"right"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"None",selected:0===i.hw_netcard,onClick:function(){return c("hw_netcard",{netcard:"0"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Standard",selected:1===i.hw_netcard,onClick:function(){return c("hw_netcard",{netcard:"1"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Advanced",selected:2===i.hw_netcard,onClick:function(){return c("hw_netcard",{netcard:"2"})}})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,position:"relative",children:["Nano Printer:",(0,o.createComponentVNode)(2,a.Tooltip,{content:"A device that allows for various paperwork manipulations,\nsuch as, scanning of documents or printing new ones.\nThis device was certified EcoFriendlyPlus and is capable of\nrecycling existing paper for printing purposes.",position:"right"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"None",selected:0===i.hw_nanoprint,onClick:function(){return c("hw_nanoprint",{print:"0"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Standard",selected:1===i.hw_nanoprint,onClick:function(){return c("hw_nanoprint",{print:"1"})}})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,position:"relative",children:["Secondary Card Reader:",(0,o.createComponentVNode)(2,a.Tooltip,{content:"Adds a secondary RFID card reader, for manipulating or\nreading from a second standard RFID card.\nPlease note that a primary card reader is necessary to\nallow the device to read your identification, but one\nis included in the base price.",position:"right"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"None",selected:0===i.hw_card,onClick:function(){return c("hw_card",{card:"0"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Standard",selected:1===i.hw_card,onClick:function(){return c("hw_card",{card:"1"})}})})]}),2!==i.devtype&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,position:"relative",children:["Processor Unit:",(0,o.createComponentVNode)(2,a.Tooltip,{content:"A component critical for your device's functionality.\nIt allows you to run programs from your hard drive.\nAdvanced CPUs use more power, but allow you to run\nmore programs on background at once.",position:"right"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Standard",selected:1===i.hw_cpu,onClick:function(){return c("hw_cpu",{cpu:"1"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Advanced",selected:2===i.hw_cpu,onClick:function(){return c("hw_cpu",{cpu:"2"})}})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,position:"relative",children:["Tesla Relay:",(0,o.createComponentVNode)(2,a.Tooltip,{content:"An advanced wireless power relay that allows your device\nto connect to nearby area power controller to provide\nalternative power source. This component is currently\nunavailable on tablet computers due to size restrictions.",position:"right"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"None",selected:0===i.hw_tesla,onClick:function(){return c("hw_tesla",{tesla:"0"})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Standard",selected:1===i.hw_tesla,onClick:function(){return c("hw_tesla",{tesla:"1"})}})})]})],4)]}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:3,content:"Confirm Order",color:"good",textAlign:"center",fontSize:"18px",lineHeight:2,onClick:function(){return c("confirm_order")}})]})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Step 3: Payment",minHeight:"282px",children:[(0,o.createComponentVNode)(2,a.Box,{italic:!0,textAlign:"center",fontSize:"20px",children:"Your device is ready for fabrication..."}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,mt:2,textAlign:"center",fontSize:"16px",children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,children:"Please insert the required"})," ",(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"good",children:[i.totalprice," cr"]})]}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,mt:1,textAlign:"center",fontSize:"18px",children:"Current:"}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,mt:.5,textAlign:"center",fontSize:"18px",color:i.credits>=i.totalprice?"good":"bad",children:[i.credits," cr"]}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Purchase",disabled:i.credits=10&&e<20?c.COLORS.department.security:e>=20&&e<30?c.COLORS.department.medbay:e>=30&&e<40?c.COLORS.department.science:e>=40&&e<50?c.COLORS.department.engineering:e>=50&&e<60?c.COLORS.department.cargo:e>=200&&e<230?c.COLORS.department.centcom:c.COLORS.department.other},u=function(e){var t=e.type,n=e.value;return(0,o.createComponentVNode)(2,a.Box,{inline:!0,width:2,color:c.COLORS.damageType[t],textAlign:"center",children:n})};t.CrewConsole=function(){return(0,o.createComponentVNode)(2,i.Window,{title:"Crew Monitor",width:800,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{minHeight:"540px",children:(0,o.createComponentVNode)(2,s)})})})};var s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,s=i.sensors||[];return(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,collapsing:!0}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,collapsing:!0,textAlign:"center",children:"Vitals"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Position"}),!!i.link_allowed&&(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,collapsing:!0,children:"Tracking"})]}),s.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:(C=e.ijob,C%10==0),color:d(e.ijob),children:[e.name," (",e.assignment,")"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,a.ColorBox,{color:(t=e.oxydam,n=e.toxdam,r=e.burndam,s=e.brutedam,m=t+n+r+s,p=Math.min(Math.max(Math.ceil(m/25),0),5),l[p])})}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:null!==e.oxydam?(0,o.createComponentVNode)(2,a.Box,{inline:!0,children:[(0,o.createComponentVNode)(2,u,{type:"oxy",value:e.oxydam}),"/",(0,o.createComponentVNode)(2,u,{type:"toxin",value:e.toxdam}),"/",(0,o.createComponentVNode)(2,u,{type:"burn",value:e.burndam}),"/",(0,o.createComponentVNode)(2,u,{type:"brute",value:e.brutedam})]}):e.life_status?"Alive":"Dead"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:null!==e.pos_x?e.area:"N/A"}),!!i.link_allowed&&(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,a.Button,{content:"Track",disabled:!e.can_track,onClick:function(){return c("select_person",{name:e.name})}})})]},e.name);var t,n,r,s,m,p,C}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Cryo=void 0;var o=n(0),r=n(2),a=n(1),c=n(205),i=n(3),l=[{label:"Brute",type:"bruteLoss"},{label:"Respiratory",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Burn",type:"fireLoss"}];t.Cryo=function(){return(0,o.createComponentVNode)(2,i.Window,{width:400,height:550,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,d)})})};var d=function(e,t){var n=(0,r.useBackend)(t),i=n.act,d=n.data;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Occupant",children:d.occupant.name||"No Occupant"}),!!d.hasOccupant&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"State",color:d.occupant.statstate,children:d.occupant.stat}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",color:d.occupant.temperaturestatus,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d.occupant.bodyTemperature})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.occupant.health/d.occupant.maxHealth,color:d.occupant.health>0?"good":"average",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d.occupant.health})})}),l.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.label,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.occupant[e.type]/100,children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d.occupant[e.type]})})},e.id)}))],0)]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Cell",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:d.isOperating?"power-off":"times",disabled:d.isOpen,onClick:function(){return i("power")},color:d.isOperating&&"green",children:d.isOperating?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d.cellTemperature})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door",children:[(0,o.createComponentVNode)(2,a.Button,{icon:d.isOpen?"unlock":"lock",onClick:function(){return i("door")},content:d.isOpen?"Open":"Closed"}),(0,o.createComponentVNode)(2,a.Button,{icon:d.autoEject?"sign-out-alt":"sign-in-alt",onClick:function(){return i("autoeject")},content:d.autoEject?"Auto":"Manual"})]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Beaker",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",disabled:!d.isBeakerLoaded,onClick:function(){return i("ejectbeaker")},content:"Eject"}),children:(0,o.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:d.isBeakerLoaded,beakerContents:d.beakerContents})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.DecalPainter=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.DecalPainter=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.decal_list||[],u=l.color_list||[],s=l.dir_list||[];return(0,o.createComponentVNode)(2,c.Window,{width:500,height:400,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Decal Type",children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,selected:e.decal===l.decal_style,onClick:function(){return i("select decal",{decals:e.decal})}},e.decal)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Decal Color",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:"red"===e.colors?"Red":"white"===e.colors?"White":"Yellow",selected:e.colors===l.decal_color,onClick:function(){return i("select color",{colors:e.colors})}},e.colors)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Decal Direction",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:1===e.dirs?"North":2===e.dirs?"South":4===e.dirs?"East":"West",selected:e.dirs===l.decal_direction,onClick:function(){return i("selected direction",{dirs:e.dirs})}},e.dirs)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DisposalUnit=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.DisposalUnit=function(e,t){var n,i,l=(0,r.useBackend)(t),d=l.act,u=l.data;return u.full_pressure?(n="good",i="Ready"):u.panel_open?(n="bad",i="Power Disabled"):u.pressure_charging?(n="average",i="Pressurizing"):(n="bad",i="Off"),(0,o.createComponentVNode)(2,c.Window,{width:300,height:180,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"State",color:n,children:i}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.per,color:"good"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Handle",children:(0,o.createComponentVNode)(2,a.Button,{icon:u.flush?"toggle-on":"toggle-off",disabled:u.isai||u.panel_open,content:u.flush?"Disengage":"Engage",onClick:function(){return d(u.flush?"handle-0":"handle-1")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Eject",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sign-out-alt",disabled:u.isai,content:"Eject Contents",onClick:function(){return d("eject")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",disabled:u.panel_open,selected:u.pressure_charging,onClick:function(){return d(u.pressure_charging?"pump-0":"pump-1")}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DnaConsoleCommands=t.DnaConsole=void 0;var o=n(0),r=n(14),a=n(30),c=n(6),i=n(19),l=n(63),d=n(2),u=n(1),s=n(3);var m=["A","T","C","G"],p={A:"green",T:"green",G:"blue",C:"blue",X:"grey"},C={1:"good",2:"bad",4:"average"},h=function(e,t){return e.Alias===t.Alias&&e.AppliedChromo===t.AppliedChromo};t.DnaConsole=function(e,t){var n=(0,d.useBackend)(t),r=n.data,a=(n.act,r.isPulsingRads),c=r.radPulseSeconds,i=r.view.consoleMode;return(0,o.createComponentVNode)(2,s.Window,{title:"DNA Console",width:539,height:710,resizable:!0,children:[!!a&&(0,o.createComponentVNode)(2,u.Dimmer,{fontSize:"14px",textAlign:"center",children:[(0,o.createComponentVNode)(2,u.Icon,{mr:1,name:"spinner",spin:!0}),"Radiation pulse in progress...",(0,o.createComponentVNode)(2,u.Box,{mt:1}),c,"s"]}),(0,o.createComponentVNode)(2,s.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,N),(0,o.createComponentVNode)(2,g),"storage"===i&&(0,o.createComponentVNode)(2,k),"sequencer"===i&&(0,o.createComponentVNode)(2,L),"enzymes"===i&&(0,o.createComponentVNode)(2,T)]})]})};var N=function(e,t){return(0,o.createComponentVNode)(2,u.Section,{title:"DNA Scanner",buttons:(0,o.createComponentVNode)(2,V),children:(0,o.createComponentVNode)(2,f)})},V=function(e,t){var n=(0,d.useBackend)(t),r=n.data,a=n.act,c=r.hasDelayedAction,i=r.isPulsingRads,l=r.isScannerConnected,s=r.isScrambleReady,m=r.isViableSubject,p=r.scannerLocked,C=r.scannerOpen,h=r.scrambleSeconds;return l?(0,o.createFragment)([!!c&&(0,o.createComponentVNode)(2,u.Button,{content:"Cancel Delayed Action",onClick:function(){return a("cancel_delay")}}),!!m&&(0,o.createComponentVNode)(2,u.Button,{disabled:!s||i,onClick:function(){return a("scramble_dna")},children:["Scramble DNA",!s&&" ("+h+"s)"]}),(0,o.createComponentVNode)(2,u.Box,{inline:!0,mr:1}),(0,o.createComponentVNode)(2,u.Button,{icon:p?"lock":"lock-open",color:p&&"bad",disabled:C,content:p?"Locked":"Unlocked",onClick:function(){return a("toggle_lock")}}),(0,o.createComponentVNode)(2,u.Button,{disabled:p,content:C?"Close":"Open",onClick:function(){return a("toggle_door")}})],0):(0,o.createComponentVNode)(2,u.Button,{content:"Connect Scanner",onClick:function(){return a("connect_scanner")}})},b=function(e,t){var n=e.status;return 0===n?(0,o.createComponentVNode)(2,u.Box,{inline:!0,color:"good",children:"Conscious"}):2===n?(0,o.createComponentVNode)(2,u.Box,{inline:!0,color:"average",children:"Unconscious"}):1===n?(0,o.createComponentVNode)(2,u.Box,{inline:!0,color:"average",children:"Critical"}):3===n?(0,o.createComponentVNode)(2,u.Box,{inline:!0,color:"bad",children:"Dead"}):4===n?(0,o.createComponentVNode)(2,u.Box,{inline:!0,color:"bad",children:"Transforming"}):(0,o.createComponentVNode)(2,u.Box,{inline:!0,children:"Unknown"})},f=function(e,t){var n=(0,d.useBackend)(t),r=n.data,a=(n.act,r.subjectName),c=r.isScannerConnected,i=r.isViableSubject,l=r.subjectHealth,s=r.subjectRads,m=r.subjectStatus;return c?i?(0,o.createComponentVNode)(2,u.LabeledList,{children:[(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Status",children:[a,(0,o.createComponentVNode)(2,u.Icon,{mx:1,color:"label",name:"long-arrow-alt-right"}),(0,o.createComponentVNode)(2,b,{status:m})]}),(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,u.ProgressBar,{value:l,minValue:0,maxValue:100,ranges:{olive:[101,Infinity],good:[70,101],average:[30,70],bad:[-Infinity,30]},children:[l,"%"]})}),(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Radiation",children:(0,o.createComponentVNode)(2,u.ProgressBar,{value:s,minValue:0,maxValue:100,ranges:{bad:[71,Infinity],average:[30,71],good:[0,30],olive:[-Infinity,0]},children:[s,"%"]})})]}):(0,o.createComponentVNode)(2,u.Box,{color:"average",children:"No viable subject found in DNA Scanner."}):(0,o.createComponentVNode)(2,u.Box,{color:"bad",children:"DNA Scanner is not connected."})},g=function(e,t){var n=(0,d.useBackend)(t),r=n.data,a=n.act,c=r.hasDisk,i=r.isInjectorReady,l=r.injectorSeconds,s=r.view.consoleMode;return(0,o.createComponentVNode)(2,u.Section,{title:"DNA Console",buttons:!i&&(0,o.createComponentVNode)(2,u.Box,{lineHeight:"20px",color:"label",children:["Injector on cooldown (",l,"s)"]}),children:(0,o.createComponentVNode)(2,u.LabeledList,{children:[(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Mode",children:[(0,o.createComponentVNode)(2,u.Button,{content:"Storage",selected:"storage"===s,onClick:function(){return a("set_view",{consoleMode:"storage"})}}),(0,o.createComponentVNode)(2,u.Button,{content:"Sequencer",disabled:!r.isViableSubject,selected:"sequencer"===s,onClick:function(){return a("set_view",{consoleMode:"sequencer"})}}),(0,o.createComponentVNode)(2,u.Button,{content:"Enzymes",selected:"enzymes"===s,onClick:function(){return a("set_view",{consoleMode:"enzymes"})}})]}),!!c&&(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Disk",children:(0,o.createComponentVNode)(2,u.Button,{icon:"eject",content:"Eject",onClick:function(){a("eject_disk"),a("set_view",{storageMode:"console"})}})})]})})};t.DnaConsoleCommands=g;var v=function(e,t){var n=(0,d.useBackend)(t),r=n.data,a=n.act,c=r.hasDisk,i=r.view,l=i.storageMode,s=i.storageConsSubMode,m=i.storageDiskSubMode;return(0,o.createFragment)(["console"===l&&(0,o.createFragment)([(0,o.createComponentVNode)(2,u.Button,{selected:"mutations"===s,content:"Mutations",onClick:function(){return a("set_view",{storageConsSubMode:"mutations"})}}),(0,o.createComponentVNode)(2,u.Button,{selected:"chromosomes"===s,content:"Chromosomes",onClick:function(){return a("set_view",{storageConsSubMode:"chromosomes"})}})],4),"disk"===l&&(0,o.createFragment)([(0,o.createComponentVNode)(2,u.Button,{selected:"mutations"===m,content:"Mutations",onClick:function(){return a("set_view",{storageDiskSubMode:"mutations"})}}),(0,o.createComponentVNode)(2,u.Button,{selected:"diskenzymes"===m,content:"Enzymes",onClick:function(){return a("set_view",{storageDiskSubMode:"diskenzymes"})}})],4),(0,o.createComponentVNode)(2,u.Box,{inline:!0,mr:1}),(0,o.createComponentVNode)(2,u.Button,{content:"Console",selected:"console"===l,onClick:function(){return a("set_view",{storageMode:"console",storageConsSubMode:"mutations"})}}),(0,o.createComponentVNode)(2,u.Button,{content:"Disk",disabled:!c,selected:"disk"===l,onClick:function(){return a("set_view",{storageMode:"disk",storageDiskSubMode:"mutations"})}}),(0,o.createComponentVNode)(2,u.Button,{content:"Adv. Injector",selected:"injector"===l,onClick:function(){return a("set_view",{storageMode:"injector"})}})],0)},k=function(e,t){var n=(0,d.useBackend)(t),r=n.data,a=n.act,c=r.view,i=c.storageMode,l=c.storageConsSubMode,s=c.storageDiskSubMode,m=r.diskMakeupBuffer,p=r.diskHasMakeup,C=r.storage[i];return(0,o.createComponentVNode)(2,u.Section,{title:"Storage",buttons:(0,o.createComponentVNode)(2,v),children:["console"===i&&"mutations"===l&&(0,o.createComponentVNode)(2,x,{mutations:C}),"console"===i&&"chromosomes"===l&&(0,o.createComponentVNode)(2,B),"disk"===i&&"mutations"===s&&(0,o.createComponentVNode)(2,x,{mutations:C}),"disk"===i&&"diskenzymes"===s&&(0,o.createFragment)([(0,o.createComponentVNode)(2,M,{makeup:m}),(0,o.createComponentVNode)(2,u.Button,{icon:"times",color:"red",disabled:!p,content:"Delete",onClick:function(){return a("del_makeup_disk")}})],4),"injector"===i&&(0,o.createComponentVNode)(2,j)]})},x=function(e,t){var n=e.customMode,r=void 0===n?"":n,a=(0,d.useBackend)(t),c=a.data,l=a.act,s=e.mutations||[],m=c.view.storageMode+r,p=c.view["storage"+m+"MutationRef"],C=s.find((function(e){return e.ByondRef===p}));return!C&&s.length>0&&(C=s[0],p=C.ByondRef),(0,o.createComponentVNode)(2,u.Flex,{children:[(0,o.createComponentVNode)(2,u.Flex.Item,{width:"140px",children:(0,o.createComponentVNode)(2,u.Section,{title:(0,i.capitalize)(c.view.storageMode)+" Storage",level:2,children:s.map((function(e){return(0,o.createComponentVNode)(2,u.Button,{fluid:!0,ellipsis:!0,color:"transparent",selected:e.ByondRef===p,content:e.Name,onClick:function(){var t;return l("set_view",((t={})["storage"+m+"MutationRef"]=e.ByondRef,t))}},e.ByondRef)}))})}),(0,o.createComponentVNode)(2,u.Flex.Item,{children:(0,o.createComponentVNode)(2,u.Divider,{vertical:!0})}),(0,o.createComponentVNode)(2,u.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,u.Section,{title:"Mutation Info",level:2,children:(0,o.createComponentVNode)(2,_,{mutation:C})})})]})},B=function(e,t){var n,a=(0,d.useBackend)(t),c=a.data,i=a.act,l=null!=(n=c.chromoStorage)?n:[],s=(0,r.uniqBy)((function(e){return e.Name}))(l),m=c.view.storageChromoName,p=l.find((function(e){return e.Name===m}));return(0,o.createComponentVNode)(2,u.Flex,{children:[(0,o.createComponentVNode)(2,u.Flex.Item,{width:"140px",children:(0,o.createComponentVNode)(2,u.Section,{title:"Console Storage",level:2,children:s.map((function(e){return(0,o.createComponentVNode)(2,u.Button,{fluid:!0,ellipsis:!0,color:"transparent",selected:e.Name===m,content:e.Name,onClick:function(){return i("set_view",{storageChromoName:e.Name})}},e.Index)}))})}),(0,o.createComponentVNode)(2,u.Flex.Item,{children:(0,o.createComponentVNode)(2,u.Divider,{vertical:!0})}),(0,o.createComponentVNode)(2,u.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,u.Section,{title:"Chromosome Info",level:2,children:!p&&(0,o.createComponentVNode)(2,u.Box,{color:"label",children:"Nothing to show."})||(0,o.createFragment)([(0,o.createComponentVNode)(2,u.LabeledList,{children:[(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Name",children:p.Name}),(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Description",children:p.Description}),(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Amount",children:l.filter((function(e){return e.Name===p.Name})).length})]}),(0,o.createComponentVNode)(2,u.Button,{mt:2,icon:"eject",content:"Eject Chromosome",onClick:function(){return i("eject_chromo",{chromo:p.Name})}})],4)})})]})},_=function(e,t){var n,c,i,l=e.mutation,s=(0,d.useBackend)(t),m=s.data,p=s.act,N=m.diskCapacity,V=m.diskReadOnly,b=m.hasDisk,f=m.isInjectorReady,g=null!=(n=m.storage.disk)?n:[],v=null!=(c=m.storage.console)?c:[],k=null!=(i=m.storage.injector)?i:[];if(!l)return(0,o.createComponentVNode)(2,u.Box,{color:"label",children:"Nothing to show."});if("occupant"===l.Source&&!l.Discovered)return(0,o.createComponentVNode)(2,u.LabeledList,{children:(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Name",children:l.Alias})});var x=v.find((function(e){return h(e,l)})),B=g.find((function(e){return h(e,l)})),_=(0,a.flow)([(0,r.uniqBy)((function(e){return e.Name})),(0,r.filter)((function(e){return e.Name!==l.Name}))])([].concat(g,v));return(0,o.createFragment)([(0,o.createComponentVNode)(2,u.LabeledList,{children:[(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,u.Box,{inline:!0,color:C[l.Quality],children:l.Name})}),(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Description",children:l.Description}),(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Instability",children:l.Instability})]}),(0,o.createComponentVNode)(2,u.Divider),(0,o.createComponentVNode)(2,u.Box,{children:["disk"===l.Source&&(0,o.createComponentVNode)(2,W,{disabled:!b||N<=0||V,mutations:_,source:l}),"console"===l.Source&&(0,o.createComponentVNode)(2,W,{mutations:_,source:l}),["occupant","disk","console"].includes(l.Source)&&(0,o.createFragment)([(0,o.createComponentVNode)(2,u.Dropdown,{width:"240px",options:k.map((function(e){return e.name})),disabled:0===k.length||!l.Active,selected:"Add to advanced injector",onSelected:function(e){return p("add_advinj_mut",{mutref:l.ByondRef,advinj:e,source:l.Source})}}),(0,o.createComponentVNode)(2,u.Button,{icon:"syringe",disabled:!f||!l.Active,content:"Print Activator",onClick:function(){return p("print_injector",{mutref:l.ByondRef,is_activator:1,source:l.Source})}}),(0,o.createComponentVNode)(2,u.Button,{icon:"syringe",disabled:!f||!l.Active,content:"Print Mutator",onClick:function(){return p("print_injector",{mutref:l.ByondRef,is_activator:0,source:l.Source})}})],4)]}),["disk","occupant"].includes(l.Source)&&(0,o.createComponentVNode)(2,u.Button,{icon:"save",disabled:x||!l.Active,content:"Save to Console",onClick:function(){return p("save_console",{mutref:l.ByondRef,source:l.Source})}}),["console","occupant"].includes(l.Source)&&(0,o.createComponentVNode)(2,u.Button,{icon:"save",disabled:B||!b||N<=0||V||!l.Active,content:"Save to Disk",onClick:function(){return p("save_disk",{mutref:l.ByondRef,source:l.Source})}}),["console","disk","injector"].includes(l.Source)&&(0,o.createComponentVNode)(2,u.Button,{icon:"times",color:"red",content:"Delete from "+l.Source,onClick:function(){return p("delete_"+l.Source+"_mut",{mutref:l.ByondRef})}}),(2===l.Class||!!l.Scrambled&&"occupant"===l.Source)&&(0,o.createComponentVNode)(2,u.Button,{content:"Nullify",onClick:function(){return p("nullify",{mutref:l.ByondRef})}}),(0,o.createComponentVNode)(2,u.Divider),(0,o.createComponentVNode)(2,w,{disabled:"occupant"!==l.Source,mutation:l})],0)},w=function(e,t){var n=e.mutation,r=e.disabled,a=(0,d.useBackend)(t),c=(a.data,a.act);return 0===n.CanChromo?(0,o.createComponentVNode)(2,u.Box,{color:"label",children:"No compatible chromosomes"}):1===n.CanChromo?r?(0,o.createComponentVNode)(2,u.Box,{color:"label",children:"No chromosome applied."}):(0,o.createFragment)([(0,o.createComponentVNode)(2,u.Dropdown,{width:"240px",options:n.ValidStoredChromos,disabled:0===n.ValidStoredChromos.length,selected:0===n.ValidStoredChromos.length?"No Suitable Chromosomes":"Select a chromosome",onSelected:function(e){return c("apply_chromo",{chromo:e,mutref:n.ByondRef})}}),(0,o.createComponentVNode)(2,u.Box,{color:"label",mt:1,children:["Compatible with: ",n.ValidChromos]})],4):2===n.CanChromo?(0,o.createComponentVNode)(2,u.Box,{color:"label",children:["Applied chromosome: ",n.AppliedChromo]}):null},L=function(e,t){var n,r,a=(0,d.useBackend)(t),c=a.data,i=a.act,s=null!=(n=null==(r=c.storage)?void 0:r.occupant)?n:[],m=c.isJokerReady,p=c.isMonkey,C=c.jokerSeconds,h=c.subjectStatus,N=c.view,V=N.sequencerMutation,b=N.jokerActive,f=s.find((function(e){return e.Alias===V}));return(0,o.createFragment)([(0,o.createComponentVNode)(2,u.Flex,{spacing:1,mb:1,children:[(0,o.createComponentVNode)(2,u.Flex.Item,{width:s.length<=8?"154px":"174px",children:(0,o.createComponentVNode)(2,u.Section,{title:"Sequences",height:"214px",overflowY:s.length>8&&"scroll",children:s.map((function(e){return(0,o.createComponentVNode)(2,y,{url:(0,l.resolveAsset)(e.Image),selected:e.Alias===V,onClick:function(){i("set_view",{sequencerMutation:e.Alias}),i("check_discovery",{alias:e.Alias})}},e.Alias)}))})}),(0,o.createComponentVNode)(2,u.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,u.Section,{title:"Sequence Info",minHeight:"100%",children:(0,o.createComponentVNode)(2,_,{mutation:f})})})]}),3===h&&(0,o.createComponentVNode)(2,u.Section,{color:"bad",children:"Genetic sequence corrupted. Subject diagnostic report: DECEASED."})||p&&"Monkified"!==(null==f?void 0:f.Name)&&(0,o.createComponentVNode)(2,u.Section,{color:"bad",children:"Genetic sequence corrupted. Subject diagnostic report: MONKEY."})||4===h&&(0,o.createComponentVNode)(2,u.Section,{color:"bad",children:"Genetic sequence corrupted. Subject diagnostic report: TRANSFORMING."})||(0,o.createComponentVNode)(2,u.Section,{title:"Genome Sequencer\u2122",buttons:!m&&(0,o.createComponentVNode)(2,u.Box,{lineHeight:"20px",color:"label",children:["Joker on cooldown (",C,"s)"]})||b&&(0,o.createFragment)([(0,o.createComponentVNode)(2,u.Box,{mr:1,inline:!0,color:"label",children:"Click on a gene to reveal it."}),(0,o.createComponentVNode)(2,u.Button,{content:"Cancel Joker",onClick:function(){return i("set_view",{jokerActive:""})}})],4)||(0,o.createComponentVNode)(2,u.Button,{icon:"crown",color:"purple",content:"Use Joker",onClick:function(){return i("set_view",{jokerActive:"1"})}}),children:(0,o.createComponentVNode)(2,I,{mutation:f})})],0)},y=function(e,t){var n,r=e.url,a=e.selected,c=e.onClick;return a&&(n="2px solid #22aa00"),(0,o.createComponentVNode)(2,u.Box,{as:"img",src:r,style:{width:"64px",margin:"2px","margin-left":"4px",outline:n},onClick:c})},S=function(e,t){var n=e.gene,r=e.onChange,a=e.disabled,c=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["gene","onChange","disabled"]),i=m.length,l=m.indexOf(n),d=a&&p.X||p[n];return(0,o.normalizeProps)((0,o.createComponentVNode)(2,u.Button,Object.assign({},c,{color:d,onClick:function(e){if(e.preventDefault(),r)if(-1!==l){var t=m[(l+1)%i];r(e,t)}else r(e,m[0])},oncontextmenu:function(e){if(e.preventDefault(),r)if(-1!==l){var t=m[(l-1+i)%i];r(e,t)}else r(e,m[i-1])},children:n})))},I=function(e,t){var n=e.mutation,r=(0,d.useBackend)(t),a=r.data,i=r.act,l=a.view.jokerActive;if(!n)return(0,o.createComponentVNode)(2,u.Box,{color:"average",children:"No genome selected for sequencing."});if(n.Scrambled)return(0,o.createComponentVNode)(2,u.Box,{color:"average",children:"Sequence unreadable due to unpredictable mutation."});for(var s=n.Sequence,m=n.DefaultSeq,p=[],C=function(e){var t=s.charAt(e),r=(0,o.createComponentVNode)(2,S,{width:"22px",textAlign:"center",disabled:!!n.Scrambled||1!==n.Class,className:"X"===(null==m?void 0:m.charAt(e))&&!n.Active&&(0,c.classes)(["outline-solid","outline-color-orange"]),gene:t,onChange:function(t,o){if(!t.ctrlKey)return l?(i("pulse_gene",{pos:e+1,gene:"J",alias:n.Alias}),void i("set_view",{jokerActive:""})):void i("pulse_gene",{pos:e+1,gene:o,alias:n.Alias});i("pulse_gene",{pos:e+1,gene:"X",alias:n.Alias})}});p.push(r)},h=0;h=3){var r=(0,o.createComponentVNode)(2,u.Box,{inline:!0,width:"22px",mx:"1px",children:s});l.push(r),s=[]}},p=0;p=i,onCommit:function(e,t){return a("new_adv_inj",{name:t})}})})]})},W=function(e,t){var n=e.mutations,r=void 0===n?[]:n,a=e.source,c=(0,d.useBackend)(t),i=c.act;c.data;return(0,o.createComponentVNode)(2,u.Dropdown,{width:"240px",options:r.map((function(e){return e.Name})),disabled:0===r.length,selected:"Combine mutations",onSelected:function(e){return i("combine_"+a.Source,{firstref:(t=e,null==(n=r.find((function(e){return e.Name===t})))?void 0:n.ByondRef),secondref:a.ByondRef});var t,n}},a.ByondRef)}},function(e,t,n){"use strict";t.__esModule=!0,t.DnaVault=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.DnaVault=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.completed,u=l.used,s=l.choiceA,m=l.choiceB,p=l.dna,C=l.dna_max,h=l.plants,N=l.plants_max,V=l.animals,b=l.animals_max;return(0,o.createComponentVNode)(2,c.Window,{width:350,height:400,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"DNA Vault Database",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Human DNA",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:p/C,children:p+" / "+C+" Samples"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Plant DNA",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:h/N,children:h+" / "+N+" Samples"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Animal DNA",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:V/V,children:V+" / "+b+" Samples"})})]})}),!(!d||u)&&(0,o.createComponentVNode)(2,a.Section,{title:"Personal Gene Therapy",children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,textAlign:"center",mb:1,children:"Applicable Gene Therapy Treatments"}),(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,bold:!0,content:s,textAlign:"center",onClick:function(){return i("gene",{choice:s})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,bold:!0,content:m,textAlign:"center",onClick:function(){return i("gene",{choice:m})}})})]})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.EightBallVote=void 0;var o=n(0),r=n(2),a=n(1),c=n(19),i=n(3);t.EightBallVote=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.shaking);return(0,o.createComponentVNode)(2,i.Window,{width:400,height:600,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:!c&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No question is currently being asked."})||(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.question,u=l.answers,s=void 0===u?[]:u;return(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,textAlign:"center",fontSize:"16px",m:1,children:['"',d,'"']}),(0,o.createComponentVNode)(2,a.Grid,{children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Grid.Column,{children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,bold:!0,content:(0,c.toTitleCase)(e.answer),selected:e.selected,fontSize:"16px",lineHeight:"24px",textAlign:"center",mb:1,onClick:function(){return i("vote",{answer:e.answer})}}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,textAlign:"center",fontSize:"30px",children:e.amount})]},e.answer)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Electrolyzer=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.Electrolyzer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:400,height:305,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Power",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject Cell",disabled:!l.hasPowercell||!l.open,onClick:function(){return i("eject")}}),(0,o.createComponentVNode)(2,a.Button,{icon:l.on?"power-off":"times",content:l.on?"On":"Off",selected:l.on,disabled:!l.hasPowercell,onClick:function(){return i("power")}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell",color:!l.hasPowercell&&"bad",children:l.hasPowercell&&(0,o.createComponentVNode)(2,a.ProgressBar,{value:l.powerLevel/100,content:l.powerLevel+"%",ranges:{good:[.6,Infinity],average:[.3,.6],bad:[-Infinity,.3]}})||"None"})})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Electropack=void 0;var o=n(0),r=n(9),a=n(2),c=n(1),i=n(3);t.Electropack=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.power,s=d.code,m=d.frequency,p=d.minFrequency,C=d.maxFrequency;return(0,o.createComponentVNode)(2,i.Window,{width:260,height:137,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,c.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return l("power")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Frequency",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"freq"})}}),children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:p/10,maxValue:C/10,value:m/10,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onDrag:function(e,t){return l("freq",{freq:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Code",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"code"})}}),children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:s,width:"80px",onDrag:function(e,t){return l("code",{code:t})}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.EmergencyShuttleConsole=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.EmergencyShuttleConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.timer_str,u=l.enabled,s=l.emagged,m=l.engines_started,p=l.authorizations_remaining,C=l.authorizations,h=void 0===C?[]:C;return(0,o.createComponentVNode)(2,c.Window,{width:400,height:350,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,fontSize:"40px",textAlign:"center",fontFamily:"monospace",children:d}),(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",fontSize:"16px",mb:1,children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,children:"ENGINES:"}),(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:m?"good":"average",ml:1,children:m?"Online":"Idle"})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Early Launch Authorization",level:2,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Repeal All",color:"bad",disabled:!u,onClick:function(){return i("abort")}}),children:[(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"exclamation-triangle",color:"good",content:"AUTHORIZE",disabled:!u,onClick:function(){return i("authorize")}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"minus",content:"REPEAL",disabled:!u,onClick:function(){return i("repeal")}})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Authorizations",level:3,minHeight:"150px",buttons:(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,color:s?"bad":"good",children:s?"ERROR":"Remaining: "+p}),children:h.length>0?h.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{bold:!0,fontSize:"16px",className:"candystripe",children:[e.name," (",e.job,")"]},e.name)})):(0,o.createComponentVNode)(2,a.Box,{bold:!0,textAlign:"center",fontSize:"16px",color:"average",children:"No Active Authorizations"})})]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.EngravedMessage=void 0;var o=n(0),r=n(19),a=n(2),c=n(1),i=n(3);t.EngravedMessage=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.admin_mode,s=d.creator_key,m=d.creator_name,p=d.has_liked,C=d.has_disliked,h=d.hidden_message,N=d.is_creator,V=d.num_likes,b=d.num_dislikes,f=d.realdate;return(0,o.createComponentVNode)(2,i.Window,{width:600,height:300,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.Box,{bold:!0,textAlign:"center",fontSize:"20px",mb:2,children:(0,r.decodeHtmlEntities)(h)}),(0,o.createComponentVNode)(2,c.Grid,{children:[(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,icon:"arrow-up",content:" "+V,disabled:N,selected:p,textAlign:"center",fontSize:"16px",lineHeight:"24px",onClick:function(){return l("like")}})}),(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,icon:"circle",disabled:N,selected:!C&&!p,textAlign:"center",fontSize:"16px",lineHeight:"24px",onClick:function(){return l("neutral")}})}),(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,icon:"arrow-down",content:" "+b,disabled:N,selected:C,textAlign:"center",fontSize:"16px",lineHeight:"24px",onClick:function(){return l("dislike")}})})]})]}),(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Created On",children:f})})}),(0,o.createComponentVNode)(2,c.Section),!!u&&(0,o.createComponentVNode)(2,c.Section,{title:"Admin Panel",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Delete",color:"bad",onClick:function(){return l("delete")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Creator Ckey",children:s}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Creator Character Name",children:m})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ExosuitControlConsole=void 0;var o=n(0),r=n(9),a=n(2),c=n(1),i=n(3);t.ExosuitControlConsole=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data.mechs,u=void 0===d?[]:d;return(0,o.createComponentVNode)(2,i.Window,{width:500,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[0===u.length&&(0,o.createComponentVNode)(2,c.NoticeBox,{children:"No exosuits detected"}),u.map((function(e){return(0,o.createComponentVNode)(2,c.Section,{title:e.name,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"envelope",content:"Send Message",disabled:!e.pilot,onClick:function(){return l("send_message",{tracker_ref:e.tracker_ref})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"wifi",content:e.emp_recharging?"Recharging...":"EMP Burst",color:"bad",disabled:e.emp_recharging,onClick:function(){return l("shock",{tracker_ref:e.tracker_ref})}})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,c.Box,{color:(e.integrity<=30?"bad":e.integrity<=70&&"average")||"good",children:[e.integrity,"%"]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Charge",children:(0,o.createComponentVNode)(2,c.Box,{color:(e.charge<=30?"bad":e.charge<=70&&"average")||"good",children:"number"==typeof e.charge&&e.charge+"%"||"Not Found"})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Airtank",children:"number"==typeof e.airtank&&(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:e.airtank,format:function(e){return(0,r.toFixed)(e,2)+" kPa"}})||"Not Equipped"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pilot",children:e.pilot||"None"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Location",children:e.location||"Unknown"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Active Equipment",children:e.active_equipment||"None"}),e.cargo_space>=0&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Used Cargo Space",children:(0,o.createComponentVNode)(2,c.Box,{color:(e.cargo_space<=30?"good":e.cargo_space<=70&&"average")||"bad",children:[e.cargo_space,"%"]})})]})},e.tracker_ref)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ExosuitFabricator=void 0;var o,r=n(0),a=n(6),c=n(14),i=n(2),l=n(39),d=n(1),u=n(3),s=n(19);function m(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return p(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(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}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(n=e[Symbol.iterator]()).next.bind(n)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);nn?{color:2,deficit:e-n}:t>n?{color:1,deficit:e}:e+t>n?{color:1,deficit:e+t-n}:{color:0,deficit:0}},V=function(e,t,n){var o={textColor:0};return Object.keys(n.cost).forEach((function(r){o[r]=N(n.cost[r],t[r],e[r]),o[r].color>o.textColor&&(o.textColor=o[r].color)})),o};t.ExosuitFabricator=function(e,t){var n,o,a=(0,i.useBackend)(t),c=a.act,l=a.data,s=l.queue||[],m=(n=l.materials||[],o={},n.forEach((function(e){o[e.name]=e.amount})),o),p=function(e,t){var n={},o={},r={},a={};return t.forEach((function(t,c){a[c]=0,Object.keys(t.cost).forEach((function(i){n[i]=n[i]||0,r[i]=r[i]||0,o[i]=N(t.cost[i],n[i],e[i]),0!==o[i].color?a[c]1&&l=0&&m+"s"||"Dispensing..."})]})})})}}},function(e,t,n){"use strict";t.__esModule=!0,t.ForbiddenLore=void 0;var o=n(0),r=n(14),a=n(30),c=n(2),i=n(1),l=n(3);t.ForbiddenLore=function(e,t){var n=(0,c.useBackend)(t),d=n.act,u=n.data,s=u.charges,m=(0,a.flow)([(0,r.sortBy)((function(e){return"Research"!==e.state}),(function(e){return"Side"===e.path}))])(u.to_know||[]);return(0,o.createComponentVNode)(2,l.Window,{width:500,height:900,resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:"Research Eldritch Knowledge",children:["Charges left : ",s,null!==m?m.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,level:2,children:[(0,o.createComponentVNode)(2,i.Box,{bold:!0,my:1,children:[e.path," path"]}),(0,o.createComponentVNode)(2,i.Box,{my:1,children:[(0,o.createComponentVNode)(2,i.Button,{content:e.state,disabled:e.disabled,onClick:function(){return d("research",{name:e.name,cost:e.cost})}})," ","Cost : ",e.cost]}),(0,o.createComponentVNode)(2,i.Box,{italic:!0,my:1,children:e.flavour}),(0,o.createComponentVNode)(2,i.Box,{my:1,children:e.desc})]},e.name)})):(0,o.createComponentVNode)(2,i.Box,{children:"No more knowledge can be found"})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Gateway=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.Gateway=function(){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.gateway_present,d=void 0!==l&&l,u=i.gateway_status,s=void 0!==u&&u,m=i.current_target,p=void 0===m?null:m,C=i.destinations,h=void 0===C?[]:C;return d?p?(0,o.createComponentVNode)(2,a.Section,{title:p.name,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"rainbow",size:4,color:"green"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,onClick:function(){return c("deactivate")},children:"Deactivate"})]}):h.length?(0,o.createFragment)([!s&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Gateway Unpowered"}),h.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:e.available&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,onClick:function(){return c("activate",{destination:e.ref})},children:"Activate"})||(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{m:1,textColor:"bad",children:e.reason}),!!e.timeout&&(0,o.createComponentVNode)(2,a.ProgressBar,{value:e.timeout,children:"Calibrating..."})],0)},e.ref)}))],0):(0,o.createComponentVNode)(2,a.Section,{children:"No gateway nodes detected."}):(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No linked gateway"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,onClick:function(){return c("linkup")},children:"Linkup"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.GhostPoolProtection=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.GhostPoolProtection=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.events_or_midrounds,u=l.spawners,s=l.station_sentience,m=l.silicons,p=l.minigames;return(0,o.createComponentVNode)(2,c.Window,{title:"Ghost Pool Protection",width:400,height:270,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{grow:1,height:"100%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Options",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{color:"good",icon:"plus-circle",content:"Enable Everything",onClick:function(){return i("all_roles")}}),(0,o.createComponentVNode)(2,a.Button,{color:"bad",icon:"minus-circle",content:"Disable Everything",onClick:function(){return i("no_roles")}})],4),children:[(0,o.createComponentVNode)(2,a.NoticeBox,{danger:!0,children:"For people creating a sneaky event: If you toggle Station Created Sentience, people may catch on that admins have disabled roles for your event..."}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",color:d?"good":"bad",icon:"meteor",content:"Events and Midround Rulesets",onClick:function(){return i("toggle_events_or_midrounds")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",color:u?"good":"bad",icon:"pastafarianism",content:"Ghost Role Spawners",onClick:function(){return i("toggle_spawners")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",color:s?"good":"bad",icon:"user-astronaut",content:"Station Created Sentience",onClick:function(){return i("toggle_station_sentience")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",color:m?"good":"bad",icon:"robot",content:"Silicons",onClick:function(){return i("toggle_silicons")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",color:p?"good":"bad",icon:"gamepad",content:"Minigames",onClick:function(){return i("toggle_minigames")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",color:"orange",icon:"check",content:"Apply Changes",onClick:function(){return i("apply_settings")}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GlandDispenser=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.GlandDispenser=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.glands,d=void 0===l?[]:l;return(0,o.createComponentVNode)(2,c.Window,{width:300,height:338,theme:"abductor",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",lineHeight:"55px",icon:"eject",backgroundColor:e.color,content:e.amount||"0",disabled:!e.amount,onClick:function(){return i("dispense",{gland_id:e.id})}},e.id)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Gps=void 0;var o=n(0),r=n(14),a=n(30),c=n(9),i=n(102),l=n(2),d=n(1),u=n(3),s=function(e){return(0,r.map)(parseFloat)(e.split(", "))};t.Gps=function(e,t){var n=(0,l.useBackend)(t),m=n.act,p=n.data,C=p.currentArea,h=p.currentCoords,N=p.globalmode,V=p.power,b=p.tag,f=p.updating,g=(0,a.flow)([(0,r.map)((function(e,t){var n=e.dist&&Math.round((0,i.vecLength)((0,i.vecSubtract)(s(h),s(e.coords))));return Object.assign({},e,{dist:n,index:t})})),(0,r.sortBy)((function(e){return e.dist===undefined}),(function(e){return e.entrytag}))])(p.signals||[]);return(0,o.createComponentVNode)(2,u.Window,{title:"Global Positioning System",width:470,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d.Section,{title:"Control",buttons:(0,o.createComponentVNode)(2,d.Button,{icon:"power-off",content:V?"On":"Off",selected:V,onClick:function(){return m("power")}}),children:(0,o.createComponentVNode)(2,d.LabeledList,{children:[(0,o.createComponentVNode)(2,d.LabeledList.Item,{label:"Tag",children:(0,o.createComponentVNode)(2,d.Button,{icon:"pencil-alt",content:b,onClick:function(){return m("rename")}})}),(0,o.createComponentVNode)(2,d.LabeledList.Item,{label:"Scan Mode",children:(0,o.createComponentVNode)(2,d.Button,{icon:f?"unlock":"lock",content:f?"AUTO":"MANUAL",color:!f&&"bad",onClick:function(){return m("updating")}})}),(0,o.createComponentVNode)(2,d.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,d.Button,{icon:"sync",content:N?"MAXIMUM":"LOCAL",selected:!N,onClick:function(){return m("globalmode")}})})]})}),!!V&&(0,o.createFragment)([(0,o.createComponentVNode)(2,d.Section,{title:"Current Location",children:(0,o.createComponentVNode)(2,d.Box,{fontSize:"18px",children:[C," (",h,")"]})}),(0,o.createComponentVNode)(2,d.Section,{title:"Detected Signals",children:(0,o.createComponentVNode)(2,d.Table,{children:[(0,o.createComponentVNode)(2,d.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,d.Table.Cell,{content:"Name"}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,content:"Direction"}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,content:"Coordinates"})]}),g.map((function(e){return(0,o.createComponentVNode)(2,d.Table.Row,{className:"candystripe",children:[(0,o.createComponentVNode)(2,d.Table.Cell,{bold:!0,color:"label",children:e.entrytag}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,opacity:e.dist!==undefined&&(0,c.clamp)(1.2/Math.log(Math.E+e.dist/20),.4,1),children:[e.degrees!==undefined&&(0,o.createComponentVNode)(2,d.Icon,{mr:1,size:1.2,name:"arrow-up",rotation:e.degrees}),e.dist!==undefined&&e.dist+"m"]}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,children:e.coords})]},e.entrytag+e.coords+e.index)}))]})})],4)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GravityGenerator=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.GravityGenerator=function(e,t){var n=(0,r.useBackend)(t),l=(n.act,n.data),d=l.charging_state,u=l.operational;return(0,o.createComponentVNode)(2,c.Window,{width:400,height:155,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[!u&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No data available"}),!!u&&0!==d&&(0,o.createComponentVNode)(2,a.NoticeBox,{danger:!0,children:"WARNING - Radiation detected"}),!!u&&0===d&&(0,o.createComponentVNode)(2,a.NoticeBox,{success:!0,children:"No radiation detected"}),!!u&&(0,o.createComponentVNode)(2,i)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.breaker,d=i.charge_count,u=i.charging_state,s=i.on,m=i.operational;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:l?"power-off":"times",content:l?"On":"Off",selected:l,disabled:!m,onClick:function(){return c("gentoggle")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gravity Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d/100,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",children:[0===u&&(s&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Fully Charged"})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Not Charging"})),1===u&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Charging"}),2===u&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Discharging"})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GulagItemReclaimer=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.GulagItemReclaimer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.mobs,u=void 0===d?[]:d;return(0,o.createComponentVNode)(2,c.Window,{width:325,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[0===u.length&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No stored items"}),u.length>0&&(0,o.createComponentVNode)(2,a.Section,{title:"Stored Items",children:(0,o.createComponentVNode)(2,a.Table,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:(0,o.createComponentVNode)(2,a.Button,{content:"Retrieve Items",disabled:!l.can_reclaim,onClick:function(){return i("release_items",{mobref:e.mob})}})})]},e.mob)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GulagTeleporterConsole=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.GulagTeleporterConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.teleporter,u=l.teleporter_lock,s=l.teleporter_state_open,m=l.teleporter_location,p=l.beacon,C=l.beacon_location,h=l.id,N=l.id_name,V=l.can_teleport,b=l.goal,f=void 0===b?0:b,g=l.prisoner,v=void 0===g?{}:g;return(0,o.createComponentVNode)(2,c.Window,{width:350,height:295,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Teleporter Console",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:s?"Open":"Closed",disabled:u,selected:s,onClick:function(){return i("toggle_open")}}),(0,o.createComponentVNode)(2,a.Button,{icon:u?"lock":"unlock",content:u?"Locked":"Unlocked",selected:u,disabled:s,onClick:function(){return i("teleporter_lock")}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Teleporter Unit",color:d?"good":"bad",buttons:!d&&(0,o.createComponentVNode)(2,a.Button,{content:"Reconnect",onClick:function(){return i("scan_teleporter")}}),children:d?m:"Not Connected"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Receiver Beacon",color:p?"good":"bad",buttons:!p&&(0,o.createComponentVNode)(2,a.Button,{content:"Reconnect",onClick:function(){return i("scan_beacon")}}),children:p?C:"Not Connected"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Prisoner Details",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Prisoner ID",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:h?N:"No ID",onClick:function(){return i("handle_id")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Point Goal",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:f,width:"48px",minValue:1,maxValue:1e3,onChange:function(e,t){return i("set_goal",{value:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Occupant",children:v.name||"No Occupant"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Criminal Status",children:v.crimstat||"No Status"})]})}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Process Prisoner",disabled:!V,textAlign:"center",color:"bad",onClick:function(){return i("teleport")}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Holodeck=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.Holodeck=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.can_toggle_safety,u=l.default_programs,s=void 0===u?[]:u,m=l.emag_programs,p=void 0===m?[]:m,C=l.emagged,h=l.program;return(0,o.createComponentVNode)(2,c.Window,{width:400,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Default Programs",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:C?"unlock":"lock",content:"Safeties",color:"bad",disabled:!d,selected:!C,onClick:function(){return i("safety")}}),children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:e.name.substring(11),textAlign:"center",selected:e.type===h,onClick:function(){return i("load_program",{type:e.type})}},e.type)}))}),!!C&&(0,o.createComponentVNode)(2,a.Section,{title:"Dangerous Programs",children:p.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:e.name.substring(11),color:"bad",textAlign:"center",selected:e.type===h,onClick:function(){return i("load_program",{type:e.type})}},e.type)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Holopad=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.Holopad=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data.calling;return(0,o.createComponentVNode)(2,c.Window,{width:440,height:245,resizable:!0,children:[!!d&&(0,o.createComponentVNode)(2,a.Modal,{fontSize:"36px",fontFamily:"monospace",children:[(0,o.createComponentVNode)(2,a.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:2,mt:2,children:(0,o.createComponentVNode)(2,a.Icon,{name:"phone-alt",rotation:25})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:2,children:"Dialing..."})]}),(0,o.createComponentVNode)(2,a.Box,{mt:2,textAlign:"center",fontSize:"24px",children:(0,o.createComponentVNode)(2,a.Button,{lineHeight:"40px",icon:"times",content:"Hang Up",color:"bad",onClick:function(){return l("hang_up")}})})]}),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})]})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.on_network,d=i.on_cooldown,u=i.allowed,s=i.disk,m=i.disk_record,p=i.replay_mode,C=i.loop_mode,h=i.record_mode,N=i.holo_calls,V=void 0===N?[]:N;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Holopad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"bell",content:d?"AI Presence Requested":"Request AI Presence",disabled:!l||d,onClick:function(){return c("AIrequest")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Communicator",children:(0,o.createComponentVNode)(2,a.Button,{icon:"phone-alt",content:u?"Connect To Holopad":"Call Holopad",disabled:!l,onClick:function(){return c("holocall",{headcall:u})}})}),V.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.connected?"Current Call":"Incoming Call",children:(0,o.createComponentVNode)(2,a.Button,{icon:e.connected?"phone-slash":"phone-alt",content:e.connected?"Disconnect call from "+e.caller:"Answer call from "+e.caller,color:e.connected?"bad":"good",disabled:!l,onClick:function(){return c(e.connected?"disconnectcall":"connectcall",{holopad:e.ref})}})},e.ref)}))]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Holodisk",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!s||p||h,onClick:function(){return c("disk_eject")}}),children:!s&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No holodisk"})||(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Disk Player",children:[(0,o.createComponentVNode)(2,a.Button,{icon:p?"pause":"play",content:p?"Stop":"Replay",selected:p,disabled:h||!m,onClick:function(){return c("replay_mode")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:C?"Looping":"Loop",selected:C,disabled:h||!m,onClick:function(){return c("loop_mode")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"exchange-alt",content:"Change Offset",disabled:!p,onClick:function(){return c("offset")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Recorder",children:[(0,o.createComponentVNode)(2,a.Button,{icon:h?"pause":"video",content:h?"End Recording":"Record",selected:h,disabled:m&&!h||p,onClick:function(){return c("record_mode")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"trash",content:"Clear Recording",color:"bad",disabled:!m||p||h,onClick:function(){return c("record_clear")}})]})]})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.HypnoChair=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.HypnoChair=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:375,height:480,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Information",backgroundColor:"#450F44",children:"The Enhanced Interrogation Chamber is designed to induce a deep-rooted trance trigger into the subject. Once the procedure is complete, by using the implanted trigger phrase, the authorities are able to ensure immediate and complete obedience and truthfulness."}),(0,o.createComponentVNode)(2,a.Section,{title:"Occupant Information",textAlign:"center",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:l.occupant.name?l.occupant.name:"No Occupant"}),!!l.occupied&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:0===l.occupant.stat?"good":1===l.occupant.stat?"average":"bad",children:0===l.occupant.stat?"Conscious":1===l.occupant.stat?"Unconcious":"Dead"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Operations",textAlign:"center",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.open?"unlock":"lock",color:l.open?"default":"red",content:l.open?"Open":"Closed",onClick:function(){return i("door")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Phrase",children:(0,o.createComponentVNode)(2,a.Input,{value:l.trigger,onChange:function(e,t){return i("set_phrase",{phrase:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Interrogate Occupant",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"code-branch",content:l.interrogating?"Interrupt Interrogation":"Begin Enhanced Interrogation",onClick:function(){return i("interrogate")}}),1===l.interrogating&&(0,o.createComponentVNode)(2,a.Icon,{name:"cog",color:"orange",spin:!0})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ImplantChair=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.ImplantChair=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:375,height:280,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Occupant Information",textAlign:"center",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:l.occupant.name||"No Occupant"}),!!l.occupied&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:0===l.occupant.stat?"good":1===l.occupant.stat?"average":"bad",children:0===l.occupant.stat?"Conscious":1===l.occupant.stat?"Unconcious":"Dead"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Operations",textAlign:"center",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.open?"unlock":"lock",color:l.open?"default":"red",content:l.open?"Open":"Closed",onClick:function(){return i("door")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Implant Occupant",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"code-branch",content:l.ready?l.special_name||"Implant":"Recharging",onClick:function(){return i("implant")}}),0===l.ready&&(0,o.createComponentVNode)(2,a.Icon,{name:"cog",color:"orange",spin:!0})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Implants Remaining",children:[l.ready_implants,1===l.replenishing&&(0,o.createComponentVNode)(2,a.Icon,{name:"sync",color:"red",spin:!0})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.InfraredEmitter=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.InfraredEmitter=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.on,u=l.visible;return(0,o.createComponentVNode)(2,c.Window,{width:225,height:110,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Button,{icon:d?"power-off":"times",content:d?"On":"Off",selected:d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Visibility",children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"eye":"eye-slash",content:u?"Visible":"Invisible",selected:u,onClick:function(){return i("visibility")}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Intellicard=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.Intellicard=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.name,u=l.isDead,s=l.isBraindead,m=l.health,p=l.wireless,C=l.radio,h=l.wiping,N=l.laws,V=void 0===N?[]:N,b=u||s;return(0,o.createComponentVNode)(2,c.Window,{width:500,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:d||"Empty Card",buttons:!!d&&(0,o.createComponentVNode)(2,a.Button,{icon:"trash",content:h?"Stop Wiping":"Wipe",disabled:u,onClick:function(){return i("wipe")}}),children:!!d&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:b?"bad":"good",children:b?"Offline":"Operation"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Software Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:m,minValue:0,maxValue:100,ranges:{good:[70,Infinity],average:[50,70],bad:[-Infinity,50]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Settings",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"signal",content:"Wireless Activity",selected:p,onClick:function(){return i("wireless")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"microphone",content:"Subspace Radio",selected:C,onClick:function(){return i("radio")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Laws",children:V.map((function(e){return(0,o.createComponentVNode)(2,a.BlockQuote,{children:e},e)}))})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Jukebox=void 0;var o=n(0),r=n(14),a=n(30),c=n(2),i=n(1),l=n(3);t.Jukebox=function(e,t){var n=(0,c.useBackend)(t),d=n.act,u=n.data,s=u.active,m=u.track_selected,p=u.track_length,C=u.track_beat,h=u.volume,N=(0,a.flow)([(0,r.sortBy)((function(e){return e.name}))])(u.songs||[]);return(0,o.createComponentVNode)(2,l.Window,{width:370,height:313,children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Song Player",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s?"pause":"play",content:s?"Stop":"Play",selected:s,onClick:function(){return d("toggle")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Track Selected",children:(0,o.createComponentVNode)(2,i.Dropdown,{"overflow-y":"scroll",width:"240px",options:N.map((function(e){return e.name})),disabled:s,selected:m||"Select a Track",onSelected:function(e){return d("select_track",{track:e})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Track Length",children:m?p:"No Track Selected"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Track Beat",children:[m?C:"No Track Selected",1===C?" beat":" beats"]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Machine Settings",children:(0,o.createComponentVNode)(2,i.LabeledControls,{justify:"center",children:(0,o.createComponentVNode)(2,i.LabeledControls.Item,{label:"Volume",children:(0,o.createComponentVNode)(2,i.Box,{position:"relative",children:[(0,o.createComponentVNode)(2,i.Knob,{size:3.2,color:h>=50?"red":"green",value:h,unit:"%",minValue:0,maxValue:100,step:1,stepPixelSize:1,disabled:s,onDrag:function(e,t){return d("set_volume",{volume:t})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"-2px",right:"-22px",color:"transparent",icon:"fast-backward",onClick:function(){return d("set_volume",{volume:"min"})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"16px",right:"-22px",color:"transparent",icon:"fast-forward",onClick:function(){return d("set_volume",{volume:"max"})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,position:"absolute",top:"34px",right:"-22px",color:"transparent",icon:"undo",onClick:function(){return d("set_volume",{volume:"reset"})}})]})})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.KeycardAuth=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.KeycardAuth=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:375,height:125,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{children:1===l.waiting&&(0,o.createVNode)(1,"span",null,"Waiting for another device to confirm your request...",16)}),(0,o.createComponentVNode)(2,a.Box,{children:0===l.waiting&&(0,o.createFragment)([!!l.auth_required&&(0,o.createComponentVNode)(2,a.Button,{icon:"check-square",color:"red",textAlign:"center",lineHeight:"60px",fluid:!0,onClick:function(){return i("auth_swipe")},content:"Authorize"}),0===l.auth_required&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",fluid:!0,onClick:function(){return i("red_alert")},content:"Red Alert"}),(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",fluid:!0,onClick:function(){return i("emergency_maint")},content:"Emergency Maintenance Access"}),(0,o.createComponentVNode)(2,a.Button,{icon:"meteor",fluid:!0,onClick:function(){return i("bsa_unlock")},content:"Bluespace Artillery Unlock"})],4)],0)})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LaborClaimConsole=void 0;var o=n(0),r=n(19),a=n(2),c=n(1),i=n(3);t.LaborClaimConsole=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.can_go_home,s=d.id_points,m=d.ores,p=d.status_info,C=d.unclaimed_points;return(0,o.createComponentVNode)(2,i.Window,{width:315,height:440,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",children:p}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Shuttle controls",children:(0,o.createComponentVNode)(2,c.Button,{content:"Move shuttle",disabled:!u,onClick:function(){return l("move_shuttle")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Points",children:s}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Unclaimed points",buttons:(0,o.createComponentVNode)(2,c.Button,{content:"Claim points",disabled:!C,onClick:function(){return l("claim_points")}}),children:C})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Material values",children:(0,o.createComponentVNode)(2,c.Table,{children:[(0,o.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Material"}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,textAlign:"right",children:"Value"})]}),m.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,r.toTitleCase)(e.ore)}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,textAlign:"right",children:(0,o.createComponentVNode)(2,c.Box,{color:"label",inline:!0,children:e.value})})]},e.ore)}))]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LanguageMenu=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.LanguageMenu=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.admin_mode,u=l.is_living,s=l.omnitongue,m=l.languages,p=void 0===m?[]:m,C=l.unknown_languages,h=void 0===C?[]:C;return(0,o.createComponentVNode)(2,c.Window,{title:"Language Menu",width:700,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Known Languages",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:p.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,buttons:(0,o.createFragment)([!!u&&(0,o.createComponentVNode)(2,a.Button,{content:e.is_default?"Default Language":"Select as Default",disabled:!e.can_speak,selected:e.is_default,onClick:function(){return i("select_default",{language_name:e.name})}}),!!d&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Grant",onClick:function(){return i("grant_language",{language_name:e.name})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Remove",onClick:function(){return i("remove_language",{language_name:e.name})}})],4)],0),children:[e.desc," ","Key: ,",e.key," ",e.can_understand?"Can understand.":"Cannot understand."," ",e.can_speak?"Can speak.":"Cannot speak."]},e.name)}))})}),!!d&&(0,o.createComponentVNode)(2,a.Section,{title:"Unknown Languages",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Omnitongue "+(s?"Enabled":"Disabled"),selected:s,onClick:function(){return i("toggle_omnitongue")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:h.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Grant",onClick:function(){return i("grant_language",{language_name:e.name})}}),children:[e.desc," ","Key: ,",e.key," ",!!e.shadow&&"(gained from mob)"," ",e.can_speak?"Can speak.":"Cannot speak."]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LaunchpadRemote=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=n(206);t.LaunchpadRemote=function(e,t){var n=(0,r.useBackend)(t).data,l=n.has_pad,d=n.pad_closed;return(0,o.createComponentVNode)(2,c.Window,{title:"Briefcase Launchpad Remote",width:300,height:240,theme:"syndicate",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Launchpad Connected"})||d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Launchpad Closed"})||(0,o.createComponentVNode)(2,i.LaunchpadControl,{topLevel:!0})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MafiaPanel=void 0;var o=n(0),r=n(6),a=(n(19),n(2)),c=n(1),i=n(3);t.MafiaPanel=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data,s=u.lobbydata,m=u.players,p=u.actions,C=u.phase,h=u.roleinfo,N=u.role_theme,V=u.admin_controls,b=u.judgement_phase,f=u.timeleft,g=u.all_roles,v=h?30*m.length:7,k=s?s.filter((function(e){return"Ready"===e.status})):null;return(0,o.createComponentVNode)(2,i.Window,{title:"Mafia",theme:N,width:650,height:293+v,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:V,children:[!h&&(0,o.createComponentVNode)(2,c.Flex,{scrollable:!0,overflowY:"scroll",direction:"column",height:"100%",grow:1,children:(0,o.createComponentVNode)(2,c.Section,{title:"Lobby",mb:1,buttons:(0,o.createComponentVNode)(2,l,{phase:C,timeleft:f,admin_controls:V}),children:(0,o.createComponentVNode)(2,c.Box,{textAlign:"center",children:[(0,o.createComponentVNode)(2,c.NoticeBox,{info:!0,children:["The lobby currently has ",k.length,"/12 valid players signed up."]}),(0,o.createComponentVNode)(2,c.Flex,{direction:"column",children:!!s&&s.map((function(e){return(0,o.createComponentVNode)(2,c.Flex.Item,{basis:2,className:"Section__title candystripe",children:(0,o.createComponentVNode)(2,c.Flex,{height:2,align:"center",justify:"space-between",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{basis:0,children:e.name}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:"STATUS:"}),(0,o.createComponentVNode)(2,c.Flex.Item,{width:"30%",children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.Box,{color:"Ready"===e.status?"green":"red",textAlign:"center",children:[e.status," ",e.spectating]})})})]})},e)}))})]})})}),!!h&&(0,o.createComponentVNode)(2,c.Section,{title:C,minHeight:"100px",maxHeight:"50px",buttons:(0,o.createComponentVNode)(2,c.Box,{children:[!!V&&(0,o.createComponentVNode)(2,c.Button,{color:"red",icon:"gavel",tooltipPosition:"bottom-left",tooltip:"Hello admin! If it is the admin controls you seek,\nplease notice the extra scrollbar you have that players\ndo not!"})," ",(0,o.createComponentVNode)(2,c.TimeDisplay,{auto:"down",value:f})]}),children:(0,o.createComponentVNode)(2,c.Flex,{justify:"space-between",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{align:"center",textAlign:"center",maxWidth:"500px",children:[(0,o.createVNode)(1,"b",null,[(0,o.createTextVNode)("You are the "),h.role],0),(0,o.createVNode)(1,"br"),(0,o.createVNode)(1,"b",null,h.desc,0)]}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:[(0,o.createComponentVNode)(2,c.Box,{className:(0,r.classes)(["mafia32x32",h.revealed_icon]),style:{transform:"scale(2) translate(0px, 10%)","vertical-align":"middle"}}),(0,o.createComponentVNode)(2,c.Box,{className:(0,r.classes)(["mafia32x32",h.hud_icon]),style:{transform:"scale(2) translate(-5px, -5px)","vertical-align":"middle"}})]})]})}),(0,o.createComponentVNode)(2,c.Flex,{children:!!p&&p.map((function(e){return(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Button,{onClick:function(){return d("mf_action",{atype:e})},children:e})},e)}))}),!!h&&(0,o.createComponentVNode)(2,c.Section,{title:"Judgement",buttons:(0,o.createComponentVNode)(2,c.Button,{color:"transparent",icon:"info",tooltipPosition:"left",tooltip:"When someone is on trial, you are in charge of their fate.\nInnocent winning means the person on trial can live to see\nanother day... and in losing they do not. You can go back\nto abstaining with the middle button if you reconsider."}),children:[(0,o.createComponentVNode)(2,c.Flex,{justify:"space-around",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"smile-beam",content:"INNOCENT!",color:"good",disabled:!b,onClick:function(){return d("vote_innocent")}}),!b&&(0,o.createComponentVNode)(2,c.Box,{children:"There is nobody on trial at the moment."}),!!b&&(0,o.createComponentVNode)(2,c.Box,{children:"It is now time to vote, vote the accused innocent or guilty!"}),(0,o.createComponentVNode)(2,c.Button,{icon:"angry",content:"GUILTY!",color:"bad",disabled:!b,onClick:function(){return d("vote_guilty")}})]}),(0,o.createComponentVNode)(2,c.Flex,{justify:"center",children:(0,o.createComponentVNode)(2,c.Button,{icon:"meh",content:"Abstain",color:"white",disabled:!b,onClick:function(){return d("vote_abstain")}})})]}),"No Game"!==C&&(0,o.createComponentVNode)(2,c.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:2,children:(0,o.createComponentVNode)(2,c.Section,{title:"Players",buttons:(0,o.createComponentVNode)(2,c.Button,{color:"transparent",icon:"info",tooltip:"This is the list of all the players in\nthe game, during the day phase you may vote on them and,\ndepending on your role, select players\nat certain phases to use your ability."}),children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",children:!!m&&m.map((function(e){return(0,o.createComponentVNode)(2,c.Flex.Item,{height:"30px",className:"Section__title candystripe",children:(0,o.createComponentVNode)(2,c.Flex,{height:"18px",justify:"space-between",align:"center",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{basis:16,children:[!!e.alive&&(0,o.createComponentVNode)(2,c.Box,{children:e.name}),!e.alive&&(0,o.createComponentVNode)(2,c.Box,{color:"red",children:e.name})]}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:!e.alive&&(0,o.createComponentVNode)(2,c.Box,{color:"red",children:"DEAD"})}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:e.votes!==undefined&&!!e.alive&&(0,o.createFragment)([(0,o.createTextVNode)("Votes : "),e.votes,(0,o.createTextVNode)(" ")],0)}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:!!e.actions&&e.actions.map((function(t){return(0,o.createComponentVNode)(2,c.Button,{onClick:function(){return d("mf_targ_action",{atype:t,target:e.ref})},children:t},t)}))})]})},e.ref)}))})})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:2,children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Section,{title:"Roles and Notes",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{color:"transparent",icon:"address-book",tooltipPosition:"bottom-left",tooltip:"The top section is the roles in the game. You can\npress the question mark to get a quick blurb\nabout the role itself."}),(0,o.createComponentVNode)(2,c.Button,{color:"transparent",icon:"edit",tooltipPosition:"bottom-left",tooltip:"The bottom section are your notes. on some roles this\nwill just be an empty box, but on others it records the\nactions of your abilities (so for example, your\ndetective work revealing a changeling)."})],4),children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",children:!!g&&g.map((function(e){return(0,o.createComponentVNode)(2,c.Flex.Item,{height:"30px",className:"Section__title candystripe",children:(0,o.createComponentVNode)(2,c.Flex,{height:"18px",align:"center",justify:"space-between",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{children:e}),(0,o.createComponentVNode)(2,c.Flex.Item,{textAlign:"right",children:(0,o.createComponentVNode)(2,c.Button,{color:"transparent",icon:"question",onClick:function(){return d("mf_lookup",{atype:e.slice(0,-3)})}})})]})},e)}))})}),!!h&&(0,o.createComponentVNode)(2,c.Flex.Item,{height:0,grow:1,children:(0,o.createComponentVNode)(2,c.Section,{scrollable:!0,fill:!0,overflowY:"scroll",children:h!==undefined&&!!h.action_log&&h.action_log.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:e},e)}))})})]})})]}),(0,o.createComponentVNode)(2,c.Flex,{mt:1,direction:"column",children:(0,o.createComponentVNode)(2,c.Flex.Item,{children:!!V&&(0,o.createComponentVNode)(2,c.Section,{textAlign:"center",children:(0,o.createComponentVNode)(2,c.Collapsible,{title:"ADMIN CONTROLS",color:"red",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"exclamation-triangle",color:"black",tooltipPosition:"top",tooltip:"Almost all of these are all built to help me debug\nthe game (ow, debugging a 12 player game!) So they are\nrudamentary and prone to breaking at the drop of a hat.\nMake sure you know what you're doing when you press one.\nAlso because an admin did it: do not gib/delete/dust\nanyone! It will runtime the game to death!",content:"A Kind, Coder Warning",onClick:function(){return d("next_phase")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button,{icon:"arrow-right",tooltipPosition:"top",tooltip:"This will advance the game to the next phase\n(day talk > day voting, day voting > night/trial)\npretty fun to just spam this and freak people out,\ntry that roundend!",content:"Next Phase",onClick:function(){return d("next_phase")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"home",tooltipPosition:"top",tooltip:"Hopefully you won't use this button\noften, it's a safety net just in case\nmafia players somehow escape (nullspace\nredirects to the error room then station)\nEither way, VERY BAD IF THAT HAPPENS as\ngodmoded assistants will run free. Use\nthis to recollect them then make a bug report.",content:"Send All Players Home",onClick:function(){return d("players_home")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"sync-alt",tooltipPosition:"top",tooltip:"This immediately ends the game, and attempts to start\nanother. Nothing will happen if another\ngame fails to start!",content:"New Game",onClick:function(){return d("new_game")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"skull",tooltipPosition:"top",tooltip:"Deletes the datum, clears all landmarks, makes mafia\nas it was roundstart: nonexistant. Use this if you\nreally mess things up. You did mess things up, didn't you.",content:"Nuke",onClick:function(){return d("nuke")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button,{icon:"paint-brush",tooltipPosition:"top",tooltip:"This is the custom game creator, it is... simple.\nYou put in roles and until you press CANCEL or FINISH\nit will keep letting you add more roles. Assitants\non the bottom because of pathing stuff. Resets after\nthe round finishes back to 12 player random setups.",content:"Create Custom Setup",onClick:function(){return d("debug_setup")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"paint-roller",tooltipPosition:"top",tooltip:"If you messed up and accidently didn't make it how\nyou wanted, simply just press this to reset it. The game\nwill auto reset after each game as well.",content:"Reset Custom Setup",onClick:function(){return d("cancel_setup")}})]})})})})]})})};var l=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.phase,d=i.timeleft,u=i.admin_controls;return(0,o.createComponentVNode)(2,c.Box,{children:["[Phase = ",l," | ",(0,o.createComponentVNode)(2,c.TimeDisplay,{auto:"down",value:d}),"]"," ",(0,o.createComponentVNode)(2,c.Button,{icon:"clipboard-check",tooltipPosition:"bottom-left",tooltip:"Signs you up for the next game. If there\nis an ongoing one, you will be signed up\nfor the next.",content:"Sign Up",onClick:function(){return r("mf_signup")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"eye",tooltipPosition:"bottom-left",tooltip:"Spectates games until you turn it off.\nAutomatically enabled when you die in game,\nbecause I assumed you would want to see the\nconclusion. You won't get messages if you\nrejoin SS13.",content:"Spectate",onClick:function(){return r("mf_spectate")}}),!!u&&(0,o.createComponentVNode)(2,c.Button,{color:"red",icon:"gavel",tooltipPosition:"bottom-left",tooltip:"Hello admin! If it is the admin controls you seek,\nplease notice the scrollbar you have that players\ndo not!"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.MalfunctionModulePicker=void 0;var o=n(0),r=n(2),a=n(3),c=n(142);t.MalfunctionModulePicker=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.processingTime);return(0,o.createComponentVNode)(2,a.Window,{width:620,height:525,theme:"malfunction",resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.GenericUplink,{currencyAmount:i,currencySymbol:"PT"})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechBayPowerConsole=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.MechBayPowerConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.recharge_port,d=l&&l.mech,u=d&&d.cell;return(0,o.createComponentVNode)(2,c.Window,{width:400,height:200,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Mech status",textAlign:"center",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Sync",onClick:function(){return i("reconnect")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No power port detected. Please re-sync."})||!d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mech detected."})||(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.health/d.maxhealth,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No power port detected. Please re-sync."})||!d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mech detected."})||!u&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cell is installed."})||(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.charge/u.maxcharge,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]},children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.charge})," / "+u.maxcharge]})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechpadConsole=t.MechpadControl=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=function(e,t){var n=e.topLevel,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.pad_name,u=l.connected_mechpad;return(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Input,{value:d,width:"170px",onChange:function(e,t){return i("rename",{name:t})}}),level:n?1:2,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Remove",color:"bad",onClick:function(){return i("remove")}}),children:!u&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",textAlign:"center",children:"No Pad Connected."})||(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"upload",content:"Launch",textAlign:"center",onClick:function(){return i("launch")}})})};t.MechpadControl=i;t.MechpadConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.mechpads,s=void 0===u?[]:u,m=d.selected_id;return(0,o.createComponentVNode)(2,c.Window,{width:475,height:130,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:0===s.length&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Pads Connected"})||(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Flex,{minHeight:"70px",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"140px",minHeight:"70px",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,ellipsis:!0,content:e.name,selected:m===e.id,color:"transparent",onClick:function(){return l("select_pad",{id:e.id})}},e.name)}))}),(0,o.createComponentVNode)(2,a.Flex.Item,{minHeight:"100%",children:(0,o.createComponentVNode)(2,a.Divider,{vertical:!0})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,minHeight:"100%",children:m&&(0,o.createComponentVNode)(2,i)||(0,o.createComponentVNode)(2,a.Box,{children:"Please select a pad"})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MedicalKiosk=void 0;var o=n(0),r=(n(19),n(2)),a=n(1),c=n(3);t.MedicalKiosk=function(e,t){var n=(0,r.useBackend)(t),p=(n.act,n.data),C=(0,r.useSharedState)(t,"scanIndex")[0],h=p.active_status_1,N=p.active_status_2,V=p.active_status_3,b=p.active_status_4;return(0,o.createComponentVNode)(2,c.Window,{width:575,height:420,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Flex,{mb:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:1,children:(0,o.createComponentVNode)(2,a.Section,{minHeight:"100%",children:[(0,o.createComponentVNode)(2,i,{index:1,icon:"procedures",name:"General Health Scan",description:"Reads back exact values of your general health scan."}),(0,o.createComponentVNode)(2,i,{index:2,icon:"heartbeat",name:"Symptom Based Checkup",description:"Provides information based on various non-obvious symptoms,\nlike blood levels or disease status."}),(0,o.createComponentVNode)(2,i,{index:3,icon:"radiation-alt",name:"Neurological/Radiological Scan",description:"Provides information about brain trauma and radiation."}),(0,o.createComponentVNode)(2,i,{index:4,icon:"mortar-pestle",name:"Chemical and Psychoactive Scan",description:"Provides a list of consumed chemicals, as well as potential\nside effects."})]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,l)})]}),!!h&&1===C&&(0,o.createComponentVNode)(2,d),!!N&&2===C&&(0,o.createComponentVNode)(2,u),!!V&&3===C&&(0,o.createComponentVNode)(2,s),!!b&&4===C&&(0,o.createComponentVNode)(2,m)]})})};var i=function(e,t){var n=e.index,c=e.name,i=e.description,l=e.icon,d=(0,r.useBackend)(t),u=d.act,s=d.data,m=(0,r.useSharedState)(t,"scanIndex"),p=m[0],C=m[1],h=s["active_status_"+n];return(0,o.createComponentVNode)(2,a.Flex,{spacing:1,align:"baseline",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"16px",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Icon,{name:h?"check":"dollar-sign",color:h?"green":"grey"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:l,selected:h&&p===n,tooltip:i,tooltipPosition:"right",content:c,onClick:function(){h||u("beginScan_"+n),C(n)}})})]})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.kiosk_cost,d=i.patient_name;return(0,o.createComponentVNode)(2,a.Section,{minHeight:"100%",children:[(0,o.createComponentVNode)(2,a.Box,{italic:!0,children:["Greetings Valued Employee! Please select a desired automatic health check procedure. Diagnosis costs ",(0,o.createVNode)(1,"b",null,[l,(0,o.createTextVNode)(" credits.")],0)]}),(0,o.createComponentVNode)(2,a.Box,{mt:1,children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mr:1,children:"Patient:"}),d]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,tooltip:"Resets the current scanning target, cancelling current scans.",icon:"sync",color:"average",onClick:function(){return c("clearTarget")},content:"Reset Scanner"})]})},d=function(e,t){var n=(0,r.useBackend)(t).data,c=n.patient_health,i=n.brute_health,l=n.burn_health,d=n.suffocation_health,u=n.toxin_health;return(0,o.createComponentVNode)(2,a.Section,{title:"Patient Health",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:c/100,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:c}),"%"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brute Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:i/100,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:i})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Burn Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:l/100,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:l})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Oxygen Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d/100,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toxin Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u/100,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u})})})]})})},u=function(e,t){var n=(0,r.useBackend)(t).data,c=n.patient_status,i=n.patient_illness,l=n.illness_info,d=n.bleed_status,u=n.blood_levels,s=n.blood_status;return(0,o.createComponentVNode)(2,a.Section,{title:"Symptom Based Checkup",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Patient Status",color:"good",children:c}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Disease Status",children:i}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Disease information",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood Levels",children:[(0,o.createComponentVNode)(2,a.ProgressBar,{value:u/100,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u})}),(0,o.createComponentVNode)(2,a.Box,{mt:1,color:"label",children:d})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood Information",children:s})]})})},s=function(e,t){var n=(0,r.useBackend)(t).data,c=n.clone_health,i=n.brain_damage,l=n.brain_health,d=n.rad_contamination_status,u=n.rad_contamination_value,s=n.rad_sickness_status,m=n.rad_sickness_value,p=n.trauma_status;return(0,o.createComponentVNode)(2,a.Section,{title:"Patient Neurological and Radiological Health",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cellular Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:c/100,color:"good",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:c})})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brain Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:i/100,color:"good",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:i})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brain Status",color:"health-0",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brain Trauma Status",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Sickness Status",children:s}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Sickness Percentage",children:[m,"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Contamination Status",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Contamination Percentage",children:[u,"%"]})]})})},m=function(e,t){var n=(0,r.useBackend)(t).data,c=n.chemical_list,i=void 0===c?[]:c,l=n.overdose_list,d=void 0===l?[]:l,u=n.addict_list,s=void 0===u?[]:u,m=n.hallucinating_status;return(0,o.createComponentVNode)(2,a.Section,{title:"Chemical and Psychoactive Analysis",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Chemical Contents",children:[0===i.length&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No reagents detected."}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{color:"good",children:[e.volume," units of ",e.name]},e.id)}))]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Overdose Status",color:"bad",children:[0===d.length&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Patient is not overdosing."}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["Overdosing on ",e.name]},e.id)}))]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Addiction Status",color:"bad",children:[0===s.length&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Patient has no addictions."}),s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["Addicted to ",e.name]},e.id)}))]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Psychoactive Status",children:m})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Microscope=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.Microscope=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=(0,r.useSharedState)(t,"tab",1),m=s[0],p=s[1],C=u.has_dish,h=u.cell_lines,N=void 0===h?[]:h,V=u.viruses,b=void 0===V?[]:V;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dish Sample",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!C,onClick:function(){return d("eject_petridish")}})})})}),(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{icon:"microscope",lineHeight:"23px",selected:1===m,onClick:function(){return p(1)},children:["Micro-Organisms (",N.length,")"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{icon:"microscope",lineHeight:"23px",selected:2===m,onClick:function(){return p(2)},children:["Viruses (",b.length,")"]})]}),1===m&&(0,o.createComponentVNode)(2,i,{cell_lines:N}),2===m&&(0,o.createComponentVNode)(2,l,{viruses:b})]})})};var i=function(e,t){var n=e.cell_lines,c=(0,r.useBackend)(t);c.act,c.data;return n.length?n.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.desc,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Growth Rate",children:e.growth_rate}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Virus Suspectibility",children:e.suspectibility}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Required Reagents",children:e.requireds}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Supplementary Reagents",children:e.supplementaries}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Suppresive reagents",children:e.suppressives})]})},e.desc)})):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No micro-organisms found"})},l=function(e,t){var n=e.viruses;(0,r.useBackend)(t).act;return n.length?n.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.desc},e.desc)})):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No viruses found"})}},function(e,t,n){"use strict";t.__esModule=!0,t.MiningVendor=void 0;var o=n(0),r=n(6),a=n(2),c=n(1),i=n(3);t.MiningVendor=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=[].concat(d.product_records);return(0,o.createComponentVNode)(2,i.Window,{width:425,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{title:"User",children:d.user&&(0,o.createComponentVNode)(2,c.Box,{children:["Welcome, ",(0,o.createVNode)(1,"b",null,d.user.name||"Unknown",0),","," ",(0,o.createVNode)(1,"b",null,d.user.job||"Unemployed",0),"!",(0,o.createVNode)(1,"br"),"Your balance is ",(0,o.createVNode)(1,"b",null,[d.user.points,(0,o.createTextVNode)(" mining points")],0),"."]})||(0,o.createComponentVNode)(2,c.Box,{color:"light-gray",children:["No registered ID card!",(0,o.createVNode)(1,"br"),"Please contact your local HoP!"]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Equipment",children:(0,o.createComponentVNode)(2,c.Table,{children:u.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createVNode)(1,"span",(0,r.classes)(["vending32x32",e.path]),null,1,{style:{"vertical-align":"middle"}})," ",(0,o.createVNode)(1,"b",null,e.name,0)]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{style:{"min-width":"95px","text-align":"center"},disabled:!d.user||e.price>d.user.points,content:e.price+" points",onClick:function(){return l("purchase",{ref:e.ref})}})})]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Mint=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.Mint=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.inserted_materials||[];return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Materials",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:l.processing?"times":"power-off",content:l.processing?"Stop":"Start",selected:l.processing,onClick:function(){return i(l.processing?"stoppress":"startpress")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.material,buttons:(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:l.chosen_material===e.material,onClick:function(){return i("changematerial",{material_name:e.material})}}),children:[e.amount," cm\xb3"]},e.material)}))})}),(0,o.createComponentVNode)(2,a.Section,{children:["Pressed ",l.produced_coins," coins this cycle."]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Mule=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=n(64);t.Mule=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.on,s=d.cell,m=d.cellPercent,p=d.load,C=d.mode,h=d.modeStatus,N=d.haspai,V=d.autoReturn,b=d.autoPickup,f=d.reportDelivery,g=d.destination,v=d.home,k=d.id,x=d.destinations,B=void 0===x?[]:x,_=d.locked&&!d.siliconUser;return(0,o.createComponentVNode)(2,c.Window,{width:350,height:425,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.InterfaceLockNoticeBox),(0,o.createComponentVNode)(2,a.Section,{title:"Status",minHeight:"110px",buttons:!_&&(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return l("power")}}),children:[(0,o.createComponentVNode)(2,a.ProgressBar,{value:s?m/100:0,color:s?"good":"bad"}),(0,o.createComponentVNode)(2,a.Flex,{mt:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mode",color:h,children:C})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Load",color:p?"good":"average",children:p||"None"})})})]})]}),!_&&(0,o.createComponentVNode)(2,a.Section,{title:"Controls",buttons:(0,o.createFragment)([!!p&&(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Unload",onClick:function(){return l("unload")}}),!!N&&(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject PAI",onClick:function(){return l("ejectpai")}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID",children:(0,o.createComponentVNode)(2,a.Input,{value:k,onChange:function(e,t){return l("setid",{value:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destination",children:[(0,o.createComponentVNode)(2,a.Dropdown,{over:!0,selected:g||"None",options:B,width:"150px",onSelected:function(e){return l("destination",{value:e})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"stop",content:"Stop",onClick:function(){return l("stop")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"play",content:"Go",onClick:function(){return l("go")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Home",children:[(0,o.createComponentVNode)(2,a.Dropdown,{over:!0,selected:v,options:B,width:"150px",onSelected:function(e){return l("destination",{value:e})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"home",content:"Go Home",onClick:function(){return l("home")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Settings",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:V,content:"Auto-Return",onClick:function(){return l("autored")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:b,content:"Auto-Pickup",onClick:function(){return l("autopick")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:f,content:"Report Delivery",onClick:function(){return l("report")}})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NaniteChamberControlContent=t.NaniteChamberControl=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NaniteChamberControl=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{width:380,height:570,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.status_msg,d=i.locked,u=i.occupant_name,s=i.has_nanites,m=i.nanite_volume,p=i.regen_rate,C=i.safety_threshold,h=i.cloud_id,N=i.scan_level;if(l)return(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:l});var V=i.mob_programs||[];return(0,o.createComponentVNode)(2,a.Section,{title:"Chamber: "+u,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d?"lock":"lock-open",content:d?"Locked":"Unlocked",color:d?"bad":"default",onClick:function(){return c("toggle_lock")}}),children:s?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Status",level:2,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",content:"Destroy Nanites",color:"bad",onClick:function(){return c("remove_nanites")}}),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nanite Volume",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Growth Rate",children:p})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safety Threshold",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:C,minValue:0,maxValue:500,width:"39px",onChange:function(e,t){return c("set_safety",{value:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cloud ID",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:h,minValue:0,maxValue:100,step:1,stepPixelSize:3,width:"39px",onChange:function(e,t){return c("set_cloud",{value:t})}})})]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Programs",level:2,children:V.map((function(e){var t=e.extra_settings||[],n=e.rules||[];return(0,o.createComponentVNode)(2,a.Collapsible,{title:e.name,children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:e.desc}),N>=2&&(0,o.createComponentVNode)(2,a.Grid.Column,{size:.6,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Activation Status",children:(0,o.createComponentVNode)(2,a.Box,{color:e.activated?"good":"bad",children:e.activated?"Active":"Inactive"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nanites Consumed",children:[e.use_rate,"/s"]})]})})]}),N>=2&&(0,o.createComponentVNode)(2,a.Grid,{children:[!!e.can_trigger&&(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Triggers",level:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cost",children:e.trigger_cost}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cooldown",children:e.trigger_cooldown}),!!e.timer_trigger_delay&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Delay",children:[e.timer_trigger_delay," s"]}),!!e.timer_trigger&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Repeat Timer",children:[e.timer_trigger," s"]})]})})}),!(!e.timer_restart&&!e.timer_shutdown)&&(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.timer_restart&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Restart Timer",children:[e.timer_restart," s"]}),e.timer_shutdown&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shutdown Timer",children:[e.timer_shutdown," s"]})]})})})]}),N>=3&&!!e.has_extra_settings&&(0,o.createComponentVNode)(2,a.Section,{title:"Extra Settings",level:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:t.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:e.value},e.name)}))})}),N>=4&&(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Codes",level:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[!!e.activation_code&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Activation",children:e.activation_code}),!!e.deactivation_code&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Deactivation",children:e.deactivation_code}),!!e.kill_code&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Kill",children:e.kill_code}),!!e.can_trigger&&!!e.trigger_code&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger",children:e.trigger_code})]})})}),e.has_rules&&(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Rules",level:2,children:n.map((function(e){return(0,o.createFragment)([e.display,(0,o.createVNode)(1,"br")],0,e.display)}))})})]})]})},e.name)}))})],4):(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"bad",textAlign:"center",fontSize:"30px",mb:1,children:"No Nanites Detected"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,bold:!0,icon:"syringe",content:" Implant Nanites",color:"green",textAlign:"center",fontSize:"30px",lineHeight:"50px",onClick:function(){return c("nanite_injection")}})],4)})};t.NaniteChamberControlContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.NaniteCloudControl=t.NaniteCloudBackupDetails=t.NaniteCloudBackupList=t.NaniteInfoBox=t.NaniteDiskBox=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=function(e,t){var n=(0,r.useBackend)(t).data,c=n.has_disk,i=n.has_program,d=n.disk;return c?i?(0,o.createComponentVNode)(2,l,{program:d}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Inserted disk has no program"}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No disk inserted"})};t.NaniteDiskBox=i;var l=function(e,t){var n=e.program,r=n.name,c=n.desc,i=n.activated,l=n.use_rate,d=n.can_trigger,u=n.trigger_cost,s=n.trigger_cooldown,m=n.activation_code,p=n.deactivation_code,C=n.kill_code,h=n.trigger_code,N=n.timer_restart,V=n.timer_shutdown,b=n.timer_trigger,f=n.timer_trigger_delay,g=n.extra_settings||[];return(0,o.createComponentVNode)(2,a.Section,{title:r,level:2,buttons:(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,color:i?"good":"bad",children:i?"Activated":"Deactivated"}),children:[(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{mr:1,children:c}),(0,o.createComponentVNode)(2,a.Grid.Column,{size:.5,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Use Rate",children:l}),!!d&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cost",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cooldown",children:s})],4)]})})]}),(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Codes",level:3,mr:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Activation",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Deactivation",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Kill",children:C}),!!d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger",children:h})]})})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Delays",level:3,mr:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Restart",children:[N," s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shutdown",children:[V," s"]}),!!d&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger",children:[b," s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Delay",children:[f," s"]})],4)]})})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Extra Settings",level:3,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:g.map((function(e){var t={number:(0,o.createFragment)([e.value,e.unit],0),text:e.value,type:e.value,boolean:e.value?e.true_text:e.false_text};return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:t[e.type]},e.name)}))})})]})};t.NaniteInfoBox=l;var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act;return(n.data.cloud_backups||[]).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Backup #"+e.cloud_id,textAlign:"center",onClick:function(){return c("set_view",{view:e.cloud_id})}},e.cloud_id)}))};t.NaniteCloudBackupList=d;var u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.current_view,u=i.disk,s=i.has_program,m=i.cloud_backup,p=u&&u.can_rule||!1;if(!m)return(0,o.createComponentVNode)(2,a.NoticeBox,{children:"ERROR: Backup not found"});var C=i.cloud_programs||[];return(0,o.createComponentVNode)(2,a.Section,{title:"Backup #"+d,level:2,buttons:!!s&&(0,o.createComponentVNode)(2,a.Button,{icon:"upload",content:"Upload From Disk",color:"good",onClick:function(){return c("upload_program")}}),children:C.map((function(e){var t=e.rules||[];return(0,o.createComponentVNode)(2,a.Collapsible,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"minus-circle",color:"bad",onClick:function(){return c("remove_program",{program_id:e.id})}}),children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,l,{program:e}),(!!p||!!e.has_rules)&&(0,o.createComponentVNode)(2,a.Section,{mt:-2,title:"Rules",level:2,buttons:!!p&&(0,o.createComponentVNode)(2,a.Button,{icon:"plus",content:"Add Rule from Disk",color:"good",onClick:function(){return c("add_rule",{program_id:e.id})}}),children:e.has_rules?t.map((function(t){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"minus-circle",color:"bad",onClick:function(){return c("remove_rule",{program_id:e.id,rule_id:t.id})}})," "+t.display]},t.display)})):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No Active Rules"})})]})},e.name)}))})};t.NaniteCloudBackupDetails=u;t.NaniteCloudControl=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,m=s.has_disk,p=s.current_view,C=s.new_backup_id;return(0,o.createComponentVNode)(2,c.Window,{width:375,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Program Disk",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!m,onClick:function(){return l("eject")}}),children:(0,o.createComponentVNode)(2,i)}),(0,o.createComponentVNode)(2,a.Section,{title:"Cloud Storage",buttons:p?(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Return",onClick:function(){return l("set_view",{view:0})}}):(0,o.createFragment)(["New Backup: ",(0,o.createComponentVNode)(2,a.NumberInput,{value:C,minValue:1,maxValue:100,stepPixelSize:4,width:"39px",onChange:function(e,t){return l("update_new_backup_value",{value:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"plus",onClick:function(){return l("create_backup")}})],0),children:s.current_view?(0,o.createComponentVNode)(2,u):(0,o.createComponentVNode)(2,d)})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NaniteProgramHub=void 0;var o=n(0),r=n(14),a=n(2),c=n(1),i=n(3);t.NaniteProgramHub=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.detail_view,s=d.disk,m=d.has_disk,p=d.has_program,C=d.programs,h=void 0===C?{}:C,N=(0,a.useSharedState)(t,"category"),V=N[0],b=N[1],f=h&&h[V]||[];return(0,o.createComponentVNode)(2,i.Window,{width:500,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{title:"Program Disk",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject",onClick:function(){return l("eject")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"minus-circle",content:"Delete Program",onClick:function(){return l("clear")}})],4),children:m?p?(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Program Name",children:s.name}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description",children:s.desc})]}):(0,o.createComponentVNode)(2,c.NoticeBox,{children:"No Program Installed"}):(0,o.createComponentVNode)(2,c.NoticeBox,{children:"Insert Disk"})}),(0,o.createComponentVNode)(2,c.Section,{title:"Programs",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:u?"info":"list",content:u?"Detailed":"Compact",onClick:function(){return l("toggle_details")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"sync",content:"Sync Research",onClick:function(){return l("refresh")}})],4),children:null!==h?(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{minWidth:"110px",children:(0,o.createComponentVNode)(2,c.Tabs,{vertical:!0,children:(0,r.map)((function(e,t){var n=t.substring(0,t.length-8);return(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:t===V,onClick:function(){return b(t)},children:n},t)}))(h)})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,basis:0,children:u?f.map((function(e){return(0,o.createComponentVNode)(2,c.Section,{title:e.name,level:2,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"download",content:"Download",disabled:!m,onClick:function(){return l("download",{program_id:e.id})}}),children:e.desc},e.id)})):(0,o.createComponentVNode)(2,c.LabeledList,{children:f.map((function(e){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.name,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"download",content:"Download",disabled:!m,onClick:function(){return l("download",{program_id:e.id})}})},e.id)}))})})]}):(0,o.createComponentVNode)(2,c.NoticeBox,{children:"No nanite programs are currently researched."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NaniteProgrammerContent=t.NaniteProgrammer=t.NaniteExtraBoolean=t.NaniteExtraType=t.NaniteExtraText=t.NaniteExtraNumber=t.NaniteExtraEntry=t.NaniteDelays=t.NaniteCodes=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Codes",level:3,mr:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Activation",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:i.activation_code,width:"47px",minValue:0,maxValue:9999,onChange:function(e,t){return c("set_code",{target_code:"activation",code:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Deactivation",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:i.deactivation_code,width:"47px",minValue:0,maxValue:9999,onChange:function(e,t){return c("set_code",{target_code:"deactivation",code:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Kill",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:i.kill_code,width:"47px",minValue:0,maxValue:9999,onChange:function(e,t){return c("set_code",{target_code:"kill",code:t})}})}),!!i.can_trigger&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:i.trigger_code,width:"47px",minValue:0,maxValue:9999,onChange:function(e,t){return c("set_code",{target_code:"trigger",code:t})}})})]})})};t.NaniteCodes=i;var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Delays",level:3,ml:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Restart Timer",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:i.timer_restart,unit:"s",width:"57px",minValue:0,maxValue:3600,onChange:function(e,t){return c("set_restart_timer",{delay:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shutdown Timer",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:i.timer_shutdown,unit:"s",width:"57px",minValue:0,maxValue:3600,onChange:function(e,t){return c("set_shutdown_timer",{delay:t})}})}),!!i.can_trigger&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Repeat Timer",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:i.timer_trigger,unit:"s",width:"57px",minValue:0,maxValue:3600,onChange:function(e,t){return c("set_trigger_timer",{delay:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Delay",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:i.timer_trigger_delay,unit:"s",width:"57px",minValue:0,maxValue:3600,onChange:function(e,t){return c("set_timer_trigger_delay",{delay:t})}})})],4)]})})};t.NaniteDelays=l;var d=function(e,t){var n=e.extra_setting,r=n.name,c=n.type,i={number:(0,o.createComponentVNode)(2,u,{extra_setting:n}),text:(0,o.createComponentVNode)(2,s,{extra_setting:n}),type:(0,o.createComponentVNode)(2,m,{extra_setting:n}),boolean:(0,o.createComponentVNode)(2,p,{extra_setting:n})};return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:r,children:i[c]})};t.NaniteExtraEntry=d;var u=function(e,t){var n=e.extra_setting,c=(0,r.useBackend)(t).act,i=n.name,l=n.value,d=n.min,u=n.max,s=n.unit;return(0,o.createComponentVNode)(2,a.NumberInput,{value:l,width:"64px",minValue:d,maxValue:u,unit:s,onChange:function(e,t){return c("set_extra_setting",{target_setting:i,value:t})}})};t.NaniteExtraNumber=u;var s=function(e,t){var n=e.extra_setting,c=(0,r.useBackend)(t).act,i=n.name,l=n.value;return(0,o.createComponentVNode)(2,a.Input,{value:l,width:"200px",onInput:function(e,t){return c("set_extra_setting",{target_setting:i,value:t})}})};t.NaniteExtraText=s;var m=function(e,t){var n=e.extra_setting,c=(0,r.useBackend)(t).act,i=n.name,l=n.value,d=n.types;return(0,o.createComponentVNode)(2,a.Dropdown,{over:!0,selected:l,width:"150px",options:d,onSelected:function(e){return c("set_extra_setting",{target_setting:i,value:e})}})};t.NaniteExtraType=m;var p=function(e,t){var n=e.extra_setting,c=(0,r.useBackend)(t).act,i=n.name,l=n.value,d=n.true_text,u=n.false_text;return(0,o.createComponentVNode)(2,a.Button.Checkbox,{content:l?d:u,checked:l,onClick:function(){return c("set_extra_setting",{target_setting:i})}})};t.NaniteExtraBoolean=p;t.NaniteProgrammer=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{width:420,height:550,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,C)})})};var C=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data,s=u.has_disk,m=u.has_program,p=u.name,C=u.desc,h=u.use_rate,N=u.can_trigger,V=u.trigger_cost,b=u.trigger_cooldown,f=u.activated,g=u.has_extra_settings,v=u.extra_settings,k=void 0===v?{}:v;return s?m?(0,o.createComponentVNode)(2,a.Section,{title:p,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",onClick:function(){return c("eject")}}),children:[(0,o.createComponentVNode)(2,a.Section,{title:"Info",level:2,children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:C}),(0,o.createComponentVNode)(2,a.Grid.Column,{size:.7,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Use Rate",children:h}),!!N&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cost",children:V}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cooldown",children:b})],4)]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Settings",level:2,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:f?"power-off":"times",content:f?"Active":"Inactive",selected:f,color:"bad",bold:!0,onClick:function(){return c("toggle_active")}}),children:[(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,i)}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,l)})]}),!!g&&(0,o.createComponentVNode)(2,a.Section,{title:"Special",level:3,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:k.map((function(e){return(0,o.createComponentVNode)(2,d,{extra_setting:e},e.name)}))})})]})]}):(0,o.createComponentVNode)(2,a.Section,{title:"Blank Disk",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",onClick:function(){return c("eject")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Insert a nanite program disk"})};t.NaniteProgrammerContent=C},function(e,t,n){"use strict";t.__esModule=!0,t.NaniteRemoteContent=t.NaniteRemote=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NaniteRemote=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{width:420,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.code,d=i.locked,u=i.mode,s=i.program_name,m=i.relay_code,p=i.comms,C=i.message,h=i.saved_settings,N=void 0===h?[]:h;return d?(0,o.createComponentVNode)(2,a.NoticeBox,{children:"This interface is locked."}):(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Nanite Control",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lock",content:"Lock Interface",onClick:function(){return c("lock")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:[(0,o.createComponentVNode)(2,a.Input,{value:s,maxLength:14,width:"130px",onChange:function(e,t){return c("update_name",{name:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"save",content:"Save",onClick:function(){return c("save")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:p?"Comm Code":"Signal Code",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:l,minValue:0,maxValue:9999,width:"47px",step:1,stepPixelSize:2,onChange:function(e,t){return c("set_code",{code:t})}})}),!!p&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message",children:(0,o.createComponentVNode)(2,a.Input,{value:C,width:"270px",onChange:function(e,t){return c("set_message",{value:t})}})}),"Relay"===u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Relay Code",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:m,minValue:0,maxValue:9999,width:"47px",step:1,stepPixelSize:2,onChange:function(e,t){return c("set_relay_code",{code:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Signal Mode",children:["Off","Local","Targeted","Area","Relay"].map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e,selected:u===e,onClick:function(){return c("select_mode",{mode:e})}},e)}))})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Saved Settings",children:N.length>0?(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"35%",children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"20%",children:"Mode"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Code"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Relay"})]}),N.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,color:"label",children:[e.name,":"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.mode}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.code}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Relay"===e.mode&&e.relay_code}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"upload",color:"good",onClick:function(){return c("load",{save_id:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"minus",color:"bad",onClick:function(){return c("remove_save",{save_id:e.id})}})]})]},e.id)}))]}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No settings currently saved"})})],4)};t.NaniteRemoteContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.NotificationPreferences=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NotificationPreferences=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=(n.data.ignore||[]).sort((function(e,t){var n=e.desc.toLowerCase(),o=t.desc.toLowerCase();return no?1:0}));return(0,o.createComponentVNode)(2,c.Window,{title:"Notification Preferences",width:270,height:360,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Ghost Role Notifications",children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:e.enabled?"times":"check",content:e.desc,color:e.enabled?"bad":"good",onClick:function(){return i("toggle_ignore",{key:e.key})}},e.key)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtnetRelay=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NtnetRelay=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.enabled,u=l.dos_capacity,s=l.dos_overload,m=l.dos_crashed;return(0,o.createComponentVNode)(2,c.Window,{title:"NtNet Quantum Relay",width:400,height:300,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Network Buffer",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",selected:d,content:d?"ENABLED":"DISABLED",onClick:function(){return i("toggle")}}),children:m?(0,o.createComponentVNode)(2,a.Box,{fontFamily:"monospace",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"20px",children:"NETWORK BUFFER OVERFLOW"}),(0,o.createComponentVNode)(2,a.Box,{fontSize:"16px",children:"OVERLOAD RECOVERY MODE"}),(0,o.createComponentVNode)(2,a.Box,{children:"This system is suffering temporary outage due to overflow of traffic buffers. Until buffered traffic is processed, all further requests will be dropped. Frequent occurences of this error may indicate insufficient hardware capacity of your network. Please contact your network planning department for instructions on how to resolve this issue."}),(0,o.createComponentVNode)(2,a.Box,{fontSize:"20px",color:"bad",children:"ADMINISTRATOR OVERRIDE"}),(0,o.createComponentVNode)(2,a.Box,{fontSize:"16px",color:"bad",children:"CAUTION - DATA LOSS MAY OCCUR"}),(0,o.createComponentVNode)(2,a.Button,{icon:"signal",content:"PURGE BUFFER",mt:1,color:"bad",onClick:function(){return i("restart")}})]}):(0,o.createComponentVNode)(2,a.ProgressBar,{value:s,minValue:0,maxValue:u,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:s})," GQ"," / ",u," GQ"]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosAiRestorer=void 0;var o=n(0),r=n(3),a=n(201);t.NtosAiRestorer=function(){return(0,o.createComponentVNode)(2,r.NtosWindow,{width:370,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,r.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.AiRestorerContent)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosArcade=void 0;var o=n(0),r=n(63),a=n(2),c=n(1),i=n(3);t.NtosArcade=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,i.NtosWindow,{width:450,height:350,children:(0,o.createComponentVNode)(2,i.NtosWindow.Content,{children:(0,o.createComponentVNode)(2,c.Section,{title:"Outbomb Cuban Pete Ultra",textAlign:"center",children:[(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Grid,{children:[(0,o.createComponentVNode)(2,c.Grid.Column,{size:2,children:[(0,o.createComponentVNode)(2,c.Box,{m:1}),(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Player Health",children:(0,o.createComponentVNode)(2,c.ProgressBar,{value:d.PlayerHitpoints,minValue:0,maxValue:30,ranges:{olive:[31,Infinity],good:[20,31],average:[10,20],bad:[-Infinity,10]},children:[d.PlayerHitpoints,"HP"]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Player Magic",children:(0,o.createComponentVNode)(2,c.ProgressBar,{value:d.PlayerMP,minValue:0,maxValue:10,ranges:{purple:[11,Infinity],violet:[3,11],bad:[-Infinity,3]},children:[d.PlayerMP,"MP"]})})]}),(0,o.createComponentVNode)(2,c.Box,{my:1,mx:4}),(0,o.createComponentVNode)(2,c.Section,{backgroundColor:1===d.PauseState?"#1b3622":"#471915",children:d.Status})]}),(0,o.createComponentVNode)(2,c.Grid.Column,{children:[(0,o.createComponentVNode)(2,c.ProgressBar,{value:d.Hitpoints,minValue:0,maxValue:45,ranges:{good:[30,Infinity],average:[5,30],bad:[-Infinity,5]},children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:d.Hitpoints}),"HP"]}),(0,o.createComponentVNode)(2,c.Box,{m:1}),(0,o.createComponentVNode)(2,c.Section,{inline:!0,width:"156px",textAlign:"center",children:(0,o.createVNode)(1,"img",null,null,1,{src:(0,r.resolveAsset)(d.BossID)})})]})]}),(0,o.createComponentVNode)(2,c.Box,{my:1,mx:4}),(0,o.createComponentVNode)(2,c.Button,{icon:"fist-raised",tooltip:"Go in for the kill!",tooltipPosition:"top",disabled:0===d.GameActive||1===d.PauseState,onClick:function(){return l("Attack")},content:"Attack!"}),(0,o.createComponentVNode)(2,c.Button,{icon:"band-aid",tooltip:"Heal yourself!",tooltipPosition:"top",disabled:0===d.GameActive||1===d.PauseState,onClick:function(){return l("Heal")},content:"Heal!"}),(0,o.createComponentVNode)(2,c.Button,{icon:"magic",tooltip:"Recharge your magic!",tooltipPosition:"top",disabled:0===d.GameActive||1===d.PauseState,onClick:function(){return l("Recharge_Power")},content:"Recharge!"})]}),(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Button,{icon:"sync-alt",tooltip:"One more game couldn't hurt.",tooltipPosition:"top",disabled:1===d.GameActive,onClick:function(){return l("Start_Game")},content:"Begin Game"}),(0,o.createComponentVNode)(2,c.Button,{icon:"ticket-alt",tooltip:"Claim at your local Arcade Computer for Prizes!",tooltipPosition:"top",disabled:1===d.GameActive,onClick:function(){return l("Dispense_Tickets")},content:"Claim Tickets"})]}),(0,o.createComponentVNode)(2,c.Box,{color:d.TicketCount>=1?"good":"normal",children:["Earned Tickets: ",d.TicketCount]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosAtmos=void 0;var o=n(0),r=n(14),a=n(30),c=n(9),i=n(2),l=n(1),d=n(36),u=n(3);t.NtosAtmos=function(e,t){var n=(0,i.useBackend)(t),s=(n.act,n.data),m=s.AirTemp,p=s.AirPressure,C=(0,a.flow)([(0,r.filter)((function(e){return e.percentage>=.01})),(0,r.sortBy)((function(e){return-e.percentage}))])(s.AirData||[]),h=Math.max.apply(Math,[1].concat(C.map((function(e){return e.percentage}))));return(0,o.createComponentVNode)(2,u.NtosWindow,{width:300,height:350,resizable:!0,children:(0,o.createComponentVNode)(2,u.NtosWindow.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l.Section,{children:(0,o.createComponentVNode)(2,l.LabeledList,{children:[(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Temperature",children:[m,"\xb0C"]}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Pressure",children:[p," kPa"]})]})}),(0,o.createComponentVNode)(2,l.Section,{children:(0,o.createComponentVNode)(2,l.LabeledList,{children:C.map((function(e){return(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:(0,d.getGasLabel)(e.name),children:(0,o.createComponentVNode)(2,l.ProgressBar,{color:(0,d.getGasColor)(e.name),value:e.percentage,minValue:0,maxValue:h,children:(0,c.toFixed)(e.percentage,2)+"%"})},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosBountyConsole=void 0;var o=n(0),r=n(2),a=n(1),c=n(39),i=n(3);t.NtosBountyConsole=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data.bountydata,u=void 0===d?[]:d;return(0,o.createComponentVNode)(2,i.NtosWindow,{width:750,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,l),buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print Bounty List",onClick:function(){return c("Print")}}),children:(0,o.createComponentVNode)(2,a.Table,{border:!0,children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,italic:!0,color:"label",fontSize:1.25,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{p:1,textAlign:"center",children:"Bounty Object"}),(0,o.createComponentVNode)(2,a.Table.Cell,{p:1,textAlign:"center",children:"Description"}),(0,o.createComponentVNode)(2,a.Table.Cell,{p:1,textAlign:"center",children:"Progress"}),(0,o.createComponentVNode)(2,a.Table.Cell,{p:1,textAlign:"center",children:"Value"}),(0,o.createComponentVNode)(2,a.Table.Cell,{p:1,textAlign:"center",children:"Claim"})]}),u.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{backgroundColor:1===e.priority?"rgba(252, 152, 3, 0.25)":"",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,p:1,children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{italic:!0,textAlign:"center",p:1,children:e.description}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,p:1,textAlign:"center",children:[1===e.priority?(0,o.createComponentVNode)(2,a.Box,{children:"High Priority"}):"",e.completion_string]}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,p:1,textAlign:"center",children:e.reward_string}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,p:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:1===e.claimed?"check":"",content:1===e.claimed?"Claimed":"Claim",disabled:1===e.claimed,color:1===e.can_claim?"green":"red",onClick:function(){return c("ClaimBounty",{bounty:e.bounty_ref})}})})]},e.name)}))]})})})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.stored_cash);return(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:i,format:function(e){return(0,c.formatMoney)(e)}})," credits"]})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosCardContent=t.NtosCard=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=n(202);t.NtosCard=function(e,t){return(0,o.createComponentVNode)(2,c.NtosWindow,{width:450,height:520,resizable:!0,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=(0,r.useLocalState)(t,"tab",1),u=d[0],s=d[1],m=l.authenticated,p=l.regions,C=void 0===p?[]:p,h=l.access_on_card,N=void 0===h?[]:h,V=l.jobs,b=void 0===V?{}:V,f=l.id_rank,g=l.id_owner,v=l.has_id,k=l.have_printer,x=l.have_id_slot,B=l.id_name,_=(0,r.useLocalState)(t,"department",Object.keys(b)[0]),w=_[0],L=_[1];if(!x)return(0,o.createComponentVNode)(2,a.NoticeBox,{children:"This program requires an ID slot in order to function"});var y=b[w]||[];return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:v&&m?(0,o.createComponentVNode)(2,a.Input,{value:g,width:"250px",onInput:function(e,t){return c("PRG_edit",{name:t})}}):g||"No Card Inserted",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print",disabled:!k||!v,onClick:function(){return c("PRG_print")}}),(0,o.createComponentVNode)(2,a.Button,{icon:m?"sign-out-alt":"sign-in-alt",content:m?"Log Out":"Log In",color:m?"bad":"good",onClick:function(){c(m?"PRG_logout":"PRG_authenticate")}})],4),children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:B,onClick:function(){return c("PRG_eject")}})}),!!v&&!!m&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===u,onClick:function(){return s(1)},children:"Access"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===u,onClick:function(){return s(2)},children:"Jobs"})]}),1===u&&(0,o.createComponentVNode)(2,i.AccessList,{accesses:C,selectedList:N,accessMod:function(e){return c("PRG_access",{access_target:e})},grantAll:function(){return c("PRG_grantall")},denyAll:function(){return c("PRG_denyall")},grantDep:function(e){return c("PRG_grantregion",{region:e})},denyDep:function(e){return c("PRG_denyregion",{region:e})}}),2===u&&(0,o.createComponentVNode)(2,a.Section,{title:f,buttons:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"exclamation-triangle",content:"Terminate",color:"bad",onClick:function(){return c("PRG_terminate")}}),children:[(0,o.createComponentVNode)(2,a.Button.Input,{fluid:!0,content:"Custom...",onCommit:function(e,t){return c("PRG_assign",{assign_target:"Custom",custom_name:t})}}),(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Tabs,{vertical:!0,children:Object.keys(b).map((function(e){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:e===w,onClick:function(){return L(e)},children:e},e)}))})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:y.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:e.display_name,onClick:function(){return c("PRG_assign",{assign_target:e.job})}},e.job)}))})]})]})]})],0)};t.NtosCardContent=l},function(e,t,n){"use strict";t.__esModule=!0,t.NtosConfiguration=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NtosConfiguration=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.PC_device_theme,u=l.power_usage,s=l.battery_exists,m=l.battery,p=void 0===m?{}:m,C=l.disk_size,h=l.disk_used,N=l.hardware,V=void 0===N?[]:N;return(0,o.createComponentVNode)(2,c.NtosWindow,{theme:d,width:420,height:630,resizable:!0,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Power Supply",buttons:(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,mr:1,children:["Power Draw: ",u,"W"]}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Battery Status",color:!s&&"average",children:s?(0,o.createComponentVNode)(2,a.ProgressBar,{value:p.charge,minValue:0,maxValue:p.max,ranges:{good:[p.max/2,Infinity],average:[p.max/4,p.max/2],bad:[-Infinity,p.max/4]},children:[p.charge," / ",p.max]}):"Not Available"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"File System",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:h,minValue:0,maxValue:C,color:"good",children:[h," GQ / ",C," GQ"]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Hardware Components",children:V.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,level:2,buttons:(0,o.createFragment)([!e.critical&&(0,o.createComponentVNode)(2,a.Button.Checkbox,{content:"Enabled",checked:e.enabled,mr:1,onClick:function(){return i("PC_toggle_component",{name:e.name})}}),(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,mr:1,children:["Power Usage: ",e.powerusage,"W"]})],0),children:e.desc},e.name)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosCrewManifest=void 0;var o=n(0),r=n(14),a=n(2),c=n(1),i=n(3);t.NtosCrewManifest=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.have_printer,s=d.manifest,m=void 0===s?{}:s;return(0,o.createComponentVNode)(2,i.NtosWindow,{width:400,height:480,resizable:!0,children:(0,o.createComponentVNode)(2,i.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.Section,{title:"Crew Manifest",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"print",content:"Print",disabled:!u,onClick:function(){return l("PRG_print")}}),children:(0,r.map)((function(e,t){return(0,o.createComponentVNode)(2,c.Section,{level:2,title:t,children:(0,o.createComponentVNode)(2,c.Table,{children:e.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"candystripe",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{bold:!0,children:e.name}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:["(",e.rank,")"]})]},e.name)}))})},t)}))(m)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosCyborgRemoteMonitorSyndicate=void 0;var o=n(0),r=n(3),a=n(207);t.NtosCyborgRemoteMonitorSyndicate=function(e,t){return(0,o.createComponentVNode)(2,r.NtosWindow,{width:600,height:800,theme:"syndicate",children:(0,o.createComponentVNode)(2,r.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.NtosCyborgRemoteMonitorContent)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosFileManager=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NtosFileManager=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.PC_device_theme,s=d.usbconnected,m=d.files,p=void 0===m?[]:m,C=d.usbfiles,h=void 0===C?[]:C;return(0,o.createComponentVNode)(2,c.NtosWindow,{resizable:!0,theme:u,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,i,{files:p,usbconnected:s,onUpload:function(e){return l("PRG_copytousb",{name:e})},onDelete:function(e){return l("PRG_deletefile",{name:e})},onRename:function(e,t){return l("PRG_rename",{name:e,new_name:t})},onDuplicate:function(e){return l("PRG_clone",{file:e})}})}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"Data Disk",children:(0,o.createComponentVNode)(2,i,{usbmode:!0,files:h,usbconnected:s,onUpload:function(e){return l("PRG_copyfromusb",{name:e})},onDelete:function(e){return l("PRG_deletefile",{name:e})},onRename:function(e,t){return l("PRG_rename",{name:e,new_name:t})},onDuplicate:function(e){return l("PRG_clone",{file:e})}})})]})})};var i=function(e){var t=e.files,n=void 0===t?[]:t,r=e.usbconnected,c=e.usbmode,i=e.onUpload,l=e.onDelete,d=e.onRename;return(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"File"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Type"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Size"})]}),n.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.undeletable?e.name:(0,o.createComponentVNode)(2,a.Button.Input,{fluid:!0,content:e.name,currentValue:e.name,tooltip:"Rename",onCommit:function(t,n){return d(e.name,n)}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.type}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.size}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:!e.undeletable&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",confirmIcon:"times",confirmContent:"",tooltip:"Delete",onClick:function(){return l(e.name)}}),!!r&&(c?(0,o.createComponentVNode)(2,a.Button,{icon:"download",tooltip:"Download",onClick:function(){return i(e.name)}}):(0,o.createComponentVNode)(2,a.Button,{icon:"upload",tooltip:"Upload",onClick:function(){return i(e.name)}}))],0)})]},e.name)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosJobManagerContent=t.NtosJobManager=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NtosJobManager=function(e,t){return(0,o.createComponentVNode)(2,c.NtosWindow,{width:400,height:620,resizable:!0,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.authed,d=i.cooldown,u=i.slots,s=void 0===u?[]:u,m=i.prioritized,p=void 0===m?[]:m;return l?(0,o.createComponentVNode)(2,a.Section,{children:[d>0&&(0,o.createComponentVNode)(2,a.Dimmer,{children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,textAlign:"center",fontSize:"20px",children:["On Cooldown: ",d,"s"]})}),(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Prioritized"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Slots"})]}),s.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:e.title,disabled:e.total<=0,checked:e.total>0&&p.includes(e.title),onClick:function(){return c("PRG_priority",{target:e.title})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:[e.current," / ",e.total]}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:[(0,o.createComponentVNode)(2,a.Button,{content:"Open",disabled:!e.status_open,onClick:function(){return c("PRG_open_job",{target:e.title})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Close",disabled:!e.status_close,onClick:function(){return c("PRG_close_job",{target:e.title})}})]})]},e.title)}))]})]}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Current ID does not have access permissions to change job slots."})};t.NtosJobManagerContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.NtosMain=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i={compconfig:"cog",ntndownloader:"download",filemanager:"folder",smmonitor:"radiation",alarmmonitor:"bell",cardmod:"id-card",arcade:"gamepad",ntnrc_client:"comment-alt",nttransfer:"exchange-alt",powermonitor:"plug",job_manage:"address-book",crewmani:"clipboard-list",robocontrol:"robot",atmosscan:"thermometer-half",shipping:"tags"};t.NtosMain=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.device_theme,s=d.programs,m=void 0===s?[]:s,p=d.has_light,C=d.light_on,h=d.comp_light_color,N=d.removable_media,V=void 0===N?[]:N,b=d.login,f=void 0===b?[]:b;return(0,o.createComponentVNode)(2,c.NtosWindow,{title:"syndicate"===u?"Syndix Main Menu":"NtOS Main Menu",theme:u,width:400,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:[!!p&&(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Button,{width:"144px",icon:"lightbulb",selected:C,onClick:function(){return l("PC_toggle_light")},children:["Flashlight: ",C?"ON":"OFF"]}),(0,o.createComponentVNode)(2,a.Button,{ml:1,onClick:function(){return l("PC_light_color")},children:["Color:",(0,o.createComponentVNode)(2,a.ColorBox,{ml:1,color:h})]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"User Login",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject ID",disabled:!f.IDName,onClick:function(){return l("PC_Eject_Disk",{name:"ID"})}}),children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:["ID Name: ",f.IDName]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:["Assignment: ",f.IDJob]})]})}),!!V.length&&(0,o.createComponentVNode)(2,a.Section,{title:"Media Eject",children:(0,o.createComponentVNode)(2,a.Table,{children:V.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,color:"transparent",icon:"eject",content:e,onClick:function(){return l("PC_Eject_Disk",{name:e})}})})},e)}))})}),(0,o.createComponentVNode)(2,a.Section,{title:"Programs",children:(0,o.createComponentVNode)(2,a.Table,{children:m.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,color:"transparent",icon:i[e.name]||"window-maximize-o",content:e.desc,onClick:function(){return l("PC_runprogram",{name:e.name})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,width:"18px",children:!!e.running&&(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"times",tooltip:"Close program",tooltipPosition:"left",onClick:function(){return l("PC_killprogram",{name:e.name})}})})]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosNetChat=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NtosNetChat=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.can_admin,u=l.adminmode,s=l.authed,m=l.username,p=l.active_channel,C=l.is_operator,h=l.all_channels,N=void 0===h?[]:h,V=l.clients,b=void 0===V?[]:V,f=l.messages,g=void 0===f?[]:f,v=null!==p,k=s||u;return(0,o.createComponentVNode)(2,c.NtosWindow,{width:900,height:675,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{children:(0,o.createComponentVNode)(2,a.Section,{height:"600px",children:(0,o.createComponentVNode)(2,a.Table,{height:"580px",children:(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{verticalAlign:"top",style:{width:"200px"},children:[(0,o.createComponentVNode)(2,a.Box,{height:"537px",overflowY:"scroll",children:[(0,o.createComponentVNode)(2,a.Button.Input,{fluid:!0,content:"New Channel...",onCommit:function(e,t){return i("PRG_newchannel",{new_channel_name:t})}}),N.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:e.chan,selected:e.id===p,color:"transparent",onClick:function(){return i("PRG_joinchannel",{id:e.id})}},e.chan)}))]}),(0,o.createComponentVNode)(2,a.Button.Input,{fluid:!0,mt:1,content:m+"...",currentValue:m,onCommit:function(e,t){return i("PRG_changename",{new_name:t})}}),!!d&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,bold:!0,content:"ADMIN MODE: "+(u?"ON":"OFF"),color:u?"bad":"good",onClick:function(){return i("PRG_toggleadmin")}})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Box,{height:"560px",overflowY:"scroll",children:v&&(k?g.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:e.msg},e.msg)})):(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",mt:4,fontSize:"40px"}),(0,o.createComponentVNode)(2,a.Box,{mt:1,bold:!0,fontSize:"18px",children:"THIS CHANNEL IS PASSWORD PROTECTED"}),(0,o.createComponentVNode)(2,a.Box,{mt:1,children:"INPUT PASSWORD TO ACCESS"})]}))}),(0,o.createComponentVNode)(2,a.Input,{fluid:!0,selfClear:!0,mt:1,onEnter:function(e,t){return i("PRG_speak",{message:t})}})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{verticalAlign:"top",style:{width:"150px"},children:[(0,o.createComponentVNode)(2,a.Box,{height:"477px",overflowY:"scroll",children:b.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:e.name},e.name)}))}),v&&k&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Input,{fluid:!0,content:"Save log...",defaultValue:"new_log",onCommit:function(e,t){return i("PRG_savelog",{log_name:t})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{fluid:!0,content:"Leave Channel",onClick:function(){return i("PRG_leavechannel")}})],4),!!C&&s&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{fluid:!0,content:"Delete Channel",onClick:function(){return i("PRG_deletechannel")}}),(0,o.createComponentVNode)(2,a.Button.Input,{fluid:!0,content:"Rename Channel...",onCommit:function(e,t){return i("PRG_renamechannel",{new_name:t})}}),(0,o.createComponentVNode)(2,a.Button.Input,{fluid:!0,content:"Set Password...",onCommit:function(e,t){return i("PRG_setpassword",{new_password:t})}})],4)]})]})})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosNetDosContent=t.NtosNetDos=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NtosNetDos=function(e,t){return(0,o.createComponentVNode)(2,c.NtosWindow,{width:400,height:250,theme:"syndicate",children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.relays,d=void 0===l?[]:l,u=i.focus,s=i.target,m=i.speed,p=i.overload,C=i.capacity,h=i.error;if(h)return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.NoticeBox,{children:h}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Reset",textAlign:"center",onClick:function(){return c("PRG_reset")}})],4);var N=function(e){for(var t="",n=p/C;t.lengthn?t+="0":t+="1";return t};return s?(0,o.createComponentVNode)(2,a.Section,{fontFamily:"monospace",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Box,{children:["CURRENT SPEED: ",m," GQ/s"]}),(0,o.createComponentVNode)(2,a.Box,{children:N(45)}),(0,o.createComponentVNode)(2,a.Box,{children:N(45)}),(0,o.createComponentVNode)(2,a.Box,{children:N(45)}),(0,o.createComponentVNode)(2,a.Box,{children:N(45)}),(0,o.createComponentVNode)(2,a.Box,{children:N(45)})]}):(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target",children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.id,selected:u===e.id,onClick:function(){return c("PRG_target_relay",{targid:e.id})}},e.id)}))})}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,bold:!0,content:"EXECUTE",color:"bad",textAlign:"center",disabled:!u,mt:1,onClick:function(){return c("PRG_execute")}})]})};t.NtosNetDosContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.NtosNetDownloader=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NtosNetDownloader=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.PC_device_theme,s=d.disk_size,m=d.disk_used,p=d.downloadable_programs,C=void 0===p?[]:p,h=d.error,N=d.hacked_programs,V=void 0===N?[]:N,b=d.hackedavailable;return(0,o.createComponentVNode)(2,c.NtosWindow,{theme:u,width:480,height:735,resizable:!0,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:[!!h&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:[(0,o.createComponentVNode)(2,a.Box,{mb:1,children:h}),(0,o.createComponentVNode)(2,a.Button,{content:"Reset",onClick:function(){return l("PRG_reseterror")}})]}),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Disk usage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:m,minValue:0,maxValue:s,children:m+" GQ / "+s+" GQ"})})})}),(0,o.createComponentVNode)(2,a.Section,{children:C.map((function(e){return(0,o.createComponentVNode)(2,i,{program:e},e.filename)}))}),!!b&&(0,o.createComponentVNode)(2,a.Section,{title:"UNKNOWN Software Repository",children:[(0,o.createComponentVNode)(2,a.NoticeBox,{mb:1,children:"Please note that Nanotrasen does not recommend download of software from non-official servers."}),V.map((function(e){return(0,o.createComponentVNode)(2,i,{program:e},e.filename)}))]})]})})};var i=function(e,t){var n=e.program,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.disk_size,u=l.disk_used,s=l.downloadcompletion,m=l.downloading,p=l.downloadname,C=l.downloadsize,h=d-u;return(0,o.createComponentVNode)(2,a.Box,{mb:3,children:[(0,o.createComponentVNode)(2,a.Flex,{align:"baseline",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:1,children:n.filedesc}),(0,o.createComponentVNode)(2,a.Flex.Item,{color:"label",nowrap:!0,children:[n.size," GQ"]}),(0,o.createComponentVNode)(2,a.Flex.Item,{ml:2,width:"94px",textAlign:"center",children:n.filename===p&&(0,o.createComponentVNode)(2,a.ProgressBar,{color:"green",minValue:0,maxValue:C,value:s})||(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"download",content:"Download",disabled:m||n.size>h,onClick:function(){return i("PRG_downloadfile",{filename:n.filename})}})})]}),"Compatible"!==n.compatibility&&(0,o.createComponentVNode)(2,a.Box,{mt:1,italic:!0,fontSize:"12px",position:"relative",children:[(0,o.createComponentVNode)(2,a.Icon,{mx:1,color:"red",name:"times"}),"Incompatible!"]}),n.size>h&&(0,o.createComponentVNode)(2,a.Box,{mt:1,italic:!0,fontSize:"12px",position:"relative",children:[(0,o.createComponentVNode)(2,a.Icon,{mx:1,color:"red",name:"times"}),"Not enough disk space!"]}),(0,o.createComponentVNode)(2,a.Box,{mt:1,italic:!0,color:"label",fontSize:"12px",children:n.fileinfo})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosNetMonitor=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.NtosNetMonitor=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data,d=l.ntnetrelays,u=l.ntnetstatus,s=l.config_softwaredownload,m=l.config_peertopeer,p=l.config_communication,C=l.config_systemcontrol,h=l.idsalarm,N=l.idsstatus,V=l.ntnetmaxlogs,b=l.maxlogs,f=l.minlogs,g=l.ntnetlogs,v=void 0===g?[]:g;return(0,o.createComponentVNode)(2,c.NtosWindow,{resizable:!0,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,r.NoticeBox,{children:"WARNING: Disabling wireless transmitters when using a wireless device may prevent you from reenabling them!"}),(0,o.createComponentVNode)(2,r.Section,{title:"Wireless Connectivity",buttons:(0,o.createComponentVNode)(2,r.Button.Confirm,{icon:u?"power-off":"times",content:u?"ENABLED":"DISABLED",selected:u,onClick:function(){return i("toggleWireless")}}),children:d?(0,o.createComponentVNode)(2,r.LabeledList,{children:(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Active NTNet Relays",children:d})}):"No Relays Connected"}),(0,o.createComponentVNode)(2,r.Section,{title:"Firewall Configuration",children:(0,o.createComponentVNode)(2,r.LabeledList,{children:[(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Software Downloads",buttons:(0,o.createComponentVNode)(2,r.Button,{icon:s?"power-off":"times",content:s?"ENABLED":"DISABLED",selected:s,onClick:function(){return i("toggle_function",{id:"1"})}})}),(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Peer to Peer Traffic",buttons:(0,o.createComponentVNode)(2,r.Button,{icon:m?"power-off":"times",content:m?"ENABLED":"DISABLED",selected:m,onClick:function(){return i("toggle_function",{id:"2"})}})}),(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Communication Systems",buttons:(0,o.createComponentVNode)(2,r.Button,{icon:p?"power-off":"times",content:p?"ENABLED":"DISABLED",selected:p,onClick:function(){return i("toggle_function",{id:"3"})}})}),(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Remote System Control",buttons:(0,o.createComponentVNode)(2,r.Button,{icon:C?"power-off":"times",content:C?"ENABLED":"DISABLED",selected:C,onClick:function(){return i("toggle_function",{id:"4"})}})})]})}),(0,o.createComponentVNode)(2,r.Section,{title:"Security Systems",children:[!!h&&(0,o.createFragment)([(0,o.createComponentVNode)(2,r.NoticeBox,{children:"NETWORK INCURSION DETECTED"}),(0,o.createComponentVNode)(2,r.Box,{italics:!0,children:"Abnormal activity has been detected in the network. Check system logs for more information"})],4),(0,o.createComponentVNode)(2,r.LabeledList,{children:[(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"IDS Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,r.Button,{icon:N?"power-off":"times",content:N?"ENABLED":"DISABLED",selected:N,onClick:function(){return i("toggleIDS")}}),(0,o.createComponentVNode)(2,r.Button,{icon:"sync",content:"Reset",color:"bad",onClick:function(){return i("resetIDS")}})],4)}),(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Max Log Count",buttons:(0,o.createComponentVNode)(2,r.NumberInput,{value:V,minValue:f,maxValue:b,width:"39px",onChange:function(e,t){return i("updatemaxlogs",{new_number:t})}})})]}),(0,o.createComponentVNode)(2,r.Section,{title:"System Log",level:2,buttons:(0,o.createComponentVNode)(2,r.Button.Confirm,{icon:"trash",content:"Clear Logs",onClick:function(){return i("purgelogs")}}),children:v.map((function(e){return(0,o.createComponentVNode)(2,r.Box,{className:"candystripe",children:e.entry},e.entry)}))})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosPowerMonitor=void 0;var o=n(0),r=n(3),a=n(143);t.NtosPowerMonitor=function(){return(0,o.createComponentVNode)(2,r.NtosWindow,{width:550,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,r.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.PowerMonitorContent)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosRadarSyndicate=void 0;var o=n(0),r=n(3),a=n(208);t.NtosRadarSyndicate=function(e,t){return(0,o.createComponentVNode)(2,r.NtosWindow,{width:800,height:600,theme:"syndicate",children:(0,o.createComponentVNode)(2,a.NtosRadarContent,{sig_err:"Out of Range"})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosRequestKiosk=void 0;var o=n(0),r=n(209),a=n(3);t.NtosRequestKiosk=function(e,t){return(0,o.createComponentVNode)(2,a.NtosWindow,{width:550,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,a.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,r.RequestKioskContent)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosRevelation=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.NtosRevelation=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.NtosWindow,{width:400,height:250,theme:"syndicate",children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{children:(0,o.createComponentVNode)(2,r.Section,{children:[(0,o.createComponentVNode)(2,r.Button.Input,{fluid:!0,content:"Obfuscate Name...",onCommit:function(e,t){return i("PRG_obfuscate",{new_name:t})},mb:1}),(0,o.createComponentVNode)(2,r.LabeledList,{children:(0,o.createComponentVNode)(2,r.LabeledList.Item,{label:"Payload Status",buttons:(0,o.createComponentVNode)(2,r.Button,{content:l.armed?"ARMED":"DISARMED",color:l.armed?"bad":"average",onClick:function(){return i("PRG_arm")}})})}),(0,o.createComponentVNode)(2,r.Button,{fluid:!0,bold:!0,content:"ACTIVATE",textAlign:"center",color:"bad",disabled:!l.armed})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosRoboControl=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NtosRoboControl=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.bots,s=d.id_owner,m=d.has_id;return(0,o.createComponentVNode)(2,c.NtosWindow,{width:550,height:550,resizable:!0,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Robot Control Console",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Id Card",children:[s,!!m&&(0,o.createComponentVNode)(2,a.Button,{ml:2,icon:"eject",content:"Eject",onClick:function(){return l("ejectcard")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Bots in range",children:d.botcount})]})}),null==u?void 0:u.map((function(e){return(0,o.createComponentVNode)(2,i,{robot:e},e.bot_ref)}))]})})};var i=function(e,t){var n=e.robot,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.mules||[],u=!!n.mule_check&&function(e,t){return null==e?void 0:e.find((function(e){return e.mule_ref===t}))}(d,n.bot_ref),s=1===n.mule_check?"rgba(110, 75, 14, 1)":"rgba(74, 59, 140, 1)";return(0,o.createComponentVNode)(2,a.Section,{title:n.name,style:{border:"4px solid "+s},buttons:u&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"play",tooltip:"Go to Destination.",onClick:function(){return i("go",{robot:u.mule_ref})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"pause",tooltip:"Stop Moving.",onClick:function(){return i("stop",{robot:u.mule_ref})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"home",tooltip:"Travel Home.",tooltipPosition:"bottom-left",onClick:function(){return i("home",{robot:u.mule_ref})}})],4),children:(0,o.createComponentVNode)(2,a.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Model",children:n.model}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:n.locat}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:n.mode}),u&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Loaded Cargo",children:l.load||"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Home",children:u.home}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destination",children:u.dest||"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.power,minValue:0,maxValue:100,ranges:{good:[60,Infinity],average:[20,60],bad:[-Infinity,20]}})})],4)]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"150px",children:[u&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Set Destination",onClick:function(){return i("destination",{robot:u.mule_ref})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Set ID",onClick:function(){return i("setid",{robot:u.mule_ref})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Set Home",onClick:function(){return i("sethome",{robot:u.mule_ref})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Unload Cargo",onClick:function(){return i("unload",{robot:u.mule_ref})}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Auto Return",checked:u.autoReturn,onClick:function(){return i("autoret",{robot:u.mule_ref})}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Auto Pickup",checked:u.autoPickup,onClick:function(){return i("autopick",{robot:u.mule_ref})}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Delivery Report",checked:u.reportDelivery,onClick:function(){return i("report",{robot:u.mule_ref})}})],4),!u&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Stop Patrol",onClick:function(){return i("patroloff",{robot:n.bot_ref})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Start Patrol",onClick:function(){return i("patrolon",{robot:n.bot_ref})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Summon",onClick:function(){return i("summon",{robot:n.bot_ref})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Eject PAi",onClick:function(){return i("ejectpai",{robot:n.bot_ref})}})],4)]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosShipping=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.NtosShipping=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.NtosWindow,{width:450,height:350,resizable:!0,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"NTOS Shipping Hub.",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject Id",onClick:function(){return i("ejectid")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current User",children:l.current_user||"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inserted Card",children:l.card_owner||"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available Paper",children:l.has_printer?l.paperamt:"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Profit on Sale",children:[l.barcode_split,"%"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Shipping Options",children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"id-card",tooltip:"The currently ID card will become the current user.",tooltipPosition:"right",disabled:!l.has_id_slot,onClick:function(){return i("selectid")},content:"Set Current ID"})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"print",tooltip:"Print a barcode to use on a wrapped package.",tooltipPosition:"right",disabled:!l.has_printer||!l.current_user,onClick:function(){return i("print")},content:"Print Barcode"})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"tags",tooltip:"Set how much profit you'd like on your package.",tooltipPosition:"right",onClick:function(){return i("setsplit")},content:"Set Profit Margin"})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"sync-alt",content:"Reset ID",onClick:function(){return i("resetid")}})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosStationAlertConsole=void 0;var o=n(0),r=n(3),a=n(210);t.NtosStationAlertConsole=function(){return(0,o.createComponentVNode)(2,r.NtosWindow,{width:315,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,r.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.StationAlertConsoleContent)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosSupermatterMonitorContent=t.NtosSupermatterMonitor=void 0;var o=n(0),r=n(14),a=n(30),c=n(9),i=n(2),l=n(1),d=n(36),u=n(3),s=function(e){return Math.log2(16+Math.max(0,e))-4};t.NtosSupermatterMonitor=function(e,t){return(0,o.createComponentVNode)(2,u.NtosWindow,{width:600,height:350,resizable:!0,children:(0,o.createComponentVNode)(2,u.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,m)})})};var m=function(e,t){var n=(0,i.useBackend)(t),u=n.act,m=n.data,C=m.active,h=m.SM_integrity,N=m.SM_power,V=m.SM_ambienttemp,b=m.SM_ambientpressure;if(!C)return(0,o.createComponentVNode)(2,p);var f=(0,a.flow)([function(e){return e.filter((function(e){return e.amount>=.01}))},(0,r.sortBy)((function(e){return-e.amount}))])(m.gases||[]),g=Math.max.apply(Math,[1].concat(f.map((function(e){return e.amount}))));return(0,o.createComponentVNode)(2,l.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,l.Flex.Item,{width:"270px",children:(0,o.createComponentVNode)(2,l.Section,{title:"Metrics",children:(0,o.createComponentVNode)(2,l.LabeledList,{children:[(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:h/100,ranges:{good:[.9,Infinity],average:[.5,.9],bad:[-Infinity,.5]}})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Relative EER",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:N,minValue:0,maxValue:5e3,ranges:{good:[-Infinity,5e3],average:[5e3,7e3],bad:[7e3,Infinity]},children:(0,c.toFixed)(N)+" MeV/cm3"})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:s(V),minValue:0,maxValue:s(1e4),ranges:{teal:[-Infinity,s(80)],good:[s(80),s(373)],average:[s(373),s(1e3)],bad:[s(1e3),Infinity]},children:(0,c.toFixed)(V)+" K"})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:s(b),minValue:0,maxValue:s(5e4),ranges:{good:[s(1),s(300)],average:[-Infinity,s(1e3)],bad:[s(1e3),+Infinity]},children:(0,c.toFixed)(b)+" kPa"})})]})})}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Gases",buttons:(0,o.createComponentVNode)(2,l.Button,{icon:"arrow-left",content:"Back",onClick:function(){return u("PRG_clear")}}),children:(0,o.createComponentVNode)(2,l.LabeledList,{children:f.map((function(e){return(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:(0,d.getGasLabel)(e.name),children:(0,o.createComponentVNode)(2,l.ProgressBar,{color:(0,d.getGasColor)(e.name),value:e.amount,minValue:0,maxValue:g,children:(0,c.toFixed)(e.amount,2)+"%"})},e.name)}))})})})]})};t.NtosSupermatterMonitorContent=m;var p=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.supermatters,c=void 0===a?[]:a;return(0,o.createComponentVNode)(2,l.Section,{title:"Detected Supermatters",buttons:(0,o.createComponentVNode)(2,l.Button,{icon:"sync",content:"Refresh",onClick:function(){return r("PRG_refresh")}}),children:(0,o.createComponentVNode)(2,l.Table,{children:c.map((function(e){return(0,o.createComponentVNode)(2,l.Table.Row,{children:[(0,o.createComponentVNode)(2,l.Table.Cell,{children:e.uid+". "+e.area_name}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,color:"label",children:"Integrity:"}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,width:"120px",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:e.integrity/100,ranges:{good:[.9,Infinity],average:[.5,.9],bad:[-Infinity,.5]}})}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,l.Button,{content:"Details",onClick:function(){return r("PRG_set",{target:e.uid})}})})]},e.uid)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NuclearBomb=void 0;var o=n(0),r=n(6),a=n(2),c=n(1),i=n(3),l=function(e,t){var n=(0,a.useBackend)(t).act;return(0,o.createComponentVNode)(2,c.Box,{width:"185px",children:(0,o.createComponentVNode)(2,c.Grid,{width:"1px",children:[["1","4","7","C"],["2","5","8","0"],["3","6","9","E"]].map((function(e){return(0,o.createComponentVNode)(2,c.Grid.Column,{children:e.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,mb:"6px",content:e,textAlign:"center",fontSize:"40px",lineHeight:1.25,width:"55px",className:(0,r.classes)(["NuclearBomb__Button","NuclearBomb__Button--keypad","NuclearBomb__Button--"+e]),onClick:function(){return n("keypad",{digit:e})}},e)}))},e[0])}))})})};t.NuclearBomb=function(e,t){var n=(0,a.useBackend)(t),r=n.act,d=n.data,u=(d.anchored,d.disk_present,d.status1),s=d.status2;return(0,o.createComponentVNode)(2,i.Window,{width:350,height:442,theme:"retro",children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Box,{m:"6px",children:[(0,o.createComponentVNode)(2,c.Box,{mb:"6px",className:"NuclearBomb__displayBox",children:u}),(0,o.createComponentVNode)(2,c.Flex,{mb:1.5,children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,c.Box,{className:"NuclearBomb__displayBox",children:s})}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Button,{icon:"eject",fontSize:"24px",lineHeight:1,textAlign:"center",width:"43px",ml:"6px",mr:"3px",mt:"3px",className:"NuclearBomb__Button NuclearBomb__Button--keypad",onClick:function(){return r("eject_disk")}})})]}),(0,o.createComponentVNode)(2,c.Flex,{ml:"3px",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,l)}),(0,o.createComponentVNode)(2,c.Flex.Item,{ml:"6px",width:"129px",children:(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"ARM",textAlign:"center",fontSize:"28px",lineHeight:1.1,mb:"6px",className:"NuclearBomb__Button NuclearBomb__Button--C",onClick:function(){return r("arm")}}),(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"ANCHOR",textAlign:"center",fontSize:"28px",lineHeight:1.1,className:"NuclearBomb__Button NuclearBomb__Button--E",onClick:function(){return r("anchor")}}),(0,o.createComponentVNode)(2,c.Box,{textAlign:"center",color:"#9C9987",fontSize:"80px",children:(0,o.createComponentVNode)(2,c.Icon,{name:"radiation"})}),(0,o.createComponentVNode)(2,c.Box,{height:"80px",className:"NuclearBomb__NTIcon"})]})})]})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OperatingComputer=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=[{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"},{label:"Toxin",type:"toxLoss"},{label:"Respiratory",type:"oxyLoss"}];t.OperatingComputer=function(e,t){var n=(0,r.useSharedState)(t,"tab",1),i=n[0],u=n[1];return(0,o.createComponentVNode)(2,c.Window,{width:350,height:470,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===i,onClick:function(){return u(1)},children:"Patient State"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===i,onClick:function(){return u(2)},children:"Surgery Procedures"})]}),1===i&&(0,o.createComponentVNode)(2,l),2===i&&(0,o.createComponentVNode)(2,d)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),l=c.table,d=c.procedures,u=void 0===d?[]:d,s=c.patient,m=void 0===s?{}:s;return l?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Patient State",children:m&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"State",color:m.statstate,children:m.stat}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood Type",children:m.blood_type}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:m.health,minValue:m.minHealth,maxValue:m.maxHealth,color:m.health>=0?"good":"average",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:m.health})})}),i.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:m.is_robotic_organism&&"Toxin"===e.label?"Corruption":e.label,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:m[e.type]/m.maxHealth,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:m[e.type]})})},e.type)}))]})||"No Patient Detected"}),0===u.length&&(0,o.createComponentVNode)(2,a.Section,{children:"No Active Procedures"}),u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Next Step",children:[e.next_step,e.chems_needed&&(0,o.createFragment)([(0,o.createVNode)(1,"b",null,"Required Chemicals:",16),(0,o.createVNode)(1,"br"),e.chems_needed],0)]}),!!c.alternative_step&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Alternative Step",children:[e.alternative_step,e.alt_chems_needed&&(0,o.createFragment)([(0,o.createVNode)(1,"b",null,"Required Chemicals:",16),(0,o.createVNode)(1,"br"),e.alt_chems_needed],0)]})]})},e.name)}))],0):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Table Detected"})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.surgeries,l=void 0===i?[]:i;return(0,o.createComponentVNode)(2,a.Section,{title:"Advanced Surgery Procedures",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"download",content:"Sync Research Database",onClick:function(){return c("sync")}}),l.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,level:2,children:e.desc},e.name)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Orbit=void 0;var o=n(0),r=n(19),a=n(63),c=n(2),i=n(1),l=n(3);function d(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return u(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(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}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(n=e[Symbol.iterator]()).next.bind(n)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);nt},h=function(e,t){var n=e.name,o=t.name,r=n.match(m),a=o.match(m);return r&&a&&n.replace(m,"")===o.replace(m,"")?parseInt(r[1],10)-parseInt(a[1],10):C(n,o)},N=function(e,t){var n=(0,c.useBackend)(t).act,r=e.searchText,a=e.source,l=e.title,d=a.filter(p(r));return d.sort(h),a.length>0&&(0,o.createComponentVNode)(2,i.Section,{title:l+" - ("+a.length+")",children:d.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.name.replace(s,""),onClick:function(){return n("orbit",{ref:e.ref})}},e.name)}))})},V=function(e,t){var n=(0,c.useBackend)(t).act,r=e.color,l=e.thing;return(0,o.createComponentVNode)(2,i.Button,{color:r,onClick:function(){return n("orbit",{ref:l.ref})},children:[l.name,l.orbiters&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,ml:1,children:["(",l.orbiters," ",(0,o.createComponentVNode)(2,i.Box,{as:"img",src:(0,a.resolveAsset)("ghost.png"),opacity:.7}),")"]})]})};t.Orbit=function(e,t){for(var n,r=(0,c.useBackend)(t),a=r.act,u=r.data,s=u.alive,m=u.antagonists,b=u.dead,f=u.ghosts,g=u.misc,v=u.npcs,k=(0,c.useLocalState)(t,"searchText",""),x=k[0],B=k[1],_={},w=d(m);!(n=w()).done;){var L=n.value;_[L.antag]===undefined&&(_[L.antag]=[]),_[L.antag].push(L)}var y=Object.entries(_);y.sort((function(e,t){return C(e[0],t[0])}));return(0,o.createComponentVNode)(2,l.Window,{title:"Orbit",width:350,height:700,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Icon,{name:"search",mr:1})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,i.Input,{placeholder:"Search...",autoFocus:!0,fluid:!0,value:x,onInput:function(e,t){return B(t)},onEnter:function(e,t){return function(e){for(var t=0,n=[y.map((function(e){return e[0],e[1]})),s,f,b,v,g];t0&&(0,o.createComponentVNode)(2,i.Section,{title:"Ghost-Visible Antagonists",children:y.map((function(e){var t=e[0],n=e[1];return(0,o.createComponentVNode)(2,i.Section,{title:t,level:2,children:n.filter(p(x)).sort(h).map((function(e){return(0,o.createComponentVNode)(2,V,{color:"bad",thing:e},e.name)}))},t)}))}),(0,o.createComponentVNode)(2,i.Section,{title:"Alive",children:s.filter(p(x)).sort(h).map((function(e){return(0,o.createComponentVNode)(2,V,{color:"good",thing:e},e.name)}))}),(0,o.createComponentVNode)(2,N,{title:"Ghosts",source:f,searchText:x}),(0,o.createComponentVNode)(2,N,{title:"Dead",source:b,searchText:x}),(0,o.createComponentVNode)(2,N,{title:"NPCs",source:v,searchText:x}),(0,o.createComponentVNode)(2,N,{title:"Misc",source:g,searchText:x})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OreBox=void 0;var o=n(0),r=n(19),a=n(1),c=n(2),i=n(3);t.OreBox=function(e,t){var n=(0,c.useBackend)(t),l=n.act,d=n.data.materials;return(0,o.createComponentVNode)(2,i.Window,{width:335,height:415,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Ores",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Empty",onClick:function(){return l("removeall")}}),children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Ore"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"right",children:"Amount"})]}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,r.toTitleCase)(e.name)}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"right",children:(0,o.createComponentVNode)(2,a.Box,{color:"label",inline:!0,children:e.amount})})]},e.type)}))]})}),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Box,{children:["All ores will be placed in here when you are wearing a mining stachel on your belt or in a pocket while dragging the ore box.",(0,o.createVNode)(1,"br"),"Gibtonite is not accepted."]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OreRedemptionMachine=void 0;var o=n(0),r=n(19),a=n(2),c=n(1),i=n(3);t.OreRedemptionMachine=function(e,t){var n=(0,a.useBackend)(t),r=n.act,d=n.data,u=d.unclaimedPoints,s=d.materials,m=d.alloys,p=d.diskDesigns,C=d.hasDisk;return(0,o.createComponentVNode)(2,i.Window,{title:"Ore Redemption Machine",width:440,height:550,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.BlockQuote,{mb:1,children:["This machine only accepts ore.",(0,o.createVNode)(1,"br"),"Gibtonite and Slag are not accepted."]}),(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:"label",mr:1,children:"Unclaimed points:"}),u,(0,o.createComponentVNode)(2,c.Button,{ml:2,content:"Claim",disabled:0===u,onClick:function(){return r("Claim")}})]})]}),(0,o.createComponentVNode)(2,c.Section,{children:C&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{mb:1,children:(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject design disk",onClick:function(){return r("diskEject")}})}),(0,o.createComponentVNode)(2,c.Table,{children:p.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:["File ",e.index,": ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,c.Button,{disabled:!e.canupload,content:"Upload",onClick:function(){return r("diskUpload",{design:e.index})}})})]},e.index)}))})],4)||(0,o.createComponentVNode)(2,c.Button,{icon:"save",content:"Insert design disk",onClick:function(){return r("diskInsert")}})}),(0,o.createComponentVNode)(2,c.Section,{title:"Materials",children:(0,o.createComponentVNode)(2,c.Table,{children:s.map((function(e){return(0,o.createComponentVNode)(2,l,{material:e,onRelease:function(t){return r("Release",{id:e.id,sheets:t})}},e.id)}))})}),(0,o.createComponentVNode)(2,c.Section,{title:"Alloys",children:(0,o.createComponentVNode)(2,c.Table,{children:m.map((function(e){return(0,o.createComponentVNode)(2,l,{material:e,onRelease:function(t){return r("Smelt",{id:e.id,sheets:t})}},e.id)}))})})]})})};var l=function(e,t){var n=e.material,i=e.onRelease,l=(0,a.useLocalState)(t,"amount"+n.name,1),d=l[0],u=l[1],s=Math.floor(n.amount);return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,r.toTitleCase)(n.name).replace("Alloy","")}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,textAlign:"right",children:(0,o.createComponentVNode)(2,c.Box,{mr:2,color:"label",inline:!0,children:n.value&&n.value+" cr"})}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,textAlign:"right",children:(0,o.createComponentVNode)(2,c.Box,{mr:2,color:"label",inline:!0,children:[s," sheets"]})}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,children:[(0,o.createComponentVNode)(2,c.NumberInput,{width:"32px",step:1,stepPixelSize:5,minValue:1,maxValue:50,value:d,onChange:function(e,t){return u(t)}}),(0,o.createComponentVNode)(2,c.Button,{disabled:s<1,content:"Release",onClick:function(){return i(d)}})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Pandemic=t.PandemicAntibodyDisplay=t.PandemicSymptomDisplay=t.PandemicDiseaseDisplay=t.PandemicBeakerDisplay=void 0;var o=n(0),r=n(14),a=n(2),c=n(1),i=n(3),l=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.has_beaker,d=i.beaker_empty,u=i.has_blood,s=i.blood,m=!l||d;return(0,o.createComponentVNode)(2,c.Section,{title:"Beaker",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Empty and Eject",color:"bad",disabled:m,onClick:function(){return r("empty_eject_beaker")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"trash",content:"Empty",disabled:m,onClick:function(){return r("empty_beaker")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject",disabled:!l,onClick:function(){return r("eject_beaker")}})],4),children:l?d?(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Beaker is empty"}):u?(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Blood DNA",children:s&&s.dna||"Unknown"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Blood Type",children:s&&s.type||"Unknown"})]}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"No blood detected"}):(0,o.createComponentVNode)(2,c.NoticeBox,{children:"No beaker loaded"})})};t.PandemicBeakerDisplay=l;var d=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.is_ready;return(i.viruses||[]).map((function(e){var t=e.symptoms||[];return(0,o.createComponentVNode)(2,c.Section,{title:e.can_rename?(0,o.createComponentVNode)(2,c.Input,{value:e.name,onChange:function(t,n){return r("rename_disease",{index:e.index,name:n})}}):e.name,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"flask",content:"Create culture bottle",disabled:!l,onClick:function(){return r("create_culture_bottle",{index:e.index})}}),children:[(0,o.createComponentVNode)(2,c.Grid,{children:[(0,o.createComponentVNode)(2,c.Grid.Column,{children:e.description}),(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Agent",children:e.agent}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Spread",children:e.spread}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Possible Cure",children:e.cure})]})})]}),!!e.is_adv&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"Statistics",level:2,children:(0,o.createComponentVNode)(2,c.Grid,{children:[(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Resistance",children:e.resistance}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Stealth",children:e.stealth})]})}),(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Stage speed",children:e.stage_speed}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Transmissibility",children:e.transmission})]})})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Symptoms",level:2,children:t.map((function(e){return(0,o.createComponentVNode)(2,c.Collapsible,{title:e.name,children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,u,{symptom:e})})},e.name)}))})],4)]},e.name)}))};t.PandemicDiseaseDisplay=d;var u=function(e,t){var n=e.symptom,a=n.name,i=n.desc,l=n.stealth,d=n.resistance,u=n.stage_speed,s=n.transmission,m=n.level,p=n.neutered,C=(0,r.map)((function(e,t){return{desc:e,label:t}}))(n.threshold_desc||{});return(0,o.createComponentVNode)(2,c.Section,{title:a,level:2,buttons:!!p&&(0,o.createComponentVNode)(2,c.Box,{bold:!0,color:"bad",children:"Neutered"}),children:[(0,o.createComponentVNode)(2,c.Grid,{children:[(0,o.createComponentVNode)(2,c.Grid.Column,{size:2,children:i}),(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Level",children:m}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Resistance",children:d}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Stealth",children:l}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Stage Speed",children:u}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Transmission",children:s})]})})]}),C.length>0&&(0,o.createComponentVNode)(2,c.Section,{title:"Thresholds",level:3,children:(0,o.createComponentVNode)(2,c.LabeledList,{children:C.map((function(e){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.label,children:e.desc},e.label)}))})})]})};t.PandemicSymptomDisplay=u;var s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.resistances||[];return(0,o.createComponentVNode)(2,c.Section,{title:"Antibodies",children:l.length>0?(0,o.createComponentVNode)(2,c.LabeledList,{children:l.map((function(e){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,c.Button,{icon:"eye-dropper",content:"Create vaccine bottle",disabled:!i.is_ready,onClick:function(){return r("create_vaccine_bottle",{index:e.id})}})},e.name)}))}):(0,o.createComponentVNode)(2,c.Box,{bold:!0,color:"bad",mt:1,children:"No antibodies detected."})})};t.PandemicAntibodyDisplay=s;t.Pandemic=function(e,t){var n=(0,a.useBackend)(t).data;return(0,o.createComponentVNode)(2,i.Window,{width:520,height:550,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l),!!n.has_blood&&(0,o.createFragment)([(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,s)],4)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PaperSheet=void 0;var o=n(0),r=n(6),a=n(102),c=s(n(613)),i=s(n(614)),l=n(2),d=n(1),u=n(3);function s(e){return e&&e.__esModule?e:{"default":e}}function m(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function p(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}function C(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return h(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(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}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(n=e[Symbol.iterator]()).next.bind(n)}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n]+)>/g,(function(e,t){return"$"+n[t]})))}if("function"==typeof t){var a=this;return o[Symbol.replace].call(this,e,(function(){var e=[];return e.push.apply(e,arguments),"object"!=typeof e[e.length-1]&&e.push(c(e,a)),t.apply(this,e)}))}return o[Symbol.replace].call(this,e,t)},N.apply(this,arguments)}function V(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}function b(e){var t="function"==typeof Map?new Map:undefined;return(b=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,o)}function o(){return f(e,arguments,k(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),v(o,e)})(e)}function f(e,t,n){return(f=g()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var r=new(Function.bind.apply(e,o));return n&&v(r,n.prototype),r}).apply(null,arguments)}function g(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var x=function(e,t,n,o){return void 0===o&&(o=!1),"'+e+" "},B=/\[(_+)\]/g,_=N(/\[ \]/gm,{id:2}),w=/%s(?:ign)?(?=\\s|$)/gim,L=function(e,t,n,o,r){var a=e.replace(B,(function(e,a,c,i){var l=function(e,t,n){t=n+"x "+t;var o=document.createElement("canvas").getContext("2d");return o.font=t,o.measureText(e).width}(e,t,n)+"px";return function(e,t,n,o,r,a){return'[ '+(n=a,r=l,(r?n.replace(/ ")};return(0,o.createComponentVNode)(2,d.Box,{position:"relative",backgroundColor:i,width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,d.Box,{fillPositionedParent:!0,width:"100%",height:"100%",dangerouslySetInnerHTML:s,p:"10px"}),u.map((function(e,t){return(0,o.createComponentVNode)(2,S,{image:{sprite:e[0],x:e[1],y:e[2],rotate:e[3]}},e[0]+t)}))]})},T=function(e){function t(t,n){var o;return(o=e.call(this,t,n)||this).state={x:0,y:0,rotate:0},o}m(t,e);var n=t.prototype;return n.findStampPosition=function(e){for(var t=event.pageX,n=event.pageY,o={left:e.target.offsetLeft,top:e.target.offsetTop},r=e.target.offsetParent;r;)o.left+=r.offsetLeft,o.top+=r.offsetTop,r=r.offsetParent;var c=[t-o.left,n-o.top],i=(0,a.vecScale)([121,51],.5);return(0,a.vecSubtract)(c,i)},n.componentDidMount=function(){document.onwheel=this.handleWheel.bind(this)},n.handleMouseMove=function(e){var t=this.findStampPosition(e);y(e),this.setState({x:t[0],y:t[1]})},n.handleMouseClick=function(e){var t=this.findStampPosition(e),n=(0,l.useBackend)(this.context),o=n.act,r=n.data;o("stamp",{x:t[0],y:t[1],r:this.state.rotate,stamp_class:this.props.stamp_class,stamp_icon_state:r.stamp_icon_state}),this.setState({x:t[0],y:t[1]})},n.handleWheel=function(e){var t=e.deltaY>0?15:-15;if(e.deltaY<0&&0===this.state.rotate)this.setState({rotate:360+t});else if(e.deltaY>0&&360===this.state.rotate)this.setState({rotate:t});else{var n={rotate:t+this.state.rotate};this.setState((function(){return n}))}y(e)},n.render=function(){var e=this.props,t=e.value,n=e.stamp_class,r=e.stamps,a=p(e,["value","stamp_class","stamps"]),c=r||[],i={sprite:n,x:this.state.x,y:this.state.y,rotate:this.state.rotate};return(0,o.normalizeProps)((0,o.createComponentVNode)(2,d.Box,Object.assign({onClick:this.handleMouseClick.bind(this),onMouseMove:this.handleMouseMove.bind(this),onwheel:this.handleWheel.bind(this)},a,{children:[(0,o.createComponentVNode)(2,I,{readOnly:!0,value:t,stamps:c}),(0,o.createComponentVNode)(2,S,{opacity:.5,image:i})]})))},t}(o.Component),A=function(e){function t(t,n){var o;return(o=e.call(this,t,n)||this).state={previewSelected:"Preview",old_text:t.value||"",textarea_text:"",combined_text:t.value||""},o}m(t,e);var n=t.prototype;return n.createPreview=function(e,t){void 0===t&&(t=!1);var n,o,r=(0,l.useBackend)(this.context).data,a=r.text,d=r.pen_color,u=r.pen_font,s=r.is_crayon,m=r.field_counter,p=r.edit_usr,h={text:a};if((e=e.trim()).length>0){var N=function(e){return c["default"].sanitize(e,{FORBID_ATTR:["class","style"],ALLOWED_TAGS:["br","code","li","p","pre","span","table","td","tr","th","ul","ol","menu","font","b","center","table","tr","th"]})}(e+="\n"===e[e.length]?" \n":"\n \n"),V=(n=d,o=p,N.replace(w,(function(){return x(o,"Times New Roman",n,!0)}))),b=L(V,u,12,d,m),f=function(e){return(0,i["default"])(e,{breaks:!0,smartypants:!0,smartLists:!0,walkTokens:function(e){switch(e.type){case"url":case"autolink":case"reflink":case"link":case"image":e.type="text",e.href=""}},baseUrl:"thisshouldbreakhttp"})}(b.text),g=x(f,u,d,s);h.text+=g,h.field_counter=b.counter}if(t){var v=function(e,t,n,o,r){var a;void 0===r&&(r=!1);for(var i={},l=[];null!==(a=_.exec(e));){var d=a[0],u=a.groups.id;if(u){var s=document.getElementById(u);if(0===(s&&s.value?s.value:"").length)continue;var m=c["default"].sanitize(s.value.trim(),{ALLOWED_TAGS:[]});if(0===m.length)continue;var p=s.cloneNode(!0);m.match(w)?(p.style.fontFamily="Times New Roman",r=!0,p.defaultValue=o):(p.style.fontFamily=t,p.defaultValue=m),r&&(p.style.fontWeight="bold"),p.style.color=n,p.disabled=!0;var h=document.createElement("div");h.appendChild(p),i[u]=m,l.push({value:"["+h.innerHTML+"]",raw_text:d})}}if(l.length>0)for(var N,V=C(l);!(N=V()).done;){var b=N.value;e=e.replace(b.raw_text,b.value)}return{text:e,fields:i}}(h.text,u,d,p,s);h.text=v.text,h.form_fields=v.fields}return h},n.onInputHandler=function(e,t){var n=this;if(t!==this.state.textarea_text){var o=this.state.old_text.length+this.state.textarea_text.length;if(o>5e3&&(t=o-5e3>=t.length?"":t.substr(0,t.length-(o-5e3)))===this.state.textarea_text)return;this.setState((function(){return{textarea_text:t,combined_text:n.createPreview(t)}}))}},n.finalUpdate=function(e){var t=(0,l.useBackend)(this.context).act,n=this.createPreview(e,!0);t("save",n),this.setState((function(){return{textarea_text:"",previewSelected:"save",combined_text:n.text}}))},n.render=function(){var e=this,t=this.props,n=(t.value,t.textColor),r=t.fontFamily,a=t.stamps,c=t.backgroundColor;return p(t,["value","textColor","fontFamily","stamps","backgroundColor"]),(0,o.createComponentVNode)(2,d.Flex,{direction:"column",fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,d.Flex.Item,{children:(0,o.createComponentVNode)(2,d.Tabs,{children:[(0,o.createComponentVNode)(2,d.Tabs.Tab,{textColor:"black",backgroundColor:"Edit"===this.state.previewSelected?"grey":"white",selected:"Edit"===this.state.previewSelected,onClick:function(){return e.setState({previewSelected:"Edit"})},children:"Edit"},"marked_edit"),(0,o.createComponentVNode)(2,d.Tabs.Tab,{textColor:"black",backgroundColor:"Preview"===this.state.previewSelected?"grey":"white",selected:"Preview"===this.state.previewSelected,onClick:function(){return e.setState((function(){return{previewSelected:"Preview",textarea_text:e.state.textarea_text,combined_text:e.createPreview(e.state.textarea_text).text}}))},children:"Preview"},"marked_preview"),(0,o.createComponentVNode)(2,d.Tabs.Tab,{textColor:"black",backgroundColor:"confirm"===this.state.previewSelected?"red":"save"===this.state.previewSelected?"grey":"white",selected:"confirm"===this.state.previewSelected||"save"===this.state.previewSelected,onClick:function(){"confirm"===e.state.previewSelected?e.finalUpdate(e.state.textarea_text):"Edit"===e.state.previewSelected?e.setState((function(){return{previewSelected:"confirm",textarea_text:e.state.textarea_text,combined_text:e.createPreview(e.state.textarea_text).text}})):e.setState({previewSelected:"confirm"})},children:"confirm"===this.state.previewSelected?"confirm":"save"},"marked_done")]})}),(0,o.createComponentVNode)(2,d.Flex.Item,{grow:1,basis:1,children:"Edit"===this.state.previewSelected&&(0,o.createComponentVNode)(2,d.TextArea,{value:this.state.textarea_text,textColor:n,fontFamily:r,height:window.innerHeight-80+"px",backgroundColor:c,onInput:this.onInputHandler.bind(this)})||(0,o.createComponentVNode)(2,I,{value:this.state.combined_text,stamps:a,fontFamily:r,textColor:n})})]})},t}(o.Component);t.PaperSheet=function(e,t){var n=(0,l.useBackend)(t).data,r=n.edit_mode,a=n.text,c=n.paper_color,i=n.pen_color,s=void 0===i?"black":i,m=n.pen_font,p=void 0===m?"Verdana":m,C=n.stamps,h=n.stamp_class,N=(n.stamped,c&&"white"!==c?c:"#FFFFFF"),V=C&&null!==C?C:[];return(0,o.createComponentVNode)(2,u.Window,{theme:"paper",width:400,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,u.Window.Content,{children:(0,o.createComponentVNode)(2,d.Box,{fillPositionedParent:!0,backgroundColor:N,children:function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,I,{value:a,stamps:V,readOnly:!0});case 1:return(0,o.createComponentVNode)(2,A,{value:a,textColor:s,fontFamily:p,stamps:V,backgroundColor:N});case 2:return(0,o.createComponentVNode)(2,T,{value:a,stamps:V,stamp_class:h});default:return"ERROR ERROR WE CANNOT BE HERE!!"}}(r)})})})}},,,function(e,t,n){"use strict";t.__esModule=!0,t.ParticleAccelerator=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.ParticleAccelerator=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.assembled,u=l.power,s=l.strength;return(0,o.createComponentVNode)(2,c.Window,{width:350,height:185,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Run Scan",onClick:function(){return i("scan")}}),children:(0,o.createComponentVNode)(2,a.Box,{color:d?"good":"bad",children:d?"Ready - All parts in place":"Unable to detect all parts"})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Particle Accelerator Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:!d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Particle Strength",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:!d,onClick:function(){return i("remove_strength")}})," ",String(s).padStart(1,"0")," ",(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:!d,onClick:function(){return i("add_strength")}})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PersonalCrafting=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);function i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(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(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}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(n=e[Symbol.iterator]()).next.bind(n)}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n50?"good":d>15&&"average")||"bad";return(0,o.createComponentVNode)(2,c.Window,{width:450,height:340,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!l.anchored&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Generator not anchored."}),(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power switch",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.active?"power-off":"times",onClick:function(){return i("toggle_power")},disabled:!l.ready_to_boot,children:l.active?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:l.sheet_name+" sheets",children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:u,children:l.sheets}),l.sheets>=1&&(0,o.createComponentVNode)(2,a.Button,{ml:1,icon:"eject",disabled:l.active,onClick:function(){return i("eject")},children:"Eject"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current sheet level",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:l.stack_percent/100,ranges:{good:[.1,Infinity],average:[.01,.1],bad:[-Infinity,.01]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Heat level",children:l.current_heat<100?(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"good",children:"Nominal"}):l.current_heat<200?(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"average",children:"Caution"}):(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"bad",children:"DANGER"})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Output",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current output",children:l.power_output}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Adjust output",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"minus",onClick:function(){return i("lower_power")},children:l.power_generated}),(0,o.createComponentVNode)(2,a.Button,{icon:"plus",onClick:function(){return i("higher_power")},children:l.power_generated})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power available",children:(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:!l.connected&&"bad",children:l.connected?l.power_available:"Unconnected"})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PortablePump=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=n(211);t.PortablePump=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.direction,s=(d.holding,d.target_pressure),m=d.default_pressure,p=d.min_pressure,C=d.max_pressure;return(0,o.createComponentVNode)(2,c.Window,{width:300,height:315,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.PortableBasicInfo),(0,o.createComponentVNode)(2,a.Section,{title:"Pump",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"sign-in-alt":"sign-out-alt",content:u?"In":"Out",selected:u,onClick:function(){return l("direction")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:s,unit:"kPa",width:"75px",minValue:p,maxValue:C,step:10,onChange:function(e,t){return l("pressure",{pressure:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Presets",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"minus",disabled:s===p,onClick:function(){return l("pressure",{pressure:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",disabled:s===m,onClick:function(){return l("pressure",{pressure:"reset"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"plus",disabled:s===C,onClick:function(){return l("pressure",{pressure:"max"})}})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PortableScrubber=void 0;var o=n(0),r=n(2),a=n(1),c=n(36),i=n(3),l=n(211);t.PortableScrubber=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data.filter_types||[];return(0,o.createComponentVNode)(2,i.Window,{width:320,height:350,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,l.PortableBasicInfo),(0,o.createComponentVNode)(2,a.Section,{title:"Filters",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:e.enabled?"check-square-o":"square-o",content:(0,c.getGasLabel)(e.gas_id,e.gas_name),selected:e.enabled,onClick:function(){return d("toggle_filter",{val:e.gas_id})}},e.id)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PortableTurret=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.PortableTurret=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.silicon_user,u=l.locked,s=l.on,m=l.check_weapons,p=l.neutralize_criminals,C=l.neutralize_all,h=l.neutralize_unidentified,N=l.neutralize_nonmindshielded,V=l.neutralize_cyborgs,b=l.neutralize_heads,f=l.manual_control,g=l.allow_manual_control,v=l.lasertag_turret;return(0,o.createComponentVNode)(2,c.Window,{width:310,height:v?110:292,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.NoticeBox,{children:["Swipe an ID card to ",u?"unlock":"lock"," this interface."]}),(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",buttons:!v&&(!!g||!!f&&!!d)&&(0,o.createComponentVNode)(2,a.Button,{icon:f?"wifi":"terminal",content:f?"Remotely Controlled":"Manual Control",disabled:f,color:"bad",onClick:function(){return i("manual")}}),children:(0,o.createComponentVNode)(2,a.Button,{icon:s?"power-off":"times",content:s?"On":"Off",selected:s,disabled:u,onClick:function(){return i("power")}})})})}),!v&&(0,o.createComponentVNode)(2,a.Section,{title:"Target Settings",buttons:(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:!b,content:"Ignore Command",disabled:u,onClick:function(){return i("shootheads")}}),children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:C,content:"Non-Security and Non-Command",disabled:u,onClick:function(){return i("shootall")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Unauthorized Weapons",disabled:u,onClick:function(){return i("authweapon")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:h,content:"Unidentified Life Signs",disabled:u,onClick:function(){return i("checkxenos")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:N,content:"Non-Mindshielded",disabled:u,onClick:function(){return i("checkloyal")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:p,content:"Wanted Criminals",disabled:u,onClick:function(){return i("shootcriminals")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:V,content:"Cyborgs",disabled:u,onClick:function(){return i("shootborgs")}})]})],0)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ProbingConsole=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.ProbingConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.open,u=l.feedback,s=l.occupant,m=l.occupant_name,p=l.occupant_status;return(0,o.createComponentVNode)(2,c.Window,{width:330,height:207,theme:"abductor",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Machine Report",children:u})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Scanner",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d?"sign-out-alt":"sign-in-alt",content:d?"Close":"Open",onClick:function(){return i("door")}}),children:s&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:3===p?"bad":2===p?"average":"good",children:3===p?"Deceased":2===p?"Unconscious":"Conscious"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Experiments",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"thermometer",content:"Probe",onClick:function(){return i("experiment",{experiment_type:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"brain",content:"Dissect",onClick:function(){return i("experiment",{experiment_type:2})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"search",content:"Analyze",onClick:function(){return i("experiment",{experiment_type:3})}})]})]})||(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Subject"})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ProximitySensor=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.ProximitySensor=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.minutes,u=l.seconds,s=l.timing,m=l.scanning,p=l.sensitivity;return(0,o.createComponentVNode)(2,c.Window,{width:250,height:185,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Button,{icon:m?"lock":"unlock",content:m?"Armed":"Not Armed",selected:m,onClick:function(){return i("scanning")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Detection Range",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:m,onClick:function(){return i("sense",{range:-1})}})," ",String(p).padStart(1,"1")," ",(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:m,onClick:function(){return i("sense",{range:1})}})]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Auto Arm",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"clock-o",content:s?"Stop":"Start",selected:s,disabled:m,onClick:function(){return i("time")}}),children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:m||s,onClick:function(){return i("input",{adjust:-30})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:m||s,onClick:function(){return i("input",{adjust:-1})}})," ",String(d).padStart(2,"0"),":",String(u).padStart(2,"0")," ",(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:m||s,onClick:function(){return i("input",{adjust:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:m||s,onClick:function(){return i("input",{adjust:30})}})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Radio=void 0;var o=n(0),r=n(14),a=n(9),c=n(2),i=n(1),l=n(36),d=n(3);t.Radio=function(e,t){var n=(0,c.useBackend)(t),u=n.act,s=n.data,m=s.freqlock,p=s.frequency,C=s.minFrequency,h=s.maxFrequency,N=s.listening,V=s.broadcasting,b=s.command,f=s.useCommand,g=s.subspace,v=s.subspaceSwitchable,k=l.RADIO_CHANNELS.find((function(e){return e.freq===p})),x=(0,r.map)((function(e,t){return{name:t,status:!!e}}))(s.channels),B=106;return g&&(x.length>0?B+=21*x.length+6:B+=24),(0,o.createComponentVNode)(2,d.Window,{width:360,height:B,children:(0,o.createComponentVNode)(2,d.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Frequency",children:[m&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"light-gray",children:(0,a.toFixed)(p/10,1)+" kHz"})||(0,o.createComponentVNode)(2,i.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:10,minValue:C/10,maxValue:h/10,value:p/10,format:function(e){return(0,a.toFixed)(e,1)},onDrag:function(e,t){return u("frequency",{adjust:t-p/10})}}),k&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:k.color,ml:2,children:["[",k.name,"]"]})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Audio",children:[(0,o.createComponentVNode)(2,i.Button,{textAlign:"center",width:"37px",icon:N?"volume-up":"volume-mute",selected:N,onClick:function(){return u("listen")}}),(0,o.createComponentVNode)(2,i.Button,{textAlign:"center",width:"37px",icon:V?"microphone":"microphone-slash",selected:V,onClick:function(){return u("broadcast")}}),!!b&&(0,o.createComponentVNode)(2,i.Button,{ml:1,icon:"bullhorn",selected:f,content:"High volume "+(f?"ON":"OFF"),onClick:function(){return u("command")}}),!!v&&(0,o.createComponentVNode)(2,i.Button,{ml:1,icon:"bullhorn",selected:g,content:"Subspace Tx "+(g?"ON":"OFF"),onClick:function(){return u("subspace")}})]}),!!g&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Channels",children:[0===x.length&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"bad",children:"No encryption keys installed."}),x.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{icon:e.status?"check-square-o":"square-o",selected:e.status,content:e.name,onClick:function(){return u("channel",{channel:e.name})}})},e.name)}))]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RadioactiveMicrolaser=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.RadioactiveMicrolaser=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.irradiate,u=l.stealth,s=l.scanmode,m=l.intensity,p=l.wavelength,C=l.on_cooldown,h=l.cooldown;return(0,o.createComponentVNode)(2,c.Window,{title:"Radioactive Microlaser",width:320,height:335,theme:"syndicate",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Laser Status",children:(0,o.createComponentVNode)(2,a.Box,{color:C?"average":"good",children:C?"Recharging":"Ready"})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Scanner Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Irradiation",children:(0,o.createComponentVNode)(2,a.Button,{icon:d?"power-off":"times",content:d?"On":"Off",selected:d,onClick:function(){return i("irradiate")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Stealth Mode",children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"eye-slash":"eye",content:u?"On":"Off",disabled:!d,selected:u,onClick:function(){return i("stealth")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Scan Mode",children:(0,o.createComponentVNode)(2,a.Button,{icon:s?"mortar-pestle":"heartbeat",content:s?"Scan Reagents":"Scan Health",disabled:d&&u,onClick:function(){return i("scanmode")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Laser Settings",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Intensity",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",onClick:function(){return i("radintensity",{adjust:-5})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",onClick:function(){return i("radintensity",{adjust:-1})}})," ",(0,o.createComponentVNode)(2,a.NumberInput,{value:Math.round(m),width:"40px",minValue:1,maxValue:20,onChange:function(e,t){return i("radintensity",{target:t})}})," ",(0,o.createComponentVNode)(2,a.Button,{icon:"forward",onClick:function(){return i("radintensity",{adjust:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",onClick:function(){return i("radintensity",{adjust:5})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Wavelength",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",onClick:function(){return i("radwavelength",{adjust:-5})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",onClick:function(){return i("radwavelength",{adjust:-1})}})," ",(0,o.createComponentVNode)(2,a.NumberInput,{value:Math.round(p),width:"40px",minValue:0,maxValue:120,onChange:function(e,t){return i("radwavelength",{target:t})}})," ",(0,o.createComponentVNode)(2,a.Button,{icon:"forward",onClick:function(){return i("radwavelength",{adjust:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",onClick:function(){return i("radwavelength",{adjust:5})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Laser Cooldown",children:(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,children:h})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RapidPipeDispenser=void 0;var o=n(0),r=n(6),a=n(2),c=n(1),i=n(3),l=["Atmospherics","Disposals","Transit Tubes"],d={Atmospherics:"wrench",Disposals:"trash-alt","Transit Tubes":"bus",Pipes:"grip-lines","Disposal Pipes":"grip-lines",Devices:"microchip","Heat Exchange":"thermometer-half","Station Equipment":"microchip"},u={grey:"#bbbbbb",amethyst:"#a365ff",blue:"#4466ff",brown:"#b26438",cyan:"#48eae8",dark:"#808080",green:"#1edd00",orange:"#ffa030",purple:"#b535ea",red:"#ff3333",violet:"#6e00f6",yellow:"#ffce26"},s=[{name:"Dispense",bitmask:1},{name:"Connect",bitmask:2},{name:"Destroy",bitmask:4},{name:"Paint",bitmask:8}];t.RapidPipeDispenser=function(e,t){var n=(0,a.useBackend)(t),m=n.act,p=n.data,C=p.category,h=p.categories,N=void 0===h?[]:h,V=p.selected_color,b=p.piping_layer,f=p.mode,g=p.preview_rows.flatMap((function(e){return e.previews})),v=(0,a.useLocalState)(t,"categoryName"),k=v[0],x=v[1],B=N.find((function(e){return e.cat_name===k}))||N[0];return(0,o.createComponentVNode)(2,i.Window,{width:425,height:515,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Category",children:l.map((function(e,t){return(0,o.createComponentVNode)(2,c.Button,{selected:C===t,icon:d[e],color:"transparent",content:e,onClick:function(){return m("category",{category:t})}},e)}))}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Modes",children:s.map((function(e){return(0,o.createComponentVNode)(2,c.Button.Checkbox,{checked:f&e.bitmask,content:e.name,onClick:function(){return m("mode",{mode:e.bitmask})}},e.bitmask)}))}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Color",children:[(0,o.createComponentVNode)(2,c.Box,{inline:!0,width:"64px",color:u[V],children:V}),Object.keys(u).map((function(e){return(0,o.createComponentVNode)(2,c.ColorBox,{ml:1,color:u[e],onClick:function(){return m("color",{paint_color:e})}},e)}))]})]})}),(0,o.createComponentVNode)(2,c.Flex,{m:-.5,children:[(0,o.createComponentVNode)(2,c.Flex.Item,{m:.5,children:(0,o.createComponentVNode)(2,c.Section,{children:[0===C&&(0,o.createComponentVNode)(2,c.Box,{mb:1,children:[1,2,3].map((function(e){return(0,o.createComponentVNode)(2,c.Button.Checkbox,{fluid:!0,checked:e===b,content:"Layer "+e,onClick:function(){return m("piping_layer",{piping_layer:e})}},e)}))}),(0,o.createComponentVNode)(2,c.Box,{width:"108px",children:g.map((function(e){return(0,o.createComponentVNode)(2,c.Button,{title:e.dir_name,selected:e.selected,style:{width:"48px",height:"48px",padding:0},onClick:function(){return m("setdir",{dir:e.dir,flipped:e.flipped})},children:(0,o.createComponentVNode)(2,c.Box,{className:(0,r.classes)(["pipes32x32",e.dir+"-"+e.icon_state]),style:{transform:"scale(1.5) translate(17%, 17%)"}})},e.dir)}))})]})}),(0,o.createComponentVNode)(2,c.Flex.Item,{m:.5,grow:1,children:(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.Tabs,{children:N.map((function(e,t){return(0,o.createComponentVNode)(2,c.Tabs.Tab,{fluid:!0,icon:d[e.cat_name],selected:e.cat_name===B.cat_name,onClick:function(){return x(e.cat_name)},children:e.cat_name},e.cat_name)}))}),null==B?void 0:B.recipes.map((function(e){return(0,o.createComponentVNode)(2,c.Button.Checkbox,{fluid:!0,ellipsis:!0,checked:e.selected,content:e.pipe_name,title:e.pipe_name,onClick:function(){return m("pipe_type",{pipe_type:e.pipe_index,category:B.cat_name})}},e.pipe_index)}))]})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RemoteRobotControlContent=t.RemoteRobotControl=void 0;var o=n(0),r=n(19),a=n(2),c=n(1),i=n(3);t.RemoteRobotControl=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{title:"Remote Robot Control",width:500,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.robots,d=void 0===l?[]:l;return d.length?d.map((function(e){return(0,o.createComponentVNode)(2,c.Section,{title:e.name+" ("+e.model+")",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"tools",content:"Interface",onClick:function(){return i("interface",{ref:e.ref})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"phone-alt",content:"Call",onClick:function(){return i("callbot",{ref:e.ref})}})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:"Inactive"===(0,r.decodeHtmlEntities)(e.mode)?"bad":"Idle"===(0,r.decodeHtmlEntities)(e.mode)?"average":"good",children:(0,r.decodeHtmlEntities)(e.mode)})," ",e.hacked&&(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:"bad",children:"(HACKED)"})||""]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Location",children:e.location})]})},e.ref)})):(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.NoticeBox,{textAlign:"center",children:"No robots detected"})})};t.RemoteRobotControlContent=l},function(e,t,n){"use strict";t.__esModule=!0,t.RoboticsControlConsole=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.RoboticsControlConsole=function(e,t){var n=(0,r.useBackend)(t),d=(n.act,n.data),u=(0,r.useSharedState)(t,"tab",1),s=u[0],m=u[1],p=d.can_hack,C=d.can_convert,h=d.cyborgs,N=void 0===h?[]:h,V=d.drones,b=void 0===V?[]:V;return(0,o.createComponentVNode)(2,c.Window,{width:500,height:460,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{icon:"list",lineHeight:"23px",selected:1===s,onClick:function(){return m(1)},children:["Cyborgs (",N.length,")"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{icon:"list",lineHeight:"23px",selected:2===s,onClick:function(){return m(2)},children:["Drones (",b.length,")"]})]}),1===s&&(0,o.createComponentVNode)(2,i,{cyborgs:N,can_hack:p,can_convert:C}),2===s&&(0,o.createComponentVNode)(2,l,{drones:b})]})})};var i=function(e,t){var n=e.cyborgs,c=e.can_hack,i=e.can_convert,l=(0,r.useBackend)(t),d=l.act;l.data;return n.length?n.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createFragment)([!!c&&!e.emagged&&(0,o.createComponentVNode)(2,a.Button,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){return d("magbot",{ref:e.ref})}}),!!i&&!e.servant&&(0,o.createComponentVNode)(2,a.Button,{icon:"terminal",content:"Convert",color:"bad",onClick:function(){return d("convert",{ref:e.ref})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:e.locked_down?"unlock":"lock",color:e.locked_down?"good":"default",content:e.locked_down?"Release":"Lockdown",onClick:function(){return d("stopbot",{ref:e.ref})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"bomb",content:"Detonate",color:"bad",onClick:function(){return d("killbot",{ref:e.ref})}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Box,{color:e.status?"bad":e.locked_down?"average":"good",children:e.status?"Not Responding":e.locked_down?"Locked Down":"Nominal"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge",children:(0,o.createComponentVNode)(2,a.Box,{color:e.charge<=30?"bad":e.charge<=70?"average":"good",children:"number"==typeof e.charge?e.charge+"%":"Not Found"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Module",children:e.module}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Master AI",children:(0,o.createComponentVNode)(2,a.Box,{color:e.synchronization?"default":"average",children:e.synchronization||"None"})})]})},e.ref)})):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cyborg units detected within access parameters"})},l=function(e,t){var n=e.drones,c=(0,r.useBackend)(t).act;return n.length?n.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"bomb",content:"Detonate",color:"bad",onClick:function(){return c("killdrone",{ref:e.ref})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Box,{color:e.status?"bad":"good",children:e.status?"Not Responding":"Nominal"})})})},e.ref)})):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No drone units detected within access parameters"})}},function(e,t,n){"use strict";t.__esModule=!0,t.Roulette=t.RouletteBetTable=t.RouletteBoard=t.RouletteNumberButton=void 0;var o=n(0),r=n(6),a=n(2),c=n(1),i=n(3),l=function(e){if(0===e)return"green";for(var t=[[1,10],[19,28]],n=!0,o=0;o=r[0]&&e<=r[1]){n=!1;break}}var a=e%2==0;return(n?a:!a)?"red":"black"},d=function(e,t){var n=e.number,r=(0,a.useBackend)(t).act;return(0,o.createComponentVNode)(2,c.Button,{bold:!0,content:n,color:l(n),width:"40px",height:"28px",fontSize:"20px",textAlign:"center",mb:0,className:"Roulette__board-extrabutton",onClick:function(){return r("ChangeBetType",{type:n})}})};t.RouletteNumberButton=d;var u=function(e,t){var n=(0,a.useBackend)(t).act;return(0,o.createVNode)(1,"table","Table",[(0,o.createVNode)(1,"tr","Roulette__board-row",[(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{content:"0",color:"transparent",height:"88px",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:0})}}),2,{rowSpan:"3"}),[3,6,9,12,15,18,21,24,27,30,33,36].map((function(e){return(0,o.createVNode)(1,"td","Roulette__board-cell Table__cell-collapsing",(0,o.createComponentVNode)(2,d,{number:e}),2,null,e)})),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"2 to 1",color:"transparent",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"s3rd col"})}}),2)],0),(0,o.createVNode)(1,"tr",null,[[2,5,8,11,14,17,20,23,26,29,32,35].map((function(e){return(0,o.createVNode)(1,"td","Roulette__board-cell Table__cell-collapsing",(0,o.createComponentVNode)(2,d,{number:e}),2,null,e)})),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"2 to 1",color:"transparent",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"s2nd col"})}}),2)],0),(0,o.createVNode)(1,"tr",null,[[1,4,7,10,13,16,19,22,25,28,31,34].map((function(e){return(0,o.createVNode)(1,"td","Roulette__board-cell Table__cell-collapsing",(0,o.createComponentVNode)(2,d,{number:e}),2,null,e)})),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"2 to 1",color:"transparent",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"s1st col"})}}),2)],0),(0,o.createVNode)(1,"tr",null,[(0,o.createVNode)(1,"td"),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"1st 12",color:"transparent",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"s1-12"})}}),2,{colSpan:"4"}),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"2nd 12",color:"transparent",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"s13-24"})}}),2,{colSpan:"4"}),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"3rd 12",color:"transparent",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"s25-36"})}}),2,{colSpan:"4"})],4),(0,o.createVNode)(1,"tr",null,[(0,o.createVNode)(1,"td"),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"1-18",color:"transparent",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"s1-18"})}}),2,{colSpan:"2"}),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"Even",color:"transparent",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"even"})}}),2,{colSpan:"2"}),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"Black",color:"black",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"black"})}}),2,{colSpan:"2"}),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"Red",color:"red",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"red"})}}),2,{colSpan:"2"}),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"Odd",color:"transparent",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"odd"})}}),2,{colSpan:"2"}),(0,o.createVNode)(1,"td","Roulette__board-cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,content:"19-36",color:"transparent",className:"Roulette__board-extrabutton",onClick:function(){return n("ChangeBetType",{type:"s19-36"})}}),2,{colSpan:"2"})],4)],4,{style:{width:"1px"}})};t.RouletteBoard=u;var s=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data,u=(0,a.useLocalState)(t,"customBet",500),s=u[0],m=u[1],p=d.BetType;return p.startsWith("s")&&(p=p.substring(1,p.length)),(0,o.createVNode)(1,"table","Roulette__lowertable",[(0,o.createVNode)(1,"tr",null,[(0,o.createVNode)(1,"th",(0,r.classes)(["Roulette","Roulette__lowertable--cell","Roulette__lowertable--header"]),"Last Spun:",16),(0,o.createVNode)(1,"th",(0,r.classes)(["Roulette","Roulette__lowertable--cell","Roulette__lowertable--header"]),"Current Bet:",16)],4),(0,o.createVNode)(1,"tr",null,[(0,o.createVNode)(1,"td",(0,r.classes)(["Roulette","Roulette__lowertable--cell","Roulette__lowertable--spinresult","Roulette__lowertable--spinresult-"+l(d.LastSpin)]),d.LastSpin,0),(0,o.createVNode)(1,"td",(0,r.classes)(["Roulette","Roulette__lowertable--cell","Roulette__lowertable--betscell"]),[(0,o.createComponentVNode)(2,c.Box,{bold:!0,mt:1,mb:1,fontSize:"25px",textAlign:"center",children:[d.BetAmount," cr on ",p]}),(0,o.createComponentVNode)(2,c.Box,{ml:1,mr:1,children:[(0,o.createComponentVNode)(2,c.Button,{fluid:!0,content:"Bet 10 cr",onClick:function(){return i("ChangeBetAmount",{amount:10})}}),(0,o.createComponentVNode)(2,c.Button,{fluid:!0,content:"Bet 50 cr",onClick:function(){return i("ChangeBetAmount",{amount:50})}}),(0,o.createComponentVNode)(2,c.Button,{fluid:!0,content:"Bet 100 cr",onClick:function(){return i("ChangeBetAmount",{amount:100})}}),(0,o.createComponentVNode)(2,c.Button,{fluid:!0,content:"Bet 500 cr",onClick:function(){return i("ChangeBetAmount",{amount:500})}}),(0,o.createComponentVNode)(2,c.Grid,{children:[(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,content:"Bet custom amount...",onClick:function(){return i("ChangeBetAmount",{amount:s})}})}),(0,o.createComponentVNode)(2,c.Grid.Column,{size:.1,children:(0,o.createComponentVNode)(2,c.NumberInput,{value:s,minValue:0,maxValue:1e3,step:10,stepPixelSize:4,width:"40px",onChange:function(e,t){return m(t)}})})]})]})],4)],4),(0,o.createVNode)(1,"tr",null,(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,c.Box,{bold:!0,m:1,fontSize:"14px",textAlign:"center",children:"Swipe an ID card with a connected account to spin!"}),2,{colSpan:"2"}),2),(0,o.createVNode)(1,"tr",null,[(0,o.createVNode)(1,"td","Roulette__lowertable--cell",[(0,o.createComponentVNode)(2,c.Box,{inline:!0,bold:!0,mr:1,children:"House Balance:"}),(0,o.createComponentVNode)(2,c.Box,{inline:!0,children:d.HouseBalance?d.HouseBalance+" cr":"None"})],4),(0,o.createVNode)(1,"td","Roulette__lowertable--cell",(0,o.createComponentVNode)(2,c.Button,{fluid:!0,content:d.IsAnchored?"Bolted":"Unbolted",m:1,color:"transparent",textAlign:"center",onClick:function(){return i("anchor")}}),2)],4)],4)};t.RouletteBetTable=s;t.Roulette=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{width:603,height:475,theme:"cardtable",children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SatelliteControl=void 0;var o=n(0),r=n(2),a=n(1),c=n(198),i=n(3);t.SatelliteControl=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.satellites||[];return(0,o.createComponentVNode)(2,i.Window,{width:400,height:305,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[d.meteor_shield&&(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Coverage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.meteor_shield_coverage/d.meteor_shield_coverage_max,content:100*d.meteor_shield_coverage/d.meteor_shield_coverage_max+"%",ranges:{good:[1,Infinity],average:[.3,1],bad:[-Infinity,.3]}})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Satellite Controls",children:(0,o.createComponentVNode)(2,a.Box,{mr:-1,children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:e.active,content:"#"+e.id+" "+e.mode,onClick:function(){return l("toggle",{id:e.id})}},e.id)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ScannerGate=void 0;var o=n(0),r=n(2),a=n(1),c=n(64),i=n(3),l=["Positive","Harmless","Minor","Medium","Harmful","Dangerous","BIOHAZARD"],d=[{name:"Human",value:"human"},{name:"Lizardperson",value:"lizard"},{name:"Flyperson",value:"fly"},{name:"Felinid",value:"felinid"},{name:"Plasmaman",value:"plasma"},{name:"Mothperson",value:"moth"},{name:"Jellyperson",value:"jelly"},{name:"Podperson",value:"pod"},{name:"Golem",value:"golem"},{name:"Zombie",value:"zombie"}],u=[{name:"Starving",value:150},{name:"Obese",value:600}];t.ScannerGate=function(e,t){var n=(0,r.useBackend)(t),a=n.act,l=n.data;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:300,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.InterfaceLockNoticeBox,{onLockedStatusChange:function(){return a("toggle_lock")}}),!l.locked&&(0,o.createComponentVNode)(2,m)]})})};var s={Off:{title:"Scanner Mode: Off",component:function(){return p}},Wanted:{title:"Scanner Mode: Wanted",component:function(){return C}},Guns:{title:"Scanner Mode: Guns",component:function(){return h}},Mindshield:{title:"Scanner Mode: Mindshield",component:function(){return N}},Disease:{title:"Scanner Mode: Disease",component:function(){return V}},Species:{title:"Scanner Mode: Species",component:function(){return b}},Nutrition:{title:"Scanner Mode: Nutrition",component:function(){return f}},Nanites:{title:"Scanner Mode: Nanites",component:function(){return g}}},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.scan_mode,l=s[i]||s.off,d=l.component();return(0,o.createComponentVNode)(2,a.Section,{title:l.title,buttons:"Off"!==i&&(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"back",onClick:function(){return c("set_mode",{new_mode:"Off"})}}),children:(0,o.createComponentVNode)(2,d)})},p=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{mb:2,children:"Select a scanning mode below."}),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Wanted",onClick:function(){return n("set_mode",{new_mode:"Wanted"})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Guns",onClick:function(){return n("set_mode",{new_mode:"Guns"})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Mindshield",onClick:function(){return n("set_mode",{new_mode:"Mindshield"})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Disease",onClick:function(){return n("set_mode",{new_mode:"Disease"})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Species",onClick:function(){return n("set_mode",{new_mode:"Species"})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Nutrition",onClick:function(){return n("set_mode",{new_mode:"Nutrition"})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Nanites",onClick:function(){return n("set_mode",{new_mode:"Nanites"})}})]})],4)},C=function(e,t){var n=(0,r.useBackend)(t).data.reverse;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{mb:2,children:["Trigger if the person scanned ",n?"does not have":"has"," ","any warrants for their arrest."]}),(0,o.createComponentVNode)(2,v)],4)},h=function(e,t){var n=(0,r.useBackend)(t).data.reverse;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{mb:2,children:["Trigger if the person scanned ",n?"does not have":"has"," ","any guns."]}),(0,o.createComponentVNode)(2,v)],4)},N=function(e,t){var n=(0,r.useBackend)(t).data.reverse;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{mb:2,children:["Trigger if the person scanned ",n?"does not have":"has"," ","a mindshield."]}),(0,o.createComponentVNode)(2,v)],4)},V=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.reverse,u=i.disease_threshold;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{mb:2,children:["Trigger if the person scanned ",d?"does not have":"has"," ","a disease equal or worse than ",u,"."]}),(0,o.createComponentVNode)(2,a.Box,{mb:2,children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:e===u,content:e,onClick:function(){return c("set_disease_threshold",{new_threshold:e})}},e)}))}),(0,o.createComponentVNode)(2,v)],4)},b=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.reverse,u=i.target_species,s=d.find((function(e){return e.value===u}));return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{mb:2,children:["Trigger if the person scanned is ",l?"not":""," ","of the ",s.name," species.","zombie"===u&&" All zombie types will be detected, including dormant zombies."]}),(0,o.createComponentVNode)(2,a.Box,{mb:2,children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:e.value===u,content:e.name,onClick:function(){return c("set_target_species",{new_species:e.value})}},e.value)}))}),(0,o.createComponentVNode)(2,v)],4)},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.reverse,d=i.target_nutrition,s=u.find((function(e){return e.value===d}));return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{mb:2,children:["Trigger if the person scanned ",l?"does not have":"has"," ","the ",s.name," nutrition level."]}),(0,o.createComponentVNode)(2,a.Box,{mb:2,children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:e.value===d,content:e.name,onClick:function(){return c("set_target_nutrition",{new_nutrition:e.name})}},e.name)}))}),(0,o.createComponentVNode)(2,v)],4)},g=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.reverse,d=i.nanite_cloud;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{mb:2,children:["Trigger if the person scanned ",l?"does not have":"has"," ","nanite cloud ",d,"."]}),(0,o.createComponentVNode)(2,a.Box,{mb:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cloud ID",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:d,width:"65px",minValue:1,maxValue:100,stepPixelSize:2,onChange:function(e,t){return c("set_nanite_cloud",{new_cloud:t})}})})})}),(0,o.createComponentVNode)(2,v)],4)},v=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.reverse;return(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Scanning Mode",children:(0,o.createComponentVNode)(2,a.Button,{content:i?"Inverted":"Default",icon:i?"random":"long-arrow-alt-right",onClick:function(){return c("toggle_reverse")},color:i?"bad":"good"})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SeedExtractor=void 0;var o=n(0),r=n(14),a=n(30),c=n(19),i=n(2),l=n(1),d=n(3);t.SeedExtractor=function(e,t){var n,u,s=(0,i.useBackend)(t),m=s.act,p=s.data,C=(n=p.seeds,u=Object.keys(n).map((function(e){var t=function(e){var t,n=/([^;=]+)=([^;]+)/g,o={};do{(t=n.exec(e))&&(o[t[1]]=t[2]+"")}while(t);return o}(e);return t.amount=n[e],t.key=e,t.name=(0,c.toTitleCase)(t.name.replace("pack of ","")),t})),(0,a.flow)([(0,r.sortBy)((function(e){return e.name}))])(u));return(0,o.createComponentVNode)(2,d.Window,{width:1e3,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Stored seeds:",children:(0,o.createComponentVNode)(2,l.Table,{cellpadding:"3",textAlign:"center",children:[(0,o.createComponentVNode)(2,l.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Lifespan"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Endurance"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Maturation"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Production"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Yield"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Potency"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Instability"}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:"Stock"})]}),C.map((function(e){return(0,o.createComponentVNode)(2,l.Table.Row,{children:[(0,o.createComponentVNode)(2,l.Table.Cell,{bold:!0,children:e.name}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:e.lifespan}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:e.endurance}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:e.maturation}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:e.production}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:e.yield}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:e.potency}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:e.instability}),(0,o.createComponentVNode)(2,l.Table.Cell,{children:[(0,o.createComponentVNode)(2,l.Button,{content:"Vend",onClick:function(){return m("select",{item:e.key})}}),"(",e.amount," left)"]})]},e.key)}))]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleConsole=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.ShuttleConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.authorization_required;return(0,o.createComponentVNode)(2,c.Window,{width:350,height:230,children:[!!l&&(0,o.createComponentVNode)(2,a.Modal,{ml:1,mt:1,width:26,height:12,fontSize:"28px",fontFamily:"monospace",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mt:2,children:(0,o.createComponentVNode)(2,a.Icon,{name:"minus-circle"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mt:2,ml:2,color:"bad",children:"SHUTTLE LOCKED"})]}),(0,o.createComponentVNode)(2,a.Box,{fontSize:"18px",mt:4,children:(0,o.createComponentVNode)(2,a.Button,{lineHeight:"40px",icon:"arrow-circle-right",content:"Request Authorization",color:"bad",onClick:function(){return i("request")}})})]}),(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,d)})]})};var i=function(e,t){var n;return null==e||null==(n=e.find((function(e){return e.id===t})))?void 0:n.name},l=function(e,t){var n;return null==e||null==(n=e.find((function(e){return e.name===t})))?void 0:n.id},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,u=d.status,s=d.locked,m=d.authorization_required,p=d.destination,C=d.docked_location,h=d.timer_str,N=d.locations,V=void 0===N?[]:N;return(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,fontSize:"26px",textAlign:"center",fontFamily:"monospace",children:h||"00:00"}),(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",fontSize:"14px",mb:1,children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,children:"STATUS:"}),(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"In Transit"===u?"good":"Idle"===u||"Igniting"===u?"average":"bad",ml:1,children:u||"Not Available"})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Shuttle Controls",level:2,children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:C||"Not Available"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destination",children:0===V.length&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Not Available"})||1===V.length&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:i(V,p)})||(0,o.createComponentVNode)(2,a.Dropdown,{over:!0,width:"240px",options:V.map((function(e){return e.name})),disabled:s||m,selected:i(V,p)||"Select a Destination",onSelected:function(e){return c("set_destination",{destination:l(V,e)})}})})]}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Depart",disabled:!i(V,p)||s||m,mt:1.5,icon:"arrow-up",textAlign:"center",onClick:function(){return c("move",{shuttle_id:p})}})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleManipulatorModification=t.ShuttleManipulatorTemplates=t.ShuttleManipulatorStatus=t.ShuttleManipulator=void 0;var o=n(0),r=n(14),a=n(2),c=n(1),i=n(3);t.ShuttleManipulator=function(e,t){var n=(0,a.useLocalState)(t,"tab",1),r=n[0],s=n[1];return(0,o.createComponentVNode)(2,i.Window,{title:"Shuttle Manipulator",width:800,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===r,onClick:function(){return s(1)},children:"Status"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===r,onClick:function(){return s(2)},children:"Templates"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:3===r,onClick:function(){return s(3)},children:"Modification"})]}),1===r&&(0,o.createComponentVNode)(2,l),2===r&&(0,o.createComponentVNode)(2,d),3===r&&(0,o.createComponentVNode)(2,u)]})})};var l=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.shuttles||[];return(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.Table,{children:i.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{content:"JMP",onClick:function(){return r("jump_to",{type:"mobile",id:e.id})}},e.id)}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{content:"Fly",disabled:!e.can_fly,onClick:function(){return r("fly",{id:e.id})}},e.id)}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.status}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:[e.mode,!!e.timer&&(0,o.createFragment)([(0,o.createTextVNode)("("),e.timeleft,(0,o.createTextVNode)(")"),(0,o.createComponentVNode)(2,c.Button,{content:"Fast Travel",disabled:!e.can_fast_travel,onClick:function(){return r("fast_travel",{id:e.id})}},e.id)],0)]})]},e.id)}))})})};t.ShuttleManipulatorStatus=l;var d=function(e,t){var n,i=(0,a.useBackend)(t),l=i.act,d=i.data,u=d.templates||{},s=d.selected||{},m=(0,a.useLocalState)(t,"templateId",Object.keys(u)[0]),p=m[0],C=m[1],h=null==(n=u[p])?void 0:n.templates;return(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Tabs,{vertical:!0,children:(0,r.map)((function(e,t){return(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:p===t,onClick:function(){return C(t)},children:e.port_id},t)}))(u)})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,basis:0,children:h.map((function(e){var t=e.shuttle_id===s.shuttle_id;return(0,o.createComponentVNode)(2,c.Section,{title:e.name,level:2,buttons:(0,o.createComponentVNode)(2,c.Button,{content:t?"Selected":"Select",selected:t,onClick:function(){return l("select_template",{shuttle_id:e.shuttle_id})}}),children:(!!e.description||!!e.admin_notes)&&(0,o.createComponentVNode)(2,c.LabeledList,{children:[!!e.description&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description",children:e.description}),!!e.admin_notes&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Admin Notes",children:e.admin_notes})]})},e.shuttle_id)}))})]})})};t.ShuttleManipulatorTemplates=d;var u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.selected||{},d=i.existing_shuttle||{};return(0,o.createComponentVNode)(2,c.Section,{children:l?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{level:2,title:l.name,children:(!!l.description||!!l.admin_notes)&&(0,o.createComponentVNode)(2,c.LabeledList,{children:[!!l.description&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description",children:l.description}),!!l.admin_notes&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Admin Notes",children:l.admin_notes})]})}),d?(0,o.createComponentVNode)(2,c.Section,{level:2,title:"Existing Shuttle: "+d.name,children:(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",buttons:(0,o.createComponentVNode)(2,c.Button,{content:"Jump To",onClick:function(){return r("jump_to",{type:"mobile",id:d.id})}}),children:[d.status,!!d.timer&&(0,o.createFragment)([(0,o.createTextVNode)("("),d.timeleft,(0,o.createTextVNode)(")")],0)]})})}):(0,o.createComponentVNode)(2,c.Section,{level:2,title:"Existing Shuttle: None"}),(0,o.createComponentVNode)(2,c.Section,{level:2,title:"Status",children:[(0,o.createComponentVNode)(2,c.Button,{content:"Preview",onClick:function(){return r("preview",{shuttle_id:l.shuttle_id})}}),(0,o.createComponentVNode)(2,c.Button,{content:"Load",color:"bad",onClick:function(){return r("load",{shuttle_id:l.shuttle_id})}})]})],0):"No shuttle selected"})};t.ShuttleManipulatorModification=u},function(e,t,n){"use strict";t.__esModule=!0,t.Signaler=void 0;var o=n(0),r=n(9),a=n(2),c=n(1),i=n(3);t.Signaler=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.code,s=d.frequency,m=d.minFrequency,p=d.maxFrequency;return(0,o.createComponentVNode)(2,i.Window,{width:280,height:132,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.Grid,{children:[(0,o.createComponentVNode)(2,c.Grid.Column,{size:1.4,color:"label",children:"Frequency:"}),(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:m/10,maxValue:p/10,value:s/10,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onDrag:function(e,t){return l("freq",{freq:t})}})}),(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.Button,{ml:1.3,icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"freq"})}})})]}),(0,o.createComponentVNode)(2,c.Grid,{mt:.6,children:[(0,o.createComponentVNode)(2,c.Grid.Column,{size:1.4,color:"label",children:"Code:"}),(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:u,width:"80px",onDrag:function(e,t){return l("code",{code:t})}})}),(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.Button,{ml:1.3,icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"code"})}})})]}),(0,o.createComponentVNode)(2,c.Grid,{mt:.8,children:(0,o.createComponentVNode)(2,c.Grid.Column,{children:(0,o.createComponentVNode)(2,c.Button,{mb:-.1,fluid:!0,icon:"arrow-up",content:"Send Signal",textAlign:"center",onClick:function(){return l("signal")}})})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SkillPanel=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i={color:"lightgreen",fontWeight:"bold"},l={color:"#FFDB58",fontWeight:"bold"};t.SkillPanel=function(e,t){var n=(0,r.useBackend)(t),u=n.act,s=n.data,m=s.skills||[];return(0,o.createComponentVNode)(2,c.Window,{title:"Manage Skills",width:600,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:m.playername,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:m.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[(0,o.createVNode)(1,"span",null,e.desc,0,{style:l}),(0,o.createVNode)(1,"br"),!!e.level_based&&(0,o.createFragment)([(0,o.createComponentVNode)(2,d,{skill_lvl_num:e.lvl_base_num,skill_lvl:e.lvl_base}),(0,o.createVNode)(1,"br")],4),"Total Experience: [",e.value_base," XP]",(0,o.createVNode)(1,"br"),"XP To Next Level:",e.level_based?(0,o.createVNode)(1,"span",null,e.xp_next_lvl_base,0):(0,o.createVNode)(1,"span",null,"[MAXXED]",16,{style:i}),(0,o.createVNode)(1,"br"),e.base_readout,(0,o.createComponentVNode)(2,a.ProgressBar,{value:e.percent_base,color:"good"}),(0,o.createVNode)(1,"br"),!!s.admin&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Adjust Exp",onClick:function(){return u("adj_exp",{skill:e.path})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Set Exp",onClick:function(){return u("set_exp",{skill:e.path})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Set Level",onClick:function(){return u("set_lvl",{skill:e.path})}}),(0,o.createVNode)(1,"br"),(0,o.createVNode)(1,"br")],4)]},e.name)}))})})})})};var d=function(e){var t=e.skill_lvl_num,n=e.skill_lvl;return(0,o.createComponentVNode)(2,a.Box,{inline:!0,children:["Level: [",(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,textColor:"hsl("+50*t+", 50%, 50%)",children:n}),"]"]})}},function(e,t,n){"use strict";t.__esModule=!0,t.SkillStation=t.TimeFormat=t.ImplantedSkillchips=t.InsertedSkillchip=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=n(9),l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.skillchip_ready,d=i.slot_use,u=i.slots_used,s=i.slots_max,m=i.implantable_reason,p=i.implantable,C=i.complexity,h=i.skill_name,N=i.skill_desc,V=i.skill_icon,b=i.working;return l?(0,o.createComponentVNode)(2,a.Section,{title:"Inserted Skillchip",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"syringe",disabled:!p||!!b,color:p?"good":"default",onClick:function(){return c("implant")},content:"Implant",tooltip:m}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",disabled:!!b,onClick:function(){return c("eject")},content:"Eject"})],4),children:(0,o.createComponentVNode)(2,a.Flex,{spacing:2,height:"100%",width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{height:"100%",align:"center",children:(0,o.createComponentVNode)(2,a.Icon,{size:3,name:V})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Skillchip",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:h})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:(0,o.createComponentVNode)(2,a.Box,{italic:!0,children:N})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Complexity",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"brain",width:"15px",textAlign:"center"})," ",C]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Slot Size",children:(0,o.createComponentVNode)(2,a.Box,{color:u+d>s&&"red",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"save",width:"15px",textAlign:"center"})," ",d]})}),!!m&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Error",color:p?"good":"bad",children:m})]})})]})}):!b&&(0,o.createComponentVNode)(2,a.NoticeBox,{info:!0,children:"Please insert a skillchip."})};t.InsertedSkillchip=l;var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.slots_used,d=i.slots_max,u=i.complexity_used,s=i.complexity_max,m=i.working,p=i.current||[];return(0,o.createComponentVNode)(2,a.Section,{title:"Implanted Skillchips",children:[!p.length&&"No skillchips detected.",!!p.length&&(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Chip"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"brain",tooltip:"Complexity",tooltipPosition:"top",content:u+"/"+s})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"save",tooltip:"Slot Size",tooltipPosition:"top",content:l+"/"+d})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"check",tooltip:"Is Active",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"hourglass-half",tooltip:"Cooldown",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"tasks",tooltip:"Actions",tooltipPosition:"top"})})]}),p.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Icon,{textAlign:"center",width:"18px",mr:1,name:e.icon}),e.name]}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,color:(!e.active?e.complexity+u>s&&"bad":"good")||"grey",textAlign:"center",children:e.complexity}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,color:"good",textAlign:"center",children:e.slot_use}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Icon,{name:e.active?"check":"times",color:e.active?"good":"bad"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.cooldown>0&&Math.ceil(e.cooldown/10)+"s"||"0s"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("remove",{ref:e.ref})},icon:e.removable?"eject":"trash",color:e.removable?"good":"bad",tooltip:e.removable?"Extract":"Destroy",tooltipPosition:"left",disabled:e.cooldown||m}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("toggle_activate",{ref:e.ref})},icon:e.active?"check-square-o":"square-o",color:e.active?"good":"default",tooltip:!!e.active_error&&!e.active&&e.active_error||e.active&&"Deactivate"||"Activate",tooltipPosition:"left",disabled:e.cooldown||m||!e.active&&e.complexity+u>s})]})]},e.ref)}))]})]})};t.ImplantedSkillchips=d;var u=function(e,t){var n=e.value,o=(0,i.toFixed)(Math.floor(n/10%60)).padStart(2,"0"),r=(0,i.toFixed)(Math.floor(n/600%60)).padStart(2,"0");return(0,i.toFixed)(Math.floor(n/36e3%24)).padStart(2,"0")+":"+r+":"+o};t.TimeFormat=u;t.SkillStation=function(e,t){var n=(0,r.useBackend)(t).data,i=n.working,s=n.timeleft,m=n.error;return(0,o.createComponentVNode)(2,c.Window,{title:"Skillsoft Station",width:500,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[!!m&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:m}),!!i&&(0,o.createComponentVNode)(2,a.NoticeBox,{danger:!0,children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mb:.5,children:"Operation in progress. Please do not leave the chamber."}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:["Time Left: ",(0,o.createComponentVNode)(2,u,{value:s})]})]})}),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,d)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Sleeper=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i=[{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"},{label:"Toxin",type:"toxLoss"},{label:"Oxygen",type:"oxyLoss"}];t.Sleeper=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.open,s=d.occupant,m=void 0===s?{}:s,p=d.occupied,C=(d.chems||[]).sort((function(e,t){var n=e.name.toLowerCase(),o=t.name.toLowerCase();return no?1:0}));return(0,o.createComponentVNode)(2,c.Window,{width:310,height:465,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:m.name?m.name:"No Occupant",minHeight:"210px",buttons:!!m.stat&&(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,color:m.statstate,children:m.stat}),children:!!p&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.ProgressBar,{value:m.health,minValue:m.minHealth,maxValue:m.maxHealth,ranges:{good:[50,Infinity],average:[0,50],bad:[-Infinity,0]}}),(0,o.createComponentVNode)(2,a.Box,{mt:1}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[i.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:m.is_robotic_organism&&"Toxin"===e.label?"Corruption":e.label,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:m[e.type],minValue:0,maxValue:m.maxHealth,color:"bad"})},e.type)})),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cells",color:m.cloneLoss?"bad":"good",children:m.cloneLoss?"Damaged":"Healthy"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brain",color:m.brainLoss?"bad":"good",children:m.brainLoss?"Abnormal":"Healthy"})]})],4)}),(0,o.createComponentVNode)(2,a.Section,{title:"Medicines",minHeight:"205px",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"door-open":"door-closed",content:u?"Open":"Closed",onClick:function(){return l("door")}}),children:C.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:"flask",content:e.name,disabled:!p||!e.allowed,width:"140px",onClick:function(){return l("inject",{chem:e.id})}},e.name)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SlimeBodySwapper=t.BodyEntry=void 0;var o=n(0),r=n(2),a=n(1),c=n(3),i={Dead:"bad",Unconscious:"average",Conscious:"good"},l={owner:"You Are Here",stranger:"Occupied",available:"Swap"},d=function(e,t){var n=e.body,r=e.swapFunc;return(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:n.htmlcolor,children:n.name}),level:2,buttons:(0,o.createComponentVNode)(2,a.Button,{content:l[n.occupied],selected:"owner"===n.occupied,color:"stranger"===n.occupied&&"bad",onClick:function(){return r()}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",bold:!0,color:i[n.status],children:n.status}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Jelly",children:n.exoticblood}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:n.area})]})})};t.BodyEntry=d;t.SlimeBodySwapper=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.bodies,u=void 0===l?[]:l;return(0,o.createComponentVNode)(2,c.Window,{width:400,height:400,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{children:u.map((function(e){return(0,o.createComponentVNode)(2,d,{body:e,swapFunc:function(){return i("swap",{ref:e.ref})}},e.name)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SmartVend=void 0;var o=n(0),r=n(14),a=n(2),c=n(1),i=n(3);t.SmartVend=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,i.Window,{width:440,height:550,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.Section,{title:"Storage",buttons:!!d.isdryer&&(0,o.createComponentVNode)(2,c.Button,{icon:d.drying?"stop":"tint",onClick:function(){return l("Dry")},children:d.drying?"Stop drying":"Dry"}),children:0===d.contents.length&&(0,o.createComponentVNode)(2,c.NoticeBox,{children:["Unfortunately, this ",d.name," is empty."]})||(0,o.createComponentVNode)(2,c.Table,{children:[(0,o.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Item"}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,textAlign:"center",children:d.verb?d.verb:"Dispense"})]}),(0,r.map)((function(e,t){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,textAlign:"right",children:e.amount}),(0,o.createComponentVNode)(2,c.Table.Cell,{collapsing:!0,children:[(0,o.createComponentVNode)(2,c.Button,{content:"One",disabled:e.amount<1,onClick:function(){return l("Release",{name:e.name,amount:1})}}),(0,o.createComponentVNode)(2,c.Button,{content:"Many",disabled:e.amount<=1,onClick:function(){return l("Release",{name:e.name})}})]})]},t)}))(d.contents)]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Smes=void 0;var o=n(0),r=n(2),a=n(1),c=n(39),i=n(3);t.Smes=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.capacityPercent,s=(d.capacity,d.charge),m=d.inputAttempt,p=d.inputting,C=d.inputLevel,h=d.inputLevelMax,N=d.inputAvailable,V=d.outputAttempt,b=d.outputting,f=d.outputLevel,g=d.outputLevelMax,v=d.outputUsed,k=(u>=100?"good":p&&"average")||"bad",x=(b?"good":s>0&&"average")||"bad";return(0,o.createComponentVNode)(2,i.Window,{width:340,height:350,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:.01*u,ranges:{good:[.5,Infinity],average:[.15,.5],bad:[-Infinity,.15]}})}),(0,o.createComponentVNode)(2,a.Section,{title:"Input",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:m?"sync-alt":"times",selected:m,onClick:function(){return l("tryinput")},children:m?"Auto":"Off"}),children:(0,o.createComponentVNode)(2,a.Box,{color:k,children:(u>=100?"Fully Charged":p&&"Charging")||"Not Charging"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Input",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===C,onClick:function(){return l("input",{target:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===C,onClick:function(){return l("input",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:C/1e3,fillValue:N/1e3,minValue:0,maxValue:h/1e3,step:5,stepPixelSize:4,format:function(e){return(0,c.formatPower)(1e3*e,1)},onDrag:function(e,t){return l("input",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:C===h,onClick:function(){return l("input",{adjust:1e4})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:C===h,onClick:function(){return l("input",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available",children:(0,c.formatPower)(N)})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Output",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output Mode",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:V?"power-off":"times",selected:V,onClick:function(){return l("tryoutput")},children:V?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.Box,{color:x,children:b?"Sending":s>0?"Not Sending":"No Charge"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Output",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===f,onClick:function(){return l("output",{target:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===f,onClick:function(){return l("output",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:f/1e3,minValue:0,maxValue:g/1e3,step:5,stepPixelSize:4,format:function(e){return(0,c.formatPower)(1e3*e,1)},onDrag:function(e,t){return l("output",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:f===g,onClick:function(){return l("output",{adjust:1e4})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:f===g,onClick:function(){return l("output",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Outputting",children:(0,c.formatPower)(v)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SmokeMachine=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.SmokeMachine=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.TankContents,u=(l.isTankLoaded,l.TankCurrentVolume),s=l.TankMaxVolume,m=l.active,p=l.setting,C=(l.screen,l.maxSetting),h=void 0===C?[]:C;return(0,o.createComponentVNode)(2,c.Window,{width:350,height:350,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Dispersal Tank",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:m?"power-off":"times",selected:m,content:m?"On":"Off",onClick:function(){return i("power")}}),children:[(0,o.createComponentVNode)(2,a.ProgressBar,{value:u/s,ranges:{bad:[-Infinity,.3]},children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{initial:0,value:u||0})," / "+s]}),(0,o.createComponentVNode)(2,a.Box,{mt:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Range",children:[1,2,3,4,5].map((function(e){return(0,o.createComponentVNode)(2,a.Button,{selected:p===e,icon:"plus",content:3*e,disabled:h0?"good":"bad",children:h})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{size:1.5,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power output",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.66,Infinity],average:[.33,.66],bad:[-Infinity,.33]},minValue:0,maxValue:1,value:u,children:d+" W"})})})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracking",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Off",selected:0===C,onClick:function(){return i("tracking",{mode:0})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"clock-o",content:"Timed",selected:1===C,onClick:function(){return i("tracking",{mode:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Auto",selected:2===C,disabled:!N,onClick:function(){return i("tracking",{mode:2})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Azimuth",children:[(0===C||1===C)&&(0,o.createComponentVNode)(2,a.NumberInput,{width:"52px",unit:"\xb0",step:1,stepPixelSize:2,minValue:-360,maxValue:720,value:s,onDrag:function(e,t){return i("azimuth",{value:t})}}),1===C&&(0,o.createComponentVNode)(2,a.NumberInput,{width:"80px",unit:"\xb0/m",step:.01,stepPixelSize:1,minValue:-p-.01,maxValue:p+.01,value:m,format:function(e){return(Math.sign(e)>0?"+":"-")+Math.abs(e)},onDrag:function(e,t){return i("azimuth_rate",{value:t})}}),2===C&&(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mt:"3px",children:[s+" \xb0"," (auto)"]})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SpaceHeater=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.SpaceHeater=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:400,height:305,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Power",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject Cell",disabled:!l.hasPowercell||!l.open,onClick:function(){return i("eject")}}),(0,o.createComponentVNode)(2,a.Button,{icon:l.on?"power-off":"times",content:l.on?"On":"Off",selected:l.on,disabled:!l.hasPowercell,onClick:function(){return i("power")}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell",color:!l.hasPowercell&&"bad",children:l.hasPowercell&&(0,o.createComponentVNode)(2,a.ProgressBar,{value:l.powerLevel/100,ranges:{good:[.6,Infinity],average:[.3,.6],bad:[-Infinity,.3]},children:l.powerLevel+"%"})||"None"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Thermostat",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Temperature",children:(0,o.createComponentVNode)(2,a.Box,{fontSize:"18px",color:Math.abs(l.targetTemp-l.currentTemp)>50?"bad":Math.abs(l.targetTemp-l.currentTemp)>20?"average":"good",children:[l.currentTemp,"\xb0C"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Temperature",children:l.open&&(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(l.targetTemp),width:"65px",unit:"\xb0C",minValue:l.minTemp,maxValue:l.maxTemp,onChange:function(e,t){return i("target",{target:t})}})||l.targetTemp+"\xb0C"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mode",children:l.open?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"thermometer-half",content:"Auto",selected:"auto"===l.mode,onClick:function(){return i("mode",{mode:"auto"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fire-alt",content:"Heat",selected:"heat"===l.mode,onClick:function(){return i("mode",{mode:"heat"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fan",content:"Cool",selected:"cool"===l.mode,onClick:function(){return i("mode",{mode:"cool"})}})],4):"Auto"}),(0,o.createComponentVNode)(2,a.LabeledList.Divider)]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SpawnersMenu=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.SpawnersMenu=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.spawners||[];return(0,o.createComponentVNode)(2,c.Window,{title:"Spawners Menu",width:700,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name+" ("+e.amount_left+" left)",level:2,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Jump",onClick:function(){return i("jump",{name:e.name})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Spawn",onClick:function(){return i("spawn",{name:e.name})}})],4),children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,mb:1,fontSize:"20px",children:e.short_desc}),(0,o.createComponentVNode)(2,a.Box,{children:e.flavor_text}),!!e.important_info&&(0,o.createComponentVNode)(2,a.Box,{mt:1,bold:!0,color:"bad",fontSize:"26px",children:e.important_info})]},e.name)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SuitStorageUnit=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.SuitStorageUnit=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.locked,u=l.open,s=l.safeties,m=l.uv_active,p=l.occupied,C=l.suit,h=l.helmet,N=l.mask,V=l.storage;return(0,o.createComponentVNode)(2,c.Window,{width:400,height:305,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[!(!p||!s)&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Biological entity detected in suit chamber. Please remove before continuing with operation."}),m&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Contents are currently being decontaminated. Please wait."})||(0,o.createComponentVNode)(2,a.Section,{title:"Storage",minHeight:"260px",buttons:(0,o.createFragment)([!u&&(0,o.createComponentVNode)(2,a.Button,{icon:d?"unlock":"lock",content:d?"Unlock":"Lock",onClick:function(){return i("lock")}}),!d&&(0,o.createComponentVNode)(2,a.Button,{icon:u?"sign-out-alt":"sign-in-alt",content:u?"Close":"Open",onClick:function(){return i("door")}})],0),children:d&&(0,o.createComponentVNode)(2,a.Box,{mt:6,bold:!0,textAlign:"center",fontSize:"40px",children:[(0,o.createComponentVNode)(2,a.Box,{children:"Unit Locked"}),(0,o.createComponentVNode)(2,a.Icon,{name:"lock"})]})||u&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Helmet",children:(0,o.createComponentVNode)(2,a.Button,{icon:h?"square":"square-o",content:h||"Empty",disabled:!h,onClick:function(){return i("dispense",{item:"helmet"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Suit",children:(0,o.createComponentVNode)(2,a.Button,{icon:C?"square":"square-o",content:C||"Empty",disabled:!C,onClick:function(){return i("dispense",{item:"suit"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mask",children:(0,o.createComponentVNode)(2,a.Button,{icon:N?"square":"square-o",content:N||"Empty",disabled:!N,onClick:function(){return i("dispense",{item:"mask"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Storage",children:(0,o.createComponentVNode)(2,a.Button,{icon:V?"square":"square-o",content:V||"Empty",disabled:!V,onClick:function(){return i("dispense",{item:"storage"})}})})]})||(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"recycle",content:"Decontaminate",disabled:p&&s,textAlign:"center",onClick:function(){return i("uv")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SyndPane=t.StatusPane=t.SyndContractorContent=t.SyndContractor=t.FakeTerminal=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);var i=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={currentIndex:0,currentDisplay:[]},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var c=r.prototype;return c.tick=function(){var e=this.props,t=this.state;t.currentIndex<=e.allMessages.length?(this.setState((function(e){return{currentIndex:e.currentIndex+1}})),t.currentDisplay.push(e.allMessages[t.currentIndex])):(clearTimeout(this.timer),setTimeout(e.onFinished,e.finishedTimeout))},c.componentDidMount=function(){var e=this,t=this.props.linesPerSecond,n=void 0===t?2.5:t;this.timer=setInterval((function(){return e.tick()}),1e3/n)},c.componentWillUnmount=function(){clearTimeout(this.timer)},c.render=function(){return(0,o.createComponentVNode)(2,a.Box,{m:1,children:this.state.currentDisplay.map((function(e){return(0,o.createFragment)([e,(0,o.createVNode)(1,"br")],0,e)}))})},r}(o.Component);t.FakeTerminal=i;t.SyndContractor=function(e,t){return(0,o.createComponentVNode)(2,c.NtosWindow,{width:500,height:600,theme:"syndicate",resizable:!0,children:(0,o.createComponentVNode)(2,c.NtosWindow.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l)})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.data,l=n.act,d=["Recording biometric data...","Analyzing embedded syndicate info...","STATUS CONFIRMED","Contacting syndicate database...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Response received, ack 4851234...","CONFIRM ACC "+Math.round(2e4*Math.random()),"Setting up private accounts...","CONTRACTOR ACCOUNT CREATED","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","CONTRACTS FOUND","WELCOME, AGENT"],s=!!c.error&&(0,o.createComponentVNode)(2,a.Modal,{backgroundColor:"red",children:(0,o.createComponentVNode)(2,a.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:2,children:(0,o.createComponentVNode)(2,a.Icon,{size:4,name:"exclamation-triangle"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:2,grow:1,textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Box,{width:"260px",textAlign:"left",minHeight:"80px",children:c.error}),(0,o.createComponentVNode)(2,a.Button,{content:"Dismiss",onClick:function(){return l("PRG_clear_error")}})]})]})});return c.logged_in?c.logged_in&&c.first_load?(0,o.createComponentVNode)(2,a.Box,{backgroundColor:"rgba(0, 0, 0, 0.8)",minHeight:"525px",children:(0,o.createComponentVNode)(2,i,{allMessages:d,finishedTimeout:3e3,onFinished:function(){return l("PRG_set_first_load_finished")}})}):c.info_screen?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{backgroundColor:"rgba(0, 0, 0, 0.8)",minHeight:"500px",children:(0,o.createComponentVNode)(2,i,{allMessages:["SyndTract v2.0","","We've identified potentional high-value targets that are","currently assigned to your mission area. They are believed","to hold valuable information which could be of immediate","importance to our organisation.","","Listed below are all of the contracts available to you. You","are to bring the specified target to the designated","drop-off, and contact us via this uplink. We will send","a specialised extraction unit to put the body into.","","We want targets alive - but we will sometimes pay slight","amounts if they're not, you just won't recieve the shown","bonus. You can redeem your payment through this uplink in","the form of raw telecrystals, which can be put into your","regular Syndicate uplink to purchase whatever you may need.","We provide you with these crystals the moment you send the","target up to us, which can be collected at anytime through","this system.","","Targets extracted will be ransomed back to the station once","their use to us is fulfilled, with us providing you a small","percentage cut. You may want to be mindful of them","identifying you when they come back. We provide you with","a standard contractor loadout, which will help cover your","identity."],linesPerSecond:10})}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"CONTINUE",color:"transparent",textAlign:"center",onClick:function(){return l("PRG_toggle_info")}})],4):(0,o.createFragment)([s,(0,o.createComponentVNode)(2,u)],0):(0,o.createComponentVNode)(2,a.Section,{minHeight:"525px",children:[(0,o.createComponentVNode)(2,a.Box,{width:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{content:"REGISTER USER",color:"transparent",onClick:function(){return l("PRG_login")}})}),!!c.error&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:c.error})]})};t.SyndContractorContent=l;var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createFragment)([(0,o.createTextVNode)("Contractor Status"),(0,o.createComponentVNode)(2,a.Button,{content:"View Information Again",color:"transparent",mb:0,ml:1,onClick:function(){return c("PRG_toggle_info")}})],4),buttons:(0,o.createComponentVNode)(2,a.Box,{bold:!0,mr:1,children:[i.contract_rep," Rep"]}),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{size:.85,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"TC Available",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Claim",disabled:i.redeemable_tc<=0,onClick:function(){return c("PRG_redeem_TC")}}),children:i.redeemable_tc}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"TC Earned",children:i.earned_tc})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Contracts Completed",children:i.contracts_completed}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Status",children:"ACTIVE"})]})})]})})};t.StatusPane=d;var u=function(e,t){var n=(0,r.useLocalState)(t,"tab",1),c=n[0],i=n[1];return(0,o.createFragment)([(0,o.createComponentVNode)(2,d,{state:e.state}),(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===c,onClick:function(){return i(1)},children:"Contracts"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===c,onClick:function(){return i(2)},children:"Hub"})]}),1===c&&(0,o.createComponentVNode)(2,s),2===c&&(0,o.createComponentVNode)(2,m)],0)};t.SyndPane=u;var s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.contracts||[];return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Available Contracts",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Call Extraction",disabled:!i.ongoing_contract||i.extraction_enroute,onClick:function(){return c("PRG_call_extraction")}}),children:l.map((function(e){if(!i.ongoing_contract||2===e.status){var t=e.status>1;if(!(e.status>=5))return(0,o.createComponentVNode)(2,a.Section,{title:e.target?e.target+" ("+e.target_rank+")":"Invalid Target",level:t?1:2,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,mr:1,children:[e.payout," (+",e.payout_bonus,") TC"]}),(0,o.createComponentVNode)(2,a.Button,{content:t?"Abort":"Accept",disabled:e.extraction_enroute,color:t&&"bad",onClick:function(){return c("PRG_contract"+(t?"_abort":"-accept"),{contract_id:e.id})}})],4),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:e.message}),(0,o.createComponentVNode)(2,a.Grid.Column,{size:.5,children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,mb:1,children:"Dropoff Location:"}),(0,o.createComponentVNode)(2,a.Box,{children:e.dropoff})]})]})},e.target)}}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Dropoff Locator",textAlign:"center",opacity:i.ongoing_contract?100:0,children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:i.dropoff_direction})})],4)},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.contractor_hub_items||[];return(0,o.createComponentVNode)(2,a.Section,{children:l.map((function(e){var t=e.cost?e.cost+" Rep":"FREE",n=-1!==e.limited;return(0,o.createComponentVNode)(2,a.Section,{title:e.name+" - "+t,level:2,buttons:(0,o.createFragment)([n&&(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,mr:1,children:[e.limited," remaining"]}),(0,o.createComponentVNode)(2,a.Button,{content:"Purchase",disabled:i.contract_repl.user.cash),content:h?"FREE":d.price+" cr",onClick:function(){return i("vend",{ref:d.ref})}})})]})};t.Vending=function(e,t){var n,r=(0,a.useBackend)(t),d=(r.act,r.data),u=d.user,s=d.onstation,m=d.product_records,p=void 0===m?[]:m,C=d.coin_records,h=void 0===C?[]:C,N=d.hidden_records,V=void 0===N?[]:N,b=d.stock,f=!1;return d.vending_machine_input?(n=d.vending_machine_input||[],f=!0):(n=[].concat(p,h),d.extended_inventory&&(n=[].concat(n,V))),n=n.filter((function(e){return!!e})),(0,o.createComponentVNode)(2,i.Window,{title:"Vending Machine",width:450,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[!!s&&(0,o.createComponentVNode)(2,c.Section,{title:"User",children:u&&(0,o.createComponentVNode)(2,c.Box,{children:["Welcome, ",(0,o.createVNode)(1,"b",null,u.name,0),","," ",(0,o.createVNode)(1,"b",null,u.job||"Unemployed",0),"!",(0,o.createVNode)(1,"br"),"Your balance is ",(0,o.createVNode)(1,"b",null,[u.cash,(0,o.createTextVNode)(" credits")],0),"."]})||(0,o.createComponentVNode)(2,c.Box,{color:"light-grey",children:["No registered ID card!",(0,o.createVNode)(1,"br"),"Please contact your local HoP!"]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Products",children:(0,o.createComponentVNode)(2,c.Table,{children:n.map((function(e){return(0,o.createComponentVNode)(2,l,{custom:f,product:e,productStock:b[e.name]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VrSleeper=void 0;var o=n(0),r=n(2),a=n(1),c=n(3);t.VrSleeper=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{width:475,height:340,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[!!l.emagged&&(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Safety restraints disabled."})}),(0,o.createComponentVNode)(2,a.Section,{title:"Virtual Avatar",children:l.vr_avatar?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:l.vr_avatar.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:l.vr_avatar.status}),!!l.vr_avatar&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:l.vr_avatar.health/l.vr_avatar.maxhealth,ranges:{good:[.9,Infinity],average:[.7,.8],bad:[-Infinity,.5]}})})]}):"No Virtual Avatar detected"}),(0,o.createComponentVNode)(2,a.Section,{title:"VR Commands",children:[(0,o.createComponentVNode)(2,a.Button,{icon:l.toggle_open?"unlock":"lock",disabled:l.stored 0 && strpos($name, '\\') == false && strpos($name, '/') == false){
- $ext = pathinfo($name, PATHINFO_EXTENSION);
- $mime = $finfo->file($F['tmp_name']);
- if($ext == 'ract' && $mime == 'text/plain')
- $good_files[] = $F;
- }
- }
- $the_count = count($good_files);
- if($the_count > 0 && $the_count < $max_number_of_uploads){
- $tgtgui_path = $tgdir . $path_to_tgui_from_repo;
- $requests_dir = $parent_dir . '/requests';
- if(!is_dir($requests_dir))
- mkdir($requests_dir);
- $target_path = str_replace('\\', '/', tempnam($requests_dir, 'tgui'));
- unlink($target_path);
- recurse_copy($tgtgui_path, $target_path);
- $parent_node = $parent_dir . '/node_modules';
- $target_node = $target_path . '/node_modules';
- exec('mklink /j "' . str_replace('/', '\\', $target_node) . '" "' . str_replace('/', '\\', $parent_node) . '"');
-
- //now copy the uploads to the thing
- $target_interfaces = $target_path . '/src/interfaces/';
- foreach($good_files as $F){
- $target_name = $target_interfaces . $F['name'];
- if(file_exists($target_name))
- unlink($target_name); //remove the file
- move_uploaded_file($F['tmp_name'], $target_name);
- }
-
- //compile
- $command = '"' . $full_path_to_gulp . '" --cwd "' . str_replace('/', '\\', $target_path) . '" --min 2>&1';
- $output = shell_exec($command);
-
- $zip = new ZipArchive();
- $zippath = $target_path . '/TGUI.zip';
- if($zip->open($zippath, ZipArchive::CREATE) == TRUE){
- $zip->addFile($target_path . '/assets/tgui.css', 'tgui.css');
- $zip->addFile($target_path . '/assets/tgui.js', 'tgui.js');
- $zip->addFromString('gulp_output.txt', $output);
- $zip->close();
- download_file($zippath);
- }
- else
- $error = 'Unable to create output zipfile!';
- exec('rmdir "' . str_replace('/', '\\', $target_node) . '"'); //improtant
- rrmdir($target_path);
- }
- else if(!$updated_git)
- throw new RuntimeException('No valid files uploaded!');
- }
-}
-catch(Exception $e){
- $error = $e->getMessage();
-}
-
-?>
-
-
-
- TGUI .ract Compiler
-
-
- An error occured: ' . $error . ' '; ?>
- Upload up to .ract files
- Based off revision: ' . $revision . '' : $revision; ?>
-
-
-
-
-
diff --git a/tools/WebhookProcessor/github_webhook_processor.php b/tools/WebhookProcessor/github_webhook_processor.php
index b2bcaeb884..035d777feb 100644
--- a/tools/WebhookProcessor/github_webhook_processor.php
+++ b/tools/WebhookProcessor/github_webhook_processor.php
@@ -5,11 +5,13 @@
* For documentation on the changelog generator see https://tgstation13.org/phpBB/viewtopic.php?f=5&t=5157
* To hide prs from being announced in game, place a [s] in front of the title
* All runtime errors are echo'ed to the webhook's logs in github
+ * Events to be sent via GitHub webhook: Pull Requests, Pushes
+ * Any other Event will result in a 404 returned to the webhook.
*/
/**CREDITS:
* GitHub webhook handler template.
- *
+ *
* @see https://developer.github.com/webhooks/
* @author Miloslav Hula (https://github.com/milo)
*/
@@ -23,6 +25,7 @@ define('F_UNVALIDATED_USER', 1<<0);
define('F_SECRET_PR', 1<<1);
//CONFIGS ARE IN SECRET.PHP, THESE ARE JUST DEFAULTS!
+
$hookSecret = '08ajh0qj93209qj90jfq932j32r';
$apiKey = '209ab8d879c0f987d06a09b9d879c0f987d06a09b9d8787d0a089c';
$repoOwnerAndName = "tgstation/tgstation";
@@ -32,7 +35,7 @@ $path_to_script = 'tools/WebhookProcessor/github_webhook_processor.php';
$tracked_branch = "master";
$trackPRBalance = true;
$prBalanceJson = '';
-$startingPRBalance = 5;
+$startingPRBalance = 30;
$maintainer_team_id = 133041;
$validation = "org";
$validation_count = 1;
@@ -123,24 +126,24 @@ switch (strtolower($_SERVER['HTTP_X_GITHUB_EVENT'])) {
function apisend($url, $method = 'GET', $content = null, $authorization = null) {
if (is_array($content))
$content = json_encode($content);
-
+
$headers = array();
$headers[] = 'Content-type: application/json';
if ($authorization)
$headers[] = 'Authorization: ' . $authorization;
-
+
$scontext = array('http' => array(
'method' => $method,
'header' => implode("\r\n", $headers),
'ignore_errors' => true,
'user_agent' => 'tgstation13.org-Github-Automation-Tools'
));
-
+
if ($content)
$scontext['http']['content'] = $content;
-
+
return file_get_contents($url, false, stream_context_create($scontext));
-
+
}
function github_apisend($url, $method = 'GET', $content = NULL) {
@@ -175,7 +178,7 @@ function validate_user($payload) {
$res = github_apisend('https://api.github.com/search/issues?q='.$querystring);
$res = json_decode($res, TRUE);
return $res['total_count'] >= (int)$validation_count;
-
+
}
function get_labels($payload){
@@ -224,7 +227,7 @@ function tag_pr($payload, $opened) {
sleep(10);
$payload['pull_request'] = json_decode(github_apisend($url), TRUE);
}
-
+
$tags = array();
$title = $payload['pull_request']['title'];
if($opened) { //you only have one shot on these ones so as to not annoy maintainers
@@ -232,7 +235,7 @@ function tag_pr($payload, $opened) {
if(strpos(strtolower($title), 'refactor') !== FALSE)
$tags[] = 'Refactor';
-
+
if(strpos(strtolower($title), 'revert') !== FALSE)
$tags[] = 'Revert';
if(strpos(strtolower($title), 'removes') !== FALSE)
@@ -299,7 +302,7 @@ function check_ready_for_review($payload, $labels = null, $remove = array()){
if($L == $r4rlabel)
$has_label_already = true;
}
-
+
if($has_label_already && $should_not_have_label){
$remove[] = $r4rlabel;
return $returned;
@@ -337,7 +340,7 @@ function check_ready_for_review($payload, $labels = null, $remove = array()){
//make sure they are part of an offending review
if(!in_array($C['pull_request_review_id'], $reviews_ids_with_changes_requested))
continue;
-
+
//review comments which are outdated have a null position
if($C['position'] !== null){
if($has_label_already)
@@ -360,10 +363,10 @@ function check_dismiss_changelog_review($payload){
if(!$require_changelog)
return;
-
+
if(!$no_changelog)
checkchangelog($payload, false);
-
+
$review_message = 'Your changelog for this PR is either malformed or non-existent. Please create one to document your changes.';
$reviews = get_reviews($payload);
@@ -392,14 +395,12 @@ function handle_pr($payload) {
set_labels($payload, $labels, $remove);
if($no_changelog)
check_dismiss_changelog_review($payload);
- /*
if(get_pr_code_friendliness($payload) <= 0){
$balances = pr_balances();
$author = $payload['pull_request']['user']['login'];
if(isset($balances[$author]) && $balances[$author] < 0 && !is_maintainer($payload, $author))
create_comment($payload, 'You currently have a negative Fix/Feature pull request delta of ' . $balances[$author] . '. Maintainers may close this PR at will. Fixing issues or improving the codebase will improve this score.');
}
- */
break;
case 'edited':
check_dismiss_changelog_review($payload);
@@ -426,8 +427,8 @@ function handle_pr($payload) {
break;
default:
return;
- }
-
+ }
+
$pr_flags = 0;
if (strpos(strtolower($payload['pull_request']['title']), '[s]') !== false) {
$pr_flags |= F_SECRET_PR;
@@ -437,7 +438,7 @@ function handle_pr($payload) {
}
discord_announce($action, $payload, $pr_flags);
game_announce($action, $payload, $pr_flags);
-
+
}
function filter_announce_targets($targets, $owner, $repo, $action, $pr_flags) {
@@ -446,7 +447,7 @@ function filter_announce_targets($targets, $owner, $repo, $action, $pr_flags) {
unset($targets[$i]);
continue;
}
-
+
if (isset($target['announce_secret']) && $target['announce_secret']) {
if (!($pr_flags & F_SECRET_PR) && $target['announce_secret'] === 'only') {
unset($targets[$i]);
@@ -456,7 +457,7 @@ function filter_announce_targets($targets, $owner, $repo, $action, $pr_flags) {
unset($targets[$i]);
continue;
}
-
+
if (isset($target['announce_unvalidated']) && $target['announce_unvalidated']) {
if (!($pr_flags & F_UNVALIDATED_USER) && $target['announce_unvalidated'] === 'only') {
unset($targets[$i]);
@@ -466,7 +467,7 @@ function filter_announce_targets($targets, $owner, $repo, $action, $pr_flags) {
unset($targets[$i]);
continue;
}
-
+
$wildcard = false;
if (isset($target['include_repos'])) {
foreach ($target['include_repos'] as $match_string) {
@@ -489,7 +490,7 @@ function filter_announce_targets($targets, $owner, $repo, $action, $pr_flags) {
continue;
}
}
-
+
if (isset($target['exclude_repos']))
foreach ($target['exclude_repos'] as $match_string) {
$owner_repo_pair = explode('/', strtolower($match_string));
@@ -516,13 +517,13 @@ function filter_announce_targets($targets, $owner, $repo, $action, $pr_flags) {
function game_announce($action, $payload, $pr_flags) {
global $servers;
-
+
$msg = '['.$payload['pull_request']['base']['repo']['full_name'].'] Pull Request '.$action.' by '.htmlSpecialChars($payload['sender']['login']).': '.htmlSpecialChars('#'.$payload['pull_request']['number'].' '.$payload['pull_request']['user']['login'].' - '.$payload['pull_request']['title']).' ';
$game_servers = filter_announce_targets($servers, $payload['pull_request']['base']['repo']['owner']['login'], $payload['pull_request']['base']['repo']['name'], $action, $pr_flags);
-
+
$msg = '?announce='.urlencode($msg).'&payload='.urlencode(json_encode($payload));
-
+
foreach ($game_servers as $serverid => $server) {
$server_message = $msg;
if (isset($server['comskey']))
@@ -553,9 +554,9 @@ function discord_announce($action, $payload, $pr_flags) {
'username' => 'GitHub',
'avatar_url' => $payload['pull_request']['base']['user']['avatar_url'],
);
-
+
$content = 'Pull Request #'.$payload['pull_request']['number'].' *'.$action.'* by '.discord_sanitize($payload['sender']['login'])."\n".discord_sanitize($payload['pull_request']['user']['login']).' - __**'.discord_sanitize($payload['pull_request']['title']).'**__'."\n".'<'.$payload['pull_request']['html_url'].'>';
-
+
$embeds = array(
array(
'title' => '__**'.discord_sanitize($payload['pull_request']['title'], S_MARKDOWN).'**__',
@@ -585,22 +586,22 @@ function discord_announce($action, $payload, $pr_flags) {
}
discord_webhook_send($discordWebHook['url'], $sending_data);
}
-
+
}
-function discord_sanitize($text, $flags = S_MENTIONS|S_LINK_EMBED|S_MARKDOWN) {
+function discord_sanitize($text, $flags = S_MENTIONS|S_LINK_EMBED|S_MARKDOWN) {
if ($flags & S_MARKDOWN)
$text = str_ireplace(array('\\', '*', '_', '~', '`', '|'), (array('\\\\', '\\*', '\\_', '\\~', '\\`', '\\|')), $text);
-
+
if ($flags & S_HTML_COMMENTS)
$text = preg_replace('//Uis', '', $text);
-
+
if ($flags & S_MENTIONS)
$text = str_ireplace(array('@everyone', '@here', '<@'), array('`@everyone`', '`@here`', '@<'), $text);
if ($flags & S_LINK_EMBED)
$text = preg_replace("/((https?|ftp|byond)\:\/\/)([a-z0-9-.]*)\.([a-z]{2,3})(\:[0-9]{2,5})?(\/(?:[a-z0-9+\$_-]\.?)+)*\/?(\?[a-z+&\$_.-][a-z0-9;:@&%=+\/\$_.-]*)?(#[a-z_.-][a-z0-9+\$_.-]*)?/mi", '<$0>', $text);
-
+
return $text;
}
@@ -642,36 +643,40 @@ function get_pr_code_friendliness($payload, $oldbalance = null){
$labels = get_pr_labels_array($payload);
//anything not in this list defaults to 0
$label_values = array(
- 'Fix' => 2,
- 'Refactor' => 2,
- 'CI/Tests' => 3,
- 'Code Improvement' => 1,
+ 'Fix' => 3,
+ 'Refactor' => 10,
+ 'Code Improvement' => 2,
'Grammar and Formatting' => 1,
- 'Priority: High' => 4,
- 'Priority: CRITICAL' => 5,
+ 'Priority: High' => 15,
+ 'Priority: CRITICAL' => 20,
+ 'Unit Tests' => 6,
'Logging' => 1,
- 'Feedback' => 1,
- 'Performance' => 3,
- 'Feature' => -1,
- 'Balance/Rebalance' => -1,
- 'PRB: Reset' => $startingPRBalance - $oldbalance,
+ 'Feedback' => 2,
+ 'Performance' => 12,
+ 'Feature' => -10,
+ 'Balance/Rebalance' => -8,
+ 'Tweak' => -2,
+ 'Sound' => 1,
+ 'Sprites' => 1,
+ 'GBP: Reset' => $startingPRBalance - $oldbalance,
);
- $affecting = 0;
- $is_neutral = FALSE;
- $found_something_positive = false;
+ $maxNegative = 0;
+ $maxPositive = 0;
foreach($labels as $l){
- if($l == 'PRB: No Update') { //no effect on balance
- $affecting = 0;
- break;
+ if($l == 'GBP: No Update') { //no effect on balance
+ return 0;
}
else if(isset($label_values[$l])) {
$friendliness = $label_values[$l];
if($friendliness > 0)
- $found_something_positive = true;
- $affecting = $found_something_positive ? max($affecting, $friendliness) : $friendliness;
+ $maxPositive = max($friendliness, $maxPositive);
+ else
+ $maxNegative = min($friendliness, $maxNegative);
}
}
+
+ $affecting = abs($maxNegative) >= $maxPositive ? $maxNegative : $maxPositive;
return $affecting;
}
@@ -802,7 +807,7 @@ function checkchangelog($payload, $compile = true) {
}
if (!$incltag)
continue;
-
+
$firstword = explode(' ', $line)[0];
$pos = strpos($line, " ");
$item = '';
@@ -812,7 +817,7 @@ function checkchangelog($payload, $compile = true) {
} else {
$firstword = $line;
}
-
+
if (!strlen($firstword)) {
$currentchangelogblock[count($currentchangelogblock)-1]['body'] .= "\n";
continue;
@@ -930,7 +935,7 @@ function checkchangelog($payload, $compile = true) {
case 'server':
if($item != 'something server ops should know')
$currentchangelogblock[] = array('type' => 'server', 'body' => $item);
- break;
+ break;
default:
//we add it to the last changelog entry as a separate line
if (count($currentchangelogblock) > 0)
@@ -966,11 +971,11 @@ function checkchangelog($payload, $compile = true) {
function game_server_send($addr, $port, $str) {
// All queries must begin with a question mark (ie "?players")
- if($str{0} != '?') $str = ('?' . $str);
-
+ if($str[0] != '?') $str = ('?' . $str);
+
/* --- Prepare a packet to send to the server (based on a reverse-engineered packet structure) --- */
$query = "\x00\x83" . pack('n', strlen($str) + 6) . "\x00\x00\x00\x00\x00" . $str . "\x00";
-
+
/* --- Create a socket and connect it to the server --- */
$server = socket_create(AF_INET,SOCK_STREAM,SOL_TCP) or exit("ERROR");
socket_set_option($server, SOL_SOCKET, SO_SNDTIMEO, array('sec' => 2, 'usec' => 0)); //sets connect and send timeout to 2 seconds
@@ -978,7 +983,7 @@ function game_server_send($addr, $port, $str) {
return "ERROR: Connection failed";
}
-
+
/* --- Send bytes to the server. Loop until all bytes have been sent --- */
$bytestosend = strlen($query);
$bytessent = 0;
@@ -986,33 +991,33 @@ function game_server_send($addr, $port, $str) {
//echo $bytessent.' ';
$result = socket_write($server,substr($query,$bytessent),$bytestosend-$bytessent);
//echo 'Sent '.$result.' bytes ';
- if ($result===FALSE)
+ if ($result===FALSE)
return "ERROR: " . socket_strerror(socket_last_error());
$bytessent += $result;
}
-
+
/* --- Idle for a while until recieved bytes from game server --- */
$result = socket_read($server, 10000, PHP_BINARY_READ);
socket_close($server); // we don't need this anymore
-
+
if($result != "") {
- if($result{0} == "\x00" || $result{1} == "\x83") { // make sure it's the right packet format
-
+ if($result[0] == "\x00" || $result[1] == "\x83") { // make sure it's the right packet format
+
// Actually begin reading the output:
- $sizebytes = unpack('n', $result{2} . $result{3}); // array size of the type identifier and content
+ $sizebytes = unpack('n', $result[2] . $result[3]); // array size of the type identifier and content
$size = $sizebytes[1] - 1; // size of the string/floating-point (minus the size of the identifier byte)
-
- if($result{4} == "\x2a") { // 4-byte big-endian floating-point
- $unpackint = unpack('f', $result{5} . $result{6} . $result{7} . $result{8}); // 4 possible bytes: add them up together, unpack them as a floating-point
+
+ if($result[4] == "\x2a") { // 4-byte big-endian floating-point
+ $unpackint = unpack('f', $result[5] . $result[6] . $result[7] . $result[8]); // 4 possible bytes: add them up together, unpack them as a floating-point
return $unpackint[1];
}
- else if($result{4} == "\x06") { // ASCII string
+ else if($result[4] == "\x06") { // ASCII string
$unpackstr = ""; // result string
$index = 5; // string index
-
+
while($size > 0) { // loop through the entire ASCII string
$size--;
- $unpackstr .= $result{$index}; // add the string position to return string
+ $unpackstr .= $result[$index]; // add the string position to return string
$index++;
}
return $unpackstr;
diff --git a/tools/WebhookProcessor/secret.php b/tools/WebhookProcessor/secret.php
index 9d1dc5a903..02dad3d627 100644
--- a/tools/WebhookProcessor/secret.php
+++ b/tools/WebhookProcessor/secret.php
@@ -1,6 +1,6 @@
indentation detected"
+# st=1
+# fi;
nl='
'
nl=$'\n'
@@ -45,9 +65,13 @@ while read f; do
t=$(tail -c2 "$f"; printf x); r1="${nl}$"; r2="${nl}${r1}"
if [[ ! ${t%x} =~ $r1 ]]; then
echo "file $f is missing a trailing newline"
- #st=1
+ st=1
fi;
done < <(find . -type f -name '*.dm')
+# if grep -P '^/[\w/]\S+\(.*(var/|, ?var/.*).*\)' code/**/*.dm; then
+# echo "changed files contains proc argument starting with 'var'"
+# st=1 # annoy the coders instead of causing it to fail
+# fi;
if grep -i 'centcomm' code/**/*.dm; then
echo "ERROR: Misspelling(s) of CENTCOM detected in code, please remove the extra M(s)."
st=1
@@ -56,6 +80,14 @@ if grep -i 'centcomm' _maps/**/*.dmm; then
echo "ERROR: Misspelling(s) of CENTCOM detected in maps, please remove the extra M(s)."
st=1
fi;
+if grep -ni 'nanotransen' code/**/*.dm; then
+ echo "Misspelling(s) of nanotrasen detected in code, please remove the extra N(s)."
+ st=1
+fi;
+if grep -ni 'nanotransen' _maps/**/*.dmm; then
+ echo "Misspelling(s) of nanotrasen detected in maps, please remove the extra N(s)."
+ st=1
+fi;
if ls _maps/*.json | grep -P "[A-Z]"; then
echo "Uppercase in a map json detected, these must be all lowercase."
st=1
diff --git a/tools/travis/travis_config.txt b/tools/ci/ci_config.txt
similarity index 82%
rename from tools/travis/travis_config.txt
rename to tools/ci/ci_config.txt
index ff6bf9a793..4925d781bb 100644
--- a/tools/travis/travis_config.txt
+++ b/tools/ci/ci_config.txt
@@ -1,7 +1,7 @@
SQL_ENABLED
ADDRESS 127.0.0.1
PORT 3306
-FEEDBACK_DATABASE tg_travis
+FEEDBACK_DATABASE tg_ci
FEEDBACK_TABLEPREFIX
FEEDBACK_LOGIN root
FEEDBACK_PASSWORD
diff --git a/tools/travis/dm.sh b/tools/ci/dm.sh
similarity index 100%
rename from tools/travis/dm.sh
rename to tools/ci/dm.sh
diff --git a/tools/appveyor/download_byond.sh b/tools/ci/download_byond.sh
old mode 100644
new mode 100755
similarity index 100%
rename from tools/appveyor/download_byond.sh
rename to tools/ci/download_byond.sh
diff --git a/tools/travis/install_build_tools.sh b/tools/ci/install_build_tools.sh
similarity index 88%
rename from tools/travis/install_build_tools.sh
rename to tools/ci/install_build_tools.sh
index c36cd571ba..6c3e267fca 100755
--- a/tools/travis/install_build_tools.sh
+++ b/tools/ci/install_build_tools.sh
@@ -10,5 +10,3 @@ npm install --global yarn
pip3 install --user PyYaml
pip3 install --user beautifulsoup4
-
-phpenv global $PHP_VERSION
diff --git a/tools/travis/install_byond.sh b/tools/ci/install_byond.sh
similarity index 100%
rename from tools/travis/install_byond.sh
rename to tools/ci/install_byond.sh
diff --git a/tools/ci/install_rust_g.sh b/tools/ci/install_rust_g.sh
new file mode 100755
index 0000000000..2309f9d952
--- /dev/null
+++ b/tools/ci/install_rust_g.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+source dependencies.sh
+
+mkdir -p ~/.byond/bin
+wget -O ~/.byond/bin/librust_g.so "https://github.com/tgstation/rust-g/releases/download/$RUST_G_VERSION/librust_g.so"
+chmod +x ~/.byond/bin/librust_g.so
+ldd ~/.byond/bin/librust_g.so
diff --git a/tools/ci/install_spaceman_dmm.sh b/tools/ci/install_spaceman_dmm.sh
new file mode 100755
index 0000000000..d92dca4e95
--- /dev/null
+++ b/tools/ci/install_spaceman_dmm.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+set -euo pipefail
+
+source dependencies.sh
+
+if [ ! -f ~/$1 ]; then
+ mkdir -p "$HOME/SpacemanDMM"
+ CACHEFILE="$HOME/SpacemanDMM/$1"
+
+ if ! [ -f "$CACHEFILE.version" ] || ! grep -Fxq "$SPACEMAN_DMM_VERSION" "$CACHEFILE.version"; then
+ wget -O "$CACHEFILE" "https://github.com/SpaceManiac/SpacemanDMM/releases/download/$SPACEMAN_DMM_VERSION/$1"
+ chmod +x "$CACHEFILE"
+ echo "$SPACEMAN_DMM_VERSION" >"$CACHEFILE.version"
+ fi
+
+ ln -s "$CACHEFILE" ~/$1
+fi
+
+~/$1 --version
diff --git a/tools/ci/run_server.sh b/tools/ci/run_server.sh
new file mode 100755
index 0000000000..46172abc66
--- /dev/null
+++ b/tools/ci/run_server.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+set -euo pipefail
+
+tools/deploy.sh ci_test
+rm ci_test/*.dll
+mkdir ci_test/config
+
+#test config
+cp tools/ci/ci_config.txt ci_test/config/config.txt
+
+#throw extools into ldd
+cp libbyond-extools.so ~/.byond/bin/libbyond-extools.so
+chmod +x ~/.byond/bin/libbyond-extools.so
+ldd ~/.byond/bin/libbyond-extools.so
+
+cd ci_test
+DreamDaemon tgstation.dmb -close -trusted -verbose -params "log-directory=ci"
+cd ..
+cat ci_test/data/logs/ci/clean_run.lk
diff --git a/tools/travis/template_dm_generator.py b/tools/ci/template_dm_generator.py
similarity index 100%
rename from tools/travis/template_dm_generator.py
rename to tools/ci/template_dm_generator.py
diff --git a/tools/travis/build_bsql.sh b/tools/travis/build_bsql.sh
deleted file mode 100755
index e2b281efc6..0000000000
--- a/tools/travis/build_bsql.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-set -euo pipefail
-
-source dependencies.sh
-
-mkdir -p BSQL
-cd BSQL
-git init
-git remote add origin https://github.com/tgstation/BSQL
-git fetch --depth 1 origin $BSQL_VERSION
-git checkout FETCH_HEAD
-
-mkdir -p artifacts
-cd artifacts
-export CXX=g++-7
-# The -D will be unnecessary past BSQL v1.4.0.0
-cmake .. -DMARIA_LIBRARY=/usr/lib/i386-linux-gnu/libmariadb.so
-make
-
-mkdir -p ~/.byond/bin
-ln -s $PWD/src/BSQL/libBSQL.so ../../libBSQL.so
diff --git a/tools/travis/check_line_endings.py b/tools/travis/check_line_endings.py
deleted file mode 100644
index fbbbc41426..0000000000
--- a/tools/travis/check_line_endings.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import sys
-import glob
-
-WINDOWS_NEWLINE = b'\r\n'
-
-FILES_TO_READ = []
-FILES_TO_READ.extend(glob.glob(r"**/*.dm", recursive=True))
-FILES_TO_READ.extend(glob.glob(r"**/*.dmm", recursive=True))
-FILES_TO_READ.extend(glob.glob(r"*.dme"))
-#for i in FILES_TO_READ:
-# if os.path.isdir(i):
-# FILES_TO_READ.remove(i)
-
-def _reader(filepath):
- data = open(filepath, "rb")
- return data
-
-def main():
- filelist = []
- foundfiles = False
-
- for file in FILES_TO_READ:
- data = _reader(file)
- lines = data.readlines()
- for line in lines:
- if line.endswith(WINDOWS_NEWLINE):
- filelist.append(file)
- foundfiles = True
- break
- data.close()
-
- if not foundfiles:
- print("No CRLF files found.")
- sys.exit(0)
- else:
- print("Found files with suspected CRLF type.")
- for i in filelist:
- print(i)
- sys.exit(1)
-
-
-
-if __name__ == "__main__":
- main()
diff --git a/tools/travis/install_libmariadb.sh b/tools/travis/install_libmariadb.sh
deleted file mode 100755
index d0ce4adc14..0000000000
--- a/tools/travis/install_libmariadb.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-set -euo pipefail
-
-# get libmariadb, cache it so limmex doesn't get angery
-if [ -f $HOME/libmariadb ]; then
- #travis likes to interpret the cache command as it being a file for some reason
- rm $HOME/libmariadb
-fi
-mkdir -p $HOME/libmariadb
-if [ ! -f $HOME/libmariadb/libmariadb.so ]; then
- wget http://www.byond.com/download/db/mariadb_client-2.0.0-linux.tgz
- tar -xvf mariadb_client-2.0.0-linux.tgz
- mv mariadb_client-2.0.0-linux/libmariadb.so $HOME/libmariadb/libmariadb.so
- rm -rf mariadb_client-2.0.0-linux.tgz mariadb_client-2.0.0-linux
-fi
diff --git a/tools/travis/install_rust_g.sh b/tools/travis/install_rust_g.sh
deleted file mode 100755
index 227034af66..0000000000
--- a/tools/travis/install_rust_g.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env bash
-set -euo pipefail
-
-source dependencies.sh
-
-mkdir -p ~/.byond/bin
-wget -O ~/.byond/bin/rust_g "https://github.com/tgstation/rust-g/releases/download/$RUST_G_VERSION/librust_g.so"
-chmod +x ~/.byond/bin/rust_g
diff --git a/tools/travis/install_spaceman_dmm.sh b/tools/travis/install_spaceman_dmm.sh
deleted file mode 100755
index 39464193f8..0000000000
--- a/tools/travis/install_spaceman_dmm.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-set -euo pipefail
-
-source dependencies.sh
-
-wget -O ~/$1 "https://github.com/SpaceManiac/SpacemanDMM/releases/download/$SPACEMAN_DMM_VERSION/$1"
-chmod +x ~/$1
-~/$1 --version
diff --git a/tools/travis/run_server.sh b/tools/travis/run_server.sh
deleted file mode 100755
index 04c491cd5c..0000000000
--- a/tools/travis/run_server.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-set -euo pipefail
-
-tools/deploy.sh travis_test
-rm travis_test/*.dll
-mkdir travis_test/config
-
-#test config
-cp tools/travis/travis_config.txt travis_test/config/config.txt
-
-cd travis_test
-ln -s $HOME/libmariadb/libmariadb.so libmariadb.so
-DreamDaemon tgstation.dmb -close -trusted -verbose -params "test-run&log-directory=travis"
-cd ..
-cat travis_test/data/logs/travis/clean_run.lk