// 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 -50

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

import scripts.gamestages.classes.gamestage.GameStage;

static stageName as string = "dark_engineering";

/**
 *  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[] = [
	// ender io
	<enderio:item_end_steel_pickaxe:*>,
	<enderio:item_end_steel_axe:*>,
	<enderio:item_end_steel_sword:*>,
	<enderio:item_end_steel_helmet:*>,
	<enderio:item_end_steel_chestplate:*>,
	<enderio:item_end_steel_leggings:*>,
	<enderio:item_end_steel_boots:*>,
	<enderio:item_end_steel_shield:*>,
	<enderio:item_end_steel_bow:*>,
	<enderio:item_dark_steel_pickaxe:*>,
	<enderio:item_dark_steel_axe:*>,
	<enderio:item_dark_steel_sword:*>,
	<enderio:item_dark_steel_helmet:*>,
	<enderio:item_dark_steel_chestplate:*>,
	<enderio:item_dark_steel_leggings:*>,
	<enderio:item_dark_steel_boots:*>,
	<enderio:item_dark_steel_shield:*>,
	<enderio:item_dark_steel_bow:*>,
	<enderio:item_dark_steel_crook:*>,
	<enderio:item_dark_steel_hand:*>,
	<enderio:item_dark_steel_shears:*>,
	<enderio:item_dark_steel_upgrade:*>,
	<enderio:item_inventory_charger_simple:*>,
	<enderio:item_inventory_charger_basic:*>,
	<enderio:item_inventory_charger:*>,
	<enderio:item_alloy_ball:*>,
	<enderio:item_inventory_charger_vibrant:*>,
	<enderio:item_power_conduit:*>,
	<enderio:item_magnet:*>,
	<enderio:block_detector_block:*>,
	<enderio:block_detector_block_silent:*>,
	<enderio:block_enhanced_alloy_smelter:*>,
	<enderio:block_buffer:*>,
	<enderio:block_enhanced_combustion_generator:*>,
	<enderio:block_lava_generator:*>,
	<enderio:block_sag_mill:*>,
	<enderio:block_enhanced_sag_mill:*>,
	<enderio:block_solar_panel:3>,
	<enderio:block_enhanced_vat:*>,
	<enderio:block_impulse_hopper:*>,
	<enderio:block_cap_bank:3>,
	<enderio:block_power_monitor:*>,
	<enderio:block_advanced_power_monitor:*>,
	<enderio:block_niard:*>,
	<enderio:block_enhanced_wired_charger:*>,
	<enderio:item_me_conduit:*>,
	
	// spartan stuff
	<spartanshields:shield_riot_enderio:*>
];

/**
 *  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[] = [
	"LavaGenerator",
	"GrindingBall"
];

/**
 *  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;
}