From c7e0a723842eaacc720d5c10cd63d08ca8fc8494 Mon Sep 17 00:00:00 2001 From: Karol1223 <68503002+Karol1223@users.noreply.github.com> Date: Fri, 22 Mar 2024 19:12:20 +0100 Subject: [PATCH 01/42] Update zed_ferrous.json --- data/json/monsters/zed_ferrous.json | 46 +++++++++++++---------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/data/json/monsters/zed_ferrous.json b/data/json/monsters/zed_ferrous.json index e8cbba234cc22..f96a653e91b4b 100644 --- a/data/json/monsters/zed_ferrous.json +++ b/data/json/monsters/zed_ferrous.json @@ -9,10 +9,10 @@ "species": [ "ZOMBIE", "HUMAN" ], "looks_like": "mon_zombie", "volume": "62500 ml", - "weight": "81500 g", + "weight": "90 kg", "hp": 80, "speed": 65, - "material": [ "flesh" ], + "material": [ "flesh", "steel" ], "symbol": "Z", "color": "brown", "aggression": 100, @@ -44,7 +44,8 @@ "REVIVES", "PUSH_MON", "FILTHY" - ] + ], + "armor": { "bash": 1, "cut": 2, "stab": 1 } }, { "id": "mon_zombie_shell", @@ -55,13 +56,12 @@ "bodytype": "human", "species": [ "ZOMBIE", "HUMAN" ], "volume": "62500 ml", - "weight": "83500 g", - "hp": 200, + "weight": "90 kg", + "hp": 100, "speed": 50, - "material": [ "flesh" ], + "material": [ "flesh", "steel" ], "symbol": "Z", "color": "brown", - "scents_tracked": [ "sc_human", "sc_fetid" ], "aggression": 100, "morale": 100, "melee_skill": 4, @@ -81,7 +81,6 @@ "flags": [ "SEES", "HEARS", - "SMELLS", "STUMBLES", "WARM", "GRABS", @@ -93,7 +92,7 @@ "PUSH_MON", "FILTHY" ], - "armor": { "bash": 8, "cut": 8, "stab": 8, "bullet": 8 } + "armor": { "bash": 14, "cut": 14, "stab": 14, "bullet": 14 } }, { "id": "mon_zombie_plated", @@ -106,9 +105,9 @@ "looks_like": "mon_zombie", "volume": "108500 ml", "weight": "120 kg", - "hp": 170, + "hp": 145, "speed": 60, - "material": [ "flesh" ], + "material": [ "flesh", "steel" ], "symbol": "Z", "color": "brown", "scents_tracked": [ "sc_human", "sc_fetid" ], @@ -122,7 +121,6 @@ "families": [ "prof_intro_biology", "prof_physiology", "prof_wp_zombie", "prof_wp_nat_armored" ], "bleed_rate": 0, "vision_night": 3, - "luminance": 0, "harvest": "zombie_humanoid", "grab_strength": 30, "special_attacks": [ { "id": "bite_humanoid", "cooldown": 5 }, { "id": "grab", "cooldown": 7 }, { "id": "scratch_humanoid" } ], @@ -144,7 +142,7 @@ "PUSH_MON", "FILTHY" ], - "armor": { "bash": 15, "cut": 15, "stab": 15, "bullet": 15 } + "armor": { "bash": 18, "cut": 18, "stab": 18, "bullet": 18 } }, { "id": "mon_zombie_urchin", @@ -155,10 +153,10 @@ "bodytype": "human", "species": [ "ZOMBIE", "HUMAN" ], "volume": "62500 ml", - "weight": "81500 g", + "weight": "90 kg", "hp": 100, "speed": 60, - "material": [ "flesh" ], + "material": [ "flesh", "steel" ], "symbol": "Z", "color": "brown", "scents_tracked": [ "sc_human", "sc_fetid" ], @@ -170,7 +168,6 @@ "melee_damage": [ { "damage_type": "cut", "amount": 12 } ], "weakpoint_sets": [ "wps_humanoid_body" ], "families": [ "prof_intro_biology", "prof_physiology", "prof_wp_zombie" ], - "dodge": 1, "bleed_rate": 0, "vision_night": 3, "harvest": "zombie_humanoid", @@ -194,13 +191,12 @@ "BASHES", "GROUP_BASH", "POISON", - "ACIDPROOF", - "ACID_BLOOD", "NO_BREATHE", "REVIVES", "PUSH_MON", "FILTHY" - ] + ], + "armor": { "bash": 5, "cut": 5, "stab": 5, "bullet": 5 } }, { "id": "mon_zombie_hammer_hands", @@ -211,11 +207,10 @@ "bodytype": "human", "species": [ "ZOMBIE", "HUMAN" ], "volume": "62500 ml", - "//": "Higher weight from attached junks.", - "weight": "84500 g", - "hp": 100, - "speed": 100, - "material": [ "flesh" ], + "weight": "90 kg", + "hp": 120, + "speed": 75, + "material": [ "flesh", "steel" ], "symbol": "Z", "looks_like": "mon_zombie_brute", "color": "brown", @@ -251,6 +246,7 @@ "PUSH_MON", "PUSH_VEH", "FILTHY" - ] + ], + "armor": { "bash": 8, "cut": 8, "stab": 8, "bullet": 8 } } ] From a1ef0b1cc4bf0745404856706d0e5e13a349cd54 Mon Sep 17 00:00:00 2001 From: Karol1223 <68503002+Karol1223@users.noreply.github.com> Date: Sat, 23 Mar 2024 13:45:38 +0100 Subject: [PATCH 02/42] hammerhand special attacks --- data/json/monsters/zed_ferrous.json | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/data/json/monsters/zed_ferrous.json b/data/json/monsters/zed_ferrous.json index f96a653e91b4b..793341554497d 100644 --- a/data/json/monsters/zed_ferrous.json +++ b/data/json/monsters/zed_ferrous.json @@ -227,7 +227,15 @@ "vision_day": 14, "harvest": "zombie_humanoid", "grab_strength": 20, - "special_attacks": [ { "id": "bite_humanoid", "cooldown": 5 }, { "id": "grab", "cooldown": 7 }, { "id": "scratch_humanoid" } ], + "special_attacks": [ + { "id": "bite_humanoid", "cooldown": 5 }, + { + "id": "smash", + "damage_max_instance": [ { "damage_type": "bash", "amount": 10 } ], + "throw_strength": 35, + "cooldown": 10 + } + ], "death_drops": "default_zombie_death_drops", "attack_effs": [ { "id": "tetanus", "duration": 300, "chance": 10 } ], "burn_into": "mon_zombie_scorched", @@ -237,7 +245,6 @@ "SMELLS", "STUMBLES", "WARM", - "GRABS", "BASHES", "GROUP_BASH", "POISON", From df5ba38cd89fdb0822ed42ec9113b4b72395d939 Mon Sep 17 00:00:00 2001 From: Karol1223 <68503002+Karol1223@users.noreply.github.com> Date: Sat, 23 Mar 2024 13:50:31 +0100 Subject: [PATCH 03/42] harvestlists --- data/json/harvest.json | 16 ++++++++++++++++ data/json/monsters/zed_ferrous.json | 10 +++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/data/json/harvest.json b/data/json/harvest.json index 4183ac6671f4f..d5322dca190c1 100644 --- a/data/json/harvest.json +++ b/data/json/harvest.json @@ -1565,6 +1565,22 @@ { "drop": "sinew", "type": "bone", "mass_ratio": 0.00035 } ] }, + { + "id": "zombie_rust", + "type": "harvest", + "entries": [ + { "drop": "skull_human_tainted", "type": "bone", "scale_num": [ 1, 1 ], "max": 1 }, + { "drop": "meat_tainted", "type": "flesh", "mass_ratio": 0.175 }, + { "drop": "steel_chunk", "type": "flesh", "mass_ratio": 0.075 }, + { "drop": "scrap", "type": "flesh", "mass_ratio": 0.025 }, + { "drop": "blood_tainted", "type": "blood", "mass_ratio": 0.1 }, + { "drop": "fat_tainted", "type": "flesh", "mass_ratio": 0.08 }, + { "drop": "tainted_innards", "type": "offal", "mass_ratio": 0.15 }, + { "drop": "tainted_marrow", "type": "bone", "mass_ratio": 0.005 }, + { "drop": "bone_tainted", "type": "bone", "mass_ratio": 0.075 }, + { "drop": "sinew", "type": "bone", "mass_ratio": 0.00035 } + ] + }, { "id": "zombie_humanoid_headless", "//": "humanoid zombies without a skull", diff --git a/data/json/monsters/zed_ferrous.json b/data/json/monsters/zed_ferrous.json index 793341554497d..f0f3b4be490fc 100644 --- a/data/json/monsters/zed_ferrous.json +++ b/data/json/monsters/zed_ferrous.json @@ -24,7 +24,7 @@ "weakpoint_sets": [ "wps_humanoid_body" ], "families": [ "prof_intro_biology", "prof_physiology", "prof_wp_zombie" ], "vision_night": 3, - "harvest": "zombie_humanoid", + "harvest": "zombie_rust", "grab_strength": 20, "special_attacks": [ { "id": "bite_humanoid", "cooldown": 5 }, { "id": "grab", "cooldown": 7 }, { "id": "scratch_humanoid" } ], "attack_effs": [ { "id": "tetanus", "duration": 300, "chance": 10 } ], @@ -72,7 +72,7 @@ "families": [ "prof_intro_biology", "prof_physiology", "prof_wp_zombie", "prof_wp_nat_armored" ], "bleed_rate": 50, "vision_night": 3, - "harvest": "zombie_humanoid", + "harvest": "zombie_rust", "grab_strength": 20, "special_attacks": [ { "id": "bite_humanoid", "cooldown": 5 }, { "id": "grab", "cooldown": 7 }, { "id": "scratch_humanoid" } ], "attack_effs": [ { "id": "tetanus", "duration": 300, "chance": 10 } ], @@ -121,7 +121,7 @@ "families": [ "prof_intro_biology", "prof_physiology", "prof_wp_zombie", "prof_wp_nat_armored" ], "bleed_rate": 0, "vision_night": 3, - "harvest": "zombie_humanoid", + "harvest": "zombie_rust", "grab_strength": 30, "special_attacks": [ { "id": "bite_humanoid", "cooldown": 5 }, { "id": "grab", "cooldown": 7 }, { "id": "scratch_humanoid" } ], "attack_effs": [ { "id": "tetanus", "duration": 300, "chance": 10 } ], @@ -170,7 +170,7 @@ "families": [ "prof_intro_biology", "prof_physiology", "prof_wp_zombie" ], "bleed_rate": 0, "vision_night": 3, - "harvest": "zombie_humanoid", + "harvest": "zombie_rust", "grab_strength": 35, "special_attacks": [ { "id": "bite_humanoid", "cooldown": 5 }, @@ -225,7 +225,7 @@ "families": [ "prof_intro_biology", "prof_physiology", "prof_wp_zombie" ], "bleed_rate": 0, "vision_day": 14, - "harvest": "zombie_humanoid", + "harvest": "zombie_rust", "grab_strength": 20, "special_attacks": [ { "id": "bite_humanoid", "cooldown": 5 }, From 62391a872bcf40b427bd9104ae158e4eb826b93b Mon Sep 17 00:00:00 2001 From: RenechCDDA <84619419+RenechCDDA@users.noreply.github.com> Date: Mon, 25 Mar 2024 09:59:14 -0400 Subject: [PATCH 04/42] Impact energy calculation for falling items --- src/map.cpp | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/src/map.cpp b/src/map.cpp index 19352993d923c..042f618062057 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -2864,10 +2864,10 @@ void map::drop_items( const tripoint &p ) // rather than disappearing if it would be overloaded tripoint below( p ); - int height_fallen = 0; + int max_height_fallen = 0; while( !has_floor_or_water( below ) ) { below.z--; - height_fallen++; + max_height_fallen++; } if( below == p ) { @@ -2877,14 +2877,41 @@ void map::drop_items( const tripoint &p ) float damage_total = 0.0f; for( item &i : items ) { units::mass wt_dropped = i.weight(); - float item_density = i.get_base_material().density(); - float damage = 5 * to_kilogram( wt_dropped ) * height_fallen * item_density; + + if( max_height_fallen <= 0 ) { + debugmsg( "Tried to calculate damage for falling item, but item somehow fell less than one z-level!" ); + max_height_fallen = 1; + } + Creature *creature_below = get_creature_tracker().creature_at( below ); + double height_fallen = max_height_fallen; + if( creature_below ) { + // Discount most of the first z-level's falling distance, depending on how big the creature is + // Characters (player/NPC) are normally medium, which is 0.5 or standing about 1.2m tall. + // This is shorter than the average adult, but it's an *okay* approximation. + height_fallen - occupied_tile_fraction( creature_below->get_size() ); + } + // in meters, assuming one z-level is ~2.5m. + const double distance_to_fall = ( height_fallen ) * 2.5; + + // in meters per second (squared). + const double gravity_acceleration_constant = 9.8; + + // in seconds. + double falling_time = sqrt( 2 * distance_to_fall / gravity_acceleration_constant ); + + // in meters per second. + double velocity_at_impact = gravity_acceleration_constant * falling_time; + + // in joules. + double impact_energy = to_kilogram( wt_dropped ) * std::pow( velocity_at_impact, 2.0 ) / 2.0; + + // in faces smashed (parts per hundred). + double damage = sqrt( impact_energy ); damage_total += damage; add_item_or_charges( below, i ); // Bash creature standing below - Creature *creature_below = get_creature_tracker().creature_at( below ); if( creature_below ) { // creature's dodge modifier float dodge_mod = creature_below->dodge_roll(); From 55c1061553a4e0f2a2a95e8c5aa026d2eeb6bab6 Mon Sep 17 00:00:00 2001 From: RenechCDDA <84619419+RenechCDDA@users.noreply.github.com> Date: Mon, 25 Mar 2024 11:18:23 -0400 Subject: [PATCH 05/42] Throwing is not a recognized school of wizardry --- src/item.cpp | 3 --- src/item.h | 6 ------ src/map.cpp | 16 +++++++++------- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/item.cpp b/src/item.cpp index 775a996ec4031..c88ea105f9bff 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -14600,9 +14600,6 @@ bool item::on_drop( const tripoint &pos, map &m ) avatar &player_character = get_avatar(); - // set variable storing information of character dropping item - dropped_char_stats.throwing = player_character.get_skill_level( skill_throw ); - return type->drop_action && type->drop_action.call( &player_character, *this, pos ); } diff --git a/src/item.h b/src/item.h index ed99334efd8df..1a94a783d860c 100644 --- a/src/item.h +++ b/src/item.h @@ -176,10 +176,6 @@ template<> struct enum_traits { static constexpr bool is_flag_enum = true; }; -// Currently used to store the only throwing stats of character dropping this item. Default is -1 -struct dropped_by_character_stats { - float throwing; -}; iteminfo vol_to_info( const std::string &type, const std::string &left, const units::volume &vol, int decimal_places = 2, bool lower_is_better = true ); @@ -236,8 +232,6 @@ class item : public visitable ~item() override; - struct dropped_by_character_stats dropped_char_stats = { -1.0f }; - /** Return a pointer-like type that's automatically invalidated if this * item is destroyed or assigned-to */ safe_reference get_safe_reference(); diff --git a/src/map.cpp b/src/map.cpp index 042f618062057..d1a3a1a8576f3 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -2888,7 +2888,7 @@ void map::drop_items( const tripoint &p ) // Discount most of the first z-level's falling distance, depending on how big the creature is // Characters (player/NPC) are normally medium, which is 0.5 or standing about 1.2m tall. // This is shorter than the average adult, but it's an *okay* approximation. - height_fallen - occupied_tile_fraction( creature_below->get_size() ); + height_fallen -= occupied_tile_fraction( creature_below->get_size() ); } // in meters, assuming one z-level is ~2.5m. const double distance_to_fall = ( height_fallen ) * 2.5; @@ -2915,15 +2915,16 @@ void map::drop_items( const tripoint &p ) if( creature_below ) { // creature's dodge modifier float dodge_mod = creature_below->dodge_roll(); - // if item dropped by character their throwing skill modifier -1 if not dropped by a character - float throwing_mod = i.dropped_char_stats.throwing == -1.0f ? 0.0f : 5 * - i.dropped_char_stats.throwing; - // values calibrated so that %hit chance starts from 60% going up and down according to the two modifiers - float hit_mod = ( throwing_mod + 18 ) / ( dodge_mod + 15 ); + // Most of the threat comes from the projectile going very fast before it enters a creature's vertical FOV + // or e.g. it fell from so high up that there was no indication of something coming down before it (possibly) hits + float hit_mod = velocity_at_impact / ( dodge_mod + 5 ); int creature_hit_chance = rng( 0, 100 ); - creature_hit_chance /= hit_mod * occupied_tile_fraction( creature_below->get_size() ); + double avoid_chance = hit_mod * occupied_tile_fraction( creature_below->get_size() ); + // We use sqrt here because it trends back towards 1. Spectacularly low hit_mod will still have SOME chance to hit while + // hits of >1 avoid_chance are not always going to strike the head + creature_hit_chance /= sqrt( avoid_chance ); if( creature_hit_chance < 15 ) { add_msg_if_player_sees( creature_below->pos(), _( "Falling %s hits %s in the head!" ), i.tname(), creature_below->get_name() ); @@ -2951,6 +2952,7 @@ void map::drop_items( const tripoint &p ) } // Bash items at bottom since currently bash_items only bash glass items + // FIXME: Hardcoded damage type! int chance = static_cast( 200 * i.resist( damage_bash, true ) / damage + 1 ); if( one_in( chance ) ) { i.inc_damage(); From 4121ba5628a1094949fc528c055a39f436375aca Mon Sep 17 00:00:00 2001 From: RenechCDDA <84619419+RenechCDDA@users.noreply.github.com> Date: Mon, 25 Mar 2024 11:52:05 -0400 Subject: [PATCH 06/42] Dogs don't have arms! Not even in the Cataclysm! --- src/map.cpp | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/map.cpp b/src/map.cpp index d1a3a1a8576f3..fcb292ca8157e 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -2925,30 +2925,32 @@ void map::drop_items( const tripoint &p ) // We use sqrt here because it trends back towards 1. Spectacularly low hit_mod will still have SOME chance to hit while // hits of >1 avoid_chance are not always going to strike the head creature_hit_chance /= sqrt( avoid_chance ); + bodypart_id hit_part; if( creature_hit_chance < 15 ) { - add_msg_if_player_sees( creature_below->pos(), _( "Falling %s hits %s in the head!" ), i.tname(), - creature_below->get_name() ); - creature_below->deal_damage( nullptr, bodypart_id( "head" ), damage_instance( damage_bash, - damage ) ); + hit_part = creature_below->get_random_body_part_of_type( body_part_type::type::head ); } else if( creature_hit_chance < 30 ) { - add_msg_if_player_sees( creature_below->pos(), _( "Falling %s hits %s in the torso!" ), i.tname(), - creature_below->get_name() ); - creature_below->deal_damage( nullptr, bodypart_id( "torso" ), damage_instance( damage_bash, - damage ) ); - } else if( creature_hit_chance < 65 ) { - add_msg_if_player_sees( creature_below->pos(), _( "Falling %s hits %s in the left arm!" ), - i.tname(), creature_below->get_name() ); - creature_below->deal_damage( nullptr, bodypart_id( "arm_l" ), damage_instance( damage_bash, - damage ) ); + hit_part = creature_below->get_random_body_part_of_type( body_part_type::type::torso ); + } else if( creature_hit_chance < 90 ) { + hit_part = creature_below->get_random_body_part_of_type( body_part_type::type::arm ); } else if( creature_hit_chance < 100 ) { - add_msg_if_player_sees( creature_below->pos(), _( "Falling %s hits %s in the right arm!" ), - i.tname(), creature_below->get_name() ); - creature_below->deal_damage( nullptr, bodypart_id( "arm_r" ), damage_instance( damage_bash, - damage ) ); + hit_part = creature_below->get_random_body_part_of_type( body_part_type::type::leg ); } else { add_msg_if_player_sees( creature_below->pos(), _( "Falling %s misses the %s!" ), i.tname(), creature_below->get_name() ); } + // Did we hit at all? Then run the message. + if( creature_hit_chance < 100 ) { + // For some reason bp_null is_valid??? + if( hit_part.is_valid() ) { + add_msg_if_player_sees( creature_below->pos(), _( "Falling %s hits %s in their %s for %i damage!" ), + i.tname(), creature_below->get_name(), hit_part->name, static_cast( damage ) ); + } else { + add_msg_if_player_sees( creature_below->pos(), _( "Falling %s hits %s for %i damage!" ), + i.tname(), creature_below->get_name(), static_cast( damage ) ); + } + // FIXME: Hardcoded damage type! + creature_below->deal_damage( nullptr, hit_part, damage_instance( damage_bash, damage ) ); + } } // Bash items at bottom since currently bash_items only bash glass items From 6ac2d94d65d9a75f3100703725ab14affdfa048b Mon Sep 17 00:00:00 2001 From: Karol1223 <68503002+Karol1223@users.noreply.github.com> Date: Tue, 26 Mar 2024 11:29:37 +0100 Subject: [PATCH 07/42] flesh burnies --- data/json/monsters/zed_burned.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/data/json/monsters/zed_burned.json b/data/json/monsters/zed_burned.json index 7c22e33009b16..955048ca891bd 100644 --- a/data/json/monsters/zed_burned.json +++ b/data/json/monsters/zed_burned.json @@ -65,5 +65,19 @@ "families": [ "prof_burn_care" ], "flags": [ "REVIVES_HEALTHY", "NO_NECRO" ] } + }, + { + "id": "mon_zombie_scorched_rust", + "type": "MONSTER", + "description": "A heavily burned zombie that still reeks of charred meat. Its flesh has mended into a leathery shell. This one appears to have metal fragments sticking out of its body.", + "copy-from": "mon_zombie_scorched", + "harvest": "zombie_rust" + }, + { + "id": "mon_zombie_fiend_rust", + "type": "MONSTER", + "description": "A charred zombie covered with bony plates, spikes, and protrusions. Moves stiffly, but swiftly. This one appears to have metal fragments sticking out of its body.", + "copy-from": "mon_zombie_fiend", + "harvest": "zombie_rust" } ] From 9623c10b838646253bd76fe9ee4cf3bcdb912c4b Mon Sep 17 00:00:00 2001 From: Karol1223 <68503002+Karol1223@users.noreply.github.com> Date: Tue, 26 Mar 2024 11:30:55 +0100 Subject: [PATCH 08/42] actually make them burn into the thing --- data/json/monsters/zed_ferrous.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/data/json/monsters/zed_ferrous.json b/data/json/monsters/zed_ferrous.json index f0f3b4be490fc..828c1fae57453 100644 --- a/data/json/monsters/zed_ferrous.json +++ b/data/json/monsters/zed_ferrous.json @@ -29,7 +29,7 @@ "special_attacks": [ { "id": "bite_humanoid", "cooldown": 5 }, { "id": "grab", "cooldown": 7 }, { "id": "scratch_humanoid" } ], "attack_effs": [ { "id": "tetanus", "duration": 300, "chance": 10 } ], "death_drops": "default_zombie_death_drops", - "burn_into": "mon_zombie_scorched", + "burn_into": "mon_zombie_scorched_rust", "upgrades": { "half_life": 30, "into_group": "GROUP_FERROUS_UPGRADE" }, "flags": [ "SEES", @@ -77,7 +77,7 @@ "special_attacks": [ { "id": "bite_humanoid", "cooldown": 5 }, { "id": "grab", "cooldown": 7 }, { "id": "scratch_humanoid" } ], "attack_effs": [ { "id": "tetanus", "duration": 300, "chance": 10 } ], "death_drops": "default_zombie_death_drops", - "burn_into": "mon_zombie_scorched", + "burn_into": "mon_zombie_scorched_rust", "flags": [ "SEES", "HEARS", @@ -126,7 +126,7 @@ "special_attacks": [ { "id": "bite_humanoid", "cooldown": 5 }, { "id": "grab", "cooldown": 7 }, { "id": "scratch_humanoid" } ], "attack_effs": [ { "id": "tetanus", "duration": 300, "chance": 10 } ], "death_drops": "default_zombie_death_drops", - "burn_into": "mon_zombie_scorched", + "burn_into": "mon_zombie_scorched_rust", "flags": [ "SEES", "HEARS", @@ -180,7 +180,7 @@ ], "attack_effs": [ { "id": "tetanus", "duration": 300, "chance": 20 } ], "death_drops": "default_zombie_death_drops", - "burn_into": "mon_zombie_scorched", + "burn_into": "mon_zombie_scorched_rust", "flags": [ "SEES", "HEARS", @@ -238,7 +238,7 @@ ], "death_drops": "default_zombie_death_drops", "attack_effs": [ { "id": "tetanus", "duration": 300, "chance": 10 } ], - "burn_into": "mon_zombie_scorched", + "burn_into": "mon_zombie_fiend_rust", "flags": [ "SEES", "HEARS", From 38d741efb9cd8f49aa62406922d559ed40dda6f7 Mon Sep 17 00:00:00 2001 From: Katie M Date: Fri, 22 Mar 2024 17:10:37 -0400 Subject: [PATCH 09/42] Implemented intelligent font fallback system in ImGui, so that CDDA can render the fonts using its own functions --- src/third-party/imgui/imgui.h | 16 +++++- src/third-party/imgui/imgui_draw.cpp | 55 ++++++++++++++++++- .../imgui/imgui_impl_sdlrenderer2.cpp | 15 +++++ .../imgui/imgui_impl_sdlrenderer2.h | 2 + 4 files changed, 85 insertions(+), 3 deletions(-) diff --git a/src/third-party/imgui/imgui.h b/src/third-party/imgui/imgui.h index dc833cc2c3a2f..89902850bfd59 100644 --- a/src/third-party/imgui/imgui.h +++ b/src/third-party/imgui/imgui.h @@ -142,6 +142,7 @@ struct ImFontAtlas; // Runtime data for multiple fonts, bake mul struct ImFontBuilderIO; // Opaque interface to a font builder (stb_truetype or FreeType). struct ImFontConfig; // Configuration data when adding a font or merging fonts struct ImFontGlyph; // A single font glyph (code point + coordinates within in ImFontAtlas + offset) +struct ImFontGlyphToDraw; struct ImFontGlyphRangesBuilder; // Helper to build glyph ranges from text/string data struct ImColor; // Helper functions to create a color that can be converted to either u32 or float4 (*OBSOLETE* please avoid using) struct ImGuiContext; // Dear ImGui context (opaque structure, unless including imgui_internal.h) @@ -2569,6 +2570,7 @@ struct ImDrawList ImVector CmdBuffer; // Draw commands. Typically 1 command = 1 GPU draw call, unless the command is a callback. ImVector IdxBuffer; // Index buffer. Each command consume ImDrawCmd::ElemCount of those ImVector VtxBuffer; // Vertex buffer. + ImVector FallbackGlyphs; ImDrawListFlags Flags; // Flags, you may poke into these to adjust anti-aliasing settings per-primitive. // [Internal, used while building lists] @@ -2751,6 +2753,13 @@ struct ImFontGlyph float U0, V0, U1, V1; // Texture coordinates }; +struct ImFontGlyphToDraw +{ + char uni_str[7]; + ImVec2 pos; + ImU32 col; +}; + // Helper to build glyph ranges from text/string data. Feed your application strings/characters to it then call BuildRanges(). // This is essentially a tightly packed of vector of 64k booleans = 8KB storage. struct ImFontGlyphRangesBuilder @@ -2939,10 +2948,10 @@ struct ImFont // Methods IMGUI_API ImFont(); - IMGUI_API ~ImFont(); + virtual IMGUI_API ~ImFont(); IMGUI_API const ImFontGlyph*FindGlyph(ImWchar c) const; IMGUI_API const ImFontGlyph*FindGlyphNoFallback(ImWchar c) const; - float GetCharAdvance(ImWchar c) const { return ((int)c < IndexAdvanceX.Size) ? IndexAdvanceX[(int)c] : FallbackAdvanceX; } + float GetCharAdvance(ImWchar c) const; bool IsLoaded() const { return ContainerAtlas != NULL; } const char* GetDebugName() const { return ConfigData ? ConfigData->Name : ""; } @@ -2950,6 +2959,9 @@ struct ImFont // 'wrap_width' enable automatic word-wrapping across multiple lines to fit into given width. 0.0f to disable. IMGUI_API ImVec2 CalcTextSizeA(float size, float max_width, float wrap_width, const char* text_begin, const char* text_end = NULL, const char** remaining = NULL) const; // utf8 IMGUI_API const char* CalcWordWrapPositionA(float scale, const char* text, const char* text_end, float wrap_width) const; + virtual bool CanRenderFallbackChar(const char *s_begin, const char *s_end) const; + virtual int GetFallbackCharWidth( const char* s_begin, const char* s_end, const float scale ) const; + virtual int GetFallbackCharWidth(ImWchar c, const float scale) const; IMGUI_API void RenderChar(ImDrawList* draw_list, float size, const ImVec2& pos, ImU32 col, ImWchar c) const; IMGUI_API void RenderText(ImDrawList* draw_list, float size, const ImVec2& pos, ImU32 col, const ImVec4& clip_rect, const char* text_begin, const char* text_end, float wrap_width = 0.0f, bool cpu_fine_clip = false) const; diff --git a/src/third-party/imgui/imgui_draw.cpp b/src/third-party/imgui/imgui_draw.cpp index f5d133e6692d9..76e4e5860021c 100644 --- a/src/third-party/imgui/imgui_draw.cpp +++ b/src/third-party/imgui/imgui_draw.cpp @@ -394,6 +394,7 @@ void ImDrawList::_ResetForNewFrame() CmdBuffer.resize(0); IdxBuffer.resize(0); VtxBuffer.resize(0); + FallbackGlyphs.resize(0); Flags = _Data->InitialFlags; memset(&_CmdHeader, 0, sizeof(_CmdHeader)); _VtxCurrentIdx = 0; @@ -3341,6 +3342,18 @@ const ImFontGlyph* ImFont::FindGlyph(ImWchar c) const return &Glyphs.Data[i]; } +float ImFont::GetCharAdvance(ImWchar c) const +{ + if((int)c < IndexAdvanceX.Size) + { + return IndexAdvanceX[(int)c]; + } + else + { + return GetFallbackCharWidth(c, 1.f); + } +} + const ImFontGlyph* ImFont::FindGlyphNoFallback(ImWchar c) const { if (c >= (size_t)IndexLookup.Size) @@ -3518,7 +3531,12 @@ ImVec2 ImFont::CalcTextSizeA(float size, float max_width, float wrap_width, cons continue; } - const float char_width = ((int)c < IndexAdvanceX.Size ? IndexAdvanceX.Data[c] : FallbackAdvanceX) * scale; + float char_width = 0.f; + if( (int)c < IndexAdvanceX.Size ) { + char_width = IndexAdvanceX.Data[c] * scale; + } else { + char_width = GetFallbackCharWidth( prev_s, s, scale ); + } if (line_width + char_width >= max_width) { s = prev_s; @@ -3555,6 +3573,21 @@ void ImFont::RenderChar(ImDrawList* draw_list, float size, const ImVec2& pos, Im draw_list->PrimRectUV(ImVec2(x + glyph->X0 * scale, y + glyph->Y0 * scale), ImVec2(x + glyph->X1 * scale, y + glyph->Y1 * scale), ImVec2(glyph->U0, glyph->V0), ImVec2(glyph->U1, glyph->V1), col); } +bool ImFont::CanRenderFallbackChar(const char *s_begin, const char *s_end) const +{ + return false; +} + +int ImFont::GetFallbackCharWidth( const char* s_begin, const char* s_end, const float scale ) const +{ + return FallbackAdvanceX * scale; +} + +int ImFont::GetFallbackCharWidth(ImWchar c, const float scale) const +{ + return FallbackAdvanceX * scale; +} + // Note: as with every ImDrawList drawing function, this expects that the font atlas texture is bound. void ImFont::RenderText(ImDrawList* draw_list, float size, const ImVec2& pos, ImU32 col, const ImVec4& clip_rect, const char* text_begin, const char* text_end, float wrap_width, bool cpu_fine_clip) const { @@ -3624,6 +3657,7 @@ void ImFont::RenderText(ImDrawList* draw_list, float size, const ImVec2& pos, Im while (s < text_end) { + const char* s_orig = s; if (word_wrap_enabled) { // Calculate how far we can render. Requires two passes on the string data but keeps the code simple and not intrusive for what's essentially an uncommon feature. @@ -3666,6 +3700,10 @@ void ImFont::RenderText(ImDrawList* draw_list, float size, const ImVec2& pos, Im continue; float char_width = glyph->AdvanceX * scale; + if( glyph == FallbackGlyph ) { + char_width = GetFallbackCharWidth( s_orig, s, scale ); + } + if (glyph->Visible) { // We don't do a second finer clipping test on the Y axis as we've already skipped anything before clip_rect.y and exit once we pass clip_rect.w @@ -3725,6 +3763,21 @@ void ImFont::RenderText(ImDrawList* draw_list, float size, const ImVec2& pos, Im // Support for untinted glyphs ImU32 glyph_col = glyph->Colored ? col_untinted : col; + if(glyph == FallbackGlyph) + { + if(CanRenderFallbackChar(s_orig, s)) + { + ImFontGlyphToDraw glyphToDraw; + size_t len = s - s_orig; + memcpy(glyphToDraw.uni_str, s_orig, len); + glyphToDraw.uni_str[len] = 0; + glyphToDraw.pos = { x1, y1 }; + glyphToDraw.col = glyph_col; + draw_list->FallbackGlyphs.push_back(glyphToDraw); + } + glyph = NULL; + } + else // We are NOT calling PrimRectUV() here because non-inlined causes too much overhead in a debug builds. Inlined here: { vtx_write[0].pos.x = x1; vtx_write[0].pos.y = y1; vtx_write[0].col = glyph_col; vtx_write[0].uv.x = u1; vtx_write[0].uv.y = v1; diff --git a/src/third-party/imgui/imgui_impl_sdlrenderer2.cpp b/src/third-party/imgui/imgui_impl_sdlrenderer2.cpp index 83ff82f304917..d93449a79d91c 100644 --- a/src/third-party/imgui/imgui_impl_sdlrenderer2.cpp +++ b/src/third-party/imgui/imgui_impl_sdlrenderer2.cpp @@ -116,6 +116,13 @@ void ImGui_ImplSDLRenderer2_NewFrame() ImGui_ImplSDLRenderer2_CreateDeviceObjects(); } +std::function drawFallbackGlyphCallback; + +void ImGui_ImplSDLRenderer2_SetFallbackGlyphDrawCallback(std::function func) +{ + drawFallbackGlyphCallback = func; +} + void ImGui_ImplSDLRenderer2_RenderDrawData(ImDrawData* draw_data) { ImGui_ImplSDLRenderer2_Data* bd = ImGui_ImplSDLRenderer2_GetBackendData(); @@ -204,6 +211,14 @@ void ImGui_ImplSDLRenderer2_RenderDrawData(ImDrawData* draw_data) cmd_list->VtxBuffer.Size - pcmd->VtxOffset, idx_buffer + pcmd->IdxOffset, pcmd->ElemCount, sizeof(ImDrawIdx)); } + + if(drawFallbackGlyphCallback) + { + for(const ImFontGlyphToDraw &glyphToDraw : cmd_list->FallbackGlyphs) + { + drawFallbackGlyphCallback(glyphToDraw); + } + } } } diff --git a/src/third-party/imgui/imgui_impl_sdlrenderer2.h b/src/third-party/imgui/imgui_impl_sdlrenderer2.h index ec6bbfef10bb3..643c87a45cf46 100644 --- a/src/third-party/imgui/imgui_impl_sdlrenderer2.h +++ b/src/third-party/imgui/imgui_impl_sdlrenderer2.h @@ -12,6 +12,7 @@ // [X] Renderer: Large meshes support (64k+ vertices) with 16-bit indices. #pragma once +#include #include "imgui.h" // IMGUI_IMPL_API struct SDL_Renderer; @@ -19,6 +20,7 @@ struct SDL_Renderer; IMGUI_IMPL_API bool ImGui_ImplSDLRenderer2_Init(SDL_Renderer* renderer); IMGUI_IMPL_API void ImGui_ImplSDLRenderer2_Shutdown(); IMGUI_IMPL_API void ImGui_ImplSDLRenderer2_NewFrame(); +IMGUI_IMPL_API void ImGui_ImplSDLRenderer2_SetFallbackGlyphDrawCallback(std::function func); IMGUI_IMPL_API void ImGui_ImplSDLRenderer2_RenderDrawData(ImDrawData* draw_data); // Called by Init/NewFrame/Shutdown From 84b2a8d2a0bf5502fa561d96847e43bbb5e6efbe Mon Sep 17 00:00:00 2001 From: Katie M Date: Sat, 23 Mar 2024 20:00:53 -0400 Subject: [PATCH 10/42] Fixing drawing of CJK characters in ImGui screens on CDDA. --- src/cata_imgui.cpp | 69 ++++++++++++++++++++++++++++++++++++++++++---- src/cata_imgui.h | 18 +++++++++--- src/sdl_font.cpp | 30 +++++--------------- src/sdl_font.h | 3 +- src/sdltiles.cpp | 9 ++---- 5 files changed, 89 insertions(+), 40 deletions(-) diff --git a/src/cata_imgui.cpp b/src/cata_imgui.cpp index 5064702cb1e08..a090b75ff23c4 100644 --- a/src/cata_imgui.cpp +++ b/src/cata_imgui.cpp @@ -158,13 +158,41 @@ RGBTuple color_loader::from_rgb( const int r, const int g, const int b } #else #include "sdl_utils.h" +#include "sdl_font.h" +#include "font_loader.h" +#include "wcwidth.h" #include #include -SDL_Renderer *cataimgui::client::sdl_renderer = nullptr; -SDL_Window *cataimgui::client::sdl_window = nullptr; +struct CataImFont : public ImFont { + std::unordered_map sdlColorsToCata; + const cataimgui::client &imclient; + const std::unique_ptr &cata_font; + CataImFont( const cataimgui::client &imclient, const std::unique_ptr &cata_font ) : + imclient( imclient ), cata_font( cata_font ) { + } -cataimgui::client::client() + // this function QUEUES a character to be drawn + bool CanRenderFallbackChar( const char *s_begin, const char *s_end ) const override { + return s_begin != nullptr && s_end != nullptr; + } + + int GetFallbackCharWidth( const char *s_begin, const char *s_end, + const float scale ) const override { + return cata_font->width * utf8_width( std::string( s_begin, s_end ) ) * int( scale ); + } + + int GetFallbackCharWidth( ImWchar c, const float scale ) const override { + return cata_font->width * mk_wcwidth( c ) * scale; + } +}; +static CataImFont *activeFont; + +cataimgui::client::client( const SDL_Renderer_Ptr &sdl_renderer, const SDL_Window_Ptr &sdl_window, + const GeometryRenderer_Ptr &sdl_geometry ) : + sdl_renderer( sdl_renderer ), + sdl_window( sdl_window ), + sdl_geometry( sdl_geometry ) { IMGUI_CHECKVERSION(); ImGui::CreateContext(); @@ -177,8 +205,39 @@ cataimgui::client::client() // Setup Dear ImGui style ImGui::StyleColorsDark(); - ImGui_ImplSDL2_InitForSDLRenderer( sdl_window, sdl_renderer ); - ImGui_ImplSDLRenderer2_Init( sdl_renderer ); + ImGui_ImplSDL2_InitForSDLRenderer( sdl_window.get(), sdl_renderer.get() ); + ImGui_ImplSDLRenderer2_Init( sdl_renderer.get() ); +} + +void cataimgui::client::load_fonts( const std::unique_ptr &cata_font, + const std::array::COLOR_NAMES_COUNT> &windowsPalette ) +{ + ImGuiIO &io = ImGui::GetIO(); + if( ImGui::GetIO().FontDefault == nullptr ) { + std::vector typefaces; + ensure_unifont_loaded( typefaces ); + + ImFontConfig cfg; + cfg.DstFont = activeFont = new CataImFont( *this, cata_font ); + for( size_t index = 0; index < color_loader::COLOR_NAMES_COUNT; index++ ) { + SDL_Color sdlCol = windowsPalette[index]; + ImU32 rgb = sdlCol.b << 16 | sdlCol.g << 8 | sdlCol.r; + activeFont->sdlColorsToCata[rgb] = index; + } + io.FontDefault = io.Fonts->AddFontFromFileTTF( typefaces[0].c_str(), cata_font->height, &cfg, + io.Fonts->GetGlyphRangesDefault() ); + io.Fonts->Fonts[0] = cfg.DstFont; + ImGui_ImplSDLRenderer2_SetFallbackGlyphDrawCallback( [&]( const ImFontGlyphToDraw & glyph ) { + std::string uni_string = std::string( glyph.uni_str ); + point p( int( glyph.pos.x ), int( glyph.pos.y - 5 ) ); + unsigned char col = 0; + auto it = activeFont->sdlColorsToCata.find( glyph.col & 0xFFFFFF ); + if( it != activeFont->sdlColorsToCata.end() ) { + col = it->second; + } + cata_font->OutputChar( sdl_renderer, sdl_geometry, glyph.uni_str, p, col ); + } ); + } } cataimgui::client::~client() diff --git a/src/cata_imgui.h b/src/cata_imgui.h index 8074be33f8f9f..a299e35b60c5c 100644 --- a/src/cata_imgui.h +++ b/src/cata_imgui.h @@ -10,12 +10,14 @@ struct input_event; struct item_info_data; #if defined(WIN32) || defined(TILES) -struct SDL_Renderer; -struct SDL_Window; +#include "sdl_geometry.h" +#include "sdl_wrappers.h" +#include "color_loader.h" #endif struct point; class ImVec2; +class Font; namespace cataimgui { @@ -44,7 +46,14 @@ enum class dialog_result { class client { public: +#if !(defined(TILES) || defined(WIN32)) client(); +#else + client( const SDL_Renderer_Ptr &sdl_renderer, const SDL_Window_Ptr &sdl_window, + const GeometryRenderer_Ptr &sdl_geometry ); + void load_fonts( const std::unique_ptr &cata_font, + const std::array::COLOR_NAMES_COUNT> &windowsPalette ); +#endif ~client(); void new_frame(); @@ -55,8 +64,9 @@ class client void upload_color_pair( int p, int f, int b ); void set_alloced_pair_count( short count ); #else - static struct SDL_Renderer *sdl_renderer; - static struct SDL_Window *sdl_window; + const SDL_Renderer_Ptr &sdl_renderer; + const SDL_Window_Ptr &sdl_window; + const GeometryRenderer_Ptr &sdl_geometry; #endif }; diff --git a/src/sdl_font.cpp b/src/sdl_font.cpp index c2b8d0b52d91f..8d6a98b1b1c55 100644 --- a/src/sdl_font.cpp +++ b/src/sdl_font.cpp @@ -3,8 +3,8 @@ #include "font_loader.h" #include "output.h" -#include "imgui/imgui.h" #include "sdl_utils.h" +#include "ui_manager.h" #if defined(_WIN32) # if 1 // HACK: Hack to prevent reordering of #include "platform_win.h" by IWYU @@ -299,26 +299,11 @@ CachedTTFFont::CachedTTFFont( throw std::runtime_error( TTF_GetError() ); } TTF_SetFontStyle( font.get(), TTF_STYLE_NORMAL ); - - ImGuiIO &io = ImGui::GetIO(); - if( io.FontDefault == nullptr && typeface.find( "unifont" ) != std::string::npos ) { - static const std::array ranges = { - 0x0020, 0x052F, - 0x1D00, 0x1DFF, - 0x2000, 0x20CF, - 0x2100, 0x214F, - 0x2190, 0x22FF, - 0x2500, 0x27BF, - 0xC900, 0xC9FF, - //0x0020, 0xCFFF, - 0 - }; - io.FontDefault = io.Fonts->AddFontFromFileTTF( typeface.c_str(), fontsize, nullptr, ranges.data() ); - } } SDL_Texture_Ptr CachedTTFFont::create_glyph( const SDL_Renderer_Ptr &renderer, const std::string &ch, + int &ch_width, const int color ) { const auto function = fontblending ? TTF_RenderUTF8_Blended : TTF_RenderUTF8_Solid; @@ -328,11 +313,12 @@ SDL_Texture_Ptr CachedTTFFont::create_glyph( const SDL_Renderer_Ptr &renderer, return nullptr; } const int wf = utf8_width( ch ); + ch_width = width * wf; // Note: bits per pixel must be 8 to be synchronized with the surface // that TTF_RenderGlyph above returns. This is important for SDL_BlitScaled - SDL_Surface_Ptr surface = create_surface_32( width * wf, height ); + SDL_Surface_Ptr surface = create_surface_32( ch_width, height ); SDL_Rect src_rect = { 0, 0, sglyph->w, sglyph->h }; - SDL_Rect dst_rect = { 0, 0, width * wf, height }; + SDL_Rect dst_rect = { 0, 0, ch_width, height }; if( src_rect.w < dst_rect.w ) { dst_rect.x = ( dst_rect.w - src_rect.w ) / 2; dst_rect.w = src_rect.w; @@ -380,10 +366,8 @@ void CachedTTFFont::OutputChar( const SDL_Renderer_Ptr &renderer, const Geometry auto it = glyph_cache_map.find( key ); if( it == std::end( glyph_cache_map ) ) { - cached_t new_entry { - create_glyph( renderer, key.codepoints, key.color ), - static_cast( width * utf8_width( key.codepoints ) ) - }; + cached_t new_entry; + new_entry.texture = create_glyph( renderer, key.codepoints, new_entry.width, key.color ); it = glyph_cache_map.insert( std::make_pair( std::move( key ), std::move( new_entry ) ) ).first; } const cached_t &value = it->second; diff --git a/src/sdl_font.h b/src/sdl_font.h index d87453ad40483..b85eee9711a57 100644 --- a/src/sdl_font.h +++ b/src/sdl_font.h @@ -85,7 +85,8 @@ class CachedTTFFont : public Font unsigned char color, float opacity = 1.0f ) override; protected: - SDL_Texture_Ptr create_glyph( const SDL_Renderer_Ptr &renderer, const std::string &ch, int color ); + SDL_Texture_Ptr create_glyph( const SDL_Renderer_Ptr &renderer, const std::string &ch, + int &ch_width, int color ); TTF_Font_Ptr font; // Maps (character code, color) to SDL_Texture* diff --git a/src/sdltiles.cpp b/src/sdltiles.cpp index c9fb3ac039ef1..d99ad5eb431fd 100644 --- a/src/sdltiles.cpp +++ b/src/sdltiles.cpp @@ -425,12 +425,7 @@ static void WinCreate() geometry = std::make_unique(); } - cataimgui::client::sdl_renderer = renderer.get(); - cataimgui::client::sdl_window = window.get(); - imclient = std::make_unique(); - - //io.Fonts->AddFontDefault(); - //io.Fonts->Build(); + imclient = std::make_unique( renderer, window, geometry ); } static void WinDestroy() @@ -3688,7 +3683,7 @@ void catacurses::init_interface() windowsPalette, fl.overmap_typeface, fl.overmap_fontsize, fl.fontblending ); stdscr = newwin( get_terminal_height(), get_terminal_width(), point_zero ); //newwin calls `new WINDOW`, and that will throw, but not return nullptr. - + imclient->load_fonts( font, windowsPalette ); #if defined(__ANDROID__) // Make sure we initialize preview_terminal_width/height to sensible values preview_terminal_width = TERMINAL_WIDTH * fontwidth; From c96be03b7abbb9961c9f60138886e2ca3145685b Mon Sep 17 00:00:00 2001 From: RenechCDDA <84619419+RenechCDDA@users.noreply.github.com> Date: Wed, 27 Mar 2024 08:14:02 -0400 Subject: [PATCH 11/42] Grammatically correct hit/miss messages --- src/item.cpp | 1 - src/map.cpp | 19 ++++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/item.cpp b/src/item.cpp index c88ea105f9bff..486f7eb13b0c6 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -204,7 +204,6 @@ static const quality_id qual_LIFT( "LIFT" ); static const skill_id skill_cooking( "cooking" ); static const skill_id skill_melee( "melee" ); static const skill_id skill_survival( "survival" ); -static const skill_id skill_throw( "throw" ); static const skill_id skill_weapon( "weapon" ); static const species_id species_ROBOT( "ROBOT" ); diff --git a/src/map.cpp b/src/map.cpp index fcb292ca8157e..2d9c64f0f5c92 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -2891,7 +2891,7 @@ void map::drop_items( const tripoint &p ) height_fallen -= occupied_tile_fraction( creature_below->get_size() ); } // in meters, assuming one z-level is ~2.5m. - const double distance_to_fall = ( height_fallen ) * 2.5; + const double distance_to_fall = height_fallen * 2.5; // in meters per second (squared). const double gravity_acceleration_constant = 9.8; @@ -2935,18 +2935,19 @@ void map::drop_items( const tripoint &p ) } else if( creature_hit_chance < 100 ) { hit_part = creature_below->get_random_body_part_of_type( body_part_type::type::leg ); } else { - add_msg_if_player_sees( creature_below->pos(), _( "Falling %s misses the %s!" ), i.tname(), - creature_below->get_name() ); + add_msg_if_player_sees( creature_below->pos(), _( "Falling %1$s misses %2$s!" ), i.tname(), + creature_below->disp_name() ); } // Did we hit at all? Then run the message. if( creature_hit_chance < 100 ) { - // For some reason bp_null is_valid??? - if( hit_part.is_valid() ) { - add_msg_if_player_sees( creature_below->pos(), _( "Falling %s hits %s in their %s for %i damage!" ), - i.tname(), creature_below->get_name(), hit_part->name, static_cast( damage ) ); + if( hit_part.is_valid() && !creature_below->is_monster() ) { + //~First positional argument: Item name. Second: Name of a person (e.g. "Jane") or player (e.g. "you"). Third: Body part name, accusative. + add_msg_if_player_sees( creature_below->pos(), _( + "Falling %1$s hits %2$s on the %3$s for %4$i damage!" ), + i.tname(), creature_below->disp_name(), hit_part->accusative, static_cast( damage ) ); } else { - add_msg_if_player_sees( creature_below->pos(), _( "Falling %s hits %s for %i damage!" ), - i.tname(), creature_below->get_name(), static_cast( damage ) ); + add_msg_if_player_sees( creature_below->pos(), _( "Falling %1$s hits %2$s for %3$i damage!" ), + i.tname(), creature_below->disp_name(), static_cast( damage ) ); } // FIXME: Hardcoded damage type! creature_below->deal_damage( nullptr, hit_part, damage_instance( damage_bash, damage ) ); From 39a902c7637006b487cb3245ef9a8479b16c6be6 Mon Sep 17 00:00:00 2001 From: GuardianDll Date: Wed, 27 Mar 2024 23:05:50 +0100 Subject: [PATCH 12/42] add map_id effect --- doc/EFFECT_ON_CONDITION.md | 31 +++++++++++++++++++++++++++++++ src/condition.cpp | 22 ++++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/doc/EFFECT_ON_CONDITION.md b/doc/EFFECT_ON_CONDITION.md index 9784df93843d3..8d19d3d181e65 100644 --- a/doc/EFFECT_ON_CONDITION.md +++ b/doc/EFFECT_ON_CONDITION.md @@ -1031,6 +1031,37 @@ Check the north terrain or furniture has `TRANSPARENT` flag. }, ``` +### `map_terrain_id`, `map_furniture_id` +- type: string or [variable object](##variable-object) +- return true if the terrain or furniture has specific id +- `loc` will specify location of terrain or furniture (**mandatory**) + +#### Valid talkers: + +No talker is needed. + +#### Examples +Runs a query, allowing you to pick specific tile around. When picked, stores coordinates of this tile in `check_terrain` variable, and then check is it a `t_grass`. If yes, `effect` is run, otherwise `false_effect` is run +```json +{ + "type": "effect_on_condition", + "id": "EOC_TEST_QUERY", + "condition": { + "and": [ + { + "u_query_tile": "line_of_sight", + "target_var": { "context_val": "check_terrain" }, + "message": "Check what terrain it is", + "range": 10 + }, + { "map_terrain_id": "t_grass", "loc": { "context_val": "check_terrain" } } + ] + }, + "effect": [ { "u_message": "it is a grass" } ], + "false_effect": [ { "u_message": "it is NOT a grass" } ] +} +``` + ### `map_in_city` - type: location string or [variable object](##variable-object) - return true if the location is in a city diff --git a/src/condition.cpp b/src/condition.cpp index 17bd44358e8ae..3264f978aba5c 100644 --- a/src/condition.cpp +++ b/src/condition.cpp @@ -1589,6 +1589,26 @@ conditional_t::func f_map_ter_furn_with_flag( const JsonObject &jo, std::string_ }; } +conditional_t::func f_map_ter_furn_id( const JsonObject &jo, std::string_view member ) +{ + str_or_var furn_type = get_str_or_var( jo.get_member( member ), member, true ); + var_info loc_var = read_var_info( jo.get_object( "loc" ) ); + bool terrain = true; + if( member == "map_terrain_id" ) { + terrain = true; + } else if( member == "map_furniture_id" ) { + terrain = false; + } + return [terrain, furn_type, loc_var]( dialogue const & d ) { + tripoint loc = get_map().getlocal( get_tripoint_from_var( loc_var, d ) ); + if( terrain ) { + return get_map().ter( loc ) == ter_id( furn_type.evaluate( d ) ); + } else { + return get_map().ter( loc ) == ter_id( furn_type.evaluate( d ) ); + } + }; +} + conditional_t::func f_map_in_city( const JsonObject &jo, std::string_view member ) { str_or_var target = get_str_or_var( jo.get_member( member ), member, true ); @@ -2400,6 +2420,8 @@ parsers = { {"is_weather", jarg::member, &conditional_fun::f_is_weather }, {"map_terrain_with_flag", jarg::member, &conditional_fun::f_map_ter_furn_with_flag }, {"map_furniture_with_flag", jarg::member, &conditional_fun::f_map_ter_furn_with_flag }, + {"map_terrain_id", jarg::member, &conditional_fun::f_map_ter_furn_id }, + {"map_furniture_id", jarg::member, &conditional_fun::f_map_ter_furn_id }, {"map_in_city", jarg::member, &conditional_fun::f_map_in_city }, {"mod_is_loaded", jarg::member, &conditional_fun::f_mod_is_loaded }, {"u_has_faction_trust", jarg::member | jarg::array, &conditional_fun::f_has_faction_trust }, From e2380aa9fae68a695c05f27ca5163aa0d5b65d74 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Wed, 27 Mar 2024 14:53:06 -0700 Subject: [PATCH 13/42] fix trapavoid monsters refusing to ever step on traps --- src/monmove.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/monmove.cpp b/src/monmove.cpp index 49bf9d11fc4a9..e10d084e0468c 100644 --- a/src/monmove.cpp +++ b/src/monmove.cpp @@ -350,7 +350,7 @@ bool monster::can_reach_to( const tripoint &p ) const bool monster::can_move_to( const tripoint &p ) const { - return can_reach_to( p ) && will_move_to( p ) && know_danger_at( p ); + return can_reach_to( p ) && will_move_to( p ); } float monster::rate_target( Creature &c, float best, bool smart ) const From 3d47cd386dc6fa1aad33490982e8e8b6d6120ee0 Mon Sep 17 00:00:00 2001 From: Sab Pyrope Date: Thu, 28 Mar 2024 08:52:29 +0800 Subject: [PATCH 14/42] Move ruined books from abstract.json --- data/json/items/book/abstract.json | 30 ------------------------------ data/json/items/book/misc.json | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/data/json/items/book/abstract.json b/data/json/items/book/abstract.json index fd31bc91dcba5..0d2a9524c5a3e 100644 --- a/data/json/items/book/abstract.json +++ b/data/json/items/book/abstract.json @@ -367,35 +367,5 @@ "use_action": [ "MA_MANUAL" ], "intelligence": 9, "time": "10 m" - }, - { - "type": "GENERIC", - "id": "book_ruined", - "category": "books", - "symbol": ",", - "color": "white", - "name": { "str": "ruined book" }, - "description": "A ruined book. Someone has thoroughly ruined this book by ripping pages out and covering the remainder in… is that paint?", - "price": 0, - "price_postapoc": 0, - "material": [ "paper" ], - "flags": [ "TRADER_AVOID" ], - "weight": "1587 g", - "volume": "1500 ml" - }, - { - "type": "GENERIC", - "id": "book_pieces", - "category": "books", - "symbol": ",", - "color": "white", - "name": { "str_sp": "pieces of books" }, - "description": "Scraps of paper that used to be part of a book. Completely useless now.", - "price": 0, - "price_postapoc": 0, - "material": [ "paper" ], - "flags": [ "TRADER_AVOID" ], - "weight": "120 g", - "volume": "200 ml" } ] diff --git a/data/json/items/book/misc.json b/data/json/items/book/misc.json index 2ce7f5c9c3d3d..4ee974f2ef1b6 100644 --- a/data/json/items/book/misc.json +++ b/data/json/items/book/misc.json @@ -1452,5 +1452,35 @@ "description": "A history of the development of Rabbinic Judaism, from the Jewish Revolt in the first century to the writing of the Mishnah, and how Judaism and Christianity fully separated." } ] + }, + { + "type": "GENERIC", + "id": "book_ruined", + "category": "books", + "symbol": ",", + "color": "white", + "name": { "str": "ruined book" }, + "description": "A ruined book. Someone has thoroughly ruined this book by ripping pages out and covering the remainder in… is that paint?", + "price": 0, + "price_postapoc": 0, + "material": [ "paper" ], + "flags": [ "TRADER_AVOID" ], + "weight": "1587 g", + "volume": "1500 ml" + }, + { + "type": "GENERIC", + "id": "book_pieces", + "category": "books", + "symbol": ",", + "color": "white", + "name": { "str_sp": "pieces of books" }, + "description": "Scraps of paper that used to be part of a book. Completely useless now.", + "price": 0, + "price_postapoc": 0, + "material": [ "paper" ], + "flags": [ "TRADER_AVOID" ], + "weight": "120 g", + "volume": "200 ml" } ] From fd2687a5ec3dff0515c06ea6c20bd33e31a40607 Mon Sep 17 00:00:00 2001 From: carlarctg <53100513+carlarctg@users.noreply.github.com> Date: Wed, 27 Mar 2024 22:57:49 -0300 Subject: [PATCH 15/42] Removed Bore mod location from guns that don't use it, standar-ished mechanism slots to 2. (#72246) * Removed the Bore mod location for most guns, set mechanism location to 2 * Fix replace typos * Fix oversight foound by LetterShapedGlyphs * Sets gauss array to barrel mod * Removes magazine mod slot as well, completley unused * Fix tests? --- data/json/items/classes/gun.json | 29 ++++-------- data/json/items/gun/12mm.json | 2 +- data/json/items/gun/20x66mm.json | 6 +-- data/json/items/gun/22.json | 17 ++----- data/json/items/gun/223.json | 45 ++++++++---------- data/json/items/gun/270win.json | 3 +- data/json/items/gun/300.json | 9 ++-- data/json/items/gun/3006.json | 14 ++---- data/json/items/gun/300BLK.json | 6 +-- data/json/items/gun/303.json | 6 +-- data/json/items/gun/308.json | 24 ++++------ data/json/items/gun/30carbine.json | 3 +- data/json/items/gun/32.json | 6 +-- data/json/items/gun/338lapua.json | 7 ++- data/json/items/gun/38.json | 10 ++-- data/json/items/gun/380.json | 3 +- data/json/items/gun/38super.json | 4 +- data/json/items/gun/40.json | 17 ++----- data/json/items/gun/44.json | 8 ++-- data/json/items/gun/45.json | 17 +++---- data/json/items/gun/450bushmaster.json | 3 +- data/json/items/gun/454.json | 2 +- data/json/items/gun/4570.json | 6 +-- data/json/items/gun/45colt.json | 4 +- data/json/items/gun/46.json | 2 +- data/json/items/gun/50.json | 6 +-- data/json/items/gun/500.json | 2 +- data/json/items/gun/545x39.json | 6 +-- data/json/items/gun/57.json | 10 ++-- data/json/items/gun/762.json | 21 +++------ data/json/items/gun/762R.json | 7 ++- data/json/items/gun/762x25.json | 2 +- data/json/items/gun/77mm_jap.json | 3 +- data/json/items/gun/84x246mm.json | 4 +- data/json/items/gun/8x40mm.json | 12 ++--- data/json/items/gun/9mm.json | 46 ++++++------------- data/json/items/gun/9x18.json | 3 +- data/json/items/gun/artisan_guns.json | 2 +- data/json/items/gun/combination.json | 3 +- data/json/items/gun/exodii.json | 3 +- data/json/items/gun/shot.json | 26 ++++------- data/json/items/ranged/crossbows.json | 8 ++-- data/json/items/ranged/energy.json | 2 +- data/mods/Aftershock/items/gun/5x50.json | 4 +- data/mods/Aftershock/items/gun/7.50mm.json | 3 +- data/mods/Aftershock/items/gun/shot.json | 13 +----- .../Aftershock/items/gunmods/shotguns.json | 2 +- data/mods/Aftershock/items/weapons.json | 2 +- .../items/vehicle/blaze_gun.json | 6 +-- .../Generic_Guns/firearms/pistol_magnum.json | 3 +- .../Magiclysm/items/enchanted_ranged.json | 2 +- data/mods/TEST_DATA/pocket_mods_test.json | 1 - data/mods/Xedra_Evolved/items/guns.json | 2 +- data/mods/Xedra_Evolved/items/range.json | 2 +- 54 files changed, 164 insertions(+), 295 deletions(-) diff --git a/data/json/items/classes/gun.json b/data/json/items/classes/gun.json index e86faf0887431..929f73ca352b0 100644 --- a/data/json/items/classes/gun.json +++ b/data/json/items/classes/gun.json @@ -61,10 +61,9 @@ "handling": 10, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "magazine", 1 ], [ "muzzle", 1 ], [ "rail", 1 ], @@ -81,10 +80,9 @@ "//": "usually pre-1990's pistols that lack underbarrel rails, and sight mounting locations.", "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "magazine", 1 ], [ "muzzle", 1 ], [ "sights mount", 1 ], @@ -101,7 +99,6 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "belt clip", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], [ "mechanism", 2 ], @@ -123,9 +120,8 @@ "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "sights", 1 ], [ "stock", 1 ], [ "rail mount", 1 ], @@ -140,8 +136,8 @@ "reload": 150, "extend": { "flags": [ "RELOAD_ONE", "NO_UNLOAD", "EASY_CLEAN" ] }, "//": "Slower reloads, no unloading. Base, unskilled person should take 1.5 seconds per chamber. No underbarrel mods, that's where the ram goes.", - "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], - "valid_mod_locations": [ [ "barrel", 1 ], [ "bore", 1 ], [ "grip", 1 ], [ "stock", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ] ] + "valid_mod_locations": [ [ "barrel", 1 ], [ "grip", 1 ], [ "stock", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ] ], + "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ] }, { "abstract": "rifle_base", @@ -151,10 +147,9 @@ "skill": "rifle", "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "magazine", 1 ], [ "muzzle", 1 ], [ "rail", 2 ], @@ -174,10 +169,9 @@ "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -195,10 +189,9 @@ "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ], @@ -231,10 +224,9 @@ "ammo": [ "shot" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip mount", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ], @@ -261,10 +253,9 @@ "name": { "str": "base race shotgun, pump", "str_pl": "base race shotguns, pump" }, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip mount", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "loading port", 1 ], [ "rail mount", 1 ], diff --git a/data/json/items/gun/12mm.json b/data/json/items/gun/12mm.json index 9279ab623ed74..6c618d79f49ad 100644 --- a/data/json/items/gun/12mm.json +++ b/data/json/items/gun/12mm.json @@ -21,7 +21,7 @@ "energy_drain": "5 kJ", "valid_mod_locations": [ [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "rail", 1 ], [ "sights", 1 ], [ "sling", 1 ], diff --git a/data/json/items/gun/20x66mm.json b/data/json/items/gun/20x66mm.json index cdc3429f1d894..7e2aa49b0b959 100644 --- a/data/json/items/gun/20x66mm.json +++ b/data/json/items/gun/20x66mm.json @@ -26,7 +26,7 @@ "barrel_volume": "750 ml", "valid_mod_locations": [ [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -63,7 +63,7 @@ "modes": [ [ "DEFAULT", "semi-auto", 1 ], [ "AUTO", "auto", 2 ] ], "valid_mod_locations": [ [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -101,7 +101,7 @@ "default_mods": [ "pistol_stock" ], "valid_mod_locations": [ [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "rail", 1 ], [ "sights", 1 ], [ "stock", 1 ], diff --git a/data/json/items/gun/22.json b/data/json/items/gun/22.json index a91b30765bd0c..2f584d1467290 100644 --- a/data/json/items/gun/22.json +++ b/data/json/items/gun/22.json @@ -35,10 +35,9 @@ "barrel_volume": "250 ml", "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -89,10 +88,9 @@ "clip_size": 19, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights", 1 ], @@ -146,7 +144,6 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "belt clip", 1 ], - [ "bore", 1 ], [ "grip", 1 ], [ "mechanism", 2 ], [ "sights mount", 1 ], @@ -237,10 +234,9 @@ "barrel_volume": "500 ml", "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights", 1 ], @@ -319,10 +315,9 @@ "min_cycle_recoil": 39, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ], @@ -368,10 +363,9 @@ "weapon_category": [ "AUTOMATIC_PISTOLS" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights", 1 ], @@ -412,7 +406,6 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "belt clip", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], [ "mechanism", 2 ], diff --git a/data/json/items/gun/223.json b/data/json/items/gun/223.json index b3c9d21543700..29cdebc68aafa 100644 --- a/data/json/items/gun/223.json +++ b/data/json/items/gun/223.json @@ -21,7 +21,7 @@ "durability": 7, "min_cycle_recoil": 1350, "weapon_category": [ "AUTOMATIC_RIFLES" ], - "valid_mod_locations": [ [ "bore", 1 ], [ "grip", 1 ], [ "mechanism", 4 ], [ "sling", 1 ], [ "stock accessory", 2 ], [ "stock", 1 ] ], + "valid_mod_locations": [ [ "bore", 1 ], [ "grip", 1 ], [ "mechanism", 2 ], [ "sling", 1 ], [ "stock accessory", 2 ], [ "stock", 1 ] ], "flags": [ "NO_TURRET" ], "//3": "This should be removed once vehicle turrets are capable of mounting guns with mods attached. As it stands, trying to mount this style of weapon would require the player to remove the conversion kit, thus rendering it unusable anyhow.", "melee_damage": { "bash": 12 } @@ -54,8 +54,7 @@ [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], - [ "magazine", 1 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 2 ], [ "sights", 1 ], @@ -125,8 +124,7 @@ [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], - [ "magazine", 1 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 2 ], [ "sights", 1 ], @@ -188,8 +186,7 @@ [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip mount", 1 ], - [ "mechanism", 4 ], - [ "magazine", 1 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "sights mount", 1 ], [ "sling", 1 ], @@ -280,7 +277,7 @@ [ "bore", 1 ], [ "bayonet lug", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "sling", 1 ], [ "stock accessory", 2 ], [ "stock", 1 ] @@ -316,7 +313,7 @@ [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 2 ], [ "sights", 1 ], @@ -415,7 +412,7 @@ [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -499,7 +496,7 @@ "weapon_category": [ "AUTOMATIC_RIFLES" ], "modes": [ [ "DEFAULT", "semi-auto", 1 ], [ "AUTO", "auto", 4 ] ], "default_mods": [ "retool_ar15_223rem_medium" ], - "valid_mod_locations": [ [ "bore", 1 ], [ "grip", 1 ], [ "mechanism", 4 ], [ "sling", 1 ], [ "stock accessory", 2 ], [ "stock", 1 ] ], + "valid_mod_locations": [ [ "bore", 1 ], [ "grip", 1 ], [ "mechanism", 2 ], [ "sling", 1 ], [ "stock accessory", 2 ], [ "stock", 1 ] ], "flags": [ "NO_TURRET" ], "//2": "This should be removed once vehicle turrets are capable of mounting guns with mods attached. As it stands, trying to mount this style of weapon would require the player to remove the conversion kit, thus rendering it unusable anyhow.", "melee_damage": { "bash": 12 } @@ -533,7 +530,7 @@ "durability": 7, "weapon_category": [ "AUTOMATIC_RIFLES" ], "modes": [ [ "DEFAULT", "semi-auto", 1 ], [ "BURST", "3 rd.", 3 ] ], - "valid_mod_locations": [ [ "bore", 1 ], [ "grip", 1 ], [ "mechanism", 4 ], [ "sling", 1 ], [ "stock accessory", 2 ], [ "stock", 1 ] ], + "valid_mod_locations": [ [ "bore", 1 ], [ "grip", 1 ], [ "mechanism", 2 ], [ "sling", 1 ], [ "stock accessory", 2 ], [ "stock", 1 ] ], "flags": [ "NO_TURRET" ], "//2": "This should be removed once vehicle turrets are capable of mounting guns with mods attached. As it stands, trying to mount this style of weapon would require the player to remove the conversion kit, thus rendering it unusable anyhow.", "melee_damage": { "bash": 12 } @@ -593,8 +590,7 @@ [ "barrel", 1 ], [ "bore", 1 ], [ "brass catcher", 1 ], - [ "mechanism", 4 ], - [ "magazine", 1 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 2 ], [ "sights mount", 1 ], @@ -658,8 +654,7 @@ [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], - [ "magazine", 1 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 2 ], [ "sights", 1 ], @@ -720,7 +715,7 @@ [ "barrel", 1 ], [ "bore", 1 ], [ "brass catcher", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "sights", 1 ], [ "sling", 1 ], @@ -830,8 +825,7 @@ [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], - [ "magazine", 1 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -876,7 +870,7 @@ [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 2 ], [ "sights mount", 1 ], @@ -921,7 +915,7 @@ [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ], @@ -964,7 +958,7 @@ "valid_mod_locations": [ [ "bore", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "rail", 2 ], [ "sights", 1 ], [ "sling", 1 ], @@ -1038,7 +1032,7 @@ [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -1106,7 +1100,7 @@ "valid_mod_locations": [ [ "bore", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "rail", 2 ], [ "sights", 1 ], [ "sling", 1 ], @@ -1152,8 +1146,7 @@ [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], - [ "magazine", 1 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 2 ], [ "sights", 1 ], diff --git a/data/json/items/gun/270win.json b/data/json/items/gun/270win.json index aa8a079bccf77..4dc21e9650567 100644 --- a/data/json/items/gun/270win.json +++ b/data/json/items/gun/270win.json @@ -33,9 +33,8 @@ "flags": [ "RELOAD_ONE", "NEVER_JAMS", "EASY_CLEAN" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "sights", 1 ], [ "sling", 1 ], diff --git a/data/json/items/gun/300.json b/data/json/items/gun/300.json index ff5d0bc9df96a..171a89f238bc6 100644 --- a/data/json/items/gun/300.json +++ b/data/json/items/gun/300.json @@ -49,9 +49,8 @@ "flags": [ "RELOAD_ONE", "EASY_CLEAN" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "sights", 1 ], [ "sling", 1 ], @@ -88,9 +87,8 @@ "flags": [ "RELOAD_ONE", "EASY_CLEAN" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "sights mount", 1 ], [ "sling", 1 ], @@ -127,10 +125,9 @@ "barrel_volume": "456 ml", "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], diff --git a/data/json/items/gun/3006.json b/data/json/items/gun/3006.json index 0fdb2a7d6036e..2ee698b6e43cf 100644 --- a/data/json/items/gun/3006.json +++ b/data/json/items/gun/3006.json @@ -24,10 +24,9 @@ "barrel_volume": "500 ml", "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights", 1 ], @@ -69,7 +68,7 @@ [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip mount", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights", 1 ], @@ -106,10 +105,9 @@ "barrel_volume": "250 ml", "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "bayonet lug", 1 ], [ "brass catcher", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "sights mount", 1 ], [ "sling", 1 ], @@ -152,10 +150,9 @@ "default_mods": [ "bipod" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ], @@ -226,9 +223,8 @@ "clip_size": 4, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], diff --git a/data/json/items/gun/300BLK.json b/data/json/items/gun/300BLK.json index 6fd59f9c1f346..01144b32b0dad 100644 --- a/data/json/items/gun/300BLK.json +++ b/data/json/items/gun/300BLK.json @@ -78,8 +78,7 @@ [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], - [ "magazine", 1 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -136,8 +135,7 @@ "valid_mod_locations": [ [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], - [ "magazine", 1 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], diff --git a/data/json/items/gun/303.json b/data/json/items/gun/303.json index b294f07288272..7821f91de5851 100644 --- a/data/json/items/gun/303.json +++ b/data/json/items/gun/303.json @@ -32,9 +32,8 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "bayonet lug", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "sights mount", 1 ], [ "sling", 1 ], @@ -78,10 +77,9 @@ "flags": [ "EASY_CLEAN" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "bayonet lug", 1 ], [ "brass catcher", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "sights mount", 1 ], [ "sling", 1 ], diff --git a/data/json/items/gun/308.json b/data/json/items/gun/308.json index 70b50b8fdb07c..392a6ca30a5a2 100644 --- a/data/json/items/gun/308.json +++ b/data/json/items/gun/308.json @@ -122,10 +122,9 @@ "modes": [ [ "DEFAULT", "semi-auto", 1 ], [ "AUTO", "auto", 4 ] ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -167,9 +166,8 @@ "barrel_volume": "500 ml", "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "sights mount", 1 ], [ "sling", 1 ], @@ -208,10 +206,9 @@ "built_in_mods": [ "bipod" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -248,10 +245,9 @@ "built_in_mods": [ "bipod" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -345,12 +341,11 @@ "clip_size": 5, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "muzzle", 1 ], [ "sling", 1 ], [ "stock mount", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "sights", 1 ], [ "grip mount", 1 ], [ "rail mount", 1 ], @@ -441,10 +436,9 @@ "min_cycle_recoil": 2700, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ], @@ -517,8 +511,7 @@ "min_cycle_recoil": 2700, "valid_mod_locations": [ [ "grip", 1 ], - [ "mechanism", 4 ], - [ "magazine", 1 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 2 ], [ "sights", 1 ], @@ -563,13 +556,12 @@ "clip_size": 5, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "muzzle", 1 ], [ "sling", 1 ], [ "stock", 1 ], [ "stock accessory", 2 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "sights", 1 ], [ "underbarrel", 1 ], [ "underbarrel mount", 1 ] diff --git a/data/json/items/gun/30carbine.json b/data/json/items/gun/30carbine.json index 425fb57c8a7be..df67d34058a52 100644 --- a/data/json/items/gun/30carbine.json +++ b/data/json/items/gun/30carbine.json @@ -22,10 +22,9 @@ "min_cycle_recoil": 900, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "bayonet lug", 1 ], [ "brass catcher", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "sights mount", 1 ], [ "sling", 1 ], diff --git a/data/json/items/gun/32.json b/data/json/items/gun/32.json index bb5420c9dc5f6..37ee0ca12edbd 100644 --- a/data/json/items/gun/32.json +++ b/data/json/items/gun/32.json @@ -23,10 +23,9 @@ "min_cycle_recoil": 135, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -64,10 +63,9 @@ "min_cycle_recoil": 135, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], diff --git a/data/json/items/gun/338lapua.json b/data/json/items/gun/338lapua.json index bf502b1dc56c7..b7ffb048b0869 100644 --- a/data/json/items/gun/338lapua.json +++ b/data/json/items/gun/338lapua.json @@ -66,9 +66,8 @@ "default_mods": [ "match_trigger", "muzzle_brake" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "sights", 1 ], [ "sling", 1 ], @@ -115,7 +114,7 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -159,7 +158,7 @@ "valid_mod_locations": [ [ "grip", 1 ], [ "bore", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "rail", 1 ], [ "sights", 1 ], [ "sling", 1 ], diff --git a/data/json/items/gun/38.json b/data/json/items/gun/38.json index 940522b6683e9..20df29b7cb60c 100644 --- a/data/json/items/gun/38.json +++ b/data/json/items/gun/38.json @@ -56,7 +56,6 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "belt clip", 1 ], - [ "bore", 1 ], [ "grip", 1 ], [ "mechanism", 2 ], [ "sights mount", 1 ], @@ -126,9 +125,8 @@ "clip_size": 6, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "rail mount", 1 ], [ "sights mount", 1 ], [ "stock mount", 1 ], @@ -211,9 +209,8 @@ "clip_size": 5, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "rail mount", 1 ], [ "sights mount", 1 ], [ "stock mount", 1 ], @@ -254,9 +251,8 @@ "clip_size": 7, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "rail", 1 ], [ "sights", 1 ], [ "stock", 1 ], diff --git a/data/json/items/gun/380.json b/data/json/items/gun/380.json index ed5ac0239bf68..a0015c1b8617b 100644 --- a/data/json/items/gun/380.json +++ b/data/json/items/gun/380.json @@ -168,10 +168,9 @@ "min_cycle_recoil": 270, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights", 1 ], diff --git a/data/json/items/gun/38super.json b/data/json/items/gun/38super.json index ea50c5c30ca37..f64522e0334c1 100644 --- a/data/json/items/gun/38super.json +++ b/data/json/items/gun/38super.json @@ -24,11 +24,9 @@ "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], - [ "magazine", 1 ], + [ "mechanism", 2 ], [ "rail", 1 ], [ "sights", 1 ], [ "stock", 1 ], diff --git a/data/json/items/gun/40.json b/data/json/items/gun/40.json index 65aac94ae19a0..64726eaf20f0f 100644 --- a/data/json/items/gun/40.json +++ b/data/json/items/gun/40.json @@ -51,10 +51,9 @@ "weapon_category": [ "AUTOMATIC_PISTOLS" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -115,10 +114,9 @@ "min_cycle_recoil": 504, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -161,7 +159,6 @@ [ "barrel", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "magazine", 1 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -198,15 +195,7 @@ "loudness": 25, "clip_size": 6, "reload": 200, - "valid_mod_locations": [ - [ "barrel", 1 ], - [ "bore", 1 ], - [ "grip", 1 ], - [ "sights", 1 ], - [ "stock", 1 ], - [ "underbarrel", 1 ], - [ "rail mount", 1 ] - ], + "valid_mod_locations": [ [ "barrel", 1 ], [ "grip", 1 ], [ "sights", 1 ], [ "stock", 1 ], [ "underbarrel", 1 ], [ "rail mount", 1 ] ], "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "flags": [ "RELOAD_ONE", "NEVER_JAMS", "RELOAD_EJECT" ], "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "40": 6 } } ], diff --git a/data/json/items/gun/44.json b/data/json/items/gun/44.json index 627216bc24b59..34255e82e904a 100644 --- a/data/json/items/gun/44.json +++ b/data/json/items/gun/44.json @@ -39,7 +39,7 @@ "//2": "NO_TURRET should be removed once vehicle turrets are capable of mounting guns with mods attached. As it stands, trying to mount this style of weapon would require the player to remove the conversion kit, thus rendering it unusable anyhow.", "weapon_category": [ "AUTOMATIC_PISTOLS" ], "pocket_data": [ { "pocket_type": "MAGAZINE_WELL", "item_restriction": [ "deaglemag" ] } ], - "valid_mod_locations": [ [ "bore", 1 ], [ "grip", 1 ], [ "mechanism", 4 ], [ "stock", 1 ], [ "underbarrel mount", 1 ] ], + "valid_mod_locations": [ [ "bore", 1 ], [ "grip", 1 ], [ "mechanism", 2 ], [ "stock", 1 ], [ "underbarrel mount", 1 ] ], "faults": [ "fault_gun_blackpowder", "fault_gun_dirt", "fault_gun_chamber_spent" ], "melee_damage": { "bash": 12 } }, @@ -67,10 +67,9 @@ "clip_size": 10, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "sights", 1 ], [ "sling", 1 ], @@ -161,9 +160,8 @@ "clip_size": 6, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "rail", 1 ], [ "sights", 1 ], [ "stock", 1 ], diff --git a/data/json/items/gun/45.json b/data/json/items/gun/45.json index b4a068ac1f2f5..f5b1542107499 100644 --- a/data/json/items/gun/45.json +++ b/data/json/items/gun/45.json @@ -38,10 +38,9 @@ "modes": [ [ "DEFAULT", "semi-auto", 1 ], [ "AUTO", "auto", 6 ] ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip mount", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -94,7 +93,7 @@ [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "rail", 1 ], [ "sights", 1 ], [ "sling", 1 ], @@ -182,10 +181,9 @@ "built_in_mods": [ "wire_stock" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -220,9 +218,8 @@ "min_cycle_recoil": 540, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "sights", 1 ], [ "sling", 1 ], @@ -264,7 +261,6 @@ [ "barrel", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "magazine", 1 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -339,10 +335,9 @@ "barrel_volume": "500 ml", "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -527,7 +522,7 @@ "valid_mod_locations": [ [ "brass catcher", 1 ], [ "grip mount", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "sling", 1 ], [ "rail mount", 1 ], diff --git a/data/json/items/gun/450bushmaster.json b/data/json/items/gun/450bushmaster.json index 4752e6451fa81..9a2dd1537cac8 100644 --- a/data/json/items/gun/450bushmaster.json +++ b/data/json/items/gun/450bushmaster.json @@ -21,9 +21,8 @@ "flags": [ "NEVER_JAMS", "EASY_CLEAN" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "sights", 1 ], [ "sling", 1 ], diff --git a/data/json/items/gun/454.json b/data/json/items/gun/454.json index 680d3702d7026..164837b5ee526 100644 --- a/data/json/items/gun/454.json +++ b/data/json/items/gun/454.json @@ -22,7 +22,7 @@ "durability": 8, "blackpowder_tolerance": 56, "clip_size": 5, - "valid_mod_locations": [ [ "grip", 1 ], [ "mechanism", 4 ], [ "rail", 1 ], [ "sights", 1 ], [ "stock mount", 1 ], [ "underbarrel mount", 1 ] ], + "valid_mod_locations": [ [ "grip", 1 ], [ "mechanism", 2 ], [ "rail", 1 ], [ "sights", 1 ], [ "stock mount", 1 ], [ "underbarrel mount", 1 ] ], "pocket_data": [ { "pocket_type": "MAGAZINE", diff --git a/data/json/items/gun/4570.json b/data/json/items/gun/4570.json index fa1c27412bf86..018acfd6e1d9b 100644 --- a/data/json/items/gun/4570.json +++ b/data/json/items/gun/4570.json @@ -24,7 +24,7 @@ "valid_mod_locations": [ [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "sights", 1 ], [ "sling", 1 ], @@ -63,7 +63,7 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "sights", 1 ], [ "rail mount", 1 ], [ "stock mount", 1 ], @@ -100,7 +100,7 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "sights", 1 ], [ "sling", 1 ], diff --git a/data/json/items/gun/45colt.json b/data/json/items/gun/45colt.json index 2fcb6fdaca627..f143c29a7a42f 100644 --- a/data/json/items/gun/45colt.json +++ b/data/json/items/gun/45colt.json @@ -25,7 +25,6 @@ "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "grip", 1 ], [ "mechanism", 2 ], [ "sights mount", 1 ], @@ -62,9 +61,8 @@ "flags": [ "RELOAD_ONE" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "sights mount", 1 ], [ "sling", 1 ], diff --git a/data/json/items/gun/46.json b/data/json/items/gun/46.json index 558fafdb7c1f9..90323c445a967 100644 --- a/data/json/items/gun/46.json +++ b/data/json/items/gun/46.json @@ -28,7 +28,7 @@ [ "barrel", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], diff --git a/data/json/items/gun/50.json b/data/json/items/gun/50.json index 28f278e339f98..f76e55fe30382 100644 --- a/data/json/items/gun/50.json +++ b/data/json/items/gun/50.json @@ -50,11 +50,10 @@ "modes": [ [ "DEFAULT", "semi-auto", 1 ], [ "AUTO", "auto", 3 ] ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "sights", 1 ], [ "sling", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "underbarrel mount", 1 ] @@ -143,9 +142,8 @@ "barrel_volume": "1250 ml", "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], diff --git a/data/json/items/gun/500.json b/data/json/items/gun/500.json index e2383ee34be2f..29b2615f8e220 100644 --- a/data/json/items/gun/500.json +++ b/data/json/items/gun/500.json @@ -30,7 +30,7 @@ "durability": 8, "blackpowder_tolerance": 56, "clip_size": 5, - "valid_mod_locations": [ [ "grip", 1 ], [ "mechanism", 4 ], [ "rail", 1 ], [ "sights", 1 ], [ "stock mount", 1 ], [ "underbarrel mount", 1 ] ], + "valid_mod_locations": [ [ "grip", 1 ], [ "mechanism", 2 ], [ "rail", 1 ], [ "sights", 1 ], [ "stock mount", 1 ], [ "underbarrel mount", 1 ] ], "pocket_data": [ { "pocket_type": "MAGAZINE", diff --git a/data/json/items/gun/545x39.json b/data/json/items/gun/545x39.json index 2c764dd81b0b2..a47fb7ac10280 100644 --- a/data/json/items/gun/545x39.json +++ b/data/json/items/gun/545x39.json @@ -36,11 +36,10 @@ "default_mods": [ "offset_sight_rail" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights mount", 1 ], @@ -78,11 +77,10 @@ "default_mods": [ "bars", "wire_stock" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], diff --git a/data/json/items/gun/57.json b/data/json/items/gun/57.json index df92cb5684715..6cbb52610730c 100644 --- a/data/json/items/gun/57.json +++ b/data/json/items/gun/57.json @@ -37,7 +37,7 @@ [ "barrel", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -83,7 +83,7 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "brass catcher", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -131,7 +131,7 @@ [ "barrel", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -179,7 +179,7 @@ [ "barrel", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -221,7 +221,7 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "brass catcher", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], diff --git a/data/json/items/gun/762.json b/data/json/items/gun/762.json index a71f2fd13b8d9..920faa8a98016 100644 --- a/data/json/items/gun/762.json +++ b/data/json/items/gun/762.json @@ -22,11 +22,10 @@ "modes": [ [ "DEFAULT", "semi-auto", 1 ], [ "AUTO", "auto", 4 ] ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ], @@ -64,11 +63,10 @@ "default_mods": [ "folding_stock" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -107,10 +105,9 @@ "built_in_mods": [ "inter_bayonet" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -153,11 +150,10 @@ "min_cycle_recoil": 1832, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ], @@ -192,10 +188,9 @@ "min_cycle_recoil": 1832, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ], @@ -278,11 +273,10 @@ "modes": [ [ "DEFAULT", "semi-auto", 1 ], [ "AUTO", "auto", 4 ] ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ], @@ -353,11 +347,10 @@ "default_mods": [ "folding_stock", "muzzle_brake" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], diff --git a/data/json/items/gun/762R.json b/data/json/items/gun/762R.json index b67f0570bdb30..0d7e0c3a93fca 100644 --- a/data/json/items/gun/762R.json +++ b/data/json/items/gun/762R.json @@ -42,7 +42,7 @@ [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip mount", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights", 1 ], @@ -98,7 +98,7 @@ [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip mount", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights", 1 ], @@ -136,11 +136,10 @@ "modes": [ [ "DEFAULT", "semi-auto", 1 ] ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ], diff --git a/data/json/items/gun/762x25.json b/data/json/items/gun/762x25.json index 25d1abca30f5f..bd58d58ccef36 100644 --- a/data/json/items/gun/762x25.json +++ b/data/json/items/gun/762x25.json @@ -37,7 +37,7 @@ [ "barrel", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "sights", 1 ], [ "sling", 1 ], diff --git a/data/json/items/gun/77mm_jap.json b/data/json/items/gun/77mm_jap.json index 28dfe883a4da7..92e9cc4fd6b97 100644 --- a/data/json/items/gun/77mm_jap.json +++ b/data/json/items/gun/77mm_jap.json @@ -37,10 +37,9 @@ "flags": [ "RELOAD_ONE", "NEVER_JAMS", "EASY_CLEAN" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "bayonet lug", 1 ], [ "brass catcher", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "sights mount", 1 ], [ "sling", 1 ], [ "grip mount", 1 ], diff --git a/data/json/items/gun/84x246mm.json b/data/json/items/gun/84x246mm.json index 5883a59b323e7..2e2614b0c211c 100644 --- a/data/json/items/gun/84x246mm.json +++ b/data/json/items/gun/84x246mm.json @@ -24,7 +24,7 @@ "clip_size": 1, "reload": 300, "loudness": 200, - "valid_mod_locations": [ [ "sling", 1 ], [ "grip", 1 ], [ "mechanism", 4 ], [ "sights", 1 ] ], + "valid_mod_locations": [ [ "sling", 1 ], [ "grip", 1 ], [ "mechanism", 2 ], [ "sights", 1 ] ], "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "84x246mm": 1 } } ], "melee_damage": { "bash": 8 } }, @@ -41,7 +41,7 @@ "weight": "6900 g", "volume": "5730 ml", "longest_side": "1000 mm", - "valid_mod_locations": [ [ "sling", 1 ], [ "grip", 1 ], [ "mechanism", 4 ], [ "sights", 1 ], [ "rail", 1 ], [ "underbarrel", 1 ] ] + "valid_mod_locations": [ [ "sling", 1 ], [ "grip", 1 ], [ "mechanism", 2 ], [ "sights", 1 ], [ "rail", 1 ], [ "underbarrel", 1 ] ] }, { "id": "AT4", diff --git a/data/json/items/gun/8x40mm.json b/data/json/items/gun/8x40mm.json index e8033fa2315f7..c68cb88aed5d2 100644 --- a/data/json/items/gun/8x40mm.json +++ b/data/json/items/gun/8x40mm.json @@ -24,7 +24,7 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -63,7 +63,7 @@ "built_in_mods": [ "riv_scope" ], "valid_mod_locations": [ [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -98,7 +98,7 @@ "modes": [ [ "DEFAULT", "semi-auto", 1 ], [ "AUTO", "auto", 4 ] ], "valid_mod_locations": [ [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -132,7 +132,7 @@ "modes": [ [ "DEFAULT", "semi-auto", 1 ], [ "AUTO", "auto", 3 ] ], "valid_mod_locations": [ [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -171,7 +171,7 @@ "valid_mod_locations": [ [ "barrel", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "rail", 1 ], [ "sights", 1 ], [ "sling", 1 ], @@ -206,7 +206,7 @@ "barrel_volume": "500 ml", "valid_mod_locations": [ [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "rail", 1 ], [ "sights", 1 ], [ "sling", 1 ], diff --git a/data/json/items/gun/9mm.json b/data/json/items/gun/9mm.json index fac15475d9064..5d0074f983d88 100644 --- a/data/json/items/gun/9mm.json +++ b/data/json/items/gun/9mm.json @@ -35,10 +35,9 @@ "modes": [ [ "DEFAULT", "semi-auto", 1 ], [ "AUTO", "auto", 4 ] ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -85,10 +84,9 @@ "barrel_volume": "250 ml", "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -178,10 +176,9 @@ "modes": [ [ "DEFAULT", "semi-auto", 1 ], [ "BURST", "3 rd.", 3 ], [ "AUTO", "auto", 4 ] ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ], @@ -234,10 +231,9 @@ "built_in_mods": [ "folding_stock", "grip" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ], @@ -263,10 +259,9 @@ "dispersion": 270, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights", 1 ], @@ -341,11 +336,9 @@ "min_cycle_recoil": 450, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], - [ "magazine", 1 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ], @@ -388,10 +381,8 @@ "modes": [ [ "DEFAULT", "burst", 4 ] ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], - [ "mechanism", 4 ], - [ "magazine", 1 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "sling", 1 ], [ "stock mount", 1 ], @@ -435,10 +426,9 @@ "modes": [ [ "DEFAULT", "semi-auto", 1 ] ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ], @@ -512,9 +502,7 @@ "modes": [ [ "DEFAULT", "burst", 4 ] ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], - [ "mechanism", 4 ], - [ "magazine", 1 ], + [ "mechanism", 2 ], [ "brass catcher", 1 ], [ "muzzle", 1 ], [ "sling", 1 ], @@ -541,7 +529,6 @@ "modes": [ [ "DEFAULT", "semi-auto", 1 ] ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "muzzle", 1 ], [ "sling", 1 ], @@ -580,10 +567,9 @@ "built_in_mods": [ "sub2000_folding_mechanism" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -708,7 +694,6 @@ [ "barrel", 1 ], [ "brass catcher", 1 ], [ "grip mount", 1 ], - [ "magazine", 1 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ], @@ -782,10 +767,9 @@ "min_cycle_recoil": 450, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ], @@ -863,11 +847,10 @@ "built_in_mods": [ "wire_stock" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ], @@ -1293,10 +1276,9 @@ "modes": [ [ "DEFAULT", "semi-auto", 1 ], [ "AUTO", "auto", 4 ] ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights mount", 1 ], @@ -1340,7 +1322,7 @@ [ "barrel", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 3 ], [ "sights", 1 ], diff --git a/data/json/items/gun/9x18.json b/data/json/items/gun/9x18.json index a983a8eb56302..4a06046f5ef4e 100644 --- a/data/json/items/gun/9x18.json +++ b/data/json/items/gun/9x18.json @@ -31,10 +31,9 @@ "weapon_category": [ "AUTOMATIC_PISTOLS" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], diff --git a/data/json/items/gun/artisan_guns.json b/data/json/items/gun/artisan_guns.json index 7b4d1c1f02076..a82e5b134b69a 100644 --- a/data/json/items/gun/artisan_guns.json +++ b/data/json/items/gun/artisan_guns.json @@ -20,7 +20,7 @@ "dispersion": 180, "barrel_volume": "-500 ml" }, - "valid_mod_locations": [ [ "mechanism", 4 ], [ "sling", 1 ], [ "underbarrel mount", 1 ] ], + "valid_mod_locations": [ [ "mechanism", 2 ], [ "sling", 1 ], [ "underbarrel mount", 1 ] ], "to_hit": { "grip": "solid", "length": "short", "surface": "any", "balance": "uneven" }, "qualities": [ [ "HAMMER", 1 ] ], "extend": { "flags": [ "DURABLE_MELEE" ] }, diff --git a/data/json/items/gun/combination.json b/data/json/items/gun/combination.json index b9acda69e3a5b..af556351a6425 100644 --- a/data/json/items/gun/combination.json +++ b/data/json/items/gun/combination.json @@ -28,10 +28,9 @@ "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "conversion", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "sights", 1 ], [ "sling", 1 ], [ "stock mount", 1 ], diff --git a/data/json/items/gun/exodii.json b/data/json/items/gun/exodii.json index d4922d4c2b04a..d71f836c83752 100644 --- a/data/json/items/gun/exodii.json +++ b/data/json/items/gun/exodii.json @@ -158,11 +158,10 @@ "modes": [ [ "DEFAULT", "burst", 2 ], [ "SEMI", "semi-auto", 1 ], [ "AUTO", "auto", 5 ] ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], diff --git a/data/json/items/gun/shot.json b/data/json/items/gun/shot.json index f7d48d14b81a9..318892a66bc7a 100644 --- a/data/json/items/gun/shot.json +++ b/data/json/items/gun/shot.json @@ -26,7 +26,7 @@ "valid_mod_locations": [ [ "grip", 1 ], [ "stock mount", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "sights mount", 1 ], [ "rail mount", 1 ], [ "underbarrel mount", 1 ] @@ -92,10 +92,9 @@ "built_in_mods": [ "ksg_aux_shotgun" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip mount", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights", 1 ], @@ -137,10 +136,9 @@ "built_in_mods": [ "ksg25_aux_shotgun" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip mount", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail mount", 1 ], [ "sights", 1 ], @@ -216,11 +214,10 @@ "barrel_volume": "0 ml", "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "bayonet lug", 1 ], [ "brass catcher", 1 ], [ "grip mount", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "loading port", 1 ], [ "rail mount", 1 ], @@ -273,7 +270,7 @@ [ "rail mount", 1 ], [ "loading port", 1 ], [ "brass catcher", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "sights", 1 ], [ "underbarrel mount", 1 ] ], @@ -420,11 +417,10 @@ "built_in_mods": [ "breacher_grip" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], [ "loading port", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "rail mount", 1 ], [ "sights", 1 ], [ "sling", 1 ], @@ -524,7 +520,7 @@ "valid_mod_locations": [ [ "sling", 1 ], [ "stock mount", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "barrel", 1 ], [ "brass catcher", 1 ], [ "grip mount", 1 ], @@ -554,7 +550,6 @@ "barrel_volume": "494 ml", "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "sights mount", 1 ], [ "sling", 1 ], [ "mechanism", 2 ], @@ -588,7 +583,6 @@ "barrel_volume": "670 ml", "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "muzzle", 1 ], [ "mechanism", 1 ], [ "sights mount", 1 ], @@ -634,10 +628,9 @@ "built_in_mods": [ "wire_stock" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "rail mount", 1 ], [ "sights mount", 1 ], [ "sling", 1 ], @@ -678,10 +671,9 @@ "sight_dispersion": 500, "built_in_mods": [ "ts12_aux_shotgun", "ts12_aux_shotgun2" ], "valid_mod_locations": [ - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip mount", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "underbarrel", 2 ], [ "rail mount", 1 ], diff --git a/data/json/items/ranged/crossbows.json b/data/json/items/ranged/crossbows.json index a3e9d18199268..72b20e108d598 100644 --- a/data/json/items/ranged/crossbows.json +++ b/data/json/items/ranged/crossbows.json @@ -206,7 +206,7 @@ "loudness": 3, "valid_mod_locations": [ [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "rail", 1 ], [ "sights", 1 ], [ "sling", 1 ], @@ -244,7 +244,7 @@ "reload": 1200, "valid_mod_locations": [ [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "rail", 1 ], [ "sights", 1 ], [ "stock", 1 ], @@ -319,7 +319,7 @@ "reload": 1200, "valid_mod_locations": [ [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "rail", 1 ], [ "sights", 1 ], [ "sling", 1 ], @@ -360,7 +360,7 @@ "reload": 1200, "valid_mod_locations": [ [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "rail", 1 ], [ "sights", 1 ], [ "sling", 1 ], diff --git a/data/json/items/ranged/energy.json b/data/json/items/ranged/energy.json index 6cd5df6eb18e9..56ec313c8116d 100644 --- a/data/json/items/ranged/energy.json +++ b/data/json/items/ranged/energy.json @@ -66,7 +66,7 @@ "valid_mod_locations": [ [ "emitter", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "rail", 1 ], [ "sights", 1 ], [ "sling", 1 ], diff --git a/data/mods/Aftershock/items/gun/5x50.json b/data/mods/Aftershock/items/gun/5x50.json index a433f6dacf3d4..e95cdef06074d 100644 --- a/data/mods/Aftershock/items/gun/5x50.json +++ b/data/mods/Aftershock/items/gun/5x50.json @@ -42,7 +42,7 @@ [ "barrel", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -80,7 +80,7 @@ "valid_mod_locations": [ [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], diff --git a/data/mods/Aftershock/items/gun/7.50mm.json b/data/mods/Aftershock/items/gun/7.50mm.json index 3a259dffaec55..8899d31afe8bc 100644 --- a/data/mods/Aftershock/items/gun/7.50mm.json +++ b/data/mods/Aftershock/items/gun/7.50mm.json @@ -72,10 +72,9 @@ "built_in_mods": [ "bipod" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], diff --git a/data/mods/Aftershock/items/gun/shot.json b/data/mods/Aftershock/items/gun/shot.json index 4accd9cd2f5fd..fc4d241eac1eb 100644 --- a/data/mods/Aftershock/items/gun/shot.json +++ b/data/mods/Aftershock/items/gun/shot.json @@ -57,11 +57,10 @@ "barrel_volume": "500 ml", "valid_mod_locations": [ [ "sling", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "brass catcher", 1 ], [ "grip mount", 1 ], [ "rail mount", 1 ], - [ "bore", 1 ], [ "sights mount", 1 ], [ "underbarrel mount", 1 ] ], @@ -87,15 +86,7 @@ "dispersion": 350, "durability": 8, "clip_size": 8, - "valid_mod_locations": [ - [ "grip", 1 ], - [ "mechanism", 4 ], - [ "rail", 1 ], - [ "bore", 1 ], - [ "sights", 1 ], - [ "stock mount", 1 ], - [ "underbarrel mount", 1 ] - ], + "valid_mod_locations": [ [ "grip", 1 ], [ "mechanism", 2 ], [ "rail", 1 ], [ "sights", 1 ], [ "stock mount", 1 ], [ "underbarrel mount", 1 ] ], "pocket_data": [ { "pocket_type": "MAGAZINE", diff --git a/data/mods/Aftershock/items/gunmods/shotguns.json b/data/mods/Aftershock/items/gunmods/shotguns.json index 01c59749c7abc..5cab97f2b47d1 100644 --- a/data/mods/Aftershock/items/gunmods/shotguns.json +++ b/data/mods/Aftershock/items/gunmods/shotguns.json @@ -36,7 +36,7 @@ "material": [ "steel" ], "symbol": ":", "color": "light_gray", - "location": "bore", + "location": "barrel", "mod_targets": [ "shotgun" ], "damage_modifier": { "damage_type": "electric", "amount": 3, "armor_penetration": 7 }, "energy_drain_modifier": "20 kJ", diff --git a/data/mods/Aftershock/items/weapons.json b/data/mods/Aftershock/items/weapons.json index 318db094e1131..b2f98fae4081d 100644 --- a/data/mods/Aftershock/items/weapons.json +++ b/data/mods/Aftershock/items/weapons.json @@ -411,7 +411,7 @@ "reload": 900, "valid_mod_locations": [ [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "rail", 1 ], [ "sights", 1 ], [ "sling", 1 ], diff --git a/data/mods/BlazeIndustries/items/vehicle/blaze_gun.json b/data/mods/BlazeIndustries/items/vehicle/blaze_gun.json index 91c41611fbf47..d0a01095c377b 100644 --- a/data/mods/BlazeIndustries/items/vehicle/blaze_gun.json +++ b/data/mods/BlazeIndustries/items/vehicle/blaze_gun.json @@ -23,10 +23,9 @@ "clip_size": 19, "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], @@ -65,10 +64,9 @@ "built_in_mods": [ "inter_bayonet" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], diff --git a/data/mods/Generic_Guns/firearms/pistol_magnum.json b/data/mods/Generic_Guns/firearms/pistol_magnum.json index a8be8e6077453..47de7b2124df9 100644 --- a/data/mods/Generic_Guns/firearms/pistol_magnum.json +++ b/data/mods/Generic_Guns/firearms/pistol_magnum.json @@ -26,10 +26,9 @@ "weapon_category": [ "AUTOMATIC_PISTOLS" ], "valid_mod_locations": [ [ "barrel", 1 ], - [ "bore", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], diff --git a/data/mods/Magiclysm/items/enchanted_ranged.json b/data/mods/Magiclysm/items/enchanted_ranged.json index a2fc24845c621..04d64e09a01b7 100644 --- a/data/mods/Magiclysm/items/enchanted_ranged.json +++ b/data/mods/Magiclysm/items/enchanted_ranged.json @@ -147,7 +147,7 @@ [ "barrel", 1 ], [ "brass catcher", 1 ], [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "muzzle", 1 ], [ "rail", 1 ], [ "sights", 1 ], diff --git a/data/mods/TEST_DATA/pocket_mods_test.json b/data/mods/TEST_DATA/pocket_mods_test.json index c1b735c00d71d..3c7f46996b7f7 100644 --- a/data/mods/TEST_DATA/pocket_mods_test.json +++ b/data/mods/TEST_DATA/pocket_mods_test.json @@ -45,7 +45,6 @@ "durability": 7, "min_cycle_recoil": 1350, "weapon_category": [ "AUTOMATIC_RIFLES" ], - "valid_mod_locations": [ [ "bore", 1 ], [ "grip", 1 ], [ "mechanism", 4 ], [ "sling", 1 ], [ "stock accessory", 2 ], [ "stock", 1 ] ], "melee_damage": { "bash": 12 }, "flags": [ "NO_TURRET" ] }, diff --git a/data/mods/Xedra_Evolved/items/guns.json b/data/mods/Xedra_Evolved/items/guns.json index c151c321372ef..fb37e804cac4c 100644 --- a/data/mods/Xedra_Evolved/items/guns.json +++ b/data/mods/Xedra_Evolved/items/guns.json @@ -56,7 +56,7 @@ "valid_mod_locations": [ [ "sling", 1 ], [ "stock mount", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "barrel", 1 ], [ "brass catcher", 1 ], [ "grip mount", 1 ], diff --git a/data/mods/Xedra_Evolved/items/range.json b/data/mods/Xedra_Evolved/items/range.json index 65fd38408abf3..d040233bff633 100644 --- a/data/mods/Xedra_Evolved/items/range.json +++ b/data/mods/Xedra_Evolved/items/range.json @@ -99,7 +99,7 @@ "reload": 1200, "valid_mod_locations": [ [ "grip", 1 ], - [ "mechanism", 4 ], + [ "mechanism", 2 ], [ "rail", 1 ], [ "sights", 1 ], [ "sling", 1 ], From 09526ad042942bcc781734ccc011820595c85c55 Mon Sep 17 00:00:00 2001 From: ERROR_CODE 509 <75010328+ERRORCODE509@users.noreply.github.com> Date: Wed, 27 Mar 2024 19:02:22 -0700 Subject: [PATCH 16/42] Aftershock: Remove organ/meat related recipe overrides (#72606) * Update to include the organs and flesh of both humans and demihumans Now I can properly eat people. * Formatted the recipes properly * Missed a bracket * Updated crafting times * Removed all meat/organ related overrides --- .../Aftershock/recipes/recipe_overrides.json | 159 ------------------ 1 file changed, 159 deletions(-) diff --git a/data/mods/Aftershock/recipes/recipe_overrides.json b/data/mods/Aftershock/recipes/recipe_overrides.json index d0d708539cac9..b379d0eb6c42f 100644 --- a/data/mods/Aftershock/recipes/recipe_overrides.json +++ b/data/mods/Aftershock/recipes/recipe_overrides.json @@ -60,165 +60,6 @@ [ [ "plut_cell", 2 ] ] ] }, - { - "type": "recipe", - "activity_level": "LIGHT_EXERCISE", - "result": "meat_cooked", - "category": "CC_FOOD", - "subcategory": "CSC_FOOD_MEAT", - "skill_used": "cooking", - "time": "1 m 10 s", - "autolearn": true, - "batch_time_factors": [ 70, 1 ], - "qualities": [ { "id": "COOK", "level": 1 } ], - "tools": [ [ [ "surface_heat", 7, "LIST" ] ] ], - "components": [ [ [ "meat", 1 ] ] ] - }, - { - "type": "recipe", - "activity_level": "LIGHT_EXERCISE", - "result": "brain_cooked", - "charges": 1, - "category": "CC_FOOD", - "subcategory": "CSC_FOOD_MEAT", - "skill_used": "cooking", - "difficulty": 1, - "time": "50 s", - "autolearn": true, - "batch_time_factors": [ 70, 1 ], - "qualities": [ { "id": "COOK", "level": 1 } ], - "tools": [ [ [ "surface_heat", 7, "LIST" ] ] ], - "components": [ [ [ "brain", 1 ] ] ] - }, - { - "type": "recipe", - "activity_level": "LIGHT_EXERCISE", - "copy-from": "brain_cooked", - "result": "lung_cooked", - "qualities": [ { "id": "COOK", "level": 1 } ], - "tools": [ [ [ "surface_heat", 7, "LIST" ] ] ], - "components": [ [ [ "lung", 1 ] ] ] - }, - { - "type": "recipe", - "activity_level": "LIGHT_EXERCISE", - "copy-from": "brain_cooked", - "result": "kidney_cooked", - "qualities": [ { "id": "COOK", "level": 1 } ], - "tools": [ [ [ "surface_heat", 7, "LIST" ] ] ], - "components": [ [ [ "kidney", 1 ] ] ] - }, - { - "type": "recipe", - "activity_level": "LIGHT_EXERCISE", - "copy-from": "brain_cooked", - "result": "sweetbread_cooked", - "qualities": [ { "id": "COOK", "level": 1 } ], - "tools": [ [ [ "surface_heat", 7, "LIST" ] ] ], - "components": [ [ [ "sweetbread", 1 ] ] ] - }, - { - "type": "recipe", - "activity_level": "LIGHT_EXERCISE", - "copy-from": "brain_cooked", - "result": "liver_cooked", - "qualities": [ { "id": "COOK", "level": 1 } ], - "tools": [ [ [ "surface_heat", 7, "LIST" ] ] ], - "components": [ [ [ "liver", 1 ] ] ] - }, - { - "type": "recipe", - "activity_level": "LIGHT_EXERCISE", - "result": "foie_gras", - "category": "CC_FOOD", - "subcategory": "CSC_FOOD_MEAT", - "skill_used": "cooking", - "difficulty": 6, - "charges": 1, - "time": "3 m 20 s", - "book_learn": [ [ "mag_cooking", 4 ], [ "mag_glam", 5 ] ], - "qualities": [ { "id": "CUT", "level": 2 }, { "id": "COOK", "level": 3 } ], - "tools": [ [ [ "surface_heat", 20, "LIST" ] ] ], - "components": [ [ [ "liver", 3 ] ], [ [ "salt", 1 ] ], [ [ "sweet_fruit_like", 1, "LIST" ] ], [ [ "vinegar", 2 ] ] ] - }, - { - "type": "recipe", - "activity_level": "LIGHT_EXERCISE", - "result": "fried_tripe", - "category": "CC_FOOD", - "subcategory": "CSC_FOOD_MEAT", - "skill_used": "cooking", - "skills_required": [ "survival", 2 ], - "time": "100 s", - "charges": 2, - "book_learn": [ [ "cookbook", 1 ], [ "scots_cookbook", 2 ] ], - "difficulty": 3, - "batch_time_factors": [ 80, 1 ], - "qualities": [ { "id": "CUT", "level": 2 }, { "id": "COOK", "level": 3 } ], - "tools": [ [ [ "surface_heat", 10, "LIST" ] ] ], - "components": [ [ [ "stomach", 1 ] ], [ [ "batter", 3, "LIST" ] ], [ [ "cooking_oil", 4 ], [ "cooking_oil2", 4 ] ] ] - }, - { - "type": "recipe", - "activity_level": "LIGHT_EXERCISE", - "result": "fried_brain", - "category": "CC_FOOD", - "subcategory": "CSC_FOOD_MEAT", - "skill_used": "cooking", - "difficulty": 4, - "time": "4 m 10 s", - "book_learn": [ [ "cookbook", 2 ] ], - "qualities": [ { "id": "COOK", "level": 2 }, { "id": "CUT", "level": 2 } ], - "tools": [ [ [ "surface_heat", 25, "LIST" ] ] ], - "components": [ - [ [ "brain", 2 ] ], - [ [ "eggs_any_shape", 1, "LIST" ] ], - [ [ "batter", 3, "LIST" ] ], - [ [ "salt", 1 ] ], - [ [ "seasoning_mild", 4, "LIST" ] ], - [ [ "fry_oil", 4, "LIST" ] ] - ], - "charges": 3 - }, - { - "type": "recipe", - "activity_level": "LIGHT_EXERCISE", - "result": "deviled_kidney", - "category": "CC_FOOD", - "subcategory": "CSC_FOOD_MEAT", - "skill_used": "cooking", - "difficulty": 4, - "time": "10 m", - "charges": 1, - "book_learn": [ [ "cookbook", 2 ], [ "family_cookbook", 2 ] ], - "qualities": [ { "id": "COOK", "level": 3 }, { "id": "CUT", "level": 2 } ], - "tools": [ [ [ "surface_heat", 60, "LIST" ] ] ], - "components": [ - [ [ "kidney", 2 ] ], - [ [ "flour", 2 ] ], - [ [ "onion", 1 ], [ "irradiated_onion", 1 ] ], - [ [ "soysauce", 1 ] ], - [ [ "salt", 1 ] ], - [ [ "water", 1 ], [ "water_clean", 1 ] ], - [ [ "mustard", 1 ] ], - [ [ "sauce_pesto", 1 ], [ "sauce_red", 1 ], [ "tomato", 1 ] ] - ] - }, - { - "type": "recipe", - "activity_level": "LIGHT_EXERCISE", - "result": "grilled_sweetbread", - "category": "CC_FOOD", - "subcategory": "CSC_FOOD_MEAT", - "skill_used": "cooking", - "difficulty": 3, - "time": "100 s", - "batch_time_factors": [ 70, 1 ], - "book_learn": [ [ "scots_cookbook", 2 ], [ "cookbook", 1 ], [ "textbook_survival", 3 ] ], - "qualities": [ { "id": "COOK", "level": 3 } ], - "tools": [ [ [ "surface_heat", 10, "LIST" ] ] ], - "components": [ [ [ "sweetbread", 1 ] ], [ [ "water", 2 ], [ "water_clean", 2 ] ], [ [ "vinegar", 1 ] ], [ [ "salt", 2 ] ] ] - }, { "result": "recharge_station", "type": "recipe", From 6e67e117a0b65a8f1542e36edbc767a95785954d Mon Sep 17 00:00:00 2001 From: Alm999 <125039757+Alm999@users.noreply.github.com> Date: Thu, 28 Mar 2024 07:43:28 +0500 Subject: [PATCH 17/42] Brewing density fixes (#72641) * Correction for absence of distilling Distilling is a separate process (and recipe), so no volume loss due to evaporation should occur here. * Comment clean-up * Update brewing.json * Fix Tests Removed "unfermented_vinegar" and "young_yeast" from bad density database. --- data/json/items/comestibles/brewing.json | 10 +++++----- data/mods/TEST_DATA/known_bad_density.json | 2 -- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/data/json/items/comestibles/brewing.json b/data/json/items/comestibles/brewing.json index 7cdbdcea8baeb..d0678e079aa57 100644 --- a/data/json/items/comestibles/brewing.json +++ b/data/json/items/comestibles/brewing.json @@ -629,7 +629,7 @@ "price": 0, "volume": "16 ml", "price_postapoc": 10, - "charges": 16, + "charges": 1, "phase": "liquid", "comestible_type": "DRINK", "flags": [ "NUTRIENT_OVERRIDE" ], @@ -653,7 +653,7 @@ "price": 0, "volume": "16 ml", "price_postapoc": 10, - "charges": 16, + "charges": 1, "phase": "liquid", "comestible_type": "DRINK", "flags": [ "NUTRIENT_OVERRIDE" ], @@ -794,7 +794,7 @@ "looks_like": "brew_mead", "name": { "str_sp": "unfermented root beer" }, "description": "A mixture of water, sugar, yeast and sassafras roots that will eventually become root beer.", - "weight": "260 g", + "weight": "37 g", "color": "brown", "container": "bottle_glass", "symbol": "~", @@ -802,9 +802,9 @@ "quench": 6, "fun": -4, "price": 0, - "volume": "250 ml", + "volume": "36 ml", "price_postapoc": 2, - "charges": 7, + "charges": 1, "phase": "liquid", "comestible_type": "DRINK", "flags": [ "NUTRIENT_OVERRIDE" ], diff --git a/data/mods/TEST_DATA/known_bad_density.json b/data/mods/TEST_DATA/known_bad_density.json index 50af31e642f21..8628b368ca73c 100644 --- a/data/mods/TEST_DATA/known_bad_density.json +++ b/data/mods/TEST_DATA/known_bad_density.json @@ -155,7 +155,6 @@ "cookbook_sushi", "willowbark", "soap", - "young_yeast", "bo", "broken_manhack", "slime_scrap", @@ -168,7 +167,6 @@ "pumpkin_muffins", "hazelnut_cake", "coin_silver", - "brew_vinegar", "tactical_grenade_pouch", "marloss_gel", "inj_iron", From c6b68abfb5e07edbe2b3574b1e80db78ceee3ae6 Mon Sep 17 00:00:00 2001 From: Kamayana Date: Wed, 27 Mar 2024 21:44:43 -0500 Subject: [PATCH 18/42] Fix some uses of part_at() to use precalc positions (#72658) part_at() refers to parts by precalc, unlike most other vehicle functions that go by mount, so part_at was always returning -1 in some places --- src/item.cpp | 2 +- src/veh_appliance.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/item.cpp b/src/item.cpp index e99055da3bd0f..713c63e44c906 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -13309,7 +13309,7 @@ ret_val item::link_to( vehicle &veh, const point &mount, link_state link_t } else if( !veh.is_external_part( veh.mount_to_tripoint( mount ) ) ) { return ret_val::make_failure( _( "You can't attach a tow-line to an internal part." ) ); } else { - const int part_at = veh.part_at( mount ); + const int part_at = veh.part_at( veh.coord_translate( mount ) ); if( part_at != -1 && !veh.part( part_at ).carried_stack.empty() ) { return ret_val::make_failure( _( "You can't attach a tow-line to a racked part." ) ); } diff --git a/src/veh_appliance.cpp b/src/veh_appliance.cpp index 4e6c7476617ad..79be24a49e00d 100644 --- a/src/veh_appliance.cpp +++ b/src/veh_appliance.cpp @@ -470,7 +470,7 @@ void veh_app_interact::remove() if( auto sel_part = here.veh_at( a_point_bub ).part_with_feature( VPFLAG_APPLIANCE, false ) ) { vp = &sel_part->part(); } else { - int const part = veh->part_at( a_point ); + int const part = veh->part_at( veh->coord_translate( a_point ) ); vp = &veh->part( part >= 0 ? part : 0 ); } const vpart_info &vpinfo = vp->info(); @@ -512,7 +512,7 @@ void veh_app_interact::remove() void veh_app_interact::plug() { - const int part = veh->part_at( a_point ); + const int part = veh->part_at( veh->coord_translate( a_point ) ); const tripoint pos = veh->global_part_pos3( part ); item cord( "power_cord" ); cord.link_to( *veh, a_point, link_state::automatic ); @@ -564,7 +564,7 @@ void veh_app_interact::populate_app_actions() if( auto sel_part = here.veh_at( a_point_bub ).part_with_feature( VPFLAG_APPLIANCE, false ) ) { vp = &sel_part->part(); } else { - const int part = veh->part_at( a_point ); + const int part = veh->part_at( veh->coord_translate( a_point ) ); vp = &veh->part( part >= 0 ? part : 0 ); } From 7e6bc3f569e7802682876efd9a183cf47edc7e5a Mon Sep 17 00:00:00 2001 From: wwkk222208 <92137695+wwkk222208@users.noreply.github.com> Date: Thu, 28 Mar 2024 11:59:24 +0800 Subject: [PATCH 19/42] Improve description of wood crossbow (#72610) * Improve description of wood crossbow. * Update data/json/items/ranged/crossbows.json * Update data/json/items/ranged/crossbows.json --------- Co-authored-by: Maleclypse <54345792+Maleclypse@users.noreply.github.com> --- data/json/items/ranged/crossbows.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/items/ranged/crossbows.json b/data/json/items/ranged/crossbows.json index 72b20e108d598..bf0159553e403 100644 --- a/data/json/items/ranged/crossbows.json +++ b/data/json/items/ranged/crossbows.json @@ -262,7 +262,7 @@ "symbol": "(", "color": "green", "name": { "str": "wood crossbow" }, - "description": "A moderately powerful all-wood hunting crossbow.", + "description": "An all-wood hunting crossbow. It is not powerful enough to deal with zombies, but it may still be used for hunting.", "//2": "150lb @ 10in powerstroke, 34in wood limbs, 37.7J, 0.337 slugs with a 0.066lb bolt", "price": 6000, "price_postapoc": 3500, From 8130295b9955a4b4c30a91866a62fb70e28514f9 Mon Sep 17 00:00:00 2001 From: Surflurer <22912139+Surflurer@users.noreply.github.com> Date: Thu, 28 Mar 2024 14:51:01 +0800 Subject: [PATCH 20/42] Fix shadowcasting performance in a rare transparency case. --- src/shadowcasting.cpp | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/src/shadowcasting.cpp b/src/shadowcasting.cpp index 2bf2416ab5e0b..437aa74709e5d 100644 --- a/src/shadowcasting.cpp +++ b/src/shadowcasting.cpp @@ -46,15 +46,17 @@ template struct span { span( const slope &s_major, const slope &e_major, const slope &s_minor, const slope &e_minor, - const T &value, bool skip_first_row = false ) : + const T &value, bool skip_first_row = false, bool skip_first_column = false ) : start_major( s_major ), end_major( e_major ), start_minor( s_minor ), end_minor( e_minor ), - cumulative_value( value ), skip_first_row( skip_first_row ) {} + cumulative_value( value ), skip_first_row( skip_first_row ), + skip_first_column( skip_first_column ) {} slope start_major; slope end_major; slope start_minor; slope end_minor; T cumulative_value; bool skip_first_row; + bool skip_first_column; }; /** @@ -98,20 +100,22 @@ static void split_span( cata::list> &spans, // If check returns false, A and B are opaque and have no spans. if( is_transparent( current_transparency, last_intensity ) ) { // Emit the A span if present, placing it before the current span in the list + // If the parent span is to skip the first column, inherit it. if( trailing_edge_major > this_span->start_major ) { spans.emplace( this_span, this_span->start_major, trailing_edge_major, this_span->start_minor, this_span->end_minor, - next_cumulative_transparency ); + next_cumulative_transparency, false, this_span->skip_first_column ); } // Emit the B span if present, placing it before the current span in the list + // If the parent span is to skip the first column, inherit it. if( trailing_edge_minor > this_span->start_minor ) { spans.emplace( this_span, std::max( this_span->start_major, trailing_edge_major ), std::min( this_span->end_major, leading_edge_major ), this_span->start_minor, trailing_edge_minor, - next_cumulative_transparency ); + next_cumulative_transparency, false, this_span->skip_first_column ); } // Overwrite new_start_minor since previous tile is transparent. @@ -119,6 +123,7 @@ static void split_span( cata::list> &spans, } // Emit the D span if present, placing it after the current span in the list + // If the parent span is to skip the first column, inherit it. if( leading_edge_major < this_span->end_major ) { // Pass true to the span constructor to set skip_first_row to true // This prevents the same row we are currently checking being checked by the @@ -126,7 +131,16 @@ static void split_span( cata::list> &spans, spans.emplace( std::next( this_span ), leading_edge_major, this_span->end_major, this_span->start_minor, this_span->end_minor, - this_span->cumulative_value, true ); + this_span->cumulative_value, true, this_span->skip_first_column ); + } + // If the split is due to two transparent squares with different transparency, set skip_first_column to true + // This prevents the last column of B span being checked by the new C span + if( is_transparent( current_transparency, last_intensity ) && + is_transparent( new_transparency, last_intensity ) ) { + this_span->skip_first_column = true; + } else { + this_span->skip_first_column = false; + } // Truncate this_span to the current block. @@ -245,6 +259,13 @@ void cast_horizontal_zlight_segment( // Current tile comes before the span we're considering, advance to the next tile. continue; } + if( this_span->skip_first_column && this_span->start_minor == leading_edge_minor ) { + // If the split is due to two transparent squares with different transparency, + // We want to check the blocks that are likely to cause split only in B, + // rather than in B & C, which can lead to performance hit. + continue; + } + if( this_span->end_minor < trailing_edge_minor ) { // Current tile is after the span we're considering, continue to next row. break; From da69ffd74e75579f9da60e7f5ad68009da9dc26d Mon Sep 17 00:00:00 2001 From: Anton Simakov <67688115+GuardianDll@users.noreply.github.com> Date: Thu, 28 Mar 2024 10:39:58 +0100 Subject: [PATCH 21/42] Properly obsolete MoM obsoletion --- .../MindOverMatter/obsolete/enchantments.json | 18 -- data/mods/MindOverMatter/obsolete/eocs.json | 36 ---- data/mods/MindOverMatter/obsolete/items.json | 183 ++---------------- .../MindOverMatter/obsolete/temporary.json | 55 ++---- 4 files changed, 30 insertions(+), 262 deletions(-) delete mode 100644 data/mods/MindOverMatter/obsolete/enchantments.json delete mode 100644 data/mods/MindOverMatter/obsolete/eocs.json diff --git a/data/mods/MindOverMatter/obsolete/enchantments.json b/data/mods/MindOverMatter/obsolete/enchantments.json deleted file mode 100644 index 69089e6db0015..0000000000000 --- a/data/mods/MindOverMatter/obsolete/enchantments.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "type": "enchantment", - "id": "enchant_clair_speed_read", - "condition": "ALWAYS", - "has": "HELD", - "values": [ - { - "value": "READING_EXP", - "add": { - "math": [ - "( ( u_spell_level('clair_speed_reading') * 0.15) * (scaling_factor(u_val('intelligence') ))) * u_nether_attunement_power_scaling" - ] - } - } - ] - } -] diff --git a/data/mods/MindOverMatter/obsolete/eocs.json b/data/mods/MindOverMatter/obsolete/eocs.json deleted file mode 100644 index 0b47151e42ade..0000000000000 --- a/data/mods/MindOverMatter/obsolete/eocs.json +++ /dev/null @@ -1,36 +0,0 @@ -[ - { - "type": "effect_on_condition", - "id": "EOC_PHOTOKIN_CAMOUFLAGE_SWITCHER", - "effect": [ - { - "switch": { "math": [ "u_spell_level('photokinetic_camouflage')" ] }, - "cases": [ - { "case": 0, "effect": { "u_add_trait": "PHOTOKINETIC_CAMOUFLAGE_1" } }, - { "case": 4, "effect": { "u_add_trait": "PHOTOKINETIC_CAMOUFLAGE_2" } }, - { "case": 8, "effect": { "u_add_trait": "PHOTOKINETIC_CAMOUFLAGE_3" } }, - { "case": 12, "effect": { "u_add_trait": "PHOTOKINETIC_CAMOUFLAGE_4" } }, - { "case": 16, "effect": { "u_add_trait": "PHOTOKINETIC_CAMOUFLAGE_5" } }, - { "case": 20, "effect": { "u_add_trait": "PHOTOKINETIC_CAMOUFLAGE_6" } } - ] - } - ] - }, - { - "type": "effect_on_condition", - "id": "EOC_CLAIR_NIGHT_EYES_SWITCHER", - "effect": { - "switch": { "math": [ "u_spell_level('clair_night_vision')" ] }, - "cases": [ - { "case": 0, "effect": { "u_add_effect": "effect_clair_night_eyes_1", "duration": "PERMANENT" } }, - { "case": 3, "effect": { "u_add_effect": "effect_clair_night_eyes_2", "duration": "PERMANENT" } }, - { "case": 6, "effect": { "u_add_effect": "effect_clair_night_eyes_3", "duration": "PERMANENT" } }, - { "case": 9, "effect": { "u_add_effect": "effect_clair_night_eyes_4", "duration": "PERMANENT" } }, - { "case": 12, "effect": { "u_add_effect": "effect_clair_night_eyes_5", "duration": "PERMANENT" } }, - { "case": 15, "effect": { "u_add_effect": "effect_clair_night_eyes_6", "duration": "PERMANENT" } }, - { "case": 18, "effect": { "u_add_effect": "effect_clair_night_eyes_7", "duration": "PERMANENT" } }, - { "case": 21, "effect": { "u_add_effect": "effect_clair_night_eyes_8", "duration": "PERMANENT" } } - ] - } - } -] diff --git a/data/mods/MindOverMatter/obsolete/items.json b/data/mods/MindOverMatter/obsolete/items.json index 4298d4f60242c..e2846de806480 100644 --- a/data/mods/MindOverMatter/obsolete/items.json +++ b/data/mods/MindOverMatter/obsolete/items.json @@ -1,176 +1,15 @@ [ { - "id": "biokin_enhance_mobility_item_1", - "type": "ARMOR", - "name": { "str_sp": "[Ψ]enhanced mobility" }, - "description": "Your powers give you greater range of motion even in heavy clothing or armor.", - "weight": "0g", - "volume": "0ml", - "symbol": "o", - "color": "pink", - "flags": [ - "AURA", - "OVERSIZE", - "ONLY_ONE", - "TRADER_AVOID", - "INTEGRATED", - "NO_TAKEOFF", - "NONCONDUCTIVE", - "UNBREAKABLE", - "ZERO_WEIGHT", - "ALLOWS_NATURAL_ATTACKS" - ], - "armor": [ - { - "encumbrance": -2, - "coverage": 100, - "covers": [ "leg_l", "leg_r", "torso", "arm_l", "arm_r", "hand_l", "hand_r", "head", "foot_l", "foot_r", "mouth", "eyes" ] - } - ] - }, - { - "id": "biokin_enhance_mobility_item_2", - "type": "ARMOR", - "name": { "str_sp": "[Ψ]enhanced mobility" }, - "description": "Your powers give you greater range of motion even in heavy clothing or armor.", - "weight": "0g", - "volume": "0ml", - "symbol": "o", - "color": "pink", - "flags": [ - "AURA", - "OVERSIZE", - "ONLY_ONE", - "TRADER_AVOID", - "INTEGRATED", - "NO_TAKEOFF", - "NONCONDUCTIVE", - "UNBREAKABLE", - "ZERO_WEIGHT", - "ALLOWS_NATURAL_ATTACKS" - ], - "armor": [ - { - "encumbrance": -4, - "coverage": 100, - "covers": [ "leg_l", "leg_r", "torso", "arm_l", "arm_r", "hand_l", "hand_r", "head", "foot_l", "foot_r", "mouth", "eyes" ] - } - ] - }, - { - "id": "biokin_enhance_mobility_item_3", - "type": "ARMOR", - "name": { "str_sp": "[Ψ]enhanced mobility" }, - "description": "Your powers give you greater range of motion even in heavy clothing or armor.", - "weight": "0g", - "volume": "0ml", - "symbol": "o", - "color": "pink", - "flags": [ - "AURA", - "OVERSIZE", - "ONLY_ONE", - "TRADER_AVOID", - "INTEGRATED", - "NO_TAKEOFF", - "NONCONDUCTIVE", - "UNBREAKABLE", - "ZERO_WEIGHT", - "ALLOWS_NATURAL_ATTACKS" - ], - "armor": [ - { - "encumbrance": -8, - "coverage": 100, - "covers": [ "leg_l", "leg_r", "torso", "arm_l", "arm_r", "hand_l", "hand_r", "head", "foot_l", "foot_r", "mouth", "eyes" ] - } - ] - }, - { - "id": "biokin_enhance_mobility_item_4", - "type": "ARMOR", - "name": { "str_sp": "[Ψ]enhanced mobility" }, - "description": "Your powers give you greater range of motion even in heavy clothing or armor.", - "weight": "0g", - "volume": "0ml", - "symbol": "o", - "color": "pink", - "flags": [ - "AURA", - "OVERSIZE", - "ONLY_ONE", - "TRADER_AVOID", - "INTEGRATED", - "NO_TAKEOFF", - "NONCONDUCTIVE", - "UNBREAKABLE", - "ZERO_WEIGHT", - "ALLOWS_NATURAL_ATTACKS" - ], - "armor": [ - { - "encumbrance": -12, - "coverage": 100, - "covers": [ "leg_l", "leg_r", "torso", "arm_l", "arm_r", "hand_l", "hand_r", "head", "foot_l", "foot_r", "mouth", "eyes" ] - } - ] - }, - { - "id": "biokin_enhance_mobility_item_5", - "type": "ARMOR", - "name": { "str_sp": "[Ψ]enhanced mobility" }, - "description": "Your powers give you greater range of motion even in heavy clothing or armor.", - "weight": "0g", - "volume": "0ml", - "symbol": "o", - "color": "pink", - "flags": [ - "AURA", - "OVERSIZE", - "ONLY_ONE", - "TRADER_AVOID", - "INTEGRATED", - "NO_TAKEOFF", - "NONCONDUCTIVE", - "UNBREAKABLE", - "ZERO_WEIGHT", - "ALLOWS_NATURAL_ATTACKS" - ], - "armor": [ - { - "encumbrance": -16, - "coverage": 100, - "covers": [ "leg_l", "leg_r", "torso", "arm_l", "arm_r", "hand_l", "hand_r", "head", "foot_l", "foot_r", "mouth", "eyes" ] - } - ] - }, - { - "id": "biokin_enhance_mobility_item_6", - "type": "ARMOR", - "name": { "str_sp": "[Ψ]enhanced mobility" }, - "description": "Your powers give you greater range of motion even in heavy clothing or armor.", - "weight": "0g", - "volume": "0ml", - "symbol": "o", - "color": "pink", - "flags": [ - "AURA", - "OVERSIZE", - "ONLY_ONE", - "TRADER_AVOID", - "INTEGRATED", - "NO_TAKEOFF", - "NONCONDUCTIVE", - "UNBREAKABLE", - "ZERO_WEIGHT", - "ALLOWS_NATURAL_ATTACKS" - ], - "armor": [ - { - "encumbrance": -20, - "coverage": 100, - "covers": [ "leg_l", "leg_r", "torso", "arm_l", "arm_r", "hand_l", "hand_r", "head", "foot_l", "foot_r", "mouth", "eyes" ] - } - ] + "type": "MIGRATION", + "//": "remove after 0.I", + "id": [ + "biokin_enhance_mobility_item_1", + "biokin_enhance_mobility_item_2", + "biokin_enhance_mobility_item_3", + "biokin_enhance_mobility_item_4", + "biokin_enhance_mobility_item_5", + "biokin_enhance_mobility_item_6" + ], + "replace": "manual_swimming" } ] diff --git a/data/mods/MindOverMatter/obsolete/temporary.json b/data/mods/MindOverMatter/obsolete/temporary.json index 4e173d06c65ab..71f6e29521328 100644 --- a/data/mods/MindOverMatter/obsolete/temporary.json +++ b/data/mods/MindOverMatter/obsolete/temporary.json @@ -2,60 +2,43 @@ { "type": "TRAIT_MIGRATION", "id": "CLAIR_SPEED_READ", + "//": "remove after 0.I", "remove": true }, { - "type": "mutation", - "//": "This and following are all necessary because stealth_modifier is mutation only. Redo the whole thing once it isn't.", + "type": "TRAIT_MIGRATION", "id": "PHOTOKINETIC_CAMOUFLAGE_1", - "name": { "str": "Chameleoflage" }, - "points": 1, - "description": "Your powers are blending nearby light to make you harder to spot.", - "valid": false + "//": "remove after 0.I", + "remove": true }, { - "type": "mutation", - "//": "This and following are all necessary because stealth_modifier is mutation only. Redo the whole thing once it isn't.", + "type": "TRAIT_MIGRATION", "id": "PHOTOKINETIC_CAMOUFLAGE_2", - "name": { "str": "Chameleoflage" }, - "points": 1, - "description": "Your powers are blending nearby light to make you harder to spot.", - "valid": false + "//": "remove after 0.I", + "remove": true }, { - "type": "mutation", - "//": "This and following are all necessary because stealth_modifier is mutation only. Redo the whole thing once it isn't.", + "type": "TRAIT_MIGRATION", "id": "PHOTOKINETIC_CAMOUFLAGE_3", - "name": { "str": "Chameleoflage" }, - "points": 1, - "description": "Your powers are blending nearby light to make you harder to spot.", - "valid": false + "//": "remove after 0.I", + "remove": true }, { - "type": "mutation", - "//": "This and following are all necessary because stealth_modifier is mutation only. Redo the whole thing once it isn't.", + "type": "TRAIT_MIGRATION", "id": "PHOTOKINETIC_CAMOUFLAGE_4", - "name": { "str": "Chameleoflage" }, - "points": 1, - "description": "Your powers are blending nearby light to make you harder to spot.", - "valid": false + "//": "remove after 0.I", + "remove": true }, { - "type": "mutation", - "//": "This and following are all necessary because stealth_modifier is mutation only. Redo the whole thing once it isn't.", + "type": "TRAIT_MIGRATION", "id": "PHOTOKINETIC_CAMOUFLAGE_5", - "name": { "str": "Chameleoflage" }, - "points": 1, - "description": "Your powers are blending nearby light to make you harder to spot.", - "valid": false + "//": "remove after 0.I", + "remove": true }, { - "type": "mutation", - "//": "This and following are all necessary because stealth_modifier is mutation only. Redo the whole thing once it isn't.", + "type": "TRAIT_MIGRATION", "id": "PHOTOKINETIC_CAMOUFLAGE_6", - "name": { "str": "Chameleoflage" }, - "points": 1, - "description": "Your powers are blending nearby light to make you harder to spot.", - "valid": false + "//": "remove after 0.I", + "remove": true } ] From 2ff149f4723ab7e8ca878f8007f69acfd4f6842e Mon Sep 17 00:00:00 2001 From: rty275 <788335+rty275@users.noreply.github.com> Date: Thu, 28 Mar 2024 13:20:40 -0700 Subject: [PATCH 22/42] [Magiclysm] Direct butchering kit enchanting (#72087) * Theoretical Gambeson made? * Add Quilted Parabolan Wool * Parabolan Gambesons * Minor tweak Forgot to fix proportional warmth * Gambeson Recipes * Adjust Parabolan Felt Patch Mass The patches were the same mass as the breeches you created with 20 of them, so I divided the patch mass by 20 to make logical sense. This means that the gambeson pieces I'm making are going to take far more of the patches, but that seems fitting * Adjust felt patch quantities The patch to garment mass ratio was all off for the pants, so I adjusted the patch's mass and have now adjusted the gambeson's patch quantities based on that mass * Add spawns for Parabolan Armor * Forge of Wonders Sells Parabolan Armor * Update patch mass again in accordance with discord conversation * Adjusting parabolan wool mass Adjusted per conversation on discord. .6 times the mass of cotton, or otherwise compared to wool appropriately * Gambeson recipes updated for patch mass * Update yarn to match * Fixed a forgotten word * Update data/mods/Magiclysm/recipes/tailoring.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/mods/Magiclysm/recipes/tailoring.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/mods/Magiclysm/recipes/tailoring.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/mods/Magiclysm/recipes/tailoring.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/mods/Magiclysm/recipes/tailoring.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/mods/Magiclysm/recipes/tailoring.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/mods/Magiclysm/recipes/tailoring.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/mods/Magiclysm/recipes/tailoring.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/mods/Magiclysm/recipes/tailoring.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/mods/Magiclysm/recipes/tailoring.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/mods/Magiclysm/recipes/tailoring.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/mods/Magiclysm/recipes/tailoring.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/mods/Magiclysm/recipes/tailoring.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/mods/Magiclysm/recipes/tailoring.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/mods/Magiclysm/recipes/tailoring.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Fix spelling error * Fake commit to retrigger testing after bug was fixed * Adjust based on build error, I think? * Reverting attempt to fix ubuntu test, guess I messed up somehow * Testing something to fix Clang 10 test? * Fixing Clang 10, take two * Direct enchanting butchers kits --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- data/mods/Magiclysm/recipes/enchanting.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/data/mods/Magiclysm/recipes/enchanting.json b/data/mods/Magiclysm/recipes/enchanting.json index 81e1602a1992f..19c62d823d1fc 100644 --- a/data/mods/Magiclysm/recipes/enchanting.json +++ b/data/mods/Magiclysm/recipes/enchanting.json @@ -134,6 +134,24 @@ "result": "knife_carving_plus_two", "components": [ [ [ "knife_carving_plus_one", 1 ] ], [ [ "mana_dust", 20 ] ], [ [ "mercury", 10 ] ] ] }, + { + "type": "recipe", + "copy-from": "cestus_plus_one", + "qualities": [ { "id": "MANA_INFUSE", "level": 1 } ], + "time": "9 h", + "id_suffix": "direct_enchanted", + "result": "butchering_kit_plus_one", + "components": [ [ [ "butchering_kit", 1 ] ], [ [ "mana_dust", 60 ] ], [ [ "mercury", 30 ] ] ] + }, + { + "type": "recipe", + "copy-from": "cestus_plus_one", + "qualities": [ { "id": "MANA_INFUSE", "level": 1 } ], + "time": "9 h", + "id_suffix": "direct_enchanted", + "result": "butchering_kit_plus_two", + "components": [ [ [ "butchering_kit_plus_one", 1 ] ], [ [ "mana_dust", 60 ] ], [ [ "mercury", 30 ] ] ] + }, { "type": "recipe", "copy-from": "cestus_plus_one", From f6b6e5522b0609198cd2ec402f5020a9bc3cad65 Mon Sep 17 00:00:00 2001 From: Risuga Date: Thu, 28 Mar 2024 14:13:43 -0700 Subject: [PATCH 23/42] for karol --- data/json/items/tool/misc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/items/tool/misc.json b/data/json/items/tool/misc.json index 4e442543dbcdf..038eb89cf8bed 100644 --- a/data/json/items/tool/misc.json +++ b/data/json/items/tool/misc.json @@ -67,7 +67,7 @@ "id": "notched_plank", "category": "spare_parts", "name": { "str": "notched plank" }, - "description": "A wooden plank with notches cut into it, used with a fire drill to create embers.", + "description": "A quarter of a wooden plank with notches cut into it, used with a fire drill to create embers.", "symbol": "/", "color": "brown", "looks_like": "2x4", From 01c34094b776d3f8fcafd73757561259c03ce8c2 Mon Sep 17 00:00:00 2001 From: RenechCDDA <84619419+RenechCDDA@users.noreply.github.com> Date: Thu, 28 Mar 2024 20:17:52 -0400 Subject: [PATCH 24/42] Test for NPCs preferring to wield guns --- data/mods/TEST_DATA/itemgroups.json | 14 +++++ tests/npc_test.cpp | 84 +++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) diff --git a/data/mods/TEST_DATA/itemgroups.json b/data/mods/TEST_DATA/itemgroups.json index cd4be9a719cc3..ec741152f7e09 100644 --- a/data/mods/TEST_DATA/itemgroups.json +++ b/data/mods/TEST_DATA/itemgroups.json @@ -71,5 +71,19 @@ { "item": "long_patchwork_scarf", "count": [ 2, 4 ] }, { "item": "rock", "charges": [ 2, 4 ] } ] + }, + { + "type": "item_group", + "id": "test_NPC_guns", + "subtype": "distribution", + "entries": [ + { + "item": "modular_m4_carbine", + "variant": "modular_m4a1", + "prob": 100, + "charges": [ 30, 30 ], + "contents-group": "issued_carbine_mods" + } + ] } ] diff --git a/tests/npc_test.cpp b/tests/npc_test.cpp index 01faf5eaa674d..aa2dd3c8b39dc 100644 --- a/tests/npc_test.cpp +++ b/tests/npc_test.cpp @@ -41,6 +41,9 @@ class Creature; static const efftype_id effect_bouldering( "bouldering" ); static const efftype_id effect_sleep( "sleep" ); +static const item_group_id Item_spawn_data_test_NPC_guns( "test_NPC_guns" ); +static const item_group_id Item_spawn_data_trash_forest( "trash_forest" ); + static const trait_id trait_WEB_WEAVER( "WEB_WEAVER" ); static const vpart_id vpart_frame( "frame" ); @@ -571,3 +574,84 @@ TEST_CASE( "npc_can_target_player" ) REQUIRE( hostile.current_target() != nullptr ); CHECK( hostile.current_target() == static_cast( &player_character ) ); } + +static void advance_turn( Character &guy ) +{ + guy.process_turn(); + calendar::turn += 1_turns; +} + +TEST_CASE( "npc_uses_guns", "[npc_ai]" ) +{ + g->faction_manager_ptr->create_if_needed(); + + clear_map(); + clear_avatar(); + set_time_to_day(); + + Character &player_character = get_player_character(); + point five_tiles_south = {0, 5}; + npc &hostile = spawn_npc( player_character.pos().xy() + five_tiles_south, "thug" ); + REQUIRE( rl_dist( player_character.pos(), hostile.pos() ) >= 4 ); + hostile.set_attitude( NPCATT_KILL ); + hostile.name = "Enemy NPC"; + arm_shooter( hostile, "M24" ); + // Give them an excuse to use it by making them aware the player (an enemy) exists + arm_shooter( player_character, "M24" ); + hostile.regen_ai_cache(); + float danger_around = hostile.danger_assessment(); + CHECK( danger_around > 1.0f ); + // Now give them a TON of junk + for( item some_trash : item_group::items_from( Item_spawn_data_trash_forest ) ) { + hostile.i_add( some_trash ); + } + hostile.wield_better_weapon(); + + advance_turn( hostile ); + advance_turn( hostile ); + advance_turn( hostile ); + + REQUIRE( hostile.get_wielded_item().get_item()->is_gun() ); +} + +TEST_CASE( "npc_prefers_guns", "[npc_ai]" ) +{ + g->faction_manager_ptr->create_if_needed(); + + clear_map(); + clear_avatar(); + set_time_to_day(); + + Character &player_character = get_player_character(); + point five_tiles_south = {0, 5}; + npc &hostile = spawn_npc( player_character.pos().xy() + five_tiles_south, "thug" ); + REQUIRE( rl_dist( player_character.pos(), hostile.pos() ) >= 4 ); + hostile.set_attitude( NPCATT_KILL ); + hostile.name = "Enemy NPC"; + item backpack( "debug_backpack" ); + hostile.wear_item( backpack ); + // Give them a TON of junk + for( item some_trash : item_group::items_from( Item_spawn_data_trash_forest ) ) { + hostile.i_add( some_trash ); + } + // But also give them a gun and some magazines + for( item some_gun_item : item_group::items_from( Item_spawn_data_test_NPC_guns ) ) { + hostile.i_add( some_gun_item ); + } + // Make them realize we exist and COULD maybe hurt them! Or something. Otherwise they won't re-wield. + arm_shooter( player_character, "M24" ); + hostile.regen_ai_cache(); + float danger_around = hostile.danger_assessment(); + CHECK( danger_around > 1.0f ); + CHECK( !hostile.get_wielded_item().get_item()->is_gun() ); + hostile.wield_better_weapon(); + CHECK( hostile.get_wielded_item().get_item()->is_gun() ); + + //Now give them some time to choose their belt instead + advance_turn( hostile ); + advance_turn( hostile ); + advance_turn( hostile ); + + CAPTURE( hostile.get_wielded_item().get_item()->tname() ); + REQUIRE( hostile.get_wielded_item().get_item()->is_gun() ); +} From 39153c55b93cb9d65be0ceaceec34495a57dad39 Mon Sep 17 00:00:00 2001 From: RenechCDDA <84619419+RenechCDDA@users.noreply.github.com> Date: Thu, 28 Mar 2024 20:18:05 -0400 Subject: [PATCH 25/42] ...NPCs search all their belongings for guns? --- src/npcmove.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/npcmove.cpp b/src/npcmove.cpp index 272e67b8c3e6c..05da13b88e956 100644 --- a/src/npcmove.cpp +++ b/src/npcmove.cpp @@ -4093,7 +4093,7 @@ bool npc::wield_better_weapon() // we just recur to the next farther down return VisitResponse::NEXT; } - return VisitResponse::SKIP; + return VisitResponse::NEXT; } ); // TODO: Reimplement switching to empty guns From 6004f7b9b093433be36431560c2cc888e771344c Mon Sep 17 00:00:00 2001 From: DeltaPavonis <111613869+DPavonis@users.noreply.github.com> Date: Thu, 28 Mar 2024 17:28:28 -0700 Subject: [PATCH 26/42] Adding MOVEMENT_EXERTION_MODIFIER as enchantment (#72580) * First commit, praise Clang * Update src/avatar_action.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Added documentation --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- doc/MAGIC.md | 1 + src/avatar_action.cpp | 3 ++- src/magic_enchantment.cpp | 1 + src/magic_enchantment.h | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/MAGIC.md b/doc/MAGIC.md index dcbc0070f1dba..7eeafa601d691 100644 --- a/doc/MAGIC.md +++ b/doc/MAGIC.md @@ -859,6 +859,7 @@ Character status value | Description `MOVECOST_FLATGROUND_MOD`| How many moves you spend to move 1 tile on flat ground; shown in UI `MOVECOST_OBSTACLE_MOD` | How many moves you spend to move 1 tile, if this tile has a movecost more than 105 moves; not shown in UI `MOVECOST_SWIM_MOD` | How many moves you spend to move 1 tile in water; not shown in UI +`MOVEMENT_EXERTION_MODIFIER` | Affects how much physical exertion (activity_level) is required for the player to move a single tile. The value this affects is technically a float, so addition and multiplication operations can be performed on it, but player-facing effects only happen at specific whole-integer breakpoints. This can most easily be seen in `\data\json\ui\activity.json`. `NIGHT_VIS` | How well you can see in darkness. `ADD` adds tiles, so `"ADD": 3` increases night vision distance by 3 tiles. `OBTAIN_COST_MULTIPLIER`| Modifier for pulling an item from a container, as a handling penalty or bonus. `"add": 100` add 100 additional moves to item wield (1 second) `OVERKILL_DAMAGE` | multiplies or contributes to the damage to an enemy corpse after death. The lower the number, the more damage caused. diff --git a/src/avatar_action.cpp b/src/avatar_action.cpp index a6174423f8529..84d35e46e8bbe 100644 --- a/src/avatar_action.cpp +++ b/src/avatar_action.cpp @@ -222,7 +222,8 @@ bool avatar_action::move( avatar &you, map &m, const tripoint &d ) // by this point we're either walking, running, crouching, or attacking, so update the activity level to match if( !is_riding ) { - you.set_activity_level( you.current_movement_mode()->exertion_level() ); + you.set_activity_level( you.enchantment_cache->modify_value( + enchant_vals::mod::MOVEMENT_EXERTION_MODIFIER, you.current_movement_mode()->exertion_level() ) ); } // If the player is *attempting to* move on the X axis, update facing direction of their sprite to match. diff --git a/src/magic_enchantment.cpp b/src/magic_enchantment.cpp index 991c832112e66..b919ee5f4583c 100644 --- a/src/magic_enchantment.cpp +++ b/src/magic_enchantment.cpp @@ -192,6 +192,7 @@ namespace io case enchant_vals::mod::CONSUME_TIME_MOD: return "CONSUME_TIME_MOD"; case enchant_vals::mod::SWEAT_MULTIPLIER: return "SWEAT_MULTIPLIER"; case enchant_vals::mod::STAMINA_REGEN_MOD: return "STAMINA_REGEN_MOD"; + case enchant_vals::mod::MOVEMENT_EXERTION_MODIFIER: return "MOVEMENT_EXERTION_MODIFIER"; case enchant_vals::mod::NUM_MOD: break; } cata_fatal( "Invalid enchant_vals::mod" ); diff --git a/src/magic_enchantment.h b/src/magic_enchantment.h index 97e5cb1ac06a4..f138a47a16362 100644 --- a/src/magic_enchantment.h +++ b/src/magic_enchantment.h @@ -170,6 +170,7 @@ enum class mod : int { CONSUME_TIME_MOD, SWEAT_MULTIPLIER, STAMINA_REGEN_MOD, + MOVEMENT_EXERTION_MODIFIER, NUM_MOD }; } // namespace enchant_vals From 9907a059b59a5eb320410bdc4d26f64fc6f09fa7 Mon Sep 17 00:00:00 2001 From: Standing-Storm <120433252+Standing-Storm@users.noreply.github.com> Date: Thu, 28 Mar 2024 20:55:33 -0500 Subject: [PATCH 27/42] Initial commit (#72654) --- .../eoc_on_power_use_events.json | 42 ++++++++++++++++++- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/data/mods/MindOverMatter/effectoncondition/eoc_on_power_use_events.json b/data/mods/MindOverMatter/effectoncondition/eoc_on_power_use_events.json index fcd83516a2f02..0d62a98a3df9a 100644 --- a/data/mods/MindOverMatter/effectoncondition/eoc_on_power_use_events.json +++ b/data/mods/MindOverMatter/effectoncondition/eoc_on_power_use_events.json @@ -886,7 +886,7 @@ "type": "effect_on_condition", "id": "EOC_CONCENTRATION_SUCCESS_REDUCE_FOCUS", "condition": { - "and": [ { "math": [ "u_vitamin('vitamin_maintained_powers')", ">", "0" ] }, { "math": [ "u_val('focus')", ">=", "25" ] } ] + "and": [ { "math": [ "u_vitamin('vitamin_maintained_powers')", ">", "0" ] }, { "math": [ "u_val('focus')", ">=", "15" ] } ] }, "effect": [ { "math": [ "u_val('focus')", "-=", "1" ] } ] }, @@ -894,7 +894,7 @@ "type": "effect_on_condition", "id": "EOC_CONCENTRATION_FAILURE_REDUCE_FOCUS", "condition": { - "and": [ { "math": [ "u_vitamin('vitamin_maintained_powers')", ">", "0" ] }, { "math": [ "u_val('focus')", ">=", "25" ] } ] + "and": [ { "math": [ "u_vitamin('vitamin_maintained_powers')", ">", "0" ] }, { "math": [ "u_val('focus')", ">=", "20" ] } ] }, "effect": [ { "math": [ "u_val('focus')", "-=", "5" ] } ] }, @@ -938,6 +938,44 @@ }, "effect": [ { "run_eocs": "EOC_POWER_MAINTENANCE_CONCENTRATION_CHECK" } ] }, + { + "type": "effect_on_condition", + "id": "EOC_PSIONICS_CHANNEL_COSTS_FOCUS", + "eoc_type": "EVENT", + "required_event": "spellcasting_finish", + "condition": { + "and": [ + { + "u_has_any_trait": [ + "BIOKINETIC", + "CLAIRSENTIENT", + "ELECTROKINETIC", + "PHOTOKINETIC", + "PYROKINETIC", + "TELEKINETIC", + "TELEPATH", + "TELEPORTER", + "VITAKINETIC" + ] + }, + { + "or": [ + { "compare_string": [ "BIOKINETIC", { "context_val": "school" } ] }, + { "compare_string": [ "CLAIRSENTIENT", { "context_val": "school" } ] }, + { "compare_string": [ "ELECTROKINETIC", { "context_val": "school" } ] }, + { "compare_string": [ "PHOTOKINETIC", { "context_val": "school" } ] }, + { "compare_string": [ "PYROKINETIC", { "context_val": "school" } ] }, + { "compare_string": [ "TELEKINETIC", { "context_val": "school" } ] }, + { "compare_string": [ "TELEPATH", { "context_val": "school" } ] }, + { "compare_string": [ "TELEPORTER", { "context_val": "school" } ] }, + { "compare_string": [ "VITAKINETIC", { "context_val": "school" } ] } + ] + }, + { "math": [ "u_val('focus')", ">=", "15" ] } + ] + }, + "effect": [ { "math": [ "u_val('focus')", "-=", "1" ] } ] + }, { "type": "effect_on_condition", "id": "EOC_TELEPORTER_THE_HOUNDS_FOLLOW", From 64e1db15e7033ea3d84d4f7cb7a8aa65c40f3533 Mon Sep 17 00:00:00 2001 From: Holli <78005870+Holli-Git@users.noreply.github.com> Date: Thu, 28 Mar 2024 19:56:19 -0600 Subject: [PATCH 28/42] Remove Survivor Revolvers (#72638) * Obsolete Surv Revolvers * Lint fix * Change migration items to match ammo * Replace handgun with magazine Replacing the gun with another gun causes unwanted errors, changed it to be magazines so no errors with gun being migrated to a different caliber. --- .../itemgroups/Weapons_Mods_Ammo/guns.json | 6 +-- data/json/items/gun/40.json | 32 -------------- data/json/items/gun/45.json | 28 ------------ .../migration_items.json | 10 +++++ data/json/recipes/weapon/ranged.json | 44 ------------------- 5 files changed, 11 insertions(+), 109 deletions(-) diff --git a/data/json/itemgroups/Weapons_Mods_Ammo/guns.json b/data/json/itemgroups/Weapons_Mods_Ammo/guns.json index 3784d4d7bbf6b..8d048245ab5de 100644 --- a/data/json/itemgroups/Weapons_Mods_Ammo/guns.json +++ b/data/json/itemgroups/Weapons_Mods_Ammo/guns.json @@ -320,11 +320,7 @@ "type": "item_group", "id": "guns_pistol_improvised", "//": "Makeshift or otherwise poor quality pistols.", - "items": [ - { "item": "ashot", "prob": 100 }, - { "item": "surv_hand_cannon", "prob": 100, "charges-min": 0, "charges-max": 5 }, - { "item": "surv_six_shooter", "prob": 100, "charges-min": 0, "charges-max": 6 } - ] + "items": [ { "item": "ashot", "prob": 100 } ] }, { "type": "item_group", diff --git a/data/json/items/gun/40.json b/data/json/items/gun/40.json index 64726eaf20f0f..a0c227b19a13e 100644 --- a/data/json/items/gun/40.json +++ b/data/json/items/gun/40.json @@ -169,38 +169,6 @@ "pocket_data": [ { "pocket_type": "MAGAZINE_WELL", "item_restriction": [ "smg_40_mag" ] } ], "melee_damage": { "bash": 10 } }, - { - "id": "surv_six_shooter", - "looks_like": "sw_619", - "type": "GUN", - "reload_noise_volume": 10, - "name": { "str": "handmade six-shooter" }, - "description": "A homemade 6-shot revolver. While it's not as good as the pre-Cataclysm manufactured weapons, it's a decent piece of work, all things considered.", - "weight": "1333 g", - "volume": "750 ml", - "longest_side": "33 cm", - "barrel_length": "127 mm", - "price": 15000, - "price_postapoc": 750, - "to_hit": -2, - "material": [ "steel" ], - "symbol": "(", - "color": "dark_gray", - "ammo": [ "40" ], - "skill": "pistol", - "ranged_damage": { "damage_type": "bullet", "amount": -1 }, - "dispersion": 620, - "durability": 6, - "blackpowder_tolerance": 60, - "loudness": 25, - "clip_size": 6, - "reload": 200, - "valid_mod_locations": [ [ "barrel", 1 ], [ "grip", 1 ], [ "sights", 1 ], [ "stock", 1 ], [ "underbarrel", 1 ], [ "rail mount", 1 ] ], - "faults": [ "fault_gun_blackpowder", "fault_gun_dirt" ], - "flags": [ "RELOAD_ONE", "NEVER_JAMS", "RELOAD_EJECT" ], - "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "40": 6 } } ], - "melee_damage": { "bash": 8 } - }, { "id": "hi_power_40", "copy-from": "pistol_base", diff --git a/data/json/items/gun/45.json b/data/json/items/gun/45.json index f5b1542107499..3198fb46146b9 100644 --- a/data/json/items/gun/45.json +++ b/data/json/items/gun/45.json @@ -271,34 +271,6 @@ "pocket_data": [ { "pocket_type": "MAGAZINE_WELL", "item_restriction": [ "smg_45_mag", "mac10mag" ] } ], "melee_damage": { "bash": 10 } }, - { - "id": "surv_hand_cannon", - "copy-from": "pistol_revolver", - "looks_like": "sw_619", - "type": "GUN", - "name": { "str": "homemade hand cannon" }, - "//": "On one hand, it's very big for a handgun. On the other, it's still a scrap weapon.", - "description": "A large and heavy pistol evidently welded from scrap. It's not pretty, but the .45 it's chambered with packs a serious punch. Just watch out for the kick.", - "weight": "1200 g", - "volume": "1 L", - "longest_side": "30 cm", - "barrel_length": "156 mm", - "price": 60000, - "price_postapoc": 750, - "to_hit": -3, - "material": [ "steel" ], - "symbol": "(", - "color": "dark_gray", - "ammo": [ "45" ], - "ranged_damage": { "damage_type": "bullet", "amount": -2 }, - "dispersion": 620, - "durability": 7, - "blackpowder_tolerance": 60, - "loudness": 25, - "clip_size": 5, - "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "45": 5 } } ], - "melee_damage": { "bash": 12 } - }, { "id": "tommygun", "looks_like": "hk_mp5", diff --git a/data/json/obsoletion_and_migration_0.I/migration_items.json b/data/json/obsoletion_and_migration_0.I/migration_items.json index 59a9861bd6064..b35251cf701c0 100644 --- a/data/json/obsoletion_and_migration_0.I/migration_items.json +++ b/data/json/obsoletion_and_migration_0.I/migration_items.json @@ -1221,5 +1221,15 @@ "id": "riv_suppressor", "type": "MIGRATION", "replace": "suppressor" + }, + { + "id": "surv_six_shooter", + "type": "MIGRATION", + "replace": "hptjcpmag" + }, + { + "id": "surv_hand_cannon", + "type": "MIGRATION", + "replace": "hptjhpmag" } ] diff --git a/data/json/recipes/weapon/ranged.json b/data/json/recipes/weapon/ranged.json index 46cc627bac24e..0a959f2e89e72 100644 --- a/data/json/recipes/weapon/ranged.json +++ b/data/json/recipes/weapon/ranged.json @@ -743,50 +743,6 @@ [ [ "steel_chunk", 3 ], [ "scrap", 9 ] ] ] }, - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "surv_six_shooter", - "category": "CC_WEAPON", - "subcategory": "CSC_WEAPON_RANGED", - "skill_used": "fabrication", - "skills_required": [ [ "traps", 2 ], [ "gun", 3 ] ], - "difficulty": 4, - "time": "8 h", - "book_learn": [ [ "manual_pistol", 3 ] ], - "qualities": [ { "id": "SAW_M_FINE", "level": 1 } ], - "//": "60cm weld", - "using": [ [ "welding_standard", 60 ] ], - "proficiencies": [ - { "proficiency": "prof_metalworking" }, - { "proficiency": "prof_welding_basic" }, - { "proficiency": "prof_gunsmithing_basic" }, - { "proficiency": "prof_gunsmithing_revolver" } - ], - "components": [ [ [ "pipe", 1 ] ], [ [ "spring", 1 ] ], [ [ "steel_chunk", 2 ] ], [ [ "scrap", 2 ] ] ] - }, - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "surv_hand_cannon", - "category": "CC_WEAPON", - "subcategory": "CSC_WEAPON_RANGED", - "skill_used": "fabrication", - "skills_required": [ [ "traps", 2 ], [ "gun", 4 ] ], - "difficulty": 5, - "time": "8 h", - "book_learn": [ [ "manual_pistol", 5 ] ], - "qualities": [ { "id": "SAW_M_FINE", "level": 1 } ], - "//": "60cm weld", - "using": [ [ "welding_standard", 60 ] ], - "proficiencies": [ - { "proficiency": "prof_metalworking" }, - { "proficiency": "prof_welding_basic" }, - { "proficiency": "prof_gunsmithing_basic" }, - { "proficiency": "prof_gunsmithing_revolver" } - ], - "components": [ [ [ "pipe", 1 ] ], [ [ "spring", 1 ] ], [ [ "steel_chunk", 2 ] ], [ [ "scrap", 2 ] ] ] - }, { "type": "recipe", "activity_level": "LIGHT_EXERCISE", From 969bdeccdc6378b3afe779c2577c2f0ce5fbb3bf Mon Sep 17 00:00:00 2001 From: Ranik Date: Thu, 28 Mar 2024 20:57:03 -0500 Subject: [PATCH 29/42] Home Pictures (#72355) * Initial Commit * Probability update * Grammar and Item Changes * Update home_pictures.json * Volume correction. * Update home_pictures.json --- .../json/itemgroups/collections_domestic.json | 12 +- data/json/items/newspaper.json | 16 ++ data/json/snippets/home_pictures.json | 149 ++++++++++++++++++ 3 files changed, 173 insertions(+), 4 deletions(-) create mode 100644 data/json/snippets/home_pictures.json diff --git a/data/json/itemgroups/collections_domestic.json b/data/json/itemgroups/collections_domestic.json index a96b9993dcb2f..138274165c9a3 100644 --- a/data/json/itemgroups/collections_domestic.json +++ b/data/json/itemgroups/collections_domestic.json @@ -287,7 +287,8 @@ [ "joint", 1 ], [ "curler_hair", 10 ], [ "hairbrush", 5 ], - { "group": "pillbox_any_used", "prob": 10 } + { "group": "pillbox_any_used", "prob": 10 }, + { "item": "home_picture", "prob": 50 } ] }, { @@ -645,7 +646,8 @@ { "item": "reading_light", "prob": 9, "charges": [ 0, 50 ] }, { "item": "balloon", "prob": 5 }, { "group": "memorial", "prob": 3 }, - { "item": "air_launcher", "prob": 1 } + { "item": "air_launcher", "prob": 1 }, + { "item": "home_picture", "prob": 75 } ] }, { @@ -1230,7 +1232,8 @@ { "item": "teddy_bear", "prob": 2 }, { "item": "reading_light", "prob": 8, "charges": [ 0, 50 ] }, { "item": "condom", "prob": 50, "count": [ 1, 5 ] }, - { "item": "air_launcher", "prob": 1 } + { "item": "air_launcher", "prob": 1 }, + { "item": "home_picture", "prob": 50 } ] }, { @@ -1371,7 +1374,8 @@ [ "fencing_foil", 20 ], [ "fencing_sabre", 20 ], [ "fencing_epee", 20 ], - [ "fencing_mask", 20 ] + [ "fencing_mask", 20 ], + { "item": "home_picture", "prob": 50 } ] }, { diff --git a/data/json/items/newspaper.json b/data/json/items/newspaper.json index e1737d6734469..0376e5ebf4112 100644 --- a/data/json/items/newspaper.json +++ b/data/json/items/newspaper.json @@ -592,5 +592,21 @@ "price_postapoc": 0, "material": [ "paper" ], "flags": [ "TRADER_AVOID", "BANK_NOTE_SHAPED" ] + }, + { + "type": "GENERIC", + "id": "home_picture", + "category": "books", + "symbol": "*", + "color": "white", + "name": { "str": "Picture" }, + "snippet_category": "home_pictures", + "description": "A medium picture of something that the owner wished to decorate their house with.", + "weight": "600 g", + "volume": "650 ml", + "price": 0, + "price_postapoc": 0, + "material": [ "paper", "wood" ], + "flags": [ "TRADER_AVOID" ] } ] diff --git a/data/json/snippets/home_pictures.json b/data/json/snippets/home_pictures.json new file mode 100644 index 0000000000000..83185634b00a2 --- /dev/null +++ b/data/json/snippets/home_pictures.json @@ -0,0 +1,149 @@ +[ + { + "type": "snippet", + "category": "home_pictures", + "//": "These are meant to be personal pictures with family or friends. The sort of things you would have in a picture frame around the house. Nothing anomalous or Cataclysm-related should show up in these pictures; however, they could be linked to game lore, locations, or events. Feel free to contribute more, as this gives more variety to houses and people from before the Cataclysm.", + "text": [ + { + "id": "home_picture_1", + "text": "A brightly lit photo depicting several large pine trees. A beautiful brunette-haired woman is standing next to a small grey owl on a wooden perch. She seems nervous standing next to the scowling owl." + }, + { + "id": "home_picture_2", + "text": "A man in a polo shirt and sunglasses stands in front of a fence, holding a leafy branch. The man grins ear to ear as a giraffe reaches down and messily chews the leaves off of the branch." + }, + { + "id": "home_picture_3", + "text": "This is a worn family photo. A group of people stand in front of a pier next to a shimmering lake. In the rear center of the crowd stands a tall, well-built man in his 60s. He is flanked by six children of various ages, all smiling awkwardly for the camera." + }, + { + "id": "home_picture_4", + "text": "This blurry photo appears to have been taken at some sort of party. A group of three people strike goofy poses as a bride and groom laugh heartily in the background." + }, + { + "id": "home_picture_5", + "text": "A family photo of a snowy morning. Two young girls, bundled up in heavy winter clothing, stand in front of a mountain far in the background — which mountain it was, you couldn't say. The girls are cheerfully smiling." + }, + { + "id": "home_picture_6", + "text": "A photo of a group of young people in costumes. They are all dressed in various anime character costumes and are striking poses for the camera. In the background, the entrance of a convention center has, written large on its entrance, 'Animaine'." + }, + { + "id": "home_picture_7", + "text": "A looming storm dominates the space of this photo; dark clouds are scattered, promising miserable rain. Towards the bottom right of the photo stands a bearded man in a raincoat, carrying a fishing rod in one hand and a hooked fish in the other. He is brightly lit by the camera's flash, which reveals his broad grin. Written in permanent marker on the picture frame is the phrase, 'In and out just in time!'" + }, + { + "id": "home_picture_8", + "text": "Two adult men stand front and center in this picture, comically covered all over in small splashes of paint and wearing paintball masks. Two boys and a girl surround them with masks still on, cheerfully holding their paintball guns in the air in celebration of victory." + }, + { + "id": "home_picture_9", + "text": "A smiling young woman wearing a band t-shirt is in the driver seat of a car, with an older man sitting in the passenger seat next to her, sweating profusely. Written in colorful sharpie at the bottom of the frame is, 'Dad teaching me how to drive a manual for my drivers licence'." + }, + { + "id": "home_picture_10", + "text": "Two dogs are perched on a couch. One appears to be a rottweiler; the other is a black corgi mix. Both are staring hungrily at the chip the photographer is holding just below the camera." + }, + { + "id": "home_picture_11", + "text": "A photograph of an open field of verdant grass. A golden retriever is joyfully chasing a young boy through the field. The boy is smiling and trailing a small piece of rope as he runs, and the dog seems intent on catching it. Written in black marker is 'James at grandpa's ranch.'" + }, + { + "id": "home_picture_12", + "text": "A framed clipping of a local newspaper article. Displayed in bold font, the headline reads, 'Local Firefighter Saves Family of 7 from House Fire!' A picture of a burning house surrounded by firetrucks and scrambling firefighters is displayed in full color." + }, + { + "id": "home_picture_13", + "text": "A framed clipping of a newspaper article. It's a picture of an opening ceremony for a pristine park, with a group of people standing behind the ribbon spanning the entrance, just as it is being cut." + }, + { + "id": "home_picture_14", + "text": "A framed clipping of a newspaper article. 'Annual Chilli Cook-off Winner'. Enclosed is a small article about the winner and the secret recipe." + }, + { + "id": "home_picture_15", + "text": "An old black-and-white photo from many years ago. It features a group of people at a long table dressed for a fancy dinner party. Inscribed across it is 'Grey Moose Lodge Christmas Party 1973.'" + }, + { + "id": "home_picture_16", + "text": "A picture of a group of several people at a painting class. They each display their attempt at painting a sunset over waves. The people are smiling and laughing at the varied quality of each painting, with wine glasses perched in one hand and their pictures in the other." + }, + { + "id": "home_picture_17", + "text": "A picture of a house under construction. Several men are evidently in the midst of working on the building; however, they have all stopped to face the camera and smile for the picture." + }, + { + "id": "home_picture_18", + "text": "A picture of a Renaissance Fair. A petite woman in ornate mediaeval clothing is holding a gigantic turkey leg and dramatically biting into it with exaggerated force." + }, + { + "id": "home_picture_19", + "text": "An older black man with a greying beard sits proudly on a chopper motorcycle, his beaming smile directed towards the camera. To his side are several other men on their own motorcycles, smiling in the same manner. Scribbled on the photo's edge is 'Told you we could fix it up!'" + }, + { + "id": "home_picture_20", + "text": "This appears to be a photo of a woman a distance away from a city. She's taking a selfie and trying to get as much of the city in frame as possible as the clouds hover over the town, with the sun beaming between them gloriously." + }, + { + "id": "home_picture_21", + "text": "A photo of a large crowd enjoying an air show. Several jets streak overhead high in the distant sky." + }, + { + "id": "home_picture_22", + "text": "A photo of eight people celebrating some manner of victory. They are in the lobby of an escape room and have 'Secret of the Tomb' 'completed in 57 minutes and 12 seconds' displayed behind them." + }, + { + "id": "home_picture_23", + "text": "A worn painting. It depicts a brown deer running through trees and is signed, 'A. Whitmer'." + }, + { + "id": "home_picture_24", + "text": "A framed family photo. The family stands together among autumn leaves. They stand in front of a large house with pillars near the front door." + }, + { + "id": "home_picture_25", + "text": "A framed photo of a beautiful woman gazing sadly out of view. She is looking downward, and her profile is partly obscured by her hair." + }, + { + "id": "home_picture_26", + "text": "A framed sketch of a young couple. They are seated on a bench and are embracing each other lovingly." + }, + { + "id": "home_picture_27", + "text": "This is a jigsaw puzzle that has been glued and framed. It depicts a chestnut brown horse trotting towards the foreground and a cloudy blue sky above. You can't help but wonder how long it took to finish it." + }, + { + "id": "home_picture_28", + "text": "This is an ink impression of a pair of baby feet. 'Congratulations, grandpa!' is written in exuberant cursive." + }, + { + "id": "home_picture_29", + "text": "A photo of a laughing mother hugging her mud-covered son. He's covered from head to toe and is squinting from behind his mud-caked face." + }, + { + "id": "home_picture_30", + "text": "A photo of a young girl playing a cello almost as large as she is. Her sister stands behind her, smiling for the camera." + }, + { + "id": "home_picture_31", + "text": "A framed photo of a dog—it's a slightly bug-eyed mutt with a goofy expression. Printed on the wooden frame is 'Missing you every day.'" + }, + { + "id": "home_picture_32", + "text": "A photo of a man standing atop a large rock on a beach's shore, waving to the camera. You can see a small city and piers in the distance behind him." + }, + { + "id": "home_picture_33", + "text": "A framed newspaper article. 'New Restaurant Opened by Famous Chef'. A middle-aged woman stands proudly in front of the restaurant's doors, gesturing as if to welcome the viewer within." + }, + { + "id": "home_picture_34", + "text": "This is an amateur still-life painting depicting a table of fruit and a bottle of wine. It is signed 'V.A.' in the bottom right." + }, + { + "id": "home_picture_35", + "text": "A gloomy painting of a man in a boat during a storm. The man is rowing towards a lighthouse in the distance." + } + ] + } +] From 3a8ca861777d30dd8919261022d0c4c5ec3b4d40 Mon Sep 17 00:00:00 2001 From: RenechCDDA <84619419+RenechCDDA@users.noreply.github.com> Date: Thu, 28 Mar 2024 23:04:10 -0400 Subject: [PATCH 30/42] Fine clang I promise to use references --- tests/npc_test.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/npc_test.cpp b/tests/npc_test.cpp index aa2dd3c8b39dc..d5377590785ab 100644 --- a/tests/npc_test.cpp +++ b/tests/npc_test.cpp @@ -602,7 +602,7 @@ TEST_CASE( "npc_uses_guns", "[npc_ai]" ) float danger_around = hostile.danger_assessment(); CHECK( danger_around > 1.0f ); // Now give them a TON of junk - for( item some_trash : item_group::items_from( Item_spawn_data_trash_forest ) ) { + for( item &some_trash : item_group::items_from( Item_spawn_data_trash_forest ) ) { hostile.i_add( some_trash ); } hostile.wield_better_weapon(); @@ -631,11 +631,11 @@ TEST_CASE( "npc_prefers_guns", "[npc_ai]" ) item backpack( "debug_backpack" ); hostile.wear_item( backpack ); // Give them a TON of junk - for( item some_trash : item_group::items_from( Item_spawn_data_trash_forest ) ) { + for( item &some_trash : item_group::items_from( Item_spawn_data_trash_forest ) ) { hostile.i_add( some_trash ); } // But also give them a gun and some magazines - for( item some_gun_item : item_group::items_from( Item_spawn_data_test_NPC_guns ) ) { + for( item &some_gun_item : item_group::items_from( Item_spawn_data_test_NPC_guns ) ) { hostile.i_add( some_gun_item ); } // Make them realize we exist and COULD maybe hurt them! Or something. Otherwise they won't re-wield. From af842b1b744853e69d34eea462401e1a9f08214c Mon Sep 17 00:00:00 2001 From: BalthazarArgall <116303491+BalthazarArgall@users.noreply.github.com> Date: Fri, 29 Mar 2024 04:21:14 +0100 Subject: [PATCH 31/42] Remove "Rapid strike" technique from knives (#72536) * removed "rapid" technique * fix expected dps * missed the rm42 * Revert dps expectations * Revert "Revert dps expectations" This reverts commit dc95c0ad4bdc40d24db7f587f670032b61696263. * Very small damage increase to hopefully fit dps expectations * positive increase should be negative actually * further damage decrease * Adjust proportional bash instead of cut for fake tanto * overnerfed fake tanto * adjust fake tanto again * Restart tests, yet again * Maybe stuff is drying at the proper rate now * Are gummy vitamins still too big to fit in a pillbox * Restart test --- data/json/artifact/artifact_item_types.json | 2 +- data/json/items/melee/swords_and_blades.json | 27 ++++++++------------ 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/data/json/artifact/artifact_item_types.json b/data/json/artifact/artifact_item_types.json index 219d31ffdca30..f9808d23ddf52 100644 --- a/data/json/artifact/artifact_item_types.json +++ b/data/json/artifact/artifact_item_types.json @@ -345,7 +345,7 @@ "material": [ "wood", "steel" ], "symbol": ";", "color": "light_gray", - "techniques": [ "WBLOCK_1", "RAPID" ], + "techniques": [ "WBLOCK_1" ], "qualities": [ [ "CUT", 1 ], [ "CUT_FINE", 1 ], [ "BUTCHER", 11 ] ], "weapon_category": [ "KNIVES" ], "flags": [ "SHEATH_KNIFE", "TRADER_AVOID" ], diff --git a/data/json/items/melee/swords_and_blades.json b/data/json/items/melee/swords_and_blades.json index 7863dc1617fc3..06388394de7e7 100644 --- a/data/json/items/melee/swords_and_blades.json +++ b/data/json/items/melee/swords_and_blades.json @@ -342,7 +342,6 @@ "install_time": "5 s" }, "min_skills": [ [ "weapon", 2 ], [ "melee", 1 ] ], - "techniques": [ "RAPID" ], "qualities": [ [ "CUT", 2 ], [ "SAW_W", 1 ], [ "CUT_FINE", 1 ], [ "BUTCHER", 19 ] ], "thrown_damage": [ { "damage_type": "stab", "amount": 14 } ], "flags": [ @@ -415,7 +414,6 @@ "install_time": "5 s" }, "min_skills": [ [ "weapon", 2 ], [ "melee", 1 ] ], - "techniques": [ "RAPID" ], "qualities": [ [ "CUT", 2 ], [ "SAW_M", 1 ], [ "CUT_FINE", 1 ], [ "BUTCHER", 15 ] ], "thrown_damage": [ { "damage_type": "stab", "amount": 14 } ], "flags": [ @@ -639,12 +637,12 @@ "symbol": "/", "color": "dark_gray", "min_skills": [ [ "weapon", 2 ], [ "melee", 1 ] ], - "techniques": [ "RAPID", "WBLOCK_1" ], + "techniques": [ "WBLOCK_1" ], "qualities": [ [ "CUT", 2 ], [ "CUT_FINE", 1 ], [ "BUTCHER", 16 ] ], "thrown_damage": [ { "damage_type": "stab", "amount": 22 } ], "flags": [ "DURABLE_MELEE", "SHEATH_KNIFE" ], "weapon_category": [ "KNIVES" ], - "melee_damage": { "stab": 20 } + "melee_damage": { "stab": 19 } }, { "id": "knife_swissarmy", @@ -1007,11 +1005,11 @@ "to_hit": { "grip": "weapon", "length": "short", "surface": "point", "balance": "good" }, "material": [ "steel" ], "//": "Should be split into a preexisting iron version and a craftable steel version", - "techniques": [ "WBLOCK_1", "RAPID" ], + "techniques": [ "WBLOCK_1" ], "qualities": [ [ "CUT", 2 ], [ "BUTCHER", 12 ] ], "flags": [ "DURABLE_MELEE", "SHEATH_SWORD" ], "weapon_category": [ "KNIVES" ], - "melee_damage": { "stab": 20 } + "melee_damage": { "stab": 19 } }, { "id": "kris_fake", @@ -1060,11 +1058,11 @@ "repairs_with": [ "mc_steel" ], "symbol": "/", "color": "dark_gray", - "techniques": [ "WBLOCK_1", "RAPID" ], + "techniques": [ "WBLOCK_1" ], "qualities": [ [ "CUT", 2 ], [ "AXE", 1 ], [ "GRASS_CUT", 1 ], [ "CUT_FINE", 1 ], [ "BUTCHER", 18 ] ], "flags": [ "DURABLE_MELEE", "SHEATH_KNIFE", "NONCONDUCTIVE" ], "weapon_category": [ "KNIVES" ], - "melee_damage": { "cut": 21 } + "melee_damage": { "cut": 20 } }, { "id": "hc_kukri", @@ -1729,11 +1727,10 @@ "to_hit": { "grip": "weapon", "length": "short", "surface": "point", "balance": "good" }, "material": [ { "type": "leather", "portion": 1.1 }, { "type": "steel", "portion": 48 } ], "repairs_with": [ "steel" ], - "techniques": [ "RAPID" ], "qualities": [ [ "CUT", 1 ], [ "CUT_FINE", 1 ], [ "BUTCHER", 18 ] ], "flags": [ "DURABLE_MELEE", "SHEATH_KNIFE", "ALLOWS_BODY_BLOCK" ], "weapon_category": [ "KNIVES" ], - "melee_damage": { "bash": 2, "stab": 19 } + "melee_damage": { "bash": 2, "stab": 18 } }, { "id": "tanto_inferior", @@ -1742,7 +1739,7 @@ "name": { "str_sp": "tanto" }, "description": "Long Japanese knives like this more-modern remake were the samurai's backup weapon, before the advent of the larger wakizashi. This one doesn't feel well-balanced.", "replace_materials": { "steel": "budget_steel" }, - "proportional": { "melee_damage": { "bash": 6.5, "stab": 0.28 }, "price": 0.1, "price_postapoc": 0.1 }, + "proportional": { "melee_damage": { "bash": 6.5, "stab": 0.15 }, "price": 0.1, "price_postapoc": 0.1 }, "delete": { "flags": [ "DURABLE_MELEE" ] } }, { @@ -1752,7 +1749,7 @@ "name": { "str_sp": "tanto" }, "description": "A dull, cheaply-made replica of a long Japanese knife, typically used as a samurai's backup weapon.", "replace_materials": { "steel": "aluminum", "leather": "nylon" }, - "proportional": { "melee_damage": { "bash": 3.5, "stab": 0.047 }, "price": 0.05, "price_postapoc": 0.05 }, + "proportional": { "melee_damage": { "bash": 3, "stab": 0.047 }, "price": 0.05, "price_postapoc": 0.05 }, "delete": { "flags": [ "DURABLE_MELEE" ] }, "extend": { "flags": [ "FRAGILE_MELEE" ] } }, @@ -1959,7 +1956,6 @@ "material": [ "steel" ], "symbol": "/", "color": "dark_gray", - "techniques": [ "RAPID" ], "qualities": [ [ "CUT", 1 ], [ "BUTCHER", 8 ] ], "flags": [ "SHEATH_KNIFE", "ALLOWS_BODY_BLOCK" ], "weapon_category": [ "KNIVES" ], @@ -1981,11 +1977,10 @@ "repairs_with": [ "steel" ], "symbol": "/", "color": "dark_gray", - "techniques": [ "RAPID" ], "qualities": [ [ "CUT", 1 ], [ "BUTCHER", 8 ] ], "flags": [ "SHEATH_KNIFE", "ALLOWS_BODY_BLOCK" ], "weapon_category": [ "KNIVES" ], - "melee_damage": { "stab": 17 } + "melee_damage": { "stab": 16 } }, { "id": "kirpan_cheap", @@ -3142,7 +3137,7 @@ "install_time": "5 s" }, "min_skills": [ [ "weapon", 2 ], [ "melee", 1 ] ], - "techniques": [ "WBLOCK_1", "RAPID" ], + "techniques": [ "WBLOCK_1" ], "qualities": [ [ "CUT", 1 ], [ "COOK", 1 ], [ "BUTCHER", 7 ] ], "flags": [ "DURABLE_MELEE", "SHEATH_SWORD" ], "weapon_category": [ "KNIVES" ] From 81c53bb8b45f7a9b8589d382eb67e3c6cca49ca6 Mon Sep 17 00:00:00 2001 From: Anton Simakov <67688115+GuardianDll@users.noreply.github.com> Date: Fri, 29 Mar 2024 04:21:50 +0100 Subject: [PATCH 32/42] fix clang tidy error in condition.cpp (#72670) * fix clang tidy error in condition.cpp * try Patrik' approach --- src/condition.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/condition.cpp b/src/condition.cpp index 3264f978aba5c..84d2af3d1baa7 100644 --- a/src/condition.cpp +++ b/src/condition.cpp @@ -1604,7 +1604,7 @@ conditional_t::func f_map_ter_furn_id( const JsonObject &jo, std::string_view me if( terrain ) { return get_map().ter( loc ) == ter_id( furn_type.evaluate( d ) ); } else { - return get_map().ter( loc ) == ter_id( furn_type.evaluate( d ) ); + return get_map().furn( loc ) == furn_id( furn_type.evaluate( d ) ); } }; } From 41d6a78f064cab46617e1663533419b1ccabc1d8 Mon Sep 17 00:00:00 2001 From: Standing-Storm <120433252+Standing-Storm@users.noreply.github.com> Date: Thu, 28 Mar 2024 22:29:31 -0500 Subject: [PATCH 33/42] Edit spell UI word choice when using psionics (#72676) * Initial commit * Update src/magic.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/magic.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/magic.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/magic.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/magic.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/magic.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/magic.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/magic.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/magic.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/magic.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/magic.cpp | 52 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/src/magic.cpp b/src/magic.cpp index 73311b1faa3bd..dbe826cd8f1de 100644 --- a/src/magic.cpp +++ b/src/magic.cpp @@ -2487,23 +2487,45 @@ void spellcasting_callback::spell_info_text( const spell &sp, int width ) info_txt.emplace_back( ); const bool cost_encumb = sp.energy_cost_encumbered( pc ); - std::string cost_string = cost_encumb ? _( "Casting Cost (impeded)" ) : _( "Casting Cost" ); - std::string energy_cur = sp.energy_source() == magic_energy_type::hp ? "" : - string_format( _( " (%s current)" ), sp.energy_cur_string( pc ) ); - if( !pc.magic->has_enough_energy( pc, sp ) ) { - cost_string = colorize( _( "Not Enough Energy" ), c_red ); - energy_cur.clear(); - } - info_txt.emplace_back( - colorize( string_format( "%s: %s %s%s", cost_string, sp.energy_cost_string( pc ), - sp.energy_string(), energy_cur ), c_light_gray ) ); - + const bool is_psi = sp.has_flag( spell_flag::PSIONIC ); + if( is_psi ) { + std::string cost_string = cost_encumb ? _( "Channeling Cost (impeded)" ) : _( "Channeling Cost" ); + std::string energy_cur = sp.energy_source() == magic_energy_type::hp ? "" : + string_format( _( " (%s current)" ), sp.energy_cur_string( pc ) ); + if( !pc.magic->has_enough_energy( pc, sp ) ) { + cost_string = colorize( _( "Not Enough Stamina" ), c_red ); + energy_cur.clear(); + } + info_txt.emplace_back( + colorize( string_format( "%s: %s %s%s", cost_string, sp.energy_cost_string( pc ), + sp.energy_string(), energy_cur ), c_light_gray ) ); + } else { + std::string cost_string = cost_encumb ? _( "Casting Cost (impeded)" ) : _( "Casting Cost" ); + std::string energy_cur = sp.energy_source() == magic_energy_type::hp ? "" : + string_format( _( " (%s current)" ), sp.energy_cur_string( pc ) ); + if( !pc.magic->has_enough_energy( pc, sp ) ) { + cost_string = colorize( _( "Not Enough Energy" ), c_red ); + energy_cur.clear(); + } + info_txt.emplace_back( + colorize( string_format( "%s: %s %s%s", cost_string, sp.energy_cost_string( pc ), + sp.energy_string(), energy_cur ), c_light_gray ) ); + }; const bool c_t_encumb = sp.casting_time_encumbered( pc ); - info_txt.emplace_back( - colorize( string_format( "%s: %s", c_t_encumb ? _( "Casting Time (impeded)" ) : _( "Casting Time" ), - moves_to_string( sp.casting_time( pc ) ) ), c_t_encumb ? c_red : c_light_gray ) ); + if( is_psi ) { + info_txt.emplace_back( + colorize( string_format( "%s: %s", + c_t_encumb ? _( "Channeling Time (impeded)" ) : _( "Channeling Time" ), + moves_to_string( sp.casting_time( pc ) ) ), c_t_encumb ? c_red : c_light_gray ) ); - info_txt.emplace_back( ); + info_txt.emplace_back( ); + } else { + info_txt.emplace_back( + colorize( string_format( "%s: %s", c_t_encumb ? _( "Casting Time (impeded)" ) : _( "Casting Time" ), + moves_to_string( sp.casting_time( pc ) ) ), c_t_encumb ? c_red : c_light_gray ) ); + + info_txt.emplace_back( ); + }; std::string targets; if( sp.is_valid_target( spell_target::none ) ) { From 7b13a606bc9dc9ab9030d3829650a51271986866 Mon Sep 17 00:00:00 2001 From: Vladimir Masarik Date: Fri, 29 Mar 2024 04:29:58 +0100 Subject: [PATCH 34/42] Fix price of nickel powder (#72585) * Fix nickel powder price Signed-off-by: Vladimir Masarik * Update data/json/items/chemicals_and_resources.json * Update data/json/items/chemicals_and_resources.json --------- Signed-off-by: Vladimir Masarik Co-authored-by: Maleclypse <54345792+Maleclypse@users.noreply.github.com> --- data/json/items/chemicals_and_resources.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/json/items/chemicals_and_resources.json b/data/json/items/chemicals_and_resources.json index 79607e6fb6138..21c0479081010 100644 --- a/data/json/items/chemicals_and_resources.json +++ b/data/json/items/chemicals_and_resources.json @@ -499,8 +499,8 @@ "type": "AMMO", "id": "chem_nickel_powder", "category": "chems", - "price": 3000, - "price_postapoc": 500, + "price": 12, + "price_postapoc": 2, "name": { "str_sp": "nickel powder" }, "symbol": "=", "color": "white", From ca74127000d4aaed1e9c8f29b6628814e0bcdc16 Mon Sep 17 00:00:00 2001 From: Kevin Granade Date: Thu, 28 Mar 2024 20:31:13 -0700 Subject: [PATCH 35/42] Add a gun-less variant of mansion safe item group and use it in the resort. (#72595) * Add a gun-less variant of mansion safe item group and use it in the resort. * Update data/json/itemgroups/Locations_MapExtras/mansion.json * Update data/json/itemgroups/Locations_MapExtras/mansion.json --------- Co-authored-by: Maleclypse <54345792+Maleclypse@users.noreply.github.com> --- .../itemgroups/Locations_MapExtras/mansion.json | 16 ++++++++++++++++ data/json/mapgen_palettes/private_resort.json | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/data/json/itemgroups/Locations_MapExtras/mansion.json b/data/json/itemgroups/Locations_MapExtras/mansion.json index cd48504e6590e..5169b6e944691 100644 --- a/data/json/itemgroups/Locations_MapExtras/mansion.json +++ b/data/json/itemgroups/Locations_MapExtras/mansion.json @@ -83,6 +83,22 @@ { "group": "mansion_guns", "prob": 80 } ] }, + { + "id": "mansion_safe_nogun", + "type": "item_group", + "subtype": "collection", + "items": [ + [ "diamond", 20 ], + { "item": "money_bundle_twenty", "prob": 50, "count": [ 1, 5 ] }, + { "item": "money_bundle_fifty", "prob": 50, "count": [ 1, 5 ] }, + { "item": "money_bundle_hundred", "prob": 20, "count": [ 1, 2 ] }, + { "group": "stash_drugs", "prob": 5 }, + [ "file", 70 ], + { "group": "jewelry_front", "prob": 40 }, + { "group": "costume_jewelry_vampire", "prob": 5 }, + { "group": "costume_jewelry_dark", "prob": 5 } + ] + }, { "id": "mansion_gunsafe", "type": "item_group", diff --git a/data/json/mapgen_palettes/private_resort.json b/data/json/mapgen_palettes/private_resort.json index 975aad8ee595e..dac63147e6c3a 100644 --- a/data/json/mapgen_palettes/private_resort.json +++ b/data/json/mapgen_palettes/private_resort.json @@ -45,7 +45,7 @@ "toilets": { "$": { } }, "items": { "$": { "item": "stash_drugs", "chance": 75 }, - "Y": { "item": "mansion_safe", "chance": 100, "repeat": [ 3, 8 ] }, + "Y": { "item": "mansion_safe_nogun", "chance": 100, "repeat": [ 3, 8 ] }, "l": { "item": "trash", "chance": 66, "repeat": [ 1, 3 ] }, "e": { "item": "SUS_office_desk", "chance": 50 }, "K": { "item": "unisex_coat_rack", "chance": 33, "repeat": [ 1, 3 ] }, From 91a9f7f3dfefcc7f7faf6379482d05afe63163d5 Mon Sep 17 00:00:00 2001 From: wwkk222208 <92137695+wwkk222208@users.noreply.github.com> Date: Fri, 29 Mar 2024 11:45:04 +0800 Subject: [PATCH 36/42] Disable warnings related to ledge when the creature has the "LEVITATION" flag (#72613) * Disable warnings related to ledge when the creature has the "LEVITATION" flag * Astyle * Update src/map.cpp * Update src/map.cpp --------- Co-authored-by: Maleclypse <54345792+Maleclypse@users.noreply.github.com> --- src/map.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/map.cpp b/src/map.cpp index f1e462f40686c..736d6627aad3e 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -125,6 +125,7 @@ static const efftype_id effect_pet( "pet" ); static const field_type_str_id field_fd_clairvoyant( "fd_clairvoyant" ); static const flag_id json_flag_AVATAR_ONLY( "AVATAR_ONLY" ); +static const flag_id json_flag_LEVITATION( "LEVITATION" ); static const flag_id json_flag_PRESERVE_SPAWN_OMT( "PRESERVE_SPAWN_OMT" ); static const flag_id json_flag_PROXIMITY( "PROXIMITY" ); static const flag_id json_flag_UNDODGEABLE( "UNDODGEABLE" ); @@ -9868,7 +9869,9 @@ void map::maybe_trigger_prox_trap( const tripoint &pos, Creature &c, const bool if( tr.is_null() ) { return; } - + if( tr == tr_ledge && c.has_effect_with_flag( json_flag_LEVITATION ) ) { + return; + } //Don't trigger benign traps like cots and funnels if( tr.is_benign() ) { return; @@ -9900,7 +9903,9 @@ void map::maybe_trigger_trap( const tripoint &pos, Creature &c, const bool may_a if( tr.is_null() ) { return; } - + if( tr == tr_ledge && c.has_effect_with_flag( json_flag_LEVITATION ) ) { + return; + } //Don't trigger benign traps like cots and funnels if( tr.is_benign() ) { return; From a94fc8d196e1b3ef31dcb68d427c481ad4b39354 Mon Sep 17 00:00:00 2001 From: Risuga Date: Thu, 28 Mar 2024 20:51:42 -0700 Subject: [PATCH 37/42] Hub armor fix and update ballistic material (#72679) * fix hub kinetic greaves * update kevlar to layered kevlar * Update data/json/items/armor/robofac_armor.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/json/items/armor/robofac_armor.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/json/items/armor/robofac_armor.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/json/items/armor/robofac_armor.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * bot linting formatting Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- data/json/items/armor/robofac_armor.json | 32 +++++++++++++++++++----- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/data/json/items/armor/robofac_armor.json b/data/json/items/armor/robofac_armor.json index 80f7959e3d604..9ba4a4bb3c6e5 100644 --- a/data/json/items/armor/robofac_armor.json +++ b/data/json/items/armor/robofac_armor.json @@ -694,7 +694,11 @@ "copy-from": "robofac_mantle", "name": "Hub 01 ballistic mantle", "description": "3D printed armor for the upper body, made of thick and pliable polymer with metallic fibers for reinforcement. Thanks to a slim under-layer of synthetic fibers, it provides fantastic defense from small-arms fire, and could take the edge off of a rifle bullet, too. Designed to clip to the chest and shoulders, its interior reads \"ATTACH TO MODULAR DEFENSE SYSTEM\".", - "material": [ { "type": "plastic", "portion": 2 }, { "type": "qt_steel", "portion": 1 }, { "type": "kevlar", "portion": 4 } ], + "material": [ + { "type": "plastic", "portion": 2 }, + { "type": "qt_steel", "portion": 1 }, + { "type": "kevlar_layered", "portion": 4 } + ], "proportional": { "weight": 1.5 } }, { @@ -748,7 +752,11 @@ "copy-from": "robofac_skirt", "name": "Hub 01 ballistic skirt", "description": "3D printed armor for the thighs and knees, consisting of a skirt made of segmented armor plates. It includes a reinforcing layer of aramid fabric in addition to leg sleeves made of high-strength material, protecting your sensitive bits from small-arms fire. Designed to clip to the waist, its interior reads \"ATTACH TO MODULAR DEFENSE SYSTEM\".", - "material": [ { "type": "plastic", "portion": 2 }, { "type": "qt_steel", "portion": 1 }, { "type": "kevlar", "portion": 4 } ], + "material": [ + { "type": "plastic", "portion": 2 }, + { "type": "qt_steel", "portion": 1 }, + { "type": "kevlar_layered", "portion": 4 } + ], "proportional": { "weight": 1.5 } }, { @@ -802,7 +810,11 @@ "copy-from": "robofac_vambraces", "name": { "str": "pair of Hub 01 ballistic vambraces", "str_pl": "pairs of Hub 01 ballistic vambraces" }, "description": "3D printed arm guards, made of large and flexible polymer sheets wrapped around the forearm. These ones include aramid arm sleeves that do a great job of slowing down bullets and preventing them from shredding your arms.", - "material": [ { "type": "plastic", "portion": 2 }, { "type": "qt_steel", "portion": 1 }, { "type": "kevlar", "portion": 4 } ], + "material": [ + { "type": "plastic", "portion": 2 }, + { "type": "qt_steel", "portion": 1 }, + { "type": "kevlar_layered", "portion": 4 } + ], "proportional": { "weight": 1.5 } }, { @@ -836,7 +848,7 @@ "copy-from": "robofac_greaves", "name": { "str": "pair of Hub 01 kinetic greaves", "str_pl": "pairs of Hub 01 kinetic greaves" }, "description": "3D printed leg guards, consisting of thick knee pads and a pair of large, flexible polymer plates for securing around the calves to protect the tibias of each leg. Thick padding and rubber lining provide excellent protection from blunt trauma.", - "material": [ { "type": "plastic", "portion": 2 }, { "type": "qt_steel", "portion": 4 }, { "type": "rubber", "portion": 4 } ], + "material": [ { "type": "plastic", "portion": 2 }, { "type": "qt_steel", "portion": 1 }, { "type": "rubber", "portion": 4 } ], "proportional": { "weight": 1.576 } }, { @@ -856,7 +868,11 @@ "copy-from": "robofac_greaves", "name": { "str": "pair of Hub 01 ballistic greaves", "str_pl": "pairs of Hub 01 ballistic greaves" }, "description": "3D printed leg guards, consisting of thick knee pads and a pair of large, flexible polymer plates for securing around the calves to protect the tibias of each leg. This model features leggings made of durable aramid and a reinforced plate design; combined, they do a good job of mitigating damage from small-arms fire.", - "material": [ { "type": "plastic", "portion": 2 }, { "type": "qt_steel", "portion": 1 }, { "type": "kevlar", "portion": 4 } ], + "material": [ + { "type": "plastic", "portion": 2 }, + { "type": "qt_steel", "portion": 1 }, + { "type": "kevlar_layered", "portion": 4 } + ], "proportional": { "weight": 1.5 } }, { @@ -910,7 +926,11 @@ "copy-from": "robofac_helmet", "name": "Hub 01 ballistic helmet", "description": "3D printed armor for the head, made of thick polymer plates woven with metallic fibers. This one has extra kevlar and steel layering, to provide superior protection against small arms. Designed to clip to some kind of attachment point, its interior reads \"ATTACH TO MODULAR HEADGEAR\".", - "material": [ { "type": "plastic", "portion": 2 }, { "type": "qt_steel", "portion": 1 }, { "type": "kevlar", "portion": 4 } ], + "material": [ + { "type": "plastic", "portion": 2 }, + { "type": "qt_steel", "portion": 1 }, + { "type": "kevlar_layered", "portion": 4 } + ], "proportional": { "weight": 1.5 } }, { From 70e17826f108302e65bb3916b90e0e3f3909cde3 Mon Sep 17 00:00:00 2001 From: Venera3 <72006894+Venera3@users.noreply.github.com> Date: Fri, 29 Mar 2024 05:00:03 +0100 Subject: [PATCH 38/42] Allow disabling limb conditional flags via effects (#72609) * Flag-disabling effect flags * Code part 2 * Update limb_test.cpp * Update data/json/effects.json * Update data/json/effects.json --------- Co-authored-by: Maleclypse <54345792+Maleclypse@users.noreply.github.com> --- data/json/effects.json | 4 ++-- doc/JSON_FLAGS.md | 7 ++++--- src/character.cpp | 29 +++++++++++++++++++++++++++-- src/flag.cpp | 1 + src/flag.h | 1 + tests/limb_test.cpp | 11 +++++++++++ 6 files changed, 46 insertions(+), 7 deletions(-) diff --git a/data/json/effects.json b/data/json/effects.json index 6c21f8f8f0002..502fe99469fb0 100644 --- a/data/json/effects.json +++ b/data/json/effects.json @@ -567,7 +567,7 @@ { "limb_score": "manip", "modifier": 0.8 }, { "limb_score": "grip", "modifier": 0.8 } ], - "flags": [ "EFFECT_LIMB_SCORE_MOD" ] + "flags": [ "EFFECT_LIMB_SCORE_MOD", "EFFECT_LIMB_DISABLE_CONDITIONAL_FLAGS" ] }, { "type": "effect_type", @@ -591,7 +591,7 @@ { "limb_score": "footing", "modifier": 0.5 }, { "limb_score": "balance", "modifier": 0.5 } ], - "flags": [ "EFFECT_LIMB_SCORE_MOD" ] + "flags": [ "EFFECT_LIMB_SCORE_MOD", "EFFECT_LIMB_DISABLE_CONDITIONAL_FLAGS" ] }, { "type": "effect_type", diff --git a/doc/JSON_FLAGS.md b/doc/JSON_FLAGS.md index 794d412fcff05..37ffca70a23ad 100644 --- a/doc/JSON_FLAGS.md +++ b/doc/JSON_FLAGS.md @@ -316,6 +316,7 @@ Some armor flags, such as `WATCH` and `ALARMCLOCK` are compatible with other ite - ```LIMB_UPPER``` This bodypart is high off the ground, and as such can't be attacked by small monsters - unless they have the `FLIES` or have `ATTACK_UPPER` flags`. - ```MEND_LIMB``` This bodypart can heal from being broken without needing a splint. - ```NONSTANDARD_BLOCK``` This limb is different enough that martial arts' arm/leg blocks aren't applicable - blocking with this limb is unlocked by reaching the MA's `nonstandard_block` level, unless the limb also has `ALWAYS_BLOCK`. Either block flag is **required** for non-arm / non-leg limbs to be eligible to block. +- ```WING_ARM``` Counts as a wing for `Character::can_fly` if two instances of the flag are present. ## Books @@ -332,7 +333,6 @@ Character flags can be `trait_id`, `json_flag_id` or `flag_id`. Some of these a - ```ACID_IMMUNE``` You are immune to acid damage. - ```ALARMCLOCK``` You always can set alarms. - ```ALBINO``` Cause you to have painful sunburns. -- ```ARM_WINGS``` You have wings instead of regular arms. - ```BASH_IMMUNE``` You are immune to bashing damage. - ```BG_OTHER_SURVIVORS_STORY``` Given to NPC when it has other survival story. - ```BG_SURVIVAL_STORY``` Given to NPC when it has a survival story. @@ -429,8 +429,8 @@ Character flags can be `trait_id`, `json_flag_id` or `flag_id`. Some of these a - ```WEBBED_HANDS``` You have webbings on your hands, supporting your swimming speed. - ```WEB_RAPPEL``` You can rappel down staircases and sheer drops of any height. - ```WEB_WALKER``` Removes the movement speed demerit while walking through webs. -- ```WINGS_1``` You have 50% chance to ignore falling traps (including ledges). -- ```WINGS_2``` You have 100% chance to ignore falling traps (including ledges). Requires two flag instances. +- ```WINGS_1``` You can slow your fall, effectively reducing the height of it by 1 level. +- ```WINGS_2``` You can slow your fall, effectively reducing the height of falls by 2 levels, and ignore pit-like traps. - ```WINGGLIDE``` You can glide using some part of your body and strenuous physical effort. - ```mycus``` acts as `THRESH_MYCUS`, makes all monsters with FUNGUS species friendly, fungicidal gas & antifungal pills cause worse effects. Mutate when eating mycus fruit, or when sleeping. @@ -564,6 +564,7 @@ These are checked by hardcode for monsters (introducing new flags will require C - ```DISABLE_FLIGHT``` Monsters affected by an effect with this flag will never count as flying (even if they have the `FLIES` flag). - ```EFFECT_IMPEDING``` Character affected by an effect with this flag can't move until they break free from the effect. Breaking free requires a strength check: `x_in_y( STR * limb lifting score * limb grip score, 6 * get_effect_int( eff_id )`. +- ```EFFECT_LIMB_DISABLE_CONDITIONAL_FLAGS``` Effect disables any conditional flags the limb has. - ```EFFECT_LIMB_SCORE_MOD``` Effect with a limb score component to be used in Character::get_limb_score. See [EFFECTS_JSON.md](EFFECTS_JSON.md) for the exact function of limb score modifiers and [JSON_INFO.md](JSON_INFO.md#limb-scores) for the effects of the scores. - ```EFFECT_LIMB_SCORE_MOD_LOCAL``` Same as `EFFECT_LIMB_SCORE_MOD`, but limb score is modified only if effect is applied to body part, that has said score; effect, that apply -50% vision debuff, won't have effect if applied to leg with this flag. - ```GRAB``` This effect is a grab, creatures will attempt to break it as such (see `character_escape.cpp`). diff --git a/src/character.cpp b/src/character.cpp index 48a733764adb2..1aae3d3c9e8c8 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -11893,7 +11893,21 @@ bool Character::has_bodypart_with_flag( const json_character_flag &flag ) const return true; } if( elem.second.has_conditional_flag( flag ) ) { - return true; + // Checking for disabling effects is a bit convoluted + bool disabled = false; + if( has_effect_with_flag( flag_EFFECT_LIMB_DISABLE_CONDITIONAL_FLAGS ) ) { + for( const effect &eff : get_effects_from_bp( elem.first ) ) { + if( eff.has_flag( flag_EFFECT_LIMB_DISABLE_CONDITIONAL_FLAGS ) ) { + disabled = true; + break; + + } + } + } + if( !disabled ) { + return true; + + } } } return false; @@ -11907,7 +11921,18 @@ int Character::count_bodypart_with_flag( const json_character_flag &flag ) const ret++; } if( get_part( bp )->has_conditional_flag( flag ) ) { - ret++; + bool disabled = false; + if( has_effect_with_flag( flag_EFFECT_LIMB_DISABLE_CONDITIONAL_FLAGS ) ) { + for( const effect &eff : get_effects_from_bp( bp ) ) { + if( eff.has_flag( flag_EFFECT_LIMB_DISABLE_CONDITIONAL_FLAGS ) ) { + disabled = true; + break; + } + } + } + if( !disabled ) { + ret++; + } } } return ret; diff --git a/src/flag.cpp b/src/flag.cpp index 4388d07b73278..656d90d885d16 100644 --- a/src/flag.cpp +++ b/src/flag.cpp @@ -94,6 +94,7 @@ const flag_id flag_EATEN_COLD( "EATEN_COLD" ); const flag_id flag_EATEN_HOT( "EATEN_HOT" ); const flag_id flag_EDIBLE_FROZEN( "EDIBLE_FROZEN" ); const flag_id flag_EFFECT_IMPEDING( "EFFECT_IMPEDING" ); +const flag_id flag_EFFECT_LIMB_DISABLE_CONDITIONAL_FLAGS( "EFFECT_LIMB_DISABLE_CONDITIONAL_FLAGS" ); const flag_id flag_EFFECT_LIMB_SCORE_MOD( "EFFECT_LIMB_SCORE_MOD" ); const flag_id flag_EFFECT_LIMB_SCORE_MOD_LOCAL( "EFFECT_LIMB_SCORE_MOD_LOCAL" ); const flag_id flag_ELECTRIC_IMMUNE( "ELECTRIC_IMMUNE" ); diff --git a/src/flag.h b/src/flag.h index 698287b6f8b8a..a036b627e0348 100644 --- a/src/flag.h +++ b/src/flag.h @@ -104,6 +104,7 @@ extern const flag_id flag_EATEN_COLD; extern const flag_id flag_EATEN_HOT; extern const flag_id flag_EDIBLE_FROZEN; extern const flag_id flag_EFFECT_IMPEDING; +extern const flag_id flag_EFFECT_LIMB_DISABLE_CONDITIONAL_FLAGS; extern const flag_id flag_EFFECT_LIMB_SCORE_MOD; extern const flag_id flag_EFFECT_LIMB_SCORE_MOD_LOCAL; extern const flag_id flag_ELECTRIC_IMMUNE; diff --git a/tests/limb_test.cpp b/tests/limb_test.cpp index 2939c5ba9e724..f0c6c44e38852 100644 --- a/tests/limb_test.cpp +++ b/tests/limb_test.cpp @@ -3,6 +3,7 @@ #include "character.h" #include "character_modifier.h" #include "damage.h" +#include "flag.h" #include "item.h" #include "itype.h" #include "magic_enchantment.h" @@ -19,6 +20,7 @@ static const bodypart_str_id body_part_test_corvid_beak( "test_corvid_beak" ); static const bodypart_str_id body_part_test_lizard_tail( "test_lizard_tail" ); static const efftype_id effect_mending( "mending" ); +static const efftype_id effect_winded_arm_r( "winded_arm_r" ); static const enchantment_id enchantment_ENCH_TEST_BIRD_PARTS( "ENCH_TEST_BIRD_PARTS" ); static const enchantment_id enchantment_ENCH_TEST_LIZARD_TAIL( "ENCH_TEST_LIZARD_TAIL" ); @@ -99,6 +101,15 @@ TEST_CASE( "limb_conditional_flags", "[character][encumbrance][limb]" ) REQUIRE( dude.get_part_encumbrance_data( body_part_test_bird_wing_l ).encumbrance >= 15 ); CHECK( !dude.has_bodypart_with_flag( json_flag_WALL_CLING ) ); CHECK( dude.count_flag( json_flag_WALL_CLING ) == 0 ); + + // Reset our right wing, flag still is enabled again + dude.set_part_hp_cur( body_part_test_bird_wing_r, 100 ); + CHECK( dude.count_flag( json_flag_WALL_CLING ) == 1 ); + // Disable it with a windage effect + dude.add_effect( effect_winded_arm_r, 1_hours, body_part_test_bird_wing_r, false, 1, true ); + REQUIRE( dude.get_effects_with_flag( flag_EFFECT_LIMB_DISABLE_CONDITIONAL_FLAGS ).size() == 1 ); + CHECK( dude.count_flag( json_flag_WALL_CLING ) == 0 ); + } TEST_CASE( "Limb_ugliness_calculations", "[character][npc][limb]" ) From 199d61c9b604a75121efc1de6878e98bdf3b8850 Mon Sep 17 00:00:00 2001 From: DeltaPavonis <111613869+DPavonis@users.noreply.github.com> Date: Thu, 28 Mar 2024 21:00:49 -0700 Subject: [PATCH 39/42] LIXA 3: The LIXAning (#72264) * Initial commit, locked up facility properly * Added basic mission def * Added macguffin for player to retrieve * Intercom now tracks how many recordings the player has personally sold * Player must have sold more than 2 NRE recordings to access this mission * Misc text changes I forgot to do in the original PR * Added dialogue topic to experiment computer so player can get macguffin * Attempt at appeasing Clang * Clang has now been appeased, hail Clang! * First pass on fleshing out mission dialogue * Further fleshed out mission dialogue, added actual debrief. * Further mission dialogue added * Generate NRE anomaly on stepping into the infinite corridor * Caught a misspelling * Remove advice topic, add more to general information topic. * Add unfolded impossibility to NRE anomaly record-on-death list * Fix obvious bug I missed * Changed from 8 to 5 HGC as reward * Added bar encounter story * Fixed, "This talker doesn't have a name" issue * Linting * Added shifting and titanic eigenspectres to the NRE anomaly list * Added spare secure USB drive in LIXA facility just in case * Futzing around with the rant dialogue * Liiiiiiiiiiiiiiiiiiiiiiiint * Replace three dots with ellipses * Lint? * Is Clang pleased now? * More instances of spacial->spatial --- .../nether_eocs/LIXA_EOCs_spells_traps.json | 53 +++-- .../portal_storm_effect_on_condition.json | 5 +- .../LIXA_furniture_and_terrain.json | 4 +- data/json/items/generic.json | 9 + data/json/mapgen/LIXA_mapgen.json | 5 +- data/json/monsters/LIXA_monsters.json | 2 +- data/json/npcs/LIXA_talk.json | 94 +++++++- .../BEM_chatting_veterans.json | 18 ++ .../robofac_intercom_missions.json | 207 ++++++++++++++++++ .../robofac_intercom_trades.json | 4 + 10 files changed, 367 insertions(+), 34 deletions(-) diff --git a/data/json/effects_on_condition/nether_eocs/LIXA_EOCs_spells_traps.json b/data/json/effects_on_condition/nether_eocs/LIXA_EOCs_spells_traps.json index 2cc252c2f9ee7..90561a4f61bbb 100644 --- a/data/json/effects_on_condition/nether_eocs/LIXA_EOCs_spells_traps.json +++ b/data/json/effects_on_condition/nether_eocs/LIXA_EOCs_spells_traps.json @@ -498,82 +498,103 @@ { "type": "effect_on_condition", "id": "EOC_LIXA_UNFOLD_ENTRY_SETUP_1", - "effect": [ { "math": [ "u_LIXA_entry", "=", "1" ] }, { "run_eocs": "EOC_LIXA_UNFOLD_ENTRY" } ] + "effect": [ { "math": [ "u_LIXA_entry", "=", "1" ] }, { "run_eocs": [ "EOC_LIXA_UNFOLD_ENTRY", "capture_generic_nre_anomaly" ] } ] }, { "type": "effect_on_condition", "id": "EOC_LIXA_UNFOLD_ENTRY_SETUP_2", - "effect": [ { "math": [ "u_LIXA_entry", "=", "2" ] }, { "run_eocs": "EOC_LIXA_UNFOLD_ENTRY" } ] + "effect": [ { "math": [ "u_LIXA_entry", "=", "2" ] }, { "run_eocs": [ "EOC_LIXA_UNFOLD_ENTRY", "capture_generic_nre_anomaly" ] } ] }, { "type": "effect_on_condition", "id": "EOC_LIXA_UNFOLD_ENTRY_SETUP_3", - "effect": [ { "math": [ "u_LIXA_entry", "=", "3" ] }, { "run_eocs": "EOC_LIXA_UNFOLD_ENTRY" } ] + "effect": [ { "math": [ "u_LIXA_entry", "=", "3" ] }, { "run_eocs": [ "EOC_LIXA_UNFOLD_ENTRY", "capture_generic_nre_anomaly" ] } ] }, { "type": "effect_on_condition", "id": "EOC_LIXA_UNFOLD_ENTRY_SETUP_4", - "effect": [ { "math": [ "u_LIXA_entry", "=", "4" ] }, { "run_eocs": "EOC_LIXA_UNFOLD_ENTRY" } ] + "effect": [ { "math": [ "u_LIXA_entry", "=", "4" ] }, { "run_eocs": [ "EOC_LIXA_UNFOLD_ENTRY", "capture_generic_nre_anomaly" ] } ] }, { "type": "effect_on_condition", "id": "EOC_LIXA_UNFOLD_ENTRY_SETUP_5", - "effect": [ { "math": [ "u_LIXA_entry", "=", "5" ] }, { "run_eocs": "EOC_LIXA_UNFOLD_ENTRY" } ] + "effect": [ { "math": [ "u_LIXA_entry", "=", "5" ] }, { "run_eocs": [ "EOC_LIXA_UNFOLD_ENTRY", "capture_generic_nre_anomaly" ] } ] }, { "type": "effect_on_condition", "id": "EOC_LIXA_UNFOLD_ENTRY_SETUP_6", - "effect": [ { "math": [ "u_LIXA_entry", "=", "6" ] }, { "run_eocs": "EOC_LIXA_UNFOLD_ENTRY" } ] + "effect": [ { "math": [ "u_LIXA_entry", "=", "6" ] }, { "run_eocs": [ "EOC_LIXA_UNFOLD_ENTRY", "capture_generic_nre_anomaly" ] } ] }, { "type": "effect_on_condition", "id": "EOC_LIXA_UNFOLD_ENTRY_SETUP_7", - "effect": [ { "math": [ "u_LIXA_entry", "=", "7" ] }, { "run_eocs": "EOC_LIXA_UNFOLD_ENTRY" } ] + "effect": [ { "math": [ "u_LIXA_entry", "=", "7" ] }, { "run_eocs": [ "EOC_LIXA_UNFOLD_ENTRY", "capture_generic_nre_anomaly" ] } ] }, { "type": "effect_on_condition", "id": "EOC_LIXA_UNFOLD_ENTRY_SETUP_8", - "effect": [ { "math": [ "u_LIXA_entry", "=", "8" ] }, { "run_eocs": "EOC_LIXA_UNFOLD_ENTRY" } ] + "effect": [ { "math": [ "u_LIXA_entry", "=", "8" ] }, { "run_eocs": [ "EOC_LIXA_UNFOLD_ENTRY", "capture_generic_nre_anomaly" ] } ] }, { "type": "effect_on_condition", "id": "EOC_LIXA_UNFOLD_ENTRY_SETUP_9", - "effect": [ { "math": [ "u_LIXA_entry", "=", "9" ] }, { "run_eocs": "EOC_LIXA_UNFOLD_ENTRY" } ] + "effect": [ { "math": [ "u_LIXA_entry", "=", "9" ] }, { "run_eocs": [ "EOC_LIXA_UNFOLD_ENTRY", "capture_generic_nre_anomaly" ] } ] }, { "type": "effect_on_condition", "id": "EOC_LIXA_UNFOLD_ENTRY_SETUP_10", - "effect": [ { "math": [ "u_LIXA_entry", "=", "10" ] }, { "run_eocs": "EOC_LIXA_UNFOLD_ENTRY" } ] + "effect": [ + { "math": [ "u_LIXA_entry", "=", "10" ] }, + { "run_eocs": [ "EOC_LIXA_UNFOLD_ENTRY", "capture_generic_nre_anomaly" ] } + ] }, { "type": "effect_on_condition", "id": "EOC_LIXA_UNFOLD_ENTRY_SETUP_11", - "effect": [ { "math": [ "u_LIXA_entry", "=", "11" ] }, { "run_eocs": "EOC_LIXA_UNFOLD_ENTRY" } ] + "effect": [ + { "math": [ "u_LIXA_entry", "=", "11" ] }, + { "run_eocs": [ "EOC_LIXA_UNFOLD_ENTRY", "capture_generic_nre_anomaly" ] } + ] }, { "type": "effect_on_condition", "id": "EOC_LIXA_UNFOLD_ENTRY_SETUP_12", - "effect": [ { "math": [ "u_LIXA_entry", "=", "12" ] }, { "run_eocs": "EOC_LIXA_UNFOLD_ENTRY" } ] + "effect": [ + { "math": [ "u_LIXA_entry", "=", "12" ] }, + { "run_eocs": [ "EOC_LIXA_UNFOLD_ENTRY", "capture_generic_nre_anomaly" ] } + ] }, { "type": "effect_on_condition", "id": "EOC_LIXA_UNFOLD_ENTRY_SETUP_13", - "effect": [ { "math": [ "u_LIXA_entry", "=", "13" ] }, { "run_eocs": "EOC_LIXA_UNFOLD_ENTRY" } ] + "effect": [ + { "math": [ "u_LIXA_entry", "=", "13" ] }, + { "run_eocs": [ "EOC_LIXA_UNFOLD_ENTRY", "capture_generic_nre_anomaly" ] } + ] }, { "type": "effect_on_condition", "id": "EOC_LIXA_UNFOLD_ENTRY_SETUP_14", - "effect": [ { "math": [ "u_LIXA_entry", "=", "14" ] }, { "run_eocs": "EOC_LIXA_UNFOLD_ENTRY" } ] + "effect": [ + { "math": [ "u_LIXA_entry", "=", "14" ] }, + { "run_eocs": [ "EOC_LIXA_UNFOLD_ENTRY", "capture_generic_nre_anomaly" ] } + ] }, { "type": "effect_on_condition", "id": "EOC_LIXA_UNFOLD_ENTRY_SETUP_15", - "effect": [ { "math": [ "u_LIXA_entry", "=", "15" ] }, { "run_eocs": "EOC_LIXA_UNFOLD_ENTRY" } ] + "effect": [ + { "math": [ "u_LIXA_entry", "=", "15" ] }, + { "run_eocs": [ "EOC_LIXA_UNFOLD_ENTRY", "capture_generic_nre_anomaly" ] } + ] }, { "type": "effect_on_condition", "id": "EOC_LIXA_UNFOLD_ENTRY_SETUP_16", - "effect": [ { "math": [ "u_LIXA_entry", "=", "16" ] }, { "run_eocs": "EOC_LIXA_UNFOLD_ENTRY" } ] + "effect": [ + { "math": [ "u_LIXA_entry", "=", "16" ] }, + { "run_eocs": [ "EOC_LIXA_UNFOLD_ENTRY", "capture_generic_nre_anomaly" ] } + ] }, { "type": "effect_on_condition", diff --git a/data/json/effects_on_condition/nether_eocs/portal_storm_effect_on_condition.json b/data/json/effects_on_condition/nether_eocs/portal_storm_effect_on_condition.json index 7ee3eee5951b7..ddfee659c403d 100644 --- a/data/json/effects_on_condition/nether_eocs/portal_storm_effect_on_condition.json +++ b/data/json/effects_on_condition/nether_eocs/portal_storm_effect_on_condition.json @@ -1318,7 +1318,10 @@ { "compare_string": [ "mon_hallucinator", { "context_val": "victim_type" } ] }, { "compare_string": [ "mon_archunk_strong", { "context_val": "victim_type" } ] }, { "compare_string": [ "mon_void_spider", { "context_val": "victim_type" } ] }, - { "compare_string": [ "mon_XEDRA_officer", { "context_val": "victim_type" } ] } + { "compare_string": [ "mon_XEDRA_officer", { "context_val": "victim_type" } ] }, + { "compare_string": [ "LIXA_eigenspectre_3", { "context_val": "victim_type" } ] }, + { "compare_string": [ "LIXA_eigenspectre_4", { "context_val": "victim_type" } ] }, + { "compare_string": [ "LIXA_living_vector", { "context_val": "victim_type" } ] } ] } ] diff --git a/data/json/furniture_and_terrain/LIXA_furniture_and_terrain.json b/data/json/furniture_and_terrain/LIXA_furniture_and_terrain.json index 2eeac14c85b58..890fa40f341ca 100644 --- a/data/json/furniture_and_terrain/LIXA_furniture_and_terrain.json +++ b/data/json/furniture_and_terrain/LIXA_furniture_and_terrain.json @@ -46,7 +46,7 @@ { "type": "terrain", "id": "t_LIXA_portal_pulse", - "name": "spacial compressor", + "name": "spatial compressor", "description": "A dizzyingly complex series of devices and readouts is on the outside of this machine's casing. You imagine the inside would be incomprehensible.", "symbol": "{", "color": "light_gray", @@ -279,7 +279,7 @@ "type": "terrain", "id": "t_LIXA_laser", "name": "precision laser emitter", - "description": "A huge casing for a device that generates and focuses a laser of incredible wavelength purity and precision.", + "description": "A huge casing for a device that generates and focuses a laser of an incredibly precise wavelength.", "symbol": "$", "color": "yellow", "looks_like": "t_machinery_electronic", diff --git a/data/json/items/generic.json b/data/json/items/generic.json index 38569c774b3d2..25d258eeca541 100644 --- a/data/json/items/generic.json +++ b/data/json/items/generic.json @@ -762,6 +762,15 @@ "price": 10000, "price_postapoc": 0 }, + { + "type": "GENERIC", + "id": "lixa_data", + "copy-from": "usb_drive_nano", + "name": { "str_sp": "LIXA research archive backup" }, + "description": "A secured USB thumbdrive, containing a copy of the LIXA facility's research archives.", + "price": 10000, + "price_postapoc": 0 + }, { "id": "robofac_hardcase", "type": "GENERIC", diff --git a/data/json/mapgen/LIXA_mapgen.json b/data/json/mapgen/LIXA_mapgen.json index d67cd4bfbe030..7a60b6eac8316 100644 --- a/data/json/mapgen/LIXA_mapgen.json +++ b/data/json/mapgen/LIXA_mapgen.json @@ -50,8 +50,8 @@ "/////////// ////////+/", "/ ///S.S.../", "/ ///// /T+.....l/", - "/ //d//DDDDDD/e../ ///..i.../", - "/ / w{../ ///....../", + "/ //D//DDDDDD/e../ ///..i.../", + "/ /5 w{../ ///....../", "/ / w{H.d /T+.l/L/L/", "//////////////// //////////////////////" ], @@ -563,6 +563,7 @@ { "item": "knit_scarf", "x": 18, "y": 1, "amount": 2 }, { "item": "laptop", "x": 18, "y": 5, "amount": 1 }, { "item": "software_useless", "x": 18, "y": 5, "amount": [ 4, 7 ] }, + { "item": "usb_drive_nano", "x": 18, "y": 5, "amount": 1 }, { "item": "knitting_needles", "x": 18, "y": 5, "amount": [ 4, 8 ] }, { "item": "yarn", "x": 18, "y": 5, "amount": [ 20, 40 ] }, { "item": "laptop", "x": 14, "y": 1, "amount": 1 }, diff --git a/data/json/monsters/LIXA_monsters.json b/data/json/monsters/LIXA_monsters.json index 9c2b93a5e22e1..8af3828735644 100644 --- a/data/json/monsters/LIXA_monsters.json +++ b/data/json/monsters/LIXA_monsters.json @@ -360,7 +360,7 @@ "type": "spell", "id": "LIXA_reshuffle_cone", "spell_data": { "id": "LIXA_reshuffle_cone", "min_level": 1 }, - "monster_message": "The %s rearranges the parts of itself you occupy, dialating them around you.", + "monster_message": "The %s rearranges the parts of itself you occupy, dilating them around you.", "cooldown": 20 } ], diff --git a/data/json/npcs/LIXA_talk.json b/data/json/npcs/LIXA_talk.json index 5c0cfa812a38a..a0338ede89706 100644 --- a/data/json/npcs/LIXA_talk.json +++ b/data/json/npcs/LIXA_talk.json @@ -13,10 +13,10 @@ { "type": "talk_topic", "id": "LIXA_LAYMAN_BRIEFING", - "dynamic_line": "The screen bears the letters LIXA in big bold font. Underneath it, in smaller letters, are the words \"Laser Interferometer eXospacial resonance Array\". The slides are neatly tabulated under grouped headers down the side.", + "dynamic_line": "The screen bears the letters LIXA in big bold font. Underneath it, in smaller letters, are the words \"Laser Interferometer eXospatial resonance Array\". The slides are neatly tabulated under grouped headers down the side.", "responses": [ { "text": "\"What is LIXA?\"", "topic": "LIXA_briefing_1" }, - { "text": "\"LIGO and spacial compression.\"", "topic": "LIXA_briefing_2" }, + { "text": "\"LIGO and spatial compression.\"", "topic": "LIXA_briefing_2" }, { "text": "\"What is laser interferometry?\"", "topic": "LIXA_briefing_3a" }, { "text": "\"How does LIXA work?\"", "topic": "LIXA_briefing_4" }, { "text": "\"But what are we measuring???\"", "topic": "LIXA_briefing_5" }, @@ -27,10 +27,10 @@ { "type": "talk_topic", "id": "LIXA_briefing_1", - "dynamic_line": "\"LIXA, or 'Liza' as we like to call her, is the forefront of exospacial research. It has been confirmed that matter from our local n-space (the 4d coordinates in which we exist) can transit through exodimensions. But it cannot do it safely! To understand the behavior of exospace, we must first learn about how it works.\"", + "dynamic_line": "\"LIXA, or 'Liza' as we like to call her, is the forefront of exospatial research. It has been confirmed that matter from our local n-space (the 4d coordinates in which we exist) can transit through exodimensions. But it cannot do it safely! To understand the behavior of exospace, we must first learn about how it works.\"", "responses": [ { "text": "Title slide.", "topic": "LIXA_LAYMAN_BRIEFING" }, - { "text": "\"LIGO and spacial compression.\"", "topic": "LIXA_briefing_2" }, + { "text": "\"LIGO and spatial compression.\"", "topic": "LIXA_briefing_2" }, { "text": "\"What is laser interferometry?\"", "topic": "LIXA_briefing_3a" }, { "text": "\"How does LIXA work?\"", "topic": "LIXA_briefing_4" }, { "text": "\"But what are we measuring???\"", "topic": "LIXA_briefing_5" }, @@ -41,7 +41,7 @@ { "type": "talk_topic", "id": "LIXA_briefing_2", - "dynamic_line": "\"LIXA is based off a proposition for a device called LIGO (Laser Interferometer Gravitational wave Observatory). It was originally designed to confirm the existence of Gravitational Waves, a spreading distortion in spacetime caused by ultramassive events. The design has been repurposed for the exciting field of exospacial research, where we already know we can find spacial distortions!\"", + "dynamic_line": "\"LIXA is based off a proposition for a device called LIGO (Laser Interferometer Gravitational wave Observatory). It was originally designed to confirm the existence of Gravitational Waves, a spreading distortion in spacetime caused by ultramassive events. The design has been repurposed for the exciting field of exospatial research, where we already know we can find spatial distortions!\"", "responses": [ { "text": "Title slide.", "topic": "LIXA_LAYMAN_BRIEFING" }, { "text": "\"What is LIXA?\"", "topic": "LIXA_briefing_1" }, @@ -60,7 +60,7 @@ { "text": "The next slide is titled \"But what if?\"", "topic": "LIXA_briefing_3b" }, { "text": "Title slide.", "topic": "LIXA_LAYMAN_BRIEFING" }, { "text": "\"What is LIXA?\"", "topic": "LIXA_briefing_1" }, - { "text": "\"LIGO and spacial compression.\"", "topic": "LIXA_briefing_2" }, + { "text": "\"LIGO and spatial compression.\"", "topic": "LIXA_briefing_2" }, { "text": "\"How does LIXA work?\"", "topic": "LIXA_briefing_4" }, { "text": "\"But what are we measuring???\"", "topic": "LIXA_briefing_5" }, { "text": "\"LIXA funding.\"", "topic": "LIXA_briefing_6" }, @@ -75,7 +75,7 @@ { "text": "\"What is laser interferometry?\"", "topic": "LIXA_briefing_3a" }, { "text": "Title slide.", "topic": "LIXA_LAYMAN_BRIEFING" }, { "text": "\"What is LIXA?\"", "topic": "LIXA_briefing_1" }, - { "text": "\"LIGO and spacial compression.\"", "topic": "LIXA_briefing_2" }, + { "text": "\"LIGO and spatial compression.\"", "topic": "LIXA_briefing_2" }, { "text": "\"How does LIXA work?\"", "topic": "LIXA_briefing_4" }, { "text": "\"But what are we measuring???\"", "topic": "LIXA_briefing_5" }, { "text": "\"LIXA funding.\"", "topic": "LIXA_briefing_6" }, @@ -85,11 +85,11 @@ { "type": "talk_topic", "id": "LIXA_briefing_4", - "dynamic_line": "\"LIXA works using the principle of LOCAL EXODIMENSIONAL FLUX, the phenomenon in which ambient spacetime around exospacial breaches moves through the \"portal\". LIXA is equipped with several LOCAL DIMENSIONAL COMPRESSORS. These devices turn 'portals' on and off hundreds of times a second, which results in the FLUX repeatedly drawing tiny segments of our local n-space into exospace. This creates a compression effect, 'storing' an enormous amount of 4d-space in those segments in the neighboring exospace.\"", + "dynamic_line": "\"LIXA works using the principle of LOCAL EXODIMENSIONAL FLUX, the phenomenon in which ambient spacetime around exospatial breaches moves through the \"portal\". LIXA is equipped with several LOCAL DIMENSIONAL COMPRESSORS. These devices turn 'portals' on and off hundreds of times a second, which results in the FLUX repeatedly drawing tiny segments of our local n-space into exospace. This creates a compression effect, 'storing' an enormous amount of 4d-space in those segments in the neighboring exospace.\"", "responses": [ { "text": "Title slide.", "topic": "LIXA_LAYMAN_BRIEFING" }, { "text": "\"What is LIXA?\"", "topic": "LIXA_briefing_1" }, - { "text": "\"LIGO and spacial compression.\"", "topic": "LIXA_briefing_2" }, + { "text": "\"LIGO and spatial compression.\"", "topic": "LIXA_briefing_2" }, { "text": "\"What is laser interferometry?\"", "topic": "LIXA_briefing_3a" }, { "text": "\"But what are we measuring???\"", "topic": "LIXA_briefing_5" }, { "text": "\"LIXA funding.\"", "topic": "LIXA_briefing_6" }, @@ -103,7 +103,7 @@ "responses": [ { "text": "Title slide.", "topic": "LIXA_LAYMAN_BRIEFING" }, { "text": "\"What is LIXA?\"", "topic": "LIXA_briefing_1" }, - { "text": "\"LIGO and spacial compression.\"", "topic": "LIXA_briefing_2" }, + { "text": "\"LIGO and spatial compression.\"", "topic": "LIXA_briefing_2" }, { "text": "\"What is laser interferometry?\"", "topic": "LIXA_briefing_3a" }, { "text": "\"How does LIXA work?\"", "topic": "LIXA_briefing_4" }, { "text": "\"LIXA funding.\"", "topic": "LIXA_briefing_6" }, @@ -117,7 +117,7 @@ "responses": [ { "text": "Title slide.", "topic": "LIXA_LAYMAN_BRIEFING" }, { "text": "\"What is LIXA?\"", "topic": "LIXA_briefing_1" }, - { "text": "\"LIGO and spacial compression.\"", "topic": "LIXA_briefing_2" }, + { "text": "\"LIGO and spatial compression.\"", "topic": "LIXA_briefing_2" }, { "text": "\"What is laser interferometry?\"", "topic": "LIXA_briefing_3a" }, { "text": "\"How does LIXA work?\"", "topic": "LIXA_briefing_4" }, { "text": "\"But what are we measuring???\"", "topic": "LIXA_briefing_5" }, @@ -208,7 +208,7 @@ { "id": "EOC_LIXA_experiment_computer", "type": "effect_on_condition", - "effect": { "open_dialogue": { "topic": "LIXA_experiment_computer_main" } } + "effect": [ "open_dialogue" ] }, { "type": "talk_topic", @@ -218,9 +218,79 @@ { "text": "ERROR: Flux Limiters", "topic": "LIXA_experiment_flux_limiters" }, { "text": "ERROR: Power Draw", "topic": "LIXA_experiment_power_draw" }, { "text": "SYSTEM SHUTDOWN", "topic": "LIXA_experiment_system_shutdown" }, + { + "text": "Copy research archives to external device.", + "topic": "LIXA_experiment_backup_data_need_id", + "condition": { + "and": [ + { "not": { "u_has_item": "id_LIXA_najma" } }, + { "not": { "u_has_item": "id_LIXA_jason" } }, + { "not": { "u_has_item": "id_LIXA_kai_mei" } }, + { "not": { "u_has_item": "id_LIXA_rich" } } + ] + } + }, + { + "text": "Copy research archives to external device.", + "topic": "LIXA_experiment_backup_data_no_drive", + "condition": { + "and": [ + { "not": { "u_has_item": "usb_drive_nano" } }, + { + "or": [ + { "u_has_item": "id_LIXA_najma" }, + { "u_has_item": "id_LIXA_jason" }, + { "u_has_item": "id_LIXA_kai_mei" }, + { "u_has_item": "id_LIXA_rich" } + ] + } + ] + } + }, + { + "text": "Copy research archives to external device.", + "topic": "LIXA_experiment_backup_data", + "condition": { + "and": [ + { "u_has_item": "usb_drive_nano" }, + { + "or": [ + { "u_has_item": "id_LIXA_najma" }, + { "u_has_item": "id_LIXA_jason" }, + { "u_has_item": "id_LIXA_kai_mei" }, + { "u_has_item": "id_LIXA_rich" } + ] + } + ] + } + }, { "text": "Leave.", "topic": "TALK_DONE" } ] }, + { + "type": "talk_topic", + "id": "LIXA_experiment_backup_data_need_id", + "dynamic_line": "ERROR: access denied! Reason: insufficient clearance level.", + "responses": [ { "text": "Leave.", "topic": "TALK_DONE" } ] + }, + { + "type": "talk_topic", + "id": "LIXA_experiment_backup_data_no_drive", + "dynamic_line": "ERROR: no external drive detected.", + "responses": [ { "text": "Leave.", "topic": "TALK_DONE" } ] + }, + { + "type": "talk_topic", + "id": "LIXA_experiment_backup_data", + "dynamic_line": "Backup complete!", + "responses": [ + { + "text": "Leave.", + "topic": "TALK_DONE", + "effect": [ { "u_consume_item": "usb_drive_nano" }, { "u_spawn_item": "lixa_data" } ] + } + ] + }, { "type": "talk_topic", "id": "LIXA_experiment_flux_limiters", diff --git a/data/json/npcs/robofac/robofac_ancilla_npcs/BAR_ENCOUNTER_MERCENARIES/BEM_chatting_veterans.json b/data/json/npcs/robofac/robofac_ancilla_npcs/BAR_ENCOUNTER_MERCENARIES/BEM_chatting_veterans.json index 986f1ad76c587..f88b2246b3c85 100644 --- a/data/json/npcs/robofac/robofac_ancilla_npcs/BAR_ENCOUNTER_MERCENARIES/BEM_chatting_veterans.json +++ b/data/json/npcs/robofac/robofac_ancilla_npcs/BAR_ENCOUNTER_MERCENARIES/BEM_chatting_veterans.json @@ -96,6 +96,11 @@ "condition": { "u_has_var": "u_met_apeirohedra", "type": "general", "context": "yrax", "value": "yes" }, "topic": "BEM_CHATTING_VETERANS_TELL_STORY_IMPRESSIVE" }, + { + "text": "Tell them the story of how you were trapped in an infinitely looping corridor, fighting the warped remnants of the researchers there and somehow the damned corridor itself. And at the end of the day, you're not even sure the headache was worth it.", + "condition": { "u_has_var": "completed_robofac_lixa_sm_1", "type": "dialogue", "context": "intercom", "value": "yes" }, + "topic": "BEM_CHATTING_VETERANS_TELL_STORY_LIXA" + }, { "text": "Tell them the story of how you dived into and were forced to fight for your life within a disgusting, toxic hellscape made from the un-living innards of some crushed zombie monstrosity. All so the intercom could have some damned HDD back.", "condition": { "u_has_var": "completed_robofac_intercom_3", "type": "dialogue", "context": "intercom", "value": "yes" }, @@ -137,6 +142,19 @@ "speaker_effect": [ { "effect": [ { "u_add_effect": "drunk", "duration": "20 minutes" }, { "u_add_faction_trust": 1 } ] } ], "responses": [ { "text": "Well, I should be going now.", "effect": "end_conversation", "topic": "TALK_DONE" } ] }, + { + "id": "BEM_CHATTING_VETERANS_TELL_STORY_LIXA", + "type": "talk_topic", + "dynamic_line": "&The expressions on both the mercs' faces are a mix of confusion and visceral disgust as you relate your tale. Finally, the younger mercenary blurts out, \"None of us wanted to touch that contract since the intercom was being so shifty about it.\" \"You're my kind of free-range lunatic!\" The older mercenary interjects. \"I'll drink to that!\".", + "speaker_effect": [ { "effect": [ { "u_add_faction_trust": 10 } ] } ], + "responses": [ + { + "text": "Yeah, that was certainly an… interesting experience.", + "effect": "end_conversation", + "topic": "TALK_DONE" + } + ] + }, { "id": "BEM_CHATTING_VETERANS_TELL_STORY_TOWER", "type": "talk_topic", diff --git a/data/json/npcs/robofac/robofac_intercom/robofac_intercom_missions.json b/data/json/npcs/robofac/robofac_intercom/robofac_intercom_missions.json index dee6927940933..e1b2afda037ee 100644 --- a/data/json/npcs/robofac/robofac_intercom/robofac_intercom_missions.json +++ b/data/json/npcs/robofac/robofac_intercom/robofac_intercom_missions.json @@ -7,6 +7,7 @@ "MISSION_ROBOFAC_INTERCOM_2_ACCEPTED", "MISSION_ROBOFAC_INTERCOM_ROBOT_SM_1_ACCEPTED", "MISSION_ROBOFAC_INTERCOM_PORTAL_SM_1_ACCEPTED", + "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_ACCEPTED", "MISSION_ROBOFAC_INTERCOM_NRE_RECORDER_REPLACEMENT_Complete" ], "type": "talk_topic", @@ -22,6 +23,16 @@ ], "topic": "MISSION_ROBOFAC_INTERCOM_2_COMPLETE" }, + { + "text": "I'm back from LIXA. [Hand over the data.]", + "condition": { "and": [ { "u_has_mission": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1" }, { "u_has_item": "lixa_data" } ] }, + "effect": [ + { "u_consume_item": "lixa_data", "count": 1, "popup": true }, + { "u_spawn_item": "RobofacCoin", "count": 5 }, + { "finish_mission": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1", "success": true } + ], + "topic": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_COMPLETE" + }, { "text": "I found it. I found your template. [Hand over the silicon photonics template.]", "condition": { "and": [ { "u_has_mission": "MISSION_ROBOFAC_INTERCOM_3" }, { "u_has_item": "template_photonics" } ] }, @@ -104,6 +115,22 @@ }, "topic": "MISSION_ROBOFAC_INTERCOM_PORTAL_SM_1_OFFER" }, + { + "text": "[Contract: Data Retrieval]", + "condition": { + "and": [ + { "not": { "u_has_mission": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1" } }, + { + "not": { "u_has_var": "completed_robofac_intercom_lixa_sm_1", "type": "dialogue", "context": "intercom", "value": "yes" } + }, + { + "not": { "u_has_var": "completed_robofac_intercom_lixa_sm_1", "type": "dialogue", "context": "intercom", "value": "no" } + }, + { "math": [ "u_portal_storm_recordings_sold", ">", "2" ] } + ] + }, + "topic": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_OFFER" + }, { "text": "I need a new NRE recorder.", "condition": { @@ -887,5 +914,185 @@ "id": "MISSION_ROBOFAC_INTERCOM_PORTAL_SM_1_ACCEPTED", "type": "talk_topic", "dynamic_line": "Transferring the recorder now.\" The intercom tray slides open, revealing a hefty, barebones device and a light battery to accompany it. \"Please remember to exercise caution; the effects of portal storms on human physiology are poorly understood." + }, + { + "id": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1", + "type": "mission_definition", + "name": { "str": "Data Retrieval" }, + "description": "Reach the LIXA facility, and search the area for anything of interest. The intercom warned you about a number of undead aboveground, and the high probability of more underground.", + "goal": "MGOAL_NULL", + "difficulty": 5, + "value": 0, + "start": { + "assign_mission_target": { + "om_terrain": "LIXA_road_guard", + "om_special": "physics_lab_LIXA", + "reveal_radius": 1, + "random": true, + "search_range": 180, + "z": 0 + } + }, + "end": { + "effect": [ + { "u_spawn_item": "RobofacCoin", "count": 5 }, + { "u_add_var": "completed_robofac_lixa_sm_1", "type": "dialogue", "context": "intercom", "value": "yes" }, + { "math": [ "u_hub01_completed_missions", "++" ] } + ] + }, + "origins": [ "ORIGIN_SECONDARY" ], + "has_generic_rewards": false, + "dialogue": { + "describe": "…", + "offer": "…", + "accepted": "…", + "rejected": "…", + "advice": "…", + "inquire": "…", + "success": "…", + "success_lie": "…", + "failure": "…" + } + }, + { + "id": [ + "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_OFFER", + "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_WHAT_ELSE", + "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_OFFER_ADVICE", + "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_LIXA_ACRONYM", + "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_OFFER_ADVICE_Replacement" + ], + "type": "talk_topic", + "dynamic_line": "During the Cataclysm, we lost contact with one of our sister sites, LIXA. Aerial surveillance indicates that the facility's inhabitants are deceased, and beyond the now-zombified security detail, the site should be sparsely populated. We want you to enter the facility and make a copy of what they were researching on the provided thumb drive. Additionally, we will be providing you with a keycard that should at the very least get you in the front door.\"\n\n\"We're offering a standard 5 HGC for successful retrieval of the data. If that isn't enough of an incentive, we do have a manifest from before we lost contact with the facility showing a handful of specialized powered suits in inventory. You are free to take any that are left.", + "responses": [ + { + "text": "Alright, I'll see if I can't get that data for you.", + "effect": [ + { "assign_mission": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1" }, + { "u_spawn_item": "id_LIXA", "count": 1 }, + { "u_spawn_item": "usb_drive_nano", "count": 1 } + ], + "topic": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_ACCEPTED" + }, + { + "text": "What can you tell me about what they were doing there?", + "topic": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_WHAT_ELSE" + }, + { "text": "What does LIXA even mean?", "topic": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_LIXA_ACRONYM" }, + { + "text": "If I lose the ID card or the memory stick, what should I do?", + "topic": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_OFFER_ADVICE_Replacement" + }, + { "text": "What else do you have available?", "topic": "TALK_ROBOFAC_INTERCOM_CONTRACTS" } + ] + }, + { + "id": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_WHAT_ELSE", + "type": "talk_topic", + "dynamic_line": "All I can tell you is that they were conducting cutting-edge research related to-\" The intercom abruptly cuts off for several seconds before coming back on, the voice sounding apologetic, \"Sorry, but as it turns out I'm not at liberty to divulge that information. What I can do however is recommend you bring an NRE recorder with you if you still have one." + }, + { + "id": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_LIXA_ACRONYM", + "type": "talk_topic", + "dynamic_line": "It's an acronym that stands for Laser Interferometer eXodimensional resonance Assay." + }, + { + "id": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_OFFER_ADVICE_Replacement", + "type": "talk_topic", + "//": "I feel like this could be phrased better.", + "dynamic_line": "Well, the ID card wouldn't strictly speaking be necessary if you were to find some way of breaching the facility's security doors.\" The voice pauses for a moment, \"Buuut that said we only have the one ID card, so unless you're confident you can get in without it, please don't lose it. As for the memory stick I would highly recommend you not lose that as portable drives with the required hardware security modules to interface with secure terminals are in short supply these days. However there may very well be some on-site for you to scavenge if you're lucky." + }, + { + "id": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_ACCEPTED", + "type": "talk_topic", + "//": "Is it a semi-colon or colon that goes here? Man, idk.", + "dynamic_line": "Transferring the items now.\" The intercom tray slides open, revealing an ID card for the facility and what looks like a USB thumb drive. \"Again: please take care not to lose either of these since we can't exactly make more of them." + }, + { + "id": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_COMPLETE", + "type": "talk_topic", + "dynamic_line": "As we discussed during acceptance of the contract, we were aware of hazardous ground conditions, but we were unable to deduce further information other than what was available through long-range sensing. If you would like to provide a description of the hazards present, we are willing to document them.", + "responses": [ + { + "text": "[Detail the conditions at the collapsed tower and its basement. This will advance time by ten minutes.]", + "effect": { "u_assign_activity": "ACT_GENERIC_EOC", "duration": "10 minutes" }, + "topic": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_COMPLETE_Explainer" + }, + { + "text": "[Let them know how much of a trainwreck THIS one was.]", + "topic": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_COMPLETE_ChewingOut" + }, + { "text": "…Just forget it. Let's never speak of this again.", "topic": "TALK_ROBOFAC_INTERCOM_SERVICES" } + ] + }, + { + "id": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_COMPLETE_Explainer", + "type": "talk_topic", + "dynamic_line": "&Over the course of several minutes, you calmly detail the events at the facility: the unexpected zombie presence underground, the anomalous nature of the experiment floor, and the encounter with the warped and hostile research staff trapped in the corridor. Throughout, the voice interjects with questions, the sounds of typing filling the pauses.\n\n\"We appreciate your thorough report,\" the voice finally responds. \"Your handling of the circumstances was commendable considering the anomalous and unpredictable nature of the facility. If you seek further contract work, rest assured, we'll take into account the potential for anomalous circumstances in future assignments and relay them accordingly.\"", + "responses": [ + { "text": "It's fine. At least now we know for the future.", "topic": "TALK_DONE" }, + { "text": "Yeah, yeah. You're welcome.", "topic": "TALK_DONE" }, + { "text": "Let's never do that again.", "topic": "TALK_DONE" } + ] + }, + { + "id": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_COMPLETE_ChewingOut", + "type": "talk_topic", + "dynamic_line": "&The intercom waits patiently.", + "responses": [ + { + "text": "Hoo boy, where do I even begin with this one? Let's start with the fact that your intel was about as useful as a screen door on a submarine!\"Sparsely-populated,\" my ass! How did you lot miss the goddamn zombie mosh pit down the open elevator shaft!?", + "topic": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_COMPLETE_ChewingOut_1" + } + ] + }, + { + "id": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_COMPLETE_ChewingOut_1", + "type": "talk_topic", + "dynamic_line": "We're sorry but-", + "responses": [ + { + "text": "Oh, ho ho ho ho ho no friend you do not get to talk right now. When I FINALLY got down to the experiment floor, you know what I found? The entire corridor was turned into a two-dimensional image! What were they even DOING that turned an entire section of the building INTO A HAUNTED VIDEO GAME PORTAL PAINTING!?", + "topic": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_COMPLETE_ChewingOut_2" + }, + { "text": "[Stop talking.]", "topic": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_COMPLETE_ChewingOut_5" } + ] + }, + { + "id": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_COMPLETE_ChewingOut_2", + "type": "talk_topic", + "dynamic_line": "What do you mean by-", + "//": "I realize I'm assuming the player has encountered congealed light by accidentally breaking open the terrain features, but eh.", + "responses": [ + { + "text": "I SAID SHUT UP! It teleported me to an infinitely looping corridor! INFINITELY! LOOPING! CORRIDOR! I mean, fuck, you ever see one of those Escher paintings? It's like that, only you don't just see the surface of what you're looking at, you see EV-ER-Y-THING, and friend let me tell you getting a first-hand look at the inside of my digestive system was *not* pretty. Oh, and did I mention the light? Yeah, when some of the laser tubes got broken, they spat out light THAT HURT! A LOT!", + "topic": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_COMPLETE_ChewingOut_3" + }, + { "text": "[Stop talking.]", "topic": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_COMPLETE_ChewingOut_4" } + ] + }, + { + "id": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_COMPLETE_ChewingOut_3", + "type": "talk_topic", + "dynamic_line": "Please slow down-", + "responses": [ + { + "text": "You know why they got broken? I was fighting the insane remnants of the research staff! They were climbing the walls, spitting light! And then there was the corridor itself somehow! I fought the goddamn building! I've had nightmares that made more sense than fighting that thing!", + "topic": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_COMPLETE_ChewingOut_4" + }, + { "text": "[Stop talking.]", "topic": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_COMPLETE_ChewingOut_4" } + ] + }, + { + "id": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_COMPLETE_ChewingOut_4", + "type": "talk_topic", + "dynamic_line": "&The voice on the other side of the intercom is silent with disbelief.", + "responses": [ { "text": "[Wait.]", "topic": "MISSION_ROBOFAC_INTERCOM_3_COMPLETE_ChewingOut_5" } ] + }, + { + "id": "MISSION_ROBOFAC_INTERCOM_LIXA_SM_1_COMPLETE_ChewingOut_5", + "type": "talk_topic", + "dynamic_line": "Uh… Yeah, sorry. I'll, um… I'll make a note to try and see if we can't get any better information for your future contracts.", + "responses": [ { "text": "Good.", "topic": "TALK_DONE" } ] } ] diff --git a/data/json/npcs/robofac/robofac_intercom/robofac_intercom_trades.json b/data/json/npcs/robofac/robofac_intercom/robofac_intercom_trades.json index 1882011fa7d29..2f6d06109f06d 100644 --- a/data/json/npcs/robofac/robofac_intercom/robofac_intercom_trades.json +++ b/data/json/npcs/robofac/robofac_intercom/robofac_intercom_trades.json @@ -58,6 +58,7 @@ "condition": { "u_has_items": { "item": "nre_anomaly_printout_data", "count": 1 } }, "effect": [ { "u_consume_item": "nre_anomaly_printout_data", "count": 1, "popup": true }, + { "math": [ "u_portal_storm_recordings_sold", "++" ] }, { "u_spawn_item": "RobofacCoin", "count": 10 } ], "topic": "TALK_ROBOFAC_INTERCOM_SELL_PORTAL_STORM_DATA_Large" @@ -67,6 +68,7 @@ "condition": { "u_has_items": { "item": "large_printout_portal_storm_data", "count": 1 } }, "effect": [ { "u_consume_item": "large_printout_portal_storm_data", "count": 1, "popup": true }, + { "math": [ "u_portal_storm_recordings_sold", "++" ] }, { "u_spawn_item": "RobofacCoin", "count": 18 } ], "topic": "TALK_ROBOFAC_INTERCOM_SELL_PORTAL_STORM_DATA_Large" @@ -82,6 +84,7 @@ "effect": [ { "u_consume_item": "medium_printout_portal_storm_data", "count": 1, "popup": true }, { "math": [ "portal_storm_medium_data_sold", "++" ] }, + { "math": [ "u_portal_storm_recordings_sold", "++" ] }, { "u_spawn_item": "RobofacCoin", "count": 5 } ], "topic": "TALK_ROBOFAC_INTERCOM_SELL_PORTAL_STORM_DATA_Medium" @@ -98,6 +101,7 @@ "effect": [ { "u_consume_item": "small_printout_portal_storm_data", "count": 1, "popup": true }, { "math": [ "portal_storm_small_data_sold", "++" ] }, + { "math": [ "u_portal_storm_recordings_sold", "++" ] }, { "u_spawn_item": "RobofacCoin", "count": 1 } ], "topic": "TALK_ROBOFAC_INTERCOM_SELL_PORTAL_STORM_DATA_Small" From cba18c3b6ae470802d38aa7d236c607d8bdaf6b7 Mon Sep 17 00:00:00 2001 From: rty275 <788335+rty275@users.noreply.github.com> Date: Thu, 28 Mar 2024 21:01:18 -0700 Subject: [PATCH 40/42] bugfix (#72149) --- data/mods/Magiclysm/jmath.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/data/mods/Magiclysm/jmath.json b/data/mods/Magiclysm/jmath.json index 1a03d98dcb992..180e8901e8694 100644 --- a/data/mods/Magiclysm/jmath.json +++ b/data/mods/Magiclysm/jmath.json @@ -9,13 +9,13 @@ "type": "jmath_function", "id": "evocation_proficiency_negate_calculate", "num_args": 1, - "return": "_0 - ((u_proficiency('prof_magic_evocation_beginner', 'format': 'percent') * 1) / 10) + ((u_proficiency('prof_magic_evocation_apprentice', 'format': 'percent') * 1) / 10) + ((u_proficiency('prof_magic_evocation_master', 'format': 'percent') * 1) / 10)" + "return": "_0 - ((u_proficiency('prof_magic_evocation_beginner', 'format': 'percent') * 1) / 10) - ((u_proficiency('prof_magic_evocation_apprentice', 'format': 'percent') * 1) / 10) - ((u_proficiency('prof_magic_evocation_master', 'format': 'percent') * 1) / 10)" }, { "type": "jmath_function", "id": "channeling_proficiency_negate_calculate", "num_args": 1, - "return": "_0 - ((u_proficiency('prof_magic_channel_beginner', 'format': 'percent') * 1) / 10) + ((u_proficiency('prof_magic_channel_apprentice', 'format': 'percent') * 1) / 10) + ((u_proficiency('prof_magic_channel_master', 'format': 'percent') * 1) / 10)" + "return": "_0 - ((u_proficiency('prof_magic_channel_beginner', 'format': 'percent') * 1) / 10) - ((u_proficiency('prof_magic_channel_apprentice', 'format': 'percent') * 1) / 10) - ((u_proficiency('prof_magic_channel_master', 'format': 'percent') * 1) / 10)" }, { "type": "jmath_function", @@ -33,7 +33,7 @@ "type": "jmath_function", "id": "summoning_proficiency_negate_calculate", "num_args": 1, - "return": "_0 - ((u_proficiency('prof_magic_summon_beginner', 'format': 'percent') * 1) / 10) + ((u_proficiency('prof_magic_summon_apprentice', 'format': 'percent') * 1) / 10) + ((u_proficiency('prof_magic_summon_master', 'format': 'percent') * 1) / 10)" + "return": "_0 - ((u_proficiency('prof_magic_summon_beginner', 'format': 'percent') * 1) / 10) - ((u_proficiency('prof_magic_summon_apprentice', 'format': 'percent') * 1) / 10) - ((u_proficiency('prof_magic_summon_master', 'format': 'percent') * 1) / 10)" }, { "type": "jmath_function", @@ -45,7 +45,7 @@ "type": "jmath_function", "id": "enhancement_proficiency_negate_calculate", "num_args": 1, - "return": "_0 - ((u_proficiency('prof_magic_enhancement_beginner', 'format': 'percent') * 1) / 10) + ((u_proficiency('prof_magic_enhancement_apprentice', 'format': 'percent') * 1) / 10) + ((u_proficiency('prof_magic_enhancement_master', 'format': 'percent') * 1) / 10)" + "return": "_0 - ((u_proficiency('prof_magic_enhancement_beginner', 'format': 'percent') * 1) / 10) - ((u_proficiency('prof_magic_enhancement_apprentice', 'format': 'percent') * 1) / 10) - ((u_proficiency('prof_magic_enhancement_master', 'format': 'percent') * 1) / 10)" }, { "type": "jmath_function", @@ -57,6 +57,6 @@ "type": "jmath_function", "id": "conveyance_proficiency_negate_calculate", "num_args": 1, - "return": "_0 - ((u_proficiency('prof_magic_conveyance_beginner', 'format': 'percent') * 1) / 10) + ((u_proficiency('prof_magic_conveyance_apprentice', 'format': 'percent') * 1) / 10) + ((u_proficiency('prof_magic_conveyance_master', 'format': 'percent') * 1) / 10)" + "return": "_0 - ((u_proficiency('prof_magic_conveyance_beginner', 'format': 'percent') * 1) / 10) - ((u_proficiency('prof_magic_conveyance_apprentice', 'format': 'percent') * 1) / 10) - ((u_proficiency('prof_magic_conveyance_master', 'format': 'percent') * 1) / 10)" } ] From 1c53bb0a6a45e3889a301cbc15e2d7b9fe16f159 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Thu, 28 Mar 2024 22:11:06 -0700 Subject: [PATCH 41/42] no regenerates_in_dark in sunlight fixes #67027 --- src/monster.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/monster.cpp b/src/monster.cpp index f1ccf117fce14..7760c291ff586 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -3225,7 +3225,7 @@ void monster::process_effects() add_msg_if_player_sees( *this, m_warning, healing_format_string, name() ); } - if( type->regenerates_in_dark ) { + if( type->regenerates_in_dark && !g->is_in_sunlight( pos() ) ) { const float light = get_map().ambient_light_at( pos() ); // Magic number 10000 was chosen so that a floodlight prevents regeneration in a range of 20 tiles const float dHP = 50.0 * std::exp( - light * light / 10000 ); From 1e95d1ece3ed1474db4a3301e957784c7b0f7984 Mon Sep 17 00:00:00 2001 From: Karol1223 <68503002+Karol1223@users.noreply.github.com> Date: Fri, 29 Mar 2024 16:52:48 +0100 Subject: [PATCH 42/42] Make some newer mutant mammals actually use proper harvestlists (#72686) * adult dogs * puppies * raccoon --- data/json/harvest.json | 43 +++++++++++++++++++++++++++ data/json/monsters/mutant_mammal.json | 26 ++++++++-------- 2 files changed, 56 insertions(+), 13 deletions(-) diff --git a/data/json/harvest.json b/data/json/harvest.json index d5322dca190c1..f14f1161dd3a4 100644 --- a/data/json/harvest.json +++ b/data/json/harvest.json @@ -2254,6 +2254,15 @@ { "drop": "animal_blood", "type": "blood", "mass_ratio": 0.1 } ] }, + { + "id": "dog_small_with_skull_mutant", + "type": "harvest", + "entries": [ + { "drop": "skull_canis_medium", "type": "bone", "scale_num": [ 1, 1 ], "max": 1 }, + { "drop": "mutant_meat_scrap", "type": "flesh", "mass_ratio": 0.5 }, + { "drop": "mutant_blood", "type": "blood", "mass_ratio": 0.1 } + ] + }, { "id": "cat_small_with_skull", "type": "harvest", @@ -2532,6 +2541,23 @@ { "drop": "fat", "type": "flesh", "mass_ratio": 0.07 } ] }, + { + "id": "dog_with_skull_fur_mutant", + "type": "harvest", + "entries": [ + { "drop": "skull_canis", "type": "bone", "scale_num": [ 1, 1 ], "max": 1 }, + { "drop": "mutant_meat", "type": "flesh", "mass_ratio": 0.28 }, + { "drop": "mutant_meat_scrap", "type": "flesh", "mass_ratio": 0.05 }, + { "drop": "mutant_lung", "type": "flesh", "mass_ratio": 0.0035 }, + { "drop": "mutant_liver", "type": "offal", "mass_ratio": 0.01 }, + { "drop": "mutant_brain", "type": "flesh", "mass_ratio": 0.005 }, + { "drop": "bone", "type": "bone", "mass_ratio": 0.15 }, + { "drop": "mutant_blood", "type": "blood", "mass_ratio": 0.1 }, + { "drop": "sinew", "type": "bone", "mass_ratio": 0.00035 }, + { "drop": "raw_fur", "type": "skin", "mass_ratio": 0.02 }, + { "drop": "mutant_fat", "type": "flesh", "mass_ratio": 0.07 } + ] + }, { "id": "dog_with_skull_leather", "type": "harvest", @@ -2634,6 +2660,23 @@ { "drop": "fat", "type": "flesh", "mass_ratio": 0.07 } ] }, + { + "id": "raccoon_with_skull_mutant", + "type": "harvest", + "entries": [ + { "drop": "skull_raccoon", "type": "bone", "scale_num": [ 1, 1 ], "max": 1 }, + { "drop": "mutant_meat", "type": "flesh", "mass_ratio": 0.28 }, + { "drop": "mutant_meat_scrap", "type": "flesh", "mass_ratio": 0.05 }, + { "drop": "mutant_lung", "type": "flesh", "mass_ratio": 0.0035 }, + { "drop": "mutant_liver", "type": "offal", "mass_ratio": 0.01 }, + { "drop": "mutant_brain", "type": "flesh", "mass_ratio": 0.005 }, + { "drop": "bone", "type": "bone", "mass_ratio": 0.15 }, + { "drop": "mutant_blood", "type": "blood", "mass_ratio": 0.1 }, + { "drop": "sinew", "type": "bone", "mass_ratio": 0.00035 }, + { "drop": "raw_fur", "type": "skin", "mass_ratio": 0.02 }, + { "drop": "mutant_fat", "type": "flesh", "mass_ratio": 0.07 } + ] + }, { "id": "bear_with_skull", "type": "harvest", diff --git a/data/json/monsters/mutant_mammal.json b/data/json/monsters/mutant_mammal.json index cdf05e67345c6..9a7734eae58a4 100644 --- a/data/json/monsters/mutant_mammal.json +++ b/data/json/monsters/mutant_mammal.json @@ -342,9 +342,9 @@ "bodytype": "dog", "categories": [ "WILDLIFE" ], "species": [ "MAMMAL" ], - "volume": "30000 ml", + "volume": "30 L", "weight": "30 kg", - "harvest": "mutant_mammal_small_fur", + "harvest": "dog_with_skull_fur_mutant", "dissect": "dissect_lupine_sample_single", "families": [ "prof_intro_biology", "prof_physiology" ], "hp": 30, @@ -403,9 +403,9 @@ "bodytype": "dog", "categories": [ "WILDLIFE" ], "species": [ "MAMMAL" ], - "volume": "40000 ml", + "volume": "40 L", "weight": "60 kg", - "harvest": "mutant_mammal_small_fur", + "harvest": "dog_with_skull_fur_mutant", "dissect": "dissect_lupine_sample_single", "families": [ "prof_intro_biology", "prof_physiology" ], "hp": 42, @@ -482,7 +482,7 @@ "dodge": 1, "vision_night": 4, "stomach_size": 150, - "harvest": "dog_small_with_skull", + "harvest": "dog_small_with_skull_mutant", "upgrades": { "age_grow": 42, "into": "mon_dog_mutant_loper" }, "extend": { "flags": [ "NO_BREED" ] } }, @@ -495,9 +495,9 @@ "bodytype": "dog", "categories": [ "WILDLIFE" ], "species": [ "MAMMAL" ], - "volume": "50000 ml", + "volume": "50 L", "weight": "55 kg", - "harvest": "mutant_mammal_small_fur", + "harvest": "dog_with_skull_fur_mutant", "dissect": "dissect_lupine_sample_single", "families": [ "prof_intro_biology", "prof_physiology" ], "hp": 45, @@ -578,7 +578,7 @@ "stomach_size": 200, "dodge": 1, "vision_night": 4, - "harvest": "dog_small_with_skull", + "harvest": "dog_small_with_skull_mutant", "upgrades": { "age_grow": 42, "into": "mon_dog_mutant_mauler" }, "extend": { "flags": [ "NO_BREED" ] } }, @@ -591,9 +591,9 @@ "bodytype": "dog", "categories": [ "WILDLIFE" ], "species": [ "MAMMAL" ], - "volume": "50000 ml", + "volume": "50 L", "weight": "35 kg", - "harvest": "mutant_mammal_small_fur", + "harvest": "dog_with_skull_fur_mutant", "dissect": "dissect_lupine_sample_single", "families": [ "prof_intro_biology", "prof_physiology" ], "hp": 25, @@ -674,7 +674,7 @@ "melee_damage": [ { "damage_type": "cut", "amount": 1 } ], "dodge": 1, "vision_night": 4, - "harvest": "dog_small_with_skull", + "harvest": "dog_small_with_skull_mutant", "upgrades": { "age_grow": 42, "into": "mon_dog_mutant_thrasher" }, "extend": { "flags": [ "NO_BREED" ] } }, @@ -684,7 +684,7 @@ "name": { "str": "dextrous raccoon" }, "description": "Their paws have grown to be longer, also enabling them to briefly stand on their back legs. You wonder if these sleazy beasts are able to open doors yet.", "copy-from": "mon_raccoon", - "volume": "10000 ml", + "volume": "10 L", "weight": "10 kg", "hp": 21, "color": "white", @@ -692,7 +692,7 @@ "morale": 20, "melee_skill": 2, "melee_damage": [ { "damage_type": "cut", "amount": 2 } ], - "harvest": "raccoon_with_skull", + "harvest": "raccoon_with_skull_mutant", "families": [ "prof_intro_biology", "prof_physiology" ], "extend": { "flags": [ "NO_BREED", "CAN_OPEN_DOORS" ] } }