Skip to content

Commit

Permalink
Variable for vehicle part info
Browse files Browse the repository at this point in the history
  • Loading branch information
harakka committed Mar 29, 2024
1 parent b32bc37 commit bcbcd7f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/vehicle_use.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2092,11 +2092,12 @@ void vehicle::build_interact_menu( veh_menu &menu, const tripoint &p, bool with_
// Remove attached tools that have become incompatible with workstation because of migration etc
if( vp.avail_part_with_feature( "VEH_TOOLS" ) && !vp.get_tools().empty() ) {
const std::optional<vpart_reference> vp_toolstation = vp.avail_part_with_feature( "VEH_TOOLS" );
if( vp_toolstation->info().toolkit_info ) {
const std::set<itype_id> &allowed_tool_types = vp_toolstation->info().toolkit_info->allowed_types;
const vpart_info vp_info = vp_toolstation->info();
if( vp_info.toolkit_info ) {
const std::set<itype_id> &allowed_tool_types = vp_info.toolkit_info->allowed_types;

std::set<itype_id> builtin_tool_types;
for( const auto &[tool_type, _] : vp_toolstation->info().get_pseudo_tools() ) {
for( const auto &[tool_type, _] : vp_info.get_pseudo_tools() ) {
builtin_tool_types.insert( tool_type );
}

Expand Down

0 comments on commit bcbcd7f

Please sign in to comment.