TABLE OF CONTENTS
- 1. CUI4/CUI4.Sort_Crafting_Command
- 2. CUI4/CUI4.Show_Set_Recipe_Command
- 3. CUI4/CUI4.Show_Recipe_Info_Command
- 4. CUI4/CUI4.Show_Crafting_Command
- 5. CUI4/CUI4.Set_Crafting_Command
- 6. CUI4/CUI4.Is_Craftable
- 7. CUI4/CUI4.Check_Tool
- 8. CUI4/CUI4.Check_Study_Prerequisites
- 9. CUI4/CUI4.Studies
- 10. CUI4/CUI4.Recipes_Table
- 11. CUI4/CUI4.Recipes_Sort_Order
- 12. CUI4/CUI4.Recipes_Indexes
- 13. CUI4/CUI4.Deconstructs
- 14. CUI4/CUI4.Default_Recipes_Sort_Order
- 15. CUI4/CUI4.Recipes_Sort_Orders
CUI4/CUI4.Recipes_Sort_Orders [ Types ]
FUNCTION
Sorting orders for the crafting recipes list
SOURCE
type Recipes_Sort_Orders is (NAMEASC, NAMEDESC, WORKPLACEASC, WORKPLACEDESC, TOOLSASC, TOOLSDESC, MATERIALSASC, MATERIALSDESC, NONE) with Default_Value => NONE;
OPTIONS
NAMEASC - Sort recipes by name ascending NAMEDESC - Sort recipes by name descending WORKPLACEASC - Sort recipes by workshop state ascending WORKPLACEDESC - Sort recipes by workshop state descending TOOLSASC - Sort recipes by available tool ascending TOOLSDESC - Sort recipes by available tool descending MATERIALSASC - Sort recipes by available materials ascending MATERIALSDESC - Sort recipes by available materials descending NONE - No sorting recipes (default)
HISTORY
6.5 - Added
CUI4/CUI4.Default_Recipes_Sort_Order [ Constants ]
[ Top ] [ CUI4 ] [ Constants ]
FUNCTION
Default sorting order for the crafting recipes
SOURCE
Default_Recipes_Sort_Order: constant Recipes_Sort_Orders := NONE;
HISTORY
6.5 - Added
CUI4/CUI4.Deconstructs [ Variables ]
[ Top ] [ CUI4 ] [ Variables ]
FUNCTION
The list of available deconstruct recipes
SOURCE
Deconstructs: Positive_Container.Vector;
CUI4/CUI4.Recipes_Indexes [ Variables ]
[ Top ] [ CUI4 ] [ Variables ]
FUNCTION
Indexes of available indexes of crafting recipes
SOURCE
Recipes_Indexes: TinyString_Container.Vector;
CUI4/CUI4.Recipes_Sort_Order [ Variables ]
[ Top ] [ CUI4 ] [ Variables ]
FUNCTION
The current sorting order for crafting recipes list
SOURCE
Recipes_Sort_Order: Recipes_Sort_Orders := Default_Recipes_Sort_Order;
HISTORY
6.5 - Added
CUI4/CUI4.Recipes_Table [ Variables ]
[ Top ] [ CUI4 ] [ Variables ]
FUNCTION
Table with info about available crafting recipes
SOURCE
Recipes_Table: Table_Widget (Amount => 4);
CUI4/CUI4.Studies [ Variables ]
[ Top ] [ CUI4 ] [ Variables ]
FUNCTION
The list of available study recipes
SOURCE
Studies: Positive_Container.Vector;
CUI4/CUI4.Check_Study_Prerequisites [ Subprograms ]
[ Top ] [ CUI4 ] [ Subprograms ]
FUNCTION
Check if the study and decontruct recipes can be crafted
SOURCE
procedure Check_Study_Prerequisites (Can_Craft, Has_Tool, Has_Workplace: out Boolean) is
PARAMETERS
Can_Craft - If recipe can be crafter then it will be True, otherwise False Has_Tool - If there is tool for the study and deconstruct recipes then True, otherwise False Has_Workplace - If there is workplace for study and deconstruct recipes then True, otherwise False
OUTPUT
Parameters Can_Craft, Has_Tool and Has_Workplace
CUI4/CUI4.Check_Tool [ Subprograms ]
[ Top ] [ CUI4 ] [ Subprograms ]
FUNCTION
Check if the player has needed tool for the crafting recipe
SOURCE
function Check_Tool (Tool_Needed: Tiny_String.Bounded_String) return Boolean is
PARAMETERS
Tool_Needed - The type of tool needed for the recipe
RESULT
True if the tool is in the player ship cargo, otherwise False
CUI4/CUI4.Is_Craftable [ Subprograms ]
[ Top ] [ CUI4 ] [ Subprograms ]
FUNCTION
Check if the selected recipe can be crafted (has all requirements meet)
SOURCE
procedure Is_Craftable (Recipe: Craft_Data; Can_Craft, Has_Workplace, Has_Tool, Has_Materials: out Boolean) is
PARAMETERS
Recipe - The crafting recipe to check Can_Craft - If recipe can be crafted, then it will be True, otherwise False Has_Workplace - If there is workplace for the recipe, will be True, otherwise False Has_Tool - If there is available tool for the recipe, will be True, otherwise False Has_Materials - If there are available materials for the recipe, will be True, otherwise False
OUTPUT
Parameters Can_Craft, Has_Workplace, Has_Tool and Has_Materials
CUI4/CUI4.Set_Crafting_Command [ Commands ]
FUNCTION
Set the selected recipe as a crafting order in the selected workshop
SOURCE
function Set_Crafting_Command (Client_Data: Integer; Interp: Tcl.Tcl_Interp; Argc: Interfaces.C.int; Argv: CArgv.Chars_Ptr_Ptr) return Interfaces.C.int with Convention => C;
PARAMETERS
Client_Data - Custom data send to the command. Unused Interp - Tcl interpreter in which command was executed. Argc - Number of arguments passed to the command. Unused Argv - Values of arguments passed to the command. Unused
RESULT
This function always return TCL_OK
COMMANDS
SetCrafting index Index is the index of the crafting recipe to set
CUI4/CUI4.Show_Crafting_Command [ Commands ]
FUNCTION
Show information about available crafting recipes
SOURCE
function Show_Crafting_Command (Client_Data: Integer; Interp: Tcl.Tcl_Interp; Argc: Interfaces.C.int; Argv: CArgv.Chars_Ptr_Ptr) return Interfaces.C.int with Convention => C;
PARAMETERS
Client_Data - Custom data send to the command. Unused Interp - Tcl interpreter in which command was executed. Argc - Number of arguments passed to the command. Argv - Values of arguments passed to the command.
RESULT
This function always return TCL_OK
COMMANDS
ShowCrafting page recipename Page is the current page of recipes list to show, recipename is the text which will be searching in the recipes names. Can be empty, then show all recipes.
CUI4/CUI4.Show_Recipe_Info_Command [ Commands ]
FUNCTION
Show information about the selected recipe
SOURCE
function Show_Recipe_Info_Command (Client_Data: Integer; Interp: Tcl.Tcl_Interp; Argc: Interfaces.C.int; Argv: CArgv.Chars_Ptr_Ptr) return Interfaces.C.int with Convention => C;
PARAMETERS
Client_Data - Custom data send to the command. Unused Interp - Tcl interpreter in which command was executed. Argc - Number of arguments passed to the command. Unused Argv - Values of arguments passed to the command.
RESULT
This function always return TCL_OK
COMMANDS
ShowRecipeInfo index cancraft Index is the index of the crafting recipe to show, cancraft if TRUE then recipe can be crafted (show craft button)
CUI4/CUI4.Show_Set_Recipe_Command [ Commands ]
FUNCTION
Show dialog to set the selected recipe as crafting order
SOURCE
function Show_Set_Recipe_Command (Client_Data: Integer; Interp: Tcl.Tcl_Interp; Argc: Interfaces.C.int; Argv: CArgv.Chars_Ptr_Ptr) return Interfaces.C.int with Convention => C;
PARAMETERS
Client_Data - Custom data send to the command. Unused Interp - Tcl interpreter in which command was executed. Argc - Number of arguments passed to the command. Unused Argv - Values of arguments passed to the command.
RESULT
This function always return TCL_OK
COMMANDS
SetRecipe index Index is the index of the recipe to craft.
CUI4/CUI4.Sort_Crafting_Command [ Commands ]
FUNCTION
Sort the list of crafting recipes
SOURCE
function Sort_Crafting_Command (Client_Data: Integer; Interp: Tcl.Tcl_Interp; Argc: Interfaces.C.int; Argv: CArgv.Chars_Ptr_Ptr) return Interfaces.C.int with Convention => C;
PARAMETERS
Client_Data - Custom data send to the command. Interp - Tcl interpreter in which command was executed. Argc - Number of arguments passed to the command. Unused Argv - Values of arguments passed to the command.
RESULT
This function always return TCL_OK
COMMANDS
SortCrafting x X is X axis coordinate where the player clicked the mouse button