indenting: spaces -> tabs

This commit is contained in:
Vanessa Dannenberg 2018-09-21 18:30:15 -04:00
parent 3210e9f687
commit 3e2fc7be7b
4 changed files with 59 additions and 59 deletions

@ -93,13 +93,13 @@ barter.chest.exchange = function(meta)
end end
minetest.register_node("currency:barter", { minetest.register_node("currency:barter", {
drawtype = "nodebox", drawtype = "nodebox",
description = S("Barter Table"), description = S("Barter Table"),
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
tiles = {"barter_top.png", tiles = {"barter_top.png",
"barter_base.png", "barter_base.png",
"barter_side.png"}, "barter_side.png"},
inventory_image = "barter_top.png", inventory_image = "barter_top.png",
node_box = { node_box = {
type = "fixed", type = "fixed",

@ -3,63 +3,63 @@ local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua") local S, NS = dofile(MP.."/intllib.lua")
minetest.register_craftitem("currency:minegeld_cent_5", { minetest.register_craftitem("currency:minegeld_cent_5", {
description = S("5 Minegeld cent coin"), description = S("5 Minegeld cent coin"),
inventory_image = "minegeld_cent_5.png", inventory_image = "minegeld_cent_5.png",
stack_max = 1000, stack_max = 1000,
groups = {minegeld = 1} groups = {minegeld = 1}
}) })
minetest.register_craftitem("currency:minegeld_cent_10", { minetest.register_craftitem("currency:minegeld_cent_10", {
description = S("10 Minegeld cent coin"), description = S("10 Minegeld cent coin"),
inventory_image = "minegeld_cent_10.png", inventory_image = "minegeld_cent_10.png",
stack_max = 1000, stack_max = 1000,
groups = {minegeld = 1} groups = {minegeld = 1}
}) })
minetest.register_craftitem("currency:minegeld_cent_25", { minetest.register_craftitem("currency:minegeld_cent_25", {
description = S("25 Minegeld cent coin"), description = S("25 Minegeld cent coin"),
inventory_image = "minegeld_cent_25.png", inventory_image = "minegeld_cent_25.png",
stack_max = 1000, stack_max = 1000,
groups = {minegeld = 1} groups = {minegeld = 1}
}) })
minetest.register_craftitem("currency:minegeld", { minetest.register_craftitem("currency:minegeld", {
description = S("1 Minegeld Note"), description = S("1 Minegeld Note"),
inventory_image = "minegeld.png", inventory_image = "minegeld.png",
stack_max = 65535, stack_max = 65535,
groups = {minegeld = 1} groups = {minegeld = 1}
}) })
minetest.register_craftitem("currency:minegeld_5", { minetest.register_craftitem("currency:minegeld_5", {
description = S("5 Minegeld Note"), description = S("5 Minegeld Note"),
inventory_image = "minegeld_5.png", inventory_image = "minegeld_5.png",
stack_max = 65535, stack_max = 65535,
groups = {minegeld = 1} groups = {minegeld = 1}
}) })
minetest.register_craftitem("currency:minegeld_10", { minetest.register_craftitem("currency:minegeld_10", {
description = S("10 Minegeld Note"), description = S("10 Minegeld Note"),
inventory_image = "minegeld_10.png", inventory_image = "minegeld_10.png",
stack_max = 65535, stack_max = 65535,
groups = {minegeld = 1} groups = {minegeld = 1}
}) })
minetest.register_craftitem("currency:minegeld_50", { minetest.register_craftitem("currency:minegeld_50", {
description = S("50 Minegeld Note"), description = S("50 Minegeld Note"),
inventory_image = "minegeld_50.png", inventory_image = "minegeld_50.png",
stack_max = 65535, stack_max = 65535,
groups = {minegeld = 1} groups = {minegeld = 1}
}) })
minetest.register_craftitem("currency:minegeld_100", { minetest.register_craftitem("currency:minegeld_100", {
description = S("100 Minegeld Note"), description = S("100 Minegeld Note"),
inventory_image = "minegeld_100.png", inventory_image = "minegeld_100.png",
stack_max = 65535, stack_max = 65535,
groups = {minegeld = 1} groups = {minegeld = 1}
}) })
minetest.register_craftitem("currency:minegeld_bundle", { minetest.register_craftitem("currency:minegeld_bundle", {
description = S("Bundle of random Minegeld notes"), description = S("Bundle of random Minegeld notes"),
inventory_image = "minegeld_bundle.png", inventory_image = "minegeld_bundle.png",
stack_max = 65535, stack_max = 65535,
}) })

@ -6,33 +6,33 @@ local S, NS = dofile(MP.."/intllib.lua")
local timer = 0 local timer = 0
minetest.register_globalstep(function(dtime) minetest.register_globalstep(function(dtime)
timer = timer + dtime; timer = timer + dtime;
if timer >= 720 then --720 for one day if timer >= 720 then --720 for one day
timer = 0 timer = 0
for _,player in ipairs(minetest.get_connected_players()) do for _,player in ipairs(minetest.get_connected_players()) do
local name = player:get_player_name() local name = player:get_player_name()
if players_income[name] == nil then if players_income[name] == nil then
players_income[name] = 0 players_income[name] = 0
end end
players_income[name] = 1 players_income[name] = 1
minetest.log("info", "[Currency] "..S("basic income for @1", name)) minetest.log("info", "[Currency] "..S("basic income for @1", name))
end end
end end
end) end)
earn_income = function(player) earn_income = function(player)
if not player or player.is_fake_player then return end if not player or player.is_fake_player then return end
local name = player:get_player_name() local name = player:get_player_name()
if players_income[name] == nil then if players_income[name] == nil then
players_income[name] = 0 players_income[name] = 0
end end
if players_income[name] > 0 then if players_income[name] > 0 then
count = players_income[name] count = players_income[name]
local inv = player:get_inventory() local inv = player:get_inventory()
inv:add_item("main", {name="currency:minegeld_10", count=count}) inv:add_item("main", {name="currency:minegeld_10", count=count})
players_income[name] = 0 players_income[name] = 0
minetest.log("info", "[Currency] "..S("added basic income for @1 to inventory", name)) minetest.log("info", "[Currency] "..S("added basic income for @1 to inventory", name))
end end
end end
minetest.register_on_dignode(function(pos, oldnode, digger) minetest.register_on_dignode(function(pos, oldnode, digger)

@ -33,7 +33,7 @@ minetest.register_node("currency:safe", {
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
tiles = {"safe_side.png", tiles = {"safe_side.png",
"safe_side.png", "safe_side.png",
"safe_side.png", "safe_side.png",
"safe_side.png", "safe_side.png",
"safe_side.png", "safe_side.png",
@ -66,7 +66,7 @@ minetest.register_node("currency:safe", {
end end
return count return count
end, end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player) allow_metadata_inventory_put = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
if not has_safe_privilege(meta, player) then if not has_safe_privilege(meta, player) then
minetest.log("action", S("@1 tried to access a safe belonging to @2 at @3", minetest.log("action", S("@1 tried to access a safe belonging to @2 at @3",
@ -75,7 +75,7 @@ minetest.register_node("currency:safe", {
end end
return stack:get_count() return stack:get_count()
end, end,
allow_metadata_inventory_take = function(pos, listname, index, stack, player) allow_metadata_inventory_take = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
if not has_safe_privilege(meta, player) then if not has_safe_privilege(meta, player) then
minetest.log("action", S("@1 tried to access a safe belonging to @2 at @3", minetest.log("action", S("@1 tried to access a safe belonging to @2 at @3",
@ -87,10 +87,10 @@ minetest.register_node("currency:safe", {
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
minetest.log("action", S("@1 moves stuff in safe at @2", player:get_player_name(), minetest.pos_to_string(pos))) minetest.log("action", S("@1 moves stuff in safe at @2", player:get_player_name(), minetest.pos_to_string(pos)))
end, end,
on_metadata_inventory_put = function(pos, listname, index, stack, player) on_metadata_inventory_put = function(pos, listname, index, stack, player)
minetest.log("action", S("@1 moves stuff to safe at @2", player:get_player_name(), minetest.pos_to_string(pos))) minetest.log("action", S("@1 moves stuff to safe at @2", player:get_player_name(), minetest.pos_to_string(pos)))
end, end,
on_metadata_inventory_take = function(pos, listname, index, stack, player) on_metadata_inventory_take = function(pos, listname, index, stack, player)
minetest.log("action", S("@1 takes stuff from safe at @2", player:get_player_name(), minetest.pos_to_string(pos))) minetest.log("action", S("@1 takes stuff from safe at @2", player:get_player_name(), minetest.pos_to_string(pos)))
end, end,
on_rightclick = function(pos, node, clicker) on_rightclick = function(pos, node, clicker)