Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Maleclypse committed Jan 1, 2022
2 parents 41863d0 + 68cfef5 commit d123238
Show file tree
Hide file tree
Showing 742 changed files with 1,671,975 additions and 353,144 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ jobs:
LTO: ${{ matrix.lto }}
RELEASE: ${{ matrix.release }}
ARCHIVE_SUCCESS: ${{ matrix.archive-success }}
SKIP: ${{ ( matrix.dont_skip_data_only_changes == 0 && needs.skip-duplicates.outputs.should_skip_code == 'true' ) || ( matrix.dont_skip_data_only_changes != 0 && needs.skip-duplicates-mods.outputs.should_skip_data == 'true' ) }}
SKIP: ${{ ( github.event.pull_request.draft == true && matrix.title != 'Basic Build and Test (GCC 9, Curses, LTO)' ) || ( matrix.dont_skip_data_only_changes == 0 && needs.skip-duplicates.outputs.should_skip_code == 'true' ) || ( matrix.dont_skip_data_only_changes != 0 && needs.skip-duplicates-mods.outputs.should_skip_data == 'true' ) }}
steps:
- name: checkout repository
if: ${{ env.SKIP == 'false' }}
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/msvc-full-features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
build_catatclysm:
name: Build
runs-on: windows-2019
if: github.event.pull_request.draft == false

steps:
- name: checkout repository
Expand All @@ -55,12 +56,12 @@ jobs:
uses: microsoft/[email protected]

- name: Restore artifacts, or run vcpkg, build and cache artifacts
uses: lukka/run-vcpkg@main
uses: lukka/run-vcpkg@v10
id: runvcpkg
with:
additionalCachedPaths: '${{ runner.workspace }}/Cataclysm-DDA/msvc-full-features/vcpkg_installed'
# run-vcpkg tries to hash vcpkg.json but complans if it finds more than one.
# That said, we also have our custom vcpkg_triplets to hash, so we keep everything the same.
appendedCacheKey: ${{ hashFiles( 'msvc-full-features/vcpkg.json', '.github/vcpkg_triplets/**' ) }}-x64
setupOnly: true
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
# We have to use at least this version of vcpkg to include fixes for yasm-tool's
# availability only as an x86 host tool. Keep it in sync with the builtin-baseline
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/object_creator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
build_object_creator:
name: Build
runs-on: windows-2019

steps:
- name: checkout repository
uses: actions/checkout@v2
Expand All @@ -55,12 +55,12 @@ jobs:
uses: microsoft/[email protected]

- name: Restore artifacts, or run vcpkg, build and cache artifacts
uses: lukka/run-vcpkg@main
uses: lukka/run-vcpkg@v10
id: runvcpkg
with:
additionalCachedPaths: '${{ runner.workspace }}/Cataclysm-DDA/msvc-full-features/vcpkg_installed;${{ runner.workspace }}/Cataclysm-DDA/msvc-object_creator/vcpkg_installed'
# run-vcpkg tries to hash vcpkg.json but complans if it finds more than one.
# That said, we also have our custom vcpkg_triplets to hash, so we keep everything the same.
appendedCacheKey: ${{ hashFiles( '$msvc-full-features/vcpkg.json', 'msvc-object_creator/vcpkg.json', '.github/vcpkg_triplets/**' ) }}-x64
setupOnly: true
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
# We have to use at least this version of vcpkg to include fixes for yasm-tool's
# availability only as an x86 host tool. Keep it in sync with the builtin-baseline
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/post-spell-check-result.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Post Spell Check Result


on:
workflow_run:
workflows: ["Text Changes Analyzer"]
types:
- completed


jobs:
post-spell-check-result:
runs-on: ubuntu-latest
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Download pr id artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.name }}
run_id: ${{ github.event.workflow_run.id }}
name: pull_request_id
- name: Download spell check retcode artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.name }}
run_id: ${{ github.event.workflow_run.id }}
name: spell_check_retcode
- name: set-spell-check-retcode
id: set-spell-check-retcode
run: echo "::set-output name=spell-check-retcode::$( cat spell_check_retcode )"
- name: Download spell check output artifact
if: steps.set-spell-check-retcode.outputs.spell-check-retcode >= 1
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.name }}
run_id: ${{ github.event.workflow_run.id }}
name: spell_check_output
- name: 'Comment on PR'
if: steps.set-spell-check-retcode.outputs.spell-check-retcode >= 1
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
var fs = require('fs');
var issue_number = Number(fs.readFileSync('./pull_request_id'));
var body = fs.readFileSync('./spell_check_output', 'utf8');
console.log("Fetching comments of pull request %d of repository %s/%s.", issue_number, context.repo.owner, context.repo.repo);
const comments = await github.paginate(github.rest.issues.listComments,
{
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number
}
);
comments.reverse();
const bot_comments = comments.filter(comment => comment.user.type === 'Bot' && comment.user.login === 'github-actions[bot]');
if (bot_comments.length > 0 && bot_comments[0].body === body) {
console.log("Comment already exists. Exiting.");
return;
}
console.log("Posting comment.");
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: body
});
2 changes: 1 addition & 1 deletion .github/workflows/test_labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
labels: ['${{ steps.setLabel.outputs.label }}']
})
- name: remove-label
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
if: ${{ github.event.workflow_run.conclusion == 'failure' && steps.set-basic-build-success.outputs.basic-build-success != 'true' }}
uses: actions/github-script@v5
with:
script: |
Expand Down
28 changes: 27 additions & 1 deletion .github/workflows/text-changes-analyzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- '.github/workflows/text-changes-analyzer.yml'
- 'tools/pot_diff.py'
- 'lang/extract_json_strings.py'
- 'lang/string_extractor/**'
- 'src/*.h'
- 'src/*.cpp'
- '**.json'
Expand All @@ -22,7 +23,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install python3-pip gettext
sudo pip3 install polib
sudo pip3 install polib pyspellchecker
- name: "Checkout test merge commit"
uses: actions/checkout@v2
- name: "Compute base commit and test merge commit"
Expand Down Expand Up @@ -52,3 +53,28 @@ jobs:
- name: "List text changes"
run: |
python3 ./tools/pot_diff.py ~/base.pot ~/merge.pot
- name: "Write text changes"
run: |
python3 ./tools/pot_diff.py ~/base.pot ~/merge.pot -j ~/pot_diff.json
- name: "Spell check on text changes"
run: |
python3 ./tools/spell_check_pr.py -i ~/pot_diff.json > spell_check_output
- name: "Get length of spell check output"
id: get_length
run: |
wc -c spell_check_output | grep -o '[0-9]*' > spell_check_retcode
echo "::set-output name=length::$(cat spell_check_retcode)"
- run: echo ${{ github.event.number }} > pull_request_id
- uses: actions/upload-artifact@v2
with:
name: pull_request_id
path: pull_request_id
- uses: actions/upload-artifact@v2
with:
name: spell_check_retcode
path: spell_check_retcode
- uses: actions/upload-artifact@v2
if: steps.get_length.outputs.length >= 1
with:
name: spell_check_output
path: spell_check_output
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ CataclysmWin.layout
cata_test
cata_test-tiles
cataclysm
cataclysm-tiles
*cataclysm-tiles
cataclysm-vcpkg
cataclysmdda-*
chkjson*
Expand Down
1 change: 0 additions & 1 deletion .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ minimum_perc = 0
source_file = lang/po/cataclysm-dda.pot
source_lang = en
type = PO

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ $(TEST_MO): data/mods/TEST_DATA/lang/po/ru.po

MO_DEPS := \
$(wildcard lang/*.sh lang/*.py src/*.cpp src/*.h) \
$(shell find data/{raw,json,mods,core,help} -type f -name '*.json')
$(shell find data/raw data/json data/mods data/core data/help -type f -name '*.json')

lang/mo_built.stamp: $(MO_DEPS)
$(MAKE) -C lang
Expand Down
1 change: 1 addition & 0 deletions SIGNOFF
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ Paul Bransford (draeath) <[email protected]>
Mark Langsdorf (mlangsdorf) <[email protected]> / <[email protected]>
Ratul Saha (sahaRatul) <[email protected]> / <[email protected]>
Davis Bray (Kaltag1925) <[email protected]>
Nicolas Appriou <[email protected]>
3 changes: 2 additions & 1 deletion build-scripts/get_all_mods.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def add_mods(mods):
for info in glob.glob('data/mods/*/modinfo.json'):
mod_info = json.load(open(info))
for e in mod_info:
if e["type"] == "MOD_INFO":
if(e["type"] == "MOD_INFO" and
("obsolete" not in e or not e["obsolete"])):
ident = e["id"]
all_mod_dependencies[ident] = e.get("dependencies", [])
if e["category"] == "total_conversion":
Expand Down
2 changes: 2 additions & 0 deletions data/help/texts.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@
"To wear a piece of clothing, press <press_wear>, then the appropriate letter. Armor reduces damage, and can help you resist things like smoke. To take off an item, press <press_take_off>, then the appropriate letter. Clothing and armor are worn in distinct layers, and provide different coverage, protection and warmth. Each piece has its own encumbrance, and wearing too much on any given layer can significantly hamper your movement and other abilities, especially during combat. You can view and sort worn items by pressing <press_sort_armor>.",
"Your clothing can sit in one of five layers on your body: next-to-skin, standard, waist, over, and belted. You can wear one item from each layer on a body part without incurring an encumbrance penalty for too many worn items. Any items beyond the first on each layer add the encumbrance of the additional article(s) of clothing to the body part's encumbrance. The layering penalty applies a minimum of 2 and a maximum of 10 encumbrance per article of clothing.",
"For example, on her torso, a character might wear a leather corset (next-to-skin), a leather touring suit (standard), a trenchcoat (over), and a survivor's runner pack (belted). Her encumbrance penalty is 0. If she put on a tank top it would conflict with the leather touring suit and add the minimum encumbrance penalty of 2.",
"Items can be damaged through various means, whether intentional or not. Indicators such as <color_yellow>|\\</color> show the item's current state. You may be able to repair the item using specific tools, which are listed in the item's information screen.",
"Items are also subject to degradation, which represents the item's structural integrity over its lifetime. Items that suffer serious damage can become more degraded, which limits how well the item can be repaired. The higher the degradation, the less you'll be able to repair it.",
"In the View Nearby Items menu (press <press_listitems> to open), you can filter or prioritize items. You can enter item names, or use various advanced filter strings: {<token>:<search param>}",
"Some available tokens:\n c = category (books, food, etc) | {c:books}\n m = material (cotton, Kevlar, etc) | {m:iron}"
]
Expand Down
2 changes: 1 addition & 1 deletion data/json/achievements.json
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@
"id": "achievement_lvl_10_tailor",
"type": "achievement",
"name": "Fashion Designer",
"description": "From catwalk to cataclysm.",
"description": "From catwalk to Cataclysm.",
"requirements": [ { "event_statistic": "num_gains_tailor_level_10", "is": ">=", "target": 1 } ],
"hidden_by": [ "achievement_lvl_7_tailor" ]
},
Expand Down
2 changes: 1 addition & 1 deletion data/json/artifact/artifact_item_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
{
"id": "art_crystal",
"type": "GENERIC",
"name": { "str": "transluscent crystal" },
"name": { "str": "translucent crystal" },
"description": "It is the only one of its kind.\nIt may have unknown powers; try activating them.",
"symbol": "A",
"volume": "500 ml",
Expand Down
1 change: 1 addition & 0 deletions data/json/artifact/legacy_artifact_active.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@
"max_damage": 5,
"min_aoe": 40,
"max_aoe": 40,
"damage_type": "pure",
"valid_targets": [ "hostile" ],
"flags": [ "RANDOM_DAMAGE", "IGNORE_WALLS", "NO_PROJECTILE" ],
"shape": "blast",
Expand Down
16 changes: 9 additions & 7 deletions data/json/bionics.json
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@
"encumbrance": [ [ "arm_r", 2 ] ],
"act_cost": "50 J",
"fake_weapon": "bio_blade_weapon",
"flags": [ "BIONIC_TOGGLED", "BIONIC_WEAPON", "BIONIC_NPC_USABLE", "USES_BIONIC_POWER" ]
"flags": [ "BIONIC_TOGGLED", "BIONIC_WEAPON", "BIONIC_NPC_USABLE" ]
},
{
"id": "bio_shotgun",
Expand Down Expand Up @@ -600,7 +600,7 @@
"occupied_bodyparts": [ [ "torso", 16 ], [ "arm_l", 4 ] ],
"act_cost": "100 kJ",
"fake_weapon": "bio_lightning",
"flags": [ "BIONIC_GUN", "BIONIC_NPC_USABLE" ]
"flags": [ "BIONIC_GUN", "BIONIC_NPC_USABLE", "USES_BIONIC_POWER" ]
},
{
"id": "bio_claws",
Expand Down Expand Up @@ -741,7 +741,8 @@
"flags": [ "BIONIC_TOGGLED", "IMMUNE_HEARING_DAMAGE" ],
"active_flags": [ "SUPER_HEARING" ],
"auto_deactivates": [ "bio_earplugs" ],
"included_bionics": [ "bio_earplugs" ]
"included_bionics": [ "bio_earplugs" ],
"activated_on_install": true
},
{
"id": "bio_emp",
Expand All @@ -759,7 +760,7 @@
"occupied_bodyparts": [ [ "arm_r", 8 ], [ "hand_r", 2 ] ],
"act_cost": "50 kJ",
"fake_weapon": "bio_emp_gun",
"flags": [ "BIONIC_GUN" ]
"flags": [ "BIONIC_GUN", "USES_BIONIC_POWER" ]
},
{
"id": "bio_ethanol",
Expand Down Expand Up @@ -1022,7 +1023,7 @@
"occupied_bodyparts": [ [ "hand_r", 1 ] ],
"act_cost": "30 kJ",
"fake_weapon": "bio_laser_gun",
"flags": [ "BIONIC_GUN", "BIONIC_NPC_USABLE" ]
"flags": [ "BIONIC_GUN", "BIONIC_NPC_USABLE", "USES_BIONIC_POWER" ]
},
{
"id": "bio_leaky",
Expand Down Expand Up @@ -1376,7 +1377,7 @@
"id": "bio_synaptic_regen",
"type": "bionic",
"name": { "str": "Synaptic Regeneration System" },
"description": "An electromagnetic stimulator has been surgically implanted on the back of your head and along your spine, continually draining power. As long as it's active, you won't become sleep deprived; and if you're sleep deprived already, it will boost the rate of recovery while you sleep.",
"description": "An electromagnetic stimulator has been surgically implanted on the back of your head and along your spine, continually draining power. As long as it's active, you will not suffer from sleep deprivation, although you may still feel sleepy; and if you're sleep deprived already, it will gradually reduce the symptoms of lacking sleep.",
"flags": [ "BIONIC_TOGGLED" ],
"active_flags": [ "STOP_SLEEP_DEPRIVATION" ],
"occupied_bodyparts": [ [ "head", 1 ], [ "torso", 1 ] ],
Expand Down Expand Up @@ -1534,7 +1535,8 @@
"occupied_bodyparts": [ [ "hand_l", 2 ], [ "hand_r", 2 ], [ "arm_l", 3 ], [ "arm_r", 3 ] ],
"toggled_pseudo_items": [ "toolset" ],
"included_bionics": [ "bio_tools_extend" ],
"flags": [ "BIONIC_TOGGLED", "BIONIC_NPC_USABLE", "USES_BIONIC_POWER" ]
"flags": [ "BIONIC_TOGGLED", "BIONIC_NPC_USABLE", "USES_BIONIC_POWER" ],
"activated_on_install": true
},
{
"id": "bio_tools_extend",
Expand Down
13 changes: 7 additions & 6 deletions data/json/body_parts.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
"hit_size": 1.5,
"hit_difficulty": 1.1,
"limb_type": "hand",
"limb_scores": [ [ "manip", 0.5, 1.0 ], [ "swim", 0.15 ] ],
"limb_scores": [ [ "grip", 0.5 ], [ "manip", 0.5, 1.0 ], [ "swim", 0.15 ] ],
"side": "left",
"legacy_id": "HAND_L",
"stylish_bonus": 0.5,
Expand Down Expand Up @@ -224,7 +224,7 @@
"hit_size": 1.5,
"hit_difficulty": 1.1,
"limb_type": "hand",
"limb_scores": [ [ "manip", 0.5, 1.0 ], [ "swim", 0.15 ] ],
"limb_scores": [ [ "grip", 0.5 ], [ "manip", 0.5, 1.0 ], [ "swim", 0.15 ] ],
"side": "right",
"legacy_id": "HAND_R",
"stylish_bonus": 0.5,
Expand Down Expand Up @@ -255,7 +255,7 @@
"hit_size": 13,
"hit_difficulty": 0.9,
"limb_type": "leg",
"limb_scores": [ [ "manip", 0.1, 0.2 ], [ "move_speed", 0.5 ], [ "swim", 0.15 ] ],
"limb_scores": [ [ "manip", 0.1, 0.2 ], [ "move_speed", 0.5 ], [ "swim", 0.15 ], [ "block", 1 ] ],
"encumb_impacts_dodge": true,
"side": "left",
"legacy_id": "LEG_L",
Expand Down Expand Up @@ -290,7 +290,7 @@
"hit_size": 13,
"hit_difficulty": 0.9,
"limb_type": "leg",
"limb_scores": [ [ "manip", 0.1, 0.2 ], [ "move_speed", 0.5 ], [ "swim", 0.15 ] ],
"limb_scores": [ [ "manip", 0.1, 0.2 ], [ "move_speed", 0.5 ], [ "swim", 0.15 ], [ "block", 1 ] ],
"encumb_impacts_dodge": true,
"side": "right",
"legacy_id": "LEG_R",
Expand Down Expand Up @@ -380,13 +380,14 @@
"main_part": "debug_tail",
"hit_difficulty": 0.8,
"limb_type": "tail",
"limb_scores": [ [ "manip", 0.5, 1.0 ], [ "balance", 1.0 ], [ "swim", 0.15 ] ],
"limb_scores": [ [ "manip", 0.5, 1.0 ], [ "balance", 1.0 ], [ "swim", 0.15 ], [ "lift", 2 ], [ "block", 5 ] ],
"opposite_part": "debug_tail",
"side": "both",
"connected_to": "torso",
"accusative": { "ctxt": "bodypart_accusative", "str": "debug tail" },
"hp_bar_ui_text": "DBG TAIL",
"base_hp": 20
"base_hp": 20,
"flags": [ "ALWAYS_BLOCK", "NONSTANDARD_BLOCK" ]
},
{
"id": "sub_limb_debug",
Expand Down
7 changes: 7 additions & 0 deletions data/json/character_modifiers.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@
"mod_type": "x",
"value": { "limb_score": "footing", "max": "max_move_cost", "nominator": 1.0 }
},
{
"type": "character_mod",
"id": "limb_str_mod",
"description": "Strength modifier",
"mod_type": "x",
"value": { "limb_score": "lift" }
},
{
"type": "character_mod",
"id": "limb_run_cost_mod",
Expand Down
Loading

0 comments on commit d123238

Please sign in to comment.