From 2087d71517f0049956610fb0abcf5bfc658c2b55 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 12:33:40 +0100 Subject: [PATCH 001/266] Ports improved unit tests from TG --- .github/alternate_byond_versions.txt | 8 + .github/workflows/ci_suite.yml | 289 ++++++++++++++++++ .github/workflows/continuous_integration.yml | 139 --------- .github/workflows/rerun_flaky_tests.yml | 31 ++ .github/workflows/run_integration_tests.yml | 80 +++++ .../show_screenshot_test_results.yml | 43 +++ tools/ci/install_byond.sh | 5 +- 7 files changed, 455 insertions(+), 140 deletions(-) create mode 100644 .github/alternate_byond_versions.txt create mode 100644 .github/workflows/ci_suite.yml delete mode 100644 .github/workflows/continuous_integration.yml create mode 100644 .github/workflows/rerun_flaky_tests.yml create mode 100644 .github/workflows/run_integration_tests.yml create mode 100644 .github/workflows/show_screenshot_test_results.yml diff --git a/.github/alternate_byond_versions.txt b/.github/alternate_byond_versions.txt new file mode 100644 index 0000000000000..e1496d438cdc4 --- /dev/null +++ b/.github/alternate_byond_versions.txt @@ -0,0 +1,8 @@ +# This file contains extra tests to run for specific BYOND versions. +# This is useful for making sure we maintain compatibility with both older and newer versions, +# while still having our main tests run on a guaranteed pinned version. + +# Format is version: map +# Example: +# 500.1337: runtimestation +515.1627: runtimestation diff --git a/.github/workflows/ci_suite.yml b/.github/workflows/ci_suite.yml new file mode 100644 index 0000000000000..dfd3fd372f2bc --- /dev/null +++ b/.github/workflows/ci_suite.yml @@ -0,0 +1,289 @@ +name: CI Suite +on: + push: + branches: + - master + - 'project/**' + - 'gh-readonly-queue/master/**' + - 'gh-readonly-queue/project/**' + pull_request: + branches: + - master + - 'project/**' + merge_group: + branches: + - master + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + run_linters: + if: ( !contains(github.event.head_commit.message, '[ci skip]') ) + name: Run Linters + runs-on: ubuntu-22.04 + timeout-minutes: 5 + + steps: + - uses: actions/checkout@v4 + - name: Restore SpacemanDMM cache + uses: actions/cache@v4 + with: + path: ~/SpacemanDMM + key: ${{ runner.os }}-spacemandmm-${{ hashFiles('dependencies.sh') }} + restore-keys: | + ${{ runner.os }}-spacemandmm- + - name: Restore Yarn cache + uses: actions/cache@v4 + with: + path: tgui/.yarn/cache + key: ${{ runner.os }}-yarn-${{ hashFiles('tgui/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: Restore Node cache + uses: actions/cache@v4 + with: + path: ~/.nvm + key: ${{ runner.os }}-node-${{ hashFiles('dependencies.sh') }} + restore-keys: | + ${{ runner.os }}-node- + - name: Restore Bootstrap cache + uses: actions/cache@v4 + with: + path: tools/bootstrap/.cache + key: ${{ runner.os }}-bootstrap-${{ hashFiles('tools/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-bootstrap- + - name: Restore Rust cache + uses: actions/cache@v4 + with: + path: ~/.cargo + key: ${{ runner.os }}-rust-${{ hashFiles('tools/ci/ci_dependencies.sh')}} + restore-keys: | + ${{ runner.os }}-rust- + - name: Restore Cutter cache + uses: actions/cache@v4 + with: + path: tools/icon_cutter/cache + key: ${{ runner.os }}-cutter-${{ hashFiles('dependencies.sh') }} + - name: Install OpenDream + uses: robinraju/release-downloader@v1.9 + with: + repository: "OpenDreamProject/OpenDream" + tag: "latest" + fileName: "DMCompiler_linux-x64.tar.gz" + extract: true + - name: Install Tools + run: | + pip3 install setuptools + bash tools/ci/install_node.sh + bash tools/ci/install_spaceman_dmm.sh dreamchecker + bash tools/ci/install_ripgrep.sh + tools/bootstrap/python -c '' + - name: Give Linters A Go + id: linter-setup + run: ':' + - name: Run Grep Checks + if: steps.linter-setup.conclusion == 'success' && !cancelled() + run: bash tools/ci/check_grep.sh + - name: Ticked File Enforcement + if: steps.linter-setup.conclusion == 'success' && !cancelled() + run: | + tools/bootstrap/python tools/ticked_file_enforcement/ticked_file_enforcement.py < tools/ticked_file_enforcement/schemas/beestation_dme.json + tools/bootstrap/python tools/ticked_file_enforcement/ticked_file_enforcement.py < tools/ticked_file_enforcement/schemas/unit_tests.json + - name: Check Define Sanity + if: steps.linter-setup.conclusion == 'success' && !cancelled() + run: tools/bootstrap/python -m define_sanity.check + - name: Check Trait Validity + if: steps.linter-setup.conclusion == 'success' && !cancelled() + run: tools/bootstrap/python -m trait_validity.check + - name: Run DreamChecker + if: steps.linter-setup.conclusion == 'success' && !cancelled() + shell: bash + run: ~/dreamchecker 2>&1 | bash tools/ci/annotate_dm.sh + - name: Run OpenDream + if: steps.linter-setup.conclusion == 'success' && !cancelled() + run: ./DMCompiler_linux-x64/DMCompiler beestation.dme --suppress-unimplemented --define=CIBUILDING | bash tools/ci/annotate_od.sh + - name: Run Map Checks + if: steps.linter-setup.conclusion == 'success' && !cancelled() + run: | + tools/bootstrap/python -m mapmerge2.dmm_test + tools/bootstrap/python -m tools.maplint.source + - name: Check Cutter + if: steps.linter-setup.conclusion == 'success' && !cancelled() + run: tools/bootstrap/python -m tools.icon_cutter.check + - name: Run DMI Tests + if: steps.linter-setup.conclusion == 'success' && !cancelled() + run: tools/bootstrap/python -m dmi.test + - name: Check File Directories + if: steps.linter-setup.conclusion == 'success' && !cancelled() + run: bash tools/ci/check_filedirs.sh beestation.dme + - name: Check Changelogs + if: steps.linter-setup.conclusion == 'success' && !cancelled() + run: bash tools/ci/check_changelogs.sh + - name: Check Miscellaneous Files + if: steps.linter-setup.conclusion == 'success' && !cancelled() + run: bash tools/ci/check_misc.sh + - name: Run TGUI Checks + if: steps.linter-setup.conclusion == 'success' && !cancelled() + run: tools/build/build --ci lint tgui-test + + compile_all_maps: + if: ( !contains(github.event.head_commit.message, '[ci skip]') ) + name: Compile Maps + needs: [collect_data] + runs-on: ubuntu-22.04 + timeout-minutes: 5 + + steps: + - uses: actions/checkout@v4 + - name: Restore BYOND cache + uses: actions/cache@v4 + with: + path: ~/BYOND + key: ${{ runner.os }}-byond-${{ hashFiles('dependencies.sh') }} + - name: Compile All Maps + run: | + bash tools/ci/install_byond.sh + source $HOME/BYOND/byond/bin/byondsetup + tools/build/build --ci dm -DCIBUILDING -DCITESTING -DALL_MAPS + - name: Check client Compatibility + uses: beestation/byond-client-compatibility-check@v3 + with: + dmb-location: beestation.dmb + max-required-client-version: ${{needs.collect_data.outputs.max_required_byond_client}} + + collect_data: + if: ( !contains(github.event.head_commit.message, '[ci skip]') ) + name: Collect data for other tasks + runs-on: ubuntu-22.04 + timeout-minutes: 5 + outputs: + maps: ${{ steps.map_finder.outputs.maps }} + alternate_tests: ${{ steps.alternate_test_finder.outputs.alternate_tests }} + max_required_byond_client: ${{ steps.max_required_byond_client.outputs.max_required_byond_client }} + + steps: + - uses: actions/checkout@v4 + - name: Find Maps + id: map_finder + run: | + echo "$(ls -mw0 _maps/*.json)" > maps_output.txt + sed -i -e s+_maps/+\"+g -e s+.json+\"+g maps_output.txt + echo "Maps: $(cat maps_output.txt)" + echo "maps={\"paths\":[$(cat maps_output.txt)]}" >> $GITHUB_OUTPUT + - name: Find Alternate Tests + id: alternate_test_finder + run: | + ALTERNATE_TESTS_JSON=$(jq -nRc '[inputs | capture("^(?[0-9]+)\\.(?[0-9]+): (?.+)$")]' .github/alternate_byond_versions.txt) + echo "alternate_tests=$ALTERNATE_TESTS_JSON" >> $GITHUB_OUTPUT + - name: Collect byond client version configuration + id: max_required_byond_client + #the regex here does not filter out non-numbers because error messages about no input are less helpful then error messages about bad input (which includes the bad input) + run: | + echo "max_required_byond_client=$(grep -Ev '^[[:blank:]]{0,}#{1,}|^[[:blank:]]{0,}$' .github/max_required_byond_client.txt | tail -n1)" >> $GITHUB_OUTPUT + + run_all_tests: + if: ( !contains(github.event.head_commit.message, '[ci skip]') ) + name: Integration Tests + needs: [collect_data] + + strategy: + fail-fast: false + matrix: + map: ${{ fromJSON(needs.collect_data.outputs.maps).paths }} + + uses: ./.github/workflows/run_integration_tests.yml + with: + map: ${{ matrix.map }} + max_required_byond_client: ${{needs.collect_data.outputs.max_required_byond_client}} + + run_alternate_tests: + if: ( !contains(github.event.head_commit.message, '[ci skip]') && needs.collect_data.outputs.alternate_tests != '[]' ) + name: Alternate Tests + needs: [collect_data] + strategy: + fail-fast: false + matrix: + setup: ${{ fromJSON(needs.collect_data.outputs.alternate_tests) }} + + uses: ./.github/workflows/run_integration_tests.yml + with: + map: ${{ matrix.setup.map }} + major: ${{ matrix.setup.major }} + minor: ${{ matrix.setup.minor }} + max_required_byond_client: ${{needs.collect_data.outputs.max_required_byond_client}} + + check_alternate_tests: + if: ( !contains(github.event.head_commit.message, '[ci skip]') && needs.collect_data.outputs.alternate_tests != '[]' ) + name: Check Alternate Tests + needs: [run_alternate_tests] + runs-on: ubuntu-22.04 + timeout-minutes: 5 + steps: + - run: echo Alternate tests passed. + + compare_screenshots: + if: ( !contains(github.event.head_commit.message, '[ci skip]') && (always() && (!failure() && !cancelled())) ) + needs: [run_all_tests, run_alternate_tests] + name: Compare Screenshot Tests + timeout-minutes: 15 + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - name: Setup directory + run: mkdir -p artifacts + # If we ever add more artifacts, this is going to break, but it'll be obvious. + - name: Download screenshot tests + uses: actions/download-artifact@v4 + with: + path: artifacts + - name: ls -R + run: ls -R artifacts + - name: Setup screenshot comparison + run: npm i + working-directory: tools/screenshot-test-comparison + - name: Run screenshot comparison + run: node tools/screenshot-test-comparison/index.js artifacts code/modules/unit_tests/screenshots artifacts/screenshot_comparisons + # workflow_run does not give you the PR it ran on, + # even through the thing literally named "matching pull requests". + # However, in GraphQL, you can check if the check suite was ran + # by a specific PR, so trusting the (user controlled) action here is okay, + # as long as we check it later in show_screenshot_test_results + - name: Save PR ID + if: failure() && github.event.pull_request + run: | + echo ${{ github.event.pull_request.number }} > artifacts/screenshot_comparisons/pull_request_number.txt + - name: Upload bad screenshots + if: failure() + uses: actions/upload-artifact@v4 + with: + name: bad-screenshots + path: artifacts/screenshot_comparisons + + test_windows: + if: ( !contains(github.event.head_commit.message, '[ci skip]') ) + name: Windows Build + needs: [collect_data] + runs-on: windows-latest + timeout-minutes: 5 + + steps: + - uses: actions/checkout@v4 + - name: Restore Yarn cache + uses: actions/cache@v4 + with: + path: tgui/.yarn/cache + key: ${{ runner.os }}-yarn-${{ hashFiles('tgui/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: Compile + run: pwsh tools/ci/build.ps1 + env: + DM_EXE: "C:\\byond\\bin\\dm.exe" + - name: Check client Compatibility + uses: beestation/byond-client-compatibility-check@v3 + with: + dmb-location: beestation.dmb + max-required-client-version: ${{needs.collect_data.outputs.max_required_byond_client}} diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml deleted file mode 100644 index d52ea0e45f3d5..0000000000000 --- a/.github/workflows/continuous_integration.yml +++ /dev/null @@ -1,139 +0,0 @@ -name: Run tests - -on: - workflow_dispatch: -# push: -# paths-ignore: -# - "html/changelogs/**" -# - "html/changelog.html" - pull_request: - branches: - - master - merge_group: - branches: - - master - -jobs: - run_linters: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - - name: Python setup - uses: actions/setup-python@v4 - with: - python-version: "3.11" - cache: 'pip' - - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: yarn - cache-dependency-path: tgui/yarn.lock - - name: Cache SpacemanDMM - id: cache-spacemandmm - uses: actions/cache@v3 - with: - path: ~/dreamchecker - key: ${{ runner.os }}-spacemandmm-cache-${{ hashFiles('dependencies.sh') }} - - name: Install SpacemanDMM - if: steps.cache-spacemandmm.outputs.cache-hit != 'true' - run: bash tools/ci/install_spaceman_dmm.sh dreamchecker - - name: Install Tools - run: | - pip install setuptools - pip install -r tools/requirements.txt - - name: Run Linters - run: | - bash tools/ci/check_filedirs.sh beestation.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 python ./tools/json_verifier.py - bash tools/ci/check_grep.sh - tools/build/build --ci lint tgui-test - tools/bootstrap/python -m dmi.test - tools/bootstrap/python -m mapmerge2.dmm_test - ~/dreamchecker - compile_all_maps: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - - name: Setup cache - id: cache-byond - uses: actions/cache@v3 - with: - path: ~/BYOND - key: ${{ runner.os }}-byond-cache-${{ hashFiles('Dockerfile') }} - - name: Install BYOND - if: steps.cache-byond.outputs.cache-hit != 'true' - run: bash tools/ci/install_byond.sh - - name: Compile All Maps - run: | - source $HOME/BYOND/byond/bin/byondsetup - python3 tools/ci/template_dm_generator.py - tools/build/build --ci dm -DCIBUILDING -DCITESTING -DALL_MAPS - run_all_tests: - runs-on: ubuntu-20.04 - services: - mariadb: - image: mariadb:latest - env: - MYSQL_ROOT_PASSWORD: root - ports: - - 3306 - options: --health-cmd="mariadb-admin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: yarn - cache-dependency-path: tgui/yarn.lock - - name: Cache BYOND - id: cache-byond - uses: actions/cache@v3 - with: - path: ~/BYOND - key: ${{ runner.os }}-byond-cache-${{ hashFiles('Dockerfile') }} - - name: Install BYOND - if: steps.cache-byond.outputs.cache-hit != 'true' - run: bash tools/ci/install_byond.sh - - name: Setup database - run: | - sudo systemctl start mysql - mysql -u root -proot -e 'CREATE DATABASE bee_ci;' - mysql -u root -proot bee_ci < SQL/beestation_schema.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: Install auxmos - run: | - bash tools/ci/install_auxmos.sh - - name: Compile Tests - run: | - source $HOME/BYOND/byond/bin/byondsetup - tools/build/build --ci dm -DCIBUILDING -DANSICOLORS - - name: Run Tests - run: | - source $HOME/BYOND/byond/bin/byondsetup - bash tools/ci/run_server.sh - test_windows: - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: yarn - cache-dependency-path: tgui/yarn.lock - - name: Cache BYOND - id: cache-byond - uses: actions/cache@v3 - with: - path: C:/byond - key: ${{ runner.os }}-byond-cache-${{ hashFiles('dependencies.sh') }} - - name: Compile - run: pwsh tools/ci/build.ps1 - env: - DM_EXE: "C:\\byond\\bin\\dm.exe" diff --git a/.github/workflows/rerun_flaky_tests.yml b/.github/workflows/rerun_flaky_tests.yml new file mode 100644 index 0000000000000..7f498de144308 --- /dev/null +++ b/.github/workflows/rerun_flaky_tests.yml @@ -0,0 +1,31 @@ +name: Rerun/Report Flaky Tests +on: + workflow_run: + workflows: [CI Suite] + types: + - completed +jobs: + rerun_flaky_tests: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt == 1 }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Rerun flaky tests + uses: actions/github-script@v6 + with: + script: | + const { rerunFlakyTests } = await import('${{ github.workspace }}/tools/pull_request_hooks/rerunFlakyTests.js') + await rerunFlakyTests({ github, context }) + report_flaky_tests: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.run_attempt == 2 }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Report flaky tests + uses: actions/github-script@v6 + with: + script: | + const { reportFlakyTests } = await import('${{ github.workspace }}/tools/pull_request_hooks/rerunFlakyTests.js') + await reportFlakyTests({ github, context }) diff --git a/.github/workflows/run_integration_tests.yml b/.github/workflows/run_integration_tests.yml new file mode 100644 index 0000000000000..ae56766122670 --- /dev/null +++ b/.github/workflows/run_integration_tests.yml @@ -0,0 +1,80 @@ +# This is a reusable workflow to run integration tests on a single map. +# This is run for every single map in ci_suite.yml. You might want to edit that instead. +name: Run Integration Tests +on: + workflow_call: + inputs: + map: + required: true + type: string + major: + required: false + type: string + minor: + required: false + type: string + max_required_byond_client: + required: true + type: string + +jobs: + run_integration_tests: + runs-on: ubuntu-latest + timeout-minutes: 15 + 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@v4 + - name: Restore BYOND cache + uses: actions/cache@v4 + with: + path: ~/BYOND + key: ${{ runner.os }}-byond-${{ hashFiles('dependencies.sh') }} + - name: Setup database + run: | + sudo systemctl start mysql + mysql -u root -proot -e 'CREATE DATABASE tg_ci;' + mysql -u root -proot tg_ci < SQL/beestation_schema.sql + mysql -u root -proot -e 'CREATE DATABASE tg_ci_prefixed;' + mysql -u root -proot tg_ci_prefixed < SQL/beestation_schema_prefixed.sql + - name: Install rust-g + run: | + bash tools/ci/install_rust_g.sh +# Bee: Dreamlua is not used +# - name: Install dreamluau +# run: | +# bash tools/ci/install_dreamluau.sh + - name: Configure version + run: | + echo "BYOND_MAJOR=${{ inputs.major }}" >> $GITHUB_ENV + echo "BYOND_MINOR=${{ inputs.minor }}" >> $GITHUB_ENV + if: ${{ inputs.major }} + - name: Compile Tests + id: compile_tests + run: | + bash tools/ci/install_byond.sh + source $HOME/BYOND/byond/bin/byondsetup + tools/build/build --ci dm -DCIBUILDING -DANSICOLORS -Werror -ITG0001 -I"loop_checks" + - name: Run Tests + run: | + source $HOME/BYOND/byond/bin/byondsetup + bash tools/ci/run_server.sh ${{ inputs.map }} + - name: Upload screenshot tests + if: always() + uses: actions/upload-artifact@v4 + with: + name: test_artifacts_${{ inputs.map }}_${{ inputs.major }}_${{ inputs.minor }} + path: data/screenshots_new/ + retention-days: 1 + - name: Check client Compatibility + if: always() && steps.compile_tests.outcome == 'success' + uses: beestation/byond-client-compatibility-check@v3 + with: + dmb-location: beestation.dmb + max-required-client-version: ${{inputs.max_required_byond_client}} diff --git a/.github/workflows/show_screenshot_test_results.yml b/.github/workflows/show_screenshot_test_results.yml new file mode 100644 index 0000000000000..c61d09fa89057 --- /dev/null +++ b/.github/workflows/show_screenshot_test_results.yml @@ -0,0 +1,43 @@ +# This is a separate workflow so that it can access secrets, which are necessary +# because we need to be able to upload the images and post a comment. +# In the event this workflow fails, the screenshot test results are still +# available as an artifact of the screenshot test comparison workflow itself. +# This simply provides necessary quality of life. +name: Show Screenshot Test Results +on: + workflow_run: + workflows: [CI Suite] + types: + - completed +jobs: + show_screenshot_test_results: + if: ( !contains(github.event.head_commit.message, '[ci skip]') && github.event.workflow_run.run_attempt == 1 ) + name: Show Screenshot Test Results + runs-on: ubuntu-22.04 + steps: + - name: "Check for ARTIFACTS_FILE_HOUSE_KEY" + id: secrets_set + env: + ENABLER_SECRET: ${{ secrets.ARTIFACTS_FILE_HOUSE_KEY }} + run: | + unset SECRET_EXISTS + if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi + echo "SECRETS_ENABLED=$SECRET_EXISTS" >> $GITHUB_OUTPUT + - name: Checkout + if: steps.secrets_set.outputs.SECRETS_ENABLED + uses: actions/checkout@v4 + - name: Prepare module + if: steps.secrets_set.outputs.SECRETS_ENABLED + run: | + # This is needed because node-fetch needs import and doesn't work with require :/ + echo "{\"type\": \"module\"}" > package.json + npm install node-fetch + - name: Show screenshot test results + if: steps.secrets_set.outputs.SECRETS_ENABLED + uses: actions/github-script@v6 + env: + FILE_HOUSE_KEY: ${{ secrets.ARTIFACTS_FILE_HOUSE_KEY }} + with: + script: | + const { showScreenshotTestResults } = await import('${{ github.workspace }}/tools/ci/show_screenshot_test_results.js') + await showScreenshotTestResults({ github, context, exec }) diff --git a/tools/ci/install_byond.sh b/tools/ci/install_byond.sh index 4a688755d3d9a..9108bde5ebece 100755 --- a/tools/ci/install_byond.sh +++ b/tools/ci/install_byond.sh @@ -1,7 +1,10 @@ #!/bin/bash set -euo pipefail -source dependencies.sh +# BYOND_MAJOR and BYOND_MINOR can be explicitly set, such as in alt_byond_versions.txt +if [ -z "${BYOND_MAJOR+x}" ]; then + source dependencies.sh +fi if [ -d "$HOME/BYOND/byond/bin" ] && grep -Fxq "${BYOND_MAJOR}.${BYOND_MINOR}" $HOME/BYOND/version.txt; then From a439ad6b56d96a85987373390e0d2fcfb7416b08 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 12:38:19 +0100 Subject: [PATCH 002/266] uses TG's repo for client compatability --- .github/workflows/ci_suite.yml | 4 ++-- .github/workflows/run_integration_tests.yml | 2 +- tools/ci/install_ripgrep.sh | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 tools/ci/install_ripgrep.sh diff --git a/.github/workflows/ci_suite.yml b/.github/workflows/ci_suite.yml index dfd3fd372f2bc..17c4f878f47de 100644 --- a/.github/workflows/ci_suite.yml +++ b/.github/workflows/ci_suite.yml @@ -149,7 +149,7 @@ jobs: source $HOME/BYOND/byond/bin/byondsetup tools/build/build --ci dm -DCIBUILDING -DCITESTING -DALL_MAPS - name: Check client Compatibility - uses: beestation/byond-client-compatibility-check@v3 + uses: tgstation/byond-client-compatibility-check@v3 with: dmb-location: beestation.dmb max-required-client-version: ${{needs.collect_data.outputs.max_required_byond_client}} @@ -283,7 +283,7 @@ jobs: env: DM_EXE: "C:\\byond\\bin\\dm.exe" - name: Check client Compatibility - uses: beestation/byond-client-compatibility-check@v3 + uses: tgstation/byond-client-compatibility-check@v3 with: dmb-location: beestation.dmb max-required-client-version: ${{needs.collect_data.outputs.max_required_byond_client}} diff --git a/.github/workflows/run_integration_tests.yml b/.github/workflows/run_integration_tests.yml index ae56766122670..da4417a384d66 100644 --- a/.github/workflows/run_integration_tests.yml +++ b/.github/workflows/run_integration_tests.yml @@ -74,7 +74,7 @@ jobs: retention-days: 1 - name: Check client Compatibility if: always() && steps.compile_tests.outcome == 'success' - uses: beestation/byond-client-compatibility-check@v3 + uses: tgstation/byond-client-compatibility-check@v3 with: dmb-location: beestation.dmb max-required-client-version: ${{inputs.max_required_byond_client}} diff --git a/tools/ci/install_ripgrep.sh b/tools/ci/install_ripgrep.sh new file mode 100644 index 0000000000000..455027d93a6eb --- /dev/null +++ b/tools/ci/install_ripgrep.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -euo pipefail + +source tools/ci/ci_dependencies.sh + +cargo install ripgrep --features pcre2 --version $RIPGREP_VERSION From 3b04dbb2799935a7b9c6bc31150f6e09c94fbf46 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 12:41:22 +0100 Subject: [PATCH 003/266] Removes the need for the prefixed database --- .github/workflows/run_integration_tests.yml | 6 ++---- tools/ci/ci_dependencies.sh | 6 ++++++ 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 tools/ci/ci_dependencies.sh diff --git a/.github/workflows/run_integration_tests.yml b/.github/workflows/run_integration_tests.yml index da4417a384d66..d628c813e36b9 100644 --- a/.github/workflows/run_integration_tests.yml +++ b/.github/workflows/run_integration_tests.yml @@ -39,10 +39,8 @@ jobs: - name: Setup database run: | sudo systemctl start mysql - mysql -u root -proot -e 'CREATE DATABASE tg_ci;' - mysql -u root -proot tg_ci < SQL/beestation_schema.sql - mysql -u root -proot -e 'CREATE DATABASE tg_ci_prefixed;' - mysql -u root -proot tg_ci_prefixed < SQL/beestation_schema_prefixed.sql + mysql -u root -proot -e 'CREATE DATABASE bee_ci;' + mysql -u root -proot bee_ci < SQL/beestation_schema.sql - name: Install rust-g run: | bash tools/ci/install_rust_g.sh diff --git a/tools/ci/ci_dependencies.sh b/tools/ci/ci_dependencies.sh new file mode 100644 index 0000000000000..fd1bee5ea88a9 --- /dev/null +++ b/tools/ci/ci_dependencies.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +#Project dependencies file +#Contains versions of programs that we might need to install for CI purposes - do not add anything here that is REQUIRED to run the project, this is just for CI. + +export RIPGREP_VERSION=14.0.3 From 14ca9cc3538d81ff4295a91575c289c7a64bdad2 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 12:45:39 +0100 Subject: [PATCH 004/266] Update alternate_byond_versions.txt --- .github/alternate_byond_versions.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/alternate_byond_versions.txt b/.github/alternate_byond_versions.txt index e1496d438cdc4..6ddc328dc29b6 100644 --- a/.github/alternate_byond_versions.txt +++ b/.github/alternate_byond_versions.txt @@ -5,4 +5,4 @@ # Format is version: map # Example: # 500.1337: runtimestation -515.1627: runtimestation +514.1589: runtimestation From 153fc566a80a664d7a0867763783d6fc1b7559f7 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 12:45:58 +0100 Subject: [PATCH 005/266] Update alternate_byond_versions.txt --- .github/alternate_byond_versions.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/alternate_byond_versions.txt b/.github/alternate_byond_versions.txt index 6ddc328dc29b6..aa133faa17458 100644 --- a/.github/alternate_byond_versions.txt +++ b/.github/alternate_byond_versions.txt @@ -5,4 +5,5 @@ # Format is version: map # Example: # 500.1337: runtimestation +#515.1627: runtimestation 514.1589: runtimestation From 562441fb133c1cfa6e1f95248d4467e2f28649bc Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 12:51:03 +0100 Subject: [PATCH 006/266] Update alternate_byond_versions.txt --- .github/alternate_byond_versions.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/alternate_byond_versions.txt b/.github/alternate_byond_versions.txt index aa133faa17458..309df9b58ee5c 100644 --- a/.github/alternate_byond_versions.txt +++ b/.github/alternate_byond_versions.txt @@ -6,4 +6,3 @@ # Example: # 500.1337: runtimestation #515.1627: runtimestation -514.1589: runtimestation From 5e27b685256115faafe7fe4813913c90d9757e2e Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 12:59:49 +0100 Subject: [PATCH 007/266] Adds annotations --- bin/temp-fast-test.cmd | 4 -- code/modules/unit_tests/_unit_tests.dm | 23 +++++++----- tools/ci/annotate_dm.sh | 4 ++ tools/ci/annotate_od.sh | 4 ++ tools/dm_annotator/__main__.py | 51 ++++++++++++++++++++++++++ tools/od_annotator/__main__.py | 50 +++++++++++++++++++++++++ 6 files changed, 123 insertions(+), 13 deletions(-) delete mode 100644 bin/temp-fast-test.cmd create mode 100644 tools/ci/annotate_dm.sh create mode 100644 tools/ci/annotate_od.sh create mode 100644 tools/dm_annotator/__main__.py create mode 100644 tools/od_annotator/__main__.py diff --git a/bin/temp-fast-test.cmd b/bin/temp-fast-test.cmd deleted file mode 100644 index f604245f8c27d..0000000000000 --- a/bin/temp-fast-test.cmd +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -:: Nuke this task once the Del the World unit test passes. This exists to fix those errors easily. - -call "%~dp0\..\tools\build\build.bat" --wait-on-error dm-test -DREFERENCE_TRACKING_FAST %* diff --git a/code/modules/unit_tests/_unit_tests.dm b/code/modules/unit_tests/_unit_tests.dm index 89679c50c9ae9..ccc2128bbbd11 100644 --- a/code/modules/unit_tests/_unit_tests.dm +++ b/code/modules/unit_tests/_unit_tests.dm @@ -51,10 +51,17 @@ #define UNIT_TEST_FAILED 1 #define UNIT_TEST_SKIPPED 2 +#define TEST_PRE 0 #define TEST_DEFAULT 1 /// After most test steps, used for tests that run long so shorter issues can be noticed faster #define TEST_LONGER 10 -#define TEST_DEL_WORLD INFINITY +/// This must be the one of last tests to run due to the inherent nature of the test iterating every single tangible atom in the game and qdeleting all of them (while taking long sleeps to make sure the garbage collector fires properly) taking a large amount of time. +#define TEST_CREATE_AND_DESTROY 9001 +/** + * For tests that rely on create and destroy having iterated through every (tangible) atom so they don't have to do something similar. + * Keep in mind tho that create and destroy will absolutely break the test platform, anything that relies on its shape cannot come after it. + */ +#define TEST_AFTER_CREATE_AND_DESTROY INFINITY /// Change color to red on ANSI terminal output, if enabled with -DANSICOLORS. #ifdef ANSICOLORS @@ -68,7 +75,12 @@ #else #define TEST_OUTPUT_GREEN(text) (text) #endif - +/// Change color to yellow on ANSI terminal output, if enabled with -DANSICOLORS. +#ifdef ANSICOLORS +#define TEST_OUTPUT_YELLOW(text) "\x1B\x5B1;33m[text]\x1B\x5B0m" +#else +#define TEST_OUTPUT_YELLOW(text) (text) +#endif /// A trait source when adding traits through unit tests #define TRAIT_SOURCE_UNIT_TESTS "unit_tests" @@ -85,14 +97,7 @@ #include "component_tests.dm" #include "connect_loc.dm" #include "crafting_tests.dm" - -// Del the World. -// This unit test creates and qdels almost every atom in the code, checking for errors with initialization and harddels on deletion. -// It is disabled by default for now due to the large amount of consistent errors it produces. Run the "dm: find hard deletes" task to enable it. -#ifdef REFERENCE_TRACKING_FAST #include "create_and_destroy.dm" -#endif - #include "dcs_get_id_from_elements.dm" #include "dynamic_ruleset_sanity.dm" #include "enumerables.dm" diff --git a/tools/ci/annotate_dm.sh b/tools/ci/annotate_dm.sh new file mode 100644 index 0000000000000..e43f930ba1acc --- /dev/null +++ b/tools/ci/annotate_dm.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +set -euo pipefail +tools/bootstrap/python -m dm_annotator "$@" diff --git a/tools/ci/annotate_od.sh b/tools/ci/annotate_od.sh new file mode 100644 index 0000000000000..12390908074c0 --- /dev/null +++ b/tools/ci/annotate_od.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +set -euo pipefail +tools/bootstrap/python -m od_annotator "$@" diff --git a/tools/dm_annotator/__main__.py b/tools/dm_annotator/__main__.py new file mode 100644 index 0000000000000..4948fd08656dd --- /dev/null +++ b/tools/dm_annotator/__main__.py @@ -0,0 +1,51 @@ +import sys +import re +import os.path as path + +# Usage: tools/bootstrap/python -m dm_annotator [filename] +# If filename is not provided, stdin is checked instead + +def red(text): + return "\033[31m" + str(text) + "\033[0m" + +def green(text): + return "\033[32m" + str(text) + "\033[0m" + +def yellow(text): + return "\033[33m" + str(text) + "\033[0m" + +def annotate(raw_output): + # Remove ANSI escape codes + raw_output = re.sub(r'(\x9B|\x1B\[)[0-?]*[ -\/]*[@-~]', '', raw_output) + + print("::group::DreamChecker Output") + print(raw_output) + print("::endgroup::") + + annotation_regex = r'(?P.*?), line (?P\d+), column (?P\d+):\s{1,2}(?Perror|warning): (?P.*)' + has_issues = False + + print("DM Code Annotations:") + for annotation in re.finditer(annotation_regex, raw_output): + print(f"::{annotation['type']} file={annotation['filename']},line={annotation['line']},col={annotation['column']}::{annotation['message']}") + has_issues = True + + if not has_issues: + print(green("No DM issues found")) + +def main(): + if len(sys.argv) > 1: + if not path.exists(sys.argv[1]): + print(red(f"Error: Annotations file '{sys.argv[1]}' does not exist")) + sys.exit(1) + with open(sys.argv[1], 'r') as f: + annotate(f.read()) + elif not sys.stdin.isatty(): + annotate(sys.stdin.read()) + else: + print(red("Error: No input provided")) + print("Usage: tools/bootstrap/python -m dm_annotator [filename]") + sys.exit(1) + +if __name__ == '__main__': + main() diff --git a/tools/od_annotator/__main__.py b/tools/od_annotator/__main__.py new file mode 100644 index 0000000000000..357adccfe913c --- /dev/null +++ b/tools/od_annotator/__main__.py @@ -0,0 +1,50 @@ +import sys +import re + +def green(text): + return "\033[32m" + str(text) + "\033[0m" + +def red(text): + return "\033[31m" + str(text) + "\033[0m" + +def annotate(raw_output): + # Remove ANSI escape codes + raw_output = re.sub(r'(\x9B|\x1B\[)[0-?]*[ -\/]*[@-~]', '', raw_output) + + print("::group::OpenDream Output") + print(raw_output) + print("::endgroup::") + + annotation_regex = r'((?PError|Warning) (?POD(?P\d{4})) at (?P(?P.+):(?P\d+):(?P\d+)|): (?P.+))' + failures_detected = False + expected_failure_case_detected = False # this is just here so this script breaks if we forget to set it to True when we expect a failure. remove this when we have handled the expected failure + + print("OpenDream Code Annotations:") + for annotation in re.finditer(annotation_regex, raw_output): + message = annotation['message'] + if message == "Unimplemented proc & var warnings are currently suppressed": # this happens every single run, it's important to know about it but we don't need to throw an error + message += " (This is expected and can be ignored)" # also there's no location for it to annotate to since it's an failure. + expected_failure_case_detected = True + + if annotation['type'] == "Error": + failures_detected = True + + error_string = f"{annotation['errorcode']}: {message}" + + if annotation['location'] == "": + print(f"::{annotation['type']} file=,line=,col=::{error_string}") + else: + print(f"::{annotation['type']} file={annotation['filename']},line={annotation['line']},col={annotation['column']}::{error_string}") + + if failures_detected: + sys.exit(1) + return + + if not expected_failure_case_detected: + print(red("Failed to detect the expected failure case! If you have recently changed how we work with OpenDream Pragmas, please fix the od_annotator script!")) + sys.exit(1) + return + + print(green("No OpenDream issues found!")) + +annotate(sys.stdin.read()) From c16ef29dba35637e1973d581afd2c46be4ddba87 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 13:02:00 +0100 Subject: [PATCH 008/266] Update create_and_destroy.dm --- code/modules/unit_tests/create_and_destroy.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/modules/unit_tests/create_and_destroy.dm b/code/modules/unit_tests/create_and_destroy.dm index 2b78613e5753b..a8cba85919bbd 100644 --- a/code/modules/unit_tests/create_and_destroy.dm +++ b/code/modules/unit_tests/create_and_destroy.dm @@ -8,7 +8,7 @@ var/turf/spawn_at = run_loc_floor_bottom_left var/list/ignore = list( //this is somehow a subtype of /atom/movable, because of its purpose... - /image/appearance + /image/appearance, //Never meant to be created, errors out the ass for mobcode reasons /mob/living/carbon, //Nother template type, doesn't like being created with no seed @@ -25,7 +25,6 @@ /mob/dview, //Xenobio basetypes /obj/item/slimecross/gentle, - ) //This turf existing is an error in and of itself ignore += typesof(/turf/baseturf_skipover) From be2a54556ce34263764febc9e90836bd97245283 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 13:46:04 +0100 Subject: [PATCH 009/266] Ports some stuff relating to tests, but modularises ignore list for create_and_destroy --- beestation.dme | 1 + code/__DEFINES/_helpers.dm | 3 + code/__DEFINES/qdel.dm | 45 ++- code/__HELPERS/mobs.dm | 2 + code/__HELPERS/test_helpers.dm | 19 ++ code/_globalvars/logging.dm | 5 + code/_onclick/hud/alert.dm | 3 +- code/_onclick/hud/fullscreen.dm | 3 +- code/_onclick/hud/hud.dm | 3 +- code/controllers/subsystem/garbage.dm | 295 ++++++++++-------- code/datums/datum.dm | 17 + code/datums/map_config.dm | 13 + code/datums/progressbar.dm | 7 + code/game/area/area_color_correction.dm | 3 +- code/game/gamemodes/sandbox/h_sandbox.dm | 4 +- code/game/objects/effects/wanted_poster.dm | 2 + code/game/objects/objs.dm | 2 + code/game/turfs/baseturf_skipover.dm | 4 + code/game/turfs/closed/_closed.dm | 2 + code/game/turfs/open/_open.dm | 2 + code/game/turfs/open/openspace.dm | 2 + code/game/turfs/turf.dm | 3 + code/game/world.dm | 2 +- .../debug_variable_appearance.dm | 2 + code/modules/awaymissions/corpse.dm | 2 + code/modules/cargo/supplypod.dm | 4 + code/modules/client/client_colour.dm | 3 +- code/modules/hydroponics/grown.dm | 2 + code/modules/keybindings/focus.dm | 3 +- code/modules/mapping/mapping_helpers.dm | 3 +- code/modules/mapping/merge_conflicts.dm | 2 + code/modules/mob/living/carbon/carbon.dm | 2 + code/modules/mob/mob_defines.dm | 2 + .../computers/item/processor.dm | 3 + .../xenobiology/crossbreeding/gentle.dm | 2 + .../xenobiology/crossbreeding/recurring.dm | 3 + code/modules/shuttle/shuttle.dm | 2 + code/modules/unit_tests/create_and_destroy.dm | 155 +++------ code/modules/unit_tests/unit_test.dm | 163 +++++++--- 39 files changed, 499 insertions(+), 296 deletions(-) create mode 100644 code/__HELPERS/test_helpers.dm diff --git a/beestation.dme b/beestation.dme index 598b90abcda73..2baec93d208fd 100644 --- a/beestation.dme +++ b/beestation.dme @@ -290,6 +290,7 @@ #include "code\__HELPERS\stoplag.dm" #include "code\__HELPERS\string_assoc_lists.dm" #include "code\__HELPERS\string_lists.dm" +#include "code\__HELPERS\test_helpers.dm" #include "code\__HELPERS\text.dm" #include "code\__HELPERS\time.dm" #include "code\__HELPERS\turfs.dm" diff --git a/code/__DEFINES/_helpers.dm b/code/__DEFINES/_helpers.dm index 5fc95acb1af11..5f6fb4d9af78d 100644 --- a/code/__DEFINES/_helpers.dm +++ b/code/__DEFINES/_helpers.dm @@ -12,3 +12,6 @@ // Custom types that we define don't get a unique id, but this is useful for identifying // types that don't normally have a way to run istype() on them. #define TYPEID(thing) copytext(REF(thing), 4, 6) + +/// Takes a datum as input, returns its ref string +#define text_ref(datum) ref(datum) diff --git a/code/__DEFINES/qdel.dm b/code/__DEFINES/qdel.dm index 039658baad9dc..419b0c1176eeb 100644 --- a/code/__DEFINES/qdel.dm +++ b/code/__DEFINES/qdel.dm @@ -1,20 +1,27 @@ -//defines that give qdel hints. these can be given as a return in destory() or by calling +//! Defines that give qdel hints. +//! +//! These can be given as a return in [/atom/proc/Destroy] or by calling [/proc/qdel]. +/// `qdel` should queue the object for deletion. +#define QDEL_HINT_QUEUE 0 +/// `qdel` should let the object live after calling [/atom/proc/Destroy]. +#define QDEL_HINT_LETMELIVE 1 +/// Functionally the same as the above. `qdel` should assume the object will gc on its own, and not check it. +#define QDEL_HINT_IWILLGC 2 +/// Qdel should assume this object won't GC, and queue a hard delete using a hard reference. +#define QDEL_HINT_HARDDEL 3 +// Qdel should assume this object won't gc, and hard delete it posthaste. +#define QDEL_HINT_HARDDEL_NOW 4 -#define QDEL_HINT_QUEUE 0 //qdel should queue the object for deletion. -#define QDEL_HINT_LETMELIVE 1 //qdel should let the object live after calling destory. -#define QDEL_HINT_IWILLGC 2 //functionally the same as the above. qdel should assume the object will gc on its own, and not check it. -#define QDEL_HINT_HARDDEL 3 //qdel should assume this object won't gc, and queue a hard delete using a hard reference. -#define QDEL_HINT_HARDDEL_NOW 4 //qdel should assume this object won't gc, and hard del it post haste. -//defines for the gc_destroyed var #ifdef REFERENCE_TRACKING /** If REFERENCE_TRACKING is enabled, qdel will call this object's find_references() verb. * * Functionally identical to [QDEL_HINT_QUEUE] if [GC_FAILURE_HARD_LOOKUP] is not enabled in _compiler_options.dm. */ -#define QDEL_HINT_FINDREFERENCE 5 -/// Behavior as QDEL_HINT_FINDREFERENCE, but only if the GC fails and a hard delete is forced. +#warn TG0001 qdel REFERENCE_TRACKING enabled +#define QDEL_HINT_FINDREFERENCE 5 +/// Behavior as [QDEL_HINT_FINDREFERENCE], but only if the GC fails and a hard delete is forced. #define QDEL_HINT_IFFAIL_FINDREFERENCE 6 #endif @@ -24,19 +31,37 @@ #define GC_QUEUE_HARDDELETE 3 //! short queue for things that hard delete instead of going thru the gc subsystem, this is purely so if they *can* softdelete, they will soft delete rather then wasting time with a hard delete. #define GC_QUEUE_COUNT 3 //! Number of queues, used for allocating the nested lists. Don't forget to increase this if you add a new queue stage + +// Defines for the ssgarbage queue items +#define GC_QUEUE_ITEM_QUEUE_TIME 1 //! Time this item entered the queue +#define GC_QUEUE_ITEM_REF 2 //! Ref to the item +#define GC_QUEUE_ITEM_GCD_DESTROYED 3 //! Item's gc_destroyed var value. Used to detect ref reuse. +#define GC_QUEUE_ITEM_INDEX_COUNT 3 //! Number of item indexes, used for allocating the nested lists. Don't forget to increase this if you add a new queue item index + // Defines for the time an item has to get its reference cleaned before it fails the queue and moves to the next. #define GC_FILTER_QUEUE (1 SECONDS) #define GC_CHECK_QUEUE (5 MINUTES) #define GC_DEL_QUEUE (10 SECONDS) + #define QDEL_ITEM_ADMINS_WARNED (1<<0) //! Set when admins are told about lag causing qdels in this type. #define QDEL_ITEM_SUSPENDED_FOR_LAG (1<<1) //! Set when a type can no longer be hard deleted on failure because of lag it causes while this happens. // Defines for the [gc_destroyed][/datum/var/gc_destroyed] var. -#define GC_QUEUED_FOR_QUEUING -1 #define GC_CURRENTLY_BEING_QDELETED -2 #define QDELING(X) (X.gc_destroyed) #define QDELETED(X) (isnull(X) || QDELING(X)) #define QDESTROYING(X) (!X || X.gc_destroyed == GC_CURRENTLY_BEING_QDELETED) +// This is a bit hacky, we do it to avoid people relying on a return value for the macro +// If you need that you should use QDEL_IN_STOPPABLE instead +#define QDEL_IN(item, time) ; \ + addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), (time) > GC_FILTER_QUEUE ? WEAKREF(item) : item), time); +#define QDEL_IN_STOPPABLE(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), (time) > GC_FILTER_QUEUE ? WEAKREF(item) : item), time, TIMER_STOPPABLE) +#define QDEL_IN_CLIENT_TIME(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), item), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME) +#define QDEL_NULL(item) qdel(item); item = null +#define QDEL_LIST(L) if(L) { for(var/I in L) qdel(I); L.Cut(); } +#define QDEL_LIST_IN(L, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(______qdel_list_wrapper), L), time, TIMER_STOPPABLE) +#define QDEL_LIST_ASSOC(L) if(L) { for(var/I in L) { qdel(L[I]); qdel(I); } L.Cut(); } +#define QDEL_LIST_ASSOC_VAL(L) if(L) { for(var/I in L) qdel(L[I]); L.Cut(); } diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 3a763818771b6..325a496160511 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -614,6 +614,8 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) . = view(range, GLOB.dview_mob) GLOB.dview_mob.loc = null +CREATION_TEST_IGNORE_SELF(/mob/dview) + /mob/dview name = "INTERNAL DVIEW MOB" invisibility = 101 diff --git a/code/__HELPERS/test_helpers.dm b/code/__HELPERS/test_helpers.dm new file mode 100644 index 0000000000000..da1b2cb78df93 --- /dev/null +++ b/code/__HELPERS/test_helpers.dm @@ -0,0 +1,19 @@ +#if defined(UNIT_TESTS) || defined(SPACEMAN_DMM) + +#define CREATION_TEST_IGNORE_SELF(path)/datum/unit_test/build_list_of_uncreatables() {\ + . = ..();\ + . += path;\ +} + +#define CREATION_TEST_IGNORE_SUBTYPES(path)/datum/unit_test/build_list_of_uncreatables() {\ + . = ..();\ + . += typesof(path);\ +} + +#else + +#define CREATION_TEST_IGNORE_SELF(path) + +#define CREATION_TEST_IGNORE_SUBTYPES(path) + +#endif diff --git a/code/_globalvars/logging.dm b/code/_globalvars/logging.dm index ea096240ae963..d706b5c99c5d1 100644 --- a/code/_globalvars/logging.dm +++ b/code/_globalvars/logging.dm @@ -122,3 +122,8 @@ GLOBAL_PROTECT(picture_logging_prefix) GLOBAL_LIST_EMPTY(harddel_log) GLOBAL_PROTECT(harddel_log) #endif + +#if defined(UNIT_TESTS) || defined(SPACEMAN_DMM) +GLOBAL_VAR(test_log) +GLOBAL_PROTECT(test_log) +#endif diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index d9a94490bc3ea..6a2155bd9faf5 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -710,8 +710,7 @@ so as to remain in compliance with the most up-to-date laws." reorganize_alerts(M) return 1 -/mob - var/list/alerts = list() // contains /atom/movable/screen/alert only // On /mob so clientless mobs will throw alerts properly +/mob/var/list/alerts = list() // contains /atom/movable/screen/alert only // On /mob so clientless mobs will throw alerts properly /atom/movable/screen/alert/Click(location, control, params) if(!usr || !usr.client) diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index abcdedd7fe187..1ccbecf79a9f6 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -1,6 +1,5 @@ -/mob - var/list/screens = list() +/mob/var/list/screens = list() /mob/proc/overlay_fullscreen(category, type, severity) var/atom/movable/screen/fullscreen/screen = screens[category] diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index c81b2e997f7ea..3eae770387a68 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -128,8 +128,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list( return ..() -/mob - var/hud_type = /datum/hud +/mob/var/hud_type = /datum/hud /mob/proc/create_mob_hud() if(!client || hud_used) diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm index 0903d29dd8142..1220284ebcdb7 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 @@ -10,8 +33,8 @@ SUBSYSTEM_DEF(garbage) var/list/collection_timeout = list(GC_FILTER_QUEUE, GC_CHECK_QUEUE, GC_DEL_QUEUE) // deciseconds to wait before moving something up in the queue to the next level //Stat tracking - var/delslasttick = 0 // number of del()'s we've done this tick - var/gcedlasttick = 0 // number of things that gc'ed last tick + var/delslasttick = 0 // number of del()'s we've done this tick + var/gcedlasttick = 0 // number of things that gc'ed last tick var/totaldels = 0 var/totalgcs = 0 @@ -21,7 +44,7 @@ SUBSYSTEM_DEF(garbage) var/list/pass_counts var/list/fail_counts - var/list/items = list() // Holds our qdel_item statistics datums + var/list/items = list() // Holds our qdel_item statistics datums //Queue var/list/queues @@ -33,19 +56,6 @@ SUBSYSTEM_DEF(garbage) #endif #endif -/datum/controller/subsystem/garbage/get_metrics() - . = ..() - var/list/cust = list() - // You can calculate TGCR in kibana - cust["total_harddels"] = totaldels - cust["total_softdels"] = totalgcs - var/i = 0 - for(var/list/L in queues) - i++ - cust["queue_[i]"] = length(L) - - .["custom"] = cust - /datum/controller/subsystem/garbage/PreInit() InitQueues() @@ -68,36 +78,42 @@ SUBSYSTEM_DEF(garbage) msg += "TGR:[round((totalgcs/(totaldels+totalgcs))*100, 0.01)]%" msg += " P:[pass_counts.Join(",")]" msg += "|F:[fail_counts.Join(",")]" - . = ..(msg) + return ..() /datum/controller/subsystem/garbage/Shutdown() //Adds the del() log to the qdel log file - var/list/dellog = list() + var/list/del_log = list() //sort by how long it's wasted hard deleting - sortTim(items, cmp=GLOBAL_PROC_REF(cmp_qdel_item_time), associative = TRUE) + sortTim(items, cmp=/proc/cmp_qdel_item_time, associative = TRUE) for(var/path in items) var/datum/qdel_item/I = items[path] - dellog += "Path: [path]" + var/list/entry = list() + del_log[path] = entry + if (I.qdel_flags & QDEL_ITEM_SUSPENDED_FOR_LAG) - dellog += "\tSUSPENDED FOR LAG" + entry["SUSPENDED FOR LAG"] = TRUE if (I.failures) - dellog += "\tFailures: [I.failures]" - dellog += "\tqdel() Count: [I.qdels]" - dellog += "\tDestroy() Cost: [I.destroy_time]ms" + entry["Failures"] = I.failures + entry["qdel() Count"] = I.qdels + entry["Destroy() Cost (ms)"] = I.destroy_time + if (I.hard_deletes) - dellog += "\tTotal Hard Deletes [I.hard_deletes]" - dellog += "\tTime Spent Hard Deleting: [I.hard_delete_time]ms" - dellog += "\tHighest Time Spent Hard Deleting: [I.hard_delete_max]ms" + entry["Total Hard Deletes"] = I.hard_deletes + entry["Time Spend Hard Deleting (ms)"] = I.hard_delete_time + entry["Highest Time Spend Hard Deleting (ms)"] = I.hard_delete_max if (I.hard_deletes_over_threshold) - dellog += "\tHard Deletes Over Threshold: [I.hard_deletes_over_threshold]" + entry["Hard Deletes Over Threshold"] = I.hard_deletes_over_threshold if (I.slept_destroy) - dellog += "\tSleeps: [I.slept_destroy]" + entry["Total Sleeps"] = I.slept_destroy if (I.no_respect_force) - dellog += "\tIgnored force: [I.no_respect_force] times" + entry["Total Ignored Force"] = I.no_respect_force if (I.no_hint) - dellog += "\tNo hint: [I.no_hint] times" - log_qdel(dellog.Join("\n")) + entry["Total No Hint"] = I.no_hint + if(LAZYLEN(I.extra_details)) + entry["Deleted Metadata"] = I.extra_details + + log_qdel("", del_log) /datum/controller/subsystem/garbage/fire() //the fact that this resets its processing each fire (rather then resume where it left off) is intentional. @@ -129,6 +145,7 @@ SUBSYSTEM_DEF(garbage) pass_counts[i] = 0 fail_counts[i] = 0 + /datum/controller/subsystem/garbage/proc/HandleQueue(level = GC_QUEUE_FILTER) if (level == GC_QUEUE_FILTER) delslasttick = 0 @@ -145,31 +162,33 @@ SUBSYSTEM_DEF(garbage) lastlevel = level - //We do this rather then for(var/refID in queue) because that sort of for loop copies the whole list. +// 1 from the hard reference in the queue, and 1 from the variable used before this +#define REFS_WE_EXPECT 2 + + //We do this rather then for(var/list/ref_info in queue) because that sort of for loop copies the whole list. //Normally this isn't expensive, but the gc queue can grow to 40k items, and that gets costly/causes overrun. for (var/i in 1 to length(queue)) var/list/L = queue[i] - if (length(L) < 2) + if (length(L) < GC_QUEUE_ITEM_INDEX_COUNT) count++ if (MC_TICK_CHECK) return continue - var/GCd_at_time = L[1] - if(GCd_at_time > cut_off_time) + var/queued_at_time = L[GC_QUEUE_ITEM_QUEUE_TIME] + if(queued_at_time > cut_off_time) break // Everything else is newer, skip them count++ - var/refID = L[2] - var/datum/D - D = locate(refID) + var/datum/D = L[GC_QUEUE_ITEM_REF] - if (!D || D.gc_destroyed != GCd_at_time) // So if something else coincidentally gets the same ref, it's not deleted by mistake + // If that's all we've got, send er off + if (refcount(D) == REFS_WE_EXPECT) ++gcedlasttick ++totalgcs pass_counts[level]++ #ifdef REFERENCE_TRACKING - reference_find_on_fail -= refID //It's deleted we don't care anymore. + reference_find_on_fail -= text_ref(D) //It's deleted we don't care anymore. #endif if (MC_TICK_CHECK) return @@ -185,20 +204,30 @@ SUBSYSTEM_DEF(garbage) switch (level) if (GC_QUEUE_CHECK) #ifdef REFERENCE_TRACKING - if(reference_find_on_fail[refID]) - INVOKE_ASYNC(D, TYPE_PROC_REF(/datum,find_references)) + // Decides how many refs to look for (potentially) + // Based off the remaining and the ones we can account for + var/remaining_refs = refcount(D) - REFS_WE_EXPECT + if(reference_find_on_fail[text_ref(D)]) + INVOKE_ASYNC(D, TYPE_PROC_REF(/datum,find_references), remaining_refs) ref_searching = TRUE #ifdef GC_FAILURE_HARD_LOOKUP else - INVOKE_ASYNC(D, TYPE_PROC_REF(/datum,find_references)) + INVOKE_ASYNC(D, TYPE_PROC_REF(/datum,find_references), remaining_refs) ref_searching = TRUE #endif - reference_find_on_fail -= refID + reference_find_on_fail -= text_ref(D) #endif var/type = D.type var/datum/qdel_item/I = items[type] - log_world("## TESTING: GC: -- [FAST_REF(D)] | [type] was unable to be GC'd --") + var/message = "## TESTING: GC: -- [text_ref(D)] | [type] was unable to be GC'd --" + message = "[message] (ref count of [refcount(D)])" + log_world(message) + + var/detail = D.dump_harddel_info() + if(detail) + LAZYADD(I.extra_details, detail) + #ifdef TESTING for(var/c in GLOB.admins) //Using testing() here would fill the logs with ADMIN_VV garbage var/client/admin = c @@ -233,38 +262,41 @@ SUBSYSTEM_DEF(garbage) queue.Cut(1,count+1) count = 0 +#undef REFS_WE_EXPECT + /datum/controller/subsystem/garbage/proc/Queue(datum/D, level = GC_QUEUE_FILTER) if (isnull(D)) return if (level > GC_QUEUE_COUNT) HardDelete(D) return - var/gctime = world.time - var/refid = FAST_REF(D) + var/queue_time = world.time - D.gc_destroyed = gctime - var/list/queue = queues[level] + if (D.gc_destroyed <= 0) + D.gc_destroyed = queue_time - queue[++queue.len] = list(gctime, refid) // not += for byond reasons + var/list/queue = queues[level] + queue[++queue.len] = list(queue_time, D, D.gc_destroyed) // not += for byond reasons //this is mainly to separate things profile wise. /datum/controller/subsystem/garbage/proc/HardDelete(datum/D) ++delslasttick ++totaldels var/type = D.type - var/refID = FAST_REF(D) + var/refID = text_ref(D) + var/datum/qdel_item/type_info = items[type] + var/detail = D.dump_harddel_info() + if(detail) + LAZYADD(type_info.extra_details, detail) var/tick_usage = TICK_USAGE del(D) - tick_usage = TICK_USAGE_TO_MS(tick_usage) - var/datum/qdel_item/I = items[type] - - I.hard_deletes++ - I.hard_delete_time += tick_usage - if (tick_usage > I.hard_delete_max) - I.hard_delete_max = tick_usage + type_info.hard_deletes++ + type_info.hard_delete_time += tick_usage + if (tick_usage > type_info.hard_delete_max) + type_info.hard_delete_max = tick_usage if (tick_usage > highest_del_ms) highest_del_ms = tick_usage highest_del_type_string = "[type]" @@ -273,16 +305,16 @@ SUBSYSTEM_DEF(garbage) if (time > 0.1 SECONDS) postpone(time) - var/threshold = CONFIG_GET(number/hard_deletes_overrun_threshold) if (threshold && (time > threshold SECONDS)) - if (!(I.qdel_flags & QDEL_ITEM_ADMINS_WARNED)) + if (!(type_info.qdel_flags & QDEL_ITEM_ADMINS_WARNED)) log_game("Error: [type]([refID]) took longer than [threshold] seconds to delete (took [round(time/10, 0.1)] seconds to delete)") - I.qdel_flags |= QDEL_ITEM_ADMINS_WARNED - I.hard_deletes_over_threshold++ + message_admins("Error: [type]([refID]) took longer than [threshold] seconds to delete (took [round(time/10, 0.1)] seconds to delete).") + type_info.qdel_flags |= QDEL_ITEM_ADMINS_WARNED + type_info.hard_deletes_over_threshold++ var/overrun_limit = CONFIG_GET(number/hard_deletes_overrun_limit) - if (overrun_limit && I.hard_deletes_over_threshold >= overrun_limit) - I.qdel_flags |= QDEL_ITEM_SUSPENDED_FOR_LAG + if (overrun_limit && type_info.hard_deletes_over_threshold >= overrun_limit) + type_info.qdel_flags |= QDEL_ITEM_SUSPENDED_FOR_LAG /datum/controller/subsystem/garbage/Recover() InitQueues() //We first need to create the queues before recovering data @@ -304,78 +336,85 @@ SUBSYSTEM_DEF(garbage) var/no_hint = 0 //!Number of times it's not even bother to give a qdel hint var/slept_destroy = 0 //!Number of times it's slept in its destroy var/qdel_flags = 0 //!Flags related to this type's trip thru qdel. + var/list/extra_details //!Lazylist of string metadata about the deleted objects /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. +/proc/qdel(datum/to_delete, force = FALSE) + if(!istype(to_delete)) + del(to_delete) + return + + var/datum/qdel_item/trash = SSgarbage.items[to_delete.type] + if (isnull(trash)) + trash = SSgarbage.items[to_delete.type] = new /datum/qdel_item(to_delete.type) + trash.qdels++ -// 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) + if(!isnull(to_delete.gc_destroyed)) + if(to_delete.gc_destroyed == GC_CURRENTLY_BEING_QDELETED) + CRASH("[to_delete.type] destroy proc was called multiple times, likely due to a qdel loop in the Destroy logic") return - var/datum/qdel_item/I = SSgarbage.items[D.type] - if (!I) - I = SSgarbage.items[D.type] = new /datum/qdel_item(D.type) - I.qdels++ + if (SEND_SIGNAL(to_delete, COMSIG_PARENT_PREQDELETED, force)) // Give the components a chance to prevent their parent from being deleted + return - if(isnull(D.gc_destroyed)) - if (SEND_SIGNAL(D, COMSIG_PARENT_PREQDELETED, force)) // Give the components a chance to prevent their parent from being deleted - return - D.gc_destroyed = GC_CURRENTLY_BEING_QDELETED - var/start_time = world.time - var/start_tick = world.tick_usage - SEND_SIGNAL(D, COMSIG_PARENT_QDELETING, force) // Let the (remaining) components know about the result of Destroy - var/hint = D.Destroy(arglist(args.Copy(2))) // Let our friend know they're about to get fucked up. - if(world.time != start_time) - I.slept_destroy++ - else - I.destroy_time += TICK_USAGE_TO_MS(start_tick) - if(!D) + to_delete.gc_destroyed = GC_CURRENTLY_BEING_QDELETED + var/start_time = world.time + var/start_tick = world.tick_usage + SEND_SIGNAL(to_delete, COMSIG_PARENT_QDELETING, force) // Let the (remaining) components know about the result of Destroy + var/hint = to_delete.Destroy(force) // Let our friend know they're about to get fucked up. + + if(world.time != start_time) + trash.slept_destroy++ + else + trash.destroy_time += TICK_USAGE_TO_MS(start_tick) + + if(isnull(to_delete)) + return + + switch(hint) + if (QDEL_HINT_QUEUE) //qdel should queue the object for deletion. + SSgarbage.Queue(to_delete) + if (QDEL_HINT_IWILLGC) + to_delete.gc_destroyed = world.time return - switch(hint) - if (QDEL_HINT_QUEUE) //qdel should queue the object for deletion. - SSgarbage.Queue(D) - if (QDEL_HINT_IWILLGC) - D.gc_destroyed = world.time + if (QDEL_HINT_LETMELIVE) //qdel should let the object live after calling destory. + if(!force) + to_delete.gc_destroyed = null //clear the gc variable (important!) return - if (QDEL_HINT_LETMELIVE) //qdel should let the object live after calling destory. - if(!force) - D.gc_destroyed = null //clear the gc variable (important!) - return - // Returning LETMELIVE after being told to force destroy - // indicates the objects Destroy() does not respect force - #ifdef TESTING - if(!I.no_respect_force) - testing("WARNING: [D.type] has been force deleted, but is \ - returning an immortal QDEL_HINT, indicating it does \ - not respect the force flag for qdel(). It has been \ - placed in the queue, further instances of this type \ - will also be queued.") - #endif - I.no_respect_force++ + // Returning LETMELIVE after being told to force destroy + // indicates the objects Destroy() does not respect force + #ifdef TESTING + if(!trash.no_respect_force) + testing("WARNING: [to_delete.type] has been force deleted, but is \ + returning an immortal QDEL_HINT, indicating it does \ + not respect the force flag for qdel(). It has been \ + placed in the queue, further instances of this type \ + will also be queued.") + #endif + trash.no_respect_force++ - SSgarbage.Queue(D) - if (QDEL_HINT_HARDDEL) //qdel should assume this object won't gc, and queue a hard delete - SSgarbage.Queue(D, GC_QUEUE_HARDDELETE) - if (QDEL_HINT_HARDDEL_NOW) //qdel should assume this object won't gc, and hard del it post haste. - SSgarbage.HardDelete(D) - #ifdef REFERENCE_TRACKING - if (QDEL_HINT_FINDREFERENCE) //qdel will, if REFERENCE_TRACKING is enabled, display all references to this object, then queue the object for deletion. - SSgarbage.Queue(D) - D.find_references() //This breaks ci. Consider it insurance against somehow pring reftracking on accident - if (QDEL_HINT_IFFAIL_FINDREFERENCE) //qdel will, if REFERENCE_TRACKING is enabled and the object fails to collect, display all references to this object. - SSgarbage.Queue(D) - SSgarbage.reference_find_on_fail[FAST_REF(D)] = TRUE + SSgarbage.Queue(to_delete) + if (QDEL_HINT_HARDDEL) //qdel should assume this object won't gc, and queue a hard delete + SSgarbage.Queue(to_delete, GC_QUEUE_HARDDELETE) + if (QDEL_HINT_HARDDEL_NOW) //qdel should assume this object won't gc, and hard del it post haste. + SSgarbage.HardDelete(to_delete) + #ifdef REFERENCE_TRACKING + if (QDEL_HINT_FINDREFERENCE) //qdel will, if REFERENCE_TRACKING is enabled, display all references to this object, then queue the object for deletion. + SSgarbage.Queue(to_delete) + INVOKE_ASYNC(to_delete, TYPE_PROC_REF(/datum, find_references)) + if (QDEL_HINT_IFFAIL_FINDREFERENCE) //qdel will, if REFERENCE_TRACKING is enabled and the object fails to collect, display all references to this object. + SSgarbage.Queue(to_delete) + SSgarbage.reference_find_on_fail[text_ref(to_delete)] = TRUE + #endif + else + #ifdef TESTING + if(!trash.no_hint) + testing("WARNING: [to_delete.type] is not returning a qdel hint. It is being placed in the queue. Further instances of this type will also be queued.") #endif - else - #ifdef TESTING - if(!I.no_hint) - testing("WARNING: [D.type] is not returning a qdel hint. It is being placed in the queue. Further instances of this type will also be queued.") - #endif - I.no_hint++ - SSgarbage.Queue(D) - else if(D.gc_destroyed == GC_CURRENTLY_BEING_QDELETED) - CRASH("[D.type] destroy proc was called multiple times, likely due to a qdel loop in the Destroy logic") + trash.no_hint++ + SSgarbage.Queue(to_delete) diff --git a/code/datums/datum.dm b/code/datums/datum.dm index 5de92c7d2911a..270c870bedef5 100644 --- a/code/datums/datum.dm +++ b/code/datums/datum.dm @@ -64,6 +64,10 @@ #endif #endif + // If we have called dump_harddel_info already. Used to avoid duped calls (since we call it immediately in some cases on failure to process) + // Create and destroy is weird and I wanna cover my bases + var/harddel_deets_dumped = FALSE + #ifdef DATUMVAR_DEBUGGING_MODE var/list/cached_vars #endif @@ -267,3 +271,16 @@ return SEND_SIGNAL(source, COMSIG_CD_RESET(index), S_TIMER_COOLDOWN_TIMELEFT(source, index)) TIMER_COOLDOWN_END(source, index) + +/// Return text from this proc to provide extra context to hard deletes that happen to it +/// Optional, you should use this for cases where replication is difficult and extra context is required +/// Can be called more then once per object, use harddel_deets_dumped to avoid duplicate calls (I am so sorry) +/datum/proc/dump_harddel_info() + return + +///images are pretty generic, this should help a bit with tracking harddels related to them +/image/dump_harddel_info() + if(harddel_deets_dumped) + return + harddel_deets_dumped = TRUE + return "Image icon: [icon] - icon_state: [icon_state] [loc ? "loc: [loc] ([loc.x],[loc.y],[loc.z])" : ""]" diff --git a/code/datums/map_config.dm b/code/datums/map_config.dm index e6b094acc077b..2361303ae9416 100644 --- a/code/datums/map_config.dm +++ b/code/datums/map_config.dm @@ -40,6 +40,9 @@ /// Is night lighting allowed to occur on this station? var/allow_night_lighting = TRUE + /// List of unit tests that are skipped when running this map + var/list/skipped_tests + //====== // Starlight Settings //====== @@ -181,6 +184,16 @@ planet_mass = text2num(json["planet_mass"]) || planet_mass planet_radius = text2num(json["planet_radius"]) || planet_radius +#ifdef UNIT_TESTS + // Check for unit tests to skip, no reason to check these if we're not running tests + for(var/path_as_text in json["ignored_unit_tests"]) + var/path_real = text2path(path_as_text) + if(!ispath(path_real, /datum/unit_test)) + stack_trace("Invalid path in mapping config for ignored unit tests: \[[path_as_text]\]") + continue + LAZYADD(skipped_tests, path_real) +#endif + defaulted = FALSE return TRUE #undef CHECK_EXISTS diff --git a/code/datums/progressbar.dm b/code/datums/progressbar.dm index e9d1f11857ccd..ecc24b4e64555 100644 --- a/code/datums/progressbar.dm +++ b/code/datums/progressbar.dm @@ -135,6 +135,13 @@ QDEL_IN(src, PROGRESSBAR_ANIMATION_TIME) +///Progress bars are very generic, and what hangs a ref to them depends heavily on the context in which they're used +///So let's make hunting harddels easier yeah? +/datum/progressbar/dump_harddel_info() + if(harddel_deets_dumped) + return + harddel_deets_dumped = TRUE + return "Location type: [bar_loc.type], User type: [user.type]" #undef PROGRESSBAR_ANIMATION_TIME #undef PROGRESSBAR_HEIGHT diff --git a/code/game/area/area_color_correction.dm b/code/game/area/area_color_correction.dm index 63dd18fbda70d..2e76ecae4fae6 100644 --- a/code/game/area/area_color_correction.dm +++ b/code/game/area/area_color_correction.dm @@ -4,8 +4,7 @@ colour vs color */ -/mob - var/current_correction +/mob/var/current_correction /datum/client_colour/area_color colour = list(rgb(255, 0, 0), rgb(0, 255, 0), rgb(0, 0, 255)) diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm index 187bcdbb04acf..4990b81131ab8 100644 --- a/code/game/gamemodes/sandbox/h_sandbox.dm +++ b/code/game/gamemodes/sandbox/h_sandbox.dm @@ -2,8 +2,8 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE) -/mob - var/datum/hSB/sandbox = null +/mob/var/datum/hSB/sandbox = null + /mob/proc/CanBuild() sandbox = new/datum/hSB sandbox.owner = src.ckey diff --git a/code/game/objects/effects/wanted_poster.dm b/code/game/objects/effects/wanted_poster.dm index 92f29bd14f302..5fb37ab4756e4 100644 --- a/code/game/objects/effects/wanted_poster.dm +++ b/code/game/objects/effects/wanted_poster.dm @@ -7,6 +7,8 @@ */ +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/poster/wanted) + /obj/item/poster/wanted icon_state = "rolled_poster" var/postHeaderText = "WANTED" // MAX 7 Characters diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index b2613c87ab729..f7d829ccb212d 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -1,3 +1,5 @@ +CREATION_TEST_IGNORE_SELF(/obj) + /obj animate_movement = SLIDE_STEPS speech_span = SPAN_ROBOT diff --git a/code/game/turfs/baseturf_skipover.dm b/code/game/turfs/baseturf_skipover.dm index b90b79af2940e..7031e11bcc8f5 100644 --- a/code/game/turfs/baseturf_skipover.dm +++ b/code/game/turfs/baseturf_skipover.dm @@ -1,3 +1,5 @@ +CREATION_TEST_IGNORE_SUBTYPES(/turf/baseturf_skipover) + // This is a typepath to just sit in baseturfs and act as a marker for other things. /turf/baseturf_skipover name = "Baseturf skipover placeholder" @@ -13,6 +15,8 @@ name = "Shuttle baseturf skipover" desc = "Acts as the bottom of the shuttle, if this isn't here the shuttle floor is broken through." +CREATION_TEST_IGNORE_SUBTYPES(/turf/baseturf_bottom) + /turf/baseturf_bottom name = "Z-level baseturf placeholder" desc = "Marker for z-level baseturf, usually resolves to space." diff --git a/code/game/turfs/closed/_closed.dm b/code/game/turfs/closed/_closed.dm index 739d65c64f941..d5c58225c5352 100644 --- a/code/game/turfs/closed/_closed.dm +++ b/code/game/turfs/closed/_closed.dm @@ -1,3 +1,5 @@ +CREATION_TEST_IGNORE_SELF(/turf/closed) + /turf/closed layer = CLOSED_TURF_LAYER opacity = TRUE diff --git a/code/game/turfs/open/_open.dm b/code/game/turfs/open/_open.dm index 9f33454d776b7..92ae1a410434b 100644 --- a/code/game/turfs/open/_open.dm +++ b/code/game/turfs/open/_open.dm @@ -1,3 +1,5 @@ +CREATION_TEST_IGNORE_SELF(/turf/open) + /turf/open plane = FLOOR_PLANE can_hit = FALSE diff --git a/code/game/turfs/open/openspace.dm b/code/game/turfs/open/openspace.dm index caa997873b427..4cef4cfdf32af 100644 --- a/code/game/turfs/open/openspace.dm +++ b/code/game/turfs/open/openspace.dm @@ -1,3 +1,5 @@ +CREATION_TEST_IGNORE_SUBTYPES(/turf/open/openspace) + /turf/open/openspace name = "open space" desc = "Watch your step!" diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 031d6392a9fb5..2a1875a7ad17d 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -1,5 +1,8 @@ GLOBAL_LIST_EMPTY(station_turfs) GLOBAL_LIST_EMPTY(created_baseturf_lists) + +CREATION_TEST_IGNORE_SELF(/turf) + /turf icon = 'icons/turf/floors.dmi' vis_flags = VIS_INHERIT_ID|VIS_INHERIT_PLANE // Important for interaction with and visualization of openspace. diff --git a/code/game/world.dm b/code/game/world.dm index 3e3d765fa1148..1cbcc36e48c43 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -163,7 +163,7 @@ GLOBAL_VAR(restart_counter) GLOB.tgui_log = "[GLOB.log_directory]/tgui.log" GLOB.prefs_log = "[GLOB.log_directory]/preferences.log" -#ifdef UNIT_TESTS +#if defined(UNIT_TESTS) || defined(SPACEMAN_DMM) GLOB.test_log = file("[GLOB.log_directory]/tests.log") start_log(GLOB.test_log) #endif diff --git a/code/modules/admin/view_variables/debug_variable_appearance.dm b/code/modules/admin/view_variables/debug_variable_appearance.dm index faed4f45f41cb..1ed05573f993f 100644 --- a/code/modules/admin/view_variables/debug_variable_appearance.dm +++ b/code/modules/admin/view_variables/debug_variable_appearance.dm @@ -8,6 +8,8 @@ #define ADD_UNUSED_VAR(varlist, thing, varname) if(NAMEOF(##thing, ##varname)) ##varlist += #varname #define RESULT_VARIABLE_NOT_FOUND "_switch_result_variable_not_found" +CREATION_TEST_IGNORE_SELF(/image/appearance) + /// An alias datum that allows us to access and view the variables of an appearance by keeping certain known, yet undocumented, variables that we can access and read in a datum for debugging purposes. /// Kindly do not use this outside of a debugging context. /image/appearance diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm index 307a09807e2dc..96cd0d41662b8 100644 --- a/code/modules/awaymissions/corpse.dm +++ b/code/modules/awaymissions/corpse.dm @@ -2,6 +2,8 @@ //To do: Allow corpses to appear mangled, bloody, etc. Allow customizing the bodies appearance (they're all bald and white right now). +CREATION_TEST_IGNORE_SELF(/obj/effect/mob_spawn) + /obj/effect/mob_spawn name = "Unknown" density = TRUE diff --git a/code/modules/cargo/supplypod.dm b/code/modules/cargo/supplypod.dm index 6f7043fd0ac3b..26918cf46c969 100644 --- a/code/modules/cargo/supplypod.dm +++ b/code/modules/cargo/supplypod.dm @@ -541,6 +541,8 @@ verticle_offset = initial(verticle_offset) pixel_y = verticle_offset +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/pod_landingzone_effect) + /obj/effect/pod_landingzone_effect name = "" desc = "" @@ -553,6 +555,8 @@ transform = matrix() * 1.5 animate(src, transform = matrix()*0.01, time = pod.delays[POD_TRANSIT]+pod.delays[POD_FALLING]) +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/pod_landingzone) + /obj/effect/pod_landingzone //This is the object that forceMoves the supplypod to it's location name = "Landing Zone Indicator" desc = "A holographic projection designating the landing zone of something. It's probably best to stand back." diff --git a/code/modules/client/client_colour.dm b/code/modules/client/client_colour.dm index 4d2560e591a6f..ffa3f9c25af40 100644 --- a/code/modules/client/client_colour.dm +++ b/code/modules/client/client_colour.dm @@ -53,8 +53,7 @@ else owner.update_client_colour() -/mob - var/list/client_colours = list() +/mob/var/list/client_colours = list() /** * Adds an instance of colour_type to the mob's client_colours list diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index 03af9aaad50de..bbbc4eaa5206e 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -3,6 +3,8 @@ // Data from the seeds carry over to these grown foods // *********************************************************** +CREATION_TEST_IGNORE_SELF(/obj/item/food/grown) + // Base type. Subtypes are found in /grown dir. Lavaland-based subtypes can be found in mining/ash_flora.dm /obj/item/food/grown icon = 'icons/obj/hydroponics/harvest.dmi' diff --git a/code/modules/keybindings/focus.dm b/code/modules/keybindings/focus.dm index 205b293e9a1a1..475f663a6bbe8 100644 --- a/code/modules/keybindings/focus.dm +++ b/code/modules/keybindings/focus.dm @@ -1,5 +1,4 @@ -/mob - var/datum/focus //What receives our keyboard inputs. src by default +/mob/var/datum/focus //What receives our keyboard inputs. src by default /mob/proc/set_focus(datum/new_focus) if(focus == new_focus) diff --git a/code/modules/mapping/mapping_helpers.dm b/code/modules/mapping/mapping_helpers.dm index b5c3d7ae0534f..e61e7ee15b17e 100644 --- a/code/modules/mapping/mapping_helpers.dm +++ b/code/modules/mapping/mapping_helpers.dm @@ -1,6 +1,6 @@ //Landmarks and other helpers which speed up the mapping process and reduce the number of unique instances/subtypes of items/turf/ect - +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/baseturf_helper) /obj/effect/baseturf_helper //Set the baseturfs of every turf in the /area/ it is placed. name = "baseturf editor" @@ -87,6 +87,7 @@ name = "lavaland baseturf editor" baseturf = /turf/open/lava/smooth/lava_land_surface +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/mapping_helpers) /obj/effect/mapping_helpers icon = 'icons/effects/mapping_helpers.dmi' diff --git a/code/modules/mapping/merge_conflicts.dm b/code/modules/mapping/merge_conflicts.dm index 7bc502e59598a..77c53d6bbea89 100644 --- a/code/modules/mapping/merge_conflicts.dm +++ b/code/modules/mapping/merge_conflicts.dm @@ -2,6 +2,8 @@ // We define it explicitly here to ensure that it shows up on the highest possible plane (while giving off a verbose icon) to aide mappers in resolving these conflicts. // DO NOT USE THIS IN NORMAL MAPPING!!! Linters WILL fail. +CREATION_TEST_IGNORE_SELF(/obj/merge_conflict_marker) + /obj/merge_conflict_marker name = "Merge Conflict Marker - DO NOT USE" icon = 'icons/effects/mapping_helpers.dmi' diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 30e08eeb84c6e..8d84c8ce389cc 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -1,3 +1,5 @@ +CREATION_TEST_IGNORE_SELF(/mob/living/carbon) + /mob/living/carbon blood_volume = BLOOD_VOLUME_NORMAL diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 90b7b70b2be9f..428c0702bf77f 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -1,3 +1,5 @@ +CREATION_TEST_IGNORE_SELF(/mob) + /** * The mob, usually meant to be a creature of some type * diff --git a/code/modules/modular_computers/computers/item/processor.dm b/code/modules/modular_computers/computers/item/processor.dm index c01d014d6e9c7..ac8c91c562263 100644 --- a/code/modules/modular_computers/computers/item/processor.dm +++ b/code/modules/modular_computers/computers/item/processor.dm @@ -1,5 +1,8 @@ // Held by /obj/machinery/modular_computer to reduce amount of copy-pasted code. //TODO: REFACTOR THIS SPAGHETTI CODE, MAKE IT A COMPUTER_HARDWARE COMPONENT OR REMOVE IT + +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/modular_computer/processor) + /obj/item/modular_computer/processor name = "processing unit" desc = "You shouldn't see this. If you do, report it." diff --git a/code/modules/research/xenobiology/crossbreeding/gentle.dm b/code/modules/research/xenobiology/crossbreeding/gentle.dm index f44cd2a4c7287..442a20345a63d 100644 --- a/code/modules/research/xenobiology/crossbreeding/gentle.dm +++ b/code/modules/research/xenobiology/crossbreeding/gentle.dm @@ -1,3 +1,5 @@ +CREATION_TEST_IGNORE_SELF(/obj/item/slimecross/gentle) + /obj/item/slimecross/gentle name = "gentle extract" desc = "It pulses slowly, as if breathing." diff --git a/code/modules/research/xenobiology/crossbreeding/recurring.dm b/code/modules/research/xenobiology/crossbreeding/recurring.dm index 7b49ad37866dc..4b4671155434f 100644 --- a/code/modules/research/xenobiology/crossbreeding/recurring.dm +++ b/code/modules/research/xenobiology/crossbreeding/recurring.dm @@ -3,6 +3,9 @@ Recurring extracts: Generates a new charge every few seconds. If depleted of its' last charge, stops working. */ + +CREATION_TEST_IGNORE_SELF(/obj/item/slimecross/recurring) + /obj/item/slimecross/recurring name = "recurring extract" desc = "A tiny, glowing core, wrapped in several layers of goo." diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index a8461d69d042d..a9f3c0d348a7e 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -10,6 +10,8 @@ GLOBAL_LIST_INIT(shuttle_turf_blacklist, typecacheof(list( /turf/open/floor/dock/drydock ))) +CREATION_TEST_IGNORE_SUBTYPES(/obj/docking_port) + //NORTH default dir /obj/docking_port invisibility = INVISIBILITY_ABSTRACT diff --git a/code/modules/unit_tests/create_and_destroy.dm b/code/modules/unit_tests/create_and_destroy.dm index a8cba85919bbd..cf2cd51d27bd1 100644 --- a/code/modules/unit_tests/create_and_destroy.dm +++ b/code/modules/unit_tests/create_and_destroy.dm @@ -1,100 +1,29 @@ ///Delete one of every type, sleep a while, then check to see if anything has gone fucky /datum/unit_test/create_and_destroy - //You absolutely must run last - priority = TEST_DEL_WORLD + //You absolutely must run after (almost) everything else + priority = TEST_CREATE_AND_DESTROY +GLOBAL_VAR_INIT(running_create_and_destroy, FALSE) /datum/unit_test/create_and_destroy/Run() //We'll spawn everything here var/turf/spawn_at = run_loc_floor_bottom_left - var/list/ignore = list( - //this is somehow a subtype of /atom/movable, because of its purpose... - /image/appearance, - //Never meant to be created, errors out the ass for mobcode reasons - /mob/living/carbon, - //Nother template type, doesn't like being created with no seed - /obj/item/food/grown, - //And another - /obj/item/slimecross/recurring, - //This should be obvious - /obj/machinery/doomsday_device, - //Template type - /obj/effect/mob_spawn, - //Say it with me now, type template - /obj/effect/mapping_helpers/component_injector, - //Singleton - /mob/dview, - //Xenobio basetypes - /obj/item/slimecross/gentle, - ) - //This turf existing is an error in and of itself - ignore += typesof(/turf/baseturf_skipover) - ignore += typesof(/turf/baseturf_bottom) - ignore += typesof(/turf/template_noop) - //This one demands a computer, ditto - ignore += typesof(/obj/item/modular_computer/processor) - //Needs special input, let's be nice - ignore += typesof(/obj/effect/abstract/proximity_checker) - //Very finiky, blacklisting to make things easier - ignore += typesof(/obj/item/poster/wanted) - //We can't pass a mind into this - ignore += typesof(/obj/item/phylactery) - //This expects a seed, we can't pass it - ignore += typesof(/obj/item/food/grown) - //Nothing to hallucinate if there's nothing to hallicinate - ignore += typesof(/obj/effect/hallucination) - //Can't pass in a thing to glow - ignore += typesof(/obj/effect/abstract/eye_lighting) - //It wants a lot more context then we have - ignore += typesof(/obj/effect/buildmode_line) - //We don't have a pod - ignore += typesof(/obj/effect/pod_landingzone_effect) - ignore += typesof(/obj/effect/pod_landingzone) - //We don't have a disease to pass in - ignore += typesof(/obj/effect/mapping_helpers/component_injector/infective) - //There's no shapeshift to hold - ignore += typesof(/obj/shapeshift_holder) - //No tauma to pass in - ignore += typesof(/mob/camera/imaginary_friend) - //No pod to gondola - ignore += typesof(/mob/living/simple_animal/pet/gondola/gondolapod) - //No linked console - ignore += typesof(/mob/camera/ai_eye/remote/base_construction) - //See above - ignore += typesof(/mob/camera/ai_eye/remote/shuttle_docker) - //Hangs a ref post invoke async, which we don't support. Could put a qdeleted check but it feels hacky - ignore += typesof(/obj/effect/anomaly/grav/high) - //See above - ignore += typesof(/obj/effect/timestop) - //Invoke async in init, skippppp - ignore += typesof(/mob/living/silicon/robot/modules) - //This lad also sleeps - ignore += typesof(/obj/item/hilbertshotel) - //this boi spawns turf changing stuff, and it stacks and causes pain. Let's just not - ignore += typesof(/obj/effect/sliding_puzzle) - //Stacks baseturfs, can't be tested here - ignore += typesof(/obj/effect/temp_visual/lava_warning) - //Our system doesn't support it without warning spam from unregister calls on things that never registered - ignore += typesof(/obj/docking_port) - //Asks for a shuttle that may not exist, let's leave it alone - ignore += typesof(/obj/item/pinpointer/shuttle) - //This spawns beams as a part of init, which can sleep past an async proc. This hangs a ref, and fucks us. It's only a problem here because the beam sleeps with CHECK_TICK - ignore += typesof(/obj/structure/alien/resin/flower_bud) - //Expects a mob to holderize, we have nothing to give - ignore += typesof(/obj/item/clothing/head/mob_holder) - //Expects a hud, generally created for player occupied mobs. There won't be any and this causes issues for us. - ignore += typesof(/atom/movable/plane_master_controller) var/list/cached_contents = spawn_at.contents.Copy() - var/baseturf_count = length(spawn_at.baseturfs) + var/original_turf_type = spawn_at.type + var/original_baseturfs = islist(spawn_at.baseturfs) ? spawn_at.baseturfs.Copy() : spawn_at.baseturfs + var/original_baseturf_count = length(original_baseturfs) - for(var/type_path in typesof(/atom/movable, /turf) - ignore) //No areas please + GLOB.running_create_and_destroy = TRUE + for(var/type_path in typesof(/atom/movable, /turf) - uncreatables) //No areas please if(ispath(type_path, /turf)) - spawn_at.ChangeTurf(type_path, /turf/baseturf_skipover) - //We change it back to prevent pain, please don't ask - spawn_at.ChangeTurf(/turf/open/floor/wood, /turf/baseturf_skipover) - if(baseturf_count != length(spawn_at.baseturfs)) - TEST_FAIL("[type_path] changed the amount of baseturfs we have [baseturf_count] -> [length(spawn_at.baseturfs)]") - baseturf_count = length(spawn_at.baseturfs) + spawn_at.ChangeTurf(type_path) + //We change it back to prevent baseturfs stacking and hitting the limit + spawn_at.ChangeTurf(original_turf_type, original_baseturfs) + if(original_baseturf_count != length(spawn_at.baseturfs)) + TEST_FAIL("[type_path] changed the amount of baseturfs from [original_baseturf_count] to [length(spawn_at.baseturfs)]; [english_list(original_baseturfs)] to [islist(spawn_at.baseturfs) ? english_list(spawn_at.baseturfs) : spawn_at.baseturfs]") + //Warn if it changes again + original_baseturfs = islist(spawn_at.baseturfs) ? spawn_at.baseturfs.Copy() : spawn_at.baseturfs + original_baseturf_count = length(original_baseturfs) else var/atom/creation = new type_path(spawn_at) if(QDELETED(creation)) @@ -111,35 +40,49 @@ for(var/atom/to_kill in to_del) qdel(to_kill) - //Hell code, we're bound to have ended the round somehow so let's stop if from ending while we work - SSticker.delay_end = TRUE - //Prevent the garbage subsystem from harddeling anything, if only to save time - SSgarbage.collection_timeout[GC_QUEUE_HARDDELETE] = 10000 HOURS + GLOB.running_create_and_destroy = FALSE + + // Drastically lower the amount of time it takes to GC, since we don't have clients that can hold it up. + SSgarbage.collection_timeout[GC_QUEUE_CHECK] = 10 SECONDS //Clear it, just in case cached_contents.Cut() + var/list/queues_we_care_about = list() + // All of em, I want hard deletes too, since we rely on the debug info from them + for(var/i in 1 to GC_QUEUE_HARDDELETE) + queues_we_care_about += i + //Now that we've qdel'd everything, let's sleep until the gc has processed all the shit we care about - var/time_needed = SSgarbage.collection_timeout[GC_QUEUE_CHECK] + // + 2 seconds to ensure that everything gets in the queue. + var/time_needed = 2 SECONDS + for(var/index in queues_we_care_about) + time_needed += SSgarbage.collection_timeout[index] + var/start_time = world.time + var/real_start_time = REALTIMEOFDAY var/garbage_queue_processed = FALSE sleep(time_needed) while(!garbage_queue_processed) - var/list/queue_to_check = SSgarbage.queues[GC_QUEUE_CHECK] - //How the hell did you manage to empty this? Good job! - if(!length(queue_to_check)) - garbage_queue_processed = TRUE - break + var/oldest_packet_creation = INFINITY + for(var/index in queues_we_care_about) + var/list/queue_to_check = SSgarbage.queues[index] + if(!length(queue_to_check)) + continue + + var/list/oldest_packet = queue_to_check[1] + //Pull out the time we inserted at + var/qdeld_at = oldest_packet[GC_QUEUE_ITEM_GCD_DESTROYED] + + oldest_packet_creation = min(qdeld_at, oldest_packet_creation) - var/list/oldest_packet = queue_to_check[1] - //Pull out the time we deld at - var/qdeld_at = oldest_packet[1] //If we've found a packet that got del'd later then we finished, then all our shit has been processed - if(qdeld_at > start_time) + //That said, if there are any pending hard deletes you may NOT sleep, we gotta handle that shit + if(oldest_packet_creation > start_time && !length(SSgarbage.queues[GC_QUEUE_HARDDELETE])) garbage_queue_processed = TRUE break - if(world.time > start_time + time_needed + 30 MINUTES) //If this gets us gitbanned I'm going to laugh so hard + if(REALTIMEOFDAY > real_start_time + time_needed + 50 MINUTES) //If this gets us gitbanned I'm going to laugh so hard TEST_FAIL("Something has gone horribly wrong, the garbage queue has been processing for well over 30 minutes. What the hell did you do") break @@ -158,6 +101,9 @@ TEST_FAIL("[item.name] failed to respect force deletion [item.no_respect_force] times out of a total del count of [item.qdels]") if(item.no_hint) TEST_FAIL("[item.name] failed to return a qdel hint [item.no_hint] times out of a total del count of [item.qdels]") + //if(LAZYLEN(item.extra_details)) + // var/details = item.extra_details.Join("\n") + // TEST_FAIL("[item.name] failed with extra info: \n[details]") cache_for_sonic_speed = SSatoms.BadInitializeCalls for(var/path in cache_for_sonic_speed) @@ -165,10 +111,9 @@ if(fails & BAD_INIT_NO_HINT) TEST_FAIL("[path] didn't return an Initialize hint") if(fails & BAD_INIT_QDEL_BEFORE) - TEST_FAIL("[path] qdel'd in New()") + TEST_FAIL("[path] qdel'd before we could call Initialize()") if(fails & BAD_INIT_SLEPT) TEST_FAIL("[path] slept during Initialize()") - SSticker.delay_end = FALSE //This shouldn't be needed, but let's be polite - SSgarbage.collection_timeout[GC_QUEUE_HARDDELETE] = 10 SECONDS + SSgarbage.collection_timeout[GC_QUEUE_CHECK] = GC_CHECK_QUEUE diff --git a/code/modules/unit_tests/unit_test.dm b/code/modules/unit_tests/unit_test.dm index 69f3208cdb29a..0bcb6b40c1d59 100644 --- a/code/modules/unit_tests/unit_test.dm +++ b/code/modules/unit_tests/unit_test.dm @@ -13,7 +13,22 @@ You can use the run_loc_floor_bottom_left and run_loc_floor_top_right to get tur GLOBAL_DATUM(current_test, /datum/unit_test) GLOBAL_VAR_INIT(failed_any_test, FALSE) -GLOBAL_VAR(test_log) +/// When unit testing, all logs sent to log_mapping are stored here and retrieved in log_mapping unit test. +GLOBAL_LIST_EMPTY(unit_test_mapping_logs) +/// Global assoc list of required mapping items, [item typepath] to [required item datum]. +GLOBAL_LIST_EMPTY(required_map_items) + +/// A list of every test that is currently focused. +/// Use the PERFORM_ALL_TESTS macro instead. +GLOBAL_VAR_INIT(focused_tests, focused_tests()) + +/proc/focused_tests() + var/list/focused_tests = list() + for (var/datum/unit_test/unit_test as anything in subtypesof(/datum/unit_test)) + if (initial(unit_test.focus)) + focused_tests += unit_test + + return focused_tests.len > 0 ? focused_tests : null /datum/unit_test //Bit of metadata for the future maybe @@ -32,6 +47,12 @@ GLOBAL_VAR(test_log) var/list/allocated var/list/fail_reasons + /// Do not instantiate if type matches this + var/abstract_type = /datum/unit_test + + /// List of atoms that we don't want to ever initialize in an agnostic context, like for Create and Destroy. Stored on the base datum for usability in other relevant tests that need this data. + var/static/list/uncreatables = null + var/static/datum/space_level/reservation /proc/cmp_unit_test_priority(datum/unit_test/a, datum/unit_test/b) @@ -42,6 +63,9 @@ GLOBAL_VAR(test_log) var/datum/map_template/unit_tests/template = new reservation = template.load_new_z() + if (isnull(uncreatables)) + uncreatables = build_list_of_uncreatables() + allocated = new run_loc_floor_bottom_left = get_turf(locate(/obj/effect/landmark/unit_test_bottom_left) in GLOB.landmarks_list) run_loc_floor_top_right = get_turf(locate(/obj/effect/landmark/unit_test_top_right) in GLOB.landmarks_list) @@ -52,7 +76,7 @@ GLOBAL_VAR(test_log) /datum/unit_test/Destroy() QDEL_LIST(allocated) // clear the test area - for (var/turf/turf in block(locate(1, 1, run_loc_floor_bottom_left.z), locate(world.maxx, world.maxy, run_loc_floor_bottom_left.z))) + for (var/turf/turf in Z_TURFS(run_loc_floor_bottom_left.z)) for (var/content in turf.contents) if (istype(content, /obj/effect/landmark)) continue @@ -60,7 +84,7 @@ GLOBAL_VAR(test_log) return ..() /datum/unit_test/proc/Run() - TEST_FAIL("Run() called parent or not implemented") + TEST_FAIL("[type]/Run() called parent or not implemented") /datum/unit_test/proc/Fail(reason = "No reason", file = "OUTDATED_TEST", line = 1) succeeded = FALSE @@ -74,14 +98,61 @@ GLOBAL_VAR(test_log) /// Instances allocated through this proc will be destroyed when the test is over /datum/unit_test/proc/allocate(type, ...) var/list/arguments = args.Copy(2) - if (!arguments.len) - arguments = list(run_loc_floor_bottom_left) - else if (arguments[1] == null) - arguments[1] = run_loc_floor_bottom_left - var/instance = new type(arglist(arguments)) + if(ispath(type, /atom)) + if (!arguments.len) + arguments = list(run_loc_floor_bottom_left) + else if (arguments[1] == null) + arguments[1] = run_loc_floor_bottom_left + var/instance + // Byond will throw an index out of bounds if arguments is empty in that arglist call. Sigh + if(length(arguments)) + instance = new type(arglist(arguments)) + else + instance = new type() allocated += instance return instance +/// Resets the air of our testing room to its default +/datum/unit_test/proc/restore_atmos() + var/area/working_area = run_loc_floor_bottom_left.loc + var/list/turf/to_restore = working_area.get_contained_turfs() + for(var/turf/open/restore in to_restore) + restore.Initalize_Atmos() + +/datum/unit_test/proc/test_screenshot(name, icon/icon) + if (!istype(icon)) + TEST_FAIL("[icon] is not an icon.") + return + + var/path_prefix = replacetext(replacetext("[type]", "/datum/unit_test/", ""), "/", "_") + name = replacetext(name, "/", "_") + + var/filename = "code/modules/unit_tests/screenshots/[path_prefix]_[name].png" + + if (fexists(filename)) + var/data_filename = "data/screenshots/[path_prefix]_[name].png" + fcopy(icon, data_filename) + log_test("\t[path_prefix]_[name] was found, putting in data/screenshots") + else if (fexists("code")) + // We are probably running in a local build + fcopy(icon, filename) + TEST_FAIL("Screenshot for [name] did not exist. One has been created.") + else + // We are probably running in real CI, so just pretend it worked and move on + fcopy(icon, "data/screenshots_new/[path_prefix]_[name].png") + + log_test("\t[path_prefix]_[name] was put in data/screenshots_new") + +/// Helper for screenshot tests to take an image of an atom from all directions and insert it into one icon +/datum/unit_test/proc/get_flat_icon_for_all_directions(atom/thing, no_anim = TRUE) + var/icon/output = icon('icons/effects/effects.dmi', "nothing") + + for (var/direction in GLOB.cardinals) + var/icon/partial = getFlatIcon(thing, defdir = direction, no_anim = no_anim) + output.Insert(partial, dir = direction) + + return output + /// Logs a test message. Will use GitHub action syntax found at https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions /datum/unit_test/proc/log_for_test(text, priority, file, line) var/map_name = SSmapping.config.map_name @@ -92,49 +163,69 @@ GLOBAL_VAR(test_log) log_world("::[priority] file=[file],line=[line],title=[map_name]: [type]::[annotation_text]") -/proc/RunUnitTest(test_path, list/test_results) +/proc/RunUnitTest(datum/unit_test/test_path, list/test_results) + if(initial(test_path.abstract_type) == test_path) + return var/datum/unit_test/test = new test_path GLOB.current_test = test var/duration = REALTIMEOFDAY + var/skip_test = (test_path in SSmapping.config.skipped_tests) + var/test_output_desc = "[test_path]" + var/message = "" log_world("::group::[test_path]") - test.Run() - duration = REALTIMEOFDAY - duration - GLOB.current_test = null - GLOB.failed_any_test |= !test.succeeded + if(skip_test) + log_world("[TEST_OUTPUT_YELLOW("SKIPPED")] Skipped run on map [SSmapping.config.map_name].") + + else + + test.Run() + test.restore_atmos() - var/list/log_entry = list() - var/list/fail_reasons = test.fail_reasons + duration = REALTIMEOFDAY - duration + GLOB.current_test = null + GLOB.failed_any_test |= !test.succeeded - for(var/reasonID in 1 to LAZYLEN(fail_reasons)) - var/text = fail_reasons[reasonID][1] - var/file = fail_reasons[reasonID][2] - var/line = fail_reasons[reasonID][3] + var/list/log_entry = list() + var/list/fail_reasons = test.fail_reasons - test.log_for_test(text, "error", file, line) + for(var/reasonID in 1 to LAZYLEN(fail_reasons)) + var/text = fail_reasons[reasonID][1] + var/file = fail_reasons[reasonID][2] + var/line = fail_reasons[reasonID][3] - // Normal log message - log_entry += "\tFAILURE #[reasonID]: [text] at [file]:[line]" + test.log_for_test(text, "error", file, line) - var/message = log_entry.Join("\n") - log_test(message) + // Normal log message + log_entry += "\tFAILURE #[reasonID]: [text] at [file]:[line]" - var/test_output_desc = "[test_path] [duration / 10]s" - if (test.succeeded) - log_world("[TEST_OUTPUT_GREEN("PASS")] [test_output_desc]") + if(length(log_entry)) + message = log_entry.Join("\n") + log_test(message) + + test_output_desc += " [duration / 10]s" + if (test.succeeded) + log_world("[TEST_OUTPUT_GREEN("PASS")] [test_output_desc]") log_world("::endgroup::") - if (!test.succeeded) + if (!test.succeeded && !skip_test) log_world("::error::[TEST_OUTPUT_RED("FAIL")] [test_output_desc]") - test_results[test_path] = list("status" = test.succeeded ? UNIT_TEST_PASSED : UNIT_TEST_FAILED, "message" = message, "name" = test_path) + var/final_status = skip_test ? UNIT_TEST_SKIPPED : (test.succeeded ? UNIT_TEST_PASSED : UNIT_TEST_FAILED) + test_results[test_path] = list("status" = final_status, "message" = message, "name" = test_path) qdel(test) +/// Builds (and returns) a list of atoms that we shouldn't initialize in generic testing, like Create and Destroy. +/// It is appreciated to add the reason why the atom shouldn't be initialized if you add it to this list. +/datum/unit_test/proc/build_list_of_uncreatables() + RETURN_TYPE(/list) + return list() + /proc/RunUnitTests() CHECK_TICK @@ -147,26 +238,24 @@ GLOBAL_VAR(test_log) if(length(focused_tests)) tests_to_run = focused_tests - tests_to_run = sortTim(tests_to_run, GLOBAL_PROC_REF(cmp_unit_test_priority)) + sortTim(tests_to_run, GLOBAL_PROC_REF(cmp_unit_test_priority)) var/list/test_results = list() + //Hell code, we're bound to end the round somehow so let's stop if from ending while we work + SSticker.delay_end = TRUE for(var/unit_path in tests_to_run) CHECK_TICK //We check tick first because the unit test we run last may be so expensive that checking tick will lock up this loop forever RunUnitTest(unit_path, test_results) + SSticker.delay_end = FALSE var/file_name = "data/unit_tests.json" fdel(file_name) file(file_name) << json_encode(test_results) SSticker.force_ending = TRUE - //Comment from tgstation: We have to call this manually because del_text can preceed us, and SSticker doesn't fire in the post game - //We don't actually need to call standard_reboot, but leaving it under a condition in case it becomes necessary in the future. - //To my understanding, something triggers a reboot when it's created/deleted, which could interrupt the tests and restart the server. - //To prevent this, create_and_destroy prevents the reboot from happening. However, this also prevents the reboot from ever happening naturally. - //Because of this, in case something does actually attempt to reboot prematurely, we need to manually initiate the reboot. - if(SSticker.ready_for_reboot) - SSticker.standard_reboot() + //We have to call this manually because del_text can preceed us, and SSticker doesn't fire in the post game + SSticker.declare_completion() /datum/map_template/unit_tests name = "Unit Tests Zone" From 6168ff2bf1082c54e011ec24398b5ca4402a2c61 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 13:50:00 +0100 Subject: [PATCH 010/266] Fixes compilation issues --- code/__HELPERS/mobs.dm | 2 -- code/__HELPERS/test_helpers.dm | 9 +++++++++ code/modules/unit_tests/unit_test.dm | 6 ------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 325a496160511..3a763818771b6 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -614,8 +614,6 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) . = view(range, GLOB.dview_mob) GLOB.dview_mob.loc = null -CREATION_TEST_IGNORE_SELF(/mob/dview) - /mob/dview name = "INTERNAL DVIEW MOB" invisibility = 101 diff --git a/code/__HELPERS/test_helpers.dm b/code/__HELPERS/test_helpers.dm index da1b2cb78df93..29b51e7ceba10 100644 --- a/code/__HELPERS/test_helpers.dm +++ b/code/__HELPERS/test_helpers.dm @@ -1,5 +1,11 @@ #if defined(UNIT_TESTS) || defined(SPACEMAN_DMM) +/// Builds (and returns) a list of atoms that we shouldn't initialize in generic testing, like Create and Destroy. +/// It is appreciated to add the reason why the atom shouldn't be initialized if you add it to this list. +/datum/unit_test/proc/build_list_of_uncreatables() + RETURN_TYPE(/list) + return list() + #define CREATION_TEST_IGNORE_SELF(path)/datum/unit_test/build_list_of_uncreatables() {\ . = ..();\ . += path;\ @@ -10,6 +16,9 @@ . += typesof(path);\ } +// Annoyingly, dview is defined inside of _DEFINES, so we are doing it here +CREATION_TEST_IGNORE_SELF(/mob/dview) + #else #define CREATION_TEST_IGNORE_SELF(path) diff --git a/code/modules/unit_tests/unit_test.dm b/code/modules/unit_tests/unit_test.dm index 0bcb6b40c1d59..29cac1cdacb4b 100644 --- a/code/modules/unit_tests/unit_test.dm +++ b/code/modules/unit_tests/unit_test.dm @@ -220,12 +220,6 @@ GLOBAL_VAR_INIT(focused_tests, focused_tests()) qdel(test) -/// Builds (and returns) a list of atoms that we shouldn't initialize in generic testing, like Create and Destroy. -/// It is appreciated to add the reason why the atom shouldn't be initialized if you add it to this list. -/datum/unit_test/proc/build_list_of_uncreatables() - RETURN_TYPE(/list) - return list() - /proc/RunUnitTests() CHECK_TICK From 62dc42adca495535bdcab698e5085b480410084b Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 13:55:03 +0100 Subject: [PATCH 011/266] Update unit_test.dm --- code/modules/unit_tests/unit_test.dm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/code/modules/unit_tests/unit_test.dm b/code/modules/unit_tests/unit_test.dm index 29cac1cdacb4b..5c17a351c7a93 100644 --- a/code/modules/unit_tests/unit_test.dm +++ b/code/modules/unit_tests/unit_test.dm @@ -220,6 +220,17 @@ GLOBAL_VAR_INIT(focused_tests, focused_tests()) qdel(test) +/* + +SEE test_helpers.dm for the redefinition of this proc. +We use a modular approach to adding things to the ignore list, but unfortunately +that means the proc needs to be defined prior to everything else. + +/datum/unit_test/proc/build_list_of_uncreatables() + RETURN_TYPE(/list) + return list() +*/ + /proc/RunUnitTests() CHECK_TICK From b7e5598b73c7bd851f8b161b8d221ec7538781a7 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 13:55:45 +0100 Subject: [PATCH 012/266] Ignores anything that has an initialize which requires parameters --- code/_onclick/hud/credits.dm | 4 +++ code/_onclick/hud/holoparasite.dm | 2 ++ code/_onclick/hud/parallax.dm | 4 +++ .../hud/rendering/plane_master_controller.dm | 2 ++ code/_onclick/hud/screen_objects.dm | 8 +++++ code/controllers/master.dm | 2 ++ code/datums/brain_damage/imaginary_friend.dm | 2 ++ code/datums/brain_damage/mrat.dm | 2 ++ code/datums/brain_damage/split_personality.dm | 2 ++ code/datums/components/COMPONENT_TEMPLATE.md | 2 ++ code/datums/components/anti_magic.dm | 2 ++ code/datums/components/area_sound_manager.dm | 2 ++ code/datums/components/armor_plate.dm | 2 ++ code/datums/components/butchering.dm | 2 ++ code/datums/components/conveyor_movement.dm | 2 ++ code/datums/components/deadchat_control.dm | 2 ++ code/datums/components/deployable.dm | 2 ++ code/datums/components/drift.dm | 2 ++ code/datums/components/explodable.dm | 2 ++ code/datums/components/forensics.dm | 2 ++ code/datums/components/grillable.dm | 2 ++ code/datums/components/heirloom.dm | 2 ++ code/datums/components/knockoff.dm | 2 ++ code/datums/components/lockon_aiming.dm | 2 ++ code/datums/components/mirv.dm | 2 ++ code/datums/components/ntnet_interface.dm | 2 ++ code/datums/components/overlay_lighting.dm | 2 ++ code/datums/components/payment.dm | 2 ++ code/datums/components/remote_materials.dm | 2 ++ code/datums/components/shell.dm | 2 ++ code/datums/components/slippery.dm | 2 ++ code/datums/components/spawner.dm | 2 ++ code/datums/components/squashable.dm | 2 ++ code/datums/components/squeak.dm | 2 ++ code/datums/components/team_monitor.dm | 6 ++++ code/datums/components/udder.dm | 2 ++ code/datums/components/uplink.dm | 2 ++ code/datums/components/wet_floor.dm | 2 ++ code/datums/helper_datums/teleport.dm | 2 ++ code/game/atoms.dm | 2 ++ code/game/gamemodes/gangs/gang_tags.dm | 2 ++ code/game/gamemodes/gangs/implant_gang.dm | 4 +++ code/game/gamemodes/meteor/meteors.dm | 4 +++ code/game/machinery/buttons.dm | 2 ++ code/game/machinery/camera/camera.dm | 2 ++ code/game/machinery/camera/camera_assembly.dm | 2 ++ code/game/machinery/computer/arena.dm | 2 ++ code/game/machinery/computer/crew.dm | 2 ++ code/game/machinery/computer/security.dm | 2 ++ code/game/machinery/doors/windowdoor.dm | 2 ++ code/game/machinery/doppler_array.dm | 2 ++ code/game/machinery/firealarm.dm | 2 ++ code/game/machinery/flasher.dm | 2 ++ code/game/machinery/launch_pad.dm | 4 +++ .../newscaster/newscaster_machine.dm | 2 ++ code/game/machinery/pipe/construction.dm | 2 ++ .../machinery/porta_turret/portable_turret.dm | 2 ++ code/game/machinery/shieldgen.dm | 2 ++ code/game/machinery/status_display.dm | 4 +++ .../machinery/telecomms/computers/message.dm | 2 ++ code/game/objects/effects/alien_acid.dm | 2 ++ .../objects/effects/anomalies/_anomalies.dm | 2 ++ .../objects/effects/anomalies/anomaly_flux.dm | 2 ++ .../effects/anomalies/anomaly_gravity.dm | 4 +++ code/game/objects/effects/contraband.dm | 2 ++ code/game/objects/effects/decals/cleanable.dm | 2 ++ .../effects/decals/cleanable/humans.dm | 6 ++++ .../objects/effects/decals/cleanable/misc.dm | 2 ++ code/game/objects/effects/decals/crayon.dm | 2 ++ code/game/objects/effects/forcefields.dm | 4 +++ code/game/objects/effects/icons.dm | 4 +++ code/game/objects/effects/info.dm | 2 ++ code/game/objects/effects/landmarks.dm | 2 ++ code/game/objects/effects/lighting.dm | 4 +++ code/game/objects/effects/portals.dm | 4 +++ code/game/objects/effects/proximity.dm | 2 ++ .../objects/effects/spawners/gibspawner.dm | 2 ++ .../effects/temporary_visuals/clockwork.dm | 4 +++ .../objects/effects/temporary_visuals/cult.dm | 2 ++ .../temporary_visuals/miscellaneous.dm | 32 +++++++++++++++++++ .../projectiles/projectile_effects.dm | 2 ++ .../temporary_visuals/temporary_visual.dm | 2 ++ code/game/objects/effects/wanted_poster.dm | 4 +++ code/game/objects/items/chrono_eraser.dm | 2 ++ code/game/objects/items/cigs_lighters.dm | 2 ++ .../circuitboards/machine_circuitboards.dm | 2 ++ code/game/objects/items/crab17.dm | 4 +++ code/game/objects/items/crayons.dm | 2 ++ code/game/objects/items/credit_holochip.dm | 2 ++ code/game/objects/items/devices/flashlight.dm | 4 +++ .../items/devices/forcefieldprojector.dm | 2 ++ .../objects/items/devices/radio/intercom.dm | 4 +++ code/game/objects/items/devices/scanners.dm | 2 ++ code/game/objects/items/documents.dm | 2 ++ .../objects/items/grenades/clusterbuster.dm | 4 +++ .../objects/items/grenades/discogrenade.dm | 2 ++ .../objects/items/implants/implantuplink.dm | 4 +++ code/game/objects/items/mjolnir.dm | 4 +++ code/game/objects/items/spear.dm | 2 ++ code/game/objects/items/stacks/cash.dm | 2 ++ code/game/objects/items/stacks/medical.dm | 2 ++ code/game/objects/items/stacks/ores/ore.dm | 2 ++ code/game/objects/items/stacks/rods/rods.dm | 2 ++ .../items/stacks/sheets/mineral/metals.dm | 4 +++ .../items/stacks/sheets/organic/leather.dm | 2 ++ .../objects/items/stacks/sheets/sheets.dm | 2 ++ code/game/objects/items/stacks/stack.dm | 2 ++ code/game/objects/items/stacks/tiles/light.dm | 2 ++ .../objects/items/stacks/tiles/tile_types.dm | 2 ++ code/game/objects/structures/artstuff.dm | 2 ++ code/game/objects/structures/bot_elevator.dm | 2 ++ .../crates_lockers/crates/secure.dm | 2 ++ code/game/objects/structures/displaycase.dm | 2 ++ code/game/objects/structures/extinguisher.dm | 2 ++ .../objects/structures/ghost_role_spawners.dm | 6 ++++ code/game/objects/structures/ladders.dm | 2 ++ code/game/objects/structures/mirror.dm | 2 ++ .../objects/structures/petrified_statue.dm | 2 ++ code/game/objects/structures/tables_racks.dm | 2 ++ .../structures/transit_tubes/transit_tube.dm | 2 ++ .../objects/structures/windoor_assembly.dm | 2 ++ code/game/objects/structures/window.dm | 2 ++ code/game/say.dm | 2 ++ code/game/turfs/turf_texture.dm | 2 ++ code/modules/antagonists/blob/blob_mobs.dm | 2 ++ code/modules/antagonists/blob/overmind.dm | 2 ++ .../antagonists/blob/structures/_blob.dm | 2 ++ .../antagonists/blob/structures/core.dm | 2 ++ .../antagonists/blob/structures/factory.dm | 2 ++ .../changeling/powers/mutations.dm | 4 +++ .../clock_cult/clockwork_massive.dm | 2 ++ .../antagonists/clock_cult/clockwork_turfs.dm | 2 ++ code/modules/antagonists/cult/blood_magic.dm | 2 ++ code/modules/antagonists/cult/runes.dm | 10 ++++++ .../antagonists/heretic/magic/mansus_grasp.dm | 2 ++ .../heretic/structures/carving_knife.dm | 2 ++ .../antagonists/wizard/equipment/artefact.dm | 2 ++ .../atmospherics/environmental/LINDA_fire.dm | 2 ++ .../atmospherics/machinery/airalarm.dm | 2 ++ .../atmospherics/machinery/other/meter.dm | 2 ++ .../machinery/portable/canister.dm | 2 ++ .../bluespace_anchor/bluespace_anchor.dm | 2 ++ .../bluespace_anchor_deployer.dm | 2 ++ code/modules/cargo/gondolapod.dm | 2 ++ code/modules/cargo/supplypod.dm | 6 ++++ .../preference_character_preview.dm | 2 ++ .../modules/clothing/spacesuits/chronosuit.dm | 2 ++ code/modules/events/wormholes.dm | 2 ++ .../discoverable_component.dm | 2 ++ code/modules/fields/timestop.dm | 2 ++ code/modules/fields/turf_objects.dm | 2 ++ code/modules/flufftext/Hallucination.dm | 12 +++++++ code/modules/holoparasite/_holoparasite.dm | 2 ++ .../holoparasite/abilities/lesser/snares.dm | 4 +++ .../abilities/lesser/telepathy.dm | 2 ++ .../holoparasite/abilities/lesser/teleport.dm | 6 ++++ .../holoparasite/abilities/major/assassin.dm | 2 ++ .../holoparasite/abilities/major/explosive.dm | 2 ++ .../holoparasite/abilities/major/scout.dm | 2 ++ .../holoparasite/holoparasite_builder.dm | 2 ++ .../holoparasite/holoparasite_helpers.dm | 2 ++ code/modules/hydroponics/grown.dm | 2 ++ code/modules/hydroponics/grown/flowers.dm | 4 +++ .../modules/hydroponics/grown/grass_carpet.dm | 2 ++ code/modules/hydroponics/grown/misc.dm | 2 ++ code/modules/hydroponics/grown/mushrooms.dm | 2 ++ code/modules/hydroponics/grown/nettle.dm | 4 +++ code/modules/hydroponics/growninedible.dm | 2 ++ code/modules/hydroponics/seeds.dm | 2 ++ code/modules/lighting/emissive_blocker.dm | 2 ++ .../mining/equipment/marker_beacons.dm | 2 ++ code/modules/mining/equipment/resonator.dm | 2 ++ .../mining/lavaland/necropolis_chests.dm | 4 +++ code/modules/mob/living/carbon/human/human.dm | 2 ++ .../carbon/human/species_types/dullahan.dm | 2 ++ .../carbon/human/species_types/golems.dm | 2 ++ .../mob/living/carbon/monkey/monkey.dm | 2 ++ code/modules/mob/living/inhand_holder.dm | 4 +++ code/modules/mob/living/silicon/ai/ai.dm | 4 +++ .../mob/living/simple_animal/bot/atmosbot.dm | 2 ++ .../mob/living/simple_animal/bot/ed209bot.dm | 2 ++ .../mob/living/simple_animal/bot/floorbot.dm | 2 ++ .../mob/living/simple_animal/bot/medbot.dm | 2 ++ .../living/simple_animal/heretic_monsters.dm | 4 +++ .../hostile/megafauna/blood_drunk_miner.dm | 2 ++ .../hostile/megafauna/colossus.dm | 2 ++ .../simple_animal/hostile/megafauna/drake.dm | 6 ++++ .../hostile/megafauna/hierophant.dm | 10 ++++++ .../mob/living/simple_animal/hostile/mimic.dm | 2 ++ .../hostile/mining_mobs/elites/elite.dm | 2 ++ .../mining_mobs/elites/goliath_broodmother.dm | 2 ++ .../hostile/mining_mobs/goliath.dm | 4 +++ .../living/simple_animal/hostile/statue.dm | 2 ++ .../living/simple_animal/hostile/stickman.dm | 2 ++ .../mob/living/simple_animal/slime/slime.dm | 6 ++++ .../hardware/battery_module.dm | 2 ++ code/modules/multiz/zmimic/mimic_movable.dm | 2 ++ code/modules/paperwork/contract.dm | 2 ++ code/modules/paperwork/origami.dm | 2 ++ .../byond_particles/emitter/smoke.dm | 2 ++ code/modules/photography/photos/frame.dm | 2 ++ code/modules/photography/photos/photo.dm | 2 ++ code/modules/plumbing/ducts.dm | 4 +++ .../plumbing/plumbers/_plumb_machinery.dm | 8 +++++ code/modules/plumbing/plumbers/acclimator.dm | 2 ++ .../plumbing/plumbers/bottle_dispenser.dm | 2 ++ code/modules/plumbing/plumbers/destroyer.dm | 2 ++ code/modules/plumbing/plumbers/filter.dm | 2 ++ .../plumbing/plumbers/grinder_chemical.dm | 2 ++ .../plumbing/plumbers/reaction_chamber.dm | 2 ++ code/modules/plumbing/plumbers/splitters.dm | 2 ++ code/modules/plumbing/plumbers/synthesizer.dm | 2 ++ code/modules/point/point.dm | 2 ++ code/modules/power/cable.dm | 4 +++ code/modules/power/cell.dm | 2 ++ .../modules/power/lighting/light_construct.dm | 2 ++ code/modules/power/singularity/singularity.dm | 4 +++ code/modules/power/solar.dm | 2 ++ code/modules/power/tesla/energy_ball.dm | 2 ++ code/modules/power/tracker.dm | 2 ++ .../projectiles/ammunition/energy/portal.dm | 2 ++ .../projectiles/guns/misc/blastcannon.dm | 2 ++ .../projectile/special/wormhole.dm | 2 ++ code/modules/reagents/reagent_containers.dm | 2 ++ .../reagent_containers/chem_heirloom.dm | 2 ++ code/modules/recycling/conveyor.dm | 10 +++++- code/modules/recycling/disposal/bin.dm | 4 +++ .../recycling/disposal/construction.dm | 2 ++ code/modules/recycling/disposal/outlet.dm | 2 ++ code/modules/recycling/disposal/pipe.dm | 2 ++ .../xenobiology/crossbreeding/_clothing.dm | 2 ++ .../xenobiology/crossbreeding/_structures.dm | 2 ++ code/modules/security/genpop.dm | 4 +++ .../bluespace_shuttle_pod/pod_computer.dm | 2 ++ code/modules/shuttle/ripple.dm | 2 ++ code/modules/shuttle/special.dm | 2 ++ .../loot/alien_artifact.dm | 2 ++ .../loot/artifact_defenses.dm | 2 ++ .../objective_computer.dm | 2 ++ .../shuttle_components/shuttle_console.dm | 2 ++ .../shuttle_components/shuttle_docking.dm | 4 +++ code/modules/spells/spell_types/forcewall.dm | 2 ++ code/modules/spells/spell_types/godhand.dm | 4 +++ .../spells/spell_types/lesserlichdom.dm | 2 ++ code/modules/spells/spell_types/lichdom.dm | 2 ++ code/modules/spells/spell_types/shapeshift.dm | 2 ++ .../spells/spell_types/touch_attacks.dm | 2 ++ code/modules/station_goals/bsa.dm | 2 ++ code/modules/surgery/organs/eyes.dm | 2 ++ code/modules/unit_tests/armour_checks.dm | 2 ++ code/modules/uplink/uplink_devices.dm | 12 +++++++ code/modules/vehicles/mecha/combat/durand.dm | 2 ++ code/modules/vehicles/mecha/mecha_wreckage.dm | 2 ++ .../wiremod/shell/brain_computer_interface.dm | 2 ++ .../traits/xenoartifact_minors.dm | 4 +++ code/modules/xenoarchaeology/xenoartifact.dm | 6 ++++ 256 files changed, 703 insertions(+), 1 deletion(-) diff --git a/code/_onclick/hud/credits.dm b/code/_onclick/hud/credits.dm index 5ed1978c7b366..f322a18cfe3e4 100644 --- a/code/_onclick/hud/credits.dm +++ b/code/_onclick/hud/credits.dm @@ -60,6 +60,8 @@ GLOBAL_LIST(end_titles) plane = SPLASHSCREEN_PLANE var/matrix/target +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/screen/credit) + /atom/movable/screen/credit/Initialize(mapload, credited) . = ..() maptext = MAPTEXT("[credited]") @@ -86,6 +88,8 @@ GLOBAL_LIST(end_titles) icon = 'icons/title_cards.dmi' screen_loc = "4,1" +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/screen/credit/title_card) + /atom/movable/screen/credit/title_card/Initialize(mapload, credited, title_icon_state) icon_state = title_icon_state . = ..() diff --git a/code/_onclick/hud/holoparasite.dm b/code/_onclick/hud/holoparasite.dm index e339109028978..2445452baf928 100644 --- a/code/_onclick/hud/holoparasite.dm +++ b/code/_onclick/hud/holoparasite.dm @@ -117,6 +117,8 @@ var/static/list/mutable_appearance/timer_fraction_overlays COOLDOWN_DECLARE(timer) +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/screen/holoparasite) + /atom/movable/screen/holoparasite/Initialize(_mapload, mob/living/simple_animal/hostile/holoparasite/_owner) . = ..() if(!istype(_owner)) diff --git a/code/_onclick/hud/parallax.dm b/code/_onclick/hud/parallax.dm index 3f404f6031ea0..78f02d8a9702c 100755 --- a/code/_onclick/hud/parallax.dm +++ b/code/_onclick/hud/parallax.dm @@ -264,6 +264,8 @@ mouse_opacity = MOUSE_OPACITY_TRANSPARENT +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/screen/parallax_layer) + /atom/movable/screen/parallax_layer/Initialize(mapload, view) . = ..() if (!view) @@ -315,6 +317,8 @@ /atom/movable/screen/parallax_layer/random/space_gas icon_state = "random_layer1" +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/screen/parallax_layer/random/space_gas) + /atom/movable/screen/parallax_layer/random/space_gas/Initialize(mapload, view) . = ..() src.add_atom_colour(SSparallax.assign_random_parallax_colour(), ADMIN_COLOUR_PRIORITY) diff --git a/code/_onclick/hud/rendering/plane_master_controller.dm b/code/_onclick/hud/rendering/plane_master_controller.dm index 9799ca8b9ec7f..46665788d9640 100644 --- a/code/_onclick/hud/rendering/plane_master_controller.dm +++ b/code/_onclick/hud/rendering/plane_master_controller.dm @@ -8,6 +8,8 @@ INITIALIZE_IMMEDIATE(/atom/movable/plane_master_controller) ///Ensures that all the planes are correctly in the controlled_planes list. +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/plane_master_controller) + /atom/movable/plane_master_controller/Initialize(mapload, datum/hud/hud) . = ..() if(!istype(hud)) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index d12383cc8c265..734cc2645047f 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -233,6 +233,8 @@ /// A reference to the object in the slot. Grabs or items, generally. var/datum/component/storage/master = null +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/screen/close) + /atom/movable/screen/close/Initialize(mapload, new_master) . = ..() master = new_master @@ -440,6 +442,8 @@ /// A reference to the object in the slot. Grabs or items, generally. var/datum/component/storage/master = null +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/screen/storage) + /atom/movable/screen/storage/Initialize(mapload, new_master) . = ..() master = new_master @@ -704,6 +708,8 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/splash) +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/screen/splash) + /atom/movable/screen/splash/Initialize(mapload, client/C, visible, use_previous_title) . = ..() if(!istype(C)) @@ -745,6 +751,8 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/splash) /atom/movable/screen/component_button var/atom/movable/screen/parent +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/screen/component_button) + /atom/movable/screen/component_button/Initialize(mapload, atom/movable/screen/parent) . = ..() src.parent = parent diff --git a/code/controllers/master.dm b/code/controllers/master.dm index 9873be1a8e4ae..bc9e12dd48cc6 100644 --- a/code/controllers/master.dm +++ b/code/controllers/master.dm @@ -211,6 +211,8 @@ GLOBAL_REAL(Master, /datum/controller/master) = new // Please don't stuff random bullshit here, // Make a subsystem, give it the SS_NO_FIRE flag, and do your work in it's Initialize() +CREATION_TEST_IGNORE_SUBTYPES(/datum/controller/master) + /datum/controller/master/Initialize(delay, init_sss, tgs_prime) set waitfor = 0 diff --git a/code/datums/brain_damage/imaginary_friend.dm b/code/datums/brain_damage/imaginary_friend.dm index b1c5d00fffd2d..33a6eec70573d 100644 --- a/code/datums/brain_damage/imaginary_friend.dm +++ b/code/datums/brain_damage/imaginary_friend.dm @@ -94,6 +94,8 @@ to_chat(src, "You are absolutely loyal to your friend, no matter what.") to_chat(src, "You cannot directly influence the world around you, but you can see what [owner] cannot.") +CREATION_TEST_IGNORE_SUBTYPES(/mob/camera/imaginary_friend) + /mob/camera/imaginary_friend/Initialize(mapload, _trauma) . = ..() diff --git a/code/datums/brain_damage/mrat.dm b/code/datums/brain_damage/mrat.dm index 964bf75ce15ef..be0925b5f3043 100644 --- a/code/datums/brain_damage/mrat.dm +++ b/code/datums/brain_damage/mrat.dm @@ -114,6 +114,8 @@ to_chat(src, "Your job is to answer [owner]'s question(s) and you are given this form to assist in that.") to_chat(src, "Don't be stupid with this or you will face the consequences.") +CREATION_TEST_IGNORE_SUBTYPES(/mob/camera/imaginary_friend/mrat) + /mob/camera/imaginary_friend/mrat/Initialize(mapload, _trauma) . = ..() costume = new diff --git a/code/datums/brain_damage/split_personality.dm b/code/datums/brain_damage/split_personality.dm index ba9da36e06630..3ba80201c2fa6 100644 --- a/code/datums/brain_damage/split_personality.dm +++ b/code/datums/brain_damage/split_personality.dm @@ -127,6 +127,8 @@ var/mob/living/carbon/body var/datum/brain_trauma/severe/split_personality/trauma +CREATION_TEST_IGNORE_SUBTYPES(/mob/living/split_personality) + /mob/living/split_personality/Initialize(mapload, _trauma) if(iscarbon(loc)) body = loc diff --git a/code/datums/components/COMPONENT_TEMPLATE.md b/code/datums/components/COMPONENT_TEMPLATE.md index c2777a67d5a6a..e2744d0f85970 100644 --- a/code/datums/components/COMPONENT_TEMPLATE.md +++ b/code/datums/components/COMPONENT_TEMPLATE.md @@ -9,6 +9,8 @@ See _component.dm for detailed explanations //dupe_mode = COMPONENT_DUPE_ALLOWED // code/__DEFINES/dcs/flags.dm var/myvar +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/mycomponent) + /datum/component/mycomponent/Initialize(myargone, myargtwo) if(myargone) myvar = myargone diff --git a/code/datums/components/anti_magic.dm b/code/datums/components/anti_magic.dm index c7179c39a79ba..bf05fc7b905d1 100644 --- a/code/datums/components/anti_magic.dm +++ b/code/datums/components/anti_magic.dm @@ -11,6 +11,8 @@ var/static/identifier_current = 0 var/identifier +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/anti_magic) + /datum/component/anti_magic/Initialize(_source, _magic = FALSE, _holy = FALSE, _charges, _blocks_self = TRUE, datum/callback/_reaction, datum/callback/_expire, _allowed_slots) // Random enough that it will never conflict, and avoids having a static variable identifier = identifier_current++ diff --git a/code/datums/components/area_sound_manager.dm b/code/datums/components/area_sound_manager.dm index d0c27025e30ee..b8cf1de9d97b3 100644 --- a/code/datums/components/area_sound_manager.dm +++ b/code/datums/components/area_sound_manager.dm @@ -9,6 +9,8 @@ ///The timer id of our current start delay, if it exists var/timerid +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/area_sound_manager) + /datum/component/area_sound_manager/Initialize(area_loop_pairs, change_on, remove_on, acceptable_zs) if(!ismovable(parent)) return diff --git a/code/datums/components/armor_plate.dm b/code/datums/components/armor_plate.dm index 74a20a7e725a6..a7bfab1b24d56 100644 --- a/code/datums/components/armor_plate.dm +++ b/code/datums/components/armor_plate.dm @@ -5,6 +5,8 @@ var/datum/armor/added_armor = list(MELEE = 10) var/upgrade_name +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/armor_plate) + /datum/component/armor_plate/Initialize(_maxamount,obj/item/_upgrade_item,datum/armor/_added_armor) if(!isobj(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/butchering.dm b/code/datums/components/butchering.dm index d11800a38565a..9544ce265039a 100644 --- a/code/datums/components/butchering.dm +++ b/code/datums/components/butchering.dm @@ -12,6 +12,8 @@ /// Whether or not this component is compatible with blunt tools. var/can_be_blunt = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/butchering) + /datum/component/butchering/Initialize(_speed, _effectiveness, _bonus_modifier, _butcher_sound, disabled, _can_be_blunt) if(_speed) speed = _speed diff --git a/code/datums/components/conveyor_movement.dm b/code/datums/components/conveyor_movement.dm index 43fb9979a2cc9..a7c8d3b7a93b4 100644 --- a/code/datums/components/conveyor_movement.dm +++ b/code/datums/components/conveyor_movement.dm @@ -6,6 +6,8 @@ var/living_parent = FALSE var/speed +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/convey) + /datum/component/convey/Initialize(direction, speed, start_delay) if(!ismovable(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/deadchat_control.dm b/code/datums/components/deadchat_control.dm index b74f6e95958f4..b078a451fdc50 100644 --- a/code/datums/components/deadchat_control.dm +++ b/code/datums/components/deadchat_control.dm @@ -11,6 +11,8 @@ var/deadchat_mode var/input_cooldown +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/deadchat_control) + /datum/component/deadchat_control/Initialize(_deadchat_mode, _inputs, _input_cooldown = 12 SECONDS) if(!isatom(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/deployable.dm b/code/datums/components/deployable.dm index 5202dbae3701c..6b45a50bc2eaa 100644 --- a/code/datums/components/deployable.dm +++ b/code/datums/components/deployable.dm @@ -19,6 +19,8 @@ /// The atom parent of this VAR_PRIVATE/obj/item/item_parent +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/deployable) + /datum/component/deployable/Initialize(deployed_object, consumed = TRUE, time_to_deploy = 0 SECONDS, ignores_mob_density = TRUE, dense_deployment = FALSE, empty_icon = null, loaded = FALSE, reload_type = null) . = ..() if (!isitem(parent)) diff --git a/code/datums/components/drift.dm b/code/datums/components/drift.dm index db71505c82d55..89a2558404d63 100644 --- a/code/datums/components/drift.dm +++ b/code/datums/components/drift.dm @@ -7,6 +7,8 @@ var/datum/move_loop/move/drifting_loop var/block_inputs_until +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/drift) + /datum/component/drift/Initialize(direction, instant = FALSE) if(!ismovable(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/explodable.dm b/code/datums/components/explodable.dm index 7175e68cf58fe..95370d1e1ca54 100644 --- a/code/datums/components/explodable.dm +++ b/code/datums/components/explodable.dm @@ -11,6 +11,8 @@ /// For items, lets us determine where things should be hit. var/equipped_slot +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/explodable) + /datum/component/explodable/Initialize(devastation_range, heavy_impact_range, light_impact_range, flash_range, uncapped = FALSE, delete_after = EXPLODABLE_DELETE_PARENT) if(!isatom(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/forensics.dm b/code/datums/components/forensics.dm index 069f3ad1fd489..7cde3dfa1419c 100644 --- a/code/datums/components/forensics.dm +++ b/code/datums/components/forensics.dm @@ -16,6 +16,8 @@ add_blood_decal() return ..() +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/forensics) + /datum/component/forensics/Initialize(new_fingerprints, new_hiddenprints, new_blood_DNA, new_fibers, new_souls) if(!isatom(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/grillable.dm b/code/datums/components/grillable.dm index cb1f25e30c3d1..804aaf087c8e2 100644 --- a/code/datums/components/grillable.dm +++ b/code/datums/components/grillable.dm @@ -15,6 +15,8 @@ ///Do we use the large steam sprite? var/use_large_steam_sprite = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/grillable) + /datum/component/grillable/Initialize(cook_result, required_cook_time, positive_result, use_large_steam_sprite) . = ..() if(!isitem(parent)) //Only items support grilling at the moment diff --git a/code/datums/components/heirloom.dm b/code/datums/components/heirloom.dm index 6eb6a0e23ea2f..927ec2f8597c7 100644 --- a/code/datums/components/heirloom.dm +++ b/code/datums/components/heirloom.dm @@ -2,6 +2,8 @@ var/datum/mind/owner var/family_name +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/heirloom) + /datum/component/heirloom/Initialize(new_owner, new_family_name) if(!isitem(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/knockoff.dm b/code/datums/components/knockoff.dm index cd3fee4702db4..236de0f70aec6 100644 --- a/code/datums/components/knockoff.dm +++ b/code/datums/components/knockoff.dm @@ -4,6 +4,8 @@ var/list/target_zones //Aiming for these zones will cause the knockoff, null means all zones allowed var/list/slots_knockoffable //Can be only knocked off from these slots, null means all slots allowed +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/knockoff) + /datum/component/knockoff/Initialize(knockoff_chance,zone_override,slots_knockoffable) if(!isitem(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/lockon_aiming.dm b/code/datums/components/lockon_aiming.dm index 7c79b801c31d4..cd0d262b94564 100644 --- a/code/datums/components/lockon_aiming.dm +++ b/code/datums/components/lockon_aiming.dm @@ -20,6 +20,8 @@ var/datum/callback/can_target_callback var/aiming_params +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/lockon_aiming) + /datum/component/lockon_aiming/Initialize(range, list/typecache, amount, list/immune, datum/callback/when_locked, icon, icon_state, datum/callback/target_callback) if(!ismob(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/mirv.dm b/code/datums/components/mirv.dm index 670bf703ca81b..3bf391a275965 100644 --- a/code/datums/components/mirv.dm +++ b/code/datums/components/mirv.dm @@ -3,6 +3,8 @@ var/radius // shoots a projectile for every turf on this radius from the hit target var/override_projectile_range +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/mirv) + /datum/component/mirv/Initialize(projectile_type, radius=1, override_projectile_range) if(!isgun(parent) && !ismachinery(parent) && !isstructure(parent) && !isgrenade(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/ntnet_interface.dm b/code/datums/components/ntnet_interface.dm index 671bffe09e0ab..b49990219baac 100644 --- a/code/datums/components/ntnet_interface.dm +++ b/code/datums/components/ntnet_interface.dm @@ -56,6 +56,8 @@ * * network_name - Fully qualified network id of the network we are joining * * network_tag - The objects id_tag. Used for finding the device at mapload time */ +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/ntnet_interface) + /datum/component/ntnet_interface/Initialize(network_name, network_tag = null) if(network_name == null || !istext(network_name)) log_telecomms("ntnet_interface/Initialize: Bad network '[network_name]' for '[parent]', going to limbo it") diff --git a/code/datums/components/overlay_lighting.dm b/code/datums/components/overlay_lighting.dm index ec48357afc464..e1ce8303f1aaf 100644 --- a/code/datums/components/overlay_lighting.dm +++ b/code/datums/components/overlay_lighting.dm @@ -73,6 +73,8 @@ ///Cast range for the directional cast (how far away the atom is moved) var/cast_range = 2 +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/overlay_lighting) + /datum/component/overlay_lighting/Initialize(_range, _power, _color, starts_on, is_directional) if(!ismovable(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/payment.dm b/code/datums/components/payment.dm index 763856190421f..0a5de798ade6d 100644 --- a/code/datums/components/payment.dm +++ b/code/datums/components/payment.dm @@ -24,6 +24,8 @@ ) ) +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/payment) + /datum/component/payment/Initialize(_cost, _target, _style = PAYMENT_CLINICAL) if(istext(_target)) target_acc = SSeconomy.get_budget_account(ACCOUNT_CIV_ID) diff --git a/code/datums/components/remote_materials.dm b/code/datums/components/remote_materials.dm index b9f6b495efb3c..ae17a3f69c946 100644 --- a/code/datums/components/remote_materials.dm +++ b/code/datums/components/remote_materials.dm @@ -18,6 +18,8 @@ handles linking back and forth. ///Flags used when converting inserted materials into their component materials. var/mat_container_flags = NONE +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/remote_materials) + /datum/component/remote_materials/Initialize(category, mapload, allow_standalone = TRUE, force_connect = FALSE, mat_container_flags=NONE) if (!isatom(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/shell.dm b/code/datums/components/shell.dm index 9a98e816e6d5e..17ef716cd3b74 100644 --- a/code/datums/components/shell.dm +++ b/code/datums/components/shell.dm @@ -16,6 +16,8 @@ var/locked = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/shell) + /datum/component/shell/Initialize(unremovable_circuit_components, capacity, shell_flags) . = ..() if(!ismovable(parent)) diff --git a/code/datums/components/slippery.dm b/code/datums/components/slippery.dm index 3b244d5e16f8a..880985c066936 100644 --- a/code/datums/components/slippery.dm +++ b/code/datums/components/slippery.dm @@ -14,6 +14,8 @@ var/datum/weakref/holder_connect_loc_behalf +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/slippery) + /datum/component/slippery/Initialize(_knockdown, _lube_flags = NONE, datum/callback/_callback, _paralyze, _force_drop = FALSE) knockdown_time = max(_knockdown, 0) paralyze_time = max(_paralyze, 0) diff --git a/code/datums/components/spawner.dm b/code/datums/components/spawner.dm index 02fbacc9d74f8..e4c8f540cb709 100644 --- a/code/datums/components/spawner.dm +++ b/code/datums/components/spawner.dm @@ -9,6 +9,8 @@ +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/spawner) + /datum/component/spawner/Initialize(_mob_types, _spawn_time, _faction, _spawn_text, _max_mobs) if(_spawn_time) spawn_time=_spawn_time diff --git a/code/datums/components/squashable.dm b/code/datums/components/squashable.dm index f9159614909fd..174ee65c98cb7 100644 --- a/code/datums/components/squashable.dm +++ b/code/datums/components/squashable.dm @@ -13,6 +13,8 @@ COMSIG_ATOM_ENTERED = PROC_REF(on_entered), ) +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/squashable) + /datum/component/squashable/Initialize(squash_chance, squash_damage, squash_flags, squash_callback) . = ..() if(!isliving(parent)) diff --git a/code/datums/components/squeak.dm b/code/datums/components/squeak.dm index e5dc6532d6403..672ae9eeb1d16 100644 --- a/code/datums/components/squeak.dm +++ b/code/datums/components/squeak.dm @@ -25,6 +25,8 @@ COMSIG_ATOM_ENTERED = PROC_REF(play_squeak_crossed), ) +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/squeak) + /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 diff --git a/code/datums/components/team_monitor.dm b/code/datums/components/team_monitor.dm index 5b9816761183e..2c89b8cb9415d 100644 --- a/code/datums/components/team_monitor.dm +++ b/code/datums/components/team_monitor.dm @@ -96,6 +96,8 @@ GLOBAL_LIST_EMPTY(tracker_beacons) /// If we can track beacons within the same zgroup (e.g. on a multiz station) var/multiz = TRUE +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/team_monitor) + /datum/component/team_monitor/Initialize(frequency_key, frequency, _attached_beacon, _multiz = TRUE) multiz = _multiz team_freq_key = frequency_key @@ -333,6 +335,8 @@ GLOBAL_LIST_EMPTY(tracker_beacons) // Worn version, hides when dequipped // ============ +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/team_monitor/worn) + /datum/component/team_monitor/worn/Initialize(frequency_key, frequency, _attached_beacon) var/obj/item/clothing/item = parent if(!istype(item)) @@ -399,6 +403,8 @@ GLOBAL_LIST_EMPTY(tracker_beacons) /// Global signal? var/global_signal = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/tracking_beacon) + /datum/component/tracking_beacon/Initialize(_frequency_key, _frequency, _attached_monitor, _visible = TRUE, _colour = "#ffffff", _global = FALSE, _always_update = FALSE, _z_diff_colour = "#808080") . = ..() diff --git a/code/datums/components/udder.dm b/code/datums/components/udder.dm index abfea6a842241..cbb1f5ea64ca9 100644 --- a/code/datums/components/udder.dm +++ b/code/datums/components/udder.dm @@ -71,6 +71,8 @@ ///optional proc to callback to when the udder generates milk var/datum/callback/on_generate_callback +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/udder) + /obj/item/udder/Initialize(mapload, udder_mob, on_generate_callback, reagent_produced_typepath = /datum/reagent/consumable/milk) src.udder_mob = udder_mob src.on_generate_callback = on_generate_callback diff --git a/code/datums/components/uplink.dm b/code/datums/components/uplink.dm index 85c49f68d8b67..b9b951dd4b996 100644 --- a/code/datums/components/uplink.dm +++ b/code/datums/components/uplink.dm @@ -31,6 +31,8 @@ var/list/previous_attempts +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/uplink) + /datum/component/uplink/Initialize(_owner, _lockable = TRUE, _enabled = FALSE, uplink_flag = UPLINK_TRAITORS, starting_tc = TELECRYSTALS_DEFAULT) if(!isitem(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/wet_floor.dm b/code/datums/components/wet_floor.dm index cbaf051bdefb4..6085980bda6b6 100644 --- a/code/datums/components/wet_floor.dm +++ b/code/datums/components/wet_floor.dm @@ -22,6 +22,8 @@ for(var/i in WF.time_left_list) add_wet(text2num(i), WF.time_left_list[i]) +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/wet_floor) + /datum/component/wet_floor/Initialize(strength, duration_minimum, duration_add, duration_maximum, _permanent = FALSE) if(!isopenturf(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index 44c73d4263386..2f88159ad3296 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -222,6 +222,8 @@ var/turf/destination var/has_hud_icon = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/teleportation_wake) + /obj/effect/temp_visual/teleportation_wake/Initialize(mapload, turf/destination) // Replace any portals on the current turf for (var/obj/effect/temp_visual/teleportation_wake/conflicting_portal in loc) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 0deec87f6c61d..94f466b2cdd98 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -212,6 +212,8 @@ * * /turf/Initialize * * /turf/open/space/Initialize */ +CREATION_TEST_IGNORE_SUBTYPES(/atom/proc) + /atom/proc/Initialize(mapload, ...) if(flags_1 & INITIALIZED_1) stack_trace("Warning: [src]([type]) initialized multiple times!") diff --git a/code/game/gamemodes/gangs/gang_tags.dm b/code/game/gamemodes/gangs/gang_tags.dm index f0e2f7932cf19..5c2ab12bfb768 100644 --- a/code/game/gamemodes/gangs/gang_tags.dm +++ b/code/game/gamemodes/gangs/gang_tags.dm @@ -7,6 +7,8 @@ gender = NEUTER var/datum/team/gang/gang +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/decal/gang) + /obj/effect/decal/gang/Initialize(mapload, datum/team/gang/G, e_name = "gang tag", rotation = 0, mob/user) if(!G) qdel(src) diff --git a/code/game/gamemodes/gangs/implant_gang.dm b/code/game/gamemodes/gangs/implant_gang.dm index 25f32cf845208..0cab2aa4b9baf 100644 --- a/code/game/gamemodes/gangs/implant_gang.dm +++ b/code/game/gamemodes/gangs/implant_gang.dm @@ -4,6 +4,8 @@ activated = 0 var/datum/team/gang/gang +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/implant/gang) + /obj/item/implant/gang/Initialize(mapload, loc, setgang) ..() gang = setgang @@ -39,6 +41,8 @@ /obj/item/implanter/gang name = "implanter (gang)" +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/implanter/gang) + /obj/item/implanter/gang/Initialize(mapload, loc, gang) if(!gang) qdel(src) diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index 9efcba6ab33bf..3c4bfee04b5c7 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -141,6 +141,8 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event var/lifetime = DEFAULT_METEOR_LIFETIME +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/meteor) + /obj/effect/meteor/Initialize(mapload, target) . = ..() z_original = z @@ -436,6 +438,8 @@ GLOBAL_LIST_INIT(meteorsSPOOKY, list(/obj/effect/meteor/pumpkin)) var/prefalltime = 8 SECONDS layer = METEOR_LAYER +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/falling_meteor) + /obj/effect/falling_meteor/Initialize(mapload, meteor_type) . = ..() if(!meteor_type) diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index 79f53e53dc643..e2f637ce90b3c 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -19,6 +19,8 @@ /obj/machinery/button/indestructible resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/button) + /obj/machinery/button/Initialize(mapload, ndir = 0, built = 0) . = ..() if(built) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 829dad51359f0..ac6e4b1bcbfe2 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -72,6 +72,8 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/camera/xray, 0) light_range = 10 start_active = TRUE +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/camera) + /obj/machinery/camera/Initialize(mapload, obj/structure/camera_assembly/CA) . = ..() for(var/i in network) diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index 5f5168f82169b..74e05c0b6e29c 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -57,6 +57,8 @@ if(STATE_FINISHED) . += "You shouldn't be seeing this, tell a coder!" +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/camera_assembly) + /obj/structure/camera_assembly/Initialize(mapload, ndir, building) . = ..() if(building) diff --git a/code/game/machinery/computer/arena.dm b/code/game/machinery/computer/arena.dm index 86312b24e4323..d13be687a01b4 100644 --- a/code/game/machinery/computer/arena.dm +++ b/code/game/machinery/computer/arena.dm @@ -62,6 +62,8 @@ var/start_sound = 'sound/items/airhorn2.ogg' var/start_sound_volume = 50 +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/computer/arena) + /obj/machinery/computer/arena/Initialize(mapload, obj/item/circuitboard/C) . = ..() LoadDefaultArenas() diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index 3b6e335252130..c44799a9d85ae 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -16,6 +16,8 @@ light_color = LIGHT_COLOR_BLUE +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/computer/crew) + /obj/machinery/computer/crew/Initialize(mapload, obj/item/circuitboard/C) . = ..() AddComponent(/datum/component/usb_port, list( diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 827960f17fb20..5cbb521bd69a8 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -19,6 +19,8 @@ var/order = 1 // -1 = Descending - 1 = Ascending light_color = LIGHT_COLOR_RED +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/computer/secure_data) + /obj/machinery/computer/secure_data/Initialize(mapload, obj/item/circuitboard/C) . = ..() AddComponent(/datum/component/usb_port, list( diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index c531f9d1fe7e6..197d720b3e3d6 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -25,6 +25,8 @@ var/rods = 2 var/cable = 1 +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/door/window) + /obj/machinery/door/window/Initialize(mapload, set_dir, unres_sides) . = ..() if(set_dir) diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index 74f93e38794c2..05c5d4a676516 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -96,6 +96,8 @@ /obj/item/paper/record_printout name = "paper - Log Recording" +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/paper/record_printout) + /obj/item/paper/record_printout/Initialize(mapload, datum/data/tachyon_record/record) . = ..() diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index d429b35023c00..f07abb9357745 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -40,6 +40,8 @@ var/area/myarea = null var/locked = FALSE //Are we locked? +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/firealarm) + /obj/machinery/firealarm/Initialize(mapload, dir, building) . = ..() if (!req_access) diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 50d8a0fc21d7f..39cd58f65a9ad 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -31,6 +31,8 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/flasher, 26) light_range = FLASH_LIGHT_RANGE light_on = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/flasher) + /obj/machinery/flasher/Initialize(mapload, ndir = 0, built = 0) . = ..() // ..() is EXTREMELY IMPORTANT, never forget to add it if(!built) diff --git a/code/game/machinery/launch_pad.dm b/code/game/machinery/launch_pad.dm index 543213f2a6616..04b57fbb2b059 100644 --- a/code/game/machinery/launch_pad.dm +++ b/code/game/machinery/launch_pad.dm @@ -230,6 +230,8 @@ DEFINE_BUFFER_HANDLER(/obj/machinery/launchpad) var/closed = TRUE var/obj/item/storage/briefcase/launchpad/briefcase +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/launchpad/briefcase) + /obj/machinery/launchpad/briefcase/Initialize(mapload, briefcase) . = ..() if(!briefcase) @@ -334,6 +336,8 @@ DEFINE_BUFFER_HANDLER(/obj/machinery/launchpad) //A weakref to our linked pad var/datum/weakref/pad +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/launchpad_remote) + /obj/item/launchpad_remote/Initialize(mapload, pad) //remote spawns linked to the briefcase pad . = ..() src.pad = WEAKREF(pad) diff --git a/code/game/machinery/newscaster/newscaster_machine.dm b/code/game/machinery/newscaster/newscaster_machine.dm index d6c1e98d6d477..04d4207fc0a84 100644 --- a/code/game/machinery/newscaster/newscaster_machine.dm +++ b/code/game/machinery/newscaster/newscaster_machine.dm @@ -59,6 +59,8 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/newscaster, 30) +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/newscaster) + /obj/machinery/newscaster/Initialize(mapload, ndir, building) . = ..() GLOB.allCasters += src diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index 66e32708181a7..dc911ee7c38f9 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -41,6 +41,8 @@ Buildable meters //Flipping handled manually due to custom handling for trinary pipes AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE) +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/pipe) + /obj/item/pipe/Initialize(mapload, _pipe_type, _dir, obj/machinery/atmospherics/make_from) if(make_from) make_from_existing(make_from) diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index e6cee442b0401..64ff5e4c33e43 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -874,6 +874,8 @@ DEFINE_BUFFER_HANDLER(/obj/machinery/porta_turret) /// List of all linked turrets var/list/turrets = list() +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/turretid) + /obj/machinery/turretid/Initialize(mapload, ndir = 0, built = 0) . = ..() if(built) diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index 91609daabb065..bd6b0d431ffc4 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -416,6 +416,8 @@ var/obj/machinery/shieldwallgen/gen_primary var/obj/machinery/shieldwallgen/gen_secondary +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/shieldwall) + /obj/machinery/shieldwall/Initialize(mapload, obj/machinery/shieldwallgen/first_gen, obj/machinery/shieldwallgen/second_gen) . = ..() gen_primary = first_gen diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index 3c0e11ff55ac8..200fe3e300aad 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -39,6 +39,8 @@ var/header_text_color = "#2CF" //makes it go on the wall when built +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/status_display) + /obj/machinery/status_display/Initialize(mapload, ndir, building) . = ..() update_appearance() @@ -216,6 +218,8 @@ 5, 5, 5, 5, 4, 5, 4, 6, 4, 4, 4, 3, 2, 3, 4, ) +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/overlay/status_display_text) + /obj/effect/overlay/status_display_text/Initialize(mapload, yoffset, line, text_color, header_text_color) . = ..() diff --git a/code/game/machinery/telecomms/computers/message.dm b/code/game/machinery/telecomms/computers/message.dm index 66a5f419eb3ae..a63b62fb27c2e 100644 --- a/code/game/machinery/telecomms/computers/message.dm +++ b/code/game/machinery/telecomms/computers/message.dm @@ -282,6 +282,8 @@ /obj/item/paper/monitorkey name = "monitor decryption key" +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/paper/monitorkey) + /obj/item/paper/monitorkey/Initialize(mapload, obj/machinery/telecomms/message_server/server) ..() if (server) diff --git a/code/game/objects/effects/alien_acid.dm b/code/game/objects/effects/alien_acid.dm index 3f09a59d351d3..a9480662770c4 100644 --- a/code/game/objects/effects/alien_acid.dm +++ b/code/game/objects/effects/alien_acid.dm @@ -11,6 +11,8 @@ var/turf/target +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/acid) + /obj/effect/acid/Initialize(mapload, acid_pwr, acid_amt) . = ..() diff --git a/code/game/objects/effects/anomalies/_anomalies.dm b/code/game/objects/effects/anomalies/_anomalies.dm index de035db4da6d9..5a094416c945e 100644 --- a/code/game/objects/effects/anomalies/_anomalies.dm +++ b/code/game/objects/effects/anomalies/_anomalies.dm @@ -25,6 +25,8 @@ ///How many harvested pierced realities do we spawn on destruction var/max_spawned_faked = 2 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/anomaly) + /obj/effect/anomaly/Initialize(mapload, new_lifespan, spawned_fake_harvested) . = ..() diff --git a/code/game/objects/effects/anomalies/anomaly_flux.dm b/code/game/objects/effects/anomalies/anomaly_flux.dm index 5f4fdc9739807..20acff19cbe19 100644 --- a/code/game/objects/effects/anomalies/anomaly_flux.dm +++ b/code/game/objects/effects/anomalies/anomaly_flux.dm @@ -6,6 +6,8 @@ var/shockdamage = 20 var/explosive = ANOMALY_FLUX_EXPLOSIVE +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/anomaly/flux) + /obj/effect/anomaly/flux/Initialize(mapload, new_lifespan, drops_core = TRUE, explosive = ANOMALY_FLUX_EXPLOSIVE) . = ..() src.explosive = explosive diff --git a/code/game/objects/effects/anomalies/anomaly_gravity.dm b/code/game/objects/effects/anomalies/anomaly_gravity.dm index bc06bc3fba8ba..fdda56b57be9a 100644 --- a/code/game/objects/effects/anomalies/anomaly_gravity.dm +++ b/code/game/objects/effects/anomalies/anomaly_gravity.dm @@ -14,6 +14,8 @@ ///Warp effect holder for displacement filter to "pulse" the anomaly var/atom/movable/warp_effect/warp +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/anomaly/grav) + /obj/effect/anomaly/grav/Initialize(mapload, new_lifespan, drops_core) . = ..() var/static/list/loc_connections = list( @@ -76,6 +78,8 @@ /obj/effect/anomaly/grav/high var/grav_field +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/anomaly/grav/high) + /obj/effect/anomaly/grav/high/Initialize(mapload, new_lifespan) . = ..() setup_grav_field() diff --git a/code/game/objects/effects/contraband.dm b/code/game/objects/effects/contraband.dm index 07c0d3f0c5d3b..4f75ae2673003 100644 --- a/code/game/objects/effects/contraband.dm +++ b/code/game/objects/effects/contraband.dm @@ -12,6 +12,8 @@ var/poster_type var/obj/structure/sign/poster/poster_structure +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/poster) + /obj/item/poster/Initialize(mapload, obj/structure/sign/poster/new_poster_structure) . = ..() poster_structure = new_poster_structure diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index 5d1e841ae5026..59d70bfce96d8 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -9,6 +9,8 @@ ///The type of cleaning required to clean the decal, CLEAN_TYPE_LIGHT_DECAL can be cleaned with mops and soap, CLEAN_TYPE_HARD_DECAL can be cleaned by soap, see __DEFINES/cleaning.dm for the others var/clean_type = CLEAN_TYPE_LIGHT_DECAL +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/decal/cleanable) + /obj/effect/decal/cleanable/Initialize(mapload, list/datum/disease/diseases) . = ..() if (random_icon_states && (icon_state == initial(icon_state)) && length(random_icon_states) > 0) diff --git a/code/game/objects/effects/decals/cleanable/humans.dm b/code/game/objects/effects/decals/cleanable/humans.dm index 5c37486b41ade..f92b63ee31a85 100644 --- a/code/game/objects/effects/decals/cleanable/humans.dm +++ b/code/game/objects/effects/decals/cleanable/humans.dm @@ -61,6 +61,8 @@ icon_state = "floor1-old" var/list/datum/disease/diseases = list() +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/decal/cleanable/blood/old) + /obj/effect/decal/cleanable/blood/old/Initialize(mapload, list/datum/disease/diseases) add_blood_DNA(list("Non-human DNA" = random_blood_type())) // Needs to happen before ..() . = ..() @@ -112,6 +114,8 @@ ///Information about the diseases our streaking spawns var/list/streak_diseases +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/decal/cleanable/blood/gibs) + /obj/effect/decal/cleanable/blood/gibs/Initialize(mapload, list/datum/disease/diseases) . = ..() reagents.add_reagent(/datum/reagent/liquidgibs, 5) @@ -205,6 +209,8 @@ drydesc = "Space Jesus, why didn't anyone clean this up? They smell terrible." var/list/datum/disease/diseases = list() +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/decal/cleanable/blood/gibs/old) + /obj/effect/decal/cleanable/blood/gibs/old/Initialize(mapload, list/datum/disease/diseases) . = ..() setDir(pick(1, 2, 4, 8)) diff --git a/code/game/objects/effects/decals/cleanable/misc.dm b/code/game/objects/effects/decals/cleanable/misc.dm index c5baa5696e985..57c65ecebcbc8 100644 --- a/code/game/objects/effects/decals/cleanable/misc.dm +++ b/code/game/objects/effects/decals/cleanable/misc.dm @@ -142,6 +142,8 @@ desc = "You try not to look at the chunks, and fail." var/list/datum/disease/diseases = list() +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/decal/cleanable/vomit/old) + /obj/effect/decal/cleanable/vomit/old/Initialize(mapload, list/datum/disease/diseases) . = ..() icon_state += "-old" diff --git a/code/game/objects/effects/decals/crayon.dm b/code/game/objects/effects/decals/crayon.dm index 5e7e025fbcbd9..4fe8fb4ef0a0c 100644 --- a/code/game/objects/effects/decals/crayon.dm +++ b/code/game/objects/effects/decals/crayon.dm @@ -10,6 +10,8 @@ var/rotation = 0 var/paint_colour = "#FFFFFF" +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/decal/cleanable/crayon) + /obj/effect/decal/cleanable/crayon/Initialize(mapload, main, type, e_name, graf_rot, alt_icon = null) . = ..() if(e_name) diff --git a/code/game/objects/effects/forcefields.dm b/code/game/objects/effects/forcefields.dm index bf7ae1fb93d37..fc8577bf8a700 100644 --- a/code/game/objects/effects/forcefields.dm +++ b/code/game/objects/effects/forcefields.dm @@ -9,6 +9,8 @@ z_flags = Z_BLOCK_IN_DOWN | Z_BLOCK_IN_UP var/timeleft = 300 //Set to 0 for permanent forcefields (ugh) +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/forcefield) + /obj/effect/forcefield/Initialize(mapload, ntimeleft) . = ..() if(isnum_safe(ntimeleft)) @@ -39,6 +41,8 @@ desc = "You're gonna be here awhile." timeleft = 600 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/forcefield/mime) + /obj/effect/forcefield/mime/Initialize(mapload, ntimeleft) . = ..() SSvis_overlays.add_obj_alpha(src, 'icons/turf/walls/snow_wall.dmi', "snow_wall-0") diff --git a/code/game/objects/effects/icons.dm b/code/game/objects/effects/icons.dm index d202ac5ff8fb6..01c8248303d27 100644 --- a/code/game/objects/effects/icons.dm +++ b/code/game/objects/effects/icons.dm @@ -4,10 +4,14 @@ name = "" mouse_opacity = MOUSE_OPACITY_TRANSPARENT +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/icon) + /obj/effect/icon/Initialize(mapload, icon/render_source) . = ..() overlays = list(render_source) +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/icon/temp) + /obj/effect/icon/temp/Initialize(mapload, icon/render_source, duration) . = ..() addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), src), duration, TIMER_STOPPABLE | TIMER_CLIENT_TIME) diff --git a/code/game/objects/effects/info.dm b/code/game/objects/effects/info.dm index 23f341c8a3c78..2f2feee80bb2d 100644 --- a/code/game/objects/effects/info.dm +++ b/code/game/objects/effects/info.dm @@ -7,6 +7,8 @@ /// What should the info button display when clicked? var/info_text +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/abstract/info) + /obj/effect/abstract/info/Initialize(mapload, info_text) . = ..() diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 6031d3bab396d..ccdb8b598f528 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -488,6 +488,8 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player) /obj/effect/landmark/ruin var/datum/map_template/ruin/ruin_template +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/landmark/ruin) + /obj/effect/landmark/ruin/Initialize(mapload, my_ruin_template) . = ..() name = "ruin_[GLOB.ruin_landmarks.len + 1]" diff --git a/code/game/objects/effects/lighting.dm b/code/game/objects/effects/lighting.dm index a0838f6e840fa..4f054ba2044aa 100644 --- a/code/game/objects/effects/lighting.dm +++ b/code/game/objects/effects/lighting.dm @@ -14,6 +14,8 @@ //blocks_emissive = EMISSIVE_BLOCK_NONE mouse_opacity = MOUSE_OPACITY_TRANSPARENT +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/dummy/lighting_obj) + /obj/effect/dummy/lighting_obj/Initialize(mapload, range, power, color, duration) . = ..() if(!isnull(range)) @@ -28,6 +30,8 @@ /obj/effect/dummy/lighting_obj/moblight name = "mob" +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/dummy/lighting_obj/moblight) + /obj/effect/dummy/lighting_obj/moblight/Initialize(mapload, range, power, color, duration) . = ..() if(!ismob(loc)) diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm index 472cb998b7797..2a9ac99c7d876 100644 --- a/code/game/objects/effects/portals.dm +++ b/code/game/objects/effects/portals.dm @@ -86,6 +86,8 @@ if(Adjacent(user)) teleport(user) +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/portal) + /obj/effect/portal/Initialize(mapload, _creator, _lifespan = 0, obj/effect/portal/_linked, automatic_link = FALSE, turf/hard_target_override, atmos_link_override) . = ..() GLOB.portals += src @@ -208,6 +210,8 @@ var/id // var edit or set id in map editor hardlinked = FALSE // dont qdel my portal nerd +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/portal/permanent) + /obj/effect/portal/permanent/Initialize(mapload, _creator, _lifespan = 0, obj/effect/portal/_linked, automatic_link = FALSE, turf/hard_target_override, atmos_link_override) . = ..() set_linked() diff --git a/code/game/objects/effects/proximity.dm b/code/game/objects/effects/proximity.dm index f7502f744b08d..dea082420fd05 100644 --- a/code/game/objects/effects/proximity.dm +++ b/code/game/objects/effects/proximity.dm @@ -100,6 +100,8 @@ anchored = TRUE var/datum/proximity_monitor/monitor +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/abstract/proximity_checker) + /obj/effect/abstract/proximity_checker/Initialize(mapload, datum/proximity_monitor/_monitor) . = ..() if(_monitor) diff --git a/code/game/objects/effects/spawners/gibspawner.dm b/code/game/objects/effects/spawners/gibspawner.dm index 852b86dc7a865..6df5ff54ff243 100644 --- a/code/game/objects/effects/spawners/gibspawner.dm +++ b/code/game/objects/effects/spawners/gibspawner.dm @@ -9,6 +9,8 @@ var/list/gibamounts = list() //amount to spawn for each gib decal type we'll spawn. var/list/gibdirections = list() //of lists of possible directions to spread each gib decal type towards. +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/gibspawner) + /obj/effect/gibspawner/Initialize(mapload, mob/living/source_mob, list/datum/disease/diseases) . = ..() diff --git a/code/game/objects/effects/temporary_visuals/clockwork.dm b/code/game/objects/effects/temporary_visuals/clockwork.dm index 65e700fd6d128..ffbac1b47be2e 100644 --- a/code/game/objects/effects/temporary_visuals/clockwork.dm +++ b/code/game/objects/effects/temporary_visuals/clockwork.dm @@ -109,6 +109,8 @@ pixel_x = -16 duration = 30 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/ratvar/prolonging_prism) + /obj/effect/temp_visual/ratvar/prolonging_prism/Initialize(mapload, set_appearance) . = ..() if(set_appearance) @@ -159,6 +161,8 @@ icon_state = "smoke" duration = 15 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/steam) + /obj/effect/temp_visual/steam/Initialize(mapload, steam_direction) . = ..() setDir(steam_direction) diff --git a/code/game/objects/effects/temporary_visuals/cult.dm b/code/game/objects/effects/temporary_visuals/cult.dm index 473405deded44..3461069224a61 100644 --- a/code/game/objects/effects/temporary_visuals/cult.dm +++ b/code/game/objects/effects/temporary_visuals/cult.dm @@ -72,6 +72,8 @@ alpha = 0 var/turnedness = 179 //179 turns counterclockwise, 181 turns clockwise +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/cult/rune_spawn) + /obj/effect/temp_visual/cult/rune_spawn/Initialize(mapload, set_duration, set_color) if(isnum_safe(set_duration)) duration = set_duration diff --git a/code/game/objects/effects/temporary_visuals/miscellaneous.dm b/code/game/objects/effects/temporary_visuals/miscellaneous.dm index 94fbdfa71bb3d..1206d43824256 100644 --- a/code/game/objects/effects/temporary_visuals/miscellaneous.dm +++ b/code/game/objects/effects/temporary_visuals/miscellaneous.dm @@ -6,6 +6,8 @@ layer = BELOW_MOB_LAYER var/splatter_type = "splatter" +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/dir_setting/bloodsplatter) + /obj/effect/temp_visual/dir_setting/bloodsplatter/Initialize(mapload, set_dir) if(set_dir in GLOB.diagonals) icon_state = "[splatter_type][pick(1, 2, 6)]" @@ -129,11 +131,15 @@ /obj/effect/temp_visual/dir_setting/curse/long // Necro Sect Usage duration = 330 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/dir_setting/curse) + /obj/effect/temp_visual/dir_setting/curse/Initialize(mapload, set_dir) . = ..() if(fades) animate(src, alpha = 0, time = 32) +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/dir_setting/curse/long) + /obj/effect/temp_visual/dir_setting/curse/long/Initialize(mapload, set_dir) . = ..() if(fades) @@ -166,6 +172,8 @@ pixel_y = -16 duration = 50 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/bsa_splash) + /obj/effect/temp_visual/bsa_splash/Initialize(mapload, dir) . = ..() switch(dir) @@ -211,6 +219,8 @@ desc = "It's a decoy!" duration = 15 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/decoy) + /obj/effect/temp_visual/decoy/Initialize(mapload, atom/mimiced_atom) . = ..() alpha = initial(alpha) @@ -220,6 +230,8 @@ setDir(mimiced_atom.dir) mouse_opacity = MOUSE_OPACITY_TRANSPARENT +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/decoy/fading) + /obj/effect/temp_visual/decoy/fading/Initialize(mapload, atom/mimiced_atom) . = ..() animate(src, alpha = 0, time = duration) @@ -300,6 +312,8 @@ icon = 'icons/mob/mob.dmi' duration = 15 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/gib_animation) + /obj/effect/temp_visual/gib_animation/Initialize(mapload, gib_icon) icon_state = gib_icon // Needs to be before ..() so icon is correct . = ..() @@ -311,6 +325,8 @@ icon = 'icons/mob/mob.dmi' duration = 15 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/dust_animation) + /obj/effect/temp_visual/dust_animation/Initialize(mapload, dust_icon) icon_state = dust_icon // Before ..() so the correct icon is flick()'d . = ..() @@ -325,6 +341,8 @@ icon_state = "heal" duration = 15 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/heal) + /obj/effect/temp_visual/heal/Initialize(mapload, set_color) if(set_color) add_atom_colour(set_color, FIXED_COLOUR_PRIORITY) @@ -367,6 +385,8 @@ icon_state = "impact_bullet" duration = 5 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/impact_effect) + /obj/effect/temp_visual/impact_effect/Initialize(mapload, x, y) pixel_x = x pixel_y = y @@ -423,6 +443,8 @@ /obj/effect/temp_visual/love_heart/invisible icon_state = null +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/love_heart/invisible) + /obj/effect/temp_visual/love_heart/invisible/Initialize(mapload, mob/seer) . = ..() var/image/I = image(icon = 'icons/effects/effects.dmi', icon_state = "heart", layer = ABOVE_MOB_LAYER, loc = src) @@ -438,6 +460,8 @@ duration = 10 var/shrink = TRUE +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/bleed) + /obj/effect/temp_visual/bleed/Initialize(mapload, atom/size_calc_target) . = ..() var/size_matrix = matrix() @@ -462,6 +486,8 @@ duration = 5 var/outgoing = TRUE +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/warp_cube) + /obj/effect/temp_visual/warp_cube/Initialize(mapload, atom/teleporting_atom, warp_color, new_outgoing) . = ..() if(teleporting_atom) @@ -495,6 +521,8 @@ var/status = 0 var/delay = 0 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/constructing_effect) + /obj/effect/constructing_effect/Initialize(mapload, rcd_delay, rcd_status) . = ..() status = rcd_status @@ -537,6 +565,8 @@ icon_state = "smoke" duration = 15 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/steam) + /obj/effect/temp_visual/steam/Initialize(mapload, steam_direction) . = ..() setDir(steam_direction) @@ -580,6 +610,8 @@ icon_state = "shield" alpha = 0 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/launchpad) + /obj/effect/temp_visual/launchpad/Initialize(mapload, time) duration = time animate(src, time=time, alpha=255) diff --git a/code/game/objects/effects/temporary_visuals/projectiles/projectile_effects.dm b/code/game/objects/effects/temporary_visuals/projectiles/projectile_effects.dm index 27f49fd93bf77..fab895e04b713 100644 --- a/code/game/objects/effects/temporary_visuals/projectiles/projectile_effects.dm +++ b/code/game/objects/effects/temporary_visuals/projectiles/projectile_effects.dm @@ -55,6 +55,8 @@ /obj/effect/projectile_lighting var/owner +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/projectile_lighting) + /obj/effect/projectile_lighting/Initialize(mapload, color, range, intensity, owner_key) . = ..() set_light(range, intensity, color) diff --git a/code/game/objects/effects/temporary_visuals/temporary_visual.dm b/code/game/objects/effects/temporary_visuals/temporary_visual.dm index ec4c0b9a7db59..685792d250b2a 100644 --- a/code/game/objects/effects/temporary_visuals/temporary_visual.dm +++ b/code/game/objects/effects/temporary_visuals/temporary_visual.dm @@ -28,6 +28,8 @@ /obj/effect/temp_visual/dir_setting randomdir = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/dir_setting) + /obj/effect/temp_visual/dir_setting/Initialize(mapload, set_dir) if(set_dir) setDir(set_dir) diff --git a/code/game/objects/effects/wanted_poster.dm b/code/game/objects/effects/wanted_poster.dm index 5fb37ab4756e4..bece7705b9c29 100644 --- a/code/game/objects/effects/wanted_poster.dm +++ b/code/game/objects/effects/wanted_poster.dm @@ -23,6 +23,8 @@ CREATION_TEST_IGNORE_SUBTYPES(/obj/item/poster/wanted) postHeaderText = "MISSING" // MAX 7 Characters postHeaderColor = "#0000FF" +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/poster/wanted) + /obj/item/poster/wanted/Initialize(mapload, icon/person_icon, wanted_name, description, headerText) . = ..(mapload, new /obj/structure/sign/poster/wanted(src, person_icon, wanted_name, description, headerText, postHeaderColor, background, postName, postDesc)) name = "[postName] ([wanted_name])" @@ -36,6 +38,8 @@ CREATION_TEST_IGNORE_SUBTYPES(/obj/item/poster/wanted) var/posterHeaderText var/posterHeaderColor +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/sign/poster/wanted) + /obj/structure/sign/poster/wanted/Initialize(mapload, icon/person_icon, person_name, description, postHeaderText, postHeaderColor, background, pname, pdesc) . = ..() if(!person_icon) diff --git a/code/game/objects/items/chrono_eraser.dm b/code/game/objects/items/chrono_eraser.dm index e835909745a4f..01aa2723fba17 100644 --- a/code/game/objects/items/chrono_eraser.dm +++ b/code/game/objects/items/chrono_eraser.dm @@ -180,6 +180,8 @@ var/RPpos = null var/attached = TRUE //if the gun arg isn't included initially, then the chronofield will work without one +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/chrono_field) + /obj/structure/chrono_field/Initialize(mapload, mob/living/target, obj/item/gun/energy/chrono_gun/G) if(target && isliving(target)) if(!G) diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index bd1597fe5942e..b5fde44df77be 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -881,6 +881,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM return (TOXLOSS|OXYLOSS) +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/clothing/mask/vape) + /obj/item/clothing/mask/vape/Initialize(mapload, param_color) . = ..() create_reagents(chem_volume, NO_REACT) diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm index be38d3ff63d34..cc63d49ef1d1a 100644 --- a/code/game/objects/items/circuitboards/machine_circuitboards.dm +++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm @@ -480,6 +480,8 @@ /obj/machinery/smartfridge/disks = "disks") needs_anchored = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/circuitboard/machine/smartfridge) + /obj/item/circuitboard/machine/smartfridge/Initialize(mapload, new_type) if(new_type) build_path = new_type diff --git a/code/game/objects/items/crab17.dm b/code/game/objects/items/crab17.dm index 60b1769475811..bcdabad928023 100644 --- a/code/game/objects/items/crab17.dm +++ b/code/game/objects/items/crab17.dm @@ -51,6 +51,8 @@ var/player_modifier = 1 +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/checkoutmachine) + /obj/structure/checkoutmachine/Initialize(mapload, mob/living/user) bogdanoff = user add_overlay("flaps") @@ -258,6 +260,8 @@ var/obj/structure/checkoutmachine/dump var/mob/living/carbon/human/bogdanoff +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/dumpeetTarget) + /obj/effect/dumpeetTarget/Initialize(mapload, user) . = ..() bogdanoff = user diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 3a283f3b30cd0..e607ef4e1b61a 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -896,6 +896,8 @@ pre_noise = FALSE post_noise = TRUE +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/toy/crayon/spraycan/gang) + /obj/item/toy/crayon/spraycan/gang/Initialize(mapload, loc, datum/team/gang/G) .=..() if(G) diff --git a/code/game/objects/items/credit_holochip.dm b/code/game/objects/items/credit_holochip.dm index 55939bd4604eb..04f927c1a13a1 100644 --- a/code/game/objects/items/credit_holochip.dm +++ b/code/game/objects/items/credit_holochip.dm @@ -8,6 +8,8 @@ w_class = WEIGHT_CLASS_TINY var/credits = 0 +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/holochip) + /obj/item/holochip/Initialize(mapload, amount) . = ..() credits = amount diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 6aa2ee923e4d4..d2aa8aeea28c3 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -205,6 +205,8 @@ icon_state = "medi_holo" duration = 30 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/medical_holosign) + /obj/effect/temp_visual/medical_holosign/Initialize(mapload, creator) . = ..() playsound(loc, 'sound/machines/ping.ogg', 50, FALSE) //make some noise! @@ -604,6 +606,8 @@ var/base_light_range = 4 +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/flashlight/spotlight) + /obj/item/flashlight/spotlight/Initialize(mapload, _light_range, _light_power, _light_color) . = ..() if(!isnull(_light_range)) diff --git a/code/game/objects/items/devices/forcefieldprojector.dm b/code/game/objects/items/devices/forcefieldprojector.dm index 7c6d8c1798069..8f93c94e7dc9f 100644 --- a/code/game/objects/items/devices/forcefieldprojector.dm +++ b/code/game/objects/items/devices/forcefieldprojector.dm @@ -90,6 +90,8 @@ armor = list(MELEE = 0, BULLET = 25, LASER = 50, ENERGY = 50, BOMB = 25, BIO = 100, RAD = 100, FIRE = 100, ACID = 100, STAMINA = 0, BLEED = 0) var/obj/item/forcefield_projector/generator +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/projected_forcefield) + /obj/structure/projected_forcefield/Initialize(mapload, obj/item/forcefield_projector/origin) . = ..() generator = origin diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index fe6f1f5c34c79..be51cd20bcecb 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -12,6 +12,8 @@ /obj/item/radio/intercom/unscrewed unscrewed = TRUE +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/radio/intercom) + /obj/item/radio/intercom/Initialize(mapload, ndir, building) . = ..() var/area/current_area = get_area(src) @@ -160,6 +162,8 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/item/radio/intercom, 26) name = "Confessional intercom" anonymize = TRUE +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/radio/intercom/chapel) + /obj/item/radio/intercom/chapel/Initialize(mapload, ndir, building) . = ..() set_frequency(1481) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index d702c879b1213..912ae6c2c49a7 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -1035,6 +1035,8 @@ GENE SCANNER /// Cooldown for when the extrapolator can be used next. COOLDOWN_DECLARE(usage_cooldown) +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/extrapolator) + /obj/item/extrapolator/Initialize(mapload, obj/item/stock_parts/scanning_module/starting_scanner) . = ..() starting_scanner = starting_scanner || default_scanning_module diff --git a/code/game/objects/items/documents.dm b/code/game/objects/items/documents.dm index 9976848bdfc46..0ad1308f364f7 100644 --- a/code/game/objects/items/documents.dm +++ b/code/game/objects/items/documents.dm @@ -37,6 +37,8 @@ var/forgedseal = 0 var/copy_type = null +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/documents/photocopy) + /obj/item/documents/photocopy/Initialize(mapload, obj/item/documents/copy=null) . = ..() if(copy) diff --git a/code/game/objects/items/grenades/clusterbuster.dm b/code/game/objects/items/grenades/clusterbuster.dm index 08ce67d0e3b1b..1720082bfade3 100644 --- a/code/game/objects/items/grenades/clusterbuster.dm +++ b/code/game/objects/items/grenades/clusterbuster.dm @@ -44,6 +44,8 @@ icon_state = "clusterbang_segment" base_state = "clusterbang_segment" +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/grenade/clusterbuster/segment) + /obj/item/grenade/clusterbuster/segment/Initialize(mapload, obj/item/grenade/clusterbuster/base) . = ..() if(base) @@ -74,6 +76,8 @@ ////////////////////////////////// //The payload spawner effect ///////////////////////////////// +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/payload_spawner) + /obj/effect/payload_spawner/Initialize(mapload, type, numspawned) ..() spawn_payload(type, numspawned) diff --git a/code/game/objects/items/grenades/discogrenade.dm b/code/game/objects/items/grenades/discogrenade.dm index 5e6d1caaadac9..f5d1729f0317b 100644 --- a/code/game/objects/items/grenades/discogrenade.dm +++ b/code/game/objects/items/grenades/discogrenade.dm @@ -47,6 +47,8 @@ var/range = 5 var/power = 3 +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/grenade/discogrenade/subgrenade) + /obj/item/grenade/discogrenade/subgrenade/Initialize(mapload, duplicate = FALSE) . = ..() active = TRUE diff --git a/code/game/objects/items/implants/implantuplink.dm b/code/game/objects/items/implants/implantuplink.dm index f80782c77efc6..20db68c4925ba 100644 --- a/code/game/objects/items/implants/implantuplink.dm +++ b/code/game/objects/items/implants/implantuplink.dm @@ -9,6 +9,8 @@ /// The uplink flags of the implant uplink inside, only checked during initialisation so modifying it after initialisation will do nothing var/uplink_flag = UPLINK_TRAITORS +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/implant/uplink) + /obj/item/implant/uplink/Initialize(mapload, owner, uplink_flag) . = ..() AddComponent(/datum/component/uplink, _owner = owner, _lockable = TRUE, _enabled = FALSE, uplink_flag = uplink_flag, starting_tc = starting_tc) @@ -29,6 +31,8 @@ name = "implanter (uplink)" imp_type = /obj/item/implant/uplink +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/implanter/uplink) + /obj/item/implanter/uplink/Initialize(mapload, uplink_flag = UPLINK_TRAITORS) imp = new imp_type(src, null, uplink_flag) . = ..() diff --git a/code/game/objects/items/mjolnir.dm b/code/game/objects/items/mjolnir.dm index 279edbcbe96b3..bf1fd1b30b28f 100644 --- a/code/game/objects/items/mjolnir.dm +++ b/code/game/objects/items/mjolnir.dm @@ -84,6 +84,8 @@ resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF var/obj/item/mjolnir/contained +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/anchored_mjolnir) + /obj/structure/anchored_mjolnir/Initialize(mapload, obj/item/mjolnir/god_hammer) . = ..() //Put the hammer inside of ourselves @@ -139,6 +141,8 @@ speed = 0.3 var/obj/item/mjolnir/contained +CREATION_TEST_IGNORE_SUBTYPES(/obj/projectile/mjolnir) + /obj/projectile/mjolnir/Initialize(mapload, obj/item/mjolnir/contained_hammer) . = ..() contained = contained_hammer diff --git a/code/game/objects/items/spear.dm b/code/game/objects/items/spear.dm index ae7aaa4f2a6aa..8393847756968 100644 --- a/code/game/objects/items/spear.dm +++ b/code/game/objects/items/spear.dm @@ -65,6 +65,8 @@ icon_state = "spearbomb0" var/obj/item/grenade/explosive = null +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/spear/explosive) + /obj/item/spear/explosive/Initialize(mapload, obj/item/grenade/G) . = ..() set_explosive(G) diff --git a/code/game/objects/items/stacks/cash.dm b/code/game/objects/items/stacks/cash.dm index c1faa1abc1218..c21543c32940a 100644 --- a/code/game/objects/items/stacks/cash.dm +++ b/code/game/objects/items/stacks/cash.dm @@ -13,6 +13,8 @@ resistance_flags = FLAMMABLE var/value = 0 +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/stack/spacecash) + /obj/item/stack/spacecash/Initialize(mapload, new_amount, merge = TRUE, mob/user = null) . = ..() update_desc() diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 91fd05087eeda..0f08b9586cb5c 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -29,6 +29,8 @@ ///How long does it take to apply on yourself? var/self_delay = 2 SECONDS +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/stack/medical) + /obj/item/stack/medical/Initialize(mapload, new_amount, merge, mob/user) . = ..() if(reagent) diff --git a/code/game/objects/items/stacks/ores/ore.dm b/code/game/objects/items/stacks/ores/ore.dm index 555c7db17fc5f..dd43a2a626487 100644 --- a/code/game/objects/items/stacks/ores/ore.dm +++ b/code/game/objects/items/stacks/ores/ore.dm @@ -61,6 +61,8 @@ new refined_type(drop_location(),amountrefined) qdel(src) +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/stack/ore) + /obj/item/stack/ore/Initialize(mapload, new_amount, merge = TRUE, mob/user = null) . = ..() pixel_x = base_pixel_x + rand(0,16) - 8 diff --git a/code/game/objects/items/stacks/rods/rods.dm b/code/game/objects/items/stacks/rods/rods.dm index 4ade958ee737a..b059ec4ac85b5 100644 --- a/code/game/objects/items/stacks/rods/rods.dm +++ b/code/game/objects/items/stacks/rods/rods.dm @@ -26,6 +26,8 @@ user.visible_message("[user] begins to stuff \the [src] down [user.p_their()] throat! It looks like [user.p_theyre()] trying to commit suicide!")//it looks like theyre ur mum return BRUTELOSS +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/stack/rods) + /obj/item/stack/rods/Initialize(mapload, new_amount, merge = TRUE, mob/user = null) . = ..() if(QDELETED(src)) // we can be deleted during merge, check before doing stuff diff --git a/code/game/objects/items/stacks/sheets/mineral/metals.dm b/code/game/objects/items/stacks/sheets/mineral/metals.dm index cdcb2c53bd51d..288e00ed5f055 100644 --- a/code/game/objects/items/stacks/sheets/mineral/metals.dm +++ b/code/game/objects/items/stacks/sheets/mineral/metals.dm @@ -133,6 +133,8 @@ Metals Sheets /obj/item/stack/sheet/brass/get_recipes() return GLOB.brass_recipes +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/stack/sheet/brass) + /obj/item/stack/sheet/brass/Initialize(mapload, new_amount, merge = TRUE) . = ..() pixel_x = 0 @@ -165,6 +167,8 @@ Metals Sheets /obj/item/stack/sheet/bronze/get_recipes() return GLOB.bronze_recipes +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/stack/sheet/bronze) + /obj/item/stack/sheet/bronze/Initialize(mapload, new_amount, merge = TRUE) . = ..() pixel_x = 0 diff --git a/code/game/objects/items/stacks/sheets/organic/leather.dm b/code/game/objects/items/stacks/sheets/organic/leather.dm index 92b2e83b53e15..fdd63ac72fbc9 100644 --- a/code/game/objects/items/stacks/sheets/organic/leather.dm +++ b/code/game/objects/items/stacks/sheets/organic/leather.dm @@ -32,6 +32,8 @@ var/wetness = 30 //Reduced when exposed to high temperautres var/drying_threshold_temperature = 500 //Kelvin to start drying +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/stack/sheet/leather/wetleather) + /obj/item/stack/sheet/leather/wetleather/Initialize(mapload, new_amount, merge) . = ..() AddElement(/datum/element/dryable, /obj/item/stack/sheet/leather) diff --git a/code/game/objects/items/stacks/sheets/sheets.dm b/code/game/objects/items/stacks/sheets/sheets.dm index 6a5ee9649457a..aa9d0e5be76b8 100644 --- a/code/game/objects/items/stacks/sheets/sheets.dm +++ b/code/game/objects/items/stacks/sheets/sheets.dm @@ -17,6 +17,8 @@ ///What type of wall does this sheet spawn var/walltype +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/stack/sheet) + /obj/item/stack/sheet/Initialize(mapload, new_amount, merge) . = ..() pixel_x = rand(-4, 4) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 656598bb82fd2..d1aed8425f457 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -46,6 +46,8 @@ /// Amount of matter for RCD var/matter_amount = 0 +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/stack) + /obj/item/stack/Initialize(mapload, new_amount, merge = TRUE, mob/user = null) if(new_amount != null) amount = new_amount diff --git a/code/game/objects/items/stacks/tiles/light.dm b/code/game/objects/items/stacks/tiles/light.dm index 0fe25744382a5..c5745f6165898 100644 --- a/code/game/objects/items/stacks/tiles/light.dm +++ b/code/game/objects/items/stacks/tiles/light.dm @@ -47,6 +47,8 @@ var/state = 0 merge_type = /obj/item/stack/tile/light +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/stack/tile/light) + /obj/item/stack/tile/light/Initialize(mapload, new_amount, merge = TRUE) . = ..() if(prob(5)) diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index e2dd4821b73b2..c5c0babf017cc 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -29,6 +29,8 @@ /// Allows us to replace the plating we are attacking if our baseturfs are the same. var/replace_plating = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/stack/tile) + /obj/item/stack/tile/Initialize(mapload, new_amount, merge = TRUE, mob/user = null) . = ..() pixel_x = rand(-3, 3) diff --git a/code/game/objects/structures/artstuff.dm b/code/game/objects/structures/artstuff.dm index 87c427363bd59..76784ad1e68c6 100644 --- a/code/game/objects/structures/artstuff.dm +++ b/code/game/objects/structures/artstuff.dm @@ -258,6 +258,8 @@ var/desc_with_canvas var/persistence_id +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/sign/painting) + /obj/structure/sign/painting/Initialize(mapload, dir, building) . = ..() SSpersistence.painting_frames += src diff --git a/code/game/objects/structures/bot_elevator.dm b/code/game/objects/structures/bot_elevator.dm index fc4505cb69a8e..4b67869fd924d 100644 --- a/code/game/objects/structures/bot_elevator.dm +++ b/code/game/objects/structures/bot_elevator.dm @@ -8,6 +8,8 @@ var/obj/structure/bot_elevator/up max_integrity = 100 +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/bot_elevator) + /obj/structure/bot_elevator/Initialize(mapload, obj/structure/bot_elevator/up, obj/structure/bot_elevator/down) ..() GLOB.bot_elevator += src diff --git a/code/game/objects/structures/crates_lockers/crates/secure.dm b/code/game/objects/structures/crates_lockers/crates/secure.dm index a3b28f10edaf0..8bde41cb2b41a 100644 --- a/code/game/objects/structures/crates_lockers/crates/secure.dm +++ b/code/game/objects/structures/crates_lockers/crates/secure.dm @@ -83,6 +83,8 @@ . = ..() . += "It's locked with a privacy lock, and can only be unlocked by the buyer's ID with required access." +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/closet/crate/secure/owned) + /obj/structure/closet/crate/secure/owned/Initialize(mapload, datum/bank_account/_buyer_account) . = ..() buyer_account = _buyer_account diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index a2d071256fd45..7d2cf240fb274 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -403,6 +403,8 @@ /obj/item/showpiece_dummy name = "Cheap replica" +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/showpiece_dummy) + /obj/item/showpiece_dummy/Initialize(mapload, path) . = ..() var/obj/item/I = path diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index ece0c709fbcad..27089c6c0b6f8 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -13,6 +13,8 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/extinguisher_cabinet, 29) +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/extinguisher_cabinet) + /obj/structure/extinguisher_cabinet/Initialize(mapload, ndir, building) . = ..() if(building) diff --git a/code/game/objects/structures/ghost_role_spawners.dm b/code/game/objects/structures/ghost_role_spawners.dm index a8ec76f3e1844..418374583223a 100644 --- a/code/game/objects/structures/ghost_role_spawners.dm +++ b/code/game/objects/structures/ghost_role_spawners.dm @@ -68,6 +68,8 @@ H.update_body() H.fully_replace_character_name(null, H.dna.species.random_name(gender)) +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/mob_spawn/human/ash_walker) + /obj/effect/mob_spawn/human/ash_walker/Initialize(mapload, datum/team/ashwalkers/ashteam) . = ..() var/area/A = get_area(src) @@ -102,6 +104,8 @@ golems, so that no golem may ever be forced to serve again." banType = ROLE_FREE_GOLEM +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/mob_spawn/human/golem) + /obj/effect/mob_spawn/human/golem/Initialize(mapload, datum/species/golem/species = null, mob/creator = null) if(species) //spawners list uses object name to register so this goes before ..() name += " ([initial(species.prefix)])" @@ -355,6 +359,8 @@ assignedrole = "SuperFriend" banType = ROLE_DEMONIC_FRIEND +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/mob_spawn/human/demonic_friend) + /obj/effect/mob_spawn/human/demonic_friend/Initialize(mapload, datum/mind/owner_mind, obj/effect/proc_holder/spell/targeted/summon_friend/summoning_spell) . = ..() owner = owner_mind diff --git a/code/game/objects/structures/ladders.dm b/code/game/objects/structures/ladders.dm index ac810ddd96bf2..48a30afa45f17 100644 --- a/code/game/objects/structures/ladders.dm +++ b/code/game/objects/structures/ladders.dm @@ -10,6 +10,8 @@ max_integrity = 100 z_flags = Z_BLOCK_OUT_DOWN +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/ladder) + /obj/structure/ladder/Initialize(mapload, obj/structure/ladder/up, obj/structure/ladder/down) ..() if (up) diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index a154713a4ddf6..5f7c20babfaaa 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -14,6 +14,8 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28) +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/mirror) + /obj/structure/mirror/Initialize(mapload, dir, building) . = ..() if(icon_state == "mirror_broke" && !broken) diff --git a/code/game/objects/structures/petrified_statue.dm b/code/game/objects/structures/petrified_statue.dm index a2a5becf77e27..62987b94c02d6 100644 --- a/code/game/objects/structures/petrified_statue.dm +++ b/code/game/objects/structures/petrified_statue.dm @@ -8,6 +8,8 @@ var/timer = 480 //eventually the person will be freed var/mob/living/petrified_mob +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/statue/petrified) + /obj/structure/statue/petrified/Initialize(mapload, mob/living/L, statue_timer) . = ..() if(statue_timer) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index ccd47398717ab..5020d083243db 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -39,6 +39,8 @@ max_integrity = 100 integrity_failure = 0.33 +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/table) + /obj/structure/table/Initialize(mapload, _buildstack) . = ..() if(_buildstack) diff --git a/code/game/objects/structures/transit_tubes/transit_tube.dm b/code/game/objects/structures/transit_tubes/transit_tube.dm index c21ce6df8de6a..c4971671b324b 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube.dm @@ -13,6 +13,8 @@ var/exit_delay = 1 var/enter_delay = 0 +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/transit_tube) + /obj/structure/transit_tube/Initialize(mapload, newdirection) . = ..() if(newdirection) diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 3467296faf16a..71687e38f612c 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -31,6 +31,8 @@ var/state = "01" //How far the door assembly has progressed +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/windoor_assembly) + /obj/structure/windoor_assembly/Initialize(mapload, loc, set_dir) . = ..() if(set_dir) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index d4e0708538617..7c791af59dd82 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -50,6 +50,8 @@ else . += "The window is unscrewed from the floor, and could be deconstructed by wrenching." +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/window) + /obj/structure/window/Initialize(mapload, direct) . = ..() if(direct) diff --git a/code/game/say.dm b/code/game/say.dm index c2bf41f9c50ea..283f855cf1cd7 100644 --- a/code/game/say.dm +++ b/code/game/say.dm @@ -223,6 +223,8 @@ GLOBAL_LIST_INIT(freqtospan, list( var/obj/item/radio/radio INITIALIZE_IMMEDIATE(/atom/movable/virtualspeaker) +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/virtualspeaker) + /atom/movable/virtualspeaker/Initialize(mapload, atom/movable/M, _radio) . = ..() radio = _radio diff --git a/code/game/turfs/turf_texture.dm b/code/game/turfs/turf_texture.dm index a413cd92573ec..25cfdcccef721 100644 --- a/code/game/turfs/turf_texture.dm +++ b/code/game/turfs/turf_texture.dm @@ -27,6 +27,8 @@ ///Associated texture var/datum/turf_texture/parent_texture +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/turf_texture) + /atom/movable/turf_texture/Initialize(mapload, datum/turf_texture/_texture) . = ..() var/datum/turf_texture/texture = new _texture() diff --git a/code/modules/antagonists/blob/blob_mobs.dm b/code/modules/antagonists/blob/blob_mobs.dm index 790157494eaf3..4364156a88617 100644 --- a/code/modules/antagonists/blob/blob_mobs.dm +++ b/code/modules/antagonists/blob/blob_mobs.dm @@ -118,6 +118,8 @@ var/list/datum/disease/spore_diseases = list() flavor_text = FLAVOR_TEXT_GOAL_ANTAG +CREATION_TEST_IGNORE_SUBTYPES(/mob/living/simple_animal/hostile/blob/blobspore) + /mob/living/simple_animal/hostile/blob/blobspore/Initialize(mapload, var/obj/structure/blob/factory/linked_node) if(istype(linked_node)) factory = linked_node diff --git a/code/modules/antagonists/blob/overmind.dm b/code/modules/antagonists/blob/overmind.dm index 051efd9ab8a97..025d085e789fd 100644 --- a/code/modules/antagonists/blob/overmind.dm +++ b/code/modules/antagonists/blob/overmind.dm @@ -47,6 +47,8 @@ GLOBAL_LIST_EMPTY(blob_nodes) var/list/strain_choices var/need_reroll_strain = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/mob/camera/blob) + /mob/camera/blob/Initialize(mapload, starting_points = 60) validate_location() blob_points = starting_points diff --git a/code/modules/antagonists/blob/structures/_blob.dm b/code/modules/antagonists/blob/structures/_blob.dm index e7870b87acfaf..49b62ad129736 100644 --- a/code/modules/antagonists/blob/structures/_blob.dm +++ b/code/modules/antagonists/blob/structures/_blob.dm @@ -21,6 +21,8 @@ var/atmosblock = FALSE //if the blob blocks atmos and heat spread var/mob/camera/blob/overmind +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/blob) + /obj/structure/blob/Initialize(mapload, owner_overmind) . = ..() if(owner_overmind) diff --git a/code/modules/antagonists/blob/structures/core.dm b/code/modules/antagonists/blob/structures/core.dm index 5ed9ce87c3833..6b563022aeb6c 100644 --- a/code/modules/antagonists/blob/structures/core.dm +++ b/code/modules/antagonists/blob/structures/core.dm @@ -11,6 +11,8 @@ health_regen = 0 //we regen in Life() instead of when pulsed resistance_flags = LAVA_PROOF +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/blob/core) + /obj/structure/blob/core/Initialize(mapload, client/new_overmind = null, placed = 0) GLOB.blob_cores += src START_PROCESSING(SSobj, src) diff --git a/code/modules/antagonists/blob/structures/factory.dm b/code/modules/antagonists/blob/structures/factory.dm index 0bd47d7a1acd5..4c60e01e01aa7 100644 --- a/code/modules/antagonists/blob/structures/factory.dm +++ b/code/modules/antagonists/blob/structures/factory.dm @@ -49,6 +49,8 @@ /obj/structure/blob/factory/lone //A blob factory that functions without a pulses +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/blob/factory/lone) + /obj/structure/blob/factory/lone/Initialize(mapload, owner_overmind) . = ..() START_PROCESSING(SSobj, src) diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm index 39da9eafa0d9c..04a42574b4f6b 100644 --- a/code/modules/antagonists/changeling/powers/mutations.dm +++ b/code/modules/antagonists/changeling/powers/mutations.dm @@ -165,6 +165,8 @@ var/can_drop = FALSE var/fake = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/melee/arm_blade) + /obj/item/melee/arm_blade/Initialize(mapload,silent,synthetic) . = ..() ADD_TRAIT(src, TRAIT_NODROP, CHANGELING_TRAIT) @@ -233,6 +235,8 @@ requires_wielding = FALSE equip_time = 0 +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/gun/magic/tentacle) + /obj/item/gun/magic/tentacle/Initialize(mapload, silent) . = ..() ADD_TRAIT(src, TRAIT_NODROP, CHANGELING_TRAIT) diff --git a/code/modules/antagonists/clock_cult/clockwork_massive.dm b/code/modules/antagonists/clock_cult/clockwork_massive.dm index ee2fed63dd048..8366b0e0e735d 100644 --- a/code/modules/antagonists/clock_cult/clockwork_massive.dm +++ b/code/modules/antagonists/clock_cult/clockwork_massive.dm @@ -241,6 +241,8 @@ GLOBAL_VAR(cult_ratvar) var/ratvar_target var/next_attack_tick +CREATION_TEST_IGNORE_SUBTYPES(/obj/eldritch/ratvar) + /obj/eldritch/ratvar/Initialize(mapload, starting_energy = 50) singularity = WEAKREF(AddComponent( /datum/component/singularity, \ diff --git a/code/modules/antagonists/clock_cult/clockwork_turfs.dm b/code/modules/antagonists/clock_cult/clockwork_turfs.dm index 36a9381d42eac..3c89fb75a8f2e 100644 --- a/code/modules/antagonists/clock_cult/clockwork_turfs.dm +++ b/code/modules/antagonists/clock_cult/clockwork_turfs.dm @@ -598,6 +598,8 @@ for(var/i in 1 to 4) . += new /obj/item/clockwork/alloy_shards/medium/gear_bit(location) +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/window/reinforced/clockwork) + /obj/structure/window/reinforced/clockwork/Initialize(mapload, direct) made_glow = TRUE new /obj/effect/temp_visual/ratvar/window(get_turf(src)) diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm index 42da7a651f33e..63b4c7e4485a6 100644 --- a/code/modules/antagonists/cult/blood_magic.dm +++ b/code/modules/antagonists/cult/blood_magic.dm @@ -357,6 +357,8 @@ var/health_cost = 0 //The amount of health taken from the user when invoking the spell var/datum/action/innate/cult/blood_spell/source +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/melee/blood_magic) + /obj/item/melee/blood_magic/Initialize(mapload, var/spell) . = ..() if(!istype(spell, /datum/action/innate/cult/blood_spell)) diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm index b5f983fb2db9e..b3fe8d27f1d8c 100644 --- a/code/modules/antagonists/cult/runes.dm +++ b/code/modules/antagonists/cult/runes.dm @@ -73,6 +73,8 @@ Runes can either be invoked by one's self or with many different cultists. Each var/allow_ghosts = TRUE //Allow ghost cultists (from spirit realm rune) to activate this rune. +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/rune) + /obj/effect/rune/Initialize(mapload, set_keyword) . = ..() if(set_keyword) @@ -200,6 +202,8 @@ structure_check() searches for nearby cultist structures required for the invoca invoke_damage = 30 can_be_scribed = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/rune/malformed) + /obj/effect/rune/malformed/Initialize(mapload, set_keyword) . = ..() icon_state = "[rand(1,7)]" @@ -384,6 +388,8 @@ structure_check() searches for nearby cultist structures required for the invoca var/listkey +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/rune/teleport) + /obj/effect/rune/teleport/Initialize(mapload, set_keyword) . = ..() var/area/A = get_area(src) @@ -513,6 +519,8 @@ structure_check() searches for nearby cultist structures required for the invoca no_scribe_boost = TRUE var/used = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/rune/narsie) + /obj/effect/rune/narsie/Initialize(mapload, set_keyword) . = ..() AddElement(/datum/element/point_of_interest) @@ -670,6 +678,8 @@ structure_check() searches for nearby cultist structures required for the invoca var/datum/timedevent/density_timer var/recharging = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/rune/wall) + /obj/effect/rune/wall/Initialize(mapload, set_keyword) . = ..() GLOB.wall_runes += src diff --git a/code/modules/antagonists/heretic/magic/mansus_grasp.dm b/code/modules/antagonists/heretic/magic/mansus_grasp.dm index 0fb467dce66db..8009cd6d2fe81 100644 --- a/code/modules/antagonists/heretic/magic/mansus_grasp.dm +++ b/code/modules/antagonists/heretic/magic/mansus_grasp.dm @@ -16,6 +16,8 @@ catchphrase = "R'CH T'H TR'TH!" on_use_sound = 'sound/items/welder.ogg' +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/melee/touch_attack/mansus_fist) + /obj/item/melee/touch_attack/mansus_fist/Initialize(mapload, obj/effect/proc_holder/spell/targeted/touch/_spell) . = ..() AddComponent(/datum/component/effect_remover, \ diff --git a/code/modules/antagonists/heretic/structures/carving_knife.dm b/code/modules/antagonists/heretic/structures/carving_knife.dm index 5977d7504c73d..91493458ade2a 100644 --- a/code/modules/antagonists/heretic/structures/carving_knife.dm +++ b/code/modules/antagonists/heretic/structures/carving_knife.dm @@ -173,6 +173,8 @@ /// Reference to trap owner mob var/datum/weakref/owner +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/trap/eldritch) + /obj/structure/trap/eldritch/Initialize(mapload, new_owner) . = ..() if(new_owner) diff --git a/code/modules/antagonists/wizard/equipment/artefact.dm b/code/modules/antagonists/wizard/equipment/artefact.dm index b90cc238e660f..b71a40fcb5667 100644 --- a/code/modules/antagonists/wizard/equipment/artefact.dm +++ b/code/modules/antagonists/wizard/equipment/artefact.dm @@ -42,6 +42,8 @@ var/spawn_amt_left = 20 var/spawn_fast = 0 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/rend) + /obj/effect/rend/Initialize(mapload, var/spawn_type, var/spawn_amt, var/desc, var/spawn_fast) . = ..() src.spawn_path = spawn_type diff --git a/code/modules/atmospherics/environmental/LINDA_fire.dm b/code/modules/atmospherics/environmental/LINDA_fire.dm index a3158f5a33ae6..fcc4870e591c7 100644 --- a/code/modules/atmospherics/environmental/LINDA_fire.dm +++ b/code/modules/atmospherics/environmental/LINDA_fire.dm @@ -48,6 +48,8 @@ var/first_cycle = TRUE +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/hotspot) + /obj/effect/hotspot/Initialize(mapload, starting_volume, starting_temperature) . = ..() SSair.hotspots += src diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index f02f560c3ab11..7d445ac6eed0a 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -180,6 +180,8 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/airalarm, 24) var/list/air_vent_info = list() var/list/air_scrub_info = list() +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/airalarm) + /obj/machinery/airalarm/Initialize(mapload, ndir, nbuild) . = ..() wires = new /datum/wires/airalarm(src) diff --git a/code/modules/atmospherics/machinery/other/meter.dm b/code/modules/atmospherics/machinery/other/meter.dm index 24d3e44239728..91c8e8bad1f7e 100644 --- a/code/modules/atmospherics/machinery/other/meter.dm +++ b/code/modules/atmospherics/machinery/other/meter.dm @@ -25,6 +25,8 @@ name = "distribution loop gas flow meter" id_tag = ATMOS_GAS_MONITOR_LOOP_DISTRIBUTION +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/meter) + /obj/machinery/meter/Initialize(mapload, new_piping_layer) if(!isnull(new_piping_layer)) target_layer = new_piping_layer diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index d828301a6a128..d1318ee97f90c 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -257,6 +257,8 @@ if(href_list[VV_HK_MODIFY_CANISTER_GAS]) usr.client.modify_canister_gas(src) +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/portable_atmospherics/canister) + /obj/machinery/portable_atmospherics/canister/Initialize(mapload, datum/gas_mixture/existing_mixture) . = ..() if(existing_mixture) diff --git a/code/modules/bluespace_anchor/bluespace_anchor.dm b/code/modules/bluespace_anchor/bluespace_anchor.dm index eaf308910f6bc..0ab3ceffc12bf 100644 --- a/code/modules/bluespace_anchor/bluespace_anchor.dm +++ b/code/modules/bluespace_anchor/bluespace_anchor.dm @@ -15,6 +15,8 @@ GLOBAL_LIST_EMPTY(active_bluespace_anchors) var/range = 8 var/power_usage_per_teleport = 1500 +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/bluespace_anchor) + /obj/machinery/bluespace_anchor/Initialize(mapload, obj/item/stock_parts/cell/cell) . = ..() //Move the cell diff --git a/code/modules/bluespace_anchor/bluespace_anchor_deployer.dm b/code/modules/bluespace_anchor/bluespace_anchor_deployer.dm index 472606fd3792a..5f7b58b21d807 100644 --- a/code/modules/bluespace_anchor/bluespace_anchor_deployer.dm +++ b/code/modules/bluespace_anchor/bluespace_anchor_deployer.dm @@ -14,6 +14,8 @@ var/obj/item/stock_parts/cell/power_cell +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/bluespace_anchor) + /obj/item/bluespace_anchor/Initialize(mapload, obj/item/stock_parts/cell/cell) . = ..() set_cell(cell) diff --git a/code/modules/cargo/gondolapod.dm b/code/modules/cargo/gondolapod.dm index 64796239d48d3..3d98a10dcc082 100644 --- a/code/modules/cargo/gondolapod.dm +++ b/code/modules/cargo/gondolapod.dm @@ -26,6 +26,8 @@ var/opened = FALSE var/obj/structure/closet/supplypod/centcompod/linked_pod +CREATION_TEST_IGNORE_SUBTYPES(/mob/living/simple_animal/pet/gondola/gondolapod) + /mob/living/simple_animal/pet/gondola/gondolapod/Initialize(mapload, pod) linked_pod = pod name = linked_pod.name diff --git a/code/modules/cargo/supplypod.dm b/code/modules/cargo/supplypod.dm index 26918cf46c969..b8e4db5e0f06f 100644 --- a/code/modules/cargo/supplypod.dm +++ b/code/modules/cargo/supplypod.dm @@ -90,6 +90,8 @@ resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF max_integrity = 20 +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/closet/supplypod) + /obj/structure/closet/supplypod/Initialize(mapload, customStyle = FALSE) . = ..() if (!loc) @@ -550,6 +552,8 @@ CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/pod_landingzone_effect) icon_state = "LZ_Slider" layer = PROJECTILE_HIT_THRESHOLD_LAYER +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/pod_landingzone_effect) + /obj/effect/pod_landingzone_effect/Initialize(mapload, obj/structure/closet/supplypod/pod) . = ..() transform = matrix() * 1.5 @@ -570,6 +574,8 @@ CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/pod_landingzone) var/obj/effect/pod_landingzone_effect/helper var/list/smoke_effects = new /list(13) +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/pod_landingzone) + /obj/effect/pod_landingzone/Initialize(mapload, podParam, single_order = null, clientman) . = ..() if (ispath(podParam)) //We can pass either a path for a pod (as expressconsoles do), or a reference to an instantiated pod (as the centcom_podlauncher does) diff --git a/code/modules/client/preferences/submodules/preference_character_preview.dm b/code/modules/client/preferences/submodules/preference_character_preview.dm index f1eefda6bd6b7..11c0556917d8e 100644 --- a/code/modules/client/preferences/submodules/preference_character_preview.dm +++ b/code/modules/client/preferences/submodules/preference_character_preview.dm @@ -51,6 +51,8 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/map_view/character_preview_view) /// List of clients with this registered to it. var/list/viewing_clients = list() +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/screen/map_view/character_preview_view) + /atom/movable/screen/map_view/character_preview_view/Initialize(mapload, datum/preferences/preferences) . = ..() diff --git a/code/modules/clothing/spacesuits/chronosuit.dm b/code/modules/clothing/spacesuits/chronosuit.dm index a9dbc7b1f9c47..1ae7c244d7020 100644 --- a/code/modules/clothing/spacesuits/chronosuit.dm +++ b/code/modules/clothing/spacesuits/chronosuit.dm @@ -316,6 +316,8 @@ color = list(1,0,0,0, 0,1,0,0.8, 0,0,1,0.933, 0,0,0,0, 0,0,0,0) appearance_flags = KEEP_TOGETHER|TILE_BOUND|PIXEL_SCALE +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/screen/chronos_target) + /atom/movable/screen/chronos_target/Initialize(mapload, mob/living/carbon/human/user) if(user) vis_contents += user diff --git a/code/modules/events/wormholes.dm b/code/modules/events/wormholes.dm index 931b0ad57eaa1..631d64185c887 100644 --- a/code/modules/events/wormholes.dm +++ b/code/modules/events/wormholes.dm @@ -49,6 +49,8 @@ GLOBAL_LIST_EMPTY(all_wormholes) // So we can pick wormholes to teleport to mech_sized = TRUE +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/portal/wormhole) + /obj/effect/portal/wormhole/Initialize(mapload, _creator, _lifespan = 0, obj/effect/portal/_linked, automatic_link = FALSE, turf/hard_target_override, atmos_link_override) . = ..() GLOB.all_wormholes += src diff --git a/code/modules/exploration_crew/discovery_research/discoverable_component.dm b/code/modules/exploration_crew/discovery_research/discoverable_component.dm index 1b9685404b15b..3e1bf3c533204 100644 --- a/code/modules/exploration_crew/discovery_research/discoverable_component.dm +++ b/code/modules/exploration_crew/discovery_research/discoverable_component.dm @@ -6,6 +6,8 @@ var/point_reward = 0 var/datum/callback/get_discover_id +CREATION_TEST_IGNORE_SUBTYPES(/datum/component/discoverable) + /datum/component/discoverable/Initialize(point_reward, unique = FALSE, get_discover_id) if(!isatom(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/modules/fields/timestop.dm b/code/modules/fields/timestop.dm index 7efa781d7818b..30c70c45cbb58 100644 --- a/code/modules/fields/timestop.dm +++ b/code/modules/fields/timestop.dm @@ -18,6 +18,8 @@ var/check_anti_magic = FALSE var/check_holy = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/timestop) + /obj/effect/timestop/Initialize(mapload, radius, time, list/immune_atoms, start = TRUE) //Immune atoms assoc list atom = TRUE . = ..() if(!isnull(time)) diff --git a/code/modules/fields/turf_objects.dm b/code/modules/fields/turf_objects.dm index 99bd1f7d5f711..5edc6300caf77 100644 --- a/code/modules/fields/turf_objects.dm +++ b/code/modules/fields/turf_objects.dm @@ -13,6 +13,8 @@ mouse_opacity = MOUSE_OPACITY_TRANSPARENT var/datum/proximity_monitor/advanced/parent = null +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/abstract/proximity_checker/advanced) + /obj/effect/abstract/proximity_checker/advanced/Initialize(mapload, _monitor) if(_monitor) parent = _monitor diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 2247513e0ea2b..dca2b98123818 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -104,6 +104,8 @@ GLOBAL_LIST_INIT(hallucination_list, list( /obj/effect/hallucination/singularity_act() return +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/hallucination/simple) + /obj/effect/hallucination/simple/Initialize(mapload, var/mob/living/carbon/T) . = ..() target = T @@ -225,6 +227,8 @@ GLOBAL_LIST_INIT(hallucination_list, list( image_icon = 'icons/mob/alien.dmi' image_state = "alienh_pounce" +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/hallucination/simple/xeno) + /obj/effect/hallucination/simple/xeno/Initialize(mapload, mob/living/carbon/T) . = ..() name = "alien hunter ([rand(1, 1000)])" @@ -268,6 +272,8 @@ GLOBAL_LIST_INIT(hallucination_list, list( image_icon = 'icons/mob/animal.dmi' image_state = "clown" +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/hallucination/simple/clown) + /obj/effect/hallucination/simple/clown/Initialize(mapload, mob/living/carbon/T, duration) ..(loc, T) name = pick(GLOB.clown_names) @@ -1070,6 +1076,8 @@ GLOBAL_LIST_INIT(hallucination_list, list( if(image && target.client) target.client.images -= image +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/hallucination/danger) + /obj/effect/hallucination/danger/Initialize(mapload, _target) . = ..() target = _target @@ -1083,6 +1091,8 @@ GLOBAL_LIST_INIT(hallucination_list, list( /obj/effect/hallucination/danger/lava name = "lava" +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/hallucination/danger/lava) + /obj/effect/hallucination/danger/lava/Initialize(mapload, _target) . = ..() var/static/list/loc_connections = list( @@ -1105,6 +1115,8 @@ GLOBAL_LIST_INIT(hallucination_list, list( /obj/effect/hallucination/danger/chasm name = "chasm" +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/hallucination/danger/chasm) + /obj/effect/hallucination/danger/chasm/Initialize(mapload, _target) . = ..() var/static/list/loc_connections = list( diff --git a/code/modules/holoparasite/_holoparasite.dm b/code/modules/holoparasite/_holoparasite.dm index e7b0e0cf7ee13..a832b7dcd8082 100644 --- a/code/modules/holoparasite/_holoparasite.dm +++ b/code/modules/holoparasite/_holoparasite.dm @@ -104,6 +104,8 @@ GLOBAL_LIST_EMPTY_TYPED(holoparasites, /mob/living/simple_animal/hostile/holopar /// The tracking beacon component used for the host to track the holoparasite when scouting. var/datum/component/tracking_beacon/tracking_beacon +CREATION_TEST_IGNORE_SUBTYPES(/mob/living/simple_animal/hostile/holoparasite) + /mob/living/simple_animal/hostile/holoparasite/Initialize(_mapload, _key, _name, datum/holoparasite_theme/_theme, _accent_color, _notes, datum/mind/_summoner, datum/holoparasite_stats/_stats) . = ..() if(!istype(_summoner)) diff --git a/code/modules/holoparasite/abilities/lesser/snares.dm b/code/modules/holoparasite/abilities/lesser/snares.dm index 68c9314de8347..89440a01e981d 100644 --- a/code/modules/holoparasite/abilities/lesser/snares.dm +++ b/code/modules/holoparasite/abilities/lesser/snares.dm @@ -194,6 +194,8 @@ /atom/movable/screen/holoparasite/snare var/datum/holoparasite_ability/lesser/snare/ability +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/screen/holoparasite/snare) + /atom/movable/screen/holoparasite/snare/Initialize(_mapload, mob/living/simple_animal/hostile/holoparasite/_owner, datum/holoparasite_ability/lesser/snare/_ability) . = ..() if(!istype(_ability)) @@ -249,6 +251,8 @@ /// A reference to the holoparasite ability that created this snare. var/datum/holoparasite_ability/lesser/snare/ability +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/snare) + /obj/effect/snare/Initialize(mapload, datum/holoparasite_ability/lesser/snare/_ability) . = ..() if(!istype(_ability)) diff --git a/code/modules/holoparasite/abilities/lesser/telepathy.dm b/code/modules/holoparasite/abilities/lesser/telepathy.dm index 373ef8dbe3d09..ac2c028af7a6f 100644 --- a/code/modules/holoparasite/abilities/lesser/telepathy.dm +++ b/code/modules/holoparasite/abilities/lesser/telepathy.dm @@ -214,6 +214,8 @@ accent_overlay_states = list("telepathy-accent") var/datum/holoparasite_ability/lesser/telepathy/ability +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/screen/holoparasite/telepathy) + /atom/movable/screen/holoparasite/telepathy/Initialize(_mapload, mob/living/simple_animal/hostile/holoparasite/_owner, datum/holoparasite_ability/lesser/telepathy/_ability) . = ..() if(!istype(_ability)) diff --git a/code/modules/holoparasite/abilities/lesser/teleport.dm b/code/modules/holoparasite/abilities/lesser/teleport.dm index 2f9ba9f9af793..e88dc5c15036d 100644 --- a/code/modules/holoparasite/abilities/lesser/teleport.dm +++ b/code/modules/holoparasite/abilities/lesser/teleport.dm @@ -230,6 +230,8 @@ /atom/movable/screen/holoparasite/teleport var/datum/holoparasite_ability/lesser/teleport/ability +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/screen/holoparasite/teleport) + /atom/movable/screen/holoparasite/teleport/Initialize(_mapload, mob/living/simple_animal/hostile/holoparasite/_owner, datum/holoparasite_ability/lesser/teleport/_ability) . = ..() if(!istype(_ability)) @@ -305,6 +307,8 @@ /// The holoparasite ability that created this beacon. var/datum/holoparasite_ability/lesser/teleport/ability +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/receiving_pad) + /obj/structure/receiving_pad/Initialize(mapload, datum/holoparasite_ability/lesser/teleport/_ability) . = ..() if(!istype(_ability)) @@ -332,6 +336,8 @@ alpha = 0 var/turf/destination +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/holopara_bluespace_tear) + /obj/effect/holopara_bluespace_tear/Initialize(mapload, turf/_destination) . = ..() if(istype(_destination)) diff --git a/code/modules/holoparasite/abilities/major/assassin.dm b/code/modules/holoparasite/abilities/major/assassin.dm index e43ba025d8d4f..808e06c1c42bc 100644 --- a/code/modules/holoparasite/abilities/major/assassin.dm +++ b/code/modules/holoparasite/abilities/major/assassin.dm @@ -128,6 +128,8 @@ icon_state = "backstab" var/datum/holoparasite_ability/major/assassin/ability +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/screen/holoparasite/toggle_assassin) + /atom/movable/screen/holoparasite/toggle_assassin/Initialize(_mapload, mob/living/simple_animal/hostile/holoparasite/_owner, datum/holoparasite_ability/major/assassin/_ability) . = ..() if(!istype(_ability)) diff --git a/code/modules/holoparasite/abilities/major/explosive.dm b/code/modules/holoparasite/abilities/major/explosive.dm index 447fdc4ac87a2..c66090cc3c52f 100644 --- a/code/modules/holoparasite/abilities/major/explosive.dm +++ b/code/modules/holoparasite/abilities/major/explosive.dm @@ -304,6 +304,8 @@ /atom/movable/screen/holoparasite/explosive var/datum/holoparasite_ability/major/explosive/ability +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/screen/holoparasite/explosive) + /atom/movable/screen/holoparasite/explosive/Initialize(_mapload, mob/living/simple_animal/hostile/holoparasite/_owner, datum/holoparasite_ability/major/explosive/_ability) . = ..() if(!istype(_ability)) diff --git a/code/modules/holoparasite/abilities/major/scout.dm b/code/modules/holoparasite/abilities/major/scout.dm index f03d2f753c42d..f096419eab180 100644 --- a/code/modules/holoparasite/abilities/major/scout.dm +++ b/code/modules/holoparasite/abilities/major/scout.dm @@ -447,6 +447,8 @@ var/static/exit_icon = "cancel" var/datum/holoparasite_ability/major/scout/ability +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/screen/holoparasite/toggle_scout) + /atom/movable/screen/holoparasite/toggle_scout/Initialize(_mapload, mob/living/simple_animal/hostile/holoparasite/_owner, datum/holoparasite_ability/major/scout/_ability) . = ..() if(!istype(_ability)) diff --git a/code/modules/holoparasite/holoparasite_builder.dm b/code/modules/holoparasite/holoparasite_builder.dm index fe4eb2c998e41..e9a6797e316a3 100644 --- a/code/modules/holoparasite/holoparasite_builder.dm +++ b/code/modules/holoparasite/holoparasite_builder.dm @@ -452,6 +452,8 @@ /// Debug mode will simply yoink the user into the newly created holoparasite when enabled. var/debug_mode = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/holoparasite_creator) + /obj/item/holoparasite_creator/Initialize(mapload, datum/holoparasite_theme/theme_override) . = ..() builder = new(src, theme_override || theme, max_points, max_level, uses, debug_mode) diff --git a/code/modules/holoparasite/holoparasite_helpers.dm b/code/modules/holoparasite/holoparasite_helpers.dm index 36e7d66aeb00e..66354584eec6a 100644 --- a/code/modules/holoparasite/holoparasite_helpers.dm +++ b/code/modules/holoparasite/holoparasite_helpers.dm @@ -2,6 +2,8 @@ /// A typecache of objects that the holoparasite where, if the holoparasite's summoner is inside of one of these objects, the holoparasite will not be allowed to manifest. var/static/list/no_manifest_locs +CREATION_TEST_IGNORE_SUBTYPES(/mob/living/simple_animal/hostile/holoparasite) + /mob/living/simple_animal/hostile/holoparasite/Initialize(_mapload, _key, _name, datum/holoparasite_theme/_theme, _accent_color, _notes, datum/mind/_summoner, datum/holoparasite_stats/_stats) . = ..() if(!no_manifest_locs) diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index bbbc4eaa5206e..4ae15a1479aaf 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -37,6 +37,8 @@ CREATION_TEST_IGNORE_SELF(/obj/item/food/grown) //Amount of discovery points given for scanning var/discovery_points = 0 +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/food/grown) + /obj/item/food/grown/Initialize(mapload, obj/item/seeds/new_seed) if(!tastes) tastes = list("[name]" = 1) //This happens first else the component already inits diff --git a/code/modules/hydroponics/grown/flowers.dm b/code/modules/hydroponics/grown/flowers.dm index 18f58db509e2d..3b89cbc066ff9 100644 --- a/code/modules/hydroponics/grown/flowers.dm +++ b/code/modules/hydroponics/grown/flowers.dm @@ -95,6 +95,8 @@ reagents_add = list(/datum/reagent/consumable/nutriment = 0.05) rarity = 30 +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/seeds/flower/trumpet) + /obj/item/seeds/flower/trumpet/Initialize(mapload,nogenes) . = ..() if(!nogenes) @@ -285,6 +287,8 @@ grind_results = list(/datum/reagent/consumable/capsaicin = 0, /datum/reagent/consumable/condensedcapsaicin = 0) discovery_points = 300 +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/grown/novaflower) + /obj/item/grown/novaflower/Initialize(mapload, obj/item/seeds/new_seed) ..() force = round((5 + seed.potency / 5), 1) diff --git a/code/modules/hydroponics/grown/grass_carpet.dm b/code/modules/hydroponics/grown/grass_carpet.dm index beefc089d50ce..bb46eac8a79b0 100644 --- a/code/modules/hydroponics/grown/grass_carpet.dm +++ b/code/modules/hydroponics/grown/grass_carpet.dm @@ -146,6 +146,8 @@ SEND_SIGNAL(user, COMSIG_CLEAR_MOOD_EVENT, "flower_worn") //clover +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/food/grown/grass/shamrock) + /obj/item/food/grown/grass/shamrock/Initialize(mapload, /obj/item/seeds/new_seed) . = ..() if(prob(0.001)) // 0.001% chance to be a clover diff --git a/code/modules/hydroponics/grown/misc.dm b/code/modules/hydroponics/grown/misc.dm index 6e63746306709..8325f7e12dff4 100644 --- a/code/modules/hydroponics/grown/misc.dm +++ b/code/modules/hydroponics/grown/misc.dm @@ -48,6 +48,8 @@ mutatelist = list() reagents_add = list(/datum/reagent/consumable/nutriment = 0.05, /datum/reagent/medicine/silibinin = 0.1) +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/seeds/galaxythistle) + /obj/item/seeds/galaxythistle/Initialize(mapload,nogenes) . = ..() if(!nogenes) diff --git a/code/modules/hydroponics/grown/mushrooms.dm b/code/modules/hydroponics/grown/mushrooms.dm index f80692b5376a1..a8964617ef06c 100644 --- a/code/modules/hydroponics/grown/mushrooms.dm +++ b/code/modules/hydroponics/grown/mushrooms.dm @@ -211,6 +211,8 @@ growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi' reagents_add = list(/datum/reagent/consumable/nutriment = 0.1) +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/seeds/chanter/jupitercup) + /obj/item/seeds/chanter/jupitercup/Initialize(mapload,nogenes) . = ..() if(!nogenes) diff --git a/code/modules/hydroponics/grown/nettle.dm b/code/modules/hydroponics/grown/nettle.dm index 480f95742a172..065a2ff7c4323 100644 --- a/code/modules/hydroponics/grown/nettle.dm +++ b/code/modules/hydroponics/grown/nettle.dm @@ -81,6 +81,8 @@ /obj/item/food/grown/nettle/basic seed = /obj/item/seeds/nettle +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/food/grown/nettle/basic) + /obj/item/food/grown/nettle/basic/Initialize(mapload, obj/item/seeds/new_seed) . = ..() force = round((5 + seed.potency / 5), 1) @@ -95,6 +97,8 @@ throwforce = 12 discovery_points = 300 +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/food/grown/nettle/death) + /obj/item/food/grown/nettle/death/Initialize(mapload, obj/item/seeds/new_seed) . = ..() force = round((5 + seed.potency / 5), 1) diff --git a/code/modules/hydroponics/growninedible.dm b/code/modules/hydroponics/growninedible.dm index cb29a04c71b58..9c6616cba3871 100644 --- a/code/modules/hydroponics/growninedible.dm +++ b/code/modules/hydroponics/growninedible.dm @@ -10,6 +10,8 @@ var/obj/item/seeds/seed = null // type path, gets converted to item on New(). It's safe to assume it's always a seed item. var/discovery_points = 0 //Amount of discovery points given for scanning +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/grown) + /obj/item/grown/Initialize(mapload, obj/item/seeds/new_seed) . = ..() create_reagents(50) diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index 84e49db00a65e..bdf361f941047 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -39,6 +39,8 @@ var/weed_rate = 1 //If the chance below passes, then this many weeds sprout during growth var/weed_chance = 5 //Percentage chance per tray update to grow weeds +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/seeds) + /obj/item/seeds/Initialize(mapload, nogenes = 0) . = ..() pixel_x = base_pixel_y + rand(-8, 8) diff --git a/code/modules/lighting/emissive_blocker.dm b/code/modules/lighting/emissive_blocker.dm index de2547681d897..df31f5f48116b 100644 --- a/code/modules/lighting/emissive_blocker.dm +++ b/code/modules/lighting/emissive_blocker.dm @@ -16,6 +16,8 @@ //Since only render_target handles transform we don't get any applied transform "stacking" appearance_flags = EMISSIVE_APPEARANCE_FLAGS +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/emissive_blocker) + /atom/movable/emissive_blocker/Initialize(mapload, source) . = ..() verbs.Cut() //Cargo culting from lighting object, this maybe affects memory usage? diff --git a/code/modules/mining/equipment/marker_beacons.dm b/code/modules/mining/equipment/marker_beacons.dm index 48285fc0e749e..00b067520dc78 100644 --- a/code/modules/mining/equipment/marker_beacons.dm +++ b/code/modules/mining/equipment/marker_beacons.dm @@ -82,6 +82,8 @@ GLOBAL_LIST_INIT(marker_beacon_colors, sort_list(list( var/remove_speed = 15 var/picked_color +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/marker_beacon) + /obj/structure/marker_beacon/Initialize(mapload, set_color) . = ..() picked_color = set_color diff --git a/code/modules/mining/equipment/resonator.dm b/code/modules/mining/equipment/resonator.dm index 150ae9fdcab7e..602610f4e6724 100644 --- a/code/modules/mining/equipment/resonator.dm +++ b/code/modules/mining/equipment/resonator.dm @@ -70,6 +70,8 @@ var/creator var/obj/item/resonator/res +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/resonance) + /obj/effect/temp_visual/resonance/Initialize(mapload, set_creator, set_resonator, set_duration) duration = set_duration . = ..() diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index 936e5c2db5ef3..0119f7bfff394 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -490,6 +490,8 @@ var/vanish_description = "vanishes from reality" var/can_destroy = TRUE +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/immortality_talisman) + /obj/effect/immortality_talisman/Initialize(mapload, mob/new_user) . = ..() if(new_user) @@ -556,6 +558,8 @@ STR.max_items = 21 new /obj/item/shared_storage/blue(drop_location(), STR) +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/shared_storage/blue) + /obj/item/shared_storage/blue/Initialize(mapload, datum/component/storage/concrete/master) . = ..() if(!istype(master)) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 090928d713575..7b4f7add40380 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1156,6 +1156,8 @@ /mob/living/carbon/human/species var/race = null +CREATION_TEST_IGNORE_SUBTYPES(/mob/living/carbon/human/species) + /mob/living/carbon/human/species/Initialize(mapload, specific_race) . = ..() set_species(race || specific_race) diff --git a/code/modules/mob/living/carbon/human/species_types/dullahan.dm b/code/modules/mob/living/carbon/human/species_types/dullahan.dm index 5fb33bdc9412d..2179e274a6775 100644 --- a/code/modules/mob/living/carbon/human/species_types/dullahan.dm +++ b/code/modules/mob/living/carbon/human/species_types/dullahan.dm @@ -154,6 +154,8 @@ /obj/item/dullahan_relay var/mob/living/owner +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/dullahan_relay) + /obj/item/dullahan_relay/Initialize(mapload,new_owner) . = ..() owner = new_owner diff --git a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm index 21bcb156c3068..36a91c84bffe0 100644 --- a/code/modules/mob/living/carbon/human/species_types/golems.dm +++ b/code/modules/mob/living/carbon/human/species_types/golems.dm @@ -866,6 +866,8 @@ var/revive_time = 900 var/mob/living/carbon/human/cloth_golem +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/cloth_pile) + /obj/structure/cloth_pile/Initialize(mapload, mob/living/carbon/human/H) . = ..() if(!QDELETED(H) && is_species(H, /datum/species/golem/cloth)) diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 4d5ac25067f0e..3d67252925f1c 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -43,6 +43,8 @@ GLOBAL_LIST_INIT(strippable_monkey_items, create_strippable_list(list( /datum/strippable_item/mob_item_slot/neck ))) +CREATION_TEST_IGNORE_SUBTYPES(/mob/living/carbon/monkey) + /mob/living/carbon/monkey/Initialize(mapload, cubespawned=FALSE, mob/spawner) add_verb(/mob/living/proc/mob_sleep) add_verb(/mob/living/proc/toggle_resting) diff --git a/code/modules/mob/living/inhand_holder.dm b/code/modules/mob/living/inhand_holder.dm index 61a25fa4d2728..5e499032c7da6 100644 --- a/code/modules/mob/living/inhand_holder.dm +++ b/code/modules/mob/living/inhand_holder.dm @@ -12,6 +12,8 @@ ///We are currently releasing the mob held in holder var/releasing = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/clothing/head/mob_holder) + /obj/item/clothing/head/mob_holder/Initialize(mapload, mob/living/M, worn_state, head_icon, lh_icon, rh_icon, worn_slot_flags = NONE) . = ..() if(head_icon) @@ -94,6 +96,8 @@ /obj/item/clothing/head/mob_holder/rabbit +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/clothing/head/mob_holder/rabbit) + /obj/item/clothing/head/mob_holder/rabbit/Initialize(mapload, mob/living/M, worn_state, head_icon, lh_icon, rh_icon, worn_slot_flags = NONE) var/mob/living/simple_animal/chicken/rabbit/normal/rabbit = new(src) return ..(mapload, rabbit, rabbit.held_state, rabbit.head_icon, rabbit.held_lh, rabbit.held_rh, rabbit.worn_slot_flags) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index f8aa16bae1d83..d37e30120972c 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -107,6 +107,8 @@ var/obj/effect/overlay/holo_pad_hologram/ai_hologram var/obj/machinery/holopad/current_holopad +CREATION_TEST_IGNORE_SUBTYPES(/mob/living/silicon/ai) + /mob/living/silicon/ai/Initialize(mapload, datum/ai_laws/L, mob/target_ai) default_access_list = get_all_accesses() . = ..() @@ -1038,6 +1040,8 @@ /mob/living/silicon/ai/resist() return +CREATION_TEST_IGNORE_SUBTYPES(/mob/living/silicon/ai/spawned) + /mob/living/silicon/ai/spawned/Initialize(mapload, datum/ai_laws/L, mob/target_ai) if(!target_ai) target_ai = src //cheat! just give... ourselves as the spawned AI, because that's technically correct diff --git a/code/modules/mob/living/simple_animal/bot/atmosbot.dm b/code/modules/mob/living/simple_animal/bot/atmosbot.dm index 6a42640d86618..e2c0491df2269 100644 --- a/code/modules/mob/living/simple_animal/bot/atmosbot.dm +++ b/code/modules/mob/living/simple_animal/bot/atmosbot.dm @@ -72,6 +72,8 @@ // Last time we spoke var/last_speech +CREATION_TEST_IGNORE_SUBTYPES(/mob/living/simple_animal/bot/atmosbot) + /mob/living/simple_animal/bot/atmosbot/Initialize(mapload, new_toolbox_color) . = ..() var/datum/job/J = SSjob.GetJob(JOB_NAME_STATIONENGINEER) diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index 7ee271a9b8640..b8a0efe6b6f92 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -45,6 +45,8 @@ var/cell_type = /obj/item/stock_parts/cell var/vest_type = /obj/item/clothing/suit/armor/vest +CREATION_TEST_IGNORE_SUBTYPES(/mob/living/simple_animal/bot/ed209) + /mob/living/simple_animal/bot/ed209/Initialize(mapload,created_name,created_lasercolor) . = ..() if(created_name) diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index e4d3c3819dd22..7f172224c1d4b 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -40,6 +40,8 @@ var/toolbox = /obj/item/storage/toolbox/mechanical var/toolbox_color = "" +CREATION_TEST_IGNORE_SUBTYPES(/mob/living/simple_animal/bot/floorbot) + /mob/living/simple_animal/bot/floorbot/Initialize(mapload, new_toolbox_color) . = ..() toolbox_color = new_toolbox_color diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index e6dcf1a097850..0fb0a9ce5ba91 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -113,6 +113,8 @@ GLOBAL_VAR(medibot_unique_id_gen) return name = t +CREATION_TEST_IGNORE_SUBTYPES(/mob/living/simple_animal/bot/medbot) + /mob/living/simple_animal/bot/medbot/Initialize(mapload, new_skin) . = ..() skin = new_skin diff --git a/code/modules/mob/living/simple_animal/heretic_monsters.dm b/code/modules/mob/living/simple_animal/heretic_monsters.dm index 9783a615f10fa..86f2056b70cc2 100644 --- a/code/modules/mob/living/simple_animal/heretic_monsters.dm +++ b/code/modules/mob/living/simple_animal/heretic_monsters.dm @@ -191,6 +191,8 @@ * * spawn_bodyparts - whether we spawn additional armsy bodies until we reach length. * * worm_length - the length of the worm we're creating. Below 3 doesn't work very well. */ +CREATION_TEST_IGNORE_SUBTYPES(/mob/living/simple_animal/hostile/heretic_summon/armsy) + /mob/living/simple_animal/hostile/heretic_summon/armsy/Initialize(mapload, spawn_bodyparts = TRUE, worm_length = 6) . = ..() if(worm_length < 3) @@ -366,6 +368,8 @@ health = 400 melee_damage = 50 +CREATION_TEST_IGNORE_SUBTYPES(/mob/living/simple_animal/hostile/heretic_summon/armsy/prime) + /mob/living/simple_animal/hostile/heretic_summon/armsy/prime/Initialize(mapload, spawn_bodyparts = TRUE, worm_length = 9) . = ..() var/matrix/matrix_transformation = matrix() diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm index c5d467a1e18aa..e01379510971c 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm @@ -251,6 +251,8 @@ Difficulty: Medium icon_state = "miner_death" duration = 15 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/dir_setting/miner_death) + /obj/effect/temp_visual/dir_setting/miner_death/Initialize(mapload, set_dir) . = ..() INVOKE_ASYNC(src, PROC_REF(fade_out)) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index fb555e75d5c83..9498a9c3099e2 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -299,6 +299,8 @@ Difficulty: Very Hard duration = 8 var/target +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/at_shield) + /obj/effect/temp_visual/at_shield/Initialize(mapload, new_target) . = ..() target = new_target diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm index 4b8ad3d0b1e66..d2c818f446ea4 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm @@ -413,6 +413,8 @@ Difficulty: Medium light_range = 2 duration = 13 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/lava_warning) + /obj/effect/temp_visual/lava_warning/Initialize(mapload, var/reset_time = 10) . = ..() INVOKE_ASYNC(src, PROC_REF(fall), reset_time) @@ -481,6 +483,8 @@ Difficulty: Medium duration = 10 randomdir = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/dragon_flight) + /obj/effect/temp_visual/dragon_flight/Initialize(mapload, negative) . = ..() INVOKE_ASYNC(src, PROC_REF(flight), negative) @@ -530,6 +534,8 @@ Difficulty: Medium light_range = 2 duration = 9 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/target) + /obj/effect/temp_visual/target/Initialize(mapload, list/flame_hit) . = ..() INVOKE_ASYNC(src, PROC_REF(fall), flame_hit) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm index 757b359fd578c..f433499acdb4e 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm @@ -484,6 +484,8 @@ Difficulty: Hard layer = BELOW_MOB_LAYER var/mob/living/caster //who made this, anyway +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/hierophant) + /obj/effect/temp_visual/hierophant/Initialize(mapload, new_caster) . = ..() if(new_caster) @@ -495,6 +497,8 @@ Difficulty: Hard light_range = MINIMUM_USEFUL_LIGHT_RANGE randomdir = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/hierophant/squares) + /obj/effect/temp_visual/hierophant/squares/Initialize(mapload, new_caster) . = ..() if(ismineralturf(loc)) @@ -512,6 +516,8 @@ Difficulty: Hard light_range = MINIMUM_USEFUL_LIGHT_RANGE duration = 100 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/hierophant/wall) + /obj/effect/temp_visual/hierophant/wall/Initialize(mapload, new_caster) . = ..() QUEUE_SMOOTH_NEIGHBORS(src) @@ -537,6 +543,8 @@ Difficulty: Hard var/monster_damage_boost = TRUE var/damage = 10 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/hierophant/chaser) + /obj/effect/temp_visual/hierophant/chaser/Initialize(mapload, new_caster, new_target, new_speed, is_friendly_fire) . = ..() target = new_target @@ -618,6 +626,8 @@ Difficulty: Hard var/friendly_fire_check = FALSE var/bursting = FALSE //if we're bursting and need to hit anyone crossing us +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/hierophant/blast) + /obj/effect/temp_visual/hierophant/blast/Initialize(mapload, new_caster, friendly_fire, defuse) . = ..() friendly_fire_check = friendly_fire diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index 4bc042bdb1b11..8961a488312cb 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm @@ -141,6 +141,8 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca gold_core_spawnable = NO_SPAWN var/obj/original_of_this = null +CREATION_TEST_IGNORE_SUBTYPES(/mob/living/simple_animal/hostile/mimic/copy) + /mob/living/simple_animal/hostile/mimic/copy/Initialize(mapload, obj/original, mob/living/creator, destroy_original = 0, no_googlies = FALSE) . = ..() if (no_googlies) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm index 92353fa8a5813..b456e6910d606 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm @@ -345,6 +345,8 @@ While using this makes the system rely on OnFire, it still gives options for tim var/mob/living/carbon/human/activator = null var/mob/living/simple_animal/hostile/asteroid/elite/ourelite = null +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/elite_tumor_wall) + /obj/effect/temp_visual/elite_tumor_wall/Initialize(mapload, new_caster) . = ..() QUEUE_SMOOTH_NEIGHBORS(src) 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 a9f97eabaac23..e7990a99204ef 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 @@ -209,6 +209,8 @@ deltimer(timerid) timerid = addtimer(CALLBACK(src, PROC_REF(retract)), 10, TIMER_STOPPABLE) +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/goliath_tentacle/broodmother/patch) + /obj/effect/temp_visual/goliath_tentacle/broodmother/patch/Initialize(mapload, new_spawner) . = ..() var/tentacle_locs = spiral_range_turfs(1, get_turf(src)) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm index 5beb5f20f0683..9986f606e86e2 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm @@ -156,6 +156,8 @@ layer = BELOW_MOB_LAYER var/mob/living/spawner +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/goliath_tentacle) + /obj/effect/temp_visual/goliath_tentacle/Initialize(mapload, mob/living/new_spawner) . = ..() for(var/obj/effect/temp_visual/goliath_tentacle/T in loc) @@ -169,6 +171,8 @@ deltimer(timerid) timerid = addtimer(CALLBACK(src, PROC_REF(tripanim)), 7, TIMER_STOPPABLE) +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/goliath_tentacle/original) + /obj/effect/temp_visual/goliath_tentacle/original/Initialize(mapload, new_spawner) . = ..() var/list/directions = GLOB.cardinals.Copy() diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index 4e14b6fcf58ca..2b6f7b538ccc5 100644 --- a/code/modules/mob/living/simple_animal/hostile/statue.dm +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -57,6 +57,8 @@ // No movement while seen code. +CREATION_TEST_IGNORE_SUBTYPES(/mob/living/simple_animal/hostile/statue) + /mob/living/simple_animal/hostile/statue/Initialize(mapload, var/mob/living/creator) . = ..() // Give spells diff --git a/code/modules/mob/living/simple_animal/hostile/stickman.dm b/code/modules/mob/living/simple_animal/hostile/stickman.dm index 686d1ee4e089c..c90c48e7b6bd2 100644 --- a/code/modules/mob/living/simple_animal/hostile/stickman.dm +++ b/code/modules/mob/living/simple_animal/hostile/stickman.dm @@ -48,6 +48,8 @@ icon_dead = "stickdog_dead" mob_biotypes = list(MOB_INORGANIC, MOB_BEAST) +CREATION_TEST_IGNORE_SUBTYPES(/mob/living/simple_animal/hostile/stickman) + /mob/living/simple_animal/hostile/stickman/Initialize(mapload, var/wizard_summoned) . = ..() new /obj/effect/temp_visual/paper_scatter(src) diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index 810fced2d03be..ac1d6abcc3476 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -96,6 +96,8 @@ var/transformeffects = SLIME_EFFECT_DEFAULT var/mob/master +CREATION_TEST_IGNORE_SUBTYPES(/mob/living/simple_animal/slime) + /mob/living/simple_animal/slime/Initialize(mapload, new_colour="grey", new_is_adult=FALSE) GLOB.total_slimes++ var/datum/action/innate/slime/feed/F = new @@ -520,6 +522,8 @@ /mob/living/simple_animal/slime/can_be_implanted() return TRUE +CREATION_TEST_IGNORE_SUBTYPES(/mob/living/simple_animal/slime/random) + /mob/living/simple_animal/slime/random/Initialize(mapload, new_colour, new_is_adult) . = ..(mapload, pick(slime_colours), prob(50)) @@ -548,6 +552,8 @@ Friends[user] += SLIME_FRIENDSHIP_ATTACK * 2 master = user +CREATION_TEST_IGNORE_SUBTYPES(/mob/living/simple_animal/slime/rainbow) + /mob/living/simple_animal/slime/rainbow/Initialize(mapload, new_colour="rainbow", new_is_adult) . = ..(mapload, new_colour, new_is_adult) diff --git a/code/modules/modular_computers/hardware/battery_module.dm b/code/modules/modular_computers/hardware/battery_module.dm index 149a8a81ea1cc..feac0407bc148 100644 --- a/code/modules/modular_computers/hardware/battery_module.dm +++ b/code/modules/modular_computers/hardware/battery_module.dm @@ -10,6 +10,8 @@ /obj/item/computer_hardware/battery/get_cell() return battery +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/computer_hardware/battery) + /obj/item/computer_hardware/battery/Initialize(mapload, battery_type) . = ..() if(battery_type) diff --git a/code/modules/multiz/zmimic/mimic_movable.dm b/code/modules/multiz/zmimic/mimic_movable.dm index 2710bbc6460eb..ba4f7965fb764 100644 --- a/code/modules/multiz/zmimic/mimic_movable.dm +++ b/code/modules/multiz/zmimic/mimic_movable.dm @@ -231,6 +231,8 @@ mouse_opacity = MOUSE_OPACITY_TRANSPARENT var/turf/delegate +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/openspace/turf_mimic) + /atom/movable/openspace/turf_mimic/Initialize(mapload, ...) . = ..() ASSERT(isturf(loc)) diff --git a/code/modules/paperwork/contract.dm b/code/modules/paperwork/contract.dm index c480793174021..d3e78a97ce3a5 100644 --- a/code/modules/paperwork/contract.dm +++ b/code/modules/paperwork/contract.dm @@ -91,6 +91,8 @@ name = "paper- infernal contract" contractType = CONTRACT_UNWILLING +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/paper/contract/infernal) + /obj/item/paper/contract/infernal/Initialize(mapload, mob/living/nTarget, datum/mind/nOwner) . = ..() if(!istype(nOwner)) diff --git a/code/modules/paperwork/origami.dm b/code/modules/paperwork/origami.dm index e48aa3d3afd42..28c4960499164 100644 --- a/code/modules/paperwork/origami.dm +++ b/code/modules/paperwork/origami.dm @@ -11,6 +11,8 @@ max_integrity = 50 var/obj/item/paper/internalPaper +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/origami) + /obj/item/origami/Initialize(mapload, obj/item/paper/newPaper) . = ..() pixel_y = base_pixel_y + rand(-8, 8) diff --git a/code/modules/particles/byond_particles/emitter/smoke.dm b/code/modules/particles/byond_particles/emitter/smoke.dm index 7f3c5afc7562b..55c33627ad484 100644 --- a/code/modules/particles/byond_particles/emitter/smoke.dm +++ b/code/modules/particles/byond_particles/emitter/smoke.dm @@ -11,6 +11,8 @@ particles = new/particles/smoke layer = OBJ_LAYER +CREATION_TEST_IGNORE_SUBTYPES(/obj/emitter/flare_smoke) + /obj/emitter/flare_smoke/Initialize(mapload, time, _color) . = ..() add_filter("blur", 1, list(type="blur", size=1.5)) diff --git a/code/modules/photography/photos/frame.dm b/code/modules/photography/photos/frame.dm index 0be0b0ffea9e6..f278c7c8dc92c 100644 --- a/code/modules/photography/photos/frame.dm +++ b/code/modules/photography/photos/frame.dm @@ -78,6 +78,8 @@ #undef FRAME_DEFINE +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/sign/picture_frame) + /obj/structure/sign/picture_frame/Initialize(mapload, dir, building) . = ..() AddElement(/datum/element/art, OK_ART) diff --git a/code/modules/photography/photos/photo.dm b/code/modules/photography/photos/photo.dm index e8aaf0ad13594..3f60c4521e5b6 100644 --- a/code/modules/photography/photos/photo.dm +++ b/code/modules/photography/photos/photo.dm @@ -13,6 +13,8 @@ var/datum/picture/picture var/scribble //Scribble on the back. +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/photo) + /obj/item/photo/Initialize(mapload, datum/picture/P, datum_name = TRUE, datum_desc = TRUE) set_picture(P, datum_name, datum_desc, TRUE) return ..() diff --git a/code/modules/plumbing/ducts.dm b/code/modules/plumbing/ducts.dm index 20d192f5abf41..3dbb06dd7f7b2 100644 --- a/code/modules/plumbing/ducts.dm +++ b/code/modules/plumbing/ducts.dm @@ -35,6 +35,8 @@ All the important duct code: ///wheter we just unanchored or drop whatever is in the variable. either is safe var/drop_on_wrench = /obj/item/stack/ducts +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/duct) + /obj/machinery/duct/Initialize(mapload, no_anchor, color_of_duct = "#ffffff", layer_of_duct = DUCT_LAYER_DEFAULT, force_connects) . = ..() @@ -353,6 +355,8 @@ All the important duct code: active = FALSE anchored = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/duct/multilayered) + /obj/machinery/duct/multilayered/Initialize(mapload, no_anchor, color_of_duct, layer_of_duct = DUCT_LAYER_DEFAULT, force_connects) . = ..() update_connects() diff --git a/code/modules/plumbing/plumbers/_plumb_machinery.dm b/code/modules/plumbing/plumbers/_plumb_machinery.dm index 8e65d0b0712d1..aa6a607e35bce 100644 --- a/code/modules/plumbing/plumbers/_plumb_machinery.dm +++ b/code/modules/plumbing/plumbers/_plumb_machinery.dm @@ -22,6 +22,8 @@ ///delay of constructing it throught the plumbing rcd var/rcd_delay = 10 +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/plumbing) + /obj/machinery/plumbing/Initialize(mapload, bolt = TRUE) . = ..() anchored = bolt @@ -71,6 +73,8 @@ rcd_cost = 5 rcd_delay = 5 +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/plumbing/input) + /obj/machinery/plumbing/input/Initialize(mapload, bolt) . = ..() AddComponent(/datum/component/plumbing/simple_supply, bolt) @@ -85,6 +89,8 @@ rcd_cost = 5 rcd_delay = 5 +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/plumbing/output) + /obj/machinery/plumbing/output/Initialize(mapload, bolt) . = ..() AddComponent(/datum/component/plumbing/simple_demand, bolt) @@ -98,6 +104,8 @@ rcd_cost = 25 rcd_delay = 20 +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/plumbing/tank) + /obj/machinery/plumbing/tank/Initialize(mapload, bolt) . = ..() AddComponent(/datum/component/plumbing/tank, bolt) diff --git a/code/modules/plumbing/plumbers/acclimator.dm b/code/modules/plumbing/plumbers/acclimator.dm index 9eae3d4a48e16..ccc476cce41b8 100644 --- a/code/modules/plumbing/plumbers/acclimator.dm +++ b/code/modules/plumbing/plumbers/acclimator.dm @@ -29,6 +29,8 @@ +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/plumbing/acclimator) + /obj/machinery/plumbing/acclimator/Initialize(mapload, bolt) . = ..() AddComponent(/datum/component/plumbing/acclimator, bolt) diff --git a/code/modules/plumbing/plumbers/bottle_dispenser.dm b/code/modules/plumbing/plumbers/bottle_dispenser.dm index 0fbd93a536994..eb2527b28f5f6 100644 --- a/code/modules/plumbing/plumbers/bottle_dispenser.dm +++ b/code/modules/plumbing/plumbers/bottle_dispenser.dm @@ -8,6 +8,8 @@ . = ..() . += "Use an open container on it to fill it up!" +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/plumbing/bottle_dispenser) + /obj/machinery/plumbing/bottle_dispenser/Initialize(mapload, bolt) . = ..() AddComponent(/datum/component/plumbing/simple_demand, bolt) diff --git a/code/modules/plumbing/plumbers/destroyer.dm b/code/modules/plumbing/plumbers/destroyer.dm index 470acfd245bb6..30fb7ee1dc5fb 100644 --- a/code/modules/plumbing/plumbers/destroyer.dm +++ b/code/modules/plumbing/plumbers/destroyer.dm @@ -6,6 +6,8 @@ ///we remove 5 reagents per second var/disposal_rate = 5 +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/plumbing/disposer) + /obj/machinery/plumbing/disposer/Initialize(mapload, bolt) . = ..() AddComponent(/datum/component/plumbing/simple_demand, bolt) diff --git a/code/modules/plumbing/plumbers/filter.dm b/code/modules/plumbing/plumbers/filter.dm index 8c2249a1d10cb..64b7bb5531729 100644 --- a/code/modules/plumbing/plumbers/filter.dm +++ b/code/modules/plumbing/plumbers/filter.dm @@ -16,6 +16,8 @@ +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/plumbing/filter) + /obj/machinery/plumbing/filter/Initialize(mapload, bolt) . = ..() AddComponent(/datum/component/plumbing/filter, bolt) diff --git a/code/modules/plumbing/plumbers/grinder_chemical.dm b/code/modules/plumbing/plumbers/grinder_chemical.dm index 65ea9570a19b0..ef6bb7eb249a1 100644 --- a/code/modules/plumbing/plumbers/grinder_chemical.dm +++ b/code/modules/plumbing/plumbers/grinder_chemical.dm @@ -10,6 +10,8 @@ active_power_usage = 80 var/eat_dir = SOUTH +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/plumbing/grinder_chemical) + /obj/machinery/plumbing/grinder_chemical/Initialize(mapload, bolt) . = ..() AddComponent(/datum/component/plumbing/simple_supply, bolt) diff --git a/code/modules/plumbing/plumbers/reaction_chamber.dm b/code/modules/plumbing/plumbers/reaction_chamber.dm index 068787ca999c2..09fda4562f477 100644 --- a/code/modules/plumbing/plumbers/reaction_chamber.dm +++ b/code/modules/plumbing/plumbers/reaction_chamber.dm @@ -15,6 +15,8 @@ ///our reagent goal has been reached, so now we lock our inputs and start emptying var/emptying = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/plumbing/reaction_chamber) + /obj/machinery/plumbing/reaction_chamber/Initialize(mapload, bolt) . = ..() AddComponent(/datum/component/plumbing/reaction_chamber, bolt) diff --git a/code/modules/plumbing/plumbers/splitters.dm b/code/modules/plumbing/plumbers/splitters.dm index 0c098a3e14920..b7bbe2d340c64 100644 --- a/code/modules/plumbing/plumbers/splitters.dm +++ b/code/modules/plumbing/plumbers/splitters.dm @@ -18,6 +18,8 @@ +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/plumbing/splitter) + /obj/machinery/plumbing/splitter/Initialize(mapload, bolt) . = ..() AddComponent(/datum/component/plumbing/splitter, bolt) diff --git a/code/modules/plumbing/plumbers/synthesizer.dm b/code/modules/plumbing/plumbers/synthesizer.dm index 045eccf507d95..c0337c487235b 100644 --- a/code/modules/plumbing/plumbers/synthesizer.dm +++ b/code/modules/plumbing/plumbers/synthesizer.dm @@ -52,6 +52,8 @@ +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/plumbing/synthesizer) + /obj/machinery/plumbing/synthesizer/Initialize(mapload, bolt) . = ..() AddComponent(/datum/component/plumbing/simple_supply, bolt) diff --git a/code/modules/point/point.dm b/code/modules/point/point.dm index 653241b3085b3..2133d5b7d2da9 100644 --- a/code/modules/point/point.dm +++ b/code/modules/point/point.dm @@ -93,6 +93,8 @@ plane = POINT_PLANE duration = POINT_TIME +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/point) + /obj/effect/temp_visual/point/Initialize(mapload, set_invis = 0) . = ..() var/atom/old_loc = loc diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 2ae1f7bdf31b0..0f6aed1dec8bc 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -84,6 +84,8 @@ By design, d1 is the smallest direction and d2 is the highest color = "#ffffff" // the power cable object +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/cable) + /obj/structure/cable/Initialize(mapload, param_color) . = ..() @@ -522,6 +524,8 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai /obj/item/stack/cable_coil/get_recipes() return GLOB.cable_coil_recipes +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/stack/cable_coil) + /obj/item/stack/cable_coil/Initialize(mapload, new_amount = null, param_color = null) . = ..() diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 06d87c838a6e4..13a1f4bd3dee4 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -33,6 +33,8 @@ /obj/item/stock_parts/cell/get_cell() return src +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/stock_parts/cell) + /obj/item/stock_parts/cell/Initialize(mapload, override_maxcharge) . = ..() START_PROCESSING(SSobj, src) diff --git a/code/modules/power/lighting/light_construct.dm b/code/modules/power/lighting/light_construct.dm index 47584ee0d1fe6..59770df16f9a5 100644 --- a/code/modules/power/lighting/light_construct.dm +++ b/code/modules/power/lighting/light_construct.dm @@ -16,6 +16,8 @@ var/cell_connectors = TRUE +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/light_construct) + /obj/structure/light_construct/Initialize(mapload, ndir, building) . = ..() if(building) diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index e7d57f1962e6a..7d6b4d6f40d81 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -32,6 +32,8 @@ resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF obj_flags = CAN_BE_HIT | DANGEROUS_POSSESSION +CREATION_TEST_IGNORE_SUBTYPES(/obj/anomaly/singularity) + /obj/anomaly/singularity/Initialize(mapload, starting_energy = 50) . = ..() START_PROCESSING(SSsinguloprocess, src) @@ -418,6 +420,8 @@ /obj/anomaly/singularity/deadchat_controlled move_self = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/obj/anomaly/singularity/deadchat_controlled) + /obj/anomaly/singularity/deadchat_controlled/Initialize(mapload, starting_energy) . = ..() AddComponent(/datum/component/deadchat_control, DEMOCRACY_MODE, list( diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 14d1bc6776851..7a7705f6b9c92 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -23,6 +23,8 @@ var/turn_angle = 0 var/obj/machinery/power/solar_control/control = null +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/power/solar) + /obj/machinery/power/solar/Initialize(mapload, obj/item/solar_assembly/S) . = ..() Make(S) diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index f1a2d9f89c515..b3a2a1ea4458b 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -28,6 +28,8 @@ var/energy_to_raise = 32 var/energy_to_lower = -20 +CREATION_TEST_IGNORE_SUBTYPES(/obj/anomaly/energy_ball) + /obj/anomaly/energy_ball/Initialize(mapload, starting_energy = 50, is_miniball = FALSE) . = ..() energy = starting_energy diff --git a/code/modules/power/tracker.dm b/code/modules/power/tracker.dm index 64083fee19774..79f18024c8052 100644 --- a/code/modules/power/tracker.dm +++ b/code/modules/power/tracker.dm @@ -17,6 +17,8 @@ var/sun_angle = 0 // sun angle as set by sun datum var/obj/machinery/power/solar_control/control = null +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/power/tracker) + /obj/machinery/power/tracker/Initialize(mapload, obj/item/solar_assembly/S) . = ..() Make(S) diff --git a/code/modules/projectiles/ammunition/energy/portal.dm b/code/modules/projectiles/ammunition/energy/portal.dm index 4928786136589..f2ac21e445d38 100644 --- a/code/modules/projectiles/ammunition/energy/portal.dm +++ b/code/modules/projectiles/ammunition/energy/portal.dm @@ -11,6 +11,8 @@ projectile_type = /obj/projectile/beam/wormhole/orange select_name = "orange" +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/ammo_casing/energy/wormhole) + /obj/item/ammo_casing/energy/wormhole/Initialize(mapload, obj/item/gun/energy/wormhole_projector/wh) . = ..() gun = WEAKREF(wh) diff --git a/code/modules/projectiles/guns/misc/blastcannon.dm b/code/modules/projectiles/guns/misc/blastcannon.dm index 820fa67248cf7..741be266bf6bb 100644 --- a/code/modules/projectiles/guns/misc/blastcannon.dm +++ b/code/modules/projectiles/guns/misc/blastcannon.dm @@ -122,6 +122,8 @@ var/hugbox = TRUE range = 150 +CREATION_TEST_IGNORE_SUBTYPES(/obj/projectile/blastwave) + /obj/projectile/blastwave/Initialize(mapload, _h, _m, _l) heavyr = _h mediumr = _m diff --git a/code/modules/projectiles/projectile/special/wormhole.dm b/code/modules/projectiles/projectile/special/wormhole.dm index 1c2ec6906e41c..4f78a0bcbe263 100644 --- a/code/modules/projectiles/projectile/special/wormhole.dm +++ b/code/modules/projectiles/projectile/special/wormhole.dm @@ -18,6 +18,8 @@ name = "orange bluespace beam" color = "#FF6600" +CREATION_TEST_IGNORE_SUBTYPES(/obj/projectile/beam/wormhole) + /obj/projectile/beam/wormhole/Initialize(mapload, obj/item/ammo_casing/energy/wormhole/casing) . = ..() if(casing) diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index b87527b7b4986..97516887556a5 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -31,6 +31,8 @@ ///Does this container prevent grinding? var/prevent_grinding = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/reagent_containers) + /obj/item/reagent_containers/Initialize(mapload, vol) . = ..() if(isnum_safe(vol) && vol > 0) diff --git a/code/modules/reagents/reagent_containers/chem_heirloom.dm b/code/modules/reagents/reagent_containers/chem_heirloom.dm index c930cf8f0a5c8..3cb62b423d421 100644 --- a/code/modules/reagents/reagent_containers/chem_heirloom.dm +++ b/code/modules/reagents/reagent_containers/chem_heirloom.dm @@ -12,6 +12,8 @@ var/datum/reagent/rand_cont //Reagent of choice var/datum/callback/roundend_callback +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/reagent_containers/glass/chem_heirloom) + /obj/item/reagent_containers/glass/chem_heirloom/Initialize(mapload, vol) ..() volume = 0 diff --git a/code/modules/recycling/conveyor.dm b/code/modules/recycling/conveyor.dm index b9bcac6cc8fe0..f48c9109b5dca 100644 --- a/code/modules/recycling/conveyor.dm +++ b/code/modules/recycling/conveyor.dm @@ -36,6 +36,8 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) // Auto conveyour is always on unless unpowered +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/conveyor/auto) + /obj/machinery/conveyor/auto/Initialize(mapload, newdir) . = ..() set_operating(TRUE) @@ -48,6 +50,8 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) set_operating(TRUE) // create a conveyor +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/conveyor) + /obj/machinery/conveyor/Initialize(mapload, newdir, newid) . = ..() if(newdir) @@ -174,7 +178,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) if(machine_stat & NOPOWER) set_operating(FALSE) return FALSE - + if(!operating) //If we're on, start conveying so moveloops on our tile can be refreshed if they stopped for some reason return for(var/atom/movable/movable in get_turf(src)) @@ -316,6 +320,8 @@ DEFINE_BUFFER_HANDLER(/obj/machinery/conveyor) var/id = "" // must match conveyor IDs to control them +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/conveyor_switch) + /obj/machinery/conveyor_switch/Initialize(mapload, newid) . = ..() if (newid) @@ -482,6 +488,8 @@ DEFINE_BUFFER_HANDLER(/obj/machinery/conveyor_switch) var/id = "" +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/stack/conveyor) + /obj/item/stack/conveyor/Initialize(mapload, new_amount, merge = TRUE, mob/user = null, _id) . = ..() id = _id diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm index 9096d84b85e79..a8d1667bdd568 100644 --- a/code/modules/recycling/disposal/bin.dm +++ b/code/modules/recycling/disposal/bin.dm @@ -26,6 +26,8 @@ // create a new disposal // find the attached trunk (if present) and init gas resvr. +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/disposal) + /obj/machinery/disposal/Initialize(mapload, obj/structure/disposalconstruct/make_from) . = ..() @@ -430,6 +432,8 @@ return ..() +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/disposal/deliveryChute) + /obj/machinery/disposal/deliveryChute/Initialize(mapload, obj/structure/disposalconstruct/make_from) . = ..() trunk = locate() in loc diff --git a/code/modules/recycling/disposal/construction.dm b/code/modules/recycling/disposal/construction.dm index 8ddcdd5b70b85..106eff2762c6d 100644 --- a/code/modules/recycling/disposal/construction.dm +++ b/code/modules/recycling/disposal/construction.dm @@ -19,6 +19,8 @@ return density = anchorvalue ? initial(pipe_type.density) : FALSE +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/disposalconstruct) + /obj/structure/disposalconstruct/Initialize(mapload, _pipe_type, _dir = SOUTH, flip = FALSE, obj/make_from) . = ..() if(make_from) diff --git a/code/modules/recycling/disposal/outlet.dm b/code/modules/recycling/disposal/outlet.dm index 7cff1fcfd4fa4..64e511cd6e037 100644 --- a/code/modules/recycling/disposal/outlet.dm +++ b/code/modules/recycling/disposal/outlet.dm @@ -13,6 +13,8 @@ var/start_eject = 0 var/eject_range = 2 +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/disposaloutlet) + /obj/structure/disposaloutlet/Initialize(mapload, obj/structure/disposalconstruct/make_from) . = ..() diff --git a/code/modules/recycling/disposal/pipe.dm b/code/modules/recycling/disposal/pipe.dm index 79c16ade1c3c1..95cf2c7a724d8 100644 --- a/code/modules/recycling/disposal/pipe.dm +++ b/code/modules/recycling/disposal/pipe.dm @@ -17,6 +17,8 @@ var/flip_type // If set, the pipe is flippable and becomes this type when flipped +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/disposalpipe) + /obj/structure/disposalpipe/Initialize(mapload, obj/structure/disposalconstruct/make_from) . = ..() diff --git a/code/modules/research/xenobiology/crossbreeding/_clothing.dm b/code/modules/research/xenobiology/crossbreeding/_clothing.dm index 80754b4603e4a..56f572ee823d8 100644 --- a/code/modules/research/xenobiology/crossbreeding/_clothing.dm +++ b/code/modules/research/xenobiology/crossbreeding/_clothing.dm @@ -54,6 +54,8 @@ Slimecrossing Armor anchored = TRUE max_integrity = 10 +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/light_prism) + /obj/structure/light_prism/Initialize(mapload, var/newcolor) . = ..() color = newcolor diff --git a/code/modules/research/xenobiology/crossbreeding/_structures.dm b/code/modules/research/xenobiology/crossbreeding/_structures.dm index 831797876a3d6..b2b7bc19e052a 100644 --- a/code/modules/research/xenobiology/crossbreeding/_structures.dm +++ b/code/modules/research/xenobiology/crossbreeding/_structures.dm @@ -352,6 +352,8 @@ GLOBAL_LIST_EMPTY(bluespace_slime_crystals) var/max_stage = 5 var/datum/weakref/pylon +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/cerulean_slime_crystal) + /obj/structure/cerulean_slime_crystal/Initialize(mapload, obj/structure/slime_crystal/cerulean/master_pylon) . = ..() if(istype(master_pylon)) diff --git a/code/modules/security/genpop.dm b/code/modules/security/genpop.dm index c0833b6db92ab..7c809e3c61ea0 100644 --- a/code/modules/security/genpop.dm +++ b/code/modules/security/genpop.dm @@ -370,6 +370,8 @@ icon_state = "power_mod" desc = "Central processing unit for the prisoner interface." +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/genpop_interface) + /obj/machinery/genpop_interface/Initialize(mapload, nbuild) . = ..() update_icon() @@ -696,6 +698,8 @@ GLOBAL_LIST_EMPTY(prisoner_ids) var/crime = null //What you in for mate? var/atom/assigned_locker = null //Where's our stuff then guv? +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/card/id/prisoner) + /obj/item/card/id/prisoner/Initialize(mapload, _sentence, _crime, _name) . = ..() GLOB.prisoner_ids += src diff --git a/code/modules/shuttle/bluespace_shuttle_pod/pod_computer.dm b/code/modules/shuttle/bluespace_shuttle_pod/pod_computer.dm index 4b44692211efe..33e560f6bb4b5 100644 --- a/code/modules/shuttle/bluespace_shuttle_pod/pod_computer.dm +++ b/code/modules/shuttle/bluespace_shuttle_pod/pod_computer.dm @@ -3,6 +3,8 @@ circuit = /obj/item/circuitboard/computer/shuttle/flight_control var/shuttle_named = FALSE +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/computer/shuttle_flight/custom_shuttle/bluespace_pod) + /obj/machinery/computer/shuttle_flight/custom_shuttle/bluespace_pod/Initialize(mapload, obj/item/circuitboard/C) . = ..() var/static/pod_shuttles = 0 diff --git a/code/modules/shuttle/ripple.dm b/code/modules/shuttle/ripple.dm index 824c1843bac71..4271493064edc 100644 --- a/code/modules/shuttle/ripple.dm +++ b/code/modules/shuttle/ripple.dm @@ -11,6 +11,8 @@ mouse_opacity = MOUSE_OPACITY_ICON alpha = 0 +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/abstract/ripple) + /obj/effect/abstract/ripple/Initialize(mapload, time_left) . = ..() animate(src, alpha=255, time=time_left) diff --git a/code/modules/shuttle/special.dm b/code/modules/shuttle/special.dm index 9b29511e19db7..a800ab7839c50 100644 --- a/code/modules/shuttle/special.dm +++ b/code/modules/shuttle/special.dm @@ -184,6 +184,8 @@ max_integrity = 1000 var/boot_dir = 1 +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/table/wood/bar) + /obj/structure/table/wood/bar/Initialize(mapload, _buildstack) . = ..() var/static/list/loc_connections = list( diff --git a/code/modules/shuttle/super_cruise/orbital_poi_generator/loot/alien_artifact.dm b/code/modules/shuttle/super_cruise/orbital_poi_generator/loot/alien_artifact.dm index 9a43f7fdfc721..bbd87d275020d 100644 --- a/code/modules/shuttle/super_cruise/orbital_poi_generator/loot/alien_artifact.dm +++ b/code/modules/shuttle/super_cruise/orbital_poi_generator/loot/alien_artifact.dm @@ -154,6 +154,8 @@ var/datum/proximity_monitor/monitor var/datum/callback/callback +CREATION_TEST_IGNORE_SUBTYPES(/atom/movable/proximity_monitor_holder) + /atom/movable/proximity_monitor_holder/Initialize(mapload, datum/proximity_monitor/_monitor, datum/callback/_callback) monitor = _monitor callback = _callback diff --git a/code/modules/shuttle/super_cruise/orbital_poi_generator/loot/artifact_defenses.dm b/code/modules/shuttle/super_cruise/orbital_poi_generator/loot/artifact_defenses.dm index 29ae9086f5f28..3a566db4119ce 100644 --- a/code/modules/shuttle/super_cruise/orbital_poi_generator/loot/artifact_defenses.dm +++ b/code/modules/shuttle/super_cruise/orbital_poi_generator/loot/artifact_defenses.dm @@ -115,6 +115,8 @@ /obj/effect/temp_visual/hierophant/blast/defenders/emp duration = 1 SECONDS +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/hierophant/blast/defenders/emp) + /obj/effect/temp_visual/hierophant/blast/defenders/emp/Initialize(mapload, new_caster, friendly_fire) . = ..() addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(empulse), src.loc, 1, 2), 1 SECONDS) diff --git a/code/modules/shuttle/super_cruise/orbital_poi_generator/objective_computer.dm b/code/modules/shuttle/super_cruise/orbital_poi_generator/objective_computer.dm index b26b920412ad2..1746797d8149b 100644 --- a/code/modules/shuttle/super_cruise/orbital_poi_generator/objective_computer.dm +++ b/code/modules/shuttle/super_cruise/orbital_poi_generator/objective_computer.dm @@ -10,6 +10,8 @@ GLOBAL_LIST_EMPTY(objective_computers) circuit = /obj/item/circuitboard/computer/objective var/list/viewing_mobs = list() +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/computer/objective) + /obj/machinery/computer/objective/Initialize(mapload, obj/item/circuitboard/C) . = ..() GLOB.objective_computers += src diff --git a/code/modules/shuttle/super_cruise/shuttle_components/shuttle_console.dm b/code/modules/shuttle/super_cruise/shuttle_components/shuttle_console.dm index 0516a799feb7e..a5ebce4303b02 100644 --- a/code/modules/shuttle/super_cruise/shuttle_components/shuttle_console.dm +++ b/code/modules/shuttle/super_cruise/shuttle_components/shuttle_console.dm @@ -34,6 +34,8 @@ GLOBAL_VAR_INIT(shuttle_docking_jammed, FALSE) //Our orbital body. var/datum/orbital_object/shuttle/shuttleObject +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/computer/shuttle_flight) + /obj/machinery/computer/shuttle_flight/Initialize(mapload, obj/item/circuitboard/C) . = ..() valid_docks = params2list(possible_destinations) diff --git a/code/modules/shuttle/super_cruise/shuttle_components/shuttle_docking.dm b/code/modules/shuttle/super_cruise/shuttle_components/shuttle_docking.dm index 7e96bfc7634b8..a48af3f394b16 100644 --- a/code/modules/shuttle/super_cruise/shuttle_components/shuttle_docking.dm +++ b/code/modules/shuttle/super_cruise/shuttle_components/shuttle_docking.dm @@ -32,6 +32,8 @@ ///Camera action button to move down a Z level var/datum/action/innate/camera_multiz_down/move_down_action = new +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/computer/shuttle_flight) + /obj/machinery/computer/shuttle_flight/Initialize(mapload, obj/item/circuitboard/C) . = ..() GLOB.navigation_computers += src @@ -362,6 +364,8 @@ var/list/placement_images = list() var/list/placed_images = list() +CREATION_TEST_IGNORE_SUBTYPES(/mob/camera/ai_eye/remote/shuttle_docker) + /mob/camera/ai_eye/remote/shuttle_docker/Initialize(mapload, obj/machinery/computer/camera_advanced/origin) src.origin = origin return ..() diff --git a/code/modules/spells/spell_types/forcewall.dm b/code/modules/spells/spell_types/forcewall.dm index aab1f8961772a..2ac9260ea4f86 100644 --- a/code/modules/spells/spell_types/forcewall.dm +++ b/code/modules/spells/spell_types/forcewall.dm @@ -26,6 +26,8 @@ /obj/effect/forcefield/wizard var/mob/wizard +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/forcefield/wizard) + /obj/effect/forcefield/wizard/Initialize(mapload, ntimeleft, mob/summoner) . = ..() wizard = summoner diff --git a/code/modules/spells/spell_types/godhand.dm b/code/modules/spells/spell_types/godhand.dm index 6ac95d96eb844..a8b8e14526c53 100644 --- a/code/modules/spells/spell_types/godhand.dm +++ b/code/modules/spells/spell_types/godhand.dm @@ -17,6 +17,8 @@ throw_speed = 0 var/charges = 1 +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/melee/touch_attack) + /obj/item/melee/touch_attack/Initialize(mapload, obj/effect/proc_holder/spell/targeted/touch/_spell) . = ..() ADD_TRAIT(src, TRAIT_NODROP, ABSTRACT_ITEM_TRAIT) @@ -197,6 +199,8 @@ catchphrase = null var/datum/mutation/parent_mutation +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/melee/touch_attack/mutation) + /obj/item/melee/touch_attack/mutation/Initialize(_mapload, obj/effect/proc_holder/spell/targeted/touch/_spell, datum/mutation/_parent) . = ..() if(!istype(_parent)) diff --git a/code/modules/spells/spell_types/lesserlichdom.dm b/code/modules/spells/spell_types/lesserlichdom.dm index 93cd0c16a9ce1..21f22ee5640f7 100644 --- a/code/modules/spells/spell_types/lesserlichdom.dm +++ b/code/modules/spells/spell_types/lesserlichdom.dm @@ -89,6 +89,8 @@ var/static/active_phylacteries = 0 +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/lesserphylactery) + /obj/item/lesserphylactery/Initialize(mapload, datum/mind/newmind) . = ..() mind = newmind diff --git a/code/modules/spells/spell_types/lichdom.dm b/code/modules/spells/spell_types/lichdom.dm index 65ceadb56e6a2..7dd9a7c7ab02d 100644 --- a/code/modules/spells/spell_types/lichdom.dm +++ b/code/modules/spells/spell_types/lichdom.dm @@ -91,6 +91,8 @@ var/static/active_phylacteries = 0 +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/phylactery) + /obj/item/phylactery/Initialize(mapload, datum/mind/newmind) . = ..() mind = newmind diff --git a/code/modules/spells/spell_types/shapeshift.dm b/code/modules/spells/spell_types/shapeshift.dm index 4c01f64823dd3..70fea8d8c39a4 100644 --- a/code/modules/spells/spell_types/shapeshift.dm +++ b/code/modules/spells/spell_types/shapeshift.dm @@ -92,6 +92,8 @@ var/datum/soullink/shapeshift/slink var/obj/effect/proc_holder/spell/targeted/shapeshift/source +CREATION_TEST_IGNORE_SUBTYPES(/obj/shapeshift_holder) + /obj/shapeshift_holder/Initialize(mapload,obj/effect/proc_holder/spell/targeted/shapeshift/source,mob/living/caster, convert_damage = FALSE) . = ..() src.source = source diff --git a/code/modules/spells/spell_types/touch_attacks.dm b/code/modules/spells/spell_types/touch_attacks.dm index 9af90c350c286..4586d7635e62b 100644 --- a/code/modules/spells/spell_types/touch_attacks.dm +++ b/code/modules/spells/spell_types/touch_attacks.dm @@ -89,6 +89,8 @@ clothes_req = FALSE var/datum/mutation/parent_mutation +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/proc_holder/spell/targeted/touch/mutation) + /obj/effect/proc_holder/spell/targeted/touch/mutation/Initialize(_mapload, datum/mutation/_parent) . = ..() if(!istype(_parent)) diff --git a/code/modules/station_goals/bsa.dm b/code/modules/station_goals/bsa.dm index fa168fb5d3b29..819824239138e 100644 --- a/code/modules/station_goals/bsa.dm +++ b/code/modules/station_goals/bsa.dm @@ -203,6 +203,8 @@ DEFINE_BUFFER_HANDLER(/obj/machinery/bsa/middle) terminal = new /obj/machinery/power/terminal/invisible(T) terminal.master = src +CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/power/bsa/full) + /obj/machinery/power/bsa/full/Initialize(mapload, cannon_direction = WEST) . = ..() cell = new /obj/item/stock_parts/cell(src, 5000000) diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm index 9efeb38665270..3e07f80683b95 100644 --- a/code/modules/surgery/organs/eyes.dm +++ b/code/modules/surgery/organs/eyes.dm @@ -377,6 +377,8 @@ var/obj/item/organ/eyes/robotic/glow/parent +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/abstract/eye_lighting) + /obj/effect/abstract/eye_lighting/Initialize(mapload, light_object_range, light_object_power, current_color_string, light_flags) . = ..() parent = loc diff --git a/code/modules/unit_tests/armour_checks.dm b/code/modules/unit_tests/armour_checks.dm index 2d49698d523d8..33f9af090589d 100644 --- a/code/modules/unit_tests/armour_checks.dm +++ b/code/modules/unit_tests/armour_checks.dm @@ -75,6 +75,8 @@ slot_flags = ALL body_parts_covered = ALL +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/clothing/suit/test_vest) + /obj/item/clothing/suit/test_vest/Initialize(mapload, armour_values) armor = armour_values . = ..() diff --git a/code/modules/uplink/uplink_devices.dm b/code/modules/uplink/uplink_devices.dm index 844384f0ee73b..9938435d80b6f 100644 --- a/code/modules/uplink/uplink_devices.dm +++ b/code/modules/uplink/uplink_devices.dm @@ -22,6 +22,8 @@ var/uplink_flag = UPLINK_TRAITORS +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/uplink) + /obj/item/uplink/Initialize(mapload, owner, tc_amount = 20) . = ..() AddComponent(/datum/component/uplink, owner, FALSE, TRUE, uplink_flag, tc_amount) @@ -29,6 +31,8 @@ /obj/item/uplink/debug name = "debug uplink" +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/uplink/debug) + /obj/item/uplink/debug/Initialize(mapload, owner, tc_amount = 9000) . = ..() var/datum/component/uplink/hidden_uplink = GetComponent(/datum/component/uplink) @@ -42,6 +46,8 @@ name = "debug nuclear uplink" uplink_flag = UPLINK_NUKE_OPS +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/uplink/nuclear/debug) + /obj/item/uplink/nuclear/debug/Initialize(mapload, owner, tc_amount = 9000) . = ..() var/datum/component/uplink/hidden_uplink = GetComponent(/datum/component/uplink) @@ -63,17 +69,23 @@ name = "dusty radio" desc = "A dusty looking radio." +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/uplink/old) + /obj/item/uplink/old/Initialize(mapload, owner, tc_amount = 10) . = ..() var/datum/component/uplink/hidden_uplink = GetComponent(/datum/component/uplink) hidden_uplink.name = "dusty radio" // Multitool uplink +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/multitool/uplink) + /obj/item/multitool/uplink/Initialize(mapload, owner, tc_amount = 20) . = ..() AddComponent(/datum/component/uplink, owner, FALSE, TRUE, UPLINK_TRAITORS, tc_amount) // Pen uplink +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/pen/uplink) + /obj/item/pen/uplink/Initialize(mapload, owner, tc_amount = 20) . = ..() AddComponent(/datum/component/uplink, owner, TRUE, FALSE, UPLINK_TRAITORS, tc_amount) diff --git a/code/modules/vehicles/mecha/combat/durand.dm b/code/modules/vehicles/mecha/combat/durand.dm index e436afcaab9ee..242a4be15d74c 100644 --- a/code/modules/vehicles/mecha/combat/durand.dm +++ b/code/modules/vehicles/mecha/combat/durand.dm @@ -153,6 +153,8 @@ own integrity back to max. Shield is automatically dropped if we run out of powe var/currentuser +CREATION_TEST_IGNORE_SUBTYPES(/obj/durand_shield) + /obj/durand_shield/Initialize(mapload, _chassis, _layer, _dir) . = ..() chassis = _chassis diff --git a/code/modules/vehicles/mecha/mecha_wreckage.dm b/code/modules/vehicles/mecha/mecha_wreckage.dm index 530c34a5a378a..e0f584c708dab 100644 --- a/code/modules/vehicles/mecha/mecha_wreckage.dm +++ b/code/modules/vehicles/mecha/mecha_wreckage.dm @@ -17,6 +17,8 @@ var/mob/living/silicon/ai/AI //AIs to be salvaged var/list/parts +CREATION_TEST_IGNORE_SUBTYPES(/obj/structure/mecha_wreckage) + /obj/structure/mecha_wreckage/Initialize(mapload, mob/living/silicon/ai/AI_pilot) . = ..() if(parts) diff --git a/code/modules/wiremod/shell/brain_computer_interface.dm b/code/modules/wiremod/shell/brain_computer_interface.dm index 65bc8a9ffcbf6..0100a3053b6b1 100644 --- a/code/modules/wiremod/shell/brain_computer_interface.dm +++ b/code/modules/wiremod/shell/brain_computer_interface.dm @@ -49,6 +49,8 @@ /// A reference to the action button itself var/datum/action/innate/bci_action/bci_action +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/circuit_component/bci_action) + /obj/item/circuit_component/bci_action/Initialize(mapload, default_icon) . = ..() diff --git a/code/modules/xenoarchaeology/traits/xenoartifact_minors.dm b/code/modules/xenoarchaeology/traits/xenoartifact_minors.dm index 72e6e12c13f01..51e0f600497e7 100644 --- a/code/modules/xenoarchaeology/traits/xenoartifact_minors.dm +++ b/code/modules/xenoarchaeology/traits/xenoartifact_minors.dm @@ -175,6 +175,8 @@ action_background_icon_state = "bg_spell" var/obj/item/xenoartifact/xeno +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/proc_holder/spell/targeted/xeno_senitent_action) + /obj/effect/proc_holder/spell/targeted/xeno_senitent_action/Initialize(mapload, var/obj/item/xenoartifact/Z) . = ..() xeno = Z @@ -203,6 +205,8 @@ invisibility = 101 var/obj/item/xenoartifact/artifact +CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/mob_spawn/sentient_artifact) + /obj/effect/mob_spawn/sentient_artifact/Initialize(mapload, var/obj/item/xenoartifact/Z) if(!Z) qdel(src) diff --git a/code/modules/xenoarchaeology/xenoartifact.dm b/code/modules/xenoarchaeology/xenoartifact.dm index c1d8dcf9da7ab..9dfb1ec733e07 100644 --- a/code/modules/xenoarchaeology/xenoartifact.dm +++ b/code/modules/xenoarchaeology/xenoartifact.dm @@ -58,6 +58,8 @@ AddComponent(/datum/component/xenoartifact_pricing) AddComponent(/datum/component/discoverable, XENOA_DP, TRUE) //Same values as original artifacts from exploration +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/xenoartifact) + /obj/item/xenoartifact/Initialize(mapload, difficulty) . = ..() @@ -422,6 +424,8 @@ /obj/item/xenoartifact/maint //Semi-toddler-safe version, for maint loot table. material = XENOA_BLUESPACE +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/xenoartifact/maint) + /obj/item/xenoartifact/maint/Initialize(mapload, difficulty) if(prob(1)) material = pick(XENOA_PLASMA, XENOA_URANIUM, XENOA_BANANIUM) @@ -447,6 +451,8 @@ price = f_price ///Objective version for exploration +CREATION_TEST_IGNORE_SUBTYPES(/obj/item/xenoartifact/objective) + /obj/item/xenoartifact/objective/Initialize(mapload, difficulty) traits += new /datum/xenoartifact_trait/special/objective . = ..() From 8a810000d4aa27842ea5bccedef69d10a382a676 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 13:57:28 +0100 Subject: [PATCH 013/266] Removes all datum ignores --- code/controllers/master.dm | 2 -- code/datums/components/COMPONENT_TEMPLATE.md | 2 -- code/datums/components/anti_magic.dm | 2 -- code/datums/components/area_sound_manager.dm | 2 -- code/datums/components/armor_plate.dm | 2 -- code/datums/components/butchering.dm | 2 -- code/datums/components/conveyor_movement.dm | 2 -- code/datums/components/deadchat_control.dm | 2 -- code/datums/components/deployable.dm | 2 -- code/datums/components/drift.dm | 2 -- code/datums/components/explodable.dm | 2 -- code/datums/components/forensics.dm | 2 -- code/datums/components/grillable.dm | 2 -- code/datums/components/heirloom.dm | 2 -- code/datums/components/knockoff.dm | 2 -- code/datums/components/lockon_aiming.dm | 2 -- code/datums/components/mirv.dm | 2 -- code/datums/components/ntnet_interface.dm | 2 -- code/datums/components/overlay_lighting.dm | 2 -- code/datums/components/payment.dm | 2 -- code/datums/components/remote_materials.dm | 2 -- code/datums/components/shell.dm | 2 -- code/datums/components/slippery.dm | 2 -- code/datums/components/spawner.dm | 2 -- code/datums/components/squashable.dm | 2 -- code/datums/components/squeak.dm | 2 -- code/datums/components/team_monitor.dm | 6 ------ code/datums/components/uplink.dm | 2 -- code/datums/components/wet_floor.dm | 2 -- .../discovery_research/discoverable_component.dm | 2 -- 30 files changed, 64 deletions(-) diff --git a/code/controllers/master.dm b/code/controllers/master.dm index bc9e12dd48cc6..9873be1a8e4ae 100644 --- a/code/controllers/master.dm +++ b/code/controllers/master.dm @@ -211,8 +211,6 @@ GLOBAL_REAL(Master, /datum/controller/master) = new // Please don't stuff random bullshit here, // Make a subsystem, give it the SS_NO_FIRE flag, and do your work in it's Initialize() -CREATION_TEST_IGNORE_SUBTYPES(/datum/controller/master) - /datum/controller/master/Initialize(delay, init_sss, tgs_prime) set waitfor = 0 diff --git a/code/datums/components/COMPONENT_TEMPLATE.md b/code/datums/components/COMPONENT_TEMPLATE.md index e2744d0f85970..c2777a67d5a6a 100644 --- a/code/datums/components/COMPONENT_TEMPLATE.md +++ b/code/datums/components/COMPONENT_TEMPLATE.md @@ -9,8 +9,6 @@ See _component.dm for detailed explanations //dupe_mode = COMPONENT_DUPE_ALLOWED // code/__DEFINES/dcs/flags.dm var/myvar -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/mycomponent) - /datum/component/mycomponent/Initialize(myargone, myargtwo) if(myargone) myvar = myargone diff --git a/code/datums/components/anti_magic.dm b/code/datums/components/anti_magic.dm index bf05fc7b905d1..c7179c39a79ba 100644 --- a/code/datums/components/anti_magic.dm +++ b/code/datums/components/anti_magic.dm @@ -11,8 +11,6 @@ var/static/identifier_current = 0 var/identifier -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/anti_magic) - /datum/component/anti_magic/Initialize(_source, _magic = FALSE, _holy = FALSE, _charges, _blocks_self = TRUE, datum/callback/_reaction, datum/callback/_expire, _allowed_slots) // Random enough that it will never conflict, and avoids having a static variable identifier = identifier_current++ diff --git a/code/datums/components/area_sound_manager.dm b/code/datums/components/area_sound_manager.dm index b8cf1de9d97b3..d0c27025e30ee 100644 --- a/code/datums/components/area_sound_manager.dm +++ b/code/datums/components/area_sound_manager.dm @@ -9,8 +9,6 @@ ///The timer id of our current start delay, if it exists var/timerid -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/area_sound_manager) - /datum/component/area_sound_manager/Initialize(area_loop_pairs, change_on, remove_on, acceptable_zs) if(!ismovable(parent)) return diff --git a/code/datums/components/armor_plate.dm b/code/datums/components/armor_plate.dm index a7bfab1b24d56..74a20a7e725a6 100644 --- a/code/datums/components/armor_plate.dm +++ b/code/datums/components/armor_plate.dm @@ -5,8 +5,6 @@ var/datum/armor/added_armor = list(MELEE = 10) var/upgrade_name -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/armor_plate) - /datum/component/armor_plate/Initialize(_maxamount,obj/item/_upgrade_item,datum/armor/_added_armor) if(!isobj(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/butchering.dm b/code/datums/components/butchering.dm index 9544ce265039a..d11800a38565a 100644 --- a/code/datums/components/butchering.dm +++ b/code/datums/components/butchering.dm @@ -12,8 +12,6 @@ /// Whether or not this component is compatible with blunt tools. var/can_be_blunt = FALSE -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/butchering) - /datum/component/butchering/Initialize(_speed, _effectiveness, _bonus_modifier, _butcher_sound, disabled, _can_be_blunt) if(_speed) speed = _speed diff --git a/code/datums/components/conveyor_movement.dm b/code/datums/components/conveyor_movement.dm index a7c8d3b7a93b4..43fb9979a2cc9 100644 --- a/code/datums/components/conveyor_movement.dm +++ b/code/datums/components/conveyor_movement.dm @@ -6,8 +6,6 @@ var/living_parent = FALSE var/speed -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/convey) - /datum/component/convey/Initialize(direction, speed, start_delay) if(!ismovable(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/deadchat_control.dm b/code/datums/components/deadchat_control.dm index b078a451fdc50..b74f6e95958f4 100644 --- a/code/datums/components/deadchat_control.dm +++ b/code/datums/components/deadchat_control.dm @@ -11,8 +11,6 @@ var/deadchat_mode var/input_cooldown -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/deadchat_control) - /datum/component/deadchat_control/Initialize(_deadchat_mode, _inputs, _input_cooldown = 12 SECONDS) if(!isatom(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/deployable.dm b/code/datums/components/deployable.dm index 6b45a50bc2eaa..5202dbae3701c 100644 --- a/code/datums/components/deployable.dm +++ b/code/datums/components/deployable.dm @@ -19,8 +19,6 @@ /// The atom parent of this VAR_PRIVATE/obj/item/item_parent -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/deployable) - /datum/component/deployable/Initialize(deployed_object, consumed = TRUE, time_to_deploy = 0 SECONDS, ignores_mob_density = TRUE, dense_deployment = FALSE, empty_icon = null, loaded = FALSE, reload_type = null) . = ..() if (!isitem(parent)) diff --git a/code/datums/components/drift.dm b/code/datums/components/drift.dm index 89a2558404d63..db71505c82d55 100644 --- a/code/datums/components/drift.dm +++ b/code/datums/components/drift.dm @@ -7,8 +7,6 @@ var/datum/move_loop/move/drifting_loop var/block_inputs_until -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/drift) - /datum/component/drift/Initialize(direction, instant = FALSE) if(!ismovable(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/explodable.dm b/code/datums/components/explodable.dm index 95370d1e1ca54..7175e68cf58fe 100644 --- a/code/datums/components/explodable.dm +++ b/code/datums/components/explodable.dm @@ -11,8 +11,6 @@ /// For items, lets us determine where things should be hit. var/equipped_slot -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/explodable) - /datum/component/explodable/Initialize(devastation_range, heavy_impact_range, light_impact_range, flash_range, uncapped = FALSE, delete_after = EXPLODABLE_DELETE_PARENT) if(!isatom(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/forensics.dm b/code/datums/components/forensics.dm index 7cde3dfa1419c..069f3ad1fd489 100644 --- a/code/datums/components/forensics.dm +++ b/code/datums/components/forensics.dm @@ -16,8 +16,6 @@ add_blood_decal() return ..() -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/forensics) - /datum/component/forensics/Initialize(new_fingerprints, new_hiddenprints, new_blood_DNA, new_fibers, new_souls) if(!isatom(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/grillable.dm b/code/datums/components/grillable.dm index 804aaf087c8e2..cb1f25e30c3d1 100644 --- a/code/datums/components/grillable.dm +++ b/code/datums/components/grillable.dm @@ -15,8 +15,6 @@ ///Do we use the large steam sprite? var/use_large_steam_sprite = FALSE -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/grillable) - /datum/component/grillable/Initialize(cook_result, required_cook_time, positive_result, use_large_steam_sprite) . = ..() if(!isitem(parent)) //Only items support grilling at the moment diff --git a/code/datums/components/heirloom.dm b/code/datums/components/heirloom.dm index 927ec2f8597c7..6eb6a0e23ea2f 100644 --- a/code/datums/components/heirloom.dm +++ b/code/datums/components/heirloom.dm @@ -2,8 +2,6 @@ var/datum/mind/owner var/family_name -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/heirloom) - /datum/component/heirloom/Initialize(new_owner, new_family_name) if(!isitem(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/knockoff.dm b/code/datums/components/knockoff.dm index 236de0f70aec6..cd3fee4702db4 100644 --- a/code/datums/components/knockoff.dm +++ b/code/datums/components/knockoff.dm @@ -4,8 +4,6 @@ var/list/target_zones //Aiming for these zones will cause the knockoff, null means all zones allowed var/list/slots_knockoffable //Can be only knocked off from these slots, null means all slots allowed -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/knockoff) - /datum/component/knockoff/Initialize(knockoff_chance,zone_override,slots_knockoffable) if(!isitem(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/lockon_aiming.dm b/code/datums/components/lockon_aiming.dm index cd0d262b94564..7c79b801c31d4 100644 --- a/code/datums/components/lockon_aiming.dm +++ b/code/datums/components/lockon_aiming.dm @@ -20,8 +20,6 @@ var/datum/callback/can_target_callback var/aiming_params -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/lockon_aiming) - /datum/component/lockon_aiming/Initialize(range, list/typecache, amount, list/immune, datum/callback/when_locked, icon, icon_state, datum/callback/target_callback) if(!ismob(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/mirv.dm b/code/datums/components/mirv.dm index 3bf391a275965..670bf703ca81b 100644 --- a/code/datums/components/mirv.dm +++ b/code/datums/components/mirv.dm @@ -3,8 +3,6 @@ var/radius // shoots a projectile for every turf on this radius from the hit target var/override_projectile_range -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/mirv) - /datum/component/mirv/Initialize(projectile_type, radius=1, override_projectile_range) if(!isgun(parent) && !ismachinery(parent) && !isstructure(parent) && !isgrenade(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/ntnet_interface.dm b/code/datums/components/ntnet_interface.dm index b49990219baac..671bffe09e0ab 100644 --- a/code/datums/components/ntnet_interface.dm +++ b/code/datums/components/ntnet_interface.dm @@ -56,8 +56,6 @@ * * network_name - Fully qualified network id of the network we are joining * * network_tag - The objects id_tag. Used for finding the device at mapload time */ -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/ntnet_interface) - /datum/component/ntnet_interface/Initialize(network_name, network_tag = null) if(network_name == null || !istext(network_name)) log_telecomms("ntnet_interface/Initialize: Bad network '[network_name]' for '[parent]', going to limbo it") diff --git a/code/datums/components/overlay_lighting.dm b/code/datums/components/overlay_lighting.dm index e1ce8303f1aaf..ec48357afc464 100644 --- a/code/datums/components/overlay_lighting.dm +++ b/code/datums/components/overlay_lighting.dm @@ -73,8 +73,6 @@ ///Cast range for the directional cast (how far away the atom is moved) var/cast_range = 2 -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/overlay_lighting) - /datum/component/overlay_lighting/Initialize(_range, _power, _color, starts_on, is_directional) if(!ismovable(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/payment.dm b/code/datums/components/payment.dm index 0a5de798ade6d..763856190421f 100644 --- a/code/datums/components/payment.dm +++ b/code/datums/components/payment.dm @@ -24,8 +24,6 @@ ) ) -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/payment) - /datum/component/payment/Initialize(_cost, _target, _style = PAYMENT_CLINICAL) if(istext(_target)) target_acc = SSeconomy.get_budget_account(ACCOUNT_CIV_ID) diff --git a/code/datums/components/remote_materials.dm b/code/datums/components/remote_materials.dm index ae17a3f69c946..b9f6b495efb3c 100644 --- a/code/datums/components/remote_materials.dm +++ b/code/datums/components/remote_materials.dm @@ -18,8 +18,6 @@ handles linking back and forth. ///Flags used when converting inserted materials into their component materials. var/mat_container_flags = NONE -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/remote_materials) - /datum/component/remote_materials/Initialize(category, mapload, allow_standalone = TRUE, force_connect = FALSE, mat_container_flags=NONE) if (!isatom(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/shell.dm b/code/datums/components/shell.dm index 17ef716cd3b74..9a98e816e6d5e 100644 --- a/code/datums/components/shell.dm +++ b/code/datums/components/shell.dm @@ -16,8 +16,6 @@ var/locked = FALSE -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/shell) - /datum/component/shell/Initialize(unremovable_circuit_components, capacity, shell_flags) . = ..() if(!ismovable(parent)) diff --git a/code/datums/components/slippery.dm b/code/datums/components/slippery.dm index 880985c066936..3b244d5e16f8a 100644 --- a/code/datums/components/slippery.dm +++ b/code/datums/components/slippery.dm @@ -14,8 +14,6 @@ var/datum/weakref/holder_connect_loc_behalf -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/slippery) - /datum/component/slippery/Initialize(_knockdown, _lube_flags = NONE, datum/callback/_callback, _paralyze, _force_drop = FALSE) knockdown_time = max(_knockdown, 0) paralyze_time = max(_paralyze, 0) diff --git a/code/datums/components/spawner.dm b/code/datums/components/spawner.dm index e4c8f540cb709..02fbacc9d74f8 100644 --- a/code/datums/components/spawner.dm +++ b/code/datums/components/spawner.dm @@ -9,8 +9,6 @@ -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/spawner) - /datum/component/spawner/Initialize(_mob_types, _spawn_time, _faction, _spawn_text, _max_mobs) if(_spawn_time) spawn_time=_spawn_time diff --git a/code/datums/components/squashable.dm b/code/datums/components/squashable.dm index 174ee65c98cb7..f9159614909fd 100644 --- a/code/datums/components/squashable.dm +++ b/code/datums/components/squashable.dm @@ -13,8 +13,6 @@ COMSIG_ATOM_ENTERED = PROC_REF(on_entered), ) -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/squashable) - /datum/component/squashable/Initialize(squash_chance, squash_damage, squash_flags, squash_callback) . = ..() if(!isliving(parent)) diff --git a/code/datums/components/squeak.dm b/code/datums/components/squeak.dm index 672ae9eeb1d16..e5dc6532d6403 100644 --- a/code/datums/components/squeak.dm +++ b/code/datums/components/squeak.dm @@ -25,8 +25,6 @@ COMSIG_ATOM_ENTERED = PROC_REF(play_squeak_crossed), ) -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/squeak) - /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 diff --git a/code/datums/components/team_monitor.dm b/code/datums/components/team_monitor.dm index 2c89b8cb9415d..5b9816761183e 100644 --- a/code/datums/components/team_monitor.dm +++ b/code/datums/components/team_monitor.dm @@ -96,8 +96,6 @@ GLOBAL_LIST_EMPTY(tracker_beacons) /// If we can track beacons within the same zgroup (e.g. on a multiz station) var/multiz = TRUE -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/team_monitor) - /datum/component/team_monitor/Initialize(frequency_key, frequency, _attached_beacon, _multiz = TRUE) multiz = _multiz team_freq_key = frequency_key @@ -335,8 +333,6 @@ CREATION_TEST_IGNORE_SUBTYPES(/datum/component/team_monitor) // Worn version, hides when dequipped // ============ -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/team_monitor/worn) - /datum/component/team_monitor/worn/Initialize(frequency_key, frequency, _attached_beacon) var/obj/item/clothing/item = parent if(!istype(item)) @@ -403,8 +399,6 @@ CREATION_TEST_IGNORE_SUBTYPES(/datum/component/team_monitor/worn) /// Global signal? var/global_signal = FALSE -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/tracking_beacon) - /datum/component/tracking_beacon/Initialize(_frequency_key, _frequency, _attached_monitor, _visible = TRUE, _colour = "#ffffff", _global = FALSE, _always_update = FALSE, _z_diff_colour = "#808080") . = ..() diff --git a/code/datums/components/uplink.dm b/code/datums/components/uplink.dm index b9b951dd4b996..85c49f68d8b67 100644 --- a/code/datums/components/uplink.dm +++ b/code/datums/components/uplink.dm @@ -31,8 +31,6 @@ var/list/previous_attempts -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/uplink) - /datum/component/uplink/Initialize(_owner, _lockable = TRUE, _enabled = FALSE, uplink_flag = UPLINK_TRAITORS, starting_tc = TELECRYSTALS_DEFAULT) if(!isitem(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/datums/components/wet_floor.dm b/code/datums/components/wet_floor.dm index 6085980bda6b6..cbaf051bdefb4 100644 --- a/code/datums/components/wet_floor.dm +++ b/code/datums/components/wet_floor.dm @@ -22,8 +22,6 @@ for(var/i in WF.time_left_list) add_wet(text2num(i), WF.time_left_list[i]) -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/wet_floor) - /datum/component/wet_floor/Initialize(strength, duration_minimum, duration_add, duration_maximum, _permanent = FALSE) if(!isopenturf(parent)) return COMPONENT_INCOMPATIBLE diff --git a/code/modules/exploration_crew/discovery_research/discoverable_component.dm b/code/modules/exploration_crew/discovery_research/discoverable_component.dm index 3e1bf3c533204..1b9685404b15b 100644 --- a/code/modules/exploration_crew/discovery_research/discoverable_component.dm +++ b/code/modules/exploration_crew/discovery_research/discoverable_component.dm @@ -6,8 +6,6 @@ var/point_reward = 0 var/datum/callback/get_discover_id -CREATION_TEST_IGNORE_SUBTYPES(/datum/component/discoverable) - /datum/component/discoverable/Initialize(point_reward, unique = FALSE, get_discover_id) if(!isatom(parent)) return COMPONENT_INCOMPATIBLE From 9743e0590f1c34dda727c8f2e6d413741d4420b3 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 14:02:40 +0100 Subject: [PATCH 014/266] Removes 515 specific features --- code/controllers/subsystem/garbage.dm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm index 1220284ebcdb7..5712d240c4347 100644 --- a/code/controllers/subsystem/garbage.dm +++ b/code/controllers/subsystem/garbage.dm @@ -183,7 +183,11 @@ SUBSYSTEM_DEF(garbage) var/datum/D = L[GC_QUEUE_ITEM_REF] // If that's all we've got, send er off +#if DM_VERSION >= 515 if (refcount(D) == REFS_WE_EXPECT) +#else + if (!D || D.gc_destroyed != queued_at_time) +#endif ++gcedlasttick ++totalgcs pass_counts[level]++ @@ -206,13 +210,12 @@ SUBSYSTEM_DEF(garbage) #ifdef REFERENCE_TRACKING // Decides how many refs to look for (potentially) // Based off the remaining and the ones we can account for - var/remaining_refs = refcount(D) - REFS_WE_EXPECT if(reference_find_on_fail[text_ref(D)]) - INVOKE_ASYNC(D, TYPE_PROC_REF(/datum,find_references), remaining_refs) + INVOKE_ASYNC(D, TYPE_PROC_REF(/datum,find_references)) ref_searching = TRUE #ifdef GC_FAILURE_HARD_LOOKUP else - INVOKE_ASYNC(D, TYPE_PROC_REF(/datum,find_references), remaining_refs) + INVOKE_ASYNC(D, TYPE_PROC_REF(/datum,find_references)) ref_searching = TRUE #endif reference_find_on_fail -= text_ref(D) @@ -221,7 +224,6 @@ SUBSYSTEM_DEF(garbage) var/datum/qdel_item/I = items[type] var/message = "## TESTING: GC: -- [text_ref(D)] | [type] was unable to be GC'd --" - message = "[message] (ref count of [refcount(D)])" log_world(message) var/detail = D.dump_harddel_info() From 36bc2c6cbc1388959f8eacba172140b6d02a225e Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 14:11:56 +0100 Subject: [PATCH 015/266] Adds auxmos to the unit tests --- .github/workflows/run_integration_tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/run_integration_tests.yml b/.github/workflows/run_integration_tests.yml index d628c813e36b9..43eeda344d694 100644 --- a/.github/workflows/run_integration_tests.yml +++ b/.github/workflows/run_integration_tests.yml @@ -48,6 +48,9 @@ jobs: # - name: Install dreamluau # run: | # bash tools/ci/install_dreamluau.sh + - name: Install auxmos + run: | + bash tools/ci/install_auxmos.sh - name: Configure version run: | echo "BYOND_MAJOR=${{ inputs.major }}" >> $GITHUB_ENV From 35a2f31cf5da97652b547920a8706a60c23fee79 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 14:17:12 +0100 Subject: [PATCH 016/266] Should fix the segmentation fault --- code/game/world.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/world.dm b/code/game/world.dm index 1cbcc36e48c43..72119e87ff9fc 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -299,7 +299,7 @@ GLOBAL_VAR(restart_counter) else fail_reasons = list("Missing GLOB!") if(!fail_reasons) - rustg_file_append("Success!", "[GLOB.log_directory]/clean_run.lk") + rustg_file_write("Success!", "[GLOB.log_directory]/clean_run.lk") else log_world("Test run failed!\n[fail_reasons.Join("\n")]") sleep(0) //yes, 0, this'll let Reboot finish and prevent byond memes From bb18b5b45a33a69ceb328d16beb954ee9c856436 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 14:24:50 +0100 Subject: [PATCH 017/266] Update world.dm --- code/game/world.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/world.dm b/code/game/world.dm index 72119e87ff9fc..1cbcc36e48c43 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -299,7 +299,7 @@ GLOBAL_VAR(restart_counter) else fail_reasons = list("Missing GLOB!") if(!fail_reasons) - rustg_file_write("Success!", "[GLOB.log_directory]/clean_run.lk") + rustg_file_append("Success!", "[GLOB.log_directory]/clean_run.lk") else log_world("Test run failed!\n[fail_reasons.Join("\n")]") sleep(0) //yes, 0, this'll let Reboot finish and prevent byond memes From fecf4e48c464bc6ca5250c70177629c025ab4386 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 14:37:55 +0100 Subject: [PATCH 018/266] Adds python setup in the runner --- .github/workflows/ci_suite.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci_suite.yml b/.github/workflows/ci_suite.yml index 17c4f878f47de..2be8bf46dee94 100644 --- a/.github/workflows/ci_suite.yml +++ b/.github/workflows/ci_suite.yml @@ -67,6 +67,10 @@ jobs: with: path: tools/icon_cutter/cache key: ${{ runner.os }}-cutter-${{ hashFiles('dependencies.sh') }} + - name: Python setup + uses: actions/setup-python@v4 + with: + python-version: "3.11" - name: Install OpenDream uses: robinraju/release-downloader@v1.9 with: From afa2435420699f2188a6432a4024432a594ee349 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 14:41:29 +0100 Subject: [PATCH 019/266] Fixes redefined defines --- code/__HELPERS/qdel.dm | 8 -------- 1 file changed, 8 deletions(-) diff --git a/code/__HELPERS/qdel.dm b/code/__HELPERS/qdel.dm index ba31b067c4aa5..738c2c4e62d76 100644 --- a/code/__HELPERS/qdel.dm +++ b/code/__HELPERS/qdel.dm @@ -1,10 +1,2 @@ -#define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), item), time, TIMER_STOPPABLE) -#define QDEL_IN_CLIENT_TIME(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), item), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME) -#define QDEL_NULL(item) qdel(item); item = null -#define QDEL_LIST(L) if(L) { for(var/I in L) qdel(I); L.Cut(); } -#define QDEL_LIST_IN(L, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(______qdel_list_wrapper), L), time, TIMER_STOPPABLE) -#define QDEL_LIST_ASSOC(L) if(L) { for(var/I in L) { qdel(L[I]); qdel(I); } L.Cut(); } -#define QDEL_LIST_ASSOC_VAL(L) if(L) { for(var/I in L) qdel(L[I]); L.Cut(); } - /proc/______qdel_list_wrapper(list/L) //the underscores are to encourage people not to use this directly. QDEL_LIST(L) From a13d83467d6d8656ddf9c2dd000f4622db13f254 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 14:42:38 +0100 Subject: [PATCH 020/266] Adds trait validity --- tools/trait_validity/check.py | 88 +++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 tools/trait_validity/check.py diff --git a/tools/trait_validity/check.py b/tools/trait_validity/check.py new file mode 100644 index 0000000000000..10da9f34a15c8 --- /dev/null +++ b/tools/trait_validity/check.py @@ -0,0 +1,88 @@ +import os +import re +import sys + +define_regex = re.compile(r"(\s+)?#define\s?([A-Z0-9_]+)\(?(.+)\)?") + +def green(text): + return "\033[32m" + str(text) + "\033[0m" + +def red(text): + return "\033[31m" + str(text) + "\033[0m" + +# simple way to check if we're running on github actions, or on a local machine +on_github = os.getenv("GITHUB_ACTIONS") == "true" + +defines_file = "code/__DEFINES/traits/declarations.dm" +globalvars_file = "code/_globalvars/traits/_traits.dm" + +how_to_fix_message = f"Please ensure that all traits in the {defines_file} file are added in the {globalvars_file} file." + +def post_error(define_name): + if on_github: + print(f"::error file={defines_file},title=Define Sanity::{define_name} is defined in {defines_file} but not added to {globalvars_file}!") + else: + print(red(f"- Failure: {define_name} is defined in {defines_file} but not added to {globalvars_file}!")) + +number_of_defines = 0 + +if not os.path.isfile(defines_file): + print(red(f"Could not find the defines file '{defines_file}'!")) + sys.exit(1) + +if not os.path.isfile(globalvars_file): + print(red(f"Could not find the globalvars file '{globalvars_file}'!")) + sys.exit(1) + +defines_to_search_for = [] +missing_defines = [] +scannable_lines = [] + +with open(defines_file, 'r') as file: + reading = False + + for line in file: + line = line.strip() + + if line == "// BEGIN TRAIT DEFINES": + reading = True + continue + elif line == "// END TRAIT DEFINES": + break + elif not reading: + continue + + scannable_lines.append(line) + +for potential_define in scannable_lines: + match = define_regex.match(potential_define) + if not match: + continue + + number_of_defines += 1 + defines_to_search_for.append(match.group(2)) + +if number_of_defines == 0: + print(red("No defines found! This is likely an error.")) + sys.exit(1) + +if number_of_defines <= 450: + print(red(f"Only found {number_of_defines} defines! Something has likely gone wrong as the number of global traits should not be this low.")) + sys.exit(1) + +with open(globalvars_file, "r") as file: + globalvars_file_contents = file.read() + for define_name in defines_to_search_for: + searchable_string = "\"" + define_name + "\" = " + define_name + if not re.search(searchable_string, globalvars_file_contents): + missing_defines.append(define_name) + +if len(missing_defines): + for missing_define in missing_defines: + post_error(missing_define) + + print(red(how_to_fix_message)) + sys.exit(1) + +else: + print(green(f"All traits were found in both files! (found {number_of_defines} defines)")) From 7a6776fa8c6fa4157a204dc6614c64db4f4956be Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 14:44:49 +0100 Subject: [PATCH 021/266] Adds ticked file enforcement Co-Authored-By: san7890 Co-Authored-By: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> --- .../schemas/beestation_dme.json | 10 ++ .../schemas/unit_tests.json | 9 + .../ticked_file_enforcement.py | 156 ++++++++++++++++++ 3 files changed, 175 insertions(+) create mode 100644 tools/ticked_file_enforcement/schemas/beestation_dme.json create mode 100644 tools/ticked_file_enforcement/schemas/unit_tests.json create mode 100644 tools/ticked_file_enforcement/ticked_file_enforcement.py diff --git a/tools/ticked_file_enforcement/schemas/beestation_dme.json b/tools/ticked_file_enforcement/schemas/beestation_dme.json new file mode 100644 index 0000000000000..7fe1840d75340 --- /dev/null +++ b/tools/ticked_file_enforcement/schemas/beestation_dme.json @@ -0,0 +1,10 @@ +{ + "file": "tgstation.dme", + "scannable_directory": "code/", + "subdirectories": true, + "excluded_files": [], + "forbidden_includes": [ + "code/modules/tgs/**/*.dm", + "code/modules/unit_tests/[!_]*.dm" + ] +} diff --git a/tools/ticked_file_enforcement/schemas/unit_tests.json b/tools/ticked_file_enforcement/schemas/unit_tests.json new file mode 100644 index 0000000000000..f5b7582096bfd --- /dev/null +++ b/tools/ticked_file_enforcement/schemas/unit_tests.json @@ -0,0 +1,9 @@ +{ + "file": "code/modules/unit_tests/_unit_tests.dm", + "scannable_directory": "code/modules/unit_tests/", + "subdirectories": false, + "excluded_files": [ + "find_reference_sanity.dm" + ], + "forbidden_includes": [] +} diff --git a/tools/ticked_file_enforcement/ticked_file_enforcement.py b/tools/ticked_file_enforcement/ticked_file_enforcement.py new file mode 100644 index 0000000000000..86c399c73554b --- /dev/null +++ b/tools/ticked_file_enforcement/ticked_file_enforcement.py @@ -0,0 +1,156 @@ +import codecs +import fnmatch +import functools +import glob +import json +import os +import sys + +# simple way to check if we're running on github actions, or on a local machine +on_github = os.getenv("GITHUB_ACTIONS") == "true" + +def green(text): + return "\033[32m" + str(text) + "\033[0m" + +def red(text): + return "\033[31m" + str(text) + "\033[0m" + +def blue(text): + return "\033[34m" + str(text) + "\033[0m" + +schema = json.load(sys.stdin) +file_reference = schema["file"] +file_reference_basename = os.path.basename(file_reference) +scannable_directory = schema["scannable_directory"] +subdirectories = schema["subdirectories"] +FORBIDDEN_INCLUDES = schema["forbidden_includes"] +excluded_files = schema["excluded_files"] + +def post_error(string): + print(red(f"Ticked File Enforcement [{file_reference}]: " + string)) + if on_github: + print(f"::error file={file_reference},line=1,title=Ticked File Enforcement::{string}") + +for excluded_file in excluded_files: + full_file_path = scannable_directory + excluded_file + if not os.path.isfile(full_file_path): + post_error(f"Excluded file {full_file_path} does not exist, please remove it!") + sys.exit(1) + +file_extensions = ("dm", "dmf") + +reading = False +lines = [] +total = 0 + +with open(file_reference, 'r') as file: + for line in file: + total += 1 + line = line.strip() + + if line == "// BEGIN_INCLUDE": + reading = True + continue + elif line == "// END_INCLUDE": + break + elif not reading: + continue + + lines.append(line) + +offset = total - len(lines) +print(blue(f"Ticked File Enforcement: {offset} lines were ignored in output for [{file_reference}].")) +fail_no_include = False + +scannable_files = [] +for file_extension in file_extensions: + compiled_directory = f"{scannable_directory}/**/*.{file_extension}" + scannable_files += glob.glob(compiled_directory, recursive=True) + +if len(scannable_files) == 0: + post_error(f"No files were found in {scannable_directory}. Ticked File Enforcement has failed!") + sys.exit(1) + +for code_file in scannable_files: + dm_path = "" + + if subdirectories is True: + dm_path = code_file.replace('/', '\\') + else: + dm_path = os.path.basename(code_file) + + included = f"#include \"{dm_path}\"" in lines + + forbid_include = False + for forbidable in FORBIDDEN_INCLUDES: + if not fnmatch.fnmatch(code_file, forbidable): + continue + + forbid_include = True + + if included: + post_error(f"{dm_path} should NOT be included.") + fail_no_include = True + + if forbid_include: + continue + + if not included: + if(dm_path == file_reference_basename): + continue + + if(dm_path in excluded_files): + continue + + post_error(f"Missing include for {dm_path}.") + fail_no_include = True + +if fail_no_include: + sys.exit(1) + +def compare_lines(a, b): + # Remove initial include as well as the final quotation mark + a = a[len("#include \""):-1].lower() + b = b[len("#include \""):-1].lower() + + split_by_period = a.split('.') + a_suffix = "" + if len(split_by_period) >= 2: + a_suffix = split_by_period[len(split_by_period) - 1] + split_by_period = b.split('.') + b_suffix = "" + if len(split_by_period) >= 2: + b_suffix = split_by_period[len(split_by_period) - 1] + + a_segments = a.split('\\') + b_segments = b.split('\\') + + for (a_segment, b_segment) in zip(a_segments, b_segments): + a_is_file = a_segment.endswith(file_extensions) + b_is_file = b_segment.endswith(file_extensions) + + # code\something.dm will ALWAYS come before code\directory\something.dm + if a_is_file and not b_is_file: + return -1 + + if b_is_file and not a_is_file: + return 1 + + # interface\something.dm will ALWAYS come after code\something.dm + if a_segment != b_segment: + # if we're at the end of a compare, then this is about the file name + # files with longer suffixes come after ones with shorter ones + if a_suffix != b_suffix: + return (a_suffix > b_suffix) - (a_suffix < b_suffix) + return (a_segment > b_segment) - (a_segment < b_segment) + + print(f"Two lines were exactly the same ({a} vs. {b})") + sys.exit(1) + +sorted_lines = sorted(lines, key = functools.cmp_to_key(compare_lines)) +for (index, line) in enumerate(lines): + if sorted_lines[index] != line: + post_error(f"The include at line {index + offset} is out of order ({line}, expected {sorted_lines[index]})") + sys.exit(1) + +print(green(f"Ticked File Enforcement: [{file_reference}] All includes (for {len(scannable_files)} scanned files) are in order!")) From 765b1a5d265da01d90fc7c66bb995dd1ffaa6e33 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 14:47:55 +0100 Subject: [PATCH 022/266] Fixes references to TGstation isntead of Beestation --- .github/workflows/ci_suite.yml | 2 +- tools/expand_filedir_paths.py | 6 +++--- tools/ticked_file_enforcement/schemas/beestation_dme.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_suite.yml b/.github/workflows/ci_suite.yml index 2be8bf46dee94..2c337da945a2b 100644 --- a/.github/workflows/ci_suite.yml +++ b/.github/workflows/ci_suite.yml @@ -85,7 +85,7 @@ jobs: bash tools/ci/install_spaceman_dmm.sh dreamchecker bash tools/ci/install_ripgrep.sh tools/bootstrap/python -c '' - - name: Give Linters A Go + - name: Setup linters id: linter-setup run: ':' - name: Run Grep Checks diff --git a/tools/expand_filedir_paths.py b/tools/expand_filedir_paths.py index b58a8679398c5..db0c682562fc5 100644 --- a/tools/expand_filedir_paths.py +++ b/tools/expand_filedir_paths.py @@ -20,7 +20,7 @@ def read_filedirs(filename): result = [] dme_file = file(filename, "rt") - + # Read each line from the file and check for regex pattern match for row in dme_file: match = filedir_pattern.match(row) @@ -63,7 +63,7 @@ def replace_func(name): else: replacement = name.group(1) return "'" + replacement + "'" - + # Search recursively for all .dm and .dmm files for (dirpath, dirs, files) in os.walk("."): for name in files: @@ -88,6 +88,6 @@ def replace_func(name): os.remove(path) os.rename(path + ".tmp", path) -dirs = read_filedirs("tgstation.dme"); +dirs = read_filedirs("beestation.dme"); resources = index_files(dirs) rewrite_sources(resources) diff --git a/tools/ticked_file_enforcement/schemas/beestation_dme.json b/tools/ticked_file_enforcement/schemas/beestation_dme.json index 7fe1840d75340..5725279247936 100644 --- a/tools/ticked_file_enforcement/schemas/beestation_dme.json +++ b/tools/ticked_file_enforcement/schemas/beestation_dme.json @@ -1,5 +1,5 @@ { - "file": "tgstation.dme", + "file": "beestation.dme", "scannable_directory": "code/", "subdirectories": true, "excluded_files": [], From 85e3e1588363a89af816e807a699674bf24b9f0e Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 14:52:52 +0100 Subject: [PATCH 023/266] Create max_required_byond_client.txt Co-Authored-By: Kyle Spier-Swenson Co-Authored-By: Mothblocks <35135081+Mothblocks@users.noreply.github.com> --- .github/max_required_byond_client.txt | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/max_required_byond_client.txt diff --git a/.github/max_required_byond_client.txt b/.github/max_required_byond_client.txt new file mode 100644 index 0000000000000..86c9b22d1b04c --- /dev/null +++ b/.github/max_required_byond_client.txt @@ -0,0 +1,8 @@ +# Highest byond client version allowed to be required by the byond world. Set to 9999 to disable the check flat out. +# If the compiled world requires clients use a version higher than this, ci will fail. +# for instance: if this is set to 514, and a pr uses a 515 client feature, an alert will trigger +# If you have to update this number for your pr, you should make it VERY CLEAR in the pr body that you did so. +# (Requiring clients update to connect to the game server is not something we like to spring on them with no notice, +# especially for beta builds where the pager/updater won't let them update without additional configuration.) + +514 From 7bdf3682ac5d6d132725841deb1f428be2f28619 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 14:59:56 +0100 Subject: [PATCH 024/266] Fixes qdel in optimisation --- code/__DEFINES/zmimic.dm | 2 +- .../objects/effects/temporary_visuals/temporary_visual.dm | 2 +- code/game/objects/items/implants/implant_track.dm | 2 +- .../mob/living/simple_animal/hostile/mining_mobs/goliath.dm | 2 +- code/modules/multiz/zmimic/mimic_movable.dm | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/__DEFINES/zmimic.dm b/code/__DEFINES/zmimic.dm index a56e30be3638b..685a6870ec51c 100644 --- a/code/__DEFINES/zmimic.dm +++ b/code/__DEFINES/zmimic.dm @@ -1,6 +1,6 @@ #define TURF_IS_MIMICKING(T) (isturf(T) && (T:z_flags & Z_MIMIC_BELOW)) -#define CHECK_OO_EXISTENCE(OO) if (OO && !MOVABLE_IS_ON_ZTURF(OO) && !OO:destruction_timer) { OO:destruction_timer = QDEL_IN(OO, 10 SECONDS); } +#define CHECK_OO_EXISTENCE(OO) if (OO && !MOVABLE_IS_ON_ZTURF(OO) && !OO:destruction_timer) { OO:destruction_timer = QDEL_IN_STOPPABLE(OO, 10 SECONDS); } #define UPDATE_OO_IF_PRESENT CHECK_OO_EXISTENCE(src:bound_overlay); if (src:bound_overlay) { update_above(); } // These aren't intended to be used anywhere else, they just can't be undef'd because DM is dum. diff --git a/code/game/objects/effects/temporary_visuals/temporary_visual.dm b/code/game/objects/effects/temporary_visuals/temporary_visual.dm index 685792d250b2a..2b6699f0a140f 100644 --- a/code/game/objects/effects/temporary_visuals/temporary_visual.dm +++ b/code/game/objects/effects/temporary_visuals/temporary_visual.dm @@ -13,7 +13,7 @@ if(randomdir) setDir(pick(GLOB.cardinals)) - timerid = QDEL_IN(src, duration) + timerid = QDEL_IN_STOPPABLE(src, duration) /obj/effect/temp_visual/Destroy() . = ..() diff --git a/code/game/objects/items/implants/implant_track.dm b/code/game/objects/items/implants/implant_track.dm index 1a222cfcc960b..c5dbe1f0471b0 100644 --- a/code/game/objects/items/implants/implant_track.dm +++ b/code/game/objects/items/implants/implant_track.dm @@ -17,7 +17,7 @@ /obj/item/implant/tracking/c38/Initialize(mapload) . = ..() - timerid = QDEL_IN(src, lifespan) + timerid = QDEL_IN_STOPPABLE(src, lifespan) /obj/item/implant/tracking/c38/Destroy() deltimer(timerid) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm index 9986f606e86e2..800d667ecefe6 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm @@ -206,4 +206,4 @@ CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/goliath_tentacle/original) /obj/effect/temp_visual/goliath_tentacle/proc/retract() icon_state = "Goliath_tentacle_retract" deltimer(timerid) - timerid = QDEL_IN(src, 7) + timerid = QDEL_IN_STOPPABLE(src, 7) diff --git a/code/modules/multiz/zmimic/mimic_movable.dm b/code/modules/multiz/zmimic/mimic_movable.dm index ba4f7965fb764..dac42d19e3b37 100644 --- a/code/modules/multiz/zmimic/mimic_movable.dm +++ b/code/modules/multiz/zmimic/mimic_movable.dm @@ -19,7 +19,7 @@ SSzcopy.queued_overlays += bound_overlay bound_overlay.queued += 1 else if (bound_overlay && !bound_overlay.destruction_timer) - bound_overlay.destruction_timer = QDEL_IN(bound_overlay, 10 SECONDS) + bound_overlay.destruction_timer = QDEL_IN_STOPPABLE(bound_overlay, 10 SECONDS) // Grabs a list of every openspace mimic that's directly or indirectly copying this object. Returns an empty list if none found. /atom/movable/proc/get_associated_mimics() @@ -195,12 +195,12 @@ deltimer(destruction_timer) destruction_timer = null else if (!destruction_timer) - destruction_timer = QDEL_IN(src, 10 SECONDS) + destruction_timer = QDEL_IN_STOPPABLE(src, 10 SECONDS) // Called when the turf we're on is deleted/changed. /atom/movable/openspace/mimic/proc/owning_turf_changed() if (!destruction_timer) - destruction_timer = QDEL_IN(src, 10 SECONDS) + destruction_timer = QDEL_IN_STOPPABLE(src, 10 SECONDS) // Get actual source atom when orbiting /atom/movable/openspace/mimic/get_orbitable() From 5552886155f75ed50447344e56ee1e8cf5ac2ac1 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 15:16:00 +0100 Subject: [PATCH 025/266] I don't think we need mariaDB anymore --- tools/ci/run_server.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/ci/run_server.sh b/tools/ci/run_server.sh index 3fcb15c40bb2c..b48e7e4354faa 100755 --- a/tools/ci/run_server.sh +++ b/tools/ci/run_server.sh @@ -9,7 +9,6 @@ mkdir ci_test/config cp tools/ci/ci_config.txt ci_test/config/config.txt cd ci_test -ln -s $HOME/libmariadb/libmariadb.so libmariadb.so DreamDaemon beestation.dmb -close -trusted -verbose -params "log-directory=ci" || EXIT_CODE=$? cd .. From df66c3512e77da41aca4d128c9ad77cb4d7c1521 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 15:16:36 +0100 Subject: [PATCH 026/266] Update run_server.sh --- tools/ci/run_server.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/ci/run_server.sh b/tools/ci/run_server.sh index b48e7e4354faa..3fcb15c40bb2c 100755 --- a/tools/ci/run_server.sh +++ b/tools/ci/run_server.sh @@ -9,6 +9,7 @@ mkdir ci_test/config cp tools/ci/ci_config.txt ci_test/config/config.txt cd ci_test +ln -s $HOME/libmariadb/libmariadb.so libmariadb.so DreamDaemon beestation.dmb -close -trusted -verbose -params "log-directory=ci" || EXIT_CODE=$? cd .. From 151aa08134ef7fba7226079188ec8266f512eb60 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 15:50:03 +0100 Subject: [PATCH 027/266] Updates check_grep to include the new --- tools/ci/check_grep.sh | 332 ++++++++++++++++++++++++++++++++--------- 1 file changed, 263 insertions(+), 69 deletions(-) diff --git a/tools/ci/check_grep.sh b/tools/ci/check_grep.sh index efc665bfb5f2a..d8ce9ea3dc96e 100755 --- a/tools/ci/check_grep.sh +++ b/tools/ci/check_grep.sh @@ -2,7 +2,7 @@ set -euo pipefail #nb: must be bash to support shopt globstar -shopt -s globstar +shopt -s globstar extglob #ANSI Escape Codes for colors to increase contrast of errors RED="\033[0;31m" @@ -10,18 +10,89 @@ GREEN="\033[0;32m" BLUE="\033[0;34m" NC="\033[0m" # No Color -# Copy-pasted text -HINT_REMOVE="please remove them. (Hint: Find out which area they are in!)${NC}" - st=0 -echo -e "${BLUE}Checking for map issues...${NC}" +# check for ripgrep +if command -v rg >/dev/null 2>&1; then + grep=rg + pcre2_support=1 + if [ ! rg -P '' >/dev/null 2>&1 ] ; then + pcre2_support=0 + fi + code_files="code/**/**.dm" + map_files="_maps/**/**.dmm" + shuttle_map_files="_maps/shuttles/**.dmm" + code_x_515="code/**/!(__byond_version_compat).dm" +else + pcre2_support=0 + grep=grep + code_files="-r --include=code/**/**.dm" + map_files="-r --include=_maps/**/**.dmm" + shuttle_map_files="-r --include=_maps/shuttles/**.dmm" + code_x_515="-r --include=code/**/!(__byond_version_compat).dm" +fi -if grep -El '^\".+\" = \(.+\)' _maps/**/*.dmm; then - echo +echo -e "${BLUE}Using grep provider at $(which $grep)${NC}" + +part=0 +section() { + echo -e "${BLUE}Checking for $1${NC}..." + part=0 +} + +part() { + part=$((part+1)) + padded=$(printf "%02d" $part) + echo -e "${GREEN} $padded- $1${NC}" +} + +section "map issues" + +part "TGM" +if $grep -U '^".+" = \(.+\)' $map_files; then + echo echo -e "${RED}ERROR: Non-TGM formatted map detected. Please convert it using Map Merger!${NC}" st=1 fi; +part "comments" +if $grep '//' $map_files | $grep -v '//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE' | $grep -v 'name|desc'; then + echo + echo -e "${RED}ERROR: Unexpected commented out line detected in this map file. Please remove it.${NC}" + st=1 +fi; +part "iconstate tags" +if $grep '^\ttag = "icon' $map_files; then + echo + echo -e "${RED}ERROR: Tag vars from icon state generation detected in maps, please remove them.${NC}" + st=1 +fi; +part "invalid map procs" +if $grep '(new|newlist|icon|matrix|sound)\(.+\)' $map_files; then + echo + echo -e "${RED}ERROR: Using unsupported procs in variables in a map file! Please remove all instances of this.${NC}" + st=1 +fi; +part "common spelling mistakes" +if $grep -i 'nanotransen' $map_files; then + echo + echo -e "${RED}ERROR: Misspelling(s) of Nanotrasen detected in maps, please remove the extra N(s).${NC}" + st=1 +fi; +if $grep 'NanoTrasen' $map_files; then + echo + echo -e "${RED}ERROR: Misspelling(s) of Nanotrasen detected in maps, please uncapitalize the T(s).${NC}" + st=1 +fi; +if $grep -i'centcomm' $map_files; then + echo + echo -e "${RED}ERROR: Misspelling(s) of CentCom detected in maps, please remove the extra M(s).${NC}" + st=1 +fi; +if $grep -i'eciev' $map_files; then + echo + echo -e "${RED}ERROR: Common I-before-E typo detected in maps.${NC}" + st=1 +fi; if grep -P 'Merge Conflict Marker' _maps/**/*.dmm; then echo "ERROR: Merge conflict markers detected in map, please resolve all merge failures!" st=1 @@ -31,11 +102,6 @@ if grep -P '/obj/merge_conflict_marker' _maps/**/*.dmm; then echo "ERROR: Merge conflict markers detected in map, please resolve all merge failures!" st=1 fi; -if grep -P '^\ttag = \"icon' _maps/**/*.dmm; then - echo - echo -e "${RED}ERROR: Tag vars from icon state generation detected in maps, ${HINT_REMOVE}" - st=1 -fi; if grep -P 'step_[xy]' _maps/**/*.dmm; then echo echo -e "${RED}ERROR: step_x/step_y variables detected in maps, ${HINT_REMOVE}" @@ -51,7 +117,6 @@ if grep -P '\td[1-2] =' _maps/**/*.dmm; then echo -e "${RED}ERROR: d1/d2 cable variables detected in maps, ${HINT_REMOVE}" st=1 fi; -echo -e "${BLUE}Checking duplicate structures...${NC}" if grep -Pzo '"\w+" = \([^)]*?\n/obj/effect/mapping_helpers/simple_pipes(?[/\w]*),[^)]*?\n/obj/effect/mapping_helpers/simple_pipes\g{type},[^)]*?\n/area/.+\)' _maps/**/*.dmm; then echo echo -e "${RED}ERROR: Found multiple idendical simple_pipes mapping helpers on the same tile, ${HINT_REMOVE}" @@ -123,26 +188,6 @@ if grep -P '\W\/turf\s*[,\){]' _maps/**/*.dmm; then echo -e "${RED}ERROR: Base /turf path use detected in maps, please replace a with proper turf path.${NC}" st=1 fi; -if grep -P '^/*var/' code/**/*.dm; then - echo - echo -e "${RED}ERROR: Unmanaged global var use detected in code, please use the helpers.${NC}" - st=1 -fi; -if grep -i 'centcomm' code/**/*.dm; then - echo - echo -e "${RED}ERROR: Misspelling(s) of CentCom detected in code, please remove the extra M(s).${NC}" - st=1 -fi; -if grep -i 'centcomm' _maps/**/*.dm; then - echo - echo -e "${RED}ERROR: Misspelling(s) of CentCom detected in maps, please remove the extra M(s).${NC}" - st=1 -fi; -if grep -P 'set name\s*=\s*"[\S\s]*![\S\s]*"' code/**/*.dm; then - echo - echo -e "${RED}ERROR: Verb with name containing an exclamation point found. These verbs are not compatible with TGUI chat's statpanel or chat box.${NC}" - st=1 -fi; if grep -Pzo '"\w+" = \([^)]*?\n/turf/[/\w,\n]*?[^)]*?\n/turf/[/\w,\n]*?[^)]*?\n/area/.+?\)' _maps/**/*.dmm; then echo echo -e "${RED}ERROR: Multiple turfs detected on the same tile! Please choose only one turf!${NC}" @@ -184,61 +229,210 @@ if grep -Pzo '/obj/machinery/conveyor/inverted[/\w]*?\{\n[^}]*?dir = [1248];[^}] echo -e "${RED}ERROR: Found an inverted conveyor belt with a cardinal dir. Please replace it with a normal conveyor belt.${NC}" st=1 fi; -echo -e "${BLUE}Checking mapping JSON...${NC}" -if ls _maps/*.json | grep -P "[A-Z]"; then + +section "whitespace issues" +part "space indentation" +if $grep '(^ {2})|(^ [^ * ])|(^ +)' $code_files; then + echo + echo -e "${RED}ERROR: Space indentation detected, please use tab indentation.${NC}" + st=1 +fi; +part "mixed indentation" +if $grep '^\t+ [^ *]' $code_files; then + echo + echo -e "${RED}ERROR: Mixed indentation detected, please stick to tab indentation.${NC}" + st=1 +fi; + +section "unit tests" +unit_test_files="code/modules/unit_tests/**/**.dm" +part "mob/living/carbon/human usage" +if $grep 'allocate\(/mob/living/carbon/human[,\)]' $unit_test_files || + $grep 'new /mob/living/carbon/human\s?\(' $unit_test_files || + $grep 'var/mob/living/carbon/human/\w+\s?=\s?new' $unit_test_files ; then + echo + echo -e "${RED}ERROR: Usage of mob/living/carbon/human detected in a unit test, please use mob/living/carbon/human/consistent.${NC}" + st=1 +fi; + +section "common mistakes" +part "global vars" +if $grep '^/*var/' $code_files; then + echo + echo -e "${RED}ERROR: Unmanaged global var use detected in code, please use the helpers.${NC}" + st=1 +fi; + +part "can_perform_action argument check" +if $grep 'can_perform_action\(\s*\)' $code_files; then + echo + echo -e "${RED}ERROR: Found a can_perform_action() proc with improper arguments.${NC}" + st=1 +fi; + +part "src as a trait source" # ideally we'd lint / test for ANY datum reference as a trait source, but 'src' is the most common. +if $grep -i '(add_trait|remove_trait)\(.+,\s*.+,\s*src\)' $code_files; then + echo + echo -e "${RED}ERROR: Using 'src' as a trait source. Source must be a string key - dont't use references to datums as a source, perhaps use 'REF(src)'.${NC}" + st=1 +fi; +if $grep -i '(add_traits|remove_traits)\(.+,\s*src\)' $code_files; then + echo + echo -e "${RED}ERROR: Using 'src' as trait sources. Source must be a string key - dont't use references to datums as sources, perhaps use 'REF(src)'.${NC}" + st=1 +fi; + +part "ensure proper lowertext usage" +# lowertext() is a BYOND-level proc, so it can be used in any sort of code... including the TGS DMAPI which we don't manage in this repository. +# basically, we filter out any results with "tgs" in it to account for this edgecase without having to enforce this rule in that separate codebase. +# grepping the grep results is a bit of a sad solution to this but it's pretty much the only option in our existing linter framework +if $grep -i 'lowertext\(.+\)' $code_files | $grep -v 'UNLINT\(.+\)' | $grep -v '\/modules\/tgs\/'; then + echo + echo -e "${RED}ERROR: Found a lowertext() proc call. Please use the LOWER_TEXT() macro instead. If you know what you are doing, wrap your text (ensure it is a string) in UNLINT().${NC}" + st=1 +fi; + +part "balloon_alert sanity" +if $grep 'balloon_alert\(".*"\)' $code_files; then + echo + echo -e "${RED}ERROR: Found a balloon alert with improper arguments.${NC}" + st=1 +fi; + +if $grep 'balloon_alert(.* Date: Sat, 24 Aug 2024 16:00:20 +0100 Subject: [PATCH 028/266] Adds mapping tests --- beestation.dme | 1 + code/modules/unit_tests/mapping/map_test.dm | 38 +++++++++++++++++++++ code/modules/unit_tests/unit_test.dm | 2 +- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 code/modules/unit_tests/mapping/map_test.dm diff --git a/beestation.dme b/beestation.dme index 2baec93d208fd..50685988533df 100644 --- a/beestation.dme +++ b/beestation.dme @@ -4102,6 +4102,7 @@ #include "code\modules\tgui_panel\tgui_panel.dm" #include "code\modules\tooltip\tooltip.dm" #include "code\modules\unit_tests\_unit_tests.dm" +#include "code\modules\unit_tests\mapping\map_test.dm" #include "code\modules\uplink\uplink_devices.dm" #include "code\modules\uplink\uplink_items.dm" #include "code\modules\uplink\uplink_purchase_log.dm" diff --git a/code/modules/unit_tests/mapping/map_test.dm b/code/modules/unit_tests/mapping/map_test.dm new file mode 100644 index 0000000000000..671beb241d105 --- /dev/null +++ b/code/modules/unit_tests/mapping/map_test.dm @@ -0,0 +1,38 @@ +/datum/unit_test/map_test/Run() + var/list/failures + var/list/areas = list() + for (var/z in 1 to world.maxz) + if (!is_station_level(z)) + continue + for (var/x in 1 to world.maxx) + for (var/y in 1 to world.maxy) + var/turf/tile = locate(x, y, z) + areas[tile.loc] = TRUE + var/result = check_tile(tile, x == 1 || x == world.maxx || y == 1 || y == world.maxy) + if (result) + LAZYADD(failures, result) + for (var/area/A in areas) + var/result = check_area(A) + if (result) + LAZYADD(failures, result) + if (LAZYLEN(failures)) + TEST_FAIL(jointext(failures, "\n")) + for (var/z in 1 to world.maxz) + if (!is_station_level(z)) + continue + var/result = check_z_level(z) + if (result) + LAZYADD(failures, result) + +/// Return a string if failed, return null otherwise +/datum/unit_test/map_test/proc/check_tile(turf/T, is_map_border) + +/// Return a string if failed, return null otherwise +/datum/unit_test/map_test/proc/check_area(area/T) + +/// Return a string if failed, return null otherwise +/datum/unit_test/map_test/proc/check_z_level(z_value) + +/datum/unit_test/map_test/test/check_tile(turf/T, is_map_border) + if (istype(T, /turf/closed/wall)) + return "[T.type] detected" diff --git a/code/modules/unit_tests/unit_test.dm b/code/modules/unit_tests/unit_test.dm index 5c17a351c7a93..556bdf7df6ac2 100644 --- a/code/modules/unit_tests/unit_test.dm +++ b/code/modules/unit_tests/unit_test.dm @@ -24,7 +24,7 @@ GLOBAL_VAR_INIT(focused_tests, focused_tests()) /proc/focused_tests() var/list/focused_tests = list() - for (var/datum/unit_test/unit_test as anything in subtypesof(/datum/unit_test)) + for (var/datum/unit_test/unit_test as anything in subtypesof(/datum/unit_test) - /datum/unit_test/map_test) if (initial(unit_test.focus)) focused_tests += unit_test From f6e2d391fbb4682f519b7997f23800ddc458881b Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 16:58:40 +0100 Subject: [PATCH 029/266] Adds some mapping testers --- beestation.dme | 5 ++ code/_globalvars/lists/flavor_misc.dm | 37 ++++++++++ .../unit_tests/mapping/check_active_turfs.dm | 6 ++ .../unit_tests/mapping/check_area_apc.dm | 7 ++ .../mapping/check_camera_attachment.dm | 8 ++ .../unit_tests/mapping/check_disposals.dm | 73 +++++++++++++++++++ .../mapping/check_light_attachment.dm | 10 +++ code/modules/unit_tests/mapping/map_test.dm | 42 ++++++++--- 8 files changed, 178 insertions(+), 10 deletions(-) create mode 100644 code/modules/unit_tests/mapping/check_active_turfs.dm create mode 100644 code/modules/unit_tests/mapping/check_area_apc.dm create mode 100644 code/modules/unit_tests/mapping/check_camera_attachment.dm create mode 100644 code/modules/unit_tests/mapping/check_disposals.dm create mode 100644 code/modules/unit_tests/mapping/check_light_attachment.dm diff --git a/beestation.dme b/beestation.dme index 50685988533df..3d368fc88c1e0 100644 --- a/beestation.dme +++ b/beestation.dme @@ -4102,6 +4102,11 @@ #include "code\modules\tgui_panel\tgui_panel.dm" #include "code\modules\tooltip\tooltip.dm" #include "code\modules\unit_tests\_unit_tests.dm" +#include "code\modules\unit_tests\mapping\check_active_turfs.dm" +#include "code\modules\unit_tests\mapping\check_area_apc.dm" +#include "code\modules\unit_tests\mapping\check_camera_attachment.dm" +#include "code\modules\unit_tests\mapping\check_disposals.dm" +#include "code\modules\unit_tests\mapping\check_light_attachment.dm" #include "code\modules\unit_tests\mapping\map_test.dm" #include "code\modules\uplink\uplink_devices.dm" #include "code\modules\uplink\uplink_items.dm" diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm index a70e44d4d7912..8f2166cbe19b0 100644 --- a/code/_globalvars/lists/flavor_misc.dm +++ b/code/_globalvars/lists/flavor_misc.dm @@ -312,6 +312,43 @@ GLOBAL_LIST_INIT(TAGGERLOCATIONS, list( "Detective's Office", )) +#if defined(UNIT_TESTS) || defined(SPACEMAN_DMM) + +GLOBAL_LIST_INIT(tagger_destination_areas, list( + "Disposals" = list(/area/maintenance/disposal), + "Cargo Bay" = list(/area/quartermaster), + "QM Office" = list(/area/quartermaster/qm, /area/quartermaster/qm_bedroom), + "Engineering" = list(/area/engine, /area/engineering), + "CE Office" = list(/area/crew_quarters/heads/chief), + "Atmospherics" = list(/area/engine/atmos, /area/engine/atmospherics_engine), + "Security" = list(/area/security), + "HoS Office" = list(/area/crew_quarters/heads/hos), + "Medbay" = list(/area/medical), + "CMO Office" = list(/area/crew_quarters/heads/cmo), + "Chemistry" = list(/area/medical/chemistry), + "Research" = list(/area/science), + "RD Office" = list(/area/crew_quarters/heads/hor), + "Robotics" = list(/area/science/robotics), + "HoP Office" = list(/area/crew_quarters/heads/hop), + "Library" = list(/area/library), + "Chapel" = list(/area/chapel), + "Theatre" = list(/area/crew_quarters/theatre), + "Bar" = list(/area/crew_quarters/bar), + "Kitchen" = list(/area/crew_quarters/kitchen), + "Hydroponics" = list(/area/hydroponics), + "Janitor Closet" = list(/area/janitor), + "Genetics" = list(/area/medical/genetics), + "Testing Range" = list(/area/science/misc_lab, /area/science/test_area, /area/science/mixing), + "Toxins" = list(/area/science/misc_lab, /area/science/test_area, /area/science/mixing), + "Dormitories" = list(/area/crew_quarters/dorms, /area/commons/dorms), + "Virology" = list(/area/medical/virology), + "Xenobiology" = list(/area/science/xenobiology), + "Law Office" = list(/area/lawoffice), + "Detective's Office" = list(/area/security/detectives_office), +)) + +#endif + GLOBAL_LIST_INIT(station_prefixes, world.file2list("strings/station_prefixes.txt") + "") GLOBAL_LIST_INIT(station_names, world.file2list("strings/station_names.txt") + "") diff --git a/code/modules/unit_tests/mapping/check_active_turfs.dm b/code/modules/unit_tests/mapping/check_active_turfs.dm new file mode 100644 index 0000000000000..12a4d26641fa6 --- /dev/null +++ b/code/modules/unit_tests/mapping/check_active_turfs.dm @@ -0,0 +1,6 @@ +/datum/unit_test/map_test/active_turfs/check_map() + var/list/failures = list() + for(var/turf/t in GLOB.active_turfs_startlist) + failures += "Roundstart active turf at ([t.x], [t.y], [t.z] in [t.loc])" + if (length(failures)) + TEST_FAIL(jointext(failures, "\n")) diff --git a/code/modules/unit_tests/mapping/check_area_apc.dm b/code/modules/unit_tests/mapping/check_area_apc.dm new file mode 100644 index 0000000000000..67906357b27c5 --- /dev/null +++ b/code/modules/unit_tests/mapping/check_area_apc.dm @@ -0,0 +1,7 @@ +/datum/unit_test/map_test/apc/check_area(area/check_area) + if (!check_area.requires_power) + return + if (!check_area.apc && !check_area.always_unpowered) + return "No APC in an area that requires power" + if (check_area.apc && check_area.always_unpowered) + return "APC found in an always unpowered area" diff --git a/code/modules/unit_tests/mapping/check_camera_attachment.dm b/code/modules/unit_tests/mapping/check_camera_attachment.dm new file mode 100644 index 0000000000000..a74a2ac3a52d9 --- /dev/null +++ b/code/modules/unit_tests/mapping/check_camera_attachment.dm @@ -0,0 +1,8 @@ +/datum/unit_test/map_test/camera/check_turf(turf/check_turf, is_map_border) + var/found = FALSE + for (var/obj/machinery/camera/camera in check_turf) + if (found) + return "Multiple cameras detected" + if (!isclosedturf(get_step(check_turf, camera.dir))) + return "Camera not attached to a wall" + found = TRUE diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm new file mode 100644 index 0000000000000..0965752758a43 --- /dev/null +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -0,0 +1,73 @@ +/obj/structure/disposalpipe/var/_traversed = 0 + +/datum/unit_test/map_test/check_disposals + var/failure_reason + var/is_sorting_network + +// Find all entries into the disposal system +/datum/unit_test/map_test/check_disposals/collect_targets(list/turfs) + var/located = list() + for (var/turf/check_turf in turfs) + var/found = locate(/obj/machinery/disposal) + if (found) + located += found + return located + +// Make sure that we can end up in the correct location +/datum/unit_test/map_test/check_disposals/check_target(obj/machinery/disposal/target) + var/list/failures = list() + failure_reason = null + is_sorting_network = FALSE + if (!target.trunk) + return "[target.name] not attached to a trunk" + // Create a terrible disposal holder object + var/obj/structure/disposalholder/holder = new() + traverse_loop(target.trunk, holder) + // Abuse byonds variables to get out (We can use pointers as an out variable in 515) + if (failure_reason) + failures += failure_reason + // This is fine, we probably are a bin that leads to space or something + if (!is_sorting_network) + return failures + holder.last_pipe = null + holder.current_pipe = null + failure_reason = null + // Since we have filters, lets make sure this is a proper, fully connected and fully functioning loop + // We should be able to enter the loop at any point from an input gate to get to our destination + for (var/sort_code in GLOB.TAGGERLOCATIONS) + holder.destinationTag = sort_code + var/obj/structure/disposaloutlet/destination = traverse_loop(target.trunk, holder) + if (failure_reason) + return failure_reason + var/arrived = FALSE + for (var/valid_destination in GLOB.tagger_destination_areas[sort_code]) + if (istype(get_area(destination), valid_destination)) + arrived = TRUE + break + if (!arrived) + failures += "Disposal track starting at [COORD(target)] does not end up in the correct destination. Expected [sort_code], got [get_area(destination)] at [COORD(destination)]" + return failures + +/datum/unit_test/map_test/check_disposals/proc/traverse_loop(obj/structure/disposalholder/holder, obj/structure/disposalpipe/start) + // First check to ensure that we end up somewhere + var/obj/structure/disposalpipe/current = holder + while (current) + holder.current_pipe = current + var/turf/T = get_step(current, current.nextdir(holder)) + current = locate(/obj/structure/disposalpipe) in T + // Found a valid ending + if (locate(/obj/structure/disposaloutlet) in T) + return locate(/obj/structure/disposaloutlet) + // Detect ending back at an input + if (locate(/obj/machinery/disposal) in T) + failure_reason = "Disposal loop starting at [COORD(start)] leads to an input node at [COORD(T)] but should lead to an outlet" + if (locate(/obj/structure/disposalpipe/sorting)) + is_sorting_network = TRUE + // End detection + if (current == null) + failure_reason = "Disposal network starting at [COORD(start)] has a pipe with no output at [COORD(T)] but should lead to an outlet" + // Loop detection + if (current._traversed == 1) + failure_reason = "Disposal network starting at [COORD(start)] contains a loop at [COORD(T)] which is not allowed" + current._traversed = 1 + holder.last_pipe = current diff --git a/code/modules/unit_tests/mapping/check_light_attachment.dm b/code/modules/unit_tests/mapping/check_light_attachment.dm new file mode 100644 index 0000000000000..ec22c1844be10 --- /dev/null +++ b/code/modules/unit_tests/mapping/check_light_attachment.dm @@ -0,0 +1,10 @@ +/datum/unit_test/map_test/lights/check_turf(turf/check_turf, is_map_border) + var/found = FALSE + for (var/obj/machinery/light/light in check_turf) + if (istype(light, /obj/machinery/light/floor)) + continue + if (found) + return "Multiple lights detected" + if (!isclosedturf(get_step(check_turf, light.dir))) + return "Light not attached to a wall" + found = TRUE diff --git a/code/modules/unit_tests/mapping/map_test.dm b/code/modules/unit_tests/mapping/map_test.dm index 671beb241d105..88f9ea0f4edbb 100644 --- a/code/modules/unit_tests/mapping/map_test.dm +++ b/code/modules/unit_tests/mapping/map_test.dm @@ -1,38 +1,60 @@ /datum/unit_test/map_test/Run() var/list/failures var/list/areas = list() + var/list/turfs = list() + // Check turfs for (var/z in 1 to world.maxz) if (!is_station_level(z)) continue for (var/x in 1 to world.maxx) for (var/y in 1 to world.maxy) var/turf/tile = locate(x, y, z) + turfs += tile areas[tile.loc] = TRUE - var/result = check_tile(tile, x == 1 || x == world.maxx || y == 1 || y == world.maxy) + var/result = check_turf(tile, x == 1 || x == world.maxx || y == 1 || y == world.maxy) if (result) - LAZYADD(failures, result) + LAZYADD(failures, "([x], [y], [z]): [result]") + // Check areas for (var/area/A in areas) var/result = check_area(A) if (result) - LAZYADD(failures, result) - if (LAZYLEN(failures)) - TEST_FAIL(jointext(failures, "\n")) + LAZYADD(failures, "([A.type]): [result]") + // Check Zs for (var/z in 1 to world.maxz) if (!is_station_level(z)) continue var/result = check_z_level(z) if (result) LAZYADD(failures, result) + // Get things we want to specifically test for + var/list/targets = collect_targets(turfs) + for (var/target in targets) + var/result = check_target(target) + if (result) + LAZYADD(failures, result) + // Full map general checks + var/result = check_map() + if (result) + LAZYADD(failures, result) + // Fail if necessary + if (LAZYLEN(failures)) + TEST_FAIL(jointext(failures, "\n")) + +/// Return a string if failed, return null otherwise +/datum/unit_test/map_test/proc/check_turf(turf/check_turf, is_map_border) /// Return a string if failed, return null otherwise -/datum/unit_test/map_test/proc/check_tile(turf/T, is_map_border) +/datum/unit_test/map_test/proc/check_map(turf/check_turf, is_map_border) /// Return a string if failed, return null otherwise -/datum/unit_test/map_test/proc/check_area(area/T) +/datum/unit_test/map_test/proc/check_area(area/check_area) /// Return a string if failed, return null otherwise /datum/unit_test/map_test/proc/check_z_level(z_value) -/datum/unit_test/map_test/test/check_tile(turf/T, is_map_border) - if (istype(T, /turf/closed/wall)) - return "[T.type] detected" +/// Returns a list of things that you want to specifically check +/datum/unit_test/map_test/proc/collect_targets(list/turfs) + return list() + +/// Return a string if failed, return null otherwise +/datum/unit_test/map_test/proc/check_target(atom/target) From b29c69c027b36ac578449c7636dadbfe746835ed Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 17:07:47 +0100 Subject: [PATCH 030/266] Disables create and destroy --- code/modules/unit_tests/_unit_tests.dm | 2 +- code/modules/unit_tests/mapping/map_test.dm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/unit_tests/_unit_tests.dm b/code/modules/unit_tests/_unit_tests.dm index ccc2128bbbd11..09f59dad5e8a9 100644 --- a/code/modules/unit_tests/_unit_tests.dm +++ b/code/modules/unit_tests/_unit_tests.dm @@ -97,7 +97,7 @@ #include "component_tests.dm" #include "connect_loc.dm" #include "crafting_tests.dm" -#include "create_and_destroy.dm" +//#include "create_and_destroy.dm" #include "dcs_get_id_from_elements.dm" #include "dynamic_ruleset_sanity.dm" #include "enumerables.dm" diff --git a/code/modules/unit_tests/mapping/map_test.dm b/code/modules/unit_tests/mapping/map_test.dm index 88f9ea0f4edbb..e3c525411c16c 100644 --- a/code/modules/unit_tests/mapping/map_test.dm +++ b/code/modules/unit_tests/mapping/map_test.dm @@ -43,15 +43,15 @@ /// Return a string if failed, return null otherwise /datum/unit_test/map_test/proc/check_turf(turf/check_turf, is_map_border) -/// Return a string if failed, return null otherwise -/datum/unit_test/map_test/proc/check_map(turf/check_turf, is_map_border) - /// Return a string if failed, return null otherwise /datum/unit_test/map_test/proc/check_area(area/check_area) /// Return a string if failed, return null otherwise /datum/unit_test/map_test/proc/check_z_level(z_value) +/// Return a string if failed, return null otherwise +/datum/unit_test/map_test/proc/check_map() + /// Returns a list of things that you want to specifically check /datum/unit_test/map_test/proc/collect_targets(list/turfs) return list() From a1b8724b3c480f94c6a63fde8a5da39f8821d295 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 17:09:41 +0100 Subject: [PATCH 031/266] Update run_server.sh Co-Authored-By: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-Authored-By: Jordan Dominion Co-Authored-By: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-Authored-By: Tastyfish <1185434+Tastyfish@users.noreply.github.com> --- tools/ci/run_server.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tools/ci/run_server.sh b/tools/ci/run_server.sh index 3fcb15c40bb2c..baf172d8ec3d8 100755 --- a/tools/ci/run_server.sh +++ b/tools/ci/run_server.sh @@ -1,16 +1,26 @@ #!/bin/bash set -euo pipefail -EXIT_CODE=0 + +MAP=$1 + +echo Testing $MAP tools/deploy.sh ci_test mkdir ci_test/config +mkdir ci_test/data #test config cp tools/ci/ci_config.txt ci_test/config/config.txt +#set the map +cp _maps/$MAP.json ci_test/data/next_map.json + cd ci_test -ln -s $HOME/libmariadb/libmariadb.so libmariadb.so -DreamDaemon beestation.dmb -close -trusted -verbose -params "log-directory=ci" || EXIT_CODE=$? +DreamDaemon tgstation.dmb -close -trusted -verbose -params "log-directory=ci" cd .. + +mkdir -p data/screenshots_new +cp -r ci_test/data/screenshots_new data/screenshots_new + cat ci_test/data/logs/ci/clean_run.lk From b7b3f4a9b526f9b79c52a70a03118b82bd788d4e Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 17:12:36 +0100 Subject: [PATCH 032/266] Fixes compilation --- beestation.dme | 2 +- .../unit_tests/{ => _DEFINES}/_unit_tests.dm | 100 +++++++++--------- 2 files changed, 51 insertions(+), 51 deletions(-) rename code/modules/unit_tests/{ => _DEFINES}/_unit_tests.dm (72%) diff --git a/beestation.dme b/beestation.dme index 3d368fc88c1e0..bba7ba548e50f 100644 --- a/beestation.dme +++ b/beestation.dme @@ -4101,7 +4101,7 @@ #include "code\modules\tgui_panel\telemetry.dm" #include "code\modules\tgui_panel\tgui_panel.dm" #include "code\modules\tooltip\tooltip.dm" -#include "code\modules\unit_tests\_unit_tests.dm" +#include "code\modules\unit_tests\_DEFINES\_unit_tests.dm" #include "code\modules\unit_tests\mapping\check_active_turfs.dm" #include "code\modules\unit_tests\mapping\check_area_apc.dm" #include "code\modules\unit_tests\mapping\check_camera_attachment.dm" diff --git a/code/modules/unit_tests/_unit_tests.dm b/code/modules/unit_tests/_DEFINES/_unit_tests.dm similarity index 72% rename from code/modules/unit_tests/_unit_tests.dm rename to code/modules/unit_tests/_DEFINES/_unit_tests.dm index 09f59dad5e8a9..01bbbaa0423d8 100644 --- a/code/modules/unit_tests/_unit_tests.dm +++ b/code/modules/unit_tests/_DEFINES/_unit_tests.dm @@ -84,58 +84,58 @@ /// A trait source when adding traits through unit tests #define TRAIT_SOURCE_UNIT_TESTS "unit_tests" -#include "achievement_validation.dm" -#include "anchored_mobs.dm" -#include "antag_datums.dm" -#include "area_contents.dm" -#include "armour_checks.dm" -#include "asset_smart_cache.dm" -#include "async.dm" -#include "bloody_footprints.dm" -#include "check_adjustable_clothing.dm" -#include "closets.dm" -#include "component_tests.dm" -#include "connect_loc.dm" -#include "crafting_tests.dm" -//#include "create_and_destroy.dm" -#include "dcs_get_id_from_elements.dm" -#include "dynamic_ruleset_sanity.dm" -#include "enumerables.dm" -#include "gamemode_sanity.dm" -#include "keybinding_init.dm" -#include "rcd.dm" -#include "reagent_id_typos.dm" -#include "reagent_recipe_collisions.dm" -#include "siunit.dm" -#include "shuttle_width_height_correctness.dm" -#include "spawn_humans.dm" -#include "species_whitelists.dm" -#include "food_edibility_check.dm" -#include "greyscale_config.dm" -#include "heretic_knowledge.dm" -#include "heretic_rituals.dm" -#include "icon_smoothing_unit_test.dm" -#include "merge_type.dm" -#include "metabolizing.dm" -#include "missing_icons.dm" -#include "ntnetwork_tests.dm" -#include "preference_species.dm" -#include "projectiles.dm" -#include "stat_mc.dm" -#include "subsystem_init.dm" -#include "subsystem_metric_sanity.dm" -#include "surgery_linking.dm" -#include "techweb_sanity.dm" -#include "teleporters.dm" -#include "tgui_create_message.dm" -#include "timer_sanity.dm" -#include "unit_test.dm" -#include "random_ruin_mapsize.dm" -#include "walls_have_sheets.dm" -#include "worn_icons.dm" +#include "../achievement_validation.dm" +#include "../anchored_mobs.dm" +#include "../antag_datums.dm" +#include "../area_contents.dm" +#include "../armour_checks.dm" +#include "../asset_smart_cache.dm" +#include "../async.dm" +#include "../bloody_footprints.dm" +#include "../check_adjustable_clothing.dm" +#include "../closets.dm" +#include "../component_tests.dm" +#include "../connect_loc.dm" +#include "../crafting_tests.dm" +//#include "../create_and_destroy.dm" +#include "../dcs_get_id_from_elements.dm" +#include "../dynamic_ruleset_sanity.dm" +#include "../enumerables.dm" +#include "../gamemode_sanity.dm" +#include "../keybinding_init.dm" +#include "../rcd.dm" +#include "../reagent_id_typos.dm" +#include "../reagent_recipe_collisions.dm" +#include "../siunit.dm" +#include "../shuttle_width_height_correctness.dm" +#include "../spawn_humans.dm" +#include "../species_whitelists.dm" +#include "../food_edibility_check.dm" +#include "../greyscale_config.dm" +#include "../heretic_knowledge.dm" +#include "../heretic_rituals.dm" +#include "../icon_smoothing_unit_test.dm" +#include "../merge_type.dm" +#include "../metabolizing.dm" +#include "../missing_icons.dm" +#include "../ntnetwork_tests.dm" +#include "../preference_species.dm" +#include "../projectiles.dm" +#include "../stat_mc.dm" +#include "../subsystem_init.dm" +#include "../subsystem_metric_sanity.dm" +#include "../surgery_linking.dm" +#include "../techweb_sanity.dm" +#include "../teleporters.dm" +#include "../tgui_create_message.dm" +#include "../timer_sanity.dm" +#include "../unit_test.dm" +#include "../random_ruin_mapsize.dm" +#include "../walls_have_sheets.dm" +#include "../worn_icons.dm" #ifdef REFERENCE_TRACKING_DEBUG //Don't try and parse this file if ref tracking isn't turned on. IE: don't parse ref tracking please mr linter -#include "find_reference_sanity.dm" +#include "../find_reference_sanity.dm" #endif #undef TEST_ASSERT From 4e0fab2a904fd14fe6790b46cd7981fafffa2816 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 17:15:49 +0100 Subject: [PATCH 033/266] Fixes compilation issues --- beestation.dme | 5 ----- code/modules/unit_tests/_DEFINES/_unit_tests.dm | 8 ++++++++ tools/ci/run_server.sh | 4 ++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/beestation.dme b/beestation.dme index bba7ba548e50f..b04fb4fbd8e51 100644 --- a/beestation.dme +++ b/beestation.dme @@ -4103,11 +4103,6 @@ #include "code\modules\tooltip\tooltip.dm" #include "code\modules\unit_tests\_DEFINES\_unit_tests.dm" #include "code\modules\unit_tests\mapping\check_active_turfs.dm" -#include "code\modules\unit_tests\mapping\check_area_apc.dm" -#include "code\modules\unit_tests\mapping\check_camera_attachment.dm" -#include "code\modules\unit_tests\mapping\check_disposals.dm" -#include "code\modules\unit_tests\mapping\check_light_attachment.dm" -#include "code\modules\unit_tests\mapping\map_test.dm" #include "code\modules\uplink\uplink_devices.dm" #include "code\modules\uplink\uplink_items.dm" #include "code\modules\uplink\uplink_purchase_log.dm" diff --git a/code/modules/unit_tests/_DEFINES/_unit_tests.dm b/code/modules/unit_tests/_DEFINES/_unit_tests.dm index 01bbbaa0423d8..15987f3ccf2bb 100644 --- a/code/modules/unit_tests/_DEFINES/_unit_tests.dm +++ b/code/modules/unit_tests/_DEFINES/_unit_tests.dm @@ -133,11 +133,19 @@ #include "../random_ruin_mapsize.dm" #include "../walls_have_sheets.dm" #include "../worn_icons.dm" +#include "../worn_icons.dm" #ifdef REFERENCE_TRACKING_DEBUG //Don't try and parse this file if ref tracking isn't turned on. IE: don't parse ref tracking please mr linter #include "../find_reference_sanity.dm" #endif +#include "../mapping/check_active_turfs.dm" +#include "../mapping/check_area_apc.dm" +#include "../mapping/check_camera_attachment.dm" +#include "../mapping/check_disposals.dm" +#include "../mapping/check_light_attachment.dm" +#include "../mapping/map_test.dm" + #undef TEST_ASSERT #undef TEST_ASSERT_EQUAL #undef TEST_ASSERT_NOTEQUAL diff --git a/tools/ci/run_server.sh b/tools/ci/run_server.sh index baf172d8ec3d8..3e4ed7948687c 100755 --- a/tools/ci/run_server.sh +++ b/tools/ci/run_server.sh @@ -6,8 +6,8 @@ MAP=$1 echo Testing $MAP tools/deploy.sh ci_test -mkdir ci_test/config -mkdir ci_test/data +mkdir -p ci_test/config +mkdir -p ci_test/data #test config cp tools/ci/ci_config.txt ci_test/config/config.txt From 1de38314943723ab7af56f3c68f36df0da701d45 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 17:18:43 +0100 Subject: [PATCH 034/266] Corrects the DME target --- beestation.dme | 1 - tools/ci/run_server.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/beestation.dme b/beestation.dme index b04fb4fbd8e51..2b18d04f66737 100644 --- a/beestation.dme +++ b/beestation.dme @@ -4102,7 +4102,6 @@ #include "code\modules\tgui_panel\tgui_panel.dm" #include "code\modules\tooltip\tooltip.dm" #include "code\modules\unit_tests\_DEFINES\_unit_tests.dm" -#include "code\modules\unit_tests\mapping\check_active_turfs.dm" #include "code\modules\uplink\uplink_devices.dm" #include "code\modules\uplink\uplink_items.dm" #include "code\modules\uplink\uplink_purchase_log.dm" diff --git a/tools/ci/run_server.sh b/tools/ci/run_server.sh index 3e4ed7948687c..ec50deb600d3d 100755 --- a/tools/ci/run_server.sh +++ b/tools/ci/run_server.sh @@ -16,7 +16,7 @@ cp tools/ci/ci_config.txt ci_test/config/config.txt cp _maps/$MAP.json ci_test/data/next_map.json cd ci_test -DreamDaemon tgstation.dmb -close -trusted -verbose -params "log-directory=ci" +DreamDaemon beestation.dmb -close -trusted -verbose -params "log-directory=ci" cd .. From 23ec4ba3337c99ba18cb2e441ce4e839bd3eb8b9 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 17:24:55 +0100 Subject: [PATCH 035/266] Removes auxmos temporarilly --- .github/workflows/run_integration_tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_integration_tests.yml b/.github/workflows/run_integration_tests.yml index 43eeda344d694..9c27f928a0b71 100644 --- a/.github/workflows/run_integration_tests.yml +++ b/.github/workflows/run_integration_tests.yml @@ -48,9 +48,9 @@ jobs: # - name: Install dreamluau # run: | # bash tools/ci/install_dreamluau.sh - - name: Install auxmos - run: | - bash tools/ci/install_auxmos.sh +# - name: Install auxmos +# run: | +# bash tools/ci/install_auxmos.sh - name: Configure version run: | echo "BYOND_MAJOR=${{ inputs.major }}" >> $GITHUB_ENV From 8987cf9c2574c5c83b735172f0d8396ca1312377 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 17:29:30 +0100 Subject: [PATCH 036/266] Revert "Removes auxmos temporarilly" This reverts commit 4c42c82126a4ac5156cd0042b91ee6f33553755c. --- .github/workflows/run_integration_tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_integration_tests.yml b/.github/workflows/run_integration_tests.yml index 9c27f928a0b71..43eeda344d694 100644 --- a/.github/workflows/run_integration_tests.yml +++ b/.github/workflows/run_integration_tests.yml @@ -48,9 +48,9 @@ jobs: # - name: Install dreamluau # run: | # bash tools/ci/install_dreamluau.sh -# - name: Install auxmos -# run: | -# bash tools/ci/install_auxmos.sh + - name: Install auxmos + run: | + bash tools/ci/install_auxmos.sh - name: Configure version run: | echo "BYOND_MAJOR=${{ inputs.major }}" >> $GITHUB_ENV From 7d86f9656e9c83ae2189f83763a1e291ccf29580 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 17:29:38 +0100 Subject: [PATCH 037/266] Disables restore_atmos --- code/modules/unit_tests/unit_test.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/unit_tests/unit_test.dm b/code/modules/unit_tests/unit_test.dm index 556bdf7df6ac2..f3db0ebddb8e7 100644 --- a/code/modules/unit_tests/unit_test.dm +++ b/code/modules/unit_tests/unit_test.dm @@ -114,10 +114,10 @@ GLOBAL_VAR_INIT(focused_tests, focused_tests()) /// Resets the air of our testing room to its default /datum/unit_test/proc/restore_atmos() - var/area/working_area = run_loc_floor_bottom_left.loc - var/list/turf/to_restore = working_area.get_contained_turfs() - for(var/turf/open/restore in to_restore) - restore.Initalize_Atmos() + //var/area/working_area = run_loc_floor_bottom_left.loc + //var/list/turf/to_restore = working_area.get_contained_turfs() + //for(var/turf/open/restore in to_restore) + // restore.Initalize_Atmos() /datum/unit_test/proc/test_screenshot(name, icon/icon) if (!istype(icon)) From b8279f9956fc110faad2de531e2483b324132bf0 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 24 Aug 2024 17:32:50 +0100 Subject: [PATCH 038/266] Re-enables atmos reset --- code/modules/unit_tests/unit_test.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/unit_tests/unit_test.dm b/code/modules/unit_tests/unit_test.dm index f3db0ebddb8e7..556bdf7df6ac2 100644 --- a/code/modules/unit_tests/unit_test.dm +++ b/code/modules/unit_tests/unit_test.dm @@ -114,10 +114,10 @@ GLOBAL_VAR_INIT(focused_tests, focused_tests()) /// Resets the air of our testing room to its default /datum/unit_test/proc/restore_atmos() - //var/area/working_area = run_loc_floor_bottom_left.loc - //var/list/turf/to_restore = working_area.get_contained_turfs() - //for(var/turf/open/restore in to_restore) - // restore.Initalize_Atmos() + var/area/working_area = run_loc_floor_bottom_left.loc + var/list/turf/to_restore = working_area.get_contained_turfs() + for(var/turf/open/restore in to_restore) + restore.Initalize_Atmos() /datum/unit_test/proc/test_screenshot(name, icon/icon) if (!istype(icon)) From cbe64d0d18b9a7e9756e93c7c19ad65d7f810cf6 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 11:52:12 +0100 Subject: [PATCH 039/266] Fixes crashing issues --- code/__HELPERS/test_helpers.dm | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/code/__HELPERS/test_helpers.dm b/code/__HELPERS/test_helpers.dm index 29b51e7ceba10..759fe6a1fb71d 100644 --- a/code/__HELPERS/test_helpers.dm +++ b/code/__HELPERS/test_helpers.dm @@ -4,16 +4,23 @@ /// It is appreciated to add the reason why the atom shouldn't be initialized if you add it to this list. /datum/unit_test/proc/build_list_of_uncreatables() RETURN_TYPE(/list) - return list() - -#define CREATION_TEST_IGNORE_SELF(path)/datum/unit_test/build_list_of_uncreatables() {\ - . = ..();\ - . += path;\ + var/list/output = list() + for (var/type in subtypesof(/datum/ignore_type)) + var/datum/ignore_type/temp = new() + temp.add_ignores(output) + return output + +// Extension procs crash byond with enough of them due to stack overflows, this allows us to do it +// without traversing the stack +/datum/ignore_type/proc/add_ignores(list/target) + return + +#define CREATION_TEST_IGNORE_SELF(path)/datum/ignore_type/##path/add_ignores(list/target) {\ + target += path;\ } -#define CREATION_TEST_IGNORE_SUBTYPES(path)/datum/unit_test/build_list_of_uncreatables() {\ - . = ..();\ - . += typesof(path);\ +#define CREATION_TEST_IGNORE_SUBTYPES(path)/datum/ignore_type/##path/add_ignores(list/target) {\ + target += typesof(path);\ } // Annoyingly, dview is defined inside of _DEFINES, so we are doing it here From ceaa78cf8321108c77e1c3b5c9efc4e88c40fc61 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 11:57:56 +0100 Subject: [PATCH 040/266] Fixes issue with disposal unit test check --- code/modules/unit_tests/mapping/check_disposals.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index 0965752758a43..c06420683e00b 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -22,7 +22,7 @@ return "[target.name] not attached to a trunk" // Create a terrible disposal holder object var/obj/structure/disposalholder/holder = new() - traverse_loop(target.trunk, holder) + traverse_loop(holder, target.trunk) // Abuse byonds variables to get out (We can use pointers as an out variable in 515) if (failure_reason) failures += failure_reason @@ -36,7 +36,7 @@ // We should be able to enter the loop at any point from an input gate to get to our destination for (var/sort_code in GLOB.TAGGERLOCATIONS) holder.destinationTag = sort_code - var/obj/structure/disposaloutlet/destination = traverse_loop(target.trunk, holder) + var/obj/structure/disposaloutlet/destination = traverse_loop(holder, target.trunk) if (failure_reason) return failure_reason var/arrived = FALSE From 22bd55c61ed5c95bf7b35332d05f7f8ff1605845 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 12:02:48 +0100 Subject: [PATCH 041/266] Another correction in disposal tests --- code/modules/unit_tests/mapping/check_disposals.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index c06420683e00b..0de99a605cb16 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -50,7 +50,7 @@ /datum/unit_test/map_test/check_disposals/proc/traverse_loop(obj/structure/disposalholder/holder, obj/structure/disposalpipe/start) // First check to ensure that we end up somewhere - var/obj/structure/disposalpipe/current = holder + var/obj/structure/disposalpipe/current = start while (current) holder.current_pipe = current var/turf/T = get_step(current, current.nextdir(holder)) From 39687c3b54bad0de19f7883ccdcae644ae28721d Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 12:17:19 +0100 Subject: [PATCH 042/266] Fixes infinite loop check --- code/modules/unit_tests/mapping/check_disposals.dm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index 0de99a605cb16..a8e17f4800b0b 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -22,7 +22,7 @@ return "[target.name] not attached to a trunk" // Create a terrible disposal holder object var/obj/structure/disposalholder/holder = new() - traverse_loop(holder, target.trunk) + traverse_loop(holder, target.trunk, "default") // Abuse byonds variables to get out (We can use pointers as an out variable in 515) if (failure_reason) failures += failure_reason @@ -36,7 +36,7 @@ // We should be able to enter the loop at any point from an input gate to get to our destination for (var/sort_code in GLOB.TAGGERLOCATIONS) holder.destinationTag = sort_code - var/obj/structure/disposaloutlet/destination = traverse_loop(holder, target.trunk) + var/obj/structure/disposaloutlet/destination = traverse_loop(holder, target.trunk, sort_code) if (failure_reason) return failure_reason var/arrived = FALSE @@ -48,13 +48,16 @@ failures += "Disposal track starting at [COORD(target)] does not end up in the correct destination. Expected [sort_code], got [get_area(destination)] at [COORD(destination)]" return failures -/datum/unit_test/map_test/check_disposals/proc/traverse_loop(obj/structure/disposalholder/holder, obj/structure/disposalpipe/start) +/datum/unit_test/map_test/check_disposals/proc/traverse_loop(obj/structure/disposalholder/holder, obj/structure/disposalpipe/start, run_id) // First check to ensure that we end up somewhere var/obj/structure/disposalpipe/current = start while (current) holder.current_pipe = current var/turf/T = get_step(current, current.nextdir(holder)) current = locate(/obj/structure/disposalpipe) in T + if (holder.current_pipe == current) + failure_reason = "Pipenet for some reason returned own pipe as the next direction when traversing a [current.type] at [COORD(current)]." + return // Found a valid ending if (locate(/obj/structure/disposaloutlet) in T) return locate(/obj/structure/disposaloutlet) @@ -67,7 +70,7 @@ if (current == null) failure_reason = "Disposal network starting at [COORD(start)] has a pipe with no output at [COORD(T)] but should lead to an outlet" // Loop detection - if (current._traversed == 1) + if (current._traversed == run_id) failure_reason = "Disposal network starting at [COORD(start)] contains a loop at [COORD(T)] which is not allowed" - current._traversed = 1 + current._traversed = run_id holder.last_pipe = current From 0baba2100e7e9d7a7e18273479d61628cb867917 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 12:18:41 +0100 Subject: [PATCH 043/266] Correctly return when we encounter an error --- code/modules/unit_tests/mapping/check_disposals.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index a8e17f4800b0b..09d0fe457c7cc 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -64,13 +64,16 @@ // Detect ending back at an input if (locate(/obj/machinery/disposal) in T) failure_reason = "Disposal loop starting at [COORD(start)] leads to an input node at [COORD(T)] but should lead to an outlet" + return if (locate(/obj/structure/disposalpipe/sorting)) is_sorting_network = TRUE // End detection if (current == null) failure_reason = "Disposal network starting at [COORD(start)] has a pipe with no output at [COORD(T)] but should lead to an outlet" + return // Loop detection if (current._traversed == run_id) failure_reason = "Disposal network starting at [COORD(start)] contains a loop at [COORD(T)] which is not allowed" + return current._traversed = run_id holder.last_pipe = current From dcd74c1bb48f51cedc62a7c5370932c6669b6e52 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 12:24:32 +0100 Subject: [PATCH 044/266] Fixes failures not being properly --- code/modules/unit_tests/mapping/check_disposals.dm | 2 +- code/modules/unit_tests/mapping/map_test.dm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index 09d0fe457c7cc..731753b0764a7 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -56,7 +56,7 @@ var/turf/T = get_step(current, current.nextdir(holder)) current = locate(/obj/structure/disposalpipe) in T if (holder.current_pipe == current) - failure_reason = "Pipenet for some reason returned own pipe as the next direction when traversing a [current.type] at [COORD(current)]." + failure_reason = "Disposal loop starting at [COORD(start)] eventually ends up leading to itself with type [current.type] at [COORD(current)]." return // Found a valid ending if (locate(/obj/structure/disposaloutlet) in T) diff --git a/code/modules/unit_tests/mapping/map_test.dm b/code/modules/unit_tests/mapping/map_test.dm index e3c525411c16c..c80b23eb1d912 100644 --- a/code/modules/unit_tests/mapping/map_test.dm +++ b/code/modules/unit_tests/mapping/map_test.dm @@ -37,8 +37,8 @@ if (result) LAZYADD(failures, result) // Fail if necessary - if (LAZYLEN(failures)) - TEST_FAIL(jointext(failures, "\n")) + for (var/failure in failures) + TEST_FAIL(failure) /// Return a string if failed, return null otherwise /datum/unit_test/map_test/proc/check_turf(turf/check_turf, is_map_border) From 38f6160177e52b0e8bb5c4088b72d9def81a911b Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 12:30:04 +0100 Subject: [PATCH 045/266] Fixes disposal loop bug --- code/modules/unit_tests/mapping/check_disposals.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index 731753b0764a7..b40229cf5ee57 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -8,7 +8,7 @@ /datum/unit_test/map_test/check_disposals/collect_targets(list/turfs) var/located = list() for (var/turf/check_turf in turfs) - var/found = locate(/obj/machinery/disposal) + var/found = locate(/obj/machinery/disposal) in check_turf if (found) located += found return located @@ -38,7 +38,7 @@ holder.destinationTag = sort_code var/obj/structure/disposaloutlet/destination = traverse_loop(holder, target.trunk, sort_code) if (failure_reason) - return failure_reason + continue var/arrived = FALSE for (var/valid_destination in GLOB.tagger_destination_areas[sort_code]) if (istype(get_area(destination), valid_destination)) From 2b8ead55deafe32593884b9d1aafdfbba43d4de6 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 12:42:14 +0100 Subject: [PATCH 046/266] Account for the complete shitcode of disposals --- code/modules/unit_tests/mapping/check_disposals.dm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index b40229cf5ee57..048e14174bf1f 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -52,12 +52,14 @@ // First check to ensure that we end up somewhere var/obj/structure/disposalpipe/current = start while (current) + if (holder.last_pipe) + holder.dir = get_dir(holder.last_pipe, current) + else + holder.dir = current.dir holder.current_pipe = current - var/turf/T = get_step(current, current.nextdir(holder)) + // Account for disposals shitcode + var/turf/T = get_step(current, istype(current, /obj/structure/disposalpipe/trunk) ? current.dir : current.nextdir(holder)) current = locate(/obj/structure/disposalpipe) in T - if (holder.current_pipe == current) - failure_reason = "Disposal loop starting at [COORD(start)] eventually ends up leading to itself with type [current.type] at [COORD(current)]." - return // Found a valid ending if (locate(/obj/structure/disposaloutlet) in T) return locate(/obj/structure/disposaloutlet) From e6cbe8c24334760a0d9a8169ae800dbc094f2a6b Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 12:50:25 +0100 Subject: [PATCH 047/266] Update check_disposals.dm --- .../unit_tests/mapping/check_disposals.dm | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index 048e14174bf1f..830ec8199b1f9 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -51,15 +51,20 @@ /datum/unit_test/map_test/check_disposals/proc/traverse_loop(obj/structure/disposalholder/holder, obj/structure/disposalpipe/start, run_id) // First check to ensure that we end up somewhere var/obj/structure/disposalpipe/current = start + holder.current_pipe = current + holder.dir = current.dir while (current) - if (holder.last_pipe) - holder.dir = get_dir(holder.last_pipe, current) - else - holder.dir = current.dir - holder.current_pipe = current // Account for disposals shitcode var/turf/T = get_step(current, istype(current, /obj/structure/disposalpipe/trunk) ? current.dir : current.nextdir(holder)) - current = locate(/obj/structure/disposalpipe) in T + current = holder.findpipe(T) + // End detection + if (current == null) + failure_reason = "Disposal network starting at [COORD(start)] has a pipe with no output at [COORD(T)] but should lead to an outlet" + return + // Set our direction + holder.dir = get_step(holder.current_pipe, current) + holder.last_pipe = current + holder.current_pipe = current // Found a valid ending if (locate(/obj/structure/disposaloutlet) in T) return locate(/obj/structure/disposaloutlet) @@ -69,13 +74,8 @@ return if (locate(/obj/structure/disposalpipe/sorting)) is_sorting_network = TRUE - // End detection - if (current == null) - failure_reason = "Disposal network starting at [COORD(start)] has a pipe with no output at [COORD(T)] but should lead to an outlet" - return // Loop detection if (current._traversed == run_id) - failure_reason = "Disposal network starting at [COORD(start)] contains a loop at [COORD(T)] which is not allowed" + failure_reason = "Disposal network starting at [COORD(start)] contains a loop at [COORD(T)] which is not allowed. Holder was traversing [dir2text(holder.dir)]." return current._traversed = run_id - holder.last_pipe = current From 5e2d5ea2b10c120df233dd18ed30cabdbc20993f Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 12:57:54 +0100 Subject: [PATCH 048/266] Fixes --- code/modules/unit_tests/mapping/check_disposals.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index 830ec8199b1f9..5f531353bae0e 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -52,17 +52,17 @@ // First check to ensure that we end up somewhere var/obj/structure/disposalpipe/current = start holder.current_pipe = current - holder.dir = current.dir + holder.dir = current.dir || SOUTH while (current) // Account for disposals shitcode - var/turf/T = get_step(current, istype(current, /obj/structure/disposalpipe/trunk) ? current.dir : current.nextdir(holder)) + var/turf/T = get_step(current, istype(current, /obj/structure/disposalpipe/trunk) ? (current.dir || SOUTH) : current.nextdir(holder)) current = holder.findpipe(T) // End detection if (current == null) failure_reason = "Disposal network starting at [COORD(start)] has a pipe with no output at [COORD(T)] but should lead to an outlet" return // Set our direction - holder.dir = get_step(holder.current_pipe, current) + holder.dir = get_dir(holder.current_pipe, current) holder.last_pipe = current holder.current_pipe = current // Found a valid ending From 0232dbae94f8b95b0e8bdb2ed79ed39ad53512e0 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 13:03:43 +0100 Subject: [PATCH 049/266] Debug info --- code/modules/unit_tests/mapping/check_disposals.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index 5f531353bae0e..4e7e8aaadeb24 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -59,23 +59,23 @@ current = holder.findpipe(T) // End detection if (current == null) - failure_reason = "Disposal network starting at [COORD(start)] has a pipe with no output at [COORD(T)] but should lead to an outlet" + failure_reason = "Disposal network starting at [COORD(start)] has a pipe with no output at [COORD(T)] but should lead to an outlet. Holder was traversing [dir2text(holder.dir)] and was last at [COORD(holder.current_pipe)]." return // Set our direction holder.dir = get_dir(holder.current_pipe, current) - holder.last_pipe = current + holder.last_pipe = holder.current_pipe holder.current_pipe = current // Found a valid ending if (locate(/obj/structure/disposaloutlet) in T) return locate(/obj/structure/disposaloutlet) // Detect ending back at an input if (locate(/obj/machinery/disposal) in T) - failure_reason = "Disposal loop starting at [COORD(start)] leads to an input node at [COORD(T)] but should lead to an outlet" + failure_reason = "Disposal loop starting at [COORD(start)] leads to an input node at [COORD(T)] but should lead to an outlet. Holder was traversing [dir2text(holder.dir)] and was last at [COORD(holder.last_pipe)]." return if (locate(/obj/structure/disposalpipe/sorting)) is_sorting_network = TRUE // Loop detection if (current._traversed == run_id) - failure_reason = "Disposal network starting at [COORD(start)] contains a loop at [COORD(T)] which is not allowed. Holder was traversing [dir2text(holder.dir)]." + failure_reason = "Disposal network starting at [COORD(start)] contains a loop at [COORD(T)] which is not allowed. Holder was traversing [dir2text(holder.dir)] and was last at [COORD(holder.last_pipe)]." return current._traversed = run_id From 9c2a1b1b9f272adb7686fd1de63fda18d52e5e7e Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 13:10:37 +0100 Subject: [PATCH 050/266] Update check_disposals.dm --- code/modules/unit_tests/mapping/check_disposals.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index 4e7e8aaadeb24..41f22b15f22b4 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -55,7 +55,8 @@ holder.dir = current.dir || SOUTH while (current) // Account for disposals shitcode - var/turf/T = get_step(current, istype(current, /obj/structure/disposalpipe/trunk) ? (current.dir || SOUTH) : current.nextdir(holder)) + holder.dir = istype(current, /obj/structure/disposalpipe/trunk) ? (current.dir || SOUTH) : current.nextdir(holder) + var/turf/T = get_step(current, holder.dir) current = holder.findpipe(T) // End detection if (current == null) From 14cfe233223ed6e1beb1c04d1c288b851f513e55 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 13:17:17 +0100 Subject: [PATCH 051/266] Fixes the stupidity of sort codes --- code/modules/unit_tests/mapping/check_disposals.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index 41f22b15f22b4..6f4642b506bf4 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -34,9 +34,11 @@ failure_reason = null // Since we have filters, lets make sure this is a proper, fully connected and fully functioning loop // We should be able to enter the loop at any point from an input gate to get to our destination + var/i = 0 for (var/sort_code in GLOB.TAGGERLOCATIONS) + i++ holder.destinationTag = sort_code - var/obj/structure/disposaloutlet/destination = traverse_loop(holder, target.trunk, sort_code) + var/obj/structure/disposaloutlet/destination = traverse_loop(holder, target.trunk, i) if (failure_reason) continue var/arrived = FALSE @@ -45,7 +47,7 @@ arrived = TRUE break if (!arrived) - failures += "Disposal track starting at [COORD(target)] does not end up in the correct destination. Expected [sort_code], got [get_area(destination)] at [COORD(destination)]" + failures += "Disposal track starting at [COORD(target)] does not end up in the correct destination. Expected [sort_code] (i), got [get_area(destination)] at [COORD(destination)]" return failures /datum/unit_test/map_test/check_disposals/proc/traverse_loop(obj/structure/disposalholder/holder, obj/structure/disposalpipe/start, run_id) From c03ddca2798cc32cdf6bed2467901964274cfd3a Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 13:22:39 +0100 Subject: [PATCH 052/266] Corrects a mistake --- code/modules/unit_tests/mapping/check_disposals.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index 6f4642b506bf4..693b2c421c3b3 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -37,7 +37,7 @@ var/i = 0 for (var/sort_code in GLOB.TAGGERLOCATIONS) i++ - holder.destinationTag = sort_code + holder.destinationTag = i var/obj/structure/disposaloutlet/destination = traverse_loop(holder, target.trunk, i) if (failure_reason) continue @@ -47,7 +47,7 @@ arrived = TRUE break if (!arrived) - failures += "Disposal track starting at [COORD(target)] does not end up in the correct destination. Expected [sort_code] (i), got [get_area(destination)] at [COORD(destination)]" + failures += "Disposal track starting at [COORD(target)] does not end up in the correct destination. Expected [sort_code] ([i]), got [get_area(destination)] at [COORD(destination)]" return failures /datum/unit_test/map_test/check_disposals/proc/traverse_loop(obj/structure/disposalholder/holder, obj/structure/disposalpipe/start, run_id) From 6d8380f014708084c23287dcccfa7f690afe3445 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 13:34:26 +0100 Subject: [PATCH 053/266] Makes run ID properly unique --- code/modules/unit_tests/mapping/check_disposals.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index 693b2c421c3b3..395a9bb1d461a 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -3,6 +3,7 @@ /datum/unit_test/map_test/check_disposals var/failure_reason var/is_sorting_network + var/run_id = 1 // Find all entries into the disposal system /datum/unit_test/map_test/check_disposals/collect_targets(list/turfs) @@ -22,7 +23,7 @@ return "[target.name] not attached to a trunk" // Create a terrible disposal holder object var/obj/structure/disposalholder/holder = new() - traverse_loop(holder, target.trunk, "default") + traverse_loop(holder, target.trunk, run_id++) // Abuse byonds variables to get out (We can use pointers as an out variable in 515) if (failure_reason) failures += failure_reason @@ -38,7 +39,7 @@ for (var/sort_code in GLOB.TAGGERLOCATIONS) i++ holder.destinationTag = i - var/obj/structure/disposaloutlet/destination = traverse_loop(holder, target.trunk, i) + var/obj/structure/disposaloutlet/destination = traverse_loop(holder, target.trunk, run_id++) if (failure_reason) continue var/arrived = FALSE From 54658e6f9ac6f4857361f04e35aee48372062d62 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 13:36:31 +0100 Subject: [PATCH 054/266] Update check_disposals.dm --- code/modules/unit_tests/mapping/check_disposals.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index 395a9bb1d461a..3daf4dc55fe4e 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -76,7 +76,7 @@ if (locate(/obj/machinery/disposal) in T) failure_reason = "Disposal loop starting at [COORD(start)] leads to an input node at [COORD(T)] but should lead to an outlet. Holder was traversing [dir2text(holder.dir)] and was last at [COORD(holder.last_pipe)]." return - if (locate(/obj/structure/disposalpipe/sorting)) + if (locate(/obj/structure/disposalpipe/sorting) in T) is_sorting_network = TRUE // Loop detection if (current._traversed == run_id) From 16e06452d90cc78cbddb3439e0cd1e0919639b38 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 13:44:00 +0100 Subject: [PATCH 055/266] Update check_disposals.dm --- code/modules/unit_tests/mapping/check_disposals.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index 3daf4dc55fe4e..c08c4f251da23 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -41,6 +41,7 @@ holder.destinationTag = i var/obj/structure/disposaloutlet/destination = traverse_loop(holder, target.trunk, run_id++) if (failure_reason) + failures += failure_reason continue var/arrived = FALSE for (var/valid_destination in GLOB.tagger_destination_areas[sort_code]) From 1e0855ad5b0ebc59ec480458c85327b5afbeeb15 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 13:53:59 +0100 Subject: [PATCH 056/266] Fixes some areas interacting wtih APC checks --- code/game/area/Space_Station_13_areas.dm | 5 +++-- code/modules/unit_tests/mapping/check_area_apc.dm | 9 ++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/code/game/area/Space_Station_13_areas.dm b/code/game/area/Space_Station_13_areas.dm index 2de64b6e62c5b..700632b664df4 100644 --- a/code/game/area/Space_Station_13_areas.dm +++ b/code/game/area/Space_Station_13_areas.dm @@ -1208,7 +1208,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/security/brig/medbay name = "Brig Bay" - + /area/security/brig/aft name = "Brig Aft" @@ -1463,7 +1463,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station sound_environment = SOUND_AREA_STANDARD_STATION airlock_hack_difficulty = AIRLOCK_WIRE_SECURITY_ADVANCED color_correction = /datum/client_colour/area_color/cold_ish - + /area/science/aft name = "Science Aft" @@ -1498,6 +1498,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station area_flags = BLOBS_ALLOWED | UNIQUE_AREA icon_state = "tox_test" lights_always_start_on = TRUE + always_unpowered = TRUE /area/science/mixing name = "Toxins Mixing Lab" diff --git a/code/modules/unit_tests/mapping/check_area_apc.dm b/code/modules/unit_tests/mapping/check_area_apc.dm index 67906357b27c5..2a9d7cd995d86 100644 --- a/code/modules/unit_tests/mapping/check_area_apc.dm +++ b/code/modules/unit_tests/mapping/check_area_apc.dm @@ -1,7 +1,10 @@ /datum/unit_test/map_test/apc/check_area(area/check_area) - if (!check_area.requires_power) + // Make sure there are no APCs in unpowered areas + if (check_area.apc && check_area.always_unpowered) + return "APC found in an always unpowered area" + // If you have power then I guess you pass + if (check_area.powered(AREA_USAGE_ENVIRON)) return + // Otherwise, make sure we need power if (!check_area.apc && !check_area.always_unpowered) return "No APC in an area that requires power" - if (check_area.apc && check_area.always_unpowered) - return "APC found in an always unpowered area" From 6dda8f9fe47fba667f68831dd271fd46ea919513 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 14:22:30 +0100 Subject: [PATCH 057/266] Random rooms will delete any directional things not placed on walls, fixes inconsistent indentation --- .../objects/effects/spawners/roomspawner.dm | 76 +++++++++++-------- 1 file changed, 45 insertions(+), 31 deletions(-) diff --git a/code/game/objects/effects/spawners/roomspawner.dm b/code/game/objects/effects/spawners/roomspawner.dm index 2444e6cf3aca1..1b3b2bc0b4503 100644 --- a/code/game/objects/effects/spawners/roomspawner.dm +++ b/code/game/objects/effects/spawners/roomspawner.dm @@ -1,41 +1,55 @@ //random room spawner. takes random rooms from their appropriate map file and places them. the room will spawn with the spawner in the bottom left corner /obj/effect/spawner/room - name = "random room spawner" - icon = 'icons/effects/landmarks_static.dmi' - icon_state = "random_room" - dir = NORTH - var/room_width = 0 - var/room_height = 0 - ///List of room IDs we want - var/list/rooms = list() + name = "random room spawner" + icon = 'icons/effects/landmarks_static.dmi' + icon_state = "random_room" + dir = NORTH + var/room_width = 0 + var/room_height = 0 + ///List of room IDs we want + var/list/rooms = list() /obj/effect/spawner/room/New(loc, ...) - . = ..() - if(!isnull(SSmapping.random_room_spawners)) - SSmapping.random_room_spawners += src + . = ..() + if(!isnull(SSmapping.random_room_spawners)) + SSmapping.random_room_spawners += src /obj/effect/spawner/room/Initialize(mapload) - . = ..() - if(!length(SSmapping.random_room_templates)) - message_admins("Room spawner created with no templates available. This shouldn't happen.") - return INITIALIZE_HINT_QDEL - var/list/possibletemplates = list() - var/datum/map_template/random_room/candidate - shuffle_inplace(SSmapping.random_room_templates) - for(var/ID in SSmapping.random_room_templates) - candidate = SSmapping.random_room_templates[ID] - if((!rooms.len && candidate.spawned) || (!rooms.len && (room_height != candidate.template_height || room_width != candidate.template_width)) || (rooms.len && !(candidate.room_id in rooms))) - candidate = null - continue - possibletemplates[candidate] = candidate.weight - if(possibletemplates.len) - var/datum/map_template/random_room/template = pick_weight(possibletemplates) - template.stock -- - template.weight = (template.weight / 2) - if(template.stock <= 0) - template.spawned = TRUE - template.load(get_turf(src), centered = template.centerspawner) + . = ..() + if(!length(SSmapping.random_room_templates)) + message_admins("Room spawner created with no templates available. This shouldn't happen.") + return INITIALIZE_HINT_QDEL + var/list/possibletemplates = list() + var/datum/map_template/random_room/candidate + shuffle_inplace(SSmapping.random_room_templates) + for(var/ID in SSmapping.random_room_templates) + candidate = SSmapping.random_room_templates[ID] + if((!rooms.len && candidate.spawned) || (!rooms.len && (room_height != candidate.template_height || room_width != candidate.template_width)) || (rooms.len && !(candidate.room_id in rooms))) + candidate = null + continue + possibletemplates[candidate] = candidate.weight + if(possibletemplates.len) + var/datum/map_template/random_room/template = pick_weight(possibletemplates) + template.stock -- + template.weight = (template.weight / 2) + if(template.stock <= 0) + template.spawned = TRUE + var/datum/async_map_generator/map_place/generator = template.load(get_turf(src), centered = template.centerspawner) + generator.on_completion(CALLBACK(src, PROC_REF(after_place))) + +/obj/effect/spawner/room/proc/after_place(datum/async_map_generator/map_place/generator, turf/T, init_atmos, datum/parsed_map/parsed, finalize = TRUE, ...) + // Scan through the room and remove any wall fixtures that were not placed correctly + for (var/x in T.x to T.x + room_width) + for (var/y in T.y to T.y + room_height) + var/turf/current = locate(x, y, T.z) + for (var/obj/placed_object in current) + // Temporary hacky check to see if we contain a directional mapping helper + if (!findtext(placed_object.type, "/directional")) + continue + // Check to see if we correctly placed ourselves on a wall + if (!isclosedturf(get_step(placed_object, placed_object.dir))) + qdel(placed_object) /obj/effect/spawner/room/special/tenxfive_terrestrial name = "10x5 terrestrial room" From d0bb4f3218dddb938b9f65fc7828e0959214c12c Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 14:41:35 +0100 Subject: [PATCH 058/266] Adds a somewhat hacky check to fix random maint room spawning --- code/__DEFINES/directional.dm | 8 +++++++- code/game/objects/effects/spawners/roomspawner.dm | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/code/__DEFINES/directional.dm b/code/__DEFINES/directional.dm index bfde544b44716..14d4ae1d7f17d 100644 --- a/code/__DEFINES/directional.dm +++ b/code/__DEFINES/directional.dm @@ -16,8 +16,14 @@ /// Inverse direction, taking into account UP|DOWN if necessary. #define REVERSE_DIR(dir) ( ((dir & 85) << 1) | ((dir & 170) >> 1) ) +/obj/var/_reflection_is_directional = FALSE + /// Create directional subtypes for a path to simplify mapping. -#define MAPPING_DIRECTIONAL_HELPERS(path, offset) ##path/directional/north {\ +#define MAPPING_DIRECTIONAL_HELPERS(path, offset)\ +##path {\ + _reflection_is_directional = TRUE;\ +} \ +##path/directional/north {\ dir = NORTH; \ pixel_y = offset; \ } \ diff --git a/code/game/objects/effects/spawners/roomspawner.dm b/code/game/objects/effects/spawners/roomspawner.dm index 1b3b2bc0b4503..547d0e030c267 100644 --- a/code/game/objects/effects/spawners/roomspawner.dm +++ b/code/game/objects/effects/spawners/roomspawner.dm @@ -45,7 +45,8 @@ var/turf/current = locate(x, y, T.z) for (var/obj/placed_object in current) // Temporary hacky check to see if we contain a directional mapping helper - if (!findtext(placed_object.type, "/directional")) + // I know its a normal variable, but this is explicitly accessed through reflection + if (!initial(placed_object._reflection_is_directional)) continue // Check to see if we correctly placed ourselves on a wall if (!isclosedturf(get_step(placed_object, placed_object.dir))) From 8d70cf09485e3cd53db590ce161049afac079ce5 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 15:14:56 +0100 Subject: [PATCH 059/266] Update check_disposals.dm --- code/modules/unit_tests/mapping/check_disposals.dm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index c08c4f251da23..1821e0944787a 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -23,7 +23,7 @@ return "[target.name] not attached to a trunk" // Create a terrible disposal holder object var/obj/structure/disposalholder/holder = new() - traverse_loop(holder, target.trunk, run_id++) + traverse_loop(holder, target.trunk, run_id++, FALSE) // Abuse byonds variables to get out (We can use pointers as an out variable in 515) if (failure_reason) failures += failure_reason @@ -39,7 +39,7 @@ for (var/sort_code in GLOB.TAGGERLOCATIONS) i++ holder.destinationTag = i - var/obj/structure/disposaloutlet/destination = traverse_loop(holder, target.trunk, run_id++) + var/obj/structure/disposaloutlet/destination = traverse_loop(holder, target.trunk, run_id++, TRUE) if (failure_reason) failures += failure_reason continue @@ -52,7 +52,7 @@ failures += "Disposal track starting at [COORD(target)] does not end up in the correct destination. Expected [sort_code] ([i]), got [get_area(destination)] at [COORD(destination)]" return failures -/datum/unit_test/map_test/check_disposals/proc/traverse_loop(obj/structure/disposalholder/holder, obj/structure/disposalpipe/start, run_id) +/datum/unit_test/map_test/check_disposals/proc/traverse_loop(obj/structure/disposalholder/holder, obj/structure/disposalpipe/start, run_id, allow_inputs) // First check to ensure that we end up somewhere var/obj/structure/disposalpipe/current = start holder.current_pipe = current @@ -75,7 +75,8 @@ return locate(/obj/structure/disposaloutlet) // Detect ending back at an input if (locate(/obj/machinery/disposal) in T) - failure_reason = "Disposal loop starting at [COORD(start)] leads to an input node at [COORD(T)] but should lead to an outlet. Holder was traversing [dir2text(holder.dir)] and was last at [COORD(holder.last_pipe)]." + if (!allow_inputs) + failure_reason = "Disposal loop starting at [COORD(start)] leads to an input node at [COORD(T)] but should lead to an outlet. Holder was traversing [dir2text(holder.dir)] and was last at [COORD(holder.last_pipe)]." return if (locate(/obj/structure/disposalpipe/sorting) in T) is_sorting_network = TRUE From 24ef5dfdeb96b1c3ae9eeb6e6064b5743f2436e0 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 15:21:36 +0100 Subject: [PATCH 060/266] Fixes ending in a null location --- code/modules/unit_tests/mapping/check_disposals.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index 1821e0944787a..ff67eb25e1c9d 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -39,7 +39,7 @@ for (var/sort_code in GLOB.TAGGERLOCATIONS) i++ holder.destinationTag = i - var/obj/structure/disposaloutlet/destination = traverse_loop(holder, target.trunk, run_id++, TRUE) + var/atom/destination = traverse_loop(holder, target.trunk, run_id++, TRUE) if (failure_reason) failures += failure_reason continue @@ -77,7 +77,7 @@ if (locate(/obj/machinery/disposal) in T) if (!allow_inputs) failure_reason = "Disposal loop starting at [COORD(start)] leads to an input node at [COORD(T)] but should lead to an outlet. Holder was traversing [dir2text(holder.dir)] and was last at [COORD(holder.last_pipe)]." - return + return current if (locate(/obj/structure/disposalpipe/sorting) in T) is_sorting_network = TRUE // Loop detection From 956745f6f0fac66a0dc37bb169b5c007bf8e23dd Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 15:32:38 +0100 Subject: [PATCH 061/266] Fixes disposals detecting loops when there are none --- code/modules/unit_tests/mapping/check_disposals.dm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index ff67eb25e1c9d..741296745b0ef 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -23,7 +23,7 @@ return "[target.name] not attached to a trunk" // Create a terrible disposal holder object var/obj/structure/disposalholder/holder = new() - traverse_loop(holder, target.trunk, run_id++, FALSE) + traverse_loop(holder, target.trunk, FALSE) // Abuse byonds variables to get out (We can use pointers as an out variable in 515) if (failure_reason) failures += failure_reason @@ -39,7 +39,7 @@ for (var/sort_code in GLOB.TAGGERLOCATIONS) i++ holder.destinationTag = i - var/atom/destination = traverse_loop(holder, target.trunk, run_id++, TRUE) + var/atom/destination = traverse_loop(holder, target.trunk, TRUE) if (failure_reason) failures += failure_reason continue @@ -52,11 +52,14 @@ failures += "Disposal track starting at [COORD(target)] does not end up in the correct destination. Expected [sort_code] ([i]), got [get_area(destination)] at [COORD(destination)]" return failures -/datum/unit_test/map_test/check_disposals/proc/traverse_loop(obj/structure/disposalholder/holder, obj/structure/disposalpipe/start, run_id, allow_inputs) +/datum/unit_test/map_test/check_disposals/proc/traverse_loop(obj/structure/disposalholder/holder, obj/structure/disposalpipe/start, allow_inputs) + // Increment run ID + run_id++ // First check to ensure that we end up somewhere var/obj/structure/disposalpipe/current = start holder.current_pipe = current holder.dir = current.dir || SOUTH + var/has_looped = FALSE while (current) // Account for disposals shitcode holder.dir = istype(current, /obj/structure/disposalpipe/trunk) ? (current.dir || SOUTH) : current.nextdir(holder) @@ -70,6 +73,10 @@ holder.dir = get_dir(holder.current_pipe, current) holder.last_pipe = holder.current_pipe holder.current_pipe = current + // If we have re-entered the loop at the unsorting pip, increment run ID as we will have a different behaviour next time we loop around + if (!has_looped && !holder.unsorted) + run_id ++ + has_looped = TRUE // Found a valid ending if (locate(/obj/structure/disposaloutlet) in T) return locate(/obj/structure/disposaloutlet) From ec7b9fb9932b3c79acdab51853e2d1f5bc4b7d0b Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 15:48:41 +0100 Subject: [PATCH 062/266] Adds more information to the failure --- code/modules/unit_tests/mapping/check_disposals.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index 741296745b0ef..ec71b272eed87 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -67,7 +67,7 @@ current = holder.findpipe(T) // End detection if (current == null) - failure_reason = "Disposal network starting at [COORD(start)] has a pipe with no output at [COORD(T)] but should lead to an outlet. Holder was traversing [dir2text(holder.dir)] and was last at [COORD(holder.current_pipe)]." + failure_reason = "Disposal network starting at [COORD(start)] has a pipe with no output at [COORD(T)] but should lead to an outlet. Holder was traversing [dir2text(holder.dir)] and was last at [COORD(holder.current_pipe)]. Sort code was [holder.destinationTag]." return // Set our direction holder.dir = get_dir(holder.current_pipe, current) @@ -83,12 +83,12 @@ // Detect ending back at an input if (locate(/obj/machinery/disposal) in T) if (!allow_inputs) - failure_reason = "Disposal loop starting at [COORD(start)] leads to an input node at [COORD(T)] but should lead to an outlet. Holder was traversing [dir2text(holder.dir)] and was last at [COORD(holder.last_pipe)]." + failure_reason = "Disposal loop starting at [COORD(start)] leads to an input node at [COORD(T)] but should lead to an outlet. Holder was traversing [dir2text(holder.dir)] and was last at [COORD(holder.last_pipe)]. Sort code was [holder.destinationTag]." return current if (locate(/obj/structure/disposalpipe/sorting) in T) is_sorting_network = TRUE // Loop detection if (current._traversed == run_id) - failure_reason = "Disposal network starting at [COORD(start)] contains a loop at [COORD(T)] which is not allowed. Holder was traversing [dir2text(holder.dir)] and was last at [COORD(holder.last_pipe)]." + failure_reason = "Disposal network starting at [COORD(start)] contains a loop at [COORD(T)] which is not allowed. Holder was traversing [dir2text(holder.dir)] and was last at [COORD(holder.last_pipe)]. Sort code was [holder.destinationTag]." return current._traversed = run_id From 4166df2b091cded0f1229e53b014762fee360cfa Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 17:15:12 +0100 Subject: [PATCH 063/266] Fixes an issue with the disposals check --- code/modules/unit_tests/mapping/check_disposals.dm | 2 -- 1 file changed, 2 deletions(-) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index ec71b272eed87..1530f7db81f6c 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -69,8 +69,6 @@ if (current == null) failure_reason = "Disposal network starting at [COORD(start)] has a pipe with no output at [COORD(T)] but should lead to an outlet. Holder was traversing [dir2text(holder.dir)] and was last at [COORD(holder.current_pipe)]. Sort code was [holder.destinationTag]." return - // Set our direction - holder.dir = get_dir(holder.current_pipe, current) holder.last_pipe = holder.current_pipe holder.current_pipe = current // If we have re-entered the loop at the unsorting pip, increment run ID as we will have a different behaviour next time we loop around From cb57999f26bc79347f2db3c70986b45708a37dd3 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 17:40:53 +0100 Subject: [PATCH 064/266] Update check_disposals.dm --- code/modules/unit_tests/mapping/check_disposals.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index 1530f7db81f6c..de516887265a1 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -39,6 +39,7 @@ for (var/sort_code in GLOB.TAGGERLOCATIONS) i++ holder.destinationTag = i + holder.unsorted = TRUE var/atom/destination = traverse_loop(holder, target.trunk, TRUE) if (failure_reason) failures += failure_reason From 097647b6af298bf3c6bb74197d979fc68587235f Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 17:58:39 +0100 Subject: [PATCH 065/266] Update check_disposals.dm --- code/modules/unit_tests/mapping/check_disposals.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index de516887265a1..c768e7d8eda54 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -27,6 +27,7 @@ // Abuse byonds variables to get out (We can use pointers as an out variable in 515) if (failure_reason) failures += failure_reason + failure_reason = null // This is fine, we probably are a bin that leads to space or something if (!is_sorting_network) return failures @@ -38,11 +39,12 @@ var/i = 0 for (var/sort_code in GLOB.TAGGERLOCATIONS) i++ + holder = new /obj/structure/disposalholder() holder.destinationTag = i - holder.unsorted = TRUE var/atom/destination = traverse_loop(holder, target.trunk, TRUE) if (failure_reason) failures += failure_reason + failure_reason = null continue var/arrived = FALSE for (var/valid_destination in GLOB.tagger_destination_areas[sort_code]) From a2ee0a2812ed6260afa20716e627a4f8942d950b Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 18:16:19 +0100 Subject: [PATCH 066/266] /area/medical/apothecary is valid for the output of chemistry --- code/_globalvars/lists/flavor_misc.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm index 8f2166cbe19b0..c8f0c577aadf7 100644 --- a/code/_globalvars/lists/flavor_misc.dm +++ b/code/_globalvars/lists/flavor_misc.dm @@ -325,7 +325,7 @@ GLOBAL_LIST_INIT(tagger_destination_areas, list( "HoS Office" = list(/area/crew_quarters/heads/hos), "Medbay" = list(/area/medical), "CMO Office" = list(/area/crew_quarters/heads/cmo), - "Chemistry" = list(/area/medical/chemistry), + "Chemistry" = list(/area/medical/chemistry, /area/medical/apothecary), "Research" = list(/area/science), "RD Office" = list(/area/crew_quarters/heads/hor), "Robotics" = list(/area/science/robotics), From a3881206194280d0254fe3431e06f440dfd21226 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 18:34:24 +0100 Subject: [PATCH 067/266] Fixes the issue with virology and finally resolves issues with the disposals checker --- code/modules/unit_tests/mapping/check_disposals.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index c768e7d8eda54..171f9fa9a2b2d 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -80,7 +80,7 @@ has_looped = TRUE // Found a valid ending if (locate(/obj/structure/disposaloutlet) in T) - return locate(/obj/structure/disposaloutlet) + return locate(/obj/structure/disposaloutlet) in T // Detect ending back at an input if (locate(/obj/machinery/disposal) in T) if (!allow_inputs) From c22944ffbe72687f024907295283760ba56c9063 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 19:23:29 +0100 Subject: [PATCH 068/266] Adds a check for multiple objects on the same turf --- code/modules/unit_tests/_DEFINES/_unit_tests.dm | 1 + .../unit_tests/mapping/check_multiple_objects.dm | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 code/modules/unit_tests/mapping/check_multiple_objects.dm diff --git a/code/modules/unit_tests/_DEFINES/_unit_tests.dm b/code/modules/unit_tests/_DEFINES/_unit_tests.dm index 15987f3ccf2bb..94f40eb9e8a1a 100644 --- a/code/modules/unit_tests/_DEFINES/_unit_tests.dm +++ b/code/modules/unit_tests/_DEFINES/_unit_tests.dm @@ -144,6 +144,7 @@ #include "../mapping/check_camera_attachment.dm" #include "../mapping/check_disposals.dm" #include "../mapping/check_light_attachment.dm" +#include "../mapping/check_multiple_objects.dm" #include "../mapping/map_test.dm" #undef TEST_ASSERT diff --git a/code/modules/unit_tests/mapping/check_multiple_objects.dm b/code/modules/unit_tests/mapping/check_multiple_objects.dm new file mode 100644 index 0000000000000..52d7ff07eb21f --- /dev/null +++ b/code/modules/unit_tests/mapping/check_multiple_objects.dm @@ -0,0 +1,12 @@ +/datum/unit_test/map_test/lights/check_turf(turf/check_turf, is_map_border) + var/found = FALSE + var/types = list() + for (var/obj/object in check_turf) + if (!isstructure(object) && !ismachinery(object)) + continue + var/hash = "[object.type][object.dir]" + if (types[hash]) + TEST_FAIL("Multiple objects of type [object.type] detected on the same tile, with the same direction.") + else + types[hash] = 1 + From 652ea9ce1abe90ecf7f1f645cd036caff4df4e3c Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 19:42:30 +0100 Subject: [PATCH 069/266] Fixes the multiple object check --- code/modules/unit_tests/mapping/check_multiple_objects.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/modules/unit_tests/mapping/check_multiple_objects.dm b/code/modules/unit_tests/mapping/check_multiple_objects.dm index 52d7ff07eb21f..c1f716b7e247e 100644 --- a/code/modules/unit_tests/mapping/check_multiple_objects.dm +++ b/code/modules/unit_tests/mapping/check_multiple_objects.dm @@ -1,12 +1,16 @@ /datum/unit_test/map_test/lights/check_turf(turf/check_turf, is_map_border) + . = list() var/found = FALSE var/types = list() for (var/obj/object in check_turf) if (!isstructure(object) && !ismachinery(object)) continue var/hash = "[object.type][object.dir]" + if (istype(/obj/structure/cable)) + var/obj/structure/cable/cable = object + hash = "[hash][min(cable.d1, cable.d2)][max(cable.d1, cable.d2)]" if (types[hash]) - TEST_FAIL("Multiple objects of type [object.type] detected on the same tile, with the same direction.") + . += "Multiple objects of type [object.type] detected on the same tile, with the same direction." else types[hash] = 1 From 96f15c5a12a2c76bbe8307d4987b3dbf8c5337c1 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 19:52:14 +0100 Subject: [PATCH 070/266] Update check_multiple_objects.dm --- code/modules/unit_tests/mapping/check_multiple_objects.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/unit_tests/mapping/check_multiple_objects.dm b/code/modules/unit_tests/mapping/check_multiple_objects.dm index c1f716b7e247e..c10a809fa739c 100644 --- a/code/modules/unit_tests/mapping/check_multiple_objects.dm +++ b/code/modules/unit_tests/mapping/check_multiple_objects.dm @@ -6,8 +6,8 @@ if (!isstructure(object) && !ismachinery(object)) continue var/hash = "[object.type][object.dir]" - if (istype(/obj/structure/cable)) - var/obj/structure/cable/cable = object + if (istype(/obj/structure/power/cable)) + var/obj/structure/power/cable/cable = object hash = "[hash][min(cable.d1, cable.d2)][max(cable.d1, cable.d2)]" if (types[hash]) . += "Multiple objects of type [object.type] detected on the same tile, with the same direction." From 47691d140b08461d632e1c065180fa0bf63ce7b0 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 19:52:51 +0100 Subject: [PATCH 071/266] Update check_multiple_objects.dm --- code/modules/unit_tests/mapping/check_multiple_objects.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/unit_tests/mapping/check_multiple_objects.dm b/code/modules/unit_tests/mapping/check_multiple_objects.dm index c10a809fa739c..ed74fbc20665c 100644 --- a/code/modules/unit_tests/mapping/check_multiple_objects.dm +++ b/code/modules/unit_tests/mapping/check_multiple_objects.dm @@ -6,8 +6,8 @@ if (!isstructure(object) && !ismachinery(object)) continue var/hash = "[object.type][object.dir]" - if (istype(/obj/structure/power/cable)) - var/obj/structure/power/cable/cable = object + if (istype(object, /obj/structure/cable)) + var/obj/structure/cable/cable = object hash = "[hash][min(cable.d1, cable.d2)][max(cable.d1, cable.d2)]" if (types[hash]) . += "Multiple objects of type [object.type] detected on the same tile, with the same direction." From fb6329354119add2d37a286df5c152616ce5ae44 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 20:04:02 +0100 Subject: [PATCH 072/266] Update check_multiple_objects.dm --- .../unit_tests/mapping/check_multiple_objects.dm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/code/modules/unit_tests/mapping/check_multiple_objects.dm b/code/modules/unit_tests/mapping/check_multiple_objects.dm index ed74fbc20665c..49a6ba5394e29 100644 --- a/code/modules/unit_tests/mapping/check_multiple_objects.dm +++ b/code/modules/unit_tests/mapping/check_multiple_objects.dm @@ -1,5 +1,5 @@ -/datum/unit_test/map_test/lights/check_turf(turf/check_turf, is_map_border) - . = list() +/datum/unit_test/map_test/check_multiple_objects/check_turf(turf/check_turf, is_map_border) + var/result = list() var/found = FALSE var/types = list() for (var/obj/object in check_turf) @@ -10,7 +10,9 @@ var/obj/structure/cable/cable = object hash = "[hash][min(cable.d1, cable.d2)][max(cable.d1, cable.d2)]" if (types[hash]) - . += "Multiple objects of type [object.type] detected on the same tile, with the same direction." + result += "Multiple objects of type [object.type] detected on the same tile, with the same direction." else types[hash] = 1 - + if (length(result)) + return result + return null From fac3b2d8a822d51da5497a918a7918b9dff07f41 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 20:11:52 +0100 Subject: [PATCH 073/266] Fixes list messages --- code/modules/unit_tests/mapping/map_test.dm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/code/modules/unit_tests/mapping/map_test.dm b/code/modules/unit_tests/mapping/map_test.dm index c80b23eb1d912..ec2facbeb4a18 100644 --- a/code/modules/unit_tests/mapping/map_test.dm +++ b/code/modules/unit_tests/mapping/map_test.dm @@ -12,13 +12,19 @@ turfs += tile areas[tile.loc] = TRUE var/result = check_turf(tile, x == 1 || x == world.maxx || y == 1 || y == world.maxy) - if (result) + if (islist(result)) + for (var/msg in result) + LAZYADD(failures, "([x], [y], [z]): [msg]") + else if (result) LAZYADD(failures, "([x], [y], [z]): [result]") // Check areas for (var/area/A in areas) var/result = check_area(A) - if (result) - LAZYADD(failures, "([A.type]): [result]") + if (islist(result)) + for (var/msg in result) + LAZYADD(failures, "([A.type]): [msg]") + else if (result) + LAZYADD(failures, "([A.type]): [result]") // Check Zs for (var/z in 1 to world.maxz) if (!is_station_level(z)) From 7247a5ce87d9a4dca935ce39750c137931eb6e00 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 25 Aug 2024 20:13:11 +0100 Subject: [PATCH 074/266] Assume that things with different pixel offsets are intended to be different --- code/modules/unit_tests/mapping/check_multiple_objects.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/unit_tests/mapping/check_multiple_objects.dm b/code/modules/unit_tests/mapping/check_multiple_objects.dm index 49a6ba5394e29..d22cd7d99fa18 100644 --- a/code/modules/unit_tests/mapping/check_multiple_objects.dm +++ b/code/modules/unit_tests/mapping/check_multiple_objects.dm @@ -5,7 +5,7 @@ for (var/obj/object in check_turf) if (!isstructure(object) && !ismachinery(object)) continue - var/hash = "[object.type][object.dir]" + var/hash = "[object.type][object.dir][object.pixel_x][object.pixel_y]" if (istype(object, /obj/structure/cable)) var/obj/structure/cable/cable = object hash = "[hash][min(cable.d1, cable.d2)][max(cable.d1, cable.d2)]" From 361d5c305841e0b990809558d79fec41b94f0c45 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Fri, 30 Aug 2024 17:27:38 +0100 Subject: [PATCH 075/266] Corrects some issues with the map tests --- beestation.dme | 1 + code/modules/unit_tests/mapping/check_disposals.dm | 2 +- .../unit_tests/mapping/check_wallthing_attachment.dm | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 code/modules/unit_tests/mapping/check_wallthing_attachment.dm diff --git a/beestation.dme b/beestation.dme index 2b18d04f66737..ca9463d697356 100644 --- a/beestation.dme +++ b/beestation.dme @@ -4102,6 +4102,7 @@ #include "code\modules\tgui_panel\tgui_panel.dm" #include "code\modules\tooltip\tooltip.dm" #include "code\modules\unit_tests\_DEFINES\_unit_tests.dm" +#include "code\modules\unit_tests\mapping\check_wallthing_attachment.dm" #include "code\modules\uplink\uplink_devices.dm" #include "code\modules\uplink\uplink_items.dm" #include "code\modules\uplink\uplink_purchase_log.dm" diff --git a/code/modules/unit_tests/mapping/check_disposals.dm b/code/modules/unit_tests/mapping/check_disposals.dm index 171f9fa9a2b2d..ba450ba017632 100644 --- a/code/modules/unit_tests/mapping/check_disposals.dm +++ b/code/modules/unit_tests/mapping/check_disposals.dm @@ -20,7 +20,7 @@ failure_reason = null is_sorting_network = FALSE if (!target.trunk) - return "[target.name] not attached to a trunk" + return "[target.name] not attached to a trunk at [COORD(target)]." // Create a terrible disposal holder object var/obj/structure/disposalholder/holder = new() traverse_loop(holder, target.trunk, FALSE) diff --git a/code/modules/unit_tests/mapping/check_wallthing_attachment.dm b/code/modules/unit_tests/mapping/check_wallthing_attachment.dm new file mode 100644 index 0000000000000..215f5fc99d9a9 --- /dev/null +++ b/code/modules/unit_tests/mapping/check_wallthing_attachment.dm @@ -0,0 +1,10 @@ +/datum/unit_test/map_test/wall_attachment/check_turf(turf/check_turf, is_map_border) + var/found = FALSE + for (var/obj/placed_object in current) + // Temporary hacky check to see if we contain a directional mapping helper + // I know its a normal variable, but this is explicitly accessed through reflection + if (!initial(placed_object._reflection_is_directional)) + continue + // Check to see if we correctly placed ourselves on a wall + if (!isclosedturf(get_step(placed_object, placed_object.dir))) + return "Wall object of type [placed_object.type] is not correctly attached to a wall (Should use cardinal directions only, preferably the mapping helpers)." From 6a29a5af17a326ea094e0a3b031a9dfb9f74bbee Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Fri, 30 Aug 2024 17:35:19 +0100 Subject: [PATCH 076/266] How about we just disable random maints on unit testing --- code/game/objects/effects/spawners/roomspawner.dm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/game/objects/effects/spawners/roomspawner.dm b/code/game/objects/effects/spawners/roomspawner.dm index 547d0e030c267..f28a35d711878 100644 --- a/code/game/objects/effects/spawners/roomspawner.dm +++ b/code/game/objects/effects/spawners/roomspawner.dm @@ -17,6 +17,15 @@ /obj/effect/spawner/room/Initialize(mapload) . = ..() +#ifdef UNIT_TESTS + // These are far too flakey to be including in the tests + var/turf/main_room_turf = get_turf(src) + for (var/x in main_room_turf.x to main_room_turf.x + room_width) + for (var/y in main_room_turf.y to main_room_turf.y + room_height) + var/turf/fix_turf = locate(x, y, main_room_turf.z) + fix_turf.ChangeTurf(/turf/open/floor/plating, flags = CHANGETURF_IGNORE_AIR) + return INITIALIZE_HINT_QDEL +#endif if(!length(SSmapping.random_room_templates)) message_admins("Room spawner created with no templates available. This shouldn't happen.") return INITIALIZE_HINT_QDEL From afba4a854dcf377e04038fac9e230824542094c1 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Fri, 30 Aug 2024 17:39:12 +0100 Subject: [PATCH 077/266] Update check_wallthing_attachment.dm --- code/modules/unit_tests/mapping/check_wallthing_attachment.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/unit_tests/mapping/check_wallthing_attachment.dm b/code/modules/unit_tests/mapping/check_wallthing_attachment.dm index 215f5fc99d9a9..d6b72a7069885 100644 --- a/code/modules/unit_tests/mapping/check_wallthing_attachment.dm +++ b/code/modules/unit_tests/mapping/check_wallthing_attachment.dm @@ -1,6 +1,6 @@ /datum/unit_test/map_test/wall_attachment/check_turf(turf/check_turf, is_map_border) var/found = FALSE - for (var/obj/placed_object in current) + for (var/obj/placed_object in check_turf) // Temporary hacky check to see if we contain a directional mapping helper // I know its a normal variable, but this is explicitly accessed through reflection if (!initial(placed_object._reflection_is_directional)) From da34bc11cc197b8338eef8b677e630b16318667c Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Fri, 30 Aug 2024 17:48:38 +0100 Subject: [PATCH 078/266] warnings fix --- code/modules/unit_tests/mapping/check_multiple_objects.dm | 1 - code/modules/unit_tests/mapping/check_wallthing_attachment.dm | 1 - 2 files changed, 2 deletions(-) diff --git a/code/modules/unit_tests/mapping/check_multiple_objects.dm b/code/modules/unit_tests/mapping/check_multiple_objects.dm index d22cd7d99fa18..e8a871b3e1891 100644 --- a/code/modules/unit_tests/mapping/check_multiple_objects.dm +++ b/code/modules/unit_tests/mapping/check_multiple_objects.dm @@ -1,6 +1,5 @@ /datum/unit_test/map_test/check_multiple_objects/check_turf(turf/check_turf, is_map_border) var/result = list() - var/found = FALSE var/types = list() for (var/obj/object in check_turf) if (!isstructure(object) && !ismachinery(object)) diff --git a/code/modules/unit_tests/mapping/check_wallthing_attachment.dm b/code/modules/unit_tests/mapping/check_wallthing_attachment.dm index d6b72a7069885..e717a945fea6e 100644 --- a/code/modules/unit_tests/mapping/check_wallthing_attachment.dm +++ b/code/modules/unit_tests/mapping/check_wallthing_attachment.dm @@ -1,5 +1,4 @@ /datum/unit_test/map_test/wall_attachment/check_turf(turf/check_turf, is_map_border) - var/found = FALSE for (var/obj/placed_object in check_turf) // Temporary hacky check to see if we contain a directional mapping helper // I know its a normal variable, but this is explicitly accessed through reflection From 781afc199f5c0bd64a66dd1b5d192ff504b153eb Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Fri, 30 Aug 2024 19:36:33 +0100 Subject: [PATCH 079/266] Allows disposals to end in delivery office --- code/_globalvars/lists/flavor_misc.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm index c8f0c577aadf7..5299a7fec827c 100644 --- a/code/_globalvars/lists/flavor_misc.dm +++ b/code/_globalvars/lists/flavor_misc.dm @@ -315,7 +315,9 @@ GLOBAL_LIST_INIT(TAGGERLOCATIONS, list( #if defined(UNIT_TESTS) || defined(SPACEMAN_DMM) GLOBAL_LIST_INIT(tagger_destination_areas, list( - "Disposals" = list(/area/maintenance/disposal), + // Disposals is special because it is for anything that doesn't have a tag, so we + // send it to either of these locations + "Disposals" = list(/area/maintenance/disposal, /area/quartermaster/sorting), "Cargo Bay" = list(/area/quartermaster), "QM Office" = list(/area/quartermaster/qm, /area/quartermaster/qm_bedroom), "Engineering" = list(/area/engine, /area/engineering), From f70e74c5a458e71afbd6ce164e68de9379da8960 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Fri, 30 Aug 2024 19:49:37 +0100 Subject: [PATCH 080/266] Squashed commit of the following: commit 18bbae7148b35987dd90e49105d1273784c053e8 Author: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Fri Aug 30 19:49:01 2024 +0100 Allows disposals to end in delivery office commit 565af663a73daabddf3d6fc6a4e2371c4c696a35 Author: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Fri Aug 30 19:09:53 2024 +0100 Merges 2 files together commit 195fa7cc9887ab2ea672aebfa008725f8a415732 Author: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Fri Aug 30 18:58:57 2024 +0100 Adds in mapping helpers for disposals commit 611dd96c91eeaeb6815bbae1d347e5db2b2934a2 Author: ss13-beebot <56381746+ss13-beebot@users.noreply.github.com> Date: Fri Aug 30 00:12:46 2024 +0000 Automatic changelog compile [ci skip] commit 522552aab205cd9e2878cd29d28e023d5bc8e762 Author: ss13-beebot <56381746+ss13-beebot@users.noreply.github.com> Date: Thu Aug 29 18:03:54 2024 +0000 Automatic changelog compile [ci skip] commit 1f5a444a9e512216882fdb71e518ca5262e6f16e Author: ss13-beebot <56381746+ss13-beebot@users.noreply.github.com> Date: Thu Aug 29 12:28:03 2024 -0500 Automatic changelog generation for PR #11366 [ci skip] commit c05a8ee2d98373918a7bb43fb1f834e91eed5df4 Author: Rukofamicom Date: Thu Aug 29 12:18:22 2024 -0500 Gibtonite flashes again (#11366) commit af85a212a6cfe674ea0e5f52269a2d59f7c0fa85 Author: ss13-beebot <56381746+ss13-beebot@users.noreply.github.com> Date: Thu Aug 29 17:03:19 2024 +0000 Automatic changelog compile [ci skip] commit 000ed5cf7649a074a3431397177fc496aa62e058 Author: ss13-beebot <56381746+ss13-beebot@users.noreply.github.com> Date: Thu Aug 29 11:23:27 2024 -0500 Automatic changelog generation for PR #10983 [ci skip] commit fd1e700cc41fb608dc3ec722a534c3dced7d1dab Author: Dejaku51 <40302913+Dejaku51@users.noreply.github.com> Date: Thu Aug 29 18:13:47 2024 +0200 Server framework v2 (#10983) * i don't remember what is happening * much better * just debug stuff * the ideas are coming * that shouldn't be here * it works now! * RnD servers integrated * sparks! * no more "if true return true" * reverse logic * adds ! to comments in stat.dm * clean up after yourself on Destroy() * splits early return * clean up after yourself tcomm monitoring * you too all tcomms machines * adds type holder instead of GetComponents * fix indentation * cmon indentation * HOW?! * oopsie woopsie * removes TODO and adds a comment * packet types and null on destroy * update comment * fixed radstation tcomms area + switches hub with blackbox * rebalances tcomms heat generation * fix echo tcomms cooling * that should stop funny exploit discovered by aramix * cooldown define * remove useless signal * opened machine is under maintenance * return null instead of 0 points * return false * I HATE TESTS commit 79ee7538ea52c517309af9fea10990b47aecd0c4 Author: ss13-beebot <56381746+ss13-beebot@users.noreply.github.com> Date: Thu Aug 29 00:12:28 2024 +0000 Automatic changelog compile [ci skip] commit f4028a7a2025234d4b5d9751544ce8ec240d6051 Author: ss13-beebot <56381746+ss13-beebot@users.noreply.github.com> Date: Wed Aug 28 16:03:51 2024 +0000 Automatic changelog compile [ci skip] commit ded9e053ef45ff46398ef5bee5e3b9ccbf46116a Author: ss13-beebot <56381746+ss13-beebot@users.noreply.github.com> Date: Wed Aug 28 10:18:28 2024 -0500 Automatic changelog generation for PR #11373 [ci skip] commit c95ed70fd70701b573b4da90314df2d6c2c1ffd6 Author: ClownMoff <148357670+ClownMoff@users.noreply.github.com> Date: Wed Aug 28 15:59:25 2024 +0100 Update cigarette.dm (#11373) commit a251e91529fba7328066c1f07572f1393a93bc39 Author: ss13-beebot <56381746+ss13-beebot@users.noreply.github.com> Date: Wed Aug 28 10:08:53 2024 -0500 Automatic changelog generation for PR #11387 [ci skip] commit 61b21cc07df7ed6b0baac6d0458f81c93bd3cbba Author: XeonMations <62395746+XeonMations@users.noreply.github.com> Date: Wed Aug 28 17:58:39 2024 +0300 Fixes simplemobs being able to interact with machinery (#11387) * another PR, another banger * comment moment commit 1cf494144d21689452b455484893fb275f364fb3 Author: Markus Larsson <82539179+MarkusLarsson421@users.noreply.github.com> Date: Tue Aug 27 13:17:12 2024 +0200 Delta Science Doors Fix (#11303) * Silly goose didn't use the "txt" var. * Update DeltaStation2.dmm * Update DeltaStation2.dmm * Update DeltaStation2.dmm commit ceee177c04241c34ddced7884f977e485d30b5a4 Author: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Tue Aug 27 11:35:01 2024 +0100 Boxstation mapping fixes #11364 (#11368) * Fixes 89,129 * Update BoxStation.dmm * Update BoxStation.dmm * Camera fixes * Adds in an unsorted loop to the boxstation package loop * Fixes direction of the sorting pipe * Fixes boxstation disposal issues * Fixes cameras * Fixes multiple objects stacked on top of each other * Fixes some lights placed on windows * Fixes all boxstation light issues * Update BoxStation.dmm * Fixes some lights placed on windows * Fixes all boxstation light issues commit 8d8f3f8eae4fd759ca8f55c0bb05560b87ba5476 Author: ss13-beebot <56381746+ss13-beebot@users.noreply.github.com> Date: Tue Aug 27 00:12:25 2024 +0000 Automatic changelog compile [ci skip] commit ff2162b9e0cfce9b154d7bbb171ebf7ee3f554a7 Author: ss13-beebot <56381746+ss13-beebot@users.noreply.github.com> Date: Mon Aug 26 18:11:15 2024 -0500 Automatic changelog generation for PR #11385 [ci skip] commit d1c6236fb6a10f503bec1e94d4763a988276558d Author: XeonMations <62395746+XeonMations@users.noreply.github.com> Date: Tue Aug 27 02:01:44 2024 +0300 Fuck ups of the year. (#11385) --- code/__DEFINES/pipe_construction.dm | 157 ++++++++++++++++++++++++++ code/_globalvars/lists/flavor_misc.dm | 117 ------------------- html/changelog.html | 6 + 3 files changed, 163 insertions(+), 117 deletions(-) diff --git a/code/__DEFINES/pipe_construction.dm b/code/__DEFINES/pipe_construction.dm index 41b21e5989189..609e3d8328f0f 100644 --- a/code/__DEFINES/pipe_construction.dm +++ b/code/__DEFINES/pipe_construction.dm @@ -30,3 +30,160 @@ #define STATION_TUBE_OPENING 1 #define STATION_TUBE_CLOSED 2 #define STATION_TUBE_CLOSING 3 + +// Reference list for disposal sort junctions. Set the sortType variable on disposal sort junctions to +// the index of the sort department that you want. For example, sortType set to 2 will reroute all packages +// tagged for the Cargo Bay. + +/* List of sortType codes for mapping reference +0 Waste +1 Disposals - All unwrapped items and untagged parcels get picked up by a junction with this sortType. Usually leads to the recycler. +2 Cargo Bay +3 QM Office +4 Engineering +5 CE Office +6 Atmospherics +7 Security +8 HoS Office +9 Medbay +10 CMO Office +11 Chemistry +12 Research +13 RD Office +14 Robotics +15 HoP Office +16 Library +17 Chapel +18 Theatre +19 Bar +20 Kitchen +21 Hydroponics +22 Janitor +23 Genetics +24 Testing Range +25 Toxins +26 Dormitories +27 Virology +28 Xenobiology +29 Law Office +30 Detective's Office +*/ + +//The whole system for the sorttype var is determined based on the order of this list, +//disposals must always be 1, since anything that's untagged will automatically go to disposals, or sorttype = 1 --Superxpdude + +//If you don't want to fuck up disposals, add to this list, and don't change the order. +//If you insist on changing the order, you'll have to change every sort junction to reflect the new order. --Pete + +GLOBAL_LIST_INIT(TAGGERLOCATIONS, list( + "Disposals", + "Cargo Bay", + "QM Office", + "Engineering", + "CE Office", + "Atmospherics", + "Security", + "HoS Office", + "Medbay", + "CMO Office", + "Chemistry", + "Research", + "RD Office", + "Robotics", + "HoP Office", + "Library", + "Chapel", + "Theatre", + "Bar", + "Kitchen", + "Hydroponics", + "Janitor Closet", + "Genetics", + "Testing Range", + "Toxins", + "Dormitories", + "Virology", + "Xenobiology", + "Law Office", + "Detective's Office", +)) + +#define MAPPING_HELPER_SORT(name, sort_code) /obj/structure/disposalpipe/sorting/mail/destination/##name {\ + sortType = sort_code;\ +}\ +/obj/structure/disposalpipe/sorting/mail/destination/##name/flip {\ + flip_type = /obj/structure/disposalpipe/sorting/mail;\ + icon_state = "pipe-j2s";\ + initialize_dirs = DISP_DIR_LEFT | DISP_DIR_FLIP;\ +} + +MAPPING_HELPER_SORT(disposals, 1) +MAPPING_HELPER_SORT(cargo_bay, 2) +MAPPING_HELPER_SORT(qm_office, 3) +MAPPING_HELPER_SORT(engineering, 4) +MAPPING_HELPER_SORT(ce_office, 5) +MAPPING_HELPER_SORT(atmospherics, 6) +MAPPING_HELPER_SORT(security, 7) +MAPPING_HELPER_SORT(hos_office, 8) +MAPPING_HELPER_SORT(medbay, 9) +MAPPING_HELPER_SORT(cmo_office, 10) +MAPPING_HELPER_SORT(chemistry, 11) +MAPPING_HELPER_SORT(research, 12) +MAPPING_HELPER_SORT(rd_office, 13) +MAPPING_HELPER_SORT(robotics, 14) +MAPPING_HELPER_SORT(hop_office, 15) +MAPPING_HELPER_SORT(library, 16) +MAPPING_HELPER_SORT(chapel, 17) +MAPPING_HELPER_SORT(threatre, 18) +MAPPING_HELPER_SORT(bar, 19) +MAPPING_HELPER_SORT(kitchen, 20) +MAPPING_HELPER_SORT(hydroponics, 21) +MAPPING_HELPER_SORT(janitor_closet, 22) +MAPPING_HELPER_SORT(genetics, 23) +MAPPING_HELPER_SORT(testing_range, 24) +MAPPING_HELPER_SORT(toxins, 25) +MAPPING_HELPER_SORT(dormitories, 26) +MAPPING_HELPER_SORT(virology, 27) +MAPPING_HELPER_SORT(xenobiology, 28) +MAPPING_HELPER_SORT(law_office, 29) +MAPPING_HELPER_SORT(detective_office, 30) + +#undef MAPPING_HELPER_SORT + +#if defined(UNIT_TESTS) || defined(SPACEMAN_DMM) + +GLOBAL_LIST_INIT(tagger_destination_areas, list( + "Disposals" = list(/area/maintenance/disposal, /area/quartermaster/sorting), + "Cargo Bay" = list(/area/quartermaster), + "QM Office" = list(/area/quartermaster/qm, /area/quartermaster/qm_bedroom), + "Engineering" = list(/area/engine, /area/engineering), + "CE Office" = list(/area/crew_quarters/heads/chief), + "Atmospherics" = list(/area/engine/atmos, /area/engine/atmospherics_engine), + "Security" = list(/area/security), + "HoS Office" = list(/area/crew_quarters/heads/hos), + "Medbay" = list(/area/medical), + "CMO Office" = list(/area/crew_quarters/heads/cmo), + "Chemistry" = list(/area/medical/chemistry, /area/medical/apothecary), + "Research" = list(/area/science), + "RD Office" = list(/area/crew_quarters/heads/hor), + "Robotics" = list(/area/science/robotics), + "HoP Office" = list(/area/crew_quarters/heads/hop), + "Library" = list(/area/library), + "Chapel" = list(/area/chapel), + "Theatre" = list(/area/crew_quarters/theatre), + "Bar" = list(/area/crew_quarters/bar), + "Kitchen" = list(/area/crew_quarters/kitchen), + "Hydroponics" = list(/area/hydroponics), + "Janitor Closet" = list(/area/janitor), + "Genetics" = list(/area/medical/genetics), + "Testing Range" = list(/area/science/misc_lab, /area/science/test_area, /area/science/mixing), + "Toxins" = list(/area/science/misc_lab, /area/science/test_area, /area/science/mixing), + "Dormitories" = list(/area/crew_quarters/dorms, /area/commons/dorms), + "Virology" = list(/area/medical/virology), + "Xenobiology" = list(/area/science/xenobiology), + "Law Office" = list(/area/lawoffice), + "Detective's Office" = list(/area/security/detectives_office), +)) + +#endif + diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm index 5299a7fec827c..ad4f498bb79f4 100644 --- a/code/_globalvars/lists/flavor_misc.dm +++ b/code/_globalvars/lists/flavor_misc.dm @@ -234,123 +234,6 @@ GLOBAL_LIST_INIT(scarySounds, list( 'sound/weapons/thudswoosh.ogg', )) - -// Reference list for disposal sort junctions. Set the sortType variable on disposal sort junctions to -// the index of the sort department that you want. For example, sortType set to 2 will reroute all packages -// tagged for the Cargo Bay. - -/* List of sortType codes for mapping reference -0 Waste -1 Disposals - All unwrapped items and untagged parcels get picked up by a junction with this sortType. Usually leads to the recycler. -2 Cargo Bay -3 QM Office -4 Engineering -5 CE Office -6 Atmospherics -7 Security -8 HoS Office -9 Medbay -10 CMO Office -11 Chemistry -12 Research -13 RD Office -14 Robotics -15 HoP Office -16 Library -17 Chapel -18 Theatre -19 Bar -20 Kitchen -21 Hydroponics -22 Janitor -23 Genetics -24 Testing Range -25 Toxins -26 Dormitories -27 Virology -28 Xenobiology -29 Law Office -30 Detective's Office -*/ - -//The whole system for the sorttype var is determined based on the order of this list, -//disposals must always be 1, since anything that's untagged will automatically go to disposals, or sorttype = 1 --Superxpdude - -//If you don't want to fuck up disposals, add to this list, and don't change the order. -//If you insist on changing the order, you'll have to change every sort junction to reflect the new order. --Pete - -GLOBAL_LIST_INIT(TAGGERLOCATIONS, list( - "Disposals", - "Cargo Bay", - "QM Office", - "Engineering", - "CE Office", - "Atmospherics", - "Security", - "HoS Office", - "Medbay", - "CMO Office", - "Chemistry", - "Research", - "RD Office", - "Robotics", - "HoP Office", - "Library", - "Chapel", - "Theatre", - "Bar", - "Kitchen", - "Hydroponics", - "Janitor Closet", - "Genetics", - "Testing Range", - "Toxins", - "Dormitories", - "Virology", - "Xenobiology", - "Law Office", - "Detective's Office", -)) - -#if defined(UNIT_TESTS) || defined(SPACEMAN_DMM) - -GLOBAL_LIST_INIT(tagger_destination_areas, list( - // Disposals is special because it is for anything that doesn't have a tag, so we - // send it to either of these locations - "Disposals" = list(/area/maintenance/disposal, /area/quartermaster/sorting), - "Cargo Bay" = list(/area/quartermaster), - "QM Office" = list(/area/quartermaster/qm, /area/quartermaster/qm_bedroom), - "Engineering" = list(/area/engine, /area/engineering), - "CE Office" = list(/area/crew_quarters/heads/chief), - "Atmospherics" = list(/area/engine/atmos, /area/engine/atmospherics_engine), - "Security" = list(/area/security), - "HoS Office" = list(/area/crew_quarters/heads/hos), - "Medbay" = list(/area/medical), - "CMO Office" = list(/area/crew_quarters/heads/cmo), - "Chemistry" = list(/area/medical/chemistry, /area/medical/apothecary), - "Research" = list(/area/science), - "RD Office" = list(/area/crew_quarters/heads/hor), - "Robotics" = list(/area/science/robotics), - "HoP Office" = list(/area/crew_quarters/heads/hop), - "Library" = list(/area/library), - "Chapel" = list(/area/chapel), - "Theatre" = list(/area/crew_quarters/theatre), - "Bar" = list(/area/crew_quarters/bar), - "Kitchen" = list(/area/crew_quarters/kitchen), - "Hydroponics" = list(/area/hydroponics), - "Janitor Closet" = list(/area/janitor), - "Genetics" = list(/area/medical/genetics), - "Testing Range" = list(/area/science/misc_lab, /area/science/test_area, /area/science/mixing), - "Toxins" = list(/area/science/misc_lab, /area/science/test_area, /area/science/mixing), - "Dormitories" = list(/area/crew_quarters/dorms, /area/commons/dorms), - "Virology" = list(/area/medical/virology), - "Xenobiology" = list(/area/science/xenobiology), - "Law Office" = list(/area/lawoffice), - "Detective's Office" = list(/area/security/detectives_office), -)) - -#endif - GLOBAL_LIST_INIT(station_prefixes, world.file2list("strings/station_prefixes.txt") + "") GLOBAL_LIST_INIT(station_names, world.file2list("strings/station_names.txt") + "") diff --git a/html/changelog.html b/html/changelog.html index ee03e5010776c..111050a4d2e8c 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -890,6 +890,12 @@

rkz, HowToLu/Dakae, PigeonVerde/PestoVerde, Floria/BriggsIDP,
  • adds zmimic hooks for tiles and material turfs
  • Medium buff to floor bot logic making them more discerning when repairing or placing tiles. They will now also actually repair tiles instead of always replacing them, if possible.
  • + +

    29 June 2024

    +

    spockye updated:

    +
      +
    • A couple fland station power cable and disposals fixes
    • +
    GoonStation 13 Development Team From 950f3ea7b0399652bfbf769318f39579ab75a2e0 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Fri, 30 Aug 2024 20:36:27 +0100 Subject: [PATCH 081/266] Properly disables random maint rooms if unit tests are not defined --- code/controllers/subsystem/mapping.dm | 3 +++ code/game/objects/effects/spawners/roomspawner.dm | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index a097b8881fa25..b541e27e4bb71 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -277,6 +277,7 @@ SUBSYSTEM_DEF(mapping) return parsed_maps /datum/controller/subsystem/mapping/proc/LoadStationRooms() +#ifndef UNIT_TESTS var/start_time = REALTIMEOFDAY for(var/obj/effect/spawner/room/R as() in random_room_spawners) var/list/possibletemplates = list() @@ -296,9 +297,11 @@ SUBSYSTEM_DEF(mapping) template.spawned = TRUE template.stationinitload(get_turf(R), centered = template.centerspawner) SSmapping.random_room_spawners -= R + R.after_place(null, get_turf(R), null, null) qdel(R) random_room_spawners = null INIT_ANNOUNCE("Loaded Random Rooms in [(REALTIMEOFDAY - start_time)/10]s!") +#endif /datum/controller/subsystem/mapping/proc/loadWorld() //if any of these fail, something has gone horribly, HORRIBLY, wrong diff --git a/code/game/objects/effects/spawners/roomspawner.dm b/code/game/objects/effects/spawners/roomspawner.dm index f28a35d711878..3519deb761a01 100644 --- a/code/game/objects/effects/spawners/roomspawner.dm +++ b/code/game/objects/effects/spawners/roomspawner.dm @@ -12,8 +12,10 @@ /obj/effect/spawner/room/New(loc, ...) . = ..() +#ifndef UNIT_TESTS if(!isnull(SSmapping.random_room_spawners)) SSmapping.random_room_spawners += src +#endif /obj/effect/spawner/room/Initialize(mapload) . = ..() @@ -25,7 +27,7 @@ var/turf/fix_turf = locate(x, y, main_room_turf.z) fix_turf.ChangeTurf(/turf/open/floor/plating, flags = CHANGETURF_IGNORE_AIR) return INITIALIZE_HINT_QDEL -#endif +#else if(!length(SSmapping.random_room_templates)) message_admins("Room spawner created with no templates available. This shouldn't happen.") return INITIALIZE_HINT_QDEL @@ -46,6 +48,7 @@ template.spawned = TRUE var/datum/async_map_generator/map_place/generator = template.load(get_turf(src), centered = template.centerspawner) generator.on_completion(CALLBACK(src, PROC_REF(after_place))) +#endif /obj/effect/spawner/room/proc/after_place(datum/async_map_generator/map_place/generator, turf/T, init_atmos, datum/parsed_map/parsed, finalize = TRUE, ...) // Scan through the room and remove any wall fixtures that were not placed correctly From 0d506628a9cf84e72d1c2dfe70aa9a3611c3b973 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 31 Aug 2024 07:46:17 +0100 Subject: [PATCH 082/266] Removes wallthing attachment, we will tackle this in the future --- .../unit_tests/mapping/check_wallthing_attachment.dm | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 code/modules/unit_tests/mapping/check_wallthing_attachment.dm diff --git a/code/modules/unit_tests/mapping/check_wallthing_attachment.dm b/code/modules/unit_tests/mapping/check_wallthing_attachment.dm deleted file mode 100644 index e717a945fea6e..0000000000000 --- a/code/modules/unit_tests/mapping/check_wallthing_attachment.dm +++ /dev/null @@ -1,9 +0,0 @@ -/datum/unit_test/map_test/wall_attachment/check_turf(turf/check_turf, is_map_border) - for (var/obj/placed_object in check_turf) - // Temporary hacky check to see if we contain a directional mapping helper - // I know its a normal variable, but this is explicitly accessed through reflection - if (!initial(placed_object._reflection_is_directional)) - continue - // Check to see if we correctly placed ourselves on a wall - if (!isclosedturf(get_step(placed_object, placed_object.dir))) - return "Wall object of type [placed_object.type] is not correctly attached to a wall (Should use cardinal directions only, preferably the mapping helpers)." From 2c1b9db9a18e57ec63ba7458cc6afe28368d05a3 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 31 Aug 2024 07:46:20 +0100 Subject: [PATCH 083/266] Update beestation.dme --- beestation.dme | 1 - 1 file changed, 1 deletion(-) diff --git a/beestation.dme b/beestation.dme index ca9463d697356..2b18d04f66737 100644 --- a/beestation.dme +++ b/beestation.dme @@ -4102,7 +4102,6 @@ #include "code\modules\tgui_panel\tgui_panel.dm" #include "code\modules\tooltip\tooltip.dm" #include "code\modules\unit_tests\_DEFINES\_unit_tests.dm" -#include "code\modules\unit_tests\mapping\check_wallthing_attachment.dm" #include "code\modules\uplink\uplink_devices.dm" #include "code\modules\uplink\uplink_items.dm" #include "code\modules\uplink\uplink_purchase_log.dm" From c5b595ab94f1944fa23608984e1d9c680676c442 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 31 Aug 2024 07:46:44 +0100 Subject: [PATCH 084/266] Update _unit_tests.dm --- code/modules/unit_tests/_DEFINES/_unit_tests.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/unit_tests/_DEFINES/_unit_tests.dm b/code/modules/unit_tests/_DEFINES/_unit_tests.dm index 94f40eb9e8a1a..455dcb458dc7a 100644 --- a/code/modules/unit_tests/_DEFINES/_unit_tests.dm +++ b/code/modules/unit_tests/_DEFINES/_unit_tests.dm @@ -133,7 +133,6 @@ #include "../random_ruin_mapsize.dm" #include "../walls_have_sheets.dm" #include "../worn_icons.dm" -#include "../worn_icons.dm" #ifdef REFERENCE_TRACKING_DEBUG //Don't try and parse this file if ref tracking isn't turned on. IE: don't parse ref tracking please mr linter #include "../find_reference_sanity.dm" From 4dbd94dd98fe6559ee75a1bc5b42bf629b38d7de Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 31 Aug 2024 07:48:14 +0100 Subject: [PATCH 085/266] Update check_grep.sh --- tools/ci/check_grep.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/ci/check_grep.sh b/tools/ci/check_grep.sh index d8ce9ea3dc96e..76424bbd1e74a 100755 --- a/tools/ci/check_grep.sh +++ b/tools/ci/check_grep.sh @@ -10,6 +10,8 @@ GREEN="\033[0;32m" BLUE="\033[0;34m" NC="\033[0m" # No Color +HINT_REMOVE="please remove them. (Hint: Find out which area they are in!)${NC}" + st=0 # check for ripgrep From 88d6946f671d6cc36649dd29f5c5b37a6adca8ed Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 31 Aug 2024 07:52:51 +0100 Subject: [PATCH 086/266] Ports define sanity Co-Authored-By: san7890 Co-Authored-By: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-Authored-By: Zephyr <12817816+zephyrtfa@users.noreply.github.com> --- tools/define_sanity/check.py | 104 +++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 tools/define_sanity/check.py diff --git a/tools/define_sanity/check.py b/tools/define_sanity/check.py new file mode 100644 index 0000000000000..fbbbb170fffd9 --- /dev/null +++ b/tools/define_sanity/check.py @@ -0,0 +1,104 @@ +import fnmatch +import glob +import os +import re +import sys + +parent_directory = "code/**/*.dm" + +output_file_name = "define_sanity_output.txt" +how_to_fix_message = "Please #undef the above defines or remake them as global defines in the code/__DEFINES directory." + +def green(text): + return "\033[32m" + str(text) + "\033[0m" + +def red(text): + return "\033[31m" + str(text) + "\033[0m" + +def blue(text): + return "\033[34m" + str(text) + "\033[0m" + +def post_error(define_name, file, github_error_style): + if github_error_style: + print(f"::error file={file},title=Define Sanity::{define_name} is defined locally in {file} but not undefined locally!") + else: + print(red(f"- Failure: {define_name} is defined locally in {file} but not undefined locally!")) + +# simple way to check if we're running on github actions, or on a local machine +on_github = os.getenv("GITHUB_ACTIONS") == "true" + +# This files/directories are expected to have "global" defines, so they must be exempt from this check. +# Add directories as string here to automatically be exempt in case you have a non-complaint file name. +excluded_files = [ + # Wildcard directories, all files are expected to be exempt. + "code/__DEFINES/*.dm", + "code/__HELPERS/*.dm", + "code/_globalvars/*.dm", + # TGS files come from another repository so lets not worry about them. + "code/modules/tgs/**/*.dm", +] + +define_regex = re.compile(r"(\s+)?#define\s?([A-Z0-9_]+)\(?(.+)\)?") + +files_to_scan = [] + +number_of_defines = 0 + +if not on_github: + print(blue(f"Running define sanity check outside of Github Actions.\nFor assistance, a '{output_file_name}' file will be generated at the root of your directory if any errors are detected.")) + +for code_file in glob.glob(parent_directory, recursive=True): + exempt_file = False + for exempt_directory in excluded_files: + if fnmatch.fnmatch(code_file, exempt_directory): + exempt_file = True + break + + if exempt_file: + continue + + # If the "base path" of the file starts with an underscore, it's assumed to be an encapsulated file holding references to the other files in its folder and is exempt from the checks. + if os.path.basename(code_file)[0] == "_": + continue + + files_to_scan.append(code_file) + +located_error_tuples = [] + +for applicable_file in files_to_scan: + with open(applicable_file, encoding="utf8") as file: + file_contents = file.read() + for define in define_regex.finditer(file_contents): + number_of_defines += 1 + define_name = define.group(2) + if not re.search("#undef\s" + define_name, file_contents): + located_error_tuples.append((define_name, applicable_file)) + +if number_of_defines == 0: + print(red("No defines found! This is likely an error.")) + sys.exit(1) + +if number_of_defines <= 1000: + print(red(f"Only found {number_of_defines} defines! Something has likely gone wrong as the number of local defines should not be this low.")) + sys.exit(1) + +if len(located_error_tuples): + + string_list = [] + for error in located_error_tuples: + if not on_github: + post_error(error[0], error[1], False) + string_list.append(f"{error[0]} is defined locally in {error[1]} but not undefined locally!") + else: + post_error(error[0], error[1], True) + + if len(string_list): + with open(output_file_name, "w") as output_file: + output_file.write("\n".join(string_list)) + output_file.write("\n\n" + how_to_fix_message) + + print(red(how_to_fix_message)) + sys.exit(1) + +else: + print(green(f"No unhandled local defines found (found {number_of_defines} defines).")) From 609b7107948cbb408fcd5bc0dbb62d837c1c4e5a Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 31 Aug 2024 08:08:46 +0100 Subject: [PATCH 087/266] [TEST]: Fixes room spawner clearing outside of its bounds --- code/game/objects/effects/spawners/roomspawner.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/game/objects/effects/spawners/roomspawner.dm b/code/game/objects/effects/spawners/roomspawner.dm index 3519deb761a01..435bbc8e4783b 100644 --- a/code/game/objects/effects/spawners/roomspawner.dm +++ b/code/game/objects/effects/spawners/roomspawner.dm @@ -22,8 +22,8 @@ #ifdef UNIT_TESTS // These are far too flakey to be including in the tests var/turf/main_room_turf = get_turf(src) - for (var/x in main_room_turf.x to main_room_turf.x + room_width) - for (var/y in main_room_turf.y to main_room_turf.y + room_height) + for (var/x in main_room_turf.x to main_room_turf.x + room_width - 1) + for (var/y in main_room_turf.y to main_room_turf.y + room_height - 1) var/turf/fix_turf = locate(x, y, main_room_turf.z) fix_turf.ChangeTurf(/turf/open/floor/plating, flags = CHANGETURF_IGNORE_AIR) return INITIALIZE_HINT_QDEL @@ -52,8 +52,8 @@ /obj/effect/spawner/room/proc/after_place(datum/async_map_generator/map_place/generator, turf/T, init_atmos, datum/parsed_map/parsed, finalize = TRUE, ...) // Scan through the room and remove any wall fixtures that were not placed correctly - for (var/x in T.x to T.x + room_width) - for (var/y in T.y to T.y + room_height) + for (var/x in T.x to T.x + room_width - 1) + for (var/y in T.y to T.y + room_height - 1) var/turf/current = locate(x, y, T.z) for (var/obj/placed_object in current) // Temporary hacky check to see if we contain a directional mapping helper From e525e85130d10a962adf81b930f7d7d8cbc8d1db Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 31 Aug 2024 08:19:52 +0100 Subject: [PATCH 088/266] Fixes APC checks --- code/__DEFINES/flags.dm | 2 ++ code/game/area/areas/holodeck.dm | 2 +- code/modules/unit_tests/mapping/check_area_apc.dm | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index b849ed37652c6..6fbe8b5e1f817 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -109,6 +109,8 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define XENOBIOLOGY_COMPATIBLE (1<<9) /// Are hidden stashes allowed to spawn here? #define HIDDEN_STASH_LOCATION (1<<10) +/// Indicates that this area uses an APC from another location (Skips the unit tests for APCs) +#define REMOTE_APC (1<<11) /* These defines are used specifically with the atom/pass_flags bitmask diff --git a/code/game/area/areas/holodeck.dm b/code/game/area/areas/holodeck.dm index f3d86a10ef718..a5e04b3910ec2 100644 --- a/code/game/area/areas/holodeck.dm +++ b/code/game/area/areas/holodeck.dm @@ -3,7 +3,7 @@ icon_state = "holodeck" dynamic_lighting = DYNAMIC_LIGHTING_DISABLED flags_1 = NONE - area_flags = HIDDEN_STASH_LOCATION | VALID_TERRITORY | UNIQUE_AREA | HIDDEN_AREA + area_flags = HIDDEN_STASH_LOCATION | VALID_TERRITORY | UNIQUE_AREA | HIDDEN_AREA | REMOTE_APC sound_environment = SOUND_ENVIRONMENT_PADDED_CELL var/obj/machinery/computer/holodeck/linked diff --git a/code/modules/unit_tests/mapping/check_area_apc.dm b/code/modules/unit_tests/mapping/check_area_apc.dm index 2a9d7cd995d86..9d95cbe9a4ac1 100644 --- a/code/modules/unit_tests/mapping/check_area_apc.dm +++ b/code/modules/unit_tests/mapping/check_area_apc.dm @@ -3,7 +3,7 @@ if (check_area.apc && check_area.always_unpowered) return "APC found in an always unpowered area" // If you have power then I guess you pass - if (check_area.powered(AREA_USAGE_ENVIRON)) + if (check_area.area_flags & REMOTE_APC) return // Otherwise, make sure we need power if (!check_area.apc && !check_area.always_unpowered) From ed036592521c27508780e35124578d63d483ae41 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 31 Aug 2024 08:23:07 +0100 Subject: [PATCH 089/266] Allow CI building to have 515 for OD compilation --- code/__byond_version_compat.dm | 2 +- code/_compile_options.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/__byond_version_compat.dm b/code/__byond_version_compat.dm index 0b6ff6cad451e..51f8ca63aaafa 100644 --- a/code/__byond_version_compat.dm +++ b/code/__byond_version_compat.dm @@ -20,7 +20,7 @@ /savefile/byond_version = MIN_COMPILER_VERSION #endif -#ifdef FASTDMM +#ifdef FASTDMM || defined(CIBUILDING) #define YES_I_WANT_515 #endif // Temporary 515 block until it is completely compatible. diff --git a/code/_compile_options.dm b/code/_compile_options.dm index 931aa9e059103..2b6dc6805df42 100644 --- a/code/_compile_options.dm +++ b/code/_compile_options.dm @@ -138,7 +138,7 @@ #define CBT #endif -#if defined(OPENDREAM) +#if defined(OPENDREAM) && !defined(CIBUILDING) #error Compiling BeeStation in OpenDream is unsupported due to BeeStation's dependence on the auxtools DLL to function. #elif !defined(CBT) && !defined(SPACEMAN_DMM) && !defined(FASTDMM) #warn Building with Dream Maker is no longer supported and will result in missing interface files. From 3f4ca83d84fb6e11d325041a463341f83ad64c37 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 31 Aug 2024 08:26:31 +0100 Subject: [PATCH 090/266] Removes some unused files --- code/__DEFINES/{_readme.dm => README.md} | 0 code/__HELPERS/unused.dm | 39 -- code/datums/components/alert_research.dm | 0 code/datums/components/archaeology.dm | 101 ---- code/game/gamemodes/gangs/dominator.dm | 241 ---------- code/game/objects/effects/water_ripple.dm | 18 - code/modules/admin/create_poll.dm | 143 ------ .../antagonists/disease/disease_abilities.dm | 444 ------------------ code/modules/events/floorcluwne.dm | 22 - code/modules/events/wizard/embeddies.dm | 46 -- code/modules/holiday/halloween.dm | 263 ----------- code/modules/multiz/movement/atom/climbing.dm | 17 - 12 files changed, 1334 deletions(-) rename code/__DEFINES/{_readme.dm => README.md} (100%) delete mode 100644 code/__HELPERS/unused.dm delete mode 100644 code/datums/components/alert_research.dm delete mode 100644 code/datums/components/archaeology.dm delete mode 100644 code/game/gamemodes/gangs/dominator.dm delete mode 100644 code/game/objects/effects/water_ripple.dm delete mode 100644 code/modules/admin/create_poll.dm delete mode 100644 code/modules/antagonists/disease/disease_abilities.dm delete mode 100644 code/modules/events/floorcluwne.dm delete mode 100644 code/modules/events/wizard/embeddies.dm delete mode 100644 code/modules/holiday/halloween.dm delete mode 100644 code/modules/multiz/movement/atom/climbing.dm diff --git a/code/__DEFINES/_readme.dm b/code/__DEFINES/README.md similarity index 100% rename from code/__DEFINES/_readme.dm rename to code/__DEFINES/README.md diff --git a/code/__HELPERS/unused.dm b/code/__HELPERS/unused.dm deleted file mode 100644 index fce25720b7513..0000000000000 --- a/code/__HELPERS/unused.dm +++ /dev/null @@ -1,39 +0,0 @@ - - -/datum/projectile_data - var/src_x - var/src_y - var/time - var/distance - var/power_x - var/power_y - var/dest_x - var/dest_y - -/datum/projectile_data/New(var/src_x, var/src_y, var/time, var/distance, \ - var/power_x, var/power_y, var/dest_x, var/dest_y) - src.src_x = src_x - src.src_y = src_y - src.time = time - src.distance = distance - src.power_x = power_x - src.power_y = power_y - src.dest_x = dest_x - src.dest_y = dest_y - -/proc/projectile_trajectory(src_x, src_y, rotation, angle, power) - - // returns the destination (Vx,y) that a projectile shot at [src_x], [src_y], with an angle of [angle], - // rotated at [rotation] and with the power of [power] - // Thanks to VistaPOWA for this function - - var/power_x = power * cos(angle) - var/power_y = power * sin(angle) - var/time = 2* power_y / 10 //10 = g - - var/distance = time * power_x - - var/dest_x = src_x + distance*sin(rotation); - var/dest_y = src_y + distance*cos(rotation); - - return new /datum/projectile_data(src_x, src_y, time, distance, power_x, power_y, dest_x, dest_y) diff --git a/code/datums/components/alert_research.dm b/code/datums/components/alert_research.dm deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/code/datums/components/archaeology.dm b/code/datums/components/archaeology.dm deleted file mode 100644 index 5eb8eeed65cc2..0000000000000 --- a/code/datums/components/archaeology.dm +++ /dev/null @@ -1,101 +0,0 @@ -/datum/component/archaeology - dupe_mode = COMPONENT_DUPE_UNIQUE - var/list/archdrops = list(/obj/item/bikehorn = list(ARCH_PROB = 100, ARCH_MAXDROP = 1)) // honk~ - var/prob2drop - var/dug - var/datum/callback/callback - -/datum/component/archaeology/Initialize(list/_archdrops = list(), datum/callback/_callback) - archdrops = _archdrops - for(var/i in archdrops) - if(isnull(archdrops[i][ARCH_MAXDROP])) - archdrops[i][ARCH_MAXDROP] = 1 - stack_trace("ARCHAEOLOGY WARNING: [parent] contained a null max_drop value in [i].") - if(isnull(archdrops[i][ARCH_PROB])) - archdrops[i][ARCH_PROB] = 100 - stack_trace("ARCHAEOLOGY WARNING: [parent] contained a null probability value in [i].") - callback = _callback - RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, PROC_REF(Dig)) - RegisterSignal(parent, COMSIG_ATOM_EX_ACT, PROC_REF(BombDig)) - RegisterSignal(parent, COMSIG_ATOM_SING_PULL, PROC_REF(SingDig)) - -/datum/component/archaeology/InheritComponent(datum/component/archaeology/A, i_am_original) - var/list/other_archdrops = A.archdrops - var/list/_archdrops = archdrops - for(var/I in other_archdrops) - _archdrops[I] += other_archdrops[I] - -/datum/component/archaeology/proc/Dig(datum/source, obj/item/I, mob/living/user) - SIGNAL_HANDLER - - if(dug) - to_chat(user, "Looks like someone has dug here already.") - return - - if(!isturf(user.loc)) - return - - if(I.tool_behaviour == TOOL_SHOVEL || I.tool_behaviour == TOOL_MINING) - to_chat(user, "You start digging...") - - if(I.use_tool(parent, user, 40, volume=50)) - to_chat(user, "You dig a hole.") - gets_dug() - dug = TRUE - SSblackbox.record_feedback("tally", "pick_used_mining", 1, I.type) - return COMPONENT_NO_AFTERATTACK - -/datum/component/archaeology/proc/gets_dug() - if(dug) - return - else - var/turf/open/OT = get_turf(parent) - for(var/thing in archdrops) - var/maxtodrop = archdrops[thing][ARCH_MAXDROP] - for(var/i in 1 to maxtodrop) - if(prob(archdrops[thing][ARCH_PROB])) // can't win them all! - new thing(OT) - - if(isopenturf(OT)) - if(OT.postdig_icon_change) - if(istype(OT, /turf/open/floor/plating/asteroid/) && !OT.postdig_icon) - var/turf/open/floor/plating/asteroid/AOT = parent - AOT.icon_plating = "[AOT.environment_type]_dug" - AOT.icon_state = "[AOT.environment_type]_dug" - else - if(isplatingturf(OT)) - var/turf/open/floor/plating/POT = parent - POT.icon_plating = "[POT.postdig_icon]" - POT.icon_state = "[OT.postdig_icon]" - - if(OT.slowdown) //Things like snow slow you down until you dig them. - OT.slowdown = 0 - dug = TRUE - if(callback) - callback.Invoke() - -/datum/component/archaeology/proc/SingDig(datum/source, S, current_size) - SIGNAL_HANDLER - - switch(current_size) - if(STAGE_THREE) - if(prob(30)) - gets_dug() - if(STAGE_FOUR) - if(prob(50)) - gets_dug() - else - if(current_size >= STAGE_FIVE && prob(70)) - gets_dug() - -/datum/component/archaeology/proc/BombDig(datum/source, severity, target) - SIGNAL_HANDLER - - switch(severity) - if(3) - return - if(2) - if(prob(20)) - gets_dug() - if(1) - gets_dug() diff --git a/code/game/gamemodes/gangs/dominator.dm b/code/game/gamemodes/gangs/dominator.dm deleted file mode 100644 index 7d9a88b0f97dd..0000000000000 --- a/code/game/gamemodes/gangs/dominator.dm +++ /dev/null @@ -1,241 +0,0 @@ -#define DOM_BLOCKED_SPAM_CAP 6 -#define DOM_REQUIRED_TURFS 30 -#define DOM_HULK_HITS_REQUIRED 10 - -/obj/machinery/dominator - name = "dominator" - desc = "A visibly sinister device. Looks like you can break it if you hit it enough." - icon = 'icons/obj/machines/dominator.dmi' - icon_state = "dominator" - density = TRUE - anchored = TRUE - layer = HIGH_OBJ_LAYER - max_integrity = 300 - max_hit_damage = 30 - integrity_failure = 0.33 - move_resist = INFINITY - armor = list(MELEE = 20, BULLET = 50, LASER = 50, ENERGY = 50, BOMB = 10, BIO = 100, RAD = 100, FIRE = 10, ACID = 70, STAMINA = 0, BLEED = 0) - var/datum/team/gang/gang - var/operating = FALSE //false=standby or broken, true=takeover - var/warned = FALSE //if this device has set off the warning at <3 minutes yet - var/spam_prevention = DOM_BLOCKED_SPAM_CAP //first message is immediate - var/datum/effect_system/spark_spread/spark_system - var/obj/effect/countdown/dominator/countdown - -/obj/machinery/dominator/Initialize(mapload) - . = ..() - set_light(2) - AddElement(/datum/element/point_of_interest) - spark_system = new - spark_system.set_up(5, TRUE, src) - countdown = new(src) - update_icon() - -/obj/machinery/dominator/Destroy() - if(!(stat & BROKEN)) - set_broken() - gang = null - QDEL_NULL(spark_system) - QDEL_NULL(countdown) - return ..() - -/obj/machinery/dominator/emp_act(severity) - take_damage(100, BURN, ENERGY, 0) - ..() - -/obj/machinery/dominator/hulk_damage() - return (max_integrity - integrity_failure) / DOM_HULK_HITS_REQUIRED - -/obj/machinery/dominator/tesla_act() - qdel(src) - -/obj/machinery/dominator/update_icon() - cut_overlays() - if(!(stat & BROKEN)) - icon_state = "dominator-active" - if(operating) - var/mutable_appearance/dominator_overlay = mutable_appearance('icons/obj/machines/dominator.dmi', "dominator-overlay") - if(gang) - dominator_overlay.color = gang.color - add_overlay(dominator_overlay) - else - icon_state = "dominator" - if(obj_integrity/max_integrity < 0.66) - add_overlay("damage") - else - icon_state = "dominator-broken" - -/obj/machinery/dominator/examine(mob/user) - ..() - if(stat & BROKEN) - return - - if(gang && gang.domination_time != NOT_DOMINATING) - if(gang.domination_time > world.time) - to_chat(user, "Hostile Takeover in progress. Estimated [gang.domination_time_remaining()] seconds remain.") - else - to_chat(user, "Hostile Takeover of [station_name()] successful. Have a great day.") - else - to_chat(user, "System on standby.") - to_chat(user, "System Integrity: [round((obj_integrity/max_integrity)*100,1)]%") - -/obj/machinery/dominator/process() - if(gang && gang.domination_time != NOT_DOMINATING) - var/time_remaining = gang.domination_time_remaining() - if(time_remaining > 0) - if(excessive_walls_check()) - gang.domination_time += 20 - playsound(loc, 'sound/machines/buzz-two.ogg', 50, 0) - if(spam_prevention < DOM_BLOCKED_SPAM_CAP) - spam_prevention++ - else - gang.message_gangtools("Warning: There are too many walls around your gang's dominator, its signal is being blocked!") - say("Error: Takeover signal is currently blocked! There are too many walls within 3 standard units of this device.") - spam_prevention = 0 - return - . = TRUE - playsound(loc, 'sound/items/timer.ogg', 10, 0) - if(!warned && (time_remaining < 180)) - warned = TRUE - var/area/domloc = get_area(loc) - gang.message_gangtools("Less than 3 minutes remains in hostile takeover. Defend your dominator at [domloc.map_name]!") - for(var/G in GLOB.gangs) - var/datum/team/gang/tempgang = G - if(tempgang != gang) - tempgang.message_gangtools("WARNING: [gang.name] Gang takeover imminent. Their dominator at [domloc.map_name] must be destroyed!",1,1) - else - Cinematic(CINEMATIC_MALF,world) - gang.winner = TRUE - SSticker.force_ending = TRUE - - if(!.) - return PROCESS_KILL - -/obj/machinery/dominator/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) - switch(damage_type) - if(BRUTE) - if(damage_amount) - playsound(src, 'sound/effects/bang.ogg', 50, 1) - else - playsound(loc, 'sound/weapons/tap.ogg', 50, 1) - if(BURN) - playsound(src.loc, 'sound/items/welder.ogg', 100, 1) - -/obj/machinery/dominator/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) - . = ..() - if(.) - if(obj_integrity/max_integrity > 0.66) - if(prob(damage_amount*2)) - spark_system.start() - else if(!(stat & BROKEN)) - spark_system.start() - update_icon() - - -/obj/machinery/dominator/obj_break(damage_flag) - if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1)) - set_broken() - -/obj/machinery/dominator/deconstruct(disassembled = TRUE) - if(!(flags_1 & NODECONSTRUCT_1)) - if(!(stat & BROKEN)) - set_broken() - new /obj/item/stack/sheet/plasteel(src.loc) - qdel(src) - -/obj/machinery/dominator/attacked_by(obj/item/I, mob/living/user) - add_fingerprint(user) - ..() - -/obj/machinery/dominator/attack_hand(mob/user) - if(operating || (stat & BROKEN)) - examine(user) - return - - var/datum/team/gang/tempgang - - var/datum/antagonist/gang/GA = user.mind.has_antag_datum(/datum/antagonist/gang) - if(GA) - tempgang = GA.gang - if(!tempgang) - examine(user) - return - - if(tempgang.domination_time != NOT_DOMINATING) - to_chat(user, "Error: Hostile Takeover is already in progress.") - return - - if(!tempgang.dom_attempts) - to_chat(user, "Error: Unable to breach station network. Firewall has logged our signature and is blocking all further attempts.") - return - - var/time = round(tempgang.determine_domination_time()/60,0.1) - if(alert(user,"A takeover will require [time] minutes.\nYour gang will be unable to gain influence while it is active.\nThe entire station will likely be alerted to it once it starts.\nYou have [tempgang.dom_attempts] attempt(s) remaining. Are you ready?","Confirm","Ready","Later") == "Ready") - if((tempgang.domination_time != NOT_DOMINATING) || !tempgang.dom_attempts || !in_range(src, user) || !isturf(loc)) - return 0 - - var/area/A = get_area(loc) - var/locname = A.map_name - - gang = tempgang - gang.dom_attempts -- - priority_announce("Network breach detected in [locname]. The [gang.name] Gang is attempting to seize control of the station!", "Network Alert", SSstation.announcer.get_rand_alert_sound()) - gang.domination() - SSshuttle.registerHostileEnvironment(src) - name = "[gang.name] Gang [name]" - operating = TRUE - update_icon() - - countdown.color = gang.color - countdown.start() - - set_light(3) - START_PROCESSING(SSmachines, src) - - gang.message_gangtools("Hostile takeover in progress: Estimated [time] minutes until victory.[gang.dom_attempts ? "" : " This is your final attempt."]") - for(var/G in GLOB.gangs) - var/datum/team/gang/vagos = G - if(vagos != gang) - vagos.message_gangtools("Enemy takeover attempt detected in [locname]: Estimated [time] minutes until our defeat.",1,1) - -/obj/machinery/dominator/proc/excessive_walls_check() // why the fuck was this even a global proc... - var/open = FALSE - if(isclosedturf(loc)) - return TRUE - for(var/turf/open/T in view(3, src)) - open++ - if(open < DOM_REQUIRED_TURFS) - return TRUE - else - return FALSE - -/obj/machinery/dominator/proc/set_broken() - if(gang) - gang.domination_time = NOT_DOMINATING - - var/takeover_in_progress = FALSE - for(var/G in GLOB.gangs) - var/datum/team/gang/ballas = G - if(ballas.domination_time != NOT_DOMINATING) - takeover_in_progress = TRUE - break - if(!takeover_in_progress) - var/was_stranded = SSshuttle.emergency.mode == SHUTTLE_STRANDED - if(!was_stranded) - priority_announce("All hostile activity within station systems has ceased.","Network Alert", SSstation.announcer.get_rand_alert_sound()) - - if(get_security_level() == "delta") - SSsecurity_level.set_level(SEC_LEVEL_RED) - - SSshuttle.clearHostileEnvironment(src) - gang.message_gangtools("Hostile takeover cancelled: Dominator is no longer operational.[gang.dom_attempts ? " You have [gang.dom_attempts] attempt remaining." : " The station network will have likely blocked any more attempts by us."]",1,1) - - set_light(0) - operating = FALSE - stat |= BROKEN - update_icon() - STOP_PROCESSING(SSmachines, src) - -#undef DOM_BLOCKED_SPAM_CAP -#undef DOM_REQUIRED_TURFS -#undef DOM_HULK_HITS_REQUIRED diff --git a/code/game/objects/effects/water_ripple.dm b/code/game/objects/effects/water_ripple.dm deleted file mode 100644 index f98810b8e066c..0000000000000 --- a/code/game/objects/effects/water_ripple.dm +++ /dev/null @@ -1,18 +0,0 @@ -/obj/effect/water_ripple - icon_state = "water_ripple" - mouse_opacity = MOUSE_OPACITY_TRANSPARENT - blend_mode = BLEND_ADD - plane = FLOOR_PLANE - ///What color is our water? - This IS distinct for our color - var/water_color = "#fff" - -/obj/effect/water_ripple/blue - water_color = "#7cd5ff" - -/obj/effect/water_ripple/Initialize(mapload) - . = ..() - //Build color overlay - var/mutable_appearance/MA = mutable_appearance(icon, "solid") - MA.blend_mode = BLEND_MULTIPLY - MA.color = water_color - add_overlay(MA) diff --git a/code/modules/admin/create_poll.dm b/code/modules/admin/create_poll.dm deleted file mode 100644 index 73af3da700519..0000000000000 --- a/code/modules/admin/create_poll.dm +++ /dev/null @@ -1,143 +0,0 @@ -/client/proc/create_poll() - set name = "Create Poll" - set category = "Adminbus" - if(!check_rights(R_POLL)) - return - if(!SSdbcore.Connect()) - to_chat(src, "Failed to establish database connection.") - return - var/polltype = input("Choose poll type.","Poll Type") as null|anything in list("Single Option","Text Reply","Rating","Multiple Choice", "Instant Runoff Voting") - var/choice_amount = 0 - switch(polltype) - if("Single Option") - polltype = POLLTYPE_OPTION - if("Text Reply") - polltype = POLLTYPE_TEXT - if("Rating") - polltype = POLLTYPE_RATING - if("Multiple Choice") - polltype = POLLTYPE_MULTI - choice_amount = input("How many choices should be allowed?","Select choice amount") as num|null - switch(choice_amount) - if(0) - to_chat(src, "Multiple choice poll must have at least one choice allowed.") - return - if(1) - polltype = POLLTYPE_OPTION - if(null) - return - if ("Instant Runoff Voting") - polltype = POLLTYPE_IRV - else - return 0 - var/starttime = SQLtime() - var/endtime = capped_input(usr, "Set end time for poll as format YYYY-MM-DD HH:MM:SS. All times in server time. HH:MM:SS is optional and 24-hour. Must be later than starting time for obvious reasons.", "Set end time", SQLtime()) - if(!endtime) - return - var/datum/db_query/query_validate_time = SSdbcore.NewQuery("SELECT IF(STR_TO_DATE('[endtime]','%Y-%c-%d %T') > NOW(), STR_TO_DATE('[endtime]','%Y-%c-%d %T'), 0)") - if(!query_validate_time.warn_execute() || QDELETED(usr) || !src) - qdel(query_validate_time) - return - if(query_validate_time.NextRow()) - var/checktime = text2num(query_validate_time.item[1]) - if(!checktime) - to_chat(src, "Datetime entered is improperly formatted or not later than current server time.") - qdel(query_validate_time) - return - endtime = query_validate_time.item[1] - qdel(query_validate_time) - var/adminonly - switch(alert("Admin only poll?",,"Yes","No","Cancel")) - if("Yes") - adminonly = 1 - if("No") - adminonly = 0 - else - return - var/dontshow - switch(alert("Hide poll results from tracking until completed?",,"Yes","No","Cancel")) - if("Yes") - dontshow = 1 - if("No") - dontshow = 0 - else - return - var/sql_ckey = sanitizeSQL(ckey) - var/question = capped_multiline_input(usr, "Write your question","Question") - if(!question) - return - var/list/sql_option_list = list() - if(polltype != POLLTYPE_TEXT) - var/add_option = 1 - while(add_option) - var/option = capped_multiline_input(usr, "Write your option","Option") - if(!option) - return - var/default_percentage_calc = 0 - if(polltype != POLLTYPE_IRV) - switch(alert("Should this option be included by default when poll result percentages are generated?",,"Yes","No","Cancel")) - if("Yes") - default_percentage_calc = 1 - if("No") - default_percentage_calc = 0 - else - return - var/minval = 0 - var/maxval = 0 - var/descmin = "" - var/descmid = "" - var/descmax = "" - if(polltype == POLLTYPE_RATING) - minval = input("Set minimum rating value.","Minimum rating") as num|null - if(minval == null) - return - maxval = input("Set maximum rating value.","Maximum rating") as num|null - if(minval >= maxval) - to_chat(src, "Maximum rating value can't be less than or equal to minimum rating value") - continue - else if(maxval == null) - return - descmin = capped_multiline_input(src, "Optional: Set description for minimum rating","Minimum rating description") - if(descmin == null) - return - descmid = capped_multiline_input(src, "Optional: Set description for median rating","Median rating description") - if(descmid == null) - return - descmax = capped_multiline_input(src, "Optional: Set description for maximum rating","Maximum rating description") - if(descmax == null) - return - sql_option_list += list(list("text" = "'[option]'", "minval" = "'[minval]'", "maxval" = "'[maxval]'", "descmin" = "'[descmin]'", "descmid" = "'[descmid]'", "descmax" = "'[descmax]'", "default_percentage_calc" = "'[default_percentage_calc]'")) - switch(alert(" ",,"Add option","Finish", "Cancel")) - if("Add option") - add_option = 1 - if("Finish") - add_option = 0 - else - return 0 - - var/minimum_player_playtime = input("Minimum player playtime to vote (in hours)","Minimum playtime") as num|null - if (minimum_player_playtime == null) - minimum_player_playtime = 0 - minimum_player_playtime = min(minimum_player_playtime, 100) //max 100 hours - - var/m1 = "[key_name(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"] - Question: [question]" - var/m2 = "[key_name_admin(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"]
    Question: [question]" - var/datum/db_query/query_polladd_question = SSdbcore.NewQuery("INSERT INTO [format_table_name("poll_question")] (polltype, starttime, endtime, question, adminonly, multiplechoiceoptions, createdby_ckey, createdby_ip, dontshow, minimumplaytime) VALUES ('[polltype]', '[starttime]', '[endtime]', '[question]', '[adminonly]', '[choice_amount]', '[sql_ckey]', INET_ATON('[address]'), '[dontshow]', '[minimum_player_playtime]')") - if(!query_polladd_question.warn_execute()) - qdel(query_polladd_question) - return - qdel(query_polladd_question) - if(polltype != POLLTYPE_TEXT) - var/pollid = 0 - var/datum/db_query/query_get_id = SSdbcore.NewQuery("SELECT LAST_INSERT_ID()") - if(!query_get_id.warn_execute()) - qdel(query_get_id) - return - if(query_get_id.NextRow()) - pollid = query_get_id.item[1] - qdel(query_get_id) - for(var/list/i in sql_option_list) - i |= list("pollid" = "'[pollid]'") - SSdbcore.MassInsert(format_table_name("poll_option"), sql_option_list, warn = 1) - log_admin(m1) - message_admins(m2) diff --git a/code/modules/antagonists/disease/disease_abilities.dm b/code/modules/antagonists/disease/disease_abilities.dm deleted file mode 100644 index 651bd9e76d793..0000000000000 --- a/code/modules/antagonists/disease/disease_abilities.dm +++ /dev/null @@ -1,444 +0,0 @@ -/* -Abilities that can be purchased by disease mobs. Most are just passive symptoms that will be -added to their disease, but some are active abilites that affect only the target the overmind -is currently following. -*/ - -GLOBAL_LIST_INIT(disease_ability_singletons, list( -new /datum/disease_ability/action/cough, -new /datum/disease_ability/action/sneeze, -new /datum/disease_ability/action/infect, -new /datum/disease_ability/symptom/mild/cough, -new /datum/disease_ability/symptom/mild/sneeze, -new /datum/disease_ability/symptom/medium/beard, -new /datum/disease_ability/symptom/medium/hallucigen, -new /datum/disease_ability/symptom/medium/confusion, -new /datum/disease_ability/symptom/medium/vomit, -new /datum/disease_ability/symptom/medium/voice_change, -new /datum/disease_ability/symptom/medium/visionloss, -new /datum/disease_ability/symptom/medium/deafness, -new /datum/disease_ability/symptom/powerful/narcolepsy, -new /datum/disease_ability/symptom/medium/fever, -new /datum/disease_ability/symptom/medium/shivering, -new /datum/disease_ability/symptom/medium/headache, -new /datum/disease_ability/symptom/medium/nano_boost, -new /datum/disease_ability/symptom/medium/nano_destroy, -new /datum/disease_ability/symptom/medium/viraladaptation, -new /datum/disease_ability/symptom/medium/viralevolution, -new /datum/disease_ability/symptom/medium/vitiligo, -new /datum/disease_ability/symptom/medium/revitiligo, -new /datum/disease_ability/symptom/medium/itching, -new /datum/disease_ability/symptom/medium/heal/weight_loss, -new /datum/disease_ability/symptom/medium/heal/sensory_restoration, -new /datum/disease_ability/symptom/medium/heal/mind_restoration, -new /datum/disease_ability/symptom/powerful/fire, -new /datum/disease_ability/symptom/powerful/flesh_eating, -new /datum/disease_ability/symptom/powerful/genetic_mutation, -new /datum/disease_ability/symptom/powerful/inorganic_adaptation, -new /datum/disease_ability/symptom/powerful/heal/oxygen, -new /datum/disease_ability/symptom/powerful/heal/chem, -new /datum/disease_ability/symptom/powerful/heal/coma, -new /datum/disease_ability/symptom/powerful/heal/teleport, -new /datum/disease_ability/symptom/powerful/heal/growth, -new /datum/disease_ability/symptom/powerful/heal/EMP, -new /datum/disease_ability/symptom/powerful/heal/sweat, -new /datum/disease_ability/symptom/powerful/wizarditis, -new /datum/disease_ability/symptom/medium/pierrot, -new /datum/disease_ability/symptom/medium/cockroach, -new /datum/disease_ability/symptom/powerful/youth -)) - -/datum/disease_ability - var/name - var/cost = 0 - var/required_total_points = 0 - var/start_with = FALSE - var/short_desc = "" - var/long_desc = "" - var/stat_block = "" - var/threshold_block = "" - var/category = "" - - var/list/symptoms - var/list/actions - -/datum/disease_ability/New() - ..() - if(symptoms) - var/stealth = 0 - var/resistance = 0 - var/stage_speed = 0 - var/transmission = 0 - for(var/T in symptoms) - var/datum/symptom/S = T - stealth += initial(S.stealth) - resistance += initial(S.resistance) - stage_speed += initial(S.stage_speed) - transmission += initial(S.transmission) - threshold_block += "

    [initial(S.threshold_desc)]" - stat_block = "Resistance: [resistance]
    Stealth: [stealth]
    Stage Speed: [stage_speed]
    Transmissibility: [transmission]

    " - if(symptoms.len == 1) //lazy boy's dream - name = initial(S.name) - if(short_desc == "") - short_desc = initial(S.desc) - if(long_desc == "") - long_desc = initial(S.desc) - -/datum/disease_ability/proc/CanBuy(mob/camera/disease/D) - if(world.time < D.next_adaptation_time) - return FALSE - if(!D.unpurchased_abilities[src]) - return FALSE - return (D.points >= cost) && (D.total_points >= required_total_points) - -/datum/disease_ability/proc/Buy(mob/camera/disease/D, silent = FALSE, trigger_cooldown = TRUE) - if(!silent) - to_chat(D, "Purchased [name].") - D.points -= cost - D.unpurchased_abilities -= src - if(trigger_cooldown) - D.adapt_cooldown() - D.purchased_abilities[src] = TRUE - for(var/V in (D.disease_instances+D.disease_template)) - var/datum/disease/advance/sentient_disease/SD = V - if(symptoms) - for(var/T in symptoms) - var/datum/symptom/S = new T() - SD.symptoms += S - if(SD.processing) - S.Start(SD) - SD.Refresh() - for(var/T in actions) - var/datum/action/A = new T() - A.Grant(D) - - -/datum/disease_ability/proc/CanRefund(mob/camera/disease/D) - if(world.time < D.next_adaptation_time) - return FALSE - return D.purchased_abilities[src] - -/datum/disease_ability/proc/Refund(mob/camera/disease/D, silent = FALSE, trigger_cooldown = TRUE) - if(!silent) - to_chat(D, "Refunded [name].") - D.points += cost - D.unpurchased_abilities[src] = TRUE - if(trigger_cooldown) - D.adapt_cooldown() - D.purchased_abilities -= src - for(var/V in (D.disease_instances+D.disease_template)) - var/datum/disease/advance/sentient_disease/SD = V - if(symptoms) - for(var/T in symptoms) - var/datum/symptom/S = locate(T) in SD.symptoms - if(S) - SD.symptoms -= S - if(SD.processing) - S.End(SD) - qdel(S) - SD.Refresh() - for(var/T in actions) - var/datum/action/A = locate(T) in D.actions - qdel(A) - -//these sybtypes are for conveniently separating the different categories, they have no unique code. - -/datum/disease_ability/action - category = "Active" - -/datum/disease_ability/symptom - category = "Symptom" - -//active abilities and their associated actions - -/datum/disease_ability/action/cough - name = "Voluntary Coughing" - actions = list(/datum/action/cooldown/disease_cough) - cost = 0 - required_total_points = 0 - start_with = TRUE - short_desc = "Force the host you are following to cough, spreading your infection to those nearby." - long_desc = "Force the host you are following to cough with extra force, spreading your infection to those within two meters of your host even if your transmissibility is low.
    Cooldown: 10 seconds" - - -/datum/action/cooldown/disease_cough - name = "Cough" - icon_icon = 'icons/mob/actions/actions_minor_antag.dmi' - button_icon_state = "cough" - desc = "Force the host you are following to cough with extra force, spreading your infection to those within two meters of your host even if your transmissibility is low.
    Cooldown: 10 seconds" - cooldown_time = 100 - -/datum/action/cooldown/disease_cough/Trigger() - if(!..()) - return FALSE - var/mob/camera/disease/D = owner - var/mob/living/L = D.following_host - if(!L) - return FALSE - if(L.stat != CONSCIOUS) - to_chat(D, "Your host must be conscious to cough.") - return FALSE - to_chat(D, "You force [L.real_name] to cough.") - L.emote("cough") - if(L.CanSpreadAirborneDisease()) //don't spread germs if they covered their mouth - var/datum/disease/advance/sentient_disease/SD = D.hosts[L] - SD.spread(2) - StartCooldown() - return TRUE - - -/datum/disease_ability/action/sneeze - name = "Voluntary Sneezing" - actions = list(/datum/action/cooldown/disease_sneeze) - cost = 2 - required_total_points = 3 - short_desc = "Force the host you are following to sneeze, spreading your infection to those in front of them." - long_desc = "Force the host you are following to sneeze with extra force, spreading your infection to any victims in a 4 meter cone in front of your host.
    Cooldown: 20 seconds" - -/datum/action/cooldown/disease_sneeze - name = "Sneeze" - icon_icon = 'icons/mob/actions/actions_minor_antag.dmi' - button_icon_state = "sneeze" - desc = "Force the host you are following to sneeze with extra force, spreading your infection to any victims in a 4 meter cone in front of your host even if your transmissibility is low.
    Cooldown: 20 seconds" - cooldown_time = 200 - -/datum/action/cooldown/disease_sneeze/Trigger() - if(!..()) - return FALSE - var/mob/camera/disease/D = owner - var/mob/living/L = D.following_host - if(!L) - return FALSE - if(L.stat != CONSCIOUS) - to_chat(D, "Your host must be conscious to sneeze.") - return FALSE - to_chat(D, "You force [L.real_name] to sneeze.") - L.emote("sneeze") - if(L.CanSpreadAirborneDisease()) //don't spread germs if they covered their mouth - var/datum/disease/advance/sentient_disease/SD = D.hosts[L] - - for(var/mob/living/M in ohearers(4, SD.affected_mob)) - if(is_source_facing_target(SD.affected_mob, M) && disease_air_spread_walk(get_turf(SD.affected_mob), get_turf(M))) - M.AirborneContractDisease(SD, TRUE) - - StartCooldown() - return TRUE - - -/datum/disease_ability/action/infect - name = "Secrete Infection" - actions = list(/datum/action/cooldown/disease_infect) - cost = 2 - required_total_points = 3 - short_desc = "Cause all objects your host is touching to become infectious for a limited time, spreading your infection to anyone who touches them." - long_desc = "Cause the host you are following to excrete an infective substance from their pores, causing all objects touching their skin to transmit your infection to anyone who touches them for the next 30 seconds. This includes the floor, if they are not wearing shoes, and any items they are holding, if they are not wearing gloves.
    Cooldown: 40 seconds" - -/datum/action/cooldown/disease_infect - name = "Secrete Infection" - icon_icon = 'icons/mob/actions/actions_minor_antag.dmi' - button_icon_state = "infect" - desc = "Cause the host you are following to excrete an infective substance from their pores, causing all objects touching their skin to transmit your infection to anyone who touches them for the next 30 seconds.
    Cooldown: 40 seconds" - cooldown_time = 400 - -/datum/action/cooldown/disease_infect/Trigger() - if(!..()) - return FALSE - var/mob/camera/disease/D = owner - var/mob/living/carbon/human/H = D.following_host - if(!H) - return FALSE - for(var/V in H.get_equipped_items(FALSE)) - var/obj/O = V - O.AddComponent(/datum/component/infective, D.disease_template, 300) - //no shoes? infect the floor. - if(!H.shoes) - var/turf/T = get_turf(H) - if(T && !isspaceturf(T)) - T.AddComponent(/datum/component/infective, D.disease_template, 300) - //no gloves? infect whatever we are holding. - if(!H.gloves) - for(var/V in H.held_items) - if(!V) - continue - var/obj/O = V - O.AddComponent(/datum/component/infective, D.disease_template, 300) - StartCooldown() - return TRUE - -/*******************BASE SYMPTOM TYPES*******************/ -// cost is for convenience and can be changed. If you're changing req_tot_points then don't use the subtype... -//healing no longer costs more, sans regen coma, due to how healing symptoms have been made scary - -/datum/disease_ability/symptom/mild - cost = 2 - required_total_points = 4 - category = "Symptom (Weak)" - -/datum/disease_ability/symptom/medium - cost = 4 - required_total_points = 8 - category = "Symptom" - -/datum/disease_ability/symptom/medium/heal - cost = 5 - category = "Symptom (+)" - -/datum/disease_ability/symptom/powerful - cost = 4 - required_total_points = 16 - category = "Symptom (Strong)" - -/datum/disease_ability/symptom/powerful/heal - cost = 8 - category = "Symptom (Strong+)" - -/******MILD******/ - -/datum/disease_ability/symptom/mild/cough - name = "Involuntary Coughing" - symptoms = list(/datum/symptom/cough) - short_desc = "Cause victims to cough intermittently." - long_desc = "Cause victims to cough intermittently, spreading your infection if your transmissibility is high." - -/datum/disease_ability/symptom/mild/sneeze - name = "Involuntary Sneezing" - symptoms = list(/datum/symptom/sneeze) - short_desc = "Cause victims to sneeze intermittently." - long_desc = "Cause victims to sneeze intermittently, spreading your infection and also increasing transmissibility and resistance, at the cost of stealth." - -/******MEDIUM******/ - -/datum/disease_ability/symptom/medium/beard - symptoms = list(/datum/symptom/beard) - short_desc = "Cause all victims to grow a luscious beard." - long_desc = "Cause all victims to grow a luscious beard. Ineffective against Santa Claus." - -/datum/disease_ability/symptom/medium/hallucigen - symptoms = list(/datum/symptom/hallucigen) - short_desc = "Cause victims to hallucinate." - long_desc = "Cause victims to hallucinate. Decreases stats, especially resistance." - -/datum/disease_ability/symptom/medium/confusion - symptoms = list(/datum/symptom/confusion) - short_desc = "Cause victims to become confused." - long_desc = "Cause victims to become confused intermittently." - -/datum/disease_ability/symptom/medium/vomit - symptoms = list(/datum/symptom/vomit) - short_desc = "Cause victims to vomit." - long_desc = "Cause victims to vomit. Slightly increases transmissibility. Vomiting also also causes the victims to lose nutrition and removes some toxin damage." - -/datum/disease_ability/symptom/medium/voice_change - symptoms = list(/datum/symptom/voice_change) - short_desc = "Change the voice of victims." - long_desc = "Change the voice of victims, causing confusion in communications." - -/datum/disease_ability/symptom/medium/visionloss - symptoms = list(/datum/symptom/visionloss) - short_desc = "Damage the eyes of victims, eventually causing blindness." - long_desc = "Damage the eyes of victims, eventually causing blindness. Decreases all stats." - -/datum/disease_ability/symptom/medium/deafness - symptoms = list(/datum/symptom/deafness) - -/datum/disease_ability/symptom/medium/fever - symptoms = list(/datum/symptom/fever) - -/datum/disease_ability/symptom/medium/shivering - symptoms = list(/datum/symptom/shivering) - -/datum/disease_ability/symptom/medium/headache - symptoms = list(/datum/symptom/headache) - -/datum/disease_ability/symptom/medium/nano_boost - symptoms = list(/datum/symptom/nano_boost) - -/datum/disease_ability/symptom/medium/nano_destroy - symptoms = list(/datum/symptom/nano_destroy) - -/datum/disease_ability/symptom/medium/viraladaptation - symptoms = list(/datum/symptom/viraladaptation) - short_desc = "Cause your infection to become more resistant to detection and eradication." - long_desc = "Cause your infection to mimic the function of normal body cells, becoming much harder to spot and to eradicate, but reducing its speed." - -/datum/disease_ability/symptom/medium/viralevolution - symptoms = list(/datum/symptom/viralevolution) - -/datum/disease_ability/symptom/medium/vitiligo - symptoms = list(/datum/symptom/vitiligo) - -/datum/disease_ability/symptom/medium/revitiligo - symptoms = list(/datum/symptom/revitiligo) - -/datum/disease_ability/symptom/medium/pierrot - symptoms = list(/datum/symptom/pierrot) - -/datum/disease_ability/symptom/medium/cockroach - symptoms = list(/datum/symptom/cockroach) - -/datum/disease_ability/symptom/medium/itching - symptoms = list(/datum/symptom/itching) - short_desc = "Cause victims to itch." - long_desc = "Cause victims to itch, increasing all stats except stealth." - -/datum/disease_ability/symptom/medium/heal/weight_loss - symptoms = list(/datum/symptom/weight_loss) - short_desc = "Cause victims to lose weight." - long_desc = "Cause victims to lose weight, and make it almost impossible for them to gain nutrition from food. Reduced nutrition allows your infection to spread more easily from hosts, especially by sneezing." - -/datum/disease_ability/symptom/medium/heal/sensory_restoration - symptoms = list(/datum/symptom/sensory_restoration) - short_desc = "Regenerate eye and ear damage of victims." - long_desc = "Regenerate eye and ear damage of victims." - -/datum/disease_ability/symptom/medium/heal/mind_restoration - symptoms = list(/datum/symptom/mind_restoration) - -/******POWERFUL******/ - -/datum/disease_ability/symptom/powerful/fire - symptoms = list(/datum/symptom/fire) - -/datum/disease_ability/symptom/powerful/flesh_eating - symptoms = list(/datum/symptom/flesh_eating) - -/datum/disease_ability/symptom/powerful/wizarditis //strong because it can remove hardsuits and bio protection - symptoms = list(/datum/symptom/wizarditis) - -/datum/disease_ability/symptom/powerful/genetic_mutation - symptoms = list(/datum/symptom/genetic_mutation) - -/datum/disease_ability/symptom/powerful/inorganic_adaptation - symptoms = list(/datum/symptom/inorganic_adaptation) - -/datum/disease_ability/symptom/powerful/narcolepsy - symptoms = list(/datum/symptom/narcolepsy) - -/datum/disease_ability/symptom/powerful/youth - symptoms = list(/datum/symptom/youth) - short_desc = "Cause victims to become eternally young." - long_desc = "Cause victims to become eternally young. Provides boosts to all stats except transmissibility." - -/****HEALING SUBTYPE****/ - -/datum/disease_ability/symptom/powerful/heal/oxygen - symptoms = list(/datum/symptom/oxygen) - -/datum/disease_ability/symptom/powerful/heal/chem - symptoms = list(/datum/symptom/heal/chem) - cost = 4 - -/datum/disease_ability/symptom/powerful/heal/coma - symptoms = list(/datum/symptom/heal/coma) - -/datum/disease_ability/symptom/powerful/heal/teleport - symptoms = list(/datum/symptom/teleport) - -/datum/disease_ability/symptom/powerful/heal/growth - symptoms = list(/datum/symptom/growth) - -/datum/disease_ability/symptom/powerful/heal/EMP - symptoms = list(/datum/symptom/EMP) - -/datum/disease_ability/symptom/powerful/heal/sweat - symptoms = list(/datum/symptom/sweat) diff --git a/code/modules/events/floorcluwne.dm b/code/modules/events/floorcluwne.dm deleted file mode 100644 index 47ae322a9c9ff..0000000000000 --- a/code/modules/events/floorcluwne.dm +++ /dev/null @@ -1,22 +0,0 @@ -/datum/round_event_control/floor_cluwne - name = "Floor Cluwne" - typepath = /datum/round_event/floor_cluwne - max_occurrences = 1 - min_players = 20 - - -/datum/round_event/floor_cluwne/start() - var/list/spawn_locs = list() - for(var/X in GLOB.xeno_spawn) - spawn_locs += X - - if(!spawn_locs.len) - message_admins("No valid spawn locations found, aborting...") - return MAP_ERROR - - var/turf/T = get_turf(pick(spawn_locs)) - var/mob/living/simple_animal/hostile/floor_cluwne/S = new(T) - playsound(S, 'sound/misc/bikehorn_creepy.ogg', 50, 1, -1) - message_admins("A floor cluwne has been spawned at [COORD(T)][ADMIN_JMP(T)]") - log_game("A floor cluwne has been spawned at [COORD(T)]") - return SUCCESSFUL_SPAWN diff --git a/code/modules/events/wizard/embeddies.dm b/code/modules/events/wizard/embeddies.dm deleted file mode 100644 index fe08b9c7432e9..0000000000000 --- a/code/modules/events/wizard/embeddies.dm +++ /dev/null @@ -1,46 +0,0 @@ -/datum/round_event_control/wizard/embedpocalypse - name = "Make Everything Embeddable" - weight = 2 - typepath = /datum/round_event/wizard/embedpocalypse - max_occurrences = 1 - earliest_start = 0 MINUTES - -/datum/round_event/wizard/embedpocalypse/start() - for(var/obj/item/I in world) - CHECK_TICK - - if(!(I.flags_1 & INITIALIZED_1)) - continue - - if(!I.embedding || I.embedding == EMBED_HARMLESS) - I.embedding = EMBED_POINTY - I.updateEmbedding() - I.name = "pointy [I.name]" - - GLOB.embedpocalypse = TRUE - GLOB.stickpocalypse = FALSE // embedpocalypse takes precedence over stickpocalypse - -/datum/round_event_control/wizard/embedpocalypse/sticky - name = "Make Everything Sticky" - weight = 6 - typepath = /datum/round_event/wizard/embedpocalypse/sticky - max_occurrences = 1 - earliest_start = 0 MINUTES - -/datum/round_event_control/wizard/embedpocalypse/sticky/canSpawnEvent(players_amt, gamemode) - if(GLOB.embedpocalypse) - return FALSE - -/datum/round_event/wizard/embedpocalypse/sticky/start() - for(var/obj/item/I in world) - CHECK_TICK - - if(!(I.flags_1 & INITIALIZED_1)) - continue - - if(!I.embedding) - I.embedding = EMBED_HARMLESS - I.updateEmbedding() - I.name = "sticky [I.name]" - - GLOB.stickpocalypse = TRUE diff --git a/code/modules/holiday/halloween.dm b/code/modules/holiday/halloween.dm deleted file mode 100644 index 665cccbd2c4b9..0000000000000 --- a/code/modules/holiday/halloween.dm +++ /dev/null @@ -1,263 +0,0 @@ -/////////////////////////////////////// -///////////HALLOWEEN CONTENT/////////// -/////////////////////////////////////// - - -//spooky recipes - -/datum/recipe/sugarcookie/spookyskull - reagents = list(/datum/reagent/consumable/flour = 5, /datum/reagent/consumable/sugar = 5, /datum/reagent/consumable/milk = 5) - items = list( - /obj/item/food/egg, - ) - result = /obj/item/food/cookie/sugar/spookyskull - -/datum/recipe/sugarcookie/spookycoffin - reagents = list(/datum/reagent/consumable/flour = 5, /datum/reagent/consumable/sugar = 5, /datum/reagent/consumable/coffee = 5) - items = list( - /obj/item/food/egg, - ) - result = /obj/item/food/cookie/sugar/spookycoffin - -////////////////////////////// -//Spookoween trapped closets// -////////////////////////////// - -#define SPOOKY_SKELETON 1 -#define ANGRY_FAITHLESS 2 -#define SCARY_BATS 3 -#define INSANE_CLOWN 4 -#define HOWLING_GHOST 5 - -//Spookoween variables -/obj/structure/closet - var/trapped = 0 - var/mob/trapped_mob - -/obj/structure/closet/Initialize(mapload) - ..() - if(prob(30)) - set_spooky_trap() - -/obj/structure/closet/dump_contents() - ..() - trigger_spooky_trap() - -/obj/structure/closet/proc/set_spooky_trap() - if(prob(0.1)) - trapped = INSANE_CLOWN - return - if(prob(1)) - trapped = ANGRY_FAITHLESS - return - if(prob(15)) - trapped = SCARY_BATS - return - if(prob(20)) - trapped = HOWLING_GHOST - return - else - var/mob/living/carbon/human/H = new(loc) - H.makeSkeleton() - H.health = 1e5 - insert(H) - trapped_mob = H - trapped = SPOOKY_SKELETON - return - -/obj/structure/closet/proc/trigger_spooky_trap() - if(!trapped) - return - - else if(trapped == SPOOKY_SKELETON) - visible_message("BOO!") - playsound(loc, 'sound/spookoween/girlscream.ogg', 300, 1) - trapped = 0 - QDEL_IN(trapped_mob, 90) - - else if(trapped == HOWLING_GHOST) - visible_message("[pick("OooOOooooOOOoOoOOooooOOOOO", "BooOOooOooooOOOO", "BOO!", "WoOOoOoooOooo")]") - playsound(loc, 'sound/spookoween/ghosty_wind.ogg', 300, 1) - new /mob/living/simple_animal/shade/howling_ghost(loc) - trapped = 0 - - else if(trapped == SCARY_BATS) - visible_message("Protect your hair!") - playsound(loc, 'sound/spookoween/bats.ogg', 300, 1) - var/number = rand(1,3) - for(var/i=0,i < number,i++) - new /mob/living/simple_animal/hostile/retaliate/bat(loc) - trapped = 0 - - else if(trapped == ANGRY_FAITHLESS) - visible_message("The closet bursts open!") - visible_message("THIS BEING RADIATES PURE EVIL! YOU BETTER RUN!!!") - playsound(loc, 'sound/hallucinations/wail.ogg', 300, 1) - var/mob/living/simple_animal/hostile/faithless/F = new(loc) - trapped = 0 - QDEL_IN(F, 120) - - else if(trapped == INSANE_CLOWN) - visible_message("...") - playsound(loc, 'sound/spookoween/scary_clown_appear.ogg', 300, 1) - spawn_atom_to_turf(/mob/living/simple_animal/hostile/retaliate/clown/insane, loc, 1, FALSE) - trapped = 0 - -//don't spawn in crates -/obj/structure/closet/crate/trigger_spooky_trap() - return - -/obj/structure/closet/crate/set_spooky_trap() - return - - -//////////////////// -//Spookoween Ghost// -//////////////////// - -/mob/living/simple_animal/shade/howling_ghost - name = "ghost" - real_name = "ghost" - icon = 'icons/mob/mob.dmi' - maxHealth = 1e6 - health = 1e6 - speak_emote = list("howls") - emote_hear = list("wails","screeches") - density = FALSE - anchored = TRUE - incorporeal_move = 1 - layer = 4 - var/timer = 0 - -/mob/living/simple_animal/shade/howling_ghost/Initialize(mapload) - . = ..() - icon_state = pick("ghost","ghostian","ghostian2","ghostking","ghost1","ghost2") - icon_living = icon_state - status_flags |= GODMODE - timer = rand(1,15) - -/mob/living/simple_animal/shade/howling_ghost/Life() - ..() - timer-- - if(prob(20)) - roam() - if(timer == 0) - spooky_ghosty() - timer = rand(1,15) - -/mob/living/simple_animal/shade/howling_ghost/proc/EtherealMove(direction) - forceMove(get_step(src, direction)) - setDir(direction) - -/mob/living/simple_animal/shade/howling_ghost/proc/roam() - if(prob(80)) - var/direction = pick(NORTH,SOUTH,EAST,WEST,NORTHEAST,NORTHWEST,SOUTHEAST,SOUTHWEST) - EtherealMove(direction) - -/mob/living/simple_animal/shade/howling_ghost/proc/spooky_ghosty() - if(prob(20)) //haunt - playsound(loc, pick('sound/spookoween/ghosty_wind.ogg','sound/spookoween/ghost_whisper.ogg','sound/spookoween/chain_rattling.ogg'), 300, 1) - if(prob(10)) //flickers - var/obj/machinery/light/L = locate(/obj/machinery/light) in view(5, src) - if(L) - L.flicker() - if(prob(5)) //poltergeist - var/obj/item/I = locate(/obj/item) in view(3, src) - if(I) - var/direction = pick(NORTH,SOUTH,EAST,WEST,NORTHEAST,NORTHWEST,SOUTHEAST,SOUTHWEST) - step(I,direction) - return - -/mob/living/simple_animal/shade/howling_ghost/adjustHealth(amount, updating_health = TRUE, forced = FALSE) - . = 0 - -/////////////////////////// -//Spookoween Insane Clown// -/////////////////////////// - -/mob/living/simple_animal/hostile/retaliate/clown/insane - name = "insane clown" - desc = "Some clowns do not manage to be accepted, and go insane. This is one of them." - icon_state = "scary_clown" - icon_living = "scary_clown" - icon_dead = "scary_clown" - icon_gib = "scary_clown" - speak = list("...", ". . .") - speak_language = /datum/language/metalanguage - maxHealth = 1e6 - health = 1e6 - emote_see = list("silently stares") - unsuitable_atmos_damage = 0 - var/timer - -/mob/living/simple_animal/hostile/retaliate/clown/insane/Initialize(mapload) - . = ..() - timer = rand(5,15) - status_flags = (status_flags | GODMODE) - return - -/mob/living/simple_animal/hostile/retaliate/clown/insane/Retaliate() - return - -/mob/living/simple_animal/hostile/retaliate/clown/insane/ex_act() - return - -/mob/living/simple_animal/hostile/retaliate/clown/insane/Life() - timer-- - if(target) - stalk() - return - -/mob/living/simple_animal/hostile/retaliate/clown/insane/proc/stalk() - var/mob/living/M = target - if(M.stat == DEAD) - playsound(M.loc, 'sound/spookoween/insane_low_laugh.ogg', 300, 1) - qdel(src) - if(timer == 0) - timer = rand(5,15) - playsound(M.loc, pick('sound/spookoween/scary_horn.ogg','sound/spookoween/scary_horn2.ogg', 'sound/spookoween/scary_horn3.ogg'), 300, 1) - spawn(12) - forceMove(M.loc) - -/mob/living/simple_animal/hostile/retaliate/clown/insane/MoveToTarget() - stalk(target) - -/mob/living/simple_animal/hostile/retaliate/clown/insane/AttackingTarget() - return - -/mob/living/simple_animal/hostile/retaliate/clown/insane/adjustHealth(amount, updating_health = TRUE, forced = FALSE) - . = 0 - if(prob(5)) - playsound(loc, 'sound/spookoween/insane_low_laugh.ogg', 300, 1) - -/mob/living/simple_animal/hostile/retaliate/clown/insane/attackby(obj/item/O, mob/user) - if(istype(O, /obj/item/nullrod)) - if(prob(5)) - visible_message("[src] finally found the peace it deserves. You hear honks echoing off into the distance.") - playsound(loc, 'sound/spookoween/insane_low_laugh.ogg', 300, 1) - qdel(src) - else - visible_message("[src] seems to be resisting the effect!") - else - ..() - -/mob/living/simple_animal/hostile/retaliate/clown/insane/handle_temperature_damage() - return - -///////////////////////// -// Spooky Uplink Items // -///////////////////////// - -/datum/uplink_item/dangerous/crossbow/candy - name = "Candy Corn Crossbow" - desc = "A standard miniature energy crossbow that uses a hard-light projector to transform bolts into candy corn. Happy Halloween!" - category = "Holiday" - item = /obj/item/gun/energy/kinetic_accelerator/crossbow/halloween - surplus = 0 - -/datum/uplink_item/device_tools/emag/hack_o_lantern - name = "Hack-o'-Lantern" - desc = "An emag fitted to support the Halloween season. Candle not included." - category = "Holiday" - item = /obj/item/card/emag/halloween - surplus = 0 diff --git a/code/modules/multiz/movement/atom/climbing.dm b/code/modules/multiz/movement/atom/climbing.dm deleted file mode 100644 index d177bd53e6d18..0000000000000 --- a/code/modules/multiz/movement/atom/climbing.dm +++ /dev/null @@ -1,17 +0,0 @@ -/proc/turf_can_climb(turf/target) - if(!isopenspace(target)) - return FALSE - for(var/obj/structure/S in target) - if(S.can_climb_through()) - return TRUE - return FALSE - -/// If you can climb WITHIN this structure, lattices for example. Used by z_transit (Move Upwards verb) -/obj/structure/proc/can_climb_through() - return FALSE - -/obj/structure/lattice/can_climb_through() - return TRUE - -/obj/structure/lattice/catwalk/can_climb_through() - return FALSE From 850af2b3ac4d3358539d2c5c162ed6786b0dceed Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 31 Aug 2024 08:45:37 +0100 Subject: [PATCH 091/266] Fixes metastation's invalid bag --- _maps/map_files/MetaStation/MetaStation.dmm | 4 +--- code/game/objects/items/storage/secure.dm | 9 +++++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index e9569093ad8cb..d819f17f075ec 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -2444,9 +2444,7 @@ /area/maintenance/starboard/fore) "axP" = ( /obj/structure/safe, -/obj/item/storage/secure/briefcase{ - contents = newlist(/obj/item/clothing/suit/armor/vest,/obj/item/gun/ballistic/automatic/pistol,/obj/item/suppressor,/obj/item/melee/classic_baton/police/telescopic,/obj/item/clothing/mask/balaclava,/obj/item/bodybag,/obj/item/soap/nanotrasen) - }, +/obj/item/storage/secure/briefcase/hitman, /obj/item/storage/backpack/duffelbag/syndie/hitman, /obj/item/card/id/silver/reaper, /obj/item/lazarus_injector, diff --git a/code/game/objects/items/storage/secure.dm b/code/game/objects/items/storage/secure.dm index 58cfd2010c330..94b3617f03de1 100644 --- a/code/game/objects/items/storage/secure.dm +++ b/code/game/objects/items/storage/secure.dm @@ -157,6 +157,15 @@ for(var/i in 1 to STR.max_items - 2) new /obj/item/stack/spacecash/c1000(src) +/obj/item/storage/secure/briefcase/hitman/PopulateContents() + ..() + new /obj/item/clothing/suit/armor/vest(src) + new /obj/item/gun/ballistic/automatic/pistol(src) + new /obj/item/suppressor(src) + new /obj/item/melee/classic_baton/police/telescopic(src) + new /obj/item/clothing/mask/balaclava(src) + new /obj/item/bodybag(src) + new /obj/item/soap/nanotrasen(src) // ----------------------------- // Secure Safe From 784f3c315c2b96c0a8d3b187d9ac157efd4a5126 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 31 Aug 2024 08:46:39 +0100 Subject: [PATCH 092/266] Fixes Nanotrasen misspellings --- _maps/map_files/FlandStation/FlandStation.dmm | 4 ++-- _maps/map_files/KiloStation/KiloStation.dmm | 2 +- _maps/map_files/RadStation/RadStation.dmm | 2 +- code/modules/ruins/lavalandruin_code/syndicate_base.dm | 2 +- strings/junkmail.txt | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/_maps/map_files/FlandStation/FlandStation.dmm b/_maps/map_files/FlandStation/FlandStation.dmm index 8c43bdb0c18f2..f5d95048d5442 100644 --- a/_maps/map_files/FlandStation/FlandStation.dmm +++ b/_maps/map_files/FlandStation/FlandStation.dmm @@ -12258,7 +12258,7 @@ /area/bridge/meeting_room/council) "dfv" = ( /obj/structure/sign/poster/contraband/hacking_guide{ - desc = "This poster details the internal workings of the common Nanotrasen airlock. Despite it appears out of date, this poster was placed by an alleged Nanotransen official due to some lack of hacking skill to open a door around here."; + desc = "This poster details the internal workings of the common Nanotrasen airlock. Despite it appears out of date, this poster was placed by an alleged Nanotrasen official due to some lack of hacking skill to open a door around here."; pixel_x = -32 }, /obj/structure/barricade/wooden, @@ -33869,7 +33869,7 @@ }, /obj/effect/turf_decal/bot, /obj/machinery/cryopod{ - desc = "Suited for Cyborgs and Humanoids, the pod is a safe place for personnel affected by the Space Sleep Disorder to get some rest. If you think that this the easy way out, Nanotransen will address your situation in a later date..."; + desc = "Suited for Cyborgs and Humanoids, the pod is a safe place for personnel affected by the Space Sleep Disorder to get some rest. If you think that this the easy way out, Nanotrasen will address your situation in a later date..."; dir = 4; name = "Jail cryogenic freezer" }, diff --git a/_maps/map_files/KiloStation/KiloStation.dmm b/_maps/map_files/KiloStation/KiloStation.dmm index 954dcb3ff1c8c..f246c4b91a9d9 100644 --- a/_maps/map_files/KiloStation/KiloStation.dmm +++ b/_maps/map_files/KiloStation/KiloStation.dmm @@ -75695,7 +75695,7 @@ dir = 4 }, /obj/machinery/cryopod{ - desc = "Suited for Cyborgs and Humanoids, the pod is a safe place for personnel affected by the Space Sleep Disorder to get some rest. If you think that this the easy way out, Nanotransen will address your situation in a later date..."; + desc = "Suited for Cyborgs and Humanoids, the pod is a safe place for personnel affected by the Space Sleep Disorder to get some rest. If you think that this the easy way out, Nanotrasen will address your situation in a later date..."; name = "Jail cryogenic freezer" }, /obj/machinery/computer/cryopod{ diff --git a/_maps/map_files/RadStation/RadStation.dmm b/_maps/map_files/RadStation/RadStation.dmm index 0860f3be74112..26d967354b028 100644 --- a/_maps/map_files/RadStation/RadStation.dmm +++ b/_maps/map_files/RadStation/RadStation.dmm @@ -20542,7 +20542,7 @@ /area/science/xenobiology) "gtD" = ( /obj/machinery/cryopod{ - desc = "Suited for Cyborgs and Humanoids, the pod is a safe place for personnel affected by the Space Sleep Disorder to get some rest. If you think that this the easy way out, Nanotransen will address your situation in a later date..."; + desc = "Suited for Cyborgs and Humanoids, the pod is a safe place for personnel affected by the Space Sleep Disorder to get some rest. If you think that this the easy way out, Nanotrasen will address your situation in a later date..."; name = "Jail cryogenic freezer" }, /obj/machinery/computer/cryopod{ diff --git a/code/modules/ruins/lavalandruin_code/syndicate_base.dm b/code/modules/ruins/lavalandruin_code/syndicate_base.dm index 989f0802b529c..269050ed325fa 100644 --- a/code/modules/ruins/lavalandruin_code/syndicate_base.dm +++ b/code/modules/ruins/lavalandruin_code/syndicate_base.dm @@ -23,4 +23,4 @@ /obj/item/paper/fluff/ruins/syndicomms name = "paper - 'Communication Frequencies'" - default_raw_text = "Greetings, Agent. I see you have awaken from your cryogenic slumber. This either means that the new Nanotransen space project is complete and operational in a nearby sector, or that Ashlanders have launched an assault on our base. We recommend you get rid of any pests and do not confuse them for humans.

    In case you don't remember how to do your job, all you need is the equipment we provided; your Chameleon Mask, your Agent ID, and the intercom nearby. A nearby shelf contains all the names and jobs of the current Nanotransen employees. Assign their name and job to your ID, and your Mask will mimic the voice of whoever you are impersonating.

    Oh, one more thing. Here is a list of frequencies for you to troll on:
    • 145.9 - Common Channel
    • 144.7 - Private AI Channel
    • 135.9 - Security Channel
    • 135.7 - Engineering Channel
    • 135.5 - Medical Channel
    • 135.3 - Command Channel
    • 135.1 - Science Channel
    • 134.9 - Service Channel
    • 134.7 - Supply Channel
    • 136.1 - Exploration Channel
    • " + default_raw_text = "Greetings, Agent. I see you have awaken from your cryogenic slumber. This either means that the new Nanotrasen space project is complete and operational in a nearby sector, or that Ashlanders have launched an assault on our base. We recommend you get rid of any pests and do not confuse them for humans.

      In case you don't remember how to do your job, all you need is the equipment we provided; your Chameleon Mask, your Agent ID, and the intercom nearby. A nearby shelf contains all the names and jobs of the current Nanotrasen employees. Assign their name and job to your ID, and your Mask will mimic the voice of whoever you are impersonating.

      Oh, one more thing. Here is a list of frequencies for you to troll on:
      • 145.9 - Common Channel
      • 144.7 - Private AI Channel
      • 135.9 - Security Channel
      • 135.7 - Engineering Channel
      • 135.5 - Medical Channel
      • 135.3 - Command Channel
      • 135.1 - Science Channel
      • 134.9 - Service Channel
      • 134.7 - Supply Channel
      • 136.1 - Exploration Channel
      • " diff --git a/strings/junkmail.txt b/strings/junkmail.txt index aac78b37ea39b..d7d547570e4c4 100644 --- a/strings/junkmail.txt +++ b/strings/junkmail.txt @@ -12,7 +12,7 @@ Hi %name%, We are unable to validate your billing information for the nex Loyal customer, DonkCo Customer Service. We appreciate your brand loyalty support.
        As such, it is our responsibility and pleasure to inform you of the status of your package.
        Your package for one "Moth-Fuzz Parka" has been delayed. Due to local political tensions, an animal rights group has seized and eaten your package.
        We appreciate the patience,

        DonkCo

        MESSAGE FROM CENTCOM HIGH COMMAND: DO NOT ACCEPT THE FRIEND REQUEST OF TICKLEBALLS THE CLOWN. HE IS NOT FUNNY AND ON TOP OF THAT HE WILL HACK YOUR NTNET ACCOUNT AND MAKE YOU UNFUNNY TOO. YOU WILL LOSE ALL YOUR SPACECREDITS!!!!! SPREAD THE WORD. ANYONE WHO BECOMES FRIENDS WITH TINKLEBALLS THE CLOWN IS GOING TO LOSE ALL OF THEIR SPACECREDITS AND LOOK LIKE A HUGE IDIOT.

        just joining to say that because of the unfairness i'm quitting the station forever

        ,

        if y ou want to know why feel free to message me, but i wouldn't be surprised if no one even saw this message, no one ever sees what i say.

        -

        I used the shotgun.


        You know why? Cause the shot gun doesn't miss, and unlike the shitty hybrid taser it stops a criminal in their tracks in two hits. Bang, bang, and they're fucking done.
        I use four shots just to make damn sure. Because, once again, I'm not there to coddle a buncha criminal scum sucking [redacted by nanotransen ethics committee], I'm there to
        1. Survive the fucking round.
        2. Guard the armory.
        So you can absolutely get fucked.
        If I get unbanned, which I won't, you can guarantee I will continue to use the shotgun to apprehend criminals.
        Because it's quick, clean and effective as fuck. Why in the seven hells would I fuck around with the disabler shots, which take half a clip just to bring someone down, or with the tazer bolts which are slow as balls, impossible to aim and do about next to jack shit, fuck all.

        The shotgun is the superior law enforcement weapon.


        Because it stops crime. And it stops crime by reducing the number of criminals roaming the fucking halls. +

        I used the shotgun.


        You know why? Cause the shot gun doesn't miss, and unlike the shitty hybrid taser it stops a criminal in their tracks in two hits. Bang, bang, and they're fucking done.
        I use four shots just to make damn sure. Because, once again, I'm not there to coddle a buncha criminal scum sucking [redacted by nanotrasen ethics committee], I'm there to
        1. Survive the fucking round.
        2. Guard the armory.
        So you can absolutely get fucked.
        If I get unbanned, which I won't, you can guarantee I will continue to use the shotgun to apprehend criminals.
        Because it's quick, clean and effective as fuck. Why in the seven hells would I fuck around with the disabler shots, which take half a clip just to bring someone down, or with the tazer bolts which are slow as balls, impossible to aim and do about next to jack shit, fuck all.

        The shotgun is the superior law enforcement weapon.


        Because it stops crime. And it stops crime by reducing the number of criminals roaming the fucking halls. it's a deep running social commentary on the state of the game.
        Juxteposing the happy-go-lucky visage of a clownfish with the deeply scarred underside, branded as sus by his peers.
        The new mascot represents a new era for beestation, not forgetting our past, or any subset of the playerbase, but integrating them all into the new, and improved, NT-OS 98 powered experience.
        Signed,
        ~Tom Beestation, Apidyne Industries ®️. Hello, I am David Flint, a legal practitioner from Scotland, United Kingdom, please I want to guarantee that you are the one receiving this message before I release the information to you.
        I want you to verify that your email address is still valid and accessed by you.
        As soon as I receive your response I will proceed and release the vital information to you. I'm taking this precautionary gauge to avoid getting this significant information into the wrong hands because of how susceptible it is. I'm Dr Farooq osman,investment manager and we represent the interests of various Investors.
        Due to the sensitivity of the position they hold in their Organization and the unstable investment environment of their countries they prefer to move the majority of their funds into more stable economies where they can get good yield for their money.
        kindly get back to me for more details if you are interested. From 591851e45dee5b560f8bf886f86a0b9c632d86dc Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 31 Aug 2024 08:55:25 +0100 Subject: [PATCH 093/266] Pipes are now hashed by their pipe layer --- code/modules/unit_tests/mapping/check_multiple_objects.dm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/modules/unit_tests/mapping/check_multiple_objects.dm b/code/modules/unit_tests/mapping/check_multiple_objects.dm index e8a871b3e1891..2dccb20d88c2b 100644 --- a/code/modules/unit_tests/mapping/check_multiple_objects.dm +++ b/code/modules/unit_tests/mapping/check_multiple_objects.dm @@ -8,6 +8,13 @@ if (istype(object, /obj/structure/cable)) var/obj/structure/cable/cable = object hash = "[hash][min(cable.d1, cable.d2)][max(cable.d1, cable.d2)]" + if (istype(object, /obj/machinery/atmospherics)) + var/obj/machinery/atmospherics/atmosmachine = object + // 2 atmosmachines should never be on the same turf with the same layer + // unless they are crossing + hash = "/obj/machinery/atmospherics/[atmosmachine.piping_layer]" + if (atmosmachine.device_type == BINARY) + hash = "[hash][atmosmachine.dir <= 2 ? 1 : 0]" if (types[hash]) result += "Multiple objects of type [object.type] detected on the same tile, with the same direction." else From a898d2dba3b92a33716f748d23622e54d4eb9c0e Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sat, 31 Aug 2024 08:59:56 +0100 Subject: [PATCH 094/266] Compilation fix --- code/__byond_version_compat.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/__byond_version_compat.dm b/code/__byond_version_compat.dm index 51f8ca63aaafa..fc667f8b9dd82 100644 --- a/code/__byond_version_compat.dm +++ b/code/__byond_version_compat.dm @@ -20,7 +20,7 @@ /savefile/byond_version = MIN_COMPILER_VERSION #endif -#ifdef FASTDMM || defined(CIBUILDING) +#if defined(FASTDMM) || defined(CIBUILDING) #define YES_I_WANT_515 #endif // Temporary 515 block until it is completely compatible. From 9753538f69c5e4508390a3fe47716c22f81b3101 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 1 Sep 2024 08:05:41 +0100 Subject: [PATCH 095/266] Not all areas require power --- code/modules/unit_tests/mapping/check_area_apc.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/unit_tests/mapping/check_area_apc.dm b/code/modules/unit_tests/mapping/check_area_apc.dm index 9d95cbe9a4ac1..0201c30f128ac 100644 --- a/code/modules/unit_tests/mapping/check_area_apc.dm +++ b/code/modules/unit_tests/mapping/check_area_apc.dm @@ -2,9 +2,11 @@ // Make sure there are no APCs in unpowered areas if (check_area.apc && check_area.always_unpowered) return "APC found in an always unpowered area" + if (check_area.apc && !check_area.requires_power) + return "APC found in an area that does not require power" // If you have power then I guess you pass if (check_area.area_flags & REMOTE_APC) return // Otherwise, make sure we need power - if (!check_area.apc && !check_area.always_unpowered) + if (!check_area.apc && (!check_area.always_unpowered && check_area.requires_power)) return "No APC in an area that requires power" From 6d75cb8e9fed487f64948d6f384d04fe2b8ca21f Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 1 Sep 2024 08:14:51 +0100 Subject: [PATCH 096/266] Resets changelog --- html/changelog.html | 6 ------ 1 file changed, 6 deletions(-) diff --git a/html/changelog.html b/html/changelog.html index 111050a4d2e8c..ee03e5010776c 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -890,12 +890,6 @@

        rkz, HowToLu/Dakae, PigeonVerde/PestoVerde, Floria/BriggsIDP,
      • adds zmimic hooks for tiles and material turfs
      • Medium buff to floor bot logic making them more discerning when repairing or placing tiles. They will now also actually repair tiles instead of always replacing them, if possible.
      - -

      29 June 2024

      -

      spockye updated:

      -
        -
      • A couple fland station power cable and disposals fixes
      • -
      GoonStation 13 Development Team From cb25a655adcfd15eb09843475995271c794a3bbf Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 1 Sep 2024 09:31:20 +0100 Subject: [PATCH 097/266] Screenshot tests only if they actually exist --- tools/ci/run_server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci/run_server.sh b/tools/ci/run_server.sh index ec50deb600d3d..e241f7c6c1727 100755 --- a/tools/ci/run_server.sh +++ b/tools/ci/run_server.sh @@ -21,6 +21,6 @@ DreamDaemon beestation.dmb -close -trusted -verbose -params "log-directory=ci" cd .. mkdir -p data/screenshots_new -cp -r ci_test/data/screenshots_new data/screenshots_new +cp -r -u ci_test/data/screenshots_new data/screenshots_new cat ci_test/data/logs/ci/clean_run.lk From 361dcfd65e6f895428f020aba79cf3749469b5c1 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 1 Sep 2024 09:40:51 +0100 Subject: [PATCH 098/266] Update run_server.sh --- tools/ci/run_server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci/run_server.sh b/tools/ci/run_server.sh index e241f7c6c1727..b387849316929 100755 --- a/tools/ci/run_server.sh +++ b/tools/ci/run_server.sh @@ -21,6 +21,6 @@ DreamDaemon beestation.dmb -close -trusted -verbose -params "log-directory=ci" cd .. mkdir -p data/screenshots_new -cp -r -u ci_test/data/screenshots_new data/screenshots_new +[ -d "ci_test/data/screenshots_new" ] && cp -r ci_test/data/screenshots_new data/screenshots_new cat ci_test/data/logs/ci/clean_run.lk From ab88a3614ec744e17b3e0fdf2b62524d40748a13 Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 1 Sep 2024 09:52:53 +0100 Subject: [PATCH 099/266] Attempt to fix OD lints --- code/__HELPERS/test_helpers.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/__HELPERS/test_helpers.dm b/code/__HELPERS/test_helpers.dm index 759fe6a1fb71d..f199b5b9b06da 100644 --- a/code/__HELPERS/test_helpers.dm +++ b/code/__HELPERS/test_helpers.dm @@ -28,8 +28,8 @@ CREATION_TEST_IGNORE_SELF(/mob/dview) #else -#define CREATION_TEST_IGNORE_SELF(path) +#define CREATION_TEST_IGNORE_SELF(path) ; -#define CREATION_TEST_IGNORE_SUBTYPES(path) +#define CREATION_TEST_IGNORE_SUBTYPES(path) ; #endif From f49ae0a5f7baffd77b3d0ba2c06fca869fc1a56c Mon Sep 17 00:00:00 2001 From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com> Date: Sun, 1 Sep 2024 10:15:27 +0100 Subject: [PATCH 100/266] Fixes some space indentation issues --- code/__DEFINES/MC.dm | 20 +-- code/__DEFINES/_globals.dm | 8 +- .../dcs/signals/signals_atom/signals_atom.dm | 2 +- .../signals/signals_datum/signals_datum.dm | 2 +- .../dcs/signals/signals_mob/signals_mob.dm | 2 +- .../signals_obj/signals_item/signals_item.dm | 10 +- code/__DEFINES/economy.dm | 8 +- code/__DEFINES/html_assistant.dm | 28 ++--- code/__DEFINES/maps.dm | 22 ++-- code/__DEFINES/subsystems.dm | 10 +- code/__DEFINES/turfs.dm | 16 +-- code/__HELPERS/areas.dm | 6 +- code/__HELPERS/atoms.dm | 14 +-- code/__HELPERS/icons.dm | 98 +++++++-------- code/__HELPERS/matrices.dm | 6 +- code/__HELPERS/string_assoc_lists.dm | 16 +-- code/__HELPERS/time.dm | 2 +- code/_globalvars/soul_glimmer.dm | 8 +- code/_js/menus.dm | 66 +++++----- code/_onclick/hud/fullscreen.dm | 6 +- code/controllers/subsystem/traumas.dm | 14 +-- code/controllers/subsystem/weather.dm | 14 +-- code/datums/components/crafting/recipes.dm | 16 +-- code/datums/components/crafting/tailoring.dm | 4 +- code/datums/components/forensics.dm | 2 +- code/datums/components/haircolor_clothes.dm | 22 ++-- .../components/storage/concrete/pockets.dm | 6 +- .../diseases/advance/symptoms/alcohol.dm | 2 +- .../diseases/advance/symptoms/beesymptom.dm | 6 +- .../diseases/advance/symptoms/blobspores.dm | 8 +- .../diseases/advance/symptoms/braindamage.dm | 4 +- .../diseases/advance/symptoms/choking.dm | 2 +- .../diseases/advance/symptoms/clockwork.dm | 8 +- .../diseases/advance/symptoms/cockroach.dm | 2 +- .../diseases/advance/symptoms/confusion.dm | 4 +- .../datums/diseases/advance/symptoms/cough.dm | 8 +- .../diseases/advance/symptoms/deafness.dm | 2 +- .../datums/diseases/advance/symptoms/fever.dm | 2 +- code/datums/diseases/advance/symptoms/fire.dm | 10 +- .../diseases/advance/symptoms/flesh_eating.dm | 6 +- .../diseases/advance/symptoms/genetics.dm | 4 +- .../diseases/advance/symptoms/hallucigen.dm | 2 +- .../diseases/advance/symptoms/headache.dm | 4 +- code/datums/diseases/advance/symptoms/heal.dm | 10 +- .../diseases/advance/symptoms/heartattack.dm | 2 +- .../diseases/advance/symptoms/itching.dm | 2 +- .../datums/diseases/advance/symptoms/kitty.dm | 4 +- .../diseases/advance/symptoms/lubefeet.dm | 4 +- .../diseases/advance/symptoms/macrophage.dm | 10 +- .../diseases/advance/symptoms/nanites.dm | 4 +- .../diseases/advance/symptoms/narcolepsy.dm | 2 +- .../diseases/advance/symptoms/necropolis.dm | 8 +- .../diseases/advance/symptoms/organs.dm | 6 +- .../diseases/advance/symptoms/pierrot.dm | 8 +- .../diseases/advance/symptoms/shivering.dm | 2 +- code/datums/diseases/advance/symptoms/skin.dm | 6 +- .../diseases/advance/symptoms/sneeze.dm | 2 +- .../datums/diseases/advance/symptoms/viral.dm | 14 +-- .../diseases/advance/symptoms/vision.dm | 4 +- .../diseases/advance/symptoms/voice_change.dm | 4 +- .../datums/diseases/advance/symptoms/vomit.dm | 4 +- .../diseases/advance/symptoms/wizarditis.dm | 2 +- code/datums/traits/negative_quirk.dm | 10 +- code/datums/wires/_wires.dm | 2 +- code/datums/wires/airalarm.dm | 4 +- code/datums/world_topic.dm | 8 +- code/game/communications.dm | 98 +++++++-------- code/game/gamemodes/meteor/meteors.dm | 6 +- code/game/machinery/_machinery.dm | 52 ++++---- code/game/machinery/aug_manipulator.dm | 4 +- code/game/machinery/computer/cloning.dm | 2 +- code/game/machinery/computer/dna_console.dm | 2 +- code/game/machinery/cryopod.dm | 2 +- code/game/machinery/doppler_array.dm | 2 +- code/game/machinery/launch_pad.dm | 10 +- code/game/machinery/scan_gate.dm | 2 +- .../telecomms/computers/logbrowser.dm | 4 +- .../game/objects/items/colorizers/clothing.dm | 18 +-- .../objects/items/colorizers/colorizer.dm | 88 ++++++------- code/game/objects/items/colorizers/mobs.dm | 10 +- code/game/objects/items/cursed_necklace.dm | 46 +++---- code/game/objects/items/miscellaneous.dm | 8 +- code/game/objects/items/pneumaticCannon.dm | 2 +- code/game/objects/items/storage/boxes.dm | 4 +- code/game/objects/items/toys.dm | 32 ++--- code/game/objects/objs.dm | 16 +-- code/game/objects/structures/displaycase.dm | 2 +- code/game/objects/structures/statues.dm | 6 +- code/game/objects/structures/watercloset.dm | 10 +- code/game/turfs/open/floor/fancy_floor.dm | 16 +-- code/modules/admin/poll_management.dm | 2 +- code/modules/admin/verbs/_help.dm | 8 +- code/modules/admin/verbs/beakerpanel.dm | 116 +++++++++--------- code/modules/admin/verbs/mapping.dm | 2 +- code/modules/admin/verbs/spawnobjasmob.dm | 8 +- code/modules/antagonists/cult/runes.dm | 6 +- .../antagonists/wizard/equipment/artefact.dm | 6 +- .../antagonists/wizard/equipment/spellbook.dm | 20 +-- code/modules/assembly/mousetrap.dm | 2 +- .../environmental/LINDA_system.dm | 6 +- .../awaymissions/mission_code/snowdin.dm | 6 +- code/modules/cargo/exports.dm | 2 +- .../client/loadout/loadout_colorizers.dm | 40 +++--- code/modules/clothing/masks/cluwne.dm | 112 ++++++++--------- code/modules/events/wizard/rpgtitles.dm | 2 +- .../exploration_crew/exploration_laser_gun.dm | 6 +- .../kitchen_machinery/deep_fryer.dm | 16 +-- .../recipes/tablecraft/recipes_pie.dm | 42 +++---- code/modules/holodeck/computer.dm | 2 +- code/modules/holodeck/turfs.dm | 2 +- code/modules/jobs/job_types/chief_engineer.dm | 6 +- .../jobs/job_types/head_of_personnel.dm | 10 +- .../jobs/job_types/head_of_security.dm | 4 +- .../jobs/job_types/research_director.dm | 8 +- code/modules/language/calcic.dm | 4 +- code/modules/language/shadowtongue.dm | 12 +- code/modules/language/sylvan.dm | 8 +- code/modules/language/voltaic.dm | 6 +- code/modules/mining/minebot.dm | 4 +- code/modules/mob/living/brain/brain_item.dm | 4 +- .../carbon/human/species_types/mothmen.dm | 2 +- .../mob/living/carbon/human/verbs/give.dm | 4 +- .../mob/living/simple_animal/bot/honkbot.dm | 12 +- .../mob/living/simple_animal/bot/secbot.dm | 20 +-- .../friendly/drone/interaction.dm | 6 +- .../simple_animal/friendly/farm_animals.dm | 2 +- .../hostile/mining_mobs/goldgrub.dm | 2 +- .../mob/living/simple_animal/parrot.dm | 10 +- .../byond_particles/emitter/smoke.dm | 28 ++--- .../byond_particles/particle/fire.dm | 50 ++++---- .../byond_particles/particle/smoke.dm | 42 +++---- .../byond_particles/particle/spark.dm | 24 ++-- code/modules/power/apc/apc_main.dm | 2 +- code/modules/power/cable.dm | 6 +- .../particle_accelerator.dm | 26 ++-- code/modules/power/singularity/singularity.dm | 2 +- .../chemistry/reagents/metabolites.dm | 54 ++++---- code/modules/religion/_religion_sects.dm | 2 +- code/modules/religion/sects/shadow_sect.dm | 6 +- .../research/nanites/nanite_programs.dm | 4 +- .../nanites/nanite_programs/sensor.dm | 8 +- .../modules/research/techweb/_techweb_node.dm | 2 +- code/modules/research/techweb/all_nodes.dm | 4 +- .../xenobiology/crossbreeding/__corecross.dm | 6 +- .../crossbreeding/selfsustaining.dm | 6 +- .../ruins/lavalandruin_code/syndicate_base.dm | 6 +- .../ruins/spaceruin_code/hilbertshotel.dm | 28 ++--- code/modules/unit_tests/merge_type.dm | 10 +- code/modules/uplink/uplink_items.dm | 2 +- code/modules/vehicles/cars/clowncar.dm | 4 +- code/modules/vehicles/mecha/combat/honker.dm | 20 +-- code/modules/vending/_vending.dm | 8 +- code/modules/vending/autodrobe.dm | 12 +- code/modules/vending/boozeomat.dm | 2 +- code/modules/vending/coffee.dm | 4 +- code/modules/vending/cola.dm | 4 +- code/modules/vending/drinnerware.dm | 2 +- code/modules/vending/engineering.dm | 6 +- code/modules/vending/games.dm | 8 +- code/modules/vending/liberation.dm | 6 +- code/modules/vending/liberation_toy.dm | 12 +- code/modules/vending/magivend.dm | 14 +-- code/modules/vending/medical.dm | 6 +- code/modules/vending/medical_wall.dm | 2 +- code/modules/vending/megaseed.dm | 16 +-- code/modules/vending/mining.dm | 4 +- code/modules/vending/nutrimax.dm | 2 +- code/modules/vending/plasmaresearch.dm | 4 +- code/modules/vending/sustenance.dm | 6 +- code/modules/vending/youtool.dm | 22 ++-- interface/stylesheet.dm | 38 +++--- tools/HubMigrator/HubMigrator.dm | 20 +-- tools/Redirector/textprocs.dm | 10 +- 173 files changed, 1073 insertions(+), 1073 deletions(-) diff --git a/code/__DEFINES/MC.dm b/code/__DEFINES/MC.dm index 9f230e56fe99c..a6aa434ccb7e4 100644 --- a/code/__DEFINES/MC.dm +++ b/code/__DEFINES/MC.dm @@ -4,12 +4,12 @@ #define MC_SPLIT_TICK_INIT(phase_count) var/original_tick_limit = Master.current_ticklimit; var/split_tick_phases = ##phase_count #define MC_SPLIT_TICK \ - if(split_tick_phases > 1){\ - Master.current_ticklimit = ((original_tick_limit - TICK_USAGE) / split_tick_phases) + TICK_USAGE;\ - --split_tick_phases;\ - } else {\ - Master.current_ticklimit = original_tick_limit;\ - } + if(split_tick_phases > 1){\ + Master.current_ticklimit = ((original_tick_limit - TICK_USAGE) / split_tick_phases) + TICK_USAGE;\ + --split_tick_phases;\ + } else {\ + Master.current_ticklimit = original_tick_limit;\ + } // Used to smooth out costs to try and avoid oscillation. #define MC_AVERAGE_FAST(average, current) (0.7 * (average) + 0.3 * (current)) @@ -84,8 +84,8 @@ #define SUBSYSTEM_DEF(X) GLOBAL_REAL(SS##X, /datum/controller/subsystem/##X);\ /datum/controller/subsystem/##X/New(){\ - NEW_SS_GLOBAL(SS##X);\ - PreInit();\ + NEW_SS_GLOBAL(SS##X);\ + PreInit();\ ss_id=#X;\ }\ /datum/controller/subsystem/##X @@ -108,8 +108,8 @@ #define PROCESSING_SUBSYSTEM_DEF(X) GLOBAL_REAL(SS##X, /datum/controller/subsystem/processing/##X);\ /datum/controller/subsystem/processing/##X/New(){\ - NEW_SS_GLOBAL(SS##X);\ - PreInit();\ + NEW_SS_GLOBAL(SS##X);\ + PreInit();\ ss_id="processing_[#X]";\ }\ /datum/controller/subsystem/processing/##X diff --git a/code/__DEFINES/_globals.dm b/code/__DEFINES/_globals.dm index 50527061bd770..4d91a5184cf7a 100644 --- a/code/__DEFINES/_globals.dm +++ b/code/__DEFINES/_globals.dm @@ -3,8 +3,8 @@ //Creates a global initializer with a given InitValue expression, do not use #define GLOBAL_MANAGED(X, InitValue)\ /datum/controller/global_vars/proc/InitGlobal##X(){\ - ##X = ##InitValue;\ - gvars_datum_init_order += #X;\ + ##X = ##InitValue;\ + gvars_datum_init_order += #X;\ } //Creates an empty global initializer, do not use #define GLOBAL_UNMANAGED(X) /datum/controller/global_vars/proc/InitGlobal##X() { return; } @@ -13,8 +13,8 @@ #ifndef TESTING #define GLOBAL_PROTECT(X)\ /datum/controller/global_vars/InitGlobal##X(){\ - ..();\ - gvars_datum_protected_varlist[#X] = TRUE;\ + ..();\ + gvars_datum_protected_varlist[#X] = TRUE;\ } #else #define GLOBAL_PROTECT(X) diff --git a/code/__DEFINES/dcs/signals/signals_atom/signals_atom.dm b/code/__DEFINES/dcs/signals/signals_atom/signals_atom.dm index 2cc4c0eaabc25..02079493f1cbc 100644 --- a/code/__DEFINES/dcs/signals/signals_atom/signals_atom.dm +++ b/code/__DEFINES/dcs/signals/signals_atom/signals_atom.dm @@ -107,7 +107,7 @@ #define COMPONENT_BLOCK_CONTAMINATION 1 ///! from base of datum/radiation_wave/check_obstructions(): (datum/radiation_wave, width) #define COMSIG_ATOM_RAD_WAVE_PASSING "atom_rad_wave_pass" - #define COMPONENT_RAD_WAVE_HANDLED 1 + #define COMPONENT_RAD_WAVE_HANDLED 1 ///! from internal loop in atom/movable/proc/CanReach(): (list/next) #define COMSIG_ATOM_CANREACH "atom_can_reach" #define COMPONENT_ALLOW_REACH (1<<0) diff --git a/code/__DEFINES/dcs/signals/signals_datum/signals_datum.dm b/code/__DEFINES/dcs/signals/signals_datum/signals_datum.dm index e9fc41ba61575..f8a32e0dd7108 100644 --- a/code/__DEFINES/dcs/signals/signals_datum/signals_datum.dm +++ b/code/__DEFINES/dcs/signals/signals_datum/signals_datum.dm @@ -71,7 +71,7 @@ // /datum/component/two_handed signals #define COMSIG_TWOHANDED_WIELD "twohanded_wield" //from base of datum/component/two_handed/proc/wield(mob/living/carbon/user): (/mob/user) - #define COMPONENT_TWOHANDED_BLOCK_WIELD 1 + #define COMPONENT_TWOHANDED_BLOCK_WIELD 1 #define COMSIG_TWOHANDED_UNWIELD "twohanded_unwield" //from base of datum/component/two_handed/proc/unwield(mob/living/carbon/user): (/mob/user) // /datum/action signals diff --git a/code/__DEFINES/dcs/signals/signals_mob/signals_mob.dm b/code/__DEFINES/dcs/signals/signals_mob/signals_mob.dm index 34ac00a867905..016833787b053 100644 --- a/code/__DEFINES/dcs/signals/signals_mob/signals_mob.dm +++ b/code/__DEFINES/dcs/signals/signals_mob/signals_mob.dm @@ -58,7 +58,7 @@ #define SPEECH_FORCED 7 */ #define COMSIG_MOB_EMOTE "mob_emote" // from /mob/living/emote(): () #define COMSIG_MOB_SWAP_HANDS "mob_swap_hands" //from base of mob/swap_hand() - #define COMPONENT_BLOCK_SWAP 1 + #define COMPONENT_BLOCK_SWAP 1 #define COMSIG_MOB_DEADSAY "mob_deadsay" // from /mob/say_dead(): (mob/speaker, message) #define MOB_DEADSAY_SIGNAL_INTERCEPT 1 #define COMSIG_MOB_POINTED "mob_pointed" //from base of /mob/verb/pointed: (atom/A) diff --git a/code/__DEFINES/dcs/signals/signals_obj/signals_item/signals_item.dm b/code/__DEFINES/dcs/signals/signals_obj/signals_item/signals_item.dm index 555630211a3a4..1e123e41a5d4f 100644 --- a/code/__DEFINES/dcs/signals/signals_obj/signals_item/signals_item.dm +++ b/code/__DEFINES/dcs/signals/signals_obj/signals_item/signals_item.dm @@ -30,12 +30,12 @@ #define COMSIG_ITEM_HIT_REACT "item_hit_react" //! from base of obj/item/hit_reaction(): (mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", damage = 0, attack_type = MELEE_ATTACK) #define COMPONENT_HIT_REACTION_BLOCK (1<<0) #define COMSIG_ITEM_SHARPEN_ACT "sharpen_act" //! from base of item/sharpener/attackby(): (amount, max) - #define COMPONENT_BLOCK_SHARPEN_APPLIED 1 - #define COMPONENT_BLOCK_SHARPEN_BLOCKED 2 - #define COMPONENT_BLOCK_SHARPEN_ALREADY 4 - #define COMPONENT_BLOCK_SHARPEN_MAXED 8 + #define COMPONENT_BLOCK_SHARPEN_APPLIED 1 + #define COMPONENT_BLOCK_SHARPEN_BLOCKED 2 + #define COMPONENT_BLOCK_SHARPEN_ALREADY 4 + #define COMPONENT_BLOCK_SHARPEN_MAXED 8 #define COMSIG_ITEM_CHECK_WIELDED "item_check_wielded" //! used to check if the item is wielded for special effects - #define COMPONENT_IS_WIELDED 1 + #define COMPONENT_IS_WIELDED 1 #define COMSIG_ITEM_DISABLE_EMBED "item_disable_embed" ///from [/obj/item/proc/disableEmbedding]: ///Called when an item is being offered, from [/obj/item/proc/on_offered(mob/living/carbon/offerer)] diff --git a/code/__DEFINES/economy.dm b/code/__DEFINES/economy.dm index 625d6402293b8..84573363b15d6 100644 --- a/code/__DEFINES/economy.dm +++ b/code/__DEFINES/economy.dm @@ -9,10 +9,10 @@ #define PAYCHECK_COMMAND_DEPT 80 // given from department budget #define PAYCHECK_VIP 2000 /* Note: The current intention for crazy amount of money to VIP is that they can be a rich shitter - or be targeted by antags for their money - oh, my, being rich isn't always good. - The first buff to their money was to 2,000 credits. Nerf is fine if you think it's necessary, - but if you decrease their payment too much, they'll be no longer interested. - I recommend to nerf their gimmick spawn chance instead. */ + or be targeted by antags for their money - oh, my, being rich isn't always good. + The first buff to their money was to 2,000 credits. Nerf is fine if you think it's necessary, + but if you decrease their payment too much, they'll be no longer interested. + I recommend to nerf their gimmick spawn chance instead. */ #define PAYCHECK_WELFARE 20 //NEETbucks diff --git a/code/__DEFINES/html_assistant.dm b/code/__DEFINES/html_assistant.dm index 03f95ad20158b..4867ef425c55a 100644 --- a/code/__DEFINES/html_assistant.dm +++ b/code/__DEFINES/html_assistant.dm @@ -1,26 +1,26 @@ #define TOOLTIP_CSS_SETUP \ "" // IE11 does not support the max-content attribute, so 'width: max-content;' doesn't work. diff --git a/code/__DEFINES/maps.dm b/code/__DEFINES/maps.dm index 6e4d76e358965..abc9bdec2b495 100644 --- a/code/__DEFINES/maps.dm +++ b/code/__DEFINES/maps.dm @@ -74,12 +74,12 @@ require only minor tweaks. /// enum - how space transitions should affect this level #define ZTRAIT_LINKAGE "Linkage" - /// UNAFFECTED if absent - no space transitions - #define UNAFFECTED null - /// SELFLOOPING - space transitions always self-loop - #define SELFLOOPING "Self" - /// CROSSLINKED - mixed in with the cross-linked space pool - #define CROSSLINKED "Cross" + /// UNAFFECTED if absent - no space transitions + #define UNAFFECTED null + /// SELFLOOPING - space transitions always self-loop + #define SELFLOOPING "Self" + /// CROSSLINKED - mixed in with the cross-linked space pool + #define CROSSLINKED "Cross" /// string - type path of the z-level's baseturf (defaults to space) #define ZTRAIT_BASETURF "Baseturf" @@ -89,11 +89,11 @@ require only minor tweaks. #define ZTRAITS_STATION list(ZTRAIT_LINKAGE = SELFLOOPING, ZTRAIT_STATION = TRUE) #define ZTRAITS_SPACE list(ZTRAIT_LINKAGE = SELFLOOPING, ZTRAIT_DYNAMIC_LEVEL = TRUE) #define ZTRAITS_LAVALAND list(\ - ZTRAIT_MINING = TRUE, \ - ZTRAIT_LAVA_RUINS = TRUE, \ - ZTRAIT_BOMBCAP_MULTIPLIER = 2, \ + ZTRAIT_MINING = TRUE, \ + ZTRAIT_LAVA_RUINS = TRUE, \ + ZTRAIT_BOMBCAP_MULTIPLIER = 2, \ ZTRAIT_ASHSTORM = TRUE, \ - ZTRAIT_BASETURF = /turf/open/lava/smooth/lava_land_surface) + ZTRAIT_BASETURF = /turf/open/lava/smooth/lava_land_surface) #define ZTRAITS_REEBE list(ZTRAIT_REEBE = TRUE, ZTRAIT_BOMBCAP_MULTIPLIER = 0.5) #define ZTRAITS_DEBUG list(ZTRAIT_DEBUG = TRUE) #define DL_NAME "name" @@ -102,7 +102,7 @@ require only minor tweaks. /// must correspond to _basemap.dm for things to work correctly #define DEFAULT_MAP_TRAITS list(\ - DECLARE_LEVEL("CentCom", ZTRAITS_CENTCOM),\ + DECLARE_LEVEL("CentCom", ZTRAITS_CENTCOM),\ ) // Camera lock flags diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index b37a72da289ea..af8bb4bc0f3d6 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -93,11 +93,11 @@ ///type and all subtypes should always immediately call Initialize in New() #define INITIALIZE_IMMEDIATE(X) ##X/New(loc, ...){\ - ..();\ - if(!(flags_1 & INITIALIZED_1)) {\ - args[1] = TRUE;\ - SSatoms.InitAtom(src, FALSE, args);\ - }\ + ..();\ + if(!(flags_1 & INITIALIZED_1)) {\ + args[1] = TRUE;\ + SSatoms.InitAtom(src, FALSE, args);\ + }\ } //! ### SS initialization hints diff --git a/code/__DEFINES/turfs.dm b/code/__DEFINES/turfs.dm index ade1d8c2699a1..d4606518d19b7 100644 --- a/code/__DEFINES/turfs.dm +++ b/code/__DEFINES/turfs.dm @@ -12,16 +12,16 @@ //supposedly the fastest way to do this according to https://gist.github.com/Giacom/be635398926bb463b42a ///Returns a list of turf in a square #define RANGE_TURFS(RADIUS, CENTER) \ - block( \ - locate(max(CENTER.x-(RADIUS),1), max(CENTER.y-(RADIUS),1), CENTER.z), \ - locate(min(CENTER.x+(RADIUS),world.maxx), min(CENTER.y+(RADIUS),world.maxy), CENTER.z) \ - ) + block( \ + locate(max(CENTER.x-(RADIUS),1), max(CENTER.y-(RADIUS),1), CENTER.z), \ + locate(min(CENTER.x+(RADIUS),world.maxx), min(CENTER.y+(RADIUS),world.maxy), CENTER.z) \ + ) #define RANGE_TURFS_XY(XRADIUS, YRADIUS, CENTER) \ - block( \ - locate(max(CENTER.x-(XRADIUS),1), max(CENTER.y-(YRADIUS),1), CENTER.z), \ - locate(min(CENTER.x+(XRADIUS),world.maxx), min(CENTER.y+(YRADIUS),world.maxy), CENTER.z) \ - ) + block( \ + locate(max(CENTER.x-(XRADIUS),1), max(CENTER.y-(YRADIUS),1), CENTER.z), \ + locate(min(CENTER.x+(XRADIUS),world.maxx), min(CENTER.y+(YRADIUS),world.maxy), CENTER.z) \ + ) ///Returns all turfs in a zlevel #define Z_TURFS(ZLEVEL) block(locate(1,1,ZLEVEL), locate(world.maxx, world.maxy, ZLEVEL)) diff --git a/code/__HELPERS/areas.dm b/code/__HELPERS/areas.dm index bb1e1321e8768..9e81c7044de12 100644 --- a/code/__HELPERS/areas.dm +++ b/code/__HELPERS/areas.dm @@ -1,9 +1,9 @@ #define BP_MAX_ROOM_SIZE 300 GLOBAL_LIST_INIT(typecache_powerfailure_safe_areas, typecacheof(/area/engine/engineering, \ - /area/engine/supermatter, \ - /area/engine/atmospherics_engine, \ - /area/ai_monitored/turret_protected/ai)) + /area/engine/supermatter, \ + /area/engine/atmospherics_engine, \ + /area/ai_monitored/turret_protected/ai)) // Gets an atmos isolated contained space // Returns an associative list of turf|dirs pairs diff --git a/code/__HELPERS/atoms.dm b/code/__HELPERS/atoms.dm index bbb95ec8224ac..1ff9ae5b258d3 100644 --- a/code/__HELPERS/atoms.dm +++ b/code/__HELPERS/atoms.dm @@ -145,18 +145,18 @@ /* rough example of the "cone" made by the 3 dirs checked B - \ + \ \ - > - < + > + < \ - \ + \ B --><-- A - / + / / - < + < > - / + / / B */ diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index f6473d991c524..c465dae90cad3 100644 --- a/code/__HELPERS/icons.dm +++ b/code/__HELPERS/icons.dm @@ -18,47 +18,47 @@ remember you first need to setup an /icon var like so: GLOBAL_DATUM_INIT(my_icon, /icon, new('iconfile.dmi')) icon/ChangeOpacity(amount = 1) - A very common operation in DM is to try to make an icon more or less transparent. Making an icon more - transparent is usually much easier than making it less so, however. This proc basically is a frontend - for MapColors() which can change opacity any way you like, in much the same way that SetIntensity() - can make an icon lighter or darker. If amount is 0.5, the opacity of the icon will be cut in half. - If amount is 2, opacity is doubled and anything more than half-opaque will become fully opaque. + A very common operation in DM is to try to make an icon more or less transparent. Making an icon more + transparent is usually much easier than making it less so, however. This proc basically is a frontend + for MapColors() which can change opacity any way you like, in much the same way that SetIntensity() + can make an icon lighter or darker. If amount is 0.5, the opacity of the icon will be cut in half. + If amount is 2, opacity is doubled and anything more than half-opaque will become fully opaque. icon/GrayScale() - Converts the icon to grayscale instead of a fully colored icon. Alpha values are left intact. + Converts the icon to grayscale instead of a fully colored icon. Alpha values are left intact. icon/ColorTone(tone) - Similar to GrayScale(), this proc converts the icon to a range of black -> tone -> white, where tone is an - RGB color (its alpha is ignored). This can be used to create a sepia tone or similar effect. - See also the global ColorTone() proc. + Similar to GrayScale(), this proc converts the icon to a range of black -> tone -> white, where tone is an + RGB color (its alpha is ignored). This can be used to create a sepia tone or similar effect. + See also the global ColorTone() proc. icon/MinColors(icon) - The icon is blended with a second icon where the minimum of each RGB pixel is the result. - Transparency may increase, as if the icons were blended with ICON_ADD. You may supply a color in place of an icon. + The icon is blended with a second icon where the minimum of each RGB pixel is the result. + Transparency may increase, as if the icons were blended with ICON_ADD. You may supply a color in place of an icon. icon/MaxColors(icon) - The icon is blended with a second icon where the maximum of each RGB pixel is the result. - Opacity may increase, as if the icons were blended with ICON_OR. You may supply a color in place of an icon. + The icon is blended with a second icon where the maximum of each RGB pixel is the result. + Opacity may increase, as if the icons were blended with ICON_OR. You may supply a color in place of an icon. icon/Opaque(background = "#000000") - All alpha values are set to 255 throughout the icon. Transparent pixels become black, or whatever background color you specify. + All alpha values are set to 255 throughout the icon. Transparent pixels become black, or whatever background color you specify. icon/BecomeAlphaMask() - You can convert a simple grayscale icon into an alpha mask to use with other icons very easily with this proc. - The black parts become transparent, the white parts stay white, and anything in between becomes a translucent shade of white. + You can convert a simple grayscale icon into an alpha mask to use with other icons very easily with this proc. + The black parts become transparent, the white parts stay white, and anything in between becomes a translucent shade of white. icon/AddAlphaMask(mask) - The alpha values of the mask icon will be blended with the current icon. Anywhere the mask is opaque, - the current icon is untouched. Anywhere the mask is transparent, the current icon becomes transparent. - Where the mask is translucent, the current icon becomes more transparent. + The alpha values of the mask icon will be blended with the current icon. Anywhere the mask is opaque, + the current icon is untouched. Anywhere the mask is transparent, the current icon becomes transparent. + Where the mask is translucent, the current icon becomes more transparent. icon/UseAlphaMask(mask, mode) - Sometimes you may want to take the alpha values from one icon and use them on a different icon. - This proc will do that. Just supply the icon whose alpha mask you want to use, and src will change - so it has the same colors as before but uses the mask for opacity. + Sometimes you may want to take the alpha values from one icon and use them on a different icon. + This proc will do that. Just supply the icon whose alpha mask you want to use, and src will change + so it has the same colors as before but uses the mask for opacity. COLOR MANAGEMENT AND HSV RGB isn't the only way to represent color. Sometimes it's more useful to work with a model called HSV, which stands for hue, saturation, and value. * The hue of a color describes where it is along the color wheel. It goes from red to yellow to green to - cyan to blue to magenta and back to red. + cyan to blue to magenta and back to red. * The saturation of a color is how much color is in it. A color with low saturation will be more gray, - and with no saturation at all it is a shade of gray. + and with no saturation at all it is a shade of gray. * The value of a color determines how bright it is. A high-value color is vivid, moderate value is dark, - and no value at all is black. + and no value at all is black. Just as BYOND uses "#rrggbb" to represent RGB values, a similar format is used for HSV: "#hhhssvv". The hue is three hex digits because it ranges from 0 to 0x5FF. @@ -78,42 +78,42 @@ More than one HSV color can match the same RGB color. Here are some procs you can use for color management: ReadRGB(rgb) - Takes an RGB string like "#ffaa55" and converts it to a list such as list(255,170,85). If an RGBA format is used - that includes alpha, the list will have a fourth item for the alpha value. + Takes an RGB string like "#ffaa55" and converts it to a list such as list(255,170,85). If an RGBA format is used + that includes alpha, the list will have a fourth item for the alpha value. hsv(hue, sat, val, apha) - Counterpart to rgb(), this takes the values you input and converts them to a string in "#hhhssvv" or "#hhhssvvaa" - format. Alpha is not included in the result if null. + Counterpart to rgb(), this takes the values you input and converts them to a string in "#hhhssvv" or "#hhhssvvaa" + format. Alpha is not included in the result if null. ReadHSV(rgb) - Takes an HSV string like "#100FF80" and converts it to a list such as list(256,255,128). If an HSVA format is used that - includes alpha, the list will have a fourth item for the alpha value. + Takes an HSV string like "#100FF80" and converts it to a list such as list(256,255,128). If an HSVA format is used that + includes alpha, the list will have a fourth item for the alpha value. RGBtoHSV(rgb) - Takes an RGB or RGBA string like "#ffaa55" and converts it into an HSV or HSVA color such as "#080aaff". + Takes an RGB or RGBA string like "#ffaa55" and converts it into an HSV or HSVA color such as "#080aaff". HSVtoRGB(hsv) - Takes an HSV or HSVA string like "#080aaff" and converts it into an RGB or RGBA color such as "#ff55aa". + Takes an HSV or HSVA string like "#080aaff" and converts it into an RGB or RGBA color such as "#ff55aa". BlendRGB(rgb1, rgb2, amount) - Blends between two RGB or RGBA colors using regular RGB blending. If amount is 0, the first color is the result; - if 1, the second color is the result. 0.5 produces an average of the two. Values outside the 0 to 1 range are allowed as well. - The returned value is an RGB or RGBA color. + Blends between two RGB or RGBA colors using regular RGB blending. If amount is 0, the first color is the result; + if 1, the second color is the result. 0.5 produces an average of the two. Values outside the 0 to 1 range are allowed as well. + The returned value is an RGB or RGBA color. BlendHSV(hsv1, hsv2, amount) - Blends between two HSV or HSVA colors using HSV blending, which tends to produce nicer results than regular RGB - blending because the brightness of the color is left intact. If amount is 0, the first color is the result; if 1, - the second color is the result. 0.5 produces an average of the two. Values outside the 0 to 1 range are allowed as well. - The returned value is an HSV or HSVA color. + Blends between two HSV or HSVA colors using HSV blending, which tends to produce nicer results than regular RGB + blending because the brightness of the color is left intact. If amount is 0, the first color is the result; if 1, + the second color is the result. 0.5 produces an average of the two. Values outside the 0 to 1 range are allowed as well. + The returned value is an HSV or HSVA color. BlendRGBasHSV(rgb1, rgb2, amount) - Like BlendHSV(), but the colors used and the return value are RGB or RGBA colors. The blending is done in HSV form. + Like BlendHSV(), but the colors used and the return value are RGB or RGBA colors. The blending is done in HSV form. HueToAngle(hue) - Converts a hue to an angle range of 0 to 360. Angle 0 is red, 120 is green, and 240 is blue. + Converts a hue to an angle range of 0 to 360. Angle 0 is red, 120 is green, and 240 is blue. AngleToHue(hue) - Converts an angle to a hue in the valid range. + Converts an angle to a hue in the valid range. RotateHue(hsv, angle) - Takes an HSV or HSVA value and rotates the hue forward through red, green, and blue by an angle from 0 to 360. - (Rotating red by 60° produces yellow.) The result is another HSV or HSVA color with the same saturation and value - as the original, but a different hue. + Takes an HSV or HSVA value and rotates the hue forward through red, green, and blue by an angle from 0 to 360. + (Rotating red by 60° produces yellow.) The result is another HSV or HSVA color with the same saturation and value + as the original, but a different hue. GrayScale(rgb) - Takes an RGB or RGBA color and converts it to grayscale. Returns an RGB or RGBA string. + Takes an RGB or RGBA color and converts it to grayscale. Returns an RGB or RGBA string. ColorTone(rgb, tone) - Similar to GrayScale(), this proc converts an RGB or RGBA color to a range of black -> tone -> white instead of - using strict shades of gray. The tone value is an RGB color; any alpha value is ignored. + Similar to GrayScale(), this proc converts an RGB or RGBA color to a range of black -> tone -> white instead of + using strict shades of gray. The tone value is an RGB color; any alpha value is ignored. */ /* diff --git a/code/__HELPERS/matrices.dm b/code/__HELPERS/matrices.dm index 7ef11cc7c06a1..1542b1d072cf6 100644 --- a/code/__HELPERS/matrices.dm +++ b/code/__HELPERS/matrices.dm @@ -82,9 +82,9 @@ //Dumps the matrix data in a matrix-grid format /* - a d 0 - b e 0 - c f 1 + a d 0 + b e 0 + c f 1 */ /matrix/proc/togrid() . = list() diff --git a/code/__HELPERS/string_assoc_lists.dm b/code/__HELPERS/string_assoc_lists.dm index e269da7da5eb2..569649ed59611 100644 --- a/code/__HELPERS/string_assoc_lists.dm +++ b/code/__HELPERS/string_assoc_lists.dm @@ -5,14 +5,14 @@ GLOBAL_LIST_EMPTY(string_assoc_lists) * Caches associative lists with non-numeric stringify-able index keys and stringify-able values (text/typepath -> text/path/number). */ /datum/proc/string_assoc_list(list/values) - var/list/string_id = list() - for(var/val in values) - string_id += "[val]_[values[val]]" - string_id.Join("-") + var/list/string_id = list() + for(var/val in values) + string_id += "[val]_[values[val]]" + string_id.Join("-") - . = GLOB.string_assoc_lists[string_id] + . = GLOB.string_assoc_lists[string_id] - if(.) - return + if(.) + return - return GLOB.string_assoc_lists[string_id] = values + return GLOB.string_assoc_lists[string_id] = values diff --git a/code/__HELPERS/time.dm b/code/__HELPERS/time.dm index 012085514f552..9a0ebd34382eb 100644 --- a/code/__HELPERS/time.dm +++ b/code/__HELPERS/time.dm @@ -98,4 +98,4 @@ GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0) /// Returns the time in an ISO-8601 friendly format. Used when dumping data into external services such as ElasticSearch /proc/iso_timestamp(timevar) - return time2text(timevar || world.timeofday, "YYYY-MM-DDThh:mm:ss") + return time2text(timevar || world.timeofday, "YYYY-MM-DDThh:mm:ss") diff --git a/code/_globalvars/soul_glimmer.dm b/code/_globalvars/soul_glimmer.dm index 217efcaa4acd9..c7e77b755ff70 100644 --- a/code/_globalvars/soul_glimmer.dm +++ b/code/_globalvars/soul_glimmer.dm @@ -1,8 +1,8 @@ /* - Colours and assignments for psychic sense - colour - color - :trolled: + Colours and assignments for psychic sense + colour + color + :trolled: */ //ALL the psychic soul colours diff --git a/code/_js/menus.dm b/code/_js/menus.dm index 05e6edc6a6dab..fc7c3a42662df 100644 --- a/code/_js/menus.dm +++ b/code/_js/menus.dm @@ -1,37 +1,37 @@ #define js_dropdowns {" function dropdowns() { - var divs = document.getElementsByTagName('div'); - var headers = new Array(); - var links = new Array(); - for(var i=0;i=0) { - elem.className = elem.className.replace('visible','hidden'); - this.className = this.className.replace('open','closed'); - this.innerHTML = this.innerHTML.replace('-','+'); - } - else { - elem.className = elem.className.replace('hidden','visible'); - this.className = this.className.replace('closed','open'); - this.innerHTML = this.innerHTML.replace('+','-'); - } - return false; - } - })(links\[i\]); - } - } + var divs = document.getElementsByTagName('div'); + var headers = new Array(); + var links = new Array(); + for(var i=0;i=0) { + elem.className = elem.className.replace('visible','hidden'); + this.className = this.className.replace('open','closed'); + this.innerHTML = this.innerHTML.replace('-','+'); + } + else { + elem.className = elem.className.replace('hidden','visible'); + this.className = this.className.replace('closed','open'); + this.innerHTML = this.innerHTML.replace('+','-'); + } + return false; + } + })(links\[i\]); + } + } } "} diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index 1ccbecf79a9f6..08b8159ddf7a6 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -111,9 +111,9 @@ plane = FULLSCREEN_PLANE /atom/movable/screen/fullscreen/law_change - icon_state = "law_change" - layer = BLIND_LAYER - plane = FULLSCREEN_PLANE + icon_state = "law_change" + layer = BLIND_LAYER + plane = FULLSCREEN_PLANE /atom/movable/screen/fullscreen/curse icon_state = "curse" diff --git a/code/controllers/subsystem/traumas.dm b/code/controllers/subsystem/traumas.dm index 056bdb65eb4f6..6d07a89806092 100644 --- a/code/controllers/subsystem/traumas.dm +++ b/code/controllers/subsystem/traumas.dm @@ -231,13 +231,13 @@ SUBSYSTEM_DEF(traumas) ) phobia_species = list("lizards" = typecacheof(list(/datum/species/lizard)), - "skeletons" = typecacheof(list(/datum/species/skeleton, /datum/species/plasmaman)), - "conspiracies" = typecacheof(list(/datum/species/abductor, /datum/species/lizard)), - "robots" = typecacheof(list(/datum/species/android)), - "the supernatural" = typecacheof(list(/datum/species/golem/clockwork, /datum/species/golem/runic)), - "aliens" = typecacheof(list(/datum/species/abductor, /datum/species/pod, - /datum/species/shadow)), - "anime" = typecacheof(list(/datum/species/human/felinid)) + "skeletons" = typecacheof(list(/datum/species/skeleton, /datum/species/plasmaman)), + "conspiracies" = typecacheof(list(/datum/species/abductor, /datum/species/lizard)), + "robots" = typecacheof(list(/datum/species/android)), + "the supernatural" = typecacheof(list(/datum/species/golem/clockwork, /datum/species/golem/runic)), + "aliens" = typecacheof(list(/datum/species/abductor, /datum/species/pod, + /datum/species/shadow)), + "anime" = typecacheof(list(/datum/species/human/felinid)) ) return SS_INIT_SUCCESS diff --git a/code/controllers/subsystem/weather.dm b/code/controllers/subsystem/weather.dm index 4dd1278c52f87..3f259c15e1e09 100644 --- a/code/controllers/subsystem/weather.dm +++ b/code/controllers/subsystem/weather.dm @@ -78,10 +78,10 @@ SUBSYSTEM_DEF(weather) next_hit_by_zlevel["[z]"] = null /datum/controller/subsystem/weather/proc/get_weather(z, area/active_area) - var/datum/weather/A - for(var/V in processing) - var/datum/weather/W = V - if((z in W.impacted_z_levels) && W.area_type == active_area.type) - A = W - break - return A + var/datum/weather/A + for(var/V in processing) + var/datum/weather/W = V + if((z in W.impacted_z_levels) && W.area_type == active_area.type) + A = W + break + return A diff --git a/code/datums/components/crafting/recipes.dm b/code/datums/components/crafting/recipes.dm index 1489651c899e3..cce9f528aa475 100644 --- a/code/datums/components/crafting/recipes.dm +++ b/code/datums/components/crafting/recipes.dm @@ -121,7 +121,7 @@ name = "Tail Club" result = /obj/item/club/tailclub reqs = list(/obj/item/organ/tail/lizard = 1, - /obj/item/stack/sheet/iron = 1) + /obj/item/stack/sheet/iron = 1) time = 40 category = CAT_WEAPONRY subcategory = CAT_WEAPON @@ -142,7 +142,7 @@ name = "Liz O' Nine Tails" result = /obj/item/melee/chainofcommand/tailwhip reqs = list(/obj/item/organ/tail/lizard = 1, - /obj/item/stack/cable_coil = 1) + /obj/item/stack/cable_coil = 1) time = 40 category = CAT_WEAPONRY subcategory = CAT_WEAPON @@ -151,7 +151,7 @@ name = "Cat O' Nine Tails" result = /obj/item/melee/chainofcommand/tailwhip/kitty reqs = list(/obj/item/organ/tail/cat = 1, - /obj/item/stack/cable_coil = 1) + /obj/item/stack/cable_coil = 1) time = 40 category = CAT_WEAPONRY subcategory = CAT_WEAPON @@ -1014,9 +1014,9 @@ result = /obj/item/pressure_plate time = 5 reqs = list(/obj/item/stack/sheet/iron = 1, - /obj/item/stack/tile/iron = 1, - /obj/item/stack/cable_coil = 2, - /obj/item/assembly/igniter = 1) + /obj/item/stack/tile/iron = 1, + /obj/item/stack/cable_coil = 2, + /obj/item/assembly/igniter = 1) category = CAT_MISC @@ -1304,8 +1304,8 @@ result = /obj/structure/guillotine time = 150 // Building a functioning guillotine takes time reqs = list(/obj/item/stack/sheet/plasteel = 3, - /obj/item/stack/sheet/wood = 20, - /obj/item/stack/cable_coil = 10) + /obj/item/stack/sheet/wood = 20, + /obj/item/stack/cable_coil = 10) tools = list(TOOL_SCREWDRIVER, TOOL_WRENCH, TOOL_WELDER) category = CAT_STRUCTURE dangerous_craft = TRUE diff --git a/code/datums/components/crafting/tailoring.dm b/code/datums/components/crafting/tailoring.dm index 8fb8434ee5ec0..692a89e9707a3 100644 --- a/code/datums/components/crafting/tailoring.dm +++ b/code/datums/components/crafting/tailoring.dm @@ -70,8 +70,8 @@ time = 45 tools = list(TOOL_SCREWDRIVER, TOOL_MULTITOOL) reqs = list(/obj/item/clothing/mask/gas/old = 1, - /obj/item/assembly/voice = 1, - /obj/item/stack/cable_coil = 5) + /obj/item/assembly/voice = 1, + /obj/item/stack/cable_coil = 5) category = CAT_CLOTHING /datum/crafting_recipe/hudsunsec diff --git a/code/datums/components/forensics.dm b/code/datums/components/forensics.dm index 069f3ad1fd489..f4e5786234a40 100644 --- a/code/datums/components/forensics.dm +++ b/code/datums/components/forensics.dm @@ -31,7 +31,7 @@ RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, PROC_REF(clean_act)) /datum/component/forensics/UnregisterFromParent() - UnregisterSignal(parent, list(COMSIG_COMPONENT_CLEAN_ACT)) + UnregisterSignal(parent, list(COMSIG_COMPONENT_CLEAN_ACT)) /datum/component/forensics/PostTransfer() if(!isatom(parent)) diff --git a/code/datums/components/haircolor_clothes.dm b/code/datums/components/haircolor_clothes.dm index f578e0a848b71..cae0c1c1f42d2 100644 --- a/code/datums/components/haircolor_clothes.dm +++ b/code/datums/components/haircolor_clothes.dm @@ -1,18 +1,18 @@ /datum/component/haircolor_clothing/Initialize() - RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, PROC_REF(onEquip)) - RegisterSignal(parent, COMSIG_ATOM_UPDATE_ICON, PROC_REF(update_color)) + RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, PROC_REF(onEquip)) + RegisterSignal(parent, COMSIG_ATOM_UPDATE_ICON, PROC_REF(update_color)) /datum/component/haircolor_clothing/proc/onEquip(obj/item/I, mob/living/carbon/human/H, slot) - SIGNAL_HANDLER - if(ishuman(H) && slot == ITEM_SLOT_HEAD) - update_color(I, H) - H.update_inv_head() //Color might have been changed + SIGNAL_HANDLER + if(ishuman(H) && slot == ITEM_SLOT_HEAD) + update_color(I, H) + H.update_inv_head() //Color might have been changed /datum/component/haircolor_clothing/proc/update_color(obj/item/I, mob/living/carbon/human/H) - SIGNAL_HANDLER - if(ishuman(H)) - I.add_atom_colour("#[H.hair_color]", FIXED_COLOUR_PRIORITY) + SIGNAL_HANDLER + if(ishuman(H)) + I.add_atom_colour("#[H.hair_color]", FIXED_COLOUR_PRIORITY) /datum/component/haircolor_clothing/Destroy() - UnregisterSignal(parent, list(COMSIG_ITEM_EQUIPPED,COMSIG_ATOM_UPDATE_ICON)) - return ..() + UnregisterSignal(parent, list(COMSIG_ITEM_EQUIPPED,COMSIG_ATOM_UPDATE_ICON)) + return ..() diff --git a/code/datums/components/storage/concrete/pockets.dm b/code/datums/components/storage/concrete/pockets.dm index e36ffb3f4dc11..aeae6ab3eced1 100644 --- a/code/datums/components/storage/concrete/pockets.dm +++ b/code/datums/components/storage/concrete/pockets.dm @@ -108,9 +108,9 @@ /datum/component/storage/concrete/pockets/helmet/Initialize() . = ..() can_hold = typecacheof(list(/obj/item/reagent_containers/food/drinks/bottle/vodka, - /obj/item/reagent_containers/food/drinks/bottle/molotov, - /obj/item/reagent_containers/food/drinks/drinkingglass, - /obj/item/ammo_box/a762)) + /obj/item/reagent_containers/food/drinks/bottle/molotov, + /obj/item/reagent_containers/food/drinks/drinkingglass, + /obj/item/ammo_box/a762)) /datum/component/storage/concrete/pockets/void_cloak quickdraw = TRUE diff --git a/code/datums/diseases/advance/symptoms/alcohol.dm b/code/datums/diseases/advance/symptoms/alcohol.dm index 8b0528fe16095..a7131e7938c0d 100644 --- a/code/datums/diseases/advance/symptoms/alcohol.dm +++ b/code/datums/diseases/advance/symptoms/alcohol.dm @@ -12,7 +12,7 @@ prefixes = list("Drunken ", "Alcoholic ") var/target = 30 //how drunk should the target get? by default, its *just* below enough to cause vomiting threshold_desc = "Stealth 3: The host only reaches a slight buzz.
      \ - Stage Speed 6: The levels of alcohol produced can be lethal. Overriden by the stealth threshold.
      " + Stage Speed 6: The levels of alcohol produced can be lethal. Overriden by the stealth threshold.
      " /datum/symptom/alcohol/severityset(datum/disease/advance/A) . = ..() diff --git a/code/datums/diseases/advance/symptoms/beesymptom.dm b/code/datums/diseases/advance/symptoms/beesymptom.dm index da419f002982c..046fef87a0b50 100644 --- a/code/datums/diseases/advance/symptoms/beesymptom.dm +++ b/code/datums/diseases/advance/symptoms/beesymptom.dm @@ -14,7 +14,7 @@ prefixes = list("Hive ") bodies = list("Bees", "Hive") threshold_desc = "Resistance 12: The bees become symbiotic with the host, synthesizing honey and no longer stinging the stomach lining, and no longer attacking the host. Bees will also contain honey, unless transmission exceeds 10.
      \ - Transmission 8: Bees now contain a completely random toxin." + Transmission 8: Bees now contain a completely random toxin." /datum/symptom/beesease/severityset(datum/disease/advance/A) . = ..() @@ -67,12 +67,12 @@ M.updatehealth() if(prob(10)) M.visible_message("[M] buzzes.", \ - "Your stomach buzzes violently!") + "Your stomach buzzes violently!") if(prob(15)) to_chat(M, "You feel something moving in your throat.") if(prob(10)) M.visible_message("[M] coughs up a bee!", \ - "You cough up a bee!") + "You cough up a bee!") if(toxic_bees) new /mob/living/simple_animal/hostile/poison/bees/toxin(M.loc) else if(honey) diff --git a/code/datums/diseases/advance/symptoms/blobspores.dm b/code/datums/diseases/advance/symptoms/blobspores.dm index ba6f930ae581a..846d015981526 100644 --- a/code/datums/diseases/advance/symptoms/blobspores.dm +++ b/code/datums/diseases/advance/symptoms/blobspores.dm @@ -14,8 +14,8 @@ var/strong_blob var/node_blob threshold_desc = "Resistance 11: There is a chance to spawn a factory blob, instead of a normal blob.
      \ - Resistance 8: Spawns a strong blob instead of a normal blob \ - Resistance 14: Has a chance to spawn a blob node instead of a normal blob
      " + Resistance 8: Spawns a strong blob instead of a normal blob \ + Resistance 14: Has a chance to spawn a blob node instead of a normal blob
      " /datum/symptom/blobspores/severityset(datum/disease/advance/A) . = ..() @@ -23,8 +23,8 @@ severity += 1 if(CONFIG_GET(flag/unconditional_symptom_thresholds)) threshold_desc = "Always: There is a chance to spawn a factory blob, instead of a normal blob.
      \ - Always: Spawns a strong blob instead of a normal blob \ - Resistance 8: Has a chance to spawn a blob node instead of a normal blob
      " + Always: Spawns a strong blob instead of a normal blob \ + Resistance 8: Has a chance to spawn a blob node instead of a normal blob
      " /datum/symptom/blobspores/Start(datum/disease/advance/A) diff --git a/code/datums/diseases/advance/symptoms/braindamage.dm b/code/datums/diseases/advance/symptoms/braindamage.dm index 3472df3dd1aab..4e076548371ac 100644 --- a/code/datums/diseases/advance/symptoms/braindamage.dm +++ b/code/datums/diseases/advance/symptoms/braindamage.dm @@ -15,7 +15,7 @@ var/lethal = FALSE var/moretrauma = FALSE threshold_desc = "transmission 12: The disease's damage reaches lethal levels.
      \ - Speed 9: Host's brain develops even more traumas than normal." + Speed 9: Host's brain develops even more traumas than normal." /datum/symptom/braindamage/severityset(datum/disease/advance/A) . = ..() @@ -23,7 +23,7 @@ severity += 1 if(CONFIG_GET(flag/unconditional_symptom_thresholds)) threshold_desc = "transmission 7: The disease's damage reaches lethal levels.
      \ - Speed 6: Host's brain develops even more traumas than normal." + Speed 6: Host's brain develops even more traumas than normal." /datum/symptom/braindamage/Start(datum/disease/advance/A) if(!..()) diff --git a/code/datums/diseases/advance/symptoms/choking.dm b/code/datums/diseases/advance/symptoms/choking.dm index bbf244f714e38..b71f5bd62e516 100644 --- a/code/datums/diseases/advance/symptoms/choking.dm +++ b/code/datums/diseases/advance/symptoms/choking.dm @@ -33,7 +33,7 @@ Bonus suffixes = list(" Tuberculosis") var/paralysis = FALSE threshold_desc = "Stage Speed 8: Additionally synthesizes pancuronium and sodium thiopental inside the host.
      \ - Transmission 8: Doubles the damage caused by the symptom." + Transmission 8: Doubles the damage caused by the symptom." /datum/symptom/asphyxiation/severityset(datum/disease/advance/A) . = ..() diff --git a/code/datums/diseases/advance/symptoms/clockwork.dm b/code/datums/diseases/advance/symptoms/clockwork.dm index 51e3c94fb8c45..1c047d95e12de 100644 --- a/code/datums/diseases/advance/symptoms/clockwork.dm +++ b/code/datums/diseases/advance/symptoms/clockwork.dm @@ -16,8 +16,8 @@ var/replacebody = FALSE var/robustbits = FALSE threshold_desc = "Stage Speed 4:The virus will replace the host's organic organs with mundane, biometallic versions. +1 severity.
      \ - Resistance 4:The virus will eventually convert the host's entire body to biometallic materials, and maintain its cellular integrity. +1 severity.
      \ - Stage Speed 12:Biometallic mass created by the virus will be superior to typical organic mass. -3 severity." + Resistance 4:The virus will eventually convert the host's entire body to biometallic materials, and maintain its cellular integrity. +1 severity.
      \ + Stage Speed 12:Biometallic mass created by the virus will be superior to typical organic mass. -3 severity." /datum/symptom/robotic_adaptation/OnAdd(datum/disease/advance/A) A.infectable_biotypes |= MOB_ROBOTIC @@ -32,8 +32,8 @@ severity += 1 //at this stage, even one EMP will hurt, a lot. if(CONFIG_GET(flag/unconditional_symptom_thresholds)) threshold_desc = "Always:The virus will replace the host's organic organs with mundane, biometallic versions. +1 severity.
      \ - Resistance 4:The virus will eventually convert the host's entire body to biometallic materials, and maintain its cellular integrity. +1 severity.
      \ - Stage Speed 6:Biometallic mass created by the virus will be superior to typical organic mass. -3 severity." + Resistance 4:The virus will eventually convert the host's entire body to biometallic materials, and maintain its cellular integrity. +1 severity.
      \ + Stage Speed 6:Biometallic mass created by the virus will be superior to typical organic mass. -3 severity." /datum/symptom/robotic_adaptation/Start(datum/disease/advance/A) diff --git a/code/datums/diseases/advance/symptoms/cockroach.dm b/code/datums/diseases/advance/symptoms/cockroach.dm index 739d897a2c274..407eaa8728bba 100644 --- a/code/datums/diseases/advance/symptoms/cockroach.dm +++ b/code/datums/diseases/advance/symptoms/cockroach.dm @@ -46,7 +46,7 @@ if(5) if(prob(30)) M.visible_message("[M] squirms as a cockroach crawls from their pores!", \ - "A cockroach crawls out of your face!!") + "A cockroach crawls out of your face!!") new /mob/living/basic/cockroach(M.loc) if(prob(50)) to_chat(M, "You feel something crawling in your pipes!") diff --git a/code/datums/diseases/advance/symptoms/confusion.dm b/code/datums/diseases/advance/symptoms/confusion.dm index 1854c5b29f613..2c9b32da65f0e 100644 --- a/code/datums/diseases/advance/symptoms/confusion.dm +++ b/code/datums/diseases/advance/symptoms/confusion.dm @@ -32,8 +32,8 @@ Bonus bodies = list("Ditz") var/brain_damage = FALSE threshold_desc = "Resistance 6: Causes brain damage over time.
      \ - Transmission 6: Increases confusion duration.
      \ - Stealth 4: The symptom remains hidden until active." + Transmission 6: Increases confusion duration.
      \ + Stealth 4: The symptom remains hidden until active." /datum/symptom/confusion/severityset(datum/disease/advance/A) . = ..() diff --git a/code/datums/diseases/advance/symptoms/cough.dm b/code/datums/diseases/advance/symptoms/cough.dm index 3311a7a1fb2ad..ac7f62e0a1dc9 100644 --- a/code/datums/diseases/advance/symptoms/cough.dm +++ b/code/datums/diseases/advance/symptoms/cough.dm @@ -31,10 +31,10 @@ BONUS bodies = list("Cough") var/infective = FALSE threshold_desc = "Resistance 3: Host will drop small items when coughing.
      \ - Resistance 10: Occasionally causes coughing fits that stun the host.
      \ - Stage Speed 6: Increases cough frequency.
      \ - Stealth 4: The symptom remains hidden until active.
      \ - Transmission 11: The host's coughing will occasionally spread the virus." + Resistance 10: Occasionally causes coughing fits that stun the host.
      \ + Stage Speed 6: Increases cough frequency.
      \ + Stealth 4: The symptom remains hidden until active.
      \ + Transmission 11: The host's coughing will occasionally spread the virus." /datum/symptom/cough/severityset(datum/disease/advance/A) . = ..() diff --git a/code/datums/diseases/advance/symptoms/deafness.dm b/code/datums/diseases/advance/symptoms/deafness.dm index 94e438e0c1632..73ae8badee36e 100644 --- a/code/datums/diseases/advance/symptoms/deafness.dm +++ b/code/datums/diseases/advance/symptoms/deafness.dm @@ -31,7 +31,7 @@ Bonus prefixes = list("Aural ") bodies = list("Ear") threshold_desc = "Resistance 9: Causes permanent deafness, instead of intermittent.
      \ - Stealth 4: The symptom remains hidden until active." + Stealth 4: The symptom remains hidden until active." /datum/symptom/deafness/severityset(datum/disease/advance/A) . = ..() diff --git a/code/datums/diseases/advance/symptoms/fever.dm b/code/datums/diseases/advance/symptoms/fever.dm index 042a34f2fdf11..fb19e732ae1c6 100644 --- a/code/datums/diseases/advance/symptoms/fever.dm +++ b/code/datums/diseases/advance/symptoms/fever.dm @@ -31,7 +31,7 @@ Bonus suffixes = list(" Fever") var/unsafe = FALSE //over the heat threshold threshold_desc = "Resistance 5: Increases fever intensity, fever can overheat and harm the host.
      \ - Resistance 10: Further increases fever intensity." + Resistance 10: Further increases fever intensity." /datum/symptom/fever/severityset(datum/disease/advance/A) . = ..() diff --git a/code/datums/diseases/advance/symptoms/fire.dm b/code/datums/diseases/advance/symptoms/fire.dm index ba506eaa76a3e..e2f6529c7582f 100644 --- a/code/datums/diseases/advance/symptoms/fire.dm +++ b/code/datums/diseases/advance/symptoms/fire.dm @@ -33,9 +33,9 @@ Bonus suffixes = list(" Combustion") var/infective = FALSE threshold_desc = "Stage Speed 4: Increases the intensity of the flames.
      \ - Stage Speed 8: Further increases flame intensity.
      \ - Transmission 8: Host will spread the virus through skin flakes when bursting into flame.
      \ - Stealth 4: The symptom remains hidden until active." + Stage Speed 8: Further increases flame intensity.
      \ + Transmission 8: Host will spread the virus through skin flakes when bursting into flame.
      \ + Stealth 4: The symptom remains hidden until active." /datum/symptom/fire/Start(datum/disease/advance/A) if(!..()) @@ -127,8 +127,8 @@ Bonus var/chems = FALSE var/explosion_power = 1 threshold_desc = "Stealth 3: Doubles the intensity of the effect, but reduces its frequency.
      \ - Stage Speed 8: Increases explosion radius when the host is wet.
      \ - Resistance 8: Additionally synthesizes chlorine trifluoride and napalm inside the host." + Stage Speed 8: Increases explosion radius when the host is wet.
      \ + Resistance 8: Additionally synthesizes chlorine trifluoride and napalm inside the host." /datum/symptom/alkali/severityset(datum/disease/advance/A) . = ..() diff --git a/code/datums/diseases/advance/symptoms/flesh_eating.dm b/code/datums/diseases/advance/symptoms/flesh_eating.dm index cad4fdcf192cc..63a6863de6f87 100644 --- a/code/datums/diseases/advance/symptoms/flesh_eating.dm +++ b/code/datums/diseases/advance/symptoms/flesh_eating.dm @@ -33,7 +33,7 @@ Bonus var/bleed = FALSE var/damage = FALSE threshold_desc = "Resistance 10: The host takes brute damage as their flesh is burst open
      \ - Transmission 8: The host will bleed far more violently, losing even more blood, and spraying infected blood everywhere." + Transmission 8: The host will bleed far more violently, losing even more blood, and spraying infected blood everywhere." /datum/symptom/flesh_eating/Start(datum/disease/advance/A) if(!..()) @@ -72,7 +72,7 @@ Bonus var/turf/T = H.loc playsound(T, 'sound/effects/splat.ogg', 50, 1) H.visible_message("Blood bursts from [H]'s flesh!", \ - "Blood spews forth from your flesh! It hurts!") + "Blood spews forth from your flesh! It hurts!") for(var/i in 0 to geysers) var/geyserdir = pick_n_take(geyserdirs) var/geyserdist = rand(1, max(1,bloodsplatters)) @@ -119,7 +119,7 @@ Bonus var/chems = FALSE var/zombie = FALSE threshold_desc = "Stage Speed 7: Synthesizes Heparin and Lipolicide inside the host, causing increased bleeding and hunger.
      \ - Stealth 5: The symptom remains hidden until active." + Stealth 5: The symptom remains hidden until active." /datum/symptom/flesh_death/severityset(datum/disease/advance/A) diff --git a/code/datums/diseases/advance/symptoms/genetics.dm b/code/datums/diseases/advance/symptoms/genetics.dm index 780d5957234f0..53db86f10757a 100644 --- a/code/datums/diseases/advance/symptoms/genetics.dm +++ b/code/datums/diseases/advance/symptoms/genetics.dm @@ -33,8 +33,8 @@ Bonus bodies = list("Mutant") var/no_reset = FALSE threshold_desc = "Resistance 8: Causes two harmful mutations at once.
      \ - Stage Speed 10: Increases mutation frequency.
      \ - Stealth 5: The mutations persist even if the virus is cured." + Stage Speed 10: Increases mutation frequency.
      \ + Stealth 5: The mutations persist even if the virus is cured." /datum/symptom/genetic_mutation/severityset(datum/disease/advance/A) . = ..() diff --git a/code/datums/diseases/advance/symptoms/hallucigen.dm b/code/datums/diseases/advance/symptoms/hallucigen.dm index 0ee9da994bbcc..a4cf39c37320a 100644 --- a/code/datums/diseases/advance/symptoms/hallucigen.dm +++ b/code/datums/diseases/advance/symptoms/hallucigen.dm @@ -31,7 +31,7 @@ Bonus suffixes = list(" Psychosis") var/fake_healthy = FALSE threshold_desc = "Stage Speed 7: Increases the amount of hallucinations.
      \ - Stealth 2: The virus mimics positive symptoms.." + Stealth 2: The virus mimics positive symptoms.." /datum/symptom/hallucigen/severityset(datum/disease/advance/A) . = ..() diff --git a/code/datums/diseases/advance/symptoms/headache.dm b/code/datums/diseases/advance/symptoms/headache.dm index 1f110621cfd8d..9ad68e754364a 100644 --- a/code/datums/diseases/advance/symptoms/headache.dm +++ b/code/datums/diseases/advance/symptoms/headache.dm @@ -31,8 +31,8 @@ BONUS symptom_delay_max = 30 bodies = list("Skull", "Migraine") threshold_desc = "Stage Speed 6: Headaches will cause severe pain, that weakens the host.
      \ - Stage Speed 9: Headaches become less frequent but far more intense, preventing any action from the host.
      \ - Stealth 4: Reduces headache frequency until later stages." + Stage Speed 9: Headaches become less frequent but far more intense, preventing any action from the host.
      \ + Stealth 4: Reduces headache frequency until later stages." /datum/symptom/headache/severityset(datum/disease/advance/A) . = ..() diff --git a/code/datums/diseases/advance/symptoms/heal.dm b/code/datums/diseases/advance/symptoms/heal.dm index d5f73ba464c86..9f0bba6eeffdb 100644 --- a/code/datums/diseases/advance/symptoms/heal.dm +++ b/code/datums/diseases/advance/symptoms/heal.dm @@ -55,7 +55,7 @@ var/food_conversion = FALSE desc = "The virus rapidly breaks down any foreign chemicals in the bloodstream." threshold_desc = "Resistance 7: Increases chem removal speed.
      \ - Stage Speed 6: Consumed chemicals nourish the host." + Stage Speed 6: Consumed chemicals nourish the host." /datum/symptom/heal/chem/Start(datum/disease/advance/A) if(!..()) @@ -90,8 +90,8 @@ var/stabilize = FALSE var/active_coma = FALSE //to prevent multiple coma procs threshold_desc = "Stealth 2: Host appears to die when falling into a coma, triggering symptoms that activate on death.
      \ - Resistance 4: The virus also stabilizes the host while they are in critical condition.
      \ - Stage Speed 7: Increases healing speed." + Resistance 4: The virus also stabilizes the host while they are in critical condition.
      \ + Stage Speed 7: Increases healing speed." /datum/symptom/heal/coma/Start(datum/disease/advance/A) if(!..()) @@ -188,7 +188,7 @@ var/scarcounter = 0 threshold_desc = "Stage Speed 8: Doubles healing speed.
      \ - Resistance 10: Improves healing threshold." + Resistance 10: Improves healing threshold." /datum/symptom/heal/surface/Start(datum/disease/advance/A) if(!..()) @@ -240,7 +240,7 @@ desc = "The virus causes the host's metabolism to accelerate rapidly, making them process chemicals twice as fast,\ but also causing increased hunger." threshold_desc = "Stealth 3: Reduces hunger rate.
      \ - Stage Speed 10: Chemical metabolization is tripled instead of doubled." + Stage Speed 10: Chemical metabolization is tripled instead of doubled." /datum/symptom/heal/metabolism/Start(datum/disease/advance/A) if(!..()) diff --git a/code/datums/diseases/advance/symptoms/heartattack.dm b/code/datums/diseases/advance/symptoms/heartattack.dm index 04de86cdbbf32..8c5c12cba4153 100644 --- a/code/datums/diseases/advance/symptoms/heartattack.dm +++ b/code/datums/diseases/advance/symptoms/heartattack.dm @@ -30,7 +30,7 @@ Bonus bodies = list("Heart") var/heartattack = FALSE threshold_desc = "Transmission 10: When the victim has a heart attack, their heart will pop right out of their chest, and attack!.
      \ - Stealth 2: The disease is somewhat less noticeable to the host." + Stealth 2: The disease is somewhat less noticeable to the host." /datum/symptom/heartattack/severityset(datum/disease/advance/A) . = ..() diff --git a/code/datums/diseases/advance/symptoms/itching.dm b/code/datums/diseases/advance/symptoms/itching.dm index 747a7e2b96445..4864a0148db0e 100644 --- a/code/datums/diseases/advance/symptoms/itching.dm +++ b/code/datums/diseases/advance/symptoms/itching.dm @@ -32,7 +32,7 @@ BONUS bodies = list("Itch") var/scratch = FALSE threshold_desc = "Transmission 6: Increases frequency of itching.
      \ - Stage Speed 7: The host will scrath itself when itching, causing superficial damage." + Stage Speed 7: The host will scrath itself when itching, causing superficial damage." /datum/symptom/itching/Start(datum/disease/advance/A) if(!..()) diff --git a/code/datums/diseases/advance/symptoms/kitty.dm b/code/datums/diseases/advance/symptoms/kitty.dm index 3b6283f9448b7..95df15fba427d 100644 --- a/code/datums/diseases/advance/symptoms/kitty.dm +++ b/code/datums/diseases/advance/symptoms/kitty.dm @@ -15,7 +15,7 @@ var/uwu = FALSE var/dnacounter = 0 threshold_desc = "Transmission 4:The symptom mutates the language center of the host's brain, causing them to speak in an infuriating dialect. Known to drive hosts to suicide.
      \ - Stealth 4:Hosts are overcome with a dysmorphic mania, causing them to glorify the idea of becoming more catlike. May cause irrational behaviour, and, in extreme cases, major body restructuring." + Stealth 4:Hosts are overcome with a dysmorphic mania, causing them to glorify the idea of becoming more catlike. May cause irrational behaviour, and, in extreme cases, major body restructuring." /datum/symptom/toxoplasmosis/severityset(datum/disease/advance/A) . = ..() @@ -25,7 +25,7 @@ severity += 2 if(CONFIG_GET(flag/unconditional_symptom_thresholds)) threshold_desc = "Transmission 4:The symptom mutates the language center of the host's brain, causing them to speak in an infuriating dialect. Known to drive hosts to suicide.
      \ - Stealth 0:Hosts are overcome with a dysmorphic mania, causing them to glorify the idea of becoming more catlike. May cause irrational behaviour, and, in extreme cases, major body restructuring." + Stealth 0:Hosts are overcome with a dysmorphic mania, causing them to glorify the idea of becoming more catlike. May cause irrational behaviour, and, in extreme cases, major body restructuring." /datum/symptom/toxoplasmosis/Start(datum/disease/advance/A) diff --git a/code/datums/diseases/advance/symptoms/lubefeet.dm b/code/datums/diseases/advance/symptoms/lubefeet.dm index 194fdc83735d1..cdef60f53c6c1 100644 --- a/code/datums/diseases/advance/symptoms/lubefeet.dm +++ b/code/datums/diseases/advance/symptoms/lubefeet.dm @@ -14,7 +14,7 @@ var/morelube = FALSE var/clownshoes = FALSE threshold_desc = "Transmission 10: The host sweats even more profusely, lubing almost every tile they walk over
      \ - Resistance 14: The host's feet turn into a pair of clown shoes." + Resistance 14: The host's feet turn into a pair of clown shoes." /datum/symptom/lubefeet/severityset(datum/disease/advance/A) . = ..() @@ -22,7 +22,7 @@ severity += 1 if(CONFIG_GET(flag/unconditional_symptom_thresholds)) threshold_desc = "Transmission 8: The host sweats even more profusely, lubing almost every tile they walk over
      \ - Resistance 8: The host's feet turn into a pair of clown shoes." + Resistance 8: The host's feet turn into a pair of clown shoes." /datum/symptom/lubefeet/Start(datum/disease/advance/A) if(!..()) diff --git a/code/datums/diseases/advance/symptoms/macrophage.dm b/code/datums/diseases/advance/symptoms/macrophage.dm index a04a1552278ed..84be55a4c3c7e 100644 --- a/code/datums/diseases/advance/symptoms/macrophage.dm +++ b/code/datums/diseases/advance/symptoms/macrophage.dm @@ -15,9 +15,9 @@ var/netspeed = 0 var/phagecounter = 10 threshold_desc = "Stage Speed:The higher the stage speed, the more frequently phages will burst from the host.
      \ - Resistance:The higher the resistance, the more health phages will have, and the more damage they will do.
      \ - Transmission 10:Phages can be larger, more aggressive, and able to pierce thick clothing, with some effort.
      \ - Transmission 12:Phages will carry all diseases within the host, instead of only diseases containing their own symptom" + Resistance:The higher the resistance, the more health phages will have, and the more damage they will do.
      \ + Transmission 10:Phages can be larger, more aggressive, and able to pierce thick clothing, with some effort.
      \ + Transmission 12:Phages will carry all diseases within the host, instead of only diseases containing their own symptom" @@ -43,7 +43,7 @@ to_chat(M, "Your skin crawls.") if(4) M.visible_message("Lumps form on [M]'s skin!", \ - "You cringe in pain as lumps form and move around on your skin!") + "You cringe in pain as lumps form and move around on your skin!") if(5) phagecounter -= max(2, A.stage_rate) if(gigagerms && phagecounter <= 0) //only ever spawn one big germ @@ -76,5 +76,5 @@ continue phage.infections += D M.visible_message("A strange creature bursts out of [M]!", \ - "A slimy creature bursts forth from your flesh!") + "A slimy creature bursts forth from your flesh!") addtimer(CALLBACK(phage, TYPE_PROC_REF(/mob/living/simple_animal/hostile/macrophage, shrivel)), 3000) diff --git a/code/datums/diseases/advance/symptoms/nanites.dm b/code/datums/diseases/advance/symptoms/nanites.dm index 3a35cfc7c14c4..d0f9eba48c6c0 100644 --- a/code/datums/diseases/advance/symptoms/nanites.dm +++ b/code/datums/diseases/advance/symptoms/nanites.dm @@ -13,7 +13,7 @@ suffixes = list(" Silicophilia") var/reverse_boost = FALSE threshold_desc = "Transmission 5: Increases the virus' growth rate while nanites are present.
      \ - Stage Speed 7: Increases the replication boost." + Stage Speed 7: Increases the replication boost." /datum/symptom/nano_boost/Start(datum/disease/advance/A) if(!..()) @@ -54,7 +54,7 @@ suffixes = list(" Silicophobia") var/reverse_boost = FALSE threshold_desc = "Stage Speed 5: Increases the virus' growth rate while nanites are present.
      \ - Resistance 7: Severely increases the rate at which the nanites are destroyed." + Resistance 7: Severely increases the rate at which the nanites are destroyed." /datum/symptom/nano_destroy/Start(datum/disease/advance/A) if(!..()) diff --git a/code/datums/diseases/advance/symptoms/narcolepsy.dm b/code/datums/diseases/advance/symptoms/narcolepsy.dm index 20924228fab57..822adf9895714 100644 --- a/code/datums/diseases/advance/symptoms/narcolepsy.dm +++ b/code/datums/diseases/advance/symptoms/narcolepsy.dm @@ -29,7 +29,7 @@ Bonus var/sleepy_ticks = 0 var/stamina = FALSE threshold_desc = "Transmission 7: Also relaxes the muscles, weakening and slowing the host.
      \ - Resistance 10: Causes narcolepsy more often, increasing the chance of the host falling asleep." + Resistance 10: Causes narcolepsy more often, increasing the chance of the host falling asleep." /datum/symptom/narcolepsy/severityset(datum/disease/advance/A) . = ..() diff --git a/code/datums/diseases/advance/symptoms/necropolis.dm b/code/datums/diseases/advance/symptoms/necropolis.dm index 333305ecfd5db..4d410a728b61f 100644 --- a/code/datums/diseases/advance/symptoms/necropolis.dm +++ b/code/datums/diseases/advance/symptoms/necropolis.dm @@ -16,8 +16,8 @@ prefixes = list("Lava ", "Lavaland ", "Eldritch ") bodies = list("Goliath", "Tentacle", "Carapace") threshold_desc = "Stealth 8: Upon death, the host's soul will solidify into an unholy artifact, rendering them utterly unrevivable in the process.
      \ - Transmission 6: The area near the host roils with paralyzing tendrils.
      \ - Resistance 20: Host becomes immune to heat, ash, and lava" + Transmission 6: The area near the host roils with paralyzing tendrils.
      \ + Resistance 20: Host becomes immune to heat, ash, and lava" var/list/cached_tentacle_turfs var/turf/last_location var/tentacle_recheck_cooldown = 100 @@ -30,8 +30,8 @@ severity -= 1 if(CONFIG_GET(flag/unconditional_symptom_thresholds)) threshold_desc = "Stealth 8: Upon death, the host's soul will solidify into an unholy artifact, rendering them utterly unrevivable in the process.
      \ - Transmission 6: The area near the host roils with paralyzing tendrils.
      \ - Resistance 12: Host becomes immune to heat, ash, and lava" + Transmission 6: The area near the host roils with paralyzing tendrils.
      \ + Resistance 12: Host becomes immune to heat, ash, and lava" /datum/symptom/necroseed/Start(datum/disease/advance/A) if(!..()) diff --git a/code/datums/diseases/advance/symptoms/organs.dm b/code/datums/diseases/advance/symptoms/organs.dm index 2884e9b09fdb8..85f64b361ab4c 100644 --- a/code/datums/diseases/advance/symptoms/organs.dm +++ b/code/datums/diseases/advance/symptoms/organs.dm @@ -14,8 +14,8 @@ var/trauma_heal_mild = FALSE var/trauma_heal_severe = FALSE threshold_desc = "Resistance 6: Heals minor brain traumas.
      \ - Resistance 9: Heals severe brain traumas.
      \ - Transmission 8: Purges alcohol in the bloodstream." + Resistance 9: Heals severe brain traumas.
      \ + Transmission 8: Purges alcohol in the bloodstream." /datum/symptom/mind_restoration/Start(datum/disease/advance/A) if(!..()) @@ -125,7 +125,7 @@ var/curing = FALSE var/regenorgans = FALSE threshold_desc = "Stealth 4: The host will regenerate missing organs over a long period of time.
      \ - Stage Speed 10: The virus causes the host's internal organs to gain some self-correcting behaviour, preventing heart attacks and appendicitis.
      " + Stage Speed 10: The virus causes the host's internal organs to gain some self-correcting behaviour, preventing heart attacks and appendicitis.
      " /datum/symptom/organ_restoration/severityset(datum/disease/advance/A) . = ..() diff --git a/code/datums/diseases/advance/symptoms/pierrot.dm b/code/datums/diseases/advance/symptoms/pierrot.dm index 442bbc231b2c6..8b0c410e885e2 100644 --- a/code/datums/diseases/advance/symptoms/pierrot.dm +++ b/code/datums/diseases/advance/symptoms/pierrot.dm @@ -13,8 +13,8 @@ var/clownmask = FALSE var/clumsy = FALSE threshold_desc = "Transmission 10: There's a rare chance the disease is spread everytime the host honks.
      \ - Resistance 10: The host grows a peculiar clown mask.
      \ - Resistance 15: Host becomes clumsy, similar to a clown." + Resistance 10: The host grows a peculiar clown mask.
      \ + Resistance 15: Host becomes clumsy, similar to a clown." /datum/symptom/pierrot/severityset(datum/disease/advance/A) . = ..() @@ -26,8 +26,8 @@ severity += 2 if(CONFIG_GET(flag/unconditional_symptom_thresholds)) threshold_desc = "Transmission 10: There's a rare chance the disease is spread everytime the host honks.
      \ - Resistance 8: The host grows a peculiar clown mask.
      \ - Resistance 10: Host becomes clumsy, similar to a clown." + Resistance 8: The host grows a peculiar clown mask.
      \ + Resistance 10: Host becomes clumsy, similar to a clown." /datum/symptom/pierrot/Start(datum/disease/advance/A) if(!..()) diff --git a/code/datums/diseases/advance/symptoms/shivering.dm b/code/datums/diseases/advance/symptoms/shivering.dm index f55d3097f5a4a..bb6b4528720a2 100644 --- a/code/datums/diseases/advance/symptoms/shivering.dm +++ b/code/datums/diseases/advance/symptoms/shivering.dm @@ -30,7 +30,7 @@ Bonus suffixes = list(" Shivers") var/unsafe = FALSE //over the cold threshold threshold_desc = "Stage Speed 5: Increases cooling speed; the host can fall below safe temperature levels.
      \ - Stage Speed 10: Further increases cooling speed." + Stage Speed 10: Further increases cooling speed." /datum/symptom/shivering/severityset(datum/disease/advance/A) . = ..() diff --git a/code/datums/diseases/advance/symptoms/skin.dm b/code/datums/diseases/advance/symptoms/skin.dm index d1b390d400331..6d82c7e7d5a2a 100644 --- a/code/datums/diseases/advance/symptoms/skin.dm +++ b/code/datums/diseases/advance/symptoms/skin.dm @@ -198,8 +198,8 @@ Spiked Skin No transmission bonus Thresholds - transmission 6 Can give minor armour - resistance 6 Does more damage + transmission 6 Can give minor armour + resistance 6 Does more damage ////////////////////////////////////// */ @@ -220,7 +220,7 @@ Thresholds var/armor = 0 var/done = FALSE threshold_desc = "Transmission 6: Spikes deal more damage.
      \ - Resistance 6: Hard spines give the host armor, scaling with resistance." + Resistance 6: Hard spines give the host armor, scaling with resistance." /datum/symptom/spiked/severityset(datum/disease/advance/A) . = ..() diff --git a/code/datums/diseases/advance/symptoms/sneeze.dm b/code/datums/diseases/advance/symptoms/sneeze.dm index ff02828df8210..3a2eb3c069f27 100644 --- a/code/datums/diseases/advance/symptoms/sneeze.dm +++ b/code/datums/diseases/advance/symptoms/sneeze.dm @@ -30,7 +30,7 @@ Bonus bodies = list("Cold") var/infective = FALSE threshold_desc = "Stealth 4: The symptom remains hidden until active.
      \ - Transmission 12: The host may spread the disease through sneezing." + Transmission 12: The host may spread the disease through sneezing." /datum/symptom/sneeze/Start(datum/disease/advance/A) if(!..()) diff --git a/code/datums/diseases/advance/symptoms/viral.dm b/code/datums/diseases/advance/symptoms/viral.dm index 63aa64707e5a6..4d4d9f9e90087 100644 --- a/code/datums/diseases/advance/symptoms/viral.dm +++ b/code/datums/diseases/advance/symptoms/viral.dm @@ -94,7 +94,7 @@ Bonus prefixes = list("Spontaneous ") var/time_to_cure threshold_desc = "Resistance/Stage Speed: Highest between these determines the amount of time before self-curing.
      \ - Stealth 4 Doubles the time before the virus self-cures" + Stealth 4 Doubles the time before the virus self-cures" /datum/symptom/viralreverse/Activate(datum/disease/advance/A) @@ -169,7 +169,7 @@ Bonus S.stopped = TRUE captives += S used = TRUE - + /* ////////////////////////////////////// @@ -195,10 +195,10 @@ Bonus prefixes = list("Super", "Mega", "Admin ") var/maxpower var/powerbudget - var/scramble = FALSE + var/scramble = FALSE var/used = FALSE threshold_desc = "Transmission 8: Constantly scrambles the power of all unneutered symptoms.
      \ - Stage Speed 8 Doubles the power boost" + Stage Speed 8 Doubles the power boost" /datum/symptom/viralpower/Start(datum/disease/advance/A) @@ -219,10 +219,10 @@ Bonus if(S == src) return S.power += power - maxpower += S.power + maxpower += S.power if(scramble) - powerbudget += power - maxpower += power + powerbudget += power + maxpower += power power = 0 used = TRUE if(scramble) diff --git a/code/datums/diseases/advance/symptoms/vision.dm b/code/datums/diseases/advance/symptoms/vision.dm index cf462bc70dd96..8d60fa9126c17 100644 --- a/code/datums/diseases/advance/symptoms/vision.dm +++ b/code/datums/diseases/advance/symptoms/vision.dm @@ -33,7 +33,7 @@ Bonus suffixes = list(" Blindness") var/remove_eyes = FALSE threshold_desc = "Resistance 12: Weakens extraocular muscles, eventually leading to complete detachment of the eyes.
      \ - Stealth 4: The symptom remains hidden until active." + Stealth 4: The symptom remains hidden until active." /datum/symptom/visionloss/severityset(datum/disease/advance/A) . = ..() @@ -41,7 +41,7 @@ Bonus severity += 1 if(CONFIG_GET(flag/unconditional_symptom_thresholds)) threshold_desc = "Resistance 8: Weakens extraocular muscles, eventually leading to complete detachment of the eyes.
      \ - Stealth 4: The symptom remains hidden until active." + Stealth 4: The symptom remains hidden until active." /datum/symptom/visionloss/Start(datum/disease/advance/A) if(!..()) diff --git a/code/datums/diseases/advance/symptoms/voice_change.dm b/code/datums/diseases/advance/symptoms/voice_change.dm index d05dc68f9559c..313b34f13d3b6 100644 --- a/code/datums/diseases/advance/symptoms/voice_change.dm +++ b/code/datums/diseases/advance/symptoms/voice_change.dm @@ -32,8 +32,8 @@ Bonus var/scramble_language = FALSE var/datum/language/current_language threshold_desc = "Transmission 10: The host's language center of the brain is damaged, leading to complete inability to speak or understand any language.
      \ - Stage Speed 7: Changes voice more often.
      \ - Stealth 3: The symptom remains hidden until active." + Stage Speed 7: Changes voice more often.
      \ + Stealth 3: The symptom remains hidden until active." /datum/symptom/voice_change/severityset(datum/disease/advance/A) . = ..() diff --git a/code/datums/diseases/advance/symptoms/vomit.dm b/code/datums/diseases/advance/symptoms/vomit.dm index 125d82865b85d..2c26cf044513f 100644 --- a/code/datums/diseases/advance/symptoms/vomit.dm +++ b/code/datums/diseases/advance/symptoms/vomit.dm @@ -38,8 +38,8 @@ Bonus var/vomit_blood = FALSE var/proj_vomit = 0 threshold_desc = "Stage Speed 5: Host will vomit blood, causing internal damage.
      \ - Transmission 6: Host will projectile vomit, increasing vomiting range.
      \ - Stealth 4: The symptom remains hidden until active." + Transmission 6: Host will projectile vomit, increasing vomiting range.
      \ + Stealth 4: The symptom remains hidden until active." /datum/symptom/vomit/Start(datum/disease/advance/A) if(!..()) diff --git a/code/datums/diseases/advance/symptoms/wizarditis.dm b/code/datums/diseases/advance/symptoms/wizarditis.dm index 7f59697857c3b..620cc913e6dd8 100644 --- a/code/datums/diseases/advance/symptoms/wizarditis.dm +++ b/code/datums/diseases/advance/symptoms/wizarditis.dm @@ -14,7 +14,7 @@ var/teleport = FALSE var/robes = FALSE threshold_desc = "Transmission 8: The host teleports occasionally.
      \ - Stage Speed 7: The host grows a set of wizard robes." + Stage Speed 7: The host grows a set of wizard robes." /datum/symptom/wizarditis/severityset(datum/disease/advance/A) . = ..() diff --git a/code/datums/traits/negative_quirk.dm b/code/datums/traits/negative_quirk.dm index 561f23594f8cf..4751feb780373 100644 --- a/code/datums/traits/negative_quirk.dm +++ b/code/datums/traits/negative_quirk.dm @@ -593,10 +593,10 @@ process = TRUE /datum/quirk/junkie/smoker/on_spawn() - drug_container_type = read_choice_preference(/datum/preference/choiced/quirk/smoker_cigarettes) - if(!drug_container_type) - drug_container_type = pick(GLOB.smoker_cigarettes) - . = ..() + drug_container_type = read_choice_preference(/datum/preference/choiced/quirk/smoker_cigarettes) + if(!drug_container_type) + drug_container_type = pick(GLOB.smoker_cigarettes) + . = ..() /datum/quirk/junkie/smoker/announce_drugs() to_chat(quirk_target, "There is a [initial(drug_container_type.name)] [where_drug], and a lighter [where_accessory]. Make sure you get your favorite brand when you run out.") @@ -626,7 +626,7 @@ var/drink_types = list(/obj/item/reagent_containers/food/drinks/bottle/ale, /obj/item/reagent_containers/food/drinks/bottle/beer, /obj/item/reagent_containers/food/drinks/bottle/gin, - /obj/item/reagent_containers/food/drinks/bottle/whiskey, + /obj/item/reagent_containers/food/drinks/bottle/whiskey, /obj/item/reagent_containers/food/drinks/bottle/vodka, /obj/item/reagent_containers/food/drinks/bottle/rum, /obj/item/reagent_containers/food/drinks/bottle/applejack) diff --git a/code/datums/wires/_wires.dm b/code/datums/wires/_wires.dm index e8e708c0c225d..ab15cefb5386f 100644 --- a/code/datums/wires/_wires.dm +++ b/code/datums/wires/_wires.dm @@ -33,7 +33,7 @@ var/list/wire_to_colors = list() // Dictionary of colors to wire. var/list/assemblies = list() // List of attached assemblies. var/randomize = 0 // If every instance of these wires should be random. - // Prevents wires from showing up in station blueprints + // Prevents wires from showing up in station blueprints var/list/labelled_wires = list() // Associative List of wires that have labels. Key = wire, Value = Bool (Revealed) [To be refactored into skills] /datum/wires/New(atom/holder) diff --git a/code/datums/wires/airalarm.dm b/code/datums/wires/airalarm.dm index 6831d499c84cf..0b1c7ebff5e56 100644 --- a/code/datums/wires/airalarm.dm +++ b/code/datums/wires/airalarm.dm @@ -5,9 +5,9 @@ set_instance_vars(\ pixel_x = (dir & 3)? INSTANCE_VAR_DEFAULT : (dir == 4 ? -24 : 24),\ pixel_y = (dir & 3)? (dir == 1 ? -24 : 24) : INSTANCE_VAR_DEFAULT\ - ),\ + ),\ dir_amount = 4\ - ) + ) /datum/wires/airalarm/New(atom/holder) wires = list( diff --git a/code/datums/world_topic.dm b/code/datums/world_topic.dm index 211054172d68c..236d2bf0cb9e5 100644 --- a/code/datums/world_topic.dm +++ b/code/datums/world_topic.dm @@ -194,10 +194,10 @@ var/list/admins = list() for(var/client/admin in GLOB.admins) admins[++admins.len] = list("ckey" = admin.ckey, - "key" = admin.key, - "rank" = admin.holder.rank.name, - "stealth" = admin.holder.fakekey ? TRUE : FALSE, - "afk" = admin.is_afk()) + "key" = admin.key, + "rank" = admin.holder.rank.name, + "stealth" = admin.holder.fakekey ? TRUE : FALSE, + "afk" = admin.is_afk()) statuscode = 200 response = "Admin list fetched" data = admins diff --git a/code/game/communications.dm b/code/game/communications.dm index 04948ae9b6bdd..9fd20e1db7c50 100644 --- a/code/game/communications.dm +++ b/code/game/communications.dm @@ -1,63 +1,63 @@ /* - HOW IT WORKS - - The SSradio is a global object maintaining all radio transmissions, think about it as about "ether". - Note that walkie-talkie, intercoms and headsets handle transmission using nonstandard way. - procs: - - add_object(obj/device as obj, var/new_frequency as num, var/filter as text|null = null) - Adds listening object. - parameters: - device - device receiving signals, must have proc receive_signal (see description below). - one device may listen several frequencies, but not same frequency twice. - new_frequency - see possibly frequencies below; - filter - thing for optimization. Optional, but recommended. + HOW IT WORKS + + The SSradio is a global object maintaining all radio transmissions, think about it as about "ether". + Note that walkie-talkie, intercoms and headsets handle transmission using nonstandard way. + procs: + + add_object(obj/device as obj, var/new_frequency as num, var/filter as text|null = null) + Adds listening object. + parameters: + device - device receiving signals, must have proc receive_signal (see description below). + one device may listen several frequencies, but not same frequency twice. + new_frequency - see possibly frequencies below; + filter - thing for optimization. Optional, but recommended. All filters should be consolidated in this file, see defines later. Device without listening filter will receive all signals (on specified frequency). Device with filter will receive any signals sent without filter. Device with filter will not receive any signals sent with different filter. - returns: + returns: Reference to frequency object. - remove_object (obj/device, old_frequency) - Obliviously, after calling this proc, device will not receive any signals on old_frequency. - Other frequencies will left unaffected. + remove_object (obj/device, old_frequency) + Obliviously, after calling this proc, device will not receive any signals on old_frequency. + Other frequencies will left unaffected. return_frequency(var/frequency as num) - returns: + returns: Reference to frequency object. Use it if you need to send and do not need to listen. - radio_frequency is a global object maintaining list of devices that listening specific frequency. - procs: - - post_signal(obj/source as obj|null, datum/signal/signal, var/filter as text|null = null, var/range as num|null = null) - Sends signal to all devices that wants such signal. - parameters: - source - object, emitted signal. Usually, devices will not receive their own signals. - signal - see description below. - filter - described above. - range - radius of regular byond's square circle on that z-level. null means everywhere, on all z-levels. - - obj/proc/receive_signal(datum/signal/signal, var/receive_method as num, var/receive_param) - Handler from received signals. By default does nothing. Define your own for your object. - Avoid of sending signals directly from this proc, use spawn(0). Do not use sleep() here please. - parameters: - signal - see description below. Extract all needed data from the signal before doing sleep(), spawn() or return! - receive_method - may be TRANSMISSION_WIRE or TRANSMISSION_RADIO. - TRANSMISSION_WIRE is currently unused. - receive_param - for TRANSMISSION_RADIO here comes frequency. - - datum/signal - vars: - source - an object that emitted signal. Used for debug and bearing. - data - list with transmitting data. Usual use pattern: - data["msg"] = "hello world" - encryption - Some number symbolizing "encryption key". - Note that game actually do not use any cryptography here. - If receiving object don't know right key, it must ignore encrypted signal in its receive_signal. + radio_frequency is a global object maintaining list of devices that listening specific frequency. + procs: + + post_signal(obj/source as obj|null, datum/signal/signal, var/filter as text|null = null, var/range as num|null = null) + Sends signal to all devices that wants such signal. + parameters: + source - object, emitted signal. Usually, devices will not receive their own signals. + signal - see description below. + filter - described above. + range - radius of regular byond's square circle on that z-level. null means everywhere, on all z-levels. + + obj/proc/receive_signal(datum/signal/signal, var/receive_method as num, var/receive_param) + Handler from received signals. By default does nothing. Define your own for your object. + Avoid of sending signals directly from this proc, use spawn(0). Do not use sleep() here please. + parameters: + signal - see description below. Extract all needed data from the signal before doing sleep(), spawn() or return! + receive_method - may be TRANSMISSION_WIRE or TRANSMISSION_RADIO. + TRANSMISSION_WIRE is currently unused. + receive_param - for TRANSMISSION_RADIO here comes frequency. + + datum/signal + vars: + source + an object that emitted signal. Used for debug and bearing. + data + list with transmitting data. Usual use pattern: + data["msg"] = "hello world" + encryption + Some number symbolizing "encryption key". + Note that game actually do not use any cryptography here. + If receiving object don't know right key, it must ignore encrypted signal in its receive_signal. */ /* the radio controller is a confusing piece of shit and didnt work diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index 3c4bfee04b5c7..167ea520fec95 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -4,13 +4,13 @@ GLOBAL_VAR_INIT(meteor_wave_delay, 625) //minimum wait between waves in tenths o //Meteors probability of spawning during a given wave GLOBAL_LIST_INIT(meteors_normal, list(/obj/effect/meteor/dust=3, /obj/effect/meteor/medium=8, /obj/effect/meteor/big=3, \ - /obj/effect/meteor/flaming=1, /obj/effect/meteor/irradiated=3)) //for normal meteor event + /obj/effect/meteor/flaming=1, /obj/effect/meteor/irradiated=3)) //for normal meteor event GLOBAL_LIST_INIT(meteors_threatening, list(/obj/effect/meteor/medium=4, /obj/effect/meteor/big=8, \ - /obj/effect/meteor/flaming=3, /obj/effect/meteor/irradiated=3)) //for threatening meteor event + /obj/effect/meteor/flaming=3, /obj/effect/meteor/irradiated=3)) //for threatening meteor event GLOBAL_LIST_INIT(meteors_catastrophic, list(/obj/effect/meteor/medium=5, /obj/effect/meteor/big=75, \ - /obj/effect/meteor/flaming=10, /obj/effect/meteor/irradiated=10, /obj/effect/meteor/tunguska = 1)) //for catastrophic meteor event + /obj/effect/meteor/flaming=10, /obj/effect/meteor/irradiated=10, /obj/effect/meteor/tunguska = 1)) //for catastrophic meteor event GLOBAL_LIST_INIT(meteorsB, list(/obj/effect/meteor/meaty=5, /obj/effect/meteor/meaty/xeno=1)) //for meaty ore event diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index c8de830c096ed..a8646687e1001 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -6,31 +6,31 @@ Overview: Class Variables: use_power (num) - current state of auto power use. - Possible Values: + current state of auto power use. + Possible Values: NO_POWER_USE -- no auto power use IDLE_POWER_USE -- machine is using power at its idle power level ACTIVE_POWER_USE -- machine is using power at its active power level active_power_usage (num) - Value for the amount of power to use when in active power mode + Value for the amount of power to use when in active power mode idle_power_usage (num) - Value for the amount of power to use when in idle power mode + Value for the amount of power to use when in idle power mode power_channel (num) - What channel to draw from when drawing power for power mode - Possible Values: + What channel to draw from when drawing power for power mode + Possible Values: AREA_USAGE_EQUIP:0 -- Equipment Channel AREA_USAGE_LIGHT:2 -- Lighting Channel AREA_USAGE_ENVIRON:3 -- Environment Channel component_parts (list) - A list of component parts of machine used by frame based machines. + A list of component parts of machine used by frame based machines. machine_stat (bitflag) - Machine status bit flags. - Possible bit flags: + Machine status bit flags. + Possible bit flags: BROKEN -- Machine is broken NOPOWER -- No power is being supplied to machine. MAINT -- machine is currently under going maintenance. @@ -42,40 +42,40 @@ Class Procs: Destroy() 'game/machinery/machine.dm' auto_use_power() 'game/machinery/machine.dm' - This proc determines how power mode power is deducted by the machine. - 'auto_use_power()' is called by the 'master_controller' game_controller every - tick. + This proc determines how power mode power is deducted by the machine. + 'auto_use_power()' is called by the 'master_controller' game_controller every + tick. - Return Value: + Return Value: return:1 -- if object is powered return:0 -- if object is not powered. - Default definition uses 'use_power', 'power_channel', 'active_power_usage', - 'idle_power_usage', 'powered()', and 'use_power()' implement behavior. + Default definition uses 'use_power', 'power_channel', 'active_power_usage', + 'idle_power_usage', 'powered()', and 'use_power()' implement behavior. powered(chan = -1) 'modules/power/power.dm' - Checks to see if area that contains the object has power available for power - channel given in 'chan'. -1 defaults to power_channel + Checks to see if area that contains the object has power available for power + channel given in 'chan'. -1 defaults to power_channel use_power(amount, chan=-1) 'modules/power/power.dm' - Deducts 'amount' from the power channel 'chan' of the area that contains the object. + Deducts 'amount' from the power channel 'chan' of the area that contains the object. power_change() 'modules/power/power.dm' - Called by the area that contains the object when ever that area under goes a - power state change (area runs out of power, or area channel is turned off). + Called by the area that contains the object when ever that area under goes a + power state change (area runs out of power, or area channel is turned off). RefreshParts() 'game/machinery/machine.dm' - Called to refresh the variables in the machine that are contributed to by parts - contained in the component_parts list. (example: glass and material amounts for - the autolathe) + Called to refresh the variables in the machine that are contributed to by parts + contained in the component_parts list. (example: glass and material amounts for + the autolathe) - Default definition does nothing. + Default definition does nothing. process() 'game/machinery/machine.dm' - Called by the 'machinery subsystem' once per machinery tick for each machine that is listed in its 'machines' list. + Called by the 'machinery subsystem' once per machinery tick for each machine that is listed in its 'machines' list. process_atmos() - Called by the 'air subsystem' once per atmos tick for each machine that is listed in its 'atmos_machines' list. + Called by the 'air subsystem' once per atmos tick for each machine that is listed in its 'atmos_machines' list. Compiled by Aygar */ diff --git a/code/game/machinery/aug_manipulator.dm b/code/game/machinery/aug_manipulator.dm index 217860ccbbbb8..b4a41b00fae9f 100644 --- a/code/game/machinery/aug_manipulator.dm +++ b/code/game/machinery/aug_manipulator.dm @@ -15,8 +15,8 @@ . += "Alt-click to eject the limb." /obj/machinery/aug_manipulator/Initialize(mapload) - initial_icon_state = initial(icon_state) - return ..() + initial_icon_state = initial(icon_state) + return ..() /obj/machinery/aug_manipulator/update_icon() cut_overlays() diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 156086840cc59..d46aa829f01a9 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -624,7 +624,7 @@ DEFINE_BUFFER_HANDLER(/obj/machinery/computer/cloning) R.fields["body_only"] = 0 if(!body_only || experimental && mob_occupant.stat != DEAD) - //Add an implant if needed + //Add an implant if needed var/obj/item/implant/health/imp for(var/obj/item/implant/health/HI in mob_occupant.implants) imp = HI diff --git a/code/game/machinery/computer/dna_console.dm b/code/game/machinery/computer/dna_console.dm index 17334db4e8ded..39175fd2bf73f 100644 --- a/code/game/machinery/computer/dna_console.dm +++ b/code/game/machinery/computer/dna_console.dm @@ -1732,7 +1732,7 @@ tgui_console_chromosomes.Cut() tgui_advinjector_mutations.Cut() - // ------------------------------------------------------------------------ // + // ------------------------------------------------------------------------ // // GUARD CHECK - Can we genetically modify the occupant? This check will have // previously included checks to make sure the DNA Scanner is still // operational diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 17214114501de..a6e81d3cf8201 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -135,7 +135,7 @@ GLOBAL_LIST_EMPTY(cryopod_computers) updateUsrDialog() return /* Should more cryos be buildable? - /obj/item/circuitboard/cryopodcontrol + /obj/item/circuitboard/cryopodcontrol name = "Circuit board (Cryogenic Oversight Console)" build_path = "/obj/machinery/computer/cryopod" origin_tech = "programming=1" diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index 05c5d4a676516..b1c28638ae155 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -136,7 +136,7 @@ CREATION_TEST_IGNORE_SUBTYPES(/obj/item/paper/record_printout) playsound(src, 'sound/items/screwdriver2.ogg', 50, 1) /obj/machinery/doppler_array/proc/sense_explosion(datum/source,turf/epicenter,devastation_range,heavy_impact_range,light_impact_range, - took,orig_dev_range,orig_heavy_range,orig_light_range) + took,orig_dev_range,orig_heavy_range,orig_light_range) SIGNAL_HANDLER if(machine_stat & NOPOWER) diff --git a/code/game/machinery/launch_pad.dm b/code/game/machinery/launch_pad.dm index 04b57fbb2b059..3bcfdaad75d5f 100644 --- a/code/game/machinery/launch_pad.dm +++ b/code/game/machinery/launch_pad.dm @@ -233,11 +233,11 @@ DEFINE_BUFFER_HANDLER(/obj/machinery/launchpad) CREATION_TEST_IGNORE_SUBTYPES(/obj/machinery/launchpad/briefcase) /obj/machinery/launchpad/briefcase/Initialize(mapload, briefcase) - . = ..() - if(!briefcase) - log_game("[src] has been spawned without a briefcase.") - return INITIALIZE_HINT_QDEL - src.briefcase = briefcase + . = ..() + if(!briefcase) + log_game("[src] has been spawned without a briefcase.") + return INITIALIZE_HINT_QDEL + src.briefcase = briefcase /obj/machinery/launchpad/briefcase/Destroy() if(!QDELETED(briefcase)) diff --git a/code/game/machinery/scan_gate.dm b/code/game/machinery/scan_gate.dm index a4ba6c4804d44..048f2588fb97d 100644 --- a/code/game/machinery/scan_gate.dm +++ b/code/game/machinery/scan_gate.dm @@ -242,7 +242,7 @@ var/new_nutrition = params["new_nutrition"] var/nutrition_list = list( "Starving", - "Obese" + "Obese" ) if(new_nutrition && (new_nutrition in nutrition_list)) switch(new_nutrition) diff --git a/code/game/machinery/telecomms/computers/logbrowser.dm b/code/game/machinery/telecomms/computers/logbrowser.dm index 59485079462df..e0790ab8cea16 100644 --- a/code/game/machinery/telecomms/computers/logbrowser.dm +++ b/code/game/machinery/telecomms/computers/logbrowser.dm @@ -24,7 +24,7 @@ switch(screen) - // --- Main Menu --- + // --- Main Menu --- if(0) dat += "
      [temp]
      " @@ -40,7 +40,7 @@ dat += "
      No servers detected. Scan for servers: \[Scan\]" - // --- Viewing Server --- + // --- Viewing Server --- if(1) dat += "
      [temp]
      " diff --git a/code/game/objects/items/colorizers/clothing.dm b/code/game/objects/items/colorizers/clothing.dm index f539c1cc68939..f17afb6f5b4b9 100644 --- a/code/game/objects/items/colorizers/clothing.dm +++ b/code/game/objects/items/colorizers/clothing.dm @@ -1,18 +1,18 @@ /obj/item/colorizer/capcloakroyal - name = "Captain's Cloak Colorizer (Royal)" - allowed_targets = list(/obj/item/clothing/neck/cloak/cap) - apply_icon_state = "royalcapcloak" + name = "Captain's Cloak Colorizer (Royal)" + allowed_targets = list(/obj/item/clothing/neck/cloak/cap) + apply_icon_state = "royalcapcloak" /obj/item/colorizer/rdcloakroyal - name = "Research Director's Cloak Colorizer (Royal)" - allowed_targets = list(/obj/item/clothing/neck/cloak/rd) - apply_icon_state = "royalrdcloak" + name = "Research Director's Cloak Colorizer (Royal)" + allowed_targets = list(/obj/item/clothing/neck/cloak/rd) + apply_icon_state = "royalrdcloak" /obj/item/colorizer/hoscloakroyal - name = "Head of Security's Cloak Colorizer (Royal)" - allowed_targets = list(/obj/item/clothing/neck/cloak/hos) - apply_icon_state = "royalhoscloak" + name = "Head of Security's Cloak Colorizer (Royal)" + allowed_targets = list(/obj/item/clothing/neck/cloak/hos) + apply_icon_state = "royalhoscloak" /obj/item/colorizer/captain_military_uniform name = "Captain's Clothes Colouriser (Military)" diff --git a/code/game/objects/items/colorizers/colorizer.dm b/code/game/objects/items/colorizers/colorizer.dm index 60a9b2d9449c9..18648dd7793d6 100644 --- a/code/game/objects/items/colorizers/colorizer.dm +++ b/code/game/objects/items/colorizers/colorizer.dm @@ -1,23 +1,23 @@ /obj/item/colorizer - name = "ERROR Colorizer" - desc = "This colorizer will apply a new set of colors to an item." - icon = 'icons/obj/crayons.dmi' - icon_state = "rainbowcan" - var/uses_left = 1 - - var/list/allowed_targets = list() - var/list/forbidden_targets = list() - var/apply_icon = null - var/apply_icon_state = null - var/apply_item_state = null - var/apply_righthand_file = null - var/apply_lefthand_file = null + name = "ERROR Colorizer" + desc = "This colorizer will apply a new set of colors to an item." + icon = 'icons/obj/crayons.dmi' + icon_state = "rainbowcan" + var/uses_left = 1 + + var/list/allowed_targets = list() + var/list/forbidden_targets = list() + var/apply_icon = null + var/apply_icon_state = null + var/apply_item_state = null + var/apply_righthand_file = null + var/apply_lefthand_file = null /obj/item/colorizer/attack_self(mob/user) - var/obj/item/target_atom = user.get_inactive_held_item() - do_colorize(target_atom, user) - . = ..() + var/obj/item/target_atom = user.get_inactive_held_item() + do_colorize(target_atom, user) + . = ..() /obj/item/colorizer/proc/can_use(mob/user) if(!user || !ismob(user) || user.incapacitated()) @@ -25,33 +25,33 @@ return TRUE /obj/item/colorizer/afterattack(atom/target, mob/user, proximity_flag, click_parameters) - if(proximity_flag && can_use(user)) - do_colorize(target, user) - . = ..() + if(proximity_flag && can_use(user)) + do_colorize(target, user) + . = ..() /obj/item/colorizer/proc/do_colorize(atom/to_be_colored, mob/user) - if(!to_be_colored) - return - if(!is_type_in_list(to_be_colored, allowed_targets) || is_type_in_list(to_be_colored, forbidden_targets)) - to_chat(user, "This colorizer is not compatible with that!") - return - - if(apply_icon) - to_be_colored.icon = apply_icon - if(apply_icon_state) - to_be_colored.icon_state = apply_icon_state - - var/obj/item/target_item = to_be_colored - if(istype(target_item)) - if(apply_item_state) - target_item.item_state = apply_item_state - if(apply_righthand_file) - target_item.righthand_file = apply_righthand_file - if(apply_lefthand_file) - target_item.righthand_file = apply_lefthand_file - - to_chat(user, "Color applied!") - playsound(src, 'sound/effects/spray.ogg', 5, TRUE, 5) - uses_left -- - if(!uses_left) - qdel(src) + if(!to_be_colored) + return + if(!is_type_in_list(to_be_colored, allowed_targets) || is_type_in_list(to_be_colored, forbidden_targets)) + to_chat(user, "This colorizer is not compatible with that!") + return + + if(apply_icon) + to_be_colored.icon = apply_icon + if(apply_icon_state) + to_be_colored.icon_state = apply_icon_state + + var/obj/item/target_item = to_be_colored + if(istype(target_item)) + if(apply_item_state) + target_item.item_state = apply_item_state + if(apply_righthand_file) + target_item.righthand_file = apply_righthand_file + if(apply_lefthand_file) + target_item.righthand_file = apply_lefthand_file + + to_chat(user, "Color applied!") + playsound(src, 'sound/effects/spray.ogg', 5, TRUE, 5) + uses_left -- + if(!uses_left) + qdel(src) diff --git a/code/game/objects/items/colorizers/mobs.dm b/code/game/objects/items/colorizers/mobs.dm index 761d3dd4521ad..c9590f7b42e20 100644 --- a/code/game/objects/items/colorizers/mobs.dm +++ b/code/game/objects/items/colorizers/mobs.dm @@ -1,7 +1,7 @@ /obj/item/colorizer/iandeathsquad - name = "Ian Colorizer (Death Squad)" - allowed_targets = list(/mob/living/simple_animal/pet/dog/corgi/Ian) - apply_icon_state = "deathsquad" - apply_icon = 'icons/mob/corgi_back.dmi' - + name = "Ian Colorizer (Death Squad)" + allowed_targets = list(/mob/living/simple_animal/pet/dog/corgi/Ian) + apply_icon_state = "deathsquad" + apply_icon = 'icons/mob/corgi_back.dmi' + diff --git a/code/game/objects/items/cursed_necklace.dm b/code/game/objects/items/cursed_necklace.dm index c154307ae7462..4219c21c41f7e 100644 --- a/code/game/objects/items/cursed_necklace.dm +++ b/code/game/objects/items/cursed_necklace.dm @@ -1,30 +1,30 @@ /obj/item/clothing/neck/necklace/dope/cursed - var/linked_ckey - var/hostage_ckey - var/mob/current_body = null + var/linked_ckey + var/hostage_ckey + var/mob/current_body = null /obj/item/clothing/neck/necklace/dope/cursed/attack_self(mob/user) - . = ..() - if(!user.ckey) - return 0 - if(!linked_ckey && user.ckey) - linked_ckey = user.ckey - current_body = user - to_chat(user, "You have achieved immortality") + . = ..() + if(!user.ckey) + return 0 + if(!linked_ckey && user.ckey) + linked_ckey = user.ckey + current_body = user + to_chat(user, "You have achieved immortality") /obj/item/clothing/neck/necklace/dope/cursed/equipped(mob/user, slot) - . = ..() - if(slot == ITEM_SLOT_NECK && linked_ckey && user.ckey != linked_ckey) - if(user.ckey && user.ckey == linked_ckey) - hostage_ckey = user.ckey - user.ghostize(FALSE,SENTIENCE_ERASE) - user.ckey = linked_ckey - current_body = user + . = ..() + if(slot == ITEM_SLOT_NECK && linked_ckey && user.ckey != linked_ckey) + if(user.ckey && user.ckey == linked_ckey) + hostage_ckey = user.ckey + user.ghostize(FALSE,SENTIENCE_ERASE) + user.ckey = linked_ckey + current_body = user /obj/item/clothing/neck/necklace/dope/cursed/dropped(mob/user) - ..() - if(hostage_ckey) - if(user.ckey) - user.ghostize(FALSE,SENTIENCE_ERASE) - user.ckey = hostage_ckey - current_body = null + ..() + if(hostage_ckey) + if(user.ckey) + user.ghostize(FALSE,SENTIENCE_ERASE) + user.ckey = hostage_ckey + current_body = null diff --git a/code/game/objects/items/miscellaneous.dm b/code/game/objects/items/miscellaneous.dm index a953561b53fbb..5c2164e3d10b4 100644 --- a/code/game/objects/items/miscellaneous.dm +++ b/code/game/objects/items/miscellaneous.dm @@ -177,10 +177,10 @@ info_text = "Sword Saint, Wandering Vagabond - 1600's. \nComes with a replica katana" /obj/item/storage/box/hero/ronin/PopulateContents() - new /obj/item/clothing/under/costume/kamishimo(src) - new /obj/item/clothing/head/costume/rice_hat(src) - new /obj/item/katana/weak/curator(src) - new /obj/item/clothing/shoes/sandal(src) + new /obj/item/clothing/under/costume/kamishimo(src) + new /obj/item/clothing/head/costume/rice_hat(src) + new /obj/item/katana/weak/curator(src) + new /obj/item/clothing/shoes/sandal(src) /obj/item/choice_beacon/augments name = "augment beacon" diff --git a/code/game/objects/items/pneumaticCannon.dm b/code/game/objects/items/pneumaticCannon.dm index 55fe304b9fa8d..8be5607713a2d 100644 --- a/code/game/objects/items/pneumaticCannon.dm +++ b/code/game/objects/items/pneumaticCannon.dm @@ -165,7 +165,7 @@ discharge = 1 if(!discharge) user.visible_message("[user] fires \the [src]!", \ - "You fire \the [src]!") + "You fire \the [src]!") log_combat(user, target, "fired at", src) var/turf/T = get_target(target, get_turf(src)) playsound(src, fire_sound, 50, 1) diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index cf574c3db3b5d..738f84b630de7 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -526,8 +526,8 @@ /obj/item/storage/box/donkpockets /obj/item/storage/box/donkpockets/PopulateContents() - for(var/i in 1 to 6) - new donktype(src) + for(var/i in 1 to 6) + new donktype(src) /obj/item/storage/box/donkpockets name = "box of donk-pockets" diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index ca8b19517367a..f317d3e1ce311 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -950,22 +950,22 @@ return ..() /obj/item/toy/cards/deck/MouseDrop(atom/over_object) - . = ..() - var/mob/living/M = usr - if(!istype(M) || !(M.mobility_flags & MOBILITY_PICKUP)) - return - if(Adjacent(usr)) - if(over_object == M && loc != M) - M.put_in_hands(src) - to_chat(usr, "You pick up the deck.") - - else if(istype(over_object, /atom/movable/screen/inventory/hand)) - var/atom/movable/screen/inventory/hand/H = over_object - if(M.putItemFromInventoryInHandIfPossible(src, H.held_index)) - to_chat(usr, "You pick up the deck.") - - else - to_chat(usr, "You can't reach it from here!") + . = ..() + var/mob/living/M = usr + if(!istype(M) || !(M.mobility_flags & MOBILITY_PICKUP)) + return + if(Adjacent(usr)) + if(over_object == M && loc != M) + M.put_in_hands(src) + to_chat(usr, "You pick up the deck.") + + else if(istype(over_object, /atom/movable/screen/inventory/hand)) + var/atom/movable/screen/inventory/hand/H = over_object + if(M.putItemFromInventoryInHandIfPossible(src, H.held_index)) + to_chat(usr, "You pick up the deck.") + + else + to_chat(usr, "You can't reach it from here!") diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index f7d829ccb212d..f0cee5f78010a 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -304,14 +304,14 @@ CREATION_TEST_IGNORE_SELF(/obj) if (result["button"] != 2) // If the user pressed the cancel button // text2num conveniently returns a null on invalid values armor = armor.setRating(melee = text2num(result["values"][MELEE]),\ - bullet = text2num(result["values"][BULLET]),\ - laser = text2num(result["values"][LASER]),\ - energy = text2num(result["values"][ENERGY]),\ - bomb = text2num(result["values"][BOMB]),\ - bio = text2num(result["values"][BIO]),\ - rad = text2num(result["values"][RAD]),\ - fire = text2num(result["values"][FIRE]),\ - acid = text2num(result["values"][ACID])) + bullet = text2num(result["values"][BULLET]),\ + laser = text2num(result["values"][LASER]),\ + energy = text2num(result["values"][ENERGY]),\ + bomb = text2num(result["values"][BOMB]),\ + bio = text2num(result["values"][BIO]),\ + rad = text2num(result["values"][RAD]),\ + fire = text2num(result["values"][FIRE]),\ + acid = text2num(result["values"][ACID])) log_admin("[key_name(usr)] modified the armor on [src] ([type]) to melee: [armor.melee], bullet: [armor.bullet], laser: [armor.laser], energy: [armor.energy], bomb: [armor.bomb], bio: [armor.bio], rad: [armor.rad], fire: [armor.fire], acid: [armor.acid]") message_admins("[key_name_admin(usr)] modified the armor on [src] ([type]) to melee: [armor.melee], bullet: [armor.bullet], laser: [armor.laser], energy: [armor.energy], bomb: [armor.bomb], bio: [armor.bio], rad: [armor.rad], fire: [armor.fire], acid: [armor.acid]") if(href_list[VV_HK_MASS_DEL_TYPE]) diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 7d2cf240fb274..9fece4d8b7fe8 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -214,7 +214,7 @@ add_fingerprint(user) return else - //prevents remote "kicks" with TK + //prevents remote "kicks" with TK if (!Adjacent(user)) return if (user.a_intent == INTENT_HELP) diff --git a/code/game/objects/structures/statues.dm b/code/game/objects/structures/statues.dm index 02ef5068fb26c..fd1aa3564fc91 100644 --- a/code/game/objects/structures/statues.dm +++ b/code/game/objects/structures/statues.dm @@ -268,9 +268,9 @@ icon_state = "snowman" /obj/structure/statue/snow/snowlegion - name = "snowlegion" - desc = "Looks like that weird kid with the tiger plushie has been round here again." - icon_state = "snowlegion" + name = "snowlegion" + desc = "Looks like that weird kid with the tiger plushie has been round here again." + icon_state = "snowlegion" //////////////////////////copper/////////////////////////////////////// diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index f78f7986502a4..ec5c105466509 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -469,13 +469,13 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/urinal, 32) alpha = 255 /obj/structure/curtain/proc/toggle(mob/M) - if (check(M)) - open = !open - playsound(loc, 'sound/effects/curtain.ogg', 50, 1) - update_appearance() + if (check(M)) + open = !open + playsound(loc, 'sound/effects/curtain.ogg', 50, 1) + update_appearance() /obj/structure/curtain/proc/check(mob/M) - return TRUE + return TRUE /obj/structure/curtain/directional icon_type = "bounty" diff --git a/code/game/turfs/open/floor/fancy_floor.dm b/code/game/turfs/open/floor/fancy_floor.dm index eeb9afba4ebae..fb4e463d83fad 100644 --- a/code/game/turfs/open/floor/fancy_floor.dm +++ b/code/game/turfs/open/floor/fancy_floor.dm @@ -433,16 +433,16 @@ A.narsie_act() /turf/open/floor/carpet/break_tile() - broken = TRUE - make_plating() - if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) - QUEUE_SMOOTH_NEIGHBORS(src) + broken = TRUE + make_plating() + if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) + QUEUE_SMOOTH_NEIGHBORS(src) /turf/open/floor/carpet/burn_tile() - burnt = TRUE - make_plating() - if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) - QUEUE_SMOOTH_NEIGHBORS(src) + burnt = TRUE + make_plating() + if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) + QUEUE_SMOOTH_NEIGHBORS(src) /turf/open/floor/carpet/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir) return FALSE diff --git a/code/modules/admin/poll_management.dm b/code/modules/admin/poll_management.dm index 353c60a5fe953..f037f07c466b2 100644 --- a/code/modules/admin/poll_management.dm +++ b/code/modules/admin/poll_management.dm @@ -604,7 +604,7 @@ SELECT p.text, pv.rating, COUNT(*) Maximum Value
      -
      +
      diff --git a/code/modules/admin/verbs/_help.dm b/code/modules/admin/verbs/_help.dm index 527e18933f716..6c5b3eb44d034 100644 --- a/code/modules/admin/verbs/_help.dm +++ b/code/modules/admin/verbs/_help.dm @@ -882,10 +882,10 @@ if(found.mind?.special_role) is_antag = 1 founds[++founds.len] = list("name" = found.name, - "real_name" = found.real_name, - "ckey" = found.ckey, - "key" = found.key, - "antag" = is_antag) + "real_name" = found.real_name, + "ckey" = found.ckey, + "key" = found.key, + "antag" = is_antag) msg += "[original_word](?|F) " continue msg += "[original_word] " diff --git a/code/modules/admin/verbs/beakerpanel.dm b/code/modules/admin/verbs/beakerpanel.dm index 9aa7070e2e890..5732c341832c9 100644 --- a/code/modules/admin/verbs/beakerpanel.dm +++ b/code/modules/admin/verbs/beakerpanel.dm @@ -86,15 +86,15 @@ .select2-selection { border-radius: 0px !important; } ul { - list-style-type: none; /* Remove bullets */ - padding: 0; /* Remove padding */ - margin: 0; /* Remove margins */ + list-style-type: none; /* Remove bullets */ + padding: 0; /* Remove padding */ + margin: 0; /* Remove margins */ } ul li { - margin-top: -1px; /* Prevent double borders */ - padding: 12px; /* Add some padding */ - color: #ffffff; + margin-top: -1px; /* Prevent double borders */ + padding: 12px; /* Add some padding */ + color: #ffffff; text-decoration: none; background: #40628a; border: 1px solid #161616; @@ -107,19 +107,19 @@ } .container-control { - width: 48%; - float: left; - padding-right: 10px; + width: 48%; + float: left; + padding-right: 10px; } .reagent > div, .reagent-div { float: right; width: 200px; } input.reagent { - width: 50%; + width: 50%; } .grenade-data { - display: inline-block; + display: inline-block; }