Skip to content

Commit

Permalink
Merge branch 'CleverRaven:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
SuddenEyePuncture committed Jul 21, 2021
2 parents 548860b + d0fb1f3 commit 17d3241
Show file tree
Hide file tree
Showing 24 changed files with 114 additions and 56 deletions.
1 change: 1 addition & 0 deletions .github/workflows/CBA.yml
Expand Up @@ -21,6 +21,7 @@ jobs:
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
concurrent_skipping: 'outdated_runs'
paths: '[ "**.cpp", "**.h", "**.c", "**/CMakeLists.txt", "**/Makefile", "**.hpp", "**.cmake", ".github/workflows/CBA.yml" ]'

build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/astyle.yml
Expand Up @@ -14,6 +14,7 @@ jobs:
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
concurrent_skipping: 'outdated_runs'
paths: '["**.cpp", "**.h", "**.c"]'
astyle-code:
name: astyle check
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/basic-build.yml
Expand Up @@ -20,6 +20,7 @@ jobs:
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
concurrent_skipping: 'outdated_runs'
paths_ignore: '["android/**", "build-data/osx/**", "doc/**", "doxygen_doc/**", "lgtm/**", "msvc-**", "object_creator/**", "tools/**", "utilities/**"]'
basic-build:
needs: skip-duplicates
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/clang-tidy.yml
Expand Up @@ -21,6 +21,7 @@ jobs:
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
concurrent_skipping: 'outdated_runs'
paths: '[ "**.cpp", "**.h", "**.c", "**/CMakeLists.txt", "**/Makefile", "**.hpp", "**.cmake" ]'
build:
needs: skip-duplicates
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/json.yml
Expand Up @@ -14,6 +14,7 @@ jobs:
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
concurrent_skipping: 'outdated_runs'
paths: '["**.json"]'
style-json:
name: JSON style check
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/matrix.yml
Expand Up @@ -40,6 +40,7 @@ jobs:
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
concurrent_skipping: 'outdated_runs'
paths_ignore: '["android/**", "build-data/osx/**", "doc/**", "doxygen_doc/**", "lgtm/**", "msvc-**", "object_creator/**", "tools/**", "utilities/**", "data/**"]'
skip-duplicates-mods:
continue-on-error: true
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -1206,7 +1206,7 @@ endif
style-json: json_blacklist $(JSON_FORMATTER_BIN)
ifndef CROSS
find data gfx -name "*.json" -print0 | grep -v -z -F -f json_blacklist | \
xargs -0 -L 1 $(JSON_FORMATTER_BIN)
xargs -P 0 -0 -L 1 $(JSON_FORMATTER_BIN)
else
@echo Cannot run json formatter in cross compiles.
endif
Expand Down
12 changes: 6 additions & 6 deletions data/json/effects.json
Expand Up @@ -673,14 +673,14 @@
{
"type": "effect_type",
"id": "nausea",
"name": [ "Nausea" ],
"desc": [ "You feel nauseated. Even a thought of food makes you feel sick." ],
"remove_message": "You no longer feel nauseated.",
"name": [ "Slightly Nauseous", "Mildly Nauseous", "Nauseous", "Very Nauseous", "Extremely Nauseous" ],
"desc": [ "You are nauseous and may lead to vomiting." ],
"remove_message": "You no longer feel nauseous.",
"rating": "bad",
"int_dur_factor": "5 m",
"max_intensity": 3,
"int_dur_factor": "3 m",
"max_intensity": 5,
"max_duration": "15 m",
"base_mods": { "vomit_chance": [ 60 ] }
"base_mods": { "vomit_chance": [ 500 ] }
},
{
"type": "effect_type",
Expand Down
5 changes: 5 additions & 0 deletions data/json/flags.json
Expand Up @@ -257,6 +257,11 @@
"context": [ "COMESTIBLE" ],
"type": "json_flag"
},
{
"id": "CORROSIVE",
"context": [ "COMESTIBLE" ],
"type": "json_flag"
},
{
"id": "ONLY_ONE",
"type": "json_flag",
Expand Down
3 changes: 3 additions & 0 deletions data/json/items/chemicals_and_resources.json
Expand Up @@ -226,6 +226,7 @@
"weight": "138 g",
"color": "white",
"use_action": [ "BLECH" ],
"flags": [ "CORROSIVE" ],
"container": "jug_plastic",
"sealed": false,
"comestible_type": "DRINK",
Expand All @@ -251,6 +252,7 @@
"weight": "124 g",
"color": "white",
"use_action": [ "BLECH" ],
"flags": [ "CORROSIVE" ],
"container": "jug_plastic",
"sealed": false,
"comestible_type": "DRINK",
Expand Down Expand Up @@ -350,6 +352,7 @@
"color": "pink",
"looks_like": "fungicide",
"use_action": [ "BLECH" ],
"flags": [ "CORROSIVE" ],
"stim": -7,
"container": "bag_plastic",
"comestible_type": "FOOD",
Expand Down
1 change: 1 addition & 0 deletions data/json/items/comestibles/drink_other.json
Expand Up @@ -178,6 +178,7 @@
"charges": 16,
"phase": "liquid",
"fun": -25,
"use_action": [ "BLECH" ],
"flags": [ "NUTRIENT_OVERRIDE" ],
"vitamins": [ ],
"freezing_point": -26
Expand Down
1 change: 1 addition & 0 deletions data/json/items/comestibles/raw_veggy.json
Expand Up @@ -407,6 +407,7 @@
"description": "A stalk of dogbane. It has very fibrous stems and is mildly poisonous.",
"comestible_type": "FOOD",
"use_action": [ "BLECH" ],
"flags": [ "CORROSIVE" ],
"calories": 9,
"fun": -15,
"healthy": -2,
Expand Down
63 changes: 59 additions & 4 deletions data/json/recipes/other/cords_and_ropes.json
Expand Up @@ -124,30 +124,85 @@
"proficiencies": [ { "proficiency": "prof_fibers", "fail_multiplier": 1.5 }, { "proficiency": "prof_fibers_rope" } ],
"components": [ [ [ "filament", 10800, "LIST" ] ] ]
},
{
"type": "recipe",
"activity_level": "fake",
"result": "cordage_6",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_MATERIALS",
"skill_used": "tailor",
"time": "5 m",
"reversible": true,
"autolearn": true,
"components": [ [ [ "withered", 1 ], [ "straw_pile", 1 ], [ "tanbark", 1 ], [ "willowbark", 1 ] ] ],
"proficiencies": [ { "proficiency": "prof_fibers" } ]
},
{
"type": "recipe",
"activity_level": "fake",
"result": "cordage_36",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_MATERIALS",
"skill_used": "tailor",
"time": "30 m",
"reversible": true,
"autolearn": true,
"components": [ [ [ "withered", 6 ], [ "straw_pile", 6 ], [ "tanbark", 6 ], [ "willowbark", 6 ] ] ],
"proficiencies": [ { "proficiency": "prof_fibers" } ]
},
{
"type": "recipe",
"activity_level": "fake",
"result": "cordage_36",
"id_suffix": "from_cordage_6",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_MATERIALS",
"skill_used": "tailor",
"time": "2 m",
"reversible": true,
"autolearn": true,
"components": [ [ [ "cordage_6", 6 ] ] ],
"proficiencies": [ { "proficiency": "prof_fibers" } ]
},
{
"type": "recipe",
"activity_level": "fake",
"result": "rope_makeshift_6",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_MATERIALS",
"skill_used": "survival",
"time": "1 h",
"time": "30 m",
"reversible": true,
"autolearn": true,
"proficiencies": [ { "proficiency": "prof_fibers" }, { "proficiency": "prof_fibers_rope" } ],
"components": [ [ [ "cordage_36", 6 ], [ "plant_cordage", 36, "LIST" ] ] ]
"components": [ [ [ "cordage_36", 6 ], [ "cordage_6", 36 ] ] ]
},
{
"type": "recipe",
"activity_level": "fake",
"result": "rope_makeshift_30",
"id_suffix": "from_cordage",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_MATERIALS",
"skill_used": "survival",
"time": "2 h",
"time": "2h 30 m",
"reversible": true,
"autolearn": true,
"proficiencies": [ { "proficiency": "prof_fibers" }, { "proficiency": "prof_fibers_rope" } ],
"components": [ [ [ "cordage_6", 150 ], [ "cordage_36", 30 ] ] ]
},
{
"type": "recipe",
"activity_level": "fake",
"result": "rope_makeshift_30",
"id_suffix": "from_rope_makeshift_6",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_MATERIALS",
"skill_used": "survival",
"time": "10 m",
"reversible": true,
"autolearn": true,
"proficiencies": [ { "proficiency": "prof_fibers" }, { "proficiency": "prof_fibers_rope" } ],
"components": [ [ [ "rope_makeshift_6", 5 ], [ "cordage_36", 30 ], [ "plant_cordage", 180, "LIST" ] ] ]
"components": [ [ [ "rope_makeshift_6", 5 ] ] ]
}
]
26 changes: 0 additions & 26 deletions data/json/recipes/other/materials.json
Expand Up @@ -186,32 +186,6 @@
"tools": [ [ [ "surface_heat", 5, "LIST" ] ] ],
"components": [ [ [ "splinter", 5 ], [ "2x4", 1 ], [ "stick", 1 ] ] ]
},
{
"type": "recipe",
"activity_level": "fake",
"result": "cordage_6",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_MATERIALS",
"skill_used": "tailor",
"time": "5 m",
"reversible": true,
"autolearn": true,
"components": [ [ [ "withered", 1 ], [ "straw_pile", 1 ], [ "tanbark", 1 ], [ "willowbark", 1 ] ] ],
"proficiencies": [ { "proficiency": "prof_fibers" } ]
},
{
"type": "recipe",
"activity_level": "fake",
"result": "cordage_36",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_MATERIALS",
"skill_used": "tailor",
"time": "5 m",
"reversible": true,
"autolearn": true,
"components": [ [ [ "cordage_6", 6 ], [ "withered", 6 ], [ "straw_pile", 6 ], [ "tanbark", 6 ], [ "willowbark", 6 ] ] ],
"proficiencies": [ { "proficiency": "prof_fibers" } ]
},
{
"type": "recipe",
"activity_level": "fake",
Expand Down
14 changes: 8 additions & 6 deletions data/mods/Aftershock/items/comestibles/alienfood.json
Expand Up @@ -3,7 +3,7 @@
"id": "yum_lichen",
"type": "COMESTIBLE",
"name": { "str": "clump of lichen", "str_pl": "clumps of lichen" },
"weight": "10 g",
"weight": "120 g",
"color": "red",
"use_action": [ "BLECH" ],
"comestible_type": "FOOD",
Expand All @@ -13,16 +13,17 @@
"quench": 15,
"description": "A clump of moist squishy lichen. You get the impression that it might not be the safest thing to eat considering how it makes your hand tingle.",
"price": "20 cent",
"volume": "5 ml",
"volume": "80 ml",
"charges": 3,
"fun": -8,
"vitamins": [ [ "calcium", 5 ], [ "iron", 12 ], [ "vitA", 20 ], [ "vitC", 56 ], [ "mutant_toxin", 25 ] ]
"vitamins": [ [ "calcium", 5 ], [ "iron", 12 ], [ "vitA", 20 ], [ "vitC", 56 ], [ "mutant_toxin", 25 ] ],
"flags": [ "RAW" ]
},
{
"id": "yum_lichen_extra",
"type": "COMESTIBLE",
"name": { "str": "clump of processed lichen", "str_pl": "clumps of processed lichen" },
"weight": "10 g",
"weight": "115 g",
"color": "red",
"comestible_type": "FOOD",
"symbol": "%",
Expand All @@ -31,10 +32,11 @@
"quench": 10,
"description": "A clump of squishy lichen, while it isn't as wet as it used to be, your hands no longer tingle holding it.",
"price": "20 cent",
"volume": "5 ml",
"volume": "75 ml",
"charges": 3,
"fun": -3,
"vitamins": [ [ "calcium", 5 ], [ "iron", 12 ], [ "vitA", 20 ], [ "vitC", 56 ], [ "mutant_toxin", 25 ] ]
"vitamins": [ [ "calcium", 5 ], [ "iron", 12 ], [ "vitA", 20 ], [ "vitC", 56 ] ],
"flags": [ "NUTRIENT_OVERRIDE" ]
},
{
"id": "frost_human_flesh",
Expand Down
1 change: 1 addition & 0 deletions doc/EFFECTS_JSON.md
Expand Up @@ -483,6 +483,7 @@ Valid arguments:
"cough_chance_bot"
"cough_tick" - Defaults to every tick

// It is important to not vomit_chance interacts with vomit_multiplier in mutations, and as such is hardcoded. Base vomit chance is intensity/(base vomit chance + scaling vomit chance).
"vomit_chance" - Chance to cause vomiting
"vomit_chance_bot"
"vomit_tick" - Defaults to every tick
Expand Down
1 change: 1 addition & 0 deletions doc/JSON_FLAGS.md
Expand Up @@ -474,6 +474,7 @@ Some armor flags, such as `WATCH` and `ALARMCLOCK` are compatible with other ite
- ```ACID``` when consumed using the BLECH function, penalties are reduced if acidproof.
- ```CARNIVORE_OK``` Can be eaten by characters with the Carnivore mutation.
- ```CANT_HEAL_EVERYONE``` This med can't be used by everyone, it require a special mutation. See `can_heal_with` in mutation.
- ```CORROSIVE``` when consumed using the BLECH function, causes the same penalties as ACID but is not affected by acidproof.
- ```EATEN_COLD``` Morale bonus for eating cold.
- ```EATEN_HOT``` Morale bonus for eating hot.
- ```EDIBLE_FROZEN``` Being frozen doesn't prevent eating it. No morale bonus.
Expand Down
6 changes: 3 additions & 3 deletions doc/JSON_STYLE.md
Expand Up @@ -49,13 +49,13 @@ The formatting tool can be found alongside the releases as `json_formatter.exe`
Using `make style-json` will format all files included in the JSON validation test, alternatively:
```sh
# Using git to filter JSON files with uncommitted changes (provided there are no spaces in the file or directory names).
git diff --name-only '*.json' | xargs -L 1 json_formatter
git diff --name-only '*.json' | xargs -P 0 -L 1 json_formatter

# Using git to filter modified JSON files in the current branch.
git diff master --name-only '*.json' | xargs -L 1 json_formatter
git diff master --name-only '*.json' | xargs -P 0 -L 1 json_formatter

# Per-folder formatting.
find path/to/desired/folder -name "*.json" -print0 | xargs -0 -L 1 json_formatter
find path/to/desired/folder -name "*.json" -print0 | xargs -P 0 -0 -L 1 json_formatter
```
---
If you're using the Visual Studio solution, you can configure Visual Studio with
Expand Down
13 changes: 8 additions & 5 deletions src/character.cpp
Expand Up @@ -2904,6 +2904,9 @@ item *Character::try_add( item it, const item *avoid, const bool allow_wield )
} else {
// this will set ret to either it, or to stack where it was placed
pocket.second->add( it, &ret );
if( !keep_invlet && ( !it.count_by_charges() || it.charges == ret->charges ) ) {
inv->update_invlet( *ret );
}
pocket.first.on_contents_changed();
pocket.second->on_contents_changed();
}
Expand Down Expand Up @@ -3314,10 +3317,10 @@ invlets_bitset Character::allocated_invlets() const
{
invlets_bitset invlets = inv->allocated_invlets();

invlets.set( weapon.invlet );
for( const auto &w : worn ) {
invlets.set( w.invlet );
}
visit_items( [&invlets] ( item * i, item * ) -> VisitResponse {
invlets.set( i->invlet );
return VisitResponse::NEXT;
} );

invlets[0] = false;

Expand Down Expand Up @@ -12443,7 +12446,7 @@ double Character::vomit_mod()
// If you're already nauseous, any food in your stomach greatly
// increases chance of vomiting. Liquids don't provoke vomiting, though.
if( stomach.contains() != 0_ml && has_effect( effect_nausea ) ) {
mod *= 5 * get_effect_int( effect_nausea );
mod *= get_effect_int( effect_nausea );
}
return mod;
}
Expand Down
2 changes: 1 addition & 1 deletion src/character.h
Expand Up @@ -2753,7 +2753,7 @@ class Character : public Creature, public visitable
@param minimum_error Maximum error when skill is >= threshold */
time_duration estimate_effect_dur( const skill_id &relevant_skill, const efftype_id &effect,
const time_duration &error_magnitude,
const time_duration &mimimum_error, int threshold, const Creature &target ) const;
const time_duration &minimum_error, int threshold, const Creature &target ) const;

// inherited from visitable
bool has_quality( const quality_id &qual, int level = 1, int qty = 1 ) const override;
Expand Down
1 change: 1 addition & 0 deletions src/flag.cpp
Expand Up @@ -62,6 +62,7 @@ const flag_id flag_COLLAR( "COLLAR" );
const flag_id flag_CONDUCTIVE( "CONDUCTIVE" );
const flag_id flag_CONSUMABLE( "CONSUMABLE" );
const flag_id flag_COOKED( "COOKED" );
const flag_id flag_CORROSIVE( "CORROSIVE" );
const flag_id flag_CORPSE( "CORPSE" );
const flag_id flag_CUSTOM_EXPLOSION( "CUSTOM_EXPLOSION" );
const flag_id flag_CUT_IMMUNE( "CUT_IMMUNE" );
Expand Down
1 change: 1 addition & 0 deletions src/flag.h
Expand Up @@ -69,6 +69,7 @@ extern const flag_id flag_COLLAR;
extern const flag_id flag_CONDUCTIVE;
extern const flag_id flag_CONSUMABLE;
extern const flag_id flag_COOKED;
extern const flag_id flag_CORROSIVE;
extern const flag_id flag_CORPSE;
extern const flag_id flag_CUSTOM_EXPLOSION;
extern const flag_id flag_CUT_IMMUNE;
Expand Down

0 comments on commit 17d3241

Please sign in to comment.