Skip to content

Commit

Permalink
Merge pull request #17 from CleverRaven/master
Browse files Browse the repository at this point in the history
Bring me up to speed
  • Loading branch information
Inglonias committed Apr 28, 2019
2 parents ae73b57 + 8533048 commit 37a5092
Show file tree
Hide file tree
Showing 770 changed files with 77,792 additions and 23,846 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
# Initial test stage, if this fails everything else is cancelled.
- stage: test
# GCC 5 is the pre-installed compiler on Xenial
env: COMPILER=g++ MODS=--mods=RL_Classes
env: COMPILER=g++ MODS=--mods=RL_Classes TEST_STAGE=1

# Then build different configurations and targets in parallel.
- stage: variants
Expand Down
7 changes: 7 additions & 0 deletions COMPILING.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,13 @@ Export Android environment variables (you can add these to the end of `~/.bashrc
export PATH=$PATH:$ANDROID_SDK_ROOT/tools
export PATH=$PATH:$ANDROID_NDK_ROOT

You can also use this additional variables if you want to use `ccache` to speed up subsequnt builds:

export USE_CCACHE=1
export NDK_CCACHE=/usr/local/bin/ccache

**Note:** Path to `ccache` can be different on your system.

### Android device setup

Enable [Developer options on your Android device](https://developer.android.com/studio/debug/dev-options). Connect your device to your PC via USB cable and run:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# 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, that want what you have...
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...


## Download
Expand Down
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 26
versionCode 1
versionCode Integer.valueOf(System.env.UPSTREAM_BUILD_NUMBER ?: 1 )
versionName new File('app/jni/src/version.h').text.split("\"")[1]
if (buildAsApplication) {
applicationId "com.cleverraven.cataclysmdda"
Expand Down
17 changes: 14 additions & 3 deletions build-scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,20 @@ set -ex

function run_tests
{
$WINE "$@" -d yes -r cata --rng-seed time $EXTRA_TEST_OPTS
$WINE "$@" -d yes --rng-seed time $EXTRA_TEST_OPTS
}

export CCACHE_MAXSIZE=1G
if [ -n "$TEST_STAGE" ]
then
build-scripts/lint-json.sh
make -j 5 style-json
elif [ -n "$JUST_JSON" ]
then
exit 0
fi

ccache --zero-stats
if [ -n "$CMAKE" ]
then
bin_path="./"
Expand All @@ -34,11 +45,11 @@ then
[ -f "${bin_path}cata_test" ] && run_tests "${bin_path}cata_test"
[ -f "${bin_path}cata_test-tiles" ] && run_tests "${bin_path}cata_test-tiles"
else
make -j3 RELEASE=1 BACKTRACE=1 DEBUG_SYMBOLS=1 CROSS="$CROSS_COMPILATION"
make -j3 RELEASE=1 CCACHE=1 BACKTRACE=1 CROSS="$CROSS_COMPILATION" LINTJSON=0
run_tests ./tests/cata_test
if [ -n "$MODS" ]
then
run_tests ./tests/cata_test $MODS
fi
build-scripts/lint-json.sh
fi
ccache --show-stats
29 changes: 28 additions & 1 deletion build-scripts/requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@

set -e

function just_json
{
if [ -n $TRAVIS_COMMIT_RANGE ]
then
# If this string is populated, it will work.
files_changed="$(git diff --name-only $TRAVIS_COMMIT_RANGE)"
else
# The only time it isn't populated is on a new PR branch, where THIS will work.
files_changed="$(git diff --name-only $TRAVIS_BRANCH)"
fi
for filename in $files_changed
do
if [[ ! "$filename" =~ .json$ ]]
then
echo "$filename is not json, triggering full build."
return 1
fi
done
echo "Only json files present, skipping full build."
return 0
}

if just_json; then
export JUST_JSON=true
export CODE_COVERAGE=""
fi

if [ -n "${CODE_COVERAGE}" ]; then
travis_retry pip install --user pyyaml cpp-coveralls;
export CXXFLAGS=--coverage;
Expand Down Expand Up @@ -32,6 +59,6 @@ fi

if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update
brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer gettext ncurses
brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer gettext ncurses ccache
brew link --force gettext ncurses
fi
2 changes: 1 addition & 1 deletion build-scripts/validate_pr_in_jenkins
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ -z "$ghprbPullId" ]; then exit 0; fi
allowed_section_titles='Features|Content|Interface|Mods|Balance|Bugfixes|Performance|Infrastructure|Build|I18N'

echo 'Validating Summary line from pull request.'
echo "$ghprbPullLongDescription" | grep -Pi '(^|\\r\\n)\s*(`){0,3}SUMMARY: +((None)|(('"${allowed_section_titles}"') +\\?"(.*?)\\?"))(`){0,3}\s*(\\r\\n|$)'
echo "$ghprbPullLongDescription" | grep -Pi '(^|(\\r)?\\n)\s*`{0,3}SUMMARY: +(None|(('"${allowed_section_titles}"') +\\?".*?\\?"))`{0,3}\s*((\\r)?\\n|$)'
if [ $? -eq 0 ]; then
echo 'Summary looks good.'
exit 0
Expand Down
3 changes: 2 additions & 1 deletion data/help/texts.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@
"To craft items, press <press_craft>. There are seven categories: Weapons, Ammo, Food, Chemicals, Electronics, Armor, and Other. In each major category there are several smaller sub-categories. While a few items require no particular skill to create, the majority require you to have some knowledge. Sometimes a skilled survivor will work out a given recipe from her or his knowledge of the skill, but more often you will need reference material, commonly a book of some sort. Reading such references gives a chance to memorize recipes outright, and you can also craft while referring to the book: just have it handy when crafting. Different knowledge is useful for different applications:",
"-> Fabrication is the generic artisan skill, used for a wide variety of gear.\n-> Cooking, at low levels, is used for making tasty recipes; at higher levels, you have an understanding of chemistry and can make chemical weapons and beneficial elixirs.\n-> Tailoring is used to create basic clothing, and armor later on.\n-> Electronics lets you make a wide variety of tools with intricate uses.",
"In addition to the primary crafting skills, other skills may be necessary to create certain items. Traps, Marksmanship, and First Aid are all required for certain items.",
"Crafting an item with high difficulty may fail and possibly waste some materials. You should prepare spare material, just in case."
"Crafting an item with high difficulty may fail and possibly waste some materials. You should prepare spare material, just in case.",
"Crafting very large/heavy items or batches of items is best done at a workbench of some kind. You could use any ordinary table, or build your own out of metal to handle even heavier loads."
]
},
{
Expand Down
51 changes: 51 additions & 0 deletions data/json/construction.json
Original file line number Diff line number Diff line change
Expand Up @@ -1354,6 +1354,27 @@
"pre_special": "check_empty",
"post_terrain": "f_table"
},
{
"type": "construction",
"description": "Build Workbench",
"category": "FURN",
"required_skills": [ [ "fabrication", 3 ] ],
"time": 60,
"using": [ [ "welding_standard", 5 ] ],
"components": [ [ [ "pipe", 8 ] ], [ [ "sheet_metal", 2 ] ], [ [ "sheet_metal_small", 4 ] ] ],
"pre_special": "check_empty",
"post_terrain": "f_workbench"
},
{
"type": "construction",
"description": "Place Workbench",
"category": "FURN",
"required_skills": [ [ "fabrication", 0 ] ],
"time": 1,
"components": [ [ [ "workbench", 1 ] ] ],
"pre_special": "check_empty",
"post_terrain": "f_workbench"
},
{
"type": "construction",
"description": "Build Chair",
Expand Down Expand Up @@ -1852,6 +1873,30 @@
"pre_terrain": "t_water_moving_sh",
"post_terrain": "t_dock"
},
{
"type": "construction",
"description": "Place Water Mill",
"//": "Set up Water Mill",
"category": "CONSTRUCT",
"required_skills": [ [ "fabrication", 2 ] ],
"time": 40,
"qualities": [ [ { "id": "HAMMER", "level": 2 } ] ],
"components": [ [ [ "water_mill", 1 ] ] ],
"pre_terrain": "t_water_moving_sh",
"post_terrain": "f_water_mill"
},
{
"type": "construction",
"description": "Place Wind Mill",
"//": "Set up Wind Mill",
"category": "CONSTRUCT",
"required_skills": [ [ "fabrication", 2 ] ],
"time": 40,
"qualities": [ [ { "id": "DIG", "level": 1 } ] ],
"components": [ [ [ "wind_mill", 1 ] ] ],
"pre_terrain": "t_pit_shallow",
"post_terrain": "f_wind_mill"
},
{
"type": "construction",
"description": "Build Shallow Temporary Bridge",
Expand All @@ -1870,6 +1915,7 @@
"category": "OTHER",
"required_skills": [ [ "survival", 0 ] ],
"time": 6,
"byproducts": [ { "item": "straw_pile" } ],
"pre_terrain": "t_grass_long",
"post_terrain": "t_grass",
"tools": [ [ [ "scythe", -1 ], [ "sickle", -1 ] ] ]
Expand All @@ -1880,6 +1926,7 @@
"category": "OTHER",
"required_skills": [ [ "survival", 0 ] ],
"time": 6,
"byproducts": [ { "item": "straw_pile", "count": [ 1, 2 ] } ],
"pre_terrain": "t_grass_tall",
"post_terrain": "t_grass",
"tools": [ [ [ "scythe", -1 ], [ "sickle", -1 ] ] ]
Expand All @@ -1891,6 +1938,7 @@
"required_skills": [ [ "survival", 0 ] ],
"time": 6,
"qualities": [ [ { "id": "DIG", "level": 1 } ] ],
"byproducts": [ { "item": "straw_pile", "count": [ 0, 1 ] } ],
"pre_terrain": "t_grass",
"post_terrain": "t_dirt"
},
Expand All @@ -1901,6 +1949,7 @@
"required_skills": [ [ "survival", 0 ] ],
"time": 6,
"qualities": [ [ { "id": "DIG", "level": 1 } ] ],
"byproducts": [ { "item": "straw_pile" } ],
"pre_terrain": "t_grass_long",
"post_terrain": "t_dirt"
},
Expand All @@ -1911,6 +1960,7 @@
"required_skills": [ [ "survival", 0 ] ],
"time": 6,
"qualities": [ [ { "id": "DIG", "level": 1 } ] ],
"byproducts": [ { "item": "straw_pile", "count": [ 1, 2 ] } ],
"pre_terrain": "t_grass_tall",
"post_terrain": "t_dirt"
},
Expand All @@ -1921,6 +1971,7 @@
"required_skills": [ [ "survival", 0 ] ],
"time": 6,
"qualities": [ [ { "id": "DIG", "level": 1 } ] ],
"byproducts": [ { "item": "straw_pile", "count": [ 0, 1 ] } ],
"pre_terrain": "t_grass_dead",
"post_terrain": "t_dirt"
},
Expand Down
2 changes: 1 addition & 1 deletion data/json/dreams.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
},
{
"type": "dream",
"messages": [ "You have a strange dream about living in a cave.", "Your dreams give a strange reclusive feeling." ],
"messages": [ "You have a strange dream about living in a cave.", "Your dreams give you a strange reclusive feeling." ],
"category": "TROGLOBITE",
"strength": 1
},
Expand Down
8 changes: 8 additions & 0 deletions data/json/effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,14 @@
"name": [ "Avoiding a fire!" ],
"desc": [ "AI tag to enable NPCs to escape uncontrolled fires. This is a bug if you have it." ]
},
{
"type": "effect_type",
"id": "npc_player_still_looking",
"name": [ "Waiting for you to find something" ],
"desc": [
"AI tag to prevent NPCs from following the player while the player is finding an additonal copy of an item. This is a bug if you have it."
]
},
{
"type": "effect_type",
"id": "infection",
Expand Down

0 comments on commit 37a5092

Please sign in to comment.