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

Adds basic item and object wrapping #5680

Merged
merged 3 commits into from
Dec 13, 2020
Merged

Conversation

corp-0
Copy link
Member

@corp-0 corp-0 commented Nov 28, 2020

Description

All items, crates and lockers get a new component, WrappableItem/WrappableObject, which will make them able to be wrapped in paper. Use the lame brown paper to wrap stuff and make delivery parcels. Use the festive paper to make gifts!

Items and objects are made a child of the spawned package item/object and are moved to hiddenPos. You can retrieve the content by unwrapping the package interacting with an empty hand in harm intent.

Wrapping paper, both in brown and festive, are stackable. A specific amount of stacks are required to wrap an object/item. For lockers and crates, the only way to get the amount is by setting it on inspector. For items, the default behavior is based on the size of the item, but devs can override it and set an amount manually.

Players can also attach notes to the packages if they are holding a paper sheet with something written on it. The note can be read by examining the package and can be dettached with a right click interaction.

  • Wrappable component to add the ability to wrap game objects.
  • Wrapped component to add the ability to unwrap items and retrieve its "content".
  • Wrapped component to add the ability to unwrap game objects and retrieve its "content".
  • Wrapped item and wrapped object prefabs.
  • Ability to write in a paper and attach it to a package as a note. Readable by examining the object.

Notes

The last time I tried, notes weren't working on client. I will do more debugging tomorrow, but if you know what is wrong and can give a hand, that'd be much appreciated.

Changelog

CL: added ability to wrap all items, crates and lockers.

@github-actions github-actions bot added UI Status: Merge Conflicts No one likes conflicts, solve them! labels Nov 28, 2020
@corp-0 corp-0 removed the Status: Merge Conflicts No one likes conflicts, solve them! label Nov 28, 2020
@github-actions github-actions bot added the Status: Merge Conflicts No one likes conflicts, solve them! label Dec 2, 2020
@corp-0 corp-0 removed the Status: Merge Conflicts No one likes conflicts, solve them! label Dec 3, 2020
@github-actions github-actions bot added the Status: Merge Conflicts No one likes conflicts, solve them! label Dec 4, 2020
@corp-0 corp-0 removed the Status: Merge Conflicts No one likes conflicts, solve them! label Dec 6, 2020
@corp-0 corp-0 marked this pull request as ready for review December 8, 2020 03:37
@corp-0 corp-0 added Status: DNM "Do Not Merge". Don't merge this Pull Request, as changes where requor further additions are needed. Status: Awaiting Review for PRs that are awaiting reviews/rereviews labels Dec 8, 2020
@Bod9001
Copy link
Member

Bod9001 commented Dec 9, 2020

had a look through looks all okay

@corp-0
Copy link
Member Author

corp-0 commented Dec 9, 2020

had a look through looks all okay

right? But it doesn't work for some reason. You can only attach notes being server, client can't even tho WillInteract returns true and the highlight is there to communicate you can do it, but nothing happens when clicking. ServerPerformInteract is never called.

@Bod9001
Copy link
Member

Bod9001 commented Dec 9, 2020

time for debugging interaction

@corp-0
Copy link
Member Author

corp-0 commented Dec 9, 2020

I did debug it. Haven't read the logs tho, but I think it its something with server not knowing the string of the paper for some stupid reason. I will rewrite paper script to be more up to date in how we handle networked stuff now.

@corp-0
Copy link
Member Author

corp-0 commented Dec 13, 2020

I don't understand paper networking. It is spread through a shit ton of classes, including PlayerNetworkActions.

Honestly I don't want to work on this anymore, but wrapping is working, only notes are not working.

@corp-0 corp-0 removed the Status: DNM "Do Not Merge". Don't merge this Pull Request, as changes where requor further additions are needed. label Dec 13, 2020
@Bod9001 Bod9001 merged commit 7d8d2be into unitystation:develop Dec 13, 2020
@corp-0 corp-0 deleted the xmas branch July 13, 2021 23:18
@PerfectTangent PerfectTangent mentioned this pull request Dec 10, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting Review for PRs that are awaiting reviews/rereviews UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants