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
a1891dbe
Commit
a1891dbe
authored
11 years ago
by
SmallJoker
Browse files
Options
Downloads
Patches
Plain Diff
Higher factors for exchanging
parent
bfc7a18a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bank_money.lua
+2
-2
2 additions, 2 deletions
bank_money.lua
bank_money2.lua
+2
-2
2 additions, 2 deletions
bank_money2.lua
with
4 additions
and
4 deletions
bank_money.lua
+
2
−
2
View file @
a1891dbe
...
...
@@ -97,7 +97,7 @@ minetest.register_on_player_receive_fields(function(sender, formname, fields)
end
end
if
(
err_msg
==
""
)
then
exchange_worth
=
exchange_worth
*
0
.
995
exchange_worth
=
exchange_worth
/
1
.
0059
local
price
=
round
(
exchange_worth
-
0
.
1
,
1
)
*
10
local
cur_money
=
money
.
get_money
(
player_name
)
money
.
set_money
(
player_name
,
cur_money
+
price
)
...
...
@@ -126,7 +126,7 @@ minetest.register_on_player_receive_fields(function(sender, formname, fields)
money
.
set_money
(
player_name
,
cur_money
-
price
)
bank_inv
:
remove_item
(
"coins"
,
coin_stack
)
player_inv
:
add_item
(
"main"
,
coin_stack
)
exchange_worth
=
exchange_worth
*
1
.
00
5
exchange_worth
=
exchange_worth
*
1
.
00
6
changes_made
=
true
err_msg
=
"Bought 10 MineCoins for "
..
price
..
" money"
end
...
...
This diff is collapsed.
Click to expand it.
bank_money2.lua
+
2
−
2
View file @
a1891dbe
...
...
@@ -97,7 +97,7 @@ minetest.register_on_player_receive_fields(function(sender, formname, fields)
end
end
if
(
err_msg
==
""
)
then
exchange_worth
=
exchange_worth
*
0
.
995
exchange_worth
=
exchange_worth
/
1
.
0059
local
price
=
round
(
exchange_worth
-
0
.
1
,
1
)
*
10
local
cur_money
=
money
.
get
(
player_name
,
amount
)
money
.
set
(
player_name
,
cur_money
+
price
)
...
...
@@ -126,7 +126,7 @@ minetest.register_on_player_receive_fields(function(sender, formname, fields)
money
.
set
(
player_name
,
cur_money
-
price
)
bank_inv
:
remove_item
(
"coins"
,
coin_stack
)
player_inv
:
add_item
(
"main"
,
coin_stack
)
exchange_worth
=
exchange_worth
*
1
.
00
5
exchange_worth
=
exchange_worth
*
1
.
00
6
changes_made
=
true
err_msg
=
"Bought 10 MineCoins for "
..
price
..
" cr"
end
...
...
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