From 8b953b99a801c45197066d8dbca736c89ede650c Mon Sep 17 00:00:00 2001 From: PatrikLundell Date: Thu, 6 Feb 2025 16:46:15 +0100 Subject: [PATCH] hide parameter that can't be used yet + apply parameters that couldn't before --- src/itype.cpp | 4 ++-- src/iuse.cpp | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/itype.cpp b/src/itype.cpp index 9aa8e904ce1b1..3798bc130d121 100644 --- a/src/itype.cpp +++ b/src/itype.cpp @@ -204,9 +204,9 @@ std::optional 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 ); } } diff --git a/src/iuse.cpp b/src/iuse.cpp index 90ec37123faf8..92b807670fe7e 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -9170,8 +9170,7 @@ ret_val 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 use_function::call( Character *p, item &it, @@ -9181,8 +9180,8 @@ std::optional use_function::call( Character *p, item &it, } std::optional 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 ); }