Override has_crafting_table from mineclonia to fix AP crafting grid not working in Mineclonia
This commit is contained in:
parent
c3fc378547
commit
dc1635cd2a
@ -462,3 +462,7 @@ function logistica.access_point_on_dug(pos)
|
||||
logistica.access_point_on_player_leave(playerName)
|
||||
end
|
||||
end
|
||||
|
||||
function logistica.access_point_is_player_using_ap(playerName)
|
||||
return accessPointForms[playerName] ~= nil
|
||||
end
|
||||
|
@ -53,3 +53,15 @@ logistica.itemstrings = {
|
||||
lava_source = mcl and "mcl_core:lava_source" or "default:lava_source",
|
||||
paper = mcl and "mcl_core:paper" or "default:paper"
|
||||
}
|
||||
|
||||
-- function overrides
|
||||
if mcl_crafting_table and mcl_crafting_table.has_crafting_table and type(mcl_crafting_table.has_crafting_table) == "function" then
|
||||
local has_crafting_table_orig = mcl_crafting_table.has_crafting_table
|
||||
mcl_crafting_table.has_crafting_table = function(player)
|
||||
if logistica.access_point_is_player_using_ap(player:get_player_name()) then
|
||||
return true
|
||||
else
|
||||
return has_crafting_table_orig(player)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user