TABLE OF CONTENTS
Ships/SCargo [ Packages ]
[ Top ] [ Ships ] [ Packages ]
FUNCTION
Provides code to manipulate ships cargos
SOURCE
package Ships.Cargo is
SCargo/SCargo.Free_Cargo [ Subprograms ]
[ Top ] [ SCargo ] [ Subprograms ]
FUNCTION
Check how much is free space in cargo of selected ship
SOURCE
function Free_Cargo (Amount: Integer; Ship: Ship_Record := Player_Ship) return Integer;
PARAMETERS
Amount - Amount of kilograms to add or delete before count free cargo space Ship - Ship in which cargo will be check for free space. Default is player ship
RESULT
Amount of free cargo space in kilograms after add or remove Amount of kilograms
SCargo/SCargo.Update_Cargo [ Subprograms ]
[ Top ] [ SCargo ] [ Subprograms ]
FUNCTION
Update selected item in ship cargo
SOURCE
procedure Update_Cargo (Ship: in out Ship_Record; Proto_Index: Natural := 0; Amount: Integer; Durability: Items_Durability := Default_Item_Durability; Cargo_Index, Price: Natural := 0) with Pre => Cargo_Index <= Inventory_Container.Last_Index(Container => Ship.Cargo);
PARAMETERS
Ship - Ship which cargo will be updated Proto_Index - Prototype index of the item which will be modified. Can be empty if CargoIndex is set Amount - Amount of item to add or delete from cargo Durability - Durability of item to modify. Can be empty Cargo_Index - Ship cargo index of the item which will be modified. Can be empty if ProtoIndex is set Price - Price of the item which will be modified
RESULT
Parameter Ship