Навожу красивости

This commit is contained in:
SpeeeDCraft 2023-11-15 17:19:23 +07:00
parent e37426eb4c
commit 08a0cf6aa8
5 changed files with 166 additions and 56 deletions

View file

@ -8,22 +8,17 @@ const registerTFCItemHeats = (event) => {
for (const [tfcMetalName, metalSpecifications] of Object.entries(Metals)) {
metalSpecifications.props.forEach(propertyName => {
let itemType = ItemHeats[propertyName]
let path = `tfc:tfc/item_heats/metal/${tfcMetalName}_${propertyName}`
let pathToExistFile = `tfc:tfc/item_heats/metal/${tfcMetalName}_${propertyName}`
if (itemType.heat_capacity == null) {
event.addJson(path, emptyJson)
}
else {
let ingredient = itemType.input(tfcMetalName)
let json = {
ingredient: ingredient,
heat_capacity: itemType.heat_capacity,
forging_temperature: metalSpecifications.forging_temp,
welding_temperature: metalSpecifications.welding_temp
}
event.addJson(path, json)
}
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
)
})
}
}