-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Vending Machines can optionally use your Bank Balance #79442
Vending Machines can optionally use your Bank Balance #79442
Conversation
Note also that new characters start with a randomized bank balance, including a balance that could be negative(!) Cataclysm-DDA/src/newcharacter.cpp Line 941 in 842df95
Unsure if Aftershock wants to do something about that, but just figured I'd mention it. |
I can see where you're coming from. I was locked into thinking let's just get rid of cash cards. So I wrote the code to basically ignore them entirely. However strictly speaking that is not at all necessary since it can easily do both. I admit it behaves a bit weird if you started with negative balance, not broken weird since it is safeguarded from making transactions you cant afford to make. But awkward since it won't let you buy things if your account is negative by an amount equal or greater to the amount on your card. But the same awkwardness I think would be true of trading with NPCs from your bank balance. So really we'd want to just set players to never spawn with negative balance. Which I think we can do. Just not in this PR. I'd like to make it so you can set your starting cash in a profession maybe. And then we wouldn't even need to give players a cash card at the start. |
Can we set certain factions to not use bank balance for trading in aftershock? I'd like for the prepnet to only do cash cards instead of direct balance transactions. Doesn't need to be addressed in this PR but neo-luddites need to be ludditing against something specifically and bank balance seems like a fair one. |
…ank balance payments
This required a bit of reworking but I've got it figured out now: That should allow both behaviors to co-exist within Aftershock and PrepNet can go on ludditing against the system to their hearts content. |
…g_machines_use_bank
Summary
Infrastructure "Vending Machines can optionally use your Bank Balance"
Purpose of change
Vending machines are in kind of an awkward place in Aftershock. I know it's not a huge issue but I find it annoying I can trade everything with my bank balance except vending machines. So after I have deposited my funds, gone around the station buying my gear, I have to go back to the ATM and withdraw some money on my card so I can hit the vending machines.
It's especially frustrating because vending machines are the only thing that call for a cash card. If it weren't for them you could keep all your money in your bank and never hold a cash card or chit again.
Describe the solution
Add a new flag BANK_NETWORKED, Vending machines that have this flag allow you to pay with your bank balance. As well as your cash cards. Add two new Vending machines that use this flag. One for reinforced and one for non-reinforced. (Powered down and broken left deliberately left out) Finally added a new JSON property to vending machines that allows you to place them as networked during mapgen. (Currently this only does anything if they are also powered)
All Aftershock Vending machines have been converted to the new networked variant. Ending the tyranny of the cash card ushering forth the true digital currency the setting promises. Enjoy of the convenience of not having to run back to the ATM every time you need to get some munchies or ammo from the station vending machine. And never get kicked out of buying from vending machines because you forgot to load your cash card before going planet side.
Describe alternatives you've considered
Leaving the Vending Machines as they are. I originally tried to make all Vending Machines in Aftershock use this system. But this was changed to the current flag based approach.
This really opens the door to not having cash cards or chits at all since all trading could be done with your bank account. Well I mean it might be prudent to use the EFILE system to make it possible to still find cash on people or as loot. Maybe the chits could become digital notations only found on electronics and such. And be removed trader inventories since you can just have them credit your bank account directly anyway. (Found that out recently.)
Although that would invoke further weirdness of having money you can't exactly use until you get to an ATM. Which makes me sad. So maybe the real solution is some kind of item use action. Something to hack an electronic and get cash within a per item defined min and max amount if you succeed. Then we could still let you find money as loot without needing for it to ever be an item. Combo that with allowing professions to define starting bank balance and the cash card could be done away with entirely I think. Or maybe I'm just crazy.
If that sounds good I'd be down to try making it happen.
Testing
Went onto the station. Deposited the cash card into my bank. Tested buying items from vending machines deducts from my Character's bank account. Confirmed cannot buy without any money in my bank account. Created a vanilla world. Realized I had to spawn a powered on vending machine since those just don't exist anymore. Tested it, vanilla vending machines still use cash cards.
Additional context