-
Notifications
You must be signed in to change notification settings - Fork 338
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
Fix PseudoItems #821
Fix PseudoItems #821
Conversation
Content.Shared/Nyanotrasen/Item/PseudoItem/SharedPseudoItemSystem.cs
Outdated
Show resolved
Hide resolved
|
||
/// <summary> | ||
/// Almost all of this is code taken from other systems, but adapted to use PseudoItem. | ||
/// I couldn't use the original functions because the resolve would fuck shit up, even if I passed a constructed itemcomp |
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.
creating a new component to pass into :
- would fail resolve since its not actually added to the entity
- extremely sus
im guessing this is just to make it so a felenid cant be picked up instantly, would be better to just have that be an event raised for ItemComponent that felenids cancel, so they still reuse all the logic but cant just left click to pick up like a mouse
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.
Pseudoitems lack the itemcomponent when they're not inside a container because it brings a ton of unwanted features along with it. Even just adding it to run the check could result in weird shit happening if someone knew enough. This approach works "fine" for what its supposed to do
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.
The entire reason I cant use the original functions as is is because they expect the item to have an itemcomponent, and theres no way to tell it to use anything else, even if it doesn't directly do anything with said component
About the PR
Really only used by felinids but now it properly works with gridinv
They wont fit into any bags outside of dufflebags, and leave a 2x2 and a 5x2 space available for other items
Didn't test further
Why / Balance
Bag felinids
Technical details
I wrote this code while slightly drunk, so who knows how horrible some of my shitcode is. 99% of it is just old pseudoitem code anyways
All I really did was fix the ability to set the grid size and pass through StoredOffset so you can avoid wacky offsets with wacky grids
Media
Breaking changes
Changelog
🆑