Skip to content

Commit

Permalink
hide parameter that can't be used yet + apply parameters that couldn'…
Browse files Browse the repository at this point in the history
…t before
  • Loading branch information
PatrikLundell committed Feb 6, 2025
1 parent f9e04a4 commit 8b953b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/itype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ std::optional<int> itype::invoke( Character *p, item &it, map *here,
return 0;
}
if( use_methods.find( "transform" ) != use_methods.end() ) {
return invoke( p, it, pos, "transform" );
return invoke( p, it, here, pos, "transform" );
} else {
return invoke( p, it, pos, use_methods.begin()->first );
return invoke( p, it, here, pos, use_methods.begin()->first );
}
}

Expand Down
7 changes: 3 additions & 4 deletions src/iuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9170,8 +9170,7 @@ ret_val<void> use_function::can_call( const Character &p, const item &it,
it.tname() );
}

// TODO: Make can_use map aware
return actor->can_use( p, it, pos );
return actor->can_use( p, it, here, pos );
}

std::optional<int> use_function::call( Character *p, item &it,
Expand All @@ -9181,8 +9180,8 @@ std::optional<int> use_function::call( Character *p, item &it,
}

std::optional<int> use_function::call( Character *p, item &it,
map *here, const tripoint_bub_ms &pos ) const
map */*here*/, const tripoint_bub_ms &pos ) const
{
// TODO: Make can_use map aware
// TODO: Make use map aware
return actor->use( p, it, pos );
}

0 comments on commit 8b953b9

Please sign in to comment.