|
|
@ -34,7 +34,7 @@ function Quantum.Server.Crafting.MakeItem( pl, itemid ) |
|
|
|
if( canMake ) then |
|
|
|
if( canMake ) then |
|
|
|
|
|
|
|
|
|
|
|
cancelCrafting( pl ) -- stop the crafting if the player is allready crafting something |
|
|
|
cancelCrafting( pl ) -- stop the crafting if the player is allready crafting something |
|
|
|
|
|
|
|
|
|
|
|
-- and then craft this item instead |
|
|
|
-- and then craft this item instead |
|
|
|
setPlayerIsCrafting( pl, true ) |
|
|
|
setPlayerIsCrafting( pl, true ) |
|
|
|
|
|
|
|
|
|
|
@ -44,9 +44,13 @@ function Quantum.Server.Crafting.MakeItem( pl, itemid ) |
|
|
|
|
|
|
|
|
|
|
|
for k, reqItem in pairs( recipe.recipe ) do |
|
|
|
for k, reqItem in pairs( recipe.recipe ) do |
|
|
|
print( "##", k, reqItem.item ) |
|
|
|
print( "##", k, reqItem.item ) |
|
|
|
|
|
|
|
Quantum.Server.Inventory.RemoveSlotItem( pl, char, k, reqItem.amount ) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
-- create item |
|
|
|
-- create item |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quantum.Server.Inventory.GiveItem( pl, recipe.creates, recipe.amount ) |
|
|
|
|
|
|
|
|
|
|
|
end) |
|
|
|
end) |
|
|
|
|
|
|
|
|
|
|
|
else |
|
|
|
else |
|
|
|