Skip to content

Commit

Permalink
Merge pull request #11 from CleverRaven/master
Browse files Browse the repository at this point in the history
Merge ALL the things
  • Loading branch information
Xenomorph-III committed Jun 8, 2020
2 parents 089fe39 + b6915b2 commit 02b04b6
Show file tree
Hide file tree
Showing 972 changed files with 207,523 additions and 221,441 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: '{branch}.{build}'
image: Visual Studio 2019
image: Previous Visual Studio 2019
configuration: Release
platform: x64
shallow_clone: true
Expand Down
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ readability-*,\
-readability-isolate-declaration,\
-readability-magic-numbers,\
-readability-named-parameter,\
-readability-redundant-control-flow,\
"
WarningsAsErrors: '*'
HeaderFilterRegex: '(src|test|tools).*'
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#In fact, the code "owners" designation is meant to encourage third party
#individuals to contribute to the mod, with the curators notified for reviews.

/data/mods/Aftershock/ @Malecypse @John-Candlebury
/data/mods/Aftershock/ @Maleclypse @John-Candlebury
/data/mods/DinoMod/ @ephemeralstoryteller @damien @LyleSY
/data/mods/Graphical_Overmap/ @Kilvoctu @Larwck
/data/mods/MMA/ @Hymore246
Expand Down
36 changes: 31 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,17 @@ jobs:
packages: ["g++-8", "g++-8-multilib", "libc6-dbg", "libc6-dbg:i386", "libsdl2-dev", "libsdl2-ttf-dev", "libsdl2-image-dev", "libsdl2-mixer-dev"]
sources: *apt_sources

- env: CLANG=clang++-8 SANITIZE=address,undefined EXTRA_TEST_OPTS="~[.] ~vehicle_efficiency ~vehicle_drag ~starting_items ~[starve] ~grenade_lethality"
name: "Clang 8 Make build with sanitizers enabled, but long-running tests disabled"
- env: CLANG=clang++-10 SANITIZE=address,undefined EXTRA_TEST_OPTS="~[.] ~vehicle_efficiency ~vehicle_drag ~starting_items ~[starve] ~grenade_lethality"
name: "Clang 10 Make build with sanitizers enabled, but long-running tests disabled"
compiler: clang
addons: &clang8
dist: bionic
addons: &clang10
apt:
packages: ["clang-8"]
sources: [*apt_sources, llvm-toolchain-xenial-8]
packages:
- clang-10
sources:
- sourceline: "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"

- stage: "Platforms and Tidy"
# MXE variant using alternate repository http://mirror.mxe.cc/repos/apt
Expand Down Expand Up @@ -198,6 +202,28 @@ jobs:
packages: ["clang-7"]
sources: [*apt_sources, llvm-toolchain-xenial-7]

- env: CLANG=clang++-8
name: "Clang 8 Make build with Curses"
if: type != pull_request
compiler: clang
addons: &clang8
apt:
packages: ["clang-8"]
sources: [*apt_sources, llvm-toolchain-xenial-8]

- env: CLANG=clang++-9
name: "Clang 9 Make build with Curses"
if: type != pull_request
compiler: clang
dist: bionic
addons: &clang9
apt:
packages:
- clang-9
sources:
- sourceline: "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"

before_script:
- if [ -n "${CLANG}" ]; then COMPILER="$CLANG"; fi
- ${COMPILER} --version
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ include(CTest)
include(GetGitRevisionDescription)
git_describe(GIT_VERSION)

MESSAGE("\n * Cataclysm: Dark Days Ahead is a roguelike set in a post-apocalyptic world.")
MESSAGE("\n * Cataclysm: Dark Days Ahead is a turn-based survival game set in a post-apocalyptic world.")
MESSAGE(" _________ __ .__ ")
MESSAGE(" \\_ ___ \\ _____ _/ |_ _____ ____ | | ___.__ ______ _____ ")
MESSAGE(" / \\ \\/ \\__ \\ \\ __\\\\__ \\ _/ ___\\ | | < | | / ___/ / \\ ")
Expand Down
31 changes: 16 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ ifdef MSYSTEM
MSYS2 = 1
endif

# Default to disabling clang
ifndef CLANG
CLANG = 0
endif

# Determine JSON formatter binary name
JSON_FORMATTER_BIN=tools/format/json_formatter.cgi
ifeq ($(MSYS2), 1)
Expand Down Expand Up @@ -229,7 +234,7 @@ ifneq ($(findstring BSD,$(OS)),)
endif

# This sets CXX and so must be up here
ifdef CLANG
ifneq ($(CLANG), 0)
# Allow setting specific CLANG version
ifeq ($(CLANG), 1)
CLANGCMD = clang++
Expand Down Expand Up @@ -309,7 +314,7 @@ ifeq ($(RELEASE), 1)
endif

ifeq ($(LTO), 1)
ifdef CLANG
ifneq ($(CLANG), 0)
# LLVM's LTO will complain if the optimization level isn't between O0 and
# O3 (inclusive)
OPTLEVEL = -O3
Expand All @@ -319,14 +324,14 @@ ifeq ($(RELEASE), 1)

ifeq ($(LTO), 1)
ifeq ($(NATIVE), osx)
ifdef CLANG
ifneq ($(CLANG), 0)
LTOFLAGS += -flto=full
endif
else
LDFLAGS += -fuse-ld=gold # This breaks in OS X because gold can only produce ELF binaries, not Mach
endif

ifdef CLANG
ifneq ($(CLANG), 0)
LTOFLAGS += -flto
else
LTOFLAGS += -flto=jobserver -flto-odr-type-merging
Expand Down Expand Up @@ -426,7 +431,7 @@ endif

# OSX
ifeq ($(NATIVE), osx)
ifdef CLANG
ifneq ($(CLANG), 0)
OSX_MIN = 10.7
else
OSX_MIN = 10.5
Expand Down Expand Up @@ -817,7 +822,7 @@ ifeq ($(LTO), 1)
LDFLAGS += $(CXXFLAGS)

# If GCC or CLANG, use a wrapper for AR (if it exists) else test fails to build
ifndef CLANG
ifeq ($(CLANG), 0)
GCCAR := $(shell command -v gcc-ar 2> /dev/null)
ifdef GCCAR
ifneq (,$(findstring gcc version,$(shell $(CXX) -v </dev/null 2>&1)))
Expand Down Expand Up @@ -1097,22 +1102,18 @@ else
@echo Cannot run an astyle check, your system either does not have astyle, or it is too old.
endif

JSON_FILES = $(shell find data -name "*.json" | sed "s|^\./||")
JSON_WHITELIST = $(filter-out $(shell cat json_blacklist), $(JSON_FILES))

style-json: $(JSON_WHITELIST)

$(JSON_WHITELIST): json_blacklist json_formatter
style-json: json_blacklist $(JSON_FORMATTER_BIN)
ifndef CROSS
@$(JSON_FORMATTER_BIN) $@
find data -name "*.json" -print0 | grep -v -z -F -f json_blacklist | \
xargs -0 -L 1 $(JSON_FORMATTER_BIN)
else
@echo Cannot run json formatter in cross compiles.
endif

style-all-json: json_formatter
style-all-json: $(JSON_FORMATTER_BIN)
find data -name "*.json" -print0 | xargs -0 -L 1 $(JSON_FORMATTER_BIN)

json_formatter: $(JSON_FORMATTER_SOURCES)
$(JSON_FORMATTER_BIN): $(JSON_FORMATTER_SOURCES)
$(CXX) $(CXXFLAGS) $(TOOL_CXXFLAGS) -Itools/format -Isrc \
$(JSON_FORMATTER_SOURCES) -o $(JSON_FORMATTER_BIN)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cataclysm: Dark Days Ahead

Cataclysm: Dark Days Ahead is a roguelike set in a post-apocalyptic world. While some have described it as a "zombie game", there is far more to Cataclysm than that. Struggle to survive in a harsh, persistent, procedurally generated world. Scavenge the remnants of a dead civilization for food, equipment, or, if you are lucky, a vehicle with a full tank of gas to get you the hell out of Dodge. Fight to defeat or escape from a wide variety of powerful monstrosities, from zombies to giant insects to killer robots and things far stranger and deadlier, and against the others like yourself, who want what you have...
Cataclysm: Dark Days Ahead is a turn-based survival game set in a post-apocalyptic world. While some have described it as a "zombie game", there is far more to Cataclysm than that. Struggle to survive in a harsh, persistent, procedurally generated world. Scavenge the remnants of a dead civilization for food, equipment, or, if you are lucky, a vehicle with a full tank of gas to get you the hell out of Dodge. Fight to defeat or escape from a wide variety of powerful monstrosities, from zombies to giant insects to killer robots and things far stranger and deadlier, and against the others like yourself, who want what you have...

<a href="https://repology.org/project/cataclysm-dda/versions">
<img src="https://repology.org/badge/vertical-allrepos/cataclysm-dda.svg" alt="Packaging Status" align="right">
Expand Down
1 change: 0 additions & 1 deletion build-scripts/mod_test_blacklist
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ sees_player_hitbutton
sees_player_retro
generic_guns
national_guard_camp
FujiStruct
Graphical_Overmap_Fujistruct
Graphical_Overmap_More_Locations
mutant_npcs
Expand Down
6 changes: 3 additions & 3 deletions data/help/texts.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"order": 0,
"name": "<a|A>: Introduction",
"messages": [
"Cataclysm is a survival roguelike with a monster apocalypse setting. You have survived the original onslaught, but the future looks pretty grim.",
"Cataclysm: Dark Days Ahead is a turn-based survival game set in a post-apocalyptic world. You have survived the original onslaught, but the future looks pretty grim.",
"You must prepare to face the many hardships to come including dwindling supplies, hostile creatures, and harmful weather. Even among fellow survivors you must stay alert, since someone may be plotting behind your back to take your hard-earned loot.",
"Cataclysm differs from the traditional roguelikes in several ways. Rather than exploring an underground dungeon, with a limited area on each level, you are exploring a truly infinite world, stretching in all four cardinal directions. In this survival roguelike, you will have to find food; you also need to keep yourself hydrated and sleep periodically. It's based on principle of realism, so expect all hardships you'd expect in life in a survival situation, and at least a dozen more from the eldritch and sci-fi nature of the Cataclysm itself.",
"While Cataclysm has more tasks to keep track of than many other roguelikes, the near-future setting of the game makes some tasks easier. Firearms, medications, and a wide variety of tools are all available to help you survive."
"Though one can think Cataclysm: Dark Days Ahead is a roguelike, it vastly differs from the traditional roguelikes in several ways. Rather than exploring an underground dungeon, with a limited area on each level, you are exploring a truly infinite world, stretching in all four cardinal directions. In this survival game, you will have to find food; you also need to keep yourself hydrated and sleep periodically. It's based on the principle of realism, so expect all hardships you'd expect in life in a survival situation, and at least a dozen more from the eldritch and sci-fi nature of the Cataclysm itself.",
"While Cataclysm: Dark Days Ahead has more tasks to keep track of than many other games, the modern setting of the game makes some tasks easier. Firearms, medications, and a wide variety of tools are all available to help you survive."
]
},
{
Expand Down
63 changes: 60 additions & 3 deletions data/json/achievements.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
"type": "achievement",
"name": "Rude awakening",
"time_constraint": { "since": "game_start", "is": "<=", "target": "1 minute" },
"requirements": [ { "event_statistic": "num_avatar_kills", "is": ">=", "target": 1 } ]
"requirements": [ { "event_statistic": "num_avatar_monster_kills", "is": ">=", "target": 1 } ]
},
{
"id": "achievement_kill_10_monsters",
"type": "achievement",
"name": "Decamate",
"requirements": [ { "event_statistic": "num_avatar_kills", "is": ">=", "target": 10 } ]
"requirements": [ { "event_statistic": "num_avatar_monster_kills", "is": ">=", "target": 10 } ]
},
{
"id": "achievement_kill_100_monsters",
"type": "achievement",
"name": "Centinel",
"hidden_by": [ "achievement_kill_10_monsters" ],
"requirements": [ { "event_statistic": "num_avatar_kills", "is": ">=", "target": 100 } ]
"requirements": [ { "event_statistic": "num_avatar_monster_kills", "is": ">=", "target": 100 } ]
},
{
"id": "achievement_survive_one_day",
Expand Down Expand Up @@ -110,5 +110,62 @@
"type": "achievement",
"name": "Ain't no valley low enough",
"requirements": [ { "event_statistic": "min_move_z", "is": "<=", "target": -10 } ]
},
{
"id": "achievement_wield_crowbar",
"type": "achievement",
"name": "Freeman's favorite",
"requirements": [
{
"event_statistic": "num_avatar_wields_crowbar",
"is": ">=",
"target": 1,
"visible": "when_achievement_completed",
"description": "Wield a crowbar"
}
]
},
{
"id": "achievement_wear_power_armor",
"type": "achievement",
"name": "Impenetrable",
"requirements": [
{
"event_statistic": "num_avatar_wears_power_armor_heavy",
"is": ">=",
"target": 1,
"visible": "when_achievement_completed",
"description": "Wear a tank suit"
}
]
},
{
"id": "achievement_reach_lab_finale",
"type": "achievement",
"name": "What are they hiding?",
"requirements": [
{
"event_statistic": "num_avatar_enter_lab_finale",
"is": ">=",
"target": 1,
"visible": "when_achievement_completed",
"description": "Enter a lab finale room"
}
]
},
{
"id": "achievement_return_to_first_omt",
"type": "achievement",
"name": "Return to your roots",
"hidden_by": [ "achievement_survive_91_days" ],
"time_constraint": { "since": "game_start", "is": ">=", "target": "91 days" },
"requirements": [
{
"event_statistic": "num_avatar_enter_first_omt",
"is": ">=",
"target": 1,
"description": "Return to the location you started the game"
}
]
}
]
16 changes: 1 addition & 15 deletions data/json/anatomy.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,7 @@
{
"id": "human_anatomy",
"type": "anatomy",
"parts": [
"eyes",
"head",
"mouth",
"torso",
"arm_l",
"arm_r",
"hand_l",
"hand_r",
"leg_l",
"leg_r",
"foot_l",
"foot_r",
"num_bp"
]
"parts": [ "eyes", "head", "mouth", "torso", "arm_l", "arm_r", "hand_l", "hand_r", "leg_l", "leg_r", "foot_l", "foot_r" ]
},
{
"id": "default_anatomy",
Expand Down
26 changes: 13 additions & 13 deletions data/json/bionics.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"name": { "str": "Shotgun Arm" },
"description": "Concealed in your left arm is a single shot 12 gauge shotgun. Activate the bionic to fire and reload the shotgun.",
"occupied_bodyparts": [ [ "arm_l", 15 ] ],
"encumbrance": [ [ "ARM_L", 5 ] ],
"encumbrance": [ [ "arm_l", 5 ] ],
"act_cost": "50 J",
"fake_item": "bio_shotgun_gun",
"flags": [ "BIONIC_TOGGLED", "BIONIC_WEAPON", "NO_UNWIELD" ]
Expand Down Expand Up @@ -710,7 +710,7 @@
"description": "When active, this bionic eliminates all light within a 2 tile radius through destructive interference.",
"occupied_bodyparts": [ [ "torso", 16 ] ],
"flags": [ "BIONIC_TOGGLED" ],
"enchantments": [ "ENCH_INVISIBILITY" ],
"enchantments": [ "ENCH_SHADOW_CLOUD" ],
"act_cost": "9 kJ",
"react_cost": "9 kJ",
"time": 1
Expand Down Expand Up @@ -740,7 +740,7 @@
"name": { "str": "Bionic Nostril" },
"description": "You're really not sure how the CBM ended up in your nose, but no matter how it got there this badly misplaced bionic makes it difficult to breathe. Increases mouth encumbrance by ten.",
"occupied_bodyparts": [ [ "head", 2 ], [ "mouth", 1 ] ],
"encumbrance": [ [ "MOUTH", 10 ] ],
"encumbrance": [ [ "mouth", 10 ] ],
"flags": [ "BIONIC_FAULTY" ]
},
{
Expand Down Expand Up @@ -768,7 +768,7 @@
"name": { "str": "Bionic Visual Impairment" },
"description": "Due to a badly misplaced dielectric stylette, you are now suffering from mild optic neuropathy. Increases eye encumbrance by ten.",
"occupied_bodyparts": [ [ "eyes", 1 ] ],
"encumbrance": [ [ "EYES", 10 ] ],
"encumbrance": [ [ "eyes", 10 ] ],
"flags": [ "BIONIC_FAULTY" ]
},
{
Expand Down Expand Up @@ -977,13 +977,13 @@
"description": "Improperly installed wires cause a physical stiffness in most of your body, causing increased encumbrance.",
"occupied_bodyparts": [ [ "torso", 2 ], [ "arm_l", 1 ], [ "arm_r", 1 ], [ "leg_l", 1 ], [ "leg_r", 1 ], [ "foot_l", 1 ], [ "foot_r", 1 ] ],
"encumbrance": [
[ "TORSO", 10 ],
[ "ARM_L", 10 ],
[ "ARM_R", 10 ],
[ "LEG_L", 10 ],
[ "LEG_R", 10 ],
[ "FOOT_L", 10 ],
[ "FOOT_R", 10 ]
[ "torso", 10 ],
[ "arm_l", 10 ],
[ "arm_r", 10 ],
[ "leg_l", 10 ],
[ "leg_r", 10 ],
[ "foot_l", 10 ],
[ "foot_r", 10 ]
],
"flags": [ "BIONIC_FAULTY" ]
},
Expand Down Expand Up @@ -1037,7 +1037,7 @@
"name": { "str": "Self-Locking Thumbs" },
"description": "Self-locking thumbs hold tight (even when you really don't want them to) and don't let go (even when you'd rather they did). Increases hand encumbrance by ten, while failing to improve your ability to hold objects whatsoever.",
"occupied_bodyparts": [ [ "hand_l", 1 ], [ "hand_r", 1 ] ],
"encumbrance": [ [ "HAND_L", 10 ], [ "HAND_R", 10 ] ],
"encumbrance": [ [ "hand_l", 10 ], [ "hand_r", 10 ] ],
"flags": [ "BIONIC_FAULTY" ]
},
{
Expand Down Expand Up @@ -1153,7 +1153,7 @@
"name": { "str": "Gasoline Fuel Cell CBM" },
"description": "A small gasoline fuel cell fixed to your scapula. Despite its limited energy output compared to other fuel cells, this device still produces a significant amount of heat dissipated through a heat exhaust protruding from your back. A diffuse network of bio-plastic bladders has been meshed with your circulatory system and serves as a fuel tank.",
"occupied_bodyparts": [ [ "torso", 8 ] ],
"encumbrance": [ [ "TORSO", 5 ] ],
"encumbrance": [ [ "torso", 5 ] ],
"fuel_options": [ "gasoline" ],
"fuel_capacity": 500,
"fuel_efficiency": 0.25,
Expand Down
Loading

0 comments on commit 02b04b6

Please sign in to comment.