Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign up[CR] Unscrewable vehicle parts #14840
Conversation
This comment has been minimized.
This comment has been minimized.
|
Motors and alternators are generally going to use bolts rather than screws,
aren't they? Everything else looks reasonable.
|
This comment has been minimized.
This comment has been minimized.
|
Small electric motor is 1.5kg - similar to the ones used in kids cars if not smaller. I disassembled one of those and the motor there was attached with screws. I googled "motorbike alternator" and it looks like they use screws too: http://www.hawkshawmotorcycles.com/altonajstwin.JPG |
illi-kun
reviewed
Jan 14, 2016
View changes
| @@ -33,7 +33,7 @@ Pickup::interact_results Pickup::interact_with_vehicle( vehicle *veh, const trip | |||
| const bool has_kitchen = (veh->part_with_feature(veh_root_part, "KITCHEN") >= 0); | |||
| const bool has_faucet = (veh->part_with_feature(veh_root_part, "FAUCET") >= 0); | |||
| const bool has_weldrig = (veh->part_with_feature(veh_root_part, "WELDRIG") >= 0); | |||
| const bool has_craftrig = (veh->part_with_feature(veh_root_part, "CRAFTRIG") >= 0); | |||
| //const bool has_craftrig = (veh->part_with_feature(veh_root_part, "CRAFTRIG") >= 0); | |||
This comment has been minimized.
This comment has been minimized.
BevapDin
reviewed
Jan 14, 2016
View changes
| } else if (is_screwable){ | ||
| werase (w_msg); | ||
| fold_and_print(w_msg, 0, 1, msg_width - 2, c_ltgray, | ||
| _("Needs <color_%1$s>%2$s</color>, a <color_%3$s>screwdriver</color> or <color_%5$s>duct tape</color> and level <color_%4$s>%5$d</color> skill in mechanics.%6$s%7$s%8$s"), |
This comment has been minimized.
This comment has been minimized.
BevapDin
Jan 14, 2016
Contributor
Something is not right with the numbers. The 9. argument is not used at all and the 5. is used twice.
This comment has been minimized.
This comment has been minimized.
illi-kun
Jan 14, 2016
Member
I have some doubts about correctness of string order (%3$s, %5$s, %4$s). Can you double check that please?
BevapDin
reviewed
Jan 14, 2016
View changes
| @@ -1096,6 +1112,13 @@ bool veh_interact::can_remove_part(int veh_part_index, int mech_skill, int msg_w | |||
| has_wrench ? "ltgreen" : "red", | |||
| has_skill ? "ltgreen" : "red", | |||
| skill_req); | |||
| } else if (is_screwable) { | |||
| fold_and_print(w_msg, 0, 1, msg_width - 2, c_ltgray, | |||
| _("You need a <color_%1$s>screwdriver</color> or <color_%2$s>hacksaw, cutting torch and welding goggles, or circular saw (off)</color> and <color_%2$s>level %3$d</color> mechanics skill to remove this part."), | |||
This comment has been minimized.
This comment has been minimized.
BevapDin
Jan 14, 2016
Contributor
Same here. The 2. argument is used twice, the 4. is not used at all.
This comment has been minimized.
This comment has been minimized.
|
Please your newly introduced flag in |
This comment has been minimized.
This comment has been minimized.
IRL most certainly the case - you can't apply anywhere near as much torque to a screw as a bolt. Also from a gameplay perspective it's better to require a variety of tools |
mugling
reviewed
Jan 14, 2016
| @@ -77,6 +77,7 @@ class veh_interact | |||
| int name_w; | |||
|
|
|||
| vehicle *veh; | |||
| bool has_screwdriver; | |||
This comment has been minimized.
This comment has been minimized.
mugling
Jan 14, 2016
Contributor
Potentially beyond the scope of your PR but we could consider a more generic implementation specifying required tool qualities (eg. SCREWING 2, BOLT TURNING 1) rather than has_foo()
This comment has been minimized.
This comment has been minimized.
Core0verload
Jan 14, 2016
Author
It checks for tool qualitiy SCREW 1, not for screwdriver item. See veh_interact.cpp.
This comment has been minimized.
This comment has been minimized.
kevingranade
via email
Jan 14, 2016
Member
This comment has been minimized.
This comment has been minimized.
|
A number of these things should require bolt turning in addition to screw turning - pretty much anything big that goes under the hood in particular.
Automotive alternators (and other components) use lots of big bolts in addition to screws. |
This comment has been minimized.
This comment has been minimized.
|
Hmm. Is there a sane reason that the kitchen unit is having its faucet removed? I thought the idea was that it included the kitchen sink, not everything but the kitchen sink. XP Though since sinks are ubiquitous and serve no purpose besides being a source of ceramic and faucets, I GUESS I can understand the gameplay reasoning behind forcing players to add a faucet. That said, I can't see any realism argument that would explain this decision. >.> |
This comment has been minimized.
This comment has been minimized.
|
@chaosvolt I initially had the same thought, but if you look again, he added it to the vehicle part and removed it from the flag |
This comment has been minimized.
This comment has been minimized.
|
...wait what? I'm gonna have to check that. o.O |
This comment has been minimized.
This comment has been minimized.
|
Okay, I'm having one of that "what the fuck" moments. The kitchen unit didn't have the faucet flag to begin with? What, was it a hardcoded redundancy in the kitchen unit's signature flag? |
This comment has been minimized.
This comment has been minimized.
Apparently, yes. |
This comment has been minimized.
This comment has been minimized.
|
Hmm. What came first, the kitchen unit or the vehicle faucet? Either way, my derp senses are tingling. That strongly implies that someone went through the time and effort to add support for a faucet flag, independent of the kitchen's functionality, and then failed to utilize it sanely. Sounds like something I would be stupid enough to do. XP |
This comment has been minimized.
This comment has been minimized.
Yes.
I only changed motorbike alternator to screws. Bigger ones (car, truck) still use welder for attachment. They would be changed to bolts soon. |
This comment has been minimized.
This comment has been minimized.
|
Yay, screws and bolts! :D |
added some commits
Jan 13, 2016
This comment has been minimized.
This comment has been minimized.
|
Adding them as a resource needed to screw/bolt anything is easy. Adding them to every recipe and all the furniture would be a lot harder. |
Coolthulhu
reviewed
Jan 14, 2016
| @@ -5157,7 +5160,7 @@ | |||
| "item" : "atomic_lamp", | |||
| "difficulty" : 1, | |||
| "location" : "on_ceiling", | |||
| "flags": ["ATOMIC_LIGHT", "LEAK_DAM", "RADIOACTIVE"], | |||
| "flags": ["ATOMIC_LIGHT", "LEAK_DAM", "RADIOACTIVE", "TOOL_SCREWDRIVER"], | |||
This comment has been minimized.
This comment has been minimized.
Coolthulhu
Jan 14, 2016
Contributor
Not really related to this PR, just noting: "LEAK_DAM" and "RADIOACTIVE" do nothing here
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Zireael07
Jan 14, 2016
Contributor
Someone did it b/c it's atomic :P Can't recall the PR but it was fairly recently.
Core0verload
force-pushed the
Core0verload:screw
branch
to
96258bb
Jan 14, 2016
This comment has been minimized.
This comment has been minimized.
|
Changes to wrenchable parts are in. |
kevingranade
merged commit 96258bb
into
CleverRaven:master
Jan 16, 2016
1 check passed
This comment has been minimized.
This comment has been minimized.
stk2008
commented
Jan 16, 2016
|
This is cool. But alot of these items from the original post would use a wrence etc.
|
Core0verload commentedJan 13, 2016
This PR adds a new car part flag:
TOOL_SCREWDRIVER. Parts with this flag use screwdriver for attachment and removal. Screwdriver can be replaced with duct tape for attachment and with hacksaw/cutting torch for removal. This flag is intended to be used with electronics and other small parts. This flag is added to:Flag
TOOL_WRENCHwas changed a bit. Wrench now can be replaced with hacksaw for removal and with duct tape for attachment, just like withTOOL_SCREWDRIVER. Yes, I really like having a lot of options. This flag is added to:Small changes in parts flags:
KITCHENno longer auto-includesFAUCET,CRAFTRIGno longer auto-includesWATER_PURIFIER. Kitchen rig still has water faucet, FOODCO still has purifier: I set them in JSON separately.Water faucet was added to chem rig - water is useful in chemistry, it makes sense to have a faucet nearby.
Kitchen unit recipe was moved to
ELECTRONICfromOTHERand was unified with other car rig recipes - it uses frame instead of pipes. All car rigs recipes can use welding torch as welder now.The way vehicle checks for welding googles was changed. Hardcoded items check was replaced with check for
glare protection 2quality orAnti-glare compensators CBM. This quality was added to RM13 armor (only when powered) and all power armor helmets.