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

Easy Energy Cells -- Integrated Retainment Latches #3853

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

zimon9
Copy link
Contributor

@zimon9 zimon9 commented Nov 29, 2024

About The Pull Request

All energy weapons now come with a retainment clip for their energy cells, if their cells are designed to be removable. After a cell is unlatched, a user will be able to remove the cell like as they would a magazine from a ballistic weapon. However, one must remember that these retainment latches were designed into these weapons for a reason. Firing one with a latch hanging loose will likely cause the cell to fall out and/or disconnect due to jostling.

In order to latch or unlatch a retainment clip, one must alt-click on their weapon.

If one is using a dual-mode weapon, such as an E-40, they will need to switch to laser mode in order to latch and unlatch the retainment clip, and remove the cell.

If one has attachments on their weapon, you'll need to remove the cell on their weapon before attempting to remove an attachment. For the E-40, one simply needs to swap to the ballistic mode in order to do that.

A line indicating the latch status was added to the examine text of energy weapons.
image

This PR also slightly modifies the examine text of the E-40 to include cell charge characteristics.
image

Small sample of it in operation:

Cell-Retainment-Clip-Demo-Partial-Updated.mp4

Full demo of it in action:
https://youtu.be/Be1c_0AFAds

A clip of the state of the latch sprites at this time:

Latch_Sprites_Updated.mp4

Why It's Good For The Game

Having cell removal be tied to alt-click felt smoother to me, compared to the current way that cells are handled, with removal requiring a screwdriver. The time it takes to remove and replace a cell is comparable as before the change, but it no longer requires a screwdriver to do.

Changelog

🆑
balance: replaced screwdriver cell removal with a cell-retainment clip mechanism
/:cl:

…vior, cell insertion logic, and further testing required before this is complete.
…well as some sounds for the latching and unlatching behavior. Cleaned up some logic.
…time, and made the latch system work with the E-40
…th 65% probability, and fixes a bug with E-40's
@github-actions github-actions bot added the Code change Watch something violently break. label Nov 29, 2024
@DIB-DOG
Copy link
Contributor

DIB-DOG commented Nov 29, 2024

Hallelujah, praise be to the killer of the screwdriver reload.

@thgvr
Copy link
Member

thgvr commented Nov 29, 2024

Needs some visual feedback, check how safety icon/drill icon is displayed

@rye-rice
Copy link
Member

@Apogee-dev

@zimon9
Copy link
Contributor Author

zimon9 commented Nov 29, 2024

Needs some visual feedback, check how safety icon/drill icon is displayed

You're right, that'd be really nice. I'll start working on that now

@DIB-DOG
Copy link
Contributor

DIB-DOG commented Nov 29, 2024

Just curious, can the latch be opened and closed while moving or does the user need to remain still like it was for the screwdriver?

@thgvr
Copy link
Member

thgvr commented Nov 29, 2024

Oh, also needs the gear overhead, i believe it's a flag for doafters

@zimon9
Copy link
Contributor Author

zimon9 commented Nov 29, 2024

Just curious, can the latch be opened and closed while moving or does the user need to remain still like it was for the screwdriver?

EDIT: I think this should remain where it is, with a user required to stay still in order to toggle and untoggle the latch, actually. It felt a little strange to me to be able to toggle the mode while on the move, but I am open to thoughts on the matter.

@zimon9
Copy link
Contributor Author

zimon9 commented Nov 29, 2024

Oh, also needs the gear overhead, i believe it's a flag for doafters

Ah, I believe it should do that (It's the hidden flag, right? I've left it set to false)

dreamseeker_BMw6SkschR.mp4

… alt-clicked while its latch is open and its cell is removed
@DIB-DOG
Copy link
Contributor

DIB-DOG commented Nov 29, 2024

EDIT: I think this should remain where it is, with a user required to stay still in order to toggle and untoggle the latch, actually. It felt a little strange to me to be able to toggle the mode while on the move, but I am open to thoughts on the matter.

Balance is of course always something to consider, but comparing energy weapons with ballistics from a purely mechanical POV, the action of popping open a retention clip certainly isn’t any more taxing than operating the bolt of a weapon or otherwise, right? Ofc it shouldn’t be as fast as operating a bolt, but I feel it’s something that could be done while moving.

@zimon9 zimon9 requested a review from a team as a code owner November 29, 2024 21:00
@github-actions github-actions bot added the Sprites A bikeshed full of soulless bikes. label Nov 29, 2024
@zimon9
Copy link
Contributor Author

zimon9 commented Nov 30, 2024

EDIT: I think this should remain where it is, with a user required to stay still in order to toggle and untoggle the latch, actually. It felt a little strange to me to be able to toggle the mode while on the move, but I am open to thoughts on the matter.

Balance is of course always something to consider, but comparing energy weapons with ballistics from a purely mechanical POV, the action of popping open a retention clip certainly isn’t any more taxing than operating the bolt of a weapon or otherwise, right? Ofc it shouldn’t be as fast as operating a bolt, but I feel it’s something that could be done while moving.

Certainly, but this is more because of mechanical limitations on my end. I wanted to make it so that moving would roll a chance for the cell to pop out, but I haven't had much luck in implementing this. The inability to move while latching and unlatching is a stop-gap measure for this.

@Erikafox
Copy link
Contributor

Certainly, but this is more because of mechanical limitations on my end. I wanted to make it so that moving would roll a chance for the cell to pop out, but I haven't had much luck in implementing this. The inability to move while latching and unlatching is a stop-gap measure for this.

You'd probably want to use a signal that listens for movement. Pretty sure we have some.

@zimon9
Copy link
Contributor Author

zimon9 commented Nov 30, 2024

Certainly, but this is more because of mechanical limitations on my end. I wanted to make it so that moving would roll a chance for the cell to pop out, but I haven't had much luck in implementing this. The inability to move while latching and unlatching is a stop-gap measure for this.

You'd probably want to use a signal that listens for movement. Pretty sure we have some.

Maybe. I'm worried that a cell might pop out while someone is moving around, and if so, it might get annoying with how one would end up unable to stop the latch/unlatch attempt other than by swapping their hand (and if they're wielding their weapon, it might just end up taking too long to unwield and swap their hand before the latch state changes). Leaving them with a closed latch and a dropped cell.

I want to see how it feels in a proper game first, I think. After feedback, I can revisit this. I will swap the mode so that it can be unlatched while moving for now, though.

@zimon9
Copy link
Contributor Author

zimon9 commented Nov 30, 2024

Needs some visual feedback, check how safety icon/drill icon is displayed

Visual feedback is in now. Sprite might need a little bit of touching up, but it may be serviceable for now.
This should be ready for further testing.

The PR body has been updated to reflect the changes.

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. Sprites A bikeshed full of soulless bikes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants