Editors Note: Does this ever return nil? (Star Weaver Dec 2010)
Functions Documentation | |
Name | shpRefuelFromItem |
Syntax | (shpRefuelFromItem ship itemStruct) |
Argument List | ship: The ship that want to refuel from an item. itemStruct: The item you want to use. |
Returns | boolean: True if successful, Nil otherwise. |
Category | fuel, ship, item |
Description | Refuels the ship from the given item struct. |
Example |
(shpRefuelFromItem gplayership (itmCreate &itHelium3FuelRod; 1)) Adds 2500 to the player's fuel. |
Comment | This function is not limited by reactor fuel level limits; it must be guarded by shpIsFuelCompatable if enforcing those limits is deisred. The item struct is just used to determine the quantity of fuel to add; the items provided are not removed from the ship and need not even be present. |