stop being drunk or poisoned after drinking bucket of milk

main
tenplus1 2020-06-20 21:43:42 +01:00
parent 95ae8a2894
commit 250cbeca55
1 changed files with 7 additions and 0 deletions

View File

@ -493,6 +493,13 @@ function stamina.eat(hp_change, replace_with_item, itemstack, user, pointed_thin
texture = texture,
})
-- if player drinks bucket of milk then stop poison and being drunk
if itemstack:get_name() == "mobs:bucket_milk" then
stamina.players[name].poisoned = 0
stamina.players[name].drunk = 0
end
itemstack:take_item()
if replace_with_item then