Skip to content

Commit

Permalink
fix: crafted items no longer try to set default ammotype for items sp…
Browse files Browse the repository at this point in the history
…awned empty (#6009)
  • Loading branch information
chaosvolt authored Jan 30, 2025
1 parent 446f32a commit cc542bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/crafting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,10 @@ void complete_craft( player &p, item &craft, const bench_location & )
food_contained.set_owner( p.get_faction()->id );
}

// If we created a tool that spawns empty, don't preset its ammotype.
if( !newit->ammo_remaining() ) {
newit->ammo_unset();
}
if( newit->made_of( LIQUID ) ) {
liquid_handler::handle_all_liquid( std::move( newit ), PICKUP_RANGE );
} else {
Expand Down

0 comments on commit cc542bd

Please sign in to comment.