]> git.lizzy.rs Git - Crafter.git/commitdiff
Make satiation set the satiation level to the food satiation
authoroilboi <47129783+oilboi@users.noreply.github.com>
Mon, 25 May 2020 19:52:38 +0000 (15:52 -0400)
committeroilboi <47129783+oilboi@users.noreply.github.com>
Mon, 25 May 2020 19:52:38 +0000 (15:52 -0400)
README.md
mods/hunger/init.lua

index 970ff6e9d37852802a010d4e9490bb99bd782f18..9d664ae1ce0914e9b1bd40dc9c42c3ae2f2907dc 100644 (file)
--- a/README.md
+++ b/README.md
@@ -221,6 +221,7 @@ enable_mod_channels = true
 - enchanting/upgrading
 - magic (wands, spells, etc)
 - better combat ( sweep hit enemies, falling while hitting deals more damage )
+- Enchanting food - gives buffs
 
 
 ---
@@ -268,8 +269,7 @@ enable_mod_channels = true
 
 
 ### Fishing
-- have a rod that you can cast into water
-- bobber entity which goes under water when fish on line
+- enchanted fish
 
 
 ---
@@ -279,11 +279,9 @@ enable_mod_channels = true
 
 > These don't seem to fit into any theme so list them all here
 
-- sugar and sugar cane (grow near water on sand)
 - rope and tnt arrows
 - vehicles (car, powered minecarts, trains)
 - hitscan flintlocks
-- bows
 
 
 ---
@@ -298,7 +296,6 @@ enable_mod_channels = true
 - upgrade minecart physics even more 
 - make torches abm that checks if player in area
 - make furnace abm that checks if player in area
-- 3d character
 - make tnt hurt player
 - rewrite minecart
 - fix tool rightclick torch placement to replace buildable to nodes
index c4707ffa57c2b56cc9654723dbb93f4667eaca3e..ed6e02ed1942cdd41d331af4846077bcddd38e35 100644 (file)
@@ -71,6 +71,8 @@ local function hunger_update()
                        local hunger = meta:get_int("hunger")
                        local exhaustion_tick = meta:get_int("exhaustion_tick")
                        
+                       print(satiation)
+
                        --movement states
                        local movement_state =  meta:get_string("player.player_movement_state")
                        local running = (movement_state == "1")
@@ -225,11 +227,8 @@ function minetest.eat_food(player,item)
                        player_hunger = 20
                end
        end
-       if player_satiation < 20 then
-               player_satiation = player_satiation + satiation
-               if player_satiation > 20 then
-                       player_satiation = 20
-               end
+       if player_satiation < satiation then
+               player_satiation =  satiation
        end
        
        meta:set_int("exhaustion_tick", 0)