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 Parcel Wrap #34471

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

Centronias
Copy link
Contributor

@Centronias Centronias commented Jan 16, 2025

About the PR

Adds Parcel Wrap, which can wrap items into nice little parcel boxes :)
(Many thanks to @lvvova1 , who put together a previous PR which I referenced quite a lot: #7974 )

  • Parcel wrap can be used directly on other items (AfterInteractEvent) or used via a UtilityVerb, which enables wrapping things which have storage, which'd eat the wrap rather than use it.
  • Wrapped parcels can be unwrapped in hand (UseInHandEvent) or via an InteractionVerb, which enables unwrapping things which are too big to pick up (currently not strictly necessary).
  • Wrapped parcels drop their contents on being destroyed
  • Wrapped parcels are recyclable, so that disposals doesn't fill up with them
  • Wrap and parcels are relatively extensible via yaml only changes, enabling other visuals.
  • I did pull over all of TG's parcel sprites, but only use about a third of them since there's a lot of handling for giftwrap visuals that I didn't deal with.

Why / Balance

More ways to hide bombs is more fun. Also I want mail to be more of a thing, and this moves in that direction.

Technical details

  • ParcelWrapComponent
    • Makes an entity capable of wrapping things in parcel wrap
    • Contains information about what kind of parcels are created
      • size
      • shape
    • Specifies the sound made when wrapping things
    • Has a blacklist so that you can't, eg., wrap the nuke disk
  • WrappedParcelComponent
    • Marks an entity as being a wrapped parcel
    • Has a container for the wrapped item
    • Specifies the entity to create when the item's unwrapped, eg. some trash
    • Specifies a sound made when unwrapping it
  • ParcelWrappingSystem
    • Handles the logic for all of the above
    • Makes WrappedParcels in such a way that they copy the size of the wrapped item, which guards against size-arbitrage.
  • WrappedParcel entity prototype
    • Is a wrapped parcel
    • Has appearance stuff to change the sprite used based on the size of the parcel

Media

https://github.com/user-attachments/assets/f8dc8d13-f295-468c-9c17-7973a1f37e26
(Known bugs in this media: popup refers to the parcel rather than the contents; wrapping in a container can be jank when things have unusual shapes)

https://github.com/user-attachments/assets/fef7de45-ab09-47f6-a571-a8af8d3cd782
(Demos fixes to the bugs in the previos)

Requirements

Breaking changes

All new stuff

Changelog

🆑

  • add: Parcel wrap, an item which allows you to package items up for protection and surprise!

@github-actions github-actions bot added S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. Changes: Sprites Changes: Might require knowledge of spriting or visual design. size/M Denotes a PR that changes 100-999 lines. and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Jan 16, 2025
Copy link
Contributor

github-actions bot commented Jan 16, 2025

RSI Diff Bot; head commit f2f3c1c merging into 5d9311d
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/Objects/Misc/ParcelWrap/parcel_wrap.rsi

State Old New Status
brown Added
empty-roll Added
green-with-red-stripes Added
stripe-mask Added
striped-base-mask Added

Resources/Textures/Objects/Misc/ParcelWrap/parcel_wrap_trash.rsi

State Old New Status
brown Added

Resources/Textures/Objects/Misc/ParcelWrap/wrapped_parcel.rsi

State Old New Status
amorphous-giftwrap-base Added
amorphous-giftwrap-ribbon Added
amorphous-red-with-green Added
amorphous Added
barcode-amorphous Added
barcode-crate Added
barcode-locker Added
barcode-parcel-large Added
barcode-parcel-medium Added
barcode-parcel-small Added
barcode-parcel-tiny Added
barcode-tall-crate Added
crate-giftwrap-base Added
crate-giftwrap-ribbon Added
crate-red-with-green Added
crate Added
humanoid-green-with-red Added
locker-giftwrap-base Added
locker-giftwrap-ribbon Added
locker-red-with-green Added
locker Added
parcel-large-giftwrap-base Added
parcel-large-giftwrap-ribbon Added
parcel-large-red-with-green Added
parcel-large Added
parcel-medium-giftwrap-base Added
parcel-medium-giftwrap-ribbon Added
parcel-medium-red-with-green Added
parcel-medium Added
parcel-small-giftwrap-base Added
parcel-small-giftwrap-ribbon Added
parcel-small-red-with-green Added
parcel-small Added
parcel-tiny-giftwrap-base Added
parcel-tiny-giftwrap-ribbon Added
parcel-tiny-red-with-green Added
parcel-tiny Added
tall-crate-giftwrap-base Added
tall-crate-giftwrap-ribbon Added
tall-crate-red-with-green Added
tall-crate Added

Edit: diff updated after f2f3c1c

@Centronias
Copy link
Contributor Author

The RSI test failure is complaining about the licenses I've used.

TG station's repo's license is AGPL-3.0 . Does that not cover the sprites as well? What should I use instead?

@K-Dynamic
Copy link
Contributor

K-Dynamic commented Jan 16, 2025

Use CC license

Can you double-check the attribution of the art assets? I think the main page of the tg repo states sprites are CC or something, while GPL applies only to code.

update attribution on modified `unwrapped` sprite to better conform to CC's guidance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: Sprites Changes: Might require knowledge of spriting or visual design. size/M Denotes a PR that changes 100-999 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants