Skip to content

Commit

Permalink
Merge pull request #12 from CleverRaven/master
Browse files Browse the repository at this point in the history
reset
  • Loading branch information
faefux authored Jun 1, 2021
2 parents 932a2bd + bdc9d52 commit 3108432
Show file tree
Hide file tree
Showing 176 changed files with 32,246 additions and 46,446 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/CBA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- '**/Makefile'
- '**.hpp'
- '**.cmake'
- '.github/workflows/CBA.yml'
pull_request:
branches:
- master
Expand All @@ -23,6 +24,7 @@ on:
- '**/Makefile'
- '**.hpp'
- '**.cmake'
- '.github/workflows/CBA.yml'


jobs:
Expand Down Expand Up @@ -51,7 +53,7 @@ jobs:
- name: make
run: |
ClangBuildAnalyzer --start .
CLANG=clang++-9 CXXFLAGS=-ftime-trace make
CLANG=clang++-10 CXXFLAGS=-ftime-trace make
ClangBuildAnalyzer --stop . buildAnalysis
- name: Analyze
run: ClangBuildAnalyzer --analyze buildAnalysis
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ jobs:
sanitize: address
native: linux64
title: GCC 8, Ubuntu, Tiles, ASan
- compiler: clang++-9
- compiler: clang++-12
os: ubuntu-latest
cmake: 0
tiles: 1
sanitize: address,undefined
native: linux64
title: Clang 9, Ubuntu, Tiles, ASan, UBSan
title: Clang 12, Ubuntu, Tiles, ASan, UBSan
- compiler: clang++
os: macos-10.15
cmake: 0
Expand Down
68 changes: 66 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
needs: release
if: ${{ needs.release.outputs.release_already_exists == 'false' }}
strategy:
fail-fast: false
matrix:
include:
- name: Windows Tiles x64
Expand All @@ -74,13 +75,15 @@ jobs:
- name: Linux Tiles x64
os: ubuntu-latest
mxe: none
android: none
tiles: 1
artifact: linux-tiles-x64
ext: tar.gz
content: application/gzip
- name: linux-curses-x64
os: ubuntu-latest
mxe: none
android: none
tiles: 0
artifact: linux-curses-x64
ext: tar.gz
Expand All @@ -99,6 +102,27 @@ jobs:
artifact: osx-tiles-x64
ext: dmg
content: application/x-apple-diskimage
- name: Android x64
os: ubuntu-latest
mxe: none
android: arm64
artifact: android-x64
ext: apk
content: application/apk
- name: Android x32
os: ubuntu-latest
mxe: none
android: arm32
artifact: android-x32
ext: apk
content: application/apk
- name: Android Bundle
os: ubuntu-latest
mxe: none
android: bundle
artifact: android-bundle
ext: aab
content: application/aap
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -118,7 +142,7 @@ jobs:
sudo apt update
sudo apt install mxe-{i686,x86-64}-w64-mingw32.static-{sdl2,sdl2-ttf,sdl2-image,sdl2-mixer,gettext}
- name: Install dependencies (Linux)
if: runner.os == 'Linux' && matrix.mxe == 'none'
if: runner.os == 'Linux' && matrix.mxe == 'none' && matrix.android == 'none'
run: |
sudo apt-get update
sudo apt-get install libncursesw5-dev libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev \
Expand All @@ -129,7 +153,7 @@ jobs:
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 biplist
- name: Build CDDA (linux)
if: runner.os == 'Linux' && matrix.mxe == 'none'
if: runner.os == 'Linux' && matrix.mxe == 'none' && matrix.android == 'none'
run: |
cat >VERSION.txt <<EOL
build type: ${{ matrix.artifact }}
Expand Down Expand Up @@ -163,6 +187,46 @@ jobs:
EOL
make -j3 TILES=${{ matrix.tiles }} SOUND=${{ matrix.tiles }} RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=0 PCH=0 dmgdist
mv Cataclysm.dmg cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.dmg
- name: Set up JDK 8 (android)
if: runner.os == 'Linux' && matrix.android != 'none' && matrix.mxe == 'none'
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- 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)
if: runner.os == 'Linux' && matrix.android != 'none' && matrix.mxe == 'none'
working-directory: ./android
run: |
echo "${{ secrets.KEYSTORE }}" > release.keystore.asc
gpg -d --passphrase "${{ secrets.KEYSTORE_PASSWORD }}" --batch release.keystore.asc > app/release.keystore
echo "${{ secrets.KEYSTORE_PROPERTIES }}" > keystore.properties.asc
gpg -d --passphrase "${{ secrets.KEYSTORE_PASSWORD }}" --batch keystore.properties.asc > keystore.properties
export UPSTREAM_BUILD_NUMBER="$((11581 + ${{ github.run_number }}))"
chmod +x gradlew
if [ ${{ matrix.android }} = arm64 ]
then
./gradlew -Pj=$((`nproc`+0)) -Pabi_arm_32=false assembleExperimentalRelease
mv ./app/build/outputs/apk/experimental/release/*.apk ../cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.apk
elif [ ${{ matrix.android }} = arm32 ]
then
./gradlew -Pj=$((`nproc`+0)) -Pabi_arm_64=false assembleExperimentalRelease
mv ./app/build/outputs/apk/experimental/release/*.apk ../cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.apk
elif [ ${{ matrix.android }} = bundle ]
then
./gradlew -Pj=$((`nproc`+0)) bundleExperimentalRelease
mv ./app/build/outputs/bundle/experimentalRelease/*.aab ../cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.aab
fi
- name: Upload release asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ Cataclysm.dmg
/tests/shadowcasting_test
/tests/data/jsionized_overmap.sav
/test_user_dir
monfactions.txt

# temporary files generated by tools/reduce_tests.sh
/list_of_tests
Expand Down
22 changes: 12 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ endif ()

if (${CMAKE_SYSTEM_NAME} MATCHES Darwin)
set(_OS_DARWIN_ 1)
set(LOCALIZE OFF)
message(STATUS "Internationalization on Darwin is not supported")
add_definitions(-DMACOSX)
if (${TILES})
add_definitions(-DOSX_SDL2_LIBS)
endif ()
endif ()

include(CheckCXXCompilerFlag)
Expand Down Expand Up @@ -335,21 +337,21 @@ endif (BACKTRACE)

# Ok. Now create build and install recipes
if (LOCALIZE)
if (WIN32)
if (NOT _OS_LINUX_) # on Linux with glibc, libintl is not required
find_package(Libintl)
if (NOT LIBINTL_FOUND)
message(FATAL_ERROR
"You need the libintl development library \
to be able to compile with LOCALIZE support. \
See doc/COMPILING/COMPILING-CMAKE.md for details and more info.")
to be able to compile with LOCALIZE support. \
See doc/COMPILING/COMPILING-CMAKE.md for details and more info.")
endif ()
find_package(Iconv)
if (NOT ICONV_FOUND)
message(FATAL_ERROR
"You need the iconv development library \
endif()
find_package(Iconv)
if (NOT ICONV_FOUND)
message(FATAL_ERROR
"You need the iconv development library \
to be able to compile with LOCALIZE support. \
See doc/COMPILING/COMPILING-CMAKE.md for details and more info.")
endif ()
endif ()
add_subdirectory(lang)
add_definitions(-DLOCALIZE)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ GitHub repo:
https://github.com/CleverRaven/Cataclysm-DDA

IRC:
`irc.freenode.net` ; `#CataclysmDDA`
http://webchat.freenode.net/?channels=#CataclysmDDA
`irc.libera.chat` ; `#CataclysmDDA`
https://kiwiirc.com/nextclient/irc.libera.chat#CataclysmDDA

Official Discord:
https://discord.gg/jFEc7Yp
Expand Down
2 changes: 1 addition & 1 deletion build-scripts/requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fi

if [ -n "$CATA_CLANG_TIDY" ]; then
$travis_retry pip install --user wheel --upgrade
$travis_retry pip install --user compiledb 'lit==0.11.1'
$travis_retry pip install --user compiledb 'lit==0.11.1' 'click==7.1.2'
fi

# Influenced by https://github.com/zer0main/battleship/blob/master/build/windows/requirements.sh
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/armor/holster.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"min_item_volume": "1500 ml",
"max_contains_volume": "9 L",
"max_contains_weight": "10 kg",
"max_item_length": "60 cm",
"max_item_length": "133 cm",
"moves": 150
}
],
Expand Down
1 change: 0 additions & 1 deletion data/json/items/containers.json
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@
"pocket_data": [
{
"pocket_type": "CONTAINER",
"watertight": true,
"max_contains_volume": "100 L",
"max_contains_weight": "100 kg",
"max_item_length": "200 cm",
Expand Down
1 change: 1 addition & 0 deletions data/json/items/fake.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
[ "SAW_M_FINE", 1 ],
[ "WRENCH", 2 ],
[ "WRENCH_FINE", 1 ],
[ "WHEEL_FAST", 1 ],
[ "SCREW", 1 ],
[ "SCREW_FINE", 1 ],
[ "CUT", 1 ],
Expand Down
2 changes: 0 additions & 2 deletions data/json/items/gun/ups.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
},
{
"id": "gatling_mech_laser",
"looks_like": "ar15",
"type": "GUN",
"reload_noise_volume": 20,
"name": { "str": "CMES laser cannon" },
Expand Down Expand Up @@ -68,7 +67,6 @@
},
{
"id": "recon_mech_laser",
"looks_like": "ar15",
"type": "GUN",
"reload_noise_volume": 2,
"name": { "str": "RMES marksman system" },
Expand Down
1 change: 1 addition & 0 deletions data/json/items/melee/bludgeons.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
"material": [ "plastic" ],
"flags": [ "FRAGILE_MELEE" ],
"volume": "2250 ml",
"bashing": 1,
"price": "25 USD"
},
{
Expand Down
4 changes: 2 additions & 2 deletions data/json/items/tool/electronics.json
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@
"ammo": [ "battery" ],
"charges_per_use": 1,
"use_action": [ "NOISE_EMITTER_OFF" ],
"flags": [ "RADIO_MODABLE" ],
"flags": [ "RADIO_MODABLE", "RADIO_INVOKE_PROC" ],
"pocket_data": [
{
"pocket_type": "MAGAZINE_WELL",
Expand Down Expand Up @@ -480,7 +480,7 @@
"power_draw": 10000,
"revert_to": "noise_emitter",
"use_action": [ "NOISE_EMITTER_ON" ],
"flags": [ "RADIO_MODABLE", "TRADER_AVOID" ]
"flags": [ "RADIO_MODABLE", "RADIO_INVOKE_PROC", "TRADER_AVOID" ]
},
{
"id": "portable_game",
Expand Down
16 changes: 12 additions & 4 deletions data/json/items/tool/lighting.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"need_charges": 1,
"need_charges_msg": "The lantern has no batteries."
},
"flags": [ "RADIO_MODABLE", "ALLOWS_REMOTE_USE" ],
"flags": [ "RADIO_MODABLE", "RADIO_INVOKE_PROC", "ALLOWS_REMOTE_USE" ],
"pocket_data": [
{
"pocket_type": "MAGAZINE_WELL",
Expand Down Expand Up @@ -180,7 +180,7 @@
"power_draw": 1000,
"revert_to": "electric_lantern",
"use_action": { "menu_text": "Turn off", "type": "transform", "target": "electric_lantern", "msg": "You turn the lamp off." },
"flags": [ "RADIO_MODABLE", "LIGHT_15", "TRADER_AVOID", "ALLOWS_REMOTE_USE" ]
"flags": [ "RADIO_MODABLE", "RADIO_INVOKE_PROC", "LIGHT_15", "TRADER_AVOID", "ALLOWS_REMOTE_USE" ]
},
{
"id": "flashlight",
Expand Down Expand Up @@ -640,7 +640,7 @@
"need_charges_msg": "The smart lamp batteries are dead.",
"type": "transform"
},
"flags": [ "ALLOWS_REMOTE_USE", "RADIO_ACTIVATION", "RADIOSIGNAL_2" ],
"flags": [ "ALLOWS_REMOTE_USE", "RADIO_ACTIVATION", "RADIO_INVOKE_PROC", "RADIOSIGNAL_2" ],
"pocket_data": [
{
"pocket_type": "MAGAZINE_WELL",
Expand Down Expand Up @@ -669,7 +669,15 @@
"power_draw": 10000,
"revert_to": "smart_lamp",
"use_action": { "target": "smart_lamp", "msg": "Your smart lamp turned off.", "menu_text": "Turn off", "type": "transform" },
"flags": [ "ALLOWS_REMOTE_USE", "RADIO_ACTIVATION", "RADIOSIGNAL_2", "LIGHT_240", "CHARGEDIM", "TRADER_AVOID" ]
"flags": [
"ALLOWS_REMOTE_USE",
"RADIO_ACTIVATION",
"RADIO_INVOKE_PROC",
"RADIOSIGNAL_2",
"LIGHT_240",
"CHARGEDIM",
"TRADER_AVOID"
]
},
{
"id": "torch",
Expand Down
4 changes: 2 additions & 2 deletions data/json/items/tool_armor.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
"encumbrance": 60,
"material_thickness": 3,
"qualities": [ [ "GLARE", 3 ] ],
"flags": [ "SUN_GLASSES", "FLASH_PROTECTION", "BLIND" ]
"flags": [ "SUN_GLASSES", "FLASH_PROTECTION" ]
},
{
"id": "welding_mask_crude",
Expand Down Expand Up @@ -555,7 +555,7 @@
"covers": [ "torso", "arm_l", "arm_r", "leg_l", "leg_r" ],
"warmth": 10,
"coverage": 100,
"material_thickness": 1,
"material_thickness": 0.1,
"pocket_data": [
{
"pocket_type": "MAGAZINE_WELL",
Expand Down
Loading

0 comments on commit 3108432

Please sign in to comment.