Changes

Jump to navigation Jump to search
307 bytes added ,  13:40, 23 August 2022
Add exact regeneration speed from code
Line 7: Line 7:  
Energy can be replenished up to its [[#Maximum Energy|maximum]] by eating positive-energy food. Consuming negative-energy foods such as [[Sap]] or [[Void Mayonnaise]] reduces energy. To consume food, put it on the hotbar (the top row of inventory) and press action ({{key|right-click}}) with it. A notification in the bottom left of the screen will display energy and health gained by eating food. Typically, more expensive food provides more energy than cheaper food items.
 
Energy can be replenished up to its [[#Maximum Energy|maximum]] by eating positive-energy food. Consuming negative-energy foods such as [[Sap]] or [[Void Mayonnaise]] reduces energy. To consume food, put it on the hotbar (the top row of inventory) and press action ({{key|right-click}}) with it. A notification in the bottom left of the screen will display energy and health gained by eating food. Typically, more expensive food provides more energy than cheaper food items.
   −
Standing in the [[Spa]] also restores energy. In a [[Multiplayer]] game, players may slowly restore energy by standing in bed. (If the "Go to bed" dialogue pops up, answer "No", and remain in place.)
+
Standing in the [[Spa]] also restores energy (10 points per second)<ref name="sparegenerationspeed" />. In a [[Multiplayer]] game, players may slowly restore energy by standing in bed (2 points per second)<ref name="bedregenerationspeed" />. (If the "Go to bed" dialogue pops up, answer "No", and remain in place.)
    
==Exhaustion==
 
==Exhaustion==
Line 99: Line 99:  
<ref name="swimming">The effects of the [[Spa]]/swimming are handled in <samp>Farmer::updateCommon</samp>, specifically in <samp>if (this.swimming)</samp>. It Checks whether the player has not moved in 800ms and at least 100ms has passed and increases health and energy by 1.</ref>
 
<ref name="swimming">The effects of the [[Spa]]/swimming are handled in <samp>Farmer::updateCommon</samp>, specifically in <samp>if (this.swimming)</samp>. It Checks whether the player has not moved in 800ms and at least 100ms has passed and increases health and energy by 1.</ref>
 
<ref name="multiplayer_bed">The effects of a multiplayer bed are handled in <samp>Farmer::Update</samp>, specifically in <samp>if (this.isInBed && Game1.IsMultiplayer && Game1.shouldTimePass(false))</samp>. It Checks whether at least 500ms has passed and increases health and energy by 1.</ref>
 
<ref name="multiplayer_bed">The effects of a multiplayer bed are handled in <samp>Farmer::Update</samp>, specifically in <samp>if (this.isInBed && Game1.IsMultiplayer && Game1.shouldTimePass(false))</samp>. It Checks whether at least 500ms has passed and increases health and energy by 1.</ref>
 +
    <ref name="sparegenerationspeed">See <samp>Farmer::updateCommon</samp> in the game code.</ref>
 +
    <ref name="bedregenerationspeed">See <samp>Farmer::Update</samp> in the game code.</ref>
 
</references>
 
</references>
  
3

edits

Navigation menu