Skip to content

Commit

Permalink
don't reward woodcutting
Browse files Browse the repository at this point in the history
fixes #40
  • Loading branch information
BuckarooBanzay committed Mar 29, 2020
1 parent 28c8f6f commit 5d6dbad
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ read_globals = {

-- deps
"default", "mesecon", "hb",
"screwdriver", "areas", "protector"
"screwdriver", "areas", "protector",
"woodcutting"
}
7 changes: 7 additions & 0 deletions builtin.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

local has_woodcutting_mod = minetest.get_modpath("woodcutting")

local function create_limiter(seconds)

local player_time_map = {}
Expand Down Expand Up @@ -81,6 +83,11 @@ minetest.register_on_dignode(function(_, oldnode, digger)
return
end

if has_woodcutting_mod and woodcutting.process_runtime[digger:get_player_name()] then
-- woodcutting active, skip reward
return
end

-- no reward for nodes that are fast to dig and add no tool wear
local dig_immediate = minetest.get_item_group(oldnode.name, "dig_immediate")
if dig_immediate == 2 or dig_immediate == 3 then
Expand Down
2 changes: 1 addition & 1 deletion mod.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name = xp_redo
depends = default
optional_depends = protector,doors,mobs_redo,mobs_animal,mobs_monster,mesecons_mvps,hudbars,screwdriver
optional_depends = protector,doors,mobs_redo,mobs_animal,mobs_monster,mesecons_mvps,hudbars,screwdriver,woodcutting

0 comments on commit 5d6dbad

Please sign in to comment.