TABLE OF CONTENTS


Bases/BCargo [ Packages ]

[ Top ] [ Bases ] [ Packages ]

FUNCTION

 Provide code for manipulate cargo of sky bases

SOURCE

package Bases.Cargo is

BCargo/BCargo.Find_Base_Cargo [ Subprograms ]

[ Top ] [ BCargo ] [ Subprograms ]

FUNCTION

 Find index of item in base cargo

SOURCE

   function Find_Base_Cargo
     (Proto_Index: Natural;
      Durability: Items_Durability := Items_Durability'Last)
      return Natural with
      Pre => Proto_Index > 0;

PARAMETERS

 Proto_Index - Index of prototype of item to search
 Durability  - Durability of item to search. Can be empty

RESULT

 Index of item in sky base cargo or 0 if item not found

BCargo/BCargo.Update_Base_Cargo [ Subprograms ]

[ Top ] [ BCargo ] [ Subprograms ]

FUNCTION

 Update cargo in base

SOURCE

   procedure Update_Base_Cargo
     (Proto_Index: Natural := 0; Amount: Integer;
      Durability: Items_Durability := Default_Item_Durability;
      Cargo_Index: Inventory_Container.Extended_Index := 0);

PARAMETERS

 Proto_Index - Index of item prototype. Can be empty if Cargo_Index is set
 Amount      - Amount of item to add or remove
 Durability  - Durability of item to add or remove. Can be empty
 Cargo_Index - Index of item in sky base cargo. Can be empty if Proto_Index
               is set