TABLE OF CONTENTS
- 1. Bases/Ship
Bases/Ship [ Packages ]
[ Top ] [ Bases ] [ Packages ]
FUNCTION
Provides code to manipulate player ship in sky bases
SOURCE
package Bases.Ship is
Ship/Ship.Bases_Ship_Installation_Error [ Exceptions ]
[ Top ] [ Ship ] [ Exceptions ]
FUNCTION
Raised when problems with installing ship module occurs
SOURCE
Bases_Ship_Installation_Error: exception;
Ship/Ship.Bases_Ship_Removing_Error [ Exceptions ]
[ Top ] [ Ship ] [ Exceptions ]
FUNCTION
Raised when problems with removing ship module occurs
SOURCE
Bases_Ship_Removing_Error: exception;
Ship/Ship.Bases_Ship_Unique_Module [ Exceptions ]
[ Top ] [ Ship ] [ Exceptions ]
FUNCTION
Raised when player try install another same unique module
SOURCE
Bases_Ship_Unique_Module: exception;
Ship/Ship.Repair_Cost [ Subprograms ]
[ Top ] [ Ship ] [ Subprograms ]
FUNCTION
Count cost and time of repairs of player ship
SOURCE
procedure Repair_Cost (Cost, Time: in out Natural; Module_Index: Integer) with Pre => Module_Index in -2 .. Player_Ship.Modules.Last_Index, Post => Cost > 0 and Time > 0, Import => True, Convention => C, External_Name => "repairAdaCost";
PARAMETERS
Cost - Overall cost of repair of player ship Time - Time needed for repair of player ship Module_Index - Index of module on player ship to repair or 0 to repair all damage modules, -1 for fast repair all ship and -2 for very fast repair all ship
RESULT
Parameters Cost and Time
Ship/Ship.Repair_Ship [ Subprograms ]
[ Top ] [ Ship ] [ Subprograms ]
FUNCTION
Repairs player ship in bases
SOURCE
procedure Repair_Ship(Module_Index: Integer) with Pre => Module_Index <= Player_Ship.Modules.Last_Index;
PARAMETERS
Module_Index - Index of player ship module to repair or 0 to repair whole ship
Ship/Ship.Upgrade_Ship [ Subprograms ]
[ Top ] [ Ship ] [ Subprograms ]
FUNCTION
Install or remove modules on player ship
SOURCE
procedure Upgrade_Ship(Install: Boolean; Module_Index: Positive) with Pre => Module_Index in Player_Ship.Modules.First_Index .. Player_Ship.Modules.Last_Index;
PARAMETERS
Install - If True, perform module installation on player ship. On False, remove module Module_Index - Index of prototype module to install or remove