Skip to content

Commit

Permalink
Merge pull request #1 from Drew4484/Improved-Armors
Browse files Browse the repository at this point in the history
Improved armors part 1
  • Loading branch information
Drew4484 authored Oct 1, 2021
2 parents 0675ef3 + 8ceb5ba commit 1849d5a
Show file tree
Hide file tree
Showing 94 changed files with 5,974 additions and 2,096 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,5 +197,5 @@ jobs:
if: failure()
with:
name: cata_test
path: tests/cata_test
path: tests/cata_test*
if-no-files-found: ignore
2 changes: 1 addition & 1 deletion .github/workflows/msvc-full-features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
id: runvcpkg
with:
additionalCachedPaths: '${{ runner.workspace }}/Cataclysm-DDA/msvc-full-features/vcpkg_installed'
appendedCacheKey: ${{ hashFiles( 'msvc-full-features/vcpkg.json', '.github/vcpkg_triplets/**' ) }}
appendedCacheKey: ${{ hashFiles( 'msvc-full-features/vcpkg.json', '.github/vcpkg_triplets/**' ) }}-x64
setupOnly: true
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
# We have to use at least this version of vcpkg to include fixes for yasm-tool's
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/object_creator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
id: runvcpkg
with:
additionalCachedPaths: '${{ runner.workspace }}/Cataclysm-DDA/msvc-full-features/vcpkg_installed;${{ runner.workspace }}/Cataclysm-DDA/msvc-object_creator/vcpkg_installed'
appendedCacheKey: ${{ hashFiles( '$msvc-full-features/vcpkg.json', 'msvc-object_creator/vcpkg.json', '.github/vcpkg_triplets/**' ) }}
appendedCacheKey: ${{ hashFiles( '$msvc-full-features/vcpkg.json', 'msvc-object_creator/vcpkg.json', '.github/vcpkg_triplets/**' ) }}-x64
setupOnly: true
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
# We have to use at least this version of vcpkg to include fixes for yasm-tool's
Expand Down
81 changes: 58 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,20 @@ jobs:
fail-fast: false
matrix:
include:
- name: Windows Tiles x64 MSVC
artifact: windows-tiles-x64-msvc
arch: x64
os: windows-2019
mxe: none
ext: zip
content: application/zip
- name: Windows Tiles x32 MSVC
artifact: windows-tiles-x32-msvc
arch: x86
os: windows-2019
mxe: none
ext: zip
content: application/zip
- name: Windows Tiles x64
mxe: x86_64
artifact: windows-tiles-x64
Expand Down Expand Up @@ -127,7 +141,28 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install dependencies (windows)
- name: Install dependencies (windows msvc) (1/3)
if: runner.os == 'Windows'
uses: microsoft/setup-msbuild@v1.0.2
- name: Install dependencies (windows msvc) (2/3)
if: runner.os == 'Windows'
uses: lukka/run-vcpkg@main
id: runvcpkg
with:
additionalCachedPaths: '${{ runner.workspace }}/Cataclysm-DDA/msvc-full-features/vcpkg_installed'
appendedCacheKey: ${{ hashFiles( 'msvc-full-features/vcpkg.json', '.github/vcpkg_triplets/**' ) }}-${{ matrix.arch }}
setupOnly: true
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
# We have to use at least this version of vcpkg to include fixes for yasm-tool's
# availability only as an x86 host tool. Keep it in sync with the builtin-baseline
# field in vcpkg.json. Caching happens as a post-action which runs at the end of
# the whole workflow, after vcpkg install happens during msbuild run.
vcpkgGitCommitId: '49b67d9cb856424ff69f10e7721aec5299624268'
- name: Install dependencies (windows msvc) (3/3)
if: runner.os == 'Windows'
run: |
vcpkg integrate install
- name: Install dependencies (windows mxe)
if: matrix.mxe != 'none'
run: |
sudo apt install astyle autoconf automake autopoint bash bison bzip2 cmake flex gettext git g++ gperf intltool \
Expand All @@ -141,6 +176,9 @@ jobs:
sudo add-apt-repository "deb [arch=amd64] https://pkg.mxe.cc/repos/apt `lsb_release -sc` main"
sudo apt update
sudo apt install mxe-{i686,x86-64}-w64-mingw32.static-{sdl2,sdl2-ttf,sdl2-image,sdl2-mixer,gettext}
curl -L -o libbacktrace-${{ matrix.mxe }}-w64-mingw32.tar.gz https://github.com/Qrox/libbacktrace/releases/download/2020-01-03/libbacktrace-${{ matrix.mxe }}-w64-mingw32.tar.gz
shasum -a 256 -c ./build-scripts/libbacktrace-${{ matrix.mxe }}-w64-mingw32-sha256
sudo tar -xzf libbacktrace-${{ matrix.mxe }}-w64-mingw32.tar.gz --exclude=LICENSE -C /usr/lib/mxe/usr/${{ matrix.mxe }}-w64-mingw32.static
- name: Install dependencies (Linux)
if: runner.os == 'Linux' && matrix.mxe == 'none' && matrix.android == 'none'
run: |
Expand All @@ -152,39 +190,41 @@ jobs:
run: |
HOMEBREW_NO_AUTO_UPDATE=yes HOMEBREW_NO_INSTALL_CLEANUP=yes brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer gettext ccache parallel
pip3 install dmgbuild==1.4.2 biplist
- name: Build CDDA (linux)
if: runner.os == 'Linux' && matrix.mxe == 'none' && matrix.android == 'none'
- name: Create VERSION.TXT
shell: bash
run: |
cat >VERSION.txt <<EOL
build type: ${{ matrix.artifact }}
build number: ${{ needs.release.outputs.timestamp }}
commit sha: ${{ github.sha }}
commit url: https://github.com/${{ github.repository }}/commit/${{ github.sha }}
EOL
- name: Compile translations (windows)
if: runner.os == 'Windows'
shell: bash
run: |
lang/compile_mo.sh all
- name: Build CDDA (linux)
if: runner.os == 'Linux' && matrix.mxe == 'none' && matrix.android == 'none'
run: |
make -j$((`nproc`+0)) TILES=${{ matrix.tiles }} SOUND=${{ matrix.tiles }} RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=0 PCH=0 bindist
mv cataclysmdda-0.F.tar.gz cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.tar.gz
- name: Build CDDA (windows)
- name: Build CDDA (windows mxe)
if: matrix.mxe != 'none'
env:
PLATFORM: /usr/lib/mxe/usr/bin/${{ matrix.mxe }}-w64-mingw32.static-
run: |
cat >VERSION.txt <<EOL
build type: ${{ matrix.artifact }}
build number: ${{ needs.release.outputs.timestamp }}
commit sha: ${{ github.sha }}
commit url: https://github.com/${{ github.repository }}/commit/${{ github.sha }}
EOL
make -j$((`nproc`+0)) CROSS="${PLATFORM}" TILES=1 SOUND=1 RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=0 PCH=0 bindist
make -j$((`nproc`+0)) CROSS="${PLATFORM}" TILES=1 SOUND=1 RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=1 PCH=0 bindist
mv cataclysmdda-0.F.zip cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.zip
- name: Build CDDA (windows msvc)
if: runner.os == 'Windows'
run: |
msbuild -m -p:Configuration=Release -p:Platform=${{ matrix.arch }} "-target:Cataclysm-vcpkg-static;JsonFormatter-vcpkg-static" msvc-full-features\Cataclysm-vcpkg-static.sln
.\build-scripts\windist.ps1
mv cataclysmdda-0.F.zip cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.zip
- name: Build CDDA (osx)
if: runner.os == 'macOS'
run: |
cat >VERSION.txt <<EOL
build type: ${{ matrix.artifact }}
build number: ${{ needs.release.outputs.timestamp }}
commit sha: ${{ github.sha }}
commit url: https://github.com/${{ github.repository }}/commit/${{ github.sha }}
EOL
make -j3 TILES=${{ matrix.tiles }} SOUND=${{ matrix.tiles }} RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=0 PCH=0 USE_HOME_DIR=1 OSX_MIN=10.12 dmgdist
mv Cataclysm.dmg cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.dmg
- name: Set up JDK 8 (android)
Expand All @@ -196,12 +236,6 @@ jobs:
- name: Setup Build and Dependencies (android)
if: runner.os == 'Linux' && matrix.android != 'none' && matrix.mxe == 'none'
run: |
cat >VERSION.txt <<EOL
build type: ${{ matrix.artifact }}
build number: ${{ needs.release.outputs.timestamp }}
commit sha: ${{ github.sha }}
commit url: https://github.com/${{ github.repository }}/commit/${{ github.sha }}
EOL
sudo apt-get update
sudo apt-get install gettext
- name: Build CDDA (android)
Expand Down Expand Up @@ -238,6 +272,7 @@ jobs:
asset_name: cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.${{ matrix.ext }}
asset_content_type: ${{ matrix.content }}
- name: Trigger GitHub pages rebuild
shell: bash
run: |
curl --fail --request POST \
--url https://api.github.com/repos/${{ github.repository }}/pages/builds \
Expand Down
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,13 @@ ifneq (,$(findstring clang,$(COMPILER)))
CLANG = $(COMPILER)
endif

# Windows sets the OS environment variable so we can cheaply test for it.
ifneq (,$(findstring Windows_NT,$(OS)))
IS_WINDOWS_HOST = 1
else
IS_WINDOWS_HOST = 0
endif

OS = $(shell uname -s)

ifneq ($(findstring Darwin,$(OS)),)
Expand Down Expand Up @@ -1164,11 +1171,24 @@ etags: $(ASTYLE_SOURCES)
etags $^
./tools/json_tools/cddatags.py

ifneq ($(IS_WINDOWS_HOST),1)
# Parallel astyle for posix hosts where fork and filesystem are cheap.

ASTYLE_CHECK_STAMPS = $(sort $(patsubst %,$(ODIR)/%.astyle-check-stamp,$(ASTYLE_SOURCES)))
astyle: $(ASTYLE_CHECK_STAMPS)
$(ASTYLE_CHECK_STAMPS): $(ODIR)/%.astyle-check-stamp : %
$(ASTYLE_BINARY) --options=.astylerc -n $< && mkdir -p $(@D) && touch $@

else
# Serial astyle for Windows hosts which processes all files in one invocation.

astyle: $(ODIR)/.astyle-check-stamp
$(ODIR)/.astyle-check-stamp: $(ASTYLE_SOURCES)
$(ASTYLE_BINARY) --options=.astylerc -n $?
mkdir -p $(@D) && touch $@

endif

astyle-all: $(ASTYLE_SOURCES)
$(ASTYLE_BINARY) --options=.astylerc -n $(ASTYLE_SOURCES)
mkdir -p $(ODIR) && touch $(ODIR)/.astyle-check-stamp
Expand Down
1 change: 1 addition & 0 deletions build-scripts/libbacktrace-x86_64-w64-mingw32-sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f658456bb32db1d4fe694eee02459f63b7044ab71009730c3828374a35a8f750 *libbacktrace-x86_64-w64-mingw32.tar.gz
16 changes: 16 additions & 0 deletions build-scripts/windist.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
if (Test-path bindist) {
rm -Force -Recurse bindist
}

mkdir bindist
cp cataclysm-tiles.exe bindist/cataclysm-tiles.exe
cp tools/format/json_formatter.exe bindist/json_formatter.exe

mkdir bindist/lang
cp -r lang/mo bindist/lang

$extras = "data", "doc", "gfx", "LICENSE.txt", "LICENSE-OFL-Terminus-Font.txt", "README.md", "VERSION.txt"
ForEach ($extra in $extras) {
cp -r $extra bindist
}
Compress-Archive -Force -Path bindist/* -DestinationPath "cataclysmdda-0.F.zip"
2 changes: 1 addition & 1 deletion data/json/effect_on_condition.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"type": "effect_on_condition",
"id": "scenario_fungal_infection",
"eoc_type": "SCENARIO_SPECIFIC",
"effect": [ { "u_add_effect": "effect_fungus", "intensity": 1, "duration": "PERMANENT", "target_part": "RANDOM" } ]
"effect": [ { "u_add_effect": "fungus", "intensity": 1, "duration": "PERMANENT", "target_part": "RANDOM" } ]
},
{
"type": "effect_on_condition",
Expand Down
27 changes: 27 additions & 0 deletions data/json/furniture_and_terrain/furniture-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,33 @@
},
"crafting_pseudo_item": "fake_drill_press"
},
{
"type": "furniture",
"id": "f_firefly_terrarium",
"name": "firefly terrarium",
"description": "While many survivors would have focused on trying to bring back electric lights, whomever lives here has apparently decided to make use of the changes wrought by the cataclysm to provide light. This vivarium contains soil, strange plants you don't recognize immediately, and most strikingly, a giant mutant firefly.",
"symbol": "#",
"color": "light_green",
"move_cost_mod": 3,
"coverage": 30,
"required_str": 6,
"light_emitted": 25,
"flags": [ "TRANSPARENT", "NOITEM", "BLOCKSDOOR" ],
"bash": {
"str_min": 20,
"str_max": 30,
"sound_fail": "smash!",
"items": [
{ "item": "glass_shard", "count": [ 8, 12 ] },
{ "item": "alien_fern", "count": [ 0, 3 ] },
{ "item": "mutant_meat", "count": [ 2, 4 ] },
{ "item": "material_soil", "count": [ 2, 10 ] },
{ "item": "mutant_bug_hydrogen_sacs", "count": [ 0, 2 ] },
{ "item": "egg_firefly", "count": [ 0, 1 ] },
{ "item": "mutant_bug_organs", "charges": [ 0, 5 ] }
]
}
},
{
"type": "furniture",
"id": "f_tablesaw",
Expand Down
15 changes: 14 additions & 1 deletion data/json/furniture_and_terrain/terrain-floors-outdoors.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,20 @@
"move_cost": 0,
"roof": "t_rock_floor",
"flags": [ "NOITEM", "SUPPORTS_ROOF", "WALL" ],
"examine_action": "fault"
"examine_action": {
"type": "effect_on_condition",
"effect_on_conditions": [
{
"id": "EOC_TERRAIN_FAULT",
"effect": [
{
"u_message": "This wall is perfectly vertical. Odd, twisted holes are set in it, leading as far back into the solid rock as you can see. The holes are humanoid in shape, but with long, twisted, distended limbs.",
"popup": true
}
]
}
]
}
},
{
"type": "terrain",
Expand Down
20 changes: 20 additions & 0 deletions data/json/furniture_and_terrain/terrain-flora.json
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,26 @@
"items": [ { "item": "stick_long", "count": [ 0, 5 ] } ]
}
},
{
"type": "terrain",
"id": "t_mega_fern",
"name": "mega fern",
"looks_like": "t_tree_young",
"description": "A gigantic fern like nothing you've seen before. The leaves are a bright scarlet color with a net like structure of green veins. The multipronged trunks appear to have the consistency of balsa wood.",
"symbol": "1",
"color": [ "red_green", "red_green", "red_green", "brown" ],
"//": "barren in winter",
"move_cost": 4,
"flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "NOITEM", "YOUNG", "REDUCE_SCENT" ],
"bash": {
"str_min": 4,
"str_max": 50,
"sound": "crunch!",
"sound_fail": "whack!",
"ter_set": "t_dirt",
"items": [ { "item": "alien_fern", "count": [ 0, 5 ] } ]
}
},
{
"type": "terrain",
"id": "t_tree_apple",
Expand Down
8 changes: 4 additions & 4 deletions data/json/harvest.json
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
{
"id": "fish_large",
"type": "harvest",
"message": "You gut and fillet the fish",
"message": "You gut and fillet the fish.",
"entries": [
{ "drop": "fish", "type": "flesh", "mass_ratio": 0.38 },
{ "drop": "animal_blood", "type": "blood", "mass_ratio": 0.1 },
Expand All @@ -302,7 +302,7 @@
{
"id": "shellfish",
"type": "harvest",
"message": "You carefully crack open its exoskeleton to get at the flesh beneath",
"message": "You carefully crack open its exoskeleton to get at the flesh beneath.",
"entries": [
{ "drop": "fish", "type": "flesh", "mass_ratio": 0.32 },
{ "drop": "meat_scrap", "type": "flesh", "mass_ratio": 0.03 },
Expand All @@ -312,7 +312,7 @@
{
"id": "mutant_shellfish",
"type": "harvest",
"message": "You carefully crack open its exoskeleton to get at the flesh beneath",
"message": "You crack open its hard shell to get at the flesh beneath.",
"entries": [
{ "drop": "mutant_meat", "type": "flesh", "mass_ratio": 0.32 },
{ "drop": "mutant_blood", "type": "blood", "mass_ratio": 0.1 },
Expand All @@ -322,7 +322,7 @@
{
"id": "mon_broken_cyborg",
"type": "harvest",
"message": "You search for any salvageable bionic hardware in what's left of this failed experiment",
"message": "You search for any salvageable hardware in what's left of this failed experiment.",
"entries": [
{
"drop": "bio_power_storage",
Expand Down
21 changes: 20 additions & 1 deletion data/json/hobbies.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,25 @@
"traits": [ "DISORGANIZED" ],
"addictions": [ { "intensity": 20, "type": "alcohol" } ]
},
{
"type": "profession",
"subtype": "hobby",
"id": "sleepingpillhead",
"name": "Sleeping Pill Reliance",
"description": "You had difficulties falling asleep, so you started taking those sleeping pills. Problem is, now you can not fall asleep without them anymore and the Cataclysm does complicate the matter.",
"points": -1,
"addictions": [ { "intensity": 10, "type": "sleeping pill" } ]
},
{
"type": "profession",
"subtype": "hobby",
"id": "caffeine_junkie",
"name": "Caffeine Junkie",
"description": "Coffee was your day-to-day companion in surviving your job, but getting caffeine into your body will be much harder now.",
"points": -1,
"traits": [ "STIMBOOST" ],
"addictions": [ { "intensity": 10, "type": "caffeine" } ]
},
{
"type": "profession",
"subtype": "hobby",
Expand Down Expand Up @@ -121,7 +140,7 @@
"subtype": "hobby",
"id": "loves_books",
"name": "Loves Books",
"description": "You love reading, you just never seemed to have enough time. Maybe the cataclysm is a blessing in disguise.",
"description": "You love reading, you just never seemed to have enough time. Maybe the Cataclysm is a blessing in disguise.",
"points": 1,
"traits": [ "LOVES_BOOKS" ]
},
Expand Down
Loading

0 comments on commit 1849d5a

Please sign in to comment.