-
Notifications
You must be signed in to change notification settings - Fork 64
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
Leashes #120
Leashes #120
Conversation
This pull request has conflicts, please resolve those before we can evaluate the pull 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.
All looks gud.
Request some suggestions for event and you should look in Floof ENT/Mobs so you can also collar the scug.
Afterall, good job lad!
Content.Shared/Floofstation/Leash/Events/LeashAttachDoAfterEvent.cs
Outdated
Show resolved
Hide resolved
Pretty sure I added LeashAnchor to scugs along with other animals. Those don't need any special clothing to be leashed (otherwise it'd be painful to use a leash on animals because collars are not easily accessible outside of loadouts). |
Nevermind, now I did. |
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.
Absolutely loving the progress so far!
Only request I have, is to make the behavior of the person being pulled to look more seamlessly. Instead of them locking to a tile, if possible.
Besides that, looks great!
This is really odd... The bug only happens when you put the leash into an equipped bag and take it off afterwards. This seems like an engine issue; I'll try to recreate the joint whenever the leash gets re-parented... |
Yea no, I cannot fix that. This is an issue with the physics engine, which is out of my scope... However, the leash will still break if the leash entity and the leashed entity get too far away from each other, which compensates it for a bit... If you can suggest a solution, besides simply disallowing putting leashes into storages (note that they work correctly so long as said storage is not equipped clothing), I can apply it. |
Description
This PR adds leashes and the necessary logic for them.
Leash normally is an item craftable in the autolathe from some cloth, steel, and plastic. In order to attach the leash, you need an entity with a LeashAnchor or a clothing that has a LeashAnchor. An example of the former is most animals and all station pets - you can leash them without any tools. An example of the latter is all collars - in order to attach a leash to them, you need to open the strip menu and right-click the anchor item while holding a leash. The leash can be detached by right-clicking the person to whom it's attached. If it's attached via clothing, the respective clothing cannot be removed until the leash is removed (otherwise you get weird behavior).
There are still some bugs, e.g. you can pick up a leashed person, and then the leash joint will stop working until they're put back down, but they should be minor enough (the leash will automatically break if the person manages to get too far away, or moves to a different map via ftl or otherwise, or gets deleted, etc).
Note
If someone has a better icon sprite, or wants to create inhand sprites, I'll gladly accept those. The current icon is more of a placeholder, since I'm by no means an artist.
Media
8mb.video-M0T-S3JYeI3T.mp4
Changelog
🆑