You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.
Whenever multi-currency support is added (see #4), commands would need work in order to make them compatible. Here's what I have in mind.
1. Add a new currency argument to the current commands
Add a new argument in the existing command which would accept the currency. Example /eco <string:currency> pay ... or eco pay <string:currency> .... I would prefer the latter if this is to be done.
2. Store players active currency
Making another table which would store the current active currency of the player and each time player executes a command that table is queried and results used. Player would be able to change the active currency with the help of another command.
3. Using currency ids for commands
Having a currencies key in a config like so:
currencies: {
"dollars": {"symbol":"$",
"default": 0,
"max": 1000//add more stuff
},
"coins": {"symbol":"coins","default": 0,
"max": 1000//add more stuff
}
};
Using the array keys of currencies, which are the currency ids, a new command (not a subcommand) is registered with the all the subcommands that are currently there for eco command. Essentially the commands would be somewhat like dollars pay ... or coins pay ... etc. Furthermore, the command name can be used to identify the currency the player is wanting to use.
Any suggestion, improvements or thoughts would be appreciated.
The text was updated successfully, but these errors were encountered:
I don't think a generic pay command is appropriate, because some currencies might not be tradable. What if you add in the config to allow server owner to register payment commands based on currency type? In this case we can also make it easier if the owner wants to add stuff like taxing direct payments.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
Whenever multi-currency support is added (see #4), commands would need work in order to make them compatible. Here's what I have in mind.
1. Add a new
currency
argument to the current commandsAdd a new argument in the existing command which would accept the currency. Example
/eco <string:currency> pay ...
oreco pay <string:currency> ...
. I would prefer the latter if this is to be done.2. Store players active currency
Making another table which would store the current active currency of the player and each time player executes a command that table is queried and results used. Player would be able to change the active currency with the help of another command.
3. Using currency ids for commands
Having a
currencies
key in a config like so:Using the array keys of
currencies
, which are the currency ids, a new command (not a subcommand) is registered with the all the subcommands that are currently there foreco
command. Essentially the commands would be somewhat likedollars pay ...
orcoins pay ...
etc. Furthermore, the command name can be used to identify the currency the player is wanting to use.Any suggestion, improvements or thoughts would be appreciated.
The text was updated successfully, but these errors were encountered: