-
-
Notifications
You must be signed in to change notification settings - Fork 643
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
Conversation
4114d74
to
5650ee9
Compare
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. |
time for debugging interaction |
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. |
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. |
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.
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.