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

Fix PseudoItems #821

Merged
merged 3 commits into from
Feb 12, 2024
Merged

Conversation

DebugOk
Copy link
Contributor

@DebugOk DebugOk commented Feb 12, 2024

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

image

  • I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

Changelog

🆑

  • add: Felinids now fit in bags again!

@DebugOk DebugOk requested a review from VMSolidus February 12, 2024 00:07
@github-actions github-actions bot added S: Needs Review Changes: C# Changes any cs files Changes: YML Changes any yml files labels Feb 12, 2024

/// <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
Copy link
Member

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 :

  1. would fail resolve since its not actually added to the entity
  2. 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

Copy link
Contributor Author

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

Copy link
Contributor Author

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

@DebugOk DebugOk requested a review from VMSolidus February 12, 2024 18:17
@VMSolidus VMSolidus enabled auto-merge (squash) February 12, 2024 20:49
@VMSolidus VMSolidus merged commit d8df432 into DeltaV-Station:master Feb 12, 2024
11 checks passed
DeltaV-Bot pushed a commit that referenced this pull request Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: C# Changes any cs files Changes: YML Changes any yml files S: Needs Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants