From cfb95383e2f1f9218533b15a079ff2c96d9c6394 Mon Sep 17 00:00:00 2001 From: marilynias Date: Tue, 21 Jan 2025 14:17:52 +0100 Subject: [PATCH 1/5] fix practice recipes giving progress item --- data/json/recipes/practice/melee.json | 160 +++++++++++++------------- 1 file changed, 80 insertions(+), 80 deletions(-) diff --git a/data/json/recipes/practice/melee.json b/data/json/recipes/practice/melee.json index fd5b6b4d3d2f6..066cbbe7ff9d7 100644 --- a/data/json/recipes/practice/melee.json +++ b/data/json/recipes/practice/melee.json @@ -303,8 +303,8 @@ "id": "prac_cutting_beg_long_sword", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "long swords (beginner)", "description": "Drill the fundamentals of using a longsword.", "skill_used": "cutting", @@ -320,8 +320,8 @@ "id": "prac_cutting_int_long_sword", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "long swords (intermediate)", "description": "Hone your skills with a longsword against a dummy.", "skill_used": "cutting", @@ -342,8 +342,8 @@ "id": "prac_cutting_beg_great_sword", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "great swords (beginner)", "description": "Practice swinging your great sword against an imaginary opponent.", "skill_used": "cutting", @@ -359,8 +359,8 @@ "id": "prac_cutting_int_great_sword", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "great swords (intermediate)", "description": "Practice using your sword's momentum to your advantage against a dummy.", "skill_used": "cutting", @@ -381,8 +381,8 @@ "id": "prac_cutting_beg_bionic_sword", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "bionic swords (beginner)", "description": "Get a feel for the weight, balance, and length of your bionic sword.", "skill_used": "cutting", @@ -397,8 +397,8 @@ "id": "prac_cutting_int_bionic_sword", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "bionic swords (intermediate)", "description": "Practice fighting with your bionic sword against a dummy.", "skill_used": "cutting", @@ -418,8 +418,8 @@ "id": "prac_cutting_beg_great_axe", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "great axes (beginner)", "description": "Drill keeping the proper form while swinging a heavy axe.", "skill_used": "cutting", @@ -434,8 +434,8 @@ "id": "prac_cutting_int_great_axe", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "great axes (intermediate)", "description": "Engage in advanced exercises and drills using a heavy axe.", "skill_used": "cutting", @@ -454,8 +454,8 @@ "id": "prac_cutting_beg_hand_axe", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "hand axes (beginner)", "description": "Practice your chopping motions against an imaginary assailant.", "skill_used": "cutting", @@ -470,8 +470,8 @@ "id": "prac_cutting_int_hand_axe", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "hand axes (intermediate)", "description": "Practice advanced methods of using a hand axe in combat, such as pommel strikes and backswings.", "skill_used": "cutting", @@ -489,8 +489,8 @@ "id": "prac_bashing_beg_great_hammer", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "great hammers (beginner)", "description": "Work on handling the weight of your great hammer while swinging it.", "skill_used": "bashing", @@ -505,8 +505,8 @@ "id": "prac_bashing_int_great_hammer", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "great hammers (intermediate)", "description": "Practice your strikes with a great hammer, crushing the dummy without throwing yourself off balance.", "skill_used": "bashing", @@ -561,8 +561,8 @@ "id": "prac_bashing_beg_mace", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "maces (beginner)", "description": "Work at swinging a mace around and making it land where you want.", "skill_used": "bashing", @@ -577,8 +577,8 @@ "id": "prac_bashing_int_mace", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "maces (intermediate)", "description": "Practice advanced skull splitting techniques.", "skill_used": "bashing", @@ -597,8 +597,8 @@ "id": "prac_stabbing_beg_spear", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "spears (beginner)", "description": "Practice the basics of spears, the most popular melee weapon throughout history. Learn the footwork, how to thrust with power, where to place your hands, and the right way to hold the damn thing. Dominant hand back, non-dominant forward!", "skill_used": "stabbing", @@ -615,8 +615,8 @@ "id": "prac_stabbing_int_spear", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "spears (intermediate)", "description": "Practice advanced spear moves and accurate thrusts against a training dummy. It's not glamorous, but spears were the workhorses of armed combat for millennia with good reason.", "skill_used": "stabbing", @@ -635,8 +635,8 @@ "id": "prac_stabbing_beg_thrust", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "long thrusting swords (beginner)", "description": "Practice switching between different ways of gripping your sword.", "skill_used": "stabbing", @@ -651,8 +651,8 @@ "id": "prac_stabbing_int_thrust", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "long thrusting swords (intermediate)", "description": "Drill yourself in using your sword as a thrusting weapon against a dummy.", "skill_used": "stabbing", @@ -673,8 +673,8 @@ "id": "prac_bashing_beg_rifle", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "rifle CQC (beginner)", "description": "Practice striking with your long gun.", "skill_used": "bashing", @@ -689,8 +689,8 @@ "id": "prac_bashing_int_rifle", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "rifle CQC (intermediate)", "description": "Practice your muzzle thump and buttstroke against a dummy.", "skill_used": "bashing", @@ -709,8 +709,8 @@ "id": "prac_bashing_beg_pistol", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "pistol CQC (beginner)", "description": "Practice safely swinging your pistol around like a club.", "skill_used": "bashing", @@ -725,8 +725,8 @@ "id": "prac_bashing_int_pistol", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "pistol CQC (intermediate)", "description": "Pistol whip a dummy repeatedly until you've got it down.", "skill_used": "bashing", @@ -745,8 +745,8 @@ "id": "prac_stabbing_beg_knife", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "knives (beginner)", "description": "Practice the brutal art of shanking the shit out of something until it dies. Learn the form, where and how to stab to avoid your knife glancing off bone, and whether you should actually hold the knife in reverse grip. (It depends.)", "skill_used": "stabbing", @@ -763,8 +763,8 @@ "id": "prac_stabbing_int_knife", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "knives (intermediate)", "description": "Get in touch with your inner commando and practice some advanced knife-fighting techniques on a training dummy.", "skill_used": "stabbing", @@ -783,8 +783,8 @@ "id": "prac_stabbing_beg_shiv", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "shivs (beginner)", "description": "You wouldn't think it, but there is more to stabbing someone with something small and pointy. Practice shanking an imaginary enemy where it hurts most.", "skill_used": "stabbing", @@ -800,8 +800,8 @@ "id": "prac_stabbing_int_shiv", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "shivs (intermediate)", "description": "Practice shanking the ever living hell out of a dummy to hone your accuracy and grip while you gut someone.", "skill_used": "stabbing", @@ -820,8 +820,8 @@ "id": "prac_bashing_beg_baton", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "batons (beginner)", "description": "Practice the basics of using a baton or small club in combat.", "skill_used": "bashing", @@ -837,8 +837,8 @@ "id": "prac_bashing_int_baton", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "batons (intermediate)", "description": "Train your backswing, overhead strike, and up strike against a dummy.", "skill_used": "bashing", @@ -857,8 +857,8 @@ "id": "prac_cutting_beg_med_sword", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "medium swords (beginner)", "description": "Footwork is key, practice dancing around an imaginary opponent with your sword.", "skill_used": "cutting", @@ -874,8 +874,8 @@ "id": "prac_cutting_int_med_sword", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "medium swords (intermediate)", "description": "Perform solo drills to practice advanced techniques, such as feints and moulinet cuts.", "skill_used": "cutting", @@ -896,8 +896,8 @@ "id": "prac_cutting_beg_short_sword", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "short swords (beginner)", "description": "Practice putting your weight behind your strike, cutting through an imaginary enemy.", "skill_used": "cutting", @@ -913,8 +913,8 @@ "id": "prac_cutting_int_short_sword", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "short swords (intermediate)", "description": "Practice drills in delivering quick and precise strikes against a dummy.", "skill_used": "cutting", @@ -935,8 +935,8 @@ "id": "prac_bashing_beg_staff", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "quarterstaves (beginner)", "description": "Practice swinging your staff, getting used to the balance and weight.", "skill_used": "bashing", @@ -952,8 +952,8 @@ "id": "prac_bashing_int_staff", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "quarterstaves (intermediate)", "description": "Practice using your staff against a dummy, familiarizing yourself with its length.", "skill_used": "bashing", @@ -972,8 +972,8 @@ "id": "prac_stabbing_beg_fencing", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "fencing (beginner)", "description": "Practice the basics of the noble art of fencing. Learn how to angle your body, aim your lunges, and parry pretend swords. Not that the undead are using swords. Hopefully.", "skill_used": "stabbing", @@ -990,8 +990,8 @@ "id": "prac_stabbing_int_fencing", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "fencing (intermediate)", "description": "Further develop your footwork and timing by fighting against a dummy. En garde!", "skill_used": "stabbing", @@ -1080,8 +1080,8 @@ "id": "prac_stabbing_beg_polearm", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "polearms (beginner)", "description": "Practice slicing and stabbing with your polearm against an imaginary opponent.", "skill_used": "stabbing", @@ -1098,8 +1098,8 @@ "id": "prac_stabbing_int_polearm", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "polearms (intermediate)", "description": "Perform solo exercises against a dummy to train your distance management and endurance with a polearm.", "skill_used": "stabbing", @@ -1118,8 +1118,8 @@ "id": "prac_cutting_beg_bionics", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "bionic weapons (beginner)", "description": "Perform basic fighting drills to learn to fight with your new bionic weapons.", "skill_used": "cutting", @@ -1134,8 +1134,8 @@ "id": "prac_cutting_int_bionics", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_*", - "subcategory": "CSC_*_NESTED", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_MELEE", "name": "bionic weapons (intermediate)", "description": "Drill advanced methods of using your bionic weapons, with the help of a dummy.", "skill_used": "cutting", From 561a8ca7cf3cf3abf8a8fb88bb25c23fb08dab8f Mon Sep 17 00:00:00 2001 From: marilynias Date: Tue, 21 Jan 2025 14:53:03 +0100 Subject: [PATCH 2/5] revert json fixed, filter recipes without results --- data/json/recipes/practice/melee.json | 160 +++++++++++++------------- src/activity_actor.cpp | 5 +- 2 files changed, 83 insertions(+), 82 deletions(-) diff --git a/data/json/recipes/practice/melee.json b/data/json/recipes/practice/melee.json index 066cbbe7ff9d7..fd5b6b4d3d2f6 100644 --- a/data/json/recipes/practice/melee.json +++ b/data/json/recipes/practice/melee.json @@ -303,8 +303,8 @@ "id": "prac_cutting_beg_long_sword", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "long swords (beginner)", "description": "Drill the fundamentals of using a longsword.", "skill_used": "cutting", @@ -320,8 +320,8 @@ "id": "prac_cutting_int_long_sword", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "long swords (intermediate)", "description": "Hone your skills with a longsword against a dummy.", "skill_used": "cutting", @@ -342,8 +342,8 @@ "id": "prac_cutting_beg_great_sword", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "great swords (beginner)", "description": "Practice swinging your great sword against an imaginary opponent.", "skill_used": "cutting", @@ -359,8 +359,8 @@ "id": "prac_cutting_int_great_sword", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "great swords (intermediate)", "description": "Practice using your sword's momentum to your advantage against a dummy.", "skill_used": "cutting", @@ -381,8 +381,8 @@ "id": "prac_cutting_beg_bionic_sword", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "bionic swords (beginner)", "description": "Get a feel for the weight, balance, and length of your bionic sword.", "skill_used": "cutting", @@ -397,8 +397,8 @@ "id": "prac_cutting_int_bionic_sword", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "bionic swords (intermediate)", "description": "Practice fighting with your bionic sword against a dummy.", "skill_used": "cutting", @@ -418,8 +418,8 @@ "id": "prac_cutting_beg_great_axe", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "great axes (beginner)", "description": "Drill keeping the proper form while swinging a heavy axe.", "skill_used": "cutting", @@ -434,8 +434,8 @@ "id": "prac_cutting_int_great_axe", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "great axes (intermediate)", "description": "Engage in advanced exercises and drills using a heavy axe.", "skill_used": "cutting", @@ -454,8 +454,8 @@ "id": "prac_cutting_beg_hand_axe", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "hand axes (beginner)", "description": "Practice your chopping motions against an imaginary assailant.", "skill_used": "cutting", @@ -470,8 +470,8 @@ "id": "prac_cutting_int_hand_axe", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "hand axes (intermediate)", "description": "Practice advanced methods of using a hand axe in combat, such as pommel strikes and backswings.", "skill_used": "cutting", @@ -489,8 +489,8 @@ "id": "prac_bashing_beg_great_hammer", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "great hammers (beginner)", "description": "Work on handling the weight of your great hammer while swinging it.", "skill_used": "bashing", @@ -505,8 +505,8 @@ "id": "prac_bashing_int_great_hammer", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "great hammers (intermediate)", "description": "Practice your strikes with a great hammer, crushing the dummy without throwing yourself off balance.", "skill_used": "bashing", @@ -561,8 +561,8 @@ "id": "prac_bashing_beg_mace", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "maces (beginner)", "description": "Work at swinging a mace around and making it land where you want.", "skill_used": "bashing", @@ -577,8 +577,8 @@ "id": "prac_bashing_int_mace", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "maces (intermediate)", "description": "Practice advanced skull splitting techniques.", "skill_used": "bashing", @@ -597,8 +597,8 @@ "id": "prac_stabbing_beg_spear", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "spears (beginner)", "description": "Practice the basics of spears, the most popular melee weapon throughout history. Learn the footwork, how to thrust with power, where to place your hands, and the right way to hold the damn thing. Dominant hand back, non-dominant forward!", "skill_used": "stabbing", @@ -615,8 +615,8 @@ "id": "prac_stabbing_int_spear", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "spears (intermediate)", "description": "Practice advanced spear moves and accurate thrusts against a training dummy. It's not glamorous, but spears were the workhorses of armed combat for millennia with good reason.", "skill_used": "stabbing", @@ -635,8 +635,8 @@ "id": "prac_stabbing_beg_thrust", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "long thrusting swords (beginner)", "description": "Practice switching between different ways of gripping your sword.", "skill_used": "stabbing", @@ -651,8 +651,8 @@ "id": "prac_stabbing_int_thrust", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "long thrusting swords (intermediate)", "description": "Drill yourself in using your sword as a thrusting weapon against a dummy.", "skill_used": "stabbing", @@ -673,8 +673,8 @@ "id": "prac_bashing_beg_rifle", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "rifle CQC (beginner)", "description": "Practice striking with your long gun.", "skill_used": "bashing", @@ -689,8 +689,8 @@ "id": "prac_bashing_int_rifle", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "rifle CQC (intermediate)", "description": "Practice your muzzle thump and buttstroke against a dummy.", "skill_used": "bashing", @@ -709,8 +709,8 @@ "id": "prac_bashing_beg_pistol", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "pistol CQC (beginner)", "description": "Practice safely swinging your pistol around like a club.", "skill_used": "bashing", @@ -725,8 +725,8 @@ "id": "prac_bashing_int_pistol", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "pistol CQC (intermediate)", "description": "Pistol whip a dummy repeatedly until you've got it down.", "skill_used": "bashing", @@ -745,8 +745,8 @@ "id": "prac_stabbing_beg_knife", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "knives (beginner)", "description": "Practice the brutal art of shanking the shit out of something until it dies. Learn the form, where and how to stab to avoid your knife glancing off bone, and whether you should actually hold the knife in reverse grip. (It depends.)", "skill_used": "stabbing", @@ -763,8 +763,8 @@ "id": "prac_stabbing_int_knife", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "knives (intermediate)", "description": "Get in touch with your inner commando and practice some advanced knife-fighting techniques on a training dummy.", "skill_used": "stabbing", @@ -783,8 +783,8 @@ "id": "prac_stabbing_beg_shiv", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "shivs (beginner)", "description": "You wouldn't think it, but there is more to stabbing someone with something small and pointy. Practice shanking an imaginary enemy where it hurts most.", "skill_used": "stabbing", @@ -800,8 +800,8 @@ "id": "prac_stabbing_int_shiv", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "shivs (intermediate)", "description": "Practice shanking the ever living hell out of a dummy to hone your accuracy and grip while you gut someone.", "skill_used": "stabbing", @@ -820,8 +820,8 @@ "id": "prac_bashing_beg_baton", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "batons (beginner)", "description": "Practice the basics of using a baton or small club in combat.", "skill_used": "bashing", @@ -837,8 +837,8 @@ "id": "prac_bashing_int_baton", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "batons (intermediate)", "description": "Train your backswing, overhead strike, and up strike against a dummy.", "skill_used": "bashing", @@ -857,8 +857,8 @@ "id": "prac_cutting_beg_med_sword", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "medium swords (beginner)", "description": "Footwork is key, practice dancing around an imaginary opponent with your sword.", "skill_used": "cutting", @@ -874,8 +874,8 @@ "id": "prac_cutting_int_med_sword", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "medium swords (intermediate)", "description": "Perform solo drills to practice advanced techniques, such as feints and moulinet cuts.", "skill_used": "cutting", @@ -896,8 +896,8 @@ "id": "prac_cutting_beg_short_sword", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "short swords (beginner)", "description": "Practice putting your weight behind your strike, cutting through an imaginary enemy.", "skill_used": "cutting", @@ -913,8 +913,8 @@ "id": "prac_cutting_int_short_sword", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "short swords (intermediate)", "description": "Practice drills in delivering quick and precise strikes against a dummy.", "skill_used": "cutting", @@ -935,8 +935,8 @@ "id": "prac_bashing_beg_staff", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "quarterstaves (beginner)", "description": "Practice swinging your staff, getting used to the balance and weight.", "skill_used": "bashing", @@ -952,8 +952,8 @@ "id": "prac_bashing_int_staff", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "quarterstaves (intermediate)", "description": "Practice using your staff against a dummy, familiarizing yourself with its length.", "skill_used": "bashing", @@ -972,8 +972,8 @@ "id": "prac_stabbing_beg_fencing", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "fencing (beginner)", "description": "Practice the basics of the noble art of fencing. Learn how to angle your body, aim your lunges, and parry pretend swords. Not that the undead are using swords. Hopefully.", "skill_used": "stabbing", @@ -990,8 +990,8 @@ "id": "prac_stabbing_int_fencing", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "fencing (intermediate)", "description": "Further develop your footwork and timing by fighting against a dummy. En garde!", "skill_used": "stabbing", @@ -1080,8 +1080,8 @@ "id": "prac_stabbing_beg_polearm", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "polearms (beginner)", "description": "Practice slicing and stabbing with your polearm against an imaginary opponent.", "skill_used": "stabbing", @@ -1098,8 +1098,8 @@ "id": "prac_stabbing_int_polearm", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "polearms (intermediate)", "description": "Perform solo exercises against a dummy to train your distance management and endurance with a polearm.", "skill_used": "stabbing", @@ -1118,8 +1118,8 @@ "id": "prac_cutting_beg_bionics", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "bionic weapons (beginner)", "description": "Perform basic fighting drills to learn to fight with your new bionic weapons.", "skill_used": "cutting", @@ -1134,8 +1134,8 @@ "id": "prac_cutting_int_bionics", "type": "practice", "activity_level": "BRISK_EXERCISE", - "category": "CC_PRACTICE", - "subcategory": "CSC_PRACTICE_MELEE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", "name": "bionic weapons (intermediate)", "description": "Drill advanced methods of using your bionic weapons, with the help of a dummy.", "skill_used": "cutting", diff --git a/src/activity_actor.cpp b/src/activity_actor.cpp index 0861a5f27c021..252e00dd549a6 100644 --- a/src/activity_actor.cpp +++ b/src/activity_actor.cpp @@ -3871,8 +3871,9 @@ void craft_activity_actor::canceled( player_activity &/*act*/, Character &/*who* return; } const recipe item_recipe = craft->get_making(); - // practice recipe items with no components can be safely removed - if( item_recipe.category->is_practice && craft->components.empty() ) { + auto cat = *item_recipe.category; + // recipe items with no components and results can be safely removed + if( item_recipe.result() == itype_id::NULL_ID() && craft->components.empty() ) { craft_item.remove_item(); } } From 2cc23cc69be28968ea91805901c5f9abb4530760 Mon Sep 17 00:00:00 2001 From: marilynias Date: Tue, 21 Jan 2025 14:53:59 +0100 Subject: [PATCH 3/5] rem debug var --- src/activity_actor.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/activity_actor.cpp b/src/activity_actor.cpp index 252e00dd549a6..cc76f849f8423 100644 --- a/src/activity_actor.cpp +++ b/src/activity_actor.cpp @@ -3871,7 +3871,6 @@ void craft_activity_actor::canceled( player_activity &/*act*/, Character &/*who* return; } const recipe item_recipe = craft->get_making(); - auto cat = *item_recipe.category; // recipe items with no components and results can be safely removed if( item_recipe.result() == itype_id::NULL_ID() && craft->components.empty() ) { craft_item.remove_item(); From ee358590c5a373ffde08db6f0ae9aa61e007c1be Mon Sep 17 00:00:00 2001 From: marilynias Date: Thu, 23 Jan 2025 12:15:08 +0100 Subject: [PATCH 4/5] adding check for result_eocs --- src/activity_actor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/activity_actor.cpp b/src/activity_actor.cpp index cc76f849f8423..745cf3742d1d9 100644 --- a/src/activity_actor.cpp +++ b/src/activity_actor.cpp @@ -3871,8 +3871,8 @@ void craft_activity_actor::canceled( player_activity &/*act*/, Character &/*who* return; } const recipe item_recipe = craft->get_making(); - // recipe items with no components and results can be safely removed - if( item_recipe.result() == itype_id::NULL_ID() && craft->components.empty() ) { + // recipe items with no components and results/result_eocs can be safely removed + if( item_recipe.result() == itype_id::NULL_ID() && item_recipe.result_eocs.empty() && craft->components.empty() ) { craft_item.remove_item(); } } From 35a2c6f863a7f1213bc9d92e62584d2dbf1a882a Mon Sep 17 00:00:00 2001 From: marilynias <98028585+marilynias@users.noreply.github.com> Date: Thu, 23 Jan 2025 12:21:22 +0100 Subject: [PATCH 5/5] Update src/activity_actor.cpp formatting Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/activity_actor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/activity_actor.cpp b/src/activity_actor.cpp index 745cf3742d1d9..07e634876caab 100644 --- a/src/activity_actor.cpp +++ b/src/activity_actor.cpp @@ -3872,7 +3872,8 @@ void craft_activity_actor::canceled( player_activity &/*act*/, Character &/*who* } const recipe item_recipe = craft->get_making(); // recipe items with no components and results/result_eocs can be safely removed - if( item_recipe.result() == itype_id::NULL_ID() && item_recipe.result_eocs.empty() && craft->components.empty() ) { + if( item_recipe.result() == itype_id::NULL_ID() && item_recipe.result_eocs.empty() && + craft->components.empty() ) { craft_item.remove_item(); } }