Skip to content

Commit

Permalink
Update Better Crafting plugin (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
wowm0d committed May 19, 2020
1 parent 7243fdf commit 973f50e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ixcraft/cl_hooks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function PLUGIN:PopulateRecipeTooltip(tooltip, recipe)
itemName = itemTable.name
end

if (type(v) == "table") then
if (istable(v)) then
if (v["min"] and v["max"]) then
amount = v["min"].."-"..v["max"]
else
Expand Down
2 changes: 1 addition & 1 deletion ixcraft/meta/sh_recipe.lua
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ if (SERVER) then
end

for uniqueID, amount in pairs(self.results or {}) do
if (type(amount) == "table") then
if (istable(amount)) then
if (amount["min"] and amount["max"]) then
amount = math.random(amount["min"], amount["max"])
else
Expand Down
2 changes: 1 addition & 1 deletion ixcraft/recipes/sh_recipe_watermelon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RECIPE.tools = {
}
RECIPE.flag = "V"

RECIPE:PostHook("OnCanCraft", function(client)
RECIPE:PostHook("OnCanCraft", function(recipeTable, client)
for _, v in pairs(ents.FindByClass("ix_station_workbench")) do
if (client:GetPos():DistToSqr(v:GetPos()) < 100 * 100) then
return true
Expand Down

0 comments on commit 973f50e

Please sign in to comment.