Bank Machines now accept coins (#90494)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
This is my first attempt at actually manipulating BYOND code, so I'm
using this pull request as a test. ~~I'm pushing a branch of my own
repository, so I should be able to test and make sure that I got
everything right.~~
NEVERMIND THIS WAS PUSHING INTO MASTER but it's fine, because I wrote it
as a rough draft and it should still make do. I'll just edit it to fix
it.

I submit a bug report a week ago for something that I found, and it's
basically slipped under the radar. At the same time, it was only three
lines to make this fix, so it seemed like a very easy attempt to make do
with.
Despite having monetary value, coins were not considered a valid vector
for cashing in at bank machines, only cash and holochips. This didn't
really make sense to me, so I decided it should be fixed. Since it was a
bug report that I submit, it doesn't feel right to use the Fix tag, so
I'm guessing QoL is more appropriate?
<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game
Most coins have monetary value, so there's no real reason they can't be
accepted like cash or holochips. Valueless coins still attack the
machine, but if they have some value to them, then they'll be cashed in.
Closes https://github.com/tgstation/tgstation/issues/90381.
<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and its effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑
qol: Bank machines accept coins of monetary value
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Co-authored-by: safey <safey@ncsu.edu>
This commit is contained in:
ZeroKelvn
2025-04-29 17:49:24 -06:00
committed by Shadow-Quill
co-authored by safey
parent 1d17e40c1f
commit af40d27afe
+3
View File
@@ -51,6 +51,9 @@
else if(istype(weapon, /obj/item/holochip))
var/obj/item/holochip/inserted_holochip = weapon
value = inserted_holochip.credits
else if(istype(weapon, /obj/item/coin))
var/obj/item/coin/inserted_coin = weapon
value = inserted_coin.value
if(value)
if(synced_bank_account)
synced_bank_account.adjust_money(value)