Skip to content

Commit

Permalink
move pipeworks chatcommands to monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Apr 28, 2020
1 parent 33b9d5a commit ef2b6fe
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions pipeworks.lua
Original file line number Diff line number Diff line change
@@ -1,30 +1,5 @@

minetest.register_chatcommand("pipeworks_flush", {
description = "flushes the pipeworks tubes",
privs = {server=true},
func = function(name)
minetest.log("warning", "Player " .. name .. " flushes the pipeworks tubes")
local count = 0
for id, entity in pairs(pipeworks.luaentity.entities) do
entity:remove()
count = count + 1
end
minetest.log("warning", "Flushed: " .. count .. " items")
return true, "Flushed: " .. count .. " items"
end
})

minetest.register_chatcommand("pipeworks_stats", {
description = "Returns some pipeworks stats",
privs = {interact=true},
func = function(name)
local count = 0
for id, entity in pairs(pipeworks.luaentity.entities) do
count = count + 1
end
return true, "Items in tubes: " .. count
end
})

-- add "Done" button
-- idea and implementation originally by @SwissalpS
Expand Down

0 comments on commit ef2b6fe

Please sign in to comment.