mirror of
https://gitlab.com/lunovox/minertrade.git
synced 2025-04-30 06:01:41 -04:00
Melhora no README.md e nas configurações.
This commit is contained in:
parent
f30e288d5c
commit
fa5dde2b28
3 changed files with 45 additions and 31 deletions
14
README.md
14
README.md
|
@ -37,10 +37,16 @@ It adds various types of money, exchange table, Dispensing Machines, Strongbox i
|
||||||
* /csb <player_name>
|
* /csb <player_name>
|
||||||
|
|
||||||
**Settings:**
|
**Settings:**
|
||||||
* Change the file **'[config.lua](https://github.com/Lunovox/minertrade/blob/master/config.lua)'** to change the initial settings of the mod, such as:
|
|
||||||
* Path of Database
|
In **minetest.conf** file:
|
||||||
* Delay of Install Strongbox and ATM,
|
|
||||||
* Size of inventory of Strongbox and ATM,
|
You don't need to do any of these presets mentioned below to make this mod work. But it's worth knowing the configuration values in case you want to directly change the ````minetest.conf```` file.
|
||||||
|
|
||||||
|
* ````minertrade.save_compressed = <boolean>```` : If enabled will save database bank in file '.db64', else in file '.tbl'. Default: ````true````
|
||||||
|
* ````minertrade.salary.enabled = <boolean>```` : Allows for daily distribution of Salary. Default: ````true````
|
||||||
|
* ````minertrade.salary.value = <number>```` : Specifies the amount of salary paid daily. Default: ````9````
|
||||||
|
* ````minertrade.salary.intervalcheck = <number>```` : Specifies how many seconds the salary will be checked who still has to receive. Values below 5 can cause server lag. Default: ````60````
|
||||||
|
|
||||||
|
|
||||||
**Translate to Others Languages:**
|
**Translate to Others Languages:**
|
||||||
|
|
||||||
|
|
23
config.lua
23
config.lua
|
@ -0,0 +1,23 @@
|
||||||
|
modMinerTrade = {
|
||||||
|
modName = minetest.get_current_modname(),
|
||||||
|
modPath = minetest.get_modpath(minetest.get_current_modname()),
|
||||||
|
save_compressed = (minetest.settings:get("minertrade.save_compressed") ~= "false"),
|
||||||
|
delayConstruct = 300,
|
||||||
|
bank = {
|
||||||
|
accounts = 0,
|
||||||
|
last_pay = 0,
|
||||||
|
player = { },
|
||||||
|
},
|
||||||
|
salary = {
|
||||||
|
enabled = function()
|
||||||
|
local isEnabled = minetest.settings:get("minertrade.salary.enabled")
|
||||||
|
if isEnabled == nil or (isEnabled ~= "true" and isEnabled ~= "false") then
|
||||||
|
isEnabled = true
|
||||||
|
minetest.settings:set_bool("minertrade.salary.enabled", isEnabled)
|
||||||
|
end
|
||||||
|
return isEnabled
|
||||||
|
end,
|
||||||
|
value = tonumber(minetest.settings:get("minertrade.salary.value") or 1),
|
||||||
|
intervalcheck = tonumber(minetest.settings:get("minertrade.salary.intervalcheck") or 60),
|
||||||
|
}
|
||||||
|
}
|
39
init.lua
39
init.lua
|
@ -1,33 +1,18 @@
|
||||||
modMinerTrade = {
|
local modPath = minetest.get_modpath(minetest.get_current_modname())
|
||||||
modName = minetest.get_current_modname(),
|
|
||||||
modPath = minetest.get_modpath(minetest.get_current_modname()),
|
|
||||||
save_compressed = (minetest.settings:get("minertrade.save_compressed") ~= "false"),
|
|
||||||
delayConstruct = 300,
|
|
||||||
bank = {
|
|
||||||
accounts = 0,
|
|
||||||
last_pay = 0,
|
|
||||||
player = { },
|
|
||||||
},
|
|
||||||
salary = {
|
|
||||||
enabled = (minetest.settings:get("minertrade.salary.enabled") ~= "false"),
|
|
||||||
value = tonumber(minetest.settings:get("minertrade.salary.value") or 1),
|
|
||||||
intervalcheck = tonumber(minetest.settings:get("minertrade.salary.intervalcheck") or 1),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
--dofile(modMinerTrade.modPath.."/config.lua") -- <== Antes de carregar tudo!
|
dofile(modPath.."/config.lua") -- <== Antes de carregar tudo!
|
||||||
dofile(modMinerTrade.modPath.."/translate.lua") -- <== Antes de 'api.lua'!
|
dofile(modPath.."/translate.lua") -- <== Antes de 'api.lua'!
|
||||||
dofile(modMinerTrade.modPath.."/api.lua")
|
dofile(modPath.."/api.lua")
|
||||||
dofile(modMinerTrade.modPath.."/item_exchange_table.lua")
|
dofile(modPath.."/item_exchange_table.lua")
|
||||||
dofile(modMinerTrade.modPath.."/item_dispensing_machine.lua")
|
dofile(modPath.."/item_dispensing_machine.lua")
|
||||||
|
|
||||||
dofile(modMinerTrade.modPath.."/item_atm.lua")
|
dofile(modPath.."/item_atm.lua")
|
||||||
--dofile(modMinerTrade.modPath.."/item_strongbox.lua")
|
--dofile(modPath.."/item_strongbox.lua")
|
||||||
--dofile(modMinerTrade.modPath.."/item_strongbox_old.lua")
|
--dofile(modPath.."/item_strongbox_old.lua")
|
||||||
dofile(modMinerTrade.modPath.."/item_minercash.lua")
|
dofile(modPath.."/item_minercash.lua")
|
||||||
--dofile(path.."/item_rent_door.lua")
|
--dofile(path.."/item_rent_door.lua")
|
||||||
dofile(modMinerTrade.modPath.."/api_payday.lua")
|
dofile(modPath.."/api_payday.lua")
|
||||||
--dofile(modMinerTrade.modPath.."/commands.lua")
|
--dofile(modPath.."/commands.lua")
|
||||||
|
|
||||||
--if modMinerTrade.doBankLoad ~= nil then
|
--if modMinerTrade.doBankLoad ~= nil then
|
||||||
modMinerTrade.doBankLoad()
|
modMinerTrade.doBankLoad()
|
||||||
|
|
Loading…
Add table
Reference in a new issue