-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Land mine armament #33883
base: master
Are you sure you want to change the base?
Land mine armament #33883
Conversation
…rmament # Conflicts: # Content.Server/LandMines/LandMineSystem.cs
i think you should add an already armed version for mapping |
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.
Really good first PR! And yeah, it would probably be a good idea to make an already armed version
the light shouldn't be blinking while it's not armed and it should also be in the examine text whether the landmine is armed or not |
…the Arming logic being implemented in "Content.Server"
Is this solved by adding an armed version through YAML? |
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.
A few more changes are needed:
- Inherit
SharedLandmineSystem
on the client as well so the verb gets properly predicted. Currently if you right click on a mine you see it pop up after a short moment. Prediction means it will be there immediately. - The red blinking light on the land mine should only show when armed for visual feedback. Have a look at the
GenericVisualizer
for that. - Some maps have landmines mapped, for example in front of the bridge. You will have to edit the prototypes to make sure they still start armed.
…nd inherit it in client content.
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.
leave LandMineExplosive unchanged
and then just add
- type: entity
parent: LandMineExplosive
id: LandMineExplosiveArmed
suffix: armed
components:
- type: LandMine
armed: true
Would a disarmament mechanic warrant its own PR or should I expand the scope of this one? |
@slarticodefast Are there any more changes that you request? |
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.
Thanks for the PR!
I have some thoughts about the way you handle the armable activation, as you should move some behavior between your TryArming
and ArmingDone
functions to be closer to the intended purpose of those events.
From my reading of the undocumented event code, ItemToggleActivateAttemptEvent
is for checking/canceling the toggle if some conditions are not met, and ItemToggledEvent
is for actually activating the functionality given it was not canceled.
The rest are all just minor stylistic nitpicks.
Thanks again.
…mpt. Moved the LocId to component.
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.
Looks good, just one minor style thing!
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.
Looks good! Great first pr 🫡
About the PR
The landmines are now armable and won't trigger unless armed.
Why / Balance
By making mines armable they are more safely handled and the amount of accidental explosions will decrease.
Technical details
Modified the component and system of landmine, added verb to ftl.
Media
rider64_alahZXmttQ.mp4
Requirements
Breaking changes
Changelog