From ee961c184b8b040936f6b505955dd8b9082386ea Mon Sep 17 00:00:00 2001 From: Qrox Date: Thu, 22 Aug 2019 16:01:57 +0800 Subject: [PATCH 1/6] JSONize trap-vehicle run-over drops and trap conversions Also fix item duplication when traps are run over by vehicles --- data/json/traps.json | 37 ++++++++++++++++++++++++++++++------- src/trap.cpp | 16 ++++++++++++++++ src/trap.h | 5 +++++ src/vehicle_move.cpp | 24 +++++++++--------------- 4 files changed, 60 insertions(+), 22 deletions(-) diff --git a/data/json/traps.json b/data/json/traps.json index 8d06e5d01b231..8ef2004bb7bc7 100644 --- a/data/json/traps.json +++ b/data/json/traps.json @@ -122,7 +122,15 @@ "difficulty": 3, "action": "beartrap", "drops": [ "beartrap" ], - "vehicle_data": { "damage": 300, "sound_volume": 8, "sound": "SNAP!", "sound_type": "trap", "sound_variant": "bear_trap" } + "vehicle_data": { + "damage": 300, + "sound_volume": 8, + "sound": "SNAP!", + "sound_type": "trap", + "sound_variant": "bear_trap", + "remove_trap": true, + "spawn_items": [ "beartrap" ] + } }, { "type": "trap", @@ -136,7 +144,15 @@ "difficulty": 4, "action": "beartrap", "drops": [ "beartrap" ], - "vehicle_data": { "damage": 300, "sound_volume": 8, "sound": "SNAP!", "sound_type": "trap", "sound_variant": "bear_trap" } + "vehicle_data": { + "damage": 300, + "sound_volume": 8, + "sound": "SNAP!", + "sound_type": "trap", + "sound_variant": "bear_trap", + "remove_trap": true, + "spawn_items": [ "beartrap" ] + } }, { "type": "trap", @@ -202,13 +218,18 @@ "action": "crossbow", "drops": [ "string_36", "crossbow", "bolt_steel" ], "vehicle_data": { - "remove_trap": true, "chance": 30, "damage": 300, "sound_volume": 1, "sound": "Clank!", "sound_type": "fire_gun", - "sound_variant": "crossbow" + "sound_variant": "crossbow", + "remove_trap": true, + "spawn_items": [ + "crossbow", + "string_6", + { "id": "bolt_steel", "chance": 0.9 } + ] } }, { @@ -224,13 +245,13 @@ "action": "shotgun", "drops": [ "string_36", "shotgun_d", { "item": "shot_00", "quantity": 2, "charges": 1 } ], "vehicle_data": { - "remove_trap": true, "chance": 70, "damage": 300, "sound_volume": 60, "sound": "Bang!", "sound_type": "fire_gun", - "sound_variant": "shotgun_d" + "sound_variant": "shotgun_d", + "set_trap": "tr_shotgun_1" } }, { @@ -251,7 +272,9 @@ "sound_volume": 60, "sound": "Bang!", "sound_type": "fire_gun", - "sound_variant": "shotgun_s" + "sound_variant": "shotgun_s", + "remove_trap": true, + "spawn_items": [ "shotgun_s", "string_6" ] } }, { diff --git a/src/trap.cpp b/src/trap.cpp index 3090ad3491820..5f2945185c55a 100644 --- a/src/trap.cpp +++ b/src/trap.cpp @@ -148,6 +148,22 @@ void trap::load( JsonObject &jo, const std::string & ) vehicle_data.sound = jv.get_string( "sound", "" ); vehicle_data.sound_type = jv.get_string( "sound_type", "" ); vehicle_data.sound_variant = jv.get_string( "sound_variant", "" ); + vehicle_data.spawn_items.clear(); + if( jv.has_array( "spawn_items" ) ) { + JsonArray ja = jv.get_array( "spawn_items" ); + while( ja.has_more() ) { + if( ja.test_object() ) { + JsonObject joitm = ja.next_object(); + vehicle_data.spawn_items.emplace_back( joitm.get_string( "id" ), joitm.get_float( "chance" ) ); + } else { + vehicle_data.spawn_items.emplace_back( ja.next_string(), 1.0 ); + } + } + } + vehicle_data.set_trap = trap_str_id::NULL_ID(); + if( jv.read( "set_trap", vehicle_data.set_trap ) ) { + vehicle_data.remove_trap = false; + } } } diff --git a/src/trap.h b/src/trap.h index 22383742cfec0..cb0e08c294b34 100644 --- a/src/trap.h +++ b/src/trap.h @@ -63,6 +63,8 @@ void snake( const tripoint &p, Creature *c, item *i ); } // namespace trapfunc struct vehicle_handle_trap_data { + using itype_id = std::string; + bool remove_trap = false; bool do_explosion = false; bool is_falling = false; @@ -73,6 +75,9 @@ struct vehicle_handle_trap_data { std::string sound; std::string sound_type; std::string sound_variant; + // the double represents the count or chance to spawn. + std::vector> spawn_items; + trap_str_id set_trap = trap_str_id::NULL_ID(); }; using trap_function = std::function; diff --git a/src/vehicle_move.cpp b/src/vehicle_move.cpp index 3ecc5045dae30..be796d629d3f7 100644 --- a/src/vehicle_move.cpp +++ b/src/vehicle_move.cpp @@ -808,21 +808,6 @@ void vehicle::handle_trap( const tripoint &p, int part ) } } - if( t == tr_beartrap || t == tr_beartrap_buried ) { - g->m.spawn_item( p, "beartrap" ); - } else if( t == tr_crossbow ) { - g->m.spawn_item( p, "crossbow" ); - g->m.spawn_item( p, "string_6" ); - if( !one_in( 10 ) ) { - g->m.spawn_item( p, "bolt_steel" ); - } - } else if( t == tr_shotgun_2 ) { - g->m.trap_set( p, tr_shotgun_1 ); - } else if( t == tr_shotgun_1 ) { - g->m.spawn_item( p, "shotgun_s" ); - g->m.spawn_item( p, "string_6" ); - } - if( veh_data.chance >= rng( 1, 100 ) ) { if( veh_data.sound_volume > 0 ) { sounds::sound( p, veh_data.sound_volume, sounds::sound_t::combat, veh_data.sound, false, @@ -837,6 +822,15 @@ void vehicle::handle_trap( const tripoint &p, int part ) if( veh_data.remove_trap || veh_data.do_explosion ) { g->m.remove_trap( p ); } + for( const auto &it : veh_data.spawn_items ) { + int cnt = roll_remainder( it.second ); + if( cnt > 0 ) { + g->m.spawn_item( p, it.first, cnt ); + } + } + if( veh_data.set_trap ) { + g->m.trap_set( p, veh_data.set_trap.id() ); + } } } From 7ab8d81180f7e11c03fe25e7c8e3412646c6d76f Mon Sep 17 00:00:00 2001 From: Qrox Date: Thu, 22 Aug 2019 17:38:07 +0800 Subject: [PATCH 2/6] Keep known traps known, and make seen traps in action known --- src/vehicle_move.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/vehicle_move.cpp b/src/vehicle_move.cpp index be796d629d3f7..a3858dca082c6 100644 --- a/src/vehicle_move.cpp +++ b/src/vehicle_move.cpp @@ -799,8 +799,10 @@ void vehicle::handle_trap( const tripoint &p, int part ) return; } - if( g->u.sees( p ) ) { - if( g->u.knows_trap( p ) ) { + const bool seen = g->u.sees( p ); + const bool known = g->u.knows_trap( p ); + if( seen ) { + if( known ) { //~ %1$s: name of the vehicle; %2$s: name of the related vehicle part; %3$s: trap name add_msg( m_bad, _( "The %1$s's %2$s runs over %3$s." ), name, parts[ part ].name(), tr.name() ); } else { @@ -819,8 +821,10 @@ void vehicle::handle_trap( const tripoint &p, int part ) // Hit the wheel directly since it ran right over the trap. damage_direct( pwh, veh_data.damage ); } + bool still_has_trap = true; if( veh_data.remove_trap || veh_data.do_explosion ) { g->m.remove_trap( p ); + still_has_trap = false; } for( const auto &it : veh_data.spawn_items ) { int cnt = roll_remainder( it.second ); @@ -830,6 +834,19 @@ void vehicle::handle_trap( const tripoint &p, int part ) } if( veh_data.set_trap ) { g->m.trap_set( p, veh_data.set_trap.id() ); + still_has_trap = true; + } + if( still_has_trap ) { + const trap &tr = g->m.tr_at( p ); + if( seen || known ) { + // known status has been reset by map::trap_set() + g->u.add_known_trap( p, tr ); + } + if( seen && !known ) { + // hard to miss! + const std::string direction = direction_name( direction_from( g->u.pos(), p ) ); + add_msg( _( "You've spotted a %1$s to the %2$s!" ), tr.name(), direction ); + } } } } From 46985e90e74e7f31b6566705a1cded1d9b7483ce Mon Sep 17 00:00:00 2001 From: Qrox Date: Thu, 22 Aug 2019 17:54:25 +0800 Subject: [PATCH 3/6] Fix double barrel shotgun trap turning into single barrel shotgun trap when run over by vehicles --- data/json/traps.json | 25 ++++++++++++++++++++++++- src/trap.cpp | 2 ++ src/trap.h | 1 + src/trapfunc.cpp | 4 ++-- 4 files changed, 29 insertions(+), 3 deletions(-) diff --git a/data/json/traps.json b/data/json/traps.json index 8ef2004bb7bc7..3f772723dfa94 100644 --- a/data/json/traps.json +++ b/data/json/traps.json @@ -251,7 +251,30 @@ "sound": "Bang!", "sound_type": "fire_gun", "sound_variant": "shotgun_d", - "set_trap": "tr_shotgun_1" + "set_trap": "tr_shotgun_2_1" + } + }, + { + "type": "trap", + "id": "tr_shotgun_2_1", + "trigger_weight": 200, + "name": "shotgun trap", + "color": "red", + "symbol": "^", + "visibility": 4, + "avoidance": 5, + "difficulty": 6, + "action": "shotgun", + "drops": [ "string_36", "shotgun_d", { "item": "shot_00", "quantity": 1, "charges": 1 } ], + "vehicle_data": { + "chance": 70, + "damage": 300, + "sound_volume": 60, + "sound": "Bang!", + "sound_type": "fire_gun", + "sound_variant": "shotgun_d", + "remove_trap": true, + "spawn_items": [ "shotgun_d", "string_6" ] } }, { diff --git a/src/trap.cpp b/src/trap.cpp index 5f2945185c55a..5132af424a4fd 100644 --- a/src/trap.cpp +++ b/src/trap.cpp @@ -273,6 +273,7 @@ tr_caltrops_glass, tr_tripwire, tr_crossbow, tr_shotgun_2, +tr_shotgun_2_1, tr_shotgun_1, tr_engine, tr_blade, @@ -340,6 +341,7 @@ void trap::finalize() tr_tripwire = trapfind( "tr_tripwire" ); tr_crossbow = trapfind( "tr_crossbow" ); tr_shotgun_2 = trapfind( "tr_shotgun_2" ); + tr_shotgun_2_1 = trapfind( "tr_shotgun_2_1" ); tr_shotgun_1 = trapfind( "tr_shotgun_1" ); tr_engine = trapfind( "tr_engine" ); tr_blade = trapfind( "tr_blade" ); diff --git a/src/trap.h b/src/trap.h index cb0e08c294b34..a3de4f4beeec0 100644 --- a/src/trap.h +++ b/src/trap.h @@ -259,6 +259,7 @@ tr_caltrops_glass, tr_tripwire, tr_crossbow, tr_shotgun_2, +tr_shotgun_2_1, tr_shotgun_1, tr_engine, tr_blade, diff --git a/src/trapfunc.cpp b/src/trapfunc.cpp index a20580e4fed1e..d56b4a489326d 100644 --- a/src/trapfunc.cpp +++ b/src/trapfunc.cpp @@ -443,7 +443,7 @@ void trapfunc::shotgun( const tripoint &p, Creature *c, item * ) if( n != nullptr ) { ///\EFFECT_STR_MAX increases chance of two shots from shotgun trap shots = ( one_in( 8 ) || one_in( 20 - n->str_max ) ? 2 : 1 ); - if( g->m.tr_at( p ).loadid == tr_shotgun_1 ) { + if( g->m.tr_at( p ).loadid != tr_shotgun_2 ) { shots = 1; } ///\EFFECT_DODGE reduces chance of being hit by shotgun trap @@ -505,7 +505,7 @@ void trapfunc::shotgun( const tripoint &p, Creature *c, item * ) break; } shots = ( one_in( 8 ) || one_in( chance ) ? 2 : 1 ); - if( g->m.tr_at( p ).loadid == tr_shotgun_1 ) { + if( g->m.tr_at( p ).loadid != tr_shotgun_2 ) { shots = 1; } if( seen ) { From 74e32a89c2e3a5cb1bdd9be20c8d65f2bc8e2f3b Mon Sep 17 00:00:00 2001 From: Qrox Date: Thu, 22 Aug 2019 19:42:12 +0800 Subject: [PATCH 4/6] Fix vehicle triggering traps when moving off them --- src/map.cpp | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/map.cpp b/src/map.cpp index 7627be78407eb..2cf18206bd8e9 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -543,24 +543,6 @@ vehicle *map::move_vehicle( vehicle &veh, const tripoint &dp, const tileray &fac } } - // Now we're gonna handle traps we're standing on (if we're still moving). - if( !vertical && can_move ) { - const auto wheel_indices = veh.wheelcache; // Don't use a reference here, it causes a crash. - for( auto &w : wheel_indices ) { - const tripoint wheel_p = veh.global_part_pos3( w ); - if( one_in( 2 ) && displace_water( wheel_p ) ) { - sounds::sound( wheel_p, 4, sounds::sound_t::movement, _( "splash!" ), false, - "environment", "splash" ); - } - - veh.handle_trap( wheel_p, w ); - if( !has_flag( "SEALED", wheel_p ) ) { - // TODO: Make this value depend on the wheel - smash_items( wheel_p, 5 ); - } - } - } - const int last_turn_dec = 1; if( veh.last_turn < 0 ) { veh.last_turn += last_turn_dec; @@ -606,6 +588,23 @@ vehicle *map::move_vehicle( vehicle &veh, const tripoint &dp, const tileray &fac veh.possibly_recover_from_skid(); } } + // Now we're gonna handle traps we're standing on (if we're still moving). + if( !vertical && can_move ) { + const auto wheel_indices = veh.wheelcache; // Don't use a reference here, it causes a crash. + for( auto &w : wheel_indices ) { + const tripoint wheel_p = veh.global_part_pos3( w ); + if( one_in( 2 ) && displace_water( wheel_p ) ) { + sounds::sound( wheel_p, 4, sounds::sound_t::movement, _( "splash!" ), false, + "environment", "splash" ); + } + + veh.handle_trap( wheel_p, w ); + if( !has_flag( "SEALED", wheel_p ) ) { + // TODO: Make this value depend on the wheel + smash_items( wheel_p, 5 ); + } + } + } // Redraw scene // But only if the vehicle was seen before or after the move if( seen || sees_veh( g->u, veh, true ) ) { From 2544df4e45ae829abd5b04dc3bd65ff564b919b7 Mon Sep 17 00:00:00 2001 From: Qrox Date: Thu, 22 Aug 2019 20:01:37 +0800 Subject: [PATCH 5/6] Update gfx configs --- gfx/ChestHole16Tileset/tile_config.json | 10 +--------- gfx/ChestHole32Tileset/tile_config.json | 10 +--------- gfx/ChestHole32Tileset_iso/tile_config.json | 4 ++-- gfx/ChestHoleTileset/tile_config.json | 10 +--------- gfx/HitButton_iso/tile_config.json | 2 +- gfx/HoderTileset/tile_config.json | 8 +------- gfx/MSX++DeadPeopleEdition/tile_config.json | 8 ++------ gfx/MShock24TilesetModded/tile_config.json | 6 +----- gfx/MShock32TilesetModded/tile_config.json | 6 +----- gfx/MshockXotto+/tile_config.json | 6 +----- gfx/RetroDaysTileset/tile_config.json | 5 +---- gfx/tile_config.json | 4 ++++ gfx/tile_config_template.json | 7 +++++++ 13 files changed, 24 insertions(+), 62 deletions(-) diff --git a/gfx/ChestHole16Tileset/tile_config.json b/gfx/ChestHole16Tileset/tile_config.json index 1b2d04648db63..dc4af572f4a8f 100644 --- a/gfx/ChestHole16Tileset/tile_config.json +++ b/gfx/ChestHole16Tileset/tile_config.json @@ -50771,15 +50771,7 @@ "rotates": false }, { - "id": "shotgun_trap", - "fg": 2602 - }, - { - "id": "tr_shotgun_2", - "fg": 2602 - }, - { - "id": "tr_shotgun_1", + "id": [ "shotgun_trap", "tr_shotgun_2", "tr_shotgun_2_1", "tr_shotgun_1" ], "fg": 2602 }, { diff --git a/gfx/ChestHole32Tileset/tile_config.json b/gfx/ChestHole32Tileset/tile_config.json index 056db30eaa68d..08db2f278a4c2 100644 --- a/gfx/ChestHole32Tileset/tile_config.json +++ b/gfx/ChestHole32Tileset/tile_config.json @@ -50746,15 +50746,7 @@ "rotates": false }, { - "id": "shotgun_trap", - "fg": 2602 - }, - { - "id": "tr_shotgun_2", - "fg": 2602 - }, - { - "id": "tr_shotgun_1", + "id": [ "shotgun_trap", "tr_shotgun_2", "tr_shotgun_2_1", "tr_shotgun_1" ], "fg": 2602 }, { diff --git a/gfx/ChestHole32Tileset_iso/tile_config.json b/gfx/ChestHole32Tileset_iso/tile_config.json index 03a72f6cb20db..0767f33344999 100644 --- a/gfx/ChestHole32Tileset_iso/tile_config.json +++ b/gfx/ChestHole32Tileset_iso/tile_config.json @@ -12635,8 +12635,8 @@ "rotates": false }, { - "fg": 2602, - "id": ["shotgun_trap", "tr_shotgun_2", "tr_shotgun_1"] + "id": [ "shotgun_trap", "tr_shotgun_2", "tr_shotgun_2_1", "tr_shotgun_1" ], + "fg": 2602 }, { "fg": 2603, diff --git a/gfx/ChestHoleTileset/tile_config.json b/gfx/ChestHoleTileset/tile_config.json index 29de6d6c160f5..68bd997e02897 100644 --- a/gfx/ChestHoleTileset/tile_config.json +++ b/gfx/ChestHoleTileset/tile_config.json @@ -50781,15 +50781,7 @@ "rotates": false }, { - "id": "shotgun_trap", - "fg": 2602 - }, - { - "id": "tr_shotgun_2", - "fg": 2602 - }, - { - "id": "tr_shotgun_1", + "id": [ "shotgun_trap", "tr_shotgun_2", "tr_shotgun_2_1", "tr_shotgun_1" ], "fg": 2602 }, { diff --git a/gfx/HitButton_iso/tile_config.json b/gfx/HitButton_iso/tile_config.json index 4680583be6405..519f635a39b3c 100644 --- a/gfx/HitButton_iso/tile_config.json +++ b/gfx/HitButton_iso/tile_config.json @@ -5113,7 +5113,7 @@ "fg": 1591 }, { - "id": ["rm20", "rm120c", "pipe_combination_gun", "blunderbuss", "shotgun_sawn", "shotgun_s", "shotgun_d", "remington_870", "mossberg_500", "ksg", "m1014", "saiga_12", "l_def_12", "revolver_shotgun", "pipe_shotgun", "pipe_double_shotgun", "pipe_shotgunsawn", "bigun", "abzats", "shotgun_trap", "tr_shotgun_1", "tr_shotgun_2" ], + "id": ["rm20", "rm120c", "pipe_combination_gun", "blunderbuss", "shotgun_sawn", "shotgun_s", "shotgun_d", "remington_870", "mossberg_500", "ksg", "m1014", "saiga_12", "l_def_12", "revolver_shotgun", "pipe_shotgun", "pipe_double_shotgun", "pipe_shotgunsawn", "bigun", "abzats", "shotgun_trap", "tr_shotgun_1", "tr_shotgun_2", "tr_shotgun_2_1" ], "fg": 1592 }, { diff --git a/gfx/HoderTileset/tile_config.json b/gfx/HoderTileset/tile_config.json index 224e08a55bb13..d6782cfa2311f 100644 --- a/gfx/HoderTileset/tile_config.json +++ b/gfx/HoderTileset/tile_config.json @@ -1899,13 +1899,7 @@ "rotates":false }, { - "id":"tr_shotgun_2", - "fg":1403, - "bg":191, - "rotates":false - }, - { - "id":"tr_shotgun_1", + "id": [ "tr_shotgun_2", "tr_shotgun_2_1", "tr_shotgun_1" ], "fg":1403, "bg":191, "rotates":false diff --git a/gfx/MSX++DeadPeopleEdition/tile_config.json b/gfx/MSX++DeadPeopleEdition/tile_config.json index c29fa213b4f72..a6ab8034f0037 100644 --- a/gfx/MSX++DeadPeopleEdition/tile_config.json +++ b/gfx/MSX++DeadPeopleEdition/tile_config.json @@ -88310,11 +88310,7 @@ "rotates": false }, { - "id": "tr_shotgun_2", - "fg": 3932 - }, - { - "id": "tr_shotgun_1", + "id": [ "tr_shotgun_2", "tr_shotgun_2_1", "tr_shotgun_1" ], "fg": 3932 }, { @@ -130112,4 +130108,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/gfx/MShock24TilesetModded/tile_config.json b/gfx/MShock24TilesetModded/tile_config.json index 0ac7cbbd7a8b8..79a48a8d6300a 100644 --- a/gfx/MShock24TilesetModded/tile_config.json +++ b/gfx/MShock24TilesetModded/tile_config.json @@ -22751,11 +22751,7 @@ "rotates": false }, { - "id": "tr_shotgun_2", - "fg": 2851 - }, - { - "id": "tr_shotgun_1", + "id": [ "tr_shotgun_2", "tr_shotgun_2_1", "tr_shotgun_1" ], "fg": 2851 }, { diff --git a/gfx/MShock32TilesetModded/tile_config.json b/gfx/MShock32TilesetModded/tile_config.json index 4f7fc06ff839d..99dc8bd4e8689 100644 --- a/gfx/MShock32TilesetModded/tile_config.json +++ b/gfx/MShock32TilesetModded/tile_config.json @@ -22751,11 +22751,7 @@ "rotates": false }, { - "id": "tr_shotgun_2", - "fg": 2851 - }, - { - "id": "tr_shotgun_1", + "id": [ "tr_shotgun_2", "tr_shotgun_2_1", "tr_shotgun_1" ], "fg": 2851 }, { diff --git a/gfx/MshockXotto+/tile_config.json b/gfx/MshockXotto+/tile_config.json index 42ef5d2a80d3f..fa82013d2cccd 100644 --- a/gfx/MshockXotto+/tile_config.json +++ b/gfx/MshockXotto+/tile_config.json @@ -35400,11 +35400,7 @@ "rotates": false }, { - "id": "tr_shotgun_2", - "fg": 3932 - }, - { - "id": "tr_shotgun_1", + "id": [ "tr_shotgun_2", "tr_shotgun_2_1", "tr_shotgun_1" ], "fg": 3932 }, { diff --git a/gfx/RetroDaysTileset/tile_config.json b/gfx/RetroDaysTileset/tile_config.json index be09303ffddea..6c8dfe2800f46 100644 --- a/gfx/RetroDaysTileset/tile_config.json +++ b/gfx/RetroDaysTileset/tile_config.json @@ -5612,10 +5612,7 @@ "rotates": false }, { - "id": [ - "tr_shotgun_1", - "tr_shotgun_2" - ], + "id": [ "tr_shotgun_2", "tr_shotgun_2_1", "tr_shotgun_1" ], "fg": 860, "rotates": false }, diff --git a/gfx/tile_config.json b/gfx/tile_config.json index 1e95eb255e9aa..301f10f75bf0e 100644 --- a/gfx/tile_config.json +++ b/gfx/tile_config.json @@ -996,6 +996,10 @@ "id":"tr_shotgun_2", "rotates":false }, + { + "id":"tr_shotgun_2_1", + "rotates":false + }, { "id":"tr_shotgun_1", "rotates":false diff --git a/gfx/tile_config_template.json b/gfx/tile_config_template.json index 8276160cbda33..28f3a318a804e 100644 --- a/gfx/tile_config_template.json +++ b/gfx/tile_config_template.json @@ -1527,6 +1527,13 @@ "rotates":false, "multitile":false }, + { + "id": "tr_shotgun_2_1", + "fg":-1, + "bg":-1, + "rotates":false, + "multitile":false + }, { "id": "tr_shotgun_1", "fg":-1, From 9835b1a03e5de998f078d63015a743894b44deb0 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: Sun, 25 Aug 2019 10:09:43 +0800 Subject: [PATCH 6/6] Apply suggestions from code review Co-Authored-By: ZhilkinSerg --- data/json/traps.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/data/json/traps.json b/data/json/traps.json index 3f772723dfa94..123dc756d0640 100644 --- a/data/json/traps.json +++ b/data/json/traps.json @@ -225,11 +225,7 @@ "sound_type": "fire_gun", "sound_variant": "crossbow", "remove_trap": true, - "spawn_items": [ - "crossbow", - "string_6", - { "id": "bolt_steel", "chance": 0.9 } - ] + "spawn_items": [ "crossbow", "string_6", { "id": "bolt_steel", "chance": 0.9 } ] } }, {