diff options
author | BremaWeb <brandon@bremaweb.com> | 2013-11-30 13:23:50 -0600 |
---|---|---|
committer | BremaWeb <brandon@bremaweb.com> | 2013-11-30 13:23:50 -0600 |
commit | 81a12e3d38c83eacfce4a3eeaec14724dcdb4c8f (patch) | |
tree | 58701772bd01e4ab332a0699cdcf0a3e0bf8e432 /landsale.lua | |
parent | 6b22f3d60f1b942485ccbb6dc5417fbe65119db9 (diff) |
restructured, use Settings interface for config, use protection API
Diffstat (limited to 'landsale.lua')
-rw-r--r-- | landsale.lua | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/landsale.lua b/landsale.lua index f77f65d..96bc273 100644 --- a/landsale.lua +++ b/landsale.lua @@ -37,9 +37,9 @@ minetest.register_node("landrush:sale_block",{ local transfer = money.transfer(name,owner,price) if ( transfer == nil ) then chunk = landrush.get_chunk(pos) - claims[chunk] = {owner=name,shared={},claimtype='landclaim'} + landrush.claims[chunk] = {owner=name,shared={},claimtype='landclaim'} landrush.save_claims() - minetest.chat_send_player(claims[chunk].owner, "You now own this claim.") + minetest.chat_send_player(landrush.claims[chunk].owner, "You now own this claim.") minetest.remove_node(pos) if ( chatplus ) then @@ -54,15 +54,7 @@ minetest.register_node("landrush:sale_block",{ end end end, ---[[ - on_rightclick = function (pos, node, player, itemstack) - name = player:get_player_name() - owner = landrush.get_owner(pos) - if ( name == owner ) then - minetest.show_formspec(name,"landrush_sell",landrush.sell_formspec(pos,player)) - end - end, -]] + on_receive_fields = function ( pos, formname, fields, sender ) --process formspec local name = sender:get_player_name() |