-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 mounted pet carriers #24391
vehicle mounted pet carriers #24391
Conversation
create a new iuse, capture_monster_veh, which acts like capture_monster_act but only for vehicle mounted items. add the code to pickup.cpp and vehicle.cpp to recognize vehicle parts with the CAPTURE_MONSTER_VEH flag and provide menu options to use them that then invoke capture_monster_veh.
add a new vehicle part, the livestock carrier, that can be installed as a livestock stall. livestock stalls can be used to capture creatures up to LARGE size.
18228d2
to
223e2ac
Compare
Still to do (possibly in another PR):
|
I like this! But I would not say it fixes #11381 It's very good and realistic approach for transport of large animals. But cats and dogs should be able to just be with you inside the car, without the need to put them to the stall (just like NPCs). For the small ones it still feels like a workaround, same as using Pet Carrier. Personally I just don't get any dogs anymore, even tho' I'd like to, they always ended up closed in the carrier, because it's just too much hassle to work with. BTW: I know this is a long stretch, but any chance this could be adapted to transport small vehicles? Bike rack, anyone? Or fork-lifter plugged at the back of my truck? |
okay, it doesn't fix #11381. Fair enough. I am not currently up to untangling the NPC code that lets them ride in a vehicle enough to apply it to friendly monsters, though, so this is the work-around for now. Repurposing this for vehicle racks: haha - wait, that might almost work. So the monster capture routine works, in part, by grabbing the json description of the monster being captured and stashing it in the pet carrier, and then using that description to spawn a new monster with the exact same statistics when the pet carrier is emptied. vehicles are described by json, there's no reason in principle that you couldn't do the same. Handling collisions would be challenging, but not impossible. I want to do a rework of how actions are handled for vehicle parts in general, but it's possible that a vehicle rack could come out of that. Beyond the scope of this PR, though. By the way, pallet lifters and telescopic cantilevers/telescoping cranes are foldable, you can build them on a folding frame with a unicycle wheel or castors and fold them up when not in use. The existing engine crane vehicle is exactly that design. So you don't need to rebuild a pallet lifter every time you want to scavenge a storage battery. Still, it would be great to be able to transport ATVs on trucks and such. |
You're selecting the tile with the chicken in it? Because you're clearly within the iuse::capture_monster_act code, so you're failing the check:
which means you're aiming it at nothing. I'll look at it more on Monday, but that's a weird failure mode because it's failing within the part of the code that I didn't change. |
Suggestion: add option to transfer pet from/to regular pet carrier. |
I guess I know what was wrong in my test - I've pressed key to select tile relative to vehicle part position instead of player position. Will try to test again tonight. |
Yes, it's position relative to the player. Thanks for the retest. |
parts[part].set_base( base ); | ||
/* captured animals take up all the cargo space */ | ||
/* | ||
if( base.has_var( "contained_name" ) ) { |
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 guess this commented text should be deleted.
@@ -467,6 +467,7 @@ These branches are also the valid entries for the categories of `dreams` in `dre | |||
- ```BOARDABLE``` The player can safely move over or stand on this part while the vehicle is moving. | |||
- ```CAMERA``` | |||
- ```CAMERA_CONTROL``` | |||
- ```CAPTURE_MOSNTER_VEH``` Can be used to capture monsters when mounted on a vehicle. |
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.
Typo.
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.
What's the typo? I'm not seeing it.
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.
MOSNTER
@ZhilkinSerg #24462 expands the description of the livestock stall to make it clear you select the animal relative to the PC, not to the vehicle part. |
adds the infrastructure to support vehicle mounted pet carriers, and creates a new part, the livestock
carrier, that can be installed on a vehicle as a livestock stall and used as a vehicle mounted pet carrier.