// Priority is set to -50 to ensure that all integration is completed before stage initialization. CrT recipes should be registered prior
// to this point. The actual staging script will fire at priority -99.
#priority -40

import crafttweaker.item.IIngredient;
import crafttweaker.enchantments.IEnchantmentDefinition;

import scripts.gamestages.classes.gamestage.GameStage;

static stageName as string = "profession_mastery";

/**
 *  List of modids that will be staged. Specific unstaged items can be specified in the stagedNamesBlacklist.
 */
static stagedMods as string[] = [];

/**
 *  Staged items.
 */
static stagedItems as IIngredient[] = [
	<contenttweaker:essence_engineering>,
	<waterstrainer:super_worm>,
	<theoneprobe:creativeprobe>,
	<enderio:block_buffer:3>,
	<enderio:block_cap_bank:0>,
	<appliedenergistics2:creative_energy_cell>,
	<immersiveengineering:metal_device0:3>,
	<storagedrawers:upgrade_creative:0>
];

/**
 *  Names of recipes that will be staged. These only need to be set if there are different recipes for the same item in different stages.
 */
static stagedRecipeNames as string[] = [];

/**
 * Mobs that will only spawn around players with this stage unlocked.
 */
static stagedMobs as string[] = [];

/**
 *  Enchantments that will only appear if the player has this stage.
 */
static stagedEnchants as IEnchantmentDefinition[] = [];

/**
 *  JEI categories that will be hidden until the player unlocks this stage.
 */
static stagedJeiCategories as string[] = [];

/**
 *  The partial names of any items that will be exluded during mod staging. This is useful to keep saplings or wood unstaged.
 */
static stagedNamesBlacklist as string[] = [];

/**
 *  The partial names of any items that will be excluded from any blacklist overlap. This is useful to ensure specific items are staged when there is overlap.
 */
static stagedNamesWhitelist as string[] = [];

/**
 *  This function does not actually stage the items. It is used to create the GameStage object that will be used during the actual staging.
 */
function initStage() as GameStage {
    val stage = GameStage(stageName);

    stage.setStagedMods(stagedMods);
    stage.setStagedItems(stagedItems);
    stage.setStagedRecipeNames(stagedRecipeNames);
    stage.setStagedMobs(stagedMobs);
    stage.setStagedEnchants(stagedEnchants);
    stage.setStagedJeiCategories(stagedJeiCategories);

    stage.setNamesBlacklist(stagedNamesBlacklist);
    stage.setNamesWhitelist(stagedNamesWhitelist);

    return stage;
}