diff --git a/.devcontainer/cross-compile/Dockerfile b/.devcontainer/cross-compile/Dockerfile index b578fdc3726a7..84d2332362c0d 100644 --- a/.devcontainer/cross-compile/Dockerfile +++ b/.devcontainer/cross-compile/Dockerfile @@ -31,7 +31,7 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ RUN apt-get -y install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools # [Optional] comment out this section unless you want to cross-compile from Linux to Windows -# This section should align with doc/COMPILING/COMPILING.md#cross-compile-to-windows-from-linux +# This section should align with doc/c++/COMPILING.md#cross-compile-to-windows-from-linux # With the exception of the installation of packages that are already installed earlier in the Dockerfile # Like: astyle, cmake RUN apt-get -y install autoconf automake autopoint bash bison bzip2 flex gettext git g++ \ diff --git a/.github/workflows/CBA.yml b/.github/workflows/CBA.yml index 34684c3ca3fb7..88c4a774aaa9e 100644 --- a/.github/workflows/CBA.yml +++ b/.github/workflows/CBA.yml @@ -29,11 +29,16 @@ jobs: - uses: ammaraskar/gcc-problem-matcher@master - name: make run: | + clang++ --version ClangBuildAnalyzer --start . - CLANG=clang++-14 CXXFLAGS=-ftime-trace make + CLANG=clang++ CXXFLAGS=-ftime-trace make ClangBuildAnalyzer --stop . buildAnalysis - name: Analyze run: ClangBuildAnalyzer --analyze buildAnalysis + - uses: actions/upload-artifact@v4 + with: + name: ClangBuildAnalyzer-analysis + path: buildAnalysis - uses: actions/upload-artifact@v4 with: name: ClangBuildAnalyzer-traces diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml index ea8fc5b399749..89dc0a1ea919f 100644 --- a/.github/workflows/clang-tidy.yml +++ b/.github/workflows/clang-tidy.yml @@ -27,56 +27,71 @@ jobs: uses: fkirc/skip-duplicate-actions@master with: cancel_others: 'true' - paths: '[ "**.cpp", "**.h", "**.c", "**/CMakeLists.txt", "**/Makefile", "**.hpp", "**.cmake", "build-scripts/clang-tidy.sh", "build-scripts/clang-tidy-wrapper.sh", "build-scripts/get_affected_files.py", ".github/workflows/clang-tidy.yml" ]' - build: + paths: '[ "**.cpp", "**.h", "**.c", "**/CMakeLists.txt", "**/Makefile", "**.hpp", "**.cmake", "build-scripts/clang-tidy-build.sh", "build-scripts/clang-tidy-run.sh", "build-scripts/clang-tidy-wrapper.sh", "build-scripts/get_affected_files.py", ".github/workflows/clang-tidy.yml" ]' + + + build-clang-tidy: needs: skip-duplicates + strategy: + fail-fast: true + runs-on: ubuntu-24.04 + env: + COMPILER: clang++-17 + steps: + - name: install LLVM 17 + if: ${{ needs.skip-duplicates.outputs.should_skip != 'true' && github.event_name != 'pull_request' || github.event.pull_request.draft == false }} + run: | + sudo apt install llvm-17 llvm-17-dev llvm-17-tools clang-17 clang-tidy-17 clang-tools-17 libclang-17-dev + sudo apt install python3-pip ninja-build cmake + pip3 install --user lit + - name: checkout repository + uses: actions/checkout@v4 + - uses: ammaraskar/gcc-problem-matcher@master + - name: build clang-tidy plugin + if: ${{ needs.skip-duplicates.outputs.should_skip != 'true' && github.event_name != 'pull_request' || github.event.pull_request.draft == false }} + run: bash ./build-scripts/clang-tidy-build.sh + - name: upload plugin + uses: actions/upload-artifact@v4 + with: + name: cata-analyzer-plugin + path: build/tools/clang-tidy-plugin/libCataAnalyzerPlugin.so + retention-days: 1 + + run-clang-tidy: + needs: build-clang-tidy strategy: fail-fast: false matrix: - # To make the run finish in the run time limit, we split it up into two - # parts: the src directory and everything else + # To make the run finish in the run time limit, we split it up into three parts: + # the files explicitly changed in the pr, the src directory and everything else subset: [ 'directly-changed', 'indirectly-changed-src', 'indirectly-changed-other' ] - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 env: - CMAKE: 1 - CLANG: clang++-17 COMPILER: clang++-17 - CATA_CLANG_TIDY: plugin + CATA_CLANG_TIDY: clang-tidy-17 CATA_CLANG_TIDY_SUBSET: ${{ matrix.subset }} TILES: 1 SOUND: 1 - RELEASE: 1 + LOCALIZE: 1 steps: - - name: install LLVM 17 - if: ${{ needs.skip-duplicates.outputs.should_skip != 'true' && github.event_name != 'pull_request' || github.event.pull_request.draft == false }} - run: | - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" - sudo apt update - sudo apt install llvm-17 llvm-17-dev llvm-17-tools clang-17 clang-tidy-17 clang-tools-17 \ - libclang-17-dev libflac-dev libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev \ - libpulse-dev ccache gettext jq - name: install dependencies - run: | - sudo apt install python3-pip libncursesw5-dev ninja-build cmake gettext - pip3 install --user lit - - name: ensure clang-tidy and FileCheck commands point to LLVM 17 if: ${{ needs.skip-duplicates.outputs.should_skip != 'true' && github.event_name != 'pull_request' || github.event.pull_request.draft == false }} run: | - mkdir ~/llvm-command-override - ln -s /usr/bin/clang-tidy-17 ~/llvm-command-override/clang-tidy - ln -s /usr/bin/FileCheck-17 ~/llvm-command-override/FileCheck - echo "$HOME/llvm-command-override" >> $GITHUB_PATH + sudo apt install clang-17 clang-tidy-17 cmake ccache jq + sudo apt install libflac-dev libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev libpulse-dev gettext - name: checkout repository uses: actions/checkout@v4 - - name: prepare - run: bash ./build-scripts/requirements.sh + - name: download plugin from the previous job in this workflow run + uses: actions/download-artifact@v4 + with: + name: cata-analyzer-plugin + path: build/tools/clang-tidy-plugin/ - name: determine changed files if: ${{ github.event_name == 'pull_request' }} uses: actions/github-script@v7 @@ -98,7 +113,7 @@ jobs: - uses: ammaraskar/gcc-problem-matcher@master - name: run clang-tidy if: ${{ needs.skip-duplicates.outputs.should_skip != 'true' && github.event_name != 'pull_request' || github.event.pull_request.draft == false }} - run: bash ./build-scripts/clang-tidy.sh + run: bash ./build-scripts/clang-tidy-run.sh - name: show most time consuming checks if: always() run: | # the folder may not exist if there is no file to analyze diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index bd61e9f048590..ce042ebd94b5d 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -40,4 +40,4 @@ jobs: uses: reviewdog/action-suggester@v1 if: ${{ always() }} with: - tool_name: '[JSON & C++ formatters](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/DEVELOPER_TOOLING.md)' + tool_name: '[JSON & C++ formatters](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/c++/DEVELOPER_TOOLING.md)' diff --git a/.github/workflows/toc.yml b/.github/workflows/toc.yml index 71165c1f522e6..d56913ccd78f5 100644 --- a/.github/workflows/toc.yml +++ b/.github/workflows/toc.yml @@ -3,7 +3,7 @@ on: branches: - master paths: - - 'doc/JSON_INFO.md' + - 'doc/JSON/JSON_INFO.md' name: TOC Generator permissions: contents: read @@ -15,17 +15,17 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: npx doctoc doc/JSON_INFO.md --github + - run: npx doctoc doc/JSON/JSON_INFO.md --github - name: Create Pull Request uses: peter-evans/create-pull-request@v6 with: commit-message: Update the table of contents branch: update-toc token: ${{ secrets.TX_PR_CREATOR }} - title: Update the table of contents in doc/JSON_INFO.md + title: Update the table of contents in doc/JSON/JSON_INFO.md body: | ```sh #### Summary None - npx doctoc doc/JSON_INFO.md --github + npx doctoc doc/JSON/JSON_INFO.md --github ``` diff --git a/CMakeLists.txt b/CMakeLists.txt index ef9c2168502d2..ce0f0280a6002 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -211,7 +211,7 @@ message(STATUS "LOCALIZE : ${LOCALIZE}") message(STATUS "USE_XDG_DIR : ${USE_XDG_DIR}") message(STATUS "USE_HOME_DIR : ${USE_HOME_DIR}") message(STATUS "LANGUAGES : ${LANGUAGES}") -message(STATUS "See doc/COMPILING/COMPILING-CMAKE.md for details and more info --") +message(STATUS "See doc/c++/COMPILING-CMAKE.md for details and more info --") if (NOT MSVC) set(CATA_WARNINGS @@ -255,7 +255,7 @@ if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") "This project requires an out of source build. \ Remove the file 'CMakeCache.txt' found in this directory before continuing; \ create a separate build directory and run 'cmake [options] ' from there. \ - See doc/COMPILING/COMPILING-CMAKE.md for details and more info.") + See doc/c++/COMPILING-CMAKE.md for details and more info.") endif () #set(THREADS_USE_PTHREADS_WIN32 True) @@ -284,7 +284,7 @@ if (TILES) "This project requires SDL2 to be installed to compile in graphical mode. \ Please install the SDL2 development libraries, \ or try compiling without -DTILES=1 for a text-only compilation. \ - See doc/COMPILING/COMPILING-CMAKE.md for details and more info.") + See doc/c++/COMPILING-CMAKE.md for details and more info.") endif () message(STATUS "Searching for SDL2_TTF library --") @@ -294,7 +294,7 @@ if (TILES) "This project requires SDL2_ttf to be installed to compile in graphical mode. \ Please install the SDL2_ttf development libraries, \ or try compiling without -DTILES=1 for a text-only compilation. \ - See doc/COMPILING/COMPILING-CMAKE.md for details and more info.") + See doc/c++/COMPILING-CMAKE.md for details and more info.") endif () message(STATUS "Searching for SDL2_image library --") @@ -304,7 +304,7 @@ if (TILES) "This project requires SDL2_image to be installed to compile in graphical mode. \ Please install the SDL2_image development libraries, \ or try compiling without -DTILES=1 for a text-only compilation. \ - See doc/COMPILING/COMPILING-CMAKE.md for details and more info.") + See doc/c++/COMPILING-CMAKE.md for details and more info.") endif () add_definitions(-DTILES) endif () @@ -358,7 +358,7 @@ if (CURSES) "This project requires ncurses to be installed to be compiled in text-only mode. \ Please install the ncurses development libraries, \ or try compiling with -DTILES=1 for a graphical compilation. \ - See doc/COMPILING/COMPILING-CMAKE.md for details and more info") + See doc/c++/COMPILING-CMAKE.md for details and more info") endif () if (NOT DYNAMIC_LINKING) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNCURSES_STATIC") @@ -374,7 +374,7 @@ if (SOUND) message(FATAL_ERROR "You need the SDL2_mixer development library \ to be able to compile with sound enabled. \ - See doc/COMPILING/COMPILING-CMAKE.md for details and more info.") + See doc/c++/COMPILING-CMAKE.md for details and more info.") endif() endif () diff --git a/ISSUES.md b/ISSUES.md index 7145beb70018c..c94967658a54b 100644 --- a/ISSUES.md +++ b/ISSUES.md @@ -48,7 +48,7 @@ You can update issues with labels using comment-commands. First, open a PR addin ### Questions -You should direct your questions to the forum or ask on IRC. You should also read the included documentation and additional text files, e.g. [COMPILING.md](doc/COMPILING/COMPILING.md) if you have problems building. +You should direct your questions to the forum or ask on IRC. You should also read the included documentation and additional text files, e.g. [COMPILING.md](doc/c++/COMPILING.md) if you have problems building. ## Bounties diff --git a/LICENSE.txt b/LICENSE.txt index b79fcc6a750d8..3781899b7671e 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -14,8 +14,6 @@ PLF List and PLF Colony (src/list.h, src/colony.h) are licensed under the zLib l getpost (tools/json_tools/format/getpost.h) is licensed under the MIT license, see file for text of license. -gulrak filesystem (src/third-party/ghc/*) is licensed under the MIT license, see file for text of license. - libbacktrace is licensed under a BSD license (https://github.com/ianlancetaylor/libbacktrace/blob/master/LICENSE). The full license text is as follows: # Copyright (C) 2012-2016 Free Software Foundation, Inc. diff --git a/README.md b/README.md index 7c7b4ad84737d..8c9b1239a91c0 100644 --- a/README.md +++ b/README.md @@ -45,12 +45,12 @@ Ncurses and tiles versions are available in the [official repos](https://tracker ## Compile -Please read [COMPILING.md](doc/COMPILING/COMPILING.md) - it covers general information and more specific recipes for Linux, OS X, Windows and BSD. See [COMPILER_SUPPORT.md](doc/COMPILING/COMPILER_SUPPORT.md) for details on which compilers we support. And you can always dig for more information in [doc/](https://github.com/CleverRaven/Cataclysm-DDA/tree/master/doc). +Please read [COMPILING.md](doc/c++/COMPILING.md) - it covers general information and more specific recipes for Linux, OS X, Windows and BSD. See [COMPILER_SUPPORT.md](doc/c++/COMPILER_SUPPORT.md) for details on which compilers we support. And you can always dig for more information in [doc/](https://github.com/CleverRaven/Cataclysm-DDA/tree/master/doc). We also have the following build guides: -* Building on Windows with `MSYS2` at [COMPILING-MSYS.md](doc/COMPILING/COMPILING-MSYS.md) -* Building on Windows with `vcpkg` at [COMPILING-VS-VCPKG.md](doc/COMPILING/COMPILING-VS-VCPKG.md) -* Building with `cmake` at [COMPILING-CMAKE.md](doc/COMPILING/COMPILING-CMAKE.md) (*unofficial guide*) +* Building on Windows with `MSYS2` at [COMPILING-MSYS.md](doc/c++/COMPILING-MSYS.md) +* Building on Windows with `vcpkg` at [COMPILING-VS-VCPKG.md](doc/c++/COMPILING-VS-VCPKG.md) +* Building with `cmake` at [COMPILING-CMAKE.md](doc/c++/COMPILING-CMAKE.md) (*unofficial guide*) ## Contribute diff --git a/build-scripts/clang-tidy-build.sh b/build-scripts/clang-tidy-build.sh new file mode 100644 index 0000000000000..729500be89532 --- /dev/null +++ b/build-scripts/clang-tidy-build.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +# Shell script intended for clang-tidy check + +echo "Using bash version $BASH_VERSION" +set -exo pipefail + +num_jobs=3 + +# We might need binaries installed via pip, so ensure that our personal bin dir is on the PATH +#export PATH=$HOME/.local/bin:$PATH +build_type=MinSizeRel + +cmake_extra_opts=() +cmake_extra_opts+=("-DCATA_CLANG_TIDY_PLUGIN=ON") +# Need to specify the particular LLVM / Clang versions to use, lest it +# use the older LLVM that comes by default on Ubuntu. +cmake_extra_opts+=("-DLLVM_DIR=/usr/lib/llvm-17/lib/cmake/llvm") +cmake_extra_opts+=("-DClang_DIR=/usr/lib/llvm-17/lib/cmake/clang") + + +mkdir -p build +cd build +cmake \ + ${COMPILER:+-DCMAKE_CXX_COMPILER=$COMPILER} \ + -DCMAKE_BUILD_TYPE="$build_type" \ + -DLOCALIZE=OFF \ + "${cmake_extra_opts[@]}" \ + .. + + +echo "Compiling clang-tidy plugin" +make -j$num_jobs CataAnalyzerPlugin +#export PATH=$PWD/tools/clang-tidy-plugin/clang-tidy-plugin-support/bin:$PATH +# add FileCheck to the search path +export PATH=/usr/lib/llvm-17/bin:$PATH +if ! which FileCheck +then + echo "Missing FileCheck" + exit 1 +fi +CATA_CLANG_TIDY=clang-tidy +# lit might be installed via pip, so ensure that our personal bin dir is on the PATH +export PATH=$HOME/.local/bin:$PATH +lit -v tools/clang-tidy-plugin/test +cd .. + +# show that it works + +echo "version:" +LD_PRELOAD=build/tools/clang-tidy-plugin/libCataAnalyzerPlugin.so clang-tidy --version +echo "all enabled checks:" +LD_PRELOAD=build/tools/clang-tidy-plugin/libCataAnalyzerPlugin.so clang-tidy --list-checks +echo "cata-specific checks:" +LD_PRELOAD=build/tools/clang-tidy-plugin/libCataAnalyzerPlugin.so clang-tidy --list-checks --checks="cata-*" | grep "cata" + diff --git a/build-scripts/clang-tidy.sh b/build-scripts/clang-tidy-run.sh old mode 100755 new mode 100644 similarity index 66% rename from build-scripts/clang-tidy.sh rename to build-scripts/clang-tidy-run.sh index 2cd4d5a398efe..6ed6b3341c7da --- a/build-scripts/clang-tidy.sh +++ b/build-scripts/clang-tidy-run.sh @@ -7,68 +7,33 @@ set -exo pipefail num_jobs=3 -# We might need binaries installed via pip, so ensure that our personal bin dir is on the PATH -export PATH=$HOME/.local/bin:$PATH - -if [ "$RELEASE" = "1" ] -then - build_type=MinSizeRel -else - build_type=Debug -fi - -cmake_extra_opts=() - -if [ "$CATA_CLANG_TIDY" = "plugin" ] -then - cmake_extra_opts+=("-DCATA_CLANG_TIDY_PLUGIN=ON") - # Need to specify the particular LLVM / Clang versions to use, lest it - # use the older LLVM that comes by default on Ubuntu. - cmake_extra_opts+=("-DLLVM_DIR=/usr/lib/llvm-17/lib/cmake/llvm") - cmake_extra_opts+=("-DClang_DIR=/usr/lib/llvm-17/lib/cmake/clang") -fi - +# create compilation database (compile_commands.json) mkdir -p build cd build cmake \ - -DBACKTRACE=ON \ - ${COMPILER:+-DCMAKE_CXX_COMPILER=$COMPILER} \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ - -DCMAKE_BUILD_TYPE="$build_type" \ + ${COMPILER:+-DCMAKE_CXX_COMPILER=$COMPILER} \ + -DCMAKE_BUILD_TYPE="Release" \ + -DBACKTRACE=ON \ -DTILES=${TILES:-0} \ -DSOUND=${SOUND:-0} \ - "${cmake_extra_opts[@]}" \ + -DLOCALIZE=${LOCALIZE:-0} \ .. +cd .. +ln -s build/compile_commands.json . -if [ "$CATA_CLANG_TIDY" = "plugin" ] +if [ ! -f build/tools/clang-tidy-plugin/libCataAnalyzerPlugin.so ] then - echo "Compiling clang-tidy plugin" - make -j$num_jobs CataAnalyzerPlugin - export PATH=$PWD/tools/clang-tidy-plugin/clang-tidy-plugin-support/bin:$PATH - if ! which FileCheck - then - ls -l tools/clang-tidy-plugin/clang-tidy-plugin-support/bin - ls -l /usr/bin - echo "Missing FileCheck" - exit 1 - fi - if ! which python && which python3 - then - ln -s `which python3` $PWD/tools/clang-tidy-plugin/clang-tidy-plugin-support/bin/python - fi - CATA_CLANG_TIDY=clang-tidy - lit -v tools/clang-tidy-plugin/test + echo "Cata plugin not found. Assuming we're in CI and bailing out." + exit 1 fi -"$CATA_CLANG_TIDY" --version - # Show compiler C++ header search path ${COMPILER:-clang++} -v -x c++ /dev/null -c # And the same for clang-tidy -"$CATA_CLANG_TIDY" ../src/version.cpp -- -v - -cd .. -ln -s build/compile_commands.json +./build-scripts/clang-tidy-wrapper.sh --version +# list of checks +./build-scripts/clang-tidy-wrapper.sh --list-checks # We want to first analyze all files that changed in this PR, then as # many others as possible, in a random order. @@ -76,7 +41,7 @@ set +x # Check for changes to any files that would require us to run clang-tidy across everything changed_global_files="$( ( cat ./files_changed || echo 'unknown' ) | \ - egrep -i "clang-tidy.sh|clang-tidy-wrapper.sh|clang-tidy.yml|.clang-tidy|files_changed|get_affected_files.py|CMakeLists.txt|CMakePresets.json|unknown" || true )" + egrep -i "clang-tidy-build.sh|clang-tidy-run.sh|clang-tidy-wrapper.sh|clang-tidy.yml|.clang-tidy|files_changed|get_affected_files.py|CMakeLists.txt|CMakePresets.json|unknown" || true )" if [ -n "$changed_global_files" ] then first_changed_file="$(echo "$changed_global_files" | head -n 1)" @@ -135,6 +100,8 @@ case "$CATA_CLANG_TIDY_SUBSET" in ;; esac +printf "full list of files to analyze (they might get shuffled around in practice):\n%s\n" "$tidyable_cpp_files" + function analyze_files_in_random_order { if [ -n "$1" ] diff --git a/build-scripts/clang-tidy-wrapper.sh b/build-scripts/clang-tidy-wrapper.sh index 9169d48a7ffd0..56f2c4c1bea36 100755 --- a/build-scripts/clang-tidy-wrapper.sh +++ b/build-scripts/clang-tidy-wrapper.sh @@ -8,8 +8,8 @@ plugin=build/tools/clang-tidy-plugin/libCataAnalyzerPlugin.so if [ -f "$plugin" ] then set -x - LD_PRELOAD=$plugin "$CATA_CLANG_TIDY" --enable-check-profile --store-check-profile=clang-tidy-trace "$@" + LD_PRELOAD=$plugin ${CATA_CLANG_TIDY} --enable-check-profile --store-check-profile=clang-tidy-trace "$@" else set -x - "$CATA_CLANG_TIDY" "$@" + ${CATA_CLANG_TIDY} "$@" fi diff --git a/build-scripts/get_all_mods.py b/build-scripts/get_all_mods.py index b9d244f29fdf8..47918b397a9d8 100755 --- a/build-scripts/get_all_mods.py +++ b/build-scripts/get_all_mods.py @@ -56,7 +56,7 @@ def print_modlist(modlist, master_list): for info in glob.glob('data/mods/*/modinfo.json'): mod_info = json.load(open(info, encoding='utf-8')) for e in mod_info: - if(e["type"] == "MOD_INFO" and + if (e["type"] == "MOD_INFO" and ("obsolete" not in e or not e["obsolete"])): ident = e["id"] all_mod_dependencies[ident] = e.get("dependencies", []) @@ -72,7 +72,7 @@ def print_modlist(modlist, master_list): info_path = os.path.join(r, 'modinfo.json') mod_info = json.load(open(info_path, encoding='utf-8')) for e in mod_info: - if(e["type"] == "MOD_INFO" and + if (e["type"] == "MOD_INFO" and ("obsolete" not in e or not e["obsolete"])): ident = e["id"] if ident == "": diff --git a/build-scripts/requirements.sh b/build-scripts/requirements.sh index c38c1b285e0d1..f789ccc52eef4 100644 --- a/build-scripts/requirements.sh +++ b/build-scripts/requirements.sh @@ -54,11 +54,6 @@ if [ -n "${CODE_COVERAGE}" ]; then export LDFLAGS="$LDFLAGS --coverage" fi -if [ -n "$CATA_CLANG_TIDY" ]; then - $travis_retry pip install --user wheel --upgrade - $travis_retry pip install --user compiledb lit -fi - # Influenced by https://github.com/zer0main/battleship/blob/master/build/windows/requirements.sh if [ -n "${MXE_TARGET}" ]; then sudo apt update diff --git a/data/changelog.txt b/data/changelog.txt index 61cea7466d265..2d4b521426ac0 100644 --- a/data/changelog.txt +++ b/data/changelog.txt @@ -197,6 +197,8 @@ Prompt before oxytorch activity if you don't have enough gas Ability to hide/unhide revealed wall wiring by examining it Special vision enchantment for Antennae mutation Add keybind to throw your wielded item +audio now works on curses mode, not just tiles mode +Render WORN overlays for ablative pockets ## Content: @@ -417,6 +419,9 @@ Some houses are under construction Adds car crashes into existing buildings. Initial implementation includes three houses that can spawn with this variant. fungalize stages for rest of zombies Basic beach decorations +Changed lore primer to accommodate eyebot removal. +Add an new plasma gun for sale by the Exodii +Added a small kindergarten Add Hazelnut Milk, Walnut Milk, and add them to various recipes a la crepes. Add the menorah and small candles to put in it @@ -554,7 +559,16 @@ Add sorting by price to weight ratio Filter items by can_contain `L:`, `V:`, `M:` (longest_side, volume, mass); affects AIM, inventory… Migrate compare item menu to imgui Various misc improvements to camp crafting flow and feedback +Better skill requirement UI for martial arts +Scale spell window to spell list and terminal size +Add recast last spell (Repeat last supernatural ability) +Specify which parts you can connect to in extension cord prompt +Make font-hinting user-configurable +Set minimum sizes for missions menu UI +Fix compact aim window +Fix NPC rules window scaling for small terminal sizes Add history to Construction Search +load all of the user’s chosen font files as fallbacks for ImGui to use ## Mods: @@ -917,8 +931,33 @@ Aftershock: Shield bionics deploy Riemman shields [Xedra Evolved] Add time magic class / scenario [Magiclysm] Spells cost 1/5 of their normal cost on spell failure [Magiclysm] The Great Damage Randomization and Normalization +[Magiclysm] Add technomantic augmentation clinic +[Magiclysm] Add the aenor, a giant heron riding mount +[Magiclysm] Stop workshop elves and their workshop from spawning +[Magiclysm] Add zombie dwarves to mines +Removes superceded sees_player_retro mod +[Magiclysm] Obsolete shambling mound, give shaman the Keeper of the Glades summon +[Magicylysm] Forge of Wonders Redesigned +[Magiclysm] Add Witchsight Animist spell and Witchfinder Eye CBM +[MoM] Ephemeral riftwalkers can use Breach +[Magiclysm] Forge values denarii but no one else does +[DinoMod] shonisaurus +Aftershock: Add Zenit security drones, a miniboss for industrial ruins. +[Magiclysm] Add a couple more CBMs +[MOM] Add a couple Teleporter Powers +[innawood] Add Makeshift hand-crank charger and magnetite ore. +[Magiclysm] Demon spider rework +[MoM] Melded Teleporter Force [MoM] Sitting at high Nether Attunement costs additional calories/additional weariness when maintaining powers [Magiclysm] Goblins and wargs are best friends +Aftershock: Create an alternate EMP mechanic that disables items only temporarily. +[MoM] Add Water-Walking Telekinetic power +[Magiclysm] Use EoCs to allow Magiclysm fantasy species to gain mutation paths/purify themselves +Changes a straight damage on archery bracers to weakpoint accuracy. +Xedra Evolved: Salamander Eruption +Adds craftable appliances for setting up improvised shelters and bases on the Exo-Planet +[Aftershock] Add the Geist (telekinetic) esper profession and powers +[MoM] Autolearn matrix elixir recipes ## Balance: @@ -1048,6 +1087,14 @@ Rework faction camp mission travel calculations Long sticks can now be found in the forest trash group, too Stone walls (the non-dry variants using mortar) now require more than 3l of rocks to build Washing kits are now craftable in the dark +wp_skill makes you avoid strongpoints +Zombified humans are still humans for butchery purposes +Zombie Humanity Audit +Combine crit hit and wp hit and tweak damage calculation for ranged attack +Thermal electric gear power draw reduction + medium battery for TE suit +make charcoal kiln place-able +Set disassembly range to crafting range: 6 +Mutating with an installed bionic that conflicts results in damage ## Bugfixes: @@ -1423,10 +1470,23 @@ Fixes displaying of stats for ablative armor Fixes SegFault w/ flashlights & attached power Peeking out of elevated windows no longer causes you to fall Heat radiance now can spread through gas-permeable tiles like chain link fence +Fix title menu tileset layering error +color tags texts drawn in item info +make ammo_effect_WIDE actually work +Fixes item prefixes (XL/XS) sometimes not being shown in crafting menu +Fix vehicle not moving when being remotely controlled +Fix crash when zone-harvesting crops with bad data +kickboxing and boxing technique conditions +Innawoods - Fixes trails spawning manmade stuff Correct recipe for water purifying to use correct quantity of water Items in transparent pockets on the map illuminate surroundings Mark some specific furnitures/terrains examine as always allowed in faction territory NPC should not wield integrated armor +Allow commercial fertilizer to be used by zone manager +[innawood] Crafted batteries are fully charged +Fix infinite bounce +Prevent segfault when search gives no hits +Fix mutation spells learned don't lose when mutation lost ## Performance: @@ -1468,6 +1528,7 @@ Cache item info for crafting GUI full-text search Vehicles are slightly more efficient vision_transparency_cache isn't rebuilt if transparency_cache_dirty isn't set AIM cache filter function once +Cache item info, reducing time of crafting filter `d:` to ~32% ## Infrastructure: @@ -1586,7 +1647,17 @@ Improve test coverage of mod combinations with mod_interactions Tests now run in a guaranteed order (lexicographic) by default (can be overriden with cli argument) Streamline Vertical Movement While Levitating and Flying Make enchantment mutations work again +Added Imgui demo screen (and style editor) to the debug menu +clang-tidy output is a bit more readable on windows migrate map-size related constants to new file, unmagic related constants +Debug recipes for tests: first +Make clang-tidy feedback on GitHub much more responsive +Item price and price_postapoc must be denominated (cents/USD/kUSD). Integer values no longer used +NPC snippets overhaul +Refactor `ammo_effect_BOUNCE` +Add magic_type to deduplicate shared spell fields and reduce hardcoding +Add ability to debug spawn item groups and specify amount of repeats when testing +Bump minimum supported macOS version to 10.15 (macOS Catalina) ## Build: Support Mac arm64 build diff --git a/data/fontdata.json b/data/fontdata.json index 522c009c585c3..40eeab7e00389 100644 --- a/data/fontdata.json +++ b/data/fontdata.json @@ -1,5 +1,5 @@ { - "//1": "See docs/FONT_OPTIONS.md for how to configure your fonts.", + "//1": "See docs/user-guides/FONT_OPTIONS.md for how to configure your fonts.", "typeface": [ { "path": "data/font/Terminus.ttf", "hinting": "Bitmap" }, "data/font/unifont.ttf" diff --git a/data/json/flags.json b/data/json/flags.json index 69ef17d4e5ed7..118703909b0af 100644 --- a/data/json/flags.json +++ b/data/json/flags.json @@ -1056,6 +1056,11 @@ "type": "json_flag", "//": "This gun wont train marksmanship when fired. Used in Aftershock smart guns." }, + { + "id": "GENE_TECH", + "type": "json_flag", + "//": "Used in Aftershock gene editing." + }, { "id": "NANOFAB_REPAIR", "type": "json_flag", diff --git a/data/json/items/gun/3006.json b/data/json/items/gun/3006.json index c570526028940..d168293fad716 100644 --- a/data/json/items/gun/3006.json +++ b/data/json/items/gun/3006.json @@ -4,7 +4,7 @@ "looks_like": "modular_ar15", "type": "GUN", "reload_noise_volume": 10, - "name": { "str": "magazine-fed lever-action hunting rifle" }, + "name": { "str": "BLR lever-action hunting rifle" }, "description": "A highly accurate lever-action hunting rifle chambered for the powerful .30-06 round. Notable for using a detachable magazine instead of a traditional tube.", "variant_type": "gun", "variants": [ diff --git a/data/json/items/gun/38.json b/data/json/items/gun/38.json index 06da38cd7e58f..544916477fae0 100644 --- a/data/json/items/gun/38.json +++ b/data/json/items/gun/38.json @@ -157,7 +157,7 @@ "copy-from": "pistol_revolver", "looks_like": "sw_619", "type": "GUN", - "name": { "str_sp": ".357 revolver" }, + "name": { "str_sp": "classic .357 revolver", "//": "This looks like a classic revolver, from a western" }, "//": "This is the Colt Python 2020 6-inch version.", "description": "A six inch revolver chambered in .357 Magnum/.38 Special. Favorite of sheriffs and post-Cataclysm survivor group leaders.", "//s": "omg twd reference :O", @@ -401,7 +401,7 @@ "copy-from": "rifle_manual", "looks_like": "modular_ar15", "type": "GUN", - "name": { "str": ".357 lever-action rifle" }, + "name": { "str": "long-barreled .357 lever-action rifle" }, "description": "This lever-action rifle is chambered in the powerful .357 Magnum cartridge, with an 20\" barrel with a tube-fed magazine. Go get 'em cowboy!", "variant_type": "gun", "variants": [ diff --git a/data/json/items/gun/44.json b/data/json/items/gun/44.json index ee5663c1af976..79915eb25bfbf 100644 --- a/data/json/items/gun/44.json +++ b/data/json/items/gun/44.json @@ -319,7 +319,7 @@ "copy-from": "rifle_manual", "looks_like": "modular_ar15", "type": "GUN", - "name": { "str": ".44 lever-action rifle" }, + "name": { "str": "long-barreled .44 lever-action rifle" }, "description": "This lever-action rifle is chambered in the powerful .44 Magnum cartridge, with an 20\" barrel with a tube-fed magazine. Go get 'em cowboy!", "variant_type": "gun", "variants": [ diff --git a/data/json/items/gun/57.json b/data/json/items/gun/57.json index f5f952b587d07..219bb1392df10 100644 --- a/data/json/items/gun/57.json +++ b/data/json/items/gun/57.json @@ -4,7 +4,7 @@ "looks_like": "glock_17", "type": "GUN", "reload_noise_volume": 10, - "name": { "str": "5.7mm pistol" }, + "name": { "str": "FN 5.7mm pistol" }, "description": "Firing the armor-piercing 5.7x28mm round, this lightweight handgun was developed for NATO use as a sidearm capable of penetrating body armor. Its proprietary and nonprolific ammunition kept it comparatively rare among both civilian and militant use, but the gun's ability to ignore most forms of conventional ballistic armor can't be argued with. Given that its tiny bullets have next to no stopping power, its armor-penetrating capability comes at a considerable trade-off.", "variant_type": "gun", "variants": [ diff --git a/data/json/items/magazine/57.json b/data/json/items/magazine/57.json index e80ab70bc5b84..5583e1ddc12f1 100644 --- a/data/json/items/magazine/57.json +++ b/data/json/items/magazine/57.json @@ -3,7 +3,7 @@ "id": "fn57mag", "looks_like": "glock17_17", "type": "MAGAZINE", - "name": { "str": "5.7mm 20-round pistol magazine" }, + "name": { "str": "FN 5.7mm 20-round pistol magazine" }, "description": "A 20-round box magazine, for use with handguns chambering the proprietary 5.7x28mm cartridge.", "variant_type": "gun", "variants": [ diff --git a/data/json/items/tool/lighting.json b/data/json/items/tool/lighting.json index 0ff21ed7c5218..3fae858aaf0fa 100644 --- a/data/json/items/tool/lighting.json +++ b/data/json/items/tool/lighting.json @@ -114,7 +114,7 @@ "id": "candle_lit", "type": "TOOL", "copy-from": "candle", - "name": { "str": "candle" }, + "name": { "str": "burning candle" }, "description": "A thick wax candle. It doesn't provide very much light, but it can burn for quite a long time. This candle is lit.", "turns_per_charge": 1260, "use_action": [ @@ -1115,7 +1115,7 @@ "id": "candle_small_lit", "type": "TOOL", "copy-from": "candle_small", - "name": { "str": "small candle" }, + "name": { "str": "burning small candle" }, "description": "A thin wax candle. It doesn't provide very much light and will burn relatively quickly. This candle is lit.", "turns_per_charge": 63, "use_action": [ diff --git a/data/json/items/toolmod.json b/data/json/items/toolmod.json index 34ff0c71bd80d..a1465942af461 100644 --- a/data/json/items/toolmod.json +++ b/data/json/items/toolmod.json @@ -39,9 +39,12 @@ "color": "light_green", "acceptable_ammo": [ "battery" ], "pocket_mods": [ - { "pocket_type": "MAGAZINE_WELL", "item_restriction": [ "small_storage_battery", "battery_car", "battery_motorbike" ] } + { + "pocket_type": "MAGAZINE_WELL", + "item_restriction": [ "small_storage_battery", "medium_storage_battery", "battery_car", "battery_motorbike" ] + } ], - "magazine_adaptor": [ [ "battery", [ "small_storage_battery", "battery_car", "battery_motorbike" ] ] ] + "magazine_adaptor": [ [ "battery", [ "small_storage_battery", "medium_storage_battery", "battery_car", "battery_motorbike" ] ] ] }, { "id": "pseudo_magazine_mod", diff --git a/data/json/mapgen/Metalworker.json b/data/json/mapgen/Metalworker.json index a927a92907779..adede2ac477b0 100644 --- a/data/json/mapgen/Metalworker.json +++ b/data/json/mapgen/Metalworker.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "craft_shop_1" ], - "weight": 200, "object": { "fill_ter": "t_strconc_floor", "rows": [ diff --git a/data/json/mapgen/Woodworker.json b/data/json/mapgen/Woodworker.json index 1f6afd2719705..3e51ab2008008 100644 --- a/data/json/mapgen/Woodworker.json +++ b/data/json/mapgen/Woodworker.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "craft_shop_3" ], - "weight": 200, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/abandoned01.json b/data/json/mapgen/abandoned01.json index 13d99c2777d90..6dff8de2a8424 100644 --- a/data/json/mapgen/abandoned01.json +++ b/data/json/mapgen/abandoned01.json @@ -95,7 +95,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "dirtroad1_aban1" ], - "weight": 333, "object": { "fill_ter": "t_dirt", "rows": [ @@ -142,7 +141,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "dirtroad2_aban1" ], - "weight": 333, "object": { "fill_ter": "t_dirt", "rows": [ @@ -193,7 +191,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "forest_aban1" ], - "weight": 333, "object": { "fill_ter": "t_dirt", "rows": [ @@ -245,7 +242,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "cabin_aban1" ], - "weight": 333, "object": { "fill_ter": "t_floor", "rows": [ @@ -331,7 +327,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "cabin_aban1_roof" ], - "weight": 333, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -377,7 +372,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "car_corner_aban1" ], - "weight": 333, "object": { "fill_ter": "t_floor", "rows": [ @@ -459,7 +453,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "car_corner_aban1_roof" ], - "weight": 333, "object": { "fill_ter": "t_open_air", "rows": [ @@ -495,7 +488,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "dirtplaza_aban1" ], - "weight": 333, "object": { "fill_ter": "t_dirt", "rows": [ @@ -547,7 +539,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "barn_aban1" ], - "weight": 333, "object": { "fill_ter": "t_dirtfloor", "rows": [ @@ -653,7 +644,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "barn_aban1_roof" ], - "weight": 333, "object": { "fill_ter": "t_open_air", "rows": [ diff --git a/data/json/mapgen/abandoned_shopping_plaza.json b/data/json/mapgen/abandoned_shopping_plaza.json index 06b701573c2b6..9e7d85eaea52b 100644 --- a/data/json/mapgen/abandoned_shopping_plaza.json +++ b/data/json/mapgen/abandoned_shopping_plaza.json @@ -43,7 +43,6 @@ [ "s_shoppingplaza_a1", "s_shoppingplaza_a2", "s_shoppingplaza_a3" ], [ "s_shoppingplaza_b1", "s_shoppingplaza_b2", "s_shoppingplaza_b3" ] ], - "weight": 500, "object": { "rows": [ "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4444444~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", @@ -105,7 +104,6 @@ [ "s_shoppingplaza_a4", "s_shoppingplaza_a5", "s_shoppingplaza_a6" ], [ "s_shoppingplaza_b4", "s_shoppingplaza_b5", "s_shoppingplaza_b6" ] ], - "weight": 500, "object": { "rows": [ "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~44###################rrr", @@ -169,7 +167,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "s_shoppingplaza_B1", "s_shoppingplaza_B2", "s_shoppingplaza_B3" ] ], - "weight": 500, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -205,7 +202,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "null", "null", "s_shoppingplaza_A6" ], [ "s_shoppingplaza_B4", "s_shoppingplaza_B5", "s_shoppingplaza_B6" ] ], - "weight": 500, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/abandoned_warehouse.json b/data/json/mapgen/abandoned_warehouse.json index 8c46accc7da3b..e24bb5c49ea23 100644 --- a/data/json/mapgen/abandoned_warehouse.json +++ b/data/json/mapgen/abandoned_warehouse.json @@ -57,7 +57,6 @@ "type": "mapgen", "method": "json", "om_terrain": "abandonedwarehouse", - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rotation": [ 1, 1 ], @@ -95,7 +94,6 @@ "type": "mapgen", "method": "json", "om_terrain": "abandonedwarehouse_roof", - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rotation": [ 1, 1 ], @@ -135,7 +133,6 @@ "type": "mapgen", "method": "json", "om_terrain": "abandonedwarehouse_1", - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -179,7 +176,6 @@ "type": "mapgen", "method": "json", "om_terrain": "abandonedwarehouse_1_roof", - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -223,7 +219,6 @@ "type": "mapgen", "method": "json", "om_terrain": "abandonedwarehouse_2", - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -279,7 +274,6 @@ "type": "mapgen", "method": "json", "om_terrain": "abandonedwarehouse_2_roof", - "weight": 100, "object": { "fill_ter": "t_tar_flat_roof", "rows": [ @@ -318,7 +312,6 @@ "type": "mapgen", "method": "json", "om_terrain": "abandonedwarehouse_3", - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -357,7 +350,6 @@ "type": "mapgen", "method": "json", "om_terrain": "abandonedwarehouse_3_roof", - "weight": 100, "object": { "fill_ter": "t_tile_flat_roof", "rows": [ @@ -411,7 +403,6 @@ "type": "mapgen", "method": "json", "om_terrain": "abandonedwarehouse_4", - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -454,7 +445,6 @@ "type": "mapgen", "method": "json", "om_terrain": "abandonedwarehouse_4_roof", - "weight": 100, "object": { "fill_ter": "t_tile_flat_roof", "rows": [ diff --git a/data/json/mapgen/airliner.json b/data/json/mapgen/airliner.json index edf76334f7d1b..ad93c6e49c6a1 100644 --- a/data/json/mapgen/airliner.json +++ b/data/json/mapgen/airliner.json @@ -14,7 +14,6 @@ [ "airliner_1i", "airliner_2i", "airliner_3i" ], [ "airliner_1j", "airliner_2j", "airliner_3j" ] ], - "weight": 250, "object": { "fill_ter": "t_dirt", "rows": [ @@ -289,7 +288,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "airliner_2a_1" ], [ "airliner_2b_1" ], [ "airliner_2c_1" ] ], - "weight": 250, "object": { "rows": [ "AAAAAAAAAAAAAAAAAAAAAAAA", @@ -372,7 +370,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "airliner_2b_-1" ], [ "airliner_2c_-1" ] ], - "weight": 250, "object": { "fill_ter": "t_metal_floor", "rows": [ diff --git a/data/json/mapgen/animalpound.json b/data/json/mapgen/animalpound.json index e82de4120f0d4..a66e3d1507ac3 100644 --- a/data/json/mapgen/animalpound.json +++ b/data/json/mapgen/animalpound.json @@ -1,6 +1,6 @@ [ { - "name": "GROUP_ANIMALPOUND_CATS", + "id": "GROUP_ANIMALPOUND_CATS", "type": "monstergroup", "monsters": [ { "monster": "mon_null", "weight": 580 }, @@ -19,7 +19,7 @@ ] }, { - "name": "GROUP_ANIMALPOUND_DOGS", + "id": "GROUP_ANIMALPOUND_DOGS", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_dog", "weight": 250, "cost_multiplier": 0 }, @@ -36,7 +36,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "animalpound" ], - "weight": 400, "object": { "fill_ter": "t_floor", "rows": [ @@ -158,7 +157,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "animalpound_roof" ], - "weight": 400, "object": { "fill_ter": "t_tar_flat_roof", "rows": [ diff --git a/data/json/mapgen/animalshelter.json b/data/json/mapgen/animalshelter.json index 8cc4a1d07430e..72be7e0b323ef 100644 --- a/data/json/mapgen/animalshelter.json +++ b/data/json/mapgen/animalshelter.json @@ -78,7 +78,7 @@ ] }, { - "name": "GROUP_ANIMALSHELTER_DOGS", + "id": "GROUP_ANIMALSHELTER_DOGS", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_dog", "weight": 200, "cost_multiplier": 0 }, @@ -87,7 +87,7 @@ ] }, { - "name": "GROUP_ANIMALSHELTER_OTHER", + "id": "GROUP_ANIMALSHELTER_OTHER", "type": "monstergroup", "monsters": [ { "monster": "mon_null", "weight": 5 }, @@ -377,7 +377,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "animalshelter_roof" ], - "weight": 300, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/antique_store.json b/data/json/mapgen/antique_store.json index a5cf17f7c0ddb..6ea1b3cf95d5f 100644 --- a/data/json/mapgen/antique_store.json +++ b/data/json/mapgen/antique_store.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_antique" ], - "weight": 500, "object": { "fill_ter": "t_floor", "rows": [ @@ -62,7 +61,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_antique_roof" ], - "weight": 500, "object": { "fill_ter": "t_tar_flat_roof", "rows": [ diff --git a/data/json/mapgen/apartment_con_new.json b/data/json/mapgen/apartment_con_new.json index d83e304fdcdb5..af4e3ee297201 100644 --- a/data/json/mapgen/apartment_con_new.json +++ b/data/json/mapgen/apartment_con_new.json @@ -104,7 +104,6 @@ "method": "json", "om_terrain": [ [ "apartments_con_tower_113", "apartments_con_tower_013" ] ], "//": "Levels 2 and 4", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/arcade.json b/data/json/mapgen/arcade.json index b3c8550ef08b9..35e857c2e255f 100644 --- a/data/json/mapgen/arcade.json +++ b/data/json/mapgen/arcade.json @@ -1,6 +1,6 @@ [ { - "name": "GROUP_ARCADE", + "id": "GROUP_ARCADE", "type": "monstergroup", "monsters": [ { "monster": "mon_null", "weight": 400 }, { "monster": "mon_zombie_child", "weight": 600, "pack_size": [ 2, 5 ] } ] }, @@ -8,7 +8,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_arcade" ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -65,7 +64,6 @@ "type": "mapgen", "method": "json", "om_terrain": "s_arcade_roof", - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/art_gallery.json b/data/json/mapgen/art_gallery.json index 02bbbb31a4fa3..13be24858c07b 100644 --- a/data/json/mapgen/art_gallery.json +++ b/data/json/mapgen/art_gallery.json @@ -152,7 +152,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "art_gallery_roof" ], - "weight": 250, "object": { "fill_ter": "t_tile_flat_roof", "rows": [ diff --git a/data/json/mapgen/bakery.json b/data/json/mapgen/bakery.json index ef003b2ae1f80..f0559ca7eee3c 100644 --- a/data/json/mapgen/bakery.json +++ b/data/json/mapgen/bakery.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "bakery" ], - "weight": 100, "object": { "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, "rows": [ @@ -124,7 +123,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "bakery_roof" ], - "weight": 300, "object": { "fill_ter": "t_floor", "rows": [ @@ -178,7 +176,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "bakery_upper_roof" ], - "weight": 300, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/bank.json b/data/json/mapgen/bank.json index ac8dde0982115..c03f3cad8697c 100644 --- a/data/json/mapgen/bank.json +++ b/data/json/mapgen/bank.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "bank" ], - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -126,7 +125,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "bank_1" ], - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/basement/basement_bionic.json b/data/json/mapgen/basement/basement_bionic.json index cf487bc099305..f237c87a7a926 100644 --- a/data/json/mapgen/basement/basement_bionic.json +++ b/data/json/mapgen/basement/basement_bionic.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "basement_bionic_decoy" ], - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/basement/basement_messed.json b/data/json/mapgen/basement/basement_messed.json index 913ccf3bfaed3..80d3c65953b40 100644 --- a/data/json/mapgen/basement/basement_messed.json +++ b/data/json/mapgen/basement/basement_messed.json @@ -4,7 +4,6 @@ "method": "json", "om_terrain": "basement_messed", "//": "used for house_crack1, house_crack2", - "weight": 250, "object": { "fill_ter": "t_soil", "rows": [ diff --git a/data/json/mapgen/boxing.json b/data/json/mapgen/boxing.json index fb182193143e3..f56850f4637dd 100644 --- a/data/json/mapgen/boxing.json +++ b/data/json/mapgen/boxing.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "gym" ], - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -85,7 +84,6 @@ "type": "mapgen", "method": "json", "om_terrain": "gym_roof", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ @@ -150,7 +148,6 @@ "type": "mapgen", "method": "json", "om_terrain": "gym_upper_roof", - "weight": 200, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/bugs/beehive.json b/data/json/mapgen/bugs/beehive.json index 9104145e0e94f..a25ee9a5514ca 100644 --- a/data/json/mapgen/bugs/beehive.json +++ b/data/json/mapgen/bugs/beehive.json @@ -2,7 +2,6 @@ { "type": "mapgen", "method": "json", - "weight": 100, "om_terrain": [ [ "hive_edge_00", "hive_edge_10", "hive_edge_20" ], [ "hive_edge_01", "hive", "hive_edge_21" ], diff --git a/data/json/mapgen/bugs/graboid_field.json b/data/json/mapgen/bugs/graboid_field.json index 7127617170a8e..19cb321e298e6 100644 --- a/data/json/mapgen/bugs/graboid_field.json +++ b/data/json/mapgen/bugs/graboid_field.json @@ -2,7 +2,6 @@ { "om_terrain": "field_graboid", "type": "mapgen", - "weight": 100, "method": "json", "object": { "predecessor_mapgen": "field", diff --git a/data/json/mapgen/bugs/spider_pit.json b/data/json/mapgen/bugs/spider_pit.json index 8daf6abb9c6ff..c0cf7c60799a6 100644 --- a/data/json/mapgen/bugs/spider_pit.json +++ b/data/json/mapgen/bugs/spider_pit.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "spider_pit" ], - "weight": 250, "object": { "predecessor_mapgen": "forest", "rows": [ @@ -46,7 +45,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "spider_pit_under" ], - "weight": 250, "object": { "rows": [ "########################", diff --git a/data/json/mapgen/bugs/wasp_tower.json b/data/json/mapgen/bugs/wasp_tower.json index fdf02f4f70c93..102173c274180 100644 --- a/data/json/mapgen/bugs/wasp_tower.json +++ b/data/json/mapgen/bugs/wasp_tower.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "wasp_tower" ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -43,7 +42,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "wasp_tower_1" ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/butcher.json b/data/json/mapgen/butcher.json index 9341920a279ee..31dcdf5a3ce2d 100644 --- a/data/json/mapgen/butcher.json +++ b/data/json/mapgen/butcher.json @@ -96,7 +96,6 @@ "type": "mapgen", "method": "json", "om_terrain": "s_butcher_roof", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ @@ -281,7 +280,6 @@ "type": "mapgen", "method": "json", "om_terrain": "s_butcher_roof_1", - "weight": 200, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -466,7 +464,6 @@ "type": "mapgen", "method": "json", "om_terrain": "s_butcher_roof_2", - "weight": 200, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/cabin.json b/data/json/mapgen/cabin.json index 49f64dd98b7c9..4d957f13f41c5 100644 --- a/data/json/mapgen/cabin.json +++ b/data/json/mapgen/cabin.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "cabin" ], - "weight": 500, "object": { "fill_ter": "t_floor", "rows": [ @@ -77,7 +76,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "cabin_1" ], - "weight": 500, "object": { "fill_ter": "t_floor", "rows": [ @@ -166,7 +164,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "cabin_2" ], - "weight": 333, "object": { "fill_ter": "t_floor", "rows": [ @@ -242,7 +239,6 @@ "method": "json", "om_terrain": "cabin_3", "type": "mapgen", - "weight": 350, "object": { "fill_ter": "t_floor", "rows": [ @@ -315,7 +311,6 @@ "method": "json", "om_terrain": "cabin_4", "type": "mapgen", - "weight": 350, "object": { "fill_ter": "t_floor", "rows": [ @@ -388,7 +383,6 @@ "method": "json", "om_terrain": "cabin_5", "type": "mapgen", - "weight": 350, "object": { "fill_ter": "t_floor", "rows": [ @@ -460,7 +454,6 @@ "method": "json", "om_terrain": "cabin_6", "type": "mapgen", - "weight": 350, "object": { "fill_ter": "t_floor", "rows": [ @@ -532,7 +525,6 @@ "method": "json", "om_terrain": "cabin_7", "type": "mapgen", - "weight": 350, "object": { "fill_ter": "t_floor", "rows": [ @@ -606,7 +598,6 @@ "method": "json", "om_terrain": [ "cabin_strange" ], "//": "Strange Cabin", - "weight": 300, "object": { "fill_ter": "t_floor", "rows": [ @@ -681,7 +672,6 @@ "method": "json", "om_terrain": [ "cabin_strange_b" ], "//": "Strange Cabin (basement)", - "weight": 300, "object": { "fill_ter": "t_rock_floor", "rows": [ @@ -780,7 +770,6 @@ "method": "json", "om_terrain": "cabin_lapin", "type": "mapgen", - "weight": 150, "object": { "fill_ter": "t_floor", "rows": [ @@ -856,7 +845,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "cabin_prepper" ], - "weight": 330, "object": { "fill_ter": "t_floor", "rows": [ @@ -912,7 +900,6 @@ "om_terrain": [ "cabin_prepper_shelter" ], "//": "A lmoe shelter replica refitted for the cabin's dug-out basement.", "//2": "This particular 4-bed shelter is definitely homemade, mostly carved out of bare rock, and seems to be incomplete.", - "weight": 100, "object": { "fill_ter": "t_dirt_underground", "rows": [ diff --git a/data/json/mapgen/campsite.json b/data/json/mapgen/campsite.json index aa31d2acd8661..967f02c547300 100644 --- a/data/json/mapgen/campsite.json +++ b/data/json/mapgen/campsite.json @@ -1,6 +1,6 @@ [ { - "name": "CAMPERS", + "id": "CAMPERS", "type": "monstergroup", "monsters": [ { "monster": "mon_null", "weight": 500 }, diff --git a/data/json/mapgen/campus/buildings/admin_f0.json b/data/json/mapgen/campus/buildings/admin_f0.json index aa7500d3c314f..998e30781ceaa 100644 --- a/data/json/mapgen/campus/buildings/admin_f0.json +++ b/data/json/mapgen/campus/buildings/admin_f0.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "campus_admin_0_0_0" ], [ "campus_admin_0_1_0" ], [ "campus_admin_0_2_0" ] ], - "weight": 250, "object": { "fill_ter": "t_dirt", "rows": [ diff --git a/data/json/mapgen/campus/buildings/admin_f1.json b/data/json/mapgen/campus/buildings/admin_f1.json index 567db52e6af0c..06d6bbf1c1ba0 100644 --- a/data/json/mapgen/campus/buildings/admin_f1.json +++ b/data/json/mapgen/campus/buildings/admin_f1.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "campus_admin_0_0_1" ], [ "campus_admin_0_1_1" ], [ "campus_admin_0_2_1" ] ], - "weight": 250, "object": { "fill_ter": "t_open_air", "rows": [ diff --git a/data/json/mapgen/campus/buildings/admin_f2.json b/data/json/mapgen/campus/buildings/admin_f2.json index 9d64c86d8182a..61ba3f91ed123 100644 --- a/data/json/mapgen/campus/buildings/admin_f2.json +++ b/data/json/mapgen/campus/buildings/admin_f2.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "campus_admin_0_0_2" ], [ "campus_admin_0_1_2" ], [ "campus_admin_0_2_2" ] ], - "weight": 250, "object": { "fill_ter": "t_open_air", "rows": [ diff --git a/data/json/mapgen/campus/buildings/admin_roof.json b/data/json/mapgen/campus/buildings/admin_roof.json index 9dc51880a1f0e..97a30bcee5352 100644 --- a/data/json/mapgen/campus/buildings/admin_roof.json +++ b/data/json/mapgen/campus/buildings/admin_roof.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "campus_admin_0_0_3" ], [ "campus_admin_0_1_3" ], [ "campus_admin_0_2_3" ] ], - "weight": 250, "object": { "fill_ter": "t_open_air", "rows": [ diff --git a/data/json/mapgen/campus/buildings/commons_f0.json b/data/json/mapgen/campus/buildings/commons_f0.json index 11872ba2da05c..2a9abc959c4d3 100644 --- a/data/json/mapgen/campus/buildings/commons_f0.json +++ b/data/json/mapgen/campus/buildings/commons_f0.json @@ -8,7 +8,6 @@ [ "campus_commons_0_2_0", "campus_commons_1_2_0" ], [ "campus_commons_0_3_0", "campus_commons_1_3_0" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/campus/buildings/commons_f1.json b/data/json/mapgen/campus/buildings/commons_f1.json index f6d73a6b55782..96c91f15a6add 100644 --- a/data/json/mapgen/campus/buildings/commons_f1.json +++ b/data/json/mapgen/campus/buildings/commons_f1.json @@ -8,7 +8,6 @@ [ "campus_commons_0_2_1", "campus_commons_1_2_1" ], [ "campus_commons_0_3_1", "campus_commons_1_3_1" ] ], - "weight": 250, "object": { "fill_ter": "t_open_air", "rows": [ diff --git a/data/json/mapgen/campus/buildings/commons_f2.json b/data/json/mapgen/campus/buildings/commons_f2.json index 8e122c0505cac..152bcdfc23dce 100644 --- a/data/json/mapgen/campus/buildings/commons_f2.json +++ b/data/json/mapgen/campus/buildings/commons_f2.json @@ -8,7 +8,6 @@ [ "campus_commons_0_2_2", "campus_commons_1_2_2" ], [ "campus_commons_0_3_2", "campus_commons_1_3_2" ] ], - "weight": 250, "object": { "fill_ter": "t_open_air", "rows": [ diff --git a/data/json/mapgen/campus/buildings/commons_roof.json b/data/json/mapgen/campus/buildings/commons_roof.json index 0df36eb436bff..f15ea77d50057 100644 --- a/data/json/mapgen/campus/buildings/commons_roof.json +++ b/data/json/mapgen/campus/buildings/commons_roof.json @@ -8,7 +8,6 @@ [ "campus_commons_0_2_3", "campus_commons_1_2_3" ], [ "campus_commons_0_3_3", "campus_commons_1_3_3" ] ], - "weight": 250, "object": { "fill_ter": "t_open_air", "rows": [ diff --git a/data/json/mapgen/campus/buildings/health_f0.json b/data/json/mapgen/campus/buildings/health_f0.json index 6c74e8b3263c6..b134ec5ddccd2 100644 --- a/data/json/mapgen/campus/buildings/health_f0.json +++ b/data/json/mapgen/campus/buildings/health_f0.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "campus_health_0_0_0" ], [ "campus_health_0_1_0" ], [ "campus_health_0_2_0" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/campus/buildings/health_f1.json b/data/json/mapgen/campus/buildings/health_f1.json index 8576cc41cc5e2..5816deff7b7ed 100644 --- a/data/json/mapgen/campus/buildings/health_f1.json +++ b/data/json/mapgen/campus/buildings/health_f1.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "campus_health_0_0_1" ], [ "campus_health_0_1_1" ], [ "campus_health_0_2_1" ] ], - "weight": 250, "object": { "fill_ter": "t_open_air", "rows": [ diff --git a/data/json/mapgen/campus/buildings/health_f2.json b/data/json/mapgen/campus/buildings/health_f2.json index 6973d8b5d4117..fee1aba93f207 100644 --- a/data/json/mapgen/campus/buildings/health_f2.json +++ b/data/json/mapgen/campus/buildings/health_f2.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "campus_health_0_0_2" ], [ "campus_health_0_1_2" ], [ "campus_health_0_2_2" ] ], - "weight": 250, "object": { "fill_ter": "t_open_air", "rows": [ diff --git a/data/json/mapgen/campus/buildings/health_roof.json b/data/json/mapgen/campus/buildings/health_roof.json index 5ebf9979dc775..b96dd29dab4f6 100644 --- a/data/json/mapgen/campus/buildings/health_roof.json +++ b/data/json/mapgen/campus/buildings/health_roof.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "campus_health_0_0_3" ], [ "campus_health_0_1_3" ], [ "campus_health_0_2_3" ] ], - "weight": 250, "object": { "fill_ter": "t_open_air", "rows": [ diff --git a/data/json/mapgen/campus/buildings/lecture_f0.json b/data/json/mapgen/campus/buildings/lecture_f0.json index 99c91eda895e0..4474ebffe47da 100644 --- a/data/json/mapgen/campus/buildings/lecture_f0.json +++ b/data/json/mapgen/campus/buildings/lecture_f0.json @@ -3,7 +3,6 @@ "type": "mapgen", "om_terrain": [ [ "campus_lecture_0_0_0" ], [ "campus_lecture_0_1_0" ], [ "campus_lecture_0_2_0" ], [ "campus_lecture_0_3_0" ] ], "method": "json", - "weight": 250, "object": { "fill_ter": "t_open_air", "rows": [ diff --git a/data/json/mapgen/campus/buildings/lecture_f1.json b/data/json/mapgen/campus/buildings/lecture_f1.json index d196ccfc382e9..66b1cb8a3e18b 100644 --- a/data/json/mapgen/campus/buildings/lecture_f1.json +++ b/data/json/mapgen/campus/buildings/lecture_f1.json @@ -3,7 +3,6 @@ "type": "mapgen", "om_terrain": [ [ "campus_lecture_0_0_1" ], [ "campus_lecture_0_1_1" ], [ "campus_lecture_0_2_1" ], [ "campus_lecture_0_3_1" ] ], "method": "json", - "weight": 250, "object": { "fill_ter": "t_open_air", "rows": [ diff --git a/data/json/mapgen/campus/buildings/lecture_f2.json b/data/json/mapgen/campus/buildings/lecture_f2.json index 891348d4063d1..ee2cb5ac8e9b8 100644 --- a/data/json/mapgen/campus/buildings/lecture_f2.json +++ b/data/json/mapgen/campus/buildings/lecture_f2.json @@ -3,7 +3,6 @@ "type": "mapgen", "om_terrain": [ [ "campus_lecture_0_0_2" ], [ "campus_lecture_0_1_2" ], [ "campus_lecture_0_2_2" ], [ "campus_lecture_0_3_2" ] ], "method": "json", - "weight": 250, "object": { "fill_ter": "t_open_air", "rows": [ diff --git a/data/json/mapgen/campus/buildings/lecture_roof.json b/data/json/mapgen/campus/buildings/lecture_roof.json index 05c8f239eaa46..4a56b32c4a583 100644 --- a/data/json/mapgen/campus/buildings/lecture_roof.json +++ b/data/json/mapgen/campus/buildings/lecture_roof.json @@ -3,7 +3,6 @@ "type": "mapgen", "om_terrain": [ [ "campus_lecture_0_0_3" ], [ "campus_lecture_0_1_3" ], [ "campus_lecture_0_2_3" ], [ "campus_lecture_0_3_3" ] ], "method": "json", - "weight": 250, "object": { "fill_ter": "t_open_air", "rows": [ diff --git a/data/json/mapgen/campus/buildings/media_f0.json b/data/json/mapgen/campus/buildings/media_f0.json index 994bd2b8982d3..86f125f286026 100644 --- a/data/json/mapgen/campus/buildings/media_f0.json +++ b/data/json/mapgen/campus/buildings/media_f0.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "campus_media_0_0_0", "campus_media_1_0_0" ], [ "campus_media_0_1_0", "campus_media_1_1_0" ] ], - "weight": 250, "object": { "fill_ter": "t_open_air", "rows": [ diff --git a/data/json/mapgen/campus/buildings/media_f1.json b/data/json/mapgen/campus/buildings/media_f1.json index 5ff2a19d03b0c..af9322324cfdb 100644 --- a/data/json/mapgen/campus/buildings/media_f1.json +++ b/data/json/mapgen/campus/buildings/media_f1.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "campus_media_0_0_1", "campus_media_1_0_1" ], [ "campus_media_0_1_1", "campus_media_1_1_1" ] ], - "weight": 250, "object": { "fill_ter": "t_open_air", "rows": [ diff --git a/data/json/mapgen/campus/buildings/media_f2.json b/data/json/mapgen/campus/buildings/media_f2.json index b83ffce85b9ef..8cd217269fa42 100644 --- a/data/json/mapgen/campus/buildings/media_f2.json +++ b/data/json/mapgen/campus/buildings/media_f2.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "campus_media_0_0_2", "campus_media_1_0_2" ], [ "campus_media_0_1_2", "campus_media_1_1_2" ] ], - "weight": 250, "object": { "fill_ter": "t_open_air", "rows": [ diff --git a/data/json/mapgen/campus/buildings/media_f3.json b/data/json/mapgen/campus/buildings/media_f3.json index e5f1a674aa1d7..fa36e61af6127 100644 --- a/data/json/mapgen/campus/buildings/media_f3.json +++ b/data/json/mapgen/campus/buildings/media_f3.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "campus_media_0_0_3", "campus_media_1_0_3" ], [ "campus_media_0_1_3", "campus_media_1_1_3" ] ], - "weight": 250, "object": { "fill_ter": "t_open_air", "rows": [ diff --git a/data/json/mapgen/campus/buildings/media_roof.json b/data/json/mapgen/campus/buildings/media_roof.json index e6f83567106d7..daed30abc3929 100644 --- a/data/json/mapgen/campus/buildings/media_roof.json +++ b/data/json/mapgen/campus/buildings/media_roof.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "campus_media_0_0_4", "campus_media_1_0_4" ], [ "campus_media_0_1_4", "campus_media_1_1_4" ] ], - "weight": 250, "object": { "fill_ter": "t_open_air", "rows": [ diff --git a/data/json/mapgen/campus/open_areas/pedestrian_center.json b/data/json/mapgen/campus/open_areas/pedestrian_center.json index de775472c3a4d..4919bb523b88f 100644 --- a/data/json/mapgen/campus/open_areas/pedestrian_center.json +++ b/data/json/mapgen/campus/open_areas/pedestrian_center.json @@ -6,7 +6,6 @@ [ "pedestrian_11_5_0", "pedestrian_12_5_0", "pedestrian_13_5_0", "pedestrian_14_5_0" ], [ "pedestrian_11_6_0", "pedestrian_12_6_0", "pedestrian_13_6_0", "pedestrian_14_6_0" ] ], - "weight": 250, "object": { "fill_ter": "t_dirt", "rows": [ @@ -71,7 +70,6 @@ [ "pedestrian_11_7_0", "pedestrian_12_7_0", "pedestrian_13_7_0" ], [ "pedestrian_11_8_0", "pedestrian_12_8_0", "pedestrian_13_8_0" ] ], - "weight": 250, "object": { "fill_ter": "t_dirt", "rows": [ @@ -133,7 +131,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "pedestrian_12_9_0", "pedestrian_13_9_0" ] ], - "weight": 250, "object": { "fill_ter": "t_dirt", "rows": [ diff --git a/data/json/mapgen/campus/open_areas/pedestrian_westside.json b/data/json/mapgen/campus/open_areas/pedestrian_westside.json index 8ec33c5c47447..628a2100071cf 100644 --- a/data/json/mapgen/campus/open_areas/pedestrian_westside.json +++ b/data/json/mapgen/campus/open_areas/pedestrian_westside.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "pedestrian_9_8", "pedestrian_10_8" ] ], - "weight": 250, "object": { "fill_ter": "t_concrete", "rows": [ @@ -41,7 +40,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "pedestrian_9_11", "pedestrian_10_11" ] ], - "weight": 250, "object": { "fill_ter": "t_concrete", "rows": [ diff --git a/data/json/mapgen/cathedral.json b/data/json/mapgen/cathedral.json index ca77d0f559253..fbdd76b848718 100644 --- a/data/json/mapgen/cathedral.json +++ b/data/json/mapgen/cathedral.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "cathedral_b_NW", "cathedral_b_NE" ], [ "cathedral_b_SW", "cathedral_b_SE" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -78,7 +77,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "cathedral_1_NW", "cathedral_1_NE" ], [ "cathedral_1_SW", "cathedral_1_SE" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -161,7 +159,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "cathedral_2_NW", "cathedral_2_NE" ], [ "cathedral_2_SW", "cathedral_2_SE" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -236,7 +233,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "cathedral_3_NW", "cathedral_3_NE" ], [ "cathedral_3_SW", "cathedral_3_SE" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -321,7 +317,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "cathedral_4_NW", "cathedral_4_NE" ], [ "cathedral_5_NW", "cathedral_5_NE" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -382,7 +377,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "cathedral_6_NW", "cathedral_6_NE" ], [ "cathedral_7_NW", "cathedral_7_NE" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/cemetery_4square.json b/data/json/mapgen/cemetery_4square.json index 5b210d9b8007f..0866139fbf713 100644 --- a/data/json/mapgen/cemetery_4square.json +++ b/data/json/mapgen/cemetery_4square.json @@ -43,7 +43,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "cemetery_4square_00", "cemetery_4square_10" ], [ "cemetery_4square_01", "cemetery_4square_11" ] ], - "weight": 100, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -147,7 +146,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "cemetery_4square_11_roof" ], - "weight": 100, "object": { "rows": [ " ", diff --git a/data/json/mapgen/cemetery_medium.json b/data/json/mapgen/cemetery_medium.json index 7ca812a4043a8..357df188c79f1 100644 --- a/data/json/mapgen/cemetery_medium.json +++ b/data/json/mapgen/cemetery_medium.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "Cemetery_1a", "Cemetery_1b" ] ], - "weight": 100, "object": { "fill_ter": "t_region_groundcover_urban", "rows": [ @@ -83,7 +82,6 @@ "type": "mapgen", "method": "json", "om_terrain": "Cemetery_1a_roof", - "weight": 100, "object": { "rows": [ " ", diff --git a/data/json/mapgen/church.json b/data/json/mapgen/church.json index 91fc1599e2dd1..f884f8c9c2ea5 100644 --- a/data/json/mapgen/church.json +++ b/data/json/mapgen/church.json @@ -189,7 +189,6 @@ "method": "json", "om_terrain": [ "church_1" ], "//": "Gothic Church", - "weight": 1000, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/city_blocks/city_block_2.json b/data/json/mapgen/city_blocks/city_block_2.json index 76a063eaad848..3307c899045f6 100644 --- a/data/json/mapgen/city_blocks/city_block_2.json +++ b/data/json/mapgen/city_blocks/city_block_2.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "city_block2_1", "city_block2_2", "city_block2_3", "city_block2_4" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -76,7 +75,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "city_block2_flr2_1", "city_block2_flr2_2", "city_block2_flr2_3", "city_block2_flr2_4" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/city_blocks/urban_13_dense_house_apt_house.json b/data/json/mapgen/city_blocks/urban_13_dense_house_apt_house.json index 9492cc6b1048b..66e7768996806 100644 --- a/data/json/mapgen/city_blocks/urban_13_dense_house_apt_house.json +++ b/data/json/mapgen/city_blocks/urban_13_dense_house_apt_house.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": [ [ "urban_13_2", "urban_13_1" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -70,7 +69,6 @@ "method": "json", "om_terrain": [ [ "urban_13_3", "urban_13_4" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -167,7 +165,6 @@ "method": "json", "om_terrain": [ [ "urban_13_5", "urban_13_6" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -225,7 +222,6 @@ "method": "json", "om_terrain": [ [ "urban_13_7", "urban_13_8" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -303,7 +299,6 @@ "method": "json", "om_terrain": [ [ "urban_13_9", "urban_13_10" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": { "param": "carpet_color_type", "fallback": "t_carpet_concrete_green" }, "rows": [ @@ -381,7 +376,6 @@ "method": "json", "om_terrain": [ [ "urban_13_11", "urban_13_12" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/city_blocks/urban_14_dense_house_mart_food.json b/data/json/mapgen/city_blocks/urban_14_dense_house_mart_food.json index b84be0a31b2eb..95ec643c51624 100644 --- a/data/json/mapgen/city_blocks/urban_14_dense_house_mart_food.json +++ b/data/json/mapgen/city_blocks/urban_14_dense_house_mart_food.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": [ [ "urban_14_1", "urban_14_2" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -73,7 +72,6 @@ "method": "json", "om_terrain": [ [ "urban_14_3", "urban_14_4" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_white" }, "rows": [ @@ -180,7 +178,6 @@ "method": "json", "om_terrain": [ [ "urban_14_5", "urban_14_6" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -251,7 +248,6 @@ "method": "json", "om_terrain": [ [ "urban_14_7", "urban_14_8" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -324,7 +320,6 @@ "method": "json", "om_terrain": [ [ "urban_14_9", "urban_14_10" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -395,7 +390,6 @@ "method": "json", "om_terrain": [ [ "urban_14_11", "urban_14_12" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -441,7 +435,6 @@ "method": "json", "om_terrain": [ [ "urban_14_13", "urban_14_14" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/city_blocks/urban_25_dense_diner_apt.json b/data/json/mapgen/city_blocks/urban_25_dense_diner_apt.json index 1e11880a1a3e5..0554cd3877966 100644 --- a/data/json/mapgen/city_blocks/urban_25_dense_diner_apt.json +++ b/data/json/mapgen/city_blocks/urban_25_dense_diner_apt.json @@ -109,15 +109,13 @@ ] }, "om_terrain": [ [ "urban_25_1", "urban_25_2" ] ], - "type": "mapgen", - "weight": 250 + "type": "mapgen" }, { "method": "json", "om_terrain": [ [ "urban_25_3" ] ], "//": "diner side", "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -159,7 +157,6 @@ "om_terrain": [ [ "urban_25_4" ] ], "type": "mapgen", "//": "apartment side", - "weight": 250, "object": { "fill_ter": "t_floor", "//": "apartment side", @@ -226,7 +223,6 @@ "method": "json", "om_terrain": [ [ "urban_25_5", "urban_25_6" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -342,14 +338,12 @@ ] }, "om_terrain": [ [ "urban_25_7", "urban_25_8" ] ], - "type": "mapgen", - "weight": 250 + "type": "mapgen" }, { "method": "json", "om_terrain": [ [ "urban_25_9", "urban_25_10" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -390,7 +384,6 @@ "method": "json", "om_terrain": "urban_25_12", "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/collapsed_tower.json b/data/json/mapgen/collapsed_tower.json index cc5ab448f4e4e..26deacec3ef04 100644 --- a/data/json/mapgen/collapsed_tower.json +++ b/data/json/mapgen/collapsed_tower.json @@ -1,6 +1,6 @@ [ { - "name": "GROUP_COLLAPSED_TOWER", + "id": "GROUP_COLLAPSED_TOWER", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie", "weight": 600 }, @@ -11,7 +11,7 @@ ] }, { - "name": "GROUP_COLLAPSED_TOWER_BASEMENT", + "id": "GROUP_COLLAPSED_TOWER_BASEMENT", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_gasbag_immobile", "weight": 650 }, @@ -29,7 +29,6 @@ [ "office_tower_collapse_a0", "office_tower_collapse_a1", "office_tower_collapse_a2" ], [ "office_tower_collapse_b0", "office_tower_collapse_b1", "office_tower_collapse_b2" ] ], - "weight": 300, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -114,7 +113,6 @@ [ "office_tower_collapse_b_a0", "office_tower_collapse_b_a1", "office_tower_collapse_b_a2" ], [ "office_tower_collapse_b_b0", "office_tower_collapse_b_b1", "office_tower_collapse_b_b2" ] ], - "weight": 300, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/cs_car_dealership.json b/data/json/mapgen/cs_car_dealership.json index ca5ee9ccb29fe..227115faadf71 100644 --- a/data/json/mapgen/cs_car_dealership.json +++ b/data/json/mapgen/cs_car_dealership.json @@ -3,7 +3,6 @@ "type": "mapgen", "om_terrain": [ "cs_car_dealership" ], "method": "json", - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/cs_car_showroom.json b/data/json/mapgen/cs_car_showroom.json index a4360c6b8a9c3..48a320e431b28 100644 --- a/data/json/mapgen/cs_car_showroom.json +++ b/data/json/mapgen/cs_car_showroom.json @@ -3,7 +3,6 @@ "type": "mapgen", "om_terrain": [ "cs_car_showroom" ], "method": "json", - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/cs_city_dump_small.json b/data/json/mapgen/cs_city_dump_small.json index 4646db028720b..93f6e2ae0dced 100644 --- a/data/json/mapgen/cs_city_dump_small.json +++ b/data/json/mapgen/cs_city_dump_small.json @@ -17,7 +17,6 @@ "type": "mapgen", "om_terrain": [ "cs_city_dump_small" ], "method": "json", - "weight": 1000, "object": { "fill_ter": "t_region_soil", "rows": [ diff --git a/data/json/mapgen/cs_gardening_allotment.json b/data/json/mapgen/cs_gardening_allotment.json index 20e3fd1de8292..ff085cf6b953c 100644 --- a/data/json/mapgen/cs_gardening_allotment.json +++ b/data/json/mapgen/cs_gardening_allotment.json @@ -20,7 +20,6 @@ "type": "mapgen", "om_terrain": [ "cs_gardening_allotment" ], "method": "json", - "weight": 1000, "object": { "fill_ter": "t_region_soil", "rows": [ diff --git a/data/json/mapgen/cs_internet_cafe.json b/data/json/mapgen/cs_internet_cafe.json index f9764159adf75..63c5789d9fa00 100644 --- a/data/json/mapgen/cs_internet_cafe.json +++ b/data/json/mapgen/cs_internet_cafe.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "cs_internet_cafe" ], - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/cs_open_sewer_small.json b/data/json/mapgen/cs_open_sewer_small.json index 084916d86914e..c04390dab2bce 100644 --- a/data/json/mapgen/cs_open_sewer_small.json +++ b/data/json/mapgen/cs_open_sewer_small.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_ZOMBIE_SEWER", + "id": "GROUP_ZOMBIE_SEWER", "monsters": [ { "monster": "mon_zombie_technician", "weight": 850, "cost_multiplier": 3 }, { "monster": "mon_zombie_static", "weight": 150, "cost_multiplier": 5 } @@ -52,7 +52,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "cs_open_sewer" ], - "weight": 1000, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -120,7 +119,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "cs_open_sewer_roof" ], - "weight": 1000, "object": { "fill_ter": "t_open_air", "rows": [ @@ -156,7 +154,6 @@ "type": "mapgen", "method": "json", "om_terrain": "cs_open_sewer_undergound", - "weight": 1000, "object": { "rows": [ "#########o~~~~o#########", diff --git a/data/json/mapgen/cs_public_art_piece.json b/data/json/mapgen/cs_public_art_piece.json index cf10074314c33..a0c6426d9b3eb 100644 --- a/data/json/mapgen/cs_public_art_piece.json +++ b/data/json/mapgen/cs_public_art_piece.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "cs_public_art_piece" ], - "weight": 1000, "object": { "fill_ter": "t_region_groundcover_urban", "rows": [ diff --git a/data/json/mapgen/cs_public_space.json b/data/json/mapgen/cs_public_space.json index a972bb1d5880e..012b703abfcab 100644 --- a/data/json/mapgen/cs_public_space.json +++ b/data/json/mapgen/cs_public_space.json @@ -3,7 +3,6 @@ "type": "mapgen", "om_terrain": [ "cs_public_space" ], "method": "json", - "weight": 1000, "object": { "fill_ter": "t_sidewalk", "rows": [ diff --git a/data/json/mapgen/cs_tire_shop.json b/data/json/mapgen/cs_tire_shop.json index 90bb401bdc265..0c51a4d67b4fe 100644 --- a/data/json/mapgen/cs_tire_shop.json +++ b/data/json/mapgen/cs_tire_shop.json @@ -3,7 +3,6 @@ "type": "mapgen", "om_terrain": [ "cs_tire_shop" ], "method": "json", - "weight": 1000, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/daycare.json b/data/json/mapgen/daycare.json index 3ae55da98dfb2..9489a1f2e78b4 100644 --- a/data/json/mapgen/daycare.json +++ b/data/json/mapgen/daycare.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_daycare" ], - "weight": 500, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/diner.json b/data/json/mapgen/diner.json index ff266ead017f2..d4f08f914ba95 100644 --- a/data/json/mapgen/diner.json +++ b/data/json/mapgen/diner.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_restaurant_3" ], - "weight": 300, "object": { "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_white" }, "rows": [ @@ -74,7 +73,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_restaurant_roof_3" ], - "weight": 300, "object": { "fill_ter": "t_tar_flat_roof", "rows": [ diff --git a/data/json/mapgen/dojo.json b/data/json/mapgen/dojo.json index 5f2d0e40232bd..dc6f5a2c0299a 100644 --- a/data/json/mapgen/dojo.json +++ b/data/json/mapgen/dojo.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "dojo" ], - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -167,7 +166,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "dojo_1" ], - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/dollar_store.json b/data/json/mapgen/dollar_store.json index 1194b51bacb5b..eeac4b64a8970 100644 --- a/data/json/mapgen/dollar_store.json +++ b/data/json/mapgen/dollar_store.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "dollarstore", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -153,7 +152,6 @@ "method": "json", "om_terrain": "dollarstore_1", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/drive-in_theater.json b/data/json/mapgen/drive-in_theater.json index 706b7001b2e5a..136dd1e7a6516 100644 --- a/data/json/mapgen/drive-in_theater.json +++ b/data/json/mapgen/drive-in_theater.json @@ -2,7 +2,6 @@ { "method": "json", "type": "mapgen", - "weight": 100, "om_terrain": [ [ "car_theater_0_0_1", "car_theater_1_0_1", "car_theater_2_0_1" ] ], "object": { "rows": [ @@ -37,7 +36,6 @@ { "method": "json", "type": "mapgen", - "weight": 100, "om_terrain": [ [ "car_theater_0_0_2", "car_theater_1_0_2", "car_theater_2_0_2" ] ], "object": { "rows": [ @@ -72,7 +70,6 @@ { "method": "json", "type": "mapgen", - "weight": 100, "om_terrain": [ [ "car_theater_0_0", "car_theater_1_0", "car_theater_2_0", "car_theater_3_0", "null" ], [ "car_theater_0_1", "car_theater_1_1", "car_theater_2_1", "car_theater_3_1", "car_theater_4_1" ], @@ -174,7 +171,6 @@ { "method": "json", "type": "mapgen", - "weight": 100, "om_terrain": [ "car_theater_1_2_1" ], "object": { "fill_ter": "t_linoleum_white", @@ -216,7 +212,6 @@ { "method": "json", "type": "mapgen", - "weight": 100, "om_terrain": [ "car_theater_1_2_2" ], "object": { "fill_ter": "t_flat_roof", @@ -252,7 +247,6 @@ { "method": "json", "type": "mapgen", - "weight": 100, "om_terrain": [ [ "car_theater_3_1_1" ], [ "car_theater_3_2_1" ] ], "object": { "fill_ter": "t_shingle_flat_roof", diff --git a/data/json/mapgen/dumpsite.json b/data/json/mapgen/dumpsite.json index 35958f77a4cdd..351d3f0bc2f37 100644 --- a/data/json/mapgen/dumpsite.json +++ b/data/json/mapgen/dumpsite.json @@ -71,7 +71,6 @@ "type": "mapgen", "method": "json", "om_terrain": "dumpsite", - "weight": 100, "object": { "predecessor_mapgen": "forest", "rotation": [ 0, 3 ], @@ -179,7 +178,6 @@ "type": "mapgen", "method": "json", "om_terrain": "dumpsite_edge", - "weight": 100, "object": { "predecessor_mapgen": "field", "rows": [ diff --git a/data/json/mapgen/exodii/exo_safehouse.json b/data/json/mapgen/exodii/exo_safehouse.json index ccb155befce0b..21846dc03e110 100644 --- a/data/json/mapgen/exodii/exo_safehouse.json +++ b/data/json/mapgen/exodii/exo_safehouse.json @@ -3,7 +3,6 @@ "om_terrain": "exo_safehouse_stone_0", "//": "A medieval stone barn from the Exodii's most recently visited world, converted to a safehouse for their scouts to hole up in, and transported to our world during the portal storms.", "type": "mapgen", - "weight": 100, "method": "json", "object": { "faction_owner": [ { "id": "exodii", "x": [ 5, 17 ], "y": [ 5, 18 ] } ], @@ -71,7 +70,6 @@ { "om_terrain": "exo_safehouse_stone_1", "type": "mapgen", - "weight": 100, "method": "json", "object": { "faction_owner": [ { "id": "exodii", "x": [ 5, 17 ], "y": [ 5, 18 ] } ], @@ -109,7 +107,6 @@ { "om_terrain": "exo_safehouse_stone_2", "type": "mapgen", - "weight": 100, "method": "json", "object": { "faction_owner": [ { "id": "exodii", "x": [ 5, 17 ], "y": [ 5, 18 ] } ], diff --git a/data/json/mapgen/exodii/exo_warehouse.json b/data/json/mapgen/exodii/exo_warehouse.json index 178b2f132c493..9a19a6b9af4d9 100644 --- a/data/json/mapgen/exodii/exo_warehouse.json +++ b/data/json/mapgen/exodii/exo_warehouse.json @@ -3,7 +3,6 @@ "om_terrain": "exo_warehouse_1", "//": "A lost Exodii's warehouse, transported to our world during the portal storms.", "type": "mapgen", - "weight": 100, "method": "json", "object": { "faction_owner": [ { "id": "exodii", "x": [ 5, 17 ], "y": [ 5, 18 ] } ], @@ -42,7 +41,6 @@ { "om_terrain": "exo_warehouse_2", "type": "mapgen", - "weight": 100, "method": "json", "object": { "faction_owner": [ { "id": "exodii", "x": [ 5, 17 ], "y": [ 5, 18 ] } ], diff --git a/data/json/mapgen/exodii/exodii_base.json b/data/json/mapgen/exodii/exodii_base.json index db45f9556d867..54f9d5238fdfc 100644 --- a/data/json/mapgen/exodii/exodii_base.json +++ b/data/json/mapgen/exodii/exodii_base.json @@ -9,7 +9,6 @@ [ "exodii_base_x0y2z0", "exodii_base_x1y2z0", "exodii_base_x2y2z0", "exodii_base_x3y2z0" ], [ "exodii_base_x0y3z0", "exodii_base_x1y3z0", "exodii_base_x2y3z0", "exodii_base_x3y3z0" ] ], - "weight": 250, "object": { "fill_ter": "t_scrap_floor", "rows": [ @@ -178,7 +177,6 @@ [ "exodii_base_x0y2z1", "exodii_base_x1y2z1", "exodii_base_x2y2z1", "exodii_base_x3y2z1" ], [ "exodii_base_x0y3z1", "exodii_base_x1y3z1", "exodii_base_x2y3z1", "exodii_base_x3y3z1" ] ], - "weight": 250, "object": { "fill_ter": "t_scrap_floor", "rows": [ @@ -363,7 +361,6 @@ [ "exodii_base_x0y2z2", "exodii_base_x1y2z2", "exodii_base_x2y2z2", "exodii_base_x3y2z2" ], [ "exodii_base_x0y3z2", "exodii_base_x1y3z2", "exodii_base_x2y3z2", "exodii_base_x3y3z2" ] ], - "weight": 250, "object": { "fill_ter": "t_scrap_floor", "rows": [ @@ -546,7 +543,6 @@ [ "exodii_base_x0y2z3", "exodii_base_x1y2z3", "exodii_base_x2y2z3", "exodii_base_x3y2z3" ], [ "exodii_base_x0y3z3", "exodii_base_x1y3z3", "exodii_base_x2y3z3", "exodii_base_x3y3z3" ] ], - "weight": 250, "object": { "fill_ter": "t_scrap_floor", "rows": [ @@ -728,7 +724,6 @@ [ "exodii_base_x0y2z4", "exodii_base_x1y2z4", "exodii_base_x2y2z4", "exodii_base_x3y2z4" ], [ "exodii_base_x0y3z4", "exodii_base_x1y3z4", "exodii_base_x2y3z4", "exodii_base_x3y3z4" ] ], - "weight": 250, "object": { "fill_ter": "t_metal_flat_roof", "rows": [ diff --git a/data/json/mapgen/faction_buildings.json b/data/json/mapgen/faction_buildings.json index 8b15f0fcd0937..90d440de56522 100644 --- a/data/json/mapgen/faction_buildings.json +++ b/data/json/mapgen/faction_buildings.json @@ -3,7 +3,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_camp_0", "faction_base_camp_new_0" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -40,7 +39,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_camp_1" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -77,7 +75,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_camp_2" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -114,7 +111,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_camp_3" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -151,7 +147,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_camp_4" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -188,7 +183,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_camp_5" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -225,7 +219,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_camp_6" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -262,7 +255,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_camp_7" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -299,7 +291,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_camp_8" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -336,7 +327,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_camp_9" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -373,7 +363,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_camp_10" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -410,7 +399,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_camp_11" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -447,7 +435,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_camp_12" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -484,7 +471,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_camp_13" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -521,7 +507,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_camp_14" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -558,7 +543,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_camp_15" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -595,7 +579,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_camp_16" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -632,7 +615,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_camp_17" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -669,7 +651,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_camp_18" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -706,7 +687,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_camp_19" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -743,7 +723,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_camp_20" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -780,7 +759,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_farm_0" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -817,7 +795,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_farm_1" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -854,7 +831,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_farm_2" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -891,7 +867,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_farm_3" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -928,7 +903,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_farm_4" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -965,7 +939,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_garage_0" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1002,7 +975,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_garage_1" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1039,7 +1011,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_garage_2" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1076,7 +1047,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_garage_3" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1113,7 +1083,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_garage_4" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1150,7 +1119,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_garage_5" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1187,7 +1155,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_garage_6" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1224,7 +1191,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_kitchen_0" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1261,7 +1227,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_kitchen_1" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1298,7 +1263,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_kitchen_2" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1335,7 +1299,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_kitchen_3" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1372,7 +1335,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_kitchen_4" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1409,7 +1371,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_kitchen_5" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1446,7 +1407,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_kitchen_6" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1483,7 +1443,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_kitchen_7" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1520,7 +1479,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_kitchen_8" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1557,7 +1515,6 @@ "type": "mapgen", "om_terrain": [ "faction_hide_site_0" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1594,7 +1551,6 @@ "type": "mapgen", "om_terrain": [ "faction_wall_level_N_0" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1631,7 +1587,6 @@ "type": "mapgen", "om_terrain": [ "faction_wall_level_E_0" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1668,7 +1623,6 @@ "type": "mapgen", "om_terrain": [ "faction_wall_level_S_0" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1705,7 +1659,6 @@ "type": "mapgen", "om_terrain": [ "faction_wall_level_W_0" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1742,7 +1695,6 @@ "type": "mapgen", "om_terrain": [ "faction_wall_level_N_1" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1779,7 +1731,6 @@ "type": "mapgen", "om_terrain": [ "faction_wall_level_E_1" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1816,7 +1767,6 @@ "type": "mapgen", "om_terrain": [ "faction_wall_level_S_1" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1853,7 +1803,6 @@ "type": "mapgen", "om_terrain": [ "faction_wall_level_W_1" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1890,7 +1839,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_blacksmith_0" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1927,7 +1875,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_blacksmith_1" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -1964,7 +1911,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_blacksmith_2" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -2001,7 +1947,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_blacksmith_3" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -2038,7 +1983,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_blacksmith_4" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -2075,7 +2019,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_blacksmith_5" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -2112,7 +2055,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_blacksmith_6" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -2149,7 +2091,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_blacksmith_7" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -2186,7 +2127,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_blacksmith_8" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -2223,7 +2163,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_blacksmith_9" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -2260,7 +2199,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_blacksmith_10" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -2297,7 +2235,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_blacksmith_11" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -2334,7 +2271,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_blacksmith_12" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -2371,7 +2307,6 @@ "type": "mapgen", "om_terrain": "faction_base_livestock_0", "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_grass", @@ -2408,7 +2343,6 @@ "type": "mapgen", "om_terrain": "faction_base_livestock_2_0", "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_grass", @@ -2445,7 +2379,6 @@ "type": "mapgen", "om_terrain": "faction_base_storehouse_0", "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_grass", @@ -2482,7 +2415,6 @@ "type": "mapgen", "om_terrain": "faction_base_storehouse_2_0", "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_grass", @@ -2519,7 +2451,6 @@ "type": "mapgen", "om_terrain": "faction_base_saltworks_0", "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_grass", @@ -2556,7 +2487,6 @@ "type": "mapgen", "om_terrain": "faction_base_workshop_0", "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_grass", @@ -2593,7 +2523,6 @@ "type": "mapgen", "om_terrain": "faction_base_workshop_2_0", "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_grass", @@ -2630,7 +2559,6 @@ "type": "mapgen", "om_terrain": "faction_base_canteen_0", "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_grass", @@ -2667,7 +2595,6 @@ "type": "mapgen", "om_terrain": "faction_base_canteen_2_0", "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_grass", @@ -2704,7 +2631,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_farm_2_0" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -2741,7 +2667,6 @@ "type": "mapgen", "om_terrain": [ "faction_base_garage_2_0" ], "method": "json", - "weight": 250, "object": { "faction_owner": [ { "id": "your_followers", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", diff --git a/data/json/mapgen/farm.json b/data/json/mapgen/farm.json index e5c6c3eac7664..d5f5f5a6e0f75 100644 --- a/data/json/mapgen/farm.json +++ b/data/json/mapgen/farm.json @@ -212,7 +212,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "farm_3_roof", "farm_2_roof" ] ], - "weight": 250, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ @@ -250,7 +249,6 @@ "method": "json", "om_terrain": [ [ "farm_1_silo" ] ], "//": "Grain silo copy of silo in ranch_camp_57", - "weight": 250, "object": { "fill_ter": "t_dirtfloor", "rows": [ @@ -293,7 +291,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "farm_1_silo_1" ] ], - "weight": 250, "object": { "rows": [ " III ", @@ -329,7 +326,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "farm_1_silo_2" ] ], - "weight": 250, "object": { "rows": [ " III ", @@ -365,7 +361,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "farm_1_silo_roof" ] ], - "weight": 250, "object": { "rows": [ " ... ", @@ -402,7 +397,6 @@ "method": "json", "om_terrain": [ [ "farm_1_coop" ] ], "//": "Chicken Coop", - "weight": 250, "object": { "fill_ter": "t_dirtfloor", "rows": [ @@ -455,7 +449,6 @@ "method": "json", "om_terrain": [ [ "farm_1_coop_roof" ] ], "//": "Chicken Coop", - "weight": 250, "object": { "rows": [ " ", @@ -492,7 +485,6 @@ "method": "json", "om_terrain": [ [ "farm_1_greenhouse" ] ], "//": "Greenhouse", - "weight": 250, "object": { "fill_ter": "t_dirt", "rows": [ @@ -550,7 +542,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "farm_1_greenhouse_roof" ] ], - "weight": 250, "object": { "rows": [ " ", @@ -586,7 +577,6 @@ "method": "json", "om_terrain": [ [ "farm_1_apiary" ] ], "//": "Apiary", - "weight": 250, "object": { "fill_ter": "t_dirt", "rows": [ @@ -637,7 +627,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "farm_1_apiary_roof" ] ], - "weight": 250, "object": { "rows": [ " ", diff --git a/data/json/mapgen/farm_2side.json b/data/json/mapgen/farm_2side.json index 293a2c59b0364..df10c07629d3e 100644 --- a/data/json/mapgen/farm_2side.json +++ b/data/json/mapgen/farm_2side.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "2farm_4", "2farm_3", "2farm_2", "2farm_1" ], [ "2farm_8", "2farm_7", "2farm_6", "2farm_5" ] ], - "weight": 250, "object": { "fill_ter": "t_dirtmound", "rows": [ @@ -109,7 +108,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "2farm_roof_4", "2farm_loft_3" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -154,7 +152,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "2farm_roof_3" ], - "weight": 250, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ @@ -191,7 +188,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "2farm_6_1" ] ], - "weight": 250, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ @@ -228,7 +224,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "2farm_6_2" ] ], - "weight": 250, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ @@ -265,7 +260,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "2farm_6_3" ] ], - "weight": 250, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ @@ -307,7 +301,6 @@ [ "2farm_20", "2farm_19", "2farm_18", "2farm_17" ], [ "2farm_24", "2farm_23", "2farm_22", "2farm_21" ] ], - "weight": 250, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -415,7 +408,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "2farm_12", "2farm_11" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -465,7 +457,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "2farm_roof_11" ], - "weight": 250, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ diff --git a/data/json/mapgen/farm_dairy.json b/data/json/mapgen/farm_dairy.json index 1c436be2ca575..204d26de8e6de 100644 --- a/data/json/mapgen/farm_dairy.json +++ b/data/json/mapgen/farm_dairy.json @@ -88,7 +88,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "dairy_farm_SW", "dairy_farm_SE" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/farm_horse.json b/data/json/mapgen/farm_horse.json index 30e92e045add9..def37d051d9b1 100644 --- a/data/json/mapgen/farm_horse.json +++ b/data/json/mapgen/farm_horse.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "farm_horse_house_1" ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -115,7 +114,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "farm_horse_greenhouse" ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -154,7 +152,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "farm_horse_greenhouse_roof" ], - "weight": 250, "object": { "fill_ter": "t_glass_roof", "rows": [ @@ -190,7 +187,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "farm_horse_stable_1" ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -387,7 +383,6 @@ "type": "mapgen", "method": "json", "om_terrain": "paddock", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -439,7 +434,6 @@ "method": "json", "om_terrain": [ [ "paddock_L_butt", "paddock_R_butt" ] ], "//": "Can be used with paddock to form 2x1 small paddocks or with paddock_C to form longer paddocks", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -483,7 +477,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "paddock_L_gap", "paddock_R_gap" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -528,7 +521,6 @@ "method": "json", "om_terrain": [ "paddock_C" ], "//": "Flip to use with _gap versions", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -578,7 +570,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "paddock_UL", "paddock_UR" ], [ "paddock_DL", "paddock_DR" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -666,7 +657,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "paddock_d_D_butt", "paddock_d_U_gap" ], [ "paddock_d_D_gap", "paddock_d_U_butt" ] ], - "weight": 250, "object": { "predecessor_mapgen": "forest_thick", "rows": [ @@ -735,7 +725,6 @@ "type": "mapgen", "method": "json", "om_terrain": "paddock_special_1", - "weight": 250, "object": { "predecessor_mapgen": "forest_thick", "rows": [ @@ -773,7 +762,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "paddock_special_2" ], [ "paddock_special_3" ] ], - "weight": 250, "object": { "predecessor_mapgen": "forest_thick", "rows": [ @@ -834,7 +822,6 @@ "type": "mapgen", "method": "json", "om_terrain": "paddock_special_4", - "weight": 250, "object": { "predecessor_mapgen": "forest_thick", "rows": [ @@ -876,7 +863,6 @@ [ "paddock_trailhead_4", "paddock_trailhead_5", "paddock_trailhead_6" ], [ "paddock_trailhead_7", "paddock_trailhead_8", "paddock_trailhead_9" ] ], - "weight": 250, "object": { "predecessor_mapgen": "forest_thick", "rows": [ @@ -976,7 +962,6 @@ "method": "json", "om_terrain": [ [ "paddock_end_UL" ], [ "paddock_end_DL" ] ], "//": "Use rural_road_turnback as UC and paddock_C as DC", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -1041,7 +1026,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "paddock_end_UR" ], [ "paddock_end_DR" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -1106,7 +1090,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "farm_horse_ring_1", "farm_horse_ring_2" ], [ "farm_horse_ring_3", "farm_horse_ring_4" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -1166,7 +1149,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "farm_horse_track_1" ], [ "farm_horse_track_2" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -1230,7 +1212,6 @@ [ "farm_horse_track_large_1", "farm_horse_track_large_2" ], [ "farm_horse_track_large_3", "farm_horse_track_large_4" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -1296,7 +1277,6 @@ "type": "mapgen", "method": "json", "om_terrain": "farm_horse_silo", - "weight": 250, "object": { "predecessor_mapgen": "field", "rows": [ @@ -1343,7 +1323,6 @@ "type": "mapgen", "method": "json", "om_terrain": "farm_horse_silo_1", - "weight": 250, "object": { "fill_ter": "t_open_air", "rows": [ @@ -1379,7 +1358,6 @@ "type": "mapgen", "method": "json", "om_terrain": "farm_horse_silo_roof", - "weight": 250, "object": { "fill_ter": "t_open_air", "rows": [ @@ -1415,7 +1393,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "splitrail_fence_UL", "splitrail_fence_UR" ], [ "splitrail_fence_DL", "splitrail_fence_DR" ] ], - "weight": 250, "object": { "predecessor_mapgen": "field", "rows": [ @@ -1476,7 +1453,6 @@ "type": "mapgen", "method": "json", "om_terrain": "splitrail_fence_butt", - "weight": 250, "object": { "predecessor_mapgen": "field", "rows": [ @@ -1513,7 +1489,6 @@ "type": "mapgen", "method": "json", "om_terrain": "splitrail_fence_gap", - "weight": 250, "object": { "predecessor_mapgen": "field", "rows": [ @@ -1550,7 +1525,6 @@ "type": "mapgen", "method": "json", "om_terrain": "splitrail_fence_inner", - "weight": 250, "object": { "predecessor_mapgen": "field", "place_nested": [ diff --git a/data/json/mapgen/farm_stills.json b/data/json/mapgen/farm_stills.json index 6dd2d641475d5..927fe9fbde68e 100644 --- a/data/json/mapgen/farm_stills.json +++ b/data/json/mapgen/farm_stills.json @@ -7,7 +7,6 @@ [ "farm_stills_8", "farm_stills_7", "farm_stills_6", "farm_stills_5" ], [ "farm_stills_12", "farm_stills_11", "farm_stills_10", "farm_stills_9" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/farm_supply.json b/data/json/mapgen/farm_supply.json index ab1d116c81029..b3a5c21b068c4 100644 --- a/data/json/mapgen/farm_supply.json +++ b/data/json/mapgen/farm_supply.json @@ -2,7 +2,6 @@ { "type": "mapgen", "method": "json", - "weight": 150, "om_terrain": [ [ "farm_supply_1", "farm_supply_2" ], [ "farm_supply_3", "farm_supply_4" ] ], "//": "Fully stocked, unlooted variant.", "object": { @@ -369,7 +368,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "farm_supply_roof_1", "farm_supply_roof_2" ], [ "farm_supply_roof_3", "farm_supply_roof_4" ] ], - "weight": 150, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -450,7 +448,6 @@ { "type": "mapgen", "method": "json", - "weight": 200, "om_terrain": [ [ "farm_supply_looted_1", "farm_supply_looted_2" ], [ "farm_supply_looted_3", "farm_supply_looted_4" ] ], "//": "Looted variant. Guns, some camping supplies, and some other equipment is missing.", "object": { diff --git a/data/json/mapgen/farm_tiles.json b/data/json/mapgen/farm_tiles.json index ca89ae379550a..72bc5356716a6 100644 --- a/data/json/mapgen/farm_tiles.json +++ b/data/json/mapgen/farm_tiles.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "farmland_straight", "farmland_turn", "farmland_U", "farmland_turn_inside" ] ], - "weight": 100, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -40,7 +39,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "hayfield_straight", "hayfield_turnL", "hayfield_end", "hayfield_turnR" ] ], - "weight": 100, "object": { "fill_ter": "t_region_groundcover", "rows": [ @@ -172,7 +170,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "2silos_1" ], - "weight": 100, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -208,7 +205,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "2silos_2" ], - "weight": 100, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -244,7 +240,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "2silos_roof" ], - "weight": 100, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -315,7 +310,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "coop_chicken" ], - "weight": 100, "object": { "predecessor_mapgen": "field", "rows": [ diff --git a/data/json/mapgen/farm_tree.json b/data/json/mapgen/farm_tree.json index de3546fcac2b3..e8dbe15ba5361 100644 --- a/data/json/mapgen/farm_tree.json +++ b/data/json/mapgen/farm_tree.json @@ -3,7 +3,6 @@ "method": "json", "type": "mapgen", "om_terrain": [ [ "TreeFarm_1a", "TreeFarm_1b" ] ], - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/field_baseball.json b/data/json/mapgen/field_baseball.json index 67f9e32225f60..f12783a0439f2 100644 --- a/data/json/mapgen/field_baseball.json +++ b/data/json/mapgen/field_baseball.json @@ -2,7 +2,6 @@ { "type": "mapgen", "method": "json", - "weight": 500, "om_terrain": [ [ "s_baseballfield_a1", "s_baseballfield_a2" ], [ "s_baseballfield_b1", "s_baseballfield_b2" ] ], "object": { "rows": [ @@ -113,7 +112,6 @@ { "type": "mapgen", "method": "json", - "weight": 500, "om_terrain": [ "s_baseballfield_a2_2" ], "object": { "fill_ter": "t_open_air", diff --git a/data/json/mapgen/fire_station.json b/data/json/mapgen/fire_station.json index 651e58dbcba40..0c4501291b1e7 100644 --- a/data/json/mapgen/fire_station.json +++ b/data/json/mapgen/fire_station.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "fire_station" ], - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -143,7 +142,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "fire_station_1" ], - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/fungal/fungal_bloom.json b/data/json/mapgen/fungal/fungal_bloom.json index 0d2d775f95df6..c2f2d85ea1e5a 100644 --- a/data/json/mapgen/fungal/fungal_bloom.json +++ b/data/json/mapgen/fungal/fungal_bloom.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "fungal_bloom" ], - "weight": 100, "object": { "rows": [ " .............. ", diff --git a/data/json/mapgen/fungal/fungal_flowers.json b/data/json/mapgen/fungal/fungal_flowers.json index 1337b5c5dd41c..777d8b61cd20a 100644 --- a/data/json/mapgen/fungal/fungal_flowers.json +++ b/data/json/mapgen/fungal/fungal_flowers.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "fungal_flowers" ], - "weight": 100, "object": { "rows": [ " .............. ", diff --git a/data/json/mapgen/fungal/fungal_tower.json b/data/json/mapgen/fungal/fungal_tower.json index b272281f09a3d..c7c0cc758f9e5 100644 --- a/data/json/mapgen/fungal/fungal_tower.json +++ b/data/json/mapgen/fungal/fungal_tower.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "fungal_tower" ], - "weight": 100, "object": { "rows": [ " .............. ", diff --git a/data/json/mapgen/fungal/house_fungus_01.json b/data/json/mapgen/fungal/house_fungus_01.json index c5226a22db660..4ef0dddcbb8f3 100644 --- a/data/json/mapgen/fungal/house_fungus_01.json +++ b/data/json/mapgen/fungal/house_fungus_01.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_fungus_01" ], - "weight": 20, "object": { "fill_ter": "t_fungus", "rows": [ diff --git a/data/json/mapgen/gambling_hall.json b/data/json/mapgen/gambling_hall.json index 0673ae7d72d49..b49077a09b9fc 100644 --- a/data/json/mapgen/gambling_hall.json +++ b/data/json/mapgen/gambling_hall.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "gambling_hall", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -203,7 +202,6 @@ "method": "json", "om_terrain": "gambling_hall_1", "type": "mapgen", - "weight": 100, "object": { "fill_ter": { "param": "carpet_color_type", "fallback": "t_carpet_red" }, "rows": [ diff --git a/data/json/mapgen/garage.json b/data/json/mapgen/garage.json index d1b0dce3ae588..58c4f8d151ee2 100644 --- a/data/json/mapgen/garage.json +++ b/data/json/mapgen/garage.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_garage" ], - "weight": 1000, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -130,7 +129,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_garage_1" ], - "weight": 1000, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -242,7 +240,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_garage_2" ], - "weight": 1000, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/garage_gas.json b/data/json/mapgen/garage_gas.json index 959d60ce3380d..b1a9e986e4cb1 100644 --- a/data/json/mapgen/garage_gas.json +++ b/data/json/mapgen/garage_gas.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "garage_gas_1", "garage_gas_2", "garage_gas_3" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/garden_botanical.json b/data/json/mapgen/garden_botanical.json index 0c2064a37768f..c7868ea6ceebd 100644 --- a/data/json/mapgen/garden_botanical.json +++ b/data/json/mapgen/garden_botanical.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": [ [ "BotanicalGarden_1a", "BotanicalGarden_1b" ] ], "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_region_groundcover_urban", "rows": [ diff --git a/data/json/mapgen/garden_community.json b/data/json/mapgen/garden_community.json index cd410d1e31fbd..270172e33813a 100644 --- a/data/json/mapgen/garden_community.json +++ b/data/json/mapgen/garden_community.json @@ -38,7 +38,6 @@ "method": "json", "om_terrain": "communitygarden", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -98,7 +97,6 @@ "method": "json", "om_terrain": "communitygarden_2", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -180,7 +178,6 @@ "method": "json", "om_terrain": "communitygarden_3", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_region_soil", "rows": [ diff --git a/data/json/mapgen/garden_public.json b/data/json/mapgen/garden_public.json index d44dd182af853..a38357fc940fe 100644 --- a/data/json/mapgen/garden_public.json +++ b/data/json/mapgen/garden_public.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": "publicgarden", - "weight": 100, "object": { "fill_ter": "t_region_groundcover_urban", "rows": [ @@ -41,7 +40,6 @@ "type": "mapgen", "method": "json", "om_terrain": "publicgarden_2", - "weight": 100, "object": { "fill_ter": "t_region_groundcover_urban", "rows": [ diff --git a/data/json/mapgen/gardening_store.json b/data/json/mapgen/gardening_store.json index b4dec452c1128..a69a4de77b041 100644 --- a/data/json/mapgen/gardening_store.json +++ b/data/json/mapgen/gardening_store.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_gardening" ], - "weight": 500, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/gas_stations/s_gas.json b/data/json/mapgen/gas_stations/s_gas.json index 44e34fbe521e0..dcddfb537d9c7 100644 --- a/data/json/mapgen/gas_stations/s_gas.json +++ b/data/json/mapgen/gas_stations/s_gas.json @@ -48,7 +48,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_gas_1" ], - "weight": 200, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -190,7 +189,6 @@ "method": "json", "om_terrain": [ "s_gas_rural" ], "//": "Rural Gas Station", - "weight": 333, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/godco/church_retreat.json b/data/json/mapgen/godco/church_retreat.json index 27f9f799d8d89..1e2dc35e76447 100644 --- a/data/json/mapgen/godco/church_retreat.json +++ b/data/json/mapgen/godco/church_retreat.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "godco_3", "godco_2", "godco_1" ], [ "godco_6", "godco_5", "godco_4" ], [ "godco_9", "godco_8", "godco_7" ] ], - "weight": 250, "object": { "faction_owner": [ { "id": "gods_community", "x": [ 0, 23 ], "y": [ 0, 23 ] }, @@ -162,7 +161,6 @@ [ "godco_6_1", "godco_5_1", "godco_4_1" ], [ "godco_9_1", "godco_8_1", "godco_7_1" ] ], - "weight": 250, "object": { "faction_owner": [ { "id": "gods_community", "x": [ 0, 23 ], "y": [ 0, 23 ] }, @@ -295,7 +293,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "godco_2_2", "godco_1_2" ] ], - "weight": 250, "object": { "faction_owner": [ { "id": "gods_community", "x": [ 0, 23 ], "y": [ 0, 23 ] }, @@ -336,7 +333,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "godco_1_3" ], - "weight": 250, "object": { "faction_owner": [ { "id": "gods_community", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_shingle_flat_roof", @@ -374,7 +370,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "godco_enter" ], - "weight": 100, "object": { "fill_ter": "t_region_soil", "predecessor_mapgen": "forest", diff --git a/data/json/mapgen/golfcourse.json b/data/json/mapgen/golfcourse.json index e50b13727f6af..72066debfdaf7 100644 --- a/data/json/mapgen/golfcourse.json +++ b/data/json/mapgen/golfcourse.json @@ -7,7 +7,6 @@ [ "golfcourse_01", "golfcourse_11", "golfcourse_21", "golfcourse_31" ], [ "golfcourse_02", "golfcourse_12", "golfcourse_22", "golfcourse_32" ] ], - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/gunsmith.json b/data/json/mapgen/gunsmith.json index 87e0602b0664f..6b0e7cd2b59e3 100644 --- a/data/json/mapgen/gunsmith.json +++ b/data/json/mapgen/gunsmith.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_gun_4" ], - "weight": 300, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -126,7 +125,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_gun_4_looted" ], - "weight": 300, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/gym.json b/data/json/mapgen/gym.json index 122eef0853edb..ad6ddb0776f4a 100644 --- a/data/json/mapgen/gym.json +++ b/data/json/mapgen/gym.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "gym_fitness" ], - "weight": 500, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -129,7 +128,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "gym_fitness_1" ], - "weight": 500, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/hazardous_waste_sarcophagus.json b/data/json/mapgen/hazardous_waste_sarcophagus.json index 71ea6d97de7c5..037a71c382ef3 100644 --- a/data/json/mapgen/hazardous_waste_sarcophagus.json +++ b/data/json/mapgen/hazardous_waste_sarcophagus.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "haz_sar_1_2", "haz_sar_1_1" ], [ "haz_sar_1_4", "haz_sar_1_3" ] ], - "weight": 10, "object": { "rows": [ " :::::::::::::::: ", @@ -226,7 +225,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "haz_sar_b_2", "haz_sar_b_1" ], [ "haz_sar_b_4", "haz_sar_b_3" ] ], - "weight": 10, "object": { "rows": [ "###|-------------------|-------------------|####", diff --git a/data/json/mapgen/headshop.json b/data/json/mapgen/headshop.json index c1434f6f9a206..657b16f1dde91 100644 --- a/data/json/mapgen/headshop.json +++ b/data/json/mapgen/headshop.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "headshop", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/helipad.json b/data/json/mapgen/helipad.json index 4b75064f76d61..f0a886155a62e 100644 --- a/data/json/mapgen/helipad.json +++ b/data/json/mapgen/helipad.json @@ -224,7 +224,6 @@ "method": "json", "om_terrain": [ [ "helipad_roof_nw", "helipad_roof_ne" ], [ "helipad_roof_sw", "helipad_roof_se" ] ], "type": "mapgen", - "weight": 500, "object": { "fill_ter": "t_open_air", "rows": [ diff --git a/data/json/mapgen/hells_raiders/bandit_cabin.json b/data/json/mapgen/hells_raiders/bandit_cabin.json index c2a176d5670d3..edb9d5b1a80c4 100644 --- a/data/json/mapgen/hells_raiders/bandit_cabin.json +++ b/data/json/mapgen/hells_raiders/bandit_cabin.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": "bandit_cabin", - "weight": 250, "object": { "predecessor_mapgen": "forest", "rows": [ @@ -103,7 +102,6 @@ "type": "mapgen", "method": "json", "om_terrain": "bandit_cabin_roof", - "weight": 250, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ diff --git a/data/json/mapgen/hells_raiders/bandit_camp.json b/data/json/mapgen/hells_raiders/bandit_camp.json index d7d1c2caebc01..e664061a23074 100644 --- a/data/json/mapgen/hells_raiders/bandit_camp.json +++ b/data/json/mapgen/hells_raiders/bandit_camp.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "bandit_camp_1", "bandit_camp_2" ], [ "bandit_camp_3", "bandit_camp_4" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "faction_owner": [ @@ -111,7 +110,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "bandit_camp_1_roof", "bandit_camp_2_roof" ], [ "bandit_camp_3_roof", "bandit_camp_4_roof" ] ], - "weight": 250, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ diff --git a/data/json/mapgen/hells_raiders/bandit_garage.json b/data/json/mapgen/hells_raiders/bandit_garage.json index ca02d44325b91..cbac402ee3152 100644 --- a/data/json/mapgen/hells_raiders/bandit_garage.json +++ b/data/json/mapgen/hells_raiders/bandit_garage.json @@ -3,7 +3,6 @@ "type": "mapgen", "om_terrain": [ [ "bandit_garage_1", "bandit_garage_2" ] ], "method": "json", - "weight": 250, "object": { "predecessor_mapgen": "forest", "faction_owner": [ @@ -135,7 +134,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "bandit_garage_1_roof", "bandit_garage_2_roof" ] ], - "weight": 250, "object": { "fill_ter": "t_tar_flat_roof", "rows": [ diff --git a/data/json/mapgen/hells_raiders/bandit_work_camp.json b/data/json/mapgen/hells_raiders/bandit_work_camp.json index 4149f8d0ecb69..0cb537c43888f 100644 --- a/data/json/mapgen/hells_raiders/bandit_work_camp.json +++ b/data/json/mapgen/hells_raiders/bandit_work_camp.json @@ -8,7 +8,6 @@ [ "bandit_farm_9", "bandit_farm_8", "bandit_farm_7" ] ], "//": "Supposed to be ramshackle, made-from-scratch. Recently constructed.", - "weight": 250, "object": { "fill_ter": "t_dirtfloor", "faction_owner": [ @@ -159,7 +158,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "bandit_farm_3_roof", "bandit_farm_2_roof" ] ], - "weight": 250, "object": { "fill_ter": "t_open_air", "faction_owner": [ diff --git a/data/json/mapgen/homeimprovement.json b/data/json/mapgen/homeimprovement.json index 65f71308e3d68..a5ad0a5fde62a 100644 --- a/data/json/mapgen/homeimprovement.json +++ b/data/json/mapgen/homeimprovement.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "home_improvement" ], - "weight": 10000, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/homeless_camp.json b/data/json/mapgen/homeless_camp.json index 0a478697cad0a..d796d4550a71d 100644 --- a/data/json/mapgen/homeless_camp.json +++ b/data/json/mapgen/homeless_camp.json @@ -61,7 +61,6 @@ "type": "mapgen", "method": "json", "om_terrain": "homelesscamp", - "weight": 100, "object": { "predecessor_mapgen": "forest_thick", "rotation": [ 0, 3 ], diff --git a/data/json/mapgen/hospital.json b/data/json/mapgen/hospital.json index 3ad86948c65eb..9e6303fb3feaf 100644 --- a/data/json/mapgen/hospital.json +++ b/data/json/mapgen/hospital.json @@ -73,7 +73,6 @@ [ "hospital_6", "hospital_5", "hospital_4" ], [ "hospital_9", "hospital_8", "hospital_7" ] ], - "weight": 250, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -179,7 +178,6 @@ [ "hospital_6_roof", "hospital_5_roof", "hospital_4_roof" ], [ "hospital_9_roof", "hospital_8_roof", "hospital_7_roof" ] ], - "weight": 250, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/house/2storymodern01.json b/data/json/mapgen/house/2storymodern01.json index 565fea4e1d9d5..6b923a9a84819 100644 --- a/data/json/mapgen/house/2storymodern01.json +++ b/data/json/mapgen/house/2storymodern01.json @@ -517,7 +517,6 @@ { "type": "mapgen", "om_terrain": "2storyModern01_roof", - "weight": 250, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/2storymodern02.json b/data/json/mapgen/house/2storymodern02.json index fa2e73df92a5d..ae01231106b13 100644 --- a/data/json/mapgen/house/2storymodern02.json +++ b/data/json/mapgen/house/2storymodern02.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "2storyModern02_basement", - "weight": 250, "method": "json", "object": { "palettes": [ "standard_domestic_palette", "standard_domestic_basement_palette" ], @@ -68,7 +67,6 @@ { "type": "mapgen", "om_terrain": "2storyModern02_1", - "weight": 250, "method": "json", "object": { "palettes": [ "domestic_general_and_variant_palette", "standard_domestic_lino_bathroom", "standard_domestic_landscaping_palette" ], @@ -115,7 +113,6 @@ { "type": "mapgen", "om_terrain": "2storyModern02_2", - "weight": 250, "method": "json", "object": { "palettes": [ "domestic_general_and_variant_palette", "standard_domestic_lino_bathroom" ], @@ -154,7 +151,6 @@ { "type": "mapgen", "om_terrain": "2storyModern02_roof", - "weight": 250, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/2storymodern03.json b/data/json/mapgen/house/2storymodern03.json index d4f1f5117174a..39a697de73e34 100644 --- a/data/json/mapgen/house/2storymodern03.json +++ b/data/json/mapgen/house/2storymodern03.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "2StoryModern03_basement", - "weight": 250, "method": "json", "object": { "palettes": [ "standard_domestic_palette", "standard_domestic_basement_palette", "parametrized_carpets_palette" ], @@ -55,7 +54,6 @@ { "type": "mapgen", "om_terrain": "2StoryModern03_1", - "weight": 250, "method": "json", "object": { "palettes": [ "domestic_general_and_variant_palette", "standard_domestic_lino_bathroom", "parametrized_carpets_palette" ], @@ -107,7 +105,6 @@ { "type": "mapgen", "om_terrain": "2StoryModern03_2", - "weight": 250, "method": "json", "object": { "palettes": [ "domestic_general_and_variant_palette", "standard_domestic_lino_bathroom" ], @@ -146,7 +143,6 @@ { "type": "mapgen", "om_terrain": "2StoryModern03_roof", - "weight": 250, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/2storymodern04.json b/data/json/mapgen/house/2storymodern04.json index ab3444ce50c81..ce20625758281 100644 --- a/data/json/mapgen/house/2storymodern04.json +++ b/data/json/mapgen/house/2storymodern04.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": [ [ "2StoryModern04_basement_1", "2StoryModern04_basement_2" ] ], - "weight": 250, "method": "json", "object": { "palettes": [ "standard_domestic_palette", "standard_domestic_basement_palette", "parametrized_carpets_palette" ], @@ -58,7 +57,6 @@ { "type": "mapgen", "om_terrain": [ [ "2StoryModern04_1_1", "2StoryModern04_1_2" ] ], - "weight": 250, "method": "json", "object": { "palettes": [ @@ -121,7 +119,6 @@ { "type": "mapgen", "om_terrain": [ [ "2StoryModern04_2_1", "2StoryModern04_2_2" ] ], - "weight": 250, "method": "json", "object": { "palettes": [ "domestic_general_and_variant_palette", "standard_domestic_lino_bathroom" ], @@ -172,7 +169,6 @@ { "type": "mapgen", "om_terrain": [ [ "2StoryModern04_roof_1", "2StoryModern04_roof_2" ] ], - "weight": 250, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/bungalow01.json b/data/json/mapgen/house/bungalow01.json index 046db6e5999b2..bd3402bb4bb5e 100644 --- a/data/json/mapgen/house/bungalow01.json +++ b/data/json/mapgen/house/bungalow01.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow01_1", - "weight": 250, "method": "json", "object": { "palettes": [ @@ -57,7 +56,6 @@ { "type": "mapgen", "om_terrain": "bungalow01_roof", - "weight": 250, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/bungalow02.json b/data/json/mapgen/house/bungalow02.json index cf46559c1b4d9..270cc33f9cc6d 100644 --- a/data/json/mapgen/house/bungalow02.json +++ b/data/json/mapgen/house/bungalow02.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow02_1", - "weight": 250, "method": "json", "object": { "palettes": [ @@ -69,7 +68,6 @@ { "type": "mapgen", "om_terrain": "bungalow02_roof", - "weight": 250, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/bungalow03.json b/data/json/mapgen/house/bungalow03.json index 3a7635058556c..8ae17d42fae7b 100644 --- a/data/json/mapgen/house/bungalow03.json +++ b/data/json/mapgen/house/bungalow03.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow03", - "weight": 250, "method": "json", "object": { "palettes": [ @@ -56,7 +55,6 @@ { "type": "mapgen", "om_terrain": "bungalow03_roof", - "weight": 250, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/bungalow04.json b/data/json/mapgen/house/bungalow04.json index 597e5e7410208..f4da731fc9c24 100644 --- a/data/json/mapgen/house/bungalow04.json +++ b/data/json/mapgen/house/bungalow04.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow04", - "weight": 250, "method": "json", "object": { "palettes": [ @@ -76,7 +75,6 @@ { "type": "mapgen", "om_terrain": "bungalow04_roof", - "weight": 250, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/bungalow05.json b/data/json/mapgen/house/bungalow05.json index 4056b1f23c672..875869f540e29 100644 --- a/data/json/mapgen/house/bungalow05.json +++ b/data/json/mapgen/house/bungalow05.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow05", - "weight": 250, "method": "json", "object": { "palettes": [ @@ -64,7 +63,6 @@ { "type": "mapgen", "om_terrain": "bungalow05_roof", - "weight": 250, "method": "json", "object": { "fill_ter": "t_shingle_flat_roof", diff --git a/data/json/mapgen/house/bungalow06.json b/data/json/mapgen/house/bungalow06.json index 4c02fb4ab934d..0943db8b391a1 100644 --- a/data/json/mapgen/house/bungalow06.json +++ b/data/json/mapgen/house/bungalow06.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow06", - "weight": 250, "method": "json", "object": { "palettes": [ @@ -63,7 +62,6 @@ { "type": "mapgen", "om_terrain": "bungalow06_roof", - "weight": 250, "method": "json", "object": { "fill_ter": "t_shingle_flat_roof", diff --git a/data/json/mapgen/house/bungalow07.json b/data/json/mapgen/house/bungalow07.json index 51403d5306b1f..a568f612a905c 100644 --- a/data/json/mapgen/house/bungalow07.json +++ b/data/json/mapgen/house/bungalow07.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow07", - "weight": 250, "method": "json", "object": { "palettes": [ @@ -53,7 +52,6 @@ { "type": "mapgen", "om_terrain": "bungalow07_roof", - "weight": 250, "method": "json", "object": { "fill_ter": "t_shingle_flat_roof", diff --git a/data/json/mapgen/house/bungalow08.json b/data/json/mapgen/house/bungalow08.json index f552c1d2cb330..792632d021c35 100644 --- a/data/json/mapgen/house/bungalow08.json +++ b/data/json/mapgen/house/bungalow08.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow08", - "weight": 250, "method": "json", "object": { "palettes": [ @@ -62,7 +61,6 @@ { "type": "mapgen", "om_terrain": "bungalow08_roof", - "weight": 250, "method": "json", "object": { "fill_ter": "t_shingle_flat_roof", diff --git a/data/json/mapgen/house/bungalow09.json b/data/json/mapgen/house/bungalow09.json index e0d1bef0dcd4c..4b501c66594df 100644 --- a/data/json/mapgen/house/bungalow09.json +++ b/data/json/mapgen/house/bungalow09.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow09", - "weight": 250, "method": "json", "object": { "palettes": [ @@ -60,7 +59,6 @@ { "type": "mapgen", "om_terrain": "bungalow09_roof", - "weight": 250, "method": "json", "object": { "fill_ter": "t_shingle_flat_roof", diff --git a/data/json/mapgen/house/bungalow10.json b/data/json/mapgen/house/bungalow10.json index cdffaf86933f0..a5b5f98655090 100644 --- a/data/json/mapgen/house/bungalow10.json +++ b/data/json/mapgen/house/bungalow10.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow10", - "weight": 250, "method": "json", "object": { "palettes": [ @@ -59,7 +58,6 @@ { "type": "mapgen", "om_terrain": "bungalow10_roof", - "weight": 250, "method": "json", "object": { "fill_ter": "t_shingle_flat_roof", diff --git a/data/json/mapgen/house/bungalow11.json b/data/json/mapgen/house/bungalow11.json index 83f6845b033c8..d074c4ea9796c 100644 --- a/data/json/mapgen/house/bungalow11.json +++ b/data/json/mapgen/house/bungalow11.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow11", - "weight": 250, "method": "json", "object": { "palettes": [ @@ -69,7 +68,6 @@ { "type": "mapgen", "om_terrain": "bungalow11_roof", - "weight": 250, "method": "json", "object": { "fill_ter": "t_shingle_flat_roof", diff --git a/data/json/mapgen/house/bungalow12.json b/data/json/mapgen/house/bungalow12.json index a53f7ec78360d..2679e7cc9c668 100644 --- a/data/json/mapgen/house/bungalow12.json +++ b/data/json/mapgen/house/bungalow12.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow12", - "weight": 250, "method": "json", "object": { "palettes": [ @@ -74,7 +73,6 @@ { "type": "mapgen", "om_terrain": "bungalow12_roof", - "weight": 250, "method": "json", "object": { "fill_ter": "t_shingle_flat_roof", diff --git a/data/json/mapgen/house/bungalow13.json b/data/json/mapgen/house/bungalow13.json index fc22cd579e661..bc3dc882f5abc 100644 --- a/data/json/mapgen/house/bungalow13.json +++ b/data/json/mapgen/house/bungalow13.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow13", - "weight": 200, "method": "json", "object": { "palettes": [ @@ -80,7 +79,6 @@ { "type": "mapgen", "om_terrain": "bungalow13_roof", - "weight": 250, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/bungalow14.json b/data/json/mapgen/house/bungalow14.json index d8cc78b15612e..0b06d659f1bd2 100644 --- a/data/json/mapgen/house/bungalow14.json +++ b/data/json/mapgen/house/bungalow14.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow14", - "weight": 250, "method": "json", "object": { "palettes": [ @@ -98,7 +97,6 @@ { "type": "mapgen", "om_terrain": "bungalow14_roof", - "weight": 250, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/bungalow15.json b/data/json/mapgen/house/bungalow15.json index de33cbf8553e3..293465567a45b 100644 --- a/data/json/mapgen/house/bungalow15.json +++ b/data/json/mapgen/house/bungalow15.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow15", - "weight": 125, "method": "json", "object": { "palettes": [ @@ -75,7 +74,6 @@ { "type": "mapgen", "om_terrain": "bungalow15_roof", - "weight": 250, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/bungalow16.json b/data/json/mapgen/house/bungalow16.json index 58a607a93fbc7..01585709efd49 100644 --- a/data/json/mapgen/house/bungalow16.json +++ b/data/json/mapgen/house/bungalow16.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow16", - "weight": 200, "method": "json", "object": { "palettes": [ @@ -97,7 +96,6 @@ { "type": "mapgen", "om_terrain": "bungalow16_roof", - "weight": 50, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/bungalow17.json b/data/json/mapgen/house/bungalow17.json index a34b4d2c6ea8e..b909cbaedefac 100644 --- a/data/json/mapgen/house/bungalow17.json +++ b/data/json/mapgen/house/bungalow17.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow17", - "weight": 50, "method": "json", "object": { "palettes": [ @@ -52,7 +51,6 @@ { "type": "mapgen", "om_terrain": "bungalow17_roof", - "weight": 50, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/bungalow18.json b/data/json/mapgen/house/bungalow18.json index 0adfeac309482..4e37e95a284fd 100644 --- a/data/json/mapgen/house/bungalow18.json +++ b/data/json/mapgen/house/bungalow18.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow18", - "weight": 50, "method": "json", "object": { "palettes": [ @@ -51,7 +50,6 @@ { "type": "mapgen", "om_terrain": "bungalow18_roof", - "weight": 50, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/bungalow19.json b/data/json/mapgen/house/bungalow19.json index ee49c9eeefcc8..3036541d97c4b 100644 --- a/data/json/mapgen/house/bungalow19.json +++ b/data/json/mapgen/house/bungalow19.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow19", - "weight": 250, "method": "json", "object": { "palettes": [ @@ -79,7 +78,6 @@ { "type": "mapgen", "om_terrain": "bungalow19_roof", - "weight": 250, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/bungalow20.json b/data/json/mapgen/house/bungalow20.json index eab2097f93af4..6d2b75c806717 100644 --- a/data/json/mapgen/house/bungalow20.json +++ b/data/json/mapgen/house/bungalow20.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow20", - "weight": 250, "method": "json", "object": { "palettes": [ @@ -59,7 +58,6 @@ { "type": "mapgen", "om_terrain": "bungalow20_roof", - "weight": 250, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/bungalow21.json b/data/json/mapgen/house/bungalow21.json index 994de2b7f6058..bc94f448a3f28 100644 --- a/data/json/mapgen/house/bungalow21.json +++ b/data/json/mapgen/house/bungalow21.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow21", - "weight": 250, "method": "json", "object": { "palettes": [ @@ -65,7 +64,6 @@ { "type": "mapgen", "om_terrain": "bungalow21_roof", - "weight": 250, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/bungalow22.json b/data/json/mapgen/house/bungalow22.json index 4a87d8077e158..b36b261168276 100644 --- a/data/json/mapgen/house/bungalow22.json +++ b/data/json/mapgen/house/bungalow22.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow22", - "weight": 250, "method": "json", "object": { "palettes": [ @@ -78,7 +77,6 @@ { "type": "mapgen", "om_terrain": "bungalow22_roof", - "weight": 250, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/bungalow25.json b/data/json/mapgen/house/bungalow25.json index 6396eda98988d..e083d91ed9c92 100644 --- a/data/json/mapgen/house/bungalow25.json +++ b/data/json/mapgen/house/bungalow25.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "bungalow25", - "weight": 250, "method": "json", "object": { "palettes": [ @@ -69,7 +68,6 @@ { "type": "mapgen", "om_terrain": "bungalow25_roof", - "weight": 250, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/crack_house.json b/data/json/mapgen/house/crack_house.json index 6f16f8931c4b4..70c00c1868a17 100644 --- a/data/json/mapgen/house/crack_house.json +++ b/data/json/mapgen/house/crack_house.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "house_crack1", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -127,7 +126,6 @@ "method": "json", "om_terrain": "house_crack2", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -210,7 +208,6 @@ "method": "json", "om_terrain": "house_crack3", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house04.json b/data/json/mapgen/house/house04.json index 1087a4f3e4ea3..7854001e25807 100644 --- a/data/json/mapgen/house/house04.json +++ b/data/json/mapgen/house/house04.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_04" ], - "weight": 300, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house06.json b/data/json/mapgen/house/house06.json index cf354079e3ed9..492effd45d54b 100644 --- a/data/json/mapgen/house/house06.json +++ b/data/json/mapgen/house/house06.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_06" ], - "weight": 300, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house07.json b/data/json/mapgen/house/house07.json index 7e9710c92cc4a..c6c41514ceb5c 100644 --- a/data/json/mapgen/house/house07.json +++ b/data/json/mapgen/house/house07.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_07" ], - "weight": 300, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house09.json b/data/json/mapgen/house/house09.json index b8c107ee9f2e4..9d8f789c9249e 100644 --- a/data/json/mapgen/house/house09.json +++ b/data/json/mapgen/house/house09.json @@ -4,7 +4,6 @@ "method": "json", "om_terrain": [ "house_09" ], "//": "uses bionic_basement", - "weight": 300, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house10.json b/data/json/mapgen/house/house10.json index a83c379fd42de..b6f2db6445e35 100644 --- a/data/json/mapgen/house/house10.json +++ b/data/json/mapgen/house/house10.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_10" ], - "weight": 300, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house11.json b/data/json/mapgen/house/house11.json index c65d36818d003..e07fe92607934 100644 --- a/data/json/mapgen/house/house11.json +++ b/data/json/mapgen/house/house11.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_11" ], - "weight": 300, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house12.json b/data/json/mapgen/house/house12.json index 8ffd3e6bbc8a2..abd4dd6a6b72c 100644 --- a/data/json/mapgen/house/house12.json +++ b/data/json/mapgen/house/house12.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_12" ], - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house13.json b/data/json/mapgen/house/house13.json index 195fde0347bf6..7ec728bd48634 100644 --- a/data/json/mapgen/house/house13.json +++ b/data/json/mapgen/house/house13.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_13" ], - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house14.json b/data/json/mapgen/house/house14.json index 8b0c1a1207c93..9eb9999b97b86 100644 --- a/data/json/mapgen/house/house14.json +++ b/data/json/mapgen/house/house14.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_14" ], - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house15.json b/data/json/mapgen/house/house15.json index 1b86c27870e17..ccd157b26a0fb 100644 --- a/data/json/mapgen/house/house15.json +++ b/data/json/mapgen/house/house15.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_15" ], - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house16.json b/data/json/mapgen/house/house16.json index 26adfbfbc42be..d3c9ba242a273 100644 --- a/data/json/mapgen/house/house16.json +++ b/data/json/mapgen/house/house16.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_16" ], - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house17.json b/data/json/mapgen/house/house17.json index 8254ec9e6c523..1e5d257922840 100644 --- a/data/json/mapgen/house/house17.json +++ b/data/json/mapgen/house/house17.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_17" ], - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house18.json b/data/json/mapgen/house/house18.json index 3bbdb1f2c50de..d9a5621ecc501 100644 --- a/data/json/mapgen/house/house18.json +++ b/data/json/mapgen/house/house18.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_18" ], - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house19.json b/data/json/mapgen/house/house19.json index aabfd95085daf..d61ca30708032 100644 --- a/data/json/mapgen/house/house19.json +++ b/data/json/mapgen/house/house19.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_19" ], - "weight": 300, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house26.json b/data/json/mapgen/house/house26.json index c65b8426a3606..301978d0cc07f 100644 --- a/data/json/mapgen/house/house26.json +++ b/data/json/mapgen/house/house26.json @@ -4,7 +4,6 @@ "om_terrain": "house_26", "//": "used by basement_survival", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house27.json b/data/json/mapgen/house/house27.json index 5a0d6bbea2c25..8995e39ac3cf7 100644 --- a/data/json/mapgen/house/house27.json +++ b/data/json/mapgen/house/house27.json @@ -4,7 +4,6 @@ "om_terrain": "house_27", "//": "used by basement_meth", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house28.json b/data/json/mapgen/house/house28.json index 2cd6630f5a129..28c360c8d1f1e 100644 --- a/data/json/mapgen/house/house28.json +++ b/data/json/mapgen/house/house28.json @@ -4,7 +4,6 @@ "om_terrain": "house_28", "//": "used by basement_weed", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house29.json b/data/json/mapgen/house/house29.json index 5271f75a72a01..e7a122e3eb17a 100644 --- a/data/json/mapgen/house/house29.json +++ b/data/json/mapgen/house/house29.json @@ -4,7 +4,6 @@ "om_terrain": "house_29", "//": "used by basement_chem", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house30.json b/data/json/mapgen/house/house30.json index 987558a3004dc..4296398cbaa4c 100644 --- a/data/json/mapgen/house/house30.json +++ b/data/json/mapgen/house/house30.json @@ -4,7 +4,6 @@ "om_terrain": "house_30", "//": "used by basement_chem2", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house31.json b/data/json/mapgen/house/house31.json index 4c797fa185067..bb4f2453e37de 100644 --- a/data/json/mapgen/house/house31.json +++ b/data/json/mapgen/house/house31.json @@ -4,7 +4,6 @@ "om_terrain": "house_31", "//": "used by lab basements.", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_detatched1.json b/data/json/mapgen/house/house_detatched1.json index c6a95a33fcd36..14a2a8d5b8453 100644 --- a/data/json/mapgen/house/house_detatched1.json +++ b/data/json/mapgen/house/house_detatched1.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "house_detatched1", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_detatched10.json b/data/json/mapgen/house/house_detatched10.json index 2d9d9928078d1..0d09ce449c5b6 100644 --- a/data/json/mapgen/house/house_detatched10.json +++ b/data/json/mapgen/house/house_detatched10.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "house_detatched10", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_detatched2.json b/data/json/mapgen/house/house_detatched2.json index c27428f423c7d..0451537014d6e 100644 --- a/data/json/mapgen/house/house_detatched2.json +++ b/data/json/mapgen/house/house_detatched2.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "house_detatched2", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_detatched3.json b/data/json/mapgen/house/house_detatched3.json index 4cdf48865a584..b45a368a9e190 100644 --- a/data/json/mapgen/house/house_detatched3.json +++ b/data/json/mapgen/house/house_detatched3.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "house_detatched3", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_detatched5.json b/data/json/mapgen/house/house_detatched5.json index 42e0bebbe51b2..3d1ca15b44fd5 100644 --- a/data/json/mapgen/house/house_detatched5.json +++ b/data/json/mapgen/house/house_detatched5.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "house_detatched5", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_detatched7.json b/data/json/mapgen/house/house_detatched7.json index 1ab96b128eae7..4f3003f187978 100644 --- a/data/json/mapgen/house/house_detatched7.json +++ b/data/json/mapgen/house/house_detatched7.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "house_detatched7", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_detatched8.json b/data/json/mapgen/house/house_detatched8.json index da21cc30beec6..4dffc3cf6d47a 100644 --- a/data/json/mapgen/house/house_detatched8.json +++ b/data/json/mapgen/house/house_detatched8.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "house_detatched8", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_detatched9.json b/data/json/mapgen/house/house_detatched9.json index 412cc72ed7b78..36fd709825072 100644 --- a/data/json/mapgen/house/house_detatched9.json +++ b/data/json/mapgen/house/house_detatched9.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "house_detatched9", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_dogs.json b/data/json/mapgen/house/house_dogs.json index 34bc22b9bb46b..0e37eb13d6f7a 100644 --- a/data/json/mapgen/house/house_dogs.json +++ b/data/json/mapgen/house/house_dogs.json @@ -18,7 +18,6 @@ "method": "json", "om_terrain": [ "house_dogs" ], "//": "uses house_08_basement", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_duplex.json b/data/json/mapgen/house/house_duplex.json index 939ddec0dd343..2fdf775dfccbf 100644 --- a/data/json/mapgen/house/house_duplex.json +++ b/data/json/mapgen/house/house_duplex.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "duplex", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_duplex10.json b/data/json/mapgen/house/house_duplex10.json index caebeb3d4ab7b..b4e56cd5bded4 100644 --- a/data/json/mapgen/house/house_duplex10.json +++ b/data/json/mapgen/house/house_duplex10.json @@ -59,8 +59,7 @@ ] }, "om_terrain": "house_duplex10", - "type": "mapgen", - "weight": 100 + "type": "mapgen" }, { "type": "mapgen", diff --git a/data/json/mapgen/house/house_duplex11.json b/data/json/mapgen/house/house_duplex11.json index f2652db382ccc..388339d24b246 100644 --- a/data/json/mapgen/house/house_duplex11.json +++ b/data/json/mapgen/house/house_duplex11.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": "house_duplex11", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_duplex2.json b/data/json/mapgen/house/house_duplex2.json index 5d2f7271b6696..e999c92ace8eb 100644 --- a/data/json/mapgen/house/house_duplex2.json +++ b/data/json/mapgen/house/house_duplex2.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "house_duplex2", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_duplex3.json b/data/json/mapgen/house/house_duplex3.json index f013465e4726d..493bc62583f0a 100644 --- a/data/json/mapgen/house/house_duplex3.json +++ b/data/json/mapgen/house/house_duplex3.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "house_duplex3", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_duplex4.json b/data/json/mapgen/house/house_duplex4.json index 2eabc8bdebabe..f48993b8e0645 100644 --- a/data/json/mapgen/house/house_duplex4.json +++ b/data/json/mapgen/house/house_duplex4.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "house_duplex4", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_duplex5.json b/data/json/mapgen/house/house_duplex5.json index 7db516d092293..c0ba48512fbc4 100644 --- a/data/json/mapgen/house/house_duplex5.json +++ b/data/json/mapgen/house/house_duplex5.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "house_duplex5", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_duplex6.json b/data/json/mapgen/house/house_duplex6.json index 40f593e6491f7..7c3bd564c1bb4 100644 --- a/data/json/mapgen/house/house_duplex6.json +++ b/data/json/mapgen/house/house_duplex6.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "house_duplex6", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_duplex7.json b/data/json/mapgen/house/house_duplex7.json index bb5e2a3bad6d7..044c8d1f9de8e 100644 --- a/data/json/mapgen/house/house_duplex7.json +++ b/data/json/mapgen/house/house_duplex7.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "house_duplex7", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_duplex8.json b/data/json/mapgen/house/house_duplex8.json index de0bc619518ed..0c75b732767ce 100644 --- a/data/json/mapgen/house/house_duplex8.json +++ b/data/json/mapgen/house/house_duplex8.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "house_duplex8", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_duplex9.json b/data/json/mapgen/house/house_duplex9.json index 2f4d5d9af6c07..fe6150249cdf6 100644 --- a/data/json/mapgen/house/house_duplex9.json +++ b/data/json/mapgen/house/house_duplex9.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "house_duplex9", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_fence02.json b/data/json/mapgen/house/house_fence02.json index 2e83dd5b5196f..1095608507a24 100644 --- a/data/json/mapgen/house/house_fence02.json +++ b/data/json/mapgen/house/house_fence02.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "house_fence02_1", - "weight": 250, "method": "json", "object": { "palettes": [ @@ -64,7 +63,6 @@ { "type": "mapgen", "om_terrain": "house_fence02_2", - "weight": 250, "method": "json", "object": { "palettes": [ "standard_domestic_palette", "standard_domestic_lino_kitchen", "standard_domestic_lino_bathroom" ], @@ -114,7 +112,6 @@ { "type": "mapgen", "om_terrain": "house_fence02_roof", - "weight": 250, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/house_fence04.json b/data/json/mapgen/house/house_fence04.json index 390db821a3622..2c16f46d38687 100644 --- a/data/json/mapgen/house/house_fence04.json +++ b/data/json/mapgen/house/house_fence04.json @@ -208,7 +208,6 @@ { "type": "mapgen", "om_terrain": "house_fence04_roof", - "weight": 250, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/house_fence05.json b/data/json/mapgen/house/house_fence05.json index 2e423548d66a2..43444c4024e24 100644 --- a/data/json/mapgen/house/house_fence05.json +++ b/data/json/mapgen/house/house_fence05.json @@ -2,7 +2,6 @@ { "type": "mapgen", "om_terrain": "house_fence05_basement", - "weight": 250, "method": "json", "object": { "palettes": [ "standard_domestic_palette", "standard_domestic_basement_palette" ], @@ -39,7 +38,6 @@ { "type": "mapgen", "om_terrain": "house_fence05_1", - "weight": 250, "method": "json", "object": { "palettes": [ @@ -99,7 +97,6 @@ { "type": "mapgen", "om_terrain": "house_fence05_2", - "weight": 250, "method": "json", "object": { "palettes": [ "standard_domestic_palette", "standard_domestic_lino_bathroom" ], @@ -142,7 +139,6 @@ { "type": "mapgen", "om_terrain": "house_fence05_roof", - "weight": 250, "method": "json", "object": { "palettes": [ "roof_palette" ], diff --git a/data/json/mapgen/house/house_fortified.json b/data/json/mapgen/house/house_fortified.json index 4e757edbb1b97..92a431098a46a 100644 --- a/data/json/mapgen/house/house_fortified.json +++ b/data/json/mapgen/house/house_fortified.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_fortified" ], - "weight": 50, "//": "fortified houses shouldn't be common", "object": { "fill_ter": "t_floor", diff --git a/data/json/mapgen/house/house_garage.json b/data/json/mapgen/house/house_garage.json index 6182aec5be7d6..b35016388e695 100644 --- a/data/json/mapgen/house/house_garage.json +++ b/data/json/mapgen/house/house_garage.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_garage" ], - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_garage2.json b/data/json/mapgen/house/house_garage2.json index 50c6f280ca4d1..a46cc9d6b0296 100644 --- a/data/json/mapgen/house/house_garage2.json +++ b/data/json/mapgen/house/house_garage2.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_garage2" ], - "weight": 300, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_garage3.json b/data/json/mapgen/house/house_garage3.json index a3c4cef4d7239..9f5691b724082 100644 --- a/data/json/mapgen/house/house_garage3.json +++ b/data/json/mapgen/house/house_garage3.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_garage3" ], - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_garage4.json b/data/json/mapgen/house/house_garage4.json index d87a37d1cddf7..d0321284879f5 100644 --- a/data/json/mapgen/house/house_garage4.json +++ b/data/json/mapgen/house/house_garage4.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_garage4" ], - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_garage5.json b/data/json/mapgen/house/house_garage5.json index 826b6dca73de1..7f2ab2e848c3c 100644 --- a/data/json/mapgen/house/house_garage5.json +++ b/data/json/mapgen/house/house_garage5.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_garage5" ], - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_garage6.json b/data/json/mapgen/house/house_garage6.json index fb61e0cf6568c..3f2bc4a614270 100644 --- a/data/json/mapgen/house/house_garage6.json +++ b/data/json/mapgen/house/house_garage6.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_garage6" ], - "weight": 200, "//": "two bedroom one bath single garage home.", "object": { "fill_ter": "t_floor", diff --git a/data/json/mapgen/house/house_garage7.json b/data/json/mapgen/house/house_garage7.json index a681b95497759..916ef643af46f 100644 --- a/data/json/mapgen/house/house_garage7.json +++ b/data/json/mapgen/house/house_garage7.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_garage7" ], - "weight": 150, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_garage8.json b/data/json/mapgen/house/house_garage8.json index 500ea902d02c1..f0f6d598fde37 100644 --- a/data/json/mapgen/house/house_garage8.json +++ b/data/json/mapgen/house/house_garage8.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_garage8" ], - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_garage_prepper.json b/data/json/mapgen/house/house_garage_prepper.json index bc8b5c6a2c393..04b33d0f73190 100644 --- a/data/json/mapgen/house/house_garage_prepper.json +++ b/data/json/mapgen/house/house_garage_prepper.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_prepper2" ], - "weight": 100, "object": { "fill_ter": { "param": "carpet_color_type", "fallback": "t_carpet_concrete_red" }, "rows": [ diff --git a/data/json/mapgen/house/house_gardener.json b/data/json/mapgen/house/house_gardener.json index 98b379e5d8f2c..de0e7598a1af2 100644 --- a/data/json/mapgen/house/house_gardener.json +++ b/data/json/mapgen/house/house_gardener.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_gardener" ], - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_library.json b/data/json/mapgen/house/house_library.json index d60a9a71fe709..9f8ddf6a07f67 100644 --- a/data/json/mapgen/house/house_library.json +++ b/data/json/mapgen/house/house_library.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_library" ], - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_modern_lx.json b/data/json/mapgen/house/house_modern_lx.json index 3b3ecad0900a0..76d12421d9da1 100644 --- a/data/json/mapgen/house/house_modern_lx.json +++ b/data/json/mapgen/house/house_modern_lx.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_modern_1" ], - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_patio.json b/data/json/mapgen/house/house_patio.json index 725533272511a..fff4a1bd22d70 100644 --- a/data/json/mapgen/house/house_patio.json +++ b/data/json/mapgen/house/house_patio.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_patio" ], - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_porch.json b/data/json/mapgen/house/house_porch.json index 5e07a3aa2ea54..7baab006f311e 100644 --- a/data/json/mapgen/house/house_porch.json +++ b/data/json/mapgen/house/house_porch.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_porch" ], - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_quiverfull.json b/data/json/mapgen/house/house_quiverfull.json index 6d716937c37fc..23891bbb29d1f 100644 --- a/data/json/mapgen/house/house_quiverfull.json +++ b/data/json/mapgen/house/house_quiverfull.json @@ -1,6 +1,6 @@ [ { - "name": "GROUP_QUIVERFULL", + "id": "GROUP_QUIVERFULL", "type": "monstergroup", "monsters": [ { "monster": "mon_null", "weight": 900 }, @@ -17,7 +17,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_quiverfull" ], - "weight": 300, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_rural.json b/data/json/mapgen/house/house_rural.json index 9176915ee21e8..e1ed685fb3042 100644 --- a/data/json/mapgen/house/house_rural.json +++ b/data/json/mapgen/house/house_rural.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "rural_house1", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -83,7 +82,6 @@ "method": "json", "om_terrain": "rural_house2", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_rv.json b/data/json/mapgen/house/house_rv.json index 1ab148d91949d..c14a476f1688b 100644 --- a/data/json/mapgen/house/house_rv.json +++ b/data/json/mapgen/house/house_rv.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_rv" ], - "weight": 300, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_suicide.json b/data/json/mapgen/house/house_suicide.json index b1a0c9f8c1af9..1f248b3c83334 100644 --- a/data/json/mapgen/house/house_suicide.json +++ b/data/json/mapgen/house/house_suicide.json @@ -4,7 +4,6 @@ "method": "json", "om_terrain": [ "house_suicide" ], "//": "uses house_10 basement", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_tool_shed.json b/data/json/mapgen/house/house_tool_shed.json index c5257dbac7448..b831ef924418f 100644 --- a/data/json/mapgen/house/house_tool_shed.json +++ b/data/json/mapgen/house/house_tool_shed.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "house_toolshed" ], - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/house_vacant.json b/data/json/mapgen/house/house_vacant.json index 507fd20a7fa8a..9e870b30a5d8a 100644 --- a/data/json/mapgen/house/house_vacant.json +++ b/data/json/mapgen/house/house_vacant.json @@ -4,7 +4,6 @@ "om_terrain": "house_vacant", "//": "no roof, just foundation pits", "type": "mapgen", - "weight": 80, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -46,7 +45,6 @@ "om_terrain": "house_vacant1", "//": "no roof, just foundation pits", "type": "mapgen", - "weight": 80, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -88,7 +86,6 @@ "om_terrain": "house_vacant2", "//": "no roof, just foundation pits", "type": "mapgen", - "weight": 80, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -130,7 +127,6 @@ "om_terrain": "house_vacant3", "//": "no roof, just foundation pits", "type": "mapgen", - "weight": 80, "object": { "fill_ter": "t_region_soil", "rows": [ diff --git a/data/json/mapgen/house/house_wooded.json b/data/json/mapgen/house/house_wooded.json index aa6625f85de12..042d8fbe440f7 100644 --- a/data/json/mapgen/house/house_wooded.json +++ b/data/json/mapgen/house/house_wooded.json @@ -4,7 +4,6 @@ "om_terrain": "house_wooded", "//": "normal variant", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/urban_18_victorian.json b/data/json/mapgen/house/urban_18_victorian.json index a00ae018c6d7e..8f6fca1c41b14 100644 --- a/data/json/mapgen/house/urban_18_victorian.json +++ b/data/json/mapgen/house/urban_18_victorian.json @@ -40,7 +40,6 @@ "method": "json", "om_terrain": [ [ "urban_18_3", "urban_18_4" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/urban_1_house.json b/data/json/mapgen/house/urban_1_house.json index 0054ccaf021f7..b69f7d3aa4491 100644 --- a/data/json/mapgen/house/urban_1_house.json +++ b/data/json/mapgen/house/urban_1_house.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": [ [ "urban_1_1", "urban_1_2" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/urban_22_house_pool.json b/data/json/mapgen/house/urban_22_house_pool.json index ecd136e3d2469..b645df718e15d 100644 --- a/data/json/mapgen/house/urban_22_house_pool.json +++ b/data/json/mapgen/house/urban_22_house_pool.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "urban_22_1", "urban_22_2" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/house/urban_29_dense_row.json b/data/json/mapgen/house/urban_29_dense_row.json index e35e3ce945423..2d7760a17dd86 100644 --- a/data/json/mapgen/house/urban_29_dense_row.json +++ b/data/json/mapgen/house/urban_29_dense_row.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "urban_29_1", "urban_29_2" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -62,7 +61,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "urban_29_3", "urban_29_4" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -148,7 +146,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "urban_29_5", "urban_29_6" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -202,7 +199,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "urban_29_7", "urban_29_8" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -293,7 +289,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "urban_29_9", "urban_29_10" ] ], - "weight": 250, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/house/urban_2_house.json b/data/json/mapgen/house/urban_2_house.json index 98eaa740e8c76..16a91eb22202f 100644 --- a/data/json/mapgen/house/urban_2_house.json +++ b/data/json/mapgen/house/urban_2_house.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": [ [ "urban_2_1", "urban_2_2" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -82,7 +81,6 @@ "method": "json", "om_terrain": [ [ "urban_2_3", "urban_2_4" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -129,7 +127,6 @@ "method": "json", "om_terrain": [ [ "urban_2_5", "urban_2_6" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ diff --git a/data/json/mapgen/house/urban_3_house.json b/data/json/mapgen/house/urban_3_house.json index 9b6669a3ad607..26aae2c6db417 100644 --- a/data/json/mapgen/house/urban_3_house.json +++ b/data/json/mapgen/house/urban_3_house.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": [ [ "urban_3_1", "urban_3_2" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -81,7 +80,6 @@ "method": "json", "om_terrain": [ [ "urban_3_3", "urban_3_4" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -128,7 +126,6 @@ "method": "json", "om_terrain": [ [ "urban_3_5", "urban_3_6" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ diff --git a/data/json/mapgen/house/urban_4_house_basement.json b/data/json/mapgen/house/urban_4_house_basement.json index 6e62fa622b916..f1033addfdb25 100644 --- a/data/json/mapgen/house/urban_4_house_basement.json +++ b/data/json/mapgen/house/urban_4_house_basement.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": [ [ "urban_4_1", "urban_4_2" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -53,7 +52,6 @@ "method": "json", "om_terrain": [ [ "urban_4_3", "urban_4_4" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -126,7 +124,6 @@ "method": "json", "om_terrain": [ [ "urban_4_5", "urban_4_6" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -174,7 +171,6 @@ "method": "json", "om_terrain": [ [ "urban_4_7", "urban_4_8" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ diff --git a/data/json/mapgen/house/urban_5_house.json b/data/json/mapgen/house/urban_5_house.json index 68cb9e32d8765..579a90a03afdd 100644 --- a/data/json/mapgen/house/urban_5_house.json +++ b/data/json/mapgen/house/urban_5_house.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": [ [ "urban_5_1", "urban_5_2" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -78,7 +77,6 @@ "method": "json", "om_terrain": [ [ "urban_5_3", "urban_5_4" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -125,7 +123,6 @@ "method": "json", "om_terrain": [ [ "urban_5_5", "urban_5_6" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ diff --git a/data/json/mapgen/house/urban_7_house_garden.json b/data/json/mapgen/house/urban_7_house_garden.json index 7b431bf2764e8..135505314ebe8 100644 --- a/data/json/mapgen/house/urban_7_house_garden.json +++ b/data/json/mapgen/house/urban_7_house_garden.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "urban_7_1", "urban_7_2" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -80,7 +79,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "urban_7_3", "urban_7_4" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -126,7 +124,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "urban_7_5", "urban_7_6" ] ], - "weight": 250, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ @@ -163,7 +160,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "urban_7_1_basement", "urban_7_2_basement" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/house/urban_8_house_brick_garden.json b/data/json/mapgen/house/urban_8_house_brick_garden.json index 01b18e822e3f1..39bb7f0215fb5 100644 --- a/data/json/mapgen/house/urban_8_house_brick_garden.json +++ b/data/json/mapgen/house/urban_8_house_brick_garden.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": [ [ "urban_8_1", "urban_8_2" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -73,7 +72,6 @@ "method": "json", "om_terrain": [ [ "urban_8_3", "urban_8_4" ] ], "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -115,7 +113,6 @@ "method": "json", "om_terrain": "urban_8_6", "type": "mapgen", - "weight": 250, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ diff --git a/data/json/mapgen/house/urban_9_house_garage_loft.json b/data/json/mapgen/house/urban_9_house_garage_loft.json index 262806fdcc9d2..9ded9b1175b45 100644 --- a/data/json/mapgen/house/urban_9_house_garage_loft.json +++ b/data/json/mapgen/house/urban_9_house_garage_loft.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "urban_9_1", "urban_9_2" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -88,7 +87,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "urban_9_3", "urban_9_4" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -135,7 +133,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "urban_9_5", "urban_9_6" ] ], - "weight": 250, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ diff --git a/data/json/mapgen/hunting_lodge.json b/data/json/mapgen/hunting_lodge.json index 531efcafa7fdf..a79b6e0213c15 100644 --- a/data/json/mapgen/hunting_lodge.json +++ b/data/json/mapgen/hunting_lodge.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "lodge_ground1", "lodge_ground2" ] ], - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -48,7 +47,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "lodge_ground_glooscap1", "lodge_ground_glooscap2" ] ], - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -93,7 +91,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "lodge_2ndfloor1", "lodge_2ndfloor2" ] ], - "weight": 100, "object": { "fill_ter": "t_open_air", "rows": [ @@ -149,7 +146,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "lodge_roof1", "lodge_roof2" ] ], - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -190,7 +186,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "lodge_basement_residential1", "lodge_basement_residential2" ] ], - "weight": 100, "object": { "fill_ter": "t_soil", "rows": [ @@ -236,7 +231,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "lodge_basement_residential3", "lodge_basement_residential4" ] ], - "weight": 100, "object": { "fill_ter": "t_soil", "rows": [ diff --git a/data/json/mapgen/irradiator_1.json b/data/json/mapgen/irradiator_1.json index 98ee4981ddb54..d520b49ae2d8e 100644 --- a/data/json/mapgen/irradiator_1.json +++ b/data/json/mapgen/irradiator_1.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_ZOMBIE_NUCLEAR_INDUSTRY", + "id": "GROUP_ZOMBIE_NUCLEAR_INDUSTRY", "monsters": [ { "monster": "mon_zombie_technician", "weight": 450, "cost_multiplier": 3 }, { "monster": "mon_zombie_hazmat", "weight": 250, "cost_multiplier": 3 }, @@ -89,7 +89,6 @@ [ "irradiator_1_6", "irradiator_1_5", "irradiator_1_4" ], [ "irradiator_1_9", "irradiator_1_8", "irradiator_1_7" ] ], - "weight": 250, "object": { "fill_ter": "t_strconc_floor", "rows": [ @@ -367,7 +366,6 @@ [ "irradiator_1_6_roof", "irradiator_1_5_roof", "irradiator_1_4_roof" ], [ "irradiator_1_9_roof", "irradiator_1_8_roof", "irradiator_1_7_roof" ] ], - "weight": 250, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/isherwood_farms/farm_isherwood.json b/data/json/mapgen/isherwood_farms/farm_isherwood.json index 106db85ddc046..4a583167b603e 100644 --- a/data/json/mapgen/isherwood_farms/farm_isherwood.json +++ b/data/json/mapgen/isherwood_farms/farm_isherwood.json @@ -7,7 +7,6 @@ [ "farm_isherwood_6", "farm_isherwood_5", "farm_isherwood_4" ], [ "farm_isherwood_9", "farm_isherwood_8", "farm_isherwood_7" ] ], - "weight": 250, "object": { "faction_owner": [ { "id": "isherwood_family", "x": [ 0, 23 ], "y": [ 0, 23 ] }, @@ -114,7 +113,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "farm_isherwood_2" ] ], - "weight": 250, "object": { "faction_owner": [ { "id": "isherwood_family", "x": [ 0, 23 ], "y": [ 0, 23 ] } ], "fill_ter": "t_floor", @@ -238,7 +236,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "farm_isherwood_3_hayloft", "farm_isherwood_2_roof" ] ], - "weight": 250, "object": { "faction_owner": [ { "id": "isherwood_family", "x": [ 0, 23 ], "y": [ 0, 23 ] }, diff --git a/data/json/mapgen/jewel_store.json b/data/json/mapgen/jewel_store.json index 3bd8ba075aa7d..16ffed5cf9b97 100644 --- a/data/json/mapgen/jewel_store.json +++ b/data/json/mapgen/jewel_store.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_jewelry" ], - "weight": 500, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/junkyard.json b/data/json/mapgen/junkyard.json index 56f3844144cf7..316ac14744668 100644 --- a/data/json/mapgen/junkyard.json +++ b/data/json/mapgen/junkyard.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": [ [ "junkyard_1a", "junkyard_1b" ] ], "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -63,7 +62,6 @@ "method": "json", "om_terrain": [ [ "junkyard_roof_1a", "junkyard_roof_1b" ] ], "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -99,7 +97,6 @@ "method": "json", "om_terrain": [ [ "junkyard_2a", "junkyard_2b" ] ], "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_dirt", "rows": [ diff --git a/data/json/mapgen/karting_l.json b/data/json/mapgen/karting_l.json index d188c533f3e27..fc0e601ec29e2 100644 --- a/data/json/mapgen/karting_l.json +++ b/data/json/mapgen/karting_l.json @@ -7,7 +7,6 @@ [ "karting_1_0_0", "karting_1_1_0", "karting_1_2_0" ], [ "karting_2_0_0", "karting_2_1_0", "karting_2_2_0" ] ], - "weight": 300, "object": { "fill_ter": "t_strconc_floor_no_roof", "rows": [ @@ -117,7 +116,6 @@ [ "karting_1_0_1", "karting_1_1_1", "karting_1_2_1" ], [ "karting_2_0_1", "karting_2_1_1", "karting_2_2_1" ] ], - "weight": 300, "object": { "fill_ter": "t_open_air", "rows": [ @@ -207,7 +205,6 @@ [ "karting_1_0_2", "karting_1_1_2", "karting_1_2_2" ], [ "karting_2_0_2", "karting_2_1_2", "karting_2_2_2" ] ], - "weight": 300, "object": { "fill_ter": "t_tile_flat_roof", "rows": [ diff --git a/data/json/mapgen/kindergarten.json b/data/json/mapgen/kindergarten.json index e4b1db003fbce..01e54c4051443 100644 --- a/data/json/mapgen/kindergarten.json +++ b/data/json/mapgen/kindergarten.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "small_kindergarten" ], - "weight": 500, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/lab/lab_central.json b/data/json/mapgen/lab/lab_central.json index 1e1dde2812e55..941b99f7b32be 100644 --- a/data/json/mapgen/lab/lab_central.json +++ b/data/json/mapgen/lab/lab_central.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "central_lab_entrance" ], - "weight": 100, "object": { "predecessor_mapgen": "forest", "rows": [ @@ -40,7 +39,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "central_lab_shaft" ], - "weight": 100, "object": { "fill_ter": "t_soil", "rows": [ @@ -81,7 +79,6 @@ [ "central_lab_hq_6", "central_lab_hq_5", "central_lab_hq_4" ], [ "central_lab_hq_9", "central_lab_hq_8", "central_lab_hq_7" ] ], - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/lab/lab_escape.json b/data/json/mapgen/lab/lab_escape.json index 138628de5e847..2327c85d8f1c2 100644 --- a/data/json/mapgen/lab/lab_escape.json +++ b/data/json/mapgen/lab/lab_escape.json @@ -4,7 +4,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "lab_escape_cells" ], - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/lab/lab_modular/lab_1x1x2_RES_8.json b/data/json/mapgen/lab/lab_modular/lab_1x1x2_RES_8.json index 9336cbde98433..1bd3947c2e8a9 100644 --- a/data/json/mapgen/lab/lab_modular/lab_1x1x2_RES_8.json +++ b/data/json/mapgen/lab/lab_modular/lab_1x1x2_RES_8.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "lab_1x1_RES_8_bedrooms_maintenance", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -51,7 +50,6 @@ "method": "json", "om_terrain": "lab_1x1_RES_8_bedrooms_security", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -110,7 +108,6 @@ "method": "json", "om_terrain": [ "lab_1x1_RES_8_commons_SEC" ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -244,7 +241,6 @@ "method": "json", "om_terrain": [ "lab_1x1_RES_8_commons_MAINT" ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/lab/lab_modular/lab_1x1x2_RES_8_apartments.json b/data/json/mapgen/lab/lab_modular/lab_1x1x2_RES_8_apartments.json index 4a4f3bda97887..7d89633bf00a4 100644 --- a/data/json/mapgen/lab/lab_modular/lab_1x1x2_RES_8_apartments.json +++ b/data/json/mapgen/lab/lab_modular/lab_1x1x2_RES_8_apartments.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "lab_1x1x2_RES_8_apartments_upper", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -41,7 +40,6 @@ "method": "json", "om_terrain": "lab_1x1x2_RES_8_apartments_lower", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ diff --git a/data/json/mapgen/lab/lab_modular/lab_2x2_MUT_Tier_1.json b/data/json/mapgen/lab/lab_modular/lab_2x2_MUT_Tier_1.json index 7ed2d80c64e4c..82894e3db94fe 100644 --- a/data/json/mapgen/lab/lab_modular/lab_2x2_MUT_Tier_1.json +++ b/data/json/mapgen/lab/lab_modular/lab_2x2_MUT_Tier_1.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": [ "lab_2x2_MUT_tier_1_NW" ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -67,7 +66,6 @@ "method": "json", "om_terrain": [ "lab_2x2_MUT_tier_1_NE" ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -132,7 +130,6 @@ "method": "json", "om_terrain": [ "lab_2x2_MUT_tier_1_SW" ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -201,7 +198,6 @@ "method": "json", "om_terrain": [ "lab_2x2_MUT_tier_1_SE" ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ diff --git a/data/json/mapgen/lab/lab_modular/lab_2x2_MUT_Tier_2.json b/data/json/mapgen/lab/lab_modular/lab_2x2_MUT_Tier_2.json index f8ca1ed60fb5a..2dacaf564ffec 100644 --- a/data/json/mapgen/lab/lab_modular/lab_2x2_MUT_Tier_2.json +++ b/data/json/mapgen/lab/lab_modular/lab_2x2_MUT_Tier_2.json @@ -4,7 +4,6 @@ "om_terrain": [ "lab_2x2_MUT_tier_2_NW_final_flr" ], "//": "variant for a 6 floor lab (removed stairs down)", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -71,7 +70,6 @@ "method": "json", "om_terrain": [ "lab_2x2_MUT_tier_2_NE" ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -139,7 +137,6 @@ "method": "json", "om_terrain": [ "lab_2x2_MUT_tier_2_SW" ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -231,7 +228,6 @@ "method": "json", "om_terrain": [ "lab_2x2_MUT_tier_2_SE" ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ diff --git a/data/json/mapgen/lab/lab_modular/lab_2x2_cargo_depot.json b/data/json/mapgen/lab/lab_modular/lab_2x2_cargo_depot.json index 9d18f339dc172..b6f4ac49a6630 100644 --- a/data/json/mapgen/lab/lab_modular/lab_2x2_cargo_depot.json +++ b/data/json/mapgen/lab/lab_modular/lab_2x2_cargo_depot.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": [ "lab_2x2_cargo_NW" ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -73,7 +72,6 @@ "method": "json", "om_terrain": [ "lab_2x2_cargo_NE" ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -129,7 +127,6 @@ "method": "json", "om_terrain": [ "lab_2x2_cargo_SW" ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -176,7 +173,6 @@ "method": "json", "om_terrain": [ "lab_2x2_cargo_SE" ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ diff --git a/data/json/mapgen/lab/lab_modular/lab_2x2x2_RES_8_bedrooms.json b/data/json/mapgen/lab/lab_modular/lab_2x2x2_RES_8_bedrooms.json index f7db047922130..dfbff3b2fdc48 100644 --- a/data/json/mapgen/lab/lab_modular/lab_2x2x2_RES_8_bedrooms.json +++ b/data/json/mapgen/lab/lab_modular/lab_2x2x2_RES_8_bedrooms.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": [ "lab_res_8_NW" ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -66,7 +65,6 @@ "method": "json", "om_terrain": [ "lab_res_8_NE" ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -129,7 +127,6 @@ "method": "json", "om_terrain": [ "lab_res_8_SW" ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -178,7 +175,6 @@ "method": "json", "om_terrain": [ "lab_res_8_SE" ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ diff --git a/data/json/mapgen/lab/lab_modular/lab_2x2x2_RES_8_commons.json b/data/json/mapgen/lab/lab_modular/lab_2x2x2_RES_8_commons.json index ce599cec244c5..99da015308a1a 100644 --- a/data/json/mapgen/lab/lab_modular/lab_2x2x2_RES_8_commons.json +++ b/data/json/mapgen/lab/lab_modular/lab_2x2x2_RES_8_commons.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": [ "lab_res_8_NWD" ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -196,7 +195,6 @@ "method": "json", "om_terrain": [ "lab_res_8_NED" ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -252,7 +250,6 @@ "method": "json", "om_terrain": [ "lab_res_8_SWD" ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -306,7 +303,6 @@ "method": "json", "om_terrain": [ "lab_res_8_SED" ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ diff --git a/data/json/mapgen/lab/lab_modular/lab_cargo_surface.json b/data/json/mapgen/lab/lab_modular/lab_cargo_surface.json index f7b74f2ee2564..a003d327d65d8 100644 --- a/data/json/mapgen/lab/lab_modular/lab_cargo_surface.json +++ b/data/json/mapgen/lab/lab_modular/lab_cargo_surface.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": [ [ "lab_res_8_SWD_ground", "lab_res_8_SED_ground" ] ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -60,7 +59,6 @@ "method": "json", "om_terrain": [ [ "lab_res_8_SWU_ground", "lab_res_8_SEU_ground" ] ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -119,7 +117,6 @@ "method": "json", "om_terrain": [ [ "lab_CORE_2x1_SED_ground", "lab_CORE_2x1_SWD_ground" ] ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -185,7 +182,6 @@ "method": "json", "om_terrain": [ [ "lab_CORE_2x1_NED_ground", "lab_CORE_2x1_NWD_ground" ] ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -247,7 +243,6 @@ "method": "json", "om_terrain": [ [ "lab_CORE_2x1_WC_ground", "lab_CORE_2x1_EC_ground" ] ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -345,7 +340,6 @@ "om_terrain": [ [ "lab_2x1_CORE_-1W", "lab_2x1_CORE_-1E" ] ], "//": "level -1 for cargo ramps. TODO: complete this level for maintenance expansion.", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/lab/lab_modular/lab_central_hallway.json b/data/json/mapgen/lab/lab_modular/lab_central_hallway.json index 3dab22431e3af..1ea34aa1398e2 100644 --- a/data/json/mapgen/lab/lab_modular/lab_central_hallway.json +++ b/data/json/mapgen/lab/lab_modular/lab_central_hallway.json @@ -4,7 +4,6 @@ "//": "level -2", "om_terrain": [ [ "lab_CORE_2x1_1UP", "lab_CORE_2x1_2UP" ] ], "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -47,7 +46,6 @@ "om_terrain": "lab_CORE_2x1_1DN", "//": "level -3", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -109,7 +107,6 @@ "om_terrain": "lab_CORE_2x1_2DN", "//": "level -3", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -172,7 +169,6 @@ "method": "json", "//": "level -4", "om_terrain": [ "underground_lab_cargo_stationA" ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -217,7 +213,6 @@ "method": "json", "om_terrain": [ "underground_lab_cargo_stationB" ], "//": "level -4", - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -283,7 +278,6 @@ "method": "json", "om_terrain": [ "underground_lab_central_-5W" ], "//": "level -5", - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -383,7 +377,6 @@ "method": "json", "om_terrain": [ "underground_lab_central_-5E" ], "//": "level -5", - "weight": 250, "object": { "fill_ter": "t_metal_floor", "rows": [ @@ -428,7 +421,6 @@ "method": "json", "om_terrain": [ "underground_lab_central_-6W" ], "//": "level -6", - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -473,7 +465,6 @@ "method": "json", "om_terrain": [ "underground_lab_central_-6E" ], "//": "level -6", - "weight": 250, "object": { "fill_ter": "t_metal_floor", "rows": [ @@ -517,7 +508,6 @@ "method": "json", "om_terrain": [ "underground_lab_central_-7W" ], "//": "level -6", - "weight": 250, "object": { "fill_ter": "t_metal_floor", "rows": [ @@ -554,7 +544,6 @@ "method": "json", "om_terrain": [ "underground_lab_central_-7E" ], "//": "level -6", - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/lab/lab_modular/lab_health_clinic.json b/data/json/mapgen/lab/lab_modular/lab_health_clinic.json index aa2c95df1067d..155420d2ed8b0 100644 --- a/data/json/mapgen/lab/lab_modular/lab_health_clinic.json +++ b/data/json/mapgen/lab/lab_modular/lab_health_clinic.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "lab_health_z-2_A", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -43,7 +42,6 @@ "method": "json", "om_terrain": "lab_health_z-3_A", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -98,7 +96,6 @@ "method": "json", "om_terrain": "lab_health_z-3_B", "type": "mapgen", - "weight": 200, "//": "TODO: Move the boss to a nest when more variants are added", "object": { "fill_ter": "t_linoleum_white", @@ -144,7 +141,6 @@ "method": "json", "om_terrain": "lab_health_z-2_B", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_linoleum_white", "rows": [ diff --git a/data/json/mapgen/lab/lab_trains.json b/data/json/mapgen/lab/lab_trains.json index bd3ea8dbd9a9f..89fc009a85fc3 100644 --- a/data/json/mapgen/lab/lab_trains.json +++ b/data/json/mapgen/lab/lab_trains.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "lab_train_depot", "central_lab_train_depot" ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/lab_subway_vent_shaft.json b/data/json/mapgen/lab_subway_vent_shaft.json index 29438b89958b8..b68c7fc27ef16 100644 --- a/data/json/mapgen/lab_subway_vent_shaft.json +++ b/data/json/mapgen/lab_subway_vent_shaft.json @@ -26,7 +26,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "lab_subway_vent_shaft_roof" ], - "weight": 1000, "object": { "fill_ter": "t_open_air", "rows": [ @@ -62,7 +61,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "lab_subway_vent_shaft_surface" ], - "weight": 1000, "object": { "predecessor_mapgen": "forest", "rows": [ @@ -99,7 +97,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "lab_subway_vent_shaft-1" ], - "weight": 1000, "object": { "rows": [ "000000000000000000000000", @@ -134,7 +131,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "lab_subway_vent_shaft-2" ], - "weight": 1000, "object": { "rows": [ "########################", @@ -169,7 +165,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "lab_subway_vent_shaft-3" ], - "weight": 1000, "object": { "rows": [ "########################", @@ -204,7 +199,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "lab_subway_vent_shaft-4" ], - "weight": 1000, "object": { "rows": [ "########################", diff --git a/data/json/mapgen/lake_buildings/freshwater_research_station.json b/data/json/mapgen/lake_buildings/freshwater_research_station.json index 86f1125fd887b..98b11d50d9aa3 100644 --- a/data/json/mapgen/lake_buildings/freshwater_research_station.json +++ b/data/json/mapgen/lake_buildings/freshwater_research_station.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": "sealab_small_surface", - "weight": 250, "object": { "fill_ter": "t_metal_pontoon_dp", "rows": [ @@ -60,7 +59,6 @@ "type": "mapgen", "method": "json", "om_terrain": "sealab_small_roof", - "weight": 250, "object": { "fill_ter": "t_metal_flat_roof", "rows": [ @@ -97,7 +95,6 @@ "type": "mapgen", "method": "json", "om_terrain": "sealab_small_-1", - "weight": 250, "object": { "fill_ter": "t_bulkhead_floor", "rows": [ @@ -133,7 +130,6 @@ "type": "mapgen", "method": "json", "om_terrain": "sealab_small_-2", - "weight": 250, "object": { "fill_ter": "t_bulkhead_floor", "rows": [ @@ -169,7 +165,6 @@ "type": "mapgen", "method": "json", "om_terrain": "sealab_small_-3", - "weight": 250, "object": { "fill_ter": "t_bulkhead_floor", "rows": [ @@ -238,7 +233,6 @@ "type": "mapgen", "method": "json", "om_terrain": "sealab_small_-4", - "weight": 250, "object": { "fill_ter": "t_bulkhead_floor", "rows": [ @@ -293,7 +287,6 @@ "type": "mapgen", "method": "json", "om_terrain": "sealab_small_-5", - "weight": 250, "object": { "fill_ter": "t_metal_floor", "rows": [ diff --git a/data/json/mapgen/lake_buildings/lakeside_cabin.json b/data/json/mapgen/lake_buildings/lakeside_cabin.json index 66339de23a571..0bde5bb8af795 100644 --- a/data/json/mapgen/lake_buildings/lakeside_cabin.json +++ b/data/json/mapgen/lake_buildings/lakeside_cabin.json @@ -45,7 +45,6 @@ "type": "mapgen", "method": "json", "om_terrain": "cabin_lakeside", - "weight": 100, "object": { "predecessor_mapgen": "lake_shore", "rows": [ @@ -83,7 +82,6 @@ "type": "mapgen", "method": "json", "om_terrain": "cabin_lakeside_roof", - "weight": 100, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ @@ -120,7 +118,6 @@ "type": "mapgen", "method": "json", "om_terrain": "cabin_lakeside1", - "weight": 100, "object": { "predecessor_mapgen": "lake_shore", "rows": [ @@ -159,7 +156,6 @@ "type": "mapgen", "method": "json", "om_terrain": "cabin_lakeside1_roof", - "weight": 100, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ @@ -196,7 +192,6 @@ "type": "mapgen", "method": "json", "om_terrain": "cabin_lakeside2", - "weight": 50, "object": { "predecessor_mapgen": "lake_shore", "rows": [ @@ -242,7 +237,6 @@ "type": "mapgen", "method": "json", "om_terrain": "cabin_lakeside2_roof", - "weight": 100, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ @@ -279,7 +273,6 @@ "type": "mapgen", "method": "json", "om_terrain": "cabin_lakeside3", - "weight": 100, "object": { "predecessor_mapgen": "lake_shore", "rows": [ @@ -319,7 +312,6 @@ "type": "mapgen", "method": "json", "om_terrain": "cabin_lakeside3_roof", - "weight": 100, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ @@ -356,7 +348,6 @@ "type": "mapgen", "method": "json", "om_terrain": "cabin_lakeside4", - "weight": 100, "object": { "predecessor_mapgen": "lake_shore", "rows": [ @@ -397,7 +388,6 @@ "type": "mapgen", "method": "json", "om_terrain": "cabin_lakeside4_roof", - "weight": 100, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ @@ -434,7 +424,6 @@ "type": "mapgen", "method": "json", "om_terrain": "cabin_lakeside5", - "weight": 50, "object": { "predecessor_mapgen": "lake_shore", "rows": [ @@ -478,7 +467,6 @@ "type": "mapgen", "method": "json", "om_terrain": "cabin_lakeside5_roof", - "weight": 100, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ diff --git a/data/json/mapgen/lan_center.json b/data/json/mapgen/lan_center.json index d54594391f7bc..a6ca035bf84de 100644 --- a/data/json/mapgen/lan_center.json +++ b/data/json/mapgen/lan_center.json @@ -3,7 +3,6 @@ "method": "json", "om_terrain": "lancenter", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -131,7 +130,6 @@ "method": "json", "om_terrain": "lancenter_1", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/laundromat.json b/data/json/mapgen/laundromat.json index a4f12fb8042a2..3eab091e7352f 100644 --- a/data/json/mapgen/laundromat.json +++ b/data/json/mapgen/laundromat.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_laundromat" ], - "weight": 400, "object": { "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_white" }, "rows": [ @@ -136,7 +135,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_laundromat_1" ], - "weight": 400, "object": { "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_white" }, "rows": [ diff --git a/data/json/mapgen/lmoe.json b/data/json/mapgen/lmoe.json index 1218a21a5231f..f65006d77be49 100644 --- a/data/json/mapgen/lmoe.json +++ b/data/json/mapgen/lmoe.json @@ -4,7 +4,6 @@ "method": "json", "om_terrain": [ "lmoe" ], "//": "Above ground", - "weight": 100, "object": { "rows": [ " S S S", @@ -40,7 +39,6 @@ "method": "json", "om_terrain": [ "lmoe_roof" ], "//": "Above ground", - "weight": 100, "object": { "fill_ter": "t_region_groundcover_barren", "rows": [ @@ -214,7 +212,6 @@ "om_terrain": [ "lmoe_prepperquest" ], "//": "Above ground", "//2": "The front door to this LMOE is locked and can be unlocked by doing the prepper_1 quest line.", - "weight": 100, "object": { "fill_ter": "t_metal_floor", "rows": [ @@ -254,7 +251,6 @@ "om_terrain": [ "lmoe_under_empty_prepperquest" ], "//": "This particular 2-bed shelter is a more professionally done, all metal bomb shelter with kitchen, secret safe room / gun locker, and workshop.", "//2": "This terrain is the destination for the prepper_1 quest. The front door is locked and can be unlocked by completing the quest.", - "weight": 100, "object": { "fill_ter": "t_metal_floor", "rows": [ @@ -293,7 +289,6 @@ "//": "Stocked up LMOE shelter.", "//2": "This particular 2-bed shelter is a more professionally done, all metal bomb shelter with kitchen, secret safe room / gun locker, and workshop.", "//3": "For now this is just filler terrain, it shouldn't spawn in game.", - "weight": 50, "object": { "fill_ter": "t_metal_floor", "rows": [ @@ -331,7 +326,6 @@ "om_terrain": [ "lmoe_zombie" ], "//": "Above ground", "//2": "blob psychosis influences more aggressive deterrents for intruders", - "weight": 100, "object": { "rows": [ " S S S", diff --git a/data/json/mapgen/mall/mall_second_floor.json b/data/json/mapgen/mall/mall_second_floor.json index feaee5c30996e..2877f78de8425 100644 --- a/data/json/mapgen/mall/mall_second_floor.json +++ b/data/json/mapgen/mall/mall_second_floor.json @@ -84,7 +84,6 @@ "type": "mapgen", "method": "json", "om_terrain": "mall_b_10", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ @@ -126,7 +125,6 @@ "type": "mapgen", "method": "json", "om_terrain": "mall_b_11", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ @@ -171,7 +169,6 @@ "type": "mapgen", "method": "json", "om_terrain": "mall_b_12", - "weight": 200, "object": { "fill_ter": "t_linoleum_gray", "rows": [ @@ -251,7 +248,6 @@ "type": "mapgen", "method": "json", "om_terrain": "mall_b_13", - "weight": 200, "object": { "fill_ter": "t_linoleum_gray", "rows": [ @@ -311,7 +307,6 @@ "type": "mapgen", "method": "json", "om_terrain": "mall_b_14", - "weight": 200, "object": { "fill_ter": "t_linoleum_gray", "rows": [ diff --git a/data/json/mapgen/mansion.json b/data/json/mapgen/mansion.json index 420b6c08ac0d5..af7dc669f1311 100644 --- a/data/json/mapgen/mansion.json +++ b/data/json/mapgen/mansion.json @@ -4,7 +4,6 @@ "method": "json", "om_terrain": [ "mansion_e1d" ], "//": "basement road_alt, wild 1, 0, -1.", - "weight": 1000, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -57,7 +56,6 @@ "method": "json", "om_terrain": [ "mansion_e1" ], "//": "updated", - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -100,7 +98,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_e1u" ], - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -147,7 +144,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_e2d" ], - "weight": 1000, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -202,7 +198,6 @@ "method": "json", "om_terrain": [ "mansion_e2" ], "//": "updated", - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -251,7 +246,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_e2u" ], - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -306,7 +300,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_t1d" ], - "weight": 700, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -344,7 +337,6 @@ "method": "json", "om_terrain": [ "mansion_t1" ], "//": "updated", - "weight": 700, "object": { "fill_ter": "t_floor", "rows": [ @@ -395,7 +387,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_t1u" ], - "weight": 700, "object": { "fill_ter": "t_floor", "rows": [ @@ -831,7 +822,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_t4d" ], - "weight": 1100, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -884,7 +874,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_t4" ], - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -940,7 +929,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_t4u" ], - "weight": 1100, "object": { "fill_ter": "t_floor", "rows": [ @@ -988,7 +976,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_t5d" ], - "weight": 400, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -1051,7 +1038,6 @@ "method": "json", "om_terrain": [ "mansion_t5" ], "//": "updated", - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -1109,7 +1095,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_t5u" ], - "weight": 400, "object": { "fill_ter": "t_floor", "rows": [ @@ -1163,7 +1148,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_t6d" ], - "weight": 1000, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -1241,7 +1225,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_t6" ], - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -1302,7 +1285,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_t6u" ], - "weight": 1000, "object": { "fill_ter": { "param": "carpet_color_type", "fallback": "t_carpet_green" }, "rows": [ @@ -1368,7 +1350,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_t7d" ], - "weight": 1000, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -1426,7 +1407,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_t7" ], - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -1490,7 +1470,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_t7u" ], - "weight": 1000, "object": { "fill_ter": { "param": "carpet_color_type", "fallback": "t_carpet_green" }, "rows": [ @@ -1542,7 +1521,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_+1d" ], - "weight": 1000, "object": { "fill_ter": "t_dirt", "rows": [ @@ -1581,7 +1559,6 @@ "method": "json", "om_terrain": [ "mansion_+1" ], "//": "updated", - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -1626,7 +1603,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_+1u" ], - "weight": 1000, "object": { "fill_ter": "t_floor_noroof", "rows": [ @@ -1739,7 +1715,6 @@ "method": "json", "om_terrain": [ "mansion_+2" ], "//": "updated", - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -1790,7 +1765,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_+2u" ], - "weight": 900, "object": { "fill_ter": "t_floor", "rows": [ @@ -1887,7 +1861,6 @@ "method": "json", "om_terrain": [ "mansion_+3" ], "//": "updated", - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -1951,7 +1924,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_+3u" ], - "weight": 800, "object": { "fill_ter": "t_floor", "rows": [ @@ -1989,7 +1961,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_+4d" ], - "weight": 1000, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -2045,7 +2016,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_+4" ], - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -2125,7 +2095,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_+4u" ], - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -2176,7 +2145,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_c1d" ], - "weight": 700, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -2220,7 +2188,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_c1" ], - "weight": 700, "object": { "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, "rows": [ @@ -2275,7 +2242,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_c1u" ], - "weight": 700, "object": { "fill_ter": "t_floor", "rows": [ @@ -2336,7 +2302,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_c2d" ], - "weight": 1000, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -2387,7 +2352,6 @@ "method": "json", "om_terrain": [ "mansion_c2" ], "//": "updated", - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -2452,7 +2416,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_c2u" ], - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -2511,7 +2474,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_c3d" ], - "weight": 500, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -2556,7 +2518,6 @@ "method": "json", "om_terrain": [ "mansion_c3" ], "//": "updated", - "weight": 500, "object": { "fill_ter": "t_floor", "rows": [ @@ -2613,7 +2574,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_c3u" ], - "weight": 500, "object": { "fill_ter": "t_floor", "rows": [ @@ -2672,7 +2632,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_c4d" ], - "weight": 1000, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -2750,7 +2709,6 @@ "method": "json", "om_terrain": [ "mansion_c4" ], "//": "updated", - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -2806,7 +2764,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_c4u" ], - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -2856,7 +2813,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_c5d" ], - "weight": 1000, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -2905,7 +2861,6 @@ "method": "json", "om_terrain": [ "mansion_c5" ], "//": "updated", - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -2961,7 +2916,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_c5u" ], - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/mansion_boarded.json b/data/json/mapgen/mansion_boarded.json index 56f6d8fa28a52..e8e5e604b4ea5 100644 --- a/data/json/mapgen/mansion_boarded.json +++ b/data/json/mapgen/mansion_boarded.json @@ -4,7 +4,6 @@ "method": "json", "om_terrain": [ "mansion_boarded_e1" ], "//": "updated", - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -47,7 +46,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_boarded_e1u" ], - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -95,7 +93,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_boarded_t2d" ], - "weight": 1000, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -158,7 +155,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_boarded_t2d_start" ], - "weight": 800, "//": "possible starting room, sex lair", "object": { "fill_ter": "t_thconc_floor", @@ -261,7 +257,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_boarded_t2" ], - "weight": 1100, "object": { "fill_ter": "t_floor", "rows": [ @@ -322,7 +317,6 @@ "method": "json", "om_terrain": [ "mansion_boarded_t2_start" ], "//": "possible starting room, panic room", - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -506,7 +500,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_boarded_t4" ], - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -563,7 +556,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_boarded_t4u" ], - "weight": 1100, "object": { "fill_ter": "t_floor", "rows": [ @@ -613,7 +605,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_boarded_c1" ], - "weight": 700, "object": { "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, "rows": [ @@ -669,7 +660,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_boarded_c1u" ], - "weight": 700, "object": { "fill_ter": "t_floor", "rows": [ @@ -733,7 +723,6 @@ "method": "json", "om_terrain": [ "mansion_boarded_c2" ], "//": "updated", - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -800,7 +789,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_boarded_c2u" ], - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -861,7 +849,6 @@ "method": "json", "om_terrain": [ "mansion_boarded_c3" ], "//": "updated", - "weight": 500, "object": { "fill_ter": "t_floor", "rows": [ @@ -919,7 +906,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_boarded_c3u" ], - "weight": 500, "object": { "fill_ter": "t_floor", "rows": [ @@ -980,7 +966,6 @@ "method": "json", "om_terrain": [ "mansion_boarded_c4" ], "//": "updated", - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -1037,7 +1022,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mansion_boarded_c4u" ], - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/map_extras/laststand.json b/data/json/mapgen/map_extras/laststand.json index b31f9ff584701..b29830c45a4cc 100644 --- a/data/json/mapgen/map_extras/laststand.json +++ b/data/json/mapgen/map_extras/laststand.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_LAST_STAND", + "id": "GROUP_LAST_STAND", "default": "mon_null", "monsters": [ { "monster": "mon_civilian_police", "weight": 1, "cost_multiplier": 1, "ends": "5 days" }, diff --git a/data/json/mapgen/map_extras/military.json b/data/json/mapgen/map_extras/military.json index 80dded3c91134..f653a2e6d6b46 100644 --- a/data/json/mapgen/map_extras/military.json +++ b/data/json/mapgen/map_extras/military.json @@ -22,7 +22,7 @@ ] }, { - "name": "GROUP_MIL_EXTRA", + "id": "GROUP_MIL_EXTRA", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_soldier", "weight": 76 }, { "monster": "mon_feral_soldier", "weight": 20 } ] }, diff --git a/data/json/mapgen/map_extras/toxic_waste.json b/data/json/mapgen/map_extras/toxic_waste.json index 973cc05ceb084..e01ad5b636415 100644 --- a/data/json/mapgen/map_extras/toxic_waste.json +++ b/data/json/mapgen/map_extras/toxic_waste.json @@ -98,7 +98,7 @@ }, { "type": "monstergroup", - "name": "GROUP_TOXIC_WASTE", + "id": "GROUP_TOXIC_WASTE", "monsters": [ { "monster": "mon_sewer_rat", "weight": 60 }, { "monster": "mon_blob", "weight": 30 }, @@ -107,7 +107,7 @@ }, { "type": "monstergroup", - "name": "GROUP_TOXIC_WASTE_CORPSES", + "id": "GROUP_TOXIC_WASTE_CORPSES", "monsters": [ { "monster": "mon_mutant_experimental", "weight": 60 }, { "monster": "mon_mutant_antler", "weight": 30 }, diff --git a/data/json/mapgen/marina.json b/data/json/mapgen/marina.json index 44dc87c99970c..ad9d90095ba6b 100644 --- a/data/json/mapgen/marina.json +++ b/data/json/mapgen/marina.json @@ -8,7 +8,6 @@ [ "marina_15", "marina_14", "marina_13", "marina_12", "marina_11" ], [ "marina_20", "marina_19", "marina_18", "marina_17", "marina_16" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -247,7 +246,6 @@ "method": "json", "om_terrain": [ [ "marina_15_roof", "marina_12_roof", "marina_11_roof" ] ], "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/megastore.json b/data/json/mapgen/megastore.json index a8ae91849b24e..98b56be5811cd 100644 --- a/data/json/mapgen/megastore.json +++ b/data/json/mapgen/megastore.json @@ -172,7 +172,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "megastore_parking_0_4" ], [ "megastore_parking_0_3" ], [ "megastore_parking_0_2" ] ], - "weight": 100, "object": { "fill_ter": "t_pavement", "rows": [ @@ -272,7 +271,6 @@ [ "megastore_parking_3_1", "megastore_parking_2_1", "megastore_parking_1_1", "megastore_parking_0_1" ], [ "megastore_parking_3_0", "megastore_parking_2_0", "megastore_parking_1_0", "megastore_parking_0_0" ] ], - "weight": 100, "object": { "fill_ter": "t_pavement", "rows": [ diff --git a/data/json/mapgen/mi-go/mi-go_encampment.json b/data/json/mapgen/mi-go/mi-go_encampment.json index eb53ea362c278..e1f9784242fc0 100644 --- a/data/json/mapgen/mi-go/mi-go_encampment.json +++ b/data/json/mapgen/mi-go/mi-go_encampment.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "mi-go_camp1", "mi-go_camp2" ] ], - "weight": 100, "object": { "fill_ter": "t_floor_resin", "rows": [ @@ -58,7 +57,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "mi-go_camp1-1", "mi-go_camp2-1" ] ], - "weight": 100, "object": { "fill_ter": "t_floor_resin", "rows": [ @@ -94,7 +92,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mi-go_camp2-2" ], - "weight": 100, "object": { "fill_ter": "t_floor_resin", "rows": [ @@ -130,7 +127,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mi-go_camp2-3" ], - "weight": 100, "object": { "fill_ter": "t_floor_resin", "rows": [ diff --git a/data/json/mapgen/microlab/microlab_connector.json b/data/json/mapgen/microlab/microlab_connector.json index 61a5ac4075d03..0896d12c58824 100644 --- a/data/json/mapgen/microlab/microlab_connector.json +++ b/data/json/mapgen/microlab/microlab_connector.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "microlab_sub_connector", "microlab_sub_connector_ratkin" ], - "weight": 1000, "object": { "fill_ter": "t_concrete", "rows": [ @@ -147,7 +146,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "microlab_generic_sub_entry", "microlab_ratkin_sub_entry" ], - "weight": 1000, "object": { "fill_ter": "t_strconc_floor", "rows": [ diff --git a/data/json/mapgen/microlab/microlab_moster_nests.json b/data/json/mapgen/microlab/microlab_moster_nests.json index 2d067ea23654d..ff5ef3ef0263b 100644 --- a/data/json/mapgen/microlab/microlab_moster_nests.json +++ b/data/json/mapgen/microlab/microlab_moster_nests.json @@ -5,7 +5,7 @@ "terrain": [ { "result": [ "t_strconc_floor", [ "t_region_groundcover_forest", 3 ] ], "valid_terrain": [ "t_strconc_floor" ] } ] }, { - "name": "GROUP_MLAB_RUST_ZOMBIE", + "id": "GROUP_MLAB_RUST_ZOMBIE", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_rust", "weight": 250 }, @@ -13,7 +13,7 @@ ] }, { - "name": "GROUP_MLAB_ACID_ZOMBIE", + "id": "GROUP_MLAB_ACID_ZOMBIE", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_acidic", "weight": 250 }, @@ -21,7 +21,7 @@ ] }, { - "name": "GROUP_MLAB_PHASE_ZOMBIE", + "id": "GROUP_MLAB_PHASE_ZOMBIE", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_phase_skulker", "weight": 250 }, @@ -29,7 +29,7 @@ ] }, { - "name": "GROUP_MLAB_HUNTER_ZOMBIE", + "id": "GROUP_MLAB_HUNTER_ZOMBIE", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_hunter", "weight": 250 }, @@ -37,7 +37,7 @@ ] }, { - "name": "GROUP_MLAB_RAPTOR_ZOMBIE", + "id": "GROUP_MLAB_RAPTOR_ZOMBIE", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_pupa", "weight": 50 }, @@ -46,7 +46,7 @@ ] }, { - "name": "GROUP_MLAB_MUTANTS", + "id": "GROUP_MLAB_MUTANTS", "type": "monstergroup", "monsters": [ { "monster": "mon_mutant_experimental", "weight": 150 }, @@ -56,7 +56,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MLAB_ROBOT", + "id": "GROUP_MLAB_ROBOT", "monsters": [ { "monster": "mon_science_bot", "weight": 200 }, { "monster": "mon_manhack", "weight": 200 }, @@ -70,7 +70,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MLAB_LEECH_PLANT", + "id": "GROUP_MLAB_LEECH_PLANT", "monsters": [ { "monster": "mon_leech_root_drone", "weight": 200 }, { "monster": "mon_leech_root_runner", "weight": 200 }, @@ -79,7 +79,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MLAB_YRAX", + "id": "GROUP_MLAB_YRAX", "monsters": [ { "monster": "mon_yrax_trifacet", "weight": 200 }, { "monster": "mon_yrax_triakis", "weight": 200 }, diff --git a/data/json/mapgen/military/mil_base/mil_base_z-1.json b/data/json/mapgen/military/mil_base/mil_base_z-1.json index 0aad5f152c1ca..3d2c9748392d5 100644 --- a/data/json/mapgen/military/mil_base/mil_base_z-1.json +++ b/data/json/mapgen/military/mil_base/mil_base_z-1.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_tunnels_a" ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -39,7 +38,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_tunnels_b" ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -75,7 +73,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_tunnels_c" ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -119,7 +116,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_tunnels_d" ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -155,7 +151,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_tunnels_e" ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -200,7 +195,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_tunnels_f" ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -249,7 +243,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_tunnels_g" ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -285,7 +278,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_tunnels_h" ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -321,7 +313,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_tunnels_i" ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/military/mil_base/mil_base_z0.json b/data/json/mapgen/military/mil_base/mil_base_z0.json index dc32bdfa204ef..1928c4093c2ef 100644 --- a/data/json/mapgen/military/mil_base/mil_base_z0.json +++ b/data/json/mapgen/military/mil_base/mil_base_z0.json @@ -8,7 +8,6 @@ [ "mil_base_1c", "mil_base_2c", "mil_base_3c", "mil_base_4c" ], [ "mil_base_1d", "mil_base_2d", "mil_base_3d", "mil_base_4d" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -163,7 +162,6 @@ [ "mil_base_5c", "mil_base_6c", "mil_base_7c", "mil_base_8c" ], [ "mil_base_5d", "mil_base_6d", "mil_base_7d", "mil_base_8d" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -315,7 +313,6 @@ [ "mil_base_1f", "mil_base_2f", "mil_base_3f", "mil_base_4f" ], [ "mil_base_1g", "mil_base_2g", "mil_base_3g", "mil_base_4g" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -589,7 +586,6 @@ [ "mil_base_5f", "mil_base_6f", "mil_base_7f", "mil_base_8f" ], [ "mil_base_5g", "mil_base_6g", "mil_base_7g", "mil_base_8g" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -867,7 +863,6 @@ [ "mil_base_1j", "mil_base_2j", "mil_base_3j", "mil_base_4j" ], [ "mil_base_1k", "mil_base_2k", "mil_base_3k", "mil_base_4k" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -1018,7 +1013,6 @@ [ "mil_base_5j", "mil_base_6j", "mil_base_7j", "mil_base_8j" ], [ "mil_base_5k", "mil_base_6k", "mil_base_7k", "mil_base_8k" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -1317,7 +1311,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_road_entrance" ], - "weight": 250, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -1359,7 +1352,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_minefield_n" ], - "weight": 250, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -1397,7 +1389,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_minefield_ne" ], - "weight": 250, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -1440,7 +1431,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_minefield_e" ], - "weight": 250, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -1478,7 +1468,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_minefield_se" ], - "weight": 250, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -1521,7 +1510,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_minefield_s" ], - "weight": 250, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -1559,7 +1547,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_minefield_sw" ], - "weight": 250, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -1602,7 +1589,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_minefield_w" ], - "weight": 250, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -1640,7 +1626,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_minefield_nw" ], - "weight": 250, "object": { "fill_ter": "t_region_soil", "rows": [ diff --git a/data/json/mapgen/military/mil_base/mil_base_z1.json b/data/json/mapgen/military/mil_base/mil_base_z1.json index c96bbfd66e93d..87f81c78549cd 100644 --- a/data/json/mapgen/military/mil_base/mil_base_z1.json +++ b/data/json/mapgen/military/mil_base/mil_base_z1.json @@ -8,7 +8,6 @@ [ "mil_base_1c1", "mil_base_2c1", "mil_base_3c1", "mil_base_4c1" ], [ "mil_base_1d1", "mil_base_2d1", "mil_base_3d1", "mil_base_4d1" ] ], - "weight": 250, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -122,7 +121,6 @@ [ "mil_base_5c1", "mil_base_6c1", "mil_base_7c1", "mil_base_8c1" ], [ "mil_base_5d1", "mil_base_6d1", "mil_base_7d1", "mil_base_8d1" ] ], - "weight": 250, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -235,7 +233,6 @@ [ "mil_base_1f1", "mil_base_2f1", "mil_base_3f1", "mil_base_4f1" ], [ "mil_base_1g1", "mil_base_2g1", "mil_base_3g1", "mil_base_4g1" ] ], - "weight": 250, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -332,7 +329,6 @@ [ "mil_base_5f1", "mil_base_6f1", "mil_base_7f1", "mil_base_8f1" ], [ "mil_base_5g1", "mil_base_6g1", "mil_base_7g1", "mil_base_8g1" ] ], - "weight": 250, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -429,7 +425,6 @@ [ "mil_base_1j1", "mil_base_2j1", "mil_base_3j1", "mil_base_4j1" ], [ "mil_base_1k1", "mil_base_2k1", "mil_base_3k1", "mil_base_4k1" ] ], - "weight": 250, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -553,7 +548,6 @@ [ "mil_base_5j1", "mil_base_6j1", "mil_base_7j1", "mil_base_8j1" ], [ "mil_base_5k1", "mil_base_6k1", "mil_base_7k1", "mil_base_8k1" ] ], - "weight": 250, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/military/mil_base/mil_base_z2.json b/data/json/mapgen/military/mil_base/mil_base_z2.json index 8f3f156cd291c..e5aed1d2392c3 100644 --- a/data/json/mapgen/military/mil_base/mil_base_z2.json +++ b/data/json/mapgen/military/mil_base/mil_base_z2.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "mil_base_1b2", "mil_base_2b2", "mil_base_3b2", "mil_base_4b2" ] ], - "weight": 250, "object": { "fill_ter": "t_metal_floor_no_roof", "rows": [ @@ -39,7 +38,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "mil_base_5b2", "mil_base_6b2", "mil_base_7b2", "mil_base_8b2" ] ], - "weight": 250, "object": { "fill_ter": "t_metal_floor_no_roof", "rows": [ @@ -75,7 +73,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "mil_base_1g2", "mil_base_2g2", "mil_base_3g2" ] ], - "weight": 250, "object": { "fill_ter": "t_metal_floor_no_roof", "rows": [ @@ -112,7 +109,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_8g2" ], - "weight": 250, "object": { "fill_ter": "t_metal_floor_no_roof", "rows": [ @@ -148,7 +144,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_3i2" ], - "weight": 250, "object": { "fill_ter": "t_metal_floor_no_roof", "rows": [ @@ -185,7 +180,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "mil_base_1k2", "mil_base_2k2", "mil_base_3k2", "mil_base_4k2" ] ], - "weight": 250, "object": { "fill_ter": "t_metal_floor_no_roof", "rows": [ @@ -221,7 +215,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_8k2" ], - "weight": 250, "object": { "fill_ter": "t_metal_floor_no_roof", "rows": [ diff --git a/data/json/mapgen/military/mil_base/mil_base_z3.json b/data/json/mapgen/military/mil_base/mil_base_z3.json index 0124962aea2ed..33ae57befd9ab 100644 --- a/data/json/mapgen/military/mil_base/mil_base_z3.json +++ b/data/json/mapgen/military/mil_base/mil_base_z3.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_3i3" ], - "weight": 250, "object": { "fill_ter": "t_metal_floor_no_roof", "rows": [ diff --git a/data/json/mapgen/military/mil_base/mil_base_z4.json b/data/json/mapgen/military/mil_base/mil_base_z4.json index 5668a2c68fd55..788435ab5e848 100644 --- a/data/json/mapgen/military/mil_base/mil_base_z4.json +++ b/data/json/mapgen/military/mil_base/mil_base_z4.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "mil_base_3i4" ], - "weight": 250, "object": { "fill_ter": "t_metal_floor_no_roof", "rows": [ diff --git a/data/json/mapgen/militia/GM_LODGE.json b/data/json/mapgen/militia/GM_LODGE.json index 2d6f6d7e756ce..2afff5dc2a59c 100644 --- a/data/json/mapgen/militia/GM_LODGE.json +++ b/data/json/mapgen/militia/GM_LODGE.json @@ -238,7 +238,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "GMLODGE2_roof_2", "GMLODGE2_roof_3" ], [ "GMLODGE3_roof_2", "GMLODGE3_roof_3" ] ], - "weight": 100, "object": { "fill_ter": "t_open_air", "rows": [ diff --git a/data/json/mapgen/mine/mine_spiral.json b/data/json/mapgen/mine/mine_spiral.json index 6fbe2d4f26f12..2b043a9cc09e6 100644 --- a/data/json/mapgen/mine/mine_spiral.json +++ b/data/json/mapgen/mine/mine_spiral.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_MINER", + "id": "GROUP_MINER", "monsters": [ { "monster": "mon_zombie_miner" } ] }, { diff --git a/data/json/mapgen/missile_silo.json b/data/json/mapgen/missile_silo.json index 1252954179477..7ae6fd2cdc7fe 100644 --- a/data/json/mapgen/missile_silo.json +++ b/data/json/mapgen/missile_silo.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "silo" ], - "weight": 400, "object": { "fill_ter": "t_region_groundcover", "rows": [ @@ -59,7 +58,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "silo_roof" ], - "weight": 400, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -96,7 +94,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "silo_1" ], - "weight": 400, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -179,7 +176,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "silo_2" ], - "weight": 400, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -278,7 +274,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "silo_3" ], - "weight": 400, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -354,7 +349,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "silo_4" ], - "weight": 400, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/mobile_home_park/mobile_home.json b/data/json/mapgen/mobile_home_park/mobile_home.json index 9bfdd34457f96..e90edf96c2a01 100644 --- a/data/json/mapgen/mobile_home_park/mobile_home.json +++ b/data/json/mapgen/mobile_home_park/mobile_home.json @@ -288,7 +288,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "prefab_roof" ], - "weight": 100, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ diff --git a/data/json/mapgen/mobile_home_park/mobile_home_park.json b/data/json/mapgen/mobile_home_park/mobile_home_park.json index 8428309f953c5..95c68a13bd205 100644 --- a/data/json/mapgen/mobile_home_park/mobile_home_park.json +++ b/data/json/mapgen/mobile_home_park/mobile_home_park.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "trailer_hub_10" ], - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -42,7 +41,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "trailer_hub_10_roof" ], - "weight": 100, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ @@ -117,7 +115,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "trailer_hub_00", "null" ], [ "trailer_hub_01", "trailer_hub_11" ] ], - "weight": 100, "object": { "fill_ter": "t_region_groundcover", "rows": [ @@ -185,7 +182,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "trailer_caravan_00", "trailer_caravan_10" ], [ "trailer_caravan_01", "trailer_caravan_11" ] ], - "weight": 100, "object": { "fill_ter": "t_region_groundcover", "rows": [ @@ -256,7 +252,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "trailer_commercial_00", "trailer_commercial_10" ] ], - "weight": 100, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -342,7 +337,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "trailer_commercial_00_roof", "trailer_commercial_10_roof" ] ], - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -378,7 +372,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "trailer_public_00", "trailer_public_10" ] ], - "weight": 100, "object": { "fill_ter": "t_region_groundcover", "rows": [ @@ -428,7 +421,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "trailer_public_00_roof", "trailer_public_10_roof" ] ], - "weight": 100, "object": { "rows": [ " ", @@ -538,7 +530,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "trailer_road_1parkway" ], - "weight": 100, "object": { "fill_ter": "t_region_groundcover", "rows": [ @@ -576,7 +567,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "trailer_road_2parkway" ], - "weight": 100, "object": { "fill_ter": "t_region_groundcover", "rows": [ @@ -614,7 +604,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "trailer_road_turn" ], - "weight": 100, "object": { "fill_ter": "t_region_groundcover", "rows": [ diff --git a/data/json/mapgen/moonshine_camp.json b/data/json/mapgen/moonshine_camp.json index 65fb6608d879f..7060ca4324dc9 100644 --- a/data/json/mapgen/moonshine_camp.json +++ b/data/json/mapgen/moonshine_camp.json @@ -169,7 +169,6 @@ "method": "json", "om_terrain": "moonshine_still_1", "type": "mapgen", - "weight": 100, "object": { "predecessor_mapgen": "forest", "rows": [ @@ -247,7 +246,6 @@ "method": "json", "om_terrain": "moonshine_still_2", "type": "mapgen", - "weight": 100, "object": { "predecessor_mapgen": "forest", "rows": [ diff --git a/data/json/mapgen/movie_theater.json b/data/json/mapgen/movie_theater.json index 8f2b6553a6227..da35ac012267d 100644 --- a/data/json/mapgen/movie_theater.json +++ b/data/json/mapgen/movie_theater.json @@ -2,7 +2,6 @@ { "method": "json", "type": "mapgen", - "weight": 100, "om_terrain": [ [ "movietheater_0_0", "movietheater_1_0", "movietheater_2_0" ], [ "movietheater_0_1", "movietheater_1_1", "movietheater_2_1" ], @@ -161,7 +160,6 @@ { "method": "json", "type": "mapgen", - "weight": 100, "om_terrain": [ [ "movietheater_roof_0_0", "movietheater_roof_1_0", "movietheater_roof_2_0" ], [ "movietheater_roof_0_1", "movietheater_roof_1_1", "movietheater_roof_2_1" ], diff --git a/data/json/mapgen/music_venue.json b/data/json/mapgen/music_venue.json index 2b5745837ac16..16d6a8ab1c459 100644 --- a/data/json/mapgen/music_venue.json +++ b/data/json/mapgen/music_venue.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": "music_venue", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -109,7 +108,6 @@ "type": "mapgen", "method": "json", "om_terrain": "music_venue_roof", - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -153,7 +151,6 @@ "type": "mapgen", "method": "json", "om_terrain": "music_venue_1", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -255,7 +252,6 @@ "type": "mapgen", "method": "json", "om_terrain": "music_venue_1_roof", - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -297,7 +293,6 @@ "type": "mapgen", "method": "json", "om_terrain": "music_venue_1_roof_top", - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/natural_spring.json b/data/json/mapgen/natural_spring.json index a97348b645aee..50496193db60b 100644 --- a/data/json/mapgen/natural_spring.json +++ b/data/json/mapgen/natural_spring.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": "natural_spring", - "weight": 100, "object": { "rotation": [ 0, 3 ], "predecessor_mapgen": "forest_thick", diff --git a/data/json/mapgen/nested/strip_mall_nested.json b/data/json/mapgen/nested/strip_mall_nested.json index 78dc72bc02217..ac084b96074f3 100644 --- a/data/json/mapgen/nested/strip_mall_nested.json +++ b/data/json/mapgen/nested/strip_mall_nested.json @@ -76,7 +76,6 @@ "method": "json", "//": "Strip mall stores must be 23x by 23y, each chunk must include a back wall and storefront, and both the bottom and top row should be a sidewalk. Use this sample as a base. Rename it to one of the following: strip_mall_shop_a; strip_mall_shop_b; strip_mall_shop_c; strip_mall_shop_d", "nested_mapgen_id": "strip_mall_sample", - "weight": 100, "object": { "mapgensize": [ 23, 23 ], "rotation": [ 0, 3 ], @@ -863,7 +862,6 @@ "method": "json", "//": "Survivor's camp, chance to spawn in the second EMPTY - FOR LEASE shop", "nested_mapgen_id": "strip_mall_camp", - "weight": 100, "object": { "mapgensize": [ 23, 23 ], "rotation": [ 0, 3 ], @@ -947,7 +945,6 @@ "method": "json", "//": "Survivor's camp, chance to spawn in the second EMPTY - FOR LEASE shop", "nested_mapgen_id": "strip_mall_camp2", - "weight": 100, "object": { "mapgensize": [ 23, 23 ], "rotation": [ 0, 3 ], diff --git a/data/json/mapgen/nether_monster_corpse/monster_head.json b/data/json/mapgen/nether_monster_corpse/monster_head.json index ee3d9d73165cb..c63e22175ecca 100644 --- a/data/json/mapgen/nether_monster_corpse/monster_head.json +++ b/data/json/mapgen/nether_monster_corpse/monster_head.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": "corpse_neck", - "weight": 100, "object": { "fill_ter": "t_nm_floor_flesh", "rows": [ @@ -78,7 +77,6 @@ "type": "mapgen", "method": "json", "om_terrain": "corpse_neck_center", - "weight": 150, "object": { "fill_ter": "t_nm_floor_flesh", "rows": [ diff --git a/data/json/mapgen/office_cubical.json b/data/json/mapgen/office_cubical.json index 5e7743fc6d868..5c9ea7500e126 100644 --- a/data/json/mapgen/office_cubical.json +++ b/data/json/mapgen/office_cubical.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "office_cubical" ], - "weight": 300, "object": { "fill_ter": "t_floor", "rows": [ @@ -131,7 +130,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "office_cubical_1" ], - "weight": 300, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/office_skyscraper.json b/data/json/mapgen/office_skyscraper.json index 72c966fac3cd0..763b033032457 100644 --- a/data/json/mapgen/office_skyscraper.json +++ b/data/json/mapgen/office_skyscraper.json @@ -3,7 +3,6 @@ "type": "mapgen", "om_terrain": [ [ "office_skyscraper_1", "office_skyscraper_2" ], [ "office_skyscraper_3", "office_skyscraper_4" ] ], "method": "json", - "weight": 250, "object": { "fill_ter": "t_soil", "rows": [ @@ -85,7 +84,6 @@ "type": "mapgen", "om_terrain": [ [ "office_skyscraper_5", "office_skyscraper_6" ], [ "office_skyscraper_7", "office_skyscraper_8" ] ], "method": "json", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -165,7 +163,6 @@ [ "office_skyscraper_apartments_111", "office_skyscraper_apartments_011" ], [ "office_skyscraper_apartments_101", "office_skyscraper_apartments_001" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -234,7 +231,6 @@ [ "office_skyscraper_apartments_112", "office_skyscraper_apartments_012" ], [ "office_skyscraper_apartments_102", "office_skyscraper_apartments_002" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -300,7 +296,6 @@ "type": "mapgen", "om_terrain": [ [ "office_skyscraper_9", "office_skyscraper_10" ], [ "office_skyscraper_11", "office_skyscraper_12" ] ], "method": "json", - "weight": 250, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -538,7 +533,6 @@ "type": "mapgen", "om_terrain": [ [ "office_skyscraper_9b", "office_skyscraper_10b" ] ], "method": "json", - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -647,7 +641,6 @@ "type": "mapgen", "om_terrain": [ [ "office_skyscraper_13", "office_skyscraper_14" ], [ "office_skyscraper_15", "office_skyscraper_16" ] ], "method": "json", - "weight": 250, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -758,7 +751,6 @@ "type": "mapgen", "om_terrain": [ [ "office_skyscraper_17", "office_skyscraper_18" ], [ "office_skyscraper_19", "office_skyscraper_20" ] ], "method": "json", - "weight": 250, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/office_small.json b/data/json/mapgen/office_small.json index 329f6e95cc492..c5f93e9975cf4 100644 --- a/data/json/mapgen/office_small.json +++ b/data/json/mapgen/office_small.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "small_office" ], - "weight": 100, "object": { "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_white" }, "rows": [ diff --git a/data/json/mapgen/office_tower.json b/data/json/mapgen/office_tower.json index 2210a07898dc3..4b5f37cd99605 100644 --- a/data/json/mapgen/office_tower.json +++ b/data/json/mapgen/office_tower.json @@ -3,7 +3,6 @@ "type": "mapgen", "om_terrain": [ [ "loffice_tower_1", "loffice_tower_2" ], [ "loffice_tower_3", "loffice_tower_4" ] ], "method": "json", - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -63,7 +62,6 @@ "type": "mapgen", "om_terrain": [ [ "loffice_tower_5", "loffice_tower_6" ], [ "loffice_tower_7", "loffice_tower_8" ] ], "method": "json", - "weight": 250, "object": { "fill_ter": "t_linoleum_gray", "rows": [ @@ -124,7 +122,6 @@ "type": "mapgen", "om_terrain": [ [ "loffice_tower_9", "loffice_tower_10" ], [ "loffice_tower_11", "loffice_tower_12" ] ], "method": "json", - "weight": 250, "object": { "fill_ter": "t_linoleum_gray", "rows": [ @@ -184,7 +181,6 @@ "type": "mapgen", "om_terrain": [ [ "loffice_tower_9b", "loffice_tower_10b" ] ], "method": "json", - "weight": 250, "object": { "fill_ter": "t_linoleum_gray", "rows": [ @@ -220,7 +216,6 @@ "type": "mapgen", "om_terrain": [ [ "loffice_tower_13", "loffice_tower_14" ], [ "loffice_tower_15", "loffice_tower_16" ] ], "method": "json", - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -325,7 +320,6 @@ "type": "mapgen", "om_terrain": [ [ "loffice_tower_17", "loffice_tower_18" ], [ "loffice_tower_19", "loffice_tower_20" ] ], "method": "json", - "weight": 250, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/orchard_apple.json b/data/json/mapgen/orchard_apple.json index 89da09e7dc06c..f9e32c91ca314 100644 --- a/data/json/mapgen/orchard_apple.json +++ b/data/json/mapgen/orchard_apple.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "orchard_processing" ], - "weight": 500, "object": { "fill_ter": "t_metal_floor", "rows": [ @@ -59,7 +58,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "orchard_stall" ], - "weight": 500, "object": { "fill_ter": "t_floor", "rows": [ @@ -113,7 +111,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "orchard_tree_apple" ], - "weight": 100, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -191,7 +188,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "orchard_stall_roof" ], - "weight": 500, "object": { "fill_ter": "t_tile_flat_roof", "rows": [ diff --git a/data/json/mapgen/orchard_fruit.json b/data/json/mapgen/orchard_fruit.json index e678536224329..458b6465f5280 100644 --- a/data/json/mapgen/orchard_fruit.json +++ b/data/json/mapgen/orchard_fruit.json @@ -59,7 +59,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "orchard_roof" ], - "weight": 100, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ @@ -157,7 +156,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "orchard_roof_1" ], - "weight": 100, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ diff --git a/data/json/mapgen/outpost.json b/data/json/mapgen/outpost.json index 2f1f9d3c82e9d..0efd202e42035 100644 --- a/data/json/mapgen/outpost.json +++ b/data/json/mapgen/outpost.json @@ -86,7 +86,6 @@ "type": "mapgen", "method": "json", "om_terrain": "outpost_roof", - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -210,7 +209,6 @@ "type": "mapgen", "method": "json", "om_terrain": "outpost_cross_roof", - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/paintball_field.json b/data/json/mapgen/paintball_field.json index 567534c9cc2b8..99eef4ac51968 100644 --- a/data/json/mapgen/paintball_field.json +++ b/data/json/mapgen/paintball_field.json @@ -80,8 +80,7 @@ } }, "om_terrain": "paintball_field", - "type": "mapgen", - "weight": 100 + "type": "mapgen" }, { "type": "mapgen", @@ -206,8 +205,7 @@ } }, "om_terrain": "paintball_field_1", - "type": "mapgen", - "weight": 100 + "type": "mapgen" }, { "type": "mapgen", diff --git a/data/json/mapgen/park.json b/data/json/mapgen/park.json index 092bb79dc8332..0825b268495d4 100644 --- a/data/json/mapgen/park.json +++ b/data/json/mapgen/park.json @@ -4,7 +4,6 @@ "om_terrain": "playground", "//": "Playground", "type": "mapgen", - "weight": 300, "object": { "fill_ter": "t_region_groundcover_urban", "rows": [ @@ -51,7 +50,6 @@ "method": "json", "om_terrain": "playground_roof", "type": "mapgen", - "weight": 300, "object": { "rows": [ " ", @@ -88,7 +86,6 @@ "method": "json", "om_terrain": "playground_1", "//": "Playground", - "weight": 500, "object": { "fill_ter": "t_region_groundcover_urban", "rows": [ @@ -126,7 +123,6 @@ "method": "json", "om_terrain": "dog_park", "//": "Dog Park", - "weight": 500, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -186,7 +182,6 @@ "method": "json", "om_terrain": "park", "//": "Scenic Park", - "weight": 500, "object": { "fill_ter": "t_region_groundcover_urban", "rows": [ @@ -226,7 +221,6 @@ "type": "mapgen", "method": "json", "om_terrain": "park_roof", - "weight": 500, "object": { "rows": [ " ", @@ -263,7 +257,6 @@ "method": "json", "om_terrain": "park_2", "//": "Scenic Park", - "weight": 500, "object": { "fill_ter": "t_region_groundcover_urban", "rows": [ @@ -301,7 +294,6 @@ "om_terrain": "park_3", "//": "Picnic Park", "type": "mapgen", - "weight": 300, "object": { "fill_ter": "t_region_groundcover_urban", "rows": [ @@ -351,7 +343,6 @@ "om_terrain": "park_4", "//": "Picnic Park", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_region_groundcover_urban", "rows": [ @@ -395,7 +386,6 @@ "om_terrain": "park_5", "//": "Scenic Park", "type": "mapgen", - "weight": 300, "object": { "fill_ter": "t_region_groundcover_urban", "rows": [ @@ -433,7 +423,6 @@ "method": "json", "om_terrain": "park_5_roof", "type": "mapgen", - "weight": 300, "object": { "rows": [ " ", @@ -470,7 +459,6 @@ "om_terrain": "park_6", "//": "Scenic Park", "type": "mapgen", - "weight": 400, "object": { "fill_ter": "t_region_groundcover_urban", "rows": [ @@ -508,7 +496,6 @@ "om_terrain": "park_7", "//": "Pavilion", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_region_groundcover_urban", "rows": [ @@ -547,7 +534,6 @@ "method": "json", "om_terrain": "park_7_roof", "type": "mapgen", - "weight": 300, "object": { "rows": [ " ", @@ -584,7 +570,6 @@ "method": "json", "om_terrain": "baskeball_court", "//": "Basketball Court", - "weight": 700, "object": { "fill_ter": "t_pavement", "rows": [ @@ -623,7 +608,6 @@ "method": "json", "om_terrain": "tennis_court", "//": "Tennis Court", - "weight": 500, "object": { "fill_ter": "t_pavement", "rows": [ @@ -661,7 +645,6 @@ "method": "json", "om_terrain": "volleyball_court", "//": "Volleyball Court", - "weight": 300, "object": { "fill_ter": "t_region_groundcover_urban", "rows": [ diff --git a/data/json/mapgen/park_mazes.json b/data/json/mapgen/park_mazes.json index 093c65edf782f..30419c280ce7f 100644 --- a/data/json/mapgen/park_mazes.json +++ b/data/json/mapgen/park_mazes.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "park_maze" ], - "weight": 400, "object": { "fill_ter": "t_region_groundcover_urban", "rows": [ @@ -51,7 +50,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "park_maze_2" ], - "weight": 800, "object": { "fill_ter": "t_region_groundcover_urban", "rows": [ diff --git a/data/json/mapgen/park_skate.json b/data/json/mapgen/park_skate.json index 47703ce672455..a0ad904932768 100644 --- a/data/json/mapgen/park_skate.json +++ b/data/json/mapgen/park_skate.json @@ -16,7 +16,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "skate_park" ], - "weight": 100, "object": { "fill_ter": "t_region_groundcover_urban", "rows": [ @@ -63,7 +62,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "skate_park_up" ], - "weight": 100, "object": { "fill_ter": "t_concrete", "rows": [ @@ -109,7 +107,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "skate_park_down" ], - "weight": 100, "object": { "fill_ter": "t_concrete", "rows": [ diff --git a/data/json/mapgen/park_state.json b/data/json/mapgen/park_state.json index b5e35281b9caf..86fa1d1a3a74f 100644 --- a/data/json/mapgen/park_state.json +++ b/data/json/mapgen/park_state.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "state_park_0_0", "state_park_1_0" ], [ "state_park_0_1", "state_park_1_1" ] ], - "weight": 100, "object": { "predecessor_mapgen": "forest_thick", "rows": [ diff --git a/data/json/mapgen/parking_garage.json b/data/json/mapgen/parking_garage.json index a7b2312f0d38c..574ada22bd396 100644 --- a/data/json/mapgen/parking_garage.json +++ b/data/json/mapgen/parking_garage.json @@ -44,7 +44,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "parking_garage_down_0", "parking_garage_down_1" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -81,7 +80,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "parking_garage_0_0", "parking_garage_0_1" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -119,7 +117,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "parking_garage_1_0", "parking_garage_1_1" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -157,7 +154,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "parking_garage_2_0", "parking_garage_2_1" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -194,7 +190,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "parking_garage_roof_0", "parking_garage_roof_1" ] ], - "weight": 250, "object": { "fill_ter": "t_pavement", "rows": [ diff --git a/data/json/mapgen/pavilion.json b/data/json/mapgen/pavilion.json index 8276e811b758d..29ea3ec764bd2 100644 --- a/data/json/mapgen/pavilion.json +++ b/data/json/mapgen/pavilion.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "pavilion" ], - "weight": 100, "object": { "fill_ter": "t_region_groundcover_urban", "rows": [ @@ -107,7 +106,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "pavilion_1" ], - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/pawn_shop.json b/data/json/mapgen/pawn_shop.json index b169cabf95e5e..a2767b308dc23 100644 --- a/data/json/mapgen/pawn_shop.json +++ b/data/json/mapgen/pawn_shop.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "pawn" ], - "weight": 300, "object": { "fill_ter": "t_floor", "rows": [ @@ -150,7 +149,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "pawn_1" ], - "weight": 300, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -294,7 +292,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "pawn_pf" ], - "weight": 50, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/petstore.json b/data/json/mapgen/petstore.json index 7ac210b20d32b..36f6d91b0a1b1 100644 --- a/data/json/mapgen/petstore.json +++ b/data/json/mapgen/petstore.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_petstore" ], - "weight": 500, "object": { "fill_ter": "t_floor", "rows": [ @@ -219,8 +218,7 @@ } }, "om_terrain": "s_petstore_1", - "type": "mapgen", - "weight": 100 + "type": "mapgen" }, { "type": "mapgen", @@ -368,8 +366,7 @@ } }, "om_terrain": "s_petstore_2", - "type": "mapgen", - "weight": 100 + "type": "mapgen" }, { "type": "mapgen", diff --git a/data/json/mapgen/pizza_parlor.json b/data/json/mapgen/pizza_parlor.json index e024d2e28a414..4e049a193d81d 100644 --- a/data/json/mapgen/pizza_parlor.json +++ b/data/json/mapgen/pizza_parlor.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_pizza_parlor" ], - "weight": 1000, "object": { "//": "Default terrain is floor but some things are outside (tables)", "fill_ter": "t_floor", @@ -111,7 +110,6 @@ "type": "mapgen", "method": "json", "om_terrain": "s_pizza_parlor_roof", - "weight": 200, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -164,7 +162,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_pizza_parlor_1" ], - "weight": 1000, "object": { "//": "Default terrain is floor but some things are outside (tables)", "fill_ter": "t_floor", @@ -269,7 +266,6 @@ "type": "mapgen", "method": "json", "om_terrain": "s_pizza_parlor_roof_1", - "weight": 200, "object": { "fill_ter": "t_tar_flat_roof", "rows": [ diff --git a/data/json/mapgen/police_department.json b/data/json/mapgen/police_department.json index 3ba87af1b1e53..0d14e99090700 100644 --- a/data/json/mapgen/police_department.json +++ b/data/json/mapgen/police_department.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "police_dept_u000", "police_dept_u100" ], [ "police_dept_u010", "police_dept_u110" ] ], - "weight": 100, "object": { "fill_ter": "t_linoleum_gray", "rows": [ @@ -99,7 +98,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "police_dept_u001", "police_dept_u101" ], [ "police_dept_u011", "police_dept_u111" ] ], - "weight": 100, "object": { "fill_ter": "t_linoleum_gray", "rows": [ @@ -203,7 +201,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "police_dept_u002", "police_dept_u102" ], [ "police_dept_u012", "police_dept_u112" ] ], - "weight": 100, "object": { "fill_ter": "t_tar_flat_roof", "rows": [ @@ -277,7 +274,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "police_dept_b10", "police_dept_b00" ], [ "police_dept_b11", "police_dept_b01" ] ], - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -363,7 +359,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "police_dept_d100", "police_dept_d000" ], [ "police_dept_d110", "police_dept_d010" ] ], - "weight": 100, "object": { "fill_ter": "t_linoleum_gray", "rows": [ @@ -476,7 +471,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "police_dept_d101", "police_dept_d001" ], [ "police_dept_d111", "police_dept_d011" ] ], - "weight": 100, "object": { "fill_ter": "t_linoleum_gray", "rows": [ @@ -593,7 +587,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "police_dept_d102", "police_dept_d002" ], [ "police_dept_d112", "police_dept_d012" ] ], - "weight": 100, "object": { "fill_ter": "t_tar_flat_roof", "rows": [ @@ -666,7 +659,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "police_dept_skyway" ], - "weight": 100, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -704,7 +696,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "police_dept_skyway_roof" ], - "weight": 100, "object": { "fill_ter": "t_tar_flat_roof", "rows": [ diff --git a/data/json/mapgen/police_station.json b/data/json/mapgen/police_station.json index 6acd68e917271..3724ce9421da8 100644 --- a/data/json/mapgen/police_station.json +++ b/data/json/mapgen/police_station.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "police" ], - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -103,7 +102,6 @@ "type": "mapgen", "method": "json", "om_terrain": "police_roof", - "weight": 200, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -154,7 +152,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "police_1" ], - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -259,7 +256,6 @@ "type": "mapgen", "method": "json", "om_terrain": "police_2ndfloor_1", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ @@ -379,7 +375,6 @@ "type": "mapgen", "method": "json", "om_terrain": "police_roof_1", - "weight": 200, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -415,7 +410,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "police_2" ], - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -536,7 +530,6 @@ "type": "mapgen", "method": "json", "om_terrain": "police_roof_2", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/pond_fishing.json b/data/json/mapgen/pond_fishing.json index 5516b5a3d0ffb..4c260f746949c 100644 --- a/data/json/mapgen/pond_fishing.json +++ b/data/json/mapgen/pond_fishing.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "fishing_pond_0_0", "fishing_pond_1_0" ], [ "fishing_pond_0_1", "fishing_pond_1_1" ] ], - "weight": 100, "object": { "predecessor_mapgen": "forest_thick", "rows": [ diff --git a/data/json/mapgen/pond_public.json b/data/json/mapgen/pond_public.json index 63fc7652283f6..67ae6df657c43 100644 --- a/data/json/mapgen/pond_public.json +++ b/data/json/mapgen/pond_public.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "PublicPond_1a", "PublicPond_1b" ] ], - "weight": 100, "object": { "predecessor_mapgen": "forest_thick", "rows": [ diff --git a/data/json/mapgen/ponds.json b/data/json/mapgen/ponds.json index 26893689f8e76..1ea97e652d612 100644 --- a/data/json/mapgen/ponds.json +++ b/data/json/mapgen/ponds.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "pond_field" ], - "weight": 100, "object": { "rotation": [ 0, 3 ], "predecessor_mapgen": "forest", @@ -58,7 +57,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "hot_springs" ], - "weight": 20, "object": { "rotation": [ 0, 3 ], "predecessor_mapgen": "forest", diff --git a/data/json/mapgen/pool.json b/data/json/mapgen/pool.json index f6364088bbd69..b02793006b3d5 100644 --- a/data/json/mapgen/pool.json +++ b/data/json/mapgen/pool.json @@ -1,6 +1,6 @@ [ { - "name": "GROUP_MAPGEN_POOL", + "id": "GROUP_MAPGEN_POOL", "type": "monstergroup", "monsters": [ { "monster": "mon_null", "weight": 1 }, { "monster": "mon_zombie_swimmer_base", "weight": 4 } ] }, diff --git a/data/json/mapgen/post_office.json b/data/json/mapgen/post_office.json index d9f6762378636..54521d47b4197 100644 --- a/data/json/mapgen/post_office.json +++ b/data/json/mapgen/post_office.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "post_office" ], - "weight": 100, "object": { "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, "rows": [ @@ -150,7 +149,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "post_office_1" ], - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/power_station_small.json b/data/json/mapgen/power_station_small.json index 1e7b8086c1a07..28373c3e0b46b 100644 --- a/data/json/mapgen/power_station_small.json +++ b/data/json/mapgen/power_station_small.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "pwr_sub_s" ], - "weight": 10, "object": { "fill_ter": "t_concrete", "rows": [ diff --git a/data/json/mapgen/prison/prison.json b/data/json/mapgen/prison/prison.json index e2bf0a056b12b..0d506a5fdce92 100644 --- a/data/json/mapgen/prison/prison.json +++ b/data/json/mapgen/prison/prison.json @@ -7,7 +7,6 @@ [ "prison_1_6", "prison_1_5", "prison_1_4" ], [ "prison_1_9", "prison_1_8", "prison_1_7" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -119,7 +118,6 @@ [ "prison_1_b_6", "prison_1_b_5", "prison_1_b_4" ], [ "prison_1_b_9", "prison_1_b_8", "prison_1_b_7" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -212,7 +210,6 @@ [ "prison_1_2f_6", "prison_1_2f_5", "prison_1_2f_4" ], [ "prison_1_2f_9", "prison_1_2f_8", "prison_1_2f_7" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -305,7 +302,6 @@ [ "prison_1_3f_6", "prison_1_3f_5", "prison_1_3f_4" ], [ "prison_1_3f_9", "prison_1_3f_8", "prison_1_3f_7" ] ], - "weight": 250, "object": { "rows": [ " ", @@ -389,7 +385,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "prison_1_b_9_hidden", "prison_1_b_8_hidden_lab_stairs", "prison_1_b_7_hidden" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/prison/prison_alcatraz.json b/data/json/mapgen/prison/prison_alcatraz.json index 2794c2af800f7..50ca652a5e512 100644 --- a/data/json/mapgen/prison/prison_alcatraz.json +++ b/data/json/mapgen/prison/prison_alcatraz.json @@ -7,7 +7,6 @@ [ "prison_alcatraz_10", "prison_alcatraz_9", "prison_alcatraz_8", "prison_alcatraz_7", "prison_alcatraz_6" ], [ "prison_alcatraz_15", "prison_alcatraz_14", "prison_alcatraz_13", "prison_alcatraz_12", "prison_alcatraz_11" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -124,7 +123,6 @@ "prison_alcatraz_11_2f" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -212,7 +210,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "prison_alcatraz_10_3f", "prison_alcatraz_9_3f" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -248,7 +245,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "prison_alcatraz_6_3f" ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -284,7 +280,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "prison_alcatraz_15_3f", "prison_alcatraz_14_3f" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -320,7 +315,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "prison_alcatraz_11_3f" ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/public_works.json b/data/json/mapgen/public_works.json index 57f80c7f40389..86cc71f561f83 100644 --- a/data/json/mapgen/public_works.json +++ b/data/json/mapgen/public_works.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "public_works_NW", "public_works_NE" ], [ "public_works_SW", "public_works_SE" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/pump_station.json b/data/json/mapgen/pump_station.json index 5785b6c6dc6c2..d0a26eec0801a 100644 --- a/data/json/mapgen/pump_station.json +++ b/data/json/mapgen/pump_station.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "pump_station_1" ], [ "pump_station_2" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -215,7 +214,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "pump_station_3" ], [ "pump_station_4" ], [ "pump_station_5" ] ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/radio_tower.json b/data/json/mapgen/radio_tower.json index 4be72aa09e2cf..1bb271d98a365 100644 --- a/data/json/mapgen/radio_tower.json +++ b/data/json/mapgen/radio_tower.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "radio_tower" ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -39,7 +38,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "radio_tower_1" ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/ranch_camp.json b/data/json/mapgen/ranch_camp.json index e3c30a5841d36..85751f3e884be 100644 --- a/data/json/mapgen/ranch_camp.json +++ b/data/json/mapgen/ranch_camp.json @@ -56,8 +56,7 @@ "palettes": [ "ranch_camp" ] }, "om_terrain": [ [ "ranch_camp_1", "ranch_camp_2", "ranch_camp_3" ], [ "ranch_camp_10", "ranch_camp_11", "ranch_camp_12" ] ], - "type": "mapgen", - "weight": 250 + "type": "mapgen" }, { "method": "json", @@ -116,8 +115,7 @@ "palettes": [ "ranch_camp" ] }, "om_terrain": [ [ "ranch_camp_4", "ranch_camp_5", "ranch_camp_6" ], [ "ranch_camp_13", "ranch_camp_14", "ranch_camp_15" ] ], - "type": "mapgen", - "weight": 250 + "type": "mapgen" }, { "method": "json", @@ -176,8 +174,7 @@ "palettes": [ "ranch_camp" ] }, "om_terrain": [ [ "ranch_camp_7", "ranch_camp_8", "ranch_camp_9" ], [ "ranch_camp_16", "ranch_camp_17", "ranch_camp_18" ] ], - "type": "mapgen", - "weight": 250 + "type": "mapgen" }, { "method": "json", @@ -237,8 +234,7 @@ "place_monsters": [ { "monster": "GROUP_DOMESTIC", "x": [ 10, 23 ], "y": [ 3, 23 ], "repeat": [ 4, 6 ], "density": 0.1 } ] }, "om_terrain": [ [ "ranch_camp_19", "ranch_camp_20", "ranch_camp_21" ], [ "ranch_camp_28", "ranch_camp_29", "ranch_camp_30" ] ], - "type": "mapgen", - "weight": 250 + "type": "mapgen" }, { "method": "json", @@ -297,8 +293,7 @@ "palettes": [ "ranch_camp" ] }, "om_terrain": [ [ "ranch_camp_22", "ranch_camp_23", "ranch_camp_24" ], [ "ranch_camp_31", "ranch_camp_32", "ranch_camp_33" ] ], - "type": "mapgen", - "weight": 250 + "type": "mapgen" }, { "method": "json", @@ -357,8 +352,7 @@ "palettes": [ "ranch_camp" ] }, "om_terrain": [ [ "ranch_camp_25", "ranch_camp_26", "ranch_camp_27" ], [ "ranch_camp_34", "ranch_camp_35", "ranch_camp_36" ] ], - "type": "mapgen", - "weight": 250 + "type": "mapgen" }, { "method": "json", @@ -417,8 +411,7 @@ "palettes": [ "ranch_camp" ] }, "om_terrain": [ [ "ranch_camp_37", "ranch_camp_38", "ranch_camp_39" ], [ "ranch_camp_46", "ranch_camp_47", "ranch_camp_48" ] ], - "type": "mapgen", - "weight": 250 + "type": "mapgen" }, { "method": "json", @@ -478,8 +471,7 @@ "place_monsters": [ { "monster": "GROUP_DOMESTIC", "x": [ 3, 23 ], "y": [ 3, 23 ], "repeat": [ 4, 6 ], "density": 0.1 } ] }, "om_terrain": [ [ "ranch_camp_40", "ranch_camp_41", "ranch_camp_42" ], [ "ranch_camp_49", "ranch_camp_50", "ranch_camp_51" ] ], - "type": "mapgen", - "weight": 250 + "type": "mapgen" }, { "method": "json", @@ -538,8 +530,7 @@ "palettes": [ "ranch_camp" ] }, "om_terrain": [ [ "ranch_camp_43", "ranch_camp_44", "ranch_camp_45" ], [ "ranch_camp_52", "ranch_camp_53", "ranch_camp_54" ] ], - "type": "mapgen", - "weight": 250 + "type": "mapgen" }, { "method": "json", @@ -634,8 +625,7 @@ ] }, "om_terrain": [ [ "ranch_camp_55", "ranch_camp_56", "ranch_camp_57" ], [ "ranch_camp_64", "ranch_camp_65", "ranch_camp_66" ] ], - "type": "mapgen", - "weight": 250 + "type": "mapgen" }, { "method": "json", @@ -740,8 +730,7 @@ "place_vehicles": [ { "vehicle": "farm_vehicles", "x": 13, "y": 41, "chance": 100, "rotation": 180 } ] }, "om_terrain": [ [ "ranch_camp_58", "ranch_camp_59", "ranch_camp_60" ], [ "ranch_camp_67", "ranch_camp_68", "ranch_camp_69" ] ], - "type": "mapgen", - "weight": 250 + "type": "mapgen" }, { "method": "json", @@ -800,8 +789,7 @@ "palettes": [ "ranch_camp" ] }, "om_terrain": [ [ "ranch_camp_61", "ranch_camp_62", "ranch_camp_63" ], [ "ranch_camp_70", "ranch_camp_71", "ranch_camp_72" ] ], - "type": "mapgen", - "weight": 250 + "type": "mapgen" }, { "method": "json", @@ -836,8 +824,7 @@ "palettes": [ "ranch_camp" ] }, "om_terrain": [ [ "ranch_camp_73", "ranch_camp_74", "ranch_camp_75" ] ], - "type": "mapgen", - "weight": 250 + "type": "mapgen" }, { "method": "json", @@ -872,8 +859,7 @@ "palettes": [ "ranch_camp" ] }, "om_terrain": [ [ "ranch_camp_76", "ranch_camp_77", "ranch_camp_78" ] ], - "type": "mapgen", - "weight": 250 + "type": "mapgen" }, { "method": "json", @@ -908,8 +894,7 @@ "palettes": [ "ranch_camp" ] }, "om_terrain": [ [ "ranch_camp_79", "ranch_camp_80", "ranch_camp_81" ] ], - "type": "mapgen", - "weight": 250 + "type": "mapgen" }, { "type": "mapgen", diff --git a/data/json/mapgen/recycle_center.json b/data/json/mapgen/recycle_center.json index a827849657890..eb90706922200 100644 --- a/data/json/mapgen/recycle_center.json +++ b/data/json/mapgen/recycle_center.json @@ -216,8 +216,7 @@ ] }, "om_terrain": "recyclecenter_1", - "type": "mapgen", - "weight": 100 + "type": "mapgen" }, { "type": "mapgen", @@ -357,8 +356,7 @@ ] }, "om_terrain": "recyclecenter_2", - "type": "mapgen", - "weight": 100 + "type": "mapgen" }, { "type": "mapgen", diff --git a/data/json/mapgen/refugee_center/rc_grounds.json b/data/json/mapgen/refugee_center/rc_grounds.json index 73c0e1cff0d51..61b5252384aea 100644 --- a/data/json/mapgen/refugee_center/rc_grounds.json +++ b/data/json/mapgen/refugee_center/rc_grounds.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "refctr_field" ] ], - "weight": 100, "object": { "fill_ter": "t_grass", "rows": [ @@ -39,7 +38,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "refctr_fence_NW", "refctr_fence_NE" ], [ "refctr_fence_SW", "refctr_fence_SE" ] ], - "weight": 100, "object": { "fill_ter": "t_grass", "rows": [ @@ -99,7 +97,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "refctr_fence_v" ] ], - "weight": 100, "object": { "fill_ter": "t_grass", "rows": [ @@ -135,7 +132,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "refctr_fence_h" ] ], - "weight": 100, "object": { "fill_ter": "t_grass", "rows": [ @@ -171,7 +167,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "refctr_fence_entrance_L", "refctr_road", "refctr_fence_entrance_R" ] ], - "weight": 100, "object": { "fill_ter": "t_grass", "rows": [ @@ -208,7 +203,6 @@ "method": "json", "om_terrain": [ [ "refctr_S3e" ] ], "//": "Temporary map until I unhardcode the locate mission", - "weight": 100, "object": { "fill_ter": "t_grass", "rows": [ diff --git a/data/json/mapgen/refugee_center/refugee_center.json b/data/json/mapgen/refugee_center/refugee_center.json index da4b5a81402bf..023c4e964921e 100644 --- a/data/json/mapgen/refugee_center/refugee_center.json +++ b/data/json/mapgen/refugee_center/refugee_center.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "evac_center_1", "evac_center_2", "evac_center_3", "evac_center_4", "evac_center_5" ] ], - "weight": 100, "object": { "faction_owner": [ { "id": "free_merchants", "x": [ 0, 23 ], "y": [ 0, 23 ] }, @@ -56,7 +55,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "evac_center_6", "evac_center_7", "evac_center_8", "evac_center_9", "evac_center_10" ] ], - "weight": 100, "object": { "faction_owner": [ { "id": "free_merchants", "x": [ 0, 23 ], "y": [ 0, 23 ] }, @@ -158,7 +156,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "evac_center_11", "evac_center_12", "evac_center_13", "evac_center_14", "evac_center_15" ] ], - "weight": 100, "object": { "faction_owner": [ { "id": "free_merchants", "x": [ 0, 23 ], "y": [ 0, 23 ] }, @@ -239,7 +236,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "evac_center_16", "evac_center_17", "evac_center_18", "evac_center_19", "evac_center_20" ] ], - "weight": 100, "object": { "faction_owner": [ { "id": "free_merchants", "x": [ 0, 23 ], "y": [ 0, 23 ] }, @@ -289,7 +285,8 @@ { "type": "NPC_INVESTIGATE_ONLY", "faction": "lobby_beggars", "x": [ 51, 68 ], "y": [ 0, 4 ] }, { "type": "LOOT_UNSORTED", "faction": "free_merchants", "x": [ 72, 72 ], "y": [ 0, 0 ] }, { "type": "LOOT_CURRENCY", "faction": "free_merchants", "x": [ 71, 71 ], "y": [ 2, 2 ] }, - { "type": "LOOT_WOOD", "faction": "free_merchants", "x": [ 71, 71 ], "y": [ 1, 1 ] } + { "type": "LOOT_WOOD", "faction": "free_merchants", "x": [ 71, 71 ], "y": [ 1, 1 ] }, + { "type": "ZONE_START_POINT", "faction": "your_followers", "x": [ 59, 60 ], "y": [ 10, 11 ] } ], "items": { "@": { "item": "bed", "chance": 80 }, @@ -357,7 +354,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "evac_center_21", "evac_center_22", "evac_center_23", "evac_center_24", "evac_center_25" ] ], - "weight": 100, "object": { "faction_owner": [ { "id": "free_merchants", "x": [ 0, 23 ], "y": [ 0, 23 ] }, diff --git a/data/json/mapgen/refugee_center/z1_refugee_center.json b/data/json/mapgen/refugee_center/z1_refugee_center.json index 0f61d8569c473..c07b364272bb0 100644 --- a/data/json/mapgen/refugee_center/z1_refugee_center.json +++ b/data/json/mapgen/refugee_center/z1_refugee_center.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "evac_center_7_z1", "evac_center_8_z1", "evac_center_9_z1" ] ], - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -39,7 +38,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "evac_center_12_z1", "evac_center_13_z1", "evac_center_14_z1" ] ], - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -76,7 +74,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "evac_center_17_z1", "evac_center_18_z1", "evac_center_19_z1" ] ], - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/refugee_center/z2_refugee_center.json b/data/json/mapgen/refugee_center/z2_refugee_center.json index b40bd4cf06a10..6d3ef8e418b97 100644 --- a/data/json/mapgen/refugee_center/z2_refugee_center.json +++ b/data/json/mapgen/refugee_center/z2_refugee_center.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "evac_center_12_z2", "evac_center_13_z2", "evac_center_14_z2" ] ], - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/reststop.json b/data/json/mapgen/reststop.json index 00c24a4e0175a..e04d9a2683d9d 100644 --- a/data/json/mapgen/reststop.json +++ b/data/json/mapgen/reststop.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "s_restparking_1", "s_restparking_2" ], [ "s_reststop_1", "s_reststop_2" ] ], - "weight": 500, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/riverside/potters_cottage.json b/data/json/mapgen/riverside/potters_cottage.json index 5789d62719d98..58f3b7e4030c0 100644 --- a/data/json/mapgen/riverside/potters_cottage.json +++ b/data/json/mapgen/riverside/potters_cottage.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "pottery_cottage_field" ], [ "pottery_cottage" ] ], - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/riverside/whaleys_boat_rental.json b/data/json/mapgen/riverside/whaleys_boat_rental.json index 19f82b9e5f11b..0f47089294487 100644 --- a/data/json/mapgen/riverside/whaleys_boat_rental.json +++ b/data/json/mapgen/riverside/whaleys_boat_rental.json @@ -68,7 +68,6 @@ "method": "json", "om_terrain": "boat_rental", "type": "mapgen", - "weight": 100, "object": { "predecessor_mapgen": "lake_shore", "rows": [ @@ -116,7 +115,6 @@ "method": "json", "om_terrain": "boat_rental_roof", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -152,7 +150,6 @@ "method": "json", "om_terrain": "boat_rental_1", "type": "mapgen", - "weight": 100, "object": { "predecessor_mapgen": "lake_shore", "rows": [ @@ -200,7 +197,6 @@ "method": "json", "om_terrain": "boat_rental_1_roof", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -236,7 +232,6 @@ "method": "json", "om_terrain": "boat_rental_2", "type": "mapgen", - "weight": 100, "object": { "predecessor_mapgen": "lake_shore", "rows": [ @@ -282,7 +277,6 @@ "method": "json", "om_terrain": "boat_rental_2_roof", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/riverside/whaleys_house_river.json b/data/json/mapgen/riverside/whaleys_house_river.json index 9997c11a0469b..6de5562c1d07c 100644 --- a/data/json/mapgen/riverside/whaleys_house_river.json +++ b/data/json/mapgen/riverside/whaleys_house_river.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": "riverside_dwelling", - "weight": 100, "object": { "predecessor_mapgen": "forest", "rows": [ @@ -45,7 +44,6 @@ "type": "mapgen", "method": "json", "om_terrain": "riverside_dwelling_roof", - "weight": 75, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ @@ -81,7 +79,6 @@ "type": "mapgen", "method": "json", "om_terrain": "riverside_dwelling1", - "weight": 50, "object": { "predecessor_mapgen": "forest", "rows": [ @@ -138,7 +135,6 @@ "type": "mapgen", "method": "json", "om_terrain": "riverside_dwelling1_roof", - "weight": 75, "object": { "rows": [ " ", @@ -173,7 +169,6 @@ "type": "mapgen", "method": "json", "om_terrain": "riverside_dwelling2", - "weight": 100, "object": { "predecessor_mapgen": "forest", "rows": [ @@ -215,7 +210,6 @@ "type": "mapgen", "method": "json", "om_terrain": "riverside_dwelling2_roof", - "weight": 75, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ @@ -252,7 +246,6 @@ "type": "mapgen", "method": "json", "om_terrain": "riverside_dwelling3", - "weight": 75, "object": { "predecessor_mapgen": "forest", "rows": [ @@ -299,7 +292,6 @@ "type": "mapgen", "method": "json", "om_terrain": "riverside_dwelling3_roof", - "weight": 75, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/roadstop.json b/data/json/mapgen/roadstop.json index d164664c31068..956b32572ae2a 100644 --- a/data/json/mapgen/roadstop.json +++ b/data/json/mapgen/roadstop.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "roadstop" ], - "weight": 333, "object": { "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_white" }, "rows": [ @@ -92,7 +91,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "roadstop_a" ], - "weight": 333, "object": { "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, "rows": [ @@ -188,7 +186,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "roadstop_b" ], - "weight": 333, "object": { "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, "rows": [ diff --git a/data/json/mapgen/s_bookstore.json b/data/json/mapgen/s_bookstore.json index 7bd9ffdf27d39..f93982cf954c1 100644 --- a/data/json/mapgen/s_bookstore.json +++ b/data/json/mapgen/s_bookstore.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_bookstore" ], - "weight": 500, "object": { "fill_ter": "t_floor", "rows": [ @@ -100,7 +99,6 @@ "type": "mapgen", "method": "json", "om_terrain": "s_bookstore_roof", - "weight": 200, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -204,7 +202,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_bookstore_1" ], - "weight": 500, "object": { "fill_ter": "t_floor", "rows": [ @@ -291,7 +288,6 @@ "type": "mapgen", "method": "json", "om_terrain": "s_bookstore_roof_1", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ @@ -402,7 +398,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_bookstore_2" ], - "weight": 3000, "object": { "fill_ter": "t_floor", "rows": [ @@ -519,7 +514,6 @@ "type": "mapgen", "method": "json", "om_terrain": "s_bookstore_roof_2", - "weight": 200, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/s_candy.json b/data/json/mapgen/s_candy.json index dc806ca8603a3..1126d262c772d 100644 --- a/data/json/mapgen/s_candy.json +++ b/data/json/mapgen/s_candy.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "candy_shop" ], - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -108,7 +107,6 @@ "type": "mapgen", "method": "json", "om_terrain": "candy_shop_roof", - "weight": 200, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -158,7 +156,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "candy_shop_1" ], - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -245,7 +242,6 @@ "type": "mapgen", "method": "json", "om_terrain": "candy_shop_roof_1", - "weight": 200, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/s_clothing.json b/data/json/mapgen/s_clothing.json index 9d348d70bb688..c82084fa16ae4 100644 --- a/data/json/mapgen/s_clothing.json +++ b/data/json/mapgen/s_clothing.json @@ -4,7 +4,6 @@ "method": "json", "om_terrain": [ "s_clothes" ], "//": "All clothing", - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -100,7 +99,6 @@ "method": "json", "om_terrain": [ "s_clothes_1" ], "//": "Suit Tailor", - "weight": 300, "object": { "fill_ter": "t_floor", "rows": [ @@ -192,7 +190,6 @@ "method": "json", "om_terrain": [ "s_clothes_2" ], "//": "Fancy Furs", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -285,7 +282,6 @@ "method": "json", "om_terrain": [ "s_clothes_3" ], "//": "Shoes & Hats", - "weight": 200, "object": { "fill_ter": "t_floor", "rows": [ @@ -423,7 +419,6 @@ "method": "json", "om_terrain": [ "s_clothes_4" ], "//": "Dress Tailor", - "weight": 300, "object": { "fill_ter": "t_floor", "rows": [ @@ -560,7 +555,6 @@ "method": "json", "om_terrain": [ "s_clothes_5" ], "//": "Wedding Tailor", - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -712,7 +706,6 @@ "method": "json", "om_terrain": [ "s_clothes_6" ], "//": "All clothing", - "weight": 500, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/s_coffee.json b/data/json/mapgen/s_coffee.json index 6bff2d6fab02c..a6e7a8f40bbab 100644 --- a/data/json/mapgen/s_coffee.json +++ b/data/json/mapgen/s_coffee.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_restaurant_coffee" ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -124,7 +123,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_restaurant_coffee_roof" ], - "weight": 250, "object": { "fill_ter": "t_tile_flat_roof", "rows": [ @@ -170,7 +168,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_restaurant_coffee_1" ], - "weight": 250, "object": { "//": "Default fill is floor but some tables are outside", "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_white" }, @@ -264,7 +261,6 @@ "type": "mapgen", "method": "json", "om_terrain": "s_restaurant_coffee_roof_1", - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -305,7 +301,6 @@ "method": "json", "om_terrain": "s_restaurant_coffee_2", "type": "mapgen", - "weight": 100, "object": { "rows": [ " sss ", @@ -393,7 +388,6 @@ "type": "mapgen", "method": "json", "om_terrain": "s_restaurant_coffee_roof_2", - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/s_cosmetic.json b/data/json/mapgen/s_cosmetic.json index 25d00982b422d..8df08a7ffb929 100644 --- a/data/json/mapgen/s_cosmetic.json +++ b/data/json/mapgen/s_cosmetic.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_cosmetic" ], - "weight": 100, "object": { "rows": [ "__....................._", @@ -78,7 +77,6 @@ "type": "mapgen", "method": "json", "om_terrain": "s_cosmetic_roof", - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/s_furniture.json b/data/json/mapgen/s_furniture.json index 56a287654191b..243bd41de3270 100644 --- a/data/json/mapgen/s_furniture.json +++ b/data/json/mapgen/s_furniture.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "furniture" ], - "weight": 300, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/s_grocery.json b/data/json/mapgen/s_grocery.json index 199c9aace5ba1..08a7fe33a2e75 100644 --- a/data/json/mapgen/s_grocery.json +++ b/data/json/mapgen/s_grocery.json @@ -272,7 +272,6 @@ "type": "mapgen", "method": "json", "om_terrain": "s_grocery_roof", - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -566,7 +565,6 @@ "type": "mapgen", "method": "json", "om_terrain": "s_grocery_roof_1", - "weight": 100, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/s_gun.json b/data/json/mapgen/s_gun.json index 700310b9cfdbb..d872d72bb44b8 100644 --- a/data/json/mapgen/s_gun.json +++ b/data/json/mapgen/s_gun.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_gun" ], - "weight": 300, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -141,7 +140,6 @@ "method": "json", "om_terrain": [ "s_gun_looted" ], "//": "Looted version of s_gun. Uses same roof as s_gun.", - "weight": 300, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -204,7 +202,6 @@ "method": "json", "om_terrain": [ "s_gun_1" ], "//": "Home defense gun store", - "weight": 300, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -342,7 +339,6 @@ "method": "json", "om_terrain": [ "s_gun_2" ], "//": "Public holdout based on Home Defense Gunstore. Uses same roof as s_gunstore_1.", - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -401,7 +397,6 @@ "method": "json", "om_terrain": "s_gun_3", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -487,7 +482,6 @@ "method": "json", "om_terrain": "s_gun_3_looted", "type": "mapgen", - "weight": 200, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/s_hardware.json b/data/json/mapgen/s_hardware.json index 2a13092b725ba..d5681eac0053f 100644 --- a/data/json/mapgen/s_hardware.json +++ b/data/json/mapgen/s_hardware.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_hardware" ], - "weight": 300, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -130,7 +129,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_hardware_1" ], - "weight": 500, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -272,7 +270,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_hardware_2" ], - "weight": 300, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -406,7 +403,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_hardware_3" ], - "weight": 500, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/s_icecream.json b/data/json/mapgen/s_icecream.json index e13af712965ba..ef0135628d15f 100644 --- a/data/json/mapgen/s_icecream.json +++ b/data/json/mapgen/s_icecream.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "icecream_shop" ], - "weight": 100, "object": { "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, "rows": [ diff --git a/data/json/mapgen/sai.json b/data/json/mapgen/sai.json index c04c4bed3d5d4..dc9d6b0e0e300 100644 --- a/data/json/mapgen/sai.json +++ b/data/json/mapgen/sai.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "sai" ], - "weight": 10, "object": { "rows": [ "........................", diff --git a/data/json/mapgen/scenario/cabin_liam.json b/data/json/mapgen/scenario/cabin_liam.json index dbe5b86e1ec6e..6ac2842db38fe 100644 --- a/data/json/mapgen/scenario/cabin_liam.json +++ b/data/json/mapgen/scenario/cabin_liam.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "cabin_liam" ], - "weight": 500, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/school_1.json b/data/json/mapgen/school_1.json index 595485f23b7b2..beee2a3c44b8a 100644 --- a/data/json/mapgen/school_1.json +++ b/data/json/mapgen/school_1.json @@ -7,7 +7,6 @@ [ "school_1_6", "school_1_5", "school_1_4" ], [ "school_1_9", "school_1_8", "school_1_7" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -107,7 +106,6 @@ [ "school_2_6", "school_2_5", "school_2_4" ], [ "school_2_9", "school_2_8", "school_2_7" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -204,7 +202,6 @@ [ "school_3_6", "school_3_5", "school_3_4" ], [ "school_3_9", "school_3_8", "school_3_7" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -301,7 +298,6 @@ [ "school_4_6", "school_4_5", "school_4_4" ], [ "school_4_9", "school_4_8", "school_4_7" ] ], - "weight": 250, "object": { "fill_ter": "t_tar_flat_roof", "rows": [ diff --git a/data/json/mapgen/sewage_treatment.json b/data/json/mapgen/sewage_treatment.json index 2161d26e9329d..b09bc9a71b095 100644 --- a/data/json/mapgen/sewage_treatment.json +++ b/data/json/mapgen/sewage_treatment.json @@ -130,7 +130,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SEWAGE_TREATMENT", + "id": "GROUP_SEWAGE_TREATMENT", "is_animal": true, "monsters": [ { "monster": "mon_sewer_fish", "weight": 300, "cost_multiplier": 0, "pack_size": [ 2, 6 ] }, @@ -147,7 +147,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "sewage_treatment_0_0_0", "sewage_treatment_1_0_0" ], [ "sewage_treatment_0_1_0", "sewage_treatment_1_1_0" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/sewer.json b/data/json/mapgen/sewer.json index 2e1bb5e90afda..5bebed42506a2 100644 --- a/data/json/mapgen/sewer.json +++ b/data/json/mapgen/sewer.json @@ -885,7 +885,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "sewer_curved" ], - "weight": 1000000, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/shooting_range.json b/data/json/mapgen/shooting_range.json index 48c2491d4e7cd..e2a469138aceb 100644 --- a/data/json/mapgen/shooting_range.json +++ b/data/json/mapgen/shooting_range.json @@ -3,7 +3,6 @@ "method": "json", "type": "mapgen", "om_terrain": [ [ "shootingrange_1a" ], [ "shootingrange_2a" ] ], - "weight": 100, "object": { "rows": [ "........................", diff --git a/data/json/mapgen/smoke_lounge.json b/data/json/mapgen/smoke_lounge.json index 9b22d82918352..e3ca2c02bbac7 100644 --- a/data/json/mapgen/smoke_lounge.json +++ b/data/json/mapgen/smoke_lounge.json @@ -91,8 +91,7 @@ "toilets": { "&": { } } }, "om_terrain": "smoke_lounge", - "type": "mapgen", - "weight": 100 + "type": "mapgen" }, { "type": "mapgen", @@ -237,8 +236,7 @@ "toilets": { "&": { } } }, "om_terrain": "smoke_lounge_1", - "type": "mapgen", - "weight": 100 + "type": "mapgen" }, { "type": "mapgen", diff --git a/data/json/mapgen/solar_farm.json b/data/json/mapgen/solar_farm.json index bd88f3b7302f2..213468660e4b2 100644 --- a/data/json/mapgen/solar_farm.json +++ b/data/json/mapgen/solar_farm.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "solar_farm" ], - "weight": 10, "object": { "fill_ter": "t_concrete", "rows": [ diff --git a/data/json/mapgen/sports_store.json b/data/json/mapgen/sports_store.json index 11cbc4843d7f4..a275a410d8ca7 100644 --- a/data/json/mapgen/sports_store.json +++ b/data/json/mapgen/sports_store.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_sports" ], - "weight": 300, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/stadium_baseball.json b/data/json/mapgen/stadium_baseball.json index a07972f417c22..a60a9fa7f5479 100644 --- a/data/json/mapgen/stadium_baseball.json +++ b/data/json/mapgen/stadium_baseball.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "stadium_0_0", "stadium_1_0", "stadium_2_0", "stadium_3_0" ] ], - "weight": 100, "object": { "fill_ter": "t_pavement", "rows": [ @@ -44,7 +43,6 @@ [ "stadium_0_3", "stadium_1_3", "stadium_2_3", "stadium_3_3" ], [ "stadium_0_4", "stadium_1_4", "stadium_2_4", "stadium_3_4" ] ], - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -191,7 +189,6 @@ [ "stadium_0_3_1", "stadium_1_3_1", "stadium_2_3_1", "stadium_3_3_1" ], [ "stadium_0_4_1", "stadium_1_4_1", "stadium_2_4_1", "stadium_3_4_1" ] ], - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -337,7 +334,6 @@ [ "stadium_0_3_2", "stadium_1_3_2", "stadium_2_3_2", "stadium_3_3_2" ], [ "stadium_0_4_2", "stadium_1_4_2", "stadium_2_4_2", "stadium_3_4_2" ] ], - "weight": 100, "object": { "fill_ter": "t_floor", "rows": [ @@ -490,7 +486,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "stadium_1_1_3", "stadium_2_1_3" ] ], - "weight": 100, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ @@ -527,7 +522,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "stadium_0_3_3" ], - "weight": 100, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ diff --git a/data/json/mapgen/stadium_football.json b/data/json/mapgen/stadium_football.json index 98ee134e944c6..ac27d86461f0e 100644 --- a/data/json/mapgen/stadium_football.json +++ b/data/json/mapgen/stadium_football.json @@ -22,7 +22,6 @@ "stadium_football_7_6" ] ], - "weight": 100, "object": { "fill_ter": "t_pavement", "rows": [ @@ -102,7 +101,6 @@ [ "stadium_football_0_1", "stadium_football_8_1" ], [ "stadium_football_0_2", "stadium_football_8_2" ] ], - "weight": 100, "object": { "fill_ter": "t_pavement", "rows": [ @@ -199,7 +197,6 @@ [ "stadium_football_0_5", "stadium_football_8_5" ], [ "stadium_football_0_6", "stadium_football_8_6" ] ], - "weight": 100, "object": { "fill_ter": "t_pavement", "rows": [ @@ -363,7 +360,6 @@ "stadium_football_7_5" ] ], - "weight": 100, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -628,7 +624,6 @@ "stadium_football_7_5_1" ] ], - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -709,7 +704,6 @@ [ "stadium_football_1_3_1", "stadium_football_7_3_1" ], [ "stadium_football_1_4_1", "stadium_football_7_4_1" ] ], - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -802,7 +796,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "stadium_football_2_3_1", "stadium_football_6_3_1" ] ], - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -857,7 +850,6 @@ "stadium_football_7_5_2" ] ], - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -938,7 +930,6 @@ [ "stadium_football_1_3_2", "stadium_football_7_3_2" ], [ "stadium_football_1_4_2", "stadium_football_7_4_2" ] ], - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -1050,7 +1041,6 @@ "stadium_football_7_5_3" ] ], - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -1131,7 +1121,6 @@ [ "stadium_football_1_3_3", "stadium_football_7_3_3" ], [ "stadium_football_1_4_3", "stadium_football_7_4_3" ] ], - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -1239,7 +1228,6 @@ "stadium_football_6_5_4" ] ], - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -1327,7 +1315,6 @@ "stadium_football_6_5_5" ] ], - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/standing_stones.json b/data/json/mapgen/standing_stones.json index aae71983ca3cf..19717d6ae2d49 100644 --- a/data/json/mapgen/standing_stones.json +++ b/data/json/mapgen/standing_stones.json @@ -21,7 +21,7 @@ "entries": [ { "item": "mead", "container-item": "bowl_clay", "charges": [ 2, 7 ] } ] }, { - "name": "GROUP_STANDING_STONES", + "id": "GROUP_STANDING_STONES", "type": "monstergroup", "monsters": [ { "monster": "mon_null", "weight": 900 }, { "monster": "mon_darkman", "weight": 100, "conditions": [ "NIGHT" ] } ] }, @@ -29,7 +29,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "standing_stones" ], - "weight": 500, "object": { "predecessor_mapgen": "forest", "rows": [ diff --git a/data/json/mapgen/storage_units_large.json b/data/json/mapgen/storage_units_large.json index fc7892820634c..3e7d573aeadf3 100644 --- a/data/json/mapgen/storage_units_large.json +++ b/data/json/mapgen/storage_units_large.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": "large_storage_units_1", - "weight": 500, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -125,7 +124,6 @@ "type": "mapgen", "method": "json", "om_terrain": "large_storage_units_2", - "weight": 500, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/storage_units_medium.json b/data/json/mapgen/storage_units_medium.json index 2c6178845319c..e752c6b893ea6 100644 --- a/data/json/mapgen/storage_units_medium.json +++ b/data/json/mapgen/storage_units_medium.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "medium_storage_units_1" ], - "weight": 500, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -125,7 +124,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "medium_storage_units_2" ], - "weight": 500, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/storage_units_small.json b/data/json/mapgen/storage_units_small.json index 13a66d1dd9011..70e12a7f754b5 100644 --- a/data/json/mapgen/storage_units_small.json +++ b/data/json/mapgen/storage_units_small.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "small_storage_units" ], - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -114,7 +113,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "small_storage_units_1" ], - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/store/s_hunting.json b/data/json/mapgen/store/s_hunting.json index 48ae09271d82c..ff8c8a4b3e309 100644 --- a/data/json/mapgen/store/s_hunting.json +++ b/data/json/mapgen/store/s_hunting.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_hunting" ], - "weight": 300, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/store/s_weldingstore.json b/data/json/mapgen/store/s_weldingstore.json index 1f3c2e9eb9244..b7f106d902172 100644 --- a/data/json/mapgen/store/s_weldingstore.json +++ b/data/json/mapgen/store/s_weldingstore.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_weldingstore" ], - "weight": 300, "object": { "fill_ter": "t_concrete", "rows": [ @@ -40,7 +39,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_weldingstore_roof" ], - "weight": 300, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/stripclub.json b/data/json/mapgen/stripclub.json index 64978cae6e492..e0b75196ca190 100644 --- a/data/json/mapgen/stripclub.json +++ b/data/json/mapgen/stripclub.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": "stripclub", - "weight": 100, "object": { "fill_ter": { "param": "carpet_color_type", "fallback": "t_carpet_purple" }, "rows": [ @@ -160,7 +159,6 @@ "method": "json", "om_terrain": "stripclub_1", "type": "mapgen", - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -334,7 +332,6 @@ "type": "mapgen", "method": "json", "om_terrain": "stripclub_2", - "weight": 100, "object": { "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, "rows": [ diff --git a/data/json/mapgen/sub_ramp.json b/data/json/mapgen/sub_ramp.json index bc119dc4e56a9..6994ed0515307 100644 --- a/data/json/mapgen/sub_ramp.json +++ b/data/json/mapgen/sub_ramp.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "sub_ramp_above" ], - "weight": 250, "object": { "fill_ter": "t_rock_floor_no_roof", "rows": [ @@ -47,7 +46,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "sub_ramp_below" ], - "weight": 250, "object": { "fill_ter": "t_rock_floor_no_roof", "rows": [ diff --git a/data/json/mapgen/sub_station.json b/data/json/mapgen/sub_station.json index cfc7ea3d7e6bd..c7b1abb963625 100644 --- a/data/json/mapgen/sub_station.json +++ b/data/json/mapgen/sub_station.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "sub_station" ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -75,7 +74,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "sewer_sub_station" ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -114,7 +112,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "underground_sub_station" ], - "weight": 250, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/survivor_forest_camp.json b/data/json/mapgen/survivor_forest_camp.json index 3d4923aad4641..990aa73f3731d 100644 --- a/data/json/mapgen/survivor_forest_camp.json +++ b/data/json/mapgen/survivor_forest_camp.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "survivor_forest_camp" ], - "weight": 100, "object": { "fallback_predecessor_mapgen": "forest_thick", "rows": [ diff --git a/data/json/mapgen/synagogue.json b/data/json/mapgen/synagogue.json index a5087895d9a6d..c11eb68fd82fe 100644 --- a/data/json/mapgen/synagogue.json +++ b/data/json/mapgen/synagogue.json @@ -4,7 +4,6 @@ "method": "json", "om_terrain": [ "synagogue" ], "//": "New England Synagogue", - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/teashop.json b/data/json/mapgen/teashop.json index 159a71e208529..590ba13b55d4b 100644 --- a/data/json/mapgen/teashop.json +++ b/data/json/mapgen/teashop.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_teashop" ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -94,7 +93,6 @@ "type": "mapgen", "method": "json", "om_terrain": "s_teashop_roof", - "weight": 200, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -138,7 +136,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_teashop_1" ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -228,7 +225,6 @@ "type": "mapgen", "method": "json", "om_terrain": "s_teashop_roof_1", - "weight": 200, "object": { "fill_ter": "t_tile_flat_roof", "rows": [ @@ -281,7 +277,6 @@ "type": "mapgen", "method": "json", "om_terrain": "s_teashop_upper_roof_1", - "weight": 200, "object": { "fill_ter": "t_tar_flat_roof", "rows": [ diff --git a/data/json/mapgen/textile_mill_museum.json b/data/json/mapgen/textile_mill_museum.json index 727134cf4671a..15d6e16db110c 100644 --- a/data/json/mapgen/textile_mill_museum.json +++ b/data/json/mapgen/textile_mill_museum.json @@ -6,7 +6,6 @@ [ "textile_mill_museum_0a0", "textile_mill_museum_0a1", "textile_mill_museum_0a2" ], [ "textile_mill_museum_0b0", "textile_mill_museum_0b1", "textile_mill_museum_0b2" ] ], - "weight": 300, "object": { "fill_ter": "t_floor", "rows": [ @@ -74,7 +73,6 @@ [ "textile_mill_museum_1a0", "textile_mill_museum_1a1", "textile_mill_museum_1a2" ], [ "textile_mill_museum_1b0", "textile_mill_museum_1b1", "textile_mill_museum_1b2" ] ], - "weight": 300, "object": { "fill_ter": "t_floor", "rows": [ @@ -142,7 +140,6 @@ [ "textile_mill_museum_2a0", "textile_mill_museum_2a1", "textile_mill_museum_2a2" ], [ "textile_mill_museum_2b0", "textile_mill_museum_2b1", "textile_mill_museum_2b2" ] ], - "weight": 300, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ diff --git a/data/json/mapgen/thrift.json b/data/json/mapgen/thrift.json index d616e97050c79..cb127927c8400 100644 --- a/data/json/mapgen/thrift.json +++ b/data/json/mapgen/thrift.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_thrift" ], - "weight": 500, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/toxic_dump.json b/data/json/mapgen/toxic_dump.json index 1435600561ef6..1b2772f622dfe 100644 --- a/data/json/mapgen/toxic_dump.json +++ b/data/json/mapgen/toxic_dump.json @@ -15,7 +15,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "toxic_dump" ], - "weight": 100, "object": { "fill_ter": "t_thconc_floor", "rows": [ diff --git a/data/json/mapgen/trail_nature.json b/data/json/mapgen/trail_nature.json index 578b33d7adc7a..035d0dafcfff1 100644 --- a/data/json/mapgen/trail_nature.json +++ b/data/json/mapgen/trail_nature.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "NatureTrail_1a", "NatureTrail_1b" ] ], - "weight": 100, "object": { "predecessor_mapgen": "forest_thick", "rows": [ diff --git a/data/json/mapgen/trail_small.json b/data/json/mapgen/trail_small.json index cbacce259733d..2e472306e5d98 100644 --- a/data/json/mapgen/trail_small.json +++ b/data/json/mapgen/trail_small.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "small_wooded_trail" ], - "weight": 100, "object": { "predecessor_mapgen": "forest_thick", "rows": [ @@ -41,7 +40,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "small_wooded_trail_2" ], - "weight": 100, "object": { "predecessor_mapgen": "forest_thick", "rows": [ diff --git a/data/json/mapgen/urban_35_hospital.json b/data/json/mapgen/urban_35_hospital.json index 96c49c455b029..d405b3243dcc0 100644 --- a/data/json/mapgen/urban_35_hospital.json +++ b/data/json/mapgen/urban_35_hospital.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "urban_35_1", "urban_35_2" ], [ "urban_35_3", "urban_35_4" ] ], - "weight": 250, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -129,7 +128,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "urban_35_5", "urban_35_6", "urban_35_34" ], [ "urban_35_7", "urban_35_8", "urban_35_35" ] ], - "weight": 250, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -260,7 +258,6 @@ "method": "json", "om_terrain": [ [ "urban_35_9", "urban_35_10" ], [ "urban_35_11", "urban_35_12" ] ], "//": "patient floor", - "weight": 250, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -369,7 +366,6 @@ "method": "json", "om_terrain": [ [ "urban_35_13", "urban_35_14" ], [ "urban_35_15", "urban_35_16" ] ], "//": "patient floor", - "weight": 250, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -480,7 +476,6 @@ "method": "json", "//": "surgical floor", "om_terrain": [ [ "urban_35_17", "urban_35_18" ], [ "urban_35_19", "urban_35_20" ] ], - "weight": 250, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -591,7 +586,6 @@ "method": "json", "//": "maternity floor", "om_terrain": [ [ "urban_35_21", "urban_35_22" ], [ "urban_35_23", "urban_35_24" ] ], - "weight": 250, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -714,7 +708,6 @@ "method": "json", "//": "admin and cafe floor", "om_terrain": [ [ "urban_35_25", "urban_35_26" ], [ "urban_35_27", "urban_35_28" ] ], - "weight": 250, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -823,7 +816,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "urban_35_29", "urban_35_30" ], [ "urban_35_31", "urban_35_32" ] ], - "weight": 250, "object": { "fill_ter": "t_flat_roof", "rows": [ @@ -903,7 +895,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "urban_35_33" ], - "weight": 250, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/urban_library.json b/data/json/mapgen/urban_library.json index 0ab7470ba5073..37439d9503d6a 100644 --- a/data/json/mapgen/urban_library.json +++ b/data/json/mapgen/urban_library.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "urban_library_1", "urban_library_2" ], [ "urban_library_3", "urban_library_4" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -68,7 +67,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "urban_library_5", "urban_library_6" ], [ "urban_library_7", "urban_library_8" ] ], - "weight": 250, "object": { "fill_ter": "t_floor", "rows": [ @@ -136,7 +134,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "urban_library_roof_1", "urban_library_roof_2" ], [ "urban_library_roof_3", "urban_library_roof_4" ] ], - "weight": 250, "object": { "fill_ter": "t_flat_roof", "rows": [ diff --git a/data/json/mapgen/veterinarian.json b/data/json/mapgen/veterinarian.json index 00ae87328cb50..a2f350508b399 100644 --- a/data/json/mapgen/veterinarian.json +++ b/data/json/mapgen/veterinarian.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "veterinarian" ], - "weight": 400, "object": { "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, "rows": [ diff --git a/data/json/mapgen/vfw.json b/data/json/mapgen/vfw.json index e3bc39757c86a..f3203a0417552 100644 --- a/data/json/mapgen/vfw.json +++ b/data/json/mapgen/vfw.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "s_vfw" ], - "weight": 500, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/json/mapgen/vitrification/unvitrified_farm.json b/data/json/mapgen/vitrification/unvitrified_farm.json index 1eec25e37ad7c..98725323a11f1 100644 --- a/data/json/mapgen/vitrification/unvitrified_farm.json +++ b/data/json/mapgen/vitrification/unvitrified_farm.json @@ -203,7 +203,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "unvitrified_orchard" ], - "weight": 100, "object": { "set": [ { "point": "variable", "id": "unvitrified_orchard_center", "x": 12, "y": 12 } ], "fill_ter": "t_dirt", diff --git a/data/json/mapgen/void_spider.json b/data/json/mapgen/void_spider.json index 52cf887b5b502..9d5c7b3225242 100644 --- a/data/json/mapgen/void_spider.json +++ b/data/json/mapgen/void_spider.json @@ -91,7 +91,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "void_spider_lair_entrance" ], - "weight": 250, "object": { "fill_ter": "t_rock_floor_no_roof", "rows": [ @@ -135,7 +134,6 @@ "type": "mapgen", "method": "json", "nested_mapgen_id": "void_spider_lair_entrance_shift", - "weight": 250, "object": { "mapgensize": [ 24, 24 ], "rows": [ @@ -179,7 +177,6 @@ "type": "mapgen", "method": "json", "nested_mapgen_id": "void_spider_lair_corpses", - "weight": 250, "object": { "mapgensize": [ 24, 24 ], "rows": [ @@ -233,7 +230,6 @@ "type": "mapgen", "method": "json", "nested_mapgen_id": "void_spider_lair_eggs", - "weight": 250, "object": { "mapgensize": [ 24, 24 ], "rows": [ @@ -271,7 +267,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "void_spider_lair_a1", "void_spider_lair_a2" ] ], - "weight": 250, "object": { "fill_ter": "t_nether_glass_floor", "rows": [ diff --git a/data/json/mapgen/ws_biker_dump.json b/data/json/mapgen/ws_biker_dump.json index 2f935a58ead0a..8982cc62d1125 100644 --- a/data/json/mapgen/ws_biker_dump.json +++ b/data/json/mapgen/ws_biker_dump.json @@ -3,7 +3,6 @@ "type": "mapgen", "om_terrain": [ [ "ws_biker_dump_0_0", "ws_biker_dump_1_0", "ws_biker_dump_2_0", "ws_biker_dump_3_0" ] ], "method": "json", - "weight": 1000, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -91,7 +90,6 @@ "type": "mapgen", "om_terrain": [ [ "ws_biker_dump_0_1", "ws_biker_dump_1_1", "ws_biker_dump_2_1", "ws_biker_dump_3_1" ] ], "method": "json", - "weight": 1000, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -157,7 +155,6 @@ "type": "mapgen", "om_terrain": [ [ "ws_biker_dump_0_2", "ws_biker_dump_1_2", "ws_biker_dump_2_2", "ws_biker_dump_3_2" ] ], "method": "json", - "weight": 1000, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -291,7 +288,6 @@ "type": "mapgen", "om_terrain": [ [ "ws_biker_dump_0_3", "ws_biker_dump_1_3", "ws_biker_dump_2_3", "ws_biker_dump_3_3" ] ], "method": "json", - "weight": 1000, "object": { "fill_ter": "t_region_soil", "rows": [ diff --git a/data/json/mapgen/ws_fire_lookout_tower.json b/data/json/mapgen/ws_fire_lookout_tower.json index cf1865a6f99f0..08d3ec3a42039 100644 --- a/data/json/mapgen/ws_fire_lookout_tower.json +++ b/data/json/mapgen/ws_fire_lookout_tower.json @@ -28,7 +28,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "ws_fire_lookout_tower_base" ], - "weight": 1000, "object": { "fill_ter": "t_thconc_floor", "rows": [ @@ -99,7 +98,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "ws_fire_lookout_tower_f1" ], - "weight": 1000, "object": { "rows": [ " ", @@ -142,7 +140,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "ws_fire_lookout_tower_f2" ], - "weight": 1000, "object": { "rows": [ " ", @@ -184,7 +181,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "ws_fire_lookout_tower_f3" ], - "weight": 1000, "object": { "rows": [ " ", @@ -226,7 +222,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "ws_fire_lookout_tower_f4" ], - "weight": 1000, "object": { "fill_ter": "t_floor", "rows": [ @@ -281,7 +276,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "ws_fire_lookout_tower_f5" ], - "weight": 1000, "object": { "fill_ter": "t_shingle_flat_roof", "rows": [ diff --git a/data/json/mapgen/ws_regional_dump.json b/data/json/mapgen/ws_regional_dump.json index 7b20acca208d2..d9dcded91253e 100644 --- a/data/json/mapgen/ws_regional_dump.json +++ b/data/json/mapgen/ws_regional_dump.json @@ -3,7 +3,6 @@ "type": "mapgen", "om_terrain": [ [ "ws_regional_dump_0_0", "ws_regional_dump_1_0", "ws_regional_dump_2_0", "ws_regional_dump_3_0" ] ], "method": "json", - "weight": 1000, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -97,7 +96,6 @@ "type": "mapgen", "om_terrain": [ [ "ws_regional_dump_0_1", "ws_regional_dump_1_1", "ws_regional_dump_2_1", "ws_regional_dump_3_1" ] ], "method": "json", - "weight": 1000, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -165,7 +163,6 @@ "type": "mapgen", "om_terrain": [ [ "ws_regional_dump_0_2", "ws_regional_dump_1_2", "ws_regional_dump_2_2", "ws_regional_dump_3_2" ] ], "method": "json", - "weight": 1000, "object": { "fill_ter": "t_region_soil", "rows": [ @@ -239,7 +236,6 @@ "type": "mapgen", "om_terrain": [ [ "ws_regional_dump_0_3", "ws_regional_dump_1_3", "ws_regional_dump_2_3", "ws_regional_dump_3_3" ] ], "method": "json", - "weight": 1000, "object": { "fill_ter": "t_region_soil", "rows": [ diff --git a/data/json/mapgen/zoo.json b/data/json/mapgen/zoo.json index 7ee1202c255e8..d084163a782b9 100644 --- a/data/json/mapgen/zoo.json +++ b/data/json/mapgen/zoo.json @@ -444,7 +444,7 @@ } }, { - "name": "GROUP_INSECT_ZOO", + "id": "GROUP_INSECT_ZOO", "type": "monstergroup", "monsters": [ { "group": "GROUP_WILDERNESS_SWAMP_INSECT", "weight": 2 }, @@ -452,7 +452,7 @@ ] }, { - "name": "GROUP_PETTING_ZOO", + "id": "GROUP_PETTING_ZOO", "type": "monstergroup", "monsters": [ { "monster": "mon_goat_kid", "weight": 2 }, @@ -465,7 +465,7 @@ ] }, { - "name": "GROUP_LLAMA_ZOO", + "id": "GROUP_LLAMA_ZOO", "type": "monstergroup", "monsters": [ { "monster": "mon_llama", "weight": 7 }, @@ -474,17 +474,17 @@ ] }, { - "name": "GROUP_COYOTES_ZOO", + "id": "GROUP_COYOTES_ZOO", "type": "monstergroup", "monsters": [ { "monster": "mon_coyote" } ] }, { - "name": "GROUP_TIGERS_ZOO", + "id": "GROUP_TIGERS_ZOO", "type": "monstergroup", "monsters": [ { "monster": "mon_tiger", "weight": 8 }, { "monster": "mon_ziger", "weight": 2 } ] }, { - "name": "GROUP_COUGARS_ZOO", + "id": "GROUP_COUGARS_ZOO", "type": "monstergroup", "monsters": [ { "monster": "mon_cougar", "weight": 7 }, @@ -493,7 +493,7 @@ ] }, { - "name": "GROUP_FROGS_ZOO", + "id": "GROUP_FROGS_ZOO", "type": "monstergroup", "monsters": [ { "monster": "mon_leo_frog", "weight": 10 }, @@ -502,7 +502,7 @@ ] }, { - "name": "GROUP_SPIDERS_ZOO", + "id": "GROUP_SPIDERS_ZOO", "type": "monstergroup", "monsters": [ { "group": "GROUP_SPIDER" }, @@ -512,32 +512,32 @@ ] }, { - "name": "GROUP_SNAKES_ZOO", + "id": "GROUP_SNAKES_ZOO", "type": "monstergroup", "monsters": [ { "monster": "mon_rattlesnake", "weight": 9 }, { "monster": "mon_rattlesnake_s", "weight": 1 } ] }, { - "name": "GROUP_FOXES_ZOO", + "id": "GROUP_FOXES_ZOO", "type": "monstergroup", "monsters": [ { "monster": "mon_fox_gray", "weight": 10 } ] }, { - "name": "GROUP_REINDEERS_ZOO", + "id": "GROUP_REINDEERS_ZOO", "type": "monstergroup", "monsters": [ { "group": "GROUP_REINDEERS", "weight": 9 }, { "monster": "mon_zeindeer", "weight": 1 } ] }, { - "name": "GROUP_BEARS_ZOO", + "id": "GROUP_BEARS_ZOO", "type": "monstergroup", "monsters": [ { "group": "GROUP_BEARS", "weight": 9 }, { "monster": "mon_zombear", "weight": 1 } ] }, { - "name": "GROUP_MOOSE_ZOO", + "id": "GROUP_MOOSE_ZOO", "type": "monstergroup", "monsters": [ { "group": "GROUP_MOOSE", "weight": 9 }, { "monster": "mon_zoose", "weight": 1 } ] }, { - "name": "GROUP_PIGS_ZOO", + "id": "GROUP_PIGS_ZOO", "type": "monstergroup", "monsters": [ { "group": "GROUP_PIGS", "weight": 950 }, { "monster": "mon_zombie_pig", "weight": 50 } ] } diff --git a/data/json/mapgen_palettes/storage_unit_palette.json b/data/json/mapgen_palettes/storage_unit_palette.json index fbc45f0c91c0a..f6c1ac887b1d5 100644 --- a/data/json/mapgen_palettes/storage_unit_palette.json +++ b/data/json/mapgen_palettes/storage_unit_palette.json @@ -1,65 +1,65 @@ -{ - "type": "palette", - "id": "storage_unit_palette", - "palettes": [ - "parametrized_walls_palette" - ], - "terrain": { - " ": "t_thconc_floor", - "+": "t_door_c", - ".": "t_pavement", - "_": "t_thconc_floor", - "1": "t_window", - "2": "t_sidewalk", - "3": "t_tree_young", - "4": "t_chaingate_l", - "5": "t_wall_wood", - "6": "t_chainfence", - "7": "t_door_metal_locked", - "8": "t_gates_mech_control", - "E": "t_dirtfloor", - "G": "t_dirtfloor", - "I": "t_sidewalk", - "R": "t_pavement_y", - "U": "t_sidewalk", - "V": "t_sidewalk", - "W": "t_sidewalk", - "c": "t_column", - "p": "t_pavement_y", - "r": "t_pavement", - "s": "t_sidewalk", - "y": "t_pavement_y" - }, - "furniture": { - "A": "f_rack", - "B": "f_toilet", - "C": "f_counter", - "D": "f_sink", - "E": "f_sink", - "F": "f_chair", - "G": "f_locker", - "H": "f_table", - "I": "f_sofa", - "J": "f_chair", - "K": "f_dumpster", - "L": "f_locker", - "M": [ "f_crate_c", "f_cardboard_box" ], - "R": "f_rubble", - "b": "f_bed", - "d": "f_dresser", - "o": "f_bookcase", - "q": "f_rubble", - "t": "f_table", - "u": "f_rack", - "v": "f_rack_coat", - "w": "f_rubble", - "^": "f_rubble", - "{": [ "f_vending_o", "f_vending_c_off" ] - }, - "vendingmachines": { - "U": { "item_group": "vending_drink", "lootable": true }, - "V": { "item_group": "vending_food", "lootable": true }, - "W": { "item_group": "vending_drink", "lootable": true }, - "Á": { "item_group": "vending_food", "lootable": true } +[ + { + "type": "palette", + "id": "storage_unit_palette", + "palettes": [ "parametrized_walls_palette" ], + "terrain": { + " ": "t_thconc_floor", + "+": "t_door_c", + ".": "t_pavement", + "_": "t_thconc_floor", + "1": "t_window", + "2": "t_sidewalk", + "3": "t_tree_young", + "4": "t_chaingate_l", + "5": "t_wall_wood", + "6": "t_chainfence", + "7": "t_door_metal_locked", + "8": "t_gates_mech_control", + "E": "t_dirtfloor", + "G": "t_dirtfloor", + "I": "t_sidewalk", + "R": "t_pavement_y", + "U": "t_sidewalk", + "V": "t_sidewalk", + "W": "t_sidewalk", + "c": "t_column", + "p": "t_pavement_y", + "r": "t_pavement", + "s": "t_sidewalk", + "y": "t_pavement_y" + }, + "furniture": { + "A": "f_rack", + "B": "f_toilet", + "C": "f_counter", + "D": "f_sink", + "E": "f_sink", + "F": "f_chair", + "G": "f_locker", + "H": "f_table", + "I": "f_sofa", + "J": "f_chair", + "K": "f_dumpster", + "L": "f_locker", + "M": [ "f_crate_c", "f_cardboard_box" ], + "R": "f_rubble", + "b": "f_bed", + "d": "f_dresser", + "o": "f_bookcase", + "q": "f_rubble", + "t": "f_table", + "u": "f_rack", + "v": "f_rack_coat", + "w": "f_rubble", + "^": "f_rubble", + "{": [ "f_vending_o", "f_vending_c_off" ] + }, + "vendingmachines": { + "U": { "item_group": "vending_drink", "lootable": true }, + "V": { "item_group": "vending_food", "lootable": true }, + "W": { "item_group": "vending_drink", "lootable": true }, + "Á": { "item_group": "vending_food", "lootable": true } + } } -} +] diff --git a/data/json/monstergroups/amphibian.json b/data/json/monstergroups/amphibian.json index 9067365c9ca56..7adfae736e40a 100644 --- a/data/json/monstergroups/amphibian.json +++ b/data/json/monstergroups/amphibian.json @@ -1,6 +1,6 @@ [ { - "name": "GROUP_TADPOLES_ALL", + "id": "GROUP_TADPOLES_ALL", "type": "monstergroup", "default": "mon_peeper_tadpole", "monsters": [ @@ -39,7 +39,7 @@ ] }, { - "name": "GROUP_TADPOLES_SEWER", + "id": "GROUP_TADPOLES_SEWER", "type": "monstergroup", "default": "mon_leo_tadpole", "monsters": [ @@ -57,7 +57,7 @@ ] }, { - "name": "GROUP_TADPOLES_RIVER", + "id": "GROUP_TADPOLES_RIVER", "type": "monstergroup", "default": "mon_bullfrog_tadpole", "monsters": [ @@ -75,7 +75,7 @@ ] }, { - "name": "GROUP_TADPOLES_SWAMP", + "id": "GROUP_TADPOLES_SWAMP", "type": "monstergroup", "default": "mon_bullfrog_tadpole", "monsters": [ @@ -109,7 +109,7 @@ ] }, { - "name": "GROUP_FROGS_ALL", + "id": "GROUP_FROGS_ALL", "type": "monstergroup", "default": "mon_peeper_frog", "monsters": [ @@ -254,7 +254,7 @@ ] }, { - "name": "GROUP_FROGS_NATURAL", + "id": "GROUP_FROGS_NATURAL", "type": "monstergroup", "default": "mon_peeper_frog", "monsters": [ @@ -322,7 +322,7 @@ ] }, { - "name": "GROUP_FROGS_SEWER", + "id": "GROUP_FROGS_SEWER", "type": "monstergroup", "default": "mon_bullfrog_frog", "monsters": [ @@ -426,7 +426,7 @@ ] }, { - "name": "GROUP_FROGS_FOREST", + "id": "GROUP_FROGS_FOREST", "type": "monstergroup", "default": "mon_peeper_frog", "monsters": [ @@ -558,7 +558,7 @@ ] }, { - "name": "GROUP_FROGS_SWAMP", + "id": "GROUP_FROGS_SWAMP", "type": "monstergroup", "default": "mon_bullfrog_frog", "monsters": [ @@ -698,7 +698,7 @@ ] }, { - "name": "GROUP_FROGS_RIVER", + "id": "GROUP_FROGS_RIVER", "type": "monstergroup", "default": "mon_bullfrog_frog", "monsters": [ @@ -759,7 +759,7 @@ ] }, { - "name": "GROUP_MUTAFROGS_ALL", + "id": "GROUP_MUTAFROGS_ALL", "type": "monstergroup", "default": "mon_strange_bigfrog", "monsters": [ @@ -780,7 +780,7 @@ ] }, { - "name": "GROUP_MUTAFROGS_BIG", + "id": "GROUP_MUTAFROGS_BIG", "type": "monstergroup", "default": "mon_strange_bigfrog", "monsters": [ @@ -794,7 +794,7 @@ ] }, { - "name": "GROUP_MUTAFROGS_GIANT", + "id": "GROUP_MUTAFROGS_GIANT", "type": "monstergroup", "default": "mon_strange_giganfrog", "monsters": [ @@ -805,7 +805,7 @@ ] }, { - "name": "GROUP_MUTAFROGS_MEGA", + "id": "GROUP_MUTAFROGS_MEGA", "type": "monstergroup", "default": "mon_strange_megafrog", "monsters": [ @@ -815,7 +815,7 @@ ] }, { - "name": "GROUP_MUTAFROGS_PATTERN", + "id": "GROUP_MUTAFROGS_PATTERN", "type": "monstergroup", "default": "mon_pattern_bigfrog", "monsters": [ @@ -824,7 +824,7 @@ ] }, { - "name": "GROUP_MUTAFROGS_STRANGE", + "id": "GROUP_MUTAFROGS_STRANGE", "type": "monstergroup", "default": "mon_strange_bigfrog", "monsters": [ @@ -834,7 +834,7 @@ ] }, { - "name": "GROUP_MUTAFROGS_FOUL", + "id": "GROUP_MUTAFROGS_FOUL", "type": "monstergroup", "default": "mon_foul_bigfrog", "monsters": [ @@ -844,7 +844,7 @@ ] }, { - "name": "GROUP_MUTAFROGS_ODD", + "id": "GROUP_MUTAFROGS_ODD", "type": "monstergroup", "default": "mon_odd_bigfrog", "monsters": [ @@ -854,7 +854,7 @@ ] }, { - "name": "GROUP_MUTAFROGS_VOCAL", + "id": "GROUP_MUTAFROGS_VOCAL", "type": "monstergroup", "default": "mon_jumbo_bigfrog", "monsters": [ @@ -863,7 +863,7 @@ ] }, { - "name": "GROUP_MUTAFROGS_SEWER", + "id": "GROUP_MUTAFROGS_SEWER", "type": "monstergroup", "default": "mon_strange_bigfrog", "monsters": [ @@ -874,7 +874,7 @@ ] }, { - "name": "GROUP_MUTAFROGS_FOREST", + "id": "GROUP_MUTAFROGS_FOREST", "type": "monstergroup", "default": "mon_odd_bigfrog", "monsters": [ @@ -887,7 +887,7 @@ ] }, { - "name": "GROUP_MUTAFROGS_SWAMP", + "id": "GROUP_MUTAFROGS_SWAMP", "type": "monstergroup", "default": "mon_strange_bigfrog", "monsters": [ @@ -900,13 +900,13 @@ ] }, { - "name": "GROUP_MUTAFROGS_RIVER", + "id": "GROUP_MUTAFROGS_RIVER", "type": "monstergroup", "default": "mon_strange_bigfrog", "monsters": [ { "group": "GROUP_MUTAFROGS_PATTERN", "weight": 60 }, { "group": "GROUP_MUTAFROGS_STRANGE", "weight": 100 } ] }, { - "name": "GROUP_TADPOLE_LEO", + "id": "GROUP_TADPOLE_LEO", "type": "monstergroup", "default": "mon_leo_frog", "monsters": [ @@ -916,103 +916,103 @@ ] }, { - "name": "GROUP_TADPOLE_BULLFROG", + "id": "GROUP_TADPOLE_BULLFROG", "type": "monstergroup", "default": "mon_bullfrog_frog", "monsters": [ { "monster": "mon_bullfrog_frog", "weight": 90 }, { "monster": "mon_strange_frog", "weight": 10 } ] }, { - "name": "GROUP_TADPOLE_FOWLER", + "id": "GROUP_TADPOLE_FOWLER", "type": "monstergroup", "default": "mon_fowler_toad", "monsters": [ { "monster": "mon_fowler_toad", "weight": 90 }, { "monster": "mon_foul_toad", "weight": 10 } ] }, { - "name": "GROUP_TADPOLE_FREEDOM", + "id": "GROUP_TADPOLE_FREEDOM", "type": "monstergroup", "default": "mon_freedom_toad", "monsters": [ { "monster": "mon_freedom_toad", "weight": 90 }, { "monster": "mon_odd_toad", "weight": 10 } ] }, { - "name": "GROUP_TADPOLE_PEEPER", + "id": "GROUP_TADPOLE_PEEPER", "type": "monstergroup", "default": "mon_peeper_frog", "monsters": [ { "monster": "mon_peeper_frog", "weight": 90 }, { "monster": "mon_vocal_frog", "weight": 10 } ] }, { - "name": "GROUP_TADPOLE_GRAY", + "id": "GROUP_TADPOLE_GRAY", "type": "monstergroup", "default": "mon_gray_frog", "monsters": [ { "monster": "mon_gray_frog", "weight": 90 }, { "monster": "mon_shift_frog", "weight": 10 } ] }, { - "name": "GROUP_TADPOLE_PICKEREL", + "id": "GROUP_TADPOLE_PICKEREL", "type": "monstergroup", "default": "mon_pickerel_frog", "monsters": [ { "monster": "mon_pickerel_frog", "weight": 90 }, { "monster": "mon_palette_frog", "weight": 10 } ] }, { - "name": "GROUP_TADPOLE_GREEN", + "id": "GROUP_TADPOLE_GREEN", "type": "monstergroup", "default": "mon_green_frog", "monsters": [ { "monster": "mon_green_frog", "weight": 99 }, { "monster": "mon_green_worm", "weight": 1 } ] }, { - "name": "GROUP_TADPOLE_WOOD", + "id": "GROUP_TADPOLE_WOOD", "type": "monstergroup", "default": "mon_wood_frog", "monsters": [ { "monster": "mon_wood_frog", "weight": 99 }, { "monster": "mon_wood_worm", "weight": 1 } ] }, { - "name": "GROUP_BIGTAD_VOCAL", + "id": "GROUP_BIGTAD_VOCAL", "type": "monstergroup", "default": "mon_jumbo_bigfrog", "monsters": [ { "monster": "mon_jumbo_bigfrog", "weight": 50 }, { "monster": "mon_vocal_bigfrog", "weight": 50 } ] }, { - "name": "GROUP_FROGS_UPGRADE_PATTERN", + "id": "GROUP_FROGS_UPGRADE_PATTERN", "type": "monstergroup", "default": "mon_pattern_bigfrog", "monsters": [ { "monster": "mon_pattern_bigfrog", "weight": 100 }, { "monster": "mon_pattern_giganfrog", "weight": 30 } ] }, { - "name": "GROUP_FROGS_UPGRADE_STRANGE", + "id": "GROUP_FROGS_UPGRADE_STRANGE", "type": "monstergroup", "default": "mon_strange_bigfrog", "monsters": [ { "monster": "mon_strange_bigfrog", "weight": 100 }, { "monster": "mon_strange_giganfrog", "weight": 40 } ] }, { - "name": "GROUP_FROGS_UPGRADE_STRANGE_MEGA", + "id": "GROUP_FROGS_UPGRADE_STRANGE_MEGA", "type": "monstergroup", "default": "mon_strange_giganfrog", "monsters": [ { "monster": "mon_strange_giganfrog", "weight": 100 }, { "monster": "mon_strange_megafrog", "weight": 10 } ] }, { - "name": "GROUP_FROGS_UPGRADE_FOUL", + "id": "GROUP_FROGS_UPGRADE_FOUL", "type": "monstergroup", "default": "mon_foul_bigfrog", "monsters": [ { "monster": "mon_foul_bigfrog", "weight": 100 }, { "monster": "mon_foul_giganfrog", "weight": 40 } ] }, { - "name": "GROUP_FROGS_UPGRADE_FOUL_MEGA", + "id": "GROUP_FROGS_UPGRADE_FOUL_MEGA", "type": "monstergroup", "default": "mon_foul_giganfrog", "monsters": [ { "monster": "mon_foul_giganfrog", "weight": 100 }, { "monster": "mon_foul_megafrog", "weight": 30 } ] }, { - "name": "GROUP_FROGS_UPGRADE_ODD", + "id": "GROUP_FROGS_UPGRADE_ODD", "type": "monstergroup", "default": "mon_odd_bigfrog", "monsters": [ { "monster": "mon_odd_bigfrog", "weight": 100 }, { "monster": "mon_odd_giganfrog", "weight": 40 } ] }, { - "name": "GROUP_FROGS_UPGRADE_ODD_MEGA", + "id": "GROUP_FROGS_UPGRADE_ODD_MEGA", "type": "monstergroup", "default": "mon_odd_giganfrog", "monsters": [ { "monster": "mon_odd_giganfrog", "weight": 100 }, { "monster": "mon_odd_megafrog", "weight": 10 } ] }, { - "name": "GROUP_FROGS_UPGRADE_VOCAL", + "id": "GROUP_FROGS_UPGRADE_VOCAL", "type": "monstergroup", "default": "mon_vocal_frog", "monsters": [ @@ -1022,7 +1022,7 @@ ] }, { - "name": "GROUP_FROGS_UPGRADE_SHIFT", + "id": "GROUP_FROGS_UPGRADE_SHIFT", "type": "monstergroup", "default": "mon_shift_frog", "monsters": [ { "monster": "mon_shift_frog", "weight": 70 }, { "monster": "mon_shift_bigfrog", "weight": 30 } ] diff --git a/data/json/monstergroups/blob.json b/data/json/monstergroups/blob.json index 7a18431d65bcc..d7c1a2db5b168 100644 --- a/data/json/monstergroups/blob.json +++ b/data/json/monstergroups/blob.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_GOO", + "id": "GROUP_GOO", "monsters": [ { "monster": "mon_blob_small", "weight": 200, "cost_multiplier": 0 }, { "monster": "mon_blob_small", "weight": 100, "cost_multiplier": 0, "pack_size": [ 2, 12 ] }, @@ -13,7 +13,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SLIME", + "id": "GROUP_SLIME", "//": "GROUP_GOO has a shoggoth, which isn't even the same faction as blobs. Also removes brain blob.", "monsters": [ { "monster": "mon_blob_small", "weight": 200, "cost_multiplier": 0 }, diff --git a/data/json/monstergroups/bugs.json b/data/json/monstergroups/bugs.json index 13ea69e356930..6f11320db9310 100644 --- a/data/json/monstergroups/bugs.json +++ b/data/json/monstergroups/bugs.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_ANT", + "id": "GROUP_ANT", "is_animal": true, "monsters": [ { "monster": "mon_ant_larva", "weight": 40, "cost_multiplier": 0 }, @@ -12,7 +12,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ANT_SURFACE", + "id": "GROUP_ANT_SURFACE", "is_animal": true, "monsters": [ { "monster": "mon_ant_soldier", "weight": 90, "cost_multiplier": 5 }, @@ -25,7 +25,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ACID_ANT", + "id": "GROUP_ACID_ANT", "is_animal": true, "monsters": [ { "monster": "mon_ant_acid_larva", "weight": 35, "cost_multiplier": 0 }, @@ -36,7 +36,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ACID_ANT_SURFACE", + "id": "GROUP_ACID_ANT_SURFACE", "is_animal": true, "monsters": [ { "monster": "mon_ant_acid_soldier", "weight": 90, "cost_multiplier": 5 }, @@ -49,21 +49,21 @@ }, { "type": "monstergroup", - "name": "GROUP_BEEHIVE", + "id": "GROUP_BEEHIVE", "monsters": [ { "monster": "mon_bee_small", "cost_multiplier": 0 }, { "monster": "mon_bee", "cost_multiplier": 5 } ] }, { "type": "monstergroup", - "name": "GROUP_BEE", + "id": "GROUP_BEE", "monsters": [ { "monster": "mon_bee_small", "cost_multiplier": 0 } ] }, { - "name": "GROUP_DERMATIK", + "id": "GROUP_DERMATIK", "type": "monstergroup", "monsters": [ { "monster": "mon_dermatik" } ] }, { - "name": "GROUP_DERMATIK_INCUB", + "id": "GROUP_DERMATIK_INCUB", "type": "monstergroup", "default": "mon_dermatik_incubator_deer", "monsters": [ @@ -74,7 +74,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ROACH", + "id": "GROUP_ROACH", "is_animal": true, "monsters": [ { "monster": "mon_large_cockroach", "weight": 975, "cost_multiplier": 0 }, @@ -84,7 +84,7 @@ }, { "type": "monstergroup", - "name": "GROUP_PLAGUE_ROACH", + "id": "GROUP_PLAGUE_ROACH", "is_animal": true, "monsters": [ { "monster": "mon_skittering_plague", "weight": 975, "cost_multiplier": 0 }, @@ -94,7 +94,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SPIDER", + "id": "GROUP_SPIDER", "monsters": [ { "monster": "mon_spider_web_small", "weight": 5, "ends": "45 days" }, { "monster": "mon_spider_web", "weight": 5, "starts": "30 days" }, @@ -103,7 +103,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SPIDER_BASEMENT", + "id": "GROUP_SPIDER_BASEMENT", "default": "mon_spider_cellar_small", "//": "`monster` ignores group-level pack size, so numbers are set in mapgen", "monsters": [ @@ -116,7 +116,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SPIDER_CELLAR_GIANT", + "id": "GROUP_SPIDER_CELLAR_GIANT", "monsters": [ { "monster": "mon_spider_cellar_giant", "weight": 5 }, { "monster": "mon_spider_cellar_mom", "weight": 2 }, @@ -125,7 +125,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SPIDER_TRAPDOOR", + "id": "GROUP_SPIDER_TRAPDOOR", "monsters": [ { "monster": "mon_spider_trapdoor_small", "weight": 5, "ends": "45 days" }, { "monster": "mon_spider_trapdoor_giant", "weight": 5, "starts": "30 days" }, @@ -134,7 +134,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SPIDER_WIDOW", + "id": "GROUP_SPIDER_WIDOW", "monsters": [ { "monster": "mon_spider_widow_small", "weight": 5, "ends": "45 days" }, { "monster": "mon_spider_widow_giant", "weight": 5, "starts": "30 days" }, @@ -143,7 +143,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SPIDER_WOLF", + "id": "GROUP_SPIDER_WOLF", "monsters": [ { "monster": "mon_spider_wolf_small", "weight": 5, "ends": "45 days" }, { "monster": "mon_spider_wolf_giant", "weight": 5, "starts": "30 days" }, @@ -152,7 +152,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SPIDER_JUMPING", + "id": "GROUP_SPIDER_JUMPING", "monsters": [ { "monster": "mon_spider_jumping_small", "weight": 5, "ends": "45 days" }, { "monster": "mon_spider_jumping_giant", "weight": 5, "starts": "30 days" }, @@ -160,7 +160,7 @@ ] }, { - "name": "GROUP_WASP_NEST", + "id": "GROUP_WASP_NEST", "type": "monstergroup", "monsters": [ { "monster": "mon_wasp_small", "weight": 500, "ends": "180 hours", "conditions": [ "SPRING", "SUMMER", "AUTUMN" ] }, @@ -217,7 +217,7 @@ ] }, { - "name": "GROUP_WASP_FORAGER", + "id": "GROUP_WASP_FORAGER", "type": "monstergroup", "monsters": [ { "monster": "mon_wasp_small", "weight": 1000, "ends": "180 hours", "conditions": [ "SPRING", "SUMMER", "AUTUMN" ] }, @@ -246,7 +246,7 @@ ] }, { - "name": "GROUP_WASP_GUARD", + "id": "GROUP_WASP_GUARD", "type": "monstergroup", "monsters": [ { @@ -280,7 +280,7 @@ ] }, { - "name": "GROUP_WASP_QUEEN", + "id": "GROUP_WASP_QUEEN", "type": "monstergroup", "monsters": [ { "monster": "mon_wasp_queen", "weight": 1000, "cost_multiplier": 50, "ends": "30 days" }, @@ -288,7 +288,7 @@ ] }, { - "name": "GROUP_WASP_PUPA", + "id": "GROUP_WASP_PUPA", "type": "monstergroup", "default": "mon_wasp", "monsters": [ @@ -299,7 +299,7 @@ }, { "type": "monstergroup", - "name": "GROUP_WORM", + "id": "GROUP_WORM", "monsters": [ { "monster": "mon_worm_small", "weight": 5, "ends": "45 days" }, { "monster": "mon_worm", "weight": 5, "starts": "30 days" }, @@ -308,7 +308,7 @@ }, { "type": "monstergroup", - "name": "GROUP_FLY", + "id": "GROUP_FLY", "monsters": [ { "monster": "mon_fly_small", "weight": 5, "ends": "45 days" }, { "monster": "mon_fly", "weight": 5, "starts": "30 days" }, @@ -317,7 +317,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MOSQUITO", + "id": "GROUP_MOSQUITO", "monsters": [ { "monster": "mon_mosquito_small", "weight": 5, "ends": "45 days" }, { "monster": "mon_mosquito_giant", "weight": 5, "starts": "30 days" }, @@ -326,7 +326,7 @@ }, { "type": "monstergroup", - "name": "GROUP_GRASSHOPPER", + "id": "GROUP_GRASSHOPPER", "monsters": [ { "monster": "mon_grasshopper_small", "ends": "45 days" }, { "monster": "mon_grasshopper_giant", "starts": "30 days" } @@ -334,7 +334,7 @@ }, { "type": "monstergroup", - "name": "GROUP_LOCUST", + "id": "GROUP_LOCUST", "monsters": [ { "monster": "mon_locust_small", "weight": 5, "ends": "45 days" }, { "monster": "mon_locust", "weight": 5, "starts": "30 days" }, @@ -343,12 +343,12 @@ }, { "type": "monstergroup", - "name": "GROUP_WATER_STRIDER", + "id": "GROUP_WATER_STRIDER", "monsters": [ { "monster": "mon_strider_small", "ends": "45 days" }, { "monster": "mon_strider_giant", "starts": "30 days" } ] }, { "type": "monstergroup", - "name": "GROUP_PRAYING_MANTIS", + "id": "GROUP_PRAYING_MANTIS", "monsters": [ { "monster": "mon_mantis_small", "weight": 5, "ends": "63 days" }, { "monster": "mon_mantis_giant", "weight": 5, "starts": "42 days" }, @@ -357,17 +357,17 @@ }, { "type": "monstergroup", - "name": "GROUP_APHID", + "id": "GROUP_APHID", "monsters": [ { "monster": "mon_aphid_small", "ends": "45 days" }, { "monster": "mon_aphid", "starts": "30 days" } ] }, { "type": "monstergroup", - "name": "GROUP_LADY_BUG", + "id": "GROUP_LADY_BUG", "monsters": [ { "monster": "mon_lady_bug", "ends": "63 days" }, { "monster": "mon_lady_bug_giant", "starts": "42 days" } ] }, { "type": "monstergroup", - "name": "GROUP_CENTIPEDE", + "id": "GROUP_CENTIPEDE", "monsters": [ { "monster": "mon_centipede_small", "weight": 30, "ends": "45 days" }, { "monster": "mon_centipede_giant", "weight": 22, "starts": "30 days", "ends": "72 days" }, @@ -378,7 +378,7 @@ }, { "type": "monstergroup", - "name": "GROUP_STAG_BEETLE", + "id": "GROUP_STAG_BEETLE", "monsters": [ { "monster": "mon_stag_beetle_small", "weight": 5, "ends": "90 days" }, { "monster": "mon_stag_beetle_giant", "weight": 5, "starts": "60 days" }, @@ -387,7 +387,7 @@ }, { "type": "monstergroup", - "name": "GROUP_BUTTERFLY", + "id": "GROUP_BUTTERFLY", "monsters": [ { "monster": "mon_butterfly", "weight": 5, "ends": "45 days" }, { "monster": "mon_butterfly_giant", "weight": 5, "starts": "30 days" }, @@ -396,7 +396,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MOTH", + "id": "GROUP_MOTH", "monsters": [ { "monster": "mon_moth", "weight": 5, "ends": "45 days" }, { "monster": "mon_moth_giant", "weight": 5, "starts": "30 days" }, @@ -405,7 +405,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SNAIL", + "id": "GROUP_SNAIL", "monsters": [ { "monster": "mon_snail_forest", "weight": 5, "ends": "45 days" }, { "monster": "mon_snail_small", "weight": 5, "starts": "30 days" }, @@ -414,7 +414,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SLUG", + "id": "GROUP_SLUG", "monsters": [ { "monster": "mon_slug_forest", "weight": 5, "ends": "45 days" }, { "monster": "mon_slug_small", "weight": 5, "starts": "30 days" }, @@ -423,17 +423,17 @@ }, { "type": "monstergroup", - "name": "GROUP_MOTH_FLY", + "id": "GROUP_MOTH_FLY", "monsters": [ { "monster": "mon_moth_fly_small", "ends": "45 days" }, { "monster": "mon_moth_fly", "starts": "30 days" } ] }, { "type": "monstergroup", - "name": "GROUP_SILVERFISH", + "id": "GROUP_SILVERFISH", "monsters": [ { "monster": "mon_silverfish_small", "ends": "45 days" }, { "monster": "mon_silverfish", "starts": "30 days" } ] }, { "type": "monstergroup", - "name": "GROUP_CENTIPEDE_HOUSE", + "id": "GROUP_CENTIPEDE_HOUSE", "monsters": [ { "monster": "mon_centipede_house_small", "ends": "45 days" }, { "monster": "mon_centipede_house", "starts": "30 days" } @@ -441,7 +441,7 @@ }, { "type": "monstergroup", - "name": "GROUP_BUGS_SUBTERRANEAN", + "id": "GROUP_BUGS_SUBTERRANEAN", "//": "Invertebrate friends that like dark and moist places. Put them in basements, subways, sewers, etc.", "monsters": [ { "group": "GROUP_FLY", "weight": 25 }, @@ -457,12 +457,12 @@ }, { "type": "monstergroup", - "name": "GROUP_CENTIPEDE_MOM_SUMMON", + "id": "GROUP_CENTIPEDE_MOM_SUMMON", "monsters": [ { "monster": "mon_centipede_small", "weight": 67 }, { "monster": "mon_centipede_larva", "weight": 33 } ] }, { "type": "monstergroup", - "name": "GROUP_SPIDER_MOM_SUMMON", + "id": "GROUP_SPIDER_MOM_SUMMON", "monsters": [ { "monster": "mon_spider_cellar_small", "weight": 67 }, { "monster": "mon_spider_cellar_giant_s", "weight": 33 } ] } ] diff --git a/data/json/monstergroups/exodii.json b/data/json/monstergroups/exodii.json index 24f7a71b63e67..64d7babcc7490 100644 --- a/data/json/monstergroups/exodii.json +++ b/data/json/monstergroups/exodii.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_Exodii_Stowaway", + "id": "GROUP_Exodii_Stowaway", "//": "An enemy that caught an interdimensional ride along with an Exodii.", "monsters": [ { "monster": "mon_zomborg", "weight": 850 }, @@ -11,7 +11,7 @@ }, { "type": "monstergroup", - "name": "GROUP_Exodii_Scout_Small", + "id": "GROUP_Exodii_Scout_Small", "//": "A small Exodii scouting unit or party.", "monsters": [ { "monster": "mon_exodii_quad", "weight": 800 }, diff --git a/data/json/monstergroups/fish.json b/data/json/monstergroups/fish.json index 255af00aebc0f..dab973d7abe29 100644 --- a/data/json/monstergroups/fish.json +++ b/data/json/monstergroups/fish.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_FISH", + "id": "GROUP_FISH", "default": "mon_fish_whitefish", "is_animal": true, "monsters": [ @@ -273,7 +273,7 @@ }, { "type": "monstergroup", - "name": "GROUP_STOCKED_POND", + "id": "GROUP_STOCKED_POND", "is_animal": true, "monsters": [ { "monster": "mon_fish_rainbow_trout", "weight": 50, "cost_multiplier": 3, "pack_size": [ 1, 3 ] }, @@ -312,7 +312,7 @@ }, { "type": "monstergroup", - "name": "GROUP_RAZORCLAW", + "id": "GROUP_RAZORCLAW", "is_animal": true, "monsters": [ { "monster": "mon_razorclaw", "weight": 667, "cost_multiplier": 0 }, @@ -321,7 +321,7 @@ }, { "type": "monstergroup", - "name": "GROUP_CRAYFISH", + "id": "GROUP_CRAYFISH", "monsters": [ { "monster": "mon_crayfish_small", "weight": 5, "ends": "45 days" }, { "monster": "mon_giant_crayfish", "weight": 5, "starts": "30 days" }, diff --git a/data/json/monstergroups/fungi.json b/data/json/monstergroups/fungi.json index 3d2d69158061d..72cbf92ef2673 100644 --- a/data/json/monstergroups/fungi.json +++ b/data/json/monstergroups/fungi.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_FUNGI", + "id": "GROUP_FUNGI", "default": "mon_spore", "monsters": [ { "monster": "mon_spore", "weight": 200, "cost_multiplier": 0 }, @@ -18,7 +18,7 @@ }, { "type": "monstergroup", - "name": "GROUP_FUNGI_FUNGALOID", + "id": "GROUP_FUNGI_FUNGALOID", "monsters": [ { "monster": "mon_fungaloid", "weight": 500, "cost_multiplier": 0 }, { "monster": "mon_fungaloid_shambler", "weight": 250, "cost_multiplier": 0 }, @@ -28,7 +28,7 @@ }, { "type": "monstergroup", - "name": "GROUP_FUNGI_TOWER", + "id": "GROUP_FUNGI_TOWER", "monsters": [ { "monster": "mon_fungal_tendril", "weight": 755, "cost_multiplier": 0 }, { "monster": "mon_fungaloid", "weight": 10, "cost_multiplier": 0 }, @@ -44,7 +44,7 @@ }, { "type": "monstergroup", - "name": "GROUP_FUNGI_FLOWERS", + "id": "GROUP_FUNGI_FLOWERS", "monsters": [ { "monster": "mon_fungal_blossom", "weight": 680, "cost_multiplier": 0 }, { "monster": "mon_fungaloid", "weight": 20, "cost_multiplier": 0 }, @@ -59,7 +59,7 @@ }, { "type": "monstergroup", - "name": "GROUP_FUNGI_ZOMBIE", + "id": "GROUP_FUNGI_ZOMBIE", "monsters": [ { "monster": "mon_fungal_blossom", "weight": 200, "cost_multiplier": 0 }, { "monster": "mon_fungaloid", "weight": 100, "cost_multiplier": 0 }, diff --git a/data/json/monstergroups/kraken.json b/data/json/monstergroups/kraken.json index 0823258fd5153..5d22c87ef31d1 100644 --- a/data/json/monstergroups/kraken.json +++ b/data/json/monstergroups/kraken.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_KRAKEN", + "id": "GROUP_KRAKEN", "is_animal": true, "monsters": [ { "monster": "mon_octupus_stalker_spawn", "weight": 40, "cost_multiplier": 0 }, @@ -12,7 +12,7 @@ }, { "type": "monstergroup", - "name": "GROUP_KRAKEN_SURFACE", + "id": "GROUP_KRAKEN_SURFACE", "is_animal": true, "monsters": [ { "monster": "mon_kraken_guard", "weight": 90, "cost_multiplier": 5 }, diff --git a/data/json/monstergroups/lab.json b/data/json/monstergroups/lab.json index 0866ab2447aec..27c03af672f28 100644 --- a/data/json/monstergroups/lab.json +++ b/data/json/monstergroups/lab.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_CENTRAL_LAB", + "id": "GROUP_CENTRAL_LAB", "default": "mon_zombie_scientist", "monsters": [ { "monster": "mon_zombie_scientist", "weight": 150, "cost_multiplier": 0 }, @@ -27,7 +27,7 @@ }, { "type": "monstergroup", - "name": "GROUP_LAB", + "id": "GROUP_LAB", "default": "mon_zombie_scientist", "monsters": [ { "monster": "mon_blob_small", "weight": 25, "cost_multiplier": 0, "pack_size": [ 1, 4 ] }, @@ -63,7 +63,7 @@ }, { "type": "monstergroup", - "name": "GROUP_LAB_SURFACE", + "id": "GROUP_LAB_SURFACE", "default": "mon_zombie_scientist", "monsters": [ { "monster": "mon_feral_labsecurity_9mm", "weight": 18, "cost_multiplier": 8 }, @@ -98,7 +98,7 @@ }, { "type": "monstergroup", - "name": "GROUP_LAB_SECURITY", + "id": "GROUP_LAB_SECURITY", "default": "mon_zombie_labsecurity", "monsters": [ { "monster": "mon_feral_labsecurity_9mm", "weight": 22, "cost_multiplier": 8 }, @@ -121,7 +121,7 @@ }, { "type": "monstergroup", - "name": "GROUP_LAB_FEMA", + "id": "GROUP_LAB_FEMA", "default": "mon_zombie_scientist", "//": "Mostly scientists, lab personnel and regular zombies.", "monsters": [ @@ -145,11 +145,11 @@ }, { "type": "monstergroup", - "name": "GROUP_LAB_CYBORG", + "id": "GROUP_LAB_CYBORG", "monsters": [ { "monster": "mon_prototype_cyborg", "weight": 400, "cost_multiplier": 0 } ] }, { - "name": "GROUP_LAB_MUTANT_BOSS", + "id": "GROUP_LAB_MUTANT_BOSS", "type": "monstergroup", "default": "mon_mutant_evolved", "monsters": [ @@ -162,7 +162,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MICROLAB", + "id": "GROUP_MICROLAB", "monsters": [ { "monster": "mon_blob_small", "weight": 40, "cost_multiplier": 0, "pack_size": [ 3, 6 ] }, { "monster": "mon_feral_labsecurity_9mm", "weight": 18, "cost_multiplier": 8 }, @@ -195,7 +195,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DISTORTED_MICROLAB", + "id": "GROUP_DISTORTED_MICROLAB", "default": "mon_zombie_scientist", "monsters": [ { "monster": "mon_zombie_phase_skulker", "weight": 100, "cost_multiplier": 0, "pack_size": [ 2, 3 ] }, @@ -216,7 +216,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MEATLAB", + "id": "GROUP_MEATLAB", "monsters": [ { "monster": "mon_null", "weight": 9 }, { "monster": "mon_amalgamation_swarmer", "weight": 5, "pack_size": [ 1, 2 ] }, @@ -232,7 +232,7 @@ }, { "type": "monstergroup", - "name": "GROUP_LAB_BASIC_SECURITY", + "id": "GROUP_LAB_BASIC_SECURITY", "monsters": [ { "monster": "mon_feral_labsecurity_9mm", "weight": 18, "cost_multiplier": 12 }, { "monster": "mon_feral_labsecurity_flashlight", "weight": 18, "cost_multiplier": 2, "pack_size": [ 1, 2 ] }, @@ -250,7 +250,7 @@ }, { "type": "monstergroup", - "name": "GROUP_LAB_MILITARY", + "id": "GROUP_LAB_MILITARY", "monsters": [ { "monster": "mon_feral_labsecurity_9mm", "weight": 12, "cost_multiplier": 8 }, { "monster": "mon_feral_labsecurity_flashlight", "weight": 12, "cost_multiplier": 2 }, @@ -263,7 +263,7 @@ }, { "type": "monstergroup", - "name": "GROUP_LAB_MAINTENANCE", + "id": "GROUP_LAB_MAINTENANCE", "monsters": [ { "monster": "mon_zombie_technician", "weight": 819 }, { "monster": "mon_feral_human_tool", "weight": 25 }, @@ -282,7 +282,7 @@ }, { "type": "monstergroup", - "name": "GROUP_LAB_RESEARCHERS", + "id": "GROUP_LAB_RESEARCHERS", "monsters": [ { "monster": "mon_zombie_technician", "weight": 5, "cost_multiplier": 5 }, { "monster": "mon_feral_human_tool", "weight": 1, "cost_multiplier": 5 }, @@ -300,7 +300,7 @@ }, { "type": "monstergroup", - "name": "GROUP_LAB_HOSPITAL", + "id": "GROUP_LAB_HOSPITAL", "monsters": [ { "monster": "mon_zombie_medical", "weight": 20, "cost_multiplier": 0, "pack_size": [ 1, 2 ] }, { "monster": "mon_zombie_medical_brute", "weight": 10, "cost_multiplier": 3 }, @@ -318,7 +318,7 @@ ] }, { - "name": "GROUP_RATKIN_LAB", + "id": "GROUP_RATKIN_LAB", "type": "monstergroup", "monsters": [ { "monster": "mon_lab_ratkin", "weight": 250, "pack_size": [ 2, 6 ] }, diff --git a/data/json/monstergroups/mammal.json b/data/json/monstergroups/mammal.json index 03d2786a1fe46..b907cbee387a4 100644 --- a/data/json/monstergroups/mammal.json +++ b/data/json/monstergroups/mammal.json @@ -1,6 +1,6 @@ [ { - "name": "GROUP_COWS_DAIRY", + "id": "GROUP_COWS_DAIRY", "type": "monstergroup", "is_safe": true, "monsters": [ @@ -12,7 +12,7 @@ ] }, { - "name": "GROUP_COWS", + "id": "GROUP_COWS", "type": "monstergroup", "monsters": [ { "monster": "mon_cow", "weight": 150, "cost_multiplier": 2 }, @@ -21,7 +21,7 @@ ] }, { - "name": "GROUP_BEARS", + "id": "GROUP_BEARS", "type": "monstergroup", "monsters": [ { "monster": "mon_bear", "weight": 150, "cost_multiplier": 2 }, @@ -30,7 +30,7 @@ ] }, { - "name": "GROUP_BOARS", + "id": "GROUP_BOARS", "type": "monstergroup", "monsters": [ { "monster": "mon_boar_wild", "weight": 150, "cost_multiplier": 2 }, @@ -39,7 +39,7 @@ ] }, { - "name": "GROUP_PIGS", + "id": "GROUP_PIGS", "type": "monstergroup", "monsters": [ { "monster": "mon_pig", "weight": 150, "cost_multiplier": 2 }, @@ -48,7 +48,7 @@ ] }, { - "name": "GROUP_SHEEPS", + "id": "GROUP_SHEEPS", "type": "monstergroup", "monsters": [ { "monster": "mon_sheep", "weight": 150, "cost_multiplier": 2 }, @@ -57,7 +57,7 @@ ] }, { - "name": "GROUP_DEERS", + "id": "GROUP_DEERS", "type": "monstergroup", "monsters": [ { "monster": "mon_deer", "weight": 150, "cost_multiplier": 2 }, @@ -66,7 +66,7 @@ ] }, { - "name": "GROUP_REINDEERS", + "id": "GROUP_REINDEERS", "type": "monstergroup", "monsters": [ { "monster": "mon_reindeer", "weight": 150, "cost_multiplier": 2 }, @@ -87,7 +87,7 @@ ] }, { - "name": "GROUP_DEER_MUT_SPIDERS", + "id": "GROUP_DEER_MUT_SPIDERS", "type": "monstergroup", "//": "Mutant deer are better prepared to protect/escape with their spawn than normal deer, so, contrary to normal wildlife, their spawn becomes more common as time goes on.", "monsters": [ @@ -107,7 +107,7 @@ ] }, { - "name": "GROUP_WOLFS", + "id": "GROUP_WOLFS", "type": "monstergroup", "monsters": [ { "monster": "mon_wolf", "weight": 150, "cost_multiplier": 2 }, @@ -128,7 +128,7 @@ ] }, { - "name": "GROUP_COUGARS", + "id": "GROUP_COUGARS", "type": "monstergroup", "monsters": [ { "monster": "mon_cougar", "weight": 150, "cost_multiplier": 2 }, @@ -149,7 +149,7 @@ ] }, { - "name": "GROUP_HORSES", + "id": "GROUP_HORSES", "type": "monstergroup", "monsters": [ { "monster": "mon_horse", "weight": 150, "cost_multiplier": 2 }, @@ -158,12 +158,12 @@ ] }, { - "name": "GROUP_HORSES_STABLES", + "id": "GROUP_HORSES_STABLES", "type": "monstergroup", "monsters": [ { "monster": "mon_null", "weight": 50 }, { "group": "GROUP_HORSES", "weight": 50, "ends": "14 days" } ] }, { - "name": "GROUP_MOOSE", + "id": "GROUP_MOOSE", "type": "monstergroup", "monsters": [ { "group": "GROUP_MOOSE_NORMAL", "weight": 19 }, @@ -171,7 +171,7 @@ ] }, { - "name": "GROUP_MOOSE_NORMAL", + "id": "GROUP_MOOSE_NORMAL", "type": "monstergroup", "monsters": [ { "monster": "mon_moose", "weight": 150, "cost_multiplier": 2 }, @@ -180,7 +180,7 @@ ] }, { - "name": "GROUP_TUSKED_MOOSE", + "id": "GROUP_TUSKED_MOOSE", "type": "monstergroup", "//": "Same as mutant deer.", "monsters": [ @@ -190,7 +190,7 @@ ] }, { - "name": "GROUP_COYOTE", + "id": "GROUP_COYOTE", "type": "monstergroup", "//": "Not doing the whole weird thing with timers and weight halving for babies as the groups above me did. I have no idea what's that hoping to accomplish and nobody else seems to either.", "monsters": [ @@ -200,7 +200,7 @@ ] }, { - "name": "GROUP_BEAVER", + "id": "GROUP_BEAVER", "type": "monstergroup", "monsters": [ { "monster": "mon_beaver", "weight": 38 }, @@ -209,7 +209,7 @@ ] }, { - "name": "GROUP_STRAY_DOGS", + "id": "GROUP_STRAY_DOGS", "type": "monstergroup", "default": "mon_dog", "monsters": [ @@ -221,7 +221,7 @@ ] }, { - "name": "GROUP_STRAY_CATS", + "id": "GROUP_STRAY_CATS", "type": "monstergroup", "default": "mon_cat", "monsters": [ @@ -232,7 +232,7 @@ ] }, { - "name": "GROUP_PET_DOGS", + "id": "GROUP_PET_DOGS", "type": "monstergroup", "default": "mon_dog", "monsters": [ @@ -265,7 +265,7 @@ ] }, { - "name": "GROUP_MUTANT_PET_DOGS", + "id": "GROUP_MUTANT_PET_DOGS", "type": "monstergroup", "default": "mon_dog_mutant_mongrel", "monsters": [ @@ -276,7 +276,7 @@ ] }, { - "name": "GROUP_PET_CATS", + "id": "GROUP_PET_CATS", "type": "monstergroup", "default": "mon_cat", "//": "Both persian and sphynx cats are not really fit to survive without human assistance and will die off eventually. persians will overheat in the summer and have trouble breathing because of their flat faces and sphynx cats will freeze in the cold season.", @@ -308,7 +308,7 @@ ] }, { - "name": "GROUP_PETS", + "id": "GROUP_PETS", "type": "monstergroup", "default": "mon_dog", "monsters": [ @@ -319,7 +319,7 @@ ] }, { - "name": "GROUP_RABBIT_WILD", + "id": "GROUP_RABBIT_WILD", "type": "monstergroup", "default": "mon_wild_rabbit", "monsters": [ diff --git a/data/json/monstergroups/mi-go.json b/data/json/monstergroups/mi-go.json index 2f91e20b2fbd9..11fa2cc652a14 100644 --- a/data/json/monstergroups/mi-go.json +++ b/data/json/monstergroups/mi-go.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_MI-GO_CAMP_OM", + "id": "GROUP_MI-GO_CAMP_OM", "//": "Mi-go raiding parties spawning in the vicinity of a mi-go camp. Puts slavers later on and keeps large groups from spawning until the player can deal with them.", "monsters": [ { "monster": "mon_mi_go", "weight": 530 }, @@ -22,7 +22,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MI-GO_BASE_COMMON", + "id": "GROUP_MI-GO_BASE_COMMON", "//": "Basic mi-go base defenders.", "monsters": [ { "monster": "mon_mi_go", "weight": 100, "pack_size": [ 2, 4 ] }, @@ -42,7 +42,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MI-GO_BASE_CAPTORS", + "id": "GROUP_MI-GO_BASE_CAPTORS", "//": "Mi-go base defenders for rooms where captives are being held.", "monsters": [ { "monster": "mon_mi_go_guard", "weight": 700 }, @@ -54,7 +54,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MI-GO_BASE_BOSS", + "id": "GROUP_MI-GO_BASE_BOSS", "//": "Mi-go base defenders for major boss battles.", "monsters": [ { "monster": "mon_mi_go_guard", "weight": 620 }, @@ -71,7 +71,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MI-GO_SCOUT_TOWER", + "id": "GROUP_MI-GO_SCOUT_TOWER", "//": "Mi-go scout tower prisoner room.", "monsters": [ { "monster": "mon_mi_go_surgeon", "weight": 100, "cost_multiplier": 3 }, diff --git a/data/json/monstergroups/military.json b/data/json/monstergroups/military.json index ac6eccbd6da26..1c5e3d1e3c63a 100644 --- a/data/json/monstergroups/military.json +++ b/data/json/monstergroups/military.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_MAYBE_MIL", + "id": "GROUP_MAYBE_MIL", "//": "50% chance military zombie or robot", "monsters": [ { "monster": "mon_null", "weight": 925 }, @@ -14,7 +14,7 @@ ] }, { - "name": "GROUP_MIL_WEAK", + "id": "GROUP_MIL_WEAK", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_soldier", "weight": 645 }, @@ -24,7 +24,7 @@ ] }, { - "name": "GROUP_MIL_STRONG", + "id": "GROUP_MIL_STRONG", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_soldier", "weight": 565 }, @@ -36,7 +36,7 @@ ] }, { - "name": "GROUP_MIL_HELIPAD", + "id": "GROUP_MIL_HELIPAD", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_soldier", "weight": 645 }, @@ -47,12 +47,12 @@ ] }, { - "name": "GROUP_MIL_PILOT", + "id": "GROUP_MIL_PILOT", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_military_pilot" } ] }, { - "name": "GROUP_MIL_PASSENGER", + "id": "GROUP_MIL_PASSENGER", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_soldier", "weight": 245 }, @@ -65,7 +65,7 @@ ] }, { - "name": "GROUP_MIL_BASE", + "id": "GROUP_MIL_BASE", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_soldier", "weight": 580 }, @@ -84,7 +84,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MIL_BASE_CIVILIAN", + "id": "GROUP_MIL_BASE_CIVILIAN", "//": "Civilians with soldiers and burned ones.", "monsters": [ { "monster": "mon_zombie", "weight": 415 }, @@ -122,7 +122,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MIL_BASE_HOSPITAL", + "id": "GROUP_MIL_BASE_HOSPITAL", "//": "Civilians with soldiers, doctors and burned ones. More hazmat.", "monsters": [ { "monster": "mon_zombie", "weight": 50, "cost_multiplier": 2 }, @@ -160,7 +160,7 @@ ] }, { - "name": "GROUP_AIRCRAFT_CARRIER", + "id": "GROUP_AIRCRAFT_CARRIER", "type": "monstergroup", "//": "no children, 40% tech personel 20% civilian personel (med, fire, cook, clercs etc), 20% uniformed zombie, 10% army pilots, and 10% military zeds", "monsters": [ @@ -190,7 +190,7 @@ ] }, { - "name": "GROUP_AIRCRAFT_CARRIER_TECHNICIANS", + "id": "GROUP_AIRCRAFT_CARRIER_TECHNICIANS", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_technician", "weight": 67 }, @@ -209,7 +209,7 @@ ] }, { - "name": "GROUP_MIL_MASS_GRAVE", + "id": "GROUP_MIL_MASS_GRAVE", "type": "monstergroup", "//": "Lots of hazmats.", "monsters": [ { "monster": "mon_zombie_soldier", "weight": 10 }, { "monster": "mon_zombie_hazmat", "weight": 20 } ] diff --git a/data/json/monstergroups/misc.json b/data/json/monstergroups/misc.json index 2dc82cda0a2d6..28fd45acce16a 100644 --- a/data/json/monstergroups/misc.json +++ b/data/json/monstergroups/misc.json @@ -1,13 +1,13 @@ [ { "type": "monstergroup", - "name": "GROUP_NULL", + "id": "GROUP_NULL", "is_safe": true, "monsters": [ { "monster": "mon_null" } ] }, { "type": "monstergroup", - "name": "GROUP_BLACK_ROAD", + "id": "GROUP_BLACK_ROAD", "monsters": [ { "monster": "mon_zombie", "weight": 407 }, { "monster": "mon_zombie", "weight": 1, "cost_multiplier": 7, "pack_size": [ 5, 20 ] }, @@ -62,7 +62,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MANSION_START", + "id": "GROUP_MANSION_START", "//": "Nonsense ferals for the mansion escape challenge scenario, shouldn't be used for general spawns", "monsters": [ { "group": "GROUP_MANSION_PURSUERS", "weight": 1600 }, @@ -72,7 +72,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MANSION_PURSUERS", + "id": "GROUP_MANSION_PURSUERS", "monsters": [ { "monster": "mon_feral_maid_broom", "weight": 600 }, { "monster": "mon_feral_maid_candlestick", "weight": 600 }, @@ -81,12 +81,12 @@ }, { "type": "monstergroup", - "name": "GROUP_MANSION_ARMORED", + "id": "GROUP_MANSION_ARMORED", "monsters": [ { "monster": "mon_feral_armored_mace", "weight": 100 }, { "monster": "mon_feral_armored_battleaxe", "weight": 100 } ] }, { "type": "monstergroup", - "name": "GROUP_CHUD", + "id": "GROUP_CHUD", "monsters": [ { "monster": "mon_chud", "weight": 875, "cost_multiplier": 0 }, { "monster": "mon_crawler", "weight": 35, "cost_multiplier": 0 } @@ -94,7 +94,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SUBWAY", + "id": "GROUP_SUBWAY", "//": "Z-2 subways, some lost nether things but otherwise mostly normal mobs", "default": "mon_silverfish_small", "monsters": [ @@ -127,7 +127,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SUBWAY_CITY", + "id": "GROUP_SUBWAY_CITY", "//": "Normal subway, extra spawns underneath a city", "default": "mon_chud", "monsters": [ @@ -153,7 +153,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SUBWAY_LAB", + "id": "GROUP_SUBWAY_LAB", "//": "Lower subway with eldritch nasties and lab escapees", "default": "mon_kreck", "//2": "1W 42, 1M 180, 1,5M 270, 2M 360, 3M 540, sum 930", @@ -193,7 +193,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DOMESTIC", + "id": "GROUP_DOMESTIC", "default": "mon_dog", "is_animal": true, "monsters": [ @@ -235,7 +235,7 @@ }, { "type": "monstergroup", - "name": "GROUP_BIRD_DOMESTIC", + "id": "GROUP_BIRD_DOMESTIC", "default": "mon_chicken", "is_animal": true, "monsters": [ @@ -248,7 +248,7 @@ }, { "type": "monstergroup", - "name": "GROUP_BIRD_DOMESTIC_WATERFOWL", + "id": "GROUP_BIRD_DOMESTIC_WATERFOWL", "default": "mon_duck_domestic", "is_animal": true, "monsters": [ @@ -258,7 +258,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SAFE", + "id": "GROUP_SAFE", "is_safe": true, "is_animal": true, "monsters": [ @@ -306,7 +306,7 @@ }, { "type": "monstergroup", - "name": "GROUP_BASEMENT_HOUSE", + "id": "GROUP_BASEMENT_HOUSE", "//": "60-30-10% chance of zombies/roaches/cellar spiders, no mixing enemies in the same spawn", "monsters": [ { "group": "GROUP_HOUSE", "weight": 6, "pack_size": [ 2, 6 ] }, @@ -316,7 +316,7 @@ }, { "type": "monstergroup", - "name": "DUMP_ANIMALS", + "id": "DUMP_ANIMALS", "monsters": [ { "monster": "mon_null", "weight": 378 }, { "group": "GROUP_FLY", "weight": 100 }, @@ -342,7 +342,7 @@ }, { "type": "monstergroup", - "name": "GROUP_PEST", + "id": "GROUP_PEST", "monsters": [ { "monster": "mon_crow", "weight": 760 }, { @@ -367,7 +367,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SEWER", + "id": "GROUP_SEWER", "monsters": [ { "monster": "mon_null", "weight": 370, "cost_multiplier": 0 }, { "monster": "mon_zombie_crawler", "weight": 75, "cost_multiplier": 0 }, @@ -382,7 +382,7 @@ ] }, { - "name": "GROUP_VETS", + "id": "GROUP_VETS", "type": "monstergroup", "//": "for veterinarian", "monsters": [ @@ -396,7 +396,7 @@ }, { "type": "monstergroup", - "name": "GROUP_BUNKER", + "id": "GROUP_BUNKER", "monsters": [ { "monster": "mon_zombie_armored", "weight": 25, "cost_multiplier": 20, "pack_size": [ 2, 6 ] }, { "monster": "mon_zombie_soldier", "weight": 600, "cost_multiplier": 3 } @@ -404,12 +404,12 @@ }, { "type": "monstergroup", - "name": "GROUP_SCI", + "id": "GROUP_SCI", "monsters": [ { "monster": "mon_zombie_scientist", "cost_multiplier": 0 } ] }, { "type": "monstergroup", - "name": "GROUP_INFESTED_SPAWN", + "id": "GROUP_INFESTED_SPAWN", "//": "For Compromised Shelter scenario.", "monsters": [ { "monster": "mon_zombie", "weight": 250, "pack_size": [ 2, 3 ], "cost_multiplier": 2 }, @@ -422,7 +422,7 @@ }, { "type": "monstergroup", - "name": "GROUP_YOUR_FEARS", + "id": "GROUP_YOUR_FEARS", "//": "For monsters, spawned by hallucinator effects. Must represent the awful monsters the player want never see. Put here every asshole you want.", "monsters": [ { "monster": "mon_wasp_small" }, @@ -476,7 +476,7 @@ }, { "type": "monstergroup", - "name": "GROUP_NUCLEAR_PLANT_BEASTS", + "id": "GROUP_NUCLEAR_PLANT_BEASTS", "is_animal": true, "monsters": [ { "monster": "mon_bat", "weight": 600, "cost_multiplier": 5, "pack_size": [ 6, 32 ] }, @@ -495,18 +495,18 @@ }, { "type": "monstergroup", - "name": "GROUP_BEEKEEPER", + "id": "GROUP_BEEKEEPER", "monsters": [ { "monster": "mon_beekeeper", "cost_multiplier": 0 } ] }, { - "name": "GROUP_RATTLESNAKE", + "id": "GROUP_RATTLESNAKE", "type": "monstergroup", "monsters": [ { "monster": "mon_rattlesnake", "weight": 19 }, { "monster": "mon_rattlesnake_big", "weight": 1 } ], "//": "Normally for the time until mutants start spawning we take the growth time of a mutant baby with default evolution rates. But because rattlesnakes follow the mutation logic of invertebrates, we assume there were some mildly oversized variations at the start of the Cataclysm already." }, { "type": "monstergroup", - "name": "GROUP_CAMP_HUNTING", + "id": "GROUP_CAMP_HUNTING", "//": "Special group with hardcoded reference in basecamp::hunting_results. Does not actually spawn anywhere, used solely to determine returns from camp hunting mission.", "//2": "This group always has a chance of being the result, regardless of mission type.", "monsters": [ @@ -521,7 +521,7 @@ }, { "type": "monstergroup", - "name": "GROUP_CAMP_TRAPPING", + "id": "GROUP_CAMP_TRAPPING", "//": "Special group with hardcoded reference in basecamp::hunting_results. Does not actually spawn anywhere, used solely to determine returns from camp hunting mission.", "//2": "This group can only be picked from when the trapping mission is used, in addition to GROUP_CAMP_HUNTING.", "monsters": [ @@ -540,7 +540,7 @@ }, { "type": "monstergroup", - "name": "GROUP_CAMP_HUNTING_LARGE", + "id": "GROUP_CAMP_HUNTING_LARGE", "//": "Special group with hardcoded reference in basecamp::hunting_results. Does not actually spawn anywhere, used solely to determine returns from camp hunting mission.", "//2": "This group can only be picked from when the hunt large animals mission is used, in addition to GROUP_CAMP_HUNTING.", "monsters": [ @@ -558,7 +558,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DEBUG_EXACTLY_ONE", + "id": "GROUP_DEBUG_EXACTLY_ONE", "//": "Hardcoded reference in debug() (debug_menu.cpp). Used for debugging, duh.", "monsters": [ { "monster": "mon_zombie", "weight": 1, "cost_multiplier": 1, "pack_size": [ 1, 1 ] } ] } diff --git a/data/json/monstergroups/missions.json b/data/json/monstergroups/missions.json index 21114ff6a705c..71fb82b531345 100644 --- a/data/json/monstergroups/missions.json +++ b/data/json/monstergroups/missions.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_REFUGEE_BOSS_ZOMBIE", + "id": "GROUP_REFUGEE_BOSS_ZOMBIE", "default": "mon_zombie_tough", "//": "The refugee center mission 1 enemy is chosen from here", "monsters": [ diff --git a/data/json/monstergroups/mutant_upgrades.json b/data/json/monstergroups/mutant_upgrades.json index c6466044fae98..7d3276be60553 100644 --- a/data/json/monstergroups/mutant_upgrades.json +++ b/data/json/monstergroups/mutant_upgrades.json @@ -1,19 +1,19 @@ [ { "type": "monstergroup", - "name": "GROUP_CROW_MUTANT", + "id": "GROUP_CROW_MUTANT", "monsters": [ { "monster": "mon_crow_mutant_small", "weight": 650 }, { "monster": "mon_crow_mutant", "weight": 350, "cost_multiplier": 2 } ] }, { - "name": "GROUP_CENTIPEDE_ADULT", + "id": "GROUP_CENTIPEDE_ADULT", "type": "monstergroup", "monsters": [ { "monster": "mon_centipede_giant", "weight": 9 }, { "monster": "mon_centipede_mom", "weight": 1 } ] }, { - "name": "GROUP_CENTIPEDE_GIANT", + "id": "GROUP_CENTIPEDE_GIANT", "type": "monstergroup", "default": "mon_centipede_mom", "monsters": [ @@ -23,7 +23,7 @@ ] }, { - "name": "GROUP_CENTIPEDE_MOM", + "id": "GROUP_CENTIPEDE_MOM", "type": "monstergroup", "monsters": [ { "monster": "mon_centipede_giant", "weight": 65 }, @@ -32,7 +32,7 @@ ] }, { - "name": "GROUP_MUTANT_EVOLVED", + "id": "GROUP_MUTANT_EVOLVED", "type": "monstergroup", "default": "mon_mutant_evolved", "monsters": [ @@ -46,7 +46,7 @@ ] }, { - "name": "GROUP_RATKIN_EVOLVED", + "id": "GROUP_RATKIN_EVOLVED", "type": "monstergroup", "monsters": [ { "monster": "mon_zap_rat", "weight": 300 }, diff --git a/data/json/monstergroups/mutant_vertebrate_reproduction.json b/data/json/monstergroups/mutant_vertebrate_reproduction.json index fa6cb982e9cf5..28607e9a85469 100644 --- a/data/json/monstergroups/mutant_vertebrate_reproduction.json +++ b/data/json/monstergroups/mutant_vertebrate_reproduction.json @@ -1,11 +1,11 @@ [ { - "name": "REPRODUCTION_MUT_MOOSE", + "id": "REPRODUCTION_MUT_MOOSE", "type": "monstergroup", "monsters": [ { "monster": "mon_moose_calf", "weight": 19 }, { "monster": "mon_tusked_moose_calf", "weight": 1 } ] }, { - "name": "REPRODUCTION_MUT_COYOTE", + "id": "REPRODUCTION_MUT_COYOTE", "type": "monstergroup", "monsters": [ { "monster": "mon_coyote_pup", "weight": 38 }, @@ -14,7 +14,7 @@ ] }, { - "name": "REPRODUCTION_MUT_BEAVER", + "id": "REPRODUCTION_MUT_BEAVER", "type": "monstergroup", "monsters": [ { "monster": "mon_beaver_kit", "weight": 38 }, @@ -23,7 +23,7 @@ ] }, { - "name": "REPRODUCTION_MUT_RATTLESNAKE", + "id": "REPRODUCTION_MUT_RATTLESNAKE", "type": "monstergroup", "monsters": [ { "monster": "mon_rattlesnake_s", "weight": 19 }, { "monster": "mon_rattlesnake_big_s", "weight": 1 } ] } diff --git a/data/json/monstergroups/nether.json b/data/json/monstergroups/nether.json index b72d4fa918a2a..fef39e3a97b70 100644 --- a/data/json/monstergroups/nether.json +++ b/data/json/monstergroups/nether.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_BREATHER", + "id": "GROUP_BREATHER", "monsters": [ { "monster": "mon_breather", "weight": 990 }, { "monster": "mon_breather", "weight": 10, "cost_multiplier": 2, "pack_size": [ 2, 4 ] } @@ -9,22 +9,22 @@ }, { "type": "monstergroup", - "name": "GROUP_BREATHER_HUB", + "id": "GROUP_BREATHER_HUB", "monsters": [ { "monster": "mon_breather_hub" } ] }, { "type": "monstergroup", - "name": "GROUP_CHURCH_BLANK", + "id": "GROUP_CHURCH_BLANK", "monsters": [ { "monster": "mon_blank", "cost_multiplier": 0 } ] }, { - "name": "GROUP_DARK_WYRM", + "id": "GROUP_DARK_WYRM", "type": "monstergroup", "monsters": [ { "monster": "mon_dark_wyrm" } ] }, { "type": "monstergroup", - "name": "GROUP_NETHER_REALITY_TEAR_FIELD", + "id": "GROUP_NETHER_REALITY_TEAR_FIELD", "default": "mon_blank", "monsters": [ { "monster": "mon_flying_polyp", "weight": 100, "cost_multiplier": 0 }, @@ -42,7 +42,7 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHER", + "id": "GROUP_NETHER", "default": "mon_blank", "monsters": [ { "monster": "mon_blank", "weight": 135, "cost_multiplier": 0 }, @@ -61,7 +61,7 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHER_CAPTURED", + "id": "GROUP_NETHER_CAPTURED", "default": "mon_gracke", "monsters": [ { "monster": "mon_gelatin", "weight": 250, "cost_multiplier": 0 }, @@ -73,7 +73,7 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHER_UNVIABLE", + "id": "GROUP_NETHER_UNVIABLE", "default": "mon_nether_unviable_bug", "monsters": [ { "monster": "mon_nether_unviable_bug", "weight": 4, "cost_multiplier": 0, "pack_size": [ 2, 6 ] }, @@ -85,7 +85,7 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHER_PORTAL", + "id": "GROUP_NETHER_PORTAL", "default": "mon_gracke", "monsters": [ { "monster": "mon_gelatin", "weight": 200, "cost_multiplier": 0 }, @@ -99,7 +99,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SPIRAL", + "id": "GROUP_SPIRAL", "monsters": [ { "monster": "mon_human_snail", "weight": 740, "cost_multiplier": 0 }, { "monster": "mon_twisted_body", "weight": 180, "cost_multiplier": 0 }, @@ -108,12 +108,12 @@ }, { "type": "monstergroup", - "name": "GROUP_TINDALOS", + "id": "GROUP_TINDALOS", "monsters": [ { "monster": "mon_hound_tindalos" } ] }, { "type": "monstergroup", - "name": "GROUP_NETHER_CORPSE", + "id": "GROUP_NETHER_CORPSE", "default": "mon_gracke", "monsters": [ { "monster": "mon_gelatin", "weight": 100, "cost_multiplier": 0 }, @@ -130,7 +130,7 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHER_CORPSE_PORTAL", + "id": "GROUP_NETHER_CORPSE_PORTAL", "default": "mon_gracke", "monsters": [ { "monster": "mon_gelatin", "weight": 70, "cost_multiplier": 0 }, @@ -146,7 +146,7 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHER_CORPSE_TENTACLES", + "id": "GROUP_NETHER_CORPSE_TENTACLES", "monsters": [ { "monster": "mon_hanging_roper", "weight": 200, "cost_multiplier": 0 }, { "monster": "mon_nether_spearfisher", "weight": 150, "cost_multiplier": 0 }, @@ -156,7 +156,7 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHER_CORPSE_BOWELS", + "id": "GROUP_NETHER_CORPSE_BOWELS", "monsters": [ { "monster": "mon_nether_spearfisher", "weight": 150, "cost_multiplier": 0 }, { "monster": "mon_nether_fish", "weight": 300, "cost_multiplier": 0, "pack_size": [ 1, 3 ] }, diff --git a/data/json/monstergroups/resort.json b/data/json/monstergroups/resort.json index 188ae82a2b491..e4aca4200cdba 100644 --- a/data/json/monstergroups/resort.json +++ b/data/json/monstergroups/resort.json @@ -1,6 +1,6 @@ [ { - "name": "GROUP_RESORT_DANCERS", + "id": "GROUP_RESORT_DANCERS", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_resort_dancer", "weight": 775 }, @@ -10,7 +10,7 @@ ] }, { - "name": "GROUP_RESORT_MIXED", + "id": "GROUP_RESORT_MIXED", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_resort_dancer", "weight": 10, "cost_multiplier": 2, "pack_size": [ 1, 3 ] }, @@ -25,7 +25,7 @@ ] }, { - "name": "GROUP_RESORT_MIXED_STAFF", + "id": "GROUP_RESORT_MIXED_STAFF", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie", "weight": 890 }, @@ -35,7 +35,7 @@ ] }, { - "name": "GROUP_RESORT_STAFF", + "id": "GROUP_RESORT_STAFF", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie", "weight": 800 }, @@ -43,7 +43,7 @@ ] }, { - "name": "GROUP_RESORT_BOUNCER", + "id": "GROUP_RESORT_BOUNCER", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie", "weight": 800 }, diff --git a/data/json/monstergroups/robots.json b/data/json/monstergroups/robots.json index f56b0d7be34be..6a5a4b43ce926 100644 --- a/data/json/monstergroups/robots.json +++ b/data/json/monstergroups/robots.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_ROBOT", + "id": "GROUP_ROBOT", "monsters": [ { "monster": "mon_manhack", "weight": 515, "cost_multiplier": 0 }, { "monster": "mon_skitterbot", "weight": 220, "cost_multiplier": 0 }, @@ -12,7 +12,7 @@ }, { "type": "monstergroup", - "name": "GROUP_TURRET", + "id": "GROUP_TURRET", "monsters": [ { "monster": "mon_turret_rifle", @@ -29,7 +29,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ROBOT_SECUBOT", + "id": "GROUP_ROBOT_SECUBOT", "monsters": [ { "monster": "mon_secubot", "cost_multiplier": 0, "spawn_data": { "ammo": [ { "ammo_id": "556", "qty": 30 } ] } } ] } ] diff --git a/data/json/monstergroups/triffid.json b/data/json/monstergroups/triffid.json index c60e64976cc47..693157bc398c8 100644 --- a/data/json/monstergroups/triffid.json +++ b/data/json/monstergroups/triffid.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_TRIFFID", + "id": "GROUP_TRIFFID", "default": "mon_triffid", "monsters": [ { "monster": "mon_triffid_sprig", "weight": 200, "cost_multiplier": 0, "pack_size": [ 1, 3 ] }, @@ -19,7 +19,7 @@ }, { "type": "monstergroup", - "name": "GROUP_TRIFFID_OUTER", + "id": "GROUP_TRIFFID_OUTER", "default": "mon_triffid", "monsters": [ { "monster": "mon_triffid_sprig", "weight": 80, "cost_multiplier": 0, "pack_size": [ 1, 3 ] }, @@ -36,7 +36,7 @@ }, { "type": "monstergroup", - "name": "GROUP_TRIFFID_HEARTGUARDS", + "id": "GROUP_TRIFFID_HEARTGUARDS", "default": "mon_triffid", "monsters": [ { "monster": "mon_triffid", "weight": 280, "cost_multiplier": 0 }, @@ -47,7 +47,7 @@ }, { "type": "monstergroup", - "name": "GROUP_TRIFFID_HEART", + "id": "GROUP_TRIFFID_HEART", "monsters": [ { "monster": "mon_triffid_heart" } ] } ] diff --git a/data/json/monstergroups/wilderness.json b/data/json/monstergroups/wilderness.json index 29e1b74608173..9c29d809e8313 100644 --- a/data/json/monstergroups/wilderness.json +++ b/data/json/monstergroups/wilderness.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_CAVE", + "id": "GROUP_CAVE", "is_animal": true, "monsters": [ { "monster": "mon_bat", "weight": 600, "pack_size": [ 2, 5 ] }, @@ -17,7 +17,7 @@ }, { "type": "monstergroup", - "name": "GROUP_FOREST", + "id": "GROUP_FOREST", "default": "mon_null", "is_animal": true, "monsters": [ @@ -127,7 +127,7 @@ }, { "type": "monstergroup", - "name": "GROUP_WILDERNESS_FOREST_MAMMAL", + "id": "GROUP_WILDERNESS_FOREST_MAMMAL", "default": "mon_null", "is_animal": true, "monsters": [ @@ -158,7 +158,7 @@ }, { "type": "monstergroup", - "name": "GROUP_WILDERNESS_FOREST_MAMMAL_WINTER", + "id": "GROUP_WILDERNESS_FOREST_MAMMAL_WINTER", "default": "mon_null", "is_animal": true, "monsters": [ @@ -175,7 +175,7 @@ }, { "type": "monstergroup", - "name": "GROUP_WILDERNESS_FOREST_MAMMAL_MUTANT", + "id": "GROUP_WILDERNESS_FOREST_MAMMAL_MUTANT", "default": "mon_null", "is_animal": true, "monsters": [ @@ -185,7 +185,7 @@ }, { "type": "monstergroup", - "name": "GROUP_WILDERNESS_FOREST_BIRD", + "id": "GROUP_WILDERNESS_FOREST_BIRD", "default": "mon_null", "is_animal": true, "monsters": [ @@ -218,7 +218,7 @@ }, { "type": "monstergroup", - "name": "GROUP_WILDERNESS_FOREST_REPTILE", + "id": "GROUP_WILDERNESS_FOREST_REPTILE", "default": "mon_null", "is_animal": true, "monsters": [ @@ -230,7 +230,7 @@ }, { "type": "monstergroup", - "name": "GROUP_WILDERNESS_FOREST_INSECT_HARMLESS", + "id": "GROUP_WILDERNESS_FOREST_INSECT_HARMLESS", "default": "mon_null", "is_animal": true, "monsters": [ @@ -241,7 +241,7 @@ }, { "type": "monstergroup", - "name": "GROUP_WILDERNESS_FOREST_INSECT", + "id": "GROUP_WILDERNESS_FOREST_INSECT", "default": "mon_null", "is_animal": true, "monsters": [ @@ -265,7 +265,7 @@ }, { "type": "monstergroup", - "name": "GROUP_WILDERNESS_FOREST_ZOMBIE", + "id": "GROUP_WILDERNESS_FOREST_ZOMBIE", "default": "mon_null", "is_animal": true, "monsters": [ @@ -280,7 +280,7 @@ }, { "type": "monstergroup", - "name": "GROUP_RIVER", + "id": "GROUP_RIVER", "default": "mon_null", "is_animal": true, "monsters": [ @@ -394,7 +394,7 @@ }, { "type": "monstergroup", - "name": "GROUP_OCEAN_SHORE", + "id": "GROUP_OCEAN_SHORE", "default": "mon_null", "is_animal": true, "monsters": [ @@ -412,7 +412,7 @@ }, { "type": "monstergroup", - "name": "GROUP_OCEAN_DEEP", + "id": "GROUP_OCEAN_DEEP", "default": "mon_null", "is_animal": true, "monsters": [ @@ -434,7 +434,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SWAMP", + "id": "GROUP_SWAMP", "default": "mon_null", "is_animal": true, "monsters": [ @@ -479,7 +479,7 @@ }, { "type": "monstergroup", - "name": "GROUP_WILDERNESS_FRESHWATER_REPTILE", + "id": "GROUP_WILDERNESS_FRESHWATER_REPTILE", "default": "mon_null", "is_animal": true, "monsters": [ @@ -489,7 +489,7 @@ }, { "type": "monstergroup", - "name": "GROUP_WILDERNESS_SWAMP_INSECT", + "id": "GROUP_WILDERNESS_SWAMP_INSECT", "default": "mon_null", "is_animal": true, "monsters": [ @@ -504,7 +504,7 @@ }, { "type": "monstergroup", - "name": "GROUP_PARK_ANIMAL", + "id": "GROUP_PARK_ANIMAL", "is_animal": true, "monsters": [ { "monster": "mon_crow", "weight": 50, "cost_multiplier": 0 }, @@ -536,7 +536,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ROOF_ANIMAL", + "id": "GROUP_ROOF_ANIMAL", "is_animal": true, "monsters": [ { "monster": "mon_crow", "weight": 45, "cost_multiplier": 0 }, @@ -576,7 +576,7 @@ }, { "type": "monstergroup", - "name": "GROUP_POND_ANIMAL", + "id": "GROUP_POND_ANIMAL", "is_animal": true, "monsters": [ { "group": "GROUP_RABBIT_WILD", "weight": 50, "cost_multiplier": 0 }, @@ -593,7 +593,7 @@ }, { "type": "monstergroup", - "name": "GROUP_POND_BIRD", + "id": "GROUP_POND_BIRD", "is_animal": true, "monsters": [ { "monster": "mon_duck", "weight": 50, "cost_multiplier": 0 }, @@ -607,7 +607,7 @@ }, { "type": "monstergroup", - "name": "GROUP_POND_FISH", + "id": "GROUP_POND_FISH", "is_animal": true, "monsters": [ { "group": "GROUP_POND_FISH_2", "weight": 200, "cost_multiplier": 0 }, @@ -618,7 +618,7 @@ }, { "type": "monstergroup", - "name": "GROUP_POND_FISH_2", + "id": "GROUP_POND_FISH_2", "is_animal": true, "monsters": [ { "monster": "mon_fish_bluegill", "weight": 50, "cost_multiplier": 0 }, @@ -629,7 +629,7 @@ }, { "type": "monstergroup", - "name": "GROUP_BIRDFEEDER", + "id": "GROUP_BIRDFEEDER", "is_animal": true, "monsters": [ { "monster": "mon_bluejay", "weight": 50, "cost_multiplier": 0 }, @@ -645,7 +645,7 @@ }, { "type": "monstergroup", - "name": "GROUP_STREAM", + "id": "GROUP_STREAM", "is_animal": true, "monsters": [ { "group": "GROUP_STREAM_SMALL", "weight": 30 }, @@ -657,7 +657,7 @@ }, { "type": "monstergroup", - "name": "GROUP_STREAM_DOMESTIC", + "id": "GROUP_STREAM_DOMESTIC", "is_animal": true, "monsters": [ { "monster": "mon_goat", "weight": 1, "pack_size": [ 1, 4 ] }, @@ -666,7 +666,7 @@ }, { "type": "monstergroup", - "name": "GROUP_STREAM_BIRDS", + "id": "GROUP_STREAM_BIRDS", "is_animal": true, "monsters": [ { "monster": "mon_duck", "weight": 20, "pack_size": [ 1, 4 ], "conditions": [ "SPRING", "SUMMER", "AUTUMN" ] }, @@ -678,7 +678,7 @@ }, { "type": "monstergroup", - "name": "GROUP_STREAM_SMALL", + "id": "GROUP_STREAM_SMALL", "is_animal": true, "monsters": [ { diff --git a/data/json/monstergroups/zanimal_upgrades.json b/data/json/monstergroups/zanimal_upgrades.json index 5e7d3f5d94e3d..b43532366ff1d 100644 --- a/data/json/monstergroups/zanimal_upgrades.json +++ b/data/json/monstergroups/zanimal_upgrades.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_ZOMBIE_DOG_UPGRADE", + "id": "GROUP_ZOMBIE_DOG_UPGRADE", "//": "No bionics or fungal", "monsters": [ { "monster": "mon_dog_skeleton", "weight": 340, "cost_multiplier": 5 }, @@ -13,7 +13,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_PIG_UPGRADE", + "id": "GROUP_ZOMBIE_PIG_UPGRADE", "//": "No bionics or fungal", "monsters": [ { "monster": "mon_zpig_brute", "weight": 45, "cost_multiplier": 2 }, @@ -22,7 +22,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOLF_UPGRADE", + "id": "GROUP_ZOLF_UPGRADE", "default": "mon_wolf_skeleton", "//": "No bionics or fungal", "monsters": [ @@ -32,7 +32,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_HORSE_UPGRADE", + "id": "GROUP_ZOMBIE_HORSE_UPGRADE", "monsters": [ { "monster": "mon_zombie_horse_white", "weight": 250, "cost_multiplier": 2 }, { "monster": "mon_zombie_horse_red", "weight": 250, "cost_multiplier": 2 }, @@ -42,7 +42,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBEAR_UPGRADE", + "id": "GROUP_ZOMBEAR_UPGRADE", "default": "mon_zombear_skeleton", "//": "No bionics or fungal", "monsters": [ @@ -52,7 +52,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOOSE_UPGRADE", + "id": "GROUP_ZOOSE_UPGRADE", "default": "mon_zoose_brute", "monsters": [ { "monster": "mon_zoose_brute", "weight": 500, "cost_multiplier": 15 }, @@ -61,7 +61,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOUGAR_UPGRADE", + "id": "GROUP_ZOUGAR_UPGRADE", "monsters": [ { "monster": "mon_zougar_hunter", "weight": 600, "cost_multiplier": 4 }, { "monster": "mon_zougar_shady", "weight": 400, "cost_multiplier": 6 } diff --git a/data/json/monstergroups/zombie_amalgamations.json b/data/json/monstergroups/zombie_amalgamations.json index 1be75e39ecdef..bebf800bc46e6 100644 --- a/data/json/monstergroups/zombie_amalgamations.json +++ b/data/json/monstergroups/zombie_amalgamations.json @@ -1,12 +1,12 @@ [ { - "name": "GROUP_COCOON_TINY", + "id": "GROUP_COCOON_TINY", "type": "monstergroup", "//": "All cocoon groups have a token mon_null spawn, increase its weight if they turn out to be too common", "monsters": [ { "monster": "mon_null", "weight": 1 }, { "monster": "mon_amalgamation_swarmer", "weight": 1, "starts": "2 days" } ] }, { - "name": "GROUP_COCOON_SMALL", + "id": "GROUP_COCOON_SMALL", "type": "monstergroup", "monsters": [ { "monster": "mon_null", "weight": 1 }, @@ -16,7 +16,7 @@ ] }, { - "name": "GROUP_COCOON_MED_1", + "id": "GROUP_COCOON_MED_1", "type": "monstergroup", "monsters": [ { "monster": "mon_null", "weight": 1 }, @@ -25,7 +25,7 @@ ] }, { - "name": "GROUP_COCOON_MED_2", + "id": "GROUP_COCOON_MED_2", "type": "monstergroup", "monsters": [ { "monster": "mon_null", "weight": 1 }, @@ -34,7 +34,7 @@ ] }, { - "name": "GROUP_COCOON_LARGE", + "id": "GROUP_COCOON_LARGE", "type": "monstergroup", "//": "TODO: big amalgamation line for this (and larger) groups", "monsters": [ @@ -45,12 +45,12 @@ ] }, { - "name": "GROUP_AMALGAMATION_BREATHER_HUB_SPARSE", + "id": "GROUP_AMALGAMATION_BREATHER_HUB_SPARSE", "type": "monstergroup", "monsters": [ { "monster": "mon_null", "weight": 9 }, { "monster": "mon_amalgamation_breather_hub" } ] }, { - "name": "GROUP_AMALGAMATION_SMALL", + "id": "GROUP_AMALGAMATION_SMALL", "type": "monstergroup", "monsters": [ { "monster": "mon_amalgamation_swarmer", "weight": 3, "pack_size": [ 1, 2 ] }, @@ -60,7 +60,7 @@ ] }, { - "name": "GROUP_AMALGAMATION_MED", + "id": "GROUP_AMALGAMATION_MED", "type": "monstergroup", "monsters": [ { "monster": "mon_amalgamation_jumper", "pack_size": [ 1, 2 ], "weight": 4 }, diff --git a/data/json/monstergroups/zombie_upgrades.json b/data/json/monstergroups/zombie_upgrades.json index 9cbfd69661717..e2e1d7913454f 100644 --- a/data/json/monstergroups/zombie_upgrades.json +++ b/data/json/monstergroups/zombie_upgrades.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_ZOMBIE_UPGRADE", + "id": "GROUP_ZOMBIE_UPGRADE", "//": "Masters pick from here when upgrading; no dogs, bionics, or profession-types. Note that 'freq' units are tenth of a percent, with default filling in the gap.", "monsters": [ { "monster": "mon_zombie_tough", "weight": 110 }, @@ -34,7 +34,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_CRAWLER_UPGRADE", + "id": "GROUP_ZOMBIE_CRAWLER_UPGRADE", "default": "mon_zombie_crawler", "//": "crawling zombie upgrades", "monsters": [ @@ -44,13 +44,13 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_BRAINLESS_UPGRADE", + "id": "GROUP_ZOMBIE_BRAINLESS_UPGRADE", "//": "No bionics or fungal", "monsters": [ { "monster": "mon_zombie_ears", "weight": 245 }, { "monster": "mon_afs_headless_horror", "weight": 40 } ] }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_FAT", + "id": "GROUP_ZOMBIE_FAT", "default": "mon_zombie_gasbag", "//": "fat zombie upgrades", "monsters": [ @@ -63,7 +63,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_GRAB", + "id": "GROUP_ZOMBIE_GRAB", "monsters": [ { "monster": "mon_zombie_grappler", "weight": 960, "cost_multiplier": 0 }, { "monster": "mon_zombie_biter", "weight": 40, "cost_multiplier": 2 } @@ -71,7 +71,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SOLDIER_UPGRADE", + "id": "GROUP_SOLDIER_UPGRADE", "default": "mon_zombie_kevlar_0", "//": "Masters pick from here when upgrading. Note that 'freq' units are tenth of a percent, with default filling in the gap.", "monsters": [ @@ -87,7 +87,7 @@ }, { "type": "monstergroup", - "name": "GROUP_FIREMAN_UPGRADE", + "id": "GROUP_FIREMAN_UPGRADE", "//": "Masters pick from here when upgrading.", "monsters": [ { "monster": "mon_zombie_fireproof", "weight": 250 }, @@ -97,7 +97,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MEDICAL_UPGRADE", + "id": "GROUP_MEDICAL_UPGRADE", "//": "Masters pick from here when upgrading. Note that 'freq' units are tenth of a percent, with default filling in the gap.", "monsters": [ { "monster": "mon_zombie_medical_brute", "weight": 200 }, @@ -112,7 +112,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MEDICAL_CRAWLER_UPGRADE", + "id": "GROUP_MEDICAL_CRAWLER_UPGRADE", "default": "mon_zombie_medical_pupa", "//": "crawling medical zombie upgrades", "monsters": [ @@ -122,7 +122,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_BRUTE", + "id": "GROUP_ZOMBIE_BRUTE", "default": "mon_zombie_brute", "//": "Brute upgrades. Note that 'freq' units are tenth of a percent, with default filling in the gap.", "monsters": [ @@ -135,7 +135,7 @@ }, { "type": "monstergroup", - "name": "GROUP_CHILD_ZOMBIE_UPGRADE", + "id": "GROUP_CHILD_ZOMBIE_UPGRADE", "default": "mon_zombie_shriekling", "//": "this is a sub-group of mutated zombie types that can only evolve from zombified human children. Note that 'freq' units are tenth of a percent, with default filling in the gap.", "monsters": [ @@ -150,13 +150,13 @@ }, { "type": "monstergroup", - "name": "GROUP_BRUTE_PUPA", + "id": "GROUP_BRUTE_PUPA", "//": "this is a sub-group of pupating zombies that can only evolve from pupating zombie brutes. Note that 'freq' units are tenth of a percent, with default filling in the gap.", "monsters": [ { "monster": "mon_hulk_pupa", "weight": 500 }, { "monster": "mon_hulk_pupa_decoy", "weight": 500 } ] }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_ELECTRIC_UPGRADE", + "id": "GROUP_ZOMBIE_ELECTRIC_UPGRADE", "//": "Note that 'freq' units are tenth of a percent, with default filling in the gap.", "monsters": [ { "monster": "mon_zombie_nullfield", "weight": 400 }, @@ -166,7 +166,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_RAPTOR_UPGRADES", + "id": "GROUP_ZOMBIE_RAPTOR_UPGRADES", "default": "mon_spawn_raptor", "//": "Raptor upgrades. Note that 'freq' units are tenth of a percent, with default filling in the gap.", "monsters": [ @@ -177,7 +177,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_SHADY_UPGRADES", + "id": "GROUP_ZOMBIE_SHADY_UPGRADES", "default": "mon_zombie_shady", "//": "Shady upgrades. Note that 'freq' units are tenth of a percent, with default filling in the gap.", "monsters": [ @@ -188,7 +188,7 @@ ] }, { - "name": "GROUP_FERROUS_UPGRADE", + "id": "GROUP_FERROUS_UPGRADE", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_shell", "weight": 250 }, @@ -198,7 +198,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_BOOMER_UPGRADE", + "id": "GROUP_ZOMBIE_BOOMER_UPGRADE", "default": "mon_boomer", "//": "Boomer upgrades. Note that 'freq' units are tenth of a percent, with default filling in the gap.", "monsters": [ @@ -212,7 +212,7 @@ ] }, { - "name": "GROUP_SKELETON_UPGRADE", + "id": "GROUP_SKELETON_UPGRADE", "type": "monstergroup", "monsters": [ { "monster": "mon_skeleton_slasher", "weight": 120, "cost_multiplier": 2 }, @@ -222,7 +222,7 @@ ] }, { - "name": "GROUP_ZOMBIE_MINER_UPGRADE", + "id": "GROUP_ZOMBIE_MINER_UPGRADE", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_shady", "weight": 150 }, diff --git a/data/json/monstergroups/zombies.json b/data/json/monstergroups/zombies.json index 52c0c948bb0b4..818fea5634b2a 100644 --- a/data/json/monstergroups/zombies.json +++ b/data/json/monstergroups/zombies.json @@ -1,6 +1,6 @@ [ { - "name": "GROUP_PARK_SCENIC", + "id": "GROUP_PARK_SCENIC", "type": "monstergroup", "monsters": [ { "group": "GROUP_CIVILIANS_STANDARD", "weight": 100, "cost_multiplier": 0 }, @@ -17,12 +17,12 @@ ] }, { - "name": "GROUP_SURVIVOR_FOREST", + "id": "GROUP_SURVIVOR_FOREST", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_survivor", "weight": 50 }, { "monster": "mon_feral_sapien_spear", "weight": 50 } ] }, { - "name": "GROUP_ROOF_ZOMBIE", + "id": "GROUP_ROOF_ZOMBIE", "type": "monstergroup", "monsters": [ { "monster": "mon_null", "weight": 540 }, @@ -42,7 +42,7 @@ ] }, { - "name": "GROUP_PARK_PLAYGROUND", + "id": "GROUP_PARK_PLAYGROUND", "type": "monstergroup", "monsters": [ { "group": "GROUP_CIVILIANS_STANDARD", "weight": 100, "cost_multiplier": 0 }, @@ -57,7 +57,7 @@ ] }, { - "name": "GROUP_PARK_DOG", + "id": "GROUP_PARK_DOG", "type": "monstergroup", "monsters": [ { "group": "GROUP_CIVILIANS_STANDARD", "weight": 100, "cost_multiplier": 0 }, @@ -75,7 +75,7 @@ ] }, { - "name": "GROUP_DOGS", + "id": "GROUP_DOGS", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_dog", "weight": 135, "cost_multiplier": 0, "pack_size": [ 5, 8 ] }, @@ -83,7 +83,7 @@ ] }, { - "name": "GROUP_ZOMBIE_SCORCHED", + "id": "GROUP_ZOMBIE_SCORCHED", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_scorched", "weight": 985 }, @@ -93,7 +93,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE", + "id": "GROUP_ZOMBIE", "monsters": [ { "group": "GROUP_CIVILIANS_STANDARD", "weight": 500, "cost_multiplier": 0 }, { "group": "GROUP_VANILLA_DORMANT", "weight": 250, "cost_multiplier": 0 }, @@ -135,7 +135,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_GASSTATION", + "id": "GROUP_ZOMBIE_GASSTATION", "monsters": [ { "group": "GROUP_CIVILIANS_STANDARD", "weight": 100, "cost_multiplier": 0 }, { "monster": "mon_zombie", "weight": 1, "cost_multiplier": 7, "pack_size": [ 5, 20 ] }, @@ -177,18 +177,18 @@ { "type": "monstergroup", "default": "mon_null", - "name": "GROUP_ZOMBIE_GAS", + "id": "GROUP_ZOMBIE_GAS", "monsters": [ { "monster": "mon_gas_zombie", "weight": 250, "cost_multiplier": 2, "starts": "7 days" } ] }, { "type": "monstergroup", - "name": "GROUP_NEMESIS", + "id": "GROUP_NEMESIS", "//": "nemesis squad", "monsters": [ { "monster": "mon_zombie_nemesis", "weight": 1000, "cost_multiplier": 0 } ] }, { "type": "monstergroup", - "name": "GROUP_FERAL", + "id": "GROUP_FERAL", "//": "default ferals", "default": "mon_feral_human_crowbar", "monsters": [ @@ -202,7 +202,7 @@ }, { "type": "monstergroup", - "name": "GROUP_VANILLA_ONLY_HUMANS", + "id": "GROUP_VANILLA_ONLY_HUMANS", "//": "only human zombies, used in the refugee center", "default": "mon_zombie", "monsters": [ @@ -217,7 +217,7 @@ }, { "type": "monstergroup", - "name": "GROUP_VANILLA_NO_FERAL", + "id": "GROUP_VANILLA_NO_FERAL", "//": "also no civilians, currently used in the sealed hazardous waste sarcophagus chamber", "default": "mon_zombie", "monsters": [ @@ -227,7 +227,7 @@ }, { "type": "monstergroup", - "name": "GROUP_VANILLA_DORMANT", + "id": "GROUP_VANILLA_DORMANT", "default": "mon_pseudo_dormant_zombie", "//": "only dormant zombies", "//2": "These are generated in MonsterGenerator::generate_fake_pseudo_dormant_monster", @@ -243,7 +243,7 @@ }, { "type": "monstergroup", - "name": "GROUP_VANILLA", + "id": "GROUP_VANILLA", "default": "mon_zombie", "//": "Normalized to 1300", "monsters": [ @@ -255,7 +255,7 @@ }, { "type": "monstergroup", - "name": "GROUP_POLICE", + "id": "GROUP_POLICE", "//": "+30% cops, much higher chance of paramilitary people", "default": "mon_zombie", "monsters": [ @@ -285,7 +285,7 @@ }, { "type": "monstergroup", - "name": "GROUP_POLICE_EXTRA", + "id": "GROUP_POLICE_EXTRA", "//": "100% cops, 0% civilians", "default": "mon_zombie", "monsters": [ @@ -296,7 +296,7 @@ }, { "type": "monstergroup", - "name": "GROUP_HOUSE", + "id": "GROUP_HOUSE", "//": "+15% child", "monsters": [ { "group": "GROUP_CIVILIANS_STANDARD", "weight": 200, "cost_multiplier": 0 }, @@ -328,7 +328,7 @@ }, { "type": "monstergroup", - "name": "GROUP_PREPPER_HOUSE", + "id": "GROUP_PREPPER_HOUSE", "default": "mon_zombie", "monsters": [ { "monster": "mon_zombie_milbase_personnel", "weight": 400, "cost_multiplier": 0, "starts": "540 hours" }, @@ -354,7 +354,7 @@ }, { "type": "monstergroup", - "name": "GROUP_PHARM", + "id": "GROUP_PHARM", "//": "+13% fast", "monsters": [ { "group": "GROUP_CIVILIANS_STANDARD", "weight": 100, "cost_multiplier": 0 }, @@ -383,7 +383,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ELECTRO", + "id": "GROUP_ELECTRO", "//": "+15% electric", "monsters": [ { "group": "GROUP_CIVILIANS_STANDARD", "weight": 50, "cost_multiplier": 0 }, @@ -410,7 +410,7 @@ }, { "type": "monstergroup", - "name": "GROUP_GROCERY", + "id": "GROUP_GROCERY", "//": "+15% fat", "monsters": [ { "group": "GROUP_CIVILIANS_STANDARD", "weight": 200, "cost_multiplier": 0 }, @@ -438,7 +438,7 @@ }, { "type": "monstergroup", - "name": "GROUP_PUBLICWORKERS", + "id": "GROUP_PUBLICWORKERS", "monsters": [ { "group": "GROUP_CIVILIANS_STANDARD", "weight": 100, "cost_multiplier": 0 }, { "monster": "mon_zombie", "weight": 100, "cost_multiplier": 5 }, @@ -452,7 +452,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MAYBE_ZOMBIE", + "id": "GROUP_MAYBE_ZOMBIE", "//": "10% chance of a zombie", "monsters": [ { "monster": "mon_null", "weight": 700 }, @@ -468,12 +468,12 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_FAT_BASE", + "id": "GROUP_ZOMBIE_FAT_BASE", "monsters": [ { "monster": "mon_zombie_fat", "cost_multiplier": 2 } ] }, { "type": "monstergroup", - "name": "GROUP_SCHOOL", + "id": "GROUP_SCHOOL", "//": "School monster spawns.", "monsters": [ { "monster": "mon_null", "weight": 10 }, @@ -488,7 +488,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SMALL_STATION", + "id": "GROUP_SMALL_STATION", "monsters": [ { "group": "GROUP_CIVILIANS_STANDARD", "weight": 20, "cost_multiplier": 0 }, { "monster": "mon_zombie_static", "weight": 55, "cost_multiplier": 4, "pack_size": [ 1, 2 ] }, @@ -501,7 +501,7 @@ }, { "type": "monstergroup", - "name": "GROUP_LARGE_STATION", + "id": "GROUP_LARGE_STATION", "monsters": [ { "group": "GROUP_CIVILIANS_STANDARD", "weight": 100, "cost_multiplier": 0 }, { "monster": "mon_zombie_static", "weight": 55, "cost_multiplier": 4, "pack_size": [ 1, 2 ] }, @@ -512,7 +512,7 @@ }, { "type": "monstergroup", - "name": "GROUP_OIL_PLATFORM", + "id": "GROUP_OIL_PLATFORM", "monsters": [ { "monster": "mon_zombie_technician", "weight": 60 }, { "monster": "mon_zombie", "weight": 90 }, @@ -539,7 +539,7 @@ }, { "type": "monstergroup", - "name": "GROUP_CHURCH_ZOMBIE", + "id": "GROUP_CHURCH_ZOMBIE", "monsters": [ { "group": "GROUP_CIVILIANS_STANDARD", "weight": 200, "cost_multiplier": 0 }, { "monster": "mon_zombie", "weight": 694 }, @@ -563,7 +563,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_PRISON", + "id": "GROUP_ZOMBIE_PRISON", "default": "mon_zombie_prisoner", "monsters": [ { "group": "GROUP_CIVILIANS_STANDARD", "weight": 100, "cost_multiplier": 0 }, @@ -575,7 +575,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_COP", + "id": "GROUP_ZOMBIE_COP", "monsters": [ { "monster": "mon_zombie_cop", "weight": 900, "cost_multiplier": 0 }, { "monster": "mon_feral_cop", "weight": 1, "cost_multiplier": 1 }, @@ -585,7 +585,7 @@ ] }, { - "name": "GROUP_SCENARIO_PANICROOM", + "id": "GROUP_SCENARIO_PANICROOM", "type": "monstergroup", "//": "Flavor spawn group for scenario panic rooms for better story-telling. Improved chance of dogs, fancy dogs, and (still) breathing people and children.", "monsters": [ @@ -597,7 +597,7 @@ ] }, { - "name": "GROUP_PANICROOM", + "id": "GROUP_PANICROOM", "type": "monstergroup", "//": "Same as above, but more lethal.", "monsters": [ @@ -609,7 +609,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBULL_FROG_UPGRADE", + "id": "GROUP_ZOMBULL_FROG_UPGRADE", "monsters": [ { "monster": "mon_zombullfrog", "weight": 100, "cost_multiplier": 3 }, { "monster": "mon_frog_mummy", "weight": 25, "cost_multiplier": 3 }, @@ -620,7 +620,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DEADTOAD_UPGRADE", + "id": "GROUP_DEADTOAD_UPGRADE", "monsters": [ { "monster": "mon_toad_zombie", "weight": 25, "cost_multiplier": 1 }, { "monster": "mon_toad_bloat", "weight": 50, "cost_multiplier": 1 }, @@ -629,7 +629,7 @@ }, { "type": "monstergroup", - "name": "GROUP_BLOAT_TOAD_UPGRADE", + "id": "GROUP_BLOAT_TOAD_UPGRADE", "monsters": [ { "monster": "mon_toad_bloat", "weight": 25, "cost_multiplier": 1 }, { "monster": "mon_toad_wart", "weight": 25, "cost_multiplier": 1 }, @@ -640,7 +640,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBTREEFROG_UPGRADE", + "id": "GROUP_ZOMBTREEFROG_UPGRADE", "monsters": [ { "monster": "mon_zombtreefrog", "weight": 75, "cost_multiplier": 3 }, { "monster": "mon_frog_shadow", "weight": 25, "cost_multiplier": 3 }, @@ -649,7 +649,7 @@ }, { "type": "monstergroup", - "name": "GROUP_HOSPITAL", + "id": "GROUP_HOSPITAL", "//": "Hospital monster spawns. Same as GROUP_ZOMBIE, but without Z-dogs + 20% medical", "monsters": [ { "group": "GROUP_VANILLA_DORMANT", "weight": 100, "cost_multiplier": 3 }, @@ -683,7 +683,7 @@ }, { "type": "monstergroup", - "name": "GROUP_STEEL_MILL", + "id": "GROUP_STEEL_MILL", "//": "Steel mill monster spawns.", "monsters": [ { "monster": "mon_null", "weight": 486 }, @@ -711,7 +711,7 @@ ] }, { - "name": "GROUP_MALL", + "id": "GROUP_MALL", "type": "monstergroup", "monsters": [ { "group": "GROUP_CIVILIANS_STANDARD", "weight": 100, "cost_multiplier": 0 }, @@ -727,7 +727,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_SEXSHOP_A", + "id": "GROUP_ZOMBIE_SEXSHOP_A", "monsters": [ { "monster": "mon_zombie_cop", "weight": 250, "cost_multiplier": 2 }, { "monster": "mon_feral_cop", "weight": 2, "cost_multiplier": 3 }, @@ -747,7 +747,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_SEXSHOP_B", + "id": "GROUP_ZOMBIE_SEXSHOP_B", "default": "mon_zombie", "monsters": [ { "monster": "mon_zombie", "weight": 250 }, @@ -756,7 +756,7 @@ ] }, { - "name": "GROUP_FIRE", + "id": "GROUP_FIRE", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_fireman", "weight": 860 }, @@ -765,7 +765,7 @@ ] }, { - "name": "FERAL_HUMANS", + "id": "FERAL_HUMANS", "type": "monstergroup", "monsters": [ { "monster": "mon_feral_prepper_knife", "weight": 14, "cost_multiplier": 2, "starts": "29 days" }, @@ -792,7 +792,7 @@ }, { "type": "monstergroup", - "name": "DUMP_ZOMBIES", + "id": "DUMP_ZOMBIES", "monsters": [ { "monster": "mon_zombie_technician", "weight": 150 }, { "monster": "mon_zombie_fat", "weight": 150 }, @@ -806,12 +806,12 @@ ] }, { - "name": "GROUP_PLAIN", + "id": "GROUP_PLAIN", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie" } ] }, { - "name": "GROUP_HOTEL_POOL", + "id": "GROUP_HOTEL_POOL", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_swimmer", "weight": 100, "cost_multiplier": 2, "starts": "5 days" }, @@ -827,7 +827,7 @@ ] }, { - "name": "GROUP_HOTEL_GYM", + "id": "GROUP_HOTEL_GYM", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_fat", "weight": 977, "cost_multiplier": 2 }, @@ -836,7 +836,7 @@ ] }, { - "name": "GROUP_SEARCH_FITNESS", + "id": "GROUP_SEARCH_FITNESS", "//": "Civilians that died/went crazy while trying to improve their bodies doing exercise. Lesser improved chance of brute/hulk.", "type": "monstergroup", "monsters": [ @@ -852,7 +852,7 @@ ] }, { - "name": "GROUP_DOJO", + "id": "GROUP_DOJO", "//": "Civilians that died/went crazy while in a dojo, no runner and less fat zombies. Improved chance of brute/wrestler/hulk.", "type": "monstergroup", "monsters": [ @@ -870,7 +870,7 @@ ] }, { - "name": "GROUP_ZOMBIE_POOL", + "id": "GROUP_ZOMBIE_POOL", "type": "monstergroup", "default": "mon_zombie", "monsters": [ @@ -880,7 +880,7 @@ ] }, { - "name": "GROUP_POOL_NOKIDS", + "id": "GROUP_POOL_NOKIDS", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_swimmer_base", "weight": 950, "cost_multiplier": 2 }, @@ -895,7 +895,7 @@ ] }, { - "name": "GROUP_DIVING", + "id": "GROUP_DIVING", "type": "monstergroup", "//": "Zombies/ferals that could be found on a diving related place.", "monsters": [ @@ -913,7 +913,7 @@ ] }, { - "name": "GROUP_BEACH", + "id": "GROUP_BEACH", "type": "monstergroup", "//": "Zombies/ferals that could be found on the beach/riverside.", "monsters": [ @@ -944,7 +944,7 @@ ] }, { - "name": "GROUP_ZOMBIE_BOVINE", + "id": "GROUP_ZOMBIE_BOVINE", "type": "monstergroup", "monsters": [ { "monster": "mon_zow", "weight": 825 }, @@ -953,7 +953,7 @@ ] }, { - "name": "GROUP_HOSPITAL_INCUBATOR", + "id": "GROUP_HOSPITAL_INCUBATOR", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_anklebiter", "weight": 995, "cost_multiplier": 10 }, @@ -961,12 +961,12 @@ ] }, { - "name": "GROUP_FORT", + "id": "GROUP_FORT", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_reenactor" } ] }, { - "name": "GROUP_CIVILIAN", + "id": "GROUP_CIVILIAN", "//": "Civilians/Normal people that died, represents a lot of different common professions. No children or dogs.", "type": "monstergroup", "monsters": [ @@ -983,7 +983,7 @@ ] }, { - "name": "GROUP_CIVILIAN_NO_FERAL", + "id": "GROUP_CIVILIAN_NO_FERAL", "//": "Civilians/Normal people that died, represents a lot of different common professions. No children, dogs or ferals.", "type": "monstergroup", "monsters": [ @@ -997,7 +997,7 @@ ] }, { - "name": "GROUP_FERROUS", + "id": "GROUP_FERROUS", "type": "monstergroup", "monsters": [ { "group": "GROUP_CIVILIAN_NO_FERAL", "weight": 100 }, @@ -1010,13 +1010,13 @@ ] }, { - "name": "GROUP_MINERS", + "id": "GROUP_MINERS", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_miner" } ] }, { "type": "monstergroup", - "name": "GROUP_MASS_GRAVE", + "id": "GROUP_MASS_GRAVE", "//": "Corpses buried at a mass grave. No ferals, and few animals.", "default": "mon_zombie", "monsters": [ @@ -1032,7 +1032,7 @@ ] }, { - "name": "GROUP_FOOTBALL", + "id": "GROUP_FOOTBALL", "type": "monstergroup", "monsters": [ { "monster": "mon_null", "weight": 300 }, @@ -1042,7 +1042,7 @@ ] }, { - "name": "GROUP_NURSING_HOME", + "id": "GROUP_NURSING_HOME", "type": "monstergroup", "monsters": [ { "group": "GROUP_CIVILIANS_STANDARD", "weight": 10, "cost_multiplier": 0 }, @@ -1057,7 +1057,7 @@ ] }, { - "name": "GROUP_NURSING_HOME_LAB", + "id": "GROUP_NURSING_HOME_LAB", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_labsecurity", "weight": 15 }, @@ -1067,7 +1067,7 @@ ] }, { - "name": "GROUP_RETIREMENT_COMMUNITY", + "id": "GROUP_RETIREMENT_COMMUNITY", "type": "monstergroup", "monsters": [ { "group": "GROUP_CIVILIANS_STANDARD", "weight": 10, "cost_multiplier": 0 }, @@ -1085,7 +1085,7 @@ ] }, { - "name": "GROUP_NUCLEAR_PLANT_WORK_ZOMBIES", + "id": "GROUP_NUCLEAR_PLANT_WORK_ZOMBIES", "type": "monstergroup", "monsters": [ { "group": "GROUP_CIVILIANS_STANDARD", "weight": 10, "cost_multiplier": 0 }, diff --git a/data/json/monsters/civilians.json b/data/json/monsters/civilians.json index cca140d5699e8..3422b9f59a7d3 100644 --- a/data/json/monsters/civilians.json +++ b/data/json/monsters/civilians.json @@ -225,7 +225,7 @@ "copy-from": "mon_civilian_panic" }, { - "name": "GROUP_CIVILIANS_UPGRADE", + "id": "GROUP_CIVILIANS_UPGRADE", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie", "weight": 264, "cost_multiplier": 0 }, @@ -237,7 +237,7 @@ ] }, { - "name": "GROUP_CIVILIANS_STANDARD", + "id": "GROUP_CIVILIANS_STANDARD", "//": "Used for deduplication only, so one does not have to repeat the same standard ratio over and over again", "type": "monstergroup", "monsters": [ diff --git a/data/json/monsters/singularities.json b/data/json/monsters/singularities.json index 6e8255c653b6e..d3a5fd58647b9 100644 --- a/data/json/monsters/singularities.json +++ b/data/json/monsters/singularities.json @@ -311,7 +311,7 @@ ] }, { - "name": "GROUP_AMALGAMATIONS_SPAWNED", + "id": "GROUP_AMALGAMATIONS_SPAWNED", "type": "monstergroup", "monsters": [ { "monster": "mon_amalgamation_swarmer", "weight": 20 }, diff --git a/data/json/npcs/snippets/talk_tags_follower.json b/data/json/npcs/snippets/talk_tags_follower.json index fae060e7c245c..4219c63b43c64 100644 --- a/data/json/npcs/snippets/talk_tags_follower.json +++ b/data/json/npcs/snippets/talk_tags_follower.json @@ -840,26 +840,6 @@ "Waiter! I need a refill, my ethanol burner is running out of charge!" ] }, - { - "type": "snippet", - "category": "", - "//": "NPC complaint when they are low on CBM power and have an internal furnace. Additional versions should continue to specify that the NPC needs junk (withered plants, paper, or wood) and they need them to recharge their power CBMs.", - "text": [ - "Any fuel to stoke these embers?", - "Fuel for the furnace? Yes please.", - "Fuel reserves are burnt through, got anymore?", - "Gotta stoke the furnace, need some fuel.", - "Hey, , can I get some waste paper or withered plants? I need to recharge.", - "I can't recharge my CBMs without some firewood for my internal furnace.", - "I'll be all burned out soon enough, need some fuel.", - "I'm running on embers, got any fuel?", - "I need some junk to power my internal furnace.", - "I need something to burn for my furnace. Can you help?", - "I need something to use as fuel for my furnace.", - "Need to get my burn on, got any fuel?", - "No fuel? No power." - ] - }, { "type": "snippet", "category": "", @@ -878,29 +858,6 @@ "Without some fuel, I'm gonna be obsolete." ] }, - { - "type": "snippet", - "category": "", - "//": "NPC complaint when they are low on CBM power and have an internal reactor. Additional versions should continue to specify that the NPC needs radioactive slurry and they need it to recharge their power CBMs. Also, mostly obsolete since internal reactors got removed.", - "text": [ - "Beta radiation can be blocked by clothing, but is really dangerous if you ingest it. So can I have some plutonium slurry to power my reactor and give me cancer?", - "Critical slurry supply, need to top up the reactor.", - "Empty reactor coming up, unless I get some slurry.", - "Gotta slurp some slurry in a hurry here!", - "Hey, , pass me some plutonium slurry if you have any, I need to refuel my internal reactor.", - "I can't believe I'm saying this, but I need radioactive plutonium slurry for my internal reactor.", - "I can't use my internal reactor to recharge my CBMs without some plutonium slurry.", - "I can't use my internal reactor to recharge my CBMs without some plutonium slurry. Which wouldn't be a problem if I had anything else that would recharge my CBMs!", - "I need some radioactive slurry to power my reactor. Or a less dangerous power source, that would be even better!", - "I sure could use a highly radioactive slurry shake for my power supply right now.", - "I'm pretty slurriless right now, need a top up.", - "If I don't get some slurry, we'll have a miniature China Syndrome on our hands.", - "No slurry? No power.", - "Please, , get me some radioactive slurry to fuel my internal reactor. Or get me another way to recharge my CBMs!", - "Supplies of slurry are low, could do with some more.", - "Systems saying slurry reserves are low." - ] - }, { "type": "snippet", "category": "", diff --git a/data/json/obsoletion_and_migration_0.I/talk_tags_obsolete.json b/data/json/obsoletion_and_migration_0.I/talk_tags_obsolete.json index 61582e97b961b..31b2f4f636203 100644 --- a/data/json/obsoletion_and_migration_0.I/talk_tags_obsolete.json +++ b/data/json/obsoletion_and_migration_0.I/talk_tags_obsolete.json @@ -72,5 +72,15 @@ "category": "", "//": "A snippet use in the context of another complaint, like I'll die without your help", "text": "I won't last much longer" + }, + { + "type": "snippet", + "category": "", + "text": "I need some junk to power my internal furnace." + }, + { + "type": "snippet", + "category": "", + "text": "Hey, , pass me some plutonium slurry if you have any, I need to refuel my internal reactor." } ] diff --git a/data/json/scenarios.json b/data/json/scenarios.json index e08cb5b47a504..60f77f2d17f9a 100644 --- a/data/json/scenarios.json +++ b/data/json/scenarios.json @@ -9,6 +9,16 @@ "start_name": "Evac Shelter", "flags": [ "CITY_START" ] }, + { + "type": "scenario", + "id": "refugeecenter", + "name": "Refugee Center", + "points": 0, + "description": "You have survived the initial wave of panic, and have made your way to a refugee center.", + "allowed_locs": [ "sloc_refugee_center" ], + "start_name": "Refugee Center", + "flags": [ "LONE_START" ] + }, { "type": "scenario", "id": "friend_liam", @@ -143,7 +153,6 @@ "points": 1, "description": "You've found a safe place away from the cities and devoid of the living dead. Looks like you're on your own…", "allowed_locs": [ - "sloc_refugee_center", "sloc_hermit_shack", "sloc_farm_survivalist", "sloc_cabin", diff --git a/data/json/snippets/e_logs.json b/data/json/snippets/e_logs.json index 45c2510b49da5..28fd3dab311a9 100644 --- a/data/json/snippets/e_logs.json +++ b/data/json/snippets/e_logs.json @@ -303,6 +303,21 @@ "id": "local_files_simple_60", "name": "FEMA evacuation instructions", "text": "This appears to be a civil-protection video, published by the Federal Emergency Management Agency a handful of days before the official evacuation order was declared. Within the clip, standing within a plain-featured, well-lit room behind a steel table, a close-shaven redhead in a light olive shirt demonstrates the proper donning and doffing procedure for a gasmask, as well as providing general tips and information for proper NBC conduct. Mask in hand and with an assortment of cylindrical filters arrayed upon the table, she demonstrates dawning, screwing in the proper filter, pressurizing the mask for an airtight seal, and repeatedly encouraging the viewer to \"Remember, gentlemen, shave your chin first before even thinking about trying to put on a mask. That goes for you as well, ladies. All that hair—ponytails, pigtails, bangs, whatever—needs to go right out the window. You can keep the eyebrows, though.\"\n\nAt the video's conclusion, the instructor outlines several tactics for protecting one's self from biological contaminants, including several methods for distilling water, sealing the edges of doors and window frames with masking tape, and formulating a makeshift NBC suit from multi-layered water-proof rubber storm coats, waders, gloves, and a liberal amount of duct tape. Ultimately, the clip rounds off with a solemn warning that \"all the equipment in the world won't protect you from negligence and stupidity, for all the keyboard warriors and self-proclaimed preppers watching. All this gear is only meant to allow you to evacuate to a safer area, and that's all it'll do. It won't let you ride out a catastrophe indefinitely, so it's still important that you keep your heads down and proceed to an evacuation gathering point if and when the call goes out.\"" + }, + { + "id": "local_files_simple_61", + "name": "Fergie Hensen's suicide note", + "text": "The video starts with an exhausted-looking white woman with shaggy brown hair clumsily setting her phone onto what you assume to be a table. She then sits back, leaving her face and upper body in frame with a stained wallpaper behind her. \"Hello, my name is Fergie Hensen, I am 47 years old and have worked the last 10 years of my life as a neonatal nurse. By the time you see this video, I've committed suicide.\" She winces and gasps in pain lifting up her left arm - showing a massive bite mark leaking with muddy green pus. \"I don't have long before I die - and before I do, I have to say something important, something you MUST remember.\" She looks back at the camera with a pained half-smile and gritted teeth, speaking with a low but sincere tone. \"You, you watching this video, don't ever give up, keep pushing, don't call it quits by killing yourself. Keep going for as long as you can.\" Her voice trembles and her eyes get watery, \"I… believe there are people out there in this hell, people like you, who can make things better.\" The woman is trying her best to hold back the agonized tears streaming down her disheveled face as her voice starts to crack. \"Find happiness and friends wherever you can, and remember you've got a purpose, and that purpose is not only to survive, it's to thrive.\" She lets out an anguished gasp, nearly doubling over in pain before stammering out \"Promise me, please, j-just promise me whoever you are, that you'll do that, please.\" She then tries to grab the phone off the table to stop recording, but it falls onto the floor the video doesn't end until 7 seconds later. In the time remaining, she languorously picks the phone off the floor and holds it close to her face - it is only then you register just how bloodshot her eyes are." + }, + { + "id": "local_files_simple_62", + "name": "Pepper spray strategy", + "text": "While looking through the device's collection of mundane photos and videos, you stumble across a recording of some undated late-night CCTV footage taken in a trashed suburban neighborhood. 10 seconds into the video, an alarmed young woman sprints into view quickly followed by a feral man covered in blood and muck. He quickly catches up to her and grapples her left arm. They scuffle for quite some time until the woman manages to break his grip. Reaching hastily into her purse, she pulls a small can of pepper spray - generously spraying it onto his face then shoulder-bashing the man onto the pavement. The man gurgles and fidgets in pain as the woman sprints into the distance, out of the camera's view." + }, + { + "id": "local_files_simple_63", + "name": "humorous? giant spider photo", + "text": "You find a zoomed-in photo of what appears to be a gargantuan brown recluse spider (you guess to be relatively above the size of a cow) lying in wait for its prey in a thick sprawling web strung between multiple pine trees. The sky is cloudy and the area surrounding and including the forest is relatively foggy, but the photos have been edited to make the spider clearer. There is a caption overlaying a semi-transparent gray bar below the spider. \"I should've stayed in Atlanta dawg what the FUUCKKKKKK\" followed by a crying and laughing emoji." } ] } diff --git a/data/json/start_locations.json b/data/json/start_locations.json index 86d478053ad15..99bef5e835cb3 100644 --- a/data/json/start_locations.json +++ b/data/json/start_locations.json @@ -79,7 +79,8 @@ "type": "start_location", "id": "sloc_refugee_center", "name": "Refugee Center", - "terrain": [ "evac_center_7" ] + "terrain": [ "evac_center_18" ], + "flags": [ "ALLOW_OUTSIDE" ] }, { "type": "start_location", diff --git a/data/mods/Aftershock/itemgroups/money_groups.json b/data/mods/Aftershock/itemgroups/money_groups.json index 7de2adf439a9c..56d10a6de6d20 100644 --- a/data/mods/Aftershock/itemgroups/money_groups.json +++ b/data/mods/Aftershock/itemgroups/money_groups.json @@ -13,6 +13,19 @@ { "item": "UICA_1d", "count": 10 } ] }, + { + "id": "afs_uica_quartermaster_money", + "type": "item_group", + "subtype": "collection", + "ammo": 100, + "items": [ + { "item": "UICA_1000d", "count": 8 }, + { "item": "UICA_100d", "count": 15 }, + { "item": "UICA_50d", "count": 20 }, + { "item": "UICA_10d", "count": 20 }, + { "item": "UICA_1d", "count": 10 } + ] + }, { "id": "afs_banknotes", "type": "item_group", diff --git a/data/mods/Aftershock/itemgroups/tool_groups.json b/data/mods/Aftershock/itemgroups/tool_groups.json index 519e1f6e26a81..9858956e1e8cf 100644 --- a/data/mods/Aftershock/itemgroups/tool_groups.json +++ b/data/mods/Aftershock/itemgroups/tool_groups.json @@ -77,6 +77,12 @@ { "item": "duct_tape", "prob": 30, "count": [ 1, 2 ] } ] }, + { + "type": "item_group", + "id": "afs_tools_vehicle_repair", + "//": "Fixes up rovers, shuttlecraft, aerocraft and more. (Group stubed created for someone more knowledgable to fill)", + "items": [ { "group": "afs_tools_structural_repair", "prob": 40 }, { "group": "afs_tools_electric_repair", "prob": 60 } ] + }, { "type": "item_group", "id": "afs_tools_structural_repair", diff --git a/data/mods/Aftershock/itemgroups/weapons/armories.json b/data/mods/Aftershock/itemgroups/weapons/armories.json index 742e2385fe9dd..4becd450d89b6 100644 --- a/data/mods/Aftershock/itemgroups/weapons/armories.json +++ b/data/mods/Aftershock/itemgroups/weapons/armories.json @@ -108,6 +108,76 @@ [ "afs_raketa_shotgun", 20 ] ] }, + { + "id": "afs_uica_military_locker", + "type": "item_group", + "subtype": "distribution", + "items": [ { "group": "afs_uica_weapon_locker" }, { "group": "afs_uica_armor_locker" } ] + }, + { + "id": "afs_uica_weapon_locker", + "type": "item_group", + "subtype": "collection", + "items": [ + { "group": "afs_uica_guns", "prob": 70, "count": [ 1, 4 ] }, + { "group": "afs_any_hand_grenade", "prob": 40, "count": [ 1, 5 ] }, + { "group": "afs_uicia_mags", "prob": 40, "count": [ 1, 3 ] }, + { "group": "afs_uicia_ammo", "prob": 40, "count": [ 3, 6 ] } + ] + }, + { + "id": "afs_uica_guns", + "type": "item_group", + "subtype": "distribution", + "ammo": 100, + "magazine": 100, + "items": [ + { "item": "afs_marsec_t72" }, + { "item": "afs_sr77", "variant": "military", "ammo-item": "afs_7.50mm_caseless" }, + { "item": "afs_shotgun", "variant": "military", "ammo-item": "shot_00" } + ] + }, + { + "id": "afs_uicia_mags", + "type": "item_group", + "subtype": "distribution", + "items": [ + { "item": "afs_sr77_45mag", "charges": 45, "ammo-item": "afs_7.50mm_caseless", "count": [ 1, 3 ] }, + { "item": "afs_marsec_14mag", "charges": 14, "ammo-item": "afs_10mm_caseless_JHP", "count": [ 2, 5 ] } + ] + }, + { + "id": "afs_uicia_ammo", + "type": "item_group", + "subtype": "distribution", + "items": [ + { "item": "afs_7.50mm_caseless", "count": [ 2, 4 ] }, + { "item": "afs_10mm_caseless_JHP", "count": [ 1, 3 ] }, + { "item": "shot_00", "count": [ 1, 3 ] } + ] + }, + { + "id": "afs_uica_armor_locker", + "type": "item_group", + "subtype": "collection", + "items": [ + { "item": "afs_military_vest", "prob": 60 }, + { "group": "afs_uica_armor_locker_helmets", "prob": 60 }, + { "item": "afs_military_cloak", "prob": 30 }, + { "item": "afs_ilbe", "prob": 30 }, + { "item": "holster", "prob": 20 }, + { "item": "sheath", "prob": 20 }, + { "item": "afs_triple_stacker_pouch", "prob": 10 }, + { "item": "afs_grenade_pouch", "prob": 10 }, + { "item": "afs_ammo_satchel", "prob": 10 } + ] + }, + { + "id": "afs_uica_armor_locker_helmets", + "type": "item_group", + "subtype": "distribution", + "items": [ { "item": "tac_fullhelmet_uicas" }, { "item": "tac_helmet_uicas" } ] + }, { "id": "afs_police_armory", "type": "item_group", diff --git a/data/mods/Aftershock/items/genetech.json b/data/mods/Aftershock/items/genetech.json new file mode 100644 index 0000000000000..c1cacf652da26 --- /dev/null +++ b/data/mods/Aftershock/items/genetech.json @@ -0,0 +1,154 @@ +[ + { + "id": "afs_gene_disp", + "type": "TOOL", + "category": "chems", + "name": "Mercurial Genetech", + "looks_like": "c4armed", + "description": "A single-use genetic treatment that can grant or remove the contained trait. Can be used in gene editing machinery, which Mercurial normally offers free of charge in a bid to popularize augmentation in the general public.", + "weight": "40 g", + "volume": "10 ml", + "price": "1 kUSD", + "to_hit": -5, + "material": [ "steel" ], + "symbol": "(", + "color": "light_red", + "trait_group": "GENETECH_TRAITS", + "flags": [ "GENE_TECH", "NANOFAB_TEMPLATE_SINGLE_USE" ] + }, + { + "id": "afs_gene_template", + "type": "TOOL", + "category": "chems", + "name": "Mercurial Genetech", + "looks_like": "c4armed", + "description": "A reusable genetic treatment that can grant or remove the contained trait as many times as needed.", + "weight": "40 g", + "volume": "10 ml", + "price": "75 kUSD", + "to_hit": -5, + "material": [ "steel" ], + "symbol": "(", + "color": "light_red", + "trait_group": "GENETECH_TRAITS", + "flags": [ "GENE_TECH" ] + }, + { + "type": "trait_group", + "id": "GENETECH_TRAITS", + "subtype": "distribution", + "traits": [ + { "group": "GENETECH_TAILS", "prob": 100 }, + { "group": "GENETECH_EARS", "prob": 100 }, + { "group": "GENETECH_LOOKS", "prob": 50 }, + { "group": "GENETECH_SKIN", "prob": 100 }, + { "group": "GENETECH_COMBAT", "prob": 50 }, + { "group": "GENETECH_WORKER", "prob": 100 } + ] + }, + { + "type": "trait_group", + "id": "GENETECH_TAILS", + "subtype": "distribution", + "traits": [ + { "trait": "TAIL_RABBIT", "prob": 100 }, + { "trait": "TAIL_FIN", "prob": 50 }, + { "trait": "TAIL_LONG", "prob": 100 }, + { "trait": "TAIL_CATTLE", "prob": 50 }, + { "trait": "TAIL_THICK", "prob": 50 }, + { "trait": "TAIL_FLUFFY", "prob": 100 } + ] + }, + { + "type": "trait_group", + "id": "GENETECH_EARS", + "subtype": "distribution", + "traits": [ + { "trait": "MOUSE_EARS", "prob": 100 }, + { "trait": "ELFA_EARS", "prob": 100 }, + { "trait": "CANINE_EARS", "prob": 100 }, + { "trait": "LUPINE_EARS", "prob": 100 }, + { "trait": "FELINE_EARS", "prob": 100 }, + { "trait": "LEAVES", "prob": 100 }, + { "trait": "ROSEBUDS", "prob": 50 }, + { "trait": "URSINE_EARS", "prob": 100 } + ] + }, + { + "type": "trait_group", + "id": "GENETECH_LOOKS", + "subtype": "distribution", + "traits": [ + { "trait": "UGLY", "prob": 100 }, + { "trait": "DEFORMED3", "prob": 100 }, + { "trait": "BEAUTIFUL3", "prob": 100 }, + { "trait": "DEFORMED", "prob": 100 }, + { "trait": "BEAUTIFUL", "prob": 100 }, + { "trait": "PRETTY", "prob": 100 } + ] + }, + { + "type": "trait_group", + "id": "GENETECH_SKIN", + "subtype": "distribution", + "traits": [ + { "trait": "LIGHTFUR", "prob": 50 }, + { "trait": "SCALES", "prob": 50 }, + { "trait": "SPARSE_SCALES", "prob": 50 }, + { "trait": "PADDED_FEET", "prob": 50 }, + { "trait": "THICK_SCALES", "prob": 50 }, + { "trait": "FUR", "prob": 50 }, + { "trait": "FEATHERS", "prob": 50 }, + { "trait": "LIGHTFUR", "prob": 50 }, + { "trait": "LUPINE_FUR", "prob": 50 }, + { "trait": "FELINE_FUR", "prob": 50 }, + { "trait": "PATCHSKIN1", "prob": 25 }, + { "trait": "SLEEK_SCALES", "prob": 50 }, + { "trait": "QUILLS", "prob": 25 }, + { "trait": "PLANTSKIN", "prob": 50 } + ] + }, + { + "type": "trait_group", + "id": "GENETECH_COMBAT", + "subtype": "distribution", + "traits": [ + { "trait": "WINGS_INSECT", "prob": 50 }, + { "trait": "FANGS_SPIDER", "prob": 50 }, + { "trait": "CHITIN3", "prob": 100 }, + { "trait": "CLAWS_ST", "prob": 50 }, + { "trait": "COMPOUND_EYES", "prob": 100 }, + { "trait": "PAINREC2", "prob": 100 }, + { "trait": "MUT_TOUGH2", "prob": 100 }, + { "trait": "NOPAIN", "prob": 100 }, + { "trait": "PRED1", "prob": 100 }, + { "trait": "STR_UP", "prob": 100 }, + { "trait": "LARGE_OK", "prob": 100 }, + { "trait": "FLEET2", "prob": 100 } + ] + }, + { + "type": "trait_group", + "id": "GENETECH_WORKER", + "subtype": "distribution", + "traits": [ + { "trait": "DENSE_BONES", "prob": 100 }, + { "trait": "ACIDPROOF", "prob": 50 }, + { "trait": "TOUGH_MEDICAL", "prob": 100 }, + { "trait": "STRONGER_RESISTCHILL", "prob": 50 }, + { "trait": "GOODCARDIO", "prob": 100 }, + { "trait": "LIGHTEATER", "prob": 100 }, + { "trait": "PAINRESIST", "prob": 100 }, + { "trait": "BOVINE_BULK2", "prob": 50 }, + { "trait": "THICKSKIN", "prob": 100 }, + { "trait": "TOLERANCE", "prob": 100 }, + { "trait": "STRONGSTOMACH", "prob": 100 }, + { "trait": "VOMITSTOMACH", "prob": 50 }, + { "trait": "DISRESISTANT", "prob": 100 }, + { "trait": "WAKEFUL", "prob": 100 }, + { "trait": "RADIOPHILE", "prob": 50 }, + { "trait": "THICKSKIN", "prob": 100 }, + { "trait": "FASTHEALER", "prob": 100 } + ] + } +] diff --git a/data/mods/Aftershock/items/gun/advanced.json b/data/mods/Aftershock/items/gun/advanced.json index c0810821c7790..d26268c8809fc 100644 --- a/data/mods/Aftershock/items/gun/advanced.json +++ b/data/mods/Aftershock/items/gun/advanced.json @@ -23,6 +23,7 @@ "ranged_damage": { "damage_type": "bullet", "amount": 2500, "armor_penetration": 400 }, "ammo_effects": [ "PLASMA", "EMP", "LOW_RANGE_VAPORIZATION" ], "skill": "rifle", + "range": 40, "extend": { "flags": [ "NO_TURRET" ] }, "energy_drain": "0 kJ" }, diff --git a/data/mods/Aftershock/maps/furniture_and_terrain/furniture_habitat.json b/data/mods/Aftershock/maps/furniture_and_terrain/furniture_habitat.json index 53ffadf51e329..f8c3f0fa0334f 100644 --- a/data/mods/Aftershock/maps/furniture_and_terrain/furniture_habitat.json +++ b/data/mods/Aftershock/maps/furniture_and_terrain/furniture_habitat.json @@ -1,4 +1,50 @@ [ + { + "type": "furniture", + "id": "f_gene_editor", + "name": "Mercurial Resequencer", + "description": "A large bio-sarcophagus and accompanying control machinery. Used in gene editing and for general medical purposes, can impart or remove traits using a variety of gene templates.", + "symbol": "O", + "color": "light_blue", + "examine_action": "genemill", + "move_cost_mod": 15, + "coverage": 80, + "comfort": 2, + "floor_bedding_warmth": 500, + "required_str": -1, + "looks_like": "t_vat", + "flags": [ "TRANSPARENT", "PLACE_ITEM", "MOUNTABLE", "CAN_SIT" ], + "deconstruct": { + "items": [ + { "item": "afs_energy_storage_2", "count": [ 2, 4 ] }, + { "item": "afs_heat_2_salvage", "count": [ 1, 2 ] }, + { "item": "steel_chunk", "count": [ 1, 2 ] }, + { "item": "reinforced_glass_pane", "count": [ 1, 2 ] }, + { "item": "plastic_sheet", "count": [ 10, 15 ] }, + { "item": "cotton_patchwork", "count": [ 20, 30 ] }, + { "item": "afs_material_1", "count": [ 10, 20 ] }, + { "item": "afs_magnet_2", "count": [ 1, 3 ] }, + { "item": "afs_circuitry_3", "count": [ 0, 1 ] } + ] + }, + "bash": { + "str_min": 18, + "str_max": 40, + "sound": "clang!", + "sound_fail": "whump.", + "items": [ + { "item": "afs_energy_storage_2", "count": [ 2, 4 ] }, + { "item": "afs_heat_2_salvage", "count": [ 0, 2 ] }, + { "item": "steel_chunk", "count": [ 3, 6 ] }, + { "item": "glass_shard", "count": [ 3, 6 ] }, + { "item": "plastic_chunk", "count": [ 20, 30 ] }, + { "item": "cotton_patchwork", "count": [ 20, 30 ] }, + { "item": "afs_material_1", "count": [ 10, 20 ] }, + { "item": "afs_magnet_2", "count": [ 1, 3 ] }, + { "item": "afs_circuitry_3", "count": [ 0, 1 ] } + ] + } + }, { "type": "furniture", "id": "f_habitat_kitchenette", diff --git a/data/mods/Aftershock/maps/furniture_and_terrain/terrain_habitat_floor.json b/data/mods/Aftershock/maps/furniture_and_terrain/terrain_habitat_floor.json index 304bfe6f4ef7b..6ea564b7ec533 100644 --- a/data/mods/Aftershock/maps/furniture_and_terrain/terrain_habitat_floor.json +++ b/data/mods/Aftershock/maps/furniture_and_terrain/terrain_habitat_floor.json @@ -25,6 +25,33 @@ ] } }, + { + "type": "terrain", + "id": "t_metal_floor_heated", + "name": "metal floor", + "description": "High-quality and tough checkered metal flooring to reduce the risk of slips and falls. Can support a roof.", + "looks_like": "t_metal_floor", + "symbol": ".", + "color": "light_cyan", + "connect_groups": [ "INDOORFLOOR", "METALFLOOR" ], + "connects_to": "METALFLOOR", + "move_cost": 2, + "roof": "t_metal_roof", + "flags": [ "TRANSPARENT", "INDOORS", "SUPPORTS_ROOF", "FLAT", "ROAD" ], + "emissions": [ "afs_emit_geovent" ], + "bash": { + "sound": "thump", + "ter_set": "t_null", + "str_min": 200, + "str_max": 500, + "str_min_supported": 200, + "items": [ + { "item": "steel_lump", "count": [ 1, 4 ] }, + { "item": "steel_chunk", "count": [ 3, 12 ] }, + { "item": "scrap", "count": [ 9, 36 ] } + ] + } + }, { "type": "terrain", "id": "t_clearcrete_roof", diff --git a/data/mods/Aftershock/maps/mapgen/afs_power_station_small.json b/data/mods/Aftershock/maps/mapgen/afs_power_station_small.json index 0f2412a1edcbe..8892d5e20c3e9 100644 --- a/data/mods/Aftershock/maps/mapgen/afs_power_station_small.json +++ b/data/mods/Aftershock/maps/mapgen/afs_power_station_small.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "afs_pwr_sub_s" ], - "weight": 10, "object": { "fill_ter": "t_metal_floor", "rows": [ diff --git a/data/mods/Aftershock/maps/mapgen/port_augustmoon/port_augustmoon_main.json b/data/mods/Aftershock/maps/mapgen/port_augustmoon/port_augustmoon_main.json index 55d2e409e6c05..58671bd570d41 100644 --- a/data/mods/Aftershock/maps/mapgen/port_augustmoon/port_augustmoon_main.json +++ b/data/mods/Aftershock/maps/mapgen/port_augustmoon/port_augustmoon_main.json @@ -111,11 +111,87 @@ } } }, + { + "type": "mapgen", + "method": "json", + "om_terrain": [ + [ "augustmoon_corpo_quarter1", "augustmoon_corpo_quarter2" ], + [ "augustmoon_corpo_quarter3", "augustmoon_corpo_quarter4" ] + ], + "object": { + "fill_ter": "t_metal_floor", + "rows": [ + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + ".,||||||||| ....................................", + "..||||1111|.....................................", + ".||ss||==|||||||||||||||........................", + ".|0 , :,,=11=_wwwwwwwú|.........................", + ".||99|| ==1=_w,,,,,w =.........................", + ".|||||= ===_w=====w =.........................", + ".|1=í = , _w=111=w =.........................", + ".|1= = , _w=111=w =.........................", + ".|||||= ===_w=====w =.........................", + ".||ss|| ==1=_w,,,,,w =.........................", + ".|0 , :,,=11=_wwwwwwwú|.........................", + ".||99||==||||||::|::||||........................", + "..||||1111|..|566|665||.........................", + ".....||||||..|666|666||.........................", + ".............||||||||||.........................", + ".............|||||||||||........................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................", + "................................................" + ], + "palettes": [ "afs_habitat_structure", "afs_habitat_residential_furnishing" ], + "terrain": { + ".": "t_hard_vacuum", + " ": "t_metal_floor", + "!": "t_door_metal_locked", + ":": "t_afs_space_ship_hatch_c", + "_": "t_grate", + "=": "t_afs_augustmoon_diamond_glass", + "w": "t_carpet_metal_red", + "|": "t_afs_augustmoon_hull_wall", + "1": "t_underbrush", + "5": "t_elevator_control", + "6": "t_elevator" + }, + "furniture": { "9": "f_screenmirror_working", "0": "f_gene_editor" }, + "npcs": { "í": { "class": "augustmoon_mercurial_clerk" }, "ú": { "class": "augustmoon_security" } } + } + }, { "type": "mapgen", "method": "json", "om_terrain": [ [ "augustmoon_solar_array1" ], [ "augustmoon_solar_array2" ] ], - "weight": 200, "object": { "fill_ter": "t_hard_vacuum", "rows": [ @@ -177,7 +253,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "augustmoon_bar" ], - "weight": 200, "object": { "fill_ter": "t_metal_floor", "rows": [ @@ -225,7 +300,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "augustmoon_docking_arm" ], - "weight": 200, "object": { "fill_ter": "t_metal_floor", "rows": [ @@ -273,7 +347,6 @@ "type": "mapgen", "method": "json", "nested_mapgen_id": "augustmoon_concourse_vending2", - "weight": 200, "object": { "mapgensize": [ 24, 24 ], "rows": [ diff --git a/data/mods/Aftershock/maps/mapgen/uica_shuttle_base.json b/data/mods/Aftershock/maps/mapgen/uica_shuttle_base.json new file mode 100644 index 0000000000000..2ac5dee9d78f7 --- /dev/null +++ b/data/mods/Aftershock/maps/mapgen/uica_shuttle_base.json @@ -0,0 +1,245 @@ +[ + { + "type": "mapgen", + "method": "json", + "om_terrain": [ + [ "afs_uica_shuttle_base_x0y0z0", "afs_uica_shuttle_base_x1y0z0" ], + [ "afs_uica_shuttle_base_x0y1z0", "afs_uica_shuttle_base_x1y1z0" ] + ], + "object": { + "fill_ter": "t_metal_floor", + "rows": [ + "™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™", + "™||||||||||||||||||||||||||||||||||||||||||||||™", + "™|™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™™|™", + "™|™™©©©™™™©©©©©©©©©™™™©©©™™™///////11///////℗℗|™", + "™|™™©°©©©©©°©°°°©°©©©©©°©™™//2/2/3qff45/6ø.//℗|™", + "™|™™©°°°°°°°©°8°©°°°°°°°©™™7$.,.7..h,../)/,.#℗|™", + "™|™™©°©°°°©°©°8°©°©°°°©°©™™7$...//.ý,h%/9/..#℗|™", + "™|™™©°©°°°©°©°°°©°©°°°©°©™™///..2/54ffq/h/ø//℗|™", + "™|™™©°©°°°©°©°8°©°©°°°©°©™™™/2,.////////.,./℗℗|™", + "™|™™©°©©©©©°©°8°©°©©©©©°©™™///..2/€€õ€3//7///℗|™", + "™|™™©°©°°°©°©°8°©°©°°°©°©™™7$...//€€.33..,33#℗|™", + "™|™™©°©°°°©°©°°°©°©°°°©°©™™7$.,.7...,.ö...33#℗|™", + "™|™™©°©°°°©°©°8°©°©°°°©°©™™//2/2/......33..//℗|™", + "™|™™©°°°°°°°©°8°©°°°°°°°©™™™///////77///11//℗™|™", + "™|™™©°©©©©©°©°°°©°©©©©©°©™™™™™0™0™),,)™™™™™™™™|™", + "™|™©©©©°°°©©©©©©©©©°°°©©©©©©©™™™™™)..)™™™™™™™™|™", + "™|™©°°°°°°°°°°°°°°°°°°°°°°°°©™™™///77///™™™™™™|™", + "™|™©©©©©©©©©©©©©©©©©©©©©©©©°©™™//❺/../l//™™™™™|™", + "™|™--$$$$$$$$$$$$$$$$$$$--©°©™™1❶./../h91™℗™™™|™", + "™|™-4,.$$$.,$€3.$,.$$$.,4-©°©™™/❷,7,,7,k//℗℗™™|™", + "™|™-óh.$$$..$3..$..$$$.hó-©°©////❸/../..v#℗℗℗™|™", + "™|™-óý.$$$..$...$..$$$..ó-©°©/99///../////℗℗℗™|™", + "™|™-ƒ..$$$..$3.€$..$$$..ƒ-©°©7..7.,..,./ ", + " -$[ [$- [.////7////// ", + " -$[ [$- [[/û.ÿ.bbb..# ", + " -$[ [$- 1û,..yyy,// ", + " -$[ [$- /ú...bbb./ ", + " -$[[[[[[[[[[[[[[[[[[[$- //úoo...// ", + " -$$$$$$$$$$$$$$>$$$$$$- ///11/// ", + " ----------------------- ", + " --------------- ", + " -$$$$>$$$$$$$$- ", + " [[[[[[[[[[[[$- ", + " [$- ", + " [$- ", + " [$- ", + " [$- ", + " [$- ", + " [$- ", + " [$- ", + " [[[[[[[[[[[[$- ", + " -$$$$>$$$$$$$$- ", + " --------------- ", + " [[[[[ ", + " [...[ ", + " [...[ ", + " [...[ ", + " [[[[[ " + ], + "palettes": [ "afs_habitat_structure", "afs_habitat_residential_furnishing" ], + "terrain": { + "1": "t_wall_prefab_glass", + "7": "t_door_metal_c", + " ": "t_open_air", + ".": "t_metal_floor_heated", + "ø": "t_door_metal_elocked" + }, + "furniture": { "9": "f_console", "÷": "f_locker", "û": "f_fridge", "ú": "f_habitat_storage_board" }, + "items": { + "÷": { "item": "afs_uica_military_locker" }, + "û": { "item": "afs_stored_meals", "repeat": [ 1, 5 ] }, + "ú": { "item": "afs_stored_meals", "repeat": [ 1, 5 ] } + }, + "npcs": { "ÿ": { "class": "uica_ground_soldier" } } + } + }, + { + "type": "mapgen", + "method": "json", + "om_terrain": [ + [ "afs_uica_shuttle_base_x0y0z2", "afs_uica_shuttle_base_x1y0z2" ], + [ "afs_uica_shuttle_base_x0y1z2", "afs_uica_shuttle_base_x1y1z2" ] + ], + "object": { + "fill_ter": "t_metal_floor", + "rows": [ + " ", + " ", + " ", + " [[[[[[[[[[[[[[[[ ", + " [[..............[[ ", + " [................[ ", + " [................[ ", + " [[..............[[ ", + " [..............[ ", + " [[..............[[ ", + " [................[ ", + " [................[ ", + " [[..............[[ ", + " [[[[[[[..[[[[[[[ ", + " [..[ ", + " [..[ ", + " [[[..[[[ ", + " [[......[[ ", + " [[[[[[[[[[[[[[[[[[[[[[[ [........[ ", + " [.....................[ [........[[ ", + " [.....................[ [.........[ ", + " [.....................[ [........[[ ", + " [.....................[ [........[ ", + " [.....................[ [........[[ ", + " [.....................[ [.........[ ", + " [.....................[ [........[[ ", + " [.....................[ [........[ ", + " [.....................[ [[......[[ ", + " [.....................[ [[[[[[[[ ", + " [[[[[[[[[[[[[[[[[[[[[[[ ", + " [[[[[[[[[[[[[[[ ", + " [.............[ ", + " [.............[ ", + " [.............[ ", + " [.............[ ", + " [.............[ ", + " [.............[ ", + " [.............[ ", + " [.............[ ", + " [.............[ ", + " [.............[ ", + " [.............[ ", + " [[[[[[[[[[[[[[[ ", + " ", + " ", + " ", + " ", + " " + ], + "palettes": [ "afs_habitat_structure" ], + "terrain": { " ": "t_open_air" } + } + } +] diff --git a/data/mods/Aftershock/maps/overmap_specials.json b/data/mods/Aftershock/maps/overmap_specials.json index 339a8c3de1091..ed1b336d87393 100644 --- a/data/mods/Aftershock/maps/overmap_specials.json +++ b/data/mods/Aftershock/maps/overmap_specials.json @@ -208,7 +208,11 @@ { "point": [ 2, 0, -9 ], "overmap": "augustmoon_outer_space" }, { "point": [ -2, 1, -9 ], "overmap": "augustmoon_outer_space" }, { "point": [ -1, 1, -9 ], "overmap": "augustmoon_outer_space" }, - { "point": [ 2, 1, -9 ], "overmap": "augustmoon_outer_space" } + { "point": [ 2, 1, -9 ], "overmap": "augustmoon_outer_space" }, + { "point": [ 0, 0, -8 ], "overmap": "augustmoon_corpo_quarter1_north" }, + { "point": [ 0, 1, -8 ], "overmap": "augustmoon_corpo_quarter3_north" }, + { "point": [ 1, 0, -8 ], "overmap": "augustmoon_corpo_quarter2_north" }, + { "point": [ 1, 1, -8 ], "overmap": "augustmoon_corpo_quarter4_north" } ], "locations": [ "land" ], "priority": 1, @@ -301,5 +305,33 @@ "city_sizes": [ 6, -1 ], "occurrences": [ 0, 3 ], "flags": [ "EXOPLANET", "URBAN", "MAN_MADE" ] + }, + { + "type": "overmap_special", + "id": "afs_uica_shuttle_base", + "overmaps": [ + { + "point": [ 0, 0, 0 ], + "overmap": "afs_uica_shuttle_base_x0y0z0_north", + "camp": "UICA", + "camp_name": "UICA Shuttle Base" + }, + { "point": [ 1, 0, 0 ], "overmap": "afs_uica_shuttle_base_x1y0z0_north" }, + { "point": [ 0, 1, 0 ], "overmap": "afs_uica_shuttle_base_x0y1z0_north" }, + { "point": [ 1, 1, 0 ], "overmap": "afs_uica_shuttle_base_x1y1z0_north" }, + { "point": [ 0, 0, 1 ], "overmap": "afs_uica_shuttle_base_x0y0z1_north" }, + { "point": [ 1, 0, 1 ], "overmap": "afs_uica_shuttle_base_x1y0z1_north" }, + { "point": [ 0, 1, 1 ], "overmap": "afs_uica_shuttle_base_x0y1z1_north" }, + { "point": [ 1, 1, 1 ], "overmap": "afs_uica_shuttle_base_x1y1z1_north" }, + { "point": [ 0, 0, 2 ], "overmap": "afs_uica_shuttle_base_x0y0z2_north" }, + { "point": [ 1, 0, 2 ], "overmap": "afs_uica_shuttle_base_x1y0z2_north" }, + { "point": [ 0, 1, 2 ], "overmap": "afs_uica_shuttle_base_x0y1z2_north" }, + { "point": [ 1, 1, 2 ], "overmap": "afs_uica_shuttle_base_x1y1z2_north" } + ], + "locations": [ "land" ], + "city_distance": [ 35, -1 ], + "city_sizes": [ 1, -1 ], + "occurrences": [ 1, 3 ], + "flags": [ "MAN_MADE", "EXOPLANET", "OVERMAP_UNIQUE" ] } ] diff --git a/data/mods/Aftershock/maps/overmap_terrain.json b/data/mods/Aftershock/maps/overmap_terrain.json index b8953695e5dc6..58e79bd63ef4f 100644 --- a/data/mods/Aftershock/maps/overmap_terrain.json +++ b/data/mods/Aftershock/maps/overmap_terrain.json @@ -553,5 +553,28 @@ "see_cost": "high", "mondensity": 2, "flags": [ "SIDEWALK" ] + }, + { + "type": "overmap_terrain", + "name": "UICA Shuttle Base", + "id": [ + "afs_uica_shuttle_base_x0y0z0", + "afs_uica_shuttle_base_x1y0z0", + "afs_uica_shuttle_base_x0y1z0", + "afs_uica_shuttle_base_x1y1z0", + "afs_uica_shuttle_base_x0y0z1", + "afs_uica_shuttle_base_x1y0z1", + "afs_uica_shuttle_base_x0y1z1", + "afs_uica_shuttle_base_x1y1z1", + "afs_uica_shuttle_base_x0y0z2", + "afs_uica_shuttle_base_x1y0z2", + "afs_uica_shuttle_base_x0y1z2", + "afs_uica_shuttle_base_x1y1z2" + ], + "sym": "U", + "color": "blue", + "see_cost": "high", + "mondensity": 2, + "flags": [ "SOURCE_SAFETY" ] } ] diff --git a/data/mods/Aftershock/maps/overmap_terrain/overmap_terrain_port_augustmoon.json b/data/mods/Aftershock/maps/overmap_terrain/overmap_terrain_port_augustmoon.json index 8a77be7fdb56b..a8665e58cb5ad 100644 --- a/data/mods/Aftershock/maps/overmap_terrain/overmap_terrain_port_augustmoon.json +++ b/data/mods/Aftershock/maps/overmap_terrain/overmap_terrain_port_augustmoon.json @@ -17,6 +17,15 @@ "see_cost": "high", "flags": [ "SOURCE_SAFETY" ] }, + { + "type": "overmap_terrain", + "id": [ "augustmoon_corpo_quarter1", "augustmoon_corpo_quarter2", "augustmoon_corpo_quarter3", "augustmoon_corpo_quarter4" ], + "name": "Corporate Spire", + "sym": "+", + "color": "red", + "see_cost": "high", + "flags": [ "SOURCE_SAFETY" ] + }, { "type": "overmap_terrain", "id": "augustmoon_docking_arm", diff --git a/data/mods/Aftershock/mobs/monster_groups.json b/data/mods/Aftershock/mobs/monster_groups.json index b51f8d2bf835b..39f9d87149b05 100644 --- a/data/mods/Aftershock/mobs/monster_groups.json +++ b/data/mods/Aftershock/mobs/monster_groups.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_ZOMBIE", + "id": "GROUP_ZOMBIE", "monsters": [ { "monster": "mon_afs_headless_horror", "weight": 20, "cost_multiplier": 2, "starts": 400 }, { "monster": "mon_zombie_upliftedbear", "weight": 5, "cost_multiplier": 10, "starts": 1086 }, @@ -10,7 +10,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_MID", + "id": "GROUP_ZOMBIE_MID", "monsters": [ { "monster": "mon_afs_headless_horror", "weight": 10, "cost_multiplier": 20 }, { "monster": "mon_zombie_upliftedbear", "weight": 3, "cost_multiplier": 10, "starts": 1086 }, @@ -19,7 +19,7 @@ }, { "type": "monstergroup", - "name": "GROUP_PrepNet", + "id": "GROUP_PrepNet", "is_animal": true, "monsters": [ { "monster": "mon_cat", "weight": 100, "cost_multiplier": 0 }, @@ -35,18 +35,18 @@ }, { "type": "monstergroup", - "name": "GROUP_MI-GO_BASE_COMMON", + "id": "GROUP_MI-GO_BASE_COMMON", "monsters": [ { "monster": "afs_mon_migoturret", "weight": 120 } ] }, { "type": "monstergroup", - "name": "GROUP_MI-GO_BASE_BOSS", + "id": "GROUP_MI-GO_BASE_BOSS", "//": "Mi-go base defenders for major boss battles.", "monsters": [ { "monster": "afs_mon_migoturret", "weight": 150, "pack_size": [ 2, 3 ] } ] }, { "type": "monstergroup", - "name": "GROUP_FOREST", + "id": "GROUP_FOREST", "is_animal": true, "monsters": [ { "monster": "mon_uplifted_bear", "weight": 1, "cost_multiplier": 10, "conditions": [ "SPRING", "SUMMER", "AUTUMN" ] }, @@ -108,11 +108,11 @@ }, { "type": "monstergroup", - "name": "GROUP_CAVE", + "id": "GROUP_CAVE", "monsters": [ { "monster": "mon_uplifted_bear", "weight": 50, "cost_multiplier": 10, "pack_size": [ 1, 3 ] } ] }, { - "name": "GROUP_PARK_SCENIC", + "id": "GROUP_PARK_SCENIC", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_upliftedbear", "weight": 10, "pack_size": [ 2, 3 ], "starts": 1086 }, @@ -121,7 +121,7 @@ }, { "type": "monstergroup", - "name": "AFS_GROUP_AUG_CLINIC", + "id": "AFS_GROUP_AUG_CLINIC", "monsters": [ { "monster": "mon_broken_cyborg", "weight": 100 }, { "monster": "mon_zombie_electric", "weight": 450 }, @@ -132,7 +132,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_BRUTE", + "id": "GROUP_ZOMBIE_BRUTE", "//": "Brute upgrades", "monsters": [ { "monster": "mon_zombie_upliftedbear", "weight": 112, "cost_multiplier": 10 }, @@ -142,7 +142,7 @@ }, { "type": "monstergroup", - "name": "GROUP_CENTRAL_LAB", + "id": "GROUP_CENTRAL_LAB", "monsters": [ { "monster": "mon_zombie_upliftedbear", "weight": 3, "cost_multiplier": 10 }, { "monster": "mon_uplifted_ape_zed", "weight": 10, "cost_multiplier": 5 }, @@ -151,7 +151,7 @@ }, { "type": "monstergroup", - "name": "GROUP_RIVER", + "id": "GROUP_RIVER", "is_animal": true, "monsters": [ { "monster": "mon_uplifted_octupus", "weight": 3, "cost_multiplier": 10 }, @@ -162,7 +162,7 @@ }, { "type": "monstergroup", - "name": "GROUP_CRYO_LAB", + "id": "GROUP_CRYO_LAB", "monsters": [ { "monster": "mon_mutant_experimental", "weight": 30, "cost_multiplier": 2 }, { "monster": "mon_mutant_evolved", "weight": 5, "cost_multiplier": 10 }, @@ -175,7 +175,7 @@ }, { "type": "monstergroup", - "name": "GROUP_LAB", + "id": "GROUP_LAB", "monsters": [ { "monster": "mon_moxie_scavenger", "weight": 25, "cost_multiplier": 0, "pack_size": [ 1, 4 ] }, { "monster": "mon_moxie_spartan", "weight": 25, "cost_multiplier": 0 }, @@ -186,7 +186,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SWAMP", + "id": "GROUP_SWAMP", "is_animal": true, "monsters": [ { @@ -211,7 +211,7 @@ }, { "type": "monstergroup", - "name": "GROUP_RUINS", + "id": "GROUP_RUINS", "monsters": [ { "monster": "afs_mon_reaver", "weight": 25, "cost_multiplier": 0, "pack_size": [ 1, 3 ] }, { "monster": "afs_mon_reaver_rifle", "weight": 25, "cost_multiplier": 0 } diff --git a/data/mods/Aftershock/mobs/monster_groups/fauna_monsters_groups.json b/data/mods/Aftershock/mobs/monster_groups/fauna_monsters_groups.json index 50ef2ff9ada41..eced50c9f7d27 100644 --- a/data/mods/Aftershock/mobs/monster_groups/fauna_monsters_groups.json +++ b/data/mods/Aftershock/mobs/monster_groups/fauna_monsters_groups.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "AFS_GROUP_FAUNA_TUNNELS", + "id": "AFS_GROUP_FAUNA_TUNNELS", "monsters": [ { "group": "AFS_GROUP_FAUNA_HERBIVORE", "weight": 70, "cost_multiplier": 0, "pack_size": [ 1, 2 ] }, { "group": "AFS_GROUP_FAUNA_PREDATORS_LOW_RISK", "weight": 25, "cost_multiplier": 0, "pack_size": [ 1, 2 ] }, @@ -10,7 +10,7 @@ }, { "type": "monstergroup", - "name": "AFS_GROUP_FAUNA_HERBIVORE", + "id": "AFS_GROUP_FAUNA_HERBIVORE", "monsters": [ { "monster": "afs_runner", "weight": 350, "cost_multiplier": 0 }, { "monster": "afs_grazer", "weight": 250, "cost_multiplier": 0, "pack_size": [ 1, 4 ] }, @@ -19,7 +19,7 @@ }, { "type": "monstergroup", - "name": "AFS_GROUP_FAUNA_PREDATORS_LOW_RISK", + "id": "AFS_GROUP_FAUNA_PREDATORS_LOW_RISK", "monsters": [ { "monster": "afs_mon_garlander", "weight": 90, "cost_multiplier": 0 }, { "group": "AFS_GROUP_FAUNA_PREDATORS_MEDIUM_RISK", "weight": 10, "cost_multiplier": 0, "pack_size": [ 1, 2 ] } @@ -27,7 +27,7 @@ }, { "type": "monstergroup", - "name": "AFS_GROUP_FAUNA_PREDATORS_MEDIUM_RISK", + "id": "AFS_GROUP_FAUNA_PREDATORS_MEDIUM_RISK", "monsters": [ { "monster": "afs_titanis", "weight": 350, "cost_multiplier": 0 }, { "monster": "afs_venandi", "weight": 250, "cost_multiplier": 0, "pack_size": [ 1, 2 ] }, diff --git a/data/mods/Aftershock/mobs/monster_groups/moxie_monster_groups.json b/data/mods/Aftershock/mobs/monster_groups/moxie_monster_groups.json index 94d6c302e4fe1..21fa3e683042a 100644 --- a/data/mods/Aftershock/mobs/monster_groups/moxie_monster_groups.json +++ b/data/mods/Aftershock/mobs/monster_groups/moxie_monster_groups.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "AFS_GROUP_MOXIE_LOW_RISK", + "id": "AFS_GROUP_MOXIE_LOW_RISK", "monsters": [ { "monster": "mon_moxie_scavenger", "weight": 350, "cost_multiplier": 1 }, { "monster": "mon_moxie_scavenger", "weight": 250, "cost_multiplier": 1, "pack_size": [ 1, 4 ] }, @@ -12,7 +12,7 @@ }, { "type": "monstergroup", - "name": "AFS_GROUP_RUIN_MOXIE", + "id": "AFS_GROUP_RUIN_MOXIE", "monsters": [ { "monster": "mon_human_biomachine", "weight": 70, "cost_multiplier": 0, "pack_size": [ 1, 2 ] }, { "monster": "mon_human_biomachine", "weight": 20, "cost_multiplier": 0, "pack_size": [ 5, 6 ] }, diff --git a/data/mods/Aftershock/mobs/monster_groups/robot_monster_groups.json b/data/mods/Aftershock/mobs/monster_groups/robot_monster_groups.json index b3ca1f6b0338a..d065deda908c6 100644 --- a/data/mods/Aftershock/mobs/monster_groups/robot_monster_groups.json +++ b/data/mods/Aftershock/mobs/monster_groups/robot_monster_groups.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "AFS_GROUP_ROBOT_NEUTRAL_OLD", + "id": "AFS_GROUP_ROBOT_NEUTRAL_OLD", "//": "Neutral bots from the original colony.", "monsters": [ { "monster": "mon_utilibot_const", "weight": 550, "cost_multiplier": 0 }, @@ -13,7 +13,7 @@ }, { "type": "monstergroup", - "name": "AFS_GROUP_ROBOT_NEUTRAL_OLD_DOMESTIC", + "id": "AFS_GROUP_ROBOT_NEUTRAL_OLD_DOMESTIC", "//": "Neutral bots from the original colony. Specifcally those suited for use in a domestic or residental settings.", "monsters": [ { "monster": "mon_utilibot", "weight": 550, "cost_multiplier": 0 }, @@ -23,7 +23,7 @@ }, { "type": "monstergroup", - "name": "AFS_GROUP_ROBOT_LOW_RISK", + "id": "AFS_GROUP_ROBOT_LOW_RISK", "default": "mon_skitterbot_rat", "monsters": [ { "monster": "mon_bloodhound_drone", "weight": 100, "cost_multiplier": 0, "pack_size": [ 1, 2 ] }, @@ -34,7 +34,7 @@ }, { "type": "monstergroup", - "name": "GROUP_PIRATE__BOT_AMBUSH", + "id": "GROUP_PIRATE__BOT_AMBUSH", "default": "mon_manhack", "monsters": [ { "monster": "mon_bloodhound_drone", "weight": 500, "cost_multiplier": 50, "pack_size": [ 1, 2 ] }, @@ -45,7 +45,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ROBOT_FARM_HOSTILE", + "id": "GROUP_ROBOT_FARM_HOSTILE", "default": "mon_manhack", "monsters": [ { "monster": "mon_utilibot_hostile", "weight": 500, "cost_multiplier": 70 }, @@ -56,7 +56,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ROBOT_COPS_HOSTILE", + "id": "GROUP_ROBOT_COPS_HOSTILE", "default": "mon_manhack", "monsters": [ { "monster": "mon_zenit", "weight": 50, "cost_multiplier": 100 }, diff --git a/data/mods/Aftershock/mobs/robot_groups.json b/data/mods/Aftershock/mobs/robot_groups.json index fb556857b3fe9..86aaf0187c139 100644 --- a/data/mods/Aftershock/mobs/robot_groups.json +++ b/data/mods/Aftershock/mobs/robot_groups.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_UTILIBOT", + "id": "GROUP_UTILIBOT", "monsters": [ { "monster": "mon_utilibot_fire", "weight": 200, "cost_multiplier": 3 }, { "monster": "mon_utilibot", "weight": 550 }, @@ -11,7 +11,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SEWER", + "id": "GROUP_SEWER", "monsters": [ { "monster": "mon_utilibot", "weight": 50, "cost_multiplier": 0, "pack_size": [ 2, 3 ] }, { "monster": "mon_utilibot_const", "weight": 50, "cost_multiplier": 0, "pack_size": [ 2, 3 ] } @@ -19,12 +19,12 @@ }, { "type": "monstergroup", - "name": "GROUP_TURRET", + "id": "GROUP_TURRET", "monsters": [ { "monster": "mon_laserturret_xray", "weight": 50, "cost_multiplier": 2 } ] }, { "type": "monstergroup", - "name": "GROUP_LAB", + "id": "GROUP_LAB", "auto_total": true, "monsters": [ { "monster": "mon_utilibot", "weight": 5, "cost_multiplier": 0, "pack_size": [ 1, 2 ] }, @@ -37,7 +37,7 @@ }, { "type": "monstergroup", - "name": "GROUP_CENTRAL_LAB", + "id": "GROUP_CENTRAL_LAB", "auto_total": true, "monsters": [ { "monster": "mon_secubot", "weight": 0, "cost_multiplier": 10 }, @@ -50,7 +50,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ROBOT", + "id": "GROUP_ROBOT", "auto_total": true, "monsters": [ { "monster": "mon_medibot", "weight": 3, "cost_multiplier": 0 }, @@ -69,7 +69,7 @@ }, { "type": "monstergroup", - "name": "GROUP_PUBLICWORKERS", + "id": "GROUP_PUBLICWORKERS", "monsters": [ { "monster": "mon_utilibot", "weight": 10, "cost_multiplier": 0, "pack_size": [ 2, 4 ] }, { "monster": "mon_utilibot_const", "weight": 10, "cost_multiplier": 0, "pack_size": [ 2, 3 ] } @@ -77,7 +77,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SMALL_STATION", + "id": "GROUP_SMALL_STATION", "monsters": [ { "monster": "mon_utilibot", "weight": 10, "cost_multiplier": 0 }, { "monster": "mon_utilibot_const", "weight": 10, "cost_multiplier": 0 } @@ -85,31 +85,31 @@ }, { "type": "monstergroup", - "name": "GROUP_LARGE_STATION", + "id": "GROUP_LARGE_STATION", "monsters": [ { "monster": "mon_utilibot", "weight": 10, "cost_multiplier": 0 }, { "monster": "mon_utilibot_const", "weight": 10, "cost_multiplier": 0 } ] }, { - "name": "GROUP_MANSION_START", + "id": "GROUP_MANSION_START", "type": "monstergroup", "monsters": [ { "monster": "mon_utilibot_butler", "weight": 80 } ] }, { "type": "monstergroup", - "name": "GROUP_HOSPITAL", + "id": "GROUP_HOSPITAL", "//": "Hospital monster spawns. Same as GROUP_ZOMBIE, but without Z-dogs.", "monsters": [ { "monster": "mon_medibot", "weight": 15, "cost_multiplier": 20, "pack_size": [ 2, 3 ] } ] }, { "type": "monstergroup", - "name": "GROUP_FIRE", + "id": "GROUP_FIRE", "monsters": [ { "monster": "mon_utilibot_fire", "weight": 200, "cost_multiplier": 2, "pack_size": [ 4, 6 ] } ] }, { "type": "monstergroup", - "name": "GROUP_MIL_BASE", + "id": "GROUP_MIL_BASE", "monsters": [ { "monster": "mon_tripod", "weight": 5, "cost_multiplier": 0 }, { "monster": "mon_chickenbot", "weight": 5, "cost_multiplier": 0 }, @@ -118,7 +118,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MAYBE_MIL", + "id": "GROUP_MAYBE_MIL", "monsters": [ { "monster": "mon_tripod", "weight": 5, "cost_multiplier": 0 }, { "monster": "mon_chickenbot", "weight": 5, "cost_multiplier": 0 }, @@ -127,7 +127,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MIL_STRONG", + "id": "GROUP_MIL_STRONG", "monsters": [ { "monster": "mon_tripod", "weight": 5, "cost_multiplier": 0 }, { "monster": "mon_chickenbot", "weight": 5, "cost_multiplier": 0 }, diff --git a/data/mods/Aftershock/mobs/robots.json b/data/mods/Aftershock/mobs/robots.json index e839ce66548a8..77e8823ed4d6a 100644 --- a/data/mods/Aftershock/mobs/robots.json +++ b/data/mods/Aftershock/mobs/robots.json @@ -772,14 +772,12 @@ "speed": 150, "color": "pink", "extend": { "flags": [ "FIREPROOF" ] }, - "starting_ammo": { "plasma": 100 }, "special_attacks": [ { "type": "gun", "cooldown": 1, "gun_type": "irradiant_gun", "move_cost": 100, - "ammo_type": "plasma", "fake_skills": [ [ "gun", 10 ], [ "rifle", 5 ] ], "fake_dex": 10, "ranges": [ [ 0, 40, "DEFAULT" ] ], @@ -1074,5 +1072,17 @@ "color": "light_gray", "flags": [ "TRADER_AVOID", "NO_REPAIR", "LEAK_DAM", "RADIOACTIVE" ], "melee_damage": { "bash": 7 } + }, + { + "id": "mon_uica_irradiant", + "type": "MONSTER", + "copy-from": "mon_wraitheon_irradiant", + "name": "UICA Irradiant", + "description": "An autonomous anti-armor weapons platform, mounting a 5kg plasma railgun over an insectoid chassis. The Irradiant designation excels at ambush and midrange combat, where it can leverage its superior agility and reduced sensor profile to successfully engage technologically advanced foes.", + "default_faction": "UICA_mil", + "aggression": -20, + "morale": 70, + "aggro_character": false, + "anger_triggers": [ "FRIEND_ATTACKED", "FRIEND_DIED", "HURT" ] } ] diff --git a/data/mods/Aftershock/mod_interactions/defense_mode/monstergroups.json b/data/mods/Aftershock/mod_interactions/defense_mode/monstergroups.json index 75985b52c5ee0..707838ab5c67c 100644 --- a/data/mods/Aftershock/mod_interactions/defense_mode/monstergroups.json +++ b/data/mods/Aftershock/mod_interactions/defense_mode/monstergroups.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "AFS_GROUP_DM", + "id": "AFS_GROUP_DM", "monsters": [ { "monster": "mon_moxie_scavenger_dm", "weight": 350, "cost_multiplier": 1 }, { "monster": "mon_moxie_regenerator_dm", "weight": 200, "cost_multiplier": 1 }, diff --git a/data/mods/Aftershock/mutations/human_plus.json b/data/mods/Aftershock/mutations/human_plus.json new file mode 100644 index 0000000000000..b3c889b7c8b05 --- /dev/null +++ b/data/mods/Aftershock/mutations/human_plus.json @@ -0,0 +1,62 @@ +[ + { + "type": "mutation", + "id": "AFS_PHYSICAL_CAPABILITY_GENEMOD", + "name": { "str": "Genemod: Improved Physical Capability" }, + "points": 3, + "description": "Your strength, coordination, and sensory acuity have been increased through genemod treatments.", + "cancels": [ "MYOPIC", "HYPEROPIC", "BADHEARING" ], + "enchantments": [ + { + "values": [ { "value": "STRENGTH", "add": 2 }, { "value": "DEXTERITY", "add": 2 }, { "value": "PERCEPTION", "add": 2 } ] + } + ], + "flags": [ "IMMUNE_HEARING_DAMAGE" ] + }, + { + "type": "mutation", + "id": "AFS_MENTAL_CAPABILITY_GENEMOD", + "name": { "str": "Genemod: Improved Mental Flexibility" }, + "points": 3, + "cancels": [ "FORGETFUL" ], + "description": "Your concentration and memorization abilities have been increased through genemod treatments.", + "enchantments": [ { "values": [ { "value": "INTELLIGENCE", "add": 2 }, { "value": "LEARNING_FOCUS", "add": 10 } ] } ] + }, + { + "type": "mutation", + "id": "AFS_HEALTH_CAPABILITY_GENEMOD", + "name": { "str": "Genemod: Improved Health" }, + "points": 3, + "description": "Your resistance to disease and infection, as well as your ability to recover from injuries, have been improved through genemod treatments.", + "enchantments": [ { "mutations": [ "DISRESISTANT", "FASTHEALER", "INFRESIST" ] } ], + "cancels": [ "SLOWHEALER", "SLOWHEALER2", "SLOWHEALER3" ], + "flags": [ "MEND_ALL" ] + }, + { + "type": "mutation", + "id": "AFS_RECOVERY_CAPABILITY_GENEMOD", + "name": { "str": "Genemod: Efficient System" }, + "points": 3, + "description": "The efficiency of your metabolic processes, from the length of your sleep cycle to losing fatigue after exercise, have been improved through genemod treatments.", + "cancels": [ "SLEEPY", "SLEEPY2" ], + "enchantments": [ + { + "values": [ + { "value": "CARDIO_MULTIPLIER", "multiply": 0.2 }, + { "value": "REGEN_STAMINA", "multiply": 0.2 }, + { "value": "SLEEPINESS_REGEN", "multiply": 0.2 }, + { "value": "SLEEPINESS", "multiply": -0.2 } + ] + } + ] + }, + { + "type": "mutation", + "id": "AFS_BEAUTY_GENEMOD", + "name": { "str": "Genemod: Beauty" }, + "points": 3, + "description": "Your physical appearance has been improved through genemod treatments.", + "enchantments": [ { "mutations": [ "BEAUTIFUL" ] } ], + "cancels": [ "UGLY", "DEFORMED", "DEFORMED2" ] + } +] diff --git a/data/mods/Aftershock/npcs/Mercurial/clerk.json b/data/mods/Aftershock/npcs/Mercurial/clerk.json new file mode 100644 index 0000000000000..2769755136cce --- /dev/null +++ b/data/mods/Aftershock/npcs/Mercurial/clerk.json @@ -0,0 +1,64 @@ +[ + { + "type": "npc_class", + "id": "NC_AUGUSTMOON_GENETECH_TRADER", + "name": { "str": "Mercurial augmentation tech." }, + "job_description": "Outfitter Clerk", + "common": false, + "traits": [ { "group": "BG_survival_story_POLICE" }, { "group": "NPC_starting_traits" }, { "group": "Appearance_demographics" } ], + "bonus_str": { "rng": [ 0, 1 ] }, + "bonus_dex": { "rng": [ 0, 2 ] }, + "bonus_int": { "rng": [ -2, 0 ] }, + "bonus_per": { "rng": [ 0, 2 ] }, + "worn_override": "NC_AUGUSTMOON_TOOL_TRADER_worn", + "carry_override": "EMPTY_GROUP", + "weapon_override": "EMPTY_GROUP", + "skills": [ { "skill": "ALL", "level": { "sum": [ { "dice": [ 3, 2 ] }, { "constant": -3 } ] } } ], + "shopkeeper_item_group": [ { "group": "afs_augustmoon_genetech_trader", "rigid": true } ], + "shopkeeper_price_rules": [ { "group": "afs_augustmoon_genetech_trader", "markup": 1.1 } ] + }, + { + "type": "item_group", + "id": "afs_augustmoon_genetech_trader", + "ammo": 100, + "magazine": 100, + "subtype": "collection", + "items": [ { "item": "afs_gene_disp", "count": [ 3, 10 ] }, { "item": "afs_gene_template", "count": [ 2, 3 ] } ] + }, + { + "type": "item_group", + "id": "NC_AUGUSTMOON_TOOL_TRADER_worn", + "subtype": "collection", + "items": [ + { "item": "afs_hazard_suit_casual" }, + { "item": "boots_combat" }, + { "item": "under_armor" }, + { "item": "under_armor_shorts" } + ] + }, + { + "type": "npc", + "id": "augustmoon_mercurial_clerk", + "name_suffix": "Mercurial augmentation tech.", + "class": "NC_AUGUSTMOON_GENETECH_TRADER", + "attitude": 0, + "mission": 3, + "chat": "TALK_AUGUSTMOON_GENETECH_TRADER", + "faction": "UICA" + }, + { + "id": [ "TALK_AUGUSTMOON_GENETECH_TRADER", "TALK_AUGUSTMOON_GENETECH_WORKS" ], + "type": "talk_topic", + "dynamic_line": "&The Mercurial store is attended by a massive clerk, sleek scales adorn their massive forearms and slightly pointed ears. They greet you with a voice that is both deep and melodious, \"Welcome to Mercurial Genetech, where we can help you unlock your potential.\"", + "responses": [ + { "text": "I'm looking into augments", "topic": "TALK_DONE", "effect": "start_trade" }, + { "text": "How does this Genetech stuff works?", "topic": "TALK_AUGUSTMOON_GENETECH_WORKS" }, + { "text": "Maybe later.", "topic": "TALK_DONE" } + ] + }, + { + "id": [ "TALK_AUGUSTMOON_GENETECH_WORKS" ], + "type": "talk_topic", + "dynamic_line": "&The clerk smiles, \"Our Genetech is a marvel of modern science, capable of rewriting your very DNA. We offer a wide range of treatments, from the mundanely medical to the exotic. You need only select one of our templates and visit one of our editing machines in both ends of this store. If you ever have doubts, remember that all our treatments are reversible.\"" + } +] diff --git a/data/mods/Aftershock/npcs/UICA/GENERIC/nc_ground_engineer.json b/data/mods/Aftershock/npcs/UICA/GENERIC/nc_ground_engineer.json new file mode 100644 index 0000000000000..edfbd6da5593c --- /dev/null +++ b/data/mods/Aftershock/npcs/UICA/GENERIC/nc_ground_engineer.json @@ -0,0 +1,74 @@ +[ + { + "type": "npc_class", + "id": "NC_UICA_GROUND_ENGINEER", + "//": "Engineers for ground installations to maintain robots and military equipment", + "name": { "str": "UICA Engineer" }, + "job_description": "Just move along", + "common": false, + "traits": [ { "group": "NPC_starting_traits" }, { "group": "Appearance_demographics" } ], + "bonus_str": { "rng": [ 0, 1 ] }, + "bonus_dex": { "rng": [ 0, 2 ] }, + "bonus_int": { "rng": [ -2, 0 ] }, + "bonus_per": { "rng": [ 0, 2 ] }, + "worn_override": "NC_UICA_GROUND_SOLDIER_worn", + "carry_override": "NC_UICA_GROUND_SOLDIER_carry", + "weapon_override": "NC_UICA_GROUND_SOLDIER_wield", + "skills": [ + { "skill": "ALL", "level": { "sum": [ { "dice": [ 3, 2 ] }, { "constant": -1 } ] } }, + { "skill": "fabrication", "bonus": { "rng": [ 4, 6 ] } }, + { "skill": "electronics", "bonus": { "rng": [ 4, 6 ] } }, + { "skill": "mechanics", "bonus": { "rng": [ 4, 6 ] } }, + { "skill": "gun", "bonus": { "rng": [ 4, 6 ] } }, + { "skill": "pistol", "bonus": { "rng": [ 4, 6 ] } }, + { "skill": "smg", "bonus": { "rng": [ 4, 6 ] } }, + { "skill": "rifle", "bonus": { "rng": [ 4, 6 ] } } + ] + }, + { + "type": "item_group", + "id": "NC_UICA_GROUND_ENGINEER_worn", + "subtype": "collection", + "ammo": 100, + "magazine": 100, + "items": [ + { "item": "tac_fullhelmet_uicas" }, + { "item": "afs_military_vest" }, + { "item": "afs_ammo_satchel" }, + { "item": "afs_jumpsuit_military" }, + { "item": "afs_military_cloak" }, + { "item": "afs_herc_rig" }, + { "item": "boots_combat" }, + { "item": "gloves_tactical" }, + { "item": "under_armor" }, + { "item": "under_armor_shorts" }, + { "item": "holster" } + ] + }, + { + "type": "item_group", + "id": "NC_UICA_GROUND_ENGINEER_carry", + "subtype": "collection", + "items": [ + { "item": "ear_plugs", "custom-flags": [ "no_auto_equip" ] }, + { "item": "afs_marsec_4", "charges": 14, "ammo-item": "afs_10mm_caseless_JHP" }, + { "item": "afs_10mm_caseless_JHP", "count": [ 1, 2 ] }, + { "item": "afs_sr77_45mag", "charges": 45, "ammo-item": "afs_7.50mm_caseless", "count": 2 }, + { "item": "afs_plasma_torch" } + ] + }, + { + "type": "item_group", + "id": "NC_UICA_GROUND_ENGINEER_wield", + "subtype": "collection", + "items": [ + { + "item": "afs_sr77", + "variant": "military", + "ammo-item": "afs_7.50mm_caseless", + "charges": 45, + "contents-item": [ "shoulder_strap", "suppressor" ] + } + ] + } +] diff --git a/data/mods/Aftershock/npcs/UICA/GENERIC/nc_ground_soldier.json b/data/mods/Aftershock/npcs/UICA/GENERIC/nc_ground_soldier.json new file mode 100644 index 0000000000000..24d73869f048a --- /dev/null +++ b/data/mods/Aftershock/npcs/UICA/GENERIC/nc_ground_soldier.json @@ -0,0 +1,69 @@ +[ + { + "type": "npc_class", + "id": "NC_UICA_GROUND_SOLDIER", + "//": "Soldiers on ground installations", + "name": { "str": "UICA Installation Security" }, + "job_description": "Just move along", + "common": false, + "traits": [ { "group": "NPC_starting_traits" }, { "group": "Appearance_demographics" } ], + "bonus_str": { "rng": [ 0, 1 ] }, + "bonus_dex": { "rng": [ 0, 2 ] }, + "bonus_int": { "rng": [ -2, 0 ] }, + "bonus_per": { "rng": [ 0, 2 ] }, + "worn_override": "NC_UICA_GROUND_SOLDIER_worn", + "carry_override": "NC_UICA_GROUND_SOLDIER_carry", + "weapon_override": "NC_UICA_GROUND_SOLDIER_wield", + "skills": [ + { "skill": "ALL", "level": { "sum": [ { "dice": [ 3, 2 ] }, { "constant": -1 } ] } }, + { "skill": "gun", "bonus": { "rng": [ 4, 6 ] } }, + { "skill": "pistol", "bonus": { "rng": [ 4, 6 ] } }, + { "skill": "smg", "bonus": { "rng": [ 4, 6 ] } }, + { "skill": "rifle", "bonus": { "rng": [ 4, 6 ] } } + ] + }, + { + "type": "item_group", + "id": "NC_UICA_GROUND_SOLDIER_worn", + "subtype": "collection", + "ammo": 100, + "magazine": 100, + "items": [ + { "item": "tac_fullhelmet_uicas" }, + { "item": "afs_military_vest" }, + { "item": "afs_ammo_satchel" }, + { "item": "afs_jumpsuit_military" }, + { "item": "afs_military_cloak" }, + { "item": "boots_combat" }, + { "item": "gloves_tactical" }, + { "item": "under_armor" }, + { "item": "under_armor_shorts" }, + { "item": "holster" } + ] + }, + { + "type": "item_group", + "id": "NC_UICA_GROUND_SOLDIER_carry", + "subtype": "collection", + "items": [ + { "item": "ear_plugs", "custom-flags": [ "no_auto_equip" ] }, + { "item": "afs_marsec_4", "charges": 14, "ammo-item": "afs_10mm_caseless_JHP" }, + { "item": "afs_10mm_caseless_JHP", "count": [ 1, 2 ] }, + { "item": "afs_sr77_45mag", "charges": 45, "ammo-item": "afs_7.50mm_caseless", "count": 2 } + ] + }, + { + "type": "item_group", + "id": "NC_UICA_GROUND_SOLDIER_wield", + "subtype": "collection", + "items": [ + { + "item": "afs_sr77", + "variant": "military", + "ammo-item": "afs_7.50mm_caseless", + "charges": 45, + "contents-item": [ "shoulder_strap", "suppressor" ] + } + ] + } +] diff --git a/data/mods/Aftershock/npcs/UICA/ground_engineer.json b/data/mods/Aftershock/npcs/UICA/ground_engineer.json new file mode 100644 index 0000000000000..61d7f30fd89e4 --- /dev/null +++ b/data/mods/Aftershock/npcs/UICA/ground_engineer.json @@ -0,0 +1,19 @@ +[ + { + "type": "npc", + "id": "uica_ground_engineer", + "//": "A generic commanding officer for UICA ground installations.", + "name_suffix": "UICA Engineer", + "class": "NC_UICA_GROUND_ENGINEER", + "attitude": 0, + "mission": 8, + "chat": "TALK_UICA_GROUND_ENGINEER", + "faction": "UICA" + }, + { + "id": "TALK_UICA_GROUND_ENGINEER", + "type": "talk_topic", + "dynamic_line": [ "Keep it civil, salvor.", "No time to talk now.", { "u_male": [ "Sir." ], "no": [ "Ma'am" ] } ], + "responses": [ { "text": "…", "topic": "TALK_DONE" } ] + } +] diff --git a/data/mods/Aftershock/npcs/UICA/ground_officer.json b/data/mods/Aftershock/npcs/UICA/ground_officer.json new file mode 100644 index 0000000000000..46b2e9bb5e2a5 --- /dev/null +++ b/data/mods/Aftershock/npcs/UICA/ground_officer.json @@ -0,0 +1,19 @@ +[ + { + "type": "npc", + "id": "uica_ground_officer", + "//": "A generic commanding officer for UICA ground installations.", + "name_suffix": "UICA Officer", + "class": "NC_UICA_GROUND_SOLDIER", + "attitude": 0, + "mission": 8, + "chat": "TALK_UICA_GROUND_OFFICER", + "faction": "UICA" + }, + { + "id": "TALK_UICA_GROUND_OFFICER", + "type": "talk_topic", + "dynamic_line": [ "Can I help you salvor?", "Not right now, I'm busy.", { "u_male": [ "Sir." ], "no": [ "Ma'am" ] } ], + "responses": [ { "text": "…", "topic": "TALK_DONE" } ] + } +] diff --git a/data/mods/Aftershock/npcs/UICA/ground_quartermaster.json b/data/mods/Aftershock/npcs/UICA/ground_quartermaster.json new file mode 100644 index 0000000000000..79a114a482baf --- /dev/null +++ b/data/mods/Aftershock/npcs/UICA/ground_quartermaster.json @@ -0,0 +1,134 @@ +[ + { + "type": "npc_class", + "id": "NC_UICA_GROUND_QUARTERMASTER", + "name": { "str": "UICA Quartermaster" }, + "job_description": "Supply Trader", + "common": false, + "traits": [ { "group": "NPC_starting_traits" }, { "group": "Appearance_demographics" } ], + "bonus_str": { "rng": [ 0, 1 ] }, + "bonus_dex": { "rng": [ 0, 2 ] }, + "bonus_int": { "rng": [ -2, 0 ] }, + "bonus_per": { "rng": [ 0, 2 ] }, + "worn_override": "NC_UICA_GROUND_SOLDIER_worn", + "carry_override": "NC_UICA_GROUND_SOLDIER_carry", + "weapon_override": "NC_UICA_GROUND_SOLDIER_wield", + "skills": [ + { "skill": "ALL", "level": { "sum": [ { "dice": [ 3, 2 ] }, { "constant": -1 } ] } }, + { "skill": "gun", "bonus": { "rng": [ 4, 6 ] } }, + { "skill": "pistol", "bonus": { "rng": [ 4, 6 ] } }, + { "skill": "smg", "bonus": { "rng": [ 4, 6 ] } }, + { "skill": "rifle", "bonus": { "rng": [ 4, 6 ] } } + ], + "shopkeeper_item_group": [ + { "group": "afs_uica_quartermaster_money", "rigid": true }, + { "group": "afs_uica_quartermaster_armor", "rigid": true }, + { "group": "afs_uica_quartermaster_medical", "rigid": true }, + { "group": "afs_uica_quartermaster_military", "rigid": true } + ], + "shopkeeper_price_rules": [ { "group": "afs_general_armory", "fixed_adj": 0 } ] + }, + { + "id": "afs_uica_quartermaster_military", + "type": "item_group", + "subtype": "collection", + "items": [ { "group": "afs_uica_weapon_locker", "count": [ 1, 2 ] } ] + }, + { + "id": "afs_uica_quartermaster_armor", + "type": "item_group", + "subtype": "collection", + "items": [ { "group": "afs_uica_armor_locker", "count": [ 2, 5 ] } ] + }, + { + "id": "afs_uica_quartermaster_medical", + "type": "item_group", + "subtype": "collection", + "items": [ { "group": "afs_ifak", "count": [ 1, 3 ] } ] + }, + { + "type": "npc", + "id": "uica_quartermaster", + "name_suffix": "UICA Quartermaster", + "class": "NC_UICA_GROUND_QUARTERMASTER", + "attitude": 0, + "mission": 3, + "chat": "TALK_UICA_GROUND_QUARTERMASTER", + "faction": "UICA" + }, + { + "type": "effect_type", + "id": "afs_tried_to_bribe", + "name": [ { "str": "Asked to Bribe", "//~": "NO_I18N" } ], + "desc": [ { "str": "You tried and failed to bribe this NPC recently. If you see this it's a bug.", "//~": "NO_I18N" } ] + }, + { + "id": [ "TALK_UICA_GROUND_QUARTERMASTER" ], + "type": "talk_topic", + "dynamic_line": "&You find the Quartermaster lazily reclined against a stack of intermodal crates. barely acknowledges your presence, their eyes never leaving their PDA as they address you. Need something salvor?", + "responses": [ + { + "text": "Show me what you have.", + "topic": "TALK_DONE", + "effect": "start_trade", + "condition": { "compare_string": [ "yes", { "npc_val": "player_can_trade" } ] } + }, + { + "text": "Can I buy supplies here?", + "topic": "TALK_UICA_GROUND_QUARTERMASTER_BRIBE", + "condition": { + "and": [ + { "not": { "compare_string": [ "yes", { "npc_val": "player_can_trade" } ] } }, + { "not": { "npc_has_effect": "afs_tried_to_bribe" } } + ] + } + }, + { + "text": "Can I buy supplies here?", + "topic": "TALK_UICA_GROUND_QUARTERMASTER_BRIBE_RECENTLY_FAILED", + "condition": { "npc_has_effect": "afs_tried_to_bribe" } + }, + { "text": "Maybe later.", "topic": "TALK_DONE" } + ] + }, + { + "id": [ "TALK_UICA_GROUND_QUARTERMASTER_BRIBE" ], + "type": "talk_topic", + "dynamic_line": "&This isn't a store. Go to the Spaceport if you want to buy supplies.", + "responses": [ + { + "text": "I'm sure we can work something out. [Bribe $3000]", + "trial": { "type": "PERSUADE", "difficulty": 50 }, + "success": { + "topic": "TALK_DONE", + "effect": [ + { "npc_add_var": "player_can_trade", "value": "yes" }, + { "u_spend_cash": 300000, "false_eocs": "EOC_QUARTERMASTER_DID_NOT_PAY_BRIBE" } + ] + }, + "failure": { + "topic": "TALK_UICA_GROUND_QUARTERMASTER_BRIBE_FAILURE", + "effect": { "npc_add_effect": "afs_tried_to_bribe", "duration": "24 hours" } + } + }, + { "text": "Nevermind then.", "topic": "TALK_DONE" } + ] + }, + { + "id": [ "TALK_UICA_GROUND_QUARTERMASTER_BRIBE_FAILURE" ], + "type": "talk_topic", + "dynamic_line": "&I think you should leave.", + "responses": [ { "text": "Nevermind then.", "topic": "TALK_DONE" } ] + }, + { + "id": [ "TALK_UICA_GROUND_QUARTERMASTER_BRIBE_RECENTLY_FAILED" ], + "type": "talk_topic", + "dynamic_line": "&I already told you no.", + "responses": [ { "text": "Nevermind then.", "topic": "TALK_DONE" } ] + }, + { + "id": "EOC_QUARTERMASTER_DID_NOT_PAY_BRIBE", + "type": "effect_on_condition", + "effect": { "npc_add_var": "player_can_trade", "value": "no" } + } +] diff --git a/data/mods/Aftershock/npcs/UICA/ground_soldier.json b/data/mods/Aftershock/npcs/UICA/ground_soldier.json new file mode 100644 index 0000000000000..cdc56b0fa3327 --- /dev/null +++ b/data/mods/Aftershock/npcs/UICA/ground_soldier.json @@ -0,0 +1,19 @@ +[ + { + "type": "npc", + "id": "uica_ground_soldier", + "//": "A generic guard for uica ground installations.", + "name_suffix": "UICA Installation Security", + "class": "NC_UICA_GROUND_SOLDIER", + "attitude": 0, + "mission": 8, + "chat": "TALK_UICA_GROUND_SOLDIER", + "faction": "UICA" + }, + { + "id": "TALK_UICA_GROUND_SOLDIER", + "type": "talk_topic", + "dynamic_line": [ "Keep it civil, salvor.", "Just on watch, move along.", { "u_male": [ "Sir." ], "no": [ "Ma'am" ] } ], + "responses": [ { "text": "…", "topic": "TALK_DONE" } ] + } +] diff --git a/data/mods/Aftershock/player/hobbies.json b/data/mods/Aftershock/player/hobbies.json index 2734dfe748ca6..b462d647c1ce1 100644 --- a/data/mods/Aftershock/player/hobbies.json +++ b/data/mods/Aftershock/player/hobbies.json @@ -45,6 +45,51 @@ "points": 3, "traits": [ "AFS_LEADERSHIP" ] }, + { + "type": "profession", + "subtype": "hobby", + "id": "afs_physical_stat_genemod", + "name": "Genemod: Physical Ability", + "description": "Much more common in the Hyperspace Era, the rich or those from Earth still have access to genemodding technology designed to make humanity better. This is the suite of improvements to increase strength, coordination, and sensory ability as well as fix problems such as nearsightedness.", + "points": 2, + "traits": [ "AFS_PHYSICAL_CAPABILITY_GENEMOD" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "afs_mental_stat_genemod", + "name": "Genemod: Mental Acuity", + "description": "Much more common in the Hyperspace Era, the rich or those from Earth still have access to genemodding technology designed to make humanity better. This is the suite of improvements to increase mental flexibility and memorization.", + "points": 2, + "traits": [ "AFS_MENTAL_CAPABILITY_GENEMOD" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "afs_health_genemod", + "name": "Genemod: Improved Health", + "description": "Much more common in the Hyperspace Era, the rich or those from Earth still have access to genemodding technology designed to make humanity better. This is the suite of improvements to health, providing increased healing speed and resistance to disease and infection.", + "points": 2, + "traits": [ "AFS_HEALTH_CAPABILITY_GENEMOD" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "afs_efficiency_genemod", + "name": "Genemod: Efficient System", + "description": "Much more common in the Hyperspace Era, the rich or those from Earth still have access to genemodding technology designed to make humanity better. This is the suite of improvements to recovery, allowing a quicker sleep cycle and faster return to baseline after exertion.", + "points": 2, + "traits": [ "AFS_RECOVERY_CAPABILITY_GENEMOD" ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "afs_beauty_genemod", + "name": "Genemod: Beauty", + "description": "Much more common in the Hyperspace Era, the rich or those from Earth still have access to genemodding technology designed to make humanity better. This is the suite of improvements to physical appearance, offering clearer skin, more striking features, increased facial symmetry, and removing signs of aging.", + "points": 2, + "traits": [ "AFS_BEAUTY_GENEMOD" ] + }, { "type": "profession", "subtype": "hobby", diff --git a/data/mods/Aftershock/player/professions.json b/data/mods/Aftershock/player/professions.json index 636a60057b4dd..100dcfac5c531 100644 --- a/data/mods/Aftershock/player/professions.json +++ b/data/mods/Aftershock/player/professions.json @@ -268,7 +268,7 @@ "description": "The exiled scion of an unfavorable seat within the Wraitheon board of directors, wealthy beyond measure even in their estrangement. Sent to the frontier in a last-ditch effort to salvage their reputation, or more likely, to find a silent and politically convenient death.", "points": 8, "CBMs": [ "bio_batteries", "bio_power_storage_mkII", "bio_eye_enhancer", "bio_int_enhancer", "bio_memory", "bio_cable" ], - "traits": [ "FLIMSY3", "SLOWHEALER3" ], + "traits": [ "FLIMSY3", "SLOWHEALER3", "AFS_MENTAL_CAPABILITY_GENEMOD", "AFS_RECOVERY_CAPABILITY_GENEMOD" ], "pets": [ { "name": "afs_mon_sentinel_lx", "amount": 2 } ], "skills": [ { "level": 6, "name": "speech" }, { "level": 6, "name": "computer" } ], "items": { diff --git a/data/mods/Aftershock/scenarios.json b/data/mods/Aftershock/scenarios.json index fcb8bf2bc0cc0..0fe656e1c13cd 100644 --- a/data/mods/Aftershock/scenarios.json +++ b/data/mods/Aftershock/scenarios.json @@ -94,7 +94,18 @@ "allowed_locs": [ "sloc_augustmoon_docking" ], "professions": [ "afs_salvor", "afs_academic", "afs_holo_fighter", "afs_wraitheon_executive", "rocket_jumper", "robot_scavenger" ], "whitelist_hobbies": true, - "hobbies": [ "afs_speed_freak", "afs_armament_license", "afs_spacer", "afs_leadership", "afs_earthling" ], + "hobbies": [ + "afs_speed_freak", + "afs_armament_license", + "afs_spacer", + "afs_leadership", + "afs_earthling", + "afs_physical_stat_genemod", + "afs_mental_stat_genemod", + "afs_health_genemod", + "afs_efficiency_genemod", + "afs_beauty_genemod" + ], "flags": [ "LONE_START" ], "start_name": "Port Augustmoon" }, diff --git a/data/mods/Aftershock/vehicles/vehicles.json b/data/mods/Aftershock/vehicles/vehicles.json index 7894dafdddedf..40d7fd8d86128 100644 --- a/data/mods/Aftershock/vehicles/vehicles.json +++ b/data/mods/Aftershock/vehicles/vehicles.json @@ -443,5 +443,54 @@ { "x": 1, "y": 0, "parts": [ "motorcycle_headlight", "battery_car", "light_blue" ] }, { "x": -1, "y": 0, "parts": [ "muffler" ] } ] + }, + { + "id": "uica_lynx_ex", + "type": "vehicle", + "name": "Lynx Explorer", + "blueprint": [ + [ "o-++-o" ], + [ "+=##'|" ], + [ "+=##'|" ], + [ "o-++-o" ] + ], + "parts": [ + { "x": 0, "y": 0, "parts": [ "hdframe#vertical_2", "seat", "seatbelt", "controls", "dashboard", "horn_big", "hdroof" ] }, + { "x": 0, "y": 1, "parts": [ "hdframe#vertical_2", "seat", "seatbelt", "hdroof" ] }, + { "x": 0, "y": -1, "parts": [ "hdframe#vertical", "hddoor#left" ] }, + { "x": 0, "y": 2, "parts": [ "hdframe#vertical", "hddoor#right" ] }, + { "x": -1, "y": 0, "parts": [ "hdframe#vertical_2", "seat", "seatbelt", "hdroof" ] }, + { "x": -1, "y": 1, "parts": [ "hdframe#vertical_2", "turret_mount", "hdroof" ] }, + { "x": -1, "y": 1, "parts": [ "seat", "seatbelt" ] }, + { + "x": -1, + "y": 1, + "parts": [ { "part": "turret_afs_Accipitermg", "ammo_types": [ "afs_7.50mm_caseless" ], "ammo_qty": [ 50, 100 ] } ] + }, + { "x": -1, "y": -1, "parts": [ "hdframe#vertical", "hddoor#left" ] }, + { "x": -1, "y": 2, "parts": [ "hdframe#vertical", "hddoor#right" ] }, + { "x": 1, "y": 0, "parts": [ "hdframe#horizontal", "reinforced_windshield#horizontal_front" ] }, + { "x": 1, "y": 1, "parts": [ "hdframe#horizontal", "reinforced_windshield#horizontal_front" ] }, + { "x": 1, "y": -1, "parts": [ "hdframe#horizontal", "reinforced_windshield#nw" ] }, + { "x": 1, "y": 2, "parts": [ "hdframe#horizontal", "reinforced_windshield#ne" ] }, + { "x": 2, "y": 0, "parts": [ "hdframe#horizontal", "engine_electric_enhanced", "large_storage_battery" ] }, + { "x": 2, "y": 0, "parts": [ "hdhalfboard#horizontal_front", "plating_military" ] }, + { "x": 2, "y": 1, "parts": [ "hdframe#horizontal", "minireactor" ] }, + { "x": 2, "y": 1, "parts": [ "hdhalfboard#horizontal_front", "plating_military" ] }, + { "x": 2, "y": -1, "parts": [ "hdframe#nw", "hdhalfboard#nw", "plating_military" ] }, + { "x": 2, "y": -1, "parts": [ "wheel_mount_heavy_steerable", "wheel_armor", "headlight_reinforced" ] }, + { "x": 2, "y": 2, "parts": [ "hdframe#ne", "hdhalfboard#ne", "plating_military" ] }, + { "x": 2, "y": 2, "parts": [ "wheel_mount_heavy_steerable", "wheel_armor", "headlight_reinforced" ] }, + { "x": -2, "y": 0, "parts": [ "hdframe#vertical", "box", "recharge_station", "hdroof" ] }, + { "x": -2, "y": 1, "parts": [ "hdframe#vertical", "trunk", "hdroof" ] }, + { "x": -2, "y": -1, "parts": [ "hdframe#vertical", "hdboard#vertical_left", "plating_military" ] }, + { "x": -2, "y": 2, "parts": [ "hdframe#vertical", "hdboard#vertical_right", "plating_military" ] }, + { "x": -3, "y": -1, "parts": [ "hdframe#horizontal", "hdboard#sw" ] }, + { "x": -3, "y": -1, "parts": [ "wheel_mount_heavy", "wheel_armor", "plating_military" ] }, + { "x": -3, "y": 0, "parts": [ "hdframe#horizontal", "hddoor_trunk" ] }, + { "x": -3, "y": 1, "parts": [ "hdframe#horizontal", "hddoor_trunk" ] }, + { "x": -3, "y": 2, "parts": [ "hdframe#horizontal", "hdboard#se" ] }, + { "x": -3, "y": 2, "parts": [ "wheel_mount_heavy", "wheel_armor", "plating_military" ] } + ] } ] diff --git a/data/mods/Backrooms/monstergroups.json b/data/mods/Backrooms/monstergroups.json index 1629dd487c8d0..e18cb7968e5b2 100644 --- a/data/mods/Backrooms/monstergroups.json +++ b/data/mods/Backrooms/monstergroups.json @@ -1,6 +1,6 @@ [ { - "name": "GROUP_BACKROOMS", + "id": "GROUP_BACKROOMS", "type": "monstergroup", "monsters": [ { "group": "GROUP_ZOMBIE", "pack_size": [ 1, 2 ], "weight": 920 }, diff --git a/data/mods/CrazyCataclysm/crazy_monstergroups.json b/data/mods/CrazyCataclysm/crazy_monstergroups.json index 15be7f6b7e79b..f223fbecda5dd 100644 --- a/data/mods/CrazyCataclysm/crazy_monstergroups.json +++ b/data/mods/CrazyCataclysm/crazy_monstergroups.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_ZOMBIE", + "id": "GROUP_ZOMBIE", "monsters": [ { "monster": "mon_zombie_skeltal", "weight": 1, "cost_multiplier": 60 }, { "monster": "mon_zombie_skeltal", "weight": 1, "cost_multiplier": 30, "conditions": [ "AUTUMN" ] } @@ -10,7 +10,7 @@ }, { "type": "monstergroup", - "name": "GROUP_HOSPITAL", + "id": "GROUP_HOSPITAL", "monsters": [ { "monster": "mon_zombie_skeltal", "weight": 1, "cost_multiplier": 60 }, { "monster": "mon_zombie_skeltal", "weight": 1, "cost_multiplier": 30, "conditions": [ "AUTUMN" ] } @@ -18,7 +18,7 @@ }, { "type": "monstergroup", - "name": "GROUP_GROCERY", + "id": "GROUP_GROCERY", "monsters": [ { "monster": "mon_zombie_skeltal", "weight": 1, "cost_multiplier": 60 }, { "monster": "mon_zombie_skeltal", "weight": 1, "cost_multiplier": 30, "conditions": [ "AUTUMN" ] } @@ -26,7 +26,7 @@ }, { "type": "monstergroup", - "name": "GROUP_HOUSE", + "id": "GROUP_HOUSE", "monsters": [ { "monster": "mon_zombie_skeltal", "weight": 1, "cost_multiplier": 60 }, { "monster": "mon_zombie_skeltal", "weight": 1, "cost_multiplier": 30, "conditions": [ "AUTUMN" ] } @@ -34,7 +34,7 @@ }, { "type": "monstergroup", - "name": "GROUP_FOREST", + "id": "GROUP_FOREST", "monsters": [ { "monster": "mon_bear_smoky", @@ -47,7 +47,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SWAMP", + "id": "GROUP_SWAMP", "monsters": [ { "monster": "mon_bear_smoky", @@ -60,7 +60,7 @@ }, { "type": "monstergroup", - "name": "GROUP_RIVER", + "id": "GROUP_RIVER", "monsters": [ { "monster": "mon_bear_smoky", @@ -73,7 +73,7 @@ }, { "type": "monstergroup", - "name": "GROUP_CAVE", + "id": "GROUP_CAVE", "monsters": [ { "monster": "mon_bear_smoky", "weight": 10, "cost_multiplier": 0, "starts": 672 }, { "monster": "mon_bear_smoky", "weight": 100, "cost_multiplier": 0, "conditions": [ "WINTER" ] } @@ -82,13 +82,13 @@ }, { "type": "monstergroup", - "name": "GROUP_SEWAGE_TREATMENT", + "id": "GROUP_SEWAGE_TREATMENT", "is_animal": true, "monsters": [ { "monster": "mon_gator", "weight": 40, "cost_multiplier": 2, "pack_size": [ 1, 2 ] } ] }, { "type": "monstergroup", - "name": "GROUP_NUCLEAR_PLANT_BEASTS", + "id": "GROUP_NUCLEAR_PLANT_BEASTS", "is_animal": true, "monsters": [ { "monster": "mon_gator", "weight": 25, "cost_multiplier": 2 } ] } diff --git a/data/mods/Defense_Mode/mapgen/hospital.json b/data/mods/Defense_Mode/mapgen/hospital.json index 491d0c1452521..1052fc21cb995 100644 --- a/data/mods/Defense_Mode/mapgen/hospital.json +++ b/data/mods/Defense_Mode/mapgen/hospital.json @@ -7,7 +7,6 @@ [ "dm_hospital_6", "dm_hospital_5", "dm_hospital_4" ], [ "dm_hospital_9", "dm_hospital_8", "dm_hospital_7" ] ], - "weight": 250, "object": { "fill_ter": "t_linoleum_white", "rows": [ diff --git a/data/mods/Defense_Mode/monstergroups.json b/data/mods/Defense_Mode/monstergroups.json index 10618f0b164a8..5aec00cc23415 100644 --- a/data/mods/Defense_Mode/monstergroups.json +++ b/data/mods/Defense_Mode/monstergroups.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_TRIFFID_DM", + "id": "GROUP_TRIFFID_DM", "default": "mon_triffid", "monsters": [ { "monster": "mon_triffid", "weight": 205 }, @@ -12,7 +12,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SPIDER_DM", + "id": "GROUP_SPIDER_DM", "default": "mon_spider_web_dm", "monsters": [ { "monster": "mon_spider_cellar_giant_dm", "weight": 205 }, @@ -23,7 +23,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ROBOT_DM", + "id": "GROUP_ROBOT_DM", "monsters": [ { "monster": "mon_manhack", "weight": 515, "cost_multiplier": 0 }, { "monster": "mon_skitterbot", "weight": 220, "cost_multiplier": 0 }, @@ -32,7 +32,7 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHER_DM", + "id": "GROUP_NETHER_DM", "default": "mon_blank", "monsters": [ { "monster": "mon_blank", "weight": 135, "cost_multiplier": 0 }, @@ -44,14 +44,14 @@ }, { "type": "monstergroup", - "name": "GROUP_NEMESIS", + "id": "GROUP_NEMESIS", "default": "mon_zombie_nemesis", "//": "nemesis squad, exists here to remove them from Defense Mode", "monsters": [ { "monster": "mon_zombie", "weight": 1000, "cost_multiplier": 0 } ] }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE", + "id": "GROUP_ZOMBIE", "monsters": [ { "monster": "mon_zombie", "weight": 10, "cost_multiplier": 7, "pack_size": [ 5, 20 ] }, { "monster": "mon_zombie", "weight": 10, "cost_multiplier": 13, "pack_size": [ 15, 40 ] }, diff --git a/data/mods/DinoMod/monstergroups/dinosaur.json b/data/mods/DinoMod/monstergroups/dinosaur.json index adf5e3da8b402..af67d696043c5 100644 --- a/data/mods/DinoMod/monstergroups/dinosaur.json +++ b/data/mods/DinoMod/monstergroups/dinosaur.json @@ -2,7 +2,7 @@ { "//": "These groups are called by the exhibit, zoo, and science basements, and NPC missions", "type": "monstergroup", - "name": "GROUP_DINOSAUR", + "id": "GROUP_DINOSAUR", "monsters": [ { "group": "GROUP_WILDERNESS_FOREST_DINO", "weight": 250 }, { "group": "GROUP_DINOSAUR_SAUROPODS_WILDERNESS", "weight": 150 }, @@ -14,7 +14,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_SOUTH_AMERICA", + "id": "GROUP_DINOSAUR_SOUTH_AMERICA", "monsters": [ { "monster": "mon_eoraptor", "weight": 20, "cost_multiplier": 0, "pack_size": [ 1, 2 ] }, { "monster": "mon_giganotosaurus", "weight": 10, "cost_multiplier": 40, "pack_size": [ 1, 2 ] }, @@ -23,7 +23,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_ASIA", + "id": "GROUP_DINOSAUR_ASIA", "monsters": [ { "monster": "mon_qianzhousaurus", "weight": 200, "cost_multiplier": 40, "pack_size": [ 1, 2 ] }, { "monster": "mon_therizinosaurus", "weight": 200, "cost_multiplier": 30, "pack_size": [ 1, 2 ] }, @@ -32,7 +32,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_EUROPE", + "id": "GROUP_DINOSAUR_EUROPE", "monsters": [ { "monster": "mon_compsognathus", "weight": 100, "cost_multiplier": 40, "pack_size": [ 1, 2 ] }, { "monster": "mon_iguanodon", "weight": 100, "pack_size": [ 1, 2 ] } @@ -40,7 +40,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_HARMLESS", + "id": "GROUP_DINOSAUR_HARMLESS", "monsters": [ { "monster": "mon_compsognathus", "weight": 100, "pack_size": [ 1, 2 ] }, { "monster": "mon_nedcolbertia", "weight": 50, "pack_size": [ 1, 2 ] }, @@ -71,7 +71,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_DANGEROUS", + "id": "GROUP_DINOSAUR_DANGEROUS", "monsters": [ { "monster": "mon_tawa", "weight": 200, "cost_multiplier": 5, "pack_size": [ 1, 2 ] }, { "monster": "mon_coelophysis", "weight": 200, "cost_multiplier": 5, "pack_size": [ 1, 2 ] }, @@ -90,7 +90,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_HARMLESS_HATCHLING", + "id": "GROUP_DINOSAUR_HARMLESS_HATCHLING", "monsters": [ { "monster": "mon_compsognathus_hatchling", "weight": 20, "cost_multiplier": 0, "pack_size": [ 1, 2 ] }, { "monster": "mon_nedcolbertia_hatchling", "weight": 10, "cost_multiplier": 0, "pack_size": [ 1, 2 ] }, @@ -166,7 +166,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_DANGEROUS_HATCHLING", + "id": "GROUP_DINOSAUR_DANGEROUS_HATCHLING", "monsters": [ { "monster": "mon_tawa_hatchling", "weight": 4, "cost_multiplier": 5, "pack_size": [ 1, 2 ] }, { "monster": "mon_coelophysis_hatchling", "weight": 4, "cost_multiplier": 5, "pack_size": [ 1, 2 ] }, @@ -195,7 +195,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_HARMLESS_JUVENILE", + "id": "GROUP_DINOSAUR_HARMLESS_JUVENILE", "monsters": [ { "monster": "mon_nedcolbertia_juvenile", "weight": 50, "cost_multiplier": 0, "pack_size": [ 1, 2 ] }, { "monster": "mon_gallimimus_juvenile", "weight": 50, "cost_multiplier": 0, "pack_size": [ 1, 2 ] }, @@ -237,7 +237,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_DANGEROUS_JUVENILE", + "id": "GROUP_DINOSAUR_DANGEROUS_JUVENILE", "monsters": [ { "monster": "mon_dilophosaurus_juvenile", "weight": 15, "cost_multiplier": 10, "pack_size": [ 1, 2 ] }, { "monster": "mon_ceratosaurus_juvenile", "cost_multiplier": 30, "pack_size": [ 1, 2 ] }, @@ -252,7 +252,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_MEGA_HERBIVORE", + "id": "GROUP_DINOSAUR_MEGA_HERBIVORE", "monsters": [ { "monster": "mon_issi", "weight": 5, "cost_multiplier": 25, "pack_size": [ 1, 2 ] }, { "monster": "mon_haplocanthosaurus", "weight": 5, "cost_multiplier": 25, "pack_size": [ 1, 2 ] }, @@ -300,7 +300,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_MEGA_CARNIVORE", + "id": "GROUP_DINOSAUR_MEGA_CARNIVORE", "monsters": [ { "monster": "mon_spinosaurus", "weight": 50, "cost_multiplier": 40 }, { "monster": "mon_torvosaurus", "weight": 50, "cost_multiplier": 40 }, @@ -316,7 +316,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_FLY", + "id": "GROUP_DINOSAUR_FLY", "monsters": [ { "monster": "mon_dimorphodon", "weight": 10, "cost_multiplier": 0, "pack_size": [ 2, 4 ] }, { "monster": "mon_pteranodon", "weight": 935, "cost_multiplier": 0 }, @@ -326,7 +326,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_SWIM", + "id": "GROUP_DINOSAUR_SWIM", "monsters": [ { "monster": "mon_mosasaurus", "weight": 4, "cost_multiplier": 60 }, { "monster": "mon_spinosaurus", "weight": 4, "cost_multiplier": 40 } @@ -334,7 +334,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_PREDATOR_STREAM", + "id": "GROUP_DINOSAUR_PREDATOR_STREAM", "monsters": [ { "monster": "mon_tawa", "pack_size": [ 4, 8 ] }, { "monster": "mon_coelophysis", "pack_size": [ 4, 8 ] }, @@ -347,7 +347,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_PREDATOR_SWAMP", + "id": "GROUP_DINOSAUR_PREDATOR_SWAMP", "monsters": [ { "monster": "mon_dryptosaurus", "cost_multiplier": 35 }, { "monster": "mon_appalachiosaurus", "cost_multiplier": 35 }, @@ -367,7 +367,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_ZREDATOR_STREAM", + "id": "GROUP_DINOSAUR_ZREDATOR_STREAM", "monsters": [ { "monster": "mon_zeratosaurus", "cost_multiplier": 35 }, { "monster": "mon_zorvosaurus", "cost_multiplier": 35 }, @@ -378,7 +378,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_ZREDATOR_SWAMP", + "id": "GROUP_DINOSAUR_ZREDATOR_SWAMP", "monsters": [ { "monster": "mon_zryptosaurus", "cost_multiplier": 35 }, { "monster": "mon_zappalachiosaurus", "cost_multiplier": 35 }, @@ -396,7 +396,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_SAUROPODS_WILDERNESS", + "id": "GROUP_DINOSAUR_SAUROPODS_WILDERNESS", "monsters": [ { "monster": "mon_sarahsaurus", "weight": 10, "cost_multiplier": 10, "pack_size": [ 4, 12 ] }, { "monster": "mon_anchisaurus", "weight": 10, "cost_multiplier": 10, "pack_size": [ 4, 12 ] }, @@ -414,7 +414,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_ZAUROPODS_WILDERNESS", + "id": "GROUP_DINOSAUR_ZAUROPODS_WILDERNESS", "monsters": [ { "monster": "mon_zarahsaurus", "weight": 2, "cost_multiplier": 30, "pack_size": [ 4, 12 ] }, { "monster": "mon_zanchisaurus", "weight": 2, "cost_multiplier": 30, "pack_size": [ 4, 12 ] }, @@ -431,7 +431,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_HADROSAURS_WILDERNESS", + "id": "GROUP_DINOSAUR_HADROSAURS_WILDERNESS", "monsters": [ { "monster": "mon_tenontosaurus", "weight": 20, "pack_size": [ 4, 12 ] }, { "monster": "mon_dryosaurus", "weight": 20, "pack_size": [ 4, 12 ] }, @@ -451,7 +451,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_ZADROSAURS_WILDERNESS", + "id": "GROUP_DINOSAUR_ZADROSAURS_WILDERNESS", "monsters": [ { "monster": "mon_zamptosaurus", "weight": 5, "cost_multiplier": 10, "pack_size": [ 4, 12 ] }, { "monster": "mon_zeolambia", "weight": 5, "cost_multiplier": 20, "pack_size": [ 4, 12 ] }, @@ -469,7 +469,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_CAVE", + "id": "GROUP_DINOSAUR_CAVE", "is_animal": true, "monsters": [ { "monster": "mon_compsognathus", "weight": 400, "pack_size": [ 4, 12 ] }, diff --git a/data/mods/DinoMod/monstergroups/fungi.json b/data/mods/DinoMod/monstergroups/fungi.json index 3b9e35e581432..589ad2fea6c2d 100644 --- a/data/mods/DinoMod/monstergroups/fungi.json +++ b/data/mods/DinoMod/monstergroups/fungi.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_FUNGI_DINO", + "id": "GROUP_FUNGI_DINO", "monsters": [ { "monster": "mon_zilophosaurus_fungus", "starts": "3 days" }, { "monster": "mon_zeratosaurus_fungus", "starts": "3 days" }, @@ -86,12 +86,12 @@ }, { "type": "monstergroup", - "name": "GROUP_FUNGI_TOWER", + "id": "GROUP_FUNGI_TOWER", "monsters": [ { "group": "GROUP_FUNGI_DINO", "weight": 200 } ] }, { "type": "monstergroup", - "name": "GROUP_FUNGI_FLOWERS", + "id": "GROUP_FUNGI_FLOWERS", "monsters": [ { "group": "GROUP_FUNGI_DINO", "weight": 200 } ] } ] diff --git a/data/mods/DinoMod/monstergroups/lab.json b/data/mods/DinoMod/monstergroups/lab.json index 07715393aee60..99ad8b3124b82 100644 --- a/data/mods/DinoMod/monstergroups/lab.json +++ b/data/mods/DinoMod/monstergroups/lab.json @@ -1,12 +1,12 @@ [ { "type": "monstergroup", - "name": "GROUP_Exodii_Stowaway", + "id": "GROUP_Exodii_Stowaway", "monsters": [ { "group": "GROUP_BIO_DINO_HERB", "weight": 200 }, { "group": "GROUP_BIO_DINO_PRED", "weight": 200 } ] }, { "type": "monstergroup", - "name": "GROUP_DINOLAB", + "id": "GROUP_DINOLAB", "monsters": [ { "group": "GROUP_BIO_DINO_HERB", "weight": 300 }, { "group": "GROUP_BIO_DINO_PRED", "weight": 300 }, @@ -15,12 +15,12 @@ }, { "type": "monstergroup", - "name": "GROUP_LAB_CYBORG", + "id": "GROUP_LAB_CYBORG", "monsters": [ { "group": "GROUP_BIO_DINO_PRED", "weight": 300 } ] }, { "type": "monstergroup", - "name": "GROUP_BIO_DINO_PRED", + "id": "GROUP_BIO_DINO_PRED", "monsters": [ { "monster": "mon_spinosaurus", "weight": 100, "cost_multiplier": 20, "starts": "3 days", "ends": "28 days" }, { "monster": "mon_zpinosaurus", "weight": 25, "cost_multiplier": 30, "starts": "3 days" }, @@ -111,7 +111,7 @@ }, { "type": "monstergroup", - "name": "GROUP_BIO_DINO_HERB", + "id": "GROUP_BIO_DINO_HERB", "monsters": [ { "monster": "mon_nedcolbertia_bio_op", "weight": 100, "cost_multiplier": 10, "ends": "28 days" }, { "monster": "mon_zedcolbertia_bio_op", "weight": 25, "cost_multiplier": 20, "starts": "3 days" }, diff --git a/data/mods/DinoMod/monstergroups/misc.json b/data/mods/DinoMod/monstergroups/misc.json index 01dd0c7d57bd6..56feb197d4ec8 100644 --- a/data/mods/DinoMod/monstergroups/misc.json +++ b/data/mods/DinoMod/monstergroups/misc.json @@ -1,17 +1,17 @@ [ { "type": "monstergroup", - "name": "GROUP_SUBWAY", + "id": "GROUP_SUBWAY", "monsters": [ { "group": "GROUP_SEWER_DINO", "weight": 200 } ] }, { "type": "monstergroup", - "name": "GROUP_SUBWAY_CITY", + "id": "GROUP_SUBWAY_CITY", "monsters": [ { "group": "GROUP_SEWER_ZINO", "weight": 200 } ] }, { "type": "monstergroup", - "name": "GROUP_SUBWAY_LAB", + "id": "GROUP_SUBWAY_LAB", "monsters": [ { "group": "GROUP_BIO_DINO_HERB", "weight": 100 }, { "group": "GROUP_BIO_DINO_PRED", "weight": 100 }, @@ -21,7 +21,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SAFE", + "id": "GROUP_SAFE", "is_safe": true, "monsters": [ { "monster": "mon_nedcolbertia", "weight": 50, "pack_size": [ 4, 8 ] }, @@ -40,7 +40,7 @@ }, { "type": "monstergroup", - "name": "DUMP_ANIMALS", + "id": "DUMP_ANIMALS", "monsters": [ { "monster": "mon_compsognathus", "weight": 100 }, { "monster": "mon_anzu", "weight": 50 }, @@ -50,7 +50,7 @@ }, { "type": "monstergroup", - "name": "GROUP_PEST", + "id": "GROUP_PEST", "is_animal": true, "monsters": [ { "monster": "mon_compsognathus", "weight": 50 }, @@ -61,13 +61,13 @@ }, { "type": "monstergroup", - "name": "GROUP_SEWER", + "id": "GROUP_SEWER", "is_animal": true, "monsters": [ { "group": "GROUP_SEWER_DINO", "weight": 200 } ] }, { "type": "monstergroup", - "name": "GROUP_SEWER_DINO", + "id": "GROUP_SEWER_DINO", "monsters": [ { "monster": "mon_tawa", "weight": 100, "cost_multiplier": 5, "pack_size": [ 4, 8 ] }, { "monster": "mon_coelophysis", "weight": 100, "cost_multiplier": 5, "pack_size": [ 4, 8 ] }, @@ -96,7 +96,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SEWER_ZINO", + "id": "GROUP_SEWER_ZINO", "monsters": [ { "monster": "mon_zilophosaurus", "weight": 2, "cost_multiplier": 10, "pack_size": [ 1, 2 ], "starts": 72 }, { "monster": "mon_zilophosaurus", "weight": 2, "cost_multiplier": 10, "pack_size": [ 1, 2 ], "starts": 168 }, @@ -114,7 +114,7 @@ }, { "type": "monstergroup", - "name": "GROUP_CAMP_HUNTING", + "id": "GROUP_CAMP_HUNTING", "//": "Special group with hardcoded reference in basecamp::hunting_results. Does not actually spawn anywhere, used solely to determine returns from camp hunting mission.", "//1": "No heavier than 21 kg.", "//2": "This group always has a chance of being the result, regardless of mission type.", @@ -122,7 +122,7 @@ }, { "type": "monstergroup", - "name": "GROUP_CAMP_TRAPPING", + "id": "GROUP_CAMP_TRAPPING", "//": "Special group with hardcoded reference in basecamp::hunting_results. Does not actually spawn anywhere, used solely to determine returns from camp hunting mission.", "//1": "No heavier than 10 kg.", "//2": "This group can only be picked from when the trapping mission is used, in addition to GROUP_CAMP_HUNTING.", @@ -138,7 +138,7 @@ }, { "type": "monstergroup", - "name": "GROUP_CAMP_HUNTING_LARGE", + "id": "GROUP_CAMP_HUNTING_LARGE", "//": "Special group with hardcoded reference in basecamp::hunting_results. Does not actually spawn anywhere, used solely to determine returns from camp hunting mission.", "//1": "No heavier than 400 kg.", "//2": "This group can only be picked from when the hunt large animals mission is used, in addition to GROUP_CAMP_HUNTING.", diff --git a/data/mods/DinoMod/monstergroups/monstergroups_egg.json b/data/mods/DinoMod/monstergroups/monstergroups_egg.json index 6bcf9af4c3808..994be72793544 100644 --- a/data/mods/DinoMod/monstergroups/monstergroups_egg.json +++ b/data/mods/DinoMod/monstergroups/monstergroups_egg.json @@ -1,6 +1,6 @@ [ { - "name": "GROUP_EGG_DINO", + "id": "GROUP_EGG_DINO", "//": "North American dinos not theropods at least 50 kg and not largest", "type": "monstergroup", "monsters": [ @@ -50,7 +50,7 @@ ] }, { - "name": "GROUP_EGG_DINO_SMALL", + "id": "GROUP_EGG_DINO_SMALL", "//": "North American dinos not theropods smaller than 50 kg", "type": "monstergroup", "monsters": [ @@ -63,7 +63,7 @@ ] }, { - "name": "GROUP_EGG_DINO_LARGE", + "id": "GROUP_EGG_DINO_LARGE", "//": "North American dinos not theropods largest", "type": "monstergroup", "monsters": [ @@ -78,7 +78,7 @@ ] }, { - "name": "GROUP_EGG_THEROPOD", + "id": "GROUP_EGG_THEROPOD", "//": "North American theropod dinos at least 50 kg and not largest", "type": "monstergroup", "monsters": [ @@ -106,7 +106,7 @@ ] }, { - "name": "GROUP_EGG_THEROPOD_SMALL", + "id": "GROUP_EGG_THEROPOD_SMALL", "//": "North American theropod dinos smaller than 50 kg", "type": "monstergroup", "monsters": [ @@ -118,13 +118,13 @@ ] }, { - "name": "GROUP_EGG_THEROPOD_LARGE", + "id": "GROUP_EGG_THEROPOD_LARGE", "//": "North American theropod dinos largest", "type": "monstergroup", "monsters": [ { "monster": "mon_spinosaurus_hatchling", "weight": 1 }, { "monster": "mon_tyrannosaurus_hatchling", "weight": 8 } ] }, { - "name": "GROUP_EGG_SNAKE", + "id": "GROUP_EGG_SNAKE", "type": "monstergroup", "monsters": [ { "monster": "mon_dimorphodon_hatchling", "weight": 2 }, diff --git a/data/mods/DinoMod/monstergroups/wilderness.json b/data/mods/DinoMod/monstergroups/wilderness.json index 2289a5bc30081..55aed44dac5ff 100644 --- a/data/mods/DinoMod/monstergroups/wilderness.json +++ b/data/mods/DinoMod/monstergroups/wilderness.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_FOREST", + "id": "GROUP_FOREST", "is_animal": true, "monsters": [ { "group": "GROUP_WILDERNESS_FOREST_DINO", "weight": 150 }, @@ -10,7 +10,7 @@ }, { "type": "monstergroup", - "name": "GROUP_WILDERNESS_FOREST_DINO", + "id": "GROUP_WILDERNESS_FOREST_DINO", "is_animal": true, "monsters": [ { "monster": "mon_nedcolbertia", "weight": 5, "pack_size": [ 4, 8 ] }, @@ -56,7 +56,7 @@ }, { "type": "monstergroup", - "name": "GROUP_WILDERNESS_FOREST_SAUROPODS", + "id": "GROUP_WILDERNESS_FOREST_SAUROPODS", "is_animal": true, "monsters": [ { "monster": "mon_sarahsaurus", "weight": 1, "pack_size": [ 4, 12 ] }, @@ -75,7 +75,7 @@ }, { "type": "monstergroup", - "name": "GROUP_RIVER", + "id": "GROUP_RIVER", "monsters": [ { "monster": "mon_pteranodon", "weight": 25, "cost_multiplier": 20, "pack_size": [ 2, 4 ] }, { "monster": "mon_quetzalcoatlus", "weight": 4, "cost_multiplier": 30, "pack_size": [ 1, 2 ] }, @@ -98,7 +98,7 @@ }, { "type": "monstergroup", - "name": "GROUP_STREAM", + "id": "GROUP_STREAM", "monsters": [ { "group": "GROUP_DINOSAUR_PREDATOR_STREAM", "weight": 10, "starts": "3 days" }, { "group": "GROUP_DINOSAUR_PREDATOR_STREAM", "weight": 20, "starts": "3 days", "ends": "7 days" }, @@ -140,7 +140,7 @@ }, { "type": "monstergroup", - "name": "GROUP_OCEAN_SHORE", + "id": "GROUP_OCEAN_SHORE", "default": "mon_null", "is_animal": true, "monsters": [ @@ -163,7 +163,7 @@ }, { "type": "monstergroup", - "name": "GROUP_OCEAN_DEEP", + "id": "GROUP_OCEAN_DEEP", "default": "mon_null", "is_animal": true, "monsters": [ @@ -186,7 +186,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SWAMP", + "id": "GROUP_SWAMP", "monsters": [ { "group": "GROUP_DINOSAUR_PREDATOR_SWAMP", "weight": 20, "starts": "3 days" }, { "group": "GROUP_DINOSAUR_PREDATOR_SWAMP", "weight": 20, "starts": "3 days", "ends": "7 days" }, @@ -208,25 +208,25 @@ }, { "type": "monstergroup", - "name": "GROUP_PARK_ANIMAL", + "id": "GROUP_PARK_ANIMAL", "is_animal": true, "monsters": [ { "monster": "mon_dimorphodon", "weight": 50, "cost_multiplier": 0, "pack_size": [ 2, 4 ], "conditions": [ "DAY" ] } ] }, { "type": "monstergroup", - "name": "GROUP_POND_BIRD", + "id": "GROUP_POND_BIRD", "is_animal": true, "monsters": [ { "monster": "mon_dimorphodon", "weight": 50, "cost_multiplier": 0, "pack_size": [ 2, 4 ] } ] }, { "type": "monstergroup", - "name": "GROUP_CAVE", + "id": "GROUP_CAVE", "is_animal": true, "monsters": [ { "group": "GROUP_DINOSAUR_CAVE", "weight": 200 } ] }, { "type": "monstergroup", - "name": "GROUP_ROOF_ANIMAL", + "id": "GROUP_ROOF_ANIMAL", "is_animal": true, "monsters": [ { "monster": "mon_albertonykus", "weight": 25, "pack_size": [ 1, 2 ], "conditions": [ "DUSK", "DAY", "DAWN" ] }, diff --git a/data/mods/DinoMod/monstergroups/zinosaur.json b/data/mods/DinoMod/monstergroups/zinosaur.json index 0fb29419d2ef5..fe17755409767 100644 --- a/data/mods/DinoMod/monstergroups/zinosaur.json +++ b/data/mods/DinoMod/monstergroups/zinosaur.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_DINOSAUR_ZOMBIE", + "id": "GROUP_DINOSAUR_ZOMBIE", "//": "Random North American dino zombie list", "monsters": [ { "monster": "mon_zilophosaurus", "weight": 10, "cost_multiplier": 20, "starts": "3 days", "pack_size": [ 1, 2 ] }, @@ -88,7 +88,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DINOSAUR_ZOMBIE_SCORCHED", + "id": "GROUP_DINOSAUR_ZOMBIE_SCORCHED", "//": "Random North American scorched dino zombie list", "monsters": [ { "monster": "mon_zilophosaurus_scorched", "weight": 10, "cost_multiplier": 20, "starts": "3 days" }, @@ -166,7 +166,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zilophosaurus_UPGRADE", + "id": "GROUP_zilophosaurus_UPGRADE", "monsters": [ { "monster": "mon_silophosaurus", "weight": 400 }, { "monster": "mon_zilophosaurus_shady", "weight": 150 }, @@ -176,7 +176,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zeratosaurus_UPGRADE", + "id": "GROUP_zeratosaurus_UPGRADE", "monsters": [ { "monster": "mon_seratosaurus", "weight": 400 }, { "monster": "mon_zeratosaurus_shady", "weight": 150 }, @@ -186,7 +186,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zpinosaurus_UPGRADE", + "id": "GROUP_zpinosaurus_UPGRADE", "monsters": [ { "monster": "mon_skinosaurus", "weight": 400 }, { "monster": "mon_zpinosaurus_shady", "weight": 300 }, @@ -195,7 +195,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zorvosaurus_UPGRADE", + "id": "GROUP_zorvosaurus_UPGRADE", "monsters": [ { "monster": "mon_sorvosaurus", "weight": 400 }, { "monster": "mon_zorvosaurus_shady", "weight": 300 }, @@ -204,7 +204,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zallosaurus_UPGRADE", + "id": "GROUP_zallosaurus_UPGRADE", "monsters": [ { "monster": "mon_sallosaurus", "weight": 400 }, { "monster": "mon_zallosaurus_shady", "weight": 300 }, @@ -213,7 +213,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zacrocanthosaurus_UPGRADE", + "id": "GROUP_zacrocanthosaurus_UPGRADE", "monsters": [ { "monster": "mon_sacrocanthosaurus", "weight": 400 }, { "monster": "mon_zacrocanthosaurus_shady", "weight": 300 }, @@ -222,7 +222,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ziganotosaurus_UPGRADE", + "id": "GROUP_ziganotosaurus_UPGRADE", "monsters": [ { "monster": "mon_siganotosaurus", "weight": 400 }, { "monster": "mon_ziganotosaurus_shady", "weight": 300 }, @@ -231,7 +231,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ziats_UPGRADE", + "id": "GROUP_ziats_UPGRADE", "monsters": [ { "monster": "mon_skiats", "weight": 400 }, { "monster": "mon_ziats_shady", "weight": 300 }, @@ -240,7 +240,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zryptosaurus_UPGRADE", + "id": "GROUP_zryptosaurus_UPGRADE", "monsters": [ { "monster": "mon_sryptosaurus", "weight": 400 }, { "monster": "mon_zryptosaurus_shady", "weight": 300 }, @@ -249,7 +249,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zappalachiosaurus_UPGRADE", + "id": "GROUP_zappalachiosaurus_UPGRADE", "monsters": [ { "monster": "mon_sappalachiosaurus", "weight": 400 }, { "monster": "mon_zappalachiosaurus_shady", "weight": 300 }, @@ -258,7 +258,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zorgosaurus_UPGRADE", + "id": "GROUP_zorgosaurus_UPGRADE", "monsters": [ { "monster": "mon_sorgosaurus", "weight": 400 }, { "monster": "mon_zorgosaurus_shady", "weight": 300 }, @@ -267,7 +267,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zalbertosaurus_UPGRADE", + "id": "GROUP_zalbertosaurus_UPGRADE", "monsters": [ { "monster": "mon_salbertosaurus", "weight": 400 }, { "monster": "mon_zalbertosaurus_shady", "weight": 300 }, @@ -276,7 +276,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zianzhousaurus_UPGRADE", + "id": "GROUP_zianzhousaurus_UPGRADE", "monsters": [ { "monster": "mon_sianzhousaurus", "weight": 400 }, { "monster": "mon_zianzhousaurus_shady", "weight": 300 }, @@ -285,7 +285,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zanuqsaurus_UPGRADE", + "id": "GROUP_zanuqsaurus_UPGRADE", "monsters": [ { "monster": "mon_sanuqsaurus", "weight": 400 }, { "monster": "mon_zanuqsaurus_shady", "weight": 300 }, @@ -294,7 +294,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zaspletosaurus_UPGRADE", + "id": "GROUP_zaspletosaurus_UPGRADE", "monsters": [ { "monster": "mon_saspletosaurus", "weight": 400 }, { "monster": "mon_zaspletosaurus_shady", "weight": 300 }, @@ -303,7 +303,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zyrannosaurus_UPGRADE", + "id": "GROUP_zyrannosaurus_UPGRADE", "monsters": [ { "monster": "mon_syrannosaurus", "weight": 400 }, { "monster": "mon_zyrannosaurus_shady", "weight": 300 }, @@ -312,7 +312,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zedcolbertia_UPGRADE", + "id": "GROUP_zedcolbertia_UPGRADE", "monsters": [ { "monster": "mon_sedcolbertia", "weight": 400 }, { "monster": "mon_zedcolbertia_shady", "weight": 300 }, @@ -321,7 +321,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zallimimus_UPGRADE", + "id": "GROUP_zallimimus_UPGRADE", "monsters": [ { "monster": "mon_sallimimus", "weight": 400 }, { "monster": "mon_zallimimus_shady", "weight": 300 }, @@ -330,7 +330,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ztruthiomimus_UPGRADE", + "id": "GROUP_ztruthiomimus_UPGRADE", "monsters": [ { "monster": "mon_sktruthiomimus", "weight": 400 }, { "monster": "mon_ztruthiomimus_shady", "weight": 300 }, @@ -339,7 +339,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zornithomimus_UPGRADE", + "id": "GROUP_zornithomimus_UPGRADE", "monsters": [ { "monster": "mon_sornithomimus", "weight": 400 }, { "monster": "mon_zornithomimus_shady", "weight": 300 }, @@ -348,7 +348,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zalcarius_UPGRADE", + "id": "GROUP_zalcarius_UPGRADE", "monsters": [ { "monster": "mon_salcarius", "weight": 400 }, { "monster": "mon_zalcarius_shady", "weight": 300 }, @@ -357,7 +357,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zerizinosaurus_UPGRADE", + "id": "GROUP_zerizinosaurus_UPGRADE", "monsters": [ { "monster": "mon_serizinosaurus", "weight": 400 }, { "monster": "mon_zerizinosaurus_shady", "weight": 300 }, @@ -366,7 +366,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zothronychus_UPGRADE", + "id": "GROUP_zothronychus_UPGRADE", "monsters": [ { "monster": "mon_sothronychus", "weight": 400 }, { "monster": "mon_zothronychus_shady", "weight": 300 }, @@ -375,7 +375,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zanzu_UPGRADE", + "id": "GROUP_zanzu_UPGRADE", "monsters": [ { "monster": "mon_sanzu", "weight": 400 }, { "monster": "mon_zanzu_shady", "weight": 300 }, @@ -384,7 +384,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zeinonychus_UPGRADE", + "id": "GROUP_zeinonychus_UPGRADE", "monsters": [ { "monster": "mon_seinonychus", "weight": 400 }, { "monster": "mon_zeinonychus_shady", "weight": 300 }, @@ -393,7 +393,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zutahraptor_UPGRADE", + "id": "GROUP_zutahraptor_UPGRADE", "monsters": [ { "monster": "mon_sutahraptor", "weight": 400 }, { "monster": "mon_zutahraptor_shady", "weight": 300 }, @@ -402,122 +402,122 @@ }, { "type": "monstergroup", - "name": "GROUP_zarahsaurus_UPGRADE", + "id": "GROUP_zarahsaurus_UPGRADE", "monsters": [ { "monster": "mon_skarahsaurus", "weight": 600 }, { "monster": "mon_zarahsaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zanchisaurus_UPGRADE", + "id": "GROUP_zanchisaurus_UPGRADE", "monsters": [ { "monster": "mon_sanchisaurus", "weight": 600 }, { "monster": "mon_zanchisaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zissi_UPGRADE", + "id": "GROUP_zissi_UPGRADE", "monsters": [ { "monster": "mon_sissi", "weight": 600 }, { "monster": "mon_zissi_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zaplocanthosaurus_UPGRADE", + "id": "GROUP_zaplocanthosaurus_UPGRADE", "monsters": [ { "monster": "mon_saplocanthosaurus", "weight": 600 }, { "monster": "mon_zaplocanthosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zamargasaurus_UPGRADE", + "id": "GROUP_zamargasaurus_UPGRADE", "monsters": [ { "monster": "mon_samargasaurus", "weight": 600 }, { "monster": "mon_zamargasaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zapatosaurus_UPGRADE", + "id": "GROUP_zapatosaurus_UPGRADE", "monsters": [ { "monster": "mon_sapatosaurus", "weight": 600 }, { "monster": "mon_zapatosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zrontosaurus_UPGRADE", + "id": "GROUP_zrontosaurus_UPGRADE", "monsters": [ { "monster": "mon_srontosaurus", "weight": 600 }, { "monster": "mon_zrontosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_ziplodocus_UPGRADE", + "id": "GROUP_ziplodocus_UPGRADE", "monsters": [ { "monster": "mon_siplodocus", "weight": 600 }, { "monster": "mon_ziplodocus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zarosaurus_UPGRADE", + "id": "GROUP_zarosaurus_UPGRADE", "monsters": [ { "monster": "mon_sarosaurus", "weight": 600 }, { "monster": "mon_zarosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zamarasaurus_UPGRADE", + "id": "GROUP_zamarasaurus_UPGRADE", "monsters": [ { "monster": "mon_samarasaurus", "weight": 600 }, { "monster": "mon_zamarasaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zrachiosaurus_UPGRADE", + "id": "GROUP_zrachiosaurus_UPGRADE", "monsters": [ { "monster": "mon_srachiosaurus", "weight": 600 }, { "monster": "mon_zrachiosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zastrodon_UPGRADE", + "id": "GROUP_zastrodon_UPGRADE", "monsters": [ { "monster": "mon_sastrodon", "weight": 600 }, { "monster": "mon_zastrodon_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zalamosaurus_UPGRADE", + "id": "GROUP_zalamosaurus_UPGRADE", "monsters": [ { "monster": "mon_salamosaurus", "weight": 600 }, { "monster": "mon_zalamosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_ztegosaurus_UPGRADE", + "id": "GROUP_ztegosaurus_UPGRADE", "monsters": [ { "monster": "mon_sktegosaurus", "weight": 600 }, { "monster": "mon_ztegosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zesperosaurus_UPGRADE", + "id": "GROUP_zesperosaurus_UPGRADE", "monsters": [ { "monster": "mon_sesperosaurus", "weight": 600 }, { "monster": "mon_zesperosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zastonia_UPGRADE", + "id": "GROUP_zastonia_UPGRADE", "monsters": [ { "monster": "mon_sastonia", "weight": 600 }, { "monster": "mon_zastonia_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zargoyleosaurus_UPGRADE", + "id": "GROUP_zargoyleosaurus_UPGRADE", "monsters": [ { "monster": "mon_sargoyleosaurus", "weight": 600 }, { "monster": "mon_zargoyleosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zauropelta_UPGRADE", + "id": "GROUP_zauropelta_UPGRADE", "monsters": [ { "monster": "mon_skauropelta", "weight": 600 }, { "monster": "mon_zauropelta_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zodosaurus_UPGRADE", + "id": "GROUP_zodosaurus_UPGRADE", "monsters": [ { "monster": "mon_sodosaurus", "weight": 600 }, { "monster": "mon_zodosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zanoplosaurus_UPGRADE", + "id": "GROUP_zanoplosaurus_UPGRADE", "monsters": [ { "monster": "mon_sanoplosaurus", "weight": 600 }, { "monster": "mon_zanoplosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zedmontonia_UPGRADE", + "id": "GROUP_zedmontonia_UPGRADE", "monsters": [ { "monster": "mon_sedmontonia", "weight": 600 }, { "monster": "mon_zedmontonia_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zzuul_UPGRADE", + "id": "GROUP_zzuul_UPGRADE", "monsters": [ { "monster": "mon_suul", "weight": 600 }, { "monster": "mon_zzuul_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zyoplosaurus_UPGRADE", + "id": "GROUP_zyoplosaurus_UPGRADE", "monsters": [ { "monster": "mon_syoplosaurus", "weight": 600 }, { "monster": "mon_zyoplosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zankylosaurus_UPGRADE", + "id": "GROUP_zankylosaurus_UPGRADE", "monsters": [ { "monster": "mon_sankylosaurus", "weight": 400 }, { "monster": "mon_zankylosaurus_shady", "weight": 300 }, @@ -526,162 +526,162 @@ }, { "type": "monstergroup", - "name": "GROUP_zuoplocephalus_UPGRADE", + "id": "GROUP_zuoplocephalus_UPGRADE", "monsters": [ { "monster": "mon_suoplocephalus", "weight": 600 }, { "monster": "mon_zuoplocephalus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zcolosaurus_UPGRADE", + "id": "GROUP_zcolosaurus_UPGRADE", "monsters": [ { "monster": "mon_skcolosaurus", "weight": 600 }, { "monster": "mon_zcolosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zenontosaurus_UPGRADE", + "id": "GROUP_zenontosaurus_UPGRADE", "monsters": [ { "monster": "mon_senontosaurus", "weight": 600 }, { "monster": "mon_zenontosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zryosaurus_UPGRADE", + "id": "GROUP_zryosaurus_UPGRADE", "monsters": [ { "monster": "mon_sryosaurus", "weight": 600 }, { "monster": "mon_zryosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zamptosaurus_UPGRADE", + "id": "GROUP_zamptosaurus_UPGRADE", "monsters": [ { "monster": "mon_samptosaurus", "weight": 600 }, { "monster": "mon_zamptosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_ziguanodon_UPGRADE", + "id": "GROUP_ziguanodon_UPGRADE", "monsters": [ { "monster": "mon_siguanodon", "weight": 600 }, { "monster": "mon_ziguanodon_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zeolambia_UPGRADE", + "id": "GROUP_zeolambia_UPGRADE", "monsters": [ { "monster": "mon_seolambia", "weight": 600 }, { "monster": "mon_zeolambia_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zadrosaurus_UPGRADE", + "id": "GROUP_zadrosaurus_UPGRADE", "monsters": [ { "monster": "mon_sadrosaurus", "weight": 600 }, { "monster": "mon_zadrosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zaiasaura_UPGRADE", + "id": "GROUP_zaiasaura_UPGRADE", "monsters": [ { "monster": "mon_saiasaura", "weight": 600 }, { "monster": "mon_zaiasaura_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zryposaurus_UPGRADE", + "id": "GROUP_zryposaurus_UPGRADE", "monsters": [ { "monster": "mon_sryposaurus", "weight": 600 }, { "monster": "mon_zryposaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zrosaurolophus_UPGRADE", + "id": "GROUP_zrosaurolophus_UPGRADE", "monsters": [ { "monster": "mon_srosaurolophus", "weight": 600 }, { "monster": "mon_zrosaurolophus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zaurolophus_UPGRADE", + "id": "GROUP_zaurolophus_UPGRADE", "monsters": [ { "monster": "mon_skaurolophus", "weight": 600 }, { "monster": "mon_zaurolophus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zedmontosaurus_UPGRADE", + "id": "GROUP_zedmontosaurus_UPGRADE", "monsters": [ { "monster": "mon_sedmontosaurus", "weight": 600 }, { "monster": "mon_zedmontosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zarasaurolophus_UPGRADE", + "id": "GROUP_zarasaurolophus_UPGRADE", "monsters": [ { "monster": "mon_sarasaurolophus", "weight": 600 }, { "monster": "mon_zarasaurolophus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zambeosaurus_UPGRADE", + "id": "GROUP_zambeosaurus_UPGRADE", "monsters": [ { "monster": "mon_sambeosaurus", "weight": 600 }, { "monster": "mon_zambeosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zorythosaurus_UPGRADE", + "id": "GROUP_zorythosaurus_UPGRADE", "monsters": [ { "monster": "mon_sorythosaurus", "weight": 600 }, { "monster": "mon_zorythosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zypacrosaurus_UPGRADE", + "id": "GROUP_zypacrosaurus_UPGRADE", "monsters": [ { "monster": "mon_sypacrosaurus", "weight": 600 }, { "monster": "mon_zypacrosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zachycephalosaurus_UPGRADE", + "id": "GROUP_zachycephalosaurus_UPGRADE", "monsters": [ { "monster": "mon_sachycephalosaurus", "weight": 600 }, { "monster": "mon_zachycephalosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zeptoceratops_UPGRADE", + "id": "GROUP_zeptoceratops_UPGRADE", "monsters": [ { "monster": "mon_septoceratops", "weight": 600 }, { "monster": "mon_zeptoceratops_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zzuniceratops_UPGRADE", + "id": "GROUP_zzuniceratops_UPGRADE", "monsters": [ { "monster": "mon_suniceratops", "weight": 600 }, { "monster": "mon_zzuniceratops_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zokiceratops_UPGRADE", + "id": "GROUP_zokiceratops_UPGRADE", "monsters": [ { "monster": "mon_sokiceratops", "weight": 600 }, { "monster": "mon_zokiceratops_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_ztyracosaurus_UPGRADE", + "id": "GROUP_ztyracosaurus_UPGRADE", "monsters": [ { "monster": "mon_sktyracosaurus", "weight": 600 }, { "monster": "mon_ztyracosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zentrosaurus_UPGRADE", + "id": "GROUP_zentrosaurus_UPGRADE", "monsters": [ { "monster": "mon_sentrosaurus", "weight": 600 }, { "monster": "mon_zentrosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zeiniosaurus_UPGRADE", + "id": "GROUP_zeiniosaurus_UPGRADE", "monsters": [ { "monster": "mon_seiniosaurus", "weight": 600 }, { "monster": "mon_zeiniosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zachelousaurus_UPGRADE", + "id": "GROUP_zachelousaurus_UPGRADE", "monsters": [ { "monster": "mon_sachelousaurus", "weight": 600 }, { "monster": "mon_zachelousaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zachyrhinosaurus_UPGRADE", + "id": "GROUP_zachyrhinosaurus_UPGRADE", "monsters": [ { "monster": "mon_sachyrhinosaurus", "weight": 600 }, { "monster": "mon_zachyrhinosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zasmosaurus_UPGRADE", + "id": "GROUP_zasmosaurus_UPGRADE", "monsters": [ { "monster": "mon_sasmosaurus", "weight": 600 }, { "monster": "mon_zasmosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zentaceratops_UPGRADE", + "id": "GROUP_zentaceratops_UPGRADE", "monsters": [ { "monster": "mon_sentaceratops", "weight": 600 }, { "monster": "mon_zentaceratops_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zosmoceratops_UPGRADE", + "id": "GROUP_zosmoceratops_UPGRADE", "monsters": [ { "monster": "mon_sosmoceratops", "weight": 600 }, { "monster": "mon_zosmoceratops_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zorosaurus_UPGRADE", + "id": "GROUP_zorosaurus_UPGRADE", "monsters": [ { "monster": "mon_sorosaurus", "weight": 600 }, { "monster": "mon_zorosaurus_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zriceratops_UPGRADE", + "id": "GROUP_zriceratops_UPGRADE", "monsters": [ { "monster": "mon_sriceratops", "weight": 600 }, { "monster": "mon_zriceratops_brute", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zona_UPGRADE", + "id": "GROUP_zona_UPGRADE", "monsters": [ { "monster": "mon_sona", "weight": 400 }, { "monster": "mon_zona_shady", "weight": 300 }, @@ -690,7 +690,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zescelosaurus_UPGRADE", + "id": "GROUP_zescelosaurus_UPGRADE", "monsters": [ { "monster": "mon_sescelosaurus", "weight": 400 }, { "monster": "mon_zescelosaurus_shady", "weight": 300 }, @@ -699,7 +699,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zallosaurus_BRUTE", + "id": "GROUP_zallosaurus_BRUTE", "monsters": [ { "monster": "mon_zallosaurus_hulk", "weight": 400 }, { "monster": "mon_zallosaurus_truck", "weight": 300 }, @@ -708,7 +708,7 @@ }, { "type": "monstergroup", - "name": "GROUP_zyrannosaurus_BRUTE", + "id": "GROUP_zyrannosaurus_BRUTE", "monsters": [ { "monster": "mon_zyrannosaurus_hulk", "weight": 400 }, { "monster": "mon_zyrannosaurus_truck", "weight": 300 }, @@ -717,12 +717,12 @@ }, { "type": "monstergroup", - "name": "GROUP_zapatosaurus_BRUTE", + "id": "GROUP_zapatosaurus_BRUTE", "monsters": [ { "monster": "mon_zapatosaurus_hulk", "weight": 600 }, { "monster": "mon_zapatosaurus_tank", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_zankylosaurus_BRUTE", + "id": "GROUP_zankylosaurus_BRUTE", "monsters": [ { "monster": "mon_zankylosaurus_hulk", "weight": 400 }, { "monster": "mon_zankylosaurus_tank", "weight": 300 }, @@ -731,12 +731,12 @@ }, { "type": "monstergroup", - "name": "GROUP_zriceratops_BRUTE", + "id": "GROUP_zriceratops_BRUTE", "monsters": [ { "monster": "mon_zriceratops_hulk", "weight": 600 }, { "monster": "mon_zriceratops_tank", "weight": 400 } ] }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE", + "id": "GROUP_ZOMBIE", "//": "Only dinos that can fit through a standard door frame should be here", "monsters": [ { "monster": "mon_zilophosaurus", "starts": "3 days" }, @@ -760,7 +760,7 @@ ] }, { - "name": "GROUP_ROOF_ZOMBIE", + "id": "GROUP_ROOF_ZOMBIE", "type": "monstergroup", "monsters": [ { "monster": "mon_zteranodon", "weight": 20, "starts": "3 days", "pack_size": [ 4, 6 ] }, diff --git a/data/mods/Magiclysm/Spells/biomancer.json b/data/mods/Magiclysm/Spells/biomancer.json index e72d9ed6a2890..cd91077c7339d 100644 --- a/data/mods/Magiclysm/Spells/biomancer.json +++ b/data/mods/Magiclysm/Spells/biomancer.json @@ -1,9 +1,23 @@ [ + { + "id": "biomantic_pain_caused_light", + "type": "SPELL", + "name": { "str": "Cause minor pain", "//~": "NO_I18N" }, + "description": { "str": "Causes a small amount of pain when certain spells are used.", "//~": "NO_I18N" }, + "valid_targets": [ "self" ], + "effect": "recover_energy", + "effect_str": "PAIN", + "shape": "blast", + "flags": [ "SILENT", "RANDOM_DAMAGE" ], + "spell_class": "BIOMANCER", + "min_damage": -1, + "max_damage": -4 + }, { "id": "light_healing", "type": "SPELL", - "name": "Cure Light Wounds", - "description": "Heals a little bit of damage on the target.", + "name": "Knit the Rent Flesh", + "description": "Cause the target's wounds to writhe, the flesh to crawl back together, and their injuries to heal. Disturbing, and painful, but effective.", "valid_targets": [ "self", "ally" ], "min_damage": { "math": [ "(u_spell_level('light_healing') * -0.5) - 1" ] }, "max_damage": { "math": [ "(u_spell_level('light_healing') * -1.1) - 4" ] }, @@ -15,7 +29,7 @@ "shape": "blast", "base_casting_time": 300, "base_energy_cost": 800, - "extra_effects": [ { "id": "eoc_restoration_setup", "hit_self": true } ], + "extra_effects": [ { "id": "eoc_restoration_setup", "hit_self": true }, { "id": "biomantic_pain_caused_light", "hit_self": true } ], "flags": [ "RESTORATION_SPELL", "RANDOM_DAMAGE", "SOMATIC", "VERBAL", "NO_PROJECTILE" ], "spell_class": "BIOMANCER", "difficulty": 2, @@ -102,7 +116,7 @@ "base_casting_time": 100, "casting_time_increment": -2.5, "final_casting_time": 50, - "extra_effects": [ { "id": "eoc_transformation_setup", "hit_self": true } ], + "extra_effects": [ { "id": "eoc_transformation_setup", "hit_self": true }, { "id": "biomantic_pain_caused_light", "hit_self": true } ], "base_energy_cost": 250, "energy_increment": -5.0, "final_energy_cost": 150, @@ -234,7 +248,7 @@ "effect_str": "rune_biomancer", "shape": "blast", "base_casting_time": 5000, - "extra_effects": [ { "id": "eoc_channeling_setup", "hit_self": true } ], + "extra_effects": [ { "id": "eoc_channeling_setup", "hit_self": true }, { "id": "biomantic_pain_caused_light", "hit_self": true } ], "base_energy_cost": 5, "min_duration": 1, "max_duration": 2, @@ -595,13 +609,12 @@ { "id": "biomancer_cure_disease_minor", "type": "SPELL", - "name": "Cure Disease, Minor", - "description": "Cure any minor illnesses you might be suffering from. This is one of the few biomantic cure spells that is castable on other people.", + "name": "Purgation of Maladies", + "description": "Vomit up any minor illnesses you might be suffering from, such as colds or the flu. This is one of the few biomantic cure spells that is castable on other people.", "valid_targets": [ "self", "ally" ], "spell_class": "BIOMANCER", "flags": [ "RESTORATION_SPELL", "CONCENTRATE", "VERBAL", "SOMATIC" ], - "effect": "attack", - "effect_str": "effect_biomancer_cure_disease_minor", + "effect": "vomit", "shape": "blast", "difficulty": 4, "max_level": 10, @@ -611,15 +624,37 @@ "max_range": 1, "magic_type": "magiclysm_generic_magic", "base_energy_cost": 500, - "extra_effects": [ { "id": "eoc_restoration_setup", "hit_self": true } ], + "extra_effects": [ + { "id": "eoc_restoration_setup", "hit_self": true }, + { "id": "biomantic_pain_caused_light", "hit_self": true }, + { "id": "biomancer_cure_disease_minor_actual_effect" } + ], "base_casting_time": 90000, "final_casting_time": 30000, "casting_time_increment": -6000 }, + { + "id": "biomancer_cure_disease_minor_actual_effect", + "type": "SPELL", + "name": { "str": "Purgation of Maladies Cure", "//~": "NO_I18N" }, + "description": { "str": "This causes the actual cure effect, since a vomit effect spell doesn't apply effect_str", "//~": "NO_I18N" }, + "valid_targets": [ "self", "ally" ], + "spell_class": "BIOMANCER", + "flags": [ "SILENT" ], + "effect": "attack", + "effect_str": "effect_biomancer_cure_disease_minor", + "shape": "blast", + "difficulty": 4, + "max_level": 10, + "min_duration": 60480000, + "max_duration": 60480000, + "min_range": 1, + "max_range": 1 + }, { "id": "biomancer_hyper_regeneration", "type": "SPELL", - "name": "Rapid Regeneration", + "name": "Corporeal Reconstitution", "description": "Possibly the most powerful of the biomantic healing spells, this causes your flesh to literally knit itself together before your eyes.", "valid_targets": [ "self" ], "spell_class": "BIOMANCER", @@ -727,7 +762,7 @@ "duration_increment": 60000, "magic_type": "magiclysm_generic_magic", "base_energy_cost": 450, - "extra_effects": [ { "id": "eoc_enhancement_setup", "hit_self": true } ], + "extra_effects": [ { "id": "eoc_enhancement_setup", "hit_self": true }, { "id": "biomantic_pain_caused_light", "hit_self": true } ], "base_casting_time": 600 }, { @@ -767,7 +802,7 @@ "max_level": 15, "magic_type": "magiclysm_generic_magic", "base_energy_cost": 350, - "extra_effects": [ { "id": "eoc_restoration_setup", "hit_self": true } ], + "extra_effects": [ { "id": "eoc_restoration_setup", "hit_self": true }, { "id": "biomantic_pain_caused_light", "hit_self": true } ], "base_casting_time": 1500 }, { diff --git a/data/mods/Magiclysm/effect_on_conditions/spellcasting/casting_side_effects.json b/data/mods/Magiclysm/effect_on_conditions/spellcasting/casting_side_effects.json new file mode 100644 index 0000000000000..acd7a3e5e27a3 --- /dev/null +++ b/data/mods/Magiclysm/effect_on_conditions/spellcasting/casting_side_effects.json @@ -0,0 +1,22 @@ +[ + { + "type": "effect_on_condition", + "id": "EOC_BIOMANCY_IS_DISTURBING", + "eoc_type": "EVENT", + "required_event": "spellcasting_finish", + "//": "The character check is because it's meant to be the effects of someone seeing you cast a biomancy spell. If no one sees it, it doesn't matter.", + "condition": { + "and": [ + { "compare_string": [ "BIOMANCER", { "context_val": "school" } ] }, + { "math": [ "u_characters_nearby('radius': 30, 'attitude': 'any') > 0" ] } + ] + }, + "effect": [ + { + "u_add_effect": "effect_biomancer_disturbing", + "intensity": { "math": [ "_difficulty * 1.5" ] }, + "duration": { "math": [ "_difficulty * 8" ] } + } + ] + } +] diff --git a/data/mods/Magiclysm/effects/effects.json b/data/mods/Magiclysm/effects/effects.json index 65b4b8163d112..d96201709fde5 100644 --- a/data/mods/Magiclysm/effects/effects.json +++ b/data/mods/Magiclysm/effects/effects.json @@ -273,7 +273,8 @@ { "value": "PERCEPTION", "add": { "math": [ "((u_spell_level('bio_grotesque') / 10) + 1)" ] } }, { "value": "DEXTERITY", "add": { "math": [ "((u_spell_level('bio_grotesque') / 10) + 1)" ] } }, { "value": "STRENGTH", "add": { "math": [ "((u_spell_level('bio_grotesque') / 5) + 1)" ] } }, - { "value": "SPEED", "add": { "math": [ "((u_spell_level('bio_grotesque') / 4) + 5)" ] } } + { "value": "SPEED", "add": { "math": [ "((u_spell_level('bio_grotesque') / 4) + 5)" ] } }, + { "value": "UGLINESS", "add": { "math": [ "(u_spell_level('bio_grotesque') / 2) + 2" ] } } ] } ] @@ -633,7 +634,12 @@ "health_chance": [ 4 ], "stamina_min": [ 40 ], "stamina_chance": [ 2 ] - } + }, + "enchantments": [ + { + "values": [ { "value": "UGLINESS", "add": { "math": [ "( u_spell_level('biomancer_coagulant_weave') / 4 ) + 1" ] } } ] + } + ] }, { "type": "effect_type", @@ -1324,8 +1330,8 @@ "apply_message": "", "remove_message": "With an unpleasant twisting sensation your hands and feet return to normal.", "rating": "good", - "flags": [ "WEBBED_HANDS", "WEBBED_FEET" ], - "base_mods": { "stamina_min": [ 10 ] } + "base_mods": { "stamina_min": [ 10 ] }, + "enchantments": [ { "mutations": [ "WEBBED", "WEBBED_FEET" ] } ] }, { "type": "effect_type", @@ -1479,7 +1485,7 @@ { "type": "effect_type", "id": "effect_biomancer_hyper_regeneration", - "name": [ "Rapid Regeneration" ], + "name": [ "Corporeal Reconstitution" ], "desc": [ "You are healing unbelievably quickly." ], "remove_message": "Your rapid regeneration slows and stops.", "rating": "good", @@ -1501,6 +1507,16 @@ ], "flags": [ "MEND_ALL" ] }, + { + "type": "effect_type", + "id": "effect_biomancer_disturbing", + "name": [ "" ], + "desc": [ "" ], + "max_intensity": 100, + "enchantments": [ + { "values": [ { "value": "UGLINESS", "add": { "math": [ "u_effect_intensity('effect_biomancer_disturbing')" ] } } ] } + ] + }, { "type": "effect_type", "id": "effect_biomancer_slow_bleeding_01", @@ -1535,7 +1551,8 @@ "enchantments": [ { "values": [ - { "value": "STOMACH_SIZE_MULTIPLIER", "multiply": { "math": [ "u_spell_level('biomancer_eat_tons_of_food') * 0.5" ] } } + { "value": "STOMACH_SIZE_MULTIPLIER", "multiply": { "math": [ "u_spell_level('biomancer_eat_tons_of_food') * 0.5" ] } }, + { "value": "UGLINESS", "add": 1 } ] } ] diff --git a/data/mods/Magiclysm/hobbies.json b/data/mods/Magiclysm/hobbies.json index f12733cd965b8..37223d15a1663 100644 --- a/data/mods/Magiclysm/hobbies.json +++ b/data/mods/Magiclysm/hobbies.json @@ -123,8 +123,8 @@ "type": "profession", "subtype": "hobby", "id": "dabbler_light_healing", - "name": "Dabbler (Cure Light Wounds)", - "description": "You were one of the hundreds of millions of people who knew a single spell. In your case, Cure Light Wounds. Certainly no one ever asked your reasons for studying biomancy, especially after you saw that guy get hit by a truck running a red light and managed to stop him from bleeding out before the paramedics arrived. As long as you're light on your feet, you won't have to worry about dying of your injuries now.", + "name": "Dabbler (Knit the Rent Flesh)", + "description": "You were one of the hundreds of millions of people who knew a single spell. In your case, Knit the Rent Flesh. Certainly no one ever asked your reasons for studying biomancy, especially after you saw that guy get hit by a truck running a red light and managed to stop him from bleeding out before the paramedics arrived. It was disturbing to watch, but it was undoubtedly effective. As long as you're light on your feet, you won't have to worry about dying of your injuries now.", "points": 4, "spells": [ { "id": "light_healing", "level": 5 } ], "traits": [ "BIOMANCER" ] diff --git a/data/mods/Magiclysm/itemgroups/itemgroups.json b/data/mods/Magiclysm/itemgroups/itemgroups.json index a35c98adea710..93dde2481f18d 100644 --- a/data/mods/Magiclysm/itemgroups/itemgroups.json +++ b/data/mods/Magiclysm/itemgroups/itemgroups.json @@ -9,7 +9,7 @@ "type": "item_group", "id": "religious_books", "copy-from": "religious_books", - "extend": { "items": [ [ "priest_beginner", 1 ], [ "priest_advanced", 1 ], [ "druid_spellbook", 1 ] ] } + "extend": { "items": [ [ "priest_advanced", 1 ], [ "druid_spellbook", 1 ] ] } }, { "type": "item_group", @@ -1472,7 +1472,6 @@ "items": [ { "distribution": [ - { "item": "priest_beginner", "prob": 30 }, { "item": "spell_scroll_light_healing", "prob": 50 }, { "item": "spell_scroll_bio_acidicspray", "prob": 50 }, { "item": "spell_scroll_biomancer_paralytic_dart", "prob": 50 }, @@ -1486,6 +1485,7 @@ { "distribution": [ { "item": "wizard_utility", "prob": 20 }, + { "item": "priest_beginner", "prob": 30 }, { "item": "spell_scroll_biomancer_slow_bleeding", "prob": 40 }, { "item": "spell_scroll_biomancer_scalpel_fingers", "prob": 30 }, { "item": "spell_scroll_pain_split", "prob": 50 }, @@ -1617,7 +1617,6 @@ }, { "distribution": [ - { "item": "priest_beginner", "prob": 20 }, { "item": "wizard_beginner", "prob": 20 }, { "item": "spell_scroll_create_atomic_light", "prob": 50 }, { "item": "spell_scroll_ethereal_grasp", "prob": 50 }, diff --git a/data/mods/Magiclysm/itemgroups/spellbooks.json b/data/mods/Magiclysm/itemgroups/spellbooks.json index 1d518d8af942b..3f67132bd7030 100644 --- a/data/mods/Magiclysm/itemgroups/spellbooks.json +++ b/data/mods/Magiclysm/itemgroups/spellbooks.json @@ -271,7 +271,6 @@ "//": "These are spellbooks that a beginner would have, or scrolls that would have this tier or one tier higher of spells.", "items": [ [ "wizard_beginner", 30 ], - [ "priest_beginner", 30 ], [ "techno_idiots", 30 ], [ "novice_stormshaper_book", 30 ], [ "book_lazy_magic", 30 ], @@ -307,6 +306,7 @@ "type": "item_group", "items": [ [ "wizard_utility", 50 ], + [ "priest_beginner", 30 ], [ "priest_advanced", 50 ], [ "prepper_spellbook", 30 ], [ "techno_fundamentals", 50 ], diff --git a/data/mods/Magiclysm/items/ethereal_items.json b/data/mods/Magiclysm/items/ethereal_items.json index a24e27fdad076..8cc1acf91de16 100644 --- a/data/mods/Magiclysm/items/ethereal_items.json +++ b/data/mods/Magiclysm/items/ethereal_items.json @@ -224,7 +224,8 @@ "techniques": [ "PRECISE", "RAPID", "WBLOCK_2" ], "flags": [ "REACH_ATTACK", "REACH3", "WHIP", "STURDY", "TRADER_AVOID", "UNBREAKABLE_MELEE", "NO_REPAIR", "MAGIC_FOCUS" ], "category": "weapons", - "melee_damage": { "cut": 30 } + "melee_damage": { "cut": 30 }, + "relic_data": { "passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "values": [ { "value": "UGLINESS", "add": 3 } ] } ] } }, { "id": "flarewhip", @@ -284,7 +285,8 @@ "ZERO_WEIGHT", "UNRESTRICTED" ], - "armor": [ { "encumbrance": [ 5, 10 ], "coverage": 40, "covers": [ "torso" ] } ] + "armor": [ { "encumbrance": [ 5, 10 ], "coverage": 40, "covers": [ "torso" ] } ], + "relic_data": { "passive_effects": [ { "has": "WORN", "condition": "ALWAYS", "values": [ { "value": "UGLINESS", "add": 5 } ] } ] } }, { "id": "bonespear", @@ -309,7 +311,8 @@ "weight": "2175 g", "volume": "2500 ml", "longest_side": "183 cm", - "melee_damage": { "bash": 16, "stab": 36 } + "melee_damage": { "bash": 16, "stab": 36 }, + "relic_data": { "passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "values": [ { "value": "UGLINESS", "add": 3 } ] } ] } }, { "id": "druid_recurve", @@ -733,7 +736,9 @@ "relic_data": { "passive_effects": [ { - "intermittent_activation": { "effects": [ { "frequency": "15 minutes", "spell_effects": [ { "id": "light_healing", "hit_self": true } ] } ] } + "intermittent_activation": { + "effects": [ { "frequency": "2 minutes", "spell_effects": [ { "id": "pfruit_regeneration_spell", "hit_self": true } ] } ] + } }, { "has": "WORN", diff --git a/data/mods/Magiclysm/items/spell_scrolls.json b/data/mods/Magiclysm/items/spell_scrolls.json index 11bd5d6358cfe..511f2a319e077 100644 --- a/data/mods/Magiclysm/items/spell_scrolls.json +++ b/data/mods/Magiclysm/items/spell_scrolls.json @@ -186,8 +186,8 @@ "copy-from": "spell_scroll", "id": "spell_scroll_light_healing", "//": "Biomancer spell", - "name": { "str": "Scroll of Cure Light Wounds", "str_pl": "Scrolls of Cure Light Wounds" }, - "description": "Heals a little bit of damage on the target.", + "name": { "str": "Scroll of Knit the Rent Flesh", "str_pl": "Scrolls of Knit the Rent Flesh" }, + "description": "Cause the target's wounds to pull themselves together.", "use_action": { "type": "learn_spell", "spells": [ "light_healing" ] } }, { @@ -1686,8 +1686,8 @@ "copy-from": "spell_scroll", "id": "spell_scroll_biomancer_cure_disease_minor", "//": "Biomancer spell", - "name": { "str": "Scroll of Cure Disease, Minor", "str_pl": "Scrolls of Cure Disease, Minor" }, - "description": "Snap your fingers and get rid of that nasty cold or flu.", + "name": { "str": "Scroll of Purgation of Maladies", "str_pl": "Scrolls of Purgation of Maladies" }, + "description": "Snap your fingers and get rid of that nasty cold or flu, with the slight disadvantage that you'll have to vomit it out.", "use_action": { "type": "learn_spell", "spells": [ "biomancer_cure_disease_minor" ] } }, { @@ -1713,7 +1713,7 @@ "copy-from": "spell_scroll", "id": "spell_scroll_biomancer_hyper_regeneration", "//": "Biomancer spell", - "name": { "str": "Scroll of Rapid Regeneration", "str_pl": "Scrolls of Rapid Regeneration" }, + "name": { "str": "Scroll of Corporeal Reconstitution", "str_pl": "Scrolls of Corporeal Reconstitution" }, "description": "Cuts? Lacerations? Torn organs? Fix all that with this handy spell.", "use_action": { "type": "learn_spell", "spells": [ "biomancer_hyper_regeneration" ] } }, diff --git a/data/mods/Magiclysm/items/spellbooks.json b/data/mods/Magiclysm/items/spellbooks.json index b26f872d54d92..87bf8a80a5214 100644 --- a/data/mods/Magiclysm/items/spellbooks.json +++ b/data/mods/Magiclysm/items/spellbooks.json @@ -132,19 +132,20 @@ }, { "id": "priest_beginner", + "//2": "id for legacy reasons", "type": "BOOK", "category": "manuals", - "name": { "str": "Introduction to the Divine", "str_pl": "copies of Introduction to the Divine" }, - "//": "1 technomancer, 1 biomancer, 1 classless spells", - "description": "This appears to mostly be a religious text, but it does have some notes on healing.", - "weight": "585 g", - "volume": "500 ml", - "price": "50 USD", + "name": { "str": "The Limits of Magical Recovery", "str_pl": "copies of The Limits of Magical Recovery" }, + "//": "1 technomancer, 2 biomancer, 1 druid spells", + "description": "A study of the progress of using magic to cure ailments and heal wounds throughout the ages, from the earliest simple rituals to set bones all the way through modern thaumaturgical research into cancer treatments and curing Orcus's disease. Some of the descriptions are detailed enough to be used as spell formulae.", + "weight": "900 g", + "volume": "750 ml", + "price": "150 USD", "material": [ "paper" ], "looks_like": "cookbook", "symbol": "?", "color": "light_green", - "use_action": { "type": "learn_spell", "spells": [ "light_healing", "blinding_flash", "bless" ] } + "use_action": { "type": "learn_spell", "spells": [ "light_healing", "biomancer_cure_disease_minor", "bless", "druid_healing_herb" ] } }, { "id": "priest_advanced", diff --git a/data/mods/Magiclysm/mod_interactions/defense_mode/monstergroups.json b/data/mods/Magiclysm/mod_interactions/defense_mode/monstergroups.json index d2e3ce9a9f73c..fb0e31d7766ac 100644 --- a/data/mods/Magiclysm/mod_interactions/defense_mode/monstergroups.json +++ b/data/mods/Magiclysm/mod_interactions/defense_mode/monstergroups.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_LIZARDFOLK_DM", + "id": "GROUP_LIZARDFOLK_DM", "monsters": [ { "monster": "mon_lizardfolk_warrior_dm", "weight": 900 }, { "monster": "mon_lizardfolk_warrior_dm", "weight": 20, "pack_size": [ 2, 4 ] }, @@ -12,7 +12,7 @@ }, { "type": "monstergroup", - "name": "GROUP_GOLEM_DM", + "id": "GROUP_GOLEM_DM", "monsters": [ { "monster": "mon_plasticgolem_dm", "weight": 965 }, { "monster": "mon_claygolem_dm", "weight": 20 }, @@ -22,7 +22,7 @@ }, { "type": "monstergroup", - "name": "GROUP_GOBLIN_DM", + "id": "GROUP_GOBLIN_DM", "monsters": [ { "monster": "mon_goblin_warrior_dm", "weight": 900 }, { "monster": "mon_goblin_warrior_dm", "weight": 35, "pack_size": [ 2, 4 ] }, @@ -31,7 +31,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ORC_DM", + "id": "GROUP_ORC_DM", "monsters": [ { "monster": "mon_orc_warrior_dm", "weight": 960, "cost_multiplier": 5 }, { "monster": "mon_orc_archer_dm", "weight": 25, "cost_multiplier": 7 }, diff --git a/data/mods/Magiclysm/mod_interactions/innawood/mapgen/druid_giant_tree_empty.json b/data/mods/Magiclysm/mod_interactions/innawood/mapgen/druid_giant_tree_empty.json index df06e794f1ae0..b1ed08a8e4842 100644 --- a/data/mods/Magiclysm/mod_interactions/innawood/mapgen/druid_giant_tree_empty.json +++ b/data/mods/Magiclysm/mod_interactions/innawood/mapgen/druid_giant_tree_empty.json @@ -290,7 +290,6 @@ [ "druid_giant_tree_empty_crown_w", "druid_giant_tree_empty_crown", "druid_giant_tree_empty_crown_e" ], [ "druid_giant_tree_empty_crown_sw", "druid_giant_tree_empty_crown_s", "druid_giant_tree_empty_crown_se" ] ], - "weight": 100, "object": { "fill_ter": "t_barkfloor", "rows": [ diff --git a/data/mods/Magiclysm/monstergroup_upgrades.json b/data/mods/Magiclysm/monstergroup_upgrades.json index 391270cf04607..7e58721569c9e 100644 --- a/data/mods/Magiclysm/monstergroup_upgrades.json +++ b/data/mods/Magiclysm/monstergroup_upgrades.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_ZOMBIE_DWARF_UPGRADE", + "id": "GROUP_ZOMBIE_DWARF_UPGRADE", "monsters": [ { "monster": "mon_zombie_tough", "weight": 110 }, { "monster": "mon_zombie_grabber", "weight": 30 }, @@ -29,7 +29,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_ELF_UPGRADE", + "id": "GROUP_ZOMBIE_ELF_UPGRADE", "monsters": [ { "monster": "mon_zombie_tough", "weight": 25 }, { "monster": "mon_zombie_grabber", "weight": 25 }, @@ -57,7 +57,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_GOBLIN_UPGRADE", + "id": "GROUP_ZOMBIE_GOBLIN_UPGRADE", "//": "Child-type zombies that evoke no guilt.", "monsters": [ { "monster": "mon_zombie_anklebiter", "weight": 300 }, @@ -69,7 +69,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_RAVENFOLK_UPGRADE", + "id": "GROUP_ZOMBIE_RAVENFOLK_UPGRADE", "monsters": [ { "monster": "mon_zombie_necro", "weight": 30 }, { "monster": "mon_zombie_necro_boomer", "weight": 20 }, @@ -82,7 +82,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_LIZARDFOLK_UPGRADE", + "id": "GROUP_ZOMBIE_LIZARDFOLK_UPGRADE", "//": "Heavily weighted toward the more feral variants but with some other options too.", "monsters": [ { "monster": "mon_zombie_hunter", "weight": 200 }, diff --git a/data/mods/Magiclysm/monstergroups.json b/data/mods/Magiclysm/monstergroups.json index acfb55453d1b5..919528a4ad2b9 100644 --- a/data/mods/Magiclysm/monstergroups.json +++ b/data/mods/Magiclysm/monstergroups.json @@ -1,13 +1,13 @@ [ { "type": "monstergroup", - "name": "GROUP_NULL", + "id": "GROUP_NULL", "is_safe": true, "monsters": [ { "monster": "mon_null", "weight": 920 } ] }, { "type": "monstergroup", - "name": "GROUP_FOREST", + "id": "GROUP_FOREST", "is_animal": true, "monsters": [ { "monster": "mon_null", "weight": 860 }, @@ -78,7 +78,7 @@ }, { "type": "monstergroup", - "name": "GROUP_FERAL_WIZARDS", + "id": "GROUP_FERAL_WIZARDS", "monsters": [ { "monster": "mon_feral_human_magician", "weight": 50, "cost_multiplier": 2 }, { "monster": "mon_feral_druid", "weight": 50, "cost_multiplier": 2 }, @@ -95,7 +95,7 @@ }, { "type": "monstergroup", - "name": "GROUP_FERAL_TECHNOMANCERS", + "id": "GROUP_FERAL_TECHNOMANCERS", "monsters": [ { "monster": "mon_feral_technomancer", "weight": 50, "cost_multiplier": 2 }, { "monster": "mon_feral_technomancer_enhanced", "weight": 5, "cost_multiplier": 4 } @@ -103,7 +103,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SWAMP", + "id": "GROUP_SWAMP", "is_animal": true, "monsters": [ { "monster": "mon_null", "weight": 940 }, @@ -121,7 +121,7 @@ }, { "type": "monstergroup", - "name": "GROUP_CAVE", + "id": "GROUP_CAVE", "is_animal": true, "monsters": [ { "monster": "mon_null", "weight": 782 }, @@ -154,7 +154,7 @@ ] }, { - "name": "GROUP_ZOMBIE_FANTASY_SPECIES", + "id": "GROUP_ZOMBIE_FANTASY_SPECIES", "type": "monstergroup", "//": "same ratio as ferals", "monsters": [ @@ -167,7 +167,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE", + "id": "GROUP_ZOMBIE", "monsters": [ { "group": "GROUP_ZOMBIE_FANTASY_SPECIES", "weight": 4720 }, { "group": "GROUP_ZOMBIE_FANTASY_SPECIES", "weight": 10, "cost_multiplier": 7, "pack_size": [ 5, 20 ] }, @@ -177,7 +177,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_GASSTATION", + "id": "GROUP_ZOMBIE_GASSTATION", "monsters": [ { "group": "GROUP_ZOMBIE_FANTASY_SPECIES", "weight": 472 }, { "group": "GROUP_ZOMBIE_FANTASY_SPECIES", "weight": 1, "cost_multiplier": 7, "pack_size": [ 5, 20 ] }, @@ -186,43 +186,43 @@ ] }, { - "name": "GROUP_MINERS", + "id": "GROUP_MINERS", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_miner", "weight": 100 }, { "monster": "mon_zombie_dwarf_miner", "weight": 40 } ] }, { - "name": "GROUP_PARK_DOG", + "id": "GROUP_PARK_DOG", "type": "monstergroup", "monsters": [ { "group": "GROUP_ZOMBIE_FANTASY_SPECIES", "weight": 125 } ] }, { - "name": "GROUP_PARK_PLAYGROUND", + "id": "GROUP_PARK_PLAYGROUND", "type": "monstergroup", "monsters": [ { "group": "GROUP_ZOMBIE_FANTASY_SPECIES", "weight": 100 } ] }, { - "name": "GROUP_PARK_SCENIC", + "id": "GROUP_PARK_SCENIC", "type": "monstergroup", "monsters": [ { "group": "GROUP_ZOMBIE_FANTASY_SPECIES", "weight": 100 } ] }, { - "name": "GROUP_ROOF_ZOMBIE", + "id": "GROUP_ROOF_ZOMBIE", "type": "monstergroup", "monsters": [ { "group": "GROUP_ZOMBIE_FANTASY_SPECIES", "weight": 100, "pack_size": [ 2, 3 ] } ] }, { "type": "monstergroup", - "name": "DUMP_ANIMALS", + "id": "DUMP_ANIMALS", "monsters": [ { "monster": "mon_otyugh", "weight": 5 } ] }, { "type": "monstergroup", - "name": "GROUP_SEWER", + "id": "GROUP_SEWER", "monsters": [ { "monster": "mon_otyugh", "weight": 15 } ] }, { "type": "monstergroup", - "name": "GROUP_LAB", + "id": "GROUP_LAB", "monsters": [ { "monster": "mon_feral_lab_magician", "weight": 25, "cost_multiplier": 5 }, { "monster": "mon_feral_technomancer", "weight": 8, "cost_multiplier": 5 }, @@ -231,7 +231,7 @@ }, { "type": "monstergroup", - "name": "GROUP_LAB_SURFACE", + "id": "GROUP_LAB_SURFACE", "monsters": [ { "monster": "mon_feral_lab_magician", "weight": 25, "cost_multiplier": 5 }, { "monster": "mon_feral_technomancer", "weight": 8, "cost_multiplier": 5 }, @@ -241,7 +241,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MICROLAB", + "id": "GROUP_MICROLAB", "monsters": [ { "monster": "mon_feral_lab_magician", "weight": 2, "cost_multiplier": 5 }, { "monster": "mon_feral_technomancer", "weight": 2, "cost_multiplier": 5 }, @@ -250,7 +250,7 @@ }, { "type": "monstergroup", - "name": "GROUP_LAB_RESEARCHERS", + "id": "GROUP_LAB_RESEARCHERS", "monsters": [ { "monster": "mon_feral_lab_magician", "weight": 20, "cost_multiplier": 5 }, { "monster": "mon_feral_technomancer", "weight": 10, "cost_multiplier": 5 }, @@ -260,13 +260,13 @@ }, { "type": "monstergroup", - "name": "GROUP_POLYMORPH_SHADOW", + "id": "GROUP_POLYMORPH_SHADOW", "is_animal": true, "monsters": [ { "monster": "mon_magi_shadow", "weight": 990 }, { "monster": "mon_shadow_snake", "weight": 10 } ] }, { "type": "monstergroup", - "name": "GROUP_DOMESTIC", + "id": "GROUP_DOMESTIC", "is_animal": true, "monsters": [ { "monster": "mon_dog", "weight": 980 }, @@ -275,7 +275,7 @@ }, { "type": "monstergroup", - "name": "GROUP_WORM", + "id": "GROUP_WORM", "is_animal": true, "monsters": [ { "monster": "mon_worm_small", "weight": 500 }, @@ -286,7 +286,7 @@ }, { "type": "monstergroup", - "name": "GROUP_BLACKDRAGON_LAIR_1", + "id": "GROUP_BLACKDRAGON_LAIR_1", "is_animal": true, "monsters": [ { "monster": "mon_null", "weight": 880 }, @@ -307,7 +307,7 @@ }, { "type": "monstergroup", - "name": "GROUP_BLACKDRAGON_LAIR_2", + "id": "GROUP_BLACKDRAGON_LAIR_2", "is_animal": true, "monsters": [ { "monster": "mon_black_pudding", "weight": 14, "pack_size": [ 4, 6 ] }, @@ -323,7 +323,7 @@ }, { "type": "monstergroup", - "name": "GROUP_LIZARDFOLK", + "id": "GROUP_LIZARDFOLK", "//": "A lizard humanoid race, they are allies and servants of the black dragons.", "is_animal": true, "monsters": [ @@ -337,7 +337,7 @@ }, { "type": "monstergroup", - "name": "GROUP_OGRE", + "id": "GROUP_OGRE", "//": "Contains ogres and their various mutations", "monsters": [ { "monster": "mon_ogre", "weight": 500 }, @@ -352,7 +352,7 @@ }, { "type": "monstergroup", - "name": "GROUP_OGRE_MUTANTS", + "id": "GROUP_OGRE_MUTANTS", "monsters": [ { "monster": "mon_ogre_twoheaded", "weight": 500 }, { "monster": "mon_ogre_spider", "weight": 400 }, @@ -361,7 +361,7 @@ }, { "type": "monstergroup", - "name": "GROUP_TOWER_GOLEM", + "id": "GROUP_TOWER_GOLEM", "//": "Cheap golems used to defend the average wizard's tower.", "monsters": [ { "monster": "mon_plasticgolem", "weight": 965 }, @@ -371,7 +371,7 @@ ] }, { - "name": "GROUP_FROGS_CLOAK", + "id": "GROUP_FROGS_CLOAK", "//": "Nature frogs with no seasonal limits", "type": "monstergroup", "default": "mon_peeper_frog", @@ -386,7 +386,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ALL_GOBLINS", + "id": "GROUP_ALL_GOBLINS", "monsters": [ { "monster": "mon_goblin_warrior", "weight": 335 }, { "monster": "mon_feral_goblin", "weight": 50 }, @@ -406,7 +406,7 @@ }, { "type": "monstergroup", - "name": "GROUP_GOBLIN_MUTANTS", + "id": "GROUP_GOBLIN_MUTANTS", "monsters": [ { "monster": "mon_orc_warrior", "weight": 400 }, { "monster": "mon_orc_archer", "weight": 150 }, @@ -418,7 +418,7 @@ }, { "type": "monstergroup", - "name": "GROUP_GOBLIN_STANDARD", + "id": "GROUP_GOBLIN_STANDARD", "monsters": [ { "monster": "mon_goblin_warrior", "weight": 900 }, { "monster": "mon_goblin_warrior", "weight": 35, "pack_size": [ 2, 4 ] }, @@ -427,12 +427,12 @@ }, { "type": "monstergroup", - "name": "GROUP_GOBLIN_ADVANCED", + "id": "GROUP_GOBLIN_ADVANCED", "monsters": [ { "monster": "mon_goblin_chieftain" } ] }, { "type": "monstergroup", - "name": "GROUP_FORGE_STANDARD", + "id": "GROUP_FORGE_STANDARD", "monsters": [ { "monster": "mon_null", "weight": 978 }, { "monster": "mon_forgeborn", "weight": 10, "cost_multiplier": 10 }, @@ -444,22 +444,22 @@ }, { "type": "monstergroup", - "name": "GROUP_FORGEDEMONS", + "id": "GROUP_FORGEDEMONS", "monsters": [ { "monster": "mon_forgedemons", "cost_multiplier": 3 } ] }, { "type": "monstergroup", - "name": "GROUP_FORGE_DWARVES", + "id": "GROUP_FORGE_DWARVES", "monsters": [ { "monster": "mon_forgedwarves", "cost_multiplier": 3 } ] }, { "type": "monstergroup", - "name": "GROUP_FORGE_AUTOMATA", + "id": "GROUP_FORGE_AUTOMATA", "monsters": [ { "monster": "mon_forgeborn", "cost_multiplier": 3 } ] }, { "type": "monstergroup", - "name": "GROUP_ORC", + "id": "GROUP_ORC", "monsters": [ { "monster": "mon_orc_warrior", "weight": 960, "cost_multiplier": 5 }, { "monster": "mon_orc_archer", "weight": 25, "cost_multiplier": 7 }, @@ -468,13 +468,13 @@ }, { "type": "monstergroup", - "name": "GROUP_WORKSHOP", + "id": "GROUP_WORKSHOP", "default": "mon_workshop_elf", "monsters": [ { "monster": "mon_workshop_elf", "weight": 100, "cost_multiplier": 2 } ] }, { "type": "monstergroup", - "name": "GROUP_FERAL", + "id": "GROUP_FERAL", "monsters": [ { "monster": "mon_feral_elf_pipe", "weight": 20, "pack_size": [ 2, 3 ] }, { "monster": "mon_feral_dwarf_pipe", "weight": 20, "pack_size": [ 2, 3 ] }, @@ -490,7 +490,7 @@ }, { "type": "monstergroup", - "name": "GROUP_FOREST_SPIRIT", + "id": "GROUP_FOREST_SPIRIT", "monsters": [ { "monster": "mon_mossling", "weight": 48, "cost_multiplier": 1 }, { "monster": "mon_mossling", "weight": 16, "cost_multiplier": 2, "pack_size": [ 3, 6 ] }, @@ -503,7 +503,7 @@ }, { "type": "monstergroup", - "name": "GROUP_FOREST_SPIRIT_SWAMP", + "id": "GROUP_FOREST_SPIRIT_SWAMP", "monsters": [ { "monster": "mon_mossling", "weight": 25, "cost_multiplier": 1 }, { "monster": "mon_mossling", "weight": 10, "cost_multiplier": 2, "pack_size": [ 2, 4 ] }, @@ -512,7 +512,7 @@ }, { "type": "monstergroup", - "name": "GROUP_EARTH_SPIRIT", + "id": "GROUP_EARTH_SPIRIT", "monsters": [ { "monster": "mon_earth_gnome", "weight": 25, "cost_multiplier": 1 }, { "monster": "mon_earth_gnome", "weight": 5, "cost_multiplier": 1, "pack_size": [ 2, 4 ] } @@ -520,7 +520,7 @@ }, { "type": "monstergroup", - "name": "GROUP_EARTH_SPIRIT_CAVE", + "id": "GROUP_EARTH_SPIRIT_CAVE", "monsters": [ { "monster": "mon_earth_gnome", "weight": 25, "cost_multiplier": 1 }, { "monster": "mon_earth_gnome", "weight": 15, "cost_multiplier": 3, "pack_size": [ 2, 4 ] } @@ -528,12 +528,12 @@ }, { "type": "monstergroup", - "name": "GROUP_MAGIC_FIELD", + "id": "GROUP_MAGIC_FIELD", "monsters": [ { "group": "GROUP_FOREST", "weight": 2 }, { "group": "GROUP_FOREST_SPIRIT", "weight": 1 } ] }, { "type": "monstergroup", - "name": "GROUP_TRIFFID", + "id": "GROUP_TRIFFID", "default": "mon_triffid", "monsters": [ { "monster": "mon_triffid_seedshaper", "weight": 25, "cost_multiplier": 5 }, @@ -542,7 +542,7 @@ }, { "type": "monstergroup", - "name": "GROUP_TRIFFID_OUTER", + "id": "GROUP_TRIFFID_OUTER", "default": "mon_triffid", "monsters": [ { "monster": "mon_triffid_seedshaper", "weight": 50, "cost_multiplier": 2 }, @@ -551,7 +551,7 @@ }, { "type": "monstergroup", - "name": "GROUP_TRIFFID_HEARTGUARDS", + "id": "GROUP_TRIFFID_HEARTGUARDS", "default": "mon_triffid", "monsters": [ { "monster": "mon_triffid_seedshaper", "weight": 150, "cost_multiplier": 2 }, @@ -560,7 +560,7 @@ }, { "type": "monstergroup", - "name": "GROUP_TRIFFID_HERBALISM_SEEDSHAPER", + "id": "GROUP_TRIFFID_HERBALISM_SEEDSHAPER", "//": "For placing in magic fields", "monsters": [ { "monster": "mon_triffid_seedshaper", "weight": 1 }, @@ -570,7 +570,7 @@ }, { "type": "monstergroup", - "name": "GROUP_TRIFFID_HERBALISM_VINEWEAVER", + "id": "GROUP_TRIFFID_HERBALISM_VINEWEAVER", "//": "For placing in magic fields", "monsters": [ { "monster": "mon_triffid_vineweaver", "weight": 1 }, @@ -580,7 +580,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MI-GO_CAMP_OM", + "id": "GROUP_MI-GO_CAMP_OM", "monsters": [ { "monster": "mon_mi_go_fleshwarper", "weight": 50, "cost_multiplier": 20, "starts": "210 hours" }, { "monster": "mon_mi_go_nethermancer", "weight": 50, "cost_multiplier": 20, "starts": "210 hours" } @@ -588,7 +588,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MI-GO_BASE_COMMON", + "id": "GROUP_MI-GO_BASE_COMMON", "monsters": [ { "monster": "mon_mi_go_fleshwarper", "weight": 50, "cost_multiplier": 2, "starts": "210 hours" }, { "monster": "mon_mi_go_nethermancer", "weight": 50, "cost_multiplier": 2, "starts": "210 hours" } @@ -596,7 +596,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MI-GO_BASE_CAPTORS", + "id": "GROUP_MI-GO_BASE_CAPTORS", "monsters": [ { "monster": "mon_mi_go_fleshwarper", "weight": 300, "cost_multiplier": 2, "starts": "210 hours" }, { "monster": "mon_mi_go_nethermancer", "weight": 100, "cost_multiplier": 2, "starts": "210 hours" } @@ -604,7 +604,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MI-GO_BASE_BOSS", + "id": "GROUP_MI-GO_BASE_BOSS", "monsters": [ { "monster": "mon_mi_go_fleshwarper", "weight": 200, "cost_multiplier": 2 }, { "monster": "mon_mi_go_fleshwarper", "weight": 50, "cost_multiplier": 5, "pack_size": [ 2, 3 ] }, @@ -614,7 +614,7 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHERMANCER_SUMMON", + "id": "GROUP_NETHERMANCER_SUMMON", "default": "mon_blank", "monsters": [ { "monster": "mon_flying_polyp_migo", "weight": 100, "cost_multiplier": 0 }, @@ -628,7 +628,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIFIED_ANIMALS", + "id": "GROUP_ZOMBIFIED_ANIMALS", "default": "mon_zombie_dog", "//": "For overrun or feral druid spaces", "monsters": [ diff --git a/data/mods/Magiclysm/monstergroups_egg.json b/data/mods/Magiclysm/monstergroups_egg.json index 0d22545174410..72b95fa52711f 100644 --- a/data/mods/Magiclysm/monstergroups_egg.json +++ b/data/mods/Magiclysm/monstergroups_egg.json @@ -1,6 +1,6 @@ [ { - "name": "GROUP_EGG_OWLBEAR", + "id": "GROUP_EGG_OWLBEAR", "type": "monstergroup", "monsters": [ { "monster": "mon_owlbear_cub" } ] } diff --git a/data/mods/Magiclysm/professions.json b/data/mods/Magiclysm/professions.json index c14de0d3145b5..3f301a3dcaf7e 100644 --- a/data/mods/Magiclysm/professions.json +++ b/data/mods/Magiclysm/professions.json @@ -78,181 +78,6 @@ }, "traits": [ "DRUID" ] }, - { - "type": "profession", - "id": "priest_magic2", - "name": "Priest", - "description": "When the apocalypse struck you did everything you could to protect your parish faithful, but it appears that prayers were not enough. Now that they are all dead, you should probably find something more tangible to protect you.", - "points": 0, - "flags": [ "SCEN_ONLY" ], - "skills": [ { "level": 3, "name": "speech" } ], - "items": { - "both": { - "entries": [ - { "item": "pants" }, - { "item": "longshirt" }, - { "item": "socks" }, - { "item": "cassock" }, - { "item": "dress_shoes" }, - { "item": "holy_symbol" }, - { "item": "holybook_bible1" }, - { "item": "priest_beginner" }, - { "item": "mbag" }, - { "group": "charged_cell_phone" } - ] - }, - "male": { "entries": [ { "item": "briefs" } ] }, - "female": { "entries": [ { "item": "bra" }, { "item": "panties" } ] } - } - }, - { - "type": "profession", - "id": "shinto_priest_magic2", - "name": "Kannushi", - "description": "You were one of the maintainers of a Shinto shrine, performing rituals and sacred tasks. You preferred it when only the spirits of the dead inhabited your shrine, and not their rotting corpses.", - "points": 0, - "flags": [ "SCEN_ONLY" ], - "skills": [ { "level": 1, "name": "fabrication" }, { "level": 1, "name": "tailor" } ], - "items": { - "both": { - "entries": [ - { "item": "kariginu" }, - { "item": "eboshi" }, - { "item": "pants" }, - { "item": "tabi_dress" }, - { "item": "geta" }, - { "item": "holy_symbol" }, - { "item": "holybook_kojiki" }, - { "item": "priest_beginner" }, - { "item": "mbag" }, - { "group": "charged_cell_phone" } - ] - }, - "male": { "entries": [ { "item": "briefs" } ] }, - "female": { "entries": [ { "item": "bra" }, { "item": "panties" } ] } - } - }, - { - "type": "profession", - "id": "imam_magic2", - "name": { "male": "Imam", "female": "Mourchida" }, - "description": "You spent much of your time prior to the apocalypse at the local mosque, studying the words of the Prophet and the Quran and guiding your community in prayer. Back then they came from far and wide to listen to you, now they come to eat your brains.", - "points": 0, - "flags": [ "SCEN_ONLY" ], - "//": "No knife, fire, or decent storage/armor. Skill points are countered.", - "skills": [ { "level": 2, "name": "speech" } ], - "items": { - "both": { - "entries": [ - { "item": "pants" }, - { "item": "socks" }, - { "item": "kufi" }, - { "item": "thawb" }, - { "item": "lowtops" }, - { "item": "holybook_quran" }, - { "item": "priest_beginner" }, - { "item": "mbag" }, - { "group": "charged_cell_phone" }, - { "item": "tshirt", "variant": "generic_tshirt" } - ] - }, - "male": { "entries": [ { "item": "briefs" } ] }, - "female": { "entries": [ { "item": "bra" }, { "item": "panties" } ] } - } - }, - { - "type": "profession", - "id": "rabbi_magic2", - "name": "Rabbi", - "description": "You were davening Shacharit in shul when the Cataclysm struck. You had always taught that God will restore life to the dead after Moshiach has come, but not like this!", - "points": 0, - "flags": [ "SCEN_ONLY" ], - "skills": [ { "level": 2, "name": "speech" }, { "level": 1, "name": "firstaid" } ], - "items": { - "both": { - "entries": [ - { "item": "pants" }, - { "item": "leather_belt" }, - { "item": "dress_shirt" }, - { "item": "socks" }, - { "item": "kittel" }, - { "item": "kippah" }, - { "item": "tallit_gadol" }, - { "item": "dress_shoes" }, - { "item": "holybook_talmud" }, - { "item": "holybook_tanakh" }, - { "item": "priest_beginner" }, - { "item": "mbag" }, - { "group": "charged_cell_phone" }, - { "item": "holy_symbol", "variant": "jewish_necklace1" } - ] - }, - "male": { "entries": [ { "item": "briefs" } ] }, - "female": { "entries": [ { "item": "bra" }, { "item": "panties" } ] } - } - }, - { - "type": "profession", - "id": "guru_magic2", - "name": "Guru", - "description": "You spent many years traveling the world, becoming wise and learned. Normally, you can answer any question, but even you are not quite sure what to do about the ravenous undead.", - "points": 2, - "flags": [ "SCEN_ONLY" ], - "//": "1.5 pts skills, cutting implement, and plenty of storage, so lack of fire only goes so far.", - "skills": [ { "level": 2, "name": "speech" }, { "level": 1, "name": "survival" } ], - "items": { - "both": { - "entries": [ - { "item": "jeans" }, - { "item": "socks" }, - { "item": "robe" }, - { "item": "turban" }, - { "item": "waterskin" }, - { "item": "pockknife" }, - { "item": "mbag" }, - { "item": "leathersandals" }, - { "item": "holy_symbol" }, - { "item": "wristwatch" }, - { "item": "priest_beginner" }, - { "group": "charged_cell_phone" }, - { "item": "tshirt", "variant": "generic_tshirt" } - ] - }, - "male": { "entries": [ { "item": "briefs" } ] }, - "female": { "entries": [ { "item": "panties" } ] } - } - }, - { - "type": "profession", - "id": "preacher_magic2", - "name": "Preacher", - "description": "You devoted your life to spreading the good word; always on the road, traveling from town to town. Now everything has gone to hell, you can't host your daily podcast, and the undead listening to your sermons don't seem particularly moved.", - "points": 2, - "flags": [ "SCEN_ONLY" ], - "//": "Storage + 2 points in skills, - no knife or fire.", - "skills": [ { "level": 2, "name": "speech" }, { "level": 1, "name": "driving" }, { "level": 1, "name": "computer" } ], - "items": { - "both": { - "entries": [ - { "item": "dress_shirt" }, - { "item": "pants" }, - { "item": "socks" }, - { "item": "dress_shoes" }, - { "item": "wristwatch" }, - { "item": "backpack" }, - { "item": "laptop" }, - { "item": "flyer" }, - { "item": "flyer" }, - { "item": "flyer" }, - { "item": "holy_symbol" }, - { "item": "priest_beginner" }, - { "group": "charged_cell_phone" } - ] - }, - "male": { "entries": [ { "item": "briefs" } ] }, - "female": { "entries": [ { "item": "bra" }, { "item": "panties" } ] } - } - }, { "type": "profession", "id": "novice_necromancer", diff --git a/data/mods/Magiclysm/scenarios.json b/data/mods/Magiclysm/scenarios.json index e2ad6913f2a8f..7a82ac3eb015b 100644 --- a/data/mods/Magiclysm/scenarios.json +++ b/data/mods/Magiclysm/scenarios.json @@ -7,9 +7,19 @@ "flags": [ "LONE_START" ], "points": 2, "description": "You've been preaching your faith for a long time, but the recent events have begun to make you doubt it. Wandering in your temple, you just found books that may restore your faith or shatter it completely.", - "start_name": "Church", + "start_name": "Sanctuary", "allowed_locs": [ "sloc_church" ], - "professions": [ "priest_magic2", "shinto_priest_magic2", "imam_magic2", "rabbi_magic2", "guru_magic2", "preacher_magic2" ] + "eoc": [ "EOC_MAGICLYSM_LOST_FAITH" ], + "professions": [ "priest", "shinto_priest", "imam", "rabbi", "guru", "preacher" ] + }, + { + "type": "effect_on_condition", + "id": "EOC_MAGICLYSM_LOST_FAITH", + "eoc_type": "SCENARIO_SPECIFIC", + "effect": [ + { "u_spawn_item": "priest_beginner", "suppress_message": true }, + { "u_spawn_item": "priest_advanced", "suppress_message": true } + ] }, { "type": "scenario", diff --git a/data/mods/Magiclysm/worldgen/druid_tower.json b/data/mods/Magiclysm/worldgen/druid_tower.json index 77d34c14d5ed5..1c8f44eba5dd7 100644 --- a/data/mods/Magiclysm/worldgen/druid_tower.json +++ b/data/mods/Magiclysm/worldgen/druid_tower.json @@ -99,7 +99,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DRUID_TOWER_DRUID_HEAD", + "id": "GROUP_DRUID_TOWER_DRUID_HEAD", "monsters": [ { "monster": "mon_feral_druid", "weight": 150 }, { "monster": "mon_feral_druid_enhanced", "weight": 850 } ] }, { @@ -374,7 +374,6 @@ [ "druid_ritual_home_crown_w", "druid_ritual_home_crown", "druid_ritual_home_crown_e" ], [ "druid_ritual_home_crown_sw", "druid_ritual_home_crown_s", "druid_ritual_home_crown_se" ] ], - "weight": 100, "object": { "fill_ter": "t_barkfloor", "rows": [ diff --git a/data/mods/Magiclysm/worldgen/scenarios/lmoe_start.json b/data/mods/Magiclysm/worldgen/scenarios/lmoe_start.json index 83491ea342573..4528d7ebbfefd 100644 --- a/data/mods/Magiclysm/worldgen/scenarios/lmoe_start.json +++ b/data/mods/Magiclysm/worldgen/scenarios/lmoe_start.json @@ -4,7 +4,6 @@ "method": "json", "om_terrain": [ "last_mage_on_earth_shelter" ], "//": "Empty LMOE shelter built for a wizard.", - "weight": 40, "object": { "fill_ter": "t_carpet_metal_purple", "rows": [ diff --git a/data/mods/Megafauna/mod_interactions/defense_mode/monstergroups.json b/data/mods/Megafauna/mod_interactions/defense_mode/monstergroups.json index 762bcba1ab1fb..884d12b52a35f 100644 --- a/data/mods/Megafauna/mod_interactions/defense_mode/monstergroups.json +++ b/data/mods/Megafauna/mod_interactions/defense_mode/monstergroups.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_MEGAFAUNA_DM", + "id": "GROUP_MEGAFAUNA_DM", "default": "mon_direwolf", "monsters": [ { "monster": "mon_direwolf_dm", "weight": 10 }, diff --git a/data/mods/Megafauna/monstergroups/misc.json b/data/mods/Megafauna/monstergroups/misc.json index bf0e786c79278..ecb89509846af 100644 --- a/data/mods/Megafauna/monstergroups/misc.json +++ b/data/mods/Megafauna/monstergroups/misc.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_DOMESTIC", + "id": "GROUP_DOMESTIC", "default": "mon_peccary_flathead", "is_animal": true, "monsters": [ @@ -21,7 +21,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SAFE", + "id": "GROUP_SAFE", "is_safe": true, "is_animal": true, "monsters": [ diff --git a/data/mods/Megafauna/monstergroups/monstergroups_egg.json b/data/mods/Megafauna/monstergroups/monstergroups_egg.json index d1c4072c6015a..4725dc4394bc6 100644 --- a/data/mods/Megafauna/monstergroups/monstergroups_egg.json +++ b/data/mods/Megafauna/monstergroups/monstergroups_egg.json @@ -1,11 +1,11 @@ [ { - "name": "GROUP_EGG_AUK", + "id": "GROUP_EGG_AUK", "type": "monstergroup", "monsters": [ { "monster": "mon_auk_chick" } ] }, { - "name": "GROUP_EGG_TITANIS_WALLERI", + "id": "GROUP_EGG_TITANIS_WALLERI", "type": "monstergroup", "monsters": [ { "monster": "mon_titanis_walleri_chick" } ] } diff --git a/data/mods/Megafauna/monstergroups/wilderness.json b/data/mods/Megafauna/monstergroups/wilderness.json index 459a1da8e22b0..03d695b8bd403 100644 --- a/data/mods/Megafauna/monstergroups/wilderness.json +++ b/data/mods/Megafauna/monstergroups/wilderness.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_FOREST", + "id": "GROUP_FOREST", "is_animal": true, "monsters": [ { "monster": "mon_sabcat", "weight": 25, "cost_multiplier": 0, "pack_size": [ 1, 1 ] }, @@ -86,7 +86,7 @@ }, { "type": "monstergroup", - "name": "GROUP_RIVER", + "id": "GROUP_RIVER", "is_animal": true, "monsters": [ { "monster": "mon_sabcat", "weight": 8, "cost_multiplier": 0, "pack_size": [ 1, 1 ] }, @@ -115,7 +115,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SWAMP", + "id": "GROUP_SWAMP", "is_animal": true, "monsters": [ { "monster": "mon_sabcat", "weight": 15, "cost_multiplier": 0, "pack_size": [ 1, 1 ] }, @@ -141,7 +141,7 @@ }, { "type": "monstergroup", - "name": "GROUP_CAVE", + "id": "GROUP_CAVE", "is_animal": true, "monsters": [ { "monster": "mon_direwolf", "weight": 100, "cost_multiplier": 5, "pack_size": [ 1, 4 ] }, diff --git a/data/mods/MindOverMatter/effectoncondition/eoc_nether_attunement_events.json b/data/mods/MindOverMatter/effectoncondition/eoc_nether_attunement_events.json index f57ea3068edc6..bb5ed5dc097a2 100644 --- a/data/mods/MindOverMatter/effectoncondition/eoc_nether_attunement_events.json +++ b/data/mods/MindOverMatter/effectoncondition/eoc_nether_attunement_events.json @@ -325,221 +325,29 @@ { "type": "effect_on_condition", "id": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES", - "//": "Switch statement below is to ensure there is always a chance of something happening.", + "condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 15" ] }, "effect": { - "switch": { "math": [ "u_vitamin('vitamin_psionic_drain')" ] }, - "cases": [ - { - "case": 15, - "effect": { - "weighted_list_eocs": [ - [ "EOC_DRAIN_EFFECT_CHECK_HEADACHE", 8 ], - [ "EOC_DRAIN_EFFECT_CHECK_EXTRA_ATTUNEMENT", 6 ], - [ "EOC_NETHER_EFFECT_CHECK_COLD_WIND", 4 ] - ] - } - }, - { - "case": 25, - "effect": { - "weighted_list_eocs": [ - [ "EOC_DRAIN_EFFECT_CHECK_HEADACHE", 8 ], - [ "EOC_DRAIN_EFFECT_CHECK_EXTRA_ATTUNEMENT", 6 ], - [ "EOC_NETHER_EFFECT_CHECK_COLD_WIND", 4 ], - [ "EOC_DRAIN_EFFECT_CHECK_HEALTH_CHANGE", 4 ], - [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ] - ] - } - }, - { - "case": 50, - "effect": { - "weighted_list_eocs": [ - [ "EOC_DRAIN_EFFECT_CHECK_HEADACHE", 8 ], - [ "EOC_DRAIN_EFFECT_CHECK_EXTRA_ATTUNEMENT", 6 ], - [ "EOC_NETHER_EFFECT_CHECK_COLD_WIND", 4 ], - [ "EOC_DRAIN_EFFECT_CHECK_HEALTH_CHANGE", 4 ], - [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ], - [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 5 ] - ] - } - }, - { - "case": 70, - "effect": { - "weighted_list_eocs": [ - [ "EOC_DRAIN_EFFECT_CHECK_HEADACHE", 8 ], - [ "EOC_DRAIN_EFFECT_CHECK_EXTRA_ATTUNEMENT", 6 ], - [ "EOC_NETHER_EFFECT_CHECK_COLD_WIND", 4 ], - [ "EOC_DRAIN_EFFECT_CHECK_HEALTH_CHANGE", 4 ], - [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ], - [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 5 ], - [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT", 7 ] - ] - } - }, - { - "case": 85, - "effect": { - "weighted_list_eocs": [ - [ "EOC_DRAIN_EFFECT_CHECK_HEADACHE", 8 ], - [ "EOC_DRAIN_EFFECT_CHECK_EXTRA_ATTUNEMENT", 6 ], - [ "EOC_NETHER_EFFECT_CHECK_COLD_WIND", 4 ], - [ "EOC_DRAIN_EFFECT_CHECK_HEALTH_CHANGE", 4 ], - [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ], - [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 5 ], - [ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT", 7 ], - [ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 3 ] - ] - } - }, - { - "case": 100, - "effect": { - "weighted_list_eocs": [ - [ "EOC_DRAIN_EFFECT_CHECK_HEADACHE", 8 ], - [ "EOC_DRAIN_EFFECT_CHECK_EXTRA_ATTUNEMENT", 6 ], - [ "EOC_NETHER_EFFECT_CHECK_COLD_WIND", 4 ], - [ "EOC_DRAIN_EFFECT_CHECK_HEALTH_CHANGE", 4 ], - [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ], - [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 5 ], - [ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT", 7 ], - [ "EOC_NETHER_EFFECT_CHECK_FEEDBACK", 5 ], - [ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_WEAKNESS", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_BREATHING", 3 ] - ] - } - }, - { - "case": 125, - "effect": { - "weighted_list_eocs": [ - [ "EOC_DRAIN_EFFECT_CHECK_HEADACHE", 8 ], - [ "EOC_DRAIN_EFFECT_CHECK_EXTRA_ATTUNEMENT", 6 ], - [ "EOC_NETHER_EFFECT_CHECK_COLD_WIND", 4 ], - [ "EOC_DRAIN_EFFECT_CHECK_HEALTH_CHANGE", 4 ], - [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ], - [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 5 ], - [ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT", 7 ], - [ "EOC_NETHER_EFFECT_CHECK_FEEDBACK", 5 ], - [ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_WEAKNESS", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_ATTENUATION", 5 ], - [ "EOC_NETHER_EFFECT_CHECK_BREATHING", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_HALLUCINATIONS", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_FORCE_WAVE", 3 ] - ] - } - }, - { - "case": 150, - "effect": { - "weighted_list_eocs": [ - [ "EOC_DRAIN_EFFECT_CHECK_HEADACHE", 8 ], - [ "EOC_DRAIN_EFFECT_CHECK_EXTRA_ATTUNEMENT", 6 ], - [ "EOC_NETHER_EFFECT_CHECK_COLD_WIND", 4 ], - [ "EOC_DRAIN_EFFECT_CHECK_HEALTH_CHANGE", 4 ], - [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ], - [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 5 ], - [ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT", 7 ], - [ "EOC_NETHER_EFFECT_CHECK_FEEDBACK", 5 ], - [ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_WEAKNESS", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_ATTENUATION", 5 ], - [ "EOC_NETHER_EFFECT_CHECK_BREATHING", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_HALLUCINATIONS", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_FORCE_WAVE", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_NO_PSIONICS", 2 ] - ] - } - }, - { - "case": 175, - "effect": { - "weighted_list_eocs": [ - [ "EOC_DRAIN_EFFECT_CHECK_HEADACHE", 8 ], - [ "EOC_DRAIN_EFFECT_CHECK_EXTRA_ATTUNEMENT", 6 ], - [ "EOC_NETHER_EFFECT_CHECK_COLD_WIND", 4 ], - [ "EOC_DRAIN_EFFECT_CHECK_HEALTH_CHANGE", 4 ], - [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ], - [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 5 ], - [ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT", 7 ], - [ "EOC_NETHER_EFFECT_CHECK_FEEDBACK", 5 ], - [ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_WEAKNESS", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_ATTENUATION", 5 ], - [ "EOC_NETHER_EFFECT_CHECK_BREATHING", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_HALLUCINATIONS", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_FORCE_WAVE", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_NETHER_LIGHTNING", 2 ], - [ "EOC_NETHER_EFFECT_CHECK_NO_PSIONICS", 2 ] - ] - } - }, - { - "case": 200, - "effect": { - "weighted_list_eocs": [ - [ "EOC_DRAIN_EFFECT_CHECK_HEADACHE", 8 ], - [ "EOC_DRAIN_EFFECT_CHECK_EXTRA_ATTUNEMENT", 6 ], - [ "EOC_NETHER_EFFECT_CHECK_COLD_WIND", 4 ], - [ "EOC_DRAIN_EFFECT_CHECK_HEALTH_CHANGE", 4 ], - [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ], - [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 5 ], - [ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT", 7 ], - [ "EOC_NETHER_EFFECT_CHECK_FEEDBACK", 5 ], - [ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_WEAKNESS", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_ATTENUATION", 5 ], - [ "EOC_NETHER_EFFECT_CHECK_BREATHING", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_FORCE_WAVE", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_NETHER_LIGHTNING", 2 ], - [ "EOC_NETHER_EFFECT_CHECK_NO_PSIONICS", 2 ], - [ "EOC_NETHER_EFFECT_CHECK_SUMMON_HOUNDS", 1 ] - ] - } - }, - { - "case": 235, - "effect": { - "weighted_list_eocs": [ - [ "EOC_DRAIN_EFFECT_CHECK_HEADACHE", 12 ], - [ "EOC_DRAIN_EFFECT_CHECK_EXTRA_ATTUNEMENT", 9 ], - [ "EOC_NETHER_EFFECT_CHECK_COLD_WIND", 6 ], - [ "EOC_DRAIN_EFFECT_CHECK_HEALTH_CHANGE", 6 ], - [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 12 ], - [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 8 ], - [ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 5 ], - [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 5 ], - [ "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT", 11 ], - [ "EOC_NETHER_EFFECT_CHECK_FEEDBACK", 8 ], - [ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 5 ], - [ "EOC_DRAIN_EFFECT_CHECK_WEAKNESS", 5 ], - [ "EOC_NETHER_EFFECT_CHECK_ATTENUATION", 8 ], - [ "EOC_NETHER_EFFECT_CHECK_BREATHING", 5 ], - [ "EOC_NETHER_EFFECT_CHECK_FORCE_WAVE", 5 ], - [ "EOC_NETHER_EFFECT_CHECK_NETHER_LIGHTNING", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_NO_PSIONICS", 3 ], - [ "EOC_NETHER_EFFECT_CHECK_SUMMON_HOUNDS", 2 ], - [ "EOC_NETHER_EFFECT_CHECK_MUTATION", 2 ], - [ "EOC_NETHER_EFFECT_CHECK_RIFT", 1 ] - ] - } - } + "weighted_list_eocs": [ + [ "EOC_DRAIN_EFFECT_CHECK_HEADACHE", 12 ], + [ "EOC_DRAIN_EFFECT_CHECK_EXTRA_ATTUNEMENT", 9 ], + [ "EOC_NETHER_EFFECT_CHECK_COLD_WIND", 6 ], + [ "EOC_DRAIN_EFFECT_CHECK_HEALTH_CHANGE", 6 ], + [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 12 ], + [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 8 ], + [ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 5 ], + [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 5 ], + [ "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT", 11 ], + [ "EOC_NETHER_EFFECT_CHECK_FEEDBACK", 8 ], + [ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 5 ], + [ "EOC_DRAIN_EFFECT_CHECK_WEAKNESS", 5 ], + [ "EOC_NETHER_EFFECT_CHECK_ATTENUATION", 8 ], + [ "EOC_NETHER_EFFECT_CHECK_BREATHING", 5 ], + [ "EOC_NETHER_EFFECT_CHECK_FORCE_WAVE", 5 ], + [ "EOC_NETHER_EFFECT_CHECK_NETHER_LIGHTNING", 3 ], + [ "EOC_NETHER_EFFECT_CHECK_NO_PSIONICS", 3 ], + [ "EOC_NETHER_EFFECT_CHECK_SUMMON_HOUNDS", 2 ], + [ "EOC_NETHER_EFFECT_CHECK_MUTATION", 2 ], + [ "EOC_NETHER_EFFECT_CHECK_RIFT", 1 ] ] } }, @@ -547,10 +355,10 @@ "type": "effect_on_condition", "id": "EOC_DRAIN_EFFECT_CHECK_HEADACHE", "//": "Base is 0.5% chance from 15 attunement to 60 attunement, then scaling up 0.1% per attunement up to 10.5% chance at 160 attunement, then scaling up 0.25% chance per attunement up to 33% chance at max, plus 1/10th the Difficulty squared.", - "condition": { - "and": [ - { "math": [ "u_vitamin('vitamin_psionic_drain') >= 15" ] }, - { + "condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 15" ] }, + "effect": [ + { + "if": { "x_in_y_chance": { "x": { "math": [ @@ -559,27 +367,28 @@ }, "y": 1000 } - } - ] - }, - "effect": [ - { "u_message": "As you unleash your powers, your head begins to throb.", "type": "bad" }, - { - "u_add_effect": "psionic_overload", - "duration": { - "math": [ "time(' 30 s') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) )" ] - } + }, + "then": [ + { "u_message": "Your head begins to throb.", "type": "bad" }, + { + "u_add_effect": "psionic_overload", + "duration": { + "math": [ "time(' 30 s') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) )" ] + } + } + ] } - ] + ], + "false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ] }, { "type": "effect_on_condition", "id": "EOC_NETHER_EFFECT_CHECK_COLD_WIND", "//": "Base is 3% chance from 15 attunement to 50 attunement, then scaling up 0.1% per attunement up to 11% chance at 130 attunement, then scaling up 0.25% chance per attunement up to 41% chance at max, plus 1/10th the Difficulty squared.", - "condition": { - "and": [ - { "math": [ "u_vitamin('vitamin_psionic_drain') >= 15" ] }, - { + "condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 15" ] }, + "effect": [ + { + "if": { "x_in_y_chance": { "x": { "math": [ @@ -588,22 +397,23 @@ }, "y": 1000 } - } - ] - }, - "effect": [ - { "u_message": "As you unleash your powers, the temperature suddenly drops!", "type": "bad" }, - { "u_cast_spell": { "id": "nether_attunement_cold_chill", "hit_self": true } } - ] + }, + "then": [ + { "u_message": "The temperature suddenly drops!", "type": "bad" }, + { "u_cast_spell": { "id": "nether_attunement_cold_chill", "hit_self": true } } + ] + } + ], + "false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ] }, { "type": "effect_on_condition", "id": "EOC_DRAIN_EFFECT_CHECK_EXTRA_ATTUNEMENT", "//": "Base is 2% chance from 15 attunement to 150 attunement, then scaling up 0.05% per attunement up 10.5% chance at 160 attunement, then scaling up 0.25% chance per attunement up to 33% chance at max, plus 1/10th the Difficulty squared.", - "condition": { - "and": [ - { "math": [ "u_vitamin('vitamin_psionic_drain') >= 15" ] }, - { + "condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 15" ] }, + "effect": [ + { + "if": { "x_in_y_chance": { "x": { "math": [ @@ -612,22 +422,23 @@ }, "y": 1000 } - } - ] - }, - "effect": [ - { "u_message": "As you unleash your powers, you feel a strange tingling sensation.", "type": "mixed" }, - { "math": [ "u_vitamin('vitamin_psionic_drain')", "+=", "rand(5) + 2" ] } - ] + }, + "then": [ + { "u_message": "You feel a strange tingling sensation.", "type": "mixed" }, + { "math": [ "u_vitamin('vitamin_psionic_drain')", "+=", "rand(5) + 2" ] } + ] + } + ], + "false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ] }, { "type": "effect_on_condition", "id": "EOC_DRAIN_EFFECT_CHECK_HEALTH_CHANGE", "//": "Base is 1.5% chance from 25 attunement to 70 attunement, then scaling up 0.1% per attunement up to 6.5% chance at 120 attunement, then scaling up 0.2% chance per attunement up to 32.5% chance at max, plus 1/10th the Difficulty squared.", - "condition": { - "and": [ - { "math": [ "u_vitamin('vitamin_psionic_drain') >= 25" ] }, - { + "condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 25" ] }, + "effect": [ + { + "if": { "x_in_y_chance": { "x": { "math": [ @@ -636,36 +447,26 @@ }, "y": 1000 } - } - ] - }, - "effect": [ - { - "run_eocs": [ + }, + "then": [ { - "id": "EOC_DRAIN_EFFECT_CHECK_HEALTH_CHANGE_2", - "condition": { "math": [ "rand(1) >= 1" ] }, - "effect": [ - { "u_add_effect": "effect_nether_attunement_health_bonus", "duration": "30 seconds" }, - { "u_message": "As you unleash your powers, you bloom with vitality.", "type": "good" } - ], - "false_effect": [ - { "u_add_effect": "effect_nether_attunement_health_penalty", "duration": "30 seconds" }, - { "u_message": "As you unleash your powers, you are struck with malaise.", "type": "bad" } - ] + "if": { "math": [ "rand(2) >= 2" ] }, + "then": [ { "math": [ "u_health() += (rand(25) + 5)" ] }, { "u_message": "You feel filled with vigor.", "type": "good" } ], + "else": [ { "math": [ "u_health() -= (rand(25) + 5)" ] }, { "u_message": "You feel drained of vitality.", "type": "bad" } ] } ] } - ] + ], + "false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ] }, { "type": "effect_on_condition", "id": "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", "//": "Base is 1% chance from 25 attunement to 60 attunement, then scaling up 0.1% per attunement up to 12% chance at 150 attunement, then scaling up 0.25% chance per attunement up to 37% chance at max, plus 1/10th the Difficulty squared.", - "condition": { - "and": [ - { "math": [ "u_vitamin('vitamin_psionic_drain') >= 25" ] }, - { + "condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 25" ] }, + "effect": [ + { + "if": { "x_in_y_chance": { "x": { "math": [ @@ -674,23 +475,24 @@ }, "y": 1000 } - } - ] - }, - "effect": [ - { "u_message": "As you unleash your powers, blood drips from your nose.", "type": "bad" }, - { "u_add_effect": "bleed", "intensity": 1, "target_part": "head", "duration": "5 minutes" }, - { "math": [ "u_hp('head')", "-=", "1" ] } - ] + }, + "then": [ + { "u_message": "Blood drips from your nose.", "type": "bad" }, + { "u_add_effect": "bleed", "intensity": 1, "target_part": "head", "duration": "5 minutes" }, + { "math": [ "u_hp('head')", "-=", "1" ] } + ] + } + ], + "false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ] }, { "type": "effect_on_condition", "id": "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", "//": "Base is 2% chance from 50 attunement to 100 attunement, then scaling up 0.1% per attunement up to 8% chance at 160 attunement, then scaling up 0.28% chance per attunement up to 17.2% chance at 200 attunement, then scaling up 0.18% to 26.2% chance at max, plus 1/10th the Difficulty squared.", - "condition": { - "and": [ - { "math": [ "u_vitamin('vitamin_psionic_drain') >= 50" ] }, - { + "condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 50" ] }, + "effect": [ + { + "if": { "x_in_y_chance": { "x": { "math": [ @@ -699,22 +501,23 @@ }, "y": 1000 } - } - ] - }, - "effect": [ - { "u_message": "As you unleash your powers, they take more out of you than you expected.", "type": "bad" }, - { "math": [ "u_val('stamina')", "-=", "rng(3000,9000)" ] } - ] + }, + "then": [ + { "u_message": "You feel a sudden wave of fatigue.", "type": "bad" }, + { "math": [ "u_val('stamina')", "-=", "rng(3000,9000)" ] } + ] + } + ], + "false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ] }, { "type": "effect_on_condition", "id": "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", "//": "Base is 2% chance from 70 attunement to 125 attunement, then scaling up 0.15% per attunement up to 9.5% chance at 175 attunement, then scaling up 0.45% chance per attunement up to 32% chance at 225 attunement, then scaling up 0.3% to 39.5% chance at max, plus 1/10th the Difficulty squared.", - "condition": { - "and": [ - { "math": [ "u_vitamin('vitamin_psionic_drain') >= 70" ] }, - { + "condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 70" ] }, + "effect": [ + { + "if": { "x_in_y_chance": { "x": { "math": [ @@ -723,62 +526,53 @@ }, "y": 1000 } - } - ] - }, - "effect": [ - { "u_message": "As you unleash your powers, you feel tired.", "type": "bad" }, - { "math": [ "u_val('sleepiness')", "+=", "rng(30,90)" ] } - ] + }, + "then": [ + { "u_message": "You feel a sudden wave of exhaustion and stifle a yawn.", "type": "bad" }, + { "math": [ "u_val('sleepiness')", "+=", "rng(30,90)" ] } + ] + } + ], + "false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ] }, { "type": "effect_on_condition", "id": "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT", "//": "Base is 3% chance from 70 attunement to 90 attunement, then scaling up 0.15% per attunement up to 15.75% chance at 175 attunement, then scaling up 0.3% chance per attunement up to 38.25% chance at max, plus 1/10th the Difficulty squared.", - "condition": { - "and": [ - { "math": [ "u_vitamin('vitamin_psionic_drain') >= 70" ] }, - { + "condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 70" ] }, + "effect": [ + { + "if": { "x_in_y_chance": { "x": { "math": [ - "( clamp( ((u_vitamin('vitamin_psionic_drain') - 90) * 1.5), 0, 120) + clamp( ( (u_vitamin('vitamin_psionic_drain') - 175) * 1.5 ), 0, 375) + (nether_attune_difficulty_scaler(u_latest_channeled_power_difficulty)) + 30)" + "( clamp( ( (u_vitamin('vitamin_psionic_drain') - 90) * 1.5), 0, 120) + clamp( ( (u_vitamin('vitamin_psionic_drain') - 175) * 1.5 ), 0, 375) + (nether_attune_difficulty_scaler(u_latest_channeled_power_difficulty)) + 30)" ] }, "y": 1000 } - } - ] - }, - "effect": { - "run_eocs": [ - { - "id": "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT_2", - "condition": { "not": { "u_has_proficiency": "effect_nether_attunement_attenuation" } }, - "effect": [ - { - "u_message": "As you unleash your powers, you feel a strange tingling sensation that does not go away.", - "type": "mixed" - }, - { - "u_add_effect": "effect_nether_attunement_raiser", - "duration": { - "math": [ "time(' 10 m') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) )" ] - } + }, + "then": [ + { "u_message": "You feel a strange tingling sensation that does not go away.", "type": "mixed" }, + { + "u_add_effect": "effect_nether_attunement_raiser", + "duration": { + "math": [ "time(' 10 m') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) )" ] } - ] - } - ] - } + } + ] + } + ], + "false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ] }, { "type": "effect_on_condition", "id": "EOC_NETHER_EFFECT_CHECK_FEEDBACK", "//": "Base is 3% chance from 100 attunement to 135 attunement, then scaling up 0.1% per attunement up to 7.5% chance at 175 attunement, then scaling up 0.25% chance per attunement up to 32% chance at 210 attunement, then scaling up 0.5% to 39.5% chance at max, plus 1/10th the Difficulty squared.", - "condition": { - "and": [ - { "math": [ "u_vitamin('vitamin_psionic_drain') >= 100" ] }, - { + "condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 100" ] }, + "effect": [ + { + "if": { "x_in_y_chance": { "x": { "math": [ @@ -787,28 +581,29 @@ }, "y": 1000 } - } - ] - }, - "effect": [ - { "u_message": "As you unleash your powers, you feel a stabbing pain!", "type": "good" }, - { "math": [ "u_pain()", "+=", "rand(7) + 3" ] }, - { - "u_add_effect": "effect_nether_attunement_feedback", - "duration": { - "math": [ "time(' 2 m') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) )" ] - } + }, + "then": [ + { "u_message": "You feel a stabbing pain!", "type": "good" }, + { "math": [ "u_pain()", "+=", "rand(7) + 3" ] }, + { + "u_add_effect": "effect_nether_attunement_feedback", + "duration": { + "math": [ "time(' 2 m') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) )" ] + } + } + ] } - ] + ], + "false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ] }, { "type": "effect_on_condition", "id": "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", "//": "Base is 1.5% chance from 80 attunement to 120 attunement, then scaling up 0.1% per attunement up to 7.5% chance at 180 attunement, then scaling up 0.45% chance per attunement up to 32% chance at 225 attunement, then scaling up 0.3% to 39.5% chance at max, plus 1/10th the Difficulty squared.", - "condition": { - "and": [ - { "math": [ "u_vitamin('vitamin_psionic_drain') >= 85" ] }, - { + "condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 85" ] }, + "effect": [ + { + "if": { "x_in_y_chance": { "x": { "math": [ @@ -817,25 +612,26 @@ }, "y": 1000 } - } - ] - }, - "effect": [ - { "u_message": "As you unleash your powers, you feel a surge of strength!", "type": "good" }, - { - "u_add_effect": "effect_nether_attunement_power_surge", - "duration": { "math": [ "u_vitamin('vitamin_psionic_drain') * rng(1,10)" ] } + }, + "then": [ + { "u_message": "You feel a surge of strength!", "type": "good" }, + { + "u_add_effect": "effect_nether_attunement_power_surge", + "duration": { "math": [ "u_vitamin('vitamin_psionic_drain') * rng(1,10)" ] } + } + ] } - ] + ], + "false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ] }, { "type": "effect_on_condition", "id": "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", "//": "Base is 1% chance from 85 attunement to 120 attunement, then scaling up 0.1% per attunement up to 8% chance at 190 attunement, then scaling up 0.35% chance per attunement up to 29% chance at max, plus 1/10th the Difficulty squared.", - "condition": { - "and": [ - { "math": [ "u_vitamin('vitamin_psionic_drain') >= 85" ] }, - { + "condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 85" ] }, + "effect": [ + { + "if": { "x_in_y_chance": { "x": { "math": [ @@ -844,27 +640,28 @@ }, "y": 1000 } - } - ] - }, - "effect": [ - { "u_message": "As you unleash your powers, your skin feels tight!", "type": "bad" }, - { - "u_add_effect": "effect_psi_teleport_lock", - "duration": { - "math": [ "time(' 30 s') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) )" ] - } + }, + "then": [ + { "u_message": "Your skin feels tight!", "type": "bad" }, + { + "u_add_effect": "effect_psi_teleport_lock", + "duration": { + "math": [ "time(' 30 s') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) )" ] + } + } + ] } - ] + ], + "false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ] }, { "type": "effect_on_condition", "id": "EOC_DRAIN_EFFECT_CHECK_WEAKNESS", "//": "Base is 2% chance from 100 attunement to 150 attunement, then scaling up 0.1% per attunement up to 9% chance at 220 attunement, then scaling up 0.5% chance per attunement up to 24% chance at max, plus 1/10th the Difficulty squared.", - "condition": { - "and": [ - { "math": [ "u_vitamin('vitamin_psionic_drain') >= 100" ] }, - { + "condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 100" ] }, + "effect": [ + { + "if": { "x_in_y_chance": { "x": { "math": [ @@ -873,27 +670,28 @@ }, "y": 1000 } - } - ] - }, - "effect": [ - { "u_message": "As you unleash your powers, your muscles tremble and weaken.", "type": "bad" }, - { - "u_add_effect": "effect_biokin_overload", - "duration": { - "math": [ "time(' 30 s') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) )" ] - } + }, + "then": [ + { "u_message": "Your muscles tremble and weaken.", "type": "bad" }, + { + "u_add_effect": "effect_biokin_overload", + "duration": { + "math": [ "time(' 30 s') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) )" ] + } + } + ] } - ] + ], + "false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ] }, { "type": "effect_on_condition", "id": "EOC_NETHER_EFFECT_CHECK_ATTENUATION", "//": "Base is 4% chance from 125 attunement to 160 attunement, then scaling up 0.15% per attunement up to 11.5% chance at 210 attunement, then scaling up 0.35% chance per attunement up to 25.5% chance at max, plus 1/10th the Difficulty squared.", - "condition": { - "and": [ - { "math": [ "u_vitamin('vitamin_psionic_drain') >= 125" ] }, - { + "condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 125" ] }, + "effect": [ + { + "if": { "x_in_y_chance": { "x": { "math": [ @@ -902,35 +700,28 @@ }, "y": 1000 } - } - ] - }, - "effect": { - "run_eocs": [ - { - "id": "EOC_NETHER_EFFECT_CHECK_ATTENUATION_2", - "condition": { "not": { "u_has_proficiency": "effect_nether_attunement_raiser" } }, - "effect": [ - { "u_message": "As you unleash your powers, the flow of energy slows to a trickle!", "type": "bad" }, - { - "u_add_effect": "effect_nether_attunement_attenuation", - "duration": { - "math": [ "time(' 30 s') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) )" ] - } + }, + "then": [ + { "u_message": "The flow of Netherum energy resists your control.", "type": "bad" }, + { + "u_add_effect": "effect_nether_attunement_attenuation", + "duration": { + "math": [ "time(' 30 s') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) )" ] } - ] - } - ] - } + } + ] + } + ], + "false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ] }, { "type": "effect_on_condition", "id": "EOC_NETHER_EFFECT_CHECK_BREATHING", "//": "Base is 2% chance from 100 attunement to 150 attunement, then scaling up 0.1% per attunement up to 9% chance at 220 attunement, then scaling up 0.5% chance per attunement up to 24% chance at max, plus 1/10th the Difficulty squared.", - "condition": { - "and": [ - { "math": [ "u_vitamin('vitamin_psionic_drain') >= 100" ] }, - { + "condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 100" ] }, + "effect": [ + { + "if": { "x_in_y_chance": { "x": { "math": [ @@ -939,27 +730,28 @@ }, "y": 1000 } - } - ] - }, - "effect": [ - { "u_message": "As you unleash your powers, you gasp and your breath gives out.", "type": "bad" }, - { - "u_add_effect": "effect_psi_reduced_breathing", - "duration": { - "math": [ "time(' 30 s') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) )" ] - } + }, + "then": [ + { "u_message": "You gasp and your breath gives out.", "type": "bad" }, + { + "u_add_effect": "effect_psi_reduced_breathing", + "duration": { + "math": [ "time(' 30 s') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) )" ] + } + } + ] } - ] + ], + "false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ] }, { "type": "effect_on_condition", "id": "EOC_NETHER_EFFECT_CHECK_HALLUCINATIONS", "//": "Base is 1% chance from 125 attunement to 160 attunement, then scaling up 0.1% per attunement up to 6% chance at 210 attunement, then scaling up 0.35% chance per attunement up to 20% chance at max, plus 1/10th the Difficulty squared.", - "condition": { - "and": [ - { "math": [ "u_vitamin('vitamin_psionic_drain') >= 125" ] }, - { + "condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 125" ] }, + "effect": [ + { + "if": { "x_in_y_chance": { "x": { "math": [ @@ -968,27 +760,28 @@ }, "y": 1000 } - } - ] - }, - "effect": [ - { "u_message": "As you unleash your powers, you begin to feel a sudden sense of dread and paranoia!", "type": "bad" }, - { - "u_add_effect": "hallu", - "duration": { - "math": [ "time(' 90 s') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) )" ] - } + }, + "then": [ + { "u_message": "You begin to feel a sudden sense of dread and paranoia!", "type": "bad" }, + { + "u_add_effect": "hallu", + "duration": { + "math": [ "time(' 90 s') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) )" ] + } + } + ] } - ] + ], + "false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ] }, { "type": "effect_on_condition", "id": "EOC_NETHER_EFFECT_CHECK_FORCE_WAVE", "//": "Base is 3% chance from 125 attunement to 160 attunement, then scaling up 0.15% per attunement up to 9.75% chance at 205 attunement, then scaling up 0.45% chance per attunement up to 29.75% chance at max, plus 1/10th the Difficulty squared.", - "condition": { - "and": [ - { "math": [ "u_vitamin('vitamin_psionic_drain') >= 125" ] }, - { + "condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 125" ] }, + "effect": [ + { + "if": { "x_in_y_chance": { "x": { "math": [ @@ -997,22 +790,23 @@ }, "y": 1000 } - } - ] - }, - "effect": [ - { "u_message": "As you unleash your powers, a soundless explosion hurls you off your feet.", "type": "bad" }, - { "u_cast_spell": { "id": "nether_attunement_everyone_downed", "hit_self": true } } - ] + }, + "then": [ + { "u_message": "A soundless explosion hurls you off your feet.", "type": "bad" }, + { "u_cast_spell": { "id": "nether_attunement_everyone_downed", "hit_self": true } } + ] + } + ], + "false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ] }, { "type": "effect_on_condition", "id": "EOC_NETHER_EFFECT_CHECK_NO_PSIONICS", "//": "Base is 2% chance from 150 attunement to 200 attunement, then scaling up 0.15% per attunement up to 5.75% chance at 225 attunement, then scaling up 0.5% chance per attunement up to 18.25% chance at max, plus 1/10th the Difficulty squared.", - "condition": { - "and": [ - { "math": [ "u_vitamin('vitamin_psionic_drain') >= 150" ] }, - { + "condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 150" ] }, + "effect": [ + { + "if": { "x_in_y_chance": { "x": { "math": [ @@ -1021,31 +815,29 @@ }, "y": 1000 } - } - ] - }, - "effect": [ - { - "u_message": "As you unleash your powers, the flow of Nether energy you are channeling is suddenly cut off!", - "type": "bad" - }, - { - "u_add_effect": "effect_psi_null_unbound", - "duration": { - "math": [ "time(' 3 m') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) )" ] - } - }, - { "u_add_effect": "effect_psi_neutralized", "duration": 2 } - ] + }, + "then": [ + { "u_message": "The flow of Nether energy is suddenly cut off!", "type": "bad" }, + { + "u_add_effect": "effect_psi_null_unbound", + "duration": { + "math": [ "time(' 3 m') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) )" ] + } + }, + { "u_add_effect": "effect_psi_neutralized", "duration": 2 } + ] + } + ], + "false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ] }, { "type": "effect_on_condition", "id": "EOC_NETHER_EFFECT_CHECK_NETHER_LIGHTNING", "//": "Base is 3% chance from 175 attunement to 200 attunement, then scaling up 0.2% per attunement up to 8% chance at 225 attunement, then scaling up 0.45% chance per attunement up to 19.25% chance at max, plus 1/10th the Difficulty squared.", - "condition": { - "and": [ - { "math": [ "u_vitamin('vitamin_psionic_drain') >= 175" ] }, - { + "condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 175" ] }, + "effect": [ + { + "if": { "x_in_y_chance": { "x": { "math": [ @@ -1054,13 +846,14 @@ }, "y": 1000 } - } - ] - }, - "effect": [ - { "u_message": "As you unleash your powers, crackling energy erupts all around you!", "type": "bad" }, - { "u_cast_spell": { "id": "nether_attunement_nether_lightning", "hit_self": false } } - ] + }, + "then": [ + { "u_message": "Crackling energy erupts all around you!", "type": "bad" }, + { "u_cast_spell": { "id": "nether_attunement_nether_lightning", "hit_self": false } } + ] + } + ], + "false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ] }, { "type": "effect_on_condition", @@ -1069,8 +862,12 @@ "condition": { "and": [ { "or": [ { "u_has_effect": "psi_nether_attention" }, { "u_has_effect": "effect_nether_attunement_raiser" } ] }, - { "math": [ "u_vitamin('vitamin_psionic_drain') >= 200" ] }, - { + { "math": [ "u_vitamin('vitamin_psionic_drain') >= 200" ] } + ] + }, + "effect": [ + { + "if": { "x_in_y_chance": { "x": { "math": [ @@ -1079,22 +876,23 @@ }, "y": 1000 } - } - ] - }, - "effect": [ - { "u_add_effect": "tindrift", "duration": "1 day" }, - { "u_message": "As you unleash your powers, you feel a horrible sensation of watching eyes.", "type": "bad" } - ] + }, + "then": [ + { "u_add_effect": "tindrift", "duration": "1 day" }, + { "u_message": "You feel a horrible sensation of watching eyes.", "type": "bad" } + ] + } + ], + "false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ] }, { "type": "effect_on_condition", "id": "EOC_NETHER_EFFECT_CHECK_MUTATION", "//": "Base is 3% chance at 235 attunement, scaling up 0.2% per attunement up to 6% chance at 250 attunement, plus 1/10th the Difficulty squared.", - "condition": { - "and": [ - { "math": [ "u_vitamin('vitamin_psionic_drain') >= 235" ] }, - { + "condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 235" ] }, + "effect": [ + { + "if": { "x_in_y_chance": { "x": { "math": [ @@ -1103,13 +901,14 @@ }, "y": 1000 } - } - ] - }, - "effect": [ - { "run_eocs": "EOC_NETHER_ATTUNEMENT_MUTATION_GAINER" }, - { "u_message": "As you unleash your powers, feel an internal wrenching sensation.", "type": "bad" } - ] + }, + "then": [ + { "run_eocs": "EOC_NETHER_ATTUNEMENT_MUTATION_GAINER" }, + { "u_message": "You feel an internal wrenching sensation.", "type": "bad" } + ] + } + ], + "false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ] }, { "type": "effect_on_condition", @@ -1118,8 +917,12 @@ "condition": { "and": [ { "or": [ { "u_has_effect": "psi_nether_attention" }, { "u_has_effect": "effect_nether_attunement_raiser" } ] }, - { "math": [ "u_vitamin('vitamin_psionic_drain') >= 235" ] }, - { + { "math": [ "u_vitamin('vitamin_psionic_drain') >= 235" ] } + ] + }, + "effect": [ + { + "if": { "x_in_y_chance": { "x": { "math": [ @@ -1128,13 +931,14 @@ }, "y": 1000 } - } - ] - }, - "effect": [ - { "u_set_field": "fd_fatigue", "radius": 0, "intensity": 3, "hit_player": false }, - { "u_message": "As you unleash your powers, the air around you twists and warps in on itself.", "type": "bad" } - ] + }, + "then": [ + { "u_set_field": "fd_fatigue", "radius": 0, "intensity": 3, "hit_player": false }, + { "u_message": "The air around you twists and warps in on itself.", "type": "bad" } + ] + } + ], + "false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ] }, { "type": "effect_on_condition", diff --git a/data/mods/MindOverMatter/effectoncondition/eoc_on_power_use_events.json b/data/mods/MindOverMatter/effectoncondition/eoc_on_power_use_events.json index 0767b47ed7c6d..b6c1b144e4d2f 100644 --- a/data/mods/MindOverMatter/effectoncondition/eoc_on_power_use_events.json +++ b/data/mods/MindOverMatter/effectoncondition/eoc_on_power_use_events.json @@ -618,7 +618,8 @@ }, { "math": [ "u_skill_exp('metaphysics', 'format': 'raw')", "+=", "(15 * u_latest_channeled_power_difficulty)" ] - } + }, + { "run_eocs": "EOC_CONCENTRATION_CHECK_FOR_NETHER_ATTUNEMENT_BACKLASH" } ], "false_effect": [ { @@ -627,6 +628,7 @@ "EOC_CONCENTRATION_IN_NETHER_AREAS_ATTUNEMENT", "EOC_NETHER_ATTUNEMENT_FEEDBACK_CHECK_CONCENTRATION", "EOC_CONCENTRATION_SUCCESS_REDUCE_FOCUS", + "EOC_CONCENTRATION_CHECK_FOR_NETHER_ATTUNEMENT_BACKLASH", "EOC_CONCENTRATION_VS_LIMIT_CALCULATIONS" ] }, @@ -687,6 +689,20 @@ "condition": { "and": [ { "math": [ "u_vitamin('vitamin_maintained_powers') > 0" ] }, { "math": [ "u_val('focus') >= 20" ] } ] }, "effect": [ { "math": [ "u_val('focus')", "-=", "5" ] } ] }, + { + "type": "effect_on_condition", + "id": "EOC_CONCENTRATION_CHECK_FOR_NETHER_ATTUNEMENT_BACKLASH", + "condition": { + "and": [ + { "math": [ "u_vitamin('vitamin_psionic_drain') >= 15" ] }, + { "x_in_y_chance": { "x": { "math": [ "u_vitamin('vitamin_psionic_drain')" ] }, "y": 2500 } } + ] + }, + "effect": [ + { "u_message": "Your concentration wavers for just a moment.", "type": "bad" }, + { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } + ] + }, { "type": "effect_on_condition", "id": "EOC_PSIONICS_CHANNEL_MAINTENANCE_CHECK", diff --git a/data/mods/MindOverMatter/effects/effects_nether_attunement.json b/data/mods/MindOverMatter/effects/effects_nether_attunement.json index 533f771c876d3..60c2ba343e4dd 100644 --- a/data/mods/MindOverMatter/effects/effects_nether_attunement.json +++ b/data/mods/MindOverMatter/effects/effects_nether_attunement.json @@ -87,8 +87,8 @@ "type": "effect_type", "id": "effect_nether_attunement_attenuation", "name": [ "Nether Attenuation" ], - "desc": [ "You feel strangely listless." ], - "remove_message": "The listless feeling vanishes.", + "desc": [ "You have to work extra hard to draw enough energy to use your powers." ], + "remove_message": "Your difficulty in drawing on the Nether fades.", "enchantments": [ { "values": [ { "value": "CASTING_TIME_MULTIPLIER", "multiply": 4 } ] } ] }, { diff --git a/data/mods/MindOverMatter/itemgroups/feral_deathdrops.json b/data/mods/MindOverMatter/itemgroups/feral_deathdrops.json index e9e5f5e2de633..446fd698f7284 100644 --- a/data/mods/MindOverMatter/itemgroups/feral_deathdrops.json +++ b/data/mods/MindOverMatter/itemgroups/feral_deathdrops.json @@ -222,7 +222,7 @@ "entries": [ { "item": "heavy_flashlight", "prob": 75, "damage": [ 2, 4 ] }, { "item": "tazer", "prob": 50, "damage": [ 2, 4 ] }, - { "item": "grenade_inferno", "prob": 20 }, + { "item": "grenade_inferno", "prob": 2 }, { "group": "cop_gloves", "prob": 30, "damage": [ 1, 4 ] }, { "group": "security_pants", "damage": [ 1, 4 ] }, { "group": "security_shoes", "prob": 70, "damage": [ 1, 4 ] }, @@ -234,6 +234,10 @@ { "group": "feral_humans_crystal_drops_bio", "prob": 25 }, { "group": "feral_humans_crystal_drops_clair", "prob": 25 }, { "group": "feral_humans_crystal_drops_vita", "prob": 25 }, + { + "distribution": [ { "item": "grenade_anti_psi", "prob": 50 }, { "item": "grenade_anti_psi_expended", "prob": 50 } ], + "prob": 25 + }, { "group": "dist_shield_belts", "prob": 25, "damage": [ 1, 4 ] } ] }, @@ -242,7 +246,7 @@ "type": "item_group", "subtype": "collection", "entries": [ - { "item": "grenade_inferno", "prob": 20 }, + { "item": "grenade_inferno", "prob": 2 }, { "group": "cop_gloves", "prob": 30, "damage": [ 1, 4 ] }, { "group": "security_pants", "damage": [ 1, 4 ] }, { "group": "security_shoes", "prob": 70, "damage": [ 1, 4 ] }, @@ -257,6 +261,10 @@ { "group": "feral_humans_crystal_drops_vita", "prob": 25 }, { "item": "phavian_psionic_martial_power_book", "prob": 8 }, { "group": "dist_psionic_shield_belts", "prob": 60, "damage": [ 1, 4 ] }, + { + "distribution": [ { "item": "grenade_anti_psi", "prob": 50 }, { "item": "grenade_anti_psi_expended", "prob": 50 } ], + "prob": 25 + }, { "item": "psionic_mindsight_glasses", "prob": 2, "damage": [ 1, 4 ] } ] } diff --git a/data/mods/MindOverMatter/items/armor/belt.json b/data/mods/MindOverMatter/items/armor/belt.json index e53ffcfc6f191..7218b0b08a1f6 100644 --- a/data/mods/MindOverMatter/items/armor/belt.json +++ b/data/mods/MindOverMatter/items/armor/belt.json @@ -147,7 +147,7 @@ { "has": "WORN", "condition": "ACTIVE", - "name": "Active Suppresion Belt", + "name": "Active Suppression Belt", "description": "The air around you feels cool.", "incoming_damage_mod": [ { "type": "heat", "multiply": -1 } ], "values": [ { "value": "CLIMATE_CONTROL_CHILL", "add": 1000 } ], diff --git a/data/mods/MindOverMatter/items/armor/head.json b/data/mods/MindOverMatter/items/armor/head.json index e5ce5403f66e7..b187a31bf042f 100644 --- a/data/mods/MindOverMatter/items/armor/head.json +++ b/data/mods/MindOverMatter/items/armor/head.json @@ -82,7 +82,7 @@ { "condition": { "test_eoc": "EOC_CONDITION_HAS_MIND" }, "distance": 20, - "descriptions": [ { "id": "moving_creature", "symbol": "?", "color": "c_white", "text": "You sense something moving here." } ] + "descriptions": [ { "id": "sense_minds", "symbol": "?", "color": "c_white", "text": "You sense a sapient mind here." } ] } ] } diff --git a/data/mods/MindOverMatter/items/weapons.json b/data/mods/MindOverMatter/items/weapons.json index d5f7a01018a47..da1fa33ee7285 100644 --- a/data/mods/MindOverMatter/items/weapons.json +++ b/data/mods/MindOverMatter/items/weapons.json @@ -51,6 +51,68 @@ "revert_to": "canister_empty", "flags": [ "ACT_IN_FIRE", "BOMB", "TRADER_AVOID", "DANGEROUS" ] }, + { + "id": "grenade_anti_psi", + "type": "TOOL", + "category": "weapons", + "looks_like": "grenade", + "name": { "str": "null grenade" }, + "description": "A strange grenade, designed like nothing you've seen before. It's round, with flat black crystalline panels like television screens on four sides, and two buttons on either end. On both of the buttons is a large Ψ, surrounded by a circle with a line through it.", + "weight": "397 g", + "volume": "540 ml", + "price": "10000 USD", + "price_postapoc": "200 USD", + "material": [ "steel", "plastic", "nether_crystal" ], + "symbol": "*", + "color": "dark_gray", + "use_action": { + "need_wielding": true, + "target": "grenade_anti_psi_act", + "msg": "You press the buttons on the sides of the null grenade.", + "target_timer": "5 seconds", + "menu_text": "Push buttons", + "type": "transform" + }, + "flags": [ "GRENADE" ], + "melee_damage": { "bash": 6 } + }, + { + "id": "grenade_anti_psi_act", + "type": "TOOL", + "category": "weapons", + "name": { "str": "active null grenade" }, + "description": "This null grenade is activate and ready to unleash its pulse. You'd better throw it!", + "weight": "397 g", + "volume": "270 ml", + "price": "0 cent", + "price_postapoc": "0 cent", + "to_hit": -1, + "material": [ "steel", "plastic", "nether_crystal" ], + "symbol": "*", + "color": "dark_gray", + "use_action": { "type": "message", "message": "The %s is already active, try throwing it instead.", "name": "Push buttons" }, + "countdown_action": { "type": "cast_spell", "spell_id": "grenade_anti_psi_explosion", "no_fail": true, "level": 0 }, + "countdown_interval": "5 seconds", + "flags": [ "BOMB", "TRADER_AVOID", "DANGEROUS" ], + "revert_to": "grenade_anti_psi_expended", + "melee_damage": { "bash": 6 } + }, + { + "id": "grenade_anti_psi_expended", + "type": "TOOL", + "category": "weapons", + "looks_like": "grenade", + "name": { "str": "expended null grenade" }, + "description": "A strange grenade, designed like nothing you've seen before. It's round, with flat black crystalline panels like television screens on four sides, and two buttons on either end. On both of the buttons is a large Ψ, surrounded by a circle with a line through it. The buttons on either end are depressed.", + "weight": "397 g", + "volume": "540 ml", + "price": "10000 USD", + "price_postapoc": "0 USD", + "material": [ "steel", "plastic", "nether_crystal" ], + "symbol": "*", + "color": "dark_gray", + "melee_damage": { "bash": 6 } + }, { "id": "mom_pulse_rifle", "looks_like": "ar15", diff --git a/data/mods/MindOverMatter/mapgen/nested/skyscraper_lab_modular.json b/data/mods/MindOverMatter/mapgen/nested/skyscraper_lab_modular.json index e1837ace0adfa..01329d5fe904c 100644 --- a/data/mods/MindOverMatter/mapgen/nested/skyscraper_lab_modular.json +++ b/data/mods/MindOverMatter/mapgen/nested/skyscraper_lab_modular.json @@ -906,7 +906,7 @@ "method": "json", "weight": 500, "//": "A nested map for the Phavian secret skyscraper lab room north on the north side, door in the upper right. This is a server room.", - "nested_mapgen_id": "phavian_skyscraper_lab_north_urdoor", + "nested_mapgen_id": "phavian_skyscraper_lab_south_urdoor", "object": { "mapgensize": [ 9, 9 ], "rotation": [ 0, 3 ], @@ -931,7 +931,7 @@ "method": "json", "weight": 500, "//": "A nested map for the Phavian secret skyscraper lab room north on the north side, door in the upper left. This is a server room.", - "nested_mapgen_id": "phavian_skyscraper_lab_north_uldoor", + "nested_mapgen_id": "phavian_skyscraper_lab_south_uldoor", "object": { "mapgensize": [ 9, 9 ], "rotation": [ 0, 3 ], diff --git a/data/mods/MindOverMatter/mapgen/phavian_office.json b/data/mods/MindOverMatter/mapgen/phavian_office.json index 2d5f184fca2e0..0be255c7f32fd 100644 --- a/data/mods/MindOverMatter/mapgen/phavian_office.json +++ b/data/mods/MindOverMatter/mapgen/phavian_office.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "office_cubical_phavian" ], - "weight": 50000, "object": { "fill_ter": "t_floor", "rows": [ diff --git a/data/mods/MindOverMatter/mapgen/skyscraper_lab/skyscraper_lab.json b/data/mods/MindOverMatter/mapgen/skyscraper_lab/skyscraper_lab.json index a5e47fef82be4..488f273b21190 100644 --- a/data/mods/MindOverMatter/mapgen/skyscraper_lab/skyscraper_lab.json +++ b/data/mods/MindOverMatter/mapgen/skyscraper_lab/skyscraper_lab.json @@ -6,7 +6,6 @@ [ "phavan_office_skyscraper_lab_lower_sw", "phavan_office_skyscraper_lab_lower_se" ] ], "method": "json", - "weight": 250, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -83,6 +82,7 @@ { "chunks": [ "phavian_skyscraper_lab_break_area_4x4" ], "x": 28, "y": 27 }, { "chunks": [ "phavian_skyscraper_lab_break_area_4x4" ], "x": 32, "y": 27 } ], + "item": { "l": [ { "item": "grenade_anti_psi", "chance": 15 } ] }, "items": { "e": { "item": "fridgesnacks", "chance": 80, "repeat": [ 1, 12 ] }, "l": { "item": "feral_security_death_drops_9mm", "chance": 80, "repeat": [ 1, 3 ] }, @@ -135,7 +135,6 @@ [ "phavan_office_skyscraper_lab_middle_sw", "phavan_office_skyscraper_lab_middle_se" ] ], "method": "json", - "weight": 250, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -212,6 +211,7 @@ { "chunks": [ "phavian_skyscraper_lab_break_area_4x4" ], "x": 28, "y": 27 }, { "chunks": [ "phavian_skyscraper_lab_break_area_4x4" ], "x": 32, "y": 27 } ], + "item": { "l": [ { "item": "grenade_anti_psi", "chance": 15 } ] }, "items": { "e": { "item": "fridgesnacks", "chance": 80, "repeat": [ 1, 12 ] }, "l": { "item": "feral_security_death_drops_9mm", "chance": 80, "repeat": [ 1, 3 ] }, @@ -264,7 +264,6 @@ [ "phavan_office_skyscraper_lab_upper_sw", "phavan_office_skyscraper_lab_upper_se" ] ], "method": "json", - "weight": 250, "object": { "fill_ter": "t_linoleum_white", "rows": [ @@ -341,6 +340,7 @@ { "chunks": [ "phavian_skyscraper_lab_break_area_4x4" ], "x": 28, "y": 27 }, { "chunks": [ "phavian_skyscraper_lab_break_area_4x4" ], "x": 32, "y": 27 } ], + "item": { "l": [ { "item": "grenade_anti_psi", "chance": 15 } ] }, "items": { "e": { "item": "fridgesnacks", "chance": 80, "repeat": [ 1, 12 ] }, "l": { "item": "feral_security_death_drops_9mm", "chance": 80, "repeat": [ 1, 3 ] }, diff --git a/data/mods/MindOverMatter/mod_interactions/defense_mode/monstergroups.json b/data/mods/MindOverMatter/mod_interactions/defense_mode/monstergroups.json index d992b8d153052..f9c84538f1337 100644 --- a/data/mods/MindOverMatter/mod_interactions/defense_mode/monstergroups.json +++ b/data/mods/MindOverMatter/mod_interactions/defense_mode/monstergroups.json @@ -1,6 +1,6 @@ [ { - "name": "GROUP_FERAL_PSYCHIC_DM", + "id": "GROUP_FERAL_PSYCHIC_DM", "type": "monstergroup", "monsters": [ { "monster": "mon_feral_human_bio_dm", "weight": 1, "cost_multiplier": 2 }, diff --git a/data/mods/MindOverMatter/monstergroups/monstergroups_edited.json b/data/mods/MindOverMatter/monstergroups/monstergroups_edited.json index 171437e901954..da6ebc7611b81 100644 --- a/data/mods/MindOverMatter/monstergroups/monstergroups_edited.json +++ b/data/mods/MindOverMatter/monstergroups/monstergroups_edited.json @@ -1,6 +1,6 @@ [ { - "name": "GROUP_PARK_SCENIC", + "id": "GROUP_PARK_SCENIC", "type": "monstergroup", "monsters": [ { "monster": "mon_feral_human_bio", "weight": 2, "cost_multiplier": 2 }, @@ -15,7 +15,7 @@ ] }, { - "name": "GROUP_PARK_DOG", + "id": "GROUP_PARK_DOG", "type": "monstergroup", "monsters": [ { "monster": "mon_feral_human_bio", "weight": 2, "cost_multiplier": 2 }, @@ -31,7 +31,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE", + "id": "GROUP_ZOMBIE", "monsters": [ { "monster": "mon_feral_human_bio", "weight": 1, "cost_multiplier": 4 }, { "monster": "mon_feral_human_clair", "weight": 1, "cost_multiplier": 3 }, @@ -46,7 +46,7 @@ }, { "type": "monstergroup", - "name": "GROUP_PREPPER_HOUSE", + "id": "GROUP_PREPPER_HOUSE", "monsters": [ { "monster": "mon_feral_human_bio", "weight": 10, "cost_multiplier": 2 }, { "monster": "mon_feral_human_clair", "weight": 15 }, @@ -61,19 +61,19 @@ }, { "type": "monstergroup", - "name": "GROUP_CHURCH_ZOMBIE", + "id": "GROUP_CHURCH_ZOMBIE", "monsters": [ { "monster": "mon_feral_human_clair", "weight": 15, "cost_multiplier": 2 }, { "monster": "mon_feral_human_vita", "weight": 15 } ] }, { - "name": "GROUP_MANSION_START", + "id": "GROUP_MANSION_START", "type": "monstergroup", "monsters": [ { "monster": "mon_feral_human_clair", "weight": 40 }, { "monster": "mon_feral_human_teep", "weight": 40 } ] }, { - "name": "FERAL_HUMANS", + "id": "FERAL_HUMANS", "type": "monstergroup", "monsters": [ { "monster": "mon_feral_human_bio", "weight": 1, "cost_multiplier": 4 }, @@ -89,7 +89,7 @@ }, { "type": "monstergroup", - "name": "GROUP_CENTRAL_LAB", + "id": "GROUP_CENTRAL_LAB", "monsters": [ { "monster": "mon_feral_scientist_psychic", "weight": 10, "cost_multiplier": 10 }, { "monster": "mon_feral_security_psychic", "weight": 12, "cost_multiplier": 4 }, @@ -100,7 +100,7 @@ }, { "type": "monstergroup", - "name": "GROUP_LAB", + "id": "GROUP_LAB", "monsters": [ { "monster": "mon_feral_scientist_psychic", "weight": 15, "cost_multiplier": 10 }, { "monster": "mon_feral_security_psychic", "weight": 12, "cost_multiplier": 4 }, @@ -111,7 +111,7 @@ }, { "type": "monstergroup", - "name": "GROUP_LAB_SURFACE", + "id": "GROUP_LAB_SURFACE", "monsters": [ { "monster": "mon_feral_scientist_psychic", "weight": 10, "cost_multiplier": 10 }, { "monster": "mon_feral_security_psychic", "weight": 12, "cost_multiplier": 4 }, @@ -122,7 +122,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MICROLAB", + "id": "GROUP_MICROLAB", "monsters": [ { "monster": "mon_feral_scientist_psychic", "weight": 2, "cost_multiplier": 10 }, { "monster": "mon_feral_security_psychic", "weight": 12, "cost_multiplier": 4 }, @@ -134,7 +134,7 @@ }, { "type": "monstergroup", - "name": "GROUP_LAB_BASIC_SECURITY", + "id": "GROUP_LAB_BASIC_SECURITY", "monsters": [ { "monster": "mon_feral_security_psychic", "weight": 5, "cost_multiplier": 4 }, { "monster": "mon_feral_security_captain_psychic", "weight": 2, "cost_multiplier": 10 } @@ -142,7 +142,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DISTORTED_MICROLAB", + "id": "GROUP_DISTORTED_MICROLAB", "monsters": [ { "monster": "mon_feral_scientist_psychic", "weight": 20, "cost_multiplier": 1 }, { "monster": "mon_feral_human_porter3", "weight": 35, "cost_multiplier": 1 }, @@ -151,7 +151,7 @@ }, { "type": "monstergroup", - "name": "GROUP_LAB_RESEARCHERS", + "id": "GROUP_LAB_RESEARCHERS", "monsters": [ { "monster": "mon_feral_scientist_psychic", "weight": 10, "cost_multiplier": 5 }, { "monster": "mon_zombie_scientist_phavian", "weight": 150 }, @@ -160,44 +160,44 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHER_REALITY_TEAR_FIELD", + "id": "GROUP_NETHER_REALITY_TEAR_FIELD", "monsters": [ { "monster": "mon_nether_eater", "weight": 100, "cost_multiplier": 0 } ] }, { "type": "monstergroup", - "name": "GROUP_NETHER", + "id": "GROUP_NETHER", "monsters": [ { "monster": "mon_nether_eater", "weight": 120, "cost_multiplier": 0 } ] }, { "type": "monstergroup", - "name": "GROUP_NETHER_PORTAL", + "id": "GROUP_NETHER_PORTAL", "monsters": [ { "monster": "mon_nether_eater", "weight": 200, "cost_multiplier": 0 } ] }, { - "name": "GROUP_CIVILIANS_STANDARD", + "id": "GROUP_CIVILIANS_STANDARD", "type": "monstergroup", "monsters": [ { "group": "GROUP_CIVILIANS_PSYCHIC_FERAL", "weight": 10, "cost_multiplier": 2 } ] }, { - "name": "GROUP_BEARS", + "id": "GROUP_BEARS", "type": "monstergroup", "monsters": [ { "monster": "mon_bandersnatch", "weight": 20, "starts": "2 days", "cost_multiplier": 5 } ] }, { "type": "monstergroup", - "name": "GROUP_CAVE", + "id": "GROUP_CAVE", "monsters": [ { "monster": "mon_hidebehind", "weight": 10, "starts": "2 days", "cost_multiplier": 5 } ] }, { "type": "monstergroup", - "name": "GROUP_WILDERNESS_FOREST_MAMMAL_WINTER", + "id": "GROUP_WILDERNESS_FOREST_MAMMAL_WINTER", "monsters": [ { "monster": "mon_hidebehind", "weight": 1, "starts": "2 days", "cost_multiplier": 10 }, { "monster": "mon_psi_gremlin", "weight": 1, "starts": "2 days", "cost_multiplier": 10 } ] }, { - "name": "GROUP_COWS", + "id": "GROUP_COWS", "type": "monstergroup", "monsters": [ { "monster": "mon_hodag_calf", "weight": 10, "starts": "7 days", "cost_multiplier": 5 }, @@ -205,7 +205,7 @@ ] }, { - "name": "GROUP_COWS_DAIRY", + "id": "GROUP_COWS_DAIRY", "type": "monstergroup", "monsters": [ { "monster": "mon_cow_biokinetic", "weight": 10, "starts": "2 days", "cost_multiplier": 5 }, @@ -215,7 +215,7 @@ }, { "type": "monstergroup", - "name": "GROUP_FOREST", + "id": "GROUP_FOREST", "default": "mon_null", "is_animal": true, "monsters": [ @@ -227,7 +227,7 @@ }, { "type": "monstergroup", - "name": "GROUP_WILDERNESS_FOREST_MAMMAL_MUTANT", + "id": "GROUP_WILDERNESS_FOREST_MAMMAL_MUTANT", "default": "mon_null", "is_animal": true, "monsters": [ @@ -237,7 +237,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ROOF_ANIMAL", + "id": "GROUP_ROOF_ANIMAL", "default": "mon_null", "is_animal": true, "monsters": [ @@ -255,13 +255,13 @@ }, { "type": "monstergroup", - "name": "GROUP_SAFE", + "id": "GROUP_SAFE", "default": "mon_null", "is_animal": true, "monsters": [ { "monster": "mon_cockatrice", "weight": 2, "starts": "21 days" }, { "monster": "mon_psi_gremlin", "weight": 2 } ] }, { - "name": "GROUP_PET_DOGS", + "id": "GROUP_PET_DOGS", "type": "monstergroup", "default": "mon_dog", "monsters": [ @@ -270,7 +270,7 @@ ] }, { - "name": "GROUP_STRAY_DOGS", + "id": "GROUP_STRAY_DOGS", "type": "monstergroup", "default": "mon_dog", "monsters": [ @@ -280,13 +280,13 @@ ] }, { - "name": "GROUP_MUTANT_PET_DOGS", + "id": "GROUP_MUTANT_PET_DOGS", "type": "monstergroup", "default": "mon_dog_mutant_mongrel", "monsters": [ { "monster": "mon_dire_hound", "weight": 1, "starts": "58 days", "cost_multiplier": 0 } ] }, { - "name": "GROUP_ANIMALPOUND_DOGS", + "id": "GROUP_ANIMALPOUND_DOGS", "type": "monstergroup", "monsters": [ { "monster": "mon_hellhound", "weight": 5, "cost_multiplier": 0 }, @@ -295,7 +295,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MI-GO_CAMP_OM", + "id": "GROUP_MI-GO_CAMP_OM", "monsters": [ { "monster": "mon_mi_go_telepath", "weight": 50, "cost_multiplier": 20, "starts": "210 hours" }, { "monster": "mon_mi_go_photokinetic", "weight": 50, "cost_multiplier": 2, "starts": "210 hours" }, @@ -304,7 +304,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MI-GO_BASE_COMMON", + "id": "GROUP_MI-GO_BASE_COMMON", "monsters": [ { "monster": "mon_mi_go_telepath", "weight": 50, "cost_multiplier": 2, "starts": "210 hours" }, { "monster": "mon_mi_go_photokinetic", "weight": 50, "cost_multiplier": 2, "starts": "210 hours" }, @@ -313,7 +313,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MI-GO_BASE_CAPTORS", + "id": "GROUP_MI-GO_BASE_CAPTORS", "monsters": [ { "monster": "mon_mi_go_telepath", "weight": 300, "cost_multiplier": 2, "starts": "210 hours" }, { "monster": "mon_mi_go_photokinetic", "weight": 300, "cost_multiplier": 2, "starts": "210 hours" }, @@ -322,7 +322,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MI-GO_BASE_BOSS", + "id": "GROUP_MI-GO_BASE_BOSS", "monsters": [ { "monster": "mon_mi_go_telepath", "weight": 200, "cost_multiplier": 2 }, { "monster": "mon_mi_go_telepath", "weight": 50, "cost_multiplier": 5, "pack_size": [ 2, 3 ] }, @@ -334,25 +334,25 @@ }, { "type": "monstergroup", - "name": "GROUP_TRIFFID", + "id": "GROUP_TRIFFID", "default": "mon_triffid", "monsters": [ { "group": "GROUP_TRIFFID_PSIONS", "weight": 25, "cost_multiplier": 5 } ] }, { "type": "monstergroup", - "name": "GROUP_TRIFFID_OUTER", + "id": "GROUP_TRIFFID_OUTER", "default": "mon_triffid", "monsters": [ { "group": "GROUP_TRIFFID_PSIONS", "weight": 50, "cost_multiplier": 2 } ] }, { "type": "monstergroup", - "name": "GROUP_TRIFFID_HEARTGUARDS", + "id": "GROUP_TRIFFID_HEARTGUARDS", "default": "mon_triffid", "monsters": [ { "group": "GROUP_TRIFFID_PSIONS", "weight": 150, "cost_multiplier": 2 } ] }, { "type": "monstergroup", - "name": "GROUP_TRIFFID_PSIONS", + "id": "GROUP_TRIFFID_PSIONS", "monsters": [ { "monster": "mon_triffid_clairsentient", "weight": 400 }, { "monster": "mon_triffid_pyrokinetic", "weight": 400 }, diff --git a/data/mods/MindOverMatter/monstergroups/monstergroups_new.json b/data/mods/MindOverMatter/monstergroups/monstergroups_new.json index a0a50e7cceec4..8bf9f843ec1b0 100644 --- a/data/mods/MindOverMatter/monstergroups/monstergroups_new.json +++ b/data/mods/MindOverMatter/monstergroups/monstergroups_new.json @@ -1,6 +1,6 @@ [ { - "name": "GROUP_ANIMAL_PSIONS", + "id": "GROUP_ANIMAL_PSIONS", "type": "monstergroup", "default": "mon_null", "is_animal": true, @@ -17,7 +17,7 @@ ] }, { - "name": "GROUP_FERAL_PSYCHIC", + "id": "GROUP_FERAL_PSYCHIC", "type": "monstergroup", "monsters": [ { "monster": "mon_feral_human_bio", "weight": 1, "cost_multiplier": 2 }, @@ -32,7 +32,7 @@ ] }, { - "name": "GROUP_FERAL_BIOKINETIC", + "id": "GROUP_FERAL_BIOKINETIC", "type": "monstergroup", "monsters": [ { "monster": "mon_feral_human_bio", "weight": 25 }, @@ -41,7 +41,7 @@ ] }, { - "name": "GROUP_FERAL_CLAIRSENTIENT", + "id": "GROUP_FERAL_CLAIRSENTIENT", "type": "monstergroup", "monsters": [ { "monster": "mon_feral_human_clair", "weight": 25 }, @@ -50,7 +50,7 @@ ] }, { - "name": "GROUP_FERAL_CLAIRSENTIENT_TELEPATH", + "id": "GROUP_FERAL_CLAIRSENTIENT_TELEPATH", "type": "monstergroup", "monsters": [ { "monster": "mon_feral_human_clair", "weight": 25 }, @@ -62,12 +62,12 @@ ] }, { - "name": "GROUP_FERAL_TELEPATH", + "id": "GROUP_FERAL_TELEPATH", "type": "monstergroup", "monsters": [ { "monster": "mon_feral_human_teep", "weight": 25 }, { "monster": "mon_feral_human_teep2", "weight": 8 } ] }, { - "name": "GROUP_FERAL_TELEPORTER", + "id": "GROUP_FERAL_TELEPORTER", "type": "monstergroup", "monsters": [ { "monster": "mon_feral_human_porter", "weight": 25 }, @@ -76,7 +76,7 @@ ] }, { - "name": "GROUP_CRYSTAL_FIELD", + "id": "GROUP_CRYSTAL_FIELD", "type": "monstergroup", "monsters": [ { "monster": "mon_feral_human_bio", "weight": 60, "cost_multiplier": 2 }, @@ -108,18 +108,18 @@ ] }, { - "name": "GROUP_FEAR_HAWKS", + "id": "GROUP_FEAR_HAWKS", "type": "monstergroup", "monsters": [ { "monster": "mon_fear_hawk", "weight": 1000 } ] }, { - "name": "GROUP_CRYSTAL_FIELD_PSYCHOACTIVE", + "id": "GROUP_CRYSTAL_FIELD_PSYCHOACTIVE", "type": "monstergroup", "monsters": [ { "monster": "mon_swarm_structure", "weight": 60, "cost_multiplier": 2 } ] }, { "type": "monstergroup", - "name": "GROUP_LAB_RESEARCH", + "id": "GROUP_LAB_RESEARCH", "default": "mon_zombie_scientist_phavian", "monsters": [ { "monster": "mon_feral_labsecurity_9mm", "weight": 18, "cost_multiplier": 8 }, @@ -160,7 +160,7 @@ }, { "type": "monstergroup", - "name": "GROUP_PHAVIAN_OFFICE", + "id": "GROUP_PHAVIAN_OFFICE", "default": "mon_zombie_scientist_phavian", "monsters": [ { "monster": "mon_feral_labsecurity_9mm", "weight": 18, "cost_multiplier": 8 }, @@ -187,7 +187,7 @@ }, { "type": "monstergroup", - "name": "GROUP_PHAVIAN_SKYSCRAPER_LAB", + "id": "GROUP_PHAVIAN_SKYSCRAPER_LAB", "default": "mon_zombie_scientist_phavian", "monsters": [ { "monster": "mon_feral_labsecurity_9mm", "weight": 25, "cost_multiplier": 8 }, @@ -213,7 +213,7 @@ ] }, { - "name": "GROUP_CIVILIANS_PSYCHIC_FERAL", + "id": "GROUP_CIVILIANS_PSYCHIC_FERAL", "type": "monstergroup", "monsters": [ { "monster": "mon_civilian_biokinetic", "weight": 1, "cost_multiplier": 0, "ends": "3 days" }, @@ -228,7 +228,7 @@ ] }, { - "name": "GROUP_NETHER_BREACH", + "id": "GROUP_NETHER_BREACH", "type": "monstergroup", "//": "Weights slightly adjusted from base Nether group, additional things added", "monsters": [ @@ -253,7 +253,7 @@ ] }, { - "name": "GROUP_NETHER_LAB_DEVOURER_BREACH", + "id": "GROUP_NETHER_LAB_DEVOURER_BREACH", "type": "monstergroup", "//": "same as above except in the SCIENCE faction, which sadly requires new monsters", "monsters": [ @@ -276,42 +276,42 @@ ] }, { - "name": "GROUP_REPRODUCTION_COW_MUTANT_BABIES", + "id": "GROUP_REPRODUCTION_COW_MUTANT_BABIES", "type": "monstergroup", "monsters": [ { "monster": "mon_cow_calf", "weight": 95 }, { "monster": "mon_hodag_calf", "weight": 95 } ] }, { - "name": "GROUP_REPRODUCTION_COW_PRE_HODAG_MUTANT_BABIES", + "id": "GROUP_REPRODUCTION_COW_PRE_HODAG_MUTANT_BABIES", "type": "monstergroup", "monsters": [ { "monster": "mon_cow_calf", "weight": 75 }, { "monster": "mon_hodag_calf", "weight": 25 } ] }, { - "name": "GROUP_REPRODUCTION_DOG_HELLHOUND_BABIES", + "id": "GROUP_REPRODUCTION_DOG_HELLHOUND_BABIES", "type": "monstergroup", "monsters": [ { "monster": "mon_dog_pup", "weight": 80 }, { "monster": "mon_hellhound_pup", "weight": 20 } ] }, { - "name": "GROUP_EGG_COCKATRICE", + "id": "GROUP_EGG_COCKATRICE", "type": "monstergroup", "monsters": [ { "monster": "mon_cockatrice_chick", "weight": 100 } ] }, { - "name": "GROUP_EGG_CHICKEN", + "id": "GROUP_EGG_CHICKEN", "type": "monstergroup", "monsters": [ { "monster": "mon_cockatrice_chick", "weight": 5 }, { "monster": "mon_chicken_chick", "weight": 95 } ] }, { - "name": "GROUP_EGG_PIGEON", + "id": "GROUP_EGG_PIGEON", "type": "monstergroup", "monsters": [ { "monster": "mon_pigeon_passenger_chick", "weight": 5 }, { "monster": "mon_pigeon_chick", "weight": 95 } ] }, { - "name": "GROUP_ALIEN_MEADOW", + "id": "GROUP_ALIEN_MEADOW", "type": "monstergroup", "monsters": [ { "monster": "mon_nether_unviable_butterfly", "weight": 5 } ] }, { - "name": "GROUP_ALIEN_TRAP_TREE", + "id": "GROUP_ALIEN_TRAP_TREE", "type": "monstergroup", "monsters": [ { "monster": "mon_nether_unviable_butterfly", "weight": 5 } ] } diff --git a/data/mods/MindOverMatter/monstergroups/zombie_upgrades.json b/data/mods/MindOverMatter/monstergroups/zombie_upgrades.json index d33fb3715b802..5323ec883c14e 100644 --- a/data/mods/MindOverMatter/monstergroups/zombie_upgrades.json +++ b/data/mods/MindOverMatter/monstergroups/zombie_upgrades.json @@ -1,12 +1,12 @@ [ { "type": "monstergroup", - "name": "GROUP_ZOMBIE_UPGRADE", + "id": "GROUP_ZOMBIE_UPGRADE", "monsters": [ { "monster": "mon_zombie_blank", "weight": 30 } ] }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_BLANK_UPGRADE", + "id": "GROUP_ZOMBIE_BLANK_UPGRADE", "default": "mon_zombie_blank", "monsters": [ { "monster": "mon_zombie_blank", "weight": 450 }, diff --git a/data/mods/MindOverMatter/powers/item_spells.json b/data/mods/MindOverMatter/powers/item_spells.json index a3369fc8d5f6a..be70913d459ca 100644 --- a/data/mods/MindOverMatter/powers/item_spells.json +++ b/data/mods/MindOverMatter/powers/item_spells.json @@ -1,25 +1,24 @@ [ { - "id": "grenade_inferno_explosion", + "id": "grenade_anti_psi_explosion", "type": "SPELL", - "name": { "str": "[Ψ]Inferno Grenade Explosion", "//~": "NO_I18N" }, + "name": { "str": "[Ψ]Null Grenade Explosion", "//~": "NO_I18N" }, "description": { - "str": "The explosion created by an inferno grenade. If you cast this yourself you're 100% going to die.", + "str": "The wave of anti-psi created by a null grenade. If you cast this yourself you're 100% going to have some problems.", "//~": "NO_I18N" }, - "valid_targets": [ "hostile", "ground" ], + "valid_targets": [ "hostile", "ally", "self", "ground" ], "skill": "metaphysics", - "flags": [ "LOUD", "NO_PROJECTILE", "IGNITE_FLAMMABLE", "RANDOM_DAMAGE", "NO_HANDS", "RANDOM_AOE", "NO_LEGS" ], + "flags": [ "LOUD", "NO_PROJECTILE", "RANDOM_DURATION", "NO_HANDS", "NO_LEGS" ], "effect": "attack", + "effect_str": "effect_psi_neutralized", "shape": "blast", - "damage_type": "heat", "difficulty": 1, "max_level": 1, - "min_damage": 50, - "max_damage": 150, - "min_range": 0, - "min_aoe": 6, - "max_aoe": 9 + "min_duration": 1200, + "max_duration": 2500, + "min_aoe": 5, + "max_aoe": 5 }, { "id": "pure_translocate_power", diff --git a/data/mods/MindOverMatter/powers/vitakinesis.json b/data/mods/MindOverMatter/powers/vitakinesis.json index f30e26d930a87..cff995ac5ff06 100644 --- a/data/mods/MindOverMatter/powers/vitakinesis.json +++ b/data/mods/MindOverMatter/powers/vitakinesis.json @@ -167,6 +167,8 @@ "message": "", "teachable": false, "valid_targets": [ "self" ], + "spell_class": "VITAKINETIC", + "magic_type": "mom_psionics", "skill": "metaphysics", "flags": [ "PSIONIC", "CONCENTRATE", "SILENT", "NO_HANDS", "NO_LEGS", "RANDOM_DURATION", "NO_EXPLOSION_SFX" ], "difficulty": 2, diff --git a/data/mods/MindOverMatter/snippets/snippets_new.json b/data/mods/MindOverMatter/snippets/snippets_new.json index 1841301438eed..a12336c31a777 100644 --- a/data/mods/MindOverMatter/snippets/snippets_new.json +++ b/data/mods/MindOverMatter/snippets/snippets_new.json @@ -195,7 +195,7 @@ { "name": "GRAY DAWN vs. NOBLE HORIZON testing", "id": "lab_file_clairsentience_04", - "text": "In the interests of testing Dr. Al-Masri's hypothesis, we assembled a group of NOBLE HORIZON and GRAY DAWN mathematicians and had them both attempt to conduct a simple number guessing game. Melchior provided a six-digit number and both teams attempted to guess it. GRAY DAWN were competitive when the number was overseen by a third party, as expected, but when both teams were provided with a terminal interface and instructed to enter their guesses, GRAY DAWN scored no better than chance. On the other hand, NOBLE HORIZON consistently managed to guess at least three digits and successfully guessed the entire six-digit sequence twice (out of ten total sequences). This disparity was maintained when both groups were placed in empty rooms, instructed to write down their guesses on a sheet of paper, and place it into a box before leaving the room. Finally, NOBLE HORIZON attained a better than chance score on the final test, when both groups were instructed to guess the sequence before Melchior was asked to provide a sequence.\n\nThis leads to two conclusions. The first is that the alarmists are wrong; Melchior is not secretly harboring a genius intellect and plotting to control XEDRA from within, it is a computer, capable of processing vast amounts of data and using netherum mathematics to process that data much faster than would otherwise be possible. The second is that while GRAY DAWN requires a specific source from which to attain new information, NOBLE HORIZON does not. Even in situations where no information transfer would be possible, such as the final two testing scenarios, NOBLE HORIZON still had a better-than-chance rate of correctly determining the sequence." + "text": "In the interests of testing Dr. Al-Masri's hypothesis, we assembled a group of NOBLE HORIZON and GRAY DAWN mathematicians and had them both attempt to conduct a simple number guessing game. Melchior provided a six-digit number and both teams attempted to guess it. GRAY DAWN were competitive when the number was overseen by a third party, as expected, but when both teams were provided with a terminal interface and instructed to enter their guesses, GRAY DAWN scored no better than chance. On the other hand, NOBLE HORIZON consistently managed to guess at least three digits and successfully guessed the entire six-digit sequence twice (out of ten total sequences). This disparity was maintained when both groups were placed in empty rooms, instructed to write down their guesses on a sheet of paper, and place it into a box before leaving the room. Finally, NOBLE HORIZON attained a better than chance score on the final test, when both groups were instructed to guess the sequence before Melchior was asked to provide a sequence.\n\nThis leads to two conclusions. The first is that the alarmists are wrong; Melchior is not secretly harboring a genius intellect and plotting to control XEDRA from within, it is a computer, capable of processing vast amounts of data and using Netherum mathematics to process that data much faster than would otherwise be possible. The second is that while GRAY DAWN requires a specific source from which to attain new information, NOBLE HORIZON does not. Even in situations where no information transfer would be possible, such as the final two testing scenarios, NOBLE HORIZON still had a better-than-chance rate of correctly determining the sequence." } ] }, @@ -226,7 +226,7 @@ "name": "V44, experiment impressions", "id": "lab_file_pyrokinesis_04", "weight": 600, - "text": "Write down my impressions of netherum mathematics? How do you describe sight to a blind man? How do you describe a symphony to a deaf person? Well, alright, I'll try.\n\nI've heard some of the body people say that they have full awareness, like they're concentrating on every part of their body at once, but that's not what it's like for me. It's more like focusing on something so hard you lose awareness of your surroundings. I pick a point in space and I concentrate, and it's like I'm being sucked into it. I just push on it. I'm not sure how I can describe it better than that, I push on it with my mind and it starts moving, and when I'm aware of the world again, it's on fire.\n\nWorld on fire. If I ever get to write about this, that's what I'll call the book.\n\nThe researchers ask me how I know how much energy to add, or how I concentrate, and I just know. There's a reason we call it \"awakening.\" I don't even need to think about it, really. Despite the name it's not like mathematics, where you have to figure out 9 time 34 and carry the 3 and so on, it's like riding a bicycle. Once I got used to how it worked, I can just do it. It takes seconds, sometimes less. I just have to put myself into the right frame of mind and the fire comes.\n\nNot sure how useful that is, but it's what it's like." + "text": "Write down my impressions of Netherum mathematics? How do you describe sight to a blind man? How do you describe a symphony to a deaf person? Well, alright, I'll try.\n\nI've heard some of the body people say that they have full awareness, like they're concentrating on every part of their body at once, but that's not what it's like for me. It's more like focusing on something so hard you lose awareness of your surroundings. I pick a point in space and I concentrate, and it's like I'm being sucked into it. I just push on it. I'm not sure how I can describe it better than that, I push on it with my mind and it starts moving, and when I'm aware of the world again, it's on fire.\n\nWorld on fire. If I ever get to write about this, that's what I'll call the book.\n\nThe researchers ask me how I know how much energy to add, or how I concentrate, and I just know. There's a reason we call it \"awakening.\" I don't even need to think about it, really. Despite the name it's not like mathematics, where you have to figure out 9 time 34 and carry the 3 and so on, it's like riding a bicycle. Once I got used to how it worked, I can just do it. It takes seconds, sometimes less. I just have to put myself into the right frame of mind and the fire comes.\n\nNot sure how useful that is, but it's what it's like." } ] }, @@ -286,7 +286,7 @@ { "name": "incident report: 897237", "id": "lab_file_telepathy_02", - "text": "During a routine visit by Dr. Davies, at 1134 a COLD BELOW mathematician diverted from their standard schedule and entered the room where Dr. Davies was being briefed about netherum mathematics developments. The mathematician stared at Dr. Davies for approximately three seconds and then, before security could intervene, physically attacked the doctor with their bare hands. Witnesses report the mathematician incoherently screaming, mixed with statements such as \"You'll kill us all\" and \"Stop, stop stop\". The mathematician continued to scream until restrained and sedated.\n\nFollow-up: COLD BELOW overseers received official reprimand and required to attend additional training. Mathematician diverted to project SUBSTRATE." + "text": "During a routine visit by Dr. Davies, at 1134 a COLD BELOW mathematician diverted from their standard schedule and entered the room where Dr. Davies was being briefed about Netherum mathematics developments. The mathematician stared at Dr. Davies for approximately three seconds and then, before security could intervene, physically attacked the doctor with their bare hands. Witnesses report the mathematician incoherently screaming, mixed with statements such as \"You'll kill us all\" and \"Stop, stop stop\". The mathematician continued to scream until restrained and sedated.\n\nFollow-up: COLD BELOW overseers received official reprimand and required to attend additional training. Mathematician diverted to project SUBSTRATE." }, { "name": "AAR ID# T38-11", @@ -330,7 +330,7 @@ "name": "On Time Travel", "id": "lab_file_teleportation_01", "weight": 800, - "text": "Let's start with the obvious. Teleportation is moving faster than light, by definition. Even though our most powerful mathematicians can currently only teleport a few grams a few meters distant, we've used slow-motion photography and confirmed that while the transit is not instantaneous, it's still faster than c. So, as the saying goes, relativity, causality, faster than light travel, pick two, right? Which are we going to pick?\n\nWell, as much as it pains me as a physicist to say it, relativity, at least as it relates in this case. Now we have a third domain alongside quantum mechanics and general relativity: netherum mathematics. While I hesitate to speculate on something that we have collected so little data on, it is possible that the Netherum provides its own reference frame coterminous with our own (or multiple) realities. If we built our satellites with matrix technology, would they still need to account for time dilation? Would relativity override netherum mathematics in that case?\n\nBut to return to the title: there is no evidence time travel is possible despite repeated attempts. Perhaps if we had a LOST RAIN mathematician capable of moving interstellar distances we could ask them to come back before they left. Barring that, I'm afraid asking LOST RAIN to retroactively avert any disasters is not on the table." + "text": "Let's start with the obvious. Teleportation is moving faster than light, by definition. Even though our most powerful mathematicians can currently only teleport a few grams a few meters distant, we've used slow-motion photography and confirmed that while the transit is not instantaneous, it's still faster than c. So, as the saying goes, relativity, causality, faster than light travel, pick two, right? Which are we going to pick?\n\nWell, as much as it pains me as a physicist to say it, relativity, at least as it relates in this case. Now we have a third domain alongside quantum mechanics and general relativity: Netherum mathematics. While I hesitate to speculate on something that we have collected so little data on, it is possible that the Netherum provides its own reference frame coterminous with our own (or multiple) realities. If we built our satellites with matrix technology, would they still need to account for time dilation? Would relativity override Netherum mathematics in that case?\n\nBut to return to the title: there is no evidence time travel is possible despite repeated attempts. Perhaps if we had a LOST RAIN mathematician capable of moving interstellar distances we could ask them to come back before they left. Barring that, I'm afraid asking LOST RAIN to retroactively avert any disasters is not on the table." }, { "name": "COBALT RAIN progress report", @@ -489,7 +489,7 @@ "text": "As requested, we conducted multiple tests using various matrix crystals to determine the precise effect on mathematician capabilities. The first test subject was V72, representing JUNIPER GOLD. In previous capability testing, V72 was capable of lifting 10.23g and holding it steady for at least 300 seconds, as well as consistently being able to reduce their acceleration when free-falling to 9.32 m/s². When holding a charged matrix crystal, the effect was nothing short of astonishing--the mass limit on lifting increased to 2.43 kg and the acceleration when free-falling dropped to 7.17 m/s².\n\nBURNT NOVEMBER Subject Q51 displayed a resting heart rate of 65 bpm, a grip strength of 30 kg, and a 8:31 mile time. When holding a charged matrix crystal, these improved to 55 bpm, a grip strength of 41 kg, and a 5:45 mile time.\n\nThe evidence shows that skin contact with a charged matrix crystal dramatically improves mathematician capabilities, up to several hundred times depending on their exact capabilities. While matrix crystals are always in short supply, some of them should definitely be earmarked for usage by our most capable mathematicians." }, { - "name": "Anomalous aftereffects of netherum mathematics", + "name": "Anomalous aftereffects of Netherum mathematics", "id": "lab_file_matrix_research_08", "text": "Dr. Richardson,\nI'm writing with some disturbing reports from recent testings. While the increased capabilities mathematicians have been displaying are at this point well-known among staff, in the course of my research I've observed a number of previously-unseen side effects from performing mathematics. The most common side effect seems to be headaches, though my staff have also observed several instances of spontaneous nosebleeds. In at least one instance, a COPPER PRIME experiment with I33 involving heating metals to the melting point, a sudden temperature drop of 15°C was observed in the sealed experimental chamber.\n\nFar more disturbing, however, was an incident during ONYX LIGHTNING testing. K92 seemingly lost control of her powers when attempting to damage a training dummy, causing severe--and under lockdown, irreplaceable--damage to several testing implements. When asked to explain herself, she was only able to say that her powers seemed to take on a \"mind of their own.\"\n\nI am still a scientist, regardless of what is happening now. Be assured that I will get to the bottom of this.\n\nTed Kelly\nSenior Researcher" }, @@ -497,6 +497,12 @@ "name": "Re: energy costs", "id": "lab_file_matrix_research_09", "text": "Xinying,\nYou were right. I looked over the cafeteria camera records and the mathematicians are consistently coming in twice or three times as often as most other people. Usually just for snacks, but it's pretty consistent that after an experiment, one of them will wander in and grab some chips or an apple or cookies. We need to start weighing them in and out like they're jockeys or something and seeing if we can get some hard data on this." + }, + { + "name": "Progress Report: GLASS ORCHID", + "id": "lab_file_matrix_research_10", + "weight": 500, + "text": "We still don't have any method of nullifying Netherum mathematics that can be used by a mathematician, but the boys down in R&D came out with something they're calling the \"null grenade.\" BD833-P produces a short-term disruption in anyone affected by it, preventing use of dimensional metaphysics for up to 25 seconds with no further ill effects. I89 agreed to spend a significant length of time having BD833-P set off next to him repeatedly and a full medical examination showed no problems. While I89 complained of a small headache, it faded within ten minutes of the last BD833-P detonation and a week later, I89 has shown no lasting ill effects.\n\nNow, the obvious problem: 25 seconds isn't much. In-phase if a dive team is trying to neutralize a mathematician--so far a theoretical situation, but we cannot rule it out--it should be plenty, but it won't be enough to capture or restrain any target. It would also be nice to have some way of focusing the effect, some kind of \"null ray\" or something similar. Research, as they say, is ongoing." } ] }, diff --git a/data/mods/My_Sweet_Cataclysm/mod_interactions/defense_mode/monstergroups.json b/data/mods/My_Sweet_Cataclysm/mod_interactions/defense_mode/monstergroups.json index fc7456c271116..edc87f60addab 100644 --- a/data/mods/My_Sweet_Cataclysm/mod_interactions/defense_mode/monstergroups.json +++ b/data/mods/My_Sweet_Cataclysm/mod_interactions/defense_mode/monstergroups.json @@ -1,6 +1,6 @@ [ { - "name": "GROUP_SWEET_HORDE", + "id": "GROUP_SWEET_HORDE", "type": "monstergroup", "monsters": [ { "monster": "mon_marshmallow_guy_dm" }, diff --git a/data/mods/My_Sweet_Cataclysm/sweet_monster_groups.json b/data/mods/My_Sweet_Cataclysm/sweet_monster_groups.json index a526b6a514632..6c65265c1f576 100644 --- a/data/mods/My_Sweet_Cataclysm/sweet_monster_groups.json +++ b/data/mods/My_Sweet_Cataclysm/sweet_monster_groups.json @@ -1,61 +1,61 @@ [ { - "name": "GROUP_EGG_MARSHMALLOW", + "id": "GROUP_EGG_MARSHMALLOW", "type": "monstergroup", "monsters": [ { "monster": "mon_marshmallow_kid" } ] }, { - "name": "GROUP_EGG_SMORES", + "id": "GROUP_EGG_SMORES", "type": "monstergroup", "monsters": [ { "monster": "mon_marshmallow_kid_armored" } ] }, { - "name": "GROUP_EGG_GUMMY", + "id": "GROUP_EGG_GUMMY", "type": "monstergroup", "monsters": [ { "monster": "mon_gummy_cub" } ] }, { - "name": "GROUP_EGG_GUMMY_GATOR", + "id": "GROUP_EGG_GUMMY_GATOR", "type": "monstergroup", "monsters": [ { "monster": "mon_gummy_gator" } ] }, { - "name": "GROUP_EGG_CRACKER", + "id": "GROUP_EGG_CRACKER", "type": "monstergroup", "monsters": [ { "monster": "mon_small_cracker" } ] }, { - "name": "GROUP_EGG_CRACKER_ROE", + "id": "GROUP_EGG_CRACKER_ROE", "type": "monstergroup", "monsters": [ { "monster": "mon_cracker_lbass" } ] }, { - "name": "GROUP_EGG_COOKIE", + "id": "GROUP_EGG_COOKIE", "type": "monstergroup", "monsters": [ { "monster": "mon_cookie" } ] }, { - "name": "GROUP_EGG_COOKIE_EGG", + "id": "GROUP_EGG_COOKIE_EGG", "type": "monstergroup", "monsters": [ { "monster": "mon_cookie_hydra_youth" } ] }, { - "name": "GROUP_EGG_GUM", + "id": "GROUP_EGG_GUM", "type": "monstergroup", "monsters": [ { "monster": "mon_spider_gum_baby" } ] }, { - "name": "GROUP_EGG_CAFFGUM", + "id": "GROUP_EGG_CAFFGUM", "type": "monstergroup", "monsters": [ { "monster": "mon_gum_spider_wolf_baby" } ] }, { - "name": "GROUP_EGG_CHOC_COW", + "id": "GROUP_EGG_CHOC_COW", "type": "monstergroup", "monsters": [ { "monster": "mon_cow_calf_choc" } ] }, { - "name": "GROUP_EGG_LICORICE", + "id": "GROUP_EGG_LICORICE", "type": "monstergroup", "monsters": [ { "monster": "mon_licorice_snake_hatchling" } ] } diff --git a/data/mods/Mythos-Creatures/mod_interactions/defense_mode/monstergroups.json b/data/mods/Mythos-Creatures/mod_interactions/defense_mode/monstergroups.json index 594820c9066ad..977fb3746751b 100644 --- a/data/mods/Mythos-Creatures/mod_interactions/defense_mode/monstergroups.json +++ b/data/mods/Mythos-Creatures/mod_interactions/defense_mode/monstergroups.json @@ -1,6 +1,6 @@ [ { - "name": "GROUP_MYTHOS_SPAWN", + "id": "GROUP_MYTHOS_SPAWN", "type": "monstergroup", "monsters": [ { "monster": "mon_rat_thing_dm" }, diff --git a/data/mods/Mythos-Creatures/monstergroups/blob.json b/data/mods/Mythos-Creatures/monstergroups/blob.json index 2e94e4d39c0e6..5b5ef7ca8d731 100644 --- a/data/mods/Mythos-Creatures/monstergroups/blob.json +++ b/data/mods/Mythos-Creatures/monstergroups/blob.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_GOO", + "id": "GROUP_GOO", "//": "Remove shoggoth from group.", "override": true, "monsters": [ diff --git a/data/mods/Mythos-Creatures/monstergroups/misc.json b/data/mods/Mythos-Creatures/monstergroups/misc.json index 05f5901dc26da..a65aeff8fcd62 100644 --- a/data/mods/Mythos-Creatures/monstergroups/misc.json +++ b/data/mods/Mythos-Creatures/monstergroups/misc.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_BLACK_ROAD", + "id": "GROUP_BLACK_ROAD", "override": true, "default": "mon_null", "monsters": [ @@ -22,7 +22,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SUBWAY_CITY", + "id": "GROUP_SUBWAY_CITY", "override": true, "//": "Normal subway, extra spawns underneath a city", "default": "mon_null", @@ -37,7 +37,7 @@ }, { "type": "monstergroup", - "name": "DUMP_ANIMALS", + "id": "DUMP_ANIMALS", "monsters": [ { "monster": "mon_ghast", "weight": 10, "conditions": [ "NIGHT", "DUSK" ] }, { "monster": "mon_ghoul", "weight": 15 } @@ -45,7 +45,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SEWER", + "id": "GROUP_SEWER", "//": "Add rat things to sewers.", "monsters": [ { "monster": "mon_rat_thing", "weight": 50, "cost_multiplier": 0, "pack_size": [ 3, 12 ] } ] } diff --git a/data/mods/Mythos-Creatures/monstergroups/mythos.json b/data/mods/Mythos-Creatures/monstergroups/mythos.json index 734ae86189e57..1b8aa42b0e19f 100644 --- a/data/mods/Mythos-Creatures/monstergroups/mythos.json +++ b/data/mods/Mythos-Creatures/monstergroups/mythos.json @@ -1,6 +1,6 @@ [ { - "name": "GROUP_PARK_SCENIC", + "id": "GROUP_PARK_SCENIC", "type": "monstergroup", "override": true, "default": "mon_null", @@ -25,7 +25,7 @@ ] }, { - "name": "GROUP_ROOF_ZOMBIE", + "id": "GROUP_ROOF_ZOMBIE", "type": "monstergroup", "override": true, "default": "mon_null", @@ -46,7 +46,7 @@ ] }, { - "name": "GROUP_PARK_PLAYGROUND", + "id": "GROUP_PARK_PLAYGROUND", "type": "monstergroup", "override": true, "default": "mon_null", @@ -58,7 +58,7 @@ ] }, { - "name": "GROUP_PARK_DOG", + "id": "GROUP_PARK_DOG", "type": "monstergroup", "override": true, "default": "mon_null", @@ -79,14 +79,14 @@ ] }, { - "name": "GROUP_ZOMBIE_SCORCHED", + "id": "GROUP_ZOMBIE_SCORCHED", "type": "monstergroup", "override": true, "monsters": [ { "monster": "mon_null" } ] }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE", + "id": "GROUP_ZOMBIE", "override": true, "default": "mon_null", "monsters": [ @@ -113,14 +113,14 @@ }, { "type": "monstergroup", - "name": "GROUP_NEMESIS", + "id": "GROUP_NEMESIS", "override": true, "//": "nemesis squad", "monsters": [ { "monster": "mon_null" } ] }, { "type": "monstergroup", - "name": "GROUP_VANILLA", + "id": "GROUP_VANILLA", "override": true, "default": "mon_null", "monsters": [ @@ -147,7 +147,7 @@ }, { "type": "monstergroup", - "name": "GROUP_POLICE", + "id": "GROUP_POLICE", "override": true, "//": "+30% cops", "default": "mon_null", @@ -175,7 +175,7 @@ }, { "type": "monstergroup", - "name": "GROUP_HOUSE", + "id": "GROUP_HOUSE", "override": true, "//": "+15% child", "default": "mon_null", @@ -202,7 +202,7 @@ }, { "type": "monstergroup", - "name": "GROUP_PREPPER_HOUSE", + "id": "GROUP_PREPPER_HOUSE", "override": true, "default": "mon_null", "monsters": [ @@ -228,7 +228,7 @@ }, { "type": "monstergroup", - "name": "GROUP_PHARM", + "id": "GROUP_PHARM", "override": true, "//": "+13% fast", "default": "mon_null", @@ -255,7 +255,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ELECTRO", + "id": "GROUP_ELECTRO", "//": "+15% electric", "override": true, "default": "mon_null", @@ -282,7 +282,7 @@ }, { "type": "monstergroup", - "name": "GROUP_GROCERY", + "id": "GROUP_GROCERY", "//": "+15% fat", "override": true, "default": "mon_null", @@ -309,7 +309,7 @@ }, { "type": "monstergroup", - "name": "GROUP_PUBLICWORKERS", + "id": "GROUP_PUBLICWORKERS", "override": true, "default": "mon_null", "monsters": [ @@ -335,7 +335,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MAYBE_ZOMBIE", + "id": "GROUP_MAYBE_ZOMBIE", "override": true, "//": "10% chance of a zombie", "default": "mon_null", @@ -358,7 +358,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SCHOOL", + "id": "GROUP_SCHOOL", "override": true, "//": "School monster spawns.", "default": "mon_null", @@ -385,7 +385,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SMALL_STATION", + "id": "GROUP_SMALL_STATION", "override": true, "default": "mon_null", "monsters": [ @@ -411,7 +411,7 @@ }, { "type": "monstergroup", - "name": "GROUP_LARGE_STATION", + "id": "GROUP_LARGE_STATION", "override": true, "default": "mon_null", "monsters": [ @@ -437,7 +437,7 @@ }, { "type": "monstergroup", - "name": "GROUP_CHURCH_ZOMBIE", + "id": "GROUP_CHURCH_ZOMBIE", "override": true, "default": "mon_null", "monsters": [ @@ -463,7 +463,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_PRISON", + "id": "GROUP_ZOMBIE_PRISON", "override": true, "default": "mon_null", "monsters": [ @@ -489,7 +489,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_COP", + "id": "GROUP_ZOMBIE_COP", "override": true, "default": "mon_null", "monsters": [ @@ -515,7 +515,7 @@ }, { "type": "monstergroup", - "name": "GROUP_HOSPITAL", + "id": "GROUP_HOSPITAL", "override": true, "//": "Hospital monster spawns. Same as GROUP_ZOMBIE, but without Z-dogs + 20% medical", "default": "mon_null", @@ -542,7 +542,7 @@ }, { "type": "monstergroup", - "name": "GROUP_STEEL_MILL", + "id": "GROUP_STEEL_MILL", "override": true, "//": "Steel mill monster spawns.", "default": "mon_null", @@ -568,7 +568,7 @@ ] }, { - "name": "GROUP_MALL", + "id": "GROUP_MALL", "override": true, "type": "monstergroup", "default": "mon_null", @@ -594,7 +594,7 @@ ] }, { - "name": "GROUP_FIRE", + "id": "GROUP_FIRE", "override": true, "type": "monstergroup", "default": "mon_null", @@ -620,7 +620,7 @@ ] }, { - "name": "FERAL_HUMANS", + "id": "FERAL_HUMANS", "override": true, "type": "monstergroup", "monsters": [ @@ -633,7 +633,7 @@ { "type": "monstergroup", "override": true, - "name": "DUMP_ZOMBIES", + "id": "DUMP_ZOMBIES", "default": "mon_null", "monsters": [ { "monster": "mon_null", "weight": 865 }, @@ -657,7 +657,7 @@ ] }, { - "name": "GROUP_PLAIN", + "id": "GROUP_PLAIN", "override": true, "type": "monstergroup", "default": "mon_null", @@ -683,7 +683,7 @@ ] }, { - "name": "GROUP_HOTEL_POOL", + "id": "GROUP_HOTEL_POOL", "type": "monstergroup", "override": true, "default": "mon_null", @@ -709,7 +709,7 @@ ] }, { - "name": "GROUP_HOTEL_GYM", + "id": "GROUP_HOTEL_GYM", "type": "monstergroup", "override": true, "default": "mon_null", @@ -735,7 +735,7 @@ ] }, { - "name": "GROUP_POOL_NOKIDS", + "id": "GROUP_POOL_NOKIDS", "override": true, "type": "monstergroup", "default": "mon_null", diff --git a/data/mods/Mythos-Creatures/monstergroups/nether.json b/data/mods/Mythos-Creatures/monstergroups/nether.json index a2005b68f777e..4d702234eb660 100644 --- a/data/mods/Mythos-Creatures/monstergroups/nether.json +++ b/data/mods/Mythos-Creatures/monstergroups/nether.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_BREATHER", + "id": "GROUP_BREATHER", "monsters": [ { "monster": "mon_breather", "weight": 990 }, { "monster": "mon_breather", "weight": 10, "cost_multiplier": 2, "pack_size": [ 2, 4 ] } @@ -9,27 +9,27 @@ }, { "type": "monstergroup", - "name": "GROUP_BREATHER_HUB", + "id": "GROUP_BREATHER_HUB", "monsters": [ { "monster": "mon_breather_hub" } ] }, { "type": "monstergroup", - "name": "GROUP_CHURCH_BLANK", + "id": "GROUP_CHURCH_BLANK", "monsters": [ { "monster": "mon_blank", "cost_multiplier": 0 } ] }, { - "name": "GROUP_DARK_WYRM", + "id": "GROUP_DARK_WYRM", "type": "monstergroup", "monsters": [ { "monster": "mon_dark_wyrm" } ] }, { "type": "monstergroup", - "name": "GROUP_DOG_THING", + "id": "GROUP_DOG_THING", "monsters": [ { "monster": "mon_dog_thing" } ] }, { "type": "monstergroup", - "name": "GROUP_NETHER_REALITY_TEAR_FIELD", + "id": "GROUP_NETHER_REALITY_TEAR_FIELD", "default": "mon_blank", "monsters": [ { "monster": "mon_flying_polyp", "weight": 100, "cost_multiplier": 0 }, @@ -47,7 +47,7 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHER", + "id": "GROUP_NETHER", "default": "mon_blank", "monsters": [ { "monster": "mon_blank", "weight": 135, "cost_multiplier": 0 }, @@ -64,7 +64,7 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHER_CAPTURED", + "id": "GROUP_NETHER_CAPTURED", "default": "mon_gracke", "monsters": [ { "monster": "mon_gelatin", "weight": 250, "cost_multiplier": 0 }, @@ -76,7 +76,7 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHER_PORTAL", + "id": "GROUP_NETHER_PORTAL", "default": "mon_gracke", "monsters": [ { "monster": "mon_gelatin", "weight": 200, "cost_multiplier": 0 }, @@ -89,7 +89,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SPIRAL", + "id": "GROUP_SPIRAL", "monsters": [ { "monster": "mon_human_snail", "weight": 740, "cost_multiplier": 0 }, { "monster": "mon_twisted_body", "weight": 180, "cost_multiplier": 0 }, @@ -98,7 +98,7 @@ }, { "type": "monstergroup", - "name": "GROUP_TINDALOS", + "id": "GROUP_TINDALOS", "monsters": [ { "monster": "mon_hound_tindalos" } ] } ] diff --git a/data/mods/Mythos-Creatures/monstergroups/wilderness.json b/data/mods/Mythos-Creatures/monstergroups/wilderness.json index ecb07893790c0..363fc8ac47232 100644 --- a/data/mods/Mythos-Creatures/monstergroups/wilderness.json +++ b/data/mods/Mythos-Creatures/monstergroups/wilderness.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_CAVE", + "id": "GROUP_CAVE", "//": "Current count is 925. Note that 'freq' units are tenth of a percent, with default filling in the gap.", "is_animal": true, "monsters": [ @@ -11,7 +11,7 @@ }, { "type": "monstergroup", - "name": "GROUP_FOREST", + "id": "GROUP_FOREST", "default": "mon_null", "//": "Current SPRING first DAY count is 513. Note that 'freq' units are tenth of a percent, with default filling in the gap.", "is_animal": true, @@ -37,7 +37,7 @@ }, { "type": "monstergroup", - "name": "GROUP_RIVER", + "id": "GROUP_RIVER", "default": "mon_null", "//": "Current SPRING first DAY count is 944. Note that 'freq' units are tenth of a percent, with default filling in the gap.", "is_animal": true, @@ -59,7 +59,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SWAMP", + "id": "GROUP_SWAMP", "default": "mon_null", "//": "Current SPRING first DAY count is 417. Note that 'freq' units are tenth of a percent, with default filling in the gap.", "is_animal": true, @@ -76,7 +76,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ROOF_ANIMAL", + "id": "GROUP_ROOF_ANIMAL", "//": "Current SPRING first DAY count is 350. Note that 'freq' units are tenth of a percent, with default filling in the gap.", "is_animal": true, "monsters": [ diff --git a/data/mods/No_Hope/monster_groups.json b/data/mods/No_Hope/monster_groups.json index edf557f89299a..3849843dda709 100644 --- a/data/mods/No_Hope/monster_groups.json +++ b/data/mods/No_Hope/monster_groups.json @@ -1,6 +1,6 @@ [ { - "name": "GROUP_NECROPOLIS", + "id": "GROUP_NECROPOLIS", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie", "weight": 899 }, @@ -10,7 +10,7 @@ ] }, { - "name": "GROUP_NECROPOLIS_SEWERS", + "id": "GROUP_NECROPOLIS_SEWERS", "type": "monstergroup", "monsters": [ { "monster": "mon_irradiated_wanderer_1", "weight": 848 }, @@ -22,7 +22,7 @@ ] }, { - "name": "GROUP_NECROPOLIS_VAULT", + "id": "GROUP_NECROPOLIS_VAULT", "type": "monstergroup", "monsters": [ { "monster": "mon_irradiated_wanderer_1", "weight": 40 }, @@ -33,7 +33,7 @@ ] }, { - "name": "GROUP_NECROPOLIS_VAULT2", + "id": "GROUP_NECROPOLIS_VAULT2", "type": "monstergroup", "monsters": [ { "monster": "mon_irradiated_wanderer_2", "weight": 30 }, @@ -43,7 +43,7 @@ ] }, { - "name": "GROUP_NECROPOLIS_VAULT3", + "id": "GROUP_NECROPOLIS_VAULT3", "type": "monstergroup", "monsters": [ { "monster": "mon_irradiated_wanderer_4", "weight": 890 }, @@ -52,18 +52,18 @@ ] }, { - "name": "GROUP_NECROPOLIS_SWIMMING", + "id": "GROUP_NECROPOLIS_SWIMMING", "type": "monstergroup", "monsters": [ { "monster": "mon_sewer_fish", "weight": 995 }, { "monster": "mon_irradiated_wanderer_2", "weight": 5 } ] }, { - "name": "GROUP_NECROPOLIS_ROBOT", + "id": "GROUP_NECROPOLIS_ROBOT", "type": "monstergroup", "monsters": [ { "monster": "mon_tankbot", "weight": 20, "cost_multiplier": 0 } ] }, { "type": "monstergroup", - "name": "GROUP_CENTRAL_LAB", + "id": "GROUP_CENTRAL_LAB", "monsters": [ { "monster": "mon_chickenbot", "weight": 1, "cost_multiplier": 50 }, { "monster": "mon_zombie_bio_op", "weight": 20, "cost_multiplier": 50 } @@ -71,7 +71,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ROBOT", + "id": "GROUP_ROBOT", "monsters": [ { "monster": "mon_tripod", "weight": 110, "cost_multiplier": 0 }, { "monster": "mon_chickenbot", "weight": 60, "cost_multiplier": 0 }, @@ -81,7 +81,7 @@ { "type": "monstergroup", "//": "Used in the military bunker", - "name": "GROUP_MIL_BASE", + "id": "GROUP_MIL_BASE", "monsters": [ { "monster": "mon_tripod", "weight": 5, "cost_multiplier": 0 }, { "monster": "mon_chickenbot", "weight": 5, "cost_multiplier": 0 }, @@ -91,7 +91,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MAYBE_MIL", + "id": "GROUP_MAYBE_MIL", "monsters": [ { "monster": "mon_tripod", "weight": 5, "cost_multiplier": 0 }, { "monster": "mon_chickenbot", "weight": 5, "cost_multiplier": 0 }, @@ -101,7 +101,7 @@ }, { "type": "monstergroup", - "name": "GROUP_MIL_STRONG", + "id": "GROUP_MIL_STRONG", "//": "Used in the military bunker, LIXA and Hub01 convoy ambush", "monsters": [ { "monster": "mon_tripod", "weight": 5, "cost_multiplier": 0 }, @@ -111,7 +111,7 @@ ] }, { - "name": "GROUP_MIL_MASS_GRAVE", + "id": "GROUP_MIL_MASS_GRAVE", "type": "monstergroup", "//": "Lots of hazmats and burners.", "monsters": [ @@ -122,22 +122,22 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHER_REALITY_TEAR_FIELD", + "id": "GROUP_NETHER_REALITY_TEAR_FIELD", "monsters": [ { "monster": "mon_staring_eye", "weight": 100, "cost_multiplier": 0 } ] }, { "type": "monstergroup", - "name": "GROUP_NETHER", + "id": "GROUP_NETHER", "monsters": [ { "monster": "mon_staring_eye", "weight": 120, "cost_multiplier": 0 } ] }, { "type": "monstergroup", - "name": "GROUP_NETHER_PORTAL", + "id": "GROUP_NETHER_PORTAL", "monsters": [ { "monster": "mon_staring_eye", "weight": 200, "cost_multiplier": 0 } ] }, { "type": "monstergroup", - "name": "GROUP_WILDERNESS_FOREST_ZOMBIE", + "id": "GROUP_WILDERNESS_FOREST_ZOMBIE", "monsters": [ { "monster": "mon_zpider_mass", "weight": 1, "cost_multiplier": 10 } ] } ] diff --git a/data/mods/Sky_Island/monstergroups.json b/data/mods/Sky_Island/monstergroups.json index ecc5064718340..20d740b7312fe 100644 --- a/data/mods/Sky_Island/monstergroups.json +++ b/data/mods/Sky_Island/monstergroups.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_SI_ZOMEASY", + "id": "GROUP_SI_ZOMEASY", "//": "A simple mix of common low level zombies. Threat level keeps below around 7.", "monsters": [ { "monster": "mon_zombie", "weight": 2000 }, @@ -38,7 +38,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SI_ZOMMID", + "id": "GROUP_SI_ZOMMID", "//": "A simple mix of evolved zombies. Threat level to mid/low teens. A few exceptions made for special effects like acid or speed, like dogs.", "monsters": [ { "monster": "mon_zombie_tough", "weight": 1000 }, @@ -82,7 +82,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SI_ZOMHARD", + "id": "GROUP_SI_ZOMHARD", "//": "A mix of powerful zombies. Threat level high teens up to mid 20s. Exceptions made for especially tough monsters.", "monsters": [ { "monster": "mon_zombie_brute", "weight": 1000 }, @@ -116,7 +116,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SI_ZOMELITE", + "id": "GROUP_SI_ZOMELITE", "//": "A blend of truly elite zombies. Threat level up to the ceiling.", "monsters": [ { "monster": "mon_zombie_soldier_blackops_1", "weight": 100 }, @@ -149,7 +149,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SI_ZOMBOSS", + "id": "GROUP_SI_ZOMBOSS", "//": "Boss tier encounters. Extreme danger level.", "monsters": [ { "monster": "mon_zombie_hulk", "weight": 100 }, @@ -163,7 +163,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SI_ZOMBOSSMULT", + "id": "GROUP_SI_ZOMBOSSMULT", "//": "Boss tier encounters for enemies that show up in bunches. Extreme danger level.", "monsters": [ { "monster": "mon_zombie_hulk", "weight": 10 }, @@ -176,7 +176,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SI_MIGO", + "id": "GROUP_SI_MIGO", "//": "Powerful migo.", "monsters": [ { "monster": "mon_mi_go", "weight": 200 }, @@ -187,7 +187,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SI_MIGO_ELITE", + "id": "GROUP_SI_MIGO_ELITE", "//": "Evolved migo.", "monsters": [ { "monster": "mon_mi_go_myrmidon", "weight": 25 }, { "monster": "mon_mi_go_guard", "weight": 75 } ] } diff --git a/data/mods/Sky_Island/monsters/monstergroups_extended.json b/data/mods/Sky_Island/monsters/monstergroups_extended.json index 5828881b90b72..ad542f997c1d7 100644 --- a/data/mods/Sky_Island/monsters/monstergroups_extended.json +++ b/data/mods/Sky_Island/monsters/monstergroups_extended.json @@ -1,52 +1,52 @@ [ { "type": "monstergroup", - "name": "GROUP_CENTRAL_LAB", + "id": "GROUP_CENTRAL_LAB", "monsters": [ { "monster": "mon_zombie_bio_op", "weight": 20, "cost_multiplier": 50 } ] }, { "type": "monstergroup", - "name": "GROUP_LAB", + "id": "GROUP_LAB", "default": "mon_zombie_scientist", "monsters": [ { "monster": "mon_zombie_bio_op", "weight": 50, "cost_multiplier": 5 } ] }, { "type": "monstergroup", - "name": "GROUP_LAB_SURFACE", + "id": "GROUP_LAB_SURFACE", "default": "mon_zombie_scientist", "monsters": [ { "monster": "mon_zombie_bio_op", "weight": 50, "cost_multiplier": 5 } ] }, { "type": "monstergroup", - "name": "GROUP_LAB_SECURITY", + "id": "GROUP_LAB_SECURITY", "default": "mon_zombie_labsecurity", "monsters": [ { "monster": "mon_zombie_bio_op", "weight": 50, "cost_multiplier": 5 } ] }, { "type": "monstergroup", "//": "Used in the military bunker", - "name": "GROUP_MIL_BASE", + "id": "GROUP_MIL_BASE", "monsters": [ { "monster": "mon_zombie_bio_op", "weight": 20, "cost_multiplier": 50 } ] }, { "type": "monstergroup", - "name": "GROUP_MAYBE_MIL", + "id": "GROUP_MAYBE_MIL", "monsters": [ { "monster": "mon_zombie_bio_op", "weight": 20, "cost_multiplier": 50 } ] }, { "type": "monstergroup", - "name": "GROUP_MIL_STRONG", + "id": "GROUP_MIL_STRONG", "//": "Used in the military bunker, LIXA and Hub01 convoy ambush", "monsters": [ { "monster": "mon_zombie_bio_op", "weight": 20, "cost_multiplier": 50 } ] }, { - "name": "GROUP_MIL_EXTRA", + "id": "GROUP_MIL_EXTRA", "type": "monstergroup", "monsters": [ { "monster": "mon_zombie_bio_op", "weight": 4 } ] }, { "type": "monstergroup", - "name": "GROUP_BUNKER", + "id": "GROUP_BUNKER", "monsters": [ { "monster": "mon_zombie_bio_op", "weight": 150, "cost_multiplier": 10 } ] } ] diff --git a/data/mods/TEST_DATA/EOC.json b/data/mods/TEST_DATA/EOC.json index e4a0a77f69559..6948179fcd5bb 100644 --- a/data/mods/TEST_DATA/EOC.json +++ b/data/mods/TEST_DATA/EOC.json @@ -434,7 +434,7 @@ }, { "type": "monstergroup", - "name": "GROUP_mon_nearby_test", + "id": "GROUP_mon_nearby_test", "monsters": [ { "monster": "mon_triffid", "weight": 1 }, { "monster": "mon_zombie_tough", "weight": 1 } ] }, { diff --git a/data/mods/TEST_DATA/monstergroups.json b/data/mods/TEST_DATA/monstergroups.json index 26ef371891275..a7ee907fd2b48 100644 --- a/data/mods/TEST_DATA/monstergroups.json +++ b/data/mods/TEST_DATA/monstergroups.json @@ -1,6 +1,6 @@ [ { - "name": "test_event_mongroup", + "id": "test_event_mongroup", "type": "monstergroup", "monsters": [ { "monster": "mon_test_non_shearable", "weight": 50, "event": "christmas" }, @@ -12,7 +12,7 @@ ] }, { - "name": "test_event_only", + "id": "test_event_only", "type": "monstergroup", "monsters": [ { "monster": "mon_test_non_shearable", "weight": 50, "event": "christmas" }, @@ -21,7 +21,7 @@ ] }, { - "name": "test_default_monster", + "id": "test_default_monster", "type": "monstergroup", "default": "mon_null", "monsters": [ @@ -39,7 +39,7 @@ }, { "//": "Extends the test_default_monster group", - "name": "test_default_monster", + "id": "test_default_monster", "type": "monstergroup", "monsters": [ { "monster": "mon_test_CBM", "weight": 50 }, @@ -48,7 +48,7 @@ ] }, { - "name": "test_group_default_monster", + "id": "test_group_default_monster", "type": "monstergroup", "default": "mon_null", "monsters": [ @@ -58,7 +58,7 @@ ] }, { - "name": "test_l2_nested_mongroup", + "id": "test_l2_nested_mongroup", "type": "monstergroup", "monsters": [ { "monster": "mon_test_speed_desc_base", "weight": 50 }, @@ -66,7 +66,7 @@ ] }, { - "name": "test_l1_nested_mongroup", + "id": "test_l1_nested_mongroup", "type": "monstergroup", "monsters": [ { "group": "test_l2_nested_mongroup", "weight": 5 }, @@ -75,7 +75,7 @@ ] }, { - "name": "test_top_level_mongroup", + "id": "test_top_level_mongroup", "type": "monstergroup", "monsters": [ { "group": "test_l1_nested_mongroup", "weight": 5 }, @@ -84,32 +84,32 @@ ] }, { - "name": "test_nested_packsize", + "id": "test_nested_packsize", "type": "monstergroup", "monsters": [ { "monster": "mon_test_CBM", "pack_size": [ 2, 4 ] } ] }, { - "name": "test_top_level_packsize", + "id": "test_top_level_packsize", "type": "monstergroup", "monsters": [ { "group": "test_nested_packsize", "pack_size": [ 4, 6 ] } ] }, { - "name": "test_top_level_no_packsize", + "id": "test_top_level_no_packsize", "type": "monstergroup", "monsters": [ { "group": "test_nested_packsize" } ] }, { - "name": "test_upgrades_multi", + "id": "test_upgrades_multi", "type": "monstergroup", "monsters": [ { "monster": "mon_test_shearable", "pack_size": [ 4, 6 ] } ] }, { - "name": "test_upgrades_multi_null", + "id": "test_upgrades_multi_null", "type": "monstergroup", "monsters": [ { "monster": "mon_null" }, { "monster": "mon_test_zombie_cop", "pack_size": [ 4, 6 ], "starts": "2 days" } ] }, { - "name": "test_upgrades_multi_late", + "id": "test_upgrades_multi_late", "type": "monstergroup", "monsters": [ { "monster": "mon_test_shearable", "pack_size": [ 4, 6 ], "starts": "7 days" }, diff --git a/data/mods/TEST_DATA/monsters.json b/data/mods/TEST_DATA/monsters.json index 338c5d5554a72..df9e910274665 100644 --- a/data/mods/TEST_DATA/monsters.json +++ b/data/mods/TEST_DATA/monsters.json @@ -429,6 +429,34 @@ "bleed_rate": 60, "armor": { "bash": 8, "cut": 10, "electric": 1 } }, + { + "id": "mon_test_shotgun_1_bullet", + "type": "MONSTER", + "name": { "str": "chonky thing with 1 ballistic armor" }, + "copy-from": "mon_test_shotgun_0_bullet", + "armor": { "bash": 8, "cut": 10, "bullet": 1, "electric": 1 } + }, + { + "id": "mon_test_shotgun_5_bullet", + "type": "MONSTER", + "name": { "str": "chonky thing with 5 ballistic armor" }, + "copy-from": "mon_test_shotgun_0_bullet", + "armor": { "bash": 8, "cut": 10, "bullet": 5, "electric": 1 } + }, + { + "id": "mon_test_shotgun_10_bullet", + "type": "MONSTER", + "name": { "str": "chonky thing with 10 ballistic armor" }, + "copy-from": "mon_test_shotgun_0_bullet", + "armor": { "bash": 8, "cut": 10, "bullet": 10, "electric": 1 } + }, + { + "id": "mon_test_shotgun_30_bullet", + "type": "MONSTER", + "name": { "str": "chonky thing with 30 ballistic armor" }, + "copy-from": "mon_test_shotgun_0_bullet", + "armor": { "bash": 8, "cut": 10, "bullet": 30, "electric": 1 } + }, { "id": "mon_dummy_reproducer_eggs", "type": "MONSTER", diff --git a/data/mods/TropiCataclysm/monstergroups/eggs.json b/data/mods/TropiCataclysm/monstergroups/eggs.json index 96f3f4182f3b8..565e918d561bd 100644 --- a/data/mods/TropiCataclysm/monstergroups/eggs.json +++ b/data/mods/TropiCataclysm/monstergroups/eggs.json @@ -1,6 +1,6 @@ [ { - "name": "GROUP_EGG_CONSTRICTOR", + "id": "GROUP_EGG_CONSTRICTOR", "type": "monstergroup", "default": "mon_anaconda", "monsters": [ @@ -10,147 +10,147 @@ ] }, { - "name": "GROUP_EGG_LIZARD", + "id": "GROUP_EGG_LIZARD", "type": "monstergroup", "monsters": [ { "monster": "mon_beaded_lizard" } ] }, { - "name": "GROUP_EGG_MONITOR", + "id": "GROUP_EGG_MONITOR", "type": "monstergroup", "monsters": [ { "monster": "mon_monitor_lizard" } ] }, { - "name": "GROUP_EGG_IGUANA", + "id": "GROUP_EGG_IGUANA", "type": "monstergroup", "monsters": [ { "monster": "mon_iguana" } ] }, { - "name": "GROUP_EGG_TURTLE", + "id": "GROUP_EGG_TURTLE", "type": "monstergroup", "monsters": [ { "monster": "mon_turtle" } ] }, { - "name": "GROUP_EGG_SNAPPER", + "id": "GROUP_EGG_SNAPPER", "type": "monstergroup", "monsters": [ { "monster": "mon_turtle_snapper" } ] }, { - "name": "GROUP_EGG_TORTOISE", + "id": "GROUP_EGG_TORTOISE", "type": "monstergroup", "monsters": [ { "monster": "mon_tortoise" } ] }, { - "name": "GROUP_EGG_TRIFFID", + "id": "GROUP_EGG_TRIFFID", "type": "monstergroup", "monsters": [ { "monster": "mon_triffid_podling" } ] }, { - "name": "GROUP_EGG_FUNGUS", + "id": "GROUP_EGG_FUNGUS", "type": "monstergroup", "monsters": [ { "monster": "mon_fungaloid_saproling" } ] }, { - "name": "GROUP_EGG_SALAMANDER", + "id": "GROUP_EGG_SALAMANDER", "type": "monstergroup", "monsters": [ { "monster": "mon_axolotl" } ] }, { - "name": "GROUP_EGG_TADFISH", + "id": "GROUP_EGG_TADFISH", "type": "monstergroup", "monsters": [ { "monster": "mon_tadpole_small" } ] }, { - "name": "GROUP_EGG_LUNGFISH", + "id": "GROUP_EGG_LUNGFISH", "type": "monstergroup", "monsters": [ { "monster": "mon_fry_lungfish" } ] }, { - "name": "GROUP_EGG_EEL_ELECTRIC", + "id": "GROUP_EGG_EEL_ELECTRIC", "type": "monstergroup", "monsters": [ { "monster": "mon_fry_eel_electric" } ] }, { - "name": "GROUP_EGG_PACU", + "id": "GROUP_EGG_PACU", "type": "monstergroup", "monsters": [ { "monster": "mon_fry_pacu" } ] }, { - "name": "GROUP_EGG_TAMBAQUI", + "id": "GROUP_EGG_TAMBAQUI", "type": "monstergroup", "monsters": [ { "monster": "mon_fry_tambaqui" } ] }, { - "name": "GROUP_EGG_PIRANHA", + "id": "GROUP_EGG_PIRANHA", "type": "monstergroup", "monsters": [ { "monster": "mon_fry_piranha" } ] }, { - "name": "GROUP_EGG_AROWANA", + "id": "GROUP_EGG_AROWANA", "type": "monstergroup", "monsters": [ { "monster": "mon_fry_arowana" } ] }, { - "name": "GROUP_EGG_ARAPAIMA", + "id": "GROUP_EGG_ARAPAIMA", "type": "monstergroup", "monsters": [ { "monster": "mon_fry_arapaima" } ] }, { - "name": "GROUP_EGG_PIRAIBA", + "id": "GROUP_EGG_PIRAIBA", "type": "monstergroup", "monsters": [ { "monster": "mon_fry_piraiba" } ] }, { - "name": "GROUP_EGG_PLECO", + "id": "GROUP_EGG_PLECO", "type": "monstergroup", "monsters": [ { "monster": "mon_fry_pleco" } ] }, { - "name": "GROUP_EGG_GAR", + "id": "GROUP_EGG_GAR", "type": "monstergroup", "monsters": [ { "monster": "mon_fry_gar" } ] }, { - "name": "GROUP_EGG_TUCUNARE", + "id": "GROUP_EGG_TUCUNARE", "type": "monstergroup", "monsters": [ { "monster": "mon_fry_tucunare" } ] }, { - "name": "GROUP_EGG_DISCUS", + "id": "GROUP_EGG_DISCUS", "type": "monstergroup", "monsters": [ { "monster": "mon_fry_discus" } ] }, { - "name": "GROUP_EGG_ANGELFISH", + "id": "GROUP_EGG_ANGELFISH", "type": "monstergroup", "monsters": [ { "monster": "mon_fry_angelfish" } ] }, { - "name": "GROUP_EGG_KOI", + "id": "GROUP_EGG_KOI", "type": "monstergroup", "monsters": [ { "monster": "mon_fry_koi" } ] }, { - "name": "GROUP_EGG_TILAPIA", + "id": "GROUP_EGG_TILAPIA", "type": "monstergroup", "monsters": [ { "monster": "mon_fry_tilapia" } ] }, { - "name": "GROUP_EGG_SABALO", + "id": "GROUP_EGG_SABALO", "type": "monstergroup", "monsters": [ { "monster": "mon_fry_sabalo" } ] }, { - "name": "GROUP_EGG_OSCAR", + "id": "GROUP_EGG_OSCAR", "type": "monstergroup", "monsters": [ { "monster": "mon_fry_oscar" } ] }, { - "name": "GROUP_EGG_GUAPOTE", + "id": "GROUP_EGG_GUAPOTE", "type": "monstergroup", "monsters": [ { "monster": "mon_fry_guapote" } ] }, { - "name": "GROUP_EGG_MAYAHEROS", + "id": "GROUP_EGG_MAYAHEROS", "type": "monstergroup", "monsters": [ { "monster": "mon_fry_mayaheros" } ] } diff --git a/data/mods/TropiCataclysm/monstergroups/fungi.json b/data/mods/TropiCataclysm/monstergroups/fungi.json index cf7d2241458af..56a7bcf191886 100644 --- a/data/mods/TropiCataclysm/monstergroups/fungi.json +++ b/data/mods/TropiCataclysm/monstergroups/fungi.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_FUNGI", + "id": "GROUP_FUNGI", "default": "mon_spore", "monsters": [ { "monster": "mon_spore", "weight": 200, "cost_multiplier": 0 }, @@ -23,7 +23,7 @@ }, { "type": "monstergroup", - "name": "GROUP_FUNGI_FUNGALOID", + "id": "GROUP_FUNGI_FUNGALOID", "monsters": [ { "monster": "mon_fungaloid", "weight": 500, "cost_multiplier": 0 }, { "monster": "mon_fungaloid_shambler", "weight": 250, "cost_multiplier": 0 }, @@ -32,7 +32,7 @@ }, { "type": "monstergroup", - "name": "GROUP_FUNGI_TOWER", + "id": "GROUP_FUNGI_TOWER", "monsters": [ { "monster": "mon_fungal_tendril", "weight": 755, "cost_multiplier": 0 }, { "monster": "mon_fungaloid", "weight": 10, "cost_multiplier": 0 }, @@ -53,7 +53,7 @@ }, { "type": "monstergroup", - "name": "GROUP_FUNGI_FLOWERS", + "id": "GROUP_FUNGI_FLOWERS", "monsters": [ { "monster": "mon_fungal_blossom", "weight": 680, "cost_multiplier": 0 }, { "monster": "mon_fungaloid", "weight": 20, "cost_multiplier": 0 }, @@ -73,7 +73,7 @@ }, { "type": "monstergroup", - "name": "GROUP_FUNGAL_CARETAKER", + "id": "GROUP_FUNGAL_CARETAKER", "default": "mon_fungaloid", "//": "Group for fungal caretakers to evolve", "monsters": [ @@ -90,7 +90,7 @@ }, { "type": "monstergroup", - "name": "GROUP_FUNGI_URBAN", + "id": "GROUP_FUNGI_URBAN", "default": "mon_fungaloid", "monsters": [ { "monster": "mon_fungaloid_caretaker", "weight": 300, "cost_multiplier": 0, "pack_size": [ 2, 4 ] }, diff --git a/data/mods/TropiCataclysm/monstergroups/misc.json b/data/mods/TropiCataclysm/monstergroups/misc.json index 81e9059056c25..c2d37437b26c0 100644 --- a/data/mods/TropiCataclysm/monstergroups/misc.json +++ b/data/mods/TropiCataclysm/monstergroups/misc.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_DOMESTIC", + "id": "GROUP_DOMESTIC", "default": "mon_dog", "is_animal": true, "monsters": [ @@ -12,7 +12,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SAFE", + "id": "GROUP_SAFE", "is_safe": true, "is_animal": true, "monsters": [ @@ -27,7 +27,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SUBWAY", + "id": "GROUP_SUBWAY", "//": "Z-2 subways, some lost nether things but otherwise mostly normal mobs", "default": "mon_spider_cellar_giant", "monsters": [ diff --git a/data/mods/TropiCataclysm/monstergroups/nether.json b/data/mods/TropiCataclysm/monstergroups/nether.json index 5e9910d89b9cf..98e3cccd87fbf 100644 --- a/data/mods/TropiCataclysm/monstergroups/nether.json +++ b/data/mods/TropiCataclysm/monstergroups/nether.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_ALIEN_REEF", + "id": "GROUP_ALIEN_REEF", "default": "mon_shrimp_flying", "monsters": [ { "monster": "mon_shrimp_flying", "weight": 250, "cost_multiplier": 0 }, diff --git a/data/mods/TropiCataclysm/monstergroups/triffid.json b/data/mods/TropiCataclysm/monstergroups/triffid.json index ee3d307dc5ed7..6a39e7050995c 100644 --- a/data/mods/TropiCataclysm/monstergroups/triffid.json +++ b/data/mods/TropiCataclysm/monstergroups/triffid.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_TRIFFID", + "id": "GROUP_TRIFFID", "default": "mon_triffid", "monsters": [ { "monster": "mon_triffid_sprig", "weight": 200, "cost_multiplier": 0, "pack_size": [ 1, 3 ] }, @@ -24,7 +24,7 @@ }, { "type": "monstergroup", - "name": "GROUP_TRIFFID_URBAN", + "id": "GROUP_TRIFFID_URBAN", "default": "mon_triffid", "//": "Group for triffids + plant zeds on special urban locations", "monsters": [ @@ -53,7 +53,7 @@ }, { "type": "monstergroup", - "name": "GROUP_TRIFFID_GARDENLING", + "id": "GROUP_TRIFFID_GARDENLING", "default": "mon_triffid", "//": "Group for triffids gardenlings to evolve", "monsters": [ @@ -74,7 +74,7 @@ }, { "type": "monstergroup", - "name": "GROUP_PLANT_ZEDS", + "id": "GROUP_PLANT_ZEDS", "default": "mon_zombie_garden", "//": "Group for plant zeds", "monsters": [ @@ -88,7 +88,7 @@ }, { "type": "monstergroup", - "name": "GROUP_TRIFFID_OUTER", + "id": "GROUP_TRIFFID_OUTER", "default": "mon_triffid", "monsters": [ { "monster": "mon_triffid_sprig", "weight": 80, "cost_multiplier": 0, "pack_size": [ 1, 3 ] }, @@ -110,7 +110,7 @@ }, { "type": "monstergroup", - "name": "GROUP_TRIFFID_HEARTGUARDS", + "id": "GROUP_TRIFFID_HEARTGUARDS", "default": "mon_triffid", "monsters": [ { "monster": "mon_triffid", "weight": 280, "cost_multiplier": 0 }, @@ -123,7 +123,7 @@ }, { "type": "monstergroup", - "name": "GROUP_TRIFFID_HEART", + "id": "GROUP_TRIFFID_HEART", "monsters": [ { "monster": "mon_triffid_heart" } ] } ] diff --git a/data/mods/TropiCataclysm/monstergroups/tropical_bugs.json b/data/mods/TropiCataclysm/monstergroups/tropical_bugs.json index c308ee25fa772..2696f4aba3832 100644 --- a/data/mods/TropiCataclysm/monstergroups/tropical_bugs.json +++ b/data/mods/TropiCataclysm/monstergroups/tropical_bugs.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_TERMITES", + "id": "GROUP_TERMITES", "is_animal": true, "monsters": [ { "monster": "mon_termite_nymph", "weight": 4, "cost_multiplier": 0 }, @@ -13,7 +13,7 @@ }, { "type": "monstergroup", - "name": "GROUP_TERMITE_SURFACE", + "id": "GROUP_TERMITE_SURFACE", "is_animal": true, "monsters": [ { "monster": "mon_termite_soldier", "weight": 90, "cost_multiplier": 5 }, @@ -24,13 +24,13 @@ }, { "type": "monstergroup", - "name": "GROUP_TERMITE_ALATE", + "id": "GROUP_TERMITE_ALATE", "default": "mon_termite_queen", "monsters": [ { "monster": "mon_termite_king" }, { "monster": "mon_termite_queen" } ] }, { "type": "monstergroup", - "name": "GROUP_TERMITE", + "id": "GROUP_TERMITE", "default": "mon_termite_soldier", "monsters": [ { "monster": "mon_termite_soldier", "weight": 35 }, @@ -40,12 +40,12 @@ }, { "type": "monstergroup", - "name": "GROUP_SCORPION", + "id": "GROUP_SCORPION", "monsters": [ { "monster": "mon_large_scorpion", "ends": "45 days" }, { "monster": "mon_scorpion_giant", "starts": "30 days" } ] }, { "type": "monstergroup", - "name": "GROUP_ONICOPHORE", + "id": "GROUP_ONICOPHORE", "monsters": [ { "monster": "mon_onicophore_small", "weight": 5, "ends": "45 days" }, { "monster": "mon_onicophore", "weight": 5, "starts": "30 days" }, diff --git a/data/mods/TropiCataclysm/monstergroups/wilderness.json b/data/mods/TropiCataclysm/monstergroups/wilderness.json index e2513bd16893c..f89b6678ec53b 100644 --- a/data/mods/TropiCataclysm/monstergroups/wilderness.json +++ b/data/mods/TropiCataclysm/monstergroups/wilderness.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_CAVE", + "id": "GROUP_CAVE", "default": "mon_null", "is_animal": true, "monsters": [ @@ -12,7 +12,7 @@ }, { "type": "monstergroup", - "name": "GROUP_FOREST", + "id": "GROUP_FOREST", "default": "mon_null", "is_animal": true, "monsters": [ @@ -70,7 +70,7 @@ }, { "type": "monstergroup", - "name": "GROUP_RIVER", + "id": "GROUP_RIVER", "default": "mon_null", "is_animal": true, "monsters": [ @@ -120,7 +120,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SWAMP", + "id": "GROUP_SWAMP", "default": "mon_null", "is_animal": true, "monsters": [ @@ -139,7 +139,7 @@ }, { "type": "monstergroup", - "name": "GROUP_PARK_ANIMAL", + "id": "GROUP_PARK_ANIMAL", "is_animal": true, "monsters": [ { "monster": "mon_parrot", "weight": 25, "cost_multiplier": 0 }, @@ -152,7 +152,7 @@ }, { "type": "monstergroup", - "name": "GROUP_ROOF_ANIMAL", + "id": "GROUP_ROOF_ANIMAL", "is_animal": true, "monsters": [ { "monster": "mon_parrot", "weight": 25, "cost_multiplier": 0 }, @@ -173,7 +173,7 @@ }, { "type": "monstergroup", - "name": "GROUP_POND_ANIMAL", + "id": "GROUP_POND_ANIMAL", "default": "mon_null", "is_animal": true, "monsters": [ @@ -190,7 +190,7 @@ }, { "type": "monstergroup", - "name": "GROUP_BIRDFEEDER", + "id": "GROUP_BIRDFEEDER", "is_animal": true, "monsters": [ { "monster": "mon_parrot", "weight": 35, "cost_multiplier": 0 }, diff --git a/data/mods/TropiCataclysm/monstergroups/zombie_upgrades.json b/data/mods/TropiCataclysm/monstergroups/zombie_upgrades.json index 73787ed724396..373a89581fe40 100644 --- a/data/mods/TropiCataclysm/monstergroups/zombie_upgrades.json +++ b/data/mods/TropiCataclysm/monstergroups/zombie_upgrades.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_MOSSY_BOOMER_UPGRADE", + "id": "GROUP_MOSSY_BOOMER_UPGRADE", "default": "mon_boomer_moss", "//": "Upgrades for the Thorny Boomer.", "monsters": [ @@ -12,7 +12,7 @@ }, { "type": "monstergroup", - "name": "GROUP_GARDEN_ZOMBIE_UPGRADE", + "id": "GROUP_GARDEN_ZOMBIE_UPGRADE", "default": "mon_zombie_garden", "//": "Upgrades for the Thorny Shambler.", "monsters": [ diff --git a/data/mods/Xedra_Evolved/effects/effects.json b/data/mods/Xedra_Evolved/effects/effects.json index 42251df436d82..dde654c63c30f 100644 --- a/data/mods/Xedra_Evolved/effects/effects.json +++ b/data/mods/Xedra_Evolved/effects/effects.json @@ -948,7 +948,7 @@ ] } ], - "flags": [ "EFFECT_LIMB_SCORE_MOD" ] + "flags": [ "EFFECT_LIMB_SCORE_MOD", "NO_FEY_MAGIC" ] }, { "type": "effect_type", @@ -973,7 +973,7 @@ { "limb_score": "grip", "modifier": 0.8 }, { "limb_score": "reaction", "modifier": 0.8 } ], - "flags": [ "EFFECT_LIMB_SCORE_MOD" ] + "flags": [ "EFFECT_LIMB_SCORE_MOD", "NO_FEY_MAGIC" ] }, { "type": "effect_type", @@ -1000,7 +1000,7 @@ { "limb_score": "grip", "modifier": 0.85 }, { "limb_score": "reaction", "modifier": 0.85 } ], - "flags": [ "EFFECT_LIMB_SCORE_MOD" ] + "flags": [ "EFFECT_LIMB_SCORE_MOD", "NO_FEY_MAGIC" ] }, { "type": "effect_type", @@ -1025,7 +1025,7 @@ { "limb_score": "grip", "modifier": 0.9 }, { "limb_score": "reaction", "modifier": 0.9 } ], - "flags": [ "EFFECT_LIMB_SCORE_MOD" ] + "flags": [ "EFFECT_LIMB_SCORE_MOD", "NO_FEY_MAGIC" ] }, { "type": "effect_type", @@ -1071,7 +1071,7 @@ { "limb_score": "grip", "modifier": 0.9 }, { "limb_score": "reaction", "modifier": 0.9 } ], - "flags": [ "EFFECT_LIMB_SCORE_MOD" ] + "flags": [ "EFFECT_LIMB_SCORE_MOD", "NO_FEY_MAGIC" ] }, { "type": "effect_type", diff --git a/data/mods/Xedra_Evolved/flags.json b/data/mods/Xedra_Evolved/flags.json index bba8855bd074c..445cff9b88129 100644 --- a/data/mods/Xedra_Evolved/flags.json +++ b/data/mods/Xedra_Evolved/flags.json @@ -56,5 +56,9 @@ { "id": "STABILIZED_TIMELINE", "type": "monster_flag" + }, + { + "id": "NO_FEY_MAGIC", + "type": "json_flag" } ] diff --git a/data/mods/Xedra_Evolved/furniture_and_terrain/furniture.json b/data/mods/Xedra_Evolved/furniture_and_terrain/furniture.json index 7c701a0895c32..23b1c7f0824c6 100644 --- a/data/mods/Xedra_Evolved/furniture_and_terrain/furniture.json +++ b/data/mods/Xedra_Evolved/furniture_and_terrain/furniture.json @@ -232,7 +232,7 @@ "color": "brown", "required_str": -1, "move_cost_mod": 0, - "flags": [ "TRANSLOCATOR", "MOUNTABLE", "TRANSPARENT", "ALLOW_FIELD_EFFECT", "EASY_DECONSTRUCT" ], + "flags": [ "TRANSLOCATOR", "MOUNTABLE", "TRANSPARENT", "ALLOW_FIELD_EFFECT", "EASY_DECONSTRUCT", "FREE_TO_EXAMINE" ], "examine_action": "translocator", "deconstruct": { "items": [ ] } }, @@ -245,7 +245,7 @@ "color": "light_gray", "required_str": -1, "move_cost_mod": 0, - "flags": [ "TRANSLOCATOR", "MOUNTABLE", "TRANSPARENT", "ALLOW_FIELD_EFFECT", "EASY_DECONSTRUCT" ], + "flags": [ "TRANSLOCATOR", "MOUNTABLE", "TRANSPARENT", "ALLOW_FIELD_EFFECT", "EASY_DECONSTRUCT", "FREE_TO_EXAMINE" ], "examine_action": "translocator", "deconstruct": { "items": [ ] } }, @@ -258,7 +258,7 @@ "color": "white", "required_str": -1, "move_cost_mod": 0, - "flags": [ "TRANSLOCATOR", "MOUNTABLE", "TRANSPARENT", "ALLOW_FIELD_EFFECT", "EASY_DECONSTRUCT" ], + "flags": [ "TRANSLOCATOR", "MOUNTABLE", "TRANSPARENT", "ALLOW_FIELD_EFFECT", "EASY_DECONSTRUCT", "FREE_TO_EXAMINE" ], "examine_action": "translocator", "deconstruct": { "items": [ ] } }, @@ -271,7 +271,7 @@ "color": "light_gray", "required_str": -1, "move_cost_mod": 0, - "flags": [ "TRANSLOCATOR", "MOUNTABLE", "TRANSPARENT", "ALLOW_FIELD_EFFECT", "EASY_DECONSTRUCT" ], + "flags": [ "TRANSLOCATOR", "MOUNTABLE", "TRANSPARENT", "ALLOW_FIELD_EFFECT", "EASY_DECONSTRUCT", "FREE_TO_EXAMINE" ], "examine_action": "translocator", "deconstruct": { "items": [ ] } }, diff --git a/data/mods/Xedra_Evolved/harvest_monster_hunter_gracken.json b/data/mods/Xedra_Evolved/harvest_monster_hunter_gracken.json index 94c192afa9e21..92cc11bda496c 100644 --- a/data/mods/Xedra_Evolved/harvest_monster_hunter_gracken.json +++ b/data/mods/Xedra_Evolved/harvest_monster_hunter_gracken.json @@ -164,5 +164,41 @@ "message": "", "copy-from": "arachnid_acid", "extend": { "entries": [ { "drop": "ant_stomach", "scale_num": [ 1, 1 ], "max": 1, "type": "offal" } ] } + }, + { + "id": "zombie_child", + "//": "your child sized humanoid zombie", + "type": "harvest", + "copy-from": "zombie_humanoid", + "message": "", + "delete": { "entries": [ { "drop": "sinew", "type": "bone", "mass_ratio": 0.00035 } ] }, + "extend": { + "entries": [ + { "drop": "meat_tainted", "type": "flesh", "mass_ratio": 0.25 }, + { "drop": "blood_tainted", "type": "blood", "mass_ratio": 0.1 }, + { "drop": "fat_tainted", "type": "flesh", "mass_ratio": 0.08 }, + { "drop": "tainted_innards", "type": "offal", "mass_ratio": 0.15 }, + { "drop": "tainted_marrow", "type": "bone", "mass_ratio": 0.005 }, + { "drop": "underdeveloped_sinew", "type": "bone", "mass_ratio": 0.00035 } + ] + } + }, + { + "id": "zombie_runner", + "//": "your runner humanoid zombie", + "type": "harvest", + "copy-from": "zombie_humanoid", + "message": "", + "delete": { "entries": [ { "drop": "sinew", "type": "bone", "mass_ratio": 0.00035 } ] }, + "extend": { + "entries": [ + { "drop": "meat_tainted", "type": "flesh", "mass_ratio": 0.25 }, + { "drop": "blood_tainted", "type": "blood", "mass_ratio": 0.1 }, + { "drop": "fat_tainted", "type": "flesh", "mass_ratio": 0.08 }, + { "drop": "tainted_innards", "type": "offal", "mass_ratio": 0.15 }, + { "drop": "tainted_marrow", "type": "bone", "mass_ratio": 0.005 }, + { "drop": "runner_sinew", "type": "bone", "mass_ratio": 0.00035 } + ] + } } ] diff --git a/data/mods/Xedra_Evolved/itemgroups/monster_drops.json b/data/mods/Xedra_Evolved/itemgroups/monster_drops.json index a92700bfdc544..6d855a90e5d4e 100644 --- a/data/mods/Xedra_Evolved/itemgroups/monster_drops.json +++ b/data/mods/Xedra_Evolved/itemgroups/monster_drops.json @@ -303,7 +303,7 @@ "id": "renfield_9mm_death_drops", "entries": [ { - "distribution": [ + "collection": [ { "item": "glock17_17", "prob": 100, "damage": [ 1, 3 ] }, { "group": "renfield_glock_mags", "prob": 40 }, { "item": "scrap_dreamdross", "prob": 75, "count": [ 1, 4 ] } @@ -319,7 +319,7 @@ "id": "renfield_shotgun_death_drops", "entries": [ { - "distribution": [ + "collection": [ { "item": "mossberg_500", "prob": 100, "damage": [ 1, 3 ] }, { "item": "shot_00", "prob": 40, "count": [ 1, 6 ] }, { "item": "scrap_dreamdross", "prob": 75, "count": [ 1, 4 ] } @@ -334,7 +334,7 @@ "id": "renfield_flamethrower_death_drops", "entries": [ { - "distribution": [ + "collection": [ { "item": "rm451_flamethrower", "prob": 100, "damage": [ 1, 3 ] }, { "item": "scrap_dreamdross", "prob": 75, "count": [ 1, 4 ] } ] diff --git a/data/mods/Xedra_Evolved/items/ammo.json b/data/mods/Xedra_Evolved/items/ammo.json index da33ea0dd5fce..53bbec7be8e55 100644 --- a/data/mods/Xedra_Evolved/items/ammo.json +++ b/data/mods/Xedra_Evolved/items/ammo.json @@ -111,7 +111,43 @@ "symbol": "=", "color": "light_red", "looks_like": "thread", - "description": "An elastic sinew cut from a corpse, usable as thread.", + "description": "An extremely elastic sinew cut from a corpse, usable as a makeshift slinky.", + "material": [ "flesh" ], + "volume": "250 ml", + "weight": "1 g", + "ammo_type": "thread", + "count": 10, + "stack_size": 200 + }, + { + "type": "AMMO", + "id": "runner_sinew", + "category": "spare_parts", + "price": "0 cent", + "price_postapoc": "25 cent", + "name": { "str": "springy sinew" }, + "symbol": "=", + "color": "light_red", + "looks_like": "thread", + "description": "An tightly wound sinew cut from a corpse, usable as thread.", + "material": [ "flesh" ], + "volume": "250 ml", + "weight": "1 g", + "ammo_type": "thread", + "count": 10, + "stack_size": 200 + }, + { + "type": "AMMO", + "id": "underdeveloped_sinew", + "category": "spare_parts", + "price": "0 cent", + "price_postapoc": "25 cent", + "name": { "str": "elastic sinew" }, + "symbol": "=", + "color": "light_red", + "looks_like": "thread", + "description": "An short and tightly elastic sinew cut from a corpse, usable as thread.", "material": [ "flesh" ], "volume": "250 ml", "weight": "1 g", diff --git a/data/mods/Xedra_Evolved/items/gracken_trait_improvements.json b/data/mods/Xedra_Evolved/items/gracken_trait_improvements.json index 22c070b7ecc67..b34fe435030bc 100644 --- a/data/mods/Xedra_Evolved/items/gracken_trait_improvements.json +++ b/data/mods/Xedra_Evolved/items/gracken_trait_improvements.json @@ -156,5 +156,53 @@ "condition": { "not": { "u_has_trait": "SHADE_CARNIVORE" } }, "effect": [ { "u_message": "You exchanged your previous stomach for this." }, { "u_add_trait": "SHADE_CARNIVORE" } ], "false_effect": [ { "u_message": "You are already a carnivore.", "type": "neutral" } ] + }, + { + "id": "gracken_shade_legs", + "copy-from": "gracken_improvement_general", + "type": "COMESTIBLE", + "name": { "str_sp": "Gracken Shade Legs" }, + "looks_like": "offal", + "description": "An organ that allows a mature Gracken to convert their legs back to a base state.", + "consumption_effect_on_conditions": [ "shade_legs" ] + }, + { + "type": "effect_on_condition", + "id": "shade_legs", + "condition": { "not": { "u_has_trait": "SHADE_LEGS" } }, + "effect": [ { "u_message": "You exchanged your previous arms for this." }, { "u_add_trait": "SHADE_LEGS" } ], + "false_effect": [ { "u_message": "You are already have Gracken legs.", "type": "neutral" } ] + }, + { + "id": "gracken_short_legs", + "copy-from": "gracken_improvement_general", + "type": "COMESTIBLE", + "name": { "str_sp": "Gracken Short Legs" }, + "looks_like": "offal", + "description": "An organ that allows a mature Gracken to convert their legs to a shorter form.", + "consumption_effect_on_conditions": [ "short_legs" ] + }, + { + "type": "effect_on_condition", + "id": "short_legs", + "condition": { "not": { "u_has_trait": "SHADE_SHORT_LEGS" } }, + "effect": [ { "u_message": "You exchanged your previous legs for this." }, { "u_add_trait": "SHADE_SHORT_LEGS" } ], + "false_effect": [ { "u_message": "You are already have short legs.", "type": "neutral" } ] + }, + { + "id": "gracken_long_legs", + "copy-from": "gracken_improvement_general", + "type": "COMESTIBLE", + "name": { "str_sp": "Gracken Long Legs" }, + "looks_like": "offal", + "description": "An organ that allows a mature Gracken to convert their legs to a longer form.", + "consumption_effect_on_conditions": [ "long_legs" ] + }, + { + "type": "effect_on_condition", + "id": "long_legs", + "condition": { "not": { "u_has_trait": "SHADE_LONG_LEGS" } }, + "effect": [ { "u_message": "You exchanged your previous arms for this." }, { "u_add_trait": "SHADE_LONG_LEGS" } ], + "false_effect": [ { "u_message": "You are already have long legs.", "type": "neutral" } ] } ] diff --git a/data/mods/Xedra_Evolved/mapgen/elemental_eruptions/undine_pool.json b/data/mods/Xedra_Evolved/mapgen/elemental_eruptions/undine_pool.json index 956ac622d9c0f..c2eef7ab96a7e 100644 --- a/data/mods/Xedra_Evolved/mapgen/elemental_eruptions/undine_pool.json +++ b/data/mods/Xedra_Evolved/mapgen/elemental_eruptions/undine_pool.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "undine_warp_pool_surface" ], - "weight": 100, "object": { "rotation": [ 0, 3 ], "predecessor_mapgen": "forest", @@ -57,7 +56,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "undine_warp_pool_zneg_dirt" ], - "weight": 100, "object": { "rotation": [ 0, 3 ], "fill_ter": "t_soil", @@ -96,7 +94,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "undine_warp_pool_zneg" ], - "weight": 100, "object": { "rotation": [ 0, 3 ], "fill_ter": "t_rock", @@ -135,7 +132,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "undine_warp_pool_warper" ], - "weight": 100, "object": { "rotation": [ 0, 3 ], "fill_ter": "t_rock", diff --git a/data/mods/Xedra_Evolved/mapgen/great_tree/great_tree_roots.json b/data/mods/Xedra_Evolved/mapgen/great_tree/great_tree_roots.json index d085b6b566caa..ee77d7865a14c 100644 --- a/data/mods/Xedra_Evolved/mapgen/great_tree/great_tree_roots.json +++ b/data/mods/Xedra_Evolved/mapgen/great_tree/great_tree_roots.json @@ -3,7 +3,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "great_tree_roots" ], - "weight": 100, "object": { "fill_ter": "t_root_floor", "rows": [ @@ -39,7 +38,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "great_tree_roots_n" ], - "weight": 100, "object": { "fill_ter": "t_root_floor", "rows": [ @@ -76,7 +74,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "great_tree_roots_s" ], - "weight": 100, "object": { "fill_ter": "t_root_floor", "rows": [ @@ -113,7 +110,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "great_tree_roots_e" ], - "weight": 100, "object": { "fill_ter": "t_root_floor", "rows": [ @@ -150,7 +146,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "great_tree_roots_w" ], - "weight": 100, "object": { "fill_ter": "t_root_floor", "rows": [ @@ -187,7 +182,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "great_tree_roots_se" ], - "weight": 100, "object": { "fill_ter": "t_root_floor", "rows": [ @@ -224,7 +218,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "great_tree_roots_sw" ], - "weight": 100, "object": { "fill_ter": "t_root_floor", "rows": [ @@ -261,7 +254,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "great_tree_roots_nw" ], - "weight": 100, "object": { "fill_ter": "t_root_floor", "rows": [ @@ -298,7 +290,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ "great_tree_roots_ne" ], - "weight": 100, "object": { "fill_ter": "t_root_floor", "rows": [ diff --git a/data/mods/Xedra_Evolved/mapgen/great_tree/great_tree_trunk.json b/data/mods/Xedra_Evolved/mapgen/great_tree/great_tree_trunk.json index 732435132ddde..49cdafb511a36 100644 --- a/data/mods/Xedra_Evolved/mapgen/great_tree/great_tree_trunk.json +++ b/data/mods/Xedra_Evolved/mapgen/great_tree/great_tree_trunk.json @@ -70,7 +70,6 @@ "type": "mapgen", "method": "json", "om_terrain": [ [ "great_tree_z1_nw", "great_tree_z1_ne" ], [ "great_tree_z1_sw", "great_tree_z1_se" ] ], - "weight": 100, "object": { "fill_ter": "t_barkfloor", "rows": [ diff --git a/data/mods/Xedra_Evolved/mod_interactions/defense_mode/monstergroups.json b/data/mods/Xedra_Evolved/mod_interactions/defense_mode/monstergroups.json index b24d6a6d6c45c..cb0345fbe4439 100644 --- a/data/mods/Xedra_Evolved/mod_interactions/defense_mode/monstergroups.json +++ b/data/mods/Xedra_Evolved/mod_interactions/defense_mode/monstergroups.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_DEFENSE_MODE_EXODII", + "id": "GROUP_DEFENSE_MODE_EXODII", "//": "A small Exodii hunter/killer unit or party, respecialized for Defense Mode.", "monsters": [ { "monster": "mon_dm_exodii_quad_jotunn", "weight": 20 }, @@ -11,7 +11,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DEFENSE_MODE_XEDRA", + "id": "GROUP_DEFENSE_MODE_XEDRA", "monsters": [ { "monster": "mon_dm_changeling", "weight": 100, "cost_multiplier": 1 }, { "monster": "mon_dm_fetch_child", "weight": 400, "cost_multiplier": 0 }, diff --git a/data/mods/Xedra_Evolved/mod_interactions/innawood/monstergroups/monstergroup_overrides.json b/data/mods/Xedra_Evolved/mod_interactions/innawood/monstergroups/monstergroup_overrides.json index 7056cb217f25b..ef6b7b0ed5e82 100644 --- a/data/mods/Xedra_Evolved/mod_interactions/innawood/monstergroups/monstergroup_overrides.json +++ b/data/mods/Xedra_Evolved/mod_interactions/innawood/monstergroups/monstergroup_overrides.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_RENFIELD_UPGRADE_INNAWOOD", + "id": "GROUP_RENFIELD_UPGRADE_INNAWOOD", "monsters": [ { "monster": "mon_renfield", "weight": 950 }, { "monster": "mon_renfield_abomination", "weight": 50 } ] } ] diff --git a/data/mods/Xedra_Evolved/mod_interactions/innawood/monstergroups/monstergroups_new.json b/data/mods/Xedra_Evolved/mod_interactions/innawood/monstergroups/monstergroups_new.json index 2760855a4deac..881664f13c6ab 100644 --- a/data/mods/Xedra_Evolved/mod_interactions/innawood/monstergroups/monstergroups_new.json +++ b/data/mods/Xedra_Evolved/mod_interactions/innawood/monstergroups/monstergroups_new.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_FOREST", + "id": "GROUP_FOREST", "is_animal": true, "monsters": [ { "group": "GROUP_CHANGELING_MIRRORED_FIELD", "weight": 10, "cost_multiplier": 10 }, @@ -12,7 +12,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SWAMP", + "id": "GROUP_SWAMP", "//": "Current SPRING first DAY count is X.", "is_animal": true, "monsters": [ @@ -24,13 +24,13 @@ }, { "type": "monstergroup", - "name": "GROUP_OVERLAND_RENFIELD", + "id": "GROUP_OVERLAND_RENFIELD", "is_animal": true, "monsters": [ { "monster": "mon_renfield", "weight": 200 }, { "monster": "mon_renfield", "weight": 50, "pack_size": [ 2, 5 ] } ] }, { "type": "monstergroup", - "name": "GROUP_CAVE_VAMPIRE", + "id": "GROUP_CAVE_VAMPIRE", "is_animal": true, "monsters": [ { "monster": "mon_renfield", "weight": 200 }, diff --git a/data/mods/Xedra_Evolved/monsters/monster_evolutions.json b/data/mods/Xedra_Evolved/monsters/monster_evolutions.json index dac059be4a4e5..93baff87eefcd 100644 --- a/data/mods/Xedra_Evolved/monsters/monster_evolutions.json +++ b/data/mods/Xedra_Evolved/monsters/monster_evolutions.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_RENFIELD_UPGRADE", + "id": "GROUP_RENFIELD_UPGRADE", "monsters": [ { "monster": "mon_renfield", "weight": 910 }, { "monster": "mon_renfield_9mm", "weight": 450 }, diff --git a/data/mods/Xedra_Evolved/monsters/monster_overrides.json b/data/mods/Xedra_Evolved/monsters/monster_overrides.json index d41278d7b455f..0e4c307632673 100644 --- a/data/mods/Xedra_Evolved/monsters/monster_overrides.json +++ b/data/mods/Xedra_Evolved/monsters/monster_overrides.json @@ -35,7 +35,7 @@ "stomach_size": 500, "melee_damage": [ { "damage_type": "cut", "amount": 2 } ], "dodge": 2, - "harvest": "mammal_fur", + "harvest": "bear_with_skull", "dissect": "dissect_ursine_sample_single", "special_attacks": [ [ "EAT_FOOD", 60 ], { "type": "bite", "cooldown": 30, "infection_chance": 44 } ], "upgrades": { "age_grow": 480, "into": "mon_bear" } @@ -246,5 +246,61 @@ "description": "A monstrous brown ant with a swollen abdomen that ends with a small orifice at the tip. Glistening liquid seems to drip out periodically.", "copy-from": "mon_ant_acid", "harvest": "giant_acid_ant" + }, + { + "id": "mon_zombie_child_base", + "type": "MONSTER", + "name": { "str": "zombie child", "str_pl": "zombie children" }, + "description": "It was only a child, and little is different about it now aside from the hungry look in its eyes. You'd be hard-pressed to not feel like you were killing an actual child by putting it down.", + "copy-from": "mon_zombie_base", + "proportional": { "volume": 0.5, "weight": 0.5 }, + "hp": 40, + "speed": 65, + "symbol": "z", + "melee_skill": 2, + "melee_damage": [ { "damage_type": "cut", "amount": 2 } ], + "dodge": 2, + "weakpoint_sets": [ "wps_humanoid_body", "wps_humanoid_child_body", "wps_humanoid_head_big" ], + "families": [ "prof_gross_anatomy", "prof_intro_biology", "prof_physiology", "prof_wp_zombie", "prof_wp_child" ], + "vision_day": 30, + "special_attacks": [ + { "id": "bite_humanoid", "attack_upper": false, "cooldown": 5 }, + { "id": "scratch", "attack_upper": false, "cooldown": 15 } + ], + "death_drops": { + "subtype": "collection", + "groups": [ [ "default_zombie_children_clothes", 100 ], [ "child_items_pockets", 65 ] ], + "//": "default zombie children clothing (always), additional items from child_items_pockets (sometimes)" + }, + "harvest": "zombie_child", + "burn_into": "mon_zombie_child_scorched", + "fungalize_into": "mon_zombie_child_dusted", + "upgrades": { "half_life": 30, "into_group": "GROUP_CHILD_ZOMBIE_UPGRADE" }, + "extend": { "weakpoint_sets": [ "wps_humanoid_child_body", "wps_humanoid_head_big" ], "families": [ "prof_wp_child" ] }, + "delete": { "flags": [ "PUSH_MON" ] } + }, + { + "id": "mon_zombie_runner", + "type": "MONSTER", + "name": { "str": "zombie runner" }, + "description": "This recently-risen body moves quickly, darting its head back and forth and gnawing at its hands.", + "copy-from": "mon_zombie_base", + "speed": 105, + "color": "brown_white", + "melee_dice": 4, + "melee_damage": [ { "damage_type": "cut", "amount": 1 } ], + "dodge": 1, + "special_attacks": [ + { "id": "grab" }, + { "id": "scratch_humanoid", "cooldown": 10 }, + { + "id": "bite_humanoid", + "cooldown": 5, + "damage_max_instance": [ { "damage_type": "stab", "amount": 10, "armor_multiplier": 0.7 } ] + } + ], + "upgrades": { "half_life": 35, "into": "mon_zombie_hunter" }, + "fungalize_into": "mon_zombie_runner_dusted", + "harvest": "zombie_runner" } ] diff --git a/data/mods/Xedra_Evolved/monsters/monstergroup.json b/data/mods/Xedra_Evolved/monsters/monstergroup.json index 51afaf0d38065..8ffca0f1635f9 100644 --- a/data/mods/Xedra_Evolved/monsters/monstergroup.json +++ b/data/mods/Xedra_Evolved/monsters/monstergroup.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_SPIDER", + "id": "GROUP_SPIDER", "monsters": [ { "monster": "mon_spider_disease", "weight": 40, "cost_multiplier": 0 }, { "monster": "mon_spider_web_small", "weight": 400, "cost_multiplier": 0 } @@ -9,7 +9,7 @@ }, { "type": "monstergroup", - "name": "GROUP_CHANGELING_MIRRORED_FIELD", + "id": "GROUP_CHANGELING_MIRRORED_FIELD", "monsters": [ { "monster": "mon_changeling", "weight": 100, "cost_multiplier": 1 }, { "monster": "mon_fetch_child", "weight": 400, "cost_multiplier": 0 }, @@ -18,7 +18,7 @@ }, { "type": "monstergroup", - "name": "GROUP_CHANGELING_STRIKE_FORCE", + "id": "GROUP_CHANGELING_STRIKE_FORCE", "monsters": [ { "monster": "mon_changeling_bannerman", "weight": 100, "cost_multiplier": 1 }, { "monster": "mon_fetch_daffodil_warrior", "weight": 400, "cost_multiplier": 0 }, @@ -28,7 +28,7 @@ }, { "type": "monstergroup", - "name": "GROUP_GOBLIN_SPIDER", + "id": "GROUP_GOBLIN_SPIDER", "monsters": [ { "monster": "mon_goblin_spider", "weight": 100, "cost_multiplier": 1 }, { "monster": "mon_fetch_child", "weight": 200, "cost_multiplier": 1 } @@ -36,7 +36,7 @@ }, { "type": "monstergroup", - "name": "GROUP_DREAM_WOUND_SHADOW", + "id": "GROUP_DREAM_WOUND_SHADOW", "default": "mon_dream_shadow", "monsters": [ { "monster": "mon_dream_shadow", "weight": 500, "cost_multiplier": 0 }, @@ -45,7 +45,7 @@ }, { "type": "monstergroup", - "name": "GROUP_FOREST", + "id": "GROUP_FOREST", "is_animal": true, "monsters": [ { "monster": "mon_xe_unicorn", "weight": 10, "cost_multiplier": 10, "starts": 240, "pack_size": [ 1, 5 ] }, @@ -55,17 +55,17 @@ }, { "type": "monstergroup", - "name": "GROUP_RIVER", + "id": "GROUP_RIVER", "is_animal": true, "monsters": [ { "monster": "mon_xe_mavka", "weight": 1, "cost_multiplier": 10, "starts": 500, "pack_size": [ 1, 5 ] } ] }, { - "name": "GROUP_PARK_SCENIC", + "id": "GROUP_PARK_SCENIC", "type": "monstergroup", "monsters": [ { "monster": "mon_vampire_moroi", "weight": 10 }, { "monster": "mon_vampire_strigoi", "weight": 1 } ] }, { - "name": "GROUP_PARK_PLAYGROUND", + "id": "GROUP_PARK_PLAYGROUND", "type": "monstergroup", "monsters": [ { "monster": "mon_vampire_moroi", "weight": 10 }, @@ -74,38 +74,38 @@ ] }, { - "name": "GROUP_HOUSE", + "id": "GROUP_HOUSE", "type": "monstergroup", "monsters": [ { "monster": "mon_vampire_moroi", "weight": 5 }, { "monster": "mon_vampire_strigoi", "weight": 1 } ] }, { - "name": "GROUP_MANSION_START", + "id": "GROUP_MANSION_START", "type": "monstergroup", "monsters": [ { "monster": "mon_vampire_moroi", "weight": 80 } ] }, { - "name": "GROUP_HOSPITAL", + "id": "GROUP_HOSPITAL", "type": "monstergroup", "monsters": [ { "monster": "mon_vampire_moroi", "weight": 5 }, { "monster": "mon_vampire_strigoi", "weight": 1 } ] }, { - "name": "FERAL_HUMANS", + "id": "FERAL_HUMANS", "type": "monstergroup", "monsters": [ { "monster": "mon_vampire_moroi", "weight": 5 }, { "monster": "mon_vampire_strigoi", "weight": 1 } ] }, { - "name": "GROUP_RETIREMENT_COMMUNITY", + "id": "GROUP_RETIREMENT_COMMUNITY", "type": "monstergroup", "monsters": [ { "monster": "mon_vampire_moroi", "weight": 5 }, { "monster": "mon_vampire_strigoi", "weight": 1 } ] }, { "type": "monstergroup", - "name": "GROUP_MOROI", + "id": "GROUP_MOROI", "monsters": [ { "monster": "mon_vampire_moroi", "weight": 35 }, { "monster": "mon_renfield", "weight": 50, "pack_size": [ 1, 2 ] } ] }, { "type": "monstergroup", - "name": "GROUP_VAMPIRE_CATHEDRAL", + "id": "GROUP_VAMPIRE_CATHEDRAL", "monsters": [ { "monster": "mon_bat_giant", "weight": 35, "pack_size": [ 1, 2 ] }, { "monster": "mon_renfield", "weight": 50, "pack_size": [ 1, 3 ] } @@ -113,7 +113,7 @@ }, { "type": "monstergroup", - "name": "GROUP_STRIGOI", + "id": "GROUP_STRIGOI", "monsters": [ { "monster": "mon_renfield", "weight": 50, "pack_size": [ 1, 2 ] }, { "monster": "mon_vampire_strigoi", "weight": 25 }, @@ -123,7 +123,7 @@ }, { "type": "monstergroup", - "name": "GROUP_VAMPIRES_MIXED", + "id": "GROUP_VAMPIRES_MIXED", "monsters": [ { "monster": "mon_renfield", "weight": 50, "pack_size": [ 1, 2 ] }, { "monster": "mon_vampire_moroi", "weight": 25 }, @@ -132,30 +132,30 @@ }, { "type": "monstergroup", - "name": "GROUP_RENFIELDS", + "id": "GROUP_RENFIELDS", "monsters": [ { "monster": "mon_renfield", "weight": 50, "pack_size": [ 1, 2 ] } ] }, { "type": "monstergroup", - "name": "GROUP_SWARM_BATS", + "id": "GROUP_SWARM_BATS", "is_animal": true, "monsters": [ { "monster": "xe_mon_bat", "weight": 10, "pack_size": [ 1, 2 ] } ] }, { "type": "monstergroup", - "name": "GROUP_GIANT_BATS", + "id": "GROUP_GIANT_BATS", "is_animal": true, "monsters": [ { "monster": "mon_bat_giant", "weight": 10 } ] }, { "type": "monstergroup", - "name": "GROUP_VAMPIRE_BATS", + "id": "GROUP_VAMPIRE_BATS", "is_animal": true, "monsters": [ { "monster": "mon_vampire_bat", "weight": 10, "pack_size": [ 1, 2 ] } ] }, { "type": "monstergroup", - "name": "GROUP_ALL_BATS", + "id": "GROUP_ALL_BATS", "is_animal": true, "monsters": [ { "monster": "xe_mon_bat", "weight": 10, "pack_size": [ 1, 2 ] }, @@ -165,7 +165,7 @@ }, { "type": "monstergroup", - "name": "GROUP_Exodii_Jotunn", + "id": "GROUP_Exodii_Jotunn", "//": "A small Exodii hunter/killer unit or party. Hunting for Xedra Survivors or Balthazar pawns.", "monsters": [ { "monster": "mon_exodii_quad", "weight": 100 }, @@ -175,12 +175,12 @@ }, { "type": "monstergroup", - "name": "GROUP_FERAL_AGENTS", + "id": "GROUP_FERAL_AGENTS", "monsters": [ { "monster": "mon_feral_zebra_agent", "weight": 100, "pack_size": [ 1, 2 ] } ] }, { "type": "monstergroup", - "name": "GROUP_FERAL_AGENTS_BORDER_PATROL_OFFICE", + "id": "GROUP_FERAL_AGENTS_BORDER_PATROL_OFFICE", "monsters": [ { "monster": "mon_feral_zebra_agent", "weight": 100, "pack_size": [ 2, 4 ] }, { "monster": "mon_feral_zebra_agent_p90", "weight": 100, "pack_size": [ 0, 2 ] } @@ -188,7 +188,7 @@ }, { "type": "monstergroup", - "name": "GROUP_GENIUS_IERDE", + "id": "GROUP_GENIUS_IERDE", "monsters": [ { "monster": "mon_monstrous_badger", "weight": 150, "cost_multiplier": 0 }, { "monster": "mon_stoneling", "weight": 250, "cost_multiplier": 0 }, @@ -197,7 +197,7 @@ }, { "type": "monstergroup", - "name": "GROUP_GENIUS_IERDE_LESSER", + "id": "GROUP_GENIUS_IERDE_LESSER", "monsters": [ { "monster": "mon_monstrous_badger", "weight": 100, "cost_multiplier": 0 }, { "monster": "mon_stoneling", "weight": 200, "cost_multiplier": 0 } @@ -205,12 +205,12 @@ }, { "type": "monstergroup", - "name": "GROUP_GENIUS_IERDE_MEDIAL", + "id": "GROUP_GENIUS_IERDE_MEDIAL", "monsters": [ { "monster": "mon_shamir_worm", "weight": 50, "cost_multiplier": 0 } ] }, { "type": "monstergroup", - "name": "GROUP_GENIUS_UNDINE", + "id": "GROUP_GENIUS_UNDINE", "monsters": [ { "monster": "mon_water_sprite", "weight": 125, "cost_multiplier": 0 }, { "monster": "mon_spitting_lizard", "weight": 300, "cost_multiplier": 0 }, @@ -226,7 +226,7 @@ }, { "type": "monstergroup", - "name": "GROUP_GENIUS_UNDINE_LESSER", + "id": "GROUP_GENIUS_UNDINE_LESSER", "monsters": [ { "monster": "mon_water_sprite", "weight": 100, "cost_multiplier": 0 }, { "monster": "mon_spitting_lizard", "weight": 100, "cost_multiplier": 0 } @@ -234,7 +234,7 @@ }, { "type": "monstergroup", - "name": "GROUP_GENIUS_UNDINE_MEDIAL", + "id": "GROUP_GENIUS_UNDINE_MEDIAL", "monsters": [ { "monster": "mon_undertow", "weight": 100, "cost_multiplier": 0 }, { "monster": "mon_shabriri", "weight": 50, "cost_multiplier": 0 } @@ -242,12 +242,12 @@ }, { "type": "monstergroup", - "name": "GROUP_GENIUS_UNDINE_GREATER", + "id": "GROUP_GENIUS_UNDINE_GREATER", "monsters": [ { "monster": "mon_nuckalavee", "weight": 20, "cost_multiplier": 0 } ] }, { "type": "monstergroup", - "name": "GROUP_GENIUS_SALAMANDER", + "id": "GROUP_GENIUS_SALAMANDER", "monsters": [ { "monster": "mon_smoke_mephit", "weight": 100, "cost_multiplier": 0 }, { "monster": "mon_salamander_tiny", "weight": 300, "cost_multiplier": 0 }, @@ -256,7 +256,7 @@ }, { "type": "monstergroup", - "name": "GROUP_GENIUS_SALAMANDER_LESSER", + "id": "GROUP_GENIUS_SALAMANDER_LESSER", "monsters": [ { "monster": "mon_smoke_mephit", "weight": 100, "cost_multiplier": 0 }, { "monster": "mon_salamander_tiny", "weight": 100, "cost_multiplier": 0 } @@ -264,12 +264,12 @@ }, { "type": "monstergroup", - "name": "GROUP_GENIUS_SALAMANDER_GREATER", + "id": "GROUP_GENIUS_SALAMANDER_GREATER", "monsters": [ { "monster": "mon_elemental_saraph", "weight": 50, "cost_multiplier": 0 } ] }, { "type": "monstergroup", - "name": "GROUP_GENIUS_SYLPH", + "id": "GROUP_GENIUS_SYLPH", "monsters": [ { "monster": "mon_skyglass_butterflies", "weight": 150, "cost_multiplier": 0 }, { "monster": "mon_dragonfly_fae", "weight": 250, "cost_multiplier": 0 }, @@ -278,7 +278,7 @@ }, { "type": "monstergroup", - "name": "GROUP_GENIUS_SYLPH_LESSER", + "id": "GROUP_GENIUS_SYLPH_LESSER", "monsters": [ { "monster": "mon_skyglass_butterflies", "weight": 80, "cost_multiplier": 0 }, { "monster": "mon_dragonfly_fae", "weight": 40, "cost_multiplier": 0 } @@ -286,12 +286,12 @@ }, { "type": "monstergroup", - "name": "GROUP_GENIUS_SYLPH_MEDIAL", + "id": "GROUP_GENIUS_SYLPH_MEDIAL", "monsters": [ { "monster": "mon_sheyd", "weight": 50, "cost_multiplier": 0 } ] }, { "type": "monstergroup", - "name": "GROUP_GENIUS_ARVORE", + "id": "GROUP_GENIUS_ARVORE", "monsters": [ { "monster": "mon_vineling", "weight": 100, "cost_multiplier": 0 }, { "monster": "mon_ratatosk_children", "weight": 300, "cost_multiplier": 0 }, @@ -301,7 +301,7 @@ }, { "type": "monstergroup", - "name": "GROUP_GENIUS_ARVORE_LESSER", + "id": "GROUP_GENIUS_ARVORE_LESSER", "monsters": [ { "monster": "mon_vineling", "weight": 100, "cost_multiplier": 0 }, { "monster": "mon_ratatosk_children", "weight": 100, "cost_multiplier": 0 } @@ -309,17 +309,17 @@ }, { "type": "monstergroup", - "name": "GROUP_GENIUS_ARVORE_MEDIAL", + "id": "GROUP_GENIUS_ARVORE_MEDIAL", "monsters": [ { "monster": "mon_bear_thorn", "weight": 50, "cost_multiplier": 0 } ] }, { "type": "monstergroup", - "name": "GROUP_GENIUS_ARVORE_GREATER", + "id": "GROUP_GENIUS_ARVORE_GREATER", "monsters": [ { "monster": "mon_defender_wood", "weight": 50, "cost_multiplier": 0 } ] }, { "type": "monstergroup", - "name": "GROUP_GENIUS_HOMULLUS", + "id": "GROUP_GENIUS_HOMULLUS", "monsters": [ { "monster": "mon_zoomorphic_figure_small", "weight": 40, "cost_multiplier": 0 }, { "monster": "mon_venus_doll", "weight": 400, "cost_multiplier": 0 } @@ -327,22 +327,22 @@ }, { "type": "monstergroup", - "name": "GROUP_MI-GO_CAMP_OM", + "id": "GROUP_MI-GO_CAMP_OM", "monsters": [ { "monster": "mon_mi_go_stalking_warper", "weight": 50, "cost_multiplier": 20, "starts": "210 hours" } ] }, { "type": "monstergroup", - "name": "GROUP_MI-GO_BASE_COMMON", + "id": "GROUP_MI-GO_BASE_COMMON", "monsters": [ { "monster": "mon_mi_go_stalking_warper", "weight": 50, "cost_multiplier": 2, "starts": "210 hours" } ] }, { "type": "monstergroup", - "name": "GROUP_MI-GO_BASE_CAPTORS", + "id": "GROUP_MI-GO_BASE_CAPTORS", "monsters": [ { "monster": "mon_mi_go_stalking_warper", "weight": 300, "cost_multiplier": 2, "starts": "210 hours" } ] }, { "type": "monstergroup", - "name": "GROUP_MI-GO_BASE_BOSS", + "id": "GROUP_MI-GO_BASE_BOSS", "monsters": [ { "monster": "mon_mi_go_stalking_warper", "weight": 200, "cost_multiplier": 2 }, { "monster": "mon_mi_go_stalking_warper", "weight": 50, "cost_multiplier": 5, "pack_size": [ 2, 3 ] } @@ -350,7 +350,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SALAMANDER_ERUPTION_SURFACE", + "id": "GROUP_SALAMANDER_ERUPTION_SURFACE", "monsters": [ { "monster": "mon_smoke_mephit", "weight": 100, "cost_multiplier": 0 }, { "monster": "mon_salamander_tiny", "weight": 300, "cost_multiplier": 0 }, @@ -361,7 +361,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SALAMANDER_ERUPTION", + "id": "GROUP_SALAMANDER_ERUPTION", "monsters": [ { "monster": "mon_smoke_mephit", "weight": 10, "cost_multiplier": 0 }, { "monster": "mon_salamander_tiny", "weight": 30, "cost_multiplier": 0 }, @@ -371,7 +371,7 @@ }, { "type": "monstergroup", - "name": "GROUP_SALAMANDER_FINALE", + "id": "GROUP_SALAMANDER_FINALE", "monsters": [ { "monster": "mon_salamagman_warlord_butterfly", "weight": 100, "cost_multiplier": 0, "pack_size": [ 1, 2 ] }, { "monster": "mon_salamagman_small", "weight": 25, "cost_multiplier": 0, "pack_size": [ 1, 6 ] }, @@ -380,7 +380,7 @@ }, { "type": "monstergroup", - "name": "GROUP_HEDGE_TO_CAUSE_ARMED_MEN", + "id": "GROUP_HEDGE_TO_CAUSE_ARMED_MEN", "monsters": [ { "monster": "mon_hedge_armed_warrior_sword", "weight": 400 }, { "monster": "mon_hedge_armed_warrior_spear", "weight": 400 }, @@ -390,7 +390,7 @@ }, { "type": "monstergroup", - "name": "GROUP_HOSTS_OF_SAMHAIN", + "id": "GROUP_HOSTS_OF_SAMHAIN", "monsters": [ { "monster": "mon_samhain_ghost_mace", "weight": 333 }, { "monster": "mon_samhain_ghost_axe", "weight": 333 }, @@ -399,12 +399,12 @@ }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_UPGRADE", + "id": "GROUP_ZOMBIE_UPGRADE", "monsters": [ { "monster": "mon_zombie_monochrome", "weight": 30 } ] }, { "type": "monstergroup", - "name": "GROUP_ZOMBIE_MONOCHROME_UPGRADE", + "id": "GROUP_ZOMBIE_MONOCHROME_UPGRADE", "default": "mon_zombie_monochrome", "monsters": [ { "monster": "mon_zombie_monochrome", "weight": 450 }, diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutation_spells.json b/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutation_spells.json index 8cb2701accba4..f16b0a32859d6 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutation_spells.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutation_spells.json @@ -282,7 +282,7 @@ "max_level": { "math": [ "per_to_level(1)" ] }, "difficulty": 4, "base_casting_time": 12000, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 500, "final_energy_cost": 250, "energy_increment": -12, @@ -316,7 +316,7 @@ "base_casting_time": 180000, "final_casting_time": 100, "casting_time_increment": -6000, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 450, "final_energy_cost": 350, "energy_increment": -4 @@ -336,7 +336,7 @@ "effect": "effect_on_condition", "effect_str": "EOC_ARVORE_TREE_SINGING", "shape": "blast", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_casting_time": 100, "base_energy_cost": 800, "final_energy_cost": 500, @@ -364,7 +364,7 @@ "max_range": 20, "range_increment": 0.4, "base_casting_time": 6000, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 750, "final_energy_cost": 500, "energy_increment": -10, @@ -395,7 +395,7 @@ "max_aoe": 50, "aoe_increment": 0.7, "range_increment": 0.4, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 450, "final_energy_cost": 250, "energy_increment": -10, @@ -425,7 +425,7 @@ "max_range": 15, "range_increment": 1, "damage_increment": 0.5, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 200, "base_casting_time": 3000, "min_duration": 36000, @@ -446,7 +446,7 @@ "effect": "effect_on_condition", "effect_str": "EOC_ARVORE_SUMMON_PRESERVATION_CONTAINER_CHECK", "shape": "blast", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 800, "final_energy_cost": 300, "energy_increment": -30, @@ -480,7 +480,7 @@ "( 51840000 + (u_spell_level('arvore_summon_preservation_container') * 30240000) ) * scaling_factor(u_val('perception') )" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 350, "base_casting_time": 400 }, @@ -500,7 +500,7 @@ "spell_class": "ARVORE", "teachable": false, "max_level": { "math": [ "per_to_level(1)" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 1000, "energy_increment": -40, "final_energy_cost": 600, @@ -546,7 +546,7 @@ "max_level": { "math": [ "int_to_level(1)" ] }, "shape": "blast", "flags": [ "SOMATIC", "VERBAL" ], - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "spell_class": "ARVORE", "difficulty": 5, "base_casting_time": 150, @@ -627,7 +627,7 @@ "max_range": 70, "min_aoe": { "math": [ "(0 + (u_spell_level('arvore_anti_plant_spell') * 0.25) * (scaling_factor(u_val('perception') ) ) )" ] }, "max_aoe": 8, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 400, "final_energy_cost": 150, "energy_increment": -10, @@ -688,7 +688,7 @@ "effect": "ter_transform", "effect_str": "ter_arvore_plant_growth", "min_range": 1, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "spell_class": "ARVORE", "teachable": false, "base_energy_cost": 1000, @@ -716,7 +716,7 @@ "effect_str": "ter_arvore_plant_growth", "min_aoe": { "math": [ "(1 + (u_spell_level('arvore_nurture_the_green_aoe') * 1) * (scaling_factor(u_val('intelligence') ) ) )" ] }, "max_aoe": { "math": [ "(1 + (u_spell_level('arvore_nurture_the_green_aoe') * 1) * (scaling_factor(u_val('intelligence') ) ) )" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 4000, "final_energy_cost": 2500, "energy_increment": -50, @@ -742,7 +742,7 @@ "base_casting_time": 30000, "final_casting_time": 12000, "casting_time_increment": -900, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 600, "final_energy_cost": 350, "energy_increment": -15, @@ -853,7 +853,7 @@ "shape": "blast", "min_range": 1, "teachable": false, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 350, "final_energy_cost": 200, "energy_increment": -25, @@ -879,7 +879,7 @@ "shape": "blast", "min_range": 1, "max_range": 1, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 500, "final_energy_cost": 250, "energy_increment": -20, @@ -916,7 +916,7 @@ "max_aoe": { "math": [ "( ( (u_spell_level('arvore_summon_grass_field_spell') * 0.5) + 5) * (scaling_factor(u_val('intelligence') ) ) )" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_casting_time": 100, "final_casting_time": 35, "casting_time_increment": -4, @@ -949,7 +949,7 @@ "max_dot": { "math": [ "( ( (u_spell_level('arvore_roots_spell') * 0.1) + 0) * (scaling_factor(u_val('perception') ) ) )" ] }, "min_duration": { "math": [ "( ( (u_spell_level('arvore_roots_spell') * 50) + 300) * (scaling_factor(u_val('perception') ) ) )" ] }, "max_duration": { "math": [ "( ( (u_spell_level('arvore_roots_spell') * 100) + 1000) * (scaling_factor(u_val('perception') ) ) )" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_casting_time": 150, "final_casting_time": 50, "casting_time_increment": -4, @@ -973,7 +973,7 @@ "max_level": 1, "difficulty": 10, "base_casting_time": 2160000, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 2000 }, { @@ -990,7 +990,7 @@ "difficulty": 8, "effect": "effect_on_condition", "effect_str": "EOC_ARVORE_OVERGROWTH", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 1500, "final_energy_cost": 750, "energy_increment": -35, @@ -1021,7 +1021,7 @@ "dot_increment": 0.2, "min_duration": { "math": [ "( ( (u_spell_level('arvore_cause_decay') * 100) + 500) * (scaling_factor(u_val('perception') ) ) )" ] }, "max_duration": { "math": [ "( ( (u_spell_level('arvore_cause_decay') * 300) + 3000) * (scaling_factor(u_val('perception') ) ) )" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 1000, "final_energy_cost": 500, "energy_increment": -20, @@ -1046,7 +1046,7 @@ "spell_class": "ARVORE", "teachable": false, "max_level": { "math": [ "per_to_level(1)" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 250, "energy_increment": -5, "final_energy_cost": 80, @@ -1091,7 +1091,7 @@ "effect": "effect_on_condition", "effect_str": "EOC_ARVORE_ROOT_TO_ROOT_TRANSLOCATE_CHECK", "shape": "blast", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 1500, "base_casting_time": 30000 }, @@ -1110,7 +1110,7 @@ "effect": "effect_on_condition", "effect_str": "EOC_ARVORE_ROOT_TO_ROOT_ATTUNEMENT_CHECK", "shape": "blast", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "min_range": 1, "base_energy_cost": 0, "base_casting_time": { "math": [ "2880000 - max(( u_spell_level('arvore_forest_translocate') * 108000), 180000)" ] } @@ -1149,7 +1149,7 @@ "max_level": { "math": [ "int_to_level(1)" ] }, "min_range": { "math": [ "(3 + (u_spell_level('arvore_turn_into_tree') * 1.2) * (scaling_factor(u_val('perception') ) ) )" ] }, "max_range": 70, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 1750, "energy_increment": -50, "final_energy_cost": 850, @@ -1197,7 +1197,7 @@ "max_aoe": { "math": [ "( (u_spell_level('arvore_damage_zombies_heal_living') * 1.1) + 2.5) * scaling_factor(u_val('intelligence') )" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 2200, "final_energy_cost": 1500, "energy_increment": -55, diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutations.json b/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutations.json index 5bfd4955bc7b6..15b5c116c90fb 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutations.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutations.json @@ -427,7 +427,7 @@ "category": [ "ARVORE" ], "active": true, "activated_is_setup": true, - "time": 120, + "time": 15, "mana": true, "cost": 1, "activation_msg": "Your skin itches.", @@ -445,7 +445,7 @@ "category": [ "ARVORE" ], "active": true, "activated_is_setup": true, - "time": 45, + "time": 5, "mana": true, "cost": 1, "activation_msg": "The air fills with clouds of pollen.", @@ -831,7 +831,7 @@ "category": [ "ARVORE" ], "activated_is_setup": true, "active": true, - "time": 20, + "time": 2, "mana": true, "cost": 1, "activation_msg": "Lashing vines grow from your shoulders.", @@ -942,7 +942,7 @@ "activated_is_setup": true, "mana": true, "cost": 1, - "time": 180, + "time": 10, "activation_msg": "A sweet scent fills the air.", "activated_eocs": [ "EOC_MIND_CONTROL_POLLEN_ON" ], "deactivated_eocs": [ "EOC_MIND_CONTROL_POLLEN_OFF" ] diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/homullus_mutation_spells.json b/data/mods/Xedra_Evolved/mutations/paraclesians/homullus_mutation_spells.json index 6d0e9c55cc85e..589c10c00eda2 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/homullus_mutation_spells.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/homullus_mutation_spells.json @@ -25,7 +25,7 @@ "math": [ "min( (( (u_spell_level('homullus_charm_feral_spell') * 1.2) + 2) * (scaling_factor(u_val('intelligence') ) )), 70)" ] }, "max_range": 70, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 400, "final_energy_cost": 250, "energy_increment": -5, @@ -55,7 +55,7 @@ "max_range": 15, "range_increment": 1, "damage_increment": 0.15, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 200, "base_casting_time": 3000, "min_duration": 36000, @@ -82,7 +82,7 @@ "max_duration": { "math": [ "( 360000 + (u_spell_level('homullus_self_deception_spell') * 90000) ) * scaling_factor(u_val('perception') )" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 300, "final_energy_cost": 150, "energy_increment": -8, @@ -121,7 +121,7 @@ "min( ( ( (u_spell_level('homullus_invisible_to_humans_spell') * 1) + 3) * (scaling_factor(u_val('intelligence') ) ) ), 25)" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 400, "final_energy_cost": 200, "energy_increment": -10, @@ -171,7 +171,7 @@ "max_range": 20, "range_increment": 0.4, "base_casting_time": 450, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 400, "final_energy_cost": 250, "energy_increment": -8, @@ -200,7 +200,7 @@ "math": [ "( (u_spell_level('homullus_restore_power_spell') * 850) + 1500) * scaling_factor(u_val('intelligence') )" ] }, "min_range": 1, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 750, "final_energy_cost": 450, "energy_increment": -10, @@ -230,7 +230,7 @@ "( 180000 + (u_spell_level('homullus_invisible_to_humans_spell') * 25000) ) * scaling_factor(u_val('intelligence') )" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 850, "final_energy_cost": 600, "energy_increment": -8, @@ -254,7 +254,7 @@ "base_casting_time": 180000, "final_casting_time": 100, "casting_time_increment": -6000, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 450, "final_energy_cost": 350, "energy_increment": -4 @@ -274,7 +274,7 @@ "effect": "effect_on_condition", "effect_str": "EOC_HOMULLUS_ALL_ROADS_TRANSLOCATE_CHECK", "shape": "blast", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 1500, "base_casting_time": 6000 }, @@ -293,7 +293,7 @@ "effect": "effect_on_condition", "effect_str": "EOC_HOMULLUS_ALL_ROADS_ATTUNEMENT_CHECK", "shape": "blast", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 0, "base_casting_time": { "math": [ "1440000 - max(( u_spell_level('homullus_road_translocate') * 108000), 90000)" ] } }, diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/ierde_mutation_spells.json b/data/mods/Xedra_Evolved/mutations/paraclesians/ierde_mutation_spells.json index 95cb3b42def1e..1aea35f79356f 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/ierde_mutation_spells.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/ierde_mutation_spells.json @@ -46,7 +46,7 @@ "math": [ "min( ( ( (u_spell_level('ierde_stomp_ground_smash') * 0.8) + 3) * (scaling_factor(u_val('strength') ) ) ), 15)" ] }, "max_aoe": 15, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 500, "final_energy_cost": 350, "energy_increment": -10, @@ -73,7 +73,7 @@ "effect": "effect_on_condition", "effect_str": "EOC_IERDE_IRON_ARMOR_SPELL", "shape": "blast", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 600, "final_energy_cost": 300, "energy_increment": -25, @@ -122,7 +122,7 @@ "max_damage": { "math": [ "(15 + (u_spell_level('ierde_knockback_punch_spell') * 3) * (scaling_factor(u_val('strength') ) ) )" ] }, "min_range": 1, "max_range": 1, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 150, "final_energy_cost": 50, "energy_increment": -6, @@ -161,7 +161,7 @@ "effect": "effect_on_condition", "effect_str": "EOC_IERDE_REVEAL_MAP", "shape": "blast", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 700, "final_energy_cost": 450, "energy_increment": -12, @@ -186,7 +186,7 @@ "base_casting_time": 25000, "final_casting_time": 6000, "casting_time_increment": -1200, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 500, "final_energy_cost": 250, "energy_increment": -15, @@ -380,7 +380,7 @@ "max_range": { "math": [ "( (u_spell_level('ierde_slow_enemies_spell') * 0.9) + 2) * (scaling_factor(u_val('strength') ) )" ] }, "min_duration": { "math": [ "( (u_spell_level('ierde_slow_enemies_spell') * 150) + 300) * (scaling_factor(u_val('strength') ) )" ] }, "max_duration": { "math": [ "( (u_spell_level('ierde_slow_enemies_spell') * 350) + 1000) * (scaling_factor(u_val('strength') ) )" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 350, "final_energy_cost": 250, "energy_increment": -4, @@ -407,7 +407,7 @@ "max_range": 20, "range_increment": 0.4, "base_casting_time": 450, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 650, "final_energy_cost": 400, "energy_increment": -12, @@ -436,7 +436,7 @@ "max_duration": { "math": [ "( ( (u_spell_level('ierde_earthen_shield_spell') * 1500) + 30000) * (scaling_factor(u_val('strength') ) ) )" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 850, "final_energy_cost": 650, "energy_increment": -10, @@ -463,7 +463,7 @@ "max_range": { "math": [ "( ( (u_spell_level('ierde_entrap_target_in_stone') * 1.1) + 2) * (scaling_factor(u_val('perception') ) ) )" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 300, "final_energy_cost": 150, "energy_increment": -8, @@ -510,7 +510,7 @@ "effect": "summon", "effect_str": "GROUP_GENIUS_IERDE_LESSER", "shape": "blast", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 200, "base_casting_time": 3000, "flags": [ "SOMATIC", "VERBAL", "SPAWN_GROUP", "SPAWN_GROUP" ], @@ -573,7 +573,7 @@ "math": [ "min( ( ( (u_spell_level('ierde_create_pits_spell') * 0.4) + 0) * (scaling_factor(u_val('strength') ) ) ), 10)" ] }, "max_aoe": 10, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 450, "base_casting_time": 150, "sound_description": "the ground shakes!", @@ -596,7 +596,7 @@ "effect": "effect_on_condition", "effect_str": "EOC_IERDE_TUNNEL_TRANSLOCATE_CHECK", "shape": "blast", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 1500, "base_casting_time": 30000 }, @@ -618,7 +618,7 @@ "effect": "effect_on_condition", "effect_str": "EOC_IERDE_TUNNEL_ATTUNEMENT_CHECK", "shape": "blast", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 0, "base_casting_time": { "math": [ "2880000 - max(( u_spell_level('ierde_tunnel_translocation_spell') * 108000), 180000)" ] } }, @@ -657,7 +657,7 @@ "base_casting_time": 180000, "final_casting_time": 100, "casting_time_increment": -6000, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 450 } ] diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/paraclesian_fae_bans.json b/data/mods/Xedra_Evolved/mutations/paraclesians/paraclesian_fae_bans.json index 934d0d68c2d76..515b5074fd530 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/paraclesian_fae_bans.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/paraclesian_fae_bans.json @@ -220,7 +220,13 @@ "id": "EOC_HOMULLUS_FAE_BAN_KILL_HUMAN", "eoc_type": "EVENT", "required_event": "character_kills_character", - "condition": { "u_has_trait": "THRESH_HOMULLUS" }, + "condition": { + "or": [ + { "u_has_trait": "THRESH_HOMULLUS" }, + { "u_has_trait": "HOMULLUS_BACKSTAGE" }, + { "math": [ "u_sum_traits_of_category_char_has('HOMULLUS') >= 15" ] } + ] + }, "effect": [ { "run_eocs": "EOC_PARACLESIAN_BROKE_FAE_BAN" }, { "run_eocs": "EOC_PARACLESIAN_BROKE_FAE_BAN_PAIN", "time_in_future": 1 }, @@ -237,10 +243,17 @@ "required_event": "character_kills_monster", "condition": { "and": [ - { "u_has_trait": "THRESH_HOMULLUS" }, + { + "or": [ + { "u_has_trait": "THRESH_HOMULLUS" }, + { "u_has_trait": "HOMULLUS_BACKSTAGE" }, + { "math": [ "u_sum_traits_of_category_char_has('HOMULLUS') >= 15" ] } + ] + }, { "or": [ { "and": [ { "npc_has_species": "HUMAN" }, { "not": { "npc_has_species": "ZOMBIE" } } ] }, + { "and": [ { "npc_has_flag": "HUMAN" }, { "not": { "npc_has_species": "ZOMBIE" } } ] }, { "npc_has_species": "FERAL" } ] } diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/paraclesian_mutation_spells.json b/data/mods/Xedra_Evolved/mutations/paraclesians/paraclesian_mutation_spells.json index 55289402515e0..c350da5809f1c 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/paraclesian_mutation_spells.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/paraclesian_mutation_spells.json @@ -1,4 +1,11 @@ [ + { + "id": "xe_fey_magick", + "type": "magic_type", + "energy_source": "MANA", + "cannot_cast_flags": [ "NO_FEY_MAGIC", "NO_SPELLCASTING" ], + "cannot_cast_message": "You can't use your glamours now!" + }, { "id": "cloud_of_steam_sylph", "type": "SPELL", @@ -25,7 +32,7 @@ "base_energy_cost": 350, "final_energy_cost": 100, "energy_increment": -8, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "teachable": false, "spell_class": "SYLPH", "difficulty": 4, @@ -56,7 +63,7 @@ "base_energy_cost": 350, "final_energy_cost": 100, "energy_increment": -8, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "teachable": false, "spell_class": "UNDINE", "difficulty": 4, @@ -79,7 +86,7 @@ "shape": "blast", "teachable": false, "spell_class": "SYLPH", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "difficulty": 2, "max_level": 20, "base_casting_time": 200, @@ -104,7 +111,7 @@ "shape": "blast", "teachable": false, "spell_class": "SALAMANDER", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "difficulty": 2, "max_level": 20, "base_casting_time": 200, @@ -146,7 +153,7 @@ "max_duration": { "math": [ "( ( (u_spell_level('paraclesian_spell_dodge_bonus') * 4200) + 39000) * (scaling_factor(u_val('perception') ) ) )" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 600, "final_energy_cost": 400, "energy_increment": -12, @@ -166,7 +173,7 @@ "effect_str": "EOC_PARACLESIAN_TURN_COTTON_TO_GOSSAMER", "shape": "blast", "difficulty": 7, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 800, "base_casting_time": 360000 }, diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/salamander_mutation_spells.json b/data/mods/Xedra_Evolved/mutations/paraclesians/salamander_mutation_spells.json index 9169398a0929d..50331cb3f1805 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/salamander_mutation_spells.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/salamander_mutation_spells.json @@ -80,7 +80,7 @@ "difficulty": 1, "min_range": { "math": [ "(1 + (u_spell_level('salamander_make_fire') * 0.15) * (scaling_factor(u_val('strength') ) ) )" ] }, "max_range": 5, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 200, "final_energy_cost": 75, "energy_increment": -8, @@ -115,7 +115,7 @@ "max_damage": { "math": [ "(15 + (u_spell_level('salamander_flame_punch_spell') * 4.5) * (scaling_factor(u_val('strength') ) ) )" ] }, "min_range": 1, "max_range": 1, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 150, "final_energy_cost": 50, "energy_increment": -6, @@ -164,7 +164,7 @@ "max_duration": { "math": [ "(48000 + (u_spell_level('salamander_flaming_whip_spell') * 35000) * (scaling_factor(u_val('dexterity') ) ) )" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 250, "final_energy_cost": 100, "energy_increment": -6, @@ -193,7 +193,7 @@ "max_aoe": 5, "min_range": 10, "max_range": 10, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 250, "final_energy_cost": 150, "energy_increment": -5, @@ -245,7 +245,7 @@ "min_range": 1, "min_duration": 1000, "max_duration": 3000, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 800, "final_energy_cost": 550, "energy_increment": -6, @@ -274,7 +274,7 @@ "max_duration": { "math": [ "(3500 + (u_spell_level('salamander_fire_dot_spell') * 350) * (scaling_factor(u_val('dexterity') ) ) )" ] }, "min_range": { "math": [ "(3 + (u_spell_level('salamander_fire_dot_spell') * 1.1) * (scaling_factor(u_val('dexterity') ) ) )" ] }, "max_range": { "math": [ "(3 + (u_spell_level('salamander_fire_dot_spell') * 1.1) * (scaling_factor(u_val('dexterity') ) ) )" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 250, "final_energy_cost": 100, "energy_increment": -10, @@ -304,7 +304,7 @@ "max_duration": { "math": [ "(30000 + (u_spell_level('salamander_increase_speed_spell') * 8000) * (scaling_factor(u_val('strength') ) ) )" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 550, "final_energy_cost": 250, "energy_increment": -20, @@ -329,7 +329,7 @@ "difficulty": 6, "min_duration": { "math": [ "(15000 + (u_spell_level('salamander_emit_heat') * 3000) * (scaling_factor(u_val('strength') ) ) )" ] }, "max_duration": { "math": [ "(45000 + (u_spell_level('salamander_emit_heat') * 9000) * (scaling_factor(u_val('strength') ) ) )" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 700, "final_energy_cost": 450, "energy_increment": -25, @@ -358,7 +358,7 @@ "min_range": 1, "max_range": 15, "range_increment": 1, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 200, "base_casting_time": 3000, "min_duration": 36000, @@ -386,7 +386,7 @@ "max_range": { "math": [ "( (u_spell_level('salamander_summon_firebird_spell') * 1) + 2) * scaling_factor(u_val('perception') )" ] }, "min_duration": 3000, "max_duration": 3000, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 400, "final_energy_cost": 250, "energy_increment": -5, @@ -422,7 +422,7 @@ "min_field_intensity": 3, "max_field_intensity": 3, "field_chance": 1, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 150, "final_energy_cost": 75, "energy_increment": -5, @@ -459,7 +459,7 @@ "min_field_intensity": 1, "max_field_intensity": 2, "field_chance": 3, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 350, "final_energy_cost": 250, "energy_increment": -5, @@ -488,7 +488,7 @@ "max_damage": 0, "min_range": { "math": [ "(3 + (u_spell_level('salamander_dash_boom_spell') * 0.75) * (scaling_factor(u_val('strength') ) ) )" ] }, "max_range": { "math": [ "(3 + (u_spell_level('salamander_dash_boom_spell') * 0.75) * (scaling_factor(u_val('strength') ) ) )" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 350, "final_energy_cost": 200, "energy_increment": -6, @@ -517,7 +517,7 @@ "max_range": { "math": [ "(3 + (u_spell_level('salamander_explosion_trap_spell') * 1) * (scaling_factor(u_val('perception') ) ) )" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 200, "final_energy_cost": 75, "energy_increment": -6, @@ -564,7 +564,7 @@ "shape": "blast", "max_level": { "math": [ "str_to_level(1)" ] }, "difficulty": 8, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 450, "base_casting_time": 180000, "final_casting_time": 100, @@ -585,7 +585,7 @@ "shape": "blast", "max_level": { "math": [ "str_to_level(1)" ] }, "difficulty": 6, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 250, "base_casting_time": 150, "final_casting_time": 50, @@ -625,7 +625,7 @@ "max_range": 5, "range_increment": 0.4, "base_casting_time": 6000, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 750, "final_energy_cost": 500, "energy_increment": -10, @@ -667,7 +667,7 @@ "field_intensity_increment": 1, "field_intensity_variance": 1, "field_chance": 2, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 2250, "final_energy_cost": 1750, "energy_increment": -15, diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/sylph_mutation_spells.json b/data/mods/Xedra_Evolved/mutations/paraclesians/sylph_mutation_spells.json index a4b62309f0eff..739b72a17d190 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/sylph_mutation_spells.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/sylph_mutation_spells.json @@ -81,7 +81,7 @@ "base_energy_cost": 150, "final_energy_cost": 50, "energy_increment": -5, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "difficulty": 1, "sound_description": "a crackle", "damage_type": "electric", @@ -219,7 +219,7 @@ "max_level": { "math": [ "dex_to_level(1)" ] }, "min_range": { "math": [ "( (u_spell_level('electrical_field') * 1.5) + 2) * (scaling_factor(u_val('dexterity') ) )" ] }, "max_range": 70, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 500, "final_energy_cost": 250, "energy_increment": -25, @@ -255,7 +255,7 @@ "max_level": { "math": [ "dex_to_level(1)" ] }, "min_range": { "math": [ "( (u_spell_level('lightning_field') * 1.5) + 2) * (scaling_factor(u_val('dexterity') ) )" ] }, "max_range": 70, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 800, "final_energy_cost": 450, "energy_increment": -25, @@ -299,7 +299,7 @@ "effect": "effect_on_condition", "effect_str": "EOC_SYLPH_REVEAL_OVERMAP", "shape": "blast", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 350, "final_energy_cost": 150, "energy_increment": -10, @@ -341,7 +341,7 @@ "max_damage": 0, "min_range": { "math": [ "(4 + (u_spell_level('sylph_charge_dash_spell') * 1) * (scaling_factor(u_val('dexterity') ) ) )" ] }, "max_range": { "math": [ "(4 + (u_spell_level('sylph_charge_dash_spell') * 1) * (scaling_factor(u_val('dexterity') ) ) )" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 250, "final_energy_cost": 150, "energy_increment": -5, @@ -368,7 +368,7 @@ "max_range": 20, "range_increment": 0.4, "base_casting_time": 450, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 500, "final_energy_cost": 300, "energy_increment": -10, @@ -394,7 +394,7 @@ "base_casting_time": 180000, "final_casting_time": 100, "casting_time_increment": -6000, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 450 }, { @@ -417,7 +417,7 @@ "effect": "summon", "effect_str": "GROUP_GENIUS_SYLPH_LESSER", "shape": "blast", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 200, "base_casting_time": 3000, "flags": [ "SOMATIC", "VERBAL", "SPAWN_GROUP", "SPAWN_GROUP" ], @@ -452,7 +452,7 @@ "duration_increment": 1000, "base_casting_time": 200, "base_energy_cost": 200, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "difficulty": 0, "flags": [ "LOUD", "NO_HANDS", "NO_LEGS" ] }, @@ -476,7 +476,7 @@ "max_damage": { "math": [ "( (u_spell_level('pushing_wind') * 0.25) + 6) * (scaling_factor(u_val('intelligence') ) )" ] }, "min_range": { "math": [ "( (u_spell_level('pushing_wind') * 1.2) + 1) * (scaling_factor(u_val('intelligence') ) )" ] }, "max_range": 40, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 100, "final_energy_cost": 25, "energy_increment": -5, @@ -502,7 +502,7 @@ "shape": "blast", "min_aoe": { "math": [ "( (u_spell_level('sylph_clear_the_air') * 0.9) + 3) * (scaling_factor(u_val('perception') ) )" ] }, "max_aoe": { "math": [ "( (u_spell_level('sylph_clear_the_air') * 0.9) + 3) * (scaling_factor(u_val('perception') ) )" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 250, "final_energy_cost": 125, "energy_increment": -5, @@ -527,7 +527,7 @@ "shape": "blast", "min_range": { "math": [ "( (u_spell_level('sylph_hindering_wind_spell') * 1.2) + 1) * (scaling_factor(u_val('intelligence') ) )" ] }, "max_range": 40, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 250, "final_energy_cost": 100, "energy_increment": -5, @@ -551,7 +551,7 @@ "effect": "effect_on_condition", "effect_str": "EOC_SYLPH_MASSIVE_LIGHTNING_BOLT", "shape": "blast", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 1000, "final_energy_cost": 750, "energy_increment": -15, @@ -705,7 +705,7 @@ "effect": "effect_on_condition", "effect_str": "EOC_SYLPH_WIND_TRANSLOCATE_CHECK", "shape": "blast", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 1500, "base_casting_time": 30000 }, @@ -724,7 +724,7 @@ "effect": "effect_on_condition", "effect_str": "EOC_SYLPH_WIND_ATTUNEMENT_CHECK", "shape": "blast", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 0, "base_casting_time": { "math": [ "1440000 - max(( u_spell_level('sylph_wind_translocation_spell') * 108000), 90000)" ] } }, diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/undine_mutation_spells.json b/data/mods/Xedra_Evolved/mutations/paraclesians/undine_mutation_spells.json index eb51ad776b824..b6990bcde4b4b 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/undine_mutation_spells.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/undine_mutation_spells.json @@ -74,7 +74,7 @@ "max_level": { "math": [ "dex_to_level(1)" ] }, "min_range": { "math": [ "( (u_spell_level('create_fog') * 1.5) + 2) * (scaling_factor(u_val('dexterity') ) )" ] }, "max_range": 70, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 100, "final_energy_cost": 40, "energy_increment": -6, @@ -110,7 +110,7 @@ "max_level": { "math": [ "dex_to_level(1)" ] }, "min_range": { "math": [ "( (u_spell_level('fog_bank') * 1.5) + 2) * (scaling_factor(u_val('dexterity') ) )" ] }, "max_range": 70, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 300, "final_energy_cost": 125, "energy_increment": -25, @@ -133,7 +133,7 @@ "max_duration": 360000, "duration_increment": 17700, "max_level": 20, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 400, "energy_increment": -5.0, "final_energy_cost": 300, @@ -169,7 +169,7 @@ "max_level": { "math": [ "dex_to_level(1)" ] }, "min_range": { "math": [ "( (u_spell_level('acidic_mist') * 1.5) + 2) * (scaling_factor(u_val('dexterity') ) )" ] }, "max_range": 70, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 140, "final_energy_cost": 80, "energy_increment": -6, @@ -205,7 +205,7 @@ "max_level": { "math": [ "dex_to_level(1)" ] }, "min_range": { "math": [ "( (u_spell_level('deadly_mist') * 1.5) + 2) * (scaling_factor(u_val('dexterity') ) )" ] }, "max_range": 70, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 500, "final_energy_cost": 300, "energy_increment": -25, @@ -258,7 +258,7 @@ "max_range": 20, "range_increment": 0.4, "base_casting_time": 450, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 650, "final_energy_cost": 400, "energy_increment": -12, @@ -299,7 +299,7 @@ "base_casting_time": 180000, "final_casting_time": 100, "casting_time_increment": -6000, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 450 }, { @@ -324,7 +324,7 @@ "max_duration": { "math": [ "( (u_spell_level('undine_bash_and_slow_spell') * 150) + 800) * (scaling_factor(u_val('strength') ) )" ] }, "min_range": { "math": [ "( (u_spell_level('undine_bash_and_slow_spell') * 1.1) + 3) * (scaling_factor(u_val('strength') ) )" ] }, "max_range": { "math": [ "( (u_spell_level('undine_bash_and_slow_spell') * 1.1) + 3) * (scaling_factor(u_val('strength') ) )" ] }, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 250, "final_energy_cost": 100, "energy_increment": -10, @@ -347,7 +347,7 @@ "effect": "effect_on_condition", "effect_str": "EOC_UNDINE_DRAG_INWARD_SELECTOR", "shape": "blast", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 600, "final_energy_cost": 450, "energy_increment": -3, @@ -638,7 +638,7 @@ "spell_class": "UNDINE", "teachable": false, "effect": "summon_vehicle", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "effect_str": "wave_rider_kayak", "shape": "blast", "difficulty": 5, @@ -673,7 +673,7 @@ "effect": "summon", "effect_str": "GROUP_FISH", "shape": "blast", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 50, "base_casting_time": 3000, "flags": [ "SOMATIC", "VERBAL", "SPAWN_GROUP", "HOSTILE_50", "NO_CORPSE_QUIET" ], @@ -702,7 +702,7 @@ "effect": "summon", "effect_str": "GROUP_FISH", "shape": "blast", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 80, "base_casting_time": 3000, "flags": [ "SOMATIC", "VERBAL", "SPAWN_GROUP", "NO_CORPSE_QUIET" ], @@ -731,7 +731,7 @@ "effect": "summon", "effect_str": "GROUP_KRAKEN_SURFACE", "shape": "blast", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 400, "base_casting_time": 3000, "flags": [ "SOMATIC", "VERBAL", "SPAWN_GROUP", "NO_CORPSE_QUIET" ], @@ -759,7 +759,7 @@ "effect": "summon", "effect_str": "GROUP_GENIUS_UNDINE_LESSER", "shape": "blast", - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 200, "base_casting_time": 3000, "flags": [ "SOMATIC", "VERBAL", "SPAWN_GROUP", "SPAWN_GROUP" ], @@ -832,7 +832,7 @@ "math": [ "min( (( (u_spell_level('undine_tidal_wave_spell') * 0.3) + 2) * (scaling_factor(u_val('strength') ) )), 6)" ] }, "max_aoe": 6, - "energy_source": "MANA", + "magic_type": "xe_fey_magick", "base_energy_cost": 1000, "final_energy_cost": 650, "energy_increment": -25, diff --git a/data/mods/Xedra_Evolved/mutations/xe_playable_gracken.json b/data/mods/Xedra_Evolved/mutations/xe_playable_gracken.json index 5a4da2b2a4ace..3d909216a6825 100644 --- a/data/mods/Xedra_Evolved/mutations/xe_playable_gracken.json +++ b/data/mods/Xedra_Evolved/mutations/xe_playable_gracken.json @@ -110,6 +110,40 @@ "category": [ "GRACKEN" ], "threshreq": [ "THRESH_SPECIES_GRACKEN" ] }, + { + "type": "mutation", + "id": "SHADE_SHORT_LEGS", + "name": { "str": "Short Legs" }, + "description": "Your legs have decreased in length providing you with a lower center of gravity and a slight improvement to agility.", + "//": "This is the first stage short legs mutation.", + "types": [ "LEGS" ], + "prereqs": [ "SHADE_LEGS" ], + "enchantments": [ { "values": [ { "value": "DEXTERITY", "add": 1 } ] } ], + "purifiable": false, + "mixed_effect": true, + "points": 1, + "visibility": 1, + "ugliness": 1, + "category": [ "GRACKEN" ], + "threshreq": [ "THRESH_SPECIES_GRACKEN" ] + }, + { + "type": "mutation", + "id": "SHADE_LONG_LEGS", + "name": { "str": "Long Legs" }, + "description": "Your legs have lengthened. You can cross flat terrain more easily.", + "//": "This is the first stage long legs mutation.", + "types": [ "LEGS" ], + "purifiable": false, + "mixed_effect": true, + "points": 1, + "visibility": 4, + "ugliness": 1, + "category": [ "GRACKEN" ], + "threshreq": [ "THRESH_SPECIES_GRACKEN" ], + "prereqs": [ "SHADE_LEGS" ], + "enchantments": [ { "values": [ { "value": "MOVECOST_FLATGROUND_MOD", "multiply": -0.12 } ] } ] + }, { "type": "mutation", "id": "SHADE_FEET", diff --git a/data/mods/Xedra_Evolved/recipes/gracken_improvements.json b/data/mods/Xedra_Evolved/recipes/gracken_improvements.json index 367fc64fc3a65..a1c68e008a088 100644 --- a/data/mods/Xedra_Evolved/recipes/gracken_improvements.json +++ b/data/mods/Xedra_Evolved/recipes/gracken_improvements.json @@ -131,5 +131,54 @@ [ [ "scrap_shadowstuff", 1 ] ], [ [ "omnivore_stomach", 2 ], [ "small_omnivore_stomach", 4 ] ] ] + }, + { + "type": "recipe", + "activity_level": "LIGHT_EXERCISE", + "result": "gracken_shade_legs", + "category": "CC_XEDRA", + "subcategory": "CSC_XEDRA_GRACKEN", + "skill_used": "deduction", + "difficulty": 1, + "time": "30 m", + "flags": [ "SECRET" ], + "qualities": [ { "id": "SEW", "level": 1 }, { "id": "COOK", "level": 1 } ], + "components": [ [ [ "scrap_dreamdross", 1 ] ], [ [ "scrap_shadowstuff", 1 ] ], [ [ "bone_any", 2, "LIST" ] ], [ [ "sinew", 4 ] ] ] + }, + { + "type": "recipe", + "activity_level": "LIGHT_EXERCISE", + "result": "gracken_short_legs", + "category": "CC_XEDRA", + "subcategory": "CSC_XEDRA_GRACKEN", + "skill_used": "deduction", + "difficulty": 1, + "time": "30 m", + "flags": [ "SECRET" ], + "qualities": [ { "id": "SEW", "level": 1 }, { "id": "COOK", "level": 1 } ], + "components": [ + [ [ "scrap_dreamdross", 1 ] ], + [ [ "scrap_shadowstuff", 1 ] ], + [ [ "bone_any", 2, "LIST" ] ], + [ [ "underdeveloped_sinew", 4 ] ] + ] + }, + { + "type": "recipe", + "activity_level": "LIGHT_EXERCISE", + "result": "gracken_long_legs", + "category": "CC_XEDRA", + "subcategory": "CSC_XEDRA_GRACKEN", + "skill_used": "deduction", + "difficulty": 1, + "time": "30 m", + "flags": [ "SECRET" ], + "qualities": [ { "id": "SEW", "level": 1 }, { "id": "COOK", "level": 1 } ], + "components": [ + [ [ "scrap_dreamdross", 1 ] ], + [ [ "scrap_shadowstuff", 1 ] ], + [ [ "bone_any", 2, "LIST" ] ], + [ [ "runner_sinew", 4 ] ] + ] } ] diff --git a/data/mods/Xedra_Evolved/recipes/paraclesians/arvore_recipes.json b/data/mods/Xedra_Evolved/recipes/paraclesians/arvore_recipes.json index a84cf09ac9851..7e9f9e8a0dace 100644 --- a/data/mods/Xedra_Evolved/recipes/paraclesians/arvore_recipes.json +++ b/data/mods/Xedra_Evolved/recipes/paraclesians/arvore_recipes.json @@ -1043,7 +1043,7 @@ "u_message": "As your song fades, you behold a large knife all made of a single piece of wood, as though it had grown that way in the depths of the forest.", "type": "good" }, - { "u_spawn_item": "treesung_q_staff", "count": 1, "suppress_message": true }, + { "u_spawn_item": "treesung_baselard", "count": 1, "suppress_message": true }, { "math": [ "u_val('mana')", "-=", "200" ] }, { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } ], diff --git a/data/mods/Xedra_Evolved/spells/changeling_spells.json b/data/mods/Xedra_Evolved/spells/changeling_spells.json index f930a6375b504..0ee0e9a8fc0ba 100644 --- a/data/mods/Xedra_Evolved/spells/changeling_spells.json +++ b/data/mods/Xedra_Evolved/spells/changeling_spells.json @@ -16,7 +16,7 @@ "shape": "blast", "min_duration": { "math": [ "(changeling_common_traits() * 2250) + (u_skill('deduction') * 23400) + 35100" ] }, "max_duration": { "math": [ "(changeling_common_traits() * 5750) + (u_skill('deduction') * 56300) + 78900" ] }, - "magic_type": "xedra_magic_generic", + "magic_type": "xe_fey_magick", "base_energy_cost": { "math": [ "max(( 150 - (changeling_common_traits() * 2) - (u_skill('deduction') * 3)), 50)" ] }, "base_casting_time": { "math": [ "max(( 100 - changeling_common_traits() - (u_skill('deduction') * 3)), 30)" ] } }, @@ -37,7 +37,7 @@ "shape": "blast", "min_duration": { "math": [ "(changeling_common_traits() * 50) + (u_skill('deduction') * 500) + 2600" ] }, "max_duration": { "math": [ "(changeling_common_traits() * 163) + (u_skill('deduction') * 1200) + 13900" ] }, - "magic_type": "xedra_magic_generic", + "magic_type": "xe_fey_magick", "base_energy_cost": { "math": [ "max(( 750 - (changeling_common_traits() * 5) - (u_skill('deduction') * 20)), 350)" ] }, "base_casting_time": { "math": [ "max(( 250 - (changeling_common_traits() * 3) - (u_skill('deduction') * 8)), 50)" ] } }, @@ -64,7 +64,7 @@ "max_range": 25, "min_aoe": 3, "max_aoe": 3, - "magic_type": "xedra_magic_generic", + "magic_type": "xe_fey_magick", "base_energy_cost": { "math": [ "max(( 300 - (changeling_common_traits() * 3) - (u_skill('deduction') * 10)), 100)" ] }, "base_casting_time": { "math": [ "max(( 100 - changeling_common_traits() - (u_skill('deduction') * 3)), 50)" ] } }, @@ -85,7 +85,7 @@ "shape": "blast", "min_range": 1, "max_range": 1, - "magic_type": "xedra_magic_generic", + "magic_type": "xe_fey_magick", "base_energy_cost": { "math": [ "max(( 600 - (u_sum_traits_of_category_char_has('FAIR_FOLK_NOBLE') * 5) - (u_skill('deduction') * 35)), 200)" ] }, @@ -110,7 +110,7 @@ "shape": "blast", "min_duration": { "math": [ "(u_sum_traits_of_category_char_has('FAIR_FOLK_NOBLE') * 240) + (u_skill('deduction') * 2600) + 27800" ] }, "max_duration": { "math": [ "(u_sum_traits_of_category_char_has('FAIR_FOLK_NOBLE') * 880) + (u_skill('deduction') * 17500) + 91500" ] }, - "magic_type": "xedra_magic_generic", + "magic_type": "xe_fey_magick", "base_energy_cost": { "math": [ "max(( 400 - (u_sum_traits_of_category_char_has('FAIR_FOLK_NOBLE') * 3) - (u_skill('deduction') * 20)), 200)" ] }, @@ -165,7 +165,7 @@ "max_range": 1, "min_duration": { "math": [ "(u_sum_traits_of_category_char_has('FAIR_FOLK_NOBLE') * 550) + (u_skill('deduction') * 3900) + 22500" ] }, "max_duration": { "math": [ "(u_sum_traits_of_category_char_has('FAIR_FOLK_NOBLE') * 1230) + (u_skill('deduction') * 8900) + 69100" ] }, - "magic_type": "xedra_magic_generic", + "magic_type": "xe_fey_magick", "base_energy_cost": { "math": [ "max(( 300 - (u_sum_traits_of_category_char_has('FAIR_FOLK_NOBLE') * 2) - (u_skill('deduction') * 25)), 100)" ] }, @@ -196,7 +196,7 @@ "max_aoe": 3, "min_duration": { "math": [ "(u_sum_traits_of_category_char_has('FAIR_FOLK_NOBLE') * 340) + (u_skill('deduction') * 2700) + 14200" ] }, "max_duration": { "math": [ "(u_sum_traits_of_category_char_has('FAIR_FOLK_NOBLE') * 620) + (u_skill('deduction') * 11300) + 52300" ] }, - "magic_type": "xedra_magic_generic", + "magic_type": "xe_fey_magick", "base_energy_cost": { "math": [ "max(( 1200 - (u_sum_traits_of_category_char_has('FAIR_FOLK_NOBLE') * 15) - (u_skill('deduction') * 40)), 550)" ] }, @@ -219,7 +219,7 @@ "effect": "effect_on_condition", "effect_str": "EOC_BROWNIE_INDOOR_BLINK", "shape": "blast", - "magic_type": "xedra_magic_generic", + "magic_type": "xe_fey_magick", "base_energy_cost": { "math": [ "max(( 500 - (u_sum_traits_of_category_char_has('FAIR_FOLK_COMMONER_BROWNIE') * 3) - (u_skill('deduction') * 15)), 250)" @@ -245,7 +245,7 @@ "effect": "effect_on_condition", "effect_str": "EOC_BROWNIE_HOME_TELEPORT_ACTUAL_TELEPORT", "shape": "blast", - "magic_type": "xedra_magic_generic", + "magic_type": "xe_fey_magick", "base_energy_cost": { "math": [ "max(( 800 - (u_sum_traits_of_category_char_has('FAIR_FOLK_COMMONER_BROWNIE') * 10) - (u_skill('deduction') * 25)), 400)" @@ -280,7 +280,7 @@ }, "min_range": 10, "max_range": 10, - "magic_type": "xedra_magic_generic", + "magic_type": "xe_fey_magick", "base_energy_cost": { "math": [ "max(( 600 - (u_sum_traits_of_category_char_has('FAIR_FOLK_COMMONER_POOKA') * 8) - (u_skill('deduction') * 25)), 250)" @@ -315,7 +315,7 @@ "((u_sum_traits_of_category_char_has('FAIR_FOLK_COMMONER_SELKIE') * 1380) + (u_skill('deduction') * 12305) + 49850) * selkie_has_weather_mastery()" ] }, - "magic_type": "xedra_magic_generic", + "magic_type": "xe_fey_magick", "base_energy_cost": { "math": [ "u_effect_intensity('effect_selkie_fog_cloak') > -1 ? 0 : max(( 450 - (u_sum_traits_of_category_char_has('FAIR_FOLK_COMMONER_SELKIE') * 5) - (u_skill('deduction') * 15)), 100)" @@ -349,7 +349,7 @@ "((u_sum_traits_of_category_char_has('FAIR_FOLK_COMMONER_SELKIE') * 2415) + (u_skill('deduction') * 10275) + 74775) * selkie_has_weather_mastery()" ] }, - "magic_type": "xedra_magic_generic", + "magic_type": "xe_fey_magick", "base_energy_cost": { "math": [ "u_effect_intensity('effect_controlling_weather_fog') > -1 ? 50 : max(( 750 - (u_sum_traits_of_category_char_has('FAIR_FOLK_COMMONER_SELKIE') * 3) - (u_skill('deduction') * 25)), 400)" @@ -385,7 +385,7 @@ "((u_sum_traits_of_category_char_has('FAIR_FOLK_COMMONER_SELKIE') * 4226) + (u_skill('deduction') * 17981) + 123379) * selkie_has_weather_mastery()" ] }, - "magic_type": "xedra_magic_generic", + "magic_type": "xe_fey_magick", "base_energy_cost": { "math": [ "u_effect_intensity('effect_controlling_weather_rains') > -1 ? 0 : max(( 950 - (u_sum_traits_of_category_char_has('FAIR_FOLK_COMMONER_SELKIE') * 3) - (u_skill('deduction') * 25)), 450)" @@ -421,7 +421,7 @@ "((u_sum_traits_of_category_char_has('FAIR_FOLK_COMMONER_SELKIE') * 4226) + (u_skill('deduction') * 17981) + 123379) * selkie_has_weather_mastery()" ] }, - "magic_type": "xedra_magic_generic", + "magic_type": "xe_fey_magick", "base_energy_cost": { "math": [ "u_effect_intensity('effect_controlling_weather_rainstorm') > -1 ? 0 : max(( 1200 - (u_sum_traits_of_category_char_has('FAIR_FOLK_COMMONER_SELKIE') * 4) - (u_skill('deduction') * 25)), 600)" @@ -447,7 +447,7 @@ "spell_class": "CHANGELING_MAGIC", "difficulty": 9, "max_level": 1, - "magic_type": "xedra_magic_generic", + "magic_type": "xe_fey_magick", "base_energy_cost": { "math": [ "u_effect_intensity('effect_controlling_weather_lightningstorm') > -1 ? 50 : max(( 500 - u_sum_traits_of_category_char_has('FAIR_FOLK_COMMONER_SELKIE') - (u_skill('deduction') * 15)), 200)" diff --git a/data/mods/desert_region/monsters/desert_monstergroups.json b/data/mods/desert_region/monsters/desert_monstergroups.json index 952731ad72245..adc1ba4983673 100644 --- a/data/mods/desert_region/monsters/desert_monstergroups.json +++ b/data/mods/desert_region/monsters/desert_monstergroups.json @@ -1,7 +1,7 @@ [ { "type": "monstergroup", - "name": "GROUP_DESERT", + "id": "GROUP_DESERT", "default": "mon_null", "is_animal": true, "monsters": [ diff --git a/data/mods/translate-dialogue/README.md b/data/mods/translate-dialogue/README.md index f93378a4e63ae..8680337667a3b 100644 --- a/data/mods/translate-dialogue/README.md +++ b/data/mods/translate-dialogue/README.md @@ -26,5 +26,5 @@ vvvvvvvvvvvvvvvvvvvvvvvvv Usage: * `cd path/to/Cataclysm-DDA/` * `python3 tools/json_tools/update-translate-dialogue-mod.py` - * then lint via `json_formatter.cgi`, check `doc/JSON_STYLE.md` + * then lint via `json_formatter.cgi`, check `doc/JSON/JSON_STYLE.md` * You can also add `"//": "mod_update_script_compact"` to dynamic lines to make the script concatenate that line more compactly and without newlines, which is useful if the original dialog also uses concatenation. diff --git a/data/raw/imgui_style.json b/data/raw/imgui_style.json index 80ad36c95eb7f..cd4527e6230a8 100644 --- a/data/raw/imgui_style.json +++ b/data/raw/imgui_style.json @@ -1,5 +1,5 @@ { - "//": "See doc/COLOR.md for documentation on how to use this file.", + "//": "See doc/user-guides/COLOR.md for documentation on how to use this file.", "inherit_base_colors": false, "colors": { diff --git a/doc/CONTRIBUTING.md b/doc/CONTRIBUTING.md index c1e1e011b0f17..a7b6bd9149793 100644 --- a/doc/CONTRIBUTING.md +++ b/doc/CONTRIBUTING.md @@ -64,7 +64,7 @@ There are a couple of guidelines we suggest sticking to (see [#Example Workflow] ## Code Style Code style is enforced across the codebase by `astyle`. -See [CODE_STYLE](../doc/CODE_STYLE.md) for details. +See [CODE_STYLE](../doc/c++/CODE_STYLE.md) for details. ## Translations @@ -268,7 +268,7 @@ When your PR should close an issue, please include [closing keywords](https://he ## Tooling support -Various tools are available to help you keep your contributions conforming to the appropriate style. See [DEVELOPER_TOOLING.md](../doc/DEVELOPER_TOOLING.md) for more details. +Various tools are available to help you keep your contributions conforming to the appropriate style. See [DEVELOPER_TOOLING.md](../doc/c++/DEVELOPER_TOOLING.md) for more details. ## Advanced Techniques @@ -341,9 +341,9 @@ The test took 41.772 seconds It is recommended to habitually invoke make like ``make YOUR BUILD OPTIONS && make check``. -If you're working with Visual Studio (and don't have `make`), see [Visual Studio-specific advice](../doc/COMPILING/COMPILING-VS-VCPKG.md#running-unit-tests). +If you're working with Visual Studio (and don't have `make`), see [Visual Studio-specific advice](../doc/c++/COMPILING-VS-VCPKG.md#running-unit-tests). -If you want/need to add a test, see [TESTING.md](../doc/TESTING.md) +If you want/need to add a test, see [TESTING.md](../doc/c++/TESTING.md) ## In-game testing, test environment and the debug menu diff --git a/doc/FREQUENTLY_MADE_SUGGESTIONS.md b/doc/FREQUENTLY_MADE_SUGGESTIONS.md index 3f2a8091ca51e..e0e19fded767b 100644 --- a/doc/FREQUENTLY_MADE_SUGGESTIONS.md +++ b/doc/FREQUENTLY_MADE_SUGGESTIONS.md @@ -142,12 +142,12 @@ Currently it’s way too easy to accumulate NPC followers and end up becoming ef #### Psychic powers: mod only Not happening, it simply doesn’t fit the theme of the game. -However, Mind Over Matter is distributed with the game, and adds psychic powers. See [MAGIC.md](MAGIC.md) for more info. +However, Mind Over Matter is distributed with the game, and adds psychic powers. See [MAGIC.md](JSON/MAGIC.md) for more info. #### Magic powers: mod only Not happening, it simply doesn’t fit the theme of the game. -However, the Magiclysm mod is distributed with the game and is very extensible in JSON to support other systems of magic, such as Mind Over Matter. This infrastructure is also used with EOC's and activated mutations in the base game. See [MAGIC.md](MAGIC.md) for more info. +However, the Magiclysm mod is distributed with the game and is very extensible in JSON to support other systems of magic, such as Mind Over Matter. This infrastructure is also used with EOC's and activated mutations in the base game. See [MAGIC.md](JSON/MAGIC.md) for more info. #### Remove skill rust: no diff --git a/doc/ARTIFACTS.md b/doc/JSON/ARTIFACTS.md similarity index 100% rename from doc/ARTIFACTS.md rename to doc/JSON/ARTIFACTS.md diff --git a/doc/BASECAMP.md b/doc/JSON/BASECAMP.md similarity index 99% rename from doc/BASECAMP.md rename to doc/JSON/BASECAMP.md index da40ed158b719..6ab23ed23aab3 100644 --- a/doc/BASECAMP.md +++ b/doc/JSON/BASECAMP.md @@ -93,7 +93,7 @@ The `"faction_base_camp_8"` upgrade mission can be performed after `"faction_bas ## mapgen update JSON -These are standard mapgen update JSON; see [the MAPGEN docs](doc/MAPGEN.md) for +These are standard mapgen update JSON; see [the MAPGEN docs](./MAPGEN.md) for more details. Each one should change a localized portion of the camp map and should, as much as possible, be independent of any other pieces of mapgen update for the basecamp upgrade path. Obviously, some bits are going to @@ -139,7 +139,7 @@ In this situation, you can define multiple upgrade options with a single recipe and a single mapgen update. This works as follows. Put one or more mapgen parameters in the mapgen update. Mapgen parameters are -documented in [the MAPGEN docs](doc/MAPGEN.md). Each parameter should be at +documented in [the MAPGEN docs](./MAPGEN.md). Each parameter should be at OMT scope and have a set of options defined e.g. via `"distribution"`, but the weights of the different options do not matter; the player will choose between them rather than a random choice. diff --git a/doc/CLIMBING.md b/doc/JSON/CLIMBING.md similarity index 100% rename from doc/CLIMBING.md rename to doc/JSON/CLIMBING.md diff --git a/doc/EFFECTS_JSON.md b/doc/JSON/EFFECTS_JSON.md similarity index 100% rename from doc/EFFECTS_JSON.md rename to doc/JSON/EFFECTS_JSON.md diff --git a/doc/EFFECT_ON_CONDITION.md b/doc/JSON/EFFECT_ON_CONDITION.md similarity index 100% rename from doc/EFFECT_ON_CONDITION.md rename to doc/JSON/EFFECT_ON_CONDITION.md diff --git a/doc/EXAMINE.md b/doc/JSON/EXAMINE.md similarity index 100% rename from doc/EXAMINE.md rename to doc/JSON/EXAMINE.md diff --git a/doc/FACTIONS.md b/doc/JSON/FACTIONS.md similarity index 100% rename from doc/FACTIONS.md rename to doc/JSON/FACTIONS.md diff --git a/doc/GUIDE_COMESTIBLES.md b/doc/JSON/GUIDE_COMESTIBLES.md similarity index 100% rename from doc/GUIDE_COMESTIBLES.md rename to doc/JSON/GUIDE_COMESTIBLES.md diff --git a/doc/HELP_MENU.md b/doc/JSON/HELP_MENU.md similarity index 90% rename from doc/HELP_MENU.md rename to doc/JSON/HELP_MENU.md index bcc4a51d09dcf..55ac791eabaef 100644 --- a/doc/HELP_MENU.md +++ b/doc/JSON/HELP_MENU.md @@ -10,8 +10,8 @@ Each category is made up of a json object which for mods can be placed anywhere | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `"type"` | (required) must be `"help"` | | `"order"` | (required) integer, where this category should appear in the list relative to others from the same source, with 0 being first. Must be unique per source (Every mod can start from 0). Each mods categories are appended to the end of the list per their load order. | -| `"name"` | (required) string, name of the category, can use [color tags](COLOR.md#color-tags) | -| `"messages"` | (required) array of strings, each string respresents a new line seperated paragraph containing information for this category, can use [color tags](COLOR.md#color-tags) and [keybind tags](#keybind-tags). Seperated mainly for ease of editing the json as `\n` lets you add newlines within strings | +| `"name"` | (required) string, name of the category, can use [color tags](/doc/user-guides/COLOR.md#color-tags) | +| `"messages"` | (required) array of strings, each string respresents a new line seperated paragraph containing information for this category, can use [color tags](/doc/user-guides/COLOR.md#color-tags) and [keybind tags](#keybind-tags). Seperated mainly for ease of editing the json as `\n` lets you add newlines within strings | ### Keybind tags diff --git a/doc/ITEM_DISASSEMBLY.md b/doc/JSON/ITEM_DISASSEMBLY.md similarity index 100% rename from doc/ITEM_DISASSEMBLY.md rename to doc/JSON/ITEM_DISASSEMBLY.md diff --git a/doc/ITEM_SPAWN.md b/doc/JSON/ITEM_SPAWN.md similarity index 100% rename from doc/ITEM_SPAWN.md rename to doc/JSON/ITEM_SPAWN.md diff --git a/doc/JSON_FLAGS.md b/doc/JSON/JSON_FLAGS.md similarity index 100% rename from doc/JSON_FLAGS.md rename to doc/JSON/JSON_FLAGS.md diff --git a/doc/JSON_INFO.md b/doc/JSON/JSON_INFO.md similarity index 99% rename from doc/JSON_INFO.md rename to doc/JSON/JSON_INFO.md index 4751fb1a99713..ffb9b4319beb6 100644 --- a/doc/JSON_INFO.md +++ b/doc/JSON/JSON_INFO.md @@ -3468,7 +3468,7 @@ Weakpoints only match if they share the same id, so it's important to define the "bash": 0, "cut": 0 }, -"to_hit" { // (Optional) To hit bonus values, omit if item isn't suited to be used as a melee weapon, see [GAME_BALANCE.md](GAME_BALANCE.md#to-hit-value) for individual value breakdowns. +"to_hit" { // (Optional) To hit bonus values, omit if item isn't suited to be used as a melee weapon, see [GAME_BALANCE.md](/doc/design-balance-lore/GAME_BALANCE.md#to-hit-value) for individual value breakdowns. "grip": "solid", // the item's grip value "length": "long", // the item's length value "surface": "point", // the item's striking surface value @@ -3530,7 +3530,7 @@ For additional clarity, an item's `to_hit` bonus can be encoded as string of 4 f "balance": "neutral" // one of "clumsy", "uneven", "neutral", or "good" } ``` -See [GAME_BALANCE.md](GAME_BALANCE.md#to-hit-value) +See [GAME_BALANCE.md](/doc/design-balance-lore/GAME_BALANCE.md#to-hit-value) ### Ammo @@ -3732,7 +3732,7 @@ Overrides the armor breathability, which is driven by armor material. Can be `IM ##### Layers -What layer this piece of armor occupy. Can be `PERSONAL`, `SKINTIGHT`, `NORMAL`, `WAIST`, `OUTER`, `BELTED`, `AURA`, see [ARMOR_BALANCE_AND_DESIGN.md#layers](ARMOR_BALANCE_AND_DESIGN.md#layers) for details +What layer this piece of armor occupy. Can be `PERSONAL`, `SKINTIGHT`, `NORMAL`, `WAIST`, `OUTER`, `BELTED`, `AURA`, see [ARMOR_BALANCE_AND_DESIGN.md#layers](/doc/design-balance-lore/ARMOR_BALANCE_AND_DESIGN.md#layers) for details ##### rigid_layer_only @@ -4150,7 +4150,7 @@ Any Item can be a container. To add the ability to contain things to an item, yo "cut": 12 }, "flags" : ["CHOP"], // Indicates special effects -"to_hit" { // (Optional) To hit bonus values, omit if item isn't suited to be used as a melee weapon, see [GAME_BALANCE.md](GAME_BALANCE.md#to-hit-value) for individual value breakdowns. +"to_hit" { // (Optional) To hit bonus values, omit if item isn't suited to be used as a melee weapon, see [GAME_BALANCE.md](/doc/design-balance-lore/GAME_BALANCE.md#to-hit-value) for individual value breakdowns. "grip": "solid", "length": "long", "surface": "point", @@ -4326,7 +4326,7 @@ Alternately, every item (book, tool, armor, even food) can be used as a gunmod i "bash": 12, "cut": 0 }, -"to_hit" { // (Optional) To hit bonus values, omit if item isn't suited to be used as a melee weapon, see [GAME_BALANCE.md](GAME_BALANCE.md#to-hit-value) for individual value breakdowns. +"to_hit" { // (Optional) To hit bonus values, omit if item isn't suited to be used as a melee weapon, see [GAME_BALANCE.md](/doc/design-balance-lore/GAME_BALANCE.md#to-hit-value) for individual value breakdowns. "grip": "solid", "length": "long", "surface": "point", diff --git a/doc/JSON_INHERITANCE.md b/doc/JSON/JSON_INHERITANCE.md similarity index 98% rename from doc/JSON_INHERITANCE.md rename to doc/JSON/JSON_INHERITANCE.md index 95b49d3fde3e9..ef4afdd1c12e0 100644 --- a/doc/JSON_INHERITANCE.md +++ b/doc/JSON/JSON_INHERITANCE.md @@ -191,5 +191,5 @@ Contributors are encouraged to not overuse `copy-from`, as it can decrease the h In general, there are two situations where `copy-from` should be used in the core game: * Two things are nearly identical variants of each other. - * If they're pretty much identical (e.g. everything except for their descriptions can be kept, there are only decorative differences, there are no mechanical differences, or in the case of [guns](GUN_NAMING_AND_INCLUSION.md#difference-threshold) minor value differences), they can be handled as [variants](JSON_INFO.md#snippets) (scroll down to the variant example). + * If they're pretty much identical (e.g. everything except for their descriptions can be kept, there are only decorative differences, there are no mechanical differences, or in the case of [guns](/doc/GUN_NAMING_AND_INCLUSION.md#difference-threshold) minor value differences), they can be handled as [variants](JSON_INFO.md#snippets) (scroll down to the variant example). * A group of entities always (not almost always, always) shares some set of properties, then one or two levels of abstracts can set up a very shallow and narrow hierarchy. diff --git a/doc/JSON/JSON_LOADING_ORDER.md b/doc/JSON/JSON_LOADING_ORDER.md new file mode 120000 index 0000000000000..a7dd451b5d789 --- /dev/null +++ b/doc/JSON/JSON_LOADING_ORDER.md @@ -0,0 +1 @@ +../../data/json/LOADING_ORDER.md \ No newline at end of file diff --git a/doc/JSON_Mapping_Guides/Guide_for_beginning_mapgen.md b/doc/JSON/JSON_Mapping_Guides/Guide_for_beginning_mapgen.md similarity index 97% rename from doc/JSON_Mapping_Guides/Guide_for_beginning_mapgen.md rename to doc/JSON/JSON_Mapping_Guides/Guide_for_beginning_mapgen.md index d4421b91b05bd..714074b33bbdc 100644 --- a/doc/JSON_Mapping_Guides/Guide_for_beginning_mapgen.md +++ b/doc/JSON/JSON_Mapping_Guides/Guide_for_beginning_mapgen.md @@ -1,6 +1,6 @@ ## Guide for basic mapgen -This guide will cover the basics of mapgen, which files you need to edit, the tags in each file and the differences in creating specials or regular city buildings. For full technical information about mapgen entries refer to: [doc/MAPGEN.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/MAPGEN.md). +This guide will cover the basics of mapgen, which files you need to edit, the tags in each file and the differences in creating specials or regular city buildings. For full technical information about mapgen entries refer to: [doc/JSON/MAPGEN.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/JSON/MAPGEN.md). First, lets cover some basic concepts and the files you'll add or edit. @@ -52,7 +52,7 @@ Before beginning you’ll want to make some decisions: #### The mapgen map: -This covers the mapgen file map flags and what they do in layman’s terms. You can get more extensive information from [doc/MAPGEN.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/MAPGEN.md). +This covers the mapgen file map flags and what they do in layman’s terms. You can get more extensive information from [doc/JSON/MAPGEN.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/JSON/MAPGEN.md). the mapgen file has some meta data tags and the `"object"` data which defines everything to make the map. @@ -213,7 +213,7 @@ Sample: The other most common one is: `"vendingmachines": { "D": { "item_group": "vending_drink" }, "V": { "item_group": "vending_food" } }` this assigns two symbols for vending machines and makes one for food & one for drinks. *note: you can put any item_group into the machines, like those bullet ones*. -6. Item spawns: There are many ways to place items. This tutorial will only cover explicit symbol placement which is the easiest. There is documentation all about loot spawns you can read for further information. See: [doc/ITEM_SPAWN.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/ITEM_SPAWN.md). +6. Item spawns: There are many ways to place items. This tutorial will only cover explicit symbol placement which is the easiest. There is documentation all about loot spawns you can read for further information. See: [doc/JSON/ITEM_SPAWN.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/JSON/ITEM_SPAWN.md). our sample uses "items": for its tag. others include: "place_item", "place_items", "place_loot". Some of these allow for individual item placement and others groups, or both. This will be covered in another tutorial. @@ -372,7 +372,7 @@ sample roof: 3. There is no `"weight"` entry because this will only spawn with its building (once linked). 4. My palette uses "t_flat_roof" as its default roof. For houses, I wanted shingles. So, I added the "t_shingle_flat_roof" in this mapgen which will override the palettes entry for `".": "t_flat_roof"`. (more on this in advanced mapgen). -I have a separate roof document at: [doc/JSON_Mapping_Guides/JSON_ROOF_MAPGEN.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/JSON_Mapping_Guides/JSON_ROOF_MAPGEN.md). +I have a separate roof document at: [JSON_ROOF_MAPGEN.md](JSON_ROOF_MAPGEN.md). #### Linking various mapgen maps using multitile_city_buildings.json @@ -454,9 +454,9 @@ Example: 6. `"city_distance"`, `"city_sizes"` both are parameters for where this spawns in relation to cities. 7. `"occurrences": [ 0, 1 ],`: Ok so occurrences can mean two things depending on if it uses the "UNIQUE" flag or not. When the flag is absent, this simply translates to how many times this special can spawn PER overmap. So 0 to 1 in this case. If you use the UNIQUE flag, this becomes a percentage so [ 1, 10 ] wouldn't be 1 to 10 times per overmap but a 1 in 10% chance to spawn on the overmap. So 10% chance to spawn once per overmap. - 8. `"flags"`: These are flags you can use to further define the special. For a list of flags see: [doc/JSON_FLAGS.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/JSON_FLAGS.md). + 8. `"flags"`: These are flags you can use to further define the special. For a list of flags see: [JSON_FLAGS.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/JSON/JSON_FLAGS.md). -Read: [doc/OVERMAP.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/OVERMAP.md) for more details. +Read: [OVERMAP.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/JSON/OVERMAP.md) for more details. #### Overmap_terrain entries: @@ -495,7 +495,7 @@ You need one entry per mapgen ID: 7. `"mondensity"` sets the default monster density for this overmap tile. You'll use this for general zombie spawns and reserve the mapgen monster entries for special spawns for that location (e.g. a pet store's pets). 8. `"extend"` many of these flags will be used by NPCs in the future for their AI, try to add flags appropriate for your location. Others further define the mapgen, like having sidewalks generate. -For further information see: [Overmap Terrain section of doc/OVERMAP.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/OVERMAP.md#overmap-terrain). +For further information see: [Overmap Terrain section of doc/JSON/OVERMAP.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/JSON/OVERMAP.md#overmap-terrain). #### Palettes: diff --git a/doc/JSON_Mapping_Guides/Guide_for_intermediate_mapgen.md b/doc/JSON/JSON_Mapping_Guides/Guide_for_intermediate_mapgen.md similarity index 99% rename from doc/JSON_Mapping_Guides/Guide_for_intermediate_mapgen.md rename to doc/JSON/JSON_Mapping_Guides/Guide_for_intermediate_mapgen.md index b572c091fce1d..61d0a6eb41688 100644 --- a/doc/JSON_Mapping_Guides/Guide_for_intermediate_mapgen.md +++ b/doc/JSON/JSON_Mapping_Guides/Guide_for_intermediate_mapgen.md @@ -114,7 +114,7 @@ Note the ID is now `nested_mapgen_id` and the object uses a new entry `mapgensiz * `mapgensize`: Nested mapgen can be any size from 1x1 to 24x24 but it must be square. You don't have to use every row or column of the `rows` entry. Any unused portions will fall back to the main mapgen. -* `flags`: More information about mapgen flags can be found in [doc/MAPGEN.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/MAPGEN.md#clearing-flags-for-layered-mapgens) +* `flags`: More information about mapgen flags can be found in [doc/JSON/MAPGEN.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/JSON/MAPGEN.md#clearing-flags-for-layered-mapgens) * `terrain` & `furniture`: Without `fill_ter`, you need to define every floor terrain under furniture. If you don't it will fall back to the main mapgen's `fill_ter`. In the above example, there's a green carpet in 1/2 the map and the rest picks up the floor of the mapgen (indoor concrete). If you need to overwrite existing furniture in the main mapgen you can use a combination of `t_null` and `f_null` to override preexisting mapgen. @@ -607,7 +607,7 @@ An example: each x coordinate encompasses one OMT from a segment of the mall. * Nested maps of all sorts can be used in a merged map, but they can't cross boundary lines (the nested map will be cut off at the boundary). -* More information about monster spawning can be found in [doc/MAPGEN.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/MAPGEN.md#spawn-item-or-monster-groups-with-place_groups) +* More information about monster spawning can be found in [doc/JSON/MAPGEN.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/JSON/MAPGEN.md#spawn-item-or-monster-groups-with-place_groups) Note: set point type entries (see the example below) don't work well with merged maps and the issue has been reported. If you use this entry, the points will be repeated in every OMT in your merged map. diff --git a/doc/JSON_Mapping_Guides/JSON_ROOF_MAPGEN.md b/doc/JSON/JSON_Mapping_Guides/JSON_ROOF_MAPGEN.md similarity index 98% rename from doc/JSON_Mapping_Guides/JSON_ROOF_MAPGEN.md rename to doc/JSON/JSON_Mapping_Guides/JSON_ROOF_MAPGEN.md index 7ad74a88be8eb..a1ad2b6b48caf 100644 --- a/doc/JSON_Mapping_Guides/JSON_ROOF_MAPGEN.md +++ b/doc/JSON/JSON_Mapping_Guides/JSON_ROOF_MAPGEN.md @@ -14,7 +14,7 @@ Files that will be edited: ## Making the Roof Map -Refer to [MAPGEN.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/MAPGEN.md) for creating the map if you are new to map creation. +Refer to [MAPGEN.md](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/JSON/MAPGEN.md) for creating the map if you are new to map creation. Open the file that contains the map for the building `data/json/mapgen/[name of building].json` Add a new entry for the roof. You can copy the building entry since you want the same foundation footprint for the roof. diff --git a/doc/JSON_STYLE.md b/doc/JSON/JSON_STYLE.md similarity index 100% rename from doc/JSON_STYLE.md rename to doc/JSON/JSON_STYLE.md diff --git a/doc/JSON_TOOLS.md b/doc/JSON/JSON_TOOLS.md similarity index 100% rename from doc/JSON_TOOLS.md rename to doc/JSON/JSON_TOOLS.md diff --git a/doc/MAGIC.md b/doc/JSON/MAGIC.md similarity index 100% rename from doc/MAGIC.md rename to doc/JSON/MAGIC.md diff --git a/doc/MAPGEN.md b/doc/JSON/MAPGEN.md similarity index 99% rename from doc/MAPGEN.md rename to doc/JSON/MAPGEN.md index 9c490251e354e..61653dd12b926 100644 --- a/doc/MAPGEN.md +++ b/doc/JSON/MAPGEN.md @@ -1180,7 +1180,7 @@ sense in the nest. ### Apply mapgen transformation with "ter_furn_transforms" -Run a [ter_furn_transform](doc/TER_FURN_TRANSFORM.md) at the specified location that can change existing fields, furniture, terrain or traps into another of the same type including null values. +Run a [ter_furn_transform](TER_FURN_TRANSFORM.md) at the specified location that can change existing fields, furniture, terrain or traps into another of the same type including null values. - "transform": (required, string) the id of the `ter_furn_transform` to run. diff --git a/doc/MARTIALART_JSON.md b/doc/JSON/MARTIALART_JSON.md similarity index 100% rename from doc/MARTIALART_JSON.md rename to doc/JSON/MARTIALART_JSON.md diff --git a/doc/MISSIONS_JSON.md b/doc/JSON/MISSIONS_JSON.md similarity index 99% rename from doc/MISSIONS_JSON.md rename to doc/JSON/MISSIONS_JSON.md index 15be0296fd9c3..1ccbb6a471172 100644 --- a/doc/MISSIONS_JSON.md +++ b/doc/JSON/MISSIONS_JSON.md @@ -265,7 +265,7 @@ As an array, `update_mapgen` consists of two or more `update_mapgen` objects. As an object, `update_mapgen` contains any valid JSON mapgen objects. The objects are placed on the mission target terrain from "assign_mission_target" or optionally the closest overmap terrain specified by the `om_terrain` and `om_special` fields. If "mapgen_update_id" is specified, the "mapge_update" object with the matching "mapgen_update_id" will be executed. -See doc/MAPGEN.md for more details on JSON mapgen and `update_mapgen`. +See [MAPGEN.md](MAPGEN.md) for more details on JSON mapgen and `update_mapgen`. An NPC, monster, or computer placed using `update_mapgen` will be the target of a mission if it has the `target` boolean set to `true` in its `place` object in `update_mapgen`. diff --git a/doc/MONSTERS.md b/doc/JSON/MONSTERS.md similarity index 98% rename from doc/MONSTERS.md rename to doc/JSON/MONSTERS.md index ff8060ad0d53b..2a08182b9f7b8 100644 --- a/doc/MONSTERS.md +++ b/doc/JSON/MONSTERS.md @@ -30,7 +30,7 @@ Property | Description `color` | (string) Symbol color for the monster `default_faction` | (string) What faction the monster is allied with `bodytype` | (string) Monster's body type, ex. bear, bird, dog, human, insect, lizard etc. -`speed` | (integer) Monster speed, relative to human speed `100`, with greater numbers being faster. Also see [monster speed scaling in GAME_BALANCE.md](GAME_BALANCE.md#monster-speed-scaling) +`speed` | (integer) Monster speed, relative to human speed `100`, with greater numbers being faster. Also see [monster speed scaling in GAME_BALANCE.md](/doc/design-balance-lore/GAME_BALANCE.md#monster-speed-scaling) Monsters may also have any of these optional properties: @@ -45,14 +45,14 @@ Property | Description `material` | (array of strings) Materials the monster is made of. Defined in [`materials.json`](../data/json/materials.json) `phase` | (string) Monster's body matter state, ex. SOLID, LIQUID, GAS, PLASMA, NULL `attack_cost` | (integer) Number of moves per regular attack. If not defined defaults to `100`. -`diff` | (integer) Displayed monster difficulty, e.g affects how the monster name is colored, e.g red for very nasty critters. Also see [monster difficulty scaling in GAME_BALANCE.md](GAME_BALANCE.md#monster-difficulty-scaling) +`diff` | (integer) Displayed monster difficulty, e.g affects how the monster name is colored, e.g red for very nasty critters. Also see [monster difficulty scaling in GAME_BALANCE.md](/doc/design-balance-lore/GAME_BALANCE.md#monster-difficulty-scaling) `aggression` | (integer) Starting aggression, the monster will become hostile when it reaches 10 `morale` | (integer) Starting morale, monster will flee when (current aggression + current morale) < 0 `aggro_character` | (bool) If true the monster will always attack characters when angry. `mountable_weight_ratio` | (float) For mounts, max ratio of mount to rider weight, ex. `0.2` for `<=20%` -`melee_skill` | (integer) Monster skill in melee combat, from `0-10`, with `4` being an average mob. Also see [monster melee skill scaling in GAME_BALANCE.md](GAME_BALANCE.md#monster-melee-skill-scaling) +`melee_skill` | (integer) Monster skill in melee combat, from `0-10`, with `4` being an average mob. Also see [monster melee skill scaling in GAME_BALANCE.md](/doc/design-balance-lore/GAME_BALANCE.md#monster-melee-skill-scaling) `dodge` | (integer) Monster's skill at dodging attacks -`melee_damage` | (array of objects) List of damage instances added to die roll on monster melee attack. Also see [monster maximum damage scaling in GAME_BALANCE.md](GAME_BALANCE.md#monster-maximum-damage-scaling) +`melee_damage` | (array of objects) List of damage instances added to die roll on monster melee attack. Also see [monster maximum damage scaling in GAME_BALANCE.md](/doc/design-balance-lore/GAME_BALANCE.md#monster-maximum-damage-scaling) `melee_dice` | (integer) Number of dice rolled on monster melee attack to determine bash damage `melee_dice_sides` | (integer) Number of sides on each die rolled by `melee_dice` `grab_strength` | (integer) Intensity of grab effect, from `1` to `n`. A default zombie has a grab strength of `20` @@ -181,7 +181,7 @@ List of scenttype_id ignored by this monster. scent_types are defined in scent_t ## "symbol", "color" (string, required) -Symbol and color representing monster in-game. The symbol must be a UTF-8 string, that is exactly one console cell width (may be several Unicode characters). See [COLOR.md](COLOR.md) for details. +Symbol and color representing monster in-game. The symbol must be a UTF-8 string, that is exactly one console cell width (may be several Unicode characters). See [COLOR.md](/doc/user-guides/COLOR.md) for details. ## "material" (array of strings, optional) @@ -278,12 +278,12 @@ Used as the acceptable rider vs. mount weight percentage ratio. Defaults to "0.2 ## "melee_skill" (integer, optional) -Monster melee skill, ranges from 0 - 10, with 4 being an average mob. See [GAME_BALANCE.md](GAME_BALANCE.md) for more examples +Monster melee skill, ranges from 0 - 10, with 4 being an average mob. See [GAME_BALANCE.md](/doc/design-balance-lore/GAME_BALANCE.md) for more examples ## "dodge" (integer, optional) -Monster dodge skill. See [GAME_BALANCE.md](GAME_BALANCE.md) for an explanation of dodge mechanics. +Monster dodge skill. See [GAME_BALANCE.md](/doc/design-balance-lore/GAME_BALANCE.md) for an explanation of dodge mechanics. ## "melee_damage" (array of objects, optional) diff --git a/doc/MONSTER_SPECIAL_ATTACKS.md b/doc/JSON/MONSTER_SPECIAL_ATTACKS.md similarity index 100% rename from doc/MONSTER_SPECIAL_ATTACKS.md rename to doc/JSON/MONSTER_SPECIAL_ATTACKS.md diff --git a/doc/MOVE_MODE.md b/doc/JSON/MOVE_MODE.md similarity index 100% rename from doc/MOVE_MODE.md rename to doc/JSON/MOVE_MODE.md diff --git a/doc/MUTATIONS.md b/doc/JSON/MUTATIONS.md similarity index 100% rename from doc/MUTATIONS.md rename to doc/JSON/MUTATIONS.md diff --git a/doc/NPCs.md b/doc/JSON/NPCs.md similarity index 99% rename from doc/NPCs.md rename to doc/JSON/NPCs.md index eb538bfe34edc..06c629f363940 100644 --- a/doc/NPCs.md +++ b/doc/JSON/NPCs.md @@ -1379,6 +1379,7 @@ _some functions support array arguments or kwargs, denoted with square brackets | npc_fear() | ✅ | ✅ | u, n | Return NPC fear toward opposite talker.

Example:
`{ "math": [ "n_npc_fear() < 2" ] }`| | npc_trust() | ✅ | ✅ | u, n | Return NPC trust toward opposite talker.

Example:
`{ "math": [ "n_npc_trust() = 2" ] }`| | npc_value() | ✅ | ✅ | u, n | Return NPC value toward opposite talker.

Example:
`{ "math": [ "n_npc_value() += 2" ] }`| +| ugliness() | ✅ | ❌ | u, n | Return ugliness of character.

Example:
`{ "math": [ "n_ugliness() > 0" ] }`| | weight() | ✅ | ❌ | u, n | Return creature or item weight, in miligrams.

Example:
`{ "math": [ "u_weight() < 1000000" ] }`| | volume() | ✅ | ❌ | u, n | Return creature or item volume, in mililiters.

Example:
`{ "math": [ "u_volume() < 1000" ] }`| | vitamin(`s`/`v`) | ✅ | ✅ | u, n | Return or set the characters vitamin level.
Argument is vitamin ID.

Example:
`{ "math": [ "u_vitamin('mutagen') = 0" ] }`| diff --git a/doc/OBSOLETION_AND_MIGRATION.md b/doc/JSON/OBSOLETION_AND_MIGRATION.md similarity index 100% rename from doc/OBSOLETION_AND_MIGRATION.md rename to doc/JSON/OBSOLETION_AND_MIGRATION.md diff --git a/doc/OVERMAP.md b/doc/JSON/OVERMAP.md similarity index 100% rename from doc/OVERMAP.md rename to doc/JSON/OVERMAP.md diff --git a/doc/PRACTICE_RECIPES.md b/doc/JSON/PRACTICE_RECIPES.md similarity index 100% rename from doc/PRACTICE_RECIPES.md rename to doc/JSON/PRACTICE_RECIPES.md diff --git a/doc/PROFICIENCY.md b/doc/JSON/PROFICIENCY.md similarity index 100% rename from doc/PROFICIENCY.md rename to doc/JSON/PROFICIENCY.md diff --git a/doc/PROFICIENCY_LIST.md b/doc/JSON/PROFICIENCY_LIST.md similarity index 100% rename from doc/PROFICIENCY_LIST.md rename to doc/JSON/PROFICIENCY_LIST.md diff --git a/doc/REGION_SETTINGS.md b/doc/JSON/REGION_SETTINGS.md similarity index 100% rename from doc/REGION_SETTINGS.md rename to doc/JSON/REGION_SETTINGS.md diff --git a/doc/TER_FURN_TRANSFORM.md b/doc/JSON/TER_FURN_TRANSFORM.md similarity index 100% rename from doc/TER_FURN_TRANSFORM.md rename to doc/JSON/TER_FURN_TRANSFORM.md diff --git a/doc/VEHICLES_JSON.md b/doc/JSON/VEHICLES_JSON.md similarity index 100% rename from doc/VEHICLES_JSON.md rename to doc/JSON/VEHICLES_JSON.md diff --git a/doc/VITAMIN.md b/doc/JSON/VITAMIN.md similarity index 100% rename from doc/VITAMIN.md rename to doc/JSON/VITAMIN.md diff --git a/doc/WEATHER_TYPE.md b/doc/JSON/WEATHER_TYPE.md similarity index 100% rename from doc/WEATHER_TYPE.md rename to doc/JSON/WEATHER_TYPE.md diff --git a/doc/JSON_LOADING_ORDER.md b/doc/JSON_LOADING_ORDER.md deleted file mode 120000 index f8db7c347a6bd..0000000000000 --- a/doc/JSON_LOADING_ORDER.md +++ /dev/null @@ -1 +0,0 @@ -../data/json/LOADING_ORDER.md \ No newline at end of file diff --git a/doc/MODDING.md b/doc/MODDING.md index 5e9abbb1e78be..db84bd974e0e5 100644 --- a/doc/MODDING.md +++ b/doc/MODDING.md @@ -2,7 +2,7 @@ Certain features of the game can be modified without rebuilding the game from source code. This includes professions, monsters, npcs, and more. Just modify the pertinent files and run the game to see your changes. -The majority of modding is done by editing JSON files. An in-depth review of all json files and their appropriate fields is available in [JSON_INFO.md](JSON_INFO.md). +The majority of modding is done by editing JSON files. An in-depth review of all json files and their appropriate fields is available in [JSON/JSON_INFO.md](JSON/JSON_INFO.md). ## Other guides @@ -71,7 +71,7 @@ Now that you have a basic mod, you can get around to actually putting some stuff It's a good idea to put different categories of additions into different json files. Any json files that are present in the mod folder or its subfolders will be detected and read by Cataclysm, but otherwise, there are no restrictions on what you can put where. ### JSON_INFO.md -It's worth reading [JSON_INFO.md](JSON_INFO.md) to get a comprehensive list of everything you can do with these mods. The rest of this document will have a few examples to copy and paste, but it is by no means comprehensive. The base game's data is also defined in the same way as any mod you write, so taking a look through the game's json files (in `data/json`) can also teach you a lot. If the game finds any issues in your JSON syntax when you try to load a game world, it will spit out an error message, and you won't be able to load that game until the issue is fixed. +It's worth reading [JSON/JSON_INFO.md](JSON/JSON_INFO.md) to get a comprehensive list of everything you can do with these mods. The rest of this document will have a few examples to copy and paste, but it is by no means comprehensive. The base game's data is also defined in the same way as any mod you write, so taking a look through the game's json files (in `data/json`) can also teach you a lot. If the game finds any issues in your JSON syntax when you try to load a game world, it will spit out an error message, and you won't be able to load that game until the issue is fixed. ### Adding a scenario Scenarios are what the game uses to determine your general situation when you create a character. They determine when and where your character may spawn in the world, and what professions can be used. They are also used to determine whether those professions can have mutations starting out. Below you will find the JSON definition for the game's built-in `Large Building` scenario. @@ -138,7 +138,7 @@ Professions are what the game calls the character classes you can choose from wh ```` ### Adding an item -Items are where you really want to read the [JSON_INFO.md](JSON_INFO.md) file, just because there's so much that you can do with them, and every category of item is a little bit different. +Items are where you really want to read the [JSON/JSON_INFO.md](JSON/JSON_INFO.md) file, just because there's so much that you can do with them, and every category of item is a little bit different. ````json [ diff --git a/doc/TESTING_YOUR_CHANGES.md b/doc/TESTING_YOUR_CHANGES.md index 230075d69748e..f78f7ab2b154a 100644 --- a/doc/TESTING_YOUR_CHANGES.md +++ b/doc/TESTING_YOUR_CHANGES.md @@ -10,8 +10,8 @@ Typo fixes and the like usually do not need to be tested. The [Manual of Style](MANUAL_OF_STYLE.md), applies to any proposed change, so read this one first. -For JSON changes, read [JSON_STYLE.md](JSON_STYLE.md). -For C++ changes, read [CODE_STYLE.md](CODE_STYLE.md). +For JSON changes, read [JSON/JSON_STYLE.md](JSON/JSON_STYLE.md). +For C++ changes, read [c++/CODE_STYLE.md](c++/CODE_STYLE.md). All released builds include a pre-compiled `json_formatter.cgi`, which is a handy tool to automatically format any JSON file you point it at @@ -36,8 +36,8 @@ JSON files, so after making changes, make sure to either relaunch Cataclysm or reload your save, whatever is more convenient. For C++ changes, you will need to compile the game yourself. -See [COMPILING.md](COMPILING/COMPILING.md). -You may also want to look at [TESTING.md](TESTING.md) for our unit +See [COMPILING.md](c++/COMPILING.md). +You may also want to look at [c++/TESTING.md](c++/TESTING.md) for our unit tests. ## Using the debug menu diff --git a/doc/TILESET.md b/doc/TILESET.md index 378257cfe5c52..19c481f52b9cb 100644 --- a/doc/TILESET.md +++ b/doc/TILESET.md @@ -105,7 +105,7 @@ Special prefixes that are used include: `overlay_` for movement modes. -`vp_` for vehicle parts (see also [`symbols` and `standard_symbols` JSON keys](JSON_INFO.md#symbols-and-variants) that are used as suffixes). +`vp_` for vehicle parts (see also [`symbols` and `standard_symbols` JSON keys](JSON/JSON_INFO.md#symbols-and-variants) that are used as suffixes). `explosion_` for spell explosion effects. Multitile is required; only supports "center", "edge" and "corner". @@ -172,11 +172,11 @@ For both properties, arrays of multiple groups are possible. Connections are only set up from types that have a `connects_to` group to types that have the same group in `connect_groups`. -For details, see JSON_INFO.md, sections [`connect_groups`](./JSON_INFO.md#connect_groups) and [`connects_to`](./JSON_INFO.md#connects_to). +For details, see JSON_INFO.md, sections [`connect_groups`](./JSON/JSON_INFO.md#connect_groups) and [`connects_to`](./JSON/JSON_INFO.md#connects_to). Wall work out of the box without modifying terrain definitions, as the required group `WALL` is implied by the flags `WALL` and `CONNECT_WITH_WALL` for `connect_groups` as well as `connects_to` (i.e. symmetric relation). -For available connect groups, see [JSON_INFO.md, section Connection groups](./JSON_INFO.md#connection-groups). +For available connect groups, see [JSON_INFO.md, section Connection groups](./JSON/JSON_INFO.md#connection-groups). For the full multitile, the 16 sprite variants of this template are required: @@ -231,15 +231,15 @@ In JSON, the multitile would be defined like this: #### Auto-rotating terrain and furniture - `rotates_to` Terrain and furniture can auto-rotate depending on other surrounding terrain or furniture using `rotates_to`. -For details, see JSON_INFO.md, sections [`connect_groups`](./JSON_INFO.md#connect_groups) and [`rotates_to`](./JSON_INFO.md#rotates_to). +For details, see JSON_INFO.md, sections [`connect_groups`](./JSON/JSON_INFO.md#connect_groups) and [`rotates_to`](./JSON/JSON_INFO.md#rotates_to). Usage examples for terrain are doors and windows that look differently, seen from inside and outside (e.g. curtain). An example for furniture are street lights that orient towards the pavement. The mechanism works like to `connects_to`, and can be combined with it. -It also makes use of the same [Connection group](./JSON_INFO.md#connection-groups), given by property `connect_groups`. +It also makes use of the same [Connection group](./JSON/JSON_INFO.md#connection-groups), given by property `connect_groups`. Currently, however, auto-rotation is implemented only for `edge` and `end_piece` tiles (doors, windows, furniture) and `unconnected` tiles (e.g. street lights). -For the active/rotating type, `rotates_to` specifies a [Connection group](./JSON_INFO.md#connection-groups) the terrain should rotate towards (or rather, depend on). +For the active/rotating type, `rotates_to` specifies a [Connection group](./JSON/JSON_INFO.md#connection-groups) the terrain should rotate towards (or rather, depend on). For the passive/target type, `connect_groups` is used to add it to a connection group. Terrain can only use terrain to rotate towards, while furniture can use both, terrain and furniture. diff --git a/doc/TRANSLATING.md b/doc/TRANSLATING.md index 4b98f2e07640d..daf457d87b307 100644 --- a/doc/TRANSLATING.md +++ b/doc/TRANSLATING.md @@ -111,7 +111,7 @@ have alternate translations depending on the gender of the conversation participants. This two pieces of initial configuration. 1. The dialogue must have the relevant genders listed in the json file defining - it. See [the NPC docs](NPCs.md). + it. See [the NPC docs](./JSON/NPCs.md). 2. Each language must specify the genders it wishes to use via the translation of `grammatical gender list`. This should be a space-separated list of genders used in this language for such translations. Don't add genders here @@ -313,7 +313,7 @@ to ensure that the strings are correctly extracted for translation, and run the unit test to fix text styling issues reported by the `translation` class. If a string doesn't need to be translated, you can write `"NO_I18N"` in the -`"//~"` comment, and this string will not be available to translators (see [here](/doc/JSON_INFO.md#translatable-strings)): +`"//~"` comment, and this string will not be available to translators (see [here](/doc/JSON/JSON_INFO.md#translatable-strings)): ```JSON "name": { diff --git a/doc/WIDGETS.md b/doc/WIDGETS.md index eb26db63fa5fa..b9e83f0f7b8bf 100644 --- a/doc/WIDGETS.md +++ b/doc/WIDGETS.md @@ -595,7 +595,7 @@ The English word "place" can be a verb, to put something down. Here "place" is a location. The "ctxt" part provides this context to translators so they can choose the most appropriate words in other languages. -See the [Translatable strings section of JSON_INFO.md](JSON_INFO.md#translatable-strings) +See the [Translatable strings section of JSON_INFO.md](JSON/JSON_INFO.md#translatable-strings) for more on how these work. ## string @@ -789,7 +789,7 @@ red, given in a "colors" list: } ``` -Color names may be any of those described in [COLOR.md](COLOR.md). You can also see the available +Color names may be any of those described in [COLOR.md](user-guides/COLOR.md). You can also see the available colors in-game from the "Settings" menu, under "Colors". Graphs can be colorized in the same way. For example, the classic stamina graph is a 5-character @@ -909,13 +909,13 @@ which provides text and color definitions for different bodypart status conditio | `color` | Defines the color for the text derived from this "clause". | `value` | A numeric value for this "clause", which may be interpreted differently based on the context of the parent widget. | `widgets` | For "layout" style widgets, the child widgets used for this "clause". -| `condition` | A dialogue condition (see [Dialogue conditions](NPCs.md#dialogue-conditions)) that dictates whether this clause will be used or not. If the condition is true (or when no condition is defined), the clause can be used to its text/symbol/color in the widget's value. -| `parse_tags`| default false. If true, parse custom entries in `text` before displaying it. This can be used to display global_val or u_val.(see [Special Custom Entries](NPCs.md#special-custom-entries) for details) You can also use `` to modify the color of your text. +| `condition` | A dialogue condition (see [Dialogue conditions](JSON/NPCs.md#dialogue-conditions)) that dictates whether this clause will be used or not. If the condition is true (or when no condition is defined), the clause can be used to its text/symbol/color in the widget's value. +| `parse_tags`| default false. If true, parse custom entries in `text` before displaying it. This can be used to display global_val or u_val.(see [Special Custom Entries](JSON/NPCs.md#special-custom-entries) for details) You can also use `` to modify the color of your text. ## Conditions Widget clauses and conditions can be used to define new widgets completely from JSON, using -[dialogue conditions](NPCs.md#dialogue-conditions). By omitting the widget's `var` field, the +[dialogue conditions](JSON/NPCs.md#dialogue-conditions). By omitting the widget's `var` field, the widget is interpreted as either a "text", "number", "symbol", or "legend" depending on the given `style`. The widget will evaluate each of its clauses to determine which ones to draw values from: diff --git a/doc/CODE_STYLE.md b/doc/c++/CODE_STYLE.md similarity index 100% rename from doc/CODE_STYLE.md rename to doc/c++/CODE_STYLE.md diff --git a/doc/COMPILING/COMPILER_SUPPORT.md b/doc/c++/COMPILER_SUPPORT.md similarity index 100% rename from doc/COMPILING/COMPILER_SUPPORT.md rename to doc/c++/COMPILER_SUPPORT.md diff --git a/doc/COMPILING/COMPILING-CMAKE-VCPKG.md b/doc/c++/COMPILING-CMAKE-VCPKG.md similarity index 100% rename from doc/COMPILING/COMPILING-CMAKE-VCPKG.md rename to doc/c++/COMPILING-CMAKE-VCPKG.md diff --git a/doc/COMPILING/COMPILING-CMAKE.md b/doc/c++/COMPILING-CMAKE.md similarity index 100% rename from doc/COMPILING/COMPILING-CMAKE.md rename to doc/c++/COMPILING-CMAKE.md diff --git a/doc/COMPILING/COMPILING-CYGWIN.md b/doc/c++/COMPILING-CYGWIN.md similarity index 100% rename from doc/COMPILING/COMPILING-CYGWIN.md rename to doc/c++/COMPILING-CYGWIN.md diff --git a/doc/COMPILING/COMPILING-DEVCONTAINER.md b/doc/c++/COMPILING-DEVCONTAINER.md similarity index 100% rename from doc/COMPILING/COMPILING-DEVCONTAINER.md rename to doc/c++/COMPILING-DEVCONTAINER.md diff --git a/doc/COMPILING/COMPILING-FLATPAK.md b/doc/c++/COMPILING-FLATPAK.md similarity index 100% rename from doc/COMPILING/COMPILING-FLATPAK.md rename to doc/c++/COMPILING-FLATPAK.md diff --git a/doc/COMPILING/COMPILING-MSYS.md b/doc/c++/COMPILING-MSYS.md similarity index 100% rename from doc/COMPILING/COMPILING-MSYS.md rename to doc/c++/COMPILING-MSYS.md diff --git a/doc/COMPILING/COMPILING-VS-VCPKG.md b/doc/c++/COMPILING-VS-VCPKG.md similarity index 97% rename from doc/COMPILING/COMPILING-VS-VCPKG.md rename to doc/c++/COMPILING-VS-VCPKG.md index 3591143a5231c..a2a31592d409c 100644 --- a/doc/COMPILING/COMPILING-VS-VCPKG.md +++ b/doc/c++/COMPILING-VS-VCPKG.md @@ -31,7 +31,7 @@ In a `cmd.exe` shell: REM cd to the appropriate folder first git clone https://github.com/Microsoft/vcpkg.git cd vcpkg -git checkout 3b57fb2e1ff55613db14d2aaf0a30529289c7050 +git pull .\bootstrap-vcpkg.bat -disableMetrics .\vcpkg integrate install ``` @@ -40,11 +40,13 @@ In a Git Bash shell, the commands are almost the same except the filesystem path # cd to the appropriate folder first git clone https://github.com/Microsoft/vcpkg.git cd vcpkg -git checkout 3b57fb2e1ff55613db14d2aaf0a30529289c7050 +git pull ./bootstrap-vcpkg.bat -disableMetrics ./vcpkg.exe integrate install ``` +If during the compilation you're getting a vcpkg error along the lines of `error: no version database entry for sdl2 at 2.26.5`, that probably means that your vcpkg install is too old. Running a `git pull` in vcpkg directory should fix the issue. + ## Cloning and compilation: 1. Clone Cataclysm-DDA repository with following command line: diff --git a/doc/COMPILING/COMPILING.md b/doc/c++/COMPILING.md similarity index 100% rename from doc/COMPILING/COMPILING.md rename to doc/c++/COMPILING.md diff --git a/doc/DEVELOPER_TOOLING.md b/doc/c++/DEVELOPER_TOOLING.md similarity index 98% rename from doc/DEVELOPER_TOOLING.md rename to doc/c++/DEVELOPER_TOOLING.md index f7cb7b490287d..03e9d81fbb754 100644 --- a/doc/DEVELOPER_TOOLING.md +++ b/doc/c++/DEVELOPER_TOOLING.md @@ -57,7 +57,7 @@ On Windows, there is an [AStyle extension for Visual Studio 2019](https://github ## JSON style -See the [JSON style guide](JSON_STYLE.md). +See the [JSON style guide](../JSON/JSON_STYLE.md). ## ctags @@ -101,7 +101,8 @@ sudo apt install build-essential cmake clang-12 libclang-12-dev llvm-12 llvm-12- sudo pip install compiledb lit test -f /usr/bin/python || sudo ln -s /usr/bin/python3 /usr/bin/python # The following command invokes clang-tidy exactly like CI does -COMPILER=clang++-12 CLANG=clang++-12 CMAKE=1 CATA_CLANG_TIDY=plugin TILES=1 LOCALIZE=0 ./build-scripts/clang-tidy.sh +COMPILER=clang++-12 CLANG=clang++-12 CMAKE=1 CATA_CLANG_TIDY=plugin TILES=1 LOCALIZE=0 ./build-scripts/clang-tidy-build.sh +COMPILER=clang++-12 CLANG=clang++-12 CMAKE=1 CATA_CLANG_TIDY=plugin TILES=1 LOCALIZE=0 ./build-scripts/clang-tidy-run.sh ``` #### Ubuntu Focal diff --git a/doc/POINTS_COORDINATES.md b/doc/c++/POINTS_COORDINATES.md similarity index 100% rename from doc/POINTS_COORDINATES.md rename to doc/c++/POINTS_COORDINATES.md diff --git a/doc/TESTING.md b/doc/c++/TESTING.md similarity index 100% rename from doc/TESTING.md rename to doc/c++/TESTING.md diff --git a/doc/ARMOR_BALANCE_AND_DESIGN.md b/doc/design-balance-lore/ARMOR_BALANCE_AND_DESIGN.md similarity index 100% rename from doc/ARMOR_BALANCE_AND_DESIGN.md rename to doc/design-balance-lore/ARMOR_BALANCE_AND_DESIGN.md diff --git a/doc/CONSTRUCTION_BALANCE.md b/doc/design-balance-lore/CONSTRUCTION_BALANCE.md similarity index 100% rename from doc/CONSTRUCTION_BALANCE.md rename to doc/design-balance-lore/CONSTRUCTION_BALANCE.md diff --git a/doc/GAME_BALANCE.md b/doc/design-balance-lore/GAME_BALANCE.md similarity index 100% rename from doc/GAME_BALANCE.md rename to doc/design-balance-lore/GAME_BALANCE.md diff --git a/doc/LORE.md b/doc/design-balance-lore/LORE_FAQ.md similarity index 100% rename from doc/LORE.md rename to doc/design-balance-lore/LORE_FAQ.md diff --git a/doc/PORTAL_STORM_BALANCE_AND_DESIGN.md b/doc/design-balance-lore/PORTAL_STORM_BALANCE_AND_DESIGN.md similarity index 100% rename from doc/PORTAL_STORM_BALANCE_AND_DESIGN.md rename to doc/design-balance-lore/PORTAL_STORM_BALANCE_AND_DESIGN.md diff --git a/doc/POSTAPOC_PRICE_GUIDE.md b/doc/design-balance-lore/POSTAPOC_PRICE_GUIDE.md similarity index 100% rename from doc/POSTAPOC_PRICE_GUIDE.md rename to doc/design-balance-lore/POSTAPOC_PRICE_GUIDE.md diff --git a/doc/Ranged Ballistic Damage Modifier Calculator.ods b/doc/design-balance-lore/Ranged Ballistic Damage Modifier Calculator.ods similarity index 100% rename from doc/Ranged Ballistic Damage Modifier Calculator.ods rename to doc/design-balance-lore/Ranged Ballistic Damage Modifier Calculator.ods diff --git a/doc/STEEL_CRAFTING.md b/doc/design-balance-lore/STEEL_CRAFTING.md similarity index 100% rename from doc/STEEL_CRAFTING.md rename to doc/design-balance-lore/STEEL_CRAFTING.md diff --git a/doc/batteries_and_electricity.md b/doc/design-balance-lore/batteries_and_electricity.md similarity index 100% rename from doc/batteries_and_electricity.md rename to doc/design-balance-lore/batteries_and_electricity.md diff --git a/doc/Lore/design-balance.md b/doc/design-balance-lore/design-balance.md similarity index 100% rename from doc/Lore/design-balance.md rename to doc/design-balance-lore/design-balance.md diff --git a/doc/Lore/design-doc.md b/doc/design-balance-lore/design-doc.md similarity index 100% rename from doc/Lore/design-doc.md rename to doc/design-balance-lore/design-doc.md diff --git a/doc/Lore/design-gameplay.md b/doc/design-balance-lore/design-gameplay.md similarity index 100% rename from doc/Lore/design-gameplay.md rename to doc/design-balance-lore/design-gameplay.md diff --git a/doc/Lore/design-user-experience.md b/doc/design-balance-lore/design-user-experience.md similarity index 100% rename from doc/Lore/design-user-experience.md rename to doc/design-balance-lore/design-user-experience.md diff --git a/doc/Lore/lore-background.md b/doc/design-balance-lore/lore-background.md similarity index 100% rename from doc/Lore/lore-background.md rename to doc/design-balance-lore/lore-background.md diff --git a/doc/Lore/lore-factions.md b/doc/design-balance-lore/lore-factions.md similarity index 100% rename from doc/Lore/lore-factions.md rename to doc/design-balance-lore/lore-factions.md diff --git a/doc/Lore/lore.md b/doc/design-balance-lore/lore.md similarity index 100% rename from doc/Lore/lore.md rename to doc/design-balance-lore/lore.md diff --git a/doc/melee_weapons/MELEE_BALANCE_SPREADSHEET.md b/doc/design-balance-lore/melee_weapons/MELEE_BALANCE_SPREADSHEET.md similarity index 100% rename from doc/melee_weapons/MELEE_BALANCE_SPREADSHEET.md rename to doc/design-balance-lore/melee_weapons/MELEE_BALANCE_SPREADSHEET.md diff --git a/doc/melee_weapons/Melee Weapon Evaluation.ods b/doc/design-balance-lore/melee_weapons/Melee Weapon Evaluation.ods similarity index 100% rename from doc/melee_weapons/Melee Weapon Evaluation.ods rename to doc/design-balance-lore/melee_weapons/Melee Weapon Evaluation.ods diff --git a/doc/Lore/technology.md b/doc/design-balance-lore/technology.md similarity index 100% rename from doc/Lore/technology.md rename to doc/design-balance-lore/technology.md diff --git a/doc/development_process.md b/doc/development_process.md index 150b3f6274a22..7911a8bb2a4b3 100644 --- a/doc/development_process.md +++ b/doc/development_process.md @@ -32,7 +32,7 @@ This document assumes you have a basic understanding how GitHub works. Please s ## The basic concept -At its core, CDDA is a survival simulation game. [The design doc outlines what we mean by this](./Lore/design-doc.md). The project is led by Kevin Granade, who owns CleverRaven and therefore this fork of the code. As lead developer, Kevin's main job in the project is to be the *last word* if one is needed. Most of the time, we don't need his final arbitration to know if something is going to fit or not.[^code] The rest of the project's structure is organized chaos, and understanding it is daunting at first. +At its core, CDDA is a survival simulation game. [The design doc outlines what we mean by this](./design-balance-lore/design-doc.md). The project is led by Kevin Granade, who owns CleverRaven and therefore this fork of the code. As lead developer, Kevin's main job in the project is to be the *last word* if one is needed. Most of the time, we don't need his final arbitration to know if something is going to fit or not.[^code] The rest of the project's structure is organized chaos, and understanding it is daunting at first. ### Experimental/Stable @@ -183,7 +183,7 @@ As a classic example, when we first added the mod inclusion criteria and set a b ### Realism as a design goal -Any prospective contributor should understand that we do not consider realism to be the goal of the design. Rather, we are aiming for *verisimilitude*. That is to say, most of the time, things should work the way you would expect them to work.[^movies] Many things that would be more realistic may be nixed because of problems with play experience or play balance. You can find a lot more detail about this in [the design document](./Lore/design-balance.md). +Any prospective contributor should understand that we do not consider realism to be the goal of the design. Rather, we are aiming for *verisimilitude*. That is to say, most of the time, things should work the way you would expect them to work.[^movies] Many things that would be more realistic may be nixed because of problems with play experience or play balance. You can find a lot more detail about this in [the design document](./design-balance-lore/design-balance.md). In general, the most common citation of "realism" online comes when glitches in experimental are mistaken for intended design. An example was when `charges` were being removed as a part of a major *code infrastructure change* with no intended player impact at all. This caused several months of glitches, like players having to move salt in individual pinches. This was frequently called a "realism change", not a bug, in certain circles. While funny, this attitude can be actively harmful to the project, deterring people from fixing bugs because they get the impression it's intended play. If someone has said that a seemingly hostile and illogical game mechanic is the way it is due to "realism", they're probably wrong, either because the mechanic is bugged or because QoL improvements are desired to make it less frustrating. diff --git a/doc/COLOR.md b/doc/user-guides/COLOR.md similarity index 100% rename from doc/COLOR.md rename to doc/user-guides/COLOR.md diff --git a/doc/FONT_OPTIONS.md b/doc/user-guides/FONT_OPTIONS.md similarity index 100% rename from doc/FONT_OPTIONS.md rename to doc/user-guides/FONT_OPTIONS.md diff --git a/lang/string_extractor/parsers/bionic.py b/lang/string_extractor/parsers/bionic.py index 1eb724d0808d5..ebe186e3f2c53 100644 --- a/lang/string_extractor/parsers/bionic.py +++ b/lang/string_extractor/parsers/bionic.py @@ -1,3 +1,4 @@ +from .enchant import parse_enchant from ..helper import get_singular_name from ..write_text import write_text @@ -11,3 +12,7 @@ def parse_bionic(json, origin): if "description" in json: write_text(json["description"], origin, c_format=False, comment="Description of bionic \"{}\"".format(name)) + + if "enchantments" in json: + for enchantment in json["enchantments"]: + parse_enchant(enchantment, origin) diff --git a/lang/string_extractor/parsers/effect_type.py b/lang/string_extractor/parsers/effect_type.py index 40a0add71cb0a..841397a8edeb3 100644 --- a/lang/string_extractor/parsers/effect_type.py +++ b/lang/string_extractor/parsers/effect_type.py @@ -1,3 +1,4 @@ +from .enchant import parse_enchant from ..helper import get_singular_name from ..write_text import write_text @@ -101,3 +102,7 @@ def parse_effect_type(json, origin): write_text(json["blood_analysis_description"], origin, comment="Blood analysis description of effect type \"{}\"" .format(effect_name)) + + if "enchantments" in json: + for enchantment in json["enchantments"]: + parse_enchant(enchantment, origin) diff --git a/lang/string_extractor/parsers/enchant.py b/lang/string_extractor/parsers/enchant.py index e4077d949cab1..42d34979544b5 100644 --- a/lang/string_extractor/parsers/enchant.py +++ b/lang/string_extractor/parsers/enchant.py @@ -15,3 +15,17 @@ def parse_enchant(json, origin): if "hit_me_effect" in json: parse_effect(json["hit_me_effect"], origin) + + if "special_vision" in json: + for vision in json["special_vision"]: + if "descriptions" in vision: + for description in vision["descriptions"]: + parse_description(description, origin) + + +def parse_description(description, origin): + if "text" in description: + special_vision_id = description["id"] + write_text(description["text"], origin, + comment="Description of creature revealed by special " + "vision \"{}\"".format(special_vision_id)) diff --git a/lang/string_extractor/parsers/generic.py b/lang/string_extractor/parsers/generic.py index 2e853cd1393ac..6cf555655645d 100644 --- a/lang/string_extractor/parsers/generic.py +++ b/lang/string_extractor/parsers/generic.py @@ -1,3 +1,4 @@ +from .enchant import parse_enchant from ..helper import get_singular_name from .use_action import parse_use_action from ..write_text import write_text @@ -70,3 +71,7 @@ def parse_generic(json, origin): write_text(pocket["name"], origin, comment="Brief name of a pocket in item \"{}\"" .format(name)) + + if "relic_data" in json and "passive_effects" in json["relic_data"]: + for enchantment in json["relic_data"]["passive_effects"]: + parse_enchant(enchantment, origin) diff --git a/lang/string_extractor/parsers/mutation.py b/lang/string_extractor/parsers/mutation.py index d5933ee63c5f9..82043b97afcfc 100644 --- a/lang/string_extractor/parsers/mutation.py +++ b/lang/string_extractor/parsers/mutation.py @@ -1,3 +1,4 @@ +from .enchant import parse_enchant from ..helper import get_singular_name from ..write_text import write_text @@ -65,3 +66,7 @@ def parse_mutation(json, origin): comment="Message when transforming from mutation " " \"{}\" to \"{}\"" .format(name, json["transform"]["target"])) + + if "enchantments" in json: + for enchantment in json["enchantments"]: + parse_enchant(enchantment, origin) diff --git a/lang/strip_line_numbers.py b/lang/strip_line_numbers.py index 40e8d8cf7126f..06a2f4cf58e61 100755 --- a/lang/strip_line_numbers.py +++ b/lang/strip_line_numbers.py @@ -19,7 +19,7 @@ def strip_pot_file(filename): except IOError as read_exc: print(read_exc) sys.exit(1) - assert(len(to_write) > 1) # Wrong .pot file + assert len(to_write) > 1 # Wrong .pot file to_write = strip_line_numbers(to_write) to_write = strip_repeated_comments(to_write) diff --git a/msvc-full-features/Cataclysm-common.props b/msvc-full-features/Cataclysm-common.props index 424957c60994f..af9a5518883ca 100644 --- a/msvc-full-features/Cataclysm-common.props +++ b/msvc-full-features/Cataclysm-common.props @@ -113,8 +113,6 @@ freetype$(VcpkgLibSuffix).lib; jpeg.lib; libpng16$(VcpkgLibSuffix).lib; - libwavpack.lib; - libxmp-static.lib; modplug.lib; mpg123.lib; ogg.lib; diff --git a/msvc-full-features/vcpkg.json b/msvc-full-features/vcpkg.json index 3da3ddb9ab313..afd4fcbbe611a 100644 --- a/msvc-full-features/vcpkg.json +++ b/msvc-full-features/vcpkg.json @@ -2,7 +2,10 @@ "name": "cdda-vcpkg-dependencies", "version-string": "0.I", "dependencies": [ - "sdl2", + { + "name": "sdl2", + "version>=": "2.26.4#0" + }, { "name": "sdl2-image", "features": [ "libjpeg-turbo" ] @@ -12,6 +15,10 @@ "features": [ "libflac", "mpg123", "libmodplug" ] }, "sdl2-ttf", - "pdcurses" - ] + { + "name": "pdcurses", + "version>=": "3.9#4" + } + ], + "builtin-baseline": "3acb7541e854452d33f71037a8f63a88899e63d3" } diff --git a/src/action.cpp b/src/action.cpp index e6ff2a97b4a9c..f32ae76a924ac 100644 --- a/src/action.cpp +++ b/src/action.cpp @@ -590,12 +590,7 @@ action_id get_movement_action_from_delta( const tripoint_rel_ms &d, const iso_ro return ACTION_NULL; } -point get_delta_from_movement_action( const action_id act, const iso_rotate rot ) -{ - return get_delta_from_movement_action_rel_ms( act, rot ).raw(); -} - -point_rel_ms get_delta_from_movement_action_rel_ms( const action_id act, const iso_rotate rot ) +point_rel_ms get_delta_from_movement_action( const action_id act, const iso_rotate rot ) { const bool iso_mode = rot == iso_rotate::yes && g->is_tileset_isometric(); switch( act ) { @@ -1112,17 +1107,7 @@ action_id handle_main_menu() } } -std::optional choose_direction( const std::string &message, const bool allow_vertical ) -{ - std::optional ret = choose_direction_rel_ms( message, allow_vertical ); - if( ret.has_value() ) { - return ret->raw(); - } else { - return std::nullopt; - } -} - -std::optional choose_direction_rel_ms( const std::string &message, +std::optional choose_direction( const std::string &message, const bool allow_vertical, const bool allow_mouse, const int timeout, const std::function>( const input_context &ctxt, const std::string &action )> &action_cb ) @@ -1193,41 +1178,18 @@ std::optional choose_direction_rel_ms( const std::string &messa return std::nullopt; } -std::optional choose_adjacent( const std::string &message, const bool allow_vertical ) -{ - const std::optional temp = choose_adjacent( get_player_character().pos_bub(), - message, allow_vertical ); - std::optional result; - if( temp.has_value() ) { - result = temp.value().raw(); - } - return result; -} - -std::optional choose_adjacent_bub( const std::string &message, +std::optional choose_adjacent( const std::string &message, const bool allow_vertical ) { return choose_adjacent( get_player_character().pos_bub(), message, allow_vertical ); } -std::optional choose_adjacent( const tripoint &pos, const std::string &message, - bool allow_vertical ) -{ - const std::optional dir = choose_adjacent( - tripoint_bub_ms( pos ), message, allow_vertical ); - if( dir.has_value() ) { - return dir->raw(); - } else { - return std::nullopt; - } -} - std::optional choose_adjacent( const tripoint_bub_ms &pos, const std::string &message, bool allow_vertical, int timeout, const std::function>( const input_context &ctxt, const std::string &action )> &action_cb ) { - const std::optional dir = choose_direction_rel_ms( + const std::optional dir = choose_direction( message, allow_vertical, /*allow_mouse=*/true, timeout, [&]( const input_context & ctxt, const std::string & action ) { if( action == "SELECT" ) { diff --git a/src/action.h b/src/action.h index ebc776d6de3d7..703fdad44a47f 100644 --- a/src/action.h +++ b/src/action.h @@ -476,12 +476,7 @@ bool can_action_change_worldstate( action_id act ); * exits with the return value set to the tripoint, or std::nullopt * if the tripoint is not a valid adjacent location. */ -// TODO: Get rid of untyped overload and rename _bub when the profile is free. -std::optional choose_adjacent( const std::string &message, bool allow_vertical = false ); -std::optional choose_adjacent_bub( const std::string &message, - bool allow_vertical = false ); -// TODO: Get rid of untyped overload. -std::optional choose_adjacent( const tripoint &pos, const std::string &message, +std::optional choose_adjacent( const std::string &message, bool allow_vertical = false ); std::optional choose_adjacent( const tripoint_bub_ms &pos, const std::string &message, bool allow_vertical = false, int timeout = 50, @@ -509,10 +504,7 @@ std::optional choose_adjacent( const tripoint_bub_ms &pos, * exits with the return value set to the tripoint, or std::nullopt * if the tripoint is not a valid direction. */ -// TODO: Get rid of untyped version and typed name extension. -std::optional choose_direction( const std::string &message, - bool allow_vertical = false ); -std::optional choose_direction_rel_ms( const std::string &message, +std::optional choose_direction( const std::string &message, bool allow_vertical = false, bool allow_mouse = false, int timeout = 50, const std::function>( const input_context &ctxt, const std::string &action )> &action_cb = nullptr ); @@ -597,9 +589,7 @@ enum class iso_rotate : int { action_id get_movement_action_from_delta( const tripoint_rel_ms &d, iso_rotate rot ); // Helper function to convert movement action to coordinate delta point -// TODO: Remove untyped overload and rename typed version. -point get_delta_from_movement_action( action_id act, iso_rotate rot ); -point_rel_ms get_delta_from_movement_action_rel_ms( action_id act, iso_rotate rot ); +point_rel_ms get_delta_from_movement_action( action_id act, iso_rotate rot ); /** * Show the action menu diff --git a/src/activity_actor.cpp b/src/activity_actor.cpp index 13da93f052e3f..17cb7dae1f358 100644 --- a/src/activity_actor.cpp +++ b/src/activity_actor.cpp @@ -892,7 +892,7 @@ static hack_type get_hack_type( const tripoint_bub_ms &examp ) void hacking_activity_actor::finish( player_activity &act, Character &who ) { - tripoint_bub_ms examp = get_map().bub_from_abs( act.placement ); + tripoint_bub_ms examp = get_map().get_bub( act.placement ); hack_type type = get_hack_type( examp ); switch( hack_attempt( who, tool ) ) { case hack_result::UNABLE: @@ -1270,7 +1270,7 @@ void hotwire_car_activity_actor::do_turn( player_activity &act, Character &who ) { map &here = get_map(); if( calendar::once_every( 1_minutes ) ) { - bool lost = !here.veh_at( here.bub_from_abs( target ) ).has_value(); + bool lost = !here.veh_at( here.get_bub( target ) ).has_value(); if( lost ) { act.set_to_null(); debugmsg( "Lost ACT_HOTWIRE_CAR target vehicle" ); @@ -1286,7 +1286,7 @@ void hotwire_car_activity_actor::finish( player_activity &act, Character &who ) act.set_to_null(); map &here = get_map(); - const optional_vpart_position vp = here.veh_at( here.bub_from_abs( target ) ); + const optional_vpart_position vp = here.veh_at( here.get_bub( target ) ); if( !vp ) { debugmsg( "Lost ACT_HOTWIRE_CAR target vehicle" ); return; @@ -2804,7 +2804,7 @@ void lockpick_activity_actor::finish( player_activity &act, Character &who ) } map &here = get_map(); - const tripoint_bub_ms target = here.bub_from_abs( this->target ); + const tripoint_bub_ms target = here.get_bub( this->target ); const ter_id &ter_type = here.ter( target ); const furn_id &furn_type = here.furn( target ); optional_vpart_position const veh = here.veh_at( target ); @@ -5024,7 +5024,7 @@ void milk_activity_actor::do_turn( player_activity &act, Character &who ) return; } map &here = get_map(); - const tripoint_bub_ms source_pos = here.bub_from_abs( tripoint_abs_ms( monster_coords.at( 0 ) ) ); + const tripoint_bub_ms source_pos = here.get_bub( tripoint_abs_ms( monster_coords.at( 0 ) ) ); monster *source_mon = get_creature_tracker().creature_at( source_pos ); if( source_mon == nullptr ) { // We might end up here if the creature dies while being milked @@ -5041,7 +5041,7 @@ void milk_activity_actor::finish( player_activity &act, Character &who ) return; } map &here = get_map(); - const tripoint_bub_ms source_pos = here.bub_from_abs( tripoint_abs_ms( monster_coords.at( 0 ) ) ); + const tripoint_bub_ms source_pos = here.get_bub( tripoint_abs_ms( monster_coords.at( 0 ) ) ); monster *source_mon = get_creature_tracker().creature_at( source_pos ); if( source_mon == nullptr ) { debugmsg( "could not find source creature for liquid transfer" ); @@ -6397,10 +6397,10 @@ static void chop_single_do_turn( player_activity &act ) { const map &here = get_map(); sfx::play_activity_sound( "tool", "axe", - sfx::get_heard_volume( here.bub_from_abs( act.placement ) ) ); + sfx::get_heard_volume( here.get_bub( act.placement ) ) ); if( calendar::once_every( 1_minutes ) ) { //~ Sound of a wood chopping tool at work! - sounds::sound( here.bub_from_abs( act.placement ), 15, sounds::sound_t::activity, _( "CHK!" ) ); + sounds::sound( here.get_bub( act.placement ), 15, sounds::sound_t::activity, _( "CHK!" ) ); } } @@ -6418,7 +6418,7 @@ void chop_logs_activity_actor::do_turn( player_activity &act, Character & ) void chop_logs_activity_actor::finish( player_activity &act, Character &who ) { map &here = get_map(); - const tripoint_bub_ms &pos = here.bub_from_abs( act.placement ); + const tripoint_bub_ms &pos = here.get_bub( act.placement ); int log_quan; int stick_quan; int splint_quan; @@ -6502,12 +6502,12 @@ void chop_planks_activity_actor::finish( player_activity &act, Character &who ) map &here = get_map(); if( planks > 0 ) { - here.spawn_item( here.bub_from_abs( act.placement ), itype_2x4, planks, 0, calendar::turn ); + here.spawn_item( here.get_bub( act.placement ), itype_2x4, planks, 0, calendar::turn ); who.add_msg_if_player( m_good, n_gettext( "You produce %d plank.", "You produce %d planks.", planks ), planks ); } if( scraps > 0 ) { - here.spawn_item( here.bub_from_abs( act.placement ), itype_splinter, scraps, 0, calendar::turn ); + here.spawn_item( here.get_bub( act.placement ), itype_splinter, scraps, 0, calendar::turn ); who.add_msg_if_player( m_good, n_gettext( "You produce %d splinter.", "You produce %d splinters.", scraps ), scraps ); } @@ -6552,13 +6552,13 @@ void chop_tree_activity_actor::do_turn( player_activity &act, Character & ) void chop_tree_activity_actor::finish( player_activity &act, Character &who ) { map &here = get_map(); - const tripoint_bub_ms &pos = here.bub_from_abs( act.placement ); + const tripoint_bub_ms &pos = here.get_bub( act.placement ); tripoint_rel_ms direction; if( !who.is_npc() && ( who.backlog.empty() || who.backlog.front().id() != ACT_MULTIPLE_CHOP_TREES ) ) { while( true ) { - if( const std::optional dir = choose_direction_rel_ms( + if( const std::optional dir = choose_direction( _( "Select a direction for the tree to fall in." ) ) ) { direction = *dir; break; @@ -6612,7 +6612,7 @@ void chop_tree_activity_actor::finish( player_activity &act, Character &who ) // sound of falling tree here.collapse_at( pos, false, true, false ); sfx::play_variant_sound( "misc", "timber", - sfx::get_heard_volume( here.bub_from_abs( act.placement ) ) ); + sfx::get_heard_volume( here.get_bub( act.placement ) ) ); get_event_bus().send( who.getID() ); act.set_to_null(); activity_handlers::resume_for_multi_activities( who ); @@ -6650,7 +6650,7 @@ void churn_activity_actor::finish( player_activity &act, Character &who ) { map &here = get_map(); who.add_msg_if_player( _( "You finish churning up the earth here." ) ); - here.ter_set( here.bub_from_abs( act.placement ), ter_t_dirtmound ); + here.ter_set( here.get_bub( act.placement ), ter_t_dirtmound ); // Go back to what we were doing before // could be player zone activity, or could be NPC multi-farming act.set_to_null(); @@ -6688,7 +6688,7 @@ void clear_rubble_activity_actor::start( player_activity &act, Character & ) void clear_rubble_activity_actor::finish( player_activity &act, Character &who ) { map &here = get_map(); - const tripoint_bub_ms &pos = here.bub_from_abs( act.placement ); + const tripoint_bub_ms &pos = here.get_bub( act.placement ); who.add_msg_if_player( m_info, _( "You clear up the %s." ), here.furnname( pos ) ); here.furn_set( pos, furn_str_id::NULL_ID() ); @@ -6832,8 +6832,7 @@ void forage_activity_actor::finish( player_activity &act, Character &who ) bool next_to_bush = false; map &here = get_map(); for( const tripoint_bub_ms &pnt : here.points_in_radius( who.pos_bub(), 1 ) ) { - // TODO: fix point types - if( here.getglobal( pnt ) == act.placement ) { + if( here.get_abs( pnt ) == act.placement ) { next_to_bush = true; break; } @@ -6871,7 +6870,7 @@ void forage_activity_actor::finish( player_activity &act, Character &who ) debugmsg( "Invalid season" ); } - const tripoint_bub_ms bush_pos = here.bub_from_abs( act.placement ); + const tripoint_bub_ms bush_pos = here.get_bub( act.placement ); here.ter_set( bush_pos, next_ter ); // Survival gives a bigger boost, and Perception is leveled a bit. @@ -7111,7 +7110,7 @@ void mop_activity_actor::finish( player_activity &act, Character &who ) const bool will_mop = one_in( who.is_blind() ? 1 : 3 ); if( will_mop ) { map &here = get_map(); - here.mop_spills( here.bub_from_abs( act.placement ) ); + here.mop_spills( here.get_bub( act.placement ) ); } activity_handlers::resume_for_multi_activities( who ); } @@ -7265,7 +7264,7 @@ void unload_loot_activity_actor::do_turn( player_activity &act, Character &you ) placement = src; coord_set.erase( src ); - const tripoint_bub_ms &src_loc = here.bub_from_abs( src ); + const tripoint_bub_ms &src_loc = here.get_bub( src ); if( !here.inbounds( src_loc ) ) { if( !here.inbounds( you.pos_bub() ) ) { // p is implicitly an NPC that has been moved off the map, so reset the activity @@ -7349,9 +7348,8 @@ void unload_loot_activity_actor::do_turn( player_activity &act, Character &you ) } } if( stage == DO ) { - // TODO: fix point types const tripoint_abs_ms src( placement ); - const tripoint_bub_ms src_loc = here.bub_from_abs( src ); + const tripoint_bub_ms src_loc = here.get_bub( src ); bool is_adjacent_or_closer = square_dist( you.pos_bub(), src_loc ) <= 1; // before we move any item, check if player is at or @@ -8037,7 +8035,7 @@ void pulp_activity_actor::do_turn( player_activity &act, Character &you ) int moves = 0; for( auto pos_iter = placement.cbegin(); pos_iter != placement.end();/*left - out*/ ) { - const tripoint_bub_ms &pos = here.bub_from_abs( *pos_iter ); + const tripoint_bub_ms &pos = here.get_bub( *pos_iter ); map_stack corpse_pile = here.i_at( pos ); for( item &corpse : corpse_pile ) { if( !corpse.is_corpse() || !corpse.can_revive() ) { diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp index f692651977750..9d41ae1b0007b 100644 --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp @@ -1605,7 +1605,7 @@ void activity_handlers::fill_liquid_do_turn( player_activity *act, Character *yo // 1. Gather the source item. vehicle *source_veh = nullptr; map &here = get_map(); - const tripoint_bub_ms source_pos = here.bub_from_abs( act_ref.coords.at( 0 ) ); + const tripoint_bub_ms source_pos = here.get_bub( act_ref.coords.at( 0 ) ); map_stack source_stack = here.i_at( source_pos ); map_stack::iterator on_ground; monster *source_mon = nullptr; @@ -1661,7 +1661,7 @@ void activity_handlers::fill_liquid_do_turn( player_activity *act, Character *yo size_t part; switch( static_cast( act_ref.values.at( 2 ) ) ) { case liquid_target_type::VEHICLE: { - const optional_vpart_position vp = here.veh_at( here.bub_from_abs( act_ref.coords.at( 1 ) ) ); + const optional_vpart_position vp = here.veh_at( here.get_bub( act_ref.coords.at( 1 ) ) ); if( act_ref.values.size() > 4 && vp ) { const vpart_reference vpr( vp->vehicle(), act_ref.values[4] ); veh = &vp->vehicle(); @@ -1686,10 +1686,10 @@ void activity_handlers::fill_liquid_do_turn( player_activity *act, Character *yo you->pour_into( act_ref.targets.at( 0 ), liquid, true ); break; case liquid_target_type::MAP: - if( iexamine::has_keg( here.bub_from_abs( act_ref.coords.at( 1 ) ) ) ) { - iexamine::pour_into_keg( here.bub_from_abs( act_ref.coords.at( 1 ) ), liquid ); + if( iexamine::has_keg( here.get_bub( act_ref.coords.at( 1 ) ) ) ) { + iexamine::pour_into_keg( here.get_bub( act_ref.coords.at( 1 ) ), liquid ); } else { - here.add_item_or_charges( here.bub_from_abs( act_ref.coords.at( 1 ) ), liquid ); + here.add_item_or_charges( here.get_bub( act_ref.coords.at( 1 ) ), liquid ); you->add_msg_if_player( _( "You pour %1$s onto the ground." ), liquid.tname() ); liquid.charges = 0; } @@ -1856,7 +1856,7 @@ void activity_handlers::game_do_turn( player_activity *act, Character *you ) void activity_handlers::pickaxe_do_turn( player_activity *act, Character * ) { - const tripoint_bub_ms &pos = get_map().bub_from_abs( act->placement ); + const tripoint_bub_ms &pos = get_map().get_bub( act->placement ); sfx::play_activity_sound( "tool", "pickaxe", sfx::get_heard_volume( pos ) ); // each turn is too much if( calendar::once_every( 1_minutes ) ) { @@ -1868,7 +1868,7 @@ void activity_handlers::pickaxe_do_turn( player_activity *act, Character * ) void activity_handlers::pickaxe_finish( player_activity *act, Character *you ) { map &here = get_map(); - const tripoint_bub_ms pos( here.bub_from_abs( act->placement ) ); + const tripoint_bub_ms pos( here.get_bub( act->placement ) ); // Invalidate the activity early to prevent a query from mod_pain() act->set_to_null(); if( you->is_avatar() ) { @@ -1928,14 +1928,14 @@ void activity_handlers::start_fire_finish( player_activity *act, Character *you you->practice( skill_survival, act->index, 5 ); - firestarter_actor::resolve_firestarter_use( you, get_map().bub_from_abs( act->placement ) ); + firestarter_actor::resolve_firestarter_use( you, get_map().get_bub( act->placement ) ); act->set_to_null(); } void activity_handlers::start_fire_do_turn( player_activity *act, Character *you ) { map &here = get_map(); - tripoint_bub_ms where = here.bub_from_abs( act->placement ); + tripoint_bub_ms where = here.get_bub( act->placement ); if( !here.is_flammable( where ) ) { try_fuel_fire( *act, *you, true ); if( !here.is_flammable( where ) ) { @@ -2142,7 +2142,7 @@ void activity_handlers::vehicle_finish( player_activity *act, Character *you ) { map &here = get_map(); //Grab this now, in case the vehicle gets shifted - const optional_vpart_position vp = here.veh_at( here.bub_from_abs( tripoint_abs_ms( act->values[0], + const optional_vpart_position vp = here.veh_at( here.get_bub( tripoint_abs_ms( act->values[0], act->values[1], you->posz() ) ) ); veh_interact::complete_vehicle( *you ); @@ -2397,7 +2397,7 @@ struct weldrig_hack { } const map &here = get_map(); - const optional_vpart_position vp = here.veh_at( here.bub_from_abs( act.coords[0] ) ); + const optional_vpart_position vp = here.veh_at( here.get_bub( act.coords[0] ) ); if( !vp ) { return false; } @@ -2886,7 +2886,7 @@ void activity_handlers::travel_do_turn( player_activity *act, Character *you ) waypoint = clamp( cur_omt_mid, project_bounds( next_omt ) ); } map &here = get_map(); - tripoint_bub_ms centre_sub = here.bub_from_abs( waypoint ); + tripoint_bub_ms centre_sub = here.get_bub( waypoint ); if( !here.passable( centre_sub ) ) { tripoint_range candidates = here.points_in_radius( centre_sub, 2 ); for( const tripoint_bub_ms &elem : candidates ) { @@ -3300,7 +3300,7 @@ void activity_handlers::operation_finish( player_activity *act, Character *you ) void activity_handlers::plant_seed_finish( player_activity *act, Character *you ) { map &here = get_map(); - tripoint_bub_ms examp = here.bub_from_abs( act->placement ); + tripoint_bub_ms examp = here.get_bub( act->placement ); const itype_id seed_id( act->str_values[0] ); std::list used_seed; if( item::count_by_charges( seed_id ) ) { @@ -3334,7 +3334,7 @@ void activity_handlers::plant_seed_finish( player_activity *act, Character *you void activity_handlers::build_do_turn( player_activity *act, Character *you ) { map &here = get_map(); - partial_con *pc = here.partial_con_at( here.bub_from_abs( act->placement ) ); + partial_con *pc = here.partial_con_at( here.get_bub( act->placement ) ); // Maybe the player and the NPC are working on the same construction at the same time if( !pc ) { if( you->is_npc() ) { @@ -3375,7 +3375,7 @@ void activity_handlers::build_do_turn( player_activity *act, Character *you ) const double current_progress = old_counter * base_total_moves / 10000000.0 + delta_progress; you->set_moves( 0 ); - pc->id->do_turn_special( here.bub_from_abs( act->placement ), *you ); + pc->id->do_turn_special( here.get_bub( act->placement ), *you ); // Current progress as a percent of base_total_moves to 2 decimal places pc->counter = std::round( current_progress / base_total_moves * 10000000.0 ); pc->counter = std::min( pc->counter, 10000000 ); @@ -3485,9 +3485,9 @@ void activity_handlers::jackhammer_do_turn( player_activity *act, Character * ) { map &here = get_map(); sfx::play_activity_sound( "tool", "jackhammer", - sfx::get_heard_volume( here.bub_from_abs( act->placement ) ) ); + sfx::get_heard_volume( here.get_bub( act->placement ) ) ); if( calendar::once_every( 1_minutes ) ) { - sounds::sound( here.bub_from_abs( act->placement ), 15, sounds::sound_t::destructive_activity, + sounds::sound( here.get_bub( act->placement ), 15, sounds::sound_t::destructive_activity, //~ Sound of a jackhammer at work! _( "TATATATATATATAT!" ) ); } @@ -3496,7 +3496,7 @@ void activity_handlers::jackhammer_do_turn( player_activity *act, Character * ) void activity_handlers::jackhammer_finish( player_activity *act, Character *you ) { map &here = get_map(); - const tripoint_bub_ms &pos = here.bub_from_abs( act->placement ); + const tripoint_bub_ms &pos = here.get_bub( act->placement ); here.destroy( pos, true ); @@ -3525,7 +3525,7 @@ static void cleanup_tiles( std::unordered_set &tiles, fn &clean while( it != tiles.end() ) { auto current = it++; - const tripoint_bub_ms &tile_loc = here.bub_from_abs( *current ); + const tripoint_bub_ms &tile_loc = here.get_bub( *current ); if( cleanup( tile_loc ) ) { tiles.erase( current ); @@ -3551,7 +3551,7 @@ static void perform_zone_activity_turn( get_sorted_tiles_by_distance( abspos, unsorted_tiles ); for( const tripoint_abs_ms &tile : tiles ) { - const tripoint_bub_ms &tile_loc = here.bub_from_abs( tile ); + const tripoint_bub_ms &tile_loc = here.get_bub( tile ); std::vector route = here.route( you->pos_bub(), tile_loc, you->get_pathfinding_settings(), @@ -3602,7 +3602,6 @@ void activity_handlers::fertilize_plot_do_turn( player_activity *act, Character const auto reject_tile = [&]( const tripoint_bub_ms & tile ) { check_fertilizer(); - // TODO: fix point types ret_val can_fert = iexamine::can_fertilize( *you, tile, fertilizer ); return !can_fert.success(); }; @@ -3610,7 +3609,6 @@ void activity_handlers::fertilize_plot_do_turn( player_activity *act, Character const auto fertilize = [&]( Character & you, const tripoint_bub_ms & tile ) { check_fertilizer(); if( have_fertilizer() ) { - // TODO: fix point types iexamine::fertilize_plant( you, tile, fertilizer ); if( !have_fertilizer() ) { add_msg( m_info, _( "You have run out of %s." ), item::nname( fertilizer ) ); @@ -3716,8 +3714,7 @@ void activity_handlers::pull_creature_finish( player_activity *act, Character *y if( you->is_avatar() ) { you->as_avatar()->longpull( act->name ); } else { - // TODO: fix point types - you->longpull( act->name, get_map().bub_from_abs( act->placement ) ); + you->longpull( act->name, get_map().get_bub( act->placement ) ); } act->set_to_null(); } @@ -3833,7 +3830,7 @@ void activity_handlers::spellcasting_finish( player_activity *act, Character *yo // choose target for spell before continuing const std::optional target = act->coords.empty() ? spell_being_cast.select_target( - you ) : get_map().bub_from_abs( act->coords.front() ); + you ) : get_map().get_bub( act->coords.front() ); if( target ) { // npcs check for target viability if( !you->is_npc() || spell_being_cast.is_valid_target( *you, *target ) ) { diff --git a/src/activity_item_handling.cpp b/src/activity_item_handling.cpp index 86825c336b719..8956b8d5aeec7 100644 --- a/src/activity_item_handling.cpp +++ b/src/activity_item_handling.cpp @@ -590,12 +590,12 @@ static bool vehicle_activity( Character &you, const tripoint_bub_ms &src_loc, in // for someone else who stored that position at the start of their activity. // so we may need to go looking a bit further afield to find it , at activities end. for( const tripoint_bub_ms &pt : veh->get_points( true ) ) { - you.activity.coord_set.insert( here.getglobal( pt ) ); + you.activity.coord_set.insert( here.get_abs( pt ) ); } // values[0] - you.activity.values.push_back( here.getglobal( src_loc ).x() ); + you.activity.values.push_back( here.get_abs( src_loc ).x() ); // values[1] - you.activity.values.push_back( here.getglobal( src_loc ).y() ); + you.activity.values.push_back( here.get_abs( src_loc ).y() ); // values[2] you.activity.values.push_back( point::zero.x ); // values[3] @@ -611,7 +611,7 @@ static bool vehicle_activity( Character &you, const tripoint_bub_ms &src_loc, in // this would only be used for refilling tasks item_location target; you.activity.targets.emplace_back( std::move( target ) ); - you.activity.placement = here.getglobal( src_loc ); + you.activity.placement = here.get_abs( src_loc ); you.activity_vehicle_part_index = -1; return true; } @@ -953,7 +953,7 @@ static bool are_requirements_nearby( // skip tiles in IGNORE zone and tiles on fire // (to prevent taking out wood off the lit brazier) // and inaccessible furniture, like filled charcoal kiln - if( mgr.has( zone_type_LOOT_IGNORE, here.getglobal( elem ), _fac_id( you ) ) || + if( mgr.has( zone_type_LOOT_IGNORE, here.get_abs( elem ), _fac_id( you ) ) || here.dangerous_field_at( elem ) || !here.can_put_items_ter_furn( elem ) ) { continue; @@ -1035,11 +1035,11 @@ static activity_reason_info can_do_activity_there( const activity_id &act, Chara tripoint_bub_ms guy_work_spot; if( guy.has_player_activity() && guy.activity.placement != player_activity::invalid_place ) { - guy_work_spot = here.bub_from_abs( guy.activity.placement ); + guy_work_spot = here.get_bub( guy.activity.placement ); } // If their position or intended position or player position/intended position // then discount, don't need to move each other out of the way. - if( here.bub_from_abs( player_character.activity.placement ) == src_loc || + if( here.get_bub( player_character.activity.placement ) == src_loc || guy_work_spot == src_loc || guy.pos_bub() == src_loc || ( you.is_npc() && player_character.pos_bub() == src_loc ) ) { return activity_reason_info::fail( do_activity_reason::ALREADY_WORKING ); @@ -1057,7 +1057,6 @@ static activity_reason_info can_do_activity_there( const activity_id &act, Chara } if( act == ACT_VEHICLE_DECONSTRUCTION ) { // find out if there is a vehicle part here we can remove. - // TODO: fix point types std::vector parts = veh->get_parts_at( src_loc, "", part_status_flag::any ); for( vehicle_part *part_elem : parts ) { @@ -1081,7 +1080,6 @@ static activity_reason_info can_do_activity_there( const activity_id &act, Chara continue; } item base( vpinfo.base_item ); - // TODO: fix point types const units::mass max_lift = you.best_nearby_lifting_assist( src_loc ); const bool use_aid = max_lift >= base.weight(); const bool use_str = you.can_lift( base ); @@ -1103,7 +1101,6 @@ static activity_reason_info can_do_activity_there( const activity_id &act, Chara } } else if( act == ACT_VEHICLE_REPAIR ) { // find out if there is a vehicle part here we can repair. - // TODO: fix point types std::vector parts = veh->get_parts_at( src_loc, "", part_status_flag::any ); for( vehicle_part *part_elem : parts ) { const vpart_info &vpinfo = part_elem->info(); @@ -1126,7 +1123,6 @@ static activity_reason_info can_do_activity_there( const activity_id &act, Chara continue; } const requirement_data &reqs = vpinfo.repair_requirements(); - // TODO: fix point types const inventory &inv = you.crafting_inventory( src_loc, PICKUP_RANGE - 1, false ); const bool can_make = reqs.can_make_with_inventory( inv, is_crafting_component ); @@ -1276,15 +1272,15 @@ static activity_reason_info can_do_activity_there( const activity_id &act, Chara return activity_reason_info::fail( do_activity_reason::NO_ZONE ); } if( act == ACT_TIDY_UP ) { - if( mgr.has_near( zone_type_LOOT_UNSORTED, here.getglobal( src_loc ), distance, _fac_id( you ) ) || - mgr.has_near( zone_type_CAMP_STORAGE, here.getglobal( src_loc ), distance, _fac_id( you ) ) ) { + if( mgr.has_near( zone_type_LOOT_UNSORTED, here.get_abs( src_loc ), distance, _fac_id( you ) ) || + mgr.has_near( zone_type_CAMP_STORAGE, here.get_abs( src_loc ), distance, _fac_id( you ) ) ) { return activity_reason_info::ok( do_activity_reason::CAN_DO_FETCH ); } return activity_reason_info::fail( do_activity_reason::NO_ZONE ); } if( act == ACT_MULTIPLE_CONSTRUCTION ) { zones = mgr.get_zones( zone_type_CONSTRUCTION_BLUEPRINT, - here.getglobal( src_loc ), _fac_id( you ) ); + here.get_abs( src_loc ), _fac_id( you ) ); const partial_con *part_con = here.partial_con_at( src_loc ); std::optional part_con_idx; if( part_con ) { @@ -1301,7 +1297,6 @@ static activity_reason_info can_do_activity_there( const activity_id &act, Chara } nearest_src_loc = route.back(); } - // TODO: fix point types const inventory pre_inv = you.crafting_inventory( nearest_src_loc, PICKUP_RANGE ); if( !zones.empty() ) { const blueprint_options &options = dynamic_cast @@ -1311,7 +1306,7 @@ static activity_reason_info can_do_activity_there( const activity_id &act, Chara index ); } } else if( act == ACT_MULTIPLE_FARM ) { - zones = mgr.get_zones( zone_type_FARM_PLOT, here.getglobal( src_loc ), _fac_id( you ) ); + zones = mgr.get_zones( zone_type_FARM_PLOT, here.get_abs( src_loc ), _fac_id( you ) ); for( const zone_data &zone : zones ) { const plot_options &options = dynamic_cast( zone.get_options() ); const itype_id seed = options.get_seed(); @@ -1404,7 +1399,6 @@ static activity_reason_info can_do_activity_there( const activity_id &act, Chara return activity_reason_info::fail( do_activity_reason::ALREADY_DONE ); } else if( act == ACT_MULTIPLE_DIS ) { // Is there anything to be disassembled? - // TODO: fix point types const inventory &inv = you.crafting_inventory( src_loc, PICKUP_RANGE, false ); requirement_data req; for( item &i : here.i_at( src_loc ) ) { @@ -1460,13 +1454,13 @@ static void add_basecamp_storage_to_loot_zone_list( if( npc *const guy = dynamic_cast( &you ) ) { map &here = get_map(); if( guy->assigned_camp && - mgr.has_near( zone_type_CAMP_STORAGE, here.getglobal( src_loc ), MAX_VIEW_DISTANCE, + mgr.has_near( zone_type_CAMP_STORAGE, here.get_abs( src_loc ), MAX_VIEW_DISTANCE, _fac_id( you ) ) ) { std::unordered_set bc_storage_set = - mgr.get_near( zone_type_CAMP_STORAGE, here.getglobal( src_loc ), + mgr.get_near( zone_type_CAMP_STORAGE, here.get_abs( src_loc ), MAX_VIEW_DISTANCE, nullptr, _fac_id( you ) ); for( const tripoint_abs_ms &elem : bc_storage_set ) { - tripoint_bub_ms here_local = here.bub_from_abs( elem ); + tripoint_bub_ms here_local = here.get_bub( elem ); // Check that a coordinate is not already in the combined list, otherwise actions // like construction may erroneously count materials twice if an object is both @@ -1511,7 +1505,7 @@ static std::vector> requirements_map( std::vector combined_spots; std::map total_map; map &here = get_map(); - tripoint_bub_ms src_loc = here.bub_from_abs( you.backlog.front().placement ); + tripoint_bub_ms src_loc = here.get_bub( you.backlog.front().placement ); for( const tripoint_bub_ms &elem : here.points_in_radius( src_loc, PICKUP_RANGE - 1 ) ) { already_there_spots.push_back( elem ); @@ -1521,8 +1515,7 @@ static std::vector> requirements_map( you.get_location(), distance, you.is_npc(), _fac_id( you ) ) ) { // if there is a loot zone that's already near the work spot, we don't want it to be added twice. if( std::find( already_there_spots.begin(), already_there_spots.end(), - // TODO: fix point types - tripoint_bub_ms( elem ) ) != already_there_spots.end() ) { + elem ) != already_there_spots.end() ) { // construction tasks don't need the loot spot *and* the already_there/combined spots both added. // but a farming task will need to go and fetch the tool no matter if its near the work spot. // whereas the construction will automatically use what's nearby anyway. @@ -1811,14 +1804,13 @@ static bool construction_activity( Character &you, const zone_data * /*zone*/, } } pc.components = used; - // TODO: fix point types - here.partial_con_set( tripoint_bub_ms( src_loc ), pc ); + here.partial_con_set( src_loc, pc ); for( const std::vector &it : built_chosen.requirements->get_tools() ) { you.consume_tools( it ); } you.backlog.emplace_front( activity_to_restore ); you.assign_activity( ACT_BUILD ); - you.activity.placement = here.getglobal( src_loc ); + you.activity.placement = here.get_abs( src_loc ); return true; } @@ -1828,7 +1820,7 @@ static bool tidy_activity( Character &you, const tripoint_bub_ms &src_loc, { zone_manager &mgr = zone_manager::get_manager(); map &here = get_map(); - tripoint_abs_ms loot_abspos = here.getglobal( src_loc ); + tripoint_abs_ms loot_abspos = here.get_abs( src_loc ); tripoint_bub_ms loot_src_lot; const auto &zone_src_set = mgr.get_near( zone_type_LOOT_UNSORTED, loot_abspos, distance, nullptr, _fac_id( you ) ); @@ -1837,10 +1829,10 @@ static bool tidy_activity( Character &you, const tripoint_bub_ms &src_loc, loot_abspos, zone_src_set ); // Find the nearest unsorted zone to dump objects at for( const tripoint_abs_ms &src_elem : zone_src_sorted ) { - if( !here.can_put_items_ter_furn( here.bub_from_abs( src_elem ) ) ) { + if( !here.can_put_items_ter_furn( here.get_bub( src_elem ) ) ) { continue; } - loot_src_lot = here.bub_from_abs( src_elem ); + loot_src_lot = here.get_bub( src_elem ); break; } } @@ -1855,7 +1847,7 @@ static bool tidy_activity( Character &you, const tripoint_bub_ms &src_loc, _tidy_move_items( you, stack, src_loc, loot_src_lot, std::nullopt, activity_to_restore ); // we are adjacent to an unsorted zone, we came here to just drop items we are carrying - if( mgr.has( zone_type_LOOT_UNSORTED, here.getglobal( src_loc ), _fac_id( you ) ) ) { + if( mgr.has( zone_type_LOOT_UNSORTED, here.get_abs( src_loc ), _fac_id( you ) ) ) { for( item *inv_elem : you.inv_dump() ) { if( inv_elem->has_var( "activity_var" ) ) { inv_elem->erase_var( "activity_var" ); @@ -1872,7 +1864,7 @@ static bool fetch_activity( const int distance = MAX_VIEW_DISTANCE ) { map &here = get_map(); - if( !here.can_put_items_ter_furn( here.bub_from_abs( + if( !here.can_put_items_ter_furn( here.get_bub( you.backlog.front().coords.back() ) ) ) { return false; } @@ -1889,7 +1881,7 @@ static bool fetch_activity( if( std::get<0>( elem ) == src_loc && veh_elem.typeId() == std::get<1>( elem ) ) { if( !you.backlog.empty() && you.backlog.front().id() == ACT_MULTIPLE_CONSTRUCTION ) { move_item( you, veh_elem, veh_elem.count_by_charges() ? std::get<2>( elem ) : 1, src_loc, - here.bub_from_abs( you.backlog.front().coords.back() ), ovp, + here.get_bub( you.backlog.front().coords.back() ), ovp, activity_to_restore ); return true; } @@ -1905,7 +1897,7 @@ static bool fetch_activity( if( !you.backlog.empty() && ( you.backlog.front().id() == ACT_MULTIPLE_CONSTRUCTION || you.backlog.front().id() == ACT_MULTIPLE_DIS ) ) { move_item( you, it, it.count_by_charges() ? std::get<2>( elem ) : 1, src_loc, - here.bub_from_abs( you.backlog.front().coords.back() ), ovp, + here.get_bub( you.backlog.front().coords.back() ), ovp, activity_to_restore ); return true; @@ -1976,7 +1968,7 @@ static bool butcher_corpse_activity( Character &you, const tripoint_bub_ms &src_ elem.set_var( "activity_var", you.name ); you.assign_activity( ACT_BUTCHER_FULL, 0, true ); you.activity.targets.emplace_back( map_cursor( src_loc ), &elem ); - you.activity.placement = here.getglobal( src_loc ); + you.activity.placement = here.get_abs( src_loc ); return true; } } @@ -1999,7 +1991,7 @@ static bool chop_plank_activity( Character &you, const tripoint_bub_ms &src_loc int moves = to_moves( 20_minutes ); you.add_msg_if_player( _( "You cut the log into planks." ) ); you.assign_activity( chop_planks_activity_actor( moves ) ); - you.activity.placement = here.getglobal( src_loc ); + you.activity.placement = here.get_abs( src_loc ); return true; } } @@ -2058,7 +2050,7 @@ void activity_on_turn_move_loot( player_activity &act, Character &you ) act.placement = src; act.coord_set.erase( src ); - const tripoint_bub_ms src_loc = here.bub_from_abs( src ); + const tripoint_bub_ms src_loc = here.get_bub( src ); if( !here.inbounds( src_loc ) ) { if( !here.inbounds( you.pos_bub() ) ) { // p is implicitly an NPC that has been moved off the map, so reset the activity @@ -2163,7 +2155,7 @@ void activity_on_turn_move_loot( player_activity &act, Character &you ) } if( stage == DO ) { const tripoint_abs_ms src( act.placement ); - const tripoint_bub_ms src_loc = here.bub_from_abs( src ); + const tripoint_bub_ms src_loc = here.get_bub( src ); bool is_adjacent_or_closer = square_dist( you.pos_bub(), src_loc ) <= 1; // before we move any item, check if player is at or @@ -2350,7 +2342,7 @@ void activity_on_turn_move_loot( player_activity &act, Character &you ) } for( const tripoint_abs_ms &dest : dest_set ) { - const tripoint_bub_ms dest_loc = here.bub_from_abs( dest ); + const tripoint_bub_ms dest_loc = here.get_bub( dest ); units::volume free_space; //Check destination for cargo part @@ -2454,7 +2446,7 @@ static bool mine_activity( Character &you, const tripoint_bub_ms &src_loc ) } you.assign_activity( powered ? ACT_JACKHAMMER : ACT_PICKAXE, moves ); you.activity.targets.emplace_back( you, chosen_item ); - you.activity.placement = here.getglobal( src_loc ); + you.activity.placement = here.get_abs( src_loc ); return true; } @@ -2464,7 +2456,7 @@ static bool mop_activity( Character &you, const tripoint_bub_ms &src_loc ) { // iuse::mop costs 15 moves per use you.assign_activity( mop_activity_actor( 15 ) ); - you.activity.placement = get_map().getglobal( src_loc ); + you.activity.placement = get_map().get_abs( src_loc ); return true; } @@ -2482,11 +2474,11 @@ static bool chop_tree_activity( Character &you, const tripoint_bub_ms &src_loc ) const ter_id &ter = here.ter( src_loc ); if( here.has_flag( ter_furn_flag::TFLAG_TREE, src_loc ) ) { you.assign_activity( chop_tree_activity_actor( moves, item_location( you, &best_qual ) ) ); - you.activity.placement = here.getglobal( src_loc ); + you.activity.placement = here.get_abs( src_loc ); return true; } else if( ter == ter_t_trunk || ter == ter_t_stump ) { you.assign_activity( chop_logs_activity_actor( moves, item_location( you, &best_qual ) ) ); - you.activity.placement = here.getglobal( src_loc ); + you.activity.placement = here.get_abs( src_loc ); return true; } return false; @@ -2540,7 +2532,7 @@ static zone_type_id get_zone_for_act( const tripoint_bub_ms &src_loc, const zone ret = zone_type_DISASSEMBLE; } if( src_loc != tripoint_bub_ms() && act_id == ACT_FETCH_REQUIRED ) { - const zone_data *zd = mgr.get_zone_at( get_map().getglobal( src_loc ), false, fac_id ); + const zone_data *zd = mgr.get_zone_at( get_map().get_abs( src_loc ), false, fac_id ); if( zd ) { ret = zd->get_type(); } @@ -2559,14 +2551,14 @@ static std::unordered_set generic_multi_activity_locations( zone_manager &mgr = zone_manager::get_manager(); const tripoint_bub_ms localpos = you.pos_bub(); map &here = get_map(); - const tripoint_abs_ms abspos = here.getglobal( localpos ); + const tripoint_abs_ms abspos = here.get_abs( localpos ); if( act_id == ACT_TIDY_UP ) { dark_capable = true; tripoint_bub_ms unsorted_spot; std::unordered_set unsorted_set = mgr.get_near( zone_type_LOOT_UNSORTED, abspos, MAX_VIEW_DISTANCE, nullptr, _fac_id( you ) ); if( !unsorted_set.empty() ) { - unsorted_spot = here.bub_from_abs( random_entry( unsorted_set ) ); + unsorted_spot = here.get_bub( random_entry( unsorted_set ) ); } bool found_one_point = false; bool found_route = true; @@ -2589,7 +2581,7 @@ static std::unordered_set generic_multi_activity_locations( if( stack_elem.has_var( "activity_var" ) && stack_elem.get_var( "activity_var", "" ) == you.name ) { const furn_t &f = here.furn( elem ).obj(); if( !f.has_flag( ter_furn_flag::TFLAG_PLANT ) ) { - src_set.insert( here.getglobal( elem ) ); + src_set.insert( here.get_abs( elem ) ); found_one_point = true; // only check for a valid path, as that is all that is needed to tidy something up. if( square_dist( you.pos_bub(), elem ) > 1 ) { @@ -2607,7 +2599,7 @@ static std::unordered_set generic_multi_activity_locations( for( const item *inv_elem : you.inv_dump() ) { if( inv_elem->has_var( "activity_var" ) ) { // we've gone to tidy up all the things lying around, now tidy up the things we picked up. - src_set.insert( here.getglobal( unsorted_spot ) ); + src_set.insert( here.get_abs( unsorted_spot ) ); break; } } @@ -2615,12 +2607,12 @@ static std::unordered_set generic_multi_activity_locations( } else if( act_id == ACT_MULTIPLE_READ ) { // anywhere well lit for( const tripoint_bub_ms &elem : here.points_in_radius( localpos, MAX_VIEW_DISTANCE ) ) { - src_set.insert( here.getglobal( elem ) ); + src_set.insert( here.get_abs( elem ) ); } } else if( act_id == ACT_MULTIPLE_CRAFT ) { // Craft only with what is on the spot // TODO: add zone type like zone_type_CRAFT? - src_set.insert( here.getglobal( localpos ) ); + src_set.insert( here.get_abs( localpos ) ); } else if( act_id != ACT_FETCH_REQUIRED ) { zone_type_id zone_type = get_zone_for_act( tripoint_bub_ms::zero, mgr, act_id, _fac_id( you ) ); src_set = mgr.get_near( zone_type, abspos, MAX_VIEW_DISTANCE, nullptr, _fac_id( you ) ); @@ -2629,7 +2621,7 @@ static std::unordered_set generic_multi_activity_locations( for( const tripoint_bub_ms &elem : here.points_in_radius( localpos, MAX_VIEW_DISTANCE ) ) { partial_con *pc = here.partial_con_at( elem ); if( pc ) { - src_set.insert( here.getglobal( elem ) ); + src_set.insert( here.get_abs( elem ) ); } } // farming activities encompass tilling, planting, harvesting. @@ -2645,7 +2637,7 @@ static std::unordered_set generic_multi_activity_locations( requirements_map( you, MAX_VIEW_DISTANCE ); for( const auto &elem : mental_map ) { const tripoint_bub_ms &elem_point = std::get<0>( elem ); - src_set.insert( here.getglobal( elem_point ) ); + src_set.insert( here.get_abs( elem_point ) ); } } // prune the set to remove tiles that are never gonna work out. @@ -2657,7 +2649,7 @@ static std::unordered_set generic_multi_activity_locations( for( auto it2 = src_set.begin(); it2 != src_set.end(); ) { // remove dangerous tiles - const tripoint_bub_ms set_pt = here.bub_from_abs( *it2 ); + const tripoint_bub_ms set_pt = here.get_bub( *it2 ); if( MOP_ACTIVITY ) { if( !here.mopsafe_field_at( set_pt ) ) { it2 = src_set.erase( it2 ); @@ -2720,7 +2712,7 @@ static requirement_check_result generic_multi_activity_check_requirement( const std::unordered_set &src_set, const bool check_only = false ) { map &here = get_map(); - const tripoint_abs_ms abspos = here.getglobal( you.pos_bub() ); + const tripoint_abs_ms abspos = here.get_abs( you.pos_bub() ); zone_manager &mgr = zone_manager::get_manager(); bool &can_do_it = act_info.can_do; @@ -2970,7 +2962,7 @@ static requirement_check_result generic_multi_activity_check_requirement( std::vector local_src_set; local_src_set.reserve( src_set.size() ); for( const tripoint_abs_ms &elem : src_set ) { - local_src_set.push_back( here.bub_from_abs( elem ) ); + local_src_set.push_back( here.get_bub( elem ) ); } std::vector candidates; for( const tripoint_bub_ms &point_elem : @@ -2989,7 +2981,7 @@ static requirement_check_result generic_multi_activity_check_requirement( return requirement_check_result::SKIP_LOCATION_NO_LOCATION; } act_prev.coords.push_back( - here.getglobal( + here.get_abs( candidates[std::max( 0, static_cast( candidates.size() / 2 ) )] ) ); } @@ -3165,7 +3157,7 @@ static bool generic_multi_activity_do( player_activity act = player_activity( disassemble_activity_actor( r.time_to_craft_moves( you, recipe_time_flag::ignore_proficiencies ) * qty ) ); act.targets.emplace_back( map_cursor( src_loc ), &elem ); - act.placement = here.getglobal( src_loc ); + act.placement = here.get_abs( src_loc ); act.position = qty; act.index = false; you.assign_activity( act ); @@ -3197,7 +3189,7 @@ struct failure_reasons { bool generic_multi_activity_handler( player_activity &act, Character &you, bool check_only ) { map &here = get_map(); - const tripoint_abs_ms abspos = here.getglobal( you.pos_bub() ); + const tripoint_abs_ms abspos = here.get_abs( you.pos_bub() ); // NOLINTNEXTLINE(performance-unnecessary-copy-initialization) activity_id activity_to_restore = act.id(); // Nuke the current activity, leaving the backlog alone @@ -3230,7 +3222,7 @@ bool generic_multi_activity_handler( player_activity &act, Character &you, bool failure_reasons reason; for( const tripoint_abs_ms &src : src_sorted ) { - const tripoint_bub_ms &src_loc = here.bub_from_abs( src ); + const tripoint_bub_ms &src_loc = here.get_bub( src ); if( !here.inbounds( src_loc ) && !check_only ) { if( !here.inbounds( you.pos_bub() ) ) { // p is implicitly an NPC that has been moved off the map, so reset the activity @@ -3447,7 +3439,7 @@ static std::optional find_refuel_spot_zone( const tripoint_bub_ { const zone_manager &mgr = zone_manager::get_manager(); map &here = get_map(); - const tripoint_abs_ms center_abs = here.getglobal( center ); + const tripoint_abs_ms center_abs = here.get_abs( center ); const std::unordered_set tiles_abs_unordered = mgr.get_near( zone_type_SOURCE_FIREWOOD, center_abs, PICKUP_RANGE, nullptr, fac ); @@ -3455,7 +3447,7 @@ static std::optional find_refuel_spot_zone( const tripoint_bub_ get_sorted_tiles_by_distance( center_abs, tiles_abs_unordered ); for( const tripoint_abs_ms &tile_abs : tiles_abs ) { - const tripoint_bub_ms tile = here.bub_from_abs( tile_abs ); + const tripoint_bub_ms tile = here.get_bub( tile_abs ); if( has_clear_path_to_pickup_items( center, tile ) ) { return tile; } @@ -3576,7 +3568,7 @@ int get_auto_consume_moves( Character &you, const bool food ) } map &here = get_map(); const std::unordered_set &dest_set = - mgr.get_near( consume_type_zone, here.getglobal( pos ), MAX_VIEW_DISTANCE, nullptr, + mgr.get_near( consume_type_zone, here.get_abs( pos ), MAX_VIEW_DISTANCE, nullptr, _fac_id( you ) ); if( dest_set.empty() ) { return 0; @@ -3637,7 +3629,7 @@ int get_auto_consume_moves( Character &you, const bool food ) return VisitResponse::NEXT; }; - const optional_vpart_position vp = here.veh_at( here.bub_from_abs( loc ) ); + const optional_vpart_position vp = here.veh_at( here.get_bub( loc ) ); if( vp ) { if( const std::optional vp_cargo = vp.cargo() ) { for( item &it : vp_cargo->items() ) { @@ -3646,7 +3638,7 @@ int get_auto_consume_moves( Character &you, const bool food ) } } } else { - for( item &it : here.i_at( here.bub_from_abs( loc ) ) ) { + for( item &it : here.i_at( here.get_bub( loc ) ) ) { item_location i_loc( map_cursor( loc ), &it ); visit_item_contents( i_loc, visit ); } @@ -3679,7 +3671,7 @@ bool try_fuel_fire( player_activity &act, Character &you, const bool starting_fi map &here = get_map(); std::optional best_fire = - starting_fire ? here.bub_from_abs( act.placement ) : find_best_fire( adjacent, pos ); + starting_fire ? here.get_bub( act.placement ) : find_best_fire( adjacent, pos ); if( !best_fire || !here.accessible_items( *best_fire ) ) { return false; diff --git a/src/advanced_inv_pane.cpp b/src/advanced_inv_pane.cpp index 792d9a7c9b315..a2300a371efb1 100644 --- a/src/advanced_inv_pane.cpp +++ b/src/advanced_inv_pane.cpp @@ -249,7 +249,7 @@ void advanced_inventory_pane::add_items_from_area( advanced_inv_area &square, square.i_stacked( square.get_vehicle_stack() ) : square.i_stacked( m.i_at( square.pos ) ); - map_cursor loc_cursor( tripoint_bub_ms( square.pos ) ); + map_cursor loc_cursor( square.pos ); for( size_t x = 0; x < stacks.size(); ++x ) { std::vector locs; locs.reserve( stacks[x].size() ); diff --git a/src/avatar.cpp b/src/avatar.cpp index 056d20cbf2fd8..e5fea4fa2b22f 100644 --- a/src/avatar.cpp +++ b/src/avatar.cpp @@ -250,12 +250,12 @@ bool avatar::should_show_map_memory() const bool avatar::save_map_memory() { - return player_map_memory->save( get_map().getglobal( pos_bub() ) ); + return player_map_memory->save( get_map().get_abs( pos_bub() ) ); } void avatar::load_map_memory() { - player_map_memory->load( get_map().getglobal( pos_bub() ) ); + player_map_memory->load( get_map().get_abs( pos_bub() ) ); } void avatar::prepare_map_memory_region( const tripoint_abs_ms &p1, const tripoint_abs_ms &p2 ) @@ -690,14 +690,14 @@ void avatar::grab( object_type grab_type_new, const tripoint_rel_ms &grab_point_ if( const optional_vpart_position ovp = m.veh_at( pos_bub() + gpoint ) ) { for( const tripoint_bub_ms &target : ovp->vehicle().get_points() ) { if( erase ) { - memorize_clear_decoration( m.getglobal( target ), /* prefix = */ "vp_" ); + memorize_clear_decoration( m.get_abs( target ), /* prefix = */ "vp_" ); } m.memory_cache_dec_set_dirty( target, true ); } } } else if( gtype != object_type::NONE ) { if( erase ) { - memorize_clear_decoration( m.getglobal( pos_bub() + gpoint ) ); + memorize_clear_decoration( m.get_abs( pos_bub() + gpoint ) ); } m.memory_cache_dec_set_dirty( pos_bub() + gpoint, true ); } @@ -1209,11 +1209,6 @@ bool avatar::is_obeying( const Character &p ) const return guy.is_obeying( *this ); } -bool avatar::cant_see( const tripoint &p ) const -{ - return cant_see( tripoint_bub_ms( p ) ); -} - bool avatar::cant_see( const tripoint_bub_ms &p ) const { @@ -1236,7 +1231,7 @@ void avatar::rebuild_aim_cache() const double pi = 2 * acos( 0.0 ); - const tripoint_bub_ms local_last_target = get_map().bub_from_abs( + const tripoint_bub_ms local_last_target = get_map().get_bub( last_target_pos.value() ); float base_angle = atan2f( local_last_target.y() - posy(), diff --git a/src/avatar.h b/src/avatar.h index 14813cdd26cd8..de4aa64ca3536 100644 --- a/src/avatar.h +++ b/src/avatar.h @@ -286,8 +286,6 @@ class avatar : public Character std::string preferred_aiming_mode; // checks if the point is blocked based on characters current aiming state - // TODO Remove untyped overload - bool cant_see( const tripoint &p ) const; bool cant_see( const tripoint_bub_ms &p ) const; // rebuilds the full aim cache for the character if it is dirty diff --git a/src/avatar_action.cpp b/src/avatar_action.cpp index c6eb53adde084..b718ce97601ae 100644 --- a/src/avatar_action.cpp +++ b/src/avatar_action.cpp @@ -655,7 +655,7 @@ void avatar_action::swim( map &m, avatar &you, const tripoint_bub_ms &p ) return; } } - tripoint_abs_ms old_abs_pos = m.getglobal( you.pos_bub() ); + tripoint_abs_ms old_abs_pos = m.get_abs( you.pos_bub() ); you.setpos( p ); g->update_map( you ); diff --git a/src/ballistics.cpp b/src/ballistics.cpp index c9bad039024f4..f74fdb7b25d72 100644 --- a/src/ballistics.cpp +++ b/src/ballistics.cpp @@ -70,7 +70,7 @@ static void drop_or_embed_projectile( const dealt_projectile_attack &attack, pro return; } - const tripoint_bub_ms &pt = tripoint_bub_ms( attack.end_point ); + const tripoint_bub_ms &pt = attack.end_point; if( effects.count( ammo_effect_SHATTER_SELF ) ) { // Drop the contents, not the thrown item diff --git a/src/basecamp.cpp b/src/basecamp.cpp index e444084838126..456dd80452b13 100644 --- a/src/basecamp.cpp +++ b/src/basecamp.cpp @@ -722,7 +722,7 @@ void basecamp::form_storage_zones( map &here, const tripoint_abs_ms &abspos ) } // NPC camps may never have had bb_pos registered validate_bb_pos( project_to( omt_pos ) ); - tripoint_bub_ms src_loc = here.bub_from_abs( bb_pos ) + point::north; + tripoint_bub_ms src_loc = here.get_bub( bb_pos ) + point::north; std::vector possible_liquid_dumps; if( mgr.has_near( zone_type_CAMP_STORAGE, abspos, MAX_VIEW_DISTANCE ) ) { const std::vector zones = mgr.get_near_zones( zone_type_CAMP_STORAGE, abspos, @@ -737,21 +737,21 @@ void basecamp::form_storage_zones( map &here, const tripoint_abs_ms &abspos ) } } set_storage_tiles( src_set ); - src_loc = here.bub_from_abs( zones.front()->get_center_point() ); + src_loc = here.get_bub( zones.front()->get_center_point() ); } map &here = get_map(); for( const zone_data *zone : zones ) { if( zone->get_type() == zone_type_CAMP_STORAGE ) { for( const tripoint_abs_ms &p : tripoint_range( zone->get_start_point(), zone->get_end_point() ) ) { - if( here.has_flag_ter_or_furn( ter_furn_flag::TFLAG_LIQUIDCONT, here.bub_from_abs( p ) ) ) { + if( here.has_flag_ter_or_furn( ter_furn_flag::TFLAG_LIQUIDCONT, here.get_bub( p ) ) ) { possible_liquid_dumps.emplace_back( p ); } } } } } - set_dumping_spot( here.getglobal( src_loc ) ); + set_dumping_spot( here.get_abs( src_loc ) ); set_liquid_dumping_spot( possible_liquid_dumps ); } @@ -783,7 +783,7 @@ void basecamp::form_crafting_inventory( map &target_map ) // find available fuel for( const tripoint_abs_ms &abs_ms_pt : src_set ) { - const tripoint_bub_ms &pt = target_map.bub_from_abs( abs_ms_pt ); + const tripoint_bub_ms &pt = target_map.get_bub( abs_ms_pt ); if( target_map.accessible_items( pt ) ) { for( const item &i : target_map.i_at( pt ) ) { for( basecamp_fuel &bcp_f : fuels ) { @@ -1042,7 +1042,7 @@ void basecamp_action_components::consume_components() std::vector src; src.reserve( base_.src_set.size() ); for( const tripoint_abs_ms &p : base_.src_set ) { - src.emplace_back( target_map.bub_from_abs( p ) ); + src.emplace_back( target_map.get_bub( p ) ); } for( const comp_selection &sel : item_selections_ ) { std::list empty_consumed = player_character.consume_items( target_map, sel, batch_size_, diff --git a/src/bionics.cpp b/src/bionics.cpp index f65ed53995772..de77a9449e9a4 100644 --- a/src/bionics.cpp +++ b/src/bionics.cpp @@ -928,7 +928,7 @@ bool Character::activate_bionic( bionic &bio, bool eff_only, bool *close_bionics add_msg_activate(); add_msg_if_player( m_info, _( "You can now run faster, assisted by joint servomotors." ) ); } else if( bio.id == bio_lighter ) { - const std::optional pnt = choose_adjacent_bub( _( "Start a fire where?" ) ); + const std::optional pnt = choose_adjacent( _( "Start a fire where?" ) ); if( pnt && here.is_flammable( *pnt ) && !here.get_field( *pnt, fd_fire ) ) { add_msg_activate(); here.add_field( *pnt, fd_fire, 1 ); @@ -954,7 +954,7 @@ bool Character::activate_bionic( bionic &bio, bool eff_only, bool *close_bionics set_rad( 0 ); } } else if( bio.id == bio_emp ) { - if( const std::optional pnt = choose_adjacent_bub( + if( const std::optional pnt = choose_adjacent( _( "Create an EMP where?" ) ) ) { add_msg_activate(); explosion_handler::emp_blast( *pnt ); @@ -1041,7 +1041,7 @@ bool Character::activate_bionic( bionic &bio, bool eff_only, bool *close_bionics player_character ); if( target.has_value() ) { add_msg_activate(); - assign_activity( lockpick_activity_actor::use_bionic( here.getglobal( *target ) ) ); + assign_activity( lockpick_activity_actor::use_bionic( here.get_abs( *target ) ) ); if( close_bionics_ui ) { *close_bionics_ui = true; } diff --git a/src/calendar.cpp b/src/calendar.cpp index 1ee387e9ca1e4..f5830e8b83c3c 100644 --- a/src/calendar.cpp +++ b/src/calendar.cpp @@ -102,7 +102,8 @@ moon_phase get_moon_phase( const time_point &p ) const int num_middays = to_days( p - calendar::turn_zero + 1_days / 2 ); const time_duration nearest_midnight = num_middays * 1_days; const double phase_change = nearest_midnight / moon_phase_duration; - const int current_phase = static_cast( std::round( phase_change * MOON_PHASE_MAX ) ) % + const int current_phase = static_cast( std::round( phase_change * static_cast + ( MOON_PHASE_MAX ) ) ) % static_cast( MOON_PHASE_MAX ); return static_cast( current_phase ); } diff --git a/src/cata_path.h b/src/cata_path.h index 360b2370fb60d..12e6579ecd442 100644 --- a/src/cata_path.h +++ b/src/cata_path.h @@ -3,8 +3,9 @@ #define CATA_SRC_CATA_PATH_H #include +#include -#include +#include /** * One of the problems of filesystem paths is they lack contextual awareness @@ -13,11 +14,11 @@ * some logical root which isn't the actual filesystem root, and work with / * manipulate that path independently of the logical root. * - * cata_path combines a logical root concept and an fs::path. The logical + * cata_path combines a logical root concept and an std::filesystem::path. The logical * root is an enum value containing well known cataclysm 'roots'. It only * exposes operator / for concatenating segments to the relative path. * The constructor requires passing a logical root value which can be queried, - * and when (explicitly) converting to fs::path will prepend the logical root + * and when (explicitly) converting to std::filesystem::path will prepend the logical root * with the relative path to give a final absolute path. Callers can know this * absolute path is relative to the logical root without having to perform any * further tests. @@ -26,8 +27,8 @@ * in a path rooted at the logical root, just like what happens if you try to * resolve '/../'. * - * All string values are assumed to be utf-8 encoded, but fs::path values are - * used as-is without checking for encoding, so fs::u8path should be used if the + * All string values are assumed to be utf-8 encoded, but std::filesystem::path values are + * used as-is without checking for encoding, so std::filesystem::u8path should be used if the * path is utf-8 encoded. */ class cata_path @@ -44,7 +45,7 @@ class cata_path save, user, unknown, // assumed relative to cwd, path is "." - // fun fact: fs::path{} / "foo" == "foo", no "/foo". + // fun fact: std::filesystem::path{} / "foo" == "foo", no "/foo". }; cata_path() : logical_root_{ root_path::unknown } {} @@ -59,16 +60,16 @@ class cata_path cata_path( cata_path && ) = default; cata_path &operator=( cata_path && ) = default; - // Returns an fs::path constructed by concatenating the 'actual' path + // Returns an std::filesystem::path constructed by concatenating the 'actual' path // value for the logical root with the relative path stored in this. // path with root_path::unknown are returned as-is. - inline fs::path get_unrelative_path() const { - fs::path result = get_logical_root_path(); + inline std::filesystem::path get_unrelative_path() const { + std::filesystem::path result = get_logical_root_path(); result /= relative_path_; return result; } - explicit inline operator fs::path() const { + explicit inline operator std::filesystem::path() const { return get_unrelative_path(); } @@ -77,15 +78,15 @@ class cata_path } // Returns the actual path to the logical root this cata_path is relative to. - fs::path get_logical_root_path() const; + std::filesystem::path get_logical_root_path() const; // Returns a direct reference to the relative path component. Useful for // sanity checking the path eg. does not being with '..'. - inline const fs::path &get_relative_path() const { + inline const std::filesystem::path &get_relative_path() const { return relative_path_; } - // Below are named-alike functions from fs::path which do similar things + // Below are named-alike functions from std::filesystem::path which do similar things // to this object. template @@ -115,7 +116,7 @@ class cata_path } inline cata_path lexically_normal() const { - cata_path ret{ logical_root_, fs::path{} }; + cata_path ret{ logical_root_, std::filesystem::path{} }; ret.relative_path_ = relative_path_.lexically_normal(); return ret; } @@ -145,18 +146,19 @@ class cata_path private: root_path logical_root_; - fs::path relative_path_; + std::filesystem::path relative_path_; template - static std::enable_if_t < std::is_same_v, fs::path>, T && > + static std::enable_if_t < std::is_same_v, std::filesystem::path>, T && > as_fs_path( T &&path ) { return std::forward( path ); } template - static std::enable_if_t < !std::is_same_v, fs::path>, fs::path > + static std::enable_if_t < !std::is_same_v, std::filesystem::path>, + std::filesystem::path > as_fs_path( T &&path ) { - return fs::u8path( std::forward( path ) ); + return std::filesystem::u8path( std::forward( path ) ); } }; diff --git a/src/cata_tiles.cpp b/src/cata_tiles.cpp index d41340f30a466..6c97af7c941e1 100644 --- a/src/cata_tiles.cpp +++ b/src/cata_tiles.cpp @@ -650,9 +650,9 @@ void tileset_cache::loader::load( const std::string &tileset_id, const bool prec layering = PATH_INFO::defaultlayeringjson(); } - cata_path json_path = tileset_root / fs::u8path( json_conf ); - cata_path img_path = tileset_root / fs::u8path( tileset_path ); - cata_path layering_path = tileset_root / fs::u8path( layering ); + cata_path json_path = tileset_root / std::filesystem::u8path( json_conf ); + cata_path img_path = tileset_root / std::filesystem::u8path( tileset_path ); + cata_path layering_path = tileset_root / std::filesystem::u8path( layering ); dbg( D_INFO ) << "Attempting to Load LAYERING file " << layering_path; std::ifstream layering_file( layering_path.get_unrelative_path(), @@ -1421,8 +1421,8 @@ void cata_tiles::draw( const point &dest, const tripoint_bub_ms ¢er, int wid here.prev_o = o; you.prepare_map_memory_region( - here.getglobal( tripoint_bub_ms( min_mm_reg.x, min_mm_reg.y, center.z() ) ), - here.getglobal( tripoint_bub_ms( max_mm_reg.x, max_mm_reg.y, center.z() ) ) + here.get_abs( tripoint_bub_ms( min_mm_reg.x, min_mm_reg.y, center.z() ) ), + here.get_abs( tripoint_bub_ms( max_mm_reg.x, max_mm_reg.y, center.z() ) ) ); //set up a default tile for the edges outside the render area @@ -1500,7 +1500,7 @@ void cata_tiles::draw( const point &dest, const tripoint_bub_ms ¢er, int wid for( int zlevel = center.z(); zlevel >= draw_min_z; zlevel -- ) { // todo: conversion slightly simplified, a couple of calls already use pos as tripoint_bub_ms const tripoint_bub_ms pos( point_bub_ms( temp.value() ), zlevel ); - const tripoint_abs_ms pos_global = here.getglobal( pos ); + const tripoint_abs_ms pos_global = here.get_abs( pos ); const int &x = pos.x(); const int &y = pos.y(); const bool is_center_z = zlevel == center.z(); @@ -1880,7 +1880,7 @@ void cata_tiles::draw( const point &dest, const tripoint_bub_ms ¢er, int wid //bypass cache check in case we learn something new about the terrain's connections draw_terrain( p, lighting, height_3d, invisible, true ); if( here.memory_cache_dec_is_dirty( p ) ) { - you.memorize_clear_decoration( here.getglobal( p ), "" ); + you.memorize_clear_decoration( here.get_abs( p ), "" ); draw_furniture( p, lighting, height_3d, invisible, true ); draw_trap( p, lighting, height_3d, invisible, true ); draw_part_con( p, lighting, height_3d, invisible, true ); @@ -2830,7 +2830,7 @@ bool cata_tiles::draw_from_id_string_internal( const std::string &id, TILE_CATEG case TILE_CATEGORY::FIELD: case TILE_CATEGORY::LIGHTING: // stationary map tiles, seed based on map coordinates - seed = simple_point_hash( here.getglobal( pos ).raw().xy() ); + seed = simple_point_hash( here.get_abs( pos ).raw().xy() ); break; case TILE_CATEGORY::VEHICLE_PART: // vehicle parts, seed based on coordinates within the vehicle @@ -2862,7 +2862,7 @@ bool cata_tiles::draw_from_id_string_internal( const std::string &id, TILE_CATEG if( fid.is_valid() ) { const furn_t &f = fid.obj(); if( !f.is_movable() ) { - seed = simple_point_hash( here.getglobal( pos ).raw().xy() ); + seed = simple_point_hash( here.get_abs( pos ).raw().xy() ); } } } @@ -2878,7 +2878,7 @@ bool cata_tiles::draw_from_id_string_internal( const std::string &id, TILE_CATEG if( found_id == "graffiti" ) { seed = std::hash {}( here.graffiti_at( pos ) ); } else if( string_starts_with( found_id, "graffiti" ) ) { - seed = simple_point_hash( here.getglobal( pos ).raw().xy() ); + seed = simple_point_hash( here.get_abs( pos ).raw().xy() ); } break; case TILE_CATEGORY::ITEM: @@ -3347,7 +3347,7 @@ bool cata_tiles::draw_terrain( const tripoint_bub_ms &p, const lit_level ll, int // do something to get other terrain orientation values } if( here.memory_cache_ter_is_dirty( p ) ) { - get_avatar().memorize_terrain( here.getglobal( p ), tname, subtile, rotation ); + get_avatar().memorize_terrain( here.get_abs( p ), tname, subtile, rotation ); } // draw the actual terrain if there's no override if( !neighborhood_overridden ) { @@ -3387,7 +3387,7 @@ bool cata_tiles::draw_terrain( const tripoint_bub_ms &p, const lit_level ll, int } } else if( invisible[0] ) { // try drawing memory if invisible and not overridden - const memorized_tile &mt = get_terrain_memory_at( here.getglobal( p ) ); + const memorized_tile &mt = get_terrain_memory_at( here.get_abs( p ) ); if( !mt.get_ter_id().empty() ) { return memorize_only ? false @@ -3438,7 +3438,7 @@ bool cata_tiles::draw_furniture( const tripoint_bub_ms &p, const lit_level ll, i if( !( you.get_grab_type() == object_type::FURNITURE && p == you.pos_bub() + you.grab_point ) && here.memory_cache_dec_is_dirty( p ) ) { - you.memorize_decoration( here.getglobal( p ), fname, subtile, rotation ); + you.memorize_decoration( here.get_abs( p ), fname, subtile, rotation ); } // draw the actual furniture if there's no override if( !neighborhood_overridden ) { @@ -3488,7 +3488,7 @@ bool cata_tiles::draw_furniture( const tripoint_bub_ms &p, const lit_level ll, i } } else if( invisible[0] ) { // try drawing memory if invisible and not overridden - const memorized_tile &mt = get_furniture_memory_at( here.getglobal( p ) ); + const memorized_tile &mt = get_furniture_memory_at( here.get_abs( p ) ); if( !mt.get_dec_id().empty() ) { return memorize_only ? false @@ -3531,7 +3531,7 @@ bool cata_tiles::draw_trap( const tripoint_bub_ms &p, const lit_level ll, int &h get_tile_values( tr.loadid.to_i(), neighborhood, subtile, rotation, 0 ); const std::string trname = tr.loadid.id().str(); if( here.memory_cache_dec_is_dirty( p ) ) { - you.memorize_decoration( here.getglobal( p ), trname, subtile, rotation ); + you.memorize_decoration( here.get_abs( p ), trname, subtile, rotation ); } // draw the actual trap if there's no override if( !neighborhood_overridden ) { @@ -3574,7 +3574,7 @@ bool cata_tiles::draw_trap( const tripoint_bub_ms &p, const lit_level ll, int &h } } else if( invisible[0] ) { // try drawing memory if invisible and not overridden - const memorized_tile &mt = get_trap_memory_at( here.getglobal( p ) ); + const memorized_tile &mt = get_trap_memory_at( here.get_abs( p ) ); if( !mt.get_dec_id().empty() ) { return memorize_only ? false @@ -3595,7 +3595,7 @@ bool cata_tiles::draw_part_con( const tripoint_bub_ms &p, const lit_level ll, in avatar &you = get_avatar(); std::string const &trname = tr_unfinished_construction.str(); if( here.memory_cache_dec_is_dirty( p ) ) { - you.memorize_decoration( here.getglobal( p ), trname, 0, 0 ); + you.memorize_decoration( here.get_abs( p ), trname, 0, 0 ); } return memorize_only ? false @@ -3938,7 +3938,7 @@ bool cata_tiles::draw_vpart( const tripoint_bub_ms &p, lit_level ll, int &height && !( you.get_grab_type() == object_type::VEHICLE && veh.get_points().count( ( you.pos_bub() + you.grab_point ) ) ) && here.memory_cache_dec_is_dirty( p ) ) { - you.memorize_decoration( here.getglobal( p ), vd.get_tileset_id(), subtile, rotation ); + you.memorize_decoration( here.get_abs( p ), vd.get_tileset_id(), subtile, rotation ); } if( !overridden ) { int height_3d_temp = height_3d; @@ -3984,7 +3984,7 @@ bool cata_tiles::draw_vpart( const tripoint_bub_ms &p, lit_level ll, int &height } } else if( !roof && invisible[0] ) { // try drawing memory if invisible and not overridden - const memorized_tile &t = get_vpart_memory_at( here.getglobal( p ) ); + const memorized_tile &t = get_vpart_memory_at( here.get_abs( p ) ); std::string_view tid = t.get_dec_id(); if( !tid.empty() ) { int height_3d_temp = height_3d; @@ -4261,7 +4261,7 @@ bool cata_tiles::draw_zone_mark( const tripoint_bub_ms &p, lit_level ll, int &he } const zone_manager &mgr = zone_manager::get_manager(); - const tripoint_abs_ms abs = get_map().getglobal( p ); + const tripoint_abs_ms abs = get_map().get_abs( p ); const zone_data *zone = mgr.get_bottom_zone( abs ); if( zone && zone->has_options() ) { diff --git a/src/cata_utility.cpp b/src/cata_utility.cpp index 47d046f5b9fea..b3075445be4c2 100644 --- a/src/cata_utility.cpp +++ b/src/cata_utility.cpp @@ -288,7 +288,7 @@ float multi_lerp( const std::vector> &points, float x ) void write_to_file( const std::string &path, const std::function &writer ) { // Any of the below may throw. ofstream_wrapper will clean up the temporary path on its own. - ofstream_wrapper fout( fs::u8path( path ), std::ios::binary ); + ofstream_wrapper fout( std::filesystem::u8path( path ), std::ios::binary ); writer( fout.stream() ); fout.close(); } @@ -345,7 +345,8 @@ bool write_to_file( const cata_path &path, const std::function &reader ) +bool read_from_file( const std::filesystem::path &path, + const std::function &reader ) { std::unique_ptr finp = read_maybe_compressed_file( path ); if( !finp ) { @@ -466,15 +468,15 @@ bool read_from_file( const fs::path &path, const std::function &reader ) { - return read_from_file( fs::u8path( path ), reader ); + return read_from_file( std::filesystem::u8path( path ), reader ); } std::unique_ptr read_maybe_compressed_file( const std::string &path ) { - return read_maybe_compressed_file( fs::u8path( path ) ); + return read_maybe_compressed_file( std::filesystem::u8path( path ) ); } -std::unique_ptr read_maybe_compressed_file( const fs::path &path ) +std::unique_ptr read_maybe_compressed_file( const std::filesystem::path &path ) { try { std::ifstream fin( path, std::ios::binary ); @@ -514,10 +516,10 @@ std::unique_ptr read_maybe_compressed_file( const cata_path &path std::optional read_whole_file( const std::string &path ) { - return read_whole_file( fs::u8path( path ) ); + return read_whole_file( std::filesystem::u8path( path ) ); } -std::optional read_whole_file( const fs::path &path ) +std::optional read_whole_file( const std::filesystem::path &path ) { std::string outstring; try { @@ -582,7 +584,7 @@ bool read_from_file_optional( const std::string &path, return file_exist( path ) && read_from_file( path, reader ); } -bool read_from_file_optional( const fs::path &path, +bool read_from_file_optional( const std::filesystem::path &path, const std::function &reader ) { // Note: slight race condition here, but we'll ignore it. Worst case: the file diff --git a/src/cata_utility.h b/src/cata_utility.h index c14bb67614ccf..0dd57888b08ad 100644 --- a/src/cata_utility.h +++ b/src/cata_utility.h @@ -345,14 +345,15 @@ void write_to_file( const cata_path &path, const std::function &reader ); -bool read_from_file( const fs::path &path, const std::function &reader ); +bool read_from_file( const std::filesystem::path &path, + const std::function &reader ); bool read_from_file( const cata_path &path, const std::function &reader ); bool read_from_file_json( const cata_path &path, const std::function &reader ); bool read_from_file_optional( const std::string &path, const std::function &reader ); -bool read_from_file_optional( const fs::path &path, +bool read_from_file_optional( const std::filesystem::path &path, const std::function &reader ); bool read_from_file_optional( const cata_path &path, const std::function &reader ); @@ -372,7 +373,7 @@ bool read_from_file_optional_json( const cata_path &path, */ /**@{*/ std::unique_ptr read_maybe_compressed_file( const std::string &path ); -std::unique_ptr read_maybe_compressed_file( const fs::path &path ); +std::unique_ptr read_maybe_compressed_file( const std::filesystem::path &path ); std::unique_ptr read_maybe_compressed_file( const cata_path &path ); /**@}*/ @@ -386,7 +387,7 @@ std::unique_ptr read_maybe_compressed_file( const cata_path &path */ /**@{*/ std::optional read_whole_file( const std::string &path ); -std::optional read_whole_file( const fs::path &path ); +std::optional read_whole_file( const std::filesystem::path &path ); std::optional read_whole_file( const cata_path &path ); /**@}*/ diff --git a/src/character.cpp b/src/character.cpp index 6be6bdaeed8ed..b6527972d4214 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -1619,8 +1619,8 @@ bool Character::check_outbounds_activity( const player_activity &act, bool check { map &here = get_map(); if( ( act.placement != tripoint_abs_ms() && act.placement != player_activity::invalid_place && - !here.inbounds( here.bub_from_abs( act.placement ) ) ) || ( !act.coords.empty() && - !here.inbounds( here.bub_from_abs( act.coords.back() ) ) ) ) { + !here.inbounds( here.get_bub( act.placement ) ) ) || ( !act.coords.empty() && + !here.inbounds( here.get_bub( act.coords.back() ) ) ) ) { if( is_npc() && !check_only ) { // stash activity for when reloaded. stashed_outbounds_activity = act; @@ -1911,7 +1911,7 @@ void Character::dismount() add_msg_debug( debugmode::DF_CHARACTER, "dismount called when not riding" ); return; } - if( const std::optional pnt = choose_adjacent_bub( _( "Dismount where?" ) ) ) { + if( const std::optional pnt = choose_adjacent( _( "Dismount where?" ) ) ) { if( !g->is_empty( *pnt ) ) { add_msg( m_warning, _( "You cannot dismount there!" ) ); return; @@ -7649,9 +7649,7 @@ void Character::drench_mut_calc() weighted_int_list Character::get_vitamin_weighted_categories() const { weighted_int_list weighted_output; - const std::map &mutation_categories = - mutation_category_trait::get_all(); - for( const auto &elem : mutation_categories ) { + for( const auto &elem : mutation_category_trait::get_all() ) { add_msg_debug( debugmode::DF_MUTATION, "get_vitamin_weighted_categories: category %s weight %d", elem.second.id.c_str(), vitamin_get( elem.second.vitamin ) ); weighted_output.add( elem.first, vitamin_get( elem.second.vitamin ) ); @@ -8547,8 +8545,14 @@ bool Character::crossed_threshold() const mutation_category_id Character::get_threshold_category() const { for( const trait_id &mut : get_functioning_mutations() ) { - if( mut->threshold && !mut->category.empty() ) { - return mut->category[0]; + if( mut->threshold ) { + const std::map &mutation_categories = + mutation_category_trait::get_all(); + for( const auto &cat : mutation_categories ) { + if( cat.second.threshold_mut == mut ) { + return cat.first; + } + } } } return mutation_category_id::NULL_ID(); @@ -10708,18 +10712,18 @@ void Character::echo_pulse() bool Character::knows_trap( const tripoint_bub_ms &pos ) const { - const tripoint_abs_ms p = get_map().getglobal( pos ); - return known_traps.count( p.raw() ) > 0; + const tripoint_abs_ms p = get_map().get_abs( pos ); + return known_traps.count( p ) > 0; } void Character::add_known_trap( const tripoint_bub_ms &pos, const trap &t ) { - const tripoint_abs_ms p = get_map().getglobal( pos ); + const tripoint_abs_ms p = get_map().get_abs( pos ); if( t.is_null() ) { - known_traps.erase( p.raw() ); + known_traps.erase( p ); } else { // TODO: known_traps should map to a trap_str_id - known_traps[p.raw()] = t.id.str(); + known_traps[p] = t.id.str(); } } @@ -11131,7 +11135,7 @@ void Character::process_effects() } // Being stuck in tight spaces sucks. TODO: could be expanded to apply to non-vehicle conditions. - if( will_be_cramped_in_vehicle_tile( get_map().getglobal( pos_bub() ) ) ) { + if( will_be_cramped_in_vehicle_tile( get_map().get_abs( pos_bub() ) ) ) { if( is_npc() && !has_effect( effect_narcosis ) ) { npc &as_npc = dynamic_cast( *this ); as_npc.complain_about( "cramped_vehicle", 30_minutes, "", false ); @@ -11369,11 +11373,6 @@ npc_attitude Character::get_attitude() const return NPCATT_NULL; } -bool Character::sees( const tripoint &t, bool, int ) const -{ - return sees( tripoint_bub_ms( t ) ); -} - bool Character::sees( const tripoint_bub_ms &t, bool, int ) const { const int wanted_range = rl_dist( pos_bub(), t ); @@ -11410,7 +11409,7 @@ void Character::set_destination( const std::vector &route, { auto_move_route = route; set_destination_activity( new_destination_activity ); - destination_point.emplace( get_map().getglobal( route.back() ) ); + destination_point.emplace( get_map().get_abs( route.back() ) ); } void Character::clear_destination() @@ -11448,7 +11447,7 @@ bool Character::has_destination() const bool Character::has_destination_activity() const { return !get_destination_activity().is_null() && destination_point && - pos_bub() == get_map().bub_from_abs( *destination_point ); + pos_bub() == get_map().get_bub( *destination_point ); } void Character::start_destination_activity() diff --git a/src/character.h b/src/character.h index 04c2b942c0fe0..47f5abceec0d6 100644 --- a/src/character.h +++ b/src/character.h @@ -3770,14 +3770,13 @@ class Character : public Creature, public visitable // Returns a multiplier indicating the keenness of a player's hearing. float hearing_ability() const; - using trap_map = std::map; + using trap_map = std::map; // Use @ref trap::can_see to check whether a character knows about a // specific trap - it will consider visible and known traps. bool knows_trap( const tripoint_bub_ms &pos ) const; void add_known_trap( const tripoint_bub_ms &pos, const trap &t ); // see Creature::sees - bool sees( const tripoint &t, bool is_avatar = false, int range_mod = 0 ) const override; bool sees( const tripoint_bub_ms &t, bool is_avatar = false, int range_mod = 0 ) const override; // see Creature::sees bool sees( const Creature &critter ) const override; diff --git a/src/character_attire.cpp b/src/character_attire.cpp index ae617d60bf0a7..1d116992fd034 100644 --- a/src/character_attire.cpp +++ b/src/character_attire.cpp @@ -60,8 +60,6 @@ static const efftype_id effect_onfire( "onfire" ); static const flag_id json_flag_HIDDEN( "HIDDEN" ); static const flag_id json_flag_ONE_PER_LAYER( "ONE_PER_LAYER" ); -static const itype_id itype_shoulder_strap( "shoulder_strap" ); - static const material_id material_acidchitin( "acidchitin" ); static const material_id material_bone( "bone" ); static const material_id material_chitin( "chitin" ); @@ -2061,7 +2059,7 @@ void outfit::fire_options( Character &guy, std::vector &options, actions.emplace_back( [&] { guy.invoke_item( &clothing, "holster" ); } ); - } else if( clothing.is_gun() && clothing.gunmod_find( itype_shoulder_strap ) ) { + } else if( clothing.is_gun() && clothing.gunmod_find_by_flag( flag_BELTED ) ) { // wield item currently worn using shoulder strap options.push_back( clothing.display_name() ); actions.emplace_back( [&] { guy.wield( clothing ); } ); diff --git a/src/clzones.cpp b/src/clzones.cpp index 65a8c9f28d219..e52b2aa92b198 100644 --- a/src/clzones.cpp +++ b/src/clzones.cpp @@ -307,10 +307,10 @@ plot_options::query_seed_result plot_options::query_seed() zone_manager &mgr = zone_manager::get_manager(); map &here = get_map(); const std::unordered_set zone_src_set = - mgr.get_near( zone_type_LOOT_SEEDS, here.getglobal( player_character.pos_bub() ), + mgr.get_near( zone_type_LOOT_SEEDS, here.get_abs( player_character.pos_bub() ), MAX_VIEW_DISTANCE ); for( const tripoint_abs_ms &elem : zone_src_set ) { - tripoint_bub_ms elem_loc = here.bub_from_abs( elem ); + tripoint_bub_ms elem_loc = here.get_bub( elem ); for( item &it : here.i_at( elem_loc ) ) { if( it.is_seed() ) { seed_inv.push_back( &it ); @@ -1003,7 +1003,7 @@ std::unordered_set zone_manager::get_point_set_loot( const trip if( fac == z_fac && type.str().substr( 0, 4 ) == "LOOT" ) { for( tripoint_abs_ms point : cache.second ) { if( square_dist( where, point ) <= radius ) { - res.emplace( here.bub_from_abs( point ) ); + res.emplace( here.get_bub( point ) ); } } } @@ -1014,7 +1014,7 @@ std::unordered_set zone_manager::get_point_set_loot( const trip if( fac == z_fac && type.str().substr( 0, 4 ) == "LOOT" ) { for( tripoint_abs_ms point : cache.second ) { if( square_dist( where, point ) <= radius ) { - res.emplace( here.bub_from_abs( point ) ); + res.emplace( here.get_bub( point ) ); } } } @@ -1025,7 +1025,7 @@ std::unordered_set zone_manager::get_point_set_loot( const trip zone_type_id type = zone_data::unhash_type( cache.first ); if( type == zone_type_NO_NPC_PICKUP ) { for( tripoint_abs_ms point : cache.second ) { - res.erase( here.bub_from_abs( point ) ); + res.erase( here.get_bub( point ) ); } } } @@ -1436,7 +1436,7 @@ void zone_manager::add( const std::string &name, const zone_type_id &type, const map &here = pmap == nullptr ? get_map() : *pmap; zone_data new_zone = zone_data( name, type, fac, invert, enabled, start, end, options ); // only non personal zones can be vehicle zones - optional_vpart_position const vp = here.veh_at( here.bub_from_abs( start ) ); + optional_vpart_position const vp = here.veh_at( here.get_bub( start ) ); if( vp && vp->vehicle().get_owner() == fac && vp.cargo() ) { // TODO:Allow for loot zones on vehicles to be larger than 1x1 if( start == end && @@ -1536,8 +1536,8 @@ void _rotate_zone( map &target_map, zone_data &zone, int turns ) const point dim( SEEX * 2, SEEY * 2 ); const tripoint_bub_ms a_start( 0, 0, target_map.get_abs_sub().z() ); const tripoint_bub_ms a_end( SEEX * 2 - 1, SEEY * 2 - 1, a_start.z() ); - const tripoint_bub_ms z_start = target_map.bub_from_abs( zone.get_start_point() ); - const tripoint_bub_ms z_end = target_map.bub_from_abs( zone.get_end_point() ); + const tripoint_bub_ms z_start = target_map.get_bub( zone.get_start_point() ); + const tripoint_bub_ms z_end = target_map.get_bub( zone.get_end_point() ); const inclusive_cuboid boundary( a_start, a_end ); if( boundary.contains( z_start ) && boundary.contains( z_end ) ) { // don't rotate centered squares @@ -1548,13 +1548,13 @@ void _rotate_zone( map &target_map, zone_data &zone, int turns ) point_bub_ms z_l_start = z_start.xy().rotate( turns, dim ); point_bub_ms z_l_end = z_end.xy().rotate( turns, dim ); tripoint_abs_ms first = - target_map.getglobal( tripoint_bub_ms( std::min( z_l_start.x(), z_l_end.x() ), - std::min( z_l_start.y(), z_l_end.y() ), - z_start.z() ) ); + target_map.get_abs( tripoint_bub_ms( std::min( z_l_start.x(), z_l_end.x() ), + std::min( z_l_start.y(), z_l_end.y() ), + z_start.z() ) ); tripoint_abs_ms second = - target_map.getglobal( tripoint_bub_ms( std::max( z_l_start.x(), z_l_end.x() ), - std::max( z_l_start.y(), z_l_end.y() ), - z_end.z() ) ); + target_map.get_abs( tripoint_bub_ms( std::max( z_l_start.x(), z_l_end.x() ), + std::max( z_l_start.y(), z_l_end.y() ), + z_end.z() ) ); zone.set_position( std::make_pair( first, second ), false, true, false, true ); } } @@ -1851,7 +1851,7 @@ void zone_manager::revert_vzones() map &here = get_map(); for( zone_data zone : removed_vzones ) { //Code is copied from add() to avoid yn query - const tripoint_bub_ms pos = here.bub_from_abs( zone.get_start_point() ); + const tripoint_bub_ms pos = here.get_bub( zone.get_start_point() ); if( const std::optional vp = here.veh_at( pos ).cargo() ) { zone.set_is_vehicle( true ); vp->vehicle().loot_zones.emplace( vp->mount_pos(), zone ); diff --git a/src/computer_session.cpp b/src/computer_session.cpp index 4b53e56b4166a..7b26d03522109 100644 --- a/src/computer_session.cpp +++ b/src/computer_session.cpp @@ -318,8 +318,8 @@ static void remove_submap_turrets() map &here = get_map(); for( monster &critter : g->all_monsters() ) { // Check 1) same overmap coords, 2) turret, 3) hostile - if( coords::project_to( here.getglobal( critter.pos_bub() ) ) == - coords::project_to( here.getglobal( + if( coords::project_to( here.get_abs( critter.pos_bub() ) ) == + coords::project_to( here.get_abs( player_character.pos_bub() ) ) && critter.has_flag( mon_flag_CONSOLE_DESPAWN ) && critter.attitude_to( player_character ) == Creature::Attitude::HOSTILE ) { diff --git a/src/condition.cpp b/src/condition.cpp index 6a9d413bba2ad..c639c908eb236 100644 --- a/src/condition.cpp +++ b/src/condition.cpp @@ -396,7 +396,7 @@ tripoint_abs_ms get_tripoint_from_var( std::optional var, const_dialog d.get_callstack() ); return tripoint_abs_ms::invalid; } - return get_map().getglobal( d.const_actor( is_npc )->pos_bub() ); + return get_map().get_abs( d.const_actor( is_npc )->pos_bub() ); } template @@ -1691,8 +1691,8 @@ conditional_t::func f_line_of_sight( const JsonObject &jo, std::string_view memb with_fields = jo.get_bool( "with_fields" ); } return [range, loc_var_1, loc_var_2, with_fields]( const_dialogue const & d ) { - tripoint_bub_ms loc_1 = get_map().bub_from_abs( get_tripoint_from_var( loc_var_1, d, false ) ); - tripoint_bub_ms loc_2 = get_map().bub_from_abs( get_tripoint_from_var( loc_var_2, d, false ) ); + tripoint_bub_ms loc_1 = get_map().get_bub( get_tripoint_from_var( loc_var_1, d, false ) ); + tripoint_bub_ms loc_2 = get_map().get_bub( get_tripoint_from_var( loc_var_2, d, false ) ); return get_map().sees( loc_1, loc_2, range.evaluate( d ), with_fields ); }; @@ -1756,9 +1756,9 @@ conditional_t::func f_query_tile( const JsonObject &jo, std::string_view member, } } else if( type == "around" ) { if( !message.empty() ) { - loc = choose_adjacent_bub( message ); + loc = choose_adjacent( message ); } else { - loc = choose_adjacent_bub( _( "Choose direction" ) ); + loc = choose_adjacent( _( "Choose direction" ) ); } } else { debugmsg( string_format( "Invalid selection type: %s", type ) ); @@ -1766,7 +1766,7 @@ conditional_t::func f_query_tile( const JsonObject &jo, std::string_view member, } if( loc.has_value() ) { - tripoint_abs_ms pos_global = get_map().getglobal( *loc ); + tripoint_abs_ms pos_global = get_map().get_abs( *loc ); write_var_value( target_var.type, target_var.name, d, pos_global.to_string() ); } @@ -1804,7 +1804,7 @@ conditional_t::func f_map_ter_furn_with_flag( const JsonObject &jo, std::string_ terrain = false; } return [terrain, furn_type, loc_var]( const_dialogue const & d ) { - tripoint_bub_ms loc = get_map().bub_from_abs( get_tripoint_from_var( loc_var, d, false ) ); + tripoint_bub_ms loc = get_map().get_bub( get_tripoint_from_var( loc_var, d, false ) ); if( terrain ) { return get_map().ter( loc )->has_flag( furn_type.evaluate( d ) ); } else { @@ -1819,7 +1819,7 @@ conditional_t::func f_map_ter_furn_id( const JsonObject &jo, std::string_view me var_info loc_var = read_var_info( jo.get_object( "loc" ) ); return [member, furn_type, loc_var]( const_dialogue const & d ) { - tripoint_bub_ms loc = get_map().bub_from_abs( get_tripoint_from_var( loc_var, d, false ) ); + tripoint_bub_ms loc = get_map().get_bub( get_tripoint_from_var( loc_var, d, false ) ); if( member == "map_terrain_id" ) { return get_map().ter( loc ) == ter_id( furn_type.evaluate( d ) ); } else if( member == "map_furniture_id" ) { @@ -2148,7 +2148,7 @@ conditional_t::func f_can_see_location( const JsonObject &jo, std::string_view m str_or_var target = get_str_or_var( jo.get_member( member ), member, true ); return [is_npc, target]( const_dialogue const & d ) { tripoint_abs_ms target_pos = tripoint_abs_ms( tripoint::from_string( target.evaluate( d ) ) ); - return d.const_actor( is_npc )->can_see_location( get_map().bub_from_abs( target_pos ) ); + return d.const_actor( is_npc )->can_see_location( get_map().get_bub( target_pos ) ); }; } @@ -2205,7 +2205,7 @@ static std::function get_get_str_( const JsonObject str_or_var target = get_str_or_var( jo.get_member( "target" ), "target" ); bool use_beta_talker = mutator == "npc_loc_relative"; return [target, use_beta_talker, ret_func]( const_dialogue const & d ) { - tripoint_abs_ms char_pos = get_map().getglobal( d.const_actor( use_beta_talker )->pos_bub() ); + tripoint_abs_ms char_pos = get_map().get_abs( d.const_actor( use_beta_talker )->pos_bub() ); tripoint_abs_ms target_pos = char_pos + tripoint::from_string( target.evaluate( d ) ); return ret_func( target_pos.to_string() ); }; diff --git a/src/construction.cpp b/src/construction.cpp index a44159943bbc3..2fc0a8ed475cd 100644 --- a/src/construction.cpp +++ b/src/construction.cpp @@ -424,7 +424,6 @@ static shared_ptr_fast construction_preview_callback( return make_shared_fast( [&]() { map &here = get_map(); // Draw construction result preview on valid squares - // TODO: fix point types for( const auto &elem : valid ) { const tripoint_bub_ms &loc = elem.first; const construction &con = *elem.second; @@ -1316,7 +1315,7 @@ void place_construction( std::vector const &groups ) player_character.invalidate_crafting_inventory(); player_character.invalidate_weight_carried_cache(); player_character.assign_activity( ACT_BUILD ); - player_character.activity.placement = here.getglobal( pnt ); + player_character.activity.placement = here.get_abs( pnt ); } void complete_construction( Character *you ) @@ -1326,7 +1325,7 @@ void complete_construction( Character *you ) return; } map &here = get_map(); - const tripoint_bub_ms terp = here.bub_from_abs( you->activity.placement ); + const tripoint_bub_ms terp = here.get_bub( you->activity.placement ); partial_con *pc = here.partial_con_at( terp ); if( !pc ) { debugmsg( "No partial construction found at activity placement in complete_construction()" ); @@ -2059,58 +2058,20 @@ void construct::do_turn_deconstruct( const tripoint_bub_ms &p, Character &who ) get_option( "QUERY_DECONSTRUCT" ) ) { bool cancel_construction = false; - auto deconstruct_items = []( const item_group_id & drop_group ) { - std::string ret; - const Item_spawn_data *spawn_data = item_group::spawn_data_from_group( drop_group ); - if( spawn_data == nullptr ) { - return ret; - } - const std::map> deconstruct_items = - spawn_data->every_item_min_max(); - for( const auto &deconstruct_item : deconstruct_items ) { - const int &min = deconstruct_item.second.first; - const int &max = deconstruct_item.second.second; - if( min != max ) { - ret += string_format( "- %d-%d %s\n", min, max, deconstruct_item.first->nname( max ) ); - } else { - ret += string_format( "- %d %s\n", max, deconstruct_item.first->nname( max ) ); - } - } - return ret; - }; - auto deconstruction_will_practice_skill = [&who]( auto & skill ) { - return who.get_skill_level( skill.id ) >= skill.min && - who.get_skill_level( skill.id ) < skill.max; - }; - - auto deconstruct_query = [&who, &cancel_construction, &deconstruction_will_practice_skill, - &deconstruct_items]( map_common_deconstruct_info & deconstruct, std::string & name ) { - if( !!deconstruct.skill && - deconstruction_will_practice_skill( deconstruct.skill.value() ) ) { - cancel_construction = !who.query_yn( - _( "Deconstructing the %s will yield:\n%s\nYou feel you might also learn something about %s.\nReally deconstruct?" ), - name, deconstruct_items( deconstruct.drop_group ), deconstruct.skill->id.obj().name() ); - } else { - cancel_construction = !who.query_yn( - _( "Deconstructing the %s will yield:\n%s\nReally deconstruct?" ), - name, deconstruct_items( deconstruct.drop_group ) ); - } + auto deconstruct_query = [&]( const std::string & info ) { + cancel_construction = !who.query_yn( string_format( _( "%s\nConfirm deconstruct?" ), info ) ); }; std::string tname; if( here.has_furn( p ) ) { const furn_t &f = here.furn( p ).obj(); if( f.deconstruct ) { - map_furn_deconstruct_info deconstruct = f.deconstruct.value(); - tname = f.name(); - deconstruct_query( deconstruct, tname ); + deconstruct_query( f.deconstruct->potential_deconstruct_items( f.name() ) ); } } else { const ter_t &t = here.ter( p ).obj(); if( t.deconstruct ) { - map_ter_deconstruct_info deconstruct = t.deconstruct.value(); - tname = t.name(); - deconstruct_query( deconstruct, tname ); + deconstruct_query( t.deconstruct->potential_deconstruct_items( t.name() ) ); } } if( cancel_construction ) { @@ -2122,10 +2083,8 @@ void construct::do_turn_deconstruct( const tripoint_bub_ms &p, Character &who ) void construct::do_turn_shovel( const tripoint_bub_ms &p, Character &who ) { - // TODO: fix point types sfx::play_activity_sound( "tool", "shovel", sfx::get_heard_volume( p ) ); if( calendar::once_every( 1_minutes ) ) { - // TODO: fix point types //~ Sound of a shovel digging a pit at work! sounds::sound( p, 10, sounds::sound_t::activity, _( "hsh!" ) ); } diff --git a/src/coordinate_conversions.h b/src/coordinate_conversions.h index ad71d952220d8..daeb3d587060a 100644 --- a/src/coordinate_conversions.h +++ b/src/coordinate_conversions.h @@ -10,7 +10,7 @@ * migrating to the new functions defined in coordinates.h. * * For documentation on coordinate systems in general see - * doc/POINTS_COORDINATES.md. + * doc/c++/POINTS_COORDINATES.md. * * Functions ending with _remain return the translated coordinates and diff --git a/src/coordinates.h b/src/coordinates.h index 4d45a59fac851..37a566a6c8ee9 100644 --- a/src/coordinates.h +++ b/src/coordinates.h @@ -91,7 +91,7 @@ constexpr scale scale_from_origin( origin o ) * * InBounds define if the point is guaranteed to be inbounds. * - * For more details see doc/POINTS_COORDINATES.md. + * For more details see doc/c++/POINTS_COORDINATES.md. */ template class coord_point_base diff --git a/src/coords_fwd.h b/src/coords_fwd.h index 7cb5daf04a7c9..4d97de1903604 100644 --- a/src/coords_fwd.h +++ b/src/coords_fwd.h @@ -57,7 +57,7 @@ using coord_point = * point_omt_ms is the position of a map square within an overmap terrain. * tripoint_rel_sm is a relative tripoint submap offset. * - * For more details see doc/POINTS_COORDINATES.md. + * For more details see doc/c++/POINTS_COORDINATES.md. */ /*@{*/ using point_rel_ms = coords::coord_point; diff --git a/src/crafting.cpp b/src/crafting.cpp index 499f951292609..be18137dd2bc2 100644 --- a/src/crafting.cpp +++ b/src/crafting.cpp @@ -766,17 +766,17 @@ static item_location set_item_inventory( Character &p, item &newit ) * Helper for @ref set_item_map_or_vehicle * This is needed to still get a valid item_location if overflow occurs */ -static item_location set_item_map( const tripoint &loc, item &newit ) +static item_location set_item_map( const tripoint_bub_ms &loc, item &newit ) { // Includes loc - for( const tripoint_bub_ms &tile : closest_points_first( tripoint_bub_ms( loc ), 2 ) ) { + for( const tripoint_bub_ms &tile : closest_points_first( loc, 2 ) ) { // Pass false to disallow overflow, null_item_reference indicates failure. item *it_on_map = &get_map().add_item_or_charges( tile, newit, false ); if( it_on_map != &null_item_reference() ) { - return item_location( map_cursor( tripoint_bub_ms( tile ) ), it_on_map ); + return item_location( map_cursor( tile ), it_on_map ); } } - debugmsg( "Could not place %s on map near (%d, %d, %d)", newit.tname(), loc.x, loc.y, loc.z ); + debugmsg( "Could not place %s on map near (%d, %d, %d)", newit.tname(), loc.x(), loc.y(), loc.z() ); return item_location(); } @@ -807,7 +807,7 @@ static item_location set_item_map_or_vehicle( const Character &p, const tripoint "Not enough space on the %1$s. drops the %2$s on the ground." ), vp->part().name(), newit.tname() ); - return set_item_map( loc.raw(), newit ); + return set_item_map( loc, newit ); } else { if( here.has_furn( loc ) ) { @@ -823,7 +823,7 @@ static item_location set_item_map_or_vehicle( const Character &p, const tripoint pgettext( "item", " puts the %s on the ground." ), newit.tname() ); } - return set_item_map( loc.raw(), newit ); + return set_item_map( loc, newit ); } } @@ -2926,7 +2926,6 @@ void Character::complete_disassemble( item_location &target, const recipe &dis ) item act_item = newit; if( act_item.has_temperature() ) { - // TODO: fix point types act_item.set_item_temperature( get_weather().get_temperature( loc ) ); } diff --git a/src/creature.cpp b/src/creature.cpp index 88374fe610a68..8bef92676f7d6 100644 --- a/src/creature.cpp +++ b/src/creature.cpp @@ -203,14 +203,9 @@ Creature &Creature::operator=( Creature && ) noexcept = default; Creature::~Creature() = default; -tripoint Creature::pos() const -{ - return Creature::pos_bub().raw(); -} - tripoint_bub_ms Creature::pos_bub() const { - return get_map().bub_from_abs( location ); + return get_map().get_bub( location ); } void Creature::setpos( const tripoint_bub_ms &p, bool check_gravity/* = true*/ ) @@ -236,7 +231,7 @@ bool Creature::will_be_cramped_in_vehicle_tile( const tripoint_abs_ms &loc ) con vehicle &veh = vp_there->vehicle(); std::vector cargo_parts; - cargo_parts = veh.get_parts_at( here.bub_from_abs( loc ), "CARGO", part_status_flag::any ); + cargo_parts = veh.get_parts_at( here.get_bub( loc ), "CARGO", part_status_flag::any ); units::volume capacity = 0_ml; units::volume free_cargo = 0_ml; @@ -251,7 +246,7 @@ bool Creature::will_be_cramped_in_vehicle_tile( const tripoint_abs_ms &loc ) con } if( capacity > 0_ml ) { // First, we'll try to squeeze in. Open-topped vehicle parts have more room to step over cargo. - if( !veh.enclosed_at( here.bub_from_abs( loc ) ) ) { + if( !veh.enclosed_at( here.get_bub( loc ) ) ) { free_cargo *= 1.2; } const creature_size size = get_size(); @@ -298,7 +293,7 @@ void Creature::move_to( const tripoint_abs_ms &loc ) void Creature::set_pos_only( const tripoint_bub_ms &p ) { - location = get_map().getglobal( p ); + location = get_map().get_abs( p ); } void Creature::set_location( const tripoint_abs_ms &loc ) @@ -615,11 +610,6 @@ bool Creature::sees( const Creature &critter ) const return visible( ch ); } -bool Creature::sees( const tripoint &t, bool is_avatar, int range_mod ) const -{ - return Creature::sees( tripoint_bub_ms( t ), is_avatar, range_mod ); -} - bool Creature::sees( const tripoint_bub_ms &t, bool is_avatar, int range_mod ) const { if( std::abs( posz() - t.z() ) > fov_3d_z_range ) { diff --git a/src/creature.h b/src/creature.h index 9385bd086d6fe..38480c268ab90 100644 --- a/src/creature.h +++ b/src/creature.h @@ -307,7 +307,6 @@ class Creature : public viewer /** Sets a Creature's fake boolean. */ virtual void set_fake( bool fake_value ); // TODO: fix point types (remove pos() and rename pos_bub() to be the new pos()) - tripoint pos() const; tripoint_bub_ms pos_bub() const; inline int posx() const { return pos_bub().x(); @@ -393,8 +392,6 @@ class Creature : public viewer */ /*@{*/ bool sees( const Creature &critter ) const override; - // TODO: Get rid of untyped overload. - bool sees( const tripoint &t, bool is_avatar = false, int range_mod = 0 ) const override; bool sees( const tripoint_bub_ms &t, bool is_avatar = false, int range_mod = 0 ) const override; /*@}*/ diff --git a/src/creature_tracker.cpp b/src/creature_tracker.cpp index a2de1616cd238..0d41369055c57 100644 --- a/src/creature_tracker.cpp +++ b/src/creature_tracker.cpp @@ -294,16 +294,10 @@ void creature_tracker::remove_dead() removed_this_turn_.clear(); } -template -T *creature_tracker::creature_at( const tripoint &p, bool allow_hallucination ) -{ - return creature_at( get_map().getglobal( tripoint_bub_ms( p ) ), allow_hallucination ); -} - template T *creature_tracker::creature_at( const tripoint_bub_ms &p, bool allow_hallucination ) { - return creature_at( get_map().getglobal( p ), allow_hallucination ); + return creature_at( get_map().get_abs( p ), allow_hallucination ); } template @@ -420,16 +414,10 @@ void creature_tracker::flood_fill_zone( const Creature &origin ) } } -template -const T *creature_tracker::creature_at( const tripoint &p, bool allow_hallucination ) const -{ - return creature_at( get_map().getglobal( tripoint_bub_ms( p ) ), allow_hallucination ); -} - template const T *creature_tracker::creature_at( const tripoint_bub_ms &p, bool allow_hallucination ) const { - return creature_at( get_map().getglobal( p ), allow_hallucination ); + return creature_at( get_map().get_abs( p ), allow_hallucination ); } template @@ -438,39 +426,29 @@ const T *creature_tracker::creature_at( const tripoint_abs_ms &p, bool allow_hal return const_cast( this )->creature_at( p, allow_hallucination ); } -template const monster *creature_tracker::creature_at( const tripoint &, bool ) const; template const monster *creature_tracker::creature_at( const tripoint_bub_ms &, bool ) const; template const monster *creature_tracker::creature_at( const tripoint_abs_ms &, bool ) const; -template monster *creature_tracker::creature_at( const tripoint &, bool ); template monster *creature_tracker::creature_at( const tripoint_bub_ms &, bool ); template monster *creature_tracker::creature_at( const tripoint_abs_ms &, bool ); -template const npc *creature_tracker::creature_at( const tripoint &, bool ) const; template const npc *creature_tracker::creature_at( const tripoint_bub_ms &, bool ) const; template const npc *creature_tracker::creature_at( const tripoint_abs_ms &, bool ) const; -template npc *creature_tracker::creature_at( const tripoint &, bool ); template npc *creature_tracker::creature_at( const tripoint_bub_ms &, bool ); template npc *creature_tracker::creature_at( const tripoint_abs_ms &, bool ); -template const avatar *creature_tracker::creature_at( const tripoint &, bool ) const; template const avatar *creature_tracker::creature_at( const tripoint_bub_ms &, bool ) const; template const avatar *creature_tracker::creature_at( const tripoint_abs_ms &, bool ) const; -template avatar *creature_tracker::creature_at( const tripoint &, bool ); template avatar *creature_tracker::creature_at( const tripoint_bub_ms &, bool ); template avatar *creature_tracker::creature_at( const tripoint_abs_ms &, bool ); -template const Character *creature_tracker::creature_at( const tripoint &, bool ) const; template const Character *creature_tracker::creature_at( const tripoint_bub_ms &, bool ) const; template const Character *creature_tracker::creature_at( const tripoint_abs_ms &, bool ) const; -template Character *creature_tracker::creature_at( const tripoint &, bool ); template Character *creature_tracker::creature_at( const tripoint_bub_ms &, bool ); template Character *creature_tracker::creature_at( const tripoint_abs_ms &, bool ); -template const Creature *creature_tracker::creature_at( const tripoint &, bool ) const; template const Creature *creature_tracker::creature_at( const tripoint_bub_ms &, bool ) const; template const Creature *creature_tracker::creature_at( const tripoint_abs_ms &, bool ) const; -template Creature *creature_tracker::creature_at( const tripoint &, bool ); template Creature *creature_tracker::creature_at( const tripoint_bub_ms &, bool ); template Creature *creature_tracker::creature_at( const tripoint_abs_ms &, bool ); diff --git a/src/creature_tracker.h b/src/creature_tracker.h index f09eccdef58db..7110d26f3ffea 100644 --- a/src/creature_tracker.h +++ b/src/creature_tracker.h @@ -110,16 +110,10 @@ class creature_tracker * but it's not of the requested type, returns nullptr. * @param allow_hallucination Whether to return monsters that are actually hallucinations. */ - // TODO: fix point types (remove the first overload) - template - T * creature_at( const tripoint &p, bool allow_hallucination = false ); template T * creature_at( const tripoint_bub_ms &p, bool allow_hallucination = false ); template T * creature_at( const tripoint_abs_ms &p, bool allow_hallucination = false ); - // TODO: fix point types (remove the first overload) - template - const T * creature_at( const tripoint &p, bool allow_hallucination = false ) const; template const T * creature_at( const tripoint_bub_ms &p, bool allow_hallucination = false ) const; template diff --git a/src/debug.cpp b/src/debug.cpp index ce3ba7fd1998b..fc1d9d53879dd 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -707,7 +707,7 @@ void DebugFile::init( DebugOutput output_mode, const std::string &filename ) } } file = std::make_shared( - fs::u8path( filename ), std::ios::out | std::ios::app ); + std::filesystem::u8path( filename ), std::ios::out | std::ios::app ); *file << "\n\n-----------------------------------------\n"; *file << get_time() << " : Starting log."; DebugLog( D_INFO, D_MAIN ) << "Cataclysm DDA version " << getVersionString(); diff --git a/src/debug_menu.cpp b/src/debug_menu.cpp index 64f159a7c837a..310a8ff382286 100644 --- a/src/debug_menu.cpp +++ b/src/debug_menu.cpp @@ -337,16 +337,16 @@ tripoint _from_OM_string( std::string const &s ) return { om.x, om.y, 0 }; } -using rdi_t = fs::recursive_directory_iterator; -using f_validate_t = std::function; +using rdi_t = std::filesystem::recursive_directory_iterator; +using f_validate_t = std::function; -bool _add_dir( tgz_archiver &tgz, fs::path const &root, f_validate_t const &validate = {} ) +bool _add_dir( tgz_archiver &tgz, std::filesystem::path const &root, f_validate_t const &validate = {} ) { - fs::path const cnc = root.has_root_path() ? fs::canonical( root ) : root; - fs::path const parent_cnc = cnc.parent_path(); + std::filesystem::path const cnc = root.has_root_path() ? std::filesystem::canonical( root ) : root; + std::filesystem::path const parent_cnc = cnc.parent_path(); for( auto iter = rdi_t( cnc ); iter != rdi_t(); ++iter ) { - fs::path const dep = iter->path().lexically_relative( parent_cnc ); + std::filesystem::path const dep = iter->path().lexically_relative( parent_cnc ); if( validate && !validate( dep, iter ) ) { continue; @@ -361,16 +361,17 @@ bool _add_dir( tgz_archiver &tgz, fs::path const &root, f_validate_t const &vali return true; } -bool _trim_mapbuffer( fs::path const &dep, rdi_t &iter, tripoint_range const &segs, +bool _trim_mapbuffer( std::filesystem::path const &dep, rdi_t &iter, + tripoint_range const &segs, tripoint_range const ®s ) { // discard map memory outside of current region and adjacent regions - if( dep.parent_path().extension() == fs::u8path( ".mm1" ) && + if( dep.parent_path().extension() == std::filesystem::u8path( ".mm1" ) && !regs.is_point_inside( tripoint{ _from_map_string( dep.stem().string() ).xy(), 0 } ) ) { return false; } // discard map buffer outside of current and adjacent segments - if( dep.parent_path().filename() == fs::u8path( "maps" ) && + if( dep.parent_path().filename() == std::filesystem::u8path( "maps" ) && !segs.is_point_inside( tripoint{ _from_map_string( dep.filename().string() ).xy(), 0 } ) ) { iter.disable_recursion_pending(); @@ -379,7 +380,7 @@ bool _trim_mapbuffer( fs::path const &dep, rdi_t &iter, tripoint_range return true; } -bool _trim_overmapbuffer( fs::path const &dep, tripoint_range const &oms ) +bool _trim_overmapbuffer( std::filesystem::path const &dep, tripoint_range const &oms ) { std::string const fname = dep.filename().generic_u8string(); @@ -392,9 +393,9 @@ bool _trim_overmapbuffer( fs::path const &dep, tripoint_range const &o oms.is_point_inside( _from_OM_string( fname.substr( 2 ) ) ); } -bool _discard_temporary( fs::path const &dep ) +bool _discard_temporary( std::filesystem::path const &dep ) { - return !dep.has_extension() || dep.extension() != fs::u8path( ".temp" ); + return !dep.has_extension() || dep.extension() != std::filesystem::u8path( ".temp" ); } void write_min_archive() @@ -407,18 +408,19 @@ void write_min_archive() tripoint_abs_om const om = project_to( get_avatar().get_location() ); tripoint_range const oms = points_in_radius( tripoint{ om.raw().xy(), 0 }, 1 ); - fs::path const save_root( PATH_INFO::world_base_save_path() ); + std::filesystem::path const save_root( PATH_INFO::world_base_save_path() ); std::string const ofile = save_root.string() + "-trimmed.tar.gz"; tgz_archiver tgz( ofile ); - f_validate_t const mb_validate = [&segs, ®s, &oms]( fs::path const & dep, rdi_t & iter ) { + f_validate_t const mb_validate = [&segs, ®s, &oms]( std::filesystem::path const & dep, + rdi_t & iter ) { return _discard_temporary( dep ) && _trim_mapbuffer( dep, iter, segs, regs ) && _trim_overmapbuffer( dep, oms ); }; if( _add_dir( tgz, save_root, mb_validate ) && - _add_dir( tgz, fs::path( PATH_INFO::config_dir_path() ) ) ) { + _add_dir( tgz, std::filesystem::path( PATH_INFO::config_dir_path() ) ) ) { tgz.finalize(); popup( string_format( _( "Minimized archive saved to %s" ), ofile ) ); } @@ -541,7 +543,7 @@ static void normalize_body( Character &u ) static tripoint_abs_ms player_picks_tile() { std::optional newpos = g->look_around(); - return newpos ? get_map().getglobal( *newpos ) : get_player_character().get_location(); + return newpos ? get_map().get_abs( *newpos ) : get_player_character().get_location(); } static void monster_ammo_edit( monster &mon ) @@ -839,7 +841,7 @@ static void monster_edit_menu() } case D_TELE: { if( tripoint_abs_ms newpos = player_picks_tile(); newpos != get_avatar().get_location() ) { - critter->setpos( get_map().bub_from_abs( newpos ) ); + critter->setpos( get_map().get_bub( newpos ) ); } break; } @@ -1805,11 +1807,12 @@ static void teleport_overmap( bool specific_coordinates = false ) coord.z = coord_ints.size() >= 3 ? coord_ints[2] : 0; where = tripoint_abs_omt( OMAPX * coord.x, OMAPY * coord.y, coord.z ); } else { - const std::optional dir_ = choose_direction( _( "Where is the desired overmap?" ) ); + const std::optional dir_ = choose_direction( + _( "Where is the desired overmap?" ) ); if( !dir_ ) { return; } - const tripoint offset = tripoint( OMAPX * dir_->x, OMAPY * dir_->y, dir_->z ); + const tripoint offset = tripoint( OMAPX * dir_->x(), OMAPY * dir_->y(), dir_->z() ); where = player_character.global_omt_location() + offset; } g->place_player_overmap( where ); @@ -1853,13 +1856,13 @@ static void spawn_nested_mapgen() } map &here = get_map(); - const tripoint_abs_ms abs_ms( here.getglobal( *where ) ); + const tripoint_abs_ms abs_ms( here.get_abs( *where ) ); const tripoint_abs_omt abs_omt = project_to( abs_ms ); const tripoint_abs_sm abs_sub = project_to( abs_ms ); map target_map; target_map.load( abs_sub, true ); - const tripoint_bub_ms local_ms = target_map.bub_from_abs( abs_ms ); + const tripoint_bub_ms local_ms = target_map.get_bub( abs_ms ); mapgendata md( abs_omt, target_map, 0.0f, calendar::turn, nullptr ); const auto &ptr = nested_mapgens[nest_ids[nest_choice]].funcs().pick(); if( ptr == nullptr ) { diff --git a/src/debug_menu.h b/src/debug_menu.h index 093e31c424697..af2a5f23c0268 100644 --- a/src/debug_menu.h +++ b/src/debug_menu.h @@ -123,7 +123,7 @@ void wishitem( Character *you = nullptr ); void wishitem( Character *you, const tripoint_bub_ms & ); // Shows a menu to debug item groups. Spawns items if test is false, otherwise displays would be spawned items. void wishitemgroup( bool test ); -void wishmonster( const std::optional &p ); +void wishmonster( const std::optional &p ); void wishmonstergroup( tripoint_abs_omt &loc ); void wishmonstergroup_mon_selection( mongroup &group ); void wishmutate( Character *you ); diff --git a/src/editmap.cpp b/src/editmap.cpp index e199394f662a0..290498c65dea3 100644 --- a/src/editmap.cpp +++ b/src/editmap.cpp @@ -500,7 +500,7 @@ void editmap::uber_draw_ter( const catacurses::window &w, map *m ) monster *mon = dynamic_cast( critter ); if( mon != nullptr && mon->has_dest() ) { for( auto &location : line_to( mon->get_location(), mon->get_dest() ) ) { - hilights["mplan"].points[m->bub_from_abs( location )] = 1; + hilights["mplan"].points[m->get_bub( location )] = 1; } } } @@ -2070,8 +2070,8 @@ void editmap::mapgen_retarget() ui_manager::redraw(); action = ctxt.handle_input( get_option( "BLINK_SPEED" ) ); - if( const std::optional vec = ctxt.get_direction( action ) ) { - point_rel_ms vec_ms = coords::project_to( point_rel_omt( vec->xy() ) ); + if( const std::optional vec = ctxt.get_direction_rel_omt( action ) ) { + point_rel_ms vec_ms = coords::project_to( vec->xy() ); tripoint_bub_ms ptarget = target + vec_ms; if( get_map().inbounds( ptarget ) && get_map().inbounds( ptarget + point( SEEX, SEEY ) ) ) { @@ -2129,13 +2129,13 @@ void editmap::edit_mapgen() map &here = get_map(); do { - tc.fromabs( here.getglobal( { target.xy(), here.abs_sub.z() } ).xy().raw() ); - point_bub_ms omt_lpos = here.bub_from_abs( point_abs_ms( tc.begin_om_pos() ) ); + tc.fromabs( here.get_abs( { target.xy(), here.abs_sub.z() } ).xy().raw() ); + point_bub_ms omt_lpos = here.get_bub( point_abs_ms( tc.begin_om_pos() ) ); tripoint_bub_ms om_ltarget = omt_lpos + tripoint( -1 + SEEX, -1 + SEEY, target.z() ); if( target.x() != om_ltarget.x() || target.y() != om_ltarget.y() ) { target = om_ltarget; - tc.fromabs( here.getglobal( { target.xy(), here.abs_sub.z() } ).xy().raw() ); + tc.fromabs( here.get_abs( { target.xy(), here.abs_sub.z() } ).xy().raw() ); } target_list.clear(); for( int x = target.x() - SEEX + 1; x < target.x() + SEEX + 1; x++ ) { diff --git a/src/explosion.cpp b/src/explosion.cpp index 6da4efb29a794..c735a95d2d04b 100644 --- a/src/explosion.cpp +++ b/src/explosion.cpp @@ -282,10 +282,10 @@ static void do_blast( map *m, const Creature *source, const tripoint_bub_ms &p, // Draw the explosion, but only if the explosion center is within the reality bubble map &bubble_map = get_map(); - if( bubble_map.inbounds( m->getglobal( p ) ) ) { + if( bubble_map.inbounds( m->get_abs( p ) ) ) { std::map explosion_colors; for( const tripoint_bub_ms &pt : closed ) { - const tripoint_bub_ms bubble_pos( bubble_map.bub_from_abs( m->getglobal( pt ) ) ); + const tripoint_bub_ms bubble_pos( bubble_map.get_bub( m->get_abs( pt ) ) ); if( !bubble_map.inbounds( bubble_pos ) ) { continue; @@ -337,7 +337,7 @@ static void do_blast( map *m, const Creature *source, const tripoint_bub_ms &p, } // Translate to reality bubble coordinates to work with the creature tracker. - const tripoint_bub_ms bubble_pos( bubble_map.bub_from_abs( m->getglobal( pt ) ) ); + const tripoint_bub_ms bubble_pos( bubble_map.get_bub( m->get_abs( pt ) ) ); Creature *critter = creatures.creature_at( bubble_pos, true ); if( critter == nullptr ) { continue; @@ -459,7 +459,7 @@ static std::vector shrapnel( map *m, const Creature *source, distrib.emplace_back( target ); int damage = ballistic_damage( cloud.velocity, fragment_mass ); // Translate to reality bubble coordinates to work with the creature tracker. - const tripoint_bub_ms bubble_pos( bubble_map.bub_from_abs( m->getglobal( target ) ) ); + const tripoint_bub_ms bubble_pos( bubble_map.get_bub( m->get_abs( target ) ) ); Creature *critter = creatures.creature_at( bubble_pos ); if( damage > 0 && critter && !critter->is_dead_state() ) { std::poisson_distribution<> d( cloud.density ); @@ -538,14 +538,14 @@ bool explosion_processing_active() void explosion( const Creature *source, const tripoint_bub_ms &p, const explosion_data &ex ) { - _explosions.emplace_back( source, get_map().getglobal( p ), ex ); + _explosions.emplace_back( source, get_map().get_abs( p ), ex ); } void _make_explosion( map *m, const Creature *source, const tripoint_bub_ms &p, const explosion_data &ex ) { - if( get_map().inbounds( m->getglobal( p ) ) ) { - tripoint_bub_ms bubble_pos = get_map().bub_from_abs( m->getglobal( p ) ); + if( get_map().inbounds( m->get_abs( p ) ) ) { + tripoint_bub_ms bubble_pos = get_map().get_bub( m->get_abs( p ) ); int noise = ex.power * ( ex.fire ? 2 : 10 ); noise = ( noise > ex.max_noise ) ? ex.max_noise : noise; @@ -896,8 +896,7 @@ void resonance_cascade( const tripoint_bub_ms &p ) break; } if( !one_in( 3 ) ) { - // TODO: fix point types - here.add_field( tripoint_bub_ms{ k, l, p.z()}, type, 3 ); + here.add_field( { k, l, p.z()}, type, 3 ); } } } @@ -919,7 +918,7 @@ void resonance_cascade( const tripoint_bub_ms &p ) std::vector spawn_details = MonsterGroupManager::GetResultFromGroup( GROUP_NETHER ); for( const MonsterGroupResult &mgr : spawn_details ) { - g->place_critter_at( mgr.name, dest ); + g->place_critter_at( mgr.id, dest ); } } break; @@ -958,7 +957,7 @@ void process_explosions() for( const queued_explosion &ex : explosions_copy ) { const int safe_range = ex.data.safe_range(); map *bubble_map = &get_map(); - const tripoint_bub_ms bubble_pos( bubble_map->bub_from_abs( ex.pos ) ); + const tripoint_bub_ms bubble_pos( bubble_map->get_bub( ex.pos ) ); if( bubble_pos.x() - safe_range < 0 || bubble_pos.x() + safe_range > MAPSIZE_X || bubble_pos.y() - safe_range < 0 || bubble_pos.y() + safe_range > MAPSIZE_Y ) { @@ -971,9 +970,9 @@ void process_explosions() process_explosions_in_progress = true; m.load( origo, false, false ); process_explosions_in_progress = false; - _make_explosion( &m, ex.source, m.bub_from_abs( ex.pos ), ex.data ); + _make_explosion( &m, ex.source, m.get_bub( ex.pos ), ex.data ); } else { - _make_explosion( bubble_map, ex.source, bubble_map->bub_from_abs( ex.pos ), ex.data ); + _make_explosion( bubble_map, ex.source, bubble_map->get_bub( ex.pos ), ex.data ); } } } diff --git a/src/faction_camp.cpp b/src/faction_camp.cpp index d7d43a6774460..3a57b685d7131 100644 --- a/src/faction_camp.cpp +++ b/src/faction_camp.cpp @@ -1986,7 +1986,7 @@ npc_ptr basecamp::start_mission( const mission_id &miss_id, time_duration total_ std::vector src_set_pt; src_set_pt.resize( src_set.size() ); for( const tripoint_abs_ms &p : src_set ) { - src_set_pt.emplace_back( target_map.bub_from_abs( p ) ); + src_set_pt.emplace_back( target_map.get_bub( p ) ); } for( item *i : equipment ) { int count = i->count(); @@ -2161,7 +2161,7 @@ void basecamp::remove_camp( const tripoint_abs_omt &omt_pos ) const const tripoint_abs_ms ms_pos = coords::project_to( sm_pos ); // We cannot use bb_pos here, because bb_pos may be {0,0,0} if you haven't examined the bulletin board on camp ever. // here.remove_submap_camp( here.getlocal( bb_pos ) ); - here.remove_submap_camp( here.bub_from_abs( ms_pos ) ); + here.remove_submap_camp( here.get_bub( ms_pos ) ); } void basecamp::abandon_camp() @@ -4871,7 +4871,7 @@ void basecamp::hunting_results( int skill, const mission_id &miss_id, int attemp void basecamp::make_corpse_from_group( const std::vector &group ) { for( const MonsterGroupResult &monster : group ) { - const mtype_id target = monster.name; + const mtype_id target = monster.id; item result = item::make_corpse( target, calendar::turn, "" ); if( !result.is_null() ) { int num_to_spawn = monster.pack_size; @@ -5923,7 +5923,7 @@ bool basecamp::distribute_food( bool player_command ) // @FIXME: items under a vehicle cargo part will get taken even if there's no non-vehicle zone there // @FIXME: items in a vehicle cargo part will get taken even if the zone is on the ground underneath for( const tripoint_abs_ms &p_food_stock_abs : z_food ) { - const tripoint_bub_ms p_food_stock = here.bub_from_abs( p_food_stock_abs ); + const tripoint_bub_ms p_food_stock = here.get_bub( p_food_stock_abs ); map_stack items = here.i_at( p_food_stock ); for( auto iter = items.begin(); iter != items.end(); ) { if( consume( *iter, nullptr ) ) { @@ -6137,7 +6137,7 @@ void basecamp::place_results( const item &result ) { map &target_bay = get_camp_map(); form_storage_zones( target_bay, bb_pos ); - tripoint_bub_ms new_spot = target_bay.bub_from_abs( get_dumping_spot() ); + tripoint_bub_ms new_spot = target_bay.get_bub( get_dumping_spot() ); // Special handling for liquids // find any storage-zoned LIQUIDCONT we can dump them in, set that as the item's destination instead if( result.made_of( phase_id::LIQUID ) ) { @@ -6145,8 +6145,8 @@ void basecamp::place_results( const item &result ) // No items at a potential spot? Set the destination there and stop checking. // We could check if the item at the tile are the same as the item we're placing, but liquids of the same typeid // don't always mix depending on their components... - if( target_bay.i_at( target_bay.bub_from_abs( potential_spot ) ).empty() ) { - new_spot = target_bay.bub_from_abs( potential_spot ); + if( target_bay.i_at( target_bay.get_bub( potential_spot ) ).empty() ) { + new_spot = target_bay.get_bub( potential_spot ); break; } // We've processed the last spot and haven't found anywhere to put it, we'll end up using dumping_spot. diff --git a/src/filesystem.cpp b/src/filesystem.cpp index 4c6565cf5b0ed..786e74154731b 100644 --- a/src/filesystem.cpp +++ b/src/filesystem.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -67,7 +68,7 @@ static const std::string invalid_chars = "\\/:?\"<>|"; bool assure_dir_exist( const std::string &path ) { - return assure_dir_exist( fs::u8path( path ) ); + return assure_dir_exist( std::filesystem::u8path( path ) ); } bool assure_dir_exist( const cata_path &path ) @@ -75,26 +76,26 @@ bool assure_dir_exist( const cata_path &path ) return assure_dir_exist( path.get_unrelative_path() ); } -bool assure_dir_exist( const fs::path &path ) +bool assure_dir_exist( const std::filesystem::path &path ) { setFsNeedsSync(); std::error_code ec; bool exists{false}; bool created{false}; - const fs::path p = fs::u8path( as_norm_dir( path ) ); - bool is_dir{ fs::is_directory( p, ec ) }; + const std::filesystem::path p = std::filesystem::u8path( as_norm_dir( path ) ); + bool is_dir{ std::filesystem::is_directory( p, ec ) }; if( !is_dir ) { - exists = fs::exists( p, ec ); + exists = std::filesystem::exists( p, ec ); if( !exists ) { if( !is_lexically_valid( p ) ) { return false; } - created = fs::create_directories( p, ec ); + created = std::filesystem::create_directories( p, ec ); if( !created ) { // TEMPORARY until we drop VS2019 support // VS2019 std::filesystem doesn't handle trailing slashes well in this // situation. We think this is a bug. Work around it by checking again - created = fs::exists( p, ec ); + created = std::filesystem::exists( p, ec ); } } } @@ -104,34 +105,35 @@ bool assure_dir_exist( const fs::path &path ) bool dir_exist( const std::string &path ) { - return dir_exist( fs::u8path( path ) ); + return dir_exist( std::filesystem::u8path( path ) ); } -bool dir_exist( const fs::path &path ) +bool dir_exist( const std::filesystem::path &path ) { - return fs::is_directory( path ); + return std::filesystem::is_directory( path ); } bool file_exist( const std::string &path ) { - return file_exist( fs::u8path( path ) ); + return file_exist( std::filesystem::u8path( path ) ); } -bool file_exist( const fs::path &path ) +bool file_exist( const std::filesystem::path &path ) { - return fs::exists( path ) && !fs::is_directory( path ); + return std::filesystem::exists( path ) && !std::filesystem::is_directory( path ); } bool file_exist( const cata_path &path ) { - const fs::path unrelative_path = path.get_unrelative_path(); - return fs::exists( unrelative_path ) && !fs::is_directory( unrelative_path ); + const std::filesystem::path unrelative_path = path.get_unrelative_path(); + return std::filesystem::exists( unrelative_path ) && + !std::filesystem::is_directory( unrelative_path ); } std::string as_norm_dir( const std::string &path ) { - fs::path dir = fs::u8path( path ) / fs::path{}; - fs::path norm = dir.lexically_normal(); + std::filesystem::path dir = std::filesystem::u8path( path ) / std::filesystem::path{}; + std::filesystem::path norm = dir.lexically_normal(); std::string ret = norm.generic_u8string(); if( "." == ret ) { ret = "./"; // TODO Change the many places that use strings instead of paths @@ -139,14 +141,14 @@ std::string as_norm_dir( const std::string &path ) return ret; } -std::string as_norm_dir( const fs::path &path ) +std::string as_norm_dir( const std::filesystem::path &path ) { return as_norm_dir( path.u8string() ); } bool remove_file( const std::string &path ) { - return remove_file( fs::u8path( path ) ); + return remove_file( std::filesystem::u8path( path ) ); } bool remove_file( const cata_path &path ) @@ -154,16 +156,16 @@ bool remove_file( const cata_path &path ) return remove_file( path.get_unrelative_path() ); } -bool remove_file( const fs::path &path ) +bool remove_file( const std::filesystem::path &path ) { setFsNeedsSync(); std::error_code ec; - return fs::remove( path, ec ); + return std::filesystem::remove( path, ec ); } bool rename_file( const std::string &old_path, const std::string &new_path ) { - return rename_file( fs::u8path( old_path ), fs::u8path( new_path ) ); + return rename_file( std::filesystem::u8path( old_path ), std::filesystem::u8path( new_path ) ); } bool rename_file( const cata_path &old_path, const cata_path &new_path ) @@ -171,34 +173,34 @@ bool rename_file( const cata_path &old_path, const cata_path &new_path ) return rename_file( old_path.get_unrelative_path(), new_path.get_unrelative_path() ); } -bool rename_file( const fs::path &old_path, const fs::path &new_path ) +bool rename_file( const std::filesystem::path &old_path, const std::filesystem::path &new_path ) { setFsNeedsSync(); std::error_code ec; - fs::rename( old_path, new_path, ec ); + std::filesystem::rename( old_path, new_path, ec ); return !ec; } std::string abs_path( const std::string &path ) { - return abs_path( fs::u8path( path ) ).generic_u8string(); + return abs_path( std::filesystem::u8path( path ) ).generic_u8string(); } -fs::path abs_path( const fs::path &path ) +std::filesystem::path abs_path( const std::filesystem::path &path ) { - return fs::absolute( path ); + return std::filesystem::absolute( path ); } bool remove_directory( const std::string &path ) { - return remove_directory( fs::u8path( path ) ); + return remove_directory( std::filesystem::u8path( path ) ); } -bool remove_directory( const fs::path &path ) +bool remove_directory( const std::filesystem::path &path ) { std::error_code ec; setFsNeedsSync(); - return fs::remove( path, ec ); + return std::filesystem::remove( path, ec ); } const char *cata_files::eol() @@ -216,12 +218,12 @@ const char *cata_files::eol() std::string read_entire_file( const std::string &path ) { - std::ifstream infile( fs::u8path( path ), std::ifstream::in | std::ifstream::binary ); + std::ifstream infile( std::filesystem::u8path( path ), std::ifstream::in | std::ifstream::binary ); return std::string( std::istreambuf_iterator( infile ), std::istreambuf_iterator() ); } -std::string read_entire_file( const fs::path &path ) +std::string read_entire_file( const std::filesystem::path &path ) { std::ifstream infile( path, std::ifstream::in | std::ifstream::binary ); return std::string( std::istreambuf_iterator( infile ), @@ -234,21 +236,21 @@ namespace // For non-empty path, call function for each file at path. //-------------------------------------------------------------------------------------------------- template -void for_each_dir_entry( const fs::path &path, Function &&function ) +void for_each_dir_entry( const std::filesystem::path &path, Function &&function ) { if( path.empty() ) { return; } std::error_code ec; - auto dir_iter = fs::directory_iterator( path, ec ); + auto dir_iter = std::filesystem::directory_iterator( path, ec ); if( ec ) { std::string e_str = ec.message(); DebugLog( D_WARNING, D_MAIN ) << "opendir [" << path.generic_u8string() << "] failed with \"" << e_str << "\"."; return; } - for( const fs::directory_entry &dir_entry : dir_iter ) { + for( const std::filesystem::directory_entry &dir_entry : dir_iter ) { function( dir_entry ); } } @@ -256,7 +258,7 @@ void for_each_dir_entry( const fs::path &path, Function &&function ) //-------------------------------------------------------------------------------------------------- // Returns true if entry is a directory, false otherwise. //-------------------------------------------------------------------------------------------------- -bool is_directory( const fs::directory_entry &entry, const std::string &full_path ) +bool is_directory( const std::filesystem::directory_entry &entry, const std::string &full_path ) { // We do an extra dance here because directory_entry might not have a cached valid stat result. std::error_code ec; @@ -271,7 +273,7 @@ bool is_directory( const fs::directory_entry &entry, const std::string &full_pat return result; } -bool is_directory( const fs::directory_entry &entry ) +bool is_directory( const std::filesystem::directory_entry &entry ) { // We do an extra dance here because directory_entry might not have a cached valid stat result. std::error_code ec; @@ -291,7 +293,8 @@ bool is_directory( const fs::directory_entry &entry ) // If at_end is true, returns whether entry's name ends in match. // Otherwise, returns whether entry's name contains match. //-------------------------------------------------------------------------------------------------- -bool name_contains( const fs::directory_entry &entry, const std::string &match, const bool at_end, +bool name_contains( const std::filesystem::directory_entry &entry, const std::string &match, + const bool at_end, const bool match_path ) { std::string entry_name; @@ -331,14 +334,14 @@ std::vector find_file_if_bfs( const std::string &root_path, std::vector results; while( !directories.empty() ) { - const fs::path path = fs::u8path( directories.front() ); + const std::filesystem::path path = std::filesystem::u8path( directories.front() ); directories.pop_front(); const std::ptrdiff_t n_dirs = static_cast( directories.size() ); const std::ptrdiff_t n_results = static_cast( results.size() ); - // We could use fs::recursive_directory_iterator maybe - for_each_dir_entry( path, [&]( const fs::directory_entry & entry ) { + // We could use std::filesystem::recursive_directory_iterator maybe + for_each_dir_entry( path, [&]( const std::filesystem::directory_entry & entry ) { const std::string full_path = entry.path().generic_u8string(); // don't add files ending in '~'. @@ -377,22 +380,22 @@ std::vector find_file_if_bfs( const cata_path &root_path, Predicate predicate ) { cata_path norm_root_path = root_path.lexically_normal(); - std::deque directories{ norm_root_path.get_unrelative_path() }; - std::vector results; + std::deque directories{ norm_root_path.get_unrelative_path() }; + std::vector results; while( !directories.empty() ) { - const fs::path path = std::move( directories.front() ); + const std::filesystem::path path = std::move( directories.front() ); directories.pop_front(); const std::ptrdiff_t n_dirs = static_cast( directories.size() ); const std::ptrdiff_t n_results = static_cast( results.size() ); - // We could use fs::recursive_directory_iterator maybe - for_each_dir_entry( path, [&]( const fs::directory_entry & entry ) { - const fs::path &full_path = entry.path(); + // We could use std::filesystem::recursive_directory_iterator maybe + for_each_dir_entry( path, [&]( const std::filesystem::directory_entry & entry ) { + const std::filesystem::path &full_path = entry.path(); // don't add files ending in '~'. - fs::path filename = full_path.filename(); + std::filesystem::path filename = full_path.filename(); if( !filename.empty() && filename.generic_u8string().back() == '~' ) { return; } @@ -421,7 +424,7 @@ std::vector find_file_if_bfs( const cata_path &root_path, std::vector cps; cps.reserve( results.size() ); - for( const fs::path &result_path : results ) { + for( const std::filesystem::path &result_path : results ) { // Re-relativize paths against the root. cps.emplace_back( norm_root_path.get_logical_root(), result_path.lexically_relative( norm_root_path.get_logical_root_path() ) ); @@ -435,7 +438,8 @@ std::vector find_file_if_bfs( const cata_path &root_path, std::vector get_files_from_path( const std::string &pattern, const std::string &root_path, const bool recursive_search, const bool match_extension ) { - return find_file_if_bfs( root_path, recursive_search, [&]( const fs::directory_entry & entry, + return find_file_if_bfs( root_path, + recursive_search, [&]( const std::filesystem::directory_entry & entry, bool ) { return name_contains( entry, pattern, match_extension, false ); } ); @@ -443,7 +447,8 @@ std::vector get_files_from_path( const std::string &pattern, std::vector get_files_from_path( const std::string &pattern, const cata_path &root_path, const bool recursive_search, const bool match_extension ) { - return find_file_if_bfs( root_path, recursive_search, [&]( const fs::directory_entry & entry, + return find_file_if_bfs( root_path, + recursive_search, [&]( const std::filesystem::directory_entry & entry, bool ) { return name_contains( entry, pattern, match_extension, false ); } ); @@ -453,7 +458,8 @@ std::vector get_files_from_path_with_path_exclusion( const std::str const std::string &pattern_clash, const std::string &root_path, const bool recursive_search, const bool match_extension ) { - return find_file_if_bfs( root_path, recursive_search, [&]( const fs::directory_entry & entry, + return find_file_if_bfs( root_path, + recursive_search, [&]( const std::filesystem::directory_entry & entry, bool ) { return name_contains( entry, pattern, match_extension, false ) && !name_contains( entry, pattern_clash, false, true ); @@ -463,7 +469,8 @@ std::vector get_files_from_path_with_path_exclusion( const std::strin const std::string &pattern_clash, const cata_path &root_path, const bool recursive_search, const bool match_extension ) { - return find_file_if_bfs( root_path, recursive_search, [&]( const fs::directory_entry & entry, + return find_file_if_bfs( root_path, + recursive_search, [&]( const std::filesystem::directory_entry & entry, bool ) { return name_contains( entry, pattern, match_extension, false ) && !name_contains( entry, pattern_clash, false, true ); @@ -484,7 +491,8 @@ std::vector get_directories_with( const std::string &pattern, return std::vector(); } - auto files = find_file_if_bfs( root_path, recursive_search, [&]( const fs::directory_entry & entry, + auto files = find_file_if_bfs( root_path, + recursive_search, [&]( const std::filesystem::directory_entry & entry, bool ) { return name_contains( entry, pattern, true, false ); } ); @@ -506,7 +514,8 @@ std::vector get_directories_with( const std::string &pattern, return {}; } - auto files = find_file_if_bfs( root_path, recursive_search, [&]( const fs::directory_entry & entry, + auto files = find_file_if_bfs( root_path, + recursive_search, [&]( const std::filesystem::directory_entry & entry, bool ) { return name_contains( entry, pattern, true, false ); } ); @@ -538,7 +547,8 @@ std::vector get_directories_with( const std::vector &p const auto ext_beg = std::begin( patterns ); const auto ext_end = std::end( patterns ); - auto files = find_file_if_bfs( root_path, recursive_search, [&]( const fs::directory_entry & entry, + auto files = find_file_if_bfs( root_path, + recursive_search, [&]( const std::filesystem::directory_entry & entry, bool ) { return std::any_of( ext_beg, ext_end, [&]( const std::string & ext ) { return name_contains( entry, ext, true, false ); @@ -566,7 +576,8 @@ std::vector get_directories_with( const std::vector &pat const auto ext_beg = std::begin( patterns ); const auto ext_end = std::end( patterns ); - auto files = find_file_if_bfs( root_path, recursive_search, [&]( const fs::directory_entry & entry, + auto files = find_file_if_bfs( root_path, + recursive_search, [&]( const std::filesystem::directory_entry & entry, bool ) { return std::any_of( ext_beg, ext_end, [&]( const std::string & ext ) { return name_contains( entry, ext, true, false ); @@ -593,7 +604,8 @@ std::vector get_directories_with( const std::vector &pat std::vector get_directories( const std::string &root_path, const bool recursive_search ) { - auto files = find_file_if_bfs( root_path, recursive_search, [&]( const fs::directory_entry & entry, + auto files = find_file_if_bfs( root_path, + recursive_search, [&]( const std::filesystem::directory_entry & entry, bool ) { return dir_exist( entry.path() ); } ); @@ -611,7 +623,8 @@ std::vector get_directories( const std::string &root_path, */ std::vector get_directories( const cata_path &root_path, const bool recursive_search ) { - auto files = find_file_if_bfs( root_path, recursive_search, [&]( const fs::directory_entry & entry, + auto files = find_file_if_bfs( root_path, + recursive_search, [&]( const std::filesystem::directory_entry & entry, bool ) { return dir_exist( entry.path() ); } ); @@ -623,7 +636,7 @@ std::vector get_directories( const cata_path &root_path, const bool r bool copy_file( const std::string &source_path, const std::string &dest_path ) { - std::ifstream source_stream( fs::u8path( source_path ), + std::ifstream source_stream( std::filesystem::u8path( source_path ), std::ifstream::in | std::ifstream::binary ); if( !source_stream ) { return false; @@ -663,10 +676,10 @@ std::string ensure_valid_file_name( const std::string &file_name ) } #if defined(_WIN32) -bool is_lexically_valid( const fs::path &path ) +bool is_lexically_valid( const std::filesystem::path &path ) { // Windows has strict rules for file naming - fs::path rel = path.relative_path(); + std::filesystem::path rel = path.relative_path(); // "Do not end a file or directory name with a space or a period." // https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions for( auto &it : rel ) { diff --git a/src/filesystem.h b/src/filesystem.h index d38defefc1102..ac5fe5e94746f 100644 --- a/src/filesystem.h +++ b/src/filesystem.h @@ -2,12 +2,11 @@ #ifndef CATA_SRC_FILESYSTEM_H #define CATA_SRC_FILESYSTEM_H +#include #include #include // IWYU pragma: keep #include -#include - #include "cata_path.h" #include "catacharset.h" #include "compatibility.h" @@ -27,29 +26,29 @@ std::string abs_path( const std::string &path ); std::string read_entire_file( const std::string &path ); -// Overloads of the above that take fs::path directly. -bool assure_dir_exist( const fs::path &path ); +// Overloads of the above that take std::filesystem::path directly. +bool assure_dir_exist( const std::filesystem::path &path ); bool assure_dir_exist( const cata_path &path ); -bool dir_exist( const fs::path &path ); -bool file_exist( const fs::path &path ); +bool dir_exist( const std::filesystem::path &path ); +bool file_exist( const std::filesystem::path &path ); bool file_exist( const cata_path &path ); // Force 'path' to be a normalized directory std::string as_norm_dir( const std::string &path ); -std::string as_norm_dir( const fs::path &path ); +std::string as_norm_dir( const std::filesystem::path &path ); // Remove a file, does not remove folders, // returns true on success -bool remove_file( const fs::path &path ); +bool remove_file( const std::filesystem::path &path ); bool remove_file( const cata_path &path ); -bool remove_directory( const fs::path &path ); +bool remove_directory( const std::filesystem::path &path ); // Rename a file, overriding the target! -bool rename_file( const fs::path &old_path, const fs::path &new_path ); +bool rename_file( const std::filesystem::path &old_path, const std::filesystem::path &new_path ); bool rename_file( const cata_path &old_path, const cata_path &new_path ); -fs::path abs_path( const fs::path &path ); +std::filesystem::path abs_path( const std::filesystem::path &path ); -std::string read_entire_file( const fs::path &path ); +std::string read_entire_file( const std::filesystem::path &path ); namespace cata_files { @@ -135,9 +134,9 @@ std::string ensure_valid_file_name( const std::string &file_name ); #if defined(_WIN32) // On Windows, it checks for some validity of the path. See .cpp -bool is_lexically_valid( const fs::path & ); +bool is_lexically_valid( const std::filesystem::path & ); #else -constexpr bool is_lexically_valid( const fs::path & ) +constexpr bool is_lexically_valid( const std::filesystem::path & ) { return true; } diff --git a/src/filesystem_impl.cpp b/src/filesystem_impl.cpp deleted file mode 100644 index acdaaadc4621b..0000000000000 --- a/src/filesystem_impl.cpp +++ /dev/null @@ -1,2 +0,0 @@ -// We use the forwarding header in filesystem.h, so we have to include the implementation header in a different source file than filesystem.cpp. -#include diff --git a/src/flag.cpp b/src/flag.cpp index 3c854dd6028cd..cf08715074c5d 100644 --- a/src/flag.cpp +++ b/src/flag.cpp @@ -152,6 +152,7 @@ const flag_id flag_FROZEN( "FROZEN" ); const flag_id flag_FUNGAL_VECTOR( "FUNGAL_VECTOR" ); const flag_id flag_GAS_DISCOUNT( "GAS_DISCOUNT" ); const flag_id flag_GAS_PROOF( "GAS_PROOF" ); +const flag_id flag_GENE_TECH( "GENE_TECH" ); const flag_id flag_GIBBED( "GIBBED" ); const flag_id flag_GNV_EFFECT( "GNV_EFFECT" ); const flag_id flag_HARD( "HARD" ); diff --git a/src/flag.h b/src/flag.h index f281506dcae1f..14b24cad2f590 100644 --- a/src/flag.h +++ b/src/flag.h @@ -160,6 +160,7 @@ extern const flag_id flag_FROZEN; extern const flag_id flag_FUNGAL_VECTOR; extern const flag_id flag_GAS_DISCOUNT; extern const flag_id flag_GAS_PROOF; +extern const flag_id flag_GENE_TECH; extern const flag_id flag_GIBBED; extern const flag_id flag_GNV_EFFECT; extern const flag_id flag_HARVEST_SEEDS; diff --git a/src/flexbuffer_cache.cpp b/src/flexbuffer_cache.cpp index f506a5810106f..dbc47b8851ab1 100644 --- a/src/flexbuffer_cache.cpp +++ b/src/flexbuffer_cache.cpp @@ -42,15 +42,16 @@ void try_find_and_throw_json_error( TextJsonValue &jv ) } } -fs::file_time_type get_file_mtime_millis( const fs::path &path, std::error_code &ec ) +std::filesystem::file_time_type get_file_mtime_millis( const std::filesystem::path &path, + std::error_code &ec ) { - fs::file_time_type ret = fs::last_write_time( path, ec ); + std::filesystem::file_time_type ret = std::filesystem::last_write_time( path, ec ); if( ec ) { return ret; } // Truncate to nearest millisecond. - ret = fs::file_time_type( std::chrono::milliseconds( - std::chrono::duration_cast( ret.time_since_epoch() ).count() ) ); + ret = std::filesystem::file_time_type( std::chrono::milliseconds( + std::chrono::duration_cast( ret.time_since_epoch() ).count() ) ); return ret; } @@ -164,8 +165,8 @@ parsed_flexbuffer::parsed_flexbuffer( std::shared_ptr storag struct file_flexbuffer : parsed_flexbuffer { file_flexbuffer( std::shared_ptr &&storage, - fs::path &&source_file_path, - fs::file_time_type mtime, + std::filesystem::path &&source_file_path, + std::filesystem::file_time_type mtime, size_t offset ) : parsed_flexbuffer( std::move( storage ) ), source_file_path_{ std::move( source_file_path ) }, @@ -176,7 +177,7 @@ struct file_flexbuffer : parsed_flexbuffer { bool is_stale() const override { std::error_code ec; - fs::file_time_type mtime = get_file_mtime_millis( source_file_path_, ec ); + std::filesystem::file_time_type mtime = get_file_mtime_millis( source_file_path_, ec ); if( ec ) { // Assume yes out of date. return true; @@ -193,13 +194,13 @@ struct file_flexbuffer : parsed_flexbuffer { return ifs; } - fs::path get_source_path() const noexcept override { + std::filesystem::path get_source_path() const noexcept override { return source_file_path_; } private: - fs::path source_file_path_; - fs::file_time_type mtime_; + std::filesystem::path source_file_path_; + std::filesystem::file_time_type mtime_; std::streampos offset_; }; @@ -220,7 +221,7 @@ struct string_flexbuffer : parsed_flexbuffer { return std::make_unique( source_ ); } - fs::path get_source_path() const noexcept override { + std::filesystem::path get_source_path() const noexcept override { return {}; } @@ -231,8 +232,9 @@ struct string_flexbuffer : parsed_flexbuffer { class flexbuffer_disk_cache { public: - static std::unique_ptr init_from_folder( const fs::path &cache_path, - const fs::path &root_path ) { + static std::unique_ptr init_from_folder( const std::filesystem::path + &cache_path, + const std::filesystem::path &root_path ) { // Private constructor, make_unique doesn't have access. std::unique_ptr cache{ new flexbuffer_disk_cache( cache_path, root_path ) }; @@ -246,10 +248,10 @@ class flexbuffer_disk_cache for( const std::string &cached_flexbuffer : all_cached_flexbuffers ) { // The file path format is ..fb // So find the second-to-last-dot - fs::path cached_flexbuffer_path = fs::u8path( cached_flexbuffer ); - fs::path json_with_mtime = cached_flexbuffer_path.stem(); + std::filesystem::path cached_flexbuffer_path = std::filesystem::u8path( cached_flexbuffer ); + std::filesystem::path json_with_mtime = cached_flexbuffer_path.stem(); std::string mtime_str = json_with_mtime.extension().u8string(); - fs::path original_json_file_name = json_with_mtime.stem(); + std::filesystem::path original_json_file_name = json_with_mtime.stem(); if( mtime_str.empty() || original_json_file_name.empty() ) { // Not a recognized flexbuffer filename. remove_file( cached_flexbuffer ); @@ -257,13 +259,15 @@ class flexbuffer_disk_cache } // Explicit constructor from milliseconds to file_time_type. - fs::file_time_type cached_mtime = fs::file_time_type( std::chrono::milliseconds( std::strtoull( - // extension() returns a string with the leading . - mtime_str.c_str() + 1, - nullptr, 0 ) ) ); - - fs::path root_relative_json_path = cached_flexbuffer_path.parent_path().lexically_relative( - cache_path ) / original_json_file_name; + std::filesystem::file_time_type cached_mtime = std::filesystem::file_time_type( + std::chrono::milliseconds( std::strtoull( + // extension() returns a string with the leading . + mtime_str.c_str() + 1, + nullptr, 0 ) ) ); + + std::filesystem::path root_relative_json_path = + cached_flexbuffer_path.parent_path().lexically_relative( + cache_path ) / original_json_file_name; std::string root_relative_json_path_string = root_relative_json_path.u8string(); // Don't just blindly insert, we may end up in a situation with multiple flexbuffers for the same input json @@ -285,11 +289,12 @@ class flexbuffer_disk_cache return cache; } - bool has_cached_flexbuffer_for_json( const fs::path &json_source_path ) { + bool has_cached_flexbuffer_for_json( const std::filesystem::path &json_source_path ) { return cached_flexbuffers_.count( json_source_path.u8string() ) > 0; } - fs::file_time_type cached_mtime_for_json( const fs::path &json_source_path ) { + std::filesystem::file_time_type cached_mtime_for_json( const std::filesystem::path + &json_source_path ) { auto it = cached_flexbuffers_.find( json_source_path.u8string() ); if( it != cached_flexbuffers_.end() ) { return it->second.mtime; @@ -298,10 +303,11 @@ class flexbuffer_disk_cache } std::shared_ptr load_flexbuffer_if_not_stale( - const fs::path &lexically_normal_json_source_path ) { + const std::filesystem::path &lexically_normal_json_source_path ) { std::shared_ptr storage; - fs::path root_relative_source_path = lexically_normal_json_source_path.lexically_relative( + std::filesystem::path root_relative_source_path = + lexically_normal_json_source_path.lexically_relative( root_path_ ).lexically_normal(); // Is there even a potential cached flexbuffer for this file. @@ -311,7 +317,8 @@ class flexbuffer_disk_cache } std::error_code ec; - fs::file_time_type source_mtime = get_file_mtime_millis( lexically_normal_json_source_path, ec ); + std::filesystem::file_time_type source_mtime = get_file_mtime_millis( + lexically_normal_json_source_path, ec ); if( ec ) { return storage; } @@ -336,11 +343,12 @@ class flexbuffer_disk_cache return storage; } - bool save_to_disk( const fs::path &lexically_normal_json_source_path, + bool save_to_disk( const std::filesystem::path &lexically_normal_json_source_path, const std::vector &flexbuffer_binary ) { std::error_code ec; std::string json_source_path_string = lexically_normal_json_source_path.u8string(); - fs::file_time_type mtime = get_file_mtime_millis( lexically_normal_json_source_path, ec ); + std::filesystem::file_time_type mtime = get_file_mtime_millis( lexically_normal_json_source_path, + ec ); if( ec ) { return false; } @@ -349,13 +357,14 @@ class flexbuffer_disk_cache ( mtime.time_since_epoch() ).count(); // Doing some variable reuse to avoid copies. - fs::path flexbuffer_path = ( cache_path_ / lexically_normal_json_source_path.lexically_relative( - root_path_ ) ).remove_filename(); + std::filesystem::path flexbuffer_path = ( cache_path_ / + lexically_normal_json_source_path.lexically_relative( + root_path_ ) ).remove_filename(); assure_dir_exist( flexbuffer_path ); - fs::path flexbuffer_filename = lexically_normal_json_source_path.filename(); - flexbuffer_filename += fs::u8path( "." + std::to_string( mtime_ms ) + ".fb" ); + std::filesystem::path flexbuffer_filename = lexically_normal_json_source_path.filename(); + flexbuffer_filename += std::filesystem::u8path( "." + std::to_string( mtime_ms ) + ".fb" ); flexbuffer_path /= flexbuffer_filename; std::ofstream fb( flexbuffer_path, std::ofstream::binary ); if( !fb.good() ) { @@ -374,22 +383,23 @@ class flexbuffer_disk_cache } private: - explicit flexbuffer_disk_cache( fs::path cache_path, fs::path root_path ) : cache_path_{ std::move( cache_path ) }, + explicit flexbuffer_disk_cache( std::filesystem::path cache_path, + std::filesystem::path root_path ) : cache_path_{ std::move( cache_path ) }, root_path_{ std::move( root_path ) } {} - fs::path cache_path_; - fs::path root_path_; + std::filesystem::path cache_path_; + std::filesystem::path root_path_; struct disk_cache_entry { - fs::path flexbuffer_path; - fs::file_time_type mtime; + std::filesystem::path flexbuffer_path; + std::filesystem::file_time_type mtime; }; // Maps game root relative json source path to the most recent cached flexbuffer we have on disk for it. std::unordered_map cached_flexbuffers_; }; -flexbuffer_cache::flexbuffer_cache( const fs::path &cache_directory, - const fs::path &root_directory ) +flexbuffer_cache::flexbuffer_cache( const std::filesystem::path &cache_directory, + const std::filesystem::path &root_directory ) { if( !cache_directory.empty() ) { disk_cache_ = flexbuffer_disk_cache::init_from_folder( cache_directory, root_directory ); @@ -398,7 +408,7 @@ flexbuffer_cache::flexbuffer_cache( const fs::path &cache_directory, flexbuffer_cache::~flexbuffer_cache() = default; -std::shared_ptr flexbuffer_cache::parse( fs::path json_source_path, +std::shared_ptr flexbuffer_cache::parse( std::filesystem::path json_source_path, size_t offset ) { std::string json_source_path_string = json_source_path.generic_u8string(); @@ -415,7 +425,7 @@ std::shared_ptr flexbuffer_cache::parse( fs::path json_source std::error_code ec; // If we got this far we can get the mtime. - fs::file_time_type mtime = get_file_mtime_millis( json_source_path, ec ); + std::filesystem::file_time_type mtime = get_file_mtime_millis( json_source_path, ec ); ( void )ec; return std::make_shared( @@ -426,7 +436,7 @@ std::shared_ptr flexbuffer_cache::parse( fs::path json_source } std::shared_ptr flexbuffer_cache::parse_and_cache( - fs::path lexically_normal_json_source_path, size_t offset ) + std::filesystem::path lexically_normal_json_source_path, size_t offset ) { // Is our cache potentially stale? @@ -435,7 +445,8 @@ std::shared_ptr flexbuffer_cache::parse_and_cache( lexically_normal_json_source_path ); if( cached_storage ) { std::error_code ec; - fs::file_time_type mtime = get_file_mtime_millis( lexically_normal_json_source_path, ec ); + std::filesystem::file_time_type mtime = get_file_mtime_millis( lexically_normal_json_source_path, + ec ); ( void )ec; return std::make_shared( std::move( cached_storage ), @@ -461,7 +472,8 @@ std::shared_ptr flexbuffer_cache::parse_and_cache( auto storage = std::make_shared( std::move( fb ) ); std::error_code ec; - fs::file_time_type mtime = fs::last_write_time( lexically_normal_json_source_path, ec ); + std::filesystem::file_time_type mtime = std::filesystem::last_write_time( + lexically_normal_json_source_path, ec ); if( ec ) { // Whatever. } diff --git a/src/flexbuffer_cache.h b/src/flexbuffer_cache.h index d6fd8638b884b..e79e00f40030b 100644 --- a/src/flexbuffer_cache.h +++ b/src/flexbuffer_cache.h @@ -2,13 +2,13 @@ #ifndef CATA_SRC_FLEXBUFFER_CACHE_H #define CATA_SRC_FLEXBUFFER_CACHE_H +#include #include #include #include #include -#include struct flexbuffer_storage { virtual ~flexbuffer_storage() = default; @@ -31,7 +31,7 @@ struct parsed_flexbuffer { virtual std::unique_ptr get_source_stream() const noexcept( false ) = 0; // Returns the path to a file containing the text source for the flexbuffer, if it exists. - virtual fs::path get_source_path() const noexcept = 0; + virtual std::filesystem::path get_source_path() const noexcept = 0; // Returns reference to the underlying storage containing the FlexBuffer binary data. const std::shared_ptr &get_storage() const { @@ -52,12 +52,14 @@ class flexbuffer_cache using shared_flexbuffer = std::shared_ptr; public: - explicit flexbuffer_cache( const fs::path &cache_directory, const fs::path &root_directory ); + explicit flexbuffer_cache( const std::filesystem::path &cache_directory, + const std::filesystem::path &root_directory ); ~flexbuffer_cache(); // Throw exceptions on IO and parse errors. - static shared_flexbuffer parse( fs::path json_source_path, size_t offset = 0 ) noexcept( false ); - shared_flexbuffer parse_and_cache( fs::path lexically_normal_json_source_path, + static shared_flexbuffer parse( std::filesystem::path json_source_path, + size_t offset = 0 ) noexcept( false ); + shared_flexbuffer parse_and_cache( std::filesystem::path lexically_normal_json_source_path, size_t offset = 0 ) noexcept( false ) ; static shared_flexbuffer parse_buffer( std::string buffer ) noexcept( false ); diff --git a/src/font_loader.cpp b/src/font_loader.cpp index 055d48652a24c..cae84f2b5494d 100644 --- a/src/font_loader.cpp +++ b/src/font_loader.cpp @@ -194,7 +194,7 @@ void font_loader::save( const cata_path &path ) const write_to_file( path, [&]( std::ostream & stream ) { JsonOut json( stream, true ); // pretty-print json.start_object(); - json.member( "//", "See docs/FONT_OPTIONS.md for an explanation of this file." ); + json.member( "//", "See docs/user-guides/FONT_OPTIONS.md for an explanation of this file." ); json.member( "typeface" ); write_font_config( json, typeface ); json.member( "gui_typeface" ); diff --git a/src/game.cpp b/src/game.cpp index 9f191d317d5c2..c18c7ed2ba687 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1219,7 +1219,7 @@ vehicle *game::place_vehicle_nearby( vehicle *veh = target_map.add_vehicle( id, tinymap_center, random_entry( angles ), rng( 50, 80 ), 0, false ); if( veh ) { - const tripoint_bub_ms abs_local = m.bub_from_abs( target_map.getglobal( tinymap_center ) ); + const tripoint_bub_ms abs_local = m.get_bub( target_map.get_abs( tinymap_center ) ); tripoint_bub_sm quotient; point_sm_ms remainder; std::tie( quotient, remainder ) = coords::project_remain( abs_local ); @@ -4436,7 +4436,7 @@ std::unordered_set game::get_fishable_locations_abs( int distan std::unordered_set result; map &here = get_map(); for( const tripoint_bub_ms pos : temp ) { - result.insert( here.getglobal( pos ) ); + result.insert( here.get_abs( pos ) ); } return result; @@ -4506,7 +4506,7 @@ std::vector game::get_fishable_monsters( std::unordered_set temp; for( const tripoint_abs_ms pos : fishable_locations ) { - temp.insert( here.bub_from_abs( pos ) ); + temp.insert( here.get_bub( pos ) ); } return game::get_fishable_monsters( temp ); @@ -5126,7 +5126,7 @@ static bool can_place_monster( const monster &mon, const tripoint_bub_ms &p ) static bool can_place_monster( const monster &mon, map *here, const tripoint_bub_ms &p ) { - const tripoint_abs_ms pos = here->getglobal( p ); + const tripoint_abs_ms pos = here->get_abs( p ); creature_tracker &creatures = get_creature_tracker(); if( const monster *const critter = creatures.creature_at( pos ) ) { // creature_tracker handles this. The hallucination monster will simply vanish @@ -5263,7 +5263,7 @@ monster *game::place_critter_at_or_within( const shared_ptr_fast &mon, if( !where ) { return nullptr; } - mon->spawn( here->getglobal( where.value() ) ); + mon->spawn( here->get_abs( where.value() ) ); if( critter_tracker->add( mon ) ) { mon->gravity_check(); return mon.get(); @@ -5353,7 +5353,7 @@ bool game::spawn_hallucination( const tripoint_bub_ms &p ) shared_ptr_fast tmp = make_shared_fast(); tmp->normalize(); tmp->randomize( NC_HALLU ); - tmp->spawn_at_precise( get_map().getglobal( p ) ); + tmp->spawn_at_precise( get_map().get_abs( p ) ); if( !get_creature_tracker().creature_at( p, true ) ) { overmap_buffer.insert_npc( tmp ); load_npcs(); @@ -5415,7 +5415,7 @@ bool game::spawn_npc( const tripoint_bub_ms &p, const string_id &n shared_ptr_fast tmp = make_shared_fast(); tmp->normalize(); tmp->load_npc_template( npc_class ); - tmp->spawn_at_precise( get_map().getglobal( p ) ); + tmp->spawn_at_precise( get_map().get_abs( p ) ); if( !get_creature_tracker().creature_at( p, true ) ) { overmap_buffer.insert_npc( tmp ); for( const trait_id &new_trait : traits ) { @@ -5535,7 +5535,7 @@ bool game::is_in_sunlight( const tripoint_bub_ms &p ) bool game::is_in_sunlight( map *here, const tripoint_bub_ms &p ) { return !is_sheltered( here, p ) && - incident_sun_irradiance( current_weather( here->getglobal( p ), calendar::turn ), + incident_sun_irradiance( current_weather( here->get_abs( p ), calendar::turn ), calendar::turn ) > irradiance::minimal; } @@ -5634,7 +5634,7 @@ void game::save_cyborg( item *cyborg, const tripoint_bub_ms &couch_pos, Characte shared_ptr_fast tmp = make_shared_fast(); tmp->normalize(); tmp->load_npc_template( npc_template_cyborg_rescued ); - tmp->spawn_at_precise( get_map().getglobal( couch_pos ) ); + tmp->spawn_at_precise( get_map().get_abs( couch_pos ) ); overmap_buffer.insert_npc( tmp ); tmp->hurtall( dmg_lvl * 10, nullptr ); tmp->add_effect( effect_downed, rng( 1_turns, 4_turns ), false, 0, true ); @@ -5816,7 +5816,7 @@ void game::control_vehicle() add_msg( _( "No vehicle controls found." ) ); return; } else if( num_valid_controls > 1 ) { - const std::optional temp = choose_adjacent_bub( _( "Control vehicle where?" ) ); + const std::optional temp = choose_adjacent( _( "Control vehicle where?" ) ); if( !vehicle_position ) { return; } else { @@ -5847,7 +5847,7 @@ void game::control_vehicle() // If we reached here, we gained control of a vehicle. // Clear the map memory for the area covered by the vehicle to eliminate ghost vehicles. for( const tripoint_bub_ms &target : veh->get_points() ) { - u.memorize_clear_decoration( m.getglobal( target ), "vp_" ); + u.memorize_clear_decoration( m.get_abs( target ), "vp_" ); m.memory_cache_dec_set_dirty( target, true ); } veh->is_following = false; @@ -6329,7 +6329,7 @@ void game::pickup( const tripoint_bub_ms &p ) //represents carefully peeking around a corner, hence the large move cost. void game::peek() { - const std::optional p = choose_direction_rel_ms( _( "Peek where?" ), true ); + const std::optional p = choose_direction( _( "Peek where?" ), true ); if( !p ) { return; } @@ -6846,12 +6846,12 @@ void game::print_graffiti_info( const tripoint_bub_ms &lp, const catacurses::win bool game::check_zone( const zone_type_id &type, const tripoint_bub_ms &where ) const { - return zone_manager::get_manager().has( type, m.getglobal( where ) ); + return zone_manager::get_manager().has( type, m.get_abs( where ) ); } bool game::check_near_zone( const zone_type_id &type, const tripoint_bub_ms &where ) const { - return zone_manager::get_manager().has_near( type, m.getglobal( where ) ); + return zone_manager::get_manager().has_near( type, m.get_abs( where ) ); } bool game::is_zones_manager_open() const @@ -7129,13 +7129,13 @@ void game::zones_manager() true, true, false ); if( second.position ) { tripoint_abs_ms first_abs = - m.getglobal( + m.get_abs( tripoint_bub_ms( std::min( first.position->x(), second.position->x() ), std::min( first.position->y(), second.position->y() ), std::min( first.position->z(), second.position->z() ) ) ); tripoint_abs_ms second_abs = - m.getglobal( + m.get_abs( tripoint_bub_ms( std::max( first.position->x(), second.position->x() ), std::max( first.position->y(), second.position->y() ), @@ -7264,8 +7264,8 @@ void game::zones_manager() if( zone_cnt > 0 ) { blink = !blink; const zone_data &zone = zones[active_index].get(); - zone_start = m.bub_from_abs( zone.get_start_point() ).raw(); - zone_end = m.bub_from_abs( zone.get_end_point() ).raw(); + zone_start = m.get_bub( zone.get_start_point() ).raw(); + zone_end = m.get_bub( zone.get_end_point() ).raw(); ctxt.set_timeout( get_option( "BLINK_SPEED" ) ); } else { blink = false; @@ -7501,16 +7501,16 @@ void game::zones_manager() static_popup message_pop; message_pop.on_top( true ); message_pop.message( "%s", _( "Moving zone." ) ); - const tripoint_bub_ms zone_local_start_point = m.bub_from_abs( zone.get_start_point() ); - const tripoint_bub_ms zone_local_end_point = m.bub_from_abs( zone.get_end_point() ); + const tripoint_bub_ms zone_local_start_point = m.get_bub( zone.get_start_point() ); + const tripoint_bub_ms zone_local_end_point = m.get_bub( zone.get_end_point() ); // local position of the zone center, used to calculate the u.view_offset, // could center the screen to the position it represents - tripoint_bub_ms view_center = m.bub_from_abs( zone.get_center_point() ); + tripoint_bub_ms view_center = m.get_bub( zone.get_center_point() ); const look_around_result result_local = look_around( false, view_center, zone_local_start_point, false, false, false, true, zone_local_end_point ); if( result_local.position ) { - const tripoint_abs_ms new_start_point = m.getglobal( *result_local.position ); + const tripoint_abs_ms new_start_point = m.get_abs( *result_local.position ); const tripoint_abs_ms new_end_point = zone.get_end_point() - zone.get_start_point() + new_start_point; if( new_start_point == zone.get_start_point() ) { @@ -7625,7 +7625,7 @@ void game::pre_print_all_tile_info( const tripoint_bub_ms &lp, const catacurses: const visibility_variables &cache ) { // get global area info according to look_around caret position - tripoint_abs_omt omp( coords::project_to( m.getglobal( lp ) ) ); + tripoint_abs_omt omp( coords::project_to( m.get_abs( lp ) ) ); const oter_id &cur_ter_m = overmap_buffer.ter( omp ); om_vision_level vision = overmap_buffer.seen( omp ); // we only need the area name and then pass it to print_all_tile_info() function below @@ -7715,6 +7715,7 @@ look_around_result game::look_around( ui = std::make_unique(); ui->on_screen_resize( [&]( ui_adaptor & ui ) { int panel_width = panel_manager::get_manager().get_current_layout().panels().begin()->get_width(); + //FIXME: w_pixel_minimap is only reducing the height by one? int height = pixel_minimap_option ? TERMY - getmaxy( w_pixel_minimap ) : TERMY; // If particularly small, base height on panel width irrespective of other elements. @@ -7810,25 +7811,30 @@ look_around_result game::look_around( std::string mon_name_text = string_format( _( "%s - %s" ), ctxt.get_desc( "CHANGE_MONSTER_NAME" ), ctxt.get_action_name( "CHANGE_MONSTER_NAME" ) ); - mvwprintz( w_info, point( 1, getmaxy( w_info ) - 2 ), c_red, mon_name_text ); + mvwprintz( w_info, point( 1, getmaxy( w_info ) - 4 ), c_red, mon_name_text ); } + std::string extended_description_text = string_format( _( "%s - %s" ), + ctxt.get_desc( "EXTENDED_DESCRIPTION" ), + ctxt.get_action_name( "EXTENDED_DESCRIPTION" ) ); + mvwprintz( w_info, point( 1, getmaxy( w_info ) - 3 ), c_light_green, extended_description_text ); + std::string fast_scroll_text = string_format( _( "%s - %s" ), ctxt.get_desc( "TOGGLE_FAST_SCROLL" ), ctxt.get_action_name( "TOGGLE_FAST_SCROLL" ) ); - mvwprintz( w_info, point( 1, getmaxy( w_info ) - 1 ), fast_scroll ? c_light_green : c_green, + mvwprintz( w_info, point( 1, getmaxy( w_info ) - 2 ), fast_scroll ? c_light_green : c_green, fast_scroll_text ); if( !ctxt.keys_bound_to( "toggle_pixel_minimap" ).empty() ) { std::string pixel_minimap_text = string_format( _( "%s - %s" ), ctxt.get_desc( "toggle_pixel_minimap" ), ctxt.get_action_name( "toggle_pixel_minimap" ) ); - right_print( w_info, getmaxy( w_info ) - 1, 1, pixel_minimap_option ? c_light_green : c_green, + right_print( w_info, getmaxy( w_info ) - 2, 1, pixel_minimap_option ? c_light_green : c_green, pixel_minimap_text ); } int first_line = 1; - const int last_line = getmaxy( w_info ) - 2; + const int last_line = getmaxy( w_info ) - 4; pre_print_all_tile_info( lp, w_info, first_line, last_line, cache ); wnoutrefresh( w_info ); @@ -7908,7 +7914,8 @@ look_around_result game::look_around( action = ctxt.handle_input(); } if( ( action == "LEVEL_UP" || action == "LEVEL_DOWN" || action == "MOUSE_MOVE" || - ctxt.get_direction( action ) ) && ( ( select_zone && has_first_point ) || is_moving_zone ) ) { + ctxt.get_direction_rel_ms( action ) ) && ( ( select_zone && has_first_point ) || + is_moving_zone ) ) { blink = true; // Always draw blink symbols when moving cursor } else if( action == "TIMEOUT" ) { blink = !blink; @@ -7919,7 +7926,7 @@ look_around_result game::look_around( fast_scroll = !fast_scroll; } else if( action == "map" ) { uistate.open_menu = [center]() { - ui::omap::look_around_map( get_map().getglobal( center ) ); + ui::omap::look_around_map( get_map().get_abs( center ) ); }; break; } else if( action == "toggle_pixel_minimap" ) { @@ -9378,7 +9385,7 @@ void game::insert_item() void game::unload_container() { - if( const std::optional pnt = choose_adjacent_bub( _( "Unload where?" ) ) ) { + if( const std::optional pnt = choose_adjacent( _( "Unload where?" ) ) ) { u.drop( game_menus::inv::unload_container(), *pnt ); } } @@ -10686,7 +10693,7 @@ bool game::walk_move( const tripoint_bub_ms &dest_loc, const bool via_ramp, const bool furniture_move ) { - const tripoint_abs_ms dest_loc_abs = m.getglobal( dest_loc ); + const tripoint_abs_ms dest_loc_abs = m.get_abs( dest_loc ); if( m.has_flag_ter( ter_furn_flag::TFLAG_SMALL_PASSAGE, dest_loc ) ) { if( u.get_size() > creature_size::medium ) { @@ -10964,7 +10971,7 @@ bool game::walk_move( const tripoint_bub_ms &dest_loc, const bool via_ramp, } tripoint_bub_ms oldpos = u.pos_bub(); - tripoint_abs_ms old_abs_pos = m.getglobal( oldpos ); + tripoint_abs_ms old_abs_pos = m.get_abs( oldpos ); bool moving = dest_loc != oldpos; @@ -11289,7 +11296,7 @@ point_rel_sm game::place_player( const tripoint_bub_ms &dest_loc, bool quick ) std::set places; for( const direction &elem : adjacentDir ) { if( corpse_available( u.pos_bub() + displace_XY( elem ) ) ) { - places.emplace( m.getglobal( u.pos_bub() + displace_XY( elem ) ) ); + places.emplace( m.get_abs( u.pos_bub() + displace_XY( elem ) ) ); } } if( !places.empty() ) { @@ -11297,7 +11304,7 @@ point_rel_sm game::place_player( const tripoint_bub_ms &dest_loc, bool quick ) } } else { if( corpse_available( u.pos_bub() ) ) { - u.assign_activity( pulp_activity_actor( m.getglobal( u.pos_bub() ) ) ); + u.assign_activity( pulp_activity_actor( m.get_abs( u.pos_bub() ) ) ); } } } @@ -12528,7 +12535,7 @@ void game::vertical_move( int movez, bool force, bool peeking ) } const tripoint_bub_ms old_pos = u.pos_bub(); - const tripoint_abs_ms old_abs_pos = here.getglobal( old_pos ); + const tripoint_abs_ms old_abs_pos = here.get_abs( old_pos ); point_rel_sm submap_shift; const bool z_level_changed = vertical_shift( z_after ); if( !force ) { @@ -12690,10 +12697,10 @@ std::optional game::find_stairs( const map &mp, int z_after, int best = INT_MAX; std::optional stairs; const int omtilesz = SEEX * 2 - 1; - const tripoint_abs_ms abs_omt_base( project_to( project_to( mp.getglobal( + const tripoint_abs_ms abs_omt_base( project_to( project_to( mp.get_abs( pos ) ) ) ); - tripoint_bub_ms omtile_align_start( mp.bub_from_abs( tripoint_abs_ms( abs_omt_base.xy(), + tripoint_bub_ms omtile_align_start( mp.get_bub( tripoint_abs_ms( abs_omt_base.xy(), z_after ) ) ); tripoint_bub_ms omtile_align_end( omtile_align_start + point( omtilesz, omtilesz ) ); @@ -14084,7 +14091,7 @@ namespace cata_event_dispatch void avatar_moves( const tripoint_abs_ms &old_abs_pos, const avatar &u, const map &m ) { const tripoint_bub_ms new_pos = u.pos_bub(); - const tripoint_abs_ms new_abs_pos = m.getglobal( new_pos ); + const tripoint_abs_ms new_abs_pos = m.get_abs( new_pos ); mtype_id mount_type; if( u.is_mounted() ) { mount_type = u.mounted_creature->type->id; diff --git a/src/handle_action.cpp b/src/handle_action.cpp index 747dad7916fc7..23d95e1f29ff5 100644 --- a/src/handle_action.cpp +++ b/src/handle_action.cpp @@ -371,7 +371,7 @@ input_context game::get_player_input( std::string &action ) const direction oCurDir = iter->getDirection(); const int width = utf8_width( iter->getText() ); for( int i = 0; i < width; ++i ) { - tripoint tmp( iter->getPosX() + i, iter->getPosY(), get_map().get_abs_sub().z() ); + tripoint_bub_ms tmp( iter->getPosX() + i, iter->getPosY(), get_map().get_abs_sub().z() ); const Creature *critter = creatures.creature_at( tmp, true ); if( critter != nullptr && u.sees( *critter ) ) { @@ -440,7 +440,7 @@ input_context game::get_player_input( std::string &action ) return ctxt; } -static void rcdrive( const point &d ) +static void rcdrive( const point_rel_ms &d ) { Character &player_character = get_player_character(); map &here = get_map(); @@ -487,7 +487,7 @@ static void rcdrive( const point &d ) } } -static void pldrive( const tripoint &p ) +static void pldrive( const tripoint_rel_ms &p ) { if( !g->check_safe_mode_allowed() ) { return; @@ -510,7 +510,7 @@ static void pldrive( const tripoint &p ) player_character.in_vehicle = false; return; } - if( veh->is_on_ramp && p.x != 0 ) { + if( veh->is_on_ramp && p.x() != 0 ) { add_msg( m_bad, _( "You can't turn the vehicle while on a ramp." ) ); return; } @@ -535,7 +535,7 @@ static void pldrive( const tripoint &p ) return; } } - if( p.z != 0 ) { + if( p.z() != 0 ) { if( !veh->can_control_in_air( player_character ) ) { player_character.add_msg_if_player( m_info, _( "You have no idea how to make the vehicle fly." ) ); return; @@ -545,13 +545,13 @@ static void pldrive( const tripoint &p ) return; } } - if( p.z == -1 ) { + if( p.z() == -1 ) { if( veh->check_heli_descend( player_character ) ) { player_character.add_msg_if_player( m_info, _( "You steer the vehicle into a descent." ) ); } else { return; } - } else if( p.z == 1 ) { + } else if( p.z() == 1 ) { if( veh->check_heli_ascend( player_character ) ) { player_character.add_msg_if_player( m_info, _( "You steer the vehicle into an ascent." ) ); } else { @@ -564,12 +564,12 @@ static void pldrive( const tripoint &p ) return; } } - veh->pldrive( get_avatar(), p.x, p.y, p.z ); + veh->pldrive( get_avatar(), p.x(), p.y(), p.z() ); } -static void pldrive( point d ) +static void pldrive( point_rel_ms d ) { - return pldrive( tripoint( d, 0 ) ); + return pldrive( tripoint_rel_ms( d, 0 ) ); } static void open() @@ -707,12 +707,12 @@ static void grab() return; } - const std::optional grabp_ = choose_adjacent( _( "Grab where?" ) ); + const std::optional grabp_ = choose_adjacent( _( "Grab where?" ) ); if( !grabp_ ) { add_msg( _( "Never mind." ) ); return; } - tripoint_bub_ms grabp = tripoint_bub_ms( *grabp_ ); + tripoint_bub_ms grabp = *grabp_; if( grabp == you.pos_bub() ) { add_msg( _( "You get a hold of yourself." ) ); @@ -913,11 +913,12 @@ static bool is_smashable_corpse( const item &maybe_corpse ) static void smash() { const bool allow_floor_bash = debug_mode; // Should later become "true" - const std::optional smashp_ = choose_adjacent( _( "Smash where?" ), allow_floor_bash ); + const std::optional smashp_ = choose_adjacent( _( "Smash where?" ), + allow_floor_bash ); if( !smashp_ ) { return; } - tripoint_bub_ms smashp = tripoint_bub_ms( *smashp_ ); + tripoint_bub_ms smashp = *smashp_; // Little hack: If there's a smashable corpse, it'll always be bashed first. So don't bother warning about // terrain smashing unless it's actually possible. @@ -1034,7 +1035,7 @@ avatar::smash_result avatar::smash( tripoint_bub_ms &smashp ) } if( should_pulp ) { - assign_activity( pulp_activity_actor( here.getglobal( smashp ), true ) ); + assign_activity( pulp_activity_actor( here.get_abs( smashp ), true ) ); return ret; // don't smash terrain if we've smashed a corpse } @@ -1935,7 +1936,7 @@ bool Character::cast_spell( spell &sp, bool fake_spell, } } if( target ) { - spell_act.coords.emplace_back( get_map().getglobal( *target ) ); + spell_act.coords.emplace_back( get_map().get_abs( *target ) ); } assign_activity( spell_act ); return true; @@ -2322,7 +2323,7 @@ bool game::do_regular_action( action_id &act, avatar &player_character, // so no rotation needed pldrive( get_delta_from_movement_action( act, iso_rotate::no ) ); } else { - point_rel_ms dest_delta = get_delta_from_movement_action_rel_ms( act, iso_rotate::yes ); + point_rel_ms dest_delta = get_delta_from_movement_action( act, iso_rotate::yes ); if( auto_travel_mode && !player_character.is_auto_moving() ) { for( int i = 0; i < SEEX; i++ ) { tripoint_bub_ms auto_travel_destination = @@ -2339,7 +2340,7 @@ bool game::do_regular_action( action_id &act, avatar &player_character, } } act = player_character.get_next_auto_move_direction(); - const point_rel_ms dest_next = get_delta_from_movement_action_rel_ms( act, iso_rotate::yes ); + const point_rel_ms dest_next = get_delta_from_movement_action( act, iso_rotate::yes ); if( dest_next == point_rel_ms::zero ) { player_character.abort_automove(); } @@ -2386,7 +2387,7 @@ bool game::do_regular_action( action_id &act, avatar &player_character, if( has_vehicle_control( player_character ) ) { const optional_vpart_position vp = get_map().veh_at( player_character.pos_bub() ); if( vp->vehicle().is_rotorcraft() ) { - pldrive( tripoint::below ); + pldrive( tripoint_rel_ms::below ); break; } } @@ -2444,7 +2445,7 @@ bool game::do_regular_action( action_id &act, avatar &player_character, } else if( has_vehicle_control( player_character ) ) { const optional_vpart_position vp = get_map().veh_at( player_character.pos_bub() ); if( vp->vehicle().is_rotorcraft() ) { - pldrive( tripoint::above ); + pldrive( tripoint_rel_ms::above ); } } break; @@ -2689,7 +2690,7 @@ bool game::do_regular_action( action_id &act, avatar &player_character, drop_in_direction( player_character.pos_bub() ); break; case ACTION_DIR_DROP: - if( const std::optional pnt = choose_adjacent_bub( _( "Drop where?" ) ) ) { + if( const std::optional pnt = choose_adjacent( _( "Drop where?" ) ) ) { if( *pnt != player_character.pos_bub() && in_shell ) { add_msg( m_info, _( "You can't drop things to another tile while you're in your shell." ) ); } else { diff --git a/src/handle_liquid.cpp b/src/handle_liquid.cpp index 3e65095ac8072..250466ed79736 100644 --- a/src/handle_liquid.cpp +++ b/src/handle_liquid.cpp @@ -55,7 +55,7 @@ static void serialize_liquid_source( player_activity &act, const vehicle &veh, c act.values.push_back( static_cast( liquid_source_type::VEHICLE ) ); act.values.push_back( part_num ); if( part_num != -1 ) { - act.coords.push_back( get_map().getglobal( veh.bub_part_pos( part_num ) ) ); + act.coords.push_back( get_map().get_abs( veh.bub_part_pos( part_num ) ) ); } else { act.coords.push_back( veh.global_square_location() ); } @@ -78,7 +78,7 @@ static void serialize_liquid_source( player_activity &act, const tripoint_bub_ms act.values.push_back( static_cast( liquid_source_type::MAP_ITEM ) ); act.values.push_back( std::distance( stack.begin(), iter ) ); } - act.coords.push_back( get_map().getglobal( pos ) ); + act.coords.push_back( get_map().get_abs( pos ) ); act.str_values.push_back( serialize( liquid ) ); } @@ -86,7 +86,7 @@ static void serialize_liquid_target( player_activity &act, const vpart_reference { act.values.push_back( static_cast( liquid_target_type::VEHICLE ) ); act.values.push_back( 0 ); // dummy - act.coords.push_back( get_map().getglobal( vp.vehicle().bub_part_pos( 0 ) ) ); + act.coords.push_back( get_map().get_abs( vp.vehicle().bub_part_pos( 0 ) ) ); act.values.push_back( vp.part_index() ); // tank part index } @@ -102,7 +102,7 @@ static void serialize_liquid_target( player_activity &act, const tripoint_bub_ms { act.values.push_back( static_cast( liquid_target_type::MAP ) ); act.values.push_back( 0 ); // dummy - act.coords.push_back( get_map().getglobal( pos ) ); + act.coords.push_back( get_map().get_abs( pos ) ); } namespace liquid_handler @@ -282,7 +282,7 @@ static bool get_liquid_target( item &liquid, const item *const source, const int const std::string liqstr = string_format( _( "Pour %s where?" ), liquid_name ); - const std::optional target_pos_ = choose_adjacent_bub( liqstr ); + const std::optional target_pos_ = choose_adjacent( liqstr ); if( !target_pos_ ) { return; } diff --git a/src/iexamine.cpp b/src/iexamine.cpp index 14f05e3e4202c..9614c31506df1 100644 --- a/src/iexamine.cpp +++ b/src/iexamine.cpp @@ -227,6 +227,8 @@ static const mtype_id mon_dark_wyrm( "mon_dark_wyrm" ); static const mtype_id mon_fungal_blossom( "mon_fungal_blossom" ); static const mtype_id mon_prototype_cyborg( "mon_prototype_cyborg" ); +static const mutation_category_id mutation_category_CHIMERA( "CHIMERA" ); + static const npc_class_id NC_ROBOFAC_INTERCOM( "NC_ROBOFAC_INTERCOM" ); static const proficiency_id proficiency_prof_disarming( "prof_disarming" ); @@ -409,6 +411,181 @@ void iexamine::change_appearance( Character &you, const tripoint_bub_ms & ) } } +/** +* Remove the current threshold and devolve all post thresh mutations to their pre threshold level, unless the new threshold is compatible. +*/ +static void genemill_remove_thresh( Character &you, mutation_category_id highest_id ) +{ + int rc = 0; + for( const trait_id &mut : you.get_mutations( false, true ) ) { + if( !mut->threshreq.empty() || mut->threshold ) { + trait_id lastrevert = mut; + you.remove_mutation( mut ); + do { + for( const trait_id &c : you.get_mutations( false, true ) ) { + if( std::find( c->replacements.begin(), c->replacements.end(), + lastrevert ) != c->replacements.end() && ( !c->threshreq.empty() || + std::find( c->category.begin(), c->category.end(), highest_id ) != c->category.end() ) ) { + lastrevert = c; + you.remove_mutation( c ); + } else { + break; + } + } + rc++; + } while( rc < 10 ); + } + } +} + +/** + * GENEMILL: Like a Nanofab, but for your genes. + * Used in aftershock, and maybe in other mods. + */ +void iexamine::genemill( Character &you, const tripoint_bub_ms & ) +{ + uilist genemenu; + genemenu.title = _( "Select Genetic Treatment" ); + + std::vectoravailable_traits; + std::vector genetech; + + for( item_location &loc : you.all_items_loc() ) { + if( loc->has_flag( flag_GENE_TECH ) ) { + genetech.push_back( loc ); + } + } + + + if( genetech.empty() ) { + popup( _( "You aren't carrying have any genetic treatments." ) ); + return; + } + std::map item_map; + int i = 0; + for( const item_location &it : genetech ) { + for( trait_id trait : it->template_traits ) { + item_map[i] = it; + available_traits.push_back( trait ); + bool can_select = true; + std::string context_string; + + //if you have the trait we can abort this early since the only thing we can do is remove it + if( you.has_permanent_trait( trait ) ) { + context_string = _( "Trait will be reverted to base human morphology." ); + context_string = string_format( " %s", context_string ); + genemenu.addentry_col( i, can_select, input_event(), trait->name(), context_string ); + i++; + continue; + } + + const mutation_branch &mut = trait.obj(); + std::vector cancel = mut.cancels; + std::vector threshreq = mut.threshreq; + bool c_has_threshreq = threshreq.empty() ? true : false; + + //Bionic Incompatibility + std::vector bionics; + for( const bionic_id &bid : you.get_bionics() ) { + if( bid->mutation_conflicts.count( trait ) != 0 ) { + bionics.push_back( bid->name.translated() ); + } + } + if( !bionics.empty() ) { + context_string = string_format( " %s %s", _( "Conflicts with installed:" ), + string_join( bionics, ", " ) ); + can_select = false; + genemenu.addentry_col( i, can_select, input_event(), mut.name(), context_string ); + i++; + continue; + } + + //Threshold requirement + for( const trait_id &c : threshreq ) { + if( you.has_permanent_trait( c ) ) { + c_has_threshreq = true; + break; + } + } + if( !c_has_threshreq ) { + context_string = string_format( " %s ", + _( "Requires any of the following traits:" ) ); + for( size_t i = 0; i < threshreq.size() - 1; i++ ) { + context_string += threshreq[i]->name(); + context_string += ", "; + } + context_string += threshreq[threshreq.size() - 1]->name(); + context_string += ""; + can_select = false; + } + + genemenu.addentry_col( i, can_select, input_event(), mut.name(), context_string ); + i++; + } + } + + genemenu.query(); + + if( genemenu.ret < 0 ) { + return; + } + + //Grant the selected mutation. + trait_id treatment = available_traits.at( genemenu.ret ); + int rc = 0; + if( you.has_permanent_trait( treatment ) ) { + trait_id lastrevert = treatment; + you.remove_mutation( treatment ); + do { + for( const trait_id &c : you.get_mutations( false, true ) ) { + if( std::find( c->replacements.begin(), c->replacements.end(), + lastrevert ) != c->replacements.end() ) { + lastrevert = c; + you.remove_mutation( c ); + } + } + rc++; + } while( rc < 10 ); + + } else { + do { + you.mutate_towards( treatment ); + rc++; + } while( !you.has_permanent_trait( treatment ) && rc < 10 ); + } + + //Handle Thesholds changing/removal. + auto highest_id = std::max_element( you.mutation_category_level.begin(), + you.mutation_category_level.end(), + []( const std::pair &p1, + const std::pair &p2 ) { + return p1.second < p2.second; + } ); + const mutation_category_trait &highest_mct = mutation_category_trait::get_category( + highest_id->first ); + + //Since chimera grants access to most post thresh traits with little inconvenience, we prevent the player from getting it through genemill. + if( highest_id->first != mutation_category_CHIMERA && + you.get_threshold_category() != mutation_category_CHIMERA ) { + if( highest_id->second > 30 && !you.has_permanent_trait( highest_mct.threshold_mut ) ) { + genemill_remove_thresh( you, highest_id->first ); + you.set_mutation( highest_mct.threshold_mut ); + you.add_msg_if_player( + _( "As you wake, you find yourself much more attuned to your new form than before." ) ); + + } else if( highest_id->second < 30 && you.crossed_threshold() ) { + genemill_remove_thresh( you, mutation_category_id::NULL_ID() ); + you.add_msg_if_player( + _( "As you wake, you feel like if you have lost a once important part of yourself." ) ); + } + } + //Consume the template if its single use. + item_location selected = item_map[genemenu.ret]; + if( selected->has_flag( flag_NANOFAB_TEMPLATE_SINGLE_USE ) ) { + selected.remove_item(); + } +} + /** * TEMPLATE FABRICATORS * Generate items from found blueprints. @@ -672,7 +849,7 @@ void iexamine::attunement_altar( Character &you, const tripoint_bub_ms & ) void iexamine::translocator( Character &, const tripoint_bub_ms &examp ) { - const tripoint_abs_omt omt_loc( coords::project_to( get_map().getglobal( examp ) ) ); + const tripoint_abs_omt omt_loc( coords::project_to( get_map().get_abs( examp ) ) ); avatar &player_character = get_avatar(); const bool activated = player_character.translocators.knows_translocator( omt_loc ); if( !activated ) { @@ -1300,8 +1477,8 @@ void iexamine::elevator( Character &you, const tripoint_bub_ms &examp ) { map &here = get_map(); tripoint_abs_ms const old_abs_pos = you.get_location(); - tripoint_abs_omt const this_omt = project_to( here.getglobal( examp ) ); - tripoint_bub_ms const sm_orig = here.bub_from_abs( project_to( this_omt ) ); + tripoint_abs_omt const this_omt = project_to( here.get_abs( examp ) ); + tripoint_bub_ms const sm_orig = here.get_bub( project_to( this_omt ) ); std::vector this_elevator; for( tripoint_bub_ms const &pos : closest_points_first( examp, SEEX - 1 ) ) { @@ -1426,7 +1603,7 @@ bool iexamine::try_start_hacking( Character &you, const tripoint_bub_ms &examp ) item_location hacking_tool = item_location{you, &you.best_item_with_quality( qual_HACK )}; hacking_tool->ammo_consume( hacking_tool->ammo_required(), hacking_tool.pos_bub(), &you ); you.assign_activity( hacking_activity_actor( hacking_tool ) ); - you.activity.placement = get_map().getglobal( examp ); + you.activity.placement = get_map().get_abs( examp ); return true; } } @@ -1529,7 +1706,7 @@ void iexamine::rubble( Character &you, const tripoint_bub_ms &examp ) return; } you.assign_activity( clear_rubble_activity_actor( moves ) ); - you.activity.placement = here.getglobal( examp ); + you.activity.placement = here.get_abs( examp ); } /** @@ -1958,7 +2135,7 @@ void iexamine::locked_object_pickable( Character &you, const tripoint_bub_ms &ex if( you.get_power_level() >= bio_lockpick->power_activate ) { you.mod_power_level( -bio_lockpick->power_activate ); you.add_msg_if_player( m_info, _( "You activate your %s." ), bio_lockpick->name ); - you.assign_activity( lockpick_activity_actor::use_bionic( here.getglobal( examp ) ) ); + you.assign_activity( lockpick_activity_actor::use_bionic( here.get_abs( examp ) ) ); return; } else { you.add_msg_if_player( m_info, _( "You don't have enough power to activate your %s." ), @@ -2013,7 +2190,7 @@ void iexamine::bulletin_board( Character &you, const tripoint_bub_ms &examp ) { g->validate_camps(); map &here = get_map(); - point_abs_omt omt( coords::project_to( here.getglobal( examp ) ).xy() ); + point_abs_omt omt( coords::project_to( here.get_abs( examp ) ).xy() ); std::optional bcp = overmap_buffer.find_camp( omt ); if( bcp ) { basecamp *temp_camp = *bcp; @@ -2044,7 +2221,7 @@ void iexamine::bulletin_board( Character &you, const tripoint_bub_ms &examp ) return; } - temp_camp->validate_bb_pos( here.getglobal( examp ) ); + temp_camp->validate_bb_pos( here.get_abs( examp ) ); temp_camp->validate_assignees(); temp_camp->validate_sort_points(); temp_camp->scan_pseudo_items(); @@ -2596,7 +2773,7 @@ int iexamine::query_seed( const std::vector &seed_entries ) void iexamine::plant_seed( Character &you, const tripoint_bub_ms &examp, const itype_id &seed_id ) { player_activity act( ACT_PLANT_SEED, to_moves( 30_seconds ) ); - act.placement = get_map().getglobal( examp ); + act.placement = get_map().get_abs( examp ); act.str_values.emplace_back( seed_id ); you.assign_activity( act ); } @@ -4610,7 +4787,7 @@ void iexamine::shrub_wildveggies( Character &you, const tripoint_bub_ms &examp ) ///\EFFECT_PER randomly speeds up foraging move_cost /= rng( std::max( 4, you.per_cur ), 4 + you.per_cur * 2 ); you.assign_activity( forage_activity_actor( move_cost ) ); - you.activity.placement = here.getglobal( examp ); + you.activity.placement = here.get_abs( examp ); you.activity.auto_resume = true; } @@ -4727,7 +4904,7 @@ void iexamine::part_con( Character &you, tripoint_bub_ms const &examp ) } } else { you.assign_activity( ACT_BUILD ); - you.activity.placement = here.getglobal( examp ); + you.activity.placement = here.get_abs( examp ); } return; } @@ -7401,6 +7578,7 @@ iexamine_functions iexamine_functions_from_string( const std::string &function_n { "deployed_furniture", &iexamine::deployed_furniture }, { "cvdmachine", &iexamine::cvdmachine }, { "change_appearance", &iexamine::change_appearance }, + { "genemill", &iexamine::genemill }, { "nanofab", &iexamine::nanofab }, { "gaspump", &iexamine::gaspump }, { "atm", &iexamine::atm }, diff --git a/src/iexamine.h b/src/iexamine.h index fb7d968e68ac1..2f2b0b71a75f1 100644 --- a/src/iexamine.h +++ b/src/iexamine.h @@ -64,6 +64,7 @@ void gaspump( Character &you, const tripoint_bub_ms &examp ); void atm( Character &you, const tripoint_bub_ms &examp ); void vending( Character &you, const tripoint_bub_ms &examp ); void elevator( Character &you, const tripoint_bub_ms &examp ); +void genemill( Character &you, const tripoint_bub_ms &examp ); void nanofab( Character &you, const tripoint_bub_ms &examp ); void controls_gate( Character &you, const tripoint_bub_ms &examp ); void cardreader( Character &you, const tripoint_bub_ms &examp ); diff --git a/src/iexamine_actors.cpp b/src/iexamine_actors.cpp index 9d07263d6eb75..6dff74d248676 100644 --- a/src/iexamine_actors.cpp +++ b/src/iexamine_actors.cpp @@ -114,7 +114,7 @@ std::vector cardreader_examine_actor::get_cards( Character &you, continue; } int dist = rl_dist( cardloc.xy(), - coords::project_to( get_map().getglobal( examp ) ).xy() ); + coords::project_to( get_map().get_abs( examp ) ).xy() ); if( dist > *omt_allowed_radius ) { continue; } @@ -132,7 +132,7 @@ bool cardreader_examine_actor::apply( const tripoint_bub_ms &examp ) const map &here = get_map(); if( map_regen ) { - tripoint_abs_omt omt_pos( coords::project_to( here.getglobal( examp ) ) ); + tripoint_abs_omt omt_pos( coords::project_to( here.get_abs( examp ) ) ); const ret_val has_colliding_vehicle = run_mapgen_update_func( mapgen_id, omt_pos, {}, nullptr, false ); if( !has_colliding_vehicle.success() ) { @@ -180,8 +180,8 @@ void cardreader_examine_actor::call( Character &you, const tripoint_bub_ms &exam break; } // Check 1) same overmap coords, 2) turret, 3) hostile - if( coords::project_to( here.getglobal( critter.pos_bub() ) ) == - coords::project_to( here.getglobal( examp ) ) && + if( coords::project_to( here.get_abs( critter.pos_bub() ) ) == + coords::project_to( here.get_abs( examp ) ) && critter.has_flag( mon_flag_ID_CARD_DESPAWN ) && critter.attitude_to( you ) == Creature::Attitude::HOSTILE ) { g->remove_zombie( critter ); @@ -257,7 +257,7 @@ void eoc_examine_actor::call( Character &you, const tripoint_bub_ms &examp ) con { dialogue d( get_talker_for( you ), nullptr ); d.set_value( "this", get_map().furn( examp ).id().str() ); - d.set_value( "pos", get_map().getglobal( examp ).to_string() ); + d.set_value( "pos", get_map().get_abs( examp ).to_string() ); for( const effect_on_condition_id &eoc : eocs ) { eoc->activate( d ); } diff --git a/src/input_context.cpp b/src/input_context.cpp index 93869ae4532ee..cb5cdd0160d0c 100644 --- a/src/input_context.cpp +++ b/src/input_context.cpp @@ -548,38 +548,6 @@ static void rotate_direction_cw( int &dx, int &dy ) dy = dir_num / 3 - 1; } -std::optional input_context::get_direction( const std::string &action ) const -{ - static const auto noop = static_cast( []( tripoint p ) { - return p; - } ); - static const auto rotate = static_cast( []( tripoint p ) { - rotate_direction_cw( p.x, p.y ); - return p; - } ); - const auto transform = iso_mode && g->is_tileset_isometric() ? rotate : noop; - - if( action == "UP" ) { - return transform( tripoint::north ); - } else if( action == "DOWN" ) { - return transform( tripoint::south ); - } else if( action == "LEFT" ) { - return transform( tripoint::west ); - } else if( action == "RIGHT" ) { - return transform( tripoint::east ); - } else if( action == "LEFTUP" ) { - return transform( tripoint::north_west ); - } else if( action == "RIGHTUP" ) { - return transform( tripoint::north_east ); - } else if( action == "LEFTDOWN" ) { - return transform( tripoint::south_west ); - } else if( action == "RIGHTDOWN" ) { - return transform( tripoint::south_east ); - } else { - return std::nullopt; - } -} - std::optional input_context::get_direction_rel_ms( const std::string &action ) const { diff --git a/src/input_context.h b/src/input_context.h index c97b38b253d0b..380f12f5f0d6d 100644 --- a/src/input_context.h +++ b/src/input_context.h @@ -297,8 +297,6 @@ class input_context * the delta vector associated with it. Otherwise returns an empty value. * The returned vector will always have a z component of 0. */ - // TODO: Get rid of untyped version and change name of the typed one. - std::optional get_direction( const std::string &action ) const; std::optional get_direction_rel_ms( const std::string &action ) const; std::optional get_direction_rel_omt( const std::string &action ) const; diff --git a/src/inventory.cpp b/src/inventory.cpp index 53b337c831215..d90dcacd3f8d3 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -510,7 +510,7 @@ void inventory::form_from_zone( map &m, std::unordered_set &zon std::vector pts; pts.reserve( zone_pts.size() ); for( const tripoint_abs_ms &elem : zone_pts ) { - pts.push_back( m.bub_from_abs( elem ) ); + pts.push_back( m.get_bub( elem ) ); } form_from_map( m, pts, pl, assign_invlet ); } diff --git a/src/inventory_ui.cpp b/src/inventory_ui.cpp index 70a32c1ee8d22..3f954aee90aa5 100644 --- a/src/inventory_ui.cpp +++ b/src/inventory_ui.cpp @@ -2191,7 +2191,7 @@ void inventory_selector::add_basecamp_items( const basecamp &camp ) std::unordered_set tiles = camp.get_storage_tiles(); map &here = get_map(); for( tripoint_abs_ms tile : tiles ) { - add_map_items( here.bub_from_abs( tile ) ); + add_map_items( here.get_bub( tile ) ); } } diff --git a/src/item.cpp b/src/item.cpp index ff3e56b584812..bcf512473c5b6 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -102,6 +102,7 @@ #include "string_id_utils.h" #include "text_snippets.h" #include "translations.h" +#include "trait_group.h" #include "trap.h" #include "try_parse_integer.h" #include "units.h" @@ -368,6 +369,12 @@ item::item( const itype *type, time_point turn, int qty ) : type( type ), bday( set_var( "NANOFAB_ITEM_ID", nanofab_recipe.str() ); } + if( type->trait_group.is_valid() ) { + for( const trait_and_var &tr : trait_group::traits_from( type->trait_group ) ) { + template_traits.push_back( tr.trait ); + } + } + select_itype_variant(); if( type->gun ) { for( const itype_id &mod : type->gun->built_in_mods ) { @@ -1510,7 +1517,7 @@ bool _stacks_location_hint( item const &lhs, item const &rhs ) if( this_loc == that_loc ) { return true; } else if( this_loc != tripoint_abs_omt::max && that_loc != tripoint_abs_omt::max ) { - const tripoint_abs_omt player_loc( coords::project_to( get_map().getglobal( + const tripoint_abs_omt player_loc( coords::project_to( get_map().get_abs( get_player_character().pos_bub() ) ) ); const int this_dist = rl_dist( player_loc, this_loc ); const int that_dist = rl_dist( player_loc, that_loc ); @@ -1727,6 +1734,7 @@ stacking_info item::stacks_with( const item &rhs, bool check_components, bool co // Guns that differ only by dirt/shot_counter can still stack, // but other item_vars such as label/note will prevent stacking static const std::set ignore_keys = { "dirt", "shot_counter", "spawn_location_omt", "ethereal", "last_act_by_char_id" }; + bits.set( tname::segments::TRAITS, template_traits == rhs.template_traits ); bits.set( tname::segments::VARS, map_equal_ignoring_keys( item_vars, rhs.item_vars, ignore_keys ) ); bits.set( tname::segments::ETHEREAL, _stacks_ethereal( *this, rhs ) ); bits.set( tname::segments::LOCATION_HINT, _stacks_location_hint( *this, rhs ) ); @@ -13181,7 +13189,7 @@ bool item::process_temperature_rot( float insulation, const tripoint_bub_ms &pos // Use weather if above ground, use map temp if below units::temperature env_temperature; if( pos.z() >= 0 && flag != temperature_flag::ROOT_CELLAR ) { - env_temperature = wgen.get_weather_temperature( get_map().getglobal( pos ), time, seed ); + env_temperature = wgen.get_weather_temperature( get_map().get_abs( pos ), time, seed ); } else { env_temperature = AVERAGE_ANNUAL_TEMPERATURE; } @@ -13880,7 +13888,7 @@ ret_val item::link_to( vehicle &veh, const point_rel_ms &mount, link_state link().source = bio_link ? link_state::bio_cable : link_state::no_link; link().target = link_type; link().t_veh = veh.get_safe_reference(); - link().t_abs_pos = get_map().getglobal( link().t_veh->pos_bub() ); + link().t_abs_pos = get_map().get_abs( link().t_veh->pos_bub() ); link().t_mount = mount; link().s_bub_pos = tripoint_bub_ms::min; // Forces the item to check the length during process_link. @@ -14133,7 +14141,7 @@ bool item::process_link( map &here, Character *carrier, const tripoint_bub_ms &p if( !length_check_needed ) { return false; } - link().length = rl_dist( here.getglobal( pos ), link().t_abs_pos ) + + link().length = rl_dist( here.get_abs( pos ), link().t_abs_pos ) + link().t_mount.abs().x() + link().t_mount.abs().y(); if( check_length() ) { return reset_link( true, carrier ); @@ -14186,7 +14194,7 @@ bool item::process_link( map &here, Character *carrier, const tripoint_bub_ms &p // Set the new absolute position to the vehicle's origin. tripoint_bub_ms t_veh_bub_pos = t_veh->pos_bub(); - tripoint_abs_ms new_t_abs_pos = here.getglobal( t_veh_bub_pos ); + tripoint_abs_ms new_t_abs_pos = here.get_abs( t_veh_bub_pos ); if( link().t_abs_pos != new_t_abs_pos ) { link().t_abs_pos = new_t_abs_pos; length_check_needed = true; @@ -14651,7 +14659,7 @@ bool item::process_internal( map &here, Character *carrier, const tripoint_bub_m here.rotten_item_spawn( *this, pos ); } if( is_corpse() ) { - here.handle_decayed_corpse( *this, here.getglobal( pos ) ); + here.handle_decayed_corpse( *this, here.get_abs( pos ) ); } return true; } diff --git a/src/item.h b/src/item.h index 133cf499a58d8..de2a3fb4eb878 100644 --- a/src/item.h +++ b/src/item.h @@ -1978,7 +1978,7 @@ class item : public visitable * @name Item flags * * If you use any new flags, add them to `flags.json`, - * add a comment to doc/JSON_FLAGS.md and make sure your new + * add a comment to doc/JSON/JSON_FLAGS.md and make sure your new * flag does not conflict with any existing flag. * * Item flags are taken from the item type (@ref itype::item_tags), but also from the @@ -2865,6 +2865,11 @@ class item : public visitable void set_birthday( const time_point &bday ); void handle_pickup_ownership( Character &c ); + /** + * Traits contained for interaction with a genemill furniture. + */ + std::vector template_traits; + /** * Get gun energy drain. Includes modifiers from gunmods. * @return energy drained per shot diff --git a/src/item_factory.cpp b/src/item_factory.cpp index ac25862c421c9..e3b345038d933 100644 --- a/src/item_factory.cpp +++ b/src/item_factory.cpp @@ -4345,6 +4345,10 @@ void Item_factory::load_basic_info( const JsonObject &jo, itype &def, const std: def.nanofab_template_group = item_group_id( jo.get_string( "nanofab_template_group" ) ); } + if( jo.has_string( "trait_group" ) ) { + def.trait_group = string_id( jo.get_string( "trait_group" ) ); + } + if( jo.has_string( "template_requirements" ) ) { def.template_requirements = requirement_id( jo.get_string( "template_requirements" ) ); } diff --git a/src/item_group.cpp b/src/item_group.cpp index f7d2129226d2c..8680b65c6cbf7 100644 --- a/src/item_group.cpp +++ b/src/item_group.cpp @@ -956,6 +956,27 @@ std::map> Item_group::every_item_min_max() co return result; } +std::string item_group::potential_items( const item_group_id &group_id ) +{ + std::string ret; + const Item_spawn_data *spawn_data = spawn_data_from_group( group_id ); + if( spawn_data ) { + const std::map> items_min_max = + spawn_data->every_item_min_max(); + for( const auto &item_min_max : items_min_max ) { + const int &min = item_min_max.second.first; + const int &max = item_min_max.second.second; + if( min != max ) { + ret += string_format( "- %d-%d %s\n", min, max, + item_min_max.first->nname( max ) ); + } else { + ret += string_format( "- %d %s\n", max, item_min_max.first->nname( max ) ); + } + } + } + return ret; +} + item_group::ItemList item_group::items_from( const item_group_id &group_id, const time_point &birthday, spawn_flags flags ) { diff --git a/src/item_group.h b/src/item_group.h index a240e028af39b..06b63e4b86a87 100644 --- a/src/item_group.h +++ b/src/item_group.h @@ -46,6 +46,8 @@ item item_from( const item_group_id &group_id, const time_point &birthday ); * Same as above but with implicit birthday at turn 0. */ item item_from( const item_group_id &group_id ); +// Return a formatted list of min-max items an item group can spawn +std::string potential_items( const item_group_id &group_id ); using ItemList = std::vector; /** diff --git a/src/item_pocket.cpp b/src/item_pocket.cpp index a7c76cd3c8457..146b6b989edd3 100644 --- a/src/item_pocket.cpp +++ b/src/item_pocket.cpp @@ -2411,7 +2411,7 @@ void item_pocket::load_presets() std::ifstream fin; cata_path file = PATH_INFO::pocket_presets(); - fs::path file_path = file.get_unrelative_path(); + std::filesystem::path file_path = file.get_unrelative_path(); fin.open( file_path, std::ifstream::in | std::ifstream::binary ); if( fin.good() ) { diff --git a/src/item_tname.cpp b/src/item_tname.cpp index 3009150d5da43..819d511f4c438 100644 --- a/src/item_tname.cpp +++ b/src/item_tname.cpp @@ -19,6 +19,7 @@ #include "item_pocket.h" #include "itype.h" #include "map.h" +#include "mutation.h" #include "options.h" #include "point.h" #include "recipe.h" @@ -292,7 +293,7 @@ std::string location_hint( item const &it, unsigned int /* quantity */, { if( it.has_flag( json_flag_HINT_THE_LOCATION ) && it.has_var( "spawn_location_omt" ) ) { tripoint_abs_omt loc( it.get_var( "spawn_location_omt", tripoint_abs_omt::zero ) ); - tripoint_abs_omt player_loc( coords::project_to( get_map().getglobal( + tripoint_abs_omt player_loc( coords::project_to( get_map().get_abs( get_avatar().pos_bub() ) ) ); int dist = rl_dist( player_loc, loc ); if( dist < 1 ) { @@ -434,6 +435,7 @@ std::string vars( item const &it, unsigned int /* quantity */, } ret += string_format( " (%s)", item::nname( itype_id( it.get_var( "NANOFAB_ITEM_ID" ) ) ) ); } + if( it.already_used_by_player( get_avatar() ) ) { ret += _( " (used)" ); } @@ -443,6 +445,23 @@ std::string vars( item const &it, unsigned int /* quantity */, return ret; } + +std::string traits( item const &it, unsigned int /* quantity */, + segment_bitset const &/* segments */ ) +{ + std::string ret; + if( it.has_flag( flag_GENE_TECH ) && it.template_traits.size() == 1 ) { + if( it.has_flag( flag_NANOFAB_TEMPLATE_SINGLE_USE ) ) { + //~ Single-use descriptor for nanofab templates. %s = name of resulting item. The leading space is intentional. + ret += string_format( _( " (SINGLE USE %s)" ), it.template_traits.front()->name() ); + } else { + ret += string_format( " (%s)", it.template_traits.front()->name() ); + } + } + return ret; + +} + std::string segment_broken( item const &it, unsigned int /* quantity */, segment_bitset const &/* segments */ ) { @@ -582,6 +601,7 @@ constexpr std::array get_segs_array() arr[static_cast( tname::segments::BROKEN ) ] = segment_broken; arr[static_cast( tname::segments::CBM_STATUS ) ] = cbm_status; arr[static_cast( tname::segments::UPS ) ] = ups; + arr[static_cast( tname::segments::TRAITS ) ] = traits; arr[static_cast( tname::segments::TAGS ) ] = tags; arr[static_cast( tname::segments::VARS ) ] = vars; arr[static_cast( tname::segments::WETNESS ) ] = wetness; diff --git a/src/item_tname.h b/src/item_tname.h index 3b8e405e92923..c806001fd1dbe 100644 --- a/src/item_tname.h +++ b/src/item_tname.h @@ -43,6 +43,7 @@ enum class segments : std::size_t { BROKEN, CBM_STATUS, UPS, + TRAITS, TAGS, VARS, WETNESS, diff --git a/src/itype.h b/src/itype.h index 6d4d1701435bf..2764b2f8e6d8f 100644 --- a/src/itype.h +++ b/src/itype.h @@ -1379,6 +1379,9 @@ struct itype { // itemgroup used to generate the recipes within nanofabricator templates. item_group_id nanofab_template_group; + // list of traits. + string_id trait_group; + // used for corpses placed by mapgen mtype_id source_monster = mtype_id::NULL_ID(); private: diff --git a/src/iuse.cpp b/src/iuse.cpp index e8e7d85cf3c0d..275dc475eef53 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -300,6 +300,8 @@ static const itype_id itype_smartphone_music( "smartphone_music" ); static const itype_id itype_soap( "soap" ); static const itype_id itype_soldering_iron( "soldering_iron" ); static const itype_id itype_spiral_stone( "spiral_stone" ); +static const itype_id itype_splinter( "splinter" ); +static const itype_id itype_stick( "stick" ); static const itype_id itype_syringe( "syringe" ); static const itype_id itype_tazer( "tazer" ); static const itype_id itype_tongs( "tongs" ); @@ -1572,7 +1574,7 @@ std::optional iuse::petfood( Character *p, item *it, const tripoint_bub_ms return std::nullopt; } - const std::optional pnt = choose_adjacent_bub( string_format( + const std::optional pnt = choose_adjacent( string_format( _( "Tame which animal with %s?" ), it->tname() ) ); if( !pnt ) { @@ -1759,7 +1761,7 @@ static bool good_fishing_spot( const tripoint_bub_ms &pos, Character *p ) map &here = get_map(); // isolated little body of water with no definite fish population const oter_id &cur_omt = - overmap_buffer.ter( coords::project_to( here.getglobal( pos ) ) ); + overmap_buffer.ter( coords::project_to( here.get_abs( pos ) ) ); std::string om_id = cur_omt.id().c_str(); if( fishables.empty() && !here.has_flag( ter_furn_flag::TFLAG_CURRENT, pos ) && // this is a ridiculous way to find a good fishing spot, but I'm just trying @@ -1822,7 +1824,7 @@ std::optional iuse::fish_trap( Character *p, item *it, const tripoint_bub_m return std::nullopt; } - const std::optional pnt_ = choose_adjacent_bub( _( "Put fish trap where?" ) ); + const std::optional pnt_ = choose_adjacent( _( "Put fish trap where?" ) ); if( !pnt_ ) { return std::nullopt; } @@ -1942,7 +1944,7 @@ std::optional iuse::extinguisher( Character *p, item *it, const tripoint_bu } // If anyone other than the player wants to use one of these, // they're going to need to figure out how to aim it. - const std::optional dest_ = choose_adjacent_bub( _( "Spray where?" ) ); + const std::optional dest_ = choose_adjacent( _( "Spray where?" ) ); if( !dest_ ) { return std::nullopt; } @@ -2319,7 +2321,7 @@ std::optional iuse::mace( Character *p, item *it, const tripoint_bub_ms & ) } // If anyone other than the player wants to use one of these, // they're going to need to figure out how to aim it. - const std::optional dest_ = choose_adjacent_bub( _( "Spray where?" ) ); + const std::optional dest_ = choose_adjacent( _( "Spray where?" ) ); if( !dest_ ) { return std::nullopt; } @@ -2893,7 +2895,7 @@ std::optional iuse::makemound( Character *p, item *it, const tripoint_bub_m if( p->cant_do_mounted() ) { return std::nullopt; } - const std::optional pnt_ = choose_adjacent_bub( _( "Till soil where?" ) ); + const std::optional pnt_ = choose_adjacent( _( "Till soil where?" ) ); if( !pnt_ ) { return std::nullopt; } @@ -2910,7 +2912,7 @@ std::optional iuse::makemound( Character *p, item *it, const tripoint_bub_m !here.has_flag( ter_furn_flag::TFLAG_PLANT, pnt ) ) { p->add_msg_if_player( _( "You start churning up the earth here." ) ); p->assign_activity( churn_activity_actor( 18000, item_location( *p, it ) ) ); - p->activity.placement = here.getglobal( pnt ); + p->activity.placement = here.get_abs( pnt ); return 1; } else { p->add_msg_if_player( _( "You can't churn up this ground." ) ); @@ -3087,7 +3089,7 @@ static std::optional dig_tool( Character *p, item *it, const tripoint_bub_m tripoint_bub_ms pnt( pos ); if( pos == p->pos_bub() ) { - const std::optional pnt_ = choose_adjacent_bub( prompt ); + const std::optional pnt_ = choose_adjacent( prompt ); if( !pnt_ ) { return std::nullopt; } @@ -3130,7 +3132,7 @@ static std::optional dig_tool( Character *p, item *it, const tripoint_bub_m p->assign_activity( activity, moves ); p->activity.targets.emplace_back( *p, it ); - p->activity.placement = here.getglobal( pnt ); + p->activity.placement = here.get_abs( pnt ); // You can mine either furniture or terrain, and furniture goes first, // according to @ref map::bash_ter_furn() @@ -3197,7 +3199,7 @@ std::optional iuse::pick_lock( Character *p, item *it, const tripoint_bub_m } you.assign_activity( lockpick_activity_actor::use_item( to_moves( duration ), - item_location( you, it ), get_map().getglobal( *target ) ) ); + item_location( you, it ), get_map().get_abs( *target ) ) ); return 1; } @@ -3680,7 +3682,7 @@ std::optional iuse::tazer( Character *p, item *it, const tripoint_bub_ms &p tripoint_bub_ms pnt = pos; if( pos == p->pos_bub() ) { - const std::optional pnt_ = choose_adjacent_bub( _( "Shock where?" ) ); + const std::optional pnt_ = choose_adjacent( _( "Shock where?" ) ); if( !pnt_ ) { return std::nullopt; } @@ -4602,7 +4604,7 @@ void iuse::cut_log_into_planks( Character &p ) p.add_msg_if_player( _( "You cut the log into planks." ) ); p.assign_activity( chop_planks_activity_actor( moves ) ); - p.activity.placement = get_map().getglobal( p.pos_bub() ); + p.activity.placement = get_map().get_abs( p.pos_bub() ); } std::optional iuse::lumber( Character *p, item *it, const tripoint_bub_ms & ) @@ -4699,7 +4701,7 @@ std::optional iuse::chop_tree( Character *p, item *it, const tripoint_bub_m add_msg( m_info, _( "%s helps with this task…" ), helpers[i]->get_name() ); } p->assign_activity( chop_tree_activity_actor( moves, item_location( *p, it ) ) ); - p->activity.placement = here.getglobal( pnt ); + p->activity.placement = here.get_abs( pnt ); return 1; } @@ -4744,7 +4746,7 @@ std::optional iuse::chop_logs( Character *p, item *it, const tripoint_bub_m add_msg( m_info, _( "%s helps with this task…" ), helpers[i]->get_name() ); } p->assign_activity( chop_logs_activity_actor( moves, item_location( *p, it ) ) ); - p->activity.placement = here.getglobal( pnt ); + p->activity.placement = here.get_abs( pnt ); return 1; } @@ -4925,7 +4927,7 @@ std::optional iuse::mop( Character *p, item *, const tripoint_bub_ms & ) std::optional iuse::spray_can( Character *p, item *it, const tripoint_bub_ms & ) { - const std::optional dest_ = choose_adjacent_bub( _( "Spray where?" ) ); + const std::optional dest_ = choose_adjacent( _( "Spray where?" ) ); if( !dest_ ) { return std::nullopt; } @@ -6456,7 +6458,7 @@ static item::extended_photo_def photo_def_for_camera_point( const tripoint_bub_m obj_list ); } - tripoint_abs_omt omp( coords::project_to( here.getglobal( aim_point ) ) ); + tripoint_abs_omt omp( coords::project_to( here.get_abs( aim_point ) ) ); const oter_id &cur_ter = overmap_buffer.ter( omp ); om_vision_level vision = overmap_buffer.seen( omp ); std::string overmap_desc = string_format( _( "In the background you can see a %s." ), @@ -7024,7 +7026,7 @@ std::optional iuse::afs_translocator( Character *p, item *it, const tripoin return std::nullopt; } - const std::optional dest_ = choose_adjacent_bub( _( "Create buoy where?" ) ); + const std::optional dest_ = choose_adjacent( _( "Create buoy where?" ) ); if( !dest_ ) { return std::nullopt; } @@ -8003,12 +8005,12 @@ std::optional iuse::lux_meter( Character *p, item *it, const tripoint_bub_m std::optional iuse::dbg_lux_meter( Character *p, item *, const tripoint_bub_ms &pos ) { map &here = get_map(); - const float incident_light = incident_sunlight( current_weather( here.getglobal( pos ) ), + const float incident_light = incident_sunlight( current_weather( here.get_abs( pos ) ), calendar::turn ); const float nat_light = g->natural_light_level( pos.z() ); const float sunlight = sun_light_at( calendar::turn ); const float sun_irrad = sun_irradiance( calendar::turn ); - const float incident_irrad = incident_sun_irradiance( current_weather( here.getglobal( pos ) ), + const float incident_irrad = incident_sun_irradiance( current_weather( here.get_abs( pos ) ), calendar::turn ); p->add_msg_if_player( m_neutral, _( "Incident light: %.1f\nNatural light: %.1f\nSunlight: %.1f\nSun irradiance: %.1f\nIncident irradiance %.1f" ), @@ -8045,7 +8047,7 @@ std::optional iuse::directional_hologram( Character *p, item *it, const tri it->tname() ); return std::nullopt; } - const std::optional posp = choose_adjacent_bub( + const std::optional posp = choose_adjacent( _( "Choose hologram direction." ) ); if( !posp ) { return std::nullopt; @@ -8143,7 +8145,7 @@ std::optional iuse::capture_monster_act( Character *p, item *it, const trip return std::nullopt; } else { const std::string query = string_format( _( "Place the %s where?" ), contained_name ); - const std::optional pos_ = choose_adjacent_bub( query ); + const std::optional pos_ = choose_adjacent( query ); if( !pos_ ) { return std::nullopt; } @@ -8330,7 +8332,7 @@ heater find_heater( Character *p, item *it ) optional_vpart_position vp = get_map().veh_at( app.value().first ); available_heater = vp->vehicle().connected_battery_power_level().first; heating_effect = app.value().second->charges_to_use(); - vpt = get_map().getglobal( app.value().first ); + vpt = get_map().get_abs( app.value().first ); if( available_heater >= heating_effect ) { return {loc, consume_flag, available_heater, heating_effect, vpt, pseudo_flag}; } else { @@ -8717,16 +8719,16 @@ std::optional iuse::break_stick( Character *p, item *it, const tripoint_bub map &here = get_map(); if( chance <= 20 ) { p->add_msg_if_player( _( "You try to break the stick in two, but it shatters into splinters." ) ); - here.spawn_item( p->pos_bub(), "splinter", 2 ); + here.spawn_item( p->pos_bub(), itype_splinter, 2 ); return 1; } else if( chance <= 40 ) { p->add_msg_if_player( _( "The stick breaks clean into two parts." ) ); - here.spawn_item( p->pos_bub(), "stick", 2 ); + here.spawn_item( p->pos_bub(), itype_stick, 2 ); return 1; } else if( chance <= 100 ) { p->add_msg_if_player( _( "You break the stick, but one half shatters into splinters." ) ); - here.spawn_item( p->pos_bub(), "stick", 1 ); - here.spawn_item( p->pos_bub(), "splinter", 1 ); + here.spawn_item( p->pos_bub(), itype_stick, 1 ); + here.spawn_item( p->pos_bub(), itype_splinter, 1 ); return 1; } return 0; @@ -9368,7 +9370,7 @@ std::optional iuse::binder_manage_recipe( Character *p, item *binder, std::optional iuse::voltmeter( Character *p, item *, const tripoint_bub_ms & ) { - const std::optional pnt_ = choose_adjacent_bub( _( "Check voltage where?" ) ); + const std::optional pnt_ = choose_adjacent( _( "Check voltage where?" ) ); if( !pnt_ ) { return std::nullopt; } diff --git a/src/iuse_actor.cpp b/src/iuse_actor.cpp index a328739e658bd..6d2d5d317b700 100644 --- a/src/iuse_actor.cpp +++ b/src/iuse_actor.cpp @@ -962,7 +962,7 @@ std::optional place_monster_iuse::use( Character *p, item &it, const tripoi } } else { const std::string query = string_format( _( "Place the %s where?" ), newmon.name() ); - const std::optional pnt_ = choose_adjacent_bub( query ); + const std::optional pnt_ = choose_adjacent( query ); if( !pnt_ ) { return std::nullopt; } @@ -1042,7 +1042,7 @@ std::optional place_npc_iuse::use( Character *p, item &, const tripoint_bub map &here = get_map(); const tripoint_range target_range = place_randomly ? points_in_radius( p->pos_bub(), radius ) : - points_in_radius( choose_adjacent_bub( _( "Place NPC where?" ) ).value_or( p->pos_bub() ), 0 ); + points_in_radius( choose_adjacent( _( "Place NPC where?" ) ).value_or( p->pos_bub() ), 0 ); const std::optional target_pos = random_point( target_range, [&here]( const tripoint_bub_ms & t ) { @@ -1123,7 +1123,7 @@ static ret_val check_deploy_square( Character *p, item &it, } tripoint_bub_ms pnt( pos ); if( pos == p->pos_bub() ) { - if( const std::optional pnt_ = choose_adjacent_bub( _( "Deploy where?" ) ) ) { + if( const std::optional pnt_ = choose_adjacent( _( "Deploy where?" ) ) ) { pnt = *pnt_; } else { return ret_val::make_failure( pos ); @@ -1338,7 +1338,7 @@ bool firestarter_actor::prep_firestarter_use( const Character &p, tripoint_bub_m { // checks for fuel are handled by use and the activity, not here if( pos == p.pos_bub() ) { - if( const std::optional pnt_ = choose_adjacent_bub( _( "Light where?" ) ) ) { + if( const std::optional pnt_ = choose_adjacent( _( "Light where?" ) ) ) { pos = *pnt_; } else { return false; @@ -1361,7 +1361,7 @@ bool firestarter_actor::prep_firestarter_use( const Character &p, tripoint_bub_m target_is_firewood = true; } else { zone_manager &mgr = zone_manager::get_manager(); - auto zones = mgr.get_zones( zone_type_SOURCE_FIREWOOD, here.getglobal( pos ) ); + auto zones = mgr.get_zones( zone_type_SOURCE_FIREWOOD, here.get_abs( pos ) ); if( !zones.empty() ) { target_is_firewood = true; } @@ -1513,7 +1513,7 @@ std::optional firestarter_actor::use( Character *p, item &it, 0, it.tname() ); p->activity.targets.emplace_back( *p, &it ); p->activity.values.push_back( g->natural_light_level( pos.z() ) ); - p->activity.placement = get_map().getglobal( pos ); + p->activity.placement = get_map().get_abs( pos ); // charges to use are handled by the activity return 0; } @@ -1980,7 +1980,7 @@ std::optional inscribe_actor::use( Character *p, item &it, const tripoint_b } if( choice == 0 ) { - const std::optional dest_ = choose_adjacent_bub( _( "Write where?" ) ); + const std::optional dest_ = choose_adjacent( _( "Write where?" ) ); if( !dest_ ) { return std::nullopt; } @@ -3982,7 +3982,7 @@ std::optional place_trap_actor::use( Character *p, item &it, const tripoint if( p->cant_do_mounted() ) { return std::nullopt; } - const std::optional pos_ = choose_adjacent_bub( string_format( + const std::optional pos_ = choose_adjacent( string_format( _( "Place %s where?" ), it.tname() ) ); if( !pos_ ) { @@ -5018,7 +5018,7 @@ std::optional link_up_actor::link_to_veh_app( Character *p, item &it, const bool using_power_cord = it.typeId() == itype_power_cord; if( using_power_cord && it.link().t_veh->is_powergrid() && sel_vp->vehicle().is_powergrid() ) { // If both vehicles are adjacent power grids, try to merge them together first. - const point_bub_ms prev_pos = here.bub_from_abs( it.link().t_veh->coord_translate( + const point_bub_ms prev_pos = here.get_bub( it.link().t_veh->coord_translate( it.link().t_mount ) + it.link().t_abs_pos ).xy(); if( selection.xy().raw().distance( prev_pos.raw() ) <= 1.5f && @@ -5287,7 +5287,7 @@ std::optional deploy_tent_actor::use( Character *p, item &it, const tripoin if( p->cant_do_mounted() ) { return std::nullopt; } - const std::optional dir = choose_direction_rel_ms( string_format( + const std::optional dir = choose_direction( string_format( _( "Put up the %s where (%dx%d clear area)?" ), it.tname(), diam, diam ) ); if( !dir ) { return std::nullopt; diff --git a/src/iuse_software_lightson.cpp b/src/iuse_software_lightson.cpp index 51a61748d14d2..12195923cc590 100644 --- a/src/iuse_software_lightson.cpp +++ b/src/iuse_software_lightson.cpp @@ -191,9 +191,9 @@ int lightson_game::start_game() } ui_manager::redraw(); std::string action = ctxt.handle_input(); - if( const std::optional vec = ctxt.get_direction( action ) ) { - position.y = clamp( position.y + vec->y, 0, level_size.y - 1 ); - position.x = clamp( position.x + vec->x, 0, level_size.x - 1 ); + if( const std::optional vec = ctxt.get_direction_rel_ms( action ) ) { + position.y = clamp( position.y + vec->y(), 0, level_size.y - 1 ); + position.x = clamp( position.x + vec->x(), 0, level_size.x - 1 ); } else if( action == "TOGGLE_SPACE" || action == "TOGGLE_5" ) { toggle_lights(); win = check_win(); diff --git a/src/iuse_software_minesweeper.cpp b/src/iuse_software_minesweeper.cpp index bffb8d961fefd..570e4b214425a 100644 --- a/src/iuse_software_minesweeper.cpp +++ b/src/iuse_software_minesweeper.cpp @@ -308,8 +308,8 @@ int minesweeper_game::start_game() action = ctxt.handle_input(); } - if( const std::optional vec = ctxt.get_direction( action ) ) { - const point new_( vec->xy() + point( iPlayerX, iPlayerY ) ); + if( const std::optional vec = ctxt.get_direction_rel_ms( action ) ) { + const point new_( vec->xy().raw() + point( iPlayerX, iPlayerY ) ); if( new_.x >= 0 && new_.x < level.x && new_.y >= 0 && new_.y < level.y ) { iPlayerX = new_.x; iPlayerY = new_.y; diff --git a/src/iuse_software_sokoban.cpp b/src/iuse_software_sokoban.cpp index b658ac610c1f6..92133c1003966 100644 --- a/src/iuse_software_sokoban.cpp +++ b/src/iuse_software_sokoban.cpp @@ -303,9 +303,9 @@ int sokoban_game::start_game() } bMoved = false; - if( const std::optional vec = ctxt.get_direction( action ) ) { - iDirX = vec->x; - iDirY = vec->y; + if( const std::optional vec = ctxt.get_direction_rel_ms( action ) ) { + iDirX = vec->x(); + iDirY = vec->y(); bMoved = true; } else if( action == "QUIT" ) { return iScore; diff --git a/src/json_loader.cpp b/src/json_loader.cpp index 0672ab8d75c03..9509a6a2a0a1d 100644 --- a/src/json_loader.cpp +++ b/src/json_loader.cpp @@ -1,10 +1,9 @@ #include "json_loader.h" +#include #include #include -#include - #include "filesystem.h" #include "flexbuffer_cache.h" #include "flexbuffer_json.h" @@ -51,7 +50,7 @@ flexbuffer_cache &cache_for_save( const cata_path &path ) // Assume lexically normal path auto path_it = path.get_relative_path().begin(); // First path element is the world name - fs::path worldname_path = *path_it; + std::filesystem::path worldname_path = *path_it; std::string worldname_str = worldname_path.u8string(); ++path_it; // Next element is either a file, a character folder, or the maps folder @@ -61,8 +60,8 @@ flexbuffer_cache &cache_for_save( const cata_path &path ) auto it = save_caches.find( worldname_str ); if( it == save_caches.end() ) { it = save_caches.emplace( worldname_str, - std::make_unique( fs::path(), - fs::u8path( PATH_INFO::savedir() ) / worldname_path ) ).first; + std::make_unique( std::filesystem::path(), + std::filesystem::u8path( PATH_INFO::savedir() ) / worldname_path ) ).first; } return *it->second; @@ -133,7 +132,7 @@ std::optional json_loader::from_path_opt( const cata_path &source_fil JsonValue json_loader::from_path_at_offset( const cata_path &source_file, size_t offset ) noexcept( false ) { - fs::path unrelative_path = source_file.get_unrelative_path(); + std::filesystem::path unrelative_path = source_file.get_unrelative_path(); if( !file_exist( unrelative_path ) ) { throw JsonError( unrelative_path.generic_u8string() + " does not exist." ); } diff --git a/src/json_loader.h b/src/json_loader.h index d726c3c03bf30..e1644db648e8a 100644 --- a/src/json_loader.h +++ b/src/json_loader.h @@ -2,8 +2,6 @@ #ifndef CATA_SRC_JSON_LOADER_H #define CATA_SRC_JSON_LOADER_H -#include - #include "path_info.h" #include "flexbuffer_json.h" diff --git a/src/lightmap.cpp b/src/lightmap.cpp index f5665f81e64b0..79524d210ecd8 100644 --- a/src/lightmap.cpp +++ b/src/lightmap.cpp @@ -856,7 +856,7 @@ bool map::pl_sees( const tripoint_bub_ms &t, const int max_range ) const const level_cache &map_cache = get_cache_ref( t.z() ); Character &player_character = get_player_character(); - if( max_range >= 0 && square_dist( getglobal( t ), player_character.get_location() ) > max_range && + if( max_range >= 0 && square_dist( get_abs( t ), player_character.get_location() ) > max_range && map_cache.camera_cache[t.x()][t.y()] == 0 ) { return false; // Out of range! } diff --git a/src/magic_spell_effect.cpp b/src/magic_spell_effect.cpp index fc159c57a5a96..a67964ca83745 100644 --- a/src/magic_spell_effect.cpp +++ b/src/magic_spell_effect.cpp @@ -1772,11 +1772,11 @@ void spell_effect::dash( const spell &sp, Creature &caster, const tripoint_bub_m std::vector trajectory; trajectory.reserve( trajectory_local.size() ); for( const tripoint_bub_ms &local_point : trajectory_local ) { - trajectory.push_back( here.getglobal( local_point ) ); + trajectory.push_back( here.get_abs( local_point ) ); } avatar *caster_you = caster.as_avatar(); auto walk_point = trajectory.begin(); - if( here.bub_from_abs( *walk_point ) == source ) { + if( here.get_bub( *walk_point ) == source ) { ++walk_point; } // save the amount of moves the caster has so we can restore them after the dash @@ -1784,14 +1784,14 @@ void spell_effect::dash( const spell &sp, Creature &caster, const tripoint_bub_m creature_tracker &creatures = get_creature_tracker(); while( walk_point != trajectory.end() ) { if( caster_you != nullptr ) { - if( creatures.creature_at( here.bub_from_abs( *walk_point ) ) || - !g->walk_move( here.bub_from_abs( *walk_point ), false ) ) { + if( creatures.creature_at( here.get_bub( *walk_point ) ) || + !g->walk_move( here.get_bub( *walk_point ), false ) ) { if( walk_point != trajectory.begin() ) { --walk_point; } break; } else if( walk_point != trajectory.begin() ) { - sp.create_field( here.bub_from_abs( *( walk_point - 1 ) ), caster ); + sp.create_field( here.get_bub( *( walk_point - 1 ) ), caster ); g->draw_ter(); } } @@ -1805,7 +1805,7 @@ void spell_effect::dash( const spell &sp, Creature &caster, const tripoint_bub_m tripoint_bub_ms far_target; calc_ray_end( coord_to_angle( source, target ), sp.aoe( caster ), - here.bub_from_abs( *walk_point ), + here.get_bub( *walk_point ), far_target ); spell_effect::override_parameters params( sp, caster ); @@ -1900,7 +1900,7 @@ void spell_effect::effect_on_condition( const spell &sp, Creature &caster, } Creature *victim = creatures.creature_at( potential_target ); dialogue d( victim ? get_talker_for( victim ) : nullptr, get_talker_for( caster ) ); - const tripoint_abs_ms target_abs = get_map().getglobal( potential_target ); + const tripoint_abs_ms target_abs = get_map().get_abs( potential_target ); write_var_value( var_type::context, "spell_location", &d, target_abs.to_string() ); d.amend_callstack( string_format( "Spell: %s Caster: %s", sp.id().c_str(), caster.disp_name() ) ); diff --git a/src/magic_teleporter_list.cpp b/src/magic_teleporter_list.cpp index cd13d5ee530f4..30282c8ccd5d7 100644 --- a/src/magic_teleporter_list.cpp +++ b/src/magic_teleporter_list.cpp @@ -72,7 +72,7 @@ static std::optional find_valid_teleporters_omt( const tripoint_abs_om checker.load( omt_pt, true ); for( const tripoint_omt_ms &p : checker.points_on_zlevel() ) { if( checker.has_flag_furn( ter_furn_flag::TFLAG_TRANSLOCATOR, p ) ) { - return checker.getglobal( p ).raw(); + return checker.get_abs( p ).raw(); } } return std::nullopt; @@ -86,7 +86,7 @@ bool teleporter_list::place_avatar_overmap( Character &you, const tripoint_abs_o if( !global_dest ) { return false; } - tripoint_omt_ms local_dest = omt_dest.omt_from_abs( tripoint_abs_ms( *global_dest ) ) + point( 60, + tripoint_omt_ms local_dest = omt_dest.get_omt( tripoint_abs_ms( *global_dest ) ) + point( 60, 60 ); you.add_effect( effect_ignore_fall_damage, 1_seconds, false, 0, true ); g->place_player_overmap( omt_pt ); diff --git a/src/map.cpp b/src/map.cpp index f3b31908c33f7..147cd0af4fb55 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -380,7 +380,7 @@ void map::memory_clear_vehicle_points( const vehicle &veh ) const continue; } memory_cache_dec_set_dirty( p, true ); - player_character.memorize_clear_decoration( getglobal( p ), "vp_" ); + player_character.memorize_clear_decoration( get_abs( p ), "vp_" ); } } @@ -606,7 +606,7 @@ std::unique_ptr map::detach_vehicle( vehicle *veh ) if( inbounds( pt ) ) { memory_cache_dec_set_dirty( pt, true ); } - get_avatar().memorize_clear_decoration( getglobal( pt ), "vp_" ); + get_avatar().memorize_clear_decoration( get_abs( pt ), "vp_" ); } ch.vehicle_list.erase( veh ); ch.zone_vehicles.erase( veh ); @@ -1227,7 +1227,7 @@ void map::register_vehicle_zone( vehicle *veh, const int zlev ) bool map::deregister_vehicle_zone( zone_data &zone ) const { - const tripoint_bub_ms pos = bub_from_abs( zone.get_start_point() ); + const tripoint_bub_ms pos = get_bub( zone.get_start_point() ); if( const std::optional vp = veh_at( pos ).cargo() ) { vehicle &veh = vp->vehicle(); auto bounds = veh.loot_zones.equal_range( vp->mount_pos() ); @@ -1313,7 +1313,7 @@ VehicleList map::get_vehicles( const tripoint_bub_ms &start, const tripoint_bub_ optional_vpart_position map::veh_at( const tripoint_abs_ms &p ) const { - return veh_at( bub_from_abs( p ) ); + return veh_at( get_bub( p ) ); } optional_vpart_position map::veh_at( const tripoint_bub_ms &p ) const @@ -1726,7 +1726,7 @@ bool map::furn_set( const tripoint_bub_ms &p, const furn_id &new_furniture, cons return false; } if( avoid_creatures ) { - Creature *c = get_creature_tracker().creature_at( getglobal( p ), true ); + Creature *c = get_creature_tracker().creature_at( get_abs( p ), true ); if( c ) { return false; } @@ -1817,7 +1817,7 @@ bool map::furn_set( const tripoint_bub_ms &p, const furn_id &new_furniture, cons memory_cache_dec_set_dirty( p, true ); if( player_character.sees( p ) ) { - player_character.memorize_clear_decoration( getglobal( p ), "f_" ); + player_character.memorize_clear_decoration( get_abs( p ), "f_" ); } if( ( old_f.movecost < 0 ) != ( new_f.movecost < 0 ) ) { @@ -1951,13 +1951,13 @@ uint8_t map::get_known_connections( const tripoint_bub_ms &p, if( use_tiles ) { is_memorized = [&]( const tripoint_bub_ms & q ) { - return !player_character.get_memorized_tile( getglobal( q ) ).get_ter_id().empty(); + return !player_character.get_memorized_tile( get_abs( q ) ).get_ter_id().empty(); }; } else { #endif is_memorized = [&]( const tripoint_bub_ms & q ) { - return player_character.get_memorized_tile( getglobal( q ) ).symbol != 0; + return player_character.get_memorized_tile( get_abs( q ) ).symbol != 0; }; #ifdef TILES } @@ -2036,12 +2036,12 @@ uint8_t map::get_known_connections_f( const tripoint_bub_ms &p, #ifdef TILES if( use_tiles ) { is_memorized = [&]( const tripoint_bub_ms & q ) { - return !player_character.get_memorized_tile( getglobal( q ) ).get_dec_id().empty(); + return !player_character.get_memorized_tile( get_abs( q ) ).get_dec_id().empty(); }; } else { #endif is_memorized = [&]( const tripoint_bub_ms & q ) { - return player_character.get_memorized_tile( getglobal( q ) ).symbol != 0; + return player_character.get_memorized_tile( get_abs( q ) ).symbol != 0; }; #ifdef TILES } @@ -2194,7 +2194,7 @@ bool map::ter_set( const tripoint_bub_ms &p, const ter_id &new_terrain, bool avo return false; } if( avoid_creatures ) { - Creature *c = get_creature_tracker().creature_at( getglobal( p ), true ); + Creature *c = get_creature_tracker().creature_at( get_abs( p ), true ); if( c ) { return false; } @@ -2268,7 +2268,7 @@ bool map::ter_set( const tripoint_bub_ms &p, const ter_id &new_terrain, bool avo memory_cache_ter_set_dirty( p, true ); avatar &player_character = get_avatar(); if( player_character.sees( p ) ) { - player_character.memorize_clear_decoration( getglobal( p ), "t_" ); + player_character.memorize_clear_decoration( get_abs( p ), "t_" ); } if( ( old_t.movecost == 0 ) != ( new_t.movecost == 0 ) ) { @@ -4353,7 +4353,7 @@ void map::batter( const tripoint_bub_ms &p, int power, int tries, const bool sil void map::crush( const tripoint_bub_ms &p ) { creature_tracker &creatures = get_creature_tracker(); - Character *crushed_player = creatures.creature_at( this->getglobal( p ) ); + Character *crushed_player = creatures.creature_at( this->get_abs( p ) ); if( crushed_player != nullptr ) { bool player_inside = false; @@ -4699,9 +4699,9 @@ void map::translate_radius( const ter_id &from, const ter_id &to, float radi, return; } - const tripoint_abs_omt abs_omt_p = coords::project_to( getglobal( p ) ); + const tripoint_abs_omt abs_omt_p = coords::project_to( get_abs( p ) ); for( const tripoint_bub_ms &t : points_on_zlevel() ) { - const tripoint_abs_omt abs_omt_t = coords::project_to( getglobal( t ) ); + const tripoint_abs_omt abs_omt_t = coords::project_to( get_abs( t ) ); const float radiX = trig_dist( p, t ); if( ter( t ) == from ) { // within distance, and either no submap limitation or same overmap coords. @@ -4723,7 +4723,7 @@ void map::transform_radius( const ter_furn_transform_id &transform, int radi, if( !inbounds( p - point( radi, radi ) ) || !inbounds( p + point( radi, radi ) ) ) { debugmsg( "transform_radius called for area out of bounds" ); } - tripoint_bub_ms const loc = bub_from_abs( p ); + tripoint_bub_ms const loc = get_bub( p ); for( tripoint_bub_ms const &t : points_in_radius( loc, radi, 0 ) ) { if( trig_dist( loc, t ) <= radi ) { transform->transform( *this, t ); @@ -4738,7 +4738,7 @@ void map::transform_line( const ter_furn_transform_id &transform, const tripoint debugmsg( "transform_line called for line out of bounds" ); } for( const tripoint_abs_ms &t : line_to( first, second ) ) { - transform->transform( *this, bub_from_abs( t ) ); + transform->transform( *this, get_bub( t ) ); } } @@ -5253,17 +5253,17 @@ item &map::add_item( const tripoint_bub_ms &p, item new_item, int copies ) if( new_item.is_map() && !new_item.has_var( "reveal_map_center_omt" ) ) { new_item.set_var( "reveal_map_center_omt", - coords::project_to( getglobal( p ) ) ); + coords::project_to( get_abs( p ) ) ); } if( new_item.has_flag( json_flag_PRESERVE_SPAWN_OMT ) && !new_item.has_var( "spawn_location_omt" ) ) { - new_item.set_var( "spawn_location_omt", coords::project_to( getglobal( p ) ) ); + new_item.set_var( "spawn_location_omt", coords::project_to( get_abs( p ) ) ); } for( item *const it : new_item.all_items_top( pocket_type::CONTAINER ) ) { if( it->has_flag( json_flag_PRESERVE_SPAWN_OMT ) && !it->has_var( "spawn_location_omt" ) ) { - it->set_var( "spawn_location_omt", coords::project_to( getglobal( p ) ) ); + it->set_var( "spawn_location_omt", coords::project_to( get_abs( p ) ) ); } } @@ -6105,7 +6105,7 @@ bool map::can_see_trap_at( const tripoint_bub_ms &p, const Character &c ) const const trap &map::tr_at( const tripoint_abs_ms &p ) const { - return tr_at( bub_from_abs( p ) ); + return tr_at( get_bub( p ) ); } const trap &map::tr_at( const tripoint_bub_ms &p ) const @@ -6162,7 +6162,7 @@ void map::partial_con_remove( const tripoint_bub_ms &p ) memory_cache_dec_set_dirty( p, true ); avatar &player_character = get_avatar(); if( player_character.sees( p ) ) { - player_character.memorize_clear_decoration( getglobal( p ), "tr_" ); + player_character.memorize_clear_decoration( get_abs( p ), "tr_" ); } } @@ -6205,7 +6205,7 @@ void map::trap_set( const tripoint_bub_ms &p, const trap_id &type ) memory_cache_dec_set_dirty( p, true ); avatar &player_character = get_avatar(); if( player_character.sees( p ) ) { - player_character.memorize_clear_decoration( getglobal( p ), "tr_" ); + player_character.memorize_clear_decoration( get_abs( p ), "tr_" ); } // If there was already a trap here, remove it. if( current_submap->get_trap( l ) != tr_null ) { @@ -6237,7 +6237,7 @@ void map::remove_trap( const tripoint_bub_ms &p ) memory_cache_dec_set_dirty( p, true ); avatar &player_character = get_avatar(); if( player_character.sees( p ) ) { - player_character.memorize_clear_decoration( getglobal( p ), "tr_" ); + player_character.memorize_clear_decoration( get_abs( p ), "tr_" ); } player_character.add_known_trap( p, tr_null.obj() ); } @@ -6795,7 +6795,7 @@ visibility_type map::get_visibility( const lit_level ll, static std::optional get_memory_at( const tripoint_bub_ms &p ) { - const memorized_tile &mt = get_avatar().get_memorized_tile( get_map().getglobal( p ) ); + const memorized_tile &mt = get_avatar().get_memorized_tile( get_map().get_abs( p ) ); if( mt.symbol != 0 ) { return mt.symbol; } @@ -6833,8 +6833,8 @@ void map::draw( const catacurses::window &w, const tripoint_bub_ms ¢er ) }; avatar &player_character = get_avatar(); player_character.prepare_map_memory_region( - getglobal( { min_mm_reg, center.z() } ), - getglobal( { max_mm_reg, center.z() } ) ); + get_abs( { min_mm_reg, center.z() } ), + get_abs( { max_mm_reg, center.z() } ) ); const auto draw_background = [&]( const tripoint_bub_ms & p ) { int sym = ' '; @@ -7133,7 +7133,7 @@ bool map::draw_maptile( const catacurses::window &w, const tripoint_bub_ms &p, } if( param.memorize() && memory_cache_ter_is_dirty( p ) ) { - player_character.memorize_symbol( getglobal( p ), memory_sym ); + player_character.memorize_symbol( get_abs( p ), memory_sym ); memory_cache_ter_set_dirty( p, false ); } @@ -8234,9 +8234,9 @@ void map::handle_decayed_corpse( const item &it, const tripoint_abs_ms &pnt ) if( harvest.has_temperature() ) { harvest.set_item_temperature( get_weather().get_temperature( project_to( pnt ) ) ); } - add_item_or_charges( bub_from_abs( pnt ), harvest, false ); + add_item_or_charges( get_bub( pnt ), harvest, false ); if( anything_left && notify_player ) { - add_msg_if_player_sees( bub_from_abs( pnt ), + add_msg_if_player_sees( get_bub( pnt ), _( "You notice a %1$s has rotted away, leaving a %2$s." ), it.tname(), harvest.tname() ); } @@ -8296,7 +8296,7 @@ void map::fill_funnels( const tripoint_bub_ms &p, const time_point &since ) } } if( biggest_container != items.end() ) { - retroactively_fill_from_funnel( *biggest_container, tr, since, calendar::turn, getglobal( p ) ); + retroactively_fill_from_funnel( *biggest_container, tr, since, calendar::turn, get_abs( p ) ); } } @@ -8315,7 +8315,7 @@ void map::grow_plant( const tripoint_bub_ms &p ) if( seed == items.end() ) { // No seed there anymore, we don't know what kind of plant it was. // TODO: Fix point types - const tripoint_abs_ms ms_pos( getglobal( p ) ); + const tripoint_abs_ms ms_pos( get_abs( p ) ); const tripoint_abs_sm sm_pos = project_to( ms_pos ); const oter_id ot = overmap_buffer.ter( project_to( ms_pos ) ); dbg( D_ERROR ) << "plant furniture has no seed item. " @@ -8733,7 +8733,7 @@ void map::spawn_monsters_submap_group( const tripoint_rel_sm &gp, mongroup &grou const tripoint_bub_ms upper_left{ SEEX * gp.x(), SEEY * gp.y(), gp.z()}; if( !allow_on_terrain( upper_left ) || ( !ignore_inside_checks && has_flag_ter_or_furn( ter_furn_flag::TFLAG_INDOORS, upper_left ) ) ) { - const tripoint_abs_ms glp = getglobal( tripoint_bub_ms( gp.x() * SEEX, gp.y() * SEEY, gp.z() ) ); + const tripoint_abs_ms glp = get_abs( tripoint_bub_ms( gp.x() * SEEX, gp.y() * SEEY, gp.z() ) ); dbg( D_WARNING ) << "Empty locations for group " << group.type.str() << " at uniform submap " << gp.x() << "," << gp.y() << "," << gp.z() << " global " << glp.x() << "," << glp.y() << "," << glp.z(); @@ -8772,7 +8772,7 @@ void map::spawn_monsters_submap_group( const tripoint_rel_sm &gp, mongroup &grou if( locations.empty() ) { // TODO: what now? there is no possible place to spawn monsters, most // likely because the player can see all the places. - const tripoint_abs_ms glp = getglobal( tripoint_bub_ms( gp.x() * SEEX, gp.y() * SEEY, gp.z() ) ); + const tripoint_abs_ms glp = get_abs( tripoint_bub_ms( gp.x() * SEEX, gp.y() * SEEY, gp.z() ) ); dbg( D_WARNING ) << "Empty locations for group " << group.type.str() << " at " << gp.x() << "," << gp.y() << "," << gp.z() << " global " << glp.x() << "," << glp.y() << "," << glp.z(); @@ -8791,10 +8791,10 @@ void map::spawn_monsters_submap_group( const tripoint_rel_sm &gp, mongroup &grou std::vector spawn_details = MonsterGroupManager::GetResultFromGroup( group.type, &pop ); for( const MonsterGroupResult &mgr : spawn_details ) { - if( !mgr.name ) { + if( !mgr.id ) { continue; } - monster tmp( mgr.name ); + monster tmp( mgr.id ); // If a monster came from a horde population, configure them to always be willing to rejoin a horde. if( group.horde ) { @@ -8811,7 +8811,7 @@ void map::spawn_monsters_submap_group( const tripoint_rel_sm &gp, mongroup &grou for( monster &tmp : group.monsters ) { for( int tries = 0; tries < 10 && !locations.empty(); tries++ ) { const tripoint_bub_ms local_pos = random_entry_removed( locations ); - const tripoint_abs_ms abs_pos = get_map().getglobal( local_pos ); + const tripoint_abs_ms abs_pos = get_map().get_abs( local_pos ); if( !tmp.can_move_to( local_pos ) ) { continue; // target can not contain the monster } @@ -8970,7 +8970,7 @@ const std::vector &map::trap_locations( const trap_id &type ) c bool map::inbounds( const tripoint_abs_ms &p ) const { - return inbounds( bub_from_abs( p ) ); + return inbounds( get_bub( p ) ); } bool map::inbounds( const tripoint_bub_ms &p ) const @@ -9511,7 +9511,7 @@ void map::build_map_cache( const int zlev, bool skip_lightmap ) seen_cache_dirty |= player_prev_pos != p || sr != player_prev_range || camera_cache_dirty; if( seen_cache_dirty ) { if( inbounds( p ) ) { - build_seen_cache( bub_from_abs( p ), zlev, sr ); + build_seen_cache( get_bub( p ), zlev, sr ); } player_prev_pos = p; player_prev_range = sr; @@ -9529,7 +9529,7 @@ void map::build_map_cache( const int zlev, bool skip_lightmap ) for( Character::cached_moncam const &mon : u.moncam_cache ) { if( inbounds( mon.second ) ) { int const range = mon.first->type->vision_day; - build_seen_cache( bub_from_abs( mon.second ), mon.second.z(), range, cumulative, + build_seen_cache( get_bub( mon.second ), mon.second.z(), range, cumulative, true, std::max( MAX_VIEW_DISTANCE - range, 0 ) ); cumulative = true; } @@ -9543,12 +9543,12 @@ void map::build_map_cache( const int zlev, bool skip_lightmap ) ////////// ///// coordinate helpers -tripoint_abs_ms map::getglobal( const tripoint_bub_ms &p ) const +tripoint_abs_ms map::get_abs( const tripoint_bub_ms &p ) const { return tripoint_abs_ms{ p.x() + abs_ms.x(), p.y() + abs_ms.y(), p.z() }; } -tripoint_bub_ms map::bub_from_abs( const tripoint_abs_ms &p ) const +tripoint_bub_ms map::get_bub( const tripoint_abs_ms &p ) const { return tripoint_bub_ms { p.x() - abs_ms.x(), p.y() - abs_ms.y(), p.z()}; } diff --git a/src/map.h b/src/map.h index 359ec7c29f237..118ec8d67216e 100644 --- a/src/map.h +++ b/src/map.h @@ -1242,25 +1242,6 @@ class map variant, faction ); } - // FIXME: remove these overloads and require spawn_item to take an - // itype_id - void spawn_item( const tripoint_bub_ms &p, const std::string &type_id, - unsigned quantity = 1, int charges = 0, - const time_point &birthday = calendar::start_of_cataclysm, int damlevel = 0, - const std::set &flags = {}, const std::string &variant = "", - const std::string &faction = "" ) { - spawn_item( p, itype_id( type_id ), quantity, charges, birthday, damlevel, flags, variant, - faction ); - } - void spawn_item( const point_bub_ms &p, const std::string &type_id, - unsigned quantity = 1, int charges = 0, - const time_point &birthday = calendar::start_of_cataclysm, int damlevel = 0, - const std::set &flags = {}, const std::string &variant = "", - const std::string &faction = "" ) { - spawn_item( tripoint_bub_ms( p, abs_sub.z() ), type_id, quantity, charges, birthday, damlevel, - flags, - variant, faction ); - } units::volume max_volume( const tripoint_bub_ms &p ); units::volume free_volume( const tripoint_bub_ms &p ); units::volume stored_volume( const tripoint_bub_ms &p ); @@ -1750,13 +1731,13 @@ class map * Coordinates is in the system that is used by the ter/furn/i_at functions. * Output is in the same scale, but in global system. */ - tripoint_abs_ms getglobal( const tripoint_bub_ms &p ) const; + tripoint_abs_ms get_abs( const tripoint_bub_ms &p ) const; /** - * Inverse of @ref getglobal + * Inverse of @ref get_abs */ - tripoint_bub_ms bub_from_abs( const tripoint_abs_ms &p ) const; - point_bub_ms bub_from_abs( const point_abs_ms &p ) const { - return bub_from_abs( tripoint_abs_ms( p, abs_sub.z() ) ).xy(); + tripoint_bub_ms get_bub( const tripoint_abs_ms &p ) const; + point_bub_ms get_bub( const point_abs_ms &p ) const { + return get_bub( tripoint_abs_ms( p, abs_sub.z() ) ).xy(); } bool inbounds( const tripoint_bub_ms &p ) const; bool inbounds( const tripoint_abs_ms &p ) const; @@ -2383,14 +2364,6 @@ class tinymap : private map map::spawn_item( rebase_bub( p ), type_id, quantity, charges, birthday, damlevel, flags, variant, faction ); } - void spawn_item( const tripoint_omt_ms &p, const std::string &type_id, // TODO: Make it typed - unsigned quantity = 1, int charges = 0, - const time_point &birthday = calendar::start_of_cataclysm, int damlevel = 0, - const std::set &flags = {}, const std::string &variant = "", - const std::string &faction = "" ) { - map::spawn_item( rebase_bub( p ), type_id, quantity, charges, birthday, damlevel, flags, variant, - faction ); - } std::vector spawn_items( const tripoint_omt_ms &p, const std::vector &new_items ) { return map::spawn_items( rebase_bub( p ), new_items ); } @@ -2474,11 +2447,11 @@ class tinymap : private map tripoint_abs_sm get_abs_sub() const { return map::get_abs_sub(); } - tripoint_abs_ms getglobal( const tripoint_omt_ms &p ) const { - return map::getglobal( rebase_bub( p ) ); + tripoint_abs_ms get_abs( const tripoint_omt_ms &p ) const { + return map::get_abs( rebase_bub( p ) ); } - tripoint_omt_ms omt_from_abs( const tripoint_abs_ms &p ) const { - return rebase_omt( map::bub_from_abs( p ) ); + tripoint_omt_ms get_omt( const tripoint_abs_ms &p ) const { + return rebase_omt( map::get_bub( p ) ); }; bool is_outside( const tripoint_omt_ms &p ) const { return map::is_outside( rebase_bub( p ) ); diff --git a/src/map_field.cpp b/src/map_field.cpp index 7906984374238..88bc27b61afb7 100644 --- a/src/map_field.cpp +++ b/src/map_field.cpp @@ -278,7 +278,7 @@ void map::spread_gas( field_entry &cur, const tripoint_bub_ms &p, int percent_sp const bool sheltered = g->is_sheltered( p ); weather_manager &weather = get_weather(); const int winddirection = weather.winddirection; - const int windpower = get_local_windpower( weather.windspeed, om_ter, getglobal( p ), + const int windpower = get_local_windpower( weather.windspeed, om_ter, get_abs( p ), winddirection, sheltered ); @@ -770,7 +770,7 @@ static void field_processor_monster_spawn( const tripoint_bub_ms &p, field_entry std::vector spawn_details = MonsterGroupManager::GetResultFromGroup( int_level.monster_spawn_group, &monster_spawn_count ); for( const MonsterGroupResult &mgr : spawn_details ) { - if( !mgr.name ) { + if( !mgr.id ) { continue; } if( const std::optional spawn_point = @@ -953,7 +953,7 @@ void field_processor_fd_fire( const tripoint_bub_ms &p, field_entry &cur, field_ bool sheltered = g->is_sheltered( p ); weather_manager &weather = get_weather(); int winddirection = weather.winddirection; - int windpower = get_local_windpower( weather.windspeed, om_ter, get_map().getglobal( p ), + int windpower = get_local_windpower( weather.windspeed, om_ter, get_map().get_abs( p ), winddirection, sheltered ); const ter_t &ter = map_tile.get_ter_t(); @@ -1076,7 +1076,7 @@ void field_processor_fd_fire( const tripoint_bub_ms &p, field_entry &cur, field_ if( cur.get_field_intensity() > 1 && one_in( 200 - cur.get_field_intensity() * 50 ) ) { here.bash( p, 999, false, true, true ); - here.spawn_item( p, "ash", 1, rng( 10, 1000 ) ); + here.spawn_item( p, itype_ash, 1, rng( 10, 1000 ) ); } } else if( frn.has_flag( ter_furn_flag::TFLAG_FLAMMABLE_ASH ) ) { diff --git a/src/map_selector.cpp b/src/map_selector.cpp index 256ee245848c3..cd0d695a52671 100644 --- a/src/map_selector.cpp +++ b/src/map_selector.cpp @@ -75,7 +75,7 @@ std::optional random_point( const tripoint_range( om_addr ); submap_addr += offsets_offset.raw(); // TODO: Make += etc. available to relative parameters as well. @@ -296,7 +296,7 @@ void mapbuffer::save_quad( } ); if( all_uniform && reverted_to_uniform ) { - fs::remove( filename.get_unrelative_path() ); + std::filesystem::remove( filename.get_unrelative_path() ); } } diff --git a/src/mapdata.cpp b/src/mapdata.cpp index 9b7dd83856d0e..dfac7527100bd 100644 --- a/src/mapdata.cpp +++ b/src/mapdata.cpp @@ -14,6 +14,7 @@ #include "color.h" #include "debug.h" #include "enum_conversions.h" +#include "game.h" #include "generic_factory.h" #include "harvest.h" #include "iexamine.h" @@ -24,6 +25,7 @@ #include "mod_manager.h" #include "output.h" #include "rng.h" +#include "skill.h" #include "string_formatter.h" #include "translations.h" #include "trap.h" @@ -381,6 +383,13 @@ void map_fd_bash_info::load( const JsonObject &jo, const bool was_loaded, optional( jo, was_loaded, "msg_success", field_bash_msg_success ); } +std::string map_common_bash_info::potential_bash_items( const std::string + &ter_furn_name ) const +{ + //TODO: Add a descriptive indicator of vaguely how hard it is to bash? + return string_format( _( "Bashing the %s would yield:\n%s" ), + ter_furn_name, item_group::potential_items( drop_group ) ); +} void map_common_deconstruct_info::load( const JsonObject &jo, const bool was_loaded, const std::string &context ) @@ -411,6 +420,22 @@ void map_furn_deconstruct_info::load( const JsonObject &jo, const bool was_loade map_common_deconstruct_info::load( jo, was_loaded, context ); } +std::string map_common_deconstruct_info::potential_deconstruct_items( const std::string + &ter_furn_name ) const +{ + Character &who = get_avatar(); + bool will_practice_skill = !!skill && who.get_skill_level( skill->id ) >= skill->min && + who.get_skill_level( skill->id ) < skill->max; + if( will_practice_skill ) { + return string_format( + _( "Deconstructing the %s would yield:\n%s\nYou feel you might also learn something about %s." ), + ter_furn_name, item_group::potential_items( drop_group ), skill->id.obj().name() ); + } else { + return string_format( _( "Deconstructing the %s would yield:\n%s" ), + ter_furn_name, item_group::potential_items( drop_group ) ); + } +} + bool map_shoot_info::load( const JsonObject &jsobj, const std::string_view member, bool was_loaded ) { JsonObject j = jsobj.get_object( member ); @@ -629,6 +654,16 @@ std::vector ter_t::extended_description() const std::vector tmp = map_data_common_t::extended_description(); ret.insert( ret.end(), tmp.begin(), tmp.end() ); + if( deconstruct ) { + ret.emplace_back( "--" ); + ret.emplace_back( deconstruct->potential_deconstruct_items( name() ) ); + } + + if( is_smashable() ) { + ret.emplace_back( "--" ); + ret.emplace_back( bash->potential_bash_items( name() ) ); + } + return ret; } @@ -659,6 +694,16 @@ std::vector furn_t::extended_description() const } } + if( deconstruct ) { + ret.emplace_back( "--" ); + ret.emplace_back( deconstruct->potential_deconstruct_items( name() ) ); + } + + if( is_smashable() ) { + ret.emplace_back( "--" ); + ret.emplace_back( bash->potential_bash_items( name() ) ); + } + return ret; } @@ -735,7 +780,6 @@ std::vector map_data_common_t::extended_description() const add( text ); } }; - add_if( is_smashable(), _( "Smashable." ) ); add_if( has_flag( ter_furn_flag::TFLAG_DIGGABLE ), _( "Diggable." ) ); add_if( has_flag( ter_furn_flag::TFLAG_PLOWABLE ), _( "Plowable." ) ); add_if( has_flag( ter_furn_flag::TFLAG_ROUGH ), _( "Rough." ) ); @@ -745,7 +789,9 @@ std::vector map_data_common_t::extended_description() const add_if( has_flag( ter_furn_flag::TFLAG_EASY_DECONSTRUCT ), _( "Simple." ) ); add_if( has_flag( ter_furn_flag::TFLAG_MOUNTABLE ), _( "Mountable." ) ); add_if( is_flammable(), _( "Flammable." ) ); - tmp.emplace_back( result ); + if( !result.empty() ) { + tmp.emplace_back( result ); + } std::vector ret; ret.reserve( tmp.size() ); diff --git a/src/mapdata.h b/src/mapdata.h index 509a27c013439..b6f5bec4271a0 100644 --- a/src/mapdata.h +++ b/src/mapdata.h @@ -62,6 +62,7 @@ struct map_common_bash_info { //TODO: Half of this shouldn't be common std::vector tent_centers; void load( const JsonObject &jo, bool was_loaded, const std::string &context ); void check( const std::string &id ) const; + std::string potential_bash_items( const std::string &ter_furn_name ) const; public: virtual ~map_common_bash_info() = default; }; @@ -103,6 +104,7 @@ struct map_common_deconstruct_info { virtual void check( const std::string &id ) const; public: virtual ~map_common_deconstruct_info() = default; + std::string potential_deconstruct_items( const std::string &ter_furn_name ) const; }; struct map_ter_deconstruct_info : map_common_deconstruct_info { ter_str_id ter_set = ter_str_id::NULL_ID(); diff --git a/src/mapgen.cpp b/src/mapgen.cpp index 528f6e3fac0bd..6fb87f8c1d1c2 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -116,11 +116,24 @@ static const item_group_id Item_spawn_data_lab_dorm( "lab_dorm" ); static const item_group_id Item_spawn_data_mut_lab( "mut_lab" ); static const item_group_id Item_spawn_data_teleport( "teleport" ); +static const itype_id itype_UPS_off( "UPS_off" ); static const itype_id itype_ash( "ash" ); static const itype_id itype_avgas( "avgas" ); static const itype_id itype_diesel( "diesel" ); static const itype_id itype_gasoline( "gasoline" ); +static const itype_id itype_glass_shard( "glass_shard" ); +static const itype_id itype_heavy_battery_cell( "heavy_battery_cell" ); +static const itype_id itype_id_science( "id_science" ); static const itype_id itype_jp8( "jp8" ); +static const itype_id itype_laser_rifle( "laser_rifle" ); +static const itype_id itype_plasma( "plasma" ); +static const itype_id itype_plasma_gun( "plasma_gun" ); +static const itype_id itype_plut_cell( "plut_cell" ); +static const itype_id itype_recipe_atomic_battery( "recipe_atomic_battery" ); +static const itype_id itype_recipe_caseless( "recipe_caseless" ); +static const itype_id itype_rm13_armor( "rm13_armor" ); +static const itype_id itype_rock( "rock" ); +static const itype_id itype_v29( "v29" ); static const itype_id itype_water( "water" ); static const mongroup_id GROUP_BREATHER( "GROUP_BREATHER" ); @@ -366,7 +379,7 @@ void map::generate( const tripoint_abs_omt &p, const time_point &when, bool save std::vector spawn_details = MonsterGroupManager::GetResultFromGroup( spawns.group, &pop ); for( const MonsterGroupResult &mgr : spawn_details ) { - if( !mgr.name ) { + if( !mgr.id ) { continue; } if( const std::optional pt = @@ -2024,7 +2037,7 @@ class jmapgen_npc : public jmapgen_piece tripoint_bub_ms const dst( x.get(), y.get(), dat.zlevel() + z.get() ); // TODO: Make place_npc 3D aware. character_id npc_id = dat.m.place_npc( dst.xy(), chosen_id ); - if( get_map().inbounds( dat.m.getglobal( dst ) ) ) { + if( get_map().inbounds( dat.m.get_abs( dst ) ) ) { dat.m.queue_main_cleanup(); } if( dat.mission() && target ) { @@ -2654,7 +2667,7 @@ class jmapgen_monster : public jmapgen_piece MonsterGroupManager::GetResultFromGroup( chosen_group, nullptr, nullptr, false, nullptr, use_pack_size ); for( const MonsterGroupResult &mgr : spawn_details ) { - dat.m.add_spawn( mgr.name, spawn_count * pack_size.get(), + dat.m.add_spawn( mgr.id, spawn_count * pack_size.get(), { x.get(), y.get(), dat.zlevel() + z.get()}, friendly, -1, mission_id, chosen_name, data ); } @@ -2737,7 +2750,7 @@ class jmapgen_vehicle : public jmapgen_piece_with_has_vehicle_collision if( veh && !faction.empty() ) { veh->set_owner( faction_id( faction ) ); } - if( get_map().inbounds( dat.m.getglobal( dst ) ) ) { + if( get_map().inbounds( dat.m.get_abs( dst ) ) ) { dat.m.queue_main_cleanup(); } } @@ -3482,9 +3495,9 @@ class jmapgen_zone : public jmapgen_piece const std::string &/*context*/ ) const override { zone_type_id chosen_zone_type = zone_type.get( dat ); faction_id chosen_faction = faction.get( dat ); - const tripoint_abs_ms start = dat.m.getglobal( tripoint_bub_ms( int( x.val ), int( y.val ), + const tripoint_abs_ms start = dat.m.get_abs( tripoint_bub_ms( int( x.val ), int( y.val ), dat.zlevel() + z.get() ) ); - const tripoint_abs_ms end = dat.m.getglobal( tripoint_bub_ms( int( x.valmax ), int( y.valmax ), + const tripoint_abs_ms end = dat.m.get_abs( tripoint_bub_ms( int( x.valmax ), int( y.valmax ), dat.zlevel() + z.get() ) ); mapgen_place_zone( start, end, chosen_zone_type, chosen_faction, name, filter, &dat.m ); } @@ -3512,8 +3525,8 @@ class jmapgen_variable : public jmapgen_piece } void apply( const mapgendata &dat, const jmapgen_int &x, const jmapgen_int &y, const jmapgen_int &z, const std::string &/*context*/ ) const override { - queued_points[name] = dat.m.getglobal( tripoint_bub_ms( int( x.val ), int( y.val ), - dat.zlevel() + z.get() ) ); + queued_points[name] = dat.m.get_abs( tripoint_bub_ms( int( x.val ), int( y.val ), + dat.zlevel() + z.get() ) ); } }; @@ -3604,7 +3617,7 @@ class jmapgen_remove_all : public jmapgen_piece dat.m.clear_fields( p ); dat.m.delete_graffiti( p ); if( optional_vpart_position vp = dat.m.veh_at( p ) ) { - if( get_map().inbounds( dat.m.getglobal( start ) ) ) { + if( get_map().inbounds( dat.m.get_abs( start ) ) ) { get_map().remove_vehicle_from_cache( &vp->vehicle(), start.z(), end.z() ); } dat.m.destroy_vehicle( &vp->vehicle() ); @@ -5034,7 +5047,7 @@ bool jmapgen_setmap::apply( const mapgendata &dat, const tripoint_rel_ms &offset } break; case JMAPGEN_SETMAP_CREATURE_REMOVE: { - Creature *tmp_critter = get_creature_tracker().creature_at( m.getglobal( + Creature *tmp_critter = get_creature_tracker().creature_at( m.get_abs( target_pos ), true ); if( tmp_critter && !tmp_critter->is_avatar() ) { tmp_critter->die( nullptr ); @@ -5090,7 +5103,7 @@ bool jmapgen_setmap::apply( const mapgendata &dat, const tripoint_rel_ms &offset } break; case JMAPGEN_SETMAP_VARIABLE: { - queued_points[string_val] = m.getglobal( target_pos ); + queued_points[string_val] = m.get_abs( target_pos ); } break; case JMAPGEN_SETMAP_LINE_TER: { @@ -5135,7 +5148,7 @@ bool jmapgen_setmap::apply( const mapgendata &dat, const tripoint_rel_ms &offset point_bub_ms( x2_get(), y2_get() ), 0 ); for( const point_bub_ms &i : line ) { - Creature *tmp_critter = get_creature_tracker().creature_at( tripoint_abs_ms( m.getglobal( + Creature *tmp_critter = get_creature_tracker().creature_at( tripoint_abs_ms( m.get_abs( tripoint_bub_ms( i.x(), i.y(), z_level ) ) ), true ); if( tmp_critter && !tmp_critter->is_avatar() ) { @@ -5218,7 +5231,7 @@ bool jmapgen_setmap::apply( const mapgendata &dat, const tripoint_rel_ms &offset const int cy2 = y2_get(); for( int tx = c.x(); tx <= cx2; tx++ ) { for( int ty = c.y(); ty <= cy2; ty++ ) { - Creature *tmp_critter = get_creature_tracker().creature_at( tripoint_abs_ms( m.getglobal( + Creature *tmp_critter = get_creature_tracker().creature_at( tripoint_abs_ms( m.get_abs( tripoint_bub_ms( tx, ty, z_level ) ) ), true ); if( tmp_critter && !tmp_critter->is_avatar() ) { @@ -6353,7 +6366,7 @@ void map::draw_lab( mapgendata &dat ) point_bub_ms( 6, SEEY * 2 - 7 ), abs_sub.z(), 1, true ); place_spawns( GROUP_ROBOT_SECUBOT, 1, point_bub_ms( SEEX * 2 - 7, SEEY * 2 - 7 ), point_bub_ms( SEEX * 2 - 7, SEEY * 2 - 7 ), abs_sub.z(), 1, true ); - spawn_item( point_bub_ms( SEEX - 4, SEEY - 2 ), "id_science" ); + spawn_item( point_bub_ms( SEEX - 4, SEEY - 2 ), itype_id_science ); if( loot_variant <= 96 ) { mtrap_set( this, tripoint_bub_ms( SEEX - 3, SEEY - 3, dat.zlevel() ), tr_dissector ); mtrap_set( this, tripoint_bub_ms( SEEX + 2, SEEY - 3, dat.zlevel() ), tr_dissector ); @@ -6375,22 +6388,22 @@ void map::draw_lab( mapgendata &dat ) furn_set( point_bub_ms( SEEX - 1, SEEY ), furn_f_table ); furn_set( point_bub_ms( SEEX, SEEY ), furn_f_table ); if( loot_variant <= 67 ) { - spawn_item( point_bub_ms( SEEX, SEEY - 1 ), "UPS_off" ); - spawn_item( point_bub_ms( SEEX, SEEY - 1 ), "heavy_battery_cell" ); - spawn_item( point_bub_ms( SEEX - 1, SEEY ), "v29" ); - spawn_item( point_bub_ms( SEEX - 1, SEEY ), "laser_rifle", dice( 1, 0 ) ); - spawn_item( point_bub_ms( SEEX, SEEY ), "plasma_gun" ); - spawn_item( point_bub_ms( SEEX, SEEY ), "plasma" ); - spawn_item( point_bub_ms( SEEX - 1, SEEY ), "recipe_atomic_battery" ); - spawn_item( point_bub_ms( SEEX + 1, SEEY ), "plut_cell", rng( 8, 20 ) ); + spawn_item( point_bub_ms( SEEX, SEEY - 1 ), itype_UPS_off ); + spawn_item( point_bub_ms( SEEX, SEEY - 1 ), itype_heavy_battery_cell ); + spawn_item( point_bub_ms( SEEX - 1, SEEY ), itype_v29 ); + spawn_item( point_bub_ms( SEEX - 1, SEEY ), itype_laser_rifle, dice( 1, 0 ) ); + spawn_item( point_bub_ms( SEEX, SEEY ), itype_plasma_gun ); + spawn_item( point_bub_ms( SEEX, SEEY ), itype_plasma ); + spawn_item( point_bub_ms( SEEX - 1, SEEY ), itype_recipe_atomic_battery ); + spawn_item( point_bub_ms( SEEX + 1, SEEY ), itype_plut_cell, rng( 8, 20 ) ); } else if( loot_variant < 89 ) { - spawn_item( point_bub_ms( SEEX, SEEY ), "recipe_atomic_battery" ); - spawn_item( point_bub_ms( SEEX + 1, SEEY ), "plut_cell", rng( 8, 20 ) ); + spawn_item( point_bub_ms( SEEX, SEEY ), itype_recipe_atomic_battery ); + spawn_item( point_bub_ms( SEEX + 1, SEEY ), itype_plut_cell, rng( 8, 20 ) ); } else { // loot_variant between 90 and 96. - spawn_item( point_bub_ms( SEEX - 1, SEEY - 1 ), "rm13_armor" ); - spawn_item( point_bub_ms( SEEX, SEEY - 1 ), "plut_cell" ); - spawn_item( point_bub_ms( SEEX - 1, SEEY ), "plut_cell" ); - spawn_item( point_bub_ms( SEEX, SEEY ), "recipe_caseless" ); + spawn_item( point_bub_ms( SEEX - 1, SEEY - 1 ), itype_rm13_armor ); + spawn_item( point_bub_ms( SEEX, SEEY - 1 ), itype_plut_cell ); + spawn_item( point_bub_ms( SEEX - 1, SEEY ), itype_plut_cell ); + spawn_item( point_bub_ms( SEEX, SEEY ), itype_recipe_caseless ); } } else { // 4% of the lab ends will be this weapons testing end. mtrap_set( this, tripoint_bub_ms( SEEX - 4, SEEY - 3, dat.zlevel() ), tr_dissector ); @@ -6423,7 +6436,7 @@ void map::draw_lab( mapgendata &dat ) place_items( Item_spawn_data_guns_rare, 96, point_bub_ms( SEEX - 2, SEEY ), point_bub_ms( SEEX + 1, SEEY ), abs_sub.z(), false, calendar::start_of_cataclysm ); - spawn_item( point_bub_ms( SEEX + 1, SEEY ), "plut_cell", rng( 1, 10 ) ); + spawn_item( point_bub_ms( SEEX + 1, SEEY ), itype_plut_cell, rng( 1, 10 ) ); } break; // Netherworld access @@ -6452,7 +6465,7 @@ void map::draw_lab( mapgendata &dat ) } } - spawn_item( point_bub_ms( SEEX - 1, 8 ), "id_science" ); + spawn_item( point_bub_ms( SEEX - 1, 8 ), itype_id_science ); tmpcomp = add_computer( { SEEX, 8, abs_sub.z() }, _( "Sub-prime contact console" ), 7 ); if( monsters_end ) { //only add these options when there are monsters. @@ -6506,7 +6519,7 @@ void map::draw_lab( mapgendata &dat ) line( this, ter_t_reinforced_glass, point_bub_ms( SEEX + 1, SEEY - 1 ), point_bub_ms( SEEX + 1, SEEY ), dat.zlevel() ); - spawn_item( point_bub_ms( SEEX - 4, SEEY - 3 ), "id_science" ); + spawn_item( point_bub_ms( SEEX - 4, SEEY - 3 ), itype_id_science ); furn_set( point_bub_ms( SEEX - 3, SEEY - 3 ), furn_f_console ); tmpcomp = add_computer( { SEEX - 3, SEEY - 3, abs_sub.z() }, _( "Bionic access" ), 3 ); @@ -6538,7 +6551,7 @@ void map::draw_lab( mapgendata &dat ) line( this, ter_t_cvdbody, point_bub_ms( SEEX + 1, SEEY - 2 ), point_bub_ms( SEEX + 1, SEEY + 1 ), dat.zlevel() ); ter_set( point_bub_ms( SEEX, SEEY - 2 ), ter_t_cvdmachine ); - spawn_item( point_bub_ms( SEEX, SEEY - 3 ), "id_science" ); + spawn_item( point_bub_ms( SEEX, SEEY - 3 ), itype_id_science ); break; } } // end use_hardcoded_lab_finale @@ -6630,7 +6643,7 @@ void map::place_spawns( const mongroup_id &group, const int chance, std::vector spawn_details = MonsterGroupManager::GetResultFromGroup( group, &num ); for( const MonsterGroupResult &mgr : spawn_details ) { - add_spawn( mgr.name, mgr.pack_size, { p, abs_sub.z() }, + add_spawn( mgr.id, mgr.pack_size, { p, abs_sub.z() }, friendly, -1, mission_id, name, mgr.data ); } } @@ -6680,7 +6693,7 @@ void map::place_vending( const tripoint_bub_ms &p, const item_group_id &type, bo bash( p, 9999 ); for( const tripoint_bub_ms &loc : points_in_radius( p, 1 ) ) { if( one_in( 4 ) ) { - spawn_item( loc, "glass_shard", rng( 1, 25 ) ); + spawn_item( loc, itype_glass_shard, rng( 1, 25 ) ); } } } else { @@ -6693,7 +6706,7 @@ character_id map::place_npc( const point_bub_ms &p, const string_id temp = make_shared_fast(); temp->normalize(); temp->load_npc_template( type ); - temp->spawn_at_precise( getglobal( { p, abs_sub.z() } ) ); + temp->spawn_at_precise( get_abs( { p, abs_sub.z() } ) ); temp->toggle_trait( trait_NPC_STATIC_NPC ); overmap_buffer.insert_npc( temp ); return temp->getID(); @@ -6830,7 +6843,7 @@ std::vector map::put_items_from_loc( const item_group_id &group_id, void map::add_spawn( const MonsterGroupResult &spawn_details, const tripoint_bub_ms &p ) { - add_spawn( spawn_details.name, spawn_details.pack_size, p, false, -1, -1, std::nullopt, + add_spawn( spawn_details.id, spawn_details.pack_size, p, false, -1, -1, std::nullopt, spawn_details.data ); } @@ -7135,10 +7148,10 @@ void map::rotate( int turns ) } // Translate bubble -> global -> current map. - const point_bub_ms old( bub_from_abs( get_map().getglobal( np.pos_bub() ).xy() ) ); + const point_bub_ms old( get_bub( get_map().get_abs( np.pos_bub() ).xy() ) ); const point_bub_ms new_pos( old.rotate( turns, {SEEX * 2, SEEY * 2} ) ); - np.spawn_at_precise( getglobal( tripoint_bub_ms( new_pos, sq.z() ) ) ); + np.spawn_at_precise( get_abs( tripoint_bub_ms( new_pos, sq.z() ) ) ); } clear_vehicle_level_caches(); @@ -7217,7 +7230,7 @@ void map::rotate( int turns ) continue; } const point_abs_sm queued_point_sm( project_to( queued_point.second.xy() ) ); - const point_bub_ms queued_point_bub( get_map().bub_from_abs( queued_point.second.xy() ) ); + const point_bub_ms queued_point_bub( get_map().get_bub( queued_point.second.xy() ) ); point_bub_ms old( queued_point_bub.x() % SEEX, queued_point_bub.y() % SEEY ); if( queued_point_sm.x() % 2 != 0 ) { @@ -7227,7 +7240,7 @@ void map::rotate( int turns ) old.y() += SEEY; } const point_bub_ms new_pos( old.rotate( turns, {SEEX * 2, SEEY * 2} ) ); - queued_points[queued_point.first] = getglobal( tripoint_bub_ms( new_pos, + queued_points[queued_point.first] = get_abs( tripoint_bub_ms( new_pos, queued_point.second.z() ) ); } } @@ -7733,7 +7746,7 @@ void map::create_anomaly( const tripoint_bub_ms &cp, artifact_natural_property p if( furn( point_bub_ms( i, j ) ) == furn_f_rubble ) { add_field( tripoint_bub_ms{ i, j, z }, fd_push_items, 1 ); if( one_in( 3 ) ) { - spawn_item( point_bub_ms( i, j ), "rock" ); + spawn_item( point_bub_ms( i, j ), itype_rock ); } } } diff --git a/src/mapgen_functions.cpp b/src/mapgen_functions.cpp index a14c6dbb4fa4a..ad611002296b2 100644 --- a/src/mapgen_functions.cpp +++ b/src/mapgen_functions.cpp @@ -774,7 +774,7 @@ void mapgen_forest( mapgendata &dat ) for( int bd_x = 0; bd_x < 2; bd_x++ ) { for( int bd_y = 0; bd_y < 2; bd_y++ ) { // Use the corners of the overmap tiles as hash seeds. - point_abs_ms global_corner = m->getglobal( tripoint_bub_ms( bd_x * SEEX * 2, bd_y * SEEY * 2, + point_abs_ms global_corner = m->get_abs( tripoint_bub_ms( bd_x * SEEX * 2, bd_y * SEEY * 2, m->get_abs_sub().z() ) ).xy(); uint32_t net_hash = std::hash {}( global_corner.x() ) ^ ( std::hash {}( global_corner.y() ) << 1 ); @@ -2202,7 +2202,7 @@ void mremove_trap( map *m, const tripoint_bub_ms &p, trap_id type ) void mtrap_set( map *m, const tripoint_bub_ms &p, trap_id type, bool avoid_creatures ) { if( avoid_creatures ) { - Creature *c = get_creature_tracker().creature_at( m->getglobal( p ), true ); + Creature *c = get_creature_tracker().creature_at( m->get_abs( p ), true ); if( c ) { return; } @@ -2213,7 +2213,7 @@ void mtrap_set( map *m, const tripoint_bub_ms &p, trap_id type, bool avoid_creat void mtrap_set( tinymap *m, const point_omt_ms &p, trap_id type, bool avoid_creatures ) { if( avoid_creatures ) { - Creature *c = get_creature_tracker().creature_at( m->getglobal( tripoint_omt_ms( p, + Creature *c = get_creature_tracker().creature_at( m->get_abs( tripoint_omt_ms( p, m->get_abs_sub().z() ) ), true ); if( c ) { return; diff --git a/src/mapsharing.cpp b/src/mapsharing.cpp index a0bf810325bad..7193efe126891 100644 --- a/src/mapsharing.cpp +++ b/src/mapsharing.cpp @@ -119,21 +119,21 @@ void ofstream_wrapper::open( const std::ios::openmode mode ) suffix.imbue( std::locale::classic() ); #if defined(__linux__) suffix << "." << getpid() << ".temp"; - temp_path += fs::u8path( suffix.str() ); + temp_path += std::filesystem::u8path( suffix.str() ); #elif defined(_WIN32) suffix << "." << GetCurrentProcessId() << ".temp"; - temp_path += fs::u8path( suffix.str() ); + temp_path += std::filesystem::u8path( suffix.str() ); #else // TODO: exclusive I/O for other systems - temp_path += fs::u8path( ".temp" ); + temp_path += std::filesystem::u8path( ".temp" ); #endif if( !is_lexically_valid( temp_path ) ) { throw std::runtime_error( "path has an invalid name" ); } - if( fs::exists( temp_path ) && !fs::is_directory( temp_path ) ) { + if( std::filesystem::exists( temp_path ) && !std::filesystem::is_directory( temp_path ) ) { std::error_code ec; - fs::remove( temp_path, ec ); + std::filesystem::remove( temp_path, ec ); } file_stream.open( temp_path, mode ); @@ -155,11 +155,11 @@ void ofstream_wrapper::close() // Remove the incomplete or otherwise faulty file (if possible). // Failures from it are ignored as we can't really do anything about them. std::error_code ec; - fs::remove( temp_path, ec ); + std::filesystem::remove( temp_path, ec ); throw std::runtime_error( "writing to file failed" ); } std::error_code ec2; - fs::rename( temp_path, path, ec2 ); + std::filesystem::rename( temp_path, path, ec2 ); if( ec2 ) { // Leave the temp path, so the user can move it if possible. throw std::runtime_error( "moving temporary file \"" + temp_path.u8string() + "\" failed" ); diff --git a/src/math_parser_diag.cpp b/src/math_parser_diag.cpp index 96e27391a4c9e..42208daa6fbd6 100644 --- a/src/math_parser_diag.cpp +++ b/src/math_parser_diag.cpp @@ -387,7 +387,7 @@ diag_eval_dbl_f field_strength_eval( char scope, std::vector const & loc = d.const_actor( beta )->global_pos(); } field_type_id ft = field_type_id( field_value.str( d ) ); - field_entry *fp = here.field_at( here.bub_from_abs( loc ) ).find_field( ft ); + field_entry *fp = here.field_at( here.get_bub( loc ) ).find_field( ft ); return fp ? fp->get_field_intensity() : 0; }; } @@ -1534,7 +1534,7 @@ diag_eval_dbl_f vision_range_eval( char scope, std::vector const & / return chr->unimpaired_range(); } else if( monster const *const mon = actor->get_const_monster(); mon != nullptr ) { map &here = get_map(); - tripoint_bub_ms tripoint = get_map().bub_from_abs( mon->get_location() ); + tripoint_bub_ms tripoint = get_map().get_bub( mon->get_location() ); return mon->sight_range( here.ambient_light_at( tripoint ) ); } throw math::runtime_error( "Tried to access vision range of a non-Character talker" ); diff --git a/src/mattack_actors.cpp b/src/mattack_actors.cpp index 90342c2c4e3cb..b162886215759 100644 --- a/src/mattack_actors.cpp +++ b/src/mattack_actors.cpp @@ -143,7 +143,7 @@ bool leap_actor::call( monster &z ) const return false; } map &here = get_map(); - const tripoint_bub_ms target = here.bub_from_abs( target_abs ); + const tripoint_bub_ms target = here.get_bub( target_abs ); add_msg_debug( debugmode::DF_MATTACK, "Target at coordinates %s", target.to_string_writable() ); diff --git a/src/mission_start.cpp b/src/mission_start.cpp index 7e83741b56ca7..4be14e6b429e5 100644 --- a/src/mission_start.cpp +++ b/src/mission_start.cpp @@ -34,6 +34,7 @@ static const furn_str_id furn_f_console( "f_console" ); static const furn_str_id furn_f_console_broken( "f_console_broken" ); static const furn_str_id furn_f_dresser( "f_dresser" ); +static const itype_id itype_safe_box( "safe_box" ); static const itype_id itype_software_medical( "software_medical" ); static const itype_id itype_software_useless( "software_useless" ); static const itype_id itype_usb_drive( "usb_drive" ); @@ -229,7 +230,7 @@ void mission_start::place_deposit_box( mission *miss ) } const tripoint_omt_ms fallback( rng( 6, SEEX * 2 - 7 ), rng( 6, SEEY * 2 - 7 ), site.z() ); const tripoint_omt_ms comppoint = random_entry( valid, fallback ); - compmap.spawn_item( comppoint, "safe_box" ); + compmap.spawn_item( comppoint, itype_safe_box ); compmap.save(); } diff --git a/src/mmap_file.cpp b/src/mmap_file.cpp index a6a58fde0a48e..f6459fc9eb21b 100644 --- a/src/mmap_file.cpp +++ b/src/mmap_file.cpp @@ -16,7 +16,7 @@ #endif -#include +#include #include "cata_scope_helpers.h" #include "cata_utility.h" @@ -65,10 +65,10 @@ struct mmap_file::handle { std::shared_ptr mmap_file::map_file( const std::string &file_path ) { - return map_file( fs::u8path( file_path ) ); + return map_file( std::filesystem::u8path( file_path ) ); } -std::shared_ptr mmap_file::map_file( const fs::path &file_path ) +std::shared_ptr mmap_file::map_file( const std::filesystem::path &file_path ) { std::shared_ptr mapped_file; @@ -122,7 +122,7 @@ std::shared_ptr mmap_file::map_file( const fs::path &file_path ) #else const std::string &file_path_string = file_path.native(); std::error_code ec; - size_t file_size = fs::file_size( file_path, ec ); + size_t file_size = std::filesystem::file_size( file_path, ec ); if( ec ) { return mapped_file; } diff --git a/src/mmap_file.h b/src/mmap_file.h index e073516419416..71b388a9e3d75 100644 --- a/src/mmap_file.h +++ b/src/mmap_file.h @@ -5,13 +5,13 @@ #include #include -#include +#include class mmap_file { public: static std::shared_ptr map_file( const std::string &file_path ); - static std::shared_ptr map_file( const fs::path &file_path ); + static std::shared_ptr map_file( const std::filesystem::path &file_path ); ~mmap_file(); diff --git a/src/mod_manager.cpp b/src/mod_manager.cpp index 85fa0c7a4c592..74dad45734c8e 100644 --- a/src/mod_manager.cpp +++ b/src/mod_manager.cpp @@ -155,6 +155,10 @@ void mod_manager::refresh_mod_list() { clear(); + if( !dir_exist( PATH_INFO::user_moddir() ) ) { + assure_dir_exist( PATH_INFO::user_moddir() ); + } + std::map> mod_dependency_map; load_mods_from( PATH_INFO::moddir() ); load_mods_from( PATH_INFO::user_moddir_path() ); diff --git a/src/monexamine.cpp b/src/monexamine.cpp index e70c4e67736ff..667c8185c8651 100644 --- a/src/monexamine.cpp +++ b/src/monexamine.cpp @@ -516,7 +516,7 @@ void milk_source( monster &source_mon ) std::vector coords{}; std::vector str_values{}; Character &player_character = get_player_character(); - coords.push_back( get_map().getglobal( source_mon.pos_bub() ) ); + coords.push_back( get_map().get_abs( source_mon.pos_bub() ) ); // pin the cow in place if it isn't already bool temp_tie = !source_mon.has_effect( effect_tied ); if( temp_tie ) { diff --git a/src/mongroup.cpp b/src/mongroup.cpp index 54879e87e2967..1283fef1dd8a1 100644 --- a/src/mongroup.cpp +++ b/src/mongroup.cpp @@ -99,7 +99,7 @@ float mongroup::avg_speed() const // TODO: recursively derive average speed from subgroups avg_speed += elem.frequency * 100; } else { - avg_speed += elem.frequency * elem.name.obj().speed; + avg_speed += elem.frequency * elem.mtype->speed; } remaining_frequency -= elem.frequency; } @@ -247,7 +247,7 @@ std::vector MonsterGroupManager::GetResultFromGroup( } else { if( use_pack_size ) { for( int i = 0; i < pack_size; i++ ) { - spawn_details.emplace_back( entry.name, pack_size, entry.data ); + spawn_details.emplace_back( entry.mtype, pack_size, entry.data ); // And if a quantity pointer with remaining value was passed, will modify the external // value as a side effect. We will reduce it by the spawn rule's cost multiplier. if( quantity ) { @@ -255,7 +255,7 @@ std::vector MonsterGroupManager::GetResultFromGroup( } } } else { - spawn_details.emplace_back( entry.name, pack_size, entry.data ); + spawn_details.emplace_back( entry.mtype, pack_size, entry.data ); // And if a quantity pointer with remaining value was passed, will modify the external // value as a side effect. We will reduce it by the spawn rule's cost multiplier. if( quantity ) { @@ -288,7 +288,7 @@ std::vector MonsterGroupManager::GetResultFromGroup( bool MonsterGroup::IsMonsterInGroup( const mtype_id &mtypeid ) const { for( const MonsterGroupEntry &m : monsters ) { - if( m.name == mtypeid ) { + if( m.mtype == mtypeid ) { return true; } } @@ -321,7 +321,7 @@ const mongroup_id &MonsterGroupManager::Monster2Group( const mtype_id &monster ) { for( auto &g : monsterGroupMap ) { if( g.second.IsMonsterInGroup( monster ) ) { - return g.second.name; + return g.second.id; } } return mongroup_id::NULL_ID(); @@ -347,7 +347,7 @@ std::vector MonsterGroupManager::GetMonstersFromGroup( const mongroup_ monsters.insert( monsters.end(), submons.begin(), submons.end() ); } } else { - monsters.push_back( elem.name ); + monsters.push_back( elem.mtype ); } } return monsters; @@ -366,7 +366,7 @@ const MonsterGroup &MonsterGroupManager::GetMonsterGroup( const mongroup_id &gro // Initialize the group with a null-monster, it's ignored while spawning, // but it prevents further messages about invalid monster type id auto &g = monsterGroupMap[group]; - g.name = group; + g.id = group; g.defaultMonster = mtype_id::NULL_ID(); return g; } else { @@ -443,7 +443,7 @@ void MonsterGroupManager::FinalizeMonsterGroups() for( auto &elem : monsterGroupMap ) { MonsterGroup &mg = elem.second; for( FreqDef::iterator c = mg.monsters.begin(); c != mg.monsters.end(); ) { - if( !c->is_group() && MonsterGroupManager::monster_is_blacklisted( c->name ) ) { + if( !c->is_group() && MonsterGroupManager::monster_is_blacklisted( c->mtype ) ) { c = mg.monsters.erase( c ); } else { ++c; @@ -468,10 +468,18 @@ void MonsterGroupManager::LoadMonsterGroup( const JsonObject &jo ) int freq_total = 0; std::pair max_freq( { mon_null, 0 } ); - g.name = mongroup_id( jo.get_string( "name" ) ); + //TODO: Remove after 0.I + if( !jo.has_string( "id" ) && jo.has_string( "name" ) ) { + g.id = mongroup_id( jo.get_string( "name" ) ); + debugmsg( R"((safely ignorable) monstergroup %s's "name" member should be renamed "id" before 0.I stable, you can use /tools/json-tools/monstergroup_name_to_id.py to automate this change)", + g.id.c_str() ); + } else { + g.id = mongroup_id( jo.get_string( "id" ) ); + } + bool extending = false; //If already a group with that name, add to it instead of overwriting it - if( monsterGroupMap.count( g.name ) != 0 && !jo.get_bool( "override", false ) ) { - g = monsterGroupMap[g.name]; + if( monsterGroupMap.count( g.id ) != 0 && !jo.get_bool( "override", false ) ) { + g = monsterGroupMap[g.id]; extending = true; } bool explicit_def_null = false; @@ -572,7 +580,7 @@ void MonsterGroupManager::LoadMonsterGroup( const JsonObject &jo ) g.freq_total = total; } - monsterGroupMap[g.name] = g; + monsterGroupMap[g.id] = g; } bool MonsterGroupManager::is_animal( const mongroup_id &group_name ) @@ -602,8 +610,8 @@ static void check_group_def( const mongroup_id &g ) } else { check_group_def( m.group ); } - } else if( !m.name.is_valid() ) { - debugmsg( "monster group %s contains unknown monster %s", g.c_str(), m.name.c_str() ); + } else if( !m.mtype.is_valid() ) { + debugmsg( "monster group %s contains unknown monster %s", g.c_str(), m.mtype.c_str() ); } } } @@ -611,29 +619,16 @@ static void check_group_def( const mongroup_id &g ) void MonsterGroupManager::check_group_definitions() { for( const auto &e : monsterGroupMap ) { - const MonsterGroup &mg = e.second; - for( const MonsterGroupEntry &mge : mg.monsters ) { - if( mge.is_group() ) { - if( !mge.group.is_valid() ) { - debugmsg( "monster group %s contains unknown subgroup %s", mg.name.c_str(), mge.group.c_str() ); - } else { - check_group_def( mge.group ); - } - } else if( !mge.name.is_valid() ) { - // mon_null should not be valid here - debugmsg( "monster group %s contains unknown monster %s", mg.name.c_str(), mge.name.c_str() ); - } - } + check_group_def( e.first ); } } -const mtype_id &MonsterGroupManager::GetRandomMonsterFromGroup( const mongroup_id &group_name ) +const mtype_id &MonsterGroupManager::GetRandomMonsterFromGroup( const mongroup_id &group ) { - const MonsterGroup &group = group_name.obj(); - int spawn_chance = rng( 1, group.event_adjusted_freq_total() ); + int spawn_chance = rng( 1, group->event_adjusted_freq_total() ); std::string opt = get_option( "EVENT_SPAWNS" ); const bool can_spawn_events = opt == "monsters" || opt == "both"; - for( const MonsterGroupEntry &monster_type : group.monsters ) { + for( const MonsterGroupEntry &monster_type : group->monsters ) { if( monster_type.event != holiday::none && ( !can_spawn_events || monster_type.event != get_holiday_from_time() ) ) { continue; @@ -642,11 +637,11 @@ const mtype_id &MonsterGroupManager::GetRandomMonsterFromGroup( const mongroup_i if( monster_type.is_group() ) { return GetRandomMonsterFromGroup( monster_type.group ); } - return monster_type.name; + return monster_type.mtype; } else { spawn_chance -= monster_type.frequency; } } - return group.defaultMonster; + return group->defaultMonster; } diff --git a/src/mongroup.h b/src/mongroup.h index 11b8460defee0..2a5d9d6b0218b 100644 --- a/src/mongroup.h +++ b/src/mongroup.h @@ -26,7 +26,7 @@ using FreqDef = std::vector; using FreqDef_iter = FreqDef::iterator; struct MonsterGroupEntry { - mtype_id name; + mtype_id mtype; mongroup_id group; int frequency; int cost_multiplier; @@ -44,10 +44,10 @@ struct MonsterGroupEntry { return group != mongroup_id(); } - MonsterGroupEntry( const mtype_id &id, int new_freq, int new_cost, int new_pack_min, + MonsterGroupEntry( const mtype_id &new_id, int new_freq, int new_cost, int new_pack_min, int new_pack_max, const spawn_data &new_data, const time_duration &new_starts, const time_duration &new_ends, holiday new_event ) - : name( id ) + : mtype( new_id ) , frequency( new_freq ) , cost_multiplier( new_cost ) , pack_minimum( new_pack_min ) @@ -58,10 +58,10 @@ struct MonsterGroupEntry { , event( new_event ) { } - MonsterGroupEntry( const mongroup_id &id, int new_freq, int new_cost, int new_pack_min, + MonsterGroupEntry( const mongroup_id &new_id, int new_freq, int new_cost, int new_pack_min, int new_pack_max, const spawn_data &new_data, const time_duration &new_starts, const time_duration &new_ends, holiday new_event ) - : group( id ) + : group( new_id ) , frequency( new_freq ) , cost_multiplier( new_cost ) , pack_minimum( new_pack_min ) @@ -74,15 +74,15 @@ struct MonsterGroupEntry { }; struct MonsterGroupResult { - mtype_id name; + mtype_id id; int pack_size; spawn_data data; - MonsterGroupResult() : name( mtype_id::NULL_ID() ), pack_size( 0 ) { + MonsterGroupResult() : id( mtype_id::NULL_ID() ), pack_size( 0 ) { } - MonsterGroupResult( const mtype_id &id, int new_pack_size, const spawn_data &new_data ) - : name( id ), pack_size( new_pack_size ), data( new_data ) { + MonsterGroupResult( const mtype_id &new_id, int new_pack_size, const spawn_data &new_data ) + : id( new_id ), pack_size( new_pack_size ), data( new_data ) { } }; @@ -90,7 +90,7 @@ struct MonsterGroupResult { * MonsterGroup is a theoretical distribution of monsters to spawn, as opposed to a mongroup which is an instance of group of monsters to be spawned together. */ struct MonsterGroup { - mongroup_id name; + mongroup_id id; mtype_id defaultMonster; FreqDef monsters; bool IsMonsterInGroup( const mtype_id &id ) const; diff --git a/src/monmove.cpp b/src/monmove.cpp index 84bc90430e99d..6c9c88933bed3 100644 --- a/src/monmove.cpp +++ b/src/monmove.cpp @@ -703,7 +703,7 @@ void monster::plan() anger = 0; remove_effect( effect_dragging ); } else { - set_dest( here.getglobal( couch_loc ) ); + set_dest( here.get_abs( couch_loc ) ); } } @@ -1004,7 +1004,7 @@ void monster::move() // If true, don't try to greedily avoid locally bad paths bool pathed = false; - tripoint_bub_ms local_dest = here.bub_from_abs( get_dest() ); + tripoint_bub_ms local_dest = here.get_bub( get_dest() ); if( try_to_move ) { // Move using vision by follow smells and sounds bool move_without_target = false; @@ -1021,7 +1021,7 @@ void monster::move() if( !move_without_target && wandf > 0 && friendly == 0 ) { unset_dest(); if( wander_pos != get_location() ) { - local_dest = here.bub_from_abs( wander_pos ); + local_dest = here.get_bub( wander_pos ); move_without_target = true; add_msg_debug( debugmode::DF_MONMOVE, "%s follows sound using vision", name() ); } @@ -1081,7 +1081,7 @@ void monster::move() if( wandf > 0 && !moved && friendly == 0 ) { // No LOS, no scent, so as a fall-back follow sound unset_dest(); if( wander_pos != get_location() ) { - destination = here.bub_from_abs( wander_pos ); + destination = here.get_bub( wander_pos ); moved = true; add_msg_debug( debugmode::DF_MONMOVE, "%s follows sound to not use vision", name() ); } @@ -1133,7 +1133,7 @@ void monster::move() rampPos += 1; candidate += tripoint_rel_ms::below; } - const tripoint_abs_ms candidate_abs = get_map().getglobal( candidate ); + const tripoint_abs_ms candidate_abs = get_map().get_abs( candidate ); if( candidate.z() != posz() ) { bool can_z_move = true; @@ -1218,7 +1218,7 @@ void monster::move() continue; } // Don't bash if we're just tracking a noise. - if( !provocative_sound && is_wandering() && destination == here.bub_from_abs( wander_pos ) ) { + if( !provocative_sound && is_wandering() && destination == here.get_bub( wander_pos ) ) { continue; } const int estimate = here.bash_rating( bash_estimate(), candidate ); @@ -1253,7 +1253,7 @@ void monster::move() // Finished logic section. By this point, we should have chosen a square to // move to (moved = true). if( moved ) { // Actual effects of moving to the square we've chosen - const tripoint_bub_ms local_next_step = here.bub_from_abs( next_step ); + const tripoint_bub_ms local_next_step = here.get_bub( next_step ); const bool did_something = ( !pacified && attack_at( local_next_step ) ) || ( !pacified && can_open_doors && @@ -1327,7 +1327,7 @@ void monster::nursebot_operate( Character *dragged_foe ) creature_tracker &creatures = get_creature_tracker(); map &here = get_map(); if( rl_dist( get_location(), get_dest() ) == 1 && - !here.has_flag_furn( ter_furn_flag::TFLAG_AUTODOC_COUCH, here.bub_from_abs( get_dest() ) ) && + !here.has_flag_furn( ter_furn_flag::TFLAG_AUTODOC_COUCH, here.get_bub( get_dest() ) ) && !has_effect( effect_operating ) ) { if( dragged_foe->has_effect( effect_grabbed ) && !has_effect( effect_countdown ) && ( creatures.creature_at( get_dest() ) == nullptr || @@ -1345,7 +1345,7 @@ void monster::nursebot_operate( Character *dragged_foe ) string_format( _( "a soft robotic voice say, \"Please step away from the Autodoc, this patient needs immediate care.\"" ) ) ); // TODO: Make it able to push NPC/player - push_to( here.bub_from_abs( get_dest() ), 4, 0 ); + push_to( here.get_bub( get_dest() ), 4, 0 ); } } if( get_effect_dur( effect_countdown ) == 1_turns && !has_effect( effect_operating ) ) { @@ -1652,7 +1652,7 @@ bool monster::bash_at( const tripoint_bub_ms &p ) return false; } - const bool cramped = will_be_cramped_in_vehicle_tile( get_map().getglobal( p ) ); + const bool cramped = will_be_cramped_in_vehicle_tile( get_map().get_abs( p ) ); bool try_bash = !can_move_to( p ) || one_in( 3 ) || cramped; if( !try_bash ) { return false; @@ -1933,7 +1933,7 @@ bool monster::move_to( const tripoint_bub_ms &p, bool force, bool step_on_critte optional_vpart_position vp_dest = here.veh_at( destination ); if( vp_dest ) { vp_dest->vehicle().invalidate_mass(); - if( will_be_cramped_in_vehicle_tile( here.getglobal( p ) ) ) { + if( will_be_cramped_in_vehicle_tile( here.get_abs( p ) ) ) { add_effect( effect_cramped_space, 2_turns, true ); } } @@ -2353,7 +2353,7 @@ bool monster::will_reach( const point_bub_ms &p ) return true; } - if( can_hear() && wandf > 0 && rl_dist( get_map().bub_from_abs( wander_pos ).xy(), p ) <= 2 && + if( can_hear() && wandf > 0 && rl_dist( get_map().get_bub( wander_pos ).xy(), p ) <= 2 && rl_dist( get_location().xy(), wander_pos.xy() ) <= wandf ) { return true; } diff --git a/src/monster.cpp b/src/monster.cpp index 55d04fe6e4d97..491eb80e0cf81 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -484,17 +484,17 @@ void monster::try_upgrade( bool pin_time ) type->upgrade_group, nullptr, nullptr, false, &ret_default ); if( !res.empty() && !ret_default ) { // Set the type to poly the current monster (preserves inventory) - new_type = res.front().name; + new_type = res.front().id; res.front().pack_size--; for( const MonsterGroupResult &mgr : res ) { - if( !mgr.name ) { + if( !mgr.id ) { continue; } for( int i = 0; i < mgr.pack_size; i++ ) { tripoint_bub_ms spawn_pos; - if( g->find_nearby_spawn_point( pos_bub(), mgr.name, 1, *type->upgrade_multi_range, + if( g->find_nearby_spawn_point( pos_bub(), mgr.id, 1, *type->upgrade_multi_range, spawn_pos, false, false ) ) { - monster *spawned = g->place_critter_at( mgr.name, spawn_pos ); + monster *spawned = g->place_critter_at( mgr.id, spawn_pos ); if( spawned ) { spawned->friendly = friendly; } @@ -594,7 +594,7 @@ void monster::try_reproduce() type->baby_type.baby_monster_group, &spawn_cnt, nullptr, false, nullptr, true ); for( const MonsterGroupResult &mgr : babies ) { - here.add_spawn( mgr.name, std::max( 1, spawn_cnt * mgr.pack_size ), pos_bub(), friendly ); + here.add_spawn( mgr.id, std::max( 1, spawn_cnt * mgr.pack_size ), pos_bub(), friendly ); } } if( !type->baby_type.baby_egg.is_null() ) { @@ -2447,8 +2447,8 @@ bool monster::move_effects( bool ) if( type->melee_dice * type->melee_sides >= 7 ) { if( x_in_y( type->melee_dice * type->melee_sides, 32 ) ) { remove_effect( effect_heavysnare ); - here.spawn_item( pos_bub(), "rope_6" ); - here.spawn_item( pos_bub(), "snare_trigger" ); + here.spawn_item( pos_bub(), itype_rope_6 ); + here.spawn_item( pos_bub(), itype_snare_trigger ); if( u_see_me && get_option( "LOG_MONSTER_MOVE_EFFECTS" ) ) { add_msg( _( "The %s escapes the heavy snare!" ), name() ); } @@ -2460,7 +2460,7 @@ bool monster::move_effects( bool ) if( type->melee_dice * type->melee_sides >= 18 ) { if( x_in_y( type->melee_dice * type->melee_sides, 200 ) ) { remove_effect( effect_beartrap ); - here.spawn_item( pos_bub(), "beartrap" ); + here.spawn_item( pos_bub(), itype_beartrap ); if( u_see_me && get_option( "LOG_MONSTER_MOVE_EFFECTS" ) ) { add_msg( _( "The %s escapes the bear trap!" ), name() ); } @@ -2977,7 +2977,7 @@ void monster::die( Creature *nkiller ) if( !is_hallucination() && has_flag( mon_flag_QUEEN ) ) { // The submap coordinates of this monster, monster groups coordinates are // submap coordinates. - const tripoint_abs_sm abssub = coords::project_to( here.getglobal( pos_bub() ) ); + const tripoint_abs_sm abssub = coords::project_to( here.get_abs( pos_bub() ) ); // Do it for overmap above/below too for( const tripoint_abs_sm &p : points_in_radius( abssub, HALF_MAPSIZE, 1 ) ) { // TODO: fix point types @@ -3500,7 +3500,7 @@ void monster::process_effects() } } - if( !will_be_cramped_in_vehicle_tile( get_map().getglobal( pos_bub() ) ) ) { + if( !will_be_cramped_in_vehicle_tile( get_map().get_abs( pos_bub() ) ) ) { remove_effect( effect_cramped_space ); } @@ -3887,7 +3887,7 @@ void monster::hear_sound( const tripoint_bub_ms &source, const int vol, const in max_error = 1; } - tripoint_abs_ms target = get_map().getglobal( source ) + point( rng( -max_error, max_error ), + tripoint_abs_ms target = get_map().get_abs( source ) + point( rng( -max_error, max_error ), rng( -max_error, max_error ) ); // target_z will require some special check due to soil muffling sounds diff --git a/src/npc.cpp b/src/npc.cpp index d2730d40203bd..b5a5632080688 100644 --- a/src/npc.cpp +++ b/src/npc.cpp @@ -1758,7 +1758,7 @@ float npc::vehicle_danger( int radius ) const const wrapped_vehicle &wrapped_veh = vehicles[i]; if( wrapped_veh.v->is_moving() ) { const auto &points_to_check = wrapped_veh.v->immediate_path(); - point_abs_ms p( get_map().getglobal( pos_bub() ).xy() ); + point_abs_ms p( get_map().get_abs( pos_bub() ).xy() ); if( points_to_check.find( p ) != points_to_check.end() ) { danger = i; } diff --git a/src/npcmove.cpp b/src/npcmove.cpp index b7916a17011d9..8f965a660663a 100644 --- a/src/npcmove.cpp +++ b/src/npcmove.cpp @@ -300,8 +300,8 @@ tripoint_bub_ms npc::good_escape_direction( bool include_pos ) if( retreat_target && *retreat_target != abs_pos ) { add_msg_debug( debugmode::DF_NPC_MOVEAI, "%s is repositioning to %s", name, - here.bub_from_abs( *retreat_target ).to_string_writable() ); - update_path( here.bub_from_abs( *retreat_target ) ); + here.get_bub( *retreat_target ).to_string_writable() ); + update_path( here.get_bub( *retreat_target ) ); } if( !path.empty() ) { return path[0]; @@ -1221,9 +1221,9 @@ void npc::regen_ai_cache() } } while( i != std::end( ai_cache.sound_alerts ) ) { - if( sees( here.bub_from_abs( tripoint_abs_ms( i->abs_pos ) ) ) ) { + if( sees( here.get_bub( tripoint_abs_ms( i->abs_pos ) ) ) ) { // if they were responding to a call for guards because of thievery - npc *const sound_source = creatures.creature_at( here.bub_from_abs( tripoint_abs_ms( + npc *const sound_source = creatures.creature_at( here.get_bub( tripoint_abs_ms( i->abs_pos ) ) ); if( sound_source ) { if( my_fac == sound_source->my_fac && sound_source->known_stolen_item ) { @@ -1470,7 +1470,7 @@ void npc::move() if( !activity_route.empty() && !has_destination_activity() ) { tripoint_bub_ms final_destination; if( destination_point ) { - final_destination = here.bub_from_abs( *destination_point ); + final_destination = here.get_bub( *destination_point ); } else { final_destination = activity_route.back(); } @@ -1603,7 +1603,7 @@ void npc::execute_action( npc_action action ) case npc_investigate_sound: { tripoint_bub_ms cur_pos = pos_bub(); - update_path( here.bub_from_abs( tripoint_abs_ms( ai_cache.s_abs_pos ) ) ); + update_path( here.get_bub( tripoint_abs_ms( ai_cache.s_abs_pos ) ) ); move_to_next(); if( pos_bub() == cur_pos ) { ai_cache.stuck += 1; @@ -1612,7 +1612,7 @@ void npc::execute_action( npc_action action ) break; case npc_return_to_guard_pos: { - const tripoint_bub_ms local_guard_pos = here.bub_from_abs( *ai_cache.guard_pos ); + const tripoint_bub_ms local_guard_pos = here.get_bub( *ai_cache.guard_pos ); update_path( local_guard_pos ); if( pos_bub() == local_guard_pos || path.empty() ) { move_pause(); @@ -1743,8 +1743,8 @@ void npc::execute_action( npc_action action ) case npc_look_for_player: if( saw_player_recently() && last_player_seen_pos && - sees( here.bub_from_abs( *last_player_seen_pos ) ) ) { - update_path( here.bub_from_abs( *last_player_seen_pos ) ); + sees( here.get_bub( *last_player_seen_pos ) ) ) { + update_path( here.get_bub( *last_player_seen_pos ) ); move_to_next(); } else { look_for_player( player_character ); @@ -1899,7 +1899,7 @@ void npc::execute_action( npc_action action ) break; case npc_goto_to_this_pos: { - update_path( get_map().bub_from_abs( *goto_to_this_pos ) ); + update_path( get_map().get_bub( *goto_to_this_pos ) ); move_to_next(); if( get_location() == *goto_to_this_pos ) { @@ -2981,7 +2981,7 @@ void npc::move_to( const tripoint_bub_ms &pt, bool no_bashing, std::sethas_destination_activity() ) { tripoint_bub_ms final_destination; if( destination_point ) { - final_destination = here.bub_from_abs( *destination_point ); + final_destination = here.get_bub( *destination_point ); } else { final_destination = activity_route.back(); } @@ -3129,7 +3129,7 @@ void npc::move_to( const tripoint_bub_ms &pt, bool no_bashing, std::set pts; - for( const tripoint_bub_ms &elem : here.points_in_radius( here.bub_from_abs( + for( const tripoint_bub_ms &elem : here.points_in_radius( here.get_bub( tripoint_abs_ms( temp_camp->get_bb_pos() ) ), 10 ) ) { if( creatures.creature_at( elem ) || !could_move_onto( elem ) || here.has_flag( ter_furn_flag::TFLAG_DEEP_WATER, elem ) || @@ -3358,7 +3358,7 @@ void npc::worker_downtime() pts.push_back( elem ); } if( !pts.empty() ) { - wander_pos = here.getglobal( random_entry( pts ) ); + wander_pos = here.get_abs( random_entry( pts ) ); return; } } @@ -3940,7 +3940,7 @@ bool npc::find_corpse_to_pulp() const item *corpse = nullptr; if( pulp_location && square_dist( get_location(), *pulp_location ) <= range ) { - corpse = check_tile( here.bub_from_abs( *pulp_location ) ); + corpse = check_tile( here.get_bub( *pulp_location ) ); } // Find the old target to avoid spamming @@ -3954,7 +3954,7 @@ bool npc::find_corpse_to_pulp() corpse = check_tile( location.pos_bub() ); if( corpse != nullptr ) { - pulp_location = here.getglobal( location.pos_bub() ); + pulp_location = here.get_abs( location.pos_bub() ); break; } @@ -4830,7 +4830,7 @@ void npc::reach_omt_destination() // No point recalculating the path to get home move_to_next(); } else if( guard_pos ) { - update_path( here.bub_from_abs( *guard_pos ) ); + update_path( here.get_bub( *guard_pos ) ); move_to_next(); } else { guard_pos = get_location(); @@ -4980,7 +4980,7 @@ void npc::go_to_omt_destination() return; } } - tripoint_bub_ms sm_tri = here.bub_from_abs( project_to( omt_path.back() ) ); + tripoint_bub_ms sm_tri = here.get_bub( project_to( omt_path.back() ) ); tripoint_bub_ms centre_sub = sm_tri + point( SEEX, SEEY ); if( !here.passable( centre_sub ) ) { auto candidates = here.points_in_radius( centre_sub, 2 ); diff --git a/src/npctalk.cpp b/src/npctalk.cpp index 0777336174d43..a27f040c65259 100644 --- a/src/npctalk.cpp +++ b/src/npctalk.cpp @@ -1245,11 +1245,11 @@ void game::chat() if( npcselect == follower_count ) { for( npc *them : followers ) { - them->goto_to_this_pos = here.getglobal( *p ); + them->goto_to_this_pos = here.get_abs( *p ); } yell_msg = _( "Everyone move there!" ); } else { - followers[npcselect]->goto_to_this_pos = here.getglobal( *p ); + followers[npcselect]->goto_to_this_pos = here.get_abs( *p ); yell_msg = string_format( _( "Move there, %s!" ), followers[npcselect]->get_name() ); } break; @@ -1429,7 +1429,7 @@ void npc::handle_sound( const sounds::sound_t spriority, const std::string &desc int heard_volume, const tripoint_bub_ms &spos ) { const map &here = get_map(); - const tripoint_abs_ms s_abs_pos = here.getglobal( spos ); + const tripoint_abs_ms s_abs_pos = here.get_abs( spos ); const tripoint_abs_ms my_abs_pos = get_location(); add_msg_debug( debugmode::DF_NPC, @@ -3550,11 +3550,11 @@ talk_effect_fun_t::func f_remove_var( const JsonObject &jo, std::string_view mem void map_add_item( item &it, tripoint_abs_ms target_pos ) { if( get_map().inbounds( target_pos ) ) { - get_map().add_item_or_charges( get_map().bub_from_abs( target_pos ), it ); + get_map().add_item_or_charges( get_map().get_bub( target_pos ), it ); } else { tinymap target_bay; target_bay.load( project_to( target_pos ), false ); - target_bay.add_item_or_charges( target_bay.omt_from_abs( target_pos ), it ); + target_bay.add_item_or_charges( target_bay.get_omt( target_pos ), it ); } } @@ -4134,7 +4134,7 @@ talk_effect_fun_t::func f_location_variable( const JsonObject &jo, std::string_v is_npc, type, dov_x_adjust, dov_y_adjust, dov_z_adjust, z_override, true_eocs, false_eocs, search_target, search_type, dov_target_min_radius, dov_target_max_radius]( dialogue & d ) { talker *target = d.actor( is_npc ); - tripoint_abs_ms talker_pos = get_map().getglobal( target->pos_bub() ); + tripoint_abs_ms talker_pos = get_map().get_abs( target->pos_bub() ); tripoint_abs_ms target_pos = talker_pos; if( target_params.has_value() ) { const tripoint_abs_omt omt_pos = mission_util::get_om_terrain_pos( target_params.value(), d ); @@ -4157,15 +4157,15 @@ talk_effect_fun_t::func f_location_variable( const JsonObject &jo, std::string_v int min_target_dist = dov_target_min_radius.evaluate( d ); std::string cur_search_target = search_target.value().evaluate( d ); bool found = false; - tripoint_range points = here.points_in_radius( here.bub_from_abs( abs_ms ), + tripoint_range points = here.points_in_radius( here.get_bub( abs_ms ), size_t( dov_target_max_radius.evaluate( d ) ), size_t( 0 ) ); for( const tripoint_bub_ms &search_loc : points ) { - if( rl_dist( here.bub_from_abs( talker_pos ), search_loc ) <= min_target_dist ) { + if( rl_dist( here.get_bub( talker_pos ), search_loc ) <= min_target_dist ) { continue; } if( search_type.value() == "terrain" ) { if( here.ter( search_loc ).id().c_str() == cur_search_target ) { - target_pos = here.getglobal( search_loc ); + target_pos = here.get_abs( search_loc ); found = true; break; } @@ -4173,14 +4173,14 @@ talk_effect_fun_t::func f_location_variable( const JsonObject &jo, std::string_v const furn_str_id &fi = here.furn( search_loc ).id(); if( fi.c_str() == cur_search_target || ( !fi.is_null() && cur_search_target.empty() ) ) { - target_pos = here.getglobal( search_loc ); + target_pos = here.get_abs( search_loc ); found = true; break; } } else if( search_type.value() == "field" ) { field &fields_here = get_map().field_at( search_loc ); if( fields_here.find_field( field_type_id( cur_search_target ) ) || cur_search_target.empty() ) { - target_pos = here.getglobal( search_loc ); + target_pos = here.get_abs( search_loc ); found = true; break; } @@ -4189,16 +4189,16 @@ talk_effect_fun_t::func f_location_variable( const JsonObject &jo, std::string_v if( tr.id.c_str() == cur_search_target || ( !tr.is_null() && cur_search_target.empty() ) ) { - target_pos = here.getglobal( search_loc ); + target_pos = here.get_abs( search_loc ); found = true; break; } } else if( search_type.value() == "monster" ) { - Creature *tmp_critter = get_creature_tracker().creature_at( here.getglobal( search_loc ) ); + Creature *tmp_critter = get_creature_tracker().creature_at( here.get_abs( search_loc ) ); if( tmp_critter != nullptr && tmp_critter->is_monster() && ( tmp_critter->as_monster()->type->id.c_str() == cur_search_target || cur_search_target.empty() ) ) { - target_pos = here.getglobal( search_loc ); + target_pos = here.get_abs( search_loc ); found = true; g->despawn_nonlocal_monsters(); break; @@ -4208,15 +4208,15 @@ talk_effect_fun_t::func f_location_variable( const JsonObject &jo, std::string_v 1 ) ) { if( person->pos_bub() == search_loc && ( person->myclass.c_str() == cur_search_target || cur_search_target.empty() ) ) { - target_pos = here.getglobal( search_loc ); + target_pos = here.get_abs( search_loc ); found = true; break; } } } else if( search_type.value() == "zone" ) { zone_manager &mgr = zone_manager::get_manager(); - if( mgr.get_zone_at( here.getglobal( search_loc ), zone_type_id( cur_search_target ) ) ) { - target_pos = here.getglobal( search_loc ); + if( mgr.get_zone_at( here.get_abs( search_loc ), zone_type_id( cur_search_target ) ) ) { + target_pos = here.get_abs( search_loc ); found = true; break; } @@ -4240,8 +4240,8 @@ talk_effect_fun_t::func f_location_variable( const JsonObject &jo, std::string_v target_pos = talker_pos + tripoint_rel_ms( rng( -max_radius, max_radius ), rng( -max_radius, max_radius ), 0 ); - if( ( !outdoor_only || here.is_outside( here.bub_from_abs( target_pos ) ) ) && - ( !passable_only || here.passable( here.bub_from_abs( target_pos ) ) ) && + if( ( !outdoor_only || here.is_outside( here.get_bub( target_pos ) ) ) && + ( !passable_only || here.passable( here.get_bub( target_pos ) ) ) && rl_dist( target_pos, talker_pos ) >= min_radius ) { found = true; break; @@ -5250,7 +5250,7 @@ talk_effect_fun_t::func f_cast_spell( const JsonObject &jo, std::string_view mem } } else { const tripoint_bub_ms target_pos = loc_var ? - get_map().bub_from_abs( get_tripoint_from_var( loc_var, d, is_npc ) ) : caster->pos_bub(); + get_map().get_bub( get_tripoint_from_var( loc_var, d, is_npc ) ) : caster->pos_bub(); sp.cast_all_effects( *caster, target_pos ); caster->add_msg_player_or_npc( fake.trigger_message, fake.npc_trigger_message ); } @@ -5592,7 +5592,7 @@ talk_effect_fun_t::func f_activate( const JsonObject &jo, std::string_view membe if( target_var.has_value() ) { tripoint_abs_ms target_pos = get_tripoint_from_var( target_var, d, is_npc ); if( get_map().inbounds( target_pos ) ) { - guy->invoke_item( it->get_item(), method_str, get_map().bub_from_abs( target_pos ) ); + guy->invoke_item( it->get_item(), method_str, get_map().get_bub( target_pos ) ); return; } } @@ -5705,7 +5705,7 @@ talk_effect_fun_t::func f_make_sound( const JsonObject &jo, std::string_view mem } else { translated_message = message.evaluate( d ); } - sounds::sound( get_map().bub_from_abs( target_pos ), volume.evaluate( d ), type, translated_message, + sounds::sound( get_map().get_bub( target_pos ), volume.evaluate( d ), type, translated_message, ambient ); }; } @@ -6219,7 +6219,7 @@ talk_effect_fun_t::func f_map_run_item_eocs( const JsonObject &jo, std::string_v tripoint_abs_ms target_location = get_tripoint_from_var( loc_var, d, is_npc ); std::vector items; map &here = get_map(); - tripoint_bub_ms center = here.bub_from_abs( target_location ); + tripoint_bub_ms center = here.get_bub( target_location ); int max_radius = dov_max_radius.evaluate( d ); int min_radius = dov_min_radius.evaluate( d ); for( const tripoint_bub_ms &pos : here.points_in_radius( center, max_radius ) ) { @@ -6812,7 +6812,7 @@ talk_effect_fun_t::func f_spawn_monster( const JsonObject &jo, std::string_view std::optional lifespan; tripoint_bub_ms target_pos = d.actor( is_npc )->pos_bub(); if( target_var.has_value() ) { - target_pos = get_map().bub_from_abs( get_tripoint_from_var( target_var, d, is_npc ) ); + target_pos = get_map().get_bub( get_tripoint_from_var( target_var, d, is_npc ) ); } int visible_spawns = 0; int spawns = 0; @@ -6947,7 +6947,7 @@ talk_effect_fun_t::func f_spawn_npc( const JsonObject &jo, std::string_view memb std::optional lifespan; tripoint_bub_ms target_pos = d.actor( is_npc )->pos_bub(); if( target_var.has_value() ) { - target_pos = get_map().bub_from_abs( get_tripoint_from_var( target_var, d, is_npc ) ); + target_pos = get_map().get_bub( get_tripoint_from_var( target_var, d, is_npc ) ); } int visible_spawns = 0; int spawns = 0; @@ -7029,7 +7029,7 @@ talk_effect_fun_t::func f_field( const JsonObject &jo, std::string_view member, if( target_var.has_value() ) { target_pos = get_tripoint_from_var( target_var, d, is_npc ); } - for( const tripoint_bub_ms &dest : get_map().points_in_radius( get_map().bub_from_abs( target_pos ), + for( const tripoint_bub_ms &dest : get_map().points_in_radius( get_map().get_bub( target_pos ), radius ) ) { if( ( !outdoor_only || get_map().is_outside( dest ) ) && ( !indoor_only || !get_map().is_outside( dest ) ) ) { @@ -7056,7 +7056,7 @@ talk_effect_fun_t::func f_emit( const JsonObject &jo, std::string_view member, if( target_var.has_value() ) { target_pos = get_tripoint_from_var( target_var, d, is_npc ); } - tripoint_bub_ms target = get_map().bub_from_abs( target_pos ); + tripoint_bub_ms target = get_map().get_bub( target_pos ); get_map().emit_field( target, emit_id( emit.evaluate( d ) ), chance_mult.evaluate( d ) ); }; } @@ -7152,7 +7152,7 @@ talk_effect_fun_t::func f_teleport( const JsonObject &jo, std::string_view membe tripoint_abs_ms target_pos = get_tripoint_from_var( target_var, d, is_npc ); Creature *teleporter = d.actor( is_npc )->get_creature(); if( teleporter ) { - if( teleport::teleport_to_point( *teleporter, get_map().bub_from_abs( target_pos ), true, false, + if( teleport::teleport_to_point( *teleporter, get_map().get_bub( target_pos ), true, false, false, force, force_safe ) ) { teleporter->add_msg_if_player( success_message.evaluate( d ) ); } else { diff --git a/src/npctrade_utils.cpp b/src/npctrade_utils.cpp index 665dbe46ebcff..7b84a028f5934 100644 --- a/src/npctrade_utils.cpp +++ b/src/npctrade_utils.cpp @@ -89,7 +89,7 @@ void add_fallback_zone( npc &guy ) std::vector points; for( tripoint_abs_ms const &t : closest_points_first( loc, PICKUP_RANGE ) ) { - tripoint_bub_ms const t_here = here.bub_from_abs( t ); + tripoint_bub_ms const t_here = here.get_bub( t ); const furn_id &f = here.furn( t_here ); if( f != furn_str_id::NULL_ID() && ( f->max_volume > ter_t_floor->max_volume || @@ -136,7 +136,7 @@ std::list distribute_items_to_npc_zones( std::list &items, npc &guy bool leftover = true; for( tripoint_abs_ms const &dpoint : dest ) { - tripoint_bub_ms const dpoint_here = here.bub_from_abs( dpoint ); + tripoint_bub_ms const dpoint_here = here.get_bub( dpoint ); std::optional const vp = here.veh_at( dpoint_here ).cargo(); if( vp && vp->vehicle().get_owner() == fac_id ) { leftover = _to_veh( it, vp ); diff --git a/src/ofstream_wrapper.h b/src/ofstream_wrapper.h index df69766029ea9..6ceff93a78db5 100644 --- a/src/ofstream_wrapper.h +++ b/src/ofstream_wrapper.h @@ -23,13 +23,13 @@ class ofstream_wrapper { private: std::ofstream file_stream; - fs::path path; - fs::path temp_path; + std::filesystem::path path; + std::filesystem::path temp_path; void open( std::ios::openmode mode ); public: - ofstream_wrapper( const fs::path &path, std::ios::openmode mode ); + ofstream_wrapper( const std::filesystem::path &path, std::ios::openmode mode ); ~ofstream_wrapper(); std::ostream &stream() { diff --git a/src/overmap_ui.cpp b/src/overmap_ui.cpp index 212e9c5fb88d0..f362e435fb86a 100644 --- a/src/overmap_ui.cpp +++ b/src/overmap_ui.cpp @@ -2026,7 +2026,7 @@ static tripoint_abs_omt display() curs += mouse_pos->xy().raw(); } else if( action == "look" ) { tripoint_abs_ms pos = project_combine( curs, g->overmap_data.origin_remainder ); - tripoint_bub_ms pos_rel = get_map().bub_from_abs( pos ); + tripoint_bub_ms pos_rel = get_map().get_bub( pos ); uistate.open_menu = [pos_rel]() { tripoint_bub_ms pos_cpy = pos_rel; g->look_around( true, pos_cpy, pos_rel, false, false, false, false, pos_rel ); diff --git a/src/overmapbuffer.cpp b/src/overmapbuffer.cpp index df3244273c1cb..7de5541b7937f 100644 --- a/src/overmapbuffer.cpp +++ b/src/overmapbuffer.cpp @@ -1606,7 +1606,7 @@ void overmapbuffer::spawn_monster( const tripoint_abs_sm &p, bool spawn_nonlocal [&]( std::pair &monster_entry ) { monster &this_monster = monster_entry.second; const map &here = get_map(); - const tripoint_bub_ms local = here.bub_from_abs( this_monster.get_location() ); + const tripoint_bub_ms local = here.get_bub( this_monster.get_location() ); // The monster position must be local to the main map when added to the game if( !spawn_nonlocal ) { cata_assert( here.inbounds( local ) ); diff --git a/src/path_info.cpp b/src/path_info.cpp index bea276a06918e..c3fb4e62ec30d 100644 --- a/src/path_info.cpp +++ b/src/path_info.cpp @@ -73,7 +73,7 @@ static const char *getenv_or_abort( const char *name ) void PATH_INFO::init_base_path( const std::string &path ) { base_path_value = as_norm_dir( path ); - base_path_path_value = cata_path{ cata_path::root_path::base, fs::path{} }; + base_path_path_value = cata_path{ cata_path::root_path::base, std::filesystem::path{} }; } void PATH_INFO::init_user_dir( std::string dir ) @@ -101,7 +101,7 @@ void PATH_INFO::init_user_dir( std::string dir ) } user_dir_value = as_norm_dir( dir ); - user_dir_path_value = cata_path{ cata_path::root_path::user, fs::path{} }; + user_dir_path_value = cata_path{ cata_path::root_path::user, std::filesystem::path{} }; } void PATH_INFO::set_standard_filenames() @@ -111,7 +111,7 @@ void PATH_INFO::set_standard_filenames() cata_path prefix_path; // Data is always relative to itself. Also, the base path might not be writeable. - datadir_path_value = cata_path{ cata_path::root_path::data, fs::path{} }; + datadir_path_value = cata_path{ cata_path::root_path::data, std::filesystem::path{} }; if( !base_path_value.empty() ) { #if defined(DATA_DIR_PREFIX) @@ -141,7 +141,7 @@ void PATH_INFO::set_standard_filenames() savedir_value = user_dir_value + "save/"; // Special: savedir is always relative to itself even if in the user dir location. - savedir_path_value = cata_path{ cata_path::root_path::save, fs::path{} }; + savedir_path_value = cata_path{ cata_path::root_path::save, std::filesystem::path{} }; memorialdir_value = user_dir_value + "memorial/"; memorialdir_path_value = user_dir_path_value / "memorial"; achievementdir_value = user_dir_value + "achievements/"; @@ -157,7 +157,7 @@ void PATH_INFO::set_standard_filenames() dir = std::string( user_dir ) + "/.config/cataclysm-dda/"; } config_dir_value = dir; - config_dir_path_value = cata_path{ cata_path::root_path::config, fs::path{} }; + config_dir_path_value = cata_path{ cata_path::root_path::config, std::filesystem::path{} }; #else config_dir_value = user_dir_value + "config/"; config_dir_path_value = user_dir_path_value / "config"; @@ -532,7 +532,7 @@ cata_path PATH_INFO::names() void PATH_INFO::set_datadir( const std::string &datadir ) { datadir_value = datadir; - datadir_path_value = cata_path{ cata_path::root_path::data, fs::path{} }; + datadir_path_value = cata_path{ cata_path::root_path::data, std::filesystem::path{} }; // Shared dirs gfxdir_value = datadir_value + "gfx/"; gfxdir_path_value = datadir_path_value / "gfx"; @@ -545,7 +545,7 @@ void PATH_INFO::set_datadir( const std::string &datadir ) void PATH_INFO::set_config_dir( const std::string &config_dir ) { config_dir_value = config_dir; - config_dir_path_value = cata_path{ cata_path::root_path::config, fs::path{} }; + config_dir_path_value = cata_path{ cata_path::root_path::config, std::filesystem::path{} }; options_value = config_dir_value + "options.json"; options_path_value = config_dir_path_value / "options.json"; keymap_value = config_dir_value + "keymap.txt"; @@ -557,13 +557,13 @@ void PATH_INFO::set_config_dir( const std::string &config_dir ) void PATH_INFO::set_savedir( const std::string &savedir ) { savedir_value = savedir; - savedir_path_value = cata_path{ cata_path::root_path::save, fs::path{} }; + savedir_path_value = cata_path{ cata_path::root_path::save, std::filesystem::path{} }; } void PATH_INFO::set_memorialdir( const std::string &memorialdir ) { memorialdir_value = memorialdir; - memorialdir_path_value = cata_path{ cata_path::root_path::memorial, fs::path{} }; + memorialdir_path_value = cata_path{ cata_path::root_path::memorial, std::filesystem::path{} }; } void PATH_INFO::set_options( const std::string &options ) @@ -588,7 +588,7 @@ void PATH_INFO::set_motd( const std::string &motd ) motd_value = motd; } -fs::path cata_path::get_logical_root_path() const +std::filesystem::path cata_path::get_logical_root_path() const { const std::string &path_value = ( []( cata_path::root_path root ) -> const std::string& { switch( root ) @@ -611,5 +611,5 @@ fs::path cata_path::get_logical_root_path() const } } } )( logical_root_ ); - return fs::u8path( path_value ); + return std::filesystem::u8path( path_value ); } diff --git a/src/player_activity.cpp b/src/player_activity.cpp index 125aa251a5aaf..4db2c76bdaa04 100644 --- a/src/player_activity.cpp +++ b/src/player_activity.cpp @@ -185,7 +185,7 @@ std::optional player_activity::get_progress_message( const avatar & if( type == ACT_BUILD ) { partial_con *pc = - get_map().partial_con_at( get_map().bub_from_abs( u.activity.placement ) ); + get_map().partial_con_at( get_map().get_bub( u.activity.placement ) ); if( pc ) { int counter = std::min( pc->counter, 10000000 ); const int percentage = counter / 100000; diff --git a/src/player_hardcoded_effects.cpp b/src/player_hardcoded_effects.cpp index e80c7e80dcbc7..f75d50d473771 100644 --- a/src/player_hardcoded_effects.cpp +++ b/src/player_hardcoded_effects.cpp @@ -661,7 +661,7 @@ static void eff_fun_teleglow( Character &u, effect &it ) std::vector spawn_details = MonsterGroupManager::GetResultFromGroup( GROUP_NETHER ); for( const MonsterGroupResult &mgr : spawn_details ) { - g->place_critter_at( mgr.name, dest ); + g->place_critter_at( mgr.id, dest ); } if( uistate.distraction_hostile_spotted && player_character.sees( dest ) ) { g->cancel_activity_or_ignore_query( distraction_type::hostile_spotted_far, @@ -1315,7 +1315,7 @@ void Character::hardcoded_effects( effect &it ) std::vector spawn_details = MonsterGroupManager::GetResultFromGroup( GROUP_NETHER ); for( const MonsterGroupResult &mgr : spawn_details ) { - g->place_critter_at( mgr.name, dest ); + g->place_critter_at( mgr.id, dest ); } if( uistate.distraction_hostile_spotted && player_character.sees( dest ) ) { g->cancel_activity_or_ignore_query( distraction_type::hostile_spotted_far, diff --git a/src/popup.cpp b/src/popup.cpp index d7f36aa2f2c21..0e65dd1c2f20b 100644 --- a/src/popup.cpp +++ b/src/popup.cpp @@ -55,6 +55,7 @@ class query_popup_impl : public cataimgui::window void query_popup_impl::draw_controls() { + ImGui::SetNavCursorVisible( true ); mouse_selected_option = -1; for( const std::string &line : parent->folded_msg ) { @@ -74,7 +75,7 @@ void query_popup_impl::draw_controls() } if( keyboard_selected_option != last_keyboard_selected_option && keyboard_selected_option == short( ind ) && ImGui::IsWindowFocused() ) { - ImGui::SetKeyboardFocusHere( -1 ); + ImGui::SetItemDefaultFocus(); } current_line = parent->buttons[ind].pos.y; } diff --git a/src/ranged.cpp b/src/ranged.cpp index 6b57843f85ce5..faaa4af2a23a7 100644 --- a/src/ranged.cpp +++ b/src/ranged.cpp @@ -2976,9 +2976,9 @@ bool target_ui::handle_cursor_movement( const std::string &action, bool &skip_re set_view_offset( you->view_offset + edge_scroll ); } } - } else if( const std::optional delta = ctxt.get_direction( action ) ) { + } else if( const std::optional delta = ctxt.get_direction_rel_ms( action ) ) { // Shift view/cursor with directional keys - shift_view_or_cursor( *delta ); + shift_view_or_cursor( delta->raw() ); } else if( action == "SELECT" && ( mouse_pos = ctxt.get_coordinates( g->w_terrain, g->ter_view_p.raw().xy() ) ) ) { // Set pos by clicking with mouse @@ -3209,7 +3209,7 @@ bool target_ui::try_reacquire_target( bool critter, tripoint_bub_ms &new_dst ) } // Try to re-acquire target tile or tile where the target creature used to be - tripoint_bub_ms local_lt = get_map().bub_from_abs( *you->last_target_pos ); + tripoint_bub_ms local_lt = get_map().get_bub( *you->last_target_pos ); if( dist_fn( local_lt ) <= range ) { new_dst = local_lt; // Abort aiming if a creature moved in @@ -3258,10 +3258,10 @@ int target_ui::dist_fn( const tripoint_bub_ms &p ) void target_ui::set_last_target() { if( !you->last_target_pos.has_value() || - you->last_target_pos.value() != get_map().getglobal( dst ) ) { + you->last_target_pos.value() != get_map().get_abs( dst ) ) { you->aim_cache_dirty = true; } - you->last_target_pos = get_map().getglobal( dst ); + you->last_target_pos = get_map().get_abs( dst ); if( dst_critter ) { you->last_target = g->shared_from( *dst_critter ); } else { @@ -3426,7 +3426,7 @@ void target_ui::recalc_aim_turning_penalty() if( lt_ptr ) { curr_recoil_pos = lt_ptr->pos_bub(); } else if( you->last_target_pos ) { - curr_recoil_pos = get_map().bub_from_abs( *you->last_target_pos ); + curr_recoil_pos = get_map().get_bub( *you->last_target_pos ); } else { curr_recoil_pos = src; } diff --git a/src/requirements.cpp b/src/requirements.cpp index 8e289bfaf5868..0678a3a69b688 100644 --- a/src/requirements.cpp +++ b/src/requirements.cpp @@ -1676,7 +1676,7 @@ deduped_requirement_data::deduped_requirement_data( const requirement_data &in, if( alternatives_.size() + pending.size() > max_alternatives ) { debugmsg( "Construction of deduped_requirement_data generated too many alternatives. " "The recipe %1s should be simplified. See the Recipe section in " - "doc/JSON_INFO.md for more details. It has %2s alternatives.", context.str(), + "doc/JSON/JSON_INFO.md for more details. It has %2s alternatives.", context.str(), alternatives_.size() + pending.size() ); is_too_complex_ = true; alternatives_ = { in }; diff --git a/src/safemode_ui.cpp b/src/safemode_ui.cpp index 24d9a823ea25c..9fe42daa168fc 100644 --- a/src/safemode_ui.cpp +++ b/src/safemode_ui.cpp @@ -815,7 +815,7 @@ void safemode::load( const bool is_character_in ) file = PATH_INFO::player_base_save_path() + ".sfm.json"; } - fs::path file_path = file.get_unrelative_path(); + std::filesystem::path file_path = file.get_unrelative_path(); fin.open( file_path, std::ifstream::in | std::ifstream::binary ); if( fin.good() ) { diff --git a/src/savegame_json.cpp b/src/savegame_json.cpp index 25f20ab543296..3c40666ff16fa 100644 --- a/src/savegame_json.cpp +++ b/src/savegame_json.cpp @@ -1462,9 +1462,9 @@ void Character::store( JsonOut &json ) const json.start_array(); for( const auto &elem : known_traps ) { json.start_object(); - json.member( "x", elem.first.x ); - json.member( "y", elem.first.y ); - json.member( "z", elem.first.z ); + json.member( "x", elem.first.x() ); + json.member( "y", elem.first.y() ); + json.member( "z", elem.first.z() ); json.member( "trap", elem.second ); json.end_object(); } @@ -2434,12 +2434,12 @@ void monster::load( const JsonObject &data ) // TEMPORARY until 0.G if( !data.has_member( "location" ) ) { - set_location( get_map().getglobal( read_legacy_creature_pos( data ) ) ); + set_location( get_map().get_abs( read_legacy_creature_pos( data ) ) ); tripoint_bub_ms wand; data.read( "wandx", wand.x() ); data.read( "wandy", wand.y() ); data.read( "wandz", wand.z() ); - wander_pos = get_map().getglobal( wand ); + wander_pos = get_map().get_abs( wand ); tripoint destination; data.read( "destination", destination ); if( destination != tripoint::zero ) { @@ -2902,6 +2902,7 @@ void item::io( Archive &archive ) archive.io( "specific_energy", specific_energy, units::from_joule_per_gram( -10.f ) ); archive.io( "temperature", temperature, units::from_kelvin( 0.f ) ); archive.io( "recipe_charges", recipe_charges, 1 ); + archive.io( "template_traits", template_traits ); // Legacy: remove flag check/unset after 0.F archive.io( "ethereal", ethereal, has_flag( flag_ETHEREAL_ITEM ) ); unset_flag( flag_ETHEREAL_ITEM ); @@ -3952,7 +3953,7 @@ void mm_submap::serialize( JsonOut &jsout ) const const auto write_seq = [&]() { jsout.start_array(); jsout.write( num_same ); - jsout.write( last.symbol ); + jsout.write( static_cast( last.symbol ) ); jsout.write( last.ter_id ); jsout.write( static_cast( last.ter_subtile ) ); jsout.write( static_cast( last.ter_rotation ) ); diff --git a/src/sdltiles.cpp b/src/sdltiles.cpp index e1d5762c2b91e..a4a0375b2cb05 100644 --- a/src/sdltiles.cpp +++ b/src/sdltiles.cpp @@ -190,6 +190,13 @@ static void InitSDL() SDL_SetHint( SDL_HINT_IME_SUPPORT_EXTENDED_TEXT, "1" ); #endif +#if defined(SDL_HINT_APP_NAME) + // Requires SDL 2.0.18. String used multiple ways, one of them is the game + // identifying itself when asking to inhibit screensaver via dbus under + // Linux. + SDL_SetHint( SDL_HINT_APP_NAME, _( "Cataclysm: Dark Days Ahead" ) ); +#endif + #if defined(__linux__) // https://bugzilla.libsdl.org/show_bug.cgi?id=3472#c5 if( SDL_COMPILEDVERSION == SDL_VERSIONNUM( 2, 0, 5 ) ) { diff --git a/src/sounds.cpp b/src/sounds.cpp index 822107ad14db6..9eaf679f26b9c 100644 --- a/src/sounds.cpp +++ b/src/sounds.cpp @@ -472,7 +472,7 @@ void sounds::process_sounds() int sig_power = get_signal_for_hordes( this_centroid ); if( sig_power > 0 ) { - const point_abs_ms abs_ms = get_map().getglobal( source ).xy(); + const point_abs_ms abs_ms = get_map().get_abs( source ).xy(); const point_abs_sm abs_sm( coords::project_to( abs_ms ) ); const tripoint_abs_sm target( abs_sm, source.z() ); overmap_buffer.signal_hordes( target, sig_power ); diff --git a/src/start_location.cpp b/src/start_location.cpp index 837b544127d0b..6be19942ca325 100644 --- a/src/start_location.cpp +++ b/src/start_location.cpp @@ -473,7 +473,7 @@ void start_location::place_player( avatar &you, const tripoint_abs_omt &omtstart if( zone.get_type() == zone_type_ZONE_START_POINT ) { if( here.inbounds( zone.get_center_point() ) ) { found_good_spot = true; - best_spot = here.bub_from_abs( zone.get_center_point() ); + best_spot = here.get_bub( zone.get_center_point() ); break; } } diff --git a/src/suffer.cpp b/src/suffer.cpp index ee67af8639230..ea0778fefe875 100644 --- a/src/suffer.cpp +++ b/src/suffer.cpp @@ -111,6 +111,7 @@ static const efftype_id effect_weary_7( "weary_7" ); static const efftype_id effect_weary_8( "weary_8" ); static const efftype_id effect_winded( "winded" ); +static const itype_id itype_bone( "bone" ); static const itype_id itype_e_handcuffs( "e_handcuffs" ); static const itype_id itype_inhaler( "inhaler" ); static const itype_id itype_oxygen_tank( "oxygen_tank" ); @@ -1032,7 +1033,7 @@ void suffer::from_other_mutations( Character &you ) const tripoint_bub_ms position = you.pos_bub(); if( you.has_trait( trait_SHARKTEETH ) && one_turn_in( 24_hours ) ) { you.add_msg_if_player( m_neutral, _( "You shed a tooth!" ) ); - here.spawn_item( position, "bone", 1 ); + here.spawn_item( position, itype_bone, 1 ); } if( you.has_trait( trait_WINGS_INSECT_active ) ) { diff --git a/src/talker_furniture.cpp b/src/talker_furniture.cpp index b225c7a1d5461..85b490bceac2b 100644 --- a/src/talker_furniture.cpp +++ b/src/talker_furniture.cpp @@ -40,7 +40,7 @@ tripoint_bub_ms talker_furniture_const::pos_bub() const tripoint_abs_ms talker_furniture_const::global_pos() const { - return get_map().getglobal( me_comp->loc ); + return get_map().get_abs( me_comp->loc ); } tripoint_abs_omt talker_furniture_const::global_omt_location() const diff --git a/src/talker_item.cpp b/src/talker_item.cpp index 3cf5092c6a4f3..4d146aa22e7a0 100644 --- a/src/talker_item.cpp +++ b/src/talker_item.cpp @@ -48,7 +48,7 @@ tripoint_bub_ms talker_item_const::pos_bub() const tripoint_abs_ms talker_item_const::global_pos() const { - return get_map().getglobal( me_it_const->pos_bub() ); + return get_map().get_abs( me_it_const->pos_bub() ); } tripoint_abs_omt talker_item_const::global_omt_location() const diff --git a/src/teleport.cpp b/src/teleport.cpp index 7cebd47dc3fc3..aee47188bff4b 100644 --- a/src/teleport.cpp +++ b/src/teleport.cpp @@ -61,7 +61,7 @@ bool teleport::teleport_to_point( Creature &critter, tripoint_bub_ms target, boo Character *const p = critter.as_character(); const bool c_is_u = p != nullptr && p->is_avatar(); map &here = get_map(); - tripoint_abs_ms abs_ms( here.getglobal( target ) ); + tripoint_abs_ms abs_ms( here.get_abs( target ) ); if( abs_ms.z() > OVERMAP_HEIGHT || abs_ms.z() < -OVERMAP_DEPTH ) { debugmsg( "%s cannot teleport to point %s: too high or too deep.", critter.get_name(), abs_ms.to_string() ); @@ -90,7 +90,7 @@ bool teleport::teleport_to_point( Creature &critter, tripoint_bub_ms target, boo dest->load( project_to( abs_ms ), false ); dest->spawn_monsters( true, true ); } - dest_target = dest->bub_from_abs( abs_ms ); + dest_target = dest->get_bub( abs_ms ); } //handles teleporting into solids. if( dest->impassable( dest_target ) ) { @@ -125,8 +125,8 @@ bool teleport::teleport_to_point( Creature &critter, tripoint_bub_ms target, boo } } //update pos - abs_ms = dest->getglobal( dest_target ); - target = here.bub_from_abs( abs_ms ); + abs_ms = dest->get_abs( dest_target ); + target = here.get_bub( abs_ms ); //handles telefragging other creatures int tfrag_attempts = 5; bool collision = false; @@ -145,11 +145,11 @@ bool teleport::teleport_to_point( Creature &critter, tripoint_bub_ms target, boo for( tripoint_abs_ms p : nearest_points ) { // If point is not inbounds, ignore if spot is passible or not. Creatures in impassable terrain will be automatically teleported out in their turn. // some way of validating terrain passability out of bounds would be superior, however. - if( ( !dest->inbounds( here.bub_from_abs( p ) ) || dest->passable( here.bub_from_abs( p ) ) ) && + if( ( !dest->inbounds( here.get_bub( p ) ) || dest->passable( here.get_bub( p ) ) ) && get_creature_tracker().creature_at( p ) == nullptr ) { found_new_spot = true; abs_ms = p; - target = here.bub_from_abs( p ); + target = here.get_bub( p ); break; } } diff --git a/src/tgz_archiver.cpp b/src/tgz_archiver.cpp index 4b32aea674f5f..93a5392a27dc0 100644 --- a/src/tgz_archiver.cpp +++ b/src/tgz_archiver.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -18,16 +19,17 @@ tgz_archiver::~tgz_archiver() finalize(); } -std::string tgz_archiver::_gen_tar_header( fs::path const &file_name, fs::path const &prefix, - fs::path const &real_path, std::streamsize size ) +std::string tgz_archiver::_gen_tar_header( std::filesystem::path const &file_name, + std::filesystem::path const &prefix, + std::filesystem::path const &real_path, std::streamsize size ) { - unsigned const type = fs::is_directory( real_path ) ? 5 : 0; - unsigned const perms = fs::is_directory( real_path ) ? 0775 : 0664; + unsigned const type = std::filesystem::is_directory( real_path ) ? 5 : 0; + unsigned const perms = std::filesystem::is_directory( real_path ) ? 0775 : 0664; // https://stackoverflow.com/a/61067330 - std::time_t const mtime = fs::exists( real_path ) + std::time_t const mtime = std::filesystem::exists( real_path ) ? std::chrono::system_clock::to_time_t( std::chrono::time_point_cast( - fs::last_write_time( real_path ) - _fsnow + _sysnow ) ) : std::time_t{}; + std::filesystem::last_write_time( real_path ) - _fsnow + _sysnow ) ) : std::time_t{}; std::string buf( tar_block_size, '\0' ); std::ostringstream ss( buf ); @@ -53,7 +55,8 @@ std::string tgz_archiver::_gen_tar_header( fs::path const &file_name, fs::path c return ss.str(); } -bool tgz_archiver::add_file( fs::path const &real_path, fs::path const &archived_path ) +bool tgz_archiver::add_file( std::filesystem::path const &real_path, + std::filesystem::path const &archived_path ) { if( fd == nullptr && ( fd = gzopen( output.c_str(), "wb" ), fd == nullptr ) ) { return false; @@ -69,11 +72,11 @@ bool tgz_archiver::add_file( fs::path const &real_path, fs::path const &archived return false; } - fs::path prefix; - fs::path file_name; + std::filesystem::path prefix; + std::filesystem::path file_name; if( prefix_len > 0 ) { std::size_t len = 0; - for( fs::path const &it : archived_path ) { + for( std::filesystem::path const &it : archived_path ) { prefix /= it; len += it.generic_u8string().size() + 1; if( len >= prefix_len ) { @@ -88,7 +91,7 @@ bool tgz_archiver::add_file( fs::path const &real_path, fs::path const &archived std::string header( tar_block_size, '\0' ); std::streamsize size = 0; std::ifstream file( real_path, std::ios::binary | std::ios::ate ); - if( fs::is_regular_file( real_path ) ) { + if( std::filesystem::is_regular_file( real_path ) ) { size = file.tellg(); header = _gen_tar_header( file_name, prefix, real_path, size ); file.seekg( 0 ); @@ -98,7 +101,7 @@ bool tgz_archiver::add_file( fs::path const &real_path, fs::path const &archived } bool ret = gzwrite( fd, header.c_str(), tar_block_size ) != 0; - if( !ret || !fs::is_regular_file( real_path ) || size == 0 ) { + if( !ret || !std::filesystem::is_regular_file( real_path ) || size == 0 ) { return ret; } diff --git a/src/tgz_archiver.h b/src/tgz_archiver.h index 010a887c6081b..7cab43f604ba1 100644 --- a/src/tgz_archiver.h +++ b/src/tgz_archiver.h @@ -3,11 +3,10 @@ #define CATA_SRC_MAP_TGZ_ARCHIVER_H #include #include +#include #include #include -#include - #include "filesystem.h" #include "zlib.h" @@ -16,17 +15,18 @@ class tgz_archiver private: static constexpr std::size_t tar_block_size = 512; using tar_block_t = std::array; - std::string _gen_tar_header( fs::path const &file_name, fs::path const &prefix, - fs::path const &real_path, std::streamsize size ); + std::string _gen_tar_header( std::filesystem::path const &file_name, + std::filesystem::path const &prefix, + std::filesystem::path const &real_path, std::streamsize size ); gzFile fd = nullptr; std::string const output; - fs::file_time_type const _fsnow; + std::filesystem::file_time_type const _fsnow; std::chrono::system_clock::time_point const _sysnow; public: explicit tgz_archiver( std::string ofile ) - : output( std::move( ofile ) ), _fsnow( fs::file_time_type::clock::now() ), + : output( std::move( ofile ) ), _fsnow( std::filesystem::file_time_type::clock::now() ), _sysnow( std::chrono::system_clock::now() ) {}; ~tgz_archiver(); @@ -35,7 +35,7 @@ class tgz_archiver tgz_archiver &operator=( tgz_archiver const & ) = delete; tgz_archiver &operator=( tgz_archiver && ) = delete; - bool add_file( fs::path const &real_path, fs::path const &archived_path ); + bool add_file( std::filesystem::path const &real_path, std::filesystem::path const &archived_path ); void finalize(); }; diff --git a/src/third-party/ghc/LICENSE b/src/third-party/ghc/LICENSE deleted file mode 100644 index 8b24faa71df84..0000000000000 --- a/src/third-party/ghc/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018, Steffen Schümann - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/src/third-party/ghc/filesystem.hpp b/src/third-party/ghc/filesystem.hpp deleted file mode 100644 index 63095a18a1de8..0000000000000 --- a/src/third-party/ghc/filesystem.hpp +++ /dev/null @@ -1,5946 +0,0 @@ -//--------------------------------------------------------------------------------------- -// -// ghc::filesystem - A C++17-like filesystem implementation for C++11/C++14/C++17/C++20 -// -//--------------------------------------------------------------------------------------- -// -// Copyright (c) 2018, Steffen Schümann -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -//--------------------------------------------------------------------------------------- -// -// To dynamically select std::filesystem where available on most platforms, -// you could use: -// -// #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || (defined(__cplusplus) && __cplusplus >= 201703L)) && defined(__has_include) -// #if __has_include() && (!defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) -// #define GHC_USE_STD_FS -// #include -// namespace fs = std::filesystem; -// #endif -// #endif -// #ifndef GHC_USE_STD_FS -// #include -// namespace fs = ghc::filesystem; -// #endif -// -//--------------------------------------------------------------------------------------- -#ifndef GHC_FILESYSTEM_H -#define GHC_FILESYSTEM_H - -// #define BSD manifest constant only in -// sys/param.h -#ifndef _WIN32 -#include -#endif - -#ifndef GHC_OS_DETECTED -#if defined(__APPLE__) && defined(__MACH__) -#define GHC_OS_MACOS -#elif defined(__linux__) -#define GHC_OS_LINUX -#if defined(__ANDROID__) -#define GHC_OS_ANDROID -#endif -#elif defined(_WIN64) -#define GHC_OS_WINDOWS -#define GHC_OS_WIN64 -#elif defined(_WIN32) -#define GHC_OS_WINDOWS -#define GHC_OS_WIN32 -#elif defined(__CYGWIN__) -#define GHC_OS_CYGWIN -#elif defined(__svr4__) -#define GHC_OS_SYS5R4 -#elif defined(BSD) -#define GHC_OS_BSD -#elif defined(__EMSCRIPTEN__) -#define GHC_OS_WEB -#include -#elif defined(__QNX__) -#define GHC_OS_QNX -#define GHC_NO_DIRENT_D_TYPE -#else -#error "Operating system currently not supported!" -#endif -#define GHC_OS_DETECTED -#if (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) -#if _MSVC_LANG == 201703L -#define GHC_FILESYSTEM_RUNNING_CPP17 -#else -#define GHC_FILESYSTEM_RUNNING_CPP20 -#endif -#elif (defined(__cplusplus) && __cplusplus >= 201703L) -#if __cplusplus == 201703L -#define GHC_FILESYSTEM_RUNNING_CPP17 -#else -#define GHC_FILESYSTEM_RUNNING_CPP20 -#endif -#endif -#endif - -#if defined(GHC_FILESYSTEM_IMPLEMENTATION) -#define GHC_EXPAND_IMPL -#define GHC_INLINE -#ifdef GHC_OS_WINDOWS -#ifndef GHC_FS_API -#define GHC_FS_API -#endif -#ifndef GHC_FS_API_CLASS -#define GHC_FS_API_CLASS -#endif -#else -#ifndef GHC_FS_API -#define GHC_FS_API __attribute__((visibility("default"))) -#endif -#ifndef GHC_FS_API_CLASS -#define GHC_FS_API_CLASS __attribute__((visibility("default"))) -#endif -#endif -#elif defined(GHC_FILESYSTEM_FWD) -#define GHC_INLINE -#ifdef GHC_OS_WINDOWS -#ifndef GHC_FS_API -#define GHC_FS_API extern -#endif -#ifndef GHC_FS_API_CLASS -#define GHC_FS_API_CLASS -#endif -#else -#ifndef GHC_FS_API -#define GHC_FS_API extern -#endif -#ifndef GHC_FS_API_CLASS -#define GHC_FS_API_CLASS -#endif -#endif -#else -#define GHC_EXPAND_IMPL -#define GHC_INLINE inline -#ifndef GHC_FS_API -#define GHC_FS_API -#endif -#ifndef GHC_FS_API_CLASS -#define GHC_FS_API_CLASS -#endif -#endif - -#ifdef GHC_EXPAND_IMPL - -#ifdef GHC_OS_WINDOWS -#include -// additional includes -#include -#include -#include -#include -#include -#else -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef GHC_OS_ANDROID -#include -#if __ANDROID_API__ < 12 -#include -#endif -#include -#define statvfs statfs -#else -#include -#endif -#ifdef GHC_OS_CYGWIN -#include -#endif -#if !defined(__ANDROID__) || __ANDROID_API__ >= 26 -#include -#endif -#endif -#ifdef GHC_OS_MACOS -#include -#endif - -#if defined(__cpp_impl_three_way_comparison) && defined(__has_include) -#if __has_include() -#define GHC_HAS_THREEWAY_COMP -#include -#endif -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#else // GHC_EXPAND_IMPL - -#if defined(__cpp_impl_three_way_comparison) && defined(__has_include) -#if __has_include() -#define GHC_HAS_THREEWAY_COMP -#include -#endif -#endif -#include -#include -#include -#include -#include -#include -#include -#ifdef GHC_OS_WINDOWS -#include -#endif -#endif // GHC_EXPAND_IMPL - -// After standard library includes. -// Standard library support for std::string_view. -#if defined(__cpp_lib_string_view) -#define GHC_HAS_STD_STRING_VIEW -#elif defined(_LIBCPP_VERSION) && (_LIBCPP_VERSION >= 4000) && (__cplusplus >= 201402) -#define GHC_HAS_STD_STRING_VIEW -#elif defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE >= 7) && (__cplusplus >= 201703) -#define GHC_HAS_STD_STRING_VIEW -#elif defined(_MSC_VER) && (_MSC_VER >= 1910 && _MSVC_LANG >= 201703) -#define GHC_HAS_STD_STRING_VIEW -#endif - -// Standard library support for std::experimental::string_view. -#if defined(_LIBCPP_VERSION) && (_LIBCPP_VERSION >= 3700 && _LIBCPP_VERSION < 7000) && (__cplusplus >= 201402) -#define GHC_HAS_STD_EXPERIMENTAL_STRING_VIEW -#elif defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)) && (__cplusplus >= 201402) -#define GHC_HAS_STD_EXPERIMENTAL_STRING_VIEW -#elif defined(__GLIBCXX__) && defined(_GLIBCXX_USE_DUAL_ABI) && (__cplusplus >= 201402) -// macro _GLIBCXX_USE_DUAL_ABI is always defined in libstdc++ from gcc-5 and newer -#define GHC_HAS_STD_EXPERIMENTAL_STRING_VIEW -#endif - -#if defined(GHC_HAS_STD_STRING_VIEW) -#include -#elif defined(GHC_HAS_STD_EXPERIMENTAL_STRING_VIEW) -#include -#endif - -//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// Behaviour Switches (see README.md, should match the config in test/filesystem_test.cpp): -//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// Enforce C++17 API where possible when compiling for C++20, handles the following cases: -// * fs::path::u8string() returns std::string instead of std::u8string -// #define GHC_FILESYSTEM_ENFORCE_CPP17_API -//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// LWG #2682 disables the since then invalid use of the copy option create_symlinks on directories -// configure LWG conformance () -#define LWG_2682_BEHAVIOUR -//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// LWG #2395 makes crate_directory/create_directories not emit an error if there is a regular -// file with that name, it is superseded by P1164R1, so only activate if really needed -// #define LWG_2935_BEHAVIOUR -//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// LWG #2936 enables new element wise (more expensive) path comparison -// * if this->root_name().native().compare(p.root_name().native()) != 0 return result -// * if this->has_root_directory() and !p.has_root_directory() return -1 -// * if !this->has_root_directory() and p.has_root_directory() return -1 -// * else result of element wise comparison of path iteration where first comparison is != 0 or 0 -// if all comparisons are 0 (on Windows this implementation does case insensitive root_name() -// comparison) -#define LWG_2936_BEHAVIOUR -//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// LWG #2937 enforces that fs::equivalent emits an error, if !fs::exists(p1)||!exists(p2) -#define LWG_2937_BEHAVIOUR -//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// UTF8-Everywhere is the original behaviour of ghc::filesystem. But since v1.5 the windows -// version defaults to std::wstring storage backend. Still all std::string will be interpreted -// as UTF-8 encoded. With this define you can enfoce the old behavior on Windows, using -// std::string as backend and for fs::path::native() and char for fs::path::c_str(). This -// needs more conversions so it is (an was before v1.5) slower, bot might help keeping source -// homogeneous in a multi platform project. -// #define GHC_WIN_DISABLE_WSTRING_STORAGE_TYPE -//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// Raise errors/exceptions when invalid unicode codepoints or UTF-8 sequences are found, -// instead of replacing them with the unicode replacement character (U+FFFD). -// #define GHC_RAISE_UNICODE_ERRORS -//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// Automatic prefix windows path with "\\?\" if they would break the MAX_PATH length. -// instead of replacing them with the unicode replacement character (U+FFFD). -#ifndef GHC_WIN_DISABLE_AUTO_PREFIXES -#define GHC_WIN_AUTO_PREFIX_LONG_PATH -#endif // GHC_WIN_DISABLE_AUTO_PREFIXES -//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// ghc::filesystem version in decimal (major * 10000 + minor * 100 + patch) -#define GHC_FILESYSTEM_VERSION 10508L - -#if !defined(GHC_WITH_EXCEPTIONS) && (defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND)) -#define GHC_WITH_EXCEPTIONS -#endif -#if !defined(GHC_WITH_EXCEPTIONS) && defined(GHC_RAISE_UNICODE_ERRORS) -#error "Can't raise unicode errors with exception support disabled" -#endif - -namespace ghc { -namespace filesystem { - -#if defined(GHC_HAS_CUSTOM_STRING_VIEW) -#define GHC_WITH_STRING_VIEW -#elif defined(GHC_HAS_STD_STRING_VIEW) -#define GHC_WITH_STRING_VIEW -using std::basic_string_view; -#elif defined(GHC_HAS_STD_EXPERIMENTAL_STRING_VIEW) -#define GHC_WITH_STRING_VIEW -using std::experimental::basic_string_view; -#endif - -// temporary existing exception type for yet unimplemented parts -class GHC_FS_API_CLASS not_implemented_exception : public std::logic_error -{ -public: - not_implemented_exception() - : std::logic_error("function not implemented yet.") - { - } -}; - -template -class path_helper_base -{ -public: - using value_type = char_type; -#ifdef GHC_OS_WINDOWS - static constexpr value_type preferred_separator = '\\'; -#else - static constexpr value_type preferred_separator = '/'; -#endif -}; - -#if __cplusplus < 201703L -template -constexpr char_type path_helper_base::preferred_separator; -#endif - -#ifdef GHC_OS_WINDOWS -class path; -namespace detail { -bool has_executable_extension(const path& p); -} -#endif - -// [fs.class.path] class path -class GHC_FS_API_CLASS path -#if defined(GHC_OS_WINDOWS) && !defined(GHC_WIN_DISABLE_WSTRING_STORAGE_TYPE) -#define GHC_USE_WCHAR_T -#define GHC_NATIVEWP(p) p.c_str() -#define GHC_PLATFORM_LITERAL(str) L##str - : private path_helper_base -{ -public: - using path_helper_base::value_type; -#else -#define GHC_NATIVEWP(p) p.wstring().c_str() -#define GHC_PLATFORM_LITERAL(str) str - : private path_helper_base -{ -public: - using path_helper_base::value_type; -#endif - using string_type = std::basic_string; - using path_helper_base::preferred_separator; - - // [fs.enum.path.format] enumeration format - /// The path format in which the constructor argument is given. - enum format { - generic_format, ///< The generic format, internally used by - ///< ghc::filesystem::path with slashes - native_format, ///< The format native to the current platform this code - ///< is build for - auto_format, ///< Try to auto-detect the format, fallback to native - }; - - template - struct _is_basic_string : std::false_type - { - }; - template - struct _is_basic_string> : std::true_type - { - }; - template - struct _is_basic_string, std::allocator>> : std::true_type - { - }; -#ifdef GHC_WITH_STRING_VIEW - template - struct _is_basic_string> : std::true_type - { - }; - template - struct _is_basic_string>> : std::true_type - { - }; -#endif - - template - using path_type = typename std::enable_if::value, path>::type; - template -#if defined(__cpp_lib_char8_t) && !defined(GHC_FILESYSTEM_ENFORCE_CPP17_API) - using path_from_string = - typename std::enable_if<_is_basic_string::value || std::is_same::type>::value || std::is_same::type>::value || std::is_same::type>::value || - std::is_same::type>::value || std::is_same::type>::value || std::is_same::type>::value || - std::is_same::type>::value || std::is_same::type>::value || std::is_same::type>::value || - std::is_same::type>::value, - path>::type; - template - using path_type_EcharT = typename std::enable_if::value || std::is_same::value || std::is_same::value || std::is_same::value || std::is_same::value, path>::type; -#else - using path_from_string = typename std::enable_if<_is_basic_string::value || std::is_same::type>::value || std::is_same::type>::value || - std::is_same::type>::value || std::is_same::type>::value || std::is_same::type>::value || - std::is_same::type>::value || std::is_same::type>::value || std::is_same::type>::value, - path>::type; - template - using path_type_EcharT = typename std::enable_if::value || std::is_same::value || std::is_same::value || std::is_same::value, path>::type; -#endif - // [fs.path.construct] constructors and destructor - path() noexcept; - path(const path& p); - path(path&& p) noexcept; - path(string_type&& source, format fmt = auto_format); - template > - path(const Source& source, format fmt = auto_format); - template - path(InputIterator first, InputIterator last, format fmt = auto_format); -#ifdef GHC_WITH_EXCEPTIONS - template > - path(const Source& source, const std::locale& loc, format fmt = auto_format); - template - path(InputIterator first, InputIterator last, const std::locale& loc, format fmt = auto_format); -#endif - ~path(); - - // [fs.path.assign] assignments - path& operator=(const path& p); - path& operator=(path&& p) noexcept; - path& operator=(string_type&& source); - path& assign(string_type&& source); - template - path& operator=(const Source& source); - template - path& assign(const Source& source); - template - path& assign(InputIterator first, InputIterator last); - - // [fs.path.append] appends - path& operator/=(const path& p); - template - path& operator/=(const Source& source); - template - path& append(const Source& source); - template - path& append(InputIterator first, InputIterator last); - - // [fs.path.concat] concatenation - path& operator+=(const path& x); - path& operator+=(const string_type& x); -#ifdef GHC_WITH_STRING_VIEW - path& operator+=(basic_string_view x); -#endif - path& operator+=(const value_type* x); - path& operator+=(value_type x); - template - path_from_string& operator+=(const Source& x); - template - path_type_EcharT& operator+=(EcharT x); - template - path& concat(const Source& x); - template - path& concat(InputIterator first, InputIterator last); - - // [fs.path.modifiers] modifiers - void clear() noexcept; - path& make_preferred(); - path& remove_filename(); - path& replace_filename(const path& replacement); - path& replace_extension(const path& replacement = path()); - void swap(path& rhs) noexcept; - - // [fs.path.native.obs] native format observers - const string_type& native() const noexcept; - const value_type* c_str() const noexcept; - operator string_type() const; - template , class Allocator = std::allocator> - std::basic_string string(const Allocator& a = Allocator()) const; - std::string string() const; - std::wstring wstring() const; -#if defined(__cpp_lib_char8_t) && !defined(GHC_FILESYSTEM_ENFORCE_CPP17_API) - std::u8string u8string() const; -#else - std::string u8string() const; -#endif - std::u16string u16string() const; - std::u32string u32string() const; - - // [fs.path.generic.obs] generic format observers - template , class Allocator = std::allocator> - std::basic_string generic_string(const Allocator& a = Allocator()) const; - std::string generic_string() const; - std::wstring generic_wstring() const; -#if defined(__cpp_lib_char8_t) && !defined(GHC_FILESYSTEM_ENFORCE_CPP17_API) - std::u8string generic_u8string() const; -#else - std::string generic_u8string() const; -#endif - std::u16string generic_u16string() const; - std::u32string generic_u32string() const; - - // [fs.path.compare] compare - int compare(const path& p) const noexcept; - int compare(const string_type& s) const; -#ifdef GHC_WITH_STRING_VIEW - int compare(basic_string_view s) const; -#endif - int compare(const value_type* s) const; - - // [fs.path.decompose] decomposition - path root_name() const; - path root_directory() const; - path root_path() const; - path relative_path() const; - path parent_path() const; - path filename() const; - path stem() const; - path extension() const; - - // [fs.path.query] query - bool empty() const noexcept; - bool has_root_name() const; - bool has_root_directory() const; - bool has_root_path() const; - bool has_relative_path() const; - bool has_parent_path() const; - bool has_filename() const; - bool has_stem() const; - bool has_extension() const; - bool is_absolute() const; - bool is_relative() const; - - // [fs.path.gen] generation - path lexically_normal() const; - path lexically_relative(const path& base) const; - path lexically_proximate(const path& base) const; - - // [fs.path.itr] iterators - class iterator; - using const_iterator = iterator; - iterator begin() const; - iterator end() const; - -private: - using impl_value_type = value_type; - using impl_string_type = std::basic_string; - friend class directory_iterator; - void append_name(const value_type* name); - static constexpr impl_value_type generic_separator = '/'; - template - class input_iterator_range - { - public: - typedef InputIterator iterator; - typedef InputIterator const_iterator; - typedef typename InputIterator::difference_type difference_type; - - input_iterator_range(const InputIterator& first, const InputIterator& last) - : _first(first) - , _last(last) - { - } - - InputIterator begin() const { return _first; } - InputIterator end() const { return _last; } - - private: - InputIterator _first; - InputIterator _last; - }; - friend void swap(path& lhs, path& rhs) noexcept; - friend size_t hash_value(const path& p) noexcept; - friend path canonical(const path& p, std::error_code& ec); - friend bool create_directories(const path& p, std::error_code& ec) noexcept; - string_type::size_type root_name_length() const noexcept; - void postprocess_path_with_format(format fmt); - void check_long_path(); - impl_string_type _path; -#ifdef GHC_OS_WINDOWS - void handle_prefixes(); - friend bool detail::has_executable_extension(const path& p); -#ifdef GHC_WIN_AUTO_PREFIX_LONG_PATH - string_type::size_type _prefixLength{0}; -#else // GHC_WIN_AUTO_PREFIX_LONG_PATH - static const string_type::size_type _prefixLength{0}; -#endif // GHC_WIN_AUTO_PREFIX_LONG_PATH -#else - static const string_type::size_type _prefixLength{0}; -#endif -}; - -// [fs.path.nonmember] path non-member functions -GHC_FS_API void swap(path& lhs, path& rhs) noexcept; -GHC_FS_API size_t hash_value(const path& p) noexcept; -#ifdef GHC_HAS_THREEWAY_COMP -GHC_FS_API std::strong_ordering operator<=>(const path& lhs, const path& rhs) noexcept; -#endif -GHC_FS_API bool operator==(const path& lhs, const path& rhs) noexcept; -GHC_FS_API bool operator!=(const path& lhs, const path& rhs) noexcept; -GHC_FS_API bool operator<(const path& lhs, const path& rhs) noexcept; -GHC_FS_API bool operator<=(const path& lhs, const path& rhs) noexcept; -GHC_FS_API bool operator>(const path& lhs, const path& rhs) noexcept; -GHC_FS_API bool operator>=(const path& lhs, const path& rhs) noexcept; -GHC_FS_API path operator/(const path& lhs, const path& rhs); - -// [fs.path.io] path inserter and extractor -template -std::basic_ostream& operator<<(std::basic_ostream& os, const path& p); -template -std::basic_istream& operator>>(std::basic_istream& is, path& p); - -// [pfs.path.factory] path factory functions -template > -#if defined(__cpp_lib_char8_t) && !defined(GHC_FILESYSTEM_ENFORCE_CPP17_API) -[[deprecated("use ghc::filesystem::path::path() with std::u8string instead")]] -#endif -path u8path(const Source& source); -template -#if defined(__cpp_lib_char8_t) && !defined(GHC_FILESYSTEM_ENFORCE_CPP17_API) -[[deprecated("use ghc::filesystem::path::path() with std::u8string instead")]] -#endif -path u8path(InputIterator first, InputIterator last); - -// [fs.class.filesystem_error] class filesystem_error -class GHC_FS_API_CLASS filesystem_error : public std::system_error -{ -public: - filesystem_error(const std::string& what_arg, std::error_code ec); - filesystem_error(const std::string& what_arg, const path& p1, std::error_code ec); - filesystem_error(const std::string& what_arg, const path& p1, const path& p2, std::error_code ec); - const path& path1() const noexcept; - const path& path2() const noexcept; - const char* what() const noexcept override; - -private: - std::string _what_arg; - std::error_code _ec; - path _p1, _p2; -}; - -class GHC_FS_API_CLASS path::iterator -{ -public: - using value_type = const path; - using difference_type = std::ptrdiff_t; - using pointer = const path*; - using reference = const path&; - using iterator_category = std::bidirectional_iterator_tag; - - iterator(); - iterator(const path& p, const impl_string_type::const_iterator& pos); - iterator& operator++(); - iterator operator++(int); - iterator& operator--(); - iterator operator--(int); - bool operator==(const iterator& other) const; - bool operator!=(const iterator& other) const; - reference operator*() const; - pointer operator->() const; - -private: - friend class path; - impl_string_type::const_iterator increment(const impl_string_type::const_iterator& pos) const; - impl_string_type::const_iterator decrement(const impl_string_type::const_iterator& pos) const; - void updateCurrent(); - impl_string_type::const_iterator _first; - impl_string_type::const_iterator _last; - impl_string_type::const_iterator _prefix; - impl_string_type::const_iterator _root; - impl_string_type::const_iterator _iter; - path _current; -}; - -struct space_info -{ - uintmax_t capacity; - uintmax_t free; - uintmax_t available; -}; - -// [fs.enum] enumerations -// [fs.enum.file_type] -enum class file_type { - none, - not_found, - regular, - directory, - symlink, - block, - character, - fifo, - socket, - unknown, -}; - -// [fs.enum.perms] -enum class perms : uint16_t { - none = 0, - - owner_read = 0400, - owner_write = 0200, - owner_exec = 0100, - owner_all = 0700, - - group_read = 040, - group_write = 020, - group_exec = 010, - group_all = 070, - - others_read = 04, - others_write = 02, - others_exec = 01, - others_all = 07, - - all = 0777, - set_uid = 04000, - set_gid = 02000, - sticky_bit = 01000, - - mask = 07777, - unknown = 0xffff -}; - -// [fs.enum.perm.opts] -enum class perm_options : uint16_t { - replace = 3, - add = 1, - remove = 2, - nofollow = 4, -}; - -// [fs.enum.copy.opts] -enum class copy_options : uint16_t { - none = 0, - - skip_existing = 1, - overwrite_existing = 2, - update_existing = 4, - - recursive = 8, - - copy_symlinks = 0x10, - skip_symlinks = 0x20, - - directories_only = 0x40, - create_symlinks = 0x80, -#ifndef GHC_OS_WEB - create_hard_links = 0x100 -#endif -}; - -// [fs.enum.dir.opts] -enum class directory_options : uint16_t { - none = 0, - follow_directory_symlink = 1, - skip_permission_denied = 2, -}; - -// [fs.class.file_status] class file_status -class GHC_FS_API_CLASS file_status -{ -public: - // [fs.file_status.cons] constructors and destructor - file_status() noexcept; - explicit file_status(file_type ft, perms prms = perms::unknown) noexcept; - file_status(const file_status&) noexcept; - file_status(file_status&&) noexcept; - ~file_status(); - // assignments: - file_status& operator=(const file_status&) noexcept; - file_status& operator=(file_status&&) noexcept; - // [fs.file_status.mods] modifiers - void type(file_type ft) noexcept; - void permissions(perms prms) noexcept; - // [fs.file_status.obs] observers - file_type type() const noexcept; - perms permissions() const noexcept; - friend bool operator==(const file_status& lhs, const file_status& rhs) noexcept { return lhs.type() == rhs.type() && lhs.permissions() == rhs.permissions(); } -private: - file_type _type; - perms _perms; -}; - -using file_time_type = std::chrono::time_point; - -// [fs.class.directory_entry] Class directory_entry -class GHC_FS_API_CLASS directory_entry -{ -public: - // [fs.dir.entry.cons] constructors and destructor - directory_entry() noexcept = default; - directory_entry(const directory_entry&) = default; - directory_entry(directory_entry&&) noexcept = default; -#ifdef GHC_WITH_EXCEPTIONS - explicit directory_entry(const path& p); -#endif - directory_entry(const path& p, std::error_code& ec); - ~directory_entry(); - - // assignments: - directory_entry& operator=(const directory_entry&) = default; - directory_entry& operator=(directory_entry&&) noexcept = default; - - // [fs.dir.entry.mods] modifiers -#ifdef GHC_WITH_EXCEPTIONS - void assign(const path& p); - void replace_filename(const path& p); - void refresh(); -#endif - void assign(const path& p, std::error_code& ec); - void replace_filename(const path& p, std::error_code& ec); - void refresh(std::error_code& ec) noexcept; - - // [fs.dir.entry.obs] observers - const filesystem::path& path() const noexcept; - operator const filesystem::path&() const noexcept; -#ifdef GHC_WITH_EXCEPTIONS - bool exists() const; - bool is_block_file() const; - bool is_character_file() const; - bool is_directory() const; - bool is_fifo() const; - bool is_other() const; - bool is_regular_file() const; - bool is_socket() const; - bool is_symlink() const; - uintmax_t file_size() const; - file_time_type last_write_time() const; - file_status status() const; - file_status symlink_status() const; -#endif - bool exists(std::error_code& ec) const noexcept; - bool is_block_file(std::error_code& ec) const noexcept; - bool is_character_file(std::error_code& ec) const noexcept; - bool is_directory(std::error_code& ec) const noexcept; - bool is_fifo(std::error_code& ec) const noexcept; - bool is_other(std::error_code& ec) const noexcept; - bool is_regular_file(std::error_code& ec) const noexcept; - bool is_socket(std::error_code& ec) const noexcept; - bool is_symlink(std::error_code& ec) const noexcept; - uintmax_t file_size(std::error_code& ec) const noexcept; - file_time_type last_write_time(std::error_code& ec) const noexcept; - file_status status(std::error_code& ec) const noexcept; - file_status symlink_status(std::error_code& ec) const noexcept; - -#ifndef GHC_OS_WEB -#ifdef GHC_WITH_EXCEPTIONS - uintmax_t hard_link_count() const; -#endif - uintmax_t hard_link_count(std::error_code& ec) const noexcept; -#endif - -#ifdef GHC_HAS_THREEWAY_COMP - std::strong_ordering operator<=>(const directory_entry& rhs) const noexcept; -#endif - bool operator<(const directory_entry& rhs) const noexcept; - bool operator==(const directory_entry& rhs) const noexcept; - bool operator!=(const directory_entry& rhs) const noexcept; - bool operator<=(const directory_entry& rhs) const noexcept; - bool operator>(const directory_entry& rhs) const noexcept; - bool operator>=(const directory_entry& rhs) const noexcept; - -private: - friend class directory_iterator; -#ifdef GHC_WITH_EXCEPTIONS - file_type status_file_type() const; -#endif - file_type status_file_type(std::error_code& ec) const noexcept; - filesystem::path _path; - file_status _status; - file_status _symlink_status; - uintmax_t _file_size = static_cast(-1); -#ifndef GHC_OS_WINDOWS - uintmax_t _hard_link_count = static_cast(-1); -#endif - time_t _last_write_time = 0; -}; - -// [fs.class.directory.iterator] Class directory_iterator -class GHC_FS_API_CLASS directory_iterator -{ -public: - class GHC_FS_API_CLASS proxy - { - public: - const directory_entry& operator*() const& noexcept { return _dir_entry; } - directory_entry operator*() && noexcept { return std::move(_dir_entry); } - - private: - explicit proxy(const directory_entry& dir_entry) - : _dir_entry(dir_entry) - { - } - friend class directory_iterator; - friend class recursive_directory_iterator; - directory_entry _dir_entry; - }; - using iterator_category = std::input_iterator_tag; - using value_type = directory_entry; - using difference_type = std::ptrdiff_t; - using pointer = const directory_entry*; - using reference = const directory_entry&; - - // [fs.dir.itr.members] member functions - directory_iterator() noexcept; -#ifdef GHC_WITH_EXCEPTIONS - explicit directory_iterator(const path& p); - directory_iterator(const path& p, directory_options options); -#endif - directory_iterator(const path& p, std::error_code& ec) noexcept; - directory_iterator(const path& p, directory_options options, std::error_code& ec) noexcept; - directory_iterator(const directory_iterator& rhs); - directory_iterator(directory_iterator&& rhs) noexcept; - ~directory_iterator(); - directory_iterator& operator=(const directory_iterator& rhs); - directory_iterator& operator=(directory_iterator&& rhs) noexcept; - const directory_entry& operator*() const; - const directory_entry* operator->() const; -#ifdef GHC_WITH_EXCEPTIONS - directory_iterator& operator++(); -#endif - directory_iterator& increment(std::error_code& ec) noexcept; - - // other members as required by [input.iterators] -#ifdef GHC_WITH_EXCEPTIONS - proxy operator++(int) - { - proxy p{**this}; - ++*this; - return p; - } -#endif - bool operator==(const directory_iterator& rhs) const; - bool operator!=(const directory_iterator& rhs) const; - -private: - friend class recursive_directory_iterator; - class impl; - std::shared_ptr _impl; -}; - -// [fs.dir.itr.nonmembers] directory_iterator non-member functions -GHC_FS_API directory_iterator begin(directory_iterator iter) noexcept; -GHC_FS_API directory_iterator end(const directory_iterator&) noexcept; - -// [fs.class.re.dir.itr] class recursive_directory_iterator -class GHC_FS_API_CLASS recursive_directory_iterator -{ -public: - using iterator_category = std::input_iterator_tag; - using value_type = directory_entry; - using difference_type = std::ptrdiff_t; - using pointer = const directory_entry*; - using reference = const directory_entry&; - - // [fs.rec.dir.itr.members] constructors and destructor - recursive_directory_iterator() noexcept; -#ifdef GHC_WITH_EXCEPTIONS - explicit recursive_directory_iterator(const path& p); - recursive_directory_iterator(const path& p, directory_options options); -#endif - recursive_directory_iterator(const path& p, directory_options options, std::error_code& ec) noexcept; - recursive_directory_iterator(const path& p, std::error_code& ec) noexcept; - recursive_directory_iterator(const recursive_directory_iterator& rhs); - recursive_directory_iterator(recursive_directory_iterator&& rhs) noexcept; - ~recursive_directory_iterator(); - - // [fs.rec.dir.itr.members] observers - directory_options options() const; - int depth() const; - bool recursion_pending() const; - - const directory_entry& operator*() const; - const directory_entry* operator->() const; - - // [fs.rec.dir.itr.members] modifiers recursive_directory_iterator& - recursive_directory_iterator& operator=(const recursive_directory_iterator& rhs); - recursive_directory_iterator& operator=(recursive_directory_iterator&& rhs) noexcept; -#ifdef GHC_WITH_EXCEPTIONS - recursive_directory_iterator& operator++(); -#endif - recursive_directory_iterator& increment(std::error_code& ec) noexcept; - -#ifdef GHC_WITH_EXCEPTIONS - void pop(); -#endif - void pop(std::error_code& ec); - void disable_recursion_pending(); - - // other members as required by [input.iterators] -#ifdef GHC_WITH_EXCEPTIONS - directory_iterator::proxy operator++(int) - { - directory_iterator::proxy proxy{**this}; - ++*this; - return proxy; - } -#endif - bool operator==(const recursive_directory_iterator& rhs) const; - bool operator!=(const recursive_directory_iterator& rhs) const; - -private: - struct recursive_directory_iterator_impl - { - directory_options _options; - bool _recursion_pending; - std::stack _dir_iter_stack; - recursive_directory_iterator_impl(directory_options options, bool recursion_pending) - : _options(options) - , _recursion_pending(recursion_pending) - { - } - }; - std::shared_ptr _impl; -}; - -// [fs.rec.dir.itr.nonmembers] directory_iterator non-member functions -GHC_FS_API recursive_directory_iterator begin(recursive_directory_iterator iter) noexcept; -GHC_FS_API recursive_directory_iterator end(const recursive_directory_iterator&) noexcept; - -// [fs.op.funcs] filesystem operations -#ifdef GHC_WITH_EXCEPTIONS -GHC_FS_API path absolute(const path& p); -GHC_FS_API path canonical(const path& p); -GHC_FS_API void copy(const path& from, const path& to); -GHC_FS_API void copy(const path& from, const path& to, copy_options options); -GHC_FS_API bool copy_file(const path& from, const path& to); -GHC_FS_API bool copy_file(const path& from, const path& to, copy_options option); -GHC_FS_API void copy_symlink(const path& existing_symlink, const path& new_symlink); -GHC_FS_API bool create_directories(const path& p); -GHC_FS_API bool create_directory(const path& p); -GHC_FS_API bool create_directory(const path& p, const path& attributes); -GHC_FS_API void create_directory_symlink(const path& to, const path& new_symlink); -GHC_FS_API void create_symlink(const path& to, const path& new_symlink); -GHC_FS_API path current_path(); -GHC_FS_API void current_path(const path& p); -GHC_FS_API bool exists(const path& p); -GHC_FS_API bool equivalent(const path& p1, const path& p2); -GHC_FS_API uintmax_t file_size(const path& p); -GHC_FS_API bool is_block_file(const path& p); -GHC_FS_API bool is_character_file(const path& p); -GHC_FS_API bool is_directory(const path& p); -GHC_FS_API bool is_empty(const path& p); -GHC_FS_API bool is_fifo(const path& p); -GHC_FS_API bool is_other(const path& p); -GHC_FS_API bool is_regular_file(const path& p); -GHC_FS_API bool is_socket(const path& p); -GHC_FS_API bool is_symlink(const path& p); -GHC_FS_API file_time_type last_write_time(const path& p); -GHC_FS_API void last_write_time(const path& p, file_time_type new_time); -GHC_FS_API void permissions(const path& p, perms prms, perm_options opts = perm_options::replace); -GHC_FS_API path proximate(const path& p, const path& base = current_path()); -GHC_FS_API path read_symlink(const path& p); -GHC_FS_API path relative(const path& p, const path& base = current_path()); -GHC_FS_API bool remove(const path& p); -GHC_FS_API uintmax_t remove_all(const path& p); -GHC_FS_API void rename(const path& from, const path& to); -GHC_FS_API void resize_file(const path& p, uintmax_t size); -GHC_FS_API space_info space(const path& p); -GHC_FS_API file_status status(const path& p); -GHC_FS_API file_status symlink_status(const path& p); -GHC_FS_API path temp_directory_path(); -GHC_FS_API path weakly_canonical(const path& p); -#endif -GHC_FS_API path absolute(const path& p, std::error_code& ec); -GHC_FS_API path canonical(const path& p, std::error_code& ec); -GHC_FS_API void copy(const path& from, const path& to, std::error_code& ec) noexcept; -GHC_FS_API void copy(const path& from, const path& to, copy_options options, std::error_code& ec) noexcept; -GHC_FS_API bool copy_file(const path& from, const path& to, std::error_code& ec) noexcept; -GHC_FS_API bool copy_file(const path& from, const path& to, copy_options option, std::error_code& ec) noexcept; -GHC_FS_API void copy_symlink(const path& existing_symlink, const path& new_symlink, std::error_code& ec) noexcept; -GHC_FS_API bool create_directories(const path& p, std::error_code& ec) noexcept; -GHC_FS_API bool create_directory(const path& p, std::error_code& ec) noexcept; -GHC_FS_API bool create_directory(const path& p, const path& attributes, std::error_code& ec) noexcept; -GHC_FS_API void create_directory_symlink(const path& to, const path& new_symlink, std::error_code& ec) noexcept; -GHC_FS_API void create_symlink(const path& to, const path& new_symlink, std::error_code& ec) noexcept; -GHC_FS_API path current_path(std::error_code& ec); -GHC_FS_API void current_path(const path& p, std::error_code& ec) noexcept; -GHC_FS_API bool exists(file_status s) noexcept; -GHC_FS_API bool exists(const path& p, std::error_code& ec) noexcept; -GHC_FS_API bool equivalent(const path& p1, const path& p2, std::error_code& ec) noexcept; -GHC_FS_API uintmax_t file_size(const path& p, std::error_code& ec) noexcept; -GHC_FS_API bool is_block_file(file_status s) noexcept; -GHC_FS_API bool is_block_file(const path& p, std::error_code& ec) noexcept; -GHC_FS_API bool is_character_file(file_status s) noexcept; -GHC_FS_API bool is_character_file(const path& p, std::error_code& ec) noexcept; -GHC_FS_API bool is_directory(file_status s) noexcept; -GHC_FS_API bool is_directory(const path& p, std::error_code& ec) noexcept; -GHC_FS_API bool is_empty(const path& p, std::error_code& ec) noexcept; -GHC_FS_API bool is_fifo(file_status s) noexcept; -GHC_FS_API bool is_fifo(const path& p, std::error_code& ec) noexcept; -GHC_FS_API bool is_other(file_status s) noexcept; -GHC_FS_API bool is_other(const path& p, std::error_code& ec) noexcept; -GHC_FS_API bool is_regular_file(file_status s) noexcept; -GHC_FS_API bool is_regular_file(const path& p, std::error_code& ec) noexcept; -GHC_FS_API bool is_socket(file_status s) noexcept; -GHC_FS_API bool is_socket(const path& p, std::error_code& ec) noexcept; -GHC_FS_API bool is_symlink(file_status s) noexcept; -GHC_FS_API bool is_symlink(const path& p, std::error_code& ec) noexcept; -GHC_FS_API file_time_type last_write_time(const path& p, std::error_code& ec) noexcept; -GHC_FS_API void last_write_time(const path& p, file_time_type new_time, std::error_code& ec) noexcept; -GHC_FS_API void permissions(const path& p, perms prms, std::error_code& ec) noexcept; -GHC_FS_API void permissions(const path& p, perms prms, perm_options opts, std::error_code& ec) noexcept; -GHC_FS_API path proximate(const path& p, std::error_code& ec); -GHC_FS_API path proximate(const path& p, const path& base, std::error_code& ec); -GHC_FS_API path read_symlink(const path& p, std::error_code& ec); -GHC_FS_API path relative(const path& p, std::error_code& ec); -GHC_FS_API path relative(const path& p, const path& base, std::error_code& ec); -GHC_FS_API bool remove(const path& p, std::error_code& ec) noexcept; -GHC_FS_API uintmax_t remove_all(const path& p, std::error_code& ec) noexcept; -GHC_FS_API void rename(const path& from, const path& to, std::error_code& ec) noexcept; -GHC_FS_API void resize_file(const path& p, uintmax_t size, std::error_code& ec) noexcept; -GHC_FS_API space_info space(const path& p, std::error_code& ec) noexcept; -GHC_FS_API file_status status(const path& p, std::error_code& ec) noexcept; -GHC_FS_API bool status_known(file_status s) noexcept; -GHC_FS_API file_status symlink_status(const path& p, std::error_code& ec) noexcept; -GHC_FS_API path temp_directory_path(std::error_code& ec) noexcept; -GHC_FS_API path weakly_canonical(const path& p, std::error_code& ec) noexcept; - -#ifndef GHC_OS_WEB -#ifdef GHC_WITH_EXCEPTIONS -GHC_FS_API void create_hard_link(const path& to, const path& new_hard_link); -GHC_FS_API uintmax_t hard_link_count(const path& p); -#endif -GHC_FS_API void create_hard_link(const path& to, const path& new_hard_link, std::error_code& ec) noexcept; -GHC_FS_API uintmax_t hard_link_count(const path& p, std::error_code& ec) noexcept; -#endif - -// Non-C++17 add-on std::fstream wrappers with path -template > -class basic_filebuf : public std::basic_filebuf -{ -public: - basic_filebuf() {} - ~basic_filebuf() override {} - basic_filebuf(const basic_filebuf&) = delete; - const basic_filebuf& operator=(const basic_filebuf&) = delete; - basic_filebuf* open(const path& p, std::ios_base::openmode mode) - { -#if defined(GHC_OS_WINDOWS) && !defined(__GLIBCXX__) - return std::basic_filebuf::open(p.wstring().c_str(), mode) ? this : 0; -#else - return std::basic_filebuf::open(p.string().c_str(), mode) ? this : 0; -#endif - } -}; - -template > -class basic_ifstream : public std::basic_ifstream -{ -public: - basic_ifstream() {} -#if defined(GHC_OS_WINDOWS) && !defined(__GLIBCXX__) - explicit basic_ifstream(const path& p, std::ios_base::openmode mode = std::ios_base::in) - : std::basic_ifstream(p.wstring().c_str(), mode) - { - } - void open(const path& p, std::ios_base::openmode mode = std::ios_base::in) { std::basic_ifstream::open(p.wstring().c_str(), mode); } -#else - explicit basic_ifstream(const path& p, std::ios_base::openmode mode = std::ios_base::in) - : std::basic_ifstream(p.string().c_str(), mode) - { - } - void open(const path& p, std::ios_base::openmode mode = std::ios_base::in) { std::basic_ifstream::open(p.string().c_str(), mode); } -#endif - basic_ifstream(const basic_ifstream&) = delete; - const basic_ifstream& operator=(const basic_ifstream&) = delete; - ~basic_ifstream() override {} -}; - -template > -class basic_ofstream : public std::basic_ofstream -{ -public: - basic_ofstream() {} -#if defined(GHC_OS_WINDOWS) && !defined(__GLIBCXX__) - explicit basic_ofstream(const path& p, std::ios_base::openmode mode = std::ios_base::out) - : std::basic_ofstream(p.wstring().c_str(), mode) - { - } - void open(const path& p, std::ios_base::openmode mode = std::ios_base::out) { std::basic_ofstream::open(p.wstring().c_str(), mode); } -#else - explicit basic_ofstream(const path& p, std::ios_base::openmode mode = std::ios_base::out) - : std::basic_ofstream(p.string().c_str(), mode) - { - } - void open(const path& p, std::ios_base::openmode mode = std::ios_base::out) { std::basic_ofstream::open(p.string().c_str(), mode); } -#endif - basic_ofstream(const basic_ofstream&) = delete; - const basic_ofstream& operator=(const basic_ofstream&) = delete; - ~basic_ofstream() override {} -}; - -template > -class basic_fstream : public std::basic_fstream -{ -public: - basic_fstream() {} -#if defined(GHC_OS_WINDOWS) && !defined(__GLIBCXX__) - explicit basic_fstream(const path& p, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out) - : std::basic_fstream(p.wstring().c_str(), mode) - { - } - void open(const path& p, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out) { std::basic_fstream::open(p.wstring().c_str(), mode); } -#else - explicit basic_fstream(const path& p, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out) - : std::basic_fstream(p.string().c_str(), mode) - { - } - void open(const path& p, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out) { std::basic_fstream::open(p.string().c_str(), mode); } -#endif - basic_fstream(const basic_fstream&) = delete; - const basic_fstream& operator=(const basic_fstream&) = delete; - ~basic_fstream() override {} -}; - -typedef basic_filebuf filebuf; -typedef basic_filebuf wfilebuf; -typedef basic_ifstream ifstream; -typedef basic_ifstream wifstream; -typedef basic_ofstream ofstream; -typedef basic_ofstream wofstream; -typedef basic_fstream fstream; -typedef basic_fstream wfstream; - -class GHC_FS_API_CLASS u8arguments -{ -public: - u8arguments(int& argc, char**& argv); - ~u8arguments() - { - _refargc = _argc; - _refargv = _argv; - } - - bool valid() const { return _isvalid; } - -private: - int _argc; - char** _argv; - int& _refargc; - char**& _refargv; - bool _isvalid; -#ifdef GHC_OS_WINDOWS - std::vector _args; - std::vector _argp; -#endif -}; - -//------------------------------------------------------------------------------------------------- -// Implementation -//------------------------------------------------------------------------------------------------- - -namespace detail { -enum utf8_states_t { S_STRT = 0, S_RJCT = 8 }; -GHC_FS_API void appendUTF8(std::string& str, uint32_t unicode); -GHC_FS_API bool is_surrogate(uint32_t c); -GHC_FS_API bool is_high_surrogate(uint32_t c); -GHC_FS_API bool is_low_surrogate(uint32_t c); -GHC_FS_API unsigned consumeUtf8Fragment(const unsigned state, const uint8_t fragment, uint32_t& codepoint); -enum class portable_error { - none = 0, - exists, - not_found, - not_supported, - not_implemented, - invalid_argument, - is_a_directory, -}; -GHC_FS_API std::error_code make_error_code(portable_error err); -#ifdef GHC_OS_WINDOWS -GHC_FS_API std::error_code make_system_error(uint32_t err = 0); -#else -GHC_FS_API std::error_code make_system_error(int err = 0); -#endif -} // namespace detail - -namespace detail { - -#ifdef GHC_EXPAND_IMPL - -GHC_INLINE std::error_code make_error_code(portable_error err) -{ -#ifdef GHC_OS_WINDOWS - switch (err) { - case portable_error::none: - return std::error_code(); - case portable_error::exists: - return std::error_code(ERROR_ALREADY_EXISTS, std::system_category()); - case portable_error::not_found: - return std::error_code(ERROR_PATH_NOT_FOUND, std::system_category()); - case portable_error::not_supported: - return std::error_code(ERROR_NOT_SUPPORTED, std::system_category()); - case portable_error::not_implemented: - return std::error_code(ERROR_CALL_NOT_IMPLEMENTED, std::system_category()); - case portable_error::invalid_argument: - return std::error_code(ERROR_INVALID_PARAMETER, std::system_category()); - case portable_error::is_a_directory: -#ifdef ERROR_DIRECTORY_NOT_SUPPORTED - return std::error_code(ERROR_DIRECTORY_NOT_SUPPORTED, std::system_category()); -#else - return std::error_code(ERROR_NOT_SUPPORTED, std::system_category()); -#endif - } -#else - switch (err) { - case portable_error::none: - return std::error_code(); - case portable_error::exists: - return std::error_code(EEXIST, std::system_category()); - case portable_error::not_found: - return std::error_code(ENOENT, std::system_category()); - case portable_error::not_supported: - return std::error_code(ENOTSUP, std::system_category()); - case portable_error::not_implemented: - return std::error_code(ENOSYS, std::system_category()); - case portable_error::invalid_argument: - return std::error_code(EINVAL, std::system_category()); - case portable_error::is_a_directory: - return std::error_code(EISDIR, std::system_category()); - } -#endif - return std::error_code(); -} - -#ifdef GHC_OS_WINDOWS -GHC_INLINE std::error_code make_system_error(uint32_t err) -{ - return std::error_code(err ? static_cast(err) : static_cast(::GetLastError()), std::system_category()); -} -#else -GHC_INLINE std::error_code make_system_error(int err) -{ - return std::error_code(err ? err : errno, std::system_category()); -} -#endif - -#endif // GHC_EXPAND_IMPL - -template -using EnableBitmask = typename std::enable_if::value || std::is_same::value || std::is_same::value || std::is_same::value, Enum>::type; -} // namespace detail - -template -constexpr detail::EnableBitmask operator&(Enum X, Enum Y) -{ - using underlying = typename std::underlying_type::type; - return static_cast(static_cast(X) & static_cast(Y)); -} - -template -constexpr detail::EnableBitmask operator|(Enum X, Enum Y) -{ - using underlying = typename std::underlying_type::type; - return static_cast(static_cast(X) | static_cast(Y)); -} - -template -constexpr detail::EnableBitmask operator^(Enum X, Enum Y) -{ - using underlying = typename std::underlying_type::type; - return static_cast(static_cast(X) ^ static_cast(Y)); -} - -template -constexpr detail::EnableBitmask operator~(Enum X) -{ - using underlying = typename std::underlying_type::type; - return static_cast(~static_cast(X)); -} - -template -detail::EnableBitmask& operator&=(Enum& X, Enum Y) -{ - X = X & Y; - return X; -} - -template -detail::EnableBitmask& operator|=(Enum& X, Enum Y) -{ - X = X | Y; - return X; -} - -template -detail::EnableBitmask& operator^=(Enum& X, Enum Y) -{ - X = X ^ Y; - return X; -} - -#ifdef GHC_EXPAND_IMPL - -namespace detail { - -GHC_INLINE bool in_range(uint32_t c, uint32_t lo, uint32_t hi) -{ - return (static_cast(c - lo) < (hi - lo + 1)); -} - -GHC_INLINE bool is_surrogate(uint32_t c) -{ - return in_range(c, 0xd800, 0xdfff); -} - -GHC_INLINE bool is_high_surrogate(uint32_t c) -{ - return (c & 0xfffffc00) == 0xd800; -} - -GHC_INLINE bool is_low_surrogate(uint32_t c) -{ - return (c & 0xfffffc00) == 0xdc00; -} - -GHC_INLINE void appendUTF8(std::string& str, uint32_t unicode) -{ - if (unicode <= 0x7f) { - str.push_back(static_cast(unicode)); - } - else if (unicode >= 0x80 && unicode <= 0x7ff) { - str.push_back(static_cast((unicode >> 6) + 192)); - str.push_back(static_cast((unicode & 0x3f) + 128)); - } - else if ((unicode >= 0x800 && unicode <= 0xd7ff) || (unicode >= 0xe000 && unicode <= 0xffff)) { - str.push_back(static_cast((unicode >> 12) + 224)); - str.push_back(static_cast(((unicode & 0xfff) >> 6) + 128)); - str.push_back(static_cast((unicode & 0x3f) + 128)); - } - else if (unicode >= 0x10000 && unicode <= 0x10ffff) { - str.push_back(static_cast((unicode >> 18) + 240)); - str.push_back(static_cast(((unicode & 0x3ffff) >> 12) + 128)); - str.push_back(static_cast(((unicode & 0xfff) >> 6) + 128)); - str.push_back(static_cast((unicode & 0x3f) + 128)); - } - else { -#ifdef GHC_RAISE_UNICODE_ERRORS - throw filesystem_error("Illegal code point for unicode character.", str, std::make_error_code(std::errc::illegal_byte_sequence)); -#else - appendUTF8(str, 0xfffd); -#endif - } -} - -// Thanks to Bjoern Hoehrmann (https://bjoern.hoehrmann.de/utf-8/decoder/dfa/) -// and Taylor R Campbell for the ideas to this DFA approach of UTF-8 decoding; -// Generating debugging and shrinking my own DFA from scratch was a day of fun! -GHC_INLINE unsigned consumeUtf8Fragment(const unsigned state, const uint8_t fragment, uint32_t& codepoint) -{ - static const uint32_t utf8_state_info[] = { - // encoded states - 0x11111111u, 0x11111111u, 0x77777777u, 0x77777777u, 0x88888888u, 0x88888888u, 0x88888888u, 0x88888888u, 0x22222299u, 0x22222222u, 0x22222222u, 0x22222222u, 0x3333333au, 0x33433333u, 0x9995666bu, 0x99999999u, - 0x88888880u, 0x22818108u, 0x88888881u, 0x88888882u, 0x88888884u, 0x88888887u, 0x88888886u, 0x82218108u, 0x82281108u, 0x88888888u, 0x88888883u, 0x88888885u, 0u, 0u, 0u, 0u, - }; - uint8_t category = fragment < 128 ? 0 : (utf8_state_info[(fragment >> 3) & 0xf] >> ((fragment & 7) << 2)) & 0xf; - codepoint = (state ? (codepoint << 6) | (fragment & 0x3fu) : (0xffu >> category) & fragment); - return state == S_RJCT ? static_cast(S_RJCT) : static_cast((utf8_state_info[category + 16] >> (state << 2)) & 0xf); -} - -GHC_INLINE bool validUtf8(const std::string& utf8String) -{ - std::string::const_iterator iter = utf8String.begin(); - unsigned utf8_state = S_STRT; - std::uint32_t codepoint = 0; - while (iter < utf8String.end()) { - if ((utf8_state = consumeUtf8Fragment(utf8_state, static_cast(*iter++), codepoint)) == S_RJCT) { - return false; - } - } - if (utf8_state) { - return false; - } - return true; -} - -} // namespace detail - -#endif - -namespace detail { - -template ::value && (sizeof(typename Utf8String::value_type) == 1) && (sizeof(typename StringType::value_type) == 1)>::type* = nullptr> -inline StringType fromUtf8(const Utf8String& utf8String, const typename StringType::allocator_type& alloc = typename StringType::allocator_type()) -{ - return StringType(utf8String.begin(), utf8String.end(), alloc); -} - -template ::value && (sizeof(typename Utf8String::value_type) == 1) && (sizeof(typename StringType::value_type) == 2)>::type* = nullptr> -inline StringType fromUtf8(const Utf8String& utf8String, const typename StringType::allocator_type& alloc = typename StringType::allocator_type()) -{ - StringType result(alloc); - result.reserve(utf8String.length()); - auto iter = utf8String.cbegin(); - unsigned utf8_state = S_STRT; - std::uint32_t codepoint = 0; - while (iter < utf8String.cend()) { - if ((utf8_state = consumeUtf8Fragment(utf8_state, static_cast(*iter++), codepoint)) == S_STRT) { - if (codepoint <= 0xffff) { - result += static_cast(codepoint); - } - else { - codepoint -= 0x10000; - result += static_cast((codepoint >> 10) + 0xd800); - result += static_cast((codepoint & 0x3ff) + 0xdc00); - } - codepoint = 0; - } - else if (utf8_state == S_RJCT) { -#ifdef GHC_RAISE_UNICODE_ERRORS - throw filesystem_error("Illegal byte sequence for unicode character.", utf8String, std::make_error_code(std::errc::illegal_byte_sequence)); -#else - result += static_cast(0xfffd); - utf8_state = S_STRT; - codepoint = 0; -#endif - } - } - if (utf8_state) { -#ifdef GHC_RAISE_UNICODE_ERRORS - throw filesystem_error("Illegal byte sequence for unicode character.", utf8String, std::make_error_code(std::errc::illegal_byte_sequence)); -#else - result += static_cast(0xfffd); -#endif - } - return result; -} - -template ::value && (sizeof(typename Utf8String::value_type) == 1) && (sizeof(typename StringType::value_type) == 4)>::type* = nullptr> -inline StringType fromUtf8(const Utf8String& utf8String, const typename StringType::allocator_type& alloc = typename StringType::allocator_type()) -{ - StringType result(alloc); - result.reserve(utf8String.length()); - auto iter = utf8String.cbegin(); - unsigned utf8_state = S_STRT; - std::uint32_t codepoint = 0; - while (iter < utf8String.cend()) { - if ((utf8_state = consumeUtf8Fragment(utf8_state, static_cast(*iter++), codepoint)) == S_STRT) { - result += static_cast(codepoint); - codepoint = 0; - } - else if (utf8_state == S_RJCT) { -#ifdef GHC_RAISE_UNICODE_ERRORS - throw filesystem_error("Illegal byte sequence for unicode character.", utf8String, std::make_error_code(std::errc::illegal_byte_sequence)); -#else - result += static_cast(0xfffd); - utf8_state = S_STRT; - codepoint = 0; -#endif - } - } - if (utf8_state) { -#ifdef GHC_RAISE_UNICODE_ERRORS - throw filesystem_error("Illegal byte sequence for unicode character.", utf8String, std::make_error_code(std::errc::illegal_byte_sequence)); -#else - result += static_cast(0xfffd); -#endif - } - return result; -} - -template -inline StringType fromUtf8(const charT (&utf8String)[N]) -{ -#ifdef GHC_WITH_STRING_VIEW - return fromUtf8(basic_string_view(utf8String, N - 1)); -#else - return fromUtf8(std::basic_string(utf8String, N - 1)); -#endif -} - -template ::value && (sizeof(typename strT::value_type) == 1), int>::type size = 1> -inline std::string toUtf8(const strT& unicodeString) -{ - return std::string(unicodeString.begin(), unicodeString.end()); -} - -template ::value && (sizeof(typename strT::value_type) == 2), int>::type size = 2> -inline std::string toUtf8(const strT& unicodeString) -{ - std::string result; - for (auto iter = unicodeString.begin(); iter != unicodeString.end(); ++iter) { - char32_t c = *iter; - if (is_surrogate(c)) { - ++iter; - if (iter != unicodeString.end() && is_high_surrogate(c) && is_low_surrogate(*iter)) { - appendUTF8(result, (char32_t(c) << 10) + *iter - 0x35fdc00); - } - else { -#ifdef GHC_RAISE_UNICODE_ERRORS - throw filesystem_error("Illegal code point for unicode character.", result, std::make_error_code(std::errc::illegal_byte_sequence)); -#else - appendUTF8(result, 0xfffd); - if (iter == unicodeString.end()) { - break; - } -#endif - } - } - else { - appendUTF8(result, c); - } - } - return result; -} - -template ::value && (sizeof(typename strT::value_type) == 4), int>::type size = 4> -inline std::string toUtf8(const strT& unicodeString) -{ - std::string result; - for (auto c : unicodeString) { - appendUTF8(result, static_cast(c)); - } - return result; -} - -template -inline std::string toUtf8(const charT* unicodeString) -{ -#ifdef GHC_WITH_STRING_VIEW - return toUtf8(basic_string_view>(unicodeString)); -#else - return toUtf8(std::basic_string>(unicodeString)); -#endif -} - -#ifdef GHC_USE_WCHAR_T -template ::value && (sizeof(typename WString::value_type) == 2) && (sizeof(typename StringType::value_type) == 1), bool>::type = false> -inline StringType fromWChar(const WString& wString, const typename StringType::allocator_type& alloc = typename StringType::allocator_type()) -{ - auto temp = toUtf8(wString); - return StringType(temp.begin(), temp.end(), alloc); -} - -template ::value && (sizeof(typename WString::value_type) == 2) && (sizeof(typename StringType::value_type) == 2), bool>::type = false> -inline StringType fromWChar(const WString& wString, const typename StringType::allocator_type& alloc = typename StringType::allocator_type()) -{ - return StringType(wString.begin(), wString.end(), alloc); -} - -template ::value && (sizeof(typename WString::value_type) == 2) && (sizeof(typename StringType::value_type) == 4), bool>::type = false> -inline StringType fromWChar(const WString& wString, const typename StringType::allocator_type& alloc = typename StringType::allocator_type()) -{ - auto temp = toUtf8(wString); - return fromUtf8(temp, alloc); -} - -template ::value && (sizeof(typename strT::value_type) == 1), bool>::type = false> -inline std::wstring toWChar(const strT& unicodeString) -{ - return fromUtf8(unicodeString); -} - -template ::value && (sizeof(typename strT::value_type) == 2), bool>::type = false> -inline std::wstring toWChar(const strT& unicodeString) -{ - return std::wstring(unicodeString.begin(), unicodeString.end()); -} - -template ::value && (sizeof(typename strT::value_type) == 4), bool>::type = false> -inline std::wstring toWChar(const strT& unicodeString) -{ - auto temp = toUtf8(unicodeString); - return fromUtf8(temp); -} - -template -inline std::wstring toWChar(const charT* unicodeString) -{ -#ifdef GHC_WITH_STRING_VIEW - return toWChar(basic_string_view>(unicodeString)); -#else - return toWChar(std::basic_string>(unicodeString)); -#endif -} -#endif // GHC_USE_WCHAR_T - -} // namespace detail - -#ifdef GHC_EXPAND_IMPL - -namespace detail { - -template ::value, bool>::type = true> -GHC_INLINE bool startsWith(const strT& what, const strT& with) -{ - return with.length() <= what.length() && equal(with.begin(), with.end(), what.begin()); -} - -template ::value, bool>::type = true> -GHC_INLINE bool endsWith(const strT& what, const strT& with) -{ - return with.length() <= what.length() && what.compare(what.length() - with.length(), with.size(), with) == 0; -} - -} // namespace detail - -GHC_INLINE void path::check_long_path() -{ -#if defined(GHC_OS_WINDOWS) && defined(GHC_WIN_AUTO_PREFIX_LONG_PATH) - if (is_absolute() && _path.length() >= MAX_PATH - 12 && !detail::startsWith(_path, impl_string_type(GHC_PLATFORM_LITERAL("\\\\?\\")))) { - postprocess_path_with_format(native_format); - } -#endif -} - -GHC_INLINE void path::postprocess_path_with_format(path::format fmt) -{ -#ifdef GHC_RAISE_UNICODE_ERRORS - if (!detail::validUtf8(_path)) { - path t; - t._path = _path; - throw filesystem_error("Illegal byte sequence for unicode character.", t, std::make_error_code(std::errc::illegal_byte_sequence)); - } -#endif - switch (fmt) { -#ifdef GHC_OS_WINDOWS - case path::native_format: - case path::auto_format: - case path::generic_format: - for (auto& c : _path) { - if (c == generic_separator) { - c = preferred_separator; - } - } -#ifdef GHC_WIN_AUTO_PREFIX_LONG_PATH - if (is_absolute() && _path.length() >= MAX_PATH - 12 && !detail::startsWith(_path, impl_string_type(GHC_PLATFORM_LITERAL("\\\\?\\")))) { - _path = GHC_PLATFORM_LITERAL("\\\\?\\") + _path; - } -#endif - handle_prefixes(); - break; -#else - case path::auto_format: - case path::native_format: - case path::generic_format: - // nothing to do - break; -#endif - } - if (_path.length() > _prefixLength + 2 && _path[_prefixLength] == preferred_separator && _path[_prefixLength + 1] == preferred_separator && _path[_prefixLength + 2] != preferred_separator) { - impl_string_type::iterator new_end = std::unique(_path.begin() + static_cast(_prefixLength) + 2, _path.end(), [](path::value_type lhs, path::value_type rhs) { return lhs == rhs && lhs == preferred_separator; }); - _path.erase(new_end, _path.end()); - } - else { - impl_string_type::iterator new_end = std::unique(_path.begin() + static_cast(_prefixLength), _path.end(), [](path::value_type lhs, path::value_type rhs) { return lhs == rhs && lhs == preferred_separator; }); - _path.erase(new_end, _path.end()); - } -} - -#endif // GHC_EXPAND_IMPL - -template -inline path::path(const Source& source, format fmt) -#ifdef GHC_USE_WCHAR_T - : _path(detail::toWChar(source)) -#else - : _path(detail::toUtf8(source)) -#endif -{ - postprocess_path_with_format(fmt); -} - -template -inline path u8path(const Source& source) -{ - return path(source); -} -template -inline path u8path(InputIterator first, InputIterator last) -{ - return path(first, last); -} - -template -inline path::path(InputIterator first, InputIterator last, format fmt) - : path(std::basic_string::value_type>(first, last), fmt) -{ - // delegated -} - -#ifdef GHC_EXPAND_IMPL - -namespace detail { - -GHC_INLINE bool equals_simple_insensitive(const path::value_type* str1, const path::value_type* str2) -{ -#ifdef GHC_OS_WINDOWS -#ifdef __GNUC__ - while (::tolower((unsigned char)*str1) == ::tolower((unsigned char)*str2++)) { - if (*str1++ == 0) - return true; - } - return false; -#else // __GNUC__ -#ifdef GHC_USE_WCHAR_T - return 0 == ::_wcsicmp(str1, str2); -#else // GHC_USE_WCHAR_T - return 0 == ::_stricmp(str1, str2); -#endif // GHC_USE_WCHAR_T -#endif // __GNUC__ -#else // GHC_OS_WINDOWS - return 0 == ::strcasecmp(str1, str2); -#endif // GHC_OS_WINDOWS -} - -GHC_INLINE int compare_simple_insensitive(const path::value_type* str1, size_t len1, const path::value_type* str2, size_t len2) -{ - while (len1 > 0 && len2 > 0 && ::tolower(static_cast(*str1)) == ::tolower(static_cast(*str2))) { - --len1; - --len2; - ++str1; - ++str2; - } - if (len1 && len2) { - return *str1 < *str2 ? -1 : 1; - } - if (len1 == 0 && len2 == 0) { - return 0; - } - return len1 == 0 ? -1 : 1; -} - -GHC_INLINE const char* strerror_adapter(char* gnu, char*) -{ - return gnu; -} - -GHC_INLINE const char* strerror_adapter(int posix, char* buffer) -{ - if (posix) { - return "Error in strerror_r!"; - } - return buffer; -} - -template -GHC_INLINE std::string systemErrorText(ErrorNumber code = 0) -{ -#if defined(GHC_OS_WINDOWS) - LPVOID msgBuf; - DWORD dw = code ? static_cast(code) : ::GetLastError(); - FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, dw, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPWSTR)&msgBuf, 0, NULL); - std::string msg = toUtf8(std::wstring((LPWSTR)msgBuf)); - LocalFree(msgBuf); - return msg; -#else - char buffer[512]; - return strerror_adapter(strerror_r(code ? code : errno, buffer, sizeof(buffer)), buffer); -#endif -} - -#ifdef GHC_OS_WINDOWS -using CreateSymbolicLinkW_fp = BOOLEAN(WINAPI*)(LPCWSTR, LPCWSTR, DWORD); -using CreateHardLinkW_fp = BOOLEAN(WINAPI*)(LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES); - -GHC_INLINE void create_symlink(const path& target_name, const path& new_symlink, bool to_directory, std::error_code& ec) -{ - std::error_code tec; - auto fs = status(target_name, tec); - if ((fs.type() == file_type::directory && !to_directory) || (fs.type() == file_type::regular && to_directory)) { - ec = detail::make_error_code(detail::portable_error::not_supported); - return; - } -#if defined(__GNUC__) && __GNUC__ >= 8 -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wcast-function-type" -#endif - static CreateSymbolicLinkW_fp api_call = reinterpret_cast(GetProcAddress(GetModuleHandleW(L"kernel32.dll"), "CreateSymbolicLinkW")); -#if defined(__GNUC__) && __GNUC__ >= 8 -#pragma GCC diagnostic pop -#endif - if (api_call) { - if (api_call(GHC_NATIVEWP(new_symlink), GHC_NATIVEWP(target_name), to_directory ? 1 : 0) == 0) { - auto result = ::GetLastError(); - if (result == ERROR_PRIVILEGE_NOT_HELD && api_call(GHC_NATIVEWP(new_symlink), GHC_NATIVEWP(target_name), to_directory ? 3 : 2) != 0) { - return; - } - ec = detail::make_system_error(result); - } - } - else { - ec = detail::make_system_error(ERROR_NOT_SUPPORTED); - } -} - -GHC_INLINE void create_hardlink(const path& target_name, const path& new_hardlink, std::error_code& ec) -{ -#if defined(__GNUC__) && __GNUC__ >= 8 -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wcast-function-type" -#endif - static CreateHardLinkW_fp api_call = reinterpret_cast(GetProcAddress(GetModuleHandleW(L"kernel32.dll"), "CreateHardLinkW")); -#if defined(__GNUC__) && __GNUC__ >= 8 -#pragma GCC diagnostic pop -#endif - if (api_call) { - if (api_call(GHC_NATIVEWP(new_hardlink), GHC_NATIVEWP(target_name), NULL) == 0) { - ec = detail::make_system_error(); - } - } - else { - ec = detail::make_system_error(ERROR_NOT_SUPPORTED); - } -} - -GHC_INLINE path getFullPathName(const wchar_t* p, std::error_code& ec) -{ - ULONG size = ::GetFullPathNameW(p, 0, 0, 0); - if (size) { - std::vector buf(size, 0); - ULONG s2 = GetFullPathNameW(p, size, buf.data(), nullptr); - if (s2 && s2 < size) { - return path(std::wstring(buf.data(), s2)); - } - } - ec = detail::make_system_error(); - return path(); -} - -#else -GHC_INLINE void create_symlink(const path& target_name, const path& new_symlink, bool, std::error_code& ec) -{ - if (::symlink(target_name.c_str(), new_symlink.c_str()) != 0) { - ec = detail::make_system_error(); - } -} - -#ifndef GHC_OS_WEB -GHC_INLINE void create_hardlink(const path& target_name, const path& new_hardlink, std::error_code& ec) -{ - if (::link(target_name.c_str(), new_hardlink.c_str()) != 0) { - ec = detail::make_system_error(); - } -} -#endif -#endif - -template -GHC_INLINE file_status file_status_from_st_mode(T mode) -{ -#ifdef GHC_OS_WINDOWS - file_type ft = file_type::unknown; - if ((mode & _S_IFDIR) == _S_IFDIR) { - ft = file_type::directory; - } - else if ((mode & _S_IFREG) == _S_IFREG) { - ft = file_type::regular; - } - else if ((mode & _S_IFCHR) == _S_IFCHR) { - ft = file_type::character; - } - perms prms = static_cast(mode & 0xfff); - return file_status(ft, prms); -#else - file_type ft = file_type::unknown; - if (S_ISDIR(mode)) { - ft = file_type::directory; - } - else if (S_ISREG(mode)) { - ft = file_type::regular; - } - else if (S_ISCHR(mode)) { - ft = file_type::character; - } - else if (S_ISBLK(mode)) { - ft = file_type::block; - } - else if (S_ISFIFO(mode)) { - ft = file_type::fifo; - } - else if (S_ISLNK(mode)) { - ft = file_type::symlink; - } - else if (S_ISSOCK(mode)) { - ft = file_type::socket; - } - perms prms = static_cast(mode & 0xfff); - return file_status(ft, prms); -#endif -} - -#ifdef GHC_OS_WINDOWS -#ifndef REPARSE_DATA_BUFFER_HEADER_SIZE -typedef struct _REPARSE_DATA_BUFFER -{ - ULONG ReparseTag; - USHORT ReparseDataLength; - USHORT Reserved; - union - { - struct - { - USHORT SubstituteNameOffset; - USHORT SubstituteNameLength; - USHORT PrintNameOffset; - USHORT PrintNameLength; - ULONG Flags; - WCHAR PathBuffer[1]; - } SymbolicLinkReparseBuffer; - struct - { - USHORT SubstituteNameOffset; - USHORT SubstituteNameLength; - USHORT PrintNameOffset; - USHORT PrintNameLength; - WCHAR PathBuffer[1]; - } MountPointReparseBuffer; - struct - { - UCHAR DataBuffer[1]; - } GenericReparseBuffer; - } DUMMYUNIONNAME; -} REPARSE_DATA_BUFFER; -#ifndef MAXIMUM_REPARSE_DATA_BUFFER_SIZE -#define MAXIMUM_REPARSE_DATA_BUFFER_SIZE (16 * 1024) -#endif -#endif - -GHC_INLINE std::shared_ptr getReparseData(const path& p, std::error_code& ec) -{ - std::shared_ptr file(CreateFileW(GHC_NATIVEWP(p), 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, 0, OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, 0), CloseHandle); - if (file.get() == INVALID_HANDLE_VALUE) { - ec = detail::make_system_error(); - return nullptr; - } - - std::shared_ptr reparseData((REPARSE_DATA_BUFFER*)std::calloc(1, MAXIMUM_REPARSE_DATA_BUFFER_SIZE), std::free); - ULONG bufferUsed; - if (DeviceIoControl(file.get(), FSCTL_GET_REPARSE_POINT, 0, 0, reparseData.get(), MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &bufferUsed, 0)) { - return reparseData; - } - else { - ec = detail::make_system_error(); - } - return nullptr; -} -#endif - -GHC_INLINE path resolveSymlink(const path& p, std::error_code& ec) -{ -#ifdef GHC_OS_WINDOWS - path result; - auto reparseData = detail::getReparseData(p, ec); - if (!ec) { - if (reparseData && IsReparseTagMicrosoft(reparseData->ReparseTag)) { - switch (reparseData->ReparseTag) { - case IO_REPARSE_TAG_SYMLINK: { - auto printName = std::wstring(&reparseData->SymbolicLinkReparseBuffer.PathBuffer[reparseData->SymbolicLinkReparseBuffer.PrintNameOffset / sizeof(WCHAR)], reparseData->SymbolicLinkReparseBuffer.PrintNameLength / sizeof(WCHAR)); - auto substituteName = - std::wstring(&reparseData->SymbolicLinkReparseBuffer.PathBuffer[reparseData->SymbolicLinkReparseBuffer.SubstituteNameOffset / sizeof(WCHAR)], reparseData->SymbolicLinkReparseBuffer.SubstituteNameLength / sizeof(WCHAR)); - if (detail::endsWith(substituteName, printName) && detail::startsWith(substituteName, std::wstring(L"\\??\\"))) { - result = printName; - } - else { - result = substituteName; - } - if (reparseData->SymbolicLinkReparseBuffer.Flags & 0x1 /*SYMLINK_FLAG_RELATIVE*/) { - result = p.parent_path() / result; - } - break; - } - case IO_REPARSE_TAG_MOUNT_POINT: - result = detail::getFullPathName(GHC_NATIVEWP(p), ec); - //result = std::wstring(&reparseData->MountPointReparseBuffer.PathBuffer[reparseData->MountPointReparseBuffer.SubstituteNameOffset / sizeof(WCHAR)], reparseData->MountPointReparseBuffer.SubstituteNameLength / sizeof(WCHAR)); - break; - default: - break; - } - } - } - return result; -#else - size_t bufferSize = 256; - while (true) { - std::vector buffer(bufferSize, static_cast(0)); - auto rc = ::readlink(p.c_str(), buffer.data(), buffer.size()); - if (rc < 0) { - ec = detail::make_system_error(); - return path(); - } - else if (rc < static_cast(bufferSize)) { - return path(std::string(buffer.data(), static_cast(rc))); - } - bufferSize *= 2; - } - return path(); -#endif -} - -#ifdef GHC_OS_WINDOWS -GHC_INLINE time_t timeFromFILETIME(const FILETIME& ft) -{ - ULARGE_INTEGER ull; - ull.LowPart = ft.dwLowDateTime; - ull.HighPart = ft.dwHighDateTime; - return static_cast(ull.QuadPart / 10000000ULL - 11644473600ULL); -} - -GHC_INLINE void timeToFILETIME(time_t t, FILETIME& ft) -{ - LONGLONG ll; - ll = Int32x32To64(t, 10000000) + 116444736000000000; - ft.dwLowDateTime = static_cast(ll); - ft.dwHighDateTime = static_cast(ll >> 32); -} - -template -GHC_INLINE uintmax_t hard_links_from_INFO(const INFO* info) -{ - return static_cast(-1); -} - -template <> -GHC_INLINE uintmax_t hard_links_from_INFO(const BY_HANDLE_FILE_INFORMATION* info) -{ - return info->nNumberOfLinks; -} - -template -GHC_INLINE bool is_symlink_from_INFO(const path &p, const INFO* info, std::error_code& ec) -{ - if ((info->dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) { - auto reparseData = detail::getReparseData(p, ec); - if (!ec && reparseData && IsReparseTagMicrosoft(reparseData->ReparseTag) && reparseData->ReparseTag == IO_REPARSE_TAG_SYMLINK) { - return true; - } - } - return false; -} - -template <> -GHC_INLINE bool is_symlink_from_INFO(const path &, const WIN32_FIND_DATAW* info, std::error_code&) -{ - // dwReserved0 is undefined unless dwFileAttributes includes the - // FILE_ATTRIBUTE_REPARSE_POINT attribute according to microsoft - // documentation. In practice, dwReserved0 is not reset which - // causes it to report the incorrect symlink status. - // Note that microsoft documentation does not say whether there is - // a null value for dwReserved0, so we test for symlink directly - // instead of returning the tag which requires returning a null - // value for non-reparse-point files. - return (info->dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) && info->dwReserved0 == IO_REPARSE_TAG_SYMLINK; -} - -template -GHC_INLINE file_status status_from_INFO(const path& p, const INFO* info, std::error_code& ec, uintmax_t* sz = nullptr, time_t* lwt = nullptr) -{ - file_type ft = file_type::unknown; - if (is_symlink_from_INFO(p, info, ec)) { - ft = file_type::symlink; - } - else if ((info->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { - ft = file_type::directory; - } - else { - ft = file_type::regular; - } - perms prms = perms::owner_read | perms::group_read | perms::others_read; - if (!(info->dwFileAttributes & FILE_ATTRIBUTE_READONLY)) { - prms = prms | perms::owner_write | perms::group_write | perms::others_write; - } - if (has_executable_extension(p)) { - prms = prms | perms::owner_exec | perms::group_exec | perms::others_exec; - } - if (sz) { - *sz = static_cast(info->nFileSizeHigh) << (sizeof(info->nFileSizeHigh) * 8) | info->nFileSizeLow; - } - if (lwt) { - *lwt = detail::timeFromFILETIME(info->ftLastWriteTime); - } - return file_status(ft, prms); -} - -#endif - -GHC_INLINE bool is_not_found_error(std::error_code& ec) -{ -#ifdef GHC_OS_WINDOWS - return ec.value() == ERROR_FILE_NOT_FOUND || ec.value() == ERROR_PATH_NOT_FOUND || ec.value() == ERROR_INVALID_NAME; -#else - return ec.value() == ENOENT || ec.value() == ENOTDIR; -#endif -} - -GHC_INLINE file_status symlink_status_ex(const path& p, std::error_code& ec, uintmax_t* sz = nullptr, uintmax_t* nhl = nullptr, time_t* lwt = nullptr) noexcept -{ -#ifdef GHC_OS_WINDOWS - file_status fs; - WIN32_FILE_ATTRIBUTE_DATA attr; - if (!GetFileAttributesExW(GHC_NATIVEWP(p), GetFileExInfoStandard, &attr)) { - ec = detail::make_system_error(); - } - else { - ec.clear(); - fs = detail::status_from_INFO(p, &attr, ec, sz, lwt); - if (nhl) { - *nhl = 0; - } - } - if (detail::is_not_found_error(ec)) { - return file_status(file_type::not_found); - } - return ec ? file_status(file_type::none) : fs; -#else - (void)sz; - (void)nhl; - (void)lwt; - struct ::stat fs; - auto result = ::lstat(p.c_str(), &fs); - if (result == 0) { - ec.clear(); - file_status f_s = detail::file_status_from_st_mode(fs.st_mode); - return f_s; - } - ec = detail::make_system_error(); - if (detail::is_not_found_error(ec)) { - return file_status(file_type::not_found, perms::unknown); - } - return file_status(file_type::none); -#endif -} - -GHC_INLINE file_status status_ex(const path& p, std::error_code& ec, file_status* sls = nullptr, uintmax_t* sz = nullptr, uintmax_t* nhl = nullptr, time_t* lwt = nullptr, int recurse_count = 0) noexcept -{ - ec.clear(); -#ifdef GHC_OS_WINDOWS - if (recurse_count > 16) { - ec = detail::make_system_error(0x2A9 /*ERROR_STOPPED_ON_SYMLINK*/); - return file_status(file_type::unknown); - } - WIN32_FILE_ATTRIBUTE_DATA attr; - if (!::GetFileAttributesExW(GHC_NATIVEWP(p), GetFileExInfoStandard, &attr)) { - ec = detail::make_system_error(); - } - else if (attr.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) { - auto reparseData = detail::getReparseData(p, ec); - if (!ec && reparseData && IsReparseTagMicrosoft(reparseData->ReparseTag) && reparseData->ReparseTag == IO_REPARSE_TAG_SYMLINK) { - path target = resolveSymlink(p, ec); - file_status result; - if (!ec && !target.empty()) { - if (sls) { - *sls = status_from_INFO(p, &attr, ec); - } - return detail::status_ex(target, ec, nullptr, sz, nhl, lwt, recurse_count + 1); - } - return file_status(file_type::unknown); - } - } - if (ec) { - if (detail::is_not_found_error(ec)) { - return file_status(file_type::not_found); - } - return file_status(file_type::none); - } - if (nhl) { - *nhl = 0; - } - return detail::status_from_INFO(p, &attr, ec, sz, lwt); -#else - (void)recurse_count; - struct ::stat st; - auto result = ::lstat(p.c_str(), &st); - if (result == 0) { - ec.clear(); - file_status fs = detail::file_status_from_st_mode(st.st_mode); - if (sls) { - *sls = fs; - } - if (fs.type() == file_type::symlink) { - result = ::stat(p.c_str(), &st); - if (result == 0) { - fs = detail::file_status_from_st_mode(st.st_mode); - } - else { - ec = detail::make_system_error(); - if (detail::is_not_found_error(ec)) { - return file_status(file_type::not_found, perms::unknown); - } - return file_status(file_type::none); - } - } - if (sz) { - *sz = static_cast(st.st_size); - } - if (nhl) { - *nhl = st.st_nlink; - } - if (lwt) { - *lwt = st.st_mtime; - } - return fs; - } - else { - ec = detail::make_system_error(); - if (detail::is_not_found_error(ec)) { - return file_status(file_type::not_found, perms::unknown); - } - return file_status(file_type::none); - } -#endif -} - -} // namespace detail - -GHC_INLINE u8arguments::u8arguments(int& argc, char**& argv) - : _argc(argc) - , _argv(argv) - , _refargc(argc) - , _refargv(argv) - , _isvalid(false) -{ -#ifdef GHC_OS_WINDOWS - LPWSTR* p; - p = ::CommandLineToArgvW(::GetCommandLineW(), &argc); - _args.reserve(static_cast(argc)); - _argp.reserve(static_cast(argc)); - for (size_t i = 0; i < static_cast(argc); ++i) { - _args.push_back(detail::toUtf8(std::wstring(p[i]))); - _argp.push_back((char*)_args[i].data()); - } - argv = _argp.data(); - ::LocalFree(p); - _isvalid = true; -#else - std::setlocale(LC_ALL, ""); -#if defined(__ANDROID__) && __ANDROID_API__ < 26 - _isvalid = true; -#else - if (detail::equals_simple_insensitive(::nl_langinfo(CODESET), "UTF-8")) { - _isvalid = true; - } -#endif -#endif -} - -//----------------------------------------------------------------------------- -// [fs.path.construct] constructors and destructor - -GHC_INLINE path::path() noexcept {} - -GHC_INLINE path::path(const path& p) - : _path(p._path) -#if defined(GHC_OS_WINDOWS) && defined(GHC_WIN_AUTO_PREFIX_LONG_PATH) - , _prefixLength(p._prefixLength) -#endif -{ -} - -GHC_INLINE path::path(path&& p) noexcept - : _path(std::move(p._path)) -#if defined(GHC_OS_WINDOWS) && defined(GHC_WIN_AUTO_PREFIX_LONG_PATH) - , _prefixLength(p._prefixLength) -#endif -{ -} - -GHC_INLINE path::path(string_type&& source, format fmt) - : _path(std::move(source)) -{ - postprocess_path_with_format(fmt); -} - -#endif // GHC_EXPAND_IMPL - -#ifdef GHC_WITH_EXCEPTIONS -template -inline path::path(const Source& source, const std::locale& loc, format fmt) - : path(source, fmt) -{ - std::string locName = loc.name(); - if (!(locName.length() >= 5 && (locName.substr(locName.length() - 5) == "UTF-8" || locName.substr(locName.length() - 5) == "utf-8"))) { - throw filesystem_error("This implementation only supports UTF-8 locales!", path(_path), detail::make_error_code(detail::portable_error::not_supported)); - } -} - -template -inline path::path(InputIterator first, InputIterator last, const std::locale& loc, format fmt) - : path(std::basic_string::value_type>(first, last), fmt) -{ - std::string locName = loc.name(); - if (!(locName.length() >= 5 && (locName.substr(locName.length() - 5) == "UTF-8" || locName.substr(locName.length() - 5) == "utf-8"))) { - throw filesystem_error("This implementation only supports UTF-8 locales!", path(_path), detail::make_error_code(detail::portable_error::not_supported)); - } -} -#endif - -#ifdef GHC_EXPAND_IMPL - -GHC_INLINE path::~path() {} - -//----------------------------------------------------------------------------- -// [fs.path.assign] assignments - -GHC_INLINE path& path::operator=(const path& p) -{ - _path = p._path; -#if defined(GHC_OS_WINDOWS) && defined(GHC_WIN_AUTO_PREFIX_LONG_PATH) - _prefixLength = p._prefixLength; -#endif - return *this; -} - -GHC_INLINE path& path::operator=(path&& p) noexcept -{ - _path = std::move(p._path); -#if defined(GHC_OS_WINDOWS) && defined(GHC_WIN_AUTO_PREFIX_LONG_PATH) - _prefixLength = p._prefixLength; -#endif - return *this; -} - -GHC_INLINE path& path::operator=(path::string_type&& source) -{ - return assign(source); -} - -GHC_INLINE path& path::assign(path::string_type&& source) -{ - _path = std::move(source); - postprocess_path_with_format(native_format); - return *this; -} - -#endif // GHC_EXPAND_IMPL - -template -inline path& path::operator=(const Source& source) -{ - return assign(source); -} - -template -inline path& path::assign(const Source& source) -{ -#ifdef GHC_USE_WCHAR_T - _path.assign(detail::toWChar(source)); -#else - _path.assign(detail::toUtf8(source)); -#endif - postprocess_path_with_format(native_format); - return *this; -} - -template <> -inline path& path::assign(const path& source) -{ - _path = source._path; -#if defined(GHC_OS_WINDOWS) && defined(GHC_WIN_AUTO_PREFIX_LONG_PATH) - _prefixLength = source._prefixLength; -#endif - return *this; -} - -template -inline path& path::assign(InputIterator first, InputIterator last) -{ - _path.assign(first, last); - postprocess_path_with_format(native_format); - return *this; -} - -#ifdef GHC_EXPAND_IMPL - -//----------------------------------------------------------------------------- -// [fs.path.append] appends - -GHC_INLINE path& path::operator/=(const path& p) -{ - if (p.empty()) { - // was: if ((!has_root_directory() && is_absolute()) || has_filename()) - if (!_path.empty() && _path[_path.length() - 1] != preferred_separator && _path[_path.length() - 1] != ':') { - _path += preferred_separator; - } - return *this; - } - if ((p.is_absolute() && (_path != root_name()._path || p._path != "/")) || (p.has_root_name() && p.root_name() != root_name())) { - assign(p); - return *this; - } - if (p.has_root_directory()) { - assign(root_name()); - } - else if ((!has_root_directory() && is_absolute()) || has_filename()) { - _path += preferred_separator; - } - auto iter = p.begin(); - bool first = true; - if (p.has_root_name()) { - ++iter; - } - while (iter != p.end()) { - if (!first && !(!_path.empty() && _path[_path.length() - 1] == preferred_separator)) { - _path += preferred_separator; - } - first = false; - _path += (*iter++).native(); - } - check_long_path(); - return *this; -} - -GHC_INLINE void path::append_name(const value_type* name) -{ - if (_path.empty()) { - this->operator/=(path(name)); - } - else { - if (_path.back() != path::preferred_separator) { - _path.push_back(path::preferred_separator); - } - _path += name; - check_long_path(); - } -} - -#endif // GHC_EXPAND_IMPL - -template -inline path& path::operator/=(const Source& source) -{ - return append(source); -} - -template -inline path& path::append(const Source& source) -{ - return this->operator/=(path(source)); -} - -template <> -inline path& path::append(const path& p) -{ - return this->operator/=(p); -} - -template -inline path& path::append(InputIterator first, InputIterator last) -{ - std::basic_string::value_type> part(first, last); - return append(part); -} - -#ifdef GHC_EXPAND_IMPL - -//----------------------------------------------------------------------------- -// [fs.path.concat] concatenation - -GHC_INLINE path& path::operator+=(const path& x) -{ - return concat(x._path); -} - -GHC_INLINE path& path::operator+=(const string_type& x) -{ - return concat(x); -} - -#ifdef GHC_WITH_STRING_VIEW -GHC_INLINE path& path::operator+=(basic_string_view x) -{ - return concat(x); -} -#endif - -GHC_INLINE path& path::operator+=(const value_type* x) -{ -#ifdef GHC_WITH_STRING_VIEW - basic_string_view part(x); -#else - string_type part(x); -#endif - return concat(part); -} - -GHC_INLINE path& path::operator+=(value_type x) -{ -#ifdef GHC_OS_WINDOWS - if (x == generic_separator) { - x = preferred_separator; - } -#endif - if (_path.empty() || _path.back() != preferred_separator) { - _path += x; - } - check_long_path(); - return *this; -} - -#endif // GHC_EXPAND_IMPL - -template -inline path::path_from_string& path::operator+=(const Source& x) -{ - return concat(x); -} - -template -inline path::path_type_EcharT& path::operator+=(EcharT x) -{ -#ifdef GHC_WITH_STRING_VIEW - basic_string_view part(&x, 1); -#else - std::basic_string part(1, x); -#endif - concat(part); - return *this; -} - -template -inline path& path::concat(const Source& x) -{ - path p(x); - _path += p._path; - postprocess_path_with_format(native_format); - return *this; -} -template -inline path& path::concat(InputIterator first, InputIterator last) -{ - _path.append(first, last); - postprocess_path_with_format(native_format); - return *this; -} - -#ifdef GHC_EXPAND_IMPL - -//----------------------------------------------------------------------------- -// [fs.path.modifiers] modifiers -GHC_INLINE void path::clear() noexcept -{ - _path.clear(); -#if defined(GHC_OS_WINDOWS) && defined(GHC_WIN_AUTO_PREFIX_LONG_PATH) - _prefixLength = 0; -#endif -} - -GHC_INLINE path& path::make_preferred() -{ - // as this filesystem implementation only uses generic_format - // internally, this must be a no-op - return *this; -} - -GHC_INLINE path& path::remove_filename() -{ - if (has_filename()) { - _path.erase(_path.size() - filename()._path.size()); - } - return *this; -} - -GHC_INLINE path& path::replace_filename(const path& replacement) -{ - remove_filename(); - return append(replacement); -} - -GHC_INLINE path& path::replace_extension(const path& replacement) -{ - if (has_extension()) { - _path.erase(_path.size() - extension()._path.size()); - } - if (!replacement.empty() && replacement._path[0] != '.') { - _path += '.'; - } - return concat(replacement); -} - -GHC_INLINE void path::swap(path& rhs) noexcept -{ - _path.swap(rhs._path); -#if defined(GHC_OS_WINDOWS) && defined(GHC_WIN_AUTO_PREFIX_LONG_PATH) - std::swap(_prefixLength, rhs._prefixLength); -#endif -} - -//----------------------------------------------------------------------------- -// [fs.path.native.obs] native format observers -GHC_INLINE const path::string_type& path::native() const noexcept -{ - return _path; -} - -GHC_INLINE const path::value_type* path::c_str() const noexcept -{ - return native().c_str(); -} - -GHC_INLINE path::operator path::string_type() const -{ - return native(); -} - -#endif // GHC_EXPAND_IMPL - -template -inline std::basic_string path::string(const Allocator& a) const -{ -#ifdef GHC_USE_WCHAR_T - return detail::fromWChar>(_path, a); -#else - return detail::fromUtf8>(_path, a); -#endif -} - -#ifdef GHC_EXPAND_IMPL - -GHC_INLINE std::string path::string() const -{ -#ifdef GHC_USE_WCHAR_T - return detail::toUtf8(native()); -#else - return native(); -#endif -} - -GHC_INLINE std::wstring path::wstring() const -{ -#ifdef GHC_USE_WCHAR_T - return native(); -#else - return detail::fromUtf8(native()); -#endif -} - -#if defined(__cpp_lib_char8_t) && !defined(GHC_FILESYSTEM_ENFORCE_CPP17_API) -GHC_INLINE std::u8string path::u8string() const -{ -#ifdef GHC_USE_WCHAR_T - return std::u8string(reinterpret_cast(detail::toUtf8(native()).c_str())); -#else - return std::u8string(reinterpret_cast(c_str())); -#endif -} -#else -GHC_INLINE std::string path::u8string() const -{ -#ifdef GHC_USE_WCHAR_T - return detail::toUtf8(native()); -#else - return native(); -#endif -} -#endif - -GHC_INLINE std::u16string path::u16string() const -{ - // TODO: optimize - return detail::fromUtf8(string()); -} - -GHC_INLINE std::u32string path::u32string() const -{ - // TODO: optimize - return detail::fromUtf8(string()); -} - -#endif // GHC_EXPAND_IMPL - -//----------------------------------------------------------------------------- -// [fs.path.generic.obs] generic format observers -template -inline std::basic_string path::generic_string(const Allocator& a) const -{ -#ifdef GHC_OS_WINDOWS -#ifdef GHC_USE_WCHAR_T - auto result = detail::fromWChar, path::string_type>(_path, a); -#else - auto result = detail::fromUtf8>(_path, a); -#endif - for (auto& c : result) { - if (c == preferred_separator) { - c = generic_separator; - } - } - return result; -#else - return detail::fromUtf8>(_path, a); -#endif -} - -#ifdef GHC_EXPAND_IMPL - -GHC_INLINE std::string path::generic_string() const -{ -#ifdef GHC_OS_WINDOWS - return generic_string(); -#else - return _path; -#endif -} - -GHC_INLINE std::wstring path::generic_wstring() const -{ -#ifdef GHC_OS_WINDOWS - return generic_string(); -#else - return detail::fromUtf8(_path); -#endif -} // namespace filesystem - -#if defined(__cpp_lib_char8_t) && !defined(GHC_FILESYSTEM_ENFORCE_CPP17_API) -GHC_INLINE std::u8string path::generic_u8string() const -{ -#ifdef GHC_OS_WINDOWS - return generic_string(); -#else - return std::u8string(reinterpret_cast(_path.c_str())); -#endif -} -#else -GHC_INLINE std::string path::generic_u8string() const -{ -#ifdef GHC_OS_WINDOWS - return generic_string(); -#else - return _path; -#endif -} -#endif - -GHC_INLINE std::u16string path::generic_u16string() const -{ -#ifdef GHC_OS_WINDOWS - return generic_string(); -#else - return detail::fromUtf8(_path); -#endif -} - -GHC_INLINE std::u32string path::generic_u32string() const -{ -#ifdef GHC_OS_WINDOWS - return generic_string(); -#else - return detail::fromUtf8(_path); -#endif -} - -//----------------------------------------------------------------------------- -// [fs.path.compare] compare -GHC_INLINE int path::compare(const path& p) const noexcept -{ -#ifdef LWG_2936_BEHAVIOUR - auto rnl1 = root_name_length(); - auto rnl2 = p.root_name_length(); -#ifdef GHC_OS_WINDOWS - auto rnc = detail::compare_simple_insensitive(_path.c_str(), rnl1, p._path.c_str(), rnl2); -#else - auto rnc = _path.compare(0, rnl1, p._path, 0, (std::min(rnl1, rnl2))); -#endif - if (rnc) { - return rnc; - } - bool hrd1 = has_root_directory(), hrd2 = p.has_root_directory(); - if (hrd1 != hrd2) { - return hrd1 ? 1 : -1; - } - if (hrd1) { - ++rnl1; - ++rnl2; - } - auto iter1 = _path.begin() + static_cast(rnl1); - auto iter2 = p._path.begin() + static_cast(rnl2); - while (iter1 != _path.end() && iter2 != p._path.end() && *iter1 == *iter2) { - ++iter1; - ++iter2; - } - if (iter1 == _path.end()) { - return iter2 == p._path.end() ? 0 : -1; - } - if (iter2 == p._path.end()) { - return 1; - } - if (*iter1 == preferred_separator) { - return -1; - } - if (*iter2 == preferred_separator) { - return 1; - } - return *iter1 < *iter2 ? -1 : 1; -#else // LWG_2936_BEHAVIOUR -#ifdef GHC_OS_WINDOWS - auto rnl1 = root_name_length(); - auto rnl2 = p.root_name_length(); - auto rnc = detail::compare_simple_insensitive(_path.c_str(), rnl1, p._path.c_str(), rnl2); - if (rnc) { - return rnc; - } - return _path.compare(rnl1, std::string::npos, p._path, rnl2, std::string::npos); -#else - return _path.compare(p._path); -#endif -#endif -} - -GHC_INLINE int path::compare(const string_type& s) const -{ - return compare(path(s)); -} - -#ifdef GHC_WITH_STRING_VIEW -GHC_INLINE int path::compare(basic_string_view s) const -{ - return compare(path(s)); -} -#endif - -GHC_INLINE int path::compare(const value_type* s) const -{ - return compare(path(s)); -} - -//----------------------------------------------------------------------------- -// [fs.path.decompose] decomposition -#ifdef GHC_OS_WINDOWS -GHC_INLINE void path::handle_prefixes() -{ -#if defined(GHC_WIN_AUTO_PREFIX_LONG_PATH) - _prefixLength = 0; - if (_path.length() >= 6 && _path[2] == '?' && std::toupper(static_cast(_path[4])) >= 'A' && std::toupper(static_cast(_path[4])) <= 'Z' && _path[5] == ':') { - if (detail::startsWith(_path, impl_string_type(GHC_PLATFORM_LITERAL("\\\\?\\"))) || detail::startsWith(_path, impl_string_type(GHC_PLATFORM_LITERAL("\\??\\")))) { - _prefixLength = 4; - } - } -#endif // GHC_WIN_AUTO_PREFIX_LONG_PATH -} -#endif - -GHC_INLINE path::string_type::size_type path::root_name_length() const noexcept -{ -#ifdef GHC_OS_WINDOWS - if (_path.length() >= _prefixLength + 2 && std::toupper(static_cast(_path[_prefixLength])) >= 'A' && std::toupper(static_cast(_path[_prefixLength])) <= 'Z' && _path[_prefixLength + 1] == ':') { - return 2; - } -#endif - if (_path.length() > _prefixLength + 2 && _path[_prefixLength] == preferred_separator && _path[_prefixLength + 1] == preferred_separator && _path[_prefixLength + 2] != preferred_separator && std::isprint(_path[_prefixLength + 2])) { - impl_string_type::size_type pos = _path.find(preferred_separator, _prefixLength + 3); - if (pos == impl_string_type::npos) { - return _path.length(); - } - else { - return pos; - } - } - return 0; -} - -GHC_INLINE path path::root_name() const -{ - return path(_path.substr(_prefixLength, root_name_length()), native_format); -} - -GHC_INLINE path path::root_directory() const -{ - if (has_root_directory()) { - static const path _root_dir(std::string(1, preferred_separator), native_format); - return _root_dir; - } - return path(); -} - -GHC_INLINE path path::root_path() const -{ - return path(root_name().string() + root_directory().string(), native_format); -} - -GHC_INLINE path path::relative_path() const -{ - auto rootPathLen = _prefixLength + root_name_length() + (has_root_directory() ? 1 : 0); - return path(_path.substr((std::min)(rootPathLen, _path.length())), generic_format); -} - -GHC_INLINE path path::parent_path() const -{ - auto rootPathLen = _prefixLength + root_name_length() + (has_root_directory() ? 1 : 0); - if (rootPathLen < _path.length()) { - if (empty()) { - return path(); - } - else { - auto piter = end(); - auto iter = piter.decrement(_path.end()); - if (iter > _path.begin() + static_cast(rootPathLen) && *iter != preferred_separator) { - --iter; - } - return path(_path.begin(), iter, native_format); - } - } - else { - return *this; - } -} - -GHC_INLINE path path::filename() const -{ - return !has_relative_path() ? path() : path(*--end()); -} - -GHC_INLINE path path::stem() const -{ - impl_string_type fn = filename().native(); - if (fn != "." && fn != "..") { - impl_string_type::size_type pos = fn.rfind('.'); - if (pos != impl_string_type::npos && pos > 0) { - return path{fn.substr(0, pos), native_format}; - } - } - return path{fn, native_format}; -} - -GHC_INLINE path path::extension() const -{ - if (has_relative_path()) { - auto iter = end(); - const auto& fn = *--iter; - impl_string_type::size_type pos = fn._path.rfind('.'); - if (pos != std::string::npos && pos > 0) { - return path(fn._path.substr(pos), native_format); - } - } - return path(); -} - -#ifdef GHC_OS_WINDOWS -namespace detail { -GHC_INLINE bool has_executable_extension(const path& p) -{ - if (p.has_relative_path()) { - auto iter = p.end(); - const auto& fn = *--iter; - auto pos = fn._path.find_last_of('.'); - if (pos == std::string::npos || pos == 0 || fn._path.length() - pos != 3) { - return false; - } - const path::value_type* ext = fn._path.c_str() + pos + 1; - if (detail::equals_simple_insensitive(ext, GHC_PLATFORM_LITERAL("exe")) || detail::equals_simple_insensitive(ext, GHC_PLATFORM_LITERAL("cmd")) || detail::equals_simple_insensitive(ext, GHC_PLATFORM_LITERAL("bat")) || detail::equals_simple_insensitive(ext, GHC_PLATFORM_LITERAL("com"))) { - return true; - } - } - return false; -} -} // namespace detail -#endif - -//----------------------------------------------------------------------------- -// [fs.path.query] query -GHC_INLINE bool path::empty() const noexcept -{ - return _path.empty(); -} - -GHC_INLINE bool path::has_root_name() const -{ - return root_name_length() > 0; -} - -GHC_INLINE bool path::has_root_directory() const -{ - auto rootLen = _prefixLength + root_name_length(); - return (_path.length() > rootLen && _path[rootLen] == preferred_separator); -} - -GHC_INLINE bool path::has_root_path() const -{ - return has_root_name() || has_root_directory(); -} - -GHC_INLINE bool path::has_relative_path() const -{ - auto rootPathLen = _prefixLength + root_name_length() + (has_root_directory() ? 1 : 0); - return rootPathLen < _path.length(); -} - -GHC_INLINE bool path::has_parent_path() const -{ - return !parent_path().empty(); -} - -GHC_INLINE bool path::has_filename() const -{ - return has_relative_path() && !filename().empty(); -} - -GHC_INLINE bool path::has_stem() const -{ - return !stem().empty(); -} - -GHC_INLINE bool path::has_extension() const -{ - return !extension().empty(); -} - -GHC_INLINE bool path::is_absolute() const -{ -#ifdef GHC_OS_WINDOWS - return has_root_name() && has_root_directory(); -#else - return has_root_directory(); -#endif -} - -GHC_INLINE bool path::is_relative() const -{ - return !is_absolute(); -} - -//----------------------------------------------------------------------------- -// [fs.path.gen] generation -GHC_INLINE path path::lexically_normal() const -{ - path dest; - bool lastDotDot = false; - for (string_type s : *this) { - if (s == ".") { - dest /= ""; - continue; - } - else if (s == ".." && !dest.empty()) { - auto root = root_path(); - if (dest == root) { - continue; - } - else if (*(--dest.end()) != "..") { - if (dest._path.back() == preferred_separator) { - dest._path.pop_back(); - } - dest.remove_filename(); - continue; - } - } - if (!(s.empty() && lastDotDot)) { - dest /= s; - } - lastDotDot = s == ".."; - } - if (dest.empty()) { - dest = "."; - } - return dest; -} - -GHC_INLINE path path::lexically_relative(const path& base) const -{ - if (root_name() != base.root_name() || is_absolute() != base.is_absolute() || (!has_root_directory() && base.has_root_directory())) { - return path(); - } - const_iterator a = begin(), b = base.begin(); - while (a != end() && b != base.end() && *a == *b) { - ++a; - ++b; - } - if (a == end() && b == base.end()) { - return path("."); - } - int count = 0; - for (const auto& element : input_iterator_range(b, base.end())) { - if (element != "." && element != "" && element != "..") { - ++count; - } - else if (element == "..") { - --count; - } - } - if (count < 0) { - return path(); - } - path result; - for (int i = 0; i < count; ++i) { - result /= ".."; - } - for (const auto& element : input_iterator_range(a, end())) { - result /= element; - } - return result; -} - -GHC_INLINE path path::lexically_proximate(const path& base) const -{ - path result = lexically_relative(base); - return result.empty() ? *this : result; -} - -//----------------------------------------------------------------------------- -// [fs.path.itr] iterators -GHC_INLINE path::iterator::iterator() {} - -GHC_INLINE path::iterator::iterator(const path& p, const impl_string_type::const_iterator& pos) - : _first(p._path.begin()) - , _last(p._path.end()) - , _prefix(_first + static_cast(p._prefixLength)) - , _root(p.has_root_directory() ? _first + static_cast(p._prefixLength + p.root_name_length()) : _last) - , _iter(pos) -{ - if(pos != _last) { - updateCurrent(); - } -} - -GHC_INLINE path::impl_string_type::const_iterator path::iterator::increment(const path::impl_string_type::const_iterator& pos) const -{ - path::impl_string_type::const_iterator i = pos; - bool fromStart = i == _first || i == _prefix; - if (i != _last) { - if (fromStart && i == _first && _prefix > _first) { - i = _prefix; - } - else if (*i++ == preferred_separator) { - // we can only sit on a slash if it is a network name or a root - if (i != _last && *i == preferred_separator) { - if (fromStart && !(i + 1 != _last && *(i + 1) == preferred_separator)) { - // leadind double slashes detected, treat this and the - // following until a slash as one unit - i = std::find(++i, _last, preferred_separator); - } - else { - // skip redundant slashes - while (i != _last && *i == preferred_separator) { - ++i; - } - } - } - } - else { - if (fromStart && i != _last && *i == ':') { - ++i; - } - else { - i = std::find(i, _last, preferred_separator); - } - } - } - return i; -} - -GHC_INLINE path::impl_string_type::const_iterator path::iterator::decrement(const path::impl_string_type::const_iterator& pos) const -{ - path::impl_string_type::const_iterator i = pos; - if (i != _first) { - --i; - // if this is now the root slash or the trailing slash, we are done, - // else check for network name - if (i != _root && (pos != _last || *i != preferred_separator)) { -#ifdef GHC_OS_WINDOWS - static const impl_string_type seps = GHC_PLATFORM_LITERAL("\\:"); - i = std::find_first_of(std::reverse_iterator(i), std::reverse_iterator(_first), seps.begin(), seps.end()).base(); - if (i > _first && *i == ':') { - i++; - } -#else - i = std::find(std::reverse_iterator(i), std::reverse_iterator(_first), preferred_separator).base(); -#endif - // Now we have to check if this is a network name - if (i - _first == 2 && *_first == preferred_separator && *(_first + 1) == preferred_separator) { - i -= 2; - } - } - } - return i; -} - -GHC_INLINE void path::iterator::updateCurrent() -{ - if ((_iter == _last) || (_iter != _first && _iter != _last && (*_iter == preferred_separator && _iter != _root) && (_iter + 1 == _last))) { - _current.clear(); - } - else { - _current.assign(_iter, increment(_iter)); - } -} - -GHC_INLINE path::iterator& path::iterator::operator++() -{ - _iter = increment(_iter); - while (_iter != _last && // we didn't reach the end - _iter != _root && // this is not a root position - *_iter == preferred_separator && // we are on a separator - (_iter + 1) != _last // the slash is not the last char - ) { - ++_iter; - } - updateCurrent(); - return *this; -} - -GHC_INLINE path::iterator path::iterator::operator++(int) -{ - path::iterator i{*this}; - ++(*this); - return i; -} - -GHC_INLINE path::iterator& path::iterator::operator--() -{ - _iter = decrement(_iter); - updateCurrent(); - return *this; -} - -GHC_INLINE path::iterator path::iterator::operator--(int) -{ - auto i = *this; - --(*this); - return i; -} - -GHC_INLINE bool path::iterator::operator==(const path::iterator& other) const -{ - return _iter == other._iter; -} - -GHC_INLINE bool path::iterator::operator!=(const path::iterator& other) const -{ - return _iter != other._iter; -} - -GHC_INLINE path::iterator::reference path::iterator::operator*() const -{ - return _current; -} - -GHC_INLINE path::iterator::pointer path::iterator::operator->() const -{ - return &_current; -} - -GHC_INLINE path::iterator path::begin() const -{ - return iterator(*this, _path.begin()); -} - -GHC_INLINE path::iterator path::end() const -{ - return iterator(*this, _path.end()); -} - -//----------------------------------------------------------------------------- -// [fs.path.nonmember] path non-member functions -GHC_INLINE void swap(path& lhs, path& rhs) noexcept -{ - swap(lhs._path, rhs._path); -} - -GHC_INLINE size_t hash_value(const path& p) noexcept -{ - return std::hash()(p.generic_string()); -} - -#ifdef GHC_HAS_THREEWAY_COMP -GHC_INLINE std::strong_ordering operator<=>(const path& lhs, const path& rhs) noexcept -{ - return lhs.compare(rhs) <=> 0; -} -#endif - -GHC_INLINE bool operator==(const path& lhs, const path& rhs) noexcept -{ - return lhs.compare(rhs) == 0; -} - -GHC_INLINE bool operator!=(const path& lhs, const path& rhs) noexcept -{ - return !(lhs == rhs); -} - -GHC_INLINE bool operator<(const path& lhs, const path& rhs) noexcept -{ - return lhs.compare(rhs) < 0; -} - -GHC_INLINE bool operator<=(const path& lhs, const path& rhs) noexcept -{ - return lhs.compare(rhs) <= 0; -} - -GHC_INLINE bool operator>(const path& lhs, const path& rhs) noexcept -{ - return lhs.compare(rhs) > 0; -} - -GHC_INLINE bool operator>=(const path& lhs, const path& rhs) noexcept -{ - return lhs.compare(rhs) >= 0; -} - -GHC_INLINE path operator/(const path& lhs, const path& rhs) -{ - path result(lhs); - result /= rhs; - return result; -} - -#endif // GHC_EXPAND_IMPL - -//----------------------------------------------------------------------------- -// [fs.path.io] path inserter and extractor -template -inline std::basic_ostream& operator<<(std::basic_ostream& os, const path& p) -{ - os << "\""; - auto ps = p.string(); - for (auto c : ps) { - if (c == '"' || c == '\\') { - os << '\\'; - } - os << c; - } - os << "\""; - return os; -} - -template -inline std::basic_istream& operator>>(std::basic_istream& is, path& p) -{ - std::basic_string tmp; - charT c; - is >> c; - if (c == '"') { - auto sf = is.flags(); - is >> std::noskipws; - while (is) { - auto c2 = is.get(); - if (is) { - if (c2 == '\\') { - c2 = is.get(); - if (is) { - tmp += static_cast(c2); - } - } - else if (c2 == '"') { - break; - } - else { - tmp += static_cast(c2); - } - } - } - if ((sf & std::ios_base::skipws) == std::ios_base::skipws) { - is >> std::skipws; - } - p = path(tmp); - } - else { - is >> tmp; - p = path(static_cast(c) + tmp); - } - return is; -} - -#ifdef GHC_EXPAND_IMPL - -//----------------------------------------------------------------------------- -// [fs.class.filesystem_error] Class filesystem_error -GHC_INLINE filesystem_error::filesystem_error(const std::string& what_arg, std::error_code ec) - : std::system_error(ec, what_arg) - , _what_arg(what_arg) - , _ec(ec) -{ -} - -GHC_INLINE filesystem_error::filesystem_error(const std::string& what_arg, const path& p1, std::error_code ec) - : std::system_error(ec, what_arg) - , _what_arg(what_arg) - , _ec(ec) - , _p1(p1) -{ - if (!_p1.empty()) { - _what_arg += ": '" + _p1.string() + "'"; - } -} - -GHC_INLINE filesystem_error::filesystem_error(const std::string& what_arg, const path& p1, const path& p2, std::error_code ec) - : std::system_error(ec, what_arg) - , _what_arg(what_arg) - , _ec(ec) - , _p1(p1) - , _p2(p2) -{ - if (!_p1.empty()) { - _what_arg += ": '" + _p1.string() + "'"; - } - if (!_p2.empty()) { - _what_arg += ", '" + _p2.string() + "'"; - } -} - -GHC_INLINE const path& filesystem_error::path1() const noexcept -{ - return _p1; -} - -GHC_INLINE const path& filesystem_error::path2() const noexcept -{ - return _p2; -} - -GHC_INLINE const char* filesystem_error::what() const noexcept -{ - return _what_arg.c_str(); -} - -//----------------------------------------------------------------------------- -// [fs.op.funcs] filesystem operations -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE path absolute(const path& p) -{ - std::error_code ec; - path result = absolute(p, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), p, ec); - } - return result; -} -#endif - -GHC_INLINE path absolute(const path& p, std::error_code& ec) -{ - ec.clear(); -#ifdef GHC_OS_WINDOWS - if (p.empty()) { - return absolute(current_path(ec), ec) / ""; - } - ULONG size = ::GetFullPathNameW(GHC_NATIVEWP(p), 0, 0, 0); - if (size) { - std::vector buf(size, 0); - ULONG s2 = GetFullPathNameW(GHC_NATIVEWP(p), size, buf.data(), nullptr); - if (s2 && s2 < size) { - path result = path(std::wstring(buf.data(), s2)); - if (p.filename() == ".") { - result /= "."; - } - return result; - } - } - ec = detail::make_system_error(); - return path(); -#else - path base = current_path(ec); - if (!ec) { - if (p.empty()) { - return base / p; - } - if (p.has_root_name()) { - if (p.has_root_directory()) { - return p; - } - else { - return p.root_name() / base.root_directory() / base.relative_path() / p.relative_path(); - } - } - else { - if (p.has_root_directory()) { - return base.root_name() / p; - } - else { - return base / p; - } - } - } - ec = detail::make_system_error(); - return path(); -#endif -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE path canonical(const path& p) -{ - std::error_code ec; - auto result = canonical(p, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), p, ec); - } - return result; -} -#endif - -GHC_INLINE path canonical(const path& p, std::error_code& ec) -{ - if (p.empty()) { - ec = detail::make_error_code(detail::portable_error::not_found); - return path(); - } - path work = p.is_absolute() ? p : absolute(p, ec); - path result; - - auto fs = status(work, ec); - if (ec) { - return path(); - } - if (fs.type() == file_type::not_found) { - ec = detail::make_error_code(detail::portable_error::not_found); - return path(); - } - bool redo; - do { - auto rootPathLen = work._prefixLength + work.root_name_length() + (work.has_root_directory() ? 1 : 0); - redo = false; - result.clear(); - for (auto pe : work) { - if (pe.empty() || pe == ".") { - continue; - } - else if (pe == "..") { - result = result.parent_path(); - continue; - } - else if ((result / pe).string().length() <= rootPathLen) { - result /= pe; - continue; - } - auto sls = symlink_status(result / pe, ec); - if (ec) { - return path(); - } - if (is_symlink(sls)) { - redo = true; - auto target = read_symlink(result / pe, ec); - if (ec) { - return path(); - } - if (target.is_absolute()) { - result = target; - continue; - } - else { - result /= target; - continue; - } - } - else { - result /= pe; - } - } - work = result; - } while (redo); - ec.clear(); - return result; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE void copy(const path& from, const path& to) -{ - copy(from, to, copy_options::none); -} - -GHC_INLINE void copy(const path& from, const path& to, copy_options options) -{ - std::error_code ec; - copy(from, to, options, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), from, to, ec); - } -} -#endif - -GHC_INLINE void copy(const path& from, const path& to, std::error_code& ec) noexcept -{ - copy(from, to, copy_options::none, ec); -} - -GHC_INLINE void copy(const path& from, const path& to, copy_options options, std::error_code& ec) noexcept -{ - std::error_code tec; - file_status fs_from, fs_to; - ec.clear(); - if ((options & (copy_options::skip_symlinks | copy_options::copy_symlinks | copy_options::create_symlinks)) != copy_options::none) { - fs_from = symlink_status(from, ec); - } - else { - fs_from = status(from, ec); - } - if (!exists(fs_from)) { - if (!ec) { - ec = detail::make_error_code(detail::portable_error::not_found); - } - return; - } - if ((options & (copy_options::skip_symlinks | copy_options::create_symlinks)) != copy_options::none) { - fs_to = symlink_status(to, tec); - } - else { - fs_to = status(to, tec); - } - if (is_other(fs_from) || is_other(fs_to) || (is_directory(fs_from) && is_regular_file(fs_to)) || (exists(fs_to) && equivalent(from, to, ec))) { - ec = detail::make_error_code(detail::portable_error::invalid_argument); - } - else if (is_symlink(fs_from)) { - if ((options & copy_options::skip_symlinks) == copy_options::none) { - if (!exists(fs_to) && (options & copy_options::copy_symlinks) != copy_options::none) { - copy_symlink(from, to, ec); - } - else { - ec = detail::make_error_code(detail::portable_error::invalid_argument); - } - } - } - else if (is_regular_file(fs_from)) { - if ((options & copy_options::directories_only) == copy_options::none) { - if ((options & copy_options::create_symlinks) != copy_options::none) { - create_symlink(from.is_absolute() ? from : canonical(from, ec), to, ec); - } -#ifndef GHC_OS_WEB - else if ((options & copy_options::create_hard_links) != copy_options::none) { - create_hard_link(from, to, ec); - } -#endif - else if (is_directory(fs_to)) { - copy_file(from, to / from.filename(), options, ec); - } - else { - copy_file(from, to, options, ec); - } - } - } -#ifdef LWG_2682_BEHAVIOUR - else if (is_directory(fs_from) && (options & copy_options::create_symlinks) != copy_options::none) { - ec = detail::make_error_code(detail::portable_error::is_a_directory); - } -#endif - else if (is_directory(fs_from) && (options == copy_options::none || (options & copy_options::recursive) != copy_options::none)) { - if (!exists(fs_to)) { - create_directory(to, from, ec); - if (ec) { - return; - } - } - for (auto iter = directory_iterator(from, ec); iter != directory_iterator(); iter.increment(ec)) { - if (!ec) { - copy(iter->path(), to / iter->path().filename(), options | static_cast(0x8000), ec); - } - if (ec) { - return; - } - } - } - return; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool copy_file(const path& from, const path& to) -{ - return copy_file(from, to, copy_options::none); -} - -GHC_INLINE bool copy_file(const path& from, const path& to, copy_options option) -{ - std::error_code ec; - auto result = copy_file(from, to, option, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), from, to, ec); - } - return result; -} -#endif - -GHC_INLINE bool copy_file(const path& from, const path& to, std::error_code& ec) noexcept -{ - return copy_file(from, to, copy_options::none, ec); -} - -GHC_INLINE bool copy_file(const path& from, const path& to, copy_options options, std::error_code& ec) noexcept -{ - std::error_code tecf, tect; - auto sf = status(from, tecf); - auto st = status(to, tect); - bool overwrite = false; - ec.clear(); - if (!is_regular_file(sf)) { - ec = tecf; - return false; - } - if (exists(st) && (!is_regular_file(st) || equivalent(from, to, ec) || (options & (copy_options::skip_existing | copy_options::overwrite_existing | copy_options::update_existing)) == copy_options::none)) { - ec = tect ? tect : detail::make_error_code(detail::portable_error::exists); - return false; - } - if (exists(st)) { - if ((options & copy_options::update_existing) == copy_options::update_existing) { - auto from_time = last_write_time(from, ec); - if (ec) { - ec = detail::make_system_error(); - return false; - } - auto to_time = last_write_time(to, ec); - if (ec) { - ec = detail::make_system_error(); - return false; - } - if (from_time <= to_time) { - return false; - } - } - overwrite = true; - } -#ifdef GHC_OS_WINDOWS - if (!::CopyFileW(GHC_NATIVEWP(from), GHC_NATIVEWP(to), !overwrite)) { - ec = detail::make_system_error(); - return false; - } - return true; -#else - std::vector buffer(16384, '\0'); - int in = -1, out = -1; - if ((in = ::open(from.c_str(), O_RDONLY)) < 0) { - ec = detail::make_system_error(); - return false; - } - int mode = O_CREAT | O_WRONLY | O_TRUNC; - if (!overwrite) { - mode |= O_EXCL; - } - if ((out = ::open(to.c_str(), mode, static_cast(sf.permissions() & perms::all))) < 0) { - ec = detail::make_system_error(); - ::close(in); - return false; - } - ssize_t br, bw; - while ((br = ::read(in, buffer.data(), buffer.size())) > 0) { - ssize_t offset = 0; - do { - if ((bw = ::write(out, buffer.data() + offset, static_cast(br))) > 0) { - br -= bw; - offset += bw; - } - else if (bw < 0) { - ec = detail::make_system_error(); - ::close(in); - ::close(out); - return false; - } - } while (br); - } - ::close(in); - ::close(out); - return true; -#endif -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE void copy_symlink(const path& existing_symlink, const path& new_symlink) -{ - std::error_code ec; - copy_symlink(existing_symlink, new_symlink, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), existing_symlink, new_symlink, ec); - } -} -#endif - -GHC_INLINE void copy_symlink(const path& existing_symlink, const path& new_symlink, std::error_code& ec) noexcept -{ - ec.clear(); - auto to = read_symlink(existing_symlink, ec); - if (!ec) { - if (exists(to, ec) && is_directory(to, ec)) { - create_directory_symlink(to, new_symlink, ec); - } - else { - create_symlink(to, new_symlink, ec); - } - } -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool create_directories(const path& p) -{ - std::error_code ec; - auto result = create_directories(p, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), p, ec); - } - return result; -} -#endif - -GHC_INLINE bool create_directories(const path& p, std::error_code& ec) noexcept -{ - path current; - ec.clear(); - bool didCreate = false; - auto rootPathLen = p._prefixLength + p.root_name_length() + (p.has_root_directory() ? 1 : 0); - current = p.native().substr(0, rootPathLen); - path folders(p._path.substr(rootPathLen)); - for (path::string_type part : folders) { - current /= part; - std::error_code tec; - auto fs = status(current, tec); - if (tec && fs.type() != file_type::not_found) { - ec = tec; - return false; - } - if (!exists(fs)) { - create_directory(current, ec); - if (ec) { - std::error_code tmp_ec; - if (is_directory(current, tmp_ec)) { - ec.clear(); - } - else { - return false; - } - } - didCreate = true; - } -#ifndef LWG_2935_BEHAVIOUR - else if (!is_directory(fs)) { - ec = detail::make_error_code(detail::portable_error::exists); - return false; - } -#endif - } - return didCreate; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool create_directory(const path& p) -{ - std::error_code ec; - auto result = create_directory(p, path(), ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), p, ec); - } - return result; -} -#endif - -GHC_INLINE bool create_directory(const path& p, std::error_code& ec) noexcept -{ - return create_directory(p, path(), ec); -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool create_directory(const path& p, const path& attributes) -{ - std::error_code ec; - auto result = create_directory(p, attributes, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), p, ec); - } - return result; -} -#endif - -GHC_INLINE bool create_directory(const path& p, const path& attributes, std::error_code& ec) noexcept -{ - std::error_code tec; - ec.clear(); - auto fs = status(p, tec); -#ifdef LWG_2935_BEHAVIOUR - if (status_known(fs) && exists(fs)) { - return false; - } -#else - if (status_known(fs) && exists(fs) && is_directory(fs)) { - return false; - } -#endif -#ifdef GHC_OS_WINDOWS - if (!attributes.empty()) { - if (!::CreateDirectoryExW(GHC_NATIVEWP(attributes), GHC_NATIVEWP(p), NULL)) { - ec = detail::make_system_error(); - return false; - } - } - else if (!::CreateDirectoryW(GHC_NATIVEWP(p), NULL)) { - ec = detail::make_system_error(); - return false; - } -#else - ::mode_t attribs = static_cast(perms::all); - if (!attributes.empty()) { - struct ::stat fileStat; - if (::stat(attributes.c_str(), &fileStat) != 0) { - ec = detail::make_system_error(); - return false; - } - attribs = fileStat.st_mode; - } - if (::mkdir(p.c_str(), attribs) != 0) { - ec = detail::make_system_error(); - return false; - } -#endif - return true; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE void create_directory_symlink(const path& to, const path& new_symlink) -{ - std::error_code ec; - create_directory_symlink(to, new_symlink, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), to, new_symlink, ec); - } -} -#endif - -GHC_INLINE void create_directory_symlink(const path& to, const path& new_symlink, std::error_code& ec) noexcept -{ - detail::create_symlink(to, new_symlink, true, ec); -} - -#ifndef GHC_OS_WEB -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE void create_hard_link(const path& to, const path& new_hard_link) -{ - std::error_code ec; - create_hard_link(to, new_hard_link, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), to, new_hard_link, ec); - } -} -#endif - -GHC_INLINE void create_hard_link(const path& to, const path& new_hard_link, std::error_code& ec) noexcept -{ - detail::create_hardlink(to, new_hard_link, ec); -} -#endif - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE void create_symlink(const path& to, const path& new_symlink) -{ - std::error_code ec; - create_symlink(to, new_symlink, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), to, new_symlink, ec); - } -} -#endif - -GHC_INLINE void create_symlink(const path& to, const path& new_symlink, std::error_code& ec) noexcept -{ - detail::create_symlink(to, new_symlink, false, ec); -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE path current_path() -{ - std::error_code ec; - auto result = current_path(ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), ec); - } - return result; -} -#endif - -GHC_INLINE path current_path(std::error_code& ec) -{ - ec.clear(); -#ifdef GHC_OS_WINDOWS - DWORD pathlen = ::GetCurrentDirectoryW(0, 0); - std::unique_ptr buffer(new wchar_t[size_t(pathlen) + 1]); - if (::GetCurrentDirectoryW(pathlen, buffer.get()) == 0) { - ec = detail::make_system_error(); - return path(); - } - return path(std::wstring(buffer.get()), path::native_format); -#else - size_t pathlen = static_cast(std::max(int(::pathconf(".", _PC_PATH_MAX)), int(PATH_MAX))); - std::unique_ptr buffer(new char[pathlen + 1]); - if (::getcwd(buffer.get(), pathlen) == nullptr) { - ec = detail::make_system_error(); - return path(); - } - return path(buffer.get()); -#endif -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE void current_path(const path& p) -{ - std::error_code ec; - current_path(p, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), p, ec); - } -} -#endif - -GHC_INLINE void current_path(const path& p, std::error_code& ec) noexcept -{ - ec.clear(); -#ifdef GHC_OS_WINDOWS - if (!::SetCurrentDirectoryW(GHC_NATIVEWP(p))) { - ec = detail::make_system_error(); - } -#else - if (::chdir(p.string().c_str()) == -1) { - ec = detail::make_system_error(); - } -#endif -} - -GHC_INLINE bool exists(file_status s) noexcept -{ - return status_known(s) && s.type() != file_type::not_found; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool exists(const path& p) -{ - return exists(status(p)); -} -#endif - -GHC_INLINE bool exists(const path& p, std::error_code& ec) noexcept -{ - file_status s = status(p, ec); - if (status_known(s)) { - ec.clear(); - } - return exists(s); -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool equivalent(const path& p1, const path& p2) -{ - std::error_code ec; - bool result = equivalent(p1, p2, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), p1, p2, ec); - } - return result; -} -#endif - -GHC_INLINE bool equivalent(const path& p1, const path& p2, std::error_code& ec) noexcept -{ - ec.clear(); -#ifdef GHC_OS_WINDOWS - std::shared_ptr file1(::CreateFileW(GHC_NATIVEWP(p1), 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, 0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0), CloseHandle); - auto e1 = ::GetLastError(); - std::shared_ptr file2(::CreateFileW(GHC_NATIVEWP(p2), 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, 0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0), CloseHandle); - if (file1.get() == INVALID_HANDLE_VALUE || file2.get() == INVALID_HANDLE_VALUE) { -#ifdef LWG_2937_BEHAVIOUR - ec = detail::make_system_error(e1 ? e1 : ::GetLastError()); -#else - if (file1 == file2) { - ec = detail::make_system_error(e1 ? e1 : ::GetLastError()); - } -#endif - return false; - } - BY_HANDLE_FILE_INFORMATION inf1, inf2; - if (!::GetFileInformationByHandle(file1.get(), &inf1)) { - ec = detail::make_system_error(); - return false; - } - if (!::GetFileInformationByHandle(file2.get(), &inf2)) { - ec = detail::make_system_error(); - return false; - } - return inf1.ftLastWriteTime.dwLowDateTime == inf2.ftLastWriteTime.dwLowDateTime && inf1.ftLastWriteTime.dwHighDateTime == inf2.ftLastWriteTime.dwHighDateTime && inf1.nFileIndexHigh == inf2.nFileIndexHigh && inf1.nFileIndexLow == inf2.nFileIndexLow && - inf1.nFileSizeHigh == inf2.nFileSizeHigh && inf1.nFileSizeLow == inf2.nFileSizeLow && inf1.dwVolumeSerialNumber == inf2.dwVolumeSerialNumber; -#else - struct ::stat s1, s2; - auto rc1 = ::stat(p1.c_str(), &s1); - auto e1 = errno; - auto rc2 = ::stat(p2.c_str(), &s2); - if (rc1 || rc2) { -#ifdef LWG_2937_BEHAVIOUR - ec = detail::make_system_error(e1 ? e1 : errno); -#else - if (rc1 && rc2) { - ec = detail::make_system_error(e1 ? e1 : errno); - } -#endif - return false; - } - return s1.st_dev == s2.st_dev && s1.st_ino == s2.st_ino && s1.st_size == s2.st_size && s1.st_mtime == s2.st_mtime; -#endif -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE uintmax_t file_size(const path& p) -{ - std::error_code ec; - auto result = file_size(p, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), p, ec); - } - return result; -} -#endif - -GHC_INLINE uintmax_t file_size(const path& p, std::error_code& ec) noexcept -{ - ec.clear(); -#ifdef GHC_OS_WINDOWS - WIN32_FILE_ATTRIBUTE_DATA attr; - if (!GetFileAttributesExW(GHC_NATIVEWP(p), GetFileExInfoStandard, &attr)) { - ec = detail::make_system_error(); - return static_cast(-1); - } - return static_cast(attr.nFileSizeHigh) << (sizeof(attr.nFileSizeHigh) * 8) | attr.nFileSizeLow; -#else - struct ::stat fileStat; - if (::stat(p.c_str(), &fileStat) == -1) { - ec = detail::make_system_error(); - return static_cast(-1); - } - return static_cast(fileStat.st_size); -#endif -} - -#ifndef GHC_OS_WEB -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE uintmax_t hard_link_count(const path& p) -{ - std::error_code ec; - auto result = hard_link_count(p, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), p, ec); - } - return result; -} -#endif - -GHC_INLINE uintmax_t hard_link_count(const path& p, std::error_code& ec) noexcept -{ - ec.clear(); -#ifdef GHC_OS_WINDOWS - uintmax_t result = static_cast(-1); - std::shared_ptr file(::CreateFileW(GHC_NATIVEWP(p), 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, 0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0), CloseHandle); - BY_HANDLE_FILE_INFORMATION inf; - if (file.get() == INVALID_HANDLE_VALUE) { - ec = detail::make_system_error(); - } - else { - if (!::GetFileInformationByHandle(file.get(), &inf)) { - ec = detail::make_system_error(); - } - else { - result = inf.nNumberOfLinks; - } - } - return result; -#else - uintmax_t result = 0; - file_status fs = detail::status_ex(p, ec, nullptr, nullptr, &result, nullptr); - if (fs.type() == file_type::not_found) { - ec = detail::make_error_code(detail::portable_error::not_found); - } - return ec ? static_cast(-1) : result; -#endif -} -#endif - -GHC_INLINE bool is_block_file(file_status s) noexcept -{ - return s.type() == file_type::block; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool is_block_file(const path& p) -{ - return is_block_file(status(p)); -} -#endif - -GHC_INLINE bool is_block_file(const path& p, std::error_code& ec) noexcept -{ - return is_block_file(status(p, ec)); -} - -GHC_INLINE bool is_character_file(file_status s) noexcept -{ - return s.type() == file_type::character; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool is_character_file(const path& p) -{ - return is_character_file(status(p)); -} -#endif - -GHC_INLINE bool is_character_file(const path& p, std::error_code& ec) noexcept -{ - return is_character_file(status(p, ec)); -} - -GHC_INLINE bool is_directory(file_status s) noexcept -{ - return s.type() == file_type::directory; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool is_directory(const path& p) -{ - return is_directory(status(p)); -} -#endif - -GHC_INLINE bool is_directory(const path& p, std::error_code& ec) noexcept -{ - return is_directory(status(p, ec)); -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool is_empty(const path& p) -{ - if (is_directory(p)) { - return directory_iterator(p) == directory_iterator(); - } - else { - return file_size(p) == 0; - } -} -#endif - -GHC_INLINE bool is_empty(const path& p, std::error_code& ec) noexcept -{ - auto fs = status(p, ec); - if (ec) { - return false; - } - if (is_directory(fs)) { - directory_iterator iter(p, ec); - if (ec) { - return false; - } - return iter == directory_iterator(); - } - else { - auto sz = file_size(p, ec); - if (ec) { - return false; - } - return sz == 0; - } -} - -GHC_INLINE bool is_fifo(file_status s) noexcept -{ - return s.type() == file_type::fifo; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool is_fifo(const path& p) -{ - return is_fifo(status(p)); -} -#endif - -GHC_INLINE bool is_fifo(const path& p, std::error_code& ec) noexcept -{ - return is_fifo(status(p, ec)); -} - -GHC_INLINE bool is_other(file_status s) noexcept -{ - return exists(s) && !is_regular_file(s) && !is_directory(s) && !is_symlink(s); -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool is_other(const path& p) -{ - return is_other(status(p)); -} -#endif - -GHC_INLINE bool is_other(const path& p, std::error_code& ec) noexcept -{ - return is_other(status(p, ec)); -} - -GHC_INLINE bool is_regular_file(file_status s) noexcept -{ - return s.type() == file_type::regular; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool is_regular_file(const path& p) -{ - return is_regular_file(status(p)); -} -#endif - -GHC_INLINE bool is_regular_file(const path& p, std::error_code& ec) noexcept -{ - return is_regular_file(status(p, ec)); -} - -GHC_INLINE bool is_socket(file_status s) noexcept -{ - return s.type() == file_type::socket; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool is_socket(const path& p) -{ - return is_socket(status(p)); -} -#endif - -GHC_INLINE bool is_socket(const path& p, std::error_code& ec) noexcept -{ - return is_socket(status(p, ec)); -} - -GHC_INLINE bool is_symlink(file_status s) noexcept -{ - return s.type() == file_type::symlink; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool is_symlink(const path& p) -{ - return is_symlink(symlink_status(p)); -} -#endif - -GHC_INLINE bool is_symlink(const path& p, std::error_code& ec) noexcept -{ - return is_symlink(symlink_status(p, ec)); -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE file_time_type last_write_time(const path& p) -{ - std::error_code ec; - auto result = last_write_time(p, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), p, ec); - } - return result; -} -#endif - -GHC_INLINE file_time_type last_write_time(const path& p, std::error_code& ec) noexcept -{ - time_t result = 0; - ec.clear(); - file_status fs = detail::status_ex(p, ec, nullptr, nullptr, nullptr, &result); - return ec ? (file_time_type::min)() : std::chrono::system_clock::from_time_t(result); -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE void last_write_time(const path& p, file_time_type new_time) -{ - std::error_code ec; - last_write_time(p, new_time, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), p, ec); - } -} -#endif - -GHC_INLINE void last_write_time(const path& p, file_time_type new_time, std::error_code& ec) noexcept -{ - ec.clear(); - auto d = new_time.time_since_epoch(); -#ifdef GHC_OS_WINDOWS - std::shared_ptr file(::CreateFileW(GHC_NATIVEWP(p), FILE_WRITE_ATTRIBUTES, FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL), ::CloseHandle); - FILETIME ft; - auto tt = std::chrono::duration_cast(d).count() * 10 + 116444736000000000; - ft.dwLowDateTime = static_cast(tt); - ft.dwHighDateTime = static_cast(tt >> 32); - if (!::SetFileTime(file.get(), 0, 0, &ft)) { - ec = detail::make_system_error(); - } -#elif defined(GHC_OS_MACOS) -#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED -#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101300 - struct ::stat fs; - if (::stat(p.c_str(), &fs) == 0) { - struct ::timeval tv[2]; - tv[0].tv_sec = fs.st_atimespec.tv_sec; - tv[0].tv_usec = static_cast(fs.st_atimespec.tv_nsec / 1000); - tv[1].tv_sec = std::chrono::duration_cast(d).count(); - tv[1].tv_usec = static_cast(std::chrono::duration_cast(d).count() % 1000000); - if (::utimes(p.c_str(), tv) == 0) { - return; - } - } - ec = detail::make_system_error(); - return; -#else - struct ::timespec times[2]; - times[0].tv_sec = 0; - times[0].tv_nsec = UTIME_OMIT; - times[1].tv_sec = std::chrono::duration_cast(d).count(); - times[1].tv_nsec = 0; // std::chrono::duration_cast(d).count() % 1000000000; - if (::utimensat(AT_FDCWD, p.c_str(), times, AT_SYMLINK_NOFOLLOW) != 0) { - ec = detail::make_system_error(); - } - return; -#endif -#endif -#else -#ifndef UTIME_OMIT -#define UTIME_OMIT ((1l << 30) - 2l) -#endif - struct ::timespec times[2]; - times[0].tv_sec = 0; - times[0].tv_nsec = UTIME_OMIT; - times[1].tv_sec = static_cast(std::chrono::duration_cast(d).count()); - times[1].tv_nsec = static_cast(std::chrono::duration_cast(d).count() % 1000000000); -#if defined(__ANDROID_API__) && __ANDROID_API__ < 12 - if (syscall(__NR_utimensat, AT_FDCWD, p.c_str(), times, AT_SYMLINK_NOFOLLOW) != 0) { -#else - if (::utimensat(AT_FDCWD, p.c_str(), times, AT_SYMLINK_NOFOLLOW) != 0) { -#endif - ec = detail::make_system_error(); - } - return; -#endif -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE void permissions(const path& p, perms prms, perm_options opts) -{ - std::error_code ec; - permissions(p, prms, opts, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), p, ec); - } -} -#endif - -GHC_INLINE void permissions(const path& p, perms prms, std::error_code& ec) noexcept -{ - permissions(p, prms, perm_options::replace, ec); -} - -GHC_INLINE void permissions(const path& p, perms prms, perm_options opts, std::error_code& ec) noexcept -{ - if (static_cast(opts & (perm_options::replace | perm_options::add | perm_options::remove)) == 0) { - ec = detail::make_error_code(detail::portable_error::invalid_argument); - return; - } - auto fs = symlink_status(p, ec); - if ((opts & perm_options::replace) != perm_options::replace) { - if ((opts & perm_options::add) == perm_options::add) { - prms = fs.permissions() | prms; - } - else { - prms = fs.permissions() & ~prms; - } - } -#ifdef GHC_OS_WINDOWS -#ifdef __GNUC__ - auto oldAttr = GetFileAttributesW(GHC_NATIVEWP(p)); - if (oldAttr != INVALID_FILE_ATTRIBUTES) { - DWORD newAttr = ((prms & perms::owner_write) == perms::owner_write) ? oldAttr & ~(static_cast(FILE_ATTRIBUTE_READONLY)) : oldAttr | FILE_ATTRIBUTE_READONLY; - if (oldAttr == newAttr || SetFileAttributesW(GHC_NATIVEWP(p), newAttr)) { - return; - } - } - ec = detail::make_system_error(); -#else - int mode = 0; - if ((prms & perms::owner_read) == perms::owner_read) { - mode |= _S_IREAD; - } - if ((prms & perms::owner_write) == perms::owner_write) { - mode |= _S_IWRITE; - } - if (::_wchmod(p.wstring().c_str(), mode) != 0) { - ec = detail::make_system_error(); - } -#endif -#else - if ((opts & perm_options::nofollow) != perm_options::nofollow) { - if (::chmod(p.c_str(), static_cast(prms)) != 0) { - ec = detail::make_system_error(); - } - } -#endif -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE path proximate(const path& p, std::error_code& ec) -{ - auto cp = current_path(ec); - if (!ec) { - return proximate(p, cp, ec); - } - return path(); -} -#endif - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE path proximate(const path& p, const path& base) -{ - return weakly_canonical(p).lexically_proximate(weakly_canonical(base)); -} -#endif - -GHC_INLINE path proximate(const path& p, const path& base, std::error_code& ec) -{ - return weakly_canonical(p, ec).lexically_proximate(weakly_canonical(base, ec)); -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE path read_symlink(const path& p) -{ - std::error_code ec; - auto result = read_symlink(p, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), p, ec); - } - return result; -} -#endif - -GHC_INLINE path read_symlink(const path& p, std::error_code& ec) -{ - file_status fs = symlink_status(p, ec); - if (fs.type() != file_type::symlink) { - ec = detail::make_error_code(detail::portable_error::invalid_argument); - return path(); - } - auto result = detail::resolveSymlink(p, ec); - return ec ? path() : result; -} - -GHC_INLINE path relative(const path& p, std::error_code& ec) -{ - return relative(p, current_path(ec), ec); -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE path relative(const path& p, const path& base) -{ - return weakly_canonical(p).lexically_relative(weakly_canonical(base)); -} -#endif - -GHC_INLINE path relative(const path& p, const path& base, std::error_code& ec) -{ - return weakly_canonical(p, ec).lexically_relative(weakly_canonical(base, ec)); -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool remove(const path& p) -{ - std::error_code ec; - auto result = remove(p, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), p, ec); - } - return result; -} -#endif - -GHC_INLINE bool remove(const path& p, std::error_code& ec) noexcept -{ - ec.clear(); -#ifdef GHC_OS_WINDOWS -#ifdef GHC_USE_WCHAR_T - auto cstr = p.c_str(); -#else - std::wstring np = detail::fromUtf8(p.u8string()); - auto cstr = np.c_str(); -#endif - DWORD attr = GetFileAttributesW(cstr); - if (attr == INVALID_FILE_ATTRIBUTES) { - auto error = ::GetLastError(); - if (error == ERROR_FILE_NOT_FOUND || error == ERROR_PATH_NOT_FOUND) { - return false; - } - ec = detail::make_system_error(error); - } - else if(attr & FILE_ATTRIBUTE_READONLY) { - auto new_attr = attr & ~static_cast(FILE_ATTRIBUTE_READONLY); - if(!SetFileAttributesW(cstr, new_attr)) { - auto error = ::GetLastError(); - ec = detail::make_system_error(error); - } - } - if (!ec) { - if (attr & FILE_ATTRIBUTE_DIRECTORY) { - if (!RemoveDirectoryW(cstr)) { - ec = detail::make_system_error(); - } - } - else { - if (!DeleteFileW(cstr)) { - ec = detail::make_system_error(); - } - } - } -#else - if (::remove(p.c_str()) == -1) { - auto error = errno; - if (error == ENOENT) { - return false; - } - ec = detail::make_system_error(); - } -#endif - return ec ? false : true; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE uintmax_t remove_all(const path& p) -{ - std::error_code ec; - auto result = remove_all(p, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), p, ec); - } - return result; -} -#endif - -GHC_INLINE uintmax_t remove_all(const path& p, std::error_code& ec) noexcept -{ - ec.clear(); - uintmax_t count = 0; - if (p == "/") { - ec = detail::make_error_code(detail::portable_error::not_supported); - return static_cast(-1); - } - std::error_code tec; - auto fs = status(p, tec); - if (exists(fs) && is_directory(fs)) { - for (auto iter = directory_iterator(p, ec); iter != directory_iterator(); iter.increment(ec)) { - if (ec && !detail::is_not_found_error(ec)) { - break; - } - bool is_symlink_result = iter->is_symlink(ec); - if (ec) - return static_cast(-1); - if (!is_symlink_result && iter->is_directory(ec)) { - count += remove_all(iter->path(), ec); - if (ec) { - return static_cast(-1); - } - } - else { - if (!ec) { - remove(iter->path(), ec); - } - if (ec) { - return static_cast(-1); - } - ++count; - } - } - } - if (!ec) { - if (remove(p, ec)) { - ++count; - } - } - if (ec) { - return static_cast(-1); - } - return count; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE void rename(const path& from, const path& to) -{ - std::error_code ec; - rename(from, to, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), from, to, ec); - } -} -#endif - -GHC_INLINE void rename(const path& from, const path& to, std::error_code& ec) noexcept -{ - ec.clear(); -#ifdef GHC_OS_WINDOWS - if (from != to) { - if (!MoveFileExW(GHC_NATIVEWP(from), GHC_NATIVEWP(to), (DWORD)MOVEFILE_REPLACE_EXISTING)) { - ec = detail::make_system_error(); - } - } -#else - if (from != to) { - if (::rename(from.c_str(), to.c_str()) != 0) { - ec = detail::make_system_error(); - } - } -#endif -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE void resize_file(const path& p, uintmax_t size) -{ - std::error_code ec; - resize_file(p, size, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), p, ec); - } -} -#endif - -GHC_INLINE void resize_file(const path& p, uintmax_t size, std::error_code& ec) noexcept -{ - ec.clear(); -#ifdef GHC_OS_WINDOWS - LARGE_INTEGER lisize; - lisize.QuadPart = static_cast(size); - if (lisize.QuadPart < 0) { -#ifdef ERROR_FILE_TOO_LARGE - ec = detail::make_system_error(ERROR_FILE_TOO_LARGE); -#else - ec = detail::make_system_error(223); -#endif - return; - } - std::shared_ptr file(CreateFileW(GHC_NATIVEWP(p), GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL), CloseHandle); - if (file.get() == INVALID_HANDLE_VALUE) { - ec = detail::make_system_error(); - } - else if (SetFilePointerEx(file.get(), lisize, NULL, FILE_BEGIN) == 0 || SetEndOfFile(file.get()) == 0) { - ec = detail::make_system_error(); - } -#else - if (::truncate(p.c_str(), static_cast(size)) != 0) { - ec = detail::make_system_error(); - } -#endif -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE space_info space(const path& p) -{ - std::error_code ec; - auto result = space(p, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), p, ec); - } - return result; -} -#endif - -GHC_INLINE space_info space(const path& p, std::error_code& ec) noexcept -{ - ec.clear(); -#ifdef GHC_OS_WINDOWS - ULARGE_INTEGER freeBytesAvailableToCaller = {{ 0, 0 }}; - ULARGE_INTEGER totalNumberOfBytes = {{ 0, 0 }}; - ULARGE_INTEGER totalNumberOfFreeBytes = {{ 0, 0 }}; - if (!GetDiskFreeSpaceExW(GHC_NATIVEWP(p), &freeBytesAvailableToCaller, &totalNumberOfBytes, &totalNumberOfFreeBytes)) { - ec = detail::make_system_error(); - return {static_cast(-1), static_cast(-1), static_cast(-1)}; - } - return {static_cast(totalNumberOfBytes.QuadPart), static_cast(totalNumberOfFreeBytes.QuadPart), static_cast(freeBytesAvailableToCaller.QuadPart)}; -#else - struct ::statvfs sfs; - if (::statvfs(p.c_str(), &sfs) != 0) { - ec = detail::make_system_error(); - return {static_cast(-1), static_cast(-1), static_cast(-1)}; - } - return {static_cast(sfs.f_blocks * sfs.f_frsize), static_cast(sfs.f_bfree * sfs.f_frsize), static_cast(sfs.f_bavail * sfs.f_frsize)}; -#endif -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE file_status status(const path& p) -{ - std::error_code ec; - auto result = status(p, ec); - if (result.type() == file_type::none) { - throw filesystem_error(detail::systemErrorText(ec.value()), p, ec); - } - return result; -} -#endif - -GHC_INLINE file_status status(const path& p, std::error_code& ec) noexcept -{ - return detail::status_ex(p, ec); -} - -GHC_INLINE bool status_known(file_status s) noexcept -{ - return s.type() != file_type::none; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE file_status symlink_status(const path& p) -{ - std::error_code ec; - auto result = symlink_status(p, ec); - if (result.type() == file_type::none) { - throw filesystem_error(detail::systemErrorText(ec.value()), ec); - } - return result; -} -#endif - -GHC_INLINE file_status symlink_status(const path& p, std::error_code& ec) noexcept -{ - return detail::symlink_status_ex(p, ec); -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE path temp_directory_path() -{ - std::error_code ec; - path result = temp_directory_path(ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), ec); - } - return result; -} -#endif - -GHC_INLINE path temp_directory_path(std::error_code& ec) noexcept -{ - ec.clear(); -#ifdef GHC_OS_WINDOWS - wchar_t buffer[512]; - auto rc = GetTempPathW(511, buffer); - if (!rc || rc > 511) { - ec = detail::make_system_error(); - return path(); - } - return path(std::wstring(buffer)); -#else - static const char* temp_vars[] = {"TMPDIR", "TMP", "TEMP", "TEMPDIR", nullptr}; - const char* temp_path = nullptr; - for (auto temp_name = temp_vars; *temp_name != nullptr; ++temp_name) { - temp_path = std::getenv(*temp_name); - if (temp_path) { - return path(temp_path); - } - } - return path("/tmp"); -#endif -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE path weakly_canonical(const path& p) -{ - std::error_code ec; - auto result = weakly_canonical(p, ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), p, ec); - } - return result; -} -#endif - -GHC_INLINE path weakly_canonical(const path& p, std::error_code& ec) noexcept -{ - path result; - ec.clear(); - bool scan = true; - for (auto pe : p) { - if (scan) { - std::error_code tec; - if (exists(result / pe, tec)) { - result /= pe; - } - else { - if (ec) { - return path(); - } - scan = false; - if (!result.empty()) { - result = canonical(result, ec) / pe; - if (ec) { - break; - } - } - else { - result /= pe; - } - } - } - else { - result /= pe; - } - } - if (scan) { - if (!result.empty()) { - result = canonical(result, ec); - } - } - return ec ? path() : result.lexically_normal(); -} - -//----------------------------------------------------------------------------- -// [fs.class.file_status] class file_status -// [fs.file_status.cons] constructors and destructor -GHC_INLINE file_status::file_status() noexcept - : file_status(file_type::none) -{ -} - -GHC_INLINE file_status::file_status(file_type ft, perms prms) noexcept - : _type(ft) - , _perms(prms) -{ -} - -GHC_INLINE file_status::file_status(const file_status& other) noexcept - : _type(other._type) - , _perms(other._perms) -{ -} - -GHC_INLINE file_status::file_status(file_status&& other) noexcept - : _type(other._type) - , _perms(other._perms) -{ -} - -GHC_INLINE file_status::~file_status() {} - -// assignments: -GHC_INLINE file_status& file_status::operator=(const file_status& rhs) noexcept -{ - _type = rhs._type; - _perms = rhs._perms; - return *this; -} - -GHC_INLINE file_status& file_status::operator=(file_status&& rhs) noexcept -{ - _type = rhs._type; - _perms = rhs._perms; - return *this; -} - -// [fs.file_status.mods] modifiers -GHC_INLINE void file_status::type(file_type ft) noexcept -{ - _type = ft; -} - -GHC_INLINE void file_status::permissions(perms prms) noexcept -{ - _perms = prms; -} - -// [fs.file_status.obs] observers -GHC_INLINE file_type file_status::type() const noexcept -{ - return _type; -} - -GHC_INLINE perms file_status::permissions() const noexcept -{ - return _perms; -} - -//----------------------------------------------------------------------------- -// [fs.class.directory_entry] class directory_entry -// [fs.dir.entry.cons] constructors and destructor -// directory_entry::directory_entry() noexcept = default; -// directory_entry::directory_entry(const directory_entry&) = default; -// directory_entry::directory_entry(directory_entry&&) noexcept = default; -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE directory_entry::directory_entry(const filesystem::path& p) - : _path(p) - , _file_size(static_cast(-1)) -#ifndef GHC_OS_WINDOWS - , _hard_link_count(static_cast(-1)) -#endif - , _last_write_time(0) -{ - refresh(); -} -#endif - -GHC_INLINE directory_entry::directory_entry(const filesystem::path& p, std::error_code& ec) - : _path(p) - , _file_size(static_cast(-1)) -#ifndef GHC_OS_WINDOWS - , _hard_link_count(static_cast(-1)) -#endif - , _last_write_time(0) -{ - refresh(ec); -} - -GHC_INLINE directory_entry::~directory_entry() {} - -// assignments: -// directory_entry& directory_entry::operator=(const directory_entry&) = default; -// directory_entry& directory_entry::operator=(directory_entry&&) noexcept = default; - -// [fs.dir.entry.mods] directory_entry modifiers -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE void directory_entry::assign(const filesystem::path& p) -{ - _path = p; - refresh(); -} -#endif - -GHC_INLINE void directory_entry::assign(const filesystem::path& p, std::error_code& ec) -{ - _path = p; - refresh(ec); -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE void directory_entry::replace_filename(const filesystem::path& p) -{ - _path.replace_filename(p); - refresh(); -} -#endif - -GHC_INLINE void directory_entry::replace_filename(const filesystem::path& p, std::error_code& ec) -{ - _path.replace_filename(p); - refresh(ec); -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE void directory_entry::refresh() -{ - std::error_code ec; - refresh(ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), _path, ec); - } -} -#endif - -GHC_INLINE void directory_entry::refresh(std::error_code& ec) noexcept -{ -#ifdef GHC_OS_WINDOWS - _status = detail::status_ex(_path, ec, &_symlink_status, &_file_size, nullptr, &_last_write_time); -#else - _status = detail::status_ex(_path, ec, &_symlink_status, &_file_size, &_hard_link_count, &_last_write_time); -#endif -} - -// [fs.dir.entry.obs] directory_entry observers -GHC_INLINE const filesystem::path& directory_entry::path() const noexcept -{ - return _path; -} - -GHC_INLINE directory_entry::operator const filesystem::path&() const noexcept -{ - return _path; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE file_type directory_entry::status_file_type() const -{ - return _status.type() != file_type::none ? _status.type() : filesystem::status(path()).type(); -} -#endif - -GHC_INLINE file_type directory_entry::status_file_type(std::error_code& ec) const noexcept -{ - if(_status.type() != file_type::none) { - ec.clear(); - return _status.type(); - } - return filesystem::status(path(), ec).type(); -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool directory_entry::exists() const -{ - return status_file_type() != file_type::not_found; -} -#endif - -GHC_INLINE bool directory_entry::exists(std::error_code& ec) const noexcept -{ - return status_file_type(ec) != file_type::not_found; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool directory_entry::is_block_file() const -{ - return status_file_type() == file_type::block; -} -#endif -GHC_INLINE bool directory_entry::is_block_file(std::error_code& ec) const noexcept -{ - return status_file_type(ec) == file_type::block; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool directory_entry::is_character_file() const -{ - return status_file_type() == file_type::character; -} -#endif - -GHC_INLINE bool directory_entry::is_character_file(std::error_code& ec) const noexcept -{ - return status_file_type(ec) == file_type::character; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool directory_entry::is_directory() const -{ - return status_file_type() == file_type::directory; -} -#endif - -GHC_INLINE bool directory_entry::is_directory(std::error_code& ec) const noexcept -{ - return status_file_type(ec) == file_type::directory; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool directory_entry::is_fifo() const -{ - return status_file_type() == file_type::fifo; -} -#endif - -GHC_INLINE bool directory_entry::is_fifo(std::error_code& ec) const noexcept -{ - return status_file_type(ec) == file_type::fifo; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool directory_entry::is_other() const -{ - auto ft = status_file_type(); - return ft != file_type::none && ft != file_type::not_found && ft != file_type::regular && ft != file_type::directory && !is_symlink(); -} -#endif - -GHC_INLINE bool directory_entry::is_other(std::error_code& ec) const noexcept -{ - auto ft = status_file_type(ec); - bool other = ft != file_type::none && ft != file_type::not_found && ft != file_type::regular && ft != file_type::directory && !is_symlink(ec); - return !ec && other; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool directory_entry::is_regular_file() const -{ - return status_file_type() == file_type::regular; -} -#endif - -GHC_INLINE bool directory_entry::is_regular_file(std::error_code& ec) const noexcept -{ - return status_file_type(ec) == file_type::regular; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool directory_entry::is_socket() const -{ - return status_file_type() == file_type::socket; -} -#endif - -GHC_INLINE bool directory_entry::is_socket(std::error_code& ec) const noexcept -{ - return status_file_type(ec) == file_type::socket; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE bool directory_entry::is_symlink() const -{ - return _symlink_status.type() != file_type::none ? _symlink_status.type() == file_type::symlink : filesystem::is_symlink(symlink_status()); -} -#endif - -GHC_INLINE bool directory_entry::is_symlink(std::error_code& ec) const noexcept -{ - if(_symlink_status.type() != file_type::none) { - ec.clear(); - return _symlink_status.type() == file_type::symlink; - } - return filesystem::is_symlink(symlink_status(ec)); -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE uintmax_t directory_entry::file_size() const -{ - if (_file_size != static_cast(-1)) { - return _file_size; - } - return filesystem::file_size(path()); -} -#endif - -GHC_INLINE uintmax_t directory_entry::file_size(std::error_code& ec) const noexcept -{ - if (_file_size != static_cast(-1)) { - ec.clear(); - return _file_size; - } - return filesystem::file_size(path(), ec); -} - -#ifndef GHC_OS_WEB -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE uintmax_t directory_entry::hard_link_count() const -{ -#ifndef GHC_OS_WINDOWS - if (_hard_link_count != static_cast(-1)) { - return _hard_link_count; - } -#endif - return filesystem::hard_link_count(path()); -} -#endif - -GHC_INLINE uintmax_t directory_entry::hard_link_count(std::error_code& ec) const noexcept -{ -#ifndef GHC_OS_WINDOWS - if (_hard_link_count != static_cast(-1)) { - ec.clear(); - return _hard_link_count; - } -#endif - return filesystem::hard_link_count(path(), ec); -} -#endif - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE file_time_type directory_entry::last_write_time() const -{ - if (_last_write_time != 0) { - return std::chrono::system_clock::from_time_t(_last_write_time); - } - return filesystem::last_write_time(path()); -} -#endif - -GHC_INLINE file_time_type directory_entry::last_write_time(std::error_code& ec) const noexcept -{ - if (_last_write_time != 0) { - ec.clear(); - return std::chrono::system_clock::from_time_t(_last_write_time); - } - return filesystem::last_write_time(path(), ec); -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE file_status directory_entry::status() const -{ - if (_status.type() != file_type::none && _status.permissions() != perms::unknown) { - return _status; - } - return filesystem::status(path()); -} -#endif - -GHC_INLINE file_status directory_entry::status(std::error_code& ec) const noexcept -{ - if (_status.type() != file_type::none && _status.permissions() != perms::unknown) { - ec.clear(); - return _status; - } - return filesystem::status(path(), ec); -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE file_status directory_entry::symlink_status() const -{ - if (_symlink_status.type() != file_type::none && _symlink_status.permissions() != perms::unknown) { - return _symlink_status; - } - return filesystem::symlink_status(path()); -} -#endif - -GHC_INLINE file_status directory_entry::symlink_status(std::error_code& ec) const noexcept -{ - if (_symlink_status.type() != file_type::none && _symlink_status.permissions() != perms::unknown) { - ec.clear(); - return _symlink_status; - } - return filesystem::symlink_status(path(), ec); -} - -#ifdef GHC_HAS_THREEWAY_COMP -GHC_INLINE std::strong_ordering directory_entry::operator<=>(const directory_entry& rhs) const noexcept -{ - return _path <=> rhs._path; -} -#endif - -GHC_INLINE bool directory_entry::operator<(const directory_entry& rhs) const noexcept -{ - return _path < rhs._path; -} - -GHC_INLINE bool directory_entry::operator==(const directory_entry& rhs) const noexcept -{ - return _path == rhs._path; -} - -GHC_INLINE bool directory_entry::operator!=(const directory_entry& rhs) const noexcept -{ - return _path != rhs._path; -} - -GHC_INLINE bool directory_entry::operator<=(const directory_entry& rhs) const noexcept -{ - return _path <= rhs._path; -} - -GHC_INLINE bool directory_entry::operator>(const directory_entry& rhs) const noexcept -{ - return _path > rhs._path; -} - -GHC_INLINE bool directory_entry::operator>=(const directory_entry& rhs) const noexcept -{ - return _path >= rhs._path; -} - -//----------------------------------------------------------------------------- -// [fs.class.directory_iterator] class directory_iterator - -#ifdef GHC_OS_WINDOWS -class directory_iterator::impl -{ -public: - impl(const path& p, directory_options options) - : _base(p) - , _options(options) - , _dirHandle(INVALID_HANDLE_VALUE) - { - if (!_base.empty()) { - ZeroMemory(&_findData, sizeof(WIN32_FIND_DATAW)); - if ((_dirHandle = FindFirstFileW(GHC_NATIVEWP((_base / "*")), &_findData)) != INVALID_HANDLE_VALUE) { - if (std::wstring(_findData.cFileName) == L"." || std::wstring(_findData.cFileName) == L"..") { - increment(_ec); - } - else { - _dir_entry._path = _base / std::wstring(_findData.cFileName); - copyToDirEntry(_ec); - } - } - else { - auto error = ::GetLastError(); - _base = filesystem::path(); - if (error != ERROR_ACCESS_DENIED || (options & directory_options::skip_permission_denied) == directory_options::none) { - _ec = detail::make_system_error(); - } - } - } - } - impl(const impl& other) = delete; - ~impl() - { - if (_dirHandle != INVALID_HANDLE_VALUE) { - FindClose(_dirHandle); - _dirHandle = INVALID_HANDLE_VALUE; - } - } - void increment(std::error_code& ec) - { - if (_dirHandle != INVALID_HANDLE_VALUE) { - do { - if (FindNextFileW(_dirHandle, &_findData)) { - _dir_entry._path = _base; -#ifdef GHC_USE_WCHAR_T - _dir_entry._path.append_name(_findData.cFileName); -#else -#ifdef GHC_RAISE_UNICODE_ERRORS - try { - _dir_entry._path.append_name(detail::toUtf8(_findData.cFileName).c_str()); - } - catch (filesystem_error& fe) { - ec = fe.code(); - return; - } -#else - _dir_entry._path.append_name(detail::toUtf8(_findData.cFileName).c_str()); -#endif -#endif - copyToDirEntry(ec); - } - else { - auto err = ::GetLastError(); - if (err != ERROR_NO_MORE_FILES) { - _ec = ec = detail::make_system_error(err); - } - FindClose(_dirHandle); - _dirHandle = INVALID_HANDLE_VALUE; - _dir_entry._path.clear(); - break; - } - } while (std::wstring(_findData.cFileName) == L"." || std::wstring(_findData.cFileName) == L".."); - } - else { - ec = _ec; - } - } - void copyToDirEntry(std::error_code& ec) - { - if (_findData.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) { - _dir_entry._status = detail::status_ex(_dir_entry._path, ec, &_dir_entry._symlink_status, &_dir_entry._file_size, nullptr, &_dir_entry._last_write_time); - } - else { - _dir_entry._status = detail::status_from_INFO(_dir_entry._path, &_findData, ec, &_dir_entry._file_size, &_dir_entry._last_write_time); - _dir_entry._symlink_status = _dir_entry._status; - } - if (ec) { - if (_dir_entry._status.type() != file_type::none && _dir_entry._symlink_status.type() != file_type::none) { - ec.clear(); - } - else { - _dir_entry._file_size = static_cast(-1); - _dir_entry._last_write_time = 0; - } - } - } - path _base; - directory_options _options; - WIN32_FIND_DATAW _findData; - HANDLE _dirHandle; - directory_entry _dir_entry; - std::error_code _ec; -}; -#else -// POSIX implementation -class directory_iterator::impl -{ -public: - impl(const path& path, directory_options options) - : _base(path) - , _options(options) - , _dir(nullptr) - , _entry(nullptr) - { - if (!path.empty()) { - _dir = ::opendir(path.native().c_str()); - if (!_dir) { - auto error = errno; - _base = filesystem::path(); - if ((error != EACCES && error != EPERM) || (options & directory_options::skip_permission_denied) == directory_options::none) { - _ec = detail::make_system_error(); - } - } - else { - increment(_ec); - } - } - } - impl(const impl& other) = delete; - ~impl() - { - if (_dir) { - ::closedir(_dir); - } - } - void increment(std::error_code& ec) - { - if (_dir) { - bool skip; - do { - skip = false; - errno = 0; - _entry = ::readdir(_dir); - if (_entry) { - _dir_entry._path = _base; - _dir_entry._path.append_name(_entry->d_name); - copyToDirEntry(); - if (ec && (ec.value() == EACCES || ec.value() == EPERM) && (_options & directory_options::skip_permission_denied) == directory_options::skip_permission_denied) { - ec.clear(); - skip = true; - } - } - else { - ::closedir(_dir); - _dir = nullptr; - _dir_entry._path.clear(); - if (errno) { - ec = detail::make_system_error(); - } - break; - } - } while (skip || std::strcmp(_entry->d_name, ".") == 0 || std::strcmp(_entry->d_name, "..") == 0); - } - } - - void copyToDirEntry() - { -#ifdef GHC_NO_DIRENT_D_TYPE - _dir_entry._symlink_status = file_status(); - _dir_entry._status = file_status(); -#else - _dir_entry._symlink_status.permissions(perms::unknown); - switch(_entry->d_type) { - case DT_BLK: _dir_entry._symlink_status.type(file_type::block); break; - case DT_CHR: _dir_entry._symlink_status.type(file_type::character); break; - case DT_DIR: _dir_entry._symlink_status.type(file_type::directory); break; - case DT_FIFO: _dir_entry._symlink_status.type(file_type::fifo); break; - case DT_LNK: _dir_entry._symlink_status.type(file_type::symlink); break; - case DT_REG: _dir_entry._symlink_status.type(file_type::regular); break; - case DT_SOCK: _dir_entry._symlink_status.type(file_type::socket); break; - case DT_UNKNOWN: _dir_entry._symlink_status.type(file_type::none); break; - default: _dir_entry._symlink_status.type(file_type::unknown); break; - } - if (_entry->d_type != DT_LNK) { - _dir_entry._status = _dir_entry._symlink_status; - } - else { - _dir_entry._status.type(file_type::none); - _dir_entry._status.permissions(perms::unknown); - } -#endif - _dir_entry._file_size = static_cast(-1); - _dir_entry._hard_link_count = static_cast(-1); - _dir_entry._last_write_time = 0; - } - path _base; - directory_options _options; - DIR* _dir; - struct ::dirent* _entry; - directory_entry _dir_entry; - std::error_code _ec; -}; -#endif - -// [fs.dir.itr.members] member functions -GHC_INLINE directory_iterator::directory_iterator() noexcept - : _impl(new impl(path(), directory_options::none)) -{ -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE directory_iterator::directory_iterator(const path& p) - : _impl(new impl(p, directory_options::none)) -{ - if (_impl->_ec) { - throw filesystem_error(detail::systemErrorText(_impl->_ec.value()), p, _impl->_ec); - } - _impl->_ec.clear(); -} - -GHC_INLINE directory_iterator::directory_iterator(const path& p, directory_options options) - : _impl(new impl(p, options)) -{ - if (_impl->_ec) { - throw filesystem_error(detail::systemErrorText(_impl->_ec.value()), p, _impl->_ec); - } -} -#endif - -GHC_INLINE directory_iterator::directory_iterator(const path& p, std::error_code& ec) noexcept - : _impl(new impl(p, directory_options::none)) -{ - if (_impl->_ec) { - ec = _impl->_ec; - } -} - -GHC_INLINE directory_iterator::directory_iterator(const path& p, directory_options options, std::error_code& ec) noexcept - : _impl(new impl(p, options)) -{ - if (_impl->_ec) { - ec = _impl->_ec; - } -} - -GHC_INLINE directory_iterator::directory_iterator(const directory_iterator& rhs) - : _impl(rhs._impl) -{ -} - -GHC_INLINE directory_iterator::directory_iterator(directory_iterator&& rhs) noexcept - : _impl(std::move(rhs._impl)) -{ -} - -GHC_INLINE directory_iterator::~directory_iterator() {} - -GHC_INLINE directory_iterator& directory_iterator::operator=(const directory_iterator& rhs) -{ - _impl = rhs._impl; - return *this; -} - -GHC_INLINE directory_iterator& directory_iterator::operator=(directory_iterator&& rhs) noexcept -{ - _impl = std::move(rhs._impl); - return *this; -} - -GHC_INLINE const directory_entry& directory_iterator::operator*() const -{ - return _impl->_dir_entry; -} - -GHC_INLINE const directory_entry* directory_iterator::operator->() const -{ - return &_impl->_dir_entry; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE directory_iterator& directory_iterator::operator++() -{ - std::error_code ec; - _impl->increment(ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), _impl->_dir_entry._path, ec); - } - return *this; -} -#endif - -GHC_INLINE directory_iterator& directory_iterator::increment(std::error_code& ec) noexcept -{ - _impl->increment(ec); - return *this; -} - -GHC_INLINE bool directory_iterator::operator==(const directory_iterator& rhs) const -{ - return _impl->_dir_entry._path == rhs._impl->_dir_entry._path; -} - -GHC_INLINE bool directory_iterator::operator!=(const directory_iterator& rhs) const -{ - return _impl->_dir_entry._path != rhs._impl->_dir_entry._path; -} - -// [fs.dir.itr.nonmembers] directory_iterator non-member functions - -GHC_INLINE directory_iterator begin(directory_iterator iter) noexcept -{ - return iter; -} - -GHC_INLINE directory_iterator end(const directory_iterator&) noexcept -{ - return directory_iterator(); -} - -//----------------------------------------------------------------------------- -// [fs.class.rec.dir.itr] class recursive_directory_iterator - -GHC_INLINE recursive_directory_iterator::recursive_directory_iterator() noexcept - : _impl(new recursive_directory_iterator_impl(directory_options::none, true)) -{ - _impl->_dir_iter_stack.push(directory_iterator()); -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE recursive_directory_iterator::recursive_directory_iterator(const path& p) - : _impl(new recursive_directory_iterator_impl(directory_options::none, true)) -{ - _impl->_dir_iter_stack.push(directory_iterator(p)); -} - -GHC_INLINE recursive_directory_iterator::recursive_directory_iterator(const path& p, directory_options options) - : _impl(new recursive_directory_iterator_impl(options, true)) -{ - _impl->_dir_iter_stack.push(directory_iterator(p, options)); -} -#endif - -GHC_INLINE recursive_directory_iterator::recursive_directory_iterator(const path& p, directory_options options, std::error_code& ec) noexcept - : _impl(new recursive_directory_iterator_impl(options, true)) -{ - _impl->_dir_iter_stack.push(directory_iterator(p, options, ec)); -} - -GHC_INLINE recursive_directory_iterator::recursive_directory_iterator(const path& p, std::error_code& ec) noexcept - : _impl(new recursive_directory_iterator_impl(directory_options::none, true)) -{ - _impl->_dir_iter_stack.push(directory_iterator(p, ec)); -} - -GHC_INLINE recursive_directory_iterator::recursive_directory_iterator(const recursive_directory_iterator& rhs) - : _impl(rhs._impl) -{ -} - -GHC_INLINE recursive_directory_iterator::recursive_directory_iterator(recursive_directory_iterator&& rhs) noexcept - : _impl(std::move(rhs._impl)) -{ -} - -GHC_INLINE recursive_directory_iterator::~recursive_directory_iterator() {} - -// [fs.rec.dir.itr.members] observers -GHC_INLINE directory_options recursive_directory_iterator::options() const -{ - return _impl->_options; -} - -GHC_INLINE int recursive_directory_iterator::depth() const -{ - return static_cast(_impl->_dir_iter_stack.size() - 1); -} - -GHC_INLINE bool recursive_directory_iterator::recursion_pending() const -{ - return _impl->_recursion_pending; -} - -GHC_INLINE const directory_entry& recursive_directory_iterator::operator*() const -{ - return *(_impl->_dir_iter_stack.top()); -} - -GHC_INLINE const directory_entry* recursive_directory_iterator::operator->() const -{ - return &(*(_impl->_dir_iter_stack.top())); -} - -// [fs.rec.dir.itr.members] modifiers recursive_directory_iterator& -GHC_INLINE recursive_directory_iterator& recursive_directory_iterator::operator=(const recursive_directory_iterator& rhs) -{ - _impl = rhs._impl; - return *this; -} - -GHC_INLINE recursive_directory_iterator& recursive_directory_iterator::operator=(recursive_directory_iterator&& rhs) noexcept -{ - _impl = std::move(rhs._impl); - return *this; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE recursive_directory_iterator& recursive_directory_iterator::operator++() -{ - std::error_code ec; - increment(ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), _impl->_dir_iter_stack.empty() ? path() : _impl->_dir_iter_stack.top()->path(), ec); - } - return *this; -} -#endif - -GHC_INLINE recursive_directory_iterator& recursive_directory_iterator::increment(std::error_code& ec) noexcept -{ - bool isSymLink = (*this)->is_symlink(ec); - bool isDir = !ec && (*this)->is_directory(ec); - if(isSymLink && detail::is_not_found_error(ec)) { - ec.clear(); - } - if(!ec) { - if (recursion_pending() && isDir && (!isSymLink || (options() & directory_options::follow_directory_symlink) != directory_options::none)) { - _impl->_dir_iter_stack.push(directory_iterator((*this)->path(), _impl->_options, ec)); - } - else { - _impl->_dir_iter_stack.top().increment(ec); - } - if (!ec) { - while (depth() && _impl->_dir_iter_stack.top() == directory_iterator()) { - _impl->_dir_iter_stack.pop(); - _impl->_dir_iter_stack.top().increment(ec); - } - } - else if (!_impl->_dir_iter_stack.empty()) { - _impl->_dir_iter_stack.pop(); - } - _impl->_recursion_pending = true; - } - return *this; -} - -#ifdef GHC_WITH_EXCEPTIONS -GHC_INLINE void recursive_directory_iterator::pop() -{ - std::error_code ec; - pop(ec); - if (ec) { - throw filesystem_error(detail::systemErrorText(ec.value()), _impl->_dir_iter_stack.empty() ? path() : _impl->_dir_iter_stack.top()->path(), ec); - } -} -#endif - -GHC_INLINE void recursive_directory_iterator::pop(std::error_code& ec) -{ - if (depth() == 0) { - *this = recursive_directory_iterator(); - } - else { - do { - _impl->_dir_iter_stack.pop(); - _impl->_dir_iter_stack.top().increment(ec); - } while (depth() && _impl->_dir_iter_stack.top() == directory_iterator()); - } -} - -GHC_INLINE void recursive_directory_iterator::disable_recursion_pending() -{ - _impl->_recursion_pending = false; -} - -// other members as required by [input.iterators] -GHC_INLINE bool recursive_directory_iterator::operator==(const recursive_directory_iterator& rhs) const -{ - return _impl->_dir_iter_stack.top() == rhs._impl->_dir_iter_stack.top(); -} - -GHC_INLINE bool recursive_directory_iterator::operator!=(const recursive_directory_iterator& rhs) const -{ - return _impl->_dir_iter_stack.top() != rhs._impl->_dir_iter_stack.top(); -} - -// [fs.rec.dir.itr.nonmembers] directory_iterator non-member functions -GHC_INLINE recursive_directory_iterator begin(recursive_directory_iterator iter) noexcept -{ - return iter; -} - -GHC_INLINE recursive_directory_iterator end(const recursive_directory_iterator&) noexcept -{ - return recursive_directory_iterator(); -} - -#endif // GHC_EXPAND_IMPL - -} // namespace filesystem -} // namespace ghc - -// cleanup some macros -#undef GHC_INLINE -#undef GHC_EXPAND_IMPL - -#endif // GHC_FILESYSTEM_H diff --git a/src/third-party/ghc/fs_fwd.hpp b/src/third-party/ghc/fs_fwd.hpp deleted file mode 100644 index 31188d1623f15..0000000000000 --- a/src/third-party/ghc/fs_fwd.hpp +++ /dev/null @@ -1,38 +0,0 @@ -//--------------------------------------------------------------------------------------- -// -// ghc::filesystem - A C++17-like filesystem implementation for C++11/C++14 -// -//--------------------------------------------------------------------------------------- -// -// Copyright (c) 2018, Steffen Schümann -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -//--------------------------------------------------------------------------------------- -// fs_fwd.hpp - The forwarding header for the header/implementation seperated usage of -// ghc::filesystem. -// This file can be include at any place, where ghc::filesystem api is needed while -// not bleeding implementation details (e.g. system includes) into the global namespace, -// as long as one cpp includes fs_impl.hpp to deliver the matching implementations. -//--------------------------------------------------------------------------------------- -#ifndef GHC_FILESYSTEM_FWD_H -#define GHC_FILESYSTEM_FWD_H -#define GHC_FILESYSTEM_FWD -#include -#endif // GHC_FILESYSTEM_FWD_H diff --git a/src/third-party/ghc/fs_impl.hpp b/src/third-party/ghc/fs_impl.hpp deleted file mode 100644 index 92e3eaefe6187..0000000000000 --- a/src/third-party/ghc/fs_impl.hpp +++ /dev/null @@ -1,35 +0,0 @@ -//--------------------------------------------------------------------------------------- -// -// ghc::filesystem - A C++17-like filesystem implementation for C++11/C++14 -// -//--------------------------------------------------------------------------------------- -// -// Copyright (c) 2018, Steffen Schümann -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -//--------------------------------------------------------------------------------------- -// fs_impl.hpp - The implementation header for the header/implementation seperated usage of -// ghc::filesystem. -// This file can be used to hide the implementation of ghc::filesystem into a single cpp. -// The cpp has to include this before including fs_fwd.hpp directly or via a different -// header to work. -//--------------------------------------------------------------------------------------- -#define GHC_FILESYSTEM_IMPLEMENTATION -#include diff --git a/src/third-party/ghc/fs_std.hpp b/src/third-party/ghc/fs_std.hpp deleted file mode 100644 index c9492fdcbb687..0000000000000 --- a/src/third-party/ghc/fs_std.hpp +++ /dev/null @@ -1,60 +0,0 @@ -//--------------------------------------------------------------------------------------- -// -// ghc::filesystem - A C++17-like filesystem implementation for C++11/C++14 -// -//--------------------------------------------------------------------------------------- -// -// Copyright (c) 2018, Steffen Schümann -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -//--------------------------------------------------------------------------------------- -// fs_std.hpp - The dynamic switching header that includes std::filesystem if detected -// or ghc::filesystem if not, and makes the resulting API available in the -// namespace fs. -//--------------------------------------------------------------------------------------- -#ifndef GHC_FILESYSTEM_STD_H -#define GHC_FILESYSTEM_STD_H -#if defined(__APPLE__) -#include -#endif -#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || (defined(__cplusplus) && __cplusplus >= 201703L)) && defined(__has_include) -#if __has_include() && (!defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) -#define GHC_USE_STD_FS -#include -namespace fs { -using namespace std::filesystem; -using ifstream = std::ifstream; -using ofstream = std::ofstream; -using fstream = std::fstream; -} -#endif -#endif -#ifndef GHC_USE_STD_FS -//#define GHC_WIN_DISABLE_WSTRING_STORAGE_TYPE -#include -namespace fs { -using namespace ghc::filesystem; -using ifstream = ghc::filesystem::ifstream; -using ofstream = ghc::filesystem::ofstream; -using fstream = ghc::filesystem::fstream; -} -#endif -#endif // GHC_FILESYSTEM_STD_H - diff --git a/src/third-party/ghc/fs_std_fwd.hpp b/src/third-party/ghc/fs_std_fwd.hpp deleted file mode 100644 index 163c956ac9ad1..0000000000000 --- a/src/third-party/ghc/fs_std_fwd.hpp +++ /dev/null @@ -1,63 +0,0 @@ -//--------------------------------------------------------------------------------------- -// -// ghc::filesystem - A C++17-like filesystem implementation for C++11/C++14 -// -//--------------------------------------------------------------------------------------- -// -// Copyright (c) 2018, Steffen Schümann -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -//--------------------------------------------------------------------------------------- -// fs_std_fwd.hpp - The forwarding header for the header/implementation seperated usage of -// ghc::filesystem that uses std::filesystem if it detects it. -// This file can be include at any place, where fs::filesystem api is needed while -// not bleeding implementation details (e.g. system includes) into the global namespace, -// as long as one cpp includes fs_std_impl.hpp to deliver the matching implementations. -//--------------------------------------------------------------------------------------- -#ifndef GHC_FILESYSTEM_STD_FWD_H -#define GHC_FILESYSTEM_STD_FWD_H -#if defined(__APPLE__) -#include -#endif -#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || (defined(__cplusplus) && __cplusplus >= 201703L)) && defined(__has_include) -#if __has_include() && (!defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) -#define GHC_USE_STD_FS -#include -namespace fs { -using namespace std::filesystem; -using ifstream = std::ifstream; -using ofstream = std::ofstream; -using fstream = std::fstream; -} -#endif -#endif -#ifndef GHC_USE_STD_FS -//#define GHC_WIN_DISABLE_WSTRING_STORAGE_TYPE -#define GHC_FILESYSTEM_FWD -#include -namespace fs { -using namespace ghc::filesystem; -using ifstream = ghc::filesystem::ifstream; -using ofstream = ghc::filesystem::ofstream; -using fstream = ghc::filesystem::fstream; -} -#endif -#endif // GHC_FILESYSTEM_STD_FWD_H - diff --git a/src/third-party/ghc/fs_std_impl.hpp b/src/third-party/ghc/fs_std_impl.hpp deleted file mode 100644 index 7042edca227a2..0000000000000 --- a/src/third-party/ghc/fs_std_impl.hpp +++ /dev/null @@ -1,46 +0,0 @@ -//--------------------------------------------------------------------------------------- -// -// ghc::filesystem - A C++17-like filesystem implementation for C++11/C++14 -// -//--------------------------------------------------------------------------------------- -// -// Copyright (c) 2018, Steffen Schümann -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -//--------------------------------------------------------------------------------------- -// fs_std_impl.hpp - The implementation header for the header/implementation seperated usage of -// ghc::filesystem that does nothing if std::filesystem is detected. -// This file can be used to hide the implementation of ghc::filesystem into a single cpp. -// The cpp has to include this before including fs_std_fwd.hpp directly or via a different -// header to work. -//--------------------------------------------------------------------------------------- -#if defined(__APPLE__) -#include -#endif -#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || (defined(__cplusplus) && __cplusplus >= 201703L)) && defined(__has_include) -#if __has_include() && (!defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) -#define GHC_USE_STD_FS -#endif -#endif -#ifndef GHC_USE_STD_FS -//#define GHC_WIN_DISABLE_WSTRING_STORAGE_TYPE -#define GHC_FILESYSTEM_IMPLEMENTATION -#include -#endif diff --git a/src/third-party/imgui/imgui.cpp b/src/third-party/imgui/imgui.cpp index 27957927684e5..1d20166f405e5 100644 --- a/src/third-party/imgui/imgui.cpp +++ b/src/third-party/imgui/imgui.cpp @@ -21,7 +21,7 @@ // - Issues & support ........... https://github.com/ocornut/imgui/issues // - Test Engine & Automation ... https://github.com/ocornut/imgui_test_engine (test suite, test engine to automate your apps) -// For first-time users having issues compiling/linking/running/loading fonts: +// For first-time users having issues c++/linking/running/loading fonts: // please post in https://github.com/ocornut/imgui/discussions if you cannot find a solution in resources above. // Everything else should be asked in 'Issues'! We are building a database of cross-linked knowledge there. diff --git a/src/third-party/imgui/imgui.h b/src/third-party/imgui/imgui.h index 8e443f95d0621..f4be96b6fce26 100644 --- a/src/third-party/imgui/imgui.h +++ b/src/third-party/imgui/imgui.h @@ -22,7 +22,7 @@ // - Issues & support ........... https://github.com/ocornut/imgui/issues // - Test Engine & Automation ... https://github.com/ocornut/imgui_test_engine (test suite, test engine to automate your apps) -// For first-time users having issues compiling/linking/running/loading fonts: +// For first-time users having issues c++/linking/running/loading fonts: // please post in https://github.com/ocornut/imgui/discussions if you cannot find a solution in resources above. // Everything else should be asked in 'Issues'! We are building a database of cross-linked knowledge there. diff --git a/src/timed_event.cpp b/src/timed_event.cpp index 0e41568917512..65d1e8bb77a71 100644 --- a/src/timed_event.cpp +++ b/src/timed_event.cpp @@ -283,7 +283,7 @@ void timed_event::actualize() case timed_event_type::DSA_ALRP_SUMMON: { const tripoint_abs_sm u_pos = player_character.global_sm_location(); if( rl_dist( u_pos, map_point ) <= 4 ) { - const tripoint_bub_ms spot = here.bub_from_abs( project_to( map_point ) ); + const tripoint_bub_ms spot = here.get_bub( project_to( map_point ) ); monster dispatcher( mon_dsa_alien_dispatch ); fake_spell summoning( spell_dks_summon_alrp, true, 12 ); summoning.get_spell( player_character ).cast_all_effects( dispatcher, spot ); diff --git a/src/translation_document.cpp b/src/translation_document.cpp index 89be81fd528b9..da8d489e6657d 100644 --- a/src/translation_document.cpp +++ b/src/translation_document.cpp @@ -63,7 +63,7 @@ std::size_t TranslationDocument::EvaluatePluralForm( std::size_t n ) const TranslationDocument::TranslationDocument( const std::string &path ) { try { - const uintmax_t file_size = fs::file_size( fs::u8path( path ) ); + const uintmax_t file_size = std::filesystem::file_size( std::filesystem::u8path( path ) ); if( file_size < 20 ) { throw InvalidTranslationDocumentException( path, "file too small" ); } diff --git a/src/trapfunc.cpp b/src/trapfunc.cpp index 0f9c3da7ee7af..744ea97dd32a7 100644 --- a/src/trapfunc.cpp +++ b/src/trapfunc.cpp @@ -62,10 +62,19 @@ static const efftype_id effect_tetanus( "tetanus" ); static const flag_id json_flag_PROXIMITY( "PROXIMITY" ); static const flag_id json_flag_UNCONSUMED( "UNCONSUMED" ); +static const itype_id itype_beartrap( "beartrap" ); +static const itype_id itype_bolt_steel( "bolt_steel" ); static const itype_id itype_bullwhip( "bullwhip" ); +static const itype_id itype_crossbow( "crossbow" ); +static const itype_id itype_glass_shard( "glass_shard" ); static const itype_id itype_grapnel( "grapnel" ); static const itype_id itype_grenade_act( "grenade_act" ); +static const itype_id itype_light_snare_kit( "light_snare_kit" ); +static const itype_id itype_pointy_stick( "pointy_stick" ); static const itype_id itype_rope_30( "rope_30" ); +static const itype_id itype_shotgun_d( "shotgun_d" ); +static const itype_id itype_shotgun_s( "shotgun_s" ); +static const itype_id itype_string_36( "string_36" ); static const json_character_flag json_flag_INFECTION_IMMUNE( "INFECTION_IMMUNE" ); @@ -210,7 +219,7 @@ bool trapfunc::beartrap( const tripoint_bub_ms &p, Creature *c, item * ) } c->check_dead_state(); } else { - here.spawn_item( p, "beartrap" ); + here.spawn_item( p, itype_beartrap ); } return true; @@ -373,7 +382,7 @@ bool trapfunc::eocs( const tripoint_bub_ms &p, Creature *critter, item * ) } map &here = get_map(); trap tr = here.tr_at( p ); - const tripoint_abs_ms trap_location = get_map().getglobal( p ); + const tripoint_abs_ms trap_location = get_map().get_abs( p ); for( const effect_on_condition_id &eoc : tr.eocs ) { dialogue d( get_talker_for( critter ), nullptr ); write_var_value( var_type::context, "trap_location", &d, trap_location.to_string() ); @@ -541,10 +550,10 @@ bool trapfunc::crossbow( const tripoint_bub_ms &p, Creature *c, item * ) } map &here = get_map(); here.remove_trap( p ); - here.spawn_item( p, "crossbow" ); - here.spawn_item( p, "string_36" ); + here.spawn_item( p, itype_crossbow ); + here.spawn_item( p, itype_string_36 ); if( add_bolt ) { - here.spawn_item( p, "bolt_steel", 1, 1 ); + here.spawn_item( p, itype_bolt_steel, 1, 1 ); } return true; } @@ -645,8 +654,8 @@ bool trapfunc::shotgun( const tripoint_bub_ms &p, Creature *c, item * ) c->check_dead_state(); } - here.spawn_item( p, here.tr_at( p ) == tr_shotgun_1 ? "shotgun_s" : "shotgun_d" ); - here.spawn_item( p, "string_36" ); + here.spawn_item( p, here.tr_at( p ) == tr_shotgun_1 ? itype_shotgun_s : itype_shotgun_d ); + here.spawn_item( p, itype_string_36 ); here.remove_trap( p ); return true; } @@ -691,7 +700,7 @@ bool trapfunc::snare_light( const tripoint_bub_ms &p, Creature *c, item * ) } // Always get trap components back on triggering tile - here.spawn_item( p, "light_snare_kit" ); + here.spawn_item( p, itype_light_snare_kit ); return true; } @@ -1063,7 +1072,7 @@ bool trapfunc::pit_spikes( const tripoint_bub_ms &p, Creature *c, item * ) // 4 spears to a pit for( int i = 0; i < 4; i++ ) { if( one_in( 3 ) ) { - here.spawn_item( p, "pointy_stick" ); + here.spawn_item( p, itype_pointy_stick ); } } } @@ -1153,7 +1162,7 @@ bool trapfunc::pit_glass( const tripoint_bub_ms &p, Creature *c, item * ) // 20 shards in a pit. for( int i = 0; i < 20; i++ ) { if( one_in( 3 ) ) { - here.spawn_item( p, "glass_shard" ); + here.spawn_item( p, itype_glass_shard ); } } } diff --git a/src/turret.cpp b/src/turret.cpp index 89d8c878f65e4..4dddc032b5816 100644 --- a/src/turret.cpp +++ b/src/turret.cpp @@ -392,7 +392,7 @@ int vehicle::turrets_aim_and_fire( std::vector &turrets ) if( has_target ) { turret_data turret = turret_query( *t ); npc &cpu = t->get_targeting_npc( *this ); - shots += turret.fire( cpu, get_map().bub_from_abs( t->target.second ) ); + shots += turret.fire( cpu, get_map().get_bub( t->target.second ) ); t->reset_target( bub_part_pos( *t ) ); } } @@ -433,7 +433,7 @@ bool vehicle::turrets_aim( std::vector &turrets ) // Set target for any turret in range for( vehicle_part *t : turrets ) { if( turret_query( *t ).in_range( target ) ) { - t->target.second = get_map().getglobal( target ); + t->target.second = get_map().get_abs( target ); } } @@ -653,7 +653,7 @@ int vehicle::automatic_fire_turret( vehicle_part &pt ) } else { // Target is already set, make sure we didn't move after aiming (it's a bug if we did). - if( pos != get_map().bub_from_abs( target.first ) ) { + if( pos != get_map().get_bub( target.first ) ) { target.second = target.first; debugmsg( "%s moved after aiming but before it could fire.", cpu.get_name() ); return shots; @@ -661,7 +661,7 @@ int vehicle::automatic_fire_turret( vehicle_part &pt ) } // Get the turret's target and reset it - tripoint_bub_ms targ( get_map().bub_from_abs( target.second ) ); + tripoint_bub_ms targ( get_map().get_bub( target.second ) ); pt.reset_target( pos ); shots = gun.fire( cpu, targ ); diff --git a/src/veh_appliance.cpp b/src/veh_appliance.cpp index 663842cb306f0..fd1f2a72aab25 100644 --- a/src/veh_appliance.cpp +++ b/src/veh_appliance.cpp @@ -408,10 +408,10 @@ void veh_app_interact::refill() const point_rel_ms q = veh->coord_translate( pt->mount ); map &here = get_map(); for( const tripoint_bub_ms &p : veh->get_points( true ) ) { - act.coord_set.insert( here.getglobal( p ) ); + act.coord_set.insert( here.get_abs( p ) ); } - act.values.push_back( here.getglobal( veh->pos_bub() ).x() + q.x() ); - act.values.push_back( here.getglobal( veh->pos_bub() ).y() + q.y() ); + act.values.push_back( here.get_abs( veh->pos_bub() ).x() + q.x() ); + act.values.push_back( here.get_abs( veh->pos_bub() ).y() + q.y() ); act.values.push_back( a_point.x() ); act.values.push_back( a_point.y() ); act.values.push_back( -a_point.x() ); @@ -497,9 +497,9 @@ void veh_app_interact::remove() act = player_activity( ACT_VEHICLE, to_moves( time ), static_cast( 'O' ) ); act.str_values.push_back( vpinfo.id.str() ); for( const tripoint_bub_ms &p : veh->get_points( true ) ) { - act.coord_set.insert( here.getglobal( p ) ); + act.coord_set.insert( here.get_abs( p ) ); } - const tripoint a_point_abs( here.getglobal( a_point_bub ).raw() ); + const tripoint a_point_abs( here.get_abs( a_point_bub ).raw() ); act.values.push_back( a_point_abs.x ); act.values.push_back( a_point_abs.y ); act.values.push_back( a_point.x() ); diff --git a/src/veh_interact.cpp b/src/veh_interact.cpp index 76816675ccefb..9c7bf9f55cd71 100644 --- a/src/veh_interact.cpp +++ b/src/veh_interact.cpp @@ -178,10 +178,10 @@ player_activity veh_interact::serialize_activity() const vehicle_part *vpt = pt ? pt : &veh->part( 0 ); map &here = get_map(); for( const tripoint_bub_ms &p : veh->get_points( true ) ) { - res.coord_set.insert( here.getglobal( p ) ); + res.coord_set.insert( here.get_abs( p ) ); } - res.values.push_back( here.getglobal( veh->pos_bub() ).x() + q.x() ); // values[0] - res.values.push_back( here.getglobal( veh->pos_bub() ).y() + q.y() ); // values[1] + res.values.push_back( here.get_abs( veh->pos_bub() ).x() + q.x() ); // values[0] + res.values.push_back( here.get_abs( veh->pos_bub() ).y() + q.y() ); // values[1] res.values.push_back( dd.x() ); // values[2] res.values.push_back( dd.y() ); // values[3] res.values.push_back( -dd.x() ); // values[4] @@ -512,8 +512,8 @@ void veh_interact::do_main_loop() const int description_scroll_lines = catacurses::getmaxy( w_parts ) - 4; const std::string action = main_context.handle_input(); msg.reset(); - if( const std::optional vec = main_context.get_direction( action ) ) { - move_cursor( point_rel_ms( vec->xy() ) ); + if( const std::optional vec = main_context.get_direction_rel_ms( action ) ) { + move_cursor( vec->xy() ); } else if( action == "QUIT" ) { finish = true; } else if( action == "INSTALL" ) { @@ -3054,7 +3054,7 @@ void veh_interact::complete_vehicle( Character &you ) // during this player/NPCs activity. // check the vehicle points that were stored at beginning of activity. for( const tripoint_abs_ms &pt : you.activity.coord_set ) { - ovp = here.veh_at( here.bub_from_abs( pt ) ); + ovp = here.veh_at( here.get_bub( pt ) ); if( ovp ) { break; } diff --git a/src/veh_shape.cpp b/src/veh_shape.cpp index fa3b64f378245..c4335fddeec2a 100644 --- a/src/veh_shape.cpp +++ b/src/veh_shape.cpp @@ -208,7 +208,7 @@ bool veh_shape::handle_cursor_movement( const std::string &action ) if( action == "MOUSE_MOVE" || action == "TIMEOUT" ) { tripoint_rel_ms edge_scroll = g->mouse_edge_scrolling_terrain( ctxt ); set_cursor_pos( get_cursor_pos() + edge_scroll ); - } else if( const std::optional delta = ctxt.get_direction( action ) ) { + } else if( const std::optional delta = ctxt.get_direction_rel_ms( action ) ) { set_cursor_pos( get_cursor_pos() + *delta ); // move cursor with directional keys } else if( action == "zoom_in" ) { g->zoom_in(); diff --git a/src/vehicle.cpp b/src/vehicle.cpp index f38c3545daa22..d2a947eef3d44 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -180,7 +180,7 @@ void DefaultRemovePartHandler::removed( vehicle &veh, const int part ) here.add_vehicle_to_cache( &veh ); here.memory_cache_dec_set_dirty( part_pos, true ); player_character.memorize_clear_decoration( - here.getglobal( part_pos ), "vp_" + vp.info().id.str() ); + here.get_abs( part_pos ), "vp_" + vp.info().id.str() ); } // Vehicle stack methods. @@ -652,7 +652,7 @@ void vehicle::autopilot_patrol() autodrive_local_target = tripoint_abs_ms::zero; return; } - if( !here.inbounds( here.bub_from_abs( autodrive_local_target ) ) ) { + if( !here.inbounds( here.get_bub( autodrive_local_target ) ) ) { autodrive_local_target = tripoint_abs_ms::zero; is_patrolling = false; return; @@ -711,8 +711,8 @@ std::set vehicle::immediate_path( const units::angle &rotate ) map &here = get_map(); point_bub_ms top_left_actual = pos_bub().xy() + coord_translate( front_left ); point_bub_ms top_right_actual = pos_bub().xy() + coord_translate( front_right ); - std::vector front_row = line_to( here.getglobal( tripoint_bub_ms{top_left_actual.x(), top_left_actual.y(), here.get_abs_sub().z()} ).xy(), - here.getglobal( tripoint_bub_ms{ top_right_actual.x(), top_right_actual.y(), here.get_abs_sub().z()} ).xy() ); + std::vector front_row = line_to( here.get_abs( tripoint_bub_ms{top_left_actual.x(), top_left_actual.y(), here.get_abs_sub().z()} ).xy(), + here.get_abs( tripoint_bub_ms{ top_right_actual.x(), top_right_actual.y(), here.get_abs_sub().z()} ).xy() ); for( const point_abs_ms &elem : front_row ) { for( int i = 0; i < distance_to_check; ++i ) { collision_vector.advance( i ); @@ -784,12 +784,12 @@ void vehicle::drive_to_local_target( const tripoint_abs_ms &target, bool follow_ player_character.current_movement_mode()->move_speed_mult(); if( follow_protocol ) { if( ( ( turn_x > 0 || turn_x < 0 ) && velocity > safe_player_follow_speed ) || - rl_dist( vehpos, here.getglobal( player_character.pos_bub() ) ) < 7 + ( ( + rl_dist( vehpos, here.get_abs( player_character.pos_bub() ) ) < 7 + ( ( mount_max.y() * 3 ) + 4 ) ) { accel_y = 1; } if( ( velocity < std::min( safe_velocity(), safe_player_follow_speed ) && turn_x == 0 && - rl_dist( vehpos, here.getglobal( player_character.pos_bub() ) ) > 8 + ( ( + rl_dist( vehpos, here.get_abs( player_character.pos_bub() ) ) > 8 + ( ( mount_max.y() * 3 ) + 4 ) ) || velocity < 100 ) { accel_y = -1; @@ -821,7 +821,7 @@ bool vehicle::precollision_check( units::angle &angle, map &here, bool follow_pr bool stop = false; creature_tracker &creatures = get_creature_tracker(); for( const point_abs_ms &pt_elem : points_to_check ) { - point_bub_ms elem = here.bub_from_abs( point_abs_ms( pt_elem ) ); + point_bub_ms elem = here.get_bub( point_abs_ms( pt_elem ) ); if( stop ) { break; } @@ -3613,7 +3613,7 @@ monster *vehicle::get_monster( int p ) const tripoint_abs_ms vehicle::global_square_location() const { - return get_map().getglobal( pos_bub() ); + return get_map().get_abs( pos_bub() ); } tripoint_abs_omt vehicle::global_omt_location() const @@ -4794,8 +4794,8 @@ units::power vehicle::static_drag( bool actual ) const is_actively_towed = false; } else { map &here = get_map(); - const tripoint_abs_ms towed_tow_point = here.getglobal( bub_part_pos( tow_index ) ); - const tripoint_abs_ms tower_tow_point = here.getglobal( towing_veh->bub_part_pos( + const tripoint_abs_ms towed_tow_point = here.get_abs( bub_part_pos( tow_index ) ); + const tripoint_abs_ms tower_tow_point = here.get_abs( towing_veh->bub_part_pos( other_tow_index ) ); is_actively_towed = rl_dist( towed_tow_point, tower_tow_point ) >= 6; } @@ -5305,7 +5305,7 @@ units::power vehicle::total_solar_epower() const for( const int p : solar_panels ) { const vehicle_part &vp = parts[p]; const tripoint_bub_ms pos = bub_part_pos( vp ); - if( vp.is_unavailable() || !is_sm_tile_outside( here.getglobal( pos ) ) ) { + if( vp.is_unavailable() || !is_sm_tile_outside( here.get_abs( pos ) ) ) { continue; } @@ -5328,11 +5328,11 @@ units::power vehicle::total_wind_epower() const for( const int p : wind_turbines ) { const vehicle_part &vp = parts[p]; const tripoint_bub_ms pos = bub_part_pos( vp ); - if( vp.is_unavailable() || !is_sm_tile_outside( here.getglobal( pos ) ) ) { + if( vp.is_unavailable() || !is_sm_tile_outside( here.get_abs( pos ) ) ) { continue; } - int windpower = get_local_windpower( weather.windspeed, cur_om_ter, here.getglobal( pos ), + int windpower = get_local_windpower( weather.windspeed, cur_om_ter, here.get_abs( pos ), weather.winddirection, false ); if( windpower <= ( weather.windspeed / 10.0 ) ) { continue; @@ -5349,7 +5349,7 @@ units::power vehicle::total_water_wheel_epower() const for( const int p : water_wheels ) { const vehicle_part &vp = parts[p]; const tripoint_bub_ms pos = bub_part_pos( vp ); - if( vp.is_unavailable() || !is_sm_tile_over_water( here.getglobal( pos ) ) ) { + if( vp.is_unavailable() || !is_sm_tile_over_water( here.get_abs( pos ) ) ) { continue; } @@ -6298,7 +6298,7 @@ void vehicle::place_zones( map &pmap ) const return; } for( vehicle_prototype::zone_def const &d : type->zone_defs ) { - tripoint_abs_ms const pt = pmap.getglobal( tripoint_bub_ms( rebase_bub( pos.raw() + d.pt ), + tripoint_abs_ms const pt = pmap.get_abs( tripoint_bub_ms( rebase_bub( pos.raw() + d.pt ), pmap.get_abs_sub().z() ) ); mapgen_place_zone( pt, pt, d.zone_type, get_owner(), d.name, d.filter, &pmap ); } @@ -6936,8 +6936,8 @@ void vehicle::do_towing_move() return; } map &here = get_map(); - const tripoint_abs_ms tower_tow_point = here.getglobal( bub_part_pos( tow_index ) ); - const tripoint_abs_ms towed_tow_point = here.getglobal( towed_veh->bub_part_pos( + const tripoint_abs_ms tower_tow_point = here.get_abs( bub_part_pos( tow_index ) ); + const tripoint_abs_ms towed_tow_point = here.get_abs( towed_veh->bub_part_pos( other_tow_index ) ); // same as above, but where the pulling vehicle is pulling from units::angle towing_veh_angle = towed_veh->get_angle_from_targ( tower_tow_point ); @@ -6968,15 +6968,15 @@ void vehicle::do_towing_move() default: towed_veh->skidding = true; - std::vector lineto = line_to( here.bub_from_abs( towed_tow_point ), - here.bub_from_abs( tower_tow_point ) ); + std::vector lineto = line_to( here.get_bub( towed_tow_point ), + here.get_bub( tower_tow_point ) ); tripoint_bub_ms nearby_destination; if( lineto.size() >= 2 ) { nearby_destination = lineto[1]; } else { - nearby_destination = here.bub_from_abs( tower_tow_point ); + nearby_destination = here.get_bub( tower_tow_point ); } - const tripoint_rel_ms destination_delta( here.bub_from_abs( tower_tow_point ).xy() - + const tripoint_rel_ms destination_delta( here.get_bub( tower_tow_point ).xy() - nearby_destination.xy() + tripoint_rel_ms( 0, 0, towed_veh->pos_bub().z() ) ); const tripoint_rel_ms move_destination( clamp( destination_delta.x(), -1, 1 ), @@ -7154,7 +7154,7 @@ bool vehicle::tow_cable_too_far() const return false; } map &here = get_map(); - tripoint_abs_ms towing_point = here.getglobal( bub_part_pos( index ) ); + tripoint_abs_ms towing_point = here.get_abs( bub_part_pos( index ) ); if( !tow_data.get_towed_by()->tow_data.get_towed() ) { debugmsg( "vehicle %s has data for a towing vehicle, but that towing vehicle does not have %s listed as towed", disp_name(), disp_name() ); @@ -7165,7 +7165,7 @@ bool vehicle::tow_cable_too_far() const debugmsg( "towing data exists but no towing part" ); return false; } - tripoint_abs_ms towed_point = here.getglobal( tow_data.get_towed_by()->bub_part_pos( + tripoint_abs_ms towed_point = here.get_abs( tow_data.get_towed_by()->bub_part_pos( other_index ) ); if( towing_point == tripoint_abs_ms::zero || towed_point == tripoint_abs_ms::zero ) { debugmsg( "towing data exists but no towing part" ); @@ -7187,7 +7187,7 @@ bool vehicle::no_towing_slack() const return false; } map &here = get_map(); - tripoint_abs_ms towing_point = here.getglobal( bub_part_pos( index ) ); + tripoint_abs_ms towing_point = here.get_abs( bub_part_pos( index ) ); if( !tow_data.get_towed()->tow_data.get_towed_by() ) { debugmsg( "vehicle %s has data for a towed vehicle, but that towed vehicle does not have %s listed as tower", disp_name(), disp_name() ); @@ -7198,7 +7198,7 @@ bool vehicle::no_towing_slack() const debugmsg( "towing data exists but no towing part" ); return false; } - tripoint_abs_ms towed_point = here.getglobal( tow_data.get_towed()->bub_part_pos( other_index ) ); + tripoint_abs_ms towed_point = here.get_abs( tow_data.get_towed()->bub_part_pos( other_index ) ); if( towing_point == tripoint_abs_ms::zero || towed_point == tripoint_abs_ms::zero ) { debugmsg( "towing data exists but no towing part" ); return false; @@ -7212,7 +7212,7 @@ std::optional vehicle::get_remote_part( const vehicle_part &vp_ vehicle *veh = find_vehicle( tripoint_abs_ms( vp_local.target.second ) ); // If the target vehicle is still there, ask it to remove its part if( veh != nullptr ) { - const tripoint_abs_ms local_abs = get_map().getglobal( bub_part_pos( vp_local ) ); + const tripoint_abs_ms local_abs = get_map().get_abs( bub_part_pos( vp_local ) ); for( const int remote_partnum : veh->loose_parts ) { if( veh->parts[remote_partnum].target.first == local_abs && veh->parts[remote_partnum].info().has_flag( VPFLAG_POWER_TRANSFER ) ) { @@ -7252,7 +7252,7 @@ void vehicle::shed_loose_parts( const trinary shed_cables, const tripoint_bub_ms // Skip cables if we're only calling shed_loose_parts to remove parts with UNMOUNT_ON_MOVE. continue; } - tripoint_abs_ms vp_loose_dst = here.getglobal( dst ? *dst + vp_loose.precalc[1] : bub_part_pos( + tripoint_abs_ms vp_loose_dst = here.get_abs( dst ? *dst + vp_loose.precalc[1] : bub_part_pos( vp_loose ) ); const int distance = rl_dist( vp_loose_dst, vp_loose.target.first ); const int max_dist = vp_loose.get_base().max_link_length(); @@ -7266,7 +7266,7 @@ void vehicle::shed_loose_parts( const trinary shed_cables, const tripoint_bub_ms const auto remote = get_remote_part( vp_loose ); if( remote ) { remote->part().target.first = vp_loose_dst; - remote->part().target.second = here.getglobal( dst ? *dst : pos_bub() ); + remote->part().target.second = here.get_abs( dst ? *dst : pos_bub() ); } continue; } @@ -7881,8 +7881,9 @@ time_duration vehicle::folding_time() const { const vehicle_part_range vpr = get_all_parts(); return std::accumulate( vpr.begin(), vpr.end(), time_duration(), - []( time_duration & acc, const vpart_reference & part ) { - return acc + ( part.part().removed ? time_duration() : part.info().get_folding_time() ); + []( time_duration acc, const vpart_reference & part ) { + return acc + ( part.part().removed ? time_duration() : + part.info().get_folding_time() ); } ); } @@ -7890,8 +7891,9 @@ time_duration vehicle::unfolding_time() const { const vehicle_part_range vpr = get_all_parts(); return std::accumulate( vpr.begin(), vpr.end(), time_duration(), - []( time_duration & acc, const vpart_reference & part ) { - return acc + ( part.part().removed ? time_duration() : part.info().get_unfolding_time() ); + []( time_duration acc, const vpart_reference & part ) { + return acc + ( part.part().removed ? time_duration() : + part.info().get_unfolding_time() ); } ); } @@ -8209,7 +8211,7 @@ void vehicle::update_time( const time_point &update_to ) const vehicle_part &pt = parts[idx]; // we need an unbroken funnel mounted on the exterior of the vehicle - if( pt.is_unavailable() || !is_sm_tile_outside( here.getglobal( bub_part_pos( pt ) ) ) ) { + if( pt.is_unavailable() || !is_sm_tile_outside( here.get_abs( bub_part_pos( pt ) ) ) ) { continue; } @@ -8247,7 +8249,7 @@ void vehicle::update_time( const time_point &update_to ) for( const int p : solar_panels ) { const vehicle_part &vp = parts[p]; const tripoint_bub_ms pos = bub_part_pos( vp ); - if( vp.is_unavailable() || !is_sm_tile_outside( here.getglobal( pos ) ) ) { + if( vp.is_unavailable() || !is_sm_tile_outside( here.get_abs( pos ) ) ) { continue; } epower += part_epower( vp ); @@ -8572,7 +8574,7 @@ bool vehicle::refresh_zones() // By continuing here and not adding to new_zones, we effectively remove it continue; } - tripoint_abs_ms zone_pos = here.getglobal( bub_part_pos( part_idx ) ); + tripoint_abs_ms zone_pos = here.get_abs( bub_part_pos( part_idx ) ); //Set the position of the zone to that part zone.set_position( std::pair( zone_pos, zone_pos ), false, false, true ); diff --git a/src/vehicle_autodrive.cpp b/src/vehicle_autodrive.cpp index 7df88dc3d710d..7ca3de4de4d17 100644 --- a/src/vehicle_autodrive.cpp +++ b/src/vehicle_autodrive.cpp @@ -353,7 +353,7 @@ struct auto_navigation_data { } // transforms a point from map bub coords into view map coords point to_view( const tripoint_bub_ms &p ) const { - return to_view( get_map().getglobal( p ) ); + return to_view( get_map().get_abs( p ) ); } // returns `p` adjusted so that the z-level is placed on the ground template @@ -711,7 +711,7 @@ bool vehicle::autodrive_controller::check_drivable( const tripoint_bub_ms &pt ) return &ovp->vehicle() == &driven_veh; } - const tripoint_abs_ms pt_abs = here.getglobal( pt ); + const tripoint_abs_ms pt_abs = here.get_abs( pt ); const tripoint_abs_omt pt_omt = project_to( pt_abs ); // only check visibility for the current OMT, we'll check other OMTs when // we reach them @@ -799,7 +799,7 @@ void vehicle::autodrive_controller::compute_obstacles() for( int dx = 0; dx < NAV_VIEW_SIZE_X; dx++ ) { for( int dy = 0; dy < NAV_VIEW_SIZE_Y; dy++ ) { const tripoint_abs_ms abs_map_pt( data.view_to_map.transform( point( dx, dy ), z ) ); - const tripoint_bub_ms p = here.bub_from_abs( abs_map_pt ); + const tripoint_bub_ms p = here.get_bub( abs_map_pt ); data.is_obstacle[dx][dy] = !check_drivable( p ); data.ground_z[dx][dy] = z; enqueue_if_ramp( ramp_points, here, p ); diff --git a/src/vehicle_part.cpp b/src/vehicle_part.cpp index 838bb9d054878..6f6a211bc9b1a 100644 --- a/src/vehicle_part.cpp +++ b/src/vehicle_part.cpp @@ -555,7 +555,7 @@ void vehicle_part::unset_crew() void vehicle_part::reset_target( const tripoint_bub_ms &pos ) { - const tripoint_abs_ms tgt = get_map().getglobal( pos ); + const tripoint_abs_ms tgt = get_map().get_abs( pos ); target.first = tgt; target.second = tgt; } diff --git a/src/vehicle_use.cpp b/src/vehicle_use.cpp index c7e452bd61e21..0a67b8f8c7ef4 100644 --- a/src/vehicle_use.cpp +++ b/src/vehicle_use.cpp @@ -1804,13 +1804,13 @@ bool vehicle::use_vehicle_tool( vehicle &veh, const tripoint_bub_ms &vp_pos, tool_type == itype_large_repairkit ) ) { act.index = INT_MIN; // tell activity the item doesn't really exist - act.coords.push_back( get_map().getglobal( vp_pos ) ); // tell it to search for the tool on `pos` + act.coords.push_back( get_map().get_abs( vp_pos ) ); // tell it to search for the tool on `pos` act.str_values.push_back( tool_type.str() ); // specific tool on the rig } //Hack for heat_activity_actor. if( act.id() == ACT_HEATING ) { - act.coords.push_back( get_map().getglobal( vp_pos ) ); + act.coords.push_back( get_map().get_abs( vp_pos ) ); } const int used_charges = ammo_in_tool - tool.ammo_remaining(); diff --git a/src/viewer.h b/src/viewer.h index 387f20ccb9a9a..7ea0c80add2de 100644 --- a/src/viewer.h +++ b/src/viewer.h @@ -10,8 +10,6 @@ class Creature; class viewer { public: - // TODO: fix point types (remove the first overload) - virtual bool sees( const tripoint &target, bool is_avatar = false, int range_mod = 0 ) const = 0; virtual bool sees( const tripoint_bub_ms &target, bool is_avatar = false, int range_mod = 0 ) const = 0; virtual bool sees( const Creature &target ) const = 0; diff --git a/src/visitable.cpp b/src/visitable.cpp index 8994664f040a4..d45175a7fae11 100644 --- a/src/visitable.cpp +++ b/src/visitable.cpp @@ -506,9 +506,9 @@ VisitResponse map_cursor::visit_items( // pos returns the pos_bub location of the target relative to the reality bubble // even though the location isn't actually inside of it. Thus, we're loading a map // around that location to do our work. - tripoint_abs_ms abs_pos = get_map().getglobal( pos() ); + tripoint_abs_ms abs_pos = get_map().get_abs( pos() ); here.load( project_to( abs_pos ), false ); - tripoint_omt_ms p = here.omt_from_abs( abs_pos ); + tripoint_omt_ms p = here.get_omt( abs_pos ); return visit_items_internal( here.cast_to_map(), rebase_bub( p ), func ); } } diff --git a/src/weather.cpp b/src/weather.cpp index f1b3dca357ff3..9b5123607ed9d 100644 --- a/src/weather.cpp +++ b/src/weather.cpp @@ -788,7 +788,7 @@ int get_local_windpower( int windpower, const oter_id &omter, const tripoint_abs return 0; } rl_vec2d windvec = convert_wind_to_coord( winddirection ); - const tripoint_bub_ms triblocker( get_map().bub_from_abs( location ) + point( windvec.x, + const tripoint_bub_ms triblocker( get_map().get_bub( location ) + point( windvec.x, windvec.y ) ); // Over map terrain may modify the effect of wind. if( ( omter->get_type_id() == oter_type_forest ) || diff --git a/src/wish.cpp b/src/wish.cpp index c2fcb7b921730..25261f64add58 100644 --- a/src/wish.cpp +++ b/src/wish.cpp @@ -803,7 +803,7 @@ void debug_menu::wishmonstergroup_mon_selection( mongroup &group ) } } -void debug_menu::wishmonster( const std::optional &p ) +void debug_menu::wishmonster( const std::optional &p ) { std::vector mtypes; @@ -816,7 +816,7 @@ void debug_menu::wishmonster( const std::optional &p ) wmenu.query(); if( wmenu.ret >= 0 ) { const mtype_id &mon_type = mtypes[ wmenu.ret ]->id; - if( std::optional spawn = p ? tripoint_bub_ms( p.value() ) : g->look_around() ) { + if( std::optional spawn = p ? p.value() : g->look_around() ) { int num_spawned = 0; for( const tripoint_bub_ms &destination : closest_points_first( *spawn, cb.group ) ) { monster *const mon = g->place_critter_at( mon_type, destination ); diff --git a/src/worldfactory.cpp b/src/worldfactory.cpp index cfea6befeed9c..064aa88e954ef 100644 --- a/src/worldfactory.cpp +++ b/src/worldfactory.cpp @@ -148,7 +148,7 @@ WORLD *worldfactory::make_new_world( const std::vector &mods ) WORLD *worldfactory::make_new_world( const std::string &name, const std::vector &mods ) { - if( !is_lexically_valid( fs::u8path( name ) ) ) { + if( !is_lexically_valid( std::filesystem::u8path( name ) ) ) { return nullptr; } std::unique_ptr retworld = std::make_unique( name ); @@ -2138,10 +2138,10 @@ static bool isForbidden( const cata_path &candidate ) void worldfactory::delete_world( const std::string &worldname, const bool delete_folder ) { cata_path worldpath = get_world( worldname )->folder_path(); - std::set directory_paths; + std::set directory_paths; if( delete_folder ) { - fs::remove_all( worldpath.get_unrelative_path() ); + std::filesystem::remove_all( worldpath.get_unrelative_path() ); remove_world( worldname ); return; } @@ -2155,8 +2155,8 @@ void worldfactory::delete_world( const std::string &worldname, const bool delete file_paths.erase( end, file_paths.end() ); for( cata_path &file_path : file_paths ) { - fs::path folder_path = file_path.get_unrelative_path().parent_path(); - while( folder_path.filename() != fs::u8path( worldname ) ) { + std::filesystem::path folder_path = file_path.get_unrelative_path().parent_path(); + while( folder_path.filename() != std::filesystem::u8path( worldname ) ) { directory_paths.insert( folder_path ); folder_path = folder_path.parent_path(); } diff --git a/tests/act_build_test.cpp b/tests/act_build_test.cpp index 32591c4a104bf..45b4e25e53ea9 100644 --- a/tests/act_build_test.cpp +++ b/tests/act_build_test.cpp @@ -43,7 +43,7 @@ void run_activities( Character &u, int max_moves ) while( ( !u.activity.is_null() || u.is_auto_moving() ) && turns < max_moves ) { u.set_moves( u.get_speed() ); if( u.is_auto_moving() ) { - u.setpos( get_map().bub_from_abs( *u.destination_point ) ); + u.setpos( get_map().get_bub( *u.destination_point ) ); get_map().build_map_cache( u.posz() ); u.start_destination_activity(); } @@ -89,8 +89,8 @@ construction setup_testcase( Character &u, std::string const &constr, build.pre_terrain.begin(), build.group, build.id ); map &here = get_map(); - tripoint_abs_ms const loot_abs = here.getglobal( loot_loc ); - tripoint_abs_ms const build_abs = here.getglobal( build_loc ); + tripoint_abs_ms const loot_abs = here.get_abs( loot_loc ); + tripoint_abs_ms const build_abs = here.get_abs( build_loc ); faction_id const fac = u.get_faction()->id; zmgr.add( constr + " loot zone", zone_type_LOOT_UNSORTED, fac, false, true, loot_abs, diff --git a/tests/behavior_test.cpp b/tests/behavior_test.cpp index e249024ecb091..fe39af6fc955b 100644 --- a/tests/behavior_test.cpp +++ b/tests/behavior_test.cpp @@ -236,7 +236,7 @@ TEST_CASE( "check_monster_behavior_tree_locust", "[monster][behavior]" ) CHECK( monster_goals.tick( &oracle ) == "idle" ); // Gross but I couldn't figure out how to place a sealed item without manual mapgen and the mapgen helper version doesn't let you specify rel_ms and adding that as a defaulted arg breaks the templated manual_mapgen()... - const tripoint_abs_ms abs_pos = here.getglobal( monster_location ); + const tripoint_abs_ms abs_pos = here.get_abs( monster_location ); tripoint_abs_omt pos; point_omt_ms pos_rel; std::tie( pos, pos_rel ) = project_remain( abs_pos ); diff --git a/tests/char_volume_test.cpp b/tests/char_volume_test.cpp index 371076607b794..9b2e7e36f6b5d 100644 --- a/tests/char_volume_test.cpp +++ b/tests/char_volume_test.cpp @@ -75,7 +75,7 @@ TEST_CASE( "character_at_volume_will_be_cramped_in_vehicle", "[volume]" ) clear_vehicles(); // extra safety here.add_vehicle( vehicle_prototype_character_volume_test_car, test_pos, 0_degrees, 0, 0 ); you.setpos( test_pos ); - const optional_vpart_position vp_there = here.veh_at( here.bub_from_abs( you.get_location() ) ); + const optional_vpart_position vp_there = here.veh_at( here.get_bub( you.get_location() ) ); REQUIRE( vp_there ); tripoint_abs_ms dest_loc = you.get_location(); diff --git a/tests/clzones_test.cpp b/tests/clzones_test.cpp index 29dedb853bf6c..4a914a6002267 100644 --- a/tests/clzones_test.cpp +++ b/tests/clzones_test.cpp @@ -80,7 +80,7 @@ TEST_CASE( "zone_unloading_ammo_belts", "[zones][items][ammo_belt][activities][u clear_avatar(); clear_map(); - tripoint_abs_ms const start = here.getglobal( tripoint_bub_ms::zero + tripoint::east ); + tripoint_abs_ms const start = here.get_abs( tripoint_bub_ms::zero + tripoint::east ); bool const move_act = GENERATE( true, false ); dummy.set_location( start ); diff --git a/tests/effect_test.cpp b/tests/effect_test.cpp index 092bde969b30e..74bb620d9e137 100644 --- a/tests/effect_test.cpp +++ b/tests/effect_test.cpp @@ -768,7 +768,7 @@ static void test_deadliness( const effect &applied, const int expected_dead, con int alive = 0; for( int i = 0; i < 10; ++i ) { for( int j = 0; j < 10; ++j ) { - tripoint cursor( i + 20, j + 20, 0 ); + tripoint_bub_ms cursor( i + 20, j + 20, 0 ); alive += creatures.creature_at( cursor ) != nullptr; } diff --git a/tests/enchantments_test.cpp b/tests/enchantments_test.cpp index 4017065e73d78..d1debfd9f889e 100644 --- a/tests/enchantments_test.cpp +++ b/tests/enchantments_test.cpp @@ -252,9 +252,9 @@ TEST_CASE( "Enchantment_ATTACK_SPEED_test", "[magic][enchantments]" ) clear_map(); Character &guy = get_player_character(); clear_avatar(); - g->place_critter_at( pseudo_debug_mon, tripoint_bub_ms( tripoint::south ) ); + g->place_critter_at( pseudo_debug_mon, tripoint_bub_ms::zero + tripoint::south ); creature_tracker &creatures = get_creature_tracker(); - Creature &mon = *creatures.creature_at( tripoint::south ); + Creature &mon = *creatures.creature_at( tripoint_bub_ms::zero + tripoint::south ); int moves_spent_on_attacks = 0; @@ -311,9 +311,9 @@ TEST_CASE( "Enchantment_MELEE_STAMINA_CONSUMPTION_test", "[magic][enchantments]" clear_map(); Character &guy = get_player_character(); clear_avatar(); - g->place_critter_at( pseudo_debug_mon, tripoint_bub_ms( tripoint::south ) ); + g->place_critter_at( pseudo_debug_mon, tripoint_bub_ms::zero + tripoint::south ); creature_tracker &creatures = get_creature_tracker(); - Creature &mon = *creatures.creature_at( tripoint::south ); + Creature &mon = *creatures.creature_at( tripoint_bub_ms::zero + tripoint::south ); int stamina_init = 0; int stamina_current = 0; int stamina_spent = 0; @@ -380,9 +380,9 @@ TEST_CASE( "Enchantment_MELEE_TO_HIT_test", "[magic][enchantments]" ) clear_map(); Character &guy = get_player_character(); clear_avatar(); - g->place_critter_at( pseudo_debug_mon, tripoint_bub_ms( tripoint::south ) ); + g->place_critter_at( pseudo_debug_mon, tripoint_bub_ms::zero + tripoint::south ); creature_tracker &creatures = get_creature_tracker(); - Creature &mon = *creatures.creature_at( tripoint::south ); + Creature &mon = *creatures.creature_at( tripoint_bub_ms::zero + tripoint::south ); double hit_rate = 0; INFO( "Character attacks with +100 to hit enchantment" ); diff --git a/tests/eoc_test.cpp b/tests/eoc_test.cpp index 1211788885489..89819ed252e7e 100644 --- a/tests/eoc_test.cpp +++ b/tests/eoc_test.cpp @@ -185,7 +185,7 @@ void check_ter_in_radius( tripoint_abs_ms const ¢er, int range, ter_id const { map tm; tm.load( project_to( center - point{ range, range } ), false, false ); - tripoint_bub_ms const center_local = tm.bub_from_abs( center ); + tripoint_bub_ms const center_local = tm.get_bub( center ); for( tripoint_bub_ms p : tm.points_in_radius( center_local, range ) ) { if( trig_dist( center_local, p ) <= range ) { REQUIRE( tm.ter( p ) == ter ); @@ -200,7 +200,7 @@ void check_ter_in_line( tripoint_abs_ms const &first, tripoint_abs_ms const &sec tripoint_abs_ms const orig = coord_min( first, second ); tm.load( project_to( orig ), false, false ); for( tripoint_abs_ms p : line_to( first, second ) ) { - REQUIRE( tm.ter( tm.bub_from_abs( p ) ) == ter ); + REQUIRE( tm.ter( tm.get_bub( p ) ) == ter ); } } @@ -1095,11 +1095,11 @@ TEST_CASE( "EOC_run_inv_test", "[eoc]" ) // Activate test for item CHECK( effect_on_condition_EOC_item_activate_test->activate( d ) ); - CHECK( get_map().furn( get_map().bub_from_abs( pos_after ) ) == furn_f_cardboard_box ); + CHECK( get_map().furn( get_map().get_bub( pos_after ) ) == furn_f_cardboard_box ); // Teleport test for item CHECK( effect_on_condition_EOC_item_teleport_test->activate( d ) ); - CHECK( get_map().i_at( get_map().bub_from_abs( pos_after ) ).size() == 3 ); + CHECK( get_map().i_at( get_map().get_bub( pos_after ) ).size() == 3 ); // Math function test for armor CHECK( effect_on_condition_EOC_armor_math_test->activate( d ) ); @@ -1327,12 +1327,12 @@ TEST_CASE( "EOC_map_test", "[eoc]" ) map &m = get_map(); const tripoint_abs_ms start = get_avatar().get_location(); - const tripoint_bub_ms tgt = m.bub_from_abs( start + tripoint::north ); + const tripoint_bub_ms tgt = m.get_bub( start + tripoint::north ); m.furn_set( tgt, furn_test_f_eoc ); m.furn( tgt )->examine( get_avatar(), tgt ); CHECK( globvars.get_global_value( "this" ) == "test_f_eoc" ); - CHECK( globvars.get_global_value( "pos" ) == m.getglobal( tgt ).to_string() ); + CHECK( globvars.get_global_value( "pos" ) == m.get_abs( tgt ).to_string() ); const tripoint_bub_ms target_pos = get_avatar().pos_bub() + point::east * 10; npc &npc_dst = spawn_npc( target_pos.xy(), "thug" ); @@ -1354,7 +1354,7 @@ TEST_CASE( "EOC_loc_relative_test", "[eoc]" ) g->place_player( tripoint_bub_ms::zero ); const tripoint_abs_ms start = get_avatar().get_location(); - const tripoint_bub_ms tgt = m.bub_from_abs( start + tripoint::north ); + const tripoint_bub_ms tgt = m.get_bub( start + tripoint::north ); m.furn_set( tgt, furn_test_f_eoc ); m.furn( tgt )->examine( get_avatar(), tgt ); @@ -1367,8 +1367,8 @@ TEST_CASE( "EOC_loc_relative_test", "[eoc]" ) globvars.get_global_value( "map_test_loc_a" ) ) ); tripoint_abs_ms tmp_abs_b = tripoint_abs_ms( tripoint::from_string( globvars.get_global_value( "map_test_loc_b" ) ) ); - CHECK( m.bub_from_abs( tmp_abs_a ) == tripoint_bub_ms( 70, 70, 0 ) ); - CHECK( m.bub_from_abs( tmp_abs_b ) == tripoint_bub_ms( 70, 60, 0 ) ); + CHECK( m.get_bub( tmp_abs_a ) == tripoint_bub_ms( 70, 70, 0 ) ); + CHECK( m.get_bub( tmp_abs_b ) == tripoint_bub_ms( 70, 60, 0 ) ); globvars.clear_global_values(); clear_avatar(); @@ -1512,7 +1512,7 @@ TEST_CASE( "EOC_run_eocs", "[eoc]" ) clear_npcs(); npc &guy = spawn_npc( u.pos_bub().xy() + point::east, "thug" ); tripoint_abs_ms mon_loc = u.get_location() + tripoint::west; - monster *zombie = g->place_critter_at( mon_zombie, get_map().bub_from_abs( mon_loc ) ); + monster *zombie = g->place_critter_at( mon_zombie, get_map().get_bub( mon_loc ) ); REQUIRE( zombie != nullptr ); item hammer( itype_hammer ); diff --git a/tests/faction_camp_test.cpp b/tests/faction_camp_test.cpp index e99e04b2292bf..e055ba677f3e7 100644 --- a/tests/faction_camp_test.cpp +++ b/tests/faction_camp_test.cpp @@ -29,7 +29,7 @@ TEST_CASE( "camp_calorie_counting", "[camp]" ) clear_avatar(); clear_map(); map &m = get_map(); - const tripoint_abs_ms zone_loc = m.getglobal( tripoint_bub_ms{ 5, 5, 0 } ); + const tripoint_abs_ms zone_loc = m.get_abs( tripoint_bub_ms{ 5, 5, 0 } ); mapgen_place_zone( zone_loc, zone_loc, zone_type_CAMP_FOOD, your_fac, {}, "food" ); mapgen_place_zone( zone_loc, zone_loc, zone_type_CAMP_STORAGE, your_fac, {}, @@ -44,7 +44,7 @@ TEST_CASE( "camp_calorie_counting", "[camp]" ) WHEN( "a base item is added to larder" ) { food_supply *= 0; item test_100_kcal( itype_test_100_kcal ); - tripoint_bub_ms zone_local = m.bub_from_abs( zone_loc ); + tripoint_bub_ms zone_local = m.get_bub( zone_loc ); m.i_clear( zone_local ); m.add_item_or_charges( zone_local, test_100_kcal ); REQUIRE( m.has_items( zone_local ) ); @@ -61,7 +61,7 @@ TEST_CASE( "camp_calorie_counting", "[camp]" ) made_of.add( test_100_kcal ); // Setting the actual components. This will return 185 unless it's actually made up of two 100kcal components! test_200_kcal.components = made_of; - tripoint_bub_ms zone_local = m.bub_from_abs( zone_loc ); + tripoint_bub_ms zone_local = m.get_bub( zone_loc ); m.i_clear( zone_local ); m.add_item_or_charges( zone_local, test_200_kcal ); test_camp->distribute_food(); @@ -71,7 +71,7 @@ TEST_CASE( "camp_calorie_counting", "[camp]" ) WHEN( "an item with vitamins is added to larder" ) { food_supply *= 0; item test_500_kcal( itype_test_500_kcal ); - tripoint_bub_ms zone_local = m.bub_from_abs( zone_loc ); + tripoint_bub_ms zone_local = m.get_bub( zone_loc ); m.i_clear( zone_local ); m.add_item_or_charges( zone_local, test_500_kcal ); test_camp->distribute_food(); diff --git a/tests/item_pocket_test.cpp b/tests/item_pocket_test.cpp index 01548509b1f90..7aa4b0c86063d 100644 --- a/tests/item_pocket_test.cpp +++ b/tests/item_pocket_test.cpp @@ -2815,7 +2815,7 @@ TEST_CASE( "auto_whitelist", "[item][pocket][item_spawn]" ) clear_map(); tripoint_abs_omt const this_omt = project_to( get_avatar().get_location() ); - tripoint_bub_ms const this_bub = get_map().bub_from_abs( project_to( this_omt ) ); + tripoint_bub_ms const this_bub = get_map().get_bub( project_to( this_omt ) ); manual_nested_mapgen( this_omt, nested_mapgen_auto_wl_test ); REQUIRE( !get_map().i_at( this_bub + tripoint::zero ).empty() ); REQUIRE( !get_map().i_at( this_bub + tripoint::east ).empty() ); diff --git a/tests/item_test.cpp b/tests/item_test.cpp index 8e4c13ebc0238..0dfe0335a0288 100644 --- a/tests/item_test.cpp +++ b/tests/item_test.cpp @@ -788,7 +788,7 @@ TEST_CASE( "item_new_to_hit_enforcement", "[item]" ) } if( !msg_enforce.empty() ) { msg_enforce += - "\n]\nThe item(s) above use legacy to_hit, please change them to the newer object method (see /docs/GAME_BALANCE.md#to-hit-value) or remove the to_hit field if the item(s) aren't intended to be used as weapons."; + "\n]\nThe item(s) above use legacy to_hit, please change them to the newer object method (see /docs/design-balance-lore/GAME_BALANCE.md#to-hit-value) or remove the to_hit field if the item(s) aren't intended to be used as weapons."; } if( !msg_prune.empty() ) { msg_prune += diff --git a/tests/magic_spell_effect_test.cpp b/tests/magic_spell_effect_test.cpp index c0f1f3720ce8e..685f765f332ba 100644 --- a/tests/magic_spell_effect_test.cpp +++ b/tests/magic_spell_effect_test.cpp @@ -26,7 +26,7 @@ static std::set count_fields_near( map &m = get_map(); std::set live_fields; for( const tripoint_abs_ms &cursor : closest_points_first( p, 10 ) ) { - field_entry *entry = m.get_field( m.bub_from_abs( cursor ), field_type ); + field_entry *entry = m.get_field( m.get_bub( cursor ), field_type ); if( entry && entry->is_field_alive() ) { live_fields.insert( cursor ); } @@ -104,10 +104,10 @@ TEST_CASE( "remove_field_fd_fatigue", "[magic]" ) tripoint_abs_ms p2 = player_initial_pos + tripoint::east * 11; tripoint_abs_ms p3 = player_initial_pos + tripoint::east * 12; tripoint_abs_ms p4 = player_initial_pos + tripoint::east * 13; - m.add_field( m.bub_from_abs( p1 ), fd_fatigue, 1, 1_hours ); - m.add_field( m.bub_from_abs( p2 ), fd_fatigue, 2, 1_hours ); - m.add_field( m.bub_from_abs( p3 ), fd_fatigue, 3, 1_hours ); - m.add_field( m.bub_from_abs( p4 ), fd_fatigue, 3, 1_hours ); + m.add_field( m.get_bub( p1 ), fd_fatigue, 1, 1_hours ); + m.add_field( m.get_bub( p2 ), fd_fatigue, 2, 1_hours ); + m.add_field( m.get_bub( p3 ), fd_fatigue, 3, 1_hours ); + m.add_field( m.get_bub( p4 ), fd_fatigue, 3, 1_hours ); if( with_light ) { player_add_headlamp(); @@ -119,28 +119,28 @@ TEST_CASE( "remove_field_fd_fatigue", "[magic]" ) m.build_map_cache( 0 ); dummy.recalc_sight_limits(); - CHECK( m.getglobal( dummy.pos_bub() ) == player_initial_pos ); + CHECK( m.get_abs( dummy.pos_bub() ) == player_initial_pos ); CHECK( count_fields_near( p1, fd_fatigue ) == std::set { p1, p2, p3, p4 } ); - spell_effect::remove_field( sp, dummy, m.bub_from_abs( player_initial_pos ) ); + spell_effect::remove_field( sp, dummy, m.get_bub( player_initial_pos ) ); calendar::turn += 1_turns; m.process_fields(); calendar::turn += 1_turns; m.process_fields(); - CHECK( m.getglobal( dummy.pos_bub() ) == player_initial_pos ); + CHECK( m.get_abs( dummy.pos_bub() ) == player_initial_pos ); CHECK( count_fields_near( p1, fd_fatigue ) == std::set { p2, p3, p4 } ); - spell_effect::remove_field( sp, dummy, m.bub_from_abs( player_initial_pos ) ); + spell_effect::remove_field( sp, dummy, m.get_bub( player_initial_pos ) ); calendar::turn += 1_turns; m.process_fields(); calendar::turn += 1_turns; m.process_fields(); - CHECK( m.getglobal( dummy.pos_bub() ) == player_initial_pos ); + CHECK( m.get_abs( dummy.pos_bub() ) == player_initial_pos ); CHECK( count_fields_near( p1, fd_fatigue ) == std::set { p3, p4 } ); - spell_effect::remove_field( sp, dummy, m.bub_from_abs( player_initial_pos ) ); + spell_effect::remove_field( sp, dummy, m.get_bub( player_initial_pos ) ); calendar::turn += 1_turns; m.process_fields(); calendar::turn += 1_turns; diff --git a/tests/magic_spell_test.cpp b/tests/magic_spell_test.cpp index 5640a6cf81e14..bccc5f525be5e 100644 --- a/tests/magic_spell_test.cpp +++ b/tests/magic_spell_test.cpp @@ -23,7 +23,7 @@ static const spell_id spell_test_spell_tp_mummy( "test_spell_tp_mummy" ); // // Each test case relates to some spell feature, in terms of: // -// - JSON spell content, from data/json/*.json, as documented in doc/MAGIC.md +// - JSON spell content, from data/json/*.json, as documented in doc/JSON/MAGIC.md // - C++ spell functions, defined in src/magic.cpp and src/magic_spell_effect.cpp // // To run all tests in this file: diff --git a/tests/map_test.cpp b/tests/map_test.cpp index 299f24d806286..cb156c11a4fc3 100644 --- a/tests/map_test.cpp +++ b/tests/map_test.cpp @@ -29,11 +29,10 @@ TEST_CASE( "map_coordinate_conversion_functions" ) here.vertical_shift( 0 ); } ); - tripoint_bub_ms test_point = - GENERATE( tripoint_bub_ms::zero, tripoint_bub_ms::zero + tripoint::south, - tripoint_bub_ms::zero + tripoint::east, tripoint_bub_ms::zero + tripoint::above, - tripoint_bub_ms::zero + tripoint::below ); - tripoint_bub_ms test_bub( test_point ); + tripoint_bub_ms test_point = tripoint_bub_ms::zero + + GENERATE( tripoint_rel_ms::zero, tripoint_rel_ms::south, + tripoint_rel_ms::east, tripoint_rel_ms::above, + tripoint_rel_ms::below ); int z = GENERATE( 0, 1, -1, OVERMAP_HEIGHT, -OVERMAP_DEPTH ); // Make sure we're not in the 'easy' case where abs_sub is zero @@ -59,12 +58,12 @@ TEST_CASE( "map_coordinate_conversion_functions" ) return; } - CAPTURE( test_bub ); + CAPTURE( test_point ); CAPTURE( test_abs ); // Verify round-tripping - CHECK( here.getglobal( here.bub_from_abs( test_abs ) ) == test_abs ); - CHECK( here.bub_from_abs( here.getglobal( test_point ) ) == test_point ); + CHECK( here.get_abs( here.get_bub( test_abs ) ) == test_abs ); + CHECK( here.get_bub( here.get_abs( test_point ) ) == test_point ); } TEST_CASE( "destroy_grabbed_furniture" ) @@ -183,7 +182,7 @@ TEST_CASE( "inactive_container_with_active_contents", "[active_item][map]" ) REQUIRE( here.get_submaps_with_active_items().empty() ); here.check_submap_active_item_consistency(); tripoint_bub_ms const test_loc; - tripoint_abs_sm const test_loc_sm = project_to( here.getglobal( test_loc ) ); + tripoint_abs_sm const test_loc_sm = project_to( here.get_abs( test_loc ) ); item bottle_plastic( itype_bottle_plastic ); REQUIRE( !bottle_plastic.needs_processing() ); @@ -223,7 +222,7 @@ TEST_CASE( "milk_rotting", "[active_item][map]" ) here.check_submap_active_item_consistency(); REQUIRE( here.get_submaps_with_active_items().empty() ); tripoint_bub_ms const test_loc; - tripoint_abs_sm const test_loc_sm = project_to( here.getglobal( test_loc ) ); + tripoint_abs_sm const test_loc_sm = project_to( here.get_abs( test_loc ) ); restore_on_out_of_scope restore_temp( get_weather().forced_temperature ); diff --git a/tests/mapgen_place_vehicles_test.cpp b/tests/mapgen_place_vehicles_test.cpp index 63f78f7ee7d3f..5379815fac34b 100644 --- a/tests/mapgen_place_vehicles_test.cpp +++ b/tests/mapgen_place_vehicles_test.cpp @@ -17,13 +17,13 @@ namespace void update_test( map &m, tripoint_abs_omt const &loc ) { manual_mapgen( loc, manual_update_mapgen, update_mapgen_test_update_place_shopping_cart ); - REQUIRE( m.veh_at( m.bub_from_abs( project_to( loc ) ) ) ); + REQUIRE( m.veh_at( m.get_bub( project_to( loc ) ) ) ); } void nested_test( map &m, tripoint_abs_omt const &loc ) { manual_mapgen( loc, manual_nested_mapgen, nested_mapgen_test_nested_place_shopping_cart ); - REQUIRE( m.veh_at( m.bub_from_abs( project_to( loc ) ) ) ); + REQUIRE( m.veh_at( m.get_bub( project_to( loc ) ) ) ); } } // namespace diff --git a/tests/mapgen_remove_npcs_test.cpp b/tests/mapgen_remove_npcs_test.cpp index c84c180080d98..54552e27c1515 100644 --- a/tests/mapgen_remove_npcs_test.cpp +++ b/tests/mapgen_remove_npcs_test.cpp @@ -34,7 +34,7 @@ void place_npc_and_check( map &m, tripoint_bub_ms const &loc, update_mapgen_id c string_id const &nid ) { check_creature( loc, nid, false ); - tripoint_abs_omt const omt = project_to( m.getglobal( loc ) ); + tripoint_abs_omt const omt = project_to( m.get_abs( loc ) ); manual_mapgen( omt, manual_update_mapgen, id ); check_creature( loc, nid, true ); g->mon_info_update(); @@ -44,7 +44,7 @@ void remove_npc_and_check( map &m, tripoint_bub_ms const &loc, update_mapgen_id string_id const &nid ) { check_creature( loc, nid, true ); - tripoint_abs_omt const omt = project_to( m.getglobal( loc ) ); + tripoint_abs_omt const omt = project_to( m.get_abs( loc ) ); manual_mapgen( omt, manual_update_mapgen, id ); check_creature( loc, nid, false ); @@ -70,8 +70,8 @@ TEST_CASE( "mapgen_remove_npcs" ) tripoint_abs_omt const omt = project_to( get_avatar().get_location() ); tripoint_abs_omt const omt2 = omt + tripoint::east; - tripoint_bub_ms const loc = here.bub_from_abs( project_to( omt ) ); - tripoint_bub_ms const loc2 = here.bub_from_abs( project_to( omt2 ) ); + tripoint_bub_ms const loc = here.get_bub( project_to( omt ) ); + tripoint_bub_ms const loc2 = here.get_bub( project_to( omt2 ) ); tripoint_bub_ms const loc3 = loc2 + tripoint::east; REQUIRE( get_map().inbounds( loc ) ); place_npc_and_check( here, loc, update_mapgen_test_update_place_npc, diff --git a/tests/mapgen_remove_vehicles_test.cpp b/tests/mapgen_remove_vehicles_test.cpp index 0824f4ab62d35..793a708f47db0 100644 --- a/tests/mapgen_remove_vehicles_test.cpp +++ b/tests/mapgen_remove_vehicles_test.cpp @@ -54,7 +54,7 @@ void local_test( vehicle *veh, tripoint_bub_ms const &test_loc, F const &fmg, ID { map &here = get_map(); tripoint_abs_omt const this_test_omt = - project_to( get_map().getglobal( test_loc ) ); + project_to( get_map().get_abs( test_loc ) ); tripoint_bub_ms const this_test_loc = test_loc + point::east; vehicle *const veh2 = add_test_vehicle( here, this_test_loc ); REQUIRE( here.veh_at( this_test_loc ).has_value() ); @@ -72,7 +72,7 @@ void remote_test( vehicle *veh, tripoint_bub_ms const &test_loc, F const &fmg, I { map &here = get_map(); tripoint_abs_omt const this_test_omt = - project_to( here.getglobal( test_loc ) ) + tripoint{ 20, 20, 0 }; + project_to( here.get_abs( test_loc ) ) + tripoint{ 20, 20, 0 }; manual_mapgen( this_test_omt, fmg, id, remote_add_test_vehicle ); REQUIRE( here.get_vehicles().size() == 1 ); check_vehicle_still_works( *veh ); @@ -122,8 +122,8 @@ TEST_CASE( "mapgen_remove_vehicles" ) SECTION( "update place then nested remove all on main map" ) { tripoint_abs_omt const this_test_omt = - project_to( get_map().getglobal( test_loc ) ); - tripoint_bub_ms const this_test_loc = get_map().bub_from_abs( project_to + project_to( get_map().get_abs( test_loc ) ); + tripoint_bub_ms const this_test_loc = get_map().get_bub( project_to ( this_test_omt ) ); manual_mapgen( this_test_omt, manual_update_mapgen, update_mapgen_test_update_place_shopping_cart ); REQUIRE( here.get_vehicles().size() == 2 ); diff --git a/tests/monfactions_test.cpp b/tests/monfactions_test.cpp index 01c11075609fb..c73025dce64c3 100644 --- a/tests/monfactions_test.cpp +++ b/tests/monfactions_test.cpp @@ -1,3 +1,4 @@ +#include #include #include "cata_catch.h" @@ -42,7 +43,7 @@ static std::string att_enum_to_string( mf_attitude att ) TEST_CASE( "generate_monfactions_attitude_matrix", "[.]" ) { std::ofstream outfile; - outfile.open( fs::u8path( "monfactions.txt" ) ); + outfile.open( std::filesystem::u8path( "monfactions.txt" ) ); for( const monfaction &f : monfactions::get_all() ) { for( const monfaction &f1 : monfactions::get_all() ) { mf_attitude att = f.attitude( f1.id ); diff --git a/tests/mongroup_test.cpp b/tests/mongroup_test.cpp index 49e0d5d93f3c9..9c8be281ded22 100644 --- a/tests/mongroup_test.cpp +++ b/tests/mongroup_test.cpp @@ -40,7 +40,7 @@ static void spawn_x_monsters( int x, const mongroup_id &grp, const std::vector( iter->second )].second++; - std::get<2>( results[res.name] )++; + std::get<2>( results[res.id] )++; } } diff --git a/tests/monster_test.cpp b/tests/monster_test.cpp index 4daab33afc4a1..67b83286fbe9f 100644 --- a/tests/monster_test.cpp +++ b/tests/monster_test.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -43,7 +44,7 @@ static int moves_to_destination( const std::string &monster_type, monster &test_monster = spawn_test_monster( monster_type, start ); // Get it riled up and give it a goal. test_monster.anger = 100; - test_monster.set_dest( get_map().getglobal( end ) ); + test_monster.set_dest( get_map().get_abs( end ) ); test_monster.set_moves( 0 ); const int monster_speed = test_monster.get_speed(); int moves_spent = 0; @@ -256,8 +257,9 @@ static void test_moves_to_squares( const std::string &monster_type, const bool w if( write_data ) { std::ofstream data; - data.open( fs::u8path( "slope_test_data_" + std::string( ( trigdist ? "trig_" : "square_" ) ) + - monster_type ) ); + data.open( std::filesystem::u8path( "slope_test_data_" + std::string( ( + trigdist ? "trig_" : "square_" ) ) + + monster_type ) ); for( const auto &stat_pair : turns_at_angle ) { data << stat_pair.first << " " << stat_pair.second.avg() << "\n"; } diff --git a/tests/npc_behavior_rules_test.cpp b/tests/npc_behavior_rules_test.cpp index 22a6bead4ad8d..d5bc56b0d9409 100644 --- a/tests/npc_behavior_rules_test.cpp +++ b/tests/npc_behavior_rules_test.cpp @@ -157,7 +157,7 @@ TEST_CASE( "NPC-rules-close-doors", "[npc_rules]" ) REQUIRE( !test_subject->path.empty() ); // we must force them to actually walk the path for this test - test_subject->goto_to_this_pos = here.getglobal( test_subject->path.back() ); + test_subject->goto_to_this_pos = here.get_abs( test_subject->path.back() ); // copy our path before we lose it std::vector path_taken = test_subject->path; diff --git a/tests/npc_talk_test.cpp b/tests/npc_talk_test.cpp index 886b0aba44ef1..9f71be0cfd90c 100644 --- a/tests/npc_talk_test.cpp +++ b/tests/npc_talk_test.cpp @@ -121,7 +121,7 @@ static std::string gen_dynamic_line( dialogue &d ) static void change_om_type( const std::string &new_type ) { - const tripoint_abs_omt omt_pos( coords::project_to( get_map().getglobal( + const tripoint_abs_omt omt_pos( coords::project_to( get_map().get_abs( get_player_character().pos_bub() ) ) ); overmap_buffer.ter_set( omt_pos, oter_id( new_type ) ); } diff --git a/tests/npc_test.cpp b/tests/npc_test.cpp index 2dd1b0410f1ed..b089af35aff9a 100644 --- a/tests/npc_test.cpp +++ b/tests/npc_test.cpp @@ -333,7 +333,7 @@ static npc *make_companion( const tripoint_bub_ms &npc_pos ) shared_ptr_fast guy = make_shared_fast(); guy->normalize(); guy->randomize(); - guy->spawn_at_precise( get_map().getglobal( npc_pos ) ); + guy->spawn_at_precise( get_map().get_abs( npc_pos ) ); overmap_buffer.insert_npc( guy ); g->load_npcs(); guy->companion_mission_role_id.clear(); @@ -488,7 +488,7 @@ TEST_CASE( "npc-movement" ) return armor.covers( bodypart_id( "foot_r" ) ) || armor.covers( bodypart_id( "foot_l" ) ); } ); REQUIRE( !guy->is_immune_field( fd_acid ) ); - guy->spawn_at_precise( get_map().getglobal( p ) ); + guy->spawn_at_precise( get_map().get_abs( p ) ); // Set the shopkeep mission; this means that // the NPC deems themselves to be guarding and stops them // wandering off in search of distant ammo caches, etc. diff --git a/tests/overmap_noise_test.cpp b/tests/overmap_noise_test.cpp index 5db8e7e51c43a..82d24fc2017e4 100644 --- a/tests/overmap_noise_test.cpp +++ b/tests/overmap_noise_test.cpp @@ -1,3 +1,5 @@ +#include + #include "cata_catch.h" #include "coordinates.h" #include "filesystem.h" @@ -8,7 +10,7 @@ static void export_raw_noise( const std::string &filename, const om_noise::om_no int width, int height ) { std::ofstream testfile; - testfile.open( fs::u8path( filename ), std::ofstream::trunc ); + testfile.open( std::filesystem::u8path( filename ), std::ofstream::trunc ); testfile << "P2" << std::endl; testfile << width << " " << height << std::endl; testfile << "255" << std::endl; @@ -28,7 +30,7 @@ static void export_interpreted_noise( float threshold ) { std::ofstream testfile; - testfile.open( fs::u8path( filename ), std::ofstream::trunc ); + testfile.open( std::filesystem::u8path( filename ), std::ofstream::trunc ); testfile << "P2" << std::endl; testfile << width << " " << height << std::endl; testfile << "255" << std::endl; diff --git a/tests/player_activities_test.cpp b/tests/player_activities_test.cpp index ec86fc83ad6aa..a0ad226ac1061 100644 --- a/tests/player_activities_test.cpp +++ b/tests/player_activities_test.cpp @@ -1815,7 +1815,7 @@ TEST_CASE( "activity_interruption_by_distractions", "[activity][interruption]" ) CHECK( dists.empty() ); THEN( "interruption by zombie moving towards dummy" ) { - zombie.set_dest( get_map().getglobal( dummy.pos_bub() ) ); + zombie.set_dest( get_map().get_abs( dummy.pos_bub() ) ); int turns = 0; do { move_monster_turn( zombie ); @@ -1842,7 +1842,7 @@ TEST_CASE( "activity_interruption_by_distractions", "[activity][interruption]" ) CHECK( dists.empty() ); THEN( "interruption by zombie moving towards dummy" ) { - zombie.set_dest( get_map().getglobal( dummy.pos_bub() ) ); + zombie.set_dest( get_map().get_abs( dummy.pos_bub() ) ); int turns = 0; do { move_monster_turn( zombie ); diff --git a/tests/ranged_balance_test.cpp b/tests/ranged_balance_test.cpp index e24bf92d948a6..acdc7bace7727 100644 --- a/tests/ranged_balance_test.cpp +++ b/tests/ranged_balance_test.cpp @@ -540,53 +540,53 @@ TEST_CASE( "shot_features", "[gun]" "[slow]" ) // More serious damage at close range. shoot_monster( itype_shotgun_s, {}, itype_shot_bird, 5, 20, "mon_test_shotgun_0_bullet" ); // Grevious damage at point blank. - shoot_monster( itype_shotgun_s, {}, itype_shot_bird, 1, 62, "mon_test_shotgun_0_bullet" ); + shoot_monster( itype_shotgun_s, {}, itype_shot_bird, 1, 73, "mon_test_shotgun_0_bullet" ); // Triviallly armored target (armor_bullet: 1) // Can rarely if ever inflict damage at range. // shoot_monster( itype_shot_bird, 10, 0, 5, "mon_zombie_tough" ); // Can barely hurt at close range. // Can seriously injure trivially armored enemy at point blank, - shoot_monster( itype_shotgun_s, {}, itype_shot_bird, 1, 62, "mon_zombie_tough" ); + shoot_monster( itype_shotgun_s, {}, itype_shot_bird, 1, 66, "mon_test_shotgun_5_bullet" ); // Armored target (armor_bullet: 5) // Can't hurt at range // Can't hurt at close range. // Serioualy injure at point blank. - shoot_monster( itype_shotgun_s, {}, itype_shot_bird, 1, 61, "mon_zombie_brute" ); + shoot_monster( itype_shotgun_s, {}, itype_shot_bird, 1, 65, "mon_test_shotgun_5_bullet" ); // TODO: can't harm heavily armored enemies at point blank - // Heavily Armored target (armor_bullet: 36) + // Heavily Armored target (armor_bullet: 30) // Can't hurt at range, - shoot_monster( itype_shotgun_s, {}, itype_shot_bird, 12, 3, "mon_skeleton_hulk" ); + shoot_monster( itype_shotgun_s, {}, itype_shot_bird, 12, 0, "mon_test_shotgun_30_bullet" ); // Can't hurt at close range. - shoot_monster( itype_shotgun_s, {}, itype_shot_bird, 5, 6, "mon_skeleton_hulk" ); + shoot_monster( itype_shotgun_s, {}, itype_shot_bird, 5, 0, "mon_test_shotgun_30_bullet" ); // Barely injure at point blank. - shoot_monster( itype_shotgun_s, {}, itype_shot_bird, 1, 31, "mon_skeleton_hulk" ); + shoot_monster( itype_shotgun_s, {}, itype_shot_bird, 1, 30, "mon_test_shotgun_30_bullet" ); // TODO: can't harm heavily armored enemies even at point blank. // BUCKSHOT // Unarmored target - shoot_monster( itype_shotgun_s, {}, itype_shot_00, 18, 72, "mon_test_shotgun_0_bullet" ); + shoot_monster( itype_shotgun_s, {}, itype_shot_00, 18, 75, "mon_test_shotgun_0_bullet" ); // Heavy damage at range. - shoot_monster( itype_shotgun_s, {}, itype_shot_00, 12, 107, "mon_test_shotgun_0_bullet" ); + shoot_monster( itype_shotgun_s, {}, itype_shot_00, 12, 111, "mon_test_shotgun_0_bullet" ); // More damage at close range. - shoot_monster( itype_shotgun_s, {}, itype_shot_00, 5, 165, "mon_test_shotgun_0_bullet" ); + shoot_monster( itype_shotgun_s, {}, itype_shot_00, 5, 180, "mon_test_shotgun_0_bullet" ); // Extreme damage at point blank range. - shoot_monster( itype_shotgun_s, {}, itype_shot_00, 1, 75, "mon_test_shotgun_0_bullet" ); + shoot_monster( itype_shotgun_s, {}, itype_shot_00, 1, 86, "mon_test_shotgun_0_bullet" ); // Lightly armored target (armor_bullet: 5) // Outcomes for lightly armored enemies are very similar. - shoot_monster( itype_shotgun_s, {}, itype_shot_00, 18, 20, "mon_zombie_brute" ); - shoot_monster( itype_shotgun_s, {}, itype_shot_00, 12, 40, "mon_zombie_brute" ); - shoot_monster( itype_shotgun_s, {}, itype_shot_00, 5, 116, "mon_zombie_brute" ); - shoot_monster( itype_shotgun_s, {}, itype_shot_00, 1, 73, "mon_zombie_brute" ); + shoot_monster( itype_shotgun_s, {}, itype_shot_00, 18, 45, "mon_test_shotgun_5_bullet" ); + shoot_monster( itype_shotgun_s, {}, itype_shot_00, 12, 72, "mon_test_shotgun_5_bullet" ); + shoot_monster( itype_shotgun_s, {}, itype_shot_00, 5, 117, "mon_test_shotgun_5_bullet" ); + shoot_monster( itype_shotgun_s, {}, itype_shot_00, 1, 81, "mon_test_shotgun_5_bullet" ); // Armored target (armor_bullet: 10) - shoot_monster( itype_shotgun_s, {}, itype_shot_00, 18, 8, "mon_smoker_brute" ); - shoot_monster( itype_shotgun_s, {}, itype_shot_00, 12, 18, "mon_smoker_brute" ); - shoot_monster( itype_shotgun_s, {}, itype_shot_00, 5, 47, "mon_smoker_brute" ); - shoot_monster( itype_shotgun_s, {}, itype_shot_00, 1, 72, "mon_smoker_brute" ); + shoot_monster( itype_shotgun_s, {}, itype_shot_00, 18, 22, "mon_test_shotgun_10_bullet" ); + shoot_monster( itype_shotgun_s, {}, itype_shot_00, 12, 35, "mon_test_shotgun_10_bullet" ); + shoot_monster( itype_shotgun_s, {}, itype_shot_00, 5, 57, "mon_test_shotgun_10_bullet" ); + shoot_monster( itype_shotgun_s, {}, itype_shot_00, 1, 75, "mon_test_shotgun_10_bullet" ); } TEST_CASE( "shot_features_with_choke", "[gun]" "[slow]" ) @@ -596,44 +596,58 @@ TEST_CASE( "shot_features_with_choke", "[gun]" "[slow]" ) // This test result is difficult to converge // After more attempts, the average value is about 7 // shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_bird, 18, 7, "mon_test_shotgun_0_bullet" ); - shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_bird, 12, 15, + shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_bird, 12, 13, "mon_test_shotgun_0_bullet" ); shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_bird, 5, 20, "mon_test_shotgun_0_bullet" ); // All the results of tests at point blank are abonormal - shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_bird, 1, 62, + shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_bird, 1, 75, "mon_test_shotgun_0_bullet" ); // Triviallly armored target (armor_bullet: 1) - shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_bird, 1, 62, "mon_zombie_tough" ); + shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_bird, 1, 74, + "mon_test_shotgun_1_bullet" ); // Armored target (armor_bullet: 5) - shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_bird, 1, 61, "mon_zombie_brute" ); + shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_bird, 1, 67, + "mon_test_shotgun_5_bullet" ); // Unarmored target shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 18, 95, "mon_test_shotgun_0_bullet" ); - shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 12, 131, + shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 12, 140, "mon_test_shotgun_0_bullet" ); shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 5, 185, "mon_test_shotgun_0_bullet" ); - shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 1, 75, + shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 1, 87, "mon_test_shotgun_0_bullet" ); // Triviallly armored target (armor_bullet: 1) - shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 18, 32, "mon_zombie_tough" ); - shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 12, 61, "mon_zombie_tough" ); - shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 5, 105, "mon_zombie_tough" ); - shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 1, 100, "mon_zombie_tough" ); + shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 18, 89, + "mon_test_shotgun_1_bullet" ); + shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 12, 130, + "mon_test_shotgun_1_bullet" ); + shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 5, 172, + "mon_test_shotgun_1_bullet" ); + shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 1, 87, + "mon_test_shotgun_1_bullet" ); // Armored target (armor_bullet: 5) - shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 18, 25, "mon_zombie_brute" ); - shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 12, 54, "mon_zombie_brute" ); - shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 5, 124, "mon_zombie_brute" ); - shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 1, 73, "mon_zombie_brute" ); + shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 18, 62, + "mon_test_shotgun_5_bullet" ); + shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 12, 90, + "mon_test_shotgun_5_bullet" ); + shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 5, 122, + "mon_test_shotgun_5_bullet" ); + shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 1, 80, + "mon_test_shotgun_5_bullet" ); // Armored target (armor_bullet: 10) - shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 18, 10, "mon_smoker_brute" ); - shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 12, 11, "mon_smoker_brute" ); - shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 5, 62, "mon_smoker_brute" ); - shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 1, 71, "mon_smoker_brute" ); + shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 18, 30, + "mon_test_shotgun_10_bullet" ); + shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 12, 44, + "mon_test_shotgun_10_bullet" ); + shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 5, 60, + "mon_test_shotgun_10_bullet" ); + shoot_monster( itype_shotgun_s, { itype_choke }, itype_shot_00, 1, 73, + "mon_test_shotgun_10_bullet" ); } TEST_CASE( "shot_custom_damage_type", "[gun]" "[slow]" ) diff --git a/tests/translation_system_test.cpp b/tests/translation_system_test.cpp index 5e02268867200..5022aed0460eb 100644 --- a/tests/translation_system_test.cpp +++ b/tests/translation_system_test.cpp @@ -1,4 +1,5 @@ #include +#include #include "cata_catch.h" #include "filesystem.h" #include "string_formatter.h" @@ -16,7 +17,7 @@ TEST_CASE( "TranslationDocument_loads_valid_MO", "[translations]" ) { const char *path = "./data/mods/TEST_DATA/lang/mo/ru/LC_MESSAGES/TEST_DATA.mo"; CAPTURE( path ); - REQUIRE( file_exist( fs::u8path( path ) ) ); + REQUIRE( file_exist( std::filesystem::u8path( path ) ) ); REQUIRE_NOTHROW( LoadMODocument( path ) ); } @@ -24,7 +25,7 @@ TEST_CASE( "TranslationDocument_rejects_invalid_MO", "[translations]" ) { const char *path = "./data/mods/TEST_DATA/lang/mo/ru/LC_MESSAGES/INVALID_RAND.mo"; CAPTURE( path ); - REQUIRE( file_exist( fs::u8path( path ) ) ); + REQUIRE( file_exist( std::filesystem::u8path( path ) ) ); REQUIRE_THROWS_AS( LoadMODocument( path ), InvalidTranslationDocumentException ); } @@ -88,7 +89,7 @@ TEST_CASE( "TranslationManager_translate_benchmark", "[.][benchmark][translation TranslationManager manager; // Russian - REQUIRE( file_exist( fs::u8path( "./lang/mo/ru/LC_MESSAGES/cataclysm-dda.mo" ) ) ); + REQUIRE( file_exist( std::filesystem::u8path( "./lang/mo/ru/LC_MESSAGES/cataclysm-dda.mo" ) ) ); manager.LoadDocuments( std::vector {"./lang/mo/ru/LC_MESSAGES/cataclysm-dda.mo"} ); REQUIRE( strcmp( manager.Translate( "battery" ), "battery" ) != 0 ); BENCHMARK( "Russian" ) { @@ -96,7 +97,7 @@ TEST_CASE( "TranslationManager_translate_benchmark", "[.][benchmark][translation }; // Chinese - REQUIRE( file_exist( fs::u8path( "./lang/mo/zh_CN/LC_MESSAGES/cataclysm-dda.mo" ) ) ); + REQUIRE( file_exist( std::filesystem::u8path( "./lang/mo/zh_CN/LC_MESSAGES/cataclysm-dda.mo" ) ) ); manager.LoadDocuments( std::vector {"./lang/mo/zh_CN/LC_MESSAGES/cataclysm-dda.mo"} ); REQUIRE( strcmp( manager.Translate( "battery" ), "battery" ) != 0 ); BENCHMARK( "Chinese" ) { diff --git a/tests/vehicle_power_test.cpp b/tests/vehicle_power_test.cpp index f59a6a9de0bcc..2f24ec884e029 100644 --- a/tests/vehicle_power_test.cpp +++ b/tests/vehicle_power_test.cpp @@ -66,7 +66,7 @@ TEST_CASE( "power_loss_to_cables", "[vehicle][power]" ) debugmsg( "source same as target" ); } - tripoint_abs_ms target_global = here.getglobal( target ); + tripoint_abs_ms target_global = here.get_abs( target ); const vpart_id vpid( cord.typeId().str() ); point_rel_ms vcoords = source_vp->mount_pos(); @@ -80,7 +80,7 @@ TEST_CASE( "power_loss_to_cables", "[vehicle][power]" ) tripoint_bub_ms source_global( cord.get_var( "source_x", 0 ), cord.get_var( "source_y", 0 ), cord.get_var( "source_z", 0 ) ); - target_part.target.first = here.getglobal( source_global ); + target_part.target.first = here.get_abs( source_global ); target_part.target.second = source_veh->global_square_location(); target_veh->install_part( vcoords, std::move( target_part ) ); }; diff --git a/tests/vehicle_test.cpp b/tests/vehicle_test.cpp index c5cd4ac540b4b..5edbf5710d8c3 100644 --- a/tests/vehicle_test.cpp +++ b/tests/vehicle_test.cpp @@ -477,7 +477,7 @@ TEST_CASE( "power_cable_stretch_disconnect" ) WHEN( "displacing first appliance to the left" ) { for( int i = 0; - rl_dist( m.getglobal( app1.pos_bub() ), m.getglobal( app2.pos_bub() ) ) <= max_dist && + rl_dist( m.get_abs( app1.pos_bub() ), m.get_abs( app2.pos_bub() ) ) <= max_dist && i < max_displacement; i++ ) { CHECK( app1.part_count() == 2 ); CHECK( app2.part_count() == 2 ); @@ -485,15 +485,15 @@ TEST_CASE( "power_cable_stretch_disconnect" ) app1.part_removal_cleanup(); app2.part_removal_cleanup(); } - CAPTURE( m.getglobal( app1.pos_bub() ) ); - CAPTURE( m.getglobal( app2.pos_bub() ) ); + CAPTURE( m.get_abs( app1.pos_bub() ) ); + CAPTURE( m.get_abs( app2.pos_bub() ) ); CHECK( app1.part_count() == 1 ); CHECK( app2.part_count() == 1 ); } WHEN( "displacing second appliance to the right" ) { for( int i = 0; - rl_dist( m.getglobal( app1.pos_bub() ), m.getglobal( app2.pos_bub() ) ) <= max_dist && + rl_dist( m.get_abs( app1.pos_bub() ), m.get_abs( app2.pos_bub() ) ) <= max_dist && i < max_displacement; i++ ) { CHECK( app1.part_count() == 2 ); CHECK( app2.part_count() == 2 ); @@ -501,8 +501,8 @@ TEST_CASE( "power_cable_stretch_disconnect" ) app1.part_removal_cleanup(); app2.part_removal_cleanup(); } - CAPTURE( m.getglobal( app1.pos_bub() ) ); - CAPTURE( m.getglobal( app2.pos_bub() ) ); + CAPTURE( m.get_abs( app1.pos_bub() ) ); + CAPTURE( m.get_abs( app2.pos_bub() ) ); CHECK( app1.part_count() == 1 ); CHECK( app2.part_count() == 1 ); } @@ -520,7 +520,7 @@ TEST_CASE( "power_cable_stretch_disconnect" ) WHEN( "displacing first appliance to the left" ) { for( int i = 0; - rl_dist( m.getglobal( app1.pos_bub() ), m.getglobal( app2.pos_bub() ) ) <= max_dist && + rl_dist( m.get_abs( app1.pos_bub() ), m.get_abs( app2.pos_bub() ) ) <= max_dist && i < max_displacement; i++ ) { CHECK( app1.part_count() == 2 ); CHECK( app2.part_count() == 2 ); @@ -528,15 +528,15 @@ TEST_CASE( "power_cable_stretch_disconnect" ) app1.part_removal_cleanup(); app2.part_removal_cleanup(); } - CAPTURE( m.getglobal( app1.pos_bub() ) ); - CAPTURE( m.getglobal( app2.pos_bub() ) ); + CAPTURE( m.get_abs( app1.pos_bub() ) ); + CAPTURE( m.get_abs( app2.pos_bub() ) ); CHECK( app1.part_count() == 1 ); CHECK( app2.part_count() == 1 ); } WHEN( "displacing second appliance to the right" ) { for( int i = 0; - rl_dist( m.getglobal( app1.pos_bub() ), m.getglobal( app2.pos_bub() ) ) <= max_dist && + rl_dist( m.get_abs( app1.pos_bub() ), m.get_abs( app2.pos_bub() ) ) <= max_dist && i < max_displacement; i++ ) { CHECK( app1.part_count() == 2 ); CHECK( app2.part_count() == 2 ); @@ -544,8 +544,8 @@ TEST_CASE( "power_cable_stretch_disconnect" ) app1.part_removal_cleanup(); app2.part_removal_cleanup(); } - CAPTURE( m.getglobal( app1.pos_bub() ) ); - CAPTURE( m.getglobal( app2.pos_bub() ) ); + CAPTURE( m.get_abs( app1.pos_bub() ) ); + CAPTURE( m.get_abs( app2.pos_bub() ) ); CHECK( app1.part_count() == 1 ); CHECK( app2.part_count() == 1 ); } diff --git a/tests/water_movement_test.cpp b/tests/water_movement_test.cpp index 0ae9d2637ab7a..d135d44fdc84b 100644 --- a/tests/water_movement_test.cpp +++ b/tests/water_movement_test.cpp @@ -1,3 +1,4 @@ +#include #include #include @@ -951,7 +952,7 @@ TEST_CASE( "export_scenario_swim_move_cost_and_distance_values", "[.]" ) avatar &dummy = get_avatar(); std::ofstream testfile; - testfile.open( fs::u8path( "swim-scenarios.csv" ), std::ofstream::trunc ); + testfile.open( std::filesystem::u8path( "swim-scenarios.csv" ), std::ofstream::trunc ); testfile << "scenario, move cost, steps" << std::endl; for( const swim_scenario &scenario : generate_scenarios() ) { @@ -976,7 +977,7 @@ TEST_CASE( "export_profession_swim_cost_and_distance", "[.]" ) avatar &dummy = get_avatar(); std::ofstream testfile; - testfile.open( fs::u8path( "swim-profession.csv" ), std::ofstream::trunc ); + testfile.open( std::filesystem::u8path( "swim-profession.csv" ), std::ofstream::trunc ); testfile << "profession, move cost, steps" << std::endl; const std::vector &all = profession::get_all(); @@ -1012,7 +1013,7 @@ TEST_CASE( "export_swim_move_cost_and_distance_data", "[.]" ) avatar &dummy = get_avatar(); std::ofstream testfile; - testfile.open( fs::u8path( "swim-skill.csv" ), std::ofstream::trunc ); + testfile.open( std::filesystem::u8path( "swim-skill.csv" ), std::ofstream::trunc ); testfile << "athletics, move cost, steps" << std::endl; for( int i = 0; i <= 10; i++ ) { swimmer_config config( stats_map.at( "average" ), swimmer_skills{i}, gear_map.at( "none" ), @@ -1022,7 +1023,7 @@ TEST_CASE( "export_swim_move_cost_and_distance_data", "[.]" ) } testfile.close(); - testfile.open( fs::u8path( "swim-strength.csv" ), std::ofstream::trunc ); + testfile.open( std::filesystem::u8path( "swim-strength.csv" ), std::ofstream::trunc ); testfile << "strength, move cost, steps" << std::endl; for( int i = 4; i <= 20; i++ ) { swimmer_config config( {i, 8}, skills_map.at( "none" ), gear_map.at( "none" ), @@ -1032,7 +1033,7 @@ TEST_CASE( "export_swim_move_cost_and_distance_data", "[.]" ) } testfile.close(); - testfile.open( fs::u8path( "swim-dexterity.csv" ), std::ofstream::trunc ); + testfile.open( std::filesystem::u8path( "swim-dexterity.csv" ), std::ofstream::trunc ); testfile << "dexterity, move cost, steps" << std::endl; for( int i = 4; i <= 20; i++ ) { swimmer_config config( { 8, i }, skills_map.at( "none" ), gear_map.at( "none" ), diff --git a/tests/zones_custom_test.cpp b/tests/zones_custom_test.cpp index a880600433838..465b9a805ef9c 100644 --- a/tests/zones_custom_test.cpp +++ b/tests/zones_custom_test.cpp @@ -20,12 +20,12 @@ TEST_CASE( "zones_custom", "[zones]" ) WHEN( "overlapping custom zones" ) { clear_map(); map &m = get_map(); - tripoint_abs_ms const zone_loc = m.getglobal( tripoint_bub_ms{ 5, 5, 0 } ); + tripoint_abs_ms const zone_loc = m.get_abs( tripoint_bub_ms{ 5, 5, 0 } ); tripoint_abs_ms const zone_hammer_end = zone_loc + tripoint::north; tripoint_abs_ms const zone_bowsaw_end = zone_loc + tripoint::south; tripoint_abs_ms const zone_testgroup_end = zone_loc + tripoint::east; tripoint_abs_ms const zone_groupbatt_end = zone_loc + tripoint::west; - tripoint_abs_ms const where = m.getglobal( tripoint_bub_ms::zero ); + tripoint_abs_ms const where = m.get_abs( tripoint_bub_ms::zero ); item hammer( itype_hammer ); item bow_saw( itype_bow_saw ); item pants_fur( itype_test_pants_fur ); @@ -48,7 +48,7 @@ TEST_CASE( "zones_custom", "[zones]" ) "test_event_item_spawn" ); mapgen_place_zone( zone_loc, zone_groupbatt_end, zone_type_LOOT_ITEM_GROUP, your_fac, {}, "test_group_disp" ); - tripoint_abs_ms const m_zone_loc = m.getglobal( tripoint_bub_ms{-5, -5, 0 } ); + tripoint_abs_ms const m_zone_loc = m.get_abs( tripoint_bub_ms{-5, -5, 0 } ); mapgen_place_zone( m_zone_loc, m_zone_loc, zone_type_LOOT_CUSTOM, your_fac, {}, "plastic bag" ); diff --git a/tools/clang-tidy-plugin/U8PathCheck.cpp b/tools/clang-tidy-plugin/U8PathCheck.cpp index f81c7ca813314..42811105f40bc 100644 --- a/tools/clang-tidy-plugin/U8PathCheck.cpp +++ b/tools/clang-tidy-plugin/U8PathCheck.cpp @@ -111,28 +111,28 @@ void U8PathCheck::check( const MatchFinder::MatchResult &Result ) std::string diagMessage; if( constructExpr ) { diagRange = constructExpr->getSourceRange(); - diagMessage = "Construct `fs::path` by passing UTF-8 string to " - "`fs::u8path` to ensure the correct path encoding."; + diagMessage = "Construct `std::filesystem::path` by passing UTF-8 string to " + "`std::filesystem::u8path` to ensure the correct path encoding."; } else if( operatorCallArg ) { diagRange = operatorCallArg->getSourceRange(); - diagMessage = "Modify `fs::path` using parameter constructed with " - "`fs::u8path` and UTF-8 string to ensure the correct path " + diagMessage = "Modify `std::filesystem::path` using parameter constructed with " + "`std::filesystem::u8path` and UTF-8 string to ensure the correct path " "encoding."; } else if( operatorRefExpr ) { diagRange = operatorRefExpr->getSourceRange(); - diagMessage = "Use the operator overload with `fs::path` parameter and " - "call it using parameter constructed with `fs::u8path` and " + diagMessage = "Use the operator overload with `std::filesystem::path` parameter and " + "call it using parameter constructed with `std::filesystem::u8path` and " "UTF-8 string to ensure the correct path encoding."; } else if( memberCallExpr ) { diagRange = memberCallExpr->getSourceRange(); - diagMessage = "Modify `fs::path` using `=`, `/=`, and `+=` and parameter " - "constructed with `fs::u8path` and UTF-8 string to ensure " + diagMessage = "Modify `std::filesystem::path` using `=`, `/=`, and `+=` and parameter " + "constructed with `std::filesystem::u8path` and UTF-8 string to ensure " "the correct path encoding."; } else if( methodRefExpr ) { diagRange = methodRefExpr->getSourceRange(); diagMessage = "Use the `=`, `/=`, or `+=` operator overload with " - "`fs::path` parameter and call it using parameter " - "constructed with `fs::u8path` and UTF-8 string to ensure " + "`std::filesystem::path` parameter and call it using parameter " + "constructed with `std::filesystem::u8path` and UTF-8 string to ensure " "the correct path encoding."; } else { return; diff --git a/tools/clang-tidy-plugin/test/u8-path.cpp b/tools/clang-tidy-plugin/test/u8-path.cpp index aa56c3feccfb2..bf8cda7de31c6 100644 --- a/tools/clang-tidy-plugin/test/u8-path.cpp +++ b/tools/clang-tidy-plugin/test/u8-path.cpp @@ -1,179 +1,186 @@ // RUN: %check_clang_tidy -allow-stdinc %s cata-u8-path %t -- --load=%cata_plugin -- -isystem %cata_include/third-party -#include +#include -void write_to_file( const fs::path &p ); -fs::path get_root_dir(); +void write_to_file( const std::filesystem::path &p ); +std::filesystem::path get_root_dir(); -static void call_fs_path_method( fs::path & ( fs::path::* method )( const char *const & ) ) +static void call_fs_path_method( std::filesystem::path & ( std::filesystem::path::* method )( + const char *const & ) ) { - fs::path p; + std::filesystem::path p; ( p.*method )( "foo" ); } -class path_inherit : public fs::path +class path_inherit : public std::filesystem::path { }; -class path_using : public fs::path +class path_using : public std::filesystem::path { public: - using fs::path::path; - using fs::path::operator=; - using fs::path::assign; + using std::filesystem::path::path; + using std::filesystem::path::operator=; + using std::filesystem::path::assign; }; void test_cases() { const char *const foo = "foo"; - fs::path path_u8_cstr = fs::u8path( foo ); - fs::path path_u8_pchar = fs::u8path( foo, foo + 3 ); + std::filesystem::path path_u8_cstr = std::filesystem::u8path( foo ); + std::filesystem::path path_u8_pchar = std::filesystem::u8path( foo, foo + 3 ); write_to_file( path_u8_cstr ); - fs::path path_op_join_paths = path_u8_cstr / path_u8_pchar; + std::filesystem::path path_op_join_paths = path_u8_cstr / path_u8_pchar; static_cast( path_op_join_paths ); - // Empty fs::path is acceptable - fs::path(); - fs::path path_empty; + // Empty std::filesystem::path is acceptable + std::filesystem::path(); + std::filesystem::path path_empty; // Construction from existing path is acceptable - fs::path path_copy_ctor = path_u8_cstr; - fs::path path_move_ctor = std::move( path_copy_ctor ); - fs::path path_elision_ctor = get_root_dir(); + std::filesystem::path path_copy_ctor = path_u8_cstr; + std::filesystem::path path_move_ctor = std::move( path_copy_ctor ); + std::filesystem::path path_elision_ctor = get_root_dir(); static_cast( path_elision_ctor ); - fs::path( "bar" ); - // CHECK-MESSAGES: [[@LINE-1]]:5: warning: Construct `fs::path` by passing UTF-8 string to `fs::u8path` to ensure the correct path encoding. - fs::path path_str_literal = "foo"; - // CHECK-MESSAGES: [[@LINE-1]]:33: warning: Construct `fs::path` by passing UTF-8 string to `fs::u8path` to ensure the correct path encoding. - fs::path path_cstr = foo; - // CHECK-MESSAGES: [[@LINE-1]]:26: warning: Construct `fs::path` by passing UTF-8 string to `fs::u8path` to ensure the correct path encoding. - fs::path( foo, foo + 3 ); - // CHECK-MESSAGES: [[@LINE-1]]:5: warning: Construct `fs::path` by passing UTF-8 string to `fs::u8path` to ensure the correct path encoding. - using fs_path = fs::path; + std::filesystem::path( "bar" ); + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Construct `std::filesystem::path` by passing UTF-8 string to `std::filesystem::u8path` to ensure the correct path encoding. + std::filesystem::path path_str_literal = "foo"; + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Construct `std::filesystem::path` by passing UTF-8 string to `std::filesystem::u8path` to ensure the correct path encoding. + std::filesystem::path path_cstr = foo; + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Construct `std::filesystem::path` by passing UTF-8 string to `std::filesystem::u8path` to ensure the correct path encoding. + std::filesystem::path( foo, foo + 3 ); + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Construct `std::filesystem::path` by passing UTF-8 string to `std::filesystem::u8path` to ensure the correct path encoding. + using fs_path = std::filesystem::path; fs_path{ foo }; - // CHECK-MESSAGES: [[@LINE-1]]:5: warning: Construct `fs::path` by passing UTF-8 string to `fs::u8path` to ensure the correct path encoding. + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Construct `std::filesystem::path` by passing UTF-8 string to `std::filesystem::u8path` to ensure the correct path encoding. write_to_file( "baz" ); - // CHECK-MESSAGES: [[@LINE-1]]:20: warning: Construct `fs::path` by passing UTF-8 string to `fs::u8path` to ensure the correct path encoding. - fs::path path_op_join_path_cstr = path_u8_cstr / foo; - // CHECK-MESSAGES: [[@LINE-1]]:54: warning: Construct `fs::path` by passing UTF-8 string to `fs::u8path` to ensure the correct path encoding. - fs::path path_op_join_str_literal_path = ".." / path_u8_pchar; - // CHECK-MESSAGES: [[@LINE-1]]:46: warning: Construct `fs::path` by passing UTF-8 string to `fs::u8path` to ensure the correct path encoding. + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Construct `std::filesystem::path` by passing UTF-8 string to `std::filesystem::u8path` to ensure the correct path encoding. + std::filesystem::path path_op_join_path_cstr = path_u8_cstr / foo; + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Construct `std::filesystem::path` by passing UTF-8 string to `std::filesystem::u8path` to ensure the correct path encoding. + std::filesystem::path path_op_join_str_literal_path = ".." / path_u8_pchar; + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Construct `std::filesystem::path` by passing UTF-8 string to `std::filesystem::u8path` to ensure the correct path encoding. static_cast( path_op_join_path_cstr ); static_cast( path_op_join_str_literal_path ); - fs::path path_op_copy_assign; + std::filesystem::path path_op_copy_assign; path_op_copy_assign = path_u8_cstr; - fs::path path_op_move_assign; + std::filesystem::path path_op_move_assign; path_op_move_assign = std::move( path_op_copy_assign ); - fs::path path_op_assign_cstr; + std::filesystem::path path_op_assign_cstr; path_op_assign_cstr = foo; - // CHECK-MESSAGES: [[@LINE-1]]:27: warning: Modify `fs::path` using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Modify `std::filesystem::path` using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. fs_path() = foo; - // CHECK-MESSAGES: [[@LINE-1]]:17: warning: Modify `fs::path` using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. - fs::path path_op_assign_str_literal; + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Modify `std::filesystem::path` using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. + std::filesystem::path path_op_assign_str_literal; path_op_assign_str_literal.operator = ( "foo" ); - // CHECK-MESSAGES: [[@LINE-1]]:45: warning: Modify `fs::path` using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. - fs::path path_assign_str_literal; + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Modify `std::filesystem::path` using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. + std::filesystem::path path_assign_str_literal; path_assign_str_literal.assign( "foo" ); - // CHECK-MESSAGES: [[@LINE-1]]:5: warning: Modify `fs::path` using `=`, `/=`, and `+=` and parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. - fs::path path_assign_pchar; + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Modify `std::filesystem::path` using `=`, `/=`, and `+=` and parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. + std::filesystem::path path_assign_pchar; path_assign_pchar.assign( foo, foo + 3 ); - // CHECK-MESSAGES: [[@LINE-1]]:5: warning: Modify `fs::path` using `=`, `/=`, and `+=` and parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Modify `std::filesystem::path` using `=`, `/=`, and `+=` and parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. fs_path().assign( foo, foo + 3 ); - // CHECK-MESSAGES: [[@LINE-1]]:5: warning: Modify `fs::path` using `=`, `/=`, and `+=` and parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Modify `std::filesystem::path` using `=`, `/=`, and `+=` and parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. - fs::path path_op_append_path; + std::filesystem::path path_op_append_path; path_op_append_path /= path_assign_pchar; - fs::path path_op_append_str_literal; + std::filesystem::path path_op_append_str_literal; path_op_append_str_literal /= "foo"; - // CHECK-MESSAGES: [[@LINE-1]]:35: warning: Modify `fs::path` using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. - fs::path path_op_append_cstr; + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Modify `std::filesystem::path` using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. + std::filesystem::path path_op_append_cstr; path_op_append_cstr.operator /= ( foo ); - // CHECK-MESSAGES: [[@LINE-1]]:39: warning: Modify `fs::path` using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. - fs::path path_append_cstr; + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Modify `std::filesystem::path` using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. + std::filesystem::path path_append_cstr; path_append_cstr.append( foo ); - // CHECK-MESSAGES: [[@LINE-1]]:5: warning: Modify `fs::path` using `=`, `/=`, and `+=` and parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. - fs::path path_append_pchar; + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Modify `std::filesystem::path` using `=`, `/=`, and `+=` and parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. + std::filesystem::path path_append_pchar; path_append_pchar.append( foo, foo + 3 ); - // CHECK-MESSAGES: [[@LINE-1]]:5: warning: Modify `fs::path` using `=`, `/=`, and `+=` and parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Modify `std::filesystem::path` using `=`, `/=`, and `+=` and parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. - fs::path path_op_concat_path; + std::filesystem::path path_op_concat_path; path_op_concat_path += path_assign_pchar; - fs::path path_op_concat_str_literal; + std::filesystem::path path_op_concat_str_literal; path_op_concat_str_literal += "foo"; - // CHECK-MESSAGES: [[@LINE-1]]:35: warning: Modify `fs::path` using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. - fs::path path_op_concat_cstr; + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Modify `std::filesystem::path` using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. + std::filesystem::path path_op_concat_cstr; path_op_concat_cstr.operator += ( foo ); - // CHECK-MESSAGES: [[@LINE-1]]:39: warning: Modify `fs::path` using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. - fs::path path_concat_cstr; + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Modify `std::filesystem::path` using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. + std::filesystem::path path_concat_cstr; path_concat_cstr.concat( foo ); - // CHECK-MESSAGES: [[@LINE-1]]:5: warning: Modify `fs::path` using `=`, `/=`, and `+=` and parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. - fs::path path_concat_pchar; + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Modify `std::filesystem::path` using `=`, `/=`, and `+=` and parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. + std::filesystem::path path_concat_pchar; path_concat_pchar.concat( foo, foo + 3 ); - // CHECK-MESSAGES: [[@LINE-1]]:5: warning: Modify `fs::path` using `=`, `/=`, and `+=` and parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Modify `std::filesystem::path` using `=`, `/=`, and `+=` and parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. - fs::path &( fs::path::* fn_op_assign_path )( const fs::path & ) = &fs::path::operator=; + std::filesystem::path &( std::filesystem::path::* fn_op_assign_path )( + const std::filesystem::path & ) = &std::filesystem::path::operator=; - fs::path &( fs::path::* fn_op_assign_cstr )( const char *const & ) = &fs::path::operator=; - // CHECK-MESSAGES: [[@LINE-1]]:75: warning: Use the operator overload with `fs::path` parameter and call it using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. + std::filesystem::path &( std::filesystem::path::* fn_op_assign_cstr )( + const char *const & ) = &std::filesystem::path::operator=; + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Use the operator overload with `std::filesystem::path` parameter and call it using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. static_cast( static_cast ( &fs_path::operator= ) ); - // CHECK-MESSAGES: [[@LINE-1]]:27: warning: Use the operator overload with `fs::path` parameter and call it using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. - fs::path &( fs::path::* fn_assign_cstr )( const char *const & ) = &fs::path::assign; - // CHECK-MESSAGES: [[@LINE-1]]:72: warning: Use the `=`, `/=`, or `+=` operator overload with `fs::path` parameter and call it using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Use the operator overload with `std::filesystem::path` parameter and call it using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. + std::filesystem::path &( std::filesystem::path::* fn_assign_cstr )( const char *const & ) = + &std::filesystem::path::assign; + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Use the `=`, `/=`, or `+=` operator overload with `std::filesystem::path` parameter and call it using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. static_cast( static_cast ( &fs_path::assign ) ); - // CHECK-MESSAGES: [[@LINE-1]]:27: warning: Use the `=`, `/=`, or `+=` operator overload with `fs::path` parameter and call it using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Use the `=`, `/=`, or `+=` operator overload with `std::filesystem::path` parameter and call it using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. // Non-ambiguous - fs::path &( fs::path::* fn_op_assign_cstr_expl )( const char *const & ) = - &fs::path::operator+=; - // CHECK-MESSAGES: [[@LINE-1]]:10: warning: Use the operator overload with `fs::path` parameter and call it using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. + std::filesystem::path &( std::filesystem::path::* fn_op_assign_cstr_expl )( const char *const & ) = + &std::filesystem::path::operator+=; + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Use the operator overload with `std::filesystem::path` parameter and call it using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. // Ambiguous and resolved by the lhs type - fs::path &( fs::path::* fn_assign_cstr_expl )( const char *const & ) = - &fs::path::concat; - // CHECK-MESSAGES: [[@LINE-1]]:10: warning: Use the `=`, `/=`, or `+=` operator overload with `fs::path` parameter and call it using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. - call_fs_path_method( &fs::path::operator/= ); - // CHECK-MESSAGES: [[@LINE-1]]:27: warning: Use the operator overload with `fs::path` parameter and call it using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. - call_fs_path_method( &fs::path::append ); - // CHECK-MESSAGES: [[@LINE-1]]:27: warning: Use the `=`, `/=`, or `+=` operator overload with `fs::path` parameter and call it using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. - fs::path path_assign_cstr; + std::filesystem::path &( std::filesystem::path::* fn_assign_cstr_expl )( const char *const & ) = + &std::filesystem::path::concat; + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Use the `=`, `/=`, or `+=` operator overload with `std::filesystem::path` parameter and call it using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. + call_fs_path_method( &std::filesystem::path::operator/= ); + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Use the operator overload with `std::filesystem::path` parameter and call it using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. + call_fs_path_method( &std::filesystem::path::append ); + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Use the `=`, `/=`, or `+=` operator overload with `std::filesystem::path` parameter and call it using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. + std::filesystem::path path_assign_cstr; ( path_assign_cstr.*fn_op_assign_cstr )( foo ); ( path_assign_cstr.*fn_assign_cstr )( foo ); ( path_assign_cstr.*fn_op_assign_cstr_expl )( foo ); ( path_assign_cstr.*fn_assign_cstr_expl )( foo ); static_cast( path_inherit{ foo } ); - // CHECK-MESSAGES: [[@LINE-1]]:38: warning: Construct `fs::path` by passing UTF-8 string to `fs::u8path` to ensure the correct path encoding. + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Construct `std::filesystem::path` by passing UTF-8 string to `std::filesystem::u8path` to ensure the correct path encoding. path_inherit().assign( foo ); - // CHECK-MESSAGES: [[@LINE-1]]:5: warning: Modify `fs::path` using `=`, `/=`, and `+=` and parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. - static_cast( static_cast + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Modify `std::filesystem::path` using `=`, `/=`, and `+=` and parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. + static_cast( static_cast ( &path_inherit::assign ) ); - // CHECK-MESSAGES: [[@LINE-1]]:27: warning: Use the `=`, `/=`, or `+=` operator overload with `fs::path` parameter and call it using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. - static_cast( static_cast - ( &path_inherit::assign ) ); - // CHECK-MESSAGES: [[@LINE-1]]:27: warning: Use the `=`, `/=`, or `+=` operator overload with `fs::path` parameter and call it using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Use the `=`, `/=`, or `+=` operator overload with `std::filesystem::path` parameter and call it using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. + static_cast + ( static_cast + ( &path_inherit::assign ) ); + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Use the `=`, `/=`, or `+=` operator overload with `std::filesystem::path` parameter and call it using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. // FIXME: Ideally this should also be detected, but I'm not sure if it is worth the effort. path_using{ foo }; - // CHECK-MESSAGES-NOT: [[@LINE-1]]:5: warning: Construct `fs::path` by passing UTF-8 string to `fs::u8path` to ensure the correct path encoding. + // CHECK-MESSAGES-NOT: [[@LINE-1]]:{{[0-9]+}}: warning: Construct `std::filesystem::path` by passing UTF-8 string to `std::filesystem::u8path` to ensure the correct path encoding. path_using() = foo; - // CHECK-MESSAGES: [[@LINE-1]]:20: warning: Modify `fs::path` using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Modify `std::filesystem::path` using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. path_using().operator = ( foo ); - // CHECK-MESSAGES: [[@LINE-1]]:31: warning: Modify `fs::path` using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Modify `std::filesystem::path` using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. path_using().assign( foo ); - // CHECK-MESSAGES: [[@LINE-1]]:5: warning: Modify `fs::path` using `=`, `/=`, and `+=` and parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. - static_cast( static_cast - ( &path_using::operator= ) ); - // CHECK-MESSAGES: [[@LINE-1]]:27: warning: Use the operator overload with `fs::path` parameter and call it using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. - static_cast( static_cast - ( &path_using::assign ) ); - // CHECK-MESSAGES: [[@LINE-1]]:27: warning: Use the `=`, `/=`, or `+=` operator overload with `fs::path` parameter and call it using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. - static_cast( static_cast + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Modify `std::filesystem::path` using `=`, `/=`, and `+=` and parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. + static_cast( static_cast ( &path_using::operator= ) ); - // CHECK-MESSAGES: [[@LINE-1]]:27: warning: Use the operator overload with `fs::path` parameter and call it using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. - static_cast( static_cast + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Use the operator overload with `std::filesystem::path` parameter and call it using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. + static_cast( static_cast ( &path_using::assign ) ); - // CHECK-MESSAGES: [[@LINE-1]]:27: warning: Use the `=`, `/=`, or `+=` operator overload with `fs::path` parameter and call it using parameter constructed with `fs::u8path` and UTF-8 string to ensure the correct path encoding. + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Use the `=`, `/=`, or `+=` operator overload with `std::filesystem::path` parameter and call it using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. + static_cast + ( static_cast + ( &path_using::operator= ) ); + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Use the operator overload with `std::filesystem::path` parameter and call it using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. + static_cast + ( static_cast + ( &path_using::assign ) ); + // CHECK-MESSAGES: [[@LINE-1]]:{{[0-9]+}}: warning: Use the `=`, `/=`, or `+=` operator overload with `std::filesystem::path` parameter and call it using parameter constructed with `std::filesystem::u8path` and UTF-8 string to ensure the correct path encoding. } diff --git a/tools/format/format_main.cpp b/tools/format/format_main.cpp index e99f536cc7c84..43ed8a3211e2e 100644 --- a/tools/format/format_main.cpp +++ b/tools/format/format_main.cpp @@ -127,7 +127,7 @@ int main( int argc, char *argv[] ) fout << out.str(); fout.close(); std::cout << color_bad << "Has been linted : " << color_end << filename << std::endl; - std::cout << "Please read doc/JSON_STYLE.md" << std::endl; + std::cout << "Please read doc/JSON/JSON_STYLE.md" << std::endl; exit( EXIT_FAILURE ); } } diff --git a/tools/json_tools/assign_mission_target_needs_om_special.bash b/tools/json_tools/assign_mission_target_needs_om_special.bash index 518c50b58a485..d29137a47017e 100755 --- a/tools/json_tools/assign_mission_target_needs_om_special.bash +++ b/tools/json_tools/assign_mission_target_needs_om_special.bash @@ -42,7 +42,7 @@ Q --slurpfile special_of_terrain "$SPECIAL_OF_TERRAIN" \ if jq --exit-status '. != []' < "$MISSING_OM_SPECIAL" > /dev/null; then echo "The following missions lack .start.assign_mission_target.om_special -See https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/MISSIONS_JSON.md#assign_mission_target +See https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/JSON/MISSIONS_JSON.md#assign_mission_target > If the om_terrain is part of an overmap special, it's essential to specify > the om_special value as well--otherwise, the game will not know how to spawn > the entire special." >&2 diff --git a/tools/json_tools/cddatags.py b/tools/json_tools/cddatags.py index 1479062da8251..2125a3e71fe07 100755 --- a/tools/json_tools/cddatags.py +++ b/tools/json_tools/cddatags.py @@ -18,9 +18,9 @@ def cdda_style_json(v): - if type(v) == str: + if type(v) is str: return json.dumps(v) - elif type(v) == list: + elif type(v) is list: return f'[ {", ".join(cdda_style_json(e) for e in v)} ]' else: raise RuntimeError('Unexpected type') @@ -53,9 +53,9 @@ def main(args): def add_definition(id_key, id, full_id, relative_path): if not id: return - if type(id) == str: + if type(id) is str: definitions.append((id_key, id, full_id, relative_path)) - elif type(id) == list: + elif type(id) is list: for i in id: add_definition(id_key, i, full_id, relative_path) @@ -73,9 +73,9 @@ def add_definition(id_key, id, full_id, relative_path): "Problem reading file %s, reason: %s" % (filename, err)) continue - if type(json_data) == dict: + if type(json_data) is dict: json_data = [json_data] - elif type(json_data) != list: + elif type(json_data) is not list: sys.stderr.write( "Problem parsing data from file %s, reason: " "expected a list." % filename) diff --git a/tools/json_tools/convert_armor.py b/tools/json_tools/convert_armor.py index cf609cda0839f..12f0df25248f2 100755 --- a/tools/json_tools/convert_armor.py +++ b/tools/json_tools/convert_armor.py @@ -154,7 +154,7 @@ def get_armor_data(jo): # This will be done again in the recursive function # But we do it here for an early return on no data read_armor_data(jo, dat) - if("armor" not in jo and + if ("armor" not in jo and (len(dat) == 0 or (len(dat) == 1 and "material" in dat))): return dict() @@ -274,7 +274,7 @@ def gen_new(path): for key in transferred_keys: if key != "material" and key in jo: - del(jo[key]) + del jo[key] return json_data if change else None diff --git a/tools/json_tools/extend_itemgroups.py b/tools/json_tools/extend_itemgroups.py index 8c8c2f2f19d07..e6b674cf0136f 100755 --- a/tools/json_tools/extend_itemgroups.py +++ b/tools/json_tools/extend_itemgroups.py @@ -53,7 +53,7 @@ def gen_new(path): if key not in jo: continue jo["extend"][key] = jo[key] - del(jo[key]) + del jo[key] return json_data if change else None diff --git a/tools/json_tools/gun_variant_validator.py b/tools/json_tools/gun_variant_validator.py index 3332c6750442a..24787ac01eb6a 100755 --- a/tools/json_tools/gun_variant_validator.py +++ b/tools/json_tools/gun_variant_validator.py @@ -141,6 +141,7 @@ "plasma_gun", "bbgun", } +# Stripped from gun/mag names before checking for an identifier BAD_IDENTIFIERS = [ "10mm", ".22", @@ -157,9 +158,25 @@ "9x19mm", "-round", "magazine", + "pistol", "stripper", "speedloader", ] +# Common tokens that will be rejected +BAD_COMMON_TOKENS = { + "rifle", + "carbine", + "pistol", + "ing" +} +# Common tokens that are permitted to be below length reqs +SHORT_COMMON_TOKENS = { + "AI", # Abbreviation of gun manufacturer + "AK", # Common name for a gun family + "FN", # Common name for a manufacturer + "G3", # Common name for a certain gun + "M9", # Common name for a certain gun +} TYPE_DESCRIPTORS = [ "automagnum", "blunderbuss", @@ -195,6 +212,10 @@ "submachine gun", "trenchgun", ] +DUPE_CHECK_BLACKLIST = [ + # No magazines, and very similar tube-fed rifles with slightly diff barrels + {"rio_bravo", "henry_golden_boy"}, +] """ JSON parsing functions @@ -591,11 +612,12 @@ def common_token(names): # Assume the longest common substring will be the "identifier" # leading/trailing whitespace isn't meaningful in identifiers common_token = longest_common_substring(names).strip() - # It can't be a meaningful identifier if it's 1 character long - if len(common_token) < 2: + # It can't be a meaningful identifier if it's 1-2 characters long + # Some exceptions (e.g. AK, G3) + if len(common_token) < 3 and common_token not in SHORT_COMMON_TOKENS: return None # Some common identifiers that don't work - if common_token in {"11", "to", "if", "ip", "rifle", "carbine"}: + if common_token in BAD_COMMON_TOKENS: return None return common_token @@ -682,7 +704,24 @@ def find_bad_names(all_guns): """ +def remove_blacklisted_dupes(guns): + if len(guns) == 1: + return guns + guns_set = set(map(lambda gun: gun["id"], guns)) + for blacklist_set in DUPE_CHECK_BLACKLIST: + all_match = True + for gun in blacklist_set: + if gun not in guns_set: + print(gun, "not in", guns_set) + all_match = False + break + if all_match: + guns = list(filter(lambda g: g["id"] not in blacklist_set, guns)) + return guns + + def find_dupe_names(all_guns): + error = False all_names = {} for gun in all_guns: name = name_of(gun) + str(sorted(gun["ammo"])) @@ -691,12 +730,15 @@ def find_dupe_names(all_guns): else: all_names[name] = [gun] for key, value in all_names.items(): - if len(value) == 1: + value = remove_blacklisted_dupes(value) + if len(value) < 2: continue out = "ERROR: Guns have the same name and ammo (" + key + "):" + error = True for gun in value: out += " (" + gun["id"] + ")," print(out) + return error """ @@ -759,7 +801,7 @@ def check_identifiers(all_guns): good_tokens = [[]] idx = 0 len_so_far = 0 - for token in good_token_list: + for token in sorted(good_token_list): guns_str = string_listify(good_token_list[token], " ") good_tokens[idx].append(f"{token} ({guns_str})") len_so_far += len(good_tokens[idx][-1]) @@ -781,9 +823,9 @@ def check_names(all_guns): for bad in bad_names: print("ERROR: Gun %s (%s) lacks a descriptive name" % (bad[1], bad[0])) - find_dupe_names(all_guns) + dupes = find_dupe_names(all_guns) - return len(bad_names) > 0 + return len(bad_names) > 0 or dupes csv = True diff --git a/tools/json_tools/keys.py b/tools/json_tools/keys.py index 88b23e7570cc2..2aa819a0535f3 100755 --- a/tools/json_tools/keys.py +++ b/tools/json_tools/keys.py @@ -14,8 +14,7 @@ import sys import json import argparse -from util import import_data, key_counter, ui_counts_to_columns,\ - WhereAction +from util import import_data, key_counter, ui_counts_to_columns, WhereAction parser = argparse.ArgumentParser( description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) diff --git a/tools/json_tools/lister.py b/tools/json_tools/lister.py index 5d633b662475d..09ffa4c01dc06 100755 --- a/tools/json_tools/lister.py +++ b/tools/json_tools/lister.py @@ -50,7 +50,7 @@ sys.exit(1) # We'll either get a dict or a list... - if type(json_data) == dict: + if type(json_data) is dict: # ... and just make it a list. json_data = [json_data] diff --git a/tools/json_tools/monfaction_array-ify.py b/tools/json_tools/monfaction_array-ify.py index e0cedd38866d6..9a02c6737c1cd 100644 --- a/tools/json_tools/monfaction_array-ify.py +++ b/tools/json_tools/monfaction_array-ify.py @@ -14,18 +14,18 @@ def gen_new(path): with open(path, "r", encoding="utf-8") as json_file: json_data = json.load(json_file) for jo in json_data: - if (type(jo) == dict and "type" in jo and + if (type(jo) is dict and "type" in jo and jo["type"] == "MONSTER_FACTION"): - if "by_mood" in jo and type(jo["by_mood"]) == str: + if "by_mood" in jo and type(jo["by_mood"]) is str: jo["by_mood"] = [jo.pop("by_mood")] change = True - if "neutral" in jo and type(jo["neutral"]) == str: + if "neutral" in jo and type(jo["neutral"]) is str: jo["neutral"] = [jo.pop("neutral")] change = True - if "friendly" in jo and type(jo["friendly"]) == str: + if "friendly" in jo and type(jo["friendly"]) is str: jo["friendly"] = [jo.pop("friendly")] change = True - if "hate" in jo and type(jo["hate"]) == str: + if "hate" in jo and type(jo["hate"]) is str: jo["hate"] = [jo.pop("hate")] change = True diff --git a/tools/json_tools/monstergroup_name_to_id.py b/tools/json_tools/monstergroup_name_to_id.py new file mode 100644 index 0000000000000..964991bac533c --- /dev/null +++ b/tools/json_tools/monstergroup_name_to_id.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python3 + +""" + +Example usage: +py monstergroup_name_to_id.py ../../data/mods/my_mod + +See https://github.com/CleverRaven/Cataclysm-DDA/pull/79177 +Should be removed after 0.I + +""" +import argparse +import json +import os + +args = argparse.ArgumentParser() +args.add_argument("dir", action="store", help="specify json directory") +args_dict = vars(args.parse_args()) + +failures = set() + + +def format_json(path): + file_path = os.path.dirname(__file__) + # Might need changing to match your setup + format_path_linux = os.path.join(file_path, "../format/json_formatter.cgi") + path_win = "../../json_formatter.exe" + alt_path_win = "../format/json_formatter.exe" + format_path_win = os.path.join(file_path, path_win) + format_alt_path_win = os.path.join(file_path, alt_path_win) + if os.path.exists(format_path_linux): + os.system(f"{format_path_linux} {path}") + elif os.path.exists(format_path_win): + os.system(f"{format_path_win} {path}") + elif os.path.exists(format_alt_path_win): + os.system(f"{format_alt_path_win} {path}") + else: + print("No json formatter found") + + +def readWriteJson(path, jo_function): + change = False + format_error = "Json Decode Error at:\n{0}\nEnsure that the file is a "\ + "JSON file consisting of an object or array of objects!".format(path) + with open(path, "r", encoding="utf-8") as json_file: + try: + json_data = json.load(json_file) + except json.JSONDecodeError: + failures.add(format_error) + return + if type(json_data) is dict: # File with a single json object + json_data = jo_function(json_data) + change = json_data is not None + elif type(json_data) is list: + for jo in json_data: + if type(jo) is not dict: + failures.add(format_error) + return + jo_new = jo_function(jo) + changed = jo_new is not None + if changed: + change = True + pos = json_data.index(jo) + json_data.insert(pos, jo_new) + json_data.remove(jo) + else: + failures.add(format_error) + if change: + with open(path, "w", encoding="utf-8") as jf: + json.dump(json_data, jf, ensure_ascii=False) + format_json(path) + + +def migrateMonsterGroupNameToId(jo): + assert "type" in jo + if jo["type"] == "monstergroup" and "name" in jo: + assert type(jo["name"]) is str + # While dicts are ordered they have no way to directly edit keys + # or access by index + pos = list(jo.keys()).index("name") + items = list(jo.items()) + items.insert(pos, ("id", jo["name"])) + new_jo = dict(items) + new_jo.pop("name") + return new_jo + return None + + +for root, directories, filenames in os.walk(args_dict["dir"]): + for filename in filenames: + path = os.path.join(root, filename) + if path.endswith(".json"): + readWriteJson(path, migrateMonsterGroupNameToId) + +for statement in failures: + print(statement) diff --git a/tools/json_tools/name_strings_to_objects.py b/tools/json_tools/name_strings_to_objects.py index f401b1b6caf11..efb740b0131c7 100644 --- a/tools/json_tools/name_strings_to_objects.py +++ b/tools/json_tools/name_strings_to_objects.py @@ -28,7 +28,7 @@ def gen_new(path): continue if not jo.get('name'): continue - if type(jo['name']) == dict: + if type(jo['name']) is dict: continue if jo.get('type') not in ['AMMO', 'ARMOR', 'BATTERY', 'bionic', 'BIONIC_ITEM', 'BIONIC_ITEM', 'BOOK', diff --git a/tools/json_tools/update-translate-dialogue-mod.py b/tools/json_tools/update-translate-dialogue-mod.py index b576a7d98ef91..5b664d508ae7a 100755 --- a/tools/json_tools/update-translate-dialogue-mod.py +++ b/tools/json_tools/update-translate-dialogue-mod.py @@ -3,7 +3,7 @@ Usage: `cd path/to/Cataclysm-DDA/` `python3 tools/json_tools/update-translate-dialogue-mod.py` - then lint via `json_formatter.cgi`, check `doc/JSON_STYLE.md` + then lint via `json_formatter.cgi`, check `doc/JSON/JSON_STYLE.md` You can also add `"//": "mod_update_script_compact"` to dynamic lines to make the script concatenate that line @@ -71,7 +71,7 @@ def main(): for f in files: dialogues = [] with open(input_dir + f, encoding="utf-8") as fp: - print(f"Reading from {input_dir+f}") + print(f"Reading from {input_dir + f}") json_data = json.load(fp) for obj in json_data: @@ -82,7 +82,7 @@ def main(): if dialogues: with open(output_dir + f, "w", encoding="utf-8") as fp: - print(f" Writing to {output_dir+f}") + print(f" Writing to {output_dir + f}") json.dump(dialogues, fp, ensure_ascii=False, indent=" ") diff --git a/tools/json_tools/util.py b/tools/json_tools/util.py index db5b063e30f29..61b6862dfd304 100755 --- a/tools/json_tools/util.py +++ b/tools/json_tools/util.py @@ -39,8 +39,8 @@ def import_data(json_dir=JSON_DIR, json_fmatch=JSON_FNMATCH): errors.append( "Problem reading file {},".format(json_file) + " reason: {}".format(err)) - if type(candidates) != list: - if type(candidates) == OrderedDict: + if type(candidates) is not list: + if type(candidates) is OrderedDict: data.append(candidates) else: errors.append( @@ -56,13 +56,13 @@ def match_primitive_values(item_value, where_value): """Perform any odd logic on item matching. """ # Matching interpolation for keyboard constrained input. - if type(item_value) == str: + if type(item_value) is str: # Direct match return bool(re.match(where_value, item_value)) - elif type(item_value) == int or type(item_value) == float: + elif type(item_value) is int or type(item_value) is float: # match after string conversion return bool(re.match(where_value, str(item_value))) - elif type(item_value) == bool: + elif type(item_value) is bool: # help conversion to JSON booleans from the commandline return bool(re.match(where_value, str(item_value).lower())) else: @@ -86,14 +86,14 @@ def matches_where(item, where_key, where_value): # So we have some value. item_value = item[where_key] # Matching interpolation for keyboard constrained input. - if type(item_value) == list: + if type(item_value) is list: # 1 level deep. for next_level in item_value: if match_primitive_values(next_level, where_value): return True # else... return False - elif type(item_value) == dict: + elif type(item_value) is dict: # Match against the keys of the dictionary... I question my logic. # 1 level deep. for next_level in item_value: @@ -179,14 +179,14 @@ def key_counter(data, where_fn_list): val = item[key] # If value is an object, tally key.subkey for all object subkeys - if type(val) == OrderedDict: + if type(val) is OrderedDict: for subkey in val.keys(): if not subkey.startswith('//'): stats[key + '.' + subkey] += 1 # If value is a list of objects, tally key.subkey for each - elif type(val) == list: - if all(type(e) == OrderedDict for e in val): + elif type(val) is list: + if all(type(e) is OrderedDict for e in val): for obj in val: for subkey in obj.keys(): if not subkey.startswith('//'): @@ -208,13 +208,13 @@ def item_value_counter(_value): if isinstance(_value, str): stats[_value] += 1 # Cast numbers to strings - elif type(_value) == int or type(_value) == float: + elif type(_value) is int or type(_value) is float: stats[str(_value)] += 1 # Pull all values from objects - elif type(_value) == OrderedDict: + elif type(_value) is OrderedDict: stats += list_value_counter(list(_value.values())) # Pull values from list of objects or strings - elif type(_value) == list: + elif type(_value) is list: stats += list_value_counter(_value) else: raise ValueError("Value '%s' has unknown type %s" % @@ -267,14 +267,14 @@ def value_counter(data, search_key, where_fn_list): # If this value is a list of objects, pull parent_key.child_key # values from all of them to include in stats - if type(parent_val) == list and all(type(e) == OrderedDict + if type(parent_val) is list and all(type(e) is OrderedDict for e in parent_val): for od in parent_val: if child_key in od: stat_vals.append(od[child_key]) # If this value is a single object, get value at parent_key.child_key - elif type(parent_val) == OrderedDict and child_key in parent_val: + elif type(parent_val) is OrderedDict and child_key in parent_val: stat_vals.append(parent_val[child_key]) # Other kinds of data cannot be indexed by parent_key.child_key @@ -381,7 +381,7 @@ def dumps(self): while items: k, v = items.pop(0) # Special cases first. - if (k == "tools" or k == "components") and type(v) == list: + if (k == "tools" or k == "components") and type(v) is list: self.list_of_lists(k, v) else: self.write_primitive_key_val(k, v) diff --git a/tools/json_tools/values.py b/tools/json_tools/values.py index 6ae83a938c7e1..5d43f3f95bb83 100755 --- a/tools/json_tools/values.py +++ b/tools/json_tools/values.py @@ -5,8 +5,7 @@ import argparse import sys import json -from util import import_data, value_counter, ui_counts_to_columns,\ - WhereAction +from util import import_data, value_counter, ui_counts_to_columns, WhereAction parser = argparse.ArgumentParser(description="""Count the number of times a specific values occurs for a specific key. The key may be a diff --git a/tools/macos-market-share.py b/tools/macos-market-share.py index c983d6c7f822a..383930b19279f 100755 --- a/tools/macos-market-share.py +++ b/tools/macos-market-share.py @@ -11,7 +11,7 @@ # output more reasonable, but the cumulative tally does include smaller # versions not listed. # -# See also doc/COMPILING/COMPILER_SUPPORT.md +# See also doc/c++/COMPILER_SUPPORT.md import csv import re diff --git a/tools/map_coords.py b/tools/map_coords.py index 15b144ba1d67b..85ff124f53e89 100755 --- a/tools/map_coords.py +++ b/tools/map_coords.py @@ -81,10 +81,10 @@ def info_folder(format: str) -> None: min_cx, max_cx = cx * 32, cx * 32 + 31 min_cy, max_cy = cy * 32, cy * 32 + 31 - o1 = f"{min_cx//180} {min_cy//180}" - o2 = f"{min_cx//180} {max_cy//180}" - o3 = f"{max_cx//180} {min_cy//180}" - o4 = f"{max_cx//180} {max_cy//180}" + o1 = f"{min_cx // 180} {min_cy // 180}" + o2 = f"{min_cx // 180} {max_cy // 180}" + o3 = f"{max_cx // 180} {min_cy // 180}" + o4 = f"{max_cx // 180} {max_cy // 180}" ol = [o1] if o2 not in ol: ol.append(o2) @@ -122,7 +122,7 @@ def info_range(r1: tuple, r2: tuple) -> None: for z in lvz: for y in lvy: for x in lvx: - print(f"{x//32}.{y//32}.{z}/{x}.{y}.{z}.map", end=" ") + print(f"{x // 32}.{y // 32}.{z}/{x}.{y}.{z}.map", end=" ") print("") @@ -234,10 +234,10 @@ def info_range(r1: tuple, r2: tuple) -> None: cx, cy, cz = retInfo print( - f" Map: {cx//180}'{cx - 180 * (cx//180)}" - f" {cy//180}'{cy- 180 * (cy//180)} {cz}" + f" Map: {cx // 180}'{cx - 180 * (cx // 180)}" + f" {cy // 180}'{cy - 180 * (cy // 180)} {cz}" ) - print(f" File: {cx//32}.{cy//32}.{cz}/{cx}.{cy}.{cz}.map") + print(f" File: {cx // 32}.{cy // 32}.{cz}/{cx}.{cy}.{cz}.map") - info_folder(f"{cx//32}.{cy//32}.{cz}") + info_folder(f"{cx // 32}.{cy // 32}.{cz}") diff --git a/tools/tileset_test.py b/tools/tileset_test.py index 2432046183fba..c1b0131a3afaa 100755 --- a/tools/tileset_test.py +++ b/tools/tileset_test.py @@ -329,7 +329,7 @@ def save_maps(self) -> None: row = int(_map.split('.')[0]) column = int(_map.split('.')[1]) folder = pathlib.Path.joinpath(self.maps_folder, - f'{row//32}.{column//32}.0') + f'{row // 32}.{column // 32}.0') if not self.dry_run: folder.mkdir(parents=True, exist_ok=True) diff --git a/tools/windows_limit_memory.py b/tools/windows_limit_memory.py index 40f8ca3ea38ec..fb0bb4cfac5c2 100755 --- a/tools/windows_limit_memory.py +++ b/tools/windows_limit_memory.py @@ -298,7 +298,8 @@ def __getattr__(self, item: str): @staticmethod def create_buffer(obj: Any, max_buffer_len: Optional[int] = None) -> str: - """Creates a ctypes unicode buffer given an object convertible to string. + """Creates a ctypes unicode buffer given an object convertible to + string. Args: obj: The object from which to create a buffer. Must be convertible @@ -407,7 +408,8 @@ def _create_io_completion_port(self) -> HANDLE: def _query_information_job_object(self, structure: ctypes.Structure, query_type: int) -> ctypes.Structure: - """[Internal] Retrieves limit and job state information from the job object. + """[Internal] Retrieves limit and job state information from the job + object. Args: structure: The limit or job state information. @@ -599,7 +601,8 @@ def get_process(self, pid: int) -> None: self._handle_process = handle_process def limit_process_memory(self, memory_limit: int) -> None: - """Effectively limit the process memory that the target process can allocates. + """Effectively limit the process memory that the target process can + allocates. Args: memory_limit: The memory limit of the process, in MiB (MebiBytes). diff --git a/utilities/make_iso.py b/utilities/make_iso.py index 2958492e8f628..20a533b614b17 100755 --- a/utilities/make_iso.py +++ b/utilities/make_iso.py @@ -81,7 +81,7 @@ def tile_convert(otile, main_id, new_tile_number): for g in ('fg', 'bg'): if g not in otile: continue - if type(otile[g]) == int: + if type(otile[g]) is int: if otile[g] == -1: continue otile[g] = list([otile[g]]) @@ -162,9 +162,9 @@ def tile_convert(otile, main_id, new_tile_number): for tile in ntile[g]: # if tile_num is a dict with "weight" and "sprite", # take the "sprite" number - if type(tile) == dict and "sprite" in tile: + if type(tile) is dict and "sprite" in tile: iso_ize(tile["sprite"]) - elif type(tile) == int: + elif type(tile) is int: iso_ize(tile) else: raise RuntimeError("Unexpected sprite number: %s" % tile)