TABLE OF CONTENTS
- 1. Crafts/Crafts
- 1.1. Crafts/CUI4
- 1.1.1. CUI4/CUI4.Recipes_Sort_Orders
- 1.1.2. CUI4/CUI4.Default_Recipes_Sort_Order
- 1.1.3. CUI4/CUI4.Deconstructs
- 1.1.4. CUI4/CUI4.Recipes_Indexes
- 1.1.5. CUI4/CUI4.Recipes_Sort_Order
- 1.1.6. CUI4/CUI4.Recipes_Table
- 1.1.7. CUI4/CUI4.Studies
- 1.1.8. CUI4/CUI4.Add_Commands
- 1.1.9. CUI4/CUI4.Check_Study_Prerequisites
- 1.1.10. CUI4/CUI4.Check_Tool
- 1.1.11. CUI4/CUI4.Is_Craftable
- 1.1.12. CUI4/CUI4.Set_Crafting_Command
- 1.1.13. CUI4/CUI4.Show_Crafting_Command
- 1.1.14. CUI4/CUI4.Show_Recipe_Info_Command
- 1.1.15. CUI4/CUI4.Show_Set_Recipe_Command
- 1.1.16. CUI4/CUI4.Sort_Crafting_Command
- 1.2. Crafts/Crafts.Craft_Data
- 1.3. Crafts/Crafts.Check_Recipe
- 1.4. Crafts/Crafts.Set_Recipe
- 1.5. Crafts/Crafts.Set_Recipe_Data
Crafts/Crafts [ Packages ]
FUNCTION
Provide code for crafting
SOURCE
package Crafts is
Crafts/Crafts.Craft_Data [ Records ]
[ Top ] [ Crafts ] [ Records ]
FUNCTION
Data structure for recipes
SOURCE
type Craft_Data is record Material_Types: TinyString_Container.Vector; Material_Amounts: Positive_Container.Vector; Result_Index: Natural; Result_Amount: Natural := 0; Workplace: Module_Type; Skill: SkillsData_Container.Extended_Index; Time: Positive := 1; Difficulty: Positive := 1; Tool: Tiny_String.Bounded_String; Reputation: Reputation_Range; Tool_Quality: Positive := 1; end record;
PARAMETERS
Material_Types - Types of material needed for recipe Material_Amounts - Amounts of material needed for recipe Result_Index - Prototype index of crafted item Result_Amount - Amount of products Workplace - Ship module needed for crafting Skill - Skill used in crafting item Time - Minutes needed for finish recipe Difficulty - How difficult is recipe to discover Tool - Type of tool used to craft item Reputation - Minimal reputation in base needed to buy that recipe Tool_Quality - Minimal quality of tool needed to craft that recipe
Crafts/Crafts.Check_Recipe [ Subprograms ]
[ Top ] [ Crafts ] [ Subprograms ]
FUNCTION
Check if player have all requirements for selected recipe
SOURCE
function Check_Recipe (Recipe_Index: Tiny_String.Bounded_String) return Positive with Pre => Tiny_String.Length(Source => Recipe_Index) > 0;
PARAMETERS
Recipe_Index - Index of the prototype recipe to check or if deconstruct existing item, "Study " + item name.
RESULT
Max amount of items which can be craft
Crafts/Crafts.Set_Recipe [ Subprograms ]
[ Top ] [ Crafts ] [ Subprograms ]
FUNCTION
Set crafting recipe for selected workshop
SOURCE
procedure Set_Recipe (Workshop, Amount: Positive; Recipe_Index: Tiny_String.Bounded_String) with Pre => Workshop <= Player_Ship.Modules.Last_Index and Tiny_String.Length(Source => Recipe_Index) > 0;
PARAMETERS
Workshop - Index of player ship module (workplace) to which selected recipe will be set Amount - How many times the recipe will be crafted Recipe_Index - Index of the prototype recipe to check or if deconstruct existing item, "Study " + item name.
Crafts/Crafts.Set_Recipe_Data [ Subprograms ]
[ Top ] [ Crafts ] [ Subprograms ]
FUNCTION
Set crafting data for selected recipe
SOURCE
function Set_Recipe_Data (Recipe_Index: Tiny_String.Bounded_String) return Craft_Data;
PARAMETERS
Recipe_Index - Index of recipe from Recipes_List or full name of recipe for deconstructing
RESULT
Crafting data for selected recipe