-
Notifications
You must be signed in to change notification settings - Fork 0
Example_Hatch
-
Capacity = initialCapacity * pow(4, tier)
-
实际容量 = 初始容量 * 电压等级 ^ 4
event.create('enhanced_fluid_input', 'custom')
.tiers(ELECTRIC_TIERS)
.machine((holder, tier, tankScaling) => new EnhancedFluidHatchPartMachine(holder, tier, IO.IN, 8000, 1))
/*
Builder(holder,tier,IO.IN,Cap,Slot)
Cap:int, initialCapacity
*/
.definition((tier, builder) => {
GTUF_Machines.colorOverlayHull(builder, 'overlay_pipe_in_emissive', 'overlay_fluid_hatch')//***
return builder
.langValue(GTValues.VNF[tier] + ' Enhanced Fluid Input Hatch')
.rotationState(RotationState.ALL)
.abilities(PartAbility.IMPORT_FLUIDS)
.tooltips(Component.translatable('gtuf.machine.enhanced_fluid_hatch.tooltip'),
Component.translatable('gtceu.universal.tooltip.fluid_storage_capacity',
FormattingUtil.formatNumbers(EnhancedFluidHatchPartMachine.getEnhancedCapacity(tier))))
.allowCoverOnFront(true)})
-
Parallels = 2 ^ ( Tier - 1 + Max( 0 , Tier - IV ) )
-
并行数 = 2 ^ ( 电压等级 - 1 + Max( 0 , 电压等级 - IV ) )
event.create('enhanced_parallel_hatch', 'custom') .tiers(ELECTRIC_TIERS) .machine((holder, tier, tankScaling) => new EnhancedParallelHatchPartMachine(holder, tier)) .definition((tier, builder) => builder .langValue(GTValues.VNF[tier] + ' Enhanced Parallel Hatch') .rotationState(RotationState.ALL) .abilities(PartAbility.PARALLEL_HATCH) .workableTieredHullModel( GTCEu.id('block/machines/parallel_hatch_mk' + Math.floor((tier + 1) / 2))) .tooltips(Component.translatable('gtuf.machine.enhanced_parallel_hatch.tooltip', EnhancedParallelHatchPartMachine.getParallelLimit(tier)), Component.translatable('gtceu.part_sharing.disabled')))
event.create('industrial_steam_hatch', 'custom')
.tiers([0])
.machine((holder, tier, tankScaling) => new IndustrialSteamHatchPartMachine(holder, 64000))
//Cap:64000(int) 容器容量
.definition((tier, builder) => {
GTUF_Machines.overlaySteamHull(builder, 'steam_hatch')
return builder
.langValue('Industrial Steam Hatch')
.rotationState(RotationState.ALL)
.abilities(PartAbility.STEAM)
.tooltips(Component.translatable('gtceu.universal.tooltip.fluid_storage_capacity', 64000),
Component.translatable('gtceu.machine.steam.steam_hatch.tooltip'))
.allowCoverOnFront(true)
})
-
Thread = 2 ^ ( Tier - LuV )
-
线程数 = 2 ^ ( 电压等级 - LuV )
event.create('thread_hatch', 'custom') .tiers(THREAD_TIERS) .machine((holder, tier, tankScaling) => new ThreadHatchPartMachine(holder, tier)) .definition((tier, builder) => builder .langValue(GTValues.VNF[tier] + ' Thread Hatch') .rotationState(RotationState.ALL) .abilities(GTUFPartAbility.THREAD_HATCH) .workableTieredHullModel(GTCEu.id('block/machines/parallel_hatch_mk4')) .tooltips(Component.translatable('gtuf.machine.thread_hatch.tooltip', 1 << (tier - 6)), Component.translatable('gtceu.part_sharing.disabled')))
-
EnergySaving = 100% - ( 5 * Tier * EnergySavingMultiplier )
-
节能值 = 100% - ( 5 * 电压等级 * 节能倍率 )
-
EnergySavingMultiplier can be adjusted in the config.
-
节能倍率 可以在 config 中进行调整。
-
Optimal strategy: when multiple Energy Saving Hatches are installed on the same multiblock, only the highest‑tier hatch takes effect.
-
最优策略:当多个节能仓安装在同一个多方块结构上时,仅等级最高的节能仓生效,而非倍乘
event.create('energy_saving_hatch', 'custom')
.tiers(ENERGY_SAVING_TIERS)
.machine((holder, tier, tankScaling) => new EnergySavingHatchPartMachine(holder, tier))
.definition((tier, builder) => builder
.langValue(GTValues.VNF[tier] + ' Energy Saving Hatch')
.rotationState(RotationState.ALL)
.abilities(GTUFPartAbility.ENERGY_SAVING)
.workableTieredHullModel(GTCEu.id('block/machines/parallel_hatch_mk4'))
.tooltips(Component.translatable('gtuf.machine.energy_saving_hatch.tooltip',
Math.round((1.0 - EnergySavingHatchPartMachine.getEnergyMultiplier(tier)) * 100)),
Component.translatable('gtceu.part_sharing.disabled')))
-
PressureHatch is port that mediate pressure connectivity between different multiblocks. They do not store pressure data themselves, and their voltage tier does not affect their pressure‑related values.
-
压力仓是介导不同多方块结构间压力连通的端口,本身不存储压力数据,电压等级并不对其数值具有影响。
event.create('pressure_hatch', 'custom')
.tiers(PRESSURE_TIERS)
.machine((holder, tier, tankScaling) => new PressureHatchPartMachine(holder, tier))
.definition((tier, builder) => builder
.langValue(GTValues.VNF[tier] + ' Pressure Hatch')
.rotationState(RotationState.ALL)
.abilities(GTUFPartAbility.PRESSURE)
.workableTieredHullModel(GTCEu.id('block/machines/parallel_hatch_mk4'))
.tooltips(Component.translatable('gtuf.machine.pressure_hatch.tooltip'),
Component.translatable('gtceu.part_sharing.disabled')))