Skip to content

Commit

Permalink
Merge pull request #1 from CleverRaven/master
Browse files Browse the repository at this point in the history
Sync
  • Loading branch information
eilaattwood authored Apr 26, 2019
2 parents 6b8c6f2 + de41139 commit 7b00a08
Show file tree
Hide file tree
Showing 13 changed files with 285 additions and 139 deletions.
24 changes: 1 addition & 23 deletions build-scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,12 @@ function run_tests
$WINE "$@" -d yes -r cata --rng-seed time $EXTRA_TEST_OPTS
}

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
}

export CCACHE_MAXSIZE=1G
if [ -n "$TEST_STAGE" ]
then
build-scripts/lint-json.sh
make -j 5 style-json
elif just_json
elif [ -n "$JUST_JSON" ]
then
exit 0
fi
Expand Down
27 changes: 27 additions & 0 deletions 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
6 changes: 3 additions & 3 deletions data/json/harvest.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
"type": "harvest",
"entries": [
{ "drop": "meat_scrap", "type": "flesh", "mass_ratio": 0.4 },
{ "drop": "feather", "type": "skin", "mass_ratio": 0.05 }
{ "drop": "feather", "type": "skin", "mass_ratio": 0.01 }
]
},
{
Expand All @@ -262,7 +262,7 @@
{ "drop": "meat", "type": "flesh", "mass_ratio": 0.3 },
{ "drop": "meat_scrap", "type": "flesh", "mass_ratio": 0.05 },
{ "drop": "liver", "type": "offal", "mass_ratio": 0.01 },
{ "drop": "feather", "type": "skin", "mass_ratio": 0.05 }
{ "drop": "feather", "type": "skin", "mass_ratio": 0.01 }
]
},
{
Expand All @@ -272,7 +272,7 @@
{ "drop": "meat", "type": "flesh", "mass_ratio": 0.3 },
{ "drop": "meat_scrap", "type": "flesh", "mass_ratio": 0.03 },
{ "drop": "fat", "type": "flesh", "mass_ratio": 0.18 },
{ "drop": "feather", "type": "skin", "mass_ratio": 0.03 },
{ "drop": "feather", "type": "skin", "mass_ratio": 0.02 },
{ "drop": "bone", "type": "bone", "mass_ratio": 0.1 }
]
},
Expand Down
16 changes: 16 additions & 0 deletions data/json/itemgroups/books.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@
[ "recipe_bullets", 80 ]
]
},
{
"id": "boxing_books",
"type": "item_group",
"items": [
[ "mag_unarmed", 40 ],
[ "manual_boxing", 50 ],
[ "mag_melee", 25 ],
[ "mag_bashing", 10 ],
[ "manual_melee", 15 ],
[ "recipe_melee", 10 ],
[ "manual_taekwondo", 10 ],
[ "manual_karate", 10 ],
[ "manual_muay_thai", 2 ],
[ "manual_krav_maga", 10 ]
]
},
{
"type": "item_group",
"id": "book_martial",
Expand Down
22 changes: 22 additions & 0 deletions data/json/itemgroups/clothing.json
Original file line number Diff line number Diff line change
Expand Up @@ -363,5 +363,27 @@
"type": "item_group",
"//": "Full face protection worn with hazmat suits",
"items": [ { "collection": [ { "item": "glasses_safety" }, { "item": "mask_filter" } ], "prob": 40 }, [ "mask_gas", 60 ] ]
},
{
"id": "boxing_clothes",
"type": "item_group",
"items": [
[ "tank_top", 40 ],
[ "shorts", 40 ],
[ "boxing_gloves", 50 ],
[ "headgear", 50 ],
[ "mouthpiece", 50 ],
[ "jersey", 40 ],
[ "coat_rain", 15 ],
[ "hood_rain", 15 ],
[ "gloves_wraps", 45 ],
[ "jeans", 30 ],
[ "sports_bra", 25 ],
[ "jacket_leather", 20 ],
[ "aspirin", 30 ],
[ "water_clean", 30 ],
[ "sports_drink", 30 ],
[ "1st_aid", 20 ]
]
}
]
15 changes: 15 additions & 0 deletions data/json/itemgroups/locations.json
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,21 @@
"type": "item_group",
"items": [ [ "bowling_ball", 100 ] ]
},
{
"id": "boxing_misc",
"type": "item_group",
"items": [
[ "aspirin", 50 ],
[ "1st_aid", 40 ],
[ "bandages", 30 ],
[ "duct_tape", 20 ],
[ "sewing_kit", 10 ],
[ "mouthpiece", 10 ],
[ "cigar", 20 ],
[ "cig", 15 ],
[ "matches", 10 ]
]
},
{
"type": "item_group",
"id": "bikeshop_tools",
Expand Down
Loading

0 comments on commit 7b00a08

Please sign in to comment.