Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/upload' into finally-extend-th…
Browse files Browse the repository at this point in the history
…e-tweaks-and-stuff
  • Loading branch information
chaosvolt committed Sep 17, 2023
2 parents 0957473 + c7eeb5c commit 735f078
Show file tree
Hide file tree
Showing 183 changed files with 42,703 additions and 23,077 deletions.
12 changes: 11 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@ NOTE: Please grant permission for repository maintainers to edit your PR. It is
CODE STYLE: please follow below guide.
JSON: https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/doc/JSON_STYLE.md
C++: https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/doc/CODE_STYLE.md
C++ and Markdown: https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/doc/CODE_STYLE.md
!!!!!!!!!! WARNING !!!!!!!!!!
If you forget to format the PR, autofix.ci app will run automated format commit for you.
When this happens, YOU MUST DO EITHER OF THE FOLLOWING:
- Run `git pull` to merge the automated commit into your PR branch.
- Format your code locally, and force push to your PR branch.
If you don't do this, your following work will be based on the old commit, and cause MERGE CONFLICT.
-->

#### Summary
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: autofix.ci # needed to securely identify the workflow

on:
pull_request:
paths: ["**.json", "**.cpp", "**.hpp", "**.h", "**.c"]

permissions:
contents: read

jobs:
autofix:
runs-on: ubuntu-22.04
permissions:
contents: write

steps:
- uses: actions/checkout@v3

- run: sudo apt-get install astyle

- uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: format C++ files
run: make astyle

- name: format markdown files
run: deno fmt

- name: json formatting
run: make style-all-json-parallel RELEASE=1

- uses: autofix-ci/action@8caa572fd27b0019a65e4c695447089c8d3138b9
if: ${{ always() }}
with:
commit-message: "style(autofix.ci): automated formatting"
29 changes: 0 additions & 29 deletions .github/workflows/lint.yml

This file was deleted.

7 changes: 5 additions & 2 deletions .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
sound: 0
lua: 0
test-stage: 1
libbacktrace: 1
title: GCC 12, Ubuntu, Curses
native: linux64
- compiler: g++-12
Expand All @@ -51,9 +52,10 @@ jobs:
sound: 1
lua: 1
test-stage: 1
title: GCC 11, Ubuntu, Tiles, Sound, Lua
libbacktrace: 1
title: GCC 12, Ubuntu, Tiles, Sound, Lua
native: linux64
- compiler: g++-11
- compiler: g++-12
os: ubuntu-22.04
cmake: 0
tiles: 1
Expand Down Expand Up @@ -95,6 +97,7 @@ jobs:
TEST_STAGE: ${{ matrix.test-stage }}
LANGUAGES: ${{ matrix.languages }}
EXTRA_TEST_OPTS:
LIBBACKTRACE: ${{ matrix.libbacktrace }}
NATIVE: ${{ matrix.native }}
RELEASE: 1
SKIP: ${{ needs.skip-duplicates.outputs.should_skip == 'true' }}
Expand Down
36 changes: 23 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ set(CATA_CLANG_TIDY_INCLUDE_DIR "" CACHE STRING "Path to internal clang-tidy hea
set(CATA_CHECK_CLANG_TIDY "" CACHE STRING "Path to check_clang_tidy.py for plugin tests")
set(GIT_BINARY "" CACHE STRING "Git binary name or path.")
set(PREFIX "" CACHE STRING "Location of Data & GFX directories")
set(LINKER "" CACHE STRING "Custom Linker to use")

include(CTest)

Expand All @@ -52,6 +53,10 @@ MESSAGE(STATUS "${PROJECT} build environment -- \n")

MESSAGE(STATUS "Build realm is : ${CMAKE_SYSTEM_NAME} ${CMAKE_HOST_SYSTEM_PROCESSOR}")

IF(LINKER)
add_link_options("-fuse-ld=${LINKER}")
ENDIF()

IF(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
ENDIF(NOT CMAKE_BUILD_TYPE)
Expand All @@ -62,7 +67,7 @@ if (NOT ${GIT_VERSION} MATCHES GIT-NOTFOUND)
string(REPLACE "-NOTFOUND" "" GIT_VERSION ${GIT_VERSION})
FILE(WRITE ${CMAKE_SOURCE_DIR}/src/version.h
"// NOLINT(cata-header-guard)\n\#define VERSION \"${GIT_VERSION}\"\n")
MESSAGE(STATUS "${PROJECT_NAME} build version is : ${GIT_VERSION}\n")
MESSAGE(STATUS "${PROJECT_NAME} build version is : ${GIT_VERSION}\n")
ADD_DEFINITIONS(-DGIT_VERSION)
ELSE (NOT ${GIT_VERSION} MATCHES GIT-NOTFOUND)
MESSAGE("")
Expand Down Expand Up @@ -196,22 +201,27 @@ ELSE (CMAKE_BUILD_TYPE STREQUAL Debug)
ADD_DEFINITIONS(-DDATA_DIR_PREFIX)
ENDIF (PREFIX AND NOT WIN32)
ENDIF (CMAKE_BUILD_TYPE STREQUAL Debug)
MESSAGE(STATUS "GIT_BINARY : ${GIT_EXECUTABLE}")
MESSAGE(STATUS "DYNAMIC_LINKING : ${DYNAMIC_LINKING}")

MESSAGE(STATUS "TILES : ${TILES}")
MESSAGE(STATUS "CURSES : ${CURSES}")
MESSAGE(STATUS "SOUND : ${SOUND}")
MESSAGE(STATUS "LUA : ${LUA}")
MESSAGE(STATUS "BACKTRACE : ${BACKTRACE}")
MESSAGE(STATUS "USE_HOME_DIR : ${USE_HOME_DIR}\n")
MESSAGE(STATUS "GIT_BINARY : ${GIT_EXECUTABLE}")
MESSAGE(STATUS "DYNAMIC_LINKING : ${DYNAMIC_LINKING}")

MESSAGE(STATUS "UNITY_BUILD : ${USE_UNITY_BUILD}")
MESSAGE(STATUS "PCH_HEADER : ${USE_PCH_HEADER}")
MESSAGE(STATUS "TILES : ${TILES}")
MESSAGE(STATUS "CURSES : ${CURSES}")
MESSAGE(STATUS "SOUND : ${SOUND}")
MESSAGE(STATUS "LUA : ${LUA}")
MESSAGE(STATUS "BACKTRACE : ${BACKTRACE}")
MESSAGE(STATUS "LIBBACKTRACE : ${LIBBACKTRACE}")
MESSAGE(STATUS "USE_HOME_DIR : ${USE_HOME_DIR}\n")

MESSAGE(STATUS "LANGUAGES : ${LANGUAGES}\n")
MESSAGE(STATUS "UNITY_BUILD : ${USE_UNITY_BUILD}")
MESSAGE(STATUS "PCH_HEADER : ${USE_PCH_HEADER}")
MESSAGE(STATUS "LANGUAGES : ${LANGUAGES}\n")

IF(LINKER)
MESSAGE(STATUS "LINKER : ${LINKER}\n")
ENDIF()

MESSAGE(STATUS "See INSTALL file for details and more info --\n")
MESSAGE(STATUS "See INSTALL file for details and more info --\n")

IF(MSVC)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
Expand Down
28 changes: 19 additions & 9 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
In the interest of fostering an open and welcoming environment, we as contributors and maintainers
pledge to making participation in our project and our community a harassment-free experience for
everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity
and expression, level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

1. Assume other participants are posting in good faith, even if you disagree with what they say.
2. Make an effort to treat other participants with respect.
1. Do not take a harsh tone towards other participants, and especially don't make personal attacks against them.
2. Recognize that criticism of your statements is not a personal attack on you.
3. Avoid statements about the presumed typical desires, capabilities or actions of some demographic group.
1. Do not take a harsh tone towards other participants, and especially don't make personal
attacks against them.
2. Recognize that criticism of your statements is not a personal attack on you.
3. Avoid statements about the presumed typical desires, capabilities or actions of some
demographic group.
3. Be especially kind to other contributors when saying they made a mistake.
4. Don't argue unceasingly for your preferred course of action when a decision for some other course has already been made.
5. If other participants complain about the way you express your ideas, please make an effort to cater to them.
4. Don't argue unceasingly for your preferred course of action when a decision for some other course
has already been made.
5. If other participants complain about the way you express your ideas, please make an effort to
cater to them.
6. Don't raise unrelated political issues.
7. If you feel these standards are being violated, please alert the project's "ombudsman" Jakob at [email protected]
7. If you feel these standards are being violated, please alert the project's "ombudsman" Jakob at
[email protected]

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][CoC homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][CoC version] and the [GNU Kind Communications Guidelines][GKCG homepage].

This Code of Conduct is adapted from the [Contributor Covenant][CoC homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][CoC version] and the
[GNU Kind Communications Guidelines][GKCG homepage].

[CoC homepage]: http://contributor-covenant.org
[CoC version]: http://contributor-covenant.org/version/1/4/
Expand Down
44 changes: 33 additions & 11 deletions ISSUES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,28 @@

## How to create new issues properly

GitHub issues are used for everything from bug reporting to suggesting long-term ideas. You can make everything run much smoother by following some simple rules.
GitHub issues are used for everything from bug reporting to suggesting long-term ideas. You can make
everything run much smoother by following some simple rules.

### Rule zero

Always give your issue a meaningful title as this is the first thing anyone will see.

Note: `[CR]` and `[WIP]` "tags" are meaningful only for PRs. All open issues by definition are request for comments and work in progress.
Note: `[CR]` and `[WIP]` "tags" are meaningful only for PRs. All open issues by definition are
request for comments and work in progress.

### Bug reports

Before you submit a bug always search the current list of issues to see if it has been reported already.
Before you submit a bug always search the current list of issues to see if it has been reported
already.

Your bug report has to include:

- On what OS did you experience the problem (Windows, Linux, OS X etc.)
- What version were you playing:
- Tiles or Curses (text-based)
- Version string (preferably full version e.g. "0.C-4547-g3f1c109", or Jenkins build number e.g. 3245)
- Tiles or Curses (text-based)
- Version string (preferably full version e.g. "0.C-4547-g3f1c109", or Jenkins build number
e.g. 3245)
- Description of the problem written in a way that enables anyone to try and recreate it

Your bug report may include:
Expand All @@ -32,24 +36,42 @@ Bonus points for:
- Checking if the bug exists under latest experimental build
- Checking if it is OS specific

The OS and BN version are very important - with the pace of changes here it is possible the bug you have encountered has already been fixed. After that reproducibility is the key, so write your report with all the necessary details.
The OS and BN version are very important - with the pace of changes here it is possible the bug you
have encountered has already been fixed. After that reproducibility is the key, so write your report
with all the necessary details.

### Enhancements and addition ideas

We have hundreds of issues open - most of them are ideas and suggestions. If you have a general idea or anything that can't be easily described in terms of *current* code changes you'd be better off suggesting it in the appropriate section of [the forum](https://discourse.cataclysmdda.org/). You'll also get much broader exposure for your idea there. After developing a polished idea on the forum, it should be easy to make a GitHub issue for it.
We have hundreds of issues open - most of them are ideas and suggestions. If you have a general idea
or anything that can't be easily described in terms of _current_ code changes you'd be better off
suggesting it in the appropriate section of [the forum](https://discourse.cataclysmdda.org/). You'll
also get much broader exposure for your idea there. After developing a polished idea on the forum,
it should be easy to make a GitHub issue for it.

Please first search if something like what you have on mind has been already proposed. If so, feel free to join the discussion! If your idea is related but sufficiently different, open a new issue and refer to the older discussion (use GitHub's `#issue_number` reference system).
Please first search if something like what you have on mind has been already proposed. If so, feel
free to join the discussion! If your idea is related but sufficiently different, open a new issue
and refer to the older discussion (use GitHub's `#issue_number` reference system).

Remember to take part in the discussion of your suggestions.

### 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/COMPILING/COMPILING.md) if you have
problems building.

## Bounties

Placing a bounty *does not* necessarily mean that change will be incorporated into the main game. Please coordinate in the issue you intend to place a bounty on to determine if it is a change the project will accept, and keep in mind that placing a bounty will not confer special status on the issue. A good way of thinking about bounties is as encouragement for contributors to work on a particular issue, and certainly not as "paying for features".
Placing a bounty _does not_ necessarily mean that change will be incorporated into the main game.
Please coordinate in the issue you intend to place a bounty on to determine if it is a change the
project will accept, and keep in mind that placing a bounty will not confer special status on the
issue. A good way of thinking about bounties is as encouragement for contributors to work on a
particular issue, and certainly not as "paying for features".

## Issue resolution

We do not assign people to issues. If you plan to work on a bug fix or a validated idea feel free to just comment about that. Actual PRs are of much greater value than any assignments. In general the first correct PR about something will be the PR that will get merged, but remember: we are using Git - you can collaborate with someone else easily by sending them patches or PRs against their PR branch.
We do not assign people to issues. If you plan to work on a bug fix or a validated idea feel free to
just comment about that. Actual PRs are of much greater value than any assignments. In general the
first correct PR about something will be the PR that will get merged, but remember: we are using
Git - you can collaborate with someone else easily by sending them patches or PRs against their PR
branch.
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
# make TILES=1 SOUND=1
# Disable backtrace support, not available on all platforms
# make BACKTRACE=0
# Use libbacktrace. Only has effect if BACKTRACE=1. (currently only for MinGW builds)
# Use libbacktrace. Only has effect if BACKTRACE=1. (currently only for MinGW and Linux builds)
# make LIBBACKTRACE=1
# Compile localization files for specified languages
# make localization LANGUAGES="<lang_id_1>[ lang_id_2][ ...]"
Expand Down Expand Up @@ -399,7 +399,11 @@ ifeq ($(RELEASE), 1)
OTHERS += $(RELEASE_FLAGS)
DEBUG =
ifndef DEBUG_SYMBOLS
DEBUGSYMS =
ifeq ($(LIBBACKTRACE), 1)
DEBUGSYMS = -g1
else
DEBUGSYMS =
endif
endif
DEFINES += -DRELEASE
# Check for astyle or JSON regressions on release builds.
Expand Down Expand Up @@ -763,16 +767,14 @@ ifeq ($(TARGETSYSTEM),WINDOWS)
LDFLAGS += -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lversion
ifeq ($(BACKTRACE),1)
LDFLAGS += -ldbghelp
ifeq ($(LIBBACKTRACE),1)
LDFLAGS += -lbacktrace
endif
endif
endif

ifeq ($(BACKTRACE),1)
DEFINES += -DBACKTRACE
ifeq ($(LIBBACKTRACE),1)
DEFINES += -DLIBBACKTRACE
LDFLAGS += -lbacktrace
endif
endif

Expand Down Expand Up @@ -827,7 +829,7 @@ ifeq ($(LUA), 1)
DEFINES += -DLUA
LUA_OBJS = $(sort $(LUA_SOURCES:$(LUA_SRC_DIR)/%.c=$(ODIRLUA)/%.o))
else
LUA_OBJS =
LUA_OBJS =
endif

ifdef LANGUAGES
Expand Down
Loading

0 comments on commit 735f078

Please sign in to comment.