Skip to content

Commit 1d8df85

Browse files
committed
Update crafting.cpp
1 parent d21c703 commit 1d8df85

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/crafting.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,7 +1384,7 @@ static void destroy_random_component( item &craft, const Character &crafter )
13841384
}
13851385

13861386
if( x_in_y( explosion_chance * 100, 100 ) ) {
1387-
const int weight_grams = craft.weight() / units::gram;
1387+
const int weight_grams = units::to_gram(craft.weight());
13881388
const int explosion_power = 2 * weight_grams * missing * batch_size;
13891389
const double casing_mass = static_cast<double>(weight_grams * missing * batch_size);
13901390
const double fragment_mass = 0.1;
@@ -1399,7 +1399,7 @@ static void destroy_random_component( item &craft, const Character &crafter )
13991399
_( "The explosive craft explodes violently!" ),
14001400
_( "The explosive craft explodes violently near <npcname>!" )
14011401
);
1402-
get_map().explosion( crafter.pos(), exp );
1402+
explosion( crafter.pos(), exp );
14031403
}
14041404
}
14051405
}

0 commit comments

Comments
 (0)