Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bitchange
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
bitchange
Commits
c0f291ec
Commit
c0f291ec
authored
11 years ago
by
SmallJoker
Browse files
Options
Downloads
Patches
Plain Diff
Money converting updates
parent
78f27c4b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
HELP_ME.txt
+3
-1
3 additions, 1 deletion
HELP_ME.txt
bank_currency.lua
+5
-5
5 additions, 5 deletions
bank_currency.lua
bank_money.lua
+1
-1
1 addition, 1 deletion
bank_money.lua
bank_money2.lua
+1
-1
1 addition, 1 deletion
bank_money2.lua
with
10 additions
and
8 deletions
HELP_ME.txt
+
3
−
1
View file @
c0f291ec
...
...
@@ -11,7 +11,9 @@
-> Enable something: Open 'config.txt' with your editor and modify it
-> See crafts: get an extention for your inventory or browse through the codes
-> Power the tool repair: insert damaged tool in the first box and someminecoins intothe 2nd, then wait.
-> Set up the bank: use [E + right click] to see the reserve of the current bank, then put some MineCoins in there
and if you are using the curreny mod, then also put 1-MineGelt notes inside.
==> Add special access to nodes, how?
-> Exchange shop: open 'shop.lua' and edit the function 'has_exchange_shop_privilege',
return 'true' to grant access to the contents, return 'false' to disallow
...
...
This diff is collapsed.
Click to expand it.
bank_currency.lua
+
5
−
5
View file @
c0f291ec
...
...
@@ -3,7 +3,7 @@
--License: WTFPL
local
file_path
=
minetest
.
get_worldpath
()
..
"/bitchange_bank_currency"
local
exchange_worth
=
15
-- default worth in "money" for
one
MineCoin, change if not okay
local
exchange_worth
=
8
-- default worth in "money" for
10
MineCoin
s
, change if not okay
local
bank
=
{}
local
changes_made
=
false
...
...
@@ -84,7 +84,7 @@ minetest.register_on_player_receive_fields(function(sender, formname, fields)
local
geld_stack
=
"currency:minegeld "
local
err_msg
=
""
if
(
fields
.
buy10
)
then
geld_stack
=
geld_stack
..
(
round
(
exchange_worth
*
0
.
995
,
1
)
*
10
)
geld_stack
=
geld_stack
..
(
round
(
exchange_worth
*
0
.
995
,
1
))
if
(
not
player_inv
:
contains_item
(
"main"
,
coin_stack
))
then
err_msg
=
"You do not have the needed MineCoins."
end
...
...
@@ -105,7 +105,7 @@ minetest.register_on_player_receive_fields(function(sender, formname, fields)
end
if
(
err_msg
==
""
)
then
exchange_worth
=
exchange_worth
*
0
.
995
local
price
=
round
(
exchange_worth
-
0
.
01
,
1
)
*
10
local
price
=
round
(
exchange_worth
-
0
.
01
,
1
)
bank_inv
:
remove_item
(
"coins"
,
geld_stack
)
player_inv
:
add_item
(
"main"
,
geld_stack
)
player_inv
:
remove_item
(
"main"
,
coin_stack
)
...
...
@@ -114,8 +114,8 @@ minetest.register_on_player_receive_fields(function(sender, formname, fields)
err_msg
=
"Sold 10 MineCoins for "
..
price
..
" MineGeld"
end
elseif
(
fields
.
sell10
)
then
local
price
=
round
(
exchange_worth
,
1
)
*
10
geld_stack
=
geld_stack
..
(
round
(
exchange_worth
,
1
)
*
10
)
local
price
=
round
(
exchange_worth
,
1
)
geld_stack
=
geld_stack
..
price
)
if
(
not
player_inv
:
contains_item
(
"main"
,
geld_stack
))
then
err_msg
=
"You do not have the required money. ("
..
price
..
" x 1 MineGeld pieces)"
end
...
...
This diff is collapsed.
Click to expand it.
bank_money.lua
+
1
−
1
View file @
c0f291ec
...
...
@@ -3,7 +3,7 @@
--License: WTFPL
local
file_path
=
minetest
.
get_worldpath
()
..
"/bitchange_bank_money"
local
exchange_worth
=
10
0
.
0
-- default worth in "money" for one MineCoin, change if not okay
local
exchange_worth
=
7
0
.
0
-- default worth in "money" for one MineCoin, change if not okay
local
bank
=
{}
local
changes_made
=
false
...
...
This diff is collapsed.
Click to expand it.
bank_money2.lua
+
1
−
1
View file @
c0f291ec
...
...
@@ -3,7 +3,7 @@
--License: WTFPL
local
file_path
=
minetest
.
get_worldpath
()
..
"/bitchange_bank_money2"
local
exchange_worth
=
10
0
.
0
-- default worth in "cr" for one MineCoin, change if not okay
local
exchange_worth
=
7
0
.
0
-- default worth in "cr" for one MineCoin, change if not okay
local
bank
=
{}
local
changes_made
=
false
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment