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

Rework wallet pocket restrictions #65937

Merged

Conversation

MrDraMaster
Copy link
Contributor

@MrDraMaster MrDraMaster commented May 30, 2023

Summary

None

Purpose of change

Magiclysm's denarii coins don't fit into the coin purse pocket of wallets, but "pocket_data"'s "item_restriction" can't be extended and having to overwrite all wallet pockets in a mod sounds like a giant headache for mod compatibility in the future.

Describe the solution

  • introduce new *_SHAPED flags for bank notes & straps, coins and (credit) cards
  • apply the flags to all the items that (should) fit into wallets, ID card holders, and the cash register
  • switch those containers to the appropriate "flag_restriction"s

Describe alternatives you've considered

I thought about using volume/length restrictions instead, but I got a headache trying to figure out a way to handle bank notes, credit cards and coins since all of them are so much thinner than long.

Testing

  • dc4fd35 loaded without errors
  • stuff still fit into wallets & cash register
  • denarius now fits into wallets :'D

Additional context

  • Rubik's shiny farthing (rubik_farthing) now fits into coin purse pockets (and cash registers) since it's a coin
  • you can use a condom's pocket to circumvent the pocket restrictions, but you could do that before these changes already...
  • survnote is now BANK_NOTE_SHAPED since it spawns in cash_register but doesn't make sense as BANK_NOTE_STRAP_SHAPED... there's probably a bunch of other note stuff that could fit in the same pockets, but that's out of scope for this PR since I'm just trying to keep pocket parity as much as possible
  • cash_register used to allow the various money bundles, but since all of them are too big (1.13 l volume vs 1.00 l pocket), I just dropped them from the cash_register (instead of adding a BANK_NOTE_BUNDLE_SHAPED flag)
  • FMCNote no longer also fits into the coin purse since it's based on a $50 bill
  • id_artisan_member now fits into the card slots which it didn't before
  • the various special variants of id_science (like the colored ones of the TCL) now fit into wallet card slots, not just the lanyard, since they are the same shape as the normal ID card
  • I didn't touch the coin_wrapper since that is explicitly for the specific USD coin denominations

@MrDraMaster MrDraMaster requested a review from KorGgenT as a code owner May 30, 2023 22:04
@github-actions github-actions bot added [JSON] Changes (can be) made in JSON Items: Containers Things that hold other things Mods Issues related to mods or modding Mods: Magiclysm Anything to do with the Magiclysm mod json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels May 30, 2023
@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. [Markdown] Markdown issues and PRs labels May 30, 2023
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label May 31, 2023
@dseguin dseguin merged commit b7ff804 into CleverRaven:master May 31, 2023
@MrDraMaster MrDraMaster deleted the rework-wallet-pocket-restrictions branch May 31, 2023 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Documentation> Design documents, internal info, guides and help. Items: Containers Things that hold other things [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs Mods: Magiclysm Anything to do with the Magiclysm mod Mods Issues related to mods or modding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants