-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vehicle installation requirements (part 2) [RDY] #17209
Conversation
038a94a
to
7509dbb
Compare
part.removal_reqs.qualities = { { { { quality_id( "HAMMER" ), 1, 1 } } } }; | ||
part.install_reqs.components.push_back( { { { "nail", 20 } } } ); | ||
} else { | ||
part.install_reqs.components.push_back( { { { "duct_tape", 20 } } } ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it allow welding?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but this is specified via the vehicle parts requirement data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See 13ddd1c. Heavy duty frames now require much more welding than standard frames
03452a6
to
13ddd1c
Compare
There's a lot more refactoring possible within See updated preamble for screenshot |
Could it also fix the regression with wheels not showing their sizes in install menu? |
But that's a rather significant regression brought by recent changes to the vehicle system. |
@Coolthulhu We were both typing at the same time - that isn't the reply to your earlier comment |
See 360d00a. Can handle |
"skills": [ [ "mechanics", 3 ] ], | ||
"time": 240000, | ||
"qualities": [ { "id": "GLARE", "level": 2 } ], | ||
"tools": [ [ [ "welder", 200 ], [ "welder_crude", 300 ], [ "toolset", 150 ], [ "oxy_torch", 60 ] ] ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't "toolset" be 300?
Conflict with #17208 |
@@ -7467,16 +7464,17 @@ void game::exam_vehicle(vehicle &veh, const tripoint &p, int cx, int cy) | |||
// Stored in activity.index and used in the complete_vehicle() callback to finish task. | |||
switch (vehint.sel_cmd) { | |||
case 'i': | |||
time = setuptime + std::max(mintime, 5000 * diff - skill * 2500); | |||
time = vehint.sel_vpart_info->install_time( g->u ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
g->
can (should) be omitted. It's in the game
class (x4).
Lack of relevant tools isn't properly checked until the work is finished. |
Can you expand upon this and also confirm the above test case? |
The extra steering axles requirement isn't properly checked when you don't meet the base requirements. For example, you can install extra casters with 0 skill if the vehicle has a steering axle. |
You can start working on grayed out parts. Not sure what you did differently with your test case, but in general it works like this:
|
What is the exact sequence as EDIT: Can reproduce. It only occurs for multiple axles/engines |
The |
Minimal example would be:
The only requirements that seem to stop it are the extra requirements like strength. |
In a language that has implicit casts to and from |
Agreed, fixed in 88c5409 |
{ { quality_id( "GLARE" ), 1, 2 } } } }; | ||
part.install_reqs.tools.push_back( { { { "welder", 50 }, { "welder_crude", 75 }, { "oxy_torch", 10 } } } ); | ||
part.removal_reqs.qualities = { { { { quality_id( "WRENCH" ), 1, 2 } }, | ||
{ { quality_id( "SAW_M" ), 1, 2 } } } }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was pretty sure wrench 2 existed, but looks like it doesn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, it should though and I'm going to handle that now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Also the survivor utility belt. Removal difficulty still needs changing (or arguments that it is an improvement).
|
Fixed removal difficulty |
Screw driving 2 doesn't exist. It's fine screw driving. |
Done |
It's FINE, not F |
Ok, sorted |
bool has_skill = g->u.get_skill_level( skill_mechanics ) >= vpart.difficulty; | ||
bool is_wheel = vpart.has_flag("WHEEL"); | ||
return (has_comps && (has_skill || is_wheel)); | ||
return g->u.has_trait( "DEBUG_HS" ) || vpart.install_reqs.can_make_with_inventory( crafting_inv ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mugling The check for the debug trait should probably be in can_make_with_inventory
or even deeper in the inventory. At least you have to add this special case to the check in complete_vehicle
. Currently I can start installing things with the help of that trait, but when the character finishes it gets the sarcastic "You lack the requirements to install the %s." and the vehicle part is not installed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted. I've patched it to fix the instance @Coolthulhu noticed testing #17302 but I agree we should move the check higher to prevent future regression.
Replaces #16941 and follows #17208
LIFTING
orJACKING
requirements (fixes Need info on what level of lifting equipment needed for vehicle modification #16407)