Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
majestyotbr committed Aug 26, 2024
1 parent 80004f3 commit 227bcbe
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 99 deletions.
8 changes: 0 additions & 8 deletions data-canary/scripts/actions/tools/crowbar.lua

This file was deleted.

8 changes: 0 additions & 8 deletions data-canary/scripts/actions/tools/kitchen_knife.lua

This file was deleted.

8 changes: 0 additions & 8 deletions data-canary/scripts/actions/tools/machete.lua

This file was deleted.

8 changes: 0 additions & 8 deletions data-canary/scripts/actions/tools/pick.lua

This file was deleted.

8 changes: 0 additions & 8 deletions data-canary/scripts/actions/tools/rope.lua

This file was deleted.

8 changes: 0 additions & 8 deletions data-canary/scripts/actions/tools/scythe.lua

This file was deleted.

8 changes: 0 additions & 8 deletions data-canary/scripts/actions/tools/shovel.lua

This file was deleted.

8 changes: 0 additions & 8 deletions data-canary/scripts/actions/tools/spoon.lua

This file was deleted.

23 changes: 0 additions & 23 deletions data-canary/scripts/actions/tools/toolgear.lua

This file was deleted.

22 changes: 10 additions & 12 deletions data-canary/scripts/lib/register_actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ local sandIds = { 231, 9059 } -- desert sand
local fruits = { 3584, 3585, 3586, 3587, 3588, 3589, 3590, 3591, 3592, 3593, 3595, 3596, 5096, 8011, 8012, 8013 } -- fruits to make decorated cake with knife
local ropeSpots = { 386, 421, 12935, 12936, 14238, 17238, 21501, 21965, 21966, 21967, 21968, 23363 }

ActionsLib = {}

ActionsLib.destroyItem = function(player, target, toPosition)
function destroyItem(player, target, toPosition)
if type(target) ~= "userdata" or not target:isItem() then
return false
end
Expand Down Expand Up @@ -97,7 +95,7 @@ ActionsLib.destroyItem = function(player, target, toPosition)
return true
end

ActionsLib.useMachete = function(player, item, fromPosition, target, toPosition, isHotkey)
function onUseMachete(player, item, fromPosition, target, toPosition, isHotkey)
local targetId = target.itemid
if not targetId then
return true
Expand All @@ -119,7 +117,7 @@ ActionsLib.useMachete = function(player, item, fromPosition, target, toPosition,
return false
end

ActionsLib.usePick = function(player, item, fromPosition, target, toPosition, isHotkey)
function onUsePick(player, item, fromPosition, target, toPosition, isHotkey)
if target.itemid == 10310 then -- shiny stone refining
local chance = math.random(1, 100)
if chance == 1 then
Expand Down Expand Up @@ -167,7 +165,7 @@ ActionsLib.usePick = function(player, item, fromPosition, target, toPosition, is
return false
end

ActionsLib.useRope = function(player, item, fromPosition, target, toPosition, isHotkey)
function onUseRope(player, item, fromPosition, target, toPosition, isHotkey)
local tile = Tile(toPosition)
if not tile then
return false
Expand Down Expand Up @@ -201,7 +199,7 @@ ActionsLib.useRope = function(player, item, fromPosition, target, toPosition, is
return false
end

ActionsLib.useShovel = function(player, item, fromPosition, target, toPosition, isHotkey)
function onUseShovel(player, item, fromPosition, target, toPosition, isHotkey)
local tile = Tile(toPosition)
if not tile then
return false
Expand Down Expand Up @@ -265,7 +263,7 @@ ActionsLib.useShovel = function(player, item, fromPosition, target, toPosition,
return true
end

ActionsLib.useScythe = function(player, item, fromPosition, target, toPosition, isHotkey)
function onUseScythe(player, item, fromPosition, target, toPosition, isHotkey)
if not table.contains({ 3453, 9596 }, item.itemid) then
return false
end
Expand All @@ -280,21 +278,21 @@ ActionsLib.useScythe = function(player, item, fromPosition, target, toPosition,
return false
end

ActionsLib.useCrowbar = function(player, item, fromPosition, target, toPosition, isHotkey)
function onUseCrowbar(player, item, fromPosition, target, toPosition, isHotkey)
if not table.contains({ 3304, 9598 }, item.itemid) then
return false
end
return false
end

ActionsLib.useSpoon = function(player, item, fromPosition, target, toPosition, isHotkey)
function onUseSpoon(player, item, fromPosition, target, toPosition, isHotkey)
if not table.contains({ 3468, 3470 }, item.itemid) then
return false
end
return false
end

ActionsLib.useSickle = function(player, item, fromPosition, target, toPosition, isHotkey)
function onUseSickle(player, item, fromPosition, target, toPosition, isHotkey)
if not table.contains({ 3293, 3306 }, item.itemid) then
return false
end
Expand All @@ -309,7 +307,7 @@ ActionsLib.useSickle = function(player, item, fromPosition, target, toPosition,
return false
end

ActionsLib.useKitchenKnife = function(player, item, fromPosition, target, toPosition, isHotkey)
function onUseKitchenKnife(player, item, fromPosition, target, toPosition, isHotkey)
if not table.contains({ 3469, 9594, 9598 }, item.itemid) then
return false
end
Expand Down

0 comments on commit 227bcbe

Please sign in to comment.