Jump to content

Recipe.OnTest.FullLiquor Typo


Chuckleberry Finn

Recommended Posts

-- checks to make sure using Liquor ro make a Molotov Cocktail requires a full bottle; could be changed to a set amount so the game could have mini-bottles of liquor, for example.
function Recipe.OnTest.FullLiquor(item)
    if not item:hasTag("Liquor") then return true end
    return not (math.abs(item:getBaseHunger()) > math.abs(item:getHungerChange()))
end
-- checks to make sure using Liquor ro make a Molotov Cocktail requires a full bottle; could be changed to a set amount so the game could have mini-bottles of liquor, for example.
function Recipe.OnTest.FullLiquor(item)
    if not item:hasTag("Petrol") then return true end
    return item:getUsedDelta() == 1
end


`server/recipecode`


I think the second should be FullPetrol as the function name?

Also, unsure/unrelated but I don't see a getTypes for lowAlcohol - but alot of items seems to interchange alcoholicBeverage and lowAlcohol so I'm not sure if those tags are for things that can be or are alcoholic. Wine has neither liquor or alcoholic tags.

Edited by Chuckleberry Finn
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...