Skip to content

Commit

Permalink
Merge pull request #146 from CleverRaven/master
Browse files Browse the repository at this point in the history
September 27 2023
  • Loading branch information
xanderrootslayer authored Sep 27, 2023
2 parents 37a913b + ae14681 commit dbf3a25
Show file tree
Hide file tree
Showing 811 changed files with 413,209 additions and 204,623 deletions.
60 changes: 31 additions & 29 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,38 +23,40 @@ RUN if [ "${REINSTALL_CMAKE_VERSION_FROM_SOURCE}" != "none" ]; then \

# [Optional] Uncomment this section to install additional packages.
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends libsdl2-dev libsdl2-ttf-dev \
libsdl2-image-dev libsdl2-mixer-dev libfreetype6-dev build-essential astyle ccache
&& apt-get -y install --no-install-recommends libsdl2-dev libsdl2-ttf-dev libharfbuzz-dev \
libsdl2-image-dev libjpeg-turbo8-dev libtiff-dev libwebp-dev libzip-dev libzstd-dev \
libsdl2-mixer-dev libflac-dev libasound2-dev libfreetype6-dev build-essential astyle ccache

# [Optional] comment out this section unless you want to compile the Object Creator. Install some QT libraries
RUN apt-get -y install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools


# [Optional] uncomment this section to include dependencies for Windows cross-compilation from Linux
# [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
# 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++ \
# gperf intltool libffi-dev libgdk-pixbuf2.0-dev libtool libltdl-dev libssl-dev \
# libxml-parser-perl lzip make mingw-w64 openssl p7zip-full patch perl pkg-config \
# python3 ruby scons sed unzip wget xz-utils g++-multilib libc6-dev-i386 libtool-bin python3-mako
RUN apt-get -y install autoconf automake autopoint bash bison bzip2 flex gettext git g++ \
gperf intltool libffi-dev libgdk-pixbuf2.0-dev libtool libltdl-dev libssl-dev \
libxml-parser-perl lzip make mingw-w64 openssl p7zip-full patch perl pkg-config \
python3 ruby scons sed unzip wget xz-utils g++-multilib libc6-dev-i386 libtool-bin python3-mako

# WORKDIR /opt
# RUN mkdir -p mxe
# RUN mkdir -p libbacktrace
# RUN git clone https://github.com/mxe/mxe.git ./mxe
# WORKDIR /opt/mxe

# # because of https://github.com/mxe/mxe/issues/2659, we have to link python 3 to python
# RUN ln /usr/bin/python3 /usr/bin/python
# # Builds windows version of SDL2 which is required to later cross-compile CDDA.
# RUN make -j4 MXE_TARGETS='x86_64-w64-mingw32.static i686-w64-mingw32.static' \
# MXE_PLUGIN_DIRS=plugins/gcc12 sdl2 sdl2_ttf sdl2_image sdl2_mixer gettext
# WORKDIR /opt/libbacktrace
# RUN wget https://github.com/Qrox/libbacktrace/releases/download/2020-01-03/libbacktrace-x86_64-w64-mingw32.tar.gz
# RUN wget https://github.com/Qrox/libbacktrace/releases/download/2020-01-03/libbacktrace-i686-w64-mingw32.tar.gz
# RUN tar -xzf libbacktrace-x86_64-w64-mingw32.tar.gz --exclude=LICENSE -C /opt/mxe/usr/x86_64-w64-mingw32.static
# RUN tar -xzf libbacktrace-i686-w64-mingw32.tar.gz --exclude=LICENSE -C /opt/mxe/usr/i686-w64-mingw32.static

# #Additional steps to cross compile object_creator. Uncomment this if you want to cross-compile the object cretor
# WORKDIR /opt/mxe
# RUN make MXE_TARGETS='x86_64-w64-mingw32.static i686-w64-mingw32.static' qtbase
# RUN export PATH=/opt/mxe/usr/bin:$PATH
WORKDIR /opt
RUN mkdir -p mxe
RUN mkdir -p libbacktrace
RUN git clone https://github.com/mxe/mxe.git ./mxe
WORKDIR /opt/mxe

# because of https://github.com/mxe/mxe/issues/2659, we have to link python 3 to python
RUN ln /usr/bin/python3 /usr/bin/python
# Builds windows version of SDL2 which is required to later cross-compile CDDA.
RUN make -j4 MXE_TARGETS='x86_64-w64-mingw32.static i686-w64-mingw32.static' \
MXE_PLUGIN_DIRS=plugins/gcc12 sdl2 sdl2_ttf sdl2_image sdl2_mixer gettext
WORKDIR /opt/libbacktrace
RUN wget https://github.com/Qrox/libbacktrace/releases/download/2020-01-03/libbacktrace-x86_64-w64-mingw32.tar.gz
RUN wget https://github.com/Qrox/libbacktrace/releases/download/2020-01-03/libbacktrace-i686-w64-mingw32.tar.gz
RUN tar -xzf libbacktrace-x86_64-w64-mingw32.tar.gz --exclude=LICENSE -C /opt/mxe/usr/x86_64-w64-mingw32.static
RUN tar -xzf libbacktrace-i686-w64-mingw32.tar.gz --exclude=LICENSE -C /opt/mxe/usr/i686-w64-mingw32.static

#Additional steps to cross compile object_creator. comment this out if you don't want to cross-compile the object cretor
WORKDIR /opt/mxe
RUN make MXE_TARGETS='x86_64-w64-mingw32.static i686-w64-mingw32.static' qtbase
RUN export PATH=/opt/mxe/usr/bin:$PATH
2 changes: 1 addition & 1 deletion .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main"
sudo apt update
sudo apt install llvm-16 llvm-16-dev llvm-16-tools clang-16 clang-tidy-16 clang-tools-16 \
libclang-16-dev libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev \
libclang-16-dev libflac-dev libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev \
libpulse-dev ccache gettext jq
- name: install dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,12 @@ jobs:
- name: install SDL2 dependencies (ubuntu)
if: ${{ env.SKIP == 'false' && runner.os == 'Linux' && matrix.tiles == 1 }}
run: |
sudo apt-get install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev libpulse-dev
sudo apt-get install libflac-dev libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev libpulse-dev
- name: install recent ccache on ubuntu 20.04
if: ${{ env.SKIP == 'false' && runner.os == 'Linux' && matrix.os == 'ubuntu-20.04' }}
run: |
sudo apt-get remove --purge -y ccache
curl -sL https://github.com/ccache/ccache/releases/download/v4.8/ccache-4.8-linux-x86_64.tar.xz | sudo tar Jxvf - --strip-components 1 -C /usr/bin ccache-4.8-linux-x86_64/ccache
curl -sL https://github.com/ccache/ccache/releases/download/v4.8.3/ccache-4.8.3-linux-x86_64.tar.xz | sudo tar Jxvf - --strip-components 1 -C /usr/bin ccache-4.8.3-linux-x86_64/ccache
ccache --version
- name: set up a mock GCC toolchain root for Clang (Ubuntu)
if: ${{ env.SKIP == 'false' && runner.os == 'Linux' && (matrix.compiler == 'clang++-12') }}
Expand Down
57 changes: 53 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ jobs:
ext: zip
content: application/zip
sound: 1
- name: Windows Object Creator x64
mxe: x86_64
artifact: windows-objectcreator-x64
android: none
os: ubuntu-latest
ext: zip
content: application/zip
- name: Linux Tiles x64
os: ubuntu-20.04
mxe: none
Expand Down Expand Up @@ -105,6 +112,13 @@ jobs:
artifact: linux-curses-x64
ext: tar.gz
content: application/gzip
- name: Linux object creator x64
os: ubuntu-20.04
mxe: none
android: none
artifact: linux-objectcreator-x64
ext: tar.gz
content: application/gzip
- name: macOS Curses Universal Binary (x64 and arm64)
os: macos-12
mxe: none
Expand Down Expand Up @@ -172,11 +186,11 @@ jobs:
run: |
vcpkg integrate install --vcpkg-root '${{ runner.workspace }}\b\vcpkg'
- name: Install dependencies (windows mxe)
if: matrix.mxe != 'none'
if: matrix.mxe != 'none' && matrix.artifact != 'windows-objectcreator-x64'
run: |
sudo apt install gettext
- name: Install MXE
if: matrix.mxe != 'none'
if: matrix.mxe != 'none' && matrix.artifact != 'windows-objectcreator-x64'
run: |
curl -L -o mxe-${{ matrix.mxe }}.tar.xz https://github.com/BrettDong/MXE-GCC/releases/download/mxe-sdl-2-0-20/mxe-${{ matrix.mxe }}.tar.xz
curl -L -o mxe-${{ matrix.mxe }}.tar.xz.sha256 https://github.com/BrettDong/MXE-GCC/releases/download/mxe-sdl-2-0-20/mxe-${{ matrix.mxe }}.tar.xz.sha256
Expand Down Expand Up @@ -222,12 +236,47 @@ jobs:
run: |
lang/compile_mo.sh all
- name: Build CDDA (linux)
if: runner.os == 'Linux' && matrix.mxe == 'none' && matrix.android == 'none'
if: runner.os == 'Linux' && matrix.mxe == 'none' && matrix.android == 'none' && matrix.artifact != 'linux-objectcreator-x64'
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: Login to GitHub Container Registry
if: matrix.artifact == 'windows-objectcreator-x64' || matrix.artifact == 'linux-objectcreator-x64'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build object creator (windows)
if: matrix.artifact == 'windows-objectcreator-x64'
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/cleverraven/cataclysm-dda/cataclysm-dda-devcontainer
cacheFrom: ghcr.io/cleverraven/cataclysm-dda/cataclysm-dda-devcontainer
push: always
runCmd: |
git config --global --add safe.directory /workspaces/Cataclysm-DDA
make object_creator.exe CROSS="/opt/mxe/usr/bin/x86_64-w64-mingw32.static-" TILES=1 SOUND=1 RELEASE=1 LOCALIZE=1 PREFIX=output PCH=0 MXE_TARGETS='x86_64-w64-mingw32.static' -j4
- name: Build object creator (linux)
if: matrix.artifact == 'linux-objectcreator-x64'
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/cleverraven/cataclysm-dda/cataclysm-dda-devcontainer
cacheFrom: ghcr.io/cleverraven/cataclysm-dda/cataclysm-dda-devcontainer
push: never
runCmd: |
git config --global --add safe.directory /workspaces/Cataclysm-DDA
make -j$((`nproc`+0)) TILES=1 LINTJSON=0 RELEASE=1 object_creator
- name: zip Object Creator (windows)
if: matrix.artifact == 'windows-objectcreator-x64'
run: |
zip cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.${{ matrix.ext }} ./object_creator/object_creator.exe ./object_creator/qt-license.txt
- name: tar Object Creator (linux)
if: matrix.artifact == 'linux-objectcreator-x64'
run: |
tar -czf cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.${{ matrix.ext }} ./object_creator/object_creator ./object_creator/qt-license.txt
- name: Build CDDA (windows mxe)
if: matrix.mxe != 'none'
if: matrix.mxe != 'none' && matrix.artifact != 'windows-objectcreator-x64'
env:
PLATFORM: /opt/mxe/usr/bin/${{ matrix.mxe }}-w64-mingw32.static.gcc12-
run: |
Expand Down
2 changes: 1 addition & 1 deletion CMakeModules/Find/FindSDL2_image.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ set(SDL2IMAGE_FOUND ${SDL2_IMAGE_FOUND})

mark_as_advanced(SDL2_IMAGE_LIBRARY SDL2_IMAGE_INCLUDE_DIR)

if(NOT DYNAMIC_LINKING AND PKGCONFIG_FOUND)
if(NOT DYNAMIC_LINKING AND PKG_CONFIG_FOUND)
if (NOT TARGET SDL2_image:SDL2_image-static)
add_library(SDL2_image::SDL2_image-static STATIC IMPORTED)
set_property(TARGET SDL2_image::SDL2_image-static
Expand Down
22 changes: 15 additions & 7 deletions CMakeModules/Find/FindSDL2_mixer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -96,22 +96,30 @@ set(SDL2MIXER_FOUND ${SDL2_MIXER_FOUND})

mark_as_advanced(SDL2_MIXER_LIBRARY SDL2_MIXER_INCLUDE_DIR)

if(NOT DYNAMIC_LINKING AND PKGCONFIG_FOUND)
if(NOT DYNAMIC_LINKING)
if (NOT TARGET SDL2_mixer::SDL2_mixer-static)
add_library(SDL2_mixer::SDL2_mixer-static STATIC IMPORTED)
set_property(TARGET SDL2_mixer::SDL2_mixer-static
PROPERTY IMPORTED_LOCATION ${SDL2_MIXER_LIBRARY}
)
endif()
message(STATUS "Searching for SDL_mixer deps libraries --")
pkg_check_modules(FLAC REQUIRED IMPORTED_TARGET flac)
target_link_libraries(SDL2_mixer::SDL2_mixer-static INTERFACE
PkgConfig::FLAC
)
elseif(NOT TARGET SDL2_mixer::SDL2_mixer)
add_library(SDL2_mixer::SDL2_mixer STATIC IMPORTED)
set_property(TARGET SDL2_mixer::SDL2_mixer
PROPERTY IMPORTED_LOCATION ${SDL2_MIXER_LIBRARY}
)
endif()

endif()
if(PKG_CONFIG_FOUND)
message(STATUS "Searching for SDL_mixer deps libraries --")
pkg_check_modules(FLAC REQUIRED IMPORTED_TARGET flac)
if(TARGET SDL2_mixer::SDL2_mixer-static)
target_link_libraries(SDL2_mixer::SDL2_mixer-static INTERFACE
PkgConfig::FLAC
)
elseif(TARGET SDL2_mixer::SDL2_mixer)
target_link_libraries(SDL2_mixer::SDL2_mixer INTERFACE
PkgConfig::FLAC
)
endif()
endif()
2 changes: 1 addition & 1 deletion CMakeModules/Find/FindSDL2_ttf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ set(SDL2TTF_FOUND ${SDL2_TTF_FOUND})

mark_as_advanced(SDL2_TTF_LIBRARY SDL2_TTF_INCLUDE_DIR)

if (NOT DYNAMIC_LINKING AND PKGCONFIG_FOUND)
if (NOT DYNAMIC_LINKING AND PKG_CONFIG_FOUND)
if (NOT TARGET SDL2_ttf::SDL2_ttf-static)
add_library(SDL2_ttf::SDL2_ttf-static STATIC IMPORTED)
set_property(TARGET SDL2_ttf::SDL2_ttf-static
Expand Down
3 changes: 1 addition & 2 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
"description": "Target Linux (64-bit) with the GCC development environment.",
"generator": "Ninja Multi-Config",
"cacheVariables": {
"CMAKE_EXE_LINKER_FLAGS": "-fuse-ld=mold",
"DYNAMIC_LINKING": "False", "CMAKE_BUILD_TYPE": "RelWithDebInfo",
"DYNAMIC_LINKING": "True", "CMAKE_BUILD_TYPE": "RelWithDebInfo",
"CURSES": "False", "LOCALIZE": "True", "TILES": "True", "SOUND": "True", "TESTS": "False",
"CMAKE_INSTALL_MESSAGE": "NEVER"
}
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,8 @@ else
endif
THIRD_PARTY_SOURCES := $(wildcard $(SRC_DIR)/third-party/flatbuffers/*.cpp)
HEADERS := $(wildcard $(SRC_DIR)/*.h)
OBJECT_CREATOR_SOURCES := $(wildcard $object_creator/*.cpp)
OBJECT_CREATOR_HEADERS := $(wildcard $object_creator/*.h)
TESTSRC := $(wildcard tests/*.cpp)
TESTHDR := $(wildcard tests/*.h)
JSON_FORMATTER_SOURCES := $(wildcard tools/format/*.cpp) src/wcwidth.cpp src/json.cpp
Expand All @@ -870,6 +872,8 @@ CLANG_TIDY_PLUGIN_HEADERS := \
ASTYLE_SOURCES := $(sort \
$(SOURCES) \
$(HEADERS) \
$(OBJECT_CREATOR_SOURCES) \
$(OBJECT_CREATOR_HEADERS) \
$(TESTSRC) \
$(TESTHDR) \
$(JSON_FORMATTER_SOURCES) \
Expand Down
33 changes: 32 additions & 1 deletion data/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ Friendly NPC crafting by crafting menu
Functionality to drop items off ledges/cliffs onto creatures below
NPC fleeing behaviour adjusted and slightly improved
Adds basic vehicle proficiencies for driving and boating, as well as athletic proficiencies which increase muscle engine output.
Add overheat mechanics to energy guns.
Sound-triggered traps
Item transformation can now pick variant items to transform into


## Content:
Expand Down Expand Up @@ -81,6 +84,9 @@ Add a synagogue
Adds a chance for small, personal photographs to spawn within people’s wallets and creates a starting pool of 34 snippets from which to pull.
Adds curved road bends, rotaries and rest stops/laybys
JSONify Defense Mode
Adds a new mission to the Exodii
Add boats to river banks
Vehicles now contain heater, and some contain AC


## Interface:
Expand All @@ -103,6 +109,9 @@ Change description of highlighted regions when editing the overmap
Detailed information for stats on character creation menu
Larger and more I18n-friendly safemode UI
Enable/disable showing several non-player-related messages in the log
Walking into ledges examines them.
Accessible item insert menu
Show insertion failure reasons in Insert menu and AIM


## Mods:
Expand Down Expand Up @@ -141,8 +150,16 @@ Add the Mind Over Matter mod to the CDDA repository
[XE] Paraclesians: Elemental Races
[Railroads] New mod
[MoM] Add Enervation damage type, apply it to Eater and feral vitakinetics
[Magiclysm] Add more than a dozen spells to magiclysm
[Magiclysm] Add more than two dozen spells to magiclysm
[Magiclysm] Add fantasy species starting option
[Magiclysm] Add two more playable fantasy species for Magiclysm
JSON-ize faction camp hunting returns
[DinoMod] document lore
[Aftershock] Rebalance energy weapons to use overheat mechanics
[Magiclysm] Add fantasy species ferals
[Magiclysm] Add dispel magic spells
Create the Isolation Protocol Mod: A traditional roguelike experience
[Magiclysm] Add triffid and migo mages


## Balance:
Expand Down Expand Up @@ -174,6 +191,10 @@ Adds a mutable stream to the mapgen
Limit the times assassins can try to kill you.
Increase plastic variety, adjust plastics to be more realistic in terms of protection
Characters start with basic skills from their previous life
Climbing down stepladders is now safe; climbing down ledges tells you how risky it is.
Add NO_SPELLCASTING flag to Stunned effect
Improve pets' ability to use stairs
Make ferals actually feel like human enemies instead of weaker zombies with range attacks


## Bugfixes:
Expand Down Expand Up @@ -243,6 +264,13 @@ Make sure overconfident officers reliably drop their guns
Fix appliance power drain display right after plugging in/unplugging device
Fix items and furniture being deleted from grappling hook usage
Randomly generated characters are now aged appropriately to their profession
AIM: Display correct truncation of container names
Fix visible tiles revealing invisible tiles below
Fix furniture & vehicle map memory refresh
Monsters can go down ramps
Don't teleport items to the ground if the vehicle storage destination is full
Fix Free Merchants Broker price calculation of non charge based item
Skip auto sorting items that don't belong to you


## Performance:
Expand All @@ -253,6 +281,7 @@ Fix Nested List lag in crafting menu
Optimize eoc processing and other fixes to speed up waiting near many npcs
Optimize pocket overflow function
Speed up new character screen, particularly when many recipes are known
Stop clearing weight carried cache unnecessarily


## Infrastructure:
Expand All @@ -274,6 +303,7 @@ Remove charges from solid comestibles
New item categories for martial arts manuals and traps
Update all active items to new tick action system and remove old system
Add ability to merge appliance into grid
Add JSON-based system for climbing aids.


## Build:
Expand All @@ -283,6 +313,7 @@ Allow for cross-compiling from Linux to Windows in Devcontainer
Faster local VS builds
Fast Windows iteration with llvm-lib and lld-link
Cross compile object creator from linux to Windows using Devcontainer
add object creator to releases


## I18N and A11Y:
Expand Down
2 changes: 1 addition & 1 deletion data/json/achievements.json
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@
"id": "achievement_lvl_4_computer",
"type": "achievement",
"name": "Help Desk",
"description": "Have you tried turning it off and back on again?.",
"description": "Have you tried turning it off and back on again?",
"requirements": [
{
"event_statistic": "num_gains_computer_level_4",
Expand Down
Loading

0 comments on commit dbf3a25

Please sign in to comment.