TABLE OF CONTENTS
- 1. Goals/Goals
- 1.1. Goals/GUI
- 1.1.1. GUI/GUI.Add_Commands
- 1.1.2. GUI/GUI.Set_Goal_Command
- 1.1.3. GUI/GUI.Show_Goals_Command
- 1.2. Goals/Goals.GoalTypes
- 1.3. Goals/Goals.Goal_Data
- 1.4. Goals/Goals.Default_Goal_Type
- 1.5. Goals/Goals.Empty_Goal
- 1.6. Goals/Goals.Clear_Current_Goal
- 1.7. Goals/Goals.Goal_Text
Goals/Goals [ Packages ]
FUNCTION
Provide code for manipulate goals
SOURCE
package Goals is
Goals/Goals.GoalTypes [ 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 ]
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