TABLE OF CONTENTS


Goals/Goals [ Packages ]

[ Top ] [ Packages ]

FUNCTION

 Provide code for manipulate goals

SOURCE

package Goals is

Goals/Goals.GoalTypes [ Types ]

[ Top ] [ Goals ] [ Types ]

FUNCTION

 Types of goals

SOURCE

   type Goal_Types is
     (RANDOM, REPUTATION, DESTROY, DISCOVER, VISIT, CRAFT, MISSION, KILL) with
      Default_Value => RANDOM;

Goals/Goals.Goal_Data [ Records ]

[ Top ] [ Goals ] [ Records ]

FUNCTION

 Data structure for each goal

SOURCE

   type Goal_Data is record
      Index: Unbounded_String;
      G_Type: Goal_Types;
      Amount: Natural;
      Target_Index: Unbounded_String;
      Multiplier: Positive;
   end record;

PARAMETERS

 Index        - Index of goal
 G_Type       - Type of goal
 Amount       - Amount of targets needed for finish goal
 Target_Index - Index of target needed for finish goal. If empty, mean all
                targets selected type (bases, ships, etc)
 Multiplie r  - Multiplier for points awarded for finish this goal

Goals/Goals.Default_Goal_Type [ Constants ]

[ Top ] [ Goals ] [ Constants ]

FUNCTION

 Default goal type, random type

SOURCE

   Default_Goal_Type: constant Goal_Types := RANDOM;

Goals/Goals.Empty_Goal [ Constants ]

[ Top ] [ Goals ] [ Constants ]

FUNCTION

 Default value for Goal_Data, an empty goal data

SOURCE

   Empty_Goal: constant Goal_Data := (others => <>);

Goals/Goals.Clear_Current_Goal [ Subprograms ]

[ Top ] [ Goals ] [ Subprograms ]

FUNCTION

 Reset current goal

SOURCE

   procedure Clear_Current_Goal;

Goals/Goals.Goal_Text [ Subprograms ]

[ Top ] [ Goals ] [ Subprograms ]

FUNCTION

 Get info about selected goal

SOURCE

   function Goal_Text(Index: Natural) return String with
      Post => Goal_Text'Result'Length > 0;

PARAMETERS

 Index - Index of goal from which we take info. If 0 then get info for
         current goal

RESULT

 Info about selected goal