bool valid() const override {
     if( !target() ) {
         return false;
     }
     if( &cur.veh.parts[ cur.part ].base == target() ) {
         return true; // vehicle_part::base
     }
     if( cur.has_item( *target() ) ) {
         return true; // item within CARGO
     }
     return false;
 }
예제 #2
0
 bool valid() const override {
     return target() && cur.has_item( *target() );
 }