]> git.lizzy.rs Git - Crafter.git/commitdiff
No cheat button when give privilegue is missing
authorElias Fleckenstein <eliasfleckenstein@web.de>
Wed, 9 Dec 2020 16:49:00 +0000 (17:49 +0100)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Wed, 9 Dec 2020 16:49:00 +0000 (17:49 +0100)
mods/too_many_items/init.lua
todo.txt

index b7997826a9151dfae94bda3f4ffa53b55eafc9ac..55961888ca20e0bf7bcc2b96c386cee2240266d6 100644 (file)
@@ -168,9 +168,11 @@ end
 
 local function cheat_button(name)
        if pool[name] and pool[name].cheating then
-               return("button[11.5,7.6;2,2;toomanyitems.cheat;cheat:on]")
+               return "button[11.5,7.6;2,2;toomanyitems.cheat;cheat:on]"
+       elseif minetest.check_player_privs(name, {give = true}) then
+               return "button[11.5,7.6;2,2;toomanyitems.cheat;cheat:off]"
        else
-               return("button[11.5,7.6;2,2;toomanyitems.cheat;cheat:off]")
+               return ""
        end
 end
 
@@ -369,4 +371,4 @@ local name
 minetest.register_on_leaveplayer(function(player)
        name = player:get_player_name()
        pool[name] = nil
-end)
\ No newline at end of file
+end)
index c93bf98ef2970780151553f11460235cac6a4cfa..e3c02f095ebb23672beb7043caf106ea4f5f4921 100644 (file)
--- a/todo.txt
+++ b/todo.txt
@@ -1,18 +1,17 @@
+- Dont show cheat button if priv is missing
+- Take damage when inside blocks
+- Bucket sounds
+- Background images for armor in inventory
 - Equip armor with rightclick
 - Shift-click fuel into furnace
+- Throwing eggs
 - 3d person visuals: Fix invalid rotation of wield tools
-- Dont show cheat button if priv is missing
-- Background images for armor in inventory
-- Add two new biomes, each with individual trees, exclusive mobs and structures and a boss fight
 - Sprinting
-- Refactor bows mod to not save things in player meta
 - Rebalancing of ore generation probabilities and tool speeds
-- Rework enchanting system
-- Add Redstone Breaker
 - More sophisticated particle effects
 - Season effects (only affecting visuals)
-- Throwing eggs
-- Add Oil
-- Take damage when inside blocks
+- Add two new biomes, each with individual trees, exclusive mobs and structures and a boss fight
 - Fix creative inventory to not overstack items
-- Bucket sounds
+- Add Oil
+- Add Redstone Breaker
+- Rework enchanting system