[Mod] Central Bank [central_bank]

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

[Mod] Central Bank [central_bank]

by Orby » Fri Jul 13, 2018 04:09

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: 735
Joined: Mon Apr 25, 2016 16:09
Location: Maryland, USA
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55

Re: [Mod] Central Bank [central_bank]

by GamingAssociation39 » Fri Jul 13, 2018 05:17

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: 534
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] Central Bank [central_bank]

by bell07 » Fri Jul 13, 2018 06:40

+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
Location: Baltimore, MD
GitHub: orbitaldecay
IRC: orbitaldecay
In-game: Orby

Re: [Mod] Central Bank [central_bank]

by Orby » Fri Jul 13, 2018 16:00

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
Location: Baltimore, MD
GitHub: orbitaldecay
IRC: orbitaldecay
In-game: Orby

Re: [Mod] Central Bank [central_bank]

by Orby » Fri Jul 13, 2018 16:33

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: 534
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] Central Bank [central_bank]

by bell07 » Fri Jul 13, 2018 17:10

Thank you!
Can you please also look to my PR https://github.com/orbitaldecay/central_bank/pull/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
(67.09 KiB) Not downloaded yet
 

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

Re: [Mod] Central Bank [central_bank]

by Orby » Fri Jul 13, 2018 17:57

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
Location: Baltimore, MD
GitHub: orbitaldecay
IRC: orbitaldecay
In-game: Orby

Re: [Mod] Central Bank [central_bank]

by Orby » Fri Jul 13, 2018 17:58

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

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

Re: [Mod] Central Bank [central_bank]

by bell07 » Fri Jul 13, 2018 18:53

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

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


Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 5 guests