Created utility function to add circuit numbers to pre-existing recipes (#1320)
* - Yeast recipe conflict fix * - Fixed seed oil voiding in barrels. And item weight inconsistency. * - Reduced loading screen logo size by 4MB * - Update Changelog * - Compressed loading screen images to maybe help with ram * - Added default gui scale to make the main menu look better on first launch * - Update Changelog * - Added utility script for adding circuits to existing recipes * fixed changelog conflict Signed-off-by: Redeix <59435925+Redeix@users.noreply.github.com> --------- Signed-off-by: Redeix <59435925+Redeix@users.noreply.github.com>
This commit is contained in:
parent
4c2d71ad25
commit
911ede670a
3 changed files with 139 additions and 25 deletions
|
|
@ -1253,25 +1253,10 @@ const registerGTCEURecipes = (event) => {
|
|||
|
||||
//#region Circuit Fixes
|
||||
|
||||
//Adds circuit #1 to the tetrafluoroethylene_from_chloroform recipe
|
||||
event.findRecipes({ id: "gtceu:chemical_reactor/tetrafluoroethylene_from_chloroform" }).forEach(recipe => {
|
||||
const inputs = recipe.json.get("inputs");
|
||||
const itemArray = inputs.has("item") ? Java.from(inputs.get("item")) : [];
|
||||
|
||||
itemArray.push({
|
||||
content: {
|
||||
type: "gtceu:circuit",
|
||||
configuration: 1
|
||||
},
|
||||
chance: 0,
|
||||
maxChance: 10000,
|
||||
tierChanceBoost: 0
|
||||
});
|
||||
|
||||
inputs.add("item", itemArray);
|
||||
recipe.json.add("inputs", inputs);
|
||||
});
|
||||
|
||||
global.ADD_CIRCUIT.forEach(item => {
|
||||
addCircuitToRecipe(event, item.recipeId, item.circuitNumber)
|
||||
})
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region Chemical Reaction for Solar Panel
|
||||
|
|
|
|||
|
|
@ -1,5 +1,21 @@
|
|||
// priority: 0
|
||||
|
||||
//#region Mixer Recipes
|
||||
/**
|
||||
* Function for generating gtceu mixer recipes.
|
||||
* Adding a circuit is optional.
|
||||
*
|
||||
* @param {*} event
|
||||
* @param {string} input -Item
|
||||
* @param {string} fluid_input -Fluid
|
||||
* @param {string} output -Item
|
||||
* @param {number} circuit -0-32
|
||||
* @param {string} fluid_output -Fluid
|
||||
* @param {number} duration -Ticks
|
||||
* @param {number} EUt -GTValues.VA[]
|
||||
* @param {number} rpm -Depreciated
|
||||
* @param {string} id -Recipe ID
|
||||
*/
|
||||
const generateMixerRecipe = (event, input, fluid_input, output, circuit, fluid_output, duration, EUt, rpm, id) => {
|
||||
const recipe = event.recipes.gtceu.mixer(id)
|
||||
.itemInputs(input)
|
||||
|
|
@ -9,11 +25,26 @@ const generateMixerRecipe = (event, input, fluid_input, output, circuit, fluid_o
|
|||
.duration(duration)
|
||||
.EUt(EUt)
|
||||
|
||||
/**
|
||||
* Applies if circuit param is not empty
|
||||
*/
|
||||
if (circuit != null) {
|
||||
recipe.circuit(circuit)
|
||||
}
|
||||
}
|
||||
//#endregion
|
||||
|
||||
//#region Cutter Recipes
|
||||
/**
|
||||
* Function for generating gtceu cutter recipes.
|
||||
*
|
||||
* @param {*} event
|
||||
* @param {string} input -Item
|
||||
* @param {string} output -Item
|
||||
* @param {number} duration -Ticks
|
||||
* @param {number} EUt -GTValues.VA[]
|
||||
* @param {string} id -Recipe ID
|
||||
*/
|
||||
const generateCutterRecipe = (event, input, output, duration, EUt, id) => {
|
||||
|
||||
event.recipes.gtceu.cutter(`tfg:${id}`)
|
||||
|
|
@ -22,10 +53,23 @@ const generateCutterRecipe = (event, input, output, duration, EUt, id) => {
|
|||
.duration(duration)
|
||||
.EUt(EUt)
|
||||
}
|
||||
//#endregion
|
||||
|
||||
//#region Green House
|
||||
/**
|
||||
* Function for generating greenhouse recipes.
|
||||
*
|
||||
* @param {*} event
|
||||
* @param {string} input -Item
|
||||
* @param {number} fluid_amount -mB
|
||||
* @param {string} output -Item
|
||||
* @param {string} id -Recipe ID
|
||||
* @param {string} dimension -Dimension ID
|
||||
* @param {number} fertiliser_count
|
||||
*/
|
||||
const generateGreenHouseRecipe = (event, input, fluid_amount, output, id, dimension, fertiliser_count) => {
|
||||
|
||||
// Без удобрения
|
||||
// Без удобрения (Without fertilizer)
|
||||
let r = event.recipes.gtceu.greenhouse(id)
|
||||
.notConsumable(input)
|
||||
.circuit(1)
|
||||
|
|
@ -39,7 +83,7 @@ const generateGreenHouseRecipe = (event, input, fluid_amount, output, id, dimens
|
|||
if (dimension != null)
|
||||
r.dimension(dimension)
|
||||
|
||||
// С удобрением
|
||||
// С удобрением (With fertilizer)
|
||||
r = event.recipes.gtceu.greenhouse(`${id}_fertilized`)
|
||||
.notConsumable(input)
|
||||
.itemInputs(Item.of('gtceu:fertilizer', fertiliser_count))
|
||||
|
|
@ -54,7 +98,16 @@ const generateGreenHouseRecipe = (event, input, fluid_amount, output, id, dimens
|
|||
if (dimension != null)
|
||||
r.dimension(dimension)
|
||||
}
|
||||
//#endregion
|
||||
|
||||
//#region Filling NBT
|
||||
/**
|
||||
* Function to get fluid filling NBT.
|
||||
*
|
||||
* @param {string} material -Fluid
|
||||
* @param {number} amount -mB
|
||||
* @returns {{ tank: { FluidName: string; Amount: number; }; }}
|
||||
*/
|
||||
const getFillingNBT = (material, amount) => {
|
||||
return {
|
||||
tank: {
|
||||
|
|
@ -63,7 +116,15 @@ const getFillingNBT = (material, amount) => {
|
|||
}
|
||||
}
|
||||
}
|
||||
//#endregion
|
||||
|
||||
//#region Plated Blocks
|
||||
/**
|
||||
* Function for generating plated block recipes.
|
||||
*
|
||||
* @param {*} event
|
||||
* @param {GTMaterials} material
|
||||
*/
|
||||
function generatePlatedBlockRecipe(event, material) {
|
||||
// firmaciv plated blocks don't have this property
|
||||
let tfcProperty = material.getProperty(TFGPropertyKey.TFC_PROPERTY)
|
||||
|
|
@ -169,9 +230,50 @@ function generatePlatedBlockRecipe(event, material) {
|
|||
.category(GTRecipeCategories.ARC_FURNACE_RECYCLING)
|
||||
.EUt(GTValues.VA[GTValues.LV])
|
||||
}
|
||||
//#endregion
|
||||
|
||||
//#region forEachMaterial
|
||||
/**
|
||||
* Function for iterating through registered materials
|
||||
* {@link https://github.com/GregTechCEu/GregTech-Modern/blob/1.20.1/src/main/java/com/gregtechceu/gtceu/api/data/chemical/material/Material.java}
|
||||
*
|
||||
* @param {GTCEuAPI.materialManager.getRegisteredMaterials} iterator -Material
|
||||
*/
|
||||
function forEachMaterial(iterator) {
|
||||
for (var material of GTCEuAPI.materialManager.getRegisteredMaterials()) {
|
||||
iterator(material)
|
||||
}
|
||||
}
|
||||
}
|
||||
//#endregion
|
||||
|
||||
//#region Add Circuit
|
||||
/**
|
||||
* Function for adding circuit numbers for existing recipes
|
||||
*
|
||||
* Constants {@link global.ADD_CIRCUIT}
|
||||
*
|
||||
* @param {*} event
|
||||
* @param {string} recipeId -Recipe ID
|
||||
* @param {number} circuitNumber -0-32
|
||||
*/
|
||||
function addCircuitToRecipe(event, recipeId, circuitNumber) {
|
||||
|
||||
event.findRecipes({ id: recipeId }).forEach(recipe => {
|
||||
const inputs = recipe.json.get("inputs");
|
||||
const itemArray = inputs.has("item") ? Java.from(inputs.get("item")) : [];
|
||||
|
||||
itemArray.push({
|
||||
content: {
|
||||
type: "gtceu:circuit",
|
||||
configuration: circuitNumber
|
||||
},
|
||||
chance: 0,
|
||||
maxChance: 10000,
|
||||
tierChanceBoost: 0
|
||||
});
|
||||
|
||||
inputs.add("item", itemArray);
|
||||
recipe.json.add("inputs", inputs);
|
||||
});
|
||||
}
|
||||
//#endregion
|
||||
|
|
@ -1,7 +1,9 @@
|
|||
// priority: 0
|
||||
|
||||
//#region Disabled Items
|
||||
/** @global */
|
||||
global.GTCEU_DISABLED_ITEMS = [
|
||||
// Пыль пшеницы
|
||||
// Пыль пшеницы (Wheat Dusts)
|
||||
'gtceu:wheat_dust',
|
||||
'gtceu:small_wheat_dust',
|
||||
'gtceu:tiny_wheat_dust',
|
||||
|
|
@ -22,14 +24,14 @@ global.GTCEU_DISABLED_ITEMS = [
|
|||
'gtceu:lp_steam_solar_boiler',
|
||||
'gtceu:charcoal_pile_igniter',
|
||||
|
||||
// Примитивная помпа
|
||||
// Примитивная помпа (Primitive Pump)
|
||||
'gtceu:infinite_water_cover',
|
||||
'gtceu:ender_fluid_link_cover',
|
||||
'gtceu:pump_deck',
|
||||
'gtceu:pump_hatch',
|
||||
'gtceu:primitive_pump',
|
||||
|
||||
// Другое
|
||||
// Другое (Other)
|
||||
'gtceu:flint_mortar',
|
||||
'gtceu:flint_knife',
|
||||
'gtceu:firebrick',
|
||||
|
|
@ -175,7 +177,11 @@ global.GTCEU_DISABLED_ITEMS = [
|
|||
'gtceu:cracked_marble_bricks',
|
||||
'gtceu:mossy_marble_bricks'
|
||||
];
|
||||
//#endregion
|
||||
|
||||
|
||||
//#region Hidden Items
|
||||
/** @global */
|
||||
global.GTCEU_HIDED_ITEMS = [
|
||||
'gtceu:netherrack_dust',
|
||||
'gtceu:small_netherrack_dust',
|
||||
|
|
@ -183,7 +189,10 @@ global.GTCEU_HIDED_ITEMS = [
|
|||
|
||||
'gtceu:sus_record'
|
||||
];
|
||||
//#endregion
|
||||
|
||||
//#region Armor
|
||||
/** @global */
|
||||
global.GTCEU_ARMORS = [
|
||||
'gtceu:hazmat_chestpiece',
|
||||
'gtceu:hazmat_leggings',
|
||||
|
|
@ -201,7 +210,10 @@ global.GTCEU_ARMORS = [
|
|||
'gtceu:quarktech_helmet',
|
||||
'gtceu:advanced_quarktech_chestplate'
|
||||
];
|
||||
//#endregion
|
||||
|
||||
//#region Extruder Molds
|
||||
/** @global */
|
||||
global.TFG_EXTRUDER_MOLDS = [
|
||||
'tfg:mining_hammer_head_extruder_mold',
|
||||
'tfg:sword_head_extruder_mold',
|
||||
|
|
@ -230,14 +242,20 @@ global.TFG_EXTRUDER_MOLDS = [
|
|||
'tfg:shell_casing_extruder_mold',
|
||||
'tfg:large_casing_extruder_mold'
|
||||
];
|
||||
//#endregion
|
||||
|
||||
//#region Casting Molds
|
||||
/** @global */
|
||||
global.TFG_CASTING_MOLDS = [
|
||||
'tfg:lamp_casting_mold',
|
||||
'tfg:trapdoor_casting_mold',
|
||||
'tfg:chain_casting_mold',
|
||||
'tfg:bell_casting_mold'
|
||||
];
|
||||
//#endregion
|
||||
|
||||
//#region Ore Bearing Stone
|
||||
/** @global */
|
||||
global.ORE_BEARING_STONES = [
|
||||
'gabbro',
|
||||
'shale',
|
||||
|
|
@ -271,4 +289,13 @@ global.ORE_BEARING_STONES = [
|
|||
'mercury_stone',
|
||||
'glacio_stone'
|
||||
];
|
||||
//#endregion
|
||||
|
||||
//#region Add Circuits
|
||||
/** @global */
|
||||
global.ADD_CIRCUIT = [
|
||||
{recipeId: 'gtceu:chemical_reactor/tetrafluoroethylene_from_chloroform', circuitNumber: 1},
|
||||
{recipeId: 'gtceu:chemical_reactor/hydrofluoric_acid_from_elements', circuitNumber: 2},
|
||||
];
|
||||
//#endregion
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue