Difference between revisions of "Turtle.refuel"
From ComputerCraft Wiki
SuicidalSTDz (Talk | contribs) m (Added a command-line example of turtle.refuel since users are clueless about it's existance) |
|||
Line 12: | Line 12: | ||
|code=turtle.refuel( 4 ) | |code=turtle.refuel( 4 ) | ||
|output=Tries to refuel with up to 4 items, returns true if it is a fuel and false if not. | |output=Tries to refuel with up to 4 items, returns true if it is a fuel and false if not. | ||
+ | }} | ||
+ | {{Example | ||
+ | |desc=Fuels itself using all inventory slots (1, 16) | ||
+ | |code=refuel all | ||
+ | |output=To complete | ||
}} | }} | ||
}} | }} |
Revision as of 15:44, 8 April 2013
Function turtle.refuel | |
Fills the turtle with fuel. | |
Syntax | turtle.refuel(count) |
Returns | boolean true if fuel, else false. |
Part of | ComputerCraft |
API | turtle |
Examples
Example | |
Fills the turtle with fuel | |
Code |
turtle.refuel( 4 ) |
Output | Tries to refuel with up to 4 items, returns true if it is a fuel and false if not. |
Example | |
Fuels itself using all inventory slots (1, 16) | |
Code |
refuel all |
Output | To complete |
Fuel Values
Fuel values for different items.
Item | Movement gained | Added by |
---|---|---|
Biofuel Can | 520 | IndustrialCraft |
Scrap | 15 | IndustrialCraft |
Coalfuel Can | 1520 | IndustrialCraft |
Wooden Scaffolding | 15 | IndustrialCraft |
Peat | 80 | Forestry |
Sugar Cane | 0 | Vanilla |
Wooden Tools | 10 | Vanilla |
Lava | 1000 | Vanilla |
Blaze Rod | 120 | Vanilla |
Wood Blocks | 15 | Vanilla |
Sticks | 5 | Vanilla |
Coal/Charcoal | 80 | Vanilla |
Mushroom Blocks | 15 | Vanilla |
Coal Coke | 320 | Railcraft |
1.41:
The formula for calculating the movement gain from a fuel is "((fuel / 100) * 6)". Where fuel is the items burn time in ticks in a regular furnace and "/" is integer division.
1.42+:
Formula changed to ((fuel * 6) / 100). This will give more accurate movement values.
1.48:
Formula changed to ((fuel * 5) / 100)