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

Equip Delay #3854

Merged
merged 23 commits into from
Jan 6, 2025
Merged

Equip Delay #3854

merged 23 commits into from
Jan 6, 2025

Conversation

Sun-Soaked
Copy link
Member

@Sun-Soaked Sun-Soaked commented Nov 29, 2024

About The Pull Request

It now takes a moment to remove or equip clothing, triggering a do_after that places the item in the appropriate slot once completed.

Base times are as follows:
image

You can move while equipping some lighter items, but it slows you down.

Please thank @Kapu1178 for writing the better code in this pr, their work can also be found in This PR

Comes with functionality for more sound effects being plugged in for different types of items.

KNOWN ISSUES:

  • Equip noises can be spammed by repeatedly clicking during the do_after

Why It's Good For The Game

My immersion
More importance in picking the right gear for different situations. You can no longer hotswap in and out of stuff like spacesuits instantly, think a little more carefully about when to put them on.

Changelog

🆑 Kapu1178
add: There is now a customizable delay for equipping and unequipping items from clothing slots.
/:cl:

@github-actions github-actions bot added Sound USSR Anthem 2.66 MB file. Code change Watch something violently break. labels Nov 29, 2024
@Sun-Soaked Sun-Soaked marked this pull request as draft November 29, 2024 16:23
also grabs some I didn't get in the first pass
equip noises stolen from cm
what the fuck is an interaction key
pleadster
also modsuit fix (yippee)
@Sun-Soaked Sun-Soaked marked this pull request as ready for review December 1, 2024 09:48
@tantspants
Copy link

can we please tone it down from eight seconds?

@Sun-Soaked
Copy link
Member Author

can we please tone it down from eight seconds?

for stuff like spacesuits I think that's excessively reasonable, you should not be hotswapping in and out of space gear

code/__DEFINES/clothing.dm Outdated Show resolved Hide resolved
code/__DEFINES/clothing.dm Outdated Show resolved Hide resolved
code/__DEFINES/clothing.dm Outdated Show resolved Hide resolved
code/__DEFINES/clothing.dm Outdated Show resolved Hide resolved
code/__DEFINES/clothing.dm Show resolved Hide resolved
code/__DEFINES/mobs.dm Outdated Show resolved Hide resolved
code/game/objects/items/storage/belt.dm Outdated Show resolved Hide resolved
@thgvr
Copy link
Member

thgvr commented Dec 3, 2024

changed my mind, just do the defines and the leftofer slowdown define

@Jedi-Toothpaste
Copy link
Contributor

hi, I think regular clothes should not have an equip delay, and if they do, keep it really low since currently as fast as you can click off items is reasonably how fast you could get them off I-R-L
excluding jumpsuits, I think they can still have delay (maybe a bit less?)

relevant video, how it feels right now to put on a cap

soda.pop.zomboid.mp4

personal opinion: I also thing the delay for pulling a backpack off your back should be shorter too, but this is a genuine personal opinion which can be ignored

bottom text
@tantspants
Copy link

I think it would be ideal if the delays were only on hardsuits. As it is, changing clothes is just slightly more irritating than before. Also, I'm not sure what we're improving here.

@Zevotech
Copy link
Contributor

Zevotech commented Dec 5, 2024

Absolutely amazing feature. I really like this, but some comments on how it is currently after playing:

  • Oversuits could use their equip time slightly reduced. Less so for hardsuits and moreso for normal things worn over clothes like hazard vests and coats. 8 seconds to slip my hazard vest off feels too long.
  • Needs a way to cancel unequipping. I found myself unintentionally taking my vest/backpack off a lot and was unable to cancel it by switching hands or moving.
  • Heard some complaints about the equip noise, and I agree slightly. Would like a toggle to hear it or maybe a volume adjustment.
  • Angle grinder has no equip delay, assuming its the same with other back slot items. Could use a fix for that.

@thgvr
Copy link
Member

thgvr commented Dec 5, 2024

new bug found, if you hold the inventory open and put a backpack or duffle back onto your back, you can still freely take items out

wrong pr

@Sun-Soaked
Copy link
Member Author

Sun-Soaked commented Dec 5, 2024

  • Oversuits could use their equip time slightly reduced. Less so for hardsuits and moreso for normal things worn over clothes like hazard vests and coats. 8 seconds to slip my hazard vest off feels too long.

oversuits now have a 6 delay, same as undersuits

  • Needs a way to cancel unequipping. I found myself unintentionally taking my vest/backpack off a lot and was unable to cancel it by switching hands or moving.

fixed handswapping, now cancels the do-after as intended

  • Heard some complaints about the equip noise, and I agree slightly. Would like a toggle to hear it or maybe a volume adjustment.

I may build this into a looping sound system instead of length-limited sound blocs. Investigating the framework for them rn

  • Angle grinder has no equip delay, assuming its the same with other back slot items. Could use a fix for that.

angle grinder fixed, others may need custom code later

@Sun-Soaked
Copy link
Member Author

I've replaced the equip time visual with the current, updated times.

@Ratvarr
Copy link
Contributor

Ratvarr commented Dec 7, 2024

taking gloves out of your pocket forces you to "take them off".

@Sun-Soaked
Copy link
Member Author

taking gloves out of your pocket forces you to "take them off".

okay that's funny

@Ratvarr
Copy link
Contributor

Ratvarr commented Dec 7, 2024

taking gloves out of your pocket forces you to "take them off".

okay that's funny

me when 2 second delay to remove gloves from pocket

@Ratvarr
Copy link
Contributor

Ratvarr commented Dec 7, 2024

taking your toolbelt off and backpack at the same time eradicates the backpack from reality

@Sun-Soaked
Copy link
Member Author

taking your toolbelt off and backpack at the same time eradicates the backpack from reality

curse you putitemfrominventoryinhandifpossible()

@Sun-Soaked
Copy link
Member Author

taking your toolbelt off and backpack at the same time eradicates the backpack from reality

the fix I made paves over kapu's beautiful code meadow with a parking lot but it does fix it

@FalloutFalcon FalloutFalcon added this pull request to the merge queue Jan 6, 2025
Merged via the queue into shiptest-ss13:master with commit c954d22 Jan 6, 2025
16 checks passed
MrCat15352 pushed a commit to MrCat15352/MrCat that referenced this pull request Jan 8, 2025
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
It now takes a moment to remove or equip clothing, triggering a do_after
that places the item in the appropriate slot once completed.

Base times are as follows:

![image](https://github.com/user-attachments/assets/962a8ebd-df09-4fb8-88de-2d65b443c055)

You can move while equipping some lighter items, but it slows you down.

Please thank @Kapu1178 for writing the better code in this pr, their
work can also be found in [This
PR](DaedalusDock/daedalusdock#1093)

Comes with functionality for more sound effects being plugged in for
different types of items.

KNOWN ISSUES:

- [x] Equip noises can be spammed by repeatedly clicking during the
do_after

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game
My immersion
More importance in picking the right gear for different situations. You
can no longer hotswap in and out of stuff like spacesuits instantly,
think a little more carefully about when to put them on.
<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding. -->

## Changelog

:cl: Kapu1178
add: There is now a customizable delay for equipping and unequipping
items from clothing slots.
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code change Watch something violently break. Sound USSR Anthem 2.66 MB file.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants