neuralgia/kubejs/server_scripts/tfc/data.js
2023-11-15 21:58:21 +07:00

24 lines
No EOL
851 B
JavaScript

// priority: 0
const registerTFCData = (event) => {
registerAutoTFCItemHeats(event)
}
const registerAutoTFCItemHeats = (event) => {
for (const [tfcMetalName, metalSpecifications] of Object.entries(Metals)) {
metalSpecifications.props.forEach(propertyName => {
let itemType = ItemHeats[propertyName]
let pathToExistFile = `tfc:tfc/item_heats/metal/${tfcMetalName}_${propertyName}`
if (itemType.heat_capacity == null) addEmptyJson(event, pathToExistFile)
else addItemHeat(
event,
`metal/${tfcMetalName}_${propertyName}`,
itemType.input(tfcMetalName),
itemType.heat_capacity,
metalSpecifications.forging_temp,
metalSpecifications.welding_temp
)
})
}
}