mirror of
https://github.com/minetest-mods/global_exchange.git
synced 2025-07-04 00:30:23 +02:00
Removed new account functionality; player's account is created at login
This commit is contained in:
19
atm.lua
19
atm.lua
@ -6,7 +6,6 @@ local atm_form = "global_exchange:atm_form"
|
||||
|
||||
local main_menu =[[
|
||||
size[6,2]
|
||||
button[0,0;2,1;new_account;New Account]
|
||||
button[2,0;2,1;info;Account Info]
|
||||
button[4,0;2,1;wire;Wire Monies]
|
||||
button[1,1;4,1;transaction_log;Transaction Log]
|
||||
@ -39,20 +38,6 @@ local function unique()
|
||||
end
|
||||
|
||||
|
||||
local function new_account_fs(p_name)
|
||||
local act_suc, err = exchange:new_account(p_name)
|
||||
|
||||
local fs
|
||||
if not act_suc then
|
||||
fs = label(0.5,0.5, "Error: " .. err)
|
||||
else
|
||||
fs = label(0.5,0.5, "Congratulations on \nyour new account.")
|
||||
end
|
||||
|
||||
return "size[4,3]" .. fs .. logout(0.5,2)
|
||||
end
|
||||
|
||||
|
||||
local function info_fs(p_name)
|
||||
local balance = exchange:get_balance(p_name)
|
||||
|
||||
@ -148,10 +133,6 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
minetest.show_formspec(p_name, atm_form, main_menu)
|
||||
end
|
||||
|
||||
if fields.new_account then
|
||||
minetest.show_formspec(p_name, atm_form, new_account_fs(p_name))
|
||||
end
|
||||
|
||||
if fields.info then
|
||||
minetest.show_formspec(p_name, atm_form, info_fs(p_name))
|
||||
end
|
||||
|
Reference in New Issue
Block a user