Skip to content

Commit

Permalink
Add check to item_factory.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
KheirFerrum committed Jul 8, 2022
1 parent 72a45d7 commit 31b0994
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/item_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,10 @@ void Item_factory::check_definitions() const
msg += string_format( "has 'FIRESTARTER' flag, but neither can have charges nor defines 'firestarter' use func" );
}

if( type->has_flag( "NPC_COMBAT_ITEM" ) && !type->has_use() ) {
msg += string_format( "has 'NPC_COMBAT_ITEM' flag, but has no use func" );
}

if( type->comestible ) {
if( !type->comestible->tool.is_null() ) {
auto req_tool = find_template( type->comestible->tool );
Expand Down

0 comments on commit 31b0994

Please sign in to comment.