diff --git a/README.md b/README.md index ea9de42..38d488a 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,6 @@ detailed features: of future upgrades. - building permissions: owner of protector with most counts in the area can upgrade other player protector by right click for free. This way even poorer players place 1 protector in expensive areas if allowed -- bug fixes: now digging protector with no owner no longer decreases protector count +- bug fixes: now digging protector with no owner no longer decreases protector counts INSTALLATION: extract into directory called "protector" inside minetest mod directory \ No newline at end of file diff --git a/init.lua b/init.lua index e210071..0536401 100644 --- a/init.lua +++ b/init.lua @@ -260,7 +260,7 @@ function protector.count(pos, mode) for _, p in ipairs(positions) do meta = minetest.get_meta(p) - count = meta:get_int("count")-1; + count = meta:get_int("count")-1;if count<0 then count = 0 end meta:set_int("count", count) end