[Mod] Central Bank [central_bank]

Post Reply
Orby
Member
Posts: 85
Joined: Sat Aug 18, 2012 03:59
GitHub: orbitaldecay
IRC: orbitaldecay
In-game: Orby
Location: Baltimore, MD

[Mod] Central Bank [central_bank]

by Orby » Post

WIP

Description
Central Bank will provide a bank account and ATM mechanism for several major currency mods. Currently I'm planning on supporting Bitchange and Currency (other suggestions?). See the API for current functionality.

Collaboration is welcome.

License
CC0

Dependencies
None

Links
Download
Browse code
Last edited by Orby on Fri Jul 13, 2018 20:51, edited 3 times in total.

User avatar
GamingAssociation39
Member
Posts: 858
Joined: Mon Apr 25, 2016 16:09
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55
Location: Maryland, USA

Re: [Mod] Central Bank [central_bank]

by GamingAssociation39 » Post

A quick suggestion is to try to make an app for the laptop mod so you can access your bank account from your computer if this mod is installed along side the laptop mod.
Jesus Is Lord and Savior!!!

bell07
Member
Posts: 604
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] Central Bank [central_bank]

by bell07 » Post

+1 Really great Mod! Clean and proper API.

Agree with GameAssociation39, we need an laptop app for non-admin functionalities. (At the time show current balance and initiate transfer) => My to do List

One future request: Can you pls. collect all transfer transactions { timestamp, debit_player, credit_player, value } and provide a list of them trough new API function? So it will be possible to show into own transfer history?

EDIT: ... and a payment reference sting in "transfer" command that is stored in transaction and visible in transactions list ...

Orby
Member
Posts: 85
Joined: Sat Aug 18, 2012 03:59
GitHub: orbitaldecay
IRC: orbitaldecay
In-game: Orby
Location: Baltimore, MD

Re: [Mod] Central Bank [central_bank]

by Orby » Post

bell07 wrote:+1 Really great Mod! Clean and proper API.

Agree with GameAssociation39, we need an laptop app for non-admin functionalities. (At the time show current balance and initiate transfer) => My to do List

One future request: Can you pls. collect all transfer transactions { timestamp, debit_player, credit_player, value } and provide a list of them trough new API function? So it will be possible to show into own transfer history?

EDIT: ... and a payment reference sting in "transfer" command that is stored in transaction and visible in transactions list ...
Thanks. I'll look into the laptop mod apps. That sounds really nice. Also, great idea with the transaction history! I've added it to the bank and updated the API accordingly (see OP and github).

Orby
Member
Posts: 85
Joined: Sat Aug 18, 2012 03:59
GitHub: orbitaldecay
IRC: orbitaldecay
In-game: Orby
Location: Baltimore, MD

Re: [Mod] Central Bank [central_bank]

by Orby » Post

GamingAssociation39 wrote:A quick suggestion is to try to make an app for the laptop mod so you can access your bank account from your computer if this mod is installed along side the laptop mod.
Looking into this now. Hi from Baltimore!

bell07
Member
Posts: 604
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] Central Bank [central_bank]

by bell07 » Post

Thank you!
Can you please also look to my PR https://github.com/orbitaldecay/central ... ll/1/files It is not mergeable anymore but maybe you can do the proposed changes. The main change is the central_bank.transfer() function that does the check if possible and both value changes.

By the way, a transaction is a changeset that should be done concurrently together, or cancelled concurrently together. For bankging a transaction is the next unit

Code: Select all

            if from_balance < amount then
                return "Insufficient balance."
            end
            central_bank.set_balance(from_name, from_balance - amount)
            central_bank.set_balance(to_name, to_balance + amount)
EDIT: done initial laptop app, without history and based on my modifications. but ok for showcase. I'l adjust it according the API changes.
Image

The "laptop_app" branch in my fork contains the "banking_app" mod
https://github.com/bell07/central_bank/tree/laptop_app
Attachments
Bildschirmfoto_2018-07-13_19-46-01.png
Bildschirmfoto_2018-07-13_19-46-01.png (67.09 KiB) Viewed 561 times

Orby
Member
Posts: 85
Joined: Sat Aug 18, 2012 03:59
GitHub: orbitaldecay
IRC: orbitaldecay
In-game: Orby
Location: Baltimore, MD

Re: [Mod] Central Bank [central_bank]

by Orby » Post

Ha! It's so funny that you posted your transfer PR while I was writing a transfer command for the API that does exactly the same thing :) Check the new API for the functionality you're looking for.

Orby
Member
Posts: 85
Joined: Sat Aug 18, 2012 03:59
GitHub: orbitaldecay
IRC: orbitaldecay
In-game: Orby
Location: Baltimore, MD

Re: [Mod] Central Bank [central_bank]

by Orby » Post

Since you're developing the laptop app along side the API, I'll make sure I stop making API breaking changes :)

bell07
Member
Posts: 604
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] Central Bank [central_bank]

by bell07 » Post

No worry about API breaks ;-)
I opened an issue with the next whishes,,,

Orby
Member
Posts: 85
Joined: Sat Aug 18, 2012 03:59
GitHub: orbitaldecay
IRC: orbitaldecay
In-game: Orby
Location: Baltimore, MD

Re: [Mod] Central Bank [central_bank]

by Orby » Post

More discussion of laptop app integration at https://github.com/orbitaldecay/central_bank/issues/2

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests