Skip to content
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

Prevent wielding items under certain conditions while driving #75955

Merged

Conversation

strategictraveler
Copy link
Contributor

Summary

Balance "Wielded items behave the same as ranged weapons when driving"

Purpose of change

Certain ranged weapons (FIRE_TWOHAND) cannot be used when driving. This PR makes wielded two-handed items behave in the same way.

Describe the solution

Check if the PC is wielding a two-handed item when trying to control a vehicle. Also prevent them from picking it up when already in control.

Describe alternatives you've considered

Testing

Spawned a vehicle and tested it.

Additional context

1
2

@github-actions github-actions bot added Game: Balance Balancing of (existing) in-game features. [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions labels Aug 26, 2024
@SariusSkelrets
Copy link
Contributor

IMO the player should be able to at least keep it in hand and not need to drop it. The player could have one hand holding the weapon while it is tucked between the seat and door while the other hand is holding the wheel

There can be a restriction about using the weapon, the same way two-handed guns can't be used while driving, but requiring the player to drop the weapon then pick it up every time sounds tedious, especially when most inventories can't hold long two-handed weapons

@KittyTac
Copy link
Contributor

End of an era (the era of transporting fridges and cow corpses by holding them in your lap while driving).

On a serious note, I think there really needs to be a way added to transport these things by vehicle, as I understand this PR. They're larger than the largest cargo space.

@DSeyka
Copy link
Contributor

DSeyka commented Aug 26, 2024

I think there really needs to be a way added to transport these things by vehicle

You can tie fridges to vehicles if you have a long rope.

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Aug 26, 2024
strategictraveler and others added 3 commits August 26, 2024 07:42
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@strategictraveler strategictraveler marked this pull request as draft August 26, 2024 07:45
@strategictraveler
Copy link
Contributor Author

strategictraveler commented Aug 26, 2024

There can be a restriction about using the weapon, the same way two-handed guns can't be used while driving, but requiring the player to drop the weapon then pick it up every time sounds tedious, especially when most inventories can't hold long two-handed weapons

The difference is that weapons with FIRE_TWOHAND don't require two hands to wield, only to fire, while those with ALWAYS_TWOHAND are always wielded with two hands.

The player could have one hand holding the weapon while it is tucked between the seat and door while the other hand is holding the wheel

That doesn't work with other vehicles like bicycles. It also doesn't respect the ALWAYS_TWOHAND flag.

@strategictraveler
Copy link
Contributor Author

Did some extra testing to be safe, it seems like everything works fine.

@strategictraveler strategictraveler marked this pull request as ready for review August 26, 2024 08:51
@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Aug 26, 2024
@x-qq
Copy link

x-qq commented Aug 26, 2024

This breaks an ability to transport objects with large volume, without providing any alternative, and should not be merged until such alternative exists.

@Maleclypse Maleclypse merged commit 5e19877 into CleverRaven:master Aug 27, 2024
28 of 44 checks passed
@Maleclypse
Copy link
Member

This breaks an ability to transport objects with large volume, without providing any alternative, and should not be merged until such alternative exists.

That was never intended to work the way it currently does. If I were trying to fix this I would look at how to model roof racks inside of our vehicle parts and pocket systems.

@x-qq
Copy link

x-qq commented Aug 27, 2024

I do not understand why you merged this without first merging such a fix.

@Zireael07
Copy link
Contributor

@x-qq What fix do you speak of? It was never intended to work this way, there is nothing to fix imo

@x-qq
Copy link

x-qq commented Aug 27, 2024

I speak of being able to transport an object >500L. Such ability was never intented to be present?

@Zireael07
Copy link
Contributor

According to Maleclypse (who is one of the most active current devs) yes, not intended

@kevingranade
Copy link
Member

Correct, dangling a huge item out the window of a car while driving was never intended to work.

@akrieger
Copy link
Member

akrieger commented Aug 27, 2024

Or holding a 300L 200lb fridge my character could not reasonably lift much less drag while also biking a rusty commuter bike home. Arguably we should be looking more closely at restricting what is wieldable by weight/volume as well.

Knut-Aage-Hofseth pushed a commit to Knut-Aage-Hofseth/Cataclysm-DDA that referenced this pull request Aug 29, 2024
…Raven#75955)

* Prevent wielding items under certain conditions while driving

* Formatting

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* More formatting

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* More formatting

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: strategictraveler <>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@strategictraveler strategictraveler deleted the prevent_wield_when_driving branch September 2, 2024 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Game: Balance Balancing of (existing) in-game features. json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants