Difference between revisions of "Turtle.refuel"
From ComputerCraft Wiki
(Corrected mapping from "Boolean" to "Boolean (type)") |
|||
Line 24: | Line 24: | ||
|- | |- | ||
| Biofuel Can | | Biofuel Can | ||
− | | | + | | 520 |
| IndustrialCraft | | IndustrialCraft | ||
|- | |- | ||
| Scrap | | Scrap | ||
− | | | + | | 15 |
| IndustrialCraft | | IndustrialCraft | ||
|- | |- | ||
| Coalfuel Can | | Coalfuel Can | ||
− | | | + | | 1520 |
| IndustrialCraft | | IndustrialCraft | ||
|- | |- | ||
| Wooden Scaffolding | | Wooden Scaffolding | ||
− | | | + | | 15 |
| IndustrialCraft | | IndustrialCraft | ||
|- | |- | ||
| Peat | | Peat | ||
− | | | + | | 80 |
| Forestry | | Forestry | ||
|- | |- | ||
Line 48: | Line 48: | ||
|- | |- | ||
| Wooden Tools | | Wooden Tools | ||
− | | | + | | 10 |
| Vanilla | | Vanilla | ||
|- | |- | ||
| Lava | | Lava | ||
− | | | + | | 1000 |
| Vanilla | | Vanilla | ||
|- | |- | ||
| Blaze Rod | | Blaze Rod | ||
− | | | + | | 120 |
| Vanilla | | Vanilla | ||
|- | |- | ||
| Wood Blocks | | Wood Blocks | ||
− | | | + | | 15 |
| Vanilla | | Vanilla | ||
|- | |- | ||
| Sticks | | Sticks | ||
− | | | + | | 5 |
| Vanilla | | Vanilla | ||
|- | |- | ||
| Coal/Charcoal | | Coal/Charcoal | ||
− | | | + | | 80 |
| Vanilla | | Vanilla | ||
|- | |- | ||
| Mushroom Blocks | | Mushroom Blocks | ||
− | | | + | | 15 |
| Vanilla | | Vanilla | ||
|- | |- | ||
| Coal Coke | | Coal Coke | ||
− | | | + | | 160 |
| Railcraft | | Railcraft | ||
|} | |} | ||
Line 87: | Line 87: | ||
1.42+: | 1.42+: | ||
− | Formula changed to ((fuel *6) / 100). | + | Formula changed to ((fuel * 6) / 100). |
This will give more accurate movement values. | This will give more accurate movement values. | ||
− | + | 1..48: | |
− | 1. | + | Formula changed to ((fuel * 5) / 100) |
− | + | == Trivia == | |
− | + | ||
[[Category:Lua_Core_Functions]] | [[Category:Lua_Core_Functions]] |
Revision as of 01:27, 23 December 2012
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. |
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 | 160 | 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)