Skip to content

Commit

Permalink
Merge branch 'effect-adding-effect' of https://github.com/Coolthulhu/…
Browse files Browse the repository at this point in the history
…Cataclysm into effect-adding-effect
  • Loading branch information
Coolthulhu committed Dec 20, 2023
2 parents 169b791 + 7b1c3ad commit 5ea5117
Show file tree
Hide file tree
Showing 352 changed files with 50,698 additions and 46,123 deletions.
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ body:
### Open Options (ESC) -> Debug Menu
![](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/doc/src/content/docs/en/contribute/img/readme-bug1.png?raw=true)
![](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/main/doc/src/content/docs/en/contribute/img/readme-bug1.png?raw=true)
### Open Info (i)
![](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/doc/src/content/docs/en/contribute/img/readme-bug2.png?raw=true)
![](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/main/doc/src/content/docs/en/contribute/img/readme-bug2.png?raw=true)
### Submit a bug report on github (U)
![](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/doc/src/content/docs/en/contribute/img/readme-bug3.png?raw=true)
![](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/main/doc/src/content/docs/en/contribute/img/readme-bug3.png?raw=true)
### Fill the form and submit
![](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/doc/src/content/docs/en/contribute/img/readme-bug4.png?raw=true)
![](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/main/doc/src/content/docs/en/contribute/img/readme-bug4.png?raw=true)
- type: textarea
id: describe-bug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Cataclysm Android build
on:
pull_request:
branches:
- upload
- main
paths-ignore:
- "build-data/osx/**"
- "doc/**"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Clang-tidy (clang-12, tiles)

on:
push:
branches: [upload]
branches: [main]
paths: [ "**.cpp", "**.h", "**.c", "**/CMakeLists.txt", "**/Makefile", "**.hpp", "**.cmake", "build-scripts/**","tools/clang-tidy-plugin/**", ".github/workflows/clang-tidy.yml", "**/.clang-tidy" ]
pull_request:
branches: [upload]
branches: [main]
paths: [ "**.cpp", "**.h", "**.c", "**/CMakeLists.txt", "**/Makefile", "**.hpp", "**.cmake", "build-scripts/**", "tools/clang-tidy-plugin/**", ".github/workflows/clang-tidy.yml", "**/.clang-tidy" ]

# We only care about the latest revision of a PR, so cancel all previous instances.
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
sudo apt-get update
sudo apt-get install libncursesw5-dev clang-12 libclang-12-dev llvm-12-dev llvm-12-tools \
libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev libpulse-dev ccache \
libflac-dev gettext
libflac-dev gettext
- name: prepare
run: bash ./build-scripts/requirements.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy starlight documentation to GitHub Pages

on:
push:
branches: [upload]
branches: [main]
paths: [doc/**]
workflow_dispatch:

Expand Down
97 changes: 32 additions & 65 deletions .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,71 +2,41 @@ name: General build matrix

on:
push:
branches:
- upload
paths-ignore:
- doc/**
- 'scripts/**'
merge_group:
branches: [main]
paths-ignore: [doc/**, scripts/**]
pull_request:
branches:
- upload
paths-ignore:
- doc/**
- 'scripts/**'
branches: [main]
paths-ignore: [doc/**, scripts/**]
types: [opened, reopened, synchronize, ready_for_review]

# Cancel all previous instances in favor of latest revision of a PR.
# Allow running upload builds to complete to help with ccache refreshes.
# Allow running main builds to complete to help with ccache refreshes.
concurrency:
group: general-build-${{ github.event.pull_request.number || github.ref_name }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
skip-duplicates-code:
skip-duplicates:
continue-on-error: true
runs-on: ubuntu-22.04
# Map a step output to a job output
outputs:
should_skip_code: ${{ steps.skip_check.outputs.should_skip }}
should_skip_code: ${{ steps.skip_code_check.outputs.should_skip }}
should_skip_data: ${{ steps.skip_data_check.outputs.should_skip }}
steps:
- id: skip_check
- id: skip_code_check
uses: fkirc/skip-duplicate-actions@master
with:
paths_ignore: '["android/**", "build-data/osx/**", "doc/**", "doxygen_doc/**", "msvc-**", "tools/**", "utilities/**", "scripts/**", "data/**", "lang/**"]'

skip-duplicates-data:
continue-on-error: true
runs-on: ubuntu-22.04
# Map a step output to a job output
outputs:
should_skip_data: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
- id: skip_data_check
uses: fkirc/skip-duplicate-actions@master
with:
paths_ignore: '["android/**", "build-data/osx/**", "doc/**", "doxygen_doc/**", "msvc-**", "tools/**", "utilities/**", "scripts/**"]'

matrix-variables:
permissions:
contents: none
continue-on-error: true
runs-on: ubuntu-latest
outputs:
fail_fast: ${{ steps.matrix_vars.outputs.fail_fast }}
skip_tests: ${{ steps.matrix_vars.outputs.skip_tests }}
max_parallel: ${{ steps.matrix_vars.outputs.max_parallel }}
steps:
- id: matrix_vars
run: |
echo "fail_fast=$([ "$GITHUB_REF_NAME" = "upload" ] && echo false || echo true)" >> $GITHUB_OUTPUT
echo "skip_tests=$([ "$GITHUB_REF_NAME" = "upload" ] && echo true || echo false)" >> $GITHUB_OUTPUT
echo "max_parallel=$([ "$GITHUB_REF_NAME" = "upload" ] && echo 20 || echo 1)" >> $GITHUB_OUTPUT
varied_builds:
needs: [ skip-duplicates-code, skip-duplicates-data, matrix-variables ]
needs: skip-duplicates
strategy:
fail-fast: ${{ fromJSON(needs.matrix-variables.outputs.fail_fast) }}
max-parallel: ${{ fromJSON(needs.matrix-variables.outputs.max_parallel) }}
fail-fast: ${{ github.ref_name == 'main' }}
max-parallel: ${{ github.ref_name == 'main' && 20 || 1 }}
matrix:
include:
- title: GCC 12, Ubuntu, Curses
Expand All @@ -81,7 +51,7 @@ jobs:
native: linux64
ccache_limit: 2G
ccache_key: linux-gcc-12
run-on-draft: true
always-run: true

- title: GCC 12, Ubuntu, Tiles, Sound, Lua, CMake, Languages
compiler: g++-12
Expand Down Expand Up @@ -155,12 +125,12 @@ jobs:
ZSTD_CLEVEL: 17
CMAKE: ${{ matrix.cmake }}
COMPILER: ${{ matrix.compiler }}
CXXFLAGS: ${{ matrix.cxxflags }}
# CXXFLAGS: ${{ matrix.cxxflags }}
OS: ${{ matrix.os }}
TILES: ${{ matrix.tiles }}
SOUND: ${{ matrix.sound }}
LUA: ${{ matrix.lua }}
SANITIZE: ${{ matrix.sanitize }}
# SANITIZE: ${{ matrix.sanitize }}
TEST_STAGE: ${{ matrix.test-stage }}
LANGUAGES: ${{ matrix.languages }}
LIBBACKTRACE: ${{ matrix.libbacktrace }}
Expand All @@ -172,8 +142,7 @@ jobs:
CCACHE_HARDLINK: true
CCACHE_NOCOMPRESS: true

SKIP: ${{ ( github.event.pull_request.draft == true && matrix.run-on-draft == 'true' ) || ( needs.skip-duplicates-code.outputs.should_skip_code == 'true' ) || ( needs.skip-duplicates-data.outputs.should_skip_data == 'true' ) }}
SKIP_TESTS: ${{ needs.matrix-variables.outputs.skip_tests }}
SKIP: ${{ matrix.always-run != true && ( github.event.pull_request.draft == true || needs.skip-duplicates.outputs.should_skip_code == true || needs.skip-duplicates.outputs.should_skip_data == true ) }}

steps:
- name: checkout repository
Expand All @@ -194,25 +163,23 @@ jobs:
run: |
sudo apt-get install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev libpulse-dev libflac-dev
- name: check compiler (mac)
# === Temporarily disabled because of #3664 ===
# - name: set up a mock GCC toolchain root for Clang (Ubuntu)
# if: ${{ env.SKIP == 'false' && runner.os == 'Linux' && (matrix.compiler == 'clang++-14') }}
# run: |
# sudo mkdir /opt/mock-gcc-11
# sudo ln -s /usr/include /opt/mock-gcc-11/include
# sudo ln -s /usr/bin /opt/mock-gcc-11/bin
# sudo mkdir -p /opt/mock-gcc-11/lib/gcc/x86_64-linux-gnu
# sudo ln -s /usr/lib/gcc/x86_64-linux-gnu/11 /opt/mock-gcc-11/lib/gcc/x86_64-linux-gnu/11

- name: install dependencies (mac)
if: ${{ env.SKIP == 'false' && runner.os == 'macOS' }}
run: |
${{ matrix.compiler }} --version
# Ensure that it is actually needed version
${{ matrix.compiler }} --version | grep -q -E "${{ matrix.grep_clang_version_rxp }}"
- name: set up a mock GCC toolchain root for Clang (Ubuntu)
if: ${{ env.SKIP == 'false' && runner.os == 'Linux' && (matrix.compiler == 'clang++-14') }}
run: |
sudo mkdir /opt/mock-gcc-11
sudo ln -s /usr/include /opt/mock-gcc-11/include
sudo ln -s /usr/bin /opt/mock-gcc-11/bin
sudo mkdir -p /opt/mock-gcc-11/lib/gcc/x86_64-linux-gnu
sudo ln -s /usr/lib/gcc/x86_64-linux-gnu/11 /opt/mock-gcc-11/lib/gcc/x86_64-linux-gnu/11
- name: install dependencies (mac)
if: ${{ env.SKIP == 'false' && runner.os == 'macOS' }}
run: |
HOMEBREW_NO_AUTO_UPDATE=yes HOMEBREW_NO_INSTALL_CLEANUP=yes brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer gettext ccache parallel
- name: prepare
Expand All @@ -235,7 +202,7 @@ jobs:
path: ${{ steps.get-ccache-vars.outputs.ccache-path }}
# double-dash after compiler is not a typo, it is to disambiguate between g++-<date> and g++-11-<date> for restore key prefix matching
key: ccache-${{ github.ref_name }}-${{ matrix.ccache_key }}--${{ steps.get-ccache-vars.outputs.datetime }}
restore-keys: ccache-upload-${{ matrix.ccache_key }}--
restore-keys: ccache-main-${{ matrix.ccache_key }}--

- name: ccache info
if: ${{ env.SKIP == 'false' && steps.cache.outputs.cache-hit != 'true' }}
Expand All @@ -258,11 +225,11 @@ jobs:
ccache --show-stats --verbose
- name: clear ccache on PRs
if: ${{ github.ref_name != 'upload' && env.SKIP == 'false' && !failure() && (runner.os == 'Linux' || runner.os == 'macOS') }}
if: ${{ github.ref_name != 'main' && env.SKIP == 'false' && !failure() && (runner.os == 'Linux' || runner.os == 'macOS') }}
run: ccache --clear

- name: run tests
if: ${{ env.SKIP == 'false' && env.SKIP_TESTS == 'false' }}
if: ${{ github.ref_name != 'main' && env.SKIP == 'false' }}
run: bash ./build-scripts/gha_test_only.sh

- name: emit success artifact
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/msvc-full-features-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Cataclysm Windows build (CMake + MSVC)
on:
push:
branches:
- upload
- main
paths-ignore:
- 'android/**'
- 'build-data/osx/**'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/msvc-full-features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Cataclysm Windows build (MSVC)
on:
push:
branches:
- upload
- main
paths-ignore:
- 'android/**'
- 'build-data/osx/**'
Expand All @@ -18,7 +18,7 @@ on:
- 'scripts/**'
pull_request:
branches:
- upload
- main
paths-ignore:
- 'android/**'
- 'build-data/osx/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/msys2-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Windows build (CMake + MSYS2)
on:
push:
branches:
- upload
- main
paths-ignore:
- 'android/**'
- 'build-data/osx/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Windows build (MSYS2)
on:
push:
branches:
- upload
- main
paths-ignore:
- 'android/**'
- 'build-data/osx/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
token: ${{ secrets.TX_PR_CREATOR }}
branch: i18n
delete-branch: true
base: upload
base: main
title: "feat(i18n): routine i18n updates on ${{ steps.get-timestamp.outputs.time }}"
body: ""
labels: Translation
6 changes: 5 additions & 1 deletion data/json/ammo_effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,11 @@
"check_sees": true,
"check_sees_radius": 3
},
"explosion": { "damage": 300, "radius": 20 }
"explosion": {
"damage": 300,
"radius": 20,
"fragment": { "impact": { "damage_type": "heat", "amount": 300, "armor_multiplier": 2 }, "range": 24 }
}
},
{
"id": "FLASHBANG",
Expand Down
53 changes: 50 additions & 3 deletions data/json/construction.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"id": "constr_pit_spiked",
"group": "spike_pit",
"category": "DIG",
"required_skills": [ [ "fabrication", 1 ] ],
"required_skills": [ [ "fabrication", 1 ], [ "traps", 0 ] ],
"time": "5 m",
"components": [ [ [ "spear_wood", 4 ], [ "pointy_stick", 4 ] ] ],
"pre_terrain": "t_pit",
Expand All @@ -54,7 +54,7 @@
"id": "constr_pit_glass",
"group": "glass_pit",
"category": "DIG",
"required_skills": [ [ "fabrication", 1 ] ],
"required_skills": [ [ "fabrication", 1 ], [ "traps", 0 ] ],
"time": "5 m",
"components": [ [ [ "glass_shard", 16 ] ] ],
"pre_terrain": "t_pit",
Expand Down Expand Up @@ -2702,6 +2702,40 @@
"pre_terrain": "t_rock",
"post_special": "done_mine_upstair"
},
{
"type": "construction",
"id": "constr_concrete_ramp_low",
"group": "build_low_end_of_a_concrete_ramp",
"//": "Builds a low end of a concrete ramp going up on this level and down on the level above.",
"pre_note": "Build a concrete ramp leading to the next z-level above, and the corresponding ramp down leading from the z-level above to this level. The high end of a ramp must be built adjacent to allow moving between z-levels in both directions.",
"category": "DIG",
"required_skills": [ [ "fabrication", 3 ] ],
"time": "150 m",
"tools": [ [ [ "con_mix", 125 ] ] ],
"qualities": [ [ { "id": "SMOOTH", "level": 1 } ] ],
"components": [ [ [ "concrete", 5 ] ], [ [ "water", 5 ] ] ],
"pre_terrain": "t_pit_shallow",
"pre_special": "check_ramp_low",
"post_terrain": "t_ramp_up_low",
"post_special": "done_ramp_low"
},
{
"type": "construction",
"id": "constr_concrete_ramp_high",
"group": "build_high_end_of_a_concrete_ramp",
"//": "Builds a high end of a concrete ramp going up on this level and down on the level above.",
"pre_note": "Build a concrete ramp leading to the next z-level above, and the corresponding ramp down leading from the z-level above to this level. It must be built next to a low end of a ramp to allow moving between z-levels in both directions.",
"category": "DIG",
"required_skills": [ [ "fabrication", 3 ] ],
"time": "150 m",
"tools": [ [ [ "con_mix", 125 ] ] ],
"qualities": [ [ { "id": "SMOOTH", "level": 1 } ] ],
"components": [ [ [ "concrete", 5 ] ], [ [ "water", 5 ] ] ],
"pre_terrain": "t_pit_shallow",
"pre_special": "check_ramp_high",
"post_terrain": "t_ramp_up_high",
"post_special": "done_ramp_high"
},
{
"type": "construction",
"id": "constr_veh",
Expand Down Expand Up @@ -3649,7 +3683,7 @@
[ "solar_panel_v2", 2 ],
[ "reinforced_solar_panel_v2", 2 ]
],
[ [ "storage_battery", 1 ], [ "medium_storage_battery", 4 ], [ "small_storage_battery", 32 ] ],
[ [ "storage_battery", 1 ], [ "medium_storage_battery", 5 ], [ "small_storage_battery", 100 ] ],
[ [ "sheet_metal", 2 ], [ "wire", 8 ] ],
[ [ "pipe", 24 ] ]
],
Expand Down Expand Up @@ -4357,6 +4391,19 @@
"pre_special": "check_empty",
"post_furniture": "f_glass_freezer"
},
{
"type": "construction",
"id": "constr_gridplut_generator",
"group": "install_plut_generator",
"category": "WORKSHOP",
"required_skills": [ ],
"time": "10 m",
"qualities": [ ],
"components": [ [ [ "plut_generator_item", 1 ] ], [ [ "cable", 15 ] ], [ [ "power_supply", 3 ] ] ],
"pre_note": "Will only work if constructed in/on a building that has an electric grid with a mounted battery.",
"pre_special": "check_empty",
"post_furniture": "f_grid_plut_generator"
},
{
"type": "construction",
"id": "constr_cable_connector",
Expand Down
Loading

0 comments on commit 5ea5117

Please sign in to comment.