Skip to content

Commit

Permalink
Make acetylene torch cut metal walls. (#46255)
Browse files Browse the repository at this point in the history
  • Loading branch information
NeviNovat authored and ZhilkinSerg committed Mar 25, 2021
1 parent ff61790 commit 453853b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/activity_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2299,6 +2299,10 @@ void activity_handlers::oxytorch_finish( player_activity *act, player *p )
here.ter_set( pos, t_mdoor_frame );
here.spawn_item( pos, itype_steel_plate, rng( 0, 1 ) );
here.spawn_item( pos, itype_steel_chunk, rng( 3, 8 ) );
} else if( ter == t_wall_metal ) {
here.ter_set( pos, t_scrap_wall_halfway );
here.spawn_item( pos, itype_steel_plate, rng( 2, 3 ) );
here.spawn_item( pos, itype_steel_chunk, rng( 12, 20 ) );
} else if( ter == t_window_enhanced || ter == t_window_enhanced_noglass ) {
here.ter_set( pos, t_window_empty );
here.spawn_item( pos, itype_steel_plate, rng( 0, 1 ) );
Expand Down
8 changes: 5 additions & 3 deletions src/iuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5048,7 +5048,8 @@ cata::optional<int> iuse::oxytorch( player *p, item *it, bool, const tripoint &
t_metal_grate_window_with_curtain_open,
t_metal_grate_window_noglass,
t_metal_grate_window_with_curtain_noglass,
t_metal_grate_window_with_curtain_open_noglass
t_metal_grate_window_with_curtain_open_noglass,
t_wall_metal
};
const std::set<furn_id> allowed_furn_id {
f_rack,
Expand Down Expand Up @@ -5103,8 +5104,9 @@ cata::optional<int> iuse::oxytorch( player *p, item *it, bool, const tripoint &
ter == t_metal_grate_window_with_curtain_open_noglass ) {
turns = to_turns<int>( 10_seconds );
} else if( ter == t_door_metal_locked || ter == t_door_metal_c || ter == t_door_bar_c ||
ter == t_door_bar_locked || ter == t_door_metal_pickable || furn == f_safe_l ||
furn == f_gunsafe_ml || furn == f_gunsafe_mj || furn == f_gun_safe_el ) {
ter == t_door_bar_locked || ter == t_door_metal_pickable || ter == t_wall_metal ||
furn == f_safe_l || furn == f_gunsafe_ml || furn == f_gunsafe_mj ||
furn == f_gun_safe_el ) {
turns = to_turns<int>( 15_seconds );
} else {
return cata::nullopt;
Expand Down
4 changes: 4 additions & 0 deletions src/mapdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,8 @@ ter_id t_null,
t_wall_half, t_wall_wood, t_wall_wood_chipped, t_wall_wood_broken,
t_wall, t_concrete_wall, t_brick_wall,
t_wall_metal,
t_scrap_wall,
t_scrap_wall_halfway,
t_wall_glass,
t_wall_glass_alarm,
t_reinforced_glass, t_reinforced_glass_shutter, t_reinforced_glass_shutter_open,
Expand Down Expand Up @@ -707,6 +709,8 @@ void set_ter_ids()
t_concrete_wall = ter_id( "t_concrete_wall" );
t_brick_wall = ter_id( "t_brick_wall" );
t_wall_metal = ter_id( "t_wall_metal" );
t_scrap_wall = ter_id( "t_scrap_wall" );
t_scrap_wall_halfway = ter_id( "t_scrap_wall_halfway" );
t_wall_glass = ter_id( "t_wall_glass" );
t_wall_glass_alarm = ter_id( "t_wall_glass_alarm" );
t_reinforced_glass = ter_id( "t_reinforced_glass" );
Expand Down
2 changes: 2 additions & 0 deletions src/mapdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,8 @@ extern ter_id t_null,
t_wall_half, t_wall_wood, t_wall_wood_chipped, t_wall_wood_broken,
t_wall, t_concrete_wall, t_brick_wall,
t_wall_metal,
t_scrap_wall,
t_scrap_wall_halfway,
t_wall_glass,
t_wall_glass_alarm,
t_reinforced_glass, t_reinforced_glass_shutter, t_reinforced_glass_shutter_open,
Expand Down

0 comments on commit 453853b

Please sign in to comment.