From f12e244767abe634afac1d34f1d306dec46afbb4 Mon Sep 17 00:00:00 2001 From: Kevin Granade Date: Fri, 18 Dec 2020 19:32:06 -0800 Subject: [PATCH 01/47] use use_action for arming grenades --- data/json/items/tool/explosives.json | 12 ++++++------ data/mods/Aftershock/items/grenades.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/data/json/items/tool/explosives.json b/data/json/items/tool/explosives.json index 1e6da141814c7..8c4b76cd03928 100644 --- a/data/json/items/tool/explosives.json +++ b/data/json/items/tool/explosives.json @@ -530,7 +530,7 @@ "price": 3600, "price_postapoc": 750, "description": "This is a canister grenade filled with fungicidal solution. Use this item to pull the pin and light the fuse, turning it into an active fungicidal grenade. In five seconds it will begin to expel a volatile spray that is highly toxic to fungal life forms.", - "countdown_action": { "need_wielding": true, "menu_text": "Pull pin", "type": "transform", "target": "fungicidalbomb_act" } + "use_action": { "need_wielding": true, "menu_text": "Pull pin", "type": "transform", "target": "fungicidalbomb_act" } }, { "id": "fungicidalbomb_act", @@ -553,7 +553,7 @@ "price": 3600, "price_postapoc": 500, "description": "This is a makeshift canister grenade filled with fungicidal solution. Use this item to pull the pin and light the fuse, turning it into an active fungicidal grenade. In five seconds it will begin to expel a volatile spray that is highly toxic to fungal life forms.", - "countdown_action": { "need_wielding": true, "menu_text": "Pull pin", "type": "transform", "target": "fungicidalbomb_makeshift_act" } + "use_action": { "need_wielding": true, "menu_text": "Pull pin", "type": "transform", "target": "fungicidalbomb_makeshift_act" } }, { "id": "fungicidalbomb_makeshift_act", @@ -806,7 +806,7 @@ "price": 3600, "price_postapoc": 250, "description": "This is a canister grenade filled with noxious irritant. Use this item to pull the pin and light the fuse, turning it into an active tear gas grenade. In five seconds it will begin to expel a highly toxic gas for some time. This gas damages and slows those who enter it, as well as obscuring vision and scent.", - "countdown_action": { "need_wielding": true, "menu_text": "Pull pin", "type": "transform", "target": "gasbomb_act" } + "use_action": { "need_wielding": true, "menu_text": "Pull pin", "type": "transform", "target": "gasbomb_act" } }, { "id": "gasbomb_act", @@ -829,7 +829,7 @@ "price": 3600, "price_postapoc": 750, "description": "This is a canister grenade filled with insecticidal solution. Use this item to pull the pin and light the fuse, turning it into an active insecticidal grenade. In five seconds it will begin to expel a volatile spray that is highly toxic to insect life forms.", - "countdown_action": { "need_wielding": true, "menu_text": "Pull pin", "type": "transform", "target": "insecticidalbomb_act" } + "use_action": { "need_wielding": true, "menu_text": "Pull pin", "type": "transform", "target": "insecticidalbomb_act" } }, { "id": "insecticidalbomb_act", @@ -853,7 +853,7 @@ "price": 3600, "price_postapoc": 500, "description": "This is a makeshift canister grenade filled with insecticidal solution. Use this item to pull the pin and light the fuse, turning it into an active insecticidal grenade. In five seconds it will begin to expel a volatile spray that is highly toxic to insect life forms.", - "countdown_action": { "need_wielding": true, "menu_text": "Pull pin", "type": "transform", "target": "insecticidalbomb_makeshift_act" } + "use_action": { "need_wielding": true, "menu_text": "Pull pin", "type": "transform", "target": "insecticidalbomb_makeshift_act" } }, { "id": "insecticidalbomb_makeshift_act", @@ -1361,7 +1361,7 @@ "price": 1800, "price_postapoc": 0, "weight": "569 g", - "countdown_action": { "need_wielding": true, "type": "transform", "target": "smokebomb_act" } + "use_action": { "need_wielding": true, "type": "transform", "target": "smokebomb_act" } }, { "id": "smokebomb_act", diff --git a/data/mods/Aftershock/items/grenades.json b/data/mods/Aftershock/items/grenades.json index b69bbb3af2764..62369c4d3fefa 100644 --- a/data/mods/Aftershock/items/grenades.json +++ b/data/mods/Aftershock/items/grenades.json @@ -7,7 +7,7 @@ "looks_like": "grenade_emp", "name": "electroshock grenade", "description": "This is an electronic weapon that will emit a short ranged electric field. When activated, you'll have five turns before it starts doing so; throwing it before that would be a good idea.", - "countdown_action": { "menu_text": "Pull pin", "type": "transform", "target": "afs_electroshock_grenade_1_act" } + "use_action": { "menu_text": "Pull pin", "type": "transform", "target": "afs_electroshock_grenade_1_act" } }, { "id": "afs_electroshock_grenade_1_act", From 52192322d0a988de3deda335bfe26e36d55c6431 Mon Sep 17 00:00:00 2001 From: Eric Pierce Date: Sat, 19 Dec 2020 14:44:15 -0700 Subject: [PATCH 02/47] Do not sort zones by name; it erases player config Zones can be manually sorted using the +/- keys in zone manager. The implicit sorting at the top of this function wipes out any player-defined zone sorting. Fix #46158 --- src/game.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index 8fbc6f83740d7..85d6c6939711e 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -6608,11 +6608,6 @@ void game::zones_manager() } } zone_cnt = static_cast( zones.size() ); - // Sort zones by name - std::sort( zones.begin(), zones.end(), - []( const zone_manager::ref_zone_data & lhs, const zone_manager::ref_zone_data & rhs ) { - return localized_compare( lhs.get().get_name(), rhs.get().get_name() ); - } ); return zones; }; From 2509e3045b8e056b18872dd74ceb744cd09dbcbf Mon Sep 17 00:00:00 2001 From: ToxiClay Date: Sat, 19 Dec 2020 18:09:42 -0500 Subject: [PATCH 03/47] Update plating.json --- data/json/items/vehicle/plating.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data/json/items/vehicle/plating.json b/data/json/items/vehicle/plating.json index b72cb81677581..c7de99d163048 100644 --- a/data/json/items/vehicle/plating.json +++ b/data/json/items/vehicle/plating.json @@ -21,7 +21,7 @@ "type": "GENERIC", "id": "sheet_metal_lit", "name": { "str_sp": "wired sheet metal" }, - "description": "Sheet metal that has had light housing wired into it.", + "description": "Sheet metal that has had housing for lights wired into it.", "weight": "6200 g", "to_hit": -2, "color": "light_cyan", @@ -37,7 +37,7 @@ "type": "GENERIC", "id": "wood_plate", "name": { "str": "wooden armor kit" }, - "description": "A bundle of two by fours prepared to be used as vehicle armor.", + "description": "A bundle of two-by-fours prepared to be used as vehicle armor.", "weight": "5600 g", "to_hit": -8, "color": "brown", @@ -87,7 +87,7 @@ "type": "GENERIC", "id": "alloy_sheet", "name": { "str": "superalloy sheet" }, - "description": "A sheet of sturdy superalloy, incredibly hard, yet incredibly malleable.", + "description": "A sheet of sturdy superalloy; incredibly hard, yet incredibly malleable.", "weight": "900 g", "to_hit": -2, "color": "light_cyan", @@ -139,7 +139,7 @@ "type": "GENERIC", "id": "mil_plate", "name": { "str": "military composite plating" }, - "description": "A thick sheet of military grade armor, best bullet stopper you can stick on a vehicle.", + "description": "A thick sheet of military-grade armor; best bullet-stopper you can stick on a vehicle.", "weight": "16500 g", "to_hit": -1, "color": "green", From bdfb707eb7267c1d69a58969b878e146d97f6c81 Mon Sep 17 00:00:00 2001 From: Owlblocks Date: Sat, 19 Dec 2020 19:13:37 -0800 Subject: [PATCH 04/47] Modified bee balm. --- .../itemgroups/Agriculture_Forage_Excavation/forage.json | 2 +- data/json/items/comestibles/raw_veggy.json | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/data/json/itemgroups/Agriculture_Forage_Excavation/forage.json b/data/json/itemgroups/Agriculture_Forage_Excavation/forage.json index 8546e593db367..f682fcfd686c8 100644 --- a/data/json/itemgroups/Agriculture_Forage_Excavation/forage.json +++ b/data/json/itemgroups/Agriculture_Forage_Excavation/forage.json @@ -15,7 +15,7 @@ { "item": "seed_canola", "prob": 5, "count-min": 1, "count-max": 2 }, { "item": "dogbane", "prob": 5, "count-min": 1, "count-max": 2 }, { "item": "carrot_wild", "prob": 5, "count-min": 1, "count-max": 2 }, - { "item": "bee_balm", "prob": 5, "count-min": 1, "count-max": 2 }, + { "item": "bee_balm", "prob": 5, "count-min": 4, "count-max": 8 }, { "item": "mugwort", "prob": 5, "count-min": 1, "count-max": 2 }, { "item": "salsify_raw", "prob": 5, "count-min": 1, "count-max": 3 } ] diff --git a/data/json/items/comestibles/raw_veggy.json b/data/json/items/comestibles/raw_veggy.json index 7ee9492c382db..7da95a1448c91 100644 --- a/data/json/items/comestibles/raw_veggy.json +++ b/data/json/items/comestibles/raw_veggy.json @@ -27,14 +27,14 @@ "name": { "str_sp": "bee balm" }, "description": "A snow-white flower also known as wild bergamot. Smells faintly of mint.", "comestible_type": "FOOD", - "calories": 9, + "calories": 2, "fun": -5, - "weight": "40 g", + "weight": "10 g", "to_hit": -3, "color": "white", "symbol": ",", - "material": [ "veggy" ], - "volume": "250 ml", + "material": [ "veggy" ], + "volume": "20 ml", "price": 0, "price_postapoc": 0 }, From dea15c6bfe1e11ab8a399e2b9a0cdfa18ba17450 Mon Sep 17 00:00:00 2001 From: Owlblocks Date: Sat, 19 Dec 2020 20:38:06 -0800 Subject: [PATCH 05/47] Changed Bee Balm Tea to give the same calories as the leaves used. --- data/json/items/comestibles/drink.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/items/comestibles/drink.json b/data/json/items/comestibles/drink.json index 5f90676653599..b7adda0a4e154 100644 --- a/data/json/items/comestibles/drink.json +++ b/data/json/items/comestibles/drink.json @@ -98,7 +98,7 @@ "stim": 1, "quench": 34, "healthy": 1, - "calories": 9, + "calories": 2, "description": "A healthy beverage made from bee balm steeped in boiling water. Can be used to reduce negative effects of common cold or flu.", "price": 100, "price_postapoc": 25, From 6e0f950fe81f28d215652cf8db1d2a02528548e5 Mon Sep 17 00:00:00 2001 From: Owlblocks Date: Sat, 19 Dec 2020 20:44:17 -0800 Subject: [PATCH 06/47] Modified chamomile to have higher drops and less mass/volume in the same manner as bee balm. --- data/json/furniture_and_terrain/furniture-flora.json | 2 +- data/json/items/generic.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/json/furniture_and_terrain/furniture-flora.json b/data/json/furniture_and_terrain/furniture-flora.json index 9f048ab347b23..3afcf366cfc6b 100644 --- a/data/json/furniture_and_terrain/furniture-flora.json +++ b/data/json/furniture_and_terrain/furniture-flora.json @@ -54,7 +54,7 @@ "required_str": -1, "flags": [ "TRANSPARENT", "TINY", "FLAMMABLE_ASH", "NOCOLLIDE", "FLOWER" ], "examine_action": "harvest_furn", - "harvest_by_season": [ { "seasons": [ "summer", "autumn" ], "entries": [ { "drop": "chamomile", "base_num": [ 1, 2 ] } ] } ], + "harvest_by_season": [ { "seasons": [ "summer", "autumn" ], "entries": [ { "drop": "chamomile", "base_num": [ 4, 8 ] } ] } ], "bash": { "str_min": 2, "str_max": 6, "sound": "crunch.", "sound_fail": "whish." } }, { diff --git a/data/json/items/generic.json b/data/json/items/generic.json index a8e313ba77abf..c51a9e36f5d0f 100644 --- a/data/json/items/generic.json +++ b/data/json/items/generic.json @@ -1927,11 +1927,11 @@ "id": "chamomile", "name": { "str_sp": "chamomile flowers" }, "description": "White chamomile flowers, used as a herbal remedy since the ancient times.", - "weight": "50 g", + "weight": "10 g", "color": "white", "symbol": ",", "material": [ "veggy" ], - "volume": "250 ml", + "volume": "20 ml", "price": 0, "price_postapoc": 0 }, From 582f6239d861d29812553a6f3b20c97e3503c21e Mon Sep 17 00:00:00 2001 From: Owlblocks Date: Sat, 19 Dec 2020 20:51:50 -0800 Subject: [PATCH 07/47] Modified the lotus flower to be slightly less heavy, and to make more tea per flower. --- data/json/items/generic.json | 2 +- data/json/recipes/recipe_food.json | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/data/json/items/generic.json b/data/json/items/generic.json index c51a9e36f5d0f..731b9e1dfd416 100644 --- a/data/json/items/generic.json +++ b/data/json/items/generic.json @@ -1940,7 +1940,7 @@ "id": "lotus", "name": { "str": "lotus flower" }, "description": "A lovely flower that grows on the surface of bodies of freshwater. Traditionally connected with many Eastern cultures.", - "weight": "50 g", + "weight": "20 g", "color": "white", "symbol": ",", "material": [ "veggy" ], diff --git a/data/json/recipes/recipe_food.json b/data/json/recipes/recipe_food.json index 9df78ca180549..4beb2a41ce939 100644 --- a/data/json/recipes/recipe_food.json +++ b/data/json/recipes/recipe_food.json @@ -1716,7 +1716,8 @@ "skill_used": "cooking", "difficulty": 1, "skills_required": [ "survival", 1 ], - "time": "10 m", + "time": "20 m", + "charges": 4, "batch_time_factors": [ 80, 4 ], "book_learn": [ [ "pocket_survival", 1 ], @@ -1728,7 +1729,7 @@ ], "qualities": [ { "id": "BOIL", "level": 1 } ], "tools": [ [ [ "water_boiling_heat", 2, "LIST" ] ] ], - "components": [ [ [ "lotus", 1 ] ], [ [ "water", 1 ], [ "water_clean", 1 ] ] ] + "components": [ [ [ "lotus", 1 ] ], [ [ "water", 4 ], [ "water_clean", 4 ] ] ] }, { "type": "recipe", From 18049b98bed26f4a276a70dd2c95422313855e76 Mon Sep 17 00:00:00 2001 From: Qrox Date: Sat, 19 Dec 2020 20:34:51 +0800 Subject: [PATCH 08/47] Fix hostile monster not attacking on moving vehicle --- src/monmove.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/monmove.cpp b/src/monmove.cpp index 5630568b080ad..902530c9a30fc 100644 --- a/src/monmove.cpp +++ b/src/monmove.cpp @@ -394,7 +394,7 @@ void monster::plan() return; } - int valid_targets = ( target == nullptr ) ? 1 : 0; + int valid_targets = ( target == nullptr ) ? 0 : 1; for( npc &who : g->all_npcs() ) { mf_attitude faction_att = faction.obj().attitude( who.get_monster_faction() ); if( faction_att == MFA_NEUTRAL || faction_att == MFA_FRIENDLY ) { @@ -791,7 +791,8 @@ void monster::move() optional_vpart_position vp = here.veh_at( pos() ); bool harness_part = static_cast( here.veh_at( pos() ).part_with_feature( "ANIMAL_CTRL", true ) ); - if( vp && vp->vehicle().is_moving() && vp->vehicle().get_pet( vp->part_index() ) ) { + if( friendly != 0 && vp && vp->vehicle().is_moving() && + vp->vehicle().get_pet( vp->part_index() ) ) { moves = 0; return; // Don't move if harnessed, even if vehicle is stationary From 0291867b76d1ee8856784e486dc09fac8d45246a Mon Sep 17 00:00:00 2001 From: Qrox Date: Sun, 20 Dec 2020 02:03:02 +0800 Subject: [PATCH 09/47] Rename get_pet to get_monster --- src/grab.cpp | 2 +- src/monmove.cpp | 2 +- src/vehicle.cpp | 12 ++++++------ src/vehicle.h | 2 +- src/vehicle_move.cpp | 8 ++++---- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/grab.cpp b/src/grab.cpp index e21fee2e96afe..96edca2155322 100644 --- a/src/grab.cpp +++ b/src/grab.cpp @@ -33,7 +33,7 @@ bool game::grabbed_veh_move( const tripoint &dp ) } const int grabbed_part = grabbed_vehicle_vp->part_index(); for( int part_index = 0; part_index < grabbed_vehicle->part_count(); ++part_index ) { - monster *mon = grabbed_vehicle->get_pet( part_index ); + monster *mon = grabbed_vehicle->get_monster( part_index ); if( mon != nullptr && mon->has_effect( effect_harnessed ) ) { add_msg( m_info, _( "You cannot move this vehicle whilst your %s is harnessed!" ), mon->get_name() ); diff --git a/src/monmove.cpp b/src/monmove.cpp index 902530c9a30fc..a2a7d8f1ebe4d 100644 --- a/src/monmove.cpp +++ b/src/monmove.cpp @@ -792,7 +792,7 @@ void monster::move() bool harness_part = static_cast( here.veh_at( pos() ).part_with_feature( "ANIMAL_CTRL", true ) ); if( friendly != 0 && vp && vp->vehicle().is_moving() && - vp->vehicle().get_pet( vp->part_index() ) ) { + vp->vehicle().get_monster( vp->part_index() ) ) { moves = 0; return; // Don't move if harnessed, even if vehicle is stationary diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 6116cda76d0ac..e0994da38491d 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -631,7 +631,7 @@ void vehicle::activate_animal_follow() for( size_t e = 0; e < parts.size(); e++ ) { vehicle_part &vp = parts[ e ]; if( vp.info().fuel_type == fuel_type_animal ) { - monster *mon = get_pet( e ); + monster *mon = get_monster( e ); if( mon && mon->has_effect( effect_harnessed ) ) { vp.enabled = true; is_following = true; @@ -823,7 +823,7 @@ void vehicle::drive_to_local_target( const tripoint &target, bool follow_protoco break; } for( const vehicle_part &p : parts ) { - monster *mon = get_pet( index_of_part( &p ) ); + monster *mon = get_monster( index_of_part( &p ) ); if( mon && mon->pos().xy() == elem ) { its_a_pet = true; break; @@ -1183,7 +1183,7 @@ int vehicle::part_vpower_w( const int index, const bool at_full_hp ) const pwr = vhp_to_watts( vp.base.engine_displacement() ); } if( vp.info().fuel_type == fuel_type_animal ) { - monster *mon = get_pet( index ); + monster *mon = get_monster( index ); if( mon != nullptr && mon->has_effect( effect_harnessed ) ) { // An animal that can carry twice as much weight, can pull a cart twice as hard. pwr = mon->get_speed() * ( mon->get_size() - 1 ) * 3 @@ -3184,7 +3184,7 @@ player *vehicle::get_passenger( int p ) const return nullptr; } -monster *vehicle::get_pet( int p ) const +monster *vehicle::get_monster( int p ) const { p = part_with_feature( p, VPFLAG_BOARDABLE, false ); if( p >= 0 ) { @@ -4491,7 +4491,7 @@ float vehicle::steering_effectiveness() const // is not steerable. const vehicle_part &vp = parts[ steering[0] ]; if( steering.size() == 1 && vp.info().fuel_type == fuel_type_animal ) { - monster *mon = get_pet( steering[0] ); + monster *mon = get_monster( steering[0] ); if( mon == nullptr || !mon->has_effect( effect_harnessed ) ) { return -2.0f; } @@ -6690,7 +6690,7 @@ int vehicle::damage_direct( int p, int dmg, damage_type type ) explode_fuel( p, type ); } else if( parts[ p ].is_broken() && part_flag( p, "UNMOUNT_ON_DAMAGE" ) ) { here.spawn_item( global_part_pos3( p ), part_info( p ).base_item, 1, 0, calendar::turn ); - monster *mon = get_pet( p ); + monster *mon = get_monster( p ); if( mon != nullptr && mon->has_effect( effect_harnessed ) ) { mon->remove_effect( effect_harnessed ); } diff --git a/src/vehicle.h b/src/vehicle.h index 809bd2652a2f4..c59b58465c6f9 100644 --- a/src/vehicle.h +++ b/src/vehicle.h @@ -1125,7 +1125,7 @@ class vehicle // get passenger at part p player *get_passenger( int p ) const; // get monster on a boardable part at p - monster *get_pet( int p ) const; + monster *get_monster( int p ) const; bool enclosed_at( const tripoint &pos ); // not const because it calls refresh_insides /** diff --git a/src/vehicle_move.cpp b/src/vehicle_move.cpp index a25c2573856af..50c1f9275d39b 100644 --- a/src/vehicle_move.cpp +++ b/src/vehicle_move.cpp @@ -547,7 +547,7 @@ void vehicle::thrust( int thd, int z ) for( size_t e = 0; e < parts.size(); e++ ) { const vehicle_part &vp = parts[ e ]; if( vp.info().fuel_type == fuel_type_animal && engines.size() != 1 ) { - monster *mon = get_pet( e ); + monster *mon = get_monster( e ); if( mon != nullptr && mon->has_effect( effect_harnessed ) ) { if( velocity > mon->get_speed() * 12 ) { add_msg( m_bad, _( "Your %s is not fast enough to keep up with the %s" ), mon->get_name(), name ); @@ -812,7 +812,7 @@ veh_collision vehicle::part_collision( int part, const tripoint &p, if( is_body_collision ) { // critters on a BOARDABLE part in this vehicle aren't colliding - if( ovp && ( &ovp->vehicle() == this ) && get_pet( ovp->part_index() ) ) { + if( ovp && ( &ovp->vehicle() == this ) && get_monster( ovp->part_index() ) ) { return ret; } // we just ran into a fish, so move it out of the way @@ -1212,7 +1212,7 @@ bool vehicle::has_harnessed_animal() const for( size_t e = 0; e < parts.size(); e++ ) { const vehicle_part &vp = parts[ e ]; if( vp.info().fuel_type == fuel_type_animal ) { - monster *mon = get_pet( e ); + monster *mon = get_monster( e ); if( mon && mon->has_effect( effect_harnessed ) && mon->has_effect( effect_pet ) ) { return true; } @@ -1227,7 +1227,7 @@ void vehicle::autodrive( const point &p ) for( size_t e = 0; e < parts.size(); e++ ) { const vehicle_part &vp = parts[ e ]; if( vp.info().fuel_type == fuel_type_animal ) { - monster *mon = get_pet( e ); + monster *mon = get_monster( e ); if( !mon || !mon->has_effect( effect_harnessed ) || !mon->has_effect( effect_pet ) ) { is_following = false; return; From 134a9d42fb295e2925b71521b732adc660bb75cb Mon Sep 17 00:00:00 2001 From: Owlblocks Date: Mon, 21 Dec 2020 19:19:23 -0800 Subject: [PATCH 10/47] Should have fixed the style issues with raw_veggy.json (extra spaces at the end of a line). --- data/json/items/comestibles/raw_veggy.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/items/comestibles/raw_veggy.json b/data/json/items/comestibles/raw_veggy.json index 7da95a1448c91..033b45a8cab68 100644 --- a/data/json/items/comestibles/raw_veggy.json +++ b/data/json/items/comestibles/raw_veggy.json @@ -33,7 +33,7 @@ "to_hit": -3, "color": "white", "symbol": ",", - "material": [ "veggy" ], + "material": [ "veggy" ], "volume": "20 ml", "price": 0, "price_postapoc": 0 From 9c9005fb6975075fcd9c319dbd3b58190ec3e750 Mon Sep 17 00:00:00 2001 From: Kevin Granade Date: Mon, 21 Dec 2020 21:35:42 -0800 Subject: [PATCH 11/47] Extend crafting tests a little. --- tests/crafting_test.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tests/crafting_test.cpp b/tests/crafting_test.cpp index df75fd73a61d8..a19a8dab4fcb6 100644 --- a/tests/crafting_test.cpp +++ b/tests/crafting_test.cpp @@ -491,6 +491,30 @@ TEST_CASE( "tool_use", "[crafting][tool]" ) // Can't actually test crafting here since crafting a liquid currently causes a ui prompt prep_craft( recipe_id( "water_clean" ), tools, true ); } + SECTION( "clean_water_in_loaded_mess_kit" ) { + std::vector tools; + tools.push_back( tool_with_ammo( "hotplate", 20 ) ); + item plastic_bottle( "bottle_plastic" ); + plastic_bottle.put_in( + item( "water", calendar::turn_zero, 2 ), item_pocket::pocket_type::CONTAINER ); + tools.push_back( plastic_bottle ); + tools.push_back( tool_with_ammo( "mess_kit", 20 ) ); + + // Can't actually test crafting here since crafting a liquid currently causes a ui prompt + prep_craft( recipe_id( "water_clean" ), tools, true ); + } + SECTION( "clean_water_in_loaded_survivor_mess_kit" ) { + std::vector tools; + tools.push_back( tool_with_ammo( "hotplate", 20 ) ); + item plastic_bottle( "bottle_plastic" ); + plastic_bottle.put_in( + item( "water", calendar::turn_zero, 2 ), item_pocket::pocket_type::CONTAINER ); + tools.push_back( plastic_bottle ); + tools.push_back( tool_with_ammo( "survivor_mess_kit", 20 ) ); + + // Can't actually test crafting here since crafting a liquid currently causes a ui prompt + prep_craft( recipe_id( "water_clean" ), tools, true ); + } SECTION( "clean_water_in_occupied_cooking_vessel" ) { std::vector tools; tools.push_back( tool_with_ammo( "hotplate", 20 ) ); @@ -609,3 +633,10 @@ TEST_CASE( "total crafting time with or without interruption", "[crafting][time] } } } + +TEST_CASE( "check-tool_qualities" ) +{ + CHECK( tool_with_ammo( "mess_kit", 20 ).has_quality( quality_id( "BOIL" ), 2, 1 ) ); + CHECK( tool_with_ammo( "survivor_mess_kit", 20 ).has_quality( quality_id( "BOIL" ), 2, 1 ) ); + CHECK( tool_with_ammo( "survivor_mess_kit", 20 ).get_quality( quality_id( "BOIL" ) ) > 0 ); +} From af887dedd554818a6425273f7421552f1d5eed0d Mon Sep 17 00:00:00 2001 From: Kevin Granade Date: Mon, 21 Dec 2020 21:36:12 -0800 Subject: [PATCH 12/47] Simplify and fix special casing of boil tools. --- src/item.cpp | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/item.cpp b/src/item.cpp index 319aac4b1a128..3630d160652a4 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -5442,28 +5442,9 @@ int item::get_quality( const quality_id &id ) const int return_quality = INT_MIN; /** - * EXCEPTION: Items with quality BOIL only count as such if they are empty, - * excluding items of their ammo type if they are tools. + * EXCEPTION: Items with quality BOIL only count as such if they are empty. */ - auto boil_filter = [this]( const item & itm ) { - if( itm.is_ammo() ) { - return ammo_types().count( itm.ammo_type() ) != 0; - } else if( itm.is_magazine() ) { - for( const ammotype &at : ammo_types() ) { - for( const ammotype &mag_at : itm.ammo_types() ) { - if( at == mag_at ) { - return true; - } - } - } - return false; - } else if( itm.is_toolmod() ) { - return true; - } - return false; - }; - if( id == quality_id( "BOIL" ) && !( contents.empty() || - ( is_tool() && !has_item_with( boil_filter ) ) ) ) { + if( id == quality_id( "BOIL" ) && !contents.empty_container() ) { return INT_MIN; } From a29fbaf5622f859665a363a23b74ee4e687eb123 Mon Sep 17 00:00:00 2001 From: Maleclypse <54345792+Maleclypse@users.noreply.github.com> Date: Mon, 21 Dec 2020 23:57:25 -0600 Subject: [PATCH 13/47] Remove 2 common NPCs --- data/mods/Aftershock/maps/mapgen/whately_lmoe.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/mods/Aftershock/maps/mapgen/whately_lmoe.json b/data/mods/Aftershock/maps/mapgen/whately_lmoe.json index 100ba8190e6cb..d4e5ec395fc64 100644 --- a/data/mods/Aftershock/maps/mapgen/whately_lmoe.json +++ b/data/mods/Aftershock/maps/mapgen/whately_lmoe.json @@ -108,7 +108,7 @@ "########################" ], "palettes": [ "whately_bunker", "whately_empty_bunker_items" ], - "place_npcs": [ { "class": "wilhemina_whately", "x": 7, "y": 16 }, { "class": "whately_cousin", "x": 19, "y": 8 } ] + "place_npcs": [ { "class": "wilhemina_whately", "x": 7, "y": 16 } ] } }, { @@ -153,7 +153,7 @@ { "chunks": [ "lmoe3_tankroom_11x11" ], "x": 1, "y": 18 }, { "chunks": [ "lmoe3_crafting_11x11" ], "x": 13, "y": 18 } ], - "place_npcs": [ { "class": "nicodemus_whately", "x": 9, "y": 7 }, { "class": "whately_cousin", "x": 5, "y": 14 } ] + "place_npcs": [ { "class": "nicodemus_whately", "x": 9, "y": 7 } ] } }, { From ac281d561b03d5f5d1759f0a9aa2d0dc7fcbbce1 Mon Sep 17 00:00:00 2001 From: LyleSY Date: Tue, 22 Dec 2020 23:29:11 -0500 Subject: [PATCH 14/47] [DinoMod] Swamp Nothing --- .../DinoMod/monstergroups/wilderness.json | 215 ++++++++---------- 1 file changed, 99 insertions(+), 116 deletions(-) diff --git a/data/mods/DinoMod/monstergroups/wilderness.json b/data/mods/DinoMod/monstergroups/wilderness.json index bd29ea4280d07..dc486f4f8720f 100644 --- a/data/mods/DinoMod/monstergroups/wilderness.json +++ b/data/mods/DinoMod/monstergroups/wilderness.json @@ -550,245 +550,228 @@ "monsters": [ { "monster": "mon_coelophysis", - "freq": 4, + "freq": 1, "cost_multiplier": 5, "pack_size": [ 4, 8 ], "conditions": [ "DAY", "SPRING", "SUMMER", "AUTUMN" ] }, - { "monster": "mon_ceratosaurus", "freq": 4, "cost_multiplier": 30 }, - { "monster": "mon_zeratosaurus", "freq": 1, "cost_multiplier": 35, "starts": 72 }, + { "monster": "mon_ceratosaurus", "freq": 1, "cost_multiplier": 30 }, { "monster": "mon_zeratosaurus", "freq": 1, "cost_multiplier": 35, "starts": 168 }, - { "monster": "mon_zeratosaurus", "freq": 1, "cost_multiplier": 35, "starts": 672 }, - { "monster": "mon_zeratosaurus", "freq": 1, "cost_multiplier": 35, "starts": 2160 }, - { "monster": "mon_allosaurus", "freq": 8, "cost_multiplier": 30 }, - { "monster": "mon_zallosaurus", "freq": 2, "cost_multiplier": 35, "starts": 72 }, - { "monster": "mon_zallosaurus", "freq": 2, "cost_multiplier": 35, "starts": 168 }, - { "monster": "mon_zallosaurus", "freq": 2, "cost_multiplier": 35, "starts": 672 }, - { "monster": "mon_zallosaurus", "freq": 2, "cost_multiplier": 35, "starts": 2160 }, - { "monster": "mon_acrocanthosaurus", "freq": 8, "cost_multiplier": 40 }, - { "monster": "mon_zacrocanthosaurus", "freq": 2, "cost_multiplier": 45, "starts": 72 }, - { "monster": "mon_zacrocanthosaurus", "freq": 2, "cost_multiplier": 45, "starts": 168 }, - { "monster": "mon_zacrocanthosaurus", "freq": 2, "cost_multiplier": 45, "starts": 672 }, - { "monster": "mon_zacrocanthosaurus", "freq": 2, "cost_multiplier": 45, "starts": 2160 }, - { "monster": "mon_siats", "freq": 8, "cost_multiplier": 40 }, - { "monster": "mon_ziats", "freq": 2, "cost_multiplier": 45, "starts": 72 }, - { "monster": "mon_ziats", "freq": 2, "cost_multiplier": 45, "starts": 168 }, - { "monster": "mon_ziats", "freq": 2, "cost_multiplier": 45, "starts": 672 }, - { "monster": "mon_ziats", "freq": 2, "cost_multiplier": 45, "starts": 2160 }, - { "monster": "mon_tyrannosaurus", "freq": 8, "cost_multiplier": 40 }, - { "monster": "mon_zyrannosaurus", "freq": 2, "cost_multiplier": 80, "starts": 72 }, - { "monster": "mon_zyrannosaurus", "freq": 2, "cost_multiplier": 80, "starts": 168 }, - { "monster": "mon_zyrannosaurus", "freq": 2, "cost_multiplier": 80, "starts": 672 }, - { "monster": "mon_zyrannosaurus", "freq": 2, "cost_multiplier": 80, "starts": 2160 }, - { "monster": "mon_albertosaurus", "freq": 4, "cost_multiplier": 35 }, - { "monster": "mon_zalbertosaurus", "freq": 1, "cost_multiplier": 35, "starts": 72 }, + { "monster": "mon_allosaurus", "freq": 2, "cost_multiplier": 30 }, + { "monster": "mon_zallosaurus", "freq": 1, "cost_multiplier": 35, "starts": 72 }, + { "monster": "mon_zallosaurus", "freq": 1, "cost_multiplier": 35, "starts": 672 }, + { "monster": "mon_acrocanthosaurus", "freq": 2, "cost_multiplier": 40 }, + { "monster": "mon_zacrocanthosaurus", "freq": 1, "cost_multiplier": 45, "starts": 72 }, + { "monster": "mon_zacrocanthosaurus", "freq": 1, "cost_multiplier": 45, "starts": 672 }, + { "monster": "mon_siats", "freq": 2, "cost_multiplier": 40 }, + { "monster": "mon_ziats", "freq": 1, "cost_multiplier": 45, "starts": 72 }, + { "monster": "mon_ziats", "freq": 1, "cost_multiplier": 45, "starts": 672 }, + { "monster": "mon_tyrannosaurus", "freq": 2, "cost_multiplier": 40 }, + { "monster": "mon_zyrannosaurus", "freq": 1, "cost_multiplier": 80, "starts": 72 }, + { "monster": "mon_zyrannosaurus", "freq": 1, "cost_multiplier": 80, "starts": 672 }, + { "monster": "mon_albertosaurus", "freq": 1, "cost_multiplier": 35 }, { "monster": "mon_zalbertosaurus", "freq": 1, "cost_multiplier": 35, "starts": 168 }, - { "monster": "mon_zalbertosaurus", "freq": 1, "cost_multiplier": 35, "starts": 672 }, - { "monster": "mon_zalbertosaurus", "freq": 1, "cost_multiplier": 35, "starts": 2160 }, { "monster": "mon_nothronychus", - "freq": 10, + "freq": 3, "cost_multiplier": 30, "pack_size": [ 1, 2 ], "conditions": [ "DAY", "SPRING", "SUMMER", "AUTUMN" ] }, - { "monster": "mon_zothronychus", "freq": 3, "cost_multiplier": 30, "starts": 72, "pack_size": [ 1, 2 ] }, - { "monster": "mon_zothronychus", "freq": 3, "cost_multiplier": 30, "starts": 168, "pack_size": [ 1, 2 ] }, - { "monster": "mon_zothronychus", "freq": 3, "cost_multiplier": 30, "starts": 672, "pack_size": [ 1, 2 ] }, - { "monster": "mon_zothronychus", "freq": 3, "cost_multiplier": 30, "starts": 2160, "pack_size": [ 1, 2 ] }, + { "monster": "mon_zothronychus", "freq": 1, "cost_multiplier": 30, "starts": 72, "pack_size": [ 1, 2 ] }, + { "monster": "mon_zothronychus", "freq": 1, "cost_multiplier": 30, "starts": 168, "pack_size": [ 1, 2 ] }, + { "monster": "mon_zothronychus", "freq": 1, "cost_multiplier": 30, "starts": 672, "pack_size": [ 1, 2 ] }, { "monster": "mon_deinonychus", - "freq": 10, + "freq": 3, "cost_multiplier": 15, "pack_size": [ 2, 3 ], "conditions": [ "NIGHT", "SPRING", "SUMMER", "AUTUMN" ] }, - { "monster": "mon_zeinonychus", "freq": 3, "cost_multiplier": 30, "starts": 72, "pack_size": [ 2, 3 ] }, - { "monster": "mon_zeinonychus", "freq": 3, "cost_multiplier": 30, "starts": 168, "pack_size": [ 2, 3 ] }, - { "monster": "mon_zeinonychus", "freq": 3, "cost_multiplier": 30, "starts": 672, "pack_size": [ 2, 3 ] }, - { "monster": "mon_zeinonychus", "freq": 3, "cost_multiplier": 30, "starts": 2160, "pack_size": [ 2, 3 ] }, + { "monster": "mon_zeinonychus", "freq": 1, "cost_multiplier": 30, "starts": 72, "pack_size": [ 2, 3 ] }, + { "monster": "mon_zeinonychus", "freq": 1, "cost_multiplier": 30, "starts": 168, "pack_size": [ 2, 3 ] }, + { "monster": "mon_zeinonychus", "freq": 1, "cost_multiplier": 30, "starts": 672, "pack_size": [ 2, 3 ] }, { "monster": "mon_utahraptor", - "freq": 10, + "freq": 3, "cost_multiplier": 30, "conditions": [ "NIGHT", "SPRING", "SUMMER", "AUTUMN" ] }, - { "monster": "mon_zutahraptor", "freq": 3, "cost_multiplier": 30, "starts": 72 }, - { "monster": "mon_zutahraptor", "freq": 3, "cost_multiplier": 30, "starts": 168 }, - { "monster": "mon_zutahraptor", "freq": 3, "cost_multiplier": 30, "starts": 672 }, - { "monster": "mon_zutahraptor", "freq": 3, "cost_multiplier": 30, "starts": 2160 }, + { "monster": "mon_zutahraptor", "freq": 1, "cost_multiplier": 30, "starts": 72 }, + { "monster": "mon_zutahraptor", "freq": 1, "cost_multiplier": 30, "starts": 168 }, + { "monster": "mon_zutahraptor", "freq": 1, "cost_multiplier": 30, "starts": 672 }, { "monster": "mon_apatosaurus", - "freq": 20, + "freq": 5, "cost_multiplier": 25, "pack_size": [ 4, 12 ], "conditions": [ "DAY", "SPRING", "SUMMER", "AUTUMN" ] }, - { "monster": "mon_zapatosaurus", "freq": 5, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 72 }, - { "monster": "mon_zapatosaurus", "freq": 5, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 168 }, - { "monster": "mon_zapatosaurus", "freq": 5, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 672 }, - { "monster": "mon_zapatosaurus", "freq": 5, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 2160 }, + { "monster": "mon_zapatosaurus", "freq": 1, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 72 }, + { "monster": "mon_zapatosaurus", "freq": 1, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 168 }, + { "monster": "mon_zapatosaurus", "freq": 1, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 672 }, + { "monster": "mon_zapatosaurus", "freq": 2, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 2160 }, { "monster": "mon_brontosaurus", - "freq": 20, + "freq": 5, "cost_multiplier": 25, "pack_size": [ 4, 12 ], "conditions": [ "DAY", "SPRING", "SUMMER", "AUTUMN" ] }, - { "monster": "mon_zrontosaurus", "freq": 5, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 72 }, - { "monster": "mon_zrontosaurus", "freq": 5, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 168 }, - { "monster": "mon_zrontosaurus", "freq": 5, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 672 }, - { "monster": "mon_zrontosaurus", "freq": 5, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 2160 }, + { "monster": "mon_zrontosaurus", "freq": 1, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 72 }, + { "monster": "mon_zrontosaurus", "freq": 1, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 168 }, + { "monster": "mon_zrontosaurus", "freq": 1, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 672 }, + { "monster": "mon_zrontosaurus", "freq": 2, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 2160 }, { "monster": "mon_diplodocus", - "freq": 40, + "freq": 5, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "conditions": [ "DAY", "SPRING", "SUMMER", "AUTUMN" ] }, - { "monster": "mon_ziplodocus", "freq": 10, "cost_multiplier": 25, "pack_size": [ 4, 12 ], "starts": 72 }, - { "monster": "mon_ziplodocus", "freq": 10, "cost_multiplier": 25, "pack_size": [ 4, 12 ], "starts": 168 }, - { "monster": "mon_ziplodocus", "freq": 10, "cost_multiplier": 25, "pack_size": [ 4, 12 ], "starts": 672 }, - { "monster": "mon_ziplodocus", "freq": 10, "cost_multiplier": 25, "pack_size": [ 4, 12 ], "starts": 2160 }, + { "monster": "mon_ziplodocus", "freq": 1, "cost_multiplier": 25, "pack_size": [ 4, 12 ], "starts": 72 }, + { "monster": "mon_ziplodocus", "freq": 1, "cost_multiplier": 25, "pack_size": [ 4, 12 ], "starts": 168 }, + { "monster": "mon_ziplodocus", "freq": 1, "cost_multiplier": 25, "pack_size": [ 4, 12 ], "starts": 672 }, + { "monster": "mon_ziplodocus", "freq": 2, "cost_multiplier": 25, "pack_size": [ 4, 12 ], "starts": 2160 }, { "monster": "mon_camarasaurus", - "freq": 60, + "freq": 5, "cost_multiplier": 25, "pack_size": [ 4, 12 ], "conditions": [ "DAY", "SPRING", "SUMMER", "AUTUMN" ] }, - { "monster": "mon_zamarasaurus", "freq": 15, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 72 }, - { "monster": "mon_zamarasaurus", "freq": 15, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 168 }, - { "monster": "mon_zamarasaurus", "freq": 15, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 672 }, - { "monster": "mon_zamarasaurus", "freq": 15, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 2160 }, + { "monster": "mon_zamarasaurus", "freq": 1, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 72 }, + { "monster": "mon_zamarasaurus", "freq": 1, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 168 }, + { "monster": "mon_zamarasaurus", "freq": 1, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 672 }, + { "monster": "mon_zamarasaurus", "freq": 2, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 2160 }, { "monster": "mon_brachiosaurus", - "freq": 60, + "freq": 5, "cost_multiplier": 25, "pack_size": [ 4, 12 ], "conditions": [ "DAY", "SPRING", "SUMMER", "AUTUMN" ] }, - { "monster": "mon_zrachiosaurus", "freq": 15, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 72 }, - { "monster": "mon_zrachiosaurus", "freq": 15, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 168 }, - { "monster": "mon_zrachiosaurus", "freq": 15, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 672 }, - { "monster": "mon_zrachiosaurus", "freq": 15, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 2160 }, + { "monster": "mon_zrachiosaurus", "freq": 1, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 72 }, + { "monster": "mon_zrachiosaurus", "freq": 1, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 168 }, + { "monster": "mon_zrachiosaurus", "freq": 1, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 672 }, + { "monster": "mon_zrachiosaurus", "freq": 2, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 2160 }, { "monster": "mon_alamosaurus", - "freq": 60, + "freq": 5, "cost_multiplier": 25, "pack_size": [ 4, 12 ], "conditions": [ "DAY", "SPRING", "SUMMER", "AUTUMN" ] }, - { "monster": "mon_zalamosaurus", "freq": 15, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 72 }, - { "monster": "mon_zalamosaurus", "freq": 15, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 168 }, - { "monster": "mon_zalamosaurus", "freq": 15, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 672 }, - { "monster": "mon_zalamosaurus", "freq": 15, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 2160 }, + { "monster": "mon_zalamosaurus", "freq": 1, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 72 }, + { "monster": "mon_zalamosaurus", "freq": 1, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 168 }, + { "monster": "mon_zalamosaurus", "freq": 1, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 672 }, + { "monster": "mon_zalamosaurus", "freq": 2, "cost_multiplier": 30, "pack_size": [ 4, 12 ], "starts": 2160 }, { "monster": "mon_stegosaurus", - "freq": 20, + "freq": 6, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "conditions": [ "DAY", "SPRING", "SUMMER", "AUTUMN" ] }, - { "monster": "mon_ztegosaurus", "freq": 5, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 72 }, - { "monster": "mon_ztegosaurus", "freq": 5, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 168 }, - { "monster": "mon_ztegosaurus", "freq": 5, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 672 }, - { "monster": "mon_ztegosaurus", "freq": 5, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 2160 }, + { "monster": "mon_ztegosaurus", "freq": 1, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 72 }, + { "monster": "mon_ztegosaurus", "freq": 2, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 168 }, + { "monster": "mon_ztegosaurus", "freq": 1, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 672 }, + { "monster": "mon_ztegosaurus", "freq": 2, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 2160 }, { "monster": "mon_dyoplosaurus", - "freq": 20, + "freq": 6, "cost_multiplier": 20, "conditions": [ "DAY", "SPRING", "SUMMER", "AUTUMN" ] }, - { "monster": "mon_zyoplosaurus", "freq": 2, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 72 }, + { "monster": "mon_zyoplosaurus", "freq": 1, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 72 }, { "monster": "mon_zyoplosaurus", "freq": 2, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 168 }, - { "monster": "mon_zyoplosaurus", "freq": 2, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 672 }, + { "monster": "mon_zyoplosaurus", "freq": 1, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 672 }, { "monster": "mon_zyoplosaurus", "freq": 2, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 2160 }, { "monster": "mon_ankylosaurus", - "freq": 20, + "freq": 6, "cost_multiplier": 20, "conditions": [ "DAY", "SPRING", "SUMMER", "AUTUMN" ] }, - { "monster": "mon_zankylosaurus", "freq": 2, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 72 }, + { "monster": "mon_zankylosaurus", "freq": 1, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 72 }, { "monster": "mon_zankylosaurus", "freq": 2, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 168 }, - { "monster": "mon_zankylosaurus", "freq": 2, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 672 }, + { "monster": "mon_zankylosaurus", "freq": 1, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 672 }, { "monster": "mon_zankylosaurus", "freq": 2, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 2160 }, { "monster": "mon_nodosaurus", - "freq": 20, + "freq": 6, "cost_multiplier": 20, "conditions": [ "DAY", "SPRING", "SUMMER", "AUTUMN" ] }, - { "monster": "mon_zodosaurus", "freq": 2, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 72 }, + { "monster": "mon_zodosaurus", "freq": 1, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 72 }, { "monster": "mon_zodosaurus", "freq": 2, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 168 }, - { "monster": "mon_zodosaurus", "freq": 2, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 672 }, + { "monster": "mon_zodosaurus", "freq": 1, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 672 }, { "monster": "mon_zodosaurus", "freq": 2, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 2160 }, { "monster": "mon_edmontonia", - "freq": 20, + "freq": 6, "cost_multiplier": 20, "conditions": [ "DAY", "SPRING", "SUMMER", "AUTUMN" ] }, - { "monster": "mon_zedmontonia", "freq": 2, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 72 }, + { "monster": "mon_zedmontonia", "freq": 1, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 72 }, { "monster": "mon_zedmontonia", "freq": 2, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 168 }, - { "monster": "mon_zedmontonia", "freq": 2, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 672 }, + { "monster": "mon_zedmontonia", "freq": 1, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 672 }, { "monster": "mon_zedmontonia", "freq": 2, "cost_multiplier": 20, "pack_size": [ 2, 4 ], "starts": 2160 }, { "monster": "mon_camptosaurus", - "freq": 20, + "freq": 6, "cost_multiplier": 0, "pack_size": [ 4, 12 ], "conditions": [ "DUSK", "DAWN", "SPRING", "SUMMER", "AUTUMN" ] }, - { "monster": "mon_zamptosaurus", "freq": 5, "cost_multiplier": 10, "pack_size": [ 4, 12 ], "starts": 72 }, - { "monster": "mon_zamptosaurus", "freq": 5, "cost_multiplier": 10, "pack_size": [ 4, 12 ], "starts": 168 }, - { "monster": "mon_zamptosaurus", "freq": 5, "cost_multiplier": 10, "pack_size": [ 4, 12 ], "starts": 672 }, - { "monster": "mon_zamptosaurus", "freq": 5, "cost_multiplier": 10, "pack_size": [ 4, 12 ], "starts": 2160 }, + { "monster": "mon_zamptosaurus", "freq": 1, "cost_multiplier": 10, "pack_size": [ 4, 12 ], "starts": 72 }, + { "monster": "mon_zamptosaurus", "freq": 2, "cost_multiplier": 10, "pack_size": [ 4, 12 ], "starts": 168 }, + { "monster": "mon_zamptosaurus", "freq": 1, "cost_multiplier": 10, "pack_size": [ 4, 12 ], "starts": 672 }, + { "monster": "mon_zamptosaurus", "freq": 2, "cost_multiplier": 10, "pack_size": [ 4, 12 ], "starts": 2160 }, { "monster": "mon_maiasaura", - "freq": 20, + "freq": 6, "cost_multiplier": 10, "pack_size": [ 4, 12 ], "conditions": [ "DUSK", "DAWN", "SPRING", "SUMMER", "AUTUMN" ] }, - { "monster": "mon_zaiasaura", "freq": 5, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 72 }, - { "monster": "mon_zaiasaura", "freq": 5, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 168 }, - { "monster": "mon_zaiasaura", "freq": 5, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 672 }, - { "monster": "mon_zaiasaura", "freq": 5, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 2160 }, + { "monster": "mon_zaiasaura", "freq": 1, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 72 }, + { "monster": "mon_zaiasaura", "freq": 2, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 168 }, + { "monster": "mon_zaiasaura", "freq": 1, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 672 }, + { "monster": "mon_zaiasaura", "freq": 2, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 2160 }, { "monster": "mon_parasaurolophus", - "freq": 20, + "freq": 6, "cost_multiplier": 10, "pack_size": [ 4, 12 ], "conditions": [ "DUSK", "DAWN", "SPRING", "SUMMER", "AUTUMN" ] }, - { "monster": "mon_zarasaurolophus", "freq": 5, "cost_multiplier": 10, "pack_size": [ 4, 12 ], "starts": 72 }, - { "monster": "mon_zarasaurolophus", "freq": 5, "cost_multiplier": 10, "pack_size": [ 4, 12 ], "starts": 168 }, - { "monster": "mon_zarasaurolophus", "freq": 5, "cost_multiplier": 10, "pack_size": [ 4, 12 ], "starts": 672 }, - { "monster": "mon_zarasaurolophus", "freq": 5, "cost_multiplier": 10, "pack_size": [ 4, 12 ], "starts": 2160 }, + { "monster": "mon_zarasaurolophus", "freq": 1, "cost_multiplier": 10, "pack_size": [ 4, 12 ], "starts": 72 }, + { "monster": "mon_zarasaurolophus", "freq": 2, "cost_multiplier": 10, "pack_size": [ 4, 12 ], "starts": 168 }, + { "monster": "mon_zarasaurolophus", "freq": 1, "cost_multiplier": 10, "pack_size": [ 4, 12 ], "starts": 672 }, + { "monster": "mon_zarasaurolophus", "freq": 2, "cost_multiplier": 10, "pack_size": [ 4, 12 ], "starts": 2160 }, { "monster": "mon_corythosaurus", - "freq": 20, + "freq": 6, "cost_multiplier": 10, "pack_size": [ 4, 12 ], "conditions": [ "DUSK", "DAWN", "SPRING", "SUMMER", "AUTUMN" ] }, - { "monster": "mon_zorythosaurus", "freq": 5, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 72 }, - { "monster": "mon_zorythosaurus", "freq": 5, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 168 }, - { "monster": "mon_zorythosaurus", "freq": 5, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 672 }, - { "monster": "mon_zorythosaurus", "freq": 5, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 2160 }, + { "monster": "mon_zorythosaurus", "freq": 1, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 72 }, + { "monster": "mon_zorythosaurus", "freq": 2, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 168 }, + { "monster": "mon_zorythosaurus", "freq": 1, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 672 }, + { "monster": "mon_zorythosaurus", "freq": 2, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 2160 }, { "monster": "mon_edmontosaurus", - "freq": 20, + "freq": 6, "cost_multiplier": 10, "pack_size": [ 4, 12 ], "conditions": [ "DUSK", "DAWN", "SPRING", "SUMMER", "AUTUMN" ] }, - { "monster": "mon_zedmontosaurus", "freq": 5, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 72 }, - { "monster": "mon_zedmontosaurus", "freq": 5, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 168 }, - { "monster": "mon_zedmontosaurus", "freq": 5, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 672 }, - { "monster": "mon_zedmontosaurus", "freq": 5, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 2160 } + { "monster": "mon_zedmontosaurus", "freq": 1, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 72 }, + { "monster": "mon_zedmontosaurus", "freq": 2, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 168 }, + { "monster": "mon_zedmontosaurus", "freq": 1, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 672 }, + { "monster": "mon_zedmontosaurus", "freq": 2, "cost_multiplier": 20, "pack_size": [ 4, 12 ], "starts": 2160 } ] }, { From 66d2e7aafd9271bc4dc0d0ba3ea75f708b6b0f60 Mon Sep 17 00:00:00 2001 From: Serhiy Zahoriya Date: Thu, 24 Dec 2020 01:05:09 +0200 Subject: [PATCH 15/47] Adding /tools/ code"owner" (#46281) --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 514bd7039c670..1a1c216d3c560 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -27,3 +27,4 @@ magic*.h @KorGgenT /data/json/npcs/Backgrounds/ @I-am-Erk /data/json/snippets/ @I-am-Erk /gfx/ @I-am-Erk +/tools/ @int-ua From d6eb5cf0e04a433c4240052e39f4e27791d355f9 Mon Sep 17 00:00:00 2001 From: casswedson <58050969+casswedson@users.noreply.github.com> Date: Wed, 23 Dec 2020 18:07:29 -0500 Subject: [PATCH 16/47] misc item category fixes (#46275) --- data/json/items/armor/hats.json | 1 + data/json/items/armor/masks.json | 1 + data/json/recipes/other/materials.json | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/data/json/items/armor/hats.json b/data/json/items/armor/hats.json index e03206e7188cd..6014e42096a42 100644 --- a/data/json/items/armor/hats.json +++ b/data/json/items/armor/hats.json @@ -24,6 +24,7 @@ { "id": "bandana_head", "type": "TOOL_ARMOR", + "category": "clothing", "name": { "str": "head bandana" }, "description": "A cotton bandana, worn over the head.", "weight": "42 g", diff --git a/data/json/items/armor/masks.json b/data/json/items/armor/masks.json index f3887415a9bd2..ae84891e5979c 100644 --- a/data/json/items/armor/masks.json +++ b/data/json/items/armor/masks.json @@ -31,6 +31,7 @@ { "id": "bandana", "type": "TOOL_ARMOR", + "category": "clothing", "name": { "str": "bandana" }, "description": "A cotton bandana, worn over the mouth for warmth and minor protection from dust and other contaminants.", "weight": "42 g", diff --git a/data/json/recipes/other/materials.json b/data/json/recipes/other/materials.json index ed7d07fb527a3..028849c78f1dc 100644 --- a/data/json/recipes/other/materials.json +++ b/data/json/recipes/other/materials.json @@ -626,7 +626,7 @@ "type": "recipe", "activity_level": "LIGHT_EXERCISE", "result": "button_wood", - "category": "CC_WEAPON", + "category": "CC_OTHER", "skill_used": "fabrication", "skills_required": [ "fabrication", 1 ], "difficulty": 3, @@ -641,7 +641,7 @@ "type": "recipe", "activity_level": "LIGHT_EXERCISE", "result": "button_plastic", - "category": "CC_WEAPON", + "category": "CC_OTHER", "skill_used": "fabrication", "difficulty": 4, "time": "1 h 30 m", From a1d7ac84bfa70a25d837875fc49fa841a0ff5f5b Mon Sep 17 00:00:00 2001 From: Eric <52087122+Ramza13@users.noreply.github.com> Date: Wed, 23 Dec 2020 18:10:07 -0500 Subject: [PATCH 17/47] Fix auto mining (#46266) --- src/game.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/game.cpp b/src/game.cpp index 3661a77b69409..3fbd40e54d8d6 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1787,6 +1787,7 @@ bool game::cancel_activity_query( const std::string &text ) } if( query_yn( "%s %s", text, u.activity.get_stop_phrase() ) ) { u.cancel_activity(); + u.clear_destination(); u.resume_backlog_activity(); return true; } From 2efa5c2ec33809621fa60452a9cadcb718cd0a6c Mon Sep 17 00:00:00 2001 From: Leuten Date: Wed, 23 Dec 2020 15:21:44 -0800 Subject: [PATCH 18/47] Cockroach Nymph/Locust Nymph/Dermatik Larva are still "harvest: mammal_tiny" (#46260) * Update insect_spider.json mon_giant_cockroach_nymph mon_dermatik_larva mon_locust_nymph Changed "harvest": "mammal_tiny" to "harvest": "arachnid" --- data/json/monsters/insect_spider.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/json/monsters/insect_spider.json b/data/json/monsters/insect_spider.json index 0ed99d9ce0c37..88251fb4a7f33 100644 --- a/data/json/monsters/insect_spider.json +++ b/data/json/monsters/insect_spider.json @@ -294,7 +294,7 @@ "melee_cut": 0, "vision_day": 10, "vision_night": 3, - "harvest": "mammal_tiny", + "harvest": "arachnid", "upgrades": { "age_grow": 7, "into": "mon_giant_cockroach" }, "death_function": [ "NORMAL" ], "special_attacks": [ [ "EAT_FOOD", 120 ] ], @@ -1412,7 +1412,7 @@ "melee_dice_sides": 1, "melee_cut": 1, "dodge": 1, - "harvest": "mammal_tiny", + "harvest": "arachnid", "special_attacks": [ [ "DERMATIK_GROWTH", 14400 ] ], "death_function": [ "NORMAL" ], "flags": [ "HEARS", "SMELLS", "POISON", "CAN_DIG", "LARVA" ] @@ -1783,7 +1783,7 @@ "dodge": 3, "melee_cut": 0, "vision_day": 10, - "harvest": "mammal_tiny", + "harvest": "arachnid", "upgrades": { "age_grow": 10, "into": "mon_locust" }, "death_function": [ "NORMAL" ], "special_attacks": [ { "type": "leap", "cooldown": 4, "max_range": 4, "allow_no_target": true }, [ "EAT_CROP", 120 ] ], From 5ec75788f20c008156c344ae61918f6a6c77ccc0 Mon Sep 17 00:00:00 2001 From: Eric Pierce Date: Wed, 23 Dec 2020 16:22:25 -0700 Subject: [PATCH 19/47] Don't stop hauling unless we're actually hauling (#46259) When entering run mode, "You stop hauling items" was always displayed, even when not hauling items, leading to some player confusion. Now, stop_hauling is only called if the avatar is_hauling, and it happens before entering the new movement mode instead of afterward. --- src/avatar.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/avatar.cpp b/src/avatar.cpp index 4afe86a21b3ef..96e1049835253 100644 --- a/src/avatar.cpp +++ b/src/avatar.cpp @@ -1493,14 +1493,13 @@ void avatar::set_movement_mode( const move_mode_id &new_mode ) } if( can_switch_to( new_mode ) ) { + if( is_hauling() && new_mode->stop_hauling() ) { + stop_hauling(); + } add_msg( new_mode->change_message( true, steed ) ); move_mode = new_mode; // crouching affects visibility get_map().set_seen_cache_dirty( pos().z ); - - if( new_mode->stop_hauling() ) { - stop_hauling(); - } } else { add_msg( new_mode->change_message( false, steed ) ); } From 0c5d3e55074793804d23f495391a2a2bbf9fba77 Mon Sep 17 00:00:00 2001 From: ToxiClay Date: Tue, 22 Dec 2020 02:42:39 -0500 Subject: [PATCH 20/47] Various grammar fixes --- src/player_hardcoded_effects.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/player_hardcoded_effects.cpp b/src/player_hardcoded_effects.cpp index 25875e16b9d3b..30c33b129ffd6 100644 --- a/src/player_hardcoded_effects.cpp +++ b/src/player_hardcoded_effects.cpp @@ -947,11 +947,11 @@ void Character::hardcoded_effects( effect &it ) if( intense == 1 ) { warning = _( "Your skin looks pale and you feel anxious and thirsty. Blood loss?" ); } else if( intense == 2 ) { - warning = _( "Your pale skin is sweating, your heart beats fast and you feel restless. Maybe you lost too much blood?" ); + warning = _( "Your pale skin is sweating, your heart is beating fast, and you feel restless. Maybe you lost too much blood?" ); } else if( intense == 3 ) { warning = _( "You're unsettlingly white, but your fingertips are bluish. You are agitated and your heart is racing. Your blood loss must be serious." ); } else { //intense == 4 - warning = _( "You are pale as a ghost, dripping wet from the sweat, and sluggish despite your heart racing like a train. You are on a brink of collapse from effects of a blood loss." ); + warning = _( "You are pale as a ghost, dripping wet from the sweat, and sluggish - despite your heart racing like a train. You are on the brink of collapse from the effects of blood loss." ); } add_msg_if_player( m_bad, warning ); } else { @@ -1064,7 +1064,7 @@ void Character::hardcoded_effects( effect &it ) add_msg_if_player( m_bad, _( "Rest is what you want. Rest is what you need." ) ); break; case 2: - add_msg_if_player( m_bad, _( "You feel dizzy and can't coordinate movement of your feet." ) ); + add_msg_if_player( m_bad, _( "You feel dizzy and can't coordinate the movement of your feet." ) ); add_effect( effect_stunned, rng( 1_minutes, 2_minutes ) ); break; case 3: @@ -1072,13 +1072,13 @@ void Character::hardcoded_effects( effect &it ) add_effect( effect_shakes, rng( 4_minutes, 8_minutes ) ); break; case 4: - add_msg_if_player( m_bad, _( "You crave for ice. Dirt under your feet looks tasty too." ) ); + add_msg_if_player( m_bad, _( "You crave for ice. The dirt under your feet looks tasty too." ) ); break; case 5: add_msg_if_player( m_bad, _( "Your whole mouth is sore, and your tongue is swollen." ) ); break; case 6: - add_msg_if_player( m_bad, _( "You feel lightheaded. And a migraine follows." ) ); + add_msg_if_player( m_bad, _( "You feel lightheaded. A migraine follows." ) ); mod_pain( intense * 9 ); break; case 7: // 7-9 empty for variability, as messages stack on higher intensity @@ -1093,10 +1093,10 @@ void Character::hardcoded_effects( effect &it ) if( intense > 2 ) { switch( dice( 1, 9 ) ) { case 1: - add_msg_if_player( m_bad, _( "Your legs are restless. Urge to move them is so strong." ) ); + add_msg_if_player( m_bad, _( "Your legs are restless. The urge to move them is so strong." ) ); break; case 2: - add_msg_if_player( m_bad, _( "You feel like you'd sleep on a rock." ) ); + add_msg_if_player( m_bad, _( "You feel like you could sleep on a rock." ) ); mod_fatigue( intense * 3 ); break; case 3: @@ -1109,7 +1109,7 @@ void Character::hardcoded_effects( effect &it ) set_stamina( 0 ); break; case 5: - add_msg_if_player( m_bad, _( "You can't take it any more. Rest first, everything else later." ) ); + add_msg_if_player( m_bad, _( "You can't take it any more. Rest first; everything else later." ) ); add_effect( effect_lying_down, rng( 2_minutes, 5_minutes ) ); break; case 6: From f09ad37e09ab12b1d42d5976a2e3a82a1cb711e2 Mon Sep 17 00:00:00 2001 From: ToxiClay Date: Wed, 23 Dec 2020 18:42:21 -0500 Subject: [PATCH 21/47] Archery json fix (#46240) --- data/json/items/ranged/archery.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/data/json/items/ranged/archery.json b/data/json/items/ranged/archery.json index 84fee145263d0..51818eb5192ba 100644 --- a/data/json/items/ranged/archery.json +++ b/data/json/items/ranged/archery.json @@ -405,7 +405,7 @@ "symbol": "(", "color": "yellow", "name": { "str": "short bow" }, - "description": "Emphasizing portability and agility over power, this all wood bow is suitable for small game and harrasing enemies.", + "description": "Emphasizing portability and agility over power, this all-wood bow is suitable for small game and harassing enemies.", "price": 16000, "//": "52in Elm Shortbow at 24in draw with 26in, 0.077 lb aspen arrow: 45J, 50 lbs draw, 0.35 slugs with 30g arrow.", "material": [ "wood" ], @@ -436,7 +436,7 @@ "symbol": "(", "color": "yellow", "name": { "str": "compound hunting bow" }, - "description": "A high-power bow with shaped cams and extra cables for high velocity shots that can be used effectively by fairly strong archers. Currently set to a medium weight.", + "description": "A high-powered bow with shaped cams and extra cables for high-velocity shots that can be used effectively by fairly strong archers. Currently set to a medium weight.", "price": 55000, "//": "60 lb draw weight 24in draw, 100J, 0.55 slugs of momentum with a 30g arrow.", "material": [ "steel", "plastic" ], @@ -472,7 +472,7 @@ "copy-from": "compbow", "type": "GUN", "name": { "str": "compound hunting bow (high)", "str_pl": "compound hunting bows (high)" }, - "description": "A high-power bow with shaped cams and extra cables for high velocity shots that can be used effectively by very strong archers. Currently set to a high weight, and ready to cause some real damage - if you can draw it.", + "description": "A high-powered bow with shaped cams and extra cables for high-velocity shots that can be used effectively by very strong archers. Currently set to a high weight, and ready to cause some real damage - if you can draw it.", "//": "80 lb draw weight, efficient, 0.62 slugs of momentum with a 30g arrow.", "min_strength": 11, "ranged_damage": { "damage_type": "stab", "amount": 12 }, @@ -489,7 +489,7 @@ "copy-from": "compbow", "type": "GUN", "name": { "str": "compound hunting bow (low)", "str_pl": "compound hunting bows (low)" }, - "description": "A high-power bow with shaped cams and extra cables for high velocity shots that can be used effectively by average archers. Currently set to a low weight, making it much easier to draw.", + "description": "A high-powered bow with shaped cams and extra cables for high-velocity shots that can be used effectively by average archers. Currently set to a low weight, making it much easier to draw.", "//": "40 lb draw weight, efficient, 0.45 slugs of momentum with a 30g arrow.", "min_strength": 7, "ranged_damage": { "damage_type": "stab", "amount": 7 }, @@ -508,7 +508,7 @@ "symbol": "(", "color": "yellow", "name": { "str": "composite bow (heavy)", "str_pl": "composite bows (heavy)" }, - "description": "A traditionally constructed bow made from wood, horn and sinew. It has a rather heavy draw weight.", + "description": "A traditionally-constructed bow made from wood, horn and sinew. It has a rather high draw weight.", "price": 32000, "//": "90 lb draw weight, 28in draw, 70J, 0.464 slugs of momentum with a 0.066lb arrow.", "material": [ "wood", "bone" ], @@ -539,7 +539,7 @@ "symbol": "(", "color": "yellow", "name": { "str": "composite bow (light)", "str_pl": "composite bows (light)" }, - "description": "A traditionally constructed bow made from wood, horn and sinew. It has a moderate draw weight.", + "description": "A traditionally-constructed bow made from wood, horn and sinew. It has a moderate draw weight.", "price": 42000, "//": "60in bamboo, horn and sinew reflex bow, 70 lbs draw, 50J, 0.40 slugs with a 30g arrow.", "material": [ "wood" ], @@ -570,7 +570,7 @@ "symbol": "(", "color": "yellow", "name": { "str": "modern recurve bow" }, - "description": "A modern fiberglass bow which can be used effectively by those of somewhat above-average strength.", + "description": "A modern fiberglass bow that can be used effectively by those of somewhat above-average strength.", "price": 38000, "//": "60in Fiberglass recurved bow at 26in draw, 80lb draw, 54J, 0.403 slugs with 30g arrow.", "material": [ "steel", "plastic" ], @@ -629,7 +629,7 @@ "copy-from": "longbow", "type": "GUN", "name": { "str": "wooden greatbow" }, - "description": "An extremely large and stiff longbow, made with enormous limbs and a thick string to take an immense amount of energy. Takes incredible strength to draw.", + "description": "An extremely large, stiff longbow, made with enormous limbs and a thick string to take an immense amount of energy. Takes incredible strength to draw.", "price": 150000, "//": "78in Yew Longbow at 30in draw with 31in, 145 lbs draw, 0.51 slugs with 30g arrow.", "min_strength": 17, @@ -650,7 +650,7 @@ "symbol": "(", "color": "yellow", "name": { "str": "compound greatbow" }, - "description": "An extremely large and powerful compound bow, made with enormous limbs and a thick string to take an immense amount of energy. Takes incredible strength to draw.", + "description": "An extremely large, powerful compound bow, made with enormous limbs and a thick string to take an immense amount of energy. Takes incredible strength to draw.", "price": 160000, "//": "120 lb draw weight, very efficient, 0.5 slugs of momentum with a 30g arrow.", "material": [ "steel", "plastic" ], @@ -680,7 +680,7 @@ "symbol": "(", "color": "yellow", "name": { "str": "Olympic style target bow" }, - "description": "A highly refined and modern bow, but not all that useful as the draw weight is very low.", + "description": "A highly refined, modern bow, but not all that useful, as the draw weight is very low.", "price": 72000, "//": "60in, fiberglass limbs, aluminum riser, 28in draw, 50lb draw, 52J, 0.4 slugs", "material": [ "wood" ], From 6c850ac373e6c68b93f2354c27da0940c33630c7 Mon Sep 17 00:00:00 2001 From: keampe <72715213+keampe@users.noreply.github.com> Date: Wed, 23 Dec 2020 16:10:03 -0800 Subject: [PATCH 22/47] Unloading Oxygen bug (#46241) --- data/json/items/ammo.json | 2 +- data/json/items/tool/med.json | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/data/json/items/ammo.json b/data/json/items/ammo.json index cbe1a49fa966a..4b6601c950bae 100644 --- a/data/json/items/ammo.json +++ b/data/json/items/ammo.json @@ -102,7 +102,7 @@ "description": "Compressed medical oxygen.", "weight": "1 mg", "volume": "1 ml", - "flags": [ "TRADER_AVOID" ], + "flags": [ "TRADER_AVOID", "NO_DROP" ], "phase": "gas", "ammo_type": "oxygen" }, diff --git a/data/json/items/tool/med.json b/data/json/items/tool/med.json index 505da8e0a5ebe..cb22b59aa7acb 100644 --- a/data/json/items/tool/med.json +++ b/data/json/items/tool/med.json @@ -138,6 +138,7 @@ ], "max_charges": 12, "charges_per_use": 1, + "flags": [ "NO_UNLOAD", "NO_RELOAD" ], "use_action": [ "OXYGEN_BOTTLE" ] }, { @@ -191,6 +192,7 @@ ], "max_charges": 24, "charges_per_use": 1, + "flags": [ "NO_UNLOAD", "NO_RELOAD" ], "use_action": [ "OXYGEN_BOTTLE" ] }, { From b63dffad6acc25ebf8f699db0436a7783e3bae27 Mon Sep 17 00:00:00 2001 From: slimeboy460 <68845349+slimeboy460@users.noreply.github.com> Date: Wed, 23 Dec 2020 14:11:52 -1000 Subject: [PATCH 23/47] "radio_car_wheel" code adjustment (#46235) --- data/json/recipes/other/parts.json | 1 - 1 file changed, 1 deletion(-) diff --git a/data/json/recipes/other/parts.json b/data/json/recipes/other/parts.json index ad32c793ca44d..974f151e619a5 100644 --- a/data/json/recipes/other/parts.json +++ b/data/json/recipes/other/parts.json @@ -778,7 +778,6 @@ "category": "CC_OTHER", "subcategory": "CSC_OTHER_MATERIALS", "skill_used": "fabrication", - "skills_required": [ "fabrication", 6 ], "difficulty": 6, "time": "2 h 30 m", "autolearn": true, From 0b68bf06a1ac33ff18cbbb075ecef2c3e4bf9370 Mon Sep 17 00:00:00 2001 From: zantanzuken <31968461+zantanzuken@users.noreply.github.com> Date: Wed, 23 Dec 2020 16:13:28 -0800 Subject: [PATCH 24/47] Add files via upload (#46231) --- data/json/items/gun/223.json | 2 ++ data/json/items/gun/40.json | 2 ++ data/json/items/gun/45.json | 2 ++ data/json/items/gun/762.json | 2 ++ data/json/items/gun/84x246mm.json | 1 + data/json/items/gun/8x40mm.json | 1 + data/json/items/gun/9mm.json | 4 ++++ data/json/items/gun/9x18.json | 2 ++ data/json/items/gun/flintlock.json | 4 ++++ data/json/items/gun/shot.json | 3 +++ 10 files changed, 23 insertions(+) diff --git a/data/json/items/gun/223.json b/data/json/items/gun/223.json index 771f415719369..b4c0e5f3f6149 100644 --- a/data/json/items/gun/223.json +++ b/data/json/items/gun/223.json @@ -166,6 +166,7 @@ "volume": "3429 ml", "longest_side": "759 mm", "price": 2800000, + "price_postapoc": 2500, "to_hit": -1, "bashing": 12, "material": [ "steel", "plastic" ], @@ -212,6 +213,7 @@ "volume": "7986 ml", "longest_side": "740 mm", "price": 125000, + "price_postapoc": 2000, "to_hit": -1, "bashing": 12, "material": [ "steel", "plastic" ], diff --git a/data/json/items/gun/40.json b/data/json/items/gun/40.json index 7e4d55bd62f02..04e8f78af7ae4 100644 --- a/data/json/items/gun/40.json +++ b/data/json/items/gun/40.json @@ -10,6 +10,7 @@ "volume": "554 ml", "longest_side": "250 mm", "price": 65000, + "price_postapoc": 2000, "to_hit": -2, "bashing": 8, "material": [ "steel", "plastic" ], @@ -92,6 +93,7 @@ "volume": "520 ml", "longest_side": "231 mm", "price": 65000, + "price_postapoc": 2500, "to_hit": -2, "bashing": 8, "material": [ "plastic", "steel" ], diff --git a/data/json/items/gun/45.json b/data/json/items/gun/45.json index d8641b5121e8e..c5519811c56b1 100644 --- a/data/json/items/gun/45.json +++ b/data/json/items/gun/45.json @@ -374,6 +374,7 @@ "volume": "483 ml", "longest_side": "241 mm", "ammo": [ "45" ], + "price": 70000, "price_postapoc": 2500, "ranged_damage": { "damage_type": "bullet", "amount": 0 }, "built_in_mods": [ "match_trigger" ], @@ -397,6 +398,7 @@ "weight": "844 g", "volume": "698 ml", "longest_side": "277 mm", + "price": 70000, "price_postapoc": 3000, "default_mods": [ "suppressor", "laser_sight" ], "flags": [ "WATERPROOF_GUN", "NEVER_JAMS" ] diff --git a/data/json/items/gun/762.json b/data/json/items/gun/762.json index 37c4c921e139b..097e1f8fccbd4 100644 --- a/data/json/items/gun/762.json +++ b/data/json/items/gun/762.json @@ -145,6 +145,7 @@ "volume": "2167 ml", "longest_side": "87 cm", "price": 79500, + "price_postapoc": 3000, "to_hit": -1, "bashing": 12, "material": [ "steel", "wood" ], @@ -188,6 +189,7 @@ "volume": "1286 ml", "longest_side": "46 cm", "price": 72500, + "price_postapoc": 2500, "to_hit": -5, "bashing": 8, "material": [ "steel", "wood" ], diff --git a/data/json/items/gun/84x246mm.json b/data/json/items/gun/84x246mm.json index 6995b8585c63b..b47de19d3c5b9 100644 --- a/data/json/items/gun/84x246mm.json +++ b/data/json/items/gun/84x246mm.json @@ -61,6 +61,7 @@ "weight": "6803 g", "volume": "8670 ml", "longest_side": "1020 mm", + "price": 2000000, "price_postapoc": 6000, "bashing": 4, "dispersion": 200, diff --git a/data/json/items/gun/8x40mm.json b/data/json/items/gun/8x40mm.json index 9fd027a5c22a9..1058668545619 100644 --- a/data/json/items/gun/8x40mm.json +++ b/data/json/items/gun/8x40mm.json @@ -272,6 +272,7 @@ "volume": "2500 ml", "longest_side": "995 mm", "price": 900000, + "price_postapoc": 17500, "to_hit": -1, "bashing": 12, "material": [ "superalloy", "ceramic" ], diff --git a/data/json/items/gun/9mm.json b/data/json/items/gun/9mm.json index 86dd0a44fdc7b..4d33226a4804d 100644 --- a/data/json/items/gun/9mm.json +++ b/data/json/items/gun/9mm.json @@ -11,6 +11,7 @@ "volume": "554 ml", "longest_side": "250 mm", "price": 65000, + "price_postapoc": 2500, "to_hit": -2, "bashing": 8, "material": [ "steel", "plastic" ], @@ -469,6 +470,7 @@ "weight": "1070 g", "volume": "615 ml", "price": 90000, + "price_postapoc": 500, "pocket_data": [ { "magazine_well": "60 ml", @@ -537,6 +539,7 @@ "weight": "3722 g", "volume": "2020 ml", "price": 90000, + "price_postapoc": 1000, "modes": [ [ "DEFAULT", "semi-auto", 1 ] ], "valid_mod_locations": [ [ "accessories", 2 ], @@ -648,6 +651,7 @@ "volume": "520 ml", "longest_side": "231 mm", "price": 65000, + "price_postapoc": 2500, "to_hit": -2, "bashing": 8, "material": [ "plastic", "steel" ], diff --git a/data/json/items/gun/9x18.json b/data/json/items/gun/9x18.json index 35c763dc217be..3a5c3ea7c46b8 100644 --- a/data/json/items/gun/9x18.json +++ b/data/json/items/gun/9x18.json @@ -53,6 +53,8 @@ "//": "Total unloaded weight of gun 1451.496 grams, rounded to 1451. Current weight of folding stock 200 grams.", "description": "A version of the Skorpion submachine gun chambered in 9x18mm Makarov, with a slightly longer barrel than the original design.", "weight": "1440 g", + "price": 20000, + "price_postapoc": 2000, "ammo": [ "9x18" ], "min_cycle_recoil": 270, "modes": [ [ "DEFAULT", "semi-auto", 1 ], [ "AUTO", "auto", 5 ] ], diff --git a/data/json/items/gun/flintlock.json b/data/json/items/gun/flintlock.json index 7fa5068592ba0..94f998e13baca 100644 --- a/data/json/items/gun/flintlock.json +++ b/data/json/items/gun/flintlock.json @@ -4,6 +4,7 @@ "copy-from": "rifle_flintlock", "looks_like": "ar15", "type": "GUN", + "price": 40000, "price_postapoc": 2250, "name": { "str": "flintlock carbine" }, "description": "This short rifle design once dominated the battlefields of ancient Europe, and may yet re-earn its feared status due to its ease of handling and ability to use easily-crafted ammunition.", @@ -30,6 +31,7 @@ "name": { "str": "handmade double-barrel flintlock" }, "description": "This is a compact muzzle-loading rifle combining a pair of rudimentary flintlock actions and two barrels. Whereas an antique multiple-barrel flintlock is an intricate work of gunsmithing, this weapon is simpler yet still serviceable.", "clip_size": 2, + "price": 43000, "price_postapoc": 2750, "proportional": { "dispersion": 1.3, "weight": 1.25, "volume": 1.25 }, "relative": { "weight": "400 g", "range": -1, "ranged_damage": { "damage_type": "bullet", "amount": -2 } }, @@ -120,6 +122,8 @@ "weight": "3700 g", "volume": "1700 ml", "longest_side": "1278 mm", + "price": 42000, + "price_postapoc": 2500, "relative": { "range": 2 }, "proportional": { "dispersion": 0.5, "reload": 2.0 } } diff --git a/data/json/items/gun/shot.json b/data/json/items/gun/shot.json index eaeb7793c9fb0..0117031a354d3 100644 --- a/data/json/items/gun/shot.json +++ b/data/json/items/gun/shot.json @@ -177,6 +177,7 @@ "volume": "4495 ml", "longest_side": "971 mm", "price": 140000, + "price_postapoc": 4000, "to_hit": -1, "bashing": 9, "material": [ "steel", "plastic" ], @@ -289,6 +290,7 @@ "looks_like": "mossberg_500", "default_mods": [ "sights_mount", "underbarrel_mount" ], "price": 70000, + "price_postapoc": 2400, "barrel_volume": "0 ml", "clip_size": 9, "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "shot": 9 } } ] @@ -466,6 +468,7 @@ "clip_size": 7, "barrel_volume": "20 ml", "price": 33800, + "price_postapoc": 2750, "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "shot": 7 } } ] }, { From d61e0aaadf3466d4294c43196e1bf3f838161496 Mon Sep 17 00:00:00 2001 From: Hirmuolio <22011552+Hirmuolio@users.noreply.github.com> Date: Thu, 24 Dec 2020 02:15:18 +0200 Subject: [PATCH 25/47] Show debug info about rot and temperature on non foods (#46230) --- src/item.cpp | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/item.cpp b/src/item.cpp index acacabda87d5d..b8c510f222c3b 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -1671,40 +1671,39 @@ void item::debug_info( std::vector &info, const iteminfo_query *parts, imap.second ) ) ); } - const item *food = get_food(); const std::string space = " "; - if( food && food->goes_bad() ) { + if( goes_bad() ) { info.push_back( iteminfo( "BASE", _( "age (turns): " ), "", iteminfo::lower_is_better, - to_turns( food->age() ) ) ); + to_turns( age() ) ) ); info.push_back( iteminfo( "BASE", _( "rot (turns): " ), "", iteminfo::lower_is_better, - to_turns( food->rot ) ) ); + to_turns( rot ) ) ); info.push_back( iteminfo( "BASE", space + _( "max rot (turns): " ), "", iteminfo::lower_is_better, - to_turns( food->get_shelf_life() ) ) ); + to_turns( get_shelf_life() ) ) ); } - if( food && food->has_temperature() ) { + if( has_temperature() ) { info.push_back( iteminfo( "BASE", _( "last temp: " ), "", iteminfo::lower_is_better, - to_turn( food->last_temp_check ) ) ); + to_turn( last_temp_check ) ) ); info.push_back( iteminfo( "BASE", _( "Temp: " ), "", iteminfo::lower_is_better, - food->temperature ) ); + temperature ) ); info.push_back( iteminfo( "BASE", _( "Spec ener: " ), "", iteminfo::lower_is_better, - food->specific_energy ) ); + specific_energy ) ); info.push_back( iteminfo( "BASE", _( "Spec heat lq: " ), "", iteminfo::lower_is_better, - 1000 * food->get_specific_heat_liquid() ) ); + 1000 * get_specific_heat_liquid() ) ); info.push_back( iteminfo( "BASE", _( "Spec heat sld: " ), "", iteminfo::lower_is_better, - 1000 * food->get_specific_heat_solid() ) ); + 1000 * get_specific_heat_solid() ) ); info.push_back( iteminfo( "BASE", _( "latent heat: " ), "", iteminfo::lower_is_better, - food->get_latent_heat() ) ); + get_latent_heat() ) ); info.push_back( iteminfo( "BASE", _( "Freeze point: " ), "", iteminfo::lower_is_better, - food->get_freeze_point() ) ); + get_freeze_point() ) ); } } } From 81e292525e49414d538426f3679388f479872503 Mon Sep 17 00:00:00 2001 From: Serhiy Zahoriya Date: Thu, 24 Dec 2020 02:19:48 +0200 Subject: [PATCH 26/47] Tileset docs suggestions (#46229) by Fris0uman, xy and acepleiades Co-authored-by: ToxiClay Co-authored-by: actual-nh <74678550+actual-nh@users.noreply.github.com> --- doc/CHANGELOG_GUIDELINES.md | 2 +- doc/TILESET.md | 242 +++++++++++++++++++++++------------- 2 files changed, 158 insertions(+), 86 deletions(-) diff --git a/doc/CHANGELOG_GUIDELINES.md b/doc/CHANGELOG_GUIDELINES.md index 992635d305e10..b8af83394da8c 100644 --- a/doc/CHANGELOG_GUIDELINES.md +++ b/doc/CHANGELOG_GUIDELINES.md @@ -3,7 +3,7 @@ In the end, it's up to the author to decide where *they* want their change to be #### None -Please consider a summary of "SUMMARY: None" for minor additions and fixes. There are far too many changes made to the game to feature anything approaching all of them in the changelog. (Do not add any description in quotes - e.g., SUMMARY: None "whatever" - after a summary of "None".) +Please consider a summary of "SUMMARY: None" for minor additions, fixes, and documentation changes. There are far too many changes made to the game to feature anything approaching all of them in the changelog. (Do not add any description in quotes - e.g., SUMMARY: None "whatever" - after a summary of "None".) #### Features If it adds something new that the player can do, or that can happen to the player, it's a feature. These will generally be edits to the C++ code in the game, though new json entities may be involved as well. diff --git a/doc/TILESET.md b/doc/TILESET.md index f48c04a245a19..a6f69006a1d9b 100644 --- a/doc/TILESET.md +++ b/doc/TILESET.md @@ -1,141 +1,198 @@ # TILESETS -A tileset provides graphic images for the game. Each tileset has one or more tilesheets of image sprites and a `tile_config.json` file that describes how to map the contents of the sprite sheets to various entities in the game. It also has a `tileset.txt` file that provides metadata. -## Compositing Tilesets -Prior October 2019, tilesets had to be submitted to the repo with each tilesheet fully composited and the sprite indices in `tile_config.json` calculated by hand. After October 2019, tilesets can be submitted to repos as directories of individual sprite files and tile entry JSON files that used sprite file names, and a Python script that runs at compile time would merge the sprite images into tilesheets, convert the files names into sprite indices for the tile entries, and merge the tile entries into a `tile_config.json`. +## Terminology -For the rest of this document, tilesets that are submitted as fully composited tilesheets are called legacy tilesets, and tilesets that submitted as individual sprite image files are compositing tilesets. +##### Tileset +A package of images for the game. -### tools/gfx_tools/decompose.py -This is a Python script that will convert a legacy tileset into a compositing tileset. It reads the `tile_config.json` and assigns semi-arbitrary file names to each sprite index. Then it changes all the sprite indexes references to the file names. Then it breaks up `tile_config.json` into many small tile_entry JSON files with arbitrary file names, and pulls out each sprite and writes it to aseparate file. +##### Sprite +A single image that represents either an individual game entity or a common background -It requires pyvips to do the image processing. +##### Root name +File name without an extension. -It takes a single mandatory argument, which is the path to the tileset directory. For example: -`python3 tools/gfx_tools/decompose.py gfx/ChestHole16Tileset` will convert the legacy ChestHole16 tileset to a compositing tileset. +##### Tile +A unit square in the game world with certain coordinates, where entities can exist and on which sprites are drawn. Sometimes used (incorrectly) in place of "sprite". -decompose.py creates a sufficient directory hierarchy and file names for a tileset to be compositing, but it is machine generated and badly organized. New compositing tilesets should use more sensible file names and a better organization. +##### Tilesheet +A collection of sprites with identical sizes and offsets composited into one image file that the game will read. -It shouldn't be necessary to run decompose.py very often. Legacy tilesets should only need to be converted to composite tilesets one time. +##### `tile_config.json` file +Machine-readable description mapping the contents of tilesheets to game entities. -### tools/gfx_tools/compose.py -This is a Python script that creates the tilesheets for a compositing tileset. It reads all of the directories in a tileset's directory with names that start with `pngs_` for sprite files and `tile_entry` JSON files, creates mappings of sprite file names to indices, merges the sprite files into tilesheets, changes all of the sprite file name references in the `tile_entries` to indices, and merges the `tile_entries` into a `tile_config.json`. +##### `tileset.txt` file +A collection of tileset metadata. -Like decompose.py, it requires pyvips to the image processing. +##### Tile entry +JSON configuration object that describes which sprites are used for which game entities and how. -The original sprite files and `tile_entry` JSON files are preserved. +##### Compositing Tileset +A tileset that is stored as directories of individual sprites and tile entries. -### directory structure -Each compositing tileset has one or more directories in it with a name that starts with `pngs_`, such as `pngs_tree_32x40` or `pngs_overlay`. These are the image directories. All of the sprites in an image directory must have the same height and width and will be merged into a single tilesheet. +##### `compose.py` script +Converts a compositing tileset into package suitable for the game: a set of tilesheets and the `tile_config.json`. -It is recommended that tileset developers include the sprite dimensions in the image directory name, but this is not required. `pngs_overlay_24x24` is preferred over `pngs_overlay` but both are allowed. As each image directory creates its own tilesheet, and tilesheets should be as large as possible for performance reasons, tileset developers are strongly encouraged to minimize the number of image directories. +##### Tilesheet directory +Compositing tileset subdirectory containing sprites and tile entries. -Each image directory contains a hierarchy of subdirectories, `tile_entry` JSON files, and sprite files. There is no restriction on the arrangement or names of these files, except for `tile_entry` JSON files for expansion tilesheets must be at the top level of the image directory. Subdirectories are not required but are recommended to keep things manageable. +##### `tile_info.json` file -### Installing pyvips on windows +Describes tilesheet directories for `compose.py` -- Download python https://www.python.org/downloads/ -- Add it to path -- Download libvips https://libvips.github.io/libvips/install.html -- Add it to path -- `Windows key + r` to open RUN dialogue box -- type `cmd` to get the console -- run: `pip install --user pyvips` -- run: `py -m pip install --upgrade pip` +## JSON Schema -#### `tile_entry` JSON -Each `tile_entry` JSON is a dictionary that describes how to map one or more game entities to one or more sprites. The simplest version has a single game entity, a single foreground sprite, an *optional* background sprite, and a rotation value. For instance: +### tile entry ```C++ -{ // this is an object and doesn't require a list - "id": "mon_cat", // the game entity represented by this sprite - "fg": "mon_cat_black", // some sprite name - "bg": "shadow_bg_1", // some sprite name; always a single value - "rotates": false // true for things that rotate like vehicle parts +{ // The simplest version + "id": "mon_cat", // a game entity ID + "fg": "mon_cat_black", // a sprite root name that will be put on foreground + "bg": "shadow_bg_1" // another sprite root name that will be the background; can be empty for no background } ``` -The values in `"id"`, `"fg"`, and `"bg"` can be repeated within an image directory or in different image directories. `"fg"` and `"bg"` sprite images can be referenced across image directories, but the sprites must be stored in an image directory with other sprites of the same height and width. +Sprites can be referenced across tilesheet directories, but they must be stored in a tilesheet directory with their size and offset. + +`"id"` can be an array of multiple game entity IDs sharing the same sprite configuration, like `"id": ["vp_door", "vp_hddoor"]`. `"id"` game values that are used as-is include terrain, furniture, items (except corpses), monsters, fields, traps. + +#### Hardcoded IDs + +The special ID `"unknown"` provides a sprite that is displayed when an entity has no other sprite. Other hardcoded IDs also exist, and most of them are referenced in [`src/cata_tiles.cpp`](/src/cata_tiles.cpp). A full list of hardcoded IDs _may_ be present in [`tools/json_tools/generate_overlay_ids.py`](/tools/json_tools/generate_overlay_ids.py) stored as `CPP_IDS` but it's updated manually and may lag behind. + +#### Complex IDs + +Special prefixes that are used include: + +`overlay_effect_` for effects. + +`overlay_mutation_` for both mutations and bionics; can include `active_` at the start. + +`overlay_worn_` and `overlay_wielded_` for items being worn or wielded by the PC or an NPC. + +`corpse_` for corpses. + +`overlay_` for movement modes. -`"id"` can also be a list of multiple game entities sharing the same sprite, like `"id": ["vp_door"], ["vp_hddoor"]`. `"id"` can be any vehicle part, terrain, furniture, item, or monster in the game. The special ids `"player_female", "player_male", "npc_female", "npc_male"` are used to identify the sprites for the player avatar and NPCs. The special id `"unknown"` provides a sprite that is displayed when an entity has no other sprite. +`vp_` for vehicle parts (see also [`symbols` and `standard_symbols` JSON keys](JSON_INFO.md#symbols-and-variants)) that are used as suffixes. -The special suffixes `_season_spring`, `_season_summer`, `_season_autumn`, and `_season_winter` can be applied to any entity id to create a seasonal variant for that entity that will be displayed in the appropriate season like this `"id": "mon_wolf_season_winter"`. +All prefixes that start with `overlay_` can have a `_female` or `_male` gender part added: `overlay_female_` or `overlay_male_`. The decision to use them is up to sprite authors. -The special prefixes `overlay_mutation_`, `overlay_female_mutation_`, `overlay_male_mutation_` can prefix any trait or bionic in the game to specify an overlay image that will be laid over the player and NPC sprites to indicate they have that mutation or bionic. +Special suffixes `_season_spring`, `_season_summer`, `_season_autumn`, and `_season_winter` can be added to any entity ID to create a seasonal variant for that entity that will be displayed in the appropriate season, for example `"id": "mon_wolf_season_winter"`. -The special prefixes `overlay_worn_`, `overlay_female_worn_`, `overlay_male_worn_` can prefix any item in the game to specify an overlay image that will be laid over the player and NPC sprites to indicate they are wearing that item. +#### Rotations -The special prefixes `overlay_wielded_`, `overlay_female_wielded_`, `overlay_male_wielded_` can prefix any item in the game to specify an overlay image that will be laid over the player and NPC sprites to indicate they are holding that item. +You can add `"rotates": true` to allow sprites to be rotated by the game automatically. Alternatively, `"fg"` and `"bg"` can be an array of 2 or 4 pre-rotated variants, like `"fg": ["mon_dog_left", "mon_dog_right"]` or `"bg": ["t_wall_n", "t_wall_e", "t_wall_s", "t_wall_w"]`. -`"fg"` and `"bg"` can also be a list of 2 or 4 pre-rotated rotational variants, like `"bg": ["t_wall_n", "t_wall_e", "t_wall_s", "t_wall_w"]` or `"fg": ["mon_dog_left", "mon_dog_right"]`. +#### Random variations -`"fg"` and `"bg"` can also be a list of dictionaries of weighted, randomly chosen options, any of which can also be a rotated list: +`"fg"` and `"bg"` can also be an array of objects of weighted, randomly chosen options, any of which can also be an array of rotations: ```C++ "fg": [ - { "weight": 50, "sprite": "t_dirt_brown"}, // appears in 50 of 53 tiles - { "weight": 1, "sprite": "t_dirt_black_specks"}, // appears 1 in 53 tiles + { "weight": 50, "sprite": "t_dirt_brown"}, // appears approximately 50 times in 53 tiles + { "weight": 1, "sprite": "t_dirt_black_specks"}, // appears 1 time in 53 tiles { "weight": 1, "sprite": "t_dirt_specks_gray"}, - { "weight": 1, "sprite": "t_patchy_grass"} // file names are arbitrary + { "weight": 1, "sprite": "t_patchy_grass"} // file names are arbitrary, but see `--use-all` option ], ``` -`"multitle"` is an *optional* field. If it is present and `true`, there must be an `additional_tiles` list with 1 or more dictionaries for entities and sprites associated with this tile, such as broken versions of an item or wall connections. Each dictionary in the list has an `"id`" field, as above, and a `"fg"` field, which can be a single filename, a list of filenames, or a list of dictionaries as above. +#### Multitile -Each `tile_entry.json` file can have a single object in it, or a list of 1 or more objects like so: +`"multitile": true` signifies that there is an `additional_tiles` object (redundant? [probably](https://github.com/CleverRaven/Cataclysm-DDA/issues/46253)) with one or more objects that define sprites for game entities associated with this tile, such as broken versions of an item, or wall connections. Each object in the array has an `"id`" field, as above, and an `"fg"` field, which can be a single [root name](#root-name), an array of root names, or an array of objects as above. `"rotates": true` is implied with it and can be omitted. + +#### Multiple tile entries in the same file + +Each JSON file can have either a single object or an array of one or more objects: ```C++ [ - { "id": "mon_zombie", "fg": "mon_zombie", "bg": "mon_zombie_bg", "rotates": false }, - { "id": "corpse_mon_zombie", "fg": "mon_zombie_corpse", "bg": "mon_zombie_bg", "rotates": false }, - { "id": "overlay_wielding_corse_mon_zombie", "fg": "wielded_mon_zombie_corpse", "bg": [], "rotates": false } + { "id": "mon_zombie", "fg": "mon_zombie", "bg": "mon_zombie_bg" }, + { "id": "corpse_mon_zombie", "fg": "mon_zombie_corpse", "bg": "mon_zombie_bg" }, + { "id": "overlay_wielding_corse_mon_zombie", "fg": "wielded_mon_zombie_corpse", "bg": "" } ] ``` -Having a list of tile entries in a file may be useful for organization, but completely unrelated entries may all exist in the same file without any complications. - -#### expansion `tile_entry` JSON -Tilesheets can have expansion tilesheets, which are tilesheets from mods. Each expansion tilesheet is a single `"id"` value, `"rotates": false"`, and `"fg": 0`. Expansion `tile_entry` JSON are the only `tile_entry` JSONs that use an integer value for `"fg"` and that value must be 0. Expansion `tile_entry` JSONs must be located at the top layer of each image directory. - -#### Sprite Images -Every sprite inside an image directory must have the same height and width as every other sprite in the image directory. - -Sprites can be organized into subdirectories within the image directory however the tileset developer prefers. Sprite filenames are completely arbitrary and should be chosen using a scheme that makes sense to the tileset developer. - -After loading a tileset, config/debug.log will contain a space separated list of every entity missing a sprite in the tileset. Entities that have sprites because of a `"looks_like"` definition will not show up in the list. - ### `tile_info.json` -Each compositing tileset *must* have a `tile_info.json`, laid out like so: ``` [ { "width": 32, - "pixelscale": 1, - "height": 32 - }, - { - "1_tiles_32x32_0-5199.png": {} - }, - { - "2_expan_32x32_5200-5391.png": {} - }, - { - "3_tree_64x80_5392-5471.png": { - "sprite_offset_x": -16, - "sprite_offset_y": -48, + "height": 32, + "pixelscale": 1 + }, { + "tiles.png": {} + }, { + "expan.png": {} + }, { + "tree.png": { + "sprite_width": 64, "sprite_height": 80, - "sprite_width": 64 + "sprite_offset_x": -16, + "sprite_offset_y": -48 + } + }, { + "fillerhoder.png": { + "source": "https://github.com/CleverRaven/Cataclysm-DDA/tree/b2d1f9f6cf6fae9c5076d29f9779e0ca6c03c222/gfx/HoderTileset", + "filler": true + } + }, { + "fallback.png": { + "fallback": true } - }, - { - "4_fallback_5472-9567.png": { "fallback": true } } ] ``` -The first dictionary is mandatory, and gives the default sprite width and sprite height for all tilesheets in the tileset. Each of the image directories must have a separate dictionary, containing the tilesheet png name as its key. If the tilesheet has the default sprite dimensions and no special offsets, it can have an empty dictionary as the value for the tilesheet name key. Otherwise, it should have a dictionary of the sprite offsets, height, and width. -A special key is `"fallback"` which should be `true` if present. If a tilesheet is designated as fallback, it will be treated as a tilesheet of fallback ASCII characters. `compose.py` will also compose the fallback tilesheet to the end of the tileset, and will add a "fallback.png" to `tile_config.json` if there is no `"fallback"` entry in `tile_info.json`. +The first object defines the default sprite size. + +Each tilesheet directory must have a corresponding object with a single key, which will become the tilesheet output filename. An empty object as the value here means that the tilesheet uses the default sprite size and has no offsets. It can have overriding values under `sprite_width`, `sprite_height`, `sprite_offset_x`, `sprite_offset_y` keys. + +Tilesheet directory names are expected to use the following format: `pngs_{tilesheet_root_name}_{sprite_width}x{sprite_height}` - such as `pngs_tiles_32x32`, `pngs_expan_32x32`, `pngs_tree_64x80`, etc. To improve performance, keep the number of separate directories to a minimum. + +`"filler": true` means the tilesheet is a filler; tile entries within it will be used only if IDs in them were not mentioned in any preceding tile entry. Sprites within a filler directory will be ignored if another one with the same name was already encountered. A filler tilesheet is useful when upgrading the art in a tileset: old, low-quality art can be placed on filler tilesheet and will be automatically replaced as better images are added to the non-filler tilesheets. + +`"fallback": true` means the tilesheet is a fallback; it will be treated as a source of fallback ASCII character sprites. `compose.py` will also append the fallback tilesheet to the end of the tileset, and will add a "fallback.png" to `tile_config.json` if there is no `"fallback"` entry in `tile_info.json`. + +You can add other keys like `source` but they should be ignored by `compose.py` and are meant as comments only. + +### Expansion tile entries + +A tilesheet can be an expansion from a mod. Each expansion tilesheet is a single `"id"` value, where the `"rotates": false"`, and `"fg": 0` keys are set. Expansion tile entry JSONs are the only tile entry JSONs that may use an integer value for `"fg"`, and that value must be 0. Expansion tile entry JSONs must be located at the top layer of each tilesheet directory. + +## `compose.py` + +[`tools/gfx_tools/compose.py`](/tools/gfx_tools/compose.py) + +### Usage + +`compose.py [-h] [--use-all] source_dir [output_dir]` + +`source_dir` - the composing tileset directory. + +`output_dir` will be set to the `source_dir` unless provided separately. Expected to have `tileset.txt` and `fallback.png`. + +`--use-all` instead of warning about unused sprites, will treat their [root name](#root-name) as the `"id"` value to use them as `"fg"` for. In other words, just naming your sprite `overlay_wielded_spear_survivor.png` will imply this tile entry: +```JSON +{ + "id": "overlay_wielded_spear_survivor", + "fg": "overlay_wielded_spear_survivor", + "bg": "" +} +``` + +Requires `pyvips` module. -A special is `"filler"` which should be `true` if present. If a tilesheet is designated as filler, entries from its directory will be ignored if an entry from a non-filler directory has already defined the same id. Entries will also be ignored if the id was already defined by in the filler directory. Also, pngs from a filler directory will be ignored if they share a name with a png from a non-filler directory. A filler tilesheet is useful when upgrading the art in a tileset: old, low-quality art can be placed on filler tilesheet and will be automatically replaced as better images are added to the non-filler tilesheets. +### Installing pyvips on Windows + +- Download Python https://www.python.org/downloads/ +- Download `libvips` https://libvips.github.io/libvips/install.html +- Add both to your `PATH` environment variable +- Press `Windows key + r` to open the "Run" dialog box +- type `cmd` to get the console +- run: `pip install --user pyvips` +- run: `py -m pip install --upgrade pip` ## Legacy tilesets + +Prior to October 2019, when `compose.py` was made, sprite indices in `tile_config.json` had to be calculated by hand. Following is a description for them. + ### tilesheets Each tilesheet contains 1 or more sprites with the same width and height. Each tilesheet contains one or more rows of exactly 16 sprites. Sprite index 0 is special and the first sprite of the first tilesheet in a tileset should be blank. Indices run sequentially through each sheet and continue incrementing for each new sheet without resetting, so index 32 is the first sprite in the third row of the first sheet. If the first sheet has 320 sprites in it, index 352 would be the first sprite of the third row of the second sheet. @@ -157,7 +214,7 @@ Each legacy tileset has a `tile_config.json` describing how to map the contents "file": "tiles.png", // file containing sprites in a grid "tiles": [ // array with one entry per tile { - "id": "10mm", // id is how the game maps things to sprites + "id": "10mm", // ID is how the game maps things to sprites "fg": 1, // lack of prefix mostly indicates items "bg": 632, // fg and bg can be sprite indexes in the image "rotates": false @@ -251,3 +308,18 @@ Each legacy tileset has a `tile_config.json` describing how to map the contents ] } ``` + +### decompose.py + +[`tools/gfx_tools/decompose.py`](/tools/gfx_tools/decompose.py) + +This is a Python script that will convert a legacy tileset into a compositing tileset. It reads the `tile_config.json` and assigns semi-arbitrary file names to each sprite index. Then it changes all sprite index references to file names, breaks up `tile_config.json` into many small tile entry JSON files with arbitrary file names, and writes each sprite into a separate file. + +It requires the `pyvips` module to perform the image processing. + +It takes a single mandatory argument, which is the path to the tileset directory. For example: +`python3 tools/gfx_tools/decompose.py gfx/ChestHole16Tileset` will convert the legacy ChestHole16 tileset to a compositing tileset. + +decompose.py creates a sufficient directory hierarchy and file names for a tileset to be compositing, but it is machine-generated and will be badly organized. New compositing tilesets should use more sensible file names and a better organization. + +It shouldn't be necessary to run decompose.py very often. Legacy tilesets should only need to be converted to composite tilesets one time. From 557471f69695528d9f3e74ae093507cae63eee55 Mon Sep 17 00:00:00 2001 From: NorseFTX <55260779+NorseFTX@users.noreply.github.com> Date: Wed, 23 Dec 2020 16:33:06 -0800 Subject: [PATCH 27/47] Inventory view update: Show perishable consumables in a separate color (#46204) * Inventory view update: Show perishable consumables in a separate color --- src/item.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/item.cpp b/src/item.cpp index b8c510f222c3b..895a827ffb7df 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -4215,13 +4215,24 @@ nc_color item::color_in_inventory() const // Dark gray: inedible // Red: morale penalty // Yellow: will rot soon - // Cyan: will rot eventually + // Cyan: edible + // Light Cyan: will rot eventually const ret_val rating = player_character.will_eat( *food ); // TODO: More colors switch( rating.value() ) { case EDIBLE: case TOO_FULL: ret = c_cyan; + + // Show old items as yellow + if( food->is_going_bad() ) { + ret = c_yellow; + } + // Show perishables as a separate color + else if( food->goes_bad() ) { + ret = c_light_cyan; + } + break; case INEDIBLE: case INEDIBLE_MUTATION: From 62385f7afeb3c062d579988cbd03b214bed73110 Mon Sep 17 00:00:00 2001 From: Fris0uman <41293484+Fris0uman@users.noreply.github.com> Date: Thu, 24 Dec 2020 01:34:09 +0100 Subject: [PATCH 28/47] Obsolote toolbox_workshop recipe (#46183) --- data/json/recipes/recipe_obsolete.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data/json/recipes/recipe_obsolete.json b/data/json/recipes/recipe_obsolete.json index 2589d959b5cf7..af363b05dae28 100644 --- a/data/json/recipes/recipe_obsolete.json +++ b/data/json/recipes/recipe_obsolete.json @@ -19,6 +19,11 @@ "result": "arrow_metal_target", "obsolete": true }, + { + "type": "recipe", + "result": "toolbox_workshop", + "obsolete": true + }, { "type": "recipe", "result": "arrow_metal", From 49542f41c9dece54843dfb5807218efab4f89378 Mon Sep 17 00:00:00 2001 From: Eric <52087122+Ramza13@users.noreply.github.com> Date: Wed, 23 Dec 2020 19:35:41 -0500 Subject: [PATCH 29/47] Only show message on actually unloading (#46263) --- src/activity_actor.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/activity_actor.cpp b/src/activity_actor.cpp index 552827a091e75..2477afd7c21c3 100644 --- a/src/activity_actor.cpp +++ b/src/activity_actor.cpp @@ -1511,6 +1511,7 @@ void unload_activity_actor::unload( Character &who, item_location &target ) { int qty = 0; item &it = *target.get_item(); + bool actually_unloaded = false; if( it.is_container() ) { @@ -1542,21 +1543,27 @@ void unload_activity_actor::unload( Character &who, item_location &target ) if( who.as_player()->add_or_drop_with_msg( *contained, true ) ) { qty += contained->charges; remove_contained.push_back( contained ); + actually_unloaded = true; } } // remove the ammo leads in the belt for( item *remove : remove_contained ) { it.remove_item( *remove ); + actually_unloaded = true; } // remove the belt linkage if( it.is_ammo_belt() ) { if( it.type->magazine->linkage ) { item link( *it.type->magazine->linkage, calendar::turn, qty ); - who.as_player()->add_or_drop_with_msg( link, true ); + if( who.as_player()->add_or_drop_with_msg( link, true ) ) { + actually_unloaded = true; + } } - who.add_msg_if_player( _( "You disassemble your %s." ), it.tname() ); - } else { + if( actually_unloaded ) { + who.add_msg_if_player( _( "You disassemble your %s." ), it.tname() ); + } + } else if( actually_unloaded ) { who.add_msg_if_player( _( "You unload your %s." ), it.tname() ); } From 0cc163e572e58009f14ba94afbba47d4506a59f9 Mon Sep 17 00:00:00 2001 From: ToxiClay Date: Wed, 23 Dec 2020 19:58:56 -0500 Subject: [PATCH 30/47] Various fixes to sword JSON (#46239) --- data/json/items/melee/swords_and_blades.json | 58 ++++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/data/json/items/melee/swords_and_blades.json b/data/json/items/melee/swords_and_blades.json index af1bf5ff31f26..53cbf1f5b42a1 100644 --- a/data/json/items/melee/swords_and_blades.json +++ b/data/json/items/melee/swords_and_blades.json @@ -5,7 +5,7 @@ "symbol": "!", "color": "brown", "name": { "str": "2-by-sword" }, - "description": "A two by four with a cross guard and whittled down point; not much for slashing, but much better than your bare hands.", + "description": "A two by four with a crossguard and whittled-down point; not much for slashing, but much better than your bare hands.", "material": [ "wood" ], "volume": "1250 ml", "weight": "1000 g", @@ -58,7 +58,7 @@ "type": "TOOL", "category": "weapons", "name": { "str": "switchblade" }, - "description": "This is a long and thin knife with a spring-loaded blade that rests inside the handle while not in use.", + "description": "This is a long, thin knife with a spring-loaded blade that rests inside the handle while not in use.", "weight": "100 g", "volume": "50 ml", "longest_side": "15 cm", @@ -180,7 +180,7 @@ "type": "TOOL", "category": "weapons", "name": { "str": "RM42 fighting knife", "str_pl": "RM42 fighting knives" }, - "description": "This sturdy matte black Rivtech combat dagger features a long and slim double-edged blade with a spear-point and a distinctive slip-resistant grip which can also be used to affix it to a suitable firearm. Originally manufactured for the military, it was very popular in films and among collectors due to its fearsome appearance.", + "description": "This sturdy, matte black Rivtech combat dagger features a long, slim double-edged blade with a spear point and a distinctive slip-resistant grip, which can also be used to affix it to a suitable firearm as a bayonet. Originally manufactured for the military, it was very popular in films and among collectors due to its fearsome appearance.", "weight": "188 g", "volume": "750 ml", "longest_side": "30 cm", @@ -246,7 +246,7 @@ "id": "makeshift_knife", "type": "TOOL", "name": { "str": "makeshift knife", "str_pl": "makeshift knives" }, - "description": "A knife consisting of a long, somewhat sharpened, spike and a tightly wrapped rag as a handle. It makes a good melee weapon.", + "description": "A knife consisting of a long, somewhat sharpened spike and a tightly-wrapped rag as a handle. It makes a good melee weapon.", "weight": "575 g", "volume": "260 ml", "longest_side": "7 cm", @@ -343,7 +343,7 @@ "id": "machete_gimmick", "name": { "str": "machete multitool" }, "type": "TOOL", - "description": "A thin, wobbly steel blade with sawteeth on one side and a flat chisel tip for digging. A jack of many trades and a master of none.", + "description": "A thin, wobbly steel blade with sawteeth on one side and a flat chisel tip for digging. A jack of many trades, and a master of none.", "longest_side": "50 cm", "symbol": "/", "color": "green", @@ -363,7 +363,7 @@ "type": "TOOL", "category": "weapons", "name": { "str": "cavalry saber" }, - "description": "This is a curved sword associated with cavalry from the Early Modern period onwards. Lightweight but a deadly slashing weapon.", + "description": "This is a curved sword associated with cavalry from the Early Modern period onwards. Lightweight, but a deadly slashing weapon.", "weight": "910 g", "volume": "1250 ml", "longest_side": "100 cm", @@ -405,7 +405,7 @@ "type": "TOOL", "category": "weapons", "name": { "str": "kukri" }, - "description": "This versatile implement is a modern take on a traditional weapon that originated in Nepal. Featuring a heavy blade with an inwardly curved edge, it is used as both a tool and as a weapon.", + "description": "This versatile implement is a modern take on a traditional weapon that originated in Nepal. Featuring a heavy blade with an inwardly-curved edge, it can be used as both a tool and a weapon.", "weight": "450 g", "volume": "750 ml", "longest_side": "50 cm", @@ -468,7 +468,7 @@ "symbol": "/", "color": "light_gray", "name": { "str_sp": "jian" }, - "description": "This is a dull, cheaply made replica of an ancient Chinese doubled-edged straight sword, with an ornate guard.", + "description": "This is a dull, cheaply-made replica of an ancient Chinese doubled-edged straight sword, with an ornate guard.", "price": 10000, "price_postapoc": 50, "material": [ "aluminum" ], @@ -529,7 +529,7 @@ "symbol": "/", "color": "light_gray", "name": { "str": "scimitar" }, - "description": "This is a dull, cheaply made replica of a curved sword, associated with various Middle Eastern and Central Asian countries.", + "description": "This is a dull, cheaply-made replica of a curved sword, associated with various Middle Eastern and Central Asian countries.", "price": 9300, "price_postapoc": 50, "material": [ "aluminum" ], @@ -693,7 +693,7 @@ "color": "light_gray", "looks_like": "arming_sword", "name": { "str": "arming sword" }, - "description": "This is a dull, cheaply made replica of a classic medieval sword, just the right size to use one-handed.", + "description": "This is a dull, cheaply-made replica of a classic medieval sword, just the right size to use one-handed.", "price": 10000, "price_postapoc": 50, "material": [ "aluminum" ], @@ -957,7 +957,7 @@ "type": "GENERIC", "category": "weapons", "name": { "str": "tanto" }, - "description": "This is a dull, cheaply made replica of a long Japanese knife, typically used as a samurai's backup weapon.", + "description": "This is a dull, cheaply-made replica of a long Japanese knife, typically used as a samurai's backup weapon.", "weight": "374 g", "volume": "500 ml", "longest_side": "50 cm", @@ -979,7 +979,7 @@ "type": "GENERIC", "category": "weapons", "name": { "str": "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", + "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.", "weight": "3 g", "volume": "500 ml", "longest_side": "50 cm", @@ -1022,7 +1022,7 @@ "symbol": "/", "color": "light_gray", "name": { "str_sp": "nodachi" }, - "description": "This is a dull, cheaply made replica of a huge, curved, two-handed sword from Japan. It is surprisingly light for its size.", + "description": "This is a dull, cheaply-made replica of a huge, curved, two-handed sword from Japan. It is surprisingly light for its size.", "price": 15000, "price_postapoc": 250, "material": [ "aluminum" ], @@ -1116,7 +1116,7 @@ "copy-from": "fencing_foil", "looks_like": "fencing_foil", "name": { "str": "sharpened foil" }, - "description": "This once mostly harmless fencing foil has had its electrical plunger assembly removed and has been crudely sharpened to a point. Though it still lacks a cutting edge, it is now somewhat more lethal, yet still familiar to the practiced fencer.", + "description": "What was once a mostly-harmless fencing foil has had its electrical plunger assembly removed and has been crudely sharpened to a point. Though it still lacks a cutting edge, it is now somewhat more lethal, yet still familiar to the practiced fencer.", "relative": { "weight": "-25 g", "cutting": 2 } }, { @@ -1125,7 +1125,7 @@ "copy-from": "fencing_epee", "looks_like": "fencing_epee", "name": { "str": "sharpened épée" }, - "description": "This once mostly harmless fencing épée has had its electrical plunger assembly removed and has been crudely sharpened to a point. Though it still lacks a cutting edge, it is now considerably more lethal, yet still familiar to the practiced fencer.", + "description": "What was once a mostly-harmless fencing épée has had its electrical plunger assembly removed and has been crudely sharpened to a point. Though it still lacks a cutting edge, it is now considerably more lethal, yet still familiar to the practiced fencer.", "relative": { "weight": "-35 g", "cutting": 5 } }, { @@ -1134,7 +1134,7 @@ "copy-from": "fencing_sabre", "looks_like": "fencing_sabre", "name": { "str": "sharpened saber" }, - "description": "This once mostly harmless fencing saber has had its rounded tip snapped off and has been crudely sharpened to a point. Though it still lacks a cutting edge, it is now considerably more lethal, yet still familiar to the practiced fencer.", + "description": "What was once a mostly-harmless fencing saber has had its rounded tip snapped off and has been crudely sharpened to a point. Though it still lacks a cutting edge, it is now considerably more lethal, yet still familiar to the practiced fencer.", "relative": { "weight": "-10 g", "cutting": 5 } }, { @@ -1214,7 +1214,7 @@ "symbol": "/", "color": "brown", "name": { "str": "hollow cane" }, - "description": "A cane designed to conceal blade. This was a popular fashion accessory for the wealthy during the 18th and 19th centuries.", + "description": "A cane designed to conceal a blade. This was a popular fashion accessory for the wealthy during the 18th and 19th centuries.", "price": 2000, "price_postapoc": 750, "material": [ "wood" ], @@ -1259,7 +1259,7 @@ "type": "TOOL", "category": "weapons", "name": { "str": "broadsword" }, - "description": "This is an early modern sword seeing use in the 16th, 17th, and 18th centuries. Called 'broad' to contrast with the slimmer rapiers.", + "description": "This is an early modern sword that saw use in the 16th, 17th, and 18th centuries. Called 'broad' to contrast with the slimmer rapiers.", "weight": "1133 g", "volume": "1750 ml", "longest_side": "100 cm", @@ -1281,7 +1281,7 @@ "symbol": "/", "color": "light_gray", "name": { "str": "broadsword" }, - "description": "This is an early modern sword seeing use in the 16th, 17th, and 18th centuries. This sword appears to be made very poorly, but it should still stand up to a few swings.", + "description": "This is an early modern sword that saw use in the 16th, 17th, and 18th centuries. This sword appears to be made very poorly, but it should still stand up to a few swings.", "price": 120000, "price_postapoc": 750, "material": [ "budget_steel" ], @@ -1302,7 +1302,7 @@ "symbol": "/", "color": "dark_gray", "name": { "str": "cutlass", "str_pl": "cutlasses" }, - "description": "This is a dull, cheaply made replica of a broad saber known for its use by sailors and pirates.", + "description": "This is a dull, cheaply-made replica of a broad saber known for its use by sailors and pirates.", "price": 9600, "price_postapoc": 50, "material": [ "aluminum" ], @@ -1385,7 +1385,7 @@ "symbol": "/", "color": "light_gray", "name": { "str": "katana" }, - "description": "This is a dull, cheaply made replica of a rare sword from Japan.", + "description": "This is a dull, cheaply-made replica of a rare sword from Japan.", "price": 5000, "price_postapoc": 50, "material": [ "aluminum" ], @@ -1428,7 +1428,7 @@ "symbol": "/", "color": "light_gray", "name": { "str": "zweihänder" }, - "description": "This is a dull, cheaply made replica of a huge two-handed sword from Germany. It still packs a wallop.", + "description": "This is a dull, cheaply-made replica of a huge two-handed sword from Germany. It still packs a wallop.", "price": 8000, "price_postapoc": 50, "material": [ "aluminum" ], @@ -1469,7 +1469,7 @@ "symbol": "/", "color": "light_gray", "name": { "str": "broadsword" }, - "description": "This is a dull, cheaply made replica of an early modern sword seeing use in the 16th, 17th, and 18th centuries. Called 'broad' to contrast with the slimmer rapiers.", + "description": "This is a dull, cheaply-made replica of an early modern sword that saw use in the 16th, 17th, and 18th centuries. Called 'broad' to contrast with the slimmer rapiers.", "price": 12000, "price_postapoc": 50, "material": [ "aluminum" ], @@ -1488,7 +1488,7 @@ "type": "GENERIC", "category": "weapons", "name": { "str": "cavalry saber" }, - "description": "This is a dull, cheap replica of a curved sword associated with cavalry, from the Early Modern period onwards.", + "description": "This is a dull, cheaply-made replica of a curved sword associated with cavalry, from the Early Modern period onwards.", "weight": "600 g", "volume": "1250 ml", "longest_side": "90 cm", @@ -1509,7 +1509,7 @@ "symbol": "/", "color": "light_gray", "name": { "str": "rapier" }, - "description": "This is a blunted, cheap replica of a thin sword with an ornate hand guard. It looks like the preferred weapon of gentlemen and swashbucklers. Light and quick, it makes any battle a stylish battle.", + "description": "This is a blunted, cheap replica of a thin sword with an ornate handguard. It looks like the preferred weapon of gentlemen and swashbucklers. Light and quick, it makes any battle a stylish battle.", "price": 9800, "price_postapoc": 50, "material": [ "aluminum" ], @@ -1549,7 +1549,7 @@ "symbol": "/", "color": "light_gray", "name": { "str_sp": "wakizashi" }, - "description": "This is a comparatively-common Japanese short sword. There's something not quite right about this sword.", + "description": "This is a comparatively common Japanese short sword. There's something not quite right about this sword.", "price": 17800, "price_postapoc": 500, "material": [ "budget_steel" ], @@ -1588,7 +1588,7 @@ "symbol": "/", "color": "light_gray", "name": { "str": "pair of butterfly swords", "str_pl": "pairs of butterfly swords" }, - "description": "This is a matched pair of traditional Shaolin butterfly swords. They are about the size of machetes but have hand guards and wider blades.", + "description": "This is a matched pair of traditional Shaolin butterfly swords. They are about the same size as machetes, but have hand guards and wider blades.", "//": "basically 2x the weight, 1.3x the damage, 2.5x the resources of a single machete to cover the fact that it's two weapons, each with a hand guard", "price": 50000, "price_postapoc": 6000, @@ -1736,7 +1736,7 @@ "type": "TOOL", "category": "weapons", "name": { "str": "combat chainsaw (off)", "str_pl": "combat chainsaws (off)" }, - "description": "This is a chainsaw that has been lightened, tuned, and extensively modified to be a more effective weapon. Unfortunately these modifications have rendered it much less effective as a woodcutting tool.", + "description": "This is a chainsaw that has been lightened, tuned, and extensively modified to be a more effective weapon. Unfortunately, these modifications have rendered it much less effective as a woodcutting tool.", "weight": "5122 g", "volume": "2250 ml", "longest_side": "70 cm", @@ -1774,7 +1774,7 @@ "type": "TOOL", "category": "weapons", "name": { "str": "electric combat chainsaw (off)", "str_pl": "electric combat chainsaws (off)" }, - "description": "This is an electric chainsaw that has been lightened, tuned, and extensively modified to be a more effective weapon. Unfortunately these modifications have rendered it much less effective as a woodcutting tool.", + "description": "This is an electric chainsaw that has been lightened, tuned, and extensively modified to be a more effective weapon. Unfortunately, these modifications have rendered it much less effective as a woodcutting tool.", "weight": "5122 g", "volume": "2250 ml", "longest_side": "70 cm", From 8271c44aef4e525bad63bb684da4e9814eedd2a7 Mon Sep 17 00:00:00 2001 From: starpolemic <42950339+aoae23@users.noreply.github.com> Date: Wed, 23 Dec 2020 17:21:52 -0800 Subject: [PATCH 31/47] Adds injectable prophylactic antivenom (#46107) Co-authored-by: actual-nh <74678550+actual-nh@users.noreply.github.com> Co-authored-by: Kevin Granade --- data/json/effects.json | 13 +++++++++++++ data/json/itemgroups/military.json | 6 ++++-- data/json/items/comestibles/med.json | 23 +++++++++++++++++++++++ src/item_factory.cpp | 2 +- 4 files changed, 41 insertions(+), 3 deletions(-) diff --git a/data/json/effects.json b/data/json/effects.json index 0ddc38b795758..5d1a53940e7ce 100644 --- a/data/json/effects.json +++ b/data/json/effects.json @@ -427,6 +427,7 @@ "miss_messages": [ [ "You feel bad inside.", 1 ] ], "rating": "bad", "resist_traits": [ "POISRESIST" ], + "resist_effects": [ "prophylactic_antivenom" ], "pain_sizing": true, "hurt_sizing": true, "main_parts_only": true, @@ -450,6 +451,7 @@ "miss_messages": [ [ "You feel bad inside.", 2 ] ], "rating": "bad", "resist_traits": [ "POISRESIST" ], + "resist_effects": [ "prophylactic_antivenom" ], "pain_sizing": true, "hurt_sizing": true, "main_parts_only": true, @@ -477,6 +479,7 @@ "show_intensity": false, "rating": "bad", "resist_traits": [ "POISRESIST" ], + "resist_effects": [ "prophylactic_antivenom" ], "pain_sizing": true, "hurt_sizing": true, "main_parts_only": true, @@ -506,6 +509,7 @@ "remove_message": "The weight on your chest lessens.", "rating": "bad", "resist_traits": [ "POISRESIST" ], + "resist_effects": [ "prophylactic_antivenom" ], "max_intensity": 125, "max_effective_intensity": 100, "max_duration": 18000, @@ -580,6 +584,7 @@ "rating": "bad", "max_intensity": 20, "resist_traits": [ "POISRESIST" ], + "resist_effects": [ "prophylactic_antivenom" ], "int_add_val": 1, "int_decay_tick": 600, "base_mods": { "dex_mod": [ -0.34, -0.17 ], "speed_mod": [ -5, -3 ] }, @@ -1339,6 +1344,14 @@ "rating": "good", "blood_analysis_description": "Antivirals" }, + { + "type": "effect_type", + "id": "prophylactic_antivenom", + "name": [ "Antivenom Resistance" ], + "desc": [ "You are temporarily resistant to venoms." ], + "rating": "good", + "blood_analysis_description": "Prophylactic antivenom" + }, { "type": "effect_type", "id": "took_antiasthmatic", diff --git a/data/json/itemgroups/military.json b/data/json/itemgroups/military.json index 719c44e14e571..5f08fa04201b7 100644 --- a/data/json/itemgroups/military.json +++ b/data/json/itemgroups/military.json @@ -85,7 +85,8 @@ "entries": [ { "distribution": [ { "group": "full_ifak" }, { "group": "used_ifak" } ], "prob": 90 }, { "item": "quikclot", "prob": 60 }, - { "collection": [ { "item": "morphine" }, { "item": "syringe" } ], "prob": 30 } + { "collection": [ { "item": "morphine" }, { "item": "syringe" } ], "prob": 30 }, + { "item": "prophylactic_antivenom", "prob": 10 } ] }, { @@ -459,7 +460,8 @@ { "item": "smoxygen_tank", "prob": 20, "charges": [ 0, 12 ] }, { "item": "bfipowder", "prob": 15 }, { "item": "quikclot", "prob": 10 }, - { "item": "weak_antibiotic", "prob": 40 } + { "item": "weak_antibiotic", "prob": 40 }, + { "item": "prophylactic_antivenom", "prob": 5 } ] }, { diff --git a/data/json/items/comestibles/med.json b/data/json/items/comestibles/med.json index 51c5934b0f417..97c087be766b6 100644 --- a/data/json/items/comestibles/med.json +++ b/data/json/items/comestibles/med.json @@ -1402,6 +1402,29 @@ "addiction_type": "sleeping pill", "use_action": [ "FLUSLEEP" ] }, + { + "id": "prophylactic_antivenom", + "type": "COMESTIBLE", + "comestible_type": "MED", + "name": { "str_sp": "prophylactic antivenom pill" }, + "description": "An experimental, cutting-edge antivenom in the form of some small amber vials, designed to be injected a few hours before venom exposure. It was developed in top secret by the military in response to increasing biological/chemical warfare.", + "weight": "40 g", + "volume": "250 ml", + "price": 10000, + "price_postapoc": 50000, + "charges": 5, + "stack_size": 10, + "symbol": "!", + "color": "brown", + "healthy": -1, + "use_action": { + "type": "consume_drug", + "activation_message": "You inject a vial of prophylactic antivenom into your arm. You feel a bit queasy.", + "tools_needed": { "syringe": -1 }, + "effects": [ { "id": "prophylactic_antivenom", "duration": "120 m" }, { "id": "nausea", "duration": "5 m" } ] + }, + "flags": [ "NO_INGEST", "NPC_SAFE", "IRREPLACEABLE_CONSUMABLE" ] + }, { "id": "prozac", "type": "COMESTIBLE", diff --git a/src/item_factory.cpp b/src/item_factory.cpp index a678cbd822329..d744ea43d830e 100644 --- a/src/item_factory.cpp +++ b/src/item_factory.cpp @@ -893,6 +893,7 @@ void Item_factory::init() add_iuse( "FIRECRACKER_PACK_ACT", &iuse::firecracker_pack_act ); add_iuse( "FISH_ROD", &iuse::fishing_rod ); add_iuse( "FISH_TRAP", &iuse::fish_trap ); + add_iuse( "FITNESS_CHECK", &iuse::fitness_check ); add_iuse( "FLUMED", &iuse::flumed ); add_iuse( "FLUSLEEP", &iuse::flusleep ); add_iuse( "FLU_VACCINE", &iuse::flu_vaccine ); @@ -952,7 +953,6 @@ void Item_factory::init() add_iuse( "PLANTBLECH", &iuse::plantblech ); add_iuse( "POISON", &iuse::poison ); add_iuse( "PORTABLE_GAME", &iuse::portable_game ); - add_iuse( "FITNESS_CHECK", &iuse::fitness_check ); add_iuse( "PORTAL", &iuse::portal ); add_iuse( "PROZAC", &iuse::prozac ); add_iuse( "PURIFIER", &iuse::purifier ); From d9d356cb2384a5b37b57a406472de95b4e584df7 Mon Sep 17 00:00:00 2001 From: Venera3 <72006894+Venera3@users.noreply.github.com> Date: Thu, 24 Dec 2020 02:44:10 +0100 Subject: [PATCH 32/47] Bug(flesh)fixes (#46118) * No hides, only carapace * Insecticide kills iflesh * Insecticideprrof flag * Move restriction * Pheromone update --- data/json/monsters/fungus.json | 2 +- data/json/monsters/zed-animal.json | 3 ++- doc/JSON_FLAGS.md | 1 + src/map_field.cpp | 2 +- src/monmove.cpp | 2 +- src/monster.cpp | 17 +++++++++++------ src/monstergenerator.cpp | 1 + src/mtype.h | 1 + 8 files changed, 19 insertions(+), 10 deletions(-) diff --git a/data/json/monsters/fungus.json b/data/json/monsters/fungus.json index d59b3102350e7..d8efb3e515a99 100644 --- a/data/json/monsters/fungus.json +++ b/data/json/monsters/fungus.json @@ -558,6 +558,6 @@ "harvest": "arachnid", "special_attacks": [ [ "FUNGAL_TRAIL", 3 ] ], "death_function": [ "NORMAL", "FUNGUS" ], - "flags": [ "SEES", "SMELLS", "VENOM", "WEBWALK", "CLIMBS", "PATH_AVOID_FIRE" ] + "flags": [ "SEES", "SMELLS", "VENOM", "WEBWALK", "CLIMBS", "PATH_AVOID_FIRE", "INSECTICIDEPROOF" ] } ] diff --git a/data/json/monsters/zed-animal.json b/data/json/monsters/zed-animal.json index a7ba48211e729..98b87d613691c 100644 --- a/data/json/monsters/zed-animal.json +++ b/data/json/monsters/zed-animal.json @@ -539,7 +539,8 @@ "POISON", "NO_BREATHE", "REVIVES", - "FILTHY" + "FILTHY", + "INSECTICIDEPROOF" ] }, { diff --git a/doc/JSON_FLAGS.md b/doc/JSON_FLAGS.md index 279d76982a404..cd8a4eb3841cb 100644 --- a/doc/JSON_FLAGS.md +++ b/doc/JSON_FLAGS.md @@ -954,6 +954,7 @@ Other monster flags. - ```HARDTOSHOOT``` It's one size smaller for ranged attacks, no less then MS_TINY - ```HEARS``` It can hear you. - ```HIT_AND_RUN``` Flee for several turns after a melee attack. +- ```INSECTICIDEPROOF``` It's immune to insecticide even though it's made of bug flesh ("iflesh"). - ```HUMAN``` It's a live human, as long as it's alive. - ```CONSOLE_DESPAWN``` Despawns when a nearby console is properly hacked. - ```IMMOBILE``` Doesn't move (e.g. turrets) diff --git a/src/map_field.cpp b/src/map_field.cpp index a2ecc9955eda1..60b12f6860098 100644 --- a/src/map_field.cpp +++ b/src/map_field.cpp @@ -2028,7 +2028,7 @@ void map::monster_in_field( monster &z ) } } if( cur_field_type == fd_insecticidal_gas ) { - if( z.type->in_species( species_INSECT ) || z.type->in_species( species_SPIDER ) ) { + if( z.made_of( material_id( "iflesh" ) ) && !z.has_flag( MF_INSECTICIDEPROOF ) ) { const int intensity = cur.get_field_intensity(); z.moves -= rng( 10 * intensity, 30 * intensity ); dam += rng( 4, 7 * intensity ); diff --git a/src/monmove.cpp b/src/monmove.cpp index 5630568b080ad..9a41225354eda 100644 --- a/src/monmove.cpp +++ b/src/monmove.cpp @@ -88,7 +88,7 @@ bool monster::is_immune_field( const field_type_id &fid ) const return !type->in_species( species_FUNGUS ); } if( fid == fd_insecticidal_gas ) { - return !type->in_species( species_INSECT ) && !type->in_species( species_SPIDER ); + return !made_of( material_id( "iflesh" ) ) || has_flag( MF_INSECTICIDEPROOF ); } const field_type &ft = fid.obj(); if( ft.has_fume ) { diff --git a/src/monster.cpp b/src/monster.cpp index e9cade56fb5f1..7a64cc64779df 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -96,7 +96,6 @@ static const itype_id itype_milk_raw( "milk_raw" ); static const species_id species_FISH( "FISH" ); static const species_id species_FUNGUS( "FUNGUS" ); -static const species_id species_INSECT( "INSECT" ); static const species_id species_MAMMAL( "MAMMAL" ); static const species_id species_MOLLUSK( "MOLLUSK" ); static const species_id species_ROBOT( "ROBOT" ); @@ -556,14 +555,13 @@ std::string monster::name( unsigned int quantity ) const std::string monster::name_with_armor() const { std::string ret; - if( type->in_species( species_INSECT ) ) { + if( made_of( material_id( "iflesh" ) ) ) { ret = _( "carapace" ); } else if( made_of( material_id( "veggy" ) ) ) { ret = _( "thick bark" ); } else if( made_of( material_id( "bone" ) ) ) { ret = _( "exoskeleton" ); - } else if( made_of( material_id( "flesh" ) ) || made_of( material_id( "hflesh" ) ) || - made_of( material_id( "iflesh" ) ) ) { + } else if( made_of( material_id( "flesh" ) ) || made_of( material_id( "hflesh" ) ) ) { ret = _( "thick hide" ); } else if( made_of( material_id( "iron" ) ) || made_of( material_id( "steel" ) ) ) { ret = _( "armor plating" ); @@ -1079,7 +1077,10 @@ monster_attitude monster::attitude( const Character *u ) const if( u != nullptr ) { // Those are checked quite often, so avoiding string construction is a good idea + static const string_id faction_acid_ant( "acid_ant" ); + static const string_id faction_ant( "ant" ); static const string_id faction_bee( "bee" ); + static const string_id faction_wasp( "wasp" ); if( faction == faction_bee ) { if( u->has_trait( trait_BEE ) ) { return MATT_FRIEND; @@ -1094,8 +1095,12 @@ monster_attitude monster::attitude( const Character *u ) const } if( effective_anger >= 10 && - ( ( type->in_species( species_MAMMAL ) && u->has_trait( trait_PHEROMONE_MAMMAL ) ) || - ( type->in_species( species_INSECT ) && u->has_trait( trait_PHEROMONE_INSECT ) ) ) ) { + type->in_species( species_MAMMAL ) && u->has_trait( trait_PHEROMONE_MAMMAL ) ) { + effective_anger -= 20; + } + + if( ( faction == faction_acid_ant || faction == faction_ant || faction == faction_bee || + faction == faction_wasp ) && effective_anger >= 10 && u->has_trait( trait_PHEROMONE_INSECT ) ) { effective_anger -= 20; } diff --git a/src/monstergenerator.cpp b/src/monstergenerator.cpp index bafa9caa517f0..7f03d3be9dc19 100644 --- a/src/monstergenerator.cpp +++ b/src/monstergenerator.cpp @@ -181,6 +181,7 @@ std::string enum_to_string( m_flag data ) case MF_STUN_IMMUNE: return "STUN_IMMUNE"; case MF_LOUDMOVES: return "LOUDMOVES"; case MF_DROPS_AMMO: return "DROPS_AMMO"; + case MF_INSECTICIDEPROOF: return "INSECTICIDEPROOF"; // *INDENT-ON* case m_flag::MF_MAX: break; diff --git a/src/mtype.h b/src/mtype.h index 9819fc60242fb..d4f4eccdf397c 100644 --- a/src/mtype.h +++ b/src/mtype.h @@ -174,6 +174,7 @@ enum m_flag : int { MF_CAN_OPEN_DOORS, // This monster can open doors. MF_STUN_IMMUNE, // This monster is immune to the stun effect MF_DROPS_AMMO, // This monster drops ammo. Should not be set for monsters that use pseudo ammo. + MF_INSECTICIDEPROOF, // This monster is immune to insecticide, even though it's made of bug flesh MF_MAX // Sets the length of the flags - obviously must be LAST }; From 6995190f17edc4ba17d4d0bb88c3088713826971 Mon Sep 17 00:00:00 2001 From: Hirmuolio <22011552+Hirmuolio@users.noreply.github.com> Date: Thu, 24 Dec 2020 03:52:09 +0200 Subject: [PATCH 33/47] Remove repair nanobot idle power consumption (#45985) * nanobot power --- data/json/bionics.json | 4 +-- src/bionics.cpp | 73 +++++++++++++++++++++--------------------- 2 files changed, 38 insertions(+), 39 deletions(-) diff --git a/data/json/bionics.json b/data/json/bionics.json index 344183edf33d4..5aa2515cba9c6 100644 --- a/data/json/bionics.json +++ b/data/json/bionics.json @@ -713,11 +713,11 @@ "id": "bio_nanobots", "type": "bionic", "name": { "str": "Repair Nanobots" }, - "description": "Inside your body is a fleet of tiny dormant robots. While activated they will flit about your body, repairing damage at 1 HP per minute and stopping bleeding at the cost of extra power and stored calories.", + "description": "Inside your body is a fleet of tiny dormant robots. While activated they will flit about your body, repairing damage at 1 HP per minute and stopping bleeding at the cost of extra power and stored calories. No power is consumed if there is nothing to heal.", "occupied_bodyparts": [ [ "torso", 10 ] ], "flags": [ "BIONIC_TOGGLED", "BIONIC_NPC_USABLE" ], "act_cost": "80 J", - "react_cost": "4 J", + "react_cost": "40 J", "time": 1 }, { diff --git a/src/bionics.cpp b/src/bionics.cpp index a13862a4a3ea0..f199f7efdc515 100644 --- a/src/bionics.cpp +++ b/src/bionics.cpp @@ -1562,13 +1562,12 @@ float Character::get_effective_efficiency( int b, float fuel_efficiency ) * @param p the player * @param bio the bionic that is meant to be recharged. * @param amount the amount of power that is to be spent recharging the bionic. - * @param factor multiplies the power cost per turn. * @return indicates whether we successfully charged the bionic. */ -static bool attempt_recharge( Character &p, bionic &bio, units::energy &amount, int factor = 1 ) +static bool attempt_recharge( Character &p, bionic &bio, units::energy &amount ) { const bionic_data &info = bio.info(); - units::energy power_cost = info.power_over_time * factor; + units::energy power_cost = info.power_over_time; bool recharged = false; if( power_cost > 0_kJ ) { @@ -1580,7 +1579,7 @@ static bool attempt_recharge( Character &p, bionic &bio, units::energy &amount, } ); if( !powered_armor ) { const units::energy armor_power_cost = 1_kJ; - power_cost -= armor_power_cost * factor; + power_cost -= armor_power_cost; } } if( p.get_power_level() >= power_cost ) { @@ -1606,9 +1605,10 @@ void Character::process_bionic( const int b ) } // These might be affected by environmental conditions, status effects, faulty bionics, etc. - int discharge_factor = 1; int discharge_rate = 1; + units::energy cost = 0_mJ; + bio.charge_timer = std::max( 0, bio.charge_timer - discharge_rate ); if( bio.charge_timer <= 0 ) { if( bio.info().charge_time > 0 ) { @@ -1619,8 +1619,7 @@ void Character::process_bionic( const int b ) bio.charge_timer = bio.info().charge_time; } else { // Try to recharge our bionic if it is made for it - units::energy cost = 0_mJ; - bool recharged = attempt_recharge( *this, bio, cost, discharge_factor ); + bool recharged = attempt_recharge( *this, bio, cost ); if( !recharged ) { // No power to recharge, so deactivate bio.powered = false; @@ -1648,39 +1647,39 @@ void Character::process_bionic( const int b ) sounds::sound( pos(), 19, sounds::sound_t::activity, _( "HISISSS!" ), false, "bionic", static_cast( bio_hydraulics ) ); } else if( bio.id == bio_nanobots ) { - if( get_power_level() >= 40_J ) { - std::forward_list bleeding_bp_parts; - for( const bodypart_id &bp : get_all_body_parts() ) { - if( has_effect( effect_bleed, bp.id() ) ) { - bleeding_bp_parts.push_front( bp ); - } - } - std::vector damaged_hp_parts; - for( const std::pair &part : get_body() ) { - const int hp_cur = part.second.get_hp_cur(); - if( hp_cur > 0 && hp_cur < part.second.get_hp_max() ) { - damaged_hp_parts.push_back( part.first.id() ); - } + std::forward_list bleeding_bp_parts; + for( const bodypart_id &bp : get_all_body_parts() ) { + if( has_effect( effect_bleed, bp.id() ) ) { + bleeding_bp_parts.push_front( bp ); } - for( const bodypart_id &i : bleeding_bp_parts ) { - // effectively reduces by 1 intensity level - if( get_stored_kcal() >= 15 ) { - get_effect( effect_bleed, i ).mod_duration( -get_effect( effect_bleed, i ).get_int_dur_factor() ); - mod_stored_kcal( -15 ); - } else { - bleeding_bp_parts.clear(); - break; - } + } + std::vector damaged_hp_parts; + for( const std::pair &part : get_body() ) { + const int hp_cur = part.second.get_hp_cur(); + if( hp_cur > 0 && hp_cur < part.second.get_hp_max() ) { + damaged_hp_parts.push_back( part.first.id() ); } - if( calendar::once_every( 60_turns ) ) { - if( get_stored_kcal() >= 5 && !damaged_hp_parts.empty() ) { - const bodypart_id part_to_heal = damaged_hp_parts[ rng( 0, damaged_hp_parts.size() - 1 ) ]; - heal( part_to_heal, 1 ); - mod_stored_kcal( -5 ); - } + } + if( damaged_hp_parts.empty() && bleeding_bp_parts.empty() ) { + // Nothing to heal. Return the consumed power and exit early + mod_power_level( cost ); + return; + } + for( const bodypart_id &i : bleeding_bp_parts ) { + // effectively reduces by 1 intensity level + if( get_stored_kcal() >= 15 ) { + get_effect( effect_bleed, i ).mod_duration( -get_effect( effect_bleed, i ).get_int_dur_factor() ); + mod_stored_kcal( -15 ); + } else { + bleeding_bp_parts.clear(); + break; } - if( !damaged_hp_parts.empty() || !bleeding_bp_parts.empty() ) { - mod_power_level( -40_J ); + } + if( calendar::once_every( 60_turns ) ) { + if( get_stored_kcal() >= 5 && !damaged_hp_parts.empty() ) { + const bodypart_id part_to_heal = damaged_hp_parts[ rng( 0, damaged_hp_parts.size() - 1 ) ]; + heal( part_to_heal, 1 ); + mod_stored_kcal( -5 ); } } } else if( bio.id == bio_painkiller ) { From 1113a9a195b6e4e699314fb8e838c19933ae3ce0 Mon Sep 17 00:00:00 2001 From: Venera3 <72006894+Venera3@users.noreply.github.com> Date: Thu, 24 Dec 2020 03:07:24 +0100 Subject: [PATCH 34/47] Poison tweaks (#46079) * Material restriction applies * Adjust Webber Co-authored-by: anothersimulacrum Co-authored-by: Kevin Granade --- data/json/effects.json | 4 +++- data/json/monsters/insect_spider.json | 4 ++-- src/bionics.cpp | 9 +++++++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/data/json/effects.json b/data/json/effects.json index 5d1a53940e7ce..8861e3e941875 100644 --- a/data/json/effects.json +++ b/data/json/effects.json @@ -479,6 +479,7 @@ "show_intensity": false, "rating": "bad", "resist_traits": [ "POISRESIST" ], + "blood_analysis_description": "Necrotizing Venom", "resist_effects": [ "prophylactic_antivenom" ], "pain_sizing": true, "hurt_sizing": true, @@ -496,7 +497,7 @@ "hurt_amount": [ 5, 0 ], "hurt_min": [ 2, 1 ], "hurt_chance": [ 13, 100 ], - "hurt_tick": [ 30 ] + "hurt_tick": [ 36 ] }, "scaling_mods": { "pain_min": [ 0.05, 0.01 ], "pain_chance": [ -0.15, -0.8 ], "hurt_chance": [ -0.11, -0.81 ] } }, @@ -509,6 +510,7 @@ "remove_message": "The weight on your chest lessens.", "rating": "bad", "resist_traits": [ "POISRESIST" ], + "blood_analysis_description": "Systemic Inflammatory Agents", "resist_effects": [ "prophylactic_antivenom" ], "max_intensity": 125, "max_effective_intensity": 100, diff --git a/data/json/monsters/insect_spider.json b/data/json/monsters/insect_spider.json index 88251fb4a7f33..cae9a557f7f7f 100644 --- a/data/json/monsters/insect_spider.json +++ b/data/json/monsters/insect_spider.json @@ -1064,8 +1064,8 @@ "melee_dice": 1, "melee_dice_sides": 6, "melee_cut": 6, - "attack_effs": [ { "id": "venom_dmg", "duration": 750, "affect_hit_bp": true } ], - "//": "3 hits to max intensity, 3 hits to max duration", + "attack_effs": [ { "id": "venom_dmg", "duration": 400, "affect_hit_bp": true } ], + "//": "5 hits to max intensity, 6 hits to max duration", "dodge": 2, "armor_bash": 2, "armor_cut": 6, diff --git a/src/bionics.cpp b/src/bionics.cpp index f199f7efdc515..405db64226c7b 100644 --- a/src/bionics.cpp +++ b/src/bionics.cpp @@ -89,6 +89,7 @@ static const efftype_id effect_adrenaline( "adrenaline" ); static const efftype_id effect_antifungal( "antifungal" ); static const efftype_id effect_assisted( "assisted" ); static const efftype_id effect_asthma( "asthma" ); +static const efftype_id effect_badpoison( "badpoison" ); static const efftype_id effect_bleed( "bleed" ); static const efftype_id effect_bloodworms( "bloodworms" ); static const efftype_id effect_cig( "cig" ); @@ -103,6 +104,7 @@ static const efftype_id effect_iodine( "iodine" ); static const efftype_id effect_meth( "meth" ); static const efftype_id effect_narcosis( "narcosis" ); static const efftype_id effect_operating( "operating" ); +static const efftype_id effect_paralysepoison( "paralysepoison" ); static const efftype_id effect_pblue( "pblue" ); static const efftype_id effect_pkill_l( "pkill_l" ); static const efftype_id effect_pkill1( "pkill1" ); @@ -118,6 +120,8 @@ static const efftype_id effect_took_prozac( "took_prozac" ); static const efftype_id effect_took_prozac_bad( "took_prozac_bad" ); static const efftype_id effect_took_xanax( "took_xanax" ); static const efftype_id effect_under_operation( "under_operation" ); +static const efftype_id effect_venom_dmg( "venom_dmg" ); +static const efftype_id effect_venom_weaken( "venom_weaken" ); static const efftype_id effect_visuals( "visuals" ); static const material_id fuel_type_battery( "battery" ); @@ -730,12 +734,13 @@ bool Character::activate_bionic( int b, bool eff_only, bool *close_bionics_ui ) add_msg_activate(); static const std::vector removable = {{ effect_fungus, effect_dermatik, effect_bloodworms, - effect_tetanus, effect_poison, effect_stung, + effect_tetanus, effect_poison, effect_badpoison, effect_stung, effect_pkill1, effect_pkill2, effect_pkill3, effect_pkill_l, effect_drunk, effect_cig, effect_high, effect_hallu, effect_visuals, effect_pblue, effect_iodine, effect_datura, effect_took_xanax, effect_took_prozac, effect_took_prozac_bad, - effect_took_flumed, effect_antifungal + effect_took_flumed, effect_antifungal, effect_venom_weaken, + effect_venom_dmg, effect_paralysepoison } }; From 182bb6f262d67f1fa6807eeabd5e8ca9b85b4f0d Mon Sep 17 00:00:00 2001 From: Anton Burmistrov Date: Thu, 24 Dec 2020 06:08:56 +0400 Subject: [PATCH 35/47] Fit message window to game window size (#46207) --- src/messages.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/messages.cpp b/src/messages.cpp index 2b189a061bd1b..f8205a1c68ffd 100644 --- a/src/messages.cpp +++ b/src/messages.cpp @@ -13,6 +13,7 @@ #include "input.h" #include "json.h" #include "output.h" +#include "panels.h" #include "point.h" #include "string_formatter.h" #include "string_input_popup.h" @@ -472,8 +473,9 @@ Messages::dialog::dialog() void Messages::dialog::init( ui_adaptor &ui ) { - w_width = std::min( TERMX, FULL_SCREEN_WIDTH ); - w_height = std::min( TERMY, FULL_SCREEN_HEIGHT ); + w_width = std::max( 45, TERMX - 2 * ( panel_manager::get_manager().get_width_right() + + panel_manager::get_manager().get_width_left() ) ); + w_height = TERMY; w_x = ( TERMX - w_width ) / 2; w_y = ( TERMY - w_height ) / 2; From d87baa56d2d63cda1ae1146032081364b44212d5 Mon Sep 17 00:00:00 2001 From: Maleclypse <54345792+Maleclypse@users.noreply.github.com> Date: Wed, 23 Dec 2020 20:56:12 -0600 Subject: [PATCH 36/47] [Aftershock] Cryopod rooms for labs and associated cruft (#45396) --- .../Aftershock/itemgroups/item_groups.json | 47 +++- data/mods/Aftershock/items/ammo.json | 24 +++ data/mods/Aftershock/items/books.json | 54 +++++ data/mods/Aftershock/items/cbms.json | 10 + .../items/comestibles/comestibles.json | 36 ++++ data/mods/Aftershock/items/ethereal.json | 32 +++ data/mods/Aftershock/items/furniture.json | 52 +++++ data/mods/Aftershock/items/grenades.json | 108 ++++++++++ data/mods/Aftershock/items/tool_quality.json | 10 +- data/mods/Aftershock/items/tools.json | 130 ++++++++++++ data/mods/Aftershock/items/weapons.json | 21 ++ data/mods/Aftershock/maps/furniture.json | 51 +++++ data/mods/Aftershock/maps/lab_cryo_room.json | 200 ++++++++++++++++++ data/mods/Aftershock/maps/nested/lab.json | 29 +++ data/mods/Aftershock/mobs/monster_groups.json | 22 +- data/mods/Aftershock/mobs/mutants.json | 58 +++++ data/mods/Aftershock/mutations/mutations.json | 12 ++ data/mods/Aftershock/npcs/classes.json | 30 +++ .../mods/Aftershock/npcs/cyropod_classes.json | 192 +++++++++++++++++ data/mods/Aftershock/player/bionics.json | 12 ++ .../mods/Aftershock/recipes/ammo_recipes.json | 13 ++ .../Aftershock/recipes/bionic_recipes.json | 24 +++ .../recipes/comestible_recipes.json | 38 ++++ data/mods/Aftershock/recipes/grenades.json | 14 ++ .../Aftershock/recipes/robot_recipes.json | 6 +- .../Aftershock/recipes/ultratech_tools.json | 76 +++++++ data/mods/Aftershock/requirements.json | 9 +- data/mods/Aftershock/spells.json | 150 +++++++++++++ data/mods/Aftershock/spells/enchantments.json | 6 + data/mods/Aftershock/spells/spells.json | 58 ----- 30 files changed, 1445 insertions(+), 79 deletions(-) create mode 100644 data/mods/Aftershock/items/ethereal.json create mode 100644 data/mods/Aftershock/maps/lab_cryo_room.json create mode 100644 data/mods/Aftershock/maps/nested/lab.json create mode 100644 data/mods/Aftershock/mobs/mutants.json create mode 100644 data/mods/Aftershock/npcs/cyropod_classes.json create mode 100644 data/mods/Aftershock/recipes/ultratech_tools.json create mode 100644 data/mods/Aftershock/spells.json delete mode 100644 data/mods/Aftershock/spells/spells.json diff --git a/data/mods/Aftershock/itemgroups/item_groups.json b/data/mods/Aftershock/itemgroups/item_groups.json index 6413f458cf9e7..9c638e614a40d 100644 --- a/data/mods/Aftershock/itemgroups/item_groups.json +++ b/data/mods/Aftershock/itemgroups/item_groups.json @@ -9,7 +9,9 @@ [ "afs_hydraulic_gauntlet", 3 ], [ "afs_energy_saber_off", 3 ], [ "ftk93", 5 ], - [ "afs_hardlight_longbow", 2 ] + [ "afs_hardlight_longbow", 2 ], + [ "grenade_cryo", 12 ], + [ "afs_freeze_gauntlet", 5 ] ] }, { @@ -20,13 +22,23 @@ [ "textbook_mechanics", 3 ], [ "textbook_biodiesel", 3 ], [ "mag_fieldrepair", 4 ], - [ "book_icef", 4 ] + [ "book_icef", 4 ], + [ "recipes_resistance", 2 ], + [ "schematics_nano_forge", 12 ], + [ "schematics_diamond_press", 12 ] ] }, { "id": "chem_lab", "type": "item_group", - "items": [ [ "panacea", 1 ], [ "afs_calorie_pill", 5 ], [ "afs_sundew", 8 ], [ "recipe_unusual_ammos", 3 ] ] + "items": [ + [ "panacea", 1 ], + [ "afs_calorie_pill", 5 ], + [ "afs_sundew", 8 ], + [ "recipe_unusual_ammos", 3 ], + [ "recipes_resistance", 2 ], + [ "recipes_cryolab", 1 ] + ] }, { "id": "rare", @@ -143,7 +155,8 @@ [ "afs_textbook_shotguns", 20 ], [ "afs_textbook_handguns", 20 ], [ "afs_textbook_rifles", 20 ], - [ "afs_textbook_launchers", 10 ] + [ "afs_textbook_launchers", 10 ], + [ "recipe_unusual_ammos", 7 ] ] }, { @@ -252,7 +265,8 @@ [ "afs_material_2", 20 ], [ "afs_magnet_1", 20 ], [ "afs_energy_storage_1", 20 ], - [ "afs_circuitry_1", 20 ] + [ "afs_circuitry_1", 20 ], + [ "solar_panel_v3", 1 ] ] }, { @@ -382,7 +396,8 @@ { "item": "xlballistic_vest_esapi", "prob": 39 }, { "item": "xlboots_combat", "prob": 70 }, { "item": "xlgloves_tactical", "prob": 50 }, - { "item": "tripaw_xlgloves_tactical", "prob": 48 } + { "item": "tripaw_xlgloves_tactical", "prob": 48 }, + { "item": "grenade_cryo", "prob": 10 } ] }, { @@ -397,16 +412,26 @@ ] }, { - "id": "science", + "id": "crate_sports", "type": "item_group", - "subtype": "distribution", - "items": [ [ "solar_panel_v3", 1 ] ] + "subtype": "collection", + "items": [ [ "q_solarpack", 1 ] ] }, { - "id": "crate_sports", + "id": "cryo_lab_drops", "type": "item_group", "subtype": "collection", - "items": [ [ "q_solarpack", 1 ] ] + "entries": [ + { "item": "recipes_cryolab", "prob": 5 }, + { "item": "recipes_resistance", "prob": 4 }, + { "item": "recipe_unusual_ammos", "prob": 4 }, + { "item": "bio_cold_absorber", "prob": 2 }, + { "item": "afs_freeze_gauntlet", "prob": 6 }, + { "group": "afs_scrapgroup", "count": [ 1, 3 ], "prob": 30 }, + { "group": "exoticplants", "count": [ 1, 3 ], "prob": 30 }, + { "group": "science", "count": [ 1, 3 ], "prob": 30 }, + { "item": "subsuit_xl" } + ] }, { "type": "item_group", diff --git a/data/mods/Aftershock/items/ammo.json b/data/mods/Aftershock/items/ammo.json index 5eefbf7a1cc36..0347c71499a2e 100644 --- a/data/mods/Aftershock/items/ammo.json +++ b/data/mods/Aftershock/items/ammo.json @@ -38,5 +38,29 @@ "stack_size": 3, "loudness": 9, "effects": [ "NEVER_MISFIRES" ] + }, + { + "type": "AMMO", + "id": "arrow_nano", + "price": 2000, + "name": { "str": "nano printed combat arrow" }, + "symbol": "=", + "color": "green", + "looks_like": "arrow_fire_hardened_fletched", + "description": "Arrows made from nanoprinted materials where each layer of the arrow is designed for improved efficiency. A layer that provides the least possible air resistance, followed by a layer of armor piercing, then followed by a frangible layer. However, this makes each arrow single use.", + "material": [ "superalloy" ], + "volume": "250 ml", + "price_postapoc": 10000, + "weight": "20 g", + "longest_side": "76 cm", + "bashing": 1, + "ammo_type": "arrow", + "damage": { "damage_type": "stab", "constant_damage_multiplier": 3.75 }, + "range": 6, + "dispersion": 20, + "loudness": 0, + "count": 10, + "stack_size": 10, + "critical_multiplier": 13 } ] diff --git a/data/mods/Aftershock/items/books.json b/data/mods/Aftershock/items/books.json index 4f85d4d133e4a..3cf3eadd99bd4 100644 --- a/data/mods/Aftershock/items/books.json +++ b/data/mods/Aftershock/items/books.json @@ -136,6 +136,20 @@ "description": "Bearing the logo of Northrop, those are assembly plans, design specs, and technical drawings for the chicken walker. Most of this is useless to you, but you could use the assembly plans to re-assemble the robot from salvaged parts.", "copy-from": "schematics_generic" }, + { + "id": "schematics_diamond_press", + "type": "BOOK", + "name": { "str_sp": "diamond press schematics" }, + "description": "Bearing the logo of Matrioshka Fabritechnics, those are assembly plans, design specs, and technical drawings for the diamond press. Most of this is useless to you, but you could use the assembly plans to re-assemble the robot from salvaged parts.", + "copy-from": "schematics_generic" + }, + { + "id": "schematics_nano_forge", + "type": "BOOK", + "name": { "str_sp": "nano forge schematics" }, + "description": "Bearing the logo of Matrioshka Fabritechnics, those are assembly plans, design specs, and technical drawings for the nano forge. Most of this is useless to you, but you could use the assembly plans to re-assemble the robot from salvaged parts.", + "copy-from": "schematics_generic" + }, { "id": "schematics_tankbot", "type": "BOOK", @@ -217,6 +231,46 @@ "time": "35 m", "fun": -3 }, + { + "id": "recipes_resistance", + "type": "BOOK", + "name": { "str": "useful recipes for resistance", "str_pl": "copies of useful recipes for resistance" }, + "description": "Recipes for Resistance is a collection of tales, strategies and recipes for working against corporate rule. Very simple language is used in the recipes but it drags out the explanations.", + "weight": "2000 g", + "volume": "500 ml", + "price": 64000, + "price_postapoc": 2000, + "material": [ "paper" ], + "symbol": "?", + "color": "light_green", + "skill": "chemistry", + "looks_like": "adv_chemistry", + "required_level": 6, + "max_level": 7, + "intelligence": 9, + "time": "50 m", + "fun": -1 + }, + { + "id": "recipes_cryolab", + "type": "BOOK", + "name": { "str": "Working in Boreal Conditions and beyond", "str_pl": "copies of Working in Boreal Conditions and beyond" }, + "description": "A corporate manual for conditions of inhospitable cold. It includes instructions for building devices and substances that will aid in survival in extreme weather or even the lack thereof.", + "weight": "2000 g", + "volume": "500 ml", + "price": 64000, + "price_postapoc": 2000, + "material": [ "paper" ], + "symbol": "?", + "color": "light_cyan", + "looks_like": "recipe_lab_elec", + "skill": "chemistry", + "required_level": 3, + "max_level": 5, + "intelligence": 14, + "time": "35 m", + "fun": -1 + }, { "id": "recipe_unusual_ammos", "type": "BOOK", diff --git a/data/mods/Aftershock/items/cbms.json b/data/mods/Aftershock/items/cbms.json index 04ed5d7d76d78..627339be2c031 100644 --- a/data/mods/Aftershock/items/cbms.json +++ b/data/mods/Aftershock/items/cbms.json @@ -95,5 +95,15 @@ "price": 100000, "price_postapoc": 1500, "difficulty": 16 + }, + { + "id": "bio_cold_absorber", + "copy-from": "bionic_general", + "type": "BIONIC_ITEM", + "name": { "str": "Emergency Insulation" }, + "description": "A system designed to prevent instantaneous frostbite in workers exposed to things like hard vacuum and liquid nitrogen.", + "price": 100000, + "price_postapoc": 1500, + "difficulty": 16 } ] diff --git a/data/mods/Aftershock/items/comestibles/comestibles.json b/data/mods/Aftershock/items/comestibles/comestibles.json index b9a3b76e8ad8b..2f20560b5baaf 100644 --- a/data/mods/Aftershock/items/comestibles/comestibles.json +++ b/data/mods/Aftershock/items/comestibles/comestibles.json @@ -41,5 +41,41 @@ ] }, "flags": [ "NPC_SAFE", "IRREPLACEABLE_CONSUMABLE" ] + }, + { + "id": "cream_prot_cold", + "name": { "str": "heat retention cream" }, + "description": "Rub this on your skin when you are expecting exposure extreme cold temperatures. Cannot protect from instant frostbite. Smells like the inside of a sheep.", + "use_action": { "type": "cast_spell", "spell_id": "cream_prot_cold", "no_fail": true, "level": 0 }, + "type": "COMESTIBLE", + "weight": "265 g", + "volume": "250ml", + "charges": 1, + "fun": -1, + "symbol": "q", + "container": "bottle_plastic_small", + "color": "light_blue", + "comestible_type": "MED", + "flags": [ "EATEN_COLD" ], + "phase": "solid", + "price": 2500 + }, + { + "id": "cream_greater_prot_cold", + "name": { "str": "heat retention cream xtreme" }, + "description": "This product was advertized before the Cataclysm for extreme cold environment protection. You remember a demonstration involving a woman coating her hand in this and plunging it in liquid nitrogen for a second. You're pretty sure that was staged.", + "use_action": { "type": "cast_spell", "spell_id": "cream_greater_prot_cold", "no_fail": true, "level": 0 }, + "type": "COMESTIBLE", + "weight": "265 g", + "volume": "250ml", + "charges": 1, + "fun": -3, + "symbol": "q", + "container": "bottle_plastic_small", + "color": "light_blue", + "comestible_type": "MED", + "flags": [ "EATEN_COLD" ], + "phase": "solid", + "price": 5000 } ] diff --git a/data/mods/Aftershock/items/ethereal.json b/data/mods/Aftershock/items/ethereal.json new file mode 100644 index 0000000000000..bdcdd089fdaa1 --- /dev/null +++ b/data/mods/Aftershock/items/ethereal.json @@ -0,0 +1,32 @@ +[ + { + "id": "cold_res_cream", + "type": "ARMOR", + "name": { "str": "cold resistance cream" }, + "description": "A thick layer of something that smells worse than walrus fat. But it keeps you warm.", + "weight": "1g", + "volume": "1ml", + "price": 3646, + "symbol": "o", + "color": "green", + "covers": [ "leg_l", "leg_r", "torso", "arm_l", "arm_r", "hand_l", "hand_r", "head", "foot_l", "foot_r", "mouth", "eyes" ], + "flags": [ "AURA", "SEMITANGIBLE", "OVERSIZE", "ONLY_ONE", "TRADER_AVOID", "NO_TAKEOFF", "NONCONDUCTIVE" ], + "relic_data": { "passive_effects": [ { "has": "WORN", "condition": "ALWAYS", "mutations": [ "AFS_CRYOADAPTATION" ] } ] } + }, + { + "id": "cold_res_cream_greater", + "type": "ARMOR", + "name": "heat retention xtreme cream", + "description": "The last word in cold snap protection designed to give short term protection in the event of a suit breach in vacuum.", + "weight": "1g", + "volume": "1ml", + "price": 3646, + "symbol": "o", + "color": "green", + "covers": [ "leg_l", "leg_r", "torso", "arm_l", "arm_r", "hand_l", "hand_r", "head", "foot_l", "foot_r", "mouth", "eyes" ], + "flags": [ "AURA", "SEMITANGIBLE", "OVERSIZE", "ONLY_ONE", "TRADER_AVOID", "NO_TAKEOFF", "NONCONDUCTIVE" ], + "relic_data": { + "passive_effects": [ { "has": "WORN", "condition": "ALWAYS", "values": [ { "value": "ARMOR_COLD", "multiply": -0.25 } ] } ] + } + } +] diff --git a/data/mods/Aftershock/items/furniture.json b/data/mods/Aftershock/items/furniture.json index a53b70518509a..e9e25f27133ae 100644 --- a/data/mods/Aftershock/items/furniture.json +++ b/data/mods/Aftershock/items/furniture.json @@ -26,5 +26,57 @@ { "item": "scrap", "count": [ 10, 20 ] } ] } + }, + { + "type": "furniture", + "id": "f_diamond_press", + "name": "diamond press on a stand", + "description": "Matrioshka Fabritechnics Diamond Press deployed and ready to crush some things on a molecular level. DO NOT INSERT ANY PART OF YOUR ANATOMY.", + "symbol": "H", + "color": "light_cyan", + "crafting_pseudo_item": "pseudo_diamond_press", + "move_cost_mod": -1, + "coverage": 70, + "required_str": -1, + "flags": [ "NOITEM", "SEALED", "ALLOW_FIELD_EFFECT", "TRANSPARENT", "EASY_DECONSTRUCT", "CONTAINER", "LIQUIDCONT" ], + "deconstruct": { "items": [ { "item": "diamond_press", "count": 1 } ] }, + "bash": { + "str_min": 12, + "str_max": 50, + "sound": "smash!", + "sound_fail": "whump.", + "items": [ + { "item": "plastic_chunk", "count": [ 6, 8 ] }, + { "item": "water_faucet", "prob": 50 }, + { "item": "sheet_metal_small", "count": [ 6, 12 ] }, + { "item": "scrap", "count": [ 10, 20 ] } + ] + } + }, + { + "type": "furniture", + "id": "f_nano_forge", + "name": "deployed nano forge rig", + "description": "Matrioshka Fabritechnics nano forge looks like a solid black box. Apertures for ingredients open with a hum as the console commands are entered. DO NOT INSERT ANY PART OF YOUR ANATOMY.", + "symbol": "H", + "color": "light_cyan", + "crafting_pseudo_item": "nano_pseudo_forge", + "move_cost_mod": -1, + "coverage": 70, + "required_str": -1, + "flags": [ "NOITEM", "SEALED", "ALLOW_FIELD_EFFECT", "TRANSPARENT", "EASY_DECONSTRUCT", "CONTAINER", "LIQUIDCONT" ], + "deconstruct": { "items": [ { "item": "nano_forge", "count": 1 } ] }, + "bash": { + "str_min": 12, + "str_max": 50, + "sound": "smash!", + "sound_fail": "whump.", + "items": [ + { "item": "plastic_chunk", "count": [ 6, 8 ] }, + { "item": "water_faucet", "prob": 50 }, + { "item": "sheet_metal_small", "count": [ 6, 12 ] }, + { "item": "scrap", "count": [ 10, 20 ] } + ] + } } ] diff --git a/data/mods/Aftershock/items/grenades.json b/data/mods/Aftershock/items/grenades.json index b69bbb3af2764..63eaa9f310f8c 100644 --- a/data/mods/Aftershock/items/grenades.json +++ b/data/mods/Aftershock/items/grenades.json @@ -20,5 +20,113 @@ "countdown_interval": 20, "countdown_action": { "type": "transform", "target": "null" }, "flags": [ "TRADER_AVOID" ] + }, + { + "id": "grenade_cryo", + "type": "TOOL", + "category": "weapons", + "name": { "str": "cryo grenade" }, + "description": "This is a military-grade cryo hand grenade. Once it explodes it spreads exotic highly radioactive shrapnel. Use this item to pull the pin and light the fuse. You will then have five seconds before it explodes; throwing it would be a good idea.", + "weight": "397 g", + "volume": "250 ml", + "price": 1500, + "price_postapoc": 1000, + "to_hit": -1, + "bashing": 6, + "material": [ "steel", "plastic" ], + "symbol": "*", + "color": "green", + "use_action": { + "need_wielding": true, + "target": "grenade_cryo", + "msg": "You pull the pin on the grenade.", + "target_charges": 5, + "active": true, + "menu_text": "Pull pin", + "type": "transform" + }, + "flags": [ "RADIO_MODABLE", "RADIO_INVOKE_PROC", "BOMB", "GRENADE" ] + }, + { + "id": "grenade_cryo_act", + "type": "TOOL", + "category": "weapons", + "name": { "str": "active cryo grenade" }, + "description": "This is an active grenade, and will explode any second now. Once it explodes it spreads exotic highly thermodynamic shrapnel. Better throw it!", + "weight": "607 g", + "volume": "250 ml", + "price": 0, + "price_postapoc": 0, + "to_hit": -1, + "bashing": 6, + "material": [ "superalloy" ], + "symbol": "*", + "color": "green", + "initial_charges": 5, + "max_charges": 5, + "turns_per_charge": 1, + "use_action": { + "type": "explosion", + "sound_volume": 0, + "sound_msg": "Tick.", + "fields_type": "fd_nuke_gas", + "fields_radius": 3, + "fields_min_intensity": 3, + "fields_max_intensity": 3, + "no_deactivate_msg": "You've already pulled the %s's pin; try throwing it instead.", + "explosion": { "power": 540, "shrapnel": { "casing_mass": 217, "fragment_mass": 0.25 } } + }, + "flags": [ "BOMB", "TRADER_AVOID" ] + }, + { + "id": "molotov", + "type": "TOOL", + "category": "weapons", + "name": { "str": "Molotov cocktail" }, + "description": "A bottle of flammable liquid with a rag inserted. Use this item to light the rag. You will, of course, need a lighter or matches in your inventory to do this. After lighting it, throw it to cause fires.", + "weight": "742 g", + "volume": "750 ml", + "price": 500, + "price_postapoc": 500, + "to_hit": 1, + "bashing": 5, + "material": [ "glass", "cotton" ], + "symbol": "*", + "color": "light_gray", + "initial_charges": 1, + "max_charges": 1, + "use_action": { + "need_wielding": true, + "target": "molotov_lit", + "msg": "You light the Molotov cocktail!", + "target_charges": 1, + "active": true, + "moves": 75, + "need_fire": 1, + "menu_text": "Light rag", + "type": "transform" + }, + "flags": [ "NPC_ACTIVATE", "NO_REPAIR" ] + }, + { + "id": "molotov_lit", + "type": "TOOL", + "category": "weapons", + "name": { "str": "Molotov cocktail" }, + "description": "A bottle of flammable liquid with a flaming rag stoppered in its neck. Throwing it will shatter the bottle on impact and ignite a fireball. Dropping it will set you on fire, so don't do that unless you want to burn to death.", + "weight": "742 g", + "volume": "750 ml", + "price": 0, + "price_postapoc": 0, + "to_hit": 1, + "bashing": 5, + "material": [ "glass", "cotton" ], + "symbol": "*", + "color": "light_gray", + "initial_charges": 1, + "max_charges": 1, + "turns_per_charge": 1, + "use_action": [ "MOLOTOV_LIT" ], + "flags": [ "LIGHT_15", "TRADER_AVOID", "NPC_THROW_NOW", "NO_REPAIR", "WATER_EXTINGUISH" ] } ] diff --git a/data/mods/Aftershock/items/tool_quality.json b/data/mods/Aftershock/items/tool_quality.json index 2ed36b8777d4d..fa3cab812014f 100644 --- a/data/mods/Aftershock/items/tool_quality.json +++ b/data/mods/Aftershock/items/tool_quality.json @@ -1,13 +1,17 @@ [ { "type": "tool_quality", - "id": "CHURN", - "name": "churn", - "//": "Delete this when you mainline Dairy products existing PR" + "id": "DIAMONDPRESS", + "name": "diamond press" }, { "type": "tool_quality", "id": "BIONIC_ASSEMBLY", "name": "bionic assembly" + }, + { + "type": "tool_quality", + "id": "NANO_FORGE", + "name": "nano forge assembly" } ] diff --git a/data/mods/Aftershock/items/tools.json b/data/mods/Aftershock/items/tools.json index 3c5522c15d2f3..73e97dee6f70d 100644 --- a/data/mods/Aftershock/items/tools.json +++ b/data/mods/Aftershock/items/tools.json @@ -315,5 +315,135 @@ "revert_to": "control_laptop", "use_action": { "target": "control_laptop", "msg": "You stop lighting up the screen.", "menu_text": "Turn off", "type": "transform" }, "flags": [ "WATCH", "LIGHT_10", "TRADER_AVOID" ] + }, + { + "id": "vr_laptop", + "type": "TOOL_ARMOR", + "category": "tools", + "name": "portable virtual reality rig", + "description": "A portable virtual reality rig with glasses for the HUD and the computing functions wrapped around the torso. When powered on it will provide an overlay on everything you experience.", + "symbol": ",", + "color": "dark_gray", + "material": [ "glass", "titanium" ], + "copy-from": "fancy_sunglasses", + "covers": [ "eyes", "torso" ], + "ammo": [ "battery" ], + "charges_per_use": 2, + "use_action": [ + "EINKTABLETPC", + "PORTABLE_GAME", + { + "target": "vr_laptop_holosuite", + "msg": "The holosuite comes to life around you.", + "menu_text": "power on holosuite", + "active": true, + "need_charges": 1, + "need_charges_msg": "The laptop's batteries need more charge.", + "type": "transform" + } + ], + "flags": [ "WATCH", "SKINTIGHT" ], + "pocket_data": [ + { + "pocket_type": "MAGAZINE_WELL", + "rigid": true, + "holster": true, + "max_contains_volume": "20 L", + "max_contains_weight": "20 kg", + "item_restriction": [ "medium_battery_cell", "medium_plus_battery_cell", "medium_atomic_battery_cell", "medium_disposable_cell" ] + } + ] + }, + { + "id": "vr_laptop_holosuite", + "copy-from": "vr_laptop", + "type": "TOOL_ARMOR", + "name": { "str": "vr rig - holosuite deployed", "str_pl": "vr rigs - holosuite deployed" }, + "power_draw": 1000, + "revert_to": "vr_laptop", + "use_action": { "target": "vr_laptop", "msg": "You power down the virtual overlay.", "menu_text": "Turn off", "type": "transform" }, + "flags": [ "WATCH", "TRADER_AVOID" ], + "relic_data": { + "passive_effects": [ + { + "has": "WORN", + "condition": "ALWAYS", + "mutations": [ "PSYCHOPATH", "SCHIZOPHRENIC" ], + "values": [ { "value": "PERCEPTION", "add": 1 } ] + } + ] + } + }, + { + "id": "nano_forge", + "type": "GENERIC", + "category": "tools", + "name": { "str": "folded nanotech forge" }, + "description": "Matrioshka Fabritechnics created this portable nanotech forge for when expeditions are setting up a basecamp far from population centers. Once deployed it can be used to craft ultratech marvels that otherwise are too minute for human crafting.", + "weight": "8464 g", + "volume": "11356 ml", + "price": 5000, + "price_postapoc": 45000, + "looks_like": "forge", + "symbol": "u", + "color": "light_green", + "use_action": { "type": "deploy_furn", "furn_type": "f_nano_forge" }, + "to_hit": -2, + "bashing": 5, + "pocket_data": [ { "pocket_type": "MAGAZINE", "ammo_restriction": { "battery": 5000 } } ], + "relic_data": { "charge_info": { "recharge_type": "periodic", "time": "1 h", "regenerate_ammo": true } }, + "material": [ "superalloy" ], + "flags": [ "DURABLE_MELEE" ] + }, + { + "id": "nano_pseudo_forge", + "type": "TOOL", + "name": { "str": "pseudo nano forge" }, + "description": "This is a crafting_pseudo_item if you have it something is wrong.", + "weight": "6464 g", + "volume": "11356 ml", + "price": 20000, + "to_hit": -2, + "bashing": 9, + "material": [ "plastic", "steel" ], + "qualities": [ [ "NANO_FORGE", 1 ] ], + "symbol": "H", + "color": "light_gray", + "flags": [ "ALLOWS_REMOTE_USE" ] + }, + { + "id": "diamond_press", + "type": "GENERIC", + "category": "tools", + "name": { "str": "folded diamond press" }, + "description": "Matrioshka Fabritechnics this device that can create pressures beyond those that create diamonds. Once deployed it can be used to craft ultratech marvels that require substances of singular qualities.", + "weight": "8464 g", + "volume": "11356 ml", + "price": 5000, + "price_postapoc": 45000, + "looks_like": "kiln", + "symbol": "u", + "color": "light_green", + "use_action": { "type": "deploy_furn", "furn_type": "f_diamond_press" }, + "to_hit": -2, + "bashing": 5, + "material": [ "superalloy" ], + "flags": [ "DURABLE_MELEE" ] + }, + { + "id": "pseudo_diamond_press", + "type": "TOOL", + "name": { "str": "pseudo diamond press" }, + "description": "This is a crafting_pseudo_item if you have it something is wrong.", + "weight": "6464 g", + "volume": "11356 ml", + "price": 20000, + "to_hit": -2, + "bashing": 9, + "material": [ "plastic", "steel" ], + "qualities": [ [ "DIAMONDPRESS", 1 ] ], + "symbol": "H", + "color": "light_gray", + "flags": [ "ALLOWS_REMOTE_USE" ] } ] diff --git a/data/mods/Aftershock/items/weapons.json b/data/mods/Aftershock/items/weapons.json index ff009115cf42d..74a0bd86a0536 100644 --- a/data/mods/Aftershock/items/weapons.json +++ b/data/mods/Aftershock/items/weapons.json @@ -118,6 +118,27 @@ "flags": [ "NO_REPAIR", "NONCONDUCTIVE", "SLOW_WIELD", "DURABLE_MELEE", "LEAK_DAM", "UNARMED_WEAPON" ], "techniques": [ "BRUTAL", "AFS_PRESSURE_CRUNCH" ] }, + { + "id": "afs_freeze_gauntlet", + "type": "GENERIC", + "name": { "str": "psychrophile handling gloves" }, + "description": "These gloves are designed for handling organisms that live in extremely cold temperatures. They can also be used to freeze your foes to death.", + "weight": "3778 g", + "volume": "2 L", + "price": 10000000, + "price_postapoc": 20000, + "material": [ "superalloy" ], + "symbol": "[", + "looks_like": "gauntlets_chitin", + "color": "light_cyan", + "bashing": 3, + "relic_data": { + "passive_effects": [ { "has": "WIELD", "condition": "ALWAYS", "values": [ { "value": "ITEM_DAMAGE_COLD", "add": 43 } ] } ] + }, + "to_hit": 0, + "flags": [ "NO_REPAIR", "NONCONDUCTIVE", "SLOW_WIELD", "DURABLE_MELEE", "UNARMED_WEAPON" ], + "techniques": [ "WBLOCK_1" ] + }, { "id": "afs_rolling_pin_barbed_wire", "type": "GENERIC", diff --git a/data/mods/Aftershock/maps/furniture.json b/data/mods/Aftershock/maps/furniture.json index ebec3b60f3771..c1fe503df4a98 100644 --- a/data/mods/Aftershock/maps/furniture.json +++ b/data/mods/Aftershock/maps/furniture.json @@ -260,6 +260,34 @@ ] } }, + { + "type": "furniture", + "id": "f_cooling_pylon", + "name": "cryo pylon", + "symbol": "#", + "description": "This super chilled pylon is so cold it seems to pull in warmth towards itself and create a light breeze of freezing air.", + "color": "light_cyan", + "move_cost_mod": 15, + "coverage": 80, + "required_str": -1, + "looks_like": "t_column", + "flags": [ "TRANSPARENT", "EMITTER" ], + "emissions": [ "emit_glimmer", "emit_cold_air2_stream" ], + "bash": { + "str_min": 18, + "str_max": 40, + "sound": "clang!", + "sound_fail": "whump.", + "items": [ + { "item": "afs_energy_storage_2", "count": [ 2, 4 ] }, + { "item": "afs_energy_storage_3", "count": [ 1, 2 ] }, + { "item": "afs_material_1", "count": [ 40, 55 ] }, + { "item": "afs_material_2", "count": [ 10, 20 ] }, + { "item": "afs_magnet_2", "count": [ 1, 3 ] }, + { "item": "afs_circuitry_3", "count": [ 0, 1 ] } + ] + } + }, { "type": "furniture", "id": "f_crispr", @@ -305,6 +333,29 @@ ] } }, + { + "type": "furniture", + "id": "f_nano_forge", + "name": "nano forge", + "looks_like": "f_forge", + "description": "Matrioshka Fabritechnics created this portable nanotech forge for when expeditions are setting up a basecamp far from population centers. Once deployed it can be used to craft ultratech marvels that otherwise are too minute for human crafting. Often used in combination with a diamond press.", + "symbol": "*", + "color": "light_gray", + "move_cost_mod": -1, + "coverage": 40, + "required_str": -1, + "crafting_pseudo_item": "nano_pseudo_forge", + "flags": [ "TRANSPARENT", "SEALED", "CONTAINER", "NOITEM", "EASY_DECONSTRUCT" ], + "deconstruct": { "items": [ { "item": "nano_forge", "count": 1 } ] }, + "examine_action": "reload_furniture", + "bash": { + "str_min": 4, + "str_max": 8, + "sound": "crunch!", + "sound_fail": "whump.", + "items": [ { "item": "nano_forge", "count": 1 } ] + } + }, { "type": "furniture", "id": "f_3dprinter", diff --git a/data/mods/Aftershock/maps/lab_cryo_room.json b/data/mods/Aftershock/maps/lab_cryo_room.json new file mode 100644 index 0000000000000..7d5dc23039ef1 --- /dev/null +++ b/data/mods/Aftershock/maps/lab_cryo_room.json @@ -0,0 +1,200 @@ +[ + { + "//": "Aftershock - cryo pod room", + "type": "mapgen", + "method": "json", + "om_terrain": [ "lab_1side" ], + "weight": 120, + "object": { + "fill_ter": "t_thconc_floor", + "rows": [ + "|--------|....|--------|", + "|xP-CC-Px|....|xP-CC-Px|", + "|........|...6|........|", + "|x......c|....|c......x|", + "|x......c|-LL-|c......x|", + "|........|&..&|........|", + "|......................|", + "|....cc.........cc.....|", + "|l...hx.........xh....l|", + "|....cc.........cc.....|", + "|......................|", + "|........C....C........|", + "|.......CP....PC.......|", + "|Wh..................hW|", + "|Rc..................cR|", + "|Wh..................hW|", + "|.......CP....PC.......|", + "|........C....C........|", + "|l....................l|", + "|l...cc.........cc....l|", + "|....hx.........xh.....|", + "|....cc.........cc.....|", + "|........rlllr.........|", + "|----------------------|" + ], + "palettes": [ "lab_palette_aftershock" ], + "furniture": { "P": "f_cooling_pylon", "C": "f_cryo_pod", "&": "f_trashcan", "W": "f_workbench", "R": "f_crispr" }, + "terrain": { "7": "t_console", "*": "t_thconc_floor" }, + "place_traps": [ { "trap": "tr_cryo_pod_switch", "x": [ 5 ], "y": [ 8 ] } ], + "place_monsters": [ { "monster": "GROUP_LAB", "chance": 2, "x": [ 2, 21 ], "y": [ 2, 21 ], "repeat": [ 1, 5 ] } ], + "mapping": { + "l": { "items": [ { "item": "gear_soldier_sidearm", "chance": 10 } ] }, + "C": { "items": [ { "item": "afs_weapons_rare", "chance": 3 } ] }, + "c": { + "items": [ + { "item": "afs_scrapgroup", "chance": 60 }, + { "item": "surgery", "chance": 10 }, + { "item": "chem_lab", "chance": 10 }, + { "item": "schematics", "chance": 5 } + ] + } + }, + "computers": { + "6": { + "name": "Cryopod Live Specimen Testing", + "security": 3, + "options": [ { "name": "UNLOCK ENTRANCE", "action": "unlock", "security": 5 } ], + "failures": [ { "action": "damage" }, { "action": "shutdown" } ] + } + } + } + }, + { + "type": "trap", + "id": "tr_cryo_pod_switch", + "name": "cryo pod switch", + "color": "brown", + "symbol": "+", + "visibility": 99, + "avoidance": 99, + "difficulty": 99, + "action": "map_regen", + "map_regen": "cryo_pod_open", + "benign": false + }, + { + "type": "mapgen", + "update_mapgen_id": "cryo_pod_open", + "method": "json", + "object": { + "place_nested": [ + { + "chunks": [ [ "open_cryo_pod1", 5 ], [ "open_cryo_pod2", 50 ], [ "open_cryo_pod3", 5 ], [ "open_cryo_pod4", 5 ], [ "null", 35 ] ], + "x": 9, + "y": 6 + }, + { + "chunks": [ [ "open_cryo_pod1", 5 ], [ "open_cryo_pod2", 50 ], [ "open_cryo_pod3", 5 ], [ "open_cryo_pod4", 5 ], [ "null", 35 ] ], + "x": 14, + "y": 11 + }, + { + "chunks": [ [ "open_cryo_pod1", 5 ], [ "open_cryo_pod2", 50 ], [ "open_cryo_pod3", 10 ], [ "open_cryo_pod4", 5 ], [ "null", 30 ] ], + "x": 8, + "y": 7 + }, + { + "chunks": [ [ "open_cryo_pod1", 5 ], [ "open_cryo_pod2", 50 ], [ "open_cryo_pod3", 5 ], [ "open_cryo_pod4", 10 ], [ "null", 35 ] ], + "x": 15, + "y": 12 + }, + { + "chunks": [ [ "open_cryo_pod1", 5 ], [ "open_cryo_pod2", 50 ], [ "open_cryo_pod3", 5 ], [ "open_cryo_pod4", 5 ], [ "null", 35 ] ], + "x": 8, + "y": 11 + }, + { + "chunks": [ [ "open_cryo_pod1", 5 ], [ "open_cryo_pod2", 50 ], [ "open_cryo_pod3", 5 ], [ "open_cryo_pod4", 5 ], [ "null", 35 ] ], + "x": 15, + "y": 16 + }, + { + "chunks": [ [ "open_cryo_pod1", 5 ], [ "open_cryo_pod2", 50 ], [ "open_cryo_pod3", 5 ], [ "open_cryo_pod4", 5 ], [ "null", 35 ] ], + "x": 9, + "y": 12 + } + ] + } + }, + { + "type": "palette", + "id": "lab_palette_aftershock", + "furniture": { + "6": "f_console", + "x": "f_console_broken", + "b": "f_bed", + "l": "f_locker", + "X": [ "f_cardboard_box", "f_crate_c" ], + "r": "f_rack", + "d": "f_desk", + "s": "f_dresser", + "h": "f_chair", + "f": "f_fridge", + "t": "f_table", + "i": "f_filing_cabinet", + "c": "f_counter", + "S": "f_sink", + "T": "f_toilet", + "#": "f_null", + "]": "f_bookcase", + "^": "f_rubble_rock" + }, + "terrain": { + "g": "t_reinforced_glass", + "G": "t_reinforced_door_glass_lab_c", + ".": "t_thconc_floor", + ",": "t_strconc_floor", + "-": "t_concrete_wall", + "|": "t_concrete_wall", + "+": "t_door_glass_frosted_lab_c", + "W": "t_door_lab_c", + "M": "t_door_metal_lab_c", + "L": "t_door_metal_locked", + "#": "t_rock", + "C": "t_thconc_floor", + "P": "t_thconc_floor" + }, + "toilets": { "T": { } } + }, + { + "type": "palette", + "id": "lab_loot_research", + "mapping": { + "c": { + "items": [ + { "item": "tools_science", "chance": 10 }, + { "item": "dissection", "chance": 10 }, + { "item": "chem_lab", "chance": 10 }, + { "item": "mut_lab", "chance": 2 } + ] + }, + "S": { "items": [ { "item": "drugs_heal_simple", "chance": 10 }, { "item": "harddrugs", "chance": 5 } ] }, + "X": { + "items": [ + { "item": "chem_lab", "chance": 10 }, + { "item": "mut_lab", "chance": 2 }, + { "item": "robots", "chance": 5 }, + { "item": "science", "chance": 5 }, + { "item": "sewage_plant", "chance": 5 }, + { "item": "harddrugs", "chance": 5 }, + { "item": "softdrugs", "chance": 5 } + ] + }, + "d": { "items": [ { "item": "office", "chance": 20 }, { "item": "science", "chance": 5 } ] }, + "h": { "item": [ { "item": "coat_lab", "chance": 5 } ] }, + "]": { "items": [ { "item": "manuals", "chance": 10 }, { "item": "textbooks", "chance": 10 } ] }, + "l": { + "items": [ + { "item": "office", "chance": 10 }, + { "item": "science", "chance": 10 }, + { "item": "harddrugs", "chance": 3 }, + { "item": "softdrugs", "chance": 3 }, + { "item": "dresser", "chance": 3 }, + { "item": "lab_torso", "chance": 3 }, + { "item": "lab_pants", "chance": 3 } + ] + } + } + } +] diff --git a/data/mods/Aftershock/maps/nested/lab.json b/data/mods/Aftershock/maps/nested/lab.json new file mode 100644 index 0000000000000..0a5dc61f3f4eb --- /dev/null +++ b/data/mods/Aftershock/maps/nested/lab.json @@ -0,0 +1,29 @@ +[ + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "open_cryo_pod1", + "object": { "mapgensize": [ 1, 1 ], "place_npcs": [ { "class": "cryo_hacker", "x": 0, "y": 0 } ] } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "open_cryo_pod2", + "object": { + "mapgensize": [ 1, 1 ], + "place_monsters": [ { "monster": "GROUP_CRYO_LAB", "x": [ 0 ], "y": [ 0 ], "density": 0.01, "repeat": [ 1, 3 ] } ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "open_cryo_pod3", + "object": { "mapgensize": [ 1, 1 ], "place_npcs": [ { "class": "cryo_doctor", "x": 0, "y": 0 } ] } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "open_cryo_pod4", + "object": { "mapgensize": [ 1, 1 ], "place_npcs": [ { "class": "cryo_scientist", "x": 0, "y": 0 } ] } + } +] diff --git a/data/mods/Aftershock/mobs/monster_groups.json b/data/mods/Aftershock/mobs/monster_groups.json index 5ea6e4fb95f05..60d2cbb9b4af5 100644 --- a/data/mods/Aftershock/mobs/monster_groups.json +++ b/data/mods/Aftershock/mobs/monster_groups.json @@ -42,14 +42,14 @@ { "type": "monstergroup", "name": "GROUP_MI-GO_BASE_COMMON", - "monsters": [ { "monster": "afs_mon_migoturret", "freq": 20, "cost_multiplier": 4 } ] + "monsters": [ { "monster": "afs_mon_migoturret", "freq": 120, "cost_multiplier": 1 } ] }, { "type": "monstergroup", "name": "GROUP_MI-GO_BASE_BOSS", "//": "Mi-go base defenders for major boss battles.", "default": "mon_mi_go_guard", - "monsters": [ { "monster": "afs_mon_migoturret", "freq": 50, "cost_multiplier": 3, "pack_size": [ 2, 3 ] } ] + "monsters": [ { "monster": "afs_mon_migoturret", "freq": 150, "cost_multiplier": 1, "pack_size": [ 2, 3 ] } ] }, { "type": "monstergroup", @@ -153,7 +153,23 @@ "is_animal": true, "monsters": [ { "monster": "mon_uplifted_octupus", "freq": 3, "cost_multiplier": 10 }, - { "monster": "mon_zombie_upliftedoctopus", "freq": 1, "cost_multiplier": 10 } + { "monster": "mon_zombie_upliftedoctopus", "freq": 1, "cost_multiplier": 10 }, + { "monster": "mon_deep_go", "freq": 1, "cost_multiplier": 10, "starts": 500 }, + { "monster": "mon_deep_go_slaver", "freq": 1, "cost_multiplier": 10, "starts": 1086 } + ] + }, + { + "type": "monstergroup", + "name": "GROUP_CRYO_LAB", + "default": "mon_mutant_cryo", + "monsters": [ + { "monster": "mon_mutant_experimental", "freq": 30, "cost_multiplier": 2 }, + { "monster": "mon_mutant_evolved", "freq": 5, "cost_multiplier": 10 }, + { "monster": "mon_broken_cyborg", "freq": 8, "cost_multiplier": 10 }, + { "monster": "mon_mutant_cryo", "freq": 40, "cost_multiplier": 2 }, + { "monster": "mon_mi_go", "freq": 5, "cost_multiplier": 10, "starts": 500 }, + { "monster": "mon_shoggoth", "freq": 3, "cost_multiplier": 10, "starts": 1086 }, + { "monster": "mon_cryokinetic", "freq": 8, "cost_multiplier": 10 } ] }, { diff --git a/data/mods/Aftershock/mobs/mutants.json b/data/mods/Aftershock/mobs/mutants.json new file mode 100644 index 0000000000000..b836019037e09 --- /dev/null +++ b/data/mods/Aftershock/mobs/mutants.json @@ -0,0 +1,58 @@ +[ + { + "id": "mon_mutant_cryo", + "type": "MONSTER", + "name": { "str": "frost maddened human" }, + "description": "Sky blue irises cover the entirety of the eye. What happened to this person during their deep freeze?", + "default_faction": "mutant", + "looks_like": "chud", + "bodytype": "human", + "species": [ "HUMAN" ], + "volume": "62500 ml", + "weight": "81500 g", + "hp": 80, + "speed": 100, + "material": [ "flesh" ], + "symbol": "@", + "color": "magenta", + "aggression": 40, + "morale": 100, + "melee_skill": 4, + "melee_dice": 1, + "melee_dice_sides": 2, + "melee_damage": [ { "damage_type": "cold", "amount": 4 } ], + "melee_cut": 0, + "dodge": 2, + "harvest": "human", + "vision_day": 30, + "vision_night": 3, + "death_drops": "cryo_lab_drops", + "death_function": [ "NORMAL" ], + "anger_triggers": [ "FRIEND_DIED", "FRIEND_ATTACKED", "HURT" ], + "flags": [ "SEES", "HEARS", "SMELLS", "BASHES", "GROUP_BASH", "HUMAN", "CAN_OPEN_DOORS", "PATH_AVOID_DANGER_2", "COLDPROOF" ] + }, + { + "id": "mon_cryokinetic", + "type": "MONSTER", + "copy-from": "mon_mutant_cryo", + "description": "Sky blue irises with grey floating flecks cover the entirety of the eye. Flurries seem to emanate from around them.", + "hp": 90, + "color": "light_blue", + "aggression": 30, + "morale": 100, + "melee_skill": 4, + "melee_dice": 2, + "melee_dice_sides": 4, + "melee_damage": [ { "damage_type": "cold", "amount": 8 } ], + "melee_cut": 0, + "dodge": 3, + "special_attacks": [ + { + "type": "spell", + "spell_data": { "id": "cryo_blast", "min_level": 5 }, + "cooldown": 20, + "monster_message": "A burst of frozen air explodes from their lungs!" + } + ] + } +] diff --git a/data/mods/Aftershock/mutations/mutations.json b/data/mods/Aftershock/mutations/mutations.json index fbc7004b19422..b8444aab752c1 100644 --- a/data/mods/Aftershock/mutations/mutations.json +++ b/data/mods/Aftershock/mutations/mutations.json @@ -662,5 +662,17 @@ "id": "LEG_TENTACLES", "copy-from": "LEG_TENTACLES", "extend": { "allow_soft_gear": true } + }, + { + "type": "mutation", + "id": "CHEMIMBALANCE", + "copy-from": "CHEMIMBALANCE", + "extend": { "category": [ "MIGO" ] } + }, + { + "type": "mutation", + "id": "SCHIZOPHRENIC", + "copy-from": "SCHIZOPHRENIC", + "extend": { "category": [ "MIGO" ] } } ] diff --git a/data/mods/Aftershock/npcs/classes.json b/data/mods/Aftershock/npcs/classes.json index 97868873daeff..2d21e9a341777 100644 --- a/data/mods/Aftershock/npcs/classes.json +++ b/data/mods/Aftershock/npcs/classes.json @@ -160,6 +160,36 @@ "faction": "whately_family", "gender": "male" }, + { + "type": "npc", + "id": "cryo_hacker", + "name_suffix": "thawed hacker", + "class": "CRYO_HACKER", + "attitude": 0, + "mission": 7, + "chat": "TALK_THAWED_1", + "faction": "no_faction" + }, + { + "type": "npc", + "id": "cryo_doctor", + "name_suffix": "thawed doctor", + "class": "CRYO_DOCTOR", + "attitude": 0, + "mission": 7, + "chat": "TALK_THAWED_1", + "faction": "no_faction" + }, + { + "type": "npc", + "id": "cryo_scientist", + "name_suffix": "thawed scientist", + "class": "CRYO_SCIENTIST", + "attitude": 0, + "mission": 7, + "chat": "TALK_THAWED_1", + "faction": "no_faction" + }, { "type": "npc", "id": "sadie", diff --git a/data/mods/Aftershock/npcs/cyropod_classes.json b/data/mods/Aftershock/npcs/cyropod_classes.json new file mode 100644 index 0000000000000..649000bab8128 --- /dev/null +++ b/data/mods/Aftershock/npcs/cyropod_classes.json @@ -0,0 +1,192 @@ +[ + { + "type": "npc_class", + "id": "CRYO_HACKER", + "name": { "str": "Thawed Hacker" }, + "job_description": "I'm looking for some choice systems to hack.", + "traits": [ + { "group": "BG_survival_story_TEENAGER" }, + { "group": "NPC_starting_traits" }, + { "group": "Appearance_demographics" }, + { "trait": "AFS_CRYOADAPTATION" } + ], + "bonus_str": { "rng": [ -4, 0 ] }, + "bonus_dex": { "rng": [ -2, 0 ] }, + "bonus_int": { "rng": [ 1, 5 ] }, + "bonus_per": { "rng": [ -2, 0 ] }, + "skills": [ + { "skill": "ALL", "level": { "mul": [ { "one_in": 3 }, { "sum": [ { "dice": [ 2, 2 ] }, { "rng": [ -1, -2 ] } ] } ] } }, + { "skill": "electronics", "bonus": { "rng": [ 1, 4 ] } }, + { "skill": "computer", "bonus": { "rng": [ 3, 6 ] } } + ] + }, + { + "type": "npc_class", + "id": "CRYO_DOCTOR", + "name": { "str": "Thawed Doctor" }, + "job_description": "I'm looking for wounded to help.", + "traits": [ + { "group": "BG_survival_story_MEDICAL" }, + { "group": "NPC_starting_traits" }, + { "group": "Appearance_demographics" }, + { "trait": "AFS_CRYOADAPTATION" }, + { "trait": "PROF_MED" } + ], + "bonus_str": { "rng": [ -2, 0 ] }, + "bonus_int": { "rng": [ 0, 2 ] }, + "bonus_per": { "one_in": 4 }, + "skills": [ + { "skill": "ALL", "level": { "mul": [ { "one_in": 3 }, { "sum": [ { "dice": [ 3, 2 ] }, { "rng": [ -1, -3 ] } ] } ] } }, + { "skill": "firstaid", "bonus": { "rng": [ 2, 6 ] } } + ] + }, + { + "type": "npc_class", + "id": "CRYO_SCIENTIST", + "name": { "str": "Thawed Scientist" }, + "job_description": "I'm looking for clues concerning these monsters' origins…", + "traits": [ + { "group": "BG_survival_story_LAB" }, + { "group": "NPC_starting_traits" }, + { "group": "Appearance_demographics" }, + { "trait": "AFS_CRYOADAPTATION" } + ], + "bonus_str": { "rng": [ -1, -3 ] }, + "bonus_dex": { "rng": [ -1, 0 ] }, + "bonus_int": { "rng": [ 2, 5 ] }, + "skills": [ + { "skill": "ALL", "level": { "mul": [ { "one_in": 3 }, { "sum": [ { "dice": [ 2, 2 ] }, { "constant": -4 } ] } ] } }, + { "skill": "computer", "bonus": { "rng": [ 1, 5 ] } }, + { "skill": "electronics", "bonus": { "rng": [ 1, 5 ] } }, + { "skill": "firstaid", "bonus": { "rng": [ 1, 4 ] } } + ] + }, + { + "id": "TALK_THAWED_1", + "type": "talk_topic", + "dynamic_line": { + "npc_has_var": "thawed_has_talked", + "type": "dialogue", + "context": "thawed", + "value": "yes", + "no": "What year is it? How long have I been asleep?", + "yes": "Anymore bad news?" + }, + "speaker_effect": { "effect": { "npc_add_var": "thawed_has_talked", "type": "dialogue", "context": "thawed", "value": "yes" } }, + "responses": [ + { + "switch": true, + "condition": { "npc_has_var": "thawed_has_talked", "type": "dialogue", "context": "thawed", "value": "yes" }, + "text": "Hey. Let's chat for a second.", + "topic": "TALK_STRANGER_NEUTRAL" + }, + { + "switch": true, + "default": true, + "text": "I thawed you out of that pod. Listen, I could use your help…", + "trial": { "type": "PERSUADE", "difficulty": 0 }, + "success": { "topic": "TALK_THAWED_FRIENDLY", "opinion": { "trust": 1, "value": 1 } }, + "failure": { "topic": "TALK_THAWED_WARY", "opinion": { "anger": 1, "fear": 1 } } + }, + { + "switch": true, + "default": true, + "text": "If you won't help me, I am going to hurt you.", + "trial": { "type": "INTIMIDATE", "difficulty": 20, "mod": [ [ "AGGRESSION", -2 ], [ "BRAVERY", -2 ] ] }, + "success": { "topic": "TALK_THAWED_FEARFUL", "opinion": { "trust": -4, "fear": 3, "value": -1, "anger": 4 } }, + "failure": { "topic": "TALK_THAWED_BREAKDOWN", "opinion": { "trust": -4, "value": -5, "anger": 10 } } + }, + { + "switch": true, + "default": true, + "text": "Sorry, no need to get angry. I'll get out of your way.", + "topic": "TALK_DONE" + } + ] + }, + { + "id": "TALK_THAWED_FRIENDLY", + "type": "talk_topic", + "dynamic_line": "So what happens now?", + "responses": [ + { + "text": "Come with me. We can help each other out.", + "trial": { "type": "PERSUADE", "difficulty": 0, "mod": [ [ "value", 2 ] ] }, + "success": { "topic": "TALK_AGREE_FOLLOW", "effect": "follow", "opinion": { "trust": 1, "value": 1 } }, + "failure": { "topic": "TALK_DENY_FOLLOW", "effect": "deny_follow", "opinion": { "trust": -1, "fear": 1 } } + }, + { "text": "We both go our separate ways. Enjoy your freedom.", "topic": "TALK_DONE" } + ] + }, + { + "id": "TALK_THAWED_WARY", + "type": "talk_topic", + "dynamic_line": "Why didn't you leave me frozen until things were better?", + "responses": [ + { + "text": "If I didn't thaw you out now, you'd have died in that pod.", + "trial": { "type": "PERSUADE", "difficulty": 5, "mod": [ [ "TRUST", 2 ], [ "VALUE", 2 ] ] }, + "success": { "topic": "TALK_THAWED_FRIENDLY", "opinion": { "trust": 1, "value": 1 } }, + "failure": { "topic": "TALK_THAWED_LEAVES" } + }, + { + "text": "I'm being nice for now. You'd better hope that it lasts.", + "trial": { "type": "INTIMIDATE", "difficulty": 20, "mod": [ [ "AGGRESSION", -2 ], [ "BRAVERY", -2 ] ] }, + "success": { "topic": "TALK_THAWED_FEARFUL", "opinion": { "trust": -4, "fear": 3, "value": -1, "anger": 4 } }, + "failure": { "topic": "TALK_THAWED_BREAKDOWN", "opinion": { "trust": -4, "value": -5, "anger": 10 } } + }, + { "text": "Forget it. Enjoy your freedom.", "topic": "TALK_DONE" } + ] + }, + { + "id": "TALK_THAWED_FEARFUL", + "type": "talk_topic", + "dynamic_line": "I'm sorry, what can I do to help you?", + "responses": [ + { + "text": "Follow me and do my bidding, then.", + "trial": { "type": "INTIMIDATE", "difficulty": 20, "mod": [ [ "FEAR", 8 ], [ "VALUE", 2 ], [ "TRUST", 2 ], [ "BRAVERY", -2 ] ] }, + "success": { "topic": "TALK_AGREE_FOLLOW", "effect": "follow", "opinion": { "trust": -4, "fear": 3, "value": -1, "anger": 4 } }, + "failure": { "topic": "TALK_THAWED_BREAKDOWN", "opinion": { "trust": 4, "value": -5, "anger": 10 } } + }, + { + "text": "Get out of my sight.", + "topic": "TALK_DONE", + "effect": "flee", + "opinion": { "trust": -1, "fear": -2, "anger": -2 } + }, + { + "text": "No, *I'm* sorry, I didn't mean that. Go do what you want.", + "trial": { "type": "PERSUADE", "difficulty": 10 }, + "success": { "topic": "TALK_DONE", "opinion": { "trust": 1, "value": 1, "anger": -1 } }, + "failure": { "topic": "TALK_THAWED_BREAKDOWN", "opinion": { "trust": 4, "value": -5, "anger": 10 } } + } + ] + }, + { + "id": "TALK_THAWED_BREAKDOWN", + "type": "talk_topic", + "dynamic_line": "How dare you threaten me!", + "responses": [ + { + "text": "Run while you still can!", + "trial": { "type": "INTIMIDATE", "difficulty": 20, "mod": [ [ "FEAR", 8 ], [ "VALUE", 2 ], [ "TRUST", 2 ], [ "BRAVERY", -2 ] ] }, + "success": { "topic": "TALK_DONE", "effect": "flee" }, + "failure": { "topic": "TALK_DONE", "effect": "hostile" } + }, + { "text": "Not if I kill you first!", "topic": "TALK_DONE", "effect": "hostile" }, + { + "text": "I'm sorry! I shouldn't have said that!", + "trial": { "type": "PERSUADE", "difficulty": 30 }, + "success": { "topic": "TALK_DONE", "opinion": { "trust": 1, "value": 1, "anger": -1 } }, + "failure": { "topic": "TALK_DONE", "effect": "hostile" } + } + ] + }, + { + "id": "TALK_THAWED_LEAVES", + "type": "talk_topic", + "dynamic_line": "Go freeze yourself. Bye.", + "responses": [ { "text": "Suit yourself.", "topic": "TALK_DONE" } ] + } +] diff --git a/data/mods/Aftershock/player/bionics.json b/data/mods/Aftershock/player/bionics.json index 48c74e199221f..3b97dcc2f612b 100644 --- a/data/mods/Aftershock/player/bionics.json +++ b/data/mods/Aftershock/player/bionics.json @@ -90,6 +90,18 @@ "occupied_bodyparts": [ [ "head", 2 ] ], "enchantments": [ "cranial_explosion" ] }, + { + "id": "bio_cold_absorber", + "type": "bionic", + "name": { "str": "Emergency Insulation" }, + "description": "Described in design documents as emergency insulation to protect against exposure to hard vacuum, this CBM is also useful in any encounter that causes instant frostbite.", + "occupied_bodyparts": [ [ "torso", 5 ], [ "head", 1 ], [ "arm_l", 1 ], [ "arm_r", 1 ], [ "leg_l", 1 ], [ "leg_r", 1 ] ], + "flags": [ "BIONIC_TOGGLED", "BIONIC_NPC_USABLE" ], + "enchantments": [ "protect_cold" ], + "act_cost": "1 kJ", + "react_cost": "1 kJ", + "time": 10 + }, { "type": "bionic", "id": "afs_bio_skullgun", diff --git a/data/mods/Aftershock/recipes/ammo_recipes.json b/data/mods/Aftershock/recipes/ammo_recipes.json index ecc91a85d321e..e8eabc5587292 100644 --- a/data/mods/Aftershock/recipes/ammo_recipes.json +++ b/data/mods/Aftershock/recipes/ammo_recipes.json @@ -34,5 +34,18 @@ [ [ "afs_material_3", 1 ] ], [ [ "afs_energy_storage_2", 1 ] ] ] + }, + { + "type": "recipe", + "result": "arrow_nano", + "category": "CC_AMMO", + "subcategory": "CSC_AMMO_OTHER", + "skill_used": "fabrication", + "difficulty": 4, + "time": "45 m", + "book_learn": [ [ "recipe_unusual_ammos", 3 ] ], + "qualities": [ { "id": "CHEM", "level": 1 }, { "id": "NANO_FORGE", "level": 1 }, { "id": "HAMMER_FINE", "level": 1 } ], + "using": [ [ "nanosmithing_standard", 5 ] ], + "components": [ [ [ "afs_material_2", 4 ] ], [ [ "afs_material_3", 3 ] ] ] } ] diff --git a/data/mods/Aftershock/recipes/bionic_recipes.json b/data/mods/Aftershock/recipes/bionic_recipes.json index 41850a2e9ab18..b1d585037b51f 100644 --- a/data/mods/Aftershock/recipes/bionic_recipes.json +++ b/data/mods/Aftershock/recipes/bionic_recipes.json @@ -272,6 +272,30 @@ [ [ "burnt_out_bionic", 1 ] ] ] }, + { + "type": "recipe", + "activity_level": "fake", + "result": "bio_cold_absorber", + "category": "CC_ELECTRONIC", + "subcategory": "CSC_ELECTRONIC_CBMS", + "skill_used": "electronics", + "skills_required": [ "firstaid", 5 ], + "difficulty": 7, + "time": "6 h", + "reversible": true, + "decomp_learn": 7, + "book_learn": [ [ "recipes_cryolab", 5 ] ], + "using": [ [ "soldering_standard", 400 ] ], + "qualities": [ { "id": "BIONIC_ASSEMBLY", "level": 2 } ], + "components": [ + [ [ "afs_biomaterial_4", 6 ] ], + [ [ "afs_material_3", 12 ] ], + [ [ "afs_material_2", 2 ] ], + [ [ "afs_circuitry_2", 2 ] ], + [ [ "afs_neural_io_2", 2 ] ], + [ [ "burnt_out_bionic", 1 ] ] + ] + }, { "type": "recipe", "activity_level": "fake", diff --git a/data/mods/Aftershock/recipes/comestible_recipes.json b/data/mods/Aftershock/recipes/comestible_recipes.json index 59792fa5d73ed..b5f6c6ca2cca4 100644 --- a/data/mods/Aftershock/recipes/comestible_recipes.json +++ b/data/mods/Aftershock/recipes/comestible_recipes.json @@ -40,6 +40,44 @@ "tools": [ [ [ "surface_heat", 5, "LIST" ] ] ], "components": [ [ [ "afs_sundew", 1 ] ], [ [ "morphine", 1 ] ] ] }, + { + "type": "recipe", + "activity_level": "fake", + "result": "cream_prot_cold", + "category": "CC_CHEM", + "subcategory": "CSC_CHEM_DRUGS", + "skill_used": "chemistry", + "difficulty": 5, + "time": "20 m", + "book_learn": [ [ "recipes_resistance", 5 ] ], + "qualities": [ { "id": "CHEM", "level": 3 } ], + "tools": [ [ [ "surface_heat", 15, "LIST" ] ] ], + "components": [ + [ [ "afs_biomaterial_1", 8 ] ], + [ [ "afs_biomaterial_2", 3 ] ], + [ [ "afs_biomaterial_3", 1 ] ], + [ [ "morphine", 5 ], [ "heroin", 2 ] ] + ] + }, + { + "type": "recipe", + "activity_level": "fake", + "result": "cream_greater_prot_cold", + "category": "CC_CHEM", + "subcategory": "CSC_CHEM_DRUGS", + "skill_used": "chemistry", + "difficulty": 5, + "time": "20 m", + "book_learn": [ [ "recipes_resistance", 5 ] ], + "qualities": [ { "id": "CHEM", "level": 3 } ], + "tools": [ [ [ "surface_heat", 15, "LIST" ] ] ], + "components": [ + [ [ "afs_biomaterial_1", 8 ] ], + [ [ "afs_biomaterial_2", 5 ] ], + [ [ "afs_biomaterial_3", 2 ] ], + [ [ "morphine", 8 ], [ "heroin", 3 ] ] + ] + }, { "type": "recipe", "activity_level": "NO_EXERCISE", diff --git a/data/mods/Aftershock/recipes/grenades.json b/data/mods/Aftershock/recipes/grenades.json index 4b5114adb296a..b37a33cf5b380 100644 --- a/data/mods/Aftershock/recipes/grenades.json +++ b/data/mods/Aftershock/recipes/grenades.json @@ -12,5 +12,19 @@ "qualities": [ { "id": "SCREW_FINE", "level": 1 } ], "using": [ [ "soldering_standard", 10 ] ], "components": [ [ [ "afs_energy_storage_2", 1 ] ], [ [ "afs_material_1", 2 ] ] ] + }, + { + "result": "grenade_cryo", + "type": "recipe", + "activity_level": "fake", + "category": "CC_WEAPON", + "subcategory": "CSC_WEAPON_EXPLOSIVE", + "skill_used": "electronics", + "difficulty": 7, + "autolearn": true, + "time": "5 m", + "qualities": [ { "id": "DIAMONDPRESS", "level": 1 } ], + "using": [ [ "soldering_standard", 10 ] ], + "components": [ [ [ "afs_energy_storage_3", 1 ] ], [ [ "afs_material_1", 3 ] ], [ [ "afs_energy_storage_2", 2 ] ] ] } ] diff --git a/data/mods/Aftershock/recipes/robot_recipes.json b/data/mods/Aftershock/recipes/robot_recipes.json index 188885269e55b..9b9374968ba41 100644 --- a/data/mods/Aftershock/recipes/robot_recipes.json +++ b/data/mods/Aftershock/recipes/robot_recipes.json @@ -27,7 +27,7 @@ [ [ "laser_cannon_xray", 1 ] ], [ [ "medium_storage_battery", 1 ] ], [ [ "xray_laser_barrel", 3 ] ], - [ [ "power_supply", 1 ] ], + [ [ "afs_energy_storage_3", 1 ] ], [ [ "robot_controls", 1 ] ], [ [ "turret_chassis", 1 ] ] ] @@ -63,7 +63,7 @@ [ [ "afs_circuitry_3", 1 ] ], [ [ "afs_circuitry_1", 4 ] ], [ [ "afs_energy_storage_3", 1 ] ], - [ [ "afs_material_1", 2 ] ] + [ [ "afs_material_1", 7 ] ] ] }, { @@ -75,7 +75,7 @@ [ [ "broken_utilibot_beehive", 1 ] ], [ [ "afs_circuitry_1", 4 ] ], [ [ "afs_energy_storage_3", 1 ] ], - [ [ "afs_material_1", 6 ] ], + [ [ "afs_material_1", 8 ] ], [ [ "robot_controls", 1 ] ] ] } diff --git a/data/mods/Aftershock/recipes/ultratech_tools.json b/data/mods/Aftershock/recipes/ultratech_tools.json new file mode 100644 index 0000000000000..bc9d3cc9cac8e --- /dev/null +++ b/data/mods/Aftershock/recipes/ultratech_tools.json @@ -0,0 +1,76 @@ +[ + { + "type": "recipe", + "activity_level": "MODERATE_EXERCISE", + "result": "nano_forge", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_TOOLS", + "skill_used": "fabrication", + "difficulty": 8, + "time": "3 h", + "reversible": true, + "decomp_learn": 4, + "book_learn": [ [ "schematics_nano_forge", 6 ], [ "recipes_cryolab", 9 ], [ "recipe_augs", 9 ] ], + "qualities": [ + { "id": "HAMMER", "level": 2 }, + { "id": "SAW_M", "level": 1 }, + { "id": "SCREW", "level": 1 }, + { "id": "WRENCH", "level": 1 } + ], + "tools": [ [ [ "welder", 400 ], [ "welder_crude", 600 ], [ "toolset", 600 ], [ "soldering_iron", 600 ], [ "oxy_torch", 80 ] ] ], + "proficiencies": [ { "proficiency": "prof_metalworking" } ], + "components": [ + [ [ "afs_material_4", 8 ] ], + [ [ "afs_material_2", 12 ] ], + [ [ "cable", 40 ] ], + [ [ "afs_magnet_3", 4 ] ], + [ [ "afs_magnet_2", 12 ] ], + [ [ "afs_circuitry_1", 20 ] ], + [ [ "afs_magnet_3", 4 ] ], + [ [ "ai_module_advanced", 1 ] ], + [ [ "afs_circuitry_3", 1 ] ], + [ [ "afs_energy_storage_1", 4 ] ], + [ [ "afs_energy_storage_2", 3 ] ], + [ [ "afs_energy_storage_3", 1 ] ], + [ [ "afs_circuitry_2", 5 ] ] + ] + }, + { + "type": "recipe", + "activity_level": "MODERATE_EXERCISE", + "result": "diamond_press", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_TOOLS", + "skill_used": "fabrication", + "difficulty": 8, + "time": "3 h", + "reversible": true, + "decomp_learn": 4, + "autolearn": true, + "book_learn": [ [ "schematics_diamond_press", 7 ], [ "recipes_cryolab", 9 ], [ "recipe_augs", 9 ] ], + "qualities": [ + { "id": "HAMMER", "level": 2 }, + { "id": "SAW_M", "level": 1 }, + { "id": "SCREW", "level": 1 }, + { "id": "WRENCH", "level": 1 } + ], + "tools": [ [ [ "welder", 300 ], [ "welder_crude", 450 ], [ "toolset", 450 ], [ "soldering_iron", 450 ], [ "oxy_torch", 60 ] ] ], + "proficiencies": [ { "proficiency": "prof_metalworking" } ], + "components": [ + [ [ "afs_material_3", 8 ] ], + [ [ "afs_material_2", 12 ] ], + [ [ "afs_material_1", 28 ] ], + [ [ "cable", 40 ] ], + [ [ "afs_magnet_3", 8 ] ], + [ [ "afs_magnet_2", 12 ] ], + [ [ "afs_circuitry_1", 20 ] ], + [ [ "afs_magnet_3", 4 ] ], + [ [ "ai_module_basic", 1 ] ], + [ [ "afs_circuitry_3", 1 ] ], + [ [ "afs_energy_storage_1", 2 ] ], + [ [ "afs_energy_storage_2", 2 ] ], + [ [ "afs_energy_storage_3", 1 ] ], + [ [ "afs_circuitry_2", 3 ] ] + ] + } +] diff --git a/data/mods/Aftershock/requirements.json b/data/mods/Aftershock/requirements.json index f5acedd30accf..031c765330eb6 100644 --- a/data/mods/Aftershock/requirements.json +++ b/data/mods/Aftershock/requirements.json @@ -1,4 +1,11 @@ [ + { + "id": "nanosmithing_standard", + "type": "requirement", + "//": "Includes forging resources as well as tools needed for most physical material hypertech crafting", + "qualities": [ { "id": "ANVIL", "level": 3 }, { "id": "DIAMONDPRESS", "level": 1 }, { "id": "NANO_FORGE", "level": 1 } ], + "tools": [ [ [ "nano_forge", 20 ] ], [ [ "tongs", -1 ] ] ] + }, { "id": "bone_sturdy", "type": "requirement", @@ -20,7 +27,7 @@ { "id": "edible_lard", "type": "requirement", - "//": "Lard that is safe for consumption.", + "//": "Lard that is 'safe' for consumption.", "components": [ [ [ "lard", 1 ], diff --git a/data/mods/Aftershock/spells.json b/data/mods/Aftershock/spells.json new file mode 100644 index 0000000000000..16cbb2bc480dd --- /dev/null +++ b/data/mods/Aftershock/spells.json @@ -0,0 +1,150 @@ +[ + { + "id": "head_go_bye", + "type": "SPELL", + "name": "Cranial Explosion", + "description": "This fake spell occurs on cranial bomb activation. Likely fatal.", + "effect": "attack", + "shape": "blast", + "valid_targets": [ "self" ], + "flags": [ "SILENT", "NO_LEGS", "NO_HANDS", "NO_PROJECTILE" ], + "min_damage": 158, + "max_damage": 212, + "damage_type": "heat" + }, + { + "id": "skullgun_snapback", + "type": "SPELL", + "name": "Skullgun Snapback", + "//": "Used for activating skullgun cbm, not castable", + "description": "This fake spell occurs on skullgun activation. May be fatal if done in critical condition.", + "effect": "attack", + "shape": "blast", + "valid_targets": [ "self" ], + "flags": [ "SILENT", "NO_LEGS", "NO_HANDS", "NO_FAIL", "NO_PROJECTILE" ], + "min_damage": 10, + "max_damage": 10, + "message": "Your head snaps back from the force of the shot.", + "damage_type": "biological" + }, + { + "id": "afs_generic_free_turn", + "type": "SPELL", + "name": "Aftershock Extra Turn", + "description": "Grants you an extra turn.", + "message": "", + "valid_targets": [ "self" ], + "effect": "mod_moves", + "shape": "blast", + "min_damage": 100, + "max_damage": 100, + "base_casting_time": 1 + }, + { + "id": "afs_generic_speed_bonus", + "type": "SPELL", + "name": "Aftershock Stacking Speed Bonus", + "description": "Grants you a stackable speed bonus.", + "message": "", + "valid_targets": [ "self" ], + "effect": "attack", + "effect_str": "afs_generic_speed_bonus", + "shape": "blast", + "flags": [ "NO_PROJECTILE" ], + "base_casting_time": 1, + "min_duration": 100, + "max_duration": 100 + }, + { + "id": "cream_prot_cold", + "type": "SPELL", + "name": "heat retention cream", + "//": "Used for heat retention cream not castable", + "description": "You rub the thick cream all over your body in preparation for the expected cold.", + "valid_targets": [ "self" ], + "flags": [ "SILENT", "NO_LEGS", "NO_HANDS" ], + "effect": "spawn_item", + "effect_str": "cold_res_cream", + "shape": "blast", + "max_level": 0, + "min_damage": 0, + "max_damage": 0, + "damage_increment": 0, + "damage_type": "biological", + "difficulty": 0, + "spell_class": "NONE", + "base_casting_time": 6000, + "base_energy_cost": 2, + "min_duration": 720000, + "max_duration": 720000 + }, + { + "id": "cream_greater_prot_cold", + "type": "SPELL", + "name": "heat retention cream xtreme", + "//": "Used for heat retention cream not castable", + "description": "You rub the thick cream all over your body in preparation for unbearable cold.", + "valid_targets": [ "self" ], + "flags": [ "SILENT", "NO_LEGS", "NO_HANDS" ], + "effect": "spawn_item", + "effect_str": "cold_res_cream_greater", + "shape": "blast", + "max_level": 0, + "min_damage": 0, + "max_damage": 0, + "damage_increment": 0, + "damage_type": "biological", + "difficulty": 0, + "spell_class": "NONE", + "base_casting_time": 6000, + "base_energy_cost": 2, + "min_duration": 720000, + "max_duration": 720000 + }, + { + "id": "protection_from_cold", + "type": "SPELL", + "name": "emergency insulation", + "//": "Used for cbm not castable", + "description": "You feel a jolt through your body as energy pulses through the wires in your flesh.", + "valid_targets": [ "self" ], + "flags": [ "SILENT", "NO_LEGS", "NO_HANDS", "NO_PROJECTILE" ], + "effect": "attack", + "effect_str": "afs_cold_protect", + "shape": "blast", + "max_level": 0, + "spell_class": "NONE", + "base_casting_time": 1, + "min_duration": 1000, + "max_duration": 1000 + }, + { + "id": "cryo_blast", + "type": "SPELL", + "name": "Cryokinetic blast", + "description": "You blast a cone of frigid air toward the target.", + "effect": "attack", + "shape": "cone", + "valid_targets": [ "ally", "hostile", "ground" ], + "flags": [ "SILENT", "VERBAL", "NO_FAIL", "NO_LEGS", "NO_HANDS" ], + "max_level": 20, + "min_damage": 24, + "max_damage": 68, + "damage_increment": 1.2, + "min_aoe": 30, + "max_aoe": 60, + "aoe_increment": 1.4, + "min_range": 6, + "max_range": 20, + "range_increment": 1.0, + "base_casting_time": 200, + "base_energy_cost": 350, + "energy_source": "MANA", + "difficulty": 4, + "field_id": "fd_cold_air2", + "min_field_intensity": 0, + "max_field_intensity": 4, + "field_intensity_increment": 0.5, + "damage_type": "cold" + } +] diff --git a/data/mods/Aftershock/spells/enchantments.json b/data/mods/Aftershock/spells/enchantments.json index ec037344fd654..7c97e0a896153 100644 --- a/data/mods/Aftershock/spells/enchantments.json +++ b/data/mods/Aftershock/spells/enchantments.json @@ -22,5 +22,11 @@ "id": "melee_optimization", "condition": "ACTIVE", "hit_you_effect": [ { "id": "afs_generic_speed_bonus", "hit_self": true } ] + }, + { + "type": "enchantment", + "id": "protect_cold", + "condition": "ACTIVE", + "values": [ { "value": "ARMOR_COLD", "add": -15 } ] } ] diff --git a/data/mods/Aftershock/spells/spells.json b/data/mods/Aftershock/spells/spells.json deleted file mode 100644 index e5d74b0a80f81..0000000000000 --- a/data/mods/Aftershock/spells/spells.json +++ /dev/null @@ -1,58 +0,0 @@ -[ - { - "id": "head_go_bye", - "type": "SPELL", - "name": "Cranial Explosion", - "description": "This fake spell occurs on cranial bomb activation. Likely fatal.", - "effect": "attack", - "shape": "blast", - "valid_targets": [ "self" ], - "flags": [ "SILENT", "NO_LEGS", "NO_HANDS", "NO_PROJECTILE" ], - "min_damage": 158, - "max_damage": 212, - "damage_type": "heat" - }, - { - "id": "skullgun_snapback", - "type": "SPELL", - "name": "Skullgun Snapback", - "//": "Used for activating skullgun cbm, not castable", - "description": "This fake spell occurs on skullgun activation. May be fatal if done in critical condition.", - "effect": "attack", - "shape": "blast", - "valid_targets": [ "self" ], - "flags": [ "SILENT", "NO_LEGS", "NO_HANDS", "NO_FAIL", "NO_PROJECTILE" ], - "min_damage": 10, - "max_damage": 10, - "message": "Your head snaps back from the force of the shot.", - "damage_type": "biological" - }, - { - "id": "afs_generic_free_turn", - "type": "SPELL", - "name": "Aftershock Extra Turn", - "description": "Grants you an extra turn.", - "message": "", - "valid_targets": [ "self" ], - "effect": "mod_moves", - "shape": "blast", - "min_damage": 100, - "max_damage": 100, - "base_casting_time": 1 - }, - { - "id": "afs_generic_speed_bonus", - "type": "SPELL", - "name": "Aftershock Stacking Speed Bonus", - "description": "Grants you a stackable speed bonus.", - "message": "", - "valid_targets": [ "self" ], - "effect": "attack", - "effect_str": "afs_generic_speed_bonus", - "shape": "blast", - "flags": [ "NO_PROJECTILE" ], - "base_casting_time": 1, - "min_duration": 100, - "max_duration": 100 - } -] From 1d26dfbba72f9c3bcac268701ffba52a94eea98c Mon Sep 17 00:00:00 2001 From: Maleclypse <54345792+Maleclypse@users.noreply.github.com> Date: Wed, 23 Dec 2020 20:57:57 -0600 Subject: [PATCH 37/47] [ My Sweet Cataclysm ] Chocolate Swamps (#45151) --- data/json/items/comestibles/junkfood.json | 21 ++ .../My_Sweet_Cataclysm/sweet_comestibles.json | 57 ++++++ .../My_Sweet_Cataclysm/sweet_furniture.json | 85 ++++++++ data/mods/My_Sweet_Cataclysm/sweet_items.json | 15 ++ .../sweet_mapgen/sweet_overmap_locations.json | 185 ++++++++++++++++++ .../sweet_mapgen/sweet_overmap_terrain.json | 11 ++ .../sweet_mapgen/sweet_specials.json | 11 ++ .../sweet_mapgen/sweet_terrain.json | 38 ++++ .../My_Sweet_Cataclysm/sweet_materials.json | 21 ++ .../sweet_monster_groups.json | 15 ++ .../My_Sweet_Cataclysm/sweet_monsters.json | 69 +++++++ src/map.cpp | 7 + 12 files changed, 535 insertions(+) create mode 100644 data/mods/My_Sweet_Cataclysm/sweet_furniture.json create mode 100644 data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_overmap_locations.json create mode 100644 data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_overmap_terrain.json create mode 100644 data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_specials.json create mode 100644 data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_terrain.json diff --git a/data/json/items/comestibles/junkfood.json b/data/json/items/comestibles/junkfood.json index 826ac9c471da0..6841bb6df301a 100644 --- a/data/json/items/comestibles/junkfood.json +++ b/data/json/items/comestibles/junkfood.json @@ -316,6 +316,13 @@ "charges": 3, "fun": 3 }, + { + "type": "COMESTIBLE", + "id": "candy3gator", + "name": { "str": "chewy reptilian candy", "str_pl": "chewy reptilian candies" }, + "copy-from": "candy3", + "description": "A handful of colorful fruit-flavored chewy candy shaped in a reptilian fashion. Made by SugarRush." + }, { "type": "COMESTIBLE", "id": "cow_candy", @@ -410,6 +417,13 @@ "vitamins": [ [ "calcium", 4 ], [ "iron", 6 ] ], "fun": 2 }, + { + "type": "COMESTIBLE", + "id": "grahmcrackers_roe", + "name": "graham cracker chunk", + "copy-from": "grahmcrackers", + "description": "Dry and sugary, these cracker pellets will leave you thirsty, but go well with some chocolate and marshmallows. Made by SugarRush!" + }, { "type": "COMESTIBLE", "id": "cookies", @@ -433,6 +447,13 @@ "vitamins": [ [ "calcium", 2 ], [ "iron", 6 ] ], "fun": 7 }, + { + "type": "COMESTIBLE", + "id": "cookies_egg", + "name": "cookie egg", + "copy-from": "cookies", + "description": "Sweet and delicious cookies, shaped like eggs. Made by SugarRush!" + }, { "type": "COMESTIBLE", "id": "syrup", diff --git a/data/mods/My_Sweet_Cataclysm/sweet_comestibles.json b/data/mods/My_Sweet_Cataclysm/sweet_comestibles.json index e61e0c20ab231..6906f43a6b9f6 100644 --- a/data/mods/My_Sweet_Cataclysm/sweet_comestibles.json +++ b/data/mods/My_Sweet_Cataclysm/sweet_comestibles.json @@ -56,6 +56,18 @@ "rot_spawn_chance": 100, "spoils_in": "15 days" }, + { + "type": "COMESTIBLE", + "id": "candy3gator", + "name": { "str": "chewy reptilian candy", "str_pl": "chewy reptilian candies" }, + "description": "A handful of colorful fruit-flavored chewy candy shaped in a reptilian fashion. They're warm to the touch and you can feel a slow beat coming from them. How odd…", + "symbol": "%", + "container": "null", + "copy-from": "candy3", + "rot_spawn": "GROUP_EGG_GUMMY_GATOR", + "rot_spawn_chance": 100, + "spoils_in": "15 days" + }, { "type": "COMESTIBLE", "id": "grahmcrackers", @@ -68,6 +80,18 @@ "rot_spawn_chance": 100, "spoils_in": "20 days" }, + { + "type": "COMESTIBLE", + "id": "grahmcrackers_roe", + "name": "graham cracker roe", + "symbol": "%", + "container": "null", + "description": "Dry and sugary, these cracker pellets will leave you thirsty, but go good with some chocolate and marshmallows. They shiver under your touch. Weird!", + "copy-from": "grahmcrackers", + "rot_spawn": "GROUP_EGG_CRACKER_ROE", + "rot_spawn_chance": 100, + "spoils_in": "20 days" + }, { "type": "COMESTIBLE", "id": "cookies", @@ -80,6 +104,18 @@ "rot_spawn_chance": 100, "spoils_in": "10 days" }, + { + "type": "COMESTIBLE", + "id": "cookies_egg", + "name": "cookie egg", + "symbol": "%", + "container": "null", + "description": "Sweet and delicious cookies, shaped like eggs. They shiver under your touch as if something is inside. Weird!", + "copy-from": "cookies", + "rot_spawn": "GROUP_EGG_COOKIE_EGG", + "rot_spawn_chance": 100, + "spoils_in": "10 days" + }, { "type": "COMESTIBLE", "id": "gum", @@ -131,6 +167,27 @@ "copy-from": "milk_choc", "description": "Baby chocolate cow food, appropriated for adult humans. Spoils rapidly." }, + { + "type": "COMESTIBLE", + "id": "liquid_cacao", + "name": { "str_sp": "liquid cacao" }, + "weight": "258 g", + "color": "white", + "spoils_in": "1 d", + "comestible_type": "DRINK", + "symbol": "~", + "quench": -10, + "healthy": -15, + "calories": 132, + "description": "Liquid unsweetened cacao. Quite bitter to taste.", + "price": 38, + "price_postapoc": 5, + "material": [ "junk" ], + "volume": "250 ml", + "phase": "liquid", + "flags": [ "EATEN_COLD" ], + "fun": -4 + }, { "type": "COMESTIBLE", "id": "milk_reconstituted_choc", diff --git a/data/mods/My_Sweet_Cataclysm/sweet_furniture.json b/data/mods/My_Sweet_Cataclysm/sweet_furniture.json new file mode 100644 index 0000000000000..e751874e3d09c --- /dev/null +++ b/data/mods/My_Sweet_Cataclysm/sweet_furniture.json @@ -0,0 +1,85 @@ +[ + { + "type": "furniture", + "id": "f_rubble_rockcandy", + "name": "pile of rock candy rubble", + "description": "Pile of rock candy shards. Useless?", + "symbol": "^", + "color": "dark_gray", + "move_cost_mod": 6, + "max_volume": "750 L", + "required_str": -1, + "flags": [ + "TRANSPARENT", + "UNSTABLE", + "ROUGH", + "PLACE_ITEM", + "MOUNTABLE", + "CONTAINER", + "SEALED", + "ALLOW_FIELD_EFFECT", + "SHORT", + "RUBBLE" + ], + "examine_action": "rubble" + }, + { + "type": "furniture", + "id": "f_candy_boulder_small", + "name": "small rock candy boulder", + "description": "Blocking your path. Should be easy to move. It can be used as a primitive anvil.", + "symbol": "o", + "color": "dark_gray", + "move_cost_mod": 3, + "coverage": 30, + "required_str": 10, + "crafting_pseudo_item": "boulder_anvil", + "flags": [ "TRANSPARENT", "MINEABLE", "UNSTABLE", "MOUNTABLE", "TINY" ], + "bash": { + "str_min": 16, + "str_max": 40, + "sound": "smash!", + "sound_fail": "thump.", + "items": [ { "item": "rock_candy_chunk", "count": [ 1, 6 ] } ] + } + }, + { + "type": "furniture", + "id": "f_candy_boulder_medium", + "name": "medium rock candy boulder", + "description": "Blocking your path. It'll be a struggle to move. It can be used as a primitive anvil.", + "symbol": "0", + "color": "dark_gray", + "move_cost_mod": 6, + "coverage": 45, + "required_str": 16, + "crafting_pseudo_item": "boulder_anvil", + "flags": [ "NOITEM", "TRANSPARENT", "MINEABLE", "UNSTABLE", "MOUNTABLE", "SHORT", "BASHABLE" ], + "bash": { + "str_min": 32, + "str_max": 80, + "sound": "smash!", + "sound_fail": "thump.", + "items": [ { "item": "rock_candy_chunk", "count": [ 5, 11 ] } ] + } + }, + { + "type": "furniture", + "id": "f_candy_boulder_large", + "name": "large rock candy boulder", + "description": "Now how are you going to move this?", + "symbol": "O", + "color": "dark_gray", + "move_cost_mod": -1, + "coverage": 65, + "required_str": 32, + "flags": [ "NOITEM", "MINEABLE", "BASHABLE", "BLOCK_WIND" ], + "bash": { + "str_min": 64, + "str_max": 160, + "sound": "smash!", + "sound_fail": "thump.", + "items": [ { "item": "rock_candy_chunk", "count": [ 10, 22 ] }, { "item": "sugar", "count": [ 3, 7 ] } ] + } + } +] diff --git a/data/mods/My_Sweet_Cataclysm/sweet_items.json b/data/mods/My_Sweet_Cataclysm/sweet_items.json index 9e8002036ec4f..274223cca9368 100644 --- a/data/mods/My_Sweet_Cataclysm/sweet_items.json +++ b/data/mods/My_Sweet_Cataclysm/sweet_items.json @@ -27,5 +27,20 @@ "material": [ "junk" ], "calories": 10, "vitamins": [ ] + }, + { + "id": "rock_candy_chunk", + "type": "TOOL", + "category": "spare_parts", + "name": { "str": "rock candy chunk" }, + "description": "This is a chunk of hard rock candy. It can be broken down into sugar.", + "weight": "50 g", + "volume": "250 ml", + "price": 0, + "price_postapoc": 10, + "material": [ "rock_candy" ], + "symbol": ",", + "color": "light_gray", + "flags": [ "NO_SALVAGE" ] } ] diff --git a/data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_overmap_locations.json b/data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_overmap_locations.json new file mode 100644 index 0000000000000..afc179c0ecaaf --- /dev/null +++ b/data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_overmap_locations.json @@ -0,0 +1,185 @@ +[ + { + "type": "mapgen", + "method": "json", + "om_terrain": [ "pond_swamp_chocolate" ], + "weight": 100, + "object": { + "fill_ter": "t_dirt", + "rows": [ + " ", + " ", + " ???????????????? ", + " ??????????????????? ", + " ?**]]]]]*]***]]]]?? ", + " ???**************]?? ", + " ???*************]]?? ", + " ????***[[[*******]?? ", + " ???***[[[[[[[[**]]?? ", + " ???***[[[[[[[[**]]?? ", + " ???***[[[~~~[[**]]?? ", + " ??****[[[~~~[[***]?? ", + " ??]***[[~~~~[[***]?? ", + " ??]***[[~~~~[[**]]?? ", + " ??]***[[~[[[[[**]]?? ", + " ??]***[[[[[[[[**]]?? ", + " ??]*****[[******]]?? ", + " ??]**************]?? ", + " ??]**************]?? ", + " ????]??]]]]]]]]]]]?? ", + " ????????]]]???????? ", + " ????????????????? ", + " ", + " " + ], + "//": "add furniture of hard rock candy replacing rubble_rock and boulders, maybe cattails.", + "set": [ + { "point": "furniture", "id": "f_rubble_rockcandy", "x": [ 1, 22 ], "y": [ 1, 22 ], "chance": 8, "repeat": [ 1, 5 ] }, + { + "point": "furniture", + "id": "f_candy_boulder_small", + "x": [ 1, 22 ], + "y": [ 1, 22 ], + "chance": 8, + "repeat": [ 1, 5 ] + }, + { + "point": "furniture", + "id": "f_candy_boulder_medium", + "x": [ 1, 22 ], + "y": [ 1, 22 ], + "chance": 8, + "repeat": [ 1, 5 ] + }, + { + "point": "furniture", + "id": "f_candy_boulder_large", + "x": [ 1, 22 ], + "y": [ 1, 22 ], + "chance": 8, + "repeat": [ 1, 5 ] + }, + { "point": "furniture", "id": "f_cattails", "x": [ 1, 22 ], "y": [ 1, 22 ], "chance": 3, "repeat": [ 1, 5 ] }, + { "point": "furniture", "id": "f_cattails", "x": [ 1, 22 ], "y": [ 1, 22 ], "chance": 3, "repeat": [ 1, 5 ] } + ], + "terrain": { + " ": [ + [ "t_chocolate_dp", 2 ], + [ "t_chocolate_sh", 3 ], + [ "t_dirt", 4 ], + [ "t_grass", 6 ], + "t_shrub", + "t_underbrush", + "t_tree_young", + "t_tree", + "t_tree_willow" + ], + "*": [ [ "t_chocolate_sh", 8 ], "t_dirt", "t_grass", "t_underbrush", "t_tree_willow" ], + "?": [ [ "t_chocolate_sh", 3 ], [ "t_dirt", 5 ], [ "t_grass", 6 ], "t_shrub", "t_tree_young", "t_tree", "t_tree_willow" ], + "[": [ [ "t_chocolate_dp", 4 ], [ "t_chocolate_sh", 4 ], "t_underbrush" ], + "]": [ [ "t_chocolate_sh", 8 ], "t_dirt", "t_grass", "t_tree_willow" ], + "~": [ [ "t_chocolate_dp", 8 ], "t_dirt", "t_grass", "t_underbrush", "t_tree_willow" ] + }, + "place_monsters": [ + { "monster": "GROUP_SAFE", "x": [ 0, 23 ], "y": [ 0, 23 ], "chance": 5 }, + { "monster": "GROUP_EGG_CRACKER_ROE", "x": [ 0, 23 ], "y": [ 0, 23 ], "chance": 20, "repeat": [ 1, 2 ] }, + { "monster": "GROUP_EGG_GUMMY_GATOR", "x": [ 0, 23 ], "y": [ 0, 23 ], "chance": 20 } + ] + } + }, + { + "type": "mapgen", + "method": "json", + "om_terrain": [ "pond_swamp_chocolate" ], + "weight": 200, + "object": { + "fill_ter": "t_dirt", + "rows": [ + " ", + " ?? ", + " ??? ", + " ???? ? ", + " ????? ", + " ]]]**]]]] ", + " ]]*****]]] ", + " ]***[******] ", + " ]]***[[[[****] ", + " ]]***[[[[*****] ", + " ?**[[~~~~[****]] ", + " ]**[[~~~~[****]] ", + " ]]***[~~~~[***]]] ", + " ]]***[~~~~[[]]] ", + " ]]****[[[[**]??? ", + " ]]***[[***]]??? ", + " ]]]]*****]] ? ? ", + " ??]]****] ", + " ** ", + " ", + " ", + " ", + " ", + " " + ], + "set": [ + { "point": "furniture", "id": "f_rubble_rockcandy", "x": [ 1, 22 ], "y": [ 1, 22 ], "chance": 9, "repeat": [ 1, 5 ] }, + { + "point": "furniture", + "id": "f_candy_boulder_small", + "x": [ 1, 22 ], + "y": [ 1, 22 ], + "chance": 9, + "repeat": [ 1, 5 ] + }, + { + "point": "furniture", + "id": "f_candy_boulder_medium", + "x": [ 1, 22 ], + "y": [ 1, 22 ], + "chance": 9, + "repeat": [ 1, 5 ] + }, + { + "point": "furniture", + "id": "f_candy_boulder_large", + "x": [ 1, 22 ], + "y": [ 1, 22 ], + "chance": 9, + "repeat": [ 1, 5 ] + }, + { "point": "furniture", "id": "f_cattails", "x": [ 1, 22 ], "y": [ 1, 22 ], "chance": 3, "repeat": [ 1, 5 ] }, + { "point": "furniture", "id": "f_cattails", "x": [ 1, 22 ], "y": [ 1, 22 ], "chance": 3, "repeat": [ 1, 5 ] } + ], + "terrain": { + " ": [ + [ "t_chocolate_dp", 2 ], + [ "t_chocolate_sh", 3 ], + [ "t_dirt", 4 ], + [ "t_grass", 6 ], + [ "t_shrub", 2 ], + "t_underbrush", + "t_tree_young", + "t_tree", + "t_tree_willow" + ], + "*": [ [ "t_chocolate_sh", 8 ], "t_dirt", "t_grass", "t_underbrush", "t_tree_willow" ], + "?": [ + [ "t_chocolate_sh", 3 ], + [ "t_dirt", 4 ], + [ "t_grass", 6 ], + [ "t_shrub", 2 ], + "t_tree_young", + "t_tree", + "t_tree_willow" + ], + "[": [ [ "t_chocolate_dp", 4 ], [ "t_chocolate_sh", 4 ], "t_underbrush" ], + "]": [ [ "t_chocolate_sh", 8 ], "t_dirt", "t_grass", "t_tree_willow" ], + "~": [ [ "t_chocolate_dp", 8 ], "t_dirt", "t_grass", "t_underbrush", "t_tree_willow" ] + }, + "place_monsters": [ + { "monster": "GROUP_SAFE", "x": [ 0, 23 ], "y": [ 0, 23 ], "chance": 20 }, + { "monster": "GROUP_EGG_CRACKER_ROE", "x": [ 0, 23 ], "y": [ 0, 23 ], "chance": 20, "repeat": [ 1, 2 ] }, + { "monster": "GROUP_EGG_GUMMY_GATOR", "x": [ 0, 23 ], "y": [ 0, 23 ], "chance": 20 } + ] + } + } +] diff --git a/data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_overmap_terrain.json b/data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_overmap_terrain.json new file mode 100644 index 0000000000000..763f2e3e04d14 --- /dev/null +++ b/data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_overmap_terrain.json @@ -0,0 +1,11 @@ +[ + { + "type": "overmap_terrain", + "id": "pond_swamp_chocolate", + "name": "chocolate bog", + "sym": "F", + "color": "blue", + "see_cost": 5, + "mondensity": 2 + } +] diff --git a/data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_specials.json b/data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_specials.json new file mode 100644 index 0000000000000..c252e20db9abd --- /dev/null +++ b/data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_specials.json @@ -0,0 +1,11 @@ +[ + { + "type": "overmap_special", + "id": "chocolate_bog", + "overmaps": [ { "point": [ 0, 0, 0 ], "overmap": "pond_swamp_chocolate_north" } ], + "locations": [ "swamp" ], + "city_distance": [ 1, -1 ], + "occurrences": [ 0, 4 ], + "flags": [ "WILDERNESS" ] + } +] diff --git a/data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_terrain.json b/data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_terrain.json new file mode 100644 index 0000000000000..59f41893e2e67 --- /dev/null +++ b/data/mods/My_Sweet_Cataclysm/sweet_mapgen/sweet_terrain.json @@ -0,0 +1,38 @@ +[ + { + "type": "terrain", + "id": "t_chocolate_sh", + "name": "shallow chocolate", + "description": "The chocolate isn't too deep here. With a watertight container, you could gather what looks to be pure melted cacao. This will not be tasty.", + "symbol": "~", + "color": "light_blue", + "move_cost": 5, + "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "FISHABLE", "SHALLOW_WATER", "CHOCOLATE" ], + "connects_to": "WATER", + "examine_action": "water_source" + }, + { + "type": "terrain", + "id": "t_chocolate_dp", + "name": "deep chocolate", + "description": "The chocolate here is deep enough to drown in. With a watertight container, you could gather what looks to be pure melted cacao. This will not be tasty.", + "symbol": "~", + "color": "light_blue", + "move_cost": 5, + "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "SWIMMABLE", "FISHABLE", "CHOCOLATE" ], + "connects_to": "WATER", + "examine_action": "water_source" + }, + { + "type": "terrain", + "id": "t_caramel", + "name": "caramel", + "description": "An extremely hot, glowing liquid, composed of molten caramel. In some places, caramel coated fruit is a delicacy.", + "symbol": "~", + "color": "red", + "move_cost": 4, + "light_emitted": 50, + "trap": "tr_lava", + "flags": [ "TRANSPARENT", "LIQUID", "NO_SCENT", "DESTROY_ITEM", "USABLE_FIRE" ] + } +] diff --git a/data/mods/My_Sweet_Cataclysm/sweet_materials.json b/data/mods/My_Sweet_Cataclysm/sweet_materials.json index 52ea11adb8c45..ba0880d5ce2f4 100644 --- a/data/mods/My_Sweet_Cataclysm/sweet_materials.json +++ b/data/mods/My_Sweet_Cataclysm/sweet_materials.json @@ -19,5 +19,26 @@ "bash_dmg_verb": "damaged", "cut_dmg_verb": "damaged", "burn_data": [ { "fuel": 1, "smoke": 1, "burn": 1 }, { "fuel": 1, "smoke": 1, "burn": 2 }, { "fuel": 1, "smoke": 1, "burn": 3 } ] + }, + { + "type": "material", + "id": "rock_candy", + "name": "rock candy", + "density": 1, + "specific_heat_liquid": 0.82, + "specific_heat_solid": 0.45, + "latent_heat": 273, + "bash_resist": 6, + "cut_resist": 6, + "bullet_resist": 3, + "acid_resist": 8, + "fire_resist": 3, + "elec_resist": 2, + "chip_resist": 20, + "dmg_adj": [ "scratched", "cut", "cracked", "shattered" ], + "bash_dmg_verb": "cracked", + "cut_dmg_verb": "chipped", + "burn_products": [ [ "sugar", 1 ] ], + "burn_data": [ { "fuel": 1, "smoke": 1, "burn": 1 }, { "fuel": 1, "smoke": 1, "burn": 2 }, { "fuel": 1, "smoke": 1, "burn": 3 } ] } ] diff --git a/data/mods/My_Sweet_Cataclysm/sweet_monster_groups.json b/data/mods/My_Sweet_Cataclysm/sweet_monster_groups.json index 85f0d265e3a71..ba78c878e7cfc 100644 --- a/data/mods/My_Sweet_Cataclysm/sweet_monster_groups.json +++ b/data/mods/My_Sweet_Cataclysm/sweet_monster_groups.json @@ -14,16 +14,31 @@ "type": "monstergroup", "default": "mon_gummy_cub" }, + { + "name": "GROUP_EGG_GUMMY_GATOR", + "type": "monstergroup", + "default": "mon_gummy_gator" + }, { "name": "GROUP_EGG_CRACKER", "type": "monstergroup", "default": "mon_small_cracker" }, + { + "name": "GROUP_EGG_CRACKER_ROE", + "type": "monstergroup", + "default": "mon_cracker_lbass" + }, { "name": "GROUP_EGG_COOKIE", "type": "monstergroup", "default": "mon_cookie" }, + { + "name": "GROUP_EGG_COOKIE_EGG", + "type": "monstergroup", + "default": "mon_cookie_hydra_youth" + }, { "name": "GROUP_EGG_GUM", "type": "monstergroup", diff --git a/data/mods/My_Sweet_Cataclysm/sweet_monsters.json b/data/mods/My_Sweet_Cataclysm/sweet_monsters.json index baabbdfd872c0..81894d4a8f671 100644 --- a/data/mods/My_Sweet_Cataclysm/sweet_monsters.json +++ b/data/mods/My_Sweet_Cataclysm/sweet_monsters.json @@ -254,6 +254,21 @@ "reproduction": { "baby_egg": "candy3", "baby_count": 1, "baby_timer": 10 }, "flags": [ "SEES", "HEARS", "SMELLS", "PATH_AVOID_DANGER_1", "WARM", "BASHES", "ATTACKMON", "NO_BREATHE" ] }, + { + "id": "mon_gummy_gator", + "type": "MONSTER", + "name": "gummy gator", + "copy-from": "mon_gator", + "description": "Slowly moving through the chocolate like a gummy log along the surface. You notice it's eye's following your movement as you approach.", + "default_faction": "gummy_bears", + "species": [ "GUMMY" ], + "material": [ "sugar" ], + "symbol": "C", + "color": "light_red", + "harvest": "gummy_bear", + "reproduction": { "baby_egg": "candy3gator", "baby_count": 1, "baby_timer": 10 }, + "flags": [ "SEES", "HEARS", "SMELLS", "PATH_AVOID_DANGER_1", "ANIMAL", "ATTACKMON", "SWIMS" ] + }, { "id": "mon_small_cracker", "type": "MONSTER", @@ -318,6 +333,18 @@ "death_function": [ "NORMAL" ], "flags": [ "SEES", "HEARS", "NO_BREATHE" ] }, + { + "id": "mon_cracker_lbass", + "type": "MONSTER", + "copy-from": "mon_fish_medium", + "species": [ "CRACKER" ], + "default_faction": "crackers", + "name": { "str_sp": "animal cracker largemouth bass" }, + "description": "An animal cracker largemouth bass. It leaps from the water in pursuit of food.", + "harvest": "cracker_boy", + "material": [ "wheat", "junk" ], + "reproduction": { "baby_egg": "grahmcrackers_roe", "baby_count": 3, "baby_timer": 20 } + }, { "id": "mon_cookie", "type": "MONSTER", @@ -350,6 +377,48 @@ "flags": [ "SEES", "SMELLS", "HEARS", "PATH_AVOID_DANGER_1" ], "reproduction": { "baby_egg": "cookies", "baby_count": 10, "baby_timer": 5 } }, + { + "id": "mon_cookie_hydra", + "type": "MONSTER", + "name": { "str": "cookie hydra" }, + "description": "A giant cookie dragon with multiple heads. It prowls looking for food.", + "copy-from": "mon_cookie", + "bodytype": "angel", + "volume": "600 L", + "weight": "500 kg", + "hp": 160, + "speed": 80, + "aggression": 7, + "morale": 7, + "melee_skill": 4, + "melee_dice": 7, + "melee_dice_sides": 5, + "melee_cut": 3, + "dodge": 2, + "flags": [ "SEES", "SMELLS", "HEARS", "PATH_AVOID_DANGER_1", "SWIMS" ], + "reproduction": { "baby_egg": "cookies_egg", "baby_count": 1, "baby_timer": 5 } + }, + { + "id": "mon_cookie_hydra_youth", + "type": "MONSTER", + "name": { "str": "cookie hydra spawn" }, + "description": "A giant cookie dragon with multiple heads. It prowls looking for food.", + "copy-from": "mon_cookie", + "bodytype": "angel", + "volume": "300 L", + "weight": "250 kg", + "hp": 60, + "speed": 80, + "aggression": 0, + "morale": 7, + "melee_skill": 2, + "melee_dice": 3, + "melee_dice_sides": 5, + "melee_cut": 3, + "dodge": 2, + "flags": [ "SEES", "SMELLS", "HEARS", "PATH_AVOID_DANGER_1", "SWIMS" ], + "upgrades": { "age_grow": 200, "into": "mon_cookie_hydra" } + }, { "id": "mon_spider_gum", "type": "MONSTER", diff --git a/src/map.cpp b/src/map.cpp index abc64cc097695..00b0278aec7bf 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -4501,6 +4501,13 @@ item map::water_from( const tripoint &p ) return ret; } + if( has_flag( "CHOCOLATE", p ) ) { + item ret( "liquid_cacao", calendar::turn, item::INFINITE_CHARGES ); + ret.set_item_temperature( temp_to_kelvin( std::max( g->weather.get_temperature( p ), + temperatures::cold ) ) ); + return ret; + } + const ter_id terrain_id = ter( p ); if( terrain_id == t_sewage ) { item ret( "water_sewage", calendar::turn, item::INFINITE_CHARGES ); From d5636d54f5aa75a6cca9fbeee46c76a628306a55 Mon Sep 17 00:00:00 2001 From: Tykato <75937967+Tykato@users.noreply.github.com> Date: Thu, 24 Dec 2020 04:07:12 +0100 Subject: [PATCH 38/47] Change/Add starting clothes in Bhikkhu profession (#46105) --- .../itemgroups/Clothing_Gear/clothing.json | 12 ++++++++ data/json/items/armor/coats.json | 30 ++++++++++++++++--- data/json/items/armor/legs_clothes.json | 28 +++++++++++++++++ data/json/items/armor/torso_clothes.json | 23 ++++++++++++++ data/json/professions.json | 2 +- 5 files changed, 90 insertions(+), 5 deletions(-) diff --git a/data/json/itemgroups/Clothing_Gear/clothing.json b/data/json/itemgroups/Clothing_Gear/clothing.json index 55a0c4aa42c7a..e075f488e97f9 100644 --- a/data/json/itemgroups/Clothing_Gear/clothing.json +++ b/data/json/itemgroups/Clothing_Gear/clothing.json @@ -1221,6 +1221,10 @@ [ "bholster", 5 ], [ "tux", 1 ], [ "dress_wedding", 1 ], + [ "kasaya", 1 ], + [ "antarvasa", 1 ], + [ "uttarasanga", 1 ], + [ "samghati", 1 ], [ "clogs", 2 ], [ "wristwatch", 15 ], [ "maid_dress", 3 ], @@ -1753,6 +1757,10 @@ { "item": "bondage_suit", "prob": 1 }, { "item": "bondage_mask", "prob": 1 }, { "item": "zentai", "prob": 1 }, + { "item": "kasaya", "prob": 1 }, + { "item": "antarvasa", "prob": 1 }, + { "item": "uttarasanga", "prob": 1 }, + { "item": "samghati", "prob": 1 }, { "item": "corset", "prob": 10 }, { "item": "chestwrap", "prob": 5 }, { "item": "boots_combat", "prob": 10 }, @@ -2642,6 +2650,10 @@ [ "army_top", 20 ], [ "tux", 1 ], [ "gown", 1 ], + [ "kasaya", 1 ], + [ "antarvasa", 1 ], + [ "uttarasanga", 1 ], + [ "samghati", 1 ], [ "jersey", 40 ], [ "maid_dress", 3 ], [ "halter_top", 50 ], diff --git a/data/json/items/armor/coats.json b/data/json/items/armor/coats.json index 8311ad49b82b7..ffcf6bc822fbf 100644 --- a/data/json/items/armor/coats.json +++ b/data/json/items/armor/coats.json @@ -861,8 +861,8 @@ "repairs_like": "trenchcoat", "type": "ARMOR", "name": { "str": "kasaya" }, - "description": "A traditional, ankle-length Buddhist robe, stitched together from three large rectangular pieces of saffron dyed cloth.", - "weight": "1200 g", + "description": "A traditional, ankle-length Buddhist robe, stitched together from three pieces of traditional saffron dyed cloth.", + "weight": "1550 g", "volume": "5000 ml", "price": 20000, "price_postapoc": 50, @@ -871,12 +871,12 @@ "symbol": "[", "looks_like": "kimono", "color": "brown", - "covers": [ "leg_l", "leg_r", "torso", "arm_l", "arm_r" ], + "covers": [ "leg_l", "leg_r", "torso" ], "coverage": 90, "encumbrance": 2, "warmth": 20, "material_thickness": 2, - "flags": [ "VARSIZE" ] + "flags": [ "VARSIZE", "FANCY" ] }, { "id": "keikogi", @@ -1053,6 +1053,28 @@ "material_thickness": 2, "flags": [ "VARSIZE", "OUTER" ] }, + { + "id": "samghati", + "repairs_like": "trenchcoat", + "type": "ARMOR", + "name": { "str": "samghati" }, + "description": "A traditional, double layered Buddhist coat, used as an outer cloak for various occasions.", + "weight": "800 g", + "volume": "2250 ml", + "price": 6500, + "price_postapoc": 50, + "to_hit": -5, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "trenchcoat", + "color": "brown", + "covers": [ "leg_l", "leg_r", "torso" ], + "coverage": 90, + "encumbrance": 2, + "warmth": 12, + "material_thickness": 2, + "flags": [ "VARSIZE", "FANCY" ] + }, { "id": "ski_jacket", "repairs_like": "trenchcoat", diff --git a/data/json/items/armor/legs_clothes.json b/data/json/items/armor/legs_clothes.json index 8f05c342a9d4c..43d846d32c524 100644 --- a/data/json/items/armor/legs_clothes.json +++ b/data/json/items/armor/legs_clothes.json @@ -1,4 +1,32 @@ [ + { + "id": "antarvasa", + "repairs_like": "pants", + "type": "ARMOR", + "name": { "str": "antarvasa" }, + "description": "A traditional, ankle-length Buddhist skirt. The bottom protrudes, and appears in the rough shape of a triangle.", + "weight": "500 g", + "volume": "250 ml", + "price": 6500, + "price_postapoc": 50, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "kilt", + "color": "brown", + "covers": [ "leg_l", "leg_r" ], + "coverage": 90, + "encumbrance": 7, + "max_encumbrance": 11, + "pocket_data": [ + { "pocket_type": "CONTAINER", "max_contains_volume": "350 ml", "max_contains_weight": "1 kg", "moves": 80 }, + { "pocket_type": "CONTAINER", "max_contains_volume": "350 ml", "max_contains_weight": "1 kg", "moves": 80 }, + { "pocket_type": "CONTAINER", "max_contains_volume": "250 ml", "max_contains_weight": "1 kg", "moves": 100 }, + { "pocket_type": "CONTAINER", "max_contains_volume": "250 ml", "max_contains_weight": "1 kg", "moves": 100 } + ], + "warmth": 8, + "material_thickness": 1, + "flags": [ "VARSIZE", "POCKETS", "FANCY" ] + }, { "id": "b_shorts", "repairs_like": "jeans", diff --git a/data/json/items/armor/torso_clothes.json b/data/json/items/armor/torso_clothes.json index e030e38a4043b..439a6c0bd4156 100644 --- a/data/json/items/armor/torso_clothes.json +++ b/data/json/items/armor/torso_clothes.json @@ -742,6 +742,29 @@ } ] }, + { + "id": "uttarasanga", + "repairs_like": "tshirt", + "type": "ARMOR", + "name": { "str": "uttarasanga" }, + "description": "A traditional Buddhist shirt, covering most of the upper body, but not the arms.", + "weight": "250 g", + "volume": "750 ml", + "price": 6500, + "price_postapoc": 50, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "longshirt", + "color": "brown", + "covers": [ "torso" ], + "coverage": 50, + "encumbrance": 4, + "max_encumbrance": 5, + "pocket_data": [ { "pocket_type": "CONTAINER", "max_contains_volume": "250 ml", "max_contains_weight": "1 kg", "moves": 80 } ], + "warmth": 5, + "material_thickness": 1, + "flags": [ "VARSIZE", "FANCY" ] + }, { "id": "vest_leather", "type": "ARMOR", diff --git a/data/json/professions.json b/data/json/professions.json index 4d424af3e74dc..64cf4019e58d6 100644 --- a/data/json/professions.json +++ b/data/json/professions.json @@ -2124,7 +2124,7 @@ "skills": [ { "level": 3, "name": "speech" } ], "items": { "both": { - "items": [ "kasaya", "pants", "flip_flops", "holy_symbol", "holybook_sutras" ], + "items": [ "antarvasa", "uttarasanga", "samghati", "flip_flops", "holy_symbol", "holybook_sutras" ], "entries": [ { "group": "charged_cell_phone" } ] }, "male": [ "briefs" ], From cee8cc845dafdafe98fd0b734fe41cc92adadee7 Mon Sep 17 00:00:00 2001 From: LaVeyanFiend <51099123+LaVeyanFiend@users.noreply.github.com> Date: Wed, 23 Dec 2020 22:09:08 -0500 Subject: [PATCH 39/47] Fix Aftershock overwriting bone recipe options, add further food compatibility through requirements (#46134) * Fix bone recipes with Aftershock enabled * Add alien & frosthuman meat to requirements --- data/mods/Aftershock/requirements.json | 205 ++++++++++++++++++++++++- 1 file changed, 198 insertions(+), 7 deletions(-) diff --git a/data/mods/Aftershock/requirements.json b/data/mods/Aftershock/requirements.json index 031c765330eb6..3bc69578eea06 100644 --- a/data/mods/Aftershock/requirements.json +++ b/data/mods/Aftershock/requirements.json @@ -6,23 +6,49 @@ "qualities": [ { "id": "ANVIL", "level": 3 }, { "id": "DIAMONDPRESS", "level": 1 }, { "id": "NANO_FORGE", "level": 1 } ], "tools": [ [ [ "nano_forge", 20 ] ], [ [ "tongs", -1 ] ] ] }, + { + "id": "bone_edible", + "type": "requirement", + "//": "Any kind of non-poisonous bones, human or not.", + "components": [ [ [ "bone", 1 ], [ "bone_human", 1 ], [ "bone_demihuman", 1 ], [ "frost_bone_human", 1 ], [ "alien_bone", 1 ] ] ] + }, { "id": "bone_sturdy", "type": "requirement", "//": "Any kind of bones, human or not. Tainted bones are too brittle and won't work for this purpose.", - "components": [ [ [ "frost_bone_human", 1 ], [ "alien_bone", 1 ] ] ] + "components": [ [ [ "bone", 1 ], [ "bone_human", 1 ], [ "bone_demihuman", 1 ], [ "frost_bone_human", 1 ], [ "alien_bone", 1 ] ] ] }, { - "id": "bone_any", + "id": "edible_fat", "type": "requirement", - "//": "Any kind of bones. May possibly be poisonous to eat, or fragile.", - "components": [ [ [ "frost_bone_human", 1 ], [ "alien_bone", 1 ] ] ] + "//": "Any type of edible raw fat.", + "components": [ + [ + [ "fat", 1 ], + [ "mutant_fat", 1 ], + [ "human_fat", 1 ], + [ "mutant_human_fat", 1 ], + [ "demihuman_fat", 1 ], + [ "frost_human_fat", 1 ], + [ "alien_fat", 1 ] + ] + ] }, { - "id": "any_tallow", + "id": "edible_tallow", "type": "requirement", - "//": "Any type of tallow.", - "components": [ [ [ "edible_tallow", 1, "LIST" ], [ "tallow_tainted", 1 ], [ "alien_tallow", 1 ], [ "frost_human_tallow", 1 ] ] ] + "//": "Any type of edible tallow.", + "components": [ + [ + [ "tallow", 1 ], + [ "mutant_tallow", 1 ], + [ "human_tallow", 1 ], + [ "mutant_human_tallow", 1 ], + [ "demihuman_tallow", 1 ], + [ "frost_human_tallow", 1 ], + [ "alien_tallow", 1 ] + ] + ] }, { "id": "edible_lard", @@ -39,5 +65,170 @@ [ "alien_lard", 1 ] ] ] + }, + { + "id": "meat_offal", + "type": "requirement", + "//": "Anything you might consider offal or intestines.", + "components": [ + [ + [ "meat_lung", 4, "LIST" ], + [ "liver", 4 ], + [ "alien_liver", 4 ], + [ "kidney", 4 ], + [ "alien_kidney", 4 ], + [ "sweetbread", 4 ], + [ "alien_sweetbread", 4 ], + [ "offal", 1 ], + [ "mutant_bug_organs", 1 ] + ] + ] + }, + { + "id": "meat_raw_steak", + "type": "requirement", + "//": "An unbroken slab of raw meat. For when scraps just aren't good enough.", + "components": [ + [ + [ "meat", 1 ], + [ "mutant_meat", 1 ], + [ "human_flesh", 1 ], + [ "mutant_human_flesh", 1 ], + [ "demihuman_flesh", 1 ], + [ "frost_human_flesh", 1 ], + [ "alien_flesh", 1 ] + ] + ] + }, + { + "id": "meat_red_raw", + "type": "requirement", + "//": "Anything you might consider raw, unpreserved 'red' meat. About 250mL of meat.", + "components": [ + [ + [ "meat_raw_steak", 1, "LIST" ], + [ "meat_scrap", 10 ], + [ "mutant_meat_scrap", 10 ], + [ "alien_meat_scrap", 10 ], + [ "porkbelly", 1 ] + ] + ] + }, + { + "id": "meat_lung", + "type": "requirement", + "//": "Anything you might consider raw lung. About 250mL of lungs.", + "components": [ [ [ "lung", 1 ], [ "mutant_bug_lungs", 1 ], [ "alien_lung", 1 ] ] ] + }, + { + "id": "meat_stomach_boiled", + "type": "requirement", + "//": "Anything you might consider a boiled stomach. About 500mL of stomachs.", + "components": [ + [ + [ "small_stomach_boiled", 2 ], + [ "stomach_boiled", 1 ], + [ "small_hstomach_boiled", 2 ], + [ "hstomach_boiled", 1 ], + [ "small_demihuman_stomach_boiled", 2 ], + [ "demihuman_stomach_boiled", 1 ] + ] + ] + }, + { + "id": "meat_stomach_large", + "type": "requirement", + "//": "Anything you might consider a large raw stomach.", + "components": [ [ [ "stomach_large", 1 ], [ "hstomach_large", 1 ], [ "demihuman_stomach_large", 1 ], [ "alien_stomach_large", 1 ] ] ] + }, + { + "id": "meat_stomach_small", + "type": "requirement", + "//": "Anything you might consider a small raw stomach.", + "components": [ [ [ "stomach", 1 ], [ "hstomach", 1 ], [ "demihuman_stomach", 1 ], [ "alien_stomach", 1 ], [ "frost_hstomach", 1 ] ] ] + }, + { + "id": "meat_nofish", + "type": "requirement", + "//": "Any type of raw meat except for fish. About 300-400kcal of meat.", + "components": [ + [ + [ "meat_red", 1, "LIST" ], + [ "liver", 5 ], + [ "alien_liver", 5 ], + [ "kidney", 5 ], + [ "alien_kidney", 5 ], + [ "meat_lung", 5, "LIST" ], + [ "sweetbread", 5 ], + [ "alien_sweetbread", 5 ], + [ "bacon", 4 ], + [ "lunchmeat", 5 ], + [ "bologna", 5 ], + [ "can_spam", 2 ], + [ "can_chicken", 1 ], + [ "meat_pickled", 1 ], + [ "dry_meat", 1 ], + [ "jerky", 1 ], + [ "meat_smoked", 1 ], + [ "meat_salted", 1 ] + ] + ] + }, + { + "id": "meat_cooked", + "type": "requirement", + "//": "meat you'd put on a sandwich", + "components": [ + [ + [ "meat_cooked", 1 ], + [ "meat_fatty_cooked", 1 ], + [ "meat_scrap_cooked", 10 ], + [ "mutant_meat_cooked", 1 ], + [ "mutant_meat_scrap_cooked", 10 ], + [ "human_cooked", 1 ], + [ "mutant_human_cooked", 1 ], + [ "demihuman_cooked", 1 ], + [ "alien_flesh_cooked", 1 ], + [ "alien_meat_scrap_cooked", 10 ], + [ "frost_human_cooked", 1 ], + [ "meat_pickled", 1 ], + [ "meat_smoked", 1 ], + [ "meat_salted", 1 ], + [ "dry_meat", 1 ], + [ "rehydrated_meat", 1 ], + [ "jerky", 1 ], + [ "bacon", 1 ], + [ "lunchmeat", 2 ], + [ "bologna", 5 ], + [ "can_spam", 2 ], + [ "fried_spam", 2 ], + [ "can_chicken", 1 ], + [ "fish_cooked", 1 ], + [ "fish_smoked", 1 ], + [ "can_herring", 1 ], + [ "can_salmon", 1 ], + [ "can_tuna", 1 ], + [ "can_sardine", 1 ], + [ "can_clams", 1 ], + [ "fish_pickled", 1 ], + [ "cracklins", 1 ], + [ "meat_aspic", 1 ], + [ "sausage", 1 ], + [ "sausage_cooked", 1 ], + [ "bratwurst_sausage", 1 ] + ] + ] + }, + { + "id": "human_meat", + "type": "requirement", + "//": "Raw meat that non-cannibals would be unhappy eating.", + "components": [ [ [ "human_flesh", 1 ], [ "mutant_human_flesh", 1 ], [ "frost_human_flesh", 1 ] ] ] + }, + { + "id": "human_meat_cooked", + "type": "requirement", + "//": "Cooked meat that non-cannibals would be unhappy eating.", + "components": [ [ [ "human_cooked", 1 ], [ "mutant_human_cooked", 1 ], [ "frost_human_cooked", 1 ] ] ] } ] From 773102ef5cc75f1f8f8e1ad86d4340ae891cdc0d Mon Sep 17 00:00:00 2001 From: anothersimulacrum Date: Wed, 23 Dec 2020 19:11:20 -0800 Subject: [PATCH 40/47] Allow pillows in pillowcases to act as SLEEP_AIDs (#46068) --- data/json/flags.json | 5 ++++ data/json/items/generic.json | 2 ++ data/json/items/generic/bedding.json | 18 +++++++++++++ doc/JSON_FLAGS.md | 1 + src/character.cpp | 40 ++++++++++++++++++++++++++++ src/flag.cpp | 1 + src/flag.h | 1 + 7 files changed, 68 insertions(+) diff --git a/data/json/flags.json b/data/json/flags.json index 0e129f49ded02..b7a0362ad9b41 100644 --- a/data/json/flags.json +++ b/data/json/flags.json @@ -707,6 +707,11 @@ "context": [ "GENERIC" ], "info": "This item provides comfort during sleep." }, + { + "id": "SLEEP_AID_CONTAINER", + "type": "json_flag", + "context": [ "GENERIC" ] + }, { "id": "REVIVE_SPECIAL", "type": "json_flag", diff --git a/data/json/items/generic.json b/data/json/items/generic.json index 319814ad81968..1ee0083f54da2 100644 --- a/data/json/items/generic.json +++ b/data/json/items/generic.json @@ -2339,6 +2339,7 @@ "price_postapoc": 10, "material": [ "cotton" ], "weight": "514 g", + "container": "pillowcase", "volume": "1 L", "flags": [ "SLEEP_AID" ], "category": "other" @@ -2369,6 +2370,7 @@ "price_postapoc": 10, "material": [ "cotton" ], "weight": "514 g", + "container": "pillowcase", "volume": "1 L", "flags": [ "SLEEP_AID" ], "category": "other" diff --git a/data/json/items/generic/bedding.json b/data/json/items/generic/bedding.json index 2cac3d5b2130b..820f0ea90f726 100644 --- a/data/json/items/generic/bedding.json +++ b/data/json/items/generic/bedding.json @@ -1,4 +1,22 @@ [ + { + "id": "pillowcase", + "type": "GENERIC", + "category": "container", + "name": { "str": "pillowcase" }, + "looks_like": "pillow", + "description": "A simple cotton pillowcase.", + "weight": "415 g", + "volume": "1 L", + "price": 0, + "price_postapoc": 2, + "to_hit": -5, + "material": [ "cotton" ], + "flags": [ "SLEEP_AID_CONTAINER" ], + "pocket_data": [ { "pocket_type": "CONTAINER", "max_contains_volume": "15 L", "max_contains_weight": "15 kg", "moves": 400 } ], + "symbol": ")", + "color": "white" + }, { "id": "sheet", "type": "ARMOR", diff --git a/doc/JSON_FLAGS.md b/doc/JSON_FLAGS.md index cd8a4eb3841cb..dbad4d84821c1 100644 --- a/doc/JSON_FLAGS.md +++ b/doc/JSON_FLAGS.md @@ -698,6 +698,7 @@ These flags can be applied via JSON item definition to most items. Not to be co - ```REDUCED_WEIGHT``` ... Gunmod flag; reduces the item's base weight by 25%. - ```REQUIRES_TINDER``` ... Requires tinder to be present on the tile this item tries to start a fire on. - ```SLEEP_AID``` ... This item helps in sleeping. +- ```SLEEP_AID_CONTAINER``` ... This item allows sleep aids inside of it to help in sleeping. (E.g. this is a pillowcase). - ```SLEEP_IGNORE``` ... This item is not shown as before-sleep warning. - ```SLOW_WIELD``` ... Has an additional time penalty upon wielding. For melee weapons and guns this is offset by the relevant skill. Stacks with "NEEDS_UNFOLD". - ```TACK``` ... Item can be used as tack for a mount. diff --git a/src/character.cpp b/src/character.cpp index 9c75a5dedd0cd..8000787779469 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -6841,6 +6841,26 @@ Character::comfort_response_t Character::base_comfort_value( const tripoint &p ) comfort_response.aid = &items_it; break; // prevents using more than 1 sleep aid } + if( items_it.has_flag( flag_SLEEP_AID_CONTAINER ) ) { + bool found = false; + if( items_it.contents.size() > 1 ) { + // Only one item is allowed, so we don't fill our pillowcase with nails + continue; + } + for( const item *it : items_it.contents.all_items_top() ) { + if( it->has_flag( flag_SLEEP_AID ) ) { + // Note: BED + SLEEP_AID = 9 pts, or 1 pt below very_comfortable + comfort += 1 + static_cast( comfort_level::slightly_comfortable ); + comfort_response.aid = &items_it; + found = true; + break; // prevents using more than 1 sleep aid + } + } + // Only 1 sleep aid + if( found ) { + break; + } + } } } if( board ) { @@ -6878,6 +6898,26 @@ Character::comfort_response_t Character::base_comfort_value( const tripoint &p ) comfort_response.aid = &items_it; break; // prevents using more than 1 sleep aid } + if( items_it.has_flag( flag_SLEEP_AID_CONTAINER ) ) { + bool found = false; + if( items_it.contents.size() > 1 ) { + // Only one item is allowed, so we don't fill our pillowcase with nails + continue; + } + for( const item *it : items_it.contents.all_items_top() ) { + if( it->has_flag( flag_SLEEP_AID ) ) { + // Note: BED + SLEEP_AID = 9 pts, or 1 pt below very_comfortable + comfort += 1 + static_cast( comfort_level::slightly_comfortable ); + comfort_response.aid = &items_it; + found = true; + break; // prevents using more than 1 sleep aid + } + } + // Only 1 sleep aid + if( found ) { + break; + } + } } } if( fungaloid_cosplay && here.has_flag_ter_or_furn( "FUNGUS", pos() ) ) { diff --git a/src/flag.cpp b/src/flag.cpp index f6f22cc0664e8..f8d22f630325b 100644 --- a/src/flag.cpp +++ b/src/flag.cpp @@ -257,6 +257,7 @@ const flag_id flag_SHRUB( "SHRUB" ); const flag_id flag_SKINNED( "SKINNED" ); const flag_id flag_SKINTIGHT( "SKINTIGHT" ); const flag_id flag_SLEEP_AID( "SLEEP_AID" ); +const flag_id flag_SLEEP_AID_CONTAINER( "SLEEP_AID_CONTAINER" ); const flag_id flag_SLEEP_IGNORE( "SLEEP_IGNORE" ); const flag_id flag_SLOWS_MOVEMENT( "SLOWS_MOVEMENT" ); const flag_id flag_SLOWS_THIRST( "SLOWS_THIRST" ); diff --git a/src/flag.h b/src/flag.h index ccc90c5fb30fc..9c9c70eef6efd 100644 --- a/src/flag.h +++ b/src/flag.h @@ -259,6 +259,7 @@ extern const flag_id flag_SHRUB; extern const flag_id flag_SKINNED; extern const flag_id flag_SKINTIGHT; extern const flag_id flag_SLEEP_AID; +extern const flag_id flag_SLEEP_AID_CONTAINER; extern const flag_id flag_SLEEP_IGNORE; extern const flag_id flag_SLOWS_MOVEMENT; extern const flag_id flag_SLOWS_THIRST; From fb46eb5a707c29755c90f263a3f17bb8748a2a27 Mon Sep 17 00:00:00 2001 From: Kevin Granade Date: Wed, 23 Dec 2020 21:55:11 -0800 Subject: [PATCH 41/47] More reloading test --- tests/reload_magazine_test.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/reload_magazine_test.cpp b/tests/reload_magazine_test.cpp index dcca1cc670826..c893b61b5f3a6 100644 --- a/tests/reload_magazine_test.cpp +++ b/tests/reload_magazine_test.cpp @@ -5,12 +5,14 @@ #include #include +#include "avatar.h" #include "calendar.h" #include "character.h" #include "inventory.h" #include "item.h" #include "item_location.h" #include "pimpl.h" +#include "player.h" #include "type_id.h" #include "visitable.h" @@ -33,7 +35,7 @@ TEST_CASE( "reload_magazine", "[magazine] [visitable] [item] [item_location]" ) CHECK( mag_id != bad_mag ); CHECK( mag_cap > 0 ); - Character &player_character = get_player_character(); + avatar &player_character = get_avatar(); player_character.worn.clear(); player_character.inv->clear(); player_character.remove_weapon(); @@ -300,6 +302,18 @@ TEST_CASE( "reload_magazine", "[magazine] [visitable] [item] [item_location]" ) } } } + AND_WHEN( "the gun is reloaded with a full magazine" ) { + item &another_mag = player_character.i_add( item( mag_id ) ); + another_mag.ammo_set( ammo_id, mag_cap ); + std::vector ammo_list; + CHECK( player_character.list_ammo( gun, ammo_list, false ) ); + CHECK( !ammo_list.empty() ); + bool ok = gun.reload( player_character, item_location( player_character, &another_mag ), 1 ); + THEN( "the gun is now loaded with the full magazine" ) { + CHECK( ok ); + CHECK( gun.ammo_remaining() == mag_cap ); + } + } } } } From 37b5d1a7bf124bba03ea2240a586d3ac1786807d Mon Sep 17 00:00:00 2001 From: Kevin Granade Date: Thu, 24 Dec 2020 01:19:55 -0800 Subject: [PATCH 42/47] Add a clause to allow swapping in a higher-capacity ammo magazine --- src/player.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/player.cpp b/src/player.cpp index b40e56dd7e120..d747f99fec01b 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -1524,8 +1524,10 @@ bool player::list_ammo( const item &base, std::vector &ammo ammo_match_found = e->can_reload_with( id ); speedloader = true; } - if( can_reload( *e, id ) && ( speedloader || e->ammo_remaining() == 0 || - e->loaded_ammo().stacks_with( *ammo ) ) ) { + if( can_reload( *e, id ) && + ( speedloader || e->ammo_remaining() == 0 || + e->ammo_remaining() < ammo->ammo_remaining() || + e->loaded_ammo().stacks_with( *ammo ) ) ) { ammo_list.emplace_back( this, e, &base, std::move( ammo ) ); } } From 0213c3f9792f91f2bd61c2c4c8c9addacf4408e0 Mon Sep 17 00:00:00 2001 From: ToxiClay Date: Thu, 24 Dec 2020 10:08:17 -0500 Subject: [PATCH 43/47] removing duplicate tongs --- data/json/recipes/tools/tools_hand.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/data/json/recipes/tools/tools_hand.json b/data/json/recipes/tools/tools_hand.json index 6c805658a6a79..ae56f50d7b605 100644 --- a/data/json/recipes/tools/tools_hand.json +++ b/data/json/recipes/tools/tools_hand.json @@ -101,8 +101,7 @@ { "proficiency": "prof_blacksmithing" }, { "proficiency": "prof_toolsmithing" } ], - "qualities": [ { "id": "CHISEL", "level": 3 } ], - "tools": [ [ [ "tongs", -1 ] ] ] + "qualities": [ { "id": "CHISEL", "level": 3 } ] }, { "type": "recipe", From 066a94948433915f2f5fd799a63491d5f46aa568 Mon Sep 17 00:00:00 2001 From: Zhilkin Serg Date: Thu, 24 Dec 2020 19:07:23 +0300 Subject: [PATCH 44/47] Sort Android source files --- android/app/jni/src/Android.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/app/jni/src/Android.mk b/android/app/jni/src/Android.mk index bb88a41696e31..633a99f6076a7 100644 --- a/android/app/jni/src/Android.mk +++ b/android/app/jni/src/Android.mk @@ -11,8 +11,8 @@ LOCAL_C_INCLUDES := $(SDL_PATH)/include LOCAL_CPP_FEATURES := exceptions rtti # Add your application source files here... -FILE_LIST := $(wildcard $(LOCAL_PATH)/*.cpp) -LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%) +FILE_LIST := $(sort $(wildcard $(LOCAL_PATH)/*.cpp)) +LOCAL_SRC_FILES := $(sort $(FILE_LIST:$(LOCAL_PATH)/%=%)) LOCAL_SHARED_LIBRARIES := libhidapi SDL2 SDL2_mixer SDL2_image SDL2_ttf libintl-lite mpg123 From bc6f9d39924f9a12054ef413007b31cc00f238d9 Mon Sep 17 00:00:00 2001 From: ZhilkinSerg Date: Thu, 24 Dec 2020 17:39:18 +0300 Subject: [PATCH 45/47] Fix Android finger repeat delay --- src/sdltiles.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sdltiles.cpp b/src/sdltiles.cpp index 53939641403ed..f5bfdfd777856 100644 --- a/src/sdltiles.cpp +++ b/src/sdltiles.cpp @@ -1988,11 +1988,11 @@ void update_finger_repeat_delay() longest_window_edge ) ) / std::max( 0.01f, ( get_option( "ANDROID_REPEAT_DELAY_RANGE" ) ) * longest_window_edge ), 0.0f, 1.0f ); - finger_repeat_delay = lerp( std::pow( t, get_option( "ANDROID_SENSITIVITY_POWER" ) ), - static_cast( std::max( get_option( "ANDROID_REPEAT_DELAY_MIN" ), - get_option( "ANDROID_REPEAT_DELAY_MAX" ) ) ), - static_cast( std::min( get_option( "ANDROID_REPEAT_DELAY_MIN" ), - get_option( "ANDROID_REPEAT_DELAY_MAX" ) ) ) ); + float repeat_delay_min = static_cast( get_option( "ANDROID_REPEAT_DELAY_MIN" ) ); + float repeat_delay_max = static_cast( get_option( "ANDROID_REPEAT_DELAY_MAX" ) ); + finger_repeat_delay = lerp( std::min( repeat_delay_min, repeat_delay_max ), + std::max( repeat_delay_min, repeat_delay_max ), + std::pow( t, get_option( "ANDROID_SENSITIVITY_POWER" ) ) ); } // TODO: Is there a better way to detect when string entry is allowed? From 0e77bb938952527dc831a2f71b1174082469d80e Mon Sep 17 00:00:00 2001 From: Valiant Date: Thu, 24 Dec 2020 21:17:24 +0400 Subject: [PATCH 46/47] Tweaks for luna park location --- .../miniature_railway/miniature_railway.json | 77 ++++++++----------- .../mapgen/nested/mini_railway_nested.json | 36 +++++++++ 2 files changed, 69 insertions(+), 44 deletions(-) create mode 100644 data/json/mapgen/nested/mini_railway_nested.json diff --git a/data/json/mapgen/miniature_railway/miniature_railway.json b/data/json/mapgen/miniature_railway/miniature_railway.json index 8efdd0cc398d5..46f6bb519e9c5 100644 --- a/data/json/mapgen/miniature_railway/miniature_railway.json +++ b/data/json/mapgen/miniature_railway/miniature_railway.json @@ -147,46 +147,46 @@ ".@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.", ".pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp.", ".%%%%%%%%%%%%%%HHHHHH_HHHHHH%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.", - ".%uuuuuuuuuuuuuH||hC|||||||Huuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu%.", + ".%uuuuuuuuuuuuuH||hC|||||||Huuuu..uuuuuuuuuuuuuuuuuuuuuuuuuuuuuu..uuuu%.", ".%uu###..bbb..uH|CCC|||H_H_Huu..X================================X....%.", - ".%uupppppppppppH|||||||H|H|Huu.XXuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuXX...%.", - ".%uu###..bbbuupH|DV||||HtHtHuuXX.uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.XX..%.", - ".%uuuuuuuuuuuupHHHHHH_HHHHHHuu=..uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu..=..%.", + ".%uupppppppppppH|||||||H|H|Hu..XXuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.XX...%.", + ".%uu###..bbbuupH|DV||||HtHtHu.XX.uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu..XX..%.", + ".%uuuuuuuuuuuupHHHHHH_HHHHHHu.=..uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu..=..%.", ".%uuLLL..bbbuBpppppppppppppppp=..uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu..=..%.", ".%uuLLLppppppppppppppppppppppp=pppppppppppppppppppppppp....uuuuuu..=..%.", ".%uuLLL..bbbuBpppppppppppppppp=uuu..X===================X..uuuuuu..=..%.", ".%uuuuuuuuuuuupuuuuuuuuuuuu%..=uuu.XXpppppppppppppppppp.XX.uuuuuu..=..%.", ".%uuLLL..bbbuup..bbb..MMMuu%..=uuuXX.p...ppppppppppp.....XXuuuuuu..=..%.", ".%uuLLLpppppppppppppppMMMuu%..=uuu=..p...~~~~~!~~~~~...uuu=uuuuuu..=..%.", - ".%uuLLL..bbbuup..bbb..MMMuu%..=uuu=..p..~~~~~~!~~~~~~..uuu=uuuuuu..=..%.", - ".%uuuuuuuuuuuupuuuuuuuuuuuu%.XXuuu=..p.~~~~~~~!~~~~~~~.uuu=uuuuuu..=..%.", + ".%uuLLL..bbbuup..bbb..MMMuu%..=.uu=..p..~~~~~~!~~~~~~..uuu=uuuuuu..=..%.", + ".%uuuuuuuuuuuupuuuuuuuuuuuu%.XX.uu=..p.~~~~~~~!~~~~~~~.uuu=uuuuuu..=..%.", ".%%%%%%%%%%%%%%%%%%%%%%%%%%%XX.uuu=..p~~~~~~~~!~~~~~~~~uuu=uuuuuu..=..%.", ".%uuuuuuuuu..X==============X..uuu=..p~~~~~!!!!!!!~~~~~~uu=uuuuuu..=..%.", - ".%uuuuuuuuu.XXuuuuuuuuuuuuuuuuuuuu=..p~~~~~~~~~~~~~~~~~~~u=uuuuuu.XX..%.", - ".%uuuuuuuuuXX.uuuuuu..TTTTTTTTTTTT=..p~~~~~~~~~~~~~~~~~~~u=uuuuuuXXuuu%.", - ".%uuuuuuuuu=..uuuuuu.TTX=========================================X.uuu%.", - ".%uuuuuuuuu=..uuuuuuTTXXTTTTTTTTTT=..p~~~~~~~~~~~~~~~~~~~u=uuuuuuuuuuu%.", - ".%uuuuuuuuu=..uuuuuuTXXTTuuuuuuuuu=..p~~~~~~~~~~~~~~~~~~~u=uuuuuuuuuuu%.", - ".%uuuuuuuuu=..uuuuuuT=TTuuuuuuuuuu=..p~~~~~~~~~~~~~~~~~~uu=uuuuuuuuuuu%.", + ".%uuuuuuuuu.XXuuuuuuuuuuuuu..uuuuu=..p~~~~~~~~~~~~~~~~~~~u=uuuuu..XX..%.", + ".%uuuuuuuu.XX.uuuuuu..TT.TTTTTTTTT=..p~~~~~~~~~~~~~~~~~~~u=uuuuu.XX.uu%.", + ".%uuuuuuuu.=..uuuuuu.T.X=========================================X.uuu%.", + ".%uuuuuuuuu=..uuuuuuT.XXTTTTTTTTTT=..p~~~~~~~~~~~~~~~~~~~u=uuuuu..uuuu%.", + ".%uuuuuuuuu=..uuuuuu.XXTTuuuuuuuuu=..p~~~~~~~~~~~~~~~~~~~u=uuuuuuuuuuu%.", + ".%uuuuuuuuu=..uuuuuu.=TTuuuuuuuuuu=..p~~~~~~~~~~~~~~~~~~uu=uuuuuuuuuuu%.", + ".%uuuuuuuuu=..uuuuuu.=Tuuuuuuuuuuu=..p~~~~~~~~~~~~~~~~~uuu=uuuuuuuuuuu%.", ".%uuuuuuuuu=..uuuuuuT=Tuuuuuuuuuuu=..p~~~~~~~~~~~~~~~~~uuu=uuuuuuuuuuu%.", - ".%uuuuuuuuu=..uuuuuuT=Tuuuuuuuuuuu=..p~~~~~~~~~~~~~~~~~uuu=uuuuuuuuuuu%.", - ".%uuuuuuuuu=..uuuuuuT=TTuuuuuuuuuu=..p.~~~~~~~~~~~~~~~.uuu=uuuuuuuuuuu%.", - ".%uuuuuuuuu=..uuuuuuTXXTTuuuuuuuuu=..p..~~~~~~~~~~~~~....XXuuuuuuuuuuu%.", - ".%uuuuuuuuu=..uuuuuuTTXXTTTTTTTTTT=..p...~~~~~~~~~~~....XX.uuuuuuuuuuu%.", - ".%uuuuuu..XX..uuuuuu.TTX================================X..uuuuuuuuuuu%.", - ".%uuuuuu.XXuuuuuuuuu..TTTTTTTTTTTT=..puuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu%.", - ".%uuuuuuXX.uuuuuuuuuuuuuuuuuuuuuuuX..puuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu%.", - ".%uuu..XX..uuuuuuuuuuuuuuuuuuuuuuuXX.puuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu%.", - ".%uuu.XXuuuuuuuuuuuuuuuuuuuuuuuuuu.X=========================X..uuuuuu%.", - ".%uuuXX.uuuuuuuuuuuu5555555555555....p......uuuuuuuuuuuuuuuuuXX.uuuuuu%.", - ".%uuu=..uuuuuuuuuuuu5|||lssl||||5....p......uuuuuuuuuuuuuuuuu.XXuuuuuu%.", - ".%uuu=..uuuuuuuuuuuu5|||||||||||ppppppppppp.uuuuuuuuuuuuuuuuu..=uuuuuu%.", - ".%uuuX..uuuuuuuuuuuu5=============*****==Xppuuuuuuuuuuuuuuuuu..=uuuuuu%.", - ".%uuuXX.uuuuuuuuuuuu5|||||||||||5uuuuuuuuXXpuuuuuuuuuuuuuuuuu.XXuuuuuu%.", - ".%uuu.XXuuuuuuuuuuuu5555555555555uuuuuuuu.X1uuuuuuuuuuuuuuuuuXX.uuuuuu%.", - ".%uuu..X============================*========================X..uuuuuu%.", - ".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.", - "........................................................................" + ".%uuuuuuuuu=..uuuuuuT=TTuuuuuuuuuu=..p.~~~~~~~~~~~~~~~.uu.=.uuuuuuuuuu%.", + ".%uuuuuuuuu=..uuuuuuTXXTTuuuuuuuuu=..p..~~~~~~~~~~~~~....XX.uuuuuuuuuu%.", + ".%uuuuuuuu.=..uuuuuuT.XXTTTTTTTTTT=..p...~~~~~~~~~~~....XX.uuuuuuuuuuu%.", + ".%uuuuuu..XX..uuuuuuTT.X================================X..uuuuuuuuuuu%.", + ".%uuuuuu.XX.uuuuuuuu..T..TTTTTTTT.=..puuuuuuuuuuuuuuuuu..uuuuuuuuuuuuu%.", + ".%uuuuu.XX.uuuuuuuuuuuuuuuuuuuuuu.X..puuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu%.", + ".%uuu..XX..uuuuuuuuuuuuuuuuuuuuuu.XX.puuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu%.", + ".%uuu.XX.uuuuuuuuuuuuuuuuuuuuuuuuu.X=========================X..uuuuuu%.", + ".%uu.XX.uuuuuuuuuuuu5555555555555....p......uuuuuuuuuuuuuuuu.XX.uuuuuu%.", + ".%uu.=..uuuuuuuuuuuu5|||lssl||||5....p......uuuuuuuuuuuuuuuuu.XX.uuuuu%.", + ".%uu.=..uuuuuuuuuuuu5|||||||||||ppppppppppp.uuuuuuuuuuuuuuuuu..=.uuuuu%.", + ".%uu.X..uuuuuuuuuuuu5=============Ю ==Xppuuuuuuuuuuuuuuuuu..=.uuuuu%.", + ".%uu.XX.uuuuuuuuuuuu5|||||||||||5u uuXXpuuuuuuuuuuuuuuuuu.XX.uuuuu%.", + ".%uuu.XX.uuuuuuuuuuu5555555555555u uu.X1uuuuuuuuuuuuuuuu.XX.uuuuuu%.", + ".%uuu..X========================== ======================X..uuuuuu%.", + ".%................................ ...............................%.", + ".%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%." ], "terrain": { "~": [ "t_water_sh" ], @@ -200,20 +200,9 @@ }, "furniture": { "b": [ "f_bench" ], "B": [ "f_birdbath" ], "C": [ "f_counter" ] }, "monsters": { "u": { "monster": "GROUP_SCHOOL", "chance": 1, "density": 0.001 } }, - "item": { "*": { "item": "talking_doll", "chance": 100 } }, - "place_vehicles": [ - { "vehicle": "miniature_train_loco", "x": 50, "y": 45, "chance": 100, "fuel": 20, "status": 25, "rotation": 180 }, - { - "vehicle": "miniature_train_loco", - "x": 30, - "y": 14, - "chance": 100, - "fuel": 5, - "status": 15, - "rotation": 270 - } - ], - "palettes": [ "miniature_railway_palette" ] + "place_vehicles": [ { "vehicle": "miniature_train_loco", "x": 30, "y": 14, "chance": 100, "fuel": 20, "status": 0, "rotation": 90 } ], + "palettes": [ "miniature_railway_palette" ], + "nested": { "Ю": { "chunks": [ [ "ordinary_railways", 80 ], [ "trolley_problem", 20 ] ] } } } }, { diff --git a/data/json/mapgen/nested/mini_railway_nested.json b/data/json/mapgen/nested/mini_railway_nested.json new file mode 100644 index 0000000000000..48bfde02cf9c7 --- /dev/null +++ b/data/json/mapgen/nested/mini_railway_nested.json @@ -0,0 +1,36 @@ +[ + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "trolley_problem", + "object": { + "mapgensize": [ 5, 5 ], + "rows": [ + "*****", + ".....", + ".....", + "==*==", + "....." + ], + "item": { "*": { "item": "talking_doll", "chance": 100 } }, + "terrain": { ".": "t_region_groundcover_urban", "*": "t_railroad_track_small", "=": "t_railroad_track_small" } + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "ordinary_railways", + "object": { + "mapgensize": [ 5, 5 ], + "rows": [ + "=====", + ".....", + ".....", + "=====", + "....." + ], + "terrain": { ".": "t_region_groundcover_urban", "=": "t_railroad_track_small" }, + "place_vehicles": [ { "vehicle": "miniature_train_loco", "x": 2, "y": 0, "chance": 100, "fuel": 20, "status": 0, "rotation": 0 } ] + } + } +] From e493723c132b32eeb11ae5e567c1416b81d03bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jianxiang=20Wang=20=28=E7=8E=8B=E5=81=A5=E7=BF=94=29?= Date: Fri, 25 Dec 2020 03:41:41 +0800 Subject: [PATCH 47/47] Fix warnings in update_pot.sh (#46294) * Fix warnings from extract_json_strings.py * Fix msgfmt warnings * Update data/json/overmap/overmap_terrain/overmap_terrain_necropolis.json --- data/json/overmap/overmap_land_use_codes.json | 3 ++- .../overmap_terrain/overmap_terrain_necropolis.json | 1 + data/json/species.json | 6 ++++-- data/mods/DinoMod/monsters/dinosaur.json | 3 ++- data/mods/Magiclysm/monsters/demon_spider.json | 1 + data/mods/Magiclysm/species.json | 6 +++++- lang/extract_json_strings.py | 4 +++- lang/update_pot.sh | 7 ++++++- 8 files changed, 24 insertions(+), 7 deletions(-) diff --git a/data/json/overmap/overmap_land_use_codes.json b/data/json/overmap/overmap_land_use_codes.json index 2e653fdd7adac..86fa5b6d95126 100644 --- a/data/json/overmap/overmap_land_use_codes.json +++ b/data/json/overmap/overmap_land_use_codes.json @@ -4,7 +4,8 @@ "type": "overmap_land_use_code", "id": "", "sym": "#", - "color": "white" + "color": "white", + "detailed_definition": "" }, { "type": "overmap_land_use_code", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_necropolis.json b/data/json/overmap/overmap_terrain/overmap_terrain_necropolis.json index a73bcd617c371..a35ab83f79ca7 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_necropolis.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_necropolis.json @@ -315,6 +315,7 @@ { "type": "overmap_terrain", "abstract": "generic_necropolis_underground", + "name": "underground", "color": "yellow", "see_cost": 999, "mondensity": 2 diff --git a/data/json/species.json b/data/json/species.json index 0585be37a2dac..36a7e8b4051ad 100644 --- a/data/json/species.json +++ b/data/json/species.json @@ -137,7 +137,8 @@ }, { "type": "SPECIES", - "id": "HALLUCINATION" + "id": "HALLUCINATION", + "description": "your imagination" }, { "type": "SPECIES", @@ -146,6 +147,7 @@ }, { "type": "SPECIES", - "id": "UNKNOWN" + "id": "UNKNOWN", + "description": "a bug" } ] diff --git a/data/mods/DinoMod/monsters/dinosaur.json b/data/mods/DinoMod/monsters/dinosaur.json index d5b55397d06e8..45a57bae801cb 100644 --- a/data/mods/DinoMod/monsters/dinosaur.json +++ b/data/mods/DinoMod/monsters/dinosaur.json @@ -3,7 +3,8 @@ "type": "SPECIES", "id": "DINOSAUR", "//": "Capping these at 1000 L and kg to prevent bodies and meat disappearing and vision at 50 for less aggro", - "fear_triggers": [ "FIRE" ] + "fear_triggers": [ "FIRE" ], + "description": "A dinosaur." }, { "type": "MONSTER", diff --git a/data/mods/Magiclysm/monsters/demon_spider.json b/data/mods/Magiclysm/monsters/demon_spider.json index d0e74e158df4d..8686c351b0e88 100644 --- a/data/mods/Magiclysm/monsters/demon_spider.json +++ b/data/mods/Magiclysm/monsters/demon_spider.json @@ -2,6 +2,7 @@ { "type": "SPECIES", "id": "DEMON_SPIDER", + "description": "A huge spider.", "anger_triggers": [ "FRIEND_DIED", "HURT", "PLAYER_CLOSE", "PLAYER_WEAK" ] }, { diff --git a/data/mods/Magiclysm/species.json b/data/mods/Magiclysm/species.json index d5a089a4a6c34..63e5f0e852b85 100644 --- a/data/mods/Magiclysm/species.json +++ b/data/mods/Magiclysm/species.json @@ -1,22 +1,26 @@ [ { "type": "SPECIES", - "id": "MAGICAL_BEAST" + "id": "MAGICAL_BEAST", + "description": "A magical beast." }, { "type": "SPECIES", "id": "DRAGON", + "description": "A dragon.", "anger_triggers": [ "HURT", "PLAYER_CLOSE", "PLAYER_WEAK", "STALK" ] }, { "type": "SPECIES", "id": "LIZARDFOLK", + "description": "A lizard-like humanoid.", "anger_triggers": [ "FRIEND_ATTACKED" ], "fear_triggers": [ "FIRE" ] }, { "type": "SPECIES", "id": "GOBLIN", + "description": "A short and cruel humanoid.", "anger_triggers": [ "HURT", "FRIEND_ATTACKED", "PLAYER_WEAK" ] } ] diff --git a/lang/extract_json_strings.py b/lang/extract_json_strings.py index 8611ffffb6385..62c56584e2fc1 100755 --- a/lang/extract_json_strings.py +++ b/lang/extract_json_strings.py @@ -41,7 +41,9 @@ def __str__(self): # no warning will be given if an untranslatable object is found in those files warning_suppressed_list = {os.path.normpath(i) for i in { "data/json/flags.json", + "data/json/npcs/npc.json", "data/json/overmap_terrain.json", + "data/json/statistics.json", "data/json/traps.json", "data/json/vehicleparts/", "data/raw/keybindings.json", @@ -49,7 +51,7 @@ def __str__(self): "data/mods/DeoxyMod/Deoxy_vehicle_parts.json", "data/mods/More_Survival_Tools/start_locations.json", "data/mods/NPC_Traits/npc_classes.json", - "data/mods/Tanks/monsters.json" + "data/mods/Tanks/monsters.json", }} diff --git a/lang/update_pot.sh b/lang/update_pot.sh index e4779639e7bb3..0a46d9b3ccc88 100755 --- a/lang/update_pot.sh +++ b/lang/update_pot.sh @@ -51,7 +51,12 @@ then pot_file="lang/po/cataclysm-dda.pot" sed -e "1,6d" \ -e "s/^\"Project-Id-Version:.*\"$/\"Project-Id-Version: $package $version\\\n\"/1" \ - -e "/\"Plural-Forms:.*\"$/d" $pot_file > $pot_file.temp + -e "/\"Plural-Forms:.*\"$/d" \ + -e "s/^\"PO-Revision-Date:.*\"$/\"PO-Revision-Date: $(date +%Y-%m-%d\\\ %H:%M%z)\\\n\"/1" \ + -e "s/^\"Last-Translator:.*\"$/\"Last-Translator: None\\\n\"/1" \ + -e "s/^\"Language-Team:.*\"$/\"Language-Team: None\\\n\"/1" \ + -e "s/^\"Language:.*\"$/\"Language: en\\\n\"/1" \ + $pot_file > $pot_file.temp mv $pot_file.temp $pot_file fi