Skip to content

Example_Hatch

LiangquHMF edited this page Aug 11, 2026 · 3 revisions
  • 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')))

Clone this wiki locally